@material/web 1.2.0 → 1.2.1-nightly.6ecda49.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/button/internal/_elevated-button.scss +7 -30
- package/button/internal/_filled-button.scss +7 -30
- package/button/internal/_filled-tonal-button.scss +7 -30
- package/button/internal/_outlined-button.scss +7 -30
- package/button/internal/_text-button.scss +7 -30
- package/button/internal/elevated-styles.css.js +1 -1
- package/button/internal/elevated-styles.css.js.map +1 -1
- package/button/internal/filled-styles.css.js +1 -1
- package/button/internal/filled-styles.css.js.map +1 -1
- package/button/internal/filled-tonal-styles.css.js +1 -1
- package/button/internal/filled-tonal-styles.css.js.map +1 -1
- package/button/internal/outlined-styles.css.js +1 -1
- package/button/internal/outlined-styles.css.js.map +1 -1
- package/button/internal/text-styles.css.js +1 -1
- package/button/internal/text-styles.css.js.map +1 -1
- package/checkbox/internal/_checkbox.scss +3 -37
- package/chips/internal/_assist-chip.scss +8 -30
- package/chips/internal/_filter-chip.scss +8 -30
- package/chips/internal/_input-chip.scss +8 -30
- package/chips/internal/_suggestion-chip.scss +8 -30
- package/chips/internal/assist-styles.css.js +1 -1
- package/chips/internal/assist-styles.css.js.map +1 -1
- package/chips/internal/filter-styles.css.js +1 -1
- package/chips/internal/filter-styles.css.js.map +1 -1
- package/chips/internal/input-styles.css.js +1 -1
- package/chips/internal/input-styles.css.js.map +1 -1
- package/chips/internal/suggestion-styles.css.js +1 -1
- package/chips/internal/suggestion-styles.css.js.map +1 -1
- package/dialog/internal/_dialog.scss +3 -40
- package/divider/internal/_divider.scss +3 -4
- package/elevation/internal/_elevation.scss +3 -4
- package/fab/internal/_fab-branded.scss +8 -50
- package/fab/internal/_fab.scss +13 -70
- package/fab/internal/fab-branded-styles.css.js +1 -1
- package/fab/internal/fab-branded-styles.css.js.map +1 -1
- package/fab/internal/fab-styles.css.js +1 -1
- package/fab/internal/fab-styles.css.js.map +1 -1
- package/field/internal/_filled-field.scss +6 -23
- package/field/internal/_outlined-field.scss +6 -20
- package/field/internal/filled-styles.css.js +1 -1
- package/field/internal/filled-styles.css.js.map +1 -1
- package/field/internal/outlined-styles.css.js +1 -1
- package/field/internal/outlined-styles.css.js.map +1 -1
- package/focus/internal/_focus-ring.scss +14 -38
- package/icon/internal/_icon.scss +3 -4
- package/iconbutton/internal/_filled-icon-button.scss +7 -30
- package/iconbutton/internal/_filled-tonal-icon-button.scss +7 -30
- package/iconbutton/internal/_icon-button.scss +4 -2
- package/iconbutton/internal/_outlined-icon-button.scss +7 -30
- package/iconbutton/internal/filled-styles.css.js +1 -1
- package/iconbutton/internal/filled-styles.css.js.map +1 -1
- package/iconbutton/internal/filled-tonal-styles.css.js +1 -1
- package/iconbutton/internal/filled-tonal-styles.css.js.map +1 -1
- package/iconbutton/internal/outlined-styles.css.js +1 -1
- package/iconbutton/internal/outlined-styles.css.js.map +1 -1
- package/labs/card/internal/_elevated-card.scss +4 -2
- package/labs/card/internal/_filled-card.scss +4 -2
- package/labs/card/internal/_outlined-card.scss +4 -2
- package/labs/segmentedbutton/internal/outlined-styles.css.js +1 -1
- package/labs/segmentedbutton/internal/outlined-styles.css.js.map +1 -1
- package/labs/segmentedbuttonset/internal/_outlined-segmented-button-set.scss +9 -20
- package/labs/segmentedbuttonset/internal/outlined-styles.css.js +1 -1
- package/labs/segmentedbuttonset/internal/outlined-styles.css.js.map +1 -1
- package/list/internal/_list.scss +3 -4
- package/list/internal/listitem/_list-item.scss +3 -4
- package/menu/internal/_menu.scss +3 -4
- package/menu/internal/menuitem/_menu-item.scss +3 -4
- package/package.json +1 -1
- package/progress/internal/_circular-progress.scss +4 -2
- package/progress/internal/_linear-progress.scss +4 -2
- package/radio/internal/_radio.scss +3 -4
- package/ripple/internal/_ripple.scss +3 -4
- package/select/internal/_filled-select.scss +7 -45
- package/select/internal/_outlined-select.scss +7 -30
- package/select/internal/filled-select-styles.css.js +1 -1
- package/select/internal/filled-select-styles.css.js.map +1 -1
- package/select/internal/outlined-select-styles.css.js +1 -1
- package/select/internal/outlined-select-styles.css.js.map +1 -1
- package/slider/internal/_slider.scss +4 -2
- package/switch/internal/_switch.scss +3 -52
- package/tabs/internal/_primary-tab.scss +8 -30
- package/tabs/internal/_secondary-tab.scss +8 -30
- package/tabs/internal/primary-tab-styles.css.js +1 -1
- package/tabs/internal/primary-tab-styles.css.js.map +1 -1
- package/tabs/internal/secondary-tab-styles.css.js +1 -1
- package/tabs/internal/secondary-tab-styles.css.js.map +1 -1
- package/textfield/internal/_filled-text-field.scss +6 -58
- package/textfield/internal/_outlined-text-field.scss +6 -51
- package/textfield/internal/filled-styles.css.js +1 -1
- package/textfield/internal/filled-styles.css.js.map +1 -1
- package/textfield/internal/outlined-styles.css.js +1 -1
- package/textfield/internal/outlined-styles.css.js.map +1 -1
- package/tokens/_md-comp-assist-chip.scss +40 -7
- package/tokens/_md-comp-badge.scss +14 -1
- package/tokens/_md-comp-checkbox.scss +36 -2
- package/tokens/_md-comp-circular-progress.scss +17 -1
- package/tokens/_md-comp-dialog.scss +28 -2
- package/tokens/_md-comp-divider.scss +19 -2
- package/tokens/_md-comp-elevated-button.scss +40 -7
- package/tokens/_md-comp-elevated-card.scss +20 -1
- package/tokens/_md-comp-elevation.scss +18 -1
- package/tokens/_md-comp-fab-branded.scss +49 -3
- package/tokens/_md-comp-fab.scss +55 -2
- package/tokens/_md-comp-filled-button.scss +40 -7
- package/tokens/_md-comp-filled-card.scss +20 -1
- package/tokens/_md-comp-filled-field.scss +36 -2
- package/tokens/_md-comp-filled-icon-button.scss +35 -2
- package/tokens/_md-comp-filled-select.scss +35 -2
- package/tokens/_md-comp-filled-text-field.scss +59 -3
- package/tokens/_md-comp-filled-tonal-button.scss +40 -7
- package/tokens/_md-comp-filled-tonal-icon-button.scss +39 -2
- package/tokens/_md-comp-filter-chip.scss +40 -7
- package/tokens/_md-comp-focus-ring.scss +35 -2
- package/tokens/_md-comp-icon-button.scss +20 -1
- package/tokens/_md-comp-icon.scss +15 -1
- package/tokens/_md-comp-input-chip.scss +40 -7
- package/tokens/_md-comp-item.scss +1 -0
- package/tokens/_md-comp-linear-progress.scss +20 -2
- package/tokens/_md-comp-list-item.scss +17 -2
- package/tokens/_md-comp-list.scss +16 -2
- package/tokens/_md-comp-menu-item.scss +17 -2
- package/tokens/_md-comp-menu.scss +13 -3
- package/tokens/_md-comp-navigation-bar.scss +23 -2
- package/tokens/_md-comp-navigation-drawer.scss +23 -2
- package/tokens/_md-comp-outlined-button.scss +40 -7
- package/tokens/_md-comp-outlined-card.scss +20 -1
- package/tokens/_md-comp-outlined-field.scss +36 -2
- package/tokens/_md-comp-outlined-icon-button.scss +39 -2
- package/tokens/_md-comp-outlined-segmented-button.scss +36 -2
- package/tokens/_md-comp-outlined-select.scss +36 -3
- package/tokens/_md-comp-outlined-text-field.scss +55 -3
- package/tokens/_md-comp-primary-tab.scss +33 -2
- package/tokens/_md-comp-radio.scss +16 -1
- package/tokens/_md-comp-ripple.scss +12 -2
- package/tokens/_md-comp-secondary-tab.scss +30 -1
- package/tokens/_md-comp-slider.scss +13 -1
- package/tokens/_md-comp-suggestion-chip.scss +40 -7
- package/tokens/_md-comp-switch.scss +43 -2
- package/tokens/_md-comp-text-button.scss +40 -7
- package/tokens/internal/_shape.scss +93 -0
- package/tokens/internal/_validate.scss +1 -1
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
// go/keep-sorted start
|
|
7
7
|
@use 'sass:map';
|
|
8
|
+
@use 'sass:string';
|
|
8
9
|
// go/keep-sorted end
|
|
9
10
|
// go/keep-sorted start
|
|
11
|
+
@use './internal/shape';
|
|
10
12
|
@use './internal/validate';
|
|
11
13
|
@use './md-sys-color';
|
|
12
14
|
@use './md-sys-elevation';
|
|
@@ -20,6 +22,10 @@ $supported-tokens: (
|
|
|
20
22
|
// go/keep-sorted start
|
|
21
23
|
'container-height',
|
|
22
24
|
'container-shape',
|
|
25
|
+
'container-shape-end-end',
|
|
26
|
+
'container-shape-end-start',
|
|
27
|
+
'container-shape-start-end',
|
|
28
|
+
'container-shape-start-start',
|
|
23
29
|
'disabled-label-text-color',
|
|
24
30
|
'disabled-label-text-opacity',
|
|
25
31
|
'disabled-leading-icon-color',
|
|
@@ -85,18 +91,28 @@ $_default: (
|
|
|
85
91
|
'md-sys-typescale': md-sys-typescale.values(),
|
|
86
92
|
);
|
|
87
93
|
|
|
88
|
-
@function values(
|
|
89
|
-
$
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
@function values(
|
|
95
|
+
$deps: $_default,
|
|
96
|
+
$exclude-hardcoded-values: false,
|
|
97
|
+
$exclude-custom-properties: true
|
|
98
|
+
) {
|
|
99
|
+
$tokens: md-comp-assist-chip.values($deps, $exclude-hardcoded-values);
|
|
100
|
+
$new-tokens: map.merge(
|
|
101
|
+
shape.get-new-logical-shape-tokens($tokens, 'container-shape'),
|
|
102
|
+
(
|
|
94
103
|
'leading-space': if($exclude-hardcoded-values, null, 16px),
|
|
95
104
|
'trailing-space': if($exclude-hardcoded-values, null, 16px),
|
|
96
105
|
'icon-label-space': if($exclude-hardcoded-values, null, 8px),
|
|
97
106
|
'with-leading-icon-leading-space':
|
|
98
107
|
if($exclude-hardcoded-values, null, 8px),
|
|
99
|
-
)
|
|
108
|
+
)
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
$tokens: validate.values(
|
|
112
|
+
$tokens,
|
|
113
|
+
$supported-tokens: $supported-tokens,
|
|
114
|
+
$unsupported-tokens: $unsupported-tokens,
|
|
115
|
+
$new-tokens: $new-tokens,
|
|
100
116
|
$renamed-tokens: (
|
|
101
117
|
// Remove "flat-*" prefix (b/275577569)
|
|
102
118
|
'flat-container-elevation': 'container-elevation',
|
|
@@ -118,5 +134,22 @@ $_default: (
|
|
|
118
134
|
)
|
|
119
135
|
);
|
|
120
136
|
|
|
137
|
+
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
|
138
|
+
// See b/321816473.
|
|
139
|
+
@if not $exclude-custom-properties {
|
|
140
|
+
@each $token, $value in $tokens {
|
|
141
|
+
@if string.index($token, 'container-shape-') == 1 {
|
|
142
|
+
// Add fallback to shorthand for logical shape properties.
|
|
143
|
+
$value: var(--md-assist-chip-container-shape, #{$value});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
$tokens: map.set(
|
|
147
|
+
$tokens,
|
|
148
|
+
$token,
|
|
149
|
+
var(--md-assist-chip-#{$token}, #{$value})
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
121
154
|
@return $tokens;
|
|
122
155
|
}
|
|
@@ -21,8 +21,21 @@ $_default: (
|
|
|
21
21
|
|
|
22
22
|
$_unsupported-tokens: ('large-label-text-tracking', 'large-label-text-type');
|
|
23
23
|
|
|
24
|
-
@function values(
|
|
24
|
+
@function values(
|
|
25
|
+
$deps: $_default,
|
|
26
|
+
$exclude-hardcoded-values: false,
|
|
27
|
+
$exclude-custom-properties: true
|
|
28
|
+
) {
|
|
25
29
|
$tokens: md-comp-badge.values($deps, $exclude-hardcoded-values);
|
|
26
30
|
$tokens: map.remove($tokens, $_unsupported-tokens...);
|
|
31
|
+
|
|
32
|
+
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
|
33
|
+
// See b/321816473.
|
|
34
|
+
@if not $exclude-custom-properties {
|
|
35
|
+
@each $token, $value in $tokens {
|
|
36
|
+
$tokens: map.set($tokens, $token, var(--md-badge-#{$token}, #{$value}));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
27
40
|
@return $tokens;
|
|
28
41
|
}
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
//
|
|
5
5
|
|
|
6
6
|
// go/keep-sorted start
|
|
7
|
+
@use 'sass:map';
|
|
8
|
+
@use 'sass:string';
|
|
9
|
+
// go/keep-sorted end
|
|
10
|
+
// go/keep-sorted start
|
|
11
|
+
@use './internal/shape';
|
|
7
12
|
@use './internal/validate';
|
|
8
13
|
@use './md-sys-color';
|
|
9
14
|
@use './md-sys-shape';
|
|
@@ -14,6 +19,10 @@
|
|
|
14
19
|
$supported-tokens: (
|
|
15
20
|
// go/keep-sorted start
|
|
16
21
|
'container-shape',
|
|
22
|
+
'container-shape-end-end',
|
|
23
|
+
'container-shape-end-start',
|
|
24
|
+
'container-shape-start-end',
|
|
25
|
+
'container-shape-start-start',
|
|
17
26
|
'container-size',
|
|
18
27
|
'disabled-container-opacity',
|
|
19
28
|
'disabled-outline-color',
|
|
@@ -89,11 +98,19 @@ $_default: (
|
|
|
89
98
|
'md-sys-state': md-sys-state.values(),
|
|
90
99
|
);
|
|
91
100
|
|
|
92
|
-
@function values(
|
|
101
|
+
@function values(
|
|
102
|
+
$deps: $_default,
|
|
103
|
+
$exclude-hardcoded-values: false,
|
|
104
|
+
$exclude-custom-properties: true
|
|
105
|
+
) {
|
|
106
|
+
$tokens: md-comp-checkbox.values($deps, $exclude-hardcoded-values);
|
|
107
|
+
$new-tokens: shape.get-new-logical-shape-tokens($tokens, 'container-shape');
|
|
108
|
+
|
|
93
109
|
$tokens: validate.values(
|
|
94
|
-
|
|
110
|
+
$tokens,
|
|
95
111
|
$supported-tokens: $supported-tokens,
|
|
96
112
|
$unsupported-tokens: $unsupported-tokens,
|
|
113
|
+
$new-tokens: $new-tokens,
|
|
97
114
|
$renamed-tokens: (
|
|
98
115
|
// Remove default "unselected" prefix (b/292244480)
|
|
99
116
|
'unselected-disabled-container-opacity': 'disabled-container-opacity',
|
|
@@ -120,5 +137,22 @@ $_default: (
|
|
|
120
137
|
)
|
|
121
138
|
);
|
|
122
139
|
|
|
140
|
+
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
|
141
|
+
// See b/321816473.
|
|
142
|
+
@if not $exclude-custom-properties {
|
|
143
|
+
@each $token, $value in $tokens {
|
|
144
|
+
@if string.index($token, 'container-shape-') == 1 {
|
|
145
|
+
// Add fallback to shorthand for logical shape properties.
|
|
146
|
+
$value: var(--md-checkbox-container-shape, #{$value});
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
$tokens: map.set(
|
|
150
|
+
$tokens,
|
|
151
|
+
$token,
|
|
152
|
+
var(--md-checkbox-#{$token}, #{$value})
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
123
157
|
@return $tokens;
|
|
124
158
|
}
|
|
@@ -38,7 +38,11 @@ $_default: (
|
|
|
38
38
|
'md-sys-shape': md-sys-shape.values(),
|
|
39
39
|
);
|
|
40
40
|
|
|
41
|
-
@function values(
|
|
41
|
+
@function values(
|
|
42
|
+
$deps: $_default,
|
|
43
|
+
$exclude-hardcoded-values: false,
|
|
44
|
+
$exclude-custom-properties: true
|
|
45
|
+
) {
|
|
42
46
|
$tokens: validate.values(
|
|
43
47
|
md-comp-circular-progress-indicator.values(
|
|
44
48
|
$deps,
|
|
@@ -61,5 +65,17 @@ $_default: (
|
|
|
61
65
|
);
|
|
62
66
|
}
|
|
63
67
|
|
|
68
|
+
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
|
69
|
+
// See b/321816473.
|
|
70
|
+
@if not $exclude-custom-properties {
|
|
71
|
+
@each $token, $value in $tokens {
|
|
72
|
+
$tokens: map.set(
|
|
73
|
+
$tokens,
|
|
74
|
+
$token,
|
|
75
|
+
var(--md-circular-progress-#{$token}, #{$value})
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
64
80
|
@return $tokens;
|
|
65
81
|
}
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
// go/keep-sorted start
|
|
7
7
|
@use 'sass:map';
|
|
8
|
+
@use 'sass:string';
|
|
8
9
|
// go/keep-sorted end
|
|
9
10
|
// go/keep-sorted start
|
|
11
|
+
@use './internal/shape';
|
|
10
12
|
@use './internal/validate';
|
|
11
13
|
@use './md-sys-color';
|
|
12
14
|
@use './md-sys-elevation';
|
|
@@ -20,6 +22,10 @@ $supported-tokens: (
|
|
|
20
22
|
// go/keep-sorted start
|
|
21
23
|
'container-color',
|
|
22
24
|
'container-shape',
|
|
25
|
+
'container-shape-end-end',
|
|
26
|
+
'container-shape-end-start',
|
|
27
|
+
'container-shape-start-end',
|
|
28
|
+
'container-shape-start-start',
|
|
23
29
|
'headline-color',
|
|
24
30
|
'headline-font',
|
|
25
31
|
'headline-line-height',
|
|
@@ -72,11 +78,18 @@ $unsupported-tokens: (
|
|
|
72
78
|
// go/keep-sorted end
|
|
73
79
|
);
|
|
74
80
|
|
|
75
|
-
@function values(
|
|
81
|
+
@function values(
|
|
82
|
+
$deps: $_default,
|
|
83
|
+
$exclude-hardcoded-values: false,
|
|
84
|
+
$exclude-custom-properties: true
|
|
85
|
+
) {
|
|
86
|
+
$tokens: md-comp-dialog.values($deps, $exclude-hardcoded-values);
|
|
87
|
+
$new-tokens: shape.get-new-logical-shape-tokens($tokens, 'container-shape');
|
|
76
88
|
$tokens: validate.values(
|
|
77
|
-
|
|
89
|
+
$tokens,
|
|
78
90
|
$supported-tokens: $supported-tokens,
|
|
79
91
|
$unsupported-tokens: $unsupported-tokens,
|
|
92
|
+
$new-tokens: $new-tokens,
|
|
80
93
|
$renamed-tokens: (
|
|
81
94
|
// Remove "with-*" prefixes (b/273534858)
|
|
82
95
|
'with-icon-icon-color': 'icon-color',
|
|
@@ -84,5 +97,18 @@ $unsupported-tokens: (
|
|
|
84
97
|
)
|
|
85
98
|
);
|
|
86
99
|
|
|
100
|
+
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
|
101
|
+
// See b/321816473.
|
|
102
|
+
@if not $exclude-custom-properties {
|
|
103
|
+
@each $token, $value in $tokens {
|
|
104
|
+
@if string.index($token, 'container-shape-') == 1 {
|
|
105
|
+
// Add fallback to shorthand for logical shape properties.
|
|
106
|
+
$value: var(--md-dialog-container-shape, #{$value});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
$tokens: map.set($tokens, $token, var(--md-dialog-#{$token}, #{$value}));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
87
113
|
@return $tokens;
|
|
88
114
|
}
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
//
|
|
5
5
|
|
|
6
|
+
// go/keep-sorted start
|
|
7
|
+
@use 'sass:map';
|
|
8
|
+
// go/keep-sorted end
|
|
6
9
|
// go/keep-sorted start
|
|
7
10
|
@use './internal/validate';
|
|
8
11
|
@use './md-sys-color';
|
|
@@ -20,9 +23,23 @@ $_default: (
|
|
|
20
23
|
'md-sys-color': md-sys-color.values-light(),
|
|
21
24
|
);
|
|
22
25
|
|
|
23
|
-
@function values(
|
|
24
|
-
|
|
26
|
+
@function values(
|
|
27
|
+
$deps: $_default,
|
|
28
|
+
$exclude-hardcoded-values: false,
|
|
29
|
+
$exclude-custom-properties: true
|
|
30
|
+
) {
|
|
31
|
+
$tokens: validate.values(
|
|
25
32
|
md-comp-divider.values($deps, $exclude-hardcoded-values),
|
|
26
33
|
$supported-tokens: $supported-tokens
|
|
27
34
|
);
|
|
35
|
+
|
|
36
|
+
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
|
37
|
+
// See b/321816473.
|
|
38
|
+
@if not $exclude-custom-properties {
|
|
39
|
+
@each $token, $value in $tokens {
|
|
40
|
+
$tokens: map.set($tokens, $token, var(--md-divider-#{$token}, #{$value}));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@return $tokens;
|
|
28
45
|
}
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
// go/keep-sorted start
|
|
7
7
|
@use 'sass:map';
|
|
8
|
+
@use 'sass:string';
|
|
8
9
|
// go/keep-sorted end
|
|
9
10
|
// go/keep-sorted start
|
|
11
|
+
@use './internal/shape';
|
|
10
12
|
@use './internal/validate';
|
|
11
13
|
@use './md-sys-color';
|
|
12
14
|
@use './md-sys-elevation';
|
|
@@ -23,6 +25,10 @@ $supported-tokens: (
|
|
|
23
25
|
'container-height',
|
|
24
26
|
'container-shadow-color',
|
|
25
27
|
'container-shape',
|
|
28
|
+
'container-shape-end-end',
|
|
29
|
+
'container-shape-end-start',
|
|
30
|
+
'container-shape-start-end',
|
|
31
|
+
'container-shape-start-start',
|
|
26
32
|
'disabled-container-color',
|
|
27
33
|
'disabled-container-elevation',
|
|
28
34
|
'disabled-container-opacity',
|
|
@@ -76,12 +82,15 @@ $_default: (
|
|
|
76
82
|
'md-sys-typescale': md-sys-typescale.values(),
|
|
77
83
|
);
|
|
78
84
|
|
|
79
|
-
@function values(
|
|
80
|
-
$
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
@function values(
|
|
86
|
+
$deps: $_default,
|
|
87
|
+
$exclude-hardcoded-values: false,
|
|
88
|
+
$exclude-custom-properties: true
|
|
89
|
+
) {
|
|
90
|
+
$tokens: md-comp-elevated-button.values($deps, $exclude-hardcoded-values);
|
|
91
|
+
$new-tokens: map.merge(
|
|
92
|
+
shape.get-new-logical-shape-tokens($tokens, 'container-shape'),
|
|
93
|
+
(
|
|
85
94
|
// b/198759625 - Remove once spacing tokens are formally added
|
|
86
95
|
// go/keep-sorted start
|
|
87
96
|
'leading-space': if($exclude-hardcoded-values, null, 24px),
|
|
@@ -95,7 +104,14 @@ $_default: (
|
|
|
95
104
|
'with-trailing-icon-trailing-space':
|
|
96
105
|
if($exclude-hardcoded-values, null, 16px),
|
|
97
106
|
// go/keep-sorted end
|
|
98
|
-
)
|
|
107
|
+
)
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
$tokens: validate.values(
|
|
111
|
+
$tokens,
|
|
112
|
+
$supported-tokens: $supported-tokens,
|
|
113
|
+
$unsupported-tokens: $unsupported-tokens,
|
|
114
|
+
$new-tokens: $new-tokens,
|
|
99
115
|
$renamed-tokens: (
|
|
100
116
|
// Remove "with-*" prefixes (b/273534858)
|
|
101
117
|
'with-icon-disabled-icon-color': 'disabled-icon-color',
|
|
@@ -108,5 +124,22 @@ $_default: (
|
|
|
108
124
|
)
|
|
109
125
|
);
|
|
110
126
|
|
|
127
|
+
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
|
128
|
+
// See b/321816473.
|
|
129
|
+
@if not $exclude-custom-properties {
|
|
130
|
+
@each $token, $value in $tokens {
|
|
131
|
+
@if string.index($token, 'container-shape-') == 1 {
|
|
132
|
+
// Add fallback to shorthand for logical shape properties.
|
|
133
|
+
$value: var(--md-elevated-button-container-shape, #{$value});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
$tokens: map.set(
|
|
137
|
+
$tokens,
|
|
138
|
+
$token,
|
|
139
|
+
var(--md-elevated-button-#{$token}, #{$value})
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
111
144
|
@return $tokens;
|
|
112
145
|
}
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
//
|
|
5
5
|
|
|
6
|
+
// go/keep-sorted start
|
|
7
|
+
@use 'sass:map';
|
|
8
|
+
// go/keep-sorted end
|
|
6
9
|
// go/keep-sorted start
|
|
7
10
|
@use './internal/validate';
|
|
8
11
|
@use './md-sys-color';
|
|
@@ -52,12 +55,28 @@ $_default: (
|
|
|
52
55
|
'md-sys-state': md-sys-state.values(),
|
|
53
56
|
);
|
|
54
57
|
|
|
55
|
-
@function values(
|
|
58
|
+
@function values(
|
|
59
|
+
$deps: $_default,
|
|
60
|
+
$exclude-hardcoded-values: false,
|
|
61
|
+
$exclude-custom-properties: true
|
|
62
|
+
) {
|
|
56
63
|
$tokens: validate.values(
|
|
57
64
|
md-comp-elevated-card.values($deps, $exclude-hardcoded-values),
|
|
58
65
|
$supported-tokens: $supported-tokens,
|
|
59
66
|
$unsupported-tokens: $unsupported-tokens
|
|
60
67
|
);
|
|
61
68
|
|
|
69
|
+
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
|
70
|
+
// See b/321816473.
|
|
71
|
+
@if not $exclude-custom-properties {
|
|
72
|
+
@each $token, $value in $tokens {
|
|
73
|
+
$tokens: map.set(
|
|
74
|
+
$tokens,
|
|
75
|
+
$token,
|
|
76
|
+
var(--md-elevated-card-#{$token}, #{$value})
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
62
81
|
@return $tokens;
|
|
63
82
|
}
|
|
@@ -24,10 +24,27 @@ $_default: (
|
|
|
24
24
|
'md-sys-elevation': md-sys-elevation.values(),
|
|
25
25
|
);
|
|
26
26
|
|
|
27
|
-
@function values(
|
|
27
|
+
@function values(
|
|
28
|
+
$deps: $_default,
|
|
29
|
+
$exclude-hardcoded-values: false,
|
|
30
|
+
$exclude-custom-properties: true
|
|
31
|
+
) {
|
|
28
32
|
$tokens: (
|
|
29
33
|
'level': map.get($deps, 'md-sys-elevation', 'level0'),
|
|
30
34
|
'shadow-color': map.get($deps, 'md-sys-color', 'shadow'),
|
|
31
35
|
);
|
|
36
|
+
|
|
37
|
+
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
|
38
|
+
// See b/321816473.
|
|
39
|
+
@if not $exclude-custom-properties {
|
|
40
|
+
@each $token, $value in $tokens {
|
|
41
|
+
$tokens: map.set(
|
|
42
|
+
$tokens,
|
|
43
|
+
$token,
|
|
44
|
+
var(--md-elevation-#{$token}, #{$value})
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
32
49
|
@return validate.values($tokens, $supported-tokens: $supported-tokens);
|
|
33
50
|
}
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
// go/keep-sorted start
|
|
7
7
|
@use 'sass:map';
|
|
8
|
+
@use 'sass:string';
|
|
8
9
|
// go/keep-sorted end
|
|
9
10
|
// go/keep-sorted start
|
|
11
|
+
@use './internal/shape';
|
|
10
12
|
@use './internal/validate';
|
|
11
13
|
@use './md-sys-color';
|
|
12
14
|
@use './md-sys-elevation';
|
|
@@ -25,6 +27,10 @@ $supported-tokens: (
|
|
|
25
27
|
'container-height',
|
|
26
28
|
'container-shadow-color',
|
|
27
29
|
'container-shape',
|
|
30
|
+
'container-shape-end-end',
|
|
31
|
+
'container-shape-end-start',
|
|
32
|
+
'container-shape-start-end',
|
|
33
|
+
'container-shape-start-start',
|
|
28
34
|
'container-width',
|
|
29
35
|
'focus-container-elevation',
|
|
30
36
|
'focus-label-text-color',
|
|
@@ -40,6 +46,10 @@ $supported-tokens: (
|
|
|
40
46
|
'label-text-weight',
|
|
41
47
|
'large-container-height',
|
|
42
48
|
'large-container-shape',
|
|
49
|
+
'large-container-shape-end-end',
|
|
50
|
+
'large-container-shape-end-start',
|
|
51
|
+
'large-container-shape-start-end',
|
|
52
|
+
'large-container-shape-start-start',
|
|
43
53
|
'large-container-width',
|
|
44
54
|
'large-icon-size',
|
|
45
55
|
'lowered-container-color',
|
|
@@ -99,13 +109,49 @@ $_default: (
|
|
|
99
109
|
'md-sys-typescale': md-sys-typescale.values(),
|
|
100
110
|
);
|
|
101
111
|
|
|
102
|
-
@function values(
|
|
112
|
+
@function values(
|
|
113
|
+
$deps: $_default,
|
|
114
|
+
$exclude-hardcoded-values: false,
|
|
115
|
+
$exclude-custom-properties: true
|
|
116
|
+
) {
|
|
117
|
+
$tokens: md-comp-fab-branded.values($deps, $exclude-hardcoded-values);
|
|
118
|
+
$new-tokens: _get-new-tokens($deps, $exclude-hardcoded-values);
|
|
119
|
+
$new-tokens: map.merge(
|
|
120
|
+
$new-tokens,
|
|
121
|
+
shape.get-new-logical-shape-tokens($tokens, 'container-shape')
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
$new-tokens: map.merge(
|
|
125
|
+
$new-tokens,
|
|
126
|
+
shape.get-new-logical-shape-tokens($new-tokens, 'large-container-shape')
|
|
127
|
+
);
|
|
128
|
+
|
|
103
129
|
$tokens: validate.values(
|
|
104
|
-
|
|
130
|
+
$tokens,
|
|
105
131
|
$supported-tokens: $supported-tokens,
|
|
106
132
|
$unsupported-tokens: $unsupported-tokens,
|
|
107
|
-
$new-tokens:
|
|
133
|
+
$new-tokens: $new-tokens
|
|
108
134
|
);
|
|
109
135
|
|
|
136
|
+
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
|
137
|
+
// See b/321816473.
|
|
138
|
+
@if not $exclude-custom-properties {
|
|
139
|
+
@each $token, $value in $tokens {
|
|
140
|
+
$shape-tokens: ('container-shape', 'large-container-shape');
|
|
141
|
+
@each $shape-token in $shape-tokens {
|
|
142
|
+
@if string.index($token, '#{$shape-token}-') == 1 {
|
|
143
|
+
// Add fallback to shorthand for logical shape properties.
|
|
144
|
+
$value: var(--md-fab-branded-#{$shape-token}, #{$value});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
$tokens: map.set(
|
|
149
|
+
$tokens,
|
|
150
|
+
$token,
|
|
151
|
+
var(--md-fab-branded-#{$token}, #{$value})
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
110
156
|
@return $tokens;
|
|
111
157
|
}
|
package/tokens/_md-comp-fab.scss
CHANGED
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
// go/keep-sorted start
|
|
7
7
|
@use 'sass:map';
|
|
8
|
+
@use 'sass:string';
|
|
8
9
|
// go/keep-sorted end
|
|
9
10
|
// go/keep-sorted start
|
|
11
|
+
@use './internal/shape';
|
|
10
12
|
@use './internal/validate';
|
|
11
13
|
@use './md-sys-color';
|
|
12
14
|
@use './md-sys-elevation';
|
|
@@ -32,6 +34,10 @@ $supported-tokens: (
|
|
|
32
34
|
'container-height',
|
|
33
35
|
'container-shadow-color',
|
|
34
36
|
'container-shape',
|
|
37
|
+
'container-shape-end-end',
|
|
38
|
+
'container-shape-end-start',
|
|
39
|
+
'container-shape-start-end',
|
|
40
|
+
'container-shape-start-start',
|
|
35
41
|
'container-width',
|
|
36
42
|
'focus-container-elevation',
|
|
37
43
|
'focus-icon-color',
|
|
@@ -50,6 +56,10 @@ $supported-tokens: (
|
|
|
50
56
|
'label-text-weight',
|
|
51
57
|
'large-container-height',
|
|
52
58
|
'large-container-shape',
|
|
59
|
+
'large-container-shape-end-end',
|
|
60
|
+
'large-container-shape-end-start',
|
|
61
|
+
'large-container-shape-start-end',
|
|
62
|
+
'large-container-shape-start-start',
|
|
53
63
|
'large-container-width',
|
|
54
64
|
'large-icon-size',
|
|
55
65
|
'lowered-container-color',
|
|
@@ -86,6 +96,10 @@ $supported-tokens: (
|
|
|
86
96
|
'secondary-pressed-state-layer-color',
|
|
87
97
|
'small-container-height',
|
|
88
98
|
'small-container-shape',
|
|
99
|
+
'small-container-shape-end-end',
|
|
100
|
+
'small-container-shape-end-start',
|
|
101
|
+
'small-container-shape-start-end',
|
|
102
|
+
'small-container-shape-start-start',
|
|
89
103
|
'small-container-width',
|
|
90
104
|
'small-icon-size',
|
|
91
105
|
'tertiary-container-color',
|
|
@@ -231,15 +245,54 @@ $_default: (
|
|
|
231
245
|
'md-sys-typescale': md-sys-typescale.values(),
|
|
232
246
|
);
|
|
233
247
|
|
|
234
|
-
@function values(
|
|
248
|
+
@function values(
|
|
249
|
+
$deps: $_default,
|
|
250
|
+
$exclude-hardcoded-values: false,
|
|
251
|
+
$exclude-custom-properties: true
|
|
252
|
+
) {
|
|
235
253
|
$tokens: md-comp-fab-surface.values($deps, $exclude-hardcoded-values);
|
|
254
|
+
$new-tokens: _get-new-tokens($deps, $exclude-hardcoded-values);
|
|
255
|
+
$new-tokens: map.merge(
|
|
256
|
+
$new-tokens,
|
|
257
|
+
shape.get-new-logical-shape-tokens($tokens, 'container-shape')
|
|
258
|
+
);
|
|
259
|
+
|
|
260
|
+
$new-tokens: map.merge(
|
|
261
|
+
$new-tokens,
|
|
262
|
+
shape.get-new-logical-shape-tokens(
|
|
263
|
+
$new-tokens,
|
|
264
|
+
'large-container-shape',
|
|
265
|
+
'small-container-shape'
|
|
266
|
+
)
|
|
267
|
+
);
|
|
236
268
|
|
|
237
269
|
$tokens: validate.values(
|
|
238
270
|
$tokens,
|
|
239
271
|
$supported-tokens: $supported-tokens,
|
|
240
272
|
$unsupported-tokens: $unsupported-tokens,
|
|
241
|
-
$new-tokens:
|
|
273
|
+
$new-tokens: $new-tokens
|
|
242
274
|
);
|
|
243
275
|
|
|
276
|
+
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
|
277
|
+
// See b/321816473.
|
|
278
|
+
@if not $exclude-custom-properties {
|
|
279
|
+
@each $token, $value in $tokens {
|
|
280
|
+
$shape-tokens: (
|
|
281
|
+
'container-shape',
|
|
282
|
+
'large-container-shape',
|
|
283
|
+
'small-container-shape'
|
|
284
|
+
);
|
|
285
|
+
|
|
286
|
+
@each $shape-token in $shape-tokens {
|
|
287
|
+
@if string.index($token, '#{$shape-token}-') == 1 {
|
|
288
|
+
// Add fallback to shorthand for logical shape properties.
|
|
289
|
+
$value: var(--md-fab-#{$shape-token}, #{$value});
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
$tokens: map.set($tokens, $token, var(--md-fab-#{$token}, #{$value}));
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
244
297
|
@return $tokens;
|
|
245
298
|
}
|