@tangible/ui 0.0.21 → 0.2.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 (72) hide show
  1. package/components/Button/Button.js +6 -8
  2. package/components/Button/types.d.ts +5 -7
  3. package/components/Chip/Chip.d.ts +28 -0
  4. package/components/Chip/Chip.js +19 -3
  5. package/components/Combobox/Combobox.d.ts +1 -1
  6. package/components/Combobox/Combobox.js +2 -2
  7. package/components/Combobox/types.d.ts +13 -0
  8. package/components/DatePicker/Calendar.d.ts +12 -0
  9. package/components/DatePicker/Calendar.js +145 -0
  10. package/components/DatePicker/DatePicker.d.ts +23 -0
  11. package/components/DatePicker/DatePicker.js +123 -0
  12. package/components/DatePicker/DateRangePicker.d.ts +16 -0
  13. package/components/DatePicker/DateRangePicker.js +114 -0
  14. package/components/DatePicker/date-utils.d.ts +51 -0
  15. package/components/DatePicker/date-utils.js +228 -0
  16. package/components/DatePicker/index.d.ts +8 -0
  17. package/components/DatePicker/index.js +6 -0
  18. package/components/DatePicker/presets.d.ts +3 -0
  19. package/components/DatePicker/presets.js +37 -0
  20. package/components/DatePicker/types.d.ts +138 -0
  21. package/components/DatePicker/types.js +39 -0
  22. package/components/IconButton/types.d.ts +2 -2
  23. package/components/MultiCombobox/MultiCombobox.d.ts +33 -0
  24. package/components/MultiCombobox/MultiCombobox.js +595 -0
  25. package/components/MultiCombobox/MultiComboboxContext.d.ts +8 -0
  26. package/components/MultiCombobox/MultiComboboxContext.js +36 -0
  27. package/components/MultiCombobox/index.d.ts +3 -0
  28. package/components/MultiCombobox/index.js +2 -0
  29. package/components/MultiCombobox/types.d.ts +244 -0
  30. package/components/MultiCombobox/types.js +7 -0
  31. package/components/MultiSelect/MultiSelect.js +22 -2
  32. package/components/Popover/Popover.js +16 -2
  33. package/components/SegmentedControl/types.d.ts +2 -2
  34. package/components/Select/Select.js +14 -0
  35. package/components/Slider/Slider.d.ts +2 -0
  36. package/components/Slider/Slider.js +29 -0
  37. package/components/Slider/index.d.ts +2 -0
  38. package/components/Slider/index.js +1 -0
  39. package/components/Slider/types.d.ts +39 -0
  40. package/components/Slider/types.js +1 -0
  41. package/components/index.d.ts +4 -0
  42. package/components/index.js +3 -0
  43. package/package.json +13 -1
  44. package/styles/all.css +1 -1
  45. package/styles/all.expanded.css +1181 -187
  46. package/styles/all.expanded.unlayered.css +1181 -187
  47. package/styles/all.unlayered.css +1 -1
  48. package/styles/components/_bundle.scss +6 -0
  49. package/styles/components/button.scss +59 -43
  50. package/styles/components/card.scss +1 -1
  51. package/styles/components/chip.scss +84 -10
  52. package/styles/components/combobox.scss +16 -2
  53. package/styles/components/date-picker.scss +400 -0
  54. package/styles/components/icon-button.scss +36 -30
  55. package/styles/components/input/index.scss +1 -2
  56. package/styles/components/multi-combobox.scss +457 -0
  57. package/styles/components/multi-select.scss +34 -18
  58. package/styles/components/notice.scss +15 -6
  59. package/styles/components/pager.scss +4 -2
  60. package/styles/components/popover.scss +6 -0
  61. package/styles/components/progress.scss +23 -6
  62. package/styles/components/segmented-control.scss +53 -15
  63. package/styles/components/select.scss +19 -3
  64. package/styles/components/slider.scss +184 -0
  65. package/styles/components/switch.scss +1 -1
  66. package/styles/core.css +1 -1
  67. package/styles/core.unlayered.css +1 -1
  68. package/styles/system/_control.scss +9 -8
  69. package/styles/system/_tokens.scss +16 -0
  70. package/tui-manifest.json +311 -14
  71. package/utils/portal.d.ts +0 -4
  72. package/utils/portal.js +38 -5
@@ -0,0 +1,457 @@
1
+ @use "../system" as sys;
2
+
3
+ /* @tui-tokens
4
+ --tui-multicombobox-min-width Minimum width of the dropdown content
5
+ --tui-multicombobox-control-bg Token-field background
6
+ --tui-multicombobox-control-fg Text / icon colour in the control
7
+ --tui-multicombobox-control-border Control border colour (rest)
8
+ --tui-multicombobox-control-border-focus Control border colour (focus / open)
9
+ --tui-multicombobox-control-radius Control border radius
10
+ --tui-multicombobox-content-bg Listbox background
11
+ --tui-multicombobox-content-border Listbox border colour
12
+ --tui-multicombobox-content-shadow Listbox drop shadow
13
+ --tui-multicombobox-content-radius Listbox border radius
14
+ --tui-multicombobox-option-radius Option corner radius
15
+ --tui-multicombobox-option-bg-hover Option background (hover / highlighted)
16
+ --tui-multicombobox-option-bg-selected Option background (selected)
17
+ --tui-multicombobox-option-gap Vertical gap between options
18
+ */
19
+
20
+ // Structural SCSS constants (compile away, not overridable)
21
+ $_min-width: 160px;
22
+ $_label-letter-spacing: 0.05em;
23
+ $_input-min-width: 4rem;
24
+ // Breathing room so chips don't touch the control edge when the row wraps.
25
+ // Intentionally below the smallest spacing token (xxs = 4px).
26
+ $_token-row-padding: 2px;
27
+
28
+ @mixin styles() {
29
+ // ==========================================================================
30
+ // MultiCombobox Component
31
+ // ==========================================================================
32
+ //
33
+ // The free-typing sibling of MultiSelect. Shares Combobox's visual language
34
+ // for the listbox and Select tokens as the ultimate fallback: token chains
35
+ // resolve --tui-multicombobox-* → --tui-combobox-* → --tui-select-* → system.
36
+ //
37
+ // The control is a token field: a bordered box holding wrapping chips and an
38
+ // auto-growing search input, with the clear-all button and chevron pinned to
39
+ // the trailing edge.
40
+ //
41
+ // ==========================================================================
42
+
43
+ // ---------------------------------------------------------------------------
44
+ // Root
45
+ // ---------------------------------------------------------------------------
46
+
47
+ .#{sys.$prefix}interface .#{sys.$prefix}multicombobox {
48
+ position: relative;
49
+ display: inline-block;
50
+ width: 100%;
51
+ }
52
+
53
+ // ---------------------------------------------------------------------------
54
+ // Control (token field)
55
+ // ---------------------------------------------------------------------------
56
+
57
+ .#{sys.$prefix}interface .#{sys.$prefix}multicombobox__control {
58
+ // Internal tokens with fallbacks: multicombobox → combobox → select → system
59
+ --_bg: var(--#{sys.$prefix}multicombobox-control-bg, var(--#{sys.$prefix}combobox-input-bg, var(--#{sys.$prefix}select-trigger-bg, var(--#{sys.$prefix}color-bg-surface))));
60
+ --_fg: var(--#{sys.$prefix}multicombobox-control-fg, var(--#{sys.$prefix}combobox-input-fg, var(--#{sys.$prefix}select-trigger-fg, var(--#{sys.$prefix}color-fg))));
61
+ --_border: var(--#{sys.$prefix}multicombobox-control-border, var(--#{sys.$prefix}combobox-input-border, var(--#{sys.$prefix}select-trigger-border, var(--#{sys.$prefix}color-border))));
62
+ --_border-focus: var(--#{sys.$prefix}multicombobox-control-border-focus, var(--#{sys.$prefix}combobox-input-border-focus, var(--#{sys.$prefix}select-trigger-border-focus, var(--#{sys.$prefix}theme-primary-base))));
63
+ --_radius: var(--#{sys.$prefix}multicombobox-control-radius, var(--#{sys.$prefix}combobox-input-radius, var(--#{sys.$prefix}select-trigger-radius, var(--#{sys.$prefix}radius-md))));
64
+
65
+ // Unified sizing — min-height so the box grows as chips wrap. Zero the
66
+ // mixin's padding-block: in a token field the chips define the interior and
67
+ // min-height governs each tier (sm/md/lg), so the chips centre cleanly
68
+ // instead of the padding stacking on top and inflating short controls.
69
+ @include sys.control-sizing(sys.$prefix);
70
+ height: auto;
71
+ padding-block: 0;
72
+
73
+ position: relative;
74
+ display: flex;
75
+ align-items: center;
76
+ width: 100%;
77
+ padding-inline-start: var(--#{sys.$prefix}spacing-sm);
78
+ // Reserve room for the clear button + chevron on the trailing edge
79
+ padding-inline-end: calc(var(--#{sys.$prefix}spacing-sm) + 1.5em + var(--#{sys.$prefix}spacing-xs) + 1.25em);
80
+
81
+ background-color: var(--_bg);
82
+ color: var(--_fg);
83
+ border: var(--#{sys.$prefix}border-width) solid var(--_border);
84
+ border-radius: var(--_radius);
85
+ cursor: text;
86
+
87
+ transition-duration: var(--#{sys.$prefix}motion-duration);
88
+ transition-timing-function: var(--#{sys.$prefix}motion-timing);
89
+ transition-property: border-color, background-color;
90
+
91
+ &:focus-within {
92
+ --_border: var(--_border-focus);
93
+ outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
94
+ outline-offset: var(--#{sys.$prefix}focus-ring-offset);
95
+ }
96
+
97
+ &:has(input[aria-expanded="true"]) {
98
+ --_border: var(--_border-focus);
99
+ }
100
+
101
+ &:has(input:disabled) {
102
+ opacity: var(--#{sys.$prefix}opacity-disabled);
103
+ cursor: not-allowed;
104
+ }
105
+
106
+ // The control already dims the whole box at opacity-disabled; keep the chips
107
+ // (which each carry their own disabled state for the inert remove button) at
108
+ // full opacity so they don't stack a second 0.75 → ~0.56. See the Checkbox
109
+ // split-opacity gotcha in CLAUDE.md.
110
+ &:has(input:disabled) .#{sys.$prefix}multicombobox__chip {
111
+ opacity: 1;
112
+ }
113
+ }
114
+
115
+ // ---------------------------------------------------------------------------
116
+ // Tokens area (wrapping chips + input)
117
+ // ---------------------------------------------------------------------------
118
+
119
+ .#{sys.$prefix}interface .#{sys.$prefix}multicombobox__tokens {
120
+ display: flex;
121
+ flex-wrap: wrap;
122
+ align-items: center;
123
+ gap: var(--#{sys.$prefix}spacing-xxs);
124
+ flex: 1;
125
+ min-width: 0;
126
+ // Breathing room top/bottom so chips don't touch the control edge when wrapped
127
+ padding-block: $_token-row-padding;
128
+ }
129
+
130
+ // Token-field chips are flatter than standalone chips so they sit inside the
131
+ // control without pushing it past its control-height. (MultiSelect chips
132
+ // should match this once they adopt the shared removable Chip.)
133
+ .#{sys.$prefix}interface .#{sys.$prefix}multicombobox__chip {
134
+ padding-block: 0.125em;
135
+ // Never squish a chip's label — it clips/wraps at the container instead.
136
+ flex: none;
137
+ }
138
+
139
+ // ---------------------------------------------------------------------------
140
+ // Overflow: trim — single line, chips clip toward the inline-start
141
+ // ---------------------------------------------------------------------------
142
+ // Keeps the control at its control-height (row alignment in multi-column
143
+ // forms) instead of growing. The token row scrolls to its end (JS) so the
144
+ // typing area stays visible; older chips clip off the inline-start.
145
+
146
+ .#{sys.$prefix}interface .#{sys.$prefix}multicombobox__control.is-overflow-trim {
147
+ .#{sys.$prefix}multicombobox__tokens {
148
+ flex-wrap: nowrap;
149
+ overflow-x: auto;
150
+ overflow-y: hidden;
151
+ // No visible scrollbar — the fade signals more chips; Tab scrolls them in.
152
+ scrollbar-width: none;
153
+
154
+ &::-webkit-scrollbar {
155
+ display: none;
156
+ }
157
+ }
158
+
159
+ // A disabled control is inert: don't make it a scroll region (which would
160
+ // require keyboard access it can't provide — axe scrollable-region-focusable).
161
+ // Clip instead.
162
+ &:has(input:disabled) .#{sys.$prefix}multicombobox__tokens {
163
+ overflow-x: hidden;
164
+ }
165
+
166
+ // Fade the clipped inline-start edge when chips are scrolled off. The
167
+ // gradient stops are alpha only — #000 is the mask "opaque", not a themed
168
+ // colour. (Physical `to right` = LTR; RTL fades the wrong edge — revisit
169
+ // when RTL support lands.)
170
+ &[data-overflow-start] .#{sys.$prefix}multicombobox__tokens {
171
+ mask-image: linear-gradient(to right, transparent 0, #000 var(--#{sys.$prefix}spacing-md));
172
+ }
173
+ }
174
+
175
+ // ---------------------------------------------------------------------------
176
+ // Input (borderless, auto-grows within the token field)
177
+ // ---------------------------------------------------------------------------
178
+
179
+ // The bare <input type="text"> matches the shared input-core (border, radius,
180
+ // control-sizing min-height, and a :focus-visible outline). The token-field
181
+ // control owns all of that, so opt the inner input out of every piece —
182
+ // including the core's :focus-visible outline, which outranks a base reset.
183
+ .#{sys.$prefix}interface .#{sys.$prefix}multicombobox__input {
184
+ appearance: none;
185
+ font: inherit;
186
+ color: inherit;
187
+ margin: 0;
188
+ padding: 0;
189
+ border: 0;
190
+ border-radius: 0;
191
+ min-height: 0;
192
+ background: transparent;
193
+ outline: none;
194
+ box-shadow: none;
195
+ // Grow to fill the row, but keep a typeable minimum; wraps below chips
196
+ // when they fill the line.
197
+ flex: 1 1 $_input-min-width;
198
+ min-width: $_input-min-width;
199
+ line-height: 1.4;
200
+
201
+ &::placeholder {
202
+ color: var(--#{sys.$prefix}color-fg-muted);
203
+ }
204
+
205
+ &:focus,
206
+ &:focus-visible {
207
+ outline: none;
208
+ box-shadow: none;
209
+ }
210
+ }
211
+
212
+ // ---------------------------------------------------------------------------
213
+ // Clear-all Button
214
+ // ---------------------------------------------------------------------------
215
+
216
+ .#{sys.$prefix}interface .#{sys.$prefix}multicombobox__clear {
217
+ appearance: none;
218
+ border: none;
219
+ background: none;
220
+ padding: 0;
221
+ font: inherit;
222
+ margin: 0;
223
+
224
+ position: absolute;
225
+ right: calc(var(--#{sys.$prefix}spacing-sm) + 1.25em + var(--#{sys.$prefix}spacing-xxs));
226
+ display: flex;
227
+ align-items: center;
228
+ justify-content: center;
229
+ width: 1.25em;
230
+ height: 1.25em;
231
+ border-radius: var(--#{sys.$prefix}radius-sm);
232
+ color: var(--#{sys.$prefix}color-fg-muted);
233
+ cursor: pointer;
234
+ transition: color var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing),
235
+ background-color var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
236
+
237
+ &:hover {
238
+ color: var(--#{sys.$prefix}color-fg);
239
+ background-color: var(--#{sys.$prefix}color-fill-subtle);
240
+ }
241
+
242
+ &:focus-visible {
243
+ outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
244
+ outline-offset: var(--#{sys.$prefix}focus-ring-offset);
245
+ }
246
+ }
247
+
248
+ // ---------------------------------------------------------------------------
249
+ // Chevron Icon
250
+ // ---------------------------------------------------------------------------
251
+
252
+ .#{sys.$prefix}interface .#{sys.$prefix}multicombobox__icon {
253
+ position: absolute;
254
+ right: var(--#{sys.$prefix}spacing-sm);
255
+ display: flex;
256
+ align-items: center;
257
+ justify-content: center;
258
+ color: var(--#{sys.$prefix}color-fg-muted);
259
+ pointer-events: none;
260
+ transition: transform var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
261
+
262
+ .#{sys.$prefix}multicombobox__control:has(input[aria-expanded="true"]) & {
263
+ transform: rotate(180deg);
264
+ }
265
+ }
266
+
267
+ // ---------------------------------------------------------------------------
268
+ // Content (Listbox)
269
+ // ---------------------------------------------------------------------------
270
+
271
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}multicombobox__content {
272
+ --_bg: var(--#{sys.$prefix}multicombobox-content-bg, var(--#{sys.$prefix}combobox-content-bg, var(--#{sys.$prefix}select-content-bg, var(--#{sys.$prefix}color-bg-elevated))));
273
+ --_border: var(--#{sys.$prefix}multicombobox-content-border, var(--#{sys.$prefix}combobox-content-border, var(--#{sys.$prefix}select-content-border, var(--#{sys.$prefix}color-border))));
274
+ --_shadow: var(--#{sys.$prefix}multicombobox-content-shadow, var(--#{sys.$prefix}combobox-content-shadow, var(--#{sys.$prefix}select-content-shadow, var(--#{sys.$prefix}shadow-dropdown))));
275
+ --_radius: var(--#{sys.$prefix}multicombobox-content-radius, var(--#{sys.$prefix}combobox-content-radius, var(--#{sys.$prefix}select-content-radius, var(--#{sys.$prefix}radius-md))));
276
+ --_min-width: var(--#{sys.$prefix}multicombobox-min-width, var(--#{sys.$prefix}combobox-min-width, var(--#{sys.$prefix}select-min-width, $_min-width)));
277
+
278
+ z-index: var(--#{sys.$prefix}layer-top);
279
+ min-width: var(--_min-width);
280
+ padding: var(--#{sys.$prefix}spacing-xxs);
281
+ overflow-y: auto;
282
+ overscroll-behavior: contain;
283
+ pointer-events: auto;
284
+
285
+ scrollbar-width: thin;
286
+ scrollbar-color: var(--#{sys.$prefix}color-fg-muted) transparent;
287
+
288
+ &::-webkit-scrollbar {
289
+ width: 8px;
290
+ }
291
+
292
+ &::-webkit-scrollbar-track {
293
+ background: transparent;
294
+ }
295
+
296
+ &::-webkit-scrollbar-thumb {
297
+ background-color: var(--#{sys.$prefix}color-fg-muted);
298
+ border-radius: 4px;
299
+ border: 2px solid transparent;
300
+ background-clip: content-box;
301
+ opacity: 0.5;
302
+
303
+ &:hover {
304
+ opacity: 1;
305
+ }
306
+ }
307
+
308
+ background-color: var(--_bg);
309
+ border: var(--#{sys.$prefix}border-width) solid var(--_border);
310
+ border-radius: var(--_radius);
311
+ box-shadow: var(--_shadow);
312
+
313
+ animation: #{sys.$prefix}fadeFromTransparent var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
314
+ }
315
+
316
+ // ---------------------------------------------------------------------------
317
+ // Option (check on the leading edge — multi-select convention)
318
+ // ---------------------------------------------------------------------------
319
+
320
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}multicombobox__option {
321
+ --_option-radius: var(--#{sys.$prefix}multicombobox-option-radius, var(--#{sys.$prefix}combobox-option-radius, var(--#{sys.$prefix}select-option-radius, var(--#{sys.$prefix}radius-sm))));
322
+ --_bg-hover: var(--#{sys.$prefix}multicombobox-option-bg-hover, var(--#{sys.$prefix}combobox-option-bg-hover, var(--#{sys.$prefix}select-option-bg-hover, var(--#{sys.$prefix}color-fill-subtle))));
323
+ --_bg-selected: var(--#{sys.$prefix}multicombobox-option-bg-selected, var(--#{sys.$prefix}combobox-option-bg-selected, var(--#{sys.$prefix}select-option-bg-selected, var(--#{sys.$prefix}theme-primary-subtlest))));
324
+
325
+ display: flex;
326
+ align-items: center;
327
+ gap: var(--#{sys.$prefix}spacing-xs);
328
+ padding: var(--#{sys.$prefix}spacing-xs) var(--#{sys.$prefix}spacing-sm);
329
+ border-radius: var(--_option-radius);
330
+ cursor: pointer;
331
+
332
+ font-size: var(--#{sys.$prefix}typography-size-sm);
333
+ line-height: 1.4;
334
+
335
+ transition: background-color var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
336
+
337
+ & + .#{sys.$prefix}multicombobox__option {
338
+ margin-block-start: var(--#{sys.$prefix}multicombobox-option-gap, var(--#{sys.$prefix}combobox-option-gap, var(--#{sys.$prefix}select-option-gap, 2px)));
339
+ }
340
+
341
+ &:hover:not([data-disabled]),
342
+ &[data-highlighted]:not([data-disabled]) {
343
+ background-color: var(--_bg-hover);
344
+ }
345
+
346
+ &[aria-selected="true"] {
347
+ background-color: var(--_bg-selected);
348
+ }
349
+
350
+ &[aria-selected="true"]:hover:not([data-disabled]),
351
+ &[aria-selected="true"][data-highlighted]:not([data-disabled]) {
352
+ background-color: var(--#{sys.$prefix}theme-primary-subtle);
353
+ }
354
+
355
+ &[data-disabled] {
356
+ opacity: var(--#{sys.$prefix}opacity-disabled);
357
+ cursor: not-allowed;
358
+ }
359
+ }
360
+
361
+ // Reserve the check slot even when unselected so labels stay aligned.
362
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}multicombobox__option-check {
363
+ flex-shrink: 0;
364
+ display: inline-flex;
365
+ align-items: center;
366
+ justify-content: center;
367
+ width: 1.25em;
368
+ color: var(--#{sys.$prefix}theme-primary-base);
369
+ }
370
+
371
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}multicombobox__option-content {
372
+ flex: 1;
373
+ min-width: 0;
374
+ }
375
+
376
+ // ---------------------------------------------------------------------------
377
+ // Group + Label
378
+ // ---------------------------------------------------------------------------
379
+
380
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}multicombobox__group {
381
+ & + & {
382
+ margin-top: var(--#{sys.$prefix}spacing-xxs);
383
+ padding-top: var(--#{sys.$prefix}spacing-xxs);
384
+ border-top: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}color-divider);
385
+ }
386
+ }
387
+
388
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}multicombobox__label {
389
+ padding: var(--#{sys.$prefix}spacing-xs) var(--#{sys.$prefix}spacing-sm);
390
+ padding-bottom: var(--#{sys.$prefix}spacing-xxs);
391
+ font-size: var(--#{sys.$prefix}typography-size-xs);
392
+ font-weight: var(--#{sys.$prefix}typography-weight-semibold, 600);
393
+ color: var(--#{sys.$prefix}color-fg-muted);
394
+ text-transform: uppercase;
395
+ letter-spacing: $_label-letter-spacing;
396
+ }
397
+
398
+ // ---------------------------------------------------------------------------
399
+ // Reduced motion
400
+ // ---------------------------------------------------------------------------
401
+
402
+ @media (prefers-reduced-motion: reduce) {
403
+ .#{sys.$prefix}interface .#{sys.$prefix}multicombobox__control,
404
+ .#{sys.$prefix}interface .#{sys.$prefix}multicombobox__icon,
405
+ .#{sys.$prefix}interface .#{sys.$prefix}multicombobox__clear {
406
+ transition-duration: 0ms;
407
+ }
408
+
409
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}multicombobox__content {
410
+ animation-duration: 0ms;
411
+ }
412
+
413
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}multicombobox__option {
414
+ transition-duration: 0ms;
415
+ }
416
+ }
417
+
418
+ // ---------------------------------------------------------------------------
419
+ // Forced colors (Windows High Contrast Mode)
420
+ // ---------------------------------------------------------------------------
421
+
422
+ @media (forced-colors: active) {
423
+ .#{sys.$prefix}interface .#{sys.$prefix}multicombobox__control {
424
+ background-color: Canvas;
425
+ color: CanvasText;
426
+ border-color: CanvasText;
427
+
428
+ &:focus-within {
429
+ outline-color: Highlight;
430
+ }
431
+ }
432
+
433
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}multicombobox__content {
434
+ background-color: Canvas;
435
+ color: CanvasText;
436
+ border-color: CanvasText;
437
+ }
438
+
439
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}multicombobox__option {
440
+ &:hover:not([data-disabled]),
441
+ &[data-highlighted]:not([data-disabled]),
442
+ &[aria-selected="true"] {
443
+ background-color: Highlight;
444
+ color: HighlightText;
445
+ forced-color-adjust: none;
446
+ }
447
+ }
448
+
449
+ .#{sys.$prefix}interface .#{sys.$prefix}multicombobox__clear {
450
+ color: CanvasText;
451
+
452
+ &:focus-visible {
453
+ outline-color: Highlight;
454
+ }
455
+ }
456
+ }
457
+ }
@@ -14,6 +14,7 @@
14
14
  --tui-multiselect-option-radius
15
15
  --tui-multiselect-option-bg-hover
16
16
  --tui-multiselect-option-bg-selected
17
+ --tui-multiselect-option-gap
17
18
  --tui-multiselect-chip-bg
18
19
  --tui-multiselect-chip-fg
19
20
  */
@@ -22,7 +23,6 @@
22
23
  $_min-width: 160px;
23
24
  $_line-height: 1.4;
24
25
  $_label-letter-spacing: 0.05em;
25
- $_chip-padding: 0.125em 0.5em;
26
26
  $_chip-max-width: 120px;
27
27
 
28
28
  @mixin styles() {
@@ -103,7 +103,9 @@ $_chip-max-width: 120px;
103
103
  transition-timing-function: var(--#{sys.$prefix}motion-timing);
104
104
  transition-property: border-color, background-color;
105
105
 
106
- &:focus-visible {
106
+ // :focus, not :focus-visible — native selects show the ring on mouse
107
+ // focus too (form-control heuristic), and this button impersonates one
108
+ &:focus {
107
109
  --_border: var(--_border-focus);
108
110
  outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
109
111
  outline-offset: var(--#{sys.$prefix}focus-ring-offset);
@@ -148,23 +150,24 @@ $_chip-max-width: 120px;
148
150
  min-width: 0;
149
151
  }
150
152
 
153
+ // Now the shared Chip (display-only), so it reads the same as MultiCombobox's
154
+ // token chips. The --tui-multiselect-chip-* override hooks are preserved by
155
+ // mapping them onto the Chip tokens; when unset, the Chip's own secondary
156
+ // default applies (the aligned look).
151
157
  .#{sys.$prefix}interface .#{sys.$prefix}multiselect__chip {
152
- // Internal tokens
153
- --_chip-bg: var(--#{sys.$prefix}multiselect-chip-bg, var(--#{sys.$prefix}theme-secondary-subtlest));
154
- --_chip-fg: var(--#{sys.$prefix}multiselect-chip-fg, var(--#{sys.$prefix}color-fg));
158
+ --#{sys.$prefix}chip-bg: var(--#{sys.$prefix}multiselect-chip-bg);
159
+ --#{sys.$prefix}chip-fg: var(--#{sys.$prefix}multiselect-chip-fg);
155
160
 
156
- display: inline-flex;
157
- align-items: center;
158
- padding: $_chip-padding;
159
- background-color: var(--_chip-bg);
160
- color: var(--_chip-fg);
161
- border-radius: var(--#{sys.$prefix}radius-sm);
162
- font-size: var(--#{sys.$prefix}typography-size-xs);
163
- line-height: $_line-height;
164
- white-space: nowrap;
161
+ // Flatten to sit inside the trigger height (matches MultiCombobox chips)
162
+ // and never squish the label — it ellipsises at max-width instead.
163
+ padding-block: 0.125em;
164
+ flex: none;
165
165
  max-width: $_chip-max-width;
166
- overflow: hidden;
167
- text-overflow: ellipsis;
166
+
167
+ .#{sys.$prefix}chip__text {
168
+ overflow: hidden;
169
+ text-overflow: ellipsis;
170
+ }
168
171
  }
169
172
 
170
173
  .#{sys.$prefix}interface .#{sys.$prefix}multiselect__more {
@@ -196,7 +199,7 @@ $_chip-max-width: 120px;
196
199
 
197
200
  &:hover {
198
201
  color: var(--#{sys.$prefix}color-fg);
199
- background-color: var(--#{sys.$prefix}theme-secondary-subtlest);
202
+ background-color: var(--#{sys.$prefix}color-fill-subtle);
200
203
  }
201
204
 
202
205
  [data-disabled] & {
@@ -275,7 +278,7 @@ $_chip-max-width: 120px;
275
278
  :where(.#{sys.$prefix}interface) .#{sys.$prefix}multiselect__option {
276
279
  // Internal tokens with real fallbacks
277
280
  --_option-radius: var(--#{sys.$prefix}multiselect-option-radius, var(--#{sys.$prefix}radius-sm));
278
- --_bg-hover: var(--#{sys.$prefix}multiselect-option-bg-hover, var(--#{sys.$prefix}theme-secondary-subtlest));
281
+ --_bg-hover: var(--#{sys.$prefix}multiselect-option-bg-hover, var(--#{sys.$prefix}color-fill-subtle));
279
282
  --_bg-selected: var(--#{sys.$prefix}multiselect-option-bg-selected, var(--#{sys.$prefix}theme-primary-subtlest));
280
283
 
281
284
  // Layout
@@ -290,6 +293,15 @@ $_chip-max-width: 120px;
290
293
  font-size: var(--#{sys.$prefix}typography-size-sm);
291
294
  line-height: $_line-height;
292
295
 
296
+ transition: background-color var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
297
+
298
+ // Rounded boxes shouldn't abut — a hairline of air between options.
299
+ // (Not `& + &`: sass expands both ampersands to the full compound
300
+ // selector, and the :where() prefix ends up mid-combinator — dead rule.)
301
+ & + .#{sys.$prefix}multiselect__option {
302
+ margin-block-start: var(--#{sys.$prefix}multiselect-option-gap, var(--#{sys.$prefix}select-option-gap, 2px));
303
+ }
304
+
293
305
  &:hover:not([data-disabled]):not([data-blocked]),
294
306
  &[data-highlighted]:not([data-disabled]):not([data-blocked]) {
295
307
  background-color: var(--_bg-hover);
@@ -403,6 +415,10 @@ $_chip-max-width: 120px;
403
415
  :where(.#{sys.$prefix}interface) .#{sys.$prefix}multiselect__checkbox {
404
416
  transition-duration: 0ms;
405
417
  }
418
+
419
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}multiselect__option {
420
+ transition-duration: 0ms;
421
+ }
406
422
  }
407
423
 
408
424
  // ---------------------------------------------------------------------------
@@ -3,6 +3,7 @@
3
3
  /* @tui-tokens
4
4
  --tui-notice-bg
5
5
  --tui-notice-border
6
+ --tui-notice-border-width
6
7
  --tui-notice-stripe
7
8
  --tui-notice-stripe-width
8
9
  --tui-notice-fg
@@ -20,6 +21,7 @@
20
21
  // Component API tokens (never defined here, only read via fallback):
21
22
  // --tui-notice-bg Background color
22
23
  // --tui-notice-border Border color
24
+ // --tui-notice-border-width Border width (default: bold; standard with stripe)
23
25
  // --tui-notice-stripe Stripe color (left edge, when enabled)
24
26
  // --tui-notice-stripe-width Stripe width (default 4px)
25
27
  // --tui-notice-fg Text color
@@ -40,6 +42,10 @@
40
42
  --_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}theme-primary-base));
41
43
  --_fg: var(--#{sys.$prefix}notice-fg, inherit);
42
44
  --_radius: var(--#{sys.$prefix}notice-radius, var(--#{sys.$prefix}radius-md));
45
+ // One emphasis device per panel: plain notices carry the bold border;
46
+ // the stripe variant already has its accent bar, so it keeps the
47
+ // standard width (see has-stripe below).
48
+ --_border-width: var(--#{sys.$prefix}notice-border-width, var(--#{sys.$prefix}border-width-bold, 2px));
43
49
  --_padding: var(--#{sys.$prefix}notice-padding, var(--#{sys.$prefix}spacing-md));
44
50
  --_foot-basis: var(--#{sys.$prefix}notice-foot-basis, 500px);
45
51
 
@@ -52,7 +58,7 @@
52
58
  position: relative;
53
59
  width: 100%;
54
60
  border-style: solid;
55
- border-width: var(--#{sys.$prefix}border-width);
61
+ border-width: var(--_border-width);
56
62
  border-color: var(--_border);
57
63
  border-radius: var(--_radius);
58
64
  background-color: var(--_bg);
@@ -265,6 +271,7 @@
265
271
  // Uses a pseudo-element instead of border-inline-start so the stripe
266
272
  // doesn't interact with border-radius geometry or border-width changes.
267
273
  &.has-stripe {
274
+ --_border-width: var(--#{sys.$prefix}notice-border-width, var(--#{sys.$prefix}border-width, 1px));
268
275
  overflow: hidden; // clip pseudo to border-radius
269
276
  padding-inline-start: var(--#{sys.$prefix}notice-stripe-width, 4px);
270
277
 
@@ -286,12 +293,14 @@
286
293
  // as its hover bg), so hosts can theme borders per-notice via
287
294
  // --tui-notice-border or just widen border-width and get a colour that
288
295
  // matches the theme.
296
+ // Reads the info ladder (palette-identical to primary today, but info
297
+ // semantics stay on info tokens so the two can ever diverge).
289
298
  &.is-theme-info {
290
- --_bg: var(--#{sys.$prefix}notice-bg, var(--#{sys.$prefix}theme-primary-subtlest));
291
- --_bg-hover: var(--#{sys.$prefix}theme-primary-subtle);
292
- --_border: var(--#{sys.$prefix}notice-border, var(--#{sys.$prefix}theme-primary-subtle));
293
- --_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}theme-primary-base));
294
- --_icon-color: var(--#{sys.$prefix}theme-primary-base);
299
+ --_bg: var(--#{sys.$prefix}notice-bg, var(--#{sys.$prefix}theme-info-subtlest));
300
+ --_bg-hover: var(--#{sys.$prefix}theme-info-subtle);
301
+ --_border: var(--#{sys.$prefix}notice-border, var(--#{sys.$prefix}theme-info-subtle));
302
+ --_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}theme-info-base));
303
+ --_icon-color: var(--#{sys.$prefix}theme-info-base);
295
304
  }
296
305
 
297
306
  &.is-theme-success {
@@ -54,12 +54,14 @@
54
54
  }
55
55
  }
56
56
 
57
- // Ellipsis: non-interactive, styled to match outline buttons
57
+ // Ellipsis: non-interactive, styled to match outline buttons. The border
58
+ // reads the bridged Button token defined on the group above — not
59
+ // Button's --_border internal, which only exists on actual Buttons.
58
60
  .#{sys.$prefix}pager__ellipsis {
59
61
  display: inline-flex;
60
62
  align-items: center;
61
63
  justify-content: center;
62
- border: var(--#{sys.$prefix}border-width) solid var(--_border);
64
+ border: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}button-border);
63
65
  background: transparent;
64
66
  color: var(--#{sys.$prefix}color-fg-muted);
65
67
  border-radius: var(--#{sys.$prefix}radius-sm);
@@ -48,6 +48,12 @@
48
48
  z-index: var(--_z);
49
49
  min-width: var(--#{sys.$prefix}popover-min-width, 200px);
50
50
  max-width: var(--#{sys.$prefix}popover-max-width, min(360px, calc(100vw - 32px)));
51
+ // Written by the size middleware (output var, not an API token): when
52
+ // content is taller than the space at the best placement, the panel
53
+ // caps itself and scrolls instead of overflowing the viewport.
54
+ max-block-size: var(--#{sys.$prefix}popover-available-height, none);
55
+ overflow-y: auto;
56
+ overscroll-behavior: contain;
51
57
  padding: var(--#{sys.$prefix}popover-padding, var(--#{sys.$prefix}spacing-sm, 12px));
52
58
  box-sizing: border-box;
53
59
  pointer-events: auto;