@arbor-education/design-system.components 0.14.0 → 0.16.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 (320) hide show
  1. package/.gather/skills/write-stories/SKILL.md +207 -271
  2. package/.storybook/preview.ts +5 -0
  3. package/CHANGELOG.md +27 -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/number/NumberInput.d.ts.map +1 -1
  60. package/dist/components/formField/inputs/number/NumberInput.js +14 -2
  61. package/dist/components/formField/inputs/number/NumberInput.js.map +1 -1
  62. package/dist/components/formField/inputs/number/NumberInput.test.js +21 -0
  63. package/dist/components/formField/inputs/number/NumberInput.test.js.map +1 -1
  64. package/dist/components/formField/inputs/radio/RadioButtonGroup.d.ts +6 -2
  65. package/dist/components/formField/inputs/radio/RadioButtonGroup.d.ts.map +1 -1
  66. package/dist/components/formField/inputs/radio/RadioButtonGroup.js.map +1 -1
  67. package/dist/components/formField/inputs/radio/RadioButtonInput.stories.d.ts.map +1 -1
  68. package/dist/components/formField/inputs/radio/RadioButtonInput.stories.js +61 -49
  69. package/dist/components/formField/inputs/radio/RadioButtonInput.stories.js.map +1 -1
  70. package/dist/components/formField/inputs/selectDropdown/SelectDropdown.stories.d.ts +188 -166
  71. package/dist/components/formField/inputs/selectDropdown/SelectDropdown.stories.d.ts.map +1 -1
  72. package/dist/components/formField/inputs/selectDropdown/SelectDropdown.stories.js +821 -160
  73. package/dist/components/formField/inputs/selectDropdown/SelectDropdown.stories.js.map +1 -1
  74. package/dist/components/formField/inputs/time/TimeInput.stories.d.ts +176 -22
  75. package/dist/components/formField/inputs/time/TimeInput.stories.d.ts.map +1 -1
  76. package/dist/components/formField/inputs/time/TimeInput.stories.js +851 -92
  77. package/dist/components/formField/inputs/time/TimeInput.stories.js.map +1 -1
  78. package/dist/components/formField/label/Label.stories.d.ts +54 -5
  79. package/dist/components/formField/label/Label.stories.d.ts.map +1 -1
  80. package/dist/components/formField/label/Label.stories.js +238 -4
  81. package/dist/components/formField/label/Label.stories.js.map +1 -1
  82. package/dist/components/icoText/IcoText.stories.d.ts +32 -6
  83. package/dist/components/icoText/IcoText.stories.d.ts.map +1 -1
  84. package/dist/components/icoText/IcoText.stories.js +309 -14
  85. package/dist/components/icoText/IcoText.stories.js.map +1 -1
  86. package/dist/components/kpiCard/KPICard.stories.d.ts +100 -2
  87. package/dist/components/kpiCard/KPICard.stories.d.ts.map +1 -1
  88. package/dist/components/kpiCard/KPICard.stories.js +354 -10
  89. package/dist/components/kpiCard/KPICard.stories.js.map +1 -1
  90. package/dist/components/kvpList/KVPList.stories.d.ts +57 -4
  91. package/dist/components/kvpList/KVPList.stories.d.ts.map +1 -1
  92. package/dist/components/kvpList/KVPList.stories.js +403 -10
  93. package/dist/components/kvpList/KVPList.stories.js.map +1 -1
  94. package/dist/components/modal/Modal.stories.d.ts +113 -9
  95. package/dist/components/modal/Modal.stories.d.ts.map +1 -1
  96. package/dist/components/modal/Modal.stories.js +633 -13
  97. package/dist/components/modal/Modal.stories.js.map +1 -1
  98. package/dist/components/modal/modalManager/ModalManager.stories.d.ts +34 -10
  99. package/dist/components/modal/modalManager/ModalManager.stories.d.ts.map +1 -1
  100. package/dist/components/modal/modalManager/ModalManager.stories.js +463 -85
  101. package/dist/components/modal/modalManager/ModalManager.stories.js.map +1 -1
  102. package/dist/components/pill/Pill.d.ts.map +1 -1
  103. package/dist/components/pill/Pill.js +1 -1
  104. package/dist/components/pill/Pill.js.map +1 -1
  105. package/dist/components/pill/Pill.stories.d.ts.map +1 -1
  106. package/dist/components/pill/Pill.stories.js +11 -13
  107. package/dist/components/pill/Pill.stories.js.map +1 -1
  108. package/dist/components/row/Row.stories.d.ts +1 -2
  109. package/dist/components/row/Row.stories.d.ts.map +1 -1
  110. package/dist/components/row/Row.stories.js +360 -50
  111. package/dist/components/row/Row.stories.js.map +1 -1
  112. package/dist/components/searchBar/SearchBar.stories.d.ts +52 -4
  113. package/dist/components/searchBar/SearchBar.stories.d.ts.map +1 -1
  114. package/dist/components/searchBar/SearchBar.stories.js +428 -36
  115. package/dist/components/searchBar/SearchBar.stories.js.map +1 -1
  116. package/dist/components/section/Section.stories.d.ts +11 -41
  117. package/dist/components/section/Section.stories.d.ts.map +1 -1
  118. package/dist/components/section/Section.stories.js +494 -56
  119. package/dist/components/section/Section.stories.js.map +1 -1
  120. package/dist/components/singleUser/SingleUser.stories.d.ts +5 -4
  121. package/dist/components/singleUser/SingleUser.stories.d.ts.map +1 -1
  122. package/dist/components/singleUser/SingleUser.stories.js +303 -31
  123. package/dist/components/singleUser/SingleUser.stories.js.map +1 -1
  124. package/dist/components/slideoverManager/SlideoverManager.stories.d.ts +32 -11
  125. package/dist/components/slideoverManager/SlideoverManager.stories.d.ts.map +1 -1
  126. package/dist/components/slideoverManager/SlideoverManager.stories.js +380 -84
  127. package/dist/components/slideoverManager/SlideoverManager.stories.js.map +1 -1
  128. package/dist/components/table/DSDefaultColDef.d.ts.map +1 -1
  129. package/dist/components/table/DSDefaultColDef.js +4 -3
  130. package/dist/components/table/DSDefaultColDef.js.map +1 -1
  131. package/dist/components/table/Table.d.ts +7 -1
  132. package/dist/components/table/Table.d.ts.map +1 -1
  133. package/dist/components/table/Table.js +12 -5
  134. package/dist/components/table/Table.js.map +1 -1
  135. package/dist/components/table/Table.stories.d.ts +3 -0
  136. package/dist/components/table/Table.stories.d.ts.map +1 -1
  137. package/dist/components/table/Table.stories.js +445 -3
  138. package/dist/components/table/Table.stories.js.map +1 -1
  139. package/dist/components/table/Table.test.js +184 -0
  140. package/dist/components/table/Table.test.js.map +1 -1
  141. package/dist/components/table/TableFooter.stories.d.ts +49 -0
  142. package/dist/components/table/TableFooter.stories.d.ts.map +1 -0
  143. package/dist/components/table/TableFooter.stories.js +137 -0
  144. package/dist/components/table/TableFooter.stories.js.map +1 -0
  145. package/dist/components/table/TableHeader.stories.d.ts +93 -0
  146. package/dist/components/table/TableHeader.stories.d.ts.map +1 -0
  147. package/dist/components/table/TableHeader.stories.js +176 -0
  148. package/dist/components/table/TableHeader.stories.js.map +1 -0
  149. package/dist/components/table/cellEditors/DateCellEditor.stories.d.ts +44 -0
  150. package/dist/components/table/cellEditors/DateCellEditor.stories.d.ts.map +1 -0
  151. package/dist/components/table/cellEditors/DateCellEditor.stories.js +186 -0
  152. package/dist/components/table/cellEditors/DateCellEditor.stories.js.map +1 -0
  153. package/dist/components/table/cellEditors/NumberCellEditor.d.ts +13 -0
  154. package/dist/components/table/cellEditors/NumberCellEditor.d.ts.map +1 -0
  155. package/dist/components/table/cellEditors/NumberCellEditor.js +35 -0
  156. package/dist/components/table/cellEditors/NumberCellEditor.js.map +1 -0
  157. package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.d.ts +40 -0
  158. package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.d.ts.map +1 -0
  159. package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.js +209 -0
  160. package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.js.map +1 -0
  161. package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.d.ts +48 -0
  162. package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.d.ts.map +1 -0
  163. package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.js +244 -0
  164. package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.js.map +1 -0
  165. package/dist/components/table/cellRenderers/CheckboxCellRenderer.d.ts.map +1 -1
  166. package/dist/components/table/cellRenderers/CheckboxCellRenderer.js +3 -1
  167. package/dist/components/table/cellRenderers/CheckboxCellRenderer.js.map +1 -1
  168. package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.d.ts +64 -0
  169. package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.d.ts.map +1 -0
  170. package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.js +241 -0
  171. package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.js.map +1 -0
  172. package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.d.ts +55 -0
  173. package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.d.ts.map +1 -0
  174. package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.js +245 -0
  175. package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.js.map +1 -0
  176. package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.d.ts +67 -0
  177. package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.d.ts.map +1 -0
  178. package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.js +221 -0
  179. package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.js.map +1 -0
  180. package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.d.ts +75 -0
  181. package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.d.ts.map +1 -0
  182. package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.js +270 -0
  183. package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.js.map +1 -0
  184. package/dist/components/table/columnFilters/BooleanFilter.stories.d.ts +57 -0
  185. package/dist/components/table/columnFilters/BooleanFilter.stories.d.ts.map +1 -0
  186. package/dist/components/table/columnFilters/BooleanFilter.stories.js +198 -0
  187. package/dist/components/table/columnFilters/BooleanFilter.stories.js.map +1 -0
  188. package/dist/components/table/columnFilters/TimeFilter.stories.d.ts +58 -0
  189. package/dist/components/table/columnFilters/TimeFilter.stories.d.ts.map +1 -0
  190. package/dist/components/table/columnFilters/TimeFilter.stories.js +207 -0
  191. package/dist/components/table/columnFilters/TimeFilter.stories.js.map +1 -0
  192. package/dist/components/table/pagination/PaginationPanel.stories.d.ts +113 -0
  193. package/dist/components/table/pagination/PaginationPanel.stories.d.ts.map +1 -0
  194. package/dist/components/table/pagination/PaginationPanel.stories.js +272 -0
  195. package/dist/components/table/pagination/PaginationPanel.stories.js.map +1 -0
  196. package/dist/components/table/tableControls/TableControls.stories.d.ts +151 -0
  197. package/dist/components/table/tableControls/TableControls.stories.d.ts.map +1 -0
  198. package/dist/components/table/tableControls/TableControls.stories.js +356 -0
  199. package/dist/components/table/tableControls/TableControls.stories.js.map +1 -0
  200. package/dist/components/table/tableControls/TableSettingsDropdown.d.ts +27 -1
  201. package/dist/components/table/tableControls/TableSettingsDropdown.d.ts.map +1 -1
  202. package/dist/components/table/tableControls/TableSettingsDropdown.js +53 -26
  203. package/dist/components/table/tableControls/TableSettingsDropdown.js.map +1 -1
  204. package/dist/components/table/tableControls/TableSettingsDropdown.test.d.ts +2 -0
  205. package/dist/components/table/tableControls/TableSettingsDropdown.test.d.ts.map +1 -0
  206. package/dist/components/table/tableControls/TableSettingsDropdown.test.js +178 -0
  207. package/dist/components/table/tableControls/TableSettingsDropdown.test.js.map +1 -0
  208. package/dist/components/tabs/Tabs.stories.d.ts +22 -4
  209. package/dist/components/tabs/Tabs.stories.d.ts.map +1 -1
  210. package/dist/components/tabs/Tabs.stories.js +398 -22
  211. package/dist/components/tabs/Tabs.stories.js.map +1 -1
  212. package/dist/components/tabs/TabsItem.stories.d.ts +54 -1
  213. package/dist/components/tabs/TabsItem.stories.d.ts.map +1 -1
  214. package/dist/components/tabs/TabsItem.stories.js +61 -9
  215. package/dist/components/tabs/TabsItem.stories.js.map +1 -1
  216. package/dist/components/toast/Toast.stories.d.ts +103 -10
  217. package/dist/components/toast/Toast.stories.d.ts.map +1 -1
  218. package/dist/components/toast/Toast.stories.js +409 -47
  219. package/dist/components/toast/Toast.stories.js.map +1 -1
  220. package/dist/components/toggle/Toggle.stories.d.ts +61 -46
  221. package/dist/components/toggle/Toggle.stories.d.ts.map +1 -1
  222. package/dist/components/toggle/Toggle.stories.js +311 -122
  223. package/dist/components/toggle/Toggle.stories.js.map +1 -1
  224. package/dist/components/tooltip/Tooltip.stories.d.ts +78 -6
  225. package/dist/components/tooltip/Tooltip.stories.d.ts.map +1 -1
  226. package/dist/components/tooltip/Tooltip.stories.js +413 -7
  227. package/dist/components/tooltip/Tooltip.stories.js.map +1 -1
  228. package/dist/components/tooltip/TooltipWrapper.stories.d.ts +71 -7
  229. package/dist/components/tooltip/TooltipWrapper.stories.d.ts.map +1 -1
  230. package/dist/components/tooltip/TooltipWrapper.stories.js +238 -10
  231. package/dist/components/tooltip/TooltipWrapper.stories.js.map +1 -1
  232. package/dist/index.css +27 -0
  233. package/dist/index.css.map +1 -1
  234. package/dist/index.d.ts +3 -2
  235. package/dist/index.d.ts.map +1 -1
  236. package/dist/index.js +3 -2
  237. package/dist/index.js.map +1 -1
  238. package/dist/utils/PopupParentContext.stories.d.ts +17 -0
  239. package/dist/utils/PopupParentContext.stories.d.ts.map +1 -0
  240. package/dist/utils/PopupParentContext.stories.js +266 -0
  241. package/dist/utils/PopupParentContext.stories.js.map +1 -0
  242. package/dist/utils/getDefaultPopupParent.d.ts.map +1 -1
  243. package/dist/utils/getDefaultPopupParent.js +6 -0
  244. package/dist/utils/getDefaultPopupParent.js.map +1 -1
  245. package/package.json +1 -1
  246. package/src/components/articleCard/ArticleCard.stories.tsx +524 -111
  247. package/src/components/avatar/Avatar.stories.tsx +504 -59
  248. package/src/components/avatarGroup/AvatarGroup.stories.tsx +977 -175
  249. package/src/components/banner/Banner.stories.tsx +7 -3
  250. package/src/components/card/Card.stories.tsx +466 -36
  251. package/src/components/combobox/Combobox.stories.tsx +867 -260
  252. package/src/components/datePicker/DatePicker.stories.tsx +777 -60
  253. package/src/components/dateTimePicker/DateTimePicker.stories.tsx +910 -132
  254. package/src/components/editableText/EditableText.stories.tsx +567 -91
  255. package/src/components/formField/FormField.test.tsx +6 -0
  256. package/src/components/formField/FormField.tsx +5 -0
  257. package/src/components/formField/fieldset/Fieldset.stories.tsx +761 -51
  258. package/src/components/formField/inputs/checkbox/CheckboxGroup.tsx +1 -1
  259. package/src/components/formField/inputs/checkbox/CheckboxInput.tsx +1 -1
  260. package/src/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.tsx +504 -11
  261. package/src/components/formField/inputs/number/NumberInput.test.tsx +28 -0
  262. package/src/components/formField/inputs/number/NumberInput.tsx +15 -0
  263. package/src/components/formField/inputs/radio/RadioButtonGroup.tsx +17 -4
  264. package/src/components/formField/inputs/radio/RadioButtonInput.stories.tsx +71 -59
  265. package/src/components/formField/inputs/selectDropdown/SelectDropdown.stories.tsx +1079 -168
  266. package/src/components/formField/inputs/time/TimeInput.stories.tsx +1140 -104
  267. package/src/components/formField/label/Label.stories.tsx +317 -8
  268. package/src/components/icoText/IcoText.stories.tsx +442 -31
  269. package/src/components/kpiCard/KPICard.stories.tsx +475 -30
  270. package/src/components/kvpList/KVPList.stories.tsx +593 -26
  271. package/src/components/modal/Modal.stories.tsx +963 -26
  272. package/src/components/modal/modalManager/ModalManager.stories.tsx +612 -454
  273. package/src/components/pill/Pill.stories.tsx +11 -13
  274. package/src/components/pill/Pill.tsx +1 -0
  275. package/src/components/row/Row.stories.tsx +474 -58
  276. package/src/components/searchBar/SearchBar.stories.tsx +570 -38
  277. package/src/components/section/Section.stories.tsx +723 -70
  278. package/src/components/singleUser/SingleUser.stories.tsx +393 -34
  279. package/src/components/slideoverManager/SlideoverManager.stories.tsx +572 -342
  280. package/src/components/table/DSDefaultColDef.ts +25 -5
  281. package/src/components/table/Table.stories.tsx +504 -3
  282. package/src/components/table/Table.test.tsx +255 -0
  283. package/src/components/table/Table.tsx +15 -2
  284. package/src/components/table/TableFooter.stories.tsx +196 -0
  285. package/src/components/table/TableHeader.stories.tsx +251 -0
  286. package/src/components/table/cellEditors/DateCellEditor.stories.tsx +245 -0
  287. package/src/components/table/cellEditors/NumberCellEditor.tsx +83 -0
  288. package/src/components/table/cellEditors/numberCellEditor.scss +11 -0
  289. package/src/components/table/cellRenderers/BooleanCellRenderer.stories.tsx +278 -0
  290. package/src/components/table/cellRenderers/ButtonCellRenderer.stories.tsx +333 -0
  291. package/src/components/table/cellRenderers/CheckboxCellRenderer.stories.tsx +337 -0
  292. package/src/components/table/cellRenderers/CheckboxCellRenderer.tsx +5 -1
  293. package/src/components/table/cellRenderers/DefaultCellRenderer.stories.tsx +342 -0
  294. package/src/components/table/cellRenderers/InlineTextCellRenderer.stories.tsx +292 -0
  295. package/src/components/table/cellRenderers/SelectDropdownCellRenderer.stories.tsx +369 -0
  296. package/src/components/table/columnFilters/BooleanFilter.stories.tsx +268 -0
  297. package/src/components/table/columnFilters/TimeFilter.stories.tsx +281 -0
  298. package/src/components/table/pagination/PaginationPanel.stories.tsx +327 -0
  299. package/src/components/table/table.scss +11 -0
  300. package/src/components/table/tableControls/TableControls.stories.tsx +415 -0
  301. package/src/components/table/tableControls/TableSettingsDropdown.test.tsx +207 -0
  302. package/src/components/table/tableControls/TableSettingsDropdown.tsx +103 -39
  303. package/src/components/tabs/Tabs.stories.tsx +540 -60
  304. package/src/components/tabs/TabsItem.stories.tsx +82 -8
  305. package/src/components/toast/Toast.stories.tsx +539 -77
  306. package/src/components/toggle/Toggle.stories.tsx +371 -135
  307. package/src/components/tooltip/Tooltip.stories.tsx +606 -15
  308. package/src/components/tooltip/TooltipWrapper.stories.tsx +348 -12
  309. package/src/docs/Contributing.mdx +241 -0
  310. package/src/docs/UsingComponents.mdx +93 -0
  311. package/src/docs/Welcome.mdx +68 -0
  312. package/src/global.scss +7 -0
  313. package/src/index.scss +1 -0
  314. package/src/index.ts +3 -2
  315. package/src/utils/PopupParentContext.stories.tsx +367 -0
  316. package/src/utils/getDefaultPopupParent.ts +6 -0
  317. package/.ralph/storybook-upgrade/knowledge.md +0 -308
  318. package/.ralph/storybook-upgrade/prd.json +0 -777
  319. package/.ralph/storybook-upgrade/progress.md +0 -342
  320. package/src/components/table/TableWIP.mdx +0 -3
@@ -1,18 +1,411 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
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';
2
3
  import { Progress } from '../progress/Progress';
3
4
  import { KVPList } from './KVPList';
5
+ // ---------------------------------------------------------------------------
6
+ // Docs page content
7
+ // ---------------------------------------------------------------------------
8
+ const DESCRIPTION_INTRO = [
9
+ '`KVPList` is a compound component for displaying structured key/value pair data.',
10
+ 'It uses semantic `<dl>/<dt>/<dd>` markup for accessibility and supports vertical or horizontal',
11
+ 'row layouts, two typographic prominence levels, and an optional percentage suffix.',
12
+ ].join(' ');
13
+ const ROW_PROPS = [
14
+ '| Prop | Type | Default | Description |',
15
+ '|---|---|---|---|',
16
+ '| `orientation` | `\'horizontal\' \\| \'vertical\'` | `\'vertical\'` | Vertical stacks term above definition; horizontal places them side by side |',
17
+ '| `className` | `string` | — | Additional CSS classes on the `<dl>` element |',
18
+ '| `...HTMLAttributes<dl>` | | | All standard `<dl>` attributes forwarded |',
19
+ ].join('\n');
20
+ const TERM_PROPS = [
21
+ '| Prop | Type | Default | Description |',
22
+ '|---|---|---|---|',
23
+ '| `children` | `ReactNode` | — | The key/label text |',
24
+ '| `className` | `string` | — | Additional CSS classes on the `<dt>` element |',
25
+ '| `...HTMLAttributes<dt>` | | | All standard element attributes forwarded |',
26
+ ].join('\n');
27
+ const DEFINITION_PROPS = [
28
+ '| Prop | Type | Default | Description |',
29
+ '|---|---|---|---|',
30
+ '| `children` | `ReactNode` | — | The value content |',
31
+ '| `isRow` | `boolean` | `false` | Makes the definition span the full row width |',
32
+ '| `isPercentage` | `boolean` | `false` | Appends a `%` suffix span. Do **not** also include `%` in `children` |',
33
+ '| `prominence` | `\'neutral\' \\| \'strong\'` | `\'neutral\'` | `neutral` = body text; `strong` = h2 typography |',
34
+ '| `className` | `string` | — | Additional CSS classes on the `<dd>` element |',
35
+ '| `...HTMLAttributes<dd>` | | | All standard element attributes forwarded |',
36
+ ].join('\n');
37
+ const USAGE_GUIDANCE = [
38
+ '### When to use',
39
+ '',
40
+ '- Displaying structured key/value data for one entity — student details, contact info, metric breakdowns',
41
+ '- Inside a `KPICard` as supplementary detail below the headline metric',
42
+ '- Detail panels, profile cards, and read-only form summaries',
43
+ '',
44
+ '---',
45
+ '',
46
+ '### When NOT to use',
47
+ '',
48
+ '| Situation | Use instead |',
49
+ '|---|---|',
50
+ '| A single dominant metric needing large typographic emphasis | [`KPICard`](?path=/docs/components-card-kpicard--docs) |',
51
+ '| Data with multiple records (rows/columns) | `<table>` with appropriate `<thead>/<tbody>` |',
52
+ '| Purely decorative label/value layout | Plain CSS grid — `KVPList` has specific accessibility semantics |',
53
+ ].join('\n');
54
+ const DEVELOPER_NOTES = [
55
+ '### Critical usage patterns',
56
+ '',
57
+ '**`role="group"` is conditional.** The `KVPList` root only adds `role="group"` when `aria-label`',
58
+ 'or `aria-labelledby` is provided. Without these, it is a plain `<div>`. Always provide `aria-label`',
59
+ 'when the list appears alongside other lists in a dashboard or detail panel.',
60
+ '',
61
+ '**`KVPList.Term` and `KVPList.Definition` must always be children of `KVPList.Row`.**',
62
+ 'They are `<dt>` and `<dd>` elements respectively — placing them outside a `<dl>` breaks HTML validity.',
63
+ '',
64
+ '**`isPercentage` adds "%" to the DOM** — it will be read aloud by screen readers.',
65
+ 'Do not also include "%" in your `children` content or you will render `"95%%"`.',
66
+ '',
67
+ '**`prominence="strong"` uses h2-scale typography but renders as `<dd>`.** This is intentional —',
68
+ 'the visual size is h2, but the semantic meaning is "definition in a definition list".',
69
+ 'Screen readers will not announce it as a heading.',
70
+ '',
71
+ '```tsx',
72
+ '<KVPList aria-label="Attendance summary">',
73
+ ' <KVPList.Row orientation="horizontal">',
74
+ ' <KVPList.Term>Overall attendance</KVPList.Term>',
75
+ ' <KVPList.Definition isPercentage prominence="strong">94.2</KVPList.Definition>',
76
+ ' </KVPList.Row>',
77
+ ' <KVPList.Row orientation="horizontal">',
78
+ ' <KVPList.Term>Autumn term</KVPList.Term>',
79
+ ' <KVPList.Definition isPercentage>96.1</KVPList.Definition>',
80
+ ' </KVPList.Row>',
81
+ '</KVPList>',
82
+ '```',
83
+ '',
84
+ '---',
85
+ '',
86
+ '### Accessibility',
87
+ '',
88
+ '- Provide `aria-label` on `KVPList` when it represents a named group — activates `role="group"`',
89
+ '- Use `aria-labelledby` when a visible heading is nearby — point to its `id`',
90
+ '- `KVPList.Term` (`dt`) and `KVPList.Definition` (`dd`) must be inside `KVPList.Row` (`dl`)',
91
+ '- `isPercentage` appends "%" to the DOM — never duplicate it in `children`',
92
+ '',
93
+ '---',
94
+ '',
95
+ '### TypeScript types',
96
+ '',
97
+ '```ts',
98
+ "import { KVPList } from '@arbor-education/design-system.components';",
99
+ "import type { KVPListProps, KVPListRowProps, KVPListTermProps, KVPListDefinitionProps } from '@arbor-education/design-system.components';",
100
+ '```',
101
+ ].join('\n');
102
+ const RELATED_COMPONENTS = [
103
+ '## Related components',
104
+ '',
105
+ '[KPICard](?path=/docs/components-card-kpicard--docs) · [Progress](?path=/docs/components-progress--docs) · [Card](?path=/docs/components-card--docs)',
106
+ ].join('\n');
107
+ const PROPS_INTRO = 'The preview below is wired to the **Controls** panel — tweak any prop to see the story update in real time.';
108
+ // ---------------------------------------------------------------------------
109
+ // Custom DocsPage
110
+ // ---------------------------------------------------------------------------
111
+ function KVPListDocsPage() {
112
+ 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: "KVPList.Row props" }), _jsx(Markdown, { children: ROW_PROPS }), _jsx(DocHeading, { children: "KVPList.Term props" }), _jsx(Markdown, { children: TERM_PROPS }), _jsx(DocHeading, { children: "KVPList.Definition props" }), _jsx(Markdown, { children: DEFINITION_PROPS }), _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 })] }));
113
+ }
114
+ // ---------------------------------------------------------------------------
115
+ // Meta
116
+ // ---------------------------------------------------------------------------
4
117
  const meta = {
5
118
  title: 'Components/KVPList',
6
119
  component: KVPList,
7
- };
8
- export const Summary = {
9
- render: args => (_jsx(KVPList, { ...args, "aria-label": "Attendance metrics", children: _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Attendance" }), _jsx(KVPList.Definition, { isPercentage: true, prominence: "strong", children: "95" })] }) })),
10
- };
11
- export const WithProgressAndPercentage = {
12
- render: args => (_jsx(KVPList, { ...args, "aria-label": "Attendance breakdown", children: _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Bar label text" }), _jsx(KVPList.Definition, { isPercentage: true, prominence: "neutral", children: "95" }), _jsx(KVPList.Definition, { "aria-hidden": "true", isRow: true, children: _jsx(Progress, { "aria-label": "Attendance progress", max: 100, value: 95 }) })] }) })),
13
- };
14
- export const WithProgressNoPercentage = {
15
- render: args => (_jsx(KVPList, { ...args, "aria-label": "Attendance breakdown without percentage", children: _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Bar label text" }), _jsx(KVPList.Definition, { prominence: "neutral", children: "X" }), _jsx(KVPList.Definition, { "aria-hidden": "true", isRow: true, children: _jsx(Progress, { "aria-label": "Attendance progress second", max: 100, value: 95 }) })] }) })),
120
+ tags: ['autodocs'],
121
+ parameters: {
122
+ layout: 'padded',
123
+ docs: { page: KVPListDocsPage },
124
+ },
125
+ argTypes: {
126
+ 'aria-label': {
127
+ control: 'text',
128
+ description: 'When provided, adds `role="group"` to the root `<div>`. Use when the list represents a named data group.',
129
+ table: { type: { summary: 'string' } },
130
+ },
131
+ 'aria-labelledby': {
132
+ control: false,
133
+ description: 'ID of a visible heading element. Alternative to `aria-label` when a visible label is already in the DOM.',
134
+ table: { type: { summary: 'string' } },
135
+ },
136
+ 'className': {
137
+ control: false,
138
+ description: 'Additional CSS class names on the root `div.ds-kvp-list` element.',
139
+ table: { type: { summary: 'string' } },
140
+ },
141
+ 'children': {
142
+ control: false,
143
+ description: 'Compose using `KVPList.Row`, `KVPList.Term`, and `KVPList.Definition` sub-components.',
144
+ table: { type: { summary: 'ReactNode' } },
145
+ },
146
+ },
16
147
  };
17
148
  export default meta;
149
+ // ---------------------------------------------------------------------------
150
+ // Helper: attach a per-story description to docs
151
+ // ---------------------------------------------------------------------------
152
+ const withDescription = (story, description) => ({
153
+ ...story,
154
+ parameters: {
155
+ ...story.parameters,
156
+ docs: { ...story.parameters?.docs, description: { story: description } },
157
+ },
158
+ });
159
+ // ---------------------------------------------------------------------------
160
+ // Template components
161
+ // ---------------------------------------------------------------------------
162
+ const MultipleRowsTemplate = () => (_jsxs(KVPList, { "aria-label": "Student attendance summary", children: [_jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Overall attendance" }), _jsx(KVPList.Definition, { isPercentage: true, prominence: "strong", children: "94.2" })] }), _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Autumn term" }), _jsx(KVPList.Definition, { isPercentage: true, children: "96.1" })] }), _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Spring term" }), _jsx(KVPList.Definition, { isPercentage: true, children: "93.4" })] }), _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Summer term" }), _jsx(KVPList.Definition, { isPercentage: true, children: "92.8" })] })] }));
163
+ const MixedOrientationsTemplate = () => (_jsxs(KVPList, { "aria-label": "Student profile", children: [_jsxs(KVPList.Row, { orientation: "vertical", children: [_jsx(KVPList.Term, { children: "Full name" }), _jsx(KVPList.Definition, { prominence: "strong", children: "Alice Johnson" })] }), _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Year group" }), _jsx(KVPList.Definition, { children: "Year 10" })] }), _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Form" }), _jsx(KVPList.Definition, { children: "10B" })] }), _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Attendance" }), _jsx(KVPList.Definition, { isPercentage: true, children: "94.2" })] })] }));
164
+ const WithProgressTemplate = () => (_jsx(KVPList, { "aria-label": "Attendance breakdown by year group", children: [
165
+ { label: 'Year 7', value: 96, progress: 96 },
166
+ { label: 'Year 8', value: 94, progress: 94 },
167
+ { label: 'Year 9', value: 91, progress: 91 },
168
+ { label: 'Year 10', value: 93, progress: 93 },
169
+ { label: 'Year 11', value: 89, progress: 89 },
170
+ ].map(({ label, value, progress }) => (_jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: label }), _jsx(KVPList.Definition, { isPercentage: true, children: value }), _jsx(KVPList.Definition, { "aria-hidden": "true", isRow: true, children: _jsx(Progress, { "aria-label": `${label} attendance`, max: 100, value: progress }) })] }, label))) }));
171
+ // ---------------------------------------------------------------------------
172
+ // Stories
173
+ // ---------------------------------------------------------------------------
174
+ export const Default = withDescription({
175
+ args: { 'aria-label': 'Student details' },
176
+ render: args => (_jsx(KVPList, { ...args, children: _jsxs(KVPList.Row, { orientation: "vertical", children: [_jsx(KVPList.Term, { children: "Student" }), _jsx(KVPList.Definition, { children: "Alice Johnson" })] }) })),
177
+ }, 'A single vertical row — term stacked above definition. The default `orientation="vertical"` and `prominence="neutral"` baseline.');
178
+ export const HorizontalOrientation = withDescription({
179
+ parameters: {
180
+ controls: { disable: true },
181
+ docs: {
182
+ source: {
183
+ language: 'tsx',
184
+ code: `
185
+ import { KVPList } from '@arbor-education/design-system.components';
186
+
187
+ function HorizontalOrientationExample() {
188
+ return (
189
+ <KVPList aria-label="Attendance summary">
190
+ <KVPList.Row orientation="horizontal">
191
+ <KVPList.Term>Attendance rate</KVPList.Term>
192
+ <KVPList.Definition isPercentage>94.2</KVPList.Definition>
193
+ </KVPList.Row>
194
+ </KVPList>
195
+ );
196
+ }
197
+ export default HorizontalOrientationExample;
198
+ `.trim(),
199
+ },
200
+ },
201
+ },
202
+ render: () => (_jsxs(KVPList, { "aria-label": "Attendance summary", children: [_jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Attendance rate" }), _jsx(KVPList.Definition, { isPercentage: true, children: "94.2" })] }), _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Sessions attended" }), _jsx(KVPList.Definition, { children: "342 of 364" })] })] })),
203
+ }, '`orientation="horizontal"` places the term and definition on the same line. The term takes `flex: 1` and the definition is right-aligned at `flex: 0 0 auto`.');
204
+ export const StrongProminence = withDescription({
205
+ parameters: {
206
+ controls: { disable: true },
207
+ docs: {
208
+ source: {
209
+ language: 'tsx',
210
+ code: `
211
+ import { KVPList } from '@arbor-education/design-system.components';
212
+
213
+ function StrongProminenceExample() {
214
+ return (
215
+ <KVPList aria-label="Key metric">
216
+ <KVPList.Row orientation="horizontal">
217
+ <KVPList.Term>Overall attendance</KVPList.Term>
218
+ <KVPList.Definition isPercentage prominence="strong">94.2</KVPList.Definition>
219
+ </KVPList.Row>
220
+ </KVPList>
221
+ );
222
+ }
223
+ export default StrongProminenceExample;
224
+ `.trim(),
225
+ },
226
+ },
227
+ },
228
+ render: () => (_jsxs(KVPList, { "aria-label": "Key metric", children: [_jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Overall attendance" }), _jsx(KVPList.Definition, { isPercentage: true, prominence: "strong", children: "94.2" })] }), _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Autumn term" }), _jsx(KVPList.Definition, { isPercentage: true, prominence: "neutral", children: "96.1" })] })] })),
229
+ }, '`prominence="strong"` applies h2-scale typography to the definition — rendered as `<dd>` semantically but visually dominant. Use for the primary metric value in a list; `"neutral"` for supporting context.');
230
+ export const IsRow = withDescription({
231
+ parameters: {
232
+ controls: { disable: true },
233
+ docs: {
234
+ source: {
235
+ language: 'tsx',
236
+ code: `
237
+ import { KVPList } from '@arbor-education/design-system.components';
238
+ import { Progress } from '@arbor-education/design-system.components';
239
+
240
+ function IsRowExample() {
241
+ return (
242
+ <KVPList aria-label="Attendance breakdown">
243
+ <KVPList.Row orientation="horizontal">
244
+ <KVPList.Term>Year 9</KVPList.Term>
245
+ <KVPList.Definition isPercentage>91</KVPList.Definition>
246
+ <KVPList.Definition aria-hidden="true" isRow>
247
+ <Progress aria-label="Year 9 attendance" max={100} value={91} />
248
+ </KVPList.Definition>
249
+ </KVPList.Row>
250
+ </KVPList>
251
+ );
252
+ }
253
+ export default IsRowExample;
254
+ `.trim(),
255
+ },
256
+ },
257
+ },
258
+ render: () => (_jsx(KVPList, { "aria-label": "Attendance breakdown", children: _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Year 9" }), _jsx(KVPList.Definition, { isPercentage: true, children: "91" }), _jsx(KVPList.Definition, { "aria-hidden": "true", isRow: true, children: _jsx(Progress, { "aria-label": "Year 9 attendance", max: 100, value: 91 }) })] }) })),
259
+ }, '`isRow=true` on a Definition makes it span the full row width (`flex-basis: 100%`). Use for long text values or embedded components like `Progress` that need the full horizontal space.');
260
+ export const AsPercentage = withDescription({
261
+ parameters: {
262
+ controls: { disable: true },
263
+ docs: {
264
+ source: {
265
+ language: 'tsx',
266
+ code: `
267
+ import { KVPList } from '@arbor-education/design-system.components';
268
+
269
+ function AsPercentageExample() {
270
+ return (
271
+ <KVPList aria-label="Session attendance">
272
+ <KVPList.Row orientation="horizontal">
273
+ <KVPList.Term>Present</KVPList.Term>
274
+ {/* isPercentage adds "%" — do NOT also include "%" in children */}
275
+ <KVPList.Definition isPercentage>94.2</KVPList.Definition>
276
+ </KVPList.Row>
277
+ </KVPList>
278
+ );
279
+ }
280
+ export default AsPercentageExample;
281
+ `.trim(),
282
+ },
283
+ },
284
+ },
285
+ render: () => (_jsxs(KVPList, { "aria-label": "Session attendance", children: [_jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Present" }), _jsx(KVPList.Definition, { isPercentage: true, children: "94.2" })] }), _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Authorised absence" }), _jsx(KVPList.Definition, { isPercentage: true, children: "3.1" })] }), _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Unauthorised absence" }), _jsx(KVPList.Definition, { isPercentage: true, children: "2.7" })] })] })),
286
+ }, '`isPercentage=true` appends a `%` suffix span after the definition content. The `%` is part of the DOM and will be read by screen readers — never also include `%` in `children`.');
287
+ export const MultipleRows = withDescription({
288
+ parameters: {
289
+ controls: { disable: true },
290
+ docs: {
291
+ source: {
292
+ language: 'tsx',
293
+ code: `
294
+ import { KVPList } from '@arbor-education/design-system.components';
295
+
296
+ function MultipleRowsExample() {
297
+ return (
298
+ <KVPList aria-label="Student attendance summary">
299
+ <KVPList.Row orientation="horizontal">
300
+ <KVPList.Term>Overall attendance</KVPList.Term>
301
+ <KVPList.Definition isPercentage prominence="strong">94.2</KVPList.Definition>
302
+ </KVPList.Row>
303
+ <KVPList.Row orientation="horizontal">
304
+ <KVPList.Term>Autumn term</KVPList.Term>
305
+ <KVPList.Definition isPercentage>96.1</KVPList.Definition>
306
+ </KVPList.Row>
307
+ <KVPList.Row orientation="horizontal">
308
+ <KVPList.Term>Spring term</KVPList.Term>
309
+ <KVPList.Definition isPercentage>93.4</KVPList.Definition>
310
+ </KVPList.Row>
311
+ </KVPList>
312
+ );
313
+ }
314
+ export default MultipleRowsExample;
315
+ `.trim(),
316
+ },
317
+ },
318
+ },
319
+ render: MultipleRowsTemplate,
320
+ }, 'The most common production pattern — several horizontal rows with one `prominence="strong"` value at the top for the headline metric, followed by `"neutral"` breakdown rows.');
321
+ export const MixedOrientations = withDescription({
322
+ parameters: {
323
+ controls: { disable: true },
324
+ docs: {
325
+ source: {
326
+ language: 'tsx',
327
+ code: `
328
+ import { KVPList } from '@arbor-education/design-system.components';
329
+
330
+ function MixedOrientationsExample() {
331
+ return (
332
+ <KVPList aria-label="Student profile">
333
+ <KVPList.Row orientation="vertical">
334
+ <KVPList.Term>Full name</KVPList.Term>
335
+ <KVPList.Definition prominence="strong">Alice Johnson</KVPList.Definition>
336
+ </KVPList.Row>
337
+ <KVPList.Row orientation="horizontal">
338
+ <KVPList.Term>Year group</KVPList.Term>
339
+ <KVPList.Definition>Year 10</KVPList.Definition>
340
+ </KVPList.Row>
341
+ </KVPList>
342
+ );
343
+ }
344
+ export default MixedOrientationsExample;
345
+ `.trim(),
346
+ },
347
+ },
348
+ },
349
+ render: MixedOrientationsTemplate,
350
+ }, 'Vertical and horizontal rows can be mixed freely within the same list. Vertical orientation (term above definition) suits long values or primary identity fields; horizontal suits compact metric rows.');
351
+ export const WithAriaLabel = withDescription({
352
+ parameters: {
353
+ controls: { disable: true },
354
+ docs: {
355
+ source: {
356
+ language: 'tsx',
357
+ code: `
358
+ import { KVPList } from '@arbor-education/design-system.components';
359
+
360
+ function WithAriaLabelExample() {
361
+ return (
362
+ // aria-label activates role="group" on the root div
363
+ <KVPList aria-label="Contact details">
364
+ <KVPList.Row orientation="horizontal">
365
+ <KVPList.Term>Email</KVPList.Term>
366
+ <KVPList.Definition>alice.johnson@school.edu</KVPList.Definition>
367
+ </KVPList.Row>
368
+ <KVPList.Row orientation="horizontal">
369
+ <KVPList.Term>Phone</KVPList.Term>
370
+ <KVPList.Definition>01234 567890</KVPList.Definition>
371
+ </KVPList.Row>
372
+ </KVPList>
373
+ );
374
+ }
375
+ export default WithAriaLabelExample;
376
+ `.trim(),
377
+ },
378
+ },
379
+ },
380
+ render: () => (_jsxs(KVPList, { "aria-label": "Contact details", children: [_jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Email" }), _jsx(KVPList.Definition, { children: "alice.johnson@school.edu" })] }), _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Phone" }), _jsx(KVPList.Definition, { children: "01234 567890" })] }), _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Key stage" }), _jsx(KVPList.Definition, { children: "Key Stage 4" })] })] })),
381
+ }, 'Providing `aria-label` activates `role="group"` on the root `<div>`, giving screen readers a navigable group landmark. Without `aria-label`, the root is a plain `<div>` with no group semantics.');
382
+ export const WithProgressBars = withDescription({
383
+ parameters: {
384
+ controls: { disable: true },
385
+ docs: {
386
+ source: {
387
+ language: 'tsx',
388
+ code: `
389
+ import { KVPList, Progress } from '@arbor-education/design-system.components';
390
+
391
+ function WithProgressBarsExample() {
392
+ return (
393
+ <KVPList aria-label="Attendance by year group">
394
+ <KVPList.Row orientation="horizontal">
395
+ <KVPList.Term>Year 7</KVPList.Term>
396
+ <KVPList.Definition isPercentage>96</KVPList.Definition>
397
+ <KVPList.Definition aria-hidden="true" isRow>
398
+ <Progress aria-label="Year 7 attendance" max={100} value={96} />
399
+ </KVPList.Definition>
400
+ </KVPList.Row>
401
+ </KVPList>
402
+ );
403
+ }
404
+ export default WithProgressBarsExample;
405
+ `.trim(),
406
+ },
407
+ },
408
+ },
409
+ render: WithProgressTemplate,
410
+ }, 'A `Progress` bar embedded via `isRow` on a Definition spans the full row width. The progress bar is `aria-hidden="true"` since the percentage value in the preceding Definition already conveys the data to screen readers.');
18
411
  //# sourceMappingURL=KVPList.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"KVPList.stories.js","sourceRoot":"","sources":["../../../src/components/kvpList/KVPList.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,OAAO;CACY,CAAC;AAIjC,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,CACd,KAAC,OAAO,OAAK,IAAI,gBAAa,oBAAoB,YAChD,MAAC,OAAO,CAAC,GAAG,IAAC,WAAW,EAAC,YAAY,aACnC,KAAC,OAAO,CAAC,IAAI,6BAA0B,EACvC,KAAC,OAAO,CAAC,UAAU,IAAC,YAAY,QAAC,UAAU,EAAC,QAAQ,mBAAwB,IAChE,GACN,CACX;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAy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1,13 +1,117 @@
1
- import type { Meta } from '@storybook/react-vite';
2
- import { Modal, type ModalProps } from './Modal';
3
- declare const meta: Meta<typeof Modal>;
4
- export declare const Default: {
5
- args: {
6
- open: boolean;
7
- closeHandler: import("@vitest/spy").Mock<(...args: any[]) => any>;
8
- title: string;
1
+ import type { StoryObj } from '@storybook/react-vite';
2
+ declare function ModalDocsPage(): import("react/jsx-runtime").JSX.Element;
3
+ declare const meta: {
4
+ title: string;
5
+ component: {
6
+ (props: import("./Modal").ModalProps): import("react/jsx-runtime").JSX.Element;
7
+ Header: (props: import("./ModalHeader").ModalHeaderProps) => import("react/jsx-runtime").JSX.Element;
8
+ Body: (props: import("./ModalBody").ModalBodyProps) => import("react/jsx-runtime").JSX.Element;
9
+ Footer: (props: import("./ModalFooter").ModalFooterProps) => import("react/jsx-runtime").JSX.Element;
10
+ CloseButton: (props: import("../button/Button").ButtonProps) => import("react/jsx-runtime").JSX.Element | null;
11
+ Title: (props: import("@radix-ui/react-dialog").DialogTitleProps) => import("react/jsx-runtime").JSX.Element;
12
+ };
13
+ parameters: {
14
+ layout: string;
15
+ docs: {
16
+ page: typeof ModalDocsPage;
17
+ };
18
+ };
19
+ tags: string[];
20
+ argTypes: {
21
+ open: {
22
+ control: "boolean";
23
+ description: string;
24
+ table: {
25
+ type: {
26
+ summary: string;
27
+ };
28
+ defaultValue: {
29
+ summary: string;
30
+ };
31
+ };
32
+ };
33
+ closeHandler: {
34
+ control: false;
35
+ description: string;
36
+ table: {
37
+ type: {
38
+ summary: string;
39
+ };
40
+ defaultValue: {
41
+ summary: string;
42
+ };
43
+ };
44
+ };
45
+ hideCloseButton: {
46
+ control: "boolean";
47
+ description: string;
48
+ table: {
49
+ type: {
50
+ summary: string;
51
+ };
52
+ defaultValue: {
53
+ summary: string;
54
+ };
55
+ };
56
+ };
57
+ title: {
58
+ control: "text";
59
+ description: string;
60
+ table: {
61
+ type: {
62
+ summary: string;
63
+ };
64
+ defaultValue: {
65
+ summary: string;
66
+ };
67
+ };
68
+ };
69
+ className: {
70
+ control: "text";
71
+ description: string;
72
+ table: {
73
+ type: {
74
+ summary: string;
75
+ };
76
+ defaultValue: {
77
+ summary: string;
78
+ };
79
+ };
80
+ };
81
+ overlayClassName: {
82
+ control: "text";
83
+ description: string;
84
+ table: {
85
+ type: {
86
+ summary: string;
87
+ };
88
+ defaultValue: {
89
+ summary: string;
90
+ };
91
+ };
92
+ };
93
+ portalTarget: {
94
+ control: false;
95
+ description: string;
96
+ table: {
97
+ type: {
98
+ summary: string;
99
+ };
100
+ defaultValue: {
101
+ summary: string;
102
+ };
103
+ };
104
+ };
9
105
  };
10
- render: (args: ModalProps) => import("react/jsx-runtime").JSX.Element;
11
106
  };
12
107
  export default meta;
108
+ type Story = StoryObj<typeof meta>;
109
+ export declare const Default: Story;
110
+ export declare const NoCloseHandler: Story;
111
+ export declare const HideCloseButton: Story;
112
+ export declare const ManualHeaderComposition: Story;
113
+ export declare const LongScrollingContent: Story;
114
+ export declare const WithFormContent: Story;
115
+ export declare const DeleteConfirmation: Story;
116
+ export declare const WithDropdownInsideModal: Story;
13
117
  //# sourceMappingURL=Modal.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.stories.d.ts","sourceRoot":"","sources":["../../../src/components/modal/Modal.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAIjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAI5B,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;mBAMH,UAAU;CAgB1B,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Modal.stories.d.ts","sourceRoot":"","sources":["../../../src/components/modal/Modal.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAgI5D,iBAAS,aAAa,4CAmBrB;AAMD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8EoB,CAAC;AAE/B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAoVnC,eAAO,MAAM,OAAO,EAAE,KAwCrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAgD5B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA6C7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KAmDrC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAyClC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA+D7B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KA6ChC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KAmDrC,CAAC"}