@carbon/element-styles 0.3.15 → 0.4.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/README.md +21 -0
- package/css/prebuilt/editorial.css +1 -1
- package/css/prebuilt/expressive.css +1 -1
- package/css/prebuilt/productive.css +1 -1
- package/package.json +2 -2
- package/scss/_config.scss +9 -0
- package/scss/elements/_heading/index.scss +7 -4
- package/scss/elements/_input/index.scss +50 -47
- package/scss/elements/_labelled-input/index.scss +44 -41
- package/scss/elements/_layer/index.scss +17 -14
- package/scss/elements/abbreviation/index.scss +7 -4
- package/scss/elements/address/index.scss +7 -4
- package/scss/elements/anchor/index.scss +33 -30
- package/scss/elements/block-quotation/index.scss +30 -27
- package/scss/elements/body/index.scss +7 -4
- package/scss/elements/bold-text/index.scss +5 -2
- package/scss/elements/button/index.scss +183 -180
- package/scss/elements/checkbox/index.scss +40 -37
- package/scss/elements/code/index.scss +9 -6
- package/scss/elements/color-input/index.scss +70 -67
- package/scss/elements/combo-box/index.scss +35 -32
- package/scss/elements/date-input/index.scss +24 -21
- package/scss/elements/date-time-input/index.scss +24 -21
- package/scss/elements/deleted-text/index.scss +8 -5
- package/scss/elements/description-list/index.scss +17 -14
- package/scss/elements/details/index.scss +53 -48
- package/scss/elements/dialog/index.scss +173 -170
- package/scss/elements/email-input/index.scss +16 -13
- package/scss/elements/fieldset/index.scss +15 -12
- package/scss/elements/file-input/index.scss +53 -50
- package/scss/elements/footer/index.scss +9 -6
- package/scss/elements/header-navigation/index.scss +101 -98
- package/scss/elements/heading-level-1/index.scss +6 -3
- package/scss/elements/heading-level-2/index.scss +6 -3
- package/scss/elements/heading-level-3/index.scss +6 -3
- package/scss/elements/heading-level-4/index.scss +6 -3
- package/scss/elements/heading-level-5/index.scss +6 -3
- package/scss/elements/heading-level-6/index.scss +6 -3
- package/scss/elements/horizontal-rule/index.scss +12 -9
- package/scss/elements/image/index.scss +6 -2
- package/scss/elements/inline-loading/index.scss +34 -31
- package/scss/elements/inline-quotation/index.scss +6 -3
- package/scss/elements/inserted-text/index.scss +9 -6
- package/scss/elements/italic-text/index.scss +5 -2
- package/scss/elements/keyboard-input/index.scss +9 -6
- package/scss/elements/label/index.scss +22 -19
- package/scss/elements/main/index.scss +7 -4
- package/scss/elements/marked-text/index.scss +7 -4
- package/scss/elements/menu/index.scss +71 -64
- package/scss/elements/meter/index.scss +45 -42
- package/scss/elements/number-input/index.scss +16 -12
- package/scss/elements/ordered-list/index.scss +25 -22
- package/scss/elements/paragraph/index.scss +8 -5
- package/scss/elements/password-input/index.scss +17 -13
- package/scss/elements/popover/index.scss +75 -72
- package/scss/elements/preformatted/index.scss +18 -15
- package/scss/elements/progress-bar/index.scss +71 -68
- package/scss/elements/radio-button/index.scss +35 -32
- package/scss/elements/range-input/index.scss +42 -39
- package/scss/elements/search-input/index.scss +21 -18
- package/scss/elements/select/index.scss +36 -33
- package/scss/elements/side-navigation/index.scss +141 -137
- package/scss/elements/small-text/index.scss +7 -4
- package/scss/elements/table/index.scss +93 -90
- package/scss/elements/tabs/index.scss +155 -152
- package/scss/elements/telephone-number-input/index.scss +16 -13
- package/scss/elements/text-area/index.scss +21 -18
- package/scss/elements/text-input/index.scss +16 -13
- package/scss/elements/tile/index.scss +49 -45
- package/scss/elements/time-input/index.scss +24 -21
- package/scss/elements/toggle/index.scss +71 -68
- package/scss/elements/tooltip/index.scss +16 -13
- package/scss/elements/tree-view/index.scss +86 -82
- package/scss/elements/unordered-list/index.scss +21 -18
- package/scss/elements/url-input/index.scss +16 -13
- package/scss/prebuilt/editorial/_elements.scss +37 -33
- package/scss/prebuilt/expressive/_elements.scss +75 -71
- package/scss/prebuilt/productive/_elements.scss +71 -67
- package/scss/utilities/_cascade-layer.scss +33 -0
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
@use "../_layer";
|
|
20
20
|
|
|
21
21
|
@use "../../layout";
|
|
22
|
+
@use "../../utilities/cascade-layer";
|
|
22
23
|
@use "../../utilities/icons";
|
|
23
24
|
@use "../../utilities/guards";
|
|
24
25
|
|
|
@@ -34,206 +35,208 @@ $-default-config: (
|
|
|
34
35
|
@mixin styles($config: $config) {
|
|
35
36
|
$props: map.deep-merge($-default-config, $config);
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
&:modal {
|
|
42
|
-
@include layout.size("md");
|
|
43
|
-
@include layout.density("normal");
|
|
44
|
-
@include layer.styles;
|
|
45
|
-
|
|
46
|
-
display: flex;
|
|
47
|
-
flex-direction: column;
|
|
48
|
-
color: theme.$text-primary;
|
|
49
|
-
border: none;
|
|
50
|
-
padding-inline: layout.$density--padding;
|
|
51
|
-
box-shadow: none;
|
|
52
|
-
margin: auto;
|
|
53
|
-
box-sizing: border-box;
|
|
54
|
-
|
|
55
|
-
&:focus {
|
|
56
|
-
@include focus-outline.focus-outline("outline");
|
|
57
|
-
}
|
|
38
|
+
@include cascade-layer.wrap {
|
|
39
|
+
#{map.get($props, "selector")} {
|
|
40
|
+
position: relative;
|
|
41
|
+
padding: 0;
|
|
58
42
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
43
|
+
&:modal {
|
|
44
|
+
@include layout.size("md");
|
|
45
|
+
@include layout.density("normal");
|
|
46
|
+
@include layer.styles;
|
|
47
|
+
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
color: theme.$text-primary;
|
|
51
|
+
border: none;
|
|
52
|
+
padding-inline: layout.$density--padding;
|
|
53
|
+
box-shadow: none;
|
|
54
|
+
margin: auto;
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
|
|
57
|
+
&:focus {
|
|
58
|
+
@include focus-outline.focus-outline("outline");
|
|
59
|
+
}
|
|
62
60
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
61
|
+
@include breakpoint.breakpoint("xlg") {
|
|
62
|
+
inline-size: 48%;
|
|
63
|
+
}
|
|
67
64
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
@include breakpoint.breakpoint-down("xlg") {
|
|
66
|
+
inline-size: 60%;
|
|
67
|
+
max-block-size: 84%;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@include breakpoint.breakpoint-down("lg") {
|
|
71
|
+
inline-size: 84%;
|
|
72
|
+
max-block-size: 90%;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@include breakpoint.breakpoint-down("md") {
|
|
76
|
+
inline-size: 100%;
|
|
77
|
+
block-size: 100%;
|
|
78
|
+
max-inline-size: 100dvi;
|
|
79
|
+
max-block-size: 100dvb;
|
|
80
|
+
}
|
|
71
81
|
}
|
|
72
82
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
block-size: 100%;
|
|
76
|
-
max-inline-size: 100dvi;
|
|
77
|
-
max-block-size: 100dvb;
|
|
83
|
+
&:modal::backdrop {
|
|
84
|
+
background-color: theme.$overlay;
|
|
78
85
|
}
|
|
79
|
-
}
|
|
80
86
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
87
|
+
&:modal header {
|
|
88
|
+
@include layout.mode--heading-level-4;
|
|
89
|
+
margin-block: layout.$density--padding;
|
|
90
|
+
margin-inline-end: calc(layout.$size--block-size + spacing.$spacing-05);
|
|
91
|
+
}
|
|
84
92
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
93
|
+
&:modal footer {
|
|
94
|
+
@include layout.size("xl");
|
|
95
|
+
display: grid;
|
|
96
|
+
grid-template-columns: repeat(4, 1fr);
|
|
97
|
+
margin-inline: calc(layout.$density--padding * -1);
|
|
98
|
+
margin-block-start: spacing.$spacing-09;
|
|
99
|
+
}
|
|
90
100
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
grid-template-columns: repeat(4, 1fr);
|
|
95
|
-
margin-inline: calc(layout.$density--padding * -1);
|
|
96
|
-
margin-block-start: spacing.$spacing-09;
|
|
97
|
-
}
|
|
101
|
+
&:modal:not(:has(footer)) {
|
|
102
|
+
padding-block-end: spacing.$spacing-09;
|
|
103
|
+
}
|
|
98
104
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
105
|
+
// single button
|
|
106
|
+
&:modal footer > button:only-child {
|
|
107
|
+
grid-column: 3 / span 2;
|
|
108
|
+
@include button.styles(
|
|
109
|
+
(
|
|
110
|
+
selector: "&",
|
|
111
|
+
kind: "primary",
|
|
112
|
+
)
|
|
113
|
+
);
|
|
114
|
+
}
|
|
102
115
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
116
|
+
// two buttons
|
|
117
|
+
&:modal footer > button:first-child:has(+ button:last-child) {
|
|
118
|
+
grid-column: 1 / span 2;
|
|
119
|
+
@include button.styles(
|
|
120
|
+
(
|
|
121
|
+
selector: "&",
|
|
122
|
+
kind: "secondary",
|
|
123
|
+
)
|
|
124
|
+
);
|
|
125
|
+
}
|
|
113
126
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
}
|
|
127
|
+
&:modal footer > button:first-child + button:last-child {
|
|
128
|
+
grid-column: 3 / span 2;
|
|
129
|
+
@include button.styles(
|
|
130
|
+
(
|
|
131
|
+
selector: "&",
|
|
132
|
+
kind: "primary",
|
|
133
|
+
)
|
|
134
|
+
);
|
|
135
|
+
}
|
|
124
136
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
(
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
137
|
+
// three buttons
|
|
138
|
+
&:modal footer > button:first-child:not(:has(+ button:last-child), :last-child) {
|
|
139
|
+
grid-column: 1;
|
|
140
|
+
@include button.styles(
|
|
141
|
+
(
|
|
142
|
+
selector: "&",
|
|
143
|
+
kind: "ghost",
|
|
144
|
+
)
|
|
145
|
+
);
|
|
146
|
+
}
|
|
134
147
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
)
|
|
143
|
-
|
|
144
|
-
}
|
|
148
|
+
&:modal footer > button:not(:first-child):has(+ button:last-child) {
|
|
149
|
+
grid-column: 3;
|
|
150
|
+
@include button.styles(
|
|
151
|
+
(
|
|
152
|
+
selector: "&",
|
|
153
|
+
kind: "secondary",
|
|
154
|
+
)
|
|
155
|
+
);
|
|
156
|
+
}
|
|
145
157
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
158
|
+
&:modal footer > button:not(:first-child) + button:last-child {
|
|
159
|
+
grid-column: 4;
|
|
160
|
+
@include button.styles(
|
|
161
|
+
(
|
|
162
|
+
selector: "&",
|
|
163
|
+
kind: "primary",
|
|
164
|
+
)
|
|
165
|
+
);
|
|
166
|
+
}
|
|
155
167
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
168
|
+
// header close button
|
|
169
|
+
&:modal header > button {
|
|
170
|
+
position: absolute;
|
|
171
|
+
inset-block-start: 0;
|
|
172
|
+
inset-inline-end: 0;
|
|
173
|
+
appearance: none;
|
|
174
|
+
box-shadow: none;
|
|
175
|
+
border: none;
|
|
176
|
+
border-radius: 0;
|
|
177
|
+
padding: 0;
|
|
178
|
+
background-color: transparent;
|
|
179
|
+
color: theme.$icon-primary;
|
|
180
|
+
block-size: layout.$size--block-size;
|
|
181
|
+
inline-size: layout.$size--block-size;
|
|
182
|
+
display: flex;
|
|
183
|
+
align-items: center;
|
|
184
|
+
justify-content: center;
|
|
185
|
+
cursor: pointer;
|
|
186
|
+
transition: background-color layout.$mode--transition-duration
|
|
187
|
+
layout.$mode--transition-timing-function;
|
|
188
|
+
|
|
189
|
+
@include guards.hover {
|
|
190
|
+
&:hover {
|
|
191
|
+
background-color: theme.$layer-hover;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
165
194
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
position: absolute;
|
|
169
|
-
inset-block-start: 0;
|
|
170
|
-
inset-inline-end: 0;
|
|
171
|
-
appearance: none;
|
|
172
|
-
box-shadow: none;
|
|
173
|
-
border: none;
|
|
174
|
-
border-radius: 0;
|
|
175
|
-
padding: 0;
|
|
176
|
-
background-color: transparent;
|
|
177
|
-
color: theme.$icon-primary;
|
|
178
|
-
block-size: layout.$size--block-size;
|
|
179
|
-
inline-size: layout.$size--block-size;
|
|
180
|
-
display: flex;
|
|
181
|
-
align-items: center;
|
|
182
|
-
justify-content: center;
|
|
183
|
-
cursor: pointer;
|
|
184
|
-
transition: background-color layout.$mode--transition-duration
|
|
185
|
-
layout.$mode--transition-timing-function;
|
|
186
|
-
|
|
187
|
-
@include guards.hover {
|
|
188
|
-
&:hover {
|
|
189
|
-
background-color: theme.$layer-hover;
|
|
195
|
+
&:active {
|
|
196
|
+
background-color: theme.$layer-active;
|
|
190
197
|
}
|
|
191
|
-
}
|
|
192
198
|
|
|
193
|
-
|
|
194
|
-
|
|
199
|
+
&:focus {
|
|
200
|
+
@include focus-outline.focus-outline("outline");
|
|
201
|
+
}
|
|
195
202
|
}
|
|
196
203
|
|
|
197
|
-
&:
|
|
198
|
-
@include
|
|
204
|
+
&:modal header > button::after {
|
|
205
|
+
@include icons.close($size: 1.25rem);
|
|
206
|
+
display: block;
|
|
207
|
+
inset: 0;
|
|
208
|
+
content: "";
|
|
199
209
|
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
&:modal header > button::after {
|
|
203
|
-
@include icons.close($size: 1.25rem);
|
|
204
|
-
display: block;
|
|
205
|
-
inset: 0;
|
|
206
|
-
content: "";
|
|
207
|
-
}
|
|
208
210
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
211
|
+
// entry animation
|
|
212
|
+
&[open]:modal {
|
|
213
|
+
translate: 0 0;
|
|
214
|
+
opacity: 1;
|
|
215
|
+
transition-property: opacity;
|
|
216
|
+
transition-duration: motion.$duration-moderate-02;
|
|
217
|
+
transition-timing-function: layout.$mode--transition-timing-function;
|
|
218
|
+
|
|
219
|
+
@include guards.motion {
|
|
220
|
+
transition-property: opacity, translate;
|
|
221
|
+
|
|
222
|
+
@starting-style {
|
|
223
|
+
opacity: 0;
|
|
224
|
+
translate: 0 -1.5rem;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
219
227
|
|
|
220
228
|
@starting-style {
|
|
221
229
|
opacity: 0;
|
|
222
|
-
translate: 0 -1.5rem;
|
|
223
230
|
}
|
|
224
231
|
}
|
|
225
232
|
|
|
226
|
-
|
|
227
|
-
opacity:
|
|
228
|
-
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
&[open]:modal::backdrop {
|
|
232
|
-
opacity: 1;
|
|
233
|
-
transition: inherit;
|
|
233
|
+
&[open]:modal::backdrop {
|
|
234
|
+
opacity: 1;
|
|
235
|
+
transition: inherit;
|
|
234
236
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
+
@starting-style {
|
|
238
|
+
opacity: 0;
|
|
239
|
+
}
|
|
237
240
|
}
|
|
238
241
|
}
|
|
239
242
|
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
@use "../_labelled-input";
|
|
11
11
|
|
|
12
12
|
@use "../../layout";
|
|
13
|
+
@use "../../utilities/cascade-layer";
|
|
13
14
|
|
|
14
15
|
$config: () !default;
|
|
15
16
|
|
|
@@ -25,18 +26,20 @@ $-default-config: (
|
|
|
25
26
|
@mixin styles($config: $config) {
|
|
26
27
|
$props: map.deep-merge($-default-config, $config);
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
@include cascade-layer.wrap {
|
|
30
|
+
#{map.get($props, "selector")} {
|
|
31
|
+
@include labelled-input.styles(
|
|
32
|
+
(
|
|
33
|
+
label: (
|
|
34
|
+
selector: "&",
|
|
35
|
+
axis: map.get($props, "axis"),
|
|
36
|
+
),
|
|
37
|
+
input: (
|
|
38
|
+
selector: 'input[type="email"]',
|
|
39
|
+
),
|
|
40
|
+
input-invalid-slot: "after",
|
|
41
|
+
)
|
|
42
|
+
);
|
|
43
|
+
}
|
|
41
44
|
}
|
|
42
45
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
@use "../label";
|
|
13
13
|
|
|
14
14
|
@use "../../layout";
|
|
15
|
+
@use "../../utilities/cascade-layer";
|
|
15
16
|
|
|
16
17
|
$config: () !default;
|
|
17
18
|
|
|
@@ -25,19 +26,21 @@ $-default-config: (
|
|
|
25
26
|
@mixin styles($config: $config) {
|
|
26
27
|
$props: map.deep-merge($-default-config, $config);
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
margin-block: layout.$mode--margin-block;
|
|
32
|
-
|
|
33
|
-
& legend {
|
|
34
|
-
@include label.styles(
|
|
35
|
-
(
|
|
36
|
-
selector: "&",
|
|
37
|
-
)
|
|
38
|
-
);
|
|
29
|
+
@include cascade-layer.wrap {
|
|
30
|
+
#{map.get($props, "selector")} {
|
|
31
|
+
border: none;
|
|
39
32
|
padding: 0;
|
|
40
|
-
margin-block
|
|
33
|
+
margin-block: layout.$mode--margin-block;
|
|
34
|
+
|
|
35
|
+
& legend {
|
|
36
|
+
@include label.styles(
|
|
37
|
+
(
|
|
38
|
+
selector: "&",
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
padding: 0;
|
|
42
|
+
margin-block-end: spacing.$spacing-03;
|
|
43
|
+
}
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
@use "@carbon/styles/scss/components/button/tokens" as carbon-button;
|
|
14
14
|
|
|
15
15
|
@use "../../layout";
|
|
16
|
+
@use "../../utilities/cascade-layer";
|
|
16
17
|
@use "../../utilities/guards";
|
|
17
18
|
|
|
18
19
|
$config: () !default;
|
|
@@ -27,69 +28,71 @@ $-default-config: (
|
|
|
27
28
|
@mixin styles($config: $config) {
|
|
28
29
|
$props: map.deep-merge($-default-config, $config);
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
@include cascade-layer.wrap {
|
|
32
|
+
#{map.get($props, "selector")} {
|
|
33
|
+
@include layout.mode--heading-compact;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
row-gap: spacing.$spacing-03;
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
& input[type="file"]:focus {
|
|
39
|
+
outline: none;
|
|
40
|
+
box-shadow: none;
|
|
41
|
+
}
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
& input[type="file"]:focus::file-selector-button {
|
|
44
|
+
outline: 0.125rem solid theme.$focus;
|
|
45
|
+
outline-offset: -0.125rem;
|
|
46
|
+
box-shadow: inset 0 0 0 0.1875rem theme.$layer-background;
|
|
47
|
+
}
|
|
46
48
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
49
|
+
& input[type="file"]::file-selector-button {
|
|
50
|
+
@include layout.mode--body-compact;
|
|
51
|
+
appearance: none;
|
|
52
|
+
border: none;
|
|
53
|
+
box-shadow: none;
|
|
54
|
+
border-radius: 0;
|
|
55
|
+
text-align: start;
|
|
56
|
+
background-color: carbon-button.$button-primary;
|
|
57
|
+
color: theme.$text-on-color;
|
|
58
|
+
block-size: layout.$size--block-size;
|
|
59
|
+
padding-block-start: layout.$size--padding-block-start;
|
|
60
|
+
padding-block-end: layout.$size--padding-block-end;
|
|
61
|
+
padding-inline-start: layout.$density--padding;
|
|
62
|
+
padding-inline-end: calc(layout.$density--padding + 1rem + layout.$density--padding);
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
transition: background-color layout.$mode--transition-duration
|
|
65
|
+
layout.$mode--transition-timing-function;
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
@include guards.hover {
|
|
68
|
+
&:hover {
|
|
69
|
+
background-color: carbon-button.$button-primary-hover;
|
|
70
|
+
}
|
|
68
71
|
}
|
|
69
|
-
}
|
|
70
72
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
&:active {
|
|
74
|
+
background-color: carbon-button.$button-primary-active;
|
|
75
|
+
}
|
|
73
76
|
}
|
|
74
|
-
}
|
|
75
77
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
& input[type="file"]:disabled::file-selector-button,
|
|
81
|
-
& input[type="file"]:disabled::file-selector-button:active {
|
|
82
|
-
cursor: not-allowed;
|
|
83
|
-
background-color: carbon-button.$button-disabled;
|
|
84
|
-
color: theme.$text-on-color-disabled;
|
|
85
|
-
}
|
|
78
|
+
&:has([disabled]) {
|
|
79
|
+
color: theme.$text-disabled;
|
|
80
|
+
}
|
|
86
81
|
|
|
87
|
-
|
|
88
|
-
& input[type="file"]:disabled::file-selector-button:
|
|
82
|
+
& input[type="file"]:disabled::file-selector-button,
|
|
83
|
+
& input[type="file"]:disabled::file-selector-button:active {
|
|
89
84
|
cursor: not-allowed;
|
|
90
85
|
background-color: carbon-button.$button-disabled;
|
|
91
86
|
color: theme.$text-on-color-disabled;
|
|
92
87
|
}
|
|
88
|
+
|
|
89
|
+
@include guards.hover {
|
|
90
|
+
& input[type="file"]:disabled::file-selector-button:hover {
|
|
91
|
+
cursor: not-allowed;
|
|
92
|
+
background-color: carbon-button.$button-disabled;
|
|
93
|
+
color: theme.$text-on-color-disabled;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
98
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
@use "@carbon/styles/scss/spacing";
|
|
12
12
|
|
|
13
13
|
@use "../../layout";
|
|
14
|
+
@use "../../utilities/cascade-layer";
|
|
14
15
|
|
|
15
16
|
$config: () !default;
|
|
16
17
|
|
|
@@ -24,11 +25,13 @@ $-default-config: (
|
|
|
24
25
|
@mixin styles($config: $config) {
|
|
25
26
|
$props: map.deep-merge($-default-config, $config);
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
@include cascade-layer.wrap {
|
|
29
|
+
#{map.get($props, "selector")} {
|
|
30
|
+
@include layout.mode--body-compact;
|
|
31
|
+
color: theme.$text-secondary;
|
|
32
|
+
border-block-start: 0.0625rem solid theme.$border-subtle;
|
|
33
|
+
padding-inline: spacing.$spacing-07;
|
|
34
|
+
padding-block: layout.$density--padding;
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
}
|