@tangible/ui 0.2.7 → 0.2.8
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/components/ColorPicker/ColorField.js +33 -10
- package/components/MultiCombobox/MultiCombobox.js +4 -3
- package/components/MultiSelect/MultiSelect.js +4 -3
- package/components/Tabs/Tabs.js +16 -1
- package/package.json +1 -1
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +50 -34
- package/styles/all.expanded.unlayered.css +50 -34
- package/styles/all.unlayered.css +1 -1
- package/styles/components/combobox.scss +29 -6
- package/styles/components/date-picker.scss +9 -3
- package/styles/components/multi-combobox.scss +18 -3
- package/styles/components/multi-select.scss +28 -9
- package/styles/components/notice.scss +7 -5
- package/styles/components/segmented-control.scss +10 -5
- package/styles/components/select.scss +16 -7
- package/styles/components/sidebar.scss +31 -22
- package/styles/components/tabs.scss +26 -15
- package/tui-manifest.json +3 -2
- package/utils/color/color.js +14 -2
|
@@ -62,6 +62,20 @@ $_label-letter-spacing: 0.05em;
|
|
|
62
62
|
position: relative;
|
|
63
63
|
display: flex;
|
|
64
64
|
align-items: center;
|
|
65
|
+
// The chevron and clear button are siblings of the input, outside its
|
|
66
|
+
// control-sizing scope — they'd inherit the interface base font and ignore
|
|
67
|
+
// --tui-control-font-size-* remaps. Key the wrapper to the control font so
|
|
68
|
+
// both track it; the input sets its own font via control-sizing, so it's
|
|
69
|
+
// unaffected. Size classes live on the input, hence :has().
|
|
70
|
+
font-size: var(--#{sys.$prefix}control-font-size-md, var(--#{sys.$prefix}typography-size-md));
|
|
71
|
+
|
|
72
|
+
&:has(> .#{sys.$prefix}combobox__input.is-size-sm) {
|
|
73
|
+
font-size: var(--#{sys.$prefix}control-font-size-sm, var(--#{sys.$prefix}typography-size-sm));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&:has(> .#{sys.$prefix}combobox__input.is-size-lg) {
|
|
77
|
+
font-size: var(--#{sys.$prefix}control-font-size-lg, var(--#{sys.$prefix}typography-size-lg));
|
|
78
|
+
}
|
|
65
79
|
}
|
|
66
80
|
|
|
67
81
|
// ---------------------------------------------------------------------------
|
|
@@ -159,10 +173,14 @@ $_label-letter-spacing: 0.05em;
|
|
|
159
173
|
outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
|
|
160
174
|
outline-offset: var(--#{sys.$prefix}focus-ring-offset);
|
|
161
175
|
}
|
|
176
|
+
}
|
|
162
177
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
178
|
+
// Disabled input → inert clear (belt-and-braces; the clear doesn't render
|
|
179
|
+
// while disabled). Top-level: trailing `&` would splice the interface prefix
|
|
180
|
+
// after the sibling combinator and never match.
|
|
181
|
+
.#{sys.$prefix}interface
|
|
182
|
+
.#{sys.$prefix}combobox__input:disabled ~ .#{sys.$prefix}combobox__clear {
|
|
183
|
+
pointer-events: none;
|
|
166
184
|
}
|
|
167
185
|
|
|
168
186
|
// ---------------------------------------------------------------------------
|
|
@@ -178,10 +196,15 @@ $_label-letter-spacing: 0.05em;
|
|
|
178
196
|
color: var(--#{sys.$prefix}color-fg-muted);
|
|
179
197
|
pointer-events: none;
|
|
180
198
|
transition: transform var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
|
|
199
|
+
}
|
|
181
200
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
201
|
+
// Open-state rotation. NOT `[aria-expanded="true"] ~ &` inside the icon
|
|
202
|
+
// block — trailing `&` substitutes the FULL parent selector (interface
|
|
203
|
+
// prefix included), compiling to a sibling combinator against
|
|
204
|
+
// `.tui-interface` that matches nothing.
|
|
205
|
+
.#{sys.$prefix}interface
|
|
206
|
+
.#{sys.$prefix}combobox__input[aria-expanded="true"] ~ .#{sys.$prefix}combobox__icon {
|
|
207
|
+
transform: rotate(180deg);
|
|
185
208
|
}
|
|
186
209
|
|
|
187
210
|
// ---------------------------------------------------------------------------
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
// ==========================================================================
|
|
18
18
|
//
|
|
19
19
|
// Component API tokens (never defined here, only read via fallback):
|
|
20
|
-
// --tui-calendar-cell-size Day cell square (default 2.5rem)
|
|
20
|
+
// --tui-calendar-cell-size Day cell square (default 2.5 × control-font-md, i.e. 2.5rem)
|
|
21
21
|
// --tui-calendar-cell-radius Day cell radius (default full circle)
|
|
22
22
|
// --tui-calendar-selected-bg Selected/range-endpoint fill
|
|
23
23
|
// --tui-calendar-selected-fg Selected/range-endpoint text
|
|
@@ -32,7 +32,13 @@
|
|
|
32
32
|
// Calendar
|
|
33
33
|
// ---------------------------------------------------------------------------
|
|
34
34
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}calendar {
|
|
35
|
-
|
|
35
|
+
// Day/month buttons and cell geometry track the control font, so a
|
|
36
|
+
// context's --tui-control-font-size-md remap scales the whole calendar.
|
|
37
|
+
// Fallbacks are inherit/rem (NOT the md typography rung): the calendar
|
|
38
|
+
// inherits 14px inside the popover (.tui-popover sets typography-size-sm),
|
|
39
|
+
// so a hard md default would grow picker text. Unset token = no change.
|
|
40
|
+
--_cell: var(--#{sys.$prefix}calendar-cell-size, calc(2.5 * var(--#{sys.$prefix}control-font-size-md, 1rem)));
|
|
41
|
+
font-size: var(--#{sys.$prefix}control-font-size-md, 1em);
|
|
36
42
|
--_cell-radius: var(--#{sys.$prefix}calendar-cell-radius, var(--#{sys.$prefix}radius-full, 999px));
|
|
37
43
|
--_selected-bg: var(--#{sys.$prefix}calendar-selected-bg, var(--#{sys.$prefix}theme-primary-base));
|
|
38
44
|
--_selected-fg: var(--#{sys.$prefix}calendar-selected-fg, var(--#{sys.$prefix}color-fg-on-accent));
|
|
@@ -81,7 +87,7 @@
|
|
|
81
87
|
block-size: var(--_cell);
|
|
82
88
|
color: var(--#{sys.$prefix}color-fg-muted);
|
|
83
89
|
font-weight: var(--#{sys.$prefix}typography-weight-normal, 400);
|
|
84
|
-
font-size: var(--#{sys.$prefix}typography-size-sm);
|
|
90
|
+
font-size: var(--#{sys.$prefix}control-font-size-sm, var(--#{sys.$prefix}typography-size-sm));
|
|
85
91
|
}
|
|
86
92
|
|
|
87
93
|
&__day {
|
|
@@ -136,6 +136,13 @@ $_token-row-padding: 2px;
|
|
|
136
136
|
flex: none;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
// Token-field chips size em-relative to their host control (see MultiSelect
|
|
140
|
+
// for the rationale and the 0.875em ratio). Chained .tui-chip outranks the
|
|
141
|
+
// Chip size presets' own font-size.
|
|
142
|
+
.#{sys.$prefix}interface .#{sys.$prefix}multicombobox__chip.#{sys.$prefix}chip {
|
|
143
|
+
font-size: 0.875em;
|
|
144
|
+
}
|
|
145
|
+
|
|
139
146
|
// ---------------------------------------------------------------------------
|
|
140
147
|
// Overflow: trim — single line, chips clip toward the inline-start
|
|
141
148
|
// ---------------------------------------------------------------------------
|
|
@@ -255,13 +262,21 @@ $_token-row-padding: 2px;
|
|
|
255
262
|
display: flex;
|
|
256
263
|
align-items: center;
|
|
257
264
|
justify-content: center;
|
|
265
|
+
// No font-size here: the icon is a direct child of __control, which
|
|
266
|
+
// carries control-sizing — it already inherits the control font at every
|
|
267
|
+
// size tier (unlike Combobox's icon, whose wrapper needed the ladder).
|
|
258
268
|
color: var(--#{sys.$prefix}color-fg-muted);
|
|
259
269
|
pointer-events: none;
|
|
260
270
|
transition: transform var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
|
|
271
|
+
}
|
|
261
272
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
273
|
+
// Open-state rotation. NOT `:has(...) &` inside the icon block — trailing
|
|
274
|
+
// `&` substitutes the FULL parent selector (interface prefix included),
|
|
275
|
+
// producing a descendant chain through `.tui-interface` that matches nothing.
|
|
276
|
+
.#{sys.$prefix}interface
|
|
277
|
+
.#{sys.$prefix}multicombobox__control:has(input[aria-expanded="true"])
|
|
278
|
+
.#{sys.$prefix}multicombobox__icon {
|
|
279
|
+
transform: rotate(180deg);
|
|
265
280
|
}
|
|
266
281
|
|
|
267
282
|
// ---------------------------------------------------------------------------
|
|
@@ -154,6 +154,15 @@ $_chip-max-width: 120px;
|
|
|
154
154
|
// token chips. The --tui-multiselect-chip-* override hooks are preserved by
|
|
155
155
|
// mapping them onto the Chip tokens; when unset, the Chip's own secondary
|
|
156
156
|
// default applies (the aligned look).
|
|
157
|
+
// Token-field chips size em-relative to their HOST CONTROL (the trigger's
|
|
158
|
+
// control font), not the global typography ladder — so contexts that resize
|
|
159
|
+
// controls get proportional chips for free. 0.875em preserves the historic
|
|
160
|
+
// default ratio (14px chip in a 16px-type md control) within a subpixel.
|
|
161
|
+
// Chained .tui-chip outranks the Chip size presets' own font-size.
|
|
162
|
+
.#{sys.$prefix}interface .#{sys.$prefix}multiselect__chip.#{sys.$prefix}chip {
|
|
163
|
+
font-size: 0.875em;
|
|
164
|
+
}
|
|
165
|
+
|
|
157
166
|
.#{sys.$prefix}interface .#{sys.$prefix}multiselect__chip {
|
|
158
167
|
--#{sys.$prefix}chip-bg: var(--#{sys.$prefix}multiselect-chip-bg);
|
|
159
168
|
--#{sys.$prefix}chip-fg: var(--#{sys.$prefix}multiselect-chip-fg);
|
|
@@ -202,19 +211,26 @@ $_chip-max-width: 120px;
|
|
|
202
211
|
background-color: var(--#{sys.$prefix}color-fill-subtle);
|
|
203
212
|
}
|
|
204
213
|
|
|
205
|
-
[data-disabled] & {
|
|
206
|
-
pointer-events: none;
|
|
207
|
-
}
|
|
208
214
|
}
|
|
209
215
|
|
|
210
216
|
.#{sys.$prefix}interface .#{sys.$prefix}multiselect__icon {
|
|
211
217
|
flex-shrink: 0;
|
|
212
218
|
color: var(--#{sys.$prefix}color-fg-muted);
|
|
213
219
|
transition: transform var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
|
|
220
|
+
}
|
|
214
221
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
222
|
+
// Trigger-state styling for the parts above. Top-level rules: trailing `&`
|
|
223
|
+
// would splice the interface prefix after the attribute selector
|
|
224
|
+
// (`[data-state] .tui-interface …`) and never match. The trigger carries
|
|
225
|
+
// data-state, and data-disabled (asChild) or native disabled (default).
|
|
226
|
+
.#{sys.$prefix}interface
|
|
227
|
+
.#{sys.$prefix}multiselect__trigger:is([data-disabled], [disabled]) .#{sys.$prefix}multiselect__clear {
|
|
228
|
+
pointer-events: none;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.#{sys.$prefix}interface
|
|
232
|
+
.#{sys.$prefix}multiselect__trigger[data-state="open"] .#{sys.$prefix}multiselect__icon {
|
|
233
|
+
transform: rotate(180deg);
|
|
218
234
|
}
|
|
219
235
|
|
|
220
236
|
// ---------------------------------------------------------------------------
|
|
@@ -359,10 +375,13 @@ $_chip-max-width: 120px;
|
|
|
359
375
|
background-color: var(--#{sys.$prefix}theme-primary-base);
|
|
360
376
|
border-color: var(--#{sys.$prefix}theme-primary-base);
|
|
361
377
|
}
|
|
378
|
+
}
|
|
362
379
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
380
|
+
// Top-level: trailing `&` would splice the interface prefix after the
|
|
381
|
+
// attribute selector and never match. data-disabled lives on the option row.
|
|
382
|
+
:where(.#{sys.$prefix}interface)
|
|
383
|
+
.#{sys.$prefix}multiselect__option[data-disabled] .#{sys.$prefix}multiselect__checkbox {
|
|
384
|
+
opacity: var(--#{sys.$prefix}opacity-disabled);
|
|
366
385
|
}
|
|
367
386
|
|
|
368
387
|
// ---------------------------------------------------------------------------
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
--tui-notice-padding
|
|
12
12
|
--tui-notice-gap
|
|
13
13
|
--tui-notice-para-gap
|
|
14
|
+
--tui-notice-icon
|
|
14
15
|
--tui-notice-title-size
|
|
15
16
|
--tui-notice-foot-basis
|
|
16
17
|
*/
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
// --tui-notice-padding Padding
|
|
32
33
|
// --tui-notice-gap Gap between head items / inner slots (defaults per size preset)
|
|
33
34
|
// --tui-notice-para-gap Spacing between body paragraphs (defaults per size preset)
|
|
35
|
+
// --tui-notice-icon Icon color (defaults to the theme base per variant)
|
|
34
36
|
// --tui-notice-title-size Title font size (defaults per size preset)
|
|
35
37
|
// --tui-notice-foot-basis Flex basis for foot in inline layout
|
|
36
38
|
//
|
|
@@ -324,7 +326,7 @@
|
|
|
324
326
|
--_bg-hover: var(--#{sys.$prefix}theme-info-subtle);
|
|
325
327
|
--_border: var(--#{sys.$prefix}notice-border, var(--#{sys.$prefix}theme-info-subtle));
|
|
326
328
|
--_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}theme-info-base));
|
|
327
|
-
--_icon-color: var(--#{sys.$prefix}theme-info-base);
|
|
329
|
+
--_icon-color: var(--#{sys.$prefix}notice-icon, var(--#{sys.$prefix}theme-info-base));
|
|
328
330
|
}
|
|
329
331
|
|
|
330
332
|
&.is-theme-success {
|
|
@@ -332,7 +334,7 @@
|
|
|
332
334
|
--_bg-hover: var(--#{sys.$prefix}theme-success-subtle);
|
|
333
335
|
--_border: var(--#{sys.$prefix}notice-border, var(--#{sys.$prefix}theme-success-subtle));
|
|
334
336
|
--_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}theme-success-base));
|
|
335
|
-
--_icon-color: var(--#{sys.$prefix}theme-success-base);
|
|
337
|
+
--_icon-color: var(--#{sys.$prefix}notice-icon, var(--#{sys.$prefix}theme-success-base));
|
|
336
338
|
}
|
|
337
339
|
|
|
338
340
|
&.is-theme-warning {
|
|
@@ -340,7 +342,7 @@
|
|
|
340
342
|
--_bg-hover: var(--#{sys.$prefix}theme-warning-subtle);
|
|
341
343
|
--_border: var(--#{sys.$prefix}notice-border, var(--#{sys.$prefix}theme-warning-subtle));
|
|
342
344
|
--_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}theme-warning-base));
|
|
343
|
-
--_icon-color: var(--#{sys.$prefix}theme-warning-base);
|
|
345
|
+
--_icon-color: var(--#{sys.$prefix}notice-icon, var(--#{sys.$prefix}theme-warning-base));
|
|
344
346
|
}
|
|
345
347
|
|
|
346
348
|
&.is-theme-danger {
|
|
@@ -348,7 +350,7 @@
|
|
|
348
350
|
--_bg-hover: var(--#{sys.$prefix}theme-danger-subtle);
|
|
349
351
|
--_border: var(--#{sys.$prefix}notice-border, var(--#{sys.$prefix}theme-danger-subtle));
|
|
350
352
|
--_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}theme-danger-base));
|
|
351
|
-
--_icon-color: var(--#{sys.$prefix}theme-danger-base);
|
|
353
|
+
--_icon-color: var(--#{sys.$prefix}notice-icon, var(--#{sys.$prefix}theme-danger-base));
|
|
352
354
|
}
|
|
353
355
|
|
|
354
356
|
// No-status treatment on the neutral palette, for resting/empty states.
|
|
@@ -357,7 +359,7 @@
|
|
|
357
359
|
--_bg-hover: var(--#{sys.$prefix}color-bg-muted);
|
|
358
360
|
--_border: var(--#{sys.$prefix}notice-border, var(--#{sys.$prefix}color-border));
|
|
359
361
|
--_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}color-fg-muted));
|
|
360
|
-
--_icon-color: var(--#{sys.$prefix}color-fg-muted);
|
|
362
|
+
--_icon-color: var(--#{sys.$prefix}notice-icon, var(--#{sys.$prefix}color-fg-muted));
|
|
361
363
|
}
|
|
362
364
|
|
|
363
365
|
// -------------------------------------------------------------------------
|
|
@@ -71,7 +71,9 @@
|
|
|
71
71
|
|
|
72
72
|
display: inline-flex;
|
|
73
73
|
flex-wrap: nowrap;
|
|
74
|
-
font
|
|
74
|
+
// Joins the control-font ladder like every other form control; historic
|
|
75
|
+
// typography-size fallbacks keep the defaults unchanged.
|
|
76
|
+
font-size: var(--#{sys.$prefix}control-font-size-md, var(--#{sys.$prefix}typography-size-sm));
|
|
75
77
|
gap: var(--_gap);
|
|
76
78
|
padding: var(--_padding);
|
|
77
79
|
background: var(--_bg);
|
|
@@ -229,19 +231,22 @@
|
|
|
229
231
|
// ---------------------------------------------------------------------------
|
|
230
232
|
|
|
231
233
|
// xs: inline micro-switchers (e.g. a picker's AM/PM toggle) — tightest
|
|
232
|
-
// padding and gap on the track, tightest padding on the items.
|
|
234
|
+
// padding and gap on the track, tightest padding on the items. There is no
|
|
235
|
+
// xs rung on the control-font ladder; xs borrows sm's, which mirrors the
|
|
236
|
+
// historic behaviour (xs and sm always shared typography-size-xs — they
|
|
237
|
+
// differ in track/item padding and control height, not font).
|
|
233
238
|
.#{sys.$prefix}interface .#{sys.$prefix}segmented.is-size-xs {
|
|
234
239
|
--_gap: var(--#{sys.$prefix}segmented-gap, #{$_track-gap-xs});
|
|
235
240
|
--_padding: var(--#{sys.$prefix}segmented-padding, #{$_track-padding-xs});
|
|
236
|
-
font-size: var(--#{sys.$prefix}typography-size-xs);
|
|
241
|
+
font-size: var(--#{sys.$prefix}control-font-size-sm, var(--#{sys.$prefix}typography-size-xs));
|
|
237
242
|
}
|
|
238
243
|
|
|
239
244
|
.#{sys.$prefix}interface .#{sys.$prefix}segmented.is-size-sm {
|
|
240
|
-
font-size: var(--#{sys.$prefix}typography-size-xs);
|
|
245
|
+
font-size: var(--#{sys.$prefix}control-font-size-sm, var(--#{sys.$prefix}typography-size-xs));
|
|
241
246
|
}
|
|
242
247
|
|
|
243
248
|
.#{sys.$prefix}interface .#{sys.$prefix}segmented.is-size-lg {
|
|
244
|
-
font-size: var(--#{sys.$prefix}typography-size-md);
|
|
249
|
+
font-size: var(--#{sys.$prefix}control-font-size-lg, var(--#{sys.$prefix}typography-size-md));
|
|
245
250
|
}
|
|
246
251
|
|
|
247
252
|
.#{sys.$prefix}interface .#{sys.$prefix}segmented.is-size-xs .#{sys.$prefix}segmented__item {
|
|
@@ -146,9 +146,14 @@ $_label-letter-spacing: 0.05em;
|
|
|
146
146
|
color: var(--#{sys.$prefix}color-fg-muted);
|
|
147
147
|
transition: transform var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
|
|
148
148
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Open-state rotation. Top-level: trailing `&` would splice the interface
|
|
152
|
+
// prefix after the attribute selector and never match. data-state lives on
|
|
153
|
+
// the trigger; the icon is inside it.
|
|
154
|
+
:where(.#{sys.$prefix}interface)
|
|
155
|
+
.#{sys.$prefix}select__trigger[data-state="open"] .#{sys.$prefix}select__icon {
|
|
156
|
+
transform: rotate(180deg);
|
|
152
157
|
}
|
|
153
158
|
|
|
154
159
|
// ---------------------------------------------------------------------------
|
|
@@ -191,11 +196,15 @@ $_label-letter-spacing: 0.05em;
|
|
|
191
196
|
outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
|
|
192
197
|
outline-offset: var(--#{sys.$prefix}focus-ring-offset);
|
|
193
198
|
}
|
|
199
|
+
}
|
|
194
200
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
201
|
+
// Disabled trigger → inert clear. Top-level: trailing `&` would splice the
|
|
202
|
+
// interface prefix after the attribute selector and never match. The clear
|
|
203
|
+
// is the trigger's SIBLING inside __trigger-wrap; the trigger carries
|
|
204
|
+
// data-disabled (asChild) or native disabled (default).
|
|
205
|
+
:where(.#{sys.$prefix}interface)
|
|
206
|
+
.#{sys.$prefix}select__trigger:is([data-disabled], [disabled]) ~ .#{sys.$prefix}select__clear {
|
|
207
|
+
pointer-events: none;
|
|
199
208
|
}
|
|
200
209
|
|
|
201
210
|
// ---------------------------------------------------------------------------
|
|
@@ -130,10 +130,15 @@
|
|
|
130
130
|
inset: 0;
|
|
131
131
|
background-color: var(--#{sys.$prefix}color-bg-overlay);
|
|
132
132
|
animation: #{sys.$prefix}fadeFromTransparent var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
|
|
133
|
+
}
|
|
133
134
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
// State/position animations. Top-level rules: trailing `&` would splice the
|
|
136
|
+
// interface prefix after the drawer attributes (`[data-state] > :where(…)`)
|
|
137
|
+
// and never match — which also meant closing never animated, so the panel's
|
|
138
|
+
// animationend (which unmounts the drawer) had nothing to fire from.
|
|
139
|
+
:where(.#{sys.$prefix}interface)
|
|
140
|
+
.#{sys.$prefix}sidebar-drawer[data-state="closing"] > .#{sys.$prefix}sidebar-drawer__backdrop {
|
|
141
|
+
animation: #{sys.$prefix}fadeToTransparent var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing) forwards;
|
|
137
142
|
}
|
|
138
143
|
|
|
139
144
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}sidebar-drawer__panel {
|
|
@@ -142,25 +147,6 @@
|
|
|
142
147
|
max-width: 90vw;
|
|
143
148
|
height: 100%;
|
|
144
149
|
|
|
145
|
-
// Left position (default): slide in from left
|
|
146
|
-
[data-position="left"] > & {
|
|
147
|
-
animation: #{sys.$prefix}slideInFromLeft var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// Right position: slide in from right
|
|
151
|
-
[data-position="right"] > & {
|
|
152
|
-
animation: #{sys.$prefix}slideInFromRight var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// Closing: slide out
|
|
156
|
-
[data-state="closing"][data-position="left"] > & {
|
|
157
|
-
animation: #{sys.$prefix}slideOutToLeft var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing) forwards;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
[data-state="closing"][data-position="right"] > & {
|
|
161
|
-
animation: #{sys.$prefix}slideOutToRight var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing) forwards;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
150
|
// Sidebar inside panel should fill height and remove side borders
|
|
165
151
|
.#{sys.$prefix}sidebar {
|
|
166
152
|
height: 100%;
|
|
@@ -169,6 +155,29 @@
|
|
|
169
155
|
}
|
|
170
156
|
}
|
|
171
157
|
|
|
158
|
+
// Left position (default): slide in from left
|
|
159
|
+
:where(.#{sys.$prefix}interface)
|
|
160
|
+
.#{sys.$prefix}sidebar-drawer[data-position="left"] > .#{sys.$prefix}sidebar-drawer__panel {
|
|
161
|
+
animation: #{sys.$prefix}slideInFromLeft var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Right position: slide in from right
|
|
165
|
+
:where(.#{sys.$prefix}interface)
|
|
166
|
+
.#{sys.$prefix}sidebar-drawer[data-position="right"] > .#{sys.$prefix}sidebar-drawer__panel {
|
|
167
|
+
animation: #{sys.$prefix}slideInFromRight var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Closing: slide out
|
|
171
|
+
:where(.#{sys.$prefix}interface)
|
|
172
|
+
.#{sys.$prefix}sidebar-drawer[data-state="closing"][data-position="left"] > .#{sys.$prefix}sidebar-drawer__panel {
|
|
173
|
+
animation: #{sys.$prefix}slideOutToLeft var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing) forwards;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
:where(.#{sys.$prefix}interface)
|
|
177
|
+
.#{sys.$prefix}sidebar-drawer[data-state="closing"][data-position="right"] > .#{sys.$prefix}sidebar-drawer__panel {
|
|
178
|
+
animation: #{sys.$prefix}slideOutToRight var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing) forwards;
|
|
179
|
+
}
|
|
180
|
+
|
|
172
181
|
// ---------------------------------------------------------------------------
|
|
173
182
|
// Slide-in Keyframes
|
|
174
183
|
// ---------------------------------------------------------------------------
|
|
@@ -81,23 +81,30 @@
|
|
|
81
81
|
gap: var(--#{sys.$prefix}tabs-gap, var(--#{sys.$prefix}spacing-xs));
|
|
82
82
|
align-items: center;
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
[data-variant="pill"] & {
|
|
86
|
-
background: var(--#{sys.$prefix}tabs-list-bg, var(--#{sys.$prefix}color-bg-muted));
|
|
87
|
-
padding: var(--#{sys.$prefix}tabs-list-padding, var(--#{sys.$prefix}spacing-xs));
|
|
88
|
-
border-radius: var(--#{sys.$prefix}tabs-list-radius, var(--#{sys.$prefix}radius-lg));
|
|
89
|
-
}
|
|
84
|
+
}
|
|
90
85
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
86
|
+
// Variant list treatments. NOT `[data-variant] &` inside the list block —
|
|
87
|
+
// trailing `&` substitutes the FULL parent selector (interface prefix
|
|
88
|
+
// included), compiling to `[data-variant] :where(.tui-interface) …`, which
|
|
89
|
+
// requires the attribute ABOVE the interface and matches nothing. The
|
|
90
|
+
// attribute lives on the .tui-tabs root.
|
|
91
|
+
|
|
92
|
+
// Pill variant: list has background
|
|
93
|
+
:where(.#{sys.$prefix}interface) .#{sys.$prefix}tabs[data-variant="pill"] .#{sys.$prefix}tabs__list {
|
|
94
|
+
background: var(--#{sys.$prefix}tabs-list-bg, var(--#{sys.$prefix}color-bg-muted));
|
|
95
|
+
padding: var(--#{sys.$prefix}tabs-list-padding, var(--#{sys.$prefix}spacing-xs));
|
|
96
|
+
border-radius: var(--#{sys.$prefix}tabs-list-radius, var(--#{sys.$prefix}radius-lg));
|
|
97
|
+
}
|
|
96
98
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
99
|
+
// Underline variant: bottom border on list
|
|
100
|
+
:where(.#{sys.$prefix}interface) .#{sys.$prefix}tabs[data-variant="underline"] .#{sys.$prefix}tabs__list {
|
|
101
|
+
gap: var(--#{sys.$prefix}tabs-gap, var(--#{sys.$prefix}spacing-md));
|
|
102
|
+
border-block-end: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}color-border);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Outline variant: no list background
|
|
106
|
+
:where(.#{sys.$prefix}interface) .#{sys.$prefix}tabs[data-variant="outline"] .#{sys.$prefix}tabs__list {
|
|
107
|
+
gap: var(--#{sys.$prefix}tabs-gap, var(--#{sys.$prefix}spacing-xs));
|
|
101
108
|
}
|
|
102
109
|
|
|
103
110
|
// ---------------------------------------------------------------------------
|
|
@@ -170,6 +177,10 @@
|
|
|
170
177
|
|
|
171
178
|
.#{sys.$prefix}interface [data-variant="pill"] .#{sys.$prefix}tabs__tab {
|
|
172
179
|
--_radius: var(--#{sys.$prefix}tabs-tab-radius, var(--#{sys.$prefix}radius-md));
|
|
180
|
+
// Pill tabs sit on the color-bg-muted track; inactive labels need full
|
|
181
|
+
// color-fg for 4.5:1 (fg-muted measures 4.39:1 on the track) — same
|
|
182
|
+
// treatment as SegmentedControl's pill items.
|
|
183
|
+
--_fg: var(--#{sys.$prefix}tabs-tab-fg, var(--#{sys.$prefix}color-fg));
|
|
173
184
|
--_bg-hover: var(--#{sys.$prefix}tabs-tab-bg-hover, color-mix(in srgb, var(--#{sys.$prefix}color-fg) 8%, transparent));
|
|
174
185
|
|
|
175
186
|
&[data-state="active"] {
|
package/tui-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.2.
|
|
3
|
-
"generated": "2026-08-
|
|
2
|
+
"version": "0.2.8",
|
|
3
|
+
"generated": "2026-08-15T13:40:15.570Z",
|
|
4
4
|
"components": {
|
|
5
5
|
"Accordion": {
|
|
6
6
|
"props": {
|
|
@@ -1981,6 +1981,7 @@
|
|
|
1981
1981
|
"--tui-notice-padding",
|
|
1982
1982
|
"--tui-notice-gap",
|
|
1983
1983
|
"--tui-notice-para-gap",
|
|
1984
|
+
"--tui-notice-icon",
|
|
1984
1985
|
"--tui-notice-title-size",
|
|
1985
1986
|
"--tui-notice-foot-basis"
|
|
1986
1987
|
],
|
package/utils/color/color.js
CHANGED
|
@@ -186,10 +186,22 @@ export function parseColor(value) {
|
|
|
186
186
|
const raw = String(value ?? '').trim();
|
|
187
187
|
if (!raw)
|
|
188
188
|
return { kind: 'invalid', raw };
|
|
189
|
-
// CSS variable reference — stored verbatim, not required to resolve.
|
|
189
|
+
// CSS variable reference — stored verbatim, not required to resolve. The
|
|
190
|
+
// fallback is deliberately NOT run back through parseColor: any <color> is
|
|
191
|
+
// legal there, including ones this grammar doesn't cover (named colours,
|
|
192
|
+
// currentColor, color-mix(), lab()/lch(), nested vars). Instead, reject
|
|
193
|
+
// resource-loading/legacy function tokens and declaration-breaking
|
|
194
|
+
// characters — the permissive grammar accepted `var(--x, url(//evil))` as a
|
|
195
|
+
// "valid colour", which then landed verbatim in style attributes downstream.
|
|
190
196
|
const varMatch = raw.match(/^var\(\s*(--[A-Za-z0-9-_]+)\s*(?:,\s*([\s\S]+?)\s*)?\)$/);
|
|
191
197
|
if (varMatch) {
|
|
192
|
-
|
|
198
|
+
const fallback = varMatch[2];
|
|
199
|
+
const unsafeFallback = fallback != null &&
|
|
200
|
+
(/[;{}<>]/.test(fallback) ||
|
|
201
|
+
/(?:^|[^a-z-])(?:url|src|image|image-set|cross-fade|paint|element|expression)\s*\(/i.test(fallback));
|
|
202
|
+
if (unsafeFallback)
|
|
203
|
+
return { kind: 'invalid', raw };
|
|
204
|
+
return { kind: 'var', raw, name: varMatch[1], fallback };
|
|
193
205
|
}
|
|
194
206
|
// Hex
|
|
195
207
|
if (raw.startsWith('#')) {
|