@angular/material 19.0.0-next.7 → 19.0.0-next.9

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 (163) hide show
  1. package/_index.scss +3 -2
  2. package/autocomplete/_autocomplete-theme.scss +30 -21
  3. package/badge/_badge-theme.scss +31 -21
  4. package/bottom-sheet/_bottom-sheet-theme.scss +25 -17
  5. package/button/_button-theme.scss +220 -100
  6. package/button/_fab-theme.scss +88 -41
  7. package/button/_icon-button-theme.scss +31 -22
  8. package/button/index.d.ts +2 -2
  9. package/button-toggle/_button-toggle-theme.scss +52 -32
  10. package/card/_card-theme.scss +72 -35
  11. package/checkbox/_checkbox-theme.scss +6 -4
  12. package/chips/_chips-theme.scss +57 -27
  13. package/core/_core-theme.scss +62 -33
  14. package/core/_core.scss +1 -3
  15. package/core/index.d.ts +14 -0
  16. package/core/option/_optgroup-theme.scss +22 -15
  17. package/core/option/_option-theme.scss +27 -18
  18. package/core/ripple/_ripple-theme.scss +26 -18
  19. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +40 -18
  20. package/core/theming/_all-theme.scss +3 -0
  21. package/core/tokens/_density.scss +1 -0
  22. package/core/tokens/_m3-system.scss +34 -6
  23. package/core/tokens/_token-utils.scss +91 -34
  24. package/core/tokens/m2/_index.scss +2 -0
  25. package/core/tokens/m2/mat/_badge.scss +12 -3
  26. package/core/tokens/m2/mat/_timepicker.scss +44 -0
  27. package/core/tokens/m2/mdc/_radio.scss +1 -1
  28. package/core/tokens/m3/_index.scss +2 -0
  29. package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +1 -1
  30. package/core/tokens/m3/mat/_badge.scss +6 -3
  31. package/core/tokens/m3/mat/_timepicker.scss +22 -0
  32. package/core/typography/_all-typography.scss +2 -0
  33. package/datepicker/_datepicker-theme.scss +46 -29
  34. package/datepicker/index.d.ts +1 -1
  35. package/dialog/_dialog-theme.scss +39 -20
  36. package/dialog/index.d.ts +6 -3
  37. package/divider/_divider-theme.scss +21 -14
  38. package/expansion/_expansion-theme.scss +29 -21
  39. package/fesm2022/autocomplete.mjs +14 -16
  40. package/fesm2022/autocomplete.mjs.map +1 -1
  41. package/fesm2022/badge.mjs +11 -12
  42. package/fesm2022/badge.mjs.map +1 -1
  43. package/fesm2022/bottom-sheet.mjs +11 -11
  44. package/fesm2022/bottom-sheet.mjs.map +1 -1
  45. package/fesm2022/button-toggle.mjs +14 -13
  46. package/fesm2022/button-toggle.mjs.map +1 -1
  47. package/fesm2022/button.mjs +45 -43
  48. package/fesm2022/button.mjs.map +1 -1
  49. package/fesm2022/card.mjs +49 -60
  50. package/fesm2022/card.mjs.map +1 -1
  51. package/fesm2022/checkbox.mjs +19 -18
  52. package/fesm2022/checkbox.mjs.map +1 -1
  53. package/fesm2022/chips.mjs +52 -55
  54. package/fesm2022/chips.mjs.map +1 -1
  55. package/fesm2022/core.mjs +122 -116
  56. package/fesm2022/core.mjs.map +1 -1
  57. package/fesm2022/datepicker.mjs +98 -106
  58. package/fesm2022/datepicker.mjs.map +1 -1
  59. package/fesm2022/dialog/testing.mjs +0 -1
  60. package/fesm2022/dialog/testing.mjs.map +1 -1
  61. package/fesm2022/dialog.mjs +28 -33
  62. package/fesm2022/dialog.mjs.map +1 -1
  63. package/fesm2022/divider.mjs +8 -8
  64. package/fesm2022/divider.mjs.map +1 -1
  65. package/fesm2022/expansion.mjs +31 -34
  66. package/fesm2022/expansion.mjs.map +1 -1
  67. package/fesm2022/form-field.mjs +38 -45
  68. package/fesm2022/form-field.mjs.map +1 -1
  69. package/fesm2022/grid-list.mjs +26 -29
  70. package/fesm2022/grid-list.mjs.map +1 -1
  71. package/fesm2022/icon/testing.mjs +7 -7
  72. package/fesm2022/icon/testing.mjs.map +1 -1
  73. package/fesm2022/icon.mjs +12 -12
  74. package/fesm2022/icon.mjs.map +1 -1
  75. package/fesm2022/input.mjs +7 -8
  76. package/fesm2022/input.mjs.map +1 -1
  77. package/fesm2022/list.mjs +60 -67
  78. package/fesm2022/list.mjs.map +1 -1
  79. package/fesm2022/menu.mjs +23 -24
  80. package/fesm2022/menu.mjs.map +1 -1
  81. package/fesm2022/paginator/testing.mjs +2 -2
  82. package/fesm2022/paginator/testing.mjs.map +1 -1
  83. package/fesm2022/paginator.mjs +11 -11
  84. package/fesm2022/paginator.mjs.map +1 -1
  85. package/fesm2022/progress-bar.mjs +8 -8
  86. package/fesm2022/progress-bar.mjs.map +1 -1
  87. package/fesm2022/progress-spinner.mjs +8 -8
  88. package/fesm2022/progress-spinner.mjs.map +1 -1
  89. package/fesm2022/radio.mjs +14 -13
  90. package/fesm2022/radio.mjs.map +1 -1
  91. package/fesm2022/select.mjs +12 -13
  92. package/fesm2022/select.mjs.map +1 -1
  93. package/fesm2022/sidenav.mjs +28 -30
  94. package/fesm2022/sidenav.mjs.map +1 -1
  95. package/fesm2022/slide-toggle.mjs +19 -18
  96. package/fesm2022/slide-toggle.mjs.map +1 -1
  97. package/fesm2022/slider.mjs +21 -21
  98. package/fesm2022/slider.mjs.map +1 -1
  99. package/fesm2022/snack-bar.mjs +25 -28
  100. package/fesm2022/snack-bar.mjs.map +1 -1
  101. package/fesm2022/sort.mjs +17 -16
  102. package/fesm2022/sort.mjs.map +1 -1
  103. package/fesm2022/stepper.mjs +37 -40
  104. package/fesm2022/stepper.mjs.map +1 -1
  105. package/fesm2022/table.mjs +57 -73
  106. package/fesm2022/table.mjs.map +1 -1
  107. package/fesm2022/tabs.mjs +57 -63
  108. package/fesm2022/tabs.mjs.map +1 -1
  109. package/fesm2022/timepicker/testing.mjs +196 -0
  110. package/fesm2022/timepicker/testing.mjs.map +1 -0
  111. package/fesm2022/timepicker.mjs +842 -0
  112. package/fesm2022/timepicker.mjs.map +1 -0
  113. package/fesm2022/toolbar.mjs +11 -12
  114. package/fesm2022/toolbar.mjs.map +1 -1
  115. package/fesm2022/tooltip.mjs +11 -12
  116. package/fesm2022/tooltip.mjs.map +1 -1
  117. package/fesm2022/tree.mjs +26 -32
  118. package/fesm2022/tree.mjs.map +1 -1
  119. package/form-field/_form-field-theme.scss +105 -56
  120. package/form-field/index.d.ts +1 -1
  121. package/grid-list/_grid-list-theme.scss +18 -12
  122. package/icon/_icon-theme.scss +15 -11
  123. package/icon/index.d.ts +1 -1
  124. package/input/_input-theme.scss +11 -8
  125. package/list/_list-theme.scss +82 -44
  126. package/menu/_menu-theme.scss +26 -18
  127. package/menu/index.d.ts +0 -1
  128. package/package.json +10 -2
  129. package/paginator/_paginator-theme.scss +32 -20
  130. package/prebuilt-themes/azure-blue.css +1 -1
  131. package/prebuilt-themes/cyan-orange.css +1 -1
  132. package/prebuilt-themes/deeppurple-amber.css +1 -1
  133. package/prebuilt-themes/indigo-pink.css +1 -1
  134. package/prebuilt-themes/magenta-violet.css +1 -1
  135. package/prebuilt-themes/pink-bluegrey.css +1 -1
  136. package/prebuilt-themes/purple-green.css +1 -1
  137. package/prebuilt-themes/rose-red.css +1 -1
  138. package/progress-bar/_progress-bar-theme.scss +13 -11
  139. package/progress-spinner/_progress-spinner-theme.scss +34 -20
  140. package/radio/_radio-theme.scss +50 -26
  141. package/schematics/collection.json +3 -3
  142. package/schematics/ng-add/index.js +1 -1
  143. package/schematics/ng-add/index.mjs +1 -1
  144. package/schematics/ng-generate/{m3-theme → theme-color}/index_bundled.js +454 -288
  145. package/schematics/ng-generate/theme-color/index_bundled.js.map +7 -0
  146. package/schematics/ng-generate/{m3-theme → theme-color}/schema.json +7 -13
  147. package/select/_select-theme.scss +31 -22
  148. package/sidenav/_sidenav-theme.scss +21 -14
  149. package/slide-toggle/_slide-toggle-theme.scss +42 -22
  150. package/slider/_slider-theme.scss +55 -35
  151. package/snack-bar/_snack-bar-theme.scss +22 -14
  152. package/sort/_sort-theme.scss +26 -18
  153. package/stepper/_stepper-theme.scss +33 -24
  154. package/table/_table-theme.scss +29 -20
  155. package/tabs/_tabs-theme.scss +89 -46
  156. package/tabs/index.d.ts +2 -2
  157. package/timepicker/_timepicker-theme.scss +120 -0
  158. package/timepicker/index.d.ts +297 -0
  159. package/timepicker/testing/index.d.ts +113 -0
  160. package/toolbar/_toolbar-theme.scss +28 -19
  161. package/tooltip/_tooltip-theme.scss +11 -12
  162. package/tree/_tree-theme.scss +26 -18
  163. package/schematics/ng-generate/m3-theme/index_bundled.js.map +0 -7
@@ -8,8 +8,8 @@
8
8
  @use './m3-tokens';
9
9
 
10
10
  // Prefix used for component token fallback variables, e.g.
11
- // `color: var(--mdc-text-button-label-text-color, var(--mat-app-primary));`
12
- $_system-fallback-prefix: mat-app;
11
+ // `color: var(--mdc-text-button-label-text-color, var(--mat-sys-primary));`
12
+ $_system-fallback-prefix: mat-sys;
13
13
 
14
14
  // Default system level prefix to use when directly calling the `system-level-*` mixins
15
15
  $_system-level-prefix: sys;
@@ -36,8 +36,8 @@ $_system-level-prefix: sys;
36
36
  /// if the density value is a map, it must have a `scale` value. Density variable definitions will
37
37
  /// not be emitted if there are no density values in the config.
38
38
  ///
39
- /// The application variables emitted use the namespace prefix "--mat-app".
40
- /// e.g. --mat-app-surface: #E5E5E5
39
+ /// The application variables emitted use the namespace prefix "--mat-sys".
40
+ /// e.g. --mat-sys-surface: #E5E5E5
41
41
  ///
42
42
  /// @param {Map} $config The color configuration with optional keys color, typography, or density.
43
43
  @mixin theme($config, $overrides: ()) {
@@ -84,6 +84,25 @@ $_system-level-prefix: sys;
84
84
  @include system-level-state($overrides: $overrides, $prefix: $_system-fallback-prefix);
85
85
  }
86
86
 
87
+ /// Emits the system-level CSS variables for each of the provided override values. E.g. to
88
+ /// change the primary color to red, use `mat.theme-overrides((primary: red));`
89
+ @mixin theme-overrides($overrides, $prefix: $_system-fallback-prefix) {
90
+ $sys-names: map-merge-all(
91
+ definitions.md-sys-color-values-light(),
92
+ definitions.md-sys-typescale-values(),
93
+ definitions.md-sys-elevation-values(),
94
+ definitions.md-sys-shape-values(),
95
+ definitions.md-sys-state-values());
96
+
97
+ & {
98
+ @each $name, $value in $overrides {
99
+ @if (map.has-key($sys-names, $name)) {
100
+ --#{$prefix}-#{$name}: #{map.get($overrides, $name)};
101
+ }
102
+ }
103
+ }
104
+ }
105
+
87
106
  @mixin system-level-colors($theme, $overrides: (), $prefix: null) {
88
107
  $palettes: map.get($theme, _mat-theming-internals-do-not-access, palettes);
89
108
  $base-palettes: (
@@ -186,8 +205,8 @@ $_system-level-prefix: sys;
186
205
  }
187
206
 
188
207
  // Return a new map where the values are the same as the provided map's
189
- // keys, prefixed with "--mat-app-". For example:
190
- // (key1: '', key2: '') --> (key1: --mat-app-key1, key2: --mat-app-key2)
208
+ // keys, prefixed with "--mat-sys-". For example:
209
+ // (key1: '', key2: '') --> (key1: --mat-sys-key1, key2: --mat-sys-key2)
191
210
  @function _create-system-app-vars-map($map) {
192
211
  $new-map: ();
193
212
  @each $key, $value in $map {
@@ -226,3 +245,12 @@ $_system-level-prefix: sys;
226
245
  m3-tokens.generate-density-tokens(0)
227
246
  );
228
247
  }
248
+
249
+ /// Creates a single merged map from the provided variable-length map arguments
250
+ @function map-merge-all($maps...) {
251
+ $result: ();
252
+ @each $map in $maps {
253
+ $result: map.merge($result, $map);
254
+ }
255
+ @return $result;
256
+ }
@@ -138,10 +138,13 @@ $_system-fallbacks: m3-system.create-system-fallbacks();
138
138
  @function resolve-elevation($tokens, $elevation-token, $shadow-color-token) {
139
139
  $elevation: map.get($tokens, $elevation-token);
140
140
  $shadow-color: map.get($tokens, $shadow-color-token);
141
- @return map.merge($tokens, (
142
- $elevation-token: elevation.get-box-shadow($elevation, $shadow-color),
143
- $shadow-color-token: null,
144
- ));
141
+ @return map.merge(
142
+ $tokens,
143
+ (
144
+ $elevation-token: elevation.get-box-shadow($elevation, $shadow-color),
145
+ $shadow-color-token: null,
146
+ )
147
+ );
145
148
  }
146
149
 
147
150
  /// Checks whether a list starts wih a given prefix
@@ -195,7 +198,8 @@ $_system-fallbacks: m3-system.create-system-fallbacks();
195
198
  $overrides: map.get($tokens, list.append($prefix, $color-variant));
196
199
  @if $overrides == null {
197
200
  $variants: _supported-color-variants($tokens, $prefix);
198
- $secondary-message: if($variants == (),
201
+ $secondary-message: if(
202
+ $variants == (),
199
203
  'Mixin does not support color variants',
200
204
  'Supported color variants are: #{$variants}'
201
205
  );
@@ -208,41 +212,94 @@ $_system-fallbacks: m3-system.create-system-fallbacks();
208
212
  /// Emits new token values for the given token overrides.
209
213
  /// Verifies that the overrides passed in are valid tokens.
210
214
  /// New token values are emitted under the current selector or root.
211
- @mixin batch-create-token-values($overrides: (), $token-maps...) {
212
- @include _validate-token-overrides($overrides, $token-maps);
213
-
214
- @each $token-map in $token-maps {
215
- $prefix: map.get($token-map, prefix);
216
- $tokens: map.get($token-map, tokens);
217
-
218
- @each $name, $value in $tokens {
219
- $tokens: map.set($tokens, $name, map.get($overrides, $name));
215
+ @mixin batch-create-token-values($overrides: (), $namespace-configs...) {
216
+ @include sass-utils.current-selector-or-root() {
217
+ $prefixed-name-data: ();
218
+ $unprefixed-name-data: ();
219
+ $all-names: ();
220
+
221
+ @each $config in $namespace-configs {
222
+ $namespace: map.get($config, namespace);
223
+ $prefix: if(map.has-key($config, prefix), map.get($config, prefix), '');
224
+ $tokens: _filter-nulls(map.get($config, tokens));
225
+ @each $name, $value in $tokens {
226
+ $prefixed-name: $prefix + $name;
227
+ $all-names: list.append($all-names, $prefixed-name, $separator: comma);
228
+ @if map.has-key($prefixed-name-data, $prefixed-name) {
229
+ @error #{
230
+ 'Error overriding token: Ambiguous token name `'
231
+ }#{
232
+ $prefixed-name
233
+ }#{
234
+ '` exists in multiple namespaces: `('
235
+ }#{
236
+ list.nth(map.get($prefixed-name-data, $prefixed-name), 1)
237
+ }#{
238
+ ')` and `('
239
+ }#{
240
+ $namespace
241
+ }#{
242
+ ')`'
243
+ };
244
+ }
245
+ $prefixed-name-data: map.set($prefixed-name-data, $prefixed-name, ($namespace, $name));
246
+ $unprefixed-data: map.has-key($unprefixed-name-data, $name) and
247
+ map.get($unprefixed-name-data, $name) or
248
+ ();
249
+ $unprefixed-data: list.append($unprefixed-data, ($namespace, $prefixed-name));
250
+ $unprefixed-name-data: map.set($unprefixed-name-data, $name, $unprefixed-data);
251
+ }
220
252
  }
221
253
 
222
- @include sass-utils.current-selector-or-root() {
223
- @include create-token-values($prefix, $tokens);
224
- }
225
- }
226
- }
227
-
228
- /// Verifies that the token overrides exist and are used in one of the given token maps.
229
- @mixin _validate-token-overrides($overrides: (), $token-maps) {
230
- $valid-token-names: ();
231
-
232
- @each $token-map in $token-maps {
233
- @each $name, $value in map.get($token-map, tokens) {
234
- @if ($value != null and list.index($valid-token-names, $name) == null) {
235
- $valid-token-names: list.append($valid-token-names, $name);
254
+ @each $name, $value in $overrides {
255
+ @if map.has-key($prefixed-name-data, $name) {
256
+ $data: map.get($prefixed-name-data, $name);
257
+ $namespace: list.nth($data, 1);
258
+ $name: list.nth($data, 2);
259
+ @include create-token-values(
260
+ $namespace,
261
+ (
262
+ $name: $value,
263
+ )
264
+ );
265
+ } @else if (map.has-key($unprefixed-name-data, $name)) {
266
+ $datalist: map.get($unprefixed-name-data, $name);
267
+ $prefixed-names: ();
268
+ @each $data in $datalist {
269
+ $namespace: list.nth($data, 1);
270
+ $prefixed-names: list.append($prefixed-names, list.nth($data, 2), $separator: comma);
271
+ @include create-token-values(
272
+ $namespace,
273
+ (
274
+ $name: $value,
275
+ )
276
+ );
277
+ }
278
+ @warn #{
279
+ 'Token `'
280
+ }#{
281
+ $name
282
+ }#{
283
+ '` is deprecated. Please use one of the following alternatives: '
284
+ }#{
285
+ $prefixed-names
286
+ };
287
+ } @else {
288
+ @error #{'Invalid token name `'}#{$name}#{'`. '}#{'Valid tokens are: '}#{$all-names};
236
289
  }
237
290
  }
238
291
  }
292
+ }
239
293
 
240
- @each $name in map.keys($overrides) {
241
- @if (list.index($valid-token-names, $name) == null) {
242
- @error (
243
- 'Invalid token: "' + $name + '"'
244
- 'Valid tokens include: ' $valid-token-names
245
- );
294
+ /// Filters keys with a null value out of the map.
295
+ /// @param {Map} $map The map to filter.
296
+ /// @return {Map} The given map with all of the null keys filtered out.
297
+ @function _filter-nulls($map) {
298
+ $result: ();
299
+ @each $key, $val in $map {
300
+ @if $val != null {
301
+ $result: map.set($result, $key, $val);
246
302
  }
247
303
  }
304
+ @return $result;
248
305
  }
@@ -44,6 +44,7 @@
44
44
  @use './mat/table' as tokens-mat-table;
45
45
  @use './mat/toolbar' as tokens-mat-toolbar;
46
46
  @use './mat/tree' as tokens-mat-tree;
47
+ @use './mat/timepicker' as tokens-mat-timepicker;
47
48
  @use './mdc/checkbox' as tokens-mdc-checkbox;
48
49
  @use './mdc/text-button' as tokens-mdc-text-button;
49
50
  @use './mdc/protected-button' as tokens-mdc-protected-button;
@@ -156,6 +157,7 @@
156
157
  _get-tokens-for-module($theme, tokens-mat-text-button),
157
158
  _get-tokens-for-module($theme, tokens-mat-toolbar),
158
159
  _get-tokens-for-module($theme, tokens-mat-tree),
160
+ _get-tokens-for-module($theme, tokens-mat-timepicker),
159
161
  _get-tokens-for-module($theme, tokens-mdc-checkbox),
160
162
  _get-tokens-for-module($theme, tokens-mdc-chip),
161
163
  _get-tokens-for-module($theme, tokens-mdc-circular-progress),
@@ -6,15 +6,19 @@
6
6
  @use '../../../theming/inspection';
7
7
  @use '../../../style/sass-utils';
8
8
 
9
+ $_default-size: 22px;
10
+ $_small-size: $_default-size - 6px;
11
+ $_large-size: $_default-size + 6px;
12
+
9
13
  // The prefix used to generate the fully qualified name for tokens in this file.
10
14
  $prefix: (mat, badge);
11
15
 
12
16
  // Tokens that can't be configured through Angular Material's current theming API,
13
17
  // but may be in a future version of the theming API.
14
18
  @function get-unthemable-tokens() {
15
- $default-size: 22px;
16
- $small-size: $default-size - 6;
17
- $large-size: $default-size + 6;
19
+ $default-size: $_default-size;
20
+ $small-size: $_small-size;
21
+ $large-size: $_large-size;
18
22
 
19
23
  @return (
20
24
  container-shape: 50%,
@@ -77,10 +81,15 @@ $prefix: (mat, badge);
77
81
 
78
82
  @return (
79
83
  text-font: inspection.get-theme-typography($theme, body-2, font-family),
84
+ line-height: $_default-size,
80
85
  text-size: $base-size,
81
86
  text-weight: 600,
87
+
82
88
  small-size-text-size: $base-size * 0.75,
89
+ small-size-line-height: $_small-size,
90
+
83
91
  large-size-text-size: $base-size * 2,
92
+ large-size-line-height: $_large-size,
84
93
  );
85
94
  }
86
95
 
@@ -0,0 +1,44 @@
1
+ @use '../../token-definition';
2
+ @use '../../../theming/inspection';
3
+ @use '../../../style/sass-utils';
4
+ @use '../../../style/elevation';
5
+
6
+ // The prefix used to generate the fully qualified name for tokens in this file.
7
+ $prefix: (mat, timepicker);
8
+
9
+ // Tokens that can't be configured through Angular Material's current theming API,
10
+ // but may be in a future version of the theming API.
11
+ @function get-unthemable-tokens() {
12
+ @return (
13
+ container-shape: 4px,
14
+ container-elevation-shadow: elevation.get-box-shadow(8),
15
+ );
16
+ }
17
+
18
+ // Tokens that can be configured through Angular Material's color theming API.
19
+ @function get-color-tokens($theme) {
20
+ @return (
21
+ container-background-color: inspection.get-theme-color($theme, background, card)
22
+ );
23
+ }
24
+
25
+ // Tokens that can be configured through Angular Material's typography theming API.
26
+ @function get-typography-tokens($theme) {
27
+ @return ();
28
+ }
29
+
30
+ // Tokens that can be configured through Angular Material's density theming API.
31
+ @function get-density-tokens($theme) {
32
+ @return ();
33
+ }
34
+
35
+ // Combines the tokens generated by the above functions into a single map with placeholder values.
36
+ // This is used to create token slots.
37
+ @function get-token-slots() {
38
+ @return sass-utils.deep-merge-all(
39
+ get-unthemable-tokens(),
40
+ get-color-tokens(token-definition.$placeholder-color-config),
41
+ get-typography-tokens(token-definition.$placeholder-typography-config),
42
+ get-density-tokens(token-definition.$placeholder-density-config)
43
+ );
44
+ }
@@ -32,7 +32,6 @@ $prefix: (mdc, radio);
32
32
  selected-hover-state-layer-opacity: null,
33
33
  selected-pressed-state-layer-color: null,
34
34
  selected-pressed-state-layer-opacity: null,
35
- unselected-focus-icon-color: null,
36
35
  unselected-focus-state-layer-color: null,
37
36
  unselected-focus-state-layer-opacity: null,
38
37
  unselected-hover-state-layer-color: null,
@@ -52,6 +51,7 @@ $prefix: (mdc, radio);
52
51
  disabled-selected-icon-color: inspection.get-theme-color($theme, foreground, icon, 1),
53
52
  disabled-unselected-icon-color: inspection.get-theme-color($theme, foreground, icon, 1),
54
53
  unselected-hover-icon-color: $icon-color,
54
+ unselected-focus-icon-color: $icon-color,
55
55
  unselected-icon-color: inspection.get-theme-color($theme, foreground, icon, 0.54),
56
56
  unselected-pressed-icon-color: inspection.get-theme-color($theme, foreground, icon, 0.54),
57
57
  selected-focus-icon-color: $palette-color,
@@ -42,6 +42,7 @@
42
42
  @use './mat/table' as tokens-mat-table;
43
43
  @use './mat/toolbar' as tokens-mat-toolbar;
44
44
  @use './mat/tree' as tokens-mat-tree;
45
+ @use './mat/timepicker' as tokens-mat-timepicker;
45
46
  @use './mdc/checkbox' as tokens-mdc-checkbox;
46
47
  @use './mdc/text-button' as tokens-mdc-text-button;
47
48
  @use './mdc/protected-button' as tokens-mdc-protected-button;
@@ -112,6 +113,7 @@ $_module-names: (
112
113
  tokens-mat-text-button,
113
114
  tokens-mat-toolbar,
114
115
  tokens-mat-tree,
116
+ tokens-mat-timepicker,
115
117
  // MDC tokens
116
118
  tokens-mdc-checkbox,
117
119
  tokens-mdc-chip,
@@ -22,7 +22,7 @@ $_default: (
22
22
 
23
23
  @function values($deps: $_default, $exclude-hardcoded-values: false) {
24
24
  @return (
25
- 'container-color': map.get($deps, 'md-sys-color', 'surface'),
25
+ 'container-color': map.get($deps, 'md-sys-color', 'surface-container-low'),
26
26
  'container-elevation': map.get($deps, 'md-sys-elevation', 'level1'),
27
27
  'container-shadow-color': map.get($deps, 'md-sys-color', 'shadow'),
28
28
  'container-shape': map.get($deps, 'md-sys-shape', 'corner-medium'),
@@ -25,9 +25,11 @@ $prefix: (mat, badge);
25
25
  small-size-text-size: token-definition.hardcode(0, $exclude-hardcoded),
26
26
  container-shape: map.get($systems, md-sys-shape, corner-full),
27
27
  container-size: token-definition.hardcode(16px, $exclude-hardcoded),
28
- legacy-container-size: token-definition.hardcode(16px, $exclude-hardcoded),
29
- legacy-small-size-container-size: token-definition.hardcode(16px, $exclude-hardcoded),
28
+ line-height: token-definition.hardcode(16px, $exclude-hardcoded),
29
+ legacy-container-size: token-definition.hardcode(unset, $exclude-hardcoded),
30
+ legacy-small-size-container-size: token-definition.hardcode(unset, $exclude-hardcoded),
30
31
  small-size-container-size: token-definition.hardcode(6px, $exclude-hardcoded),
32
+ small-size-line-height: token-definition.hardcode(6px, $exclude-hardcoded),
31
33
  container-padding: token-definition.hardcode(0 4px, $exclude-hardcoded),
32
34
  small-size-container-padding: token-definition.hardcode(0, $exclude-hardcoded),
33
35
  container-offset: token-definition.hardcode(-12px 0, $exclude-hardcoded),
@@ -37,11 +39,12 @@ $prefix: (mat, badge);
37
39
 
38
40
  // This size isn't in the M3 spec so we emit the same values as for `medium`.
39
41
  large-size-container-size: token-definition.hardcode(16px, $exclude-hardcoded),
42
+ large-size-line-height: token-definition.hardcode(16px, $exclude-hardcoded),
40
43
  large-size-container-offset: token-definition.hardcode(-12px 0, $exclude-hardcoded),
41
44
  large-size-container-overlap-offset: token-definition.hardcode(-12px, $exclude-hardcoded),
42
45
  large-size-text-size: map.get($systems, md-sys-typescale, label-small-size),
43
46
  large-size-container-padding: token-definition.hardcode(0 4px, $exclude-hardcoded),
44
- legacy-large-size-container-size: token-definition.hardcode(16px, $exclude-hardcoded),
47
+ legacy-large-size-container-size: token-definition.hardcode(unset, $exclude-hardcoded),
45
48
  ), (
46
49
  primary: (
47
50
  background-color: map.get($systems, md-sys-color, primary),
@@ -0,0 +1,22 @@
1
+ @use 'sass:map';
2
+ @use '../../../style/elevation';
3
+ @use '../../token-definition';
4
+
5
+ // The prefix used to generate the fully qualified name for tokens in this file.
6
+ $prefix: (mat, timepicker);
7
+
8
+ /// Generates custom tokens for the mat-timepicker.
9
+ /// @param {Map} $systems The MDC system tokens
10
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
11
+ /// @param {Map} $token-slots Possible token slots
12
+ /// @return {Map} A set of custom tokens for the mat-timepicker
13
+ @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
14
+ $tokens: (
15
+ container-background-color: map.get($systems, md-sys-color, surface-container),
16
+ container-shape: map.get($systems, md-sys-shape, corner-extra-small),
17
+ container-elevation-shadow:
18
+ token-definition.hardcode(elevation.get-box-shadow(2), $exclude-hardcoded),
19
+ );
20
+
21
+ @return token-definition.namespace-tokens($prefix, $tokens, $token-slots);
22
+ }
@@ -35,6 +35,7 @@
35
35
  @use '../../tooltip/tooltip-theme';
36
36
  @use '../../snack-bar/snack-bar-theme';
37
37
  @use '../../form-field/form-field-theme';
38
+ @use '../../timepicker/timepicker-theme';
38
39
  @use '../../tree/tree-theme';
39
40
  @use '../theming/inspection';
40
41
  @use '../core-theme';
@@ -94,6 +95,7 @@
94
95
  @include fab-theme.typography($theme);
95
96
  @include snack-bar-theme.typography($theme);
96
97
  @include table-theme.typography($theme);
98
+ @include timepicker-theme.typography($theme);
97
99
  }
98
100
 
99
101
  // @deprecated Use `all-component-typographies`.
@@ -21,11 +21,15 @@ $calendar-weekday-table-font-size: 11px !default;
21
21
  $palette-color: inspection.get-theme-color($theme, $palette-name);
22
22
  $range-color: tokens-mat-datepicker.private-get-range-background-color($palette-color);
23
23
  $range-tokens: tokens-mat-datepicker.get-range-color-tokens($range-color);
24
- $calendar-tokens:
25
- tokens-mat-datepicker.private-get-calendar-color-palette-color-tokens($theme, $palette-name);
24
+ $calendar-tokens: tokens-mat-datepicker.private-get-calendar-color-palette-color-tokens(
25
+ $theme,
26
+ $palette-name
27
+ );
26
28
 
27
- @include token-utils.create-token-values(tokens-mat-datepicker.$prefix,
28
- map.merge($calendar-tokens, $range-tokens));
29
+ @include token-utils.create-token-values(
30
+ tokens-mat-datepicker.$prefix,
31
+ map.merge($calendar-tokens, $range-tokens)
32
+ );
29
33
  }
30
34
 
31
35
  /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
@@ -34,11 +38,12 @@ $calendar-weekday-table-font-size: 11px !default;
34
38
  @mixin base($theme) {
35
39
  @if inspection.get-theme-version($theme) == 1 {
36
40
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
37
- }
38
- @else {
41
+ } @else {
39
42
  @include sass-utils.current-selector-or-root() {
40
- @include token-utils.create-token-values(tokens-mat-datepicker.$prefix,
41
- tokens-mat-datepicker.get-unthemable-tokens());
43
+ @include token-utils.create-token-values(
44
+ tokens-mat-datepicker.$prefix,
45
+ tokens-mat-datepicker.get-unthemable-tokens()
46
+ );
42
47
  }
43
48
  }
44
49
  }
@@ -51,11 +56,12 @@ $calendar-weekday-table-font-size: 11px !default;
51
56
  @mixin color($theme, $options...) {
52
57
  @if inspection.get-theme-version($theme) == 1 {
53
58
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
54
- }
55
- @else {
59
+ } @else {
56
60
  @include sass-utils.current-selector-or-root() {
57
- @include token-utils.create-token-values(tokens-mat-datepicker.$prefix,
58
- tokens-mat-datepicker.get-color-tokens($theme));
61
+ @include token-utils.create-token-values(
62
+ tokens-mat-datepicker.$prefix,
63
+ tokens-mat-datepicker.get-color-tokens($theme)
64
+ );
59
65
  }
60
66
 
61
67
  .mat-datepicker-content {
@@ -70,14 +76,18 @@ $calendar-weekday-table-font-size: 11px !default;
70
76
 
71
77
  .mat-datepicker-toggle-active {
72
78
  &.mat-accent {
73
- $accent-tokens:
74
- tokens-mat-datepicker.private-get-toggle-color-palette-color-tokens($theme, accent);
79
+ $accent-tokens: tokens-mat-datepicker.private-get-toggle-color-palette-color-tokens(
80
+ $theme,
81
+ accent
82
+ );
75
83
  @include token-utils.create-token-values(tokens-mat-datepicker.$prefix, $accent-tokens);
76
84
  }
77
85
 
78
86
  &.mat-warn {
79
- $warn-tokens:
80
- tokens-mat-datepicker.private-get-toggle-color-palette-color-tokens($theme, warn);
87
+ $warn-tokens: tokens-mat-datepicker.private-get-toggle-color-palette-color-tokens(
88
+ $theme,
89
+ warn
90
+ );
81
91
  @include token-utils.create-token-values(tokens-mat-datepicker.$prefix, $warn-tokens);
82
92
  }
83
93
  }
@@ -89,11 +99,12 @@ $calendar-weekday-table-font-size: 11px !default;
89
99
  @mixin typography($theme) {
90
100
  @if inspection.get-theme-version($theme) == 1 {
91
101
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
92
- }
93
- @else {
102
+ } @else {
94
103
  @include sass-utils.current-selector-or-root() {
95
- @include token-utils.create-token-values(tokens-mat-datepicker.$prefix,
96
- tokens-mat-datepicker.get-typography-tokens($theme));
104
+ @include token-utils.create-token-values(
105
+ tokens-mat-datepicker.$prefix,
106
+ tokens-mat-datepicker.get-typography-tokens($theme)
107
+ );
97
108
  }
98
109
  }
99
110
  }
@@ -103,7 +114,8 @@ $calendar-weekday-table-font-size: 11px !default;
103
114
  $comparison-color: tokens-mat-datepicker.$private-default-comparison-color,
104
115
  $overlap-color: tokens-mat-datepicker.$private-default-overlap-color,
105
116
  $overlap-selected-color:
106
- tokens-mat-datepicker.private-get-default-overlap-selected-color($overlap-color)) {
117
+ tokens-mat-datepicker.private-get-default-overlap-selected-color($overlap-color)
118
+ ) {
107
119
  $tokens: tokens-mat-datepicker.get-range-color-tokens(
108
120
  $range-color: $range-color,
109
121
  $comparison-color: $comparison-color,
@@ -121,8 +133,7 @@ $calendar-weekday-table-font-size: 11px !default;
121
133
  @mixin density($theme) {
122
134
  @if inspection.get-theme-version($theme) == 1 {
123
135
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
124
- }
125
- @else {
136
+ } @else {
126
137
  // TODO(crisbeto): move this into the structural styles
127
138
  // once the icon button density is switched to tokens.
128
139
 
@@ -139,7 +150,10 @@ $calendar-weekday-table-font-size: 11px !default;
139
150
  @mixin overrides($tokens: ()) {
140
151
  @include token-utils.batch-create-token-values(
141
152
  $tokens,
142
- (prefix: tokens-mat-datepicker.$prefix, tokens: tokens-mat-datepicker.get-token-slots()),
153
+ (
154
+ namespace: tokens-mat-datepicker.$prefix,
155
+ tokens: tokens-mat-datepicker.get-token-slots(),
156
+ )
143
157
  );
144
158
  }
145
159
 
@@ -152,8 +166,7 @@ $calendar-weekday-table-font-size: 11px !default;
152
166
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-datepicker') {
153
167
  @if inspection.get-theme-version($theme) == 1 {
154
168
  @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
155
- }
156
- @else {
169
+ } @else {
157
170
  @include base($theme);
158
171
  @if inspection.theme-has($theme, color) {
159
172
  @include color($theme);
@@ -170,8 +183,12 @@ $calendar-weekday-table-font-size: 11px !default;
170
183
 
171
184
  @mixin _theme-from-tokens($tokens, $options...) {
172
185
  @include validation.selector-defined(
173
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
174
- $mat-datepicker-tokens:
175
- token-utils.get-tokens-for($tokens, tokens-mat-datepicker.$prefix, $options...);
186
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
187
+ );
188
+ $mat-datepicker-tokens: token-utils.get-tokens-for(
189
+ $tokens,
190
+ tokens-mat-datepicker.$prefix,
191
+ $options...
192
+ );
176
193
  @include token-utils.create-token-values(tokens-mat-datepicker.$prefix, $mat-datepicker-tokens);
177
194
  }
@@ -825,7 +825,7 @@ declare abstract class MatDatepickerBase<C extends MatDatepickerControl<D>, S, D
825
825
  /** Gets an observable that will emit when the overlay is supposed to be closed. */
826
826
  private _getCloseStream;
827
827
  static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerBase<any, any, any>, never>;
828
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatDatepickerBase<any, any, any>, never, never, { "calendarHeaderComponent": { "alias": "calendarHeaderComponent"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "color": { "alias": "color"; "required": false; }; "touchUi": { "alias": "touchUi"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "viewChanged": "viewChanged"; "openedStream": "opened"; "closedStream": "closed"; }, never, never, false, never>;
828
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatDatepickerBase<any, any, any>, never, never, { "calendarHeaderComponent": { "alias": "calendarHeaderComponent"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "color": { "alias": "color"; "required": false; }; "touchUi": { "alias": "touchUi"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "viewChanged": "viewChanged"; "openedStream": "opened"; "closedStream": "closed"; }, never, never, true, never>;
829
829
  static ngAcceptInputType_touchUi: unknown;
830
830
  static ngAcceptInputType_disabled: unknown;
831
831
  static ngAcceptInputType_restoreFocus: unknown;