@tui/design-system 1.7.0 → 1.9.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +99 -1
  2. package/dist/themes/crystalski/index.css +30 -0
  3. package/dist/themes/crystalski/index.css.map +1 -1
  4. package/dist/themes/firstchoice/index.css +30 -0
  5. package/dist/themes/firstchoice/index.css.map +1 -1
  6. package/dist/themes/tui/index.css +30 -0
  7. package/dist/themes/tui/index.css.map +1 -1
  8. package/package.json +10 -9
  9. package/scss/lib/accordion/_mixins.scss +12 -3
  10. package/scss/lib/cards/carousel/_index.scss +3 -0
  11. package/scss/lib/cards/carousel/_mixins.scss +164 -0
  12. package/scss/lib/cards/carousel/_variables.scss +13 -0
  13. package/scss/lib/forms/input-stepper/_mixins.scss +1 -3
  14. package/scss/lib/highlight-panel/_index.scss +2 -0
  15. package/scss/lib/highlight-panel/_mixins.scss +244 -0
  16. package/scss/lib/highlight-panel/_variables.scss +21 -0
  17. package/scss/lib/list/_mixins.scss +51 -0
  18. package/scss/lib/list/_variables.scss +1 -0
  19. package/scss/lib/patterns/edit-search/_index.scss +3 -0
  20. package/scss/lib/patterns/edit-search/_mixins.scss +98 -0
  21. package/scss/lib/patterns/edit-search/_variables.scss +7 -0
  22. package/scss/lib/patterns/review-card/_index.scss +3 -0
  23. package/scss/lib/patterns/review-card/_mixins.scss +283 -0
  24. package/scss/lib/patterns/review-card/_variables.scss +3 -0
  25. package/scss/lib/patterns/review-summary/_index.scss +3 -0
  26. package/scss/lib/patterns/review-summary/_mixins.scss +156 -0
  27. package/scss/lib/patterns/review-summary/_variables.scss +3 -0
  28. package/scss/lib/ratings-reviews/range-bar/_mixins.scss +3 -2
  29. package/scss/lib/ratings-reviews/range-icons/_mixins.scss +16 -2
  30. package/scss/lib/ratings-reviews/range-icons/_variables.scss +2 -0
  31. package/scss/mixins.scss +7 -0
  32. package/scss/themes/crystalski/_overrides.scss +17 -0
  33. package/scss/themes/crystalski/index.scss +10 -0
  34. package/scss/themes/crystalski/theme.json +7 -0
  35. package/scss/themes/firstchoice/_overrides.scss +19 -0
  36. package/scss/themes/firstchoice/index.scss +10 -0
  37. package/scss/themes/firstchoice/theme.json +13 -0
  38. package/scss/themes/tui/_overrides.scss +19 -0
  39. package/scss/themes/tui/index.scss +10 -0
  40. package/scss/themes/tui/theme.json +8 -0
  41. package/scss/variables/_grid.scss +3 -3
  42. package/scss/variables/_primitives.scss +3 -0
  43. package/scss/variables/base-theme.json +191 -1
  44. package/scss/variables.scss +7 -0
  45. package/types/components.ts +40 -2
@@ -0,0 +1,244 @@
1
+ // Highlight panel / _mixins
2
+ @use 'variables' as *;
3
+ @use '../utility/mixins' as *;
4
+ @use '../icon/mixins' as *;
5
+
6
+ $uilib-highlight-panel-included: false !default;
7
+
8
+ @mixin uilib-highlight-panel() {
9
+ @if not $uilib-highlight-panel-included {
10
+ $uilib-highlight-panel-included: true !global;
11
+
12
+ @include uilib-icon;
13
+ @include uilib-highlight-panel-master;
14
+ }
15
+ }
16
+
17
+ @mixin uilib-highlight-panel-master() {
18
+ .uilib-highlight-panel {
19
+ &::after {
20
+ content: '';
21
+
22
+ display: block;
23
+
24
+ height: var(--uilib-spacing-400);
25
+
26
+ border: var(--uilib-stroke-size-025) solid var(--uilib-highlight-panel-border-color);
27
+ border-top: 0;
28
+ border-radius: 0 0 var(--uilib-highlight-panel-radius) var(--uilib-highlight-panel-radius);
29
+
30
+ background: var(--uilib-highlight-panel-bg-color);
31
+ }
32
+
33
+ // ─── Header ───
34
+ &__header {
35
+ position: relative;
36
+
37
+ display: flex;
38
+ gap: var(--uilib-spacing-200);
39
+ align-items: center;
40
+
41
+ padding: var(--uilib-spacing-200) calc(var(--uilib-icon-size-small) + var(--uilib-spacing-600)) var(--uilib-spacing-600)
42
+ var(--uilib-spacing-400);
43
+
44
+ color: var(--uilib-highlight-panel-header-font-color);
45
+
46
+ border-radius: var(--uilib-highlight-panel-radius) var(--uilib-highlight-panel-radius) 0 0;
47
+
48
+ background: var(--uilib-highlight-panel-header-bg-color);
49
+
50
+ // Remove native summary markers
51
+ list-style: none;
52
+
53
+ &::after {
54
+ position: absolute;
55
+ inset: auto 0 0;
56
+ content: '';
57
+
58
+ display: block;
59
+
60
+ height: var(--uilib-spacing-400);
61
+
62
+ border: var(--uilib-stroke-size-025) solid var(--uilib-highlight-panel-border-color);
63
+ border-bottom-width: 0;
64
+ border-radius: var(--uilib-highlight-panel-radius) var(--uilib-highlight-panel-radius) 0 0;
65
+
66
+ background: var(--uilib-highlight-panel-bg-color);
67
+ }
68
+
69
+ &:focus-visible {
70
+ @include uilib-focus;
71
+
72
+ &::before {
73
+ bottom: calc(var(--uilib-spacing-400) - var(--uilib-focus-gap));
74
+
75
+ border-radius: var(--uilib-highlight-panel-radius);
76
+ }
77
+ }
78
+
79
+ &::-webkit-details-marker {
80
+ display: none;
81
+ }
82
+
83
+ &::marker {
84
+ content: '';
85
+
86
+ display: none;
87
+ }
88
+ }
89
+
90
+ // Clickable header (collapsible variant)
91
+ &__collapsible > &__header {
92
+ cursor: pointer;
93
+ }
94
+
95
+ // Collapsible details element (nested inside panel)
96
+ &__collapsible {
97
+ // Reset details styling
98
+ margin: 0;
99
+ padding: 0;
100
+
101
+ border: 0;
102
+ }
103
+
104
+ &__collapsible &__header-text::before {
105
+ display: block;
106
+ }
107
+
108
+ &__collapsible[open] &__header-text::before {
109
+ transform: translate(0, calc((var(--uilib-icon-size-small) / 2) * -1)) rotate(180deg);
110
+ }
111
+
112
+ &__collapsible::details-content {
113
+ block-size: 0;
114
+
115
+ overflow: hidden;
116
+
117
+ @media (prefers-reduced-motion: no-preference) {
118
+ transition:
119
+ block-size var(--uilib-motion-duration-medium) var(--uilib-motion-timing-out),
120
+ content-visibility var(--uilib-motion-duration-medium) allow-discrete;
121
+ }
122
+ }
123
+
124
+ &__collapsible[open]::details-content {
125
+ block-size: auto;
126
+ }
127
+
128
+ &__header-text {
129
+ display: flex;
130
+ flex-direction: column;
131
+
132
+ // ─── Toggle indicator (collapsible) ───
133
+ &::before {
134
+ position: absolute;
135
+ top: calc(50% - var(--uilib-spacing-200));
136
+ right: var(--uilib-spacing-400);
137
+ content: '';
138
+
139
+ display: none;
140
+
141
+ width: var(--uilib-icon-size-small);
142
+ height: var(--uilib-icon-size-small);
143
+
144
+ background-color: var(--uilib-highlight-panel-header-icon-color);
145
+
146
+ -webkit-mask: var(--uilib-highlight-panel-toggle-icon) no-repeat center;
147
+ mask: var(--uilib-highlight-panel-toggle-icon) no-repeat center;
148
+ -webkit-mask-size: contain;
149
+ mask-size: contain;
150
+
151
+ transform: translate(0, calc((var(--uilib-icon-size-small) / 2) * -1));
152
+
153
+ @media (prefers-reduced-motion: no-preference) {
154
+ transition: transform var(--uilib-motion-duration-medium) var(--uilib-motion-timing-out);
155
+ }
156
+ }
157
+ }
158
+
159
+ &__title {
160
+ font: var(--uilib-highlight-panel-header-font);
161
+ }
162
+
163
+ &__subtitle {
164
+ font: var(--uilib-typography-component-heading-small);
165
+ }
166
+
167
+ &__icon {
168
+ flex-shrink: 0;
169
+ }
170
+
171
+ // ─── Content ───
172
+ // ─── Footer (always visible in collapsible mode) ───
173
+ &__content,
174
+ &__footer {
175
+ padding: 0 var(--uilib-spacing-400);
176
+
177
+ border: var(--uilib-stroke-size-025) solid var(--uilib-highlight-panel-border-color);
178
+ border-top-width: 0;
179
+ border-bottom-width: 0;
180
+
181
+ background: var(--uilib-highlight-panel-bg-color);
182
+ }
183
+
184
+ &__content {
185
+ padding-top: var(--uilib-spacing-400);
186
+
187
+ border-top-width: var(--uilib-stroke-size-025);
188
+ border-radius: var(--uilib-highlight-panel-radius) var(--uilib-highlight-panel-radius) 0 0;
189
+ }
190
+
191
+ &:has(&__header) &__content {
192
+ padding-top: 0;
193
+
194
+ border-top-width: 0;
195
+ border-radius: 0;
196
+ }
197
+
198
+ &:has(&__footer) &__content {
199
+ padding-bottom: var(--uilib-spacing-200);
200
+
201
+ &--divider::after {
202
+ content: '';
203
+
204
+ display: block;
205
+
206
+ width: 100%;
207
+ margin-top: var(--uilib-spacing-200);
208
+
209
+ border-bottom: var(--uilib-stroke-size-050) solid var(--uilib-color-border-divider);
210
+ }
211
+ }
212
+
213
+ // ─── Variants ───
214
+ /* stylelint-disable-next-line order/order */
215
+ &--strong &__header {
216
+ color: var(--uilib-highlight-panel-header-font-color-strong);
217
+
218
+ background: var(--uilib-highlight-panel-header-bg-color-strong);
219
+
220
+ &-text::before {
221
+ background-color: var(--uilib-highlight-panel-header-icon-color-strong);
222
+ }
223
+ }
224
+
225
+ &--brand &__header {
226
+ color: var(--uilib-highlight-panel-header-font-color-brand);
227
+
228
+ background: var(--uilib-highlight-panel-header-bg-overlay-brand, none), var(--uilib-highlight-panel-header-bg-color-brand);
229
+ background-repeat: no-repeat;
230
+ background-position:
231
+ right top,
232
+ center;
233
+ background-size: 50%, auto;
234
+
235
+ &-text::before {
236
+ background-color: var(--uilib-highlight-panel-header-icon-color-brand);
237
+ }
238
+ }
239
+
240
+ &--brand &__title {
241
+ font: var(--uilib-highlight-panel-header-font-brand);
242
+ }
243
+ }
244
+ }
@@ -0,0 +1,21 @@
1
+ @use '../../variables/env-variables' as *;
2
+
3
+ // Highlight panel specific variables to allow theming
4
+ $uilib-highlight-panel-variables: (
5
+ radius: var(--uilib-border-radius-400),
6
+ border-color: var(--uilib-color-border-card),
7
+ bg-color: var(--uilib-color-canvas-default),
8
+ header-font: var(--uilib-typography-component-heading-medium),
9
+ header-font-brand: var(--uilib-typography-component-heading-large-strong),
10
+ header-font-color: var(--uilib-color-text-strong),
11
+ header-font-color-strong: var(--uilib-color-text-inverse),
12
+ header-font-color-brand: var(--uilib-color-text-strong),
13
+ header-icon-color: var(--uilib-color-core-interaction),
14
+ header-icon-color-strong: var(--uilib-color-text-inverse),
15
+ header-icon-color-brand: var(--uilib-color-core-interaction),
16
+ header-bg-color: var(--uilib-color-core-surface),
17
+ header-bg-color-strong: var(--uilib-color-core-brand-strong),
18
+ header-bg-color-brand: var(--uilib-color-core-brand),
19
+ header-bg-overlay-brand: none,
20
+ toggle-icon: url('#{$uilib-assets-base-url}v3/icons/tui/standard/chevron-down.svg'),
21
+ ) !default;
@@ -117,6 +117,16 @@ $uilib-list-included: false !default;
117
117
  }
118
118
  }
119
119
 
120
+ &--plain {
121
+ & > li {
122
+ padding: 0;
123
+
124
+ &::before {
125
+ display: none;
126
+ }
127
+ }
128
+ }
129
+
120
130
  &--columns {
121
131
  display: block;
122
132
 
@@ -124,6 +134,8 @@ $uilib-list-included: false !default;
124
134
 
125
135
  & > li {
126
136
  margin-bottom: var(--uilib-spacing-100);
137
+
138
+ break-inside: avoid;
127
139
  }
128
140
  }
129
141
 
@@ -142,6 +154,43 @@ $uilib-list-included: false !default;
142
154
  li:has(> &__title) {
143
155
  font: var(--uilib-typography-body-medium);
144
156
  }
157
+
158
+ &:not(&--inverse) li.uilib-list__highlight-item {
159
+ color: var(--uilib-list-highlight-color);
160
+
161
+ &::before {
162
+ color: var(--uilib-list-highlight-color);
163
+ }
164
+
165
+ .uilib-list__icon {
166
+ background-color: var(--uilib-list-highlight-color);
167
+ }
168
+ }
169
+
170
+ &:not(&--inverse, &--numbered) li.uilib-list__highlight-item::before {
171
+ background-color: var(--uilib-list-highlight-color);
172
+ }
173
+
174
+ li:has(&__hint) {
175
+ display: grid;
176
+ grid-template-columns: 1fr auto;
177
+ gap: 0 var(--uilib-spacing-200);
178
+ align-items: baseline;
179
+
180
+ > :not(.uilib-list__hint) {
181
+ grid-column: 1;
182
+ }
183
+
184
+ .uilib-list__icon,
185
+ .uilib-list__image {
186
+ grid-column: unset;
187
+ }
188
+ }
189
+
190
+ &__hint {
191
+ grid-row: 1 / span 20;
192
+ grid-column: 2;
193
+ }
145
194
  }
146
195
  }
147
196
 
@@ -197,6 +246,8 @@ $uilib-list-included: false !default;
197
246
  & > li {
198
247
  padding-left: calc(var(--uilib-icon-size-medium) + var(--uilib-spacing-200));
199
248
 
249
+ counter-increment: list-item;
250
+
200
251
  &::before {
201
252
  left: 0;
202
253
  content: counters(list-item, '.') '.';
@@ -7,4 +7,5 @@ $uilib-list-variables: (
7
7
  image-radius: var(--uilib-border-radius-100),
8
8
  image-alt-radius: var(--uilib-border-radius-circle),
9
9
  multiline-title-font: var(--uilib-typography-label-medium),
10
+ highlight-color: var(--uilib-color-text-promotion),
10
11
  ) !default;
@@ -0,0 +1,3 @@
1
+ // Edit search / index
2
+ @use 'mixins' as *;
3
+ @include uilib-edit-search;
@@ -0,0 +1,98 @@
1
+ // Edit search / _mixins
2
+ @use 'sass:map';
3
+ @use 'variables' as *;
4
+ @use '../../../variables/breakpoints' as *;
5
+ @use '../../utility/mixins' as *;
6
+ @use '../../button/mixins' as *;
7
+ @use '../../link/mixins' as *;
8
+ @use '../../list/mixins' as *;
9
+
10
+ $uilib-edit-search-included: false !default;
11
+
12
+ @mixin uilib-edit-search() {
13
+ @if not $uilib-edit-search-included {
14
+ $uilib-edit-search-included: true !global;
15
+
16
+ @include uilib-button;
17
+ @include uilib-link;
18
+ @include uilib-list;
19
+ @include uilib-edit-search-master;
20
+ }
21
+ }
22
+
23
+ @mixin uilib-edit-search-master() {
24
+ .uilib-edit-search {
25
+ display: flex;
26
+ flex-flow: row nowrap;
27
+ gap: var(--uilib-spacing-600);
28
+ justify-content: space-between;
29
+ align-items: center;
30
+
31
+ padding: var(--uilib-spacing-200) var(--uilib-spacing-200) var(--uilib-spacing-200) var(--uilib-spacing-400);
32
+
33
+ color: var(--uilib-edit-search-text-color);
34
+
35
+ border-radius: var(--uilib-edit-search-radius);
36
+
37
+ background: var(--uilib-edit-search-bg-color);
38
+
39
+ &__content {
40
+ display: flex;
41
+ flex-flow: column;
42
+ gap: var(--uilib-spacing-100);
43
+ }
44
+
45
+ &__heading {
46
+ font: var(--uilib-typography-label-medium-strong);
47
+
48
+ &--hidden {
49
+ @include uilib-visually-hidden;
50
+ }
51
+ }
52
+
53
+ &__link:visited {
54
+ color: var(--uilib-color-text-link);
55
+ text-decoration-color: var(--uilib-link-decoration-color);
56
+ }
57
+
58
+ &__button {
59
+ align-self: flex-end;
60
+ }
61
+
62
+ &__list {
63
+ margin: 0;
64
+ }
65
+
66
+ /* stylelint-disable-next-line order/order */
67
+ @media (max-width: #{map.get($uilib-breakpoints, md)}) {
68
+ &__list {
69
+ display: -webkit-box;
70
+
71
+ text-align: left;
72
+ text-overflow: ellipsis;
73
+
74
+ overflow: hidden;
75
+ -webkit-line-clamp: 2;
76
+ line-clamp: 2;
77
+ -webkit-box-orient: vertical;
78
+
79
+ > li {
80
+ display: inline;
81
+
82
+ padding-left: 0;
83
+
84
+ &::before,
85
+ .uilib-icon {
86
+ display: none;
87
+ }
88
+
89
+ &:not(:last-child)::after {
90
+ content: ' | ';
91
+
92
+ display: inline;
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ }
@@ -0,0 +1,7 @@
1
+ // Edit search / _variables
2
+
3
+ $uilib-edit-search-variables: (
4
+ radius: var(--uilib-border-radius-400),
5
+ bg-color: var(--uilib-color-core-surface),
6
+ text-color: var(--uilib-color-text-strong),
7
+ ) !default;
@@ -0,0 +1,3 @@
1
+ // Review card / index
2
+ @use 'mixins' as *;
3
+ @include uilib-review-card;