@db-ux/core-components 2.0.8 → 2.0.10-popover-d7e8b9a
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.css +4 -0
- package/build/components/accordion-item/accordion-item.css +30 -31
- package/build/components/accordion-item/accordion-item.scss +35 -39
- package/build/components/badge/badge.css +4 -0
- package/build/components/brand/brand.css +4 -0
- package/build/components/button/button.css +4 -0
- package/build/components/card/card.css +4 -0
- package/build/components/checkbox/checkbox.css +33 -12
- package/build/components/custom-select/custom-select.css +75 -134
- package/build/components/custom-select/custom-select.scss +0 -49
- package/build/components/custom-select-dropdown/custom-select-dropdown.css +4 -0
- package/build/components/custom-select-form-field/custom-select-form-field.css +4 -0
- package/build/components/custom-select-list/custom-select-list.css +4 -153
- package/build/components/custom-select-list/custom-select-list.scss +0 -3
- package/build/components/custom-select-list-item/custom-select-list-item.css +7 -21
- package/build/components/custom-select-list-item/custom-select-list-item.scss +5 -9
- package/build/components/divider/divider.css +4 -0
- package/build/components/drawer/drawer.css +4 -0
- package/build/components/header/header.css +4 -0
- package/build/components/icon/icon.css +4 -0
- package/build/components/infotext/infotext.css +4 -0
- package/build/components/input/input.css +75 -21
- package/build/components/link/link.css +4 -0
- package/build/components/navigation/navigation.css +4 -0
- package/build/components/navigation-item/navigation-item.css +4 -0
- package/build/components/notification/notification.css +4 -0
- package/build/components/popover/popover.css +83 -82
- package/build/components/popover/popover.scss +0 -1
- package/build/components/radio/radio.css +4 -0
- package/build/components/section/section.css +4 -0
- package/build/components/select/select.css +75 -21
- package/build/components/stack/stack-web-component.css +4 -0
- package/build/components/stack/stack.css +4 -0
- package/build/components/switch/switch.css +4 -0
- package/build/components/tab-item/tab-item.css +4 -0
- package/build/components/tab-list/tab-list.css +4 -0
- package/build/components/tabs/tabs.css +4 -0
- package/build/components/tag/tag.css +4 -0
- package/build/components/textarea/textarea.css +67 -19
- package/build/components/tooltip/tooltip.css +92 -90
- package/build/components/tooltip/tooltip.scss +14 -14
- package/build/styles/absolute.css +197 -13
- package/build/styles/dialog-init.css +1 -1
- package/build/styles/index.css +12 -12
- package/build/styles/internal/_form-components.scss +8 -3
- package/build/styles/internal/_popover-component.scss +69 -106
- package/build/styles/relative.css +197 -13
- package/build/styles/rollup.css +197 -13
- package/build/styles/visually-hidden.css +1 -1
- package/build/styles/webpack.css +197 -13
- package/package.json +2 -2
|
@@ -57,7 +57,8 @@ $db-min-inline-size: var(
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
%helper-message {
|
|
60
|
-
.db-infotext
|
|
60
|
+
> db-infotext > .db-infotext,
|
|
61
|
+
> .db-infotext {
|
|
61
62
|
margin-block-start: variables.$db-spacing-fixed-2xs;
|
|
62
63
|
|
|
63
64
|
&:is([data-semantic="successful"], [data-semantic="critical"]) {
|
|
@@ -156,7 +157,8 @@ $db-min-inline-size: var(
|
|
|
156
157
|
}
|
|
157
158
|
|
|
158
159
|
@mixin get-validity-message($key: "valid") {
|
|
159
|
-
.db-infotext
|
|
160
|
+
> db-infotext > .db-infotext,
|
|
161
|
+
> .db-infotext {
|
|
160
162
|
@if ($key == "valid") {
|
|
161
163
|
&[data-semantic="successful"] {
|
|
162
164
|
display: flex;
|
|
@@ -317,7 +319,10 @@ $input-valid-types:
|
|
|
317
319
|
@include set-required-label($selector);
|
|
318
320
|
|
|
319
321
|
@include get-validity($selector) {
|
|
320
|
-
&:has(
|
|
322
|
+
&:has(
|
|
323
|
+
> .db-infotext[data-semantic="successful"],
|
|
324
|
+
> db-infotext > .db-infotext[data-semantic="successful"]
|
|
325
|
+
) {
|
|
321
326
|
@include get-validity-color($selector, "valid");
|
|
322
327
|
}
|
|
323
328
|
}
|
|
@@ -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
|
}
|