@helixds/react 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +4 -1
- package/dist/archetypes/actions-navigation.md +62 -0
- package/dist/archetypes/data-display.md +68 -0
- package/dist/archetypes/feedback-status.md +54 -0
- package/dist/archetypes/form-selection.md +61 -0
- package/dist/archetypes/foundation.md +56 -0
- package/dist/archetypes/layout.md +53 -0
- package/dist/archetypes/overlays.md +54 -0
- package/dist/archetypes/text-input.md +58 -0
- package/dist/components/Badge/Badge.types.d.ts +1 -1
- package/dist/components/Combobox/Combobox.d.ts +17 -0
- package/dist/components/Combobox/Combobox.doc.d.ts +4 -0
- package/dist/components/Combobox/Combobox.doc.js +41 -0
- package/dist/components/Combobox/Combobox.js +141 -0
- package/dist/components/Combobox/Combobox.types.d.ts +31 -0
- package/dist/components/Combobox/Combobox.types.js +2 -0
- package/dist/components/Combobox/index.d.ts +9 -0
- package/dist/components/Combobox/index.js +2 -0
- package/dist/components/Icon/Icon.doc.js +2 -2
- package/dist/components/Icon/Icon.js +1 -1
- package/dist/components/Icon/Icon.types.d.ts +1 -1
- package/dist/components/Icon/iconStroke.d.ts +1 -1
- package/dist/components/Icon/iconStroke.js +1 -1
- package/dist/components/Menu/Menu.doc.js +4 -4
- package/dist/components/Menu/Menu.js +3 -3
- package/dist/components/Menu/Menu.types.d.ts +1 -1
- package/dist/components/Modal/Modal.doc.js +1 -1
- package/dist/components/Modal/Modal.types.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +2 -2
- package/dist/components/MultiSelect/MultiSelect.doc.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +4 -4
- package/dist/components/Popover/Popover.d.ts +14 -0
- package/dist/components/Popover/Popover.doc.d.ts +4 -0
- package/dist/components/Popover/Popover.doc.js +47 -0
- package/dist/components/Popover/Popover.js +157 -0
- package/dist/components/Popover/Popover.types.d.ts +27 -0
- package/dist/components/Popover/Popover.types.js +2 -0
- package/dist/components/Popover/index.d.ts +9 -0
- package/dist/components/Popover/index.js +2 -0
- package/dist/components/SegmentedControl/SegmentedControl.doc.js +2 -2
- package/dist/components/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/components/Select/Select.doc.js +2 -2
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/SidePanel/SidePanel.doc.js +1 -1
- package/dist/components/SidePanel/SidePanel.types.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +13 -0
- package/dist/components/Tabs/Tabs.doc.d.ts +4 -0
- package/dist/components/Tabs/Tabs.doc.js +47 -0
- package/dist/components/Tabs/Tabs.js +61 -0
- package/dist/components/Tabs/Tabs.types.d.ts +33 -0
- package/dist/components/Tabs/Tabs.types.js +2 -0
- package/dist/components/Tabs/index.d.ts +9 -0
- package/dist/components/Tabs/index.js +2 -0
- package/dist/components/Toast/Toast.doc.js +1 -1
- package/dist/components/Toast/Toast.js +2 -2
- package/dist/components/Toast/toastStore.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.doc.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +5 -5
- package/dist/components/Tooltip/Tooltip.types.d.ts +1 -1
- package/dist/contracts/Accordion.json +5 -4
- package/dist/contracts/AppShell.json +111 -28
- package/dist/contracts/Avatar.json +3 -2
- package/dist/contracts/AvatarGroup.json +1 -0
- package/dist/contracts/Badge.json +2 -1
- package/dist/contracts/Button.json +2 -1
- package/dist/contracts/Card.json +3 -2
- package/dist/contracts/Chart.json +2 -1
- package/dist/contracts/Checkbox.json +1 -0
- package/dist/contracts/CheckboxGroup.json +1 -0
- package/dist/contracts/Chip.json +3 -2
- package/dist/contracts/ChipGroup.json +1 -0
- package/dist/contracts/Combobox.json +431 -0
- package/dist/contracts/FAB.json +3 -2
- package/dist/contracts/Icon.json +10 -9
- package/dist/contracts/IconButton.json +2 -1
- package/dist/contracts/Input.json +2 -1
- package/dist/contracts/Menu.json +7 -6
- package/dist/contracts/Modal.json +5 -4
- package/dist/contracts/MultiSelect.json +6 -5
- package/dist/contracts/NavItem.json +2 -1
- package/dist/contracts/PageHeader.json +1 -0
- package/dist/contracts/Popover.json +322 -0
- package/dist/contracts/RadioButton.json +1 -0
- package/dist/contracts/RadioGroup.json +1 -0
- package/dist/contracts/SegmentedControl.json +4 -3
- package/dist/contracts/Select.json +9 -9
- package/dist/contracts/SideNav.json +2 -1
- package/dist/contracts/SidePanel.json +5 -4
- package/dist/contracts/Switch.json +1 -0
- package/dist/contracts/Table.json +1 -0
- package/dist/contracts/Tabs.json +353 -0
- package/dist/contracts/Textarea.json +2 -1
- package/dist/contracts/Toast.json +6 -5
- package/dist/contracts/Tooltip.json +4 -3
- package/dist/contracts/TopBar.json +2 -0
- package/dist/contracts/manifest.json +1539 -44
- package/dist/index.d.ts +9 -0
- package/dist/index.js +6 -0
- package/dist/layout/AppShell/AppShell.d.ts +1 -1
- package/dist/layout/AppShell/AppShell.doc.js +5 -0
- package/dist/layout/AppShell/AppShell.js +109 -2
- package/dist/layout/AppShell/AppShell.types.d.ts +6 -0
- package/dist/layout/AppShell/AppShellContext.d.ts +17 -0
- package/dist/layout/AppShell/AppShellContext.js +4 -0
- package/dist/layout/SideNav/SideNav.doc.js +1 -0
- package/dist/layout/TopBar/TopBar.js +7 -1
- package/dist/lib/useDialogTransition.d.ts +1 -1
- package/dist/lib/useDialogTransition.js +1 -1
- package/dist/lib/useDisclosureTransition.d.ts +1 -1
- package/dist/lib/useDisclosureTransition.js +1 -1
- package/dist/patterns/expand-collapse-chevron.md +1 -1
- package/dist/patterns/motion-effects.md +2 -4
- package/package.json +26 -4
- package/src/globals.css +338 -22
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
"purpose": "Displays tabular data edge-to-edge — rows and columns of related records, e.g. a member list, a billing history.",
|
|
8
8
|
"import": "import { Table, TableHead, TableBody, TableRow, TableHeaderCell, TableCell } from '@helixds/react';",
|
|
9
|
+
"archetype": "data-display",
|
|
9
10
|
|
|
10
11
|
"neverUseFor": [
|
|
11
12
|
"A single record's key/value details — use a description list pattern instead",
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../component.schema.json",
|
|
3
|
+
"name": "Tabs",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"status": "stable",
|
|
6
|
+
"purpose": "Switches between sections of related content inside one page: a row of tabs, with an optional panel slot under it for whatever the selected tab shows.",
|
|
7
|
+
"import": "import { Tabs } from '@helixds/react';",
|
|
8
|
+
"archetype": "actions-navigation",
|
|
9
|
+
"neverUseFor": [
|
|
10
|
+
"Navigating between real pages or routes — use NavItem instead",
|
|
11
|
+
"Switching a mode or a setting rather than a section of the page — use SegmentedControl instead",
|
|
12
|
+
"Content the user needs to compare side by side, or read in sequence — show it on the page, or use Accordion",
|
|
13
|
+
"More than ~6 tabs, or tabs with long labels — split the page or use a Select"
|
|
14
|
+
],
|
|
15
|
+
"rationale": "Tabs is a hand-rolled WAI-ARIA tablist because no native element renders a tab set: tablist > tab buttons (aria-selected) > one tabpanel (aria-labelledby the selected tab, tabIndex 0, so a panel with nothing focusable can still be reached). It uses a roving tabindex with automatic activation: the arrow keys move and select at once, because the consumer swaps the panel's content without delay. This is the same keyboard model as SegmentedControl, so the two feel alike. The panel is a slot (owner 2026-12-05, replacing one panel per option): `children` holds whatever the selected tab shows and the consumer swaps it from `value`; with no children Tabs is only the tab row — no tabpanel, no aria-controls. What the user typed or scrolled survives a switch only if the consumer keeps that content mounted or in state. Its options/value/onChange API has the same shape as SegmentedControl's, plus `children`. It has one fixed height, semantic.size.m (32px), with 8px side padding and tabs 4px apart (group spacing). Hover changes only the label color, from text.neutral-light to text.neutral, with no background. The indicator is a 2px borderWidth.thick line in fill.primary-interactive-default over a thin border.neutral line under the list, with 12px before the panel. The indicator slides with Motion layoutId (SPRING_SNAPPY), like NavItem, scoped per instance and inside MotionConfig reducedMotion=\"user\". It switches sections of a page — that's the line that separates it from SegmentedControl, which switches a mode. Vertical, closable and overflow-scrolling tabs aren't built yet.",
|
|
16
|
+
"governance": {
|
|
17
|
+
"mayExtendLocally": [
|
|
18
|
+
"Choose the tabs, their labels and icons",
|
|
19
|
+
"Choose what the panel slot shows — or leave it out and show the content elsewhere",
|
|
20
|
+
"Choose the selected tab"
|
|
21
|
+
],
|
|
22
|
+
"mustEscalateToDS": [
|
|
23
|
+
"Adding sizes, vertical orientation or manual activation",
|
|
24
|
+
"Using it for routing between pages",
|
|
25
|
+
"Changing the keyboard model or the indicator motion"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"states": {
|
|
29
|
+
"intrinsic": [
|
|
30
|
+
"hover",
|
|
31
|
+
"focus"
|
|
32
|
+
],
|
|
33
|
+
"authored": [
|
|
34
|
+
{
|
|
35
|
+
"name": "selected",
|
|
36
|
+
"description": "The tab whose panel is shown — strong text and the indicator line under it.",
|
|
37
|
+
"aria": "aria-selected on the tab"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "disabled",
|
|
41
|
+
"description": "An individual tab is non-interactive and skipped by the arrow keys.",
|
|
42
|
+
"aria": "disabled (native HTML attribute) on the tab's button"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"anatomy": [
|
|
47
|
+
{
|
|
48
|
+
"part": "tabs-root",
|
|
49
|
+
"element": "div",
|
|
50
|
+
"description": "Root element: the tab row and, when there are children, the panel slot."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"part": "tabs-list",
|
|
54
|
+
"element": "div",
|
|
55
|
+
"description": "The row of tabs — role=\"tablist\", aria-label from `label`. A thin bottom border spans its width."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"part": "tabs-tab",
|
|
59
|
+
"element": "button",
|
|
60
|
+
"description": "One tab — role=\"tab\", aria-selected, roving tabIndex; the selected one has aria-controls pointing at the panel when there is one."
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"part": "tabs-tab-icon",
|
|
64
|
+
"element": "span",
|
|
65
|
+
"description": "Optional icon before the label, rendered through Icon (decorative)."
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"part": "tabs-tab-label",
|
|
69
|
+
"element": "span",
|
|
70
|
+
"description": "The tab's visible text."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"part": "tabs-indicator",
|
|
74
|
+
"element": "span",
|
|
75
|
+
"description": "The line under the selected tab. Decorative — aria-hidden. Slides between tabs (Motion layoutId)."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"part": "tabs-panel",
|
|
79
|
+
"element": "div",
|
|
80
|
+
"description": "The panel slot — rendered only when there are children: role=\"tabpanel\", aria-labelledby the selected tab, tabIndex 0. Holds any content."
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"props": [
|
|
84
|
+
{
|
|
85
|
+
"name": "label",
|
|
86
|
+
"type": "string",
|
|
87
|
+
"required": true,
|
|
88
|
+
"description": "Accessible name for the tab row (aria-label on the tablist — it has no visible heading)."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "options",
|
|
92
|
+
"type": "TabsOption[]",
|
|
93
|
+
"required": true,
|
|
94
|
+
"description": "The tabs. Each option: { value, label, icon?, disabled? }. `icon` is a Tabler icon component, rendered through Icon before the label."
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "value",
|
|
98
|
+
"type": "string | undefined",
|
|
99
|
+
"description": "Controlled selected tab."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "defaultValue",
|
|
103
|
+
"type": "string | undefined",
|
|
104
|
+
"description": "Uncontrolled initial tab. Defaults to the first enabled option."
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "onChange",
|
|
108
|
+
"type": "((value: string) => void) | undefined",
|
|
109
|
+
"description": "Called when the selected tab changes."
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "children",
|
|
113
|
+
"type": "React.ReactNode | undefined",
|
|
114
|
+
"description": "The panel: a free slot under the tab row, wrapped in one role=\"tabpanel\" labelled by the selected tab. Put anything in it and swap it from `value`/`onChange`. Leave it out and Tabs is only the tab row."
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "className",
|
|
118
|
+
"type": "string | undefined",
|
|
119
|
+
"description": "Additional className for the root element."
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"sizing": {
|
|
123
|
+
"height": {
|
|
124
|
+
"mode": "fixed",
|
|
125
|
+
"values": {
|
|
126
|
+
"default": 32
|
|
127
|
+
},
|
|
128
|
+
"unit": "px",
|
|
129
|
+
"note": "semantic.size.m for each tab — the same rung as Button and the form fields. No size prop. The panel slot's height is its content's."
|
|
130
|
+
},
|
|
131
|
+
"width": {
|
|
132
|
+
"default": "fill",
|
|
133
|
+
"modes": {
|
|
134
|
+
"fill": "The tab row spans its container; each tab hugs its label."
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"tokenPolicy": {
|
|
139
|
+
"allowed": [
|
|
140
|
+
"color.fill",
|
|
141
|
+
"color.text",
|
|
142
|
+
"color.border",
|
|
143
|
+
"spacing",
|
|
144
|
+
"fontSize",
|
|
145
|
+
"fontWeight",
|
|
146
|
+
"borderWidth"
|
|
147
|
+
],
|
|
148
|
+
"forbidden": [
|
|
149
|
+
"primitive.color"
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"a11y": {
|
|
153
|
+
"role": "tablist / tab / tabpanel (hand-rolled — see rationale)",
|
|
154
|
+
"keyboardNav": [
|
|
155
|
+
"Arrow Left/Right — move to the previous/next tab and select it, wrapping at the ends; disabled tabs are skipped",
|
|
156
|
+
"Home/End — move to the first/last tab and select it",
|
|
157
|
+
"Tab — moves focus into the tab row (on the selected tab), then to the panel"
|
|
158
|
+
],
|
|
159
|
+
"wcag": [
|
|
160
|
+
"1.3.1 Info and Relationships",
|
|
161
|
+
"2.1.1 Keyboard",
|
|
162
|
+
"2.4.3 Focus Order",
|
|
163
|
+
"2.4.7 Focus Visible",
|
|
164
|
+
"4.1.2 Name Role Value"
|
|
165
|
+
],
|
|
166
|
+
"applied": {
|
|
167
|
+
"nativeElement": "div",
|
|
168
|
+
"focus": [
|
|
169
|
+
{
|
|
170
|
+
"part": "tabs-tab",
|
|
171
|
+
"when": ":focus-visible",
|
|
172
|
+
"outline": "2px solid var(--helix-color-border-focus)",
|
|
173
|
+
"outline-offset": "-2px"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"part": "tabs-panel",
|
|
177
|
+
"when": ":focus-visible",
|
|
178
|
+
"outline": "2px solid var(--helix-color-border-focus)",
|
|
179
|
+
"outline-offset": "2px"
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"aria": {
|
|
183
|
+
"tabs-list": {
|
|
184
|
+
"role": [
|
|
185
|
+
"tablist"
|
|
186
|
+
],
|
|
187
|
+
"aria-label": [
|
|
188
|
+
"Project"
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
"tabs-tab": {
|
|
192
|
+
"role": [
|
|
193
|
+
"tab"
|
|
194
|
+
],
|
|
195
|
+
"aria-selected": [
|
|
196
|
+
"true",
|
|
197
|
+
"false"
|
|
198
|
+
],
|
|
199
|
+
"aria-controls": [
|
|
200
|
+
"(id)"
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
"tabs-indicator": {
|
|
204
|
+
"aria-hidden": [
|
|
205
|
+
"true"
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
"tabs-panel": {
|
|
209
|
+
"role": [
|
|
210
|
+
"tabpanel"
|
|
211
|
+
],
|
|
212
|
+
"aria-labelledby": [
|
|
213
|
+
"(id)"
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"announced": [
|
|
218
|
+
"tablist \"Project\""
|
|
219
|
+
],
|
|
220
|
+
"contrast": {
|
|
221
|
+
"tabs-tab-label": {
|
|
222
|
+
"light": "7.57:1 — #475569 on #ffffff",
|
|
223
|
+
"dark": "6.96:1 — #94a3b8 on #0f172a"
|
|
224
|
+
},
|
|
225
|
+
"tabs-panel": {
|
|
226
|
+
"light": "17.85:1 — #0f172a on #ffffff",
|
|
227
|
+
"dark": "16.29:1 — #f1f5f9 on #0f172a"
|
|
228
|
+
},
|
|
229
|
+
"tabs-tab-icon (icon)": {
|
|
230
|
+
"light": "7.58:1 — #475569 on #ffffff",
|
|
231
|
+
"dark": "6.96:1 — #94a3b8 on #0f172a"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"targetSize": {
|
|
235
|
+
"tabs-tab": "smallest 60×32 px",
|
|
236
|
+
"tabs-panel": "smallest 1248×33 px"
|
|
237
|
+
},
|
|
238
|
+
"motion": [
|
|
239
|
+
"CSS transitions/animations: neutralised by the global prefers-reduced-motion rule",
|
|
240
|
+
"Motion (JS): inside <MotionConfig reducedMotion=\"user\">"
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
"results": {
|
|
244
|
+
"score": 100,
|
|
245
|
+
"meetsMinimum": true,
|
|
246
|
+
"checks": {
|
|
247
|
+
"contract": "pass",
|
|
248
|
+
"keys": "pass",
|
|
249
|
+
"focus-return": "n/a",
|
|
250
|
+
"keyboard": "pass",
|
|
251
|
+
"axe": "pass",
|
|
252
|
+
"contrast": "pass",
|
|
253
|
+
"focus-visible": "pass",
|
|
254
|
+
"target-size": "pass",
|
|
255
|
+
"reflow": "n/a",
|
|
256
|
+
"screen-reader": "pass",
|
|
257
|
+
"ai-visual": "pending",
|
|
258
|
+
"human": "pending"
|
|
259
|
+
},
|
|
260
|
+
"notScored": [
|
|
261
|
+
"ai-visual",
|
|
262
|
+
"human"
|
|
263
|
+
],
|
|
264
|
+
"changed": "2026-12-05"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"figma": {
|
|
268
|
+
"childProps": {
|
|
269
|
+
"options": [
|
|
270
|
+
{
|
|
271
|
+
"component": "TabsItem",
|
|
272
|
+
"property": "label",
|
|
273
|
+
"note": "each tab's label (and its icon with icon.)"
|
|
274
|
+
}
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
"figmaOnly": {
|
|
278
|
+
"icon.": {
|
|
279
|
+
"approved": "2026-12-05",
|
|
280
|
+
"reason": "Storybook's WithIcons story: every tab shows its icon — one toggle on the set (false = text only, true = icon + text); the item's own icon. / icon stay on TabsItem (owner 2026-12-05, like SegmentedControl)"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"states": [
|
|
284
|
+
"default"
|
|
285
|
+
],
|
|
286
|
+
"properties": [
|
|
287
|
+
{
|
|
288
|
+
"name": "selected",
|
|
289
|
+
"type": "VARIANT",
|
|
290
|
+
"values": [
|
|
291
|
+
"false",
|
|
292
|
+
"true"
|
|
293
|
+
],
|
|
294
|
+
"codeProp": "value",
|
|
295
|
+
"description": "On TabsItem: the tab whose value equals the group's value — strong text and the indicator line under it."
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"name": "label",
|
|
299
|
+
"type": "TEXT",
|
|
300
|
+
"codeProp": "options[].label"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"name": "icon.",
|
|
304
|
+
"type": "BOOLEAN",
|
|
305
|
+
"codeProp": "options[].icon",
|
|
306
|
+
"description": "On TabsItem: shows tabs-tab-icon before the label. The tab keeps its paddings, the icon carries its own gap."
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"name": "icon",
|
|
310
|
+
"type": "INSTANCE_SWAP",
|
|
311
|
+
"codeProp": "options[].icon",
|
|
312
|
+
"description": "On TabsItem: which icon."
|
|
313
|
+
}
|
|
314
|
+
],
|
|
315
|
+
"structure": "TabsItem set (selected × state default/hover/focus, plus state=disabled at selected=false) composed into Tabs: tabs-list (gap spacing/2xs, bottom border border/neutral 1px) holding 2–7 TabsItem instances, the first selected; under it tabs-panel, a native Figma SLOT — Figma names the layer after its property, so the layer is `children` (padding-top spacing/component/m) that holds anything — empty by default, so the component is only the tab row.",
|
|
316
|
+
"propertyMap": {
|
|
317
|
+
"label": {
|
|
318
|
+
"codeType": "string",
|
|
319
|
+
"figma": [],
|
|
320
|
+
"approved": "2026-12-05",
|
|
321
|
+
"reason": "the tablist's aria-label — never drawn; the visible text is each tab's own label (tabs-tab-label)"
|
|
322
|
+
},
|
|
323
|
+
"children": {
|
|
324
|
+
"codeType": "React.ReactNode | undefined",
|
|
325
|
+
"figma": [
|
|
326
|
+
{
|
|
327
|
+
"name": "children",
|
|
328
|
+
"type": "SLOT"
|
|
329
|
+
}
|
|
330
|
+
],
|
|
331
|
+
"approved": "2026-12-05",
|
|
332
|
+
"reason": "the panel is a free slot (owner 2026-12-05): a native Figma SLOT named children under the tab row — drop any content in it, or leave it empty for only the tabs"
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"variantCombinations": "6 variants (owner 2026-12-05, like SegmentedControl): options 2–7 TabsItem instances, the first selected (list-count), no state axis.",
|
|
336
|
+
"stories": {
|
|
337
|
+
"Default": "default",
|
|
338
|
+
"WithIcons": "icon.=true",
|
|
339
|
+
"WithDisabledTab": {
|
|
340
|
+
"figma": "layout",
|
|
341
|
+
"reason": "one TabsItem at state=disabled — drawn in the child (owner 2026-12-05)"
|
|
342
|
+
},
|
|
343
|
+
"KeyboardNavigation": {
|
|
344
|
+
"figma": "layout",
|
|
345
|
+
"reason": "keyboard focus is drawn on the TabsItem inside it (state=focus) — owner 2026-12-05"
|
|
346
|
+
},
|
|
347
|
+
"TabsOnly": {
|
|
348
|
+
"figma": "layout",
|
|
349
|
+
"reason": "the children slot left empty — Figma's default"
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
"$schema": "../component.schema.json",
|
|
3
3
|
"name": "Textarea",
|
|
4
4
|
"version": "1.0.0",
|
|
5
|
-
"status": "
|
|
5
|
+
"status": "beta",
|
|
6
6
|
"purpose": "Lets users enter multi-line free-form text.",
|
|
7
7
|
"import": "import { Textarea } from '@helixds/react';",
|
|
8
|
+
"archetype": "text-input",
|
|
8
9
|
"neverUseFor": [
|
|
9
10
|
"Single-line text - use Input instead",
|
|
10
11
|
"Option selection - use Select, RadioGroup, or CheckboxGroup",
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
"purpose": "A Sonner-style stacking notification, fixed to the top-right corner, triggered imperatively (toast.success('Saved')) from anywhere — not tied to a piece of UI state the consumer renders conditionally, unlike Modal/SidePanel.",
|
|
8
8
|
"import": "import { Toast, toast } from '@helixds/react';",
|
|
9
|
+
"archetype": "feedback-status",
|
|
9
10
|
|
|
10
11
|
"neverUseFor": [
|
|
11
12
|
"A message the user must act on before continuing — use Modal instead, Toast can be missed or auto-dismiss",
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
"Anything the user needs to refer back to later — Toast auto-dismisses and doesn't persist"
|
|
14
15
|
],
|
|
15
16
|
|
|
16
|
-
"rationale": "Toast is triggered imperatively (toast.success('Saved')) instead of rendered conditionally
|
|
17
|
+
"rationale": "Toast is triggered imperatively (toast.success('Saved')) instead of rendered conditionally, so feedback can be raised from anywhere. The toast.* calls and the rendered stack are linked through a plain module-level store, not React context, so a call works from code with no context; the trade-off is that exactly one <Toast /> is mounted per app, since every instance renders the same global queue. The stack is portaled to document.body so it stays above everything, because Toast has no native top-layer element. Toasts stack top-right at a fixed 340px width in an aria-live='polite' region, and depth grows downward so older toasts stay on screen; at most 3 show, and a 4th plays its exit and is removed. Stacking offsets are measured in pixels with offsetHeight, not set as a percentage, because a percentage offset breaks when toasts have different heights. Color lives only on the icon, never the card, which is why component.toast.icon.* is separate from Badge's icon tokens: on the plain page fill its dark-mode icons can be more saturated. Its timing, scale, fade and rise values stay literals: none lands on a semantic rung. Hover or focus inside a toast pauses auto-dismiss (WCAG 2.2.1), which is why it's never used for anything the user must act on. Toasts further back in the stack also soften (half of component.toast.depthBlur one step back, all of it two steps back) and sharpen when the stack spreads (transitions.dev banner stacking).",
|
|
17
18
|
|
|
18
19
|
"governance": {
|
|
19
20
|
"mayExtendLocally": [
|
|
@@ -33,8 +34,8 @@
|
|
|
33
34
|
},
|
|
34
35
|
|
|
35
36
|
"anatomy": [
|
|
36
|
-
{ "part": "toast-viewport", "element": "div", "description": "Fixed, top-right, portaled to document.body via createPortal (
|
|
37
|
-
{ "part": "toast", "element": "div", "description": "One notification. Background is always the page fill — color lives only on the icon, never the card (
|
|
37
|
+
{ "part": "toast-viewport", "element": "div", "description": "Fixed, top-right, portaled to document.body via createPortal (see rationale). Rendered by the <Toast /> component, mounted once by the consuming app." },
|
|
38
|
+
{ "part": "toast", "element": "div", "description": "One notification. Background is always the page fill — color lives only on the icon, never the card (see rationale), a deliberate difference from Badge's own tinted-surface convention." },
|
|
38
39
|
{ "part": "toast-icon", "element": "slot", "description": "A real Filled Tabler icon through the Icon component, fixed per variant — not caller-supplied like Badge's own icon prop." },
|
|
39
40
|
{ "part": "toast-content", "element": "div", "description": "Wraps the title and description." },
|
|
40
41
|
{ "part": "toast-title", "element": "span", "description": "Bold title text." },
|
|
@@ -62,8 +63,8 @@
|
|
|
62
63
|
"wcag": ["4.1.3 Status Messages", "1.4.13 Content on Hover or Focus",
|
|
63
64
|
"2.2.1 Timing Adjustable"],
|
|
64
65
|
"notes": [
|
|
65
|
-
"Triggered via the imperative `toast` object (toast.success/info/warning/danger/neutral(label, description?) — the description may also be passed Sonner-style as { description }), not props on <Toast /> itself — see
|
|
66
|
-
"Stacking depth (max 3 visible) and hover-to-spread use real measured pixel heights (offsetHeight), not percentage-based transforms — a percentage approach was tried and broken in the pre-implementation preview by two toasts of different heights; see
|
|
66
|
+
"Triggered via the imperative `toast` object (toast.success/info/warning/danger/neutral(label, description?) — the description may also be passed Sonner-style as { description }), not props on <Toast /> itself — see rationale. <Toast /> is the rendered stack, mounted once; it takes almost no props of its own. Calling toast.* with no <Toast /> mounted logs a console warning (nothing would be shown).",
|
|
67
|
+
"Stacking depth (max 3 visible) and hover-to-spread use real measured pixel heights (offsetHeight), not percentage-based transforms — a percentage approach was tried and broken in the pre-implementation preview by two toasts of different heights; see rationale."
|
|
67
68
|
],
|
|
68
69
|
"applied": {
|
|
69
70
|
"nativeElement": "div",
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
"$schema": "../component.schema.json",
|
|
3
3
|
"name": "Tooltip",
|
|
4
4
|
"version": "0.1.0",
|
|
5
|
-
"status": "
|
|
5
|
+
"status": "stable",
|
|
6
6
|
|
|
7
7
|
"purpose": "Reveals a short, non-interactive text label for whatever it wraps, on hover or keyboard focus — identifies an ambiguous control (an icon-only button, an avatar) without adding permanent visible text.",
|
|
8
8
|
"import": "import { Tooltip } from '@helixds/react';",
|
|
9
|
+
"archetype": "overlays",
|
|
9
10
|
|
|
10
11
|
"neverUseFor": [
|
|
11
12
|
"Interactive content (links, buttons) inside the popup — use Popover/Menu instead; Tooltip is read-only text",
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
"Long-form help text or instructions — keep it to a short phrase; use a Popover or inline description for anything longer"
|
|
14
15
|
],
|
|
15
16
|
|
|
16
|
-
"rationale": "Tooltip is a read-only text label shown on hover or focus and linked through aria-describedby (
|
|
17
|
+
"rationale": "Tooltip is a read-only text label shown on hover or focus and linked through aria-describedby, with a 240px max width. It is hand-rolled on the WAI-ARIA tooltip pattern with no external library: Radix or Floating UI were rejected because a short description label doesn't justify a positioning dependency. Show and hide are pure CSS (:hover and :focus-within, after a short show delay, hiding at once), so there's no mouseenter/mouseleave state to get wrong; the only JS is the Escape handler and placement. The content renders inline next to its trigger, with no portal, so an overflow: hidden ancestor can still clip it. placement is a preference, not a guarantee: on mount, resize and any scroll (capture phase), Tooltip measures the trigger and the content, which is always laid out with visibility: hidden so it can be measured, flips to the opposite side when the preferred one would come within 8px of the viewport edge, and clamps the cross axis to stay on screen. It never switches axis (a top tooltip with no room above or below won't fall back to left or right), a gap accepted for short labels. It's one of the floating surfaces allowed a shadow, and it can never be the only way to learn required information.",
|
|
17
18
|
|
|
18
19
|
"governance": {
|
|
19
20
|
"mayExtendLocally": [
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"props": [
|
|
43
44
|
{ "name": "label", "type": "string", "required": true, "description": "The tooltip's text content — short, plain text only, no interactive content." },
|
|
44
45
|
{ "name": "children", "type": "React.ReactElement", "required": true, "description": "The trigger — whatever the tooltip describes (an icon, an avatar, an icon-only button)." },
|
|
45
|
-
{ "name": "placement", "type": "'top' | 'bottom' | 'left' | 'right'", "default": "top", "description": "Preferred side of the trigger. Tooltip auto-flips to the opposite side (and clamps sideways) on its own if the preferred side would clip the viewport — this is a starting preference, not a guarantee (see
|
|
46
|
+
{ "name": "placement", "type": "'top' | 'bottom' | 'left' | 'right'", "default": "top", "description": "Preferred side of the trigger. Tooltip auto-flips to the opposite side (and clamps sideways) on its own if the preferred side would clip the viewport — this is a starting preference, not a guarantee (see rationale)." },
|
|
46
47
|
{ "name": "expanded", "type": "boolean | undefined", "description": "Forces the content visible regardless of hover/focus — for a controlled/always-shown case. Leave unset for the normal hover/focus-driven behavior." },
|
|
47
48
|
{ "name": "className", "type": "string | undefined", "description": "Additional className for the root." }
|
|
48
49
|
],
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
"purpose": "The fixed-height chrome bar at the top of a page — search, quick actions, and the current user, always in the same place.",
|
|
8
8
|
"import": "import { TopBar } from '@helixds/react';",
|
|
9
|
+
"archetype": "layout",
|
|
9
10
|
|
|
10
11
|
"neverUseFor": [
|
|
11
12
|
"The page title — use PageHeader inside the main content area instead",
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
|
|
35
36
|
"anatomy": [
|
|
36
37
|
{ "part": "topbar-root", "element": "header", "description": "Root — always a native <header>, fixed height." },
|
|
38
|
+
{ "part": "topbar-menu", "element": "div", "description": "Wraps the menu IconButton (IconMenu2, ghost, m) that opens/closes the collapsed SideNav. Rendered only inside an AppShell that has a sidenav, and only shown below 768px of the shell's width — see AppShell's sidenavExpanded. Not a prop: the AppShell provides it.", "optional": true },
|
|
37
39
|
{ "part": "topbar-start", "element": "div", "description": "Leading slot — typically a search Input.", "optional": true },
|
|
38
40
|
{ "part": "topbar-end", "element": "div", "description": "Trailing slot — typically IconButtons (notifications, help, quick actions). The current user lives in SideNav's footer, not here.", "optional": true }
|
|
39
41
|
],
|