@angular/material 16.1.0-next.1 → 16.1.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 (68) hide show
  1. package/_index.scss +7 -4
  2. package/_token-theming.scss +2 -0
  3. package/button/_icon-button-theme.scss +0 -1
  4. package/card/_card-theme.import.scss +1 -1
  5. package/card/_card-theme.scss +11 -0
  6. package/checkbox/_checkbox-theme.import.scss +1 -1
  7. package/checkbox/_checkbox-theme.scss +9 -0
  8. package/core/mdc-helpers/_mdc-helpers.scss +13 -28
  9. package/core/style/_sass-utils.scss +32 -2
  10. package/core/tokens/_token-utils.scss +3 -12
  11. package/core/tokens/m2/_index.scss +84 -0
  12. package/core/tokens/m2/mat/_card.scss +17 -16
  13. package/core/tokens/m2/mat/_radio.scss +6 -5
  14. package/core/tokens/m2/mat/_snack-bar.scss +6 -5
  15. package/core/tokens/m2/mat/_tab-header-with-background.scss +6 -5
  16. package/core/tokens/m2/mat/_tab-header.scss +2 -1
  17. package/core/tokens/m2/mdc/_checkbox.scss +39 -38
  18. package/core/tokens/m2/mdc/_chip.scss +2 -2
  19. package/core/tokens/m2/mdc/_circular-progress.scss +5 -8
  20. package/core/tokens/m2/mdc/_dialog.scss +6 -7
  21. package/core/tokens/m2/mdc/_elevated-card.scss +2 -1
  22. package/core/tokens/m2/mdc/_icon-button.scss +5 -13
  23. package/core/tokens/m2/mdc/_linear-progress.scss +9 -11
  24. package/core/tokens/m2/mdc/_list.scss +102 -101
  25. package/core/tokens/m2/mdc/_outlined-card.scss +2 -1
  26. package/core/tokens/m2/mdc/_plain-tooltip.scss +6 -9
  27. package/core/tokens/m2/mdc/_radio.scss +6 -7
  28. package/core/tokens/m2/mdc/_snack-bar.scss +6 -8
  29. package/core/tokens/m2/mdc/_tab-indicator.scss +6 -6
  30. package/core/tokens/m2/mdc/_tab.scss +6 -6
  31. package/core/typography/_all-typography.scss +1 -154
  32. package/core/typography/_typography.scss +162 -0
  33. package/esm2022/chips/chip-grid.mjs +2 -2
  34. package/esm2022/chips/chip-listbox.mjs +2 -2
  35. package/esm2022/chips/chip-set.mjs +2 -2
  36. package/esm2022/core/version.mjs +1 -1
  37. package/esm2022/legacy-select/public-api.mjs +2 -2
  38. package/esm2022/legacy-select/select.mjs +1 -1
  39. package/esm2022/paginator/paginator.mjs +1 -1
  40. package/esm2022/progress-bar/progress-bar.mjs +2 -2
  41. package/esm2022/select/select.mjs +25 -14
  42. package/esm2022/slider/slider-input.mjs +21 -9
  43. package/esm2022/table/row.mjs +2 -2
  44. package/fesm2022/chips.mjs +6 -6
  45. package/fesm2022/chips.mjs.map +1 -1
  46. package/fesm2022/core.mjs +1 -1
  47. package/fesm2022/core.mjs.map +1 -1
  48. package/fesm2022/legacy-select.mjs.map +1 -1
  49. package/fesm2022/paginator.mjs +1 -1
  50. package/fesm2022/paginator.mjs.map +1 -1
  51. package/fesm2022/progress-bar.mjs +2 -2
  52. package/fesm2022/progress-bar.mjs.map +1 -1
  53. package/fesm2022/select.mjs +24 -13
  54. package/fesm2022/select.mjs.map +1 -1
  55. package/fesm2022/slider.mjs +20 -8
  56. package/fesm2022/slider.mjs.map +1 -1
  57. package/fesm2022/table.mjs +1 -1
  58. package/fesm2022/table.mjs.map +1 -1
  59. package/legacy-select/index.d.ts +7 -2
  60. package/package.json +49 -49
  61. package/schematics/ng-add/index.js +1 -1
  62. package/schematics/ng-add/index.mjs +1 -1
  63. package/schematics/ng-generate/mdc-migration/index_bundled.js +44 -44
  64. package/schematics/ng-update/index_bundled.js +25 -25
  65. package/select/index.d.ts +13 -5
  66. package/slider/index.d.ts +10 -1
  67. package/table/index.d.ts +1 -1
  68. package/tabs/_tabs-theme.scss +0 -1
package/_index.scss CHANGED
@@ -9,10 +9,12 @@
9
9
  $amber-palette, $orange-palette, $deep-orange-palette, $brown-palette, $grey-palette,
10
10
  $gray-palette, $blue-grey-palette, $blue-gray-palette, $light-theme-background-palette,
11
11
  $dark-theme-background-palette, $light-theme-foreground-palette, $dark-theme-foreground-palette;
12
- @forward './core/typography/typography' show define-typography-level,
13
- define-legacy-typography-config, legacy-typography-hierarchy, typography-hierarchy;
12
+ @forward './core/typography/typography' show define-typography-level, define-rem-typography-config,
13
+ define-typography-config, typography-hierarchy, define-legacy-typography-config,
14
+ legacy-typography-hierarchy;
14
15
  @forward './core/typography/typography-utils' show typography-level,
15
16
  font-size, line-height, font-weight, letter-spacing, font-family, font-shorthand;
17
+ @forward './core/tokens/m2' show m2-tokens-from-theme;
16
18
 
17
19
  // Private/Internal
18
20
  @forward './core/density/private/all-density' show all-component-densities;
@@ -36,6 +38,8 @@
36
38
  @forward './core/style/button-common' as private-button-common-*;
37
39
  // The form field density mixin needs to be exposed, because the paginator depends on it.
38
40
  @forward './form-field/form-field-theme' as private-form-field-* show private-form-field-density;
41
+ @forward './token-theming' as private-apply-*;
42
+ @forward './core/style/sass-utils' as private-*;
39
43
 
40
44
  // Structural
41
45
  @forward './core/core' show core;
@@ -48,8 +52,7 @@
48
52
  // Theme bundles
49
53
  @forward './core/theming/all-theme' show all-component-themes;
50
54
  @forward './core/color/all-color' show all-component-colors;
51
- @forward './core/typography/all-typography' show all-component-typographies,
52
- define-rem-typography-config, define-typography-config;
55
+ @forward './core/typography/all-typography' show all-component-typographies;
53
56
  @forward './legacy-core/theming/all-theme' show all-legacy-component-themes;
54
57
  @forward './legacy-core/color/all-color' show all-legacy-component-colors;
55
58
  @forward './legacy-core/typography/all-typography' show all-legacy-component-typographies;
@@ -0,0 +1,2 @@
1
+ @forward './card/card-theme' as card-* show card-theme-from-tokens;
2
+ @forward './checkbox/checkbox-theme' as checkbox-* show checkbox-theme-from-tokens;
@@ -1,7 +1,6 @@
1
1
  @use 'sass:map';
2
2
  @use 'sass:math';
3
3
  @use '@material/density/functions' as mdc-density-functions;
4
- @use '@material/icon-button/mixins' as mdc-icon-button;
5
4
  @use '@material/icon-button/icon-button-theme' as mdc-icon-button-theme;
6
5
  @use '@material/theme/theme-color' as mdc-theme-color;
7
6
  @use '../core/tokens/m2/mdc/icon-button' as tokens-mdc-icon-button;
@@ -1,3 +1,3 @@
1
- @forward 'card-theme' hide color, density, theme, typography;
1
+ @forward 'card-theme' hide color, density, theme, typography, theme-from-tokens;
2
2
  @forward 'card-theme' as mat-mdc-card-* hide $mat-mdc-card-mdc-card-action-icon-color,
3
3
  $mat-mdc-card-mdc-card-outline-color;
@@ -1,3 +1,4 @@
1
+ @use 'sass:map';
1
2
  @use '../core/theming/theming';
2
3
  @use '../core/typography/typography';
3
4
  @use '../core/tokens/token-utils';
@@ -76,3 +77,13 @@
76
77
  }
77
78
  }
78
79
  }
80
+
81
+ @mixin theme-from-tokens($tokens) {
82
+ // Add values for card tokens.
83
+ .mat-mdc-card {
84
+ @include mdc-elevated-card-theme.theme(map.get($tokens, tokens-mdc-elevated-card.$prefix));
85
+ @include mdc-outlined-card-theme.theme(map.get($tokens, tokens-mdc-outlined-card.$prefix));
86
+ @include token-utils.create-token-values(
87
+ tokens-mat-card.$prefix, map.get($tokens, tokens-mat-card.$prefix));
88
+ }
89
+ }
@@ -1,5 +1,5 @@
1
1
  @forward 'checkbox-theme' hide color, density, private-checkbox-styles-with-color, theme,
2
- typography;
2
+ typography, theme-from-tokens;
3
3
  @forward 'checkbox-theme' as mat-mdc-* hide $mat-mdc-mdc-checkbox-border-color,
4
4
  $mat-mdc-mdc-checkbox-disabled-color, mat-mdc-background-focus-density,
5
5
  mat-mdc-background-focus-indicator-checked-color, mat-mdc-background-focus-indicator-color,
@@ -88,3 +88,12 @@
88
88
  }
89
89
  }
90
90
  }
91
+
92
+ @mixin theme-from-tokens($tokens) {
93
+ // TODO(mmalerba): Some of the theme styles above are not represented in terms of tokens,
94
+ // so this mixin is currently incomplete.
95
+
96
+ .mat-mdc-checkbox {
97
+ @include mdc-checkbox-theme.theme(map.get($tokens, tokens-mdc-checkbox.$prefix));
98
+ }
99
+ }
@@ -83,21 +83,6 @@ $mat-typography-mdc-level-mappings: (
83
83
  @return $mdc-config;
84
84
  }
85
85
 
86
- // Converts an MDC typography level config to an Angular Material one.
87
- @function typography-config-level-from-mdc($mdc-level, $font-family: null) {
88
- $mdc-level-config: map.get(mdc-typography.$styles, $mdc-level);
89
-
90
- // Explicitly default the font family to null since we'll apply it globally
91
- // through the `define-typgraphy-config`/`define-legacy-typography-config`.
92
- @return typography.define-typography-level(
93
- $font-family: $font-family,
94
- $font-size: map.get($mdc-level-config, font-size),
95
- $line-height: map.get($mdc-level-config, line-height),
96
- $font-weight: map.get($mdc-level-config, font-weight),
97
- $letter-spacing: map.get($mdc-level-config, letter-spacing)
98
- );
99
- }
100
-
101
86
  // MDC logs a warning if the `contrast-tone` function is called with a CSS variable.
102
87
  // This function falls back to determining the tone based on whether the theme is light or dark.
103
88
  @function variable-safe-contrast-tone($value, $is-dark) {
@@ -238,19 +223,19 @@ $mat-typography-mdc-level-mappings: (
238
223
  $font-family: mdc-typography.$font-family;
239
224
  @return (
240
225
  font-family: $font-family,
241
- headline-1: typography-config-level-from-mdc(headline1, $font-family),
242
- headline-2: typography-config-level-from-mdc(headline2, $font-family),
243
- headline-3: typography-config-level-from-mdc(headline3, $font-family),
244
- headline-4: typography-config-level-from-mdc(headline4, $font-family),
245
- headline-5: typography-config-level-from-mdc(headline5, $font-family),
246
- headline-6: typography-config-level-from-mdc(headline6, $font-family),
247
- subtitle-1: typography-config-level-from-mdc(subtitle1, $font-family),
248
- subtitle-2: typography-config-level-from-mdc(subtitle2, $font-family),
249
- body-1: typography-config-level-from-mdc(body1, $font-family),
250
- body-2: typography-config-level-from-mdc(body2, $font-family),
251
- caption: typography-config-level-from-mdc(caption, $font-family),
252
- button: typography-config-level-from-mdc(button, $font-family),
253
- overline: typography-config-level-from-mdc(overline, $font-family),
226
+ headline-1: typography.typography-config-level-from-mdc(headline1, $font-family),
227
+ headline-2: typography.typography-config-level-from-mdc(headline2, $font-family),
228
+ headline-3: typography.typography-config-level-from-mdc(headline3, $font-family),
229
+ headline-4: typography.typography-config-level-from-mdc(headline4, $font-family),
230
+ headline-5: typography.typography-config-level-from-mdc(headline5, $font-family),
231
+ headline-6: typography.typography-config-level-from-mdc(headline6, $font-family),
232
+ subtitle-1: typography.typography-config-level-from-mdc(subtitle1, $font-family),
233
+ subtitle-2: typography.typography-config-level-from-mdc(subtitle2, $font-family),
234
+ body-1: typography.typography-config-level-from-mdc(body1, $font-family),
235
+ body-2: typography.typography-config-level-from-mdc(body2, $font-family),
236
+ caption: typography.typography-config-level-from-mdc(caption, $font-family),
237
+ button: typography.typography-config-level-from-mdc(button, $font-family),
238
+ overline: typography.typography-config-level-from-mdc(overline, $font-family),
254
239
  );
255
240
  }
256
241
 
@@ -1,7 +1,37 @@
1
- // Include content under the current selector (&) or the document root if there is no current
2
- // selector.
1
+ @use 'sass:map';
2
+ @use 'sass:meta';
3
+
4
+ /// Include content under the current selector (&) or the document root if there is no current
5
+ /// selector.
6
+ /// @param {String} $root [html] The default root selector to use when there is no current selector.
7
+ /// @output The given content under the current selector, or root selector if there is no current
8
+ /// selector.
9
+ /// @content Content to output under the current selector, or root selector if there is no current
10
+ /// selector.
3
11
  @mixin current-selector-or-root($root: html) {
4
12
  @at-root #{& or $root} {
5
13
  @content;
6
14
  }
7
15
  }
16
+
17
+ /// A version of the standard `map.deep-merge` function that takes a variable number of arguments.
18
+ /// Each argument is deep-merged into the final result from left to right.
19
+ /// @param {List} $maps The maps to combine with map.deep-merge
20
+ /// @return {Map} The combined result of successively calling map.deep-merge with each parameter.
21
+ @function deep-merge-all($maps...) {
22
+ $result: ();
23
+ @each $map in $maps {
24
+ $result: map.deep-merge($result, $map);
25
+ }
26
+ @return $result;
27
+ }
28
+
29
+ /// Coerces the given value to a list, by converting any non-list value into a single-item list.
30
+ /// This should be used when dealing with user-passed lists of args to avoid confusing errors,
31
+ /// since Sass treats `($x)` as equivalent to `$x`.
32
+ /// @param {Any} $value The value to coerce to a list.
33
+ /// @return {List} The original $value if it was a list, otherwise a single-item list containing
34
+ /// $value.
35
+ @function coerce-to-list($value) {
36
+ @return if(meta.type-of($value) != 'list', ($value,), $value);
37
+ }
@@ -3,9 +3,9 @@
3
3
  @use '@material/theme/custom-properties' as mdc-custom-properties;
4
4
  @use '@material/theme/theme' as mdc-theme;
5
5
  @use '@material/theme/keys' as mdc-keys;
6
- @use '../mdc-helpers/mdc-helpers';
7
6
  @use '../theming/palette';
8
7
  @use '../theming/theming';
8
+ @use '../typography/typography';
9
9
 
10
10
  $_placeholder-color-palette: theming.define-palette(palette.$red-palette);
11
11
 
@@ -20,7 +20,7 @@ $placeholder-color-config: (
20
20
  background: palette.$light-theme-background-palette,
21
21
  );
22
22
 
23
- $_placeholder-typography-level-config: mdc-helpers.typography-config-level-from-mdc(body1);
23
+ $_placeholder-typography-level-config: typography.typography-config-level-from-mdc(body1);
24
24
 
25
25
  // Placeholder typography config that can be passed to token getter functions when generating token
26
26
  // slots.
@@ -52,7 +52,7 @@ $_component-prefix: null;
52
52
  $_component-prefix: '' !global;
53
53
  @each $item in $rest {
54
54
  $_component-prefix:
55
- if($_component-prefix == '', $item, '#{$_component-prefix}-#{$item}') !global;
55
+ if($_component-prefix == '', $item, '#{$_component-prefix}-#{$item}') !global;
56
56
  }
57
57
  @include mdc-custom-properties.configure($varname-prefix: $first) {
58
58
  @content;
@@ -87,15 +87,6 @@ $_component-prefix: null;
87
87
  }
88
88
  }
89
89
 
90
- // Merges together a list of maps into a single map.
91
- @function merge-all($maps...) {
92
- $result: ();
93
- @each $map in $maps {
94
- $result: map.merge($result, $map);
95
- }
96
- @return $result;
97
- }
98
-
99
90
  // MDC doesn't currently handle elevation tokens properly. As a temporary workaround we can combine
100
91
  // the elevation and shadow-color tokens into a full box-shadow and use it as the value for the
101
92
  // elevation token.
@@ -0,0 +1,84 @@
1
+ @use 'sass:map';
2
+ @use 'sass:meta';
3
+ @use '../../style/sass-utils';
4
+
5
+ @use './mat/card' as tokens-mat-card;
6
+ @use './mat/radio' as tokens-mat-radio;
7
+ @use './mat/snack-bar' as tokens-mat-snack-bar;
8
+ @use './mat/tab-header' as tokens-mat-tab-header;
9
+ @use './mat/tab-header-with-background' as tokens-mat-tab-header-with-background;
10
+ @use './mdc/checkbox' as tokens-mdc-checkbox;
11
+ @use './mdc/circular-progress' as tokens-mdc-circular-progress;
12
+ @use './mdc/dialog' as tokens-mdc-dialog;
13
+ @use './mdc/elevated-card' as tokens-mdc-elevated-card;
14
+ @use './mdc/icon-button' as tokens-mdc-icon-button;
15
+ @use './mdc/linear-progress' as tokens-mdc-linear-progress;
16
+ @use './mdc/list' as tokens-mdc-list;
17
+ @use './mdc/outlined-card' as tokens-mdc-outlined-card;
18
+ @use './mdc/radio' as tokens-mdc-radio;
19
+ @use './mdc/snack-bar' as tokens-mdc-snack-bar;
20
+ @use './mdc/tab' as tokens-mdc-tab;
21
+ @use './mdc/tab-indicator' as tokens-mdc-tab-indicator;
22
+
23
+ /// Gets the tokens for the given theme, m2 tokens module, and theming system.
24
+ /// @param {Map} $theme The Angular Material theme object to generate token values from.
25
+ /// @param {String} $module The Sass module containing the token getter functions.
26
+ /// @param {String} $system The theming system to get tokens for. Valid values are: unthemable,
27
+ /// color, typography, density.
28
+ /// @return {Map} The token map by calling the token getter for the given system in the given module
29
+ /// with the given Angular Material theme. Token names are not fully-qualified.
30
+ @function _get-tokens-for-module-and-system($theme, $module, $system) {
31
+ @if $system == unthemable {
32
+ @return meta.call(
33
+ meta.get-function(get-#{$system}-tokens, $module: $module));
34
+ }
35
+ @if not map.get($theme, $system) {
36
+ @return ();
37
+ }
38
+ @return meta.call(
39
+ meta.get-function(get-#{$system}-tokens, $module: $module), map.get($theme, $system));
40
+ }
41
+
42
+ /// Gets the fully qualified tokens map for the given theme and m2 tokens module.
43
+ /// @param {Map} $theme The Angular Material theme object to generate token values from.
44
+ /// @param {String} $module The Sass module containing the token getter functions.
45
+ /// @return {Map} The token map by calling the token getters in the given module with the given
46
+ /// Angular Material theme. Token names are fully-qualified.
47
+ @function _get-tokens-for-module($theme, $module) {
48
+ $tokens: sass-utils.deep-merge-all(
49
+ _get-tokens-for-module-and-system($theme, $module, unthemable),
50
+ _get-tokens-for-module-and-system($theme, $module, color),
51
+ _get-tokens-for-module-and-system($theme, $module, typography),
52
+ _get-tokens-for-module-and-system($theme, $module, density));
53
+ @return map.set((), map.get(meta.module-variables($module), prefix), $tokens);
54
+ }
55
+
56
+ /// Gets the full set of M2 tokens for the given theme object.
57
+ /// @param {Map} $theme The Angular Material theme object to generate token values from.
58
+ /// @return {Map} The token map for the given Angular Material theme. Returned format:
59
+ /// (
60
+ /// (fully, qualified, namespace): (
61
+ /// token: value
62
+ /// )
63
+ /// )
64
+ @function m2-tokens-from-theme($theme) {
65
+ @return sass-utils.deep-merge-all(
66
+ _get-tokens-for-module($theme, tokens-mat-card),
67
+ _get-tokens-for-module($theme, tokens-mat-radio),
68
+ _get-tokens-for-module($theme, tokens-mat-snack-bar),
69
+ _get-tokens-for-module($theme, tokens-mat-tab-header),
70
+ _get-tokens-for-module($theme, tokens-mat-tab-header-with-background),
71
+ _get-tokens-for-module($theme, tokens-mdc-checkbox),
72
+ _get-tokens-for-module($theme, tokens-mdc-circular-progress),
73
+ _get-tokens-for-module($theme, tokens-mdc-dialog),
74
+ _get-tokens-for-module($theme, tokens-mdc-elevated-card),
75
+ _get-tokens-for-module($theme, tokens-mdc-icon-button),
76
+ _get-tokens-for-module($theme, tokens-mdc-linear-progress),
77
+ _get-tokens-for-module($theme, tokens-mdc-list),
78
+ _get-tokens-for-module($theme, tokens-mdc-outlined-card),
79
+ _get-tokens-for-module($theme, tokens-mdc-radio),
80
+ _get-tokens-for-module($theme, tokens-mdc-snack-bar),
81
+ _get-tokens-for-module($theme, tokens-mdc-tab),
82
+ _get-tokens-for-module($theme, tokens-mdc-tab-indicator),
83
+ );
84
+ }
@@ -2,6 +2,7 @@
2
2
  @use '../../token-utils';
3
3
  @use '../../../theming/theming';
4
4
  @use '../../../typography/typography-utils';
5
+ @use '../../../style/sass-utils';
5
6
 
6
7
  // The prefix used to generate the fully qualified name for tokens in this file.
7
8
  $prefix: (mat, card);
@@ -18,7 +19,7 @@ $prefix: (mat, card);
18
19
 
19
20
  @return (
20
21
  // Text color of the card's subtitle.
21
- subtitle-text-color: theming.get-color-from-palette($foreground, secondary-text),
22
+ subtitle-text-color: theming.get-color-from-palette($foreground, secondary-text),
22
23
  );
23
24
  }
24
25
 
@@ -26,27 +27,27 @@ $prefix: (mat, card);
26
27
  @function get-typography-tokens($config) {
27
28
  @return (
28
29
  // Font family of the card's title.
29
- title-text-font: typography-utils.font-family($config, headline-6)
30
+ title-text-font: typography-utils.font-family($config, headline-6)
30
31
  or typography-utils.font-family($config),
31
32
  // Line height of the card's title.
32
- title-text-line-height: typography-utils.line-height($config, headline-6),
33
+ title-text-line-height: typography-utils.line-height($config, headline-6),
33
34
  // Font size of the card's title.
34
- title-text-size: typography-utils.font-size($config, headline-6),
35
+ title-text-size: typography-utils.font-size($config, headline-6),
35
36
  // Letter spacing of the card's title.
36
- title-text-tracking: typography-utils.letter-spacing($config, headline-6),
37
+ title-text-tracking: typography-utils.letter-spacing($config, headline-6),
37
38
  // Font weight of the card's title.
38
- title-text-weight: typography-utils.font-weight($config, headline-6),
39
+ title-text-weight: typography-utils.font-weight($config, headline-6),
39
40
  // Font family of the card's subtitle.
40
- subtitle-text-font: typography-utils.font-family($config, subtitle-2)
41
+ subtitle-text-font: typography-utils.font-family($config, subtitle-2)
41
42
  or typography-utils.font-family($config),
42
43
  // Line height of the card's subtitle.
43
- subtitle-text-line-height: typography-utils.line-height($config, subtitle-2),
44
+ subtitle-text-line-height: typography-utils.line-height($config, subtitle-2),
44
45
  // Font size of the card's subtitle.
45
- subtitle-text-size: typography-utils.font-size($config, subtitle-2),
46
+ subtitle-text-size: typography-utils.font-size($config, subtitle-2),
46
47
  // Letter spacing of the card's subtitle.
47
- subtitle-text-tracking: typography-utils.letter-spacing($config, subtitle-2),
48
+ subtitle-text-tracking: typography-utils.letter-spacing($config, subtitle-2),
48
49
  // Font weight of the card's subtitle.
49
- subtitle-text-weight: typography-utils.font-weight($config, subtitle-2),
50
+ subtitle-text-weight: typography-utils.font-weight($config, subtitle-2),
50
51
  );
51
52
  }
52
53
 
@@ -58,10 +59,10 @@ $prefix: (mat, card);
58
59
  // Combines the tokens generated by the above functions into a single map with placeholder values.
59
60
  // This is used to create token slots.
60
61
  @function get-token-slots() {
61
- @return token-utils.merge-all(
62
- get-unthemable-tokens(),
63
- get-color-tokens(token-utils.$placeholder-color-config),
64
- get-typography-tokens(token-utils.$placeholder-typography-config),
65
- get-density-tokens(token-utils.$placeholder-density-config)
62
+ @return sass-utils.deep-merge-all(
63
+ get-unthemable-tokens(),
64
+ get-color-tokens(token-utils.$placeholder-color-config),
65
+ get-typography-tokens(token-utils.$placeholder-typography-config),
66
+ get-density-tokens(token-utils.$placeholder-density-config)
66
67
  );
67
68
  }
@@ -1,6 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '../../token-utils';
3
3
  @use '../../../theming/theming';
4
+ @use '../../../style/sass-utils';
4
5
 
5
6
  // The prefix used to generate the fully qualified name for tokens in this file.
6
7
  $prefix: (mat, radio);
@@ -37,10 +38,10 @@ $prefix: (mat, radio);
37
38
  // Combines the tokens generated by the above functions into a single map with placeholder values.
38
39
  // This is used to create token slots.
39
40
  @function get-token-slots() {
40
- @return token-utils.merge-all(
41
- get-unthemable-tokens(),
42
- get-color-tokens(token-utils.$placeholder-color-config),
43
- get-typography-tokens(token-utils.$placeholder-typography-config),
44
- get-density-tokens(token-utils.$placeholder-density-config)
41
+ @return sass-utils.deep-merge-all(
42
+ get-unthemable-tokens(),
43
+ get-color-tokens(token-utils.$placeholder-color-config),
44
+ get-typography-tokens(token-utils.$placeholder-typography-config),
45
+ get-density-tokens(token-utils.$placeholder-density-config)
45
46
  );
46
47
  }
@@ -1,6 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '../../token-utils';
3
3
  @use '../../../theming/theming';
4
+ @use '../../../style/sass-utils';
4
5
 
5
6
  // The prefix used to generate the fully qualified name for tokens in this file.
6
7
  $prefix: (mat, snack-bar);
@@ -34,10 +35,10 @@ $prefix: (mat, snack-bar);
34
35
  // Combines the tokens generated by the above functions into a single map with placeholder values.
35
36
  // This is used to create token slots.
36
37
  @function get-token-slots() {
37
- @return token-utils.merge-all(
38
- get-unthemable-tokens(),
39
- get-color-tokens(token-utils.$placeholder-color-config),
40
- get-typography-tokens(token-utils.$placeholder-typography-config),
41
- get-density-tokens(token-utils.$placeholder-density-config)
38
+ @return sass-utils.deep-merge-all(
39
+ get-unthemable-tokens(),
40
+ get-color-tokens(token-utils.$placeholder-color-config),
41
+ get-typography-tokens(token-utils.$placeholder-typography-config),
42
+ get-density-tokens(token-utils.$placeholder-density-config)
42
43
  );
43
44
  }
@@ -1,6 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '../../token-utils';
3
3
  @use '../../../theming/theming';
4
+ @use '../../../style/sass-utils';
4
5
 
5
6
  // The prefix used to generate the fully qualified name for tokens in this file.
6
7
  $prefix: (mat, tab-header-with-background);
@@ -34,10 +35,10 @@ $prefix: (mat, tab-header-with-background);
34
35
  // Combines the tokens generated by the above functions into a single map with placeholder values.
35
36
  // This is used to create token slots.
36
37
  @function get-token-slots() {
37
- @return token-utils.merge-all(
38
- get-unthemable-tokens(),
39
- get-color-tokens(token-utils.$placeholder-color-config),
40
- get-typography-tokens(token-utils.$placeholder-typography-config),
41
- get-density-tokens(token-utils.$placeholder-density-config)
38
+ @return sass-utils.deep-merge-all(
39
+ get-unthemable-tokens(),
40
+ get-color-tokens(token-utils.$placeholder-color-config),
41
+ get-typography-tokens(token-utils.$placeholder-typography-config),
42
+ get-density-tokens(token-utils.$placeholder-density-config)
42
43
  );
43
44
  }
@@ -2,6 +2,7 @@
2
2
  @use '../../token-utils';
3
3
  @use '../../../theming/theming';
4
4
  @use '../../../typography/typography-utils';
5
+ @use '../../../style/sass-utils';
5
6
 
6
7
  // The prefix used to generate the fully qualified name for tokens in this file.
7
8
  $prefix: (mat, tab-header);
@@ -62,7 +63,7 @@ $prefix: (mat, tab-header);
62
63
  // Combines the tokens generated by the above functions into a single map with placeholder values.
63
64
  // This is used to create token slots.
64
65
  @function get-token-slots() {
65
- @return token-utils.merge-all(
66
+ @return sass-utils.deep-merge-all(
66
67
  get-unthemable-tokens(),
67
68
  get-color-tokens(token-utils.$placeholder-color-config),
68
69
  get-typography-tokens(token-utils.$placeholder-typography-config),
@@ -1,6 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '../../../theming/palette';
3
3
  @use '../../../theming/theming';
4
+ @use '../../../style/sass-utils';
4
5
  @use '../../token-utils';
5
6
  @use '@material/theme/theme-color' as mdc-theme-color;
6
7
 
@@ -26,25 +27,25 @@ $prefix: (mdc, checkbox);
26
27
  @function get-unthemable-tokens() {
27
28
  @return (
28
29
  // The color of the checkmark when the checkbox is selected and disabled.
29
- disabled-selected-checkmark-color: #fff,
30
+ disabled-selected-checkmark-color: #fff,
30
31
  // The opacity of the ripple when the checkbox is selected and focused.
31
- selected-focus-state-layer-opacity: 0.16,
32
+ selected-focus-state-layer-opacity: 0.16,
32
33
  // The opacity of the ripple when the checkbox is selected and hovered.
33
- selected-hover-state-layer-opacity: 0.04,
34
+ selected-hover-state-layer-opacity: 0.04,
34
35
  // The opacity of the ripple when the checkbox is selected and pressed.
35
- selected-pressed-state-layer-opacity: 0.16,
36
+ selected-pressed-state-layer-opacity: 0.16,
36
37
  // The opacity of the ripple when the checkbox is unselected and focused.
37
- unselected-focus-state-layer-opacity: 0.16,
38
+ unselected-focus-state-layer-opacity: 0.16,
38
39
  // The opacity of the ripple when the checkbox is unselected and hovered.
39
- unselected-hover-state-layer-opacity: 0.04,
40
+ unselected-hover-state-layer-opacity: 0.04,
40
41
  // The opacity of the ripple when the checkbox is unselected and pressed.
41
- unselected-pressed-state-layer-opacity: 0.16,
42
+ unselected-pressed-state-layer-opacity: 0.16,
42
43
  // =============================================================================================
43
44
  // = TOKENS NOT USED IN ANGULAR MATERIAL =
44
45
  // =============================================================================================
45
46
  // MDC currently doesn't output a slot for these tokens.
46
- disabled-selected-icon-opacity: null,
47
- disabled-unselected-icon-opacity: null,
47
+ disabled-selected-icon-opacity: null,
48
+ disabled-unselected-icon-opacity: null,
48
49
  );
49
50
  }
50
51
 
@@ -59,43 +60,43 @@ $prefix: (mdc, checkbox);
59
60
  $selected-color: theming.get-color-from-palette($accent);
60
61
  $border-color: theming.get-color-from-palette($foreground, base, 0.54);
61
62
  $active-border-color:
62
- theming.get-color-from-palette(palette.$gray-palette, if($is-dark, 200, 900));
63
+ theming.get-color-from-palette(palette.$gray-palette, if($is-dark, 200, 900));
63
64
 
64
65
  @return (
65
66
  // The color of the checkbox fill when the checkbox is selected and disabled.
66
- disabled-selected-icon-color: $disabled-color,
67
+ disabled-selected-icon-color: $disabled-color,
67
68
  // The color of the checkbox border when the checkbox is unselected and disabled.
68
- disabled-unselected-icon-color: $disabled-color,
69
+ disabled-unselected-icon-color: $disabled-color,
69
70
  // The color of the checkmark when the checkbox is selected.
70
- selected-checkmark-color: _contrast-tone($selected-color, $is-dark),
71
+ selected-checkmark-color: _contrast-tone($selected-color, $is-dark),
71
72
  // The color of the checkbox fill when the checkbox is selected and focused.
72
- selected-focus-icon-color: $selected-color,
73
+ selected-focus-icon-color: $selected-color,
73
74
  // The color of the checkbox fill when the checkbox is selected and hovered.
74
- selected-hover-icon-color: $selected-color,
75
+ selected-hover-icon-color: $selected-color,
75
76
  // The color of the checkbox fill when the checkbox is selected.
76
- selected-icon-color: $selected-color,
77
+ selected-icon-color: $selected-color,
77
78
  // The color of the checkbox fill when the checkbox is selected an pressed.
78
- selected-pressed-icon-color: $selected-color,
79
+ selected-pressed-icon-color: $selected-color,
79
80
  // The color of the checkbox border when the checkbox is unselected and focused.
80
- unselected-focus-icon-color: $active-border-color,
81
+ unselected-focus-icon-color: $active-border-color,
81
82
  // The color of the checkbox border when the checkbox is unselected and hovered.
82
- unselected-hover-icon-color: $active-border-color,
83
+ unselected-hover-icon-color: $active-border-color,
83
84
  // The color of the checkbox border when the checkbox is unselected.
84
- unselected-icon-color: $border-color,
85
+ unselected-icon-color: $border-color,
85
86
  // The color of the checkbox border when the checkbox is unselected and pressed.
86
- unselected-pressed-icon-color: $border-color,
87
+ unselected-pressed-icon-color: $border-color,
87
88
  // The color of the ripple when the checkbox is selected and focused.
88
- selected-focus-state-layer-color: $accent-default,
89
+ selected-focus-state-layer-color: $accent-default,
89
90
  // The color of the ripple when the checkbox is selected and hovered.
90
- selected-hover-state-layer-color: $accent-default,
91
+ selected-hover-state-layer-color: $accent-default,
91
92
  // The color of the ripple when the checkbox is selected and pressed.
92
- selected-pressed-state-layer-color: $accent-default,
93
+ selected-pressed-state-layer-color: $accent-default,
93
94
  // The color of the ripple when the checkbox is unselected and focused.
94
- unselected-focus-state-layer-color: $foreground-base,
95
+ unselected-focus-state-layer-color: $foreground-base,
95
96
  // The color of the ripple when the checkbox is unselected and hovered.
96
- unselected-hover-state-layer-color: $foreground-base,
97
+ unselected-hover-state-layer-color: $foreground-base,
97
98
  // The color of the ripple when the checkbox is unselected and pressed.
98
- unselected-pressed-state-layer-color: $foreground-base,
99
+ unselected-pressed-state-layer-color: $foreground-base,
99
100
  );
100
101
  }
101
102
 
@@ -110,22 +111,22 @@ $prefix: (mdc, checkbox);
110
111
 
111
112
  @return (
112
113
  // The diameter of the checkbox's ripple.
113
- state-layer-size: map.get((
114
- 0: 40px,
115
- -1: 36px,
116
- -2: 32px,
117
- -3: 28px,
118
- ), $scale)
114
+ state-layer-size: map.get((
115
+ 0: 40px,
116
+ -1: 36px,
117
+ -2: 32px,
118
+ -3: 28px,
119
+ ), $scale)
119
120
  );
120
121
  }
121
122
 
122
123
  // Combines the tokens generated by the above functions into a single map with placeholder values.
123
124
  // This is used to create token slots.
124
125
  @function get-token-slots() {
125
- @return token-utils.merge-all(
126
- get-unthemable-tokens(),
127
- get-color-tokens(token-utils.$placeholder-color-config),
128
- get-typography-tokens(token-utils.$placeholder-typography-config),
129
- get-density-tokens(token-utils.$placeholder-density-config)
126
+ @return sass-utils.deep-merge-all(
127
+ get-unthemable-tokens(),
128
+ get-color-tokens(token-utils.$placeholder-color-config),
129
+ get-typography-tokens(token-utils.$placeholder-typography-config),
130
+ get-density-tokens(token-utils.$placeholder-density-config)
130
131
  );
131
132
  }
@@ -1,7 +1,7 @@
1
- @use 'sass:color';
2
1
  @use 'sass:map';
3
2
  @use '../../token-utils';
4
3
  @use '../../../mdc-helpers/mdc-helpers';
4
+ @use '../../../style/sass-utils';
5
5
  @use '../../../theming/theming';
6
6
  @use '../../../typography/typography-utils';
7
7
 
@@ -304,7 +304,7 @@ $prefix: (mdc, chip);
304
304
  // Combines the tokens generated by the above functions into a single map with placeholder values.
305
305
  // This is used to create token slots.
306
306
  @function get-token-slots() {
307
- @return token-utils.merge-all(
307
+ @return sass-utils.deep-merge-all(
308
308
  get-unthemable-tokens(),
309
309
  get-color-tokens(token-utils.$placeholder-color-config),
310
310
  get-typography-tokens(token-utils.$placeholder-typography-config),