@tangible/ui 0.2.10 → 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.
- package/README.md +35 -22
- package/components/Accordion/Accordion.js +2 -2
- package/components/Combobox/Combobox.js +37 -5
- package/components/Combobox/types.d.ts +6 -0
- package/components/DatePicker/DatePicker.d.ts +3 -0
- package/components/DatePicker/DatePicker.js +8 -2
- package/components/DatePicker/DateRangePicker.d.ts +3 -0
- package/components/DatePicker/DateRangePicker.js +8 -2
- package/components/DatePicker/types.d.ts +36 -0
- package/components/Dropdown/Dropdown.js +2 -1
- package/components/MultiCombobox/MultiCombobox.js +1 -1
- package/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/components/MultiSelect/MultiSelect.js +29 -5
- package/components/MultiSelect/types.d.ts +13 -0
- package/components/Pager/Pager.d.ts +65 -1
- package/components/Pager/Pager.js +83 -10
- package/components/Pager/index.d.ts +1 -1
- package/components/Pager/types.d.ts +39 -0
- package/components/Pager/types.js +6 -0
- package/components/Popover/Popover.js +2 -1
- package/components/SearchSelect/SearchSelect.d.ts +1 -1
- package/components/SearchSelect/SearchSelect.js +3 -5
- package/components/SearchSelect/types.d.ts +0 -2
- package/components/Select/Select.d.ts +1 -1
- package/components/Select/Select.js +29 -5
- package/components/Select/types.d.ts +13 -0
- package/components/Table/DataTable.d.ts +49 -3
- package/components/Table/DataTable.js +83 -4
- package/components/Textarea/Textarea.js +7 -0
- package/components/Tooltip/Tooltip.js +2 -1
- package/components/index.d.ts +2 -2
- package/components/index.js +1 -1
- package/figma-tokens.json +4018 -0
- package/icons/icons.svg +12 -2
- package/icons/lms/index.d.ts +12 -0
- package/icons/lms/index.js +83 -17
- package/icons/manifest.json +80 -0
- package/icons/membersync/index.js +9 -9
- package/icons/player/index.js +4 -4
- package/icons/reaction/index.js +4 -4
- package/icons/registry.d.ts +20 -0
- package/icons/registry.js +10 -0
- package/icons/system/index.d.ts +8 -0
- package/icons/system/index.js +65 -21
- package/package.json +5 -1
- package/skills/building-with-tui/SKILL.md +328 -0
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +160 -269
- package/styles/all.expanded.unlayered.css +160 -269
- package/styles/all.unlayered.css +1 -1
- package/styles/components/color-picker.scss +16 -3
- package/styles/components/combobox.scss +33 -58
- package/styles/components/date-picker.scss +18 -10
- package/styles/components/dropdown.scss +12 -7
- package/styles/components/gradient-picker.scss +4 -4
- package/styles/components/multi-combobox.scss +17 -37
- package/styles/components/multi-select.scss +14 -50
- package/styles/components/pager.scss +155 -17
- package/styles/components/progress.scss +1 -1
- package/styles/components/radio.scss +37 -0
- package/styles/components/search-select.scss +16 -38
- package/styles/components/segmented-control.scss +1 -1
- package/styles/components/select.scss +22 -51
- package/styles/components/sidebar.scss +8 -3
- package/styles/components/slider.scss +1 -1
- package/styles/components/table.scss +3 -1
- package/styles/components/tabs.scss +1 -1
- package/styles/components/text-input.scss +79 -21
- package/styles/core.css +1 -1
- package/styles/core.unlayered.css +1 -1
- package/styles/system/_constants.scss +7 -1
- package/styles/system/_tokens.scss +2 -2
- package/tui-manifest.json +144 -6
- package/utils/compose-refs.d.ts +29 -3
- package/utils/compose-refs.js +51 -12
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
/* @tui-tokens
|
|
4
4
|
--tui-pager-gap
|
|
5
|
+
--tui-pager-nav-gap
|
|
6
|
+
--tui-pager-item-border
|
|
7
|
+
--tui-pager-item-radius
|
|
8
|
+
--tui-pager-jump-width
|
|
5
9
|
*/
|
|
6
10
|
|
|
7
11
|
@mixin styles() {
|
|
@@ -12,11 +16,23 @@
|
|
|
12
16
|
// Generic pagination control. Used standalone or wrapped by TablePagination.
|
|
13
17
|
//
|
|
14
18
|
// Component API tokens (never defined here, only read via fallback):
|
|
15
|
-
// --tui-pager-gap
|
|
19
|
+
// --tui-pager-gap Gap between nav and info sections
|
|
20
|
+
// --tui-pager-nav-gap Gap between nav segments (0 in the flush variant)
|
|
21
|
+
// --tui-pager-item-border Segment border, bridged onto --tui-button-border
|
|
22
|
+
// --tui-pager-item-radius Segment radius in detached, and in flush once
|
|
23
|
+
// the container is too narrow to stay connected
|
|
24
|
+
// --tui-pager-jump-width Width of the go-to-page field
|
|
16
25
|
//
|
|
17
26
|
// ==========================================================================
|
|
18
27
|
|
|
19
28
|
.#{sys.$prefix}pager {
|
|
29
|
+
// Container for the narrow-width block at the bottom of this file. Also
|
|
30
|
+
// has a useful side effect in Storybook, whose preview.css pins every story
|
|
31
|
+
// wrapper to `min-width: max-content`: under inline-size containment
|
|
32
|
+
// `max-content` resolves as though the element had no content, so the pin
|
|
33
|
+
// stops fighting the layout and the Pager can actually be QA'd narrow.
|
|
34
|
+
container-type: inline-size;
|
|
35
|
+
container-name: tuiPager;
|
|
20
36
|
display: flex;
|
|
21
37
|
flex-wrap: wrap;
|
|
22
38
|
align-items: center;
|
|
@@ -24,11 +40,26 @@
|
|
|
24
40
|
gap: var(--#{sys.$prefix}pager-gap, var(--#{sys.$prefix}spacing-md));
|
|
25
41
|
padding-block: var(--#{sys.$prefix}spacing-md);
|
|
26
42
|
|
|
27
|
-
// Connected button group for nav items
|
|
28
43
|
&__nav {
|
|
29
44
|
display: flex;
|
|
45
|
+
// Unconditional, not gated on the container query below: the nav's width
|
|
46
|
+
// depends on `mode`, `maxNumbers`, `showFirstLast` and `size`, so no
|
|
47
|
+
// threshold can promise it fits. `mode="full"` at 30 pages is wider than
|
|
48
|
+
// any sane breakpoint. Wrapping costs nothing while it fits, and the
|
|
49
|
+
// alternative is the nav overflowing its container and taking the page's
|
|
50
|
+
// horizontal scroll with it (WCAG 2.1 SC 1.4.10 Reflow).
|
|
51
|
+
flex-wrap: wrap;
|
|
30
52
|
align-items: center;
|
|
31
|
-
|
|
53
|
+
// The nav pushes everything else to the far end, rather than each
|
|
54
|
+
// trailing region claiming the space itself. With two auto margins the
|
|
55
|
+
// free space would split between them and strand the info region in the
|
|
56
|
+
// middle, so this has to live here — and it keeps working whichever of
|
|
57
|
+
// info / jump actually render.
|
|
58
|
+
margin-inline-end: auto;
|
|
59
|
+
// Base carries the gap and `.is-variant-flush` zeroes it, mirroring
|
|
60
|
+
// Accordion (whose base gap is likewise cancelled by its flush variant).
|
|
61
|
+
// Pager defaults to flush, so a stock Pager still renders at gap 0.
|
|
62
|
+
gap: var(--#{sys.$prefix}pager-nav-gap, var(--#{sys.$prefix}spacing-sm));
|
|
32
63
|
.#{sys.$prefix}pager__item,
|
|
33
64
|
.#{sys.$prefix}pager__ellipsis {
|
|
34
65
|
// Token Bridging: pager items are Button consumers — the connected
|
|
@@ -36,24 +67,20 @@
|
|
|
36
67
|
// fighting its internals with !important. Theme via
|
|
37
68
|
// --tui-pager-item-border.
|
|
38
69
|
--#{sys.$prefix}button-border: var(--#{sys.$prefix}pager-item-border, var(--#{sys.$prefix}color-border));
|
|
39
|
-
|
|
70
|
+
// Setting the token is the whole mechanism — do NOT also declare
|
|
71
|
+
// border-color here. Button's own `border-color: var(--_border)
|
|
72
|
+
// !important` (it defeats WordPress) beats any plain declaration, so
|
|
73
|
+
// such a line is inert for the items; and were the !important ever
|
|
74
|
+
// dropped, it would start overriding the ghost variant's
|
|
75
|
+
// `--_border: transparent` and put a visible border back on the
|
|
76
|
+
// detached prev/next. The ellipsis sets its own border shorthand below.
|
|
40
77
|
// Compact page-number width. Font-size and height come from the shared
|
|
41
78
|
// control ladder — Button's own control-sizing for the items, and the
|
|
42
79
|
// control-sizing mixin for the ellipsis below — so the whole nav scales
|
|
43
80
|
// with `size` and honours a context's --tui-control-height-* override.
|
|
81
|
+
// Kept in BOTH variants: it is what makes numbers read as numbers
|
|
82
|
+
// rather than as buttons with words in them.
|
|
44
83
|
padding-inline: 0.85em;
|
|
45
|
-
|
|
46
|
-
// Connected button group: remove inner radii
|
|
47
|
-
&:not(:first-child) {
|
|
48
|
-
border-start-start-radius: 0;
|
|
49
|
-
border-end-start-radius: 0;
|
|
50
|
-
border-inline-start-width: 0;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&:not(:last-child) {
|
|
54
|
-
border-start-end-radius: 0;
|
|
55
|
-
border-end-end-radius: 0;
|
|
56
|
-
}
|
|
57
84
|
}
|
|
58
85
|
|
|
59
86
|
// Ellipsis: non-interactive, styled to match outline buttons. It's a plain
|
|
@@ -81,7 +108,20 @@
|
|
|
81
108
|
display: flex;
|
|
82
109
|
align-items: center;
|
|
83
110
|
gap: var(--#{sys.$prefix}spacing-sm);
|
|
84
|
-
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Go-to-page field (showJump)
|
|
114
|
+
&__jump {
|
|
115
|
+
display: flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
gap: var(--#{sys.$prefix}spacing-xs);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&__jump-input {
|
|
121
|
+
// An <input> left to its intrinsic width takes ~180px and shoves the
|
|
122
|
+
// rest of the row around. A page number needs a few digits and the
|
|
123
|
+
// spinners; anything wider is just a large empty box.
|
|
124
|
+
inline-size: var(--#{sys.$prefix}pager-jump-width, 4rem);
|
|
85
125
|
}
|
|
86
126
|
|
|
87
127
|
// Page size selector label
|
|
@@ -91,4 +131,102 @@
|
|
|
91
131
|
gap: var(--#{sys.$prefix}spacing-xs);
|
|
92
132
|
}
|
|
93
133
|
}
|
|
134
|
+
|
|
135
|
+
// ---------------------------------------------------------------------------
|
|
136
|
+
// Variant: flush (connected group — shared borders, squared inner corners)
|
|
137
|
+
// ---------------------------------------------------------------------------
|
|
138
|
+
//
|
|
139
|
+
// The default, and what Pager has always rendered. Everything variant-specific
|
|
140
|
+
// lives here rather than in the base block, so `detached` is the absence of
|
|
141
|
+
// these rules rather than a pile of resets undoing them.
|
|
142
|
+
//
|
|
143
|
+
:where(.#{sys.$prefix}interface) .#{sys.$prefix}pager.is-variant-flush {
|
|
144
|
+
.#{sys.$prefix}pager__nav {
|
|
145
|
+
gap: 0;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.#{sys.$prefix}pager__item,
|
|
149
|
+
.#{sys.$prefix}pager__ellipsis {
|
|
150
|
+
// NOTE: keyed on actual position, not on "is prev / is next". Prev and
|
|
151
|
+
// next happen to be the end segments today, but showFirstLast will put
|
|
152
|
+
// buttons outside them — at which point a rule written as "prev squares
|
|
153
|
+
// its trailing corners" would be wrong and this one stays correct.
|
|
154
|
+
&:not(:first-child) {
|
|
155
|
+
border-start-start-radius: 0;
|
|
156
|
+
border-end-start-radius: 0;
|
|
157
|
+
border-inline-start-width: 0;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&:not(:last-child) {
|
|
161
|
+
border-start-end-radius: 0;
|
|
162
|
+
border-end-end-radius: 0;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// ---------------------------------------------------------------------------
|
|
168
|
+
// Variant: detached (separate buttons, spaced, full radius)
|
|
169
|
+
// ---------------------------------------------------------------------------
|
|
170
|
+
//
|
|
171
|
+
// Segments keep all four borders and their full radius. Prev/next carry no
|
|
172
|
+
// border or fill at all — the component renders them as ghost Buttons /
|
|
173
|
+
// IconButtons, so nothing here needs to strip anything.
|
|
174
|
+
//
|
|
175
|
+
:where(.#{sys.$prefix}interface) .#{sys.$prefix}pager.is-variant-detached {
|
|
176
|
+
.#{sys.$prefix}pager__item,
|
|
177
|
+
.#{sys.$prefix}pager__ellipsis {
|
|
178
|
+
// Covers the ellipsis too, which otherwise keeps its own radius-sm from
|
|
179
|
+
// the base block — (0,3,0) here against that rule's (0,2,0), so no
|
|
180
|
+
// separate override is needed.
|
|
181
|
+
border-radius: var(--#{sys.$prefix}pager-item-radius, var(--#{sys.$prefix}radius-md));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// ---------------------------------------------------------------------------
|
|
186
|
+
// Narrow containers: flush stops pretending to be a connected group
|
|
187
|
+
// ---------------------------------------------------------------------------
|
|
188
|
+
//
|
|
189
|
+
// A connected group cannot wrap and still look like one. The collapse rules
|
|
190
|
+
// key off `:first-child`/`:last-child`, and CSS cannot identify the first item
|
|
191
|
+
// of a *wrapped row* — so a second row opens with a borderless, square-cornered
|
|
192
|
+
// box that reads as broken (measured, not assumed: see the wrap screenshots in
|
|
193
|
+
// the PR). Below the threshold the flush variant therefore adopts the detached
|
|
194
|
+
// presentation, which wraps correctly by construction.
|
|
195
|
+
//
|
|
196
|
+
// 32rem is a design line, not a derived number — it is roughly where a
|
|
197
|
+
// horizontal row of controls stops being the right shape — so it deliberately
|
|
198
|
+
// degrades a *narrow* pager (a plain smart nav is ~380px) slightly before it
|
|
199
|
+
// would strictly have to. Pills are a legitimate look at that width, and the
|
|
200
|
+
// rules sit at the same specificity as the flush block so a consumer can
|
|
201
|
+
// override the call.
|
|
202
|
+
//
|
|
203
|
+
// These match the flush block's selectors exactly and win on source order.
|
|
204
|
+
//
|
|
205
|
+
@container tuiPager (width < 32rem) {
|
|
206
|
+
:where(.#{sys.$prefix}interface) .#{sys.$prefix}pager.is-variant-flush {
|
|
207
|
+
.#{sys.$prefix}pager__nav {
|
|
208
|
+
gap: var(--#{sys.$prefix}pager-nav-gap, var(--#{sys.$prefix}spacing-sm));
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// The `:not()` pseudo-classes are mirrored from the flush block rather
|
|
212
|
+
// than simplified away: `:not(:first-child)` puts those rules at (0,4,0),
|
|
213
|
+
// so a tidier (0,3,0) selector here would silently lose. Same specificity,
|
|
214
|
+
// later in the file, no !important.
|
|
215
|
+
.#{sys.$prefix}pager__item,
|
|
216
|
+
.#{sys.$prefix}pager__ellipsis {
|
|
217
|
+
$_r: var(--#{sys.$prefix}pager-item-radius, var(--#{sys.$prefix}radius-md));
|
|
218
|
+
|
|
219
|
+
&:not(:first-child) {
|
|
220
|
+
border-start-start-radius: #{$_r};
|
|
221
|
+
border-end-start-radius: #{$_r};
|
|
222
|
+
border-inline-start-width: var(--#{sys.$prefix}border-width);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
&:not(:last-child) {
|
|
226
|
+
border-start-end-radius: #{$_r};
|
|
227
|
+
border-end-end-radius: #{$_r};
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
94
232
|
}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}progress {
|
|
58
58
|
// Internal tokens — read component API with fallback to primitives
|
|
59
|
-
--_track: var(--#{sys.$prefix}progress-track, var(--#{sys.$prefix}color-
|
|
59
|
+
--_track: var(--#{sys.$prefix}progress-track, var(--#{sys.$prefix}color-fill));
|
|
60
60
|
--_fill: var(--#{sys.$prefix}progress-fill, var(--#{sys.$prefix}theme-primary-base));
|
|
61
61
|
--_label: var(--#{sys.$prefix}progress-label, var(--#{sys.$prefix}color-fg));
|
|
62
62
|
--_radius: var(--#{sys.$prefix}progress-radius, var(--#{sys.$prefix}radius-full));
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
--tui-radio-accent
|
|
5
5
|
--tui-radio-size
|
|
6
6
|
--tui-radio-border
|
|
7
|
+
--tui-radio-border-invalid
|
|
7
8
|
--tui-radio-bg
|
|
8
9
|
--tui-radio-gap
|
|
9
10
|
--tui-radio-font-size
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
// --tui-radio-accent Accent color for selected state
|
|
22
23
|
// --tui-radio-size Indicator size (falls back to 1.15em)
|
|
23
24
|
// --tui-radio-border Indicator border color (unchecked)
|
|
25
|
+
// --tui-radio-border-invalid Indicator border color when the group is invalid
|
|
24
26
|
// --tui-radio-bg Indicator background color
|
|
25
27
|
// --tui-radio-gap Gap between indicator and label
|
|
26
28
|
// --tui-radio-font-size Font size for label + description base
|
|
@@ -161,6 +163,29 @@
|
|
|
161
163
|
}
|
|
162
164
|
}
|
|
163
165
|
|
|
166
|
+
// ---------------------------------------------------------------------------
|
|
167
|
+
// Invalid — every indicator in the group tints, selected one included
|
|
168
|
+
// ---------------------------------------------------------------------------
|
|
169
|
+
//
|
|
170
|
+
// aria-invalid lives on the GROUP (role="radiogroup" carries it, per
|
|
171
|
+
// RadioGroup.tsx), not on each radio, so this is a descendant rule rather
|
|
172
|
+
// than the `&[aria-invalid="true"]` self-selector Checkbox and Switch use.
|
|
173
|
+
// Spelled out top-level instead of nested with a trailing `&` — see the Sass
|
|
174
|
+
// parent-splice gotcha in CLAUDE.md, which would put the attribute selector
|
|
175
|
+
// ABOVE .tui-interface and silently match nothing.
|
|
176
|
+
//
|
|
177
|
+
// Specificity is deliberate at (0,6,0): it has to out-weigh the hover rule
|
|
178
|
+
// (0,5,0) and the checked rule (0,4,0), both of which set border-color on the
|
|
179
|
+
// indicator directly. Winning on source order alone would be fragile, so the
|
|
180
|
+
// full ancestor chain is named rather than relying on file order.
|
|
181
|
+
//
|
|
182
|
+
// Only the border tints. The dot keeps --_accent so the selection stays
|
|
183
|
+
// readable — same call Switch makes for its track, and the reason "tint all
|
|
184
|
+
// borders" doesn't cost you the answer to "which one did I pick?".
|
|
185
|
+
.#{sys.$prefix}interface .#{sys.$prefix}radio-group[aria-invalid="true"] .#{sys.$prefix}radio .#{sys.$prefix}radio__control .#{sys.$prefix}radio__indicator {
|
|
186
|
+
border-color: var(--#{sys.$prefix}radio-border-invalid, var(--#{sys.$prefix}theme-danger-base));
|
|
187
|
+
}
|
|
188
|
+
|
|
164
189
|
// ---------------------------------------------------------------------------
|
|
165
190
|
// Radio label
|
|
166
191
|
// ---------------------------------------------------------------------------
|
|
@@ -255,5 +280,17 @@
|
|
|
255
280
|
background-color: Highlight;
|
|
256
281
|
}
|
|
257
282
|
}
|
|
283
|
+
|
|
284
|
+
// The invalid tint is (0,6,0) and would otherwise outrank both rules above,
|
|
285
|
+
// painting a theme color into a forced-colors palette. Restore the system
|
|
286
|
+
// colors at matching weight. Invalid is conveyed by aria-invalid and the
|
|
287
|
+
// Field error text here, not by hue.
|
|
288
|
+
.#{sys.$prefix}interface .#{sys.$prefix}radio-group[aria-invalid="true"] .#{sys.$prefix}radio .#{sys.$prefix}radio__control .#{sys.$prefix}radio__indicator {
|
|
289
|
+
border-color: CanvasText;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.#{sys.$prefix}interface .#{sys.$prefix}radio-group[aria-invalid="true"] .#{sys.$prefix}radio:has(.#{sys.$prefix}radio__control[aria-checked="true"]) .#{sys.$prefix}radio__control .#{sys.$prefix}radio__indicator {
|
|
293
|
+
border-color: Highlight;
|
|
294
|
+
}
|
|
258
295
|
}
|
|
259
296
|
}
|
|
@@ -44,44 +44,22 @@
|
|
|
44
44
|
// Trigger — a select-shaped button
|
|
45
45
|
// ---------------------------------------------------------------------------
|
|
46
46
|
.#{sys.$prefix}interface .#{sys.$prefix}search-select__trigger {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
--
|
|
51
|
-
--
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
// Unified control sizing (height + font ladder)
|
|
58
|
-
@include sys.control-sizing(sys.$prefix);
|
|
59
|
-
|
|
60
|
-
display: inline-flex;
|
|
61
|
-
align-items: center;
|
|
47
|
+
// Chrome comes from .tui-input-group. The select-family chain stays in
|
|
48
|
+
// front of the shared input default, so a context that themes Select
|
|
49
|
+
// triggers still carries SearchSelect with it.
|
|
50
|
+
--_bg: var(--#{sys.$prefix}search-select-trigger-bg, var(--#{sys.$prefix}select-trigger-bg, var(--#{sys.$prefix}input-bg, var(--#{sys.$prefix}color-bg-surface))));
|
|
51
|
+
--_fg: var(--#{sys.$prefix}search-select-trigger-fg, var(--#{sys.$prefix}select-trigger-fg, var(--#{sys.$prefix}input-fg, var(--#{sys.$prefix}color-fg))));
|
|
52
|
+
--_border: var(--#{sys.$prefix}search-select-trigger-border, var(--#{sys.$prefix}select-trigger-border, var(--#{sys.$prefix}input-border, var(--#{sys.$prefix}color-border))));
|
|
53
|
+
--_border-focus: var(--#{sys.$prefix}search-select-trigger-border-focus, var(--#{sys.$prefix}select-trigger-border-focus, var(--#{sys.$prefix}input-border-focus, var(--#{sys.$prefix}theme-primary-base))));
|
|
54
|
+
--_radius: var(--#{sys.$prefix}search-select-trigger-radius, var(--#{sys.$prefix}select-trigger-radius, var(--#{sys.$prefix}input-radius, var(--#{sys.$prefix}radius-md))));
|
|
55
|
+
|
|
56
|
+
// Deltas from the primitive
|
|
62
57
|
justify-content: space-between;
|
|
63
|
-
gap: var(--#{sys.$prefix}spacing-xs);
|
|
64
58
|
width: 100%;
|
|
65
59
|
padding-inline: var(--#{sys.$prefix}spacing-sm);
|
|
66
|
-
text-align: start;
|
|
67
|
-
|
|
68
|
-
background-color: var(--_bg);
|
|
69
|
-
color: var(--_fg);
|
|
70
|
-
border: var(--#{sys.$prefix}border-width) solid var(--_border);
|
|
71
|
-
border-radius: var(--_radius);
|
|
72
60
|
cursor: pointer;
|
|
61
|
+
text-align: start;
|
|
73
62
|
transition: border-color var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
|
|
74
|
-
|
|
75
|
-
&:focus-visible {
|
|
76
|
-
border-color: var(--_border-focus);
|
|
77
|
-
outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
|
|
78
|
-
outline-offset: var(--#{sys.$prefix}focus-ring-offset);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&:disabled {
|
|
82
|
-
opacity: var(--#{sys.$prefix}opacity-disabled);
|
|
83
|
-
cursor: not-allowed;
|
|
84
|
-
}
|
|
85
63
|
}
|
|
86
64
|
|
|
87
65
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}search-select__value {
|
|
@@ -137,7 +115,7 @@
|
|
|
137
115
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}search-select__search {
|
|
138
116
|
flex-shrink: 0;
|
|
139
117
|
padding: var(--#{sys.$prefix}spacing-xs);
|
|
140
|
-
border-block-end: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}color-
|
|
118
|
+
border-block-end: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}color-divider);
|
|
141
119
|
}
|
|
142
120
|
|
|
143
121
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}search-select__listbox {
|
|
@@ -221,16 +199,16 @@
|
|
|
221
199
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}search-select__group + .#{sys.$prefix}search-select__group {
|
|
222
200
|
margin-block-start: var(--#{sys.$prefix}spacing-xxs);
|
|
223
201
|
padding-block-start: var(--#{sys.$prefix}spacing-xxs);
|
|
224
|
-
border-block-start: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}color-
|
|
202
|
+
border-block-start: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}color-divider);
|
|
225
203
|
}
|
|
226
204
|
|
|
227
205
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}search-select__label {
|
|
228
|
-
padding: var(--#{sys.$prefix}spacing-
|
|
206
|
+
padding: var(--#{sys.$prefix}spacing-xs) var(--#{sys.$prefix}spacing-sm);
|
|
229
207
|
color: var(--#{sys.$prefix}color-fg-muted);
|
|
230
208
|
font-size: var(--#{sys.$prefix}typography-size-xs);
|
|
231
|
-
font-weight: var(--#{sys.$prefix}typography-weight-
|
|
209
|
+
font-weight: var(--#{sys.$prefix}typography-weight-semibold, 600);
|
|
232
210
|
text-transform: uppercase;
|
|
233
|
-
letter-spacing:
|
|
211
|
+
letter-spacing: sys.$label-letter-spacing;
|
|
234
212
|
}
|
|
235
213
|
|
|
236
214
|
// High-contrast mode: keep highlighted/selected legible
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
--_padding: 0;
|
|
121
121
|
--_gap: var(--#{sys.$prefix}segmented-gap, #{$_underline-gap});
|
|
122
122
|
border-radius: 0;
|
|
123
|
-
border-block-end: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}color-
|
|
123
|
+
border-block-end: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}color-divider);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
// ---------------------------------------------------------------------------
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
// Structural SCSS constants (compile away, not overridable)
|
|
21
21
|
// $_min-width is the compile-time default for --tui-select-min-width.
|
|
22
22
|
$_min-width: 160px;
|
|
23
|
-
$_label-letter-spacing: 0.05em;
|
|
24
23
|
|
|
25
24
|
@mixin styles() {
|
|
26
25
|
// ==========================================================================
|
|
@@ -67,41 +66,31 @@ $_label-letter-spacing: 0.05em;
|
|
|
67
66
|
// Trigger
|
|
68
67
|
// ---------------------------------------------------------------------------
|
|
69
68
|
|
|
70
|
-
:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
//
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
//
|
|
89
|
-
|
|
90
|
-
align-items: center;
|
|
69
|
+
// The trigger wears .tui-input-group: bg, fg, border, focus border, radius,
|
|
70
|
+
// control sizing, the focus ring, and the open/disabled states all come from
|
|
71
|
+
// that primitive. What stays here is what genuinely differs from a text field.
|
|
72
|
+
//
|
|
73
|
+
// Full specificity (not :where) is required, not stylistic: the primitive's
|
|
74
|
+
// base rule is included LAST in the bundle, so a (0,1,0) selector here would
|
|
75
|
+
// tie with it and lose the token re-pointing below on source order.
|
|
76
|
+
.#{sys.$prefix}interface .#{sys.$prefix}select__trigger {
|
|
77
|
+
// Chain, don't replace: an existing --tui-select-trigger-* override still
|
|
78
|
+
// wins, and the shared --tui-input-* default moves in underneath it.
|
|
79
|
+
--_bg: var(--#{sys.$prefix}select-trigger-bg, var(--#{sys.$prefix}input-bg, var(--#{sys.$prefix}color-bg-surface)));
|
|
80
|
+
--_fg: var(--#{sys.$prefix}select-trigger-fg, var(--#{sys.$prefix}input-fg, var(--#{sys.$prefix}color-fg)));
|
|
81
|
+
--_border: var(--#{sys.$prefix}select-trigger-border, var(--#{sys.$prefix}input-border, var(--#{sys.$prefix}color-border)));
|
|
82
|
+
--_border-focus: var(--#{sys.$prefix}select-trigger-border-focus, var(--#{sys.$prefix}input-border-focus, var(--#{sys.$prefix}theme-primary-base)));
|
|
83
|
+
--_radius: var(--#{sys.$prefix}select-trigger-radius, var(--#{sys.$prefix}input-radius, var(--#{sys.$prefix}radius-md)));
|
|
84
|
+
--_min-width: var(--#{sys.$prefix}select-min-width, #{$_min-width});
|
|
85
|
+
|
|
86
|
+
// Deltas from the primitive: a value + chevron push apart, the box fills
|
|
87
|
+
// its container, roomier inline padding (12 vs the text field's 8 — see the
|
|
88
|
+
// padding-inline note in _control.scss), and it clicks rather than types.
|
|
91
89
|
justify-content: space-between;
|
|
92
|
-
gap: var(--#{sys.$prefix}spacing-xs);
|
|
93
90
|
min-width: var(--_min-width);
|
|
94
91
|
width: 100%;
|
|
95
92
|
padding-inline: var(--#{sys.$prefix}spacing-sm);
|
|
96
|
-
|
|
97
|
-
// Visual
|
|
98
|
-
background-color: var(--_bg);
|
|
99
|
-
color: var(--_fg);
|
|
100
|
-
border: var(--#{sys.$prefix}border-width) solid var(--_border);
|
|
101
|
-
border-radius: var(--_radius);
|
|
102
93
|
cursor: pointer;
|
|
103
|
-
|
|
104
|
-
// Typography
|
|
105
94
|
line-height: 1.4;
|
|
106
95
|
text-align: left;
|
|
107
96
|
|
|
@@ -109,24 +98,6 @@ $_label-letter-spacing: 0.05em;
|
|
|
109
98
|
transition-duration: var(--#{sys.$prefix}motion-duration);
|
|
110
99
|
transition-timing-function: var(--#{sys.$prefix}motion-timing);
|
|
111
100
|
transition-property: border-color, background-color;
|
|
112
|
-
|
|
113
|
-
// :focus, not :focus-visible — native selects show the ring on mouse
|
|
114
|
-
// focus too (form-control heuristic), and this button impersonates one
|
|
115
|
-
&:focus {
|
|
116
|
-
--_border: var(--_border-focus);
|
|
117
|
-
outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
|
|
118
|
-
outline-offset: var(--#{sys.$prefix}focus-ring-offset);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
&[data-state="open"] {
|
|
122
|
-
--_border: var(--_border-focus);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
&[data-disabled],
|
|
126
|
-
&[disabled] {
|
|
127
|
-
opacity: var(--#{sys.$prefix}opacity-disabled);
|
|
128
|
-
cursor: not-allowed;
|
|
129
|
-
}
|
|
130
101
|
}
|
|
131
102
|
|
|
132
103
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}select__value {
|
|
@@ -217,7 +188,7 @@ $_label-letter-spacing: 0.05em;
|
|
|
217
188
|
--_border: var(--#{sys.$prefix}select-content-border, var(--#{sys.$prefix}color-border));
|
|
218
189
|
--_shadow: var(--#{sys.$prefix}select-content-shadow, var(--#{sys.$prefix}shadow-dropdown));
|
|
219
190
|
--_radius: var(--#{sys.$prefix}select-content-radius, var(--#{sys.$prefix}radius-md));
|
|
220
|
-
--_min-width: var(--#{sys.$prefix}select-min-width, $_min-width);
|
|
191
|
+
--_min-width: var(--#{sys.$prefix}select-min-width, #{$_min-width});
|
|
221
192
|
|
|
222
193
|
// Layout
|
|
223
194
|
z-index: var(--#{sys.$prefix}layer-top);
|
|
@@ -349,7 +320,7 @@ $_label-letter-spacing: 0.05em;
|
|
|
349
320
|
font-weight: var(--#{sys.$prefix}typography-weight-semibold, 600);
|
|
350
321
|
color: var(--#{sys.$prefix}color-fg-muted);
|
|
351
322
|
text-transform: uppercase;
|
|
352
|
-
letter-spacing:
|
|
323
|
+
letter-spacing: sys.$label-letter-spacing;
|
|
353
324
|
}
|
|
354
325
|
|
|
355
326
|
// ---------------------------------------------------------------------------
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
--tui-sidebar-width
|
|
5
5
|
--tui-sidebar-bg
|
|
6
6
|
--tui-sidebar-border
|
|
7
|
+
--tui-sidebar-divider
|
|
7
8
|
--tui-sidebar-padding
|
|
8
9
|
--tui-sidebar-z
|
|
9
10
|
*/
|
|
@@ -16,7 +17,8 @@
|
|
|
16
17
|
// Component API tokens (never defined here, only read via fallback):
|
|
17
18
|
// --tui-sidebar-width Fixed sidebar width
|
|
18
19
|
// --tui-sidebar-bg Background color
|
|
19
|
-
// --tui-sidebar-border
|
|
20
|
+
// --tui-sidebar-border Edge border color (docked left/right edge)
|
|
21
|
+
// --tui-sidebar-divider Header/footer divider color
|
|
20
22
|
// --tui-sidebar-padding Internal padding
|
|
21
23
|
// --tui-sidebar-z Z-index (drawer mode only)
|
|
22
24
|
//
|
|
@@ -34,6 +36,9 @@
|
|
|
34
36
|
--_width: var(--#{sys.$prefix}sidebar-width, 320px);
|
|
35
37
|
--_bg: var(--#{sys.$prefix}sidebar-bg, var(--#{sys.$prefix}color-bg-surface));
|
|
36
38
|
--_border: var(--#{sys.$prefix}sidebar-border, var(--#{sys.$prefix}color-border));
|
|
39
|
+
// Header/footer separators are dividers, not borders — they must stay
|
|
40
|
+
// subtle when contexts darken --tui-color-border for control contrast.
|
|
41
|
+
--_divider: var(--#{sys.$prefix}sidebar-divider, var(--#{sys.$prefix}color-divider));
|
|
37
42
|
--_padding: var(--#{sys.$prefix}sidebar-padding, var(--#{sys.$prefix}spacing-md));
|
|
38
43
|
|
|
39
44
|
width: var(--_width);
|
|
@@ -68,7 +73,7 @@
|
|
|
68
73
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}sidebar__header {
|
|
69
74
|
flex-shrink: 0;
|
|
70
75
|
padding: var(--_padding);
|
|
71
|
-
border-bottom: var(--#{sys.$prefix}border-width) solid var(--
|
|
76
|
+
border-bottom: var(--#{sys.$prefix}border-width) solid var(--_divider);
|
|
72
77
|
|
|
73
78
|
// Flex column layout for typical header content
|
|
74
79
|
display: flex;
|
|
@@ -89,7 +94,7 @@
|
|
|
89
94
|
flex-shrink: 0;
|
|
90
95
|
margin-top: auto;
|
|
91
96
|
padding: var(--_padding);
|
|
92
|
-
border-top: var(--#{sys.$prefix}border-width) solid var(--
|
|
97
|
+
border-top: var(--#{sys.$prefix}border-width) solid var(--_divider);
|
|
93
98
|
|
|
94
99
|
display: flex;
|
|
95
100
|
flex-direction: column;
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}slider {
|
|
39
39
|
--_track-height: var(--#{sys.$prefix}slider-track-height, 4px);
|
|
40
|
-
--_track-bg: var(--#{sys.$prefix}slider-track-bg, var(--#{sys.$prefix}color-
|
|
40
|
+
--_track-bg: var(--#{sys.$prefix}slider-track-bg, var(--#{sys.$prefix}color-fill));
|
|
41
41
|
--_fill: var(--#{sys.$prefix}slider-fill, var(--#{sys.$prefix}theme-primary-base));
|
|
42
42
|
--_gap: var(--#{sys.$prefix}slider-gap, var(--#{sys.$prefix}spacing-xxs));
|
|
43
43
|
--_segment-radius: var(--#{sys.$prefix}slider-segment-radius, var(--#{sys.$prefix}radius-full));
|
|
@@ -29,7 +29,9 @@
|
|
|
29
29
|
:where(.#{sys.$prefix}interface) {
|
|
30
30
|
.#{sys.$prefix}table {
|
|
31
31
|
// Internal tokens — read component API with fallback to primitives
|
|
32
|
-
|
|
32
|
+
// Divider, not border: table hairlines are row separators and must stay
|
|
33
|
+
// subtle when contexts darken --tui-color-border for control contrast.
|
|
34
|
+
--_border: var(--#{sys.$prefix}table-border, var(--#{sys.$prefix}color-divider));
|
|
33
35
|
--_bg: var(--#{sys.$prefix}table-bg, transparent);
|
|
34
36
|
--_bg-head: var(--#{sys.$prefix}table-bg-head, var(--#{sys.$prefix}color-bg-surface));
|
|
35
37
|
--_fg: var(--#{sys.$prefix}table-fg, var(--#{sys.$prefix}color-fg));
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
// Underline variant: bottom border on list
|
|
100
100
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}tabs[data-variant="underline"] .#{sys.$prefix}tabs__list {
|
|
101
101
|
gap: var(--#{sys.$prefix}tabs-gap, var(--#{sys.$prefix}spacing-md));
|
|
102
|
-
border-block-end: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}color-
|
|
102
|
+
border-block-end: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}color-divider);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// Outline variant: no list background
|