@db-ux/core-components 2.4.4 → 3.0.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/README.md +1 -1
- package/build/components/accordion/accordion.css +2 -0
- package/build/components/accordion-item/accordion-item.css +12 -10
- package/build/components/badge/badge.css +2 -0
- package/build/components/brand/brand.css +2 -0
- package/build/components/button/button.css +43 -31
- package/build/components/button/button.scss +16 -19
- package/build/components/card/card.css +54 -60
- package/build/components/card/card.scss +37 -33
- package/build/components/checkbox/checkbox.css +46 -44
- package/build/components/checkbox/checkbox.scss +11 -11
- package/build/components/custom-select/custom-select.css +49 -32
- package/build/components/custom-select/custom-select.scss +5 -7
- package/build/components/custom-select-dropdown/custom-select-dropdown.css +14 -6
- package/build/components/custom-select-form-field/custom-select-form-field.css +2 -0
- package/build/components/custom-select-list/custom-select-list.css +2 -0
- package/build/components/custom-select-list-item/custom-select-list-item.css +8 -6
- package/build/components/custom-select-list-item/custom-select-list-item.scss +6 -6
- package/build/components/divider/divider.css +2 -0
- package/build/components/drawer/drawer.css +2 -0
- package/build/components/header/header.css +10 -8
- package/build/components/icon/icon.css +2 -0
- package/build/components/infotext/infotext.css +8 -6
- package/build/components/input/input.css +55 -41
- package/build/components/input/input.scss +6 -6
- package/build/components/link/link.css +24 -26
- package/build/components/link/link.scss +7 -14
- package/build/components/navigation/navigation.css +4 -2
- package/build/components/navigation/navigation.scss +2 -2
- package/build/components/navigation-item/navigation-item.css +25 -23
- package/build/components/navigation-item/navigation-item.scss +3 -3
- package/build/components/notification/notification.css +56 -22
- package/build/components/page/page.css +2 -0
- package/build/components/popover/popover.css +3 -2
- package/build/components/radio/radio.css +28 -26
- package/build/components/radio/radio.scss +6 -6
- package/build/components/section/section.css +3 -1
- package/build/components/select/select.css +35 -21
- package/build/components/select/select.scss +1 -1
- package/build/components/stack/stack-web-component.css +2 -0
- package/build/components/stack/stack.css +2 -0
- package/build/components/switch/switch.css +42 -28
- package/build/components/switch/switch.scss +3 -3
- package/build/components/tab-item/tab-item.css +6 -4
- package/build/components/tab-item/tab-item.scss +3 -3
- package/build/components/tab-list/tab-list.css +6 -4
- package/build/components/tab-panel/tab-panel.css +2 -0
- package/build/components/tabs/tabs.css +2 -0
- package/build/components/tag/tag.css +72 -40
- package/build/components/tag/tag.scss +1 -1
- package/build/components/textarea/textarea.css +48 -22
- package/build/components/textarea/textarea.scss +1 -1
- package/build/components/tooltip/tooltip.css +3 -2
- package/build/styles/absolute.css +238 -154
- package/build/styles/index.css +141 -105
- package/build/styles/internal/_form-components.scss +12 -6
- package/build/styles/internal/_icon-passing.scss +1 -1
- package/build/styles/internal/_link-components.scss +5 -2
- package/build/styles/internal/_popover-component.scss +1 -4
- package/build/styles/internal/_scrollbar.scss +4 -4
- package/build/styles/internal/_select-components.scss +1 -1
- package/build/styles/relative.css +238 -154
- package/build/styles/rollup.css +238 -154
- package/build/styles/webpack.css +238 -154
- package/package.json +24 -24
package/README.md
CHANGED
|
@@ -82,7 +82,7 @@ In the case you want to include only some components, and you could do it like t
|
|
|
82
82
|
/* Optional: Add animations / transitions for components */
|
|
83
83
|
@import "@db-ux/core-components/build/styles/component-animations.css";
|
|
84
84
|
|
|
85
|
-
/* Optional: Add data-icon/data-icon-
|
|
85
|
+
/* Optional: Add data-icon/data-icon-trailing to global attributes to enable icons for components */
|
|
86
86
|
@import "@db-ux/core-foundations/build/styles/icons/include-rollup.css";
|
|
87
87
|
|
|
88
88
|
/* Optional: Add components */
|
|
@@ -6,6 +6,8 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
6
6
|
/* Border */
|
|
7
7
|
/* Opacity */
|
|
8
8
|
/* Transitions */
|
|
9
|
+
/* Screen sizes */
|
|
10
|
+
/* Container sizes */
|
|
9
11
|
/* Variants for adaptive components like input, select, notification, ... */
|
|
10
12
|
@layer variables {}
|
|
11
13
|
|
|
@@ -6,6 +6,8 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
6
6
|
/* Border */
|
|
7
7
|
/* Opacity */
|
|
8
8
|
/* Transitions */
|
|
9
|
+
/* Screen sizes */
|
|
10
|
+
/* Container sizes */
|
|
9
11
|
.db-visually-hidden,
|
|
10
12
|
[data-visually-hidden=true] {
|
|
11
13
|
clip: rect(0, 0, 0, 0) !important;
|
|
@@ -139,7 +141,7 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
139
141
|
transform: rotate(1turn);
|
|
140
142
|
}
|
|
141
143
|
}
|
|
142
|
-
.db-accordion-item > details > summary:not([data-
|
|
144
|
+
.db-accordion-item > details > summary:not([data-show-icon-trailing=false])::after {
|
|
143
145
|
color: var(--db-icon-color, inherit);
|
|
144
146
|
display: inline-block;
|
|
145
147
|
/*** icon - placeholder ***/
|
|
@@ -156,23 +158,23 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
156
158
|
/* stylelint-disable-next-line declaration-property-value-no-unknown */
|
|
157
159
|
speak: never;
|
|
158
160
|
text-transform: none;
|
|
159
|
-
vertical-align: middle;
|
|
161
|
+
vertical-align: var(--db-icon-vertical-align, middle);
|
|
160
162
|
block-size: var(--db-icon-font-size, 1.5rem);
|
|
161
163
|
inline-size: var(--db-icon-font-size, 1.5rem);
|
|
162
164
|
content: var(--db-icon, attr(data-icon));
|
|
163
165
|
}
|
|
164
166
|
@supports (content: ""/"") {
|
|
165
|
-
.db-accordion-item > details > summary:not([data-
|
|
167
|
+
.db-accordion-item > details > summary:not([data-show-icon-trailing=false])::after {
|
|
166
168
|
content: var(--db-icon, attr(data-icon))/"";
|
|
167
169
|
}
|
|
168
170
|
}
|
|
169
171
|
@media aural {
|
|
170
|
-
.db-accordion-item > details > summary:not([data-
|
|
172
|
+
.db-accordion-item > details > summary:not([data-show-icon-trailing=false])::after {
|
|
171
173
|
content: none;
|
|
172
174
|
}
|
|
173
175
|
}
|
|
174
176
|
@media speech {
|
|
175
|
-
.db-accordion-item > details > summary:not([data-
|
|
177
|
+
.db-accordion-item > details > summary:not([data-show-icon-trailing=false])::after {
|
|
176
178
|
content: none;
|
|
177
179
|
}
|
|
178
180
|
}
|
|
@@ -251,14 +253,14 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
251
253
|
* @mixin screen-min-max
|
|
252
254
|
* @param $data an object like (min:"sm", max:"lg") or (min: "sm")
|
|
253
255
|
*/
|
|
254
|
-
.db-accordion-item > details > summary:not([data-
|
|
255
|
-
--db-icon-
|
|
256
|
+
.db-accordion-item > details > summary:not([data-show-icon-trailing=false])::after {
|
|
257
|
+
--db-icon-trailing: "chevron_down";
|
|
256
258
|
margin-inline-start: var(--db-icon-margin-start, var(--db-spacing-fixed-xs));
|
|
257
|
-
content: var(--db-icon-
|
|
259
|
+
content: var(--db-icon-trailing, attr(data-icon-trailing));
|
|
258
260
|
}
|
|
259
261
|
@supports (content: ""/"") {
|
|
260
|
-
.db-accordion-item > details > summary:not([data-
|
|
261
|
-
content: var(--db-icon-
|
|
262
|
+
.db-accordion-item > details > summary:not([data-show-icon-trailing=false])::after {
|
|
263
|
+
content: var(--db-icon-trailing, attr(data-icon-trailing))/"";
|
|
262
264
|
}
|
|
263
265
|
}
|
|
264
266
|
.db-accordion-item > details > summary::after {
|
|
@@ -6,6 +6,8 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
6
6
|
/* Border */
|
|
7
7
|
/* Opacity */
|
|
8
8
|
/* Transitions */
|
|
9
|
+
/* Screen sizes */
|
|
10
|
+
/* Container sizes */
|
|
9
11
|
/* Variants for adaptive components like input, select, notification, ... */
|
|
10
12
|
@layer variables {}
|
|
11
13
|
|
|
@@ -6,6 +6,8 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
6
6
|
/* Border */
|
|
7
7
|
/* Opacity */
|
|
8
8
|
/* Transitions */
|
|
9
|
+
/* Screen sizes */
|
|
10
|
+
/* Container sizes */
|
|
9
11
|
/* Variants for adaptive components like input, select, notification, ... */
|
|
10
12
|
@layer variables {}
|
|
11
13
|
|
|
@@ -6,6 +6,8 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
6
6
|
/* Border */
|
|
7
7
|
/* Opacity */
|
|
8
8
|
/* Transitions */
|
|
9
|
+
/* Screen sizes */
|
|
10
|
+
/* Container sizes */
|
|
9
11
|
/* Variants for adaptive components like input, select, notification, ... */
|
|
10
12
|
@layer variables {}
|
|
11
13
|
|
|
@@ -152,27 +154,6 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
152
154
|
inline-size: fit-content;
|
|
153
155
|
padding: var(--db-spacing-fixed-xs) var(--db-spacing-fixed-md);
|
|
154
156
|
text-decoration: none;
|
|
155
|
-
/* stylelint-disable-next-line a11y/selector-pseudo-class-focus */
|
|
156
|
-
}
|
|
157
|
-
.db-button:hover:not(:disabled, [aria-disabled=true]) {
|
|
158
|
-
cursor: var(--db-overwrite-cursor, pointer);
|
|
159
|
-
background-color: var(--db-adaptive-bg-basic-transparent-hovered);
|
|
160
|
-
}
|
|
161
|
-
.db-button:hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-button:hover:not(:disabled, [aria-disabled=true]):is(input) {
|
|
162
|
-
cursor: initial;
|
|
163
|
-
}
|
|
164
|
-
.db-button:hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-button:hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
165
|
-
cursor: pointer;
|
|
166
|
-
}
|
|
167
|
-
.db-button:active:not(:disabled, [aria-disabled=true]) {
|
|
168
|
-
cursor: var(--db-overwrite-cursor, pointer);
|
|
169
|
-
background-color: var(--db-adaptive-bg-basic-transparent-pressed);
|
|
170
|
-
}
|
|
171
|
-
.db-button:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-button:active:not(:disabled, [aria-disabled=true]):is(input) {
|
|
172
|
-
cursor: initial;
|
|
173
|
-
}
|
|
174
|
-
.db-button:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-button:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
175
|
-
cursor: pointer;
|
|
176
157
|
}
|
|
177
158
|
.db-button[data-no-text=true] {
|
|
178
159
|
font-size: 0 !important;
|
|
@@ -232,23 +213,54 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
232
213
|
}
|
|
233
214
|
.db-button[data-variant=outlined], .db-button:not([data-variant]), .db-button[data-variant=""], .db-button[data-variant=ghost] {
|
|
234
215
|
background-color: var(--db-adaptive-bg-basic-transparent-full-default);
|
|
216
|
+
/* stylelint-disable-next-line a11y/selector-pseudo-class-focus */
|
|
217
|
+
}
|
|
218
|
+
.db-button[data-variant=outlined]:hover:not(:disabled, [aria-disabled=true]), .db-button:not([data-variant]):hover:not(:disabled, [aria-disabled=true]), .db-button[data-variant=""]:hover:not(:disabled, [aria-disabled=true]), .db-button[data-variant=ghost]:hover:not(:disabled, [aria-disabled=true]) {
|
|
219
|
+
cursor: var(--db-overwrite-cursor, pointer);
|
|
220
|
+
background-color: var(--db-adaptive-bg-basic-transparent-full-hovered);
|
|
221
|
+
}
|
|
222
|
+
.db-button[data-variant=outlined]:hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-button[data-variant=outlined]:hover:not(:disabled, [aria-disabled=true]):is(input), .db-button:not([data-variant]):hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-button:not([data-variant]):hover:not(:disabled, [aria-disabled=true]):is(input), .db-button[data-variant=""]:hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-button[data-variant=""]:hover:not(:disabled, [aria-disabled=true]):is(input), .db-button[data-variant=ghost]:hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-button[data-variant=ghost]:hover:not(:disabled, [aria-disabled=true]):is(input) {
|
|
223
|
+
cursor: initial;
|
|
224
|
+
}
|
|
225
|
+
.db-button[data-variant=outlined]:hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-button[data-variant=outlined]:hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)), .db-button:not([data-variant]):hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-button:not([data-variant]):hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)), .db-button[data-variant=""]:hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-button[data-variant=""]:hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)), .db-button[data-variant=ghost]:hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-button[data-variant=ghost]:hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
226
|
+
cursor: pointer;
|
|
227
|
+
}
|
|
228
|
+
.db-button[data-variant=outlined]:active:not(:disabled, [aria-disabled=true]), .db-button:not([data-variant]):active:not(:disabled, [aria-disabled=true]), .db-button[data-variant=""]:active:not(:disabled, [aria-disabled=true]), .db-button[data-variant=ghost]:active:not(:disabled, [aria-disabled=true]) {
|
|
229
|
+
cursor: var(--db-overwrite-cursor, pointer);
|
|
230
|
+
background-color: var(--db-adaptive-bg-basic-transparent-full-pressed);
|
|
231
|
+
}
|
|
232
|
+
.db-button[data-variant=outlined]:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-button[data-variant=outlined]:active:not(:disabled, [aria-disabled=true]):is(input), .db-button:not([data-variant]):active:not(:disabled, [aria-disabled=true]):is(textarea), .db-button:not([data-variant]):active:not(:disabled, [aria-disabled=true]):is(input), .db-button[data-variant=""]:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-button[data-variant=""]:active:not(:disabled, [aria-disabled=true]):is(input), .db-button[data-variant=ghost]:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-button[data-variant=ghost]:active:not(:disabled, [aria-disabled=true]):is(input) {
|
|
233
|
+
cursor: initial;
|
|
234
|
+
}
|
|
235
|
+
.db-button[data-variant=outlined]:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-button[data-variant=outlined]:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)), .db-button:not([data-variant]):active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-button:not([data-variant]):active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)), .db-button[data-variant=""]:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-button[data-variant=""]:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)), .db-button[data-variant=ghost]:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-button[data-variant=ghost]:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
236
|
+
cursor: pointer;
|
|
235
237
|
}
|
|
236
238
|
.db-button[data-variant=filled] {
|
|
237
239
|
background-color: var(--db-adaptive-bg-basic-transparent-semi-default);
|
|
240
|
+
/* stylelint-disable-next-line a11y/selector-pseudo-class-focus */
|
|
238
241
|
}
|
|
239
|
-
.db-button:disabled {
|
|
240
|
-
|
|
242
|
+
.db-button[data-variant=filled]:hover:not(:disabled, [aria-disabled=true]) {
|
|
243
|
+
cursor: var(--db-overwrite-cursor, pointer);
|
|
244
|
+
background-color: var(--db-adaptive-bg-basic-transparent-semi-hovered);
|
|
241
245
|
}
|
|
242
|
-
.db-button[data-
|
|
243
|
-
|
|
244
|
-
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
245
|
-
font-size: 0;
|
|
246
|
+
.db-button[data-variant=filled]:hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-button[data-variant=filled]:hover:not(:disabled, [aria-disabled=true]):is(input) {
|
|
247
|
+
cursor: initial;
|
|
246
248
|
}
|
|
247
|
-
.db-button[data-
|
|
248
|
-
|
|
249
|
+
.db-button[data-variant=filled]:hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-button[data-variant=filled]:hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
250
|
+
cursor: pointer;
|
|
251
|
+
}
|
|
252
|
+
.db-button[data-variant=filled]:active:not(:disabled, [aria-disabled=true]) {
|
|
253
|
+
cursor: var(--db-overwrite-cursor, pointer);
|
|
254
|
+
background-color: var(--db-adaptive-bg-basic-transparent-semi-pressed);
|
|
255
|
+
}
|
|
256
|
+
.db-button[data-variant=filled]:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-button[data-variant=filled]:active:not(:disabled, [aria-disabled=true]):is(input) {
|
|
257
|
+
cursor: initial;
|
|
258
|
+
}
|
|
259
|
+
.db-button[data-variant=filled]:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-button[data-variant=filled]:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
260
|
+
cursor: pointer;
|
|
249
261
|
}
|
|
250
|
-
.db-button
|
|
251
|
-
|
|
262
|
+
.db-button:disabled {
|
|
263
|
+
opacity: var(--db-opacity-md);
|
|
252
264
|
}
|
|
253
265
|
.db-button:has(> .db-button) {
|
|
254
266
|
margin: 0;
|
|
@@ -21,14 +21,6 @@
|
|
|
21
21
|
// disable text-decoration if someone wants to use the button for an <a> tag
|
|
22
22
|
text-decoration: none;
|
|
23
23
|
|
|
24
|
-
@include helpers.hover {
|
|
25
|
-
background-color: colors.$db-adaptive-bg-basic-transparent-hovered;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@include helpers.active {
|
|
29
|
-
background-color: colors.$db-adaptive-bg-basic-transparent-pressed;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
24
|
// Square icon only buttons
|
|
33
25
|
&[data-no-text="true"] {
|
|
34
26
|
@include icons.is-icon-text-replace();
|
|
@@ -92,27 +84,32 @@
|
|
|
92
84
|
&[data-variant=""],
|
|
93
85
|
&[data-variant="ghost"] {
|
|
94
86
|
background-color: colors.$db-adaptive-bg-basic-transparent-full-default;
|
|
87
|
+
|
|
88
|
+
@include helpers.hover {
|
|
89
|
+
background-color: colors.$db-adaptive-bg-basic-transparent-full-hovered;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@include helpers.active {
|
|
93
|
+
background-color: colors.$db-adaptive-bg-basic-transparent-full-pressed;
|
|
94
|
+
}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
&[data-variant="filled"] {
|
|
98
98
|
background-color: colors.$db-adaptive-bg-basic-transparent-semi-default;
|
|
99
|
+
|
|
100
|
+
@include helpers.hover {
|
|
101
|
+
background-color: colors.$db-adaptive-bg-basic-transparent-semi-hovered;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@include helpers.active {
|
|
105
|
+
background-color: colors.$db-adaptive-bg-basic-transparent-semi-pressed;
|
|
106
|
+
}
|
|
99
107
|
}
|
|
100
108
|
|
|
101
109
|
&:disabled {
|
|
102
110
|
opacity: variables.$db-opacity-md;
|
|
103
111
|
}
|
|
104
112
|
|
|
105
|
-
// States (currently only "loading")
|
|
106
|
-
&[data-state="loading"] {
|
|
107
|
-
@include icons.is-icon-text-replace();
|
|
108
|
-
|
|
109
|
-
font-size: 0;
|
|
110
|
-
|
|
111
|
-
&::before {
|
|
112
|
-
content: "";
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
113
|
// Workaround for current stencil implementation for header
|
|
117
114
|
&:has(> .db-button) {
|
|
118
115
|
margin: 0;
|
|
@@ -6,6 +6,8 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
6
6
|
/* Border */
|
|
7
7
|
/* Opacity */
|
|
8
8
|
/* Transitions */
|
|
9
|
+
/* Screen sizes */
|
|
10
|
+
/* Container sizes */
|
|
9
11
|
/* Variants for adaptive components like input, select, notification, ... */
|
|
10
12
|
@layer variables {}
|
|
11
13
|
|
|
@@ -54,10 +56,47 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
54
56
|
border-radius: var(--default-card-border-radius, var(--db-border-radius-sm));
|
|
55
57
|
}
|
|
56
58
|
|
|
59
|
+
:is(a, button) {
|
|
60
|
+
/* stylelint-disable-next-line a11y/selector-pseudo-class-focus */
|
|
61
|
+
}
|
|
62
|
+
:is(a, button):has(.db-card) {
|
|
63
|
+
all: unset;
|
|
64
|
+
}
|
|
65
|
+
:is(a, button):hover:not(:disabled, [aria-disabled=true]) {
|
|
66
|
+
cursor: var(--db-overwrite-cursor, pointer);
|
|
67
|
+
}
|
|
68
|
+
:is(a, button):hover:not(:disabled, [aria-disabled=true]) > .db-card,
|
|
69
|
+
:is(a, button):hover:not(:disabled, [aria-disabled=true]) > db-card > .db-card {
|
|
70
|
+
background-color: var(--db-card-background-color-hovered);
|
|
71
|
+
}
|
|
72
|
+
:is(a, button):hover:not(:disabled, [aria-disabled=true]):is(textarea), :is(a, button):hover:not(:disabled, [aria-disabled=true]):is(input) {
|
|
73
|
+
cursor: initial;
|
|
74
|
+
}
|
|
75
|
+
:is(a, button):hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), :is(a, button):hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
}
|
|
78
|
+
:is(a, button):active:not(:disabled, [aria-disabled=true]) {
|
|
79
|
+
cursor: var(--db-overwrite-cursor, pointer);
|
|
80
|
+
}
|
|
81
|
+
:is(a, button):active:not(:disabled, [aria-disabled=true]) > .db-card,
|
|
82
|
+
:is(a, button):active:not(:disabled, [aria-disabled=true]) > db-card > .db-card {
|
|
83
|
+
background-color: var(--db-card-background-color-pressed);
|
|
84
|
+
}
|
|
85
|
+
:is(a, button):active:not(:disabled, [aria-disabled=true]):is(textarea), :is(a, button):active:not(:disabled, [aria-disabled=true]):is(input) {
|
|
86
|
+
cursor: initial;
|
|
87
|
+
}
|
|
88
|
+
:is(a, button):active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), :is(a, button):active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
}
|
|
91
|
+
|
|
57
92
|
.db-card {
|
|
93
|
+
--db-card-background-color-default: var(--db-adaptive-bg-basic-level-1-default);
|
|
94
|
+
--db-card-background-color-hovered: var(--db-adaptive-bg-basic-level-1-hovered);
|
|
95
|
+
--db-card-background-color-pressed: var(--db-adaptive-bg-basic-level-1-pressed);
|
|
58
96
|
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
59
97
|
display: flex;
|
|
60
98
|
flex-direction: column;
|
|
99
|
+
background-color: var(--db-card-background-color-default);
|
|
61
100
|
}
|
|
62
101
|
.db-card:not([data-spacing]) {
|
|
63
102
|
padding: var(--db-spacing-fixed-sm);
|
|
@@ -74,81 +113,36 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
|
|
|
74
113
|
.db-card[data-spacing=none] {
|
|
75
114
|
padding: 0;
|
|
76
115
|
}
|
|
77
|
-
.db-card[data-
|
|
78
|
-
background-color: var(--db-adaptive-bg-basic-level-1-default);
|
|
79
|
-
}
|
|
80
|
-
.db-card[data-elevation-level="1"][data-behavior=interactive], .db-card:not([data-elevation-level])[data-behavior=interactive] {
|
|
116
|
+
.db-card[data-behavior=interactive] {
|
|
81
117
|
/* stylelint-disable-next-line a11y/selector-pseudo-class-focus */
|
|
82
118
|
}
|
|
83
|
-
.db-card[data-
|
|
119
|
+
.db-card[data-behavior=interactive]:hover:not(:disabled, [aria-disabled=true]) {
|
|
84
120
|
cursor: var(--db-overwrite-cursor, pointer);
|
|
85
|
-
background-color: var(--db-
|
|
121
|
+
background-color: var(--db-card-background-color-hovered);
|
|
86
122
|
}
|
|
87
|
-
.db-card[data-
|
|
123
|
+
.db-card[data-behavior=interactive]:hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-card[data-behavior=interactive]:hover:not(:disabled, [aria-disabled=true]):is(input) {
|
|
88
124
|
cursor: initial;
|
|
89
125
|
}
|
|
90
|
-
.db-card[data-
|
|
126
|
+
.db-card[data-behavior=interactive]:hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-card[data-behavior=interactive]:hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
91
127
|
cursor: pointer;
|
|
92
128
|
}
|
|
93
|
-
.db-card[data-
|
|
129
|
+
.db-card[data-behavior=interactive]:active:not(:disabled, [aria-disabled=true]) {
|
|
94
130
|
cursor: var(--db-overwrite-cursor, pointer);
|
|
95
|
-
background-color: var(--db-
|
|
131
|
+
background-color: var(--db-card-background-color-pressed);
|
|
96
132
|
}
|
|
97
|
-
.db-card[data-
|
|
133
|
+
.db-card[data-behavior=interactive]:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-card[data-behavior=interactive]:active:not(:disabled, [aria-disabled=true]):is(input) {
|
|
98
134
|
cursor: initial;
|
|
99
135
|
}
|
|
100
|
-
.db-card[data-
|
|
136
|
+
.db-card[data-behavior=interactive]:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-card[data-behavior=interactive]:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
101
137
|
cursor: pointer;
|
|
102
138
|
}
|
|
103
139
|
.db-card[data-elevation-level="2"] {
|
|
104
|
-
background-color: var(--db-adaptive-bg-basic-level-2-default);
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
/* stylelint-disable-next-line a11y/selector-pseudo-class-focus */
|
|
108
|
-
}
|
|
109
|
-
.db-card[data-elevation-level="2"][data-behavior=interactive]:hover:not(:disabled, [aria-disabled=true]) {
|
|
110
|
-
cursor: var(--db-overwrite-cursor, pointer);
|
|
111
|
-
background-color: var(--db-adaptive-bg-basic-level-2-hovered);
|
|
112
|
-
}
|
|
113
|
-
.db-card[data-elevation-level="2"][data-behavior=interactive]:hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-card[data-elevation-level="2"][data-behavior=interactive]:hover:not(:disabled, [aria-disabled=true]):is(input) {
|
|
114
|
-
cursor: initial;
|
|
115
|
-
}
|
|
116
|
-
.db-card[data-elevation-level="2"][data-behavior=interactive]:hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-card[data-elevation-level="2"][data-behavior=interactive]:hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
117
|
-
cursor: pointer;
|
|
118
|
-
}
|
|
119
|
-
.db-card[data-elevation-level="2"][data-behavior=interactive]:active:not(:disabled, [aria-disabled=true]) {
|
|
120
|
-
cursor: var(--db-overwrite-cursor, pointer);
|
|
121
|
-
background-color: var(--db-adaptive-bg-basic-level-2-pressed);
|
|
122
|
-
}
|
|
123
|
-
.db-card[data-elevation-level="2"][data-behavior=interactive]:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-card[data-elevation-level="2"][data-behavior=interactive]:active:not(:disabled, [aria-disabled=true]):is(input) {
|
|
124
|
-
cursor: initial;
|
|
125
|
-
}
|
|
126
|
-
.db-card[data-elevation-level="2"][data-behavior=interactive]:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-card[data-elevation-level="2"][data-behavior=interactive]:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
127
|
-
cursor: pointer;
|
|
140
|
+
--db-card-background-color-default: var(--db-adaptive-bg-basic-level-2-default);
|
|
141
|
+
--db-card-background-color-hovered: var(--db-adaptive-bg-basic-level-2-hovered);
|
|
142
|
+
--db-card-background-color-pressed: var(--db-adaptive-bg-basic-level-2-pressed);
|
|
128
143
|
}
|
|
129
144
|
.db-card[data-elevation-level="3"] {
|
|
130
|
-
background-color: var(--db-adaptive-bg-basic-level-3-default);
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
/* stylelint-disable-next-line a11y/selector-pseudo-class-focus */
|
|
134
|
-
}
|
|
135
|
-
.db-card[data-elevation-level="3"][data-behavior=interactive]:hover:not(:disabled, [aria-disabled=true]) {
|
|
136
|
-
cursor: var(--db-overwrite-cursor, pointer);
|
|
137
|
-
background-color: var(--db-adaptive-bg-basic-level-3-hovered);
|
|
138
|
-
}
|
|
139
|
-
.db-card[data-elevation-level="3"][data-behavior=interactive]:hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-card[data-elevation-level="3"][data-behavior=interactive]:hover:not(:disabled, [aria-disabled=true]):is(input) {
|
|
140
|
-
cursor: initial;
|
|
141
|
-
}
|
|
142
|
-
.db-card[data-elevation-level="3"][data-behavior=interactive]:hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-card[data-elevation-level="3"][data-behavior=interactive]:hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
143
|
-
cursor: pointer;
|
|
144
|
-
}
|
|
145
|
-
.db-card[data-elevation-level="3"][data-behavior=interactive]:active:not(:disabled, [aria-disabled=true]) {
|
|
146
|
-
cursor: var(--db-overwrite-cursor, pointer);
|
|
147
|
-
background-color: var(--db-adaptive-bg-basic-level-3-pressed);
|
|
148
|
-
}
|
|
149
|
-
.db-card[data-elevation-level="3"][data-behavior=interactive]:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-card[data-elevation-level="3"][data-behavior=interactive]:active:not(:disabled, [aria-disabled=true]):is(input) {
|
|
150
|
-
cursor: initial;
|
|
151
|
-
}
|
|
152
|
-
.db-card[data-elevation-level="3"][data-behavior=interactive]:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-card[data-elevation-level="3"][data-behavior=interactive]:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
|
|
153
|
-
cursor: pointer;
|
|
145
|
+
--db-card-background-color-default: var(--db-adaptive-bg-basic-level-3-default);
|
|
146
|
+
--db-card-background-color-hovered: var(--db-adaptive-bg-basic-level-3-hovered);
|
|
147
|
+
--db-card-background-color-pressed: var(--db-adaptive-bg-basic-level-3-pressed);
|
|
154
148
|
}
|
|
@@ -3,54 +3,58 @@
|
|
|
3
3
|
@use "@db-ux/core-foundations/build/styles/helpers";
|
|
4
4
|
@use "../../styles/internal/component";
|
|
5
5
|
|
|
6
|
+
:is(a, button) {
|
|
7
|
+
&:has(.db-card) {
|
|
8
|
+
all: unset;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@include helpers.hover {
|
|
12
|
+
> .db-card,
|
|
13
|
+
> db-card > .db-card {
|
|
14
|
+
background-color: var(--db-card-background-color-hovered);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@include helpers.active {
|
|
19
|
+
> .db-card,
|
|
20
|
+
> db-card > .db-card {
|
|
21
|
+
background-color: var(--db-card-background-color-pressed);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
6
26
|
.db-card {
|
|
27
|
+
--db-card-background-color-default: #{colors.$db-adaptive-bg-basic-level-1-default};
|
|
28
|
+
--db-card-background-color-hovered: #{colors.$db-adaptive-bg-basic-level-1-hovered};
|
|
29
|
+
--db-card-background-color-pressed: #{colors.$db-adaptive-bg-basic-level-1-pressed};
|
|
30
|
+
|
|
7
31
|
@extend %default-card;
|
|
8
32
|
|
|
9
33
|
@include component.get-data-spacing();
|
|
10
34
|
|
|
11
35
|
display: flex;
|
|
12
36
|
flex-direction: column;
|
|
37
|
+
background-color: var(--db-card-background-color-default);
|
|
13
38
|
|
|
14
|
-
&[data-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
&[data-behavior="interactive"] {
|
|
19
|
-
@include helpers.hover {
|
|
20
|
-
background-color: colors.$db-adaptive-bg-basic-level-1-hovered;
|
|
21
|
-
}
|
|
39
|
+
&[data-behavior="interactive"] {
|
|
40
|
+
@include helpers.hover {
|
|
41
|
+
background-color: var(--db-card-background-color-hovered);
|
|
42
|
+
}
|
|
22
43
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
44
|
+
@include helpers.active {
|
|
45
|
+
background-color: var(--db-card-background-color-pressed);
|
|
26
46
|
}
|
|
27
47
|
}
|
|
28
48
|
|
|
29
49
|
&[data-elevation-level="2"] {
|
|
30
|
-
background-color: colors.$db-adaptive-bg-basic-level-2-default;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
@include helpers.hover {
|
|
34
|
-
background-color: colors.$db-adaptive-bg-basic-level-2-hovered;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@include helpers.active {
|
|
38
|
-
background-color: colors.$db-adaptive-bg-basic-level-2-pressed;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
50
|
+
--db-card-background-color-default: #{colors.$db-adaptive-bg-basic-level-2-default};
|
|
51
|
+
--db-card-background-color-hovered: #{colors.$db-adaptive-bg-basic-level-2-hovered};
|
|
52
|
+
--db-card-background-color-pressed: #{colors.$db-adaptive-bg-basic-level-2-pressed};
|
|
41
53
|
}
|
|
42
54
|
|
|
43
55
|
&[data-elevation-level="3"] {
|
|
44
|
-
background-color: colors.$db-adaptive-bg-basic-level-3-default;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
@include helpers.hover {
|
|
48
|
-
background-color: colors.$db-adaptive-bg-basic-level-3-hovered;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@include helpers.active {
|
|
52
|
-
background-color: colors.$db-adaptive-bg-basic-level-3-pressed;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
56
|
+
--db-card-background-color-default: #{colors.$db-adaptive-bg-basic-level-3-default};
|
|
57
|
+
--db-card-background-color-hovered: #{colors.$db-adaptive-bg-basic-level-3-hovered};
|
|
58
|
+
--db-card-background-color-pressed: #{colors.$db-adaptive-bg-basic-level-3-pressed};
|
|
55
59
|
}
|
|
56
60
|
}
|