@angular/material 19.2.2 → 19.2.3

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 (194) hide show
  1. package/autocomplete/index.d.ts +83 -124
  2. package/autocomplete/testing/index.d.ts +5 -11
  3. package/badge/index.d.ts +17 -30
  4. package/badge/testing/index.d.ts +5 -8
  5. package/bottom-sheet/index.d.ts +88 -103
  6. package/bottom-sheet/testing/index.d.ts +4 -6
  7. package/button/index.d.ts +109 -148
  8. package/button/testing/index.d.ts +6 -10
  9. package/button-toggle/index.d.ts +116 -142
  10. package/button-toggle/testing/index.d.ts +34 -36
  11. package/card/index.d.ts +79 -117
  12. package/card/testing/index.d.ts +11 -15
  13. package/checkbox/index.d.ts +55 -85
  14. package/checkbox/testing/index.d.ts +6 -10
  15. package/chips/index.d.ts +592 -690
  16. package/chips/testing/index.d.ts +78 -93
  17. package/core/index.d.ts +565 -669
  18. package/core/testing/index.d.ts +28 -32
  19. package/datepicker/index.d.ts +1323 -1479
  20. package/datepicker/testing/index.d.ts +109 -119
  21. package/dialog/index.d.ts +194 -246
  22. package/dialog/testing/index.d.ts +17 -26
  23. package/divider/index.d.ts +4 -10
  24. package/divider/testing/index.d.ts +4 -6
  25. package/expansion/index.d.ts +137 -189
  26. package/expansion/testing/index.d.ts +25 -31
  27. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  28. package/fesm2022/autocomplete.mjs +26 -17
  29. package/fesm2022/autocomplete.mjs.map +1 -1
  30. package/fesm2022/badge/testing.mjs.map +1 -1
  31. package/fesm2022/badge.mjs +3 -7
  32. package/fesm2022/badge.mjs.map +1 -1
  33. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  34. package/fesm2022/bottom-sheet.mjs +0 -4
  35. package/fesm2022/bottom-sheet.mjs.map +1 -1
  36. package/fesm2022/button/testing.mjs.map +1 -1
  37. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  38. package/fesm2022/button-toggle.mjs +5 -4
  39. package/fesm2022/button-toggle.mjs.map +1 -1
  40. package/fesm2022/button.mjs +6 -6
  41. package/fesm2022/button.mjs.map +1 -1
  42. package/fesm2022/card/testing.mjs.map +1 -1
  43. package/fesm2022/card.mjs +0 -4
  44. package/fesm2022/card.mjs.map +1 -1
  45. package/fesm2022/checkbox/testing.mjs.map +1 -1
  46. package/fesm2022/checkbox.mjs +5 -5
  47. package/fesm2022/checkbox.mjs.map +1 -1
  48. package/fesm2022/chips/testing.mjs.map +1 -1
  49. package/fesm2022/chips.mjs +0 -4
  50. package/fesm2022/chips.mjs.map +1 -1
  51. package/fesm2022/core/testing.mjs.map +1 -1
  52. package/fesm2022/core.mjs +7 -7
  53. package/fesm2022/core.mjs.map +1 -1
  54. package/fesm2022/datepicker/testing.mjs.map +1 -1
  55. package/fesm2022/datepicker.mjs +42 -18
  56. package/fesm2022/datepicker.mjs.map +1 -1
  57. package/fesm2022/dialog/testing.mjs.map +1 -1
  58. package/fesm2022/dialog.mjs +4 -8
  59. package/fesm2022/dialog.mjs.map +1 -1
  60. package/fesm2022/divider/testing.mjs.map +1 -1
  61. package/fesm2022/divider.mjs +0 -4
  62. package/fesm2022/divider.mjs.map +1 -1
  63. package/fesm2022/expansion/testing.mjs.map +1 -1
  64. package/fesm2022/expansion.mjs +2 -6
  65. package/fesm2022/expansion.mjs.map +1 -1
  66. package/fesm2022/form-field/testing.mjs +0 -2
  67. package/fesm2022/form-field/testing.mjs.map +1 -1
  68. package/fesm2022/form-field.mjs +0 -4
  69. package/fesm2022/form-field.mjs.map +1 -1
  70. package/fesm2022/grid-list/testing.mjs.map +1 -1
  71. package/fesm2022/grid-list.mjs +0 -4
  72. package/fesm2022/grid-list.mjs.map +1 -1
  73. package/fesm2022/icon/testing.mjs +0 -4
  74. package/fesm2022/icon/testing.mjs.map +1 -1
  75. package/fesm2022/icon.mjs +15 -7
  76. package/fesm2022/icon.mjs.map +1 -1
  77. package/fesm2022/input/testing.mjs.map +1 -1
  78. package/fesm2022/input.mjs +0 -4
  79. package/fesm2022/input.mjs.map +1 -1
  80. package/fesm2022/list/testing.mjs +1 -1
  81. package/fesm2022/list/testing.mjs.map +1 -1
  82. package/fesm2022/list.mjs +2 -6
  83. package/fesm2022/list.mjs.map +1 -1
  84. package/fesm2022/menu/testing.mjs.map +1 -1
  85. package/fesm2022/menu.mjs +15 -7
  86. package/fesm2022/menu.mjs.map +1 -1
  87. package/fesm2022/paginator/testing.mjs.map +1 -1
  88. package/fesm2022/paginator.mjs +10 -6
  89. package/fesm2022/paginator.mjs.map +1 -1
  90. package/fesm2022/progress-bar/testing.mjs +0 -4
  91. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  92. package/fesm2022/progress-bar.mjs +5 -5
  93. package/fesm2022/progress-bar.mjs.map +1 -1
  94. package/fesm2022/progress-spinner/testing.mjs +0 -4
  95. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  96. package/fesm2022/progress-spinner.mjs +5 -5
  97. package/fesm2022/progress-spinner.mjs.map +1 -1
  98. package/fesm2022/radio/testing.mjs.map +1 -1
  99. package/fesm2022/radio.mjs +5 -4
  100. package/fesm2022/radio.mjs.map +1 -1
  101. package/fesm2022/select/testing.mjs.map +1 -1
  102. package/fesm2022/select.mjs +14 -10
  103. package/fesm2022/select.mjs.map +1 -1
  104. package/fesm2022/sidenav/testing.mjs +1 -1
  105. package/fesm2022/sidenav/testing.mjs.map +1 -1
  106. package/fesm2022/sidenav.mjs +9 -9
  107. package/fesm2022/sidenav.mjs.map +1 -1
  108. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  109. package/fesm2022/slide-toggle.mjs +0 -4
  110. package/fesm2022/slide-toggle.mjs.map +1 -1
  111. package/fesm2022/slider/testing.mjs.map +1 -1
  112. package/fesm2022/slider.mjs +0 -4
  113. package/fesm2022/slider.mjs.map +1 -1
  114. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  115. package/fesm2022/snack-bar.mjs +5 -5
  116. package/fesm2022/snack-bar.mjs.map +1 -1
  117. package/fesm2022/sort/testing.mjs.map +1 -1
  118. package/fesm2022/sort.mjs +10 -6
  119. package/fesm2022/sort.mjs.map +1 -1
  120. package/fesm2022/stepper/testing.mjs.map +1 -1
  121. package/fesm2022/stepper.mjs +10 -6
  122. package/fesm2022/stepper.mjs.map +1 -1
  123. package/fesm2022/table/testing.mjs.map +1 -1
  124. package/fesm2022/table.mjs +0 -4
  125. package/fesm2022/table.mjs.map +1 -1
  126. package/fesm2022/tabs/testing.mjs.map +1 -1
  127. package/fesm2022/tabs.mjs +8 -15
  128. package/fesm2022/tabs.mjs.map +1 -1
  129. package/fesm2022/timepicker/testing.mjs.map +1 -1
  130. package/fesm2022/timepicker.mjs +1 -5
  131. package/fesm2022/timepicker.mjs.map +1 -1
  132. package/fesm2022/toolbar/testing.mjs.map +1 -1
  133. package/fesm2022/toolbar.mjs +0 -4
  134. package/fesm2022/toolbar.mjs.map +1 -1
  135. package/fesm2022/tooltip/testing.mjs.map +1 -1
  136. package/fesm2022/tooltip.mjs +15 -7
  137. package/fesm2022/tooltip.mjs.map +1 -1
  138. package/fesm2022/tree/testing.mjs.map +1 -1
  139. package/fesm2022/tree.mjs +0 -4
  140. package/fesm2022/tree.mjs.map +1 -1
  141. package/form-field/index.d.ts +251 -318
  142. package/form-field/testing/control/index.d.ts +2 -2
  143. package/form-field/testing/index.d.ts +14 -21
  144. package/grid-list/index.d.ts +124 -150
  145. package/grid-list/testing/index.d.ts +39 -44
  146. package/icon/index.d.ts +87 -108
  147. package/icon/testing/index.d.ts +38 -43
  148. package/index.d.ts +2 -3
  149. package/input/index.d.ts +27 -61
  150. package/input/testing/index.d.ts +16 -19
  151. package/list/index.d.ts +158 -241
  152. package/list/testing/index.d.ts +157 -179
  153. package/menu/index.d.ts +180 -231
  154. package/menu/testing/index.d.ts +17 -23
  155. package/package.json +2 -2
  156. package/paginator/index.d.ts +84 -97
  157. package/paginator/testing/index.d.ts +10 -14
  158. package/progress-bar/index.d.ts +38 -58
  159. package/progress-bar/testing/index.d.ts +7 -10
  160. package/progress-spinner/index.d.ts +38 -51
  161. package/progress-spinner/testing/index.d.ts +7 -10
  162. package/radio/index.d.ts +145 -168
  163. package/radio/testing/index.d.ts +61 -67
  164. package/schematics/ng-add/index.js +1 -1
  165. package/schematics/ng-add/index.mjs +1 -1
  166. package/schematics/ng-generate/theme-color/index_bundled.js +2 -2
  167. package/schematics/ng-generate/theme-color/schema.json +10 -0
  168. package/schematics/ng-update/index_bundled.js +31 -31
  169. package/select/index.d.ts +77 -130
  170. package/select/testing/index.d.ts +10 -15
  171. package/sidenav/index.d.ts +47 -91
  172. package/sidenav/testing/index.d.ts +58 -63
  173. package/slide-toggle/index.d.ts +51 -84
  174. package/slide-toggle/testing/index.d.ts +17 -21
  175. package/slider/index.d.ts +277 -327
  176. package/slider/testing/index.d.ts +42 -47
  177. package/snack-bar/index.d.ts +147 -185
  178. package/snack-bar/testing/index.d.ts +7 -9
  179. package/sort/index.d.ts +94 -124
  180. package/sort/testing/index.d.ts +21 -24
  181. package/stepper/index.d.ts +108 -165
  182. package/stepper/testing/index.d.ts +43 -52
  183. package/table/index.d.ts +87 -153
  184. package/table/testing/index.d.ts +64 -78
  185. package/tabs/index.d.ts +306 -382
  186. package/tabs/testing/index.d.ts +67 -76
  187. package/timepicker/index.d.ts +123 -159
  188. package/timepicker/testing/index.d.ts +20 -26
  189. package/toolbar/index.d.ts +13 -25
  190. package/toolbar/testing/index.d.ts +13 -16
  191. package/tooltip/index.d.ts +88 -117
  192. package/tooltip/testing/index.d.ts +7 -10
  193. package/tree/index.d.ts +116 -163
  194. package/tree/testing/index.d.ts +52 -58
@@ -1,127 +1,269 @@
1
- import { AbstractControlDirective } from '@angular/forms';
2
- import { AfterContentChecked } from '@angular/core';
3
- import { AfterContentInit } from '@angular/core';
4
- import { AfterViewInit } from '@angular/core';
5
- import { BooleanInput } from '@angular/cdk/coercion';
6
- import { ElementRef } from '@angular/core';
7
1
  import * as i0 from '@angular/core';
2
+ import { InjectionToken, OnDestroy, AfterViewInit, ElementRef, AfterContentInit, AfterContentChecked, QueryList } from '@angular/core';
3
+ import { BooleanInput } from '@angular/cdk/coercion';
4
+ import { NgControl, AbstractControlDirective } from '@angular/forms';
8
5
  import * as i1 from '@angular/material/core';
9
- import * as i2 from '@angular/cdk/observers';
10
- import { InjectionToken } from '@angular/core';
11
- import { NgControl } from '@angular/forms';
12
- import { Observable } from 'rxjs';
13
- import { OnDestroy } from '@angular/core';
14
- import { QueryList } from '@angular/core';
15
- import { Signal } from '@angular/core';
16
6
  import { ThemePalette } from '@angular/material/core';
7
+ import { Observable } from 'rxjs';
8
+ import * as i2 from '@angular/cdk/observers';
17
9
 
18
- /** An interface that the parent form-field should implement to receive resize events. */
19
- declare interface FloatingLabelParent {
20
- _handleLabelResized(): void;
10
+ /** The floating label for a `mat-form-field`. */
11
+ declare class MatLabel {
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatLabel, never>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatLabel, "mat-label", never, {}, {}, never, never, true, never>;
21
14
  }
22
15
 
23
- /** Type for the available floatLabel values. */
24
- export declare type FloatLabelType = 'always' | 'auto';
25
-
26
- /** @docs-private */
27
- export declare function getMatFormFieldDuplicatedHintError(align: string): Error;
28
-
29
- /** @docs-private */
30
- export declare function getMatFormFieldMissingControlError(): Error;
31
-
16
+ /**
17
+ * Injection token that can be used to reference instances of `MatError`. It serves as
18
+ * alternative token to the actual `MatError` class which could cause unnecessary
19
+ * retention of the class and its directive metadata.
20
+ */
21
+ declare const MAT_ERROR: InjectionToken<MatError>;
22
+ /** Single error message to be shown underneath the form-field. */
23
+ declare class MatError {
24
+ id: string;
25
+ constructor(...args: unknown[]);
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatError, never>;
27
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatError, "mat-error, [matError]", never, { "id": { "alias": "id"; "required": false; }; }, {}, never, never, true, never>;
28
+ }
32
29
 
33
- /** @docs-private */
34
- export declare function getMatFormFieldPlaceholderConflictError(): Error;
30
+ /** Hint text to be shown underneath the form field control. */
31
+ declare class MatHint {
32
+ /** Whether to align the hint label at the start or end of the line. */
33
+ align: 'start' | 'end';
34
+ /** Unique ID for the hint. Used for the aria-describedby on the form field control. */
35
+ id: string;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatHint, never>;
37
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatHint, "mat-hint", never, { "align": { "alias": "align"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, never, true, never>;
38
+ }
35
39
 
36
- declare namespace i3 {
37
- export {
38
- FloatLabelType,
39
- MatFormFieldAppearance,
40
- SubscriptSizing,
41
- MatFormFieldDefaultOptions,
42
- MAT_FORM_FIELD,
43
- MAT_FORM_FIELD_DEFAULT_OPTIONS,
44
- MatFormField
45
- }
40
+ /**
41
+ * Injection token that can be used to reference instances of `MatPrefix`. It serves as
42
+ * alternative token to the actual `MatPrefix` class which could cause unnecessary
43
+ * retention of the class and its directive metadata.
44
+ */
45
+ declare const MAT_PREFIX: InjectionToken<MatPrefix>;
46
+ /** Prefix to be placed in front of the form field. */
47
+ declare class MatPrefix {
48
+ set _isTextSelector(value: '');
49
+ _isText: boolean;
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatPrefix, never>;
51
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatPrefix, "[matPrefix], [matIconPrefix], [matTextPrefix]", never, { "_isTextSelector": { "alias": "matTextPrefix"; "required": false; }; }, {}, never, never, true, never>;
46
52
  }
47
53
 
48
- declare namespace i4 {
49
- export {
50
- MatLabel
51
- }
54
+ /**
55
+ * Injection token that can be used to reference instances of `MatSuffix`. It serves as
56
+ * alternative token to the actual `MatSuffix` class which could cause unnecessary
57
+ * retention of the class and its directive metadata.
58
+ */
59
+ declare const MAT_SUFFIX: InjectionToken<MatSuffix>;
60
+ /** Suffix to be placed at the end of the form field. */
61
+ declare class MatSuffix {
62
+ set _isTextSelector(value: '');
63
+ _isText: boolean;
64
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatSuffix, never>;
65
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatSuffix, "[matSuffix], [matIconSuffix], [matTextSuffix]", never, { "_isTextSelector": { "alias": "matTextSuffix"; "required": false; }; }, {}, never, never, true, never>;
52
66
  }
53
67
 
54
- declare namespace i5 {
55
- export {
56
- MAT_ERROR,
57
- MatError
58
- }
68
+ /** An interface that the parent form-field should implement to receive resize events. */
69
+ interface FloatingLabelParent {
70
+ _handleLabelResized(): void;
71
+ }
72
+ /**
73
+ * Internal directive that maintains a MDC floating label. This directive does not
74
+ * use the `MDCFloatingLabelFoundation` class, as it is not worth the size cost of
75
+ * including it just to measure the label width and toggle some classes.
76
+ *
77
+ * The use of a directive allows us to conditionally render a floating label in the
78
+ * template without having to manually manage instantiation and destruction of the
79
+ * floating label component based on.
80
+ *
81
+ * The component is responsible for setting up the floating label styles, measuring label
82
+ * width for the outline notch, and providing inputs that can be used to toggle the
83
+ * label's floating or required state.
84
+ */
85
+ declare class MatFormFieldFloatingLabel implements OnDestroy {
86
+ private _elementRef;
87
+ /** Whether the label is floating. */
88
+ get floating(): boolean;
89
+ set floating(value: boolean);
90
+ private _floating;
91
+ /** Whether to monitor for resize events on the floating label. */
92
+ get monitorResize(): boolean;
93
+ set monitorResize(value: boolean);
94
+ private _monitorResize;
95
+ /** The shared ResizeObserver. */
96
+ private _resizeObserver;
97
+ /** The Angular zone. */
98
+ private _ngZone;
99
+ /** The parent form-field. */
100
+ private _parent;
101
+ /** The current resize event subscription. */
102
+ private _resizeSubscription;
103
+ constructor(...args: unknown[]);
104
+ ngOnDestroy(): void;
105
+ /** Gets the width of the label. Used for the outline notch. */
106
+ getWidth(): number;
107
+ /** Gets the HTML element for the floating label. */
108
+ get element(): HTMLElement;
109
+ /** Handles resize events from the ResizeObserver. */
110
+ private _handleResize;
111
+ /** Subscribes to resize events. */
112
+ private _subscribeToResize;
113
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatFormFieldFloatingLabel, never>;
114
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatFormFieldFloatingLabel, "label[matFormFieldFloatingLabel]", never, { "floating": { "alias": "floating"; "required": false; }; "monitorResize": { "alias": "monitorResize"; "required": false; }; }, {}, never, never, true, never>;
59
115
  }
60
116
 
61
- declare namespace i6 {
62
- export {
63
- MatHint
64
- }
117
+ /**
118
+ * Internal directive that creates an instance of the MDC line-ripple component. Using a
119
+ * directive allows us to conditionally render a line-ripple in the template without having
120
+ * to manually create and destroy the `MDCLineRipple` component whenever the condition changes.
121
+ *
122
+ * The directive sets up the styles for the line-ripple and provides an API for activating
123
+ * and deactivating the line-ripple.
124
+ */
125
+ declare class MatFormFieldLineRipple implements OnDestroy {
126
+ private _elementRef;
127
+ private _cleanupTransitionEnd;
128
+ constructor(...args: unknown[]);
129
+ activate(): void;
130
+ deactivate(): void;
131
+ private _handleTransitionEnd;
132
+ ngOnDestroy(): void;
133
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatFormFieldLineRipple, never>;
134
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatFormFieldLineRipple, "div[matFormFieldLineRipple]", never, {}, {}, never, never, true, never>;
65
135
  }
66
136
 
67
- declare namespace i7 {
68
- export {
69
- MAT_PREFIX,
70
- MatPrefix
71
- }
137
+ /**
138
+ * Internal component that creates an instance of the MDC notched-outline component.
139
+ *
140
+ * The component sets up the HTML structure and styles for the notched-outline. It provides
141
+ * inputs to toggle the notch state and width.
142
+ */
143
+ declare class MatFormFieldNotchedOutline implements AfterViewInit {
144
+ private _elementRef;
145
+ private _ngZone;
146
+ /** Whether the notch should be opened. */
147
+ open: boolean;
148
+ _notch: ElementRef;
149
+ constructor(...args: unknown[]);
150
+ ngAfterViewInit(): void;
151
+ _setNotchWidth(labelWidth: number): void;
152
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatFormFieldNotchedOutline, never>;
153
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatFormFieldNotchedOutline, "div[matFormFieldNotchedOutline]", never, { "open": { "alias": "matFormFieldNotchedOutlineOpen"; "required": false; }; }, {}, never, ["*"], true, never>;
72
154
  }
73
155
 
74
- declare namespace i8 {
75
- export {
76
- MAT_SUFFIX,
77
- MatSuffix
78
- }
156
+ /** An interface which allows a control to work inside of a `MatFormField`. */
157
+ declare abstract class MatFormFieldControl$1<T> {
158
+ /** The value of the control. */
159
+ value: T | null;
160
+ /**
161
+ * Stream that emits whenever the state of the control changes such that the parent `MatFormField`
162
+ * needs to run change detection.
163
+ */
164
+ readonly stateChanges: Observable<void>;
165
+ /** The element ID for this control. */
166
+ readonly id: string;
167
+ /** The placeholder for this control. */
168
+ readonly placeholder: string;
169
+ /** Gets the AbstractControlDirective for this control. */
170
+ readonly ngControl: NgControl | AbstractControlDirective | null;
171
+ /** Whether the control is focused. */
172
+ readonly focused: boolean;
173
+ /** Whether the control is empty. */
174
+ readonly empty: boolean;
175
+ /** Whether the `MatFormField` label should try to float. */
176
+ readonly shouldLabelFloat: boolean;
177
+ /** Whether the control is required. */
178
+ readonly required: boolean;
179
+ /** Whether the control is disabled. */
180
+ readonly disabled: boolean;
181
+ /** Whether the control is in an error state. */
182
+ readonly errorState: boolean;
183
+ /**
184
+ * An optional name for the control type that can be used to distinguish `mat-form-field` elements
185
+ * based on their control type. The form field will add a class,
186
+ * `mat-form-field-type-{{controlType}}` to its root element.
187
+ */
188
+ readonly controlType?: string;
189
+ /**
190
+ * Whether the input is currently in an autofilled state. If property is not present on the
191
+ * control it is assumed to be false.
192
+ */
193
+ readonly autofilled?: boolean;
194
+ /**
195
+ * Value of `aria-describedby` that should be merged with the described-by ids
196
+ * which are set by the form-field.
197
+ */
198
+ readonly userAriaDescribedBy?: string;
199
+ /**
200
+ * Whether to automatically assign the ID of the form field as the `for` attribute
201
+ * on the `<label>` inside the form field. Set this to true to prevent the form
202
+ * field from associating the label with non-native elements.
203
+ */
204
+ readonly disableAutomaticLabeling?: boolean;
205
+ /** Sets the list of element IDs that currently describe this control. */
206
+ abstract setDescribedByIds(ids: string[]): void;
207
+ /** Handles a click on the control's container. */
208
+ abstract onContainerClick(event: MouseEvent): void;
209
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatFormFieldControl$1<any>, never>;
210
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatFormFieldControl$1<any>, never, never, {}, {}, never, never, true, never>;
79
211
  }
80
212
 
213
+ /** Type for the available floatLabel values. */
214
+ type FloatLabelType = 'always' | 'auto';
215
+ /** Possible appearance styles for the form field. */
216
+ type MatFormFieldAppearance = 'fill' | 'outline';
217
+ /** Behaviors for how the subscript height is set. */
218
+ type SubscriptSizing = 'fixed' | 'dynamic';
81
219
  /**
82
- * Injection token that can be used to reference instances of `MatError`. It serves as
83
- * alternative token to the actual `MatError` class which could cause unnecessary
84
- * retention of the class and its directive metadata.
220
+ * Represents the default options for the form field that can be configured
221
+ * using the `MAT_FORM_FIELD_DEFAULT_OPTIONS` injection token.
85
222
  */
86
- export declare const MAT_ERROR: InjectionToken<MatError>;
87
-
223
+ interface MatFormFieldDefaultOptions {
224
+ /** Default form field appearance style. */
225
+ appearance?: MatFormFieldAppearance;
226
+ /**
227
+ * Default theme color of the form field. This API is supported in M2 themes only, it has no
228
+ * effect in M3 themes. For color customization in M3, see https://material.angular.io/components/form-field/styling.
229
+ *
230
+ * For information on applying color variants in M3, see
231
+ * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
232
+ */
233
+ color?: ThemePalette;
234
+ /** Whether the required marker should be hidden by default. */
235
+ hideRequiredMarker?: boolean;
236
+ /**
237
+ * Whether the label for form fields should by default float `always`,
238
+ * `never`, or `auto` (only when necessary).
239
+ */
240
+ floatLabel?: FloatLabelType;
241
+ /** Whether the form field should reserve space for one line by default. */
242
+ subscriptSizing?: SubscriptSizing;
243
+ }
88
244
  /**
89
245
  * Injection token that can be used to inject an instances of `MatFormField`. It serves
90
246
  * as alternative token to the actual `MatFormField` class which would cause unnecessary
91
247
  * retention of the `MatFormField` class and its component metadata.
92
248
  */
93
- export declare const MAT_FORM_FIELD: InjectionToken<MatFormField>;
94
-
249
+ declare const MAT_FORM_FIELD: InjectionToken<MatFormField>;
95
250
  /**
96
251
  * Injection token that can be used to configure the
97
252
  * default options for all form field within an app.
98
253
  */
99
- export declare const MAT_FORM_FIELD_DEFAULT_OPTIONS: InjectionToken<MatFormFieldDefaultOptions>;
100
-
101
- /**
102
- * Injection token that can be used to reference instances of `MatPrefix`. It serves as
103
- * alternative token to the actual `MatPrefix` class which could cause unnecessary
104
- * retention of the class and its directive metadata.
105
- */
106
- export declare const MAT_PREFIX: InjectionToken<MatPrefix>;
107
-
254
+ declare const MAT_FORM_FIELD_DEFAULT_OPTIONS: InjectionToken<MatFormFieldDefaultOptions>;
108
255
  /**
109
- * Injection token that can be used to reference instances of `MatSuffix`. It serves as
110
- * alternative token to the actual `MatSuffix` class which could cause unnecessary
111
- * retention of the class and its directive metadata.
256
+ * Despite `MatFormFieldControl` being an abstract class, most of our usages enforce its shape
257
+ * using `implements` instead of `extends`. This appears to be problematic when Closure compiler
258
+ * is configured to use type information to rename properties, because it can't figure out which
259
+ * class properties are coming from. This interface seems to work around the issue while preserving
260
+ * our type safety (alternative being using `any` everywhere).
261
+ * @docs-private
112
262
  */
113
- export declare const MAT_SUFFIX: InjectionToken<MatSuffix>;
114
-
115
- /** Single error message to be shown underneath the form-field. */
116
- export declare class MatError {
117
- id: string;
118
- constructor(...args: unknown[]);
119
- static ɵfac: i0.ɵɵFactoryDeclaration<MatError, never>;
120
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatError, "mat-error, [matError]", never, { "id": { "alias": "id"; "required": false; }; }, {}, never, never, true, never>;
263
+ interface MatFormFieldControl<T> extends MatFormFieldControl$1<T> {
121
264
  }
122
-
123
265
  /** Container for form controls that applies Material Design styling and behavior. */
124
- export declare class MatFormField implements FloatingLabelParent, AfterContentInit, AfterContentChecked, AfterViewInit, OnDestroy {
266
+ declare class MatFormField implements FloatingLabelParent, AfterContentInit, AfterContentChecked, AfterViewInit, OnDestroy {
125
267
  _elementRef: ElementRef<any>;
126
268
  private _changeDetectorRef;
127
269
  private _dir;
@@ -138,7 +280,7 @@ export declare class MatFormField implements FloatingLabelParent, AfterContentIn
138
280
  _floatingLabel: MatFormFieldFloatingLabel | undefined;
139
281
  _notchedOutline: MatFormFieldNotchedOutline | undefined;
140
282
  _lineRipple: MatFormFieldLineRipple | undefined;
141
- _formFieldControl: MatFormFieldControl_2<any>;
283
+ _formFieldControl: MatFormFieldControl<any>;
142
284
  _prefixChildren: QueryList<MatPrefix>;
143
285
  _suffixChildren: QueryList<MatSuffix>;
144
286
  _errorChildren: QueryList<MatError>;
@@ -183,8 +325,8 @@ export declare class MatFormField implements FloatingLabelParent, AfterContentIn
183
325
  readonly _labelId: string;
184
326
  readonly _hintLabelId: string;
185
327
  /** Gets the current form field control */
186
- get _control(): MatFormFieldControl_2<any>;
187
- set _control(value: MatFormFieldControl_2<any>);
328
+ get _control(): MatFormFieldControl<any>;
329
+ set _control(value: MatFormFieldControl<any>);
188
330
  private _destroyed;
189
331
  private _isFocused;
190
332
  private _explicitFormFieldControl;
@@ -203,7 +345,7 @@ export declare class MatFormField implements FloatingLabelParent, AfterContentIn
203
345
  /**
204
346
  * Gets the id of the label element. If no label is present, returns `null`.
205
347
  */
206
- getLabelId: Signal<string | null>;
348
+ getLabelId: i0.Signal<string | null>;
207
349
  /**
208
350
  * Gets an ElementRef for the element that a overlay attached to the form field
209
351
  * should be positioned relative to.
@@ -244,7 +386,7 @@ export declare class MatFormField implements FloatingLabelParent, AfterContentIn
244
386
  * the label is part of the infix, the label cannot overflow the prefix content.
245
387
  */
246
388
  _forceDisplayInfixLabel(): boolean | 0;
247
- _hasFloatingLabel: Signal<boolean>;
389
+ _hasFloatingLabel: i0.Signal<boolean>;
248
390
  _shouldLabelFloat(): boolean;
249
391
  /**
250
392
  * Determines whether a class from the AbstractControlDirective
@@ -287,236 +429,27 @@ export declare class MatFormField implements FloatingLabelParent, AfterContentIn
287
429
  static ɵcmp: i0.ɵɵComponentDeclaration<MatFormField, "mat-form-field", ["matFormField"], { "hideRequiredMarker": { "alias": "hideRequiredMarker"; "required": false; }; "color": { "alias": "color"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; "hintLabel": { "alias": "hintLabel"; "required": false; }; }, {}, ["_labelChild", "_formFieldControl", "_prefixChildren", "_suffixChildren", "_errorChildren", "_hintChildren"], ["mat-label", "[matPrefix], [matIconPrefix]", "[matTextPrefix]", "*", "[matTextSuffix]", "[matSuffix], [matIconSuffix]", "mat-error, [matError]", "mat-hint:not([align='end'])", "mat-hint[align='end']"], true, never>;
288
430
  }
289
431
 
432
+ declare class MatFormFieldModule {
433
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatFormFieldModule, never>;
434
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatFormFieldModule, never, [typeof i1.MatCommonModule, typeof i2.ObserversModule, typeof MatFormField, typeof MatLabel, typeof MatError, typeof MatHint, typeof MatPrefix, typeof MatSuffix], [typeof MatFormField, typeof MatLabel, typeof MatHint, typeof MatError, typeof MatPrefix, typeof MatSuffix, typeof i1.MatCommonModule]>;
435
+ static ɵinj: i0.ɵɵInjectorDeclaration<MatFormFieldModule>;
436
+ }
437
+
438
+ /** @docs-private */
439
+ declare function getMatFormFieldPlaceholderConflictError(): Error;
440
+ /** @docs-private */
441
+ declare function getMatFormFieldDuplicatedHintError(align: string): Error;
442
+ /** @docs-private */
443
+ declare function getMatFormFieldMissingControlError(): Error;
444
+
290
445
  /**
291
446
  * Animations used by the MatFormField.
292
447
  * @docs-private
293
448
  * @deprecated No longer used, will be removed.
294
449
  * @breaking-change 21.0.0
295
450
  */
296
- export declare const matFormFieldAnimations: {
451
+ declare const matFormFieldAnimations: {
297
452
  readonly transitionMessages: any;
298
453
  };
299
454
 
300
- /** Possible appearance styles for the form field. */
301
- export declare type MatFormFieldAppearance = 'fill' | 'outline';
302
-
303
- /** An interface which allows a control to work inside of a `MatFormField`. */
304
- export declare abstract class MatFormFieldControl<T> {
305
- /** The value of the control. */
306
- value: T | null;
307
- /**
308
- * Stream that emits whenever the state of the control changes such that the parent `MatFormField`
309
- * needs to run change detection.
310
- */
311
- readonly stateChanges: Observable<void>;
312
- /** The element ID for this control. */
313
- readonly id: string;
314
- /** The placeholder for this control. */
315
- readonly placeholder: string;
316
- /** Gets the AbstractControlDirective for this control. */
317
- readonly ngControl: NgControl | AbstractControlDirective | null;
318
- /** Whether the control is focused. */
319
- readonly focused: boolean;
320
- /** Whether the control is empty. */
321
- readonly empty: boolean;
322
- /** Whether the `MatFormField` label should try to float. */
323
- readonly shouldLabelFloat: boolean;
324
- /** Whether the control is required. */
325
- readonly required: boolean;
326
- /** Whether the control is disabled. */
327
- readonly disabled: boolean;
328
- /** Whether the control is in an error state. */
329
- readonly errorState: boolean;
330
- /**
331
- * An optional name for the control type that can be used to distinguish `mat-form-field` elements
332
- * based on their control type. The form field will add a class,
333
- * `mat-form-field-type-{{controlType}}` to its root element.
334
- */
335
- readonly controlType?: string;
336
- /**
337
- * Whether the input is currently in an autofilled state. If property is not present on the
338
- * control it is assumed to be false.
339
- */
340
- readonly autofilled?: boolean;
341
- /**
342
- * Value of `aria-describedby` that should be merged with the described-by ids
343
- * which are set by the form-field.
344
- */
345
- readonly userAriaDescribedBy?: string;
346
- /**
347
- * Whether to automatically assign the ID of the form field as the `for` attribute
348
- * on the `<label>` inside the form field. Set this to true to prevent the form
349
- * field from associating the label with non-native elements.
350
- */
351
- readonly disableAutomaticLabeling?: boolean;
352
- /** Sets the list of element IDs that currently describe this control. */
353
- abstract setDescribedByIds(ids: string[]): void;
354
- /** Handles a click on the control's container. */
355
- abstract onContainerClick(event: MouseEvent): void;
356
- static ɵfac: i0.ɵɵFactoryDeclaration<MatFormFieldControl<any>, never>;
357
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatFormFieldControl<any>, never, never, {}, {}, never, never, true, never>;
358
- }
359
-
360
- /**
361
- * Despite `MatFormFieldControl` being an abstract class, most of our usages enforce its shape
362
- * using `implements` instead of `extends`. This appears to be problematic when Closure compiler
363
- * is configured to use type information to rename properties, because it can't figure out which
364
- * class properties are coming from. This interface seems to work around the issue while preserving
365
- * our type safety (alternative being using `any` everywhere).
366
- * @docs-private
367
- */
368
- declare interface MatFormFieldControl_2<T> extends MatFormFieldControl<T> {
369
- }
370
-
371
- /**
372
- * Represents the default options for the form field that can be configured
373
- * using the `MAT_FORM_FIELD_DEFAULT_OPTIONS` injection token.
374
- */
375
- export declare interface MatFormFieldDefaultOptions {
376
- /** Default form field appearance style. */
377
- appearance?: MatFormFieldAppearance;
378
- /**
379
- * Default theme color of the form field. This API is supported in M2 themes only, it has no
380
- * effect in M3 themes. For color customization in M3, see https://material.angular.io/components/form-field/styling.
381
- *
382
- * For information on applying color variants in M3, see
383
- * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
384
- */
385
- color?: ThemePalette;
386
- /** Whether the required marker should be hidden by default. */
387
- hideRequiredMarker?: boolean;
388
- /**
389
- * Whether the label for form fields should by default float `always`,
390
- * `never`, or `auto` (only when necessary).
391
- */
392
- floatLabel?: FloatLabelType;
393
- /** Whether the form field should reserve space for one line by default. */
394
- subscriptSizing?: SubscriptSizing;
395
- }
396
-
397
- /**
398
- * Internal directive that maintains a MDC floating label. This directive does not
399
- * use the `MDCFloatingLabelFoundation` class, as it is not worth the size cost of
400
- * including it just to measure the label width and toggle some classes.
401
- *
402
- * The use of a directive allows us to conditionally render a floating label in the
403
- * template without having to manually manage instantiation and destruction of the
404
- * floating label component based on.
405
- *
406
- * The component is responsible for setting up the floating label styles, measuring label
407
- * width for the outline notch, and providing inputs that can be used to toggle the
408
- * label's floating or required state.
409
- */
410
- declare class MatFormFieldFloatingLabel implements OnDestroy {
411
- private _elementRef;
412
- /** Whether the label is floating. */
413
- get floating(): boolean;
414
- set floating(value: boolean);
415
- private _floating;
416
- /** Whether to monitor for resize events on the floating label. */
417
- get monitorResize(): boolean;
418
- set monitorResize(value: boolean);
419
- private _monitorResize;
420
- /** The shared ResizeObserver. */
421
- private _resizeObserver;
422
- /** The Angular zone. */
423
- private _ngZone;
424
- /** The parent form-field. */
425
- private _parent;
426
- /** The current resize event subscription. */
427
- private _resizeSubscription;
428
- constructor(...args: unknown[]);
429
- ngOnDestroy(): void;
430
- /** Gets the width of the label. Used for the outline notch. */
431
- getWidth(): number;
432
- /** Gets the HTML element for the floating label. */
433
- get element(): HTMLElement;
434
- /** Handles resize events from the ResizeObserver. */
435
- private _handleResize;
436
- /** Subscribes to resize events. */
437
- private _subscribeToResize;
438
- static ɵfac: i0.ɵɵFactoryDeclaration<MatFormFieldFloatingLabel, never>;
439
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatFormFieldFloatingLabel, "label[matFormFieldFloatingLabel]", never, { "floating": { "alias": "floating"; "required": false; }; "monitorResize": { "alias": "monitorResize"; "required": false; }; }, {}, never, never, true, never>;
440
- }
441
-
442
- /**
443
- * Internal directive that creates an instance of the MDC line-ripple component. Using a
444
- * directive allows us to conditionally render a line-ripple in the template without having
445
- * to manually create and destroy the `MDCLineRipple` component whenever the condition changes.
446
- *
447
- * The directive sets up the styles for the line-ripple and provides an API for activating
448
- * and deactivating the line-ripple.
449
- */
450
- declare class MatFormFieldLineRipple implements OnDestroy {
451
- private _elementRef;
452
- private _cleanupTransitionEnd;
453
- constructor(...args: unknown[]);
454
- activate(): void;
455
- deactivate(): void;
456
- private _handleTransitionEnd;
457
- ngOnDestroy(): void;
458
- static ɵfac: i0.ɵɵFactoryDeclaration<MatFormFieldLineRipple, never>;
459
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatFormFieldLineRipple, "div[matFormFieldLineRipple]", never, {}, {}, never, never, true, never>;
460
- }
461
-
462
- export declare class MatFormFieldModule {
463
- static ɵfac: i0.ɵɵFactoryDeclaration<MatFormFieldModule, never>;
464
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatFormFieldModule, never, [typeof i1.MatCommonModule, typeof i2.ObserversModule, typeof i3.MatFormField, typeof i4.MatLabel, typeof i5.MatError, typeof i6.MatHint, typeof i7.MatPrefix, typeof i8.MatSuffix], [typeof i3.MatFormField, typeof i4.MatLabel, typeof i6.MatHint, typeof i5.MatError, typeof i7.MatPrefix, typeof i8.MatSuffix, typeof i1.MatCommonModule]>;
465
- static ɵinj: i0.ɵɵInjectorDeclaration<MatFormFieldModule>;
466
- }
467
-
468
- /**
469
- * Internal component that creates an instance of the MDC notched-outline component.
470
- *
471
- * The component sets up the HTML structure and styles for the notched-outline. It provides
472
- * inputs to toggle the notch state and width.
473
- */
474
- declare class MatFormFieldNotchedOutline implements AfterViewInit {
475
- private _elementRef;
476
- private _ngZone;
477
- /** Whether the notch should be opened. */
478
- open: boolean;
479
- _notch: ElementRef;
480
- constructor(...args: unknown[]);
481
- ngAfterViewInit(): void;
482
- _setNotchWidth(labelWidth: number): void;
483
- static ɵfac: i0.ɵɵFactoryDeclaration<MatFormFieldNotchedOutline, never>;
484
- static ɵcmp: i0.ɵɵComponentDeclaration<MatFormFieldNotchedOutline, "div[matFormFieldNotchedOutline]", never, { "open": { "alias": "matFormFieldNotchedOutlineOpen"; "required": false; }; }, {}, never, ["*"], true, never>;
485
- }
486
-
487
- /** Hint text to be shown underneath the form field control. */
488
- export declare class MatHint {
489
- /** Whether to align the hint label at the start or end of the line. */
490
- align: 'start' | 'end';
491
- /** Unique ID for the hint. Used for the aria-describedby on the form field control. */
492
- id: string;
493
- static ɵfac: i0.ɵɵFactoryDeclaration<MatHint, never>;
494
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatHint, "mat-hint", never, { "align": { "alias": "align"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, never, true, never>;
495
- }
496
-
497
- /** The floating label for a `mat-form-field`. */
498
- export declare class MatLabel {
499
- static ɵfac: i0.ɵɵFactoryDeclaration<MatLabel, never>;
500
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatLabel, "mat-label", never, {}, {}, never, never, true, never>;
501
- }
502
-
503
- /** Prefix to be placed in front of the form field. */
504
- export declare class MatPrefix {
505
- set _isTextSelector(value: '');
506
- _isText: boolean;
507
- static ɵfac: i0.ɵɵFactoryDeclaration<MatPrefix, never>;
508
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatPrefix, "[matPrefix], [matIconPrefix], [matTextPrefix]", never, { "_isTextSelector": { "alias": "matTextPrefix"; "required": false; }; }, {}, never, never, true, never>;
509
- }
510
-
511
- /** Suffix to be placed at the end of the form field. */
512
- export declare class MatSuffix {
513
- set _isTextSelector(value: '');
514
- _isText: boolean;
515
- static ɵfac: i0.ɵɵFactoryDeclaration<MatSuffix, never>;
516
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatSuffix, "[matSuffix], [matIconSuffix], [matTextSuffix]", never, { "_isTextSelector": { "alias": "matTextSuffix"; "required": false; }; }, {}, never, never, true, never>;
517
- }
518
-
519
- /** Behaviors for how the subscript height is set. */
520
- export declare type SubscriptSizing = 'fixed' | 'dynamic';
521
-
522
- export { }
455
+ export { type FloatLabelType, MAT_ERROR, MAT_FORM_FIELD, MAT_FORM_FIELD_DEFAULT_OPTIONS, MAT_PREFIX, MAT_SUFFIX, MatError, MatFormField, type MatFormFieldAppearance, MatFormFieldControl$1 as MatFormFieldControl, type MatFormFieldDefaultOptions, MatFormFieldModule, MatHint, MatLabel, MatPrefix, MatSuffix, type SubscriptSizing, getMatFormFieldDuplicatedHintError, getMatFormFieldMissingControlError, getMatFormFieldPlaceholderConflictError, matFormFieldAnimations };
@@ -4,7 +4,7 @@ import { ComponentHarness } from '@angular/cdk/testing';
4
4
  * Base class for custom form-field control harnesses. Harnesses for
5
5
  * custom controls with form-fields need to implement this interface.
6
6
  */
7
- export declare abstract class MatFormFieldControlHarness extends ComponentHarness {
7
+ declare abstract class MatFormFieldControlHarness extends ComponentHarness {
8
8
  }
9
9
 
10
- export { }
10
+ export { MatFormFieldControlHarness };