@db-ux/core-components 1.1.1 → 2.0.0-0-custom-select-16b8cce
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/README.md +1 -1
- package/build/assets/icons/LICENCES.json +6 -0
- package/build/assets/icons/circular_arrows.svg +1 -0
- package/build/assets/icons/fonts/all/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/default/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/default_12/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/default_14/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/default_16/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/default_20/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/default_24/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/default_28/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/default_32/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/default_48/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/default_64/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/filled/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/filled_12/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/filled_14/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/filled_16/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/filled_20/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/filled_24/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/filled_28/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/filled_32/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/filled_48/db-ux.woff2 +0 -0
- package/build/assets/icons/fonts/filled_64/db-ux.woff2 +0 -0
- package/build/components/accordion/accordion.css +1 -1
- package/build/components/accordion-item/accordion-item.css +7 -2
- package/build/components/badge/badge.css +56 -4
- package/build/components/badge/badge.scss +1 -1
- package/build/components/button/button.css +4 -4
- package/build/components/card/card.css +6 -6
- package/build/components/checkbox/checkbox.css +60 -57
- package/build/components/custom-select/custom-select.css +1028 -0
- package/build/components/custom-select/custom-select.scss +172 -0
- package/build/components/custom-select-dropdown/custom-select-dropdown.css +402 -0
- package/build/components/custom-select-dropdown/custom-select-dropdown.scss +86 -0
- package/build/components/custom-select-form-field/custom-select-form-field.css +49 -0
- package/build/components/custom-select-form-field/custom-select-form-field.scss +24 -0
- package/build/components/custom-select-list/custom-select-list.css +48 -0
- package/build/components/custom-select-list/custom-select-list.scss +35 -0
- package/build/components/custom-select-list-item/custom-select-list-item.css +187 -0
- package/build/components/custom-select-list-item/custom-select-list-item.scss +99 -0
- package/build/components/divider/divider.css +2 -2
- package/build/components/drawer/drawer.css +6 -1
- package/build/components/header/header.css +4 -4
- package/build/components/input/input.css +71 -61
- package/build/components/input/input.scss +1 -5
- package/build/components/link/link.css +9 -4
- package/build/components/navigation-item/navigation-item.css +8 -3
- package/build/components/notification/notification.css +7 -2
- package/build/components/popover/popover.css +5 -0
- package/build/components/radio/radio.css +57 -54
- package/build/components/select/select.css +84 -75
- package/build/components/select/select.scss +4 -49
- package/build/components/switch/switch.css +64 -61
- package/build/components/tab-item/tab-item.css +5 -5
- package/build/components/tab-list/tab-list.css +17 -3
- package/build/components/tag/tag.css +40 -35
- package/build/components/textarea/textarea.css +93 -65
- package/build/components/textarea/textarea.scss +1 -1
- package/build/components/tooltip/tooltip.css +6 -1
- package/build/components/tooltip/tooltip.scss +2 -2
- package/build/styles/_select-components.scss +50 -0
- package/build/styles/absolute.css +32 -32
- package/build/styles/component-animations.css +1 -1
- package/build/styles/index.css +31 -31
- package/build/styles/index.scss +5 -0
- package/build/styles/internal/_custom-elements.scss +3 -0
- package/build/styles/internal/_form-components.scss +81 -70
- package/build/styles/internal/_scrollbar.scss +14 -3
- package/build/styles/internal/_tag-components.scss +20 -2
- package/build/styles/relative.css +32 -32
- package/build/styles/rollup.css +32 -32
- package/build/styles/wc-workarounds.css +1 -1
- package/build/styles/webpack.css +32 -32
- package/package.json +6 -5
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
@use "@db-ux/core-foundations/build/styles/variables";
|
|
2
|
+
@use "@db-ux/core-foundations/build/styles/colors";
|
|
3
|
+
@use "@db-ux/core-foundations/build/styles/helpers";
|
|
4
|
+
@use "@db-ux/core-foundations/build/styles/screen-sizes";
|
|
5
|
+
@use "../../styles/internal/form-components";
|
|
6
|
+
@use "../../styles/internal/component";
|
|
7
|
+
@use "../../styles/select-components";
|
|
8
|
+
@use "../../styles/internal/scrollbar";
|
|
9
|
+
@use "../../styles/dialog-init";
|
|
10
|
+
|
|
11
|
+
%custom-select-placement-top {
|
|
12
|
+
@include screen-sizes.screen("sm") {
|
|
13
|
+
inset-block-end: 100%;
|
|
14
|
+
margin-block-start: variables.$db-spacing-fixed-md;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
%custom-select-placement-vertical {
|
|
19
|
+
@include screen-sizes.screen("sm") {
|
|
20
|
+
&[data-placement$="end"] {
|
|
21
|
+
.db-custom-select-dropdown:not([data-outside-vx="right"]) {
|
|
22
|
+
inset-inline-end: 0;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.db-custom-select-dropdown[data-outside-vx="right"] {
|
|
27
|
+
inset-inline-end: 0;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
%custom-select-placement {
|
|
33
|
+
&:not([data-placement]),
|
|
34
|
+
&[data-placement^="bottom"] {
|
|
35
|
+
@extend %custom-select-placement-vertical;
|
|
36
|
+
|
|
37
|
+
.db-custom-select-dropdown:not([data-outside-vy="bottom"]) {
|
|
38
|
+
@include screen-sizes.screen("sm") {
|
|
39
|
+
inset-block-start: 100%;
|
|
40
|
+
margin-block-end: variables.$db-spacing-fixed-md;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.db-custom-select-dropdown[data-outside-vy="bottom"] {
|
|
45
|
+
@extend %custom-select-placement-top;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&[data-placement^="top"] {
|
|
50
|
+
@extend %custom-select-placement-vertical;
|
|
51
|
+
|
|
52
|
+
.db-custom-select-dropdown:not([data-outside-vy="top"]) {
|
|
53
|
+
@extend %custom-select-placement-top;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.db-custom-select {
|
|
59
|
+
--db-form-component-padding-inline-end: calc(
|
|
60
|
+
#{select-components.$select-icon-padding} + #{variables.$db-sizing-sm} +
|
|
61
|
+
#{variables.$db-spacing-fixed-sm}
|
|
62
|
+
);
|
|
63
|
+
--db-form-component-padding-inline-start: calc(
|
|
64
|
+
#{select-components.$has-before-padding} +
|
|
65
|
+
#{variables.$db-spacing-fixed-xs}
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
@extend %select-icon;
|
|
69
|
+
@extend %select-placeholder;
|
|
70
|
+
@extend %custom-select-placement;
|
|
71
|
+
|
|
72
|
+
position: relative;
|
|
73
|
+
min-inline-size: variables.$db-sizing-xl;
|
|
74
|
+
|
|
75
|
+
&:not([data-width]),
|
|
76
|
+
&[data-width="full"] {
|
|
77
|
+
&,
|
|
78
|
+
.db-custom-select-form-field {
|
|
79
|
+
inline-size: 100%;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@include form-components.set-default-form-component(summary);
|
|
84
|
+
|
|
85
|
+
[id$="-placeholder"] {
|
|
86
|
+
display: none;
|
|
87
|
+
margin-inline-end: calc(
|
|
88
|
+
#{form-components.$font-size-height} +
|
|
89
|
+
#{variables.$db-spacing-fixed-sm}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:has(.db-custom-select-form-field:empty),
|
|
94
|
+
&:has(.db-custom-select-form-field > :empty) {
|
|
95
|
+
--db-form-component-padding-inline-end: #{select-components.$select-icon-padding};
|
|
96
|
+
|
|
97
|
+
[id$="-placeholder"] {
|
|
98
|
+
display: block;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* custom elements workaround */
|
|
103
|
+
> db-button > .db-button[data-icon="cross"][data-variant="ghost"],
|
|
104
|
+
> .db-button[data-icon="cross"][data-variant="ghost"] {
|
|
105
|
+
--db-tooltip-parent-position: absolute;
|
|
106
|
+
|
|
107
|
+
inset-block-start: form-components.$icon-inline-block-start;
|
|
108
|
+
transform: translateY(-50%);
|
|
109
|
+
|
|
110
|
+
/* padding form field + gap + icon size */
|
|
111
|
+
inset-inline-end: calc(
|
|
112
|
+
#{select-components.$select-icon-padding} +
|
|
113
|
+
#{variables.$db-spacing-fixed-xs}
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
@include helpers.divider("right", "after");
|
|
117
|
+
|
|
118
|
+
&::after {
|
|
119
|
+
position: absolute;
|
|
120
|
+
inset-inline-end: calc(
|
|
121
|
+
-1 * #{variables.$db-spacing-fixed-xs} -
|
|
122
|
+
#{variables.$db-border-height-3xs}
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.db-tooltip {
|
|
128
|
+
@extend %db-neutral-variables;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&[data-selected-type="tag"] {
|
|
132
|
+
.db-custom-select-form-field {
|
|
133
|
+
&:has(:not(div:empty)) {
|
|
134
|
+
padding-block: variables.$db-spacing-fixed-xs;
|
|
135
|
+
block-size: auto;
|
|
136
|
+
|
|
137
|
+
> div {
|
|
138
|
+
flex-wrap: wrap;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
> button {
|
|
143
|
+
align-self: start;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
> details[open] {
|
|
149
|
+
> summary {
|
|
150
|
+
@include screen-sizes.screen("sm", "max") {
|
|
151
|
+
&::before {
|
|
152
|
+
position: fixed;
|
|
153
|
+
z-index: 9998;
|
|
154
|
+
inset: 0;
|
|
155
|
+
content: "";
|
|
156
|
+
cursor: default;
|
|
157
|
+
background-color: dialog-init.$backdrop-color;
|
|
158
|
+
opacity: dialog-init.$backdrop-opacity-strong;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&[data-variant="floating"] {
|
|
165
|
+
.db-custom-select-form-field {
|
|
166
|
+
> span {
|
|
167
|
+
/* stylelint-disable-next-line db-ux/use-spacings */
|
|
168
|
+
padding-block-start: form-components.$floating-label-padding-block-start;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
/* Use sizing's for fixed heights/widths e.g. the db-button has always a fixed height */
|
|
2
|
+
/* Use fixed spacings for all kind of distances (margin, padding, ...) */
|
|
3
|
+
/* The primary use-case for responsive spacings are
|
|
4
|
+
paddings/gaps in an application e.g. the <main> should have a responsive padding. */
|
|
5
|
+
/* Elevation */
|
|
6
|
+
/* Border */
|
|
7
|
+
/* Transitions */
|
|
8
|
+
/* Variants for adaptive components like input, select, notification, ... */
|
|
9
|
+
.db-visually-hidden,
|
|
10
|
+
[data-visually-hidden=true] {
|
|
11
|
+
clip: rect(0, 0, 0, 0) !important;
|
|
12
|
+
overflow: hidden !important;
|
|
13
|
+
white-space: nowrap !important;
|
|
14
|
+
font-size: 0 !important;
|
|
15
|
+
all: initial;
|
|
16
|
+
inset-block-start: 0 !important;
|
|
17
|
+
block-size: 1px !important;
|
|
18
|
+
position: absolute !important;
|
|
19
|
+
inline-size: 1px !important;
|
|
20
|
+
border-width: 0 !important;
|
|
21
|
+
border-style: initial !important;
|
|
22
|
+
border-color: initial !important;
|
|
23
|
+
border-image: initial !important;
|
|
24
|
+
padding: 0 !important;
|
|
25
|
+
pointer-events: none !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.db-custom-select-dropdown {
|
|
29
|
+
--db-adaptive-bg-basic-level-1-default: var(
|
|
30
|
+
--db-neutral-bg-basic-level-1-default
|
|
31
|
+
);
|
|
32
|
+
--db-adaptive-bg-basic-level-1-hovered: var(
|
|
33
|
+
--db-neutral-bg-basic-level-1-hovered
|
|
34
|
+
);
|
|
35
|
+
--db-adaptive-bg-basic-level-1-pressed: var(
|
|
36
|
+
--db-neutral-bg-basic-level-1-pressed
|
|
37
|
+
);
|
|
38
|
+
--db-adaptive-bg-basic-level-2-default: var(
|
|
39
|
+
--db-neutral-bg-basic-level-2-default
|
|
40
|
+
);
|
|
41
|
+
--db-adaptive-bg-basic-level-2-hovered: var(
|
|
42
|
+
--db-neutral-bg-basic-level-2-hovered
|
|
43
|
+
);
|
|
44
|
+
--db-adaptive-bg-basic-level-2-pressed: var(
|
|
45
|
+
--db-neutral-bg-basic-level-2-pressed
|
|
46
|
+
);
|
|
47
|
+
--db-adaptive-bg-basic-level-3-default: var(
|
|
48
|
+
--db-neutral-bg-basic-level-3-default
|
|
49
|
+
);
|
|
50
|
+
--db-adaptive-bg-basic-level-3-hovered: var(
|
|
51
|
+
--db-neutral-bg-basic-level-3-hovered
|
|
52
|
+
);
|
|
53
|
+
--db-adaptive-bg-basic-level-3-pressed: var(
|
|
54
|
+
--db-neutral-bg-basic-level-3-pressed
|
|
55
|
+
);
|
|
56
|
+
--db-adaptive-bg-basic-transparent-full-default: var(
|
|
57
|
+
--db-neutral-bg-basic-transparent-full-default
|
|
58
|
+
);
|
|
59
|
+
--db-adaptive-bg-basic-transparent-semi-default: var(
|
|
60
|
+
--db-neutral-bg-basic-transparent-semi-default
|
|
61
|
+
);
|
|
62
|
+
--db-adaptive-bg-basic-transparent-hovered: var(
|
|
63
|
+
--db-neutral-bg-basic-transparent-hovered
|
|
64
|
+
);
|
|
65
|
+
--db-adaptive-bg-basic-transparent-pressed: var(
|
|
66
|
+
--db-neutral-bg-basic-transparent-pressed
|
|
67
|
+
);
|
|
68
|
+
--db-adaptive-on-bg-basic-emphasis-100-default: var(
|
|
69
|
+
--db-neutral-on-bg-basic-emphasis-100-default
|
|
70
|
+
);
|
|
71
|
+
--db-adaptive-on-bg-basic-emphasis-100-hovered: var(
|
|
72
|
+
--db-neutral-on-bg-basic-emphasis-100-hovered
|
|
73
|
+
);
|
|
74
|
+
--db-adaptive-on-bg-basic-emphasis-100-pressed: var(
|
|
75
|
+
--db-neutral-on-bg-basic-emphasis-100-pressed
|
|
76
|
+
);
|
|
77
|
+
--db-adaptive-on-bg-basic-emphasis-90-default: var(
|
|
78
|
+
--db-neutral-on-bg-basic-emphasis-90-default
|
|
79
|
+
);
|
|
80
|
+
--db-adaptive-on-bg-basic-emphasis-90-hovered: var(
|
|
81
|
+
--db-neutral-on-bg-basic-emphasis-90-hovered
|
|
82
|
+
);
|
|
83
|
+
--db-adaptive-on-bg-basic-emphasis-90-pressed: var(
|
|
84
|
+
--db-neutral-on-bg-basic-emphasis-90-pressed
|
|
85
|
+
);
|
|
86
|
+
--db-adaptive-on-bg-basic-emphasis-80-default: var(
|
|
87
|
+
--db-neutral-on-bg-basic-emphasis-80-default
|
|
88
|
+
);
|
|
89
|
+
--db-adaptive-on-bg-basic-emphasis-80-hovered: var(
|
|
90
|
+
--db-neutral-on-bg-basic-emphasis-80-hovered
|
|
91
|
+
);
|
|
92
|
+
--db-adaptive-on-bg-basic-emphasis-80-pressed: var(
|
|
93
|
+
--db-neutral-on-bg-basic-emphasis-80-pressed
|
|
94
|
+
);
|
|
95
|
+
--db-adaptive-on-bg-basic-emphasis-70-default: var(
|
|
96
|
+
--db-neutral-on-bg-basic-emphasis-70-default
|
|
97
|
+
);
|
|
98
|
+
--db-adaptive-on-bg-basic-emphasis-70-hovered: var(
|
|
99
|
+
--db-neutral-on-bg-basic-emphasis-70-hovered
|
|
100
|
+
);
|
|
101
|
+
--db-adaptive-on-bg-basic-emphasis-70-pressed: var(
|
|
102
|
+
--db-neutral-on-bg-basic-emphasis-70-pressed
|
|
103
|
+
);
|
|
104
|
+
--db-adaptive-on-bg-basic-emphasis-60-default: var(
|
|
105
|
+
--db-neutral-on-bg-basic-emphasis-60-default
|
|
106
|
+
);
|
|
107
|
+
--db-adaptive-on-bg-basic-emphasis-60-hovered: var(
|
|
108
|
+
--db-neutral-on-bg-basic-emphasis-60-hovered
|
|
109
|
+
);
|
|
110
|
+
--db-adaptive-on-bg-basic-emphasis-60-pressed: var(
|
|
111
|
+
--db-neutral-on-bg-basic-emphasis-60-pressed
|
|
112
|
+
);
|
|
113
|
+
--db-adaptive-on-bg-basic-emphasis-50-default: var(
|
|
114
|
+
--db-neutral-on-bg-basic-emphasis-50-default
|
|
115
|
+
);
|
|
116
|
+
--db-adaptive-on-bg-basic-emphasis-50-hovered: var(
|
|
117
|
+
--db-neutral-on-bg-basic-emphasis-50-hovered
|
|
118
|
+
);
|
|
119
|
+
--db-adaptive-on-bg-basic-emphasis-50-pressed: var(
|
|
120
|
+
--db-neutral-on-bg-basic-emphasis-50-pressed
|
|
121
|
+
);
|
|
122
|
+
--db-adaptive-bg-inverted-contrast-max-default: var(
|
|
123
|
+
--db-neutral-bg-inverted-contrast-max-default
|
|
124
|
+
);
|
|
125
|
+
--db-adaptive-bg-inverted-contrast-max-hovered: var(
|
|
126
|
+
--db-neutral-bg-inverted-contrast-max-hovered
|
|
127
|
+
);
|
|
128
|
+
--db-adaptive-bg-inverted-contrast-max-pressed: var(
|
|
129
|
+
--db-neutral-bg-inverted-contrast-max-pressed
|
|
130
|
+
);
|
|
131
|
+
--db-adaptive-bg-inverted-contrast-high-default: var(
|
|
132
|
+
--db-neutral-bg-inverted-contrast-high-default
|
|
133
|
+
);
|
|
134
|
+
--db-adaptive-bg-inverted-contrast-high-hovered: var(
|
|
135
|
+
--db-neutral-bg-inverted-contrast-high-hovered
|
|
136
|
+
);
|
|
137
|
+
--db-adaptive-bg-inverted-contrast-high-pressed: var(
|
|
138
|
+
--db-neutral-bg-inverted-contrast-high-pressed
|
|
139
|
+
);
|
|
140
|
+
--db-adaptive-bg-inverted-contrast-low-default: var(
|
|
141
|
+
--db-neutral-bg-inverted-contrast-low-default
|
|
142
|
+
);
|
|
143
|
+
--db-adaptive-bg-inverted-contrast-low-hovered: var(
|
|
144
|
+
--db-neutral-bg-inverted-contrast-low-hovered
|
|
145
|
+
);
|
|
146
|
+
--db-adaptive-bg-inverted-contrast-low-pressed: var(
|
|
147
|
+
--db-neutral-bg-inverted-contrast-low-pressed
|
|
148
|
+
);
|
|
149
|
+
--db-adaptive-on-bg-inverted-default: var(
|
|
150
|
+
--db-neutral-on-bg-inverted-default
|
|
151
|
+
);
|
|
152
|
+
--db-adaptive-on-bg-inverted-hovered: var(
|
|
153
|
+
--db-neutral-on-bg-inverted-hovered
|
|
154
|
+
);
|
|
155
|
+
--db-adaptive-on-bg-inverted-pressed: var(
|
|
156
|
+
--db-neutral-on-bg-inverted-pressed
|
|
157
|
+
);
|
|
158
|
+
--db-adaptive-origin-default: var(--db-neutral-origin-default);
|
|
159
|
+
--db-adaptive-origin-hovered: var(--db-neutral-origin-hovered);
|
|
160
|
+
--db-adaptive-origin-pressed: var(--db-neutral-origin-pressed);
|
|
161
|
+
--db-adaptive-on-origin-default: var(
|
|
162
|
+
--db-neutral-on-origin-default
|
|
163
|
+
);
|
|
164
|
+
--db-adaptive-on-origin-hovered: var(
|
|
165
|
+
--db-neutral-on-origin-hovered
|
|
166
|
+
);
|
|
167
|
+
--db-adaptive-on-origin-pressed: var(
|
|
168
|
+
--db-neutral-on-origin-pressed
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@keyframes show-right-to-left {
|
|
173
|
+
from {
|
|
174
|
+
transform: translateX(110%);
|
|
175
|
+
}
|
|
176
|
+
to {
|
|
177
|
+
transform: translateX(0%);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
@keyframes hide-right-to-left {
|
|
181
|
+
from {
|
|
182
|
+
transform: translateX(0%);
|
|
183
|
+
}
|
|
184
|
+
to {
|
|
185
|
+
transform: translateX(110%);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
@keyframes show-left-to-right {
|
|
189
|
+
from {
|
|
190
|
+
transform: translateX(-110%);
|
|
191
|
+
}
|
|
192
|
+
to {
|
|
193
|
+
transform: translateX(0%);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
@keyframes hide-left-to-right {
|
|
197
|
+
from {
|
|
198
|
+
transform: translateX(0%);
|
|
199
|
+
}
|
|
200
|
+
to {
|
|
201
|
+
transform: translateX(-110%);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
@keyframes show-bottom-to-top {
|
|
205
|
+
from {
|
|
206
|
+
transform: translateY(110%);
|
|
207
|
+
}
|
|
208
|
+
to {
|
|
209
|
+
transform: translateY(0%);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
@keyframes hide-bottom-to-top {
|
|
213
|
+
from {
|
|
214
|
+
transform: translateY(0%);
|
|
215
|
+
}
|
|
216
|
+
to {
|
|
217
|
+
transform: translateY(110%);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
@keyframes show-top-to-bottom {
|
|
221
|
+
from {
|
|
222
|
+
transform: translateY(-110%);
|
|
223
|
+
}
|
|
224
|
+
to {
|
|
225
|
+
transform: translateY(0%);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
@keyframes hide-top-to-bottom {
|
|
229
|
+
from {
|
|
230
|
+
transform: translateY(0%);
|
|
231
|
+
}
|
|
232
|
+
to {
|
|
233
|
+
transform: translateY(-110%);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
@keyframes popover-animation {
|
|
237
|
+
0% {
|
|
238
|
+
opacity: 0;
|
|
239
|
+
transform: translate(var(--db-popover-center-x, var(--db-popover-translate-x, 0%)), var(--db-popover-center-y, var(--db-popover-translate-y, 0%)));
|
|
240
|
+
}
|
|
241
|
+
100% {
|
|
242
|
+
opacity: 1;
|
|
243
|
+
transform: translate(var(--db-popover-center-x, 0%), var(--db-popover-center-y, 0%));
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
@keyframes rotate {
|
|
247
|
+
100% {
|
|
248
|
+
transform: rotate(1turn);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
Generates 3 types of placeholders, e.g:
|
|
253
|
+
- %db-component-variables-md
|
|
254
|
+
- %db-font-size-md
|
|
255
|
+
- %db-overwrite-font-size-md
|
|
256
|
+
*/
|
|
257
|
+
.db-custom-select-dropdown {
|
|
258
|
+
position: absolute;
|
|
259
|
+
z-index: 32;
|
|
260
|
+
box-shadow: var(--db-elevation-md);
|
|
261
|
+
min-inline-size: var(--db-sizing-xl);
|
|
262
|
+
max-inline-size: calc(100vw - 2 * var(--db-spacing-fixed-sm));
|
|
263
|
+
max-block-size: calc(100vh - 2 * var(--db-spacing-fixed-sm));
|
|
264
|
+
/* stylelint-disable at-rule-empty-line-before */
|
|
265
|
+
/* stylelint-enable at-rule-empty-line-before */
|
|
266
|
+
/* stylelint-disable-next-line media-query-no-invalid */
|
|
267
|
+
}
|
|
268
|
+
.db-custom-select-dropdown:not([data-width]), .db-custom-select-dropdown[data-width=fixed] {
|
|
269
|
+
inline-size: var(--db-custom-select-dropdown-fixed-inline-size, var(--db-sizing-3xl));
|
|
270
|
+
}
|
|
271
|
+
.db-custom-select-dropdown[data-width=full] {
|
|
272
|
+
inline-size: 100%;
|
|
273
|
+
}
|
|
274
|
+
.db-custom-select-dropdown[data-force-mobile=true] {
|
|
275
|
+
position: fixed;
|
|
276
|
+
z-index: 9999;
|
|
277
|
+
inset-block: 0;
|
|
278
|
+
inset-inline: 50%;
|
|
279
|
+
transform: translateX(-50%);
|
|
280
|
+
block-size: fit-content;
|
|
281
|
+
margin: auto;
|
|
282
|
+
}
|
|
283
|
+
@media screen and (max-width: 44.9375em) {
|
|
284
|
+
.db-custom-select-dropdown {
|
|
285
|
+
position: fixed;
|
|
286
|
+
z-index: 9999;
|
|
287
|
+
inset-block: 0;
|
|
288
|
+
inset-inline: 50%;
|
|
289
|
+
transform: translateX(-50%);
|
|
290
|
+
block-size: fit-content;
|
|
291
|
+
margin: auto;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
.db-custom-select-dropdown .db-input {
|
|
295
|
+
min-inline-size: var(--db-sizing-2xl);
|
|
296
|
+
}
|
|
297
|
+
.db-custom-select-dropdown > db-custom-select-list > div:has(.db-checkbox),
|
|
298
|
+
.db-custom-select-dropdown > div:has(.db-checkbox) {
|
|
299
|
+
padding: var(--db-spacing-fixed-xs) var(--db-spacing-fixed-sm);
|
|
300
|
+
--db-divider-bg-color: var(--db-adaptive-on-bg-basic-emphasis-60-default);
|
|
301
|
+
position: var(--db-tooltip-parent-position, relative);
|
|
302
|
+
}
|
|
303
|
+
.db-custom-select-dropdown > db-custom-select-list > div:has(.db-checkbox)[data-emphasis=strong],
|
|
304
|
+
.db-custom-select-dropdown > div:has(.db-checkbox)[data-emphasis=strong] {
|
|
305
|
+
--db-divider-bg-color: var(--db-adaptive-on-bg-basic-emphasis-70-default);
|
|
306
|
+
}
|
|
307
|
+
.db-custom-select-dropdown > db-custom-select-list > div:has(.db-checkbox)::after,
|
|
308
|
+
.db-custom-select-dropdown > div:has(.db-checkbox)::after {
|
|
309
|
+
content: "";
|
|
310
|
+
background-color: var(--db-divider-bg-color);
|
|
311
|
+
position: absolute;
|
|
312
|
+
block-size: var(--db-border-height-3xs);
|
|
313
|
+
inset-block-end: 0;
|
|
314
|
+
inset-inline: 0;
|
|
315
|
+
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
316
|
+
}
|
|
317
|
+
@media (forced-colors: active) {
|
|
318
|
+
.db-custom-select-dropdown > db-custom-select-list > div:has(.db-checkbox),
|
|
319
|
+
.db-custom-select-dropdown > div:has(.db-checkbox) {
|
|
320
|
+
/* stylelint-disable-next-line db-ux/use-border-color */
|
|
321
|
+
border: var(--db-border-height-3xs) solid var(--db-divider-bg-color);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
.db-custom-select-dropdown > db-custom-select-list > div:has(.db-button), .db-custom-select-dropdown > db-custom-select-list > div:has(.db-input),
|
|
325
|
+
.db-custom-select-dropdown > div:has(.db-button),
|
|
326
|
+
.db-custom-select-dropdown > div:has(.db-input) {
|
|
327
|
+
padding: var(--db-spacing-fixed-md) calc(var(--db-spacing-fixed-sm) * 2);
|
|
328
|
+
}
|
|
329
|
+
.db-custom-select-dropdown > db-custom-select-list > div:has(.db-input),
|
|
330
|
+
.db-custom-select-dropdown > div:has(.db-input) {
|
|
331
|
+
--db-divider-bg-color: var(--db-adaptive-on-bg-basic-emphasis-60-default);
|
|
332
|
+
position: var(--db-tooltip-parent-position, relative);
|
|
333
|
+
}
|
|
334
|
+
.db-custom-select-dropdown > db-custom-select-list > div:has(.db-input)[data-emphasis=strong],
|
|
335
|
+
.db-custom-select-dropdown > div:has(.db-input)[data-emphasis=strong] {
|
|
336
|
+
--db-divider-bg-color: var(--db-adaptive-on-bg-basic-emphasis-70-default);
|
|
337
|
+
}
|
|
338
|
+
.db-custom-select-dropdown > db-custom-select-list > div:has(.db-input)::after,
|
|
339
|
+
.db-custom-select-dropdown > div:has(.db-input)::after {
|
|
340
|
+
content: "";
|
|
341
|
+
background-color: var(--db-divider-bg-color);
|
|
342
|
+
position: absolute;
|
|
343
|
+
block-size: var(--db-border-height-3xs);
|
|
344
|
+
inset-block-end: 0;
|
|
345
|
+
inset-inline: 0;
|
|
346
|
+
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
347
|
+
}
|
|
348
|
+
@media (forced-colors: active) {
|
|
349
|
+
.db-custom-select-dropdown > db-custom-select-list > div:has(.db-input),
|
|
350
|
+
.db-custom-select-dropdown > div:has(.db-input) {
|
|
351
|
+
/* stylelint-disable-next-line db-ux/use-border-color */
|
|
352
|
+
border: var(--db-border-height-3xs) solid var(--db-divider-bg-color);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
.db-custom-select-dropdown > db-custom-select-list > div:has(.db-button),
|
|
356
|
+
.db-custom-select-dropdown > div:has(.db-button) {
|
|
357
|
+
--db-divider-bg-color: var(--db-adaptive-on-bg-basic-emphasis-60-default);
|
|
358
|
+
position: var(--db-tooltip-parent-position, relative);
|
|
359
|
+
/* stylelint-disable at-rule-empty-line-before */
|
|
360
|
+
/* stylelint-enable at-rule-empty-line-before */
|
|
361
|
+
/* stylelint-disable-next-line media-query-no-invalid */
|
|
362
|
+
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
363
|
+
}
|
|
364
|
+
.db-custom-select-dropdown > db-custom-select-list > div:has(.db-button)[data-emphasis=strong],
|
|
365
|
+
.db-custom-select-dropdown > div:has(.db-button)[data-emphasis=strong] {
|
|
366
|
+
--db-divider-bg-color: var(--db-adaptive-on-bg-basic-emphasis-70-default);
|
|
367
|
+
}
|
|
368
|
+
.db-custom-select-dropdown > db-custom-select-list > div:has(.db-button)::after,
|
|
369
|
+
.db-custom-select-dropdown > div:has(.db-button)::after {
|
|
370
|
+
content: "";
|
|
371
|
+
background-color: var(--db-divider-bg-color);
|
|
372
|
+
position: absolute;
|
|
373
|
+
block-size: var(--db-border-height-3xs);
|
|
374
|
+
inset-block-start: 0;
|
|
375
|
+
inset-inline: 0;
|
|
376
|
+
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
377
|
+
}
|
|
378
|
+
@media (forced-colors: active) {
|
|
379
|
+
.db-custom-select-dropdown > db-custom-select-list > div:has(.db-button),
|
|
380
|
+
.db-custom-select-dropdown > div:has(.db-button) {
|
|
381
|
+
/* stylelint-disable-next-line db-ux/use-border-color */
|
|
382
|
+
border: var(--db-border-height-3xs) solid var(--db-divider-bg-color);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
@media screen and (min-width: 45em) {
|
|
386
|
+
.db-custom-select-dropdown > db-custom-select-list > div:has(.db-button):not([data-force-mobile]), .db-custom-select-dropdown > db-custom-select-list > div:has(.db-button)[data-force-mobile=false],
|
|
387
|
+
.db-custom-select-dropdown > div:has(.db-button):not([data-force-mobile]),
|
|
388
|
+
.db-custom-select-dropdown > div:has(.db-button)[data-force-mobile=false] {
|
|
389
|
+
display: none;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
.db-custom-select-dropdown > db-infotext > .db-infotext,
|
|
393
|
+
.db-custom-select-dropdown > .db-infotext {
|
|
394
|
+
padding: var(--db-spacing-fixed-lg) var(--db-spacing-fixed-md);
|
|
395
|
+
margin: auto;
|
|
396
|
+
}
|
|
397
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
|
398
|
+
.db-custom-select-dropdown > db-infotext > .db-infotext[data-icon=circular_arrows]::before,
|
|
399
|
+
.db-custom-select-dropdown > .db-infotext[data-icon=circular_arrows]::before {
|
|
400
|
+
animation: rotate 1.5s linear 0s infinite normal none running;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
@use "@db-ux/core-foundations/build/styles/variables";
|
|
2
|
+
@use "@db-ux/core-foundations/build/styles/colors";
|
|
3
|
+
@use "@db-ux/core-foundations/build/styles/screen-sizes";
|
|
4
|
+
@use "@db-ux/core-foundations/build/styles/helpers";
|
|
5
|
+
@use "@db-ux/core-foundations/build/styles/animation";
|
|
6
|
+
@use "../../styles/internal/form-components";
|
|
7
|
+
|
|
8
|
+
.db-custom-select-dropdown {
|
|
9
|
+
@extend %db-neutral-variables;
|
|
10
|
+
|
|
11
|
+
position: absolute;
|
|
12
|
+
z-index: 32;
|
|
13
|
+
box-shadow: variables.$db-elevation-md;
|
|
14
|
+
min-inline-size: variables.$db-sizing-xl;
|
|
15
|
+
max-inline-size: calc(100vw - 2 * #{variables.$db-spacing-fixed-sm});
|
|
16
|
+
max-block-size: calc(100vh - 2 * #{variables.$db-spacing-fixed-sm});
|
|
17
|
+
|
|
18
|
+
&:not([data-width]),
|
|
19
|
+
&[data-width="fixed"] {
|
|
20
|
+
inline-size: var(
|
|
21
|
+
--db-custom-select-dropdown-fixed-inline-size,
|
|
22
|
+
#{variables.$db-sizing-3xl}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&[data-width="full"] {
|
|
27
|
+
inline-size: 100%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@include screen-sizes.screen("sm", "max") {
|
|
31
|
+
position: fixed;
|
|
32
|
+
z-index: 9999;
|
|
33
|
+
inset-block: 0;
|
|
34
|
+
inset-inline: 50%;
|
|
35
|
+
transform: translateX(-50%);
|
|
36
|
+
block-size: fit-content;
|
|
37
|
+
margin: auto;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.db-input {
|
|
41
|
+
min-inline-size: variables.$db-sizing-2xl;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
> db-custom-select-list > div,
|
|
45
|
+
> div {
|
|
46
|
+
&:has(.db-checkbox) {
|
|
47
|
+
padding: variables.$db-spacing-fixed-xs
|
|
48
|
+
variables.$db-spacing-fixed-sm;
|
|
49
|
+
|
|
50
|
+
@include helpers.divider("bottom", "after");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:has(.db-button),
|
|
54
|
+
&:has(.db-input) {
|
|
55
|
+
padding: variables.$db-spacing-fixed-md
|
|
56
|
+
calc(#{variables.$db-spacing-fixed-sm} * 2);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:has(.db-input) {
|
|
60
|
+
@include helpers.divider("bottom", "after");
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&:has(.db-button) {
|
|
64
|
+
@include helpers.divider("top", "after");
|
|
65
|
+
|
|
66
|
+
@include screen-sizes.screen("sm") {
|
|
67
|
+
display: none;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
> db-infotext > .db-infotext,
|
|
73
|
+
> .db-infotext {
|
|
74
|
+
padding: variables.$db-spacing-fixed-lg variables.$db-spacing-fixed-md;
|
|
75
|
+
margin: auto;
|
|
76
|
+
|
|
77
|
+
&[data-icon="circular_arrows"] {
|
|
78
|
+
&::before {
|
|
79
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
|
80
|
+
animation: rotate 1.5s linear 0s infinite normal none
|
|
81
|
+
running;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/* Use sizing's for fixed heights/widths e.g. the db-button has always a fixed height */
|
|
2
|
+
/* Use fixed spacings for all kind of distances (margin, padding, ...) */
|
|
3
|
+
/* The primary use-case for responsive spacings are
|
|
4
|
+
paddings/gaps in an application e.g. the <main> should have a responsive padding. */
|
|
5
|
+
/* Elevation */
|
|
6
|
+
/* Border */
|
|
7
|
+
/* Transitions */
|
|
8
|
+
.db-visually-hidden,
|
|
9
|
+
[data-visually-hidden=true] {
|
|
10
|
+
clip: rect(0, 0, 0, 0) !important;
|
|
11
|
+
overflow: hidden !important;
|
|
12
|
+
white-space: nowrap !important;
|
|
13
|
+
font-size: 0 !important;
|
|
14
|
+
all: initial;
|
|
15
|
+
inset-block-start: 0 !important;
|
|
16
|
+
block-size: 1px !important;
|
|
17
|
+
position: absolute !important;
|
|
18
|
+
inline-size: 1px !important;
|
|
19
|
+
border-width: 0 !important;
|
|
20
|
+
border-style: initial !important;
|
|
21
|
+
border-color: initial !important;
|
|
22
|
+
border-image: initial !important;
|
|
23
|
+
padding: 0 !important;
|
|
24
|
+
pointer-events: none !important;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Variants for adaptive components like input, select, notification, ... */
|
|
28
|
+
/**
|
|
29
|
+
Generates 3 types of placeholders, e.g:
|
|
30
|
+
- %db-component-variables-md
|
|
31
|
+
- %db-font-size-md
|
|
32
|
+
- %db-overwrite-font-size-md
|
|
33
|
+
*/
|
|
34
|
+
.db-custom-select-form-field:is(summary) {
|
|
35
|
+
list-style: none;
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: space-between;
|
|
39
|
+
gap: var(--db-spacing-fixed-sm);
|
|
40
|
+
}
|
|
41
|
+
.db-custom-select-form-field:is(summary) span {
|
|
42
|
+
text-overflow: ellipsis;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
text-wrap: nowrap;
|
|
45
|
+
}
|
|
46
|
+
.db-custom-select-form-field:is(summary) > div {
|
|
47
|
+
display: flex;
|
|
48
|
+
gap: var(--db-spacing-fixed-sm);
|
|
49
|
+
}
|