@angular/material 20.0.0-next.1 → 20.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 (127) hide show
  1. package/autocomplete/_autocomplete-theme.scss +4 -4
  2. package/autocomplete/index.d.ts +4 -0
  3. package/badge/_badge-theme.scss +5 -5
  4. package/bottom-sheet/_bottom-sheet-theme.scss +3 -3
  5. package/button/_button-theme.scss +84 -32
  6. package/button/_fab-theme.scss +13 -13
  7. package/button/_icon-button-theme.scss +5 -5
  8. package/button/index.d.ts +1 -1
  9. package/button/testing/index.d.ts +9 -2
  10. package/button-toggle/_button-toggle-theme.scss +8 -8
  11. package/card/_card-theme.scss +12 -12
  12. package/checkbox/_checkbox-theme.scss +10 -10
  13. package/chips/_chips-theme.scss +14 -14
  14. package/core/_core-theme.scss +2 -2
  15. package/core/option/_optgroup-theme.scss +2 -2
  16. package/core/option/_option-theme.scss +4 -4
  17. package/core/ripple/_ripple-theme.scss +3 -3
  18. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +4 -4
  19. package/core/theming/_color-api-backwards-compatibility.scss +19 -8
  20. package/core/tokens/_density.scss +3 -0
  21. package/core/tokens/_token-definition.scss +1 -2
  22. package/core/tokens/_token-utils.scss +20 -5
  23. package/core/tokens/m2/_index.scss +2 -0
  24. package/core/tokens/m2/mat/_tonal-button.scss +110 -0
  25. package/core/tokens/m3/_index.scss +2 -0
  26. package/core/tokens/m3/definitions/_index.scss +1 -1
  27. package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +3 -1
  28. package/core/tokens/m3/definitions/_md-sys-color.scss +44 -2
  29. package/core/tokens/m3/definitions/_md-sys-typescale.scss +20 -1
  30. package/core/tokens/m3/mat/_tonal-button.scss +101 -0
  31. package/datepicker/_datepicker-theme.scss +8 -7
  32. package/datepicker/index.d.ts +1 -1
  33. package/dialog/_dialog-theme.scss +6 -6
  34. package/divider/_divider-theme.scss +2 -2
  35. package/expansion/_expansion-theme.scss +4 -4
  36. package/fesm2022/autocomplete.mjs +3 -0
  37. package/fesm2022/autocomplete.mjs.map +1 -1
  38. package/fesm2022/button/testing.mjs +34 -15
  39. package/fesm2022/button/testing.mjs.map +1 -1
  40. package/fesm2022/button.mjs +2 -2
  41. package/fesm2022/core.mjs +1 -1
  42. package/fesm2022/core.mjs.map +1 -1
  43. package/fesm2022/{date-range-input-harness-ee47cdb0.mjs → date-range-input-harness-de70be6a.mjs} +2 -2
  44. package/fesm2022/{date-range-input-harness-ee47cdb0.mjs.map → date-range-input-harness-de70be6a.mjs.map} +1 -1
  45. package/fesm2022/datepicker/testing.mjs +3 -3
  46. package/fesm2022/datepicker.mjs +8 -8
  47. package/fesm2022/datepicker.mjs.map +1 -1
  48. package/fesm2022/dialog/testing.mjs.map +1 -1
  49. package/fesm2022/divider/testing.mjs +1 -1
  50. package/fesm2022/{divider-harness-3394f29a.mjs → divider-harness-8099453f.mjs} +1 -1
  51. package/fesm2022/divider-harness-8099453f.mjs.map +1 -0
  52. package/fesm2022/expansion/testing.mjs.map +1 -1
  53. package/fesm2022/form-field/testing/control.mjs +1 -1
  54. package/fesm2022/form-field/testing.mjs +4 -4
  55. package/fesm2022/form-field/testing.mjs.map +1 -1
  56. package/fesm2022/{form-field-control-harness-af6fd278.mjs → form-field-control-harness-efefd4cf.mjs} +1 -1
  57. package/fesm2022/form-field-control-harness-efefd4cf.mjs.map +1 -0
  58. package/fesm2022/grid-list/testing.mjs.map +1 -1
  59. package/fesm2022/icon-button-0850d958.mjs +211 -0
  60. package/fesm2022/icon-button-0850d958.mjs.map +1 -0
  61. package/fesm2022/input/testing.mjs +2 -2
  62. package/fesm2022/input/testing.mjs.map +1 -1
  63. package/fesm2022/{input-harness-ed59decc.mjs → input-harness-e68bb132.mjs} +2 -2
  64. package/fesm2022/input-harness-e68bb132.mjs.map +1 -0
  65. package/fesm2022/list/testing.mjs +1 -1
  66. package/fesm2022/list/testing.mjs.map +1 -1
  67. package/fesm2022/{module-3bf2775f.mjs → module-1c16a0a9.mjs} +3 -3
  68. package/fesm2022/{module-3bf2775f.mjs.map → module-1c16a0a9.mjs.map} +1 -1
  69. package/fesm2022/module-cf951a02.mjs +214 -0
  70. package/fesm2022/module-cf951a02.mjs.map +1 -0
  71. package/fesm2022/paginator/testing.mjs +2 -2
  72. package/fesm2022/paginator.mjs +5 -5
  73. package/fesm2022/paginator.mjs.map +1 -1
  74. package/fesm2022/select/testing.mjs +2 -2
  75. package/fesm2022/{select-harness-8c55824d.mjs → select-harness-69d47123.mjs} +2 -2
  76. package/fesm2022/{select-harness-8c55824d.mjs.map → select-harness-69d47123.mjs.map} +1 -1
  77. package/fesm2022/select.mjs +1 -1
  78. package/fesm2022/slider.mjs +5 -2
  79. package/fesm2022/slider.mjs.map +1 -1
  80. package/fesm2022/snack-bar.mjs +4 -4
  81. package/fesm2022/snack-bar.mjs.map +1 -1
  82. package/fesm2022/timepicker.mjs +8 -4
  83. package/fesm2022/timepicker.mjs.map +1 -1
  84. package/form-field/_form-field-theme.scss +16 -16
  85. package/grid-list/_grid-list-theme.scss +1 -1
  86. package/icon/_icon-theme.scss +2 -2
  87. package/list/_list-theme.scss +15 -15
  88. package/menu/_menu-theme.scss +3 -3
  89. package/{module.d-18a67f56.d.ts → module.d-792a497c.d.ts} +33 -26
  90. package/package.json +2 -2
  91. package/paginator/_paginator-theme.scss +3 -3
  92. package/paginator/index.d.ts +1 -1
  93. package/prebuilt-themes/deeppurple-amber.css +1 -1
  94. package/prebuilt-themes/indigo-pink.css +1 -1
  95. package/prebuilt-themes/pink-bluegrey.css +1 -1
  96. package/prebuilt-themes/purple-green.css +1 -1
  97. package/progress-bar/_progress-bar-theme.scss +2 -2
  98. package/progress-spinner/_progress-spinner-theme.scss +4 -4
  99. package/radio/_radio-theme.scss +12 -12
  100. package/schematics/ng-add/index.js +1 -1
  101. package/schematics/ng-add/index.mjs +1 -1
  102. package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +2 -2
  103. package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
  104. package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
  105. package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +2 -2
  106. package/select/_select-theme.scss +6 -6
  107. package/sidenav/_sidenav-theme.scss +2 -2
  108. package/slide-toggle/_slide-toggle-theme.scss +10 -10
  109. package/slider/_slider-theme.scss +10 -10
  110. package/snack-bar/_snack-bar-theme.scss +4 -4
  111. package/snack-bar/index.d.ts +1 -1
  112. package/sort/_sort-theme.scss +3 -3
  113. package/stepper/_stepper-theme.scss +5 -5
  114. package/table/_table-theme.scss +4 -4
  115. package/tabs/_tabs-theme.scss +16 -16
  116. package/timepicker/_timepicker-theme.scss +4 -4
  117. package/toolbar/_toolbar-theme.scss +4 -4
  118. package/tooltip/_tooltip-theme.scss +4 -4
  119. package/tree/_tree-theme.scss +3 -3
  120. package/fesm2022/divider-harness-3394f29a.mjs.map +0 -1
  121. package/fesm2022/form-field-control-harness-af6fd278.mjs.map +0 -1
  122. package/fesm2022/icon-button-47f1b5d9.mjs +0 -248
  123. package/fesm2022/icon-button-47f1b5d9.mjs.map +0 -1
  124. package/fesm2022/input-harness-ed59decc.mjs.map +0 -1
  125. package/fesm2022/module-df9f7af3.mjs +0 -152
  126. package/fesm2022/module-df9f7af3.mjs.map +0 -1
  127. /package/core/tokens/m3/definitions/{unused/_md-comp-filled-tonal-button.scss → _md-comp-filled-tonal-button.scss} +0 -0
@@ -12,7 +12,7 @@
12
12
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
13
13
  } @else {
14
14
  @include sass-utils.current-selector-or-root() {
15
- @include token-utils.create-token-values(
15
+ @include token-utils.create-token-values-mixed(
16
16
  tokens-mat-autocomplete.$prefix,
17
17
  tokens-mat-autocomplete.get-unthemable-tokens()
18
18
  );
@@ -25,7 +25,7 @@
25
25
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
26
26
  } @else {
27
27
  @include sass-utils.current-selector-or-root() {
28
- @include token-utils.create-token-values(
28
+ @include token-utils.create-token-values-mixed(
29
29
  tokens-mat-autocomplete.$prefix,
30
30
  tokens-mat-autocomplete.get-color-tokens($theme)
31
31
  );
@@ -38,7 +38,7 @@
38
38
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
39
39
  } @else {
40
40
  @include sass-utils.current-selector-or-root() {
41
- @include token-utils.create-token-values(
41
+ @include token-utils.create-token-values-mixed(
42
42
  tokens-mat-autocomplete.$prefix,
43
43
  tokens-mat-autocomplete.get-typography-tokens($theme)
44
44
  );
@@ -51,7 +51,7 @@
51
51
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
52
52
  } @else {
53
53
  @include sass-utils.current-selector-or-root() {
54
- @include token-utils.create-token-values(
54
+ @include token-utils.create-token-values-mixed(
55
55
  tokens-mat-autocomplete.$prefix,
56
56
  tokens-mat-autocomplete.get-density-tokens($theme)
57
57
  );
@@ -47,6 +47,10 @@ interface MatAutocompleteDefaultOptions {
47
47
  * they're interacting with the autocomplete.
48
48
  */
49
49
  requireSelection?: boolean;
50
+ /** Class to be applied to the autocomplete's backdrop. */
51
+ backdropClass?: string;
52
+ /** Whether the autocomplete has a backdrop. */
53
+ hasBackdrop?: boolean;
50
54
  /** Class or list of classes to be applied to the autocomplete's overlay panel. */
51
55
  overlayPanelClass?: string | string[];
52
56
  /** Whether icon indicators should be hidden for single-selection. */
@@ -15,7 +15,7 @@
15
15
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
16
16
  } @else {
17
17
  @include sass-utils.current-selector-or-root() {
18
- @include token-utils.create-token-values(
18
+ @include token-utils.create-token-values-mixed(
19
19
  tokens-mat-badge.$prefix,
20
20
  tokens-mat-badge.get-unthemable-tokens()
21
21
  );
@@ -33,21 +33,21 @@
33
33
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
34
34
  } @else {
35
35
  @include sass-utils.current-selector-or-root() {
36
- @include token-utils.create-token-values(
36
+ @include token-utils.create-token-values-mixed(
37
37
  tokens-mat-badge.$prefix,
38
38
  tokens-mat-badge.get-color-tokens($theme)
39
39
  );
40
40
  }
41
41
 
42
42
  .mat-badge-accent {
43
- @include token-utils.create-token-values(
43
+ @include token-utils.create-token-values-mixed(
44
44
  tokens-mat-badge.$prefix,
45
45
  tokens-mat-badge.private-get-color-palette-color-tokens($theme, accent)
46
46
  );
47
47
  }
48
48
 
49
49
  .mat-badge-warn {
50
- @include token-utils.create-token-values(
50
+ @include token-utils.create-token-values-mixed(
51
51
  tokens-mat-badge.$prefix,
52
52
  tokens-mat-badge.private-get-color-palette-color-tokens($theme, warn)
53
53
  );
@@ -62,7 +62,7 @@
62
62
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
63
63
  } @else {
64
64
  @include sass-utils.current-selector-or-root() {
65
- @include token-utils.create-token-values(
65
+ @include token-utils.create-token-values-mixed(
66
66
  tokens-mat-badge.$prefix,
67
67
  tokens-mat-badge.get-typography-tokens($theme)
68
68
  );
@@ -12,7 +12,7 @@
12
12
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
13
13
  } @else {
14
14
  @include sass-utils.current-selector-or-root() {
15
- @include token-utils.create-token-values(
15
+ @include token-utils.create-token-values-mixed(
16
16
  tokens-mat-bottom-sheet.$prefix,
17
17
  tokens-mat-bottom-sheet.get-unthemable-tokens()
18
18
  );
@@ -25,7 +25,7 @@
25
25
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
26
26
  } @else {
27
27
  @include sass-utils.current-selector-or-root() {
28
- @include token-utils.create-token-values(
28
+ @include token-utils.create-token-values-mixed(
29
29
  tokens-mat-bottom-sheet.$prefix,
30
30
  tokens-mat-bottom-sheet.get-color-tokens($theme)
31
31
  );
@@ -38,7 +38,7 @@
38
38
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
39
39
  } @else {
40
40
  @include sass-utils.current-selector-or-root() {
41
- @include token-utils.create-token-values(
41
+ @include token-utils.create-token-values-mixed(
42
42
  tokens-mat-bottom-sheet.$prefix,
43
43
  tokens-mat-bottom-sheet.get-typography-tokens($theme)
44
44
  );
@@ -11,6 +11,7 @@
11
11
  @use '../core/tokens/m2/mat/protected-button' as tokens-mat-protected-button;
12
12
  @use '../core/tokens/m2/mdc/text-button' as tokens-mdc-text-button;
13
13
  @use '../core/tokens/m2/mat/text-button' as tokens-mat-text-button;
14
+ @use '../core/tokens/m2/mat/tonal-button' as tokens-mat-tonal-button;
14
15
  @use '../core/style/sass-utils';
15
16
 
16
17
  @mixin _text-button-variant($theme, $palette) {
@@ -26,8 +27,8 @@
26
27
  tokens-mat-text-button.get-color-tokens($theme)
27
28
  );
28
29
 
29
- @include token-utils.create-token-values(tokens-mdc-text-button.$prefix, $mdc-tokens);
30
- @include token-utils.create-token-values(tokens-mat-text-button.$prefix, $mat-tokens);
30
+ @include token-utils.create-token-values-mixed(tokens-mdc-text-button.$prefix, $mdc-tokens);
31
+ @include token-utils.create-token-values-mixed(tokens-mat-text-button.$prefix, $mat-tokens);
31
32
  }
32
33
 
33
34
  @mixin _filled-button-variant($theme, $palette) {
@@ -43,8 +44,8 @@
43
44
  tokens-mat-filled-button.get-color-tokens($theme)
44
45
  );
45
46
 
46
- @include token-utils.create-token-values(tokens-mdc-filled-button.$prefix, $mdc-tokens);
47
- @include token-utils.create-token-values(tokens-mat-filled-button.$prefix, $mat-tokens);
47
+ @include token-utils.create-token-values-mixed(tokens-mdc-filled-button.$prefix, $mdc-tokens);
48
+ @include token-utils.create-token-values-mixed(tokens-mat-filled-button.$prefix, $mat-tokens);
48
49
  }
49
50
 
50
51
  @mixin _protected-button-variant($theme, $palette) {
@@ -60,8 +61,8 @@
60
61
  tokens-mat-protected-button.get-color-tokens($theme)
61
62
  );
62
63
 
63
- @include token-utils.create-token-values(tokens-mdc-protected-button.$prefix, $mdc-tokens);
64
- @include token-utils.create-token-values(tokens-mat-protected-button.$prefix, $mat-tokens);
64
+ @include token-utils.create-token-values-mixed(tokens-mdc-protected-button.$prefix, $mdc-tokens);
65
+ @include token-utils.create-token-values-mixed(tokens-mat-protected-button.$prefix, $mat-tokens);
65
66
  }
66
67
 
67
68
  @mixin _outlined-button-variant($theme, $palette) {
@@ -77,10 +78,19 @@
77
78
  tokens-mat-outlined-button.get-color-tokens($theme)
78
79
  );
79
80
 
80
- @include token-utils.create-token-values(tokens-mdc-outlined-button.$prefix, $mdc-tokens);
81
- @include token-utils.create-token-values(tokens-mat-outlined-button.$prefix, $mat-tokens);
81
+ @include token-utils.create-token-values-mixed(tokens-mdc-outlined-button.$prefix, $mdc-tokens);
82
+ @include token-utils.create-token-values-mixed(tokens-mat-outlined-button.$prefix, $mat-tokens);
82
83
  }
83
84
 
85
+ @mixin _tonal-button-variant($theme, $palette) {
86
+ @include token-utils.create-token-values-mixed(tokens-mat-tonal-button.$prefix, if(
87
+ $palette,
88
+ tokens-mat-tonal-button.private-get-color-palette-color-tokens($theme, $palette),
89
+ tokens-mat-tonal-button.get-color-tokens($theme)
90
+ ));
91
+ }
92
+
93
+
84
94
  @mixin _theme-from-tokens($tokens, $options...) {
85
95
  @include validation.selector-defined(
86
96
  'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
@@ -125,6 +135,11 @@
125
135
  tokens-mat-outlined-button.$prefix,
126
136
  $options...
127
137
  );
138
+ $mat-tonal-button-tokens: token-utils.get-tokens-for(
139
+ $tokens,
140
+ tokens-mat-tonal-button.$prefix,
141
+ $options...
142
+ );
128
143
 
129
144
  @include token-utils.create-token-values(tokens-mdc-text-button.$prefix, $mdc-text-button-tokens);
130
145
  @include token-utils.create-token-values(
@@ -152,6 +167,10 @@
152
167
  tokens-mat-outlined-button.$prefix,
153
168
  $mat-outlined-button-tokens
154
169
  );
170
+ @include token-utils.create-token-values(
171
+ tokens-mat-tonal-button.$prefix,
172
+ $mat-tonal-button-tokens
173
+ );
155
174
  }
156
175
 
157
176
  /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
@@ -162,39 +181,43 @@
162
181
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
163
182
  } @else {
164
183
  @include sass-utils.current-selector-or-root() {
165
- @include token-utils.create-token-values(
184
+ @include token-utils.create-token-values-mixed(
166
185
  tokens-mdc-text-button.$prefix,
167
186
  tokens-mdc-text-button.get-unthemable-tokens()
168
187
  );
169
- @include token-utils.create-token-values(
188
+ @include token-utils.create-token-values-mixed(
170
189
  tokens-mdc-filled-button.$prefix,
171
190
  tokens-mdc-filled-button.get-unthemable-tokens()
172
191
  );
173
- @include token-utils.create-token-values(
192
+ @include token-utils.create-token-values-mixed(
174
193
  tokens-mdc-protected-button.$prefix,
175
194
  tokens-mdc-protected-button.get-unthemable-tokens()
176
195
  );
177
- @include token-utils.create-token-values(
196
+ @include token-utils.create-token-values-mixed(
178
197
  tokens-mdc-outlined-button.$prefix,
179
198
  tokens-mdc-outlined-button.get-unthemable-tokens()
180
199
  );
181
200
 
182
- @include token-utils.create-token-values(
201
+ @include token-utils.create-token-values-mixed(
183
202
  tokens-mat-text-button.$prefix,
184
203
  tokens-mat-text-button.get-unthemable-tokens()
185
204
  );
186
- @include token-utils.create-token-values(
205
+ @include token-utils.create-token-values-mixed(
187
206
  tokens-mat-filled-button.$prefix,
188
207
  tokens-mat-filled-button.get-unthemable-tokens()
189
208
  );
190
- @include token-utils.create-token-values(
209
+ @include token-utils.create-token-values-mixed(
191
210
  tokens-mat-protected-button.$prefix,
192
211
  tokens-mat-protected-button.get-unthemable-tokens()
193
212
  );
194
- @include token-utils.create-token-values(
213
+ @include token-utils.create-token-values-mixed(
195
214
  tokens-mat-outlined-button.$prefix,
196
215
  tokens-mat-outlined-button.get-unthemable-tokens()
197
216
  );
217
+ @include token-utils.create-token-values-mixed(
218
+ tokens-mat-tonal-button.$prefix,
219
+ tokens-mat-tonal-button.get-unthemable-tokens()
220
+ );
198
221
  }
199
222
  }
200
223
  }
@@ -211,6 +234,7 @@
211
234
  @include sass-utils.current-selector-or-root() {
212
235
  @include _text-button-variant($theme, null);
213
236
  @include _filled-button-variant($theme, null);
237
+ @include _tonal-button-variant($theme, null);
214
238
  @include _protected-button-variant($theme, null);
215
239
  @include _outlined-button-variant($theme, null);
216
240
  }
@@ -270,6 +294,20 @@
270
294
  @include _outlined-button-variant($theme, warn);
271
295
  }
272
296
  }
297
+
298
+ .mat-tonal-button {
299
+ &.mat-primary {
300
+ @include _tonal-button-variant($theme, primary);
301
+ }
302
+
303
+ &.mat-accent {
304
+ @include _tonal-button-variant($theme, accent);
305
+ }
306
+
307
+ &.mat-warn {
308
+ @include _tonal-button-variant($theme, warn);
309
+ }
310
+ }
273
311
  }
274
312
  }
275
313
 
@@ -280,39 +318,43 @@
280
318
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
281
319
  } @else {
282
320
  @include sass-utils.current-selector-or-root() {
283
- @include token-utils.create-token-values(
321
+ @include token-utils.create-token-values-mixed(
284
322
  tokens-mdc-text-button.$prefix,
285
323
  tokens-mdc-text-button.get-typography-tokens($theme)
286
324
  );
287
- @include token-utils.create-token-values(
325
+ @include token-utils.create-token-values-mixed(
288
326
  tokens-mdc-filled-button.$prefix,
289
327
  tokens-mdc-filled-button.get-typography-tokens($theme)
290
328
  );
291
- @include token-utils.create-token-values(
329
+ @include token-utils.create-token-values-mixed(
292
330
  tokens-mdc-protected-button.$prefix,
293
331
  tokens-mdc-protected-button.get-typography-tokens($theme)
294
332
  );
295
- @include token-utils.create-token-values(
333
+ @include token-utils.create-token-values-mixed(
296
334
  tokens-mdc-outlined-button.$prefix,
297
335
  tokens-mdc-outlined-button.get-typography-tokens($theme)
298
336
  );
299
337
 
300
- @include token-utils.create-token-values(
338
+ @include token-utils.create-token-values-mixed(
301
339
  tokens-mat-text-button.$prefix,
302
340
  tokens-mat-text-button.get-typography-tokens($theme)
303
341
  );
304
- @include token-utils.create-token-values(
342
+ @include token-utils.create-token-values-mixed(
305
343
  tokens-mat-filled-button.$prefix,
306
344
  tokens-mat-filled-button.get-typography-tokens($theme)
307
345
  );
308
- @include token-utils.create-token-values(
346
+ @include token-utils.create-token-values-mixed(
309
347
  tokens-mat-protected-button.$prefix,
310
348
  tokens-mat-protected-button.get-typography-tokens($theme)
311
349
  );
312
- @include token-utils.create-token-values(
350
+ @include token-utils.create-token-values-mixed(
313
351
  tokens-mat-outlined-button.$prefix,
314
352
  tokens-mat-outlined-button.get-typography-tokens($theme)
315
353
  );
354
+ @include token-utils.create-token-values-mixed(
355
+ tokens-mat-tonal-button.$prefix,
356
+ tokens-mat-tonal-button.get-typography-tokens($theme)
357
+ );
316
358
  }
317
359
  }
318
360
  }
@@ -324,39 +366,43 @@
324
366
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
325
367
  } @else {
326
368
  @include sass-utils.current-selector-or-root() {
327
- @include token-utils.create-token-values(
369
+ @include token-utils.create-token-values-mixed(
328
370
  tokens-mdc-text-button.$prefix,
329
371
  tokens-mdc-text-button.get-density-tokens($theme)
330
372
  );
331
- @include token-utils.create-token-values(
373
+ @include token-utils.create-token-values-mixed(
332
374
  tokens-mdc-filled-button.$prefix,
333
375
  tokens-mdc-filled-button.get-density-tokens($theme)
334
376
  );
335
- @include token-utils.create-token-values(
377
+ @include token-utils.create-token-values-mixed(
336
378
  tokens-mdc-protected-button.$prefix,
337
379
  tokens-mdc-protected-button.get-density-tokens($theme)
338
380
  );
339
- @include token-utils.create-token-values(
381
+ @include token-utils.create-token-values-mixed(
340
382
  tokens-mdc-outlined-button.$prefix,
341
383
  tokens-mdc-outlined-button.get-density-tokens($theme)
342
384
  );
343
385
 
344
- @include token-utils.create-token-values(
386
+ @include token-utils.create-token-values-mixed(
345
387
  tokens-mat-text-button.$prefix,
346
388
  tokens-mat-text-button.get-density-tokens($theme)
347
389
  );
348
- @include token-utils.create-token-values(
390
+ @include token-utils.create-token-values-mixed(
349
391
  tokens-mat-filled-button.$prefix,
350
392
  tokens-mat-filled-button.get-density-tokens($theme)
351
393
  );
352
- @include token-utils.create-token-values(
394
+ @include token-utils.create-token-values-mixed(
353
395
  tokens-mat-protected-button.$prefix,
354
396
  tokens-mat-protected-button.get-density-tokens($theme)
355
397
  );
356
- @include token-utils.create-token-values(
398
+ @include token-utils.create-token-values-mixed(
357
399
  tokens-mat-outlined-button.$prefix,
358
400
  tokens-mat-outlined-button.get-density-tokens($theme)
359
401
  );
402
+ @include token-utils.create-token-values-mixed(
403
+ tokens-mat-tonal-button.$prefix,
404
+ tokens-mat-tonal-button.get-density-tokens($theme)
405
+ );
360
406
  }
361
407
  }
362
408
  }
@@ -371,6 +417,7 @@
371
417
  $mat-protected-button-tokens: tokens-mat-protected-button.get-token-slots();
372
418
  $mdc-text-button-tokens: tokens-mdc-text-button.get-token-slots();
373
419
  $mat-text-button-tokens: tokens-mat-text-button.get-token-slots();
420
+ $mat-tonal-button-tokens: tokens-mat-tonal-button.get-token-slots();
374
421
 
375
422
  @return (
376
423
  (
@@ -413,6 +460,11 @@
413
460
  tokens: $mat-text-button-tokens,
414
461
  prefix: 'text-',
415
462
  ),
463
+ (
464
+ namespace: tokens-mat-tonal-button.$prefix,
465
+ tokens: $mat-tonal-button-tokens,
466
+ prefix: 'tonal-',
467
+ ),
416
468
  );
417
469
  }
418
470
 
@@ -18,15 +18,15 @@
18
18
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
19
19
  } @else {
20
20
  @include sass-utils.current-selector-or-root() {
21
- @include token-utils.create-token-values(
21
+ @include token-utils.create-token-values-mixed(
22
22
  tokens-mdc-fab.$prefix,
23
23
  tokens-mdc-fab.get-unthemable-tokens()
24
24
  );
25
- @include token-utils.create-token-values(
25
+ @include token-utils.create-token-values-mixed(
26
26
  tokens-mdc-fab-small.$prefix,
27
27
  tokens-mdc-fab-small.get-unthemable-tokens()
28
28
  );
29
- @include token-utils.create-token-values(
29
+ @include token-utils.create-token-values-mixed(
30
30
  tokens-mdc-extended-fab.$prefix,
31
31
  tokens-mdc-extended-fab.get-unthemable-tokens()
32
32
  );
@@ -47,8 +47,8 @@
47
47
  tokens-mat-fab.get-color-tokens($theme)
48
48
  );
49
49
 
50
- @include token-utils.create-token-values(tokens-mdc-fab.$prefix, $mdc-tokens);
51
- @include token-utils.create-token-values(tokens-mat-fab.$prefix, $mat-tokens);
50
+ @include token-utils.create-token-values-mixed(tokens-mdc-fab.$prefix, $mdc-tokens);
51
+ @include token-utils.create-token-values-mixed(tokens-mat-fab.$prefix, $mat-tokens);
52
52
  }
53
53
 
54
54
  @mixin _fab-small-variant($theme, $palette) {
@@ -64,8 +64,8 @@
64
64
  tokens-mat-fab-small.get-color-tokens($theme)
65
65
  );
66
66
 
67
- @include token-utils.create-token-values(tokens-mdc-fab-small.$prefix, $mdc-tokens);
68
- @include token-utils.create-token-values(tokens-mat-fab-small.$prefix, $mat-tokens);
67
+ @include token-utils.create-token-values-mixed(tokens-mdc-fab-small.$prefix, $mdc-tokens);
68
+ @include token-utils.create-token-values-mixed(tokens-mat-fab-small.$prefix, $mat-tokens);
69
69
  }
70
70
 
71
71
  /// Outputs color theme styles for the mat-fab.
@@ -80,7 +80,7 @@
80
80
  @include sass-utils.current-selector-or-root() {
81
81
  @include _fab-variant($theme, null);
82
82
  @include _fab-small-variant($theme, null);
83
- @include token-utils.create-token-values(
83
+ @include token-utils.create-token-values-mixed(
84
84
  tokens-mdc-extended-fab.$prefix,
85
85
  tokens-mdc-extended-fab.get-color-tokens($theme)
86
86
  );
@@ -123,15 +123,15 @@
123
123
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
124
124
  } @else {
125
125
  @include sass-utils.current-selector-or-root() {
126
- @include token-utils.create-token-values(
126
+ @include token-utils.create-token-values-mixed(
127
127
  tokens-mdc-extended-fab.$prefix,
128
128
  tokens-mdc-extended-fab.get-typography-tokens($theme)
129
129
  );
130
- @include token-utils.create-token-values(
130
+ @include token-utils.create-token-values-mixed(
131
131
  tokens-mat-fab.$prefix,
132
132
  tokens-mat-fab.get-typography-tokens($theme)
133
133
  );
134
- @include token-utils.create-token-values(
134
+ @include token-utils.create-token-values-mixed(
135
135
  tokens-mat-fab-small.$prefix,
136
136
  tokens-mat-fab-small.get-typography-tokens($theme)
137
137
  );
@@ -146,11 +146,11 @@
146
146
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
147
147
  } @else {
148
148
  @include sass-utils.current-selector-or-root() {
149
- @include token-utils.create-token-values(
149
+ @include token-utils.create-token-values-mixed(
150
150
  tokens-mat-fab.$prefix,
151
151
  tokens-mat-fab.get-density-tokens($theme)
152
152
  );
153
- @include token-utils.create-token-values(
153
+ @include token-utils.create-token-values-mixed(
154
154
  tokens-mat-fab-small.$prefix,
155
155
  tokens-mat-fab-small.get-density-tokens($theme)
156
156
  );
@@ -14,7 +14,7 @@
14
14
  } @else {
15
15
  // Add default values for tokens not related to color, typography, or density.
16
16
  @include sass-utils.current-selector-or-root() {
17
- @include token-utils.create-token-values(
17
+ @include token-utils.create-token-values-mixed(
18
18
  tokens-mdc-icon-button.$prefix,
19
19
  tokens-mdc-icon-button.get-unthemable-tokens()
20
20
  );
@@ -35,8 +35,8 @@
35
35
  tokens-mat-icon-button.get-color-tokens($theme)
36
36
  );
37
37
 
38
- @include token-utils.create-token-values(tokens-mdc-icon-button.$prefix, $mdc-tokens);
39
- @include token-utils.create-token-values(tokens-mat-icon-button.$prefix, $mat-tokens);
38
+ @include token-utils.create-token-values-mixed(tokens-mdc-icon-button.$prefix, $mdc-tokens);
39
+ @include token-utils.create-token-values-mixed(tokens-mat-icon-button.$prefix, $mat-tokens);
40
40
  }
41
41
 
42
42
  /// Outputs color theme styles for the mat-icon-button.
@@ -72,7 +72,7 @@
72
72
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
73
73
  } @else {
74
74
  @include sass-utils.current-selector-or-root() {
75
- @include token-utils.create-token-values(
75
+ @include token-utils.create-token-values-mixed(
76
76
  tokens-mat-icon-button.$prefix,
77
77
  tokens-mat-icon-button.get-typography-tokens($theme)
78
78
  );
@@ -97,7 +97,7 @@
97
97
  $calculated-size: map.get($size-map, $density-scale);
98
98
 
99
99
  @include sass-utils.current-selector-or-root() {
100
- @include token-utils.create-token-values(
100
+ @include token-utils.create-token-values-mixed(
101
101
  tokens-mat-icon-button.$prefix,
102
102
  tokens-mat-icon-button.get-density-tokens($theme)
103
103
  );
package/button/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { M as MAT_BUTTON_CONFIG, e as MAT_FAB_DEFAULT_OPTIONS, f as MAT_FAB_DEFAULT_OPTIONS_FACTORY, c as MatAnchor, b as MatButton, a as MatButtonConfig, m as MatButtonModule, i as MatFabAnchor, g as MatFabButton, d as MatFabDefaultOptions, l as MatIconAnchor, k as MatIconButton, j as MatMiniFabAnchor, h as MatMiniFabButton } from '../module.d-18a67f56.js';
1
+ export { M as MAT_BUTTON_CONFIG, f as MAT_FAB_DEFAULT_OPTIONS, g as MAT_FAB_DEFAULT_OPTIONS_FACTORY, d as MatAnchor, c as MatButton, a as MatButtonAppearance, b as MatButtonConfig, n as MatButtonModule, j as MatFabAnchor, h as MatFabButton, e as MatFabDefaultOptions, m as MatIconAnchor, l as MatIconButton, k as MatMiniFabAnchor, i as MatMiniFabButton } from '../module.d-792a497c.js';
2
2
  import '@angular/core';
3
3
  import '../common-module.d-0e6515ae.js';
4
4
  import '@angular/cdk/bidi';
@@ -1,13 +1,17 @@
1
1
  import { BaseHarnessFilters, ContentContainerComponentHarness, ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';
2
2
 
3
+ /** Possible button variants. */
4
+ type ButtonVariant = 'basic' | 'icon' | 'fab' | 'mini-fab';
3
5
  /** Possible button appearances. */
4
- type ButtonVariant = 'basic' | 'raised' | 'flat' | 'icon' | 'stroked' | 'fab' | 'mini-fab';
6
+ type ButtonAppearance = 'text' | 'filled' | 'elevated' | 'outlined' | 'tonal';
5
7
  /** A set of criteria that can be used to filter a list of button harness instances. */
6
8
  interface ButtonHarnessFilters extends BaseHarnessFilters {
7
9
  /** Only find instances whose text matches the given value. */
8
10
  text?: string | RegExp;
9
11
  /** Only find instances with a variant. */
10
12
  variant?: ButtonVariant;
13
+ /** Only find instances with a specific appearance. */
14
+ appearance?: ButtonAppearance;
11
15
  /** Only find instances which match the given disabled state. */
12
16
  disabled?: boolean;
13
17
  }
@@ -21,6 +25,7 @@ declare class MatButtonHarness extends ContentContainerComponentHarness {
21
25
  * - `selector` finds a button whose host element matches the given selector.
22
26
  * - `text` finds a button with specific text content.
23
27
  * - `variant` finds buttons matching a specific variant.
28
+ * - `appearance` finds buttons matching a specific appearance.
24
29
  * @return a `HarnessPredicate` configured with the given options.
25
30
  */
26
31
  static with<T extends MatButtonHarness>(this: ComponentHarnessConstructor<T>, options?: ButtonHarnessFilters): HarnessPredicate<T>;
@@ -46,6 +51,8 @@ declare class MatButtonHarness extends ContentContainerComponentHarness {
46
51
  isFocused(): Promise<boolean>;
47
52
  /** Gets the variant of the button. */
48
53
  getVariant(): Promise<ButtonVariant>;
54
+ /** Gets the appearance of the button. */
55
+ getAppearance(): Promise<ButtonAppearance | null>;
49
56
  }
50
57
 
51
- export { type ButtonHarnessFilters, type ButtonVariant, MatButtonHarness };
58
+ export { type ButtonAppearance, type ButtonHarnessFilters, type ButtonVariant, MatButtonHarness };
@@ -15,11 +15,11 @@
15
15
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
16
16
  } @else {
17
17
  @include sass-utils.current-selector-or-root() {
18
- @include token-utils.create-token-values(
18
+ @include token-utils.create-token-values-mixed(
19
19
  tokens-mat-legacy-button-toggle.$prefix,
20
20
  tokens-mat-legacy-button-toggle.get-unthemable-tokens()
21
21
  );
22
- @include token-utils.create-token-values(
22
+ @include token-utils.create-token-values-mixed(
23
23
  tokens-mat-standard-button-toggle.$prefix,
24
24
  tokens-mat-standard-button-toggle.get-unthemable-tokens()
25
25
  );
@@ -37,11 +37,11 @@
37
37
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
38
38
  } @else {
39
39
  @include sass-utils.current-selector-or-root() {
40
- @include token-utils.create-token-values(
40
+ @include token-utils.create-token-values-mixed(
41
41
  tokens-mat-legacy-button-toggle.$prefix,
42
42
  tokens-mat-legacy-button-toggle.get-color-tokens($theme)
43
43
  );
44
- @include token-utils.create-token-values(
44
+ @include token-utils.create-token-values-mixed(
45
45
  tokens-mat-standard-button-toggle.$prefix,
46
46
  tokens-mat-standard-button-toggle.get-color-tokens($theme)
47
47
  );
@@ -56,11 +56,11 @@
56
56
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
57
57
  } @else {
58
58
  @include sass-utils.current-selector-or-root() {
59
- @include token-utils.create-token-values(
59
+ @include token-utils.create-token-values-mixed(
60
60
  tokens-mat-legacy-button-toggle.$prefix,
61
61
  tokens-mat-legacy-button-toggle.get-typography-tokens($theme)
62
62
  );
63
- @include token-utils.create-token-values(
63
+ @include token-utils.create-token-values-mixed(
64
64
  tokens-mat-standard-button-toggle.$prefix,
65
65
  tokens-mat-standard-button-toggle.get-typography-tokens($theme)
66
66
  );
@@ -75,11 +75,11 @@
75
75
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
76
76
  } @else {
77
77
  @include sass-utils.current-selector-or-root() {
78
- @include token-utils.create-token-values(
78
+ @include token-utils.create-token-values-mixed(
79
79
  tokens-mat-legacy-button-toggle.$prefix,
80
80
  tokens-mat-legacy-button-toggle.get-density-tokens($theme)
81
81
  );
82
- @include token-utils.create-token-values(
82
+ @include token-utils.create-token-values-mixed(
83
83
  tokens-mat-standard-button-toggle.$prefix,
84
84
  tokens-mat-standard-button-toggle.get-density-tokens($theme)
85
85
  );