@tangible/ui 0.2.37 → 0.2.39
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/Notice/Notice.d.ts +13 -0
- package/components/Notice/Notice.js +10 -2
- 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 +1 -1
- package/icons/sprite-version.js +1 -1
- package/icons/sprite.php +1 -1
- package/package.json +5 -1
- package/skills/building-with-tui/SKILL.md +22 -0
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +176 -36
- package/styles/all.expanded.unlayered.css +176 -36
- package/styles/all.unlayered.css +1 -1
- package/styles/app.css +2 -0
- package/styles/components/_bundle.scss +4 -0
- package/styles/components/card.scss +19 -13
- package/styles/components/notice.scss +34 -0
- package/styles/components/table.scss +39 -24
- package/styles/components/tray.scss +186 -0
- package/tui-manifest.json +90 -2
package/styles/app.css
CHANGED
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
--tui-text-body-line-height: 1.4;
|
|
27
27
|
--tui-text-body-sm-line-height: 1.4;
|
|
28
28
|
--tui-field-helper-fg: var(--tui-color-fg-muted);
|
|
29
|
+
--tui-table-head-transform: none;
|
|
30
|
+
--tui-table-font-size: var(--tui-typography-size-sm);
|
|
29
31
|
}
|
|
30
32
|
:where(.tui-interface :any-link) {
|
|
31
33
|
cursor: pointer;
|
|
@@ -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
|
}
|
|
@@ -272,6 +272,40 @@
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
|
+
// -------------------------------------------------------------------------
|
|
276
|
+
// align="start" (inline only): Head and Body top-aligned, a lone icon
|
|
277
|
+
// centred on the Body's first line, the Foot still centred.
|
|
278
|
+
// -------------------------------------------------------------------------
|
|
279
|
+
// Head and Body share padding-block in inline mode, so their tops line up.
|
|
280
|
+
// An icon-only Head takes the Body's font size and is one line tall (1lh,
|
|
281
|
+
// after a 1.4em fallback: the interface line-height), so its centred icon
|
|
282
|
+
// sits on line one. Coupling: 1lh is the Head's line-height; a consumer
|
|
283
|
+
// who changes only the Body's line-height breaks the alignment.
|
|
284
|
+
// :where() keeps the row at (0,1,0) like the slot rules above, so it stays
|
|
285
|
+
// overridable; it wins on source order. Child combinators, as in Card: a
|
|
286
|
+
// Notice nested in this one's Body must not pick up its alignment.
|
|
287
|
+
@container tuiNotice (width >= 400px) {
|
|
288
|
+
:where(&[data-align="start"]) > .#{sys.$prefix}notice__inner {
|
|
289
|
+
align-items: flex-start;
|
|
290
|
+
|
|
291
|
+
> .#{sys.$prefix}notice__foot {
|
|
292
|
+
align-self: center;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
> .#{sys.$prefix}notice__head:has(> .#{sys.$prefix}notice__icon:only-child) {
|
|
296
|
+
box-sizing: content-box;
|
|
297
|
+
block-size: 1.4em;
|
|
298
|
+
block-size: 1lh;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// Only sm sets an explicit Body size (md and lg inherit), so only sm needs
|
|
303
|
+
// the Head to match. A future lg Body size needs a rule here too.
|
|
304
|
+
:where(&.is-size-sm[data-align="start"]) > .#{sys.$prefix}notice__inner > .#{sys.$prefix}notice__head {
|
|
305
|
+
font-size: var(--#{sys.$prefix}typography-size-sm);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
275
309
|
// -------------------------------------------------------------------------
|
|
276
310
|
// Reserve space for dismiss button when present (stacked mode only)
|
|
277
311
|
// -------------------------------------------------------------------------
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
--tui-table-border
|
|
5
5
|
--tui-table-bg
|
|
6
6
|
--tui-table-bg-head
|
|
7
|
+
--tui-table-font-size
|
|
8
|
+
--tui-table-head-transform
|
|
9
|
+
--tui-table-head-tracking
|
|
7
10
|
--tui-table-fg
|
|
8
11
|
--tui-table-padding
|
|
9
12
|
--tui-table-selected-bg
|
|
@@ -21,6 +24,12 @@
|
|
|
21
24
|
// --tui-table-bg-head Header and footer background (default: bg-muted, so
|
|
22
25
|
// the head reads as one on tinted pages too)
|
|
23
26
|
// --tui-table-fg Text color (header/footer always; body inherits unless set)
|
|
27
|
+
// --tui-table-font-size Cell text size (default typography-size-md; the
|
|
28
|
+
// app sheet sets sm, as the list template does)
|
|
29
|
+
// --tui-table-head-transform / -tracking
|
|
30
|
+
// Head and foot casing (default uppercase / normal).
|
|
31
|
+
// The app sheet sets `none`: the Figma list template
|
|
32
|
+
// uses sentence case.
|
|
24
33
|
// --tui-table-selected-bg Selected row background
|
|
25
34
|
// --tui-table-selected-fg Selected row text color
|
|
26
35
|
// --tui-table-padding Cell padding
|
|
@@ -41,7 +50,7 @@
|
|
|
41
50
|
--_fg: var(--#{sys.$prefix}table-fg, var(--#{sys.$prefix}color-fg));
|
|
42
51
|
--_padding: var(--#{sys.$prefix}table-padding, var(--#{sys.$prefix}spacing-sm));
|
|
43
52
|
|
|
44
|
-
font-size: var(--#{sys.$prefix}typography-size-md);
|
|
53
|
+
font-size: var(--#{sys.$prefix}table-font-size, var(--#{sys.$prefix}typography-size-md));
|
|
45
54
|
width: 100%;
|
|
46
55
|
border-collapse: collapse;
|
|
47
56
|
border-bottom: var(--#{sys.$prefix}border-width) solid var(--_border);
|
|
@@ -57,28 +66,6 @@
|
|
|
57
66
|
padding-inline: var(--_padding);
|
|
58
67
|
padding-block: var(--_padding);
|
|
59
68
|
}
|
|
60
|
-
|
|
61
|
-
&__sortButton {
|
|
62
|
-
padding: unset;
|
|
63
|
-
display: inline-flex;
|
|
64
|
-
gap: 0.5em;
|
|
65
|
-
color: inherit;
|
|
66
|
-
background-color: transparent;
|
|
67
|
-
text-transform: inherit;
|
|
68
|
-
font-size: inherit;
|
|
69
|
-
font-weight: inherit;
|
|
70
|
-
border-radius: var(--#{sys.$prefix}radius-sm);
|
|
71
|
-
|
|
72
|
-
&:focus-visible {
|
|
73
|
-
outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
|
|
74
|
-
outline-offset: var(--#{sys.$prefix}focus-ring-offset);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&__icon {
|
|
78
|
-
min-width: 1em;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
69
|
// Selection checkboxes
|
|
83
70
|
input[type="checkbox"] {
|
|
84
71
|
accent-color: var(--#{sys.$prefix}theme-primary-base);
|
|
@@ -113,7 +100,8 @@
|
|
|
113
100
|
td {
|
|
114
101
|
color: var(--_fg);
|
|
115
102
|
background-color: var(--_bg-head);
|
|
116
|
-
text-transform: uppercase;
|
|
103
|
+
text-transform: var(--#{sys.$prefix}table-head-transform, uppercase);
|
|
104
|
+
letter-spacing: var(--#{sys.$prefix}table-head-tracking, normal);
|
|
117
105
|
font-size: var(--#{sys.$prefix}typography-size-sm);
|
|
118
106
|
}
|
|
119
107
|
}
|
|
@@ -149,4 +137,31 @@
|
|
|
149
137
|
-webkit-overflow-scrolling: touch;
|
|
150
138
|
}
|
|
151
139
|
}
|
|
140
|
+
|
|
141
|
+
// Full specificity, outside the :where() block: the sort button is a real
|
|
142
|
+
// <button>, and in the unlayered build the interface's button reset
|
|
143
|
+
// (.tui-interface button, 0,1,1: text-transform none, letter-spacing normal)
|
|
144
|
+
// beat a (0,1,0) rule, so sortable headers lost the head's uppercase while
|
|
145
|
+
// their neighbours kept it. Layered builds were fine (resets < components).
|
|
146
|
+
.#{sys.$prefix}interface .#{sys.$prefix}table__sortButton {
|
|
147
|
+
padding: unset;
|
|
148
|
+
display: inline-flex;
|
|
149
|
+
gap: 0.5em;
|
|
150
|
+
color: inherit;
|
|
151
|
+
background-color: transparent;
|
|
152
|
+
text-transform: inherit;
|
|
153
|
+
letter-spacing: inherit;
|
|
154
|
+
font-size: inherit;
|
|
155
|
+
font-weight: inherit;
|
|
156
|
+
border-radius: var(--#{sys.$prefix}radius-sm);
|
|
157
|
+
|
|
158
|
+
&:focus-visible {
|
|
159
|
+
outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
|
|
160
|
+
outline-offset: var(--#{sys.$prefix}focus-ring-offset);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&__icon {
|
|
164
|
+
min-width: 1em;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
152
167
|
}
|
|
@@ -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.39",
|
|
3
|
+
"generated": "2026-11-20T00:42:45.126Z",
|
|
4
4
|
"components": {
|
|
5
5
|
"Accordion": {
|
|
6
6
|
"props": {
|
|
@@ -1187,6 +1187,9 @@
|
|
|
1187
1187
|
"--tui-table-border",
|
|
1188
1188
|
"--tui-table-bg",
|
|
1189
1189
|
"--tui-table-bg-head",
|
|
1190
|
+
"--tui-table-font-size",
|
|
1191
|
+
"--tui-table-head-transform",
|
|
1192
|
+
"--tui-table-head-tracking",
|
|
1190
1193
|
"--tui-table-fg",
|
|
1191
1194
|
"--tui-table-padding",
|
|
1192
1195
|
"--tui-table-selected-bg",
|
|
@@ -2206,6 +2209,12 @@
|
|
|
2206
2209
|
"required": false,
|
|
2207
2210
|
"description": "Inline layout: icon/title on left, content center, actions right"
|
|
2208
2211
|
},
|
|
2212
|
+
"align": {
|
|
2213
|
+
"type": "\"center\" | \"start\"",
|
|
2214
|
+
"required": false,
|
|
2215
|
+
"defaultValue": "'center'",
|
|
2216
|
+
"description": "Inline layout only: how the Head and Body sit on the row's cross axis.\n`center` (default) centres them; `start` top-aligns them and centres a\nlone Head icon on the Body's first line, for a multi-line Body (a bold\ntitle over a detail line). The Foot stays centred either way.\nPublished as `data-align`, not an is-align class (it would collide with the flex utility).\nIgnored (with a dev warning) without `inline`, and below the 400px\ncontainer width, where inline Notices fall back to stacked. No `end`:\nnothing needs a bottom-aligned row, and `start`'s first-line rule has no\n`end` counterpart."
|
|
2217
|
+
},
|
|
2209
2218
|
"elevated": {
|
|
2210
2219
|
"type": "boolean",
|
|
2211
2220
|
"required": false,
|
|
@@ -4189,6 +4198,85 @@
|
|
|
4189
4198
|
"related": null,
|
|
4190
4199
|
"use": null,
|
|
4191
4200
|
"notFor": null
|
|
4201
|
+
},
|
|
4202
|
+
"Tray": {
|
|
4203
|
+
"props": {
|
|
4204
|
+
"open": {
|
|
4205
|
+
"type": "boolean",
|
|
4206
|
+
"required": true,
|
|
4207
|
+
"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`."
|
|
4208
|
+
},
|
|
4209
|
+
"placement": {
|
|
4210
|
+
"type": "\"sticky\" | \"fixed\"",
|
|
4211
|
+
"required": false,
|
|
4212
|
+
"defaultValue": "sticky",
|
|
4213
|
+
"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."
|
|
4214
|
+
},
|
|
4215
|
+
"restoreFocusTo": {
|
|
4216
|
+
"type": "FocusTarget",
|
|
4217
|
+
"required": false,
|
|
4218
|
+
"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."
|
|
4219
|
+
},
|
|
4220
|
+
"className": {
|
|
4221
|
+
"type": "string",
|
|
4222
|
+
"required": false
|
|
4223
|
+
},
|
|
4224
|
+
"id": {
|
|
4225
|
+
"type": "string",
|
|
4226
|
+
"required": false
|
|
4227
|
+
},
|
|
4228
|
+
"style": {
|
|
4229
|
+
"type": "CSSProperties",
|
|
4230
|
+
"required": false
|
|
4231
|
+
},
|
|
4232
|
+
"title": {
|
|
4233
|
+
"type": "string",
|
|
4234
|
+
"required": false
|
|
4235
|
+
},
|
|
4236
|
+
"rel": {
|
|
4237
|
+
"type": "string",
|
|
4238
|
+
"required": false
|
|
4239
|
+
},
|
|
4240
|
+
"onChange": {
|
|
4241
|
+
"type": "FormEventHandler<HTMLDivElement>",
|
|
4242
|
+
"required": false
|
|
4243
|
+
},
|
|
4244
|
+
"onClick": {
|
|
4245
|
+
"type": "MouseEventHandler<HTMLDivElement>",
|
|
4246
|
+
"required": false
|
|
4247
|
+
}
|
|
4248
|
+
},
|
|
4249
|
+
"cssTokens": [
|
|
4250
|
+
"--tui-tray-gutter",
|
|
4251
|
+
"--tui-tray-bg",
|
|
4252
|
+
"--tui-tray-fg",
|
|
4253
|
+
"--tui-tray-border",
|
|
4254
|
+
"--tui-tray-radius",
|
|
4255
|
+
"--tui-tray-shadow",
|
|
4256
|
+
"--tui-tray-block-size",
|
|
4257
|
+
"--tui-tray-offset",
|
|
4258
|
+
"--tui-tray-max-width",
|
|
4259
|
+
"--tui-tray-padding-inline-start",
|
|
4260
|
+
"--tui-tray-padding-inline-end",
|
|
4261
|
+
"--tui-tray-gap",
|
|
4262
|
+
"--tui-tray-z",
|
|
4263
|
+
"--tui-tray-message-fg",
|
|
4264
|
+
"--tui-tray-message-weight"
|
|
4265
|
+
],
|
|
4266
|
+
"story": {
|
|
4267
|
+
"title": "Components/Tray",
|
|
4268
|
+
"tags": [
|
|
4269
|
+
"autodocs",
|
|
4270
|
+
"stable"
|
|
4271
|
+
]
|
|
4272
|
+
},
|
|
4273
|
+
"subcomponents": null,
|
|
4274
|
+
"description": null,
|
|
4275
|
+
"gotchas": null,
|
|
4276
|
+
"examples": null,
|
|
4277
|
+
"related": null,
|
|
4278
|
+
"use": null,
|
|
4279
|
+
"notFor": null
|
|
4192
4280
|
}
|
|
4193
4281
|
},
|
|
4194
4282
|
"utilities": {
|