@tangible/ui 0.2.17 → 0.2.19
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.js +7 -0
- package/components/Sidebar/Sidebar.d.ts +19 -1
- package/components/Sidebar/Sidebar.js +110 -3
- package/components/Sidebar/index.d.ts +2 -1
- package/components/Sidebar/index.js +1 -0
- package/components/Sidebar/types.d.ts +68 -0
- package/components/Sidebar/types.js +4 -1
- package/components/Toast/Toast.d.ts +134 -0
- package/components/Toast/Toast.js +234 -0
- package/components/Toast/ToastContext.d.ts +11 -0
- package/components/Toast/ToastContext.js +9 -0
- package/components/Toast/index.d.ts +4 -0
- package/components/Toast/index.js +2 -0
- package/components/index.d.ts +4 -2
- package/components/index.js +2 -1
- package/figma-tokens.json +1 -1
- package/package.json +5 -1
- package/skills/building-with-tui/SKILL.md +2 -1
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +120 -0
- package/styles/all.expanded.unlayered.css +120 -0
- package/styles/all.unlayered.css +1 -1
- package/styles/components/_bundle.scss +5 -0
- package/styles/components/notice.scss +13 -0
- package/styles/components/sidebar.scss +83 -0
- package/styles/components/toast.scss +183 -0
- package/tui-manifest.json +133 -7
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
@use "./tabs" as tabs;
|
|
43
43
|
@use "./textarea" as textarea;
|
|
44
44
|
@use "./text-input" as textinput;
|
|
45
|
+
@use "./toast" as toast;
|
|
45
46
|
@use "./toolbar" as toolbar;
|
|
46
47
|
@use "./tooltip" as tooltip;
|
|
47
48
|
|
|
@@ -121,6 +122,10 @@ $-input-dependents: (input, field, text-input, textarea, pager, search-input, se
|
|
|
121
122
|
@if -wants($only, tabs) { @include tabs.styles(); }
|
|
122
123
|
@if -wants($only, textarea) { @include textarea.styles(); }
|
|
123
124
|
@if -wants($only, text-input) { @include textinput.styles(); }
|
|
125
|
+
// Toast composes Notice at runtime — a subset build requesting toast must
|
|
126
|
+
// also request notice (and icon-button for the dismiss ×), same latent gap
|
|
127
|
+
// as the gradient-picker note above.
|
|
128
|
+
@if -wants($only, toast) { @include toast.styles(); }
|
|
124
129
|
@if -wants($only, toolbar) { @include toolbar.styles(); }
|
|
125
130
|
@if -wants($only, tooltip) { @include tooltip.styles(); }
|
|
126
131
|
}
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
--tui-notice-icon
|
|
15
15
|
--tui-notice-title-size
|
|
16
16
|
--tui-notice-foot-basis
|
|
17
|
+
--tui-notice-dismiss-bg-interact
|
|
18
|
+
--tui-notice-dismiss-bg-pressed
|
|
17
19
|
*/
|
|
18
20
|
|
|
19
21
|
@mixin styles() {
|
|
@@ -35,6 +37,8 @@
|
|
|
35
37
|
// --tui-notice-icon Icon color (defaults to the theme base per variant)
|
|
36
38
|
// --tui-notice-title-size Title font size (defaults per size preset)
|
|
37
39
|
// --tui-notice-foot-basis Flex basis for foot in inline layout
|
|
40
|
+
// --tui-notice-dismiss-bg-interact Dismiss (×) hover/focus fill (default: 12% fg mix)
|
|
41
|
+
// --tui-notice-dismiss-bg-pressed Dismiss (×) pressed fill (default: 20% fg mix)
|
|
38
42
|
//
|
|
39
43
|
// To override from consuming code:
|
|
40
44
|
// .my-context .tui-notice { --tui-notice-bg: hotpink; }
|
|
@@ -476,6 +480,15 @@
|
|
|
476
480
|
position: absolute;
|
|
477
481
|
inset-block-start: var(--#{sys.$prefix}notice-padding, var(--#{sys.$prefix}spacing-md));
|
|
478
482
|
inset-inline-end: var(--#{sys.$prefix}notice-padding, var(--#{sys.$prefix}spacing-md));
|
|
483
|
+
// Hover/pressed fills: IconButton's ghost fallbacks are SOLID neutral
|
|
484
|
+
// fills (theme-secondary-subtle), which read as grey blobs on the tinted
|
|
485
|
+
// theme surfaces. A translucent fg-mix (the Tabs/SegmentedControl hover
|
|
486
|
+
// treatment) sits on any tint, and resolves per theme scope — Toast's
|
|
487
|
+
// dark surface gets a light hover from this same rule for free.
|
|
488
|
+
// Defined as token VALUES, not properties, so IconButton's own (0,2,0)
|
|
489
|
+
// rules read them via their fallback chain — no specificity contest.
|
|
490
|
+
--#{sys.$prefix}icon-button-bg-interact: var(--#{sys.$prefix}notice-dismiss-bg-interact, color-mix(in srgb, var(--#{sys.$prefix}color-fg) 12%, transparent));
|
|
491
|
+
--#{sys.$prefix}icon-button-bg-pressed: var(--#{sys.$prefix}notice-dismiss-bg-pressed, color-mix(in srgb, var(--#{sys.$prefix}color-fg) 20%, transparent));
|
|
479
492
|
}
|
|
480
493
|
|
|
481
494
|
// In inline mode, dismiss button flows at end instead of absolute positioning
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/* @tui-tokens
|
|
4
4
|
--tui-sidebar-width
|
|
5
|
+
--tui-sidebar-collapsed-width
|
|
5
6
|
--tui-sidebar-bg
|
|
6
7
|
--tui-sidebar-border
|
|
7
8
|
--tui-sidebar-divider
|
|
@@ -16,6 +17,7 @@
|
|
|
16
17
|
//
|
|
17
18
|
// Component API tokens (never defined here, only read via fallback):
|
|
18
19
|
// --tui-sidebar-width Fixed sidebar width
|
|
20
|
+
// --tui-sidebar-collapsed-width Width of the collapsed rail
|
|
19
21
|
// --tui-sidebar-bg Background color
|
|
20
22
|
// --tui-sidebar-border Edge border color (docked left/right edge)
|
|
21
23
|
// --tui-sidebar-divider Header/footer divider color
|
|
@@ -111,6 +113,87 @@
|
|
|
111
113
|
padding: var(--_padding);
|
|
112
114
|
}
|
|
113
115
|
|
|
116
|
+
// ---------------------------------------------------------------------------
|
|
117
|
+
// Collapsed rail
|
|
118
|
+
// ---------------------------------------------------------------------------
|
|
119
|
+
//
|
|
120
|
+
// `collapsible` narrows the sidebar to a rail wide enough for one control.
|
|
121
|
+
// Header, Nav and Footer go; anything else the consumer put directly in
|
|
122
|
+
// the sidebar — the toggle, an icon rail — stays. `display: none` rather
|
|
123
|
+
// than a zero width so the hidden regions leave the tab order and the
|
|
124
|
+
// accessibility tree with it: a rail you can still Tab into is a trap.
|
|
125
|
+
//
|
|
126
|
+
// Written as a top-level rule spelling out the hierarchy. Nesting this as
|
|
127
|
+
// `[data-collapsed="true"] &` would splice `.tui-interface` after the
|
|
128
|
+
// attribute and match nothing — the same trap that killed the drawer
|
|
129
|
+
// animations before 0.2.8.
|
|
130
|
+
|
|
131
|
+
:where(.#{sys.$prefix}interface) .#{sys.$prefix}sidebar[data-collapsed] {
|
|
132
|
+
transition: width var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
:where(.#{sys.$prefix}interface) .#{sys.$prefix}sidebar[data-collapsed="true"] {
|
|
136
|
+
--_width: var(--#{sys.$prefix}sidebar-collapsed-width, 4.5rem);
|
|
137
|
+
|
|
138
|
+
align-items: center;
|
|
139
|
+
padding-block: var(--_padding);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
:where(.#{sys.$prefix}interface)
|
|
143
|
+
.#{sys.$prefix}sidebar[data-collapsed="true"]
|
|
144
|
+
> :is(
|
|
145
|
+
.#{sys.$prefix}sidebar__header,
|
|
146
|
+
.#{sys.$prefix}sidebar__nav,
|
|
147
|
+
.#{sys.$prefix}sidebar__footer
|
|
148
|
+
) {
|
|
149
|
+
display: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@media (prefers-reduced-motion: reduce) {
|
|
153
|
+
:where(.#{sys.$prefix}interface) .#{sys.$prefix}sidebar[data-collapsed] {
|
|
154
|
+
transition: none;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// ---------------------------------------------------------------------------
|
|
159
|
+
// Toggle
|
|
160
|
+
// ---------------------------------------------------------------------------
|
|
161
|
+
//
|
|
162
|
+
// Sits at the sidebar's content-facing edge while expanded — the edge the
|
|
163
|
+
// collapse travels towards — and centres itself once there is only a rail
|
|
164
|
+
// left to sit in.
|
|
165
|
+
//
|
|
166
|
+
// Full specificity, not `:where()`. The toggle IS an IconButton, whose own
|
|
167
|
+
// base rule is `.tui-interface .tui-icon-button` (0,2,0) and resets
|
|
168
|
+
// `margin: 0`. A (0,1,0) host rule loses to it outright, so the margin
|
|
169
|
+
// below would be dead CSS and the toggle would sit flush in the corner.
|
|
170
|
+
// At (0,2,0) the two tie and Sidebar wins on bundle order, which is why
|
|
171
|
+
// the house convention puts host rules at full specificity.
|
|
172
|
+
|
|
173
|
+
.#{sys.$prefix}interface .#{sys.$prefix}sidebar__toggle {
|
|
174
|
+
flex-shrink: 0;
|
|
175
|
+
margin: var(--_padding);
|
|
176
|
+
margin-block-end: 0;
|
|
177
|
+
align-self: flex-end;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.#{sys.$prefix}interface
|
|
181
|
+
.#{sys.$prefix}sidebar[data-position="right"]
|
|
182
|
+
> .#{sys.$prefix}sidebar__toggle {
|
|
183
|
+
align-self: flex-start;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// The collapsed root supplies its own `padding-block`, so the toggle drops
|
|
187
|
+
// its block-start margin rather than stacking on top of it — otherwise the
|
|
188
|
+
// control visibly steps down the rail as the sidebar collapses.
|
|
189
|
+
.#{sys.$prefix}interface
|
|
190
|
+
.#{sys.$prefix}sidebar[data-collapsed="true"]
|
|
191
|
+
> .#{sys.$prefix}sidebar__toggle {
|
|
192
|
+
align-self: center;
|
|
193
|
+
margin-inline: 0;
|
|
194
|
+
margin-block-start: 0;
|
|
195
|
+
}
|
|
196
|
+
|
|
114
197
|
// ---------------------------------------------------------------------------
|
|
115
198
|
// Drawer Mode
|
|
116
199
|
// ---------------------------------------------------------------------------
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
@use "../system" as sys;
|
|
2
|
+
|
|
3
|
+
/* @tui-tokens
|
|
4
|
+
--tui-toast-width
|
|
5
|
+
--tui-toast-fg
|
|
6
|
+
--tui-toast-gap
|
|
7
|
+
--tui-toast-inset
|
|
8
|
+
--tui-toast-shadow
|
|
9
|
+
--tui-toast-z
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
@mixin styles() {
|
|
13
|
+
// ==========================================================================
|
|
14
|
+
// Toast Component
|
|
15
|
+
// ==========================================================================
|
|
16
|
+
//
|
|
17
|
+
// A toast is an inline-layout Notice worn in a fixed stack (the DOM carries
|
|
18
|
+
// both .tui-toast and .tui-notice), so panel styling comes from Notice and
|
|
19
|
+
// its API tokens still apply — re-point them per context:
|
|
20
|
+
// .tui-toast { --tui-notice-bg: …; --tui-notice-padding: …; }
|
|
21
|
+
//
|
|
22
|
+
// The toast root is ALSO a nested .tui-interface[data-theme="dark"] — the
|
|
23
|
+
// dark surface is a theme scope, not a token remap, so everything inside
|
|
24
|
+
// (action Buttons, the dismiss IconButton, consumer children) resolves
|
|
25
|
+
// dark tokens on its own. Two consequences for this file:
|
|
26
|
+
// - fg must be pinned to the scope's own token (Notice's --_fg default
|
|
27
|
+
// is `inherit`, which would pull the LIGHT page color across the
|
|
28
|
+
// theme boundary);
|
|
29
|
+
// - most coloring needs no rules here at all.
|
|
30
|
+
//
|
|
31
|
+
// Toast's own API tokens (never defined here, only read via fallback):
|
|
32
|
+
// --tui-toast-width Toast width (default 26rem — the default must keep
|
|
33
|
+
// Notice's inline container query (content ≥ 400px)
|
|
34
|
+
// true, or the layout falls back to stacked). Read
|
|
35
|
+
// by the REGION, which owns all sizing (toasts fill
|
|
36
|
+
// it) — override it on .tui-toast-region or
|
|
37
|
+
// .tui-interface, never on .tui-toast, where the
|
|
38
|
+
// region has already sized itself and the override
|
|
39
|
+
// does nothing.
|
|
40
|
+
// --tui-toast-fg Text color (default: the dark scope's color-fg)
|
|
41
|
+
// --tui-toast-gap Gap between stacked toasts
|
|
42
|
+
// --tui-toast-inset Region padding from the viewport edges
|
|
43
|
+
// --tui-toast-shadow Box shadow (default shadow-lg)
|
|
44
|
+
// --tui-toast-z Region z-index (default layer-top)
|
|
45
|
+
//
|
|
46
|
+
// ==========================================================================
|
|
47
|
+
|
|
48
|
+
:where(.#{sys.$prefix}interface) .#{sys.$prefix}toast-region {
|
|
49
|
+
--_gap: var(--#{sys.$prefix}toast-gap, var(--#{sys.$prefix}spacing-sm));
|
|
50
|
+
--_inset: var(--#{sys.$prefix}toast-inset, var(--#{sys.$prefix}spacing-lg));
|
|
51
|
+
// Direction toasts enter from — inherited into the enter keyframes on
|
|
52
|
+
// each toast (both live in this file; rename one, rename the other).
|
|
53
|
+
// Top placements flip it below.
|
|
54
|
+
--_enter-from: 0.5rem;
|
|
55
|
+
|
|
56
|
+
position: fixed;
|
|
57
|
+
z-index: var(--#{sys.$prefix}toast-z, var(--#{sys.$prefix}layer-top, 9999));
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
gap: var(--_gap);
|
|
61
|
+
padding: var(--_inset);
|
|
62
|
+
// Single owner of toast sizing — toasts fill the region's content box.
|
|
63
|
+
width: min(calc(var(--#{sys.$prefix}toast-width, 26rem) + var(--_inset) * 2), 100%);
|
|
64
|
+
// The region itself is click-through; each toast restores pointer-events.
|
|
65
|
+
pointer-events: none;
|
|
66
|
+
|
|
67
|
+
// The region receives programmatic focus when a dismissed toast held it,
|
|
68
|
+
// so it needs a visible ring — drawn inward, since the region sits at
|
|
69
|
+
// the viewport edge.
|
|
70
|
+
&:focus-visible {
|
|
71
|
+
outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
|
|
72
|
+
outline-offset: calc(-1 * var(--#{sys.$prefix}focus-ring-width));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Center placements: over-constrained inset + auto margins center the
|
|
76
|
+
// fixed box. No transform centering — it breaks in RTL.
|
|
77
|
+
&.is-placement-top,
|
|
78
|
+
&.is-placement-bottom {
|
|
79
|
+
inset-inline: 0;
|
|
80
|
+
margin-inline: auto;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Top placements stack newest-first visually (DOM order stays
|
|
84
|
+
// oldest-first for reading order); toasts slide down into place.
|
|
85
|
+
&.is-placement-top-start,
|
|
86
|
+
&.is-placement-top,
|
|
87
|
+
&.is-placement-top-end {
|
|
88
|
+
--_enter-from: -0.5rem;
|
|
89
|
+
inset-block-start: 0;
|
|
90
|
+
flex-direction: column-reverse;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&.is-placement-bottom-start,
|
|
94
|
+
&.is-placement-bottom,
|
|
95
|
+
&.is-placement-bottom-end {
|
|
96
|
+
inset-block-end: 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&.is-placement-top-start,
|
|
100
|
+
&.is-placement-bottom-start {
|
|
101
|
+
inset-inline-start: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&.is-placement-top-end,
|
|
105
|
+
&.is-placement-bottom-end {
|
|
106
|
+
inset-inline-end: 0;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Full specificity: the toast restyles the Notice it is composed from, and
|
|
111
|
+
// Notice's own state rules sit at (0,2,0) — a :where() host rule would lose
|
|
112
|
+
// (see the "wrapper restyling an embedded TUI component" gotcha).
|
|
113
|
+
// Width comes from Notice's own `width: 100%` (filling the region).
|
|
114
|
+
.#{sys.$prefix}interface .#{sys.$prefix}toast {
|
|
115
|
+
// Pin fg to the dark scope: Notice's --_fg default is `inherit`, which
|
|
116
|
+
// crosses the theme boundary and lands the page's LIGHT foreground on
|
|
117
|
+
// the dark surface. --tui-color-fg here resolves to the scope's dark
|
|
118
|
+
// value because the toast root carries data-theme="dark".
|
|
119
|
+
--#{sys.$prefix}notice-fg: var(--#{sys.$prefix}toast-fg, var(--#{sys.$prefix}color-fg));
|
|
120
|
+
// Actions are a compact cluster, not Notice's 500px form-actions basis.
|
|
121
|
+
--#{sys.$prefix}notice-foot-basis: max-content;
|
|
122
|
+
|
|
123
|
+
box-shadow: var(--#{sys.$prefix}toast-shadow, var(--#{sys.$prefix}shadow-lg));
|
|
124
|
+
pointer-events: auto;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.#{sys.$prefix}interface .#{sys.$prefix}toast .#{sys.$prefix}toast__title {
|
|
128
|
+
font-weight: var(--#{sys.$prefix}typography-weight-semibold, 600);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.#{sys.$prefix}interface .#{sys.$prefix}toast .#{sys.$prefix}toast__description {
|
|
132
|
+
font-size: var(--#{sys.$prefix}typography-size-sm);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Dismiss (×) hover/pressed fills live on Notice (`--tui-notice-dismiss-
|
|
136
|
+
// bg-interact`/`-pressed`, translucent fg-mixes) — the toast's dark scope
|
|
137
|
+
// resolves them dark-correct with no toast-side rule.
|
|
138
|
+
|
|
139
|
+
// The actions cluster holds its width; the body text wraps instead.
|
|
140
|
+
// Notice's inline rule sets `flex: 0 1 var(--_foot-basis)` at (0,2,0) —
|
|
141
|
+
// without this, a squeezed foot wraps a Button's label mid-word.
|
|
142
|
+
.#{sys.$prefix}interface .#{sys.$prefix}toast .#{sys.$prefix}notice__foot {
|
|
143
|
+
flex-shrink: 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// The dark scope's tokens don't exist under forced colors, and a floating
|
|
147
|
+
// surface needs an edge to read as one (mirrors Tooltip's WHCM rule).
|
|
148
|
+
@media (forced-colors: active) {
|
|
149
|
+
.#{sys.$prefix}interface .#{sys.$prefix}toast {
|
|
150
|
+
background-color: Canvas;
|
|
151
|
+
color: CanvasText;
|
|
152
|
+
border: 1px solid CanvasText;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Enter animation sits at (0,1,0) ON PURPOSE: Notice's exit rules
|
|
157
|
+
// (.tui-notice.is-exiting-fade, (0,2,0)) must win the `animation` property
|
|
158
|
+
// when the toast leaves, regardless of bundle order.
|
|
159
|
+
:where(.#{sys.$prefix}interface) .#{sys.$prefix}toast {
|
|
160
|
+
animation: #{sys.$prefix}toastEnter var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@media (prefers-reduced-motion: reduce) {
|
|
164
|
+
:where(.#{sys.$prefix}interface) .#{sys.$prefix}toast {
|
|
165
|
+
animation: none;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// `--_enter-from` resolves against the animated toast by inheritance from
|
|
170
|
+
// its region (declared at the top of this file); the fallback covers a
|
|
171
|
+
// static toast rendered outside any region.
|
|
172
|
+
@keyframes #{sys.$prefix}toastEnter {
|
|
173
|
+
from {
|
|
174
|
+
opacity: 0;
|
|
175
|
+
translate: 0 var(--_enter-from, 0.5rem);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
to {
|
|
179
|
+
opacity: 1;
|
|
180
|
+
translate: 0 0;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
package/tui-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.2.
|
|
3
|
-
"generated": "2026-
|
|
2
|
+
"version": "0.2.19",
|
|
3
|
+
"generated": "2026-09-01T18:02:16.418Z",
|
|
4
4
|
"components": {
|
|
5
5
|
"Accordion": {
|
|
6
6
|
"props": {
|
|
@@ -1294,7 +1294,7 @@
|
|
|
1294
1294
|
"--tui-dropdown-item-bg-active"
|
|
1295
1295
|
],
|
|
1296
1296
|
"story": {
|
|
1297
|
-
"title": "
|
|
1297
|
+
"title": "Overlays/Dropdown",
|
|
1298
1298
|
"tags": [
|
|
1299
1299
|
"autodocs",
|
|
1300
1300
|
"stable"
|
|
@@ -1655,7 +1655,7 @@
|
|
|
1655
1655
|
"--tui-modal-shadow"
|
|
1656
1656
|
],
|
|
1657
1657
|
"story": {
|
|
1658
|
-
"title": "
|
|
1658
|
+
"title": "Overlays/Modal",
|
|
1659
1659
|
"tags": [
|
|
1660
1660
|
"autodocs",
|
|
1661
1661
|
"stable"
|
|
@@ -2096,7 +2096,9 @@
|
|
|
2096
2096
|
"--tui-notice-para-gap",
|
|
2097
2097
|
"--tui-notice-icon",
|
|
2098
2098
|
"--tui-notice-title-size",
|
|
2099
|
-
"--tui-notice-foot-basis"
|
|
2099
|
+
"--tui-notice-foot-basis",
|
|
2100
|
+
"--tui-notice-dismiss-bg-interact",
|
|
2101
|
+
"--tui-notice-dismiss-bg-pressed"
|
|
2100
2102
|
],
|
|
2101
2103
|
"story": {
|
|
2102
2104
|
"title": "Components/Notice",
|
|
@@ -2345,7 +2347,7 @@
|
|
|
2345
2347
|
"--tui-popover-padding"
|
|
2346
2348
|
],
|
|
2347
2349
|
"story": {
|
|
2348
|
-
"title": "
|
|
2350
|
+
"title": "Overlays/Popover",
|
|
2349
2351
|
"tags": [
|
|
2350
2352
|
"autodocs"
|
|
2351
2353
|
]
|
|
@@ -3138,6 +3140,23 @@
|
|
|
3138
3140
|
"defaultValue": "false",
|
|
3139
3141
|
"description": "Enable drawer mode (mobile overlay).\nEnable drawer mode (mobile overlay).\nWhen true, sidebar renders with backdrop, focus trap, and dialog semantics."
|
|
3140
3142
|
},
|
|
3143
|
+
"collapsible": {
|
|
3144
|
+
"type": "boolean",
|
|
3145
|
+
"required": false,
|
|
3146
|
+
"defaultValue": "false",
|
|
3147
|
+
"description": "Opt into the collapsed rail: the sidebar can shrink to\n`--tui-sidebar-collapsed-width`, hiding Header, Nav and Footer while\nleaving any other child — a `Sidebar.Toggle`, an icon rail — visible.\n\nDeliberately absent from drawer mode: a drawer is already a\nshow/hide overlay, and a rail inside one has nothing to sit beside."
|
|
3148
|
+
},
|
|
3149
|
+
"collapsed": {
|
|
3150
|
+
"type": "boolean",
|
|
3151
|
+
"required": false,
|
|
3152
|
+
"description": "Collapsed state (controlled). Pair with `onCollapsedChange`.\nLeave undefined to let the sidebar own the state."
|
|
3153
|
+
},
|
|
3154
|
+
"defaultCollapsed": {
|
|
3155
|
+
"type": "boolean",
|
|
3156
|
+
"required": false,
|
|
3157
|
+
"defaultValue": "false",
|
|
3158
|
+
"description": "Initial collapsed state when uncontrolled."
|
|
3159
|
+
},
|
|
3141
3160
|
"open": {
|
|
3142
3161
|
"type": "boolean",
|
|
3143
3162
|
"required": false,
|
|
@@ -3151,6 +3170,7 @@
|
|
|
3151
3170
|
},
|
|
3152
3171
|
"cssTokens": [
|
|
3153
3172
|
"--tui-sidebar-width",
|
|
3173
|
+
"--tui-sidebar-collapsed-width",
|
|
3154
3174
|
"--tui-sidebar-bg",
|
|
3155
3175
|
"--tui-sidebar-border",
|
|
3156
3176
|
"--tui-sidebar-divider",
|
|
@@ -3696,6 +3716,112 @@
|
|
|
3696
3716
|
"use": null,
|
|
3697
3717
|
"notFor": null
|
|
3698
3718
|
},
|
|
3719
|
+
"Toast": {
|
|
3720
|
+
"props": {
|
|
3721
|
+
"className": {
|
|
3722
|
+
"type": "string",
|
|
3723
|
+
"required": false
|
|
3724
|
+
},
|
|
3725
|
+
"id": {
|
|
3726
|
+
"type": "string",
|
|
3727
|
+
"required": false
|
|
3728
|
+
},
|
|
3729
|
+
"style": {
|
|
3730
|
+
"type": "CSSProperties",
|
|
3731
|
+
"required": false
|
|
3732
|
+
},
|
|
3733
|
+
"role": {
|
|
3734
|
+
"type": "AriaRole",
|
|
3735
|
+
"required": false
|
|
3736
|
+
},
|
|
3737
|
+
"rel": {
|
|
3738
|
+
"type": "string",
|
|
3739
|
+
"required": false
|
|
3740
|
+
},
|
|
3741
|
+
"onChange": {
|
|
3742
|
+
"type": "FormEventHandler<HTMLDivElement>",
|
|
3743
|
+
"required": false
|
|
3744
|
+
},
|
|
3745
|
+
"onClick": {
|
|
3746
|
+
"type": "MouseEventHandler<HTMLDivElement>",
|
|
3747
|
+
"required": false
|
|
3748
|
+
},
|
|
3749
|
+
"theme": {
|
|
3750
|
+
"type": "\"info\" | \"success\" | \"warning\" | \"danger\" | \"neutral\"",
|
|
3751
|
+
"required": false,
|
|
3752
|
+
"defaultValue": "neutral",
|
|
3753
|
+
"description": "Visual intent. Default 'neutral' — the plain dark surface."
|
|
3754
|
+
},
|
|
3755
|
+
"size": {
|
|
3756
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
3757
|
+
"required": false,
|
|
3758
|
+
"defaultValue": "sm",
|
|
3759
|
+
"description": "Density preset (Notice's size scale). Default 'sm' — toasts are dense;\n'md'/'lg' restore Notice's roomier panel spacing."
|
|
3760
|
+
},
|
|
3761
|
+
"icon": {
|
|
3762
|
+
"type": "ReactNode",
|
|
3763
|
+
"required": false,
|
|
3764
|
+
"description": "Icon content, rendered leading the text. Colored by theme via Notice."
|
|
3765
|
+
},
|
|
3766
|
+
"title": {
|
|
3767
|
+
"type": "ReactNode",
|
|
3768
|
+
"required": false,
|
|
3769
|
+
"description": "Title text — a styled `<div>`, never a heading: a toast lives in a\nportal outside the document outline, so a heading would be an orphan\nfor screen-reader heading navigation."
|
|
3770
|
+
},
|
|
3771
|
+
"announce": {
|
|
3772
|
+
"type": "\"polite\" | \"assertive\"",
|
|
3773
|
+
"required": false,
|
|
3774
|
+
"description": "Screen-reader announcement politeness.\nDefaults to 'assertive' (role=\"alert\") for danger, 'polite'\n(role=\"status\") otherwise."
|
|
3775
|
+
},
|
|
3776
|
+
"dismissible": {
|
|
3777
|
+
"type": "boolean",
|
|
3778
|
+
"required": false,
|
|
3779
|
+
"defaultValue": "true",
|
|
3780
|
+
"description": "Renders a dismiss (×) button. Default true."
|
|
3781
|
+
},
|
|
3782
|
+
"onDismiss": {
|
|
3783
|
+
"type": "() => void",
|
|
3784
|
+
"required": false,
|
|
3785
|
+
"description": "Called after the exit animation completes (× button path)."
|
|
3786
|
+
},
|
|
3787
|
+
"dismissLabel": {
|
|
3788
|
+
"type": "string",
|
|
3789
|
+
"required": false,
|
|
3790
|
+
"description": "Accessible label for the dismiss button. Default 'Dismiss'."
|
|
3791
|
+
},
|
|
3792
|
+
"actions": {
|
|
3793
|
+
"type": "ReactNode",
|
|
3794
|
+
"required": false,
|
|
3795
|
+
"description": "Action content (e.g. a Button), rendered in the foot."
|
|
3796
|
+
},
|
|
3797
|
+
"children": {
|
|
3798
|
+
"type": "ReactNode",
|
|
3799
|
+
"required": false,
|
|
3800
|
+
"description": "Body/description content."
|
|
3801
|
+
}
|
|
3802
|
+
},
|
|
3803
|
+
"cssTokens": [
|
|
3804
|
+
"--tui-toast-width",
|
|
3805
|
+
"--tui-toast-fg",
|
|
3806
|
+
"--tui-toast-gap",
|
|
3807
|
+
"--tui-toast-inset",
|
|
3808
|
+
"--tui-toast-shadow",
|
|
3809
|
+
"--tui-toast-z"
|
|
3810
|
+
],
|
|
3811
|
+
"story": {
|
|
3812
|
+
"title": "Overlays/Toast",
|
|
3813
|
+
"tags": [
|
|
3814
|
+
"autodocs"
|
|
3815
|
+
]
|
|
3816
|
+
},
|
|
3817
|
+
"subcomponents": null,
|
|
3818
|
+
"description": null,
|
|
3819
|
+
"gotchas": null,
|
|
3820
|
+
"examples": null,
|
|
3821
|
+
"related": null,
|
|
3822
|
+
"use": null,
|
|
3823
|
+
"notFor": null
|
|
3824
|
+
},
|
|
3699
3825
|
"Toolbar": {
|
|
3700
3826
|
"props": {
|
|
3701
3827
|
"orientation": {
|
|
@@ -3763,7 +3889,7 @@
|
|
|
3763
3889
|
"--tui-tooltip-z"
|
|
3764
3890
|
],
|
|
3765
3891
|
"story": {
|
|
3766
|
-
"title": "
|
|
3892
|
+
"title": "Overlays/Tooltip",
|
|
3767
3893
|
"tags": [
|
|
3768
3894
|
"autodocs",
|
|
3769
3895
|
"stable"
|