@tangible/ui 0.2.36 → 0.2.38
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/SearchInput/SearchInput.d.ts +2 -0
- package/components/SearchInput/SearchInput.js +34 -12
- package/components/SearchInput/types.d.ts +24 -0
- package/components/Tray/Tray.d.ts +79 -0
- package/components/Tray/Tray.js +229 -0
- package/components/Tray/index.d.ts +4 -0
- package/components/Tray/index.js +2 -0
- package/components/Tray/labels.d.ts +9 -0
- package/components/Tray/labels.js +6 -0
- package/components/index.d.ts +2 -0
- package/components/index.js +1 -0
- package/figma-tokens.json +1 -1
- package/icons/icons.svg +19 -1
- package/icons/manifest.json +144 -0
- package/icons/registry.d.ts +36 -0
- package/icons/registry.js +18 -0
- package/icons/sprite-registry.js +18 -0
- package/icons/sprite-version.js +1 -1
- package/icons/sprite.php +1 -1
- package/icons/system/index.d.ts +36 -0
- package/icons/system/index.js +198 -0
- package/icons/system.svg +18 -0
- package/package.json +5 -1
- package/skills/building-with-tui/SKILL.md +18 -0
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +184 -19
- package/styles/all.expanded.unlayered.css +184 -19
- package/styles/all.unlayered.css +1 -1
- package/styles/components/_bundle.scss +4 -0
- package/styles/components/card.scss +19 -13
- package/styles/components/nav-menu.scss +9 -3
- package/styles/components/search-input.scss +66 -0
- package/styles/components/table.scss +3 -2
- package/styles/components/tray.scss +186 -0
- package/tui-manifest.json +99 -5
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
@use "./textarea" as textarea;
|
|
46
46
|
@use "./text-input" as textinput;
|
|
47
47
|
@use "./toast" as toast;
|
|
48
|
+
@use "./tray" as tray;
|
|
48
49
|
@use "./toolbar" as toolbar;
|
|
49
50
|
@use "./tooltip" as tooltip;
|
|
50
51
|
|
|
@@ -130,6 +131,9 @@ $-input-dependents: (input, field, text-input, textarea, pager, search-input, se
|
|
|
130
131
|
// also request notice (and icon-button for the dismiss ×), same latent gap
|
|
131
132
|
// as the gradient-picker note above.
|
|
132
133
|
@if -wants($only, toast) { @include toast.styles(); }
|
|
134
|
+
// Tray.SaveActions renders Buttons: a subset build requesting tray must
|
|
135
|
+
// also request button.
|
|
136
|
+
@if -wants($only, tray) { @include tray.styles(); }
|
|
133
137
|
@if -wants($only, toolbar) { @include toolbar.styles(); }
|
|
134
138
|
@if -wants($only, tooltip) { @include tooltip.styles(); }
|
|
135
139
|
}
|
|
@@ -200,7 +200,11 @@
|
|
|
200
200
|
//
|
|
201
201
|
// Scoped away from inline layout, which owns its own row flex in the
|
|
202
202
|
// container query below (the two selectors are mutually exclusive).
|
|
203
|
-
|
|
203
|
+
// Child combinators, here and in the inline block below: a card nested in
|
|
204
|
+
// another card's body must take its own layout, not its ancestor's. A
|
|
205
|
+
// descendant selector let a stacked parent turn a nested inline card into a
|
|
206
|
+
// column (and its foot's 500px flex-basis into its height).
|
|
207
|
+
&:not(.is-layout-inline) > .#{sys.$prefix}card__inner {
|
|
204
208
|
display: flex;
|
|
205
209
|
flex-direction: column;
|
|
206
210
|
height: 100%;
|
|
@@ -212,33 +216,35 @@
|
|
|
212
216
|
// :where() on the layout context keeps slot specificity equal to base
|
|
213
217
|
// selectors — consumers can override without fighting the cascade.
|
|
214
218
|
@container tuiCard (width >= 400px) {
|
|
215
|
-
:where(&.is-layout-inline) .#{sys.$prefix}card__inner {
|
|
219
|
+
:where(&.is-layout-inline) > .#{sys.$prefix}card__inner {
|
|
216
220
|
display: flex;
|
|
217
221
|
flex-direction: row;
|
|
218
222
|
align-items: center;
|
|
219
223
|
gap: var(--_padding);
|
|
220
224
|
|
|
221
|
-
.#{sys.$prefix}card__media.is-flush
|
|
225
|
+
> .#{sys.$prefix}card__media.is-flush,
|
|
226
|
+
> * > .#{sys.$prefix}card__media.is-flush {
|
|
222
227
|
object-fit: cover;
|
|
223
228
|
object-position: center;
|
|
224
229
|
margin-block: calc(var(--_padding) * -1);
|
|
225
230
|
height: calc(100% + 2 * var(--_padding));
|
|
226
231
|
}
|
|
227
232
|
|
|
228
|
-
*:has(.#{sys.$prefix}card__media.is-flush) {
|
|
233
|
+
> *:has(> .#{sys.$prefix}card__media.is-flush) {
|
|
229
234
|
align-self: stretch;
|
|
230
235
|
}
|
|
231
236
|
|
|
232
|
-
.#{sys.$prefix}card__head {
|
|
237
|
+
> .#{sys.$prefix}card__head {
|
|
233
238
|
padding-inline-start: var(--_padding);
|
|
234
239
|
padding-block: var(--_padding);
|
|
235
240
|
flex: 0 1 auto;
|
|
236
241
|
|
|
237
|
-
|
|
242
|
+
// A lone icon or avatar sizes to itself instead of stretching.
|
|
243
|
+
&:has(.#{sys.$prefix}icon:only-child, .#{sys.$prefix}avatar:only-child) {
|
|
238
244
|
flex: 0 0 max-content;
|
|
239
245
|
}
|
|
240
246
|
|
|
241
|
-
.#{sys.$prefix}card__media.is-flush:first-child {
|
|
247
|
+
> .#{sys.$prefix}card__media.is-flush:first-child {
|
|
242
248
|
margin-inline-end: var(--_padding);
|
|
243
249
|
max-width: 100%; // fallback if the calc below is invalid
|
|
244
250
|
max-width: calc(100% + var(--_padding));
|
|
@@ -247,12 +253,12 @@
|
|
|
247
253
|
}
|
|
248
254
|
}
|
|
249
255
|
|
|
250
|
-
.#{sys.$prefix}card__body {
|
|
256
|
+
> .#{sys.$prefix}card__body {
|
|
251
257
|
flex: 2 1 auto;
|
|
252
258
|
padding-block: var(--_padding);
|
|
253
259
|
}
|
|
254
260
|
|
|
255
|
-
.#{sys.$prefix}card__foot {
|
|
261
|
+
> .#{sys.$prefix}card__foot {
|
|
256
262
|
width: unset;
|
|
257
263
|
flex: 0 1 var(--_foot-basis);
|
|
258
264
|
padding-block: var(--_padding);
|
|
@@ -260,7 +266,7 @@
|
|
|
260
266
|
margin-inline-start: auto;
|
|
261
267
|
justify-content: flex-end;
|
|
262
268
|
|
|
263
|
-
.#{sys.$prefix}card__media.is-flush:last-child {
|
|
269
|
+
> .#{sys.$prefix}card__media.is-flush:last-child {
|
|
264
270
|
margin-inline-start: var(--_padding);
|
|
265
271
|
max-width: 100%; // fallback if the calc below is invalid
|
|
266
272
|
max-width: calc(100% + var(--_padding));
|
|
@@ -269,9 +275,9 @@
|
|
|
269
275
|
}
|
|
270
276
|
}
|
|
271
277
|
|
|
272
|
-
.#{sys.$prefix}card__head,
|
|
273
|
-
.#{sys.$prefix}card__body,
|
|
274
|
-
.#{sys.$prefix}card__foot {
|
|
278
|
+
> .#{sys.$prefix}card__head,
|
|
279
|
+
> .#{sys.$prefix}card__body,
|
|
280
|
+
> .#{sys.$prefix}card__foot {
|
|
275
281
|
&:not(:first-child) {
|
|
276
282
|
padding-inline-start: 0;
|
|
277
283
|
}
|
|
@@ -149,7 +149,11 @@ $_knob-defaults: (
|
|
|
149
149
|
// --tui-nav-menu-bar-item-* (top-level bar rows)
|
|
150
150
|
// --tui-nav-menu-flyout-item-* (rows in a flyout panel; fg
|
|
151
151
|
// defaults to the panel's fg)
|
|
152
|
-
// --tui-nav-menu-icon-size Icon size (default:
|
|
152
|
+
// --tui-nav-menu-icon-size Icon and chevron size (default: 1.25em
|
|
153
|
+
// of the row font, Button's icon:label
|
|
154
|
+
// ratio: 20px on a 16px row. The glyphs
|
|
155
|
+
// fill the middle 16 of a 24 box, so
|
|
156
|
+
// 16px drew them at ~10.7px)
|
|
153
157
|
// --tui-nav-menu-indicator-width Current-item indicator. Opt-in: 0 by
|
|
154
158
|
// default. Vertical: a leading bar on
|
|
155
159
|
// the page (try 3px). Horizontal: an
|
|
@@ -296,7 +300,7 @@ $_knob-defaults: (
|
|
|
296
300
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}nav-menu__icon {
|
|
297
301
|
display: inline-flex;
|
|
298
302
|
flex: none;
|
|
299
|
-
font-size: var(--#{sys.$prefix}nav-menu-icon-size,
|
|
303
|
+
font-size: var(--#{sys.$prefix}nav-menu-icon-size, 1.25em);
|
|
300
304
|
}
|
|
301
305
|
|
|
302
306
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}nav-menu__label {
|
|
@@ -400,7 +404,7 @@ $_knob-defaults: (
|
|
|
400
404
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}nav-menu__chevron {
|
|
401
405
|
display: inline-flex;
|
|
402
406
|
flex: none;
|
|
403
|
-
font-size: var(--#{sys.$prefix}nav-menu-icon-size,
|
|
407
|
+
font-size: var(--#{sys.$prefix}nav-menu-icon-size, 1.25em);
|
|
404
408
|
transition: transform var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
|
|
405
409
|
}
|
|
406
410
|
|
|
@@ -419,6 +423,8 @@ $_knob-defaults: (
|
|
|
419
423
|
margin: 0;
|
|
420
424
|
padding-inline: var(--#{sys.$prefix}spacing-xxs);
|
|
421
425
|
border: 0;
|
|
426
|
+
// Same font as its row, so the chevron's em-based size matches the row's.
|
|
427
|
+
font-size: var(--#{sys.$prefix}nav-menu-item-font-size, var(--#{sys.$prefix}typography-size-md));
|
|
422
428
|
border-radius: var(--#{sys.$prefix}nav-menu-item-radius, var(--#{sys.$prefix}radius-sm));
|
|
423
429
|
// Only ever in the bar, so it reads the bar knobs like its row.
|
|
424
430
|
@include _item-knobs(bar);
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
/* @tui-tokens
|
|
4
4
|
--tui-search-input-button-radius
|
|
5
|
+
--tui-search-input-suffix-gap
|
|
6
|
+
--tui-search-input-shortcut-fg
|
|
7
|
+
--tui-search-input-shortcut-bg
|
|
8
|
+
--tui-search-input-shortcut-border
|
|
9
|
+
--tui-search-input-shortcut-radius
|
|
5
10
|
*/
|
|
6
11
|
|
|
7
12
|
// =============================================================================
|
|
@@ -16,6 +21,10 @@
|
|
|
16
21
|
//
|
|
17
22
|
// Component API tokens (never defined here, only read via fallback):
|
|
18
23
|
// --tui-search-input-button-radius Clear/submit button hit-area radius
|
|
24
|
+
// --tui-search-input-suffix-gap Space between `suffix` content and the
|
|
25
|
+
// clear button / shortcut hint
|
|
26
|
+
// --tui-search-input-shortcut-fg / -bg / -border / -radius
|
|
27
|
+
// The `shortcut` hint's <kbd> chip
|
|
19
28
|
//
|
|
20
29
|
// =============================================================================
|
|
21
30
|
|
|
@@ -33,6 +42,9 @@
|
|
|
33
42
|
// still sizes with the control text inside the padded box.
|
|
34
43
|
min-inline-size: 1.5rem;
|
|
35
44
|
min-block-size: 1.5rem;
|
|
45
|
+
// ...and eat the group's padding-block, so the 24px floor doesn't push a
|
|
46
|
+
// sm field to 34px against the 32px control ladder (SecretInput does the same).
|
|
47
|
+
margin-block: calc(-1 * var(--_py));
|
|
36
48
|
padding: 0.1875em;
|
|
37
49
|
border: 0;
|
|
38
50
|
border-radius: var(--#{sys.$prefix}search-input-button-radius, var(--#{sys.$prefix}radius-full, 999px));
|
|
@@ -101,4 +113,58 @@
|
|
|
101
113
|
color: var(--#{sys.$prefix}color-fg);
|
|
102
114
|
}
|
|
103
115
|
}
|
|
116
|
+
|
|
117
|
+
// Trailing slot: consumer `suffix` content, then the clear button or the
|
|
118
|
+
// shortcut hint. Adds a gap the shared slot rule doesn't set; full
|
|
119
|
+
// specificity per the host-rule convention.
|
|
120
|
+
.#{sys.$prefix}interface .#{sys.$prefix}search-input > .#{sys.$prefix}input-group__suffix {
|
|
121
|
+
gap: var(--#{sys.$prefix}search-input-suffix-gap, var(--#{sys.$prefix}spacing-xxs));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Consumer suffix content: the shared slot only re-enables pointer events for
|
|
125
|
+
// buttons and links, so a select or switch here would swallow clicks.
|
|
126
|
+
.#{sys.$prefix}interface .#{sys.$prefix}search-input__suffix {
|
|
127
|
+
display: inline-flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
gap: var(--#{sys.$prefix}search-input-suffix-gap, var(--#{sys.$prefix}spacing-xxs));
|
|
130
|
+
pointer-events: auto;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Hint and clear button stacked in one cell: the slot is as wide as the
|
|
134
|
+
// wider one whichever is showing, so the input never reflows.
|
|
135
|
+
.#{sys.$prefix}interface .#{sys.$prefix}search-input__trailing {
|
|
136
|
+
display: inline-grid;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-items: end;
|
|
139
|
+
|
|
140
|
+
> * {
|
|
141
|
+
grid-area: 1 / 1;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Shortcut hint (e.g. ⌘K). Decorative and aria-hidden, but it still carries
|
|
146
|
+
// information for sighted users, so its text keeps fg-secondary rather than a
|
|
147
|
+
// muted tone. Full specificity with explicit margin/font resets: wp-admin
|
|
148
|
+
// styles bare `kbd` (padding, margin, background, 13px).
|
|
149
|
+
.#{sys.$prefix}interface .#{sys.$prefix}search-input__shortcut {
|
|
150
|
+
display: inline-flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
margin: 0;
|
|
153
|
+
padding-block: 0;
|
|
154
|
+
padding-inline: 0.375em;
|
|
155
|
+
border: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}search-input-shortcut-border, var(--#{sys.$prefix}color-border));
|
|
156
|
+
border-radius: var(--#{sys.$prefix}search-input-shortcut-radius, var(--#{sys.$prefix}radius-sm));
|
|
157
|
+
background: var(--#{sys.$prefix}search-input-shortcut-bg, var(--#{sys.$prefix}color-fill-subtle));
|
|
158
|
+
color: var(--#{sys.$prefix}search-input-shortcut-fg, var(--#{sys.$prefix}color-fg-secondary));
|
|
159
|
+
font: inherit;
|
|
160
|
+
font-size: 0.75em;
|
|
161
|
+
line-height: 1.5;
|
|
162
|
+
white-space: nowrap;
|
|
163
|
+
pointer-events: none;
|
|
164
|
+
|
|
165
|
+
@media (forced-colors: active) {
|
|
166
|
+
border-color: CanvasText;
|
|
167
|
+
color: CanvasText;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
104
170
|
}
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
// Component API tokens (never defined here, only read via fallback):
|
|
19
19
|
// --tui-table-border Border color
|
|
20
20
|
// --tui-table-bg Background color
|
|
21
|
-
// --tui-table-bg-head Header background
|
|
21
|
+
// --tui-table-bg-head Header and footer background (default: bg-muted, so
|
|
22
|
+
// the head reads as one on tinted pages too)
|
|
22
23
|
// --tui-table-fg Text color (header/footer always; body inherits unless set)
|
|
23
24
|
// --tui-table-selected-bg Selected row background
|
|
24
25
|
// --tui-table-selected-fg Selected row text color
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
// subtle when contexts darken --tui-color-border for control contrast.
|
|
37
38
|
--_border: var(--#{sys.$prefix}table-border, var(--#{sys.$prefix}color-divider));
|
|
38
39
|
--_bg: var(--#{sys.$prefix}table-bg, transparent);
|
|
39
|
-
--_bg-head: var(--#{sys.$prefix}table-bg-head, var(--#{sys.$prefix}color-bg-
|
|
40
|
+
--_bg-head: var(--#{sys.$prefix}table-bg-head, var(--#{sys.$prefix}color-bg-muted));
|
|
40
41
|
--_fg: var(--#{sys.$prefix}table-fg, var(--#{sys.$prefix}color-fg));
|
|
41
42
|
--_padding: var(--#{sys.$prefix}table-padding, var(--#{sys.$prefix}spacing-sm));
|
|
42
43
|
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
@use "../system" as sys;
|
|
2
|
+
|
|
3
|
+
/* @tui-tokens
|
|
4
|
+
--tui-tray-gutter
|
|
5
|
+
--tui-tray-bg
|
|
6
|
+
--tui-tray-fg
|
|
7
|
+
--tui-tray-border
|
|
8
|
+
--tui-tray-radius
|
|
9
|
+
--tui-tray-shadow
|
|
10
|
+
--tui-tray-block-size
|
|
11
|
+
--tui-tray-offset
|
|
12
|
+
--tui-tray-max-width
|
|
13
|
+
--tui-tray-padding-inline-start
|
|
14
|
+
--tui-tray-padding-inline-end
|
|
15
|
+
--tui-tray-gap
|
|
16
|
+
--tui-tray-z
|
|
17
|
+
--tui-tray-message-fg
|
|
18
|
+
--tui-tray-message-weight
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
@mixin styles() {
|
|
22
|
+
// ==========================================================================
|
|
23
|
+
// Tray
|
|
24
|
+
// ==========================================================================
|
|
25
|
+
//
|
|
26
|
+
// A floating bar at the bottom of its scroll container (sticky) or the
|
|
27
|
+
// viewport (fixed). Figma: Tray, 507:3594: elevated surface, decorative
|
|
28
|
+
// border, shadow-lg, radius-md, 64px tall, padding 12 / 12 / 12 / 20, 12px
|
|
29
|
+
// gap, as wide as its content column.
|
|
30
|
+
//
|
|
31
|
+
// Component API tokens (never defined here, only read via fallback):
|
|
32
|
+
// --tui-tray-bg / -fg / -border / -radius / -shadow Surface
|
|
33
|
+
// --tui-tray-block-size Minimum height (default 4rem, Figma's 64px)
|
|
34
|
+
// --tui-tray-offset Gap from the bottom edge (default spacing-md)
|
|
35
|
+
// --tui-tray-gutter Fixed placement only: gap from the viewport's
|
|
36
|
+
// sides (default: the offset)
|
|
37
|
+
// --tui-tray-max-width Cap on its width (default none: fills the column)
|
|
38
|
+
// --tui-tray-padding-inline-start / -end
|
|
39
|
+
// Default 1.25rem / spacing-sm: Figma's 20 / 12
|
|
40
|
+
// --tui-tray-gap Between message and actions, and between actions
|
|
41
|
+
// --tui-tray-z Stacking (default layer-elevated)
|
|
42
|
+
// --tui-tray-message-fg / -weight The message text
|
|
43
|
+
//
|
|
44
|
+
// State hooks: [data-state="open" | "closing" | "closed"], and
|
|
45
|
+
// .is-placement-sticky / .is-placement-fixed.
|
|
46
|
+
//
|
|
47
|
+
// Reserve room so the tray is less likely to cover a focused field (WCAG
|
|
48
|
+
// 2.4.11: it helps, it doesn't guarantee; a field already half under the
|
|
49
|
+
// tray when focused may stay partly covered). On the
|
|
50
|
+
// scroll container, or on html when that's the document:
|
|
51
|
+
// html:has(.tui-tray[data-state="open"]) {
|
|
52
|
+
// scroll-padding-block-end: calc(var(--tui-tray-block-size, 4rem) + var(--tui-tray-offset, 1rem));
|
|
53
|
+
// }
|
|
54
|
+
// A fixed tray also needs the page to pad its own bottom by the same amount.
|
|
55
|
+
//
|
|
56
|
+
// ==========================================================================
|
|
57
|
+
|
|
58
|
+
.#{sys.$prefix}interface .#{sys.$prefix}tray {
|
|
59
|
+
--_offset: var(--#{sys.$prefix}tray-offset, var(--#{sys.$prefix}spacing-md));
|
|
60
|
+
|
|
61
|
+
position: sticky;
|
|
62
|
+
inset-block-end: var(--_offset);
|
|
63
|
+
z-index: var(--#{sys.$prefix}tray-z, var(--#{sys.$prefix}layer-elevated));
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-wrap: wrap;
|
|
66
|
+
align-items: center;
|
|
67
|
+
gap: var(--#{sys.$prefix}tray-gap, var(--#{sys.$prefix}spacing-sm));
|
|
68
|
+
box-sizing: border-box;
|
|
69
|
+
inline-size: 100%;
|
|
70
|
+
max-inline-size: var(--#{sys.$prefix}tray-max-width, none);
|
|
71
|
+
min-block-size: var(--#{sys.$prefix}tray-block-size, 4rem);
|
|
72
|
+
margin-inline: auto;
|
|
73
|
+
// Figma draws the border inside the padding (64px = 12 + 40 + 12), so the
|
|
74
|
+
// padding gives up the border's width.
|
|
75
|
+
--_bw: var(--#{sys.$prefix}border-width);
|
|
76
|
+
padding-block: calc(var(--#{sys.$prefix}spacing-sm) - var(--_bw));
|
|
77
|
+
padding-inline-start: calc(var(--#{sys.$prefix}tray-padding-inline-start, 1.25rem) - var(--_bw));
|
|
78
|
+
padding-inline-end: calc(var(--#{sys.$prefix}tray-padding-inline-end, var(--#{sys.$prefix}spacing-sm)) - var(--_bw));
|
|
79
|
+
border: var(--_bw) solid var(--#{sys.$prefix}tray-border, var(--#{sys.$prefix}color-border));
|
|
80
|
+
border-radius: var(--#{sys.$prefix}tray-radius, var(--#{sys.$prefix}radius-md));
|
|
81
|
+
background: var(--#{sys.$prefix}tray-bg, var(--#{sys.$prefix}color-bg-elevated));
|
|
82
|
+
// A painted surface owns its text colour (see the surface-fg gotcha).
|
|
83
|
+
color: var(--#{sys.$prefix}tray-fg, var(--#{sys.$prefix}color-fg));
|
|
84
|
+
box-shadow: var(--#{sys.$prefix}tray-shadow, var(--#{sys.$prefix}shadow-lg));
|
|
85
|
+
|
|
86
|
+
// Sticky: inset-block-end lifts the tray by the offset at the end of the
|
|
87
|
+
// scroll, over the last content. The margin reserves that space in flow.
|
|
88
|
+
&.is-placement-sticky {
|
|
89
|
+
margin-block-end: var(--_offset);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Only a tray that opens on the page animates in; one open at mount doesn't.
|
|
93
|
+
&[data-entering] {
|
|
94
|
+
animation: #{sys.$prefix}trayEnter var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&.is-placement-fixed {
|
|
98
|
+
position: fixed;
|
|
99
|
+
inset-inline: var(--#{sys.$prefix}tray-gutter, var(--_offset));
|
|
100
|
+
inline-size: auto;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&[data-state="closing"] {
|
|
104
|
+
animation: #{sys.$prefix}trayExit var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing) forwards;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&[data-state="closed"] {
|
|
108
|
+
display: none;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@media (prefers-reduced-motion: reduce) {
|
|
112
|
+
&[data-entering],
|
|
113
|
+
&[data-state="closing"] {
|
|
114
|
+
animation: none;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@media (forced-colors: active) {
|
|
119
|
+
border-color: CanvasText;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.#{sys.$prefix}interface .#{sys.$prefix}tray__message {
|
|
124
|
+
// 12rem: below this the actions wrap under the message rather than
|
|
125
|
+
// squeezing it (reflow, WCAG 1.4.10).
|
|
126
|
+
flex: 1 1 12rem;
|
|
127
|
+
min-inline-size: 0;
|
|
128
|
+
margin: 0;
|
|
129
|
+
color: var(--#{sys.$prefix}tray-message-fg, inherit);
|
|
130
|
+
font-size: var(--#{sys.$prefix}typography-size-sm);
|
|
131
|
+
font-weight: var(--#{sys.$prefix}tray-message-weight, var(--#{sys.$prefix}typography-weight-semibold));
|
|
132
|
+
line-height: 1.4;
|
|
133
|
+
overflow-wrap: anywhere;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.#{sys.$prefix}interface .#{sys.$prefix}tray__actions {
|
|
137
|
+
display: flex;
|
|
138
|
+
flex: none;
|
|
139
|
+
flex-wrap: wrap;
|
|
140
|
+
align-items: center;
|
|
141
|
+
gap: var(--#{sys.$prefix}tray-gap, var(--#{sys.$prefix}spacing-sm));
|
|
142
|
+
margin-inline-start: auto;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Screen-reader-only text: the announcer and Save's reason. Written out
|
|
146
|
+
// rather than reusing .tui-visually-hidden, which is scoped under
|
|
147
|
+
// .tui-interface: the announcer is the tray's SIBLING, so if a consumer
|
|
148
|
+
// forgot the interface wrapper its text would paint on the page (the
|
|
149
|
+
// tui-visually-hidden gotcha). Unscoped on purpose, as a fallback.
|
|
150
|
+
.#{sys.$prefix}tray__announcer,
|
|
151
|
+
.#{sys.$prefix}tray__description {
|
|
152
|
+
position: absolute;
|
|
153
|
+
inline-size: 1px;
|
|
154
|
+
block-size: 1px;
|
|
155
|
+
padding: 0;
|
|
156
|
+
margin: -1px;
|
|
157
|
+
overflow: hidden;
|
|
158
|
+
clip: rect(0 0 0 0);
|
|
159
|
+
white-space: nowrap;
|
|
160
|
+
border: 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@keyframes #{sys.$prefix}trayEnter {
|
|
164
|
+
from {
|
|
165
|
+
opacity: 0;
|
|
166
|
+
translate: 0 var(--#{sys.$prefix}spacing-xs);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
to {
|
|
170
|
+
opacity: 1;
|
|
171
|
+
translate: 0 0;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@keyframes #{sys.$prefix}trayExit {
|
|
176
|
+
from {
|
|
177
|
+
opacity: 1;
|
|
178
|
+
translate: 0 0;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
to {
|
|
182
|
+
opacity: 0;
|
|
183
|
+
translate: 0 var(--#{sys.$prefix}spacing-xs);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
package/tui-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.2.
|
|
3
|
-
"generated": "2026-11-
|
|
2
|
+
"version": "0.2.38",
|
|
3
|
+
"generated": "2026-11-19T20:46:48.988Z",
|
|
4
4
|
"components": {
|
|
5
5
|
"Accordion": {
|
|
6
6
|
"props": {
|
|
@@ -2928,10 +2928,25 @@
|
|
|
2928
2928
|
"type": "ReactNode",
|
|
2929
2929
|
"required": false,
|
|
2930
2930
|
"description": "Override the leading icon. Defaults to the `system/search` glyph."
|
|
2931
|
+
},
|
|
2932
|
+
"suffix": {
|
|
2933
|
+
"type": "ReactNode",
|
|
2934
|
+
"required": false,
|
|
2935
|
+
"description": "Trailing content, placed before the clear button (e.g. a filter toggle or a\nresult count).\n@remarks Rendered as given and NOT hidden from assistive tech, so a control\nplaced here must carry its own accessible name. Size a Button/IconButton one\ntier below the field. For a keyboard-shortcut hint use `shortcut` instead,\nwhich is decorative. A string renders as plain text beside the clear\nbutton, not as TextInput's boxed `.is-text` addon."
|
|
2936
|
+
},
|
|
2937
|
+
"shortcut": {
|
|
2938
|
+
"type": "string",
|
|
2939
|
+
"required": false,
|
|
2940
|
+
"description": "Keyboard-shortcut hint shown at the trailing edge, e.g. `'⌘K'` or `'/'`.\n@remarks Decorative: rendered as an `aria-hidden` `<kbd>`, only while the\nfield is empty and enabled; the clear button takes its place once there is\na value. Announce the shortcut itself with `aria-keyshortcuts` on the field\n(e.g. `aria-keyshortcuts=\"Meta+K\"`), which SearchInput passes through.\nKeep the two in step: nothing links them.\n\nSearchInput does not bind the key. Listen for it yourself and focus the\nfield through its ref."
|
|
2931
2941
|
}
|
|
2932
2942
|
},
|
|
2933
2943
|
"cssTokens": [
|
|
2934
|
-
"--tui-search-input-button-radius"
|
|
2944
|
+
"--tui-search-input-button-radius",
|
|
2945
|
+
"--tui-search-input-suffix-gap",
|
|
2946
|
+
"--tui-search-input-shortcut-fg",
|
|
2947
|
+
"--tui-search-input-shortcut-bg",
|
|
2948
|
+
"--tui-search-input-shortcut-border",
|
|
2949
|
+
"--tui-search-input-shortcut-radius"
|
|
2935
2950
|
],
|
|
2936
2951
|
"story": {
|
|
2937
2952
|
"title": "Forms/SearchInput",
|
|
@@ -4174,6 +4189,85 @@
|
|
|
4174
4189
|
"related": null,
|
|
4175
4190
|
"use": null,
|
|
4176
4191
|
"notFor": null
|
|
4192
|
+
},
|
|
4193
|
+
"Tray": {
|
|
4194
|
+
"props": {
|
|
4195
|
+
"open": {
|
|
4196
|
+
"type": "boolean",
|
|
4197
|
+
"required": true,
|
|
4198
|
+
"description": "Whether the tray is showing. Controlled only, like Modal: the state it\nreports (unsaved edits, a selection, an undo stack) is the app's, and the\ntray never asks to close itself, so there is no `onOpenChange`."
|
|
4199
|
+
},
|
|
4200
|
+
"placement": {
|
|
4201
|
+
"type": "\"sticky\" | \"fixed\"",
|
|
4202
|
+
"required": false,
|
|
4203
|
+
"defaultValue": "sticky",
|
|
4204
|
+
"description": "`sticky` pins it to the bottom of its scroll container (the default);\n`fixed` pins it to the viewport. A fixed tray breaks out of the viewport's\nframe under a transformed, filtered or contained ancestor, as any\n`position: fixed` does; the page reserves room at its own bottom for it."
|
|
4205
|
+
},
|
|
4206
|
+
"restoreFocusTo": {
|
|
4207
|
+
"type": "FocusTarget",
|
|
4208
|
+
"required": false,
|
|
4209
|
+
"description": "Where focus goes if the tray closes while focus is inside it. Read at close.\nDefaults to the element focus entered the tray from."
|
|
4210
|
+
},
|
|
4211
|
+
"className": {
|
|
4212
|
+
"type": "string",
|
|
4213
|
+
"required": false
|
|
4214
|
+
},
|
|
4215
|
+
"id": {
|
|
4216
|
+
"type": "string",
|
|
4217
|
+
"required": false
|
|
4218
|
+
},
|
|
4219
|
+
"style": {
|
|
4220
|
+
"type": "CSSProperties",
|
|
4221
|
+
"required": false
|
|
4222
|
+
},
|
|
4223
|
+
"title": {
|
|
4224
|
+
"type": "string",
|
|
4225
|
+
"required": false
|
|
4226
|
+
},
|
|
4227
|
+
"rel": {
|
|
4228
|
+
"type": "string",
|
|
4229
|
+
"required": false
|
|
4230
|
+
},
|
|
4231
|
+
"onChange": {
|
|
4232
|
+
"type": "FormEventHandler<HTMLDivElement>",
|
|
4233
|
+
"required": false
|
|
4234
|
+
},
|
|
4235
|
+
"onClick": {
|
|
4236
|
+
"type": "MouseEventHandler<HTMLDivElement>",
|
|
4237
|
+
"required": false
|
|
4238
|
+
}
|
|
4239
|
+
},
|
|
4240
|
+
"cssTokens": [
|
|
4241
|
+
"--tui-tray-gutter",
|
|
4242
|
+
"--tui-tray-bg",
|
|
4243
|
+
"--tui-tray-fg",
|
|
4244
|
+
"--tui-tray-border",
|
|
4245
|
+
"--tui-tray-radius",
|
|
4246
|
+
"--tui-tray-shadow",
|
|
4247
|
+
"--tui-tray-block-size",
|
|
4248
|
+
"--tui-tray-offset",
|
|
4249
|
+
"--tui-tray-max-width",
|
|
4250
|
+
"--tui-tray-padding-inline-start",
|
|
4251
|
+
"--tui-tray-padding-inline-end",
|
|
4252
|
+
"--tui-tray-gap",
|
|
4253
|
+
"--tui-tray-z",
|
|
4254
|
+
"--tui-tray-message-fg",
|
|
4255
|
+
"--tui-tray-message-weight"
|
|
4256
|
+
],
|
|
4257
|
+
"story": {
|
|
4258
|
+
"title": "Components/Tray",
|
|
4259
|
+
"tags": [
|
|
4260
|
+
"autodocs",
|
|
4261
|
+
"stable"
|
|
4262
|
+
]
|
|
4263
|
+
},
|
|
4264
|
+
"subcomponents": null,
|
|
4265
|
+
"description": null,
|
|
4266
|
+
"gotchas": null,
|
|
4267
|
+
"examples": null,
|
|
4268
|
+
"related": null,
|
|
4269
|
+
"use": null,
|
|
4270
|
+
"notFor": null
|
|
4177
4271
|
}
|
|
4178
4272
|
},
|
|
4179
4273
|
"utilities": {
|
|
@@ -4381,9 +4475,9 @@
|
|
|
4381
4475
|
"membersync": 22,
|
|
4382
4476
|
"player": 24,
|
|
4383
4477
|
"reaction": 36,
|
|
4384
|
-
"system":
|
|
4478
|
+
"system": 141
|
|
4385
4479
|
},
|
|
4386
|
-
"total":
|
|
4480
|
+
"total": 280,
|
|
4387
4481
|
"manifest": "./icons/manifest.json"
|
|
4388
4482
|
}
|
|
4389
4483
|
}
|