@angular/material 21.0.0-next.0 → 21.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 (200) hide show
  1. package/_index.scss +1 -1
  2. package/autocomplete/index.d.ts +1 -23
  3. package/bottom-sheet/index.d.ts +1 -10
  4. package/button/index.d.ts +1 -7
  5. package/button-toggle/index.d.ts +1 -1
  6. package/button-toggle.d.d.ts +1 -7
  7. package/checkbox/index.d.ts +1 -7
  8. package/chips/_m3-chip.scss +5 -2
  9. package/chips/index.d.ts +19 -18
  10. package/core/index.d.ts +1 -1
  11. package/core/tokens/_classes.scss +40 -38
  12. package/date-adapter.d.d.ts +1 -7
  13. package/datepicker/index.d.ts +2 -55
  14. package/dialog/index.d.ts +1 -23
  15. package/expansion/index.d.ts +1 -36
  16. package/fesm2022/animation.mjs.map +1 -1
  17. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  18. package/fesm2022/autocomplete.mjs +17 -45
  19. package/fesm2022/autocomplete.mjs.map +1 -1
  20. package/fesm2022/badge/testing.mjs.map +1 -1
  21. package/fesm2022/badge.mjs +10 -10
  22. package/fesm2022/badge.mjs.map +1 -1
  23. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  24. package/fesm2022/bottom-sheet.mjs +11 -92
  25. package/fesm2022/bottom-sheet.mjs.map +1 -1
  26. package/fesm2022/button/testing.mjs.map +1 -1
  27. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  28. package/fesm2022/button-toggle.mjs +15 -23
  29. package/fesm2022/button-toggle.mjs.map +1 -1
  30. package/fesm2022/button.mjs +19 -27
  31. package/fesm2022/button.mjs.map +1 -1
  32. package/fesm2022/card/testing.mjs.map +1 -1
  33. package/fesm2022/card.mjs +46 -46
  34. package/fesm2022/card.mjs.map +1 -1
  35. package/fesm2022/checkbox/testing.mjs.map +1 -1
  36. package/fesm2022/checkbox.mjs +17 -26
  37. package/fesm2022/checkbox.mjs.map +1 -1
  38. package/fesm2022/chips/testing.mjs.map +1 -1
  39. package/fesm2022/chips.mjs +123 -111
  40. package/fesm2022/chips.mjs.map +1 -1
  41. package/fesm2022/common-module.mjs +4 -4
  42. package/fesm2022/common-module.mjs.map +1 -1
  43. package/fesm2022/core/testing.mjs.map +1 -1
  44. package/fesm2022/core.mjs +12 -13
  45. package/fesm2022/core.mjs.map +1 -1
  46. package/fesm2022/date-formats.mjs +2 -10
  47. package/fesm2022/date-formats.mjs.map +1 -1
  48. package/fesm2022/date-range-input-harness.mjs.map +1 -1
  49. package/fesm2022/datepicker/testing.mjs.map +1 -1
  50. package/fesm2022/datepicker.mjs +109 -260
  51. package/fesm2022/datepicker.mjs.map +1 -1
  52. package/fesm2022/dialog/testing.mjs +5 -5
  53. package/fesm2022/dialog/testing.mjs.map +1 -1
  54. package/fesm2022/dialog.mjs +882 -114
  55. package/fesm2022/dialog.mjs.map +1 -1
  56. package/fesm2022/divider/testing.mjs.map +1 -1
  57. package/fesm2022/divider.mjs +7 -7
  58. package/fesm2022/divider.mjs.map +1 -1
  59. package/fesm2022/error-options.mjs +6 -6
  60. package/fesm2022/error-options.mjs.map +1 -1
  61. package/fesm2022/error-state.mjs.map +1 -1
  62. package/fesm2022/expansion/testing.mjs.map +1 -1
  63. package/fesm2022/expansion.mjs +26 -128
  64. package/fesm2022/expansion.mjs.map +1 -1
  65. package/fesm2022/form-field/testing/control.mjs.map +1 -1
  66. package/fesm2022/form-field/testing.mjs.map +1 -1
  67. package/fesm2022/form-field.mjs +37 -49
  68. package/fesm2022/form-field.mjs.map +1 -1
  69. package/fesm2022/form-field2.mjs +30 -30
  70. package/fesm2022/form-field2.mjs.map +1 -1
  71. package/fesm2022/grid-list/testing.mjs.map +1 -1
  72. package/fesm2022/grid-list.mjs +22 -22
  73. package/fesm2022/grid-list.mjs.map +1 -1
  74. package/fesm2022/icon/testing.mjs +7 -7
  75. package/fesm2022/icon/testing.mjs.map +1 -1
  76. package/fesm2022/icon-button.mjs +6 -6
  77. package/fesm2022/icon-button.mjs.map +1 -1
  78. package/fesm2022/icon-registry.mjs +5 -32
  79. package/fesm2022/icon-registry.mjs.map +1 -1
  80. package/fesm2022/icon.mjs +18 -24
  81. package/fesm2022/icon.mjs.map +1 -1
  82. package/fesm2022/input/testing.mjs.map +1 -1
  83. package/fesm2022/input-harness.mjs.map +1 -1
  84. package/fesm2022/input-value-accessor.mjs.map +1 -1
  85. package/fesm2022/input.mjs +8 -8
  86. package/fesm2022/input.mjs.map +1 -1
  87. package/fesm2022/internal-form-field.mjs +3 -3
  88. package/fesm2022/internal-form-field.mjs.map +1 -1
  89. package/fesm2022/line.mjs +7 -7
  90. package/fesm2022/line.mjs.map +1 -1
  91. package/fesm2022/list/testing.mjs.map +1 -1
  92. package/fesm2022/list.mjs +49 -49
  93. package/fesm2022/list.mjs.map +1 -1
  94. package/fesm2022/material.mjs.map +1 -1
  95. package/fesm2022/menu/testing.mjs.map +1 -1
  96. package/fesm2022/menu.mjs +26 -173
  97. package/fesm2022/menu.mjs.map +1 -1
  98. package/fesm2022/option-harness.mjs.map +1 -1
  99. package/fesm2022/option-module.mjs +4 -4
  100. package/fesm2022/option-module.mjs.map +1 -1
  101. package/fesm2022/option.mjs +6 -6
  102. package/fesm2022/option.mjs.map +1 -1
  103. package/fesm2022/paginator/testing.mjs.map +1 -1
  104. package/fesm2022/paginator.mjs +18 -37
  105. package/fesm2022/paginator.mjs.map +1 -1
  106. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  107. package/fesm2022/progress-bar.mjs +20 -23
  108. package/fesm2022/progress-bar.mjs.map +1 -1
  109. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  110. package/fesm2022/progress-spinner.mjs +9 -17
  111. package/fesm2022/progress-spinner.mjs.map +1 -1
  112. package/fesm2022/pseudo-checkbox-module.mjs +4 -4
  113. package/fesm2022/pseudo-checkbox-module.mjs.map +1 -1
  114. package/fesm2022/pseudo-checkbox.mjs +3 -3
  115. package/fesm2022/pseudo-checkbox.mjs.map +1 -1
  116. package/fesm2022/public-api.mjs.map +1 -1
  117. package/fesm2022/radio/testing.mjs.map +1 -1
  118. package/fesm2022/radio.mjs +14 -22
  119. package/fesm2022/radio.mjs.map +1 -1
  120. package/fesm2022/ripple-loader.mjs +3 -3
  121. package/fesm2022/ripple-loader.mjs.map +1 -1
  122. package/fesm2022/ripple-module.mjs +4 -4
  123. package/fesm2022/ripple-module.mjs.map +1 -1
  124. package/fesm2022/ripple.mjs +8 -8
  125. package/fesm2022/ripple.mjs.map +1 -1
  126. package/fesm2022/select/testing.mjs.map +1 -1
  127. package/fesm2022/select.mjs +1293 -90
  128. package/fesm2022/select.mjs.map +1 -1
  129. package/fesm2022/sidenav/testing.mjs.map +1 -1
  130. package/fesm2022/sidenav.mjs +24 -110
  131. package/fesm2022/sidenav.mjs.map +1 -1
  132. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  133. package/fesm2022/slide-toggle.mjs +7 -7
  134. package/fesm2022/slide-toggle.mjs.map +1 -1
  135. package/fesm2022/slider/testing.mjs.map +1 -1
  136. package/fesm2022/slider.mjs +16 -16
  137. package/fesm2022/slider.mjs.map +1 -1
  138. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  139. package/fesm2022/snack-bar.mjs +24 -102
  140. package/fesm2022/snack-bar.mjs.map +1 -1
  141. package/fesm2022/sort/testing.mjs.map +1 -1
  142. package/fesm2022/sort.mjs +20 -344
  143. package/fesm2022/sort.mjs.map +1 -1
  144. package/fesm2022/stepper/testing.mjs.map +1 -1
  145. package/fesm2022/stepper.mjs +34 -201
  146. package/fesm2022/stepper.mjs.map +1 -1
  147. package/fesm2022/structural-styles.mjs +3 -3
  148. package/fesm2022/structural-styles.mjs.map +1 -1
  149. package/fesm2022/table/testing.mjs.map +1 -1
  150. package/fesm2022/table.mjs +55 -55
  151. package/fesm2022/table.mjs.map +1 -1
  152. package/fesm2022/tabs/testing.mjs.map +1 -1
  153. package/fesm2022/tabs.mjs +51 -196
  154. package/fesm2022/tabs.mjs.map +1 -1
  155. package/fesm2022/timepicker/testing.mjs.map +1 -1
  156. package/fesm2022/timepicker.mjs +13 -13
  157. package/fesm2022/timepicker.mjs.map +1 -1
  158. package/fesm2022/toolbar/testing.mjs.map +1 -1
  159. package/fesm2022/toolbar.mjs +10 -10
  160. package/fesm2022/toolbar.mjs.map +1 -1
  161. package/fesm2022/tooltip/testing.mjs.map +1 -1
  162. package/fesm2022/tooltip.mjs +21 -52
  163. package/fesm2022/tooltip.mjs.map +1 -1
  164. package/fesm2022/{tooltip-module.mjs → tooltip2.mjs} +17 -60
  165. package/fesm2022/tooltip2.mjs.map +1 -0
  166. package/fesm2022/tree/testing.mjs.map +1 -1
  167. package/fesm2022/tree.mjs +25 -25
  168. package/fesm2022/tree.mjs.map +1 -1
  169. package/form-field/index.d.ts +1 -11
  170. package/icon/index.d.ts +2 -2
  171. package/icon-module.d.d.ts +1 -7
  172. package/icon-registry.d.d.ts +2 -18
  173. package/menu/index.d.ts +1 -42
  174. package/package.json +2 -2
  175. package/paginator/index.d.ts +3 -3
  176. package/paginator.d.d.ts +2 -18
  177. package/progress-bar/index.d.ts +1 -7
  178. package/progress-spinner/index.d.ts +1 -1
  179. package/progress-spinner.d.d.ts +3 -9
  180. package/radio/index.d.ts +1 -7
  181. package/ripple.d.d.ts +3 -3
  182. package/schematics/ng-add/index.js +1 -1
  183. package/schematics/ng-update/index_bundled.js +7 -3
  184. package/schematics/ng-update/index_bundled.js.map +1 -1
  185. package/select/index.d.ts +439 -27
  186. package/sidenav/index.d.ts +1 -17
  187. package/snack-bar/index.d.ts +1 -17
  188. package/sort/index.d.ts +2 -33
  189. package/stepper/index.d.ts +2 -29
  190. package/tabs/index.d.ts +1 -18
  191. package/tooltip/index.d.ts +302 -16
  192. package/fesm2022/dialog-module.mjs +0 -891
  193. package/fesm2022/dialog-module.mjs.map +0 -1
  194. package/fesm2022/form-field-module.mjs +0 -39
  195. package/fesm2022/form-field-module.mjs.map +0 -1
  196. package/fesm2022/select-module.mjs +0 -1318
  197. package/fesm2022/select-module.mjs.map +0 -1
  198. package/fesm2022/tooltip-module.mjs.map +0 -1
  199. package/select-module.d.d.ts +0 -456
  200. package/tooltip-module.d.d.ts +0 -329
@@ -1,456 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, AfterContentInit, OnChanges, OnDestroy, OnInit, DoCheck, ChangeDetectorRef, ElementRef, QueryList, EventEmitter, SimpleChanges } from '@angular/core';
3
- import * as i2 from '@angular/cdk/overlay';
4
- import { ScrollStrategy, ConnectedPosition, CdkOverlayOrigin, CdkConnectedOverlay } from '@angular/cdk/overlay';
5
- import { MatOptionModule } from './option-module.d.js';
6
- import { MatCommonModule } from './common-module.d.js';
7
- import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
8
- import { SelectionModel } from '@angular/cdk/collections';
9
- import * as i5 from '@angular/cdk/scrolling';
10
- import { ViewportRuler } from '@angular/cdk/scrolling';
11
- import { ControlValueAccessor, NgControl } from '@angular/forms';
12
- import { Subject, Observable } from 'rxjs';
13
- import { ErrorStateMatcher } from './error-options.d.js';
14
- import { MatOption, MatOptgroup, MatOptionSelectionChange } from './option.d.js';
15
- import { MatFormField } from './form-field.d.js';
16
- import { MatFormFieldControl } from './form-field-control.d.js';
17
- import { MatFormFieldModule } from './form-field-module.d.js';
18
-
19
- /** Injection token that determines the scroll handling while a select is open. */
20
- declare const MAT_SELECT_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
21
- /**
22
- * @docs-private
23
- * @deprecated No longer used, will be removed.
24
- * @breaking-change 21.0.0
25
- */
26
- declare function MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(_overlay: unknown): () => ScrollStrategy;
27
- /** Object that can be used to configure the default options for the select module. */
28
- interface MatSelectConfig {
29
- /** Whether option centering should be disabled. */
30
- disableOptionCentering?: boolean;
31
- /** Time to wait in milliseconds after the last keystroke before moving focus to an item. */
32
- typeaheadDebounceInterval?: number;
33
- /** Class or list of classes to be applied to the menu's overlay panel. */
34
- overlayPanelClass?: string | string[];
35
- /** Whether icon indicators should be hidden for single-selection. */
36
- hideSingleSelectionIndicator?: boolean;
37
- /**
38
- * Width of the panel. If set to `auto`, the panel will match the trigger width.
39
- * If set to null or an empty string, the panel will grow to match the longest option's text.
40
- */
41
- panelWidth?: string | number | null;
42
- /**
43
- * Whether nullable options can be selected by default.
44
- * See `MatSelect.canSelectNullableOptions` for more information.
45
- */
46
- canSelectNullableOptions?: boolean;
47
- }
48
- /** Injection token that can be used to provide the default options the select module. */
49
- declare const MAT_SELECT_CONFIG: InjectionToken<MatSelectConfig>;
50
- /**
51
- * @docs-private
52
- * @deprecated No longer used, will be removed.
53
- * @breaking-change 21.0.0
54
- */
55
- declare const MAT_SELECT_SCROLL_STRATEGY_PROVIDER: {
56
- provide: InjectionToken<() => ScrollStrategy>;
57
- deps: any[];
58
- useFactory: typeof MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY;
59
- };
60
- /**
61
- * Injection token that can be used to reference instances of `MatSelectTrigger`. It serves as
62
- * alternative token to the actual `MatSelectTrigger` class which could cause unnecessary
63
- * retention of the class and its directive metadata.
64
- */
65
- declare const MAT_SELECT_TRIGGER: InjectionToken<MatSelectTrigger>;
66
- /** Change event object that is emitted when the select value has changed. */
67
- declare class MatSelectChange<T = any> {
68
- /** Reference to the select that emitted the change event. */
69
- source: MatSelect;
70
- /** Current value of the select that emitted the event. */
71
- value: T;
72
- constructor(
73
- /** Reference to the select that emitted the change event. */
74
- source: MatSelect,
75
- /** Current value of the select that emitted the event. */
76
- value: T);
77
- }
78
- declare class MatSelect implements AfterContentInit, OnChanges, OnDestroy, OnInit, DoCheck, ControlValueAccessor, MatFormFieldControl<any> {
79
- protected _viewportRuler: ViewportRuler;
80
- protected _changeDetectorRef: ChangeDetectorRef;
81
- readonly _elementRef: ElementRef<any>;
82
- private _dir;
83
- private _idGenerator;
84
- private _renderer;
85
- protected _parentFormField: MatFormField | null;
86
- ngControl: NgControl;
87
- private _liveAnnouncer;
88
- protected _defaultOptions: MatSelectConfig | null;
89
- protected _animationsDisabled: boolean;
90
- private _initialized;
91
- private _cleanupDetach;
92
- /** All of the defined select options. */
93
- options: QueryList<MatOption>;
94
- /** All of the defined groups of options. */
95
- optionGroups: QueryList<MatOptgroup>;
96
- /** User-supplied override of the trigger element. */
97
- customTrigger: MatSelectTrigger;
98
- /**
99
- * This position config ensures that the top "start" corner of the overlay
100
- * is aligned with with the top "start" of the origin by default (overlapping
101
- * the trigger completely). If the panel cannot fit below the trigger, it
102
- * will fall back to a position above the trigger.
103
- */
104
- _positions: ConnectedPosition[];
105
- /** Scrolls a particular option into the view. */
106
- _scrollOptionIntoView(index: number): void;
107
- /** Called when the panel has been opened and the overlay has settled on its final position. */
108
- private _positioningSettled;
109
- /** Creates a change event object that should be emitted by the select. */
110
- private _getChangeEvent;
111
- /** Factory function used to create a scroll strategy for this select. */
112
- private _scrollStrategyFactory;
113
- /** Whether or not the overlay panel is open. */
114
- private _panelOpen;
115
- /** Comparison function to specify which option is displayed. Defaults to object equality. */
116
- private _compareWith;
117
- /** Unique id for this input. */
118
- private _uid;
119
- /** Current `aria-labelledby` value for the select trigger. */
120
- private _triggerAriaLabelledBy;
121
- /**
122
- * Keeps track of the previous form control assigned to the select.
123
- * Used to detect if it has changed.
124
- */
125
- private _previousControl;
126
- /** Emits whenever the component is destroyed. */
127
- protected readonly _destroy: Subject<void>;
128
- /** Tracks the error state of the select. */
129
- private _errorStateTracker;
130
- /**
131
- * Emits whenever the component state changes and should cause the parent
132
- * form-field to update. Implemented as part of `MatFormFieldControl`.
133
- * @docs-private
134
- */
135
- readonly stateChanges: Subject<void>;
136
- /**
137
- * Disable the automatic labeling to avoid issues like #27241.
138
- * @docs-private
139
- */
140
- readonly disableAutomaticLabeling = true;
141
- /**
142
- * Implemented as part of MatFormFieldControl.
143
- * @docs-private
144
- */
145
- userAriaDescribedBy: string;
146
- /** Deals with the selection logic. */
147
- _selectionModel: SelectionModel<MatOption>;
148
- /** Manages keyboard events for options in the panel. */
149
- _keyManager: ActiveDescendantKeyManager<MatOption>;
150
- /** Ideal origin for the overlay panel. */
151
- _preferredOverlayOrigin: CdkOverlayOrigin | ElementRef | undefined;
152
- /** Width of the overlay panel. */
153
- _overlayWidth: string | number;
154
- /** `View -> model callback called when value changes` */
155
- _onChange: (value: any) => void;
156
- /** `View -> model callback called when select has been touched` */
157
- _onTouched: () => void;
158
- /** ID for the DOM node containing the select's value. */
159
- _valueId: string;
160
- /** Strategy that will be used to handle scrolling while the select panel is open. */
161
- _scrollStrategy: ScrollStrategy;
162
- _overlayPanelClass: string | string[];
163
- /** Whether the select is focused. */
164
- get focused(): boolean;
165
- private _focused;
166
- /** A name for this control that can be used by `mat-form-field`. */
167
- controlType: string;
168
- /** Trigger that opens the select. */
169
- trigger: ElementRef;
170
- /** Panel containing the select options. */
171
- panel: ElementRef;
172
- /** Overlay pane containing the options. */
173
- protected _overlayDir: CdkConnectedOverlay;
174
- /** Classes to be passed to the select panel. Supports the same syntax as `ngClass`. */
175
- panelClass: string | string[] | Set<string> | {
176
- [key: string]: any;
177
- };
178
- /** Whether the select is disabled. */
179
- disabled: boolean;
180
- /** Whether ripples in the select are disabled. */
181
- get disableRipple(): boolean;
182
- set disableRipple(value: boolean);
183
- private _disableRipple;
184
- /** Tab index of the select. */
185
- tabIndex: number;
186
- /** Whether checkmark indicator for single-selection options is hidden. */
187
- get hideSingleSelectionIndicator(): boolean;
188
- set hideSingleSelectionIndicator(value: boolean);
189
- private _hideSingleSelectionIndicator;
190
- /** Placeholder to be shown if no value has been selected. */
191
- get placeholder(): string;
192
- set placeholder(value: string);
193
- private _placeholder;
194
- /** Whether the component is required. */
195
- get required(): boolean;
196
- set required(value: boolean);
197
- private _required;
198
- /** Whether the user should be allowed to select multiple options. */
199
- get multiple(): boolean;
200
- set multiple(value: boolean);
201
- private _multiple;
202
- /** Whether to center the active option over the trigger. */
203
- disableOptionCentering: boolean;
204
- /**
205
- * Function to compare the option values with the selected values. The first argument
206
- * is a value from an option. The second is a value from the selection. A boolean
207
- * should be returned.
208
- */
209
- get compareWith(): (o1: any, o2: any) => boolean;
210
- set compareWith(fn: (o1: any, o2: any) => boolean);
211
- /** Value of the select control. */
212
- get value(): any;
213
- set value(newValue: any);
214
- private _value;
215
- /** Aria label of the select. */
216
- ariaLabel: string;
217
- /** Input that can be used to specify the `aria-labelledby` attribute. */
218
- ariaLabelledby: string;
219
- /** Object used to control when error messages are shown. */
220
- get errorStateMatcher(): ErrorStateMatcher;
221
- set errorStateMatcher(value: ErrorStateMatcher);
222
- /** Time to wait in milliseconds after the last keystroke before moving focus to an item. */
223
- typeaheadDebounceInterval: number;
224
- /**
225
- * Function used to sort the values in a select in multiple mode.
226
- * Follows the same logic as `Array.prototype.sort`.
227
- */
228
- sortComparator: (a: MatOption, b: MatOption, options: MatOption[]) => number;
229
- /** Unique id of the element. */
230
- get id(): string;
231
- set id(value: string);
232
- private _id;
233
- /** Whether the select is in an error state. */
234
- get errorState(): boolean;
235
- set errorState(value: boolean);
236
- /**
237
- * Width of the panel. If set to `auto`, the panel will match the trigger width.
238
- * If set to null or an empty string, the panel will grow to match the longest option's text.
239
- */
240
- panelWidth: string | number | null;
241
- /**
242
- * By default selecting an option with a `null` or `undefined` value will reset the select's
243
- * value. Enable this option if the reset behavior doesn't match your requirements and instead
244
- * the nullable options should become selected. The value of this input can be controlled app-wide
245
- * using the `MAT_SELECT_CONFIG` injection token.
246
- */
247
- canSelectNullableOptions: boolean;
248
- /** Combined stream of all of the child options' change events. */
249
- readonly optionSelectionChanges: Observable<MatOptionSelectionChange>;
250
- /** Event emitted when the select panel has been toggled. */
251
- readonly openedChange: EventEmitter<boolean>;
252
- /** Event emitted when the select has been opened. */
253
- readonly _openedStream: Observable<void>;
254
- /** Event emitted when the select has been closed. */
255
- readonly _closedStream: Observable<void>;
256
- /** Event emitted when the selected value has been changed by the user. */
257
- readonly selectionChange: EventEmitter<MatSelectChange<any>>;
258
- /**
259
- * Event that emits whenever the raw value of the select changes. This is here primarily
260
- * to facilitate the two-way binding for the `value` input.
261
- * @docs-private
262
- */
263
- readonly valueChange: EventEmitter<any>;
264
- constructor(...args: unknown[]);
265
- ngOnInit(): void;
266
- ngAfterContentInit(): void;
267
- ngDoCheck(): void;
268
- ngOnChanges(changes: SimpleChanges): void;
269
- ngOnDestroy(): void;
270
- /** Toggles the overlay panel open or closed. */
271
- toggle(): void;
272
- /** Opens the overlay panel. */
273
- open(): void;
274
- /**
275
- * Track which modal we have modified the `aria-owns` attribute of. When the combobox trigger is
276
- * inside an aria-modal, we apply aria-owns to the parent modal with the `id` of the options
277
- * panel. Track the modal we have changed so we can undo the changes on destroy.
278
- */
279
- private _trackedModal;
280
- /**
281
- * If the autocomplete trigger is inside of an `aria-modal` element, connect
282
- * that modal to the options panel with `aria-owns`.
283
- *
284
- * For some browser + screen reader combinations, when navigation is inside
285
- * of an `aria-modal` element, the screen reader treats everything outside
286
- * of that modal as hidden or invisible.
287
- *
288
- * This causes a problem when the combobox trigger is _inside_ of a modal, because the
289
- * options panel is rendered _outside_ of that modal, preventing screen reader navigation
290
- * from reaching the panel.
291
- *
292
- * We can work around this issue by applying `aria-owns` to the modal with the `id` of
293
- * the options panel. This effectively communicates to assistive technology that the
294
- * options panel is part of the same interaction as the modal.
295
- *
296
- * At time of this writing, this issue is present in VoiceOver.
297
- * See https://github.com/angular/components/issues/20694
298
- */
299
- private _applyModalPanelOwnership;
300
- /** Clears the reference to the listbox overlay element from the modal it was added to. */
301
- private _clearFromModal;
302
- /** Closes the overlay panel and focuses the host element. */
303
- close(): void;
304
- /** Triggers the exit animation and detaches the overlay at the end. */
305
- private _exitAndDetach;
306
- /** Detaches the current overlay directive. */
307
- private _detachOverlay;
308
- /**
309
- * Sets the select's value. Part of the ControlValueAccessor interface
310
- * required to integrate with Angular's core forms API.
311
- *
312
- * @param value New value to be written to the model.
313
- */
314
- writeValue(value: any): void;
315
- /**
316
- * Saves a callback function to be invoked when the select's value
317
- * changes from user input. Part of the ControlValueAccessor interface
318
- * required to integrate with Angular's core forms API.
319
- *
320
- * @param fn Callback to be triggered when the value changes.
321
- */
322
- registerOnChange(fn: (value: any) => void): void;
323
- /**
324
- * Saves a callback function to be invoked when the select is blurred
325
- * by the user. Part of the ControlValueAccessor interface required
326
- * to integrate with Angular's core forms API.
327
- *
328
- * @param fn Callback to be triggered when the component has been touched.
329
- */
330
- registerOnTouched(fn: () => {}): void;
331
- /**
332
- * Disables the select. Part of the ControlValueAccessor interface required
333
- * to integrate with Angular's core forms API.
334
- *
335
- * @param isDisabled Sets whether the component is disabled.
336
- */
337
- setDisabledState(isDisabled: boolean): void;
338
- /** Whether or not the overlay panel is open. */
339
- get panelOpen(): boolean;
340
- /** The currently selected option. */
341
- get selected(): MatOption | MatOption[];
342
- /** The value displayed in the trigger. */
343
- get triggerValue(): string;
344
- /** Refreshes the error state of the select. */
345
- updateErrorState(): void;
346
- /** Whether the element is in RTL mode. */
347
- _isRtl(): boolean;
348
- /** Handles all keydown events on the select. */
349
- _handleKeydown(event: KeyboardEvent): void;
350
- /** Handles keyboard events while the select is closed. */
351
- private _handleClosedKeydown;
352
- /** Handles keyboard events when the selected is open. */
353
- private _handleOpenKeydown;
354
- /** Handles keyboard events coming from the overlay. */
355
- protected _handleOverlayKeydown(event: KeyboardEvent): void;
356
- _onFocus(): void;
357
- /**
358
- * Calls the touched callback only if the panel is closed. Otherwise, the trigger will
359
- * "blur" to the panel when it opens, causing a false positive.
360
- */
361
- _onBlur(): void;
362
- /** Returns the theme to be used on the panel. */
363
- _getPanelTheme(): string;
364
- /** Whether the select has a value. */
365
- get empty(): boolean;
366
- private _initializeSelection;
367
- /**
368
- * Sets the selected option based on a value. If no option can be
369
- * found with the designated value, the select trigger is cleared.
370
- */
371
- private _setSelectionByValue;
372
- /**
373
- * Finds and selects and option based on its value.
374
- * @returns Option that has the corresponding value.
375
- */
376
- private _selectOptionByValue;
377
- /** Assigns a specific value to the select. Returns whether the value has changed. */
378
- private _assignValue;
379
- private _skipPredicate;
380
- /** Gets how wide the overlay panel should be. */
381
- private _getOverlayWidth;
382
- /** Syncs the parent state with the individual options. */
383
- _syncParentProperties(): void;
384
- /** Sets up a key manager to listen to keyboard events on the overlay panel. */
385
- private _initKeyManager;
386
- /** Drops current option subscriptions and IDs and resets from scratch. */
387
- private _resetOptions;
388
- /** Invoked when an option is clicked. */
389
- private _onSelect;
390
- /** Sorts the selected values in the selected based on their order in the panel. */
391
- private _sortValues;
392
- /** Emits change event to set the model value. */
393
- private _propagateChanges;
394
- /**
395
- * Highlights the selected item. If no option is selected, it will highlight
396
- * the first *enabled* option.
397
- */
398
- private _highlightCorrectOption;
399
- /** Whether the panel is allowed to open. */
400
- protected _canOpen(): boolean;
401
- /** Focuses the select element. */
402
- focus(options?: FocusOptions): void;
403
- /** Gets the aria-labelledby for the select panel. */
404
- _getPanelAriaLabelledby(): string | null;
405
- /** Determines the `aria-activedescendant` to be set on the host. */
406
- _getAriaActiveDescendant(): string | null;
407
- /** Gets the aria-labelledby of the select component trigger. */
408
- private _getTriggerAriaLabelledby;
409
- /**
410
- * Implemented as part of MatFormFieldControl.
411
- * @docs-private
412
- */
413
- get describedByIds(): string[];
414
- /**
415
- * Implemented as part of MatFormFieldControl.
416
- * @docs-private
417
- */
418
- setDescribedByIds(ids: string[]): void;
419
- /**
420
- * Implemented as part of MatFormFieldControl.
421
- * @docs-private
422
- */
423
- onContainerClick(): void;
424
- /**
425
- * Implemented as part of MatFormFieldControl.
426
- * @docs-private
427
- */
428
- get shouldLabelFloat(): boolean;
429
- static ɵfac: i0.ɵɵFactoryDeclaration<MatSelect, never>;
430
- static ɵcmp: i0.ɵɵComponentDeclaration<MatSelect, "mat-select", ["matSelect"], { "userAriaDescribedBy": { "alias": "aria-describedby"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "hideSingleSelectionIndicator": { "alias": "hideSingleSelectionIndicator"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "disableOptionCentering": { "alias": "disableOptionCentering"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "value": { "alias": "value"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "typeaheadDebounceInterval": { "alias": "typeaheadDebounceInterval"; "required": false; }; "sortComparator": { "alias": "sortComparator"; "required": false; }; "id": { "alias": "id"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "canSelectNullableOptions": { "alias": "canSelectNullableOptions"; "required": false; }; }, { "openedChange": "openedChange"; "_openedStream": "opened"; "_closedStream": "closed"; "selectionChange": "selectionChange"; "valueChange": "valueChange"; }, ["customTrigger", "options", "optionGroups"], ["mat-select-trigger", "*"], true, never>;
431
- static ngAcceptInputType_disabled: unknown;
432
- static ngAcceptInputType_disableRipple: unknown;
433
- static ngAcceptInputType_tabIndex: unknown;
434
- static ngAcceptInputType_hideSingleSelectionIndicator: unknown;
435
- static ngAcceptInputType_required: unknown;
436
- static ngAcceptInputType_multiple: unknown;
437
- static ngAcceptInputType_disableOptionCentering: unknown;
438
- static ngAcceptInputType_typeaheadDebounceInterval: unknown;
439
- static ngAcceptInputType_canSelectNullableOptions: unknown;
440
- }
441
- /**
442
- * Allows the user to customize the trigger that is displayed when the select has a value.
443
- */
444
- declare class MatSelectTrigger {
445
- static ɵfac: i0.ɵɵFactoryDeclaration<MatSelectTrigger, never>;
446
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatSelectTrigger, "mat-select-trigger", never, {}, {}, never, never, true, never>;
447
- }
448
-
449
- declare class MatSelectModule {
450
- static ɵfac: i0.ɵɵFactoryDeclaration<MatSelectModule, never>;
451
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatSelectModule, never, [typeof i2.OverlayModule, typeof MatOptionModule, typeof MatCommonModule, typeof MatSelect, typeof MatSelectTrigger], [typeof i5.CdkScrollableModule, typeof MatFormFieldModule, typeof MatSelect, typeof MatSelectTrigger, typeof MatOptionModule, typeof MatCommonModule]>;
452
- static ɵinj: i0.ɵɵInjectorDeclaration<MatSelectModule>;
453
- }
454
-
455
- export { MAT_SELECT_CONFIG, MAT_SELECT_SCROLL_STRATEGY, MAT_SELECT_SCROLL_STRATEGY_PROVIDER, MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY, MAT_SELECT_TRIGGER, MatSelect, MatSelectChange, MatSelectModule, MatSelectTrigger };
456
- export type { MatSelectConfig };