@db-ux/core-components 2.0.6 → 2.0.7
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/build/components/badge/badge.css +48 -41
- package/build/components/badge/badge.scss +2 -0
- package/build/components/checkbox/checkbox.css +169 -263
- package/build/components/checkbox/checkbox.scss +76 -7
- package/build/components/custom-select/custom-select.css +1 -0
- package/build/components/header/header.css +6 -0
- package/build/components/header/header.scss +13 -0
- package/build/components/input/input.css +1 -0
- package/build/components/radio/radio.css +102 -264
- package/build/components/radio/radio.scss +39 -7
- package/build/components/select/select.css +1 -0
- package/build/components/switch/switch.css +37 -289
- package/build/components/switch/switch.scss +21 -7
- package/build/components/tag/tag.css +69 -52
- package/build/components/textarea/textarea.css +1 -0
- package/build/styles/absolute.css +121 -63
- package/build/styles/index.css +121 -63
- package/build/styles/internal/_form-components.scss +33 -59
- package/build/styles/internal/_tag-components.scss +41 -44
- package/build/styles/relative.css +121 -63
- package/build/styles/rollup.css +121 -63
- package/build/styles/webpack.css +121 -63
- package/package.json +6 -6
|
@@ -451,6 +451,12 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
451
451
|
.db-header:has(.db-header-navigation:empty) .db-header-navigation-container::before, .db-header:has(.db-brand:empty) .db-header-navigation-container::before {
|
|
452
452
|
display: none;
|
|
453
453
|
}
|
|
454
|
+
.db-header:has(.db-header-navigation:empty) .db-header-burger-menu-container {
|
|
455
|
+
display: none;
|
|
456
|
+
}
|
|
457
|
+
.db-header:has(.db-header-navigation:empty):has(.db-header-secondary-action:empty) .db-header-action-container::before {
|
|
458
|
+
display: none;
|
|
459
|
+
}
|
|
454
460
|
|
|
455
461
|
.db-header-navigation-bar {
|
|
456
462
|
display: flex;
|
|
@@ -52,6 +52,19 @@
|
|
|
52
52
|
display: none;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
|
|
56
|
+
// Hide the burger menu if there is no navigation
|
|
57
|
+
&:has(.db-header-navigation:empty) {
|
|
58
|
+
.db-header-burger-menu-container {
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&:has(.db-header-secondary-action:empty) {
|
|
63
|
+
.db-header-action-container::before {
|
|
64
|
+
display: none;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
55
68
|
}
|
|
56
69
|
|
|
57
70
|
.db-header-navigation-bar {
|
|
@@ -752,6 +752,7 @@ input[aria-disabled=true]) {
|
|
|
752
752
|
inset-block-start: calc((var(--db-spacing-fixed-xs) + var(--db-base-body-icon-font-size-xs)) * var(--db-label-visible-above, 1) + var(--db-sizing-md) / 2);
|
|
753
753
|
color: var(--db-adaptive-on-bg-basic-emphasis-100-default);
|
|
754
754
|
transform: translateY(-50%);
|
|
755
|
+
z-index: 1;
|
|
755
756
|
}
|
|
756
757
|
.db-input::before {
|
|
757
758
|
margin-inline-end: var(--db-spacing-fixed-sm);
|
|
@@ -157,75 +157,78 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
157
157
|
content: "*"/"";
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
.db-radio:has(input:
|
|
161
|
-
|
|
160
|
+
.db-radio:has(input:disabled) {
|
|
161
|
+
opacity: 0.4;
|
|
162
162
|
}
|
|
163
|
-
.db-radio:
|
|
163
|
+
.db-radio:is(label),
|
|
164
|
+
.db-radio > label {
|
|
164
165
|
display: flex;
|
|
166
|
+
align-items: flex-start;
|
|
167
|
+
position: relative;
|
|
168
|
+
gap: var(--db-spacing-fixed-xs);
|
|
169
|
+
color: var(--db-check-element-label-color, var(--db-adaptive-on-bg-basic-emphasis-100-default));
|
|
165
170
|
}
|
|
166
|
-
.db-radio
|
|
167
|
-
|
|
171
|
+
.db-radio input {
|
|
172
|
+
background-color: var(--db-adaptive-bg-basic-transparent-full-default);
|
|
173
|
+
place-content: center center;
|
|
174
|
+
appearance: none;
|
|
175
|
+
aspect-ratio: 1;
|
|
176
|
+
/* stylelint-disable-next-line db-ux/use-border-width */
|
|
177
|
+
border: min(var(--db-border-width-2xs), 2px) solid var(--db-check-element-border-color, var(--db-adaptive-on-bg-basic-emphasis-100-default));
|
|
178
|
+
block-size: var(--db-icon-font-size);
|
|
179
|
+
inline-size: var(--db-icon-font-size);
|
|
180
|
+
padding: 0;
|
|
168
181
|
}
|
|
169
|
-
.db-radio
|
|
170
|
-
|
|
171
|
-
--db-successful-bg-basic-transparent-semi-default
|
|
172
|
-
);
|
|
173
|
-
--db-adaptive-bg-basic-transparent-hovered: var(
|
|
174
|
-
--db-successful-bg-basic-transparent-hovered
|
|
175
|
-
);
|
|
176
|
-
--db-adaptive-bg-basic-transparent-pressed: var(
|
|
177
|
-
--db-successful-bg-basic-transparent-pressed
|
|
178
|
-
);
|
|
182
|
+
.db-radio[data-size=small] input {
|
|
183
|
+
margin-inline-end: var(--db-spacing-fixed-2xs);
|
|
179
184
|
}
|
|
180
|
-
.db-radio
|
|
181
|
-
|
|
182
|
-
--db-successful-on-bg-basic-emphasis-70-default
|
|
183
|
-
);
|
|
185
|
+
.db-radio[data-hide-label=true] {
|
|
186
|
+
font-size: 0;
|
|
184
187
|
}
|
|
185
|
-
.db-radio
|
|
186
|
-
|
|
187
|
-
color: var(--db-successful-on-bg-inverted-default);
|
|
188
|
-
/* stylelint-disable-next-line a11y/selector-pseudo-class-focus */
|
|
188
|
+
.db-radio[data-hide-label=true] input {
|
|
189
|
+
margin-inline-end: 0;
|
|
189
190
|
}
|
|
190
|
-
.db-radio:has(input:
|
|
191
|
-
--db-
|
|
191
|
+
.db-radio:not(:has(input:checked, input:disabled)):has(input:hover, > label:hover, :is(label):hover) {
|
|
192
|
+
--db-check-element-label-color: var(
|
|
193
|
+
--db-adaptive-on-bg-basic-emphasis-100-hovered
|
|
194
|
+
);
|
|
192
195
|
}
|
|
193
|
-
.db-radio:has(input:
|
|
196
|
+
.db-radio:not(:has(input:checked, input:disabled)):has(input:hover, > label:hover, :is(label):hover):is(label),
|
|
197
|
+
.db-radio:not(:has(input:checked, input:disabled)):has(input:hover, > label:hover, :is(label):hover) > label {
|
|
194
198
|
cursor: var(--db-overwrite-cursor, pointer);
|
|
195
|
-
background-color: var(--db-successful-bg-inverted-contrast-high-hovered);
|
|
196
|
-
}
|
|
197
|
-
.db-radio:has(input:not([data-custom-validity]):required:valid) input:not([role=switch]):not([type=radio]):checked:hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-radio:has(input:not([data-custom-validity]):required:valid) input:not([role=switch]):not([type=radio]):checked:hover:not(:disabled, [aria-disabled=true]):is(input) {
|
|
198
|
-
cursor: initial;
|
|
199
|
-
}
|
|
200
|
-
.db-radio:has(input:not([data-custom-validity]):required:valid) input:not([role=switch]):not([type=radio]):checked:hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-radio:has(input:not([data-custom-validity]):required:valid) input:not([role=switch]):not([type=radio]):checked:hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
201
|
-
cursor: pointer;
|
|
202
199
|
}
|
|
203
|
-
.db-radio:has(input:
|
|
200
|
+
.db-radio:not(:has(input:checked, input:disabled)):has(input:hover, > label:hover, :is(label):hover) input {
|
|
204
201
|
cursor: var(--db-overwrite-cursor, pointer);
|
|
205
|
-
background-color: var(--db-
|
|
206
|
-
}
|
|
207
|
-
.db-radio:has(input:not([data-custom-validity]):required:valid) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-radio:has(input:not([data-custom-validity]):required:valid) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input) {
|
|
208
|
-
cursor: initial;
|
|
209
|
-
}
|
|
210
|
-
.db-radio:has(input:not([data-custom-validity]):required:valid) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-radio:has(input:not([data-custom-validity]):required:valid) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
211
|
-
cursor: pointer;
|
|
212
|
-
}
|
|
213
|
-
.db-radio:has(input:not([data-custom-validity]):required:valid):has(input:not([role=switch])):is(label),
|
|
214
|
-
.db-radio:has(input:not([data-custom-validity]):required:valid):has(input:not([role=switch])) > label {
|
|
215
|
-
color: var(--db-successful-on-bg-basic-emphasis-80-default);
|
|
202
|
+
background-color: var(--db-adaptive-bg-basic-transparent-hovered);
|
|
216
203
|
}
|
|
217
|
-
.db-radio:has(input
|
|
218
|
-
|
|
204
|
+
.db-radio:not(:has(input:checked, input:disabled)):has(input:active, > label:active, :is(label):active) {
|
|
205
|
+
--db-check-element-label-color: var(
|
|
206
|
+
--db-adaptive-on-bg-basic-emphasis-100-pressed
|
|
207
|
+
);
|
|
219
208
|
}
|
|
220
|
-
.db-radio:has(input
|
|
221
|
-
|
|
209
|
+
.db-radio:not(:has(input:checked, input:disabled)):has(input:active, > label:active, :is(label):active):is(label),
|
|
210
|
+
.db-radio:not(:has(input:checked, input:disabled)):has(input:active, > label:active, :is(label):active) > label {
|
|
211
|
+
cursor: var(--db-overwrite-cursor, pointer);
|
|
222
212
|
}
|
|
223
|
-
.db-radio:has(input
|
|
224
|
-
|
|
213
|
+
.db-radio:not(:has(input:checked, input:disabled)):has(input:active, > label:active, :is(label):active) input {
|
|
214
|
+
cursor: var(--db-overwrite-cursor, pointer);
|
|
215
|
+
background-color: var(--db-adaptive-bg-basic-transparent-pressed);
|
|
225
216
|
}
|
|
226
|
-
.db-radio:has(input
|
|
227
|
-
--db-
|
|
228
|
-
--db-successful-bg-basic-
|
|
217
|
+
.db-radio:has(input:not([data-custom-validity]):required:valid) {
|
|
218
|
+
--db-check-element-border-color: var(
|
|
219
|
+
--db-successful-on-bg-basic-emphasis-70-default
|
|
220
|
+
);
|
|
221
|
+
--db-adaptive-on-bg-basic-emphasis-100-default: var(
|
|
222
|
+
--db-successful-on-bg-basic-emphasis-80-default
|
|
223
|
+
);
|
|
224
|
+
--db-adaptive-on-bg-basic-emphasis-100-hovered: var(
|
|
225
|
+
--db-successful-on-bg-basic-emphasis-80-hovered
|
|
226
|
+
);
|
|
227
|
+
--db-adaptive-on-bg-basic-emphasis-100-pressed: var(
|
|
228
|
+
--db-successful-on-bg-basic-emphasis-80-pressed
|
|
229
|
+
);
|
|
230
|
+
--db-adaptive-bg-basic-transparent-default: var(
|
|
231
|
+
--db-successful-bg-basic-transparent-default
|
|
229
232
|
);
|
|
230
233
|
--db-adaptive-bg-basic-transparent-hovered: var(
|
|
231
234
|
--db-successful-bg-basic-transparent-hovered
|
|
@@ -234,107 +237,44 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
234
237
|
--db-successful-bg-basic-transparent-pressed
|
|
235
238
|
);
|
|
236
239
|
}
|
|
237
|
-
.db-radio:has(input[data-custom-validity=valid])
|
|
240
|
+
.db-radio:has(input[data-custom-validity=valid]), .db-radio[data-custom-validity=valid] {
|
|
238
241
|
--db-check-element-border-color: var(
|
|
239
242
|
--db-successful-on-bg-basic-emphasis-70-default
|
|
240
243
|
);
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
background-color: var(--db-successful-bg-inverted-contrast-high-hovered);
|
|
253
|
-
}
|
|
254
|
-
.db-radio:has(input[data-custom-validity=valid]) input:not([role=switch]):not([type=radio]):checked:hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-radio:has(input[data-custom-validity=valid]) input:not([role=switch]):not([type=radio]):checked:hover:not(:disabled, [aria-disabled=true]):is(input), .db-radio[data-custom-validity=valid] input:not([role=switch]):not([type=radio]):checked:hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-radio[data-custom-validity=valid] input:not([role=switch]):not([type=radio]):checked:hover:not(:disabled, [aria-disabled=true]):is(input) {
|
|
255
|
-
cursor: initial;
|
|
256
|
-
}
|
|
257
|
-
.db-radio:has(input[data-custom-validity=valid]) input:not([role=switch]):not([type=radio]):checked:hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-radio:has(input[data-custom-validity=valid]) input:not([role=switch]):not([type=radio]):checked:hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)), .db-radio[data-custom-validity=valid] input:not([role=switch]):not([type=radio]):checked:hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-radio[data-custom-validity=valid] input:not([role=switch]):not([type=radio]):checked:hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
258
|
-
cursor: pointer;
|
|
259
|
-
}
|
|
260
|
-
.db-radio:has(input[data-custom-validity=valid]) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]), .db-radio[data-custom-validity=valid] input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]) {
|
|
261
|
-
cursor: var(--db-overwrite-cursor, pointer);
|
|
262
|
-
background-color: var(--db-successful-bg-inverted-contrast-high-pressed);
|
|
263
|
-
}
|
|
264
|
-
.db-radio:has(input[data-custom-validity=valid]) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-radio:has(input[data-custom-validity=valid]) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input), .db-radio[data-custom-validity=valid] input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-radio[data-custom-validity=valid] input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input) {
|
|
265
|
-
cursor: initial;
|
|
266
|
-
}
|
|
267
|
-
.db-radio:has(input[data-custom-validity=valid]) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-radio:has(input[data-custom-validity=valid]) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)), .db-radio[data-custom-validity=valid] input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-radio[data-custom-validity=valid] input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
268
|
-
cursor: pointer;
|
|
269
|
-
}
|
|
270
|
-
.db-radio:has(input[data-custom-validity=valid]):has(input:not([role=switch])):is(label),
|
|
271
|
-
.db-radio:has(input[data-custom-validity=valid]):has(input:not([role=switch])) > label, .db-radio[data-custom-validity=valid]:has(input:not([role=switch])):is(label),
|
|
272
|
-
.db-radio[data-custom-validity=valid]:has(input:not([role=switch])) > label {
|
|
273
|
-
color: var(--db-successful-on-bg-basic-emphasis-80-default);
|
|
274
|
-
}
|
|
275
|
-
.db-radio:has(input:not([data-custom-validity]):required:invalid) .db-infotext[data-semantic=critical] {
|
|
276
|
-
display: flex;
|
|
277
|
-
}
|
|
278
|
-
.db-radio:has(input:not([data-custom-validity]):required:invalid) .db-infotext:not([data-semantic]) {
|
|
279
|
-
display: none;
|
|
280
|
-
}
|
|
281
|
-
.db-radio:has(input:not([data-custom-validity]):required:invalid) input:not([role=switch]) {
|
|
282
|
-
--db-adaptive-bg-basic-transparent-semi: var(
|
|
283
|
-
--db-critical-bg-basic-transparent-semi-default
|
|
244
|
+
--db-adaptive-on-bg-basic-emphasis-100-default: var(
|
|
245
|
+
--db-successful-on-bg-basic-emphasis-80-default
|
|
246
|
+
);
|
|
247
|
+
--db-adaptive-on-bg-basic-emphasis-100-hovered: var(
|
|
248
|
+
--db-successful-on-bg-basic-emphasis-80-hovered
|
|
249
|
+
);
|
|
250
|
+
--db-adaptive-on-bg-basic-emphasis-100-pressed: var(
|
|
251
|
+
--db-successful-on-bg-basic-emphasis-80-pressed
|
|
252
|
+
);
|
|
253
|
+
--db-adaptive-bg-basic-transparent-default: var(
|
|
254
|
+
--db-successful-bg-basic-transparent-default
|
|
284
255
|
);
|
|
285
256
|
--db-adaptive-bg-basic-transparent-hovered: var(
|
|
286
|
-
--db-
|
|
257
|
+
--db-successful-bg-basic-transparent-hovered
|
|
287
258
|
);
|
|
288
259
|
--db-adaptive-bg-basic-transparent-pressed: var(
|
|
289
|
-
--db-
|
|
260
|
+
--db-successful-bg-basic-transparent-pressed
|
|
290
261
|
);
|
|
291
262
|
}
|
|
292
|
-
.db-radio:has(input:not([data-custom-validity]):required:invalid)
|
|
263
|
+
.db-radio:has(input:not([data-custom-validity]):required:invalid) {
|
|
293
264
|
--db-check-element-border-color: var(
|
|
294
265
|
--db-critical-on-bg-basic-emphasis-70-default
|
|
295
266
|
);
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
background-color: var(--db-successful-bg-inverted-contrast-high-hovered);
|
|
308
|
-
}
|
|
309
|
-
.db-radio:has(input:not([data-custom-validity]):required:invalid) input:not([role=switch]):not([type=radio]):checked:hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-radio:has(input:not([data-custom-validity]):required:invalid) input:not([role=switch]):not([type=radio]):checked:hover:not(:disabled, [aria-disabled=true]):is(input) {
|
|
310
|
-
cursor: initial;
|
|
311
|
-
}
|
|
312
|
-
.db-radio:has(input:not([data-custom-validity]):required:invalid) input:not([role=switch]):not([type=radio]):checked:hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-radio:has(input:not([data-custom-validity]):required:invalid) input:not([role=switch]):not([type=radio]):checked:hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
313
|
-
cursor: pointer;
|
|
314
|
-
}
|
|
315
|
-
.db-radio:has(input:not([data-custom-validity]):required:invalid) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]) {
|
|
316
|
-
cursor: var(--db-overwrite-cursor, pointer);
|
|
317
|
-
background-color: var(--db-successful-bg-inverted-contrast-high-pressed);
|
|
318
|
-
}
|
|
319
|
-
.db-radio:has(input:not([data-custom-validity]):required:invalid) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-radio:has(input:not([data-custom-validity]):required:invalid) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input) {
|
|
320
|
-
cursor: initial;
|
|
321
|
-
}
|
|
322
|
-
.db-radio:has(input:not([data-custom-validity]):required:invalid) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-radio:has(input:not([data-custom-validity]):required:invalid) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
323
|
-
cursor: pointer;
|
|
324
|
-
}
|
|
325
|
-
.db-radio:has(input:not([data-custom-validity]):required:invalid):has(input:not([role=switch])):is(label),
|
|
326
|
-
.db-radio:has(input:not([data-custom-validity]):required:invalid):has(input:not([role=switch])) > label {
|
|
327
|
-
color: var(--db-critical-on-bg-basic-emphasis-80-default);
|
|
328
|
-
}
|
|
329
|
-
.db-radio:has(input[data-custom-validity=invalid]) .db-infotext[data-semantic=critical], .db-radio[data-custom-validity=invalid] .db-infotext[data-semantic=critical] {
|
|
330
|
-
display: flex;
|
|
331
|
-
}
|
|
332
|
-
.db-radio:has(input[data-custom-validity=invalid]) .db-infotext:not([data-semantic]), .db-radio[data-custom-validity=invalid] .db-infotext:not([data-semantic]) {
|
|
333
|
-
display: none;
|
|
334
|
-
}
|
|
335
|
-
.db-radio:has(input[data-custom-validity=invalid]) input:not([role=switch]), .db-radio[data-custom-validity=invalid] input:not([role=switch]) {
|
|
336
|
-
--db-adaptive-bg-basic-transparent-semi: var(
|
|
337
|
-
--db-critical-bg-basic-transparent-semi-default
|
|
267
|
+
--db-adaptive-on-bg-basic-emphasis-100-default: var(
|
|
268
|
+
--db-critical-on-bg-basic-emphasis-80-default
|
|
269
|
+
);
|
|
270
|
+
--db-adaptive-on-bg-basic-emphasis-100-hovered: var(
|
|
271
|
+
--db-critical-on-bg-basic-emphasis-80-hovered
|
|
272
|
+
);
|
|
273
|
+
--db-adaptive-on-bg-basic-emphasis-100-pressed: var(
|
|
274
|
+
--db-critical-on-bg-basic-emphasis-80-pressed
|
|
275
|
+
);
|
|
276
|
+
--db-adaptive-bg-basic-transparent-default: var(
|
|
277
|
+
--db-critical-bg-basic-transparent-default
|
|
338
278
|
);
|
|
339
279
|
--db-adaptive-bg-basic-transparent-hovered: var(
|
|
340
280
|
--db-critical-bg-basic-transparent-hovered
|
|
@@ -343,129 +283,30 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
343
283
|
--db-critical-bg-basic-transparent-pressed
|
|
344
284
|
);
|
|
345
285
|
}
|
|
346
|
-
.db-radio:has(input[data-custom-validity=invalid])
|
|
286
|
+
.db-radio:has(input[data-custom-validity=invalid]), .db-radio[data-custom-validity=invalid] {
|
|
347
287
|
--db-check-element-border-color: var(
|
|
348
288
|
--db-critical-on-bg-basic-emphasis-70-default
|
|
349
289
|
);
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
}
|
|
369
|
-
.db-radio:has(input[data-custom-validity=invalid]) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]), .db-radio[data-custom-validity=invalid] input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]) {
|
|
370
|
-
cursor: var(--db-overwrite-cursor, pointer);
|
|
371
|
-
background-color: var(--db-successful-bg-inverted-contrast-high-pressed);
|
|
372
|
-
}
|
|
373
|
-
.db-radio:has(input[data-custom-validity=invalid]) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-radio:has(input[data-custom-validity=invalid]) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input), .db-radio[data-custom-validity=invalid] input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-radio[data-custom-validity=invalid] input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input) {
|
|
374
|
-
cursor: initial;
|
|
375
|
-
}
|
|
376
|
-
.db-radio:has(input[data-custom-validity=invalid]) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-radio:has(input[data-custom-validity=invalid]) input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)), .db-radio[data-custom-validity=invalid] input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-radio[data-custom-validity=invalid] input:not([role=switch]):not([type=radio]):checked:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
377
|
-
cursor: pointer;
|
|
378
|
-
}
|
|
379
|
-
.db-radio:has(input[data-custom-validity=invalid]):has(input:not([role=switch])):is(label),
|
|
380
|
-
.db-radio:has(input[data-custom-validity=invalid]):has(input:not([role=switch])) > label, .db-radio[data-custom-validity=invalid]:has(input:not([role=switch])):is(label),
|
|
381
|
-
.db-radio[data-custom-validity=invalid]:has(input:not([role=switch])) > label {
|
|
382
|
-
color: var(--db-critical-on-bg-basic-emphasis-80-default);
|
|
383
|
-
}
|
|
384
|
-
.db-radio:has(input:disabled) {
|
|
385
|
-
opacity: 0.4;
|
|
386
|
-
}
|
|
387
|
-
.db-radio:is(label),
|
|
388
|
-
.db-radio > label {
|
|
389
|
-
display: flex;
|
|
390
|
-
align-items: flex-start;
|
|
391
|
-
position: relative;
|
|
392
|
-
gap: var(--db-spacing-fixed-xs);
|
|
393
|
-
}
|
|
394
|
-
.db-radio:is(label):not(:has(input:disabled)),
|
|
395
|
-
.db-radio > label:not(:has(input:disabled)) {
|
|
396
|
-
/* stylelint-disable-next-line a11y/selector-pseudo-class-focus */
|
|
397
|
-
}
|
|
398
|
-
.db-radio:is(label):not(:has(input:disabled)):hover:not(:disabled, [aria-disabled=true]),
|
|
399
|
-
.db-radio > label:not(:has(input:disabled)):hover:not(:disabled, [aria-disabled=true]) {
|
|
400
|
-
cursor: var(--db-overwrite-cursor, pointer);
|
|
401
|
-
}
|
|
402
|
-
.db-radio:is(label):not(:has(input:disabled)):hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-radio:is(label):not(:has(input:disabled)):hover:not(:disabled, [aria-disabled=true]):is(input),
|
|
403
|
-
.db-radio > label:not(:has(input:disabled)):hover:not(:disabled, [aria-disabled=true]):is(textarea),
|
|
404
|
-
.db-radio > label:not(:has(input:disabled)):hover:not(:disabled, [aria-disabled=true]):is(input) {
|
|
405
|
-
cursor: initial;
|
|
406
|
-
}
|
|
407
|
-
.db-radio:is(label):not(:has(input:disabled)):hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-radio:is(label):not(:has(input:disabled)):hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)),
|
|
408
|
-
.db-radio > label:not(:has(input:disabled)):hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]),
|
|
409
|
-
.db-radio > label:not(:has(input:disabled)):hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
410
|
-
cursor: pointer;
|
|
411
|
-
}
|
|
412
|
-
.db-radio:is(label):not(:has(input:disabled)):active:not(:disabled, [aria-disabled=true]),
|
|
413
|
-
.db-radio > label:not(:has(input:disabled)):active:not(:disabled, [aria-disabled=true]) {
|
|
414
|
-
cursor: var(--db-overwrite-cursor, pointer);
|
|
415
|
-
}
|
|
416
|
-
.db-radio:is(label):not(:has(input:disabled)):active:not(:disabled, [aria-disabled=true]):is(textarea), .db-radio:is(label):not(:has(input:disabled)):active:not(:disabled, [aria-disabled=true]):is(input),
|
|
417
|
-
.db-radio > label:not(:has(input:disabled)):active:not(:disabled, [aria-disabled=true]):is(textarea),
|
|
418
|
-
.db-radio > label:not(:has(input:disabled)):active:not(:disabled, [aria-disabled=true]):is(input) {
|
|
419
|
-
cursor: initial;
|
|
420
|
-
}
|
|
421
|
-
.db-radio:is(label):not(:has(input:disabled)):active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-radio:is(label):not(:has(input:disabled)):active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)),
|
|
422
|
-
.db-radio > label:not(:has(input:disabled)):active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]),
|
|
423
|
-
.db-radio > label:not(:has(input:disabled)):active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
424
|
-
cursor: pointer;
|
|
425
|
-
}
|
|
426
|
-
.db-radio input {
|
|
427
|
-
background-color: var(--db-adaptive-bg-basic-transparent-full-default);
|
|
428
|
-
place-content: center center;
|
|
429
|
-
appearance: none;
|
|
430
|
-
aspect-ratio: 1;
|
|
431
|
-
/* stylelint-disable-next-line db-ux/use-border-width */
|
|
432
|
-
border: min(var(--db-border-width-2xs), 2px) solid var(--db-check-element-border-color, var(--db-adaptive-on-bg-basic-emphasis-100-default));
|
|
433
|
-
block-size: var(--db-icon-font-size);
|
|
434
|
-
inline-size: var(--db-icon-font-size);
|
|
435
|
-
padding: 0;
|
|
436
|
-
/* stylelint-disable-next-line a11y/selector-pseudo-class-focus */
|
|
437
|
-
}
|
|
438
|
-
.db-radio input:hover:not(:disabled, [aria-disabled=true]) {
|
|
439
|
-
cursor: var(--db-overwrite-cursor, pointer);
|
|
440
|
-
background-color: var(--db-adaptive-bg-basic-transparent-hovered);
|
|
441
|
-
}
|
|
442
|
-
.db-radio input:hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-radio input:hover:not(:disabled, [aria-disabled=true]):is(input) {
|
|
443
|
-
cursor: initial;
|
|
444
|
-
}
|
|
445
|
-
.db-radio input:hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-radio input:hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
446
|
-
cursor: pointer;
|
|
447
|
-
}
|
|
448
|
-
.db-radio input:active:not(:disabled, [aria-disabled=true]) {
|
|
449
|
-
cursor: var(--db-overwrite-cursor, pointer);
|
|
450
|
-
background-color: var(--db-adaptive-bg-basic-transparent-pressed);
|
|
451
|
-
}
|
|
452
|
-
.db-radio input:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-radio input:active:not(:disabled, [aria-disabled=true]):is(input) {
|
|
453
|
-
cursor: initial;
|
|
454
|
-
}
|
|
455
|
-
.db-radio input:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-radio input:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
456
|
-
cursor: pointer;
|
|
457
|
-
}
|
|
458
|
-
.db-radio[data-size=small] input {
|
|
459
|
-
margin-inline-end: var(--db-spacing-fixed-2xs);
|
|
460
|
-
}
|
|
461
|
-
.db-radio[data-hide-label=true] {
|
|
462
|
-
font-size: 0;
|
|
463
|
-
}
|
|
464
|
-
.db-radio[data-hide-label=true] input {
|
|
465
|
-
margin-inline-end: 0;
|
|
290
|
+
--db-adaptive-on-bg-basic-emphasis-100-default: var(
|
|
291
|
+
--db-critical-on-bg-basic-emphasis-80-default
|
|
292
|
+
);
|
|
293
|
+
--db-adaptive-on-bg-basic-emphasis-100-hovered: var(
|
|
294
|
+
--db-critical-on-bg-basic-emphasis-80-hovered
|
|
295
|
+
);
|
|
296
|
+
--db-adaptive-on-bg-basic-emphasis-100-pressed: var(
|
|
297
|
+
--db-critical-on-bg-basic-emphasis-80-pressed
|
|
298
|
+
);
|
|
299
|
+
--db-adaptive-bg-basic-transparent-default: var(
|
|
300
|
+
--db-critical-bg-basic-transparent-default
|
|
301
|
+
);
|
|
302
|
+
--db-adaptive-bg-basic-transparent-hovered: var(
|
|
303
|
+
--db-critical-bg-basic-transparent-hovered
|
|
304
|
+
);
|
|
305
|
+
--db-adaptive-bg-basic-transparent-pressed: var(
|
|
306
|
+
--db-critical-bg-basic-transparent-pressed
|
|
307
|
+
);
|
|
466
308
|
}
|
|
467
309
|
.db-radio input {
|
|
468
|
-
border-color: currentcolor;
|
|
469
310
|
border-radius: var(--db-border-radius-full);
|
|
470
311
|
}
|
|
471
312
|
@media screen and (prefers-reduced-motion: no-preference) {
|
|
@@ -473,9 +314,6 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
473
314
|
transition: border-width var(--db-transition-duration-fast) var(--db-transition-timing-functional);
|
|
474
315
|
}
|
|
475
316
|
}
|
|
476
|
-
.db-radio input:checked:not(:disabled):is(:hover, :focus) {
|
|
477
|
-
background-color: var(--db-adaptive-bg-basic-transparent-full-default);
|
|
478
|
-
}
|
|
479
317
|
.db-radio input:checked:not([data-size=small]) {
|
|
480
318
|
border-width: calc((var(--db-icon-font-size) - var(--db-sizing-2xs)) / 2);
|
|
481
319
|
}
|
|
@@ -1,12 +1,49 @@
|
|
|
1
1
|
@use "@db-ux/core-foundations/build/styles/variables";
|
|
2
2
|
@use "@db-ux/core-foundations/build/styles/colors";
|
|
3
|
+
@use "@db-ux/core-foundations/build/styles/helpers";
|
|
3
4
|
@use "../../styles/internal/form-components";
|
|
4
5
|
|
|
6
|
+
@mixin get-radio-validity-colors($variant: "successful") {
|
|
7
|
+
--db-check-element-border-color: var(
|
|
8
|
+
--db-#{$variant}-on-bg-basic-emphasis-70-default
|
|
9
|
+
);
|
|
10
|
+
--db-adaptive-on-bg-basic-emphasis-100-default: var(
|
|
11
|
+
--db-#{$variant}-on-bg-basic-emphasis-80-default
|
|
12
|
+
);
|
|
13
|
+
--db-adaptive-on-bg-basic-emphasis-100-hovered: var(
|
|
14
|
+
--db-#{$variant}-on-bg-basic-emphasis-80-hovered
|
|
15
|
+
);
|
|
16
|
+
--db-adaptive-on-bg-basic-emphasis-100-pressed: var(
|
|
17
|
+
--db-#{$variant}-on-bg-basic-emphasis-80-pressed
|
|
18
|
+
);
|
|
19
|
+
--db-adaptive-bg-basic-transparent-default: var(
|
|
20
|
+
--db-#{$variant}-bg-basic-transparent-default
|
|
21
|
+
);
|
|
22
|
+
--db-adaptive-bg-basic-transparent-hovered: var(
|
|
23
|
+
--db-#{$variant}-bg-basic-transparent-hovered
|
|
24
|
+
);
|
|
25
|
+
--db-adaptive-bg-basic-transparent-pressed: var(
|
|
26
|
+
--db-#{$variant}-bg-basic-transparent-pressed
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
5
30
|
.db-radio {
|
|
6
|
-
@include form-components.set-default-check-element(
|
|
31
|
+
@include form-components.set-default-check-element();
|
|
32
|
+
|
|
33
|
+
&:not(:has(input:checked, input:disabled)) {
|
|
34
|
+
@include form-components.get-state();
|
|
35
|
+
@include form-components.get-state("active");
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@include form-components.get-validity(radio) {
|
|
39
|
+
@include get-radio-validity-colors();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@include form-components.get-validity(radio, "invalid") {
|
|
43
|
+
@include get-radio-validity-colors("critical");
|
|
44
|
+
}
|
|
7
45
|
|
|
8
46
|
input {
|
|
9
|
-
border-color: currentcolor;
|
|
10
47
|
border-radius: variables.$db-border-radius-full;
|
|
11
48
|
|
|
12
49
|
@media screen and (prefers-reduced-motion: no-preference) {
|
|
@@ -15,11 +52,6 @@
|
|
|
15
52
|
}
|
|
16
53
|
|
|
17
54
|
&:checked {
|
|
18
|
-
// The radio element still has the default background for the dot on :hover when in checked state
|
|
19
|
-
&:not(:disabled):is(:hover, :focus) {
|
|
20
|
-
background-color: colors.$db-adaptive-bg-basic-transparent-full-default;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
55
|
&:not([data-size="small"]) {
|
|
24
56
|
border-width: calc(
|
|
25
57
|
(
|
|
@@ -800,6 +800,7 @@ select[aria-disabled=true]) {
|
|
|
800
800
|
inset-block-start: calc((var(--db-spacing-fixed-xs) + var(--db-base-body-icon-font-size-xs)) * var(--db-label-visible-above, 1) + var(--db-sizing-md) / 2);
|
|
801
801
|
color: var(--db-adaptive-on-bg-basic-emphasis-100-default);
|
|
802
802
|
transform: translateY(-50%);
|
|
803
|
+
z-index: 1;
|
|
803
804
|
}
|
|
804
805
|
.db-select::before {
|
|
805
806
|
margin-inline-end: var(--db-spacing-fixed-sm);
|