@angular/material 17.0.0-next.0 → 17.0.0-next.2

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 (204) hide show
  1. package/_index.scss +3 -4
  2. package/autocomplete/_autocomplete-theme.scss +12 -18
  3. package/autocomplete/index.d.ts +15 -24
  4. package/badge/_badge-theme.scss +15 -27
  5. package/badge/index.d.ts +9 -17
  6. package/bottom-sheet/_bottom-sheet-theme.scss +13 -22
  7. package/button/_button-base.scss +3 -3
  8. package/button/_button-theme-private.scss +3 -2
  9. package/button/_button-theme.scss +18 -25
  10. package/button/_fab-theme.scss +31 -49
  11. package/button/_icon-button-theme.scss +19 -26
  12. package/button/index.d.ts +22 -31
  13. package/button-toggle/_button-toggle-theme.scss +17 -28
  14. package/button-toggle/index.d.ts +15 -18
  15. package/card/_card-theme.scss +27 -38
  16. package/checkbox/_checkbox-theme.scss +28 -45
  17. package/checkbox/index.d.ts +21 -27
  18. package/chips/_chips-theme.scss +18 -56
  19. package/core/_core-theme.scss +24 -39
  20. package/core/color/_all-color.scss +7 -15
  21. package/core/density/private/_all-density.scss +34 -39
  22. package/core/focus-indicators/_focus-indicators-theme.scss +6 -8
  23. package/core/focus-indicators/_private.scss +22 -26
  24. package/core/index.d.ts +7 -11
  25. package/core/mdc-helpers/_mdc-helpers.scss +19 -22
  26. package/core/option/_optgroup-theme.scss +13 -23
  27. package/core/option/_option-theme.scss +23 -37
  28. package/core/ripple/_ripple-theme.scss +6 -10
  29. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +17 -24
  30. package/core/style/_form-common.scss +7 -7
  31. package/core/style/_private.scss +5 -7
  32. package/core/style/_sass-utils.scss +7 -0
  33. package/core/testing/index.d.ts +2 -1
  34. package/core/theming/_all-theme.scss +41 -41
  35. package/core/theming/_inspection.scss +133 -59
  36. package/core/theming/_m2-inspection.scss +268 -0
  37. package/core/theming/_theming.scss +59 -20
  38. package/core/tokens/m2/mat/_autocomplete.scss +5 -8
  39. package/core/tokens/m2/mat/_badge.scss +12 -15
  40. package/core/tokens/m2/mat/_bottom-sheet.scss +11 -17
  41. package/core/tokens/m2/mat/_card.scss +15 -21
  42. package/core/tokens/m2/mat/_datepicker.scss +28 -38
  43. package/core/tokens/m2/mat/_divider.scss +5 -8
  44. package/core/tokens/m2/mat/_expansion.scss +24 -28
  45. package/core/tokens/m2/mat/_form-field.scss +21 -25
  46. package/core/tokens/m2/mat/_grid-list.scss +8 -8
  47. package/core/tokens/m2/mat/_icon.scss +3 -3
  48. package/core/tokens/m2/mat/_legacy-button-toggle.scss +15 -19
  49. package/core/tokens/m2/mat/_menu.scss +12 -17
  50. package/core/tokens/m2/mat/_optgroup.scss +12 -17
  51. package/core/tokens/m2/mat/_option.scss +16 -28
  52. package/core/tokens/m2/mat/_paginator.scss +16 -18
  53. package/core/tokens/m2/mat/_radio.scss +7 -10
  54. package/core/tokens/m2/mat/_select.scss +15 -29
  55. package/core/tokens/m2/mat/_sidenav.scss +12 -14
  56. package/core/tokens/m2/mat/_slide-toggle.scss +9 -17
  57. package/core/tokens/m2/mat/_slider.scss +5 -5
  58. package/core/tokens/m2/mat/_snack-bar.scss +7 -8
  59. package/core/tokens/m2/mat/_standard-button-toggle.scss +23 -22
  60. package/core/tokens/m2/mat/_stepper.scss +30 -33
  61. package/core/tokens/m2/mat/_tab-header-with-background.scss +6 -8
  62. package/core/tokens/m2/mat/_tab-header.scss +13 -18
  63. package/core/tokens/m2/mat/_table.scss +19 -23
  64. package/core/tokens/m2/mat/_toolbar.scss +12 -16
  65. package/core/tokens/m2/mdc/_checkbox.scss +21 -20
  66. package/core/tokens/m2/mdc/_chip.scss +38 -24
  67. package/core/tokens/m2/mdc/_circular-progress.scss +5 -6
  68. package/core/tokens/m2/mdc/_dialog.scss +16 -30
  69. package/core/tokens/m2/mdc/_elevated-card.scss +6 -9
  70. package/core/tokens/m2/mdc/_extended-fab.scss +8 -17
  71. package/core/tokens/m2/mdc/_fab.scss +6 -7
  72. package/core/tokens/m2/mdc/_filled-text-field.scss +16 -22
  73. package/core/tokens/m2/mdc/_icon-button.scss +3 -3
  74. package/core/tokens/m2/mdc/_linear-progress.scss +9 -10
  75. package/core/tokens/m2/mdc/_list.scss +44 -42
  76. package/core/tokens/m2/mdc/_outlined-card.scss +7 -10
  77. package/core/tokens/m2/mdc/_outlined-text-field.scss +14 -20
  78. package/core/tokens/m2/mdc/_plain-tooltip.scss +9 -22
  79. package/core/tokens/m2/mdc/_radio.scss +11 -11
  80. package/core/tokens/m2/mdc/_slider.scss +16 -23
  81. package/core/tokens/m2/mdc/_snack-bar.scss +10 -23
  82. package/core/tokens/m2/mdc/_switch.scss +16 -19
  83. package/core/tokens/m2/mdc/_tab-indicator.scss +5 -8
  84. package/core/tokens/m2/mdc/_tab.scss +5 -4
  85. package/core/typography/_all-typography.scss +44 -47
  86. package/core/typography/_definition.scss +258 -0
  87. package/core/typography/_property-getters.scss +63 -0
  88. package/core/typography/_typography-utils.scss +9 -69
  89. package/core/typography/_typography.scss +38 -494
  90. package/core/typography/_versioning.scss +91 -0
  91. package/datepicker/_datepicker-theme.scss +20 -34
  92. package/datepicker/index.d.ts +3 -3
  93. package/dialog/_dialog-theme.scss +22 -23
  94. package/dialog/_mdc-dialog-structure-overrides.scss +12 -10
  95. package/dialog/index.d.ts +2 -0
  96. package/divider/_divider-theme.scss +12 -18
  97. package/esm2022/autocomplete/autocomplete-trigger.mjs +5 -17
  98. package/esm2022/autocomplete/autocomplete.mjs +23 -50
  99. package/esm2022/badge/badge.mjs +11 -29
  100. package/esm2022/button/button-base.mjs +32 -27
  101. package/esm2022/button/button.mjs +6 -6
  102. package/esm2022/button/fab.mjs +23 -31
  103. package/esm2022/button/icon-button.mjs +6 -6
  104. package/esm2022/button/testing/button-harness.mjs +3 -3
  105. package/esm2022/button-toggle/button-toggle.mjs +25 -33
  106. package/esm2022/checkbox/checkbox.mjs +32 -39
  107. package/esm2022/core/option/optgroup.mjs +10 -11
  108. package/esm2022/core/option/option.mjs +6 -6
  109. package/esm2022/core/testing/option-harness.mjs +3 -3
  110. package/esm2022/core/version.mjs +1 -1
  111. package/esm2022/datepicker/calendar.mjs +1 -1
  112. package/esm2022/datepicker/datepicker-base.mjs +2 -2
  113. package/esm2022/datepicker/datepicker-toggle.mjs +1 -1
  114. package/esm2022/datepicker/month-view.mjs +2 -2
  115. package/esm2022/datepicker/multi-year-view.mjs +2 -2
  116. package/esm2022/datepicker/year-view.mjs +2 -2
  117. package/esm2022/dialog/dialog-container.mjs +16 -3
  118. package/esm2022/form-field/form-field.mjs +3 -3
  119. package/esm2022/menu/menu-item.mjs +15 -11
  120. package/esm2022/menu/menu.mjs +9 -22
  121. package/esm2022/paginator/paginator.mjs +1 -1
  122. package/esm2022/select/select.mjs +3 -3
  123. package/esm2022/slide-toggle/slide-toggle.mjs +33 -37
  124. package/esm2022/slider/slider-input.mjs +19 -9
  125. package/esm2022/slider/slider.mjs +2 -2
  126. package/esm2022/snack-bar/simple-snack-bar.mjs +1 -1
  127. package/esm2022/tabs/tab-group.mjs +3 -3
  128. package/expansion/_expansion-theme.scss +16 -24
  129. package/fesm2022/autocomplete.mjs +25 -63
  130. package/fesm2022/autocomplete.mjs.map +1 -1
  131. package/fesm2022/badge.mjs +11 -28
  132. package/fesm2022/badge.mjs.map +1 -1
  133. package/fesm2022/button/testing.mjs +2 -2
  134. package/fesm2022/button/testing.mjs.map +1 -1
  135. package/fesm2022/button-toggle.mjs +25 -32
  136. package/fesm2022/button-toggle.mjs.map +1 -1
  137. package/fesm2022/button.mjs +59 -61
  138. package/fesm2022/button.mjs.map +1 -1
  139. package/fesm2022/checkbox.mjs +31 -38
  140. package/fesm2022/checkbox.mjs.map +1 -1
  141. package/fesm2022/core/testing.mjs +2 -2
  142. package/fesm2022/core/testing.mjs.map +1 -1
  143. package/fesm2022/core.mjs +14 -13
  144. package/fesm2022/core.mjs.map +1 -1
  145. package/fesm2022/datepicker.mjs +6 -6
  146. package/fesm2022/datepicker.mjs.map +1 -1
  147. package/fesm2022/dialog.mjs +15 -2
  148. package/fesm2022/dialog.mjs.map +1 -1
  149. package/fesm2022/form-field.mjs +2 -2
  150. package/fesm2022/form-field.mjs.map +1 -1
  151. package/fesm2022/menu.mjs +23 -31
  152. package/fesm2022/menu.mjs.map +1 -1
  153. package/fesm2022/paginator.mjs +1 -1
  154. package/fesm2022/paginator.mjs.map +1 -1
  155. package/fesm2022/select.mjs +2 -2
  156. package/fesm2022/select.mjs.map +1 -1
  157. package/fesm2022/slide-toggle.mjs +33 -36
  158. package/fesm2022/slide-toggle.mjs.map +1 -1
  159. package/fesm2022/slider.mjs +20 -10
  160. package/fesm2022/slider.mjs.map +1 -1
  161. package/fesm2022/snack-bar.mjs +1 -1
  162. package/fesm2022/snack-bar.mjs.map +1 -1
  163. package/fesm2022/tabs.mjs +2 -2
  164. package/fesm2022/tabs.mjs.map +1 -1
  165. package/form-field/_form-field-density.scss +3 -4
  166. package/form-field/_form-field-focus-overlay.scss +1 -1
  167. package/form-field/_form-field-sizing.scss +1 -1
  168. package/form-field/_form-field-theme.scss +24 -34
  169. package/grid-list/_grid-list-theme.scss +12 -19
  170. package/icon/_icon-theme.scss +17 -25
  171. package/input/_input-theme.scss +11 -23
  172. package/list/_list-theme.scss +27 -42
  173. package/menu/_menu-theme.scss +13 -22
  174. package/menu/index.d.ts +12 -18
  175. package/package.json +2 -2
  176. package/paginator/_paginator-theme.scss +15 -24
  177. package/prebuilt-themes/deeppurple-amber.css +1 -1
  178. package/prebuilt-themes/indigo-pink.css +1 -1
  179. package/prebuilt-themes/pink-bluegrey.css +1 -1
  180. package/prebuilt-themes/purple-green.css +1 -1
  181. package/progress-bar/_progress-bar-theme.scss +17 -24
  182. package/progress-spinner/_progress-spinner-theme.scss +18 -24
  183. package/radio/_radio-theme.scss +23 -38
  184. package/schematics/ng-add/index.js +1 -1
  185. package/schematics/ng-add/index.mjs +1 -1
  186. package/schematics/ng-generate/mdc-migration/index_bundled.js +44 -44
  187. package/schematics/ng-generate/mdc-migration/index_bundled.js.map +1 -1
  188. package/schematics/ng-update/index_bundled.js +25 -25
  189. package/select/_select-theme.scss +17 -31
  190. package/sidenav/_sidenav-theme.scss +12 -18
  191. package/slide-toggle/_slide-toggle-theme.scss +23 -40
  192. package/slide-toggle/index.d.ts +20 -23
  193. package/slider/_slider-theme.scss +25 -42
  194. package/snack-bar/_snack-bar-theme.scss +17 -26
  195. package/sort/_sort-theme.scss +13 -22
  196. package/stepper/_stepper-theme.scss +16 -34
  197. package/table/_table-theme.scss +14 -25
  198. package/tabs/_tabs-theme.scss +31 -45
  199. package/toolbar/_toolbar-theme.scss +22 -31
  200. package/tooltip/_tooltip-theme.scss +15 -23
  201. package/tree/_tree-theme.scss +20 -29
  202. package/button-toggle/_button-toggle-variables.scss +0 -16
  203. package/core/typography/_typography-deprecated.scss +0 -39
  204. package/paginator/_paginator-variables.scss +0 -15
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, EventEmitter, TemplateRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, ViewChild, ContentChildren, Input, Output, Directive, forwardRef, Optional, Host, NgModule } from '@angular/core';
3
- import { mixinDisableRipple, MAT_OPTION_PARENT_COMPONENT, MatOption, MAT_OPTGROUP, MatOptionSelectionChange, _countGroupLabelsBeforeOption, _getOptionScrollPosition, MatOptionModule, MatCommonModule } from '@angular/material/core';
2
+ import { InjectionToken, EventEmitter, booleanAttribute, TemplateRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, ViewChild, ContentChildren, Input, Output, Directive, forwardRef, Optional, Host, NgModule } from '@angular/core';
3
+ import { MAT_OPTION_PARENT_COMPONENT, MatOption, MAT_OPTGROUP, MatOptionSelectionChange, _countGroupLabelsBeforeOption, _getOptionScrollPosition, MatOptionModule, MatCommonModule } from '@angular/material/core';
4
4
  import * as i2 from '@angular/common';
5
5
  import { DOCUMENT, CommonModule } from '@angular/common';
6
6
  import * as i3 from '@angular/cdk/scrolling';
@@ -8,7 +8,7 @@ import { CdkScrollableModule } from '@angular/cdk/scrolling';
8
8
  import * as i1$1 from '@angular/cdk/overlay';
9
9
  import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
10
10
  import { ActiveDescendantKeyManager, removeAriaReferencedId, addAriaReferencedId } from '@angular/cdk/a11y';
11
- import { coerceBooleanProperty, coerceStringArray } from '@angular/cdk/coercion';
11
+ import { coerceStringArray } from '@angular/cdk/coercion';
12
12
  import * as i1 from '@angular/cdk/platform';
13
13
  import { _getEventTarget } from '@angular/cdk/platform';
14
14
  import { trigger, state, style, transition, group, animate } from '@angular/animations';
@@ -54,10 +54,6 @@ class MatAutocompleteSelectedEvent {
54
54
  this.option = option;
55
55
  }
56
56
  }
57
- // Boilerplate for applying mixins to MatAutocomplete.
58
- /** @docs-private */
59
- const _MatAutocompleteMixinBase = mixinDisableRipple(class {
60
- });
61
57
  /** Injection token to be used to override the default options for `mat-autocomplete`. */
62
58
  const MAT_AUTOCOMPLETE_DEFAULT_OPTIONS = new InjectionToken('mat-autocomplete-default-options', {
63
59
  providedIn: 'root',
@@ -73,7 +69,7 @@ function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY() {
73
69
  };
74
70
  }
75
71
  /** Autocomplete component. */
76
- class MatAutocomplete extends _MatAutocompleteMixinBase {
72
+ class MatAutocomplete {
77
73
  /** Whether the autocomplete panel is open. */
78
74
  get isOpen() {
79
75
  return this._isOpen && this.showPanel;
@@ -83,35 +79,6 @@ class MatAutocomplete extends _MatAutocompleteMixinBase {
83
79
  this._color = value;
84
80
  this._setThemeClasses(this._classList);
85
81
  }
86
- /**
87
- * Whether the first option should be highlighted when the autocomplete panel is opened.
88
- * Can be configured globally through the `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS` token.
89
- */
90
- get autoActiveFirstOption() {
91
- return this._autoActiveFirstOption;
92
- }
93
- set autoActiveFirstOption(value) {
94
- this._autoActiveFirstOption = coerceBooleanProperty(value);
95
- }
96
- /** Whether the active option should be selected as the user is navigating. */
97
- get autoSelectActiveOption() {
98
- return this._autoSelectActiveOption;
99
- }
100
- set autoSelectActiveOption(value) {
101
- this._autoSelectActiveOption = coerceBooleanProperty(value);
102
- }
103
- /**
104
- * Whether the user is required to make a selection when they're interacting with the
105
- * autocomplete. If the user moves away from the autocomplete without selecting an option from
106
- * the list, the value will be reset. If the user opens the panel and closes it without
107
- * interacting or selecting a value, the initial value will be kept.
108
- */
109
- get requireSelection() {
110
- return this._requireSelection;
111
- }
112
- set requireSelection(value) {
113
- this._requireSelection = coerceBooleanProperty(value);
114
- }
115
82
  /**
116
83
  * Takes classes set on the host mat-autocomplete element and applies them to the panel
117
84
  * inside the overlay container to allow for easy styling.
@@ -135,7 +102,7 @@ class MatAutocomplete extends _MatAutocompleteMixinBase {
135
102
  return this._hideSingleSelectionIndicator;
136
103
  }
137
104
  set hideSingleSelectionIndicator(value) {
138
- this._hideSingleSelectionIndicator = coerceBooleanProperty(value);
105
+ this._hideSingleSelectionIndicator = value;
139
106
  this._syncParentProperties();
140
107
  }
141
108
  /** Syncs the parent state with the individual options. */
@@ -147,7 +114,6 @@ class MatAutocomplete extends _MatAutocompleteMixinBase {
147
114
  }
148
115
  }
149
116
  constructor(_changeDetectorRef, _elementRef, _defaults, platform) {
150
- super();
151
117
  this._changeDetectorRef = _changeDetectorRef;
152
118
  this._elementRef = _elementRef;
153
119
  this._defaults = _defaults;
@@ -172,7 +138,6 @@ class MatAutocomplete extends _MatAutocompleteMixinBase {
172
138
  /** Emits whenever an option is activated. */
173
139
  this.optionActivated = new EventEmitter();
174
140
  this._classList = {};
175
- this._hideSingleSelectionIndicator = this._defaults.hideSingleSelectionIndicator ?? false;
176
141
  /** Unique ID to be used by autocomplete trigger's "aria-owns" property. */
177
142
  this.id = `mat-autocomplete-${_uniqueAutocompleteIdCounter++}`;
178
143
  // TODO(crisbeto): the problem that the `inertGroups` option resolves is only present on
@@ -180,9 +145,10 @@ class MatAutocomplete extends _MatAutocompleteMixinBase {
180
145
  // wasn't resolved in VoiceOver, and if it has, we can remove this and the `inertGroups`
181
146
  // option altogether.
182
147
  this.inertGroups = platform?.SAFARI || false;
183
- this._autoActiveFirstOption = !!_defaults.autoActiveFirstOption;
184
- this._autoSelectActiveOption = !!_defaults.autoSelectActiveOption;
185
- this._requireSelection = !!_defaults.requireSelection;
148
+ this.autoActiveFirstOption = !!_defaults.autoActiveFirstOption;
149
+ this.autoSelectActiveOption = !!_defaults.autoSelectActiveOption;
150
+ this.requireSelection = !!_defaults.requireSelection;
151
+ this._hideSingleSelectionIndicator = this._defaults.hideSingleSelectionIndicator ?? false;
186
152
  }
187
153
  ngAfterContentInit() {
188
154
  this._keyManager = new ActiveDescendantKeyManager(this.options)
@@ -262,11 +228,11 @@ class MatAutocomplete extends _MatAutocompleteMixinBase {
262
228
  return false;
263
229
  }
264
230
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MatAutocomplete, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS }, { token: i1.Platform }], target: i0.ɵɵFactoryTarget.Component }); }
265
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.1", type: MatAutocomplete, selector: "mat-autocomplete", inputs: { disableRipple: "disableRipple", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], displayWith: "displayWith", autoActiveFirstOption: "autoActiveFirstOption", autoSelectActiveOption: "autoSelectActiveOption", requireSelection: "requireSelection", panelWidth: "panelWidth", classList: ["class", "classList"], hideSingleSelectionIndicator: "hideSingleSelectionIndicator" }, outputs: { optionSelected: "optionSelected", opened: "opened", closed: "closed", optionActivated: "optionActivated" }, host: { attributes: { "ngSkipHydration": "" }, classAttribute: "mat-mdc-autocomplete" }, providers: [{ provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatAutocomplete }], queries: [{ propertyName: "options", predicate: MatOption, descendants: true }, { propertyName: "optionGroups", predicate: MAT_OPTGROUP, descendants: true }], viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, static: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true }], exportAs: ["matAutocomplete"], usesInheritance: true, ngImport: i0, template: "<ng-template let-formFieldId=\"id\">\n <div\n class=\"mat-mdc-autocomplete-panel mdc-menu-surface mdc-menu-surface--open\"\n role=\"listbox\"\n [id]=\"id\"\n [ngClass]=\"_classList\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby(formFieldId)\"\n [@panelAnimation]=\"isOpen ? 'visible' : 'hidden'\"\n (@panelAnimation.done)=\"_animationDone.next($event)\"\n #panel>\n <ng-content></ng-content>\n </div>\n</ng-template>\n", styles: ["div.mat-mdc-autocomplete-panel{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-autocomplete-background-color)}.cdk-high-contrast-active div.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden}mat-autocomplete{display:none}"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [panelAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
231
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.1", type: MatAutocomplete, selector: "mat-autocomplete", inputs: { ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], displayWith: "displayWith", autoActiveFirstOption: ["autoActiveFirstOption", "autoActiveFirstOption", booleanAttribute], autoSelectActiveOption: ["autoSelectActiveOption", "autoSelectActiveOption", booleanAttribute], requireSelection: ["requireSelection", "requireSelection", booleanAttribute], panelWidth: "panelWidth", disableRipple: ["disableRipple", "disableRipple", booleanAttribute], classList: ["class", "classList"], hideSingleSelectionIndicator: ["hideSingleSelectionIndicator", "hideSingleSelectionIndicator", booleanAttribute] }, outputs: { optionSelected: "optionSelected", opened: "opened", closed: "closed", optionActivated: "optionActivated" }, host: { attributes: { "ngSkipHydration": "" }, classAttribute: "mat-mdc-autocomplete" }, providers: [{ provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatAutocomplete }], queries: [{ propertyName: "options", predicate: MatOption, descendants: true }, { propertyName: "optionGroups", predicate: MAT_OPTGROUP, descendants: true }], viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, static: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true }], exportAs: ["matAutocomplete"], ngImport: i0, template: "<ng-template let-formFieldId=\"id\">\n <div\n class=\"mat-mdc-autocomplete-panel mdc-menu-surface mdc-menu-surface--open\"\n role=\"listbox\"\n [id]=\"id\"\n [ngClass]=\"_classList\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby(formFieldId)\"\n [@panelAnimation]=\"isOpen ? 'visible' : 'hidden'\"\n (@panelAnimation.done)=\"_animationDone.next($event)\"\n #panel>\n <ng-content></ng-content>\n </div>\n</ng-template>\n", styles: ["div.mat-mdc-autocomplete-panel{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-autocomplete-background-color)}.cdk-high-contrast-active div.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden}mat-autocomplete{display:none}"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [panelAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
266
232
  }
267
233
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MatAutocomplete, decorators: [{
268
234
  type: Component,
269
- args: [{ selector: 'mat-autocomplete', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'matAutocomplete', inputs: ['disableRipple'], host: {
235
+ args: [{ selector: 'mat-autocomplete', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'matAutocomplete', host: {
270
236
  'class': 'mat-mdc-autocomplete',
271
237
  'ngSkipHydration': '',
272
238
  }, providers: [{ provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatAutocomplete }], animations: [panelAnimation], template: "<ng-template let-formFieldId=\"id\">\n <div\n class=\"mat-mdc-autocomplete-panel mdc-menu-surface mdc-menu-surface--open\"\n role=\"listbox\"\n [id]=\"id\"\n [ngClass]=\"_classList\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby(formFieldId)\"\n [@panelAnimation]=\"isOpen ? 'visible' : 'hidden'\"\n (@panelAnimation.done)=\"_animationDone.next($event)\"\n #panel>\n <ng-content></ng-content>\n </div>\n</ng-template>\n", styles: ["div.mat-mdc-autocomplete-panel{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-autocomplete-background-color)}.cdk-high-contrast-active div.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden}mat-autocomplete{display:none}"] }]
@@ -294,13 +260,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImpor
294
260
  }], displayWith: [{
295
261
  type: Input
296
262
  }], autoActiveFirstOption: [{
297
- type: Input
263
+ type: Input,
264
+ args: [{ transform: booleanAttribute }]
298
265
  }], autoSelectActiveOption: [{
299
- type: Input
266
+ type: Input,
267
+ args: [{ transform: booleanAttribute }]
300
268
  }], requireSelection: [{
301
- type: Input
269
+ type: Input,
270
+ args: [{ transform: booleanAttribute }]
302
271
  }], panelWidth: [{
303
272
  type: Input
273
+ }], disableRipple: [{
274
+ type: Input,
275
+ args: [{ transform: booleanAttribute }]
304
276
  }], optionSelected: [{
305
277
  type: Output
306
278
  }], opened: [{
@@ -313,7 +285,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImpor
313
285
  type: Input,
314
286
  args: ['class']
315
287
  }], hideSingleSelectionIndicator: [{
316
- type: Input
288
+ type: Input,
289
+ args: [{ transform: booleanAttribute }]
317
290
  }] } });
318
291
 
319
292
  /**
@@ -369,16 +342,6 @@ const MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER = {
369
342
  };
370
343
  /** Base class with all of the `MatAutocompleteTrigger` functionality. */
371
344
  class MatAutocompleteTrigger {
372
- /**
373
- * Whether the autocomplete is disabled. When disabled, the element will
374
- * act as a regular input and the user won't be able to open the panel.
375
- */
376
- get autocompleteDisabled() {
377
- return this._autocompleteDisabled;
378
- }
379
- set autocompleteDisabled(value) {
380
- this._autocompleteDisabled = coerceBooleanProperty(value);
381
- }
382
345
  constructor(_element, _overlay, _viewContainerRef, _zone, _changeDetectorRef, scrollStrategy, _dir, _formField, _document, _viewportRuler, _defaults) {
383
346
  this._element = _element;
384
347
  this._overlay = _overlay;
@@ -391,7 +354,6 @@ class MatAutocompleteTrigger {
391
354
  this._viewportRuler = _viewportRuler;
392
355
  this._defaults = _defaults;
393
356
  this._componentDestroyed = false;
394
- this._autocompleteDisabled = false;
395
357
  /** Whether or not the label state is being overridden. */
396
358
  this._manuallyFloatingLabel = false;
397
359
  /** Subscription to viewport size changes. */
@@ -991,7 +953,7 @@ class MatAutocompleteTrigger {
991
953
  /** Determines whether the panel can be opened. */
992
954
  _canOpen() {
993
955
  const element = this._element.nativeElement;
994
- return !element.readOnly && !element.disabled && !this._autocompleteDisabled;
956
+ return !element.readOnly && !element.disabled && !this.autocompleteDisabled;
995
957
  }
996
958
  /** Use defaultView of injected document if available or fallback to global window reference */
997
959
  _getWindow() {
@@ -1070,7 +1032,7 @@ class MatAutocompleteTrigger {
1070
1032
  }
1071
1033
  }
1072
1034
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MatAutocompleteTrigger, deps: [{ token: i0.ElementRef }, { token: i1$1.Overlay }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: MAT_AUTOCOMPLETE_SCROLL_STRATEGY }, { token: i2$1.Directionality, optional: true }, { token: MAT_FORM_FIELD, host: true, optional: true }, { token: DOCUMENT, optional: true }, { token: i3.ViewportRuler }, { token: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
1073
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: { autocomplete: ["matAutocomplete", "autocomplete"], position: ["matAutocompletePosition", "position"], connectedTo: ["matAutocompleteConnectedTo", "connectedTo"], autocompleteAttribute: ["autocomplete", "autocompleteAttribute"], autocompleteDisabled: ["matAutocompleteDisabled", "autocompleteDisabled"] }, host: { listeners: { "focusin": "_handleFocus()", "blur": "_onTouched()", "input": "_handleInput($event)", "keydown": "_handleKeydown($event)", "click": "_handleClick()" }, properties: { "attr.autocomplete": "autocompleteAttribute", "attr.role": "autocompleteDisabled ? null : \"combobox\"", "attr.aria-autocomplete": "autocompleteDisabled ? null : \"list\"", "attr.aria-activedescendant": "(panelOpen && activeOption) ? activeOption.id : null", "attr.aria-expanded": "autocompleteDisabled ? null : panelOpen.toString()", "attr.aria-controls": "(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id", "attr.aria-haspopup": "autocompleteDisabled ? null : \"listbox\"" }, classAttribute: "mat-mdc-autocomplete-trigger" }, providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR], exportAs: ["matAutocompleteTrigger"], usesOnChanges: true, ngImport: i0 }); }
1035
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: { autocomplete: ["matAutocomplete", "autocomplete"], position: ["matAutocompletePosition", "position"], connectedTo: ["matAutocompleteConnectedTo", "connectedTo"], autocompleteAttribute: ["autocomplete", "autocompleteAttribute"], autocompleteDisabled: ["matAutocompleteDisabled", "autocompleteDisabled", booleanAttribute] }, host: { listeners: { "focusin": "_handleFocus()", "blur": "_onTouched()", "input": "_handleInput($event)", "keydown": "_handleKeydown($event)", "click": "_handleClick()" }, properties: { "attr.autocomplete": "autocompleteAttribute", "attr.role": "autocompleteDisabled ? null : \"combobox\"", "attr.aria-autocomplete": "autocompleteDisabled ? null : \"list\"", "attr.aria-activedescendant": "(panelOpen && activeOption) ? activeOption.id : null", "attr.aria-expanded": "autocompleteDisabled ? null : panelOpen.toString()", "attr.aria-controls": "(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id", "attr.aria-haspopup": "autocompleteDisabled ? null : \"listbox\"" }, classAttribute: "mat-mdc-autocomplete-trigger" }, providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR], exportAs: ["matAutocompleteTrigger"], usesOnChanges: true, ngImport: i0 }); }
1074
1036
  }
1075
1037
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MatAutocompleteTrigger, decorators: [{
1076
1038
  type: Directive,
@@ -1132,7 +1094,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImpor
1132
1094
  args: ['autocomplete']
1133
1095
  }], autocompleteDisabled: [{
1134
1096
  type: Input,
1135
- args: ['matAutocompleteDisabled']
1097
+ args: [{ alias: 'matAutocompleteDisabled', transform: booleanAttribute }]
1136
1098
  }] } });
1137
1099
 
1138
1100
  class MatAutocompleteModule {