@tui/design-system 1.6.0 → 1.8.0
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 +186 -1
- package/dist/themes/crystalski/index.css +38 -1
- package/dist/themes/crystalski/index.css.map +1 -1
- package/dist/themes/firstchoice/index.css +38 -1
- package/dist/themes/firstchoice/index.css.map +1 -1
- package/dist/themes/tui/index.css +40 -3
- package/dist/themes/tui/index.css.map +1 -1
- package/package.json +11 -10
- package/scss/lib/accordion/_mixins.scss +13 -6
- package/scss/lib/active-tag/_mixins.scss +16 -4
- package/scss/lib/cards/carousel/_index.scss +3 -0
- package/scss/lib/cards/carousel/_mixins.scss +164 -0
- package/scss/lib/cards/carousel/_variables.scss +13 -0
- package/scss/lib/cards/promotion/_index.scss +3 -0
- package/scss/lib/cards/promotion/_mixins.scss +275 -0
- package/scss/lib/cards/promotion/_variables.scss +14 -0
- package/scss/lib/cards/selectable/_mixins.scss +1 -1
- package/scss/lib/flyout-dropdown/_variables.scss +0 -1
- package/scss/lib/forms/input-switch/_mixins.scss +12 -6
- package/scss/lib/highlight-panel/_index.scss +2 -0
- package/scss/lib/highlight-panel/_mixins.scss +244 -0
- package/scss/lib/highlight-panel/_variables.scss +21 -0
- package/scss/lib/list/_mixins.scss +140 -70
- package/scss/lib/list/_variables.scss +2 -0
- package/scss/lib/modal/_variables.scss +1 -4
- package/scss/lib/patterns/review-card/_index.scss +3 -0
- package/scss/lib/patterns/review-card/_mixins.scss +283 -0
- package/scss/lib/patterns/review-card/_variables.scss +3 -0
- package/scss/lib/ratings-reviews/range-icons/_mixins.scss +16 -2
- package/scss/lib/ratings-reviews/range-icons/_variables.scss +2 -0
- package/scss/lib/skeleton/_variables.scss +2 -6
- package/scss/lib/tabs/_mixins.scss +117 -60
- package/scss/lib/tabs/anchor/_mixins.scss +36 -0
- package/scss/lib/tabs/in-page/_mixins.scss +82 -29
- package/scss/lib/tooltip/_mixins.scss +2 -0
- package/scss/mixins.scss +4 -0
- package/scss/themes/crystalski/_overrides.scss +27 -0
- package/scss/themes/crystalski/index.scss +9 -0
- package/scss/themes/crystalski/theme.json +14 -0
- package/scss/themes/firstchoice/_overrides.scss +29 -0
- package/scss/themes/firstchoice/index.scss +9 -0
- package/scss/themes/firstchoice/theme.json +20 -0
- package/scss/themes/tui/_overrides.scss +19 -0
- package/scss/themes/tui/index.scss +9 -0
- package/scss/themes/tui/theme.json +8 -0
- package/scss/variables/_primitives.scss +3 -0
- package/scss/variables/base-theme.json +234 -1
- package/scss/variables.scss +6 -0
- package/types/components.ts +39 -2
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
// Review card / _mixins
|
|
2
|
+
@use 'variables' as *;
|
|
3
|
+
@use '../../utility/mixins' as *;
|
|
4
|
+
@use '../../cards/card/mixins' as *;
|
|
5
|
+
@use '../../divider/mixins' as *;
|
|
6
|
+
@use '../../link/mixins' as *;
|
|
7
|
+
@use '../../ratings-reviews/range-icons/mixins' as *;
|
|
8
|
+
@use '../../ratings-reviews/range-icons-group/mixins' as *;
|
|
9
|
+
|
|
10
|
+
$uilib-review-card-included: false !default;
|
|
11
|
+
|
|
12
|
+
@mixin uilib-review-card() {
|
|
13
|
+
@if not $uilib-review-card-included {
|
|
14
|
+
$uilib-review-card-included: true !global;
|
|
15
|
+
|
|
16
|
+
@include uilib-card;
|
|
17
|
+
@include uilib-divider;
|
|
18
|
+
@include uilib-link;
|
|
19
|
+
@include uilib-ratings-range-icons;
|
|
20
|
+
@include uilib-ratings-range-icons-group;
|
|
21
|
+
@include uilib-review-card-master;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@mixin uilib-review-card-master() {
|
|
26
|
+
.uilib-review-card {
|
|
27
|
+
container-name: uilib-review-card;
|
|
28
|
+
container-type: inline-size;
|
|
29
|
+
|
|
30
|
+
&__review {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-flow: column;
|
|
33
|
+
gap: var(--uilib-spacing-400);
|
|
34
|
+
align-items: flex-start;
|
|
35
|
+
|
|
36
|
+
width: 100%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&__logo {
|
|
40
|
+
flex: 0 0 auto;
|
|
41
|
+
|
|
42
|
+
height: 1.125rem; /* 18 / 16 */
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&__overall-rating {
|
|
46
|
+
display: flex;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__divider {
|
|
50
|
+
width: 100%;
|
|
51
|
+
margin: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.uilib-ratings-range-icons-group {
|
|
55
|
+
width: 100%;
|
|
56
|
+
max-width: min(100%, 20rem);
|
|
57
|
+
margin: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&__visually-hidden {
|
|
61
|
+
@include uilib-visually-hidden;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* stylelint-disable-next-line order/order */
|
|
65
|
+
&--dual,
|
|
66
|
+
&--compact {
|
|
67
|
+
.uilib-review-card {
|
|
68
|
+
&__review {
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-flow: row wrap;
|
|
71
|
+
gap: var(--uilib-spacing-100) var(--uilib-spacing-400);
|
|
72
|
+
justify-content: space-between;
|
|
73
|
+
align-items: flex-end;
|
|
74
|
+
|
|
75
|
+
&::before {
|
|
76
|
+
content: '';
|
|
77
|
+
|
|
78
|
+
order: 2;
|
|
79
|
+
|
|
80
|
+
display: block;
|
|
81
|
+
flex-basis: 100%;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&__logo {
|
|
86
|
+
order: 1;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&__overall-rating,
|
|
90
|
+
&__link {
|
|
91
|
+
order: 3;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&__link {
|
|
95
|
+
margin-top: var(--uilib-spacing-100);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&__overall-rating {
|
|
99
|
+
flex: 1 1 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&__divider {
|
|
103
|
+
display: none;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.uilib-ratings-range-icons__details {
|
|
108
|
+
flex-basis: 100%;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.uilib-ratings-range-icons-group {
|
|
112
|
+
display: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.uilib-ratings-range-icons__description {
|
|
116
|
+
order: -1;
|
|
117
|
+
|
|
118
|
+
flex-basis: 100%;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&--compact {
|
|
123
|
+
.uilib-ratings-range-icons__value {
|
|
124
|
+
font: var(--uilib-typography-component-heading-medium-strong);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&--dual {
|
|
129
|
+
.uilib-review-card__overall-rating {
|
|
130
|
+
display: grid;
|
|
131
|
+
grid-template-columns: auto 1fr;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.uilib-ratings-range-icons__value,
|
|
135
|
+
.uilib-ratings-range-icons__score {
|
|
136
|
+
grid-row: 1;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.uilib-ratings-range-icons__details {
|
|
140
|
+
grid-column: 1 / -1;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.uilib-card__content-container {
|
|
144
|
+
display: flex;
|
|
145
|
+
flex-flow: column;
|
|
146
|
+
gap: var(--uilib-spacing-400);
|
|
147
|
+
align-items: flex-start;
|
|
148
|
+
|
|
149
|
+
&::before {
|
|
150
|
+
content: '';
|
|
151
|
+
|
|
152
|
+
order: 2;
|
|
153
|
+
|
|
154
|
+
align-self: stretch;
|
|
155
|
+
|
|
156
|
+
border: 0 var(--uilib-stroke-style-solid) var(--uilib-color-border-divider);
|
|
157
|
+
border-top-width: var(--uilib-stroke-size-025);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.uilib-review-card {
|
|
161
|
+
&__review {
|
|
162
|
+
order: 3;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&__review:first-child {
|
|
166
|
+
order: 1;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.uilib-ratings-range-icons__description {
|
|
172
|
+
display: none;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* stylelint-disable-next-line order/order */
|
|
176
|
+
@container uilib-review-card (min-width: 20rem) {
|
|
177
|
+
.uilib-card__content-container {
|
|
178
|
+
flex-flow: row nowrap;
|
|
179
|
+
|
|
180
|
+
&::before {
|
|
181
|
+
align-self: stretch;
|
|
182
|
+
|
|
183
|
+
border-top-width: 0;
|
|
184
|
+
border-left-width: var(--uilib-stroke-size-025);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&:not(&--dual, &--compact) {
|
|
191
|
+
@include uilib-review-card-default;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* stylelint-disable-next-line order/order */
|
|
195
|
+
@container uilib-review-card style(--uilib-review-card-layout: default) {
|
|
196
|
+
@include uilib-review-card-default;
|
|
197
|
+
|
|
198
|
+
.uilib-review-card {
|
|
199
|
+
&__review {
|
|
200
|
+
flex-flow: column;
|
|
201
|
+
gap: var(--uilib-spacing-400);
|
|
202
|
+
align-items: flex-start;
|
|
203
|
+
|
|
204
|
+
&::before {
|
|
205
|
+
display: none;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
&:not(:first-child) {
|
|
209
|
+
display: none;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&__logo,
|
|
214
|
+
&__overall-rating,
|
|
215
|
+
&__link {
|
|
216
|
+
order: unset;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&__overall-rating {
|
|
220
|
+
grid-template-columns: auto 1fr;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
&__divider {
|
|
224
|
+
display: block;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.uilib-ratings-range-icons__value {
|
|
229
|
+
grid-row: 1 / span 3;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.uilib-ratings-range-icons__score {
|
|
233
|
+
grid-row: unset;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.uilib-ratings-range-icons__details {
|
|
237
|
+
grid-column: unset;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.uilib-card__content-container {
|
|
241
|
+
display: block;
|
|
242
|
+
|
|
243
|
+
&::before {
|
|
244
|
+
display: none;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.uilib-ratings-range-icons__details {
|
|
249
|
+
flex-basis: unset;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.uilib-ratings-range-icons-group {
|
|
253
|
+
display: none;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.uilib-ratings-range-icons__description {
|
|
257
|
+
order: unset;
|
|
258
|
+
|
|
259
|
+
display: block;
|
|
260
|
+
flex-basis: unset;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.uilib-ratings-range-icons-group {
|
|
264
|
+
display: flex;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
@mixin uilib-review-card-default() {
|
|
271
|
+
.uilib-review-card__overall-rating {
|
|
272
|
+
display: grid;
|
|
273
|
+
grid-template-columns: auto 1fr;
|
|
274
|
+
gap: var(--uilib-spacing-100) var(--uilib-spacing-400);
|
|
275
|
+
align-items: start;
|
|
276
|
+
|
|
277
|
+
.uilib-ratings-range-icons__value {
|
|
278
|
+
grid-row: 1 / span 3;
|
|
279
|
+
|
|
280
|
+
font: var(--uilib-typography-heading-xxlarge);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
@@ -22,7 +22,8 @@ $uilib-ratings-range-icons-included: false !default;
|
|
|
22
22
|
.uilib-ratings-range-icons--star,
|
|
23
23
|
.uilib-ratings-range-icons--sun,
|
|
24
24
|
.uilib-ratings-range-icons--customer,
|
|
25
|
-
.uilib-ratings-range-icons--tripadvisor
|
|
25
|
+
.uilib-ratings-range-icons--tripadvisor,
|
|
26
|
+
.uilib-ratings-range-icons--holidaycheck {
|
|
26
27
|
.uilib-ratings-range-icons__score.uilib-ratings-range-icons__score--#{$score-value} {
|
|
27
28
|
&::after {
|
|
28
29
|
inline-size: calc(var(--icon-size) * #{$score-key});
|
|
@@ -43,7 +44,8 @@ $uilib-ratings-range-icons-included: false !default;
|
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
@if $score-key > 5 {
|
|
46
|
-
.uilib-ratings-range-icons--sun
|
|
47
|
+
.uilib-ratings-range-icons--sun,
|
|
48
|
+
.uilib-ratings-range-icons--holidaycheck {
|
|
47
49
|
.uilib-ratings-range-icons__score.uilib-ratings-range-icons__score--#{$score-value} {
|
|
48
50
|
&::after {
|
|
49
51
|
inline-size: calc(var(--icon-size) * #{$score-key});
|
|
@@ -106,6 +108,12 @@ $uilib-ratings-range-icons-included: false !default;
|
|
|
106
108
|
--rating-max: 5;
|
|
107
109
|
}
|
|
108
110
|
|
|
111
|
+
&--holidaycheck {
|
|
112
|
+
--tile-bg-icon: var(--uilib-ratings-range-icons-holidaycheck-rating-icon);
|
|
113
|
+
--tile-bg-checked-icon: var(--uilib-ratings-range-icons-holidaycheck-rating-checked-icon);
|
|
114
|
+
--rating-max: 6;
|
|
115
|
+
}
|
|
116
|
+
|
|
109
117
|
&--tui-t {
|
|
110
118
|
--tile-bg-icon: var(--uilib-ratings-range-icons-tui-t-rating-icon);
|
|
111
119
|
--rating-max: 5;
|
|
@@ -149,6 +157,7 @@ $uilib-ratings-range-icons-included: false !default;
|
|
|
149
157
|
|
|
150
158
|
&--inverse {
|
|
151
159
|
.uilib-ratings-range-icons__value,
|
|
160
|
+
.uilib-ratings-range-icons__description,
|
|
152
161
|
.uilib-ratings-range-icons__plus,
|
|
153
162
|
.uilib-ratings-range-icons__label {
|
|
154
163
|
color: var(--uilib-color-text-inverse);
|
|
@@ -189,6 +198,11 @@ $uilib-ratings-range-icons-included: false !default;
|
|
|
189
198
|
}
|
|
190
199
|
}
|
|
191
200
|
|
|
201
|
+
&__description {
|
|
202
|
+
color: var(--uilib-color-text-strong);
|
|
203
|
+
font: var(--uilib-typography-component-heading-small-strong);
|
|
204
|
+
}
|
|
205
|
+
|
|
192
206
|
&__value {
|
|
193
207
|
color: var(--uilib-color-text-strong);
|
|
194
208
|
font: var(--uilib-typography-label-small-strong);
|
|
@@ -20,6 +20,8 @@ $uilib-ratings-range-icons-variables: (
|
|
|
20
20
|
customer-rating-checked-icon: url('#{$uilib-assets-base-url}v3/logos/review/customer-checked.svg'),
|
|
21
21
|
tui-t-rating-icon: url('#{$uilib-assets-base-url}v3/logos/review/tui-t.svg'),
|
|
22
22
|
tui-t-plus-color: map.get($uilib-primitives, 'color-blue-100'),
|
|
23
|
+
holidaycheck-rating-icon: url('#{$uilib-assets-base-url}v3/logos/review/holidaycheck-unchecked.svg'),
|
|
24
|
+
holidaycheck-rating-checked-icon: url('#{$uilib-assets-base-url}v3/logos/review/holidaycheck-checked.svg'),
|
|
23
25
|
) !default;
|
|
24
26
|
$uilib-rating-scores: (
|
|
25
27
|
0: '00',
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@use '../../variables/colors' as *;
|
|
3
|
-
@use '../../variables/primitives' as *;
|
|
4
|
-
|
|
5
1
|
$uilib-skeleton-variables: (
|
|
6
|
-
color:
|
|
7
|
-
shimmer-color:
|
|
2
|
+
color: var(--uilib-color-other-skeleton-loading),
|
|
3
|
+
shimmer-color: var(--uilib-color-canvas-contrast),
|
|
8
4
|
) !default;
|
|
@@ -1,39 +1,44 @@
|
|
|
1
1
|
// Shared tab styles used by in-page and tabs-anchor.
|
|
2
2
|
// $prefix: the BEM block name, e.g. 'uilib-tabs-in-page' or 'uilib-tabs-anchor'
|
|
3
|
+
|
|
4
|
+
@mixin uilib-tablist-base() {
|
|
5
|
+
--left-fade: 0rem;
|
|
6
|
+
--right-fade: 0rem;
|
|
7
|
+
|
|
8
|
+
$fade-mask: linear-gradient(to right, transparent 0, black var(--left-fade), black calc(100% - var(--right-fade)), transparent 100%);
|
|
9
|
+
|
|
10
|
+
scroll-padding-inline: var(--left-fade) var(--right-fade);
|
|
11
|
+
|
|
12
|
+
margin: calc(-1 * var(--uilib-spacing-200));
|
|
13
|
+
padding: var(--uilib-spacing-200);
|
|
14
|
+
|
|
15
|
+
overflow-x: auto;
|
|
16
|
+
scroll-behavior: smooth;
|
|
17
|
+
scrollbar-width: none;
|
|
18
|
+
-webkit-mask-image: #{$fade-mask};
|
|
19
|
+
mask-image: #{$fade-mask};
|
|
20
|
+
mask-origin: padding-box;
|
|
21
|
+
mask-clip: padding-box;
|
|
22
|
+
}
|
|
23
|
+
|
|
3
24
|
@mixin uilib-tab-base($prefix) {
|
|
4
25
|
position: relative;
|
|
5
26
|
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-shrink: 0;
|
|
8
|
-
gap: var(--uilib-spacing-200);
|
|
9
|
-
align-items: center;
|
|
10
|
-
|
|
11
27
|
max-width: 12.5rem;
|
|
12
28
|
padding: var(--uilib-spacing-300) var(--uilib-spacing-500);
|
|
13
29
|
|
|
14
30
|
color: var(--#{$prefix}-text-color);
|
|
15
31
|
font-weight: var(--uilib-font-weight-semibold);
|
|
16
32
|
font-family: var(--uilib-font-family-lead);
|
|
33
|
+
white-space: normal;
|
|
17
34
|
text-decoration: none;
|
|
18
35
|
|
|
19
|
-
border-radius: var(--uilib-border-radius-200);
|
|
20
|
-
|
|
21
36
|
background: transparent;
|
|
22
37
|
|
|
23
38
|
cursor: pointer;
|
|
24
39
|
}
|
|
25
40
|
|
|
26
41
|
@mixin uilib-tabs-shared($prefix) {
|
|
27
|
-
.#{$prefix}__scroll-button--left .uilib-icon {
|
|
28
|
-
-webkit-mask-image: var(--#{$prefix}-scroll-left-icon);
|
|
29
|
-
mask-image: var(--#{$prefix}-scroll-left-icon);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.#{$prefix}__scroll-button--right .uilib-icon {
|
|
33
|
-
-webkit-mask-image: var(--#{$prefix}-scroll-right-icon);
|
|
34
|
-
mask-image: var(--#{$prefix}-scroll-right-icon);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
42
|
.#{$prefix} {
|
|
38
43
|
// .uilib-icon-button selector is chained to raise specificity above uilib-icon-button's
|
|
39
44
|
// `display: inline-flex`, which appears later due to alphabetical @include sorting in storybook
|
|
@@ -42,6 +47,16 @@
|
|
|
42
47
|
display: none;
|
|
43
48
|
}
|
|
44
49
|
|
|
50
|
+
&__scroll-button--left .uilib-icon {
|
|
51
|
+
-webkit-mask-image: var(--#{$prefix}-scroll-left-icon);
|
|
52
|
+
mask-image: var(--#{$prefix}-scroll-left-icon);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&__scroll-button--right .uilib-icon {
|
|
56
|
+
-webkit-mask-image: var(--#{$prefix}-scroll-right-icon);
|
|
57
|
+
mask-image: var(--#{$prefix}-scroll-right-icon);
|
|
58
|
+
}
|
|
59
|
+
|
|
45
60
|
&__scroll-wrapper {
|
|
46
61
|
position: relative;
|
|
47
62
|
}
|
|
@@ -71,55 +86,19 @@
|
|
|
71
86
|
right: 0;
|
|
72
87
|
}
|
|
73
88
|
|
|
74
|
-
&__tablist {
|
|
75
|
-
--left-fade: 0;
|
|
76
|
-
--right-fade: 0;
|
|
77
|
-
|
|
78
|
-
$fade-mask: linear-gradient(to right, transparent 0, black var(--left-fade), black calc(100% - var(--right-fade)), transparent 100%);
|
|
79
|
-
|
|
80
|
-
scroll-padding-inline: var(--left-fade) var(--right-fade);
|
|
81
|
-
|
|
82
|
-
display: flex;
|
|
83
|
-
flex-direction: row;
|
|
84
|
-
align-items: end;
|
|
85
|
-
|
|
86
|
-
margin: calc(-1 * var(--uilib-spacing-200));
|
|
87
|
-
padding: var(--uilib-spacing-200);
|
|
88
|
-
|
|
89
|
-
overflow-x: auto;
|
|
90
|
-
scroll-behavior: smooth;
|
|
91
|
-
scrollbar-width: none;
|
|
92
|
-
-webkit-mask-image: #{$fade-mask};
|
|
93
|
-
mask-image: #{$fade-mask};
|
|
94
|
-
mask-origin: padding-box;
|
|
95
|
-
mask-clip: padding-box;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&__scroll-wrapper:has(&__scroll-button--left:not(.#{$prefix}--hidden)) &__tablist {
|
|
99
|
-
--left-fade: var(--#{$prefix}-scroll-fade-width);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
&__scroll-wrapper:has(&__scroll-button--right:not(.#{$prefix}--hidden)) &__tablist {
|
|
103
|
-
--right-fade: var(--#{$prefix}-scroll-fade-width);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
89
|
&__tab {
|
|
90
|
+
@include uilib-tab-base($prefix);
|
|
91
|
+
|
|
92
|
+
/* stylelint-disable-next-line order/order */
|
|
107
93
|
&--active {
|
|
108
94
|
color: var(--#{$prefix}-active-color);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
&--active::after {
|
|
112
|
-
position: absolute;
|
|
113
|
-
left: 0;
|
|
114
|
-
bottom: 0;
|
|
115
|
-
content: '';
|
|
116
|
-
|
|
117
|
-
width: 100%;
|
|
118
95
|
|
|
119
|
-
|
|
96
|
+
box-shadow: inset 0 calc(var(--uilib-stroke-size-075) * -1) 0 0 var(--#{$prefix}-active-color);
|
|
120
97
|
}
|
|
121
98
|
|
|
122
|
-
|
|
99
|
+
&::before {
|
|
100
|
+
border-radius: var(--uilib-border-radius-100);
|
|
101
|
+
}
|
|
123
102
|
|
|
124
103
|
&:hover {
|
|
125
104
|
color: var(--#{$prefix}-active-color);
|
|
@@ -151,6 +130,84 @@
|
|
|
151
130
|
max-height: unset;
|
|
152
131
|
}
|
|
153
132
|
}
|
|
133
|
+
|
|
134
|
+
&-inner {
|
|
135
|
+
display: flex;
|
|
136
|
+
flex-flow: row nowrap;
|
|
137
|
+
gap: var(--uilib-spacing-200);
|
|
138
|
+
justify-content: center;
|
|
139
|
+
align-items: center;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// ─── V1: flex on tablist and tab ───
|
|
145
|
+
[version='1'].#{$prefix} {
|
|
146
|
+
.#{$prefix}__tablist {
|
|
147
|
+
@include uilib-tablist-base;
|
|
148
|
+
|
|
149
|
+
/* stylelint-disable-next-line order/order */
|
|
150
|
+
display: flex;
|
|
151
|
+
flex-direction: row;
|
|
152
|
+
align-items: end;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.#{$prefix}__tab {
|
|
156
|
+
display: inline-flex;
|
|
157
|
+
flex-shrink: 0;
|
|
158
|
+
gap: var(--uilib-spacing-200);
|
|
159
|
+
align-items: center;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// ─── V2: table layout on tablist, scrolling on wrapper ───
|
|
164
|
+
[version='2'].#{$prefix} {
|
|
165
|
+
.#{$prefix}__tablist-wrapper {
|
|
166
|
+
@include uilib-tablist-base;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.#{$prefix}__tablist {
|
|
170
|
+
display: table;
|
|
171
|
+
|
|
172
|
+
table-layout: fixed;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.#{$prefix}__tab-outer {
|
|
176
|
+
display: table-cell;
|
|
177
|
+
|
|
178
|
+
vertical-align: bottom;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.#{$prefix}__tab {
|
|
182
|
+
width: max-content;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.#{$prefix}__tab-inner {
|
|
186
|
+
display: flex;
|
|
187
|
+
flex-flow: row nowrap;
|
|
188
|
+
gap: var(--uilib-spacing-200);
|
|
189
|
+
align-items: center;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// ─── Scroll fade triggers ───
|
|
194
|
+
[version='1'].#{$prefix} {
|
|
195
|
+
&:has(.#{$prefix}__scroll-button--left:not(.#{$prefix}--hidden)) .#{$prefix}__tablist {
|
|
196
|
+
--left-fade: var(--#{$prefix}-scroll-fade-width);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&:has(.#{$prefix}__scroll-button--right:not(.#{$prefix}--hidden)) .#{$prefix}__tablist {
|
|
200
|
+
--right-fade: var(--#{$prefix}-scroll-fade-width);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
[version='2'].#{$prefix} .#{$prefix}__scroll-wrapper {
|
|
205
|
+
&:has(.#{$prefix}__scroll-button--left:not(.#{$prefix}--hidden)) .#{$prefix}__tablist-wrapper {
|
|
206
|
+
--left-fade: var(--#{$prefix}-scroll-fade-width);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&:has(.#{$prefix}__scroll-button--right:not(.#{$prefix}--hidden)) .#{$prefix}__tablist-wrapper {
|
|
210
|
+
--right-fade: var(--#{$prefix}-scroll-fade-width);
|
|
154
211
|
}
|
|
155
212
|
}
|
|
156
213
|
}
|
|
@@ -25,6 +25,15 @@ $uilib-tabs-anchor-included: false !default;
|
|
|
25
25
|
display: inline-flex;
|
|
26
26
|
|
|
27
27
|
@include uilib-tab-base($prefix);
|
|
28
|
+
|
|
29
|
+
/* stylelint-disable-next-line order/order */
|
|
30
|
+
flex-flow: row nowrap;
|
|
31
|
+
gap: var(--uilib-spacing-200);
|
|
32
|
+
align-items: center;
|
|
33
|
+
|
|
34
|
+
.uilib-icon {
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
}
|
|
28
37
|
}
|
|
29
38
|
}
|
|
30
39
|
|
|
@@ -33,9 +42,24 @@ $uilib-tabs-anchor-included: false !default;
|
|
|
33
42
|
|
|
34
43
|
@include uilib-tabs-shared($prefix);
|
|
35
44
|
|
|
45
|
+
.#{$prefix}__tab {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-flow: row nowrap;
|
|
48
|
+
gap: var(--uilib-spacing-200);
|
|
49
|
+
align-items: center;
|
|
50
|
+
|
|
51
|
+
&-label {
|
|
52
|
+
text-align: center;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
36
56
|
.#{$prefix}-wrapper {
|
|
37
57
|
display: flex;
|
|
38
58
|
flex-direction: column;
|
|
59
|
+
|
|
60
|
+
& > section:focus-visible::before {
|
|
61
|
+
border-radius: var(--uilib-border-radius-100);
|
|
62
|
+
}
|
|
39
63
|
}
|
|
40
64
|
|
|
41
65
|
// No-JS fallback
|
|
@@ -62,6 +86,18 @@ $uilib-tabs-anchor-included: false !default;
|
|
|
62
86
|
& .#{$prefix}__scroll-wrapper {
|
|
63
87
|
border-bottom: none;
|
|
64
88
|
}
|
|
89
|
+
|
|
90
|
+
.uilib-tabs-anchor__scroll-button {
|
|
91
|
+
top: calc(50% - var(--uilib-spacing-100));
|
|
92
|
+
|
|
93
|
+
&--left {
|
|
94
|
+
left: calc(-1 * var(--uilib-spacing-100));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&--right {
|
|
98
|
+
right: calc(-1 * var(--uilib-spacing-100));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
65
101
|
}
|
|
66
102
|
|
|
67
103
|
@media (prefers-reduced-motion: no-preference) {
|