@db-ux/core-components 4.5.4-mcp-e4cd7e6 → 4.5.4-table-c758ae7
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 +30 -0
- package/build/assets/icons/LICENCES.json +12 -0
- package/build/assets/icons/arrows_vertical.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/assets/icons/more_vertical.svg +1 -0
- package/build/components/checkbox/checkbox.css +1 -1
- package/build/components/radio/radio.css +1 -1
- package/build/components/switch/switch.css +1 -1
- package/build/components/table/table.css +701 -0
- package/build/components/table/table.scss +297 -0
- package/build/components/table-body/table-body.css +40 -0
- package/build/components/table-body/table-body.scss +5 -0
- package/build/components/table-caption/table-caption.css +3 -0
- package/build/components/table-caption/table-caption.scss +3 -0
- package/build/components/table-data-cell/table-data-cell.css +176 -0
- package/build/components/table-data-cell/table-data-cell.scss +5 -0
- package/build/components/table-footer/table-footer.css +40 -0
- package/build/components/table-footer/table-footer.scss +5 -0
- package/build/components/table-head/table-head.css +51 -0
- package/build/components/table-head/table-head.scss +17 -0
- package/build/components/table-header-cell/table-header-cell.css +180 -0
- package/build/components/table-header-cell/table-header-cell.scss +9 -0
- package/build/components/table-row/table-row.css +128 -0
- package/build/components/table-row/table-row.scss +106 -0
- package/build/styles/absolute.css +8 -8
- package/build/styles/index.css +7 -7
- package/build/styles/index.scss +8 -0
- package/build/styles/internal/_custom-elements.scss +3 -1
- package/build/styles/internal/_form-components.scss +1 -1
- package/build/styles/internal/_table-components.scss +60 -0
- package/build/styles/relative.css +8 -8
- package/build/styles/rollup.css +8 -8
- package/build/styles/wc-workarounds.css +1 -1
- package/build/styles/webpack.css +8 -8
- package/package.json +2 -2
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/* Variants for adaptive components like input, select, notification, ... */
|
|
2
|
+
@layer variables {}
|
|
3
|
+
|
|
4
|
+
@layer variables {}
|
|
5
|
+
|
|
6
|
+
@layer variables {}
|
|
7
|
+
|
|
8
|
+
@layer variables {}
|
|
9
|
+
|
|
10
|
+
@layer variables {}
|
|
11
|
+
|
|
12
|
+
@layer variables {}
|
|
13
|
+
|
|
14
|
+
@layer variables {}
|
|
15
|
+
|
|
16
|
+
@layer variables {}
|
|
17
|
+
|
|
18
|
+
@layer variables {}
|
|
19
|
+
|
|
20
|
+
@layer variables {}
|
|
21
|
+
|
|
22
|
+
@layer variables {}
|
|
23
|
+
|
|
24
|
+
@layer variables {}
|
|
25
|
+
|
|
26
|
+
@layer variables {}
|
|
27
|
+
|
|
28
|
+
@layer variables {}
|
|
29
|
+
|
|
30
|
+
@layer variables {}
|
|
31
|
+
|
|
32
|
+
@layer variables {}
|
|
33
|
+
|
|
34
|
+
@layer variables {}
|
|
35
|
+
|
|
36
|
+
.db-table-header-cell {
|
|
37
|
+
display: flex;
|
|
38
|
+
}
|
|
39
|
+
[colspan="2"].db-table-header-cell {
|
|
40
|
+
grid-column: span var(--db-table-cell-span, 2);
|
|
41
|
+
}
|
|
42
|
+
[rowspan="2"].db-table-header-cell {
|
|
43
|
+
grid-row: span var(--db-table-cell-span, 2);
|
|
44
|
+
}
|
|
45
|
+
[colspan="3"].db-table-header-cell {
|
|
46
|
+
grid-column: span var(--db-table-cell-span, 3);
|
|
47
|
+
}
|
|
48
|
+
[rowspan="3"].db-table-header-cell {
|
|
49
|
+
grid-row: span var(--db-table-cell-span, 3);
|
|
50
|
+
}
|
|
51
|
+
[colspan="4"].db-table-header-cell {
|
|
52
|
+
grid-column: span var(--db-table-cell-span, 4);
|
|
53
|
+
}
|
|
54
|
+
[rowspan="4"].db-table-header-cell {
|
|
55
|
+
grid-row: span var(--db-table-cell-span, 4);
|
|
56
|
+
}
|
|
57
|
+
[colspan="5"].db-table-header-cell {
|
|
58
|
+
grid-column: span var(--db-table-cell-span, 5);
|
|
59
|
+
}
|
|
60
|
+
[rowspan="5"].db-table-header-cell {
|
|
61
|
+
grid-row: span var(--db-table-cell-span, 5);
|
|
62
|
+
}
|
|
63
|
+
[colspan="6"].db-table-header-cell {
|
|
64
|
+
grid-column: span var(--db-table-cell-span, 6);
|
|
65
|
+
}
|
|
66
|
+
[rowspan="6"].db-table-header-cell {
|
|
67
|
+
grid-row: span var(--db-table-cell-span, 6);
|
|
68
|
+
}
|
|
69
|
+
[colspan="7"].db-table-header-cell {
|
|
70
|
+
grid-column: span var(--db-table-cell-span, 7);
|
|
71
|
+
}
|
|
72
|
+
[rowspan="7"].db-table-header-cell {
|
|
73
|
+
grid-row: span var(--db-table-cell-span, 7);
|
|
74
|
+
}
|
|
75
|
+
[colspan="8"].db-table-header-cell {
|
|
76
|
+
grid-column: span var(--db-table-cell-span, 8);
|
|
77
|
+
}
|
|
78
|
+
[rowspan="8"].db-table-header-cell {
|
|
79
|
+
grid-row: span var(--db-table-cell-span, 8);
|
|
80
|
+
}
|
|
81
|
+
[colspan="9"].db-table-header-cell {
|
|
82
|
+
grid-column: span var(--db-table-cell-span, 9);
|
|
83
|
+
}
|
|
84
|
+
[rowspan="9"].db-table-header-cell {
|
|
85
|
+
grid-row: span var(--db-table-cell-span, 9);
|
|
86
|
+
}
|
|
87
|
+
[colspan="10"].db-table-header-cell {
|
|
88
|
+
grid-column: span var(--db-table-cell-span, 10);
|
|
89
|
+
}
|
|
90
|
+
[rowspan="10"].db-table-header-cell {
|
|
91
|
+
grid-row: span var(--db-table-cell-span, 10);
|
|
92
|
+
}
|
|
93
|
+
[colspan="11"].db-table-header-cell {
|
|
94
|
+
grid-column: span var(--db-table-cell-span, 11);
|
|
95
|
+
}
|
|
96
|
+
[rowspan="11"].db-table-header-cell {
|
|
97
|
+
grid-row: span var(--db-table-cell-span, 11);
|
|
98
|
+
}
|
|
99
|
+
[colspan="12"].db-table-header-cell {
|
|
100
|
+
grid-column: span var(--db-table-cell-span, 12);
|
|
101
|
+
}
|
|
102
|
+
[rowspan="12"].db-table-header-cell {
|
|
103
|
+
grid-row: span var(--db-table-cell-span, 12);
|
|
104
|
+
}
|
|
105
|
+
[colspan="13"].db-table-header-cell {
|
|
106
|
+
grid-column: span var(--db-table-cell-span, 13);
|
|
107
|
+
}
|
|
108
|
+
[rowspan="13"].db-table-header-cell {
|
|
109
|
+
grid-row: span var(--db-table-cell-span, 13);
|
|
110
|
+
}
|
|
111
|
+
[colspan="14"].db-table-header-cell {
|
|
112
|
+
grid-column: span var(--db-table-cell-span, 14);
|
|
113
|
+
}
|
|
114
|
+
[rowspan="14"].db-table-header-cell {
|
|
115
|
+
grid-row: span var(--db-table-cell-span, 14);
|
|
116
|
+
}
|
|
117
|
+
[colspan="15"].db-table-header-cell {
|
|
118
|
+
grid-column: span var(--db-table-cell-span, 15);
|
|
119
|
+
}
|
|
120
|
+
[rowspan="15"].db-table-header-cell {
|
|
121
|
+
grid-row: span var(--db-table-cell-span, 15);
|
|
122
|
+
}
|
|
123
|
+
[colspan="16"].db-table-header-cell {
|
|
124
|
+
grid-column: span var(--db-table-cell-span, 16);
|
|
125
|
+
}
|
|
126
|
+
[rowspan="16"].db-table-header-cell {
|
|
127
|
+
grid-row: span var(--db-table-cell-span, 16);
|
|
128
|
+
}
|
|
129
|
+
[colspan="17"].db-table-header-cell {
|
|
130
|
+
grid-column: span var(--db-table-cell-span, 17);
|
|
131
|
+
}
|
|
132
|
+
[rowspan="17"].db-table-header-cell {
|
|
133
|
+
grid-row: span var(--db-table-cell-span, 17);
|
|
134
|
+
}
|
|
135
|
+
[colspan="18"].db-table-header-cell {
|
|
136
|
+
grid-column: span var(--db-table-cell-span, 18);
|
|
137
|
+
}
|
|
138
|
+
[rowspan="18"].db-table-header-cell {
|
|
139
|
+
grid-row: span var(--db-table-cell-span, 18);
|
|
140
|
+
}
|
|
141
|
+
[colspan="19"].db-table-header-cell {
|
|
142
|
+
grid-column: span var(--db-table-cell-span, 19);
|
|
143
|
+
}
|
|
144
|
+
[rowspan="19"].db-table-header-cell {
|
|
145
|
+
grid-row: span var(--db-table-cell-span, 19);
|
|
146
|
+
}
|
|
147
|
+
[colspan="20"].db-table-header-cell {
|
|
148
|
+
grid-column: span var(--db-table-cell-span, 20);
|
|
149
|
+
}
|
|
150
|
+
[rowspan="20"].db-table-header-cell {
|
|
151
|
+
grid-row: span var(--db-table-cell-span, 20);
|
|
152
|
+
}
|
|
153
|
+
.db-table-header-cell:not([data-horizontal-alignment]), [data-horizontal-alignment=start].db-table-header-cell {
|
|
154
|
+
text-align: start;
|
|
155
|
+
justify-content: flex-start;
|
|
156
|
+
}
|
|
157
|
+
[data-horizontal-alignment=center].db-table-header-cell {
|
|
158
|
+
text-align: center;
|
|
159
|
+
justify-content: center;
|
|
160
|
+
}
|
|
161
|
+
[data-horizontal-alignment=end].db-table-header-cell {
|
|
162
|
+
text-align: end;
|
|
163
|
+
justify-content: flex-end;
|
|
164
|
+
}
|
|
165
|
+
[data-vertical-alignment=start].db-table-header-cell {
|
|
166
|
+
vertical-align: top;
|
|
167
|
+
align-items: flex-start;
|
|
168
|
+
}
|
|
169
|
+
.db-table-header-cell:not([data-vertical-alignment]), [data-vertical-alignment=center].db-table-header-cell {
|
|
170
|
+
vertical-align: middle;
|
|
171
|
+
align-items: center;
|
|
172
|
+
}
|
|
173
|
+
[data-vertical-alignment=end].db-table-header-cell {
|
|
174
|
+
vertical-align: bottom;
|
|
175
|
+
align-items: flex-end;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.db-table-header-cell[data-no-text=true] {
|
|
179
|
+
font-size: 0 !important;
|
|
180
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/* Variants for adaptive components like input, select, notification, ... */
|
|
2
|
+
@layer variables {}
|
|
3
|
+
|
|
4
|
+
@layer variables {}
|
|
5
|
+
|
|
6
|
+
@layer variables {}
|
|
7
|
+
|
|
8
|
+
@layer variables {}
|
|
9
|
+
|
|
10
|
+
@layer variables {}
|
|
11
|
+
|
|
12
|
+
@layer variables {}
|
|
13
|
+
|
|
14
|
+
@layer variables {}
|
|
15
|
+
|
|
16
|
+
@layer variables {}
|
|
17
|
+
|
|
18
|
+
@layer variables {}
|
|
19
|
+
|
|
20
|
+
@layer variables {}
|
|
21
|
+
|
|
22
|
+
@layer variables {}
|
|
23
|
+
|
|
24
|
+
@layer variables {}
|
|
25
|
+
|
|
26
|
+
@layer variables {}
|
|
27
|
+
|
|
28
|
+
@layer variables {}
|
|
29
|
+
|
|
30
|
+
@layer variables {}
|
|
31
|
+
|
|
32
|
+
@layer variables {}
|
|
33
|
+
|
|
34
|
+
@layer variables {}
|
|
35
|
+
|
|
36
|
+
.db-table-row[data-interactive=true]:not([data-disable-focus=true]):has(:is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select):focus-visible)::after {
|
|
37
|
+
outline: var(--db-border-width-2xs) solid var(--db-focus-outline-color, var(--db-informational-on-bg-basic-emphasis-70-default));
|
|
38
|
+
outline-offset: var(--db-border-width-xs);
|
|
39
|
+
box-shadow: 0 0 0 var(--db-border-width-xs) var(--db-focus-box-shadow-bg-color, transparent);
|
|
40
|
+
}
|
|
41
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
42
|
+
.db-table-row[data-interactive=true]:not([data-disable-focus=true]):has(:is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select):focus-visible)::after {
|
|
43
|
+
transition: outline var(--db-transition-duration-extra-fast), box-shadow var(--db-transition-duration-extra-fast);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
.db-table-row[data-interactive=true]:not([data-disable-focus=true]):not([type=radio], [role=switch]):has(:is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select):focus-visible)::after {
|
|
47
|
+
border-radius: var(--db-border-radius-xs);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.db-table-row {
|
|
51
|
+
display: var(--db-table-section-display, grid);
|
|
52
|
+
grid-template-columns: subgrid;
|
|
53
|
+
grid-column: 1/-1;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.db-table-row[data-interactive=true]::after, .db-table-row[data-interactive=true] :is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select)[data-icon-trailing]::before, .db-table-row[data-interactive=true] :is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select):not([data-icon-trailing])::after {
|
|
57
|
+
content: "";
|
|
58
|
+
position: absolute;
|
|
59
|
+
inset: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.db-table-row {
|
|
63
|
+
background-color: var(--db-adaptive-bg-basic-level-1-default);
|
|
64
|
+
}
|
|
65
|
+
.db-table-row[data-interactive=true] {
|
|
66
|
+
position: relative;
|
|
67
|
+
}
|
|
68
|
+
.db-table-row[data-interactive=true] td :is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])):not([data-table-row-action=true]) {
|
|
69
|
+
position: relative;
|
|
70
|
+
z-index: 1;
|
|
71
|
+
}
|
|
72
|
+
.db-table-row[data-interactive=true]:has(input:is([type=radio],
|
|
73
|
+
[type=checkbox]):is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select):checked:not(:hover, :active)) {
|
|
74
|
+
background-color: var(--db-adaptive-bg-basic-level-2-default);
|
|
75
|
+
}
|
|
76
|
+
.db-table-row[data-interactive=true]:has(:is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select):hover:not(:disabled,
|
|
77
|
+
[aria-disabled=true],
|
|
78
|
+
[tabindex="-1"])) {
|
|
79
|
+
cursor: var(--db-overwrite-cursor, pointer);
|
|
80
|
+
background-color: var(--db-adaptive-bg-basic-level-2-hovered);
|
|
81
|
+
}
|
|
82
|
+
.db-table-row[data-interactive=true]:has(:is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select):hover:not(:disabled,
|
|
83
|
+
[aria-disabled=true],
|
|
84
|
+
[tabindex="-1"])):is(textarea), .db-table-row[data-interactive=true]:has(:is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select):hover:not(:disabled,
|
|
85
|
+
[aria-disabled=true],
|
|
86
|
+
[tabindex="-1"])):is(input) {
|
|
87
|
+
cursor: initial;
|
|
88
|
+
}
|
|
89
|
+
.db-table-row[data-interactive=true]:has(:is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select):hover:not(:disabled,
|
|
90
|
+
[aria-disabled=true],
|
|
91
|
+
[tabindex="-1"])):is(input[type=checkbox]), .db-table-row[data-interactive=true]:has(:is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select):hover:not(:disabled,
|
|
92
|
+
[aria-disabled=true],
|
|
93
|
+
[tabindex="-1"])):is(input[type=radio]:not(:checked)) {
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
}
|
|
96
|
+
.db-table-row[data-interactive=true]:has(:is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select):active:not(:disabled,
|
|
97
|
+
[aria-disabled=true],
|
|
98
|
+
[tabindex="-1"])) {
|
|
99
|
+
cursor: var(--db-overwrite-cursor, pointer);
|
|
100
|
+
background-color: var(--db-adaptive-bg-basic-level-2-pressed);
|
|
101
|
+
}
|
|
102
|
+
.db-table-row[data-interactive=true]:has(:is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select):active:not(:disabled,
|
|
103
|
+
[aria-disabled=true],
|
|
104
|
+
[tabindex="-1"])):is(textarea), .db-table-row[data-interactive=true]:has(:is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select):active:not(:disabled,
|
|
105
|
+
[aria-disabled=true],
|
|
106
|
+
[tabindex="-1"])):is(input) {
|
|
107
|
+
cursor: initial;
|
|
108
|
+
}
|
|
109
|
+
.db-table-row[data-interactive=true]:has(:is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select):active:not(:disabled,
|
|
110
|
+
[aria-disabled=true],
|
|
111
|
+
[tabindex="-1"])):is(input[type=checkbox]), .db-table-row[data-interactive=true]:has(:is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select):active:not(:disabled,
|
|
112
|
+
[aria-disabled=true],
|
|
113
|
+
[tabindex="-1"])):is(input[type=radio]:not(:checked)) {
|
|
114
|
+
cursor: pointer;
|
|
115
|
+
}
|
|
116
|
+
.db-table-row[data-interactive=true] :is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select) {
|
|
117
|
+
--db-tooltip-parent-position: static;
|
|
118
|
+
--db-focus-outline-color: transparent;
|
|
119
|
+
/* We set focus on complete row element, we remove it from interactive child with this trick */
|
|
120
|
+
/* stylelint-disable-next-line a11y/no-outline-none */
|
|
121
|
+
}
|
|
122
|
+
.db-table-row[data-interactive=true] :is([data-table-row-action=true]:is(input, button, a, select, textarea, [role=button], [role=link], [tabindex]:not([tabindex="-1"])), [data-table-row-action=true] input, textarea, select):focus-visible {
|
|
123
|
+
outline: none;
|
|
124
|
+
}
|
|
125
|
+
.db-table-row[data-interactive=true]::after {
|
|
126
|
+
pointer-events: none;
|
|
127
|
+
z-index: 2;
|
|
128
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
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 "./../../styles/internal/table-components";
|
|
5
|
+
|
|
6
|
+
$interactive-elements: ':is(input,button,a,select,textarea,[role="button"],[role="link"],[tabindex]:not([tabindex="-1"]))';
|
|
7
|
+
$interactive-row-action: '[data-table-row-action="true"]';
|
|
8
|
+
$interactive-nested-child: "#{$interactive-row-action} input,textarea,select";
|
|
9
|
+
$interactive-child: ":is(#{$interactive-row-action}#{$interactive-elements},#{$interactive-nested-child})";
|
|
10
|
+
|
|
11
|
+
%full-absolute {
|
|
12
|
+
content: "";
|
|
13
|
+
position: absolute;
|
|
14
|
+
inset: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@mixin table-row-interactive-checked($with-hover: ":not(:hover, :active)") {
|
|
18
|
+
&:has(
|
|
19
|
+
input:is(
|
|
20
|
+
[type="radio"],
|
|
21
|
+
[type="checkbox"]
|
|
22
|
+
)#{$interactive-child}:checked#{$with-hover}
|
|
23
|
+
) {
|
|
24
|
+
@content;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.db-table-row {
|
|
29
|
+
@extend %table-section-grid;
|
|
30
|
+
|
|
31
|
+
background-color: colors.$db-adaptive-bg-basic-level-1-default;
|
|
32
|
+
|
|
33
|
+
&[data-interactive="true"] {
|
|
34
|
+
position: relative;
|
|
35
|
+
|
|
36
|
+
td #{$interactive-elements}:not(#{$interactive-row-action}) {
|
|
37
|
+
position: relative;
|
|
38
|
+
z-index: 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@include table-row-interactive-checked {
|
|
42
|
+
background-color: colors.$db-adaptive-bg-basic-level-2-default;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:has(
|
|
46
|
+
#{$interactive-child}:hover:not(
|
|
47
|
+
:disabled,
|
|
48
|
+
[aria-disabled="true"],
|
|
49
|
+
[tabindex="-1"]
|
|
50
|
+
)
|
|
51
|
+
) {
|
|
52
|
+
@include helpers.cursor-pointer {
|
|
53
|
+
background-color: colors.$db-adaptive-bg-basic-level-2-hovered;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:has(
|
|
58
|
+
#{$interactive-child}:active:not(
|
|
59
|
+
:disabled,
|
|
60
|
+
[aria-disabled="true"],
|
|
61
|
+
[tabindex="-1"]
|
|
62
|
+
)
|
|
63
|
+
) {
|
|
64
|
+
@include helpers.cursor-pointer {
|
|
65
|
+
background-color: colors.$db-adaptive-bg-basic-level-2-pressed;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&:has(#{$interactive-child}:focus-visible) {
|
|
70
|
+
&::after {
|
|
71
|
+
@extend %focus-placeholder;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
#{$interactive-child} {
|
|
76
|
+
// Reset some defaults
|
|
77
|
+
--db-tooltip-parent-position: static;
|
|
78
|
+
--db-focus-outline-color: transparent;
|
|
79
|
+
|
|
80
|
+
/* We set focus on complete row element, we remove it from interactive child with this trick */
|
|
81
|
+
/* stylelint-disable-next-line a11y/no-outline-none */
|
|
82
|
+
&:focus-visible {
|
|
83
|
+
outline: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:not([data-icon-trailing]) {
|
|
87
|
+
&::after {
|
|
88
|
+
@extend %full-absolute;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&[data-icon-trailing] {
|
|
93
|
+
&::before {
|
|
94
|
+
@extend %full-absolute;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&::after {
|
|
100
|
+
@extend %full-absolute;
|
|
101
|
+
|
|
102
|
+
pointer-events: none; // Ignore pointer events to use high z-index to show focus above elements
|
|
103
|
+
z-index: 2;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|