@arbor-education/design-system.components 0.15.0 → 0.16.1

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 (304) hide show
  1. package/.gather/skills/write-stories/SKILL.md +207 -271
  2. package/.storybook/preview.ts +5 -0
  3. package/CHANGELOG.md +23 -0
  4. package/README.md +8 -0
  5. package/component-library.md +144 -13
  6. package/dist/components/articleCard/ArticleCard.stories.d.ts +137 -11
  7. package/dist/components/articleCard/ArticleCard.stories.d.ts.map +1 -1
  8. package/dist/components/articleCard/ArticleCard.stories.js +358 -91
  9. package/dist/components/articleCard/ArticleCard.stories.js.map +1 -1
  10. package/dist/components/avatar/Avatar.stories.d.ts +6 -6
  11. package/dist/components/avatar/Avatar.stories.d.ts.map +1 -1
  12. package/dist/components/avatar/Avatar.stories.js +393 -49
  13. package/dist/components/avatar/Avatar.stories.js.map +1 -1
  14. package/dist/components/avatarGroup/AvatarGroup.stories.d.ts +9 -7
  15. package/dist/components/avatarGroup/AvatarGroup.stories.d.ts.map +1 -1
  16. package/dist/components/avatarGroup/AvatarGroup.stories.js +688 -65
  17. package/dist/components/avatarGroup/AvatarGroup.stories.js.map +1 -1
  18. package/dist/components/banner/Banner.stories.d.ts.map +1 -1
  19. package/dist/components/banner/Banner.stories.js +7 -3
  20. package/dist/components/banner/Banner.stories.js.map +1 -1
  21. package/dist/components/card/Card.stories.d.ts +105 -4
  22. package/dist/components/card/Card.stories.d.ts.map +1 -1
  23. package/dist/components/card/Card.stories.js +336 -18
  24. package/dist/components/card/Card.stories.js.map +1 -1
  25. package/dist/components/combobox/Combobox.stories.d.ts +134 -21
  26. package/dist/components/combobox/Combobox.stories.d.ts.map +1 -1
  27. package/dist/components/combobox/Combobox.stories.js +676 -175
  28. package/dist/components/combobox/Combobox.stories.js.map +1 -1
  29. package/dist/components/datePicker/DatePicker.stories.d.ts +119 -27
  30. package/dist/components/datePicker/DatePicker.stories.d.ts.map +1 -1
  31. package/dist/components/datePicker/DatePicker.stories.js +575 -47
  32. package/dist/components/datePicker/DatePicker.stories.js.map +1 -1
  33. package/dist/components/dateTimePicker/DateTimePicker.stories.d.ts +155 -39
  34. package/dist/components/dateTimePicker/DateTimePicker.stories.d.ts.map +1 -1
  35. package/dist/components/dateTimePicker/DateTimePicker.stories.js +674 -103
  36. package/dist/components/dateTimePicker/DateTimePicker.stories.js.map +1 -1
  37. package/dist/components/editableText/EditableText.stories.d.ts +53 -12
  38. package/dist/components/editableText/EditableText.stories.d.ts.map +1 -1
  39. package/dist/components/editableText/EditableText.stories.js +401 -64
  40. package/dist/components/editableText/EditableText.stories.js.map +1 -1
  41. package/dist/components/formField/FormField.d.ts +4 -0
  42. package/dist/components/formField/FormField.d.ts.map +1 -1
  43. package/dist/components/formField/FormField.js +2 -1
  44. package/dist/components/formField/FormField.js.map +1 -1
  45. package/dist/components/formField/FormField.test.js +5 -0
  46. package/dist/components/formField/FormField.test.js.map +1 -1
  47. package/dist/components/formField/fieldset/Fieldset.stories.d.ts +56 -4
  48. package/dist/components/formField/fieldset/Fieldset.stories.d.ts.map +1 -1
  49. package/dist/components/formField/fieldset/Fieldset.stories.js +534 -28
  50. package/dist/components/formField/fieldset/Fieldset.stories.js.map +1 -1
  51. package/dist/components/formField/inputs/checkbox/CheckboxGroup.d.ts +3 -1
  52. package/dist/components/formField/inputs/checkbox/CheckboxGroup.d.ts.map +1 -1
  53. package/dist/components/formField/inputs/checkbox/CheckboxInput.js +1 -1
  54. package/dist/components/formField/inputs/checkbox/CheckboxInput.js.map +1 -1
  55. package/dist/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.d.ts +95 -1
  56. package/dist/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.d.ts.map +1 -1
  57. package/dist/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.js +386 -9
  58. package/dist/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.js.map +1 -1
  59. package/dist/components/formField/inputs/radio/RadioButtonGroup.d.ts +6 -2
  60. package/dist/components/formField/inputs/radio/RadioButtonGroup.d.ts.map +1 -1
  61. package/dist/components/formField/inputs/radio/RadioButtonGroup.js.map +1 -1
  62. package/dist/components/formField/inputs/radio/RadioButtonInput.stories.d.ts.map +1 -1
  63. package/dist/components/formField/inputs/radio/RadioButtonInput.stories.js +61 -49
  64. package/dist/components/formField/inputs/radio/RadioButtonInput.stories.js.map +1 -1
  65. package/dist/components/formField/inputs/selectDropdown/SelectDropdown.stories.d.ts +188 -166
  66. package/dist/components/formField/inputs/selectDropdown/SelectDropdown.stories.d.ts.map +1 -1
  67. package/dist/components/formField/inputs/selectDropdown/SelectDropdown.stories.js +821 -160
  68. package/dist/components/formField/inputs/selectDropdown/SelectDropdown.stories.js.map +1 -1
  69. package/dist/components/formField/inputs/time/TimeInput.stories.d.ts +176 -22
  70. package/dist/components/formField/inputs/time/TimeInput.stories.d.ts.map +1 -1
  71. package/dist/components/formField/inputs/time/TimeInput.stories.js +851 -92
  72. package/dist/components/formField/inputs/time/TimeInput.stories.js.map +1 -1
  73. package/dist/components/formField/label/Label.stories.d.ts +54 -5
  74. package/dist/components/formField/label/Label.stories.d.ts.map +1 -1
  75. package/dist/components/formField/label/Label.stories.js +238 -4
  76. package/dist/components/formField/label/Label.stories.js.map +1 -1
  77. package/dist/components/icoText/IcoText.stories.d.ts +32 -6
  78. package/dist/components/icoText/IcoText.stories.d.ts.map +1 -1
  79. package/dist/components/icoText/IcoText.stories.js +309 -14
  80. package/dist/components/icoText/IcoText.stories.js.map +1 -1
  81. package/dist/components/kpiCard/KPICard.stories.d.ts +100 -2
  82. package/dist/components/kpiCard/KPICard.stories.d.ts.map +1 -1
  83. package/dist/components/kpiCard/KPICard.stories.js +354 -10
  84. package/dist/components/kpiCard/KPICard.stories.js.map +1 -1
  85. package/dist/components/kvpList/KVPList.stories.d.ts +57 -4
  86. package/dist/components/kvpList/KVPList.stories.d.ts.map +1 -1
  87. package/dist/components/kvpList/KVPList.stories.js +403 -10
  88. package/dist/components/kvpList/KVPList.stories.js.map +1 -1
  89. package/dist/components/modal/Modal.stories.d.ts +113 -9
  90. package/dist/components/modal/Modal.stories.d.ts.map +1 -1
  91. package/dist/components/modal/Modal.stories.js +633 -13
  92. package/dist/components/modal/Modal.stories.js.map +1 -1
  93. package/dist/components/modal/modalManager/ModalManager.stories.d.ts +34 -10
  94. package/dist/components/modal/modalManager/ModalManager.stories.d.ts.map +1 -1
  95. package/dist/components/modal/modalManager/ModalManager.stories.js +463 -85
  96. package/dist/components/modal/modalManager/ModalManager.stories.js.map +1 -1
  97. package/dist/components/pill/Pill.d.ts.map +1 -1
  98. package/dist/components/pill/Pill.js +1 -1
  99. package/dist/components/pill/Pill.js.map +1 -1
  100. package/dist/components/pill/Pill.stories.d.ts.map +1 -1
  101. package/dist/components/pill/Pill.stories.js +11 -13
  102. package/dist/components/pill/Pill.stories.js.map +1 -1
  103. package/dist/components/row/Row.stories.d.ts +1 -2
  104. package/dist/components/row/Row.stories.d.ts.map +1 -1
  105. package/dist/components/row/Row.stories.js +360 -50
  106. package/dist/components/row/Row.stories.js.map +1 -1
  107. package/dist/components/searchBar/SearchBar.stories.d.ts +52 -4
  108. package/dist/components/searchBar/SearchBar.stories.d.ts.map +1 -1
  109. package/dist/components/searchBar/SearchBar.stories.js +428 -36
  110. package/dist/components/searchBar/SearchBar.stories.js.map +1 -1
  111. package/dist/components/section/Section.stories.d.ts +11 -41
  112. package/dist/components/section/Section.stories.d.ts.map +1 -1
  113. package/dist/components/section/Section.stories.js +494 -56
  114. package/dist/components/section/Section.stories.js.map +1 -1
  115. package/dist/components/singleUser/SingleUser.stories.d.ts +5 -4
  116. package/dist/components/singleUser/SingleUser.stories.d.ts.map +1 -1
  117. package/dist/components/singleUser/SingleUser.stories.js +303 -31
  118. package/dist/components/singleUser/SingleUser.stories.js.map +1 -1
  119. package/dist/components/slideoverManager/SlideoverManager.stories.d.ts +32 -11
  120. package/dist/components/slideoverManager/SlideoverManager.stories.d.ts.map +1 -1
  121. package/dist/components/slideoverManager/SlideoverManager.stories.js +380 -84
  122. package/dist/components/slideoverManager/SlideoverManager.stories.js.map +1 -1
  123. package/dist/components/table/DSDefaultColDef.d.ts.map +1 -1
  124. package/dist/components/table/DSDefaultColDef.js +4 -3
  125. package/dist/components/table/DSDefaultColDef.js.map +1 -1
  126. package/dist/components/table/Table.d.ts +6 -1
  127. package/dist/components/table/Table.d.ts.map +1 -1
  128. package/dist/components/table/Table.js +8 -3
  129. package/dist/components/table/Table.js.map +1 -1
  130. package/dist/components/table/Table.stories.d.ts +3 -0
  131. package/dist/components/table/Table.stories.d.ts.map +1 -1
  132. package/dist/components/table/Table.stories.js +384 -5
  133. package/dist/components/table/Table.stories.js.map +1 -1
  134. package/dist/components/table/Table.test.js +30 -0
  135. package/dist/components/table/Table.test.js.map +1 -1
  136. package/dist/components/table/TableFooter.stories.d.ts +49 -0
  137. package/dist/components/table/TableFooter.stories.d.ts.map +1 -0
  138. package/dist/components/table/TableFooter.stories.js +137 -0
  139. package/dist/components/table/TableFooter.stories.js.map +1 -0
  140. package/dist/components/table/TableHeader.stories.d.ts +93 -0
  141. package/dist/components/table/TableHeader.stories.d.ts.map +1 -0
  142. package/dist/components/table/TableHeader.stories.js +176 -0
  143. package/dist/components/table/TableHeader.stories.js.map +1 -0
  144. package/dist/components/table/cellEditors/DateCellEditor.stories.d.ts +44 -0
  145. package/dist/components/table/cellEditors/DateCellEditor.stories.d.ts.map +1 -0
  146. package/dist/components/table/cellEditors/DateCellEditor.stories.js +186 -0
  147. package/dist/components/table/cellEditors/DateCellEditor.stories.js.map +1 -0
  148. package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.d.ts +40 -0
  149. package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.d.ts.map +1 -0
  150. package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.js +209 -0
  151. package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.js.map +1 -0
  152. package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.d.ts +48 -0
  153. package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.d.ts.map +1 -0
  154. package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.js +244 -0
  155. package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.js.map +1 -0
  156. package/dist/components/table/cellRenderers/CheckboxCellRenderer.d.ts.map +1 -1
  157. package/dist/components/table/cellRenderers/CheckboxCellRenderer.js +3 -1
  158. package/dist/components/table/cellRenderers/CheckboxCellRenderer.js.map +1 -1
  159. package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.d.ts +64 -0
  160. package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.d.ts.map +1 -0
  161. package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.js +241 -0
  162. package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.js.map +1 -0
  163. package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.d.ts +55 -0
  164. package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.d.ts.map +1 -0
  165. package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.js +245 -0
  166. package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.js.map +1 -0
  167. package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.d.ts +67 -0
  168. package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.d.ts.map +1 -0
  169. package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.js +221 -0
  170. package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.js.map +1 -0
  171. package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.d.ts +75 -0
  172. package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.d.ts.map +1 -0
  173. package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.js +270 -0
  174. package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.js.map +1 -0
  175. package/dist/components/table/columnFilters/BooleanFilter.stories.d.ts +57 -0
  176. package/dist/components/table/columnFilters/BooleanFilter.stories.d.ts.map +1 -0
  177. package/dist/components/table/columnFilters/BooleanFilter.stories.js +198 -0
  178. package/dist/components/table/columnFilters/BooleanFilter.stories.js.map +1 -0
  179. package/dist/components/table/columnFilters/TimeFilter.stories.d.ts +58 -0
  180. package/dist/components/table/columnFilters/TimeFilter.stories.d.ts.map +1 -0
  181. package/dist/components/table/columnFilters/TimeFilter.stories.js +207 -0
  182. package/dist/components/table/columnFilters/TimeFilter.stories.js.map +1 -0
  183. package/dist/components/table/pagination/PaginationPanel.stories.d.ts +113 -0
  184. package/dist/components/table/pagination/PaginationPanel.stories.d.ts.map +1 -0
  185. package/dist/components/table/pagination/PaginationPanel.stories.js +272 -0
  186. package/dist/components/table/pagination/PaginationPanel.stories.js.map +1 -0
  187. package/dist/components/table/tableControls/HideColumnsDropdown.d.ts.map +1 -1
  188. package/dist/components/table/tableControls/HideColumnsDropdown.js +9 -3
  189. package/dist/components/table/tableControls/HideColumnsDropdown.js.map +1 -1
  190. package/dist/components/table/tableControls/TableControls.stories.d.ts +151 -0
  191. package/dist/components/table/tableControls/TableControls.stories.d.ts.map +1 -0
  192. package/dist/components/table/tableControls/TableControls.stories.js +356 -0
  193. package/dist/components/table/tableControls/TableControls.stories.js.map +1 -0
  194. package/dist/components/table/tableControls/TableSettingsDropdown.d.ts +27 -1
  195. package/dist/components/table/tableControls/TableSettingsDropdown.d.ts.map +1 -1
  196. package/dist/components/table/tableControls/TableSettingsDropdown.js +53 -26
  197. package/dist/components/table/tableControls/TableSettingsDropdown.js.map +1 -1
  198. package/dist/components/table/tableControls/TableSettingsDropdown.test.d.ts +2 -0
  199. package/dist/components/table/tableControls/TableSettingsDropdown.test.d.ts.map +1 -0
  200. package/dist/components/table/tableControls/TableSettingsDropdown.test.js +178 -0
  201. package/dist/components/table/tableControls/TableSettingsDropdown.test.js.map +1 -0
  202. package/dist/components/tabs/Tabs.stories.d.ts +22 -4
  203. package/dist/components/tabs/Tabs.stories.d.ts.map +1 -1
  204. package/dist/components/tabs/Tabs.stories.js +398 -22
  205. package/dist/components/tabs/Tabs.stories.js.map +1 -1
  206. package/dist/components/tabs/TabsItem.stories.d.ts +54 -1
  207. package/dist/components/tabs/TabsItem.stories.d.ts.map +1 -1
  208. package/dist/components/tabs/TabsItem.stories.js +61 -9
  209. package/dist/components/tabs/TabsItem.stories.js.map +1 -1
  210. package/dist/components/toast/Toast.stories.d.ts +103 -10
  211. package/dist/components/toast/Toast.stories.d.ts.map +1 -1
  212. package/dist/components/toast/Toast.stories.js +409 -47
  213. package/dist/components/toast/Toast.stories.js.map +1 -1
  214. package/dist/components/toggle/Toggle.stories.d.ts +61 -46
  215. package/dist/components/toggle/Toggle.stories.d.ts.map +1 -1
  216. package/dist/components/toggle/Toggle.stories.js +311 -122
  217. package/dist/components/toggle/Toggle.stories.js.map +1 -1
  218. package/dist/components/tooltip/Tooltip.stories.d.ts +78 -6
  219. package/dist/components/tooltip/Tooltip.stories.d.ts.map +1 -1
  220. package/dist/components/tooltip/Tooltip.stories.js +413 -7
  221. package/dist/components/tooltip/Tooltip.stories.js.map +1 -1
  222. package/dist/components/tooltip/TooltipWrapper.stories.d.ts +71 -7
  223. package/dist/components/tooltip/TooltipWrapper.stories.d.ts.map +1 -1
  224. package/dist/components/tooltip/TooltipWrapper.stories.js +238 -10
  225. package/dist/components/tooltip/TooltipWrapper.stories.js.map +1 -1
  226. package/dist/index.css +8 -0
  227. package/dist/index.css.map +1 -1
  228. package/dist/utils/PopupParentContext.stories.d.ts +17 -0
  229. package/dist/utils/PopupParentContext.stories.d.ts.map +1 -0
  230. package/dist/utils/PopupParentContext.stories.js +266 -0
  231. package/dist/utils/PopupParentContext.stories.js.map +1 -0
  232. package/dist/utils/getDefaultPopupParent.d.ts.map +1 -1
  233. package/dist/utils/getDefaultPopupParent.js +6 -0
  234. package/dist/utils/getDefaultPopupParent.js.map +1 -1
  235. package/package.json +1 -1
  236. package/src/components/articleCard/ArticleCard.stories.tsx +524 -111
  237. package/src/components/avatar/Avatar.stories.tsx +504 -59
  238. package/src/components/avatarGroup/AvatarGroup.stories.tsx +977 -175
  239. package/src/components/banner/Banner.stories.tsx +7 -3
  240. package/src/components/card/Card.stories.tsx +466 -36
  241. package/src/components/combobox/Combobox.stories.tsx +867 -260
  242. package/src/components/datePicker/DatePicker.stories.tsx +777 -60
  243. package/src/components/dateTimePicker/DateTimePicker.stories.tsx +910 -132
  244. package/src/components/editableText/EditableText.stories.tsx +567 -91
  245. package/src/components/formField/FormField.test.tsx +6 -0
  246. package/src/components/formField/FormField.tsx +5 -0
  247. package/src/components/formField/fieldset/Fieldset.stories.tsx +761 -51
  248. package/src/components/formField/inputs/checkbox/CheckboxGroup.tsx +1 -1
  249. package/src/components/formField/inputs/checkbox/CheckboxInput.tsx +1 -1
  250. package/src/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.tsx +504 -11
  251. package/src/components/formField/inputs/radio/RadioButtonGroup.tsx +17 -4
  252. package/src/components/formField/inputs/radio/RadioButtonInput.stories.tsx +71 -59
  253. package/src/components/formField/inputs/selectDropdown/SelectDropdown.stories.tsx +1079 -168
  254. package/src/components/formField/inputs/time/TimeInput.stories.tsx +1140 -104
  255. package/src/components/formField/label/Label.stories.tsx +317 -8
  256. package/src/components/icoText/IcoText.stories.tsx +442 -31
  257. package/src/components/kpiCard/KPICard.stories.tsx +475 -30
  258. package/src/components/kvpList/KVPList.stories.tsx +593 -26
  259. package/src/components/modal/Modal.stories.tsx +963 -26
  260. package/src/components/modal/modalManager/ModalManager.stories.tsx +612 -454
  261. package/src/components/pill/Pill.stories.tsx +11 -13
  262. package/src/components/pill/Pill.tsx +1 -0
  263. package/src/components/row/Row.stories.tsx +474 -58
  264. package/src/components/searchBar/SearchBar.stories.tsx +570 -38
  265. package/src/components/section/Section.stories.tsx +723 -70
  266. package/src/components/singleUser/SingleUser.stories.tsx +393 -34
  267. package/src/components/slideoverManager/SlideoverManager.stories.tsx +572 -342
  268. package/src/components/table/DSDefaultColDef.ts +25 -5
  269. package/src/components/table/Table.stories.tsx +460 -5
  270. package/src/components/table/Table.test.tsx +53 -0
  271. package/src/components/table/Table.tsx +9 -2
  272. package/src/components/table/TableFooter.stories.tsx +196 -0
  273. package/src/components/table/TableHeader.stories.tsx +251 -0
  274. package/src/components/table/cellEditors/DateCellEditor.stories.tsx +245 -0
  275. package/src/components/table/cellRenderers/BooleanCellRenderer.stories.tsx +278 -0
  276. package/src/components/table/cellRenderers/ButtonCellRenderer.stories.tsx +333 -0
  277. package/src/components/table/cellRenderers/CheckboxCellRenderer.stories.tsx +337 -0
  278. package/src/components/table/cellRenderers/CheckboxCellRenderer.tsx +5 -1
  279. package/src/components/table/cellRenderers/DefaultCellRenderer.stories.tsx +342 -0
  280. package/src/components/table/cellRenderers/InlineTextCellRenderer.stories.tsx +292 -0
  281. package/src/components/table/cellRenderers/SelectDropdownCellRenderer.stories.tsx +369 -0
  282. package/src/components/table/columnFilters/BooleanFilter.stories.tsx +268 -0
  283. package/src/components/table/columnFilters/TimeFilter.stories.tsx +281 -0
  284. package/src/components/table/pagination/PaginationPanel.stories.tsx +327 -0
  285. package/src/components/table/tableControls/HideColumnsDropdown.tsx +11 -2
  286. package/src/components/table/tableControls/TableControls.stories.tsx +415 -0
  287. package/src/components/table/tableControls/TableSettingsDropdown.test.tsx +207 -0
  288. package/src/components/table/tableControls/TableSettingsDropdown.tsx +103 -39
  289. package/src/components/tabs/Tabs.stories.tsx +540 -60
  290. package/src/components/tabs/TabsItem.stories.tsx +82 -8
  291. package/src/components/toast/Toast.stories.tsx +539 -77
  292. package/src/components/toggle/Toggle.stories.tsx +371 -135
  293. package/src/components/tooltip/Tooltip.stories.tsx +606 -15
  294. package/src/components/tooltip/TooltipWrapper.stories.tsx +348 -12
  295. package/src/docs/Contributing.mdx +241 -0
  296. package/src/docs/UsingComponents.mdx +93 -0
  297. package/src/docs/Welcome.mdx +68 -0
  298. package/src/global.scss +7 -0
  299. package/src/utils/PopupParentContext.stories.tsx +367 -0
  300. package/src/utils/getDefaultPopupParent.ts +6 -0
  301. package/.ralph/storybook-upgrade/knowledge.md +0 -308
  302. package/.ralph/storybook-upgrade/prd.json +0 -777
  303. package/.ralph/storybook-upgrade/progress.md +0 -342
  304. package/src/components/table/TableWIP.mdx +0 -3
@@ -1,51 +1,557 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Fieldset } from './Fieldset';
3
- import { FormField } from '../FormField';
4
- import { CheckboxInput } from '../inputs/checkbox/CheckboxInput';
5
- import { RadioButtonInput } from '../inputs/radio/RadioButtonInput';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Controls, Heading as DocHeading, Markdown, Primary as DocPrimary, Stories, Subtitle, Title, } from '@storybook/addon-docs/blocks';
3
+ import { CheckboxInput } from '../../formField/inputs/checkbox/CheckboxInput';
4
+ import { Fieldset } from '../../formField/fieldset/Fieldset';
5
+ import { RadioButtonInput } from '../../formField/inputs/radio/RadioButtonInput';
6
+ import { FormField } from '../../formField/FormField';
7
+ // ─────────────────────────────────────────────
8
+ // Content strings
9
+ // ─────────────────────────────────────────────
10
+ const DESCRIPTION_INTRO = `
11
+ The **Fieldset** component is the semantic wrapper for grouping related form controls in the Arbor
12
+ design system. It renders a native HTML \`<fieldset>\` with an optional \`<legend>\`, giving a
13
+ grouped set of inputs a shared label that assistive technology can announce before each control.
14
+
15
+ Under the hood it resets all browser user-agent styles (border, margin, padding) and uses flexbox
16
+ to stack children with consistent spacing via the design-system token
17
+ \`--checkbox-or-radio-button-group-spacing-gap-vertical\`.
18
+
19
+ Use **Fieldset** when the higher-level \`CheckboxGroup\` or \`RadioButtonGroup\` components do not
20
+ cover your layout needs — for example, mixed control types, custom grid arrangements, or consent
21
+ blocks that combine checkboxes with rich text.
22
+
23
+ ---
24
+
25
+ ### When to use
26
+
27
+ | Scenario | Notes |
28
+ |---|---|
29
+ | Custom group of checkboxes | Primary use case — wrap \`CheckboxInput\` components |
30
+ | Custom group of radio buttons | Enforces mutual exclusivity via shared \`name\` attribute |
31
+ | Mixed control group | Combine different control types under one accessible label |
32
+ | Section of a larger form | Groups FormField components under a shared named section |
33
+ | Consent and permissions blocks | Parent consent forms with multiple independent options |
34
+
35
+ ---
36
+
37
+ ### When NOT to use
38
+
39
+ | Scenario | Alternative |
40
+ |---|---|
41
+ | Single labelled input | Use \`FormField\` with \`label\` + \`labelFor\` |
42
+ | Standard checkbox list | Consider \`CheckboxGroup\` if it covers the layout |
43
+ | Standard radio button list | Consider \`RadioButtonGroup\` if it covers the layout |
44
+ | Visual card grouping (non-form) | Use layout primitives — \`<fieldset>\` is for form controls only |
45
+ | Unknown-length async option list | Compose dynamically, but always keep Fieldset + legend |
46
+
47
+ ---
48
+
49
+ ### Component API
50
+
51
+ \`\`\`tsx
52
+ import { Fieldset } from '@arbor-education/design-system.components';
53
+
54
+ // With legend
55
+ <Fieldset legend="Notification preferences">
56
+ <CheckboxInput id="email" name="notifications" label="Email" />
57
+ <CheckboxInput id="sms" name="notifications" label="SMS" />
58
+ </Fieldset>
59
+
60
+ // Without legend (requires aria-label or aria-labelledby for accessibility)
61
+ <h2 id="prefs-heading">Notification preferences</h2>
62
+ <Fieldset aria-labelledby="prefs-heading">
63
+ <CheckboxInput id="email" name="notifications" label="Email" />
64
+ <CheckboxInput id="sms" name="notifications" label="SMS" />
65
+ </Fieldset>
66
+
67
+ // Disable all children at once
68
+ <Fieldset legend="Trip consent" disabled>
69
+ <CheckboxInput id="trip-1" name="consent" label="Year 7 Geography trip" />
70
+ <CheckboxInput id="trip-2" name="consent" label="Year 8 Science museum" />
71
+ </Fieldset>
72
+ \`\`\`
73
+ `.trim();
74
+ const USAGE_GUIDANCE = `
75
+ ### When to use
76
+
77
+ Fieldset is the right choice when you need to group two or more related form controls and give that
78
+ group an accessible label. The most common patterns in Arbor are:
79
+
80
+ - **Consent blocks** — a set of independent checkboxes that each require explicit opt-in
81
+ - **Preference groups** — a set of radio buttons where only one option is valid
82
+ - **Form sections** — a logical sub-section of a larger form, named with a visible legend
83
+
84
+ ---
85
+
86
+ ### When NOT to use
87
+
88
+ | Anti-pattern | Why it is wrong | What to do instead |
89
+ |---|---|---|
90
+ | Adding a visible border | The UA border is intentionally removed. Adding it back makes fieldset look like a card | Use a \`<div>\` with a border if you need a visual card |
91
+ | Grouping non-form content | Fieldset is a form landmark — assistive technology announces it as such | Use \`<section>\` or \`<div>\` for non-form groupings |
92
+ | Omitting legend with no ARIA fallback | Screen readers have no group label to announce | Always provide \`legend\`, \`aria-label\`, or \`aria-labelledby\` |
93
+ | Nesting fieldsets deeply | Legal HTML but confusing for AT users | Flatten or split into separate form sections |
94
+
95
+ ---
96
+
97
+ ### The \`disabled\` prop — one prop to rule them all
98
+
99
+ Setting \`disabled\` on the Fieldset element is the correct, semantic way to disable an entire group
100
+ of controls. The browser propagates the disabled state to **all descendant form controls**
101
+ automatically — no JavaScript, no CSS hacks, no prop-drilling needed.
102
+
103
+ \`\`\`tsx
104
+ // This ONE prop disables every checkbox/radio/input inside:
105
+ <Fieldset legend="Trip consent" disabled>
106
+ <CheckboxInput id="trip-1" label="Year 7 Geography trip" />
107
+ <CheckboxInput id="trip-2" label="Year 8 Science museum" />
108
+ <CheckboxInput id="trip-3" label="Year 9 Drama workshop" />
109
+ </Fieldset>
110
+ \`\`\`
111
+
112
+ Do **not** pass \`disabled\` to each child individually when you want to disable the whole group —
113
+ that is more code, more error-prone, and is not semantically equivalent.
114
+
115
+ ---
116
+
117
+ ### Legend visibility
118
+
119
+ The \`legend\` prop renders a \`<legend>\` element as the **first child** of the fieldset. This is
120
+ enforced by the component. Do not try to move it via CSS positioning — the browser ignores
121
+ \`position: absolute\` on \`<legend>\` in many layouts and the AT reading order depends on it being
122
+ first in the DOM.
123
+ `.trim();
124
+ const DEVELOPER_NOTES = `
125
+ ### Critical usage patterns
126
+
127
+ #### Always label your fieldset
128
+
129
+ A fieldset without any group label fails WCAG 1.3.1 (Info and Relationships). Use one of:
130
+
131
+ 1. **\`legend\` prop** (preferred) — renders a visible \`<legend>\` element
132
+ 2. **\`aria-label\`** — invisible label string (use when design requires no visible heading)
133
+ 3. **\`aria-labelledby\`** — points to an existing heading element by \`id\`
134
+
135
+ #### Radio button mutual exclusivity
136
+
137
+ For radio buttons, share the same \`name\` attribute across all \`RadioButtonInput\` children.
138
+ The \`<fieldset>\` provides the group semantics; the shared \`name\` enforces single-selection.
139
+
140
+ \`\`\`tsx
141
+ <Fieldset legend="Report access level">
142
+ <RadioButtonInput name="access" id="access-view" label="View only" value="view" />
143
+ <RadioButtonInput name="access" id="access-edit" label="View and edit" value="edit" />
144
+ <RadioButtonInput name="access" id="access-admin" label="Full admin" value="admin" />
145
+ </Fieldset>
146
+ \`\`\`
147
+
148
+ #### Do not add extra wrapper divs around children
149
+
150
+ The Fieldset already applies \`display: flex; flex-direction: column; gap: var(--checkbox-or-radio-button-group-spacing-gap-vertical)\`.
151
+ Adding extra \`<div>\` wrappers around each child will break the spacing rhythm.
152
+
153
+ ---
154
+
155
+ ### Accessibility
156
+
157
+ | Concern | How it is addressed |
158
+ |---|---|
159
+ | Group label | \`<legend>\` is the first child — screen readers announce it before each control in the group |
160
+ | Disabled state | Native \`disabled\` on \`<fieldset>\` propagates to all descendants — no JS needed |
161
+ | No visible legend | Use \`aria-label\` or \`aria-labelledby\` — never leave the group unlabelled |
162
+ | Keyboard navigation | All standard browser keyboard behaviour is preserved — no custom handlers needed |
163
+ | WCAG 1.3.1 | Grouping via fieldset+legend satisfies Info and Relationships at level A |
164
+
165
+ ---
166
+
167
+ ### TypeScript types
168
+
169
+ \`\`\`ts
170
+ import type { FieldsetProps } from '@arbor-education/design-system.components';
171
+ \`\`\`
172
+
173
+ | Prop | Type | Default | Description |
174
+ |---|---|---|
175
+ | \`legend\` | \`string\` | — | Renders a \`<legend>\` element as the first child. Omit only when using \`aria-label\` or \`aria-labelledby\` |
176
+ | \`disabled\` | \`boolean\` | \`false\` | Disables all descendant form controls via native HTML propagation |
177
+ | \`children\` | \`ReactNode\` | — | Form controls to group. Typically \`CheckboxInput\` or \`RadioButtonInput\` |
178
+ | \`className\` | \`string\` | — | Additional CSS classes for the \`<fieldset>\` element |
179
+ | \`aria-label\` | \`string\` | — | Invisible accessible label — use when there is no visible legend |
180
+ | \`aria-labelledby\` | \`string\` | — | \`id\` of an existing heading element — alternative to \`legend\` |
181
+ `.trim();
182
+ const RELATED_COMPONENTS = `
183
+ ---
184
+
185
+ ### Related components
186
+
187
+ | Component | Storybook link |
188
+ |---|---|
189
+ | FormField | [View FormField](?path=/docs/components-formfield-formfield--docs) |
190
+ | CheckboxInput | [View CheckboxInput](?path=/docs/components-formfield-inputs-checkboxinput--docs) |
191
+ | RadioButtonInput | [View RadioButtonInput](?path=/docs/components-formfield-inputs-radiobuttoninput--docs) |
192
+ `.trim();
193
+ const PROPS_INTRO = `
194
+ Use the controls below to toggle \`legend\` and \`disabled\` and see how Fieldset responds in real
195
+ time. The \`children\` prop cannot be set via the controls panel directly — the Default story
196
+ renders \`CheckboxInput\` components as the primary use case.
197
+ `.trim();
198
+ // ─────────────────────────────────────────────
199
+ // Custom docs page
200
+ // ─────────────────────────────────────────────
201
+ function FieldsetDocsPage() {
202
+ return (_jsxs(_Fragment, { children: [_jsx(Title, {}), _jsx(Subtitle, {}), _jsx(Markdown, { children: DESCRIPTION_INTRO }), _jsx(DocHeading, { children: "Interactive example" }), _jsx(Markdown, { children: PROPS_INTRO }), _jsx(DocPrimary, {}), _jsx(Controls, {}), _jsx(DocHeading, { children: "Usage guidance" }), _jsx(Markdown, { children: USAGE_GUIDANCE }), _jsx(DocHeading, { children: "Developer notes" }), _jsx(Markdown, { children: DEVELOPER_NOTES }), _jsx(DocHeading, { children: "Examples" }), _jsx(Stories, { title: "" }), _jsx(Markdown, { children: RELATED_COMPONENTS })] }));
203
+ }
204
+ // ─────────────────────────────────────────────
205
+ // Meta
206
+ // ─────────────────────────────────────────────
6
207
  const meta = {
7
208
  title: 'Components/FormField/Fieldset',
8
209
  component: Fieldset,
210
+ tags: ['autodocs'],
9
211
  parameters: {
10
212
  layout: 'padded',
213
+ docs: { page: FieldsetDocsPage },
11
214
  },
12
- tags: ['autodocs'],
13
215
  argTypes: {
14
216
  legend: {
15
- control: 'text',
16
- description: 'The legend text for the fieldset',
217
+ description: 'Renders a `<legend>` element as the first child of the fieldset. Provides the accessible group label announced by screen readers before each control in the group. Omit only when using `aria-label` or `aria-labelledby`.',
218
+ control: { type: 'text' },
219
+ table: {
220
+ type: { summary: 'string' },
221
+ defaultValue: { summary: '—' },
222
+ },
17
223
  },
18
224
  disabled: {
19
- control: 'boolean',
20
- description: 'Disable all form controls within the fieldset',
225
+ description: 'Disables all descendant form controls via native HTML propagation. **One prop disables everything** — no need to pass `disabled` to each child individually.',
226
+ control: { type: 'boolean' },
227
+ table: {
228
+ type: { summary: 'boolean' },
229
+ defaultValue: { summary: 'false' },
230
+ },
21
231
  },
22
232
  children: {
233
+ description: 'Form controls to group. Typically `CheckboxInput` or `RadioButtonInput` components. Do not wrap children in extra `<div>` elements — the fieldset already applies flex + gap spacing.',
23
234
  control: false,
24
- description: 'Form controls and other content to display within the fieldset',
235
+ table: {
236
+ type: { summary: 'ReactNode' },
237
+ defaultValue: { summary: '—' },
238
+ },
239
+ },
240
+ className: {
241
+ description: 'Additional CSS class(es) applied to the `<fieldset>` element. Use design-token values for any layout overrides.',
242
+ control: { type: 'text' },
243
+ table: {
244
+ type: { summary: 'string' },
245
+ defaultValue: { summary: '—' },
246
+ },
25
247
  },
26
248
  },
27
249
  };
28
250
  export default meta;
29
- // Default fieldset with simple content
251
+ // ─────────────────────────────────────────────
252
+ // Helpers
253
+ // ─────────────────────────────────────────────
254
+ /** Wraps a story with a consistent description below the rendered example. */
255
+ function withDescription(description, story) {
256
+ return {
257
+ ...story,
258
+ parameters: {
259
+ ...story.parameters,
260
+ docs: {
261
+ ...story.parameters?.docs,
262
+ description: { story: description },
263
+ },
264
+ },
265
+ };
266
+ }
267
+ // ─────────────────────────────────────────────
268
+ // Stories
269
+ // ─────────────────────────────────────────────
30
270
  export const Default = {
31
271
  args: {
32
- legend: 'Personal Information',
33
- children: (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '1rem' }, children: [_jsx(FormField, { id: "first-name", label: "First Name", inputProps: {
34
- placeholder: 'Enter your first name',
35
- } }), _jsx(FormField, { id: "last-name", label: "Last Name", inputProps: {
36
- placeholder: 'Enter your last name',
37
- } })] })),
272
+ legend: 'Consent and Permissions',
273
+ disabled: false,
38
274
  },
275
+ render: args => (_jsxs(Fieldset, { ...args, children: [_jsx(CheckboxInput, { id: "consent-trips", name: "consent", label: "Consent for school trips", onChange: () => { } }), _jsx(CheckboxInput, { id: "consent-photos", name: "consent", label: "Consent for photographs", onChange: () => { } }), _jsx(CheckboxInput, { id: "consent-data", name: "consent", label: "Consent for data sharing with partner schools", onChange: () => { } })] })),
39
276
  };
40
- // Disabled fieldset
41
- export const Disabled = {
42
- args: {
43
- legend: 'Disabled Fieldset',
44
- disabled: true,
45
- children: (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '1rem' }, children: [_jsx(FormField, { id: "disabled-input", label: "Disabled Input", inputProps: {
46
- placeholder: 'This input is disabled',
47
- disabled: true,
48
- } }), _jsx(CheckboxInput, { id: "disabled-checkbox", name: "disabled", value: "disabled", label: "Disabled checkbox", disabled: true }), _jsx(RadioButtonInput, { id: "disabled-radio", name: "disabled", value: "disabled", label: "Disabled radio", disabled: true })] })),
277
+ export const WithRadioButtons = withDescription('Radio buttons inside a fieldset enforce single-selection. Share the same `name` attribute across all `RadioButtonInput` children — the fieldset provides the group semantics, the shared `name` enforces mutual exclusivity.', {
278
+ parameters: {
279
+ controls: { disable: true },
280
+ docs: {
281
+ source: {
282
+ code: `
283
+ import { Fieldset, RadioButtonInput } from '@arbor-education/design-system.components';
284
+
285
+ export default function ReportAccessFieldset() {
286
+ return (
287
+ <Fieldset legend="Report access level">
288
+ <RadioButtonInput
289
+ id="access-view"
290
+ name="access"
291
+ value="view"
292
+ label="View only — can read reports but not download"
293
+ />
294
+ <RadioButtonInput
295
+ id="access-download"
296
+ name="access"
297
+ value="download"
298
+ label="View and download — can export to PDF"
299
+ />
300
+ <RadioButtonInput
301
+ id="access-admin"
302
+ name="access"
303
+ value="admin"
304
+ label="Full admin — can view, download, and share with parents"
305
+ />
306
+ </Fieldset>
307
+ );
308
+ }
309
+ `.trim(),
310
+ },
311
+ },
49
312
  },
50
- };
313
+ render: () => (_jsxs(Fieldset, { legend: "Report access level", children: [_jsx(RadioButtonInput, { id: "access-view", name: "access", value: "view", label: "View only \u2014 can read reports but not download" }), _jsx(RadioButtonInput, { id: "access-download", name: "access", value: "download", label: "View and download \u2014 can export to PDF" }), _jsx(RadioButtonInput, { id: "access-admin", name: "access", value: "admin", label: "Full admin \u2014 can view, download, and share with parents" })] })),
314
+ });
315
+ export const WithFormFields = withDescription('Fieldset can wrap `FormField` components to create a named section within a larger form. This is useful for logical groupings like an address block or emergency contact details where each field has its own label.', {
316
+ parameters: {
317
+ controls: { disable: true },
318
+ docs: {
319
+ source: {
320
+ code: `
321
+ import { Fieldset, FormField } from '@arbor-education/design-system.components';
322
+
323
+ export default function DietaryRequirementsFieldset() {
324
+ return (
325
+ <Fieldset legend="Dietary requirements">
326
+ <FormField
327
+ id="diet-primary"
328
+ label="Primary dietary requirement"
329
+ inputProps={{ placeholder: 'e.g. Halal, Vegetarian, Vegan' }}
330
+ />
331
+ <FormField
332
+ id="diet-allergies"
333
+ label="Allergies and intolerances"
334
+ fieldDescription="List all known allergens — this information is shared with the school kitchen"
335
+ inputProps={{ placeholder: 'e.g. Peanuts, Gluten, Dairy' }}
336
+ />
337
+ </Fieldset>
338
+ );
339
+ }
340
+ `.trim(),
341
+ },
342
+ },
343
+ },
344
+ render: () => (_jsxs(Fieldset, { legend: "Dietary requirements", children: [_jsx(FormField, { id: "diet-primary", label: "Primary dietary requirement", inputProps: { placeholder: 'e.g. Halal, Vegetarian, Vegan' } }), _jsx(FormField, { id: "diet-allergies", label: "Allergies and intolerances", fieldDescription: "List all known allergens \u2014 this information is shared with the school kitchen", inputProps: { placeholder: 'e.g. Peanuts, Gluten, Dairy' } })] })),
345
+ });
346
+ export const WithoutLegend = withDescription('The `legend` prop is optional. When omitted the fieldset still provides semantic grouping, but you **must** supply either `aria-label` or `aria-labelledby` to satisfy WCAG 1.3.1. This is useful when the group label already exists as a visible heading in the page.', {
347
+ parameters: {
348
+ controls: { disable: true },
349
+ docs: {
350
+ source: {
351
+ code: `
352
+ import { Fieldset, CheckboxInput } from '@arbor-education/design-system.components';
353
+
354
+ export default function WithoutLegendFieldset() {
355
+ return (
356
+ // No legend prop — aria-labelledby points to the heading above
357
+ <div>
358
+ <h2 id="notif-heading">Notification preferences</h2>
359
+ <Fieldset aria-labelledby="notif-heading">
360
+ <CheckboxInput
361
+ id="notif-email"
362
+ name="notifications"
363
+ label="Email — weekly summary and urgent alerts"
364
+ />
365
+ <CheckboxInput
366
+ id="notif-sms"
367
+ name="notifications"
368
+ label="SMS — urgent alerts only"
369
+ />
370
+ <CheckboxInput
371
+ id="notif-app"
372
+ name="notifications"
373
+ label="In-app — all updates in the Arbor dashboard"
374
+ />
375
+ </Fieldset>
376
+ </div>
377
+ );
378
+ }
379
+ `.trim(),
380
+ },
381
+ },
382
+ },
383
+ render: () => (_jsxs("div", { children: [_jsx("h2", { id: "notif-heading", style: {
384
+ fontFamily: 'var(--type-body-font-family)',
385
+ fontWeight: 'var(--type-body-bold-weight)',
386
+ color: 'var(--form-field-label-color-text)',
387
+ marginBottom: 'var(--form-field-spacing-vertical)',
388
+ marginTop: 0,
389
+ fontSize: '1rem',
390
+ }, children: "Notification preferences" }), _jsxs(Fieldset, { "aria-labelledby": "notif-heading", children: [_jsx(CheckboxInput, { id: "notif-email", name: "notifications", label: "Email \u2014 weekly summary and urgent alerts", onChange: () => { } }), _jsx(CheckboxInput, { id: "notif-sms", name: "notifications", label: "SMS \u2014 urgent alerts only", onChange: () => { } }), _jsx(CheckboxInput, { id: "notif-app", name: "notifications", label: "In-app \u2014 all updates in the Arbor dashboard", onChange: () => { } })] })] })),
391
+ });
392
+ export const WithAriaLabel = withDescription('Use `aria-label` when no visible heading exists to reference via `aria-labelledby` and design requirements prevent showing a `<legend>`. The label is invisible to sighted users but fully accessible to screen readers.', {
393
+ parameters: {
394
+ controls: { disable: true },
395
+ docs: {
396
+ source: {
397
+ code: `
398
+ import { Fieldset, CheckboxInput } from '@arbor-education/design-system.components';
399
+
400
+ export default function AriaLabelFieldset() {
401
+ return (
402
+ <Fieldset aria-label="Trip consent options">
403
+ <CheckboxInput
404
+ id="trip-geography"
405
+ name="trip-consent"
406
+ label="Year 7 Geography field trip — 14 March"
407
+ />
408
+ <CheckboxInput
409
+ id="trip-science"
410
+ name="trip-consent"
411
+ label="Year 7 Science museum visit — 28 March"
412
+ />
413
+ <CheckboxInput
414
+ id="trip-drama"
415
+ name="trip-consent"
416
+ label="Year 7 Drama workshop — 4 April"
417
+ />
418
+ </Fieldset>
419
+ );
420
+ }
421
+ `.trim(),
422
+ },
423
+ },
424
+ },
425
+ render: () => (_jsxs(Fieldset, { "aria-label": "Trip consent options", children: [_jsx(CheckboxInput, { id: "trip-geography", name: "trip-consent", label: "Year 7 Geography field trip \u2014 14 March", onChange: () => { } }), _jsx(CheckboxInput, { id: "trip-science", name: "trip-consent", label: "Year 7 Science museum visit \u2014 28 March", onChange: () => { } }), _jsx(CheckboxInput, { id: "trip-drama", name: "trip-consent", label: "Year 7 Drama workshop \u2014 4 April", onChange: () => { } })] })),
426
+ });
427
+ export const Disabled = withDescription('Setting `disabled` on the Fieldset is the correct semantic approach to disabling an entire group. The browser propagates the disabled state to **all descendant form controls** automatically — no need to pass `disabled` to each child individually.', {
428
+ parameters: {
429
+ controls: { disable: true },
430
+ docs: {
431
+ source: {
432
+ code: `
433
+ import { Fieldset, RadioButtonInput } from '@arbor-education/design-system.components';
434
+
435
+ export default function DisabledFieldset() {
436
+ return (
437
+ // ONE disabled prop disables all three radio buttons:
438
+ <Fieldset legend="Notification preferences" disabled>
439
+ <RadioButtonInput
440
+ id="notif-all"
441
+ name="notif-freq"
442
+ value="all"
443
+ label="All notifications"
444
+ />
445
+ <RadioButtonInput
446
+ id="notif-urgent"
447
+ name="notif-freq"
448
+ value="urgent"
449
+ label="Urgent alerts only"
450
+ />
451
+ <RadioButtonInput
452
+ id="notif-none"
453
+ name="notif-freq"
454
+ value="none"
455
+ label="No notifications"
456
+ />
457
+ </Fieldset>
458
+ );
459
+ }
460
+ `.trim(),
461
+ },
462
+ },
463
+ },
464
+ render: () => (_jsxs(Fieldset, { legend: "Notification preferences", disabled: true, children: [_jsx(RadioButtonInput, { id: "notif-all", name: "notif-freq", value: "all", label: "All notifications" }), _jsx(RadioButtonInput, { id: "notif-urgent", name: "notif-freq", value: "urgent", label: "Urgent alerts only" }), _jsx(RadioButtonInput, { id: "notif-none", name: "notif-freq", value: "none", label: "No notifications" })] })),
465
+ });
466
+ export const DisabledWithCheckboxes = withDescription('The most visually compelling demonstration of the `disabled` prop — all checkboxes are greyed out and non-interactive with a single `disabled` on the fieldset. This is how Arbor locks consent forms during a pending approval workflow.', {
467
+ parameters: {
468
+ controls: { disable: true },
469
+ docs: {
470
+ source: {
471
+ code: `
472
+ import { Fieldset, CheckboxInput } from '@arbor-education/design-system.components';
473
+
474
+ export default function DisabledCheckboxesFieldset() {
475
+ return (
476
+ <Fieldset legend="Consent and permissions" disabled>
477
+ <CheckboxInput
478
+ id="consent-trips-dis"
479
+ name="consent"
480
+ label="Consent for school trips"
481
+ checked
482
+ onChange={() => {}}
483
+ />
484
+ <CheckboxInput
485
+ id="consent-photos-dis"
486
+ name="consent"
487
+ label="Consent for photographs"
488
+ checked
489
+ onChange={() => {}}
490
+ />
491
+ <CheckboxInput
492
+ id="consent-data-dis"
493
+ name="consent"
494
+ label="Consent for data sharing with partner schools"
495
+ onChange={() => {}}
496
+ />
497
+ <CheckboxInput
498
+ id="consent-medical-dis"
499
+ name="consent"
500
+ label="Consent to share medical information with trip supervisors"
501
+ onChange={() => {}}
502
+ />
503
+ </Fieldset>
504
+ );
505
+ }
506
+ `.trim(),
507
+ },
508
+ },
509
+ },
510
+ render: () => (_jsxs(Fieldset, { legend: "Consent and permissions", disabled: true, children: [_jsx(CheckboxInput, { id: "consent-trips-dis", name: "consent", label: "Consent for school trips", checked: true, onChange: () => { } }), _jsx(CheckboxInput, { id: "consent-photos-dis", name: "consent", label: "Consent for photographs", checked: true, onChange: () => { } }), _jsx(CheckboxInput, { id: "consent-data-dis", name: "consent", label: "Consent for data sharing with partner schools", onChange: () => { } }), _jsx(CheckboxInput, { id: "consent-medical-dis", name: "consent", label: "Consent to share medical information with trip supervisors", onChange: () => { } })] })),
511
+ });
512
+ export const DisabledWithRadioButtons = withDescription('Radio buttons inside a disabled fieldset are also non-interactive. Use this pattern when the selection has been locked — for example, after a parent has submitted a form that is now awaiting school staff approval.', {
513
+ parameters: {
514
+ controls: { disable: true },
515
+ docs: {
516
+ source: {
517
+ code: `
518
+ import { Fieldset, RadioButtonInput } from '@arbor-education/design-system.components';
519
+
520
+ export default function DisabledRadioFieldset() {
521
+ return (
522
+ <Fieldset legend="Dietary requirements" disabled>
523
+ <RadioButtonInput
524
+ id="diet-halal-dis"
525
+ name="diet"
526
+ value="halal"
527
+ label="Halal"
528
+ defaultChecked
529
+ />
530
+ <RadioButtonInput
531
+ id="diet-vegetarian-dis"
532
+ name="diet"
533
+ value="vegetarian"
534
+ label="Vegetarian"
535
+ />
536
+ <RadioButtonInput
537
+ id="diet-vegan-dis"
538
+ name="diet"
539
+ value="vegan"
540
+ label="Vegan"
541
+ />
542
+ <RadioButtonInput
543
+ id="diet-none-dis"
544
+ name="diet"
545
+ value="none"
546
+ label="No specific requirement"
547
+ />
548
+ </Fieldset>
549
+ );
550
+ }
551
+ `.trim(),
552
+ },
553
+ },
554
+ },
555
+ render: () => (_jsxs(Fieldset, { legend: "Dietary requirements", disabled: true, children: [_jsx(RadioButtonInput, { id: "diet-halal-dis", name: "diet", value: "halal", label: "Halal", defaultChecked: true }), _jsx(RadioButtonInput, { id: "diet-vegetarian-dis", name: "diet", value: "vegetarian", label: "Vegetarian" }), _jsx(RadioButtonInput, { id: "diet-vegan-dis", name: "diet", value: "vegan", label: "Vegan" }), _jsx(RadioButtonInput, { id: "diet-none-dis", name: "diet", value: "none", label: "No specific requirement" })] })),
556
+ });
51
557
  //# sourceMappingURL=Fieldset.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Fieldset.stories.js","sourceRoot":"","sources":["../../../../src/components/formField/fieldset/Fieldset.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,+BAA+B;IACtC,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE;QACV,MAAM,EAAE,QAAQ;KACjB;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,MAAM,EAAE;YACN,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,kCAAkC;SAChD;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,+CAA+C;SAC7D;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,KAAK;YACd,WAAW,EAAE,gEAAgE;SAC9E;KACF;CAC8B,CAAC;AAElC,eAAe,IAAI,CAAC;AAGpB,uCAAuC;AACvC,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,MAAM,EAAE,sBAAsB;QAC9B,QAAQ,EAAE,CACR,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,aACnE,KAAC,SAAS,IACR,EAAE,EAAC,YAAY,EACf,KAAK,EAAC,YAAY,EAClB,UAAU,EAAE;wBACV,WAAW,EAAE,uBAAuB;qBACrC,GACD,EACF,KAAC,SAAS,IACR,EAAE,EAAC,WAAW,EACd,KAAK,EAAC,WAAW,EACjB,UAAU,EAAE;wBACV,WAAW,EAAE,sBAAsB;qBACpC,GACD,IACE,CACP;KACF;CACF,CAAC;AACF,oBAAoB;AACpB,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE;QACJ,MAAM,EAAE,mBAAmB;QAC3B,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,CACR,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,aACnE,KAAC,SAAS,IACR,EAAE,EAAC,gBAAgB,EACnB,KAAK,EAAC,gBAAgB,EACtB,UAAU,EAAE;wBACV,WAAW,EAAE,wBAAwB;wBACrC,QAAQ,EAAE,IAAI;qBACf,GACD,EACF,KAAC,aAAa,IACZ,EAAE,EAAC,mBAAmB,EACtB,IAAI,EAAC,UAAU,EACf,KAAK,EAAC,UAAU,EAChB,KAAK,EAAC,mBAAmB,EACzB,QAAQ,EAAE,IAAI,GACd,EACF,KAAC,gBAAgB,IACf,EAAE,EAAC,gBAAgB,EACnB,IAAI,EAAC,UAAU,EACf,KAAK,EAAC,UAAU,EAChB,KAAK,EAAC,gBAAgB,EACtB,QAAQ,EAAE,IAAI,GACd,IACE,CACP;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"Fieldset.stories.js","sourceRoot":"","sources":["../../../../src/components/formField/fieldset/Fieldset.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,QAAQ,EACR,OAAO,IAAI,UAAU,EACrB,QAAQ,EACR,OAAO,IAAI,UAAU,EACrB,OAAO,EACP,QAAQ,EACR,KAAK,GAC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KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,CACZ,MAAC,QAAQ,IAAC,MAAM,EAAC,sBAAsB,EAAC,QAAQ,mBAC9C,KAAC,gBAAgB,IACf,EAAE,EAAC,gBAAgB,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,OAAO,EACb,KAAK,EAAC,OAAO,EACb,cAAc,SACd,EACF,KAAC,gBAAgB,IACf,EAAE,EAAC,qBAAqB,EACxB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,YAAY,EAClB,KAAK,EAAC,YAAY,GAClB,EACF,KAAC,gBAAgB,IACf,EAAE,EAAC,gBAAgB,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,OAAO,EACb,KAAK,EAAC,OAAO,GACb,EACF,KAAC,gBAAgB,IACf,EAAE,EAAC,eAAe,EAClB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,MAAM,EACZ,KAAK,EAAC,yBAAyB,GAC/B,IACO,CACZ;CACF,CACF,CAAC"}
@@ -1,7 +1,9 @@
1
1
  import { type FieldsetProps } from '../../../formField/fieldset/Fieldset';
2
2
  import { type CheckboxInputProps } from './CheckboxInput';
3
3
  export type CheckboxGroupProps = {
4
- options: CheckboxInputProps[];
4
+ options: (CheckboxInputProps & {
5
+ id: string;
6
+ })[];
5
7
  } & FieldsetProps;
6
8
  export declare const CheckboxGroup: (props: CheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
7
9
  export declare namespace CheckboxGroup {
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/formField/inputs/checkbox/CheckboxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B,GAAG,aAAa,CAAC;AAElB,eAAO,MAAM,aAAa,GAAI,OAAO,kBAAkB,4CAStD,CAAC;AAEF,yBAAiB,aAAa,CAAC;IAC7B,KAAY,KAAK,GAAG,kBAAkB,CAAC;CACxC"}
1
+ {"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/formField/inputs/checkbox/CheckboxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,CAAC,kBAAkB,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;CAClD,GAAG,aAAa,CAAC;AAElB,eAAO,MAAM,aAAa,GAAI,OAAO,kBAAkB,4CAStD,CAAC;AAEF,yBAAiB,aAAa,CAAC;IAC7B,KAAY,KAAK,GAAG,kBAAkB,CAAC;CACxC"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import classNames from 'classnames';
3
3
  import { useRef, useEffect } from 'react';
4
- import { Icon } from '../../../..';
4
+ import { Icon } from '../../../icon/Icon';
5
5
  export const CheckboxInput = (props) => {
6
6
  const { className, onChange, disabled, checked = false, indeterminate = false, label, ...rest } = props;
7
7
  const inputRef = useRef(null);
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxInput.js","sourceRoot":"","sources":["../../../../../src/components/formField/inputs/checkbox/CheckboxInput.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,SAAS,EAA4B,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAOnC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EA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,EACd,IAAI,EAAE,EAAE,EACR,KAAK,EAAE,SAAS,EAChB,SAAS,EAAC,yBAAyB,GACnC,CACH,GACI,EACN,KAAK,IAAI,CACR,eAAM,SAAS,EAAC,yBAAyB,YAAE,KAAK,GAAQ,CACzD,IACK,CACT,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"CheckboxInput.js","sourceRoot":"","sources":["../../../../../src/components/formField/inputs/checkbox/CheckboxInput.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,SAAS,EAA4B,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAO5C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE;IACzD,MAAM,EACJ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,OAAO,GAAG,KAAK,EACf,aAAa,GAAG,KAAK,EACrB,KAAK,EACL,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;IAEV,MAAM,QAAQ,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAEhD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;YACrB,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,aAAa,CAAC;QACjD,CAAC;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,MAAM,gBAAgB,GAAG,UAAU,CACjC,8BAA8B,EAC9B,SAAS,CACV,CAAC;IAEF,MAAM,QAAQ,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAEnD,IAAI,SAAS,GAAG,0DAA0D,CAAC;IAC3E,IAAI,QAAQ,EAAE,CAAC;QACb,IAAI,aAAa,EAAE,CAAC;YAClB,SAAS;kBACL,iEAAiE,CAAC;QACxE,CAAC;aACI,CAAC;YACJ,SAAS,GAAG,2D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