@helixds/react 0.0.0-stage → 0.1.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 (340) hide show
  1. package/AGENTS.md +292 -0
  2. package/LICENSE +21 -0
  3. package/README.md +49 -2
  4. package/dist/components/Accordion/Accordion.d.ts +14 -0
  5. package/dist/components/Accordion/Accordion.doc.d.ts +4 -0
  6. package/dist/components/Accordion/Accordion.doc.js +27 -0
  7. package/dist/components/Accordion/Accordion.js +76 -0
  8. package/dist/components/Accordion/Accordion.types.d.ts +24 -0
  9. package/dist/components/Accordion/Accordion.types.js +2 -0
  10. package/dist/components/Accordion/index.d.ts +9 -0
  11. package/dist/components/Accordion/index.js +2 -0
  12. package/dist/components/Avatar/Avatar.d.ts +14 -0
  13. package/dist/components/Avatar/Avatar.doc.d.ts +4 -0
  14. package/dist/components/Avatar/Avatar.doc.js +34 -0
  15. package/dist/components/Avatar/Avatar.js +14 -0
  16. package/dist/components/Avatar/Avatar.types.d.ts +20 -0
  17. package/dist/components/Avatar/Avatar.types.js +2 -0
  18. package/dist/components/Avatar/index.d.ts +9 -0
  19. package/dist/components/Avatar/index.js +2 -0
  20. package/dist/components/AvatarGroup/AvatarGroup.d.ts +14 -0
  21. package/dist/components/AvatarGroup/AvatarGroup.doc.d.ts +4 -0
  22. package/dist/components/AvatarGroup/AvatarGroup.doc.js +30 -0
  23. package/dist/components/AvatarGroup/AvatarGroup.js +15 -0
  24. package/dist/components/AvatarGroup/AvatarGroup.types.d.ts +21 -0
  25. package/dist/components/AvatarGroup/AvatarGroup.types.js +2 -0
  26. package/dist/components/AvatarGroup/index.d.ts +9 -0
  27. package/dist/components/AvatarGroup/index.js +2 -0
  28. package/dist/components/Badge/Badge.d.ts +16 -0
  29. package/dist/components/Badge/Badge.doc.d.ts +4 -0
  30. package/dist/components/Badge/Badge.doc.js +69 -0
  31. package/dist/components/Badge/Badge.js +23 -0
  32. package/dist/components/Badge/Badge.types.d.ts +22 -0
  33. package/dist/components/Badge/Badge.types.js +2 -0
  34. package/dist/components/Badge/index.d.ts +9 -0
  35. package/dist/components/Badge/index.js +2 -0
  36. package/dist/components/Button/Button.d.ts +11 -0
  37. package/dist/components/Button/Button.doc.d.ts +4 -0
  38. package/dist/components/Button/Button.doc.js +98 -0
  39. package/dist/components/Button/Button.js +80 -0
  40. package/dist/components/Button/Button.types.d.ts +29 -0
  41. package/dist/components/Button/Button.types.js +2 -0
  42. package/dist/components/Button/index.d.ts +9 -0
  43. package/dist/components/Button/index.js +2 -0
  44. package/dist/components/Card/Card.d.ts +14 -0
  45. package/dist/components/Card/Card.doc.d.ts +4 -0
  46. package/dist/components/Card/Card.doc.js +44 -0
  47. package/dist/components/Card/Card.js +9 -0
  48. package/dist/components/Card/Card.types.d.ts +19 -0
  49. package/dist/components/Card/Card.types.js +2 -0
  50. package/dist/components/Card/index.d.ts +9 -0
  51. package/dist/components/Card/index.js +2 -0
  52. package/dist/components/Chart/Chart.d.ts +14 -0
  53. package/dist/components/Chart/Chart.doc.d.ts +4 -0
  54. package/dist/components/Chart/Chart.doc.js +49 -0
  55. package/dist/components/Chart/Chart.js +184 -0
  56. package/dist/components/Chart/Chart.types.d.ts +21 -0
  57. package/dist/components/Chart/Chart.types.js +2 -0
  58. package/dist/components/Chart/index.d.ts +9 -0
  59. package/dist/components/Chart/index.js +2 -0
  60. package/dist/components/Checkbox/Checkbox.d.ts +12 -0
  61. package/dist/components/Checkbox/Checkbox.doc.d.ts +4 -0
  62. package/dist/components/Checkbox/Checkbox.doc.js +54 -0
  63. package/dist/components/Checkbox/Checkbox.js +23 -0
  64. package/dist/components/Checkbox/Checkbox.types.d.ts +22 -0
  65. package/dist/components/Checkbox/Checkbox.types.js +2 -0
  66. package/dist/components/Checkbox/index.d.ts +9 -0
  67. package/dist/components/Checkbox/index.js +2 -0
  68. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +13 -0
  69. package/dist/components/CheckboxGroup/CheckboxGroup.doc.d.ts +4 -0
  70. package/dist/components/CheckboxGroup/CheckboxGroup.doc.js +56 -0
  71. package/dist/components/CheckboxGroup/CheckboxGroup.js +27 -0
  72. package/dist/components/CheckboxGroup/CheckboxGroup.types.d.ts +28 -0
  73. package/dist/components/CheckboxGroup/CheckboxGroup.types.js +2 -0
  74. package/dist/components/CheckboxGroup/index.d.ts +9 -0
  75. package/dist/components/CheckboxGroup/index.js +2 -0
  76. package/dist/components/Chip/Chip.d.ts +11 -0
  77. package/dist/components/Chip/Chip.doc.d.ts +4 -0
  78. package/dist/components/Chip/Chip.doc.js +105 -0
  79. package/dist/components/Chip/Chip.js +30 -0
  80. package/dist/components/Chip/Chip.types.d.ts +31 -0
  81. package/dist/components/Chip/Chip.types.js +2 -0
  82. package/dist/components/Chip/index.d.ts +9 -0
  83. package/dist/components/Chip/index.js +2 -0
  84. package/dist/components/ChipGroup/ChipGroup.d.ts +12 -0
  85. package/dist/components/ChipGroup/ChipGroup.doc.d.ts +4 -0
  86. package/dist/components/ChipGroup/ChipGroup.doc.js +31 -0
  87. package/dist/components/ChipGroup/ChipGroup.js +9 -0
  88. package/dist/components/ChipGroup/ChipGroup.types.d.ts +27 -0
  89. package/dist/components/ChipGroup/ChipGroup.types.js +2 -0
  90. package/dist/components/ChipGroup/index.d.ts +9 -0
  91. package/dist/components/ChipGroup/index.js +2 -0
  92. package/dist/components/FAB/FAB.d.ts +11 -0
  93. package/dist/components/FAB/FAB.doc.d.ts +4 -0
  94. package/dist/components/FAB/FAB.doc.js +52 -0
  95. package/dist/components/FAB/FAB.js +133 -0
  96. package/dist/components/FAB/FAB.types.d.ts +37 -0
  97. package/dist/components/FAB/FAB.types.js +2 -0
  98. package/dist/components/FAB/index.d.ts +9 -0
  99. package/dist/components/FAB/index.js +2 -0
  100. package/dist/components/Icon/Icon.d.ts +14 -0
  101. package/dist/components/Icon/Icon.doc.d.ts +4 -0
  102. package/dist/components/Icon/Icon.doc.js +38 -0
  103. package/dist/components/Icon/Icon.js +15 -0
  104. package/dist/components/Icon/Icon.types.d.ts +47 -0
  105. package/dist/components/Icon/Icon.types.js +2 -0
  106. package/dist/components/Icon/createIconAdapter.d.ts +24 -0
  107. package/dist/components/Icon/createIconAdapter.js +28 -0
  108. package/dist/components/Icon/iconStroke.d.ts +20 -0
  109. package/dist/components/Icon/iconStroke.js +54 -0
  110. package/dist/components/Icon/index.d.ts +12 -0
  111. package/dist/components/Icon/index.js +4 -0
  112. package/dist/components/IconButton/IconButton.d.ts +11 -0
  113. package/dist/components/IconButton/IconButton.doc.d.ts +4 -0
  114. package/dist/components/IconButton/IconButton.doc.js +76 -0
  115. package/dist/components/IconButton/IconButton.js +20 -0
  116. package/dist/components/IconButton/IconButton.types.d.ts +25 -0
  117. package/dist/components/IconButton/IconButton.types.js +2 -0
  118. package/dist/components/IconButton/index.d.ts +9 -0
  119. package/dist/components/IconButton/index.js +2 -0
  120. package/dist/components/Input/Input.d.ts +11 -0
  121. package/dist/components/Input/Input.doc.d.ts +4 -0
  122. package/dist/components/Input/Input.doc.js +68 -0
  123. package/dist/components/Input/Input.js +48 -0
  124. package/dist/components/Input/Input.types.d.ts +36 -0
  125. package/dist/components/Input/Input.types.js +2 -0
  126. package/dist/components/Input/index.d.ts +9 -0
  127. package/dist/components/Input/index.js +2 -0
  128. package/dist/components/Menu/Menu.d.ts +14 -0
  129. package/dist/components/Menu/Menu.doc.d.ts +4 -0
  130. package/dist/components/Menu/Menu.doc.js +46 -0
  131. package/dist/components/Menu/Menu.js +105 -0
  132. package/dist/components/Menu/Menu.types.d.ts +34 -0
  133. package/dist/components/Menu/Menu.types.js +2 -0
  134. package/dist/components/Menu/index.d.ts +9 -0
  135. package/dist/components/Menu/index.js +2 -0
  136. package/dist/components/Modal/Modal.d.ts +14 -0
  137. package/dist/components/Modal/Modal.doc.d.ts +4 -0
  138. package/dist/components/Modal/Modal.doc.js +52 -0
  139. package/dist/components/Modal/Modal.js +30 -0
  140. package/dist/components/Modal/Modal.types.d.ts +36 -0
  141. package/dist/components/Modal/Modal.types.js +2 -0
  142. package/dist/components/Modal/index.d.ts +9 -0
  143. package/dist/components/Modal/index.js +2 -0
  144. package/dist/components/MultiSelect/MultiSelect.d.ts +17 -0
  145. package/dist/components/MultiSelect/MultiSelect.doc.d.ts +4 -0
  146. package/dist/components/MultiSelect/MultiSelect.doc.js +37 -0
  147. package/dist/components/MultiSelect/MultiSelect.js +165 -0
  148. package/dist/components/MultiSelect/MultiSelect.types.d.ts +50 -0
  149. package/dist/components/MultiSelect/MultiSelect.types.js +2 -0
  150. package/dist/components/MultiSelect/index.d.ts +9 -0
  151. package/dist/components/MultiSelect/index.js +2 -0
  152. package/dist/components/NavItem/NavItem.d.ts +14 -0
  153. package/dist/components/NavItem/NavItem.doc.d.ts +4 -0
  154. package/dist/components/NavItem/NavItem.doc.js +31 -0
  155. package/dist/components/NavItem/NavItem.js +21 -0
  156. package/dist/components/NavItem/NavItem.types.d.ts +20 -0
  157. package/dist/components/NavItem/NavItem.types.js +2 -0
  158. package/dist/components/NavItem/index.d.ts +9 -0
  159. package/dist/components/NavItem/index.js +2 -0
  160. package/dist/components/RadioButton/RadioButton.d.ts +14 -0
  161. package/dist/components/RadioButton/RadioButton.doc.d.ts +4 -0
  162. package/dist/components/RadioButton/RadioButton.doc.js +35 -0
  163. package/dist/components/RadioButton/RadioButton.js +15 -0
  164. package/dist/components/RadioButton/RadioButton.types.d.ts +33 -0
  165. package/dist/components/RadioButton/RadioButton.types.js +2 -0
  166. package/dist/components/RadioButton/index.d.ts +9 -0
  167. package/dist/components/RadioButton/index.js +2 -0
  168. package/dist/components/RadioGroup/RadioGroup.d.ts +12 -0
  169. package/dist/components/RadioGroup/RadioGroup.doc.d.ts +4 -0
  170. package/dist/components/RadioGroup/RadioGroup.doc.js +80 -0
  171. package/dist/components/RadioGroup/RadioGroup.js +19 -0
  172. package/dist/components/RadioGroup/RadioGroup.types.d.ts +28 -0
  173. package/dist/components/RadioGroup/RadioGroup.types.js +2 -0
  174. package/dist/components/RadioGroup/index.d.ts +9 -0
  175. package/dist/components/RadioGroup/index.js +2 -0
  176. package/dist/components/SegmentedControl/SegmentedControl.d.ts +13 -0
  177. package/dist/components/SegmentedControl/SegmentedControl.doc.d.ts +4 -0
  178. package/dist/components/SegmentedControl/SegmentedControl.doc.js +50 -0
  179. package/dist/components/SegmentedControl/SegmentedControl.js +64 -0
  180. package/dist/components/SegmentedControl/SegmentedControl.types.d.ts +26 -0
  181. package/dist/components/SegmentedControl/SegmentedControl.types.js +2 -0
  182. package/dist/components/SegmentedControl/index.d.ts +9 -0
  183. package/dist/components/SegmentedControl/index.js +2 -0
  184. package/dist/components/Select/Select.d.ts +13 -0
  185. package/dist/components/Select/Select.doc.d.ts +4 -0
  186. package/dist/components/Select/Select.doc.js +66 -0
  187. package/dist/components/Select/Select.js +138 -0
  188. package/dist/components/Select/Select.types.d.ts +36 -0
  189. package/dist/components/Select/Select.types.js +2 -0
  190. package/dist/components/Select/index.d.ts +9 -0
  191. package/dist/components/Select/index.js +2 -0
  192. package/dist/components/SidePanel/SidePanel.d.ts +14 -0
  193. package/dist/components/SidePanel/SidePanel.doc.d.ts +4 -0
  194. package/dist/components/SidePanel/SidePanel.doc.js +29 -0
  195. package/dist/components/SidePanel/SidePanel.js +19 -0
  196. package/dist/components/SidePanel/SidePanel.types.d.ts +28 -0
  197. package/dist/components/SidePanel/SidePanel.types.js +2 -0
  198. package/dist/components/SidePanel/index.d.ts +9 -0
  199. package/dist/components/SidePanel/index.js +2 -0
  200. package/dist/components/Switch/Switch.d.ts +13 -0
  201. package/dist/components/Switch/Switch.doc.d.ts +4 -0
  202. package/dist/components/Switch/Switch.doc.js +56 -0
  203. package/dist/components/Switch/Switch.js +45 -0
  204. package/dist/components/Switch/Switch.types.d.ts +21 -0
  205. package/dist/components/Switch/Switch.types.js +2 -0
  206. package/dist/components/Switch/index.d.ts +9 -0
  207. package/dist/components/Switch/index.js +2 -0
  208. package/dist/components/Table/Table.d.ts +34 -0
  209. package/dist/components/Table/Table.doc.d.ts +4 -0
  210. package/dist/components/Table/Table.doc.js +48 -0
  211. package/dist/components/Table/Table.js +17 -0
  212. package/dist/components/Table/Table.types.d.ts +30 -0
  213. package/dist/components/Table/Table.types.js +2 -0
  214. package/dist/components/Table/index.d.ts +9 -0
  215. package/dist/components/Table/index.js +2 -0
  216. package/dist/components/Textarea/Textarea.d.ts +9 -0
  217. package/dist/components/Textarea/Textarea.doc.d.ts +4 -0
  218. package/dist/components/Textarea/Textarea.doc.js +60 -0
  219. package/dist/components/Textarea/Textarea.js +24 -0
  220. package/dist/components/Textarea/Textarea.types.d.ts +22 -0
  221. package/dist/components/Textarea/Textarea.types.js +2 -0
  222. package/dist/components/Textarea/index.d.ts +9 -0
  223. package/dist/components/Textarea/index.js +2 -0
  224. package/dist/components/Toast/Toast.d.ts +16 -0
  225. package/dist/components/Toast/Toast.doc.d.ts +4 -0
  226. package/dist/components/Toast/Toast.doc.js +37 -0
  227. package/dist/components/Toast/Toast.js +134 -0
  228. package/dist/components/Toast/Toast.types.d.ts +11 -0
  229. package/dist/components/Toast/Toast.types.js +2 -0
  230. package/dist/components/Toast/index.d.ts +10 -0
  231. package/dist/components/Toast/index.js +2 -0
  232. package/dist/components/Toast/toastStore.d.ts +36 -0
  233. package/dist/components/Toast/toastStore.js +57 -0
  234. package/dist/components/Tooltip/Tooltip.d.ts +14 -0
  235. package/dist/components/Tooltip/Tooltip.doc.d.ts +4 -0
  236. package/dist/components/Tooltip/Tooltip.doc.js +33 -0
  237. package/dist/components/Tooltip/Tooltip.js +105 -0
  238. package/dist/components/Tooltip/Tooltip.types.d.ts +21 -0
  239. package/dist/components/Tooltip/Tooltip.types.js +2 -0
  240. package/dist/components/Tooltip/index.d.ts +9 -0
  241. package/dist/components/Tooltip/index.js +2 -0
  242. package/dist/contracts/Accordion.json +174 -0
  243. package/dist/contracts/AppShell.json +118 -0
  244. package/dist/contracts/Avatar.json +157 -0
  245. package/dist/contracts/AvatarGroup.json +169 -0
  246. package/dist/contracts/Badge.json +212 -0
  247. package/dist/contracts/Button.json +295 -0
  248. package/dist/contracts/Card.json +125 -0
  249. package/dist/contracts/Chart.json +167 -0
  250. package/dist/contracts/Checkbox.json +333 -0
  251. package/dist/contracts/CheckboxGroup.json +200 -0
  252. package/dist/contracts/Chip.json +320 -0
  253. package/dist/contracts/ChipGroup.json +182 -0
  254. package/dist/contracts/FAB.json +215 -0
  255. package/dist/contracts/Icon.json +306 -0
  256. package/dist/contracts/IconButton.json +213 -0
  257. package/dist/contracts/Input.json +400 -0
  258. package/dist/contracts/Menu.json +197 -0
  259. package/dist/contracts/Modal.json +192 -0
  260. package/dist/contracts/MultiSelect.json +244 -0
  261. package/dist/contracts/NavItem.json +148 -0
  262. package/dist/contracts/PageHeader.json +134 -0
  263. package/dist/contracts/RadioButton.json +202 -0
  264. package/dist/contracts/RadioGroup.json +228 -0
  265. package/dist/contracts/SegmentedControl.json +193 -0
  266. package/dist/contracts/Select.json +241 -0
  267. package/dist/contracts/SideNav.json +138 -0
  268. package/dist/contracts/SidePanel.json +153 -0
  269. package/dist/contracts/Switch.json +201 -0
  270. package/dist/contracts/Table.json +130 -0
  271. package/dist/contracts/Textarea.json +353 -0
  272. package/dist/contracts/Toast.json +186 -0
  273. package/dist/contracts/Tooltip.json +168 -0
  274. package/dist/contracts/TopBar.json +127 -0
  275. package/dist/contracts/manifest.json +675 -0
  276. package/dist/index.d.ts +109 -0
  277. package/dist/index.js +73 -0
  278. package/dist/layout/AppShell/AppShell.d.ts +14 -0
  279. package/dist/layout/AppShell/AppShell.doc.d.ts +4 -0
  280. package/dist/layout/AppShell/AppShell.doc.js +27 -0
  281. package/dist/layout/AppShell/AppShell.js +9 -0
  282. package/dist/layout/AppShell/AppShell.types.d.ts +18 -0
  283. package/dist/layout/AppShell/AppShell.types.js +2 -0
  284. package/dist/layout/AppShell/index.d.ts +9 -0
  285. package/dist/layout/AppShell/index.js +2 -0
  286. package/dist/layout/PageHeader/PageHeader.d.ts +14 -0
  287. package/dist/layout/PageHeader/PageHeader.doc.d.ts +4 -0
  288. package/dist/layout/PageHeader/PageHeader.doc.js +30 -0
  289. package/dist/layout/PageHeader/PageHeader.js +10 -0
  290. package/dist/layout/PageHeader/PageHeader.types.d.ts +21 -0
  291. package/dist/layout/PageHeader/PageHeader.types.js +2 -0
  292. package/dist/layout/PageHeader/index.d.ts +9 -0
  293. package/dist/layout/PageHeader/index.js +2 -0
  294. package/dist/layout/SideNav/SideNav.d.ts +14 -0
  295. package/dist/layout/SideNav/SideNav.doc.d.ts +4 -0
  296. package/dist/layout/SideNav/SideNav.doc.js +32 -0
  297. package/dist/layout/SideNav/SideNav.js +9 -0
  298. package/dist/layout/SideNav/SideNav.types.d.ts +18 -0
  299. package/dist/layout/SideNav/SideNav.types.js +2 -0
  300. package/dist/layout/SideNav/index.d.ts +9 -0
  301. package/dist/layout/SideNav/index.js +2 -0
  302. package/dist/layout/TopBar/TopBar.d.ts +14 -0
  303. package/dist/layout/TopBar/TopBar.doc.d.ts +4 -0
  304. package/dist/layout/TopBar/TopBar.doc.js +28 -0
  305. package/dist/layout/TopBar/TopBar.js +9 -0
  306. package/dist/layout/TopBar/TopBar.types.d.ts +16 -0
  307. package/dist/layout/TopBar/TopBar.types.js +2 -0
  308. package/dist/layout/TopBar/index.d.ts +9 -0
  309. package/dist/layout/TopBar/index.js +2 -0
  310. package/dist/lib/component-doc.d.ts +34 -0
  311. package/dist/lib/component-doc.js +2 -0
  312. package/dist/lib/motionPresets.d.ts +37 -0
  313. package/dist/lib/motionPresets.js +35 -0
  314. package/dist/lib/resolveTokenPx.d.ts +11 -0
  315. package/dist/lib/resolveTokenPx.js +17 -0
  316. package/dist/lib/useDialogTransition.d.ts +21 -0
  317. package/dist/lib/useDialogTransition.js +86 -0
  318. package/dist/lib/useDisclosureTransition.d.ts +19 -0
  319. package/dist/lib/useDisclosureTransition.js +41 -0
  320. package/dist/lib/utils.d.ts +3 -0
  321. package/dist/lib/utils.js +6 -0
  322. package/dist/patterns/action-bar.md +127 -0
  323. package/dist/patterns/border-always.md +40 -0
  324. package/dist/patterns/data-analytics.md +15 -0
  325. package/dist/patterns/disabled-state.md +80 -0
  326. package/dist/patterns/empty-state.md +130 -0
  327. package/dist/patterns/expand-collapse-chevron.md +101 -0
  328. package/dist/patterns/form-field-group.md +139 -0
  329. package/dist/patterns/form-field-spacing.md +99 -0
  330. package/dist/patterns/group-spacing.md +54 -0
  331. package/dist/patterns/motion-effects.md +100 -0
  332. package/dist/patterns/same-row-sizing.md +52 -0
  333. package/dist/patterns/search-filter.md +118 -0
  334. package/dist/patterns/show-hide-parts.md +53 -0
  335. package/dist/patterns/stat-card.md +105 -0
  336. package/dist/patterns/status-row.md +130 -0
  337. package/dist/patterns/view-toggle.md +81 -0
  338. package/dist/prop-map.md +80 -0
  339. package/package.json +70 -3
  340. package/src/globals.css +3195 -0
@@ -0,0 +1,306 @@
1
+ {
2
+ "$schema": "../component.schema.json",
3
+ "name": "Icon",
4
+ "version": "1.0.0",
5
+ "status": "beta",
6
+
7
+ "purpose": "Communicates meaning, action, or status through a recognizable visual symbol. Always supplemental to text — never the sole conveyor of information without a tooltip or label.",
8
+ "import": "import { Icon, createIconAdapter, iconStrokeForSize } from '@helixds/react';",
9
+
10
+ "neverUseFor": [
11
+ "Decorative illustration — use an Illustration component instead",
12
+ "Brand logomarks — use Image or dedicated Logo component",
13
+ "Animated icons — Tabler outline icons are static; wrap in a motion component if animation is needed"
14
+ ],
15
+
16
+ "rationale": "Every Tabler icon renders through Icon so size, stroke, color and aria-hidden are decided once instead of at each call site, which is how components drifted before. Stroke is derived from size by the stroke rule (ADR-017), the icon set is swappable (ADR-014), and Icon is always supplemental to text — accessibility lives at the usage site.",
17
+
18
+ "governance": {
19
+ "mayExtendLocally": [
20
+ "Pick any Tabler icon component reference for a given usage",
21
+ "Choose a size from the documented scale and an icon-* color token"
22
+ ],
23
+ "mustEscalateToDS": [
24
+ "Passing stroke to change icon weight (edit ICON_STROKE_PX_BY_SIZE instead)",
25
+ "Rendering a raw <IconXxx> outside the Icon component",
26
+ "Adding new sizes, custom SVG sets or animated icons"
27
+ ]
28
+ },
29
+
30
+ "states": {
31
+ "intrinsic": [],
32
+ "authored": []
33
+ },
34
+
35
+ "iconStyle": {
36
+ "family": "Tabler Icons — outline variant",
37
+ "source": "@tabler/icons-react (default exports: IconPlus, IconArrowRight, etc.)",
38
+ "tablerOfficialStroke": {
39
+ "width": 2,
40
+ "note": "Tabler default. Goes on the root <svg> ONLY — never on <path> children. Configurable via CSS."
41
+ },
42
+ "helixStrokeRule": {
43
+ "adr": "docs/ADR/ADR-017-icon-stroke-rule.md",
44
+ "source": "packages/core/src/components/Icon/iconStroke.ts (ICON_STROKE_PX_BY_SIZE + iconStrokeForSize)",
45
+ "unit": "Line width as seen on screen, in CSS px. The SVG stroke attribute is converted from this in code (iconStrokeForSize) — never documented or edited by hand.",
46
+ "realPxBySize": { "12": 1.3, "14": 1.4, "16": 1.5, "18": 1.6, "20": 1.7, "24": 1.8, "28": 2.0, "32": 2.2, "36": 2.4, "40": 2.8 },
47
+ "rules": [
48
+ "Icon applies the rule automatically — never pass stroke at a call site to make an icon heavier or lighter.",
49
+ "To change icon weight system-wide, edit ICON_STROKE_PX_BY_SIZE (and this block + ADR-017), nothing else.",
50
+ "Real px must never decrease as size grows — each rung is at least as thick as the one below it.",
51
+ "Line weight grows faster as icons get larger: +0.1px per step up to 24px, +0.2px per 4px from 24 to 36, +0.4px from 36 to 40 — large icons need visibly heavier lines to hold their presence. Sizes between rungs interpolate real px linearly; outside 12–40 the edge rung's svg stroke is held.",
52
+ "A deliberate one-off override (e.g. Checkbox's stroke={3} checkmark) must be at least as thick as the rule at that size, and commented at the call site."
53
+ ]
54
+ },
55
+ "stroke": {
56
+ "linecap": "round",
57
+ "linejoin": "round",
58
+ "color": "currentColor — never hardcode hex"
59
+ },
60
+ "fill": "none",
61
+ "viewBox": "0 0 24 24",
62
+ "grid": 24
63
+ },
64
+
65
+ "customIconRules": {
66
+ "source": "Verified from tabler/tabler-icons /.build/validate-icons.mjs and /.build/optimize.mjs",
67
+ "mustFollow": [
68
+ "24×24 viewBox and grid — no exceptions",
69
+ "Only <path> elements inside SVG — no <circle>, <rect>, <ellipse>, <line>, <polygon>, <polyline>, <g>. Convert everything to path.",
70
+ "stroke-width goes on root <svg> only — never on child <path> elements",
71
+ "stroke-linecap=round, stroke-linejoin=round on root <svg>",
72
+ "fill=none on outline icons — stroke only, never filled areas",
73
+ "stroke=currentColor on root <svg> — never hardcode a color",
74
+ "No closing Z on outline icon paths (Tabler removes it via optimizer)",
75
+ "Optical weight must match Tabler icons at 24px with stroke-width=2",
76
+ "Minimum path detail: legible at 16×16px (smallest Helix usage size)",
77
+ "Naming in Figma: PascalCase, no prefix — 'HeartCustom' (matching Tabler's bare-name convention)",
78
+ "Naming in code: Icon prefix — 'IconHeartCustom'",
79
+ "Naming in filesystem: lowercase hyphenated — 'heart-custom.svg'",
80
+ "SVG file metadata comment: tags, category (one of the 41 official), version, unicode",
81
+ "Every outline icon may optionally have a matching filled variant in icons/filled/"
82
+ ],
83
+ "mustNot": [
84
+ "Use stroke-width on <path> elements — only on root <svg>",
85
+ "Use <circle>, <rect>, <ellipse>, <line>, <polygon>, <polyline>, or <g> — convert to path",
86
+ "Add fills or gradients to outline icons",
87
+ "Use sharp corners (linecap: butt, linejoin: miter) — always round",
88
+ "Hardcode stroke color — always currentColor",
89
+ "Include Z/z close-path on outline icon paths",
90
+ "Use text elements inside SVG",
91
+ "Include title or desc SVG elements — accessibility is the usage site's responsibility",
92
+ "Use more than 3 path elements — simpler is better; complex icons suggest wrong category"
93
+ ],
94
+ "officialCategories": [
95
+ "Animals","Arrows","Badges","Brand","Buildings","Charts","Communication","Computers",
96
+ "Currencies","Database","Design","Development","Devices","Document","E-commerce",
97
+ "Electrical","Extensions","Food","Games","Gender","Gestures","Health","Laundry",
98
+ "Letters","Logic","Map","Math","Media","Mood","Nature","Numbers","Photography",
99
+ "Shapes","Sport","Symbols","System","Text","Vehicles","Version control","Weather","Zodiac"
100
+ ],
101
+ "referenceIcons": [
102
+ "IconPlus — simplest form: 2 paths (vertical + horizontal line)",
103
+ "IconArrowRight — directional with clean angles",
104
+ "IconAlertCircle — 3 paths: circle arc + exclamation body + dot (h.01 trick with round linecap)",
105
+ "IconSearch — 2 paths: circle arc + handle line"
106
+ ]
107
+ },
108
+
109
+ "sizes": {
110
+ "system": "fixed values — never scale with CSS font-size",
111
+ "values": {
112
+ "12": "xs contexts — dense UI, inline badges",
113
+ "14": "compact controls — Chip",
114
+ "16": "default — button slots, form elements (Input, Select), inline text",
115
+ "18": "IconButton size=m",
116
+ "20": "medium emphasis — card headers, section labels",
117
+ "24": "large — native icon size, icon-only buttons, empty states",
118
+ "28": "between large and xlarge",
119
+ "32": "xlarge — feature icons, onboarding illustrations",
120
+ "36": "xxlarge — hero / empty-state feature icons",
121
+ "40": "xxxlarge — largest icon size, same use as 36"
122
+ },
123
+ "defaultInButton": 16,
124
+ "note": "Icon components always render at the size passed via the size prop. The Figma component is 24×24 (native grid); resize the instance at usage site."
125
+ },
126
+
127
+ "colorRules": {
128
+ "principle": "Icons use their own icon/* semantic tokens, set explicitly — never inherited from a text/* token, even when the resolved color happens to match",
129
+ "inButtons": {
130
+ "primary": "icon/inverse (white stroke)",
131
+ "secondary": "icon/neutral (dark stroke)",
132
+ "ghost": "icon/neutral (dark stroke)",
133
+ "danger": "icon/inverse (white stroke)"
134
+ },
135
+ "standalone": "Use icon/neutral or icon/neutral-light — never text/* tokens, never primitives",
136
+ "forbidden": "Never hardcode hex values. Never reference a text/* token for icon color. Never use primitive color scales directly."
137
+ },
138
+
139
+ "anatomy": [
140
+ {
141
+ "part": "icon-root",
142
+ "element": "svg",
143
+ "description": "SVG element with viewBox='0 0 24 24'. Never add a wrapper div."
144
+ },
145
+ {
146
+ "part": "icon-vector",
147
+ "element": "path (or g > path for compound icons)",
148
+ "description": "The drawn artwork. stroke=currentColor, fill=none, stroke-width derived from size by the ADR-017 stroke rule (see iconStyle.helixStrokeRule). Generated inside the Tabler icon component — not addressable as a data-helix-part from the Helix Icon wrapper; only icon-root carries the attribute."
149
+ }
150
+ ],
151
+
152
+ "props": [
153
+ {
154
+ "name": "icon",
155
+ "type": "HelixIconComponent",
156
+ "required": true,
157
+ "description": "The icon component to render, passed by reference (e.g. IconPlus), not by name string. Defaults to Tabler's outline set, but accepts any component matching the size/stroke/color/SVG-passthrough shape (see interop note below) — not a Tabler-only prop."
158
+ },
159
+ {
160
+ "name": "size",
161
+ "type": "12 | 14 | 16 | 18 | 20 | 24 | 28 | 32 | 36 | 40",
162
+ "default": 16,
163
+ "description": "Rendered icon size in pixels."
164
+ },
165
+ {
166
+ "name": "stroke",
167
+ "type": "number",
168
+ "default": "iconStrokeForSize(size)",
169
+ "description": "Stroke width applied to the icon path. Defaults to the ADR-017 stroke rule for the rendered size (see iconStyle.helixStrokeRule) — don't pass it to adjust weight; only for a deliberate, commented one-off."
170
+ },
171
+ {
172
+ "name": "color",
173
+ "type": "string | undefined",
174
+ "default": "currentColor",
175
+ "description": "Icon stroke color. Prefer inherited currentColor."
176
+ },
177
+ {
178
+ "name": "label",
179
+ "type": "string | undefined",
180
+ "description": "Accessible label for icon-only usage."
181
+ },
182
+ {
183
+ "name": "decorative",
184
+ "type": "boolean",
185
+ "default": true,
186
+ "description": "Marks the icon as decorative when a visible label already exists."
187
+ },
188
+ { "name": "className", "type": "string | undefined", "description": "Additional className for the root svg." }
189
+ ],
190
+
191
+ "figma": {
192
+ "page": "Icons",
193
+ "layout": "Flat grid — COMPONENT nodes directly on page, no row frames",
194
+ "cell": 40,
195
+ "componentSize": 24,
196
+ "naming": "Bare PascalCase — 'Plus', not 'IconPlus', not 'tabler/Plus'",
197
+ "vector": "Named 'vector', constraints: SCALE/SCALE",
198
+ "skill": ".ai/skills/icons-to-figma.md",
199
+ "codeOnly": "Icon is a code-only wrapper (owner's decision 2026-10-21, option A): in code it sets the size, derives the stroke weight from it (ADR-017) and handles color and aria; in Figma every component already places its icon instance at the right size and stroke per variant, so there is nothing for an Icon set to add. Designers use the icon components on the Icons page directly. A loose icon scaled by hand in Figma does not re-derive its stroke like code does — pick the size from the icon component, don't scale it.",
200
+ "propertyMap": {
201
+ "icon": {
202
+ "codeType": "HelixIconComponent",
203
+ "figma": [],
204
+ "approved": "2026-10-21",
205
+ "reason": "code-only wrapper: Figma swaps the icon on the consuming component (iconSwap), never on an Icon set"
206
+ },
207
+ "size": {
208
+ "codeType": "12 | 14 | 16 | 18 | 20 | 24 | 28 | 32 | 36 | 40",
209
+ "figma": [],
210
+ "approved": "2026-10-21",
211
+ "reason": "code-only wrapper: each component variant already draws its icon at the size and stroke ADR-017 gives that size"
212
+ }
213
+ },
214
+ "stories": {
215
+ "Default": {"figma": null, "reason": "Icon has no component set with properties — icons are the Icons page (icons-to-figma)", "approved": "2026-10-21"},
216
+ "IconOnly": {"figma": null, "reason": "Icon has no component set with properties — icons are the Icons page (icons-to-figma)", "approved": "2026-10-21"},
217
+ "Sizes": {"figma": null, "reason": "Icon has no component set with properties — icons are the Icons page (icons-to-figma)", "approved": "2026-10-21"},
218
+ "Colors": {"figma": null, "reason": "Icon has no component set with properties — icons are the Icons page (icons-to-figma)", "approved": "2026-10-21"},
219
+ "CustomIconSet": {"figma": null, "reason": "Icon has no component set with properties — icons are the Icons page (icons-to-figma)", "approved": "2026-10-21"},
220
+ "InlineWithText": {"figma": null, "reason": "Icon has no component set with properties — icons are the Icons page (icons-to-figma)", "approved": "2026-10-21"}
221
+ }
222
+ },
223
+
224
+ "interop": {
225
+ "note": "Icon is icon-set-agnostic by type (ADR-014) — Tabler is the documented default, not a hard requirement. Any component matching HelixIconComponent's shape (size/stroke/color + standard SVG props) can be passed directly to icon/iconEnd on any Helix component. Sets with a different prop dialect (e.g. Lucide's strokeWidth) can be wrapped with createIconAdapter from packages/core/src/components/Icon/createIconAdapter.ts before being passed."
226
+ },
227
+
228
+ "a11y": {
229
+ "role": "img (when meaningful) or presentation (when decorative)",
230
+ "aria": "aria-hidden='true' when accompanied by a visible label. aria-label='Description' when icon-only.",
231
+ "wcag": ["1.1.1 Non-text Content", "1.4.3 Contrast (AA)"],
232
+ "note": "The icon component itself renders aria-hidden. Accessibility is the responsibility of the usage site.",
233
+ "applied": {
234
+ "nativeElement": "svg",
235
+ "focus": [],
236
+ "aria": {
237
+ "icon-root": {
238
+ "aria-hidden": [
239
+ "true"
240
+ ],
241
+ "role": [
242
+ "img"
243
+ ],
244
+ "aria-label": [
245
+ "Delete"
246
+ ]
247
+ }
248
+ },
249
+ "announced": [
250
+ "img",
251
+ "img \"Delete\""
252
+ ],
253
+ "contrast": {
254
+ "icon-root (icon)": {
255
+ "light": "4.83:1 — #dc2626 on #ffffff",
256
+ "dark": "4.74:1 — #ef4444 on #0f172a"
257
+ }
258
+ },
259
+ "targetSize": {},
260
+ "motion": [
261
+ "CSS transitions/animations: neutralised by the global prefers-reduced-motion rule"
262
+ ]
263
+ },
264
+ "results": {
265
+ "score": 100,
266
+ "meetsMinimum": true,
267
+ "checks": {
268
+ "contract": "pass",
269
+ "keys": "n/a",
270
+ "focus-return": "n/a",
271
+ "keyboard": "n/a",
272
+ "axe": "pass",
273
+ "contrast": "pass",
274
+ "focus-visible": "pass",
275
+ "target-size": "pass",
276
+ "reflow": "n/a",
277
+ "screen-reader": "pass",
278
+ "ai-visual": "pass",
279
+ "human": "pending"
280
+ },
281
+ "notScored": [
282
+ "ai-visual",
283
+ "human"
284
+ ],
285
+ "changed": "2026-10-12"
286
+ }
287
+ },
288
+
289
+ "tokenPolicy": {
290
+ "allowed": ["color.icon"],
291
+ "forbidden": ["primitive.color", "color.fill", "color.border", "color.text"]
292
+ },
293
+
294
+ "agentWorkflow": {
295
+ "importFromTabler": ".ai/skills/icons-to-figma.md",
296
+ "createCustomIcon": [
297
+ "1. Study 2–3 reference icons from customIconRules.referenceIcons",
298
+ "2. Sketch paths on 24×24 grid, stroke-width=1.8 (the ADR-017 rule at 24px), rounded caps",
299
+ "3. Export SVG — extract the path d= attribute",
300
+ "4. Add to Icons.stories.tsx ICONS array",
301
+ "5. Create .mjs file in packages/core/node_modules/@tabler/icons-react/dist/esm/icons/ (if custom)",
302
+ "6. Run icons-to-figma skill Step 2–4 for the new icon",
303
+ "7. Verify: renders clearly at 16×16, stroke weight matches IconPlus at same size"
304
+ ]
305
+ }
306
+ }
@@ -0,0 +1,213 @@
1
+ {
2
+ "$schema": "../component.schema.json",
3
+ "name": "IconButton",
4
+ "version": "2.0.0",
5
+ "status": "stable",
6
+ "purpose": "Triggers an action via a single icon, with no visible text label — a toolbar action, a row action, a close/dismiss control.",
7
+ "import": "import { IconButton } from '@helixds/react';",
8
+ "neverUseFor": [
9
+ "Any action without an unambiguous, universally recognizable icon — use Button with a text label instead; a mystery-meat icon is worse than no shortcut at all",
10
+ "The primary CTA of a view — a labelled Button reads with more intent and is easier to scan for",
11
+ "A toggle/pressed state (e.g. bold/italic in a toolbar) — that needs aria-pressed and a distinct on/off visual, neither of which IconButton models; compose a dedicated toggle control instead"
12
+ ],
13
+
14
+ "rationale": "IconButton shares Button's exact height scale (ADR-004) by aliasing the same semantic.size rungs, so an icon-only action always lines up with a labelled Button beside it. Because there is no visible text, the accessible label is required by the type system (4.1.2), and it's limited to universally recognizable icons.",
15
+
16
+ "governance": {
17
+ "mayExtendLocally": [
18
+ "Choose the icon, label and variant per usage",
19
+ "Wrap it in a Tooltip that repeats the label"
20
+ ],
21
+ "mustEscalateToDS": [
22
+ "Making the label optional or new sizes outside s/m/l",
23
+ "Adding toggle/pressed state",
24
+ "Overriding padding, radius or color tokens"
25
+ ]
26
+ },
27
+ "states": {
28
+ "intrinsic": ["hover", "focus", "active", "disabled"],
29
+ "authored": ["loading"]
30
+ },
31
+ "anatomy": [
32
+ {
33
+ "part": "icon-button",
34
+ "element": "button",
35
+ "description": "Root — a real <button>, square (width = height, same token), fill/border/radius by variant. Never a <div> with a click handler."
36
+ }
37
+ ],
38
+ "props": [
39
+ {
40
+ "name": "icon",
41
+ "type": "TablerIcon",
42
+ "required": true,
43
+ "description": "The icon to render, passed by reference (e.g. IconTrash), not pre-instantiated.",
44
+ "usage": "icon={IconTrash}"
45
+ },
46
+ {
47
+ "name": "label",
48
+ "type": "string",
49
+ "required": true,
50
+ "description": "Accessible name — there is no visible text for this to describe, so it's required, not optional. Rendered as the button's aria-label.",
51
+ "usage": "label=\"Delete item\""
52
+ },
53
+ {
54
+ "name": "variant",
55
+ "type": "'primary' | 'secondary' | 'ghost' | 'danger'",
56
+ "default": "ghost",
57
+ "description": "Visual style — same 4-variant system as Button. Defaults to 'ghost' (not Button's 'primary'): an icon-only control is almost always a secondary/utility action (toolbar, row action, dismiss), rarely a view's main CTA."
58
+ },
59
+ {
60
+ "name": "size",
61
+ "type": "'s' | 'm' | 'l'",
62
+ "default": "m",
63
+ "description": "Physical size — same scale and same height tokens as Button (s=24px, m=32px, l=40px), width matches height (square)."
64
+ },
65
+ {
66
+ "name": "isLoading",
67
+ "type": "boolean",
68
+ "default": false,
69
+ "description": "When true, shows a spinner in place of the icon and disables interaction."
70
+ },
71
+ {
72
+ "name": "disabled",
73
+ "type": "boolean",
74
+ "default": false,
75
+ "description": "When true, the button is non-interactive."
76
+ },
77
+ {
78
+ "name": "onClick",
79
+ "type": "React.MouseEventHandler<HTMLButtonElement> | undefined",
80
+ "description": "Click/press handler."
81
+ },
82
+ {
83
+ "name": "className",
84
+ "type": "string | undefined",
85
+ "description": "Additional className for the root."
86
+ }
87
+ ],
88
+ "sizing": {
89
+ "height": {
90
+ "mode": "fixed",
91
+ "values": { "s": 24, "m": 32, "l": 40 },
92
+ "unit": "px",
93
+ "note": "Identical to Button's own height scale (ADR-004 Control scale) — component.iconButton.height aliases the same semantic.size.* rungs Button's component.button.height does, so the two components always stay the same physical height at a matching size."
94
+ },
95
+ "width": {
96
+ "default": "fixed",
97
+ "note": "Always equal to height (square) — aliases the SAME token as height, not an independent value. An icon-only control has no text to size around, so 'hug'/'fill' don't apply."
98
+ }
99
+ },
100
+ "tokenPolicy": {
101
+ "allowed": ["color.fill", "color.border", "color.icon", "radius"],
102
+ "forbidden": ["primitive.color", "color.text"]
103
+ },
104
+ "a11y": {
105
+ "role": "button (native)",
106
+ "keyboardNav": ["Enter/Space activates, same as any native <button>"],
107
+ "wcag": ["4.1.2 Name, Role, Value (label is required precisely to satisfy this — no visible text exists to fall back on)", "1.4.3 Contrast (AA)"],
108
+ "applied": {
109
+ "nativeElement": "button",
110
+ "focus": [
111
+ {
112
+ "part": "icon-button",
113
+ "when": ":focus-visible",
114
+ "outline": "2px solid var(--helix-iconButton-border-focus)",
115
+ "outline-offset": "2px",
116
+ "box-shadow": "0 0 0 4px color-mix(in srgb, var(--helix-iconButton-border-focus) 20%, transparent)"
117
+ }
118
+ ],
119
+ "aria": {
120
+ "icon-button": {
121
+ "aria-label": [
122
+ "primary default",
123
+ "primary loading",
124
+ "primary disabled",
125
+ "secondary default"
126
+ ],
127
+ "aria-busy": [
128
+ "true"
129
+ ]
130
+ }
131
+ },
132
+ "announced": [
133
+ "button \"primary default\"",
134
+ "button \"primary loading\" [disabled]",
135
+ "button \"primary disabled\" [disabled]",
136
+ "button \"secondary default\"",
137
+ "button \"secondary loading\" [disabled]"
138
+ ],
139
+ "contrast": {
140
+ "icon-button (icon primary m)": {
141
+ "light": "5.17:1 — #ffffff on #2563eb",
142
+ "dark": "5.17:1 — #ffffff on #2563eb"
143
+ },
144
+ "icon-button (icon secondary m)": {
145
+ "light": "16.3:1 — #0f172a on #f1f5f9",
146
+ "dark": "13.35:1 — #f1f5f9 on #1e293b"
147
+ },
148
+ "icon-button (icon ghost m)": {
149
+ "light": "17.85:1 — #0f172a on #ffffff",
150
+ "dark": "16.3:1 — #f1f5f9 on #0f172a"
151
+ },
152
+ "icon-button (icon danger m)": {
153
+ "light": "4.83:1 — #ffffff on #dc2626",
154
+ "dark": "4.83:1 — #ffffff on #dc2626"
155
+ },
156
+ "icon-button (icon ghost s)": {
157
+ "light": "17.85:1 — #0f172a on #ffffff",
158
+ "dark": "16.3:1 — #f1f5f9 on #0f172a"
159
+ },
160
+ "icon-button (icon ghost l)": {
161
+ "light": "17.85:1 — #0f172a on #ffffff",
162
+ "dark": "16.3:1 — #f1f5f9 on #0f172a"
163
+ }
164
+ },
165
+ "targetSize": {
166
+ "icon-button": "smallest 24×24 px"
167
+ },
168
+ "motion": [
169
+ "CSS transitions/animations: neutralised by the global prefers-reduced-motion rule",
170
+ "Motion (JS): press feedback only (whileTap)"
171
+ ]
172
+ },
173
+ "results": {
174
+ "score": 100,
175
+ "meetsMinimum": true,
176
+ "checks": {
177
+ "contract": "pass",
178
+ "keys": "pass",
179
+ "focus-return": "n/a",
180
+ "keyboard": "pass",
181
+ "axe": "pass",
182
+ "contrast": "pass",
183
+ "focus-visible": "pass",
184
+ "target-size": "pass",
185
+ "reflow": "n/a",
186
+ "screen-reader": "pass",
187
+ "ai-visual": "pass",
188
+ "human": "pending"
189
+ },
190
+ "notScored": [
191
+ "ai-visual",
192
+ "human"
193
+ ],
194
+ "changed": "2026-10-12"
195
+ }
196
+ },
197
+ "figma": {
198
+ "states": ["default", "hover", "press", "focus"],
199
+ "properties": [],
200
+ "variantCombinations": "64 variants (2026-10-21): variant × size × state = 48, disabled per variant × size = 12, isLoading once per variant at size m = 4. label is the aria-label: no Figma property.",
201
+ "stories": {
202
+ "Ghost": "variant=ghost",
203
+ "Secondary": "variant=secondary",
204
+ "Primary": "variant=primary",
205
+ "Danger": "variant=danger",
206
+ "Sizes": "layout",
207
+ "Loading": "isLoading=true",
208
+ "Disabled": "disabled=true",
209
+ "AllVariants": "layout",
210
+ "KeyboardActivation": {"figma": "state=focus", "reason": "keyboard focus — the focus ring is drawn in Figma (owner 2026-10-21: focus states are drawn)"}
211
+ }
212
+ }
213
+ }