@db-ux/core-components 2.0.10-popover-d7e8b9a → 2.1.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/badge/badge.css +38 -13
- package/build/components/custom-select/custom-select.css +34 -0
- package/build/components/custom-select/custom-select.scss +48 -0
- package/build/components/custom-select-list-item/custom-select-list-item.css +3 -3
- package/build/components/drawer/drawer.css +12 -0
- package/build/components/drawer/drawer.scss +17 -0
- package/build/components/input/input.css +36 -17
- package/build/components/input/input.scss +31 -8
- package/build/components/popover/popover.css +82 -79
- package/build/components/popover/popover.scss +1 -0
- package/build/components/tab-item/tab-item.css +3 -3
- package/build/components/tag/tag.css +51 -17
- package/build/components/tag/tag.scss +6 -1
- package/build/components/tooltip/tooltip.css +89 -87
- package/build/components/tooltip/tooltip.scss +13 -13
- package/build/styles/absolute.css +30 -4
- package/build/styles/index.css +30 -4
- package/build/styles/internal/_component.scss +5 -2
- package/build/styles/internal/_popover-component.scss +106 -69
- package/build/styles/internal/_tag-components.scss +6 -3
- package/build/styles/relative.css +30 -4
- package/build/styles/rollup.css +30 -4
- package/build/styles/webpack.css +30 -4
- package/package.json +2 -2
|
@@ -142,7 +142,8 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
.db-badge:not([data-semantic])[data-emphasis=strong] .db-tab-remove-button, .db-badge[data-semantic=adaptive][data-emphasis=strong] .db-tab-remove-button {
|
|
145
|
-
border-color: var(--db-adaptive-on-bg-basic-emphasis-70-default);
|
|
145
|
+
--db-tag-border-color: var(--db-adaptive-on-bg-basic-emphasis-70-default);
|
|
146
|
+
border-color: var(--db-tag-border-color);
|
|
146
147
|
background-color: var(--db-adaptive-bg-vibrant-default);
|
|
147
148
|
color: var(--db-adaptive-on-bg-vibrant-default);
|
|
148
149
|
/* stylelint-disable-next-line a11y/selector-pseudo-class-focus */
|
|
@@ -205,7 +206,10 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
205
206
|
font-weight: 700;
|
|
206
207
|
}
|
|
207
208
|
.db-badge:not([data-semantic]):not([data-emphasis]), .db-badge:not([data-semantic])[data-emphasis=weak], .db-badge[data-semantic=adaptive]:not([data-emphasis]), .db-badge[data-semantic=adaptive][data-emphasis=weak] {
|
|
208
|
-
border-color: var(
|
|
209
|
+
--db-tag-border-color: var(
|
|
210
|
+
--db-adaptive-on-bg-basic-emphasis-70-default
|
|
211
|
+
);
|
|
212
|
+
border-color: var(--db-tag-border-color);
|
|
209
213
|
background-color: var(--db-adaptive-bg-basic-level-3-default);
|
|
210
214
|
color: var(--db-adaptive-on-bg-basic-emphasis-80-default);
|
|
211
215
|
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
@@ -214,7 +218,8 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
214
218
|
--db-icon-color: var(--db-adaptive-on-bg-basic-emphasis-80-default);
|
|
215
219
|
}
|
|
216
220
|
.db-badge:not([data-semantic])[data-emphasis=strong], .db-badge[data-semantic=adaptive][data-emphasis=strong] {
|
|
217
|
-
border-color: var(--db-adaptive-on-bg-basic-emphasis-70-default);
|
|
221
|
+
--db-tag-border-color: var(--db-adaptive-on-bg-basic-emphasis-70-default);
|
|
222
|
+
border-color: var(--db-tag-border-color);
|
|
218
223
|
background-color: var(--db-adaptive-bg-vibrant-default);
|
|
219
224
|
color: var(--db-adaptive-on-bg-vibrant-default);
|
|
220
225
|
}
|
|
@@ -222,7 +227,10 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
222
227
|
--db-icon-color: var(--db-adaptive-on-bg-vibrant-default);
|
|
223
228
|
}
|
|
224
229
|
.db-badge[data-semantic=neutral]:not([data-emphasis]), .db-badge[data-semantic=neutral][data-emphasis=weak] {
|
|
225
|
-
border-color: var(
|
|
230
|
+
--db-tag-border-color: var(
|
|
231
|
+
--db-neutral-on-bg-basic-emphasis-70-default
|
|
232
|
+
);
|
|
233
|
+
border-color: var(--db-tag-border-color);
|
|
226
234
|
background-color: var(--db-neutral-bg-basic-level-3-default);
|
|
227
235
|
color: var(--db-neutral-on-bg-basic-emphasis-80-default);
|
|
228
236
|
}
|
|
@@ -230,7 +238,8 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
230
238
|
--db-icon-color: var(--db-neutral-on-bg-basic-emphasis-80-default);
|
|
231
239
|
}
|
|
232
240
|
.db-badge[data-semantic=neutral][data-emphasis=strong] {
|
|
233
|
-
border-color: var(--db-neutral-on-bg-basic-emphasis-70-default);
|
|
241
|
+
--db-tag-border-color: var(--db-neutral-on-bg-basic-emphasis-70-default);
|
|
242
|
+
border-color: var(--db-tag-border-color);
|
|
234
243
|
background-color: var(--db-neutral-bg-vibrant-default);
|
|
235
244
|
color: var(--db-neutral-on-bg-vibrant-default);
|
|
236
245
|
}
|
|
@@ -238,7 +247,10 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
238
247
|
--db-icon-color: var(--db-neutral-on-bg-vibrant-default);
|
|
239
248
|
}
|
|
240
249
|
.db-badge[data-semantic=critical]:not([data-emphasis]), .db-badge[data-semantic=critical][data-emphasis=weak] {
|
|
241
|
-
border-color: var(
|
|
250
|
+
--db-tag-border-color: var(
|
|
251
|
+
--db-critical-on-bg-basic-emphasis-70-default
|
|
252
|
+
);
|
|
253
|
+
border-color: var(--db-tag-border-color);
|
|
242
254
|
background-color: var(--db-critical-bg-basic-level-3-default);
|
|
243
255
|
color: var(--db-critical-on-bg-basic-emphasis-80-default);
|
|
244
256
|
}
|
|
@@ -246,7 +258,8 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
246
258
|
--db-icon-color: var(--db-critical-on-bg-basic-emphasis-80-default);
|
|
247
259
|
}
|
|
248
260
|
.db-badge[data-semantic=critical][data-emphasis=strong] {
|
|
249
|
-
border-color: var(--db-critical-on-bg-basic-emphasis-70-default);
|
|
261
|
+
--db-tag-border-color: var(--db-critical-on-bg-basic-emphasis-70-default);
|
|
262
|
+
border-color: var(--db-tag-border-color);
|
|
250
263
|
background-color: var(--db-critical-bg-vibrant-default);
|
|
251
264
|
color: var(--db-critical-on-bg-vibrant-default);
|
|
252
265
|
}
|
|
@@ -254,7 +267,10 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
254
267
|
--db-icon-color: var(--db-critical-on-bg-vibrant-default);
|
|
255
268
|
}
|
|
256
269
|
.db-badge[data-semantic=successful]:not([data-emphasis]), .db-badge[data-semantic=successful][data-emphasis=weak] {
|
|
257
|
-
border-color: var(
|
|
270
|
+
--db-tag-border-color: var(
|
|
271
|
+
--db-successful-on-bg-basic-emphasis-70-default
|
|
272
|
+
);
|
|
273
|
+
border-color: var(--db-tag-border-color);
|
|
258
274
|
background-color: var(--db-successful-bg-basic-level-3-default);
|
|
259
275
|
color: var(--db-successful-on-bg-basic-emphasis-80-default);
|
|
260
276
|
}
|
|
@@ -262,7 +278,8 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
262
278
|
--db-icon-color: var(--db-successful-on-bg-basic-emphasis-80-default);
|
|
263
279
|
}
|
|
264
280
|
.db-badge[data-semantic=successful][data-emphasis=strong] {
|
|
265
|
-
border-color: var(--db-successful-on-bg-basic-emphasis-70-default);
|
|
281
|
+
--db-tag-border-color: var(--db-successful-on-bg-basic-emphasis-70-default);
|
|
282
|
+
border-color: var(--db-tag-border-color);
|
|
266
283
|
background-color: var(--db-successful-bg-vibrant-default);
|
|
267
284
|
color: var(--db-successful-on-bg-vibrant-default);
|
|
268
285
|
}
|
|
@@ -270,7 +287,10 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
270
287
|
--db-icon-color: var(--db-successful-on-bg-vibrant-default);
|
|
271
288
|
}
|
|
272
289
|
.db-badge[data-semantic=warning]:not([data-emphasis]), .db-badge[data-semantic=warning][data-emphasis=weak] {
|
|
273
|
-
border-color: var(
|
|
290
|
+
--db-tag-border-color: var(
|
|
291
|
+
--db-warning-on-bg-basic-emphasis-70-default
|
|
292
|
+
);
|
|
293
|
+
border-color: var(--db-tag-border-color);
|
|
274
294
|
background-color: var(--db-warning-bg-basic-level-3-default);
|
|
275
295
|
color: var(--db-warning-on-bg-basic-emphasis-80-default);
|
|
276
296
|
}
|
|
@@ -278,7 +298,8 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
278
298
|
--db-icon-color: var(--db-warning-on-bg-basic-emphasis-80-default);
|
|
279
299
|
}
|
|
280
300
|
.db-badge[data-semantic=warning][data-emphasis=strong] {
|
|
281
|
-
border-color: var(--db-warning-on-bg-basic-emphasis-70-default);
|
|
301
|
+
--db-tag-border-color: var(--db-warning-on-bg-basic-emphasis-70-default);
|
|
302
|
+
border-color: var(--db-tag-border-color);
|
|
282
303
|
background-color: var(--db-warning-bg-vibrant-default);
|
|
283
304
|
color: var(--db-warning-on-bg-vibrant-default);
|
|
284
305
|
}
|
|
@@ -286,7 +307,10 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
286
307
|
--db-icon-color: var(--db-warning-on-bg-vibrant-default);
|
|
287
308
|
}
|
|
288
309
|
.db-badge[data-semantic=informational]:not([data-emphasis]), .db-badge[data-semantic=informational][data-emphasis=weak] {
|
|
289
|
-
border-color: var(
|
|
310
|
+
--db-tag-border-color: var(
|
|
311
|
+
--db-informational-on-bg-basic-emphasis-70-default
|
|
312
|
+
);
|
|
313
|
+
border-color: var(--db-tag-border-color);
|
|
290
314
|
background-color: var(--db-informational-bg-basic-level-3-default);
|
|
291
315
|
color: var(--db-informational-on-bg-basic-emphasis-80-default);
|
|
292
316
|
}
|
|
@@ -294,7 +318,8 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
294
318
|
--db-icon-color: var(--db-informational-on-bg-basic-emphasis-80-default);
|
|
295
319
|
}
|
|
296
320
|
.db-badge[data-semantic=informational][data-emphasis=strong] {
|
|
297
|
-
border-color: var(--db-informational-on-bg-basic-emphasis-70-default);
|
|
321
|
+
--db-tag-border-color: var(--db-informational-on-bg-basic-emphasis-70-default);
|
|
322
|
+
border-color: var(--db-tag-border-color);
|
|
298
323
|
background-color: var(--db-informational-bg-vibrant-default);
|
|
299
324
|
color: var(--db-informational-on-bg-vibrant-default);
|
|
300
325
|
}
|
|
@@ -778,6 +778,40 @@ dialog:not([data-backdrop=none])[data-backdrop=weak]::backdrop, dialog:not([data
|
|
|
778
778
|
opacity: 0.32;
|
|
779
779
|
}
|
|
780
780
|
|
|
781
|
+
[data-placement^=top].db-custom-select .db-custom-select-dropdown:not([data-outside-vy=top]), .db-custom-select:not([data-placement]) .db-custom-select-dropdown[data-outside-vy=bottom], [data-placement^=bottom].db-custom-select .db-custom-select-dropdown[data-outside-vy=bottom] {
|
|
782
|
+
/* stylelint-disable-next-line media-query-no-invalid */
|
|
783
|
+
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
784
|
+
}
|
|
785
|
+
@media screen and (min-width: 45em) {
|
|
786
|
+
[data-placement^=top].db-custom-select .db-custom-select-dropdown:not([data-force-mobile]):not([data-outside-vy=top]), .db-custom-select:not([data-placement]) .db-custom-select-dropdown[data-outside-vy=bottom]:not([data-force-mobile]), [data-placement^=bottom].db-custom-select .db-custom-select-dropdown[data-outside-vy=bottom]:not([data-force-mobile]), [data-placement^=top].db-custom-select [data-force-mobile=false].db-custom-select-dropdown:not([data-outside-vy=top]), .db-custom-select:not([data-placement]) [data-force-mobile=false].db-custom-select-dropdown[data-outside-vy=bottom], [data-placement^=bottom].db-custom-select [data-force-mobile=false].db-custom-select-dropdown[data-outside-vy=bottom] {
|
|
787
|
+
inset-block-end: 100%;
|
|
788
|
+
margin-block-start: var(--db-spacing-fixed-md);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
[data-placement^=top].db-custom-select, .db-custom-select:not([data-placement]), [data-placement^=bottom].db-custom-select {
|
|
793
|
+
/* stylelint-disable-next-line media-query-no-invalid */
|
|
794
|
+
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
795
|
+
}
|
|
796
|
+
@media screen and (min-width: 45em) {
|
|
797
|
+
[data-placement^=top].db-custom-select:not([data-force-mobile])[data-placement$=end] .db-custom-select-dropdown:not([data-outside-vx=right]), .db-custom-select:not([data-force-mobile])[data-placement$=end]:not([data-placement]) .db-custom-select-dropdown:not([data-outside-vx=right]), [data-placement^=bottom].db-custom-select:not([data-force-mobile])[data-placement$=end] .db-custom-select-dropdown:not([data-outside-vx=right]), [data-force-mobile=false][data-placement$=end][data-placement^=top].db-custom-select .db-custom-select-dropdown:not([data-outside-vx=right]), [data-force-mobile=false][data-placement$=end].db-custom-select:not([data-placement]) .db-custom-select-dropdown:not([data-outside-vx=right]), [data-force-mobile=false][data-placement$=end][data-placement^=bottom].db-custom-select .db-custom-select-dropdown:not([data-outside-vx=right]) {
|
|
798
|
+
inset-inline-end: 0;
|
|
799
|
+
}
|
|
800
|
+
[data-placement^=top].db-custom-select:not([data-force-mobile]) .db-custom-select-dropdown[data-outside-vx=right], .db-custom-select:not([data-force-mobile]):not([data-placement]) .db-custom-select-dropdown[data-outside-vx=right], [data-placement^=bottom].db-custom-select:not([data-force-mobile]) .db-custom-select-dropdown[data-outside-vx=right], [data-force-mobile=false][data-placement^=top].db-custom-select .db-custom-select-dropdown[data-outside-vx=right], [data-force-mobile=false].db-custom-select:not([data-placement]) .db-custom-select-dropdown[data-outside-vx=right], [data-force-mobile=false][data-placement^=bottom].db-custom-select .db-custom-select-dropdown[data-outside-vx=right] {
|
|
801
|
+
inset-inline-end: 0;
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
.db-custom-select:not([data-placement]) .db-custom-select-dropdown:not([data-outside-vy=bottom]), [data-placement^=bottom].db-custom-select .db-custom-select-dropdown:not([data-outside-vy=bottom]) {
|
|
806
|
+
/* stylelint-disable-next-line media-query-no-invalid */
|
|
807
|
+
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
808
|
+
}
|
|
809
|
+
@media screen and (min-width: 45em) {
|
|
810
|
+
.db-custom-select:not([data-placement]) .db-custom-select-dropdown:not([data-outside-vy=bottom]):not([data-force-mobile]), .db-custom-select:not([data-placement]) .db-custom-select-dropdown:not([data-outside-vy=bottom])[data-force-mobile=false], [data-placement^=bottom].db-custom-select .db-custom-select-dropdown:not([data-outside-vy=bottom]):not([data-force-mobile]), [data-placement^=bottom].db-custom-select .db-custom-select-dropdown:not([data-outside-vy=bottom])[data-force-mobile=false] {
|
|
811
|
+
inset-block-start: 100%;
|
|
812
|
+
margin-block-end: var(--db-spacing-fixed-md);
|
|
813
|
+
}
|
|
814
|
+
}
|
|
781
815
|
.db-custom-select {
|
|
782
816
|
--db-form-component-padding-inline-end: calc(
|
|
783
817
|
calc(var(--db-icon-font-size) + var(--db-spacing-fixed-sm) + var(--db-spacing-fixed-xs)) + var(--db-sizing-sm) +
|
|
@@ -7,6 +7,53 @@
|
|
|
7
7
|
@use "../../styles/internal/select-components";
|
|
8
8
|
@use "../../styles/dialog-init";
|
|
9
9
|
|
|
10
|
+
%custom-select-placement-top {
|
|
11
|
+
@include screen-sizes.screen("sm") {
|
|
12
|
+
inset-block-end: 100%;
|
|
13
|
+
margin-block-start: variables.$db-spacing-fixed-md;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
%custom-select-placement-vertical {
|
|
18
|
+
@include screen-sizes.screen("sm") {
|
|
19
|
+
&[data-placement$="end"] {
|
|
20
|
+
.db-custom-select-dropdown:not([data-outside-vx="right"]) {
|
|
21
|
+
inset-inline-end: 0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.db-custom-select-dropdown[data-outside-vx="right"] {
|
|
26
|
+
inset-inline-end: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
%custom-select-placement {
|
|
32
|
+
&:not([data-placement]),
|
|
33
|
+
&[data-placement^="bottom"] {
|
|
34
|
+
@extend %custom-select-placement-vertical;
|
|
35
|
+
|
|
36
|
+
.db-custom-select-dropdown:not([data-outside-vy="bottom"]) {
|
|
37
|
+
@include screen-sizes.screen("sm") {
|
|
38
|
+
inset-block-start: 100%;
|
|
39
|
+
margin-block-end: variables.$db-spacing-fixed-md;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.db-custom-select-dropdown[data-outside-vy="bottom"] {
|
|
44
|
+
@extend %custom-select-placement-top;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&[data-placement^="top"] {
|
|
49
|
+
@extend %custom-select-placement-vertical;
|
|
50
|
+
|
|
51
|
+
.db-custom-select-dropdown:not([data-outside-vy="top"]) {
|
|
52
|
+
@extend %custom-select-placement-top;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
10
57
|
.db-custom-select {
|
|
11
58
|
--db-form-component-padding-inline-end: calc(
|
|
12
59
|
#{select-components.$select-icon-padding} + #{variables.$db-sizing-sm} +
|
|
@@ -20,6 +67,7 @@
|
|
|
20
67
|
|
|
21
68
|
@extend %select-icon;
|
|
22
69
|
@extend %select-placeholder;
|
|
70
|
+
@extend %custom-select-placement;
|
|
23
71
|
|
|
24
72
|
position: relative;
|
|
25
73
|
|
|
@@ -64,14 +64,14 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
64
64
|
outline-offset: var(--db-border-width-xs);
|
|
65
65
|
box-shadow: 0 0 0 var(--db-border-width-xs) var(--db-focus-box-shadow-bg-color, transparent);
|
|
66
66
|
}
|
|
67
|
-
.db-custom-select-list-item:not([data-disable-focus=true]):not([type=radio], [role=switch]):has(> label > input:focus-within) {
|
|
68
|
-
border-radius: var(--db-border-radius-xs);
|
|
69
|
-
}
|
|
70
67
|
@media screen and (prefers-reduced-motion: no-preference) {
|
|
71
68
|
.db-custom-select-list-item:not([data-disable-focus=true]):has(> label > input:focus-within) {
|
|
72
69
|
transition: outline var(--db-transition-duration-extra-fast), box-shadow var(--db-transition-duration-extra-fast);
|
|
73
70
|
}
|
|
74
71
|
}
|
|
72
|
+
.db-custom-select-list-item:not([data-disable-focus=true]):not([type=radio], [role=switch]):has(> label > input:focus-within) {
|
|
73
|
+
border-radius: var(--db-border-radius-xs);
|
|
74
|
+
}
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
Generates 3 types of placeholders, e.g:
|
|
@@ -282,6 +282,18 @@ dialog:not([data-backdrop=none])[data-backdrop=weak]::backdrop, dialog:not([data
|
|
|
282
282
|
.db-drawer .db-drawer-container:not([data-width=full]) {
|
|
283
283
|
max-inline-size: var(--db-drawer-max-width, calc(100% - var(--db-spacing-fixed-xl)));
|
|
284
284
|
}
|
|
285
|
+
.db-drawer .db-drawer-container:not([data-width=full]):not([data-direction]), .db-drawer .db-drawer-container:not([data-width=full])[data-direction=right] {
|
|
286
|
+
border-inline-start: var(--db-border-width-3xs) solid var(--db-adaptive-on-bg-basic-emphasis-60-default);
|
|
287
|
+
}
|
|
288
|
+
.db-drawer .db-drawer-container:not([data-width=full])[data-direction=left] {
|
|
289
|
+
border-inline-end: var(--db-border-width-3xs) solid var(--db-adaptive-on-bg-basic-emphasis-60-default);
|
|
290
|
+
}
|
|
291
|
+
.db-drawer .db-drawer-container:not([data-width=full])[data-direction=up] {
|
|
292
|
+
border-block-start: var(--db-border-width-3xs) solid var(--db-adaptive-on-bg-basic-emphasis-60-default);
|
|
293
|
+
}
|
|
294
|
+
.db-drawer .db-drawer-container:not([data-width=full])[data-direction=down] {
|
|
295
|
+
border-block-end: var(--db-border-width-3xs) solid var(--db-adaptive-on-bg-basic-emphasis-60-default);
|
|
296
|
+
}
|
|
285
297
|
.db-drawer .db-drawer-container[data-rounded=true] {
|
|
286
298
|
box-shadow: var(--db-elevation-md);
|
|
287
299
|
}
|
|
@@ -133,6 +133,23 @@ $spacings: (
|
|
|
133
133
|
--db-drawer-max-width,
|
|
134
134
|
calc(100% - #{variables.$db-spacing-fixed-xl})
|
|
135
135
|
);
|
|
136
|
+
|
|
137
|
+
&:not([data-direction]),
|
|
138
|
+
&[data-direction="right"] {
|
|
139
|
+
border-inline-start: component.$component-border;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&[data-direction="left"] {
|
|
143
|
+
border-inline-end: component.$component-border;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&[data-direction="up"] {
|
|
147
|
+
border-block-start: component.$component-border;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&[data-direction="down"] {
|
|
151
|
+
border-block-end: component.$component-border;
|
|
152
|
+
}
|
|
136
153
|
}
|
|
137
154
|
|
|
138
155
|
&[data-rounded="true"] {
|
|
@@ -445,12 +445,12 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
445
445
|
|
|
446
446
|
@layer variables {}
|
|
447
447
|
|
|
448
|
-
.db-input, .db-input[data-variant=floating] [id$=-placeholder], .db-input[data-variant=floating] input, .db-input:has(input[type=file]) input, .db-input input::file-selector-button {
|
|
448
|
+
.db-input, .db-input[data-variant=floating] [id$=-placeholder], .db-input[data-variant=floating] input, .db-input:has(input[type=file]) input, .db-input input::-webkit-calendar-picker-indicator, .db-input input::-webkit-search-cancel-button, .db-input input::file-selector-button {
|
|
449
449
|
font: var(--db-type-body-sm);
|
|
450
450
|
/* stylelint-disable-next-line at-rule-prelude-no-invalid,layer-name-pattern */
|
|
451
451
|
}
|
|
452
452
|
@layer variables {
|
|
453
|
-
.db-input, .db-input[data-variant=floating] [id$=-placeholder], .db-input[data-variant=floating] input, .db-input:has(input[type=file]) input, .db-input input::file-selector-button {
|
|
453
|
+
.db-input, .db-input[data-variant=floating] [id$=-placeholder], .db-input[data-variant=floating] input, .db-input:has(input[type=file]) input, .db-input input::-webkit-calendar-picker-indicator, .db-input input::-webkit-search-cancel-button, .db-input input::file-selector-button {
|
|
454
454
|
/* Those variables are only for components to calculate heights and change icons */
|
|
455
455
|
--db-icon-font-weight: var(--db-base-body-icon-weight-sm);
|
|
456
456
|
--db-icon-font-size: var(--db-base-body-icon-font-size-sm);
|
|
@@ -863,24 +863,26 @@ input[type=time]) {
|
|
|
863
863
|
input:focus-visible)::after {
|
|
864
864
|
opacity: 1;
|
|
865
865
|
}
|
|
866
|
-
|
|
867
|
-
--db-icon-after: "calendar";
|
|
868
|
-
margin-inline-start: var(--db-icon-margin-start, var(--db-spacing-fixed-xs));
|
|
869
|
-
content: var(--db-icon-after, attr(data-icon-after));
|
|
870
|
-
}
|
|
871
|
-
@supports (content: ""/"") {
|
|
866
|
+
@supports selector(::-webkit-calendar-picker-indicator) {
|
|
872
867
|
.db-input:has(input[type=date]):not([data-hide-icon-after=true])::after, .db-input:has(input[type=week]):not([data-hide-icon-after=true])::after, .db-input:has(input[type=datetime-local]):not([data-hide-icon-after=true])::after, .db-input:has(input[type=month]):not([data-hide-icon-after=true])::after {
|
|
873
|
-
|
|
868
|
+
--db-icon-after: "calendar";
|
|
869
|
+
margin-inline-start: var(--db-icon-margin-start, var(--db-spacing-fixed-xs));
|
|
870
|
+
content: var(--db-icon-after, attr(data-icon-after));
|
|
871
|
+
}
|
|
872
|
+
@supports (content: ""/"") {
|
|
873
|
+
.db-input:has(input[type=date]):not([data-hide-icon-after=true])::after, .db-input:has(input[type=week]):not([data-hide-icon-after=true])::after, .db-input:has(input[type=datetime-local]):not([data-hide-icon-after=true])::after, .db-input:has(input[type=month]):not([data-hide-icon-after=true])::after {
|
|
874
|
+
content: var(--db-icon-after, attr(data-icon-after))/"";
|
|
875
|
+
}
|
|
874
876
|
}
|
|
875
|
-
}
|
|
876
|
-
.db-input:has(input[type=time]):not([data-hide-icon-after=true])::after {
|
|
877
|
-
--db-icon-after: "clock";
|
|
878
|
-
margin-inline-start: var(--db-icon-margin-start, var(--db-spacing-fixed-xs));
|
|
879
|
-
content: var(--db-icon-after, attr(data-icon-after));
|
|
880
|
-
}
|
|
881
|
-
@supports (content: ""/"") {
|
|
882
877
|
.db-input:has(input[type=time]):not([data-hide-icon-after=true])::after {
|
|
883
|
-
|
|
878
|
+
--db-icon-after: "clock";
|
|
879
|
+
margin-inline-start: var(--db-icon-margin-start, var(--db-spacing-fixed-xs));
|
|
880
|
+
content: var(--db-icon-after, attr(data-icon-after));
|
|
881
|
+
}
|
|
882
|
+
@supports (content: ""/"") {
|
|
883
|
+
.db-input:has(input[type=time]):not([data-hide-icon-after=true])::after {
|
|
884
|
+
content: var(--db-icon-after, attr(data-icon-after))/"";
|
|
885
|
+
}
|
|
884
886
|
}
|
|
885
887
|
}
|
|
886
888
|
.db-input:has(input[type=file]) input {
|
|
@@ -894,6 +896,10 @@ input:focus-visible)::after {
|
|
|
894
896
|
padding: 0 var(--db-spacing-fixed-xs);
|
|
895
897
|
margin-inline-end: var(--db-spacing-fixed-xs);
|
|
896
898
|
}
|
|
899
|
+
.db-input[data-variant=floating] input::-webkit-calendar-picker-indicator, .db-input[data-variant=floating] input::-webkit-search-cancel-button {
|
|
900
|
+
/* stylelint-disable-next-line db-ux/use-spacings */
|
|
901
|
+
margin-block-end: var(--db-base-body-icon-font-size-2xs);
|
|
902
|
+
}
|
|
897
903
|
.db-input input {
|
|
898
904
|
position: relative;
|
|
899
905
|
}
|
|
@@ -903,6 +909,19 @@ input:focus-visible)::after {
|
|
|
903
909
|
block-size: var(--db-icon-font-size, 1.5rem);
|
|
904
910
|
padding: 0;
|
|
905
911
|
cursor: pointer;
|
|
912
|
+
/* stylelint-disable-next-line db-ux/use-spacings */
|
|
913
|
+
margin-block-start: var(--db-border-width-3xs);
|
|
914
|
+
border-radius: var(--db-border-radius-xs);
|
|
915
|
+
}
|
|
916
|
+
.db-input input::-webkit-calendar-picker-indicator:focus-visible, .db-input input::-webkit-search-cancel-button:focus-visible {
|
|
917
|
+
outline: var(--db-border-width-2xs) solid var(--db-focus-outline-color, var(--db-informational-on-bg-basic-emphasis-70-default));
|
|
918
|
+
outline-offset: var(--db-border-width-xs);
|
|
919
|
+
box-shadow: 0 0 0 var(--db-border-width-xs) var(--db-focus-box-shadow-bg-color, transparent);
|
|
920
|
+
}
|
|
921
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
|
922
|
+
.db-input input::-webkit-calendar-picker-indicator:focus-visible, .db-input input::-webkit-search-cancel-button:focus-visible {
|
|
923
|
+
transition: outline var(--db-transition-duration-extra-fast), box-shadow var(--db-transition-duration-extra-fast);
|
|
924
|
+
}
|
|
906
925
|
}
|
|
907
926
|
.db-input input::-webkit-search-cancel-button {
|
|
908
927
|
appearance: none;
|
|
@@ -67,15 +67,19 @@ $icon-padding: calc(
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
// This @supports should exclude Mozilla Firefox
|
|
71
|
+
// TODO: Reevaluate after Mozilla is supporting week and month input types
|
|
72
|
+
@supports selector(::-webkit-calendar-picker-indicator) {
|
|
73
|
+
&:has(input[type="date"]),
|
|
74
|
+
&:has(input[type="week"]),
|
|
75
|
+
&:has(input[type="datetime-local"]),
|
|
76
|
+
&:has(input[type="month"]) {
|
|
77
|
+
@include icons.set-icon("calendar", "after");
|
|
78
|
+
}
|
|
76
79
|
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
&:has(input[type="time"]) {
|
|
81
|
+
@include icons.set-icon("clock", "after");
|
|
82
|
+
}
|
|
79
83
|
}
|
|
80
84
|
|
|
81
85
|
&:has(input[type="file"]) {
|
|
@@ -105,16 +109,35 @@ $icon-padding: calc(
|
|
|
105
109
|
}
|
|
106
110
|
}
|
|
107
111
|
|
|
112
|
+
&[data-variant="floating"] {
|
|
113
|
+
input {
|
|
114
|
+
&::-webkit-calendar-picker-indicator,
|
|
115
|
+
&::-webkit-search-cancel-button {
|
|
116
|
+
/* stylelint-disable-next-line db-ux/use-spacings */
|
|
117
|
+
margin-block-end: var(--db-base-body-icon-font-size-2xs);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
108
122
|
input {
|
|
109
123
|
position: relative;
|
|
110
124
|
|
|
111
125
|
&::-webkit-calendar-picker-indicator,
|
|
112
126
|
&::-webkit-search-cancel-button {
|
|
127
|
+
@extend %db-overwrite-font-size-sm;
|
|
128
|
+
|
|
113
129
|
background-image: none;
|
|
114
130
|
inline-size: icons.$default-icon-font-size;
|
|
115
131
|
block-size: icons.$default-icon-font-size;
|
|
116
132
|
padding: 0;
|
|
117
133
|
cursor: pointer;
|
|
134
|
+
/* stylelint-disable-next-line db-ux/use-spacings */
|
|
135
|
+
margin-block-start: variables.$db-border-width-3xs;
|
|
136
|
+
border-radius: variables.$db-border-radius-xs;
|
|
137
|
+
|
|
138
|
+
&:focus-visible {
|
|
139
|
+
@include helpers.get-focus-placeholder;
|
|
140
|
+
}
|
|
118
141
|
}
|
|
119
142
|
|
|
120
143
|
&::-webkit-search-cancel-button {
|