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