@angular/material 17.0.0-next.1 → 17.0.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/_index.scss +1 -2
  2. package/autocomplete/_autocomplete-theme.scss +12 -18
  3. package/autocomplete/index.d.ts +15 -24
  4. package/badge/_badge-theme.scss +15 -27
  5. package/badge/index.d.ts +9 -17
  6. package/bottom-sheet/_bottom-sheet-theme.scss +13 -22
  7. package/button-toggle/_button-toggle-theme.scss +17 -28
  8. package/button-toggle/index.d.ts +15 -18
  9. package/checkbox/index.d.ts +21 -27
  10. package/chips/_chips-theme.scss +18 -56
  11. package/core/color/_all-color.scss +7 -15
  12. package/core/density/private/_all-density.scss +34 -39
  13. package/core/focus-indicators/_focus-indicators-theme.scss +6 -8
  14. package/core/focus-indicators/_private.scss +22 -26
  15. package/core/index.d.ts +7 -11
  16. package/core/style/_form-common.scss +7 -7
  17. package/core/style/_private.scss +2 -4
  18. package/core/testing/index.d.ts +2 -1
  19. package/core/theming/_all-theme.scss +41 -41
  20. package/core/theming/_inspection.scss +47 -0
  21. package/core/theming/_m2-inspection.scss +57 -0
  22. package/core/theming/_theming.scss +0 -14
  23. package/core/tokens/m2/mat/_autocomplete.scss +5 -8
  24. package/core/tokens/m2/mat/_badge.scss +12 -15
  25. package/core/tokens/m2/mat/_bottom-sheet.scss +11 -17
  26. package/core/tokens/m2/mat/_datepicker.scss +28 -38
  27. package/core/tokens/m2/mat/_divider.scss +5 -8
  28. package/core/tokens/m2/mat/_expansion.scss +24 -28
  29. package/core/tokens/m2/mat/_grid-list.scss +8 -8
  30. package/core/tokens/m2/mat/_icon.scss +3 -3
  31. package/core/tokens/m2/mat/_legacy-button-toggle.scss +15 -19
  32. package/core/tokens/m2/mat/_menu.scss +12 -17
  33. package/core/tokens/m2/mat/_select.scss +15 -29
  34. package/core/tokens/m2/mat/_sidenav.scss +12 -14
  35. package/core/tokens/m2/mat/_snack-bar.scss +7 -8
  36. package/core/tokens/m2/mat/_standard-button-toggle.scss +23 -22
  37. package/core/tokens/m2/mat/_stepper.scss +30 -33
  38. package/core/tokens/m2/mat/_tab-header-with-background.scss +6 -8
  39. package/core/tokens/m2/mat/_tab-header.scss +13 -18
  40. package/core/tokens/m2/mat/_table.scss +19 -23
  41. package/core/tokens/m2/mat/_toolbar.scss +12 -16
  42. package/core/tokens/m2/mdc/_chip.scss +38 -24
  43. package/core/tokens/m2/mdc/_circular-progress.scss +5 -6
  44. package/core/tokens/m2/mdc/_dialog.scss +16 -30
  45. package/core/tokens/m2/mdc/_icon-button.scss +2 -2
  46. package/core/tokens/m2/mdc/_plain-tooltip.scss +9 -22
  47. package/core/tokens/m2/mdc/_snack-bar.scss +10 -23
  48. package/core/tokens/m2/mdc/_tab-indicator.scss +5 -8
  49. package/core/tokens/m2/mdc/_tab.scss +5 -4
  50. package/core/typography/_all-typography.scss +44 -47
  51. package/core/typography/_typography.scss +32 -155
  52. package/core/typography/_versioning.scss +7 -2
  53. package/datepicker/_datepicker-theme.scss +20 -34
  54. package/dialog/_dialog-theme.scss +14 -25
  55. package/dialog/_mdc-dialog-structure-overrides.scss +12 -10
  56. package/dialog/index.d.ts +2 -0
  57. package/divider/_divider-theme.scss +12 -18
  58. package/esm2022/autocomplete/autocomplete-trigger.mjs +5 -17
  59. package/esm2022/autocomplete/autocomplete.mjs +23 -50
  60. package/esm2022/badge/badge.mjs +11 -29
  61. package/esm2022/button-toggle/button-toggle.mjs +25 -33
  62. package/esm2022/checkbox/checkbox.mjs +32 -39
  63. package/esm2022/core/option/optgroup.mjs +10 -11
  64. package/esm2022/core/option/option.mjs +6 -6
  65. package/esm2022/core/testing/option-harness.mjs +3 -3
  66. package/esm2022/core/version.mjs +1 -1
  67. package/esm2022/dialog/dialog-container.mjs +16 -3
  68. package/esm2022/menu/menu-item.mjs +15 -11
  69. package/esm2022/menu/menu.mjs +9 -22
  70. package/esm2022/slide-toggle/slide-toggle.mjs +33 -37
  71. package/esm2022/tabs/tab-group.mjs +3 -3
  72. package/expansion/_expansion-theme.scss +16 -24
  73. package/fesm2022/autocomplete.mjs +25 -63
  74. package/fesm2022/autocomplete.mjs.map +1 -1
  75. package/fesm2022/badge.mjs +11 -28
  76. package/fesm2022/badge.mjs.map +1 -1
  77. package/fesm2022/button-toggle.mjs +25 -32
  78. package/fesm2022/button-toggle.mjs.map +1 -1
  79. package/fesm2022/checkbox.mjs +31 -38
  80. package/fesm2022/checkbox.mjs.map +1 -1
  81. package/fesm2022/core/testing.mjs +2 -2
  82. package/fesm2022/core/testing.mjs.map +1 -1
  83. package/fesm2022/core.mjs +14 -13
  84. package/fesm2022/core.mjs.map +1 -1
  85. package/fesm2022/dialog.mjs +15 -2
  86. package/fesm2022/dialog.mjs.map +1 -1
  87. package/fesm2022/menu.mjs +23 -31
  88. package/fesm2022/menu.mjs.map +1 -1
  89. package/fesm2022/slide-toggle.mjs +33 -36
  90. package/fesm2022/slide-toggle.mjs.map +1 -1
  91. package/fesm2022/tabs.mjs +2 -2
  92. package/fesm2022/tabs.mjs.map +1 -1
  93. package/form-field/_form-field-sizing.scss +1 -1
  94. package/grid-list/_grid-list-theme.scss +12 -19
  95. package/icon/_icon-theme.scss +17 -25
  96. package/list/_list-theme.scss +1 -1
  97. package/menu/_menu-theme.scss +13 -22
  98. package/menu/index.d.ts +12 -18
  99. package/package.json +2 -2
  100. package/prebuilt-themes/deeppurple-amber.css +1 -1
  101. package/prebuilt-themes/indigo-pink.css +1 -1
  102. package/prebuilt-themes/pink-bluegrey.css +1 -1
  103. package/prebuilt-themes/purple-green.css +1 -1
  104. package/progress-spinner/_progress-spinner-theme.scss +16 -22
  105. package/schematics/ng-add/index.js +1 -1
  106. package/schematics/ng-add/index.mjs +1 -1
  107. package/schematics/ng-generate/mdc-migration/index_bundled.js +44 -44
  108. package/schematics/ng-generate/mdc-migration/index_bundled.js.map +1 -1
  109. package/schematics/ng-update/index_bundled.js +25 -25
  110. package/select/_select-theme.scss +17 -31
  111. package/sidenav/_sidenav-theme.scss +12 -18
  112. package/slide-toggle/index.d.ts +20 -23
  113. package/snack-bar/_snack-bar-theme.scss +15 -24
  114. package/sort/_sort-theme.scss +13 -22
  115. package/stepper/_stepper-theme.scss +16 -34
  116. package/table/_table-theme.scss +14 -25
  117. package/tabs/_tabs-theme.scss +31 -45
  118. package/toolbar/_toolbar-theme.scss +22 -31
  119. package/tooltip/_tooltip-theme.scss +15 -23
  120. package/tree/_tree-theme.scss +20 -29
  121. package/core/typography/_typography-deprecated.scss +0 -39
package/_index.scss CHANGED
@@ -11,8 +11,7 @@
11
11
  $gray-palette, $blue-grey-palette, $blue-gray-palette, $light-theme-background-palette,
12
12
  $dark-theme-background-palette, $light-theme-foreground-palette, $dark-theme-foreground-palette;
13
13
  @forward './core/typography/typography' show define-typography-level, define-rem-typography-config,
14
- define-typography-config, typography-hierarchy, define-legacy-typography-config,
15
- legacy-typography-hierarchy;
14
+ define-typography-config, typography-hierarchy, define-legacy-typography-config;
16
15
  @forward './core/typography/typography-utils' show typography-level,
17
16
  font-size, line-height, font-weight, letter-spacing, font-family, font-shorthand;
18
17
  @forward './core/tokens/m2' show m2-tokens-from-theme;
@@ -1,37 +1,31 @@
1
1
  @use '../core/theming/theming';
2
+ @use '../core/theming/inspection';
2
3
  @use '../core/typography/typography';
3
4
  @use '../core/style/sass-utils';
4
5
  @use '../core/tokens/token-utils';
5
6
  @use '../core/tokens/m2/mat/autocomplete' as tokens-mat-autocomplete;
6
7
 
7
- @mixin color($config-or-theme) {
8
- $config: theming.get-color-config($config-or-theme);
9
-
8
+ @mixin color($theme) {
10
9
  @include sass-utils.current-selector-or-root() {
11
10
  @include token-utils.create-token-values(tokens-mat-autocomplete.$prefix,
12
- tokens-mat-autocomplete.get-color-tokens($config));
11
+ tokens-mat-autocomplete.get-color-tokens($theme));
13
12
  }
14
13
  }
15
14
 
16
- @mixin typography($config-or-theme) {}
15
+ @mixin typography($theme) {}
17
16
 
18
- @mixin density($config-or-theme) {}
17
+ @mixin density($theme) {}
19
18
 
20
- @mixin theme($theme-or-color-config) {
21
- $theme: theming.private-legacy-get-theme($theme-or-color-config);
19
+ @mixin theme($theme) {
22
20
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-autocomplete') {
23
- $color: theming.get-color-config($theme);
24
- $density: theming.get-density-config($theme);
25
- $typography: theming.get-typography-config($theme);
26
-
27
- @if $color != null {
28
- @include color($color);
21
+ @if inspection.theme-has($theme, color) {
22
+ @include color($theme);
29
23
  }
30
- @if $density != null {
31
- @include density($density);
24
+ @if inspection.theme-has($theme, density) {
25
+ @include density($theme);
32
26
  }
33
- @if $typography != null {
34
- @include typography($typography);
27
+ @if inspection.theme-has($theme, typography) {
28
+ @include typography($theme);
35
29
  }
36
30
  }
37
31
  }
@@ -1,12 +1,8 @@
1
- import { _AbstractConstructor } from '@angular/material/core';
2
1
  import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
3
2
  import { AfterContentInit } from '@angular/core';
4
3
  import { AfterViewInit } from '@angular/core';
5
4
  import { AnimationEvent as AnimationEvent_2 } from '@angular/animations';
6
- import { BooleanInput } from '@angular/cdk/coercion';
7
- import { CanDisableRipple } from '@angular/material/core';
8
5
  import { ChangeDetectorRef } from '@angular/core';
9
- import { _Constructor } from '@angular/material/core';
10
6
  import { ControlValueAccessor } from '@angular/forms';
11
7
  import { Directionality } from '@angular/cdk/bidi';
12
8
  import { ElementRef } from '@angular/core';
@@ -95,7 +91,7 @@ export declare const MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER: {
95
91
  export declare const MAT_AUTOCOMPLETE_VALUE_ACCESSOR: any;
96
92
 
97
93
  /** Autocomplete component. */
98
- export declare class MatAutocomplete extends _MatAutocompleteMixinBase implements AfterContentInit, CanDisableRipple, OnDestroy {
94
+ export declare class MatAutocomplete implements AfterContentInit, OnDestroy {
99
95
  private _changeDetectorRef;
100
96
  private _elementRef;
101
97
  protected _defaults: MatAutocompleteDefaultOptions;
@@ -135,27 +131,23 @@ export declare class MatAutocomplete extends _MatAutocompleteMixinBase implement
135
131
  * Whether the first option should be highlighted when the autocomplete panel is opened.
136
132
  * Can be configured globally through the `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS` token.
137
133
  */
138
- get autoActiveFirstOption(): boolean;
139
- set autoActiveFirstOption(value: BooleanInput);
140
- private _autoActiveFirstOption;
134
+ autoActiveFirstOption: boolean;
141
135
  /** Whether the active option should be selected as the user is navigating. */
142
- get autoSelectActiveOption(): boolean;
143
- set autoSelectActiveOption(value: BooleanInput);
144
- private _autoSelectActiveOption;
136
+ autoSelectActiveOption: boolean;
145
137
  /**
146
138
  * Whether the user is required to make a selection when they're interacting with the
147
139
  * autocomplete. If the user moves away from the autocomplete without selecting an option from
148
140
  * the list, the value will be reset. If the user opens the panel and closes it without
149
141
  * interacting or selecting a value, the initial value will be kept.
150
142
  */
151
- get requireSelection(): boolean;
152
- set requireSelection(value: BooleanInput);
153
- private _requireSelection;
143
+ requireSelection: boolean;
154
144
  /**
155
145
  * Specify the width of the autocomplete panel. Can be any CSS sizing value, otherwise it will
156
146
  * match the width of its host.
157
147
  */
158
148
  panelWidth: string | number;
149
+ /** Whether ripples are disabled within the autocomplete panel. */
150
+ disableRipple: boolean;
159
151
  /** Event that is emitted whenever an option from the list is selected. */
160
152
  readonly optionSelected: EventEmitter<MatAutocompleteSelectedEvent>;
161
153
  /** Event that is emitted when the autocomplete panel is opened. */
@@ -174,7 +166,7 @@ export declare class MatAutocomplete extends _MatAutocompleteMixinBase implement
174
166
  };
175
167
  /** Whether checkmark indicator for single-selection options is hidden. */
176
168
  get hideSingleSelectionIndicator(): boolean;
177
- set hideSingleSelectionIndicator(value: BooleanInput);
169
+ set hideSingleSelectionIndicator(value: boolean);
178
170
  private _hideSingleSelectionIndicator;
179
171
  /** Syncs the parent state with the individual options. */
180
172
  _syncParentProperties(): void;
@@ -207,7 +199,12 @@ export declare class MatAutocomplete extends _MatAutocompleteMixinBase implement
207
199
  private _setThemeClasses;
208
200
  protected _skipPredicate(): boolean;
209
201
  static ɵfac: i0.ɵɵFactoryDeclaration<MatAutocomplete, never>;
210
- static ɵcmp: i0.ɵɵComponentDeclaration<MatAutocomplete, "mat-autocomplete", ["matAutocomplete"], { "disableRipple": { "alias": "disableRipple"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "displayWith": { "alias": "displayWith"; "required": false; }; "autoActiveFirstOption": { "alias": "autoActiveFirstOption"; "required": false; }; "autoSelectActiveOption": { "alias": "autoSelectActiveOption"; "required": false; }; "requireSelection": { "alias": "requireSelection"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "hideSingleSelectionIndicator": { "alias": "hideSingleSelectionIndicator"; "required": false; }; }, { "optionSelected": "optionSelected"; "opened": "opened"; "closed": "closed"; "optionActivated": "optionActivated"; }, ["options", "optionGroups"], ["*"], false, never>;
202
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatAutocomplete, "mat-autocomplete", ["matAutocomplete"], { "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "displayWith": { "alias": "displayWith"; "required": false; }; "autoActiveFirstOption": { "alias": "autoActiveFirstOption"; "required": false; }; "autoSelectActiveOption": { "alias": "autoSelectActiveOption"; "required": false; }; "requireSelection": { "alias": "requireSelection"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "hideSingleSelectionIndicator": { "alias": "hideSingleSelectionIndicator"; "required": false; }; }, { "optionSelected": "optionSelected"; "opened": "opened"; "closed": "closed"; "optionActivated": "optionActivated"; }, ["options", "optionGroups"], ["*"], false, never>;
203
+ static ngAcceptInputType_autoActiveFirstOption: unknown;
204
+ static ngAcceptInputType_autoSelectActiveOption: unknown;
205
+ static ngAcceptInputType_requireSelection: unknown;
206
+ static ngAcceptInputType_disableRipple: unknown;
207
+ static ngAcceptInputType_hideSingleSelectionIndicator: unknown;
211
208
  }
212
209
 
213
210
  /** Event object that is emitted when an autocomplete option is activated. */
@@ -235,11 +232,6 @@ export declare interface MatAutocompleteDefaultOptions {
235
232
  hideSingleSelectionIndicator?: boolean;
236
233
  }
237
234
 
238
- /** @docs-private */
239
- declare const _MatAutocompleteMixinBase: _Constructor<CanDisableRipple> & _AbstractConstructor<CanDisableRipple> & {
240
- new (): {};
241
- };
242
-
243
235
  export declare class MatAutocompleteModule {
244
236
  static ɵfac: i0.ɵɵFactoryDeclaration<MatAutocompleteModule, never>;
245
237
  static ɵmod: i0.ɵɵNgModuleDeclaration<MatAutocompleteModule, [typeof i1.MatAutocomplete, typeof i2.MatAutocompleteTrigger, typeof i3.MatAutocompleteOrigin], [typeof i4.OverlayModule, typeof i5.MatOptionModule, typeof i5.MatCommonModule, typeof i6.CommonModule], [typeof i7.CdkScrollableModule, typeof i1.MatAutocomplete, typeof i5.MatOptionModule, typeof i5.MatCommonModule, typeof i2.MatAutocompleteTrigger, typeof i3.MatAutocompleteOrigin]>;
@@ -288,7 +280,6 @@ export declare class MatAutocompleteTrigger implements ControlValueAccessor, Aft
288
280
  private _overlayRef;
289
281
  private _portal;
290
282
  private _componentDestroyed;
291
- private _autocompleteDisabled;
292
283
  private _scrollStrategy;
293
284
  private _keydownSubscription;
294
285
  private _outsideClickSubscription;
@@ -352,8 +343,7 @@ export declare class MatAutocompleteTrigger implements ControlValueAccessor, Aft
352
343
  * Whether the autocomplete is disabled. When disabled, the element will
353
344
  * act as a regular input and the user won't be able to open the panel.
354
345
  */
355
- get autocompleteDisabled(): boolean;
356
- set autocompleteDisabled(value: BooleanInput);
346
+ autocompleteDisabled: boolean;
357
347
  constructor(_element: ElementRef<HTMLInputElement>, _overlay: Overlay, _viewContainerRef: ViewContainerRef, _zone: NgZone, _changeDetectorRef: ChangeDetectorRef, scrollStrategy: any, _dir: Directionality | null, _formField: MatFormField | null, _document: any, _viewportRuler: ViewportRuler, _defaults?: MatAutocompleteDefaultOptions | null | undefined);
358
348
  /** Class to apply to the panel when it's above the input. */
359
349
  private _aboveClass;
@@ -481,6 +471,7 @@ export declare class MatAutocompleteTrigger implements ControlValueAccessor, Aft
481
471
  private _clearFromModal;
482
472
  static ɵfac: i0.ɵɵFactoryDeclaration<MatAutocompleteTrigger, [null, null, null, null, null, null, { optional: true; }, { optional: true; host: true; }, { optional: true; }, null, { optional: true; }]>;
483
473
  static ɵdir: i0.ɵɵDirectiveDeclaration<MatAutocompleteTrigger, "input[matAutocomplete], textarea[matAutocomplete]", ["matAutocompleteTrigger"], { "autocomplete": { "alias": "matAutocomplete"; "required": false; }; "position": { "alias": "matAutocompletePosition"; "required": false; }; "connectedTo": { "alias": "matAutocompleteConnectedTo"; "required": false; }; "autocompleteAttribute": { "alias": "autocomplete"; "required": false; }; "autocompleteDisabled": { "alias": "matAutocompleteDisabled"; "required": false; }; }, {}, never, never, false, never>;
474
+ static ngAcceptInputType_autocompleteDisabled: unknown;
484
475
  }
485
476
 
486
477
  export { }
@@ -1,9 +1,9 @@
1
1
  @use 'sass:color';
2
- @use 'sass:map';
3
2
  @use 'sass:math';
4
3
  @use '@angular/cdk';
5
4
 
6
5
  @use '../core/theming/theming';
6
+ @use '../core/theming/inspection';
7
7
  @use '../core/typography/typography';
8
8
  @use '../core/tokens/m2/mat/badge' as tokens-mat-badge;
9
9
  @use '../core/tokens/token-utils';
@@ -164,46 +164,34 @@ $_emit-fallback-vars: true;
164
164
  }
165
165
  }
166
166
 
167
- @mixin color($config-or-theme) {
168
- $config: theming.get-color-config($config-or-theme);
169
- $accent: map.get($config, accent);
170
- $warn: map.get($config, warn);
171
-
167
+ @mixin color($theme) {
172
168
  @include sass-utils.current-selector-or-root() {
173
169
  @include token-utils.create-token-values(tokens-mat-badge.$prefix,
174
- tokens-mat-badge.get-color-tokens($config));
170
+ tokens-mat-badge.get-color-tokens($theme));
175
171
  }
176
172
 
177
173
  .mat-badge-accent {
178
174
  @include token-utils.create-token-values(tokens-mat-badge.$prefix,
179
- tokens-mat-badge.private-get-color-palette-color-tokens($accent));
175
+ tokens-mat-badge.private-get-color-palette-color-tokens($theme, accent));
180
176
  }
181
177
 
182
178
  .mat-badge-warn {
183
179
  @include token-utils.create-token-values(tokens-mat-badge.$prefix,
184
- tokens-mat-badge.private-get-color-palette-color-tokens($warn));
180
+ tokens-mat-badge.private-get-color-palette-color-tokens($theme, warn));
185
181
  }
186
182
  }
187
183
 
188
- @mixin typography($config-or-theme) {
189
- $config: typography.private-typography-to-2014-config(
190
- theming.get-typography-config($config-or-theme));
191
-
184
+ @mixin typography($theme) {
192
185
  @include sass-utils.current-selector-or-root() {
193
186
  @include token-utils.create-token-values(tokens-mat-badge.$prefix,
194
- tokens-mat-badge.get-typography-tokens($config));
187
+ tokens-mat-badge.get-typography-tokens($theme));
195
188
  }
196
189
  }
197
190
 
198
- @mixin density($config-or-theme) {}
191
+ @mixin density($theme) {}
199
192
 
200
- @mixin theme($theme-or-color-config) {
201
- $theme: theming.private-legacy-get-theme($theme-or-color-config);
193
+ @mixin theme($theme) {
202
194
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-badge') {
203
- $color: theming.get-color-config($theme);
204
- $density: theming.get-density-config($theme);
205
- $typography: theming.get-typography-config($theme);
206
-
207
195
  // Try to reduce the number of times that the structural styles are emitted.
208
196
  @if not $_badge-structure-emitted {
209
197
  @include _badge-structure;
@@ -216,14 +204,14 @@ $_emit-fallback-vars: true;
216
204
  }
217
205
  }
218
206
 
219
- @if $color != null {
220
- @include color($color);
207
+ @if inspection.theme-has($theme, color) {
208
+ @include color($theme);
221
209
  }
222
- @if $density != null {
223
- @include density($density);
210
+ @if inspection.theme-has($theme, density) {
211
+ @include density($theme);
224
212
  }
225
- @if $typography != null {
226
- @include typography($typography);
213
+ @if inspection.theme-has($theme, typography) {
214
+ @include typography($theme);
227
215
  }
228
216
  }
229
217
  }
package/badge/index.d.ts CHANGED
@@ -1,8 +1,4 @@
1
- import { _AbstractConstructor } from '@angular/material/core';
2
1
  import { AriaDescriber } from '@angular/cdk/a11y';
3
- import { BooleanInput } from '@angular/cdk/coercion';
4
- import { CanDisable } from '@angular/material/core';
5
- import { _Constructor } from '@angular/material/core';
6
2
  import { ElementRef } from '@angular/core';
7
3
  import * as i0 from '@angular/core';
8
4
  import * as i2 from '@angular/cdk/a11y';
@@ -22,7 +18,7 @@ declare namespace i1 {
22
18
  }
23
19
 
24
20
  /** Directive to display a text badge. */
25
- export declare class MatBadge extends _MatBadgeBase implements OnInit, OnDestroy, CanDisable {
21
+ export declare class MatBadge implements OnInit, OnDestroy {
26
22
  private _ngZone;
27
23
  private _elementRef;
28
24
  private _ariaDescriber;
@@ -33,9 +29,9 @@ export declare class MatBadge extends _MatBadgeBase implements OnInit, OnDestroy
33
29
  set color(value: ThemePalette);
34
30
  private _color;
35
31
  /** Whether the badge should overlap its contents or not */
36
- get overlap(): boolean;
37
- set overlap(val: BooleanInput);
38
- private _overlap;
32
+ overlap: boolean;
33
+ /** Whether the badge is disabled. */
34
+ disabled: boolean;
39
35
  /**
40
36
  * Position the badge should reside.
41
37
  * Accepts any combination of 'above'|'below' and 'before'|'after'
@@ -52,9 +48,7 @@ export declare class MatBadge extends _MatBadgeBase implements OnInit, OnDestroy
52
48
  /** Size of the badge. Can be 'small', 'medium', or 'large'. */
53
49
  size: MatBadgeSize;
54
50
  /** Whether the badge is hidden. */
55
- get hidden(): boolean;
56
- set hidden(val: BooleanInput);
57
- private _hidden;
51
+ hidden: boolean;
58
52
  /** Unique id for the badge */
59
53
  _id: number;
60
54
  /** Visible badge element. */
@@ -93,14 +87,12 @@ export declare class MatBadge extends _MatBadgeBase implements OnInit, OnDestroy
93
87
  /** Clears any existing badges that might be left over from server-side rendering. */
94
88
  private _clearExistingBadges;
95
89
  static ɵfac: i0.ɵɵFactoryDeclaration<MatBadge, [null, null, null, null, { optional: true; }]>;
96
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatBadge, "[matBadge]", never, { "disabled": { "alias": "matBadgeDisabled"; "required": false; }; "color": { "alias": "matBadgeColor"; "required": false; }; "overlap": { "alias": "matBadgeOverlap"; "required": false; }; "position": { "alias": "matBadgePosition"; "required": false; }; "content": { "alias": "matBadge"; "required": false; }; "description": { "alias": "matBadgeDescription"; "required": false; }; "size": { "alias": "matBadgeSize"; "required": false; }; "hidden": { "alias": "matBadgeHidden"; "required": false; }; }, {}, never, never, false, never>;
90
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatBadge, "[matBadge]", never, { "color": { "alias": "matBadgeColor"; "required": false; }; "overlap": { "alias": "matBadgeOverlap"; "required": false; }; "disabled": { "alias": "matBadgeDisabled"; "required": false; }; "position": { "alias": "matBadgePosition"; "required": false; }; "content": { "alias": "matBadge"; "required": false; }; "description": { "alias": "matBadgeDescription"; "required": false; }; "size": { "alias": "matBadgeSize"; "required": false; }; "hidden": { "alias": "matBadgeHidden"; "required": false; }; }, {}, never, never, false, never>;
91
+ static ngAcceptInputType_overlap: unknown;
92
+ static ngAcceptInputType_disabled: unknown;
93
+ static ngAcceptInputType_hidden: unknown;
97
94
  }
98
95
 
99
- /** @docs-private */
100
- declare const _MatBadgeBase: _Constructor<CanDisable> & _AbstractConstructor<CanDisable> & {
101
- new (): {};
102
- };
103
-
104
96
  export declare class MatBadgeModule {
105
97
  static ɵfac: i0.ɵɵFactoryDeclaration<MatBadgeModule, never>;
106
98
  static ɵmod: i0.ɵɵNgModuleDeclaration<MatBadgeModule, [typeof i1.MatBadge], [typeof i2.A11yModule, typeof i3.MatCommonModule], [typeof i1.MatBadge, typeof i3.MatCommonModule]>;
@@ -1,45 +1,36 @@
1
1
  @use '../core/typography/typography';
2
2
  @use '../core/theming/theming';
3
+ @use '../core/theming/inspection';
3
4
  @use '../core/style/sass-utils';
4
5
  @use '../core/tokens/token-utils';
5
6
  @use '../core/tokens/m2/mat/bottom-sheet' as tokens-mat-bottom-sheet;
6
7
 
7
- @mixin color($config-or-theme) {
8
- $config: theming.get-color-config($config-or-theme);
9
-
8
+ @mixin color($theme) {
10
9
  @include sass-utils.current-selector-or-root() {
11
10
  @include token-utils.create-token-values(tokens-mat-bottom-sheet.$prefix,
12
- tokens-mat-bottom-sheet.get-color-tokens($config));
11
+ tokens-mat-bottom-sheet.get-color-tokens($theme));
13
12
  }
14
13
  }
15
14
 
16
- @mixin typography($config-or-theme) {
17
- $config: typography.private-typography-to-2014-config(
18
- theming.get-typography-config($config-or-theme));
19
-
15
+ @mixin typography($theme) {
20
16
  @include sass-utils.current-selector-or-root() {
21
17
  @include token-utils.create-token-values(tokens-mat-bottom-sheet.$prefix,
22
- tokens-mat-bottom-sheet.get-typography-tokens($config));
18
+ tokens-mat-bottom-sheet.get-typography-tokens($theme));
23
19
  }
24
20
  }
25
21
 
26
- @mixin density($config-or-theme) {}
22
+ @mixin density($theme) {}
27
23
 
28
- @mixin theme($theme-or-color-config) {
29
- $theme: theming.private-legacy-get-theme($theme-or-color-config);
24
+ @mixin theme($theme) {
30
25
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-bottom-sheet') {
31
- $color: theming.get-color-config($theme);
32
- $density: theming.get-density-config($theme);
33
- $typography: theming.get-typography-config($theme);
34
-
35
- @if $color != null {
36
- @include color($color);
26
+ @if inspection.theme-has($theme, color) {
27
+ @include color($theme);
37
28
  }
38
- @if $density != null {
39
- @include density($density);
29
+ @if inspection.theme-has($theme, density) {
30
+ @include density($theme);
40
31
  }
41
- @if $typography != null {
42
- @include typography($typography);
32
+ @if inspection.theme-has($theme, typography) {
33
+ @include typography($theme);
43
34
  }
44
35
  }
45
36
  }
@@ -1,59 +1,48 @@
1
1
  @use '../core/theming/theming';
2
+ @use '../core/theming/inspection';
2
3
  @use '../core/typography/typography';
3
4
  @use '../core/tokens/m2/mat/legacy-button-toggle' as tokens-mat-legacy-button-toggle;
4
5
  @use '../core/tokens/m2/mat/standard-button-toggle' as tokens-mat-standard-button-toggle;
5
6
  @use '../core/tokens/token-utils';
6
7
  @use '../core/style/sass-utils';
7
8
 
8
- @mixin color($config-or-theme) {
9
- $config: theming.get-color-config($config-or-theme);
10
-
9
+ @mixin color($theme) {
11
10
  @include sass-utils.current-selector-or-root() {
12
11
  @include token-utils.create-token-values(tokens-mat-legacy-button-toggle.$prefix,
13
- tokens-mat-legacy-button-toggle.get-color-tokens($config));
12
+ tokens-mat-legacy-button-toggle.get-color-tokens($theme));
14
13
  @include token-utils.create-token-values(tokens-mat-standard-button-toggle.$prefix,
15
- tokens-mat-standard-button-toggle.get-color-tokens($config));
14
+ tokens-mat-standard-button-toggle.get-color-tokens($theme));
16
15
  }
17
16
  }
18
17
 
19
- @mixin typography($config-or-theme) {
20
- $config: typography.private-typography-to-2014-config(
21
- theming.get-typography-config($config-or-theme));
22
-
18
+ @mixin typography($theme) {
23
19
  @include sass-utils.current-selector-or-root() {
24
20
  @include token-utils.create-token-values(tokens-mat-legacy-button-toggle.$prefix,
25
- tokens-mat-legacy-button-toggle.get-typography-tokens($config));
21
+ tokens-mat-legacy-button-toggle.get-typography-tokens($theme));
26
22
  @include token-utils.create-token-values(tokens-mat-standard-button-toggle.$prefix,
27
- tokens-mat-standard-button-toggle.get-typography-tokens($config));
23
+ tokens-mat-standard-button-toggle.get-typography-tokens($theme));
28
24
  }
29
25
  }
30
26
 
31
- @mixin density($config-or-theme) {
32
- $density-scale: theming.get-density-config($config-or-theme);
33
-
27
+ @mixin density($theme) {
34
28
  @include sass-utils.current-selector-or-root() {
35
29
  @include token-utils.create-token-values(tokens-mat-legacy-button-toggle.$prefix,
36
- tokens-mat-legacy-button-toggle.get-density-tokens($density-scale));
30
+ tokens-mat-legacy-button-toggle.get-density-tokens($theme));
37
31
  @include token-utils.create-token-values(tokens-mat-standard-button-toggle.$prefix,
38
- tokens-mat-standard-button-toggle.get-density-tokens($density-scale));
32
+ tokens-mat-standard-button-toggle.get-density-tokens($theme));
39
33
  }
40
34
  }
41
35
 
42
- @mixin theme($theme-or-color-config) {
43
- $theme: theming.private-legacy-get-theme($theme-or-color-config);
36
+ @mixin theme($theme) {
44
37
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-button-toggle') {
45
- $color: theming.get-color-config($theme);
46
- $density: theming.get-density-config($theme);
47
- $typography: theming.get-typography-config($theme);
48
-
49
- @if $color != null {
50
- @include color($color);
38
+ @if inspection.theme-has($theme, color) {
39
+ @include color($theme);
51
40
  }
52
- @if $density != null {
53
- @include density($density);
41
+ @if inspection.theme-has($theme, density) {
42
+ @include density($theme);
54
43
  }
55
- @if $typography != null {
56
- @include typography($typography);
44
+ @if inspection.theme-has($theme, typography) {
45
+ @include typography($theme);
57
46
  }
58
47
  }
59
48
  }
@@ -1,10 +1,6 @@
1
- import { _AbstractConstructor } from '@angular/material/core';
2
1
  import { AfterContentInit } from '@angular/core';
3
2
  import { AfterViewInit } from '@angular/core';
4
- import { BooleanInput } from '@angular/cdk/coercion';
5
- import { CanDisableRipple } from '@angular/material/core';
6
3
  import { ChangeDetectorRef } from '@angular/core';
7
- import { _Constructor } from '@angular/material/core';
8
4
  import { ControlValueAccessor } from '@angular/forms';
9
5
  import { ElementRef } from '@angular/core';
10
6
  import { EventEmitter } from '@angular/core';
@@ -51,7 +47,7 @@ export declare const MAT_BUTTON_TOGGLE_GROUP: InjectionToken<MatButtonToggleGrou
51
47
  export declare const MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR: any;
52
48
 
53
49
  /** Single button inside of a toggle group. */
54
- export declare class MatButtonToggle extends _MatButtonToggleBase implements OnInit, AfterViewInit, CanDisableRipple, OnDestroy {
50
+ export declare class MatButtonToggle implements OnInit, AfterViewInit, OnDestroy {
55
51
  private _changeDetectorRef;
56
52
  private _elementRef;
57
53
  private _focusMonitor;
@@ -79,16 +75,18 @@ export declare class MatButtonToggle extends _MatButtonToggleBase implements OnI
79
75
  value: any;
80
76
  /** Tabindex for the toggle. */
81
77
  tabIndex: number | null;
78
+ /** Whether ripples are disabled on the button toggle. */
79
+ disableRipple: boolean;
82
80
  /** The appearance style of the button. */
83
81
  get appearance(): MatButtonToggleAppearance;
84
82
  set appearance(value: MatButtonToggleAppearance);
85
83
  private _appearance;
86
84
  /** Whether the button is checked. */
87
85
  get checked(): boolean;
88
- set checked(value: BooleanInput);
86
+ set checked(value: boolean);
89
87
  /** Whether the button is disabled. */
90
88
  get disabled(): boolean;
91
- set disabled(value: BooleanInput);
89
+ set disabled(value: boolean);
92
90
  private _disabled;
93
91
  /** Event emitted when the group value changes. */
94
92
  readonly change: EventEmitter<MatButtonToggleChange>;
@@ -111,17 +109,15 @@ export declare class MatButtonToggle extends _MatButtonToggleBase implements OnI
111
109
  /** Whether the toggle is in single selection mode. */
112
110
  private _isSingleSelector;
113
111
  static ɵfac: i0.ɵɵFactoryDeclaration<MatButtonToggle, [{ optional: true; }, null, null, null, { attribute: "tabindex"; }, { optional: true; }]>;
114
- static ɵcmp: i0.ɵɵComponentDeclaration<MatButtonToggle, "mat-button-toggle", ["matButtonToggle"], { "disableRipple": { "alias": "disableRipple"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "value": { "alias": "value"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "change": "change"; }, never, ["*"], false, never>;
112
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatButtonToggle, "mat-button-toggle", ["matButtonToggle"], { "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "value": { "alias": "value"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "change": "change"; }, never, ["*"], false, never>;
113
+ static ngAcceptInputType_disableRipple: unknown;
114
+ static ngAcceptInputType_checked: unknown;
115
+ static ngAcceptInputType_disabled: unknown;
115
116
  }
116
117
 
117
118
  /** Possible appearance styles for the button toggle. */
118
119
  export declare type MatButtonToggleAppearance = 'legacy' | 'standard';
119
120
 
120
- /** @docs-private */
121
- declare const _MatButtonToggleBase: _Constructor<CanDisableRipple> & _AbstractConstructor<CanDisableRipple> & {
122
- new (): {};
123
- };
124
-
125
121
  /** Change event object emitted by button toggle. */
126
122
  export declare class MatButtonToggleChange {
127
123
  /** The button toggle that emits the event. */
@@ -150,7 +146,6 @@ export declare interface MatButtonToggleDefaultOptions {
150
146
  /** Exclusive selection button toggle group that behaves like a radio-button group. */
151
147
  export declare class MatButtonToggleGroup implements ControlValueAccessor, OnInit, AfterContentInit {
152
148
  private _changeDetector;
153
- private _vertical;
154
149
  private _multiple;
155
150
  private _disabled;
156
151
  private _selectionModel;
@@ -177,8 +172,7 @@ export declare class MatButtonToggleGroup implements ControlValueAccessor, OnIni
177
172
  set name(value: string);
178
173
  private _name;
179
174
  /** Whether the toggle group is vertical. */
180
- get vertical(): boolean;
181
- set vertical(value: BooleanInput);
175
+ vertical: boolean;
182
176
  /** Value of the toggle group. */
183
177
  get value(): any;
184
178
  set value(newValue: any);
@@ -192,10 +186,10 @@ export declare class MatButtonToggleGroup implements ControlValueAccessor, OnIni
192
186
  get selected(): MatButtonToggle | MatButtonToggle[];
193
187
  /** Whether multiple button toggles can be selected. */
194
188
  get multiple(): boolean;
195
- set multiple(value: BooleanInput);
189
+ set multiple(value: boolean);
196
190
  /** Whether multiple button toggle group is disabled. */
197
191
  get disabled(): boolean;
198
- set disabled(value: BooleanInput);
192
+ set disabled(value: boolean);
199
193
  /** Event emitted when the group's value changes. */
200
194
  readonly change: EventEmitter<MatButtonToggleChange>;
201
195
  constructor(_changeDetector: ChangeDetectorRef, defaultOptions?: MatButtonToggleDefaultOptions);
@@ -235,6 +229,9 @@ export declare class MatButtonToggleGroup implements ControlValueAccessor, OnIni
235
229
  private _markButtonsForCheck;
236
230
  static ɵfac: i0.ɵɵFactoryDeclaration<MatButtonToggleGroup, [null, { optional: true; }]>;
237
231
  static ɵdir: i0.ɵɵDirectiveDeclaration<MatButtonToggleGroup, "mat-button-toggle-group", ["matButtonToggleGroup"], { "appearance": { "alias": "appearance"; "required": false; }; "name": { "alias": "name"; "required": false; }; "vertical": { "alias": "vertical"; "required": false; }; "value": { "alias": "value"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; "change": "change"; }, ["_buttonToggles"], never, false, never>;
232
+ static ngAcceptInputType_vertical: unknown;
233
+ static ngAcceptInputType_multiple: unknown;
234
+ static ngAcceptInputType_disabled: unknown;
238
235
  }
239
236
 
240
237
  export declare class MatButtonToggleModule {