@db-ux/core-components 2.1.2 → 2.2.1
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/checkbox/checkbox.css +1 -1
- package/build/components/custom-select/custom-select.css +9 -34
- package/build/components/custom-select/custom-select.scss +0 -48
- package/build/components/input/input.css +9 -0
- package/build/components/navigation/navigation.css +0 -7
- package/build/components/navigation/navigation.scss +0 -10
- package/build/components/popover/popover.css +95 -47
- package/build/components/popover/popover.scss +1 -0
- package/build/components/radio/radio.css +1 -1
- package/build/components/select/select.css +9 -0
- package/build/components/switch/switch.css +1 -1
- package/build/components/tab-list/tab-list.css +6 -0
- package/build/components/textarea/textarea.css +22 -4
- package/build/components/textarea/textarea.scss +16 -9
- package/build/components/tooltip/tooltip.css +102 -55
- package/build/components/tooltip/tooltip.scss +13 -13
- package/build/styles/absolute.css +7 -7
- package/build/styles/index.css +7 -7
- package/build/styles/internal/_form-components.scss +12 -1
- package/build/styles/internal/_popover-component.scss +129 -92
- package/build/styles/internal/_scrollbar.scss +9 -0
- package/build/styles/relative.css +7 -7
- package/build/styles/rollup.css +7 -7
- package/build/styles/webpack.css +7 -7
- package/package.json +3 -3
|
@@ -363,6 +363,17 @@ $input-valid-types:
|
|
|
363
363
|
background-color: colors.$db-adaptive-bg-basic-transparent-hovered;
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
+
&:is(input, textarea) {
|
|
367
|
+
/* see https://developer.mozilla.org/en-US/docs/Web/CSS/field-sizing */
|
|
368
|
+
&[data-field-sizing="content"] {
|
|
369
|
+
field-sizing: content;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
&[data-field-sizing="fixed"] {
|
|
373
|
+
field-sizing: fixed;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
366
377
|
&:is(input, textarea):not(:disabled):read-only {
|
|
367
378
|
background-color: var(
|
|
368
379
|
--db-textarea-read-only,
|
|
@@ -492,7 +503,6 @@ $input-valid-types:
|
|
|
492
503
|
display: flex;
|
|
493
504
|
align-items: flex-start;
|
|
494
505
|
position: relative;
|
|
495
|
-
gap: variables.$db-spacing-fixed-xs;
|
|
496
506
|
color: var(
|
|
497
507
|
--db-check-element-label-color,
|
|
498
508
|
#{colors.$db-adaptive-on-bg-basic-emphasis-100-default}
|
|
@@ -513,6 +523,7 @@ $input-valid-types:
|
|
|
513
523
|
block-size: $font-size-height;
|
|
514
524
|
inline-size: $font-size-height;
|
|
515
525
|
padding: 0;
|
|
526
|
+
margin-inline-end: var(--db-spacing-fixed-xs);
|
|
516
527
|
}
|
|
517
528
|
|
|
518
529
|
&[data-size="small"] {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use "@db-ux/core-foundations/build/styles/variables";
|
|
2
2
|
@use "@db-ux/core-foundations/build/styles/colors";
|
|
3
3
|
@use "@db-ux/core-foundations/build/styles/animation";
|
|
4
|
+
@use "@db-ux/core-foundations/build/styles/screen-sizes";
|
|
4
5
|
@use "component";
|
|
5
6
|
|
|
6
7
|
$popover-gap-size: var(--db-popover-distance);
|
|
@@ -8,29 +9,20 @@ $popover-inset: calc(100% + #{$popover-gap-size} * var(--db-popover-gap, 0));
|
|
|
8
9
|
$popover-gap-inset: calc(-1 * #{$popover-gap-size});
|
|
9
10
|
|
|
10
11
|
%popover-center {
|
|
11
|
-
&:not([data-placement]),
|
|
12
|
-
&[data-placement="bottom"]:not([data-
|
|
13
|
-
&[data-placement="top"]:not([data-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
[data-placement$="end"],
|
|
17
|
-
[data-placement$="start"]
|
|
18
|
-
) {
|
|
12
|
+
&:not([data-placement], [data-corrected-placement]),
|
|
13
|
+
&[data-placement="bottom"]:not([data-corrected-placement]),
|
|
14
|
+
&[data-placement="top"]:not([data-corrected-placement]),
|
|
15
|
+
&[data-corrected-placement="bottom"],
|
|
16
|
+
&[data-corrected-placement="top"] {
|
|
19
17
|
--db-popover-center-x: -50%;
|
|
20
18
|
|
|
21
19
|
inset-inline-start: 50%;
|
|
22
20
|
}
|
|
23
21
|
|
|
24
|
-
&[data-placement="left"]
|
|
25
|
-
&[data-placement="right"]
|
|
26
|
-
&[data-
|
|
27
|
-
|
|
28
|
-
[data-placement$="start"]
|
|
29
|
-
),
|
|
30
|
-
&[data-outside-vx="right"]:not(
|
|
31
|
-
[data-placement$="end"],
|
|
32
|
-
[data-placement$="start"]
|
|
33
|
-
) {
|
|
22
|
+
&[data-corrected-placement="left"],
|
|
23
|
+
&[data-corrected-placement="right"],
|
|
24
|
+
&[data-placement="left"]:not([data-corrected-placement]),
|
|
25
|
+
&[data-placement="right"]:not([data-corrected-placement]) {
|
|
34
26
|
--db-popover-center-y: -50%;
|
|
35
27
|
|
|
36
28
|
inset-block-start: 50%;
|
|
@@ -46,6 +38,43 @@ $popover-gap-inset: calc(-1 * #{$popover-gap-size});
|
|
|
46
38
|
position: absolute;
|
|
47
39
|
}
|
|
48
40
|
|
|
41
|
+
&:not([data-placement], [data-corrected-placement]),
|
|
42
|
+
&[data-placement^="bottom"]:not([data-corrected-placement]),
|
|
43
|
+
&[data-corrected-placement^="bottom"] {
|
|
44
|
+
&::before {
|
|
45
|
+
inset-block-end: 100%;
|
|
46
|
+
inset-inline: 0;
|
|
47
|
+
block-size: var(--db-popover-distance);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&[data-placement^="top"]:not([data-corrected-placement]),
|
|
52
|
+
&[data-corrected-placement^="top"] {
|
|
53
|
+
&::before {
|
|
54
|
+
inset-block-start: 100%;
|
|
55
|
+
inset-inline: 0;
|
|
56
|
+
block-size: var(--db-popover-distance);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&[data-placement^="right"]:not([data-corrected-placement]),
|
|
61
|
+
&[data-corrected-placement^="right"] {
|
|
62
|
+
&::before {
|
|
63
|
+
inset-inline-end: 100%;
|
|
64
|
+
inset-block: 0;
|
|
65
|
+
inline-size: var(--db-popover-distance);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&[data-placement^="left"]:not([data-corrected-placement]),
|
|
70
|
+
&[data-corrected-placement^="left"] {
|
|
71
|
+
&::before {
|
|
72
|
+
inset-inline-start: 100%;
|
|
73
|
+
inset-block: 0;
|
|
74
|
+
inline-size: var(--db-popover-distance);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
49
78
|
&[data-gap="true"] {
|
|
50
79
|
--db-popover-gap: 1;
|
|
51
80
|
--db-popover-distance: #{variables.$db-spacing-fixed-md};
|
|
@@ -55,78 +84,73 @@ $popover-gap-inset: calc(-1 * #{$popover-gap-size});
|
|
|
55
84
|
--db-popover-distance: #{variables.$db-spacing-fixed-sm};
|
|
56
85
|
}
|
|
57
86
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
87
|
+
/* This is for pure html css without using JS */
|
|
88
|
+
&:not([data-corrected-placement]) {
|
|
89
|
+
&[data-placement^="bottom"],
|
|
90
|
+
&[data-placement^="top"] {
|
|
91
|
+
&[data-placement$="end"] {
|
|
92
|
+
inset-inline-end: 0;
|
|
93
|
+
}
|
|
65
94
|
|
|
66
|
-
|
|
67
|
-
|
|
95
|
+
&[data-placement$="start"] {
|
|
96
|
+
inset-inline-start: 0;
|
|
97
|
+
}
|
|
68
98
|
}
|
|
69
|
-
}
|
|
70
99
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
inset-block-end: 0;
|
|
77
|
-
}
|
|
100
|
+
&[data-placement^="left"],
|
|
101
|
+
&[data-placement^="right"] {
|
|
102
|
+
&[data-placement$="end"] {
|
|
103
|
+
inset-block-end: 0;
|
|
104
|
+
}
|
|
78
105
|
|
|
79
|
-
|
|
80
|
-
|
|
106
|
+
&[data-placement$="start"] {
|
|
107
|
+
inset-block-start: 0;
|
|
108
|
+
}
|
|
81
109
|
}
|
|
82
|
-
}
|
|
83
110
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
inset-block-start: $popover-inset;
|
|
111
|
+
&:not([data-placement]),
|
|
112
|
+
&[data-placement^="bottom"] {
|
|
113
|
+
inset-block-start: $popover-inset;
|
|
88
114
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
115
|
+
&::before {
|
|
116
|
+
inset-inline-start: 0;
|
|
117
|
+
inline-size: 100%;
|
|
118
|
+
block-size: $popover-gap-size;
|
|
119
|
+
inset-block-start: $popover-gap-inset;
|
|
120
|
+
}
|
|
94
121
|
}
|
|
95
|
-
}
|
|
96
122
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
inset-block-end: $popover-inset;
|
|
123
|
+
&[data-placement^="top"] {
|
|
124
|
+
inset-block-end: $popover-inset;
|
|
100
125
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
126
|
+
&::before {
|
|
127
|
+
inset-inline-end: 0;
|
|
128
|
+
inline-size: 100%;
|
|
129
|
+
block-size: $popover-gap-size;
|
|
130
|
+
inset-block-end: $popover-gap-inset;
|
|
131
|
+
}
|
|
106
132
|
}
|
|
107
|
-
}
|
|
108
133
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
inset-inline-end: $popover-inset;
|
|
134
|
+
&[data-placement^="left"] {
|
|
135
|
+
inset-inline-end: $popover-inset;
|
|
112
136
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
137
|
+
&::before {
|
|
138
|
+
inset-block-end: 0;
|
|
139
|
+
block-size: 100%;
|
|
140
|
+
inline-size: $popover-gap-size;
|
|
141
|
+
inset-inline-end: $popover-gap-inset;
|
|
142
|
+
}
|
|
118
143
|
}
|
|
119
|
-
}
|
|
120
144
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
inset-inline-start: $popover-inset;
|
|
145
|
+
&[data-placement^="right"] {
|
|
146
|
+
inset-inline-start: $popover-inset;
|
|
124
147
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
148
|
+
&::before {
|
|
149
|
+
inset-block-start: 0;
|
|
150
|
+
block-size: 100%;
|
|
151
|
+
inline-size: $popover-gap-size;
|
|
152
|
+
inset-inline-start: $popover-gap-inset;
|
|
153
|
+
}
|
|
130
154
|
}
|
|
131
155
|
}
|
|
132
156
|
}
|
|
@@ -151,47 +175,58 @@ $popover-gap-inset: calc(-1 * #{$popover-gap-size});
|
|
|
151
175
|
}
|
|
152
176
|
|
|
153
177
|
&[data-delay="fast"] {
|
|
154
|
-
animation-delay:
|
|
155
|
-
|
|
156
|
-
|
|
178
|
+
animation-delay: variables.$db-transition-duration-medium;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@include screen-sizes.screen-min-max(
|
|
182
|
+
(
|
|
183
|
+
max: "md"
|
|
184
|
+
)
|
|
185
|
+
) {
|
|
186
|
+
// If we are in mobile and have no delay set we force some delay to avoid layout shift
|
|
187
|
+
&:not([data-delay]) {
|
|
188
|
+
animation-delay: variables.$db-transition-duration-medium;
|
|
189
|
+
}
|
|
157
190
|
}
|
|
158
191
|
}
|
|
159
192
|
}
|
|
160
193
|
}
|
|
161
194
|
|
|
162
195
|
%show-popover {
|
|
163
|
-
|
|
196
|
+
visibility: var(--db-show-popover-visibility, visible);
|
|
164
197
|
|
|
165
|
-
&:not([data-placement], [data-
|
|
166
|
-
&[data-placement^="bottom"]:not([data-
|
|
167
|
-
&[data-
|
|
198
|
+
&:not([data-placement], [data-corrected-placement]),
|
|
199
|
+
&[data-placement^="bottom"]:not([data-corrected-placement]),
|
|
200
|
+
&[data-corrected-placement^="bottom"] {
|
|
168
201
|
--db-popover-translate-y: -25%;
|
|
169
202
|
|
|
170
203
|
@include get-popover-show();
|
|
171
204
|
}
|
|
172
205
|
|
|
173
|
-
&[data-placement^="top"]:not([data-
|
|
174
|
-
&[data-
|
|
206
|
+
&[data-placement^="top"]:not([data-corrected-placement]),
|
|
207
|
+
&[data-corrected-placement^="top"] {
|
|
175
208
|
--db-popover-translate-y: 25%;
|
|
176
209
|
|
|
177
210
|
@include get-popover-show();
|
|
178
211
|
}
|
|
179
212
|
|
|
180
|
-
&[data-placement^="right"]:not([data-
|
|
181
|
-
&[data-
|
|
213
|
+
&[data-placement^="right"]:not([data-corrected-placement]),
|
|
214
|
+
&[data-corrected-placement^="right"] {
|
|
182
215
|
--db-popover-translate-x: -25%;
|
|
183
216
|
|
|
184
217
|
@include get-popover-show();
|
|
185
218
|
}
|
|
186
219
|
|
|
187
|
-
&[data-placement^="left"]:not([data-
|
|
188
|
-
&[data-
|
|
220
|
+
&[data-placement^="left"]:not([data-corrected-placement]),
|
|
221
|
+
&[data-corrected-placement^="left"] {
|
|
189
222
|
--db-popover-translate-x: 25%;
|
|
190
223
|
|
|
191
224
|
@include get-popover-show();
|
|
192
225
|
}
|
|
193
226
|
}
|
|
194
227
|
|
|
228
|
+
$max-mobile-size: calc(100vw - 2 * #{variables.$db-spacing-fixed-md});
|
|
229
|
+
|
|
195
230
|
%default-popover {
|
|
196
231
|
@extend %default-card;
|
|
197
232
|
@extend %popover-placement;
|
|
@@ -199,15 +234,17 @@ $popover-gap-inset: calc(-1 * #{$popover-gap-size});
|
|
|
199
234
|
position: absolute;
|
|
200
235
|
background-color: colors.$db-adaptive-bg-basic-level-1-default;
|
|
201
236
|
box-shadow: variables.$db-elevation-md;
|
|
202
|
-
|
|
237
|
+
visibility: hidden;
|
|
203
238
|
z-index: 1337;
|
|
204
|
-
|
|
239
|
+
// revert this if popover is included in button
|
|
240
|
+
white-space: normal;
|
|
241
|
+
max-inline-size: $max-mobile-size;
|
|
242
|
+
block-size: fit-content;
|
|
243
|
+
inline-size: fit-content;
|
|
205
244
|
|
|
206
245
|
&[data-width="fixed"] {
|
|
207
246
|
inline-size: max-content;
|
|
208
|
-
max-inline-size: variables.$db-sizing-3xl;
|
|
209
|
-
// revert this if popover is included in button
|
|
210
|
-
white-space: normal;
|
|
247
|
+
max-inline-size: min(#{variables.$db-sizing-3xl}, #{$max-mobile-size});
|
|
211
248
|
text-align: initial;
|
|
212
249
|
}
|
|
213
250
|
}
|
|
@@ -7,6 +7,15 @@
|
|
|
7
7
|
$scrollbar-width: helpers.px-to-rem(8);
|
|
8
8
|
|
|
9
9
|
%scrollbar {
|
|
10
|
+
&[data-field-sizing="content"] {
|
|
11
|
+
&:is([data-hide-resizer="true"], [data-resize="none"]) {
|
|
12
|
+
@supports (field-sizing: content) {
|
|
13
|
+
/* We don't show a scrollbar if we use field-sizing: content and no resizer is available */
|
|
14
|
+
scrollbar-width: none;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
10
19
|
&::-webkit-scrollbar {
|
|
11
20
|
@extend %default-transition;
|
|
12
21
|
|