@angular/material 19.0.0-next.8 → 19.0.0-rc.0
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.
- package/_index.scss +1 -2
- package/autocomplete/_autocomplete-theme.scss +37 -24
- package/autocomplete/index.d.ts +5 -6
- package/badge/_badge-theme.scss +38 -24
- package/bottom-sheet/_bottom-sheet-theme.scss +32 -20
- package/button/_button-theme.scss +229 -105
- package/button/_fab-theme.scss +95 -44
- package/button/_icon-button-theme.scss +38 -25
- package/button/index.d.ts +3 -3
- package/button-toggle/_button-toggle-theme.scss +62 -37
- package/card/_card-theme.scss +79 -38
- package/card/index.d.ts +2 -3
- package/checkbox/_checkbox-theme.scss +16 -10
- package/chips/_chips-theme.scss +64 -30
- package/core/_core-theme.scss +55 -37
- package/core/_core.scss +3 -6
- package/core/option/_optgroup-theme.scss +29 -18
- package/core/option/_option-theme.scss +34 -21
- package/core/ripple/_ripple-theme.scss +33 -21
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +49 -23
- package/core/theming/_config-validation.scss +4 -4
- package/core/theming/_definition.scss +12 -2
- package/core/tokens/_m3-system.scss +86 -42
- package/core/tokens/_token-utils.scss +91 -34
- package/core/tokens/m2/mat/_badge.scss +12 -3
- package/core/tokens/m2/mdc/_radio.scss +1 -1
- package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +1 -1
- package/core/tokens/m3/mat/_badge.scss +6 -3
- package/datepicker/_datepicker-theme.scss +53 -32
- package/datepicker/index.d.ts +33 -34
- package/dialog/_dialog-theme.scss +46 -23
- package/divider/_divider-theme.scss +28 -17
- package/expansion/_expansion-theme.scss +36 -24
- package/fesm2022/autocomplete/testing.mjs +2 -5
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +225 -148
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs +2 -5
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +45 -35
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +80 -58
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs +2 -2
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs +4 -7
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +82 -45
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +106 -79
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs +3 -6
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs +56 -69
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs +4 -7
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +104 -62
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs +11 -14
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +322 -276
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core/testing.mjs +5 -11
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +242 -187
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker/testing.mjs +13 -22
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +827 -582
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs +15 -10
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +221 -156
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs +1 -1
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider.mjs +10 -12
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion/testing.mjs +7 -10
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +86 -80
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs +12 -15
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/form-field.mjs +179 -132
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs +11 -17
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +75 -56
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +8 -8
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +66 -46
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input/testing.mjs +3 -3
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input.mjs +103 -72
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list/testing.mjs +21 -38
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs +197 -195
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs +3 -6
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +178 -127
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs +10 -13
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +83 -58
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs +1 -1
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +36 -35
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs +1 -1
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +28 -14
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio/testing.mjs +6 -12
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +123 -87
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select/testing.mjs +6 -9
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select.mjs +219 -182
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs +6 -6
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +136 -125
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs +3 -6
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +77 -47
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs +2 -2
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +262 -194
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs +4 -7
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +143 -111
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs +3 -6
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +94 -74
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs +4 -4
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +146 -113
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table/testing.mjs +13 -25
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs +183 -194
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs +5 -5
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +329 -251
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs +7 -16
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +160 -155
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs +2 -5
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +26 -17
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs +6 -9
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +97 -74
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs +3 -6
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +57 -61
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +114 -61
- package/form-field/index.d.ts +9 -10
- package/grid-list/_grid-list-theme.scss +25 -15
- package/icon/_icon-theme.scss +22 -14
- package/input/_input-theme.scss +18 -11
- package/list/_list-theme.scss +89 -47
- package/list/index.d.ts +20 -21
- package/menu/_menu-theme.scss +33 -21
- package/menu/index.d.ts +8 -9
- package/package.json +2 -2
- package/paginator/_paginator-theme.scss +39 -23
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +20 -16
- package/progress-spinner/_progress-spinner-theme.scss +41 -25
- package/progress-spinner/index.d.ts +3 -4
- package/radio/_radio-theme.scss +60 -32
- package/radio/index.d.ts +2 -3
- package/schematics/collection.json +3 -3
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-add/theming/create-custom-theme.js +1 -6
- package/schematics/ng-add/theming/create-custom-theme.mjs +1 -6
- package/schematics/ng-generate/{m3-theme → theme-color}/index_bundled.js +480 -288
- package/schematics/ng-generate/theme-color/index_bundled.js.map +7 -0
- package/schematics/ng-generate/{m3-theme → theme-color}/schema.json +7 -13
- package/schematics/ng-update/index_bundled.js +6 -1
- package/schematics/ng-update/index_bundled.js.map +1 -1
- package/select/_select-theme.scss +38 -25
- package/select/index.d.ts +6 -7
- package/sidenav/_sidenav-theme.scss +28 -17
- package/slide-toggle/_slide-toggle-theme.scss +52 -28
- package/slider/_slider-theme.scss +62 -38
- package/snack-bar/_snack-bar-theme.scss +29 -17
- package/sort/_sort-theme.scss +33 -21
- package/stepper/_stepper-theme.scss +40 -27
- package/stepper/index.d.ts +14 -15
- package/table/_table-theme.scss +36 -23
- package/tabs/_tabs-theme.scss +97 -50
- package/tabs/index.d.ts +2 -2
- package/timepicker/_timepicker-theme.scss +37 -24
- package/toolbar/_toolbar-theme.scss +35 -22
- package/tooltip/_tooltip-theme.scss +18 -15
- package/tooltip/index.d.ts +5 -6
- package/tree/_tree-theme.scss +33 -21
- package/schematics/ng-generate/m3-theme/index_bundled.js.map +0 -7
|
@@ -8,44 +8,72 @@
|
|
|
8
8
|
|
|
9
9
|
@mixin _palette-styles($theme, $palette-name) {
|
|
10
10
|
@include sass-utils.current-selector-or-root() {
|
|
11
|
-
@include token-utils.create-token-values(
|
|
12
|
-
tokens-mat-full-pseudo-checkbox
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
@include token-utils.create-token-values(
|
|
12
|
+
tokens-mat-full-pseudo-checkbox.$prefix,
|
|
13
|
+
tokens-mat-full-pseudo-checkbox.get-color-tokens($theme, $palette-name)
|
|
14
|
+
);
|
|
15
|
+
@include token-utils.create-token-values(
|
|
16
|
+
tokens-mat-minimal-pseudo-checkbox.$prefix,
|
|
17
|
+
tokens-mat-minimal-pseudo-checkbox.get-color-tokens($theme, $palette-name)
|
|
18
|
+
);
|
|
15
19
|
}
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
@mixin _theme-from-tokens($tokens, $options...) {
|
|
19
23
|
@include validation.selector-defined(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
25
|
+
);
|
|
26
|
+
$mat-full-pseudo-checkbox-tokens: token-utils.get-tokens-for(
|
|
27
|
+
$tokens,
|
|
28
|
+
tokens-mat-full-pseudo-checkbox.$prefix,
|
|
29
|
+
$options...
|
|
30
|
+
);
|
|
31
|
+
$mat-minimal-pseudo-checkbox-tokens: token-utils.get-tokens-for(
|
|
32
|
+
$tokens,
|
|
33
|
+
tokens-mat-minimal-pseudo-checkbox.$prefix,
|
|
34
|
+
$options...
|
|
35
|
+
);
|
|
25
36
|
@include token-utils.create-token-values(
|
|
26
|
-
|
|
37
|
+
tokens-mat-full-pseudo-checkbox.$prefix,
|
|
38
|
+
$mat-full-pseudo-checkbox-tokens
|
|
39
|
+
);
|
|
27
40
|
@include token-utils.create-token-values(
|
|
28
|
-
|
|
41
|
+
tokens-mat-minimal-pseudo-checkbox.$prefix,
|
|
42
|
+
$mat-minimal-pseudo-checkbox-tokens
|
|
43
|
+
);
|
|
29
44
|
}
|
|
30
45
|
|
|
31
46
|
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
32
47
|
/// for the mat-pseudo-checkbox.
|
|
33
48
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
34
|
-
@mixin base($theme) {
|
|
49
|
+
@mixin base($theme) {
|
|
50
|
+
}
|
|
35
51
|
|
|
36
|
-
///
|
|
37
|
-
|
|
38
|
-
@mixin overrides($tokens: ()) {
|
|
52
|
+
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
53
|
+
@function _define-overrides() {
|
|
39
54
|
$full-pseudo-checkbox-tokens: tokens-mat-full-pseudo-checkbox.get-token-slots();
|
|
40
55
|
$minimal-pseudo-checkbox-tokens: tokens-mat-minimal-pseudo-checkbox.get-token-slots();
|
|
41
56
|
|
|
42
|
-
@
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
57
|
+
@return (
|
|
58
|
+
(
|
|
59
|
+
namespace: tokens-mat-full-pseudo-checkbox.$prefix,
|
|
60
|
+
tokens: $full-pseudo-checkbox-tokens,
|
|
61
|
+
prefix: 'full-',
|
|
62
|
+
),
|
|
63
|
+
(
|
|
64
|
+
namespace: tokens-mat-minimal-pseudo-checkbox.$prefix,
|
|
65
|
+
tokens: $minimal-pseudo-checkbox-tokens,
|
|
66
|
+
prefix: 'minimal-',
|
|
67
|
+
),
|
|
46
68
|
);
|
|
47
69
|
}
|
|
48
70
|
|
|
71
|
+
/// Outputs the CSS variable values for the given tokens.
|
|
72
|
+
/// @param {Map} $tokens The token values to emit.
|
|
73
|
+
@mixin overrides($tokens: ()) {
|
|
74
|
+
@include token-utils.batch-create-token-values($tokens, _define-overrides()...);
|
|
75
|
+
}
|
|
76
|
+
|
|
49
77
|
/// Outputs color theme styles for the mat-pseudo-checkbox.
|
|
50
78
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
51
79
|
/// @param {ArgList} Additional optional arguments (only supported for M3 themes):
|
|
@@ -54,8 +82,7 @@
|
|
|
54
82
|
@mixin color($theme, $options...) {
|
|
55
83
|
@if inspection.get-theme-version($theme) == 1 {
|
|
56
84
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
|
|
57
|
-
}
|
|
58
|
-
@else {
|
|
85
|
+
} @else {
|
|
59
86
|
// Default to the accent color. Note that the pseudo checkboxes are meant to inherit the
|
|
60
87
|
// theme from their parent, rather than implementing their own theming, which is why we
|
|
61
88
|
// don't attach to the `mat-*` classes. Also note that this needs to be below `.mat-primary`
|
|
@@ -96,8 +123,7 @@
|
|
|
96
123
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-pseudo-checkbox') {
|
|
97
124
|
@if inspection.get-theme-version($theme) == 1 {
|
|
98
125
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
|
|
99
|
-
}
|
|
100
|
-
@else {
|
|
126
|
+
} @else {
|
|
101
127
|
@include base($theme);
|
|
102
128
|
@if inspection.theme-has($theme, color) {
|
|
103
129
|
@include color($theme);
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
/// Validates that the given object is an M3 palette.
|
|
30
30
|
/// @param {*} $palette The object to test
|
|
31
31
|
/// @return {Boolean|null} null if it is a valid M3 palette, else true.
|
|
32
|
-
@function
|
|
32
|
+
@function validate-palette($palette) {
|
|
33
33
|
@if not meta.type-of($palette) == 'map' {
|
|
34
34
|
@return true;
|
|
35
35
|
}
|
|
@@ -100,15 +100,15 @@
|
|
|
100
100
|
);
|
|
101
101
|
}
|
|
102
102
|
@if $config and map.has-key($config, theme-type) and
|
|
103
|
-
not list.index((light, dark), map.get($config, theme-type)) {
|
|
103
|
+
not list.index((light, dark, color-scheme), map.get($config, theme-type)) {
|
|
104
104
|
@return (
|
|
105
|
-
#{'Expected $config.theme-type to be one of: light, dark. Got:'}
|
|
105
|
+
#{'Expected $config.theme-type to be one of: light, dark, color-scheme. Got:'}
|
|
106
106
|
map.get($config, theme-type)
|
|
107
107
|
);
|
|
108
108
|
}
|
|
109
109
|
@each $palette in (primary, secondary, tertiary) {
|
|
110
110
|
@if $config and map.has-key($config, $palette) {
|
|
111
|
-
$err:
|
|
111
|
+
$err: validate-palette(map.get($config, $palette));
|
|
112
112
|
@if $err {
|
|
113
113
|
@return (
|
|
114
114
|
#{'Expected $config.#{$palette} to be a valid M3 palette. Got:'}
|
|
@@ -6,6 +6,16 @@
|
|
|
6
6
|
@use '../tokens/m3-tokens';
|
|
7
7
|
@use './config-validation';
|
|
8
8
|
|
|
9
|
+
// Prefix used for component token fallback variables, e.g.
|
|
10
|
+
// `color: var(--mdc-text-button-label-text-color, var(--mat-sys-primary));`
|
|
11
|
+
$system-fallback-prefix: mat-sys;
|
|
12
|
+
|
|
13
|
+
// Default system level prefix to use when directly calling the `system-level-*` mixins.
|
|
14
|
+
// Prefix used for component token fallback variables, e.g.
|
|
15
|
+
// `color: var(--mdc-text-button-label-text-color, var(--mat-sys-primary));`
|
|
16
|
+
// TODO: Remove this variable after internal clients are migrated from "sys"
|
|
17
|
+
$system-level-prefix: mat-sys;
|
|
18
|
+
|
|
9
19
|
/// Map key used to store internals of theme config.
|
|
10
20
|
$internals: _mat-theming-internals-do-not-access;
|
|
11
21
|
/// The theme version of generated themes.
|
|
@@ -40,7 +50,7 @@ $theme-version: 1;
|
|
|
40
50
|
$type: map.get($config, theme-type) or light;
|
|
41
51
|
$primary: map.get($config, primary) or palettes.$violet-palette;
|
|
42
52
|
$tertiary: map.get($config, tertiary) or $primary;
|
|
43
|
-
$system-variables-prefix: map.get($config, system-variables-prefix) or
|
|
53
|
+
$system-variables-prefix: map.get($config, system-variables-prefix) or $system-level-prefix;
|
|
44
54
|
sass-utils.$use-system-color-variables: map.get($config, use-system-variables) or false;
|
|
45
55
|
|
|
46
56
|
@return (
|
|
@@ -76,7 +86,7 @@ $theme-version: 1;
|
|
|
76
86
|
$bold: map.get($config, bold-weight) or 700;
|
|
77
87
|
$medium: map.get($config, medium-weight) or 500;
|
|
78
88
|
$regular: map.get($config, regular-weight) or 400;
|
|
79
|
-
$system-variables-prefix: map.get($config, system-variables-prefix) or
|
|
89
|
+
$system-variables-prefix: map.get($config, system-variables-prefix) or $system-level-prefix;
|
|
80
90
|
sass-utils.$use-system-typography-variables: map.get($config, use-system-variables) or false;
|
|
81
91
|
|
|
82
92
|
@return (
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use '../style/elevation';
|
|
2
2
|
@use '../style/sass-utils';
|
|
3
|
+
@use '../theming/config-validation';
|
|
3
4
|
@use '../theming/definition';
|
|
4
5
|
@use './m3/definitions';
|
|
5
6
|
@use 'sass:map';
|
|
@@ -7,22 +8,15 @@
|
|
|
7
8
|
@use 'sass:list';
|
|
8
9
|
@use './m3-tokens';
|
|
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;
|
|
13
|
-
|
|
14
|
-
// Default system level prefix to use when directly calling the `system-level-*` mixins
|
|
15
|
-
$_system-level-prefix: sys;
|
|
16
|
-
|
|
17
11
|
/// Emits necessary CSS variables for Material's system level values for the values defined in the
|
|
18
12
|
/// config map. The config map can have values color, typography, and/or density.
|
|
19
13
|
///
|
|
20
14
|
/// If the config map's color value is an Angular Material color palette, it will be used as the
|
|
21
|
-
/// primary and tertiary colors with a
|
|
22
|
-
/// it must have a `primary` value containing an Angular Material color palette, and
|
|
23
|
-
/// a different `tertiary` palette (defaults to primary palette) and `theme-type` that
|
|
24
|
-
/// `light` or `
|
|
25
|
-
/// are no color values in the config.
|
|
15
|
+
/// primary and tertiary colors with a `color-scheme` theme type. Otherwise if the color value is a
|
|
16
|
+
/// map, it must have a `primary` value containing an Angular Material color palette, and
|
|
17
|
+
/// optionally a different `tertiary` palette (defaults to primary palette) and `theme-type` that
|
|
18
|
+
/// is either `light`, `dark`, or 'color-scheme` (defaults to `color-scheme`). Color variable
|
|
19
|
+
/// definitions will not be emitted if there are no color values in the config.
|
|
26
20
|
///
|
|
27
21
|
/// If the config map's typography value is a font family string, it will be used as the
|
|
28
22
|
/// plain and brand font family with default bold, medium, and regular weights of 700, 500, and 400,
|
|
@@ -36,19 +30,27 @@ $_system-level-prefix: sys;
|
|
|
36
30
|
/// if the density value is a map, it must have a `scale` value. Density variable definitions will
|
|
37
31
|
/// not be emitted if there are no density values in the config.
|
|
38
32
|
///
|
|
39
|
-
/// The application variables emitted use the namespace prefix "--mat-
|
|
40
|
-
/// e.g. --mat-
|
|
33
|
+
/// The application variables emitted use the namespace prefix "--mat-sys".
|
|
34
|
+
/// e.g. --mat-sys-surface: #E5E5E5
|
|
41
35
|
///
|
|
42
36
|
/// @param {Map} $config The color configuration with optional keys color, typography, or density.
|
|
43
37
|
@mixin theme($config, $overrides: ()) {
|
|
44
38
|
$color: map.get($config, color);
|
|
45
39
|
$color-config: null;
|
|
46
40
|
@if ($color) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
@
|
|
41
|
+
// validate-palette returns null if it is a valid M3 palette
|
|
42
|
+
$is-palette: config-validation.validate-palette($color) == null;
|
|
43
|
+
|
|
44
|
+
// Default to "color-scheme" theme type if the config's color does not provide one.
|
|
45
|
+
@if (not $is-palette and not map.has-key($color, theme-type)) {
|
|
46
|
+
$color: map.set($color, theme-type, color-scheme);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
$color-config: if($is-palette,
|
|
50
|
+
definition.define-colors((primary: $color, theme-type: color-scheme)),
|
|
51
|
+
definition.define-colors($color));
|
|
52
|
+
@include system-level-colors($color-config, $overrides, definition.$system-fallback-prefix);
|
|
53
|
+
@include system-level-elevation($color-config, $overrides, definition.$system-fallback-prefix);
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
$typography: map.get($config, typography);
|
|
@@ -57,7 +59,8 @@ $_system-level-prefix: sys;
|
|
|
57
59
|
$typography-config: if(meta.type-of($typography) == 'map',
|
|
58
60
|
definition.define-typography($typography),
|
|
59
61
|
definition.define-typography((plain-family: $typography)));
|
|
60
|
-
@include system-level-typography(
|
|
62
|
+
@include system-level-typography(
|
|
63
|
+
$typography-config, $overrides, definition.$system-fallback-prefix);
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
$density: map.get($config, density);
|
|
@@ -79,9 +82,27 @@ $_system-level-prefix: sys;
|
|
|
79
82
|
}
|
|
80
83
|
}
|
|
81
84
|
|
|
82
|
-
@include system-level-shape($overrides: $overrides, $prefix:
|
|
83
|
-
@include system-level-
|
|
84
|
-
|
|
85
|
+
@include system-level-shape($overrides: $overrides, $prefix: definition.$system-fallback-prefix);
|
|
86
|
+
@include system-level-state($overrides: $overrides, $prefix: definition.$system-fallback-prefix);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/// Emits the system-level CSS variables for each of the provided override values. E.g. to
|
|
90
|
+
/// change the primary color to red, use `mat.theme-overrides((primary: red));`
|
|
91
|
+
@mixin theme-overrides($overrides, $prefix: definition.$system-fallback-prefix) {
|
|
92
|
+
$sys-names: map-merge-all(
|
|
93
|
+
definitions.md-sys-color-values-light(),
|
|
94
|
+
definitions.md-sys-typescale-values(),
|
|
95
|
+
definitions.md-sys-elevation-values(),
|
|
96
|
+
definitions.md-sys-shape-values(),
|
|
97
|
+
definitions.md-sys-state-values());
|
|
98
|
+
|
|
99
|
+
& {
|
|
100
|
+
@each $name, $value in $overrides {
|
|
101
|
+
@if (map.has-key($sys-names, $name)) {
|
|
102
|
+
--#{$prefix}-#{$name}: #{map.get($overrides, $name)};
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
85
106
|
}
|
|
86
107
|
|
|
87
108
|
@mixin system-level-colors($theme, $overrides: (), $prefix: null) {
|
|
@@ -100,16 +121,14 @@ $_system-level-prefix: sys;
|
|
|
100
121
|
|
|
101
122
|
@if (not $prefix) {
|
|
102
123
|
$prefix: map.get($theme, _mat-theming-internals-do-not-access,
|
|
103
|
-
color-system-variables-prefix) or
|
|
124
|
+
color-system-variables-prefix) or definition.$system-level-prefix;
|
|
104
125
|
}
|
|
105
126
|
|
|
106
127
|
$ref: (
|
|
107
128
|
md-ref-palette: m3-tokens.generate-ref-palette-tokens($primary, $tertiary, $error)
|
|
108
129
|
);
|
|
109
130
|
|
|
110
|
-
$sys-colors:
|
|
111
|
-
definitions.md-sys-color-values-dark($ref),
|
|
112
|
-
definitions.md-sys-color-values-light($ref));
|
|
131
|
+
$sys-colors: _generate-sys-colors($ref, $type);
|
|
113
132
|
|
|
114
133
|
// Manually insert a subset of palette values that are used directly by components
|
|
115
134
|
// instead of system variables.
|
|
@@ -125,6 +144,30 @@ $_system-level-prefix: sys;
|
|
|
125
144
|
}
|
|
126
145
|
}
|
|
127
146
|
|
|
147
|
+
@function _generate-sys-colors($ref, $type) {
|
|
148
|
+
$light-sys-colors: definitions.md-sys-color-values-light($ref);
|
|
149
|
+
@if ($type == light) {
|
|
150
|
+
@return $light-sys-colors;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
$dark-sys-colors: definitions.md-sys-color-values-dark($ref);
|
|
154
|
+
@if ($type == dark) {
|
|
155
|
+
@return $dark-sys-colors;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@if ($type == color-scheme) {
|
|
159
|
+
$light-dark-sys-colors: ();
|
|
160
|
+
@each $name, $light-value in $light-sys-colors {
|
|
161
|
+
$dark-value: map.get($dark-sys-colors, $name);
|
|
162
|
+
$light-dark-sys-colors:
|
|
163
|
+
map.set($light-dark-sys-colors, $name, light-dark($light-value, $dark-value));
|
|
164
|
+
}
|
|
165
|
+
@return $light-dark-sys-colors;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@error 'Unknown theme-type provided: #{$type}';
|
|
169
|
+
}
|
|
170
|
+
|
|
128
171
|
@mixin system-level-typography($theme, $overrides: (), $prefix: null) {
|
|
129
172
|
$font-definition: map.get($theme, _mat-theming-internals-do-not-access, font-definition);
|
|
130
173
|
$brand: map.get($font-definition, brand);
|
|
@@ -138,7 +181,7 @@ $_system-level-prefix: sys;
|
|
|
138
181
|
|
|
139
182
|
@if (not $prefix) {
|
|
140
183
|
$prefix: map.get($theme, _mat-theming-internals-do-not-access,
|
|
141
|
-
typography-system-variables-prefix) or
|
|
184
|
+
typography-system-variables-prefix) or definition.$system-level-prefix;
|
|
142
185
|
}
|
|
143
186
|
|
|
144
187
|
& {
|
|
@@ -148,7 +191,7 @@ $_system-level-prefix: sys;
|
|
|
148
191
|
}
|
|
149
192
|
}
|
|
150
193
|
|
|
151
|
-
@mixin system-level-elevation($theme, $overrides: (), $prefix:
|
|
194
|
+
@mixin system-level-elevation($theme, $overrides: (), $prefix: definition.$system-level-prefix) {
|
|
152
195
|
$shadow-color: map.get(
|
|
153
196
|
$theme, _mat-theming-internals-do-not-access, color-tokens, (mdc, theme), shadow);
|
|
154
197
|
|
|
@@ -161,7 +204,7 @@ $_system-level-prefix: sys;
|
|
|
161
204
|
}
|
|
162
205
|
}
|
|
163
206
|
|
|
164
|
-
@mixin system-level-shape($theme: (), $overrides: (), $prefix:
|
|
207
|
+
@mixin system-level-shape($theme: (), $overrides: (), $prefix: definition.$system-level-prefix) {
|
|
165
208
|
& {
|
|
166
209
|
@each $name, $value in definitions.md-sys-shape-values() {
|
|
167
210
|
--#{$prefix}-#{$name}: #{map.get($overrides, $name) or $value};
|
|
@@ -169,7 +212,7 @@ $_system-level-prefix: sys;
|
|
|
169
212
|
}
|
|
170
213
|
}
|
|
171
214
|
|
|
172
|
-
@mixin system-level-state($theme: (), $overrides: (), $prefix:
|
|
215
|
+
@mixin system-level-state($theme: (), $overrides: (), $prefix: definition.$system-level-prefix) {
|
|
173
216
|
& {
|
|
174
217
|
@each $name, $value in definitions.md-sys-state-values() {
|
|
175
218
|
--#{$prefix}-#{$name}: #{map.get($overrides, $name) or $value};
|
|
@@ -177,21 +220,13 @@ $_system-level-prefix: sys;
|
|
|
177
220
|
}
|
|
178
221
|
}
|
|
179
222
|
|
|
180
|
-
@mixin system-level-motion($theme: (), $overrides: (), $prefix: $_system-level-prefix) {
|
|
181
|
-
& {
|
|
182
|
-
@each $name, $value in definitions.md-sys-motion-values() {
|
|
183
|
-
--#{$prefix}-#{$name}: #{map.get($overrides, $name) or $value};
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
223
|
// Return a new map where the values are the same as the provided map's
|
|
189
|
-
// keys, prefixed with "--mat-
|
|
190
|
-
// (key1: '', key2: '') --> (key1: --mat-
|
|
224
|
+
// keys, prefixed with "--mat-sys-". For example:
|
|
225
|
+
// (key1: '', key2: '') --> (key1: --mat-sys-key1, key2: --mat-sys-key2)
|
|
191
226
|
@function _create-system-app-vars-map($map) {
|
|
192
227
|
$new-map: ();
|
|
193
228
|
@each $key, $value in $map {
|
|
194
|
-
$new-map: map.set($new-map, $key, --#{
|
|
229
|
+
$new-map: map.set($new-map, $key, --#{definition.$system-fallback-prefix}-#{$key});
|
|
195
230
|
}
|
|
196
231
|
@return $new-map;
|
|
197
232
|
}
|
|
@@ -226,3 +261,12 @@ $_system-level-prefix: sys;
|
|
|
226
261
|
m3-tokens.generate-density-tokens(0)
|
|
227
262
|
);
|
|
228
263
|
}
|
|
264
|
+
|
|
265
|
+
/// Creates a single merged map from the provided variable-length map arguments
|
|
266
|
+
@function map-merge-all($maps...) {
|
|
267
|
+
$result: ();
|
|
268
|
+
@each $map in $maps {
|
|
269
|
+
$result: map.merge($result, $map);
|
|
270
|
+
}
|
|
271
|
+
@return $result;
|
|
272
|
+
}
|
|
@@ -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(
|
|
142
|
-
$
|
|
143
|
-
|
|
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(
|
|
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: (), $
|
|
212
|
-
@include
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
$
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
$
|
|
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
|
-
@
|
|
223
|
-
@
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
$
|
|
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
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
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
|
}
|
|
@@ -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:
|
|
16
|
-
$small-size: $
|
|
17
|
-
$large-size: $
|
|
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
|
|
|
@@ -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,
|
|
@@ -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
|
-
|
|
29
|
-
legacy-
|
|
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(
|
|
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),
|