@tangible/ui 0.2.11 → 0.2.12

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 (65) hide show
  1. package/README.md +35 -22
  2. package/components/Accordion/Accordion.js +2 -2
  3. package/components/Combobox/Combobox.js +37 -5
  4. package/components/Combobox/types.d.ts +6 -0
  5. package/components/DatePicker/DatePicker.d.ts +3 -0
  6. package/components/DatePicker/DatePicker.js +8 -2
  7. package/components/DatePicker/DateRangePicker.d.ts +3 -0
  8. package/components/DatePicker/DateRangePicker.js +8 -2
  9. package/components/DatePicker/types.d.ts +36 -0
  10. package/components/Dropdown/Dropdown.js +2 -1
  11. package/components/MultiCombobox/MultiCombobox.js +1 -1
  12. package/components/MultiSelect/MultiSelect.d.ts +1 -1
  13. package/components/MultiSelect/MultiSelect.js +29 -5
  14. package/components/MultiSelect/types.d.ts +13 -0
  15. package/components/Pager/Pager.d.ts +65 -1
  16. package/components/Pager/Pager.js +83 -10
  17. package/components/Pager/index.d.ts +1 -1
  18. package/components/Pager/types.d.ts +39 -0
  19. package/components/Pager/types.js +6 -0
  20. package/components/Popover/Popover.js +2 -1
  21. package/components/SearchSelect/SearchSelect.d.ts +1 -1
  22. package/components/SearchSelect/SearchSelect.js +3 -5
  23. package/components/SearchSelect/types.d.ts +0 -2
  24. package/components/Select/Select.d.ts +1 -1
  25. package/components/Select/Select.js +29 -5
  26. package/components/Select/types.d.ts +13 -0
  27. package/components/Table/DataTable.d.ts +6 -0
  28. package/components/Textarea/Textarea.js +7 -0
  29. package/components/Tooltip/Tooltip.js +2 -1
  30. package/components/index.d.ts +2 -2
  31. package/components/index.js +1 -1
  32. package/figma-tokens.json +4018 -0
  33. package/icons/icons.svg +12 -2
  34. package/icons/lms/index.d.ts +12 -0
  35. package/icons/lms/index.js +83 -17
  36. package/icons/manifest.json +80 -0
  37. package/icons/membersync/index.js +9 -9
  38. package/icons/player/index.js +4 -4
  39. package/icons/reaction/index.js +4 -4
  40. package/icons/registry.d.ts +20 -0
  41. package/icons/registry.js +10 -0
  42. package/icons/system/index.d.ts +8 -0
  43. package/icons/system/index.js +65 -21
  44. package/package.json +5 -1
  45. package/skills/building-with-tui/SKILL.md +328 -0
  46. package/styles/all.css +1 -1
  47. package/styles/all.expanded.css +145 -256
  48. package/styles/all.expanded.unlayered.css +145 -256
  49. package/styles/all.unlayered.css +1 -1
  50. package/styles/components/color-picker.scss +16 -3
  51. package/styles/components/combobox.scss +33 -58
  52. package/styles/components/date-picker.scss +17 -9
  53. package/styles/components/dropdown.scss +11 -6
  54. package/styles/components/gradient-picker.scss +4 -4
  55. package/styles/components/multi-combobox.scss +17 -37
  56. package/styles/components/multi-select.scss +14 -50
  57. package/styles/components/pager.scss +155 -17
  58. package/styles/components/radio.scss +37 -0
  59. package/styles/components/search-select.scss +14 -36
  60. package/styles/components/select.scss +22 -51
  61. package/styles/components/text-input.scss +79 -21
  62. package/styles/system/_constants.scss +7 -1
  63. package/tui-manifest.json +143 -6
  64. package/utils/compose-refs.d.ts +29 -3
  65. package/utils/compose-refs.js +51 -12
@@ -139,7 +139,12 @@
139
139
  // Compact format Select trigger; the value field takes the rest of the width.
140
140
  // Smaller type keeps the trigger narrow so wide formats (oklch) don't squish
141
141
  // the channel inputs. Height stays put — the named control-height token wins.
142
- .#{sys.$prefix}interface .#{sys.$prefix}color-picker__format {
142
+ //
143
+ // Both classes on purpose. This lands on the same element as the shared
144
+ // .tui-select__trigger rule, which is also (0,2,0) and is included after
145
+ // ColorPicker in the bundle — matching weight alone would lose the tie on
146
+ // source order and give back the trigger's roomier 12px padding and md font.
147
+ .#{sys.$prefix}interface .#{sys.$prefix}color-picker__format.#{sys.$prefix}select__trigger {
143
148
  flex: none;
144
149
  min-width: 0;
145
150
  font-size: var(--#{sys.$prefix}typography-size-xs);
@@ -280,7 +285,7 @@
280
285
  cursor: pointer;
281
286
 
282
287
  &.is-size-sm {
283
- min-block-size: var(--#{sys.$prefix}control-height-sm, 2.25rem);
288
+ min-block-size: var(--#{sys.$prefix}control-height-sm, 2rem);
284
289
  }
285
290
  &.is-size-lg {
286
291
  min-block-size: var(--#{sys.$prefix}control-height-lg, 3rem);
@@ -341,7 +346,7 @@
341
346
  background-position: 0 0, 0 0, 0 3px, 3px -3px, -3px 0;
342
347
  }
343
348
  .#{sys.$prefix}interface .#{sys.$prefix}color-field.is-size-sm .#{sys.$prefix}color-field__swatch {
344
- --_size: calc(var(--#{sys.$prefix}control-height-sm, 2.25rem) - 2 * var(--#{sys.$prefix}spacing-xxs) - 2 * var(--#{sys.$prefix}border-width));
349
+ --_size: calc(var(--#{sys.$prefix}control-height-sm, 2rem) - 2 * var(--#{sys.$prefix}spacing-xxs) - 2 * var(--#{sys.$prefix}border-width));
345
350
  }
346
351
  .#{sys.$prefix}interface .#{sys.$prefix}color-field.is-size-lg .#{sys.$prefix}color-field__swatch {
347
352
  --_size: calc(var(--#{sys.$prefix}control-height-lg, 3rem) - 2 * var(--#{sys.$prefix}spacing-xxs) - 2 * var(--#{sys.$prefix}border-width));
@@ -353,6 +358,14 @@
353
358
  font-size: 1.25rem; // ~20px glyph
354
359
  color: var(--_swatch-icon, #fff);
355
360
  }
361
+ // At sm the swatch is 22px (32px ladder height less the insets), so the 20px
362
+ // glyph would fill it edge to edge. Step the glyph down instead of padding
363
+ // the swatch — the swatch edge is what reads as the colour.
364
+ .#{sys.$prefix}interface
365
+ .#{sys.$prefix}color-field.is-size-sm
366
+ .#{sys.$prefix}color-field__swatch-icon {
367
+ font-size: 1rem; // ~16px glyph
368
+ }
356
369
  // Per-size overrides need the size class as an ANCESTOR of the icon — a nested
357
370
  // `.is-size-sm &` inverts the order and never matches.
358
371
  .#{sys.$prefix}interface .#{sys.$prefix}color-field.is-size-sm .#{sys.$prefix}color-field__swatch-icon {
@@ -19,7 +19,6 @@
19
19
 
20
20
  // Structural SCSS constants (compile away, not overridable)
21
21
  $_min-width: 160px;
22
- $_label-letter-spacing: 0.05em;
23
22
 
24
23
  @mixin styles() {
25
24
  // ==========================================================================
@@ -58,82 +57,58 @@ $_label-letter-spacing: 0.05em;
58
57
  // Input Wrapper
59
58
  // ---------------------------------------------------------------------------
60
59
 
60
+ // The wrapper wears .tui-input-group and is now the chrome host: bg, fg,
61
+ // border, focus border, radius, control sizing, focus ring, open and disabled
62
+ // states all come from the primitive. The input inside goes transparent and
63
+ // borderless, exactly as TextInput's does.
64
+ //
65
+ // This also retires the :has() font-size workaround that used to live here.
66
+ // The chevron and clear are siblings of the input, so they sat outside its
67
+ // control-sizing scope and ignored --tui-control-font-size-* remaps; the fix
68
+ // was to key the wrapper to the control font via :has() on the input's size
69
+ // class. Now the group owns control-sizing and the size class rides the
70
+ // wrapper, so everything in the box tracks the ladder by construction.
61
71
  .#{sys.$prefix}interface .#{sys.$prefix}combobox__input-wrapper {
72
+ // Chain, don't replace: existing --tui-combobox-input-* / --tui-select-
73
+ // trigger-* overrides still win; the shared input default sits underneath.
74
+ --_bg: var(--#{sys.$prefix}combobox-input-bg, var(--#{sys.$prefix}select-trigger-bg, var(--#{sys.$prefix}input-bg, var(--#{sys.$prefix}color-bg-surface))));
75
+ --_fg: var(--#{sys.$prefix}combobox-input-fg, var(--#{sys.$prefix}select-trigger-fg, var(--#{sys.$prefix}input-fg, var(--#{sys.$prefix}color-fg))));
76
+ --_border: var(--#{sys.$prefix}combobox-input-border, var(--#{sys.$prefix}select-trigger-border, var(--#{sys.$prefix}input-border, var(--#{sys.$prefix}color-border))));
77
+ --_border-focus: var(--#{sys.$prefix}combobox-input-border-focus, var(--#{sys.$prefix}select-trigger-border-focus, var(--#{sys.$prefix}input-border-focus, var(--#{sys.$prefix}theme-primary-base))));
78
+ --_radius: var(--#{sys.$prefix}combobox-input-radius, var(--#{sys.$prefix}select-trigger-radius, var(--#{sys.$prefix}input-radius, var(--#{sys.$prefix}radius-md))));
79
+
80
+ // Deltas from the primitive: block-level so it fills the root, positioned
81
+ // for the absolutely-placed chevron/clear, 12px inline padding, and a
82
+ // trailing reservation so typed text never runs under those two.
62
83
  position: relative;
63
84
  display: flex;
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
- }
85
+ padding-inline: var(--#{sys.$prefix}spacing-sm);
86
+ padding-inline-end: calc(var(--#{sys.$prefix}spacing-sm) + 1.5em + var(--#{sys.$prefix}spacing-xs) + 1.25em);
75
87
 
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
- }
88
+ transition-duration: var(--#{sys.$prefix}motion-duration);
89
+ transition-timing-function: var(--#{sys.$prefix}motion-timing);
90
+ transition-property: border-color, background-color;
79
91
  }
80
92
 
81
93
  // ---------------------------------------------------------------------------
82
94
  // Input
83
95
  // ---------------------------------------------------------------------------
84
96
 
97
+ // Inside the group the input is transparent and borderless (the group's own
98
+ // `input` rules do that), so all that's left here is typography, the
99
+ // placeholder colour, and the disabled cursor. The group carries the focus
100
+ // ring and reads aria-expanded off this input for its open border.
85
101
  .#{sys.$prefix}interface .#{sys.$prefix}combobox__input {
86
- // Internal tokens with fallbacks to Select tokens
87
- --_bg: var(--#{sys.$prefix}combobox-input-bg, var(--#{sys.$prefix}select-trigger-bg, var(--#{sys.$prefix}color-bg-surface)));
88
- --_fg: var(--#{sys.$prefix}combobox-input-fg, var(--#{sys.$prefix}select-trigger-fg, var(--#{sys.$prefix}color-fg)));
89
- --_border: var(--#{sys.$prefix}combobox-input-border, var(--#{sys.$prefix}select-trigger-border, var(--#{sys.$prefix}color-border)));
90
- --_border-focus: var(--#{sys.$prefix}combobox-input-border-focus, var(--#{sys.$prefix}select-trigger-border-focus, var(--#{sys.$prefix}theme-primary-base)));
91
- --_radius: var(--#{sys.$prefix}combobox-input-radius, var(--#{sys.$prefix}select-trigger-radius, var(--#{sys.$prefix}radius-md)));
92
-
93
- // Reset
94
102
  appearance: none;
95
103
  font: inherit;
96
104
  margin: 0;
97
-
98
- // Unified sizing (after font reset so font-size wins)
99
- @include sys.control-sizing(sys.$prefix);
100
-
101
- // Layout
102
- display: block;
103
- width: 100%;
104
- padding-inline: var(--#{sys.$prefix}spacing-sm);
105
- padding-right: calc(var(--#{sys.$prefix}spacing-sm) + 1.5em + var(--#{sys.$prefix}spacing-xs) + 1.25em);
106
-
107
- // Visual
108
- background-color: var(--_bg);
109
- color: var(--_fg);
110
- border: var(--#{sys.$prefix}border-width) solid var(--_border);
111
- border-radius: var(--_radius);
112
-
113
- // Typography
114
105
  line-height: 1.4;
115
106
 
116
- // Transitions
117
- transition-duration: var(--#{sys.$prefix}motion-duration);
118
- transition-timing-function: var(--#{sys.$prefix}motion-timing);
119
- transition-property: border-color, background-color;
120
-
121
107
  &::placeholder {
122
108
  color: var(--#{sys.$prefix}color-fg-muted);
123
109
  }
124
110
 
125
- &:focus {
126
- --_border: var(--_border-focus);
127
- outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
128
- outline-offset: var(--#{sys.$prefix}focus-ring-offset);
129
- }
130
-
131
- &[aria-expanded="true"] {
132
- --_border: var(--_border-focus);
133
- }
134
-
135
111
  &:disabled {
136
- opacity: var(--#{sys.$prefix}opacity-disabled);
137
112
  cursor: not-allowed;
138
113
  }
139
114
  }
@@ -217,7 +192,7 @@ $_label-letter-spacing: 0.05em;
217
192
  --_border: var(--#{sys.$prefix}combobox-content-border, var(--#{sys.$prefix}select-content-border, var(--#{sys.$prefix}color-border)));
218
193
  --_shadow: var(--#{sys.$prefix}combobox-content-shadow, var(--#{sys.$prefix}select-content-shadow, var(--#{sys.$prefix}shadow-dropdown)));
219
194
  --_radius: var(--#{sys.$prefix}combobox-content-radius, var(--#{sys.$prefix}select-content-radius, var(--#{sys.$prefix}radius-md)));
220
- --_min-width: var(--#{sys.$prefix}combobox-min-width, var(--#{sys.$prefix}select-min-width, $_min-width));
195
+ --_min-width: var(--#{sys.$prefix}combobox-min-width, var(--#{sys.$prefix}select-min-width, #{$_min-width}));
221
196
 
222
197
  // Layout
223
198
  z-index: var(--#{sys.$prefix}layer-top);
@@ -346,7 +321,7 @@ $_label-letter-spacing: 0.05em;
346
321
  font-weight: var(--#{sys.$prefix}typography-weight-semibold, 600);
347
322
  color: var(--#{sys.$prefix}color-fg-muted);
348
323
  text-transform: uppercase;
349
- letter-spacing: $_label-letter-spacing;
324
+ letter-spacing: sys.$label-letter-spacing;
350
325
  }
351
326
 
352
327
  // ---------------------------------------------------------------------------
@@ -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.5 × control-font-md, i.e. 2.5rem)
20
+ // --tui-calendar-cell-size Day cell square (default 2.5 × the control font, md typography rung when unset)
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
@@ -34,11 +34,19 @@
34
34
  :where(.#{sys.$prefix}interface) .#{sys.$prefix}calendar {
35
35
  // Day/month buttons and cell geometry track the control font, so a
36
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
37
+ // Only the *last* fallback moved onto the ladder: the chain still reads the
38
+ // control font first, so a 13px Fields context keeps its ~32px cells, and
39
+ // the md typography rung replaces the bare `1rem` underneath it (same 40px,
40
+ // but it follows a --tui-typography-size-multiplier remap).
41
+ //
42
+ // font-size deliberately does NOT fall back to a rung: the calendar
38
43
  // 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);
44
+ // so a hard md default would grow picker text past its own footer and
45
+ // preset chrome (which sit at control-font-size-sm). `inherit` is what the
46
+ // previous `1em` meant — spelled out so it doesn't read as a stray unit.
47
+ // Unset token = no change.
48
+ --_cell: var(--#{sys.$prefix}calendar-cell-size, calc(2.5 * var(--#{sys.$prefix}control-font-size-md, var(--#{sys.$prefix}typography-size-md))));
49
+ font-size: var(--#{sys.$prefix}control-font-size-md, inherit);
42
50
  --_cell-radius: var(--#{sys.$prefix}calendar-cell-radius, var(--#{sys.$prefix}radius-full, 999px));
43
51
  --_selected-bg: var(--#{sys.$prefix}calendar-selected-bg, var(--#{sys.$prefix}theme-primary-base));
44
52
  --_selected-fg: var(--#{sys.$prefix}calendar-selected-fg, var(--#{sys.$prefix}color-fg-on-accent));
@@ -64,7 +72,7 @@
64
72
  border-radius: var(--#{sys.$prefix}radius-sm);
65
73
  color: var(--_caption);
66
74
  font: inherit;
67
- font-weight: var(--#{sys.$prefix}typography-weight-medium, 600);
75
+ font-weight: var(--#{sys.$prefix}typography-weight-medium, 500);
68
76
  cursor: pointer;
69
77
  }
70
78
 
@@ -232,7 +240,7 @@
232
240
 
233
241
  &__title {
234
242
  flex: 1 1 auto;
235
- font-weight: var(--#{sys.$prefix}typography-weight-medium, 600);
243
+ font-weight: var(--#{sys.$prefix}typography-weight-medium, 500);
236
244
  }
237
245
 
238
246
  &__time {
@@ -378,8 +386,8 @@
378
386
  &__field-label {
379
387
  color: var(--#{sys.$prefix}color-fg-muted);
380
388
  font-size: var(--#{sys.$prefix}typography-size-xs);
381
- font-weight: var(--#{sys.$prefix}typography-weight-medium, 600);
382
- letter-spacing: 0.05em;
389
+ font-weight: var(--#{sys.$prefix}typography-weight-medium, 500);
390
+ letter-spacing: sys.$label-letter-spacing;
383
391
  text-transform: uppercase;
384
392
  }
385
393
 
@@ -1,5 +1,6 @@
1
1
  @use "../system" as sys;
2
2
 
3
+
3
4
  /* @tui-tokens
4
5
  --tui-dropdown-bg
5
6
  --tui-dropdown-fg
@@ -34,12 +35,15 @@
34
35
  // Internal tokens
35
36
  --_bg: var(--#{sys.$prefix}dropdown-bg, var(--#{sys.$prefix}color-bg-elevated));
36
37
  --_fg: var(--#{sys.$prefix}dropdown-fg, var(--#{sys.$prefix}color-fg));
37
- --_radius: var(--#{sys.$prefix}dropdown-radius, var(--#{sys.$prefix}radius-sm));
38
- --_shadow: var(--#{sys.$prefix}dropdown-shadow, var(--#{sys.$prefix}shadow-md));
38
+ --_radius: var(--#{sys.$prefix}dropdown-radius, var(--#{sys.$prefix}radius-md));
39
+ --_shadow: var(--#{sys.$prefix}dropdown-shadow, var(--#{sys.$prefix}shadow-dropdown));
39
40
  --_z: var(--#{sys.$prefix}dropdown-z, var(--#{sys.$prefix}layer-top));
40
41
  --_border: var(--#{sys.$prefix}dropdown-border, var(--#{sys.$prefix}color-border));
41
- --_item-bg-hover: var(--#{sys.$prefix}dropdown-item-bg-hover, var(--#{sys.$prefix}color-bg-muted));
42
- --_item-bg-active: var(--#{sys.$prefix}dropdown-item-bg-active, var(--#{sys.$prefix}color-bg-muted));
42
+ // Row states ride the fill ladder, like listbox options. Pressed is one
43
+ // rung past hover — the two were the same token before, so :active read as
44
+ // no feedback at all.
45
+ --_item-bg-hover: var(--#{sys.$prefix}dropdown-item-bg-hover, var(--#{sys.$prefix}color-fill-subtle));
46
+ --_item-bg-active: var(--#{sys.$prefix}dropdown-item-bg-active, var(--#{sys.$prefix}color-fill));
43
47
 
44
48
  // Layout
45
49
  z-index: var(--_z);
@@ -82,7 +86,7 @@
82
86
  min-width: 0;
83
87
  gap: var(--#{sys.$prefix}spacing-xs, 8px);
84
88
  padding: var(--#{sys.$prefix}spacing-xs, 8px) var(--#{sys.$prefix}spacing-sm, 12px);
85
- border-radius: var(--#{sys.$prefix}radius-xs, 4px);
89
+ border-radius: var(--#{sys.$prefix}radius-sm);
86
90
  text-align: left;
87
91
  font-weight: normal;
88
92
 
@@ -141,7 +145,8 @@
141
145
  font-size: var(--#{sys.$prefix}typography-size-xs, 11px);
142
146
  font-weight: var(--#{sys.$prefix}typography-weight-semibold, 600);
143
147
  color: var(--#{sys.$prefix}color-fg-muted);
144
- letter-spacing: 0.02em;
148
+ text-transform: uppercase;
149
+ letter-spacing: sys.$label-letter-spacing;
145
150
  user-select: none;
146
151
  }
147
152
 
@@ -141,7 +141,7 @@
141
141
  .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__value-input {
142
142
  flex: 1 1 auto;
143
143
  min-width: 0;
144
- min-height: var(--#{sys.$prefix}control-height-sm, 2.25rem);
144
+ min-height: var(--#{sys.$prefix}control-height-sm, 2rem);
145
145
  padding-inline: var(--#{sys.$prefix}spacing-xs);
146
146
  border: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}color-border);
147
147
  border-radius: var(--#{sys.$prefix}radius-md);
@@ -190,8 +190,8 @@
190
190
  .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__swatch {
191
191
  flex: none;
192
192
  display: inline-flex;
193
- width: calc(var(--#{sys.$prefix}control-height-sm, 2.25rem) - 2 * var(--#{sys.$prefix}spacing-xxs));
194
- height: calc(var(--#{sys.$prefix}control-height-sm, 2.25rem) - 2 * var(--#{sys.$prefix}spacing-xxs));
193
+ width: calc(var(--#{sys.$prefix}control-height-sm, 2rem) - 2 * var(--#{sys.$prefix}spacing-xxs));
194
+ height: calc(var(--#{sys.$prefix}control-height-sm, 2rem) - 2 * var(--#{sys.$prefix}spacing-xxs));
195
195
  // WCAG 2.5.5 floor — keep the hit target at least 24px even if the
196
196
  // control-height token shrinks in a dense context.
197
197
  min-inline-size: 1.5rem;
@@ -276,7 +276,7 @@
276
276
 
277
277
  // Sit the dial on the input's baseline row.
278
278
  > .#{sys.$prefix}angle-dial {
279
- margin-block-end: calc((var(--#{sys.$prefix}control-height-sm, 2.25rem) - var(--#{sys.$prefix}angle-dial-size, 1.75rem)) / 2);
279
+ margin-block-end: calc((var(--#{sys.$prefix}control-height-sm, 2rem) - var(--#{sys.$prefix}angle-dial-size, 1.75rem)) / 2);
280
280
  }
281
281
  }
282
282
 
@@ -19,7 +19,6 @@
19
19
 
20
20
  // Structural SCSS constants (compile away, not overridable)
21
21
  $_min-width: 160px;
22
- $_label-letter-spacing: 0.05em;
23
22
  $_input-min-width: 4rem;
24
23
  // Breathing room so chips don't touch the control edge when the row wraps.
25
24
  // Intentionally below the smallest spacing token (xxs = 4px).
@@ -54,55 +53,36 @@ $_token-row-padding: 2px;
54
53
  // Control (token field)
55
54
  // ---------------------------------------------------------------------------
56
55
 
56
+ // The control wears .tui-input-group: chrome, control sizing, focus ring, and
57
+ // the open (inner input's aria-expanded) and disabled (inner input's
58
+ // :disabled) states all come from the primitive.
57
59
  .#{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);
60
+ // Chain, don't replace — multicombobox → combobox → select → input → system.
61
+ --_bg: var(--#{sys.$prefix}multicombobox-control-bg, var(--#{sys.$prefix}combobox-input-bg, var(--#{sys.$prefix}select-trigger-bg, var(--#{sys.$prefix}input-bg, var(--#{sys.$prefix}color-bg-surface)))));
62
+ --_fg: var(--#{sys.$prefix}multicombobox-control-fg, var(--#{sys.$prefix}combobox-input-fg, var(--#{sys.$prefix}select-trigger-fg, var(--#{sys.$prefix}input-fg, var(--#{sys.$prefix}color-fg)))));
63
+ --_border: var(--#{sys.$prefix}multicombobox-control-border, var(--#{sys.$prefix}combobox-input-border, var(--#{sys.$prefix}select-trigger-border, var(--#{sys.$prefix}input-border, var(--#{sys.$prefix}color-border)))));
64
+ --_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}input-border-focus, var(--#{sys.$prefix}theme-primary-base)))));
65
+ --_radius: var(--#{sys.$prefix}multicombobox-control-radius, var(--#{sys.$prefix}combobox-input-radius, var(--#{sys.$prefix}select-trigger-radius, var(--#{sys.$prefix}input-radius, var(--#{sys.$prefix}radius-md)))));
66
+
67
+ // Deltas from the primitive. Zeroing padding-block is the token-field
68
+ // exception: the chips define the interior and min-height governs each tier
69
+ // (sm/md/lg), so the group's padding-block would stack on top and inflate
70
+ // short controls. Block-level flex so the control fills its container as
71
+ // chips wrap; positioned for the absolutely-placed clear + chevron.
70
72
  height: auto;
71
73
  padding-block: 0;
72
74
 
73
75
  position: relative;
74
76
  display: flex;
75
- align-items: center;
76
77
  width: 100%;
77
78
  padding-inline-start: var(--#{sys.$prefix}spacing-sm);
78
79
  // Reserve room for the clear button + chevron on the trailing edge
79
80
  padding-inline-end: calc(var(--#{sys.$prefix}spacing-sm) + 1.5em + var(--#{sys.$prefix}spacing-xs) + 1.25em);
80
81
 
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
82
  transition-duration: var(--#{sys.$prefix}motion-duration);
88
83
  transition-timing-function: var(--#{sys.$prefix}motion-timing);
89
84
  transition-property: border-color, background-color;
90
85
 
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
86
  // The control already dims the whole box at opacity-disabled; keep the chips
107
87
  // (which each carry their own disabled state for the inert remove button) at
108
88
  // full opacity so they don't stack a second 0.75 → ~0.56. See the Checkbox
@@ -288,7 +268,7 @@ $_token-row-padding: 2px;
288
268
  --_border: var(--#{sys.$prefix}multicombobox-content-border, var(--#{sys.$prefix}combobox-content-border, var(--#{sys.$prefix}select-content-border, var(--#{sys.$prefix}color-border))));
289
269
  --_shadow: var(--#{sys.$prefix}multicombobox-content-shadow, var(--#{sys.$prefix}combobox-content-shadow, var(--#{sys.$prefix}select-content-shadow, var(--#{sys.$prefix}shadow-dropdown))));
290
270
  --_radius: var(--#{sys.$prefix}multicombobox-content-radius, var(--#{sys.$prefix}combobox-content-radius, var(--#{sys.$prefix}select-content-radius, var(--#{sys.$prefix}radius-md))));
291
- --_min-width: var(--#{sys.$prefix}multicombobox-min-width, var(--#{sys.$prefix}combobox-min-width, var(--#{sys.$prefix}select-min-width, $_min-width)));
271
+ --_min-width: var(--#{sys.$prefix}multicombobox-min-width, var(--#{sys.$prefix}combobox-min-width, var(--#{sys.$prefix}select-min-width, #{$_min-width})));
292
272
 
293
273
  z-index: var(--#{sys.$prefix}layer-top);
294
274
  min-width: var(--_min-width);
@@ -407,7 +387,7 @@ $_token-row-padding: 2px;
407
387
  font-weight: var(--#{sys.$prefix}typography-weight-semibold, 600);
408
388
  color: var(--#{sys.$prefix}color-fg-muted);
409
389
  text-transform: uppercase;
410
- letter-spacing: $_label-letter-spacing;
390
+ letter-spacing: sys.$label-letter-spacing;
411
391
  }
412
392
 
413
393
  // ---------------------------------------------------------------------------
@@ -22,7 +22,6 @@
22
22
  // Structural SCSS constants (compile away, not overridable)
23
23
  $_min-width: 160px;
24
24
  $_line-height: 1.4;
25
- $_label-letter-spacing: 0.05em;
26
25
  $_chip-max-width: 120px;
27
26
 
28
27
  @mixin styles() {
@@ -61,40 +60,23 @@ $_chip-max-width: 120px;
61
60
  // ---------------------------------------------------------------------------
62
61
 
63
62
  .#{sys.$prefix}interface .#{sys.$prefix}multiselect__trigger {
64
- // Internal tokens with real fallbacks
65
- --_bg: var(--#{sys.$prefix}multiselect-trigger-bg, var(--#{sys.$prefix}color-bg-surface));
66
- --_fg: var(--#{sys.$prefix}multiselect-trigger-fg, var(--#{sys.$prefix}color-fg));
67
- --_border: var(--#{sys.$prefix}multiselect-trigger-border, var(--#{sys.$prefix}color-border));
68
- --_border-focus: var(--#{sys.$prefix}multiselect-trigger-border-focus, var(--#{sys.$prefix}theme-primary-base));
69
- --_radius: var(--#{sys.$prefix}multiselect-trigger-radius, var(--#{sys.$prefix}radius-md));
70
- --_min-width: var(--#{sys.$prefix}multiselect-min-width, $_min-width);
71
-
72
- // Reset
73
- appearance: none;
74
- border: none;
75
- font: inherit;
76
- margin: 0;
77
-
78
- // Unified sizing
79
- @include sys.control-sizing(sys.$prefix);
80
-
81
- // Layout
82
- display: inline-flex;
83
- align-items: center;
63
+ // Chrome (bg, fg, border, focus border, radius, control sizing, focus ring,
64
+ // open and disabled states) comes from .tui-input-group.
65
+ // Chain, don't replace: an existing --tui-multiselect-trigger-* override still wins, and
66
+ // the shared --tui-input-* default moves in underneath it.
67
+ --_bg: var(--#{sys.$prefix}multiselect-trigger-bg, var(--#{sys.$prefix}input-bg, var(--#{sys.$prefix}color-bg-surface)));
68
+ --_fg: var(--#{sys.$prefix}multiselect-trigger-fg, var(--#{sys.$prefix}input-fg, var(--#{sys.$prefix}color-fg)));
69
+ --_border: var(--#{sys.$prefix}multiselect-trigger-border, var(--#{sys.$prefix}input-border, var(--#{sys.$prefix}color-border)));
70
+ --_border-focus: var(--#{sys.$prefix}multiselect-trigger-border-focus, var(--#{sys.$prefix}input-border-focus, var(--#{sys.$prefix}theme-primary-base)));
71
+ --_radius: var(--#{sys.$prefix}multiselect-trigger-radius, var(--#{sys.$prefix}input-radius, var(--#{sys.$prefix}radius-md)));
72
+ --_min-width: var(--#{sys.$prefix}multiselect-min-width, #{$_min-width});
73
+
74
+ // Deltas from the primitive
84
75
  justify-content: space-between;
85
- gap: var(--#{sys.$prefix}spacing-xs);
86
76
  min-width: var(--_min-width);
87
77
  width: 100%;
88
78
  padding-inline: var(--#{sys.$prefix}spacing-sm);
89
-
90
- // Visual
91
- background-color: var(--_bg);
92
- color: var(--_fg);
93
- border: var(--#{sys.$prefix}border-width) solid var(--_border);
94
- border-radius: var(--_radius);
95
79
  cursor: pointer;
96
-
97
- // Typography
98
80
  line-height: $_line-height;
99
81
  text-align: left;
100
82
 
@@ -102,24 +84,6 @@ $_chip-max-width: 120px;
102
84
  transition-duration: var(--#{sys.$prefix}motion-duration);
103
85
  transition-timing-function: var(--#{sys.$prefix}motion-timing);
104
86
  transition-property: border-color, background-color;
105
-
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 {
109
- --_border: var(--_border-focus);
110
- outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
111
- outline-offset: var(--#{sys.$prefix}focus-ring-offset);
112
- }
113
-
114
- &[data-state="open"] {
115
- --_border: var(--_border-focus);
116
- }
117
-
118
- &[data-disabled],
119
- &[disabled] {
120
- opacity: var(--#{sys.$prefix}opacity-disabled);
121
- cursor: not-allowed;
122
- }
123
87
  }
124
88
 
125
89
  .#{sys.$prefix}interface .#{sys.$prefix}multiselect__value {
@@ -243,7 +207,7 @@ $_chip-max-width: 120px;
243
207
  --_border: var(--#{sys.$prefix}multiselect-content-border, var(--#{sys.$prefix}color-border));
244
208
  --_shadow: var(--#{sys.$prefix}multiselect-content-shadow, var(--#{sys.$prefix}shadow-dropdown));
245
209
  --_radius: var(--#{sys.$prefix}multiselect-content-radius, var(--#{sys.$prefix}radius-md));
246
- --_min-width: var(--#{sys.$prefix}multiselect-min-width, $_min-width);
210
+ --_min-width: var(--#{sys.$prefix}multiselect-min-width, #{$_min-width});
247
211
 
248
212
  // Layout
249
213
  z-index: var(--#{sys.$prefix}layer-top);
@@ -407,7 +371,7 @@ $_chip-max-width: 120px;
407
371
  font-weight: var(--#{sys.$prefix}typography-weight-semibold, 600);
408
372
  color: var(--#{sys.$prefix}color-fg-muted);
409
373
  text-transform: uppercase;
410
- letter-spacing: $_label-letter-spacing;
374
+ letter-spacing: sys.$label-letter-spacing;
411
375
  }
412
376
 
413
377
  // ---------------------------------------------------------------------------