@angular/material 21.0.0-next.9 → 21.0.0-rc.0

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 (202) hide show
  1. package/core/tokens/_classes.scss +1 -1
  2. package/core/tokens/m2/_md-sys-color.scss +17 -17
  3. package/fesm2022/_animation-chunk.mjs +10 -16
  4. package/fesm2022/_animation-chunk.mjs.map +1 -1
  5. package/fesm2022/_date-formats-chunk.mjs +68 -164
  6. package/fesm2022/_date-formats-chunk.mjs.map +1 -1
  7. package/fesm2022/_date-range-input-harness-chunk.mjs +284 -463
  8. package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -1
  9. package/fesm2022/_error-options-chunk.mjs +56 -19
  10. package/fesm2022/_error-options-chunk.mjs.map +1 -1
  11. package/fesm2022/_error-state-chunk.mjs +24 -31
  12. package/fesm2022/_error-state-chunk.mjs.map +1 -1
  13. package/fesm2022/_form-field-chunk.mjs +1224 -1017
  14. package/fesm2022/_form-field-chunk.mjs.map +1 -1
  15. package/fesm2022/_icon-button-chunk.mjs +243 -187
  16. package/fesm2022/_icon-button-chunk.mjs.map +1 -1
  17. package/fesm2022/_icon-registry-chunk.mjs +350 -575
  18. package/fesm2022/_icon-registry-chunk.mjs.map +1 -1
  19. package/fesm2022/_input-harness-chunk.mjs +56 -107
  20. package/fesm2022/_input-harness-chunk.mjs.map +1 -1
  21. package/fesm2022/_input-value-accessor-chunk.mjs +0 -6
  22. package/fesm2022/_input-value-accessor-chunk.mjs.map +1 -1
  23. package/fesm2022/_internal-form-field-chunk.mjs +59 -19
  24. package/fesm2022/_internal-form-field-chunk.mjs.map +1 -1
  25. package/fesm2022/_line-chunk.mjs +83 -43
  26. package/fesm2022/_line-chunk.mjs.map +1 -1
  27. package/fesm2022/_option-chunk.mjs +348 -311
  28. package/fesm2022/_option-chunk.mjs.map +1 -1
  29. package/fesm2022/_option-harness-chunk.mjs +23 -39
  30. package/fesm2022/_option-harness-chunk.mjs.map +1 -1
  31. package/fesm2022/_option-module-chunk.mjs +36 -10
  32. package/fesm2022/_option-module-chunk.mjs.map +1 -1
  33. package/fesm2022/_pseudo-checkbox-chunk.mjs +79 -44
  34. package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -1
  35. package/fesm2022/_pseudo-checkbox-module-chunk.mjs +36 -10
  36. package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -1
  37. package/fesm2022/_public-api-chunk.mjs +71 -134
  38. package/fesm2022/_public-api-chunk.mjs.map +1 -1
  39. package/fesm2022/_ripple-chunk.mjs +504 -600
  40. package/fesm2022/_ripple-chunk.mjs.map +1 -1
  41. package/fesm2022/_ripple-loader-chunk.mjs +120 -138
  42. package/fesm2022/_ripple-loader-chunk.mjs.map +1 -1
  43. package/fesm2022/_ripple-module-chunk.mjs +36 -10
  44. package/fesm2022/_ripple-module-chunk.mjs.map +1 -1
  45. package/fesm2022/_structural-styles-chunk.mjs +37 -10
  46. package/fesm2022/_structural-styles-chunk.mjs.map +1 -1
  47. package/fesm2022/_tooltip-chunk.mjs +810 -888
  48. package/fesm2022/_tooltip-chunk.mjs.map +1 -1
  49. package/fesm2022/autocomplete-testing.mjs +62 -86
  50. package/fesm2022/autocomplete-testing.mjs.map +1 -1
  51. package/fesm2022/autocomplete.mjs +965 -1126
  52. package/fesm2022/autocomplete.mjs.map +1 -1
  53. package/fesm2022/badge-testing.mjs +38 -54
  54. package/fesm2022/badge-testing.mjs.map +1 -1
  55. package/fesm2022/badge.mjs +321 -272
  56. package/fesm2022/badge.mjs.map +1 -1
  57. package/fesm2022/bottom-sheet-testing.mjs +10 -24
  58. package/fesm2022/bottom-sheet-testing.mjs.map +1 -1
  59. package/fesm2022/bottom-sheet.mjs +349 -344
  60. package/fesm2022/bottom-sheet.mjs.map +1 -1
  61. package/fesm2022/button-testing.mjs +60 -94
  62. package/fesm2022/button-testing.mjs.map +1 -1
  63. package/fesm2022/button-toggle-testing.mjs +76 -125
  64. package/fesm2022/button-toggle-testing.mjs.map +1 -1
  65. package/fesm2022/button-toggle.mjs +752 -662
  66. package/fesm2022/button-toggle.mjs.map +1 -1
  67. package/fesm2022/button.mjs +263 -158
  68. package/fesm2022/button.mjs.map +1 -1
  69. package/fesm2022/card-testing.mjs +19 -33
  70. package/fesm2022/card-testing.mjs.map +1 -1
  71. package/fesm2022/card.mjs +576 -272
  72. package/fesm2022/card.mjs.map +1 -1
  73. package/fesm2022/checkbox-testing.mjs +71 -123
  74. package/fesm2022/checkbox-testing.mjs.map +1 -1
  75. package/fesm2022/checkbox.mjs +515 -477
  76. package/fesm2022/checkbox.mjs.map +1 -1
  77. package/fesm2022/chips-testing.mjs +201 -344
  78. package/fesm2022/chips-testing.mjs.map +1 -1
  79. package/fesm2022/chips.mjs +2552 -2289
  80. package/fesm2022/chips.mjs.map +1 -1
  81. package/fesm2022/core-testing.mjs +14 -28
  82. package/fesm2022/core-testing.mjs.map +1 -1
  83. package/fesm2022/core.mjs +357 -328
  84. package/fesm2022/core.mjs.map +1 -1
  85. package/fesm2022/datepicker-testing.mjs +15 -25
  86. package/fesm2022/datepicker-testing.mjs.map +1 -1
  87. package/fesm2022/datepicker.mjs +4826 -4563
  88. package/fesm2022/datepicker.mjs.map +1 -1
  89. package/fesm2022/dialog-testing.mjs +93 -129
  90. package/fesm2022/dialog-testing.mjs.map +1 -1
  91. package/fesm2022/dialog.mjs +810 -829
  92. package/fesm2022/dialog.mjs.map +1 -1
  93. package/fesm2022/divider-testing.mjs +10 -11
  94. package/fesm2022/divider-testing.mjs.map +1 -1
  95. package/fesm2022/divider.mjs +119 -43
  96. package/fesm2022/divider.mjs.map +1 -1
  97. package/fesm2022/expansion-testing.mjs +74 -130
  98. package/fesm2022/expansion-testing.mjs.map +1 -1
  99. package/fesm2022/expansion.mjs +703 -515
  100. package/fesm2022/expansion.mjs.map +1 -1
  101. package/fesm2022/form-field-testing-control.mjs +16 -33
  102. package/fesm2022/form-field-testing-control.mjs.map +1 -1
  103. package/fesm2022/form-field-testing.mjs +118 -179
  104. package/fesm2022/form-field-testing.mjs.map +1 -1
  105. package/fesm2022/form-field.mjs +36 -10
  106. package/fesm2022/form-field.mjs.map +1 -1
  107. package/fesm2022/grid-list-testing.mjs +65 -113
  108. package/fesm2022/grid-list-testing.mjs.map +1 -1
  109. package/fesm2022/grid-list.mjs +559 -494
  110. package/fesm2022/grid-list.mjs.map +1 -1
  111. package/fesm2022/icon-testing.mjs +148 -127
  112. package/fesm2022/icon-testing.mjs.map +1 -1
  113. package/fesm2022/icon.mjs +325 -351
  114. package/fesm2022/icon.mjs.map +1 -1
  115. package/fesm2022/input-testing.mjs +59 -99
  116. package/fesm2022/input-testing.mjs.map +1 -1
  117. package/fesm2022/input.mjs +457 -520
  118. package/fesm2022/input.mjs.map +1 -1
  119. package/fesm2022/list-testing.mjs +251 -434
  120. package/fesm2022/list-testing.mjs.map +1 -1
  121. package/fesm2022/list.mjs +1522 -1204
  122. package/fesm2022/list.mjs.map +1 -1
  123. package/fesm2022/material.mjs +0 -5
  124. package/fesm2022/material.mjs.map +1 -1
  125. package/fesm2022/menu-testing.mjs +159 -228
  126. package/fesm2022/menu-testing.mjs.map +1 -1
  127. package/fesm2022/menu.mjs +1338 -1343
  128. package/fesm2022/menu.mjs.map +1 -1
  129. package/fesm2022/paginator-testing.mjs +55 -79
  130. package/fesm2022/paginator-testing.mjs.map +1 -1
  131. package/fesm2022/paginator.mjs +381 -309
  132. package/fesm2022/paginator.mjs.map +1 -1
  133. package/fesm2022/progress-bar-testing.mjs +12 -21
  134. package/fesm2022/progress-bar-testing.mjs.map +1 -1
  135. package/fesm2022/progress-bar.mjs +224 -169
  136. package/fesm2022/progress-bar.mjs.map +1 -1
  137. package/fesm2022/progress-spinner-testing.mjs +13 -23
  138. package/fesm2022/progress-spinner-testing.mjs.map +1 -1
  139. package/fesm2022/progress-spinner.mjs +235 -160
  140. package/fesm2022/progress-spinner.mjs.map +1 -1
  141. package/fesm2022/radio-testing.mjs +133 -208
  142. package/fesm2022/radio-testing.mjs.map +1 -1
  143. package/fesm2022/radio.mjs +712 -679
  144. package/fesm2022/radio.mjs.map +1 -1
  145. package/fesm2022/select-testing.mjs +83 -117
  146. package/fesm2022/select-testing.mjs.map +1 -1
  147. package/fesm2022/select.mjs +1116 -1246
  148. package/fesm2022/select.mjs.map +1 -1
  149. package/fesm2022/sidenav-testing.mjs +54 -120
  150. package/fesm2022/sidenav-testing.mjs.map +1 -1
  151. package/fesm2022/sidenav.mjs +1078 -995
  152. package/fesm2022/sidenav.mjs.map +1 -1
  153. package/fesm2022/slide-toggle-testing.mjs +57 -92
  154. package/fesm2022/slide-toggle-testing.mjs.map +1 -1
  155. package/fesm2022/slide-toggle.mjs +369 -279
  156. package/fesm2022/slide-toggle.mjs.map +1 -1
  157. package/fesm2022/slider-testing.mjs +90 -138
  158. package/fesm2022/slider-testing.mjs.map +1 -1
  159. package/fesm2022/slider.mjs +1651 -1716
  160. package/fesm2022/slider.mjs.map +1 -1
  161. package/fesm2022/snack-bar-testing.mjs +40 -87
  162. package/fesm2022/snack-bar-testing.mjs.map +1 -1
  163. package/fesm2022/snack-bar.mjs +763 -714
  164. package/fesm2022/snack-bar.mjs.map +1 -1
  165. package/fesm2022/sort-testing.mjs +45 -66
  166. package/fesm2022/sort-testing.mjs.map +1 -1
  167. package/fesm2022/sort.mjs +419 -344
  168. package/fesm2022/sort.mjs.map +1 -1
  169. package/fesm2022/stepper-testing.mjs +78 -154
  170. package/fesm2022/stepper-testing.mjs.map +1 -1
  171. package/fesm2022/stepper.mjs +790 -498
  172. package/fesm2022/stepper.mjs.map +1 -1
  173. package/fesm2022/table-testing.mjs +120 -213
  174. package/fesm2022/table-testing.mjs.map +1 -1
  175. package/fesm2022/table.mjs +1026 -684
  176. package/fesm2022/table.mjs.map +1 -1
  177. package/fesm2022/tabs-testing.mjs +125 -197
  178. package/fesm2022/tabs-testing.mjs.map +1 -1
  179. package/fesm2022/tabs.mjs +2351 -2028
  180. package/fesm2022/tabs.mjs.map +1 -1
  181. package/fesm2022/timepicker-testing.mjs +113 -172
  182. package/fesm2022/timepicker-testing.mjs.map +1 -1
  183. package/fesm2022/timepicker.mjs +1019 -826
  184. package/fesm2022/timepicker.mjs.map +1 -1
  185. package/fesm2022/toolbar-testing.mjs +16 -27
  186. package/fesm2022/toolbar-testing.mjs.map +1 -1
  187. package/fesm2022/toolbar.mjs +163 -78
  188. package/fesm2022/toolbar.mjs.map +1 -1
  189. package/fesm2022/tooltip-testing.mjs +41 -52
  190. package/fesm2022/tooltip-testing.mjs.map +1 -1
  191. package/fesm2022/tooltip.mjs +36 -10
  192. package/fesm2022/tooltip.mjs.map +1 -1
  193. package/fesm2022/tree-testing.mjs +86 -162
  194. package/fesm2022/tree-testing.mjs.map +1 -1
  195. package/fesm2022/tree.mjs +638 -466
  196. package/fesm2022/tree.mjs.map +1 -1
  197. package/package.json +2 -2
  198. package/schematics/ng-add/index.js +1 -1
  199. package/types/expansion.d.ts +4 -2
  200. package/types/menu-testing.d.ts +2 -0
  201. package/types/select.d.ts +1 -1
  202. package/types/timepicker.d.ts +1 -0
@@ -15,685 +15,775 @@ import '@angular/cdk/platform';
15
15
  import '@angular/cdk/coercion';
16
16
  import '@angular/cdk/layout';
17
17
 
18
- /**
19
- * Injection token that can be used to configure the
20
- * default options for all button toggles within an app.
21
- */
22
18
  const MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS = new InjectionToken('MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS', {
23
- providedIn: 'root',
24
- factory: () => ({
25
- hideSingleSelectionIndicator: false,
26
- hideMultipleSelectionIndicator: false,
27
- disabledInteractive: false,
28
- }),
19
+ providedIn: 'root',
20
+ factory: () => ({
21
+ hideSingleSelectionIndicator: false,
22
+ hideMultipleSelectionIndicator: false,
23
+ disabledInteractive: false
24
+ })
29
25
  });
30
- /**
31
- * Injection token that can be used to reference instances of `MatButtonToggleGroup`.
32
- * It serves as alternative token to the actual `MatButtonToggleGroup` class which
33
- * could cause unnecessary retention of the class and its component metadata.
34
- */
35
26
  const MAT_BUTTON_TOGGLE_GROUP = new InjectionToken('MatButtonToggleGroup');
36
- /**
37
- * Provider Expression that allows mat-button-toggle-group to register as a ControlValueAccessor.
38
- * This allows it to support [(ngModel)].
39
- * @docs-private
40
- */
41
27
  const MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR = {
42
- provide: NG_VALUE_ACCESSOR,
43
- useExisting: forwardRef(() => MatButtonToggleGroup),
44
- multi: true,
28
+ provide: NG_VALUE_ACCESSOR,
29
+ useExisting: forwardRef(() => MatButtonToggleGroup),
30
+ multi: true
45
31
  };
46
- /** Change event object emitted by button toggle. */
47
32
  class MatButtonToggleChange {
48
- source;
49
- value;
50
- constructor(
51
- /** The button toggle that emits the event. */
52
- source,
53
- /** The value assigned to the button toggle. */
54
- value) {
55
- this.source = source;
56
- this.value = value;
57
- }
33
+ source;
34
+ value;
35
+ constructor(source, value) {
36
+ this.source = source;
37
+ this.value = value;
38
+ }
58
39
  }
59
- /** Exclusive selection button toggle group that behaves like a radio-button group. */
60
40
  class MatButtonToggleGroup {
61
- _changeDetector = inject(ChangeDetectorRef);
62
- _dir = inject(Directionality, { optional: true });
63
- _multiple = false;
64
- _disabled = false;
65
- _disabledInteractive = false;
66
- _selectionModel;
67
- /**
68
- * Reference to the raw value that the consumer tried to assign. The real
69
- * value will exclude any values from this one that don't correspond to a
70
- * toggle. Useful for the cases where the value is assigned before the toggles
71
- * have been initialized or at the same that they're being swapped out.
72
- */
73
- _rawValue;
74
- /**
75
- * The method to be called in order to update ngModel.
76
- * Now `ngModel` binding is not supported in multiple selection mode.
77
- */
78
- _controlValueAccessorChangeFn = () => { };
79
- /** onTouch function registered via registerOnTouch (ControlValueAccessor). */
80
- _onTouched = () => { };
81
- /** Child button toggle buttons. */
82
- _buttonToggles;
83
- /** The appearance for all the buttons in the group. */
84
- appearance;
85
- /** `name` attribute for the underlying `input` element. */
86
- get name() {
87
- return this._name;
88
- }
89
- set name(value) {
90
- this._name = value;
91
- this._markButtonsForCheck();
92
- }
93
- _name = inject(_IdGenerator).getId('mat-button-toggle-group-');
94
- /** Whether the toggle group is vertical. */
95
- vertical;
96
- /** Value of the toggle group. */
97
- get value() {
98
- const selected = this._selectionModel ? this._selectionModel.selected : [];
99
- if (this.multiple) {
100
- return selected.map(toggle => toggle.value);
101
- }
102
- return selected[0] ? selected[0].value : undefined;
103
- }
104
- set value(newValue) {
105
- this._setSelectionByValue(newValue);
106
- this.valueChange.emit(this.value);
107
- }
108
- /**
109
- * Event that emits whenever the value of the group changes.
110
- * Used to facilitate two-way data binding.
111
- * @docs-private
112
- */
113
- valueChange = new EventEmitter();
114
- /** Selected button toggles in the group. */
115
- get selected() {
116
- const selected = this._selectionModel ? this._selectionModel.selected : [];
117
- return this.multiple ? selected : selected[0] || null;
118
- }
119
- /** Whether multiple button toggles can be selected. */
120
- get multiple() {
121
- return this._multiple;
122
- }
123
- set multiple(value) {
124
- this._multiple = value;
125
- this._markButtonsForCheck();
126
- }
127
- /** Whether multiple button toggle group is disabled. */
128
- get disabled() {
129
- return this._disabled;
130
- }
131
- set disabled(value) {
132
- this._disabled = value;
133
- this._markButtonsForCheck();
134
- }
135
- /** Whether buttons in the group should be interactive while they're disabled. */
136
- get disabledInteractive() {
137
- return this._disabledInteractive;
138
- }
139
- set disabledInteractive(value) {
140
- this._disabledInteractive = value;
141
- this._markButtonsForCheck();
142
- }
143
- /** The layout direction of the toggle button group. */
144
- get dir() {
145
- return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
146
- }
147
- /** Event emitted when the group's value changes. */
148
- change = new EventEmitter();
149
- /** Whether checkmark indicator for single-selection button toggle groups is hidden. */
150
- get hideSingleSelectionIndicator() {
151
- return this._hideSingleSelectionIndicator;
152
- }
153
- set hideSingleSelectionIndicator(value) {
154
- this._hideSingleSelectionIndicator = value;
155
- this._markButtonsForCheck();
156
- }
157
- _hideSingleSelectionIndicator;
158
- /** Whether checkmark indicator for multiple-selection button toggle groups is hidden. */
159
- get hideMultipleSelectionIndicator() {
160
- return this._hideMultipleSelectionIndicator;
161
- }
162
- set hideMultipleSelectionIndicator(value) {
163
- this._hideMultipleSelectionIndicator = value;
164
- this._markButtonsForCheck();
165
- }
166
- _hideMultipleSelectionIndicator;
167
- constructor() {
168
- const defaultOptions = inject(MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS, { optional: true });
169
- this.appearance =
170
- defaultOptions && defaultOptions.appearance ? defaultOptions.appearance : 'standard';
171
- this.hideSingleSelectionIndicator = defaultOptions?.hideSingleSelectionIndicator ?? false;
172
- this.hideMultipleSelectionIndicator = defaultOptions?.hideMultipleSelectionIndicator ?? false;
173
- }
174
- ngOnInit() {
175
- this._selectionModel = new SelectionModel(this.multiple, undefined, false);
176
- }
177
- ngAfterContentInit() {
178
- this._selectionModel.select(...this._buttonToggles.filter(toggle => toggle.checked));
179
- if (!this.multiple) {
180
- this._initializeTabIndex();
181
- }
182
- }
183
- /**
184
- * Sets the model value. Implemented as part of ControlValueAccessor.
185
- * @param value Value to be set to the model.
186
- */
187
- writeValue(value) {
188
- this.value = value;
189
- this._changeDetector.markForCheck();
190
- }
191
- // Implemented as part of ControlValueAccessor.
192
- registerOnChange(fn) {
193
- this._controlValueAccessorChangeFn = fn;
194
- }
195
- // Implemented as part of ControlValueAccessor.
196
- registerOnTouched(fn) {
197
- this._onTouched = fn;
198
- }
199
- // Implemented as part of ControlValueAccessor.
200
- setDisabledState(isDisabled) {
201
- this.disabled = isDisabled;
202
- }
203
- /** Handle keydown event calling to single-select button toggle. */
204
- _keydown(event) {
205
- if (this.multiple || this.disabled || hasModifierKey(event)) {
206
- return;
207
- }
208
- const target = event.target;
209
- const buttonId = target.id;
210
- const index = this._buttonToggles.toArray().findIndex(toggle => {
211
- return toggle.buttonId === buttonId;
212
- });
213
- let nextButton = null;
214
- switch (event.keyCode) {
215
- case SPACE:
216
- case ENTER:
217
- nextButton = this._buttonToggles.get(index) || null;
218
- break;
219
- case UP_ARROW:
220
- nextButton = this._getNextButton(index, -1);
221
- break;
222
- case LEFT_ARROW:
223
- nextButton = this._getNextButton(index, this.dir === 'ltr' ? -1 : 1);
224
- break;
225
- case DOWN_ARROW:
226
- nextButton = this._getNextButton(index, 1);
227
- break;
228
- case RIGHT_ARROW:
229
- nextButton = this._getNextButton(index, this.dir === 'ltr' ? 1 : -1);
230
- break;
231
- default:
232
- return;
233
- }
234
- if (nextButton) {
235
- event.preventDefault();
236
- nextButton._onButtonClick();
237
- nextButton.focus();
238
- }
239
- }
240
- /** Dispatch change event with current selection and group value. */
241
- _emitChangeEvent(toggle) {
242
- const event = new MatButtonToggleChange(toggle, this.value);
243
- this._rawValue = event.value;
244
- this._controlValueAccessorChangeFn(event.value);
245
- this.change.emit(event);
246
- }
247
- /**
248
- * Syncs a button toggle's selected state with the model value.
249
- * @param toggle Toggle to be synced.
250
- * @param select Whether the toggle should be selected.
251
- * @param isUserInput Whether the change was a result of a user interaction.
252
- * @param deferEvents Whether to defer emitting the change events.
253
- */
254
- _syncButtonToggle(toggle, select, isUserInput = false, deferEvents = false) {
255
- // Deselect the currently-selected toggle, if we're in single-selection
256
- // mode and the button being toggled isn't selected at the moment.
257
- if (!this.multiple && this.selected && !toggle.checked) {
258
- this.selected.checked = false;
259
- }
260
- if (this._selectionModel) {
261
- if (select) {
262
- this._selectionModel.select(toggle);
263
- }
264
- else {
265
- this._selectionModel.deselect(toggle);
266
- }
41
+ _changeDetector = inject(ChangeDetectorRef);
42
+ _dir = inject(Directionality, {
43
+ optional: true
44
+ });
45
+ _multiple = false;
46
+ _disabled = false;
47
+ _disabledInteractive = false;
48
+ _selectionModel;
49
+ _rawValue;
50
+ _controlValueAccessorChangeFn = () => {};
51
+ _onTouched = () => {};
52
+ _buttonToggles;
53
+ appearance;
54
+ get name() {
55
+ return this._name;
56
+ }
57
+ set name(value) {
58
+ this._name = value;
59
+ this._markButtonsForCheck();
60
+ }
61
+ _name = inject(_IdGenerator).getId('mat-button-toggle-group-');
62
+ vertical;
63
+ get value() {
64
+ const selected = this._selectionModel ? this._selectionModel.selected : [];
65
+ if (this.multiple) {
66
+ return selected.map(toggle => toggle.value);
67
+ }
68
+ return selected[0] ? selected[0].value : undefined;
69
+ }
70
+ set value(newValue) {
71
+ this._setSelectionByValue(newValue);
72
+ this.valueChange.emit(this.value);
73
+ }
74
+ valueChange = new EventEmitter();
75
+ get selected() {
76
+ const selected = this._selectionModel ? this._selectionModel.selected : [];
77
+ return this.multiple ? selected : selected[0] || null;
78
+ }
79
+ get multiple() {
80
+ return this._multiple;
81
+ }
82
+ set multiple(value) {
83
+ this._multiple = value;
84
+ this._markButtonsForCheck();
85
+ }
86
+ get disabled() {
87
+ return this._disabled;
88
+ }
89
+ set disabled(value) {
90
+ this._disabled = value;
91
+ this._markButtonsForCheck();
92
+ }
93
+ get disabledInteractive() {
94
+ return this._disabledInteractive;
95
+ }
96
+ set disabledInteractive(value) {
97
+ this._disabledInteractive = value;
98
+ this._markButtonsForCheck();
99
+ }
100
+ get dir() {
101
+ return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
102
+ }
103
+ change = new EventEmitter();
104
+ get hideSingleSelectionIndicator() {
105
+ return this._hideSingleSelectionIndicator;
106
+ }
107
+ set hideSingleSelectionIndicator(value) {
108
+ this._hideSingleSelectionIndicator = value;
109
+ this._markButtonsForCheck();
110
+ }
111
+ _hideSingleSelectionIndicator;
112
+ get hideMultipleSelectionIndicator() {
113
+ return this._hideMultipleSelectionIndicator;
114
+ }
115
+ set hideMultipleSelectionIndicator(value) {
116
+ this._hideMultipleSelectionIndicator = value;
117
+ this._markButtonsForCheck();
118
+ }
119
+ _hideMultipleSelectionIndicator;
120
+ constructor() {
121
+ const defaultOptions = inject(MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS, {
122
+ optional: true
123
+ });
124
+ this.appearance = defaultOptions && defaultOptions.appearance ? defaultOptions.appearance : 'standard';
125
+ this.hideSingleSelectionIndicator = defaultOptions?.hideSingleSelectionIndicator ?? false;
126
+ this.hideMultipleSelectionIndicator = defaultOptions?.hideMultipleSelectionIndicator ?? false;
127
+ }
128
+ ngOnInit() {
129
+ this._selectionModel = new SelectionModel(this.multiple, undefined, false);
130
+ }
131
+ ngAfterContentInit() {
132
+ this._selectionModel.select(...this._buttonToggles.filter(toggle => toggle.checked));
133
+ if (!this.multiple) {
134
+ this._initializeTabIndex();
135
+ }
136
+ }
137
+ writeValue(value) {
138
+ this.value = value;
139
+ this._changeDetector.markForCheck();
140
+ }
141
+ registerOnChange(fn) {
142
+ this._controlValueAccessorChangeFn = fn;
143
+ }
144
+ registerOnTouched(fn) {
145
+ this._onTouched = fn;
146
+ }
147
+ setDisabledState(isDisabled) {
148
+ this.disabled = isDisabled;
149
+ }
150
+ _keydown(event) {
151
+ if (this.multiple || this.disabled || hasModifierKey(event)) {
152
+ return;
153
+ }
154
+ const target = event.target;
155
+ const buttonId = target.id;
156
+ const index = this._buttonToggles.toArray().findIndex(toggle => {
157
+ return toggle.buttonId === buttonId;
158
+ });
159
+ let nextButton = null;
160
+ switch (event.keyCode) {
161
+ case SPACE:
162
+ case ENTER:
163
+ nextButton = this._buttonToggles.get(index) || null;
164
+ break;
165
+ case UP_ARROW:
166
+ nextButton = this._getNextButton(index, -1);
167
+ break;
168
+ case LEFT_ARROW:
169
+ nextButton = this._getNextButton(index, this.dir === 'ltr' ? -1 : 1);
170
+ break;
171
+ case DOWN_ARROW:
172
+ nextButton = this._getNextButton(index, 1);
173
+ break;
174
+ case RIGHT_ARROW:
175
+ nextButton = this._getNextButton(index, this.dir === 'ltr' ? 1 : -1);
176
+ break;
177
+ default:
178
+ return;
179
+ }
180
+ if (nextButton) {
181
+ event.preventDefault();
182
+ nextButton._onButtonClick();
183
+ nextButton.focus();
184
+ }
185
+ }
186
+ _emitChangeEvent(toggle) {
187
+ const event = new MatButtonToggleChange(toggle, this.value);
188
+ this._rawValue = event.value;
189
+ this._controlValueAccessorChangeFn(event.value);
190
+ this.change.emit(event);
191
+ }
192
+ _syncButtonToggle(toggle, select, isUserInput = false, deferEvents = false) {
193
+ if (!this.multiple && this.selected && !toggle.checked) {
194
+ this.selected.checked = false;
195
+ }
196
+ if (this._selectionModel) {
197
+ if (select) {
198
+ this._selectionModel.select(toggle);
199
+ } else {
200
+ this._selectionModel.deselect(toggle);
201
+ }
202
+ } else {
203
+ deferEvents = true;
204
+ }
205
+ if (deferEvents) {
206
+ Promise.resolve().then(() => this._updateModelValue(toggle, isUserInput));
207
+ } else {
208
+ this._updateModelValue(toggle, isUserInput);
209
+ }
210
+ }
211
+ _isSelected(toggle) {
212
+ return this._selectionModel && this._selectionModel.isSelected(toggle);
213
+ }
214
+ _isPrechecked(toggle) {
215
+ if (typeof this._rawValue === 'undefined') {
216
+ return false;
217
+ }
218
+ if (this.multiple && Array.isArray(this._rawValue)) {
219
+ return this._rawValue.some(value => toggle.value != null && value === toggle.value);
220
+ }
221
+ return toggle.value === this._rawValue;
222
+ }
223
+ _initializeTabIndex() {
224
+ this._buttonToggles.forEach(toggle => {
225
+ toggle.tabIndex = -1;
226
+ });
227
+ if (this.selected) {
228
+ this.selected.tabIndex = 0;
229
+ } else {
230
+ for (let i = 0; i < this._buttonToggles.length; i++) {
231
+ const toggle = this._buttonToggles.get(i);
232
+ if (!toggle.disabled) {
233
+ toggle.tabIndex = 0;
234
+ break;
267
235
  }
268
- else {
269
- deferEvents = true;
270
- }
271
- // We need to defer in some cases in order to avoid "changed after checked errors", however
272
- // the side-effect is that we may end up updating the model value out of sequence in others
273
- // The `deferEvents` flag allows us to decide whether to do it on a case-by-case basis.
274
- if (deferEvents) {
275
- Promise.resolve().then(() => this._updateModelValue(toggle, isUserInput));
276
- }
277
- else {
278
- this._updateModelValue(toggle, isUserInput);
279
- }
280
- }
281
- /** Checks whether a button toggle is selected. */
282
- _isSelected(toggle) {
283
- return this._selectionModel && this._selectionModel.isSelected(toggle);
284
- }
285
- /** Determines whether a button toggle should be checked on init. */
286
- _isPrechecked(toggle) {
287
- if (typeof this._rawValue === 'undefined') {
288
- return false;
289
- }
290
- if (this.multiple && Array.isArray(this._rawValue)) {
291
- return this._rawValue.some(value => toggle.value != null && value === toggle.value);
292
- }
293
- return toggle.value === this._rawValue;
294
- }
295
- /** Initializes the tabindex attribute using the radio pattern. */
296
- _initializeTabIndex() {
297
- this._buttonToggles.forEach(toggle => {
298
- toggle.tabIndex = -1;
299
- });
300
- if (this.selected) {
301
- this.selected.tabIndex = 0;
302
- }
303
- else {
304
- for (let i = 0; i < this._buttonToggles.length; i++) {
305
- const toggle = this._buttonToggles.get(i);
306
- if (!toggle.disabled) {
307
- toggle.tabIndex = 0;
308
- break;
309
- }
310
- }
311
- }
312
- }
313
- /** Obtain the subsequent toggle to which the focus shifts. */
314
- _getNextButton(startIndex, offset) {
315
- const items = this._buttonToggles;
316
- for (let i = 1; i <= items.length; i++) {
317
- const index = (startIndex + offset * i + items.length) % items.length;
318
- const item = items.get(index);
319
- if (item && !item.disabled) {
320
- return item;
321
- }
236
+ }
237
+ }
238
+ }
239
+ _getNextButton(startIndex, offset) {
240
+ const items = this._buttonToggles;
241
+ for (let i = 1; i <= items.length; i++) {
242
+ const index = (startIndex + offset * i + items.length) % items.length;
243
+ const item = items.get(index);
244
+ if (item && !item.disabled) {
245
+ return item;
246
+ }
247
+ }
248
+ return null;
249
+ }
250
+ _setSelectionByValue(value) {
251
+ this._rawValue = value;
252
+ if (!this._buttonToggles) {
253
+ return;
254
+ }
255
+ const toggles = this._buttonToggles.toArray();
256
+ if (this.multiple && value) {
257
+ if (!Array.isArray(value) && (typeof ngDevMode === 'undefined' || ngDevMode)) {
258
+ throw Error('Value must be an array in multiple-selection mode.');
259
+ }
260
+ this._clearSelection();
261
+ value.forEach(currentValue => this._selectValue(currentValue, toggles));
262
+ } else {
263
+ this._clearSelection();
264
+ this._selectValue(value, toggles);
265
+ }
266
+ if (!this.multiple && toggles.every(toggle => toggle.tabIndex === -1)) {
267
+ for (const toggle of toggles) {
268
+ if (!toggle.disabled) {
269
+ toggle.tabIndex = 0;
270
+ break;
322
271
  }
323
- return null;
324
- }
325
- /** Updates the selection state of the toggles in the group based on a value. */
326
- _setSelectionByValue(value) {
327
- this._rawValue = value;
328
- if (!this._buttonToggles) {
329
- return;
330
- }
331
- const toggles = this._buttonToggles.toArray();
332
- if (this.multiple && value) {
333
- if (!Array.isArray(value) && (typeof ngDevMode === 'undefined' || ngDevMode)) {
334
- throw Error('Value must be an array in multiple-selection mode.');
335
- }
336
- this._clearSelection();
337
- value.forEach((currentValue) => this._selectValue(currentValue, toggles));
338
- }
339
- else {
340
- this._clearSelection();
341
- this._selectValue(value, toggles);
342
- }
343
- // In single selection mode we need at least one enabled toggle to always be focusable.
344
- if (!this.multiple && toggles.every(toggle => toggle.tabIndex === -1)) {
345
- for (const toggle of toggles) {
346
- if (!toggle.disabled) {
347
- toggle.tabIndex = 0;
348
- break;
349
- }
350
- }
351
- }
352
- }
353
- /** Clears the selected toggles. */
354
- _clearSelection() {
355
- this._selectionModel.clear();
356
- this._buttonToggles.forEach(toggle => {
357
- toggle.checked = false;
358
- // If the button toggle is in single select mode, initialize the tabIndex.
359
- if (!this.multiple) {
360
- toggle.tabIndex = -1;
361
- }
362
- });
363
- }
364
- /** Selects a value if there's a toggle that corresponds to it. */
365
- _selectValue(value, toggles) {
366
- for (const toggle of toggles) {
367
- if (toggle.value === value) {
368
- toggle.checked = true;
369
- this._selectionModel.select(toggle);
370
- if (!this.multiple) {
371
- // If the button toggle is in single select mode, reset the tabIndex.
372
- toggle.tabIndex = 0;
373
- }
374
- break;
375
- }
376
- }
377
- }
378
- /** Syncs up the group's value with the model and emits the change event. */
379
- _updateModelValue(toggle, isUserInput) {
380
- // Only emit the change event for user input.
381
- if (isUserInput) {
382
- this._emitChangeEvent(toggle);
272
+ }
273
+ }
274
+ }
275
+ _clearSelection() {
276
+ this._selectionModel.clear();
277
+ this._buttonToggles.forEach(toggle => {
278
+ toggle.checked = false;
279
+ if (!this.multiple) {
280
+ toggle.tabIndex = -1;
281
+ }
282
+ });
283
+ }
284
+ _selectValue(value, toggles) {
285
+ for (const toggle of toggles) {
286
+ if (toggle.value === value) {
287
+ toggle.checked = true;
288
+ this._selectionModel.select(toggle);
289
+ if (!this.multiple) {
290
+ toggle.tabIndex = 0;
383
291
  }
384
- // Note: we emit this one no matter whether it was a user interaction, because
385
- // it is used by Angular to sync up the two-way data binding.
386
- this.valueChange.emit(this.value);
387
- }
388
- /** Marks all of the child button toggles to be checked. */
389
- _markButtonsForCheck() {
390
- this._buttonToggles?.forEach(toggle => toggle._markForCheck());
391
- }
392
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatButtonToggleGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
393
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.2.0-next.2", type: MatButtonToggleGroup, isStandalone: true, selector: "mat-button-toggle-group", inputs: { appearance: "appearance", name: "name", vertical: ["vertical", "vertical", booleanAttribute], value: "value", multiple: ["multiple", "multiple", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], disabledInteractive: ["disabledInteractive", "disabledInteractive", booleanAttribute], hideSingleSelectionIndicator: ["hideSingleSelectionIndicator", "hideSingleSelectionIndicator", booleanAttribute], hideMultipleSelectionIndicator: ["hideMultipleSelectionIndicator", "hideMultipleSelectionIndicator", booleanAttribute] }, outputs: { valueChange: "valueChange", change: "change" }, host: { listeners: { "keydown": "_keydown($event)" }, properties: { "attr.role": "multiple ? 'group' : 'radiogroup'", "attr.aria-disabled": "disabled", "class.mat-button-toggle-vertical": "vertical", "class.mat-button-toggle-group-appearance-standard": "appearance === \"standard\"" }, classAttribute: "mat-button-toggle-group" }, providers: [
394
- MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR,
395
- { provide: MAT_BUTTON_TOGGLE_GROUP, useExisting: MatButtonToggleGroup },
396
- ], queries: [{ propertyName: "_buttonToggles", predicate: i0.forwardRef(() => MatButtonToggle), descendants: true }], exportAs: ["matButtonToggleGroup"], ngImport: i0 });
292
+ break;
293
+ }
294
+ }
295
+ }
296
+ _updateModelValue(toggle, isUserInput) {
297
+ if (isUserInput) {
298
+ this._emitChangeEvent(toggle);
299
+ }
300
+ this.valueChange.emit(this.value);
301
+ }
302
+ _markButtonsForCheck() {
303
+ this._buttonToggles?.forEach(toggle => toggle._markForCheck());
304
+ }
305
+ static ɵfac = i0.ɵɵngDeclareFactory({
306
+ minVersion: "12.0.0",
307
+ version: "20.2.0-next.2",
308
+ ngImport: i0,
309
+ type: MatButtonToggleGroup,
310
+ deps: [],
311
+ target: i0.ɵɵFactoryTarget.Directive
312
+ });
313
+ static ɵdir = i0.ɵɵngDeclareDirective({
314
+ minVersion: "16.1.0",
315
+ version: "20.2.0-next.2",
316
+ type: MatButtonToggleGroup,
317
+ isStandalone: true,
318
+ selector: "mat-button-toggle-group",
319
+ inputs: {
320
+ appearance: "appearance",
321
+ name: "name",
322
+ vertical: ["vertical", "vertical", booleanAttribute],
323
+ value: "value",
324
+ multiple: ["multiple", "multiple", booleanAttribute],
325
+ disabled: ["disabled", "disabled", booleanAttribute],
326
+ disabledInteractive: ["disabledInteractive", "disabledInteractive", booleanAttribute],
327
+ hideSingleSelectionIndicator: ["hideSingleSelectionIndicator", "hideSingleSelectionIndicator", booleanAttribute],
328
+ hideMultipleSelectionIndicator: ["hideMultipleSelectionIndicator", "hideMultipleSelectionIndicator", booleanAttribute]
329
+ },
330
+ outputs: {
331
+ valueChange: "valueChange",
332
+ change: "change"
333
+ },
334
+ host: {
335
+ listeners: {
336
+ "keydown": "_keydown($event)"
337
+ },
338
+ properties: {
339
+ "attr.role": "multiple ? 'group' : 'radiogroup'",
340
+ "attr.aria-disabled": "disabled",
341
+ "class.mat-button-toggle-vertical": "vertical",
342
+ "class.mat-button-toggle-group-appearance-standard": "appearance === \"standard\""
343
+ },
344
+ classAttribute: "mat-button-toggle-group"
345
+ },
346
+ providers: [MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR, {
347
+ provide: MAT_BUTTON_TOGGLE_GROUP,
348
+ useExisting: MatButtonToggleGroup
349
+ }],
350
+ queries: [{
351
+ propertyName: "_buttonToggles",
352
+ predicate: i0.forwardRef(() => MatButtonToggle),
353
+ descendants: true
354
+ }],
355
+ exportAs: ["matButtonToggleGroup"],
356
+ ngImport: i0
357
+ });
397
358
  }
398
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatButtonToggleGroup, decorators: [{
399
- type: Directive,
400
- args: [{
401
- selector: 'mat-button-toggle-group',
402
- providers: [
403
- MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR,
404
- { provide: MAT_BUTTON_TOGGLE_GROUP, useExisting: MatButtonToggleGroup },
405
- ],
406
- host: {
407
- 'class': 'mat-button-toggle-group',
408
- '(keydown)': '_keydown($event)',
409
- '[attr.role]': "multiple ? 'group' : 'radiogroup'",
410
- '[attr.aria-disabled]': 'disabled',
411
- '[class.mat-button-toggle-vertical]': 'vertical',
412
- '[class.mat-button-toggle-group-appearance-standard]': 'appearance === "standard"',
413
- },
414
- exportAs: 'matButtonToggleGroup',
415
- }]
416
- }], ctorParameters: () => [], propDecorators: { _buttonToggles: [{
417
- type: ContentChildren,
418
- args: [forwardRef(() => MatButtonToggle), {
419
- // Note that this would technically pick up toggles
420
- // from nested groups, but that's not a case that we support.
421
- descendants: true,
422
- }]
423
- }], appearance: [{
424
- type: Input
425
- }], name: [{
426
- type: Input
427
- }], vertical: [{
428
- type: Input,
429
- args: [{ transform: booleanAttribute }]
430
- }], value: [{
431
- type: Input
432
- }], valueChange: [{
433
- type: Output
434
- }], multiple: [{
435
- type: Input,
436
- args: [{ transform: booleanAttribute }]
437
- }], disabled: [{
438
- type: Input,
439
- args: [{ transform: booleanAttribute }]
440
- }], disabledInteractive: [{
441
- type: Input,
442
- args: [{ transform: booleanAttribute }]
443
- }], change: [{
444
- type: Output
445
- }], hideSingleSelectionIndicator: [{
446
- type: Input,
447
- args: [{ transform: booleanAttribute }]
448
- }], hideMultipleSelectionIndicator: [{
449
- type: Input,
450
- args: [{ transform: booleanAttribute }]
451
- }] } });
452
- /** Single button inside of a toggle group. */
359
+ i0.ɵɵngDeclareClassMetadata({
360
+ minVersion: "12.0.0",
361
+ version: "20.2.0-next.2",
362
+ ngImport: i0,
363
+ type: MatButtonToggleGroup,
364
+ decorators: [{
365
+ type: Directive,
366
+ args: [{
367
+ selector: 'mat-button-toggle-group',
368
+ providers: [MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR, {
369
+ provide: MAT_BUTTON_TOGGLE_GROUP,
370
+ useExisting: MatButtonToggleGroup
371
+ }],
372
+ host: {
373
+ 'class': 'mat-button-toggle-group',
374
+ '(keydown)': '_keydown($event)',
375
+ '[attr.role]': "multiple ? 'group' : 'radiogroup'",
376
+ '[attr.aria-disabled]': 'disabled',
377
+ '[class.mat-button-toggle-vertical]': 'vertical',
378
+ '[class.mat-button-toggle-group-appearance-standard]': 'appearance === "standard"'
379
+ },
380
+ exportAs: 'matButtonToggleGroup'
381
+ }]
382
+ }],
383
+ ctorParameters: () => [],
384
+ propDecorators: {
385
+ _buttonToggles: [{
386
+ type: ContentChildren,
387
+ args: [forwardRef(() => MatButtonToggle), {
388
+ descendants: true
389
+ }]
390
+ }],
391
+ appearance: [{
392
+ type: Input
393
+ }],
394
+ name: [{
395
+ type: Input
396
+ }],
397
+ vertical: [{
398
+ type: Input,
399
+ args: [{
400
+ transform: booleanAttribute
401
+ }]
402
+ }],
403
+ value: [{
404
+ type: Input
405
+ }],
406
+ valueChange: [{
407
+ type: Output
408
+ }],
409
+ multiple: [{
410
+ type: Input,
411
+ args: [{
412
+ transform: booleanAttribute
413
+ }]
414
+ }],
415
+ disabled: [{
416
+ type: Input,
417
+ args: [{
418
+ transform: booleanAttribute
419
+ }]
420
+ }],
421
+ disabledInteractive: [{
422
+ type: Input,
423
+ args: [{
424
+ transform: booleanAttribute
425
+ }]
426
+ }],
427
+ change: [{
428
+ type: Output
429
+ }],
430
+ hideSingleSelectionIndicator: [{
431
+ type: Input,
432
+ args: [{
433
+ transform: booleanAttribute
434
+ }]
435
+ }],
436
+ hideMultipleSelectionIndicator: [{
437
+ type: Input,
438
+ args: [{
439
+ transform: booleanAttribute
440
+ }]
441
+ }]
442
+ }
443
+ });
453
444
  class MatButtonToggle {
454
- _changeDetectorRef = inject(ChangeDetectorRef);
455
- _elementRef = inject(ElementRef);
456
- _focusMonitor = inject(FocusMonitor);
457
- _idGenerator = inject(_IdGenerator);
458
- _animationDisabled = _animationsDisabled();
459
- _checked = false;
460
- /**
461
- * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will
462
- * take precedence so this may be omitted.
463
- */
464
- ariaLabel;
465
- /**
466
- * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element
467
- */
468
- ariaLabelledby = null;
469
- /** Underlying native `button` element. */
470
- _buttonElement;
471
- /** The parent button toggle group (exclusive selection). Optional. */
472
- buttonToggleGroup;
473
- /** Unique ID for the underlying `button` element. */
474
- get buttonId() {
475
- return `${this.id}-button`;
476
- }
477
- /** The unique ID for this button toggle. */
478
- id;
479
- /** HTML's 'name' attribute used to group radios for unique selection. */
480
- name;
481
- /** MatButtonToggleGroup reads this to assign its own value. */
482
- value;
483
- /** Tabindex of the toggle. */
484
- get tabIndex() {
485
- return this._tabIndex();
486
- }
487
- set tabIndex(value) {
488
- this._tabIndex.set(value);
489
- }
490
- _tabIndex;
491
- /** Whether ripples are disabled on the button toggle. */
492
- disableRipple;
493
- /** The appearance style of the button. */
494
- get appearance() {
495
- return this.buttonToggleGroup ? this.buttonToggleGroup.appearance : this._appearance;
496
- }
497
- set appearance(value) {
498
- this._appearance = value;
499
- }
500
- _appearance;
501
- /** Whether the button is checked. */
502
- get checked() {
503
- return this.buttonToggleGroup ? this.buttonToggleGroup._isSelected(this) : this._checked;
504
- }
505
- set checked(value) {
506
- if (value !== this._checked) {
507
- this._checked = value;
508
- if (this.buttonToggleGroup) {
509
- this.buttonToggleGroup._syncButtonToggle(this, this._checked);
510
- }
511
- this._changeDetectorRef.markForCheck();
512
- }
513
- }
514
- /** Whether the button is disabled. */
515
- get disabled() {
516
- return this._disabled || (this.buttonToggleGroup && this.buttonToggleGroup.disabled);
517
- }
518
- set disabled(value) {
519
- this._disabled = value;
520
- }
521
- _disabled = false;
522
- /** Whether the button should remain interactive when it is disabled. */
523
- get disabledInteractive() {
524
- return (this._disabledInteractive ||
525
- (this.buttonToggleGroup !== null && this.buttonToggleGroup.disabledInteractive));
526
- }
527
- set disabledInteractive(value) {
528
- this._disabledInteractive = value;
529
- }
530
- _disabledInteractive;
531
- /** Event emitted when the group value changes. */
532
- change = new EventEmitter();
533
- constructor() {
534
- inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);
535
- const toggleGroup = inject(MAT_BUTTON_TOGGLE_GROUP, { optional: true });
536
- const defaultTabIndex = inject(new HostAttributeToken('tabindex'), { optional: true }) || '';
537
- const defaultOptions = inject(MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS, { optional: true });
538
- this._tabIndex = signal(parseInt(defaultTabIndex) || 0, ...(ngDevMode ? [{ debugName: "_tabIndex" }] : []));
539
- this.buttonToggleGroup = toggleGroup;
540
- this.appearance =
541
- defaultOptions && defaultOptions.appearance ? defaultOptions.appearance : 'standard';
542
- this.disabledInteractive = defaultOptions?.disabledInteractive ?? false;
543
- }
544
- ngOnInit() {
545
- const group = this.buttonToggleGroup;
546
- this.id = this.id || this._idGenerator.getId('mat-button-toggle-');
547
- if (group) {
548
- if (group._isPrechecked(this)) {
549
- this.checked = true;
550
- }
551
- else if (group._isSelected(this) !== this._checked) {
552
- // As side effect of the circular dependency between the toggle group and the button,
553
- // we may end up in a state where the button is supposed to be checked on init, but it
554
- // isn't, because the checked value was assigned too early. This can happen when Ivy
555
- // assigns the static input value before the `ngOnInit` has run.
556
- group._syncButtonToggle(this, this._checked);
557
- }
558
- }
559
- }
560
- ngAfterViewInit() {
561
- // This serves two purposes:
562
- // 1. We don't want the animation to fire on the first render for pre-checked toggles so we
563
- // delay adding the class until the view is rendered.
564
- // 2. We don't want to animate if animations are disabled.
565
- if (!this._animationDisabled) {
566
- this._elementRef.nativeElement.classList.add('mat-button-toggle-animations-enabled');
567
- }
568
- this._focusMonitor.monitor(this._elementRef, true);
569
- }
570
- ngOnDestroy() {
571
- const group = this.buttonToggleGroup;
572
- this._focusMonitor.stopMonitoring(this._elementRef);
573
- // Remove the toggle from the selection once it's destroyed. Needs to happen
574
- // on the next tick in order to avoid "changed after checked" errors.
575
- if (group && group._isSelected(this)) {
576
- group._syncButtonToggle(this, false, false, true);
577
- }
578
- }
579
- /** Focuses the button. */
580
- focus(options) {
581
- this._buttonElement.nativeElement.focus(options);
582
- }
583
- /** Checks the button toggle due to an interaction with the underlying native button. */
584
- _onButtonClick() {
585
- if (this.disabled) {
586
- return;
587
- }
588
- const newChecked = this.isSingleSelector() ? true : !this._checked;
589
- if (newChecked !== this._checked) {
590
- this._checked = newChecked;
591
- if (this.buttonToggleGroup) {
592
- this.buttonToggleGroup._syncButtonToggle(this, this._checked, true);
593
- this.buttonToggleGroup._onTouched();
594
- }
595
- }
596
- if (this.isSingleSelector()) {
597
- const focusable = this.buttonToggleGroup._buttonToggles.find(toggle => {
598
- return toggle.tabIndex === 0;
599
- });
600
- // Modify the tabindex attribute of the last focusable button toggle to -1.
601
- if (focusable) {
602
- focusable.tabIndex = -1;
603
- }
604
- // Modify the tabindex attribute of the presently selected button toggle to 0.
605
- this.tabIndex = 0;
606
- }
607
- // Emit a change event when it's the single selector
608
- this.change.emit(new MatButtonToggleChange(this, this.value));
609
- }
610
- /**
611
- * Marks the button toggle as needing checking for change detection.
612
- * This method is exposed because the parent button toggle group will directly
613
- * update bound properties of the radio button.
614
- */
615
- _markForCheck() {
616
- // When the group value changes, the button will not be notified.
617
- // Use `markForCheck` to explicit update button toggle's status.
618
- this._changeDetectorRef.markForCheck();
619
- }
620
- /** Gets the name that should be assigned to the inner DOM node. */
621
- _getButtonName() {
622
- if (this.isSingleSelector()) {
623
- return this.buttonToggleGroup.name;
624
- }
625
- return this.name || null;
626
- }
627
- /** Whether the toggle is in single selection mode. */
628
- isSingleSelector() {
629
- return this.buttonToggleGroup && !this.buttonToggleGroup.multiple;
630
- }
631
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatButtonToggle, deps: [], target: i0.ɵɵFactoryTarget.Component });
632
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.0-next.2", type: MatButtonToggle, isStandalone: true, selector: "mat-button-toggle", inputs: { ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], id: "id", name: "name", value: "value", tabIndex: "tabIndex", disableRipple: ["disableRipple", "disableRipple", booleanAttribute], appearance: "appearance", checked: ["checked", "checked", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], disabledInteractive: ["disabledInteractive", "disabledInteractive", booleanAttribute] }, outputs: { change: "change" }, host: { attributes: { "role": "presentation" }, listeners: { "focus": "focus()" }, properties: { "class.mat-button-toggle-standalone": "!buttonToggleGroup", "class.mat-button-toggle-checked": "checked", "class.mat-button-toggle-disabled": "disabled", "class.mat-button-toggle-disabled-interactive": "disabledInteractive", "class.mat-button-toggle-appearance-standard": "appearance === \"standard\"", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.id": "id", "attr.name": "null" }, classAttribute: "mat-button-toggle" }, viewQueries: [{ propertyName: "_buttonElement", first: true, predicate: ["button"], descendants: true }], exportAs: ["matButtonToggle"], ngImport: i0, template: "<button #button class=\"mat-button-toggle-button mat-focus-indicator\"\n type=\"button\"\n [id]=\"buttonId\"\n [attr.role]=\"isSingleSelector() ? 'radio' : 'button'\"\n [attr.tabindex]=\"disabled && !disabledInteractive ? -1 : tabIndex\"\n [attr.aria-pressed]=\"!isSingleSelector() ? checked : null\"\n [attr.aria-checked]=\"isSingleSelector() ? checked : null\"\n [disabled]=\"(disabled && !disabledInteractive) || null\"\n [attr.name]=\"_getButtonName()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-disabled]=\"disabled && disabledInteractive ? 'true' : null\"\n (click)=\"_onButtonClick()\">\n @if (buttonToggleGroup && (\n !buttonToggleGroup.multiple && !buttonToggleGroup.hideSingleSelectionIndicator ||\n buttonToggleGroup.multiple && !buttonToggleGroup.hideMultipleSelectionIndicator)\n ) {\n <div class=\"mat-button-toggle-checkbox-wrapper\">\n <mat-pseudo-checkbox\n [disabled]=\"disabled\"\n state=\"checked\"\n aria-hidden=\"true\"\n appearance=\"minimal\"/>\n </div>\n }\n\n <span class=\"mat-button-toggle-label-content\">\n <ng-content></ng-content>\n </span>\n</button>\n\n<span class=\"mat-button-toggle-focus-overlay\"></span>\n<span class=\"mat-button-toggle-ripple\" matRipple\n [matRippleTrigger]=\"button\"\n [matRippleDisabled]=\"disableRipple || disabled\">\n</span>\n", styles: [".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:var(--mat-button-toggle-legacy-shape);transform:translateZ(0)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-button-toggle-legacy-text-color);font-family:var(--mat-button-toggle-legacy-label-text-font);font-size:var(--mat-button-toggle-legacy-label-text-size);line-height:var(--mat-button-toggle-legacy-label-text-line-height);font-weight:var(--mat-button-toggle-legacy-label-text-weight);letter-spacing:var(--mat-button-toggle-legacy-label-text-tracking);--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-legacy-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-legacy-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-button-toggle-legacy-selected-state-text-color);background-color:var(--mat-button-toggle-legacy-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-button-toggle-legacy-disabled-state-text-color);background-color:var(--mat-button-toggle-legacy-disabled-state-background-color);--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-legacy-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-button-toggle-legacy-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-button-toggle-background-color, transparent);font-family:var(--mat-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-button-toggle-legacy-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-button-toggle-legacy-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius: var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}\n"], dependencies: [{ kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: MatPseudoCheckbox, selector: "mat-pseudo-checkbox", inputs: ["state", "disabled", "appearance"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
445
+ _changeDetectorRef = inject(ChangeDetectorRef);
446
+ _elementRef = inject(ElementRef);
447
+ _focusMonitor = inject(FocusMonitor);
448
+ _idGenerator = inject(_IdGenerator);
449
+ _animationDisabled = _animationsDisabled();
450
+ _checked = false;
451
+ ariaLabel;
452
+ ariaLabelledby = null;
453
+ _buttonElement;
454
+ buttonToggleGroup;
455
+ get buttonId() {
456
+ return `${this.id}-button`;
457
+ }
458
+ id;
459
+ name;
460
+ value;
461
+ get tabIndex() {
462
+ return this._tabIndex();
463
+ }
464
+ set tabIndex(value) {
465
+ this._tabIndex.set(value);
466
+ }
467
+ _tabIndex;
468
+ disableRipple;
469
+ get appearance() {
470
+ return this.buttonToggleGroup ? this.buttonToggleGroup.appearance : this._appearance;
471
+ }
472
+ set appearance(value) {
473
+ this._appearance = value;
474
+ }
475
+ _appearance;
476
+ get checked() {
477
+ return this.buttonToggleGroup ? this.buttonToggleGroup._isSelected(this) : this._checked;
478
+ }
479
+ set checked(value) {
480
+ if (value !== this._checked) {
481
+ this._checked = value;
482
+ if (this.buttonToggleGroup) {
483
+ this.buttonToggleGroup._syncButtonToggle(this, this._checked);
484
+ }
485
+ this._changeDetectorRef.markForCheck();
486
+ }
487
+ }
488
+ get disabled() {
489
+ return this._disabled || this.buttonToggleGroup && this.buttonToggleGroup.disabled;
490
+ }
491
+ set disabled(value) {
492
+ this._disabled = value;
493
+ }
494
+ _disabled = false;
495
+ get disabledInteractive() {
496
+ return this._disabledInteractive || this.buttonToggleGroup !== null && this.buttonToggleGroup.disabledInteractive;
497
+ }
498
+ set disabledInteractive(value) {
499
+ this._disabledInteractive = value;
500
+ }
501
+ _disabledInteractive;
502
+ change = new EventEmitter();
503
+ constructor() {
504
+ inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);
505
+ const toggleGroup = inject(MAT_BUTTON_TOGGLE_GROUP, {
506
+ optional: true
507
+ });
508
+ const defaultTabIndex = inject(new HostAttributeToken('tabindex'), {
509
+ optional: true
510
+ }) || '';
511
+ const defaultOptions = inject(MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS, {
512
+ optional: true
513
+ });
514
+ this._tabIndex = signal(parseInt(defaultTabIndex) || 0, ...(ngDevMode ? [{
515
+ debugName: "_tabIndex"
516
+ }] : []));
517
+ this.buttonToggleGroup = toggleGroup;
518
+ this.appearance = defaultOptions && defaultOptions.appearance ? defaultOptions.appearance : 'standard';
519
+ this.disabledInteractive = defaultOptions?.disabledInteractive ?? false;
520
+ }
521
+ ngOnInit() {
522
+ const group = this.buttonToggleGroup;
523
+ this.id = this.id || this._idGenerator.getId('mat-button-toggle-');
524
+ if (group) {
525
+ if (group._isPrechecked(this)) {
526
+ this.checked = true;
527
+ } else if (group._isSelected(this) !== this._checked) {
528
+ group._syncButtonToggle(this, this._checked);
529
+ }
530
+ }
531
+ }
532
+ ngAfterViewInit() {
533
+ if (!this._animationDisabled) {
534
+ this._elementRef.nativeElement.classList.add('mat-button-toggle-animations-enabled');
535
+ }
536
+ this._focusMonitor.monitor(this._elementRef, true);
537
+ }
538
+ ngOnDestroy() {
539
+ const group = this.buttonToggleGroup;
540
+ this._focusMonitor.stopMonitoring(this._elementRef);
541
+ if (group && group._isSelected(this)) {
542
+ group._syncButtonToggle(this, false, false, true);
543
+ }
544
+ }
545
+ focus(options) {
546
+ this._buttonElement.nativeElement.focus(options);
547
+ }
548
+ _onButtonClick() {
549
+ if (this.disabled) {
550
+ return;
551
+ }
552
+ const newChecked = this.isSingleSelector() ? true : !this._checked;
553
+ if (newChecked !== this._checked) {
554
+ this._checked = newChecked;
555
+ if (this.buttonToggleGroup) {
556
+ this.buttonToggleGroup._syncButtonToggle(this, this._checked, true);
557
+ this.buttonToggleGroup._onTouched();
558
+ }
559
+ }
560
+ if (this.isSingleSelector()) {
561
+ const focusable = this.buttonToggleGroup._buttonToggles.find(toggle => {
562
+ return toggle.tabIndex === 0;
563
+ });
564
+ if (focusable) {
565
+ focusable.tabIndex = -1;
566
+ }
567
+ this.tabIndex = 0;
568
+ }
569
+ this.change.emit(new MatButtonToggleChange(this, this.value));
570
+ }
571
+ _markForCheck() {
572
+ this._changeDetectorRef.markForCheck();
573
+ }
574
+ _getButtonName() {
575
+ if (this.isSingleSelector()) {
576
+ return this.buttonToggleGroup.name;
577
+ }
578
+ return this.name || null;
579
+ }
580
+ isSingleSelector() {
581
+ return this.buttonToggleGroup && !this.buttonToggleGroup.multiple;
582
+ }
583
+ static ɵfac = i0.ɵɵngDeclareFactory({
584
+ minVersion: "12.0.0",
585
+ version: "20.2.0-next.2",
586
+ ngImport: i0,
587
+ type: MatButtonToggle,
588
+ deps: [],
589
+ target: i0.ɵɵFactoryTarget.Component
590
+ });
591
+ static ɵcmp = i0.ɵɵngDeclareComponent({
592
+ minVersion: "17.0.0",
593
+ version: "20.2.0-next.2",
594
+ type: MatButtonToggle,
595
+ isStandalone: true,
596
+ selector: "mat-button-toggle",
597
+ inputs: {
598
+ ariaLabel: ["aria-label", "ariaLabel"],
599
+ ariaLabelledby: ["aria-labelledby", "ariaLabelledby"],
600
+ id: "id",
601
+ name: "name",
602
+ value: "value",
603
+ tabIndex: "tabIndex",
604
+ disableRipple: ["disableRipple", "disableRipple", booleanAttribute],
605
+ appearance: "appearance",
606
+ checked: ["checked", "checked", booleanAttribute],
607
+ disabled: ["disabled", "disabled", booleanAttribute],
608
+ disabledInteractive: ["disabledInteractive", "disabledInteractive", booleanAttribute]
609
+ },
610
+ outputs: {
611
+ change: "change"
612
+ },
613
+ host: {
614
+ attributes: {
615
+ "role": "presentation"
616
+ },
617
+ listeners: {
618
+ "focus": "focus()"
619
+ },
620
+ properties: {
621
+ "class.mat-button-toggle-standalone": "!buttonToggleGroup",
622
+ "class.mat-button-toggle-checked": "checked",
623
+ "class.mat-button-toggle-disabled": "disabled",
624
+ "class.mat-button-toggle-disabled-interactive": "disabledInteractive",
625
+ "class.mat-button-toggle-appearance-standard": "appearance === \"standard\"",
626
+ "attr.aria-label": "null",
627
+ "attr.aria-labelledby": "null",
628
+ "attr.id": "id",
629
+ "attr.name": "null"
630
+ },
631
+ classAttribute: "mat-button-toggle"
632
+ },
633
+ viewQueries: [{
634
+ propertyName: "_buttonElement",
635
+ first: true,
636
+ predicate: ["button"],
637
+ descendants: true
638
+ }],
639
+ exportAs: ["matButtonToggle"],
640
+ ngImport: i0,
641
+ template: "<button #button class=\"mat-button-toggle-button mat-focus-indicator\"\n type=\"button\"\n [id]=\"buttonId\"\n [attr.role]=\"isSingleSelector() ? 'radio' : 'button'\"\n [attr.tabindex]=\"disabled && !disabledInteractive ? -1 : tabIndex\"\n [attr.aria-pressed]=\"!isSingleSelector() ? checked : null\"\n [attr.aria-checked]=\"isSingleSelector() ? checked : null\"\n [disabled]=\"(disabled && !disabledInteractive) || null\"\n [attr.name]=\"_getButtonName()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-disabled]=\"disabled && disabledInteractive ? 'true' : null\"\n (click)=\"_onButtonClick()\">\n @if (buttonToggleGroup && (\n !buttonToggleGroup.multiple && !buttonToggleGroup.hideSingleSelectionIndicator ||\n buttonToggleGroup.multiple && !buttonToggleGroup.hideMultipleSelectionIndicator)\n ) {\n <div class=\"mat-button-toggle-checkbox-wrapper\">\n <mat-pseudo-checkbox\n [disabled]=\"disabled\"\n state=\"checked\"\n aria-hidden=\"true\"\n appearance=\"minimal\"/>\n </div>\n }\n\n <span class=\"mat-button-toggle-label-content\">\n <ng-content></ng-content>\n </span>\n</button>\n\n<span class=\"mat-button-toggle-focus-overlay\"></span>\n<span class=\"mat-button-toggle-ripple\" matRipple\n [matRippleTrigger]=\"button\"\n [matRippleDisabled]=\"disableRipple || disabled\">\n</span>\n",
642
+ styles: [".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:var(--mat-button-toggle-legacy-shape);transform:translateZ(0)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-button-toggle-legacy-text-color);font-family:var(--mat-button-toggle-legacy-label-text-font);font-size:var(--mat-button-toggle-legacy-label-text-size);line-height:var(--mat-button-toggle-legacy-label-text-line-height);font-weight:var(--mat-button-toggle-legacy-label-text-weight);letter-spacing:var(--mat-button-toggle-legacy-label-text-tracking);--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-legacy-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-legacy-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-button-toggle-legacy-selected-state-text-color);background-color:var(--mat-button-toggle-legacy-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-button-toggle-legacy-disabled-state-text-color);background-color:var(--mat-button-toggle-legacy-disabled-state-background-color);--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-legacy-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-button-toggle-legacy-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-button-toggle-background-color, transparent);font-family:var(--mat-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-button-toggle-legacy-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-button-toggle-legacy-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius: var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}\n"],
643
+ dependencies: [{
644
+ kind: "directive",
645
+ type: MatRipple,
646
+ selector: "[mat-ripple], [matRipple]",
647
+ inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"],
648
+ exportAs: ["matRipple"]
649
+ }, {
650
+ kind: "component",
651
+ type: MatPseudoCheckbox,
652
+ selector: "mat-pseudo-checkbox",
653
+ inputs: ["state", "disabled", "appearance"]
654
+ }],
655
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
656
+ encapsulation: i0.ViewEncapsulation.None
657
+ });
633
658
  }
634
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatButtonToggle, decorators: [{
635
- type: Component,
636
- args: [{ selector: 'mat-button-toggle', encapsulation: ViewEncapsulation.None, exportAs: 'matButtonToggle', changeDetection: ChangeDetectionStrategy.OnPush, host: {
637
- '[class.mat-button-toggle-standalone]': '!buttonToggleGroup',
638
- '[class.mat-button-toggle-checked]': 'checked',
639
- '[class.mat-button-toggle-disabled]': 'disabled',
640
- '[class.mat-button-toggle-disabled-interactive]': 'disabledInteractive',
641
- '[class.mat-button-toggle-appearance-standard]': 'appearance === "standard"',
642
- 'class': 'mat-button-toggle',
643
- '[attr.aria-label]': 'null',
644
- '[attr.aria-labelledby]': 'null',
645
- '[attr.id]': 'id',
646
- '[attr.name]': 'null',
647
- '(focus)': 'focus()',
648
- 'role': 'presentation',
649
- }, imports: [MatRipple, MatPseudoCheckbox], template: "<button #button class=\"mat-button-toggle-button mat-focus-indicator\"\n type=\"button\"\n [id]=\"buttonId\"\n [attr.role]=\"isSingleSelector() ? 'radio' : 'button'\"\n [attr.tabindex]=\"disabled && !disabledInteractive ? -1 : tabIndex\"\n [attr.aria-pressed]=\"!isSingleSelector() ? checked : null\"\n [attr.aria-checked]=\"isSingleSelector() ? checked : null\"\n [disabled]=\"(disabled && !disabledInteractive) || null\"\n [attr.name]=\"_getButtonName()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-disabled]=\"disabled && disabledInteractive ? 'true' : null\"\n (click)=\"_onButtonClick()\">\n @if (buttonToggleGroup && (\n !buttonToggleGroup.multiple && !buttonToggleGroup.hideSingleSelectionIndicator ||\n buttonToggleGroup.multiple && !buttonToggleGroup.hideMultipleSelectionIndicator)\n ) {\n <div class=\"mat-button-toggle-checkbox-wrapper\">\n <mat-pseudo-checkbox\n [disabled]=\"disabled\"\n state=\"checked\"\n aria-hidden=\"true\"\n appearance=\"minimal\"/>\n </div>\n }\n\n <span class=\"mat-button-toggle-label-content\">\n <ng-content></ng-content>\n </span>\n</button>\n\n<span class=\"mat-button-toggle-focus-overlay\"></span>\n<span class=\"mat-button-toggle-ripple\" matRipple\n [matRippleTrigger]=\"button\"\n [matRippleDisabled]=\"disableRipple || disabled\">\n</span>\n", styles: [".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:var(--mat-button-toggle-legacy-shape);transform:translateZ(0)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-button-toggle-legacy-text-color);font-family:var(--mat-button-toggle-legacy-label-text-font);font-size:var(--mat-button-toggle-legacy-label-text-size);line-height:var(--mat-button-toggle-legacy-label-text-line-height);font-weight:var(--mat-button-toggle-legacy-label-text-weight);letter-spacing:var(--mat-button-toggle-legacy-label-text-tracking);--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-legacy-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-legacy-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-button-toggle-legacy-selected-state-text-color);background-color:var(--mat-button-toggle-legacy-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-button-toggle-legacy-disabled-state-text-color);background-color:var(--mat-button-toggle-legacy-disabled-state-background-color);--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-legacy-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-button-toggle-legacy-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-button-toggle-background-color, transparent);font-family:var(--mat-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-button-toggle-legacy-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-button-toggle-legacy-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius: var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}\n"] }]
650
- }], ctorParameters: () => [], propDecorators: { ariaLabel: [{
651
- type: Input,
652
- args: ['aria-label']
653
- }], ariaLabelledby: [{
654
- type: Input,
655
- args: ['aria-labelledby']
656
- }], _buttonElement: [{
657
- type: ViewChild,
658
- args: ['button']
659
- }], id: [{
660
- type: Input
661
- }], name: [{
662
- type: Input
663
- }], value: [{
664
- type: Input
665
- }], tabIndex: [{
666
- type: Input
667
- }], disableRipple: [{
668
- type: Input,
669
- args: [{ transform: booleanAttribute }]
670
- }], appearance: [{
671
- type: Input
672
- }], checked: [{
673
- type: Input,
674
- args: [{ transform: booleanAttribute }]
675
- }], disabled: [{
676
- type: Input,
677
- args: [{ transform: booleanAttribute }]
678
- }], disabledInteractive: [{
679
- type: Input,
680
- args: [{ transform: booleanAttribute }]
681
- }], change: [{
682
- type: Output
683
- }] } });
659
+ i0.ɵɵngDeclareClassMetadata({
660
+ minVersion: "12.0.0",
661
+ version: "20.2.0-next.2",
662
+ ngImport: i0,
663
+ type: MatButtonToggle,
664
+ decorators: [{
665
+ type: Component,
666
+ args: [{
667
+ selector: 'mat-button-toggle',
668
+ encapsulation: ViewEncapsulation.None,
669
+ exportAs: 'matButtonToggle',
670
+ changeDetection: ChangeDetectionStrategy.OnPush,
671
+ host: {
672
+ '[class.mat-button-toggle-standalone]': '!buttonToggleGroup',
673
+ '[class.mat-button-toggle-checked]': 'checked',
674
+ '[class.mat-button-toggle-disabled]': 'disabled',
675
+ '[class.mat-button-toggle-disabled-interactive]': 'disabledInteractive',
676
+ '[class.mat-button-toggle-appearance-standard]': 'appearance === "standard"',
677
+ 'class': 'mat-button-toggle',
678
+ '[attr.aria-label]': 'null',
679
+ '[attr.aria-labelledby]': 'null',
680
+ '[attr.id]': 'id',
681
+ '[attr.name]': 'null',
682
+ '(focus)': 'focus()',
683
+ 'role': 'presentation'
684
+ },
685
+ imports: [MatRipple, MatPseudoCheckbox],
686
+ template: "<button #button class=\"mat-button-toggle-button mat-focus-indicator\"\n type=\"button\"\n [id]=\"buttonId\"\n [attr.role]=\"isSingleSelector() ? 'radio' : 'button'\"\n [attr.tabindex]=\"disabled && !disabledInteractive ? -1 : tabIndex\"\n [attr.aria-pressed]=\"!isSingleSelector() ? checked : null\"\n [attr.aria-checked]=\"isSingleSelector() ? checked : null\"\n [disabled]=\"(disabled && !disabledInteractive) || null\"\n [attr.name]=\"_getButtonName()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-disabled]=\"disabled && disabledInteractive ? 'true' : null\"\n (click)=\"_onButtonClick()\">\n @if (buttonToggleGroup && (\n !buttonToggleGroup.multiple && !buttonToggleGroup.hideSingleSelectionIndicator ||\n buttonToggleGroup.multiple && !buttonToggleGroup.hideMultipleSelectionIndicator)\n ) {\n <div class=\"mat-button-toggle-checkbox-wrapper\">\n <mat-pseudo-checkbox\n [disabled]=\"disabled\"\n state=\"checked\"\n aria-hidden=\"true\"\n appearance=\"minimal\"/>\n </div>\n }\n\n <span class=\"mat-button-toggle-label-content\">\n <ng-content></ng-content>\n </span>\n</button>\n\n<span class=\"mat-button-toggle-focus-overlay\"></span>\n<span class=\"mat-button-toggle-ripple\" matRipple\n [matRippleTrigger]=\"button\"\n [matRippleDisabled]=\"disableRipple || disabled\">\n</span>\n",
687
+ styles: [".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:var(--mat-button-toggle-legacy-shape);transform:translateZ(0)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-button-toggle-legacy-text-color);font-family:var(--mat-button-toggle-legacy-label-text-font);font-size:var(--mat-button-toggle-legacy-label-text-size);line-height:var(--mat-button-toggle-legacy-label-text-line-height);font-weight:var(--mat-button-toggle-legacy-label-text-weight);letter-spacing:var(--mat-button-toggle-legacy-label-text-tracking);--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-legacy-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-legacy-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-button-toggle-legacy-selected-state-text-color);background-color:var(--mat-button-toggle-legacy-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-button-toggle-legacy-disabled-state-text-color);background-color:var(--mat-button-toggle-legacy-disabled-state-background-color);--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-legacy-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-button-toggle-legacy-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-button-toggle-background-color, transparent);font-family:var(--mat-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-button-toggle-legacy-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-button-toggle-legacy-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius: var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}\n"]
688
+ }]
689
+ }],
690
+ ctorParameters: () => [],
691
+ propDecorators: {
692
+ ariaLabel: [{
693
+ type: Input,
694
+ args: ['aria-label']
695
+ }],
696
+ ariaLabelledby: [{
697
+ type: Input,
698
+ args: ['aria-labelledby']
699
+ }],
700
+ _buttonElement: [{
701
+ type: ViewChild,
702
+ args: ['button']
703
+ }],
704
+ id: [{
705
+ type: Input
706
+ }],
707
+ name: [{
708
+ type: Input
709
+ }],
710
+ value: [{
711
+ type: Input
712
+ }],
713
+ tabIndex: [{
714
+ type: Input
715
+ }],
716
+ disableRipple: [{
717
+ type: Input,
718
+ args: [{
719
+ transform: booleanAttribute
720
+ }]
721
+ }],
722
+ appearance: [{
723
+ type: Input
724
+ }],
725
+ checked: [{
726
+ type: Input,
727
+ args: [{
728
+ transform: booleanAttribute
729
+ }]
730
+ }],
731
+ disabled: [{
732
+ type: Input,
733
+ args: [{
734
+ transform: booleanAttribute
735
+ }]
736
+ }],
737
+ disabledInteractive: [{
738
+ type: Input,
739
+ args: [{
740
+ transform: booleanAttribute
741
+ }]
742
+ }],
743
+ change: [{
744
+ type: Output
745
+ }]
746
+ }
747
+ });
684
748
 
685
749
  class MatButtonToggleModule {
686
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatButtonToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
687
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatButtonToggleModule, imports: [MatRippleModule, MatButtonToggleGroup, MatButtonToggle], exports: [BidiModule, MatButtonToggleGroup, MatButtonToggle] });
688
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatButtonToggleModule, imports: [MatRippleModule, MatButtonToggle, BidiModule] });
750
+ static ɵfac = i0.ɵɵngDeclareFactory({
751
+ minVersion: "12.0.0",
752
+ version: "20.2.0-next.2",
753
+ ngImport: i0,
754
+ type: MatButtonToggleModule,
755
+ deps: [],
756
+ target: i0.ɵɵFactoryTarget.NgModule
757
+ });
758
+ static ɵmod = i0.ɵɵngDeclareNgModule({
759
+ minVersion: "14.0.0",
760
+ version: "20.2.0-next.2",
761
+ ngImport: i0,
762
+ type: MatButtonToggleModule,
763
+ imports: [MatRippleModule, MatButtonToggleGroup, MatButtonToggle],
764
+ exports: [BidiModule, MatButtonToggleGroup, MatButtonToggle]
765
+ });
766
+ static ɵinj = i0.ɵɵngDeclareInjector({
767
+ minVersion: "12.0.0",
768
+ version: "20.2.0-next.2",
769
+ ngImport: i0,
770
+ type: MatButtonToggleModule,
771
+ imports: [MatRippleModule, MatButtonToggle, BidiModule]
772
+ });
689
773
  }
690
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatButtonToggleModule, decorators: [{
691
- type: NgModule,
692
- args: [{
693
- imports: [MatRippleModule, MatButtonToggleGroup, MatButtonToggle],
694
- exports: [BidiModule, MatButtonToggleGroup, MatButtonToggle],
695
- }]
696
- }] });
774
+ i0.ɵɵngDeclareClassMetadata({
775
+ minVersion: "12.0.0",
776
+ version: "20.2.0-next.2",
777
+ ngImport: i0,
778
+ type: MatButtonToggleModule,
779
+ decorators: [{
780
+ type: NgModule,
781
+ args: [{
782
+ imports: [MatRippleModule, MatButtonToggleGroup, MatButtonToggle],
783
+ exports: [BidiModule, MatButtonToggleGroup, MatButtonToggle]
784
+ }]
785
+ }]
786
+ });
697
787
 
698
788
  export { MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS, MAT_BUTTON_TOGGLE_GROUP, MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR, MatButtonToggle, MatButtonToggleChange, MatButtonToggleGroup, MatButtonToggleModule };
699
789
  //# sourceMappingURL=button-toggle.mjs.map