@db-ux/core-components 4.7.0-tabs-34782eb → 4.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @db-ux/core-components
2
2
 
3
+ ## 4.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - fix(dialog): re-added missing styles to native `dialog` HTML element. We'll most likely remove those later again, and provide a DBDialog component. - [see commit ce1b5a0](https://github.com/db-ux-design-system/core-web/commit/ce1b5a061ad0ef14a0ff415aa3a00fa06f217479)
8
+
3
9
  ## 4.7.0
4
10
 
5
11
  ### Minor Changes
@@ -617,30 +617,30 @@ input[type=radio]:checked) > label {
617
617
  inline-size: calc(100% - var(--db-form-component-padding-inline-end) - calc(var(--db-form-has-before) * (var(--db-base-body-icon-font-size-sm) + var(--db-spacing-fixed-sm))) - var(--db-spacing-fixed-sm));
618
618
  }
619
619
 
620
- dialog[class^=db-] {
620
+ dialog {
621
621
  padding: 0;
622
622
  margin: 0;
623
623
  border: 0;
624
624
  z-index: 9996;
625
625
  color: inherit;
626
626
  }
627
- dialog[class^=db-]:not([data-position=absolute])[data-variant], dialog[class^=db-]:not([data-position=absolute])[data-backdrop] {
627
+ dialog:not([data-position=absolute])[data-variant], dialog:not([data-position=absolute])[data-backdrop] {
628
628
  position: fixed;
629
629
  inset: 0;
630
630
  z-index: 9995;
631
631
  }
632
- dialog[class^=db-]:not([data-position=absolute])[data-variant=inside]:not([data-backdrop=none])::before {
632
+ dialog:not([data-position=absolute])[data-variant=inside]:not([data-backdrop=none])::before {
633
633
  content: "";
634
634
  position: fixed;
635
635
  inset: 0;
636
636
  }
637
- dialog[class^=db-]:not([data-backdrop=none])::backdrop, dialog[class^=db-]:not([data-backdrop=none])::before {
637
+ dialog:not([data-backdrop=none])::backdrop, dialog:not([data-backdrop=none])::before {
638
638
  background-color: color(from var(--db-adaptive-on-bg-basic-emphasis-100-default) srgb r g b/var(--db-opacity-lg));
639
639
  }
640
- dialog[class^=db-]:not([data-backdrop=none])[data-backdrop=invisible]::backdrop, dialog[class^=db-]:not([data-backdrop=none])[data-backdrop=invisible]::before {
640
+ dialog:not([data-backdrop=none])[data-backdrop=invisible]::backdrop, dialog:not([data-backdrop=none])[data-backdrop=invisible]::before {
641
641
  background-color: transparent;
642
642
  }
643
- dialog[class^=db-]:not([data-backdrop=none])[data-backdrop=weak]::backdrop, dialog[class^=db-]:not([data-backdrop=none])[data-backdrop=weak]::before {
643
+ dialog:not([data-backdrop=none])[data-backdrop=weak]::backdrop, dialog:not([data-backdrop=none])[data-backdrop=weak]::before {
644
644
  background-color: color(from var(--db-adaptive-on-bg-basic-emphasis-100-default) srgb r g b/var(--db-opacity-sm));
645
645
  }
646
646
 
@@ -16,30 +16,30 @@
16
16
  transform: rotate(1turn);
17
17
  }
18
18
  }
19
- dialog[class^=db-] {
19
+ dialog {
20
20
  padding: 0;
21
21
  margin: 0;
22
22
  border: 0;
23
23
  z-index: 9996;
24
24
  color: inherit;
25
25
  }
26
- dialog[class^=db-]:not([data-position=absolute])[data-variant], dialog[class^=db-]:not([data-position=absolute])[data-backdrop] {
26
+ dialog:not([data-position=absolute])[data-variant], dialog:not([data-position=absolute])[data-backdrop] {
27
27
  position: fixed;
28
28
  inset: 0;
29
29
  z-index: 9995;
30
30
  }
31
- dialog[class^=db-]:not([data-position=absolute])[data-variant=inside]:not([data-backdrop=none])::before {
31
+ dialog:not([data-position=absolute])[data-variant=inside]:not([data-backdrop=none])::before {
32
32
  content: "";
33
33
  position: fixed;
34
34
  inset: 0;
35
35
  }
36
- dialog[class^=db-]:not([data-backdrop=none])::backdrop, dialog[class^=db-]:not([data-backdrop=none])::before {
36
+ dialog:not([data-backdrop=none])::backdrop, dialog:not([data-backdrop=none])::before {
37
37
  background-color: color(from var(--db-adaptive-on-bg-basic-emphasis-100-default) srgb r g b/var(--db-opacity-lg));
38
38
  }
39
- dialog[class^=db-]:not([data-backdrop=none])[data-backdrop=invisible]::backdrop, dialog[class^=db-]:not([data-backdrop=none])[data-backdrop=invisible]::before {
39
+ dialog:not([data-backdrop=none])[data-backdrop=invisible]::backdrop, dialog:not([data-backdrop=none])[data-backdrop=invisible]::before {
40
40
  background-color: transparent;
41
41
  }
42
- dialog[class^=db-]:not([data-backdrop=none])[data-backdrop=weak]::backdrop, dialog[class^=db-]:not([data-backdrop=none])[data-backdrop=weak]::before {
42
+ dialog:not([data-backdrop=none])[data-backdrop=weak]::backdrop, dialog:not([data-backdrop=none])[data-backdrop=weak]::before {
43
43
  background-color: color(from var(--db-adaptive-on-bg-basic-emphasis-100-default) srgb r g b/var(--db-opacity-sm));
44
44
  }
45
45
 
@@ -38,7 +38,10 @@
38
38
  calc(100% - #{variables.$db-spacing-fixed-xl})
39
39
  );
40
40
  /* stylelint-disable-next-line db-ux/use-sizing */
41
- min-block-size: var(--db-drawer-min-height, auto);
41
+ min-block-size: var(
42
+ --db-drawer-min-height,
43
+ auto
44
+ );
42
45
  max-inline-size: none;
43
46
  }
44
47
  }
@@ -168,7 +171,10 @@ $spacings: (
168
171
  calc(100% - #{variables.$db-spacing-fixed-xl})
169
172
  );
170
173
  /* stylelint-disable-next-line db-ux/use-sizing */
171
- min-inline-size: var(--db-drawer-min-width, auto);
174
+ min-inline-size: var(
175
+ --db-drawer-min-width,
176
+ auto
177
+ );
172
178
 
173
179
  &:not([data-direction]),
174
180
  &[data-direction="right"] {
@@ -277,9 +277,6 @@
277
277
  white-space: normal;
278
278
  text-align: start;
279
279
  }
280
- .db-navigation-item[data-force-mobile=true]:not([data-width=full]) {
281
- inline-size: 100%;
282
- }
283
280
  .db-navigation-item[data-force-mobile=true]:not([data-width=full]) .db-navigation-item-expand-button::after {
284
281
  --db-icon-margin-start: auto;
285
282
  }
@@ -287,9 +284,6 @@
287
284
  /* stylelint-disable-next-line media-query-no-invalid */
288
285
  }
289
286
  @media (max-width: 63.9375em) {
290
- .db-navigation-item:not([data-width=full]) {
291
- inline-size: 100%;
292
- }
293
287
  .db-navigation-item:not([data-width=full]) .db-navigation-item-expand-button::after {
294
288
  --db-icon-margin-start: auto;
295
289
  }
@@ -310,9 +304,7 @@
310
304
  }
311
305
  }
312
306
  .db-navigation-item .db-navigation-item-expand-button[data-force-mobile=true][aria-expanded=true] ~ .db-sub-navigation .db-sub-navigation {
313
- inset: 0;
314
- inline-size: 100%;
315
- border-color: transparent;
307
+ inset-block: 0;
316
308
  }
317
309
  .db-navigation-item .db-navigation-item-expand-button[data-force-mobile=true]:not(.db-navigation-item .db-navigation-item-expand-button[data-force-mobile=true][aria-expanded=true]) ~ .db-sub-navigation {
318
310
  transform: translateX(110%);
@@ -338,9 +330,7 @@
338
330
  }
339
331
  @media (max-width: 63.9375em) {
340
332
  .db-navigation-item .db-navigation-item-expand-button[aria-expanded=true] ~ .db-sub-navigation .db-sub-navigation {
341
- inset: 0;
342
- inline-size: 100%;
343
- border-color: transparent;
333
+ inset-block: 0;
344
334
  }
345
335
  .db-navigation-item .db-navigation-item-expand-button:not(.db-navigation-item .db-navigation-item-expand-button[aria-expanded=true]) ~ .db-sub-navigation {
346
336
  transform: translateX(110%);
@@ -399,11 +389,10 @@
399
389
  }
400
390
  .db-sub-navigation[data-force-mobile=true] {
401
391
  padding: var(--db-spacing-fixed-md);
402
- inline-size: calc(100% - var(--db-spacing-fixed-xl));
392
+ inline-size: 100%;
403
393
  position: fixed;
404
394
  overflow: hidden auto;
405
- inset-inline-start: var(--db-spacing-fixed-xl);
406
- inset-block: calc(calc(var(--db-sizing-md) + 2 * var(--db-spacing-fixed-xs))) calc(var(--db-sizing-md) + var(--db-spacing-fixed-xs) * 2);
395
+ inset-block: calc(calc(var(--db-sizing-md) + 2 * var(--db-spacing-fixed-xs)) + var(--db-spacing-fixed-3xs)) calc(var(--db-sizing-md) + var(--db-spacing-fixed-xs) * 2 + var(--db-spacing-fixed-3xs));
407
396
  }
408
397
  .db-sub-navigation {
409
398
  /* stylelint-disable-next-line media-query-no-invalid */
@@ -411,11 +400,10 @@
411
400
  @media (max-width: 63.9375em) {
412
401
  .db-sub-navigation {
413
402
  padding: var(--db-spacing-fixed-md);
414
- inline-size: calc(100% - var(--db-spacing-fixed-xl));
403
+ inline-size: 100%;
415
404
  position: fixed;
416
405
  overflow: hidden auto;
417
- inset-inline-start: var(--db-spacing-fixed-xl);
418
- inset-block: calc(calc(var(--db-sizing-md) + 2 * var(--db-spacing-fixed-xs))) calc(var(--db-sizing-md) + var(--db-spacing-fixed-xs) * 2);
406
+ inset-block: calc(calc(var(--db-sizing-md) + 2 * var(--db-spacing-fixed-xs)) + var(--db-spacing-fixed-3xs)) calc(var(--db-sizing-md) + var(--db-spacing-fixed-xs) * 2 + var(--db-spacing-fixed-3xs));
419
407
  }
420
408
  }
421
409
  .db-sub-navigation {
@@ -34,9 +34,7 @@
34
34
  }
35
35
 
36
36
  .db-sub-navigation {
37
- inset: 0;
38
- inline-size: 100%;
39
- border-color: transparent;
37
+ inset-block: 0;
40
38
  }
41
39
  }
42
40
  }
@@ -106,8 +104,6 @@
106
104
 
107
105
  @include screen-sizes.screen("md", "max") {
108
106
  &:not([data-width="full"]) {
109
- inline-size: 100%;
110
-
111
107
  .db-navigation-item-expand-button {
112
108
  &::after {
113
109
  --db-icon-margin-start: auto;
@@ -179,12 +175,19 @@
179
175
 
180
176
  @mixin sub-navigation-mobile() {
181
177
  padding: variables.$db-spacing-fixed-md;
182
- inline-size: calc(100% - #{variables.$db-spacing-fixed-xl});
178
+ inline-size: 100%;
183
179
  position: fixed;
184
180
  overflow: hidden auto;
185
- inset-inline-start: variables.$db-spacing-fixed-xl;
186
- inset-block: calc(#{component.$min-mobile-header-height})
187
- calc(#{variables.$db-sizing-md} + #{variables.$db-spacing-fixed-xs} * 2);
181
+
182
+ // additional #{$db-spacing-fixed-3xs} for border
183
+ inset-block: calc(
184
+ #{component.$min-mobile-header-height} +
185
+ #{variables.$db-spacing-fixed-3xs}
186
+ )
187
+ calc(
188
+ #{variables.$db-sizing-md} + #{variables.$db-spacing-fixed-xs} * 2 +
189
+ #{variables.$db-spacing-fixed-3xs}
190
+ );
188
191
  }
189
192
 
190
193
  .db-sub-navigation {
@@ -1,169 +1,201 @@
1
1
  /* Variants for adaptive components like input, select, notification, ... */
2
- .db-tab-item .db-tab-label[data-icon]:not([data-show-icon=false])::before {
3
- color: var(--db-icon-color, inherit);
4
- display: inline-block;
5
- /*** icon - placeholder ***/
6
- font-family: var(--db-icon-font-family, var(--db-icon-default-font-family, "db-ux-default", "icon-font-fallback")) !important;
7
- font-size: var(--db-icon-font-size, 1.5rem);
8
- -webkit-font-smoothing: antialiased;
9
- -moz-osx-font-smoothing: grayscale;
10
- font-style: normal;
11
- font-variant: normal;
12
- font-weight: var(--db-icon-font-weight, normal);
13
- line-height: 1;
14
- /* stylelint-disable-next-line declaration-property-value-no-unknown */
15
- speak: none;
16
- /* stylelint-disable-next-line declaration-property-value-no-unknown */
17
- speak: never;
18
- text-transform: none;
19
- overflow: clip;
20
- vertical-align: var(--db-icon-vertical-align, middle);
21
- /* stylelint-disable-next-line db-ux/use-sizing */
22
- block-size: var(--db-icon-font-size, 1.5rem);
23
- aspect-ratio: 1;
24
- flex-shrink: 0;
25
- content: var(--db-icon, attr(data-icon));
26
- }
27
- @supports (content: ""/"") {
28
- .db-tab-item .db-tab-label[data-icon]:not([data-show-icon=false])::before {
29
- content: var(--db-icon, attr(data-icon))/"";
30
- }
31
- }
32
- @media aural {
33
- .db-tab-item .db-tab-label[data-icon]:not([data-show-icon=false])::before {
34
- content: none;
35
- }
36
- }
37
- @media speech {
38
- .db-tab-item .db-tab-label[data-icon]:not([data-show-icon=false])::before {
39
- content: none;
40
- }
41
- }
42
-
43
- [data-density=expressive] .db-tab-item {
44
- font: var(--db-type-body-lg);
45
- /* Those variables are only for components to calculate heights and change icons */
46
- --db-icon-font-weight: var(--db-base-body-icon-weight-lg);
47
- --db-icon-font-size: var(--db-base-body-icon-font-size-lg);
2
+ .db-visually-hidden,
3
+ [data-visually-hidden=true] {
4
+ clip: rect(0, 0, 0, 0) !important;
5
+ overflow: hidden !important;
6
+ white-space: nowrap !important;
7
+ font-size: 0 !important;
8
+ all: initial;
9
+ inset-block-start: 0 !important;
10
+ block-size: 1px !important;
11
+ position: absolute !important;
12
+ inline-size: 1px !important;
13
+ border-width: 0 !important;
14
+ border-style: initial !important;
15
+ border-color: initial !important;
16
+ border-image: initial !important;
17
+ padding: 0 !important;
18
+ pointer-events: none !important;
48
19
  }
49
20
 
50
- [data-density=functional] .db-tab-item {
51
- font: var(--db-type-body-sm);
52
- /* Those variables are only for components to calculate heights and change icons */
53
- --db-icon-font-weight: var(--db-base-body-icon-weight-sm);
54
- --db-icon-font-size: var(--db-base-body-icon-font-size-sm);
55
- }
56
-
57
- .db-tab-item::after {
58
- content: "";
59
- position: absolute;
60
- border-radius: var(--db-border-radius-xs);
21
+ .db-tab-item input:not([data-disable-focus=true]):focus-visible::before {
22
+ outline: var(--db-border-width-2xs) solid var(--db-focus-outline-color, var(--db-informational-on-bg-basic-emphasis-70-default));
23
+ outline-offset: var(--db-border-width-xs);
24
+ box-shadow: 0 0 0 var(--db-border-width-xs) var(--db-focus-box-shadow-bg-color, transparent);
61
25
  }
62
26
  @media (prefers-reduced-motion: no-preference) {
63
- .db-tab-item::after {
64
- transition: height var(--db-transition-duration-fast) var(--db-transition-timing-emotional), width var(--db-transition-duration-fast) var(--db-transition-timing-emotional);
27
+ .db-tab-item input:not([data-disable-focus=true]):focus-visible::before {
28
+ transition: outline var(--db-transition-duration-extra-fast), box-shadow var(--db-transition-duration-extra-fast);
65
29
  }
66
30
  }
67
-
68
- db-tab-item,
69
- dbtabitem {
70
- display: contents;
71
- vertical-align: top;
31
+ .db-tab-item input:not([data-disable-focus=true]):not([type=radio], [role=switch]):focus-visible::before {
32
+ border-radius: var(--db-border-radius-xs);
72
33
  }
73
34
 
74
35
  .db-tab-item {
75
36
  position: relative;
37
+ }
38
+ .db-tab-item:not([hidden]) {
39
+ display: inline-flex;
40
+ }
41
+ .db-tab-item {
42
+ list-style-type: "";
43
+ border-radius: var(--db-border-radius-sm);
44
+ }
45
+ .db-tab-item:has(input:disabled) {
46
+ opacity: var(--db-opacity-md);
47
+ }
48
+ .db-tab-item label {
76
49
  background-color: var(--db-adaptive-bg-basic-transparent-full-default);
77
50
  padding: var(--db-spacing-fixed-xs);
78
- overflow: visible;
79
51
  align-items: center;
80
- justify-content: center;
52
+ }
53
+ .db-tab-item label:not([hidden]) {
54
+ display: inline-block;
55
+ }
56
+ .db-tab-item label {
81
57
  white-space: nowrap;
82
58
  border: 0;
83
59
  border-radius: var(--db-border-radius-sm);
84
- cursor: pointer;
85
- font: inherit;
86
- color: inherit;
87
- flex-shrink: 0;
88
- z-index: 2;
89
- max-inline-size: var(--db-sizing-2xl);
90
- }
91
- @media screen and (forced-colors: active) {
92
- .db-tab-item {
93
- border: var(--db-border-width-xs) solid transparent;
94
- }
60
+ overflow: hidden;
61
+ text-overflow: ellipsis;
62
+ /* stylelint-disable-next-line a11y/selector-pseudo-class-focus */
63
+ }
64
+ .db-tab-item label:hover:not(:disabled,
65
+ [aria-disabled=true],
66
+ [tabindex="-1"],
67
+ :has(:disabled)) {
68
+ cursor: var(--db-overwrite-cursor, pointer);
69
+ }
70
+ .db-tab-item label:hover:not(:disabled,
71
+ [aria-disabled=true],
72
+ [tabindex="-1"],
73
+ :has(:disabled)):has(:not(input:disabled)) {
74
+ background-color: var(--db-adaptive-bg-basic-transparent-full-hovered);
95
75
  }
96
- @media screen and (prefers-reduced-motion: no-preference) {
97
- .db-tab-item {
98
- transition: background-color var(--db-transition-duration-fast);
99
- }
76
+ .db-tab-item label:hover:not(:disabled,
77
+ [aria-disabled=true],
78
+ [tabindex="-1"],
79
+ :has(:disabled)):has(input:disabled) {
80
+ cursor: initial;
100
81
  }
101
- .db-tab-item .db-tab-label {
102
- max-inline-size: 100%;
82
+ .db-tab-item label:hover:not(:disabled,
83
+ [aria-disabled=true],
84
+ [tabindex="-1"],
85
+ :has(:disabled)):is(textarea), .db-tab-item label:hover:not(:disabled,
86
+ [aria-disabled=true],
87
+ [tabindex="-1"],
88
+ :has(:disabled)):is(input) {
89
+ cursor: initial;
103
90
  }
104
- .db-tab-item .db-tab-label:not([hidden]) {
105
- display: block;
91
+ .db-tab-item label:hover:not(:disabled,
92
+ [aria-disabled=true],
93
+ [tabindex="-1"],
94
+ :has(:disabled)):is(input[type=checkbox]), .db-tab-item label:hover:not(:disabled,
95
+ [aria-disabled=true],
96
+ [tabindex="-1"],
97
+ :has(:disabled)):is(input[type=radio]:not(:checked)) {
98
+ cursor: pointer;
106
99
  }
107
- .db-tab-item .db-tab-label:not([data-icon-trailing])::after {
108
- content: attr(data-label);
109
- font-weight: 700;
110
- display: block;
111
- block-size: 0;
112
- font-size: 0;
113
- line-height: 0;
114
- padding: 0;
115
- margin: 0;
116
- overflow: hidden;
117
- visibility: hidden;
100
+ .db-tab-item label {
101
+ /* stylelint-disable-next-line a11y/selector-pseudo-class-focus */
118
102
  }
119
- .db-tab-item .db-tab-label[data-icon]:not([data-show-icon=false])::before {
120
- margin-inline-end: var(--db-spacing-fixed-xs);
121
- vertical-align: middle;
103
+ .db-tab-item label:hover:not(:disabled,
104
+ [aria-disabled=true],
105
+ [tabindex="-1"],
106
+ :has(:disabled)) {
107
+ cursor: var(--db-overwrite-cursor, pointer);
122
108
  }
123
- .db-tab-item[data-no-text=true] .db-tab-label[data-icon]::before {
124
- margin-inline-end: 0;
109
+ .db-tab-item label:hover:not(:disabled,
110
+ [aria-disabled=true],
111
+ [tabindex="-1"],
112
+ :has(:disabled)):has(:not(input:disabled)) {
113
+ background-color: var(--db-adaptive-bg-basic-transparent-full-hovered);
125
114
  }
126
- .db-tab-item[data-no-text=true] .db-tab-label::after {
127
- content: none;
115
+ .db-tab-item label:hover:not(:disabled,
116
+ [aria-disabled=true],
117
+ [tabindex="-1"],
118
+ :has(:disabled)):has(input:disabled) {
119
+ cursor: initial;
128
120
  }
129
- [data-orientation=vertical] .db-tab-item .db-tab-label {
130
- overflow: hidden;
131
- text-overflow: ellipsis;
132
- white-space: nowrap;
121
+ .db-tab-item label:hover:not(:disabled,
122
+ [aria-disabled=true],
123
+ [tabindex="-1"],
124
+ :has(:disabled)):is(textarea), .db-tab-item label:hover:not(:disabled,
125
+ [aria-disabled=true],
126
+ [tabindex="-1"],
127
+ :has(:disabled)):is(input) {
128
+ cursor: initial;
133
129
  }
134
- .db-tab-item:not([hidden]) {
135
- display: flex;
130
+ .db-tab-item label:hover:not(:disabled,
131
+ [aria-disabled=true],
132
+ [tabindex="-1"],
133
+ :has(:disabled)):is(input[type=checkbox]), .db-tab-item label:hover:not(:disabled,
134
+ [aria-disabled=true],
135
+ [tabindex="-1"],
136
+ :has(:disabled)):is(input[type=radio]:not(:checked)) {
137
+ cursor: pointer;
138
+ }
139
+ .db-tab-item label:has(input:checked) {
140
+ font-weight: 700;
136
141
  }
137
- [data-density=functional] .db-tab-item {
138
- padding: var(--db-spacing-fixed-2xs);
142
+ .db-tab-item label[data-icon] {
143
+ padding-inline-start: calc(var(--db-spacing-fixed-xs) + var(--db-spacing-fixed-sm) + var(--db-icon-font-size));
139
144
  }
140
- [data-density=expressive] .db-tab-item {
141
- padding: var(--db-spacing-fixed-sm);
145
+ .db-tab-item label[data-icon]::before {
146
+ position: absolute;
147
+ transform: translateY(-50%);
148
+ inset-block-start: 50%;
149
+ inset-inline-start: calc(0% + var(--db-spacing-fixed-xs));
142
150
  }
143
- .db-tab-item::after {
144
- inline-size: 0;
145
- block-size: var(--db-border-width-xs);
151
+ .db-tab-item label[data-icon-trailing] {
152
+ padding-inline-end: calc(var(--db-spacing-fixed-xs) + var(--db-spacing-fixed-sm) + var(--db-icon-font-size));
146
153
  }
147
- @media screen and (prefers-reduced-motion: no-preference) {
148
- .db-tab-item::after {
149
- transition: block-size var(--db-transition-duration-fast) var(--db-transition-timing-emotional), inline-size var(--db-transition-duration-fast) var(--db-transition-timing-emotional) !important;
150
- }
154
+ .db-tab-item label[data-icon-trailing]::after {
155
+ position: absolute;
156
+ transform: translateY(-50%);
157
+ inset-block-start: 50%;
158
+ inset-inline-end: calc(0% + var(--db-spacing-fixed-xs));
151
159
  }
152
- [data-orientation=vertical] .db-tab-item::after {
153
- inline-size: var(--db-border-width-xs);
154
- block-size: 0;
160
+ .db-tab-item label:is([data-no-text], [data-no-text=true]) {
161
+ font-size: 0 !important;
155
162
  }
156
- [data-orientation=vertical] .db-tab-item {
157
- max-inline-size: 100%;
158
- flex-shrink: 1;
163
+ .db-tab-item label:is([data-no-text], [data-no-text=true])::before {
164
+ --db-icon-margin-end: 0;
159
165
  }
160
- .db-tab-item[aria-selected=true], .db-tab-item[data-active=true] {
161
- font-weight: 700;
166
+ .db-tab-item label:is([data-no-text], [data-no-text=true]) {
167
+ /* stylelint-disable-next-line at-rule-empty-line-before */
168
+ padding: 0;
169
+ inline-size: calc(calc(var(--db-spacing-fixed-xs) + var(--db-spacing-fixed-sm) + var(--db-icon-font-size)) - var(--db-spacing-fixed-2xs));
170
+ block-size: calc(var(--db-icon-font-size) + var(--db-spacing-fixed-xs));
162
171
  }
163
- .db-tab-item:disabled {
164
- opacity: var(--db-opacity-md);
165
- cursor: initial;
172
+ .db-tab-item label:is([data-no-text], [data-no-text=true])::before {
173
+ margin-inline-end: 0;
166
174
  }
167
- .db-tab-item:not(:disabled):hover, .db-tab-item:not(:disabled):focus-visible {
168
- background-color: var(--db-adaptive-bg-basic-transparent-full-hovered);
175
+ .db-tab-item input {
176
+ position: absolute;
177
+ appearance: none;
178
+ inline-size: 100%;
179
+ margin-inline-end: initial;
180
+ inset: 0;
181
+ background-color: var(--db-adaptive-bg-basic-transparent-full-default);
182
+ border-radius: var(--db-border-radius-sm);
183
+ z-index: -1;
184
+ /*
185
+ focus must be set on input:
186
+ - parent label tag may use before AND after for displaying icons
187
+ - placed on li.db-tab-item focus would get cut off partially by by overflow hidden (orientation vertical)
188
+ */
189
+ }
190
+ .db-tab-item input:focus-visible:is(input[type=radio]) {
191
+ outline: none;
192
+ box-shadow: none;
193
+ }
194
+ .db-tab-item input:focus-visible::before {
195
+ content: "";
196
+ position: absolute;
197
+ inset: 0;
198
+ border-radius: var(--db-border-radius-sm);
199
+ z-index: 10;
200
+ pointer-events: none;
169
201
  }