@angular/material 18.0.4 → 18.0.6

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 (145) hide show
  1. package/badge/index.d.ts +5 -2
  2. package/button/_button-base.scss +3 -1
  3. package/button/_fab-theme.scss +16 -16
  4. package/button/_icon-button-theme.scss +14 -20
  5. package/button/index.d.ts +7 -0
  6. package/button-toggle/index.d.ts +2 -2
  7. package/card/_card-theme.scss +25 -52
  8. package/checkbox/index.d.ts +4 -2
  9. package/chips/_chips-theme.scss +22 -24
  10. package/core/m2/_typography.scss +5 -2
  11. package/core/mdc-helpers/_mdc-helpers.scss +2 -2
  12. package/core/style/_elevation.scss +5 -0
  13. package/core/style/_vendor-prefixes.scss +5 -0
  14. package/core/tokens/_density.scss +1 -1
  15. package/core/tokens/_token-utils.scss +2 -2
  16. package/core/tokens/m2/_index.scss +2 -2
  17. package/core/tokens/m2/mat/_app.scss +1 -2
  18. package/core/tokens/m2/mat/_autocomplete.scss +2 -2
  19. package/core/tokens/m2/mat/_datepicker.scss +3 -3
  20. package/core/tokens/m2/mat/_dialog.scss +2 -2
  21. package/core/tokens/m2/mat/_fab-small.scss +3 -9
  22. package/core/tokens/m2/mat/_fab.scss +3 -9
  23. package/core/tokens/m2/mat/_filled-button.scss +3 -9
  24. package/core/tokens/m2/mat/_form-field.scss +9 -6
  25. package/core/tokens/m2/mat/_icon-button.scss +3 -9
  26. package/core/tokens/m2/mat/_outlined-button.scss +3 -9
  27. package/core/tokens/m2/mat/_paginator.scss +10 -6
  28. package/core/tokens/m2/mat/_protected-button.scss +3 -9
  29. package/core/tokens/m2/mat/_select.scss +2 -2
  30. package/core/tokens/m2/mat/_sidenav.scss +2 -2
  31. package/core/tokens/m2/mat/_text-button.scss +3 -9
  32. package/core/tokens/m2/mdc/_chip.scss +2 -14
  33. package/core/tokens/m2/mdc/_elevated-card.scss +3 -7
  34. package/core/tokens/m2/mdc/_extended-fab.scss +12 -8
  35. package/core/tokens/m2/mdc/_fab-small.scss +15 -13
  36. package/core/tokens/m2/mdc/_fab.scss +15 -13
  37. package/core/tokens/m2/mdc/_outlined-card.scss +2 -6
  38. package/core/tokens/m2/mdc/{_tab.scss → _secondary-navigation-tab.scss} +1 -1
  39. package/core/tokens/m3/_index.scss +2 -2
  40. package/core/tokens/m3/mat/_app.scss +2 -2
  41. package/core/tokens/m3/mat/_autocomplete.scss +2 -2
  42. package/core/tokens/m3/mat/_datepicker.scss +3 -3
  43. package/core/tokens/m3/mat/_select.scss +2 -2
  44. package/core/tokens/m3/mdc/_chip.scss +1 -4
  45. package/core/tokens/m3/mdc/_elevated-card.scss +9 -2
  46. package/core/tokens/m3/mdc/_extended-fab.scss +19 -2
  47. package/core/tokens/m3/mdc/_fab-small.scss +19 -2
  48. package/core/tokens/m3/mdc/_fab.scss +19 -2
  49. package/core/tokens/m3/mdc/_outlined-card.scss +9 -2
  50. package/core/tokens/m3/mdc/{_tab.scss → _secondary-navigation-tab.scss} +1 -1
  51. package/datepicker/index.d.ts +8 -4
  52. package/esm2022/badge/badge.mjs +6 -3
  53. package/esm2022/button/button-base.mjs +3 -3
  54. package/esm2022/button/button.mjs +4 -4
  55. package/esm2022/button/fab.mjs +9 -9
  56. package/esm2022/button/icon-button.mjs +4 -4
  57. package/esm2022/button-toggle/button-toggle.mjs +30 -21
  58. package/esm2022/card/card.mjs +2 -2
  59. package/esm2022/checkbox/checkbox-config.mjs +1 -1
  60. package/esm2022/chips/chip-grid.mjs +2 -2
  61. package/esm2022/chips/chip-listbox.mjs +2 -2
  62. package/esm2022/chips/chip-option.mjs +3 -3
  63. package/esm2022/chips/chip-row.mjs +3 -3
  64. package/esm2022/chips/chip-set.mjs +2 -2
  65. package/esm2022/chips/chip.mjs +3 -3
  66. package/esm2022/core/ripple/ripple-renderer.mjs +21 -3
  67. package/esm2022/core/version.mjs +1 -1
  68. package/esm2022/datepicker/calendar.mjs +6 -3
  69. package/esm2022/datepicker/datepicker-base.mjs +6 -4
  70. package/esm2022/dialog/dialog-container.mjs +3 -3
  71. package/esm2022/form-field/form-field.mjs +1 -1
  72. package/esm2022/list/list-option.mjs +8 -2
  73. package/esm2022/progress-bar/progress-bar.mjs +10 -4
  74. package/esm2022/progress-spinner/progress-spinner.mjs +8 -2
  75. package/esm2022/radio/radio.mjs +10 -4
  76. package/esm2022/sidenav/drawer.mjs +4 -1
  77. package/esm2022/slide-toggle/slide-toggle-config.mjs +1 -1
  78. package/esm2022/slide-toggle/slide-toggle.mjs +3 -3
  79. package/esm2022/slider/slider.mjs +1 -1
  80. package/esm2022/tabs/tab-group.mjs +9 -4
  81. package/esm2022/tabs/tab-header.mjs +3 -3
  82. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +12 -6
  83. package/esm2022/tooltip/tooltip.mjs +3 -3
  84. package/fesm2022/badge.mjs +5 -2
  85. package/fesm2022/badge.mjs.map +1 -1
  86. package/fesm2022/button-toggle.mjs +29 -20
  87. package/fesm2022/button-toggle.mjs.map +1 -1
  88. package/fesm2022/button.mjs +18 -18
  89. package/fesm2022/button.mjs.map +1 -1
  90. package/fesm2022/card.mjs +2 -2
  91. package/fesm2022/card.mjs.map +1 -1
  92. package/fesm2022/checkbox.mjs.map +1 -1
  93. package/fesm2022/chips.mjs +12 -12
  94. package/fesm2022/chips.mjs.map +1 -1
  95. package/fesm2022/core.mjs +21 -3
  96. package/fesm2022/core.mjs.map +1 -1
  97. package/fesm2022/datepicker.mjs +10 -5
  98. package/fesm2022/datepicker.mjs.map +1 -1
  99. package/fesm2022/dialog.mjs +2 -2
  100. package/fesm2022/dialog.mjs.map +1 -1
  101. package/fesm2022/form-field.mjs.map +1 -1
  102. package/fesm2022/list.mjs +7 -1
  103. package/fesm2022/list.mjs.map +1 -1
  104. package/fesm2022/progress-bar.mjs +9 -3
  105. package/fesm2022/progress-bar.mjs.map +1 -1
  106. package/fesm2022/progress-spinner.mjs +7 -1
  107. package/fesm2022/progress-spinner.mjs.map +1 -1
  108. package/fesm2022/radio.mjs +9 -3
  109. package/fesm2022/radio.mjs.map +1 -1
  110. package/fesm2022/sidenav.mjs +4 -1
  111. package/fesm2022/sidenav.mjs.map +1 -1
  112. package/fesm2022/slide-toggle.mjs +2 -2
  113. package/fesm2022/slide-toggle.mjs.map +1 -1
  114. package/fesm2022/slider.mjs.map +1 -1
  115. package/fesm2022/tabs.mjs +21 -10
  116. package/fesm2022/tabs.mjs.map +1 -1
  117. package/fesm2022/tooltip.mjs +2 -2
  118. package/fesm2022/tooltip.mjs.map +1 -1
  119. package/form-field/_form-field-subscript.scss +2 -2
  120. package/form-field/_mdc-text-field-structure-overrides.scss +2 -3
  121. package/form-field/index.d.ts +4 -2
  122. package/list/_list-option-trailing-avatar-compat.scss +26 -25
  123. package/list/index.d.ts +7 -1
  124. package/package.json +2 -2
  125. package/prebuilt-themes/azure-blue.css +1 -1
  126. package/prebuilt-themes/cyan-orange.css +1 -1
  127. package/prebuilt-themes/deeppurple-amber.css +1 -1
  128. package/prebuilt-themes/indigo-pink.css +1 -1
  129. package/prebuilt-themes/magenta-violet.css +1 -1
  130. package/prebuilt-themes/pink-bluegrey.css +1 -1
  131. package/prebuilt-themes/purple-green.css +1 -1
  132. package/prebuilt-themes/rose-red.css +1 -1
  133. package/progress-bar/_progress-bar-theme.scss +10 -7
  134. package/progress-bar/index.d.ts +14 -2
  135. package/progress-spinner/index.d.ts +14 -2
  136. package/radio/index.d.ts +14 -1
  137. package/schematics/ng-add/index.js +1 -1
  138. package/schematics/ng-add/index.mjs +1 -1
  139. package/sidenav/index.d.ts +1 -0
  140. package/slide-toggle/index.d.ts +7 -1
  141. package/slider/index.d.ts +7 -1
  142. package/tabs/_tabs-common.scss +94 -36
  143. package/tabs/_tabs-theme.scss +33 -25
  144. package/tabs/index.d.ts +20 -3
  145. package/tooltip/_tooltip-theme.scss +18 -16
package/badge/index.d.ts CHANGED
@@ -26,8 +26,11 @@ export declare class MatBadge implements OnInit, OnDestroy {
26
26
  private _renderer;
27
27
  private _animationMode?;
28
28
  /**
29
- * The color of the badge. Can be `primary`, `accent`, or `warn`.
30
- * Not recommended in M3, for more information see https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants.
29
+ * Theme color of the badge. This API is supported in M2 themes only, it
30
+ * has no effect in M3 themes.
31
+ *
32
+ * For information on applying color variants in M3, see
33
+ * https://material.angular.io/guide/theming#using-component-color-variants.
31
34
  */
32
35
  get color(): ThemePalette;
33
36
  set color(value: ThemePalette);
@@ -44,8 +44,10 @@
44
44
 
45
45
  // The content should appear over the state and ripple layers, otherwise they may adversely affect
46
46
  // the accessibility of the text content.
47
- .mdc-button__label {
47
+ .mdc-button__label,
48
+ .mat-icon {
48
49
  z-index: 1;
50
+ position: relative;
49
51
  }
50
52
 
51
53
  // The focus indicator should match the bounds of the entire button.
@@ -1,6 +1,3 @@
1
- @use '@material/fab/fab-theme' as mdc-fab-theme;
2
- @use '@material/fab/fab-small-theme' as mdc-fab-small-theme;
3
- @use '@material/fab/extended-fab-theme' as mdc-extended-fab-theme;
4
1
  @use '../core/style/sass-utils';
5
2
  @use '../core/theming/theming';
6
3
  @use '../core/theming/inspection';
@@ -21,13 +18,13 @@
21
18
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
22
19
  }
23
20
  @else {
24
- // Add default values for tokens not related to color, typography, or density.
25
21
  @include sass-utils.current-selector-or-root() {
26
- @include mdc-fab-theme.theme(tokens-mdc-fab.get-unthemable-tokens());
27
- @include mdc-fab-small-theme.theme(tokens-mdc-fab-small.get-unthemable-tokens());
28
- @include mdc-extended-fab-theme.theme(
29
- tokens-mdc-extended-fab.get-unthemable-tokens()
30
- );
22
+ @include token-utils.create-token-values(
23
+ tokens-mdc-fab.$prefix, tokens-mdc-fab.get-unthemable-tokens());
24
+ @include token-utils.create-token-values(
25
+ tokens-mdc-fab-small.$prefix, tokens-mdc-fab-small.get-unthemable-tokens());
26
+ @include token-utils.create-token-values(
27
+ tokens-mdc-extended-fab.$prefix, tokens-mdc-extended-fab.get-unthemable-tokens());
31
28
  }
32
29
  }
33
30
  }
@@ -43,7 +40,7 @@
43
40
  tokens-mat-fab.get-color-tokens($theme)
44
41
  );
45
42
 
46
- @include mdc-fab-theme.theme($mdc-tokens);
43
+ @include token-utils.create-token-values(tokens-mdc-fab.$prefix, $mdc-tokens);
47
44
  @include token-utils.create-token-values(tokens-mat-fab.$prefix, $mat-tokens);
48
45
  }
49
46
 
@@ -58,7 +55,7 @@
58
55
  tokens-mat-fab-small.get-color-tokens($theme)
59
56
  );
60
57
 
61
- @include mdc-fab-small-theme.theme($mdc-tokens);
58
+ @include token-utils.create-token-values(tokens-mdc-fab-small.$prefix, $mdc-tokens);
62
59
  @include token-utils.create-token-values(tokens-mat-fab-small.$prefix, $mat-tokens);
63
60
  }
64
61
 
@@ -75,7 +72,8 @@
75
72
  @include sass-utils.current-selector-or-root() {
76
73
  @include _fab-variant($theme, null);
77
74
  @include _fab-small-variant($theme, null);
78
- @include mdc-extended-fab-theme.theme(tokens-mdc-extended-fab.get-color-tokens($theme));
75
+ @include token-utils.create-token-values(
76
+ tokens-mdc-extended-fab.$prefix, tokens-mdc-extended-fab.get-color-tokens($theme));
79
77
 
80
78
  .mat-mdc-fab {
81
79
  &.mat-primary {
@@ -116,7 +114,8 @@
116
114
  }
117
115
  @else {
118
116
  @include sass-utils.current-selector-or-root() {
119
- @include mdc-extended-fab-theme.theme(tokens-mdc-extended-fab.get-typography-tokens($theme));
117
+ @include token-utils.create-token-values(tokens-mdc-extended-fab.$prefix,
118
+ tokens-mdc-extended-fab.get-typography-tokens($theme));
120
119
  @include token-utils.create-token-values(tokens-mat-fab.$prefix,
121
120
  tokens-mat-fab.get-typography-tokens($theme));
122
121
  @include token-utils.create-token-values(tokens-mat-fab-small.$prefix,
@@ -190,9 +189,10 @@
190
189
  $mat-fab-tokens: token-utils.get-tokens-for($tokens, tokens-mat-fab.$prefix, $options...);
191
190
  $mat-fab-small-tokens: token-utils.get-tokens-for($tokens, tokens-mat-fab-small.$prefix,
192
191
  $options...);
193
- @include mdc-extended-fab-theme.theme($mdc-extended-fab-tokens);
194
- @include mdc-fab-theme.theme($mdc-fab-tokens);
195
- @include mdc-fab-small-theme.theme($mdc-fab-small-tokens);
192
+ @include token-utils.create-token-values(tokens-mdc-extended-fab.$prefix,
193
+ $mdc-extended-fab-tokens);
194
+ @include token-utils.create-token-values(tokens-mdc-fab.$prefix, $mdc-fab-tokens);
195
+ @include token-utils.create-token-values(tokens-mdc-fab-small.$prefix, $mdc-fab-small-tokens);
196
196
  @include token-utils.create-token-values(tokens-mat-fab.$prefix, $mat-fab-tokens);
197
197
  @include token-utils.create-token-values(tokens-mat-fab-small.$prefix, $mat-fab-small-tokens);
198
198
  }
@@ -1,7 +1,5 @@
1
1
  @use 'sass:map';
2
2
  @use 'sass:math';
3
- @use '@material/density/functions' as mdc-density-functions;
4
- @use '@material/icon-button/icon-button-theme' as mdc-icon-button-theme;
5
3
  @use '../core/tokens/m2/mdc/icon-button' as tokens-mdc-icon-button;
6
4
  @use '../core/tokens/m2/mat/icon-button' as tokens-mat-icon-button;
7
5
  @use '../core/style/sass-utils';
@@ -18,7 +16,8 @@
18
16
  @else {
19
17
  // Add default values for tokens not related to color, typography, or density.
20
18
  @include sass-utils.current-selector-or-root() {
21
- @include mdc-icon-button-theme.theme(tokens-mdc-icon-button.get-unthemable-tokens());
19
+ @include token-utils.create-token-values(tokens-mdc-icon-button.$prefix,
20
+ tokens-mdc-icon-button.get-unthemable-tokens());
22
21
  }
23
22
  }
24
23
  }
@@ -34,7 +33,7 @@
34
33
  tokens-mat-icon-button.get-color-tokens($theme)
35
34
  );
36
35
 
37
- @include mdc-icon-button-theme.theme($mdc-tokens);
36
+ @include token-utils.create-token-values(tokens-mdc-icon-button.$prefix, $mdc-tokens);
38
37
  @include token-utils.create-token-values(tokens-mat-icon-button.$prefix, $mat-tokens);
39
38
  }
40
39
 
@@ -82,19 +81,15 @@
82
81
  @else {
83
82
  $icon-size: 24px;
84
83
  $density-scale: inspection.get-theme-density($theme);
85
- // Manually apply the expected density theming, and include the padding
86
- // as it was applied before
87
- $calculated-size: mdc-density-functions.prop-value(
88
- $density-config: (
89
- size: (
90
- default: 48px,
91
- maximum: 48px,
92
- minimum: 28px,
93
- ),
94
- ),
95
- $density-scale: $density-scale,
96
- $property-name: size,
84
+ $size-map: (
85
+ 0: 48px,
86
+ -1: 44px,
87
+ -2: 40px,
88
+ -3: 36px,
89
+ -4: 32px,
90
+ -5: 28px,
97
91
  );
92
+ $calculated-size: map.get($size-map, $density-scale);
98
93
 
99
94
  @include sass-utils.current-selector-or-root() {
100
95
  @include token-utils.create-token-values(tokens-mat-icon-button.$prefix,
@@ -105,9 +100,7 @@
105
100
  .mat-mdc-icon-button.mat-mdc-button-base {
106
101
  // Match the styles that used to be present. This is necessary for backwards
107
102
  // compat to match the previous implementations selector count (two classes).
108
- @include mdc-icon-button-theme.theme((
109
- state-layer-size: $calculated-size,
110
- ));
103
+ --mdc-icon-button-state-layer-size: #{$calculated-size};
111
104
 
112
105
  // TODO: Switch calculated-size to "var(--mdc-icon-button-state-layer-size)"
113
106
  // Currently fails validation because the variable is "undefined"
@@ -153,7 +146,8 @@
153
146
  @include validation.selector-defined(
154
147
  'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
155
148
  @if ($tokens != ()) {
156
- @include mdc-icon-button-theme.theme(map.get($tokens, tokens-mdc-icon-button.$prefix));
149
+ @include token-utils.create-token-values(
150
+ tokens-mdc-icon-button.$prefix, map.get($tokens, tokens-mdc-icon-button.$prefix));
157
151
  @include token-utils.create-token-values(
158
152
  tokens-mat-icon-button.$prefix, map.get($tokens, tokens-mat-icon-button.$prefix));
159
153
  }
package/button/index.d.ts CHANGED
@@ -208,6 +208,13 @@ export declare class MatFabButton extends MatButtonBase {
208
208
 
209
209
  /** Default FAB options that can be overridden. */
210
210
  export declare interface MatFabDefaultOptions {
211
+ /**
212
+ * Default theme color of the button. This API is supported in M2 themes
213
+ * only, it has no effect in M3 themes.
214
+ *
215
+ * For information on applying color variants in M3, see
216
+ * https://material.angular.io/guide/theming#using-component-color-variants
217
+ */
211
218
  color?: ThemePalette;
212
219
  }
213
220
 
@@ -243,8 +243,8 @@ export declare class MatButtonToggleGroup implements ControlValueAccessor, OnIni
243
243
  _isPrechecked(toggle: MatButtonToggle): boolean;
244
244
  /** Initializes the tabindex attribute using the radio pattern. */
245
245
  private _initializeTabIndex;
246
- /** Obtain the subsequent index to which the focus shifts. */
247
- private _getNextIndex;
246
+ /** Obtain the subsequent toggle to which the focus shifts. */
247
+ private _getNextButton;
248
248
  /** Updates the selection state of the toggles in the group based on a value. */
249
249
  private _setSelectionByValue;
250
250
  /** Clears the selected toggles. */
@@ -8,8 +8,6 @@
8
8
  @use '../core/tokens/m2/mat/card' as tokens-mat-card;
9
9
  @use '../core/tokens/m2/mdc/elevated-card' as tokens-mdc-elevated-card;
10
10
  @use '../core/tokens/m2/mdc/outlined-card' as tokens-mdc-outlined-card;
11
- @use '@material/card/elevated-card-theme' as mdc-elevated-card-theme;
12
- @use '@material/card/outlined-card-theme' as mdc-outlined-card-theme;
13
11
 
14
12
  @mixin base($theme) {
15
13
  @if inspection.get-theme-version($theme) == 1 {
@@ -17,8 +15,10 @@
17
15
  }
18
16
  @else {
19
17
  @include sass-utils.current-selector-or-root() {
20
- @include mdc-elevated-card-theme.theme(tokens-mdc-elevated-card.get-unthemable-tokens());
21
- @include mdc-outlined-card-theme.theme(tokens-mdc-outlined-card.get-unthemable-tokens());
18
+ @include token-utils.create-token-values(
19
+ tokens-mdc-elevated-card.$prefix, tokens-mdc-elevated-card.get-unthemable-tokens());
20
+ @include token-utils.create-token-values(
21
+ tokens-mdc-outlined-card.$prefix, tokens-mdc-outlined-card.get-unthemable-tokens());
22
22
  @include token-utils.create-token-values(
23
23
  tokens-mat-card.$prefix, tokens-mat-card.get-unthemable-tokens());
24
24
  }
@@ -30,23 +30,13 @@
30
30
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
31
31
  }
32
32
  @else {
33
- $mdc-elevated-card-color-tokens: token-utils.resolve-elevation(
34
- tokens-mdc-elevated-card.get-color-tokens($theme),
35
- container-elevation,
36
- container-shadow-color
37
- );
38
- $mdc-outlined-card-color-tokens: token-utils.resolve-elevation(
39
- tokens-mdc-outlined-card.get-color-tokens($theme),
40
- container-elevation,
41
- container-shadow-color,
42
- );
43
- $mat-card-color-tokens: tokens-mat-card.get-color-tokens($theme);
44
-
45
- // Add values for card tokens.
46
33
  @include sass-utils.current-selector-or-root() {
47
- @include mdc-elevated-card-theme.theme($mdc-elevated-card-color-tokens);
48
- @include mdc-outlined-card-theme.theme($mdc-outlined-card-color-tokens);
49
- @include token-utils.create-token-values(tokens-mat-card.$prefix, $mat-card-color-tokens);
34
+ @include token-utils.create-token-values(tokens-mdc-elevated-card.$prefix,
35
+ tokens-mdc-elevated-card.get-color-tokens($theme));
36
+ @include token-utils.create-token-values(tokens-mdc-outlined-card.$prefix,
37
+ tokens-mdc-outlined-card.get-color-tokens($theme));
38
+ @include token-utils.create-token-values(tokens-mat-card.$prefix,
39
+ tokens-mat-card.get-color-tokens($theme));
50
40
  }
51
41
  }
52
42
  }
@@ -56,16 +46,13 @@
56
46
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
57
47
  }
58
48
  @else {
59
- $mdc-elevated-card-typography-tokens: tokens-mdc-elevated-card.get-typography-tokens($theme);
60
- $mdc-outlined-card-typography-tokens: tokens-mdc-outlined-card.get-typography-tokens($theme);
61
- $mat-card-typography-tokens: tokens-mat-card.get-typography-tokens($theme);
62
-
63
- // Add values for card tokens.
64
49
  @include sass-utils.current-selector-or-root() {
65
- @include mdc-elevated-card-theme.theme($mdc-elevated-card-typography-tokens);
66
- @include mdc-outlined-card-theme.theme($mdc-outlined-card-typography-tokens);
67
50
  @include token-utils.create-token-values(
68
- tokens-mat-card.$prefix, $mat-card-typography-tokens);
51
+ tokens-mdc-elevated-card.$prefix, tokens-mdc-elevated-card.get-typography-tokens($theme));
52
+ @include token-utils.create-token-values(
53
+ tokens-mdc-outlined-card.$prefix, tokens-mdc-outlined-card.get-typography-tokens($theme));
54
+ @include token-utils.create-token-values(
55
+ tokens-mat-card.$prefix, tokens-mat-card.get-typography-tokens($theme));
69
56
  }
70
57
  }
71
58
  }
@@ -75,15 +62,13 @@
75
62
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
76
63
  }
77
64
  @else {
78
- $mdc-elevated-card-density-tokens: tokens-mdc-elevated-card.get-density-tokens($theme);
79
- $mdc-outlined-card-density-tokens: tokens-mdc-outlined-card.get-density-tokens($theme);
80
- $mat-card-density-tokens: tokens-mat-card.get-density-tokens($theme);
81
-
82
- // Add values for card tokens.
83
65
  @include sass-utils.current-selector-or-root() {
84
- @include mdc-elevated-card-theme.theme($mdc-elevated-card-density-tokens);
85
- @include mdc-outlined-card-theme.theme($mdc-outlined-card-density-tokens);
86
- @include token-utils.create-token-values(tokens-mat-card.$prefix, $mat-card-density-tokens);
66
+ @include token-utils.create-token-values(tokens-mdc-elevated-card.$prefix,
67
+ tokens-mdc-elevated-card.get-density-tokens($theme));
68
+ @include token-utils.create-token-values(tokens-mdc-outlined-card.$prefix,
69
+ tokens-mdc-outlined-card.get-density-tokens($theme));
70
+ @include token-utils.create-token-values(tokens-mat-card.$prefix,
71
+ tokens-mat-card.get-density-tokens($theme));
87
72
  }
88
73
  }
89
74
  }
@@ -121,22 +106,10 @@
121
106
  @include validation.selector-defined(
122
107
  'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
123
108
  @if ($tokens != ()) {
124
- $elevated-card-tokens: map.get($tokens, tokens-mdc-elevated-card.$prefix);
125
- // Work around a bug in MDC where the elevation is not resolved to an actual shadow value.
126
- $elevated-card-tokens: token-utils.resolve-elevation(
127
- $elevated-card-tokens,
128
- container-elevation,
129
- container-shadow-color
130
- );
131
- $outlined-card-tokens: map.get($tokens, tokens-mdc-outlined-card.$prefix);
132
- // Work around a bug in MDC where the elevation is not resolved to an actual shadow value.
133
- $outlined-card-tokens: token-utils.resolve-elevation(
134
- $outlined-card-tokens,
135
- container-elevation,
136
- container-shadow-color
137
- );
138
- @include mdc-elevated-card-theme.theme($elevated-card-tokens);
139
- @include mdc-outlined-card-theme.theme($outlined-card-tokens);
109
+ @include token-utils.create-token-values(
110
+ tokens-mdc-elevated-card.$prefix, map.get($tokens, tokens-mdc-elevated-card.$prefix));
111
+ @include token-utils.create-token-values(
112
+ tokens-mdc-outlined-card.$prefix, map.get($tokens, tokens-mdc-outlined-card.$prefix));
140
113
  @include token-utils.create-token-values(
141
114
  tokens-mat-card.$prefix, map.get($tokens, tokens-mat-card.$prefix));
142
115
  }
@@ -218,8 +218,10 @@ export declare type MatCheckboxClickAction = 'noop' | 'check' | 'check-indetermi
218
218
  /** Default `mat-checkbox` options that can be overridden. */
219
219
  export declare interface MatCheckboxDefaultOptions {
220
220
  /**
221
- * Default theme color palette to be used for checkboxes. This API is supported in M2 themes
222
- * only, it has no effect in M3 themes. For information on applying color variants in M3, see
221
+ * Default theme color of the checkbox. This API is supported in M2 themes
222
+ * only, it has no effect in M3 themes.
223
+ *
224
+ * For information on applying color variants in M3, see
223
225
  * https://material.angular.io/guide/theming#using-component-color-variants
224
226
  */
225
227
  color?: ThemePalette;
@@ -1,5 +1,4 @@
1
1
  @use 'sass:color';
2
- @use '@material/chips/chip-theme' as mdc-chip-theme;
3
2
  @use '../core/tokens/m2/mdc/chip' as tokens-mdc-chip;
4
3
  @use '../core/tokens/m2/mat/chip' as tokens-mat-chip;
5
4
  @use '../core/tokens/token-utils';
@@ -17,9 +16,10 @@
17
16
  }
18
17
  @else {
19
18
  .mat-mdc-standard-chip {
20
- @include mdc-chip-theme.theme(tokens-mdc-chip.get-unthemable-tokens());
21
19
  @include token-utils.create-token-values(
22
- tokens-mat-chip.$prefix, tokens-mat-chip.get-unthemable-tokens());
20
+ tokens-mdc-chip.$prefix, tokens-mdc-chip.get-unthemable-tokens());
21
+ @include token-utils.create-token-values(
22
+ tokens-mat-chip.$prefix, tokens-mat-chip.get-unthemable-tokens());
23
23
  }
24
24
  }
25
25
  }
@@ -35,32 +35,32 @@
35
35
  }
36
36
  @else {
37
37
  .mat-mdc-standard-chip {
38
- $default-color-tokens: tokens-mdc-chip.get-color-tokens($theme);
39
- @include mdc-chip-theme.theme($default-color-tokens);
40
38
  @include token-utils.create-token-values(
41
- tokens-mat-chip.$prefix, tokens-mat-chip.get-color-tokens($theme));
39
+ tokens-mdc-chip.$prefix, tokens-mdc-chip.get-color-tokens($theme));
40
+ @include token-utils.create-token-values(
41
+ tokens-mat-chip.$prefix, tokens-mat-chip.get-color-tokens($theme));
42
42
 
43
43
  &.mat-mdc-chip-selected,
44
44
  &.mat-mdc-chip-highlighted {
45
45
  &.mat-primary {
46
- $primary-color-tokens: tokens-mdc-chip.get-color-tokens($theme, primary);
47
- @include mdc-chip-theme.theme($primary-color-tokens);
48
46
  @include token-utils.create-token-values(
49
- tokens-mat-chip.$prefix, tokens-mat-chip.get-color-tokens($theme, primary));
47
+ tokens-mdc-chip.$prefix, tokens-mdc-chip.get-color-tokens($theme, primary));
48
+ @include token-utils.create-token-values(
49
+ tokens-mat-chip.$prefix, tokens-mat-chip.get-color-tokens($theme, primary));
50
50
  }
51
51
 
52
52
  &.mat-accent {
53
- $accent-color-tokens: tokens-mdc-chip.get-color-tokens($theme, accent);
54
- @include mdc-chip-theme.theme($accent-color-tokens);
55
53
  @include token-utils.create-token-values(
56
- tokens-mat-chip.$prefix, tokens-mat-chip.get-color-tokens($theme, accent));
54
+ tokens-mdc-chip.$prefix, tokens-mdc-chip.get-color-tokens($theme, accent));
55
+ @include token-utils.create-token-values(
56
+ tokens-mat-chip.$prefix, tokens-mat-chip.get-color-tokens($theme, accent));
57
57
  }
58
58
 
59
59
  &.mat-warn {
60
- $warn-color-tokens: tokens-mdc-chip.get-color-tokens($theme, warn);
61
- @include mdc-chip-theme.theme($warn-color-tokens);
62
60
  @include token-utils.create-token-values(
63
- tokens-mat-chip.$prefix, tokens-mat-chip.get-color-tokens($theme, warn));
61
+ tokens-mdc-chip.$prefix, tokens-mdc-chip.get-color-tokens($theme, warn));
62
+ @include token-utils.create-token-values(
63
+ tokens-mat-chip.$prefix, tokens-mat-chip.get-color-tokens($theme, warn));
64
64
  }
65
65
  }
66
66
  }
@@ -74,12 +74,11 @@
74
74
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
75
75
  }
76
76
  @else {
77
- $typography-tokens: tokens-mdc-chip.get-typography-tokens($theme);
78
-
79
77
  .mat-mdc-standard-chip {
80
- @include mdc-chip-theme.theme($typography-tokens);
81
78
  @include token-utils.create-token-values(
82
- tokens-mat-chip.$prefix, tokens-mat-chip.get-typography-tokens($theme));
79
+ tokens-mdc-chip.$prefix, tokens-mdc-chip.get-typography-tokens($theme));
80
+ @include token-utils.create-token-values(
81
+ tokens-mat-chip.$prefix, tokens-mat-chip.get-typography-tokens($theme));
83
82
  }
84
83
  }
85
84
  }
@@ -91,12 +90,11 @@
91
90
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
92
91
  }
93
92
  @else {
94
- $density-tokens: tokens-mdc-chip.get-density-tokens($theme);
95
-
96
93
  .mat-mdc-chip.mat-mdc-standard-chip {
97
- @include mdc-chip-theme.theme($density-tokens);
98
94
  @include token-utils.create-token-values(
99
- tokens-mat-chip.$prefix, tokens-mat-chip.get-density-tokens($theme));
95
+ tokens-mdc-chip.$prefix, tokens-mdc-chip.get-density-tokens($theme));
96
+ @include token-utils.create-token-values(
97
+ tokens-mat-chip.$prefix, tokens-mat-chip.get-density-tokens($theme));
100
98
  }
101
99
  }
102
100
  }
@@ -141,6 +139,6 @@
141
139
  'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
142
140
  $mdc-chip-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-chip.$prefix, $options...);
143
141
  $mat-chip-tokens: token-utils.get-tokens-for($tokens, tokens-mat-chip.$prefix, $options...);
144
- @include mdc-chip-theme.theme($mdc-chip-tokens);
142
+ @include token-utils.create-token-values(tokens-mdc-chip.$prefix, $mdc-chip-tokens);
145
143
  @include token-utils.create-token-values(tokens-mat-chip.$prefix, $mat-chip-tokens);
146
144
  }
@@ -1,8 +1,11 @@
1
1
  @use 'sass:map';
2
2
  @use 'sass:math';
3
3
  @use 'sass:meta';
4
+ @use 'sass:string';
4
5
  @use '@material/typography' as mdc-typography;
5
6
 
7
+ $_default-font-family: string.unquote('Roboto, sans-serif');
8
+
6
9
  /// Defines a typography level from the Material Design spec.
7
10
  /// @param {String} $font-size The font-size for this level.
8
11
  /// @param {String | Number} $line-height The line-height for this level.
@@ -123,7 +126,7 @@
123
126
  @function define-typography-config(
124
127
  // TODO(mmalerba): rename this function to define-typography-config,
125
128
  // and create a predefined px based config for people that need it.
126
- $font-family: mdc-typography.$font-family,
129
+ $font-family: $_default-font-family,
127
130
  $headline-1: null,
128
131
  $headline-2: null,
129
132
  $headline-3: null,
@@ -180,7 +183,7 @@
180
183
  @function define-rem-typography-config(
181
184
  // TODO(mmalerba): rename this function to define-typography-config,
182
185
  // and create a predefined px based config for people that need it.
183
- $font-family: mdc-typography.$font-family,
186
+ $font-family: $_default-font-family,
184
187
  $headline-1: null,
185
188
  $headline-2: null,
186
189
  $headline-3: null,
@@ -1,8 +1,8 @@
1
1
  // TODO(mmalerba): this file should be split into separate cohesive partials for things like
2
2
  // "theming", "typography", "core".
3
+ @use 'sass:string';
3
4
  @use '../typography/typography';
4
5
  @use '@material/feature-targeting' as mdc-feature-targeting;
5
- @use '@material/typography' as mdc-typography;
6
6
  @use '@material/theme/theme-color' as mdc-theme-color;
7
7
  @use '@material/theme/css' as mdc-theme-css;
8
8
 
@@ -32,7 +32,7 @@ $mdc-typography-styles-query: typography;
32
32
  @function private-fallback-typography-from-mdc() {
33
33
  // This is very close to what we have in `define-typography-config`, but we can't use it here,
34
34
  // because it would cause a circular import and moving it here doesn't make sense.
35
- $font-family: mdc-typography.$font-family;
35
+ $font-family: string.unquote('Roboto, sans-serif');
36
36
  @return (
37
37
  font-family: $font-family,
38
38
  headline-1: typography.typography-config-level-from-mdc(headline1, $font-family),
@@ -70,6 +70,11 @@ $prefix: 'mat-elevation-z';
70
70
  }
71
71
  }
72
72
 
73
+ // Gets the box shadow value for a specific elevation.
74
+ @function get-box-shadow($z-value, $shadow-color: black) {
75
+ @return mdc-elevation.elevation-box-shadow($z-value, $shadow-color);
76
+ }
77
+
73
78
  // Returns a string that can be used as the value for a transition property for elevation.
74
79
  // Calling this function directly is useful in situations where a component needs to transition
75
80
  // more than one property.
@@ -48,4 +48,9 @@
48
48
  -moz-osx-font-smoothing: grayscale;
49
49
  -webkit-font-smoothing: antialiased;
50
50
  }
51
+
52
+ @mixin mask-image($value) {
53
+ -webkit-mask-image: $value;
54
+ mask-image: $value;
55
+ }
51
56
  // stylelint-enable
@@ -60,7 +60,7 @@ $_density-tokens: (
60
60
  (mdc, slider): (),
61
61
  (mdc, snackbar): (),
62
62
  (mdc, switch): (),
63
- (mdc, tab): (
63
+ (mdc, secondary-navigation-tab): (
64
64
  container-height: (48px, 44px, 40px, 36px, 32px)
65
65
  ),
66
66
  (mdc, tab-indicator): (),
@@ -1,11 +1,11 @@
1
1
  @use 'sass:list';
2
2
  @use 'sass:map';
3
3
  @use 'sass:meta';
4
- @use '@material/elevation/elevation-theme' as mdc-elevation-theme;
5
4
  @use '@material/theme/custom-properties' as mdc-custom-properties;
6
5
  @use '@material/theme/theme' as mdc-theme;
7
6
  @use '@material/theme/keys' as mdc-keys;
8
7
  @use '@material/tokens/v0_161' as mdc-tokens;
8
+ @use '../style/elevation';
9
9
  @use '../style/sass-utils';
10
10
  @use '../m2/palette' as m2-palette;
11
11
  @use '../m2/theming' as m2-theming;
@@ -161,7 +161,7 @@ $_component-prefix: null;
161
161
  $elevation: map.get($tokens, $elevation-token);
162
162
  $shadow-color: map.get($tokens, $shadow-color-token);
163
163
  @return map.merge($tokens, (
164
- $elevation-token: mdc-elevation-theme.elevation-box-shadow($elevation, $shadow-color),
164
+ $elevation-token: elevation.get-box-shadow($elevation, $shadow-color),
165
165
  $shadow-color-token: null,
166
166
  ));
167
167
  }
@@ -67,7 +67,7 @@
67
67
  @use './mdc/slider' as tokens-mdc-slider;
68
68
  @use './mdc/snack-bar' as tokens-mdc-snack-bar;
69
69
  @use './mdc/switch' as tokens-mdc-switch;
70
- @use './mdc/tab' as tokens-mdc-tab;
70
+ @use './mdc/secondary-navigation-tab' as tokens-mdc-secondary-navigation-tab;
71
71
  @use './mdc/tab-indicator' as tokens-mdc-tab-indicator;
72
72
  @use '../../theming/inspection';
73
73
 
@@ -179,7 +179,7 @@
179
179
  _get-tokens-for-module($theme, tokens-mdc-snack-bar),
180
180
  _get-tokens-for-module($theme, tokens-mdc-switch),
181
181
  _get-tokens-for-module($theme, tokens-mdc-tab-indicator),
182
- _get-tokens-for-module($theme, tokens-mdc-tab),
182
+ _get-tokens-for-module($theme, tokens-mdc-secondary-navigation-tab),
183
183
  _get-tokens-for-module($theme, tokens-mdc-text-button)
184
184
  );
185
185
  }
@@ -1,4 +1,3 @@
1
- @use '@material/elevation/elevation-theme' as mdc-elevation;
2
1
  @use 'sass:map';
3
2
  @use '../../token-utils';
4
3
  @use '../../../theming/inspection';
@@ -23,7 +22,7 @@ $prefix: (mat, app);
23
22
 
24
23
  @for $zValue from 0 through 24 {
25
24
  $elevation-color: inspection.get-theme-color($theme, foreground, elevation);
26
- $shadow: mdc-elevation.elevation-box-shadow($zValue,
25
+ $shadow: elevation.get-box-shadow($zValue,
27
26
  if($elevation-color == null, elevation.$color, $elevation-color));
28
27
  $tokens: map.set($tokens, 'elevation-shadow-level-#{$zValue}', $shadow);
29
28
  }
@@ -1,6 +1,6 @@
1
- @use '@material/elevation/elevation-theme' as mdc-elevation;
2
1
  @use '../../token-utils';
3
2
  @use '../../../theming/inspection';
3
+ @use '../../../style/elevation';
4
4
  @use '../../../style/sass-utils';
5
5
 
6
6
  // The prefix used to generate the fully qualified name for tokens in this file.
@@ -11,7 +11,7 @@ $prefix: (mat, autocomplete);
11
11
  @function get-unthemable-tokens() {
12
12
  @return (
13
13
  container-shape: 4px,
14
- container-elevation-shadow: mdc-elevation.elevation-box-shadow(8),
14
+ container-elevation-shadow: elevation.get-box-shadow(8),
15
15
  );
16
16
  }
17
17
 
@@ -1,9 +1,9 @@
1
- @use '@material/elevation/elevation-theme' as mdc-elevation;
2
1
  @use 'sass:color';
3
2
  @use 'sass:meta';
4
3
  @use 'sass:math';
5
4
  @use '../../token-utils';
6
5
  @use '../../../theming/inspection';
6
+ @use '../../../style/elevation';
7
7
  @use '../../../style/sass-utils';
8
8
 
9
9
  // The prefix used to generate the fully qualified name for tokens in this file.
@@ -34,8 +34,8 @@ $private-default-overlap-color: #a8dab5;
34
34
  @return (
35
35
  calendar-container-shape: 4px,
36
36
  calendar-container-touch-shape: 4px,
37
- calendar-container-elevation-shadow: mdc-elevation.elevation-box-shadow(4),
38
- calendar-container-touch-elevation-shadow: mdc-elevation.elevation-box-shadow(24),
37
+ calendar-container-elevation-shadow: elevation.get-box-shadow(4),
38
+ calendar-container-touch-elevation-shadow: elevation.get-box-shadow(24),
39
39
  );
40
40
  }
41
41
 
@@ -1,5 +1,5 @@
1
- @use '@material/elevation/elevation-theme' as mdc-elevation;
2
1
  @use '../../token-utils';
2
+ @use '../../../style/elevation';
3
3
  @use '../../../style/sass-utils';
4
4
 
5
5
  // The prefix used to generate the fully qualified name for tokens in this file.
@@ -9,7 +9,7 @@ $prefix: (mat, dialog);
9
9
  // but may be in a future version of the theming API.
10
10
  @function get-unthemable-tokens() {
11
11
  @return (
12
- container-elevation-shadow: mdc-elevation.elevation-box-shadow(24),
12
+ container-elevation-shadow: elevation.get-box-shadow(24),
13
13
  container-max-width: 80vw,
14
14
  container-small-max-width: 80vw,
15
15
  container-min-width: 0,