@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
|
@@ -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;
|
|
@@ -29,242 +30,244 @@ $-default-config: (
|
|
|
29
30
|
@mixin styles($config: $config) {
|
|
30
31
|
$props: map.deep-merge($-default-config, $config);
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
&:focus {
|
|
51
|
-
outline: 0.125rem solid theme.$focus;
|
|
52
|
-
outline-offset: -0.125rem;
|
|
53
|
-
box-shadow: inset 0 0 0 0.1875rem theme.$layer-background;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&:disabled {
|
|
57
|
-
cursor: not-allowed;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
& > svg {
|
|
61
|
-
fill: currentColor;
|
|
62
|
-
block-size: 1rem;
|
|
63
|
-
inline-size: 1rem;
|
|
64
|
-
translate: 0 0.125rem;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&:has(> svg:not(:only-child)) {
|
|
68
|
-
padding-inline-end: layout.$density--padding;
|
|
33
|
+
@include cascade-layer.wrap {
|
|
34
|
+
#{map.get($props, "selector")} {
|
|
35
|
+
@include layout.mode--body-compact;
|
|
36
|
+
appearance: none;
|
|
37
|
+
border: none;
|
|
38
|
+
box-shadow: none;
|
|
39
|
+
border-radius: 0;
|
|
40
|
+
text-align: start;
|
|
41
|
+
display: flex;
|
|
42
|
+
block-size: layout.$size--block-size;
|
|
43
|
+
padding-block-start: layout.$size--padding-block-start;
|
|
44
|
+
padding-block-end: layout.$size--padding-block-end;
|
|
45
|
+
padding-inline-start: layout.$density--padding;
|
|
46
|
+
padding-inline-end: calc(layout.$density--padding + 1rem + layout.$density--padding);
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
transition-property: color, background-color;
|
|
49
|
+
transition-duration: layout.$mode--transition-duration;
|
|
50
|
+
transition-timing-function: layout.$mode--transition-timing-function;
|
|
69
51
|
|
|
70
|
-
|
|
71
|
-
|
|
52
|
+
&:focus {
|
|
53
|
+
outline: 0.125rem solid theme.$focus;
|
|
54
|
+
outline-offset: -0.125rem;
|
|
55
|
+
box-shadow: inset 0 0 0 0.1875rem theme.$layer-background;
|
|
72
56
|
}
|
|
73
|
-
}
|
|
74
57
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
aspect-ratio: 1;
|
|
79
|
-
justify-content: center;
|
|
58
|
+
&:disabled {
|
|
59
|
+
cursor: not-allowed;
|
|
60
|
+
}
|
|
80
61
|
|
|
81
62
|
& > svg {
|
|
82
|
-
|
|
63
|
+
fill: currentColor;
|
|
64
|
+
block-size: 1rem;
|
|
65
|
+
inline-size: 1rem;
|
|
66
|
+
translate: 0 0.125rem;
|
|
83
67
|
}
|
|
84
|
-
}
|
|
85
68
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
color: theme.$text-on-color;
|
|
69
|
+
&:has(> svg:not(:only-child)) {
|
|
70
|
+
padding-inline-end: layout.$density--padding;
|
|
89
71
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
background-color: carbon-button.$button-primary-hover;
|
|
72
|
+
& > svg {
|
|
73
|
+
margin-inline-start: layout.$density--padding;
|
|
93
74
|
}
|
|
94
75
|
}
|
|
95
76
|
|
|
96
|
-
&:
|
|
97
|
-
|
|
98
|
-
|
|
77
|
+
&:has(> svg:only-child),
|
|
78
|
+
&:has(> svg:first-child + [popover="hint"]:last-child) {
|
|
79
|
+
padding-inline: unset;
|
|
80
|
+
aspect-ratio: 1;
|
|
81
|
+
justify-content: center;
|
|
99
82
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
83
|
+
& > svg {
|
|
84
|
+
margin-inline: 0;
|
|
85
|
+
}
|
|
103
86
|
}
|
|
104
|
-
}
|
|
105
87
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
88
|
+
@if map.get($props, "kind") == "primary" {
|
|
89
|
+
background-color: carbon-button.$button-primary;
|
|
90
|
+
color: theme.$text-on-color;
|
|
109
91
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
92
|
+
@include guards.hover {
|
|
93
|
+
&:enabled:hover {
|
|
94
|
+
background-color: carbon-button.$button-primary-hover;
|
|
95
|
+
}
|
|
113
96
|
}
|
|
114
|
-
}
|
|
115
97
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
98
|
+
&:active {
|
|
99
|
+
background-color: carbon-button.$button-primary-active;
|
|
100
|
+
}
|
|
119
101
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
102
|
+
&:disabled {
|
|
103
|
+
background-color: carbon-button.$button-disabled;
|
|
104
|
+
color: theme.$text-on-color-disabled;
|
|
105
|
+
}
|
|
123
106
|
}
|
|
124
|
-
}
|
|
125
107
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
outline: 0.0625rem solid carbon-button.$button-tertiary;
|
|
130
|
-
outline-offset: -0.0625rem;
|
|
108
|
+
@if map.get($props, "kind") == "secondary" {
|
|
109
|
+
background-color: carbon-button.$button-secondary;
|
|
110
|
+
color: theme.$text-on-color;
|
|
131
111
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
112
|
+
@include guards.hover {
|
|
113
|
+
&:enabled:hover {
|
|
114
|
+
background-color: carbon-button.$button-secondary-hover;
|
|
115
|
+
}
|
|
136
116
|
}
|
|
137
|
-
}
|
|
138
117
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
118
|
+
&:enabled:active {
|
|
119
|
+
background-color: carbon-button.$button-secondary-active;
|
|
120
|
+
}
|
|
143
121
|
|
|
144
|
-
|
|
145
|
-
|
|
122
|
+
&:disabled {
|
|
123
|
+
background-color: carbon-button.$button-disabled;
|
|
124
|
+
color: theme.$text-on-color-disabled;
|
|
125
|
+
}
|
|
146
126
|
}
|
|
147
127
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
color:
|
|
151
|
-
|
|
152
|
-
|
|
128
|
+
@if map.get($props, "kind") == "tertiary" {
|
|
129
|
+
background-color: transparent;
|
|
130
|
+
color: carbon-button.$button-tertiary;
|
|
131
|
+
outline: 0.0625rem solid carbon-button.$button-tertiary;
|
|
132
|
+
outline-offset: -0.0625rem;
|
|
133
|
+
|
|
134
|
+
@include guards.hover {
|
|
135
|
+
&:enabled:hover {
|
|
136
|
+
color: theme.$text-inverse;
|
|
137
|
+
background-color: carbon-button.$button-tertiary-hover;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
153
140
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
141
|
+
&:focus {
|
|
142
|
+
color: theme.$text-inverse;
|
|
143
|
+
background-color: carbon-button.$button-tertiary;
|
|
144
|
+
}
|
|
158
145
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
color: theme.$link-primary-hover;
|
|
162
|
-
background-color: theme.$layer-hover;
|
|
146
|
+
&:enabled:active {
|
|
147
|
+
background-color: carbon-button.$button-tertiary-active;
|
|
163
148
|
}
|
|
164
|
-
}
|
|
165
149
|
|
|
166
|
-
|
|
167
|
-
|
|
150
|
+
&:disabled {
|
|
151
|
+
outline-color: carbon-button.$button-disabled;
|
|
152
|
+
color: theme.$text-disabled;
|
|
153
|
+
}
|
|
168
154
|
}
|
|
169
155
|
|
|
170
|
-
|
|
171
|
-
color:
|
|
172
|
-
|
|
156
|
+
@if map.get($props, "kind") == "ghost" {
|
|
157
|
+
background-color: transparent;
|
|
158
|
+
color: theme.$link-primary;
|
|
159
|
+
padding-inline-end: layout.$density--padding;
|
|
173
160
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
161
|
+
@include guards.hover {
|
|
162
|
+
&:enabled:hover {
|
|
163
|
+
color: theme.$link-primary-hover;
|
|
164
|
+
background-color: theme.$layer-hover;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
177
167
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
168
|
+
&:enabled:active {
|
|
169
|
+
background-color: theme.$layer-active;
|
|
170
|
+
}
|
|
182
171
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
172
|
+
&:disabled {
|
|
173
|
+
color: theme.$text-disabled;
|
|
174
|
+
}
|
|
187
175
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
}
|
|
176
|
+
&:has(> svg:not(:only-child)) > svg {
|
|
177
|
+
margin-inline-start: spacing.$spacing-03;
|
|
178
|
+
}
|
|
193
179
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
180
|
+
& > svg:only-child,
|
|
181
|
+
& > svg:first-child:has(+ [popover="hint"]:last-child) {
|
|
182
|
+
color: theme.$icon-primary;
|
|
183
|
+
}
|
|
197
184
|
|
|
198
|
-
|
|
199
|
-
&:
|
|
200
|
-
|
|
185
|
+
&:disabled > svg:only-child,
|
|
186
|
+
&:disabled > svg:first-child:has(+ [popover="hint"]:last-child) {
|
|
187
|
+
color: theme.$icon-disabled;
|
|
201
188
|
}
|
|
202
|
-
}
|
|
203
189
|
|
|
204
|
-
|
|
205
|
-
|
|
190
|
+
&[aria-pressed="true"]:has(> svg:only-child),
|
|
191
|
+
&[aria-pressed="true"]:has(> svg:first-child + [popover="hint"]:last-child) {
|
|
192
|
+
background-color: theme.$background-selected;
|
|
193
|
+
}
|
|
206
194
|
}
|
|
207
195
|
|
|
208
|
-
|
|
209
|
-
background-color: carbon-button.$button-
|
|
210
|
-
color: theme.$text-on-color
|
|
211
|
-
}
|
|
212
|
-
}
|
|
196
|
+
@if map.get($props, "kind") == "danger--primary" {
|
|
197
|
+
background-color: carbon-button.$button-danger-primary;
|
|
198
|
+
color: theme.$text-on-color;
|
|
213
199
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
200
|
+
@include guards.hover {
|
|
201
|
+
&:enabled:hover {
|
|
202
|
+
background-color: carbon-button.$button-danger-hover;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
219
205
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
color: theme.$text-on-color;
|
|
223
|
-
background-color: carbon-button.$button-danger-hover;
|
|
224
|
-
outline-color: carbon-button.$button-danger-hover;
|
|
206
|
+
&:enabled:active {
|
|
207
|
+
background-color: carbon-button.$button-danger-active;
|
|
225
208
|
}
|
|
226
|
-
}
|
|
227
209
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
210
|
+
&:disabled {
|
|
211
|
+
background-color: carbon-button.$button-disabled;
|
|
212
|
+
color: theme.$text-on-color-disabled;
|
|
213
|
+
}
|
|
231
214
|
}
|
|
232
215
|
|
|
233
|
-
|
|
234
|
-
background-color:
|
|
235
|
-
|
|
236
|
-
|
|
216
|
+
@if map.get($props, "kind") == "danger--tertiary" {
|
|
217
|
+
background-color: transparent;
|
|
218
|
+
color: carbon-button.$button-danger-secondary;
|
|
219
|
+
outline: 0.0625rem solid carbon-button.$button-danger-secondary;
|
|
220
|
+
outline-offset: -0.0625rem;
|
|
221
|
+
|
|
222
|
+
@include guards.hover {
|
|
223
|
+
&:enabled:hover {
|
|
224
|
+
color: theme.$text-on-color;
|
|
225
|
+
background-color: carbon-button.$button-danger-hover;
|
|
226
|
+
outline-color: carbon-button.$button-danger-hover;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
237
229
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
230
|
+
&:focus {
|
|
231
|
+
color: theme.$text-on-color;
|
|
232
|
+
background-color: carbon-button.$button-danger-primary;
|
|
233
|
+
}
|
|
243
234
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
235
|
+
&:enabled:active {
|
|
236
|
+
background-color: carbon-button.$button-danger-active;
|
|
237
|
+
outline-color: carbon-button.$button-danger-active;
|
|
238
|
+
}
|
|
248
239
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
color: theme.$text-
|
|
252
|
-
background-color: carbon-button.$button-danger-hover;
|
|
253
|
-
outline-color: carbon-button.$button-danger-hover;
|
|
240
|
+
&:disabled {
|
|
241
|
+
outline-color: carbon-button.$button-disabled;
|
|
242
|
+
color: theme.$text-disabled;
|
|
254
243
|
}
|
|
255
244
|
}
|
|
256
245
|
|
|
257
|
-
|
|
258
|
-
background-color:
|
|
259
|
-
|
|
260
|
-
|
|
246
|
+
@if map.get($props, "kind") == "danger--ghost" {
|
|
247
|
+
background-color: transparent;
|
|
248
|
+
color: carbon-button.$button-danger-secondary;
|
|
249
|
+
padding-inline-end: layout.$density--padding;
|
|
250
|
+
|
|
251
|
+
@include guards.hover {
|
|
252
|
+
&:enabled:hover {
|
|
253
|
+
color: theme.$text-on-color;
|
|
254
|
+
background-color: carbon-button.$button-danger-hover;
|
|
255
|
+
outline-color: carbon-button.$button-danger-hover;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
261
258
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
259
|
+
&:enabled:active {
|
|
260
|
+
background-color: carbon-button.$button-danger-active;
|
|
261
|
+
outline-color: carbon-button.$button-danger-active;
|
|
262
|
+
}
|
|
265
263
|
|
|
266
|
-
|
|
267
|
-
|
|
264
|
+
&:disabled {
|
|
265
|
+
color: theme.$text-disabled;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
&:has(> svg:not(:only-child)) > svg {
|
|
269
|
+
margin-inline-start: spacing.$spacing-03;
|
|
270
|
+
}
|
|
268
271
|
}
|
|
269
272
|
}
|
|
270
273
|
}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
@use "../label";
|
|
15
15
|
|
|
16
16
|
@use "../../layout";
|
|
17
|
+
@use "../../utilities/cascade-layer";
|
|
17
18
|
@use "../../utilities/icons";
|
|
18
19
|
|
|
19
20
|
$config: () !default;
|
|
@@ -28,50 +29,52 @@ $-default-config: (
|
|
|
28
29
|
@mixin styles($config: $config) {
|
|
29
30
|
$props: map.deep-merge($-default-config, $config);
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
@include cascade-layer.wrap {
|
|
33
|
+
#{map.get($props, "selector")} {
|
|
34
|
+
@include label.styles(
|
|
35
|
+
(
|
|
36
|
+
selector: "&",
|
|
37
|
+
axis: "inline",
|
|
38
|
+
)
|
|
39
|
+
);
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
justify-content: start;
|
|
42
|
+
cursor: pointer;
|
|
41
43
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
& input[type="checkbox"] {
|
|
45
|
+
grid-column: 1;
|
|
46
|
+
position: relative;
|
|
47
|
+
appearance: none;
|
|
48
|
+
border: none;
|
|
49
|
+
block-size: 1rem;
|
|
50
|
+
inline-size: 1rem;
|
|
51
|
+
color: theme.$icon-primary;
|
|
52
|
+
border-radius: 0.125rem;
|
|
51
53
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
&:focus {
|
|
55
|
+
@include focus-outline.focus-outline("outline");
|
|
56
|
+
outline-offset: 0.125rem;
|
|
57
|
+
}
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
&:disabled {
|
|
60
|
+
color: theme.$icon-disabled;
|
|
61
|
+
}
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
&::before {
|
|
64
|
+
content: "";
|
|
65
|
+
position: absolute;
|
|
66
|
+
inset: 0;
|
|
67
|
+
@include icons.checkbox;
|
|
68
|
+
scale: 1.25;
|
|
69
|
+
}
|
|
68
70
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
&:checked::before {
|
|
72
|
+
@include icons.checkbox--checked--filled;
|
|
73
|
+
}
|
|
72
74
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
&:indeterminate::before {
|
|
76
|
+
@include icons.checkbox--indeterminate--filled;
|
|
77
|
+
}
|
|
75
78
|
}
|
|
76
79
|
}
|
|
77
80
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
@use "@carbon/styles/scss/theme";
|
|
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--code;
|
|
31
|
+
background-color: theme.$layer;
|
|
32
|
+
padding-inline: spacing.$spacing-01;
|
|
33
|
+
border-radius: 0.0625rem;
|
|
34
|
+
box-shadow: 0 0 0 0.125rem theme.$layer;
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
}
|