@db-ux/core-components 3.0.5 → 3.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/accordion/accordion.scss +2 -2
- package/build/components/badge/badge.scss +0 -1
- package/build/components/button/button.scss +1 -2
- package/build/components/card/card.scss +1 -2
- package/build/components/checkbox/checkbox.scss +3 -5
- package/build/components/divider/divider.scss +1 -1
- package/build/components/drawer/drawer.scss +2 -1
- package/build/components/header/header.scss +1 -0
- package/build/components/icon/icon.scss +1 -1
- package/build/components/infotext/infotext.scss +2 -2
- package/build/components/link/link.scss +0 -1
- package/build/components/navigation-item/navigation-item.scss +7 -4
- package/build/components/notification/notification.scss +1 -2
- package/build/components/page/page.scss +2 -2
- package/build/components/popover/popover.scss +1 -2
- package/build/components/radio/radio.scss +3 -3
- package/build/components/section/section.scss +0 -2
- package/build/components/select/select.scss +1 -1
- package/build/components/switch/switch.scss +2 -5
- package/build/components/tab-item/tab-item.scss +1 -1
- package/build/components/tabs/tabs.scss +3 -3
- package/build/components/tag/tag.scss +4 -5
- package/build/components/textarea/textarea.scss +2 -4
- package/build/styles/absolute.scss +0 -1
- package/build/styles/dialog-init.scss +0 -1
- package/build/styles/internal/_component.scss +1 -3
- package/build/styles/internal/_db-puls.scss +2 -3
- package/build/styles/internal/_form-components.scss +15 -21
- package/build/styles/internal/_popover-component.scss +5 -4
- package/build/styles/internal/_select-components.scss +1 -1
- package/build/styles/internal/_stack-components.scss +2 -2
- package/build/styles/internal/_tag-components.scss +9 -9
- package/build/styles/rollup.scss +0 -1
- package/build/styles/webpack.scss +0 -1
- package/package.json +2 -2
|
@@ -21,7 +21,7 @@ The spacings are not part of the styling of the accordion items themselves.
|
|
|
21
21
|
|
|
22
22
|
&[data-variant="divider"],
|
|
23
23
|
&:not([data-variant]) {
|
|
24
|
-
@include accordion-subsequent-item-selector
|
|
24
|
+
@include accordion-subsequent-item-selector {
|
|
25
25
|
// One space each before and after the divider results in a double spacing
|
|
26
26
|
margin-block-start: calc(2 * #{variables.$db-spacing-fixed-sm});
|
|
27
27
|
|
|
@@ -35,7 +35,7 @@ The spacings are not part of the styling of the accordion items themselves.
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
&[data-variant="card"] {
|
|
38
|
-
@include accordion-subsequent-item-selector
|
|
38
|
+
@include accordion-subsequent-item-selector {
|
|
39
39
|
margin-block-start: variables.$db-spacing-fixed-sm;
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
@charset "utf-8";
|
|
2
|
-
|
|
3
2
|
@use "@db-ux/core-foundations/build/styles/fonts";
|
|
4
3
|
@use "@db-ux/core-foundations/build/styles/variables";
|
|
5
4
|
@use "@db-ux/core-foundations/build/styles/colors";
|
|
@@ -23,7 +22,7 @@
|
|
|
23
22
|
|
|
24
23
|
// Square icon only buttons
|
|
25
24
|
&[data-no-text="true"] {
|
|
26
|
-
@include icons.is-icon-text-replace
|
|
25
|
+
@include icons.is-icon-text-replace;
|
|
27
26
|
|
|
28
27
|
padding: 0;
|
|
29
28
|
inline-size: variables.$db-sizing-md;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
@mixin get-validity-color-check($key: "valid") {
|
|
28
28
|
$variant: successful;
|
|
29
29
|
|
|
30
|
-
@if
|
|
30
|
+
@if $key != "valid" {
|
|
31
31
|
$variant: critical;
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -76,11 +76,10 @@
|
|
|
76
76
|
|
|
77
77
|
.db-checkbox {
|
|
78
78
|
@extend %helper-message;
|
|
79
|
-
|
|
80
|
-
@include form-components.set-default-check-element();
|
|
79
|
+
@include form-components.set-default-check-element;
|
|
81
80
|
|
|
82
81
|
&:not(:has(input:disabled)) {
|
|
83
|
-
@include form-components.get-state
|
|
82
|
+
@include form-components.get-state;
|
|
84
83
|
@include form-components.get-state("active");
|
|
85
84
|
}
|
|
86
85
|
|
|
@@ -124,7 +123,6 @@
|
|
|
124
123
|
|
|
125
124
|
&:indeterminate {
|
|
126
125
|
@extend %center-icon;
|
|
127
|
-
|
|
128
126
|
@include icons.set-icon("minus");
|
|
129
127
|
}
|
|
130
128
|
|
|
@@ -102,6 +102,7 @@ $spacings: (
|
|
|
102
102
|
--db-drawer-content-padding-inline,
|
|
103
103
|
#{map.get($spacing, "inline")}
|
|
104
104
|
);
|
|
105
|
+
|
|
105
106
|
// TODO: Evaluate whether we need overflow: hidden and that for only specifically set y here.
|
|
106
107
|
overflow-y: auto;
|
|
107
108
|
overflow-block: auto;
|
|
@@ -110,7 +111,7 @@ $spacings: (
|
|
|
110
111
|
|
|
111
112
|
%spacing-drawer {
|
|
112
113
|
@each $name, $spacing in $spacings {
|
|
113
|
-
@if
|
|
114
|
+
@if $name == "medium" {
|
|
114
115
|
@include get-spacing($spacing);
|
|
115
116
|
}
|
|
116
117
|
|
|
@@ -81,8 +81,7 @@
|
|
|
81
81
|
--db-has-before: 0;
|
|
82
82
|
|
|
83
83
|
@extend %db-overwrite-font-size-md;
|
|
84
|
-
|
|
85
|
-
@include icon-passing.icon-passing();
|
|
84
|
+
@include icon-passing.icon-passing;
|
|
86
85
|
|
|
87
86
|
display: inline-flex;
|
|
88
87
|
position: relative;
|
|
@@ -118,7 +117,7 @@
|
|
|
118
117
|
|
|
119
118
|
.db-navigation-item-expand-button {
|
|
120
119
|
@include screen-sizes.screen("md", "max") {
|
|
121
|
-
@include sub-navi-handler-mobile
|
|
120
|
+
@include sub-navi-handler-mobile;
|
|
122
121
|
}
|
|
123
122
|
|
|
124
123
|
&:is(button),
|
|
@@ -171,6 +170,7 @@
|
|
|
171
170
|
inline-size: 100%;
|
|
172
171
|
position: fixed;
|
|
173
172
|
overflow: hidden auto;
|
|
173
|
+
|
|
174
174
|
// additional #{$db-spacing-fixed-3xs} for border
|
|
175
175
|
inset-block: calc(
|
|
176
176
|
#{component.$min-mobile-header-height} +
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
visibility: hidden;
|
|
195
195
|
|
|
196
196
|
@include screen-sizes.screen("md", "max") {
|
|
197
|
-
@include sub-navigation-mobile
|
|
197
|
+
@include sub-navigation-mobile;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
@include screen-sizes.screen("md") {
|
|
@@ -230,6 +230,7 @@
|
|
|
230
230
|
position: absolute;
|
|
231
231
|
inset-inline-start: 0;
|
|
232
232
|
inline-size: 100%;
|
|
233
|
+
|
|
233
234
|
// #{$db-spacing-fixed--3xs} for shadows
|
|
234
235
|
block-size: calc(
|
|
235
236
|
#{variables.$db-spacing-fixed-3xs} +
|
|
@@ -267,6 +268,7 @@
|
|
|
267
268
|
|
|
268
269
|
&::before {
|
|
269
270
|
inset-block: auto 0;
|
|
271
|
+
|
|
270
272
|
// inline-size: calc(var(--db-navigation-item-inline-size, 100%) - #{variables.$db-spacing-fixed-xs} - 2px);
|
|
271
273
|
transform: translateX(100%) scaleX(-1);
|
|
272
274
|
}
|
|
@@ -291,6 +293,7 @@
|
|
|
291
293
|
content: "";
|
|
292
294
|
position: absolute;
|
|
293
295
|
padding: variables.$db-spacing-fixed-xs;
|
|
296
|
+
|
|
294
297
|
// #{$db-spacing-fixed-3xs} for box shadow
|
|
295
298
|
inset-block-start: #{variables.$db-spacing-fixed-3xs};
|
|
296
299
|
inset-inline-end: calc(-1 * #{variables.$db-spacing-fixed-xs});
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
img {
|
|
124
124
|
--db-icon-margin-end: 0;
|
|
125
125
|
|
|
126
|
-
@include icons.to-filled-icon
|
|
126
|
+
@include icons.to-filled-icon;
|
|
127
127
|
|
|
128
128
|
grid-area: icon;
|
|
129
129
|
}
|
|
@@ -203,7 +203,6 @@
|
|
|
203
203
|
@each $name in colors.$variant-colors {
|
|
204
204
|
&[data-semantic="#{$name}"] {
|
|
205
205
|
@extend %db-#{$name}-variables;
|
|
206
|
-
|
|
207
206
|
@include icons.variant-icons($name);
|
|
208
207
|
|
|
209
208
|
&::before {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
&[data-variant="fixed"] {
|
|
32
|
-
@include header-footer-style
|
|
32
|
+
@include header-footer-style;
|
|
33
33
|
|
|
34
34
|
block-size: 100%;
|
|
35
35
|
min-block-size: 100%;
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
/* workaround for angular */
|
|
40
40
|
> :is(db-header, dbheader, dbfooter, db-footer) {
|
|
41
|
-
@include header-footer-style
|
|
41
|
+
@include header-footer-style;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
> .db-main {
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.db-radio {
|
|
31
|
-
@include form-components.set-default-check-element
|
|
31
|
+
@include form-components.set-default-check-element;
|
|
32
32
|
|
|
33
33
|
&:not(:has(input:checked, input:disabled)) {
|
|
34
|
-
@include form-components.get-state
|
|
34
|
+
@include form-components.get-state;
|
|
35
35
|
@include form-components.get-state("active");
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
@include form-components.get-validity(radio) {
|
|
39
|
-
@include get-radio-validity-colors
|
|
39
|
+
@include get-radio-validity-colors;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
@include form-components.get-validity(radio, "invalid") {
|
|
@@ -9,7 +9,6 @@ $small-section-padding-inline: max(
|
|
|
9
9
|
),
|
|
10
10
|
#{variables.$db-spacing-fixed-md}
|
|
11
11
|
);
|
|
12
|
-
|
|
13
12
|
$medium-section-padding-inline: max(
|
|
14
13
|
calc(
|
|
15
14
|
#{variables.$db-spacing-fixed-md} +
|
|
@@ -17,7 +16,6 @@ $medium-section-padding-inline: max(
|
|
|
17
16
|
),
|
|
18
17
|
#{variables.$db-spacing-fixed-md}
|
|
19
18
|
);
|
|
20
|
-
|
|
21
19
|
$large-section-padding-inline: max(
|
|
22
20
|
calc(
|
|
23
21
|
#{variables.$db-spacing-fixed-md} +
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
.db-select {
|
|
11
11
|
--db-form-component-padding-inline-end: #{select-components.$select-icon-padding};
|
|
12
12
|
--db-form-component-min-inline-size: #{variables.$db-sizing-xl};
|
|
13
|
+
|
|
13
14
|
// shared from form-components
|
|
14
15
|
@extend %select-icon;
|
|
15
16
|
@extend %select-placeholder;
|
|
16
|
-
|
|
17
17
|
@include form-components.set-default-form-component(select);
|
|
18
18
|
|
|
19
19
|
// increased inline size for elements with icons
|
|
@@ -8,13 +8,10 @@
|
|
|
8
8
|
// We need some fixed padding here to avoid layout shifts
|
|
9
9
|
/* stylelint-disable-next-line db-ux/use-spacings */
|
|
10
10
|
$switch-fixed-padding: helpers.px-to-rem(2);
|
|
11
|
-
|
|
12
11
|
$switch-inactive-thumb-size: calc(
|
|
13
12
|
#{form-components.$font-size-height} - #{$switch-fixed-padding} * 2
|
|
14
13
|
);
|
|
15
|
-
|
|
16
14
|
$switch-active-thumb-size: calc(#{form-components.$font-size-height});
|
|
17
|
-
|
|
18
15
|
$checked-active-transition-size: calc(
|
|
19
16
|
#{form-components.$font-size-height} - #{$switch-fixed-padding} * 2
|
|
20
17
|
);
|
|
@@ -38,10 +35,10 @@ $checked-active-transition-size: calc(
|
|
|
38
35
|
.db-switch {
|
|
39
36
|
user-select: none;
|
|
40
37
|
|
|
41
|
-
@include form-components.set-default-check-element
|
|
38
|
+
@include form-components.set-default-check-element;
|
|
42
39
|
|
|
43
40
|
&:not(:has(input:disabled)) {
|
|
44
|
-
@include form-components.get-state
|
|
41
|
+
@include form-components.get-state;
|
|
45
42
|
|
|
46
43
|
@include form-components.get-state("active") {
|
|
47
44
|
@extend %active-transition;
|
|
@@ -338,20 +338,20 @@ $max-tabs: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
|
338
338
|
* Scroll left / right buttons
|
|
339
339
|
*/
|
|
340
340
|
.tabs-scroll-left {
|
|
341
|
-
@include angular-button-workaround
|
|
341
|
+
@include angular-button-workaround {
|
|
342
342
|
inset-inline-start: 0;
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
|
|
346
346
|
.tabs-scroll-right {
|
|
347
|
-
@include angular-button-workaround
|
|
347
|
+
@include angular-button-workaround {
|
|
348
348
|
inset-inline-end: 0;
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
.tabs-scroll-left,
|
|
353
353
|
.tabs-scroll-right {
|
|
354
|
-
@include angular-button-workaround
|
|
354
|
+
@include angular-button-workaround {
|
|
355
355
|
position: absolute;
|
|
356
356
|
z-index: $db-tabs-z-index-button;
|
|
357
357
|
inset-block: variables.$db-spacing-fixed-xs;
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
&[data-no-text="true"] {
|
|
15
15
|
--icon-margin-after: 0;
|
|
16
16
|
|
|
17
|
-
@include icons.is-icon-text-replace
|
|
17
|
+
@include icons.is-icon-text-replace;
|
|
18
18
|
|
|
19
19
|
padding: 0;
|
|
20
20
|
gap: 0;
|
|
21
21
|
|
|
22
22
|
label {
|
|
23
|
-
@include icons.is-icon-text-replace
|
|
23
|
+
@include icons.is-icon-text-replace;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -64,15 +64,14 @@
|
|
|
64
64
|
&:not(:has(#{tag-components.$interactive-selectors})),
|
|
65
65
|
&:has(.db-tab-remove-button) {
|
|
66
66
|
@extend %component-border;
|
|
67
|
-
|
|
68
|
-
@include tag-components.get-tag-colors();
|
|
67
|
+
@include tag-components.get-tag-colors;
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
&:has(#{tag-components.$interactive-selectors}) {
|
|
72
71
|
--db-icon-margin-end: #{variables.$db-spacing-fixed-2xs};
|
|
73
72
|
|
|
74
73
|
@include icon-passing.icon-passing(variables.$db-spacing-fixed-2xs);
|
|
75
|
-
@include tag-components.get-tag-colors-interactive
|
|
74
|
+
@include tag-components.get-tag-colors-interactive;
|
|
76
75
|
}
|
|
77
76
|
|
|
78
77
|
button:nth-of-type(2),
|
|
@@ -63,16 +63,14 @@
|
|
|
63
63
|
&:has(textarea:is(:focus-within, :not(:placeholder-shown))) {
|
|
64
64
|
&::before {
|
|
65
65
|
@extend %default-transition;
|
|
66
|
-
|
|
67
|
-
@include get-scrolling-workaround();
|
|
66
|
+
@include get-scrolling-workaround;
|
|
68
67
|
|
|
69
68
|
background-color: colors.$db-adaptive-bg-basic-level-1-default;
|
|
70
69
|
}
|
|
71
70
|
|
|
72
71
|
&::after {
|
|
73
72
|
@extend %form-component-border;
|
|
74
|
-
|
|
75
|
-
@include get-scrolling-workaround();
|
|
73
|
+
@include get-scrolling-workaround;
|
|
76
74
|
|
|
77
75
|
background-color: colors.$db-adaptive-bg-basic-transparent-semi-default;
|
|
78
76
|
z-index: 1;
|
|
@@ -5,7 +5,6 @@ $backdrop-color-strong: color(
|
|
|
5
5
|
from #{colors.$db-adaptive-on-bg-basic-emphasis-100-default} srgb r g b /
|
|
6
6
|
#{variables.$db-opacity-lg}
|
|
7
7
|
);
|
|
8
|
-
|
|
9
8
|
$backdrop-color-weak: color(
|
|
10
9
|
from #{colors.$db-adaptive-on-bg-basic-emphasis-100-default} srgb r g b /
|
|
11
10
|
#{variables.$db-opacity-sm}
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
$min-mobile-header-height: calc(
|
|
7
7
|
#{variables.$db-sizing-md} + 2 * #{variables.$db-spacing-fixed-xs}
|
|
8
8
|
);
|
|
9
|
-
|
|
10
9
|
$component-border: variables.$db-border-width-3xs solid
|
|
11
10
|
colors.$db-adaptive-on-bg-basic-emphasis-60-default;
|
|
12
11
|
|
|
@@ -52,7 +51,6 @@ $responsive-spacings: (
|
|
|
52
51
|
"small": variables.$db-spacing-responsive-sm,
|
|
53
52
|
"none": 0
|
|
54
53
|
);
|
|
55
|
-
|
|
56
54
|
$default-spacings: (
|
|
57
55
|
"default": variables.$db-spacing-fixed-sm,
|
|
58
56
|
"large": variables.$db-spacing-fixed-lg,
|
|
@@ -63,7 +61,7 @@ $default-spacings: (
|
|
|
63
61
|
|
|
64
62
|
@mixin get-data-spacing($type: padding, $spacings: $default-spacings) {
|
|
65
63
|
@each $name, $spacing in $spacings {
|
|
66
|
-
@if
|
|
64
|
+
@if $name == "default" {
|
|
67
65
|
&:not([data-spacing]) {
|
|
68
66
|
#{$type}: $spacing;
|
|
69
67
|
}
|
|
@@ -7,22 +7,19 @@
|
|
|
7
7
|
@use "@db-ux/core-foundations/build/styles/colors";
|
|
8
8
|
@use "@db-ux/core-foundations/build/styles/helpers";
|
|
9
9
|
@use "component";
|
|
10
|
-
|
|
11
10
|
@forward "../visually-hidden";
|
|
12
11
|
|
|
13
12
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/:read-only
|
|
14
13
|
$valid-read-only-form-fields: input, textarea;
|
|
14
|
+
|
|
15
15
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/field-sizing
|
|
16
16
|
$valid-field-sizing-form-fields: input, textarea;
|
|
17
|
-
|
|
18
17
|
$dropdown-icon-transition: transform variables.$db-transition-straight-emotional;
|
|
19
18
|
$dropdown-icon-transform: rotate(-180deg);
|
|
20
|
-
|
|
21
19
|
$font-size-height: var(--db-icon-font-size);
|
|
22
20
|
$icon-size-sm: var(--db-base-body-icon-font-size-sm);
|
|
23
21
|
$label-size-height-xs: var(--db-base-body-icon-font-size-xs);
|
|
24
22
|
$label-size-height-2xs: var(--db-base-body-icon-font-size-2xs);
|
|
25
|
-
|
|
26
23
|
$floating-label-size-calc: calc(
|
|
27
24
|
#{variables.$db-spacing-fixed-3xs} + #{variables.$db-spacing-fixed-2xs} +
|
|
28
25
|
#{$label-size-height-2xs}
|
|
@@ -32,19 +29,15 @@ $floating-label-size-calc: calc(
|
|
|
32
29
|
$floating-label-padding-block-start: calc(
|
|
33
30
|
var(--db-type-body-font-size-2xs) + #{variables.$db-spacing-fixed-3xs}
|
|
34
31
|
);
|
|
35
|
-
|
|
36
32
|
$icon-inline-block-start: calc(
|
|
37
33
|
(#{variables.$db-spacing-fixed-xs} + #{$label-size-height-xs}) *
|
|
38
34
|
var(--db-label-visible-above, 1) + #{variables.$db-sizing-md} / 2
|
|
39
35
|
);
|
|
40
|
-
|
|
41
36
|
$input-types:
|
|
42
37
|
"button", "checkbox", "color", "date", "datetime-local", "email", "file",
|
|
43
38
|
"hidden", "image", "month", "number", "password", "radio", "range", "reset",
|
|
44
39
|
"search", "submit", "tel", "text", "time", "url", "week";
|
|
45
|
-
|
|
46
40
|
$check-border-size: min(#{variables.$db-border-width-2xs}, 2px);
|
|
47
|
-
|
|
48
41
|
$db-min-inline-size: var(
|
|
49
42
|
--db-form-component-min-inline-size,
|
|
50
43
|
#{variables.$db-sizing-lg}
|
|
@@ -119,7 +112,7 @@ $db-min-inline-size: var(
|
|
|
119
112
|
#{$selector} {
|
|
120
113
|
@extend %db-overwrite-font-size-sm;
|
|
121
114
|
|
|
122
|
-
@if
|
|
115
|
+
@if $selector == textarea {
|
|
123
116
|
padding-block-start: $floating-label-size-calc;
|
|
124
117
|
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
125
118
|
} @else {
|
|
@@ -148,7 +141,7 @@ $db-min-inline-size: var(
|
|
|
148
141
|
font-family: var(--db-font-family-sans);
|
|
149
142
|
font-style: italic;
|
|
150
143
|
|
|
151
|
-
@if
|
|
144
|
+
@if $selector == select or $selector == summary {
|
|
152
145
|
/* stylelint-disable-next-line db-ux/use-spacings */
|
|
153
146
|
padding-block-start: var(--db-base-body-icon-font-size-2xs);
|
|
154
147
|
}
|
|
@@ -165,7 +158,7 @@ $db-min-inline-size: var(
|
|
|
165
158
|
@mixin get-validity-message($key: "valid") {
|
|
166
159
|
> db-infotext > .db-infotext,
|
|
167
160
|
> .db-infotext {
|
|
168
|
-
@if
|
|
161
|
+
@if $key == "valid" {
|
|
169
162
|
&[data-semantic="successful"] {
|
|
170
163
|
display: flex;
|
|
171
164
|
}
|
|
@@ -185,11 +178,11 @@ $db-min-inline-size: var(
|
|
|
185
178
|
@mixin get-validity-color($selector, $key: "valid") {
|
|
186
179
|
$variant: "successful";
|
|
187
180
|
|
|
188
|
-
@if
|
|
181
|
+
@if $key != "valid" {
|
|
189
182
|
$variant: "critical";
|
|
190
183
|
}
|
|
191
184
|
|
|
192
|
-
@if
|
|
185
|
+
@if $selector != textarea {
|
|
193
186
|
@extend %db-#{$variant}-variables;
|
|
194
187
|
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
195
188
|
} @else {
|
|
@@ -238,7 +231,7 @@ $input-valid-types:
|
|
|
238
231
|
@function get-validations($selector, $key) {
|
|
239
232
|
$validations: ":required";
|
|
240
233
|
|
|
241
|
-
@if
|
|
234
|
+
@if $selector == input {
|
|
242
235
|
/* We use all client side form-validation for input here */
|
|
243
236
|
// https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation#using_built-in_form_validation
|
|
244
237
|
$validations: ":required, [minlength], [maxlength], [pattern]";
|
|
@@ -247,7 +240,7 @@ $input-valid-types:
|
|
|
247
240
|
$validations: $validations + ", [type=#{$type}]";
|
|
248
241
|
}
|
|
249
242
|
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
250
|
-
} @else if
|
|
243
|
+
} @else if $selector == textarea {
|
|
251
244
|
/* We use all client side form-validation for textarea here */
|
|
252
245
|
$validations: ":required, [minlength], [maxlength]";
|
|
253
246
|
}
|
|
@@ -260,11 +253,11 @@ $input-valid-types:
|
|
|
260
253
|
@mixin get-validity($selector, $key: "valid") {
|
|
261
254
|
$user: "";
|
|
262
255
|
|
|
263
|
-
@if
|
|
256
|
+
@if $selector == check or $selector == switch {
|
|
264
257
|
$user: "user-";
|
|
265
258
|
}
|
|
266
259
|
|
|
267
|
-
@if
|
|
260
|
+
@if $selector == check or $selector == radio or $selector == switch {
|
|
268
261
|
$selector: input;
|
|
269
262
|
|
|
270
263
|
&:has(
|
|
@@ -274,7 +267,7 @@ $input-valid-types:
|
|
|
274
267
|
}
|
|
275
268
|
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
276
269
|
} @else {
|
|
277
|
-
@if
|
|
270
|
+
@if $selector == summary {
|
|
278
271
|
$selector: select;
|
|
279
272
|
}
|
|
280
273
|
|
|
@@ -316,6 +309,7 @@ $input-valid-types:
|
|
|
316
309
|
/* stylelint-disable-next-line scss/selector-no-redundant-nesting-selector */
|
|
317
310
|
& {
|
|
318
311
|
--db-form-has-before: 0;
|
|
312
|
+
|
|
319
313
|
// we use absolute icons
|
|
320
314
|
position: relative;
|
|
321
315
|
display: flex;
|
|
@@ -454,7 +448,7 @@ $input-valid-types:
|
|
|
454
448
|
inset-inline-end: variables.$db-spacing-fixed-sm;
|
|
455
449
|
}
|
|
456
450
|
|
|
457
|
-
@if
|
|
451
|
+
@if $selector == input or $selector == select or $selector == summary {
|
|
458
452
|
#{$selector} {
|
|
459
453
|
block-size: variables.$db-sizing-md;
|
|
460
454
|
text-overflow: ellipsis;
|
|
@@ -465,7 +459,7 @@ $input-valid-types:
|
|
|
465
459
|
@mixin get-validity-color-check-label-color($state, $key: "valid") {
|
|
466
460
|
$variant: successful;
|
|
467
461
|
|
|
468
|
-
@if
|
|
462
|
+
@if $key != "valid" {
|
|
469
463
|
$variant: critical;
|
|
470
464
|
}
|
|
471
465
|
|
|
@@ -482,7 +476,7 @@ $input-valid-types:
|
|
|
482
476
|
@mixin get-state($state: "hover") {
|
|
483
477
|
$variant: "hovered";
|
|
484
478
|
|
|
485
|
-
@if
|
|
479
|
+
@if $state != "hover" {
|
|
486
480
|
$variant: "pressed";
|
|
487
481
|
}
|
|
488
482
|
|
|
@@ -200,28 +200,28 @@ $popover-gap-inset: calc(-1 * #{$popover-gap-size});
|
|
|
200
200
|
&[data-corrected-placement^="bottom"] {
|
|
201
201
|
--db-popover-translate-y: -25%;
|
|
202
202
|
|
|
203
|
-
@include get-popover-show
|
|
203
|
+
@include get-popover-show;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
&[data-placement^="top"]:not([data-corrected-placement]),
|
|
207
207
|
&[data-corrected-placement^="top"] {
|
|
208
208
|
--db-popover-translate-y: 25%;
|
|
209
209
|
|
|
210
|
-
@include get-popover-show
|
|
210
|
+
@include get-popover-show;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
&[data-placement^="right"]:not([data-corrected-placement]),
|
|
214
214
|
&[data-corrected-placement^="right"] {
|
|
215
215
|
--db-popover-translate-x: -25%;
|
|
216
216
|
|
|
217
|
-
@include get-popover-show
|
|
217
|
+
@include get-popover-show;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
&[data-placement^="left"]:not([data-corrected-placement]),
|
|
221
221
|
&[data-corrected-placement^="left"] {
|
|
222
222
|
--db-popover-translate-x: 25%;
|
|
223
223
|
|
|
224
|
-
@include get-popover-show
|
|
224
|
+
@include get-popover-show;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
|
|
@@ -234,6 +234,7 @@ $popover-gap-inset: calc(-1 * #{$popover-gap-size});
|
|
|
234
234
|
box-shadow: variables.$db-elevation-md;
|
|
235
235
|
visibility: hidden;
|
|
236
236
|
z-index: 1337;
|
|
237
|
+
|
|
237
238
|
// revert this if popover is included in button
|
|
238
239
|
white-space: normal;
|
|
239
240
|
max-inline-size: min(
|
|
@@ -14,7 +14,6 @@ $has-before-padding: calc(
|
|
|
14
14
|
var(--db-form-has-before) *
|
|
15
15
|
(#{form-components.$icon-size-sm} + #{variables.$db-spacing-fixed-sm})
|
|
16
16
|
);
|
|
17
|
-
|
|
18
17
|
$select-icon-padding: calc(
|
|
19
18
|
#{form-components.$font-size-height} + #{variables.$db-spacing-fixed-sm} +
|
|
20
19
|
#{variables.$db-spacing-fixed-xs}
|
|
@@ -34,6 +33,7 @@ $select-icon-padding: calc(
|
|
|
34
33
|
|
|
35
34
|
position: absolute;
|
|
36
35
|
pointer-events: none;
|
|
36
|
+
|
|
37
37
|
// we use the top of the element, the size of the label+label-margin-bottom and the font-size of the select/2
|
|
38
38
|
// for functional we have some rounding issues for rem, so we need 1px less
|
|
39
39
|
transform: translateY(var(--label-block-start-half));
|
|
@@ -92,8 +92,8 @@ $stack-gaps: (
|
|
|
92
92
|
flex-wrap: wrap;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
@include get-stack-alignments
|
|
96
|
-
@include get-stack-justify-contents
|
|
95
|
+
@include get-stack-alignments;
|
|
96
|
+
@include get-stack-justify-contents;
|
|
97
97
|
|
|
98
98
|
@each $name, $gap in $stack-gaps {
|
|
99
99
|
&[data-gap="#{$name}"] {
|
|
@@ -31,7 +31,7 @@ $interactive-selectors: "label, button:not(.db-tab-remove-button), a";
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
%set-interactive-weak {
|
|
34
|
-
@include get-weak
|
|
34
|
+
@include get-weak;
|
|
35
35
|
|
|
36
36
|
@include helpers.hover {
|
|
37
37
|
background-color: colors.$db-adaptive-bg-basic-level-1-hovered;
|
|
@@ -50,19 +50,19 @@ $interactive-selectors: "label, button:not(.db-tab-remove-button), a";
|
|
|
50
50
|
&[data-semantic="adaptive"] {
|
|
51
51
|
&:not([data-emphasis]),
|
|
52
52
|
&[data-emphasis="weak"] {
|
|
53
|
-
@if
|
|
53
|
+
@if $htmlTag == "badge" {
|
|
54
54
|
$border-color: 70;
|
|
55
55
|
$background-color: 3;
|
|
56
56
|
|
|
57
57
|
@include get-weak("adaptive", $border-color, $background-color);
|
|
58
58
|
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
59
59
|
} @else {
|
|
60
|
-
@include get-weak
|
|
60
|
+
@include get-weak;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
&[data-emphasis="strong"] {
|
|
65
|
-
@include get-strong
|
|
65
|
+
@include get-strong;
|
|
66
66
|
|
|
67
67
|
.db-tab-remove-button {
|
|
68
68
|
@extend %set-interactive-strong;
|
|
@@ -95,7 +95,7 @@ $interactive-selectors: "label, button:not(.db-tab-remove-button), a";
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
%set-interactive-strong {
|
|
98
|
-
@include get-strong
|
|
98
|
+
@include get-strong;
|
|
99
99
|
|
|
100
100
|
@include helpers.hover {
|
|
101
101
|
background-color: colors.$db-adaptive-bg-vibrant-hovered;
|
|
@@ -133,7 +133,7 @@ $interactive-selectors: "label, button:not(.db-tab-remove-button), a";
|
|
|
133
133
|
&:not([data-emphasis]),
|
|
134
134
|
&[data-emphasis="weak"] {
|
|
135
135
|
// buttons and links
|
|
136
|
-
@include get-interactive-selectors
|
|
136
|
+
@include get-interactive-selectors {
|
|
137
137
|
@extend %set-interactive-weak;
|
|
138
138
|
}
|
|
139
139
|
|
|
@@ -149,7 +149,7 @@ $interactive-selectors: "label, button:not(.db-tab-remove-button), a";
|
|
|
149
149
|
label:has(input[type="radio"]:checked) {
|
|
150
150
|
&,
|
|
151
151
|
&:is(:hover, :focus, :active) {
|
|
152
|
-
@include get-strong
|
|
152
|
+
@include get-strong;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
}
|
|
@@ -158,7 +158,7 @@ $interactive-selectors: "label, button:not(.db-tab-remove-button), a";
|
|
|
158
158
|
@extend %set-interactive-strong;
|
|
159
159
|
|
|
160
160
|
// buttons and links
|
|
161
|
-
@include get-interactive-selectors
|
|
161
|
+
@include get-interactive-selectors {
|
|
162
162
|
@extend %set-interactive-strong;
|
|
163
163
|
}
|
|
164
164
|
|
|
@@ -167,7 +167,7 @@ $interactive-selectors: "label, button:not(.db-tab-remove-button), a";
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
label:has(input[type="radio"]:checked) {
|
|
170
|
-
@include get-strong
|
|
170
|
+
@include get-strong;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
&:has(input):not(:has(input:checked)) {
|
package/build/styles/rollup.scss
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@db-ux/core-components",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"repository": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"start": "nodemon --watch src --watch scripts --watch scripts --ext js,tsx,ts,scss,json --exec \"npm run build\""
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@db-ux/core-foundations": "3.0.
|
|
45
|
+
"@db-ux/core-foundations": "3.0.7"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@builder.io/eslint-plugin-mitosis": "0.0.17",
|