@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,353 @@
1
+ {
2
+ "$schema": "../component.schema.json",
3
+ "name": "Textarea",
4
+ "version": "1.0.0",
5
+ "status": "stable",
6
+ "purpose": "Lets users enter multi-line free-form text.",
7
+ "import": "import { Textarea } from '@helixds/react';",
8
+ "neverUseFor": [
9
+ "Single-line text - use Input instead",
10
+ "Option selection - use Select, RadioGroup, or CheckboxGroup",
11
+ "File uploads - use FileInput"
12
+ ],
13
+
14
+ "rationale": "Textarea wraps a native <textarea> with a 32px min-height floor (semantic.size.m) instead of a height ladder, because its height is driven by rows. It has one size — the field scale's m (owner's decision 2026-10-20: s and l removed, like Select and MultiSelect, which never had them).",
15
+
16
+ "governance": {
17
+ "mayExtendLocally": [
18
+ "Choose rows, label, placeholder and helper text",
19
+ "Add validation and character counts through the documented props"
20
+ ],
21
+ "mustEscalateToDS": [
22
+ "Adding a fixed height ladder or new sizes",
23
+ "Adding rich-text formatting",
24
+ "Changing border, focus-ring or error tokens"
25
+ ]
26
+ },
27
+ "states": {
28
+ "intrinsic": [
29
+ "hover",
30
+ "focus",
31
+ "active"
32
+ ],
33
+ "authored": [
34
+ {
35
+ "name": "invalid",
36
+ "description": "The field value fails validation.",
37
+ "aria": "aria-invalid='true'"
38
+ },
39
+ {
40
+ "name": "disabled",
41
+ "description": "The field is non-interactive.",
42
+ "aria": "disabled (native)"
43
+ },
44
+ {
45
+ "name": "required",
46
+ "description": "The field must have a value before form submission.",
47
+ "aria": "aria-required='true'"
48
+ }
49
+ ]
50
+ },
51
+ "anatomy": [
52
+ {
53
+ "part": "textarea-root",
54
+ "element": "div",
55
+ "description": "Layout wrapper for label, field, and messages."
56
+ },
57
+ {
58
+ "part": "textarea-label",
59
+ "element": "label",
60
+ "description": "Accessible label. Always rendered - visible or sr-only. Sits exactly 8px above the field — see .ai/maps/patterns/form-field-spacing.md. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md)."
61
+ },
62
+ {
63
+ "part": "textarea-required",
64
+ "element": "span",
65
+ "optional": true,
66
+ "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)."
67
+ },
68
+ {
69
+ "part": "textarea-wrapper",
70
+ "element": "div",
71
+ "description": "Field shell around the native textarea."
72
+ },
73
+ {
74
+ "part": "textarea-field",
75
+ "element": "textarea",
76
+ "description": "The native textarea element."
77
+ },
78
+ {
79
+ "part": "textarea-counter",
80
+ "element": "span",
81
+ "description": "Live character counter.",
82
+ "optional": true
83
+ },
84
+ {
85
+ "part": "textarea-description",
86
+ "element": "span",
87
+ "description": "Helper text below the field. Sits exactly 8px below it — see .ai/maps/patterns/form-field-spacing.md. Disabled: dims to text.disabled with the rest of the text (.ai/maps/patterns/disabled-state.md).",
88
+ "optional": true
89
+ },
90
+ {
91
+ "part": "textarea-error",
92
+ "element": "span",
93
+ "description": "Error text shown when invalid=true.",
94
+ "optional": true
95
+ }
96
+ ],
97
+ "props": [
98
+ {
99
+ "name": "label",
100
+ "type": "string",
101
+ "required": true,
102
+ "description": "Visible or screen-reader-only label. Required for a11y."
103
+ },
104
+ {
105
+ "name": "description",
106
+ "type": "string | undefined",
107
+ "description": "Helper text shown below the field."
108
+ },
109
+ {
110
+ "name": "errorMessage",
111
+ "type": "string | undefined",
112
+ "description": "Error text shown when invalid=true."
113
+ },
114
+ {
115
+ "name": "invalid",
116
+ "type": "boolean",
117
+ "default": false,
118
+ "description": "Shows error styling and message."
119
+ },
120
+ {
121
+ "name": "disabled",
122
+ "type": "boolean",
123
+ "default": false,
124
+ "description": "Non-interactive state."
125
+ },
126
+ {
127
+ "name": "required",
128
+ "type": "boolean",
129
+ "default": false,
130
+ "description": "Marks field as required."
131
+ },
132
+ {
133
+ "name": "fullWidth",
134
+ "type": "boolean",
135
+ "default": false,
136
+ "description": "Expands to container width."
137
+ },
138
+ {
139
+ "name": "hideLabel",
140
+ "type": "boolean",
141
+ "default": false,
142
+ "description": "Hides the label visually but keeps it accessible."
143
+ },
144
+ {
145
+ "name": "rows",
146
+ "type": "number | undefined",
147
+ "description": "Controls the visible row count."
148
+ },
149
+ {
150
+ "name": "maxLength",
151
+ "type": "number | undefined",
152
+ "description": "Maximum number of characters allowed."
153
+ },
154
+ {
155
+ "name": "resize",
156
+ "type": "'none' | 'vertical' | 'horizontal' | 'both'",
157
+ "default": "vertical",
158
+ "description": "Native resize behavior."
159
+ },
160
+ {
161
+ "name": "showCount",
162
+ "type": "boolean",
163
+ "default": false,
164
+ "description": "Shows a live character counter when maxLength is set."
165
+ },
166
+ {
167
+ "name": "onChange",
168
+ "type": "React.ChangeEventHandler<HTMLTextAreaElement> | undefined",
169
+ "description": "Value change handler. Also drives the live character counter."
170
+ }
171
+ ],
172
+ "sizing": {
173
+ "height": {
174
+ "mode": "rows-driven",
175
+ "values": {
176
+ "min": 32
177
+ },
178
+ "unit": "px",
179
+ "note": "component.textarea.height aliases semantic.size.m (32px) and is applied as min-height on textarea-field — a floor, not a per-size ladder like Input/Select. `size` itself only changes font-size (s: --helix-primitive-fontSize-s, m: base/default, l: --helix-primitive-fontSize-m); the visible height above the floor is controlled by the native `rows` attribute and `resize`."
180
+ },
181
+ "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."}
182
+ },
183
+ "tokenPolicy": {
184
+ "allowed": [
185
+ "color.fill",
186
+ "color.text",
187
+ "color.border",
188
+ "spacing",
189
+ "radius",
190
+ "fontSize"
191
+ ],
192
+ "forbidden": [
193
+ "primitive.color"
194
+ ]
195
+ },
196
+ "a11y": {
197
+ "role": "textbox (implicit)",
198
+ "keyboardNav": [
199
+ "Tab - focuses field",
200
+ "Escape - blurs field"
201
+ ],
202
+ "wcag": [
203
+ "1.3.1 Info and Relationships",
204
+ "1.4.3 Contrast (AA)",
205
+ "2.4.7 Focus Visible",
206
+ "3.3.1 Error Identification",
207
+ "3.3.2 Labels or Instructions"
208
+ ],
209
+ "applied": {
210
+ "nativeElement": "div",
211
+ "focus": [
212
+ {
213
+ "part": "textarea-wrapper",
214
+ "when": ":focus-within",
215
+ "border-color": "var(--helix-textarea-border-hover)"
216
+ },
217
+ {
218
+ "part": "textarea-wrapper",
219
+ "when": ":focus-within",
220
+ "box-shadow": "0 0 0 3px color-mix(in srgb, var(--helix-textarea-border-focus) 20%, transparent)",
221
+ "border-color": "var(--helix-textarea-border-focus)"
222
+ },
223
+ {
224
+ "part": "textarea-wrapper",
225
+ "when": ":focus-within",
226
+ "box-shadow": "0 0 0 3px color-mix(in srgb, var(--helix-textarea-border-invalid) 20%, transparent)"
227
+ }
228
+ ],
229
+ "aria": {
230
+ "textarea-field": {
231
+ "aria-invalid": [
232
+ "true"
233
+ ],
234
+ "aria-describedby": [
235
+ "(id)"
236
+ ]
237
+ },
238
+ "textarea-error": {
239
+ "role": [
240
+ "alert"
241
+ ]
242
+ },
243
+ "textarea-counter": {
244
+ "aria-live": [
245
+ "polite"
246
+ ]
247
+ }
248
+ },
249
+ "announced": [
250
+ "textbox \"Description\"",
251
+ "textbox \"Description\" [disabled]",
252
+ "textbox \"Description\" [invalid]",
253
+ "textbox \"Small\"",
254
+ "textbox \"Medium\""
255
+ ],
256
+ "contrast": {
257
+ "textarea-label (m)": {
258
+ "light": "17.85:1 — #0f172a on #ffffff",
259
+ "dark": "16.29:1 — #f1f5f9 on #0f172a"
260
+ },
261
+ "textarea-field (m)": {
262
+ "light": "17.85:1 — #0f172a on #ffffff",
263
+ "dark": "16.29:1 — #f1f5f9 on #0f172a"
264
+ },
265
+ "textarea-error (m)": {
266
+ "light": "6.47:1 — #b91c1c on #ffffff",
267
+ "dark": "12.65:1 — #fecdd3 on #0f172a"
268
+ },
269
+ "textarea-label (s)": {
270
+ "light": "17.85:1 — #0f172a on #ffffff",
271
+ "dark": "16.29:1 — #f1f5f9 on #0f172a"
272
+ },
273
+ "textarea-field (s)": {
274
+ "light": "17.85:1 — #0f172a on #ffffff",
275
+ "dark": "16.29:1 — #f1f5f9 on #0f172a"
276
+ },
277
+ "textarea-label (l)": {
278
+ "light": "17.85:1 — #0f172a on #ffffff",
279
+ "dark": "16.29:1 — #f1f5f9 on #0f172a"
280
+ },
281
+ "textarea-field (l)": {
282
+ "light": "17.85:1 — #0f172a on #ffffff",
283
+ "dark": "16.29:1 — #f1f5f9 on #0f172a"
284
+ },
285
+ "textarea-counter (m)": {
286
+ "light": "4.75:1 — #64748b on #ffffff",
287
+ "dark": "6.96:1 — #94a3b8 on #0f172a"
288
+ },
289
+ "textarea-description (m)": {
290
+ "light": "7.57:1 — #475569 on #ffffff",
291
+ "dark": "6.96:1 — #94a3b8 on #0f172a"
292
+ }
293
+ },
294
+ "targetSize": {
295
+ "textarea-field": "smallest 179×96 px"
296
+ },
297
+ "motion": [
298
+ "CSS transitions/animations: neutralised by the global prefers-reduced-motion rule"
299
+ ]
300
+ },
301
+ "results": {
302
+ "score": 100,
303
+ "meetsMinimum": true,
304
+ "checks": {
305
+ "contract": "pass",
306
+ "keys": "pass",
307
+ "focus-return": "n/a",
308
+ "keyboard": "pass",
309
+ "axe": "pass",
310
+ "contrast": "pass",
311
+ "focus-visible": "pass",
312
+ "target-size": "pass",
313
+ "reflow": "n/a",
314
+ "screen-reader": "pass",
315
+ "ai-visual": "pass",
316
+ "human": "pending"
317
+ },
318
+ "notScored": [
319
+ "ai-visual",
320
+ "human"
321
+ ],
322
+ "changed": "2026-10-12"
323
+ }
324
+ },
325
+ "figma": {
326
+ "states": ["default", "hover", "focus"],
327
+ "properties": [
328
+ {
329
+ "name": "state",
330
+ "type": "VARIANT",
331
+ "values": ["default", "hover", "focus"],
332
+ "figmaOnly": true,
333
+ "description": "Figma-only axis: hover/focus are CSS pseudo-classes in code. invalid, disabled and the secondary toggles are their own variants (contracts/figma-conversion.json, pattern form-field)."
334
+ }
335
+ ],
336
+ "propertyMap": {
337
+ "value": {"codeType": "string (native <textarea> value)", "figma": [{"name": "value.", "type": "VARIANT", "values": ["empty", "filled"]}, {"name": "value", "type": "TEXT"}], "approved": "2026-10-21", "reason": "like Select: value is the typed text (color text/neutral), value. picks empty (the placeholder shows) or filled — filled drawn in every state the empty field has (hover, focus, invalid, disabled — text/disabled there) (owner's rule 2026-10-21: one set of rules for every form field)"},
338
+ "placeholder": {"codeType": "string (native <textarea> placeholder)", "figma": [{"name": "placeholder", "type": "TEXT"}], "approved": "2026-10-21", "reason": "the grey hint an empty field shows (text/neutral/lightest) — it was wrongly named value in Figma before"}
339
+ },
340
+ "structure": "textarea-root (8px gap) > textarea-label (text + textarea-required), textarea-wrapper as wide as code default 20 native columns (194px; fullWidth drawn at 480px, filling its container), textarea-field 4 rows tall = code default rows, textarea-counter and the native resize handle anchored bottom-right, textarea-description, textarea-error. One size (m). The native resize handle is drawn by the browser (no data-helix-part); its layer is named native resize handle and hides with resize=none.",
341
+ "variantCombinations": "112 variants (2026-10-21, one size since the owner removed s and l): invalid × state default/hover/focus = 6, plus disabled at state default = 1, each drawn with fullWidth false/true × hideLabel false/true × resize vertical/none/horizontal/both = 7 × 16 = 112 (secondary toggles at every state, owner's decision 2026-10-21). Invalid focus keeps the red border with a 20% red ring.",
342
+ "stories": {
343
+ "Default": "default",
344
+ "WithDescription": "description.=true",
345
+ "WithCharacterCount": "showCount=true",
346
+ "Invalid": "invalid=true, errorMessage.=true",
347
+ "Disabled": "disabled=true",
348
+ "NoResize": "resize=none",
349
+ "FullWidth": "fullWidth=true",
350
+ "KeyboardFocus": {"figma": "state=focus", "reason": "keyboard focus — the focus ring is drawn in Figma (owner 2026-10-21: focus states are drawn)"}
351
+ }
352
+ }
353
+ }
@@ -0,0 +1,186 @@
1
+ {
2
+ "$schema": "../component.schema.json",
3
+ "name": "Toast",
4
+ "version": "0.2.0",
5
+ "status": "stable",
6
+
7
+ "purpose": "A Sonner-style stacking notification, fixed to the top-right corner, triggered imperatively (toast.success('Saved')) from anywhere — not tied to a piece of UI state the consumer renders conditionally, unlike Modal/SidePanel.",
8
+ "import": "import { Toast, toast } from '@helixds/react';",
9
+
10
+ "neverUseFor": [
11
+ "A message the user must act on before continuing — use Modal instead, Toast can be missed or auto-dismiss",
12
+ "Form field validation errors — show them inline next to the field, not as a Toast",
13
+ "Anything the user needs to refer back to later — Toast auto-dismisses and doesn't persist"
14
+ ],
15
+
16
+ "rationale": "Toast is triggered imperatively (toast.success('Saved')) instead of rendered conditionally (ADR-011), so feedback can be raised from anywhere. Toasts stack top-right at a fixed 340px width in an aria-live='polite' region, and focus inside a toast pauses auto-dismiss — which is why it's never used for anything the user must act on. Toasts further back in the stack also soften — half of component.toast.depthBlur one step back, all of it two steps back — and sharpen when the stack spreads (transitions.dev banner stacking).",
17
+
18
+ "governance": {
19
+ "mayExtendLocally": [
20
+ "Write the message and pick the documented tone (success, error, ...)",
21
+ "Raise toasts from any product event through the imperative toast API"
22
+ ],
23
+ "mustEscalateToDS": [
24
+ "Changing the position, width or stacking behavior",
25
+ "Using Toast for blocking decisions or form validation",
26
+ "Adding action buttons, custom durations or persistent toasts"
27
+ ]
28
+ },
29
+
30
+ "states": {
31
+ "intrinsic": ["hover"],
32
+ "authored": []
33
+ },
34
+
35
+ "anatomy": [
36
+ { "part": "toast-viewport", "element": "div", "description": "Fixed, top-right, portaled to document.body via createPortal (ADR-011). Rendered by the <Toast /> component, mounted once by the consuming app." },
37
+ { "part": "toast", "element": "div", "description": "One notification. Background is always the page fill — color lives only on the icon, never the card (ADR-011), a deliberate difference from Badge's own tinted-surface convention." },
38
+ { "part": "toast-icon", "element": "slot", "description": "A real Filled Tabler icon through the Icon component, fixed per variant — not caller-supplied like Badge's own icon prop." },
39
+ { "part": "toast-content", "element": "div", "description": "Wraps the title and description." },
40
+ { "part": "toast-title", "element": "span", "description": "Bold title text." },
41
+ { "part": "toast-description", "element": "span", "description": "Lighter supporting text.", "optional": true },
42
+ { "part": "toast-close", "element": "slot", "description": "An IconButton (IconX) that dismisses this toast early." }
43
+ ],
44
+
45
+ "props": [
46
+ { "name": "className", "type": "string | undefined", "description": "Additional className for the viewport." }
47
+ ],
48
+
49
+ "sizing": {
50
+ "width": { "mode": "fixed", "values": { "default": 340 }, "unit": "px", "note": "Fixed viewport/card width, not on the shared size scale — same category of per-component literal as SidePanel's width." },
51
+ "height": { "mode": "content-driven" }
52
+ },
53
+
54
+ "tokenPolicy": {
55
+ "allowed": ["color.fill", "color.text", "color.icon", "spacing", "radius", "fontSize", "fontWeight", "shadow"],
56
+ "forbidden": ["primitive.color"]
57
+ },
58
+
59
+ "a11y": {
60
+ "role": "each toast-viewport region uses aria-live=\"polite\" so screen readers announce new toasts without interrupting; toast-close is a real button with an accessible label",
61
+ "keyboardNav": ["Tab reaches each visible toast's close button", "Focus inside a toast (e.g. Tab onto its close button) stops its auto-dismiss and spreads the stack — the keyboard equivalent of hovering it (WCAG 2.2.1 Timing Adjustable)"],
62
+ "wcag": ["4.1.3 Status Messages", "1.4.13 Content on Hover or Focus",
63
+ "2.2.1 Timing Adjustable"],
64
+ "notes": [
65
+ "Triggered via the imperative `toast` object (toast.success/info/warning/danger/neutral(label, description?) — the description may also be passed Sonner-style as { description }), not props on <Toast /> itself — see ADR-011. <Toast /> is the rendered stack, mounted once; it takes almost no props of its own. Calling toast.* with no <Toast /> mounted logs a console warning (nothing would be shown).",
66
+ "Stacking depth (max 3 visible) and hover-to-spread use real measured pixel heights (offsetHeight), not percentage-based transforms — a percentage approach was tried and broken in the pre-implementation preview by two toasts of different heights; see ADR-011."
67
+ ],
68
+ "applied": {
69
+ "nativeElement": "div",
70
+ "innerComponents": [
71
+ "Button",
72
+ "IconButton"
73
+ ],
74
+ "focus": [
75
+ {
76
+ "part": "(its inner controls)",
77
+ "delegatedTo": [
78
+ "Button",
79
+ "IconButton"
80
+ ],
81
+ "note": "focus is drawn by Button, IconButton — see their a11y.applied.focus"
82
+ }
83
+ ],
84
+ "aria": {
85
+ "toast-viewport": {
86
+ "role": [
87
+ "region"
88
+ ],
89
+ "aria-label": [
90
+ "Notifications"
91
+ ],
92
+ "aria-live": [
93
+ "polite"
94
+ ]
95
+ }
96
+ },
97
+ "announced": [
98
+ "region \"Notifications\""
99
+ ],
100
+ "contrast": {
101
+ "toast-title (info)": {
102
+ "light": "17.85:1 — #0f172a on #ffffff",
103
+ "dark": "16.29:1 — #f1f5f9 on #0f172a"
104
+ },
105
+ "toast-description (info)": {
106
+ "light": "7.57:1 — #475569 on #ffffff"
107
+ },
108
+ "toast-title (success)": {
109
+ "light": "17.85:1 — #0f172a on #ffffff"
110
+ },
111
+ "toast-description (success)": {
112
+ "light": "7.57:1 — #475569 on #ffffff"
113
+ },
114
+ "toast-icon (icon info)": {
115
+ "light": "17.85:1 — #0f172a on #ffffff",
116
+ "dark": "16.3:1 — #f1f5f9 on #0f172a"
117
+ },
118
+ "toast-icon (icon success)": {
119
+ "light": "17.85:1 — #0f172a on #ffffff",
120
+ "dark": "16.3:1 — #f1f5f9 on #0f172a"
121
+ },
122
+ "toast-title (danger)": {
123
+ "light": "17.85:1 — #0f172a on #ffffff",
124
+ "dark": "16.29:1 — #f1f5f9 on #0f172a"
125
+ },
126
+ "toast-description (danger)": {
127
+ "light": "7.57:1 — #475569 on #ffffff",
128
+ "dark": "6.96:1 — #94a3b8 on #0f172a"
129
+ },
130
+ "toast-icon (icon danger)": {
131
+ "light": "17.85:1 — #0f172a on #ffffff",
132
+ "dark": "16.3:1 — #f1f5f9 on #0f172a"
133
+ }
134
+ },
135
+ "targetSize": {},
136
+ "motion": [
137
+ "CSS transitions/animations: neutralised by the global prefers-reduced-motion rule"
138
+ ]
139
+ },
140
+ "results": {
141
+ "score": 100,
142
+ "meetsMinimum": true,
143
+ "checks": {
144
+ "contract": "pass",
145
+ "keys": "pass",
146
+ "focus-return": "n/a",
147
+ "keyboard": "pass",
148
+ "axe": "pass",
149
+ "contrast": "pass",
150
+ "focus-visible": "pass",
151
+ "target-size": "pass",
152
+ "reflow": "n/a",
153
+ "screen-reader": "pass",
154
+ "ai-visual": "pass",
155
+ "human": "pending"
156
+ },
157
+ "notScored": [
158
+ "ai-visual",
159
+ "human"
160
+ ],
161
+ "changed": "2026-10-13"
162
+ }
163
+ },
164
+
165
+ "figma": {
166
+ "callArgs": [
167
+ { "name": "variant", "type": "'neutral' | 'info' | 'success' | 'warning' | 'danger'", "description": "Which call: toast.neutral / info / success / warning / danger — sets the icon and its color." },
168
+ { "name": "label", "type": "string", "required": true, "description": "First argument — the toast's title." },
169
+ { "name": "description", "type": "string | undefined", "description": "Second argument — an optional supporting line." }
170
+ ],
171
+ "states": ["default"],
172
+ "properties": [
173
+ { "name": "variant", "type": "VARIANT", "values": ["neutral", "info", "success", "warning", "danger"], "codeProp": "variant", "description": "Sets the filled icon (InfoCircleFilled, CircleCheckFilled, AlertTriangleFilled, AlertHexagonFilled — added to the Icons page) and its color, toast.icon.{variant}." },
174
+ { "name": "label", "type": "TEXT", "codeProp": "label" },
175
+ { "name": "description.", "type": "BOOLEAN", "codeProp": "description", "description": "Show/hide part: the line carries its own 2px top (spacing/3xs)." },
176
+ { "name": "description", "type": "TEXT", "codeProp": "description" }
177
+ ],
178
+ "structure": "One toast: 340px, 16px padding, 12px gap, radius/l, fill/page, shadow / xl; filled icon 24px; title 12/18 bold (no text style — bound to fontSize/s, fontWeight/bold, lineHeight/s); description Body / s / Regular; IconButton ghost s (X) to dismiss. Stacking, peek and spread are runtime motion, not modeled.",
179
+ "stories": {
180
+ "Default": "layout",
181
+ "Playground": "variant=success, description.=true",
182
+ "KeyboardReach": {"figma": "layout", "reason": "keyboard focus is drawn on the close IconButton inside it (state=focus)"},
183
+ "Opened": "layout"
184
+ }
185
+ }
186
+ }