@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.
- package/components/Button/Button.js +6 -8
- package/components/Button/types.d.ts +5 -7
- package/components/Chip/Chip.d.ts +28 -0
- package/components/Chip/Chip.js +19 -3
- package/components/Combobox/Combobox.d.ts +1 -1
- package/components/Combobox/Combobox.js +2 -2
- package/components/Combobox/types.d.ts +13 -0
- package/components/DatePicker/Calendar.d.ts +12 -0
- package/components/DatePicker/Calendar.js +145 -0
- package/components/DatePicker/DatePicker.d.ts +23 -0
- package/components/DatePicker/DatePicker.js +123 -0
- package/components/DatePicker/DateRangePicker.d.ts +16 -0
- package/components/DatePicker/DateRangePicker.js +114 -0
- package/components/DatePicker/date-utils.d.ts +51 -0
- package/components/DatePicker/date-utils.js +228 -0
- package/components/DatePicker/index.d.ts +8 -0
- package/components/DatePicker/index.js +6 -0
- package/components/DatePicker/presets.d.ts +3 -0
- package/components/DatePicker/presets.js +37 -0
- package/components/DatePicker/types.d.ts +138 -0
- package/components/DatePicker/types.js +39 -0
- package/components/IconButton/types.d.ts +2 -2
- package/components/MultiCombobox/MultiCombobox.d.ts +33 -0
- package/components/MultiCombobox/MultiCombobox.js +595 -0
- package/components/MultiCombobox/MultiComboboxContext.d.ts +8 -0
- package/components/MultiCombobox/MultiComboboxContext.js +36 -0
- package/components/MultiCombobox/index.d.ts +3 -0
- package/components/MultiCombobox/index.js +2 -0
- package/components/MultiCombobox/types.d.ts +244 -0
- package/components/MultiCombobox/types.js +7 -0
- package/components/MultiSelect/MultiSelect.js +22 -2
- package/components/Popover/Popover.js +16 -2
- package/components/SegmentedControl/types.d.ts +2 -2
- package/components/Select/Select.js +14 -0
- package/components/Slider/Slider.d.ts +2 -0
- package/components/Slider/Slider.js +29 -0
- package/components/Slider/index.d.ts +2 -0
- package/components/Slider/index.js +1 -0
- package/components/Slider/types.d.ts +39 -0
- package/components/Slider/types.js +1 -0
- package/components/index.d.ts +4 -0
- package/components/index.js +3 -0
- package/package.json +13 -1
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +1181 -187
- package/styles/all.expanded.unlayered.css +1181 -187
- package/styles/all.unlayered.css +1 -1
- package/styles/components/_bundle.scss +6 -0
- package/styles/components/button.scss +59 -43
- package/styles/components/card.scss +1 -1
- package/styles/components/chip.scss +84 -10
- package/styles/components/combobox.scss +16 -2
- package/styles/components/date-picker.scss +400 -0
- package/styles/components/icon-button.scss +36 -30
- package/styles/components/input/index.scss +1 -2
- package/styles/components/multi-combobox.scss +457 -0
- package/styles/components/multi-select.scss +34 -18
- package/styles/components/notice.scss +15 -6
- package/styles/components/pager.scss +4 -2
- package/styles/components/popover.scss +6 -0
- package/styles/components/progress.scss +23 -6
- package/styles/components/segmented-control.scss +53 -15
- package/styles/components/select.scss +19 -3
- package/styles/components/slider.scss +184 -0
- package/styles/components/switch.scss +1 -1
- package/styles/core.css +1 -1
- package/styles/core.unlayered.css +1 -1
- package/styles/system/_control.scss +9 -8
- package/styles/system/_tokens.scss +16 -0
- package/tui-manifest.json +311 -14
- package/utils/portal.d.ts +0 -4
- 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
|
-
|
|
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
|
|
238
|
-
//
|
|
239
|
-
//
|
|
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:
|
|
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
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
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
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
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
|
-
|
|
350
|
-
|
|
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
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
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
|
-
|
|
389
|
-
|
|
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
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
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
|
|
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
|
|
127
|
-
// it its own background fill, a vertical
|
|
128
|
-
// it flush to the chip's
|
|
129
|
-
// where the icon reads as a discrete
|
|
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
|
-
|
|
147
|
-
|
|
148
|
-
|
|
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}
|
|
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}
|
|
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
|
// ---------------------------------------------------------------------------
|