@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.
Files changed (114) hide show
  1. package/AGENTS.md +4 -1
  2. package/dist/archetypes/actions-navigation.md +62 -0
  3. package/dist/archetypes/data-display.md +68 -0
  4. package/dist/archetypes/feedback-status.md +54 -0
  5. package/dist/archetypes/form-selection.md +61 -0
  6. package/dist/archetypes/foundation.md +56 -0
  7. package/dist/archetypes/layout.md +53 -0
  8. package/dist/archetypes/overlays.md +54 -0
  9. package/dist/archetypes/text-input.md +58 -0
  10. package/dist/components/Badge/Badge.types.d.ts +1 -1
  11. package/dist/components/Combobox/Combobox.d.ts +17 -0
  12. package/dist/components/Combobox/Combobox.doc.d.ts +4 -0
  13. package/dist/components/Combobox/Combobox.doc.js +41 -0
  14. package/dist/components/Combobox/Combobox.js +141 -0
  15. package/dist/components/Combobox/Combobox.types.d.ts +31 -0
  16. package/dist/components/Combobox/Combobox.types.js +2 -0
  17. package/dist/components/Combobox/index.d.ts +9 -0
  18. package/dist/components/Combobox/index.js +2 -0
  19. package/dist/components/Icon/Icon.doc.js +2 -2
  20. package/dist/components/Icon/Icon.js +1 -1
  21. package/dist/components/Icon/Icon.types.d.ts +1 -1
  22. package/dist/components/Icon/iconStroke.d.ts +1 -1
  23. package/dist/components/Icon/iconStroke.js +1 -1
  24. package/dist/components/Menu/Menu.doc.js +4 -4
  25. package/dist/components/Menu/Menu.js +3 -3
  26. package/dist/components/Menu/Menu.types.d.ts +1 -1
  27. package/dist/components/Modal/Modal.doc.js +1 -1
  28. package/dist/components/Modal/Modal.types.d.ts +1 -1
  29. package/dist/components/MultiSelect/MultiSelect.d.ts +2 -2
  30. package/dist/components/MultiSelect/MultiSelect.doc.js +1 -1
  31. package/dist/components/MultiSelect/MultiSelect.js +4 -4
  32. package/dist/components/Popover/Popover.d.ts +14 -0
  33. package/dist/components/Popover/Popover.doc.d.ts +4 -0
  34. package/dist/components/Popover/Popover.doc.js +47 -0
  35. package/dist/components/Popover/Popover.js +157 -0
  36. package/dist/components/Popover/Popover.types.d.ts +27 -0
  37. package/dist/components/Popover/Popover.types.js +2 -0
  38. package/dist/components/Popover/index.d.ts +9 -0
  39. package/dist/components/Popover/index.js +2 -0
  40. package/dist/components/SegmentedControl/SegmentedControl.doc.js +2 -2
  41. package/dist/components/SegmentedControl/SegmentedControl.js +1 -1
  42. package/dist/components/Select/Select.doc.js +2 -2
  43. package/dist/components/Select/Select.js +1 -1
  44. package/dist/components/SidePanel/SidePanel.doc.js +1 -1
  45. package/dist/components/SidePanel/SidePanel.types.d.ts +1 -1
  46. package/dist/components/Tabs/Tabs.d.ts +13 -0
  47. package/dist/components/Tabs/Tabs.doc.d.ts +4 -0
  48. package/dist/components/Tabs/Tabs.doc.js +47 -0
  49. package/dist/components/Tabs/Tabs.js +61 -0
  50. package/dist/components/Tabs/Tabs.types.d.ts +33 -0
  51. package/dist/components/Tabs/Tabs.types.js +2 -0
  52. package/dist/components/Tabs/index.d.ts +9 -0
  53. package/dist/components/Tabs/index.js +2 -0
  54. package/dist/components/Toast/Toast.doc.js +1 -1
  55. package/dist/components/Toast/Toast.js +2 -2
  56. package/dist/components/Toast/toastStore.d.ts +1 -1
  57. package/dist/components/Tooltip/Tooltip.doc.js +1 -1
  58. package/dist/components/Tooltip/Tooltip.js +5 -5
  59. package/dist/components/Tooltip/Tooltip.types.d.ts +1 -1
  60. package/dist/contracts/Accordion.json +5 -4
  61. package/dist/contracts/AppShell.json +111 -28
  62. package/dist/contracts/Avatar.json +3 -2
  63. package/dist/contracts/AvatarGroup.json +1 -0
  64. package/dist/contracts/Badge.json +2 -1
  65. package/dist/contracts/Button.json +2 -1
  66. package/dist/contracts/Card.json +3 -2
  67. package/dist/contracts/Chart.json +2 -1
  68. package/dist/contracts/Checkbox.json +1 -0
  69. package/dist/contracts/CheckboxGroup.json +1 -0
  70. package/dist/contracts/Chip.json +3 -2
  71. package/dist/contracts/ChipGroup.json +1 -0
  72. package/dist/contracts/Combobox.json +431 -0
  73. package/dist/contracts/FAB.json +3 -2
  74. package/dist/contracts/Icon.json +10 -9
  75. package/dist/contracts/IconButton.json +2 -1
  76. package/dist/contracts/Input.json +2 -1
  77. package/dist/contracts/Menu.json +7 -6
  78. package/dist/contracts/Modal.json +5 -4
  79. package/dist/contracts/MultiSelect.json +6 -5
  80. package/dist/contracts/NavItem.json +2 -1
  81. package/dist/contracts/PageHeader.json +1 -0
  82. package/dist/contracts/Popover.json +322 -0
  83. package/dist/contracts/RadioButton.json +1 -0
  84. package/dist/contracts/RadioGroup.json +1 -0
  85. package/dist/contracts/SegmentedControl.json +4 -3
  86. package/dist/contracts/Select.json +9 -9
  87. package/dist/contracts/SideNav.json +2 -1
  88. package/dist/contracts/SidePanel.json +5 -4
  89. package/dist/contracts/Switch.json +1 -0
  90. package/dist/contracts/Table.json +1 -0
  91. package/dist/contracts/Tabs.json +353 -0
  92. package/dist/contracts/Textarea.json +2 -1
  93. package/dist/contracts/Toast.json +6 -5
  94. package/dist/contracts/Tooltip.json +4 -3
  95. package/dist/contracts/TopBar.json +2 -0
  96. package/dist/contracts/manifest.json +1539 -44
  97. package/dist/index.d.ts +9 -0
  98. package/dist/index.js +6 -0
  99. package/dist/layout/AppShell/AppShell.d.ts +1 -1
  100. package/dist/layout/AppShell/AppShell.doc.js +5 -0
  101. package/dist/layout/AppShell/AppShell.js +109 -2
  102. package/dist/layout/AppShell/AppShell.types.d.ts +6 -0
  103. package/dist/layout/AppShell/AppShellContext.d.ts +17 -0
  104. package/dist/layout/AppShell/AppShellContext.js +4 -0
  105. package/dist/layout/SideNav/SideNav.doc.js +1 -0
  106. package/dist/layout/TopBar/TopBar.js +7 -1
  107. package/dist/lib/useDialogTransition.d.ts +1 -1
  108. package/dist/lib/useDialogTransition.js +1 -1
  109. package/dist/lib/useDisclosureTransition.d.ts +1 -1
  110. package/dist/lib/useDisclosureTransition.js +1 -1
  111. package/dist/patterns/expand-collapse-chevron.md +1 -1
  112. package/dist/patterns/motion-effects.md +2 -4
  113. package/package.json +26 -4
  114. package/src/globals.css +338 -22
package/AGENTS.md CHANGED
@@ -64,15 +64,17 @@ All components import from `@helixds/react`. Generated from `contracts/manifest.
64
64
  | `CheckboxGroup` | core | Lets users choose zero or more options from a small, visible set of independent choices. |
65
65
  | `Chip` | core | Represents a compact selectable label for filters, categories, or short choices. |
66
66
  | `ChipGroup` | core | Shows a small set of related chips side by side — categories, tags or applied filters — as one labelled group. |
67
+ | `Combobox` | core | Lets users find and choose a single value from a long list by typing to filter it. |
67
68
  | `FAB` | core | A single, prominent floating action reachable from anywhere in the current view — optionally expanding into 1-3 closely related actions via a speed-dial. |
68
69
  | `Icon` | core | Communicates meaning, action, or status through a recognizable visual symbol. |
69
70
  | `IconButton` | core | Triggers an action via a single icon, with no visible text label — a toolbar action, a row action, a close/dismiss control. |
70
71
  | `Input` | core | Allows users to enter a single line of free-form text. |
71
- | `Menu` | core | A Helix-styled, portaled popup listbox anchored to a trigger element — the internal primitive Select uses instead of a native <select> dropdown, and the foundation for any future popup list (Combobox, a context menu, a DatePicker's own internals). |
72
+ | `Menu` | core | A Helix-styled, portaled popup listbox anchored to a trigger element — the internal primitive Select uses instead of a native <select> dropdown, and the foundation for any future popup list (a context menu, a DatePicker's own internals). |
72
73
  | `Modal` | core | A centered overlay that interrupts the page for a focused task or decision — blocks interaction with the rest of the page until dismissed. |
73
74
  | `MultiSelect` | core | Lets users choose several values from a predefined list, shown as removable chips inside the field. |
74
75
  | `NavItem` | core | A single entry in a persistent navigation list (a SideNav, a tab rail) that links to another view. |
75
76
  | `PageHeader` | layout | Introduces a page or major section: title, optional supporting description, and trailing actions in one consistent row. |
77
+ | `Popover` | core | Shows a small, non-modal panel of rich content — a title, text and actions — anchored to the control that opened it, without blocking the rest of the page. |
76
78
  | `RadioButton` | core | A single radio input — the individual option unit RadioGroup renders per choice, exposed on its own for cases that need one radio outside a full group (e.g. |
77
79
  | `RadioGroup` | core | Lets users choose exactly one option from a small, visible set of mutually exclusive choices. |
78
80
  | `SegmentedControl` | core | Lets users switch between a small, fixed set of mutually exclusive modes or views, with no associated content panel. |
@@ -81,6 +83,7 @@ All components import from `@helixds/react`. Generated from `contracts/manifest.
81
83
  | `SidePanel` | core | A modal panel anchored to the right edge of the viewport, for a persistent secondary task alongside — but still blocking — the main page (details, a form, a filter builder). |
82
84
  | `Switch` | core | Lets users toggle a single setting on or off, with the change taking effect immediately. |
83
85
  | `Table` | core | Displays tabular data edge-to-edge — rows and columns of related records, e.g. |
86
+ | `Tabs` | core | 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. |
84
87
  | `Textarea` | core | Lets users enter multi-line free-form text. |
85
88
  | `Toast` | core | 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. |
86
89
  | `Tooltip` | core | 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. |
@@ -0,0 +1,62 @@
1
+ ---
2
+ archetype: actions-navigation
3
+ title: Actions and navigation
4
+ question: "The user presses something. Does it do an action or go somewhere — and with which component?"
5
+ components: [Button, IconButton, FAB, NavItem, Tabs]
6
+ boundary: [Menu, SideNav, Tooltip, Checkbox, Switch, SegmentedControl, Chip, Accordion]
7
+ gaps: []
8
+ ---
9
+
10
+ # Archetype: Actions and navigation
11
+
12
+ Everything the user presses to make something happen or to move to another view. Each component's
13
+ contract says what it is on its own; this playbook puts them side by side.
14
+
15
+ **Evidence tags.** Every rule ends with where it comes from:
16
+ `[Name.neverUseFor]`, `[Name.purpose]`, `[Name.rationale]` = written in that component's approved contract ·
17
+ `[pattern: name]` = an approved `.ai/maps/patterns/` file ·
18
+ `[proposed]` = a cross-component rule no contract states yet — **needs the design-system owner's approval**
19
+ before anyone treats it as Helix's rule. `pnpm verify:archetypes` checks every tag.
20
+
21
+ ## Decision tree
22
+
23
+ Ask in order; the first yes wins.
24
+
25
+ 1. Does it take the user to another view of the app, from a persistent nav list? → `NavItem` (a real link), inside `SideNav`. [NavItem.purpose] [NavItem.rationale]
26
+ 2. Does it switch between sections of content inside the same page, one panel at a time? → `Tabs` — not `NavItem` (pages) and not `SegmentedControl` (no panel). [Tabs.purpose] [Tabs.neverUseFor]
27
+ 3. Is it a link inside body text, or plain page-to-page navigation outside the nav? → a plain `<a>`, styled separately — not a `Button`. [Button.neverUseFor] [NavItem.neverUseFor]
28
+ 4. Does it keep an on/off state after it's pressed? → not an action: `Switch` or `Checkbox`. [Button.neverUseFor] [IconButton.neverUseFor] [FAB.neverUseFor]
29
+ 5. Is it the single most important action of the view, and should it be reachable from anywhere while scrolling? → `FAB` — and the same action also exists in the page's flow. [FAB.purpose] [FAB.neverUseFor]
30
+ 6. Is it an action with a universally recognizable icon, where space is tight (toolbar, table row, close)? → `IconButton`, with its required label; add a `Tooltip` for the visible hint. [IconButton.purpose] [IconButton.rationale] [Tooltip.purpose]
31
+ 7. Anything else that does an action → `Button`. [Button.purpose]
32
+
33
+ Several actions in a row (page CTAs, toolbar, batch actions) → the action-bar pattern, 4px apart. [pattern: action-bar] [pattern: group-spacing]
34
+
35
+ ## Side by side
36
+
37
+ | | `Button` | `IconButton` | `FAB` | `NavItem` | `Tabs` | Source |
38
+ |---|---|---|---|---|---|---|
39
+ | Does | An action | An action | The view's main action | Goes to another view | Shows another section of the same page | [Button.purpose] [IconButton.purpose] [FAB.purpose] [NavItem.purpose] [Tabs.purpose] |
40
+ | Element | `<button>` | `<button>` | `<button>` | `<a href>` | `role="tab"` buttons + a `tabpanel` | [NavItem.rationale] [Tabs.rationale] |
41
+ | Visible text | Yes | No — label required in code | No (shortcut) | Yes | Yes | [IconButton.rationale] [Tabs.purpose] |
42
+ | How many per view | Any, primary one at a time | Any | One at most | One per destination | ~6 tabs at most | [FAB.neverUseFor] [Tabs.neverUseFor] [proposed] |
43
+ | Floats / shadow | No | No | Yes (ADR-005) | No | No | [FAB.rationale] |
44
+ | Heights | s / m / l (ADR-004) | Same as `Button` | 48px | Nav row | 32px, fixed | [Button.rationale] [IconButton.rationale] [FAB.rationale] [Tabs.rationale] |
45
+
46
+ ## Don't use X — use Y
47
+
48
+ - Saving, deleting or opening a dialog with a `NavItem` → `Button`. [NavItem.neverUseFor]
49
+ - Navigating between pages with a `Button` → `<a>`, or `NavItem` in the nav. [Button.neverUseFor]
50
+ - A `Button` or `<a>` among `SideNav`'s entries → `NavItem`. [SideNav.neverUseFor]
51
+ - An `IconButton` whose icon isn't instantly recognizable → `Button` with a text label. [IconButton.neverUseFor]
52
+ - The primary CTA of a view as an `IconButton` → a labelled `Button`. [IconButton.neverUseFor]
53
+ - A second `FAB` on the same screen → one `FAB`; the rest in the page. [FAB.neverUseFor]
54
+ - A `FAB` speed-dial with more than 3 actions → `Menu`. [FAB.neverUseFor]
55
+ - An action that only exists in the `FAB` → put it in the page's flow too. [FAB.neverUseFor]
56
+ - A page's main action as a `Chip` → `Button`. [Chip.neverUseFor]
57
+ - Primary navigation hidden in an `Accordion` → `SideNav` / `NavItem`. [Accordion.neverUseFor]
58
+ - A mode switch drawn as a row of `Button`s → `SegmentedControl`. [SegmentedControl.purpose] [proposed]
59
+ - Routing between pages with `Tabs` → `NavItem`. [Tabs.neverUseFor]
60
+ - A row of `Tabs` with no panels → `SegmentedControl`. [Tabs.neverUseFor]
61
+ - More than ~6 sections, or long labels, in `Tabs` → split the page, or a `Select`. [Tabs.neverUseFor]
62
+ - Submitting a form with a `Button` that has no explicit `type` → `type="submit"`. [Button.neverUseFor]
@@ -0,0 +1,68 @@
1
+ ---
2
+ archetype: data-display
3
+ title: Showing data and content
4
+ question: "I have records, numbers, people or grouped content to show. Which component?"
5
+ components: [Table, Chart, Card, Avatar, AvatarGroup, Accordion]
6
+ boundary: [Badge, Modal, AppShell, SideNav, NavItem, Tooltip]
7
+ gaps: [List, Image, Logo]
8
+ ---
9
+
10
+ # Archetype: Showing data and content
11
+
12
+ Everything that presents information inside the page: records, metrics, grouped content, people, content
13
+ the user opens on demand. Each component's contract says what it is on its own; this playbook puts them
14
+ side by side.
15
+
16
+ **Evidence tags.** Every rule ends with where it comes from:
17
+ `[Name.neverUseFor]`, `[Name.purpose]`, `[Name.rationale]` = written in that component's approved contract ·
18
+ `[pattern: name]` = an approved `.ai/maps/patterns/` file ·
19
+ `[proposed]` = a cross-component rule no contract states yet — **needs the design-system owner's approval**
20
+ before anyone treats it as Helix's rule. `pnpm verify:archetypes` checks every tag.
21
+
22
+ ## Decision tree
23
+
24
+ Ask in order; the first yes wins.
25
+
26
+ 1. Rows and columns of related records (members, invoices)? → `Table`. [Table.purpose]
27
+ 2. A trend, a comparison or a composition of a metric? → `Chart` — with a `Table` next to it when the exact values matter. [Chart.purpose] [Chart.neverUseFor]
28
+ 3. One headline number with its context? → the stat-card pattern. [pattern: stat-card]
29
+ 4. The key/value details of a single record? → a description list, not a `Table`. [Table.neverUseFor]
30
+ 5. Related content grouped on one surface (a widget, a settings group, a tile)? → `Card`. [Card.purpose]
31
+ 6. One person or entity? → `Avatar`. Several on the same record → `AvatarGroup`. A full roster where every name matters → `Table` with an `Avatar` per row. [Avatar.purpose] [AvatarGroup.purpose] [AvatarGroup.neverUseFor]
32
+ 7. Secondary content the user opens only if they need it? → `Accordion` — never for content they must see. [Accordion.purpose] [Accordion.neverUseFor]
33
+
34
+ A page that combines them (filters, KPIs, charts, a table) → the data-analytics pattern. [pattern: data-analytics]
35
+
36
+ ## Side by side
37
+
38
+ | | `Table` | `Chart` | `Card` | `Avatar` / `AvatarGroup` | `Accordion` | Source |
39
+ |---|---|---|---|---|---|---|
40
+ | Shows | Records | A metric | Grouped content | Identity | Content on demand | [Table.purpose] [Chart.purpose] [Card.purpose] [Avatar.purpose] [Accordion.purpose] |
41
+ | Built on | Native `<table>` | Token-branded engine + a data table | A flat surface | The field size scale | Native `<details>` | [Table.rationale] [Chart.rationale] [Card.rationale] [Avatar.rationale] [Accordion.rationale] |
42
+ | Edges | Edge to edge | — | Consumer's layout decides | 24/32/40px | — | [Table.purpose] [Card.rationale] [Avatar.rationale] |
43
+ | Shadow | No | No | Never — it doesn't float | No | No | [Card.rationale] |
44
+
45
+ ## Don't use X — use Y
46
+
47
+ - One row per `Card` in a list → `Table`, edge to edge. [Table.neverUseFor] [Card.neverUseFor]
48
+ - A `Table` as a layout grid for free-form content → it's for real row/column data. [Table.neverUseFor]
49
+ - A `Card` as a dialog → `Modal`. [Card.neverUseFor]
50
+ - A `Card` as the page's structure → `AppShell`. [Card.neverUseFor]
51
+ - Exact audit values only in a `Chart` → add a `Table`. [Chart.neverUseFor]
52
+ - A donut with more than six categories → not allowed. [Chart.neverUseFor]
53
+ - Raw chart-library options → `Chart`'s own API. [Chart.neverUseFor]
54
+ - Status shown with an `Avatar` → `Badge`. [Avatar.neverUseFor]
55
+ - A brand logo or a hero image in an `Avatar` → not an `Avatar` (`Image` and `Logo` are gaps). [Avatar.neverUseFor]
56
+ - An `AvatarGroup` for one person → `Avatar`. [AvatarGroup.neverUseFor]
57
+ - Primary navigation inside an `Accordion` → `SideNav` / `NavItem`. [Accordion.neverUseFor]
58
+ - An `Accordion` around one section that's always visible → render the content directly. [Accordion.neverUseFor]
59
+
60
+ ## Gaps — referenced by contracts, not in Helix
61
+
62
+ | Name | Cited by | What to use today |
63
+ |---|---|---|
64
+ | `List` | `Card`, `AvatarGroup` (neverUseFor) | `Table` |
65
+ | `Image` | `Avatar`, `Icon` (neverUseFor) | A plain `<img>` |
66
+ | `Logo` | `Avatar`, `Icon` (neverUseFor) | A plain `<img>` / inline SVG |
67
+
68
+ The owner decides for each one: build it, or correct the contracts that cite it.
@@ -0,0 +1,54 @@
1
+ ---
2
+ archetype: feedback-status
3
+ title: Feedback and status
4
+ question: "I need to tell the user something about the state of things. Which component?"
5
+ components: [Toast, Badge, Chip, ChipGroup]
6
+ boundary: [Modal, Input, Textarea, Button, Avatar, NavItem, MultiSelect, CheckboxGroup, RadioGroup, SegmentedControl, Tabs]
7
+ gaps: []
8
+ ---
9
+
10
+ # Archetype: Feedback and status
11
+
12
+ Everything that reports a result, a state or a label: a message after an action, the status of a record, a
13
+ category tag. Each component's contract says what it is on its own; this playbook puts them side by side.
14
+
15
+ **Evidence tags.** Every rule ends with where it comes from:
16
+ `[Name.neverUseFor]`, `[Name.purpose]`, `[Name.rationale]` = written in that component's approved contract ·
17
+ `[pattern: name]` = an approved `.ai/maps/patterns/` file ·
18
+ `[proposed]` = a cross-component rule no contract states yet — **needs the design-system owner's approval**
19
+ before anyone treats it as Helix's rule. `pnpm verify:archetypes` checks every tag.
20
+
21
+ ## Decision tree
22
+
23
+ Ask in order; the first yes wins.
24
+
25
+ 1. Must the user act on it before going on? → `Modal` (overlays archetype), never a `Toast`. [Toast.neverUseFor]
26
+ 2. Is it a validation error on a form field? → the field's own inline error (`Input`, `Textarea`…), never a `Toast`. [Toast.neverUseFor]
27
+ 3. Is it the result of something the user just did, and fine to lose after a few seconds? → `Toast`. [Toast.purpose] [Toast.neverUseFor]
28
+ 4. Is it the current status of a record (active, pending, failed…) shown next to it? → `Badge`, with a label that says the status in words. [Badge.purpose] [pattern: status-row]
29
+ 5. Is it a count? → `Badge`. [Badge.purpose]
30
+ 6. Is it a category, tag or applied filter the user can select or remove? → `Chip`; several related ones → `ChipGroup`. [Chip.purpose] [ChipGroup.purpose]
31
+ 7. Is it the page having nothing to show? → the empty-state pattern, not a lone `Badge`. [pattern: empty-state]
32
+
33
+ ## Side by side
34
+
35
+ | | `Toast` | `Badge` | `Chip` / `ChipGroup` | Source |
36
+ |---|---|---|---|---|
37
+ | Interactive | Only its own action/close | No — a label | Yes, a real button | [Badge.rationale] [Chip.rationale] |
38
+ | Stays on screen | No, auto-dismisses | Yes, part of the content | Yes | [Toast.neverUseFor] |
39
+ | Tied to | An event, raised from anywhere | A record or item | A filter or category | [Toast.purpose] [Badge.purpose] [Chip.purpose] |
40
+ | Text length | A short message | ≤ 24 characters | Short labels | [Badge.neverUseFor] [Chip.neverUseFor] |
41
+ | Meaning by color alone | — | Never: the label says it too | — | [pattern: status-row] |
42
+
43
+ ## Don't use X — use Y
44
+
45
+ - A message the user must act on, in a `Toast` → `Modal`. [Toast.neverUseFor]
46
+ - Field validation in a `Toast` → inline, next to the field. [Toast.neverUseFor]
47
+ - Something the user needs to refer back to, in a `Toast` → keep it on the page (a `Badge`, a status row). [Toast.neverUseFor] [proposed]
48
+ - A `Badge` as decoration with no meaning → remove it. [Badge.neverUseFor]
49
+ - A `Badge` as a navigation item → `NavItem`. [Badge.neverUseFor]
50
+ - A `Chip` as a page's main action → `Button`. [Chip.neverUseFor]
51
+ - A destructive confirmation built from `Chip`s → a `Button` pair. [Chip.neverUseFor]
52
+ - A `ChipGroup` as on/off choices → `CheckboxGroup`, `RadioGroup` or `SegmentedControl`; values picked from a list → `MultiSelect`. [ChipGroup.neverUseFor]
53
+ - Status shown with an `Avatar` → `Badge`; `Avatar` is identity, not state. [Avatar.neverUseFor]
54
+ - A `Badge` used as a navigation tab → `NavItem` for pages, `Tabs` for sections of one page. [Badge.neverUseFor]
@@ -0,0 +1,61 @@
1
+ ---
2
+ archetype: form-selection
3
+ title: Choosing in a form
4
+ question: "The user has to pick something. Which control?"
5
+ components: [Select, Combobox, MultiSelect, RadioGroup, RadioButton, CheckboxGroup, Checkbox, Switch, SegmentedControl]
6
+ boundary: [Input, Textarea, Button, Menu, Chip, ChipGroup, NavItem, IconButton, Tabs]
7
+ gaps: []
8
+ ---
9
+
10
+ # Archetype: Choosing in a form
11
+
12
+ Every control that lets the user pick from options or turn something on and off. Each component's contract
13
+ says what it is on its own; this playbook puts them side by side.
14
+
15
+ **Evidence tags.** Every rule ends with where it comes from:
16
+ `[Name.neverUseFor]`, `[Name.purpose]`, `[Name.rationale]` = written in that component's approved contract ·
17
+ `[pattern: name]` = an approved `.ai/maps/patterns/` file ·
18
+ `[proposed]` = a cross-component rule no contract states yet — **needs the design-system owner's approval**
19
+ before anyone treats it as Helix's rule. `pnpm verify:archetypes` checks every tag.
20
+
21
+ ## Decision tree
22
+
23
+ Ask in order; the first yes wins.
24
+
25
+ 1. Does the user type the value freely? → not a selection: `Input` or `Textarea`. [Select.neverUseFor] [MultiSelect.neverUseFor]
26
+ 2. Is it one setting that turns on or off and applies at once? → `Switch`. [Switch.purpose]
27
+ 3. Is it one on/off choice confirmed later with a submit (accept terms, remember me)? → `Checkbox`. [Checkbox.purpose] [Switch.neverUseFor]
28
+ 4. Is it switching the mode or view of what's on screen, with ≤ ~5 short options and no content panel? → `SegmentedControl`. [SegmentedControl.purpose] [SegmentedControl.neverUseFor]
29
+ 5. Exactly one value from a **small** set that should all stay visible? → `RadioGroup`. [RadioGroup.purpose] [RadioGroup.rationale]
30
+ 6. Exactly one value from a **longer** list? → `Select`. [Select.purpose] [RadioGroup.neverUseFor]
31
+ …and the list is long enough that the user needs to type to find it? → `Combobox`. [Combobox.purpose] [Combobox.neverUseFor]
32
+ 7. Several values from a **small** visible set? → `CheckboxGroup`. [CheckboxGroup.purpose] [MultiSelect.neverUseFor]
33
+ 8. Several values from a **longer** list? → `MultiSelect`. [MultiSelect.purpose] [CheckboxGroup.rationale]
34
+
35
+ `RadioButton` is the unit `RadioGroup` renders; it's only used alone when building a custom layout. [RadioButton.purpose] [RadioButton.neverUseFor]
36
+
37
+ ## Side by side
38
+
39
+ | | `Switch` | `Checkbox` | `RadioGroup` | `CheckboxGroup` | `SegmentedControl` | `Select` | `Combobox` | `MultiSelect` | Source |
40
+ |---|---|---|---|---|---|---|---|---|---|
41
+ | How many values | On/off | On/off | Exactly one | Zero or more | Exactly one | Exactly one | Exactly one | Several | [Switch.purpose] [Checkbox.purpose] [RadioGroup.purpose] [CheckboxGroup.purpose] [SegmentedControl.purpose] [Select.purpose] [Combobox.purpose] [MultiSelect.purpose] |
42
+ | Takes effect | Immediately | On submit | On submit | On submit | Immediately (a view) | On submit | On submit | On submit | [Switch.purpose] [Switch.neverUseFor] [SegmentedControl.purpose] [proposed] |
43
+ | Options visible | — | — | All | All | All | In a `Menu` | In a `Menu`, filtered as you type | In a `Menu` | [Select.rationale] [Combobox.rationale] [MultiSelect.rationale] |
44
+ | Good for | A setting | A consent or a single flag | A small set | A small set | ≤ ~5 short modes | A longer list | A long list you search by typing | A longer list | [SegmentedControl.neverUseFor] [Combobox.neverUseFor] [RadioGroup.rationale] [CheckboxGroup.rationale] |
45
+ | Height | s 16px / m 20px track | 16px control | 16px control | 16px control | 24px | 32px | 32px | 32px, grows with chips | [Switch.rationale] [Checkbox.rationale] [SegmentedControl.rationale] [Select.rationale] [Combobox.rationale] [MultiSelect.rationale] |
46
+
47
+ ## Don't use X — use Y
48
+
49
+ - Mutually exclusive choices as `Checkbox`es or `Switch`es → `RadioGroup`. [Checkbox.neverUseFor] [Switch.neverUseFor] [CheckboxGroup.neverUseFor]
50
+ - A setting applied immediately as a `Checkbox` → `Switch`. [Checkbox.neverUseFor]
51
+ - A choice that needs confirming, as a `Switch` → `Checkbox` + `Button`. [Switch.neverUseFor]
52
+ - An action triggered by a `Checkbox` → `Button`. [Checkbox.neverUseFor]
53
+ - Many options, or options that need search, in a `RadioGroup` → `Select`; in a `CheckboxGroup` → `MultiSelect`. [RadioGroup.neverUseFor] [CheckboxGroup.neverUseFor]
54
+ - A handful of options that should all stay visible, in a `MultiSelect` → `CheckboxGroup`. [MultiSelect.neverUseFor]
55
+ - A short list (about 7 options or fewer) in a `Combobox` → `Select` or `RadioGroup`; several values in a `Combobox` → `MultiSelect`. [Combobox.neverUseFor]
56
+ - A single value in a `MultiSelect` → `Select`; several values in a `Select` → `MultiSelect` or `CheckboxGroup`. [MultiSelect.neverUseFor] [Select.neverUseFor]
57
+ - Real page navigation in a `SegmentedControl` → `NavItem`. [SegmentedControl.neverUseFor]
58
+ - More than ~5 options or long labels in a `SegmentedControl` → `RadioGroup` or `Select`. [SegmentedControl.neverUseFor]
59
+ - Toggling a view with icons only (table vs. cards) → the view-toggle pattern. [pattern: view-toggle]
60
+ - Choices drawn as a `ChipGroup` → one of the controls above. [ChipGroup.neverUseFor]
61
+ - A `SegmentedControl` whose options switch a content panel → `Tabs`. [SegmentedControl.neverUseFor] [Tabs.neverUseFor]
@@ -0,0 +1,56 @@
1
+ ---
2
+ archetype: foundation
3
+ title: Icons and symbols
4
+ question: "I need a symbol. Is it an Icon, and how?"
5
+ components: [Icon]
6
+ boundary: [IconButton, Tooltip, Avatar, Button]
7
+ gaps: [Illustration, Image, Logo]
8
+ ---
9
+
10
+ # Archetype: Icons and symbols
11
+
12
+ The building block other components render through. There is one member today, `Icon`; the family is where
13
+ anything symbolic that isn't a control goes. Its contract says what it is; this playbook says where it stops.
14
+
15
+ **Evidence tags.** Every rule ends with where it comes from:
16
+ `[Name.neverUseFor]`, `[Name.purpose]`, `[Name.rationale]` = written in that component's approved contract ·
17
+ `[pattern: name]` = an approved `.ai/maps/patterns/` file ·
18
+ `[proposed]` = a cross-component rule no contract states yet — **needs the design-system owner's approval**
19
+ before anyone treats it as Helix's rule. `pnpm verify:archetypes` checks every tag.
20
+
21
+ ## Decision tree
22
+
23
+ Ask in order; the first yes wins.
24
+
25
+ 1. Is the symbol the only thing that says what something means? → add visible text or a label: an `Icon` is always supplemental. [Icon.purpose] [Icon.rationale]
26
+ 2. Is it a control the user presses, with no visible text? → `IconButton` (label required), with a `Tooltip` for the hint. [IconButton.purpose] [Tooltip.purpose]
27
+ 3. Is it a brand logo? → not an `Icon` (`Logo` / `Image` are gaps). [Icon.neverUseFor]
28
+ 4. Is it a decorative illustration? → not an `Icon` (`Illustration` is a gap). [Icon.neverUseFor]
29
+ 5. Is it a person or an entity? → `Avatar`. [Avatar.purpose]
30
+ 6. Any other symbol → `Icon`, never a raw Tabler tag. [Icon.rationale]
31
+
32
+ ## Side by side
33
+
34
+ | | `Icon` | `IconButton` | `Avatar` | Source |
35
+ |---|---|---|---|---|
36
+ | Is | A symbol next to text | An action | Identity | [Icon.purpose] [IconButton.purpose] [Avatar.purpose] |
37
+ | Accessible name | From the text beside it | Required by the type | From `label` | [Icon.rationale] [IconButton.rationale] [Avatar.rationale] |
38
+ | Stroke | Derived from size (ADR-014) | Through `Icon` | — | [Icon.rationale] |
39
+
40
+ ## Don't use X — use Y
41
+
42
+ - Passing `stroke` to make an icon heavier or lighter → let `Icon` derive it from its size. [Icon.rationale]
43
+ - An animated icon → wrap the `Icon` in a motion component. [Icon.neverUseFor]
44
+ - A brand logo as an `Icon` → `Image` / `Logo` (gaps). [Icon.neverUseFor]
45
+ - An illustration as an `Icon` → `Illustration` (gap). [Icon.neverUseFor]
46
+ - An `Icon` alone conveying information → text or a label beside it. [Icon.purpose]
47
+
48
+ ## Gaps — referenced by contracts, not in Helix
49
+
50
+ | Name | Cited by | What to use today |
51
+ |---|---|---|
52
+ | `Illustration` | `Icon` (neverUseFor) | An inline SVG or `<img>` |
53
+ | `Image` | `Icon`, `Avatar` (neverUseFor) | A plain `<img>` |
54
+ | `Logo` | `Icon`, `Avatar` (neverUseFor) | A plain `<img>` / inline SVG |
55
+
56
+ The owner decides for each one: build it, or correct the contracts that cite it.
@@ -0,0 +1,53 @@
1
+ ---
2
+ archetype: layout
3
+ title: Page structure
4
+ question: "Where does each part of the page go?"
5
+ components: [AppShell, PageHeader, SideNav, TopBar]
6
+ boundary: [NavItem, Card, Button, Tabs]
7
+ gaps: []
8
+ ---
9
+
10
+ # Archetype: Page structure
11
+
12
+ The pieces every screen is built from: the shell, the navigation rail, the top bar and the header of each
13
+ view. Each component's contract says what it is on its own; this playbook puts them side by side. They live
14
+ in code and Storybook only — not in Figma, for now (CLAUDE.md rule 11b).
15
+
16
+ **Evidence tags.** Every rule ends with where it comes from:
17
+ `[Name.neverUseFor]`, `[Name.purpose]`, `[Name.rationale]` = written in that component's approved contract ·
18
+ `[pattern: name]` = an approved `.ai/maps/patterns/` file ·
19
+ `[proposed]` = a cross-component rule no contract states yet — **needs the design-system owner's approval**
20
+ before anyone treats it as Helix's rule. `pnpm verify:archetypes` checks every tag.
21
+
22
+ ## Decision tree
23
+
24
+ Ask in order; the first yes wins.
25
+
26
+ 1. Does the page have no persistent navigation (login, marketing)? → no shell: render the content directly. [AppShell.neverUseFor]
27
+ 2. The outer structure of an app page (navigation, top bar, scrolling content)? → `AppShell`, once, at the root. [AppShell.purpose] [AppShell.neverUseFor]
28
+ 3. The app's main navigation? → `SideNav`, with only `NavItem`s as entries. [SideNav.purpose] [SideNav.neverUseFor]
29
+ 4. Search, global actions, the current user? → `TopBar`. [TopBar.purpose]
30
+ 5. The title of the view, its description and its main actions? → `PageHeader`, once per view. [PageHeader.purpose] [PageHeader.neverUseFor]
31
+ 6. Switching between sections inside one page? → `Tabs` (actions-navigation archetype), not the `SideNav`. [SideNav.neverUseFor] [Tabs.purpose]
32
+ 7. The title of a card or a panel? → `Card`'s own header, not a `PageHeader`. [PageHeader.neverUseFor]
33
+
34
+ ## Side by side
35
+
36
+ | | `AppShell` | `SideNav` | `TopBar` | `PageHeader` | Source |
37
+ |---|---|---|---|---|---|
38
+ | How many | One per page, at the root | One, inside the shell | One, inside the shell | One per view | [AppShell.neverUseFor] [SideNav.purpose] [TopBar.purpose] [PageHeader.neverUseFor] |
39
+ | Holds | Nav + top bar + the one `<main>` | Brand, `NavItem`s, user footer | Search, global actions, user | Title, description, actions | [AppShell.purpose] [SideNav.purpose] [TopBar.purpose] [PageHeader.purpose] |
40
+ | Scrolls | Owns the single scroll container | Persistent | Never — fixed chrome | — | [AppShell.rationale] [TopBar.neverUseFor] |
41
+ | Size | Full height | 224px wide | 56px tall | — | [SideNav.rationale] [TopBar.rationale] |
42
+ | Landmark | The page's only `<main>` | `<nav>` | — | — | [AppShell.rationale] [SideNav.rationale] |
43
+
44
+ ## Don't use X — use Y
45
+
46
+ - `display: flex; min-height: 100vh` written by hand → `AppShell`. [AppShell.purpose]
47
+ - An `AppShell` inside a section of a page that already has one → one shell, at the root. [AppShell.neverUseFor]
48
+ - The page title in the `TopBar` → `PageHeader`, inside the main content. [TopBar.neverUseFor]
49
+ - Primary navigation in the `TopBar` → `SideNav`. [TopBar.neverUseFor]
50
+ - A `Button` or a plain `<a>` among `SideNav`'s entries → `NavItem`. [SideNav.neverUseFor]
51
+ - Breadcrumbs in the `SideNav` or the `PageHeader` → neither: they're per-page wayfinding. [SideNav.neverUseFor] [PageHeader.neverUseFor]
52
+ - A `PageHeader` repeated in a list → once per view. [PageHeader.neverUseFor]
53
+ - A `Card` as the page's structure → `AppShell`. [Card.neverUseFor]
@@ -0,0 +1,54 @@
1
+ ---
2
+ archetype: overlays
3
+ title: Overlays
4
+ question: "Something has to appear on top of the page. Which surface?"
5
+ components: [Modal, SidePanel, Tooltip, Menu, Popover]
6
+ boundary: [Toast, Select, MultiSelect, IconButton, Avatar, Button]
7
+ gaps: []
8
+ ---
9
+
10
+ # Archetype: Overlays
11
+
12
+ Every surface that floats above the page. Each component's contract says what it is on its own; this
13
+ playbook puts them side by side so an agent or a designer picks one by the problem, not by habit.
14
+
15
+ **Evidence tags.** Every rule ends with where it comes from:
16
+ `[Name.neverUseFor]`, `[Name.purpose]`, `[Name.rationale]` = written in that component's approved contract ·
17
+ `[pattern: name]` = an approved `.ai/maps/patterns/` file ·
18
+ `[proposed]` = a cross-component rule no contract states yet — **needs the design-system owner's approval**
19
+ before anyone treats it as Helix's rule. `pnpm verify:archetypes` checks every tag.
20
+
21
+ ## Decision tree
22
+
23
+ Ask in order; the first yes wins.
24
+
25
+ 1. Is it feedback about something that just happened, needing no answer? → not an overlay: `Toast` (feedback-status archetype). [Toast.purpose] [Toast.neverUseFor]
26
+ 2. Must the user decide or complete something before going on? → `Modal`. [Modal.purpose] [Toast.neverUseFor]
27
+ 3. Is it a longer secondary task (details, a form, a filter builder) that should keep the page visible beside it? → `SidePanel`. [SidePanel.purpose] [Modal.neverUseFor]
28
+ 4. Is it a choice from a list of options anchored to a trigger? → `Menu` — in a form field, through `Select` or `MultiSelect`, never on its own. [Menu.purpose] [Menu.rationale]
29
+ 5. Is it a short read-only label for a control that has no visible text (an `IconButton`, an `Avatar`)? → `Tooltip`. [Tooltip.purpose]
30
+ 6. Does the floating content hold links, buttons or more than a short phrase, without blocking the page? → `Popover`, opened by a `Button` or `IconButton`; a real task → `SidePanel`. [Popover.purpose] [Popover.neverUseFor] [Tooltip.neverUseFor]
31
+
32
+ ## Side by side
33
+
34
+ | | `Modal` | `SidePanel` | `Tooltip` | `Menu` | `Popover` | Source |
35
+ |---|---|---|---|---|---|---|
36
+ | Blocks the page | Yes | Yes | No | No | No | [Modal.purpose] [SidePanel.purpose] [Tooltip.purpose] [Popover.purpose] |
37
+ | Interactive content inside | Yes | Yes | Never | Options only | Yes — focus not trapped | [Tooltip.neverUseFor] [Menu.neverUseFor] [Popover.rationale] |
38
+ | Size | Centered, focused | 400px, full height, right edge | 240px max, a short phrase | 32px rows, matches the field | 320px max | [SidePanel.rationale] [Tooltip.rationale] [Menu.rationale] [Popover.neverUseFor] |
39
+ | Opens on | The consumer's state | The consumer's state | Hover or keyboard focus | Its trigger | A click on its trigger | [Toast.purpose] [Tooltip.purpose] [Menu.purpose] [Popover.purpose] |
40
+ | Can be missed | No | No | Yes — never the only way to learn something required | No | No | [Tooltip.neverUseFor] |
41
+ | Shadow | Yes, it floats (ADR-005) | Yes | Yes | Yes | Yes | [Tooltip.rationale] [Popover.rationale] |
42
+
43
+ ## Don't use X — use Y
44
+
45
+ - A quick decision that must interrupt the whole page, inside a `SidePanel` → `Modal`. [SidePanel.neverUseFor]
46
+ - A persistent side task in a `Modal` → `SidePanel`. [Modal.neverUseFor]
47
+ - Non-blocking supplementary info in a `Modal` or `SidePanel` → `Tooltip` if it's a short phrase; `Popover` if it has actions or more text. [Modal.neverUseFor] [SidePanel.neverUseFor]
48
+ - Required information in a `Tooltip` → visible text on the page. [Tooltip.neverUseFor]
49
+ - Primary navigation in a `SidePanel` → `SideNav`. [SidePanel.neverUseFor]
50
+ - A confirmation that doesn't need to block everything → try inline UI before reaching for `Modal`. [Modal.neverUseFor]
51
+ - A `Menu` used as a generic popover for arbitrary content → `Popover`; `Menu` is a listbox. [Menu.neverUseFor]
52
+ - A list of actions in a `Popover` → `Menu`. [Popover.neverUseFor]
53
+ - A `Popover` that must be answered before going on → `Modal`. [Popover.neverUseFor]
54
+ - A long form in a `Popover` → `SidePanel`. [Popover.neverUseFor]
@@ -0,0 +1,58 @@
1
+ ---
2
+ archetype: text-input
3
+ title: Typing text
4
+ question: "The user has to type something. Which field?"
5
+ components: [Input, Textarea]
6
+ boundary: [Select, RadioGroup, CheckboxGroup, MultiSelect, Button, Chip]
7
+ gaps: [FileInput, DatePicker]
8
+ ---
9
+
10
+ # Archetype: Typing text
11
+
12
+ Every field where the user writes free-form text. Each component's contract says what it is on its own;
13
+ this playbook puts them side by side.
14
+
15
+ **Evidence tags.** Every rule ends with where it comes from:
16
+ `[Name.neverUseFor]`, `[Name.purpose]`, `[Name.rationale]` = written in that component's approved contract ·
17
+ `[pattern: name]` = an approved `.ai/maps/patterns/` file ·
18
+ `[proposed]` = a cross-component rule no contract states yet — **needs the design-system owner's approval**
19
+ before anyone treats it as Helix's rule. `pnpm verify:archetypes` checks every tag.
20
+
21
+ ## Decision tree
22
+
23
+ Ask in order; the first yes wins.
24
+
25
+ 1. Is the answer one of a set of known options? → not free text: `Select`, `RadioGroup` or `CheckboxGroup` (form-selection archetype). [Textarea.neverUseFor]
26
+ 2. Is it a file? → **no Helix component yet** (`FileInput` is a gap). [Input.neverUseFor] [Textarea.neverUseFor]
27
+ 3. Is it a date or a time? → **no Helix component yet** (`DatePicker` is a gap). [Input.neverUseFor]
28
+ 4. One line of text (a name, an email, a search)? → `Input`. [Input.purpose]
29
+ 5. Several lines (a comment, a description)? → `Textarea`. [Textarea.purpose] [Input.neverUseFor]
30
+
31
+ Several fields together → the form-field-group pattern; a search box over a list → the search-filter pattern. [pattern: form-field-group] [pattern: search-filter]
32
+
33
+ ## Side by side
34
+
35
+ | | `Input` | `Textarea` | Source |
36
+ |---|---|---|---|
37
+ | Lines | One | Several | [Input.purpose] [Textarea.purpose] |
38
+ | Height | 32px, fixed | 32px minimum, grows with `rows` | [Input.rationale] [Textarea.rationale] |
39
+ | Sizes | One, `m` — the same as every form field | One, `m` — the same as every form field | [Input.rationale] [Textarea.rationale] |
40
+ | Width | Hug or fill, never a fixed token | Hug or fill | [Input.rationale] |
41
+
42
+ ## Don't use X — use Y
43
+
44
+ - Multi-line text in an `Input` → `Textarea`. [Input.neverUseFor]
45
+ - Single-line text in a `Textarea` → `Input`. [Textarea.neverUseFor]
46
+ - Choosing from options in a `Textarea` → `Select`, `RadioGroup` or `CheckboxGroup`. [Textarea.neverUseFor]
47
+ - Free-form tags typed in a `MultiSelect` → `Input`. [MultiSelect.neverUseFor]
48
+ - One field taller or shorter than the others in a form → every field is size `m`. [Input.rationale] [Textarea.rationale]
49
+ - Spacing between fields picked by eye → the form-field-spacing pattern. [pattern: form-field-spacing]
50
+
51
+ ## Gaps — referenced by contracts, not in Helix
52
+
53
+ | Name | Cited by | What to use today |
54
+ |---|---|---|
55
+ | `FileInput` | `Input`, `Textarea` (neverUseFor) | Nothing in Helix — a local [CUSTOM] component |
56
+ | `DatePicker` | `Input` (neverUseFor), `Menu` (purpose) | Nothing in Helix — a local [CUSTOM] component |
57
+
58
+ The owner decides for each one: build it, or correct the contracts that cite it.
@@ -14,7 +14,7 @@ export interface BadgeProps {
14
14
  size?: BadgeSize;
15
15
  /** Text content — required. Max 24 characters recommended. */
16
16
  label: string;
17
- /** Leading icon — a Tabler icon component, passed by reference (e.g. IconClock). Always rendered at size=12 (stroke follows the ADR-017 rule via Icon). */
17
+ /** Leading icon — a Tabler icon component, passed by reference (e.g. IconClock). Always rendered at size=12 (stroke follows the ADR-014 rule via Icon). */
18
18
  icon?: HelixIconComponent;
19
19
  /** Additional className for container. */
20
20
  className?: string;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @helixds/react — agent note
3
+ * Before using Combobox, read its contract: node_modules/@helixds/react/dist/contracts/Combobox.json
4
+ * (every prop, which are required, when not to use it, the import line). Do not guess Helix props.
5
+ * Guide: node_modules/@helixds/react/AGENTS.md
6
+ */
7
+ import * as React from 'react';
8
+ import type { ComboboxProps } from './Combobox.types.js';
9
+ /**
10
+ * Select's field with a real <input> as the trigger: typing filters Menu's listbox (see Combobox's and the Menu contracts).
11
+ * Real DOM focus stays on the input; aria-activedescendant points at the highlighted option.
12
+ */
13
+ export declare function Combobox({ label, options, value, defaultValue, onChange, placeholder, description, errorMessage, invalid, disabled, required, fullWidth, hideLabel, id: idProp, name, className, }: ComboboxProps): React.JSX.Element;
14
+ export declare namespace Combobox {
15
+ var displayName: string;
16
+ }
17
+ //# sourceMappingURL=Combobox.d.ts.map
@@ -0,0 +1,4 @@
1
+ /** Machine-readable component documentation for the Helix Combobox. */
2
+ import type { ComponentDoc } from '../../lib/component-doc.js';
3
+ export declare const doc: ComponentDoc;
4
+ //# sourceMappingURL=Combobox.doc.d.ts.map
@@ -0,0 +1,41 @@
1
+ export const doc = {
2
+ name: 'Combobox',
3
+ purpose: 'Lets users find and choose a single value from a long list by typing to filter it.',
4
+ contract: 'contracts/components/Combobox.json',
5
+ a11y: [
6
+ 'The `label` prop is required. `placeholder` is a hint, never the value.',
7
+ 'The field is a real `<input role="combobox" aria-autocomplete="list">`; the list is Helix\'s `Menu` (see the Menu and Combobox contracts). Real DOM focus stays on the input and `aria-activedescendant` points at the highlighted option.',
8
+ 'Keyboard: typing filters and opens, Arrow Up/Down move, Enter picks, Escape and Tab close and put the chosen label back — see the contract\'s keyboardNav.',
9
+ ],
10
+ variants: [],
11
+ sizes: [],
12
+ tokens: [
13
+ { part: 'combobox-input', label: 'Default fill', token: '--helix-select-fill-default', kind: 'color' },
14
+ { part: 'combobox-input', label: 'Default border', token: '--helix-select-border-default', kind: 'color' },
15
+ { part: 'combobox-input', label: 'Hover border', token: '--helix-select-border-hover', kind: 'color', state: 'hover' },
16
+ { part: 'combobox-input', label: 'Focus border', token: '--helix-select-border-focus', kind: 'color' },
17
+ { part: 'combobox-input', label: 'Invalid border', token: '--helix-select-border-invalid', kind: 'color' },
18
+ { part: 'combobox-input', label: 'Disabled fill', token: '--helix-select-fill-disabled', kind: 'color', state: 'disabled' },
19
+ { part: 'combobox-input', label: 'Value text', token: '--helix-select-text-value', kind: 'color' },
20
+ { part: 'combobox-input', label: 'Placeholder text', token: '--helix-select-text-placeholder', kind: 'color' },
21
+ { part: 'combobox-icon', label: 'Icon', token: '--helix-select-icon-default', kind: 'color' },
22
+ { part: 'combobox-root', label: 'gap', token: '--helix-select-gap', kind: 'space', axis: 'vertical', meta: '8px, label↔field and field↔description/error — form-field-spacing pattern' },
23
+ { part: 'combobox-input', label: 'field.height', token: '--helix-select-height', kind: 'space', meta: 'One fixed size (semantic.size.m, 32px), Select\'s — no size prop' },
24
+ { part: 'combobox-icon', label: 'padding.start', token: '--helix-primitive-spacing-75', kind: 'space', axis: 'horizontal', meta: 'Search icon to the field\'s start edge' },
25
+ { part: 'combobox-input', label: 'radius', token: '--helix-select-radius', kind: 'radius' },
26
+ ],
27
+ features: [
28
+ 'Select\'s field with a real <input>: type to filter, the list opens below (Helix Menu, never a native datalist)',
29
+ 'A search icon always marks the field as searchable',
30
+ 'Opening from a chosen value shows every option; the filter starts once the user types',
31
+ 'A disabled "No results" row when nothing matches',
32
+ 'Leaving the field never keeps half-typed text — the chosen label comes back',
33
+ 'One fixed size (32px) and Select\'s tokens, so it reads as the same field',
34
+ ],
35
+ examples: [
36
+ { label: 'Default', code: `<Combobox label="Country" placeholder="Search a country…" options={countries} />` },
37
+ { label: 'Controlled', code: `<Combobox label="Component" options={components} value={name} onChange={setName} />` },
38
+ { label: 'Invalid', code: `<Combobox label="Country" options={countries} invalid errorMessage="Pick a country from the list" />` },
39
+ ],
40
+ };
41
+ //# sourceMappingURL=Combobox.doc.js.map