@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
|
@@ -408,6 +408,7 @@ $input-valid-types:
|
|
|
408
408
|
inset-block-start: $icon-inline-block-start;
|
|
409
409
|
color: colors.$db-adaptive-on-bg-basic-emphasis-100-default;
|
|
410
410
|
transform: translateY(-50%);
|
|
411
|
+
z-index: 1;
|
|
411
412
|
}
|
|
412
413
|
|
|
413
414
|
&::before {
|
|
@@ -428,73 +429,55 @@ $input-valid-types:
|
|
|
428
429
|
}
|
|
429
430
|
}
|
|
430
431
|
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
@mixin get-validity-color-check($key: "valid") {
|
|
432
|
+
@mixin get-validity-color-check-label-color($state, $key: "valid") {
|
|
434
433
|
$variant: successful;
|
|
435
434
|
|
|
436
435
|
@if ($key != "valid") {
|
|
437
436
|
$variant: critical;
|
|
438
437
|
}
|
|
439
438
|
|
|
440
|
-
|
|
439
|
+
&:has(input:not([role="switch"])) {
|
|
440
|
+
&:is(label),
|
|
441
|
+
> label {
|
|
442
|
+
color: var(--db-#{$variant}-on-bg-basic-emphasis-100-#{$state});
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
441
446
|
|
|
442
|
-
|
|
443
|
-
--db-adaptive-bg-basic-transparent-semi: var(
|
|
444
|
-
--db-#{$variant}-bg-basic-transparent-semi-default
|
|
445
|
-
);
|
|
446
|
-
--db-adaptive-bg-basic-transparent-hovered: var(
|
|
447
|
-
--db-#{$variant}-bg-basic-transparent-hovered
|
|
448
|
-
);
|
|
449
|
-
--db-adaptive-bg-basic-transparent-pressed: var(
|
|
450
|
-
--db-#{$variant}-bg-basic-transparent-pressed
|
|
451
|
-
);
|
|
447
|
+
// CHECKBOX & RADIO
|
|
452
448
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
--db-check-element-border-color: var(
|
|
456
|
-
--db-#{$variant}-on-bg-basic-emphasis-70-default
|
|
457
|
-
);
|
|
458
|
-
}
|
|
449
|
+
@mixin get-state($state: "hover") {
|
|
450
|
+
$variant: "hovered";
|
|
459
451
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
colors.$db-successful-bg-inverted-contrast-high-default,
|
|
463
|
-
colors.$db-successful-on-bg-inverted-default,
|
|
464
|
-
colors.$db-successful-bg-inverted-contrast-high-hovered,
|
|
465
|
-
colors.$db-successful-bg-inverted-contrast-high-pressed
|
|
466
|
-
);
|
|
467
|
-
}
|
|
452
|
+
@if ($state != "hover") {
|
|
453
|
+
$variant: "pressed";
|
|
468
454
|
}
|
|
469
455
|
|
|
470
|
-
&:has(input:
|
|
456
|
+
&:has(input:#{$state}, > label:#{$state}, :is(label):#{$state}) {
|
|
457
|
+
--db-check-element-label-color: var(
|
|
458
|
+
--db-adaptive-on-bg-basic-emphasis-100-#{$variant}
|
|
459
|
+
);
|
|
460
|
+
|
|
471
461
|
&:is(label),
|
|
472
462
|
> label {
|
|
473
|
-
|
|
463
|
+
cursor: helpers.$cursor-pointer;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
input {
|
|
467
|
+
cursor: helpers.$cursor-pointer;
|
|
468
|
+
background-color: var(
|
|
469
|
+
--db-adaptive-bg-basic-transparent-#{$variant}
|
|
470
|
+
);
|
|
471
|
+
@content;
|
|
474
472
|
}
|
|
475
473
|
}
|
|
476
474
|
}
|
|
477
475
|
|
|
478
|
-
@mixin set-default-check-element(
|
|
476
|
+
@mixin set-default-check-element() {
|
|
479
477
|
@extend %db-overwrite-font-size-md;
|
|
480
478
|
|
|
481
479
|
@include set-required-label(input);
|
|
482
480
|
|
|
483
|
-
@include get-validity($selector) {
|
|
484
|
-
@if ($selector == check) {
|
|
485
|
-
&:has(.db-infotext[data-semantic="successful"]) {
|
|
486
|
-
@include get-validity-color-check("valid");
|
|
487
|
-
}
|
|
488
|
-
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
489
|
-
} @else {
|
|
490
|
-
@include get-validity-color-check("valid");
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
@include get-validity($selector, "invalid") {
|
|
495
|
-
@include get-validity-color-check("invalid");
|
|
496
|
-
}
|
|
497
|
-
|
|
498
481
|
&:has(input:disabled) {
|
|
499
482
|
opacity: component.$default-disabled;
|
|
500
483
|
}
|
|
@@ -505,11 +488,10 @@ $input-valid-types:
|
|
|
505
488
|
align-items: flex-start;
|
|
506
489
|
position: relative;
|
|
507
490
|
gap: variables.$db-spacing-fixed-xs;
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
}
|
|
491
|
+
color: var(
|
|
492
|
+
--db-check-element-label-color,
|
|
493
|
+
#{colors.$db-adaptive-on-bg-basic-emphasis-100-default}
|
|
494
|
+
);
|
|
513
495
|
}
|
|
514
496
|
|
|
515
497
|
input {
|
|
@@ -526,14 +508,6 @@ $input-valid-types:
|
|
|
526
508
|
block-size: $font-size-height;
|
|
527
509
|
inline-size: $font-size-height;
|
|
528
510
|
padding: 0;
|
|
529
|
-
|
|
530
|
-
@include helpers.hover {
|
|
531
|
-
background-color: colors.$db-adaptive-bg-basic-transparent-hovered;
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
@include helpers.active {
|
|
535
|
-
background-color: colors.$db-adaptive-bg-basic-transparent-pressed;
|
|
536
|
-
}
|
|
537
511
|
}
|
|
538
512
|
|
|
539
513
|
&[data-size="small"] {
|
|
@@ -6,35 +6,29 @@
|
|
|
6
6
|
|
|
7
7
|
$interactive-selectors: "label, button:not(.db-tab-remove-button), a";
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
colors.$db-adaptive-bg-basic-level-1-default,
|
|
14
|
-
colors.$db-adaptive-on-bg-basic-emphasis-80-default
|
|
9
|
+
@mixin get-weak($name: "adaptive", $border-color: 60, $background-color: 1) {
|
|
10
|
+
// stylelint-disable-next-line db-ux/use-border-color
|
|
11
|
+
border-color: var(
|
|
12
|
+
--db-#{$name}-on-bg-basic-emphasis-#{$border-color}-default
|
|
15
13
|
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
%set-adaptive-weak-badge {
|
|
19
|
-
border-color: colors.$db-adaptive-on-bg-basic-emphasis-70-default;
|
|
20
14
|
|
|
21
15
|
@include colors.set-current-colors(
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
var(--db-#{$name}-bg-basic-level-#{$background-color}-default),
|
|
17
|
+
var(--db-#{$name}-on-bg-basic-emphasis-80-default)
|
|
24
18
|
);
|
|
25
19
|
}
|
|
26
20
|
|
|
27
|
-
|
|
28
|
-
border-color:
|
|
21
|
+
@mixin get-strong($name: "adaptive") {
|
|
22
|
+
border-color: var(--db-#{$name}-on-bg-basic-emphasis-70-default);
|
|
29
23
|
|
|
30
24
|
@include colors.set-current-colors(
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
var(--db-#{$name}-bg-vibrant-default),
|
|
26
|
+
var(--db-#{$name}-on-bg-vibrant-default)
|
|
33
27
|
);
|
|
34
28
|
}
|
|
35
29
|
|
|
36
30
|
%set-interactive-weak {
|
|
37
|
-
@
|
|
31
|
+
@include get-weak();
|
|
38
32
|
|
|
39
33
|
@include helpers.hover {
|
|
40
34
|
background-color: colors.$db-adaptive-bg-basic-level-1-hovered;
|
|
@@ -46,39 +40,42 @@ $interactive-selectors: "label, button:not(.db-tab-remove-button), a";
|
|
|
46
40
|
}
|
|
47
41
|
|
|
48
42
|
@mixin get-tag-colors($htmlTag: "tag") {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
43
|
+
$border-color: 60;
|
|
44
|
+
$background-color: 1;
|
|
45
|
+
|
|
46
|
+
&:not([data-semantic]),
|
|
47
|
+
&[data-semantic="adaptive"] {
|
|
48
|
+
&:not([data-emphasis]),
|
|
49
|
+
&[data-emphasis="weak"] {
|
|
50
|
+
@if ($htmlTag == "badge") {
|
|
51
|
+
$border-color: 70;
|
|
52
|
+
$background-color: 3;
|
|
53
|
+
|
|
54
|
+
@include get-weak("adaptive", $border-color, $background-color);
|
|
55
|
+
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
56
|
+
} @else {
|
|
57
|
+
@include get-weak();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
55
60
|
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
&[data-emphasis="strong"] {
|
|
62
|
+
@include get-strong();
|
|
58
63
|
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
.db-tab-remove-button {
|
|
65
|
+
@extend %set-interactive-strong;
|
|
66
|
+
}
|
|
61
67
|
}
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
@each $name in colors.$variant-colors {
|
|
65
71
|
&[data-semantic="#{$name}"] {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
var(--db-#{$name}-on-bg-basic-emphasis-80-default)
|
|
71
|
-
);
|
|
72
|
+
&:not([data-emphasis]),
|
|
73
|
+
&[data-emphasis="weak"] {
|
|
74
|
+
@include get-weak($name, $border-color, $background-color);
|
|
75
|
+
}
|
|
72
76
|
|
|
73
77
|
&[data-emphasis="strong"] {
|
|
74
|
-
|
|
75
|
-
--db-#{$name}-on-bg-basic-emphasis-70-default
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
@include colors.set-current-colors(
|
|
79
|
-
var(--db-#{$name}-bg-vibrant-default),
|
|
80
|
-
var(--db-#{$name}-on-bg-vibrant-default)
|
|
81
|
-
);
|
|
78
|
+
@include get-strong($name);
|
|
82
79
|
}
|
|
83
80
|
}
|
|
84
81
|
}
|
|
@@ -95,7 +92,7 @@ $interactive-selectors: "label, button:not(.db-tab-remove-button), a";
|
|
|
95
92
|
}
|
|
96
93
|
|
|
97
94
|
%set-interactive-strong {
|
|
98
|
-
@
|
|
95
|
+
@include get-strong();
|
|
99
96
|
|
|
100
97
|
@include helpers.hover {
|
|
101
98
|
background-color: colors.$db-adaptive-bg-vibrant-hovered;
|
|
@@ -149,7 +146,7 @@ $interactive-selectors: "label, button:not(.db-tab-remove-button), a";
|
|
|
149
146
|
label:has(input[type="radio"]:checked) {
|
|
150
147
|
&,
|
|
151
148
|
&:is(:hover, :focus, :active) {
|
|
152
|
-
@
|
|
149
|
+
@include get-strong();
|
|
153
150
|
}
|
|
154
151
|
}
|
|
155
152
|
}
|
|
@@ -167,7 +164,7 @@ $interactive-selectors: "label, button:not(.db-tab-remove-button), a";
|
|
|
167
164
|
}
|
|
168
165
|
|
|
169
166
|
label:has(input[type="radio"]:checked) {
|
|
170
|
-
@
|
|
167
|
+
@include get-strong();
|
|
171
168
|
}
|
|
172
169
|
|
|
173
170
|
&:has(input):not(:has(input:checked)) {
|