@db-ux/core-components 2.1.2 → 2.2.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/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 +79 -82
- package/build/components/popover/popover.scss +0 -1
- package/build/components/select/select.css +9 -0
- 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 +87 -89
- package/build/components/tooltip/tooltip.scss +13 -13
- package/build/styles/absolute.css +5 -5
- package/build/styles/index.css +5 -5
- package/build/styles/internal/_form-components.scss +11 -0
- package/build/styles/internal/_popover-component.scss +69 -106
- package/build/styles/internal/_scrollbar.scss +9 -0
- package/build/styles/relative.css +5 -5
- package/build/styles/rollup.css +5 -5
- package/build/styles/webpack.css +5 -5
- 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,
|
|
@@ -1,36 +1,24 @@
|
|
|
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
|
-
$popover-gap-size: var(--db-popover-distance);
|
|
7
|
-
$popover-inset: calc(100% + #{$popover-gap-size} * var(--db-popover-gap, 0));
|
|
8
|
-
$popover-gap-inset: calc(-1 * #{$popover-gap-size});
|
|
9
|
-
|
|
10
7
|
%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
|
-
) {
|
|
8
|
+
&:not([data-placement], [data-corrected-placement]),
|
|
9
|
+
&[data-placement="bottom"]:not([data-corrected-placement]),
|
|
10
|
+
&[data-placement="top"]:not([data-corrected-placement]),
|
|
11
|
+
&[data-corrected-placement="bottom"],
|
|
12
|
+
&[data-corrected-placement="top"] {
|
|
19
13
|
--db-popover-center-x: -50%;
|
|
20
14
|
|
|
21
15
|
inset-inline-start: 50%;
|
|
22
16
|
}
|
|
23
17
|
|
|
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
|
-
) {
|
|
18
|
+
&[data-corrected-placement="left"],
|
|
19
|
+
&[data-corrected-placement="right"],
|
|
20
|
+
&[data-placement="left"]:not([data-corrected-placement]),
|
|
21
|
+
&[data-placement="right"]:not([data-corrected-placement]) {
|
|
34
22
|
--db-popover-center-y: -50%;
|
|
35
23
|
|
|
36
24
|
inset-block-start: 50%;
|
|
@@ -46,88 +34,50 @@ $popover-gap-inset: calc(-1 * #{$popover-gap-size});
|
|
|
46
34
|
position: absolute;
|
|
47
35
|
}
|
|
48
36
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&[data-placement^="bottom"]:not([data-outside-vy]),
|
|
59
|
-
&[data-placement^="top"]:not([data-outside-vy]),
|
|
60
|
-
&[data-outside-vy="bottom"]:not([data-outside-vx]),
|
|
61
|
-
&[data-outside-vy="top"]:not([data-outside-vx]) {
|
|
62
|
-
&[data-placement$="end"] {
|
|
63
|
-
inset-inline-end: 0;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
&[data-placement$="start"] {
|
|
67
|
-
inset-inline-start: 0;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&[data-placement^="left"]:not([data-outside-vx]),
|
|
72
|
-
&[data-placement^="right"]:not([data-outside-vx]),
|
|
73
|
-
&[data-outside-vx="left"],
|
|
74
|
-
&[data-outside-vx="right"] {
|
|
75
|
-
&[data-placement$="end"] {
|
|
76
|
-
inset-block-end: 0;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&[data-placement$="start"] {
|
|
80
|
-
inset-block-start: 0;
|
|
37
|
+
&:not([data-placement], [data-corrected-placement]),
|
|
38
|
+
&[data-placement^="bottom"]:not([data-corrected-placement]),
|
|
39
|
+
&[data-corrected-placement^="bottom"] {
|
|
40
|
+
&::before {
|
|
41
|
+
inset-block-end: 100%;
|
|
42
|
+
inset-inline: 0;
|
|
43
|
+
block-size: var(--db-popover-distance);
|
|
81
44
|
}
|
|
82
45
|
}
|
|
83
46
|
|
|
84
|
-
|
|
85
|
-
&[data-placement^="
|
|
86
|
-
&[data-outside-vy="top"]:not([data-outside-vx]) {
|
|
87
|
-
inset-block-start: $popover-inset;
|
|
88
|
-
|
|
47
|
+
&[data-placement^="top"]:not([data-corrected-placement]),
|
|
48
|
+
&[data-corrected-placement^="top"] {
|
|
89
49
|
&::before {
|
|
90
|
-
inset-
|
|
91
|
-
inline
|
|
92
|
-
block-size:
|
|
93
|
-
inset-block-start: $popover-gap-inset;
|
|
50
|
+
inset-block-start: 100%;
|
|
51
|
+
inset-inline: 0;
|
|
52
|
+
block-size: var(--db-popover-distance);
|
|
94
53
|
}
|
|
95
54
|
}
|
|
96
55
|
|
|
97
|
-
&[data-placement^="
|
|
98
|
-
&[data-
|
|
99
|
-
inset-block-end: $popover-inset;
|
|
100
|
-
|
|
56
|
+
&[data-placement^="right"]:not([data-corrected-placement]),
|
|
57
|
+
&[data-corrected-placement^="right"] {
|
|
101
58
|
&::before {
|
|
102
|
-
inset-inline-end:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
inset-block-end: $popover-gap-inset;
|
|
59
|
+
inset-inline-end: 100%;
|
|
60
|
+
inset-block: 0;
|
|
61
|
+
inline-size: var(--db-popover-distance);
|
|
106
62
|
}
|
|
107
63
|
}
|
|
108
64
|
|
|
109
|
-
&[data-placement^="left"]:not([data-
|
|
110
|
-
&[data-
|
|
111
|
-
inset-inline-end: $popover-inset;
|
|
112
|
-
|
|
65
|
+
&[data-placement^="left"]:not([data-corrected-placement]),
|
|
66
|
+
&[data-corrected-placement^="left"] {
|
|
113
67
|
&::before {
|
|
114
|
-
inset-
|
|
115
|
-
block
|
|
116
|
-
inline-size:
|
|
117
|
-
inset-inline-end: $popover-gap-inset;
|
|
68
|
+
inset-inline-start: 100%;
|
|
69
|
+
inset-block: 0;
|
|
70
|
+
inline-size: var(--db-popover-distance);
|
|
118
71
|
}
|
|
119
72
|
}
|
|
120
73
|
|
|
121
|
-
&[data-
|
|
122
|
-
|
|
123
|
-
|
|
74
|
+
&[data-gap="true"] {
|
|
75
|
+
--db-popover-gap: 1;
|
|
76
|
+
--db-popover-distance: #{variables.$db-spacing-fixed-md};
|
|
77
|
+
}
|
|
124
78
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
block-size: 100%;
|
|
128
|
-
inline-size: $popover-gap-size;
|
|
129
|
-
inset-inline-start: $popover-gap-inset;
|
|
130
|
-
}
|
|
79
|
+
&:is(.db-tooltip) {
|
|
80
|
+
--db-popover-distance: #{variables.$db-spacing-fixed-sm};
|
|
131
81
|
}
|
|
132
82
|
}
|
|
133
83
|
|
|
@@ -151,47 +101,58 @@ $popover-gap-inset: calc(-1 * #{$popover-gap-size});
|
|
|
151
101
|
}
|
|
152
102
|
|
|
153
103
|
&[data-delay="fast"] {
|
|
154
|
-
animation-delay:
|
|
155
|
-
|
|
156
|
-
|
|
104
|
+
animation-delay: variables.$db-transition-duration-medium;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@include screen-sizes.screen-min-max(
|
|
108
|
+
(
|
|
109
|
+
max: "md"
|
|
110
|
+
)
|
|
111
|
+
) {
|
|
112
|
+
// If we are in mobile and have no delay set we force some delay to avoid layout shift
|
|
113
|
+
&:not([data-delay]) {
|
|
114
|
+
animation-delay: variables.$db-transition-duration-medium;
|
|
115
|
+
}
|
|
157
116
|
}
|
|
158
117
|
}
|
|
159
118
|
}
|
|
160
119
|
}
|
|
161
120
|
|
|
162
121
|
%show-popover {
|
|
163
|
-
|
|
122
|
+
visibility: var(--db-show-popover-visibility, visible);
|
|
164
123
|
|
|
165
|
-
&:not([data-placement], [data-
|
|
166
|
-
&[data-placement^="bottom"]:not([data-
|
|
167
|
-
&[data-
|
|
124
|
+
&:not([data-placement], [data-corrected-placement]),
|
|
125
|
+
&[data-placement^="bottom"]:not([data-corrected-placement]),
|
|
126
|
+
&[data-corrected-placement^="bottom"] {
|
|
168
127
|
--db-popover-translate-y: -25%;
|
|
169
128
|
|
|
170
129
|
@include get-popover-show();
|
|
171
130
|
}
|
|
172
131
|
|
|
173
|
-
&[data-placement^="top"]:not([data-
|
|
174
|
-
&[data-
|
|
132
|
+
&[data-placement^="top"]:not([data-corrected-placement]),
|
|
133
|
+
&[data-corrected-placement^="top"] {
|
|
175
134
|
--db-popover-translate-y: 25%;
|
|
176
135
|
|
|
177
136
|
@include get-popover-show();
|
|
178
137
|
}
|
|
179
138
|
|
|
180
|
-
&[data-placement^="right"]:not([data-
|
|
181
|
-
&[data-
|
|
139
|
+
&[data-placement^="right"]:not([data-corrected-placement]),
|
|
140
|
+
&[data-corrected-placement^="right"] {
|
|
182
141
|
--db-popover-translate-x: -25%;
|
|
183
142
|
|
|
184
143
|
@include get-popover-show();
|
|
185
144
|
}
|
|
186
145
|
|
|
187
|
-
&[data-placement^="left"]:not([data-
|
|
188
|
-
&[data-
|
|
146
|
+
&[data-placement^="left"]:not([data-corrected-placement]),
|
|
147
|
+
&[data-corrected-placement^="left"] {
|
|
189
148
|
--db-popover-translate-x: 25%;
|
|
190
149
|
|
|
191
150
|
@include get-popover-show();
|
|
192
151
|
}
|
|
193
152
|
}
|
|
194
153
|
|
|
154
|
+
$max-mobile-size: calc(100vw - 2 * #{variables.$db-spacing-fixed-md});
|
|
155
|
+
|
|
195
156
|
%default-popover {
|
|
196
157
|
@extend %default-card;
|
|
197
158
|
@extend %popover-placement;
|
|
@@ -199,15 +160,17 @@ $popover-gap-inset: calc(-1 * #{$popover-gap-size});
|
|
|
199
160
|
position: absolute;
|
|
200
161
|
background-color: colors.$db-adaptive-bg-basic-level-1-default;
|
|
201
162
|
box-shadow: variables.$db-elevation-md;
|
|
202
|
-
|
|
163
|
+
visibility: hidden;
|
|
203
164
|
z-index: 1337;
|
|
204
|
-
|
|
165
|
+
// revert this if popover is included in button
|
|
166
|
+
white-space: normal;
|
|
167
|
+
max-inline-size: $max-mobile-size;
|
|
168
|
+
block-size: fit-content;
|
|
169
|
+
inline-size: fit-content;
|
|
205
170
|
|
|
206
171
|
&[data-width="fixed"] {
|
|
207
172
|
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;
|
|
173
|
+
max-inline-size: min(#{variables.$db-sizing-3xl}, #{$max-mobile-size});
|
|
211
174
|
text-align: initial;
|
|
212
175
|
}
|
|
213
176
|
}
|
|
@@ -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
|
|