@helixds/react 0.0.0-stage → 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 (377) hide show
  1. package/AGENTS.md +295 -0
  2. package/LICENSE +21 -0
  3. package/README.md +49 -2
  4. package/dist/archetypes/actions-navigation.md +62 -0
  5. package/dist/archetypes/data-display.md +68 -0
  6. package/dist/archetypes/feedback-status.md +54 -0
  7. package/dist/archetypes/form-selection.md +61 -0
  8. package/dist/archetypes/foundation.md +56 -0
  9. package/dist/archetypes/layout.md +53 -0
  10. package/dist/archetypes/overlays.md +54 -0
  11. package/dist/archetypes/text-input.md +58 -0
  12. package/dist/components/Accordion/Accordion.d.ts +14 -0
  13. package/dist/components/Accordion/Accordion.doc.d.ts +4 -0
  14. package/dist/components/Accordion/Accordion.doc.js +27 -0
  15. package/dist/components/Accordion/Accordion.js +76 -0
  16. package/dist/components/Accordion/Accordion.types.d.ts +24 -0
  17. package/dist/components/Accordion/Accordion.types.js +2 -0
  18. package/dist/components/Accordion/index.d.ts +9 -0
  19. package/dist/components/Accordion/index.js +2 -0
  20. package/dist/components/Avatar/Avatar.d.ts +14 -0
  21. package/dist/components/Avatar/Avatar.doc.d.ts +4 -0
  22. package/dist/components/Avatar/Avatar.doc.js +34 -0
  23. package/dist/components/Avatar/Avatar.js +14 -0
  24. package/dist/components/Avatar/Avatar.types.d.ts +20 -0
  25. package/dist/components/Avatar/Avatar.types.js +2 -0
  26. package/dist/components/Avatar/index.d.ts +9 -0
  27. package/dist/components/Avatar/index.js +2 -0
  28. package/dist/components/AvatarGroup/AvatarGroup.d.ts +14 -0
  29. package/dist/components/AvatarGroup/AvatarGroup.doc.d.ts +4 -0
  30. package/dist/components/AvatarGroup/AvatarGroup.doc.js +30 -0
  31. package/dist/components/AvatarGroup/AvatarGroup.js +15 -0
  32. package/dist/components/AvatarGroup/AvatarGroup.types.d.ts +21 -0
  33. package/dist/components/AvatarGroup/AvatarGroup.types.js +2 -0
  34. package/dist/components/AvatarGroup/index.d.ts +9 -0
  35. package/dist/components/AvatarGroup/index.js +2 -0
  36. package/dist/components/Badge/Badge.d.ts +16 -0
  37. package/dist/components/Badge/Badge.doc.d.ts +4 -0
  38. package/dist/components/Badge/Badge.doc.js +69 -0
  39. package/dist/components/Badge/Badge.js +23 -0
  40. package/dist/components/Badge/Badge.types.d.ts +22 -0
  41. package/dist/components/Badge/Badge.types.js +2 -0
  42. package/dist/components/Badge/index.d.ts +9 -0
  43. package/dist/components/Badge/index.js +2 -0
  44. package/dist/components/Button/Button.d.ts +11 -0
  45. package/dist/components/Button/Button.doc.d.ts +4 -0
  46. package/dist/components/Button/Button.doc.js +98 -0
  47. package/dist/components/Button/Button.js +80 -0
  48. package/dist/components/Button/Button.types.d.ts +29 -0
  49. package/dist/components/Button/Button.types.js +2 -0
  50. package/dist/components/Button/index.d.ts +9 -0
  51. package/dist/components/Button/index.js +2 -0
  52. package/dist/components/Card/Card.d.ts +14 -0
  53. package/dist/components/Card/Card.doc.d.ts +4 -0
  54. package/dist/components/Card/Card.doc.js +44 -0
  55. package/dist/components/Card/Card.js +9 -0
  56. package/dist/components/Card/Card.types.d.ts +19 -0
  57. package/dist/components/Card/Card.types.js +2 -0
  58. package/dist/components/Card/index.d.ts +9 -0
  59. package/dist/components/Card/index.js +2 -0
  60. package/dist/components/Chart/Chart.d.ts +14 -0
  61. package/dist/components/Chart/Chart.doc.d.ts +4 -0
  62. package/dist/components/Chart/Chart.doc.js +49 -0
  63. package/dist/components/Chart/Chart.js +184 -0
  64. package/dist/components/Chart/Chart.types.d.ts +21 -0
  65. package/dist/components/Chart/Chart.types.js +2 -0
  66. package/dist/components/Chart/index.d.ts +9 -0
  67. package/dist/components/Chart/index.js +2 -0
  68. package/dist/components/Checkbox/Checkbox.d.ts +12 -0
  69. package/dist/components/Checkbox/Checkbox.doc.d.ts +4 -0
  70. package/dist/components/Checkbox/Checkbox.doc.js +54 -0
  71. package/dist/components/Checkbox/Checkbox.js +23 -0
  72. package/dist/components/Checkbox/Checkbox.types.d.ts +22 -0
  73. package/dist/components/Checkbox/Checkbox.types.js +2 -0
  74. package/dist/components/Checkbox/index.d.ts +9 -0
  75. package/dist/components/Checkbox/index.js +2 -0
  76. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +13 -0
  77. package/dist/components/CheckboxGroup/CheckboxGroup.doc.d.ts +4 -0
  78. package/dist/components/CheckboxGroup/CheckboxGroup.doc.js +56 -0
  79. package/dist/components/CheckboxGroup/CheckboxGroup.js +27 -0
  80. package/dist/components/CheckboxGroup/CheckboxGroup.types.d.ts +28 -0
  81. package/dist/components/CheckboxGroup/CheckboxGroup.types.js +2 -0
  82. package/dist/components/CheckboxGroup/index.d.ts +9 -0
  83. package/dist/components/CheckboxGroup/index.js +2 -0
  84. package/dist/components/Chip/Chip.d.ts +11 -0
  85. package/dist/components/Chip/Chip.doc.d.ts +4 -0
  86. package/dist/components/Chip/Chip.doc.js +105 -0
  87. package/dist/components/Chip/Chip.js +30 -0
  88. package/dist/components/Chip/Chip.types.d.ts +31 -0
  89. package/dist/components/Chip/Chip.types.js +2 -0
  90. package/dist/components/Chip/index.d.ts +9 -0
  91. package/dist/components/Chip/index.js +2 -0
  92. package/dist/components/ChipGroup/ChipGroup.d.ts +12 -0
  93. package/dist/components/ChipGroup/ChipGroup.doc.d.ts +4 -0
  94. package/dist/components/ChipGroup/ChipGroup.doc.js +31 -0
  95. package/dist/components/ChipGroup/ChipGroup.js +9 -0
  96. package/dist/components/ChipGroup/ChipGroup.types.d.ts +27 -0
  97. package/dist/components/ChipGroup/ChipGroup.types.js +2 -0
  98. package/dist/components/ChipGroup/index.d.ts +9 -0
  99. package/dist/components/ChipGroup/index.js +2 -0
  100. package/dist/components/Combobox/Combobox.d.ts +17 -0
  101. package/dist/components/Combobox/Combobox.doc.d.ts +4 -0
  102. package/dist/components/Combobox/Combobox.doc.js +41 -0
  103. package/dist/components/Combobox/Combobox.js +141 -0
  104. package/dist/components/Combobox/Combobox.types.d.ts +31 -0
  105. package/dist/components/Combobox/Combobox.types.js +2 -0
  106. package/dist/components/Combobox/index.d.ts +9 -0
  107. package/dist/components/Combobox/index.js +2 -0
  108. package/dist/components/FAB/FAB.d.ts +11 -0
  109. package/dist/components/FAB/FAB.doc.d.ts +4 -0
  110. package/dist/components/FAB/FAB.doc.js +52 -0
  111. package/dist/components/FAB/FAB.js +133 -0
  112. package/dist/components/FAB/FAB.types.d.ts +37 -0
  113. package/dist/components/FAB/FAB.types.js +2 -0
  114. package/dist/components/FAB/index.d.ts +9 -0
  115. package/dist/components/FAB/index.js +2 -0
  116. package/dist/components/Icon/Icon.d.ts +14 -0
  117. package/dist/components/Icon/Icon.doc.d.ts +4 -0
  118. package/dist/components/Icon/Icon.doc.js +38 -0
  119. package/dist/components/Icon/Icon.js +15 -0
  120. package/dist/components/Icon/Icon.types.d.ts +47 -0
  121. package/dist/components/Icon/Icon.types.js +2 -0
  122. package/dist/components/Icon/createIconAdapter.d.ts +24 -0
  123. package/dist/components/Icon/createIconAdapter.js +28 -0
  124. package/dist/components/Icon/iconStroke.d.ts +20 -0
  125. package/dist/components/Icon/iconStroke.js +54 -0
  126. package/dist/components/Icon/index.d.ts +12 -0
  127. package/dist/components/Icon/index.js +4 -0
  128. package/dist/components/IconButton/IconButton.d.ts +11 -0
  129. package/dist/components/IconButton/IconButton.doc.d.ts +4 -0
  130. package/dist/components/IconButton/IconButton.doc.js +76 -0
  131. package/dist/components/IconButton/IconButton.js +20 -0
  132. package/dist/components/IconButton/IconButton.types.d.ts +25 -0
  133. package/dist/components/IconButton/IconButton.types.js +2 -0
  134. package/dist/components/IconButton/index.d.ts +9 -0
  135. package/dist/components/IconButton/index.js +2 -0
  136. package/dist/components/Input/Input.d.ts +11 -0
  137. package/dist/components/Input/Input.doc.d.ts +4 -0
  138. package/dist/components/Input/Input.doc.js +68 -0
  139. package/dist/components/Input/Input.js +48 -0
  140. package/dist/components/Input/Input.types.d.ts +36 -0
  141. package/dist/components/Input/Input.types.js +2 -0
  142. package/dist/components/Input/index.d.ts +9 -0
  143. package/dist/components/Input/index.js +2 -0
  144. package/dist/components/Menu/Menu.d.ts +14 -0
  145. package/dist/components/Menu/Menu.doc.d.ts +4 -0
  146. package/dist/components/Menu/Menu.doc.js +46 -0
  147. package/dist/components/Menu/Menu.js +105 -0
  148. package/dist/components/Menu/Menu.types.d.ts +34 -0
  149. package/dist/components/Menu/Menu.types.js +2 -0
  150. package/dist/components/Menu/index.d.ts +9 -0
  151. package/dist/components/Menu/index.js +2 -0
  152. package/dist/components/Modal/Modal.d.ts +14 -0
  153. package/dist/components/Modal/Modal.doc.d.ts +4 -0
  154. package/dist/components/Modal/Modal.doc.js +52 -0
  155. package/dist/components/Modal/Modal.js +30 -0
  156. package/dist/components/Modal/Modal.types.d.ts +36 -0
  157. package/dist/components/Modal/Modal.types.js +2 -0
  158. package/dist/components/Modal/index.d.ts +9 -0
  159. package/dist/components/Modal/index.js +2 -0
  160. package/dist/components/MultiSelect/MultiSelect.d.ts +17 -0
  161. package/dist/components/MultiSelect/MultiSelect.doc.d.ts +4 -0
  162. package/dist/components/MultiSelect/MultiSelect.doc.js +37 -0
  163. package/dist/components/MultiSelect/MultiSelect.js +165 -0
  164. package/dist/components/MultiSelect/MultiSelect.types.d.ts +50 -0
  165. package/dist/components/MultiSelect/MultiSelect.types.js +2 -0
  166. package/dist/components/MultiSelect/index.d.ts +9 -0
  167. package/dist/components/MultiSelect/index.js +2 -0
  168. package/dist/components/NavItem/NavItem.d.ts +14 -0
  169. package/dist/components/NavItem/NavItem.doc.d.ts +4 -0
  170. package/dist/components/NavItem/NavItem.doc.js +31 -0
  171. package/dist/components/NavItem/NavItem.js +21 -0
  172. package/dist/components/NavItem/NavItem.types.d.ts +20 -0
  173. package/dist/components/NavItem/NavItem.types.js +2 -0
  174. package/dist/components/NavItem/index.d.ts +9 -0
  175. package/dist/components/NavItem/index.js +2 -0
  176. package/dist/components/Popover/Popover.d.ts +14 -0
  177. package/dist/components/Popover/Popover.doc.d.ts +4 -0
  178. package/dist/components/Popover/Popover.doc.js +47 -0
  179. package/dist/components/Popover/Popover.js +157 -0
  180. package/dist/components/Popover/Popover.types.d.ts +27 -0
  181. package/dist/components/Popover/Popover.types.js +2 -0
  182. package/dist/components/Popover/index.d.ts +9 -0
  183. package/dist/components/Popover/index.js +2 -0
  184. package/dist/components/RadioButton/RadioButton.d.ts +14 -0
  185. package/dist/components/RadioButton/RadioButton.doc.d.ts +4 -0
  186. package/dist/components/RadioButton/RadioButton.doc.js +35 -0
  187. package/dist/components/RadioButton/RadioButton.js +15 -0
  188. package/dist/components/RadioButton/RadioButton.types.d.ts +33 -0
  189. package/dist/components/RadioButton/RadioButton.types.js +2 -0
  190. package/dist/components/RadioButton/index.d.ts +9 -0
  191. package/dist/components/RadioButton/index.js +2 -0
  192. package/dist/components/RadioGroup/RadioGroup.d.ts +12 -0
  193. package/dist/components/RadioGroup/RadioGroup.doc.d.ts +4 -0
  194. package/dist/components/RadioGroup/RadioGroup.doc.js +80 -0
  195. package/dist/components/RadioGroup/RadioGroup.js +19 -0
  196. package/dist/components/RadioGroup/RadioGroup.types.d.ts +28 -0
  197. package/dist/components/RadioGroup/RadioGroup.types.js +2 -0
  198. package/dist/components/RadioGroup/index.d.ts +9 -0
  199. package/dist/components/RadioGroup/index.js +2 -0
  200. package/dist/components/SegmentedControl/SegmentedControl.d.ts +13 -0
  201. package/dist/components/SegmentedControl/SegmentedControl.doc.d.ts +4 -0
  202. package/dist/components/SegmentedControl/SegmentedControl.doc.js +50 -0
  203. package/dist/components/SegmentedControl/SegmentedControl.js +64 -0
  204. package/dist/components/SegmentedControl/SegmentedControl.types.d.ts +26 -0
  205. package/dist/components/SegmentedControl/SegmentedControl.types.js +2 -0
  206. package/dist/components/SegmentedControl/index.d.ts +9 -0
  207. package/dist/components/SegmentedControl/index.js +2 -0
  208. package/dist/components/Select/Select.d.ts +13 -0
  209. package/dist/components/Select/Select.doc.d.ts +4 -0
  210. package/dist/components/Select/Select.doc.js +66 -0
  211. package/dist/components/Select/Select.js +138 -0
  212. package/dist/components/Select/Select.types.d.ts +36 -0
  213. package/dist/components/Select/Select.types.js +2 -0
  214. package/dist/components/Select/index.d.ts +9 -0
  215. package/dist/components/Select/index.js +2 -0
  216. package/dist/components/SidePanel/SidePanel.d.ts +14 -0
  217. package/dist/components/SidePanel/SidePanel.doc.d.ts +4 -0
  218. package/dist/components/SidePanel/SidePanel.doc.js +29 -0
  219. package/dist/components/SidePanel/SidePanel.js +19 -0
  220. package/dist/components/SidePanel/SidePanel.types.d.ts +28 -0
  221. package/dist/components/SidePanel/SidePanel.types.js +2 -0
  222. package/dist/components/SidePanel/index.d.ts +9 -0
  223. package/dist/components/SidePanel/index.js +2 -0
  224. package/dist/components/Switch/Switch.d.ts +13 -0
  225. package/dist/components/Switch/Switch.doc.d.ts +4 -0
  226. package/dist/components/Switch/Switch.doc.js +56 -0
  227. package/dist/components/Switch/Switch.js +45 -0
  228. package/dist/components/Switch/Switch.types.d.ts +21 -0
  229. package/dist/components/Switch/Switch.types.js +2 -0
  230. package/dist/components/Switch/index.d.ts +9 -0
  231. package/dist/components/Switch/index.js +2 -0
  232. package/dist/components/Table/Table.d.ts +34 -0
  233. package/dist/components/Table/Table.doc.d.ts +4 -0
  234. package/dist/components/Table/Table.doc.js +48 -0
  235. package/dist/components/Table/Table.js +17 -0
  236. package/dist/components/Table/Table.types.d.ts +30 -0
  237. package/dist/components/Table/Table.types.js +2 -0
  238. package/dist/components/Table/index.d.ts +9 -0
  239. package/dist/components/Table/index.js +2 -0
  240. package/dist/components/Tabs/Tabs.d.ts +13 -0
  241. package/dist/components/Tabs/Tabs.doc.d.ts +4 -0
  242. package/dist/components/Tabs/Tabs.doc.js +47 -0
  243. package/dist/components/Tabs/Tabs.js +61 -0
  244. package/dist/components/Tabs/Tabs.types.d.ts +33 -0
  245. package/dist/components/Tabs/Tabs.types.js +2 -0
  246. package/dist/components/Tabs/index.d.ts +9 -0
  247. package/dist/components/Tabs/index.js +2 -0
  248. package/dist/components/Textarea/Textarea.d.ts +9 -0
  249. package/dist/components/Textarea/Textarea.doc.d.ts +4 -0
  250. package/dist/components/Textarea/Textarea.doc.js +60 -0
  251. package/dist/components/Textarea/Textarea.js +24 -0
  252. package/dist/components/Textarea/Textarea.types.d.ts +22 -0
  253. package/dist/components/Textarea/Textarea.types.js +2 -0
  254. package/dist/components/Textarea/index.d.ts +9 -0
  255. package/dist/components/Textarea/index.js +2 -0
  256. package/dist/components/Toast/Toast.d.ts +16 -0
  257. package/dist/components/Toast/Toast.doc.d.ts +4 -0
  258. package/dist/components/Toast/Toast.doc.js +37 -0
  259. package/dist/components/Toast/Toast.js +134 -0
  260. package/dist/components/Toast/Toast.types.d.ts +11 -0
  261. package/dist/components/Toast/Toast.types.js +2 -0
  262. package/dist/components/Toast/index.d.ts +10 -0
  263. package/dist/components/Toast/index.js +2 -0
  264. package/dist/components/Toast/toastStore.d.ts +36 -0
  265. package/dist/components/Toast/toastStore.js +57 -0
  266. package/dist/components/Tooltip/Tooltip.d.ts +14 -0
  267. package/dist/components/Tooltip/Tooltip.doc.d.ts +4 -0
  268. package/dist/components/Tooltip/Tooltip.doc.js +33 -0
  269. package/dist/components/Tooltip/Tooltip.js +105 -0
  270. package/dist/components/Tooltip/Tooltip.types.d.ts +21 -0
  271. package/dist/components/Tooltip/Tooltip.types.js +2 -0
  272. package/dist/components/Tooltip/index.d.ts +9 -0
  273. package/dist/components/Tooltip/index.js +2 -0
  274. package/dist/contracts/Accordion.json +175 -0
  275. package/dist/contracts/AppShell.json +201 -0
  276. package/dist/contracts/Avatar.json +158 -0
  277. package/dist/contracts/AvatarGroup.json +170 -0
  278. package/dist/contracts/Badge.json +213 -0
  279. package/dist/contracts/Button.json +296 -0
  280. package/dist/contracts/Card.json +126 -0
  281. package/dist/contracts/Chart.json +168 -0
  282. package/dist/contracts/Checkbox.json +334 -0
  283. package/dist/contracts/CheckboxGroup.json +201 -0
  284. package/dist/contracts/Chip.json +321 -0
  285. package/dist/contracts/ChipGroup.json +183 -0
  286. package/dist/contracts/Combobox.json +431 -0
  287. package/dist/contracts/FAB.json +216 -0
  288. package/dist/contracts/Icon.json +307 -0
  289. package/dist/contracts/IconButton.json +214 -0
  290. package/dist/contracts/Input.json +401 -0
  291. package/dist/contracts/Menu.json +198 -0
  292. package/dist/contracts/Modal.json +193 -0
  293. package/dist/contracts/MultiSelect.json +245 -0
  294. package/dist/contracts/NavItem.json +149 -0
  295. package/dist/contracts/PageHeader.json +135 -0
  296. package/dist/contracts/Popover.json +322 -0
  297. package/dist/contracts/RadioButton.json +203 -0
  298. package/dist/contracts/RadioGroup.json +229 -0
  299. package/dist/contracts/SegmentedControl.json +194 -0
  300. package/dist/contracts/Select.json +241 -0
  301. package/dist/contracts/SideNav.json +139 -0
  302. package/dist/contracts/SidePanel.json +154 -0
  303. package/dist/contracts/Switch.json +202 -0
  304. package/dist/contracts/Table.json +131 -0
  305. package/dist/contracts/Tabs.json +353 -0
  306. package/dist/contracts/Textarea.json +354 -0
  307. package/dist/contracts/Toast.json +187 -0
  308. package/dist/contracts/Tooltip.json +169 -0
  309. package/dist/contracts/TopBar.json +129 -0
  310. package/dist/contracts/manifest.json +2170 -0
  311. package/dist/index.d.ts +118 -0
  312. package/dist/index.js +79 -0
  313. package/dist/layout/AppShell/AppShell.d.ts +14 -0
  314. package/dist/layout/AppShell/AppShell.doc.d.ts +4 -0
  315. package/dist/layout/AppShell/AppShell.doc.js +32 -0
  316. package/dist/layout/AppShell/AppShell.js +116 -0
  317. package/dist/layout/AppShell/AppShell.types.d.ts +24 -0
  318. package/dist/layout/AppShell/AppShell.types.js +2 -0
  319. package/dist/layout/AppShell/AppShellContext.d.ts +17 -0
  320. package/dist/layout/AppShell/AppShellContext.js +4 -0
  321. package/dist/layout/AppShell/index.d.ts +9 -0
  322. package/dist/layout/AppShell/index.js +2 -0
  323. package/dist/layout/PageHeader/PageHeader.d.ts +14 -0
  324. package/dist/layout/PageHeader/PageHeader.doc.d.ts +4 -0
  325. package/dist/layout/PageHeader/PageHeader.doc.js +30 -0
  326. package/dist/layout/PageHeader/PageHeader.js +10 -0
  327. package/dist/layout/PageHeader/PageHeader.types.d.ts +21 -0
  328. package/dist/layout/PageHeader/PageHeader.types.js +2 -0
  329. package/dist/layout/PageHeader/index.d.ts +9 -0
  330. package/dist/layout/PageHeader/index.js +2 -0
  331. package/dist/layout/SideNav/SideNav.d.ts +14 -0
  332. package/dist/layout/SideNav/SideNav.doc.d.ts +4 -0
  333. package/dist/layout/SideNav/SideNav.doc.js +33 -0
  334. package/dist/layout/SideNav/SideNav.js +9 -0
  335. package/dist/layout/SideNav/SideNav.types.d.ts +18 -0
  336. package/dist/layout/SideNav/SideNav.types.js +2 -0
  337. package/dist/layout/SideNav/index.d.ts +9 -0
  338. package/dist/layout/SideNav/index.js +2 -0
  339. package/dist/layout/TopBar/TopBar.d.ts +14 -0
  340. package/dist/layout/TopBar/TopBar.doc.d.ts +4 -0
  341. package/dist/layout/TopBar/TopBar.doc.js +28 -0
  342. package/dist/layout/TopBar/TopBar.js +15 -0
  343. package/dist/layout/TopBar/TopBar.types.d.ts +16 -0
  344. package/dist/layout/TopBar/TopBar.types.js +2 -0
  345. package/dist/layout/TopBar/index.d.ts +9 -0
  346. package/dist/layout/TopBar/index.js +2 -0
  347. package/dist/lib/component-doc.d.ts +34 -0
  348. package/dist/lib/component-doc.js +2 -0
  349. package/dist/lib/motionPresets.d.ts +37 -0
  350. package/dist/lib/motionPresets.js +35 -0
  351. package/dist/lib/resolveTokenPx.d.ts +11 -0
  352. package/dist/lib/resolveTokenPx.js +17 -0
  353. package/dist/lib/useDialogTransition.d.ts +21 -0
  354. package/dist/lib/useDialogTransition.js +86 -0
  355. package/dist/lib/useDisclosureTransition.d.ts +19 -0
  356. package/dist/lib/useDisclosureTransition.js +41 -0
  357. package/dist/lib/utils.d.ts +3 -0
  358. package/dist/lib/utils.js +6 -0
  359. package/dist/patterns/action-bar.md +127 -0
  360. package/dist/patterns/border-always.md +40 -0
  361. package/dist/patterns/data-analytics.md +15 -0
  362. package/dist/patterns/disabled-state.md +80 -0
  363. package/dist/patterns/empty-state.md +130 -0
  364. package/dist/patterns/expand-collapse-chevron.md +101 -0
  365. package/dist/patterns/form-field-group.md +139 -0
  366. package/dist/patterns/form-field-spacing.md +99 -0
  367. package/dist/patterns/group-spacing.md +54 -0
  368. package/dist/patterns/motion-effects.md +98 -0
  369. package/dist/patterns/same-row-sizing.md +52 -0
  370. package/dist/patterns/search-filter.md +118 -0
  371. package/dist/patterns/show-hide-parts.md +53 -0
  372. package/dist/patterns/stat-card.md +105 -0
  373. package/dist/patterns/status-row.md +130 -0
  374. package/dist/patterns/view-toggle.md +81 -0
  375. package/dist/prop-map.md +80 -0
  376. package/package.json +92 -3
  377. package/src/globals.css +3511 -0
package/AGENTS.md ADDED
@@ -0,0 +1,295 @@
1
+ # Helix DS — Consumer Agent Guide
2
+
3
+ > For teams using Helix in their apps. If you're contributing to Helix itself, read `contributor-ai/CONTRIBUTOR.md` instead.
4
+
5
+ > **Before writing any JSX with `@helixds/react`: read each component's real props first** — the
6
+ > `use-helix` skill, `helix_get_contracts` (MCP), or the contract shipped in the package
7
+ > (`node_modules/@helixds/react/dist/contracts/<Name>.json`, vocabulary in `dist/prop-map.md`). Never guess a prop:
8
+ > Helix names differ from other libraries (`Button` takes its text as children, not `label`; form
9
+ > controls require `label`; `Select` takes `options`). Use only `--helix-*` tokens for spacing and color.
10
+
11
+ ## What is Helix?
12
+
13
+ A design system built for teams building AI-powered products. Components have explicit contracts,
14
+ predictable token structure, and machine-readable documentation.
15
+
16
+ ## Available packages
17
+
18
+ | Package | Purpose | Install |
19
+ |-----------------------|--------------------------------------|----------------------------------|
20
+ | `@helixds/react` | All UI components | `pnpm add @helixds/react` |
21
+ | `@helixds/tokens` | CSS tokens + TypeScript constants | `pnpm add @helixds/tokens` |
22
+
23
+ Icons are [Tabler Icons](https://tabler.io/icons) (`@tabler/icons-react`, a peer dependency of core),
24
+ always rendered through core's `Icon` component or a component's `icon` prop — never as a raw
25
+ `<IconXxx />` tag.
26
+
27
+ ## Data Analytics
28
+
29
+ For metrics and data visualisation, use Helix's `Chart` component. It is the only supported chart renderer
30
+ and is branded through Apache ECharts using Helix semantic tokens. Never import ECharts directly, pass raw
31
+ ECharts options, or introduce another chart library. Choose `variant="line"`, `"bar"`, `"stacked-bar"`,
32
+ `"donut"`, or `"timeline"` based on the reader's question; compose charts with Helix `Card`, `Table`,
33
+ `Badge`, and `Tooltip` rather than recreating those UI pieces inside a chart.
34
+
35
+ ## Setup (required, once)
36
+
37
+ ```tsx
38
+ // app/layout.tsx or main.tsx
39
+ import '@helixds/tokens/helix.css'; // CSS custom properties
40
+ import '@helixds/react/globals.css'; // Tailwind base + component styles
41
+ ```
42
+
43
+ ## Component inventory
44
+
45
+ Every component's current status (draft / beta / stable) is **computed**, not listed here — see
46
+ Storybook → **Status**, or `contracts/stability.json` (`pnpm verify:stable`, ADR-018). draft = exists and
47
+ works; beta = passes all 8 automatic quality criteria; stable = beta + modeled in Figma.
48
+
49
+ All components import from `@helixds/react`. Generated from `contracts/manifest.json` on every commit
50
+ (`pnpm docs:readme`) — do not edit the table by hand.
51
+
52
+ <!-- helix:component-inventory:start -->
53
+ | Component | Category | Purpose |
54
+ |---|---|---|
55
+ | `Accordion` | core | A single collapsible disclosure — a header that expands/collapses a panel of content, with no JS height measurement needed. |
56
+ | `AppShell` | layout | The top-level page shell — composes a SideNav, a TopBar, and the scrollable main content into one consistent full-height layout. |
57
+ | `Avatar` | core | Represents a person or entity as a small circular image or initials indicator — a table row, a nav footer, a comment author. |
58
+ | `AvatarGroup` | core | Shows several people or entities associated with the same record as a compact overlapping stack of Avatars, collapsing whatever doesn't fit into a '+N' count. |
59
+ | `Badge` | core | Communicates status, category labels, or counts in a compact, high-contrast capsule. |
60
+ | `Button` | core | Triggers an action or navigates to a destination when pressed by the user. |
61
+ | `Card` | core | Groups related content in a visually distinct, flat surface — a dashboard widget, a settings group, a gallery tile. |
62
+ | `Chart` | core | Visualizes a metric with a token-branded, accessible chart so people can understand trends, comparisons, composition, or events. |
63
+ | `Checkbox` | core | Lets users select one or more independent options from a set, or confirm a single binary choice. |
64
+ | `CheckboxGroup` | core | Lets users choose zero or more options from a small, visible set of independent choices. |
65
+ | `Chip` | core | Represents a compact selectable label for filters, categories, or short choices. |
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. |
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. |
69
+ | `Icon` | core | Communicates meaning, action, or status through a recognizable visual symbol. |
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. |
71
+ | `Input` | core | Allows users to enter a single line of free-form text. |
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). |
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. |
74
+ | `MultiSelect` | core | Lets users choose several values from a predefined list, shown as removable chips inside the field. |
75
+ | `NavItem` | core | A single entry in a persistent navigation list (a SideNav, a tab rail) that links to another view. |
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. |
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. |
79
+ | `RadioGroup` | core | Lets users choose exactly one option from a small, visible set of mutually exclusive choices. |
80
+ | `SegmentedControl` | core | Lets users switch between a small, fixed set of mutually exclusive modes or views, with no associated content panel. |
81
+ | `Select` | core | Lets users choose a single value from a predefined list. |
82
+ | `SideNav` | layout | The persistent vertical navigation rail of an app shell — brand mark, primary nav entries, and a footer slot for the current user. |
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). |
84
+ | `Switch` | core | Lets users toggle a single setting on or off, with the change taking effect immediately. |
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. |
87
+ | `Textarea` | core | Lets users enter multi-line free-form text. |
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. |
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. |
90
+ | `TopBar` | layout | The fixed-height chrome bar at the top of a page — search, quick actions, and the current user, always in the same place. |
91
+ <!-- helix:component-inventory:end -->
92
+
93
+ ## Component hierarchy (enforce this order)
94
+
95
+ ```
96
+ 1. Helix core (@helixds/react) ← always check first
97
+ 2. Custom component ← add comment: // [CUSTOM] reason
98
+ ```
99
+
100
+ Helix components are built directly on native HTML elements — there is no primitive library
101
+ underneath to reach for. If a Helix component doesn't exist yet, file a request.
102
+
103
+ ## Token usage
104
+
105
+ Use Helix semantic tokens, never Tailwind primitives directly:
106
+
107
+ ```css
108
+ /* ✅ correct */
109
+ color: var(--helix-color-text-neutral);
110
+ background: var(--helix-color-fill-primary);
111
+
112
+ /* ❌ wrong */
113
+ color: #1a1a1a;
114
+ background: blue-600;
115
+ ```
116
+
117
+ TypeScript constants are also available:
118
+ ```ts
119
+ import { tokens } from '@helixds/tokens';
120
+ tokens.color.fill.primary; // '#1d4ed8'
121
+ ```
122
+
123
+ ## Lint while you write
124
+
125
+ `@helixds/eslint-plugin` catches the mistakes agents make most — an invented import path
126
+ (`@helixds/react` → `@helixds/react`), anti-synonym props and values (`onPress` → `onClick`,
127
+ `size="md"` → `size="m"`), raw colors (`#1d4ed8` → the semantic token with that color) and native
128
+ controls (`<button>` → `Button`). Run `pnpm lint` (or `npx eslint --fix <file>`) after writing UI code;
129
+ the editor shows the same warnings live. See `packages/eslint-plugin/README.md`.
130
+
131
+ ## Props vocabulary
132
+
133
+ Use the canonical prop names below. Anti-synonyms are rejected by CI.
134
+
135
+ | ✅ Use | ❌ Never | Notes |
136
+ |-------------|------------|--------------------------------|
137
+ | `variant` | `type` | Visual style selector |
138
+ | `size` | `scale` | `xs s m l xl` |
139
+ | `isLoading` | `loading`| Boolean authored state |
140
+ | `disabled` | `isDisabled`| Boolean authored state |
141
+ | `danger` | `error` | Destructive variant name |
142
+ | `current` | `active` | Navigation selected state |
143
+ | `onClick` | `onPress` | Primary action handler |
144
+ | `label` | `title`, `name` | Accessible text |
145
+ ## Agent Readiness & Governance (Can it? Should it? May it?)
146
+
147
+ When an AI agent makes design or implementation decisions using Helix, it must validate three levels of readiness:
148
+
149
+ 1. **Can it? (Mechanical Readiness)**:
150
+ - Does the generated code compile and use valid tokens (`var(--helix-color-...)`)?
151
+ - Are canonical props (`onClick`, `variant`, `expanded`) used according to component contracts?
152
+ - Query Helix via CLI (`pnpm helix component <Name>`) or contracts to fetch machine-readable props and types.
153
+
154
+ 2. **Should it? (Design Judgment Readiness)**:
155
+ - Does the usage respect `neverUseFor` anti-patterns documented in the component contract?
156
+ - Does it preserve accessibility contracts (WCAG AA, focus trapping, aria semantics)?
157
+ - Are responsive constraints and layout components (`AppShell`, `TopBar`, `SideNav`) respected?
158
+
159
+ 3. **May it? (Authority & Governance Readiness)**:
160
+ - **Consuming apps**: Agents MAY use core Helix components and create local custom components flagged with `// [CUSTOM] reason`.
161
+ - **Boundary Enforcement**: Agents MAY NOT alter shared token CSS variables directly (`style={{ color: '#xxx' }}`), override internal padding/height tokens, or redefine component prop contracts.
162
+ - **Escalation**: If a requested UI pattern cannot be achieved with existing Helix components or local composition, the agent MUST flag it for human review or file a request for Helix DS.
163
+
164
+ ## AI context installation
165
+
166
+ ## Helix MCP tools (preferred when your client supports MCP)
167
+
168
+ The repo registers a `helix` MCP server (`.mcp.json`, `pnpm helix:mcp`). Use its tools instead of reading
169
+ files or shelling out:
170
+
171
+ 1. `helix_list_components` — check Helix has the component before building anything.
172
+ 2. `helix_get_contracts` — the contracts of every component you'll use, in one call (`helix_get_contract` for
173
+ one): the exact import line, props, accessibility and governance. Read one for EVERY component, layout ones too.
174
+ 3. `helix_search_tokens` — the token for a concept ("danger background", "subtle text"); never hardcode.
175
+ 4. `helix_validate_snippet` — run your JSX through it before writing the file: it lints it and type-checks it
176
+ against Helix's real source. Apply `fixedCode`, then fix what's left in `remainingAfterFix` (lint problems
177
+ and type errors) until `valid` is `true`.
178
+
179
+ ## Querying Helix from a terminal
180
+
181
+ When an agent has shell access, use the read-only CLI to discover the exact Helix guidance needed
182
+ instead of searching source files broadly. It reads the same contracts, tokens, and patterns used by
183
+ the design system — it does not maintain a second copy of the documentation.
184
+
185
+ ```bash
186
+ pnpm helix search "confirmation dialog" --json
187
+ pnpm helix component Modal --json
188
+ pnpm helix token color.fill.primary-interactive-default --json
189
+ pnpm helix tokens "danger background" --json
190
+ pnpm helix pattern empty-state --json
191
+ pnpm helix validate src/Settings.tsx --json # or `-` for stdin; exits 1 when not valid
192
+ ```
193
+
194
+ It is the MCP server's twin, for any agent or tool that can run a command — every MCP tool has a
195
+ command here (`helix_get_contract` → `component`, `helix_search_tokens` → `tokens`,
196
+ `helix_validate_snippet` → `validate`, …), from the same library. It runs from a clone of the Helix
197
+ repo: `pnpm -s --dir "${HELIX_DS_DIR:-/path/to/helixds}" helix validate "$PWD/src/Settings.tsx"`. In an
198
+ app that only installed the packages, use the MCP server below instead — it answers the same questions.
199
+
200
+ Use `pnpm helix batch --command "component Button" --command "token color.fill.primary-interactive-default" --json`
201
+ when several lookups are needed. If no shell is available, consult `contracts/manifest.json`, the
202
+ specific component contract, and `.ai/maps/` directly.
203
+
204
+ When no Helix component covers what you need, scaffold the custom one instead of writing it from
205
+ scratch — it comes with the `// [CUSTOM] reason:` header, semantic tokens, an accessible base and a
206
+ Storybook story whose `play` function is its first test:
207
+
208
+ ```bash
209
+ pnpm helix scaffold:custom UsageMeter --reason "Helix has no meter component" --dir src/custom/UsageMeter
210
+ ```
211
+
212
+ To install Helix AI context in your project:
213
+
214
+ ### In an app that installed `@helixds/react`
215
+
216
+ 1. **Context** — copy this guide to your project root, where every agent looks for it:
217
+ `cp node_modules/@helixds/react/AGENTS.md ./AGENTS.md`
218
+ 2. **MCP server** — add Helix's tools (`helix_get_contracts`, `helix_search_tokens`,
219
+ `helix_validate_snippet`…) to your agent's MCP config (`.mcp.json` for Claude Code,
220
+ `.cursor/mcp.json` for Cursor):
221
+
222
+ ```json
223
+ {
224
+ "mcpServers": {
225
+ "helix": { "command": "npx", "args": ["-y", "@helixds/mcp"] }
226
+ }
227
+ }
228
+ ```
229
+
230
+ It reads the contracts, tokens and patterns your installed version ships, so its answers match it.
231
+ 3. **Lint** — `npm i -D @helixds/eslint-plugin` flags raw colors and spacing, invented props and
232
+ anti-synonyms in the editor ([its README](https://www.npmjs.com/package/@helixds/eslint-plugin)).
233
+
234
+ ### Full guardrails, from a clone of the Helix repo
235
+
236
+ The hooks below (contract read before writing, lint after writing, approval before patching Helix)
237
+ run Helix's own scripts, so they need a clone:
238
+
239
+ ```bash
240
+ pnpm setup:ai [target-dir] [--dry-run] [--agents-only]
241
+ ```
242
+
243
+ This copies AGENTS.md into your project (never overwriting a hand-edited one — it flags
244
+ a conflict instead) and writes a pointer file for whichever AI tool directories it finds
245
+ already in your project (`.cursor/rules/helix.mdc`, `.github/copilot-instructions.md`).
246
+
247
+ Unless you pass `--agents-only`, it also installs Helix's guardrails for Claude Code, run
248
+ from your Helix clone (set `HELIX_DS_DIR` if a teammate's clone lives elsewhere):
249
+
250
+ - `.mcp.json` — the Helix MCP server (`helix_get_contracts`, `helix_search_tokens`,
251
+ `helix_validate_snippet`…).
252
+ - `.claude/settings.json` — three hooks: a write that uses a Helix component is denied until
253
+ its contract has been read; every written file is linted with Helix's rules (Helix's
254
+ recommended config if your app has no ESLint setup for them); patching Helix in
255
+ `node_modules/@helixds` or with a `patches/` file asks you first.
256
+
257
+ Other agents get the same guardrails, from the same scripts:
258
+
259
+ | Agent | Context | MCP server | Hooks |
260
+ |---|---|---|---|
261
+ | Claude Code | AGENTS.md | `.mcp.json` | `.claude/settings.json` |
262
+ | Cursor | `.cursor/rules/helix.mdc` | `.cursor/mcp.json` | runs `.claude/settings.json`'s — turn on Settings → "Include Third-Party Plugins, Skills, and Other Configs" |
263
+ | Codex (ChatGPT) | AGENTS.md (read natively) | `.codex/config.toml` | `.codex/hooks.json` — trust the project in Codex |
264
+ | Gemini CLI | AGENTS.md (via `context.fileName`) | `.gemini/settings.json` | `.gemini/settings.json` |
265
+
266
+ Cursor, Codex and Gemini are installed when the app already has their folder (`.cursor/`,
267
+ `.codex/`, `.gemini/`), or with `--with codex,gemini` (`--with all`). Codex and Gemini can't
268
+ pause a hook for approval, so the owner gate stops the change there and tells the agent to
269
+ ask you; Claude Code and Cursor show an approval prompt. Every time a hook stops an agent, it
270
+ records a one-line trace in your Helix clone (`evals/traces/hooks/`, never the code;
271
+ `HELIX_TRACES=off` turns it off) — `pnpm eval:traces` shows what agents get wrong most.
272
+
273
+ These files are merged into what's already there — your own servers and hooks stay. Safe to
274
+ run more than once. See `scripts/setup-ai.mjs` for exactly what it does and does not touch.
275
+
276
+ ## Common mistakes (seen in real eval runs)
277
+
278
+ These came up when an agent was asked to build with Helix without reading the contracts first
279
+ (`pnpm eval:generate`). Check them before writing the code:
280
+
281
+ - **Toast needs `<Toast />` mounted once** (near the app root). `toast.success(...)` only queues the
282
+ notification; with no `<Toast />` nothing appears (Helix logs a console warning). Signature:
283
+ `toast.success(label, description?)` — the description can also be `{ description }`.
284
+ - **TopBar's slots are `start` and `end`** — not `search`/`actions`, not `left`/`right`.
285
+ - **Canonical prop names only** — `onClick` (not `onPress`), `expanded` (not `open`/`isOpen`),
286
+ `label` (not `title`/`name`; but `Button` takes its text as children, never `label`), `checked` (not `active`/`selected`), `current` (not `active`). Full list:
287
+ `.ai/maps/prop-map.md`.
288
+ - **Icons by reference** — `icon={IconPlus}`, never `icon={<IconPlus />}`, never a raw `<IconPlus />`.
289
+
290
+ ## What agents should NOT do
291
+
292
+ - Use `style={{ color: '#xxx' }}` — always use token CSS variables
293
+ - Create a `<div>` grid without importing a Helix layout component first
294
+ - Use `onPress` — prefer `onClick` (prop-map canonical)
295
+ - Use Figma prop names directly — they may not match Helix contracts
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Marta Conde
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,50 @@
1
- # Temporary Holding Version
1
+ # @helixds/react
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ React components for **Helix**, a design system for AI-powered products: native HTML elements, Tailwind CSS
4
+ v4 and semantic design tokens (`@helixds/tokens`).
5
+
6
+ ## For AI coding agents — read this first
7
+
8
+ Helix's props are not the ones other libraries use, so guessed props usually don't compile.
9
+
10
+ 1. **Before writing JSX, read the contract of every Helix component you will use** (layout ones too):
11
+ `node_modules/@helixds/react/dist/contracts/<Name>.json` — exact props, which are required, when not to
12
+ use it, and the import line. The list of components: `dist/contracts/manifest.json`.
13
+ 2. **Import everything from `@helixds/react`** — never `@helix/…` or `@helix-ds/…`.
14
+ 3. Common mistakes: Button's text is its children (not `label`); form controls require `label`;
15
+ `PageHeader` takes `label` (not `title`); `Select` takes `options`; `Card` takes no `style`.
16
+ 4. Spacing and color come from `--helix-*` tokens, never raw `px`/hex.
17
+
18
+ Full guide: [`AGENTS.md`](./AGENTS.md) · prop vocabulary: `dist/prop-map.md`.
19
+
20
+ ## Install
21
+
22
+ Requires React 19 and Tailwind CSS v4 set up in your app.
23
+
24
+ ```bash
25
+ npm install @helixds/react @helixds/tokens @tabler/icons-react
26
+ ```
27
+
28
+ In the CSS file Tailwind processes, replace `@import "tailwindcss";` with:
29
+
30
+ ```css
31
+ @import "@helixds/react/globals.css"; /* Tailwind + every --helix-* token + component styles */
32
+ ```
33
+
34
+ ```tsx
35
+ import { Button } from '@helixds/react';
36
+
37
+ export const Save = ({ onSave }: { onSave: () => void }) => (
38
+ <Button variant="primary" onClick={onSave}>Save</Button>
39
+ );
40
+ ```
41
+
42
+ Dark mode follows the operating system; set `data-theme="dark"` or `"light"` on `<html>` to force one.
43
+
44
+ **Docs:** [Storybook](https://martacondedesign.github.io/helixds/) ·
45
+ [Getting started](https://github.com/MartaCondeDesign/helixds/blob/main/docs/getting-started.md) ·
46
+ [GitHub](https://github.com/MartaCondeDesign/helixds)
47
+
48
+ **Agents:** connect the Helix MCP server (`npx -y @helixds/mcp`) — see [`AGENTS.md`](./AGENTS.md).
49
+
50
+ MIT © Marta Conde
@@ -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]