@angular/material 19.0.0-next.9 → 19.0.0-rc.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 (232) hide show
  1. package/autocomplete/_autocomplete-theme.scss +8 -4
  2. package/autocomplete/index.d.ts +5 -6
  3. package/badge/_badge-theme.scss +10 -6
  4. package/badge/index.d.ts +1 -2
  5. package/bottom-sheet/_bottom-sheet-theme.scss +8 -4
  6. package/button/_button-theme.scss +10 -6
  7. package/button/_fab-theme.scss +10 -6
  8. package/button/_icon-button-theme.scss +8 -4
  9. package/button/index.d.ts +1 -1
  10. package/button-toggle/_button-toggle-theme.scss +11 -6
  11. package/button-toggle/index.d.ts +2 -1
  12. package/card/_card-theme.scss +8 -4
  13. package/card/index.d.ts +2 -3
  14. package/checkbox/_checkbox-theme.scss +10 -6
  15. package/chips/_chips-theme.scss +10 -6
  16. package/core/_core-theme.scss +4 -7
  17. package/core/_core.scss +2 -5
  18. package/core/m2/_theming.scss +2 -1
  19. package/core/option/_optgroup-theme.scss +8 -4
  20. package/core/option/_option-theme.scss +10 -6
  21. package/core/ripple/_ripple-theme.scss +8 -4
  22. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +10 -6
  23. package/core/theming/_config-validation.scss +4 -4
  24. package/core/theming/_definition.scss +12 -2
  25. package/core/theming/_theming.scss +2 -1
  26. package/core/tokens/_m3-system.scss +55 -39
  27. package/core/tokens/_m3-tokens.scss +3 -3
  28. package/core/tokens/_token-definition.scss +4 -3
  29. package/core/tokens/m2/mat/_badge.scss +1 -1
  30. package/core/tokens/m2/mat/_datepicker.scss +1 -1
  31. package/core/tokens/m2/mat/_menu.scss +5 -3
  32. package/core/tokens/m2/mat/_sort.scss +1 -1
  33. package/core/tokens/m3/mat/_menu.scss +6 -3
  34. package/core/tokens/m3/mdc/_filled-text-field.scss +9 -11
  35. package/datepicker/_datepicker-theme.scss +10 -6
  36. package/datepicker/index.d.ts +36 -37
  37. package/dialog/_dialog-theme.scss +8 -4
  38. package/dialog/index.d.ts +1 -0
  39. package/divider/_divider-theme.scss +8 -4
  40. package/expansion/_expansion-theme.scss +8 -4
  41. package/fesm2022/autocomplete/testing.mjs +2 -5
  42. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  43. package/fesm2022/autocomplete.mjs +225 -151
  44. package/fesm2022/autocomplete.mjs.map +1 -1
  45. package/fesm2022/badge/testing.mjs +2 -5
  46. package/fesm2022/badge/testing.mjs.map +1 -1
  47. package/fesm2022/badge.mjs +45 -36
  48. package/fesm2022/badge.mjs.map +1 -1
  49. package/fesm2022/bottom-sheet/testing.mjs +1 -1
  50. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  51. package/fesm2022/bottom-sheet.mjs +79 -57
  52. package/fesm2022/bottom-sheet.mjs.map +1 -1
  53. package/fesm2022/button/testing.mjs +2 -2
  54. package/fesm2022/button/testing.mjs.map +1 -1
  55. package/fesm2022/button-toggle/testing.mjs +4 -7
  56. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  57. package/fesm2022/button-toggle.mjs +84 -47
  58. package/fesm2022/button-toggle.mjs.map +1 -1
  59. package/fesm2022/button.mjs +98 -71
  60. package/fesm2022/button.mjs.map +1 -1
  61. package/fesm2022/card/testing.mjs +3 -6
  62. package/fesm2022/card/testing.mjs.map +1 -1
  63. package/fesm2022/card.mjs +53 -55
  64. package/fesm2022/card.mjs.map +1 -1
  65. package/fesm2022/checkbox/testing.mjs +4 -7
  66. package/fesm2022/checkbox/testing.mjs.map +1 -1
  67. package/fesm2022/checkbox.mjs +105 -63
  68. package/fesm2022/checkbox.mjs.map +1 -1
  69. package/fesm2022/chips/testing.mjs +11 -14
  70. package/fesm2022/chips/testing.mjs.map +1 -1
  71. package/fesm2022/chips.mjs +317 -268
  72. package/fesm2022/chips.mjs.map +1 -1
  73. package/fesm2022/core/testing.mjs +5 -11
  74. package/fesm2022/core/testing.mjs.map +1 -1
  75. package/fesm2022/core.mjs +237 -187
  76. package/fesm2022/core.mjs.map +1 -1
  77. package/fesm2022/datepicker/testing.mjs +13 -22
  78. package/fesm2022/datepicker/testing.mjs.map +1 -1
  79. package/fesm2022/datepicker.mjs +821 -568
  80. package/fesm2022/datepicker.mjs.map +1 -1
  81. package/fesm2022/dialog/testing.mjs +15 -9
  82. package/fesm2022/dialog/testing.mjs.map +1 -1
  83. package/fesm2022/dialog.mjs +221 -153
  84. package/fesm2022/dialog.mjs.map +1 -1
  85. package/fesm2022/divider/testing.mjs +1 -1
  86. package/fesm2022/divider/testing.mjs.map +1 -1
  87. package/fesm2022/divider.mjs +9 -11
  88. package/fesm2022/divider.mjs.map +1 -1
  89. package/fesm2022/expansion/testing.mjs +7 -10
  90. package/fesm2022/expansion/testing.mjs.map +1 -1
  91. package/fesm2022/expansion.mjs +85 -76
  92. package/fesm2022/expansion.mjs.map +1 -1
  93. package/fesm2022/form-field/testing.mjs +12 -15
  94. package/fesm2022/form-field/testing.mjs.map +1 -1
  95. package/fesm2022/form-field.mjs +179 -126
  96. package/fesm2022/form-field.mjs.map +1 -1
  97. package/fesm2022/grid-list/testing.mjs +11 -17
  98. package/fesm2022/grid-list/testing.mjs.map +1 -1
  99. package/fesm2022/grid-list.mjs +72 -50
  100. package/fesm2022/grid-list.mjs.map +1 -1
  101. package/fesm2022/icon/testing.mjs +8 -8
  102. package/fesm2022/icon/testing.mjs.map +1 -1
  103. package/fesm2022/icon.mjs +65 -45
  104. package/fesm2022/icon.mjs.map +1 -1
  105. package/fesm2022/input/testing.mjs +3 -3
  106. package/fesm2022/input/testing.mjs.map +1 -1
  107. package/fesm2022/input.mjs +104 -72
  108. package/fesm2022/input.mjs.map +1 -1
  109. package/fesm2022/list/testing.mjs +21 -38
  110. package/fesm2022/list/testing.mjs.map +1 -1
  111. package/fesm2022/list.mjs +191 -180
  112. package/fesm2022/list.mjs.map +1 -1
  113. package/fesm2022/menu/testing.mjs +3 -6
  114. package/fesm2022/menu/testing.mjs.map +1 -1
  115. package/fesm2022/menu.mjs +178 -168
  116. package/fesm2022/menu.mjs.map +1 -1
  117. package/fesm2022/paginator/testing.mjs +10 -13
  118. package/fesm2022/paginator/testing.mjs.map +1 -1
  119. package/fesm2022/paginator.mjs +84 -59
  120. package/fesm2022/paginator.mjs.map +1 -1
  121. package/fesm2022/progress-bar/testing.mjs +1 -1
  122. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  123. package/fesm2022/progress-bar.mjs +35 -34
  124. package/fesm2022/progress-bar.mjs.map +1 -1
  125. package/fesm2022/progress-spinner/testing.mjs +1 -1
  126. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  127. package/fesm2022/progress-spinner.mjs +27 -13
  128. package/fesm2022/progress-spinner.mjs.map +1 -1
  129. package/fesm2022/radio/testing.mjs +6 -12
  130. package/fesm2022/radio/testing.mjs.map +1 -1
  131. package/fesm2022/radio.mjs +123 -88
  132. package/fesm2022/radio.mjs.map +1 -1
  133. package/fesm2022/select/testing.mjs +6 -9
  134. package/fesm2022/select/testing.mjs.map +1 -1
  135. package/fesm2022/select.mjs +220 -182
  136. package/fesm2022/select.mjs.map +1 -1
  137. package/fesm2022/sidenav/testing.mjs +6 -6
  138. package/fesm2022/sidenav/testing.mjs.map +1 -1
  139. package/fesm2022/sidenav.mjs +132 -119
  140. package/fesm2022/sidenav.mjs.map +1 -1
  141. package/fesm2022/slide-toggle/testing.mjs +3 -6
  142. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  143. package/fesm2022/slide-toggle.mjs +78 -49
  144. package/fesm2022/slide-toggle.mjs.map +1 -1
  145. package/fesm2022/slider/testing.mjs +2 -2
  146. package/fesm2022/slider/testing.mjs.map +1 -1
  147. package/fesm2022/slider.mjs +260 -190
  148. package/fesm2022/slider.mjs.map +1 -1
  149. package/fesm2022/snack-bar/testing.mjs +4 -7
  150. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  151. package/fesm2022/snack-bar.mjs +141 -107
  152. package/fesm2022/snack-bar.mjs.map +1 -1
  153. package/fesm2022/sort/testing.mjs +3 -6
  154. package/fesm2022/sort/testing.mjs.map +1 -1
  155. package/fesm2022/sort.mjs +93 -72
  156. package/fesm2022/sort.mjs.map +1 -1
  157. package/fesm2022/stepper/testing.mjs +4 -4
  158. package/fesm2022/stepper/testing.mjs.map +1 -1
  159. package/fesm2022/stepper.mjs +143 -105
  160. package/fesm2022/stepper.mjs.map +1 -1
  161. package/fesm2022/table/testing.mjs +13 -25
  162. package/fesm2022/table/testing.mjs.map +1 -1
  163. package/fesm2022/table.mjs +182 -177
  164. package/fesm2022/table.mjs.map +1 -1
  165. package/fesm2022/tabs/testing.mjs +5 -5
  166. package/fesm2022/tabs/testing.mjs.map +1 -1
  167. package/fesm2022/tabs.mjs +326 -247
  168. package/fesm2022/tabs.mjs.map +1 -1
  169. package/fesm2022/timepicker/testing.mjs +7 -16
  170. package/fesm2022/timepicker/testing.mjs.map +1 -1
  171. package/fesm2022/timepicker.mjs +157 -153
  172. package/fesm2022/timepicker.mjs.map +1 -1
  173. package/fesm2022/toolbar/testing.mjs +2 -5
  174. package/fesm2022/toolbar/testing.mjs.map +1 -1
  175. package/fesm2022/toolbar.mjs +25 -15
  176. package/fesm2022/toolbar.mjs.map +1 -1
  177. package/fesm2022/tooltip/testing.mjs +6 -9
  178. package/fesm2022/tooltip/testing.mjs.map +1 -1
  179. package/fesm2022/tooltip.mjs +96 -72
  180. package/fesm2022/tooltip.mjs.map +1 -1
  181. package/fesm2022/tree/testing.mjs +3 -6
  182. package/fesm2022/tree/testing.mjs.map +1 -1
  183. package/fesm2022/tree.mjs +56 -54
  184. package/fesm2022/tree.mjs.map +1 -1
  185. package/form-field/_form-field-theme.scss +9 -5
  186. package/form-field/index.d.ts +9 -9
  187. package/grid-list/_grid-list-theme.scss +8 -4
  188. package/icon/_icon-theme.scss +10 -6
  189. package/input/_input-theme.scss +8 -4
  190. package/list/_list-theme.scss +8 -4
  191. package/list/index.d.ts +20 -21
  192. package/menu/_menu-theme.scss +8 -4
  193. package/menu/index.d.ts +15 -17
  194. package/package.json +2 -2
  195. package/paginator/_paginator-theme.scss +8 -4
  196. package/prebuilt-themes/azure-blue.css +1 -1
  197. package/prebuilt-themes/cyan-orange.css +1 -1
  198. package/prebuilt-themes/deeppurple-amber.css +1 -1
  199. package/prebuilt-themes/indigo-pink.css +1 -1
  200. package/prebuilt-themes/magenta-violet.css +1 -1
  201. package/prebuilt-themes/pink-bluegrey.css +1 -1
  202. package/prebuilt-themes/purple-green.css +1 -1
  203. package/prebuilt-themes/rose-red.css +1 -1
  204. package/progress-bar/_progress-bar-theme.scss +11 -9
  205. package/progress-spinner/_progress-spinner-theme.scss +11 -9
  206. package/progress-spinner/index.d.ts +3 -4
  207. package/radio/_radio-theme.scss +10 -6
  208. package/radio/index.d.ts +2 -3
  209. package/schematics/ng-add/index.js +1 -1
  210. package/schematics/ng-add/index.mjs +1 -1
  211. package/schematics/ng-add/theming/create-custom-theme.js +1 -6
  212. package/schematics/ng-add/theming/create-custom-theme.mjs +1 -6
  213. package/schematics/ng-generate/theme-color/index_bundled.js +35 -9
  214. package/schematics/ng-generate/theme-color/index_bundled.js.map +2 -2
  215. package/schematics/ng-update/index_bundled.js +6 -1
  216. package/schematics/ng-update/index_bundled.js.map +1 -1
  217. package/select/_select-theme.scss +10 -6
  218. package/select/index.d.ts +7 -7
  219. package/sidenav/_sidenav-theme.scss +8 -4
  220. package/slide-toggle/_slide-toggle-theme.scss +10 -6
  221. package/slider/_slider-theme.scss +10 -6
  222. package/snack-bar/_snack-bar-theme.scss +10 -6
  223. package/sort/_sort-theme.scss +8 -4
  224. package/stepper/_stepper-theme.scss +10 -6
  225. package/stepper/index.d.ts +14 -15
  226. package/table/_table-theme.scss +8 -4
  227. package/tabs/_tabs-theme.scss +10 -6
  228. package/timepicker/_timepicker-theme.scss +10 -6
  229. package/toolbar/_toolbar-theme.scss +10 -6
  230. package/tooltip/_tooltip-theme.scss +8 -4
  231. package/tooltip/index.d.ts +5 -6
  232. package/tree/_tree-theme.scss +8 -4
@@ -2,20 +2,20 @@ import * as i0 from '@angular/core';
2
2
  import { InjectionToken, inject, ChangeDetectorRef, ElementRef, EventEmitter, booleanAttribute, TemplateRef, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, ContentChildren, Input, Output, Directive, forwardRef, ViewContainerRef, NgZone, Injector, afterNextRender, NgModule } from '@angular/core';
3
3
  import { MAT_OPTION_PARENT_COMPONENT, MatOption, MAT_OPTGROUP, MatOptionSelectionChange, _countGroupLabelsBeforeOption, _getOptionScrollPosition, MatOptionModule, MatCommonModule } from '@angular/material/core';
4
4
  export { MatOptgroup, MatOption } from '@angular/material/core';
5
- import { DOCUMENT, CommonModule } from '@angular/common';
6
5
  import { ViewportRuler, CdkScrollableModule } from '@angular/cdk/scrolling';
7
6
  import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
8
- import { ActiveDescendantKeyManager, removeAriaReferencedId, addAriaReferencedId } from '@angular/cdk/a11y';
7
+ import { _IdGenerator, ActiveDescendantKeyManager, removeAriaReferencedId, addAriaReferencedId } from '@angular/cdk/a11y';
9
8
  import { Platform, _getEventTarget } from '@angular/cdk/platform';
10
9
  import { trigger, state, style, transition, group, animate } from '@angular/animations';
11
- import { Subscription, Subject, defer, merge, of, fromEvent, Observable } from 'rxjs';
10
+ import { Subscription, Subject, merge, of, defer, fromEvent, Observable } from 'rxjs';
12
11
  import { Directionality } from '@angular/cdk/bidi';
13
- import { ESCAPE, hasModifierKey, UP_ARROW, ENTER, DOWN_ARROW, TAB } from '@angular/cdk/keycodes';
12
+ import { hasModifierKey, ESCAPE, ENTER, UP_ARROW, DOWN_ARROW, TAB } from '@angular/cdk/keycodes';
14
13
  import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
15
14
  import { TemplatePortal } from '@angular/cdk/portal';
15
+ import { DOCUMENT } from '@angular/common';
16
16
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
17
17
  import { MAT_FORM_FIELD } from '@angular/material/form-field';
18
- import { startWith, switchMap, filter, map, tap, delay, take } from 'rxjs/operators';
18
+ import { filter, map, startWith, switchMap, tap, delay, take } from 'rxjs/operators';
19
19
 
20
20
  // Animation values come from
21
21
  // TODO(mmalerba): Ideally find a way to import the values from MDC's code.
@@ -33,13 +33,10 @@ const panelAnimation = trigger('panelAnimation', [
33
33
  transition(':leave, visible => hidden', [animate('0.075s linear', style({ opacity: 0 }))]),
34
34
  ]);
35
35
 
36
- /**
37
- * Autocomplete IDs need to be unique across components, so this counter exists outside of
38
- * the component definition.
39
- */
40
- let _uniqueAutocompleteIdCounter = 0;
41
36
  /** Event object that is emitted when an autocomplete option is selected. */
42
37
  class MatAutocompleteSelectedEvent {
38
+ source;
39
+ option;
43
40
  constructor(
44
41
  /** Reference to the autocomplete panel that emitted the event. */
45
42
  source,
@@ -65,15 +62,76 @@ function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY() {
65
62
  }
66
63
  /** Autocomplete component. */
67
64
  class MatAutocomplete {
65
+ _changeDetectorRef = inject(ChangeDetectorRef);
66
+ _elementRef = inject(ElementRef);
67
+ _defaults = inject(MAT_AUTOCOMPLETE_DEFAULT_OPTIONS);
68
+ _activeOptionChanges = Subscription.EMPTY;
69
+ /** Emits when the panel animation is done. Null if the panel doesn't animate. */
70
+ _animationDone = new EventEmitter();
71
+ /** Manages active item in option list based on key events. */
72
+ _keyManager;
73
+ /** Whether the autocomplete panel should be visible, depending on option length. */
74
+ showPanel = false;
68
75
  /** Whether the autocomplete panel is open. */
69
76
  get isOpen() {
70
77
  return this._isOpen && this.showPanel;
71
78
  }
79
+ _isOpen = false;
80
+ /** Latest trigger that opened the autocomplete. */
81
+ _latestOpeningTrigger;
72
82
  /** @docs-private Sets the theme color of the panel. */
73
83
  _setColor(value) {
74
84
  this._color = value;
75
85
  this._changeDetectorRef.markForCheck();
76
86
  }
87
+ /** @docs-private theme color of the panel */
88
+ _color;
89
+ // The @ViewChild query for TemplateRef here needs to be static because some code paths
90
+ // lead to the overlay being created before change detection has finished for this component.
91
+ // Notably, another component may trigger `focus` on the autocomplete-trigger.
92
+ /** @docs-private */
93
+ template;
94
+ /** Element for the panel containing the autocomplete options. */
95
+ panel;
96
+ /** Reference to all options within the autocomplete. */
97
+ options;
98
+ /** Reference to all option groups within the autocomplete. */
99
+ optionGroups;
100
+ /** Aria label of the autocomplete. */
101
+ ariaLabel;
102
+ /** Input that can be used to specify the `aria-labelledby` attribute. */
103
+ ariaLabelledby;
104
+ /** Function that maps an option's control value to its display value in the trigger. */
105
+ displayWith = null;
106
+ /**
107
+ * Whether the first option should be highlighted when the autocomplete panel is opened.
108
+ * Can be configured globally through the `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS` token.
109
+ */
110
+ autoActiveFirstOption;
111
+ /** Whether the active option should be selected as the user is navigating. */
112
+ autoSelectActiveOption;
113
+ /**
114
+ * Whether the user is required to make a selection when they're interacting with the
115
+ * autocomplete. If the user moves away from the autocomplete without selecting an option from
116
+ * the list, the value will be reset. If the user opens the panel and closes it without
117
+ * interacting or selecting a value, the initial value will be kept.
118
+ */
119
+ requireSelection;
120
+ /**
121
+ * Specify the width of the autocomplete panel. Can be any CSS sizing value, otherwise it will
122
+ * match the width of its host.
123
+ */
124
+ panelWidth;
125
+ /** Whether ripples are disabled within the autocomplete panel. */
126
+ disableRipple;
127
+ /** Event that is emitted whenever an option from the list is selected. */
128
+ optionSelected = new EventEmitter();
129
+ /** Event that is emitted when the autocomplete panel is opened. */
130
+ opened = new EventEmitter();
131
+ /** Event that is emitted when the autocomplete panel is closed. */
132
+ closed = new EventEmitter();
133
+ /** Emits whenever an option is activated. */
134
+ optionActivated = new EventEmitter();
77
135
  /**
78
136
  * Takes classes set on the host mat-autocomplete element and applies them to the panel
79
137
  * inside the overlay container to allow for easy styling.
@@ -82,6 +140,7 @@ class MatAutocomplete {
82
140
  this._classList = value;
83
141
  this._elementRef.nativeElement.className = '';
84
142
  }
143
+ _classList;
85
144
  /** Whether checkmark indicator for single-selection options is hidden. */
86
145
  get hideSingleSelectionIndicator() {
87
146
  return this._hideSingleSelectionIndicator;
@@ -90,6 +149,7 @@ class MatAutocomplete {
90
149
  this._hideSingleSelectionIndicator = value;
91
150
  this._syncParentProperties();
92
151
  }
152
+ _hideSingleSelectionIndicator;
93
153
  /** Syncs the parent state with the individual options. */
94
154
  _syncParentProperties() {
95
155
  if (this.options) {
@@ -98,28 +158,14 @@ class MatAutocomplete {
98
158
  }
99
159
  }
100
160
  }
161
+ /** Unique ID to be used by autocomplete trigger's "aria-owns" property. */
162
+ id = inject(_IdGenerator).getId('mat-autocomplete-');
163
+ /**
164
+ * Tells any descendant `mat-optgroup` to use the inert a11y pattern.
165
+ * @docs-private
166
+ */
167
+ inertGroups;
101
168
  constructor() {
102
- this._changeDetectorRef = inject(ChangeDetectorRef);
103
- this._elementRef = inject(ElementRef);
104
- this._defaults = inject(MAT_AUTOCOMPLETE_DEFAULT_OPTIONS);
105
- this._activeOptionChanges = Subscription.EMPTY;
106
- /** Emits when the panel animation is done. Null if the panel doesn't animate. */
107
- this._animationDone = new EventEmitter();
108
- /** Whether the autocomplete panel should be visible, depending on option length. */
109
- this.showPanel = false;
110
- this._isOpen = false;
111
- /** Function that maps an option's control value to its display value in the trigger. */
112
- this.displayWith = null;
113
- /** Event that is emitted whenever an option from the list is selected. */
114
- this.optionSelected = new EventEmitter();
115
- /** Event that is emitted when the autocomplete panel is opened. */
116
- this.opened = new EventEmitter();
117
- /** Event that is emitted when the autocomplete panel is closed. */
118
- this.closed = new EventEmitter();
119
- /** Emits whenever an option is activated. */
120
- this.optionActivated = new EventEmitter();
121
- /** Unique ID to be used by autocomplete trigger's "aria-owns" property. */
122
- this.id = `mat-autocomplete-${_uniqueAutocompleteIdCounter++}`;
123
169
  const platform = inject(Platform);
124
170
  // TODO(crisbeto): the problem that the `inertGroups` option resolves is only present on
125
171
  // Safari using VoiceOver. We should occasionally check back to see whether the bug
@@ -196,10 +242,10 @@ class MatAutocomplete {
196
242
  _skipPredicate() {
197
243
  return false;
198
244
  }
199
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocomplete, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
200
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.0.0-next.10", type: MatAutocomplete, isStandalone: true, 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: { 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 [class]=\"_classList\"\n [class.mat-mdc-autocomplete-visible]=\"showPanel\"\n [class.mat-mdc-autocomplete-hidden]=\"!showPanel\"\n [class.mat-primary]=\"_color === 'primary'\"\n [class.mat-accent]=\"_color === 'accent'\"\n [class.mat-warn]=\"_color === 'warn'\"\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{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: 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;pointer-events:none}mat-autocomplete{display:none}"], animations: [panelAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
245
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocomplete, deps: [], target: i0.ɵɵFactoryTarget.Component });
246
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.0.0-rc.0", type: MatAutocomplete, isStandalone: true, 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: { 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 [class]=\"_classList\"\n [class.mat-mdc-autocomplete-visible]=\"showPanel\"\n [class.mat-mdc-autocomplete-hidden]=\"!showPanel\"\n [class.mat-primary]=\"_color === 'primary'\"\n [class.mat-accent]=\"_color === 'accent'\"\n [class.mat-warn]=\"_color === 'warn'\"\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{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: 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;pointer-events:none}mat-autocomplete{display:none}"], animations: [panelAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
201
247
  }
202
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocomplete, decorators: [{
248
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocomplete, decorators: [{
203
249
  type: Component,
204
250
  args: [{ selector: 'mat-autocomplete', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'matAutocomplete', host: {
205
251
  'class': 'mat-mdc-autocomplete',
@@ -259,13 +305,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
259
305
  * as a connection point for an autocomplete panel.
260
306
  */
261
307
  class MatAutocompleteOrigin {
262
- constructor() {
263
- this.elementRef = inject(ElementRef);
264
- }
265
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocompleteOrigin, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
266
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: MatAutocompleteOrigin, isStandalone: true, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"], ngImport: i0 }); }
308
+ elementRef = inject(ElementRef);
309
+ constructor() { }
310
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteOrigin, deps: [], target: i0.ɵɵFactoryTarget.Directive });
311
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-rc.0", type: MatAutocompleteOrigin, isStandalone: true, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"], ngImport: i0 });
267
312
  }
268
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocompleteOrigin, decorators: [{
313
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteOrigin, decorators: [{
269
314
  type: Directive,
270
315
  args: [{
271
316
  selector: '[matAutocompleteOrigin]',
@@ -311,104 +356,99 @@ const MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER = {
311
356
  };
312
357
  /** Base class with all of the `MatAutocompleteTrigger` functionality. */
313
358
  class MatAutocompleteTrigger {
314
- constructor() {
315
- this._element = inject(ElementRef);
316
- this._overlay = inject(Overlay);
317
- this._viewContainerRef = inject(ViewContainerRef);
318
- this._zone = inject(NgZone);
319
- this._changeDetectorRef = inject(ChangeDetectorRef);
320
- this._dir = inject(Directionality, { optional: true });
321
- this._formField = inject(MAT_FORM_FIELD, { optional: true, host: true });
322
- this._document = inject(DOCUMENT);
323
- this._viewportRuler = inject(ViewportRuler);
324
- this._defaults = inject(MAT_AUTOCOMPLETE_DEFAULT_OPTIONS, { optional: true });
325
- this._componentDestroyed = false;
326
- this._scrollStrategy = inject(MAT_AUTOCOMPLETE_SCROLL_STRATEGY);
327
- /** Whether or not the label state is being overridden. */
328
- this._manuallyFloatingLabel = false;
329
- /** Subscription to viewport size changes. */
330
- this._viewportSubscription = Subscription.EMPTY;
331
- /** Implements BreakpointObserver to be used to detect handset landscape */
332
- this._breakpointObserver = inject(BreakpointObserver);
333
- this._handsetLandscapeSubscription = Subscription.EMPTY;
334
- /**
335
- * Whether the autocomplete can open the next time it is focused. Used to prevent a focused,
336
- * closed autocomplete from being reopened if the user switches to another browser tab and then
337
- * comes back.
338
- */
339
- this._canOpenOnNextFocus = true;
340
- /** Stream of keyboard events that can close the panel. */
341
- this._closeKeyEventStream = new Subject();
342
- /**
343
- * Event handler for when the window is blurred. Needs to be an
344
- * arrow function in order to preserve the context.
345
- */
346
- this._windowBlurHandler = () => {
347
- // If the user blurred the window while the autocomplete is focused, it means that it'll be
348
- // refocused when they come back. In this case we want to skip the first focus event, if the
349
- // pane was closed, in order to avoid reopening it unintentionally.
350
- this._canOpenOnNextFocus =
351
- this._document.activeElement !== this._element.nativeElement || this.panelOpen;
352
- };
353
- /** `View -> model callback called when value changes` */
354
- this._onChange = () => { };
355
- /** `View -> model callback called when autocomplete has been touched` */
356
- this._onTouched = () => { };
357
- /**
358
- * Position of the autocomplete panel relative to the trigger element. A position of `auto`
359
- * will render the panel underneath the trigger if there is enough space for it to fit in
360
- * the viewport, otherwise the panel will be shown above it. If the position is set to
361
- * `above` or `below`, the panel will always be shown above or below the trigger. no matter
362
- * whether it fits completely in the viewport.
363
- */
364
- this.position = 'auto';
365
- /**
366
- * `autocomplete` attribute to be set on the input element.
367
- * @docs-private
368
- */
369
- this.autocompleteAttribute = 'off';
370
- this._initialized = new Subject();
371
- this._injector = inject(Injector);
372
- /** Class to apply to the panel when it's above the input. */
373
- this._aboveClass = 'mat-mdc-autocomplete-panel-above';
374
- this._overlayAttached = false;
375
- /** Stream of changes to the selection state of the autocomplete options. */
376
- this.optionSelections = defer(() => {
377
- const options = this.autocomplete ? this.autocomplete.options : null;
378
- if (options) {
379
- return options.changes.pipe(startWith(options), switchMap(() => merge(...options.map(option => option.onSelectionChange))));
380
- }
381
- // If there are any subscribers before `ngAfterViewInit`, the `autocomplete` will be undefined.
382
- // Return a stream that we'll replace with the real one once everything is in place.
383
- return this._initialized.pipe(switchMap(() => this.optionSelections));
384
- });
385
- /** Handles keyboard events coming from the overlay panel. */
386
- this._handlePanelKeydown = (event) => {
387
- // Close when pressing ESCAPE or ALT + UP_ARROW, based on the a11y guidelines.
388
- // See: https://www.w3.org/TR/wai-aria-practices-1.1/#textbox-keyboard-interaction
389
- if ((event.keyCode === ESCAPE && !hasModifierKey(event)) ||
390
- (event.keyCode === UP_ARROW && hasModifierKey(event, 'altKey'))) {
391
- // If the user had typed something in before we autoselected an option, and they decided
392
- // to cancel the selection, restore the input value to the one they had typed in.
393
- if (this._pendingAutoselectedOption) {
394
- this._updateNativeInputValue(this._valueBeforeAutoSelection ?? '');
395
- this._pendingAutoselectedOption = null;
396
- }
397
- this._closeKeyEventStream.next();
398
- this._resetActiveItem();
399
- // We need to stop propagation, otherwise the event will eventually
400
- // reach the input itself and cause the overlay to be reopened.
401
- event.stopPropagation();
402
- event.preventDefault();
403
- }
404
- };
405
- /**
406
- * Track which modal we have modified the `aria-owns` attribute of. When the combobox trigger is
407
- * inside an aria-modal, we apply aria-owns to the parent modal with the `id` of the options
408
- * panel. Track the modal we have changed so we can undo the changes on destroy.
409
- */
410
- this._trackedModal = null;
411
- }
359
+ _element = inject(ElementRef);
360
+ _overlay = inject(Overlay);
361
+ _viewContainerRef = inject(ViewContainerRef);
362
+ _zone = inject(NgZone);
363
+ _changeDetectorRef = inject(ChangeDetectorRef);
364
+ _dir = inject(Directionality, { optional: true });
365
+ _formField = inject(MAT_FORM_FIELD, { optional: true, host: true });
366
+ _document = inject(DOCUMENT);
367
+ _viewportRuler = inject(ViewportRuler);
368
+ _defaults = inject(MAT_AUTOCOMPLETE_DEFAULT_OPTIONS, { optional: true });
369
+ _overlayRef;
370
+ _portal;
371
+ _componentDestroyed = false;
372
+ _scrollStrategy = inject(MAT_AUTOCOMPLETE_SCROLL_STRATEGY);
373
+ _keydownSubscription;
374
+ _outsideClickSubscription;
375
+ /** Old value of the native input. Used to work around issues with the `input` event on IE. */
376
+ _previousValue;
377
+ /** Value of the input element when the panel was attached (even if there are no options). */
378
+ _valueOnAttach;
379
+ /** Value on the previous keydown event. */
380
+ _valueOnLastKeydown;
381
+ /** Strategy that is used to position the panel. */
382
+ _positionStrategy;
383
+ /** Whether or not the label state is being overridden. */
384
+ _manuallyFloatingLabel = false;
385
+ /** The subscription for closing actions (some are bound to document). */
386
+ _closingActionsSubscription;
387
+ /** Subscription to viewport size changes. */
388
+ _viewportSubscription = Subscription.EMPTY;
389
+ /** Implements BreakpointObserver to be used to detect handset landscape */
390
+ _breakpointObserver = inject(BreakpointObserver);
391
+ _handsetLandscapeSubscription = Subscription.EMPTY;
392
+ /**
393
+ * Whether the autocomplete can open the next time it is focused. Used to prevent a focused,
394
+ * closed autocomplete from being reopened if the user switches to another browser tab and then
395
+ * comes back.
396
+ */
397
+ _canOpenOnNextFocus = true;
398
+ /** Value inside the input before we auto-selected an option. */
399
+ _valueBeforeAutoSelection;
400
+ /**
401
+ * Current option that we have auto-selected as the user is navigating,
402
+ * but which hasn't been propagated to the model value yet.
403
+ */
404
+ _pendingAutoselectedOption;
405
+ /** Stream of keyboard events that can close the panel. */
406
+ _closeKeyEventStream = new Subject();
407
+ /**
408
+ * Event handler for when the window is blurred. Needs to be an
409
+ * arrow function in order to preserve the context.
410
+ */
411
+ _windowBlurHandler = () => {
412
+ // If the user blurred the window while the autocomplete is focused, it means that it'll be
413
+ // refocused when they come back. In this case we want to skip the first focus event, if the
414
+ // pane was closed, in order to avoid reopening it unintentionally.
415
+ this._canOpenOnNextFocus =
416
+ this._document.activeElement !== this._element.nativeElement || this.panelOpen;
417
+ };
418
+ /** `View -> model callback called when value changes` */
419
+ _onChange = () => { };
420
+ /** `View -> model callback called when autocomplete has been touched` */
421
+ _onTouched = () => { };
422
+ /** The autocomplete panel to be attached to this trigger. */
423
+ autocomplete;
424
+ /**
425
+ * Position of the autocomplete panel relative to the trigger element. A position of `auto`
426
+ * will render the panel underneath the trigger if there is enough space for it to fit in
427
+ * the viewport, otherwise the panel will be shown above it. If the position is set to
428
+ * `above` or `below`, the panel will always be shown above or below the trigger. no matter
429
+ * whether it fits completely in the viewport.
430
+ */
431
+ position = 'auto';
432
+ /**
433
+ * Reference relative to which to position the autocomplete panel.
434
+ * Defaults to the autocomplete trigger element.
435
+ */
436
+ connectedTo;
437
+ /**
438
+ * `autocomplete` attribute to be set on the input element.
439
+ * @docs-private
440
+ */
441
+ autocompleteAttribute = 'off';
442
+ /**
443
+ * Whether the autocomplete is disabled. When disabled, the element will
444
+ * act as a regular input and the user won't be able to open the panel.
445
+ */
446
+ autocompleteDisabled;
447
+ _initialized = new Subject();
448
+ _injector = inject(Injector);
449
+ constructor() { }
450
+ /** Class to apply to the panel when it's above the input. */
451
+ _aboveClass = 'mat-mdc-autocomplete-panel-above';
412
452
  ngAfterViewInit() {
413
453
  this._initialized.next();
414
454
  this._initialized.complete();
@@ -441,6 +481,7 @@ class MatAutocompleteTrigger {
441
481
  get panelOpen() {
442
482
  return this._overlayAttached && this.autocomplete.showPanel;
443
483
  }
484
+ _overlayAttached = false;
444
485
  /** Opens the autocomplete suggestion panel. */
445
486
  openPanel() {
446
487
  this._openPanelInternal();
@@ -507,6 +548,16 @@ class MatAutocompleteTrigger {
507
548
  // Normalize the output so we return a consistent type.
508
549
  map(event => (event instanceof MatOptionSelectionChange ? event : null)));
509
550
  }
551
+ /** Stream of changes to the selection state of the autocomplete options. */
552
+ optionSelections = defer(() => {
553
+ const options = this.autocomplete ? this.autocomplete.options : null;
554
+ if (options) {
555
+ return options.changes.pipe(startWith(options), switchMap(() => merge(...options.map(option => option.onSelectionChange))));
556
+ }
557
+ // If there are any subscribers before `ngAfterViewInit`, the `autocomplete` will be undefined.
558
+ // Return a stream that we'll replace with the real one once everything is in place.
559
+ return this._initialized.pipe(switchMap(() => this.optionSelections));
560
+ });
510
561
  /** The currently active option, coerced to MatOption type. */
511
562
  get activeOption() {
512
563
  if (this.autocomplete && this.autocomplete._keyManager) {
@@ -885,6 +936,26 @@ class MatAutocompleteTrigger {
885
936
  this._emitOpened();
886
937
  }
887
938
  }
939
+ /** Handles keyboard events coming from the overlay panel. */
940
+ _handlePanelKeydown = (event) => {
941
+ // Close when pressing ESCAPE or ALT + UP_ARROW, based on the a11y guidelines.
942
+ // See: https://www.w3.org/TR/wai-aria-practices-1.1/#textbox-keyboard-interaction
943
+ if ((event.keyCode === ESCAPE && !hasModifierKey(event)) ||
944
+ (event.keyCode === UP_ARROW && hasModifierKey(event, 'altKey'))) {
945
+ // If the user had typed something in before we autoselected an option, and they decided
946
+ // to cancel the selection, restore the input value to the one they had typed in.
947
+ if (this._pendingAutoselectedOption) {
948
+ this._updateNativeInputValue(this._valueBeforeAutoSelection ?? '');
949
+ this._pendingAutoselectedOption = null;
950
+ }
951
+ this._closeKeyEventStream.next();
952
+ this._resetActiveItem();
953
+ // We need to stop propagation, otherwise the event will eventually
954
+ // reach the input itself and cause the overlay to be reopened.
955
+ event.stopPropagation();
956
+ event.preventDefault();
957
+ }
958
+ };
888
959
  /** Updates the panel's visibility state and any trigger state tied to id. */
889
960
  _updatePanelState() {
890
961
  this.autocomplete._setVisibility();
@@ -1034,6 +1105,12 @@ class MatAutocompleteTrigger {
1034
1105
  }
1035
1106
  }
1036
1107
  }
1108
+ /**
1109
+ * Track which modal we have modified the `aria-owns` attribute of. When the combobox trigger is
1110
+ * inside an aria-modal, we apply aria-owns to the parent modal with the `id` of the options
1111
+ * panel. Track the modal we have changed so we can undo the changes on destroy.
1112
+ */
1113
+ _trackedModal = null;
1037
1114
  /**
1038
1115
  * If the autocomplete trigger is inside of an `aria-modal` element, connect
1039
1116
  * that modal to the options panel with `aria-owns`.
@@ -1080,10 +1157,10 @@ class MatAutocompleteTrigger {
1080
1157
  this._trackedModal = null;
1081
1158
  }
1082
1159
  }
1083
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocompleteTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1084
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.0-next.10", type: MatAutocompleteTrigger, isStandalone: true, 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 }); }
1160
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1161
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.0-rc.0", type: MatAutocompleteTrigger, isStandalone: true, 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 });
1085
1162
  }
1086
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocompleteTrigger, decorators: [{
1163
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteTrigger, decorators: [{
1087
1164
  type: Directive,
1088
1165
  args: [{
1089
1166
  selector: `input[matAutocomplete], textarea[matAutocomplete]`,
@@ -1125,11 +1202,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
1125
1202
  }] } });
1126
1203
 
1127
1204
  class MatAutocompleteModule {
1128
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1129
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocompleteModule, imports: [OverlayModule,
1205
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1206
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteModule, imports: [OverlayModule,
1130
1207
  MatOptionModule,
1131
1208
  MatCommonModule,
1132
- CommonModule,
1133
1209
  MatAutocomplete,
1134
1210
  MatAutocompleteTrigger,
1135
1211
  MatAutocompleteOrigin], exports: [CdkScrollableModule,
@@ -1137,22 +1213,20 @@ class MatAutocompleteModule {
1137
1213
  MatOptionModule,
1138
1214
  MatCommonModule,
1139
1215
  MatAutocompleteTrigger,
1140
- MatAutocompleteOrigin] }); }
1141
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocompleteModule, providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [OverlayModule,
1216
+ MatAutocompleteOrigin] });
1217
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteModule, providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [OverlayModule,
1142
1218
  MatOptionModule,
1143
- MatCommonModule,
1144
- CommonModule, CdkScrollableModule,
1219
+ MatCommonModule, CdkScrollableModule,
1145
1220
  MatOptionModule,
1146
- MatCommonModule] }); }
1221
+ MatCommonModule] });
1147
1222
  }
1148
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatAutocompleteModule, decorators: [{
1223
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteModule, decorators: [{
1149
1224
  type: NgModule,
1150
1225
  args: [{
1151
1226
  imports: [
1152
1227
  OverlayModule,
1153
1228
  MatOptionModule,
1154
1229
  MatCommonModule,
1155
- CommonModule,
1156
1230
  MatAutocomplete,
1157
1231
  MatAutocompleteTrigger,
1158
1232
  MatAutocompleteOrigin,