@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
@@ -8,7 +8,9 @@
8
8
  @use "./chip" as chip;
9
9
  @use "./chip-group" as chipgroup;
10
10
  @use "./combobox" as combobox;
11
+ @use "./multi-combobox" as multicombobox;
11
12
  @use "./content-indicator" as contentindicator;
13
+ @use "./date-picker" as datepicker;
12
14
  @use "./dropdown" as dropdown;
13
15
  @use "./field" as field;
14
16
  @use "./multi-select" as multiselect;
@@ -26,6 +28,7 @@
26
28
  @use "./rating" as rating;
27
29
  @use "./progress" as progress;
28
30
  @use "./segmented-control" as segmentedcontrol;
31
+ @use "./slider" as slider;
29
32
  @use "./switch" as switch;
30
33
  @use "./sidebar" as sidebar;
31
34
  @use "./step-indicator" as stepindicator;
@@ -71,7 +74,9 @@ $-input-dependents: (input, field, text-input, textarea, pager);
71
74
  @if -wants($only, chip) { @include chip.styles(); }
72
75
  @if -wants($only, chip-group) { @include chipgroup.styles(); }
73
76
  @if -wants($only, combobox) { @include combobox.styles(); }
77
+ @if -wants($only, multi-combobox) { @include multicombobox.styles(); }
74
78
  @if -wants($only, content-indicator) { @include contentindicator.styles(); }
79
+ @if -wants($only, date-picker) { @include datepicker.styles(); }
75
80
  @if -wants($only, dropdown) { @include dropdown.styles(); }
76
81
  @if -wants($only, field) { @include field.styles(); }
77
82
  @if -wants($only, multi-select) { @include multiselect.styles(); }
@@ -89,6 +94,7 @@ $-input-dependents: (input, field, text-input, textarea, pager);
89
94
  @if -wants($only, rating) { @include rating.styles(); }
90
95
  @if -wants($only, progress) { @include progress.styles(); }
91
96
  @if -wants($only, segmented-control) { @include segmentedcontrol.styles(); }
97
+ @if -wants($only, slider) { @include slider.styles(); }
92
98
  @if -wants($only, switch) { @include switch.styles(); }
93
99
  @if -wants($only, sidebar) { @include sidebar.styles(); }
94
100
  @if -wants($only, step-indicator) { @include stepindicator.styles(); }
@@ -10,6 +10,7 @@
10
10
  --tui-button-border-interact
11
11
  --tui-button-fg-active
12
12
  --tui-button-icon-scale
13
+ --tui-control-height-xs
13
14
  --tui-control-height-sm
14
15
  --tui-control-height-md
15
16
  --tui-control-height-lg
@@ -17,7 +18,9 @@
17
18
 
18
19
  // Structural constants (em-based scaling, not tokenised)
19
20
  $_spacing-inline: 1.2em;
20
- $_spacing-block: 0.575em;
21
+ // Block padding stays under the ladder at every size (the min-height
22
+ // governs; flex centering does the rest). 0.35em keeps sm ≤ 32px.
23
+ $_spacing-block: 0.35em;
21
24
 
22
25
  // Typography defaults
23
26
  $_typography-size: var(--#{sys.$prefix}button-font-size, var(--#{sys.$prefix}typography-size-md));
@@ -36,7 +39,7 @@ $_typography-lineHeight: var(--#{sys.$prefix}button-line-height, 1.4);
36
39
  align-items: center;
37
40
  padding-inline: $_spacing-inline;
38
41
  padding-block: $_spacing-block;
39
- min-height: var(--#{sys.$prefix}control-height-md);
42
+ min-height: var(--#{sys.$prefix}control-height-md, 2.5rem);
40
43
  // gap is intentionally em-based (not tokenised) — scales with font-size so
41
44
  // icon-to-label spacing stays proportional across size tiers.
42
45
  gap: 0.5em;
@@ -71,6 +74,7 @@ $_typography-lineHeight: var(--#{sys.$prefix}button-line-height, 1.4);
71
74
  // --tui-button-font-size-lg Font size for large button text
72
75
  //
73
76
  // Shared control height tokens (read from .tui-interface scope):
77
+ // --tui-control-height-xs Minimum height for xs controls (dense step)
74
78
  // --tui-control-height-sm Minimum height for sm controls
75
79
  // --tui-control-height-md Minimum height for md controls
76
80
  // --tui-control-height-lg Minimum height for lg controls
@@ -226,21 +230,23 @@ $_typography-lineHeight: var(--#{sys.$prefix}button-line-height, 1.4);
226
230
 
227
231
  &.is-size-lg {
228
232
  font-size: var(--#{sys.$prefix}button-font-size-lg, var(--#{sys.$prefix}typography-size-lg));
229
- min-height: var(--#{sys.$prefix}control-height-lg);
233
+ min-height: var(--#{sys.$prefix}control-height-lg, 3rem);
230
234
  }
231
235
 
232
236
  &.is-size-sm {
233
237
  font-size: var(--#{sys.$prefix}button-font-size-sm, var(--#{sys.$prefix}typography-size-sm));
234
- min-height: var(--#{sys.$prefix}control-height-sm);
238
+ min-height: var(--#{sys.$prefix}control-height-sm, 2rem);
235
239
  }
236
240
 
237
- // xs is Button-specific and outside the unified control-height system.
238
- // It uses compact padding and a smaller radius for dense UI contexts
239
- // (e.g., inline actions, table rows). No shared --tui-control-height-xs token.
241
+ // xs: the ladder's dense step (24px), shared with IconButton via
242
+ // --tui-control-height-xs. Smaller radius to stay proportional; block
243
+ // padding drops to zero so the min-height governs.
240
244
  &.is-size-xs {
241
245
  --_radius: var(--#{sys.$prefix}button-radius, var(--#{sys.$prefix}radius-sm));
242
246
  font-size: var(--#{sys.$prefix}button-font-size-xs, var(--#{sys.$prefix}typography-size-xs));
243
- padding: var(--#{sys.$prefix}spacing-xxs);
247
+ padding-block: 0;
248
+ padding-inline: var(--#{sys.$prefix}spacing-xxs);
249
+ min-height: var(--#{sys.$prefix}control-height-xs, 1.5rem);
244
250
  min-width: 2em;
245
251
  }
246
252
 
@@ -261,17 +267,21 @@ $_typography-lineHeight: var(--#{sys.$prefix}button-line-height, 1.4);
261
267
  }
262
268
  }
263
269
 
264
- &.is-theme-danger {
265
- --_bg: var(--#{sys.$prefix}button-bg, var(--#{sys.$prefix}theme-danger-base));
266
- --_fg: var(--#{sys.$prefix}button-fg, var(--#{sys.$prefix}color-fg-on-accent));
267
- --_border: var(--#{sys.$prefix}button-border, var(--#{sys.$prefix}theme-danger-base));
268
-
269
- &:hover,
270
- &:focus-visible,
271
- &:is(:active, [aria-pressed="true"]) {
272
- --_bg: var(--#{sys.$prefix}button-bg-interact, var(--#{sys.$prefix}theme-danger-stronger));
273
- --_fg: var(--#{sys.$prefix}button-fg-interact, var(--#{sys.$prefix}color-fg-on-accent));
274
- --_border: var(--#{sys.$prefix}button-border-interact, var(--#{sys.$prefix}theme-danger-stronger));
270
+ // Status themes (danger/success/warning/info) share one recipe:
271
+ // base fill, on-accent text, stronger step on interaction.
272
+ @each $status in (danger, success, warning, info) {
273
+ &.is-theme-#{$status} {
274
+ --_bg: var(--#{sys.$prefix}button-bg, var(--#{sys.$prefix}theme-#{$status}-base));
275
+ --_fg: var(--#{sys.$prefix}button-fg, var(--#{sys.$prefix}color-fg-on-accent));
276
+ --_border: var(--#{sys.$prefix}button-border, var(--#{sys.$prefix}theme-#{$status}-base));
277
+
278
+ &:hover,
279
+ &:focus-visible,
280
+ &:is(:active, [aria-pressed="true"]) {
281
+ --_bg: var(--#{sys.$prefix}button-bg-interact, var(--#{sys.$prefix}theme-#{$status}-stronger));
282
+ --_fg: var(--#{sys.$prefix}button-fg-interact, var(--#{sys.$prefix}color-fg-on-accent));
283
+ --_border: var(--#{sys.$prefix}button-border-interact, var(--#{sys.$prefix}theme-#{$status}-stronger));
284
+ }
275
285
  }
276
286
  }
277
287
 
@@ -306,17 +316,19 @@ $_typography-lineHeight: var(--#{sys.$prefix}button-line-height, 1.4);
306
316
  }
307
317
  }
308
318
 
309
- &.is-style-outline.is-theme-danger {
310
- --_bg: var(--#{sys.$prefix}button-bg, transparent);
311
- --_fg: var(--#{sys.$prefix}button-fg, var(--#{sys.$prefix}theme-danger-strong));
312
- --_border: var(--#{sys.$prefix}button-border, var(--#{sys.$prefix}theme-danger-base));
313
-
314
- &:hover,
315
- &:focus-visible,
316
- &:is(:active, [aria-pressed="true"]) {
317
- --_bg: var(--#{sys.$prefix}button-bg-interact, var(--#{sys.$prefix}theme-danger-base));
318
- --_fg: var(--#{sys.$prefix}button-fg-interact, var(--#{sys.$prefix}color-fg-on-accent));
319
- --_border: var(--#{sys.$prefix}button-border-interact, var(--#{sys.$prefix}theme-danger-base));
319
+ @each $status in (danger, success, warning, info) {
320
+ &.is-style-outline.is-theme-#{$status} {
321
+ --_bg: var(--#{sys.$prefix}button-bg, transparent);
322
+ --_fg: var(--#{sys.$prefix}button-fg, var(--#{sys.$prefix}theme-#{$status}-strong));
323
+ --_border: var(--#{sys.$prefix}button-border, var(--#{sys.$prefix}theme-#{$status}-base));
324
+
325
+ &:hover,
326
+ &:focus-visible,
327
+ &:is(:active, [aria-pressed="true"]) {
328
+ --_bg: var(--#{sys.$prefix}button-bg-interact, var(--#{sys.$prefix}theme-#{$status}-base));
329
+ --_fg: var(--#{sys.$prefix}button-fg-interact, var(--#{sys.$prefix}color-fg-on-accent));
330
+ --_border: var(--#{sys.$prefix}button-border-interact, var(--#{sys.$prefix}theme-#{$status}-base));
331
+ }
320
332
  }
321
333
  }
322
334
 
@@ -346,14 +358,16 @@ $_typography-lineHeight: var(--#{sys.$prefix}button-line-height, 1.4);
346
358
  }
347
359
  }
348
360
 
349
- &.is-style-ghost.is-theme-danger {
350
- --_fg: var(--#{sys.$prefix}button-fg, var(--#{sys.$prefix}theme-danger-strong));
361
+ @each $status in (danger, success, warning, info) {
362
+ &.is-style-ghost.is-theme-#{$status} {
363
+ --_fg: var(--#{sys.$prefix}button-fg, var(--#{sys.$prefix}theme-#{$status}-strong));
351
364
 
352
- &:hover,
353
- &:focus-visible,
354
- &:is(:active, [aria-pressed="true"]) {
355
- --_bg: var(--#{sys.$prefix}button-bg-interact, var(--#{sys.$prefix}theme-danger-subtlest));
356
- --_fg: var(--#{sys.$prefix}button-fg-interact, var(--#{sys.$prefix}theme-danger-stronger));
365
+ &:hover,
366
+ &:focus-visible,
367
+ &:is(:active, [aria-pressed="true"]) {
368
+ --_bg: var(--#{sys.$prefix}button-bg-interact, var(--#{sys.$prefix}theme-#{$status}-subtlest));
369
+ --_fg: var(--#{sys.$prefix}button-fg-interact, var(--#{sys.$prefix}theme-#{$status}-stronger));
370
+ }
357
371
  }
358
372
  }
359
373
 
@@ -385,13 +399,15 @@ $_typography-lineHeight: var(--#{sys.$prefix}button-line-height, 1.4);
385
399
  }
386
400
  }
387
401
 
388
- &.is-style-link.is-theme-danger {
389
- --_fg: var(--#{sys.$prefix}button-fg, var(--#{sys.$prefix}theme-danger-strong));
402
+ @each $status in (danger, success, warning, info) {
403
+ &.is-style-link.is-theme-#{$status} {
404
+ --_fg: var(--#{sys.$prefix}button-fg, var(--#{sys.$prefix}theme-#{$status}-strong));
390
405
 
391
- &:hover,
392
- &:focus-visible,
393
- &:is(:active, [aria-pressed="true"]) {
394
- --_fg: var(--#{sys.$prefix}button-fg-interact, var(--#{sys.$prefix}theme-danger-strongest));
406
+ &:hover,
407
+ &:focus-visible,
408
+ &:is(:active, [aria-pressed="true"]) {
409
+ --_fg: var(--#{sys.$prefix}button-fg-interact, var(--#{sys.$prefix}theme-#{$status}-strongest));
410
+ }
395
411
  }
396
412
  }
397
413
  }
@@ -35,7 +35,7 @@
35
35
 
36
36
  :where(.#{sys.$prefix}interface) .#{sys.$prefix}card {
37
37
  // Internal tokens — read component API with fallback to primitives
38
- --_bg: var(--#{sys.$prefix}card-bg, var(--#{sys.$prefix}color-bg-surface));
38
+ --_bg: var(--#{sys.$prefix}card-bg, var(--#{sys.$prefix}color-bg));
39
39
  --_border: var(--#{sys.$prefix}card-border, var(--#{sys.$prefix}color-border));
40
40
  --_border-width: var(--#{sys.$prefix}card-border-width, var(--#{sys.$prefix}border-width));
41
41
  --_border-interact: var(--#{sys.$prefix}card-border-interact, var(--#{sys.$prefix}theme-primary-base));
@@ -123,29 +123,103 @@
123
123
  // -------------------------------------------------------------------------
124
124
  // Icon slot — opt-in panel treatment for leftIcon
125
125
  // -------------------------------------------------------------------------
126
- // Wrap a chip's leftIcon in a span with class `tui-chip__icon-slot` to give
127
- // it its own background fill, a vertical separator from the text, and pull
128
- // it flush to the chip's left edge. Used for utility chips (timers, meters)
129
- // where the icon reads as a discrete affordance, not just decoration.
126
+ // Wrap a chip's leftIcon or rightIcon in a span with class
127
+ // `tui-chip__icon-slot` to give it its own background fill, a vertical
128
+ // separator from the text, and pull it flush to the chip's edge. Used
129
+ // for utility chips (timers, meters) where the icon reads as a discrete
130
+ // affordance, not just decoration. The bleed direction follows the
131
+ // slot's position: first child bleeds left, last child bleeds right —
132
+ // previously the left bleed applied regardless of position, dragging a
133
+ // rightIcon slot backwards over the label's last character.
130
134
 
131
135
  .#{sys.$prefix}chip__icon-slot {
132
136
  align-self: stretch;
133
137
  display: inline-flex;
134
138
  align-items: center;
135
139
  justify-content: center;
136
- // Pull flush through the chip's own padding.
137
- margin-inline-start: calc(-1 * #{$_spacing-inline});
138
140
  margin-block: calc(-1 * #{$_spacing-block});
139
- margin-inline-end: calc(#{$_spacing-inline} - #{$_spacing-within});
140
141
  padding-inline: 0.4em;
141
142
  // Defaults: surface (white in light mode) panel with a darker icon —
142
143
  // a subtle "lighter than the chip body" treatment that reads well on
143
144
  // the secondary-subtle default chip background.
144
145
  background-color: var(--#{sys.$prefix}chip-icon-slot-bg, var(--#{sys.$prefix}color-bg-surface));
145
146
  color: var(--#{sys.$prefix}chip-icon-slot-fg, var(--#{sys.$prefix}color-fg));
146
- border-inline-end: var(--#{sys.$prefix}border-width) solid var(--_border);
147
- border-start-start-radius: calc(var(--_radius) - var(--#{sys.$prefix}border-width));
148
- border-end-start-radius: calc(var(--_radius) - var(--#{sys.$prefix}border-width));
147
+
148
+ // Leading slot (leftIcon): pull flush through the chip's start padding.
149
+ &:first-child {
150
+ margin-inline-start: calc(-1 * #{$_spacing-inline});
151
+ margin-inline-end: calc(#{$_spacing-inline} - #{$_spacing-within});
152
+ border-inline-end: var(--#{sys.$prefix}border-width) solid var(--_border);
153
+ border-start-start-radius: calc(var(--_radius) - var(--#{sys.$prefix}border-width));
154
+ border-end-start-radius: calc(var(--_radius) - var(--#{sys.$prefix}border-width));
155
+ }
156
+
157
+ // Trailing slot (rightIcon): mirrored bleed. An only-child slot takes
158
+ // the leading treatment.
159
+ &:last-child:not(:first-child) {
160
+ margin-inline-end: calc(-1 * #{$_spacing-inline});
161
+ margin-inline-start: calc(#{$_spacing-inline} - #{$_spacing-within});
162
+ border-inline-start: var(--#{sys.$prefix}border-width) solid var(--_border);
163
+ border-start-end-radius: calc(var(--_radius) - var(--#{sys.$prefix}border-width));
164
+ border-end-end-radius: calc(var(--_radius) - var(--#{sys.$prefix}border-width));
165
+ }
166
+ }
167
+
168
+ // -------------------------------------------------------------------------
169
+ // Remove button — trailing dismiss affordance (token/tag pattern)
170
+ // -------------------------------------------------------------------------
171
+ // Rendered when `onRemove` is set: a real <button> nested in a display-only
172
+ // chip (the only focusable target). Sized in em so it tracks the chip text
173
+ // and is pulled toward the chip's end edge. The × glyph is held at ~1em
174
+ // (below the chip's 1.25em icon scale) so the button never drives the chip
175
+ // taller than its text — the padding keeps the tap target comfortable.
176
+ .#{sys.$prefix}chip__remove {
177
+ display: inline-flex;
178
+ align-items: center;
179
+ justify-content: center;
180
+ flex: none;
181
+ // The chip's own `gap` already spaces children; pull back so the × sits
182
+ // close to the label instead of doubling that gap.
183
+ margin-inline-start: calc(0.125em - #{$_spacing-within});
184
+ margin-inline-end: -0.1875em;
185
+ padding: 0.1875em;
186
+ border: 0;
187
+ border-radius: var(--#{sys.$prefix}radius-full, 999px);
188
+ background: transparent;
189
+ color: inherit;
190
+ cursor: pointer;
191
+ opacity: 0.65;
192
+ line-height: 0;
193
+ transition-duration: var(--#{sys.$prefix}motion-duration);
194
+ transition-timing-function: var(--#{sys.$prefix}motion-timing);
195
+ transition-property: opacity, outline-color;
196
+
197
+ // Hold the glyph at text height so it doesn't inflate the chip.
198
+ .#{sys.$prefix}icon,
199
+ .#{sys.$prefix}icon[class*="is-size-"] {
200
+ font-size: 0.9375em;
201
+ }
202
+
203
+ @media (hover: hover) {
204
+ &:hover { opacity: 1; }
205
+ }
206
+
207
+ &:focus-visible {
208
+ opacity: 1;
209
+ outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
210
+ outline-offset: var(--#{sys.$prefix}focus-ring-offset);
211
+ }
212
+
213
+ &:disabled {
214
+ cursor: not-allowed;
215
+ opacity: var(--#{sys.$prefix}opacity-disabled);
216
+ }
217
+ }
218
+
219
+ // A chip carrying a remove button trims its trailing padding so the button
220
+ // sits flush without a gap swallowing the chip's end.
221
+ &.has-remove {
222
+ padding-inline-end: calc(#{$_spacing-inline} - 0.125em);
149
223
  }
150
224
 
151
225
 
@@ -14,6 +14,7 @@
14
14
  --tui-combobox-option-radius
15
15
  --tui-combobox-option-bg-hover
16
16
  --tui-combobox-option-bg-selected
17
+ --tui-combobox-option-gap
17
18
  */
18
19
 
19
20
  // Structural SCSS constants (compile away, not overridable)
@@ -151,7 +152,7 @@ $_label-letter-spacing: 0.05em;
151
152
 
152
153
  &:hover {
153
154
  color: var(--#{sys.$prefix}color-fg);
154
- background-color: var(--#{sys.$prefix}theme-secondary-subtlest);
155
+ background-color: var(--#{sys.$prefix}color-fill-subtle);
155
156
  }
156
157
 
157
158
  &:focus-visible {
@@ -244,7 +245,7 @@ $_label-letter-spacing: 0.05em;
244
245
  :where(.#{sys.$prefix}interface) .#{sys.$prefix}combobox__option {
245
246
  // Internal tokens with fallbacks to Select tokens
246
247
  --_option-radius: var(--#{sys.$prefix}combobox-option-radius, var(--#{sys.$prefix}select-option-radius, var(--#{sys.$prefix}radius-sm)));
247
- --_bg-hover: var(--#{sys.$prefix}combobox-option-bg-hover, var(--#{sys.$prefix}select-option-bg-hover, var(--#{sys.$prefix}theme-secondary-subtlest)));
248
+ --_bg-hover: var(--#{sys.$prefix}combobox-option-bg-hover, var(--#{sys.$prefix}select-option-bg-hover, var(--#{sys.$prefix}color-fill-subtle)));
248
249
  --_bg-selected: var(--#{sys.$prefix}combobox-option-bg-selected, var(--#{sys.$prefix}select-option-bg-selected, var(--#{sys.$prefix}theme-primary-subtlest)));
249
250
 
250
251
  // Layout
@@ -260,6 +261,15 @@ $_label-letter-spacing: 0.05em;
260
261
  font-size: var(--#{sys.$prefix}typography-size-sm);
261
262
  line-height: 1.4;
262
263
 
264
+ transition: background-color var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
265
+
266
+ // Rounded boxes shouldn't abut — a hairline of air between options.
267
+ // (Not `& + &`: sass expands both ampersands to the full compound
268
+ // selector, and the :where() prefix ends up mid-combinator — dead rule.)
269
+ & + .#{sys.$prefix}combobox__option {
270
+ margin-block-start: var(--#{sys.$prefix}combobox-option-gap, var(--#{sys.$prefix}select-option-gap, 2px));
271
+ }
272
+
263
273
  &:hover:not([data-disabled]),
264
274
  &[data-highlighted]:not([data-disabled]) {
265
275
  background-color: var(--_bg-hover);
@@ -336,6 +346,10 @@ $_label-letter-spacing: 0.05em;
336
346
  :where(.#{sys.$prefix}interface) .#{sys.$prefix}combobox__content {
337
347
  animation-duration: 0ms;
338
348
  }
349
+
350
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}combobox__option {
351
+ transition-duration: 0ms;
352
+ }
339
353
  }
340
354
 
341
355
  // ---------------------------------------------------------------------------