@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
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @helixds/react — agent note
3
+ * Before using SideNav, read its contract: node_modules/@helixds/react/dist/contracts/SideNav.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 type * as React from 'react';
8
+ export interface SideNavProps {
9
+ /** Logo/product-name content, rendered at the top. */
10
+ brand?: React.ReactNode;
11
+ /** The nav entries — a list of NavItem. */
12
+ children: React.ReactNode;
13
+ /** Content pinned to the bottom — typically the current user. */
14
+ footer?: React.ReactNode;
15
+ /** Additional className for the root. */
16
+ className?: string;
17
+ }
18
+ //# sourceMappingURL=SideNav.types.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SideNav.types.js.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @helixds/react — agent note
3
+ * Before using SideNav, read its contract: node_modules/@helixds/react/dist/contracts/SideNav.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
+ export { SideNav } from './SideNav.js';
8
+ export type { SideNavProps } from './SideNav.types.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { SideNav } from './SideNav.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @helixds/react — agent note
3
+ * Before using TopBar, read its contract: node_modules/@helixds/react/dist/contracts/TopBar.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 { TopBarProps } from './TopBar.types.js';
9
+ declare const TopBar: {
10
+ ({ start, end, className }: TopBarProps): React.JSX.Element;
11
+ displayName: string;
12
+ };
13
+ export { TopBar };
14
+ //# sourceMappingURL=TopBar.d.ts.map
@@ -0,0 +1,4 @@
1
+ /** Machine-readable component documentation for the Helix TopBar. */
2
+ import type { ComponentDoc } from '../../lib/component-doc.js';
3
+ export declare const doc: ComponentDoc;
4
+ //# sourceMappingURL=TopBar.doc.d.ts.map
@@ -0,0 +1,28 @@
1
+ export const doc = {
2
+ name: 'TopBar',
3
+ purpose: 'The fixed-height chrome bar at the top of a page — search, quick actions, and the current user.',
4
+ contract: 'contracts/components/TopBar.json',
5
+ a11y: [
6
+ 'Always a native <header> — carries the banner landmark role when it is a direct child of <body> in a real page.',
7
+ ],
8
+ variants: [],
9
+ sizes: [],
10
+ tokens: [
11
+ { part: 'topbar-root', label: 'height', token: '--helix-topBar-height', kind: 'space' },
12
+ { part: 'topbar-root', label: 'fill', token: '--helix-topBar-fill', kind: 'color' },
13
+ { part: 'topbar-root', label: 'border-bottom', token: '--helix-topBar-border', kind: 'color' },
14
+ ],
15
+ features: [
16
+ 'start/end — slot pattern, not fixed single-purpose props, so TopBar isn’t over-fitted to one exact button count',
17
+ ],
18
+ examples: [
19
+ {
20
+ label: 'Search + actions',
21
+ code: `<TopBar
22
+ start={<Input label="Search" hideLabel icon={IconSearch} placeholder="Search…" />}
23
+ end={<IconButton variant="ghost" size="m" icon={IconBell} label="Notifications" />}
24
+ />`,
25
+ },
26
+ ],
27
+ };
28
+ //# sourceMappingURL=TopBar.doc.js.map
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { IconMenu2 } from '@tabler/icons-react';
4
+ import { cn } from '../../lib/utils.js';
5
+ import { IconButton } from '../../components/IconButton/index.js';
6
+ import { useAppShellNav } from '../AppShell/AppShellContext.js';
7
+ const TopBar = ({ start, end, className }) => {
8
+ // Inside an AppShell with a sidenav: the menu button that opens the collapsed SideNav. CSS only
9
+ // shows it below 768px of the shell's width.
10
+ const shellNav = useAppShellNav();
11
+ return (_jsxs("header", { "data-helix-part": "topbar-root", className: cn(className), children: [shellNav && (_jsx("div", { "data-helix-part": "topbar-menu", children: _jsx(IconButton, { ref: shellNav.toggleRef, variant: "ghost", size: "m", icon: IconMenu2, label: "Navigation menu", "aria-expanded": shellNav.expanded, "aria-controls": shellNav.navId, onPointerDown: shellNav.onTogglePointerDown, onClick: shellNav.toggle }) })), start && _jsx("div", { "data-helix-part": "topbar-start", children: start }), end && _jsx("div", { "data-helix-part": "topbar-end", children: end })] }));
12
+ };
13
+ TopBar.displayName = 'TopBar';
14
+ export { TopBar };
15
+ //# sourceMappingURL=TopBar.js.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @helixds/react — agent note
3
+ * Before using TopBar, read its contract: node_modules/@helixds/react/dist/contracts/TopBar.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 type * as React from 'react';
8
+ export interface TopBarProps {
9
+ /** Leading slot content — typically a search Input. */
10
+ start?: React.ReactNode;
11
+ /** Trailing slot content — typically IconButtons (notifications, help, quick actions). */
12
+ end?: React.ReactNode;
13
+ /** Additional className for the root. */
14
+ className?: string;
15
+ }
16
+ //# sourceMappingURL=TopBar.types.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TopBar.types.js.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @helixds/react — agent note
3
+ * Before using TopBar, read its contract: node_modules/@helixds/react/dist/contracts/TopBar.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
+ export { TopBar } from './TopBar.js';
8
+ export type { TopBarProps } from './TopBar.types.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { TopBar } from './TopBar.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,34 @@
1
+ /** Canonical shape for every component's machine-readable documentation (`*.doc.ts`). */
2
+ export interface ComponentDoc {
3
+ name: string;
4
+ purpose: string;
5
+ contract: string;
6
+ a11y: string[];
7
+ variants: {
8
+ name: string;
9
+ description: string;
10
+ }[];
11
+ sizes: string[];
12
+ tokens: {
13
+ part: string;
14
+ label: string;
15
+ token?: string;
16
+ value?: string;
17
+ kind?: 'color' | 'typography' | 'space' | 'radius' | 'shadow' | 'style' | 'other';
18
+ colorRole?: 'background' | 'text' | 'border' | 'icon' | 'asset';
19
+ padding?: 'all' | 'top' | 'right' | 'bottom' | 'left' | string;
20
+ paddingSides?: ('top' | 'end' | 'bottom' | 'start')[];
21
+ relationship?: string;
22
+ variant?: string;
23
+ size?: string;
24
+ state?: 'hover' | 'press' | 'disabled' | 'focus';
25
+ axis?: 'horizontal' | 'vertical';
26
+ meta?: string;
27
+ }[];
28
+ features: string[];
29
+ examples: {
30
+ label: string;
31
+ code: string;
32
+ }[];
33
+ }
34
+ //# sourceMappingURL=component-doc.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=component-doc.js.map
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Shared Motion (`motion/react`) presets — the JS-only half of Helix's motion vocabulary.
3
+ *
4
+ * Duration/easing that CSS can express live as real tokens (`semantic.duration.*`,
5
+ * `semantic.easing.*`, `semantic.transform.*` in tokens.json) and reach components as
6
+ * `var(--helix-*)`. Motion's spring physics (`stiffness`/`damping`) and cubic-bezier arrays have no
7
+ * `var()` equivalent — a CSS transition can't express a spring, and Motion doesn't accept a CSS
8
+ * custom property for `ease`. Those values live here instead: named, in one place, instead of typed
9
+ * inline per component. This is NOT a tokens.json entry (packages/tokens/CLAUDE.md's "What NOT to
10
+ * do" — "don't add JS-only constants that don't have a CSS counterpart" — is about keeping the token
11
+ * pipeline free of stuff that can't become a CSS var; this module is deliberately the other, JS-only
12
+ * home for exactly that category, not an exception to the rule).
13
+ *
14
+ * Where a value coincides with a real duration token (FAB_COLLAPSE_TRANSITION below), it's derived
15
+ * from `@helixds/tokens` rather than retyped — see packages/tokens/CLAUDE.md's "Motion naming
16
+ * vocabulary" section for the full reasoning, including why the other durations here stay bespoke
17
+ * literals instead of being forced onto the scale.
18
+ *
19
+ * See ADR-007 and .ai/maps/patterns/motion-effects.md.
20
+ */
21
+ import type { Transition } from 'motion/react';
22
+ export declare const SPRING_SNAPPY: Transition;
23
+ export declare const EASE_BACK: [number, number, number, number];
24
+ export declare const EASE_COLLAPSE: [number, number, number, number];
25
+ /** FAB speed-dial expand — overshoots outward; safe, nothing beyond the target to collide with. */
26
+ export declare const FAB_EXPAND_TRANSITION: Transition;
27
+ /**
28
+ * FAB speed-dial collapse — must never dip past y=0 (the trigger's own position), so this is a
29
+ * no-overshoot ease-out, not EASE_BACK run in reverse. Duration coincides with
30
+ * `semantic.duration.slower` (300ms) — derived from the real token rather than retyped as `0.3`.
31
+ */
32
+ export declare const FAB_COLLAPSE_TRANSITION: Transition;
33
+ /** FAB trigger's squish-and-release bounce, fired once when the actions collect back. */
34
+ export declare const FAB_TRIGGER_BOUNCE_TRANSITION: Transition;
35
+ export declare const PRESS_SCALE_DEFAULT = 0.97;
36
+ export declare const PRESS_SCALE_COMPACT = 0.94;
37
+ //# sourceMappingURL=motionPresets.d.ts.map
@@ -0,0 +1,35 @@
1
+ import { tokens } from '@helixds/tokens';
2
+ function msToSeconds(ms) {
3
+ return Number.parseFloat(ms) / 1000;
4
+ }
5
+ // ── Springs ──────────────────────────────────────────────────────────────────
6
+ // Physically modeled — no CSS equivalent exists. Switch's thumb and NavItem's sliding indicator are
7
+ // meant to feel identical (both a small element snapping to a new resting position) but had drifted
8
+ // to damping 32 vs 35 with no documented reason for the difference — consolidated to one value here.
9
+ export const SPRING_SNAPPY = { type: 'spring', stiffness: 500, damping: 32 };
10
+ // ── Cubic-bezier tweens ──────────────────────────────────────────────────────
11
+ // "Back"/overshoot curves — Helix's semantic.easing.{base,in,out} are all no-overshoot, so these have
12
+ // no matching token (see motion-effects.md's Input shake row for the same "bespoke, not on the
13
+ // scale" call). Named here instead of as inline arrays repeated across FAB's three transitions.
14
+ export const EASE_BACK = [0.34, 1.56, 0.64, 1];
15
+ export const EASE_COLLAPSE = [0.16, 1, 0.3, 1];
16
+ /** FAB speed-dial expand — overshoots outward; safe, nothing beyond the target to collide with. */
17
+ export const FAB_EXPAND_TRANSITION = { duration: 0.42, ease: EASE_BACK };
18
+ /**
19
+ * FAB speed-dial collapse — must never dip past y=0 (the trigger's own position), so this is a
20
+ * no-overshoot ease-out, not EASE_BACK run in reverse. Duration coincides with
21
+ * `semantic.duration.slower` (300ms) — derived from the real token rather than retyped as `0.3`.
22
+ */
23
+ export const FAB_COLLAPSE_TRANSITION = {
24
+ duration: msToSeconds(tokens.semantic.duration.slower),
25
+ ease: EASE_COLLAPSE,
26
+ };
27
+ /** FAB trigger's squish-and-release bounce, fired once when the actions collect back. */
28
+ export const FAB_TRIGGER_BOUNCE_TRANSITION = { duration: 0.24, ease: EASE_BACK };
29
+ // ── Press feedback (`whileTap`) ──────────────────────────────────────────────
30
+ // Same category as a CSS `:active` pseudo-class (motion-effects.md's Button/IconButton row) — brief,
31
+ // user-driven, not autoplaying, so it's exempt from the "reduced motion is not automatic" checklist
32
+ // item. No CSS equivalent either (Motion's `whileTap` target), so named here rather than inline.
33
+ export const PRESS_SCALE_DEFAULT = 0.97; // Button
34
+ export const PRESS_SCALE_COMPACT = 0.94; // IconButton — smaller hit target reads a firmer press
35
+ //# sourceMappingURL=motionPresets.js.map
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Resolves a `--helix-*` CSS custom property to a plain number, for the handful of places a Helix
3
+ * token has to cross into a JS-driven API that only accepts numbers — never a `var(...)` reference.
4
+ * Two call sites today: FAB's speed-dial offsets (Motion's `animate.y` is a numeric px) and Switch's
5
+ * thumb position (same reason). See ADR-007 and `.ai/maps/patterns/motion-effects.md`.
6
+ *
7
+ * Reads from `el` (defaults to the document root) so a component-scoped override (e.g. a themed subtree)
8
+ * resolves correctly, not just the global `:root` value.
9
+ */
10
+ export declare function resolveTokenPx(token: string, el?: HTMLElement | null): number;
11
+ //# sourceMappingURL=resolveTokenPx.d.ts.map
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Resolves a `--helix-*` CSS custom property to a plain number, for the handful of places a Helix
3
+ * token has to cross into a JS-driven API that only accepts numbers — never a `var(...)` reference.
4
+ * Two call sites today: FAB's speed-dial offsets (Motion's `animate.y` is a numeric px) and Switch's
5
+ * thumb position (same reason). See ADR-007 and `.ai/maps/patterns/motion-effects.md`.
6
+ *
7
+ * Reads from `el` (defaults to the document root) so a component-scoped override (e.g. a themed subtree)
8
+ * resolves correctly, not just the global `:root` value.
9
+ */
10
+ export function resolveTokenPx(token, el = document.documentElement) {
11
+ if (!el)
12
+ return 0;
13
+ const raw = getComputedStyle(el).getPropertyValue(token).trim();
14
+ const value = Number.parseFloat(raw);
15
+ return Number.isNaN(value) ? 0 : value;
16
+ }
17
+ //# sourceMappingURL=resolveTokenPx.js.map
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+ export type DialogTransitionState = 'closed' | 'open' | 'closing';
3
+ /**
4
+ * Shared open/close choreography for Modal and SidePanel — see the Modal contract. Native `<dialog>` has no
5
+ * built-in "animate out, then actually close" behavior, so this orchestrates it in JS: `showModal()`
6
+ * immediately, then a `data-state="open"` flip one animation frame later (so the transition actually
7
+ * plays); on close, `data-state="closing"` first, then the real `.close()` after the component's own
8
+ * close-duration token has elapsed. Escape (native `cancel`) is redirected into the same path via
9
+ * `onDismiss`, so every dismissal — programmatic or native — animates identically.
10
+ *
11
+ * Backdrop-click dismissal: native `<dialog>` has no `::backdrop` click event to listen for — a click
12
+ * on the backdrop is dispatched as a click on the `<dialog>` element itself (it's the top-layer element
13
+ * covering the viewport while modal). The standard technique (used here) is geometric: on a click
14
+ * directly on the dialog element, check whether the pointer landed inside the dialog's own rendered
15
+ * box; if not, treat it as a backdrop click. `closeOnBackdropClick` (default true) gates this.
16
+ */
17
+ export declare function useDialogTransition(expanded: boolean, closeDurationToken: string, onDismiss?: () => void, closeOnBackdropClick?: boolean): {
18
+ ref: React.RefObject<HTMLDialogElement | null>;
19
+ state: DialogTransitionState;
20
+ };
21
+ //# sourceMappingURL=useDialogTransition.d.ts.map
@@ -0,0 +1,86 @@
1
+ import * as React from 'react';
2
+ import { resolveTokenPx } from './resolveTokenPx.js';
3
+ /**
4
+ * Shared open/close choreography for Modal and SidePanel — see the Modal contract. Native `<dialog>` has no
5
+ * built-in "animate out, then actually close" behavior, so this orchestrates it in JS: `showModal()`
6
+ * immediately, then a `data-state="open"` flip one animation frame later (so the transition actually
7
+ * plays); on close, `data-state="closing"` first, then the real `.close()` after the component's own
8
+ * close-duration token has elapsed. Escape (native `cancel`) is redirected into the same path via
9
+ * `onDismiss`, so every dismissal — programmatic or native — animates identically.
10
+ *
11
+ * Backdrop-click dismissal: native `<dialog>` has no `::backdrop` click event to listen for — a click
12
+ * on the backdrop is dispatched as a click on the `<dialog>` element itself (it's the top-layer element
13
+ * covering the viewport while modal). The standard technique (used here) is geometric: on a click
14
+ * directly on the dialog element, check whether the pointer landed inside the dialog's own rendered
15
+ * box; if not, treat it as a backdrop click. `closeOnBackdropClick` (default true) gates this.
16
+ */
17
+ export function useDialogTransition(expanded, closeDurationToken, onDismiss, closeOnBackdropClick = true) {
18
+ const ref = React.useRef(null);
19
+ const [state, setState] = React.useState(expanded ? 'open' : 'closed');
20
+ React.useEffect(() => {
21
+ const el = ref.current;
22
+ if (!el)
23
+ return;
24
+ if (expanded) {
25
+ if (!el.open)
26
+ el.showModal();
27
+ const raf = requestAnimationFrame(() => setState('open'));
28
+ return () => cancelAnimationFrame(raf);
29
+ }
30
+ if (!el.open) {
31
+ setState('closed');
32
+ return;
33
+ }
34
+ setState('closing');
35
+ // resolveTokenPx is unit-agnostic (Number.parseFloat strips the trailing unit) — reused here for a
36
+ // duration in ms, not the px offset it was originally written for (FAB/Switch).
37
+ const closeMs = resolveTokenPx(closeDurationToken, el);
38
+ const timeout = window.setTimeout(() => {
39
+ el.close();
40
+ setState('closed');
41
+ }, closeMs);
42
+ return () => window.clearTimeout(timeout);
43
+ }, [expanded, closeDurationToken]);
44
+ React.useEffect(() => {
45
+ const el = ref.current;
46
+ if (!el)
47
+ return;
48
+ const handleCancel = (event) => {
49
+ // We own the close choreography above — don't let the browser remove the dialog instantly out
50
+ // from under it. `onDismiss` (not a direct state write) lets the consumer control `expanded`.
51
+ event.preventDefault();
52
+ onDismiss?.();
53
+ };
54
+ // Escape handled on keydown too, not only via the native `cancel` it would trigger:
55
+ // preventDefault here stops that close request, so a press dismisses exactly once — and Escape
56
+ // works the same for synthetic key events (tests), which never fire `cancel`.
57
+ const handleKeyDown = (event) => {
58
+ if (event.key !== 'Escape')
59
+ return;
60
+ event.preventDefault();
61
+ onDismiss?.();
62
+ };
63
+ el.addEventListener('cancel', handleCancel);
64
+ el.addEventListener('keydown', handleKeyDown);
65
+ return () => {
66
+ el.removeEventListener('cancel', handleCancel);
67
+ el.removeEventListener('keydown', handleKeyDown);
68
+ };
69
+ }, [onDismiss]);
70
+ React.useEffect(() => {
71
+ const el = ref.current;
72
+ if (!el || !closeOnBackdropClick)
73
+ return;
74
+ const handleClick = (event) => {
75
+ const rect = el.getBoundingClientRect();
76
+ const insideDialog = event.clientX >= rect.left && event.clientX <= rect.right &&
77
+ event.clientY >= rect.top && event.clientY <= rect.bottom;
78
+ if (!insideDialog)
79
+ onDismiss?.();
80
+ };
81
+ el.addEventListener('click', handleClick);
82
+ return () => el.removeEventListener('click', handleClick);
83
+ }, [onDismiss, closeOnBackdropClick]);
84
+ return { ref, state };
85
+ }
86
+ //# sourceMappingURL=useDialogTransition.js.map
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ export type DisclosureTransitionState = 'closed' | 'open' | 'closing';
3
+ /**
4
+ * Open/close choreography for Accordion's native <details> — sibling to useDialogTransition.ts
5
+ * (same shape, different element API: `el.open = true/false` here instead of `showModal()`/`close()`).
6
+ *
7
+ * Why this exists: naively binding `<details open={isExpanded}>` and letting the browser's own click
8
+ * toggle drive it looks fine expanding, but collapsing never animates — the browser removes the `open`
9
+ * attribute synchronously the instant a click fires, which hides the panel's content before any CSS
10
+ * transition on grid-template-rows/opacity/filter gets a chance to run (same root cause the Modal contract already
11
+ * solved for Modal/SidePanel's native <dialog>). The fix is the same shape: intercept the toggle, keep
12
+ * `open` true and drive a `data-state="closing"` attribute through the real collapse transition, and only
13
+ * flip `open` to false for real once the collapse duration token has elapsed.
14
+ */
15
+ export declare function useDisclosureTransition(expanded: boolean, closeDurationToken: string): {
16
+ ref: React.RefObject<HTMLDetailsElement | null>;
17
+ state: DisclosureTransitionState;
18
+ };
19
+ //# sourceMappingURL=useDisclosureTransition.d.ts.map
@@ -0,0 +1,41 @@
1
+ import * as React from 'react';
2
+ import { resolveTokenPx } from './resolveTokenPx.js';
3
+ /**
4
+ * Open/close choreography for Accordion's native <details> — sibling to useDialogTransition.ts
5
+ * (same shape, different element API: `el.open = true/false` here instead of `showModal()`/`close()`).
6
+ *
7
+ * Why this exists: naively binding `<details open={isExpanded}>` and letting the browser's own click
8
+ * toggle drive it looks fine expanding, but collapsing never animates — the browser removes the `open`
9
+ * attribute synchronously the instant a click fires, which hides the panel's content before any CSS
10
+ * transition on grid-template-rows/opacity/filter gets a chance to run (same root cause the Modal contract already
11
+ * solved for Modal/SidePanel's native <dialog>). The fix is the same shape: intercept the toggle, keep
12
+ * `open` true and drive a `data-state="closing"` attribute through the real collapse transition, and only
13
+ * flip `open` to false for real once the collapse duration token has elapsed.
14
+ */
15
+ export function useDisclosureTransition(expanded, closeDurationToken) {
16
+ const ref = React.useRef(null);
17
+ const [state, setState] = React.useState(expanded ? 'open' : 'closed');
18
+ React.useEffect(() => {
19
+ const el = ref.current;
20
+ if (!el)
21
+ return;
22
+ if (expanded) {
23
+ el.open = true;
24
+ const raf = requestAnimationFrame(() => setState('open'));
25
+ return () => cancelAnimationFrame(raf);
26
+ }
27
+ if (!el.open) {
28
+ setState('closed');
29
+ return;
30
+ }
31
+ setState('closing');
32
+ const closeMs = resolveTokenPx(closeDurationToken, el);
33
+ const timeout = window.setTimeout(() => {
34
+ el.open = false;
35
+ setState('closed');
36
+ }, closeMs);
37
+ return () => window.clearTimeout(timeout);
38
+ }, [expanded, closeDurationToken]);
39
+ return { ref, state };
40
+ }
41
+ //# sourceMappingURL=useDisclosureTransition.js.map
@@ -0,0 +1,3 @@
1
+ import { type ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
3
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+ export function cn(...inputs) {
4
+ return twMerge(clsx(inputs));
5
+ }
6
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: action-bar
3
+ category: navigation
4
+ components: [Button]
5
+ when: "A horizontal group of actions — page-level CTAs, toolbar, table batch actions."
6
+ ---
7
+
8
+ # Pattern: Action Bar
9
+
10
+ ## When to use
11
+
12
+ - Page header actions (Create, Export, Filter)
13
+ - Table batch-selection actions (Delete selected, Move to…)
14
+ - Toolbar in a rich editor or data grid
15
+ - Footer of a dialog/panel
16
+
17
+ ## Anatomy
18
+
19
+ ```
20
+ Page header:
21
+ ┌──────────────────────────────────────────────────────┐
22
+ │ Projects [Import] [New project ▸] │
23
+ └──────────────────────────────────────────────────────┘
24
+
25
+ Batch actions (appears when rows are selected):
26
+ ┌──────────────────────────────────────────────────────┐
27
+ │ 3 selected [Archive] [Move to…] [Delete] │
28
+ └──────────────────────────────────────────────────────┘
29
+ ```
30
+
31
+ ## Button role hierarchy (enforce this order)
32
+
33
+ | Position | Variant | Use case |
34
+ |----------|-------------|--------------------------------------|
35
+ | Last | `primary` | The main CTA — one per bar maximum |
36
+ | Middle | `secondary` | Secondary actions |
37
+ | Any | `ghost` | Tertiary, often icon-only |
38
+ | Isolated | `danger` | Destructive — separate from the rest by a gap |
39
+
40
+ ## Code
41
+
42
+ ```tsx
43
+ import { Button } from '@helixds/react';
44
+ import { IconPlus, IconUpload, IconTrash } from '@tabler/icons-react';
45
+
46
+ /* Page header action bar */
47
+ function PageActions({ onNew, onImport }: { onNew: () => void; onImport: () => void }) {
48
+ return (
49
+ <div
50
+ data-helix-pattern="action-bar"
51
+ style={{ display: 'flex', alignItems: 'center', gap: 'var(--helix-spacing-2xs)' }} // button group: 4px (group-spacing.md)
52
+ >
53
+ <Button variant="secondary" icon={IconUpload} onClick={onImport}>
54
+ Import
55
+ </Button>
56
+ <Button variant="primary" icon={IconPlus} onClick={onNew}>
57
+ New project
58
+ </Button>
59
+ </div>
60
+ );
61
+ }
62
+
63
+ /* Batch action bar with destructive action separated */
64
+ function BatchActions({
65
+ count,
66
+ onArchive,
67
+ onMove,
68
+ onDelete,
69
+ }: {
70
+ count: number;
71
+ onArchive: () => void;
72
+ onMove: () => void;
73
+ onDelete: () => void;
74
+ }) {
75
+ return (
76
+ <div
77
+ data-helix-pattern="action-bar"
78
+ role="toolbar"
79
+ aria-label="Batch actions"
80
+ style={{
81
+ display: 'flex',
82
+ alignItems: 'center',
83
+ gap: 'var(--helix-primitive-spacing-50)',
84
+ }}
85
+ >
86
+ <span style={{ fontSize: 'var(--helix-primitive-fontSize-s)', color: 'var(--helix-color-text-neutral-light)' }}>
87
+ {count} selected
88
+ </span>
89
+
90
+ <div style={{ display: 'flex', gap: 'var(--helix-spacing-2xs)' }}>
91
+ <Button variant="ghost" onClick={onArchive}>Archive</Button>
92
+ <Button variant="ghost" onClick={onMove}>Move to…</Button>
93
+ </div>
94
+
95
+ {/* Danger is separated by a larger gap */}
96
+ <div style={{ marginLeft: 'var(--helix-primitive-spacing-100)' }}>
97
+ <Button
98
+ variant="danger"
99
+ icon={IconTrash}
100
+ onClick={onDelete}
101
+ >
102
+ Delete
103
+ </Button>
104
+ </div>
105
+ </div>
106
+ );
107
+ }
108
+ ```
109
+
110
+ ## Rules
111
+
112
+ 1. Maximum one `primary` button per bar — it signals the most important action
113
+ 2. Danger button must be visually separated (extra margin, or positioned at the opposite end)
114
+ 3. Icon-only buttons must have `aria-label` on the Button element itself
115
+ 4. `role="toolbar"` when the bar contains 3+ interactive elements
116
+
117
+ ## Anti-patterns
118
+
119
+ - ❌ Two `primary` buttons side by side — one primary maximum
120
+ - ❌ `danger` button immediately adjacent to `primary` without a gap — users will misclick
121
+ - ❌ Putting destructive action first/leftmost — it's read last, not first
122
+ - ❌ `ghost` for the main CTA in a toolbar — it disappears visually
123
+
124
+ ## Tokens used
125
+
126
+ - `--helix-primitive-spacing-2` — default gap between buttons
127
+ - `--helix-primitive-spacing-4` — separation gap before danger button
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: border-always
3
+ category: foundation
4
+ components: [Badge, Button, Chip, IconButton, Input, Select, Textarea, Checkbox, RadioButton, Card]
5
+ when: "Building or changing any component that has a border in at least one of its variants or states."
6
+ ---
7
+
8
+ # Pattern: Border always
9
+
10
+ **A rule, not a component.** If a component has a border in any variant or state, it has that border in
11
+ **every** variant and state, at the same width. States and variants change the border's **color** only —
12
+ never whether it exists, never its width.
13
+
14
+ ## Why
15
+
16
+ A border takes up space. When it appears in one state and disappears in another, the component changes
17
+ size between them: the label shifts, the row reflows, a chip gets 2px narrower when it's toggled. That
18
+ happened in Figma (the old checked Chip lost its stroke, and with the stroke counted in the layout the chip
19
+ shrank). One border, always there, keeps every state the exact same size.
20
+
21
+ ## Rule
22
+
23
+ - **Code:** declare the border once on the base rule (`border: var(--helix-borderWidth-thin) solid …`).
24
+ State and variant rules only set `border-color`. When a state shouldn't show a border, set
25
+ `border-color` to the same color as the fill (or `transparent`) — never `border: none` / `border-width: 0`.
26
+ (Resetting the native border of an inner element — the `<input>` inside Input's wrapper, a bare icon
27
+ button — is not a state change and is fine.)
28
+ - **Figma:** every variant of the component carries the stroke, same weight, same alignment. The stroke **counts in the auto layout**
29
+ (`strokesIncludedInLayout = true`, "Include stroke in layout") — code is `border-box`, so the 1px border
30
+ sits between the edge and the padding; without it the Figma component is 2px narrower and its content
31
+ 1px closer to the edge. A state with
32
+ "no visible border" binds the stroke to the same Theme variable as the fill underneath — the stroke is
33
+ still there, so the frame keeps its size.
34
+ - **Checked by:** `scripts/figma/audit-component.js` (check 6, `border`) — fails when a layer has a stroke
35
+ in some variants and none, or a different weight, in others.
36
+
37
+ ## Applies to
38
+
39
+ Every bordered component: Badge, Button (ghost keeps a 1px transparent border), Chip, IconButton, Input,
40
+ Select, Textarea, MultiSelect, Checkbox, RadioButton, Card.