@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,157 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { cn } from '../../lib/utils.js';
4
+ // Same gutter as Tooltip: "doesn't fit" means "would land inside this margin of the viewport" (the Tooltip contract).
5
+ const EDGE_GUTTER = 8;
6
+ const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
7
+ function readOffset(el) {
8
+ const value = parseFloat(getComputedStyle(el).getPropertyValue('--helix-popover-offset'));
9
+ return Number.isFinite(value) ? value : 4;
10
+ }
11
+ /**
12
+ * Flip + clamp, as Tooltip does (the Tooltip contract), but for a position: fixed panel in the top layer: the panel's
13
+ * top/left are computed from the trigger's viewport rect. Recomputed on open, on resize and on any
14
+ * ancestor scroll (capture phase) while open.
15
+ */
16
+ function usePlacement(triggerRef, contentRef, requested, expanded) {
17
+ const [state, setState] = React.useState({
18
+ placement: requested,
19
+ top: 0,
20
+ left: 0,
21
+ });
22
+ const recalculate = React.useCallback(() => {
23
+ const trigger = triggerRef.current;
24
+ const content = contentRef.current;
25
+ if (!trigger || !content)
26
+ return;
27
+ const t = trigger.getBoundingClientRect();
28
+ const c = content.getBoundingClientRect();
29
+ const vw = window.innerWidth;
30
+ const vh = window.innerHeight;
31
+ const offset = readOffset(content);
32
+ let placement = requested;
33
+ if (requested === 'top' || requested === 'bottom') {
34
+ const fitsTop = t.top - c.height - offset - EDGE_GUTTER >= 0;
35
+ const fitsBottom = t.bottom + c.height + offset + EDGE_GUTTER <= vh;
36
+ if (requested === 'top' && !fitsTop && fitsBottom)
37
+ placement = 'bottom';
38
+ if (requested === 'bottom' && !fitsBottom && fitsTop)
39
+ placement = 'top';
40
+ }
41
+ else {
42
+ const fitsLeft = t.left - c.width - offset - EDGE_GUTTER >= 0;
43
+ const fitsRight = t.right + c.width + offset + EDGE_GUTTER <= vw;
44
+ if (requested === 'left' && !fitsLeft && fitsRight)
45
+ placement = 'right';
46
+ if (requested === 'right' && !fitsRight && fitsLeft)
47
+ placement = 'left';
48
+ }
49
+ const clamp = (value, size, max) => Math.min(Math.max(value, EDGE_GUTTER), Math.max(EDGE_GUTTER, max - size - EDGE_GUTTER));
50
+ let top;
51
+ let left;
52
+ if (placement === 'top' || placement === 'bottom') {
53
+ // Start-aligned with the trigger, clamped on the cross axis.
54
+ left = clamp(t.left, c.width, vw);
55
+ top = placement === 'bottom' ? t.bottom + offset : t.top - c.height - offset;
56
+ }
57
+ else {
58
+ top = clamp(t.top, c.height, vh);
59
+ left = placement === 'right' ? t.right + offset : t.left - c.width - offset;
60
+ }
61
+ setState({ placement, top, left });
62
+ }, [requested, triggerRef, contentRef]);
63
+ React.useLayoutEffect(() => {
64
+ if (!expanded)
65
+ return;
66
+ recalculate();
67
+ window.addEventListener('resize', recalculate);
68
+ window.addEventListener('scroll', recalculate, true);
69
+ return () => {
70
+ window.removeEventListener('resize', recalculate);
71
+ window.removeEventListener('scroll', recalculate, true);
72
+ };
73
+ }, [expanded, recalculate]);
74
+ // Closed, the panel shows the requested side: flip only applies once it's measured open.
75
+ return expanded ? state : { ...state, placement: requested };
76
+ }
77
+ const Popover = ({ label, children, trigger, placement = 'bottom', expanded, defaultExpanded = false, onExpandedChange, className, }) => {
78
+ const uid = React.useId();
79
+ const contentId = `helix-popover-${uid}`;
80
+ const titleId = `${contentId}-title`;
81
+ const rootRef = React.useRef(null);
82
+ const triggerRef = React.useRef(null);
83
+ const contentRef = React.useRef(null);
84
+ // Focus moves into the panel only when the user opened it — never for a panel open on mount.
85
+ const focusOnOpen = React.useRef(false);
86
+ const isControlled = expanded !== undefined;
87
+ const [internal, setInternal] = React.useState(defaultExpanded);
88
+ const open = isControlled ? expanded : internal;
89
+ const setOpen = React.useCallback((next) => {
90
+ if (!isControlled)
91
+ setInternal(next);
92
+ onExpandedChange?.(next);
93
+ }, [isControlled, onExpandedChange]);
94
+ const position = usePlacement(triggerRef, contentRef, placement, open);
95
+ // Native popover="manual": the browser puts it in the top layer (no z-index, no portal) — the Popover contract.
96
+ // Light dismiss is "manual" on purpose: Escape has to return focus to the trigger, and an outside
97
+ // click must not, so both are handled below rather than by popover="auto".
98
+ React.useLayoutEffect(() => {
99
+ const el = contentRef.current;
100
+ if (!el || typeof el.showPopover !== 'function')
101
+ return;
102
+ const isOpen = el.matches(':popover-open');
103
+ if (open && !isOpen)
104
+ el.showPopover();
105
+ if (!open && isOpen)
106
+ el.hidePopover();
107
+ }, [open]);
108
+ React.useEffect(() => {
109
+ if (!open || !focusOnOpen.current)
110
+ return;
111
+ focusOnOpen.current = false;
112
+ const first = contentRef.current?.querySelector(FOCUSABLE);
113
+ (first ?? contentRef.current)?.focus();
114
+ }, [open]);
115
+ // Outside pointerdown closes without moving focus — the user is already putting it somewhere else.
116
+ React.useEffect(() => {
117
+ if (!open)
118
+ return;
119
+ const onPointerDown = (event) => {
120
+ if (rootRef.current?.contains(event.target))
121
+ return;
122
+ setOpen(false);
123
+ };
124
+ document.addEventListener('pointerdown', onPointerDown);
125
+ return () => document.removeEventListener('pointerdown', onPointerDown);
126
+ }, [open, setOpen]);
127
+ const handleKeyDown = (event) => {
128
+ if (event.key !== 'Escape' || !open)
129
+ return;
130
+ event.stopPropagation();
131
+ setOpen(false);
132
+ triggerRef.current?.focus();
133
+ };
134
+ const triggerProps = trigger.props;
135
+ const triggerElement = React.cloneElement(trigger, {
136
+ ref: (node) => {
137
+ triggerRef.current = node;
138
+ },
139
+ 'aria-expanded': open,
140
+ 'aria-controls': contentId,
141
+ 'aria-haspopup': 'dialog',
142
+ onClick: (event) => {
143
+ triggerProps.onClick?.(event);
144
+ if (event.defaultPrevented)
145
+ return;
146
+ if (!open)
147
+ focusOnOpen.current = true;
148
+ setOpen(!open);
149
+ },
150
+ });
151
+ return (_jsxs("span", { ref: rootRef, "data-helix-part": "popover-root", onKeyDown: handleKeyDown, className: cn(className), children: [triggerElement, _jsxs("div", { ref: contentRef, id: contentId, popover: "manual", role: "dialog", "aria-labelledby": titleId, tabIndex: -1, "data-helix-part": "popover-content", "data-placement": position.placement, "data-expanded": open ? 'true' : 'false',
152
+ // Only the computed geometry is inline; every visual property stays in CSS.
153
+ style: { top: `${position.top}px`, left: `${position.left}px` }, children: [_jsx("p", { id: titleId, "data-helix-part": "popover-title", children: label }), _jsx("div", { "data-helix-part": "popover-body", children: children })] })] }));
154
+ };
155
+ Popover.displayName = 'Popover';
156
+ export { Popover };
157
+ //# sourceMappingURL=Popover.js.map
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @helixds/react — agent note
3
+ * Before using Popover, read its contract: node_modules/@helixds/react/dist/contracts/Popover.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 type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';
9
+ export interface PopoverProps {
10
+ /** The panel's visible title — also its accessible name (aria-labelledby). */
11
+ label: string;
12
+ /** The panel's content: text and, optionally, actions. */
13
+ children: React.ReactNode;
14
+ /** The control that opens and closes the panel (a Button or IconButton). Must forward onClick, ref-less ARIA attributes and focus to its DOM node. */
15
+ trigger: React.ReactElement;
16
+ /** Preferred side of the trigger — flips when there isn't room and is clamped to the viewport (the Tooltip contract). Default: 'bottom' */
17
+ placement?: PopoverPlacement;
18
+ /** Controlled open state. */
19
+ expanded?: boolean;
20
+ /** Uncontrolled initial open state. Default: false */
21
+ defaultExpanded?: boolean;
22
+ /** Called when the panel opens or closes (trigger, Escape, outside click). */
23
+ onExpandedChange?: (expanded: boolean) => void;
24
+ /** Additional className for the root. */
25
+ className?: string;
26
+ }
27
+ //# sourceMappingURL=Popover.types.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Popover.types.js.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @helixds/react — agent note
3
+ * Before using Popover, read its contract: node_modules/@helixds/react/dist/contracts/Popover.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 { Popover } from './Popover.js';
8
+ export type { PopoverProps, PopoverPlacement } from './Popover.types.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { Popover } from './Popover.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @helixds/react — agent note
3
+ * Before using RadioButton, read its contract: node_modules/@helixds/react/dist/contracts/RadioButton.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 { RadioButtonProps } from './RadioButton.types.js';
9
+ declare const RadioButton: {
10
+ ({ label, name: nameProp, value, checked, defaultChecked, onChange, description, errorMessage, invalid, disabled, required, className, }: RadioButtonProps): React.JSX.Element;
11
+ displayName: string;
12
+ };
13
+ export { RadioButton };
14
+ //# sourceMappingURL=RadioButton.d.ts.map
@@ -0,0 +1,4 @@
1
+ /** Machine-readable component documentation for the Helix RadioButton. */
2
+ import type { ComponentDoc } from '../../lib/component-doc.js';
3
+ export declare const doc: ComponentDoc;
4
+ //# sourceMappingURL=RadioButton.doc.d.ts.map
@@ -0,0 +1,35 @@
1
+ export const doc = {
2
+ name: 'RadioButton',
3
+ purpose: 'A single radio input — the same option unit RadioGroup renders per choice, exposed standalone.',
4
+ contract: 'contracts/components/RadioButton.json',
5
+ a11y: [
6
+ 'A real `<input type="radio">` — group it with siblings by giving them the same `name` for native arrow-key/mutual-exclusivity behavior.',
7
+ 'Prefer RadioGroup for an actual set of options — it wraps the same anatomy in a `<fieldset>`/`<legend>` for free. Reach for RadioButton only when you need one radio outside that structure.',
8
+ ],
9
+ variants: [],
10
+ sizes: [],
11
+ tokens: [
12
+ { part: 'radio-control', label: 'Default fill', token: '--helix-radio-fill-default', kind: 'color' },
13
+ { part: 'radio-control', label: 'Checked fill', token: '--helix-radio-fill-checked', kind: 'color' },
14
+ { part: 'radio-control', label: 'Default border', token: '--helix-radio-border-default', kind: 'color' },
15
+ { part: 'radio-control', label: 'Checked border', token: '--helix-radio-border-checked', kind: 'color' },
16
+ { part: 'radio-control', label: 'Focus border', token: '--helix-radio-border-focus', kind: 'color' },
17
+ { part: 'radio-control', label: 'Invalid border', token: '--helix-radio-border-invalid', kind: 'color' },
18
+ { part: 'radio-dot', label: 'Selected dot color', token: '--helix-radio-dot', kind: 'color' },
19
+ ],
20
+ features: [
21
+ 'label — visible label',
22
+ 'name — shared with sibling RadioButtons for native mutual exclusivity; auto-generated (ungrouped) if omitted',
23
+ 'checked / defaultChecked / onChange — controlled or uncontrolled, same pattern as Switch',
24
+ 'description — helper text under the label',
25
+ 'invalid / disabled / required',
26
+ ],
27
+ examples: [
28
+ { label: 'Basic', code: `<RadioButton label="Free" name="plan" value="free" defaultChecked />` },
29
+ {
30
+ label: 'Grouped by name',
31
+ code: `<RadioButton label="Free" name="plan" value="free" />\n<RadioButton label="Pro" name="plan" value="pro" />`,
32
+ },
33
+ ],
34
+ };
35
+ //# sourceMappingURL=RadioButton.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 { cn } from '../../lib/utils.js';
4
+ let idCounter = 0;
5
+ const RadioButton = ({ label, name: nameProp, value, checked, defaultChecked = false, onChange, description, errorMessage, invalid = false, disabled = false, required = false, className, }) => {
6
+ const uid = `helix-radio-button-${++idCounter}`;
7
+ const name = nameProp ?? uid;
8
+ const descId = description ? `${uid}-desc` : undefined;
9
+ const errId = errorMessage ? `${uid}-err` : undefined;
10
+ const describedby = [descId, errId].filter(Boolean).join(' ') || undefined;
11
+ return (_jsxs("label", { "data-helix-part": "radio-item", htmlFor: uid, className: cn(className), ...(disabled ? { 'data-disabled': '' } : {}), ...(invalid ? { 'data-invalid': '' } : {}), children: [_jsx("input", { id: uid, type: "radio", name: name, value: value, checked: checked, defaultChecked: checked === undefined ? defaultChecked : undefined, disabled: disabled, required: required, "aria-invalid": invalid || undefined, "aria-describedby": describedby, "data-helix-part": "radio-input", onChange: (event) => onChange?.(event.currentTarget.checked) }), _jsx("span", { "data-helix-part": "radio-control", "aria-hidden": "true", children: _jsx("span", { "data-helix-part": "radio-dot" }) }), _jsxs("span", { "data-helix-part": "radio-item-content", children: [_jsxs("span", { "data-helix-part": "radio-item-label", children: [label, required && _jsx("span", { "data-helix-part": "radio-item-required", "aria-hidden": "true", children: "*" })] }), description && !errorMessage && (_jsx("span", { id: descId, "data-helix-part": "radio-item-description", children: description })), errorMessage && (_jsx("span", { id: errId, "data-helix-part": "radio-item-error", role: "alert", children: errorMessage }))] })] }));
12
+ };
13
+ RadioButton.displayName = 'RadioButton';
14
+ export { RadioButton };
15
+ //# sourceMappingURL=RadioButton.js.map
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @helixds/react — agent note
3
+ * Before using RadioButton, read its contract: node_modules/@helixds/react/dist/contracts/RadioButton.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 interface RadioButtonProps {
8
+ /** Visible label. */
9
+ label: string;
10
+ /** Native radio group name, shared with any sibling RadioButtons it should be mutually exclusive with. Auto-generated (unique to this instance) if omitted — meaning it won't group with anything unless set explicitly. */
11
+ name?: string;
12
+ /** Native radio value, read from the form on submit. Defaults to the native 'on' if omitted. */
13
+ value?: string;
14
+ /** Controlled checked state. */
15
+ checked?: boolean;
16
+ /** Uncontrolled initial checked state. Default: false */
17
+ defaultChecked?: boolean;
18
+ /** Change handler. */
19
+ onChange?: (checked: boolean) => void;
20
+ /** Helper text shown under the label. Not shown when `errorMessage` is also set. */
21
+ description?: string;
22
+ /** Error text shown under the label when `invalid` is true — takes over from `description`. */
23
+ errorMessage?: string;
24
+ /** Shows error styling. Default: false */
25
+ invalid?: boolean;
26
+ /** Disables the input. Default: false */
27
+ disabled?: boolean;
28
+ /** Marks the input as required. Default: false */
29
+ required?: boolean;
30
+ /** Additional className for the root. */
31
+ className?: string;
32
+ }
33
+ //# sourceMappingURL=RadioButton.types.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=RadioButton.types.js.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @helixds/react — agent note
3
+ * Before using RadioButton, read its contract: node_modules/@helixds/react/dist/contracts/RadioButton.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 { RadioButton } from './RadioButton.js';
8
+ export type { RadioButtonProps } from './RadioButton.types.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { RadioButton } from './RadioButton.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @helixds/react — agent note
3
+ * Before using RadioGroup, read its contract: node_modules/@helixds/react/dist/contracts/RadioGroup.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 { RadioGroupProps } from './RadioGroup.types.js';
8
+ export declare function RadioGroup({ label, options, value, defaultValue, onChange, orientation, description, errorMessage, invalid, disabled, required, name: nameProp, }: RadioGroupProps): import("react").JSX.Element;
9
+ export declare namespace RadioGroup {
10
+ var displayName: string;
11
+ }
12
+ //# sourceMappingURL=RadioGroup.d.ts.map
@@ -0,0 +1,4 @@
1
+ /** Machine-readable component documentation for the Helix RadioGroup. */
2
+ import type { ComponentDoc } from '../../lib/component-doc.js';
3
+ export declare const doc: ComponentDoc;
4
+ //# sourceMappingURL=RadioGroup.doc.d.ts.map
@@ -0,0 +1,80 @@
1
+ export const doc = {
2
+ name: 'RadioGroup',
3
+ purpose: 'Lets users pick exactly one option from a small, visible set of mutually exclusive choices.',
4
+ contract: 'contracts/components/RadioGroup.json',
5
+ a11y: [
6
+ 'Renders a real `<fieldset>`/`<legend>` — the group `label` is the legend, not a per-option label.',
7
+ 'Pair `invalid` with `errorMessage` so screen readers get a clear validation message.',
8
+ 'Each option is a real `<input type="radio">` sharing one `name`, so arrow-key navigation works natively.',
9
+ ],
10
+ variants: [
11
+ { name: 'vertical', description: 'Default orientation — options stack top to bottom.' },
12
+ { name: 'horizontal', description: 'Options lay out left to right. Use for short option sets only.' },
13
+ ],
14
+ sizes: [],
15
+ tokens: [
16
+ { part: 'radio-control', label: 'Default fill', token: '--helix-radio-fill-default', kind: 'color' },
17
+ { part: 'radio-control', label: 'Checked fill', token: '--helix-radio-fill-checked', kind: 'color' },
18
+ { part: 'radio-control', label: 'Checked fill', token: '--helix-radio-fill-checked-hover', kind: 'color', state: 'hover', meta: 'Hover while checked' },
19
+ { part: 'radio-control', label: 'Default border', token: '--helix-radio-border-default', kind: 'color' },
20
+ { part: 'radio-control', label: 'Default border', token: '--helix-radio-border-hover', kind: 'color', state: 'hover', meta: 'Hover while unchecked' },
21
+ { part: 'radio-control', label: 'Checked border', token: '--helix-radio-border-checked', kind: 'color' },
22
+ { part: 'radio-control', label: 'Focus border', token: '--helix-radio-border-focus', kind: 'color' },
23
+ { part: 'radio-control', label: 'Invalid border', token: '--helix-radio-border-invalid', kind: 'color' },
24
+ { part: 'radio-dot', label: 'Selected dot color', token: '--helix-radio-dot', kind: 'color' },
25
+ { part: 'radio-legend', label: 'Group label text', token: '--helix-radio-text-label', kind: 'color' },
26
+ { part: 'radio-item-label', label: 'Option label text', token: '--helix-radio-text-label', kind: 'color' },
27
+ { part: 'radio-item-description', label: 'Option description text', token: '--helix-radio-text-description', kind: 'color' },
28
+ { part: 'radio-error', label: 'Error text', token: '--helix-radio-text-error', kind: 'color' },
29
+ { part: 'radio-legend', label: 'legend', token: '--helix-primitive-fontSize-s', kind: 'typography', meta: 'Label' },
30
+ { part: 'radio-legend', label: 'legend.weight', token: '--helix-primitive-fontWeight-medium', kind: 'typography', meta: 'Medium' },
31
+ { part: 'radio-item-label', label: 'item.label', token: '--helix-primitive-fontSize-s', kind: 'typography', meta: 'Body small' },
32
+ { part: 'radio-item-label', label: 'item.label.weight', token: '--helix-primitive-fontWeight-medium', kind: 'typography', meta: 'Medium' },
33
+ { part: 'radio-item-description', label: 'item.description', token: '--helix-primitive-fontSize-s', kind: 'typography', meta: 'Body xsmall' },
34
+ { part: 'radio-control', label: 'control.size', token: '--helix-radio-size', kind: 'space' },
35
+ { part: 'radio-options', label: 'gap.options', token: '--helix-primitive-spacing-75', kind: 'space', axis: 'vertical' },
36
+ { part: 'radio-item', label: 'gap.control.content', token: '--helix-primitive-spacing-50', kind: 'space', axis: 'horizontal' },
37
+ { part: 'radio-item-content', label: 'gap.label.description', token: '--helix-primitive-spacing-25', kind: 'space', axis: 'vertical' },
38
+ { part: 'radio-legend', label: 'gap.legend.options', token: '--helix-primitive-spacing-25', kind: 'space', axis: 'vertical' },
39
+ { part: 'radio-control', label: 'radio.control', value: '9999px', kind: 'radius', meta: 'Always a full circle — no semantic.radius token, radios are round by definition' },
40
+ { part: 'radio-group', label: 'display', value: 'block' },
41
+ { part: 'radio-options', label: 'display', value: 'flex' },
42
+ { part: 'radio-options', label: 'flex-direction', value: 'column' },
43
+ { part: 'radio-item', label: 'display', value: 'flex' },
44
+ { part: 'radio-item', label: 'align-items', value: 'flex-start' },
45
+ { part: 'radio-item', label: 'cursor', value: 'pointer' },
46
+ { part: 'radio-input', label: 'position', value: 'absolute' },
47
+ { part: 'radio-input', label: 'opacity', value: '0' },
48
+ { part: 'radio-control', label: 'display', value: 'inline-flex' },
49
+ { part: 'radio-control', label: 'align-items', value: 'center' },
50
+ { part: 'radio-control', label: 'justify-content', value: 'center' },
51
+ { part: 'radio-control', label: 'flex-shrink', value: '0' },
52
+ ],
53
+ features: [
54
+ 'label — required legend for the whole group',
55
+ 'options — array of { value, label, description?, disabled? }',
56
+ 'orientation — vertical (default) or horizontal layout',
57
+ 'value / defaultValue — controlled or uncontrolled selection',
58
+ 'invalid / errorMessage — group-level validation state and helper copy',
59
+ 'disabled — disables the whole group; individual options can also disable themselves',
60
+ ],
61
+ examples: [
62
+ {
63
+ label: 'Default',
64
+ code: `<RadioGroup label="Plan" options={[{ value: 'free', label: 'Free' }, { value: 'pro', label: 'Pro' }]} />`,
65
+ },
66
+ {
67
+ label: 'With descriptions',
68
+ code: `<RadioGroup label="Plan" options={[{ value: 'free', label: 'Free', description: 'Basic features' }, { value: 'pro', label: 'Pro', description: 'Everything, unlimited' }]} />`,
69
+ },
70
+ {
71
+ label: 'Horizontal',
72
+ code: `<RadioGroup label="Size" orientation="horizontal" options={[{ value: 's', label: 'S' }, { value: 'm', label: 'M' }, { value: 'l', label: 'L' }]} />`,
73
+ },
74
+ {
75
+ label: 'Invalid',
76
+ code: `<RadioGroup label="Plan" options={options} invalid errorMessage="Choose a plan to continue" />`,
77
+ },
78
+ ],
79
+ };
80
+ //# sourceMappingURL=RadioGroup.doc.js.map
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ let idCounter = 0;
3
+ export function RadioGroup({ label, options, value, defaultValue, onChange, orientation = 'vertical', description, errorMessage, invalid = false, disabled = false, required = false, name: nameProp, }) {
4
+ const uid = `helix-radio-${++idCounter}`;
5
+ const name = nameProp ?? uid;
6
+ const descId = description ? `${uid}-desc` : undefined;
7
+ const errId = errorMessage ? `${uid}-err` : undefined;
8
+ const describedby = [descId, errId].filter(Boolean).join(' ') || undefined;
9
+ return (_jsxs("fieldset", { "data-helix-part": "radio-group",
10
+ // radiogroup, as the contract states — a bare fieldset is role "group", which doesn't allow the
11
+ // aria-required below.
12
+ role: "radiogroup", "data-orientation": orientation, ...(disabled ? { 'data-disabled': '' } : {}), ...(invalid ? { 'data-invalid': '' } : {}), "aria-describedby": describedby, "aria-required": required || undefined, children: [_jsxs("legend", { "data-helix-part": "radio-legend", children: [label, required && _jsx("span", { "data-helix-part": "radio-required", "aria-hidden": "true", children: "*" })] }), _jsx("div", { "data-helix-part": "radio-options", "data-orientation": orientation, children: options.map(opt => {
13
+ const itemId = `${uid}-${opt.value}`;
14
+ const isChecked = value !== undefined ? value === opt.value : undefined;
15
+ return (_jsxs("label", { "data-helix-part": "radio-item", htmlFor: itemId, ...(opt.disabled || disabled ? { 'data-disabled': '' } : {}), children: [_jsx("input", { id: itemId, type: "radio", name: name, value: opt.value, checked: isChecked, defaultChecked: isChecked === undefined && defaultValue === opt.value ? true : undefined, disabled: opt.disabled || disabled, required: required, "aria-invalid": invalid || undefined, "data-helix-part": "radio-input", onChange: () => onChange?.(opt.value) }), _jsx("span", { "data-helix-part": "radio-control", "aria-hidden": "true", children: _jsx("span", { "data-helix-part": "radio-dot" }) }), _jsxs("span", { "data-helix-part": "radio-item-content", children: [_jsx("span", { "data-helix-part": "radio-item-label", children: opt.label }), opt.description && (_jsx("span", { "data-helix-part": "radio-item-description", children: opt.description }))] })] }, opt.value));
16
+ }) }), description && !errorMessage && (_jsx("span", { id: descId, "data-helix-part": "radio-description", children: description })), errorMessage && (_jsx("span", { id: errId, "data-helix-part": "radio-error", role: "alert", children: errorMessage }))] }));
17
+ }
18
+ RadioGroup.displayName = 'RadioGroup';
19
+ //# sourceMappingURL=RadioGroup.js.map
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @helixds/react — agent note
3
+ * Before using RadioGroup, read its contract: node_modules/@helixds/react/dist/contracts/RadioGroup.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 type RadioOrientation = 'vertical' | 'horizontal';
8
+ export interface RadioOption {
9
+ value: string;
10
+ label: string;
11
+ description?: string;
12
+ disabled?: boolean;
13
+ }
14
+ export interface RadioGroupProps {
15
+ label: string;
16
+ options: RadioOption[];
17
+ value?: string;
18
+ defaultValue?: string;
19
+ onChange?: (value: string) => void;
20
+ orientation?: RadioOrientation;
21
+ description?: string;
22
+ errorMessage?: string;
23
+ invalid?: boolean;
24
+ disabled?: boolean;
25
+ required?: boolean;
26
+ name?: string;
27
+ }
28
+ //# sourceMappingURL=RadioGroup.types.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=RadioGroup.types.js.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @helixds/react — agent note
3
+ * Before using RadioGroup, read its contract: node_modules/@helixds/react/dist/contracts/RadioGroup.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 { RadioGroup } from './RadioGroup.js';
8
+ export type { RadioGroupProps, RadioOption, RadioOrientation } from './RadioGroup.types.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { RadioGroup } from './RadioGroup.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @helixds/react — agent note
3
+ * Before using SegmentedControl, read its contract: node_modules/@helixds/react/dist/contracts/SegmentedControl.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 { SegmentedControlProps } from './SegmentedControl.types.js';
9
+ export declare function SegmentedControl({ label, options, value, defaultValue, onChange, disabled, name: nameProp, className, }: SegmentedControlProps): React.JSX.Element;
10
+ export declare namespace SegmentedControl {
11
+ var displayName: string;
12
+ }
13
+ //# sourceMappingURL=SegmentedControl.d.ts.map
@@ -0,0 +1,4 @@
1
+ /** Machine-readable component documentation for the Helix SegmentedControl. */
2
+ import type { ComponentDoc } from '../../lib/component-doc.js';
3
+ export declare const doc: ComponentDoc;
4
+ //# sourceMappingURL=SegmentedControl.doc.d.ts.map
@@ -0,0 +1,50 @@
1
+ export const doc = {
2
+ name: 'SegmentedControl',
3
+ purpose: 'Lets users switch between a small, fixed set of mutually exclusive modes or views, with no associated content panel.',
4
+ contract: 'contracts/components/SegmentedControl.json',
5
+ a11y: [
6
+ '`role="radiogroup"` on the root, `role="radio"` + `aria-checked` on each option — not `tablist`/`tab`, since there is no associated panel that changes content (see the SegmentedControl contract).',
7
+ 'Roving `tabIndex` — only the checked option is in the Tab order; arrow keys move both focus and selection between options.',
8
+ '`label` is required and becomes the group\'s `aria-label` — this control has no visible legend.',
9
+ ],
10
+ variants: [],
11
+ sizes: [],
12
+ tokens: [
13
+ { part: 'segmented-control-root', label: 'Track background', token: '--helix-segmentedControl-fill-track', kind: 'color' },
14
+ { part: 'segmented-control-pill', label: 'Pill background', token: '--helix-segmentedControl-fill-pill', kind: 'color' },
15
+ { part: 'segmented-control-item-label', label: 'Default text', token: '--helix-segmentedControl-text-default', kind: 'color' },
16
+ { part: 'segmented-control-item-label', label: 'Checked text', token: '--helix-segmentedControl-text-checked', kind: 'color', meta: 'aria-checked="true"' },
17
+ { part: 'segmented-control-root', label: 'root.radius', token: '--helix-segmentedControl-radius', kind: 'radius' },
18
+ { part: 'segmented-control-item', label: 'item.height', token: '--helix-segmentedControl-height', kind: 'space', meta: 'semantic.size.s' },
19
+ { part: 'segmented-control-root', label: 'root.padding', token: '--helix-segmentedControl-padding', kind: 'space' },
20
+ { part: 'segmented-control-item', label: 'item.paddingX', token: '--helix-segmentedControl-paddingX', kind: 'space', axis: 'horizontal' },
21
+ { part: 'segmented-control-item', label: 'item.fontSize', token: '--helix-segmentedControl-fontSize', kind: 'typography' },
22
+ { part: 'segmented-control-item', label: 'item.fontWeight', token: '--helix-segmentedControl-fontWeight', kind: 'typography' },
23
+ { part: 'segmented-control-root', label: 'display', value: 'inline-flex' },
24
+ { part: 'segmented-control-item', label: 'position', value: 'relative' },
25
+ { part: 'segmented-control-pill', label: 'position', value: 'absolute (inset: 0, behind label — same layering NavItem\'s indicator uses)' },
26
+ ],
27
+ features: [
28
+ 'label — required, becomes the group\'s accessible name',
29
+ 'options — array of { value, label, icon?, disabled? }; an option with icon is icon-only, its label kept as its accessible name',
30
+ 'value / defaultValue — controlled or uncontrolled selection',
31
+ 'onChange — selection change handler',
32
+ 'disabled — disables the whole group; individual options can also disable themselves',
33
+ 'The sliding pill reuses NavItem/Switch\'s Motion layoutId + SPRING_SNAPPY pattern — see the SegmentedControl contract.',
34
+ ],
35
+ examples: [
36
+ {
37
+ label: 'Default',
38
+ code: `<SegmentedControl label="Mode" options={[{ value: 'plan', label: 'Plan' }, { value: 'debug', label: 'Debug' }, { value: 'ask', label: 'Ask' }]} />`,
39
+ },
40
+ {
41
+ label: 'Controlled',
42
+ code: `<SegmentedControl label="Mode" options={options} value={mode} onChange={setMode} />`,
43
+ },
44
+ {
45
+ label: 'With a disabled option',
46
+ code: `<SegmentedControl label="Mode" options={[{ value: 'plan', label: 'Plan' }, { value: 'debug', label: 'Debug', disabled: true }, { value: 'ask', label: 'Ask' }]} />`,
47
+ },
48
+ ],
49
+ };
50
+ //# sourceMappingURL=SegmentedControl.doc.js.map