@tui/design-system 1.6.0 → 1.7.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 +118 -0
- package/dist/themes/crystalski/index.css +11 -1
- package/dist/themes/crystalski/index.css.map +1 -1
- package/dist/themes/firstchoice/index.css +11 -1
- package/dist/themes/firstchoice/index.css.map +1 -1
- package/dist/themes/tui/index.css +13 -3
- package/dist/themes/tui/index.css.map +1 -1
- package/package.json +2 -2
- package/scss/lib/accordion/_mixins.scss +1 -3
- package/scss/lib/active-tag/_mixins.scss +16 -4
- 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/list/_mixins.scss +91 -72
- package/scss/lib/list/_variables.scss +1 -0
- package/scss/lib/modal/_variables.scss +1 -4
- 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 +1 -0
- package/scss/themes/crystalski/_overrides.scss +10 -0
- package/scss/themes/crystalski/index.scss +3 -0
- package/scss/themes/crystalski/theme.json +7 -0
- package/scss/themes/firstchoice/_overrides.scss +10 -0
- package/scss/themes/firstchoice/index.scss +3 -0
- package/scss/themes/firstchoice/theme.json +7 -0
- package/scss/themes/tui/index.scss +3 -0
- package/scss/variables/base-theme.json +64 -0
- package/scss/variables.scss +1 -0
- package/types/components.ts +32 -0
|
@@ -54,52 +54,105 @@ $uilib-tabs-in-page-included: false !default;
|
|
|
54
54
|
@include uilib-tabs-in-page-nojs-tab;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
&--full-width {
|
|
59
|
-
& > .#{$prefix}__tablist {
|
|
60
|
-
margin: 0;
|
|
61
|
-
padding: 0;
|
|
57
|
+
// ─── Full-width variant ───
|
|
62
58
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
// V1: full-width uses flex
|
|
60
|
+
[version='1'].#{$prefix}--full-width {
|
|
61
|
+
.#{$prefix}__tablist {
|
|
62
|
+
flex-wrap: nowrap;
|
|
67
63
|
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
margin: 0;
|
|
65
|
+
padding: 0;
|
|
70
66
|
|
|
71
|
-
|
|
72
|
-
}
|
|
67
|
+
border-bottom: var(--uilib-stroke-size-025) solid var(--uilib-tabs-in-page-border-color);
|
|
73
68
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
overflow: visible;
|
|
70
|
+
-webkit-mask-image: none;
|
|
71
|
+
mask-image: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.#{$prefix}__tab {
|
|
75
|
+
flex: 1;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
|
|
78
|
+
max-width: unset;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// V2: full-width uses table
|
|
83
|
+
[version='2'].#{$prefix}--full-width {
|
|
84
|
+
.#{$prefix}__tablist {
|
|
85
|
+
display: table;
|
|
86
|
+
|
|
87
|
+
width: 100%;
|
|
88
|
+
margin: 0;
|
|
89
|
+
padding: 0;
|
|
77
90
|
|
|
78
|
-
|
|
79
|
-
}
|
|
91
|
+
border-bottom: var(--uilib-stroke-size-025) solid var(--uilib-tabs-in-page-border-color);
|
|
80
92
|
|
|
81
|
-
|
|
82
|
-
-webkit-line-clamp: unset;
|
|
83
|
-
line-clamp: unset;
|
|
93
|
+
table-layout: fixed;
|
|
84
94
|
|
|
85
|
-
|
|
86
|
-
|
|
95
|
+
overflow: visible;
|
|
96
|
+
-webkit-mask-image: none;
|
|
97
|
+
mask-image: none;
|
|
87
98
|
}
|
|
88
99
|
|
|
89
|
-
|
|
100
|
+
.#{$prefix}__tab-outer {
|
|
101
|
+
display: table-cell;
|
|
102
|
+
|
|
103
|
+
vertical-align: bottom;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.#{$prefix}__tab {
|
|
107
|
+
width: 100%;
|
|
108
|
+
max-width: unset;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Full-width shared (both versions)
|
|
113
|
+
.#{$prefix}--full-width .#{$prefix}__tab-label {
|
|
114
|
+
-webkit-line-clamp: unset;
|
|
115
|
+
line-clamp: unset;
|
|
116
|
+
|
|
117
|
+
max-height: 2lh;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// ─── Vertical variant ───
|
|
121
|
+
|
|
122
|
+
// V1: vertical uses flex-direction
|
|
123
|
+
[version='1'].#{$prefix}--vertical {
|
|
124
|
+
.#{$prefix}__tablist {
|
|
90
125
|
flex-direction: column;
|
|
91
126
|
align-items: stretch;
|
|
92
127
|
}
|
|
93
128
|
|
|
94
|
-
|
|
129
|
+
.#{$prefix}__tab {
|
|
95
130
|
flex: none;
|
|
96
131
|
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// V2: vertical uses block layout
|
|
135
|
+
[version='2'].#{$prefix}--vertical {
|
|
136
|
+
.#{$prefix}__tablist {
|
|
137
|
+
display: block;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.#{$prefix}__tab-outer {
|
|
141
|
+
display: block;
|
|
97
142
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
line-clamp: 2;
|
|
143
|
+
width: 100%;
|
|
144
|
+
}
|
|
101
145
|
|
|
102
|
-
|
|
146
|
+
.#{$prefix}__tab {
|
|
147
|
+
width: 100%;
|
|
103
148
|
}
|
|
104
149
|
}
|
|
150
|
+
|
|
151
|
+
// Vertical shared
|
|
152
|
+
.#{$prefix}--vertical .#{$prefix}__tab-label {
|
|
153
|
+
-webkit-line-clamp: 2;
|
|
154
|
+
line-clamp: 2;
|
|
155
|
+
|
|
156
|
+
max-height: unset;
|
|
157
|
+
}
|
|
105
158
|
}
|
package/scss/mixins.scss
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
@forward 'lib/pagination/mixins';
|
|
37
37
|
@forward 'lib/price/mixins';
|
|
38
38
|
@forward 'lib/price-box/mixins';
|
|
39
|
+
@forward 'lib/cards/promotion/mixins';
|
|
39
40
|
@forward 'lib/promo-tag/mixins';
|
|
40
41
|
@forward 'lib/ratings-reviews/customer-review/mixins';
|
|
41
42
|
@forward 'lib/ratings-reviews/numerical/mixins';
|
|
@@ -279,6 +279,7 @@ $uilib-crystalski-list-variables: map.merge(
|
|
|
279
279
|
$uilib-list-variables,
|
|
280
280
|
(
|
|
281
281
|
bullet-icon: url('#{$uilib-assets-base-url}v3/icons/crystalski/standard/list-item.svg'),
|
|
282
|
+
multiline-title-font: var(--uilib-typography-label-medium-strong),
|
|
282
283
|
)
|
|
283
284
|
);
|
|
284
285
|
|
|
@@ -299,6 +300,15 @@ $uilib-crystalski-pagination-variables: map.merge(
|
|
|
299
300
|
)
|
|
300
301
|
);
|
|
301
302
|
|
|
303
|
+
// Promo banner
|
|
304
|
+
$uilib-crystalski-card-promotion-variables: map.merge(
|
|
305
|
+
$uilib-card-promotion-variables,
|
|
306
|
+
(
|
|
307
|
+
cta-copy-icon: url('#{$uilib-assets-base-url}v3/icons/crystalski/standard/copy.svg'),
|
|
308
|
+
cta-copied-icon: url('#{$uilib-assets-base-url}v3/icons/crystalski/standard/checkmark-circled-filled.svg'),
|
|
309
|
+
)
|
|
310
|
+
);
|
|
311
|
+
|
|
302
312
|
// Ratings and Reviews - Numerical
|
|
303
313
|
$uilib-crystalski-ratings-numerical-variables: map.merge(
|
|
304
314
|
$uilib-ratings-numerical-variables,
|
|
@@ -161,6 +161,9 @@
|
|
|
161
161
|
// Price
|
|
162
162
|
@include util.uilib-build-css-vars('price', $uilib-price-variables);
|
|
163
163
|
|
|
164
|
+
// Promo banner
|
|
165
|
+
@include util.uilib-build-css-vars('card-promotion', $uilib-crystalski-card-promotion-variables);
|
|
166
|
+
|
|
164
167
|
// Promo tag
|
|
165
168
|
@include util.uilib-build-css-vars('promo-tag', $uilib-promo-tag-variables);
|
|
166
169
|
|
|
@@ -354,6 +354,7 @@ $uilib-firstchoice-list-variables: map.merge(
|
|
|
354
354
|
$uilib-list-variables,
|
|
355
355
|
(
|
|
356
356
|
bullet-icon: url('#{$uilib-assets-base-url}v3/icons/tui/standard/list-item.svg'),
|
|
357
|
+
multiline-title-font: var(--uilib-typography-label-medium-strong),
|
|
357
358
|
)
|
|
358
359
|
);
|
|
359
360
|
|
|
@@ -382,6 +383,15 @@ $uilib-firstchoice-price-variables: map.merge(
|
|
|
382
383
|
)
|
|
383
384
|
);
|
|
384
385
|
|
|
386
|
+
// Promo banner
|
|
387
|
+
$uilib-firstchoice-card-promotion-variables: map.merge(
|
|
388
|
+
$uilib-card-promotion-variables,
|
|
389
|
+
(
|
|
390
|
+
cta-copy-icon: url('#{$uilib-assets-base-url}v3/icons/firstchoice/standard/copy.svg'),
|
|
391
|
+
cta-copied-icon: url('#{$uilib-assets-base-url}v3/icons/firstchoice/standard/checkmark-circled-filled.svg'),
|
|
392
|
+
)
|
|
393
|
+
);
|
|
394
|
+
|
|
385
395
|
// Ratings and Reviews - Numerical
|
|
386
396
|
$uilib-firstchoice-ratings-numerical-variables: map.merge(
|
|
387
397
|
$uilib-ratings-numerical-variables,
|
|
@@ -161,6 +161,9 @@
|
|
|
161
161
|
// Price
|
|
162
162
|
@include util.uilib-build-css-vars('price', $uilib-firstchoice-price-variables);
|
|
163
163
|
|
|
164
|
+
// Promo banner
|
|
165
|
+
@include util.uilib-build-css-vars('card-promotion', $uilib-firstchoice-card-promotion-variables);
|
|
166
|
+
|
|
164
167
|
// Promo tag
|
|
165
168
|
@include util.uilib-build-css-vars('promo-tag', $uilib-promo-tag-variables);
|
|
166
169
|
|
|
@@ -161,6 +161,9 @@
|
|
|
161
161
|
// Price
|
|
162
162
|
@include util.uilib-build-css-vars('price', $uilib-price-variables);
|
|
163
163
|
|
|
164
|
+
// Promo banner
|
|
165
|
+
@include util.uilib-build-css-vars('card-promotion', $uilib-card-promotion-variables);
|
|
166
|
+
|
|
164
167
|
// Promo tag
|
|
165
168
|
@include util.uilib-build-css-vars('promo-tag', $uilib-promo-tag-variables);
|
|
166
169
|
|
|
@@ -1913,6 +1913,12 @@
|
|
|
1913
1913
|
"title": "List image radius (alt)",
|
|
1914
1914
|
"description": "List image radius (alt)",
|
|
1915
1915
|
"displayType": "radius"
|
|
1916
|
+
},
|
|
1917
|
+
"list-multiline-title-font": {
|
|
1918
|
+
"primitive": "uilib-typography-label-medium",
|
|
1919
|
+
"title": "List multiline title font",
|
|
1920
|
+
"description": "List multiline title font",
|
|
1921
|
+
"displayType": "font"
|
|
1916
1922
|
}
|
|
1917
1923
|
}
|
|
1918
1924
|
},
|
|
@@ -2093,6 +2099,64 @@
|
|
|
2093
2099
|
}
|
|
2094
2100
|
}
|
|
2095
2101
|
},
|
|
2102
|
+
"card-promotion": {
|
|
2103
|
+
"tokens": {
|
|
2104
|
+
"card-promotion-elevation": {
|
|
2105
|
+
"primitive": "uilib-elevation-100",
|
|
2106
|
+
"title": "Container elevation",
|
|
2107
|
+
"description": "Box shadow of the banner container",
|
|
2108
|
+
"displayType": "shadow"
|
|
2109
|
+
},
|
|
2110
|
+
"card-promotion-radius": {
|
|
2111
|
+
"primitive": "uilib-border-radius-400",
|
|
2112
|
+
"title": "Container radius",
|
|
2113
|
+
"description": "Border radius of the banner container",
|
|
2114
|
+
"displayType": "radius"
|
|
2115
|
+
},
|
|
2116
|
+
"card-promotion-bg-color": {
|
|
2117
|
+
"primitive": "uilib-color-core-neutral",
|
|
2118
|
+
"title": "Container background color",
|
|
2119
|
+
"description": "Background color of the banner container",
|
|
2120
|
+
"displayType": "color"
|
|
2121
|
+
},
|
|
2122
|
+
"card-promotion-headline-color": {
|
|
2123
|
+
"primitive": "uilib-color-text-strong",
|
|
2124
|
+
"title": "Headline color",
|
|
2125
|
+
"description": "Text color of the headline",
|
|
2126
|
+
"displayType": "color"
|
|
2127
|
+
},
|
|
2128
|
+
"card-promotion-subcopy-color": {
|
|
2129
|
+
"primitive": "uilib-color-text-body",
|
|
2130
|
+
"title": "Sub-copy color",
|
|
2131
|
+
"description": "Text color of the sub-copy",
|
|
2132
|
+
"displayType": "color"
|
|
2133
|
+
},
|
|
2134
|
+
"card-promotion-subcopy-link-color": {
|
|
2135
|
+
"primitive": "uilib-color-text-link",
|
|
2136
|
+
"title": "Sub-copy link color",
|
|
2137
|
+
"description": "Text color of inline links in the sub-copy",
|
|
2138
|
+
"displayType": "color"
|
|
2139
|
+
},
|
|
2140
|
+
"card-promotion-code-color": {
|
|
2141
|
+
"primitive": "uilib-color-text-strong",
|
|
2142
|
+
"title": "Promo code color",
|
|
2143
|
+
"description": "Text color of the promo code",
|
|
2144
|
+
"displayType": "color"
|
|
2145
|
+
},
|
|
2146
|
+
"card-promotion-cta-copy-icon": {
|
|
2147
|
+
"displayType": "icon",
|
|
2148
|
+
"title": "CTA copy icon",
|
|
2149
|
+
"description": "Icon used in the Copy code button",
|
|
2150
|
+
"longValue": true
|
|
2151
|
+
},
|
|
2152
|
+
"card-promotion-cta-copied-icon": {
|
|
2153
|
+
"displayType": "icon",
|
|
2154
|
+
"title": "CTA copied icon",
|
|
2155
|
+
"description": "Icon used in the Copied button after a successful copy",
|
|
2156
|
+
"longValue": true
|
|
2157
|
+
}
|
|
2158
|
+
}
|
|
2159
|
+
},
|
|
2096
2160
|
"promo-tag": {
|
|
2097
2161
|
"tokens": {
|
|
2098
2162
|
"promo-tag-radius": {
|
package/scss/variables.scss
CHANGED
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
@forward 'lib/modal/variables';
|
|
56
56
|
@forward 'lib/pagination/variables';
|
|
57
57
|
@forward 'lib/price/variables';
|
|
58
|
+
@forward 'lib/cards/promotion/variables';
|
|
58
59
|
@forward 'lib/promo-tag/variables';
|
|
59
60
|
@forward 'lib/ratings-reviews/numerical/variables';
|
|
60
61
|
@forward 'lib/ratings-reviews/percentage/variables';
|
package/types/components.ts
CHANGED
|
@@ -66,6 +66,9 @@ export interface AnchorTab {
|
|
|
66
66
|
|
|
67
67
|
export interface AnchorTabsProps {
|
|
68
68
|
icon?: string;
|
|
69
|
+
tabsLabelledby?: string;
|
|
70
|
+
tabsLabel?: string;
|
|
71
|
+
/** @deprecated Use `tabsLabelledby` instead */
|
|
69
72
|
ariaLabelledby?: string;
|
|
70
73
|
tabs?: AnchorTab[];
|
|
71
74
|
sticky?: boolean;
|
|
@@ -146,6 +149,9 @@ export interface DatepickerProps {
|
|
|
146
149
|
maxDate?: string;
|
|
147
150
|
previousLabel?: string;
|
|
148
151
|
nextLabel?: string;
|
|
152
|
+
announceStart?: string;
|
|
153
|
+
announceRange?: string;
|
|
154
|
+
instructions?: string;
|
|
149
155
|
locale?: string;
|
|
150
156
|
}
|
|
151
157
|
|
|
@@ -247,6 +253,9 @@ export interface InPageTabsProps {
|
|
|
247
253
|
variant?: 'left-aligned' | 'full-width';
|
|
248
254
|
icon?: string;
|
|
249
255
|
active?: string;
|
|
256
|
+
tabsLabelledby?: string;
|
|
257
|
+
tabsLabel?: string;
|
|
258
|
+
/** @deprecated Use `tabsLabelledby` instead */
|
|
250
259
|
ariaLabelledby?: string;
|
|
251
260
|
tabs?: InPageTab[];
|
|
252
261
|
}
|
|
@@ -378,11 +387,14 @@ export interface LinkProps {
|
|
|
378
387
|
export type ListVariant = 'bulleted' | 'numbered' | 'icon' | 'image';
|
|
379
388
|
export type ListTextVariant = 'default' | 'strong' | 'label';
|
|
380
389
|
export type ListIconSize = 'small' | 'medium' | 'large';
|
|
390
|
+
export type ListLayout = 'default' | 'columns' | 'horizontal';
|
|
381
391
|
|
|
382
392
|
export interface ListProps {
|
|
383
393
|
variant?: ListVariant;
|
|
384
394
|
textVariant?: ListTextVariant;
|
|
385
395
|
iconSize?: ListIconSize;
|
|
396
|
+
layout?: ListLayout;
|
|
397
|
+
/** @deprecated Use `layout: 'columns'` instead. */
|
|
386
398
|
columns?: boolean;
|
|
387
399
|
inverse?: boolean;
|
|
388
400
|
altShape?: boolean;
|
|
@@ -458,6 +470,26 @@ export interface PriceBoxProps {
|
|
|
458
470
|
footerHtml?: string;
|
|
459
471
|
}
|
|
460
472
|
|
|
473
|
+
// ─── Card Promotion ───────────────────────────────────────
|
|
474
|
+
export interface CardPromotionProps {
|
|
475
|
+
type?: 'default' | 'promo-code';
|
|
476
|
+
condensed?: boolean;
|
|
477
|
+
headingLevel?: HeadingLevel;
|
|
478
|
+
headline?: string;
|
|
479
|
+
scarcityLabel?: string;
|
|
480
|
+
conditions?: string;
|
|
481
|
+
linkLabel?: string;
|
|
482
|
+
icon?: string;
|
|
483
|
+
code?: string;
|
|
484
|
+
copied?: boolean;
|
|
485
|
+
copyLabel?: string;
|
|
486
|
+
copiedLabel?: string;
|
|
487
|
+
expired?: boolean;
|
|
488
|
+
expiredLabel?: string;
|
|
489
|
+
announcementLabel?: string;
|
|
490
|
+
theme?: Theme;
|
|
491
|
+
}
|
|
492
|
+
|
|
461
493
|
// ─── Promo Tag ──────────────────────────────────────────
|
|
462
494
|
export const PromoTagSizes = ['xsmall', 'small', 'medium', 'large', 'xlarge', 'xxlarge'] as const;
|
|
463
495
|
export type PromoTagSize = (typeof PromoTagSizes)[number];
|