@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
@@ -34,6 +34,10 @@ export declare const Table: {
34
34
  ButtonCellRenderer: (props: import("ag-grid-react").CustomCellRendererProps<any, any, any> & {
35
35
  value: import("../button/Button").ButtonProps;
36
36
  }) => import("react/jsx-runtime").JSX.Element;
37
+ InlineTextCellRenderer: (props: import("ag-grid-react").CustomCellRendererProps<any, any, any> & {
38
+ value: string;
39
+ }) => import("react/jsx-runtime").JSX.Element;
40
+ SelectDropdownCellRenderer: (props: import("ag-grid-react").CustomCellRendererProps<any, any, any> & import("../formField/inputs/selectDropdown/SelectDropdown").SelectDropdownInputProps) => import("react/jsx-runtime").JSX.Element;
37
41
  BooleanCellRenderer: (props: import("ag-grid-react").CustomCellRendererProps) => import("react/jsx-runtime").JSX.Element | null;
38
42
  DefaultCellRenderer: (props: import("ag-grid-react").CustomCellRendererProps) => import("react/jsx-runtime").JSX.Element;
39
43
  DateCellEditor: (props: import("ag-grid-react").CustomCellEditorProps) => import("react/jsx-runtime").JSX.Element;
@@ -41,9 +45,10 @@ export declare const Table: {
41
45
  GridApiContext: import("react").Context<GridApi<any> | null>;
42
46
  CheckboxCellRenderer: (props: import("ag-grid-react").CustomCellRendererProps) => import("react/jsx-runtime").JSX.Element;
43
47
  DefaultValueFormatter: import("ag-grid-enterprise").ValueFormatterFunc<any, any, any>;
44
- TableSettingsDropdown: () => import("react/jsx-runtime").JSX.Element;
48
+ TableSettingsDropdown: ({ items }: import("./tableControls/TableSettingsDropdown").TableSettingsDropdownProps) => import("react/jsx-runtime").JSX.Element;
45
49
  TableControls: (props: TableControlsProps) => import("react/jsx-runtime").JSX.Element | null;
46
50
  Spacing: typeof TABLE_SPACING;
51
+ SettingsItems: readonly ["tableSpacing", "separator", "style"];
47
52
  };
48
53
  export declare namespace Table {
49
54
  type Props<TData = any> = TableProps<TData>;
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGnE,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAUzD,OAAO,EAAoB,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAcnF,OAAO,EAAiB,KAAK,kBAAkB,EAAE,KAAK,UAAU,IAAI,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC1H,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAO9C,KAAK,UAAU,CAAC,KAAK,GAAG,GAAG,IAAI;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wCAAwC,CAAC,EAAE,OAAO,CAAC;IACnD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,GAAG,sBAAsB,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAMrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,eAAO,MAAM,KAAK;YAAW,UAAU;;;;;;;;;;;;;;;;;;;;;;;;CAyJtC,CAAC;AAqBF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ChC,GAAG,sBAAsB,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAMrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,eAAO,MAAM,KAAK;YAAW,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4JtC,CAAC;AAwBF,yBAAiB,KAAK,CAAC;IAErB,KAAY,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IACnD,KAAY,aAAa,GAAG,kBAAkB,CAAC;IAC/C,KAAY,UAAU,GAAG,cAAc,CAAC;IACxC,KAAY,gBAAgB,GAAG,wBAAwB,CAAC;IACxD,KAAY,OAAO,GAAG,aAAa,CAAC;CACrC"}
@@ -3,7 +3,7 @@ import { AllEnterpriseModule, ModuleRegistry } from 'ag-grid-enterprise';
3
3
  import { AgGridReact } from 'ag-grid-react';
4
4
  import { defaultTheme } from './theme/defaultTheme';
5
5
  import classNames from 'classnames';
6
- import { useRef, useState } from 'react';
6
+ import { useContext, useRef, useState } from 'react';
7
7
  import { TableFooter } from './TableFooter';
8
8
  import { TableHeader } from './TableHeader';
9
9
  import { GridApiContext } from './GridApiContext';
@@ -15,6 +15,7 @@ import { BulkActionsDropdown } from './tableControls/BulkActionsDropdown';
15
15
  import { HideColumnsDropdown } from './tableControls/HideColumnsDropdown';
16
16
  import { useTableSettings } from './useTableSettings';
17
17
  import { setAgGridLicenseKey } from '../../utils/setAgGridLicenseKey';
18
+ import { PopupParentContext } from '../../utils/PopupParentContext';
18
19
  import { toggleRowSelectionInCurrentRange } from './toggleRowSelectionInCurrentRange';
19
20
  import { defaultValueFormatter, DSDefaultColDef, shouldSuppressFocus } from './DSDefaultColDef';
20
21
  import { NumberCellEditor } from './cellEditors/NumberCellEditor';
@@ -26,7 +27,7 @@ import { focusFirstFocusableElement } from '../../utils/focusFirstFocusableEleme
26
27
  import { BooleanFilter } from './columnFilters/BooleanFilter/BooleanFilter';
27
28
  import { TimeFilter } from './columnFilters/TimeFilter/TimeFilter';
28
29
  import { DateCellEditor } from './cellEditors/DateCellEditor';
29
- import { TableSettingsDropdown } from './tableControls/TableSettingsDropdown';
30
+ import { TableSettingsDropdown, TABLE_SETTINGS_ITEMS } from './tableControls/TableSettingsDropdown';
30
31
  import { TableControls } from './tableControls/TableControls';
31
32
  import { TABLE_SPACING } from './tableConsts';
32
33
  import { TableSettingsContext } from './TableSettingsContext';
@@ -40,6 +41,7 @@ export const Table = (props) => {
40
41
  const { 'data-testid': testId, wrapperClassName, headerContent, headerTestId, hasSearch = true, footerContent, footerTestId, onGridReady, onTableSettingsChanged, onTableSettingsReset, onColumnBordersChanged, onTableSpacingChanged, onCellColorsChanged, enableSimultaneousRangeAndRowSelection = false, disableDragSelect = false, onCellSelectionChanged, defaultColDef = {}, context = {}, components = {}, tableTheme, onCellFocused, verticalHeaderText = false, className: propsClassName, ...rest } = props;
41
42
  const [gridApi, setGridApi] = useState(null);
42
43
  const [searchValue, setSearchValue] = useState('');
44
+ const popupParentRef = useContext(PopupParentContext);
43
45
  const { settings, resetSettings, setHasColumnBorders, setTableSpacing, setAreCellColorsEnabled, } = useTableSettings({
44
46
  onTableSettingsChanged,
45
47
  onTableSettingsReset,
@@ -72,7 +74,7 @@ export const Table = (props) => {
72
74
  setHasColumnBorders,
73
75
  setTableSpacing,
74
76
  setAreCellColorsEnabled,
75
- }, children: _jsxs("section", { "data-testid": testId, className: classNames('ds-table__container', wrapperClassName), onMouseDown: () => { isUsingKeyboardRef.current = false; }, onMouseUp: () => { isUsingKeyboardRef.current = false; }, onMouseMove: () => { isUsingKeyboardRef.current = false; }, onKeyDown: () => { isUsingKeyboardRef.current = true; }, onKeyUp: () => { isUsingKeyboardRef.current = true; }, children: [headerContent && (_jsx(TableHeader, { "data-testid": headerTestId, hasSearch: hasSearch, searchValue: searchValue, setSearchValue: setSearchValue, children: headerContent })), _jsx(AgGridReact, { theme: getTheme(), onGridReady: (event) => {
77
+ }, children: _jsxs("section", { "data-testid": testId, className: classNames('ds-table__container', wrapperClassName), onMouseDown: () => { isUsingKeyboardRef.current = false; }, onMouseUp: () => { isUsingKeyboardRef.current = false; }, onMouseMove: () => { isUsingKeyboardRef.current = false; }, onKeyDown: () => { isUsingKeyboardRef.current = true; }, onKeyUp: () => { isUsingKeyboardRef.current = true; }, children: [headerContent && (_jsx(TableHeader, { "data-testid": headerTestId, hasSearch: hasSearch, searchValue: searchValue, setSearchValue: setSearchValue, children: headerContent })), _jsx(AgGridReact, { theme: getTheme(), popupParent: popupParentRef.current, onGridReady: (event) => {
76
78
  const { api } = event;
77
79
  setGridApi(api);
78
80
  onGridReady?.(event);
@@ -111,6 +113,8 @@ Table.RowCountInfo = RowCountInfo;
111
113
  Table.BulkActionsDropdown = BulkActionsDropdown;
112
114
  Table.HideColumnsDropdown = HideColumnsDropdown;
113
115
  Table.ButtonCellRenderer = ButtonCellRenderer;
116
+ Table.InlineTextCellRenderer = InlineTextCellRenderer;
117
+ Table.SelectDropdownCellRenderer = SelectDropdownCellRenderer;
114
118
  Table.BooleanCellRenderer = BooleanCellRenderer;
115
119
  Table.DefaultCellRenderer = DefaultCellRenderer;
116
120
  Table.DateCellEditor = DateCellEditor;
@@ -121,4 +125,5 @@ Table.DefaultValueFormatter = defaultValueFormatter;
121
125
  Table.TableSettingsDropdown = TableSettingsDropdown;
122
126
  Table.TableControls = TableControls;
123
127
  Table.Spacing = TABLE_SPACING;
128
+ Table.SettingsItems = TABLE_SETTINGS_ITEMS;
124
129
  //# sourceMappingURL=Table.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../src/components/table/Table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAgB,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,UAAU,MAAM,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AC,aAAa,GAAG,oBAAoB,CAAC"}
@@ -15,6 +15,7 @@ export declare const WithTableControls: Story;
15
15
  export declare const WithTableControlsStartGroupOnly: Story;
16
16
  export declare const WithTableControlsEndGroupOnly: Story;
17
17
  export declare const WithHideColumnsDropdown: Story;
18
+ export declare const WithInitiallyHiddenColumns: Story;
18
19
  export declare const WithRestrictedHideColumnsDropdown: Story;
19
20
  export declare const WithClientSidePagination: StoryObj<TableProps>;
20
21
  export declare const WithServerSidePagination: StoryObj<TableProps>;
@@ -30,6 +31,8 @@ export declare const TableWithExplicitColours: Story;
30
31
  export declare const TableWithSemanticColors: Story;
31
32
  export declare const WithDateCellEditor: Story;
32
33
  export declare const WithBooleanCellRenderer: Story;
34
+ export declare const WithTableSettingsDropdownItems: Story;
35
+ export declare const WithTableSettingsDropdownCustomItems: Story;
33
36
  export declare const WithCheckboxCellRenderer: Story;
34
37
  export default meta;
35
38
  //# sourceMappingURL=Table.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../src/components/table/Table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAmBtD,KAAK,UAAU,GAAG,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC;AAE/C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAY1B,CAAC;AAEF,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AA4NpC,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAoBpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KASxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAoBxB,CAAC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,eAAO,MAAM,wDAAwD,EAAE,QAAQ,CAAC,UAAU,CA0HvF,CAAC;AAEJ,eAAO,MAAM,0BAA0B,EAAE,KAkBxC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KA0E1B,CAAC;AA0BF,eAAO,MAAM,cAAc,EAAE,KAiB5B,CAAC;AA8BF,eAAO,MAAM,0BAA0B,EAAE,KAiBxC,CAAC;AAwJF,eAAO,MAAM,SAAS,EAAE,KAiCvB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAsHtC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KA0DrC,CAAC;AAoFF,eAAO,MAAM,kBAAkB,EAAE,KAkBhC,CAAC;AAiCF,eAAO,MAAM,uBAAuB,EAAE,KAerC,CAAC;AAiFF,eAAO,MAAM,8BAA8B,EAAE,KAoB5C,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,KA8ClD,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAetC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -1,4 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { fn } from '@storybook/test';
3
+ import { Controls, Heading as DocHeading, Markdown, Primary as DocPrimary, Stories, Subtitle, Title, } from '@storybook/addon-docs/blocks';
2
4
  import {} from 'ag-grid-enterprise';
3
5
  import { Table } from './Table';
4
6
  import { Button } from '../button/Button';
@@ -12,14 +14,317 @@ import { Modal } from '../modal/Modal';
12
14
  import { ModalUtils } from '../../utils/ModalUtils';
13
15
  import { BooleanFilter, doesBooleanFilterPass, } from './columnFilters/BooleanFilter/BooleanFilter';
14
16
  import { doesTimeFilterPass, TimeFilter, } from './columnFilters/TimeFilter/TimeFilter';
17
+ // ---------------------------------------------------------------------------
18
+ // Content strings for the custom DocsPage
19
+ // ---------------------------------------------------------------------------
20
+ const DESCRIPTION_INTRO = [
21
+ '`Table` is an enterprise-grade data table built on top of [AG Grid React](https://www.ag-grid.com/react-data-grid/).',
22
+ 'It wraps `AgGridReact` with Arbor design tokens, a custom theme, built-in search, pagination, bulk actions,',
23
+ 'hide-columns, and a suite of custom cell renderers and column filters.',
24
+ 'All AG Grid props pass through via `...rest`, so the full AG Grid API is available.',
25
+ ].join(' ');
26
+ const PROPS_INTRO = 'The preview below is wired to the **Controls** panel — tweak any DS-specific prop to see the story update in real time.';
27
+ const USAGE_GUIDANCE = [
28
+ '### When to use',
29
+ '',
30
+ '- Displaying large, structured datasets where users need to sort, filter, search, or paginate.',
31
+ '- Any screen in Arbor that renders rows of records (pupil lists, staff registers, attendance grids, marksheets).',
32
+ '- When cells need interactive controls — buttons, dropdowns, checkboxes, date pickers.',
33
+ '- When column visibility, row selection, and bulk actions are required.',
34
+ '',
35
+ '---',
36
+ '',
37
+ '### When NOT to use',
38
+ '',
39
+ '| Situation | Use instead |',
40
+ '|---|---|',
41
+ '| A small read-only list of key–value pairs | [`Section`](?path=/docs/components-section--docs) with [`Row`](?path=/docs/components-row--docs) components |',
42
+ '| A two-column data summary (label + value) | [`Row`](?path=/docs/components-row--docs) inside a `Section` |',
43
+ '| Simple static HTML tables | Native `<table>` with semantic markup |',
44
+ '| A handful of rows that never change | Native `<table>` — AG Grid has overhead |',
45
+ ].join('\n');
46
+ const DEVELOPER_NOTES = [
47
+ '### AG Grid license',
48
+ '',
49
+ '`setAgGridLicenseKey()` is called automatically inside the `Table` component.',
50
+ 'You do **not** need to call it yourself.',
51
+ '',
52
+ '---',
53
+ '',
54
+ '### Registered cell renderers',
55
+ '',
56
+ 'These string keys are pre-registered and available in any `cellRenderer` or `cellRendererParams`:',
57
+ '',
58
+ '| Key | Component | Purpose |',
59
+ '|---|---|---|',
60
+ '| `dsButtonCellRenderer` | `Table.ButtonCellRenderer` | Renders a `Button` inside a cell |',
61
+ '| `dsInlineTextCellRenderer` | `Table.InlineTextCellRenderer` | Inline text editing with expand/collapse support |',
62
+ '| `dsSelectDropdownCellRenderer` | `Table.SelectDropdownCellRenderer` | Renders a `SelectDropdown` in a cell |',
63
+ '| `dsBooleanCellRenderer` | `Table.BooleanCellRenderer` | Read-only boolean display |',
64
+ '| `dsCheckboxCellRenderer` | `Table.CheckboxCellRenderer` | Editable boolean checkbox |',
65
+ '| `dsDateCellEditor` | `Table.DateCellEditor` | Date picker cell editor |',
66
+ '',
67
+ '---',
68
+ '',
69
+ '### Registered column filters',
70
+ '',
71
+ '| Import | `doesFilterPass` helper | Use case |',
72
+ '|---|---|---|',
73
+ '| `BooleanFilter` | `doesBooleanFilterPass` | Filtering boolean / active columns |',
74
+ '| `TimeFilter` | `doesTimeFilterPass` | Filtering time string columns |',
75
+ '',
76
+ '---',
77
+ '',
78
+ '### Header and footer slots',
79
+ '',
80
+ '- `headerContent` — pass any `ReactNode` here; the `<TableHeader>` wraps it with a built-in search bar.',
81
+ ' Use `Table.TableControls` for the standard toolbar (bulk actions, hide columns, settings, download, help, expand).',
82
+ '- `hasSearch` (default `true`) — controls whether the search bar is rendered inside the header.',
83
+ ' Set to `false` when the header has no search functionality.',
84
+ '- `footerContent` — pass any `ReactNode` here; the `<TableFooter>` wraps it.',
85
+ ' Use `Table.PaginationPanel` for standard pagination.',
86
+ '',
87
+ '---',
88
+ '',
89
+ '### TableSettingsDropdown customisation',
90
+ '',
91
+ '`Table.TableSettingsDropdown` accepts an optional `items` prop to control which controls are shown and in what order.',
92
+ 'Omit `items` (or omit any key) to hide that control entirely.',
93
+ '',
94
+ '```tsx',
95
+ '// Built-in keys — use any subset in any order:',
96
+ '<Table.TableSettingsDropdown items={[\'tableSpacing\', \'separator\', \'style\']} />',
97
+ '',
98
+ '// Custom checkbox group:',
99
+ '<Table.TableSettingsDropdown items={[',
100
+ ' \'tableSpacing\',',
101
+ ' { type: \'checkboxGroup\', legend: \'View options\', options: [',
102
+ ' { label: \'Show inactive\', checked: showInactive, onChange: setShowInactive },',
103
+ ' ] },',
104
+ ']} />',
105
+ '',
106
+ '// Custom radio group:',
107
+ '<Table.TableSettingsDropdown items={[',
108
+ ' { type: \'radioGroup\', legend: \'Display\', name: \'display\', checkedValue: view, onChange: setView,',
109
+ ' options: [{ label: \'Compact\', value: \'compact\' }, { label: \'Default\', value: \'default\' }] },',
110
+ ']} />',
111
+ '```',
112
+ '',
113
+ 'Use `Table.SettingsItems` to access the default items array and extend it:',
114
+ '',
115
+ '```tsx',
116
+ 'const myItems = [...Table.SettingsItems, { type: \'checkboxGroup\', options: [...] }];',
117
+ '<Table.TableSettingsDropdown items={myItems} />',
118
+ '```',
119
+ '',
120
+ 'Use `onTableSettingsReset` on `Table` to reset your custom state when the reset button is clicked.',
121
+ '',
122
+ '---',
123
+ '',
124
+ '### Themes',
125
+ '',
126
+ '| Value | Description |',
127
+ '|---|---|',
128
+ '| _(omit)_ | Default Arbor table theme with full spacing and borders |',
129
+ '| `"tidy"` | Compact theme for dense layouts like marksheets. Suppresses expand/collapse icons. |',
130
+ '',
131
+ '---',
132
+ '',
133
+ '### Table spacing',
134
+ '',
135
+ 'Use `Table.Spacing` (enum `TABLE_SPACING`) when handling `onTableSpacingChanged`:',
136
+ '',
137
+ '```ts',
138
+ "import { Table } from '@arbor-education/design-system.components';",
139
+ '',
140
+ '// Table.Spacing values:',
141
+ '// Table.Spacing.XS → 0',
142
+ '// Table.Spacing.S → var(--spacing-xsmall)',
143
+ '// Table.Spacing.M → var(--spacing-small) ← default',
144
+ '// Table.Spacing.L → var(--spacing-medium)',
145
+ '```',
146
+ '',
147
+ '---',
148
+ '',
149
+ '### GridApiContext',
150
+ '',
151
+ 'Child components that need the AG Grid `GridApi` can consume `Table.GridApiContext`:',
152
+ '',
153
+ '```tsx',
154
+ "import { useContext } from 'react';",
155
+ "import { Table } from '@arbor-education/design-system.components';",
156
+ '',
157
+ 'function MyTableChild() {',
158
+ ' const gridApi = useContext(Table.GridApiContext);',
159
+ ' return <button onClick={() => gridApi?.exportDataAsCsv()}>Export</button>;',
160
+ '}',
161
+ '```',
162
+ '',
163
+ '---',
164
+ '',
165
+ '### DefaultColDef and DefaultValueFormatter',
166
+ '',
167
+ '`Table.DefaultColDef` contains Arbor defaults (editable, sortable, resizable, min-width, flex).',
168
+ 'Spread it into your `defaultColDef` and add overrides:',
169
+ '',
170
+ '```ts',
171
+ 'const defaultColDef = {',
172
+ ' ...Table.DefaultColDef,',
173
+ ' editable: false, // override',
174
+ '};',
175
+ '```',
176
+ '',
177
+ '`Table.DefaultValueFormatter` handles the `{ value: string }` cell data shape.',
178
+ 'Any column using the object cell shape (`{ value, backgroundColor, foregroundColor, semanticColor }`) **must** use this formatter.',
179
+ '',
180
+ '---',
181
+ '',
182
+ '### TypeScript types',
183
+ '',
184
+ '```ts',
185
+ "import { Table } from '@arbor-education/design-system.components';",
186
+ "import type { TableProps, TableControlsProps, BulkAction, HideColumnsProps } from '@arbor-education/design-system.components';",
187
+ '',
188
+ '// or via namespace:',
189
+ 'type MyTableProps = Table.Props;',
190
+ 'type MyControlsProps = Table.ControlsProps;',
191
+ 'type MyBulkAction = Table.BulkAction;',
192
+ 'type MySpacing = Table.Spacing;',
193
+ '',
194
+ '// Table.SettingsItems — the default settings items array (spread to extend):',
195
+ 'const myItems = [...Table.SettingsItems, { type: \'checkboxGroup\' as const, options: [] }];',
196
+ '```',
197
+ ].join('\n');
198
+ const RELATED_COMPONENTS = [
199
+ '## Related components',
200
+ '',
201
+ '[Section](?path=/docs/components-section--docs) · [Row](?path=/docs/components-row--docs) · [Button](?path=/docs/components-button--docs) · [SelectDropdown](?path=/docs/components-selectdropdown--docs)',
202
+ ].join('\n');
203
+ // ---------------------------------------------------------------------------
204
+ // Custom DocsPage
205
+ // ---------------------------------------------------------------------------
206
+ function TableDocsPage() {
207
+ 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 })] }));
208
+ }
209
+ // ---------------------------------------------------------------------------
210
+ // Meta
211
+ // ---------------------------------------------------------------------------
15
212
  const meta = {
16
213
  title: 'Components/Table',
17
214
  component: Table,
18
215
  tags: ['autodocs'],
19
216
  parameters: {
217
+ layout: 'padded',
20
218
  docs: {
21
- description: {
22
- component: 'The Table component is a wrapper around the ag-grid-react component. It provides a set of props that can be used to configure the table.',
219
+ page: TableDocsPage,
220
+ },
221
+ },
222
+ argTypes: {
223
+ wrapperClassName: {
224
+ description: 'Additional CSS class names applied to the root `<section>` wrapper.',
225
+ control: 'text',
226
+ table: {
227
+ type: { summary: 'string' },
228
+ defaultValue: { summary: 'undefined' },
229
+ },
230
+ },
231
+ hasSearch: {
232
+ description: [
233
+ 'When `true` (the default) a quick-filter search bar is rendered inside the header area.',
234
+ 'Set to `false` when using `headerContent` without a search requirement,',
235
+ 'or when you want to suppress the search bar entirely.',
236
+ ].join(' '),
237
+ control: 'boolean',
238
+ table: {
239
+ type: { summary: 'boolean' },
240
+ defaultValue: { summary: 'true' },
241
+ },
242
+ },
243
+ headerContent: {
244
+ description: [
245
+ 'ReactNode rendered inside the `<TableHeader>` above the grid.',
246
+ 'Use `Table.TableControls` for the standard composed toolbar.',
247
+ 'The built-in search bar appears here when `hasSearch` is `true`.',
248
+ ].join(' '),
249
+ control: false,
250
+ table: {
251
+ type: { summary: 'ReactNode' },
252
+ defaultValue: { summary: 'undefined' },
253
+ },
254
+ },
255
+ footerContent: {
256
+ description: [
257
+ 'ReactNode rendered inside the `<TableFooter>` below the grid.',
258
+ 'Use `Table.PaginationPanel` for standard client-side or server-side pagination.',
259
+ ].join(' '),
260
+ control: false,
261
+ table: {
262
+ type: { summary: 'ReactNode' },
263
+ defaultValue: { summary: 'undefined' },
264
+ },
265
+ },
266
+ tableTheme: {
267
+ description: [
268
+ 'Visual theme for the grid.',
269
+ 'Pass `"tidy"` for the compact marksheet-style theme.',
270
+ 'Omit (or pass `undefined`) for the default Arbor table theme.',
271
+ ].join(' '),
272
+ control: 'select',
273
+ options: [undefined, 'tidy'],
274
+ table: {
275
+ type: { summary: "'tidy' | undefined" },
276
+ defaultValue: { summary: 'undefined' },
277
+ },
278
+ },
279
+ enableSimultaneousRangeAndRowSelection: {
280
+ description: [
281
+ 'When `true`, allows both cell-range selection and row selection to be active at the same time.',
282
+ 'Default `false` — drag selection clears row selection.',
283
+ ].join(' '),
284
+ control: 'boolean',
285
+ table: {
286
+ type: { summary: 'boolean' },
287
+ defaultValue: { summary: 'false' },
288
+ },
289
+ },
290
+ disableDragSelect: {
291
+ description: 'When `true`, disables drag-to-select behaviour on cell range selection.',
292
+ control: 'boolean',
293
+ table: {
294
+ type: { summary: 'boolean' },
295
+ defaultValue: { summary: 'false' },
296
+ },
297
+ },
298
+ onTableSettingsChanged: {
299
+ description: 'Fired when the user changes table settings (column borders, spacing, cell colours) via the settings dropdown.',
300
+ control: false,
301
+ table: {
302
+ type: { summary: '(settings: TableSettings) => void' },
303
+ defaultValue: { summary: 'undefined' },
304
+ },
305
+ },
306
+ onTableSpacingChanged: {
307
+ description: 'Fired when the user changes row spacing. Receives a `Table.Spacing` (TABLE_SPACING) enum value.',
308
+ control: false,
309
+ table: {
310
+ type: { summary: '(val: TABLE_SPACING) => void' },
311
+ defaultValue: { summary: 'undefined' },
312
+ },
313
+ },
314
+ onColumnBordersChanged: {
315
+ description: 'Fired when the user toggles column borders on or off via the settings dropdown.',
316
+ control: false,
317
+ table: {
318
+ type: { summary: '(hasBorders: boolean) => void' },
319
+ defaultValue: { summary: 'undefined' },
320
+ },
321
+ },
322
+ onTableSettingsReset: {
323
+ description: 'Fired when the user resets all table settings to their defaults.',
324
+ control: false,
325
+ table: {
326
+ type: { summary: '() => void' },
327
+ defaultValue: { summary: 'undefined' },
23
328
  },
24
329
  },
25
330
  },
@@ -391,7 +696,31 @@ export const WithHideColumnsDropdown = {
391
696
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
392
697
  // @ts-ignore
393
698
  overrideColumnHiding, } = args;
394
- return (_jsx(Table, { rowData: rowData, columnDefs: columnDefs, defaultColDef: defaultColDef, domLayout: domLayout, headerContent: (_jsx(HideColumnsDropdown, { overrideColumnHiding: overrideColumnHiding, onSelectionChanged: console.log })) }));
699
+ return (_jsx(Table, { rowData: rowData, columnDefs: columnDefs, defaultColDef: defaultColDef, domLayout: domLayout, headerContent: (_jsx(HideColumnsDropdown, { overrideColumnHiding: overrideColumnHiding, onSelectionChanged: fn() })) }));
700
+ },
701
+ };
702
+ export const WithInitiallyHiddenColumns = {
703
+ parameters: {
704
+ docs: {
705
+ description: {
706
+ story: 'Use AG Grid initial state to start with selected columns hidden. This example hides the email and role columns on first render.',
707
+ },
708
+ },
709
+ },
710
+ args: {
711
+ rowData: sampleData,
712
+ columnDefs: sampleColumnDefs,
713
+ defaultColDef,
714
+ domLayout: 'autoHeight',
715
+ initialState: {
716
+ columnVisibility: {
717
+ hiddenColIds: ['email', 'role'],
718
+ },
719
+ },
720
+ },
721
+ render: (args) => {
722
+ const { rowData, columnDefs, defaultColDef, domLayout, initialState, } = args;
723
+ return (_jsx(Table, { rowData: rowData, columnDefs: columnDefs, defaultColDef: defaultColDef, domLayout: domLayout, initialState: initialState, headerContent: (_jsx(HideColumnsDropdown, { onSelectionChanged: fn() })) }));
395
724
  },
396
725
  };
397
726
  export const WithRestrictedHideColumnsDropdown = {
@@ -420,7 +749,7 @@ export const WithRestrictedHideColumnsDropdown = {
420
749
  return (_jsx(Table, { rowData: rowData, columnDefs: columnDefs, defaultColDef: defaultColDef, domLayout: domLayout, onGridReady: (params) => {
421
750
  const { api } = params;
422
751
  setColumns(api.getColumns()?.slice(1) || []);
423
- }, headerContent: (_jsx(HideColumnsDropdown, { overrideColumnHiding: overrideColumnHiding, onSelectionChanged: console.log, columns: columns })) }));
752
+ }, headerContent: (_jsx(HideColumnsDropdown, { overrideColumnHiding: overrideColumnHiding, onSelectionChanged: fn(), columns: columns })) }));
424
753
  },
425
754
  };
426
755
  export const WithClientSidePagination = {
@@ -1464,6 +1793,56 @@ const checkboxColumnDefs = [
1464
1793
  editable: false,
1465
1794
  },
1466
1795
  ];
1796
+ export const WithTableSettingsDropdownItems = {
1797
+ parameters: {
1798
+ docs: {
1799
+ description: {
1800
+ story: 'Pass an `items` array to control exactly which controls appear. Only the items you include will be shown. Available keys: `tableSpacing`, `separator`, `style`.',
1801
+ },
1802
+ },
1803
+ },
1804
+ args: {
1805
+ rowData: sampleData,
1806
+ columnDefs: sampleColumnDefs,
1807
+ defaultColDef,
1808
+ domLayout: 'autoHeight',
1809
+ headerContent: (_jsx(Table.TableSettingsDropdown, { items: ['tableSpacing'] })),
1810
+ },
1811
+ };
1812
+ export const WithTableSettingsDropdownCustomItems = {
1813
+ parameters: {
1814
+ docs: {
1815
+ description: {
1816
+ story: 'Pass an `items` array with any mix of built-in keys and custom item objects in any order. Built-in keys: `tableSpacing`, `separator`, `style`. For custom items, use `{ type: "checkboxGroup", legend?, options }` for a group of toggles or `{ type: "radioGroup", legend?, name, checkedValue, onChange, options }` for mutually exclusive options. Custom item state is managed externally. Use `onTableSettingsReset` on the Table to reset custom state when the reset button is clicked.',
1817
+ },
1818
+ },
1819
+ },
1820
+ args: {
1821
+ rowData: sampleData,
1822
+ columnDefs: sampleColumnDefs,
1823
+ defaultColDef,
1824
+ domLayout: 'autoHeight',
1825
+ },
1826
+ render: (args) => {
1827
+ const [showInactive, setShowInactive] = useState(false);
1828
+ const filteredData = showInactive
1829
+ ? args.rowData
1830
+ : args.rowData?.filter((row) => row.active);
1831
+ return (_jsx(Table, { ...args, rowData: filteredData, onTableSettingsReset: () => setShowInactive(false), headerContent: (_jsx(Table.TableSettingsDropdown, { items: [
1832
+ 'tableSpacing',
1833
+ 'separator',
1834
+ 'style',
1835
+ 'separator',
1836
+ {
1837
+ type: 'checkboxGroup',
1838
+ legend: 'View options',
1839
+ options: [
1840
+ { label: 'Show inactive users', checked: showInactive, onChange: setShowInactive },
1841
+ ],
1842
+ },
1843
+ ] })) }));
1844
+ },
1845
+ };
1467
1846
  export const WithCheckboxCellRenderer = {
1468
1847
  parameters: {
1469
1848
  docs: {