Skip to content

Commit b3f4815

Browse files
committed
Release 2.3.0
1 parent a409c67 commit b3f4815

22 files changed

+785
-260
lines changed

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
## 2.3.0 (27.06.2022)
2+
3+
### Fixes and improvements
4+
5+
- [Sidenav](https://mdbootstrap.com/docs/b5/angular/navigation/sidenav/)
6+
- Resolved problems with arrow position updates in slim mode and accordion mode
7+
- Resolved problem with initialization of component with `[right]="true"` and `[hidden]="false"` options
8+
- Fixed problem with long content display in component with `[right]="true"` option
9+
- Fixed problems with long label positioning in [checkbox](https://mdbootstrap.com/docs/b5/angular/forms/checkbox/), [switch](https://mdbootstrap.com/docs/b5/angular/forms/switch/) and [radio](https://mdbootstrap.com/docs/b5/angular/forms/radio/)
10+
- Resolved problem with multiple `paginationChange` events emitted on [datatable](https://mdbootstrap.com/docs/b5/angular/data/datatables/) initialization
11+
- Resolved problems with [pagination](https://mdbootstrap.com/docs/b5/angular/navigation/pagination/) and [accordion](https://mdbootstrap.com/docs/b5/angular/components/accordion/) styles when using [theme](https://mdbootstrap.com/docs/b5/angular/content-styles/theme/)
12+
- Fixed problem with max file quantity in [file upload](https://mdbootstrap.com/docs/b5/angular/plugins/file-upload/) plugin with `multiple` mode
13+
- Resolved problem with first option highlight in [select](https://mdbootstrap.com/docs/b5/angular/forms/select/) with a `[highlightFirst]="false"` option
14+
- Added `type="button"` to the 'insert horizontal line' button in [WYSIWYG](https://mdbootstrap.com/docs/b5/angular/plugins/wysiwyg-editor/) to resolve problem with form submit
15+
- Zero-length [tooltip](https://mdbootstrap.com/docs/b5/angular/components/tooltips/) and [popover](https://mdbootstrap.com/docs/b5/angular/components/popovers/) will no longer be displayed
16+
- Fixed problem with multiple `(selected)` events emitted after click on [autocomplete](https://mdbootstrap.com/docs/b5/angular/forms/autocomplete/) option
17+
18+
### New
19+
20+
- Addew new [onboarding plugin](https://mdbootstrap.com/docs/b5/angular/plugins/onboarding/)
21+
- [Stepper](https://mdbootstrap.com/docs/b5/angular/components/stepper/)
22+
- Added possibility to block step navigation on step header click
23+
- Added possibility to edit buttons and header text in mobile mode
24+
- Added new `--mdb-bg-opacity` CSS variable
25+
- Added optional auto select on tab-out in [select](https://mdbootstrap.com/docs/b5/angular/forms/select/) and [autocomplete](https://mdbootstrap.com/docs/b5/angular/forms/autocomplete/)
26+
- Added list group new variant with `.list-group-light` class
27+
- Added `.table-group-divider` and `.table-divider-color` classes to emphasize the separation of thead from tbody
28+
- Added new `.divider-horizontal`, `.divider-vertical`, `.divider-horizontal-blurry` and `.divider-vertical-blurry` classes
29+
30+
---
31+
132
## 2.2.0 (16.05.2022)
233

334
### Fixes and improvements:

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MDB 5 Angular
22

3-
Version: FREE 2.2.0
3+
Version: FREE 2.3.0
44

55
Documentation:
66
https://mdbootstrap.com/docs/b5/angular/

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mdb-angular-ui-kit-free",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",

projects/mdb-angular-ui-kit/CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
## 2.3.0 (27.06.2022)
2+
3+
### Fixes and improvements
4+
5+
- [Sidenav](https://mdbootstrap.com/docs/b5/angular/navigation/sidenav/)
6+
- Resolved problems with arrow position updates in slim mode and accordion mode
7+
- Resolved problem with initialization of component with `[right]="true"` and `[hidden]="false"` options
8+
- Fixed problem with long content display in component with `[right]="true"` option
9+
- Fixed problems with long label positioning in [checkbox](https://mdbootstrap.com/docs/b5/angular/forms/checkbox/), [switch](https://mdbootstrap.com/docs/b5/angular/forms/switch/) and [radio](https://mdbootstrap.com/docs/b5/angular/forms/radio/)
10+
- Resolved problem with multiple `paginationChange` events emitted on [datatable](https://mdbootstrap.com/docs/b5/angular/data/datatables/) initialization
11+
- Resolved problems with [pagination](https://mdbootstrap.com/docs/b5/angular/navigation/pagination/) and [accordion](https://mdbootstrap.com/docs/b5/angular/components/accordion/) styles when using [theme](https://mdbootstrap.com/docs/b5/angular/content-styles/theme/)
12+
- Fixed problem with max file quantity in [file upload](https://mdbootstrap.com/docs/b5/angular/plugins/file-upload/) plugin with `multiple` mode
13+
- Resolved problem with first option highlight in [select](https://mdbootstrap.com/docs/b5/angular/forms/select/) with a `[highlightFirst]="false"` option
14+
- Added `type="button"` to the 'insert horizontal line' button in [WYSIWYG](https://mdbootstrap.com/docs/b5/angular/plugins/wysiwyg-editor/) to resolve problem with form submit
15+
- Zero-length [tooltip](https://mdbootstrap.com/docs/b5/angular/components/tooltips/) and [popover](https://mdbootstrap.com/docs/b5/angular/components/popovers/) will no longer be displayed
16+
- Fixed problem with multiple `(selected)` events emitted after click on [autocomplete](https://mdbootstrap.com/docs/b5/angular/forms/autocomplete/) option
17+
18+
### New
19+
20+
- Addew new [onboarding plugin](https://mdbootstrap.com/docs/b5/angular/plugins/onboarding/)
21+
- [Stepper](https://mdbootstrap.com/docs/b5/angular/components/stepper/)
22+
- Added possibility to block step navigation on step header click
23+
- Added possibility to edit buttons and header text in mobile mode
24+
- Added new `--mdb-bg-opacity` CSS variable
25+
- Added optional auto select on tab-out in [select](https://mdbootstrap.com/docs/b5/angular/forms/select/) and [autocomplete](https://mdbootstrap.com/docs/b5/angular/forms/autocomplete/)
26+
- Added list group new variant with `.list-group-light` class
27+
- Added `.table-group-divider` and `.table-divider-color` classes to emphasize the separation of thead from tbody
28+
- Added new `.divider-horizontal`, `.divider-vertical`, `.divider-horizontal-blurry` and `.divider-vertical-blurry` classes
29+
30+
---
31+
132
## 2.2.0 (16.05.2022)
233

334
### Fixes and improvements:

projects/mdb-angular-ui-kit/assets/scss/free/_list-group.scss

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,36 @@
88
transition: 0.5s;
99
}
1010
}
11+
12+
.list-group-light {
13+
.list-group-item {
14+
padding: 1rem 0;
15+
border: 2px solid hsl(0, 0%, 96%);
16+
}
17+
> .list-group-item {
18+
border-width: 0 0 2px;
19+
&:last-of-type {
20+
border: none;
21+
}
22+
}
23+
.active {
24+
border: none;
25+
border-radius: 0.5rem;
26+
background-color: hsl(217, 88.2%, 90%);
27+
color: hsl(217, 88.8%, 35.1%);
28+
}
29+
.list-group-item-action {
30+
&:hover {
31+
border-radius: 0.5rem;
32+
}
33+
&:focus {
34+
border-radius: 0.5rem;
35+
}
36+
}
37+
}
38+
39+
.list-group-small {
40+
.list-group-item {
41+
padding: 0.5rem 0;
42+
}
43+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
:root {
22
--mdb-font-roboto: #{inspect($font-family-roboto)};
3+
--mdb-bg-opacity: 1;
34
}

projects/mdb-angular-ui-kit/assets/scss/free/_tables.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,12 @@
4242
background-color: var(--#{$variable-prefix}table-hover-bg);
4343
}
4444
}
45+
46+
.table-group-divider {
47+
border-top: (2 * $table-border-width) solid;
48+
border-top-color: inherit;
49+
}
50+
51+
.table-divider-color {
52+
border-top-color: rgba(0, 0, 0, 0.1);
53+
}

projects/mdb-angular-ui-kit/assets/scss/free/_utilities.scss

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,34 @@ $utilities: map-merge(
174174
),
175175
)
176176
);
177+
178+
hr.divider-horizontal:not([size]) {
179+
height: 2px;
180+
}
181+
182+
.divider-horizontal {
183+
opacity: 1;
184+
background-color: #f5f5f5;
185+
height: 2px;
186+
}
187+
188+
.divider-vertical {
189+
opacity: 1;
190+
background-color: #f5f5f5;
191+
display: inline-block;
192+
width: 2px;
193+
margin: 0 1rem;
194+
}
195+
196+
hr.divider-horizontal-blurry {
197+
background-image: linear-gradient(90deg, transparent, hsl(0, 0%, 40%), transparent);
198+
background-color: transparent;
199+
}
200+
201+
hr.divider-vertical-blurry {
202+
background-image: linear-gradient(180deg, transparent, hsl(0, 0%, 40%), transparent);
203+
background-color: transparent;
204+
width: 1px;
205+
top: 0;
206+
right: 0;
207+
}

projects/mdb-angular-ui-kit/assets/scss/free/forms/_form-check.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
&[type='checkbox'] {
8484
border-radius: $form-check-input-checkbox-border-radius;
8585
margin-top: 0.19em;
86-
margin-right: 8px;
86+
margin-right: 4px;
8787

8888
&:focus {
8989
&:after {
@@ -153,7 +153,7 @@
153153
width: $form-check-input-radio-width;
154154
height: $form-check-input-radio-height;
155155
margin-top: 0.125em;
156-
margin-right: 6px;
156+
margin-right: 4px;
157157

158158
&:before {
159159
width: $form-check-input-radio-before-width;
@@ -214,7 +214,7 @@
214214
height: $form-switch-form-check-input-height;
215215
background-color: $form-switch-form-check-input-background-color;
216216
margin-top: 0.3em;
217-
margin-right: 8px;
217+
margin-right: 4px;
218218

219219
&:after {
220220
content: '';
Lines changed: 70 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import { Component } from '@angular/core';
2-
import { ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { Component, ViewChild } from '@angular/core';
2+
import { ComponentFixture, fakeAsync, flush, TestBed, tick } from '@angular/core/testing';
3+
import { MdbCollapseDirective } from '.';
34
import { MdbCollapseModule } from './collapse.module';
45

56
const template = `
67
<button id="button" (click)="collapse.toggle()">Button</button>
7-
<div mdbCollapse #collapse="mdbCollapse" class="collapse" [collapsed]="collapsed" (collapseShown)="onShown()" (collapseHidden)="onHidden()">
8+
<div mdbCollapse #collapse="mdbCollapse" class="collapse" [collapsed]="collapsed">
89
Collapse directive content
910
</div>
1011
`;
@@ -14,12 +15,13 @@ const template = `
1415
template,
1516
})
1617
class TestCollapseComponent {
18+
@ViewChild('collapse') collapse: MdbCollapseDirective;
19+
1720
collapsed = true;
18-
onShown = () => {};
19-
onHidden = () => {};
2021
}
2122

2223
describe('MDB Collapse', () => {
24+
const ANIMATION_TIME = 355;
2325
let fixture: ComponentFixture<TestCollapseComponent>;
2426
let element: any;
2527
let component: any;
@@ -42,28 +44,68 @@ describe('MDB Collapse', () => {
4244
expect(collapse.classList.contains('show')).toBe(false);
4345
});
4446

45-
it('should have content expanded if collapsed input is set to false', () => {
46-
// const onShownSpy = jest.spyOn(component, 'onShown');
47-
// component.collapsed = false;
48-
// fixture.detectChanges();
49-
// onShownSpy.and.callFake(() => {
50-
// expect(collapse.classList.contains('show')).toBe(true);
51-
// });
52-
});
47+
it('should be expanded if collapsed input is set to false', fakeAsync(() => {
48+
component.collapsed = false;
49+
fixture.detectChanges();
5350

54-
it('should allow toggling component by clicking on another element', () => {
55-
// const onShownSpy = jest.spyOn(component, 'onShown');
56-
// const onHiddenSpy = jest.spyOn(component, 'onHidden');
57-
// const buttonEl = fixture.nativeElement.querySelector('#button');
58-
// buttonEl.click();
59-
// fixture.detectChanges();
60-
// onShownSpy.and.callFake(() => {
61-
// expect(collapse.classList.contains('show')).toBe(true);
62-
// });
63-
// buttonEl.click();
64-
// fixture.detectChanges();
65-
// onHiddenSpy.and.callFake(() => {
66-
// expect(collapse.classList.contains('show')).toBe(false);
67-
// });
68-
});
51+
tick(ANIMATION_TIME);
52+
flush();
53+
fixture.detectChanges();
54+
55+
expect(collapse.classList).toContain('show');
56+
}));
57+
58+
it('should allow toggling component by clicking on another element', fakeAsync(() => {
59+
const button = fixture.nativeElement.querySelector('button');
60+
61+
expect(collapse.classList).not.toContain('show');
62+
63+
button.click();
64+
fixture.detectChanges();
65+
66+
tick(ANIMATION_TIME);
67+
flush();
68+
fixture.detectChanges();
69+
70+
expect(collapse.classList).toContain('show');
71+
72+
button.click();
73+
fixture.detectChanges();
74+
75+
tick(ANIMATION_TIME);
76+
flush();
77+
fixture.detectChanges();
78+
79+
expect(collapse.classList).not.toContain('show');
80+
}));
81+
82+
it('should emit events on collapse and expand', fakeAsync(() => {
83+
const button = fixture.nativeElement.querySelector('button');
84+
const showSpy = jest.spyOn(component.collapse.collapseShow, 'emit');
85+
const shownSpy = jest.spyOn(component.collapse.collapseShown, 'emit');
86+
const hideSpy = jest.spyOn(component.collapse.collapseHide, 'emit');
87+
const hiddenSpy = jest.spyOn(component.collapse.collapseHidden, 'emit');
88+
89+
button.click();
90+
fixture.detectChanges();
91+
92+
expect(showSpy).toHaveBeenCalled();
93+
94+
tick(ANIMATION_TIME);
95+
flush();
96+
fixture.detectChanges();
97+
98+
expect(shownSpy).toHaveBeenCalled();
99+
100+
button.click();
101+
fixture.detectChanges();
102+
103+
expect(hideSpy).toHaveBeenCalled();
104+
105+
tick(ANIMATION_TIME);
106+
flush();
107+
fixture.detectChanges();
108+
109+
expect(hiddenSpy).toHaveBeenCalled();
110+
}));
69111
});

0 commit comments

Comments
 (0)