@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,192 @@
1
+ {
2
+ "$schema": "../component.schema.json",
3
+ "name": "Modal",
4
+ "version": "0.1.0",
5
+ "status": "stable",
6
+
7
+ "purpose": "A centered overlay that interrupts the page for a focused task or decision — blocks interaction with the rest of the page until dismissed.",
8
+ "import": "import { Modal } from '@helixds/react';",
9
+
10
+ "neverUseFor": [
11
+ "Non-blocking supplementary info — use Tooltip or Popover instead",
12
+ "A persistent side task alongside the main content — use SidePanel instead",
13
+ "Simple confirmations that don't need to block the whole page — consider inline UI first"
14
+ ],
15
+
16
+ "rationale": "Modal relies on native HTML <dialog> and showModal() (ADR-010) to guarantee focus trapping, Escape key handling, and top-layer browser stacking without custom z-index hacks.",
17
+
18
+ "governance": {
19
+ "mayExtendLocally": [
20
+ "Custom body content composition with forms or step flows",
21
+ "Custom footer button alignment"
22
+ ],
23
+ "mustEscalateToDS": [
24
+ "Overriding focus-trap or backdrop z-index mechanics",
25
+ "Replacing native <dialog> with custom absolute divs"
26
+ ]
27
+ },
28
+
29
+ "states": {
30
+ "intrinsic": [],
31
+ "authored": [
32
+ { "name": "expanded", "description": "Whether the modal is open. See ADR-010 for the open/close choreography (native `<dialog>` + `showModal()`, JS-timed close).", "aria": "native <dialog> semantics; role=\"dialog\" is implicit" }
33
+ ]
34
+ },
35
+
36
+ "anatomy": [
37
+ { "part": "modal-root", "element": "dialog", "description": "Native <dialog>, opened via showModal() — provides the backdrop, focus trap, Escape-to-close, and top-layer stacking for free (ADR-010). Centered, min-height 400px." },
38
+ { "part": "modal-header", "element": "div", "description": "Contains the title." },
39
+ { "part": "modal-title", "element": "h2", "description": "The modal's accessible name — referenced via aria-labelledby." },
40
+ { "part": "modal-close", "element": "slot", "description": "An IconButton (IconX, size l) positioned top-right, calls onDismiss.", "optional": true },
41
+ { "part": "modal-body", "element": "div", "description": "The modal's content (children)." },
42
+ { "part": "modal-footer", "element": "div", "description": "Two-slot action row (space-between) — start/end below. Rendered only when at least one action label is given.", "optional": true },
43
+ { "part": "modal-footer-start", "element": "div", "description": "Bottom-left slot — the tertiary action, if any.", "optional": true },
44
+ { "part": "modal-footer-end", "element": "div", "description": "Bottom-right slot — secondary button (if any), then primary.", "optional": true }
45
+ ],
46
+
47
+ "props": [
48
+ { "name": "label", "type": "string", "required": true, "description": "The modal's title — rendered visibly and used as its accessible name." },
49
+ { "name": "children", "type": "React.ReactNode", "required": true, "description": "The modal's body content." },
50
+ { "name": "expanded", "type": "boolean", "required": true, "description": "Whether the modal is open. Modal is always controlled — there's no uncontrolled/defaultExpanded form, since something outside the modal always has to trigger it open." },
51
+ { "name": "onDismiss", "type": "() => void", "required": true, "description": "Called when the modal should close — the close (X) button, Escape, or a backdrop click. Modal does not close itself; the consumer sets `expanded` to false in response." },
52
+ { "name": "showCloseButton", "type": "boolean", "default": "true", "description": "Whether to render the header's close (X) button." },
53
+ { "name": "closeOnBackdropClick", "type": "boolean", "default": "true", "description": "Whether clicking the backdrop dismisses the modal." },
54
+ { "name": "primaryActionLabel", "type": "string | undefined", "description": "Footer primary action button label. Omit (with secondaryActionLabel) to render no footer." },
55
+ { "name": "onPrimaryAction", "type": "(() => void) | undefined", "description": "Primary action handler." },
56
+ { "name": "secondaryActionLabel", "type": "string | undefined", "description": "Footer secondary action button label, to the primary's left." },
57
+ { "name": "onSecondaryAction", "type": "(() => void) | undefined", "description": "Secondary action handler." },
58
+ { "name": "tertiaryActionLabel", "type": "string | undefined", "description": "A tertiary action button, pinned to the footer's bottom-left corner (Button's `ghost` variant), separate from the primary/secondary group." },
59
+ { "name": "onTertiaryAction", "type": "(() => void) | undefined", "description": "Tertiary action handler." },
60
+ { "name": "className", "type": "string | undefined", "description": "Additional className for the root." }
61
+ ],
62
+
63
+ "sizing": {
64
+ "width": { "default": "hug", "note": "Content-driven up to a reasonable reading width — no fixed rung, same category as Tooltip's max-width." },
65
+ "height": { "mode": "fixed", "values": { "default": 400 }, "unit": "px", "note": "min-height, not a fixed height — grows for longer content. Not on the shared size scale, same category of per-component literal as SidePanel's width." }
66
+ },
67
+
68
+ "tokenPolicy": {
69
+ "allowed": ["color.fill", "color.text", "spacing", "radius", "fontSize", "fontWeight", "shadow"],
70
+ "forbidden": ["primitive.color"]
71
+ },
72
+
73
+ "a11y": {
74
+ "role": "dialog (implicit via native <dialog>)",
75
+ "keyboardNav": ["Escape — dismisses (native <dialog> cancel event, redirected through onDismiss per ADR-010)", "Tab — cycles focus, trapped inside the modal (native)"],
76
+ "wcag": ["2.4.3 Focus Order", "4.1.2 Name, Role, Value", "1.4.13 Content on Hover or Focus"],
77
+ "notes": [
78
+ "showCloseButton=false with no footer action leaves the modal with no on-screen dismiss affordance — the component logs a dev-only console.warn in that case (Escape and closeOnBackdropClick, when enabled, still work)."
79
+ ],
80
+ "applied": {
81
+ "nativeElement": "dialog",
82
+ "innerComponents": [
83
+ "Button",
84
+ "IconButton"
85
+ ],
86
+ "focus": [
87
+ {
88
+ "part": "(its inner controls)",
89
+ "delegatedTo": [
90
+ "Button",
91
+ "IconButton"
92
+ ],
93
+ "note": "focus is drawn by Button, IconButton — see their a11y.applied.focus"
94
+ }
95
+ ],
96
+ "aria": {
97
+ "modal-root": {
98
+ "aria-labelledby": [
99
+ "(id)"
100
+ ]
101
+ }
102
+ },
103
+ "announced": [
104
+ "dialog \"Project settings\""
105
+ ],
106
+ "contrast": {
107
+ "modal-title": {
108
+ "light": "17.85:1 — #0f172a on #ffffff",
109
+ "dark": "16.29:1 — #f1f5f9 on #0f172a"
110
+ },
111
+ "modal-body": {
112
+ "light": "17.85:1 — #0f172a on #ffffff",
113
+ "dark": "16.29:1 — #f1f5f9 on #0f172a"
114
+ }
115
+ },
116
+ "targetSize": {},
117
+ "motion": [
118
+ "CSS transitions/animations: neutralised by the global prefers-reduced-motion rule"
119
+ ]
120
+ },
121
+ "results": {
122
+ "score": 100,
123
+ "meetsMinimum": true,
124
+ "checks": {
125
+ "contract": "pass",
126
+ "keys": "pass",
127
+ "focus-return": "pass",
128
+ "keyboard": "pass",
129
+ "axe": "pass",
130
+ "contrast": "pass",
131
+ "focus-visible": "pass",
132
+ "target-size": "pass",
133
+ "reflow": "n/a",
134
+ "screen-reader": "pass",
135
+ "ai-visual": "pass",
136
+ "human": "pending"
137
+ },
138
+ "notScored": [
139
+ "ai-visual",
140
+ "human"
141
+ ],
142
+ "changed": "2026-10-12"
143
+ }
144
+ },
145
+
146
+ "figma": {
147
+ "childProps": {"primaryActionLabel": [{"component": "Button", "property": "children", "note": "the primary button's text"}], "secondaryActionLabel": [{"component": "Button", "property": "children", "note": "the secondary button's text"}], "tertiaryActionLabel": [{"component": "Button", "property": "children", "note": "the tertiary button's text"}]},
148
+ "states": ["default"],
149
+ "properties": [
150
+ { "name": "label", "type": "TEXT", "codeProp": "label" },
151
+ { "name": "content", "type": "TEXT", "codeProp": "children" },
152
+ { "name": "showCloseButton", "type": "BOOLEAN", "codeProp": "showCloseButton" },
153
+ {
154
+ "name": "tertiaryAction",
155
+ "type": "BOOLEAN",
156
+ "codeProp": "tertiaryActionLabel",
157
+ "description": "Ghost Button on the footer's left (rendered when the label is set)."
158
+ },
159
+ { "name": "secondaryAction", "type": "BOOLEAN", "codeProp": "secondaryActionLabel" },
160
+ { "name": "primaryAction", "type": "BOOLEAN", "codeProp": "primaryActionLabel" }
161
+ ],
162
+ "structure": "The open dialog (no backdrop): 560px, min-height 400, radius/xl, shadow / xl, fill/page. The header's 72px right padding (closeInset × 2 + the 40px close button, a calc in code) is three nested tokens: 16 (spacing/m) + 40 (spacing/250) + 16 (spacing/m). Title Heading / xl / Bold (24px, raised from l on 2026-10-20 by the owner). Close = IconButton ghost l, absolute 16px from the top/right. Footer: Button m instances, 4px apart. Measured identical to code.",
163
+ "propertyMap": {
164
+ "primaryActionLabel": {
165
+ "codeType": "string | undefined",
166
+ "figma": [{"name": "primaryActionLabel", "type": "BOOLEAN"}],
167
+ "approved": "2026-10-21",
168
+ "reason": "the primary action is a nested Button instance: the BOOLEAN shows it and the exposed Button's own children property holds its text — a TEXT on the Modal can't reach a nested instance's text"
169
+ },
170
+ "secondaryActionLabel": {
171
+ "codeType": "string | undefined",
172
+ "figma": [{"name": "secondaryActionLabel", "type": "BOOLEAN"}],
173
+ "approved": "2026-10-21",
174
+ "reason": "the secondary action is a nested Button instance: the BOOLEAN shows it and the exposed Button's own children property holds its text — a TEXT on the Modal can't reach a nested instance's text"
175
+ },
176
+ "tertiaryActionLabel": {
177
+ "codeType": "string | undefined",
178
+ "figma": [{"name": "tertiaryActionLabel", "type": "BOOLEAN"}],
179
+ "approved": "2026-10-21",
180
+ "reason": "the tertiary action is a nested Button instance: the BOOLEAN shows it and the exposed Button's own children property holds its text — a TEXT on the Modal can't reach a nested instance's text"
181
+ }
182
+ },
183
+ "stories": {
184
+ "Default": "default",
185
+ "WithFooterActions": "primaryActionLabel=true, secondaryActionLabel=true",
186
+ "WithTertiaryAction": "primaryActionLabel=true, secondaryActionLabel=true, tertiaryActionLabel=true",
187
+ "WithoutCloseButton": "showCloseButton=false",
188
+ "KeyboardDismiss": {"figma": "layout", "reason": "keyboard focus is drawn on the close IconButton inside it (state=focus)"},
189
+ "Opened": {"figma": null, "reason": "play test that opens it — same look as Default", "approved": "2026-10-21"}
190
+ }
191
+ }
192
+ }
@@ -0,0 +1,244 @@
1
+ {
2
+ "$schema": "../component.schema.json",
3
+ "name": "MultiSelect",
4
+ "version": "0.1.0",
5
+ "status": "stable",
6
+
7
+ "purpose": "Lets users choose several values from a predefined list, shown as removable chips inside the field.",
8
+ "import": "import { MultiSelect } from '@helixds/react';",
9
+
10
+ "neverUseFor": [
11
+ "A single value - use Select instead",
12
+ "A handful of options that should all stay visible - use CheckboxGroup",
13
+ "Free-form tags the user types - use Input"
14
+ ],
15
+
16
+ "rationale": "MultiSelect is a select-only combobox on a <button> plus a Menu listbox with aria-multiselectable (ADR-013, ADR-019). Chosen values appear as removable Chip s, centered 4px inside a 32px minimum field that grows downward as chips wrap — the same height as Select so both sit on one scale.",
17
+
18
+ "governance": {
19
+ "mayExtendLocally": [
20
+ "Provide the options, label and helper text",
21
+ "Control the selected values from product logic"
22
+ ],
23
+ "mustEscalateToDS": [
24
+ "Adding free-text tag entry or search",
25
+ "Changing the chip size, field height or wrapping behavior",
26
+ "Replacing the combobox/listbox pattern"
27
+ ]
28
+ },
29
+
30
+ "states": {
31
+ "intrinsic": ["hover", "focus"],
32
+ "authored": [
33
+ { "name": "invalid", "description": "The selection fails validation.", "aria": "aria-invalid='true' on the combobox" },
34
+ { "name": "disabled", "description": "The field and its chips are non-interactive.", "aria": "disabled (native) on the combobox and every chip" },
35
+ { "name": "required", "description": "At least one value must be selected before form submission.", "aria": "aria-required='true' on the combobox; enforced by an invisible native input, same as Select" },
36
+ { "name": "open", "description": "The popup listbox is showing.", "aria": "aria-expanded='true'/'false' on the combobox" }
37
+ ]
38
+ },
39
+
40
+ "anatomy": [
41
+ { "part": "multi-select-root", "element": "div", "description": "Layout wrapper for label, field, and messages." },
42
+ { "part": "multi-select-label", "element": "label", "description": "Accessible label. Always rendered - visible or sr-only. 8px above the field (form-field-spacing pattern). Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md)." },
43
+ { "part": "multi-select-required", "element": "span", "optional": true, "description": "The required indicator (*) inside the label, the label color, 2px (spacing/3xs) after the text — shown by `required`. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md)." },
44
+ { "part": "multi-select-field", "element": "div", "description": "The visible field: Select's border, fill and 32px minimum height. Holds the chips and the combobox; grows downward when the chips wrap. Clicking its empty area toggles the menu." },
45
+ { "part": "multi-select-chip", "element": "slot", "description": "One dismissible Chip (size s, 24px) per selected value — 4px from the field's outer edge. Its × removes the value.", "optional": true },
46
+ { "part": "multi-select-trigger", "element": "button", "description": "role=\"combobox\" button filling the rest of the field. Owns real DOM focus (ADR-013/019); shows the placeholder when nothing is selected and announces the selection to assistive tech." },
47
+ { "part": "multi-select-chevron", "element": "slot", "description": "Trailing chevron. Flips on open, same treatment as Select." },
48
+ { "part": "multi-select-description", "element": "span", "description": "Helper text below the field. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md).", "optional": true },
49
+ { "part": "multi-select-error", "element": "span", "description": "Error text shown when invalid=true.", "optional": true }
50
+ ],
51
+
52
+ "props": [
53
+ { "name": "label", "type": "string", "required": true, "description": "Visible or screen-reader-only label. Required for a11y." },
54
+ { "name": "options", "type": "(MultiSelectOption | MultiSelectOptionGroup)[]", "required": true, "description": "List of options and grouped options." },
55
+ { "name": "value", "type": "string[] | undefined", "description": "Controlled selected values." },
56
+ { "name": "defaultValue", "type": "string[] | undefined", "description": "Uncontrolled initial values." },
57
+ { "name": "onChange", "type": "(values: string[]) => void | undefined", "description": "Fires with the full new array whenever a value is added or removed." },
58
+ { "name": "placeholder", "type": "string | undefined", "description": "Prompt shown while nothing is selected." },
59
+ { "name": "description", "type": "string | undefined", "description": "Helper text shown below the field." },
60
+ { "name": "errorMessage", "type": "string | undefined", "description": "Error text shown when invalid=true." },
61
+ { "name": "invalid", "type": "boolean", "default": false, "description": "Shows error styling and message." },
62
+ { "name": "disabled", "type": "boolean", "default": false, "description": "Non-interactive state." },
63
+ { "name": "required", "type": "boolean", "default": false, "description": "At least one value required; blocks native form submit while empty, like Select." },
64
+ { "name": "fullWidth", "type": "boolean", "default": false, "description": "Expands to container width." },
65
+ { "name": "hideLabel", "type": "boolean", "default": false, "description": "Hides the label visually but keeps it accessible." },
66
+ { "name": "id", "type": "string | undefined", "description": "Optional field id override (the combobox's id)." },
67
+ { "name": "name", "type": "string | undefined", "description": "Native form field name; the submitted value is the selected values joined by commas." },
68
+ { "name": "className", "type": "string | undefined", "description": "Additional className for the root." }
69
+ ],
70
+
71
+ "sizing": {
72
+ "height": {
73
+ "mode": "fixed",
74
+ "values": { "default": 32 },
75
+ "unit": "px",
76
+ "note": "32px minimum, same as Select (semantic.size.m). Chip s (24px) is centered in it, 4px from the outer edge on every side. Grows downward when chips wrap (rows 4px apart) — see ADR-019."
77
+ },
78
+ "width": {"default": "fixed", "value": 320, "unit": "px", "modes": {"fixed": "320px — every form field shares it and never grows or shrinks with its content (owner's rule 2026-10-21, form-field pattern); max-width 100% so a narrow container can still hold it.", "fill": "fullWidth=true: 100% of the container (Figma: drawn at 600px, the field and its popup on Fill so they stretch)."}, "exceptions": "A field that must be narrower (a number stepper, a short code) says so here, with its width and why — the only way off 320px."}
79
+ },
80
+
81
+ "tokenPolicy": {
82
+ "allowed": ["color.fill", "color.text", "color.border", "spacing", "radius", "fontSize"],
83
+ "forbidden": ["primitive.color"]
84
+ },
85
+
86
+ "a11y": {
87
+ "role": "combobox on a <button> inside the field (WAI-ARIA select-only combobox) + Menu listbox with aria-multiselectable=\"true\" — see ADR-013 and ADR-019. Chips' × buttons are the only other focus stops.",
88
+ "keyboardNav": [
89
+ "Arrow Up/Down - opens the menu, or moves the highlighted option while open",
90
+ "Home/End - jump to first/last enabled option while open",
91
+ "Enter/Space - open the menu, or toggle the highlighted option while open (the menu stays open)",
92
+ "Backspace - with the menu closed, removes the last selected value",
93
+ "Escape - close the menu",
94
+ "Tab - move focus (closes the menu first)"
95
+ ],
96
+ "wcag": ["1.3.1 Info and Relationships", "1.4.3 Contrast (AA)", "2.1.1 Keyboard", "2.4.7 Focus Visible", "4.1.2 Name Role Value"],
97
+ "applied": {
98
+ "nativeElement": "div",
99
+ "innerComponents": [
100
+ "Chip",
101
+ "Menu"
102
+ ],
103
+ "focus": [
104
+ {
105
+ "part": "multi-select-field",
106
+ "when": ":focus-visible",
107
+ "border-color": "var(--helix-select-border-hover)"
108
+ },
109
+ {
110
+ "part": "multi-select-field",
111
+ "when": ":focus-visible",
112
+ "box-shadow": "0 0 0 3px color-mix(in srgb, var(--helix-select-border-focus) 20%, transparent)",
113
+ "border-color": "var(--helix-select-border-focus)"
114
+ },
115
+ {
116
+ "part": "multi-select-field",
117
+ "when": ":focus-visible",
118
+ "border-color": "var(--helix-select-border-invalid)"
119
+ }
120
+ ],
121
+ "aria": {
122
+ "multi-select-trigger": {
123
+ "role": [
124
+ "combobox"
125
+ ],
126
+ "aria-haspopup": [
127
+ "listbox"
128
+ ],
129
+ "aria-expanded": [
130
+ "false"
131
+ ],
132
+ "aria-invalid": [
133
+ "true"
134
+ ],
135
+ "aria-describedby": [
136
+ "(id)"
137
+ ],
138
+ "aria-required": [
139
+ "true"
140
+ ]
141
+ },
142
+ "multi-select-chevron": {
143
+ "aria-hidden": [
144
+ "true"
145
+ ]
146
+ },
147
+ "multi-select-error": {
148
+ "role": [
149
+ "alert"
150
+ ]
151
+ },
152
+ "multi-select-required": {
153
+ "aria-hidden": [
154
+ "true"
155
+ ]
156
+ }
157
+ },
158
+ "announced": [
159
+ "combobox \"Skills\": Choose skills…",
160
+ "combobox \"Skills\" [disabled]: \"1 selected: Design\"",
161
+ "combobox \"Skills\" [invalid]: Choose skills…",
162
+ "combobox \"Specialties\": Choose specialties…",
163
+ "combobox \"Skills\": \"2 selected: Design, Frontend\""
164
+ ],
165
+ "contrast": {
166
+ "multi-select-label": {
167
+ "light": "17.85:1 — #0f172a on #ffffff",
168
+ "dark": "16.29:1 — #f1f5f9 on #0f172a"
169
+ },
170
+ "multi-select-error": {
171
+ "light": "6.47:1 — #b91c1c on #ffffff",
172
+ "dark": "12.65:1 — #fecdd3 on #0f172a"
173
+ },
174
+ "multi-select-description": {
175
+ "light": "7.57:1 — #475569 on #ffffff",
176
+ "dark": "6.96:1 — #94a3b8 on #0f172a"
177
+ }
178
+ },
179
+ "targetSize": {
180
+ "multi-select-trigger": "smallest 68×24 px"
181
+ },
182
+ "motion": [
183
+ "CSS transitions/animations: neutralised by the global prefers-reduced-motion rule"
184
+ ]
185
+ },
186
+ "results": {
187
+ "score": 100,
188
+ "meetsMinimum": true,
189
+ "checks": {
190
+ "contract": "pass",
191
+ "keys": "pass",
192
+ "focus-return": "pass",
193
+ "keyboard": "pass",
194
+ "axe": "pass",
195
+ "contrast": "pass",
196
+ "focus-visible": "pass",
197
+ "target-size": "pass",
198
+ "reflow": "n/a",
199
+ "screen-reader": "pass",
200
+ "ai-visual": "pass",
201
+ "human": "pending"
202
+ },
203
+ "notScored": [
204
+ "ai-visual",
205
+ "human"
206
+ ],
207
+ "changed": "2026-10-12"
208
+ }
209
+ },
210
+
211
+ "figma": {
212
+ "states": ["default", "hover", "focus", "open"],
213
+ "properties": [
214
+ {
215
+ "name": "state",
216
+ "type": "VARIANT",
217
+ "values": ["default", "hover", "focus", "open"],
218
+ "figmaOnly": true,
219
+ "description": "Figma-only axis: hover/focus are CSS pseudo-classes, open is the listbox showing. invalid, disabled and the secondary toggles are their own variants (contracts/figma-conversion.json, pattern form-field)."
220
+ }
221
+ ],
222
+ "structure": "multi-select-root (8px gap) > multi-select-label (text + multi-select-required), multi-select-field (hugs its content like code — 151px empty, chips side by side; fullWidth drawn at 320px and wraps): chosen options as Chip instances or multi-select-trigger > multi-select-placeholder, multi-select-chevron; multi-select-description, multi-select-error. state=open holds the listbox as a nested Menu instance named menu (multiple=true, options=5, exposed so its options 2–7 are picked from the MultiSelect's panel): absolute, 4px below multi-select-field at its width, 150px minimum, like Menu.tsx; its MenuItems read Design, Research, Frontend, Backend, Writing (Storybook Default), none selected (owner's decision 2026-10-21). One size (m).",
223
+ "propertyMap": {
224
+ "value": {
225
+ "codeType": "string[] | undefined",
226
+ "figma": [{"name": "value", "type": "VARIANT", "values": ["empty", "selected"]}],
227
+ "approved": "2026-10-20",
228
+ "reason": "empty shows the placeholder, selected shows chips — the field's two looks (owner-approved exception)"
229
+ }
230
+ },
231
+ "variantCombinations": "72 variants (2026-10-21): value empty/selected × (invalid × state default/hover/focus/open = 8, plus disabled = 1) = 18, each drawn with fullWidth (320px, chips wrap) × hideLabel false/true = 72 (variants.secondary, owner's decision 2026-10-21). The option count is the nested Menu's options property, not a MultiSelect variant. Invalid focus/open shows the focus border like code (MultiSelect yields the invalid border to focus/open).",
232
+ "stories": {
233
+ "Default": "value=empty",
234
+ "WithSelection": "value=selected",
235
+ "Wrapping": "value=selected",
236
+ "WithGroups": "state=open",
237
+ "WithDescription": "description.=true",
238
+ "Invalid": "invalid=true, errorMessage.=true",
239
+ "Required": "required=true",
240
+ "Disabled": "disabled=true, value=selected",
241
+ "KeyboardNavigation": {"figma": "state=focus", "reason": "keyboard focus — the focus ring is drawn in Figma (owner 2026-10-21: focus states are drawn)"}
242
+ }
243
+ }
244
+ }
@@ -0,0 +1,148 @@
1
+ {
2
+ "$schema": "../component.schema.json",
3
+ "name": "NavItem",
4
+ "version": "1.0.0",
5
+ "status": "stable",
6
+
7
+ "purpose": "A single entry in a persistent navigation list (a SideNav, a tab rail) that links to another view.",
8
+ "import": "import { NavItem } from '@helixds/react';",
9
+
10
+ "neverUseFor": [
11
+ "Triggering an action (saving, deleting, opening a dialog) — use Button, which Button.json's own neverUseFor list already forbids for navigation",
12
+ "External links that leave the app — still usable, but set target/rel explicitly at the usage site",
13
+ "A single standalone link inside body text — use a plain <a>, styled separately"
14
+ ],
15
+
16
+ "rationale": "NavItem is a native <a href> so links behave like links — middle-click, open in new tab, correct link role — instead of a button that navigates. It's the only allowed entry inside SideNav, and its active-state motion follows the shared motion engine (ADR-007). The current item is a light blue tint (fill.primary-interactive-light-hover) with blue text (text.link-hover, 5.49:1) and icon (icon.primary), marked by a 4px primary-blue bar at its left edge; the tint and the bar are one indicator, so both slide together to the next current item. Dark mode follows the semantic tokens: navy tint, light-blue text (4.84:1). Approved 2026-10-12 over the earlier solid blue pill.",
17
+
18
+ "governance": {
19
+ "mayExtendLocally": [
20
+ "Choose the label, icon, href and active state",
21
+ "Set target/rel explicitly for external links"
22
+ ],
23
+ "mustEscalateToDS": [
24
+ "Using NavItem to trigger actions instead of navigating",
25
+ "Adding new visual variants or nested/expandable items",
26
+ "Changing the active-state indicator or its motion"
27
+ ]
28
+ },
29
+
30
+ "states": {
31
+ "intrinsic": ["hover", "focus"],
32
+ "authored": [
33
+ { "name": "current", "description": "This item represents the current view.", "aria": "aria-current='page'" }
34
+ ]
35
+ },
36
+
37
+ "anatomy": [
38
+ { "part": "nav-item", "element": "a", "description": "Root — always a native <a href>, never a <button>." },
39
+ { "part": "nav-item-indicator", "element": "span", "description": "The current-item background, absolutely positioned behind icon/label. Its left corners are square (radius-none) where the bar sits, the right ones keep navItem.radius — every other state keeps all four corners (owner's decision 2026-10-21). Shares a Motion layoutId across every NavItem instance (ADR-007) so it slides to the newly-current item instead of the background cutting over.", "optional": true },
40
+ { "part": "nav-item-icon", "element": "slot", "description": "Leading icon, rendered via Icon.", "optional": true },
41
+ { "part": "nav-item-label", "element": "span", "description": "Visible label text." }
42
+ ],
43
+
44
+ "props": [
45
+ { "name": "label", "type": "string", "required": true, "description": "Visible label text." },
46
+ { "name": "href", "type": "string", "required": true, "description": "Navigation target." },
47
+ { "name": "icon", "type": "TablerIcon | undefined", "description": "Leading icon, passed by reference. Rendered at a fixed 16px." },
48
+ { "name": "current", "type": "boolean", "default": false, "description": "Marks this item as representing the current view." },
49
+ { "name": "className", "type": "string | undefined", "description": "Additional className for the root." }
50
+ ],
51
+
52
+ "tokenPolicy": {
53
+ "allowed": ["color.fill", "color.text", "color.icon", "radius", "spacing", "fontSize", "fontWeight"],
54
+ "forbidden": ["primitive.color"]
55
+ },
56
+
57
+ "a11y": {
58
+ "role": "link (implicit from <a href>)",
59
+ "keyboardNav": ["Tab — moves focus", "Enter — activates"],
60
+ "wcag": ["2.1.1 Keyboard", "2.4.7 Focus Visible", "4.1.2 Name Role Value"],
61
+ "applied": {
62
+ "nativeElement": "a",
63
+ "focus": [
64
+ {
65
+ "part": "(any focusable element)",
66
+ "when": ":focus-visible",
67
+ "inherited": "global rule",
68
+ "outline": "2px solid var(--helix-color-border-focus)",
69
+ "outline-offset": "2px"
70
+ }
71
+ ],
72
+ "aria": {
73
+ "nav-item": {
74
+ "aria-current": [
75
+ "page"
76
+ ]
77
+ },
78
+ "nav-item-indicator": {
79
+ "aria-hidden": [
80
+ "true"
81
+ ]
82
+ }
83
+ },
84
+ "announced": [
85
+ "link \"Dashboard\"",
86
+ "link \"Team\"",
87
+ "link \"Settings\""
88
+ ],
89
+ "contrast": {
90
+ "nav-item-label": {
91
+ "light": "5.49:1 — #1d4ed8 on #dbeafe",
92
+ "dark": "4.83:1 — #93c5fd on #1e40af"
93
+ },
94
+ "nav-item-icon (icon)": {
95
+ "light": "4.24:1 — #2563eb on #dbeafe",
96
+ "dark": "4.84:1 — #93c5fd on #1e40af"
97
+ }
98
+ },
99
+ "targetSize": {
100
+ "nav-item": "smallest 200×34 px"
101
+ },
102
+ "motion": [
103
+ "CSS transitions/animations: neutralised by the global prefers-reduced-motion rule",
104
+ "Motion (JS): inside <MotionConfig reducedMotion=\"user\">"
105
+ ]
106
+ },
107
+ "results": {
108
+ "score": 100,
109
+ "meetsMinimum": true,
110
+ "checks": {
111
+ "contract": "pass",
112
+ "keys": "pass",
113
+ "focus-return": "n/a",
114
+ "keyboard": "pass",
115
+ "axe": "pass",
116
+ "contrast": "pass",
117
+ "focus-visible": "pass",
118
+ "target-size": "pass",
119
+ "reflow": "n/a",
120
+ "screen-reader": "pass",
121
+ "ai-visual": "pass",
122
+ "human": "pending"
123
+ },
124
+ "notScored": [
125
+ "ai-visual",
126
+ "human"
127
+ ],
128
+ "changed": "2026-10-12"
129
+ }
130
+ },
131
+
132
+ "figma": {
133
+ "states": ["default", "hover", "focus"],
134
+ "properties": [
135
+ { "name": "current", "type": "VARIANT", "values": ["false", "true"], "codeProp": "current", "description": "In code the current fill is the sliding nav-item-indicator (motion.span); Figma puts it on the root." },
136
+ { "name": "state", "type": "VARIANT", "values": ["default", "hover", "focus"], "figmaOnly": true, "description": "Figma-only axis. hover/focus are CSS pseudo-classes in code (hover only changes a non-current item)." },
137
+ { "name": "label", "type": "TEXT", "codeProp": "label" },
138
+ { "name": "icon.", "type": "BOOLEAN", "codeProp": "icon", "description": "Show/hide part: the leading icon. The 8px gap only exists between two shown children (flex gap / auto-layout), so hiding it leaves the paddings untouched." },
139
+ { "name": "icon", "type": "INSTANCE_SWAP", "codeProp": "icon" }
140
+ ],
141
+ "stories": {
142
+ "Default": "current=false",
143
+ "Current": "current=true",
144
+ "NavList": "layout",
145
+ "KeyboardActivation": {"figma": "state=focus", "reason": "keyboard focus — the focus ring is drawn in Figma (owner 2026-10-21: focus states are drawn)"}
146
+ }
147
+ }
148
+ }