@angular/material 16.0.0-next.0 → 16.0.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/chips/index.d.ts +2 -2
  2. package/core/index.d.ts +0 -7
  3. package/core/tokens/m2/mdc/_circular-progress.scss +65 -0
  4. package/datepicker/index.d.ts +1 -0
  5. package/esm2020/chips/chip-set.mjs +7 -8
  6. package/esm2020/core/option/option.mjs +12 -12
  7. package/esm2020/core/version.mjs +1 -1
  8. package/esm2020/datepicker/calendar-body.mjs +12 -6
  9. package/esm2020/legacy-core/option/option.mjs +3 -3
  10. package/esm2020/legacy-snack-bar/snack-bar-container.mjs +3 -3
  11. package/esm2020/paginator/paginator.mjs +3 -3
  12. package/esm2020/progress-spinner/progress-spinner.mjs +5 -3
  13. package/esm2020/snack-bar/snack-bar-container.mjs +52 -4
  14. package/fesm2015/chips.mjs +6 -7
  15. package/fesm2015/chips.mjs.map +1 -1
  16. package/fesm2015/core.mjs +12 -12
  17. package/fesm2015/core.mjs.map +1 -1
  18. package/fesm2015/datepicker.mjs +11 -6
  19. package/fesm2015/datepicker.mjs.map +1 -1
  20. package/fesm2015/legacy-core.mjs +2 -2
  21. package/fesm2015/legacy-core.mjs.map +1 -1
  22. package/fesm2015/legacy-snack-bar.mjs +2 -2
  23. package/fesm2015/legacy-snack-bar.mjs.map +1 -1
  24. package/fesm2015/paginator.mjs +2 -2
  25. package/fesm2015/paginator.mjs.map +1 -1
  26. package/fesm2015/progress-spinner.mjs +4 -2
  27. package/fesm2015/progress-spinner.mjs.map +1 -1
  28. package/fesm2015/snack-bar.mjs +51 -4
  29. package/fesm2015/snack-bar.mjs.map +1 -1
  30. package/fesm2020/chips.mjs +6 -7
  31. package/fesm2020/chips.mjs.map +1 -1
  32. package/fesm2020/core.mjs +12 -12
  33. package/fesm2020/core.mjs.map +1 -1
  34. package/fesm2020/datepicker.mjs +11 -6
  35. package/fesm2020/datepicker.mjs.map +1 -1
  36. package/fesm2020/legacy-core.mjs +2 -2
  37. package/fesm2020/legacy-core.mjs.map +1 -1
  38. package/fesm2020/legacy-snack-bar.mjs +2 -2
  39. package/fesm2020/legacy-snack-bar.mjs.map +1 -1
  40. package/fesm2020/paginator.mjs +2 -2
  41. package/fesm2020/paginator.mjs.map +1 -1
  42. package/fesm2020/progress-spinner.mjs +4 -2
  43. package/fesm2020/progress-spinner.mjs.map +1 -1
  44. package/fesm2020/snack-bar.mjs +51 -4
  45. package/fesm2020/snack-bar.mjs.map +1 -1
  46. package/package.json +2 -2
  47. package/progress-spinner/_progress-spinner-theme.scss +12 -16
  48. package/schematics/ng-add/index.js +1 -1
  49. package/schematics/ng-add/index.mjs +1 -1
  50. package/snack-bar/index.d.ts +12 -0
package/fesm2015/core.mjs CHANGED
@@ -22,7 +22,7 @@ import { ENTER, SPACE, hasModifierKey } from '@angular/cdk/keycodes';
22
22
  * found in the LICENSE file at https://angular.io/license
23
23
  */
24
24
  /** Current version of Angular Material. */
25
- const VERSION = new Version('16.0.0-next.0');
25
+ const VERSION = new Version('16.0.0-next.1');
26
26
 
27
27
  /**
28
28
  * @license
@@ -1734,15 +1734,6 @@ class _MatOptionBase {
1734
1734
  this._emitSelectionChangeEvent(true);
1735
1735
  }
1736
1736
  }
1737
- /**
1738
- * Gets the `aria-selected` value for the option. We explicitly omit the `aria-selected`
1739
- * attribute from single-selection, unselected options. Including the `aria-selected="false"`
1740
- * attributes adds a significant amount of noise to screen-reader users without providing useful
1741
- * information.
1742
- */
1743
- _getAriaSelected() {
1744
- return this.selected || (this.multiple ? false : null);
1745
- }
1746
1737
  /** Returns the correct tabindex for the option depending on disabled state. */
1747
1738
  _getTabIndex() {
1748
1739
  return this.disabled ? '-1' : '0';
@@ -1800,7 +1791,7 @@ class MatOption extends _MatOptionBase {
1800
1791
  }
1801
1792
  }
1802
1793
  MatOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.0", ngImport: i0, type: MatOption, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: MAT_OPTION_PARENT_COMPONENT, optional: true }, { token: MAT_OPTGROUP, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1803
- MatOption.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0-next.0", type: MatOption, selector: "mat-option", host: { attributes: { "role": "option" }, listeners: { "click": "_selectViaInteraction()", "keydown": "_handleKeydown($event)" }, properties: { "attr.tabindex": "_getTabIndex()", "class.mdc-list-item--selected": "selected", "class.mat-mdc-option-multiple": "multiple", "class.mat-mdc-option-active": "active", "class.mdc-list-item--disabled": "disabled", "id": "id", "attr.aria-selected": "_getAriaSelected()", "attr.aria-disabled": "disabled.toString()" }, classAttribute: "mat-mdc-option mat-mdc-focus-indicator mdc-list-item" }, exportAs: ["matOption"], usesInheritance: true, ngImport: i0, template: "<mat-pseudo-checkbox *ngIf=\"multiple\" class=\"mat-mdc-option-pseudo-checkbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\" [disabled]=\"disabled\"></mat-pseudo-checkbox>\n\n<ng-content select=\"mat-icon\"></ng-content>\n\n<span class=\"mdc-list-item__primary-text\" #text><ng-content></ng-content></span>\n\n<!-- Render checkmark at the end for single-selection. -->\n<mat-pseudo-checkbox *ngIf=\"!multiple && selected && !hideSingleSelectionIndicator\"\n class=\"mat-mdc-option-pseudo-checkbox\" state=\"checked\" [disabled]=\"disabled\"\n appearance=\"minimal\"></mat-pseudo-checkbox>\n\n<!-- See a11y notes inside optgroup.ts for context behind this element. -->\n<span class=\"cdk-visually-hidden\" *ngIf=\"group && group._inert\">({{ group.label }})</span>\n\n<div class=\"mat-mdc-option-ripple\" mat-ripple\n [matRippleTrigger]=\"_getHostElement()\"\n [matRippleDisabled]=\"disabled || disableRipple\">\n</div>\n", styles: [".mat-mdc-option{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);min-height:48px}.mat-mdc-option:focus{outline:none}[dir=rtl] .mat-mdc-option,.mat-mdc-option[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-option.mdc-list-item{align-items:center}.mat-mdc-option.mdc-list-item--disabled{opacity:.38;cursor:default}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:\"\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-active::before{content:\"\"}"], dependencies: [{ kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatPseudoCheckbox, selector: "mat-pseudo-checkbox", inputs: ["state", "disabled", "appearance"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1794
+ MatOption.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0-next.0", type: MatOption, selector: "mat-option", host: { attributes: { "role": "option" }, listeners: { "click": "_selectViaInteraction()", "keydown": "_handleKeydown($event)" }, properties: { "attr.tabindex": "_getTabIndex()", "class.mdc-list-item--selected": "selected", "class.mat-mdc-option-multiple": "multiple", "class.mat-mdc-option-active": "active", "class.mdc-list-item--disabled": "disabled", "id": "id", "attr.aria-selected": "selected", "attr.aria-disabled": "disabled.toString()" }, classAttribute: "mat-mdc-option mat-mdc-focus-indicator mdc-list-item" }, exportAs: ["matOption"], usesInheritance: true, ngImport: i0, template: "<mat-pseudo-checkbox *ngIf=\"multiple\" class=\"mat-mdc-option-pseudo-checkbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\" [disabled]=\"disabled\"></mat-pseudo-checkbox>\n\n<ng-content select=\"mat-icon\"></ng-content>\n\n<span class=\"mdc-list-item__primary-text\" #text><ng-content></ng-content></span>\n\n<!-- Render checkmark at the end for single-selection. -->\n<mat-pseudo-checkbox *ngIf=\"!multiple && selected && !hideSingleSelectionIndicator\"\n class=\"mat-mdc-option-pseudo-checkbox\" state=\"checked\" [disabled]=\"disabled\"\n appearance=\"minimal\"></mat-pseudo-checkbox>\n\n<!-- See a11y notes inside optgroup.ts for context behind this element. -->\n<span class=\"cdk-visually-hidden\" *ngIf=\"group && group._inert\">({{ group.label }})</span>\n\n<div class=\"mat-mdc-option-ripple\" mat-ripple\n [matRippleTrigger]=\"_getHostElement()\"\n [matRippleDisabled]=\"disabled || disableRipple\">\n</div>\n", styles: [".mat-mdc-option{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);min-height:48px}.mat-mdc-option:focus{outline:none}[dir=rtl] .mat-mdc-option,.mat-mdc-option[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-option.mdc-list-item{align-items:center}.mat-mdc-option.mdc-list-item--disabled{opacity:.38;cursor:default}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:\"\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-active::before{content:\"\"}"], dependencies: [{ kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatPseudoCheckbox, selector: "mat-pseudo-checkbox", inputs: ["state", "disabled", "appearance"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1804
1795
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.0", ngImport: i0, type: MatOption, decorators: [{
1805
1796
  type: Component,
1806
1797
  args: [{ selector: 'mat-option', exportAs: 'matOption', host: {
@@ -1811,7 +1802,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.0",
1811
1802
  '[class.mat-mdc-option-active]': 'active',
1812
1803
  '[class.mdc-list-item--disabled]': 'disabled',
1813
1804
  '[id]': 'id',
1814
- '[attr.aria-selected]': '_getAriaSelected()',
1805
+ // Set aria-selected to false for non-selected items and true for selected items. Conform to
1806
+ // [WAI ARIA Listbox authoring practices guide](
1807
+ // https://www.w3.org/WAI/ARIA/apg/patterns/listbox/), "If any options are selected, each
1808
+ // selected option has either aria-selected or aria-checked set to true. All options that are
1809
+ // selectable but not selected have either aria-selected or aria-checked set to false." Align
1810
+ // aria-selected implementation of Chips and List components.
1811
+ //
1812
+ // Set `aria-selected="false"` on not-selected listbox options to fix VoiceOver announcing
1813
+ // every option as "selected" (#21491).
1814
+ '[attr.aria-selected]': 'selected',
1815
1815
  '[attr.aria-disabled]': 'disabled.toString()',
1816
1816
  '(click)': '_selectViaInteraction()',
1817
1817
  '(keydown)': '_handleKeydown($event)',