Skip to content

Commit d518281

Browse files
authored
Merge branch 'master' into astaev/formatFilterStrategy
2 parents 6ab9dab + 40cd8c6 commit d518281

36 files changed

+1343
-1582
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ All notable changes for each version of this project will be documented in this
2525
ng update igniteui-angular --migrate-only
2626
```
2727
This will ensure your application is updated to use the new output names.
28+
- `IgxCheckbox, IgxRadio, IgxSwitch` now follow the Google Material spec for focus behavior. See [checkbox](https://material.io/components/checkboxes), [radio](https://material.io/components/radio-buttons), and [switch](https://material.io/components/switches).
2829
- `IgxDialog`
2930
- The dialog content has been moved inside the dialog window container in the template. This means that if you have added something in-between the opening and closing tags of the dialog, you may have to adjust its styling a bit since that content is now rendered inside a container that has padding on it.
3031
- `IgxCalendar`

package-lock.json

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

package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,22 @@
4646
},
4747
"private": true,
4848
"dependencies": {
49-
"@angular/animations": "^11.1.0",
50-
"@angular/common": "^11.1.0",
51-
"@angular/compiler": "^11.1.0",
52-
"@angular/core": "^11.1.0",
53-
"@angular/forms": "^11.1.0",
54-
"@angular/platform-browser": "^11.1.0",
55-
"@angular/platform-browser-dynamic": "^11.1.0",
56-
"@angular/router": "^11.1.0",
49+
"@angular/animations": "^11.2.0",
50+
"@angular/common": "^11.2.0",
51+
"@angular/compiler": "^11.2.0",
52+
"@angular/core": "^11.2.0",
53+
"@angular/forms": "^11.2.0",
54+
"@angular/platform-browser": "^11.2.0",
55+
"@angular/platform-browser-dynamic": "^11.2.0",
56+
"@angular/router": "^11.2.0",
5757
"@igniteui/material-icons-extended": "^2.4.0",
5858
"@types/hammerjs": "^2.0.36",
5959
"@types/source-map": "0.5.2",
6060
"classlist.js": "^1.1.20150312",
6161
"core-js": "^2.6.11",
6262
"hammerjs": "^2.0.8",
6363
"igniteui-trial-watermark": "^1.0.3",
64-
"jszip": "^3.5.0",
64+
"jszip": "^3.6.0",
6565
"lodash.mergewith": "^4.6.2",
6666
"resize-observer-polyfill": "^1.5.1",
6767
"rxjs": "^6.6.3",
@@ -72,27 +72,27 @@
7272
"zone.js": "~0.10.3"
7373
},
7474
"devDependencies": {
75-
"@angular-devkit/build-angular": "~0.1101.1",
76-
"@angular-devkit/schematics": "^11.1.1",
75+
"@angular-devkit/build-angular": "~0.1102.0",
76+
"@angular-devkit/schematics": "^11.2.0",
7777
"@angular-eslint/builder": "1.1.0",
7878
"@angular-eslint/eslint-plugin": "1.1.0",
7979
"@angular-eslint/eslint-plugin-template": "1.1.0",
80-
"@angular-eslint/schematics": "^1.1.0",
80+
"@angular-eslint/schematics": "^1.2.0",
8181
"@angular-eslint/template-parser": "1.1.0",
82-
"@angular/cli": "~11.1.1",
83-
"@angular/compiler-cli": "^11.1.0",
84-
"@angular/language-service": "^11.1.0",
82+
"@angular/cli": "~11.2.0",
83+
"@angular/compiler-cli": "^11.2.0",
84+
"@angular/language-service": "^11.2.0",
8585
"@angularclass/hmr": "^2.1.3",
8686
"@types/jasmine": "^3.3.16",
8787
"@types/jasminewd2": "^2.0.8",
88-
"@types/node": "^12.12.39",
88+
"@types/node": "^12.20.0",
8989
"@types/webpack-env": "^1.15.2",
9090
"@typescript-eslint/eslint-plugin": "4.3.0",
9191
"@typescript-eslint/parser": "4.3.0",
9292
"browser-sync": "^2.26.12",
9393
"codelyzer": "^6.0.0",
9494
"coveralls": "^3.1.0",
95-
"eslint": "^7.6.0",
95+
"eslint": "^7.20.0",
9696
"eslint-plugin-import": "2.22.1",
9797
"eslint-plugin-jsdoc": "30.7.6",
9898
"eslint-plugin-prefer-arrow": "1.2.2",
@@ -121,20 +121,20 @@
121121
"karma-junit-reporter": "~2.0.1",
122122
"karma-spec-reporter": "~0.0.32",
123123
"lunr": "^2.3.8",
124-
"ng-packagr": "^11.0.3",
124+
"ng-packagr": "^11.2.1",
125125
"pngcrush": "^2.0.1",
126126
"protractor": "~7.0.0",
127127
"sass-true": "^5.0.0",
128128
"sassdoc": "^2.7.3",
129129
"sassdoc-plugin-localization": "^1.4.1",
130-
"stylelint": "^11.1.1",
131-
"stylelint-scss": "^3.17.2",
130+
"stylelint": "^13.10.0",
131+
"stylelint-scss": "^3.19.0",
132132
"themeleon": "^3.0.2",
133133
"ts-node": "~7.0.1",
134134
"tslint": "~6.1.0",
135135
"typedoc": "^0.17.7",
136136
"typedoc-plugin-localization": "^2.2.1",
137-
"typescript": "~4.0.2",
137+
"typescript": "^4.0.7",
138138
"webpack-sources": "1.3.0"
139139
}
140140
}

projects/igniteui-angular/src/lib/checkbox/checkbox.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
[attr.aria-label]="ariaLabel"
1414
(change)="_onCheckboxChange($event)"
1515
(click)="_onCheckboxClick($event)"
16-
(focus)="onFocus()"
1716
(blur)="onBlur()" />
1817

1918
<div

projects/igniteui-angular/src/lib/checkbox/checkbox.component.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,15 @@ describe('IgxCheckbox', () => {
219219
const fixture = TestBed.createComponent(CheckboxSimpleComponent);
220220
const testInstance = fixture.componentInstance;
221221
const checkboxInstance = testInstance.cb;
222+
const cbxEl = fixture.debugElement.query(By.directive(IgxCheckboxComponent)).nativeElement;
222223
const nativeCheckbox = checkboxInstance.nativeCheckbox.nativeElement;
223224
const nativeLabel = checkboxInstance.nativeLabel.nativeElement;
224225
const placeholderLabel = checkboxInstance.placeholderLabel.nativeElement;
226+
225227
fixture.detectChanges();
228+
expect(checkboxInstance.focused).toBe(false);
226229

227-
nativeCheckbox.dispatchEvent(new Event('focus'));
230+
cbxEl.dispatchEvent(new KeyboardEvent('keyup'));
228231
fixture.detectChanges();
229232
expect(checkboxInstance.focused).toBe(true);
230233

projects/igniteui-angular/src/lib/checkbox/checkbox.component.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
Component,
33
Directive,
44
EventEmitter,
5+
HostListener,
56
forwardRef,
67
HostBinding,
78
Input,
@@ -335,6 +336,15 @@ export class IgxCheckboxComponent implements ControlValueAccessor, EditorProvide
335336
* @hidden
336337
*/
337338
private _onChangeCallback: (_: any) => void = noop;
339+
/**
340+
* @hidden
341+
* @internal
342+
*/
343+
@HostListener('keyup', ['$event'])
344+
public onKeyUp(event: KeyboardEvent) {
345+
event.stopPropagation();
346+
this.focused = true;
347+
}
338348
/**
339349
* If `disabled` is `false`, switches the `checked` state.
340350
*
@@ -348,10 +358,10 @@ export class IgxCheckboxComponent implements ControlValueAccessor, EditorProvide
348358
return;
349359
}
350360

361+
this.nativeCheckbox.nativeElement.focus();
362+
351363
this.indeterminate = false;
352-
this.focused = false;
353364
this.checked = !this.checked;
354-
355365
this.change.emit({ checked: this.checked, checkbox: this });
356366
this._onChangeCallback(this.checked);
357367
}
@@ -378,11 +388,11 @@ export class IgxCheckboxComponent implements ControlValueAccessor, EditorProvide
378388
event.preventDefault();
379389
}
380390

391+
this.toggle();
392+
381393
if (isIE()) {
382394
this.nativeCheckbox.nativeElement.blur();
383395
}
384-
385-
this.toggle();
386396
}
387397

388398
/** @hidden @internal */
@@ -394,11 +404,6 @@ export class IgxCheckboxComponent implements ControlValueAccessor, EditorProvide
394404
this.toggle();
395405
}
396406

397-
/** @hidden @internal */
398-
public onFocus() {
399-
this.focused = true;
400-
}
401-
402407
/** @hidden @internal */
403408
public onBlur() {
404409
this.focused = false;

projects/igniteui-angular/src/lib/core/styles/components/checkbox/_checkbox-theme.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@
376376
}
377377

378378
%cbx-ripple--focused {
379-
@include animation('scale-in-out' 1s $ease-out-quad infinite);
380379
background: --var($theme, 'empty-color');
381380
transition: background .2s $ease-out-quad;
382381
opacity: .12;

projects/igniteui-angular/src/lib/core/styles/components/radio/_radio-theme.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@
343343
}
344344

345345
%radio-ripple--focused {
346-
@include animation('scale-in-out' 1s $ease-out-quad infinite);
347346
background: --var($theme, 'empty-color');
348347
transition: background .2s $ease-out-quad;
349348
opacity: .12;

projects/igniteui-angular/src/lib/core/styles/components/switch/_switch-theme.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,6 @@
392392
}
393393

394394
%switch-ripple--focused {
395-
@include animation('scale-in-out' 1s $ease-out-quad infinite);
396395
background: --var($theme, 'track-off-color');
397396
transition: background .2s $ease-out-quad;
398397
opacity: .12;

projects/igniteui-angular/src/lib/grids/api.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ export class GridBaseAPIService <T extends IgxGridBaseDirective & GridType> {
511511
expandedStates.set(rowID, expanded);
512512
grid.expansionStates = expandedStates;
513513
if (grid.rowEditable) {
514-
grid.endEdit(true);
514+
grid.endEdit(false);
515515
}
516516
}
517517

0 commit comments

Comments
 (0)