@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
@@ -0,0 +1,176 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { Controls, Heading as DocHeading, Markdown, Primary as DocPrimary, Stories, Subtitle, Title, } from '@storybook/addon-docs/blocks';
4
+ import { fn } from 'storybook/test';
5
+ import { TableHeader } from './TableHeader';
6
+ import { TableControls } from './tableControls/TableControls';
7
+ // ---------------------------------------------------------------------------
8
+ // Docs page content
9
+ // ---------------------------------------------------------------------------
10
+ const DESCRIPTION_INTRO = [
11
+ '`TableHeader` is the pre-composed header slot for the Arbor data table.',
12
+ 'It renders a `<header>` element and accepts any `children` (typically a `<TableControls />` element)',
13
+ 'plus an optional built-in `<SearchBar />` via the `hasSearch` prop.',
14
+ '',
15
+ 'Pass the entire `<TableHeader />` element as the `headerContent` prop of `<Table />`.',
16
+ ].join('\n');
17
+ const USAGE_GUIDANCE = [
18
+ '### When to use',
19
+ '',
20
+ '- As the `headerContent` of a `<Table />` when you need a standard header region',
21
+ '- When you want to combine a toolbar (`<TableControls />`) with a search bar in one slot',
22
+ '- When you need custom header content that is not covered by `<TableControls />`',
23
+ '',
24
+ '---',
25
+ '',
26
+ '### When NOT to use',
27
+ '',
28
+ '| Situation | Alternative |',
29
+ '|---|---|',
30
+ '| You only need a toolbar | Pass `<TableControls />` directly as `headerContent` |',
31
+ '| You only need a search bar | Pass `<SearchBar />` directly as `headerContent` |',
32
+ '| The table has no header | Omit `headerContent` entirely |',
33
+ '',
34
+ '---',
35
+ '',
36
+ '### Props summary',
37
+ '',
38
+ '| Prop | Description |',
39
+ '|---|---|',
40
+ '| `children` | Content rendered before the `SearchBar` — typically `<TableControls />` |',
41
+ '| `hasSearch` | When `true`, renders a `<SearchBar />` at the end of the header |',
42
+ '| `searchValue` | Controlled value for the `SearchBar` |',
43
+ '| `setSearchValue` | Called with the new search string when the user types |',
44
+ ].join('\n');
45
+ const DEVELOPER_NOTES = [
46
+ '### Wiring into `<Table />`',
47
+ '',
48
+ '```tsx',
49
+ "import { useState } from 'react';",
50
+ "import { Table, TableHeader, TableControls } from '@arbor-education/design-system.components';",
51
+ '',
52
+ 'function MyTable() {',
53
+ " const [search, setSearch] = useState('');",
54
+ '',
55
+ ' return (',
56
+ ' <Table',
57
+ ' rowData={rows}',
58
+ ' columnDefs={colDefs}',
59
+ ' quickFilterText={search}',
60
+ ' headerContent={(',
61
+ ' <TableHeader hasSearch searchValue={search} setSearchValue={setSearch}>',
62
+ ' <TableControls',
63
+ ' onUndo={handleUndo}',
64
+ ' onDownload={handleDownload}',
65
+ ' showSettings',
66
+ ' />',
67
+ ' </TableHeader>',
68
+ ' )}',
69
+ ' />',
70
+ ' );',
71
+ '}',
72
+ '```',
73
+ '',
74
+ '---',
75
+ '',
76
+ '### `hasSearch` vs passing `<SearchBar />` directly',
77
+ '',
78
+ 'Both approaches are equivalent. `TableHeader` with `hasSearch` is more concise when you already',
79
+ 'have `TableHeader` for the `children` slot. If you only need a search bar and no other header',
80
+ 'content, pass `<SearchBar />` directly as `headerContent` without wrapping it in `TableHeader`.',
81
+ ].join('\n');
82
+ const RELATED_COMPONENTS = [
83
+ '## Related components',
84
+ '',
85
+ '[Table](?path=/docs/components-table--docs) · [TableControls](?path=/docs/components-table-tablecontrols--docs) · [TableFooter](?path=/docs/components-table-tablefooter--docs) · [SearchBar](?path=/docs/components-searchbar--docs)',
86
+ ].join('\n');
87
+ const PROPS_INTRO = 'The preview below is wired to the **Controls** panel — toggle `hasSearch` to add or remove the search bar.';
88
+ // ---------------------------------------------------------------------------
89
+ // Custom DocsPage
90
+ // ---------------------------------------------------------------------------
91
+ function TableHeaderDocsPage() {
92
+ 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 })] }));
93
+ }
94
+ // ---------------------------------------------------------------------------
95
+ // Meta
96
+ // ---------------------------------------------------------------------------
97
+ const meta = {
98
+ title: 'Components/Table/TableHeader',
99
+ component: TableHeader,
100
+ tags: ['autodocs'],
101
+ parameters: {
102
+ layout: 'padded',
103
+ docs: { page: TableHeaderDocsPage },
104
+ },
105
+ argTypes: {
106
+ children: {
107
+ description: 'Content rendered inside the header before the `SearchBar`. Typically a `<TableControls />` element.',
108
+ control: false,
109
+ table: { type: { summary: 'ReactNode' }, defaultValue: { summary: 'undefined' } },
110
+ },
111
+ hasSearch: {
112
+ description: 'When `true`, renders a `<SearchBar />` at the end of the header.',
113
+ control: 'boolean',
114
+ table: { type: { summary: 'boolean' }, defaultValue: { summary: 'false' } },
115
+ },
116
+ searchValue: {
117
+ description: 'Controlled value for the `SearchBar`. Only used when `hasSearch` is `true`.',
118
+ control: 'text',
119
+ table: { type: { summary: 'string' }, defaultValue: { summary: 'undefined' } },
120
+ },
121
+ setSearchValue: {
122
+ description: 'Called with the new search string when the user types. Only used when `hasSearch` is `true`.',
123
+ control: false,
124
+ table: { type: { summary: '(searchValue: string) => void' }, defaultValue: { summary: 'undefined' } },
125
+ },
126
+ className: {
127
+ description: 'Additional CSS class name(s) to apply to the root `<header>` element.',
128
+ control: 'text',
129
+ table: { type: { summary: 'string' }, defaultValue: { summary: 'undefined' } },
130
+ },
131
+ },
132
+ args: {
133
+ setSearchValue: fn(),
134
+ },
135
+ };
136
+ export default meta;
137
+ // ---------------------------------------------------------------------------
138
+ // Helper
139
+ // ---------------------------------------------------------------------------
140
+ const withDescription = (story, description) => ({
141
+ ...story,
142
+ parameters: {
143
+ ...story.parameters,
144
+ docs: { ...story.parameters?.docs, description: { story: description } },
145
+ },
146
+ });
147
+ // ---------------------------------------------------------------------------
148
+ // Stories
149
+ // ---------------------------------------------------------------------------
150
+ export const Default = withDescription({
151
+ args: {
152
+ hasSearch: false,
153
+ children: (_jsx(TableControls, { onUndo: fn(), onRedo: fn(), onDownload: fn(), showSettings: true, onHelp: fn(), onExpandToggle: fn() })),
154
+ },
155
+ }, 'The interactive canvas — `TableHeader` wrapping a `<TableControls />` element, which is the canonical usage. '
156
+ + 'Toggle `hasSearch` in the Controls panel to add the built-in `SearchBar`.');
157
+ export const WithSearch = withDescription({
158
+ parameters: { controls: { disable: true } },
159
+ render: () => {
160
+ const [search, setSearch] = React.useState('');
161
+ return (_jsx(TableHeader, { hasSearch: true, searchValue: search, setSearchValue: setSearch, children: _jsx(TableControls, { onUndo: fn(), onRedo: fn(), onDownload: fn(), showSettings: true }) }));
162
+ },
163
+ }, '`hasSearch={true}` adds a `SearchBar` at the end of the header. '
164
+ + '`searchValue` and `setSearchValue` give you controlled access to the search string — '
165
+ + "pass it as `quickFilterText` to `<Table />` to drive AG Grid's built-in text filtering.");
166
+ export const ChildrenOnly = withDescription({
167
+ parameters: { controls: { disable: true } },
168
+ args: {
169
+ children: (_jsx(TableControls, { bulkActions: [
170
+ { displayName: 'Export selected', callback: fn() },
171
+ { displayName: 'Delete selected', callback: fn(), disabled: true },
172
+ ], onUndo: fn(), onRedo: fn() })),
173
+ },
174
+ }, 'The header slot with only `children` — no built-in search bar. '
175
+ + 'Any `ReactNode` is accepted as `children`; `<TableControls />` is the most common choice.');
176
+ //# sourceMappingURL=TableHeader.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableHeader.stories.js","sourceRoot":"","sources":["../../../src/components/table/TableHeader.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,QAAQ,EACR,OAAO,IAAI,UAAU,EACrB,QAAQ,EACR,OAAO,IAAI,UAAU,EACrB,OAAO,EACP,QAAQ,EACR,KAAK,GACN,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,MAAM,iBAAiB,GAAG;IACxB,yEAAyE;IACzE,sGAAsG;IACtG,qEAAqE;IACrE,EAAE;IACF,uFAAuF;CACxF,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,cAAc,GAAG;IACrB,iBAAiB;IACjB,EAAE;IACF,kFAAkF;IAClF,0FAA0F;IAC1F,kFAAkF;IAClF,EAAE;IACF,KAAK;IACL,EAAE;IACF,qBAAqB;IACrB,EAAE;I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C,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC/C,OAAO,CACL,KAAC,WAAW,IAAC,SAAS,QAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,SAAS,YACnE,KAAC,aAAa,IACZ,MAAM,EAAE,EAAE,EAAE,EACZ,MAAM,EAAE,EAAE,EAAE,EACZ,UAAU,EAAE,EAAE,EAAE,EAChB,YAAY,SACZ,GACU,CACf,CAAC;IACJ,CAAC;CACF,EACD,kEAAkE;MAChE,uFAAuF;MACvF,yFAAyF,CAC5F,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAU,eAAe,CAChD;IACE,UAAU,EAAE,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IAC3C,IAAI,EAAE;QACJ,QAAQ,EAAE,CACR,KAAC,aAAa,IACZ,WAAW,EAAE;gBACX,EAAE,WAAW,EAAE,iBAAiB,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE;gBAClD,EAAE,WAAW,EAAE,iBAAiB,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;aACnE,EACD,MAAM,EAAE,EAAE,EAAE,EACZ,MAAM,EAAE,EAAE,EAAE,GACZ,CACH;KACF;CACF,EACD,iEAAiE;MAC/D,2FAA2F,CAC9F,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { StoryObj } from '@storybook/react-vite';
2
+ import type { CustomCellEditorProps } from 'ag-grid-react';
3
+ import { DateCellEditor } from './DateCellEditor';
4
+ declare function DateCellEditorDocsPage(): import("react/jsx-runtime").JSX.Element;
5
+ declare const meta: {
6
+ title: string;
7
+ component: (props: CustomCellEditorProps) => import("react/jsx-runtime").JSX.Element;
8
+ tags: string[];
9
+ parameters: {
10
+ layout: string;
11
+ docs: {
12
+ page: typeof DateCellEditorDocsPage;
13
+ };
14
+ };
15
+ argTypes: {
16
+ value: {
17
+ description: string;
18
+ control: false;
19
+ table: {
20
+ type: {
21
+ summary: string;
22
+ };
23
+ defaultValue: {
24
+ summary: string;
25
+ };
26
+ };
27
+ };
28
+ onValueChange: {
29
+ description: string;
30
+ control: false;
31
+ table: {
32
+ type: {
33
+ summary: string;
34
+ };
35
+ };
36
+ };
37
+ };
38
+ };
39
+ export default meta;
40
+ type Story = StoryObj<typeof DateCellEditor>;
41
+ export declare const Default: Story;
42
+ export declare const WithExistingDate: Story;
43
+ export declare const InATable: Story;
44
+ //# sourceMappingURL=DateCellEditor.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateCellEditor.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/table/cellEditors/DateCellEditor.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAW5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAuElD,iBAAS,sBAAsB,4CAiB9B;AAgBD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoB6B,CAAC;AAExC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC;AAc7C,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAM9B,CAAC;AASF,eAAO,MAAM,QAAQ,EAAE,KAqEtB,CAAC"}
@@ -0,0 +1,186 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Controls, Heading as DocHeading, Markdown, Primary as DocPrimary, Stories, Subtitle, Title, } from '@storybook/addon-docs/blocks';
3
+ import { fn } from 'storybook/test';
4
+ import { DateCellEditor } from './DateCellEditor';
5
+ import { Table } from '../../table/Table';
6
+ // ---------------------------------------------------------------------------
7
+ // Docs page content
8
+ // ---------------------------------------------------------------------------
9
+ const DESCRIPTION_INTRO = [
10
+ '`DateCellEditor` is an AG Grid cell editor component that renders an Arbor `DatePicker` inside a table cell.',
11
+ 'It is invoked when a user begins editing a date column (e.g. by pressing Enter or double-clicking the cell).',
12
+ '',
13
+ 'Register it via the AG Grid `cellEditor` column definition property.',
14
+ ].join('\n');
15
+ const USAGE_GUIDANCE = [
16
+ '### When to use',
17
+ '',
18
+ '- On date columns that need an inline date-picker editor',
19
+ '- When users should be able to edit a date value directly in the table without leaving the row',
20
+ '',
21
+ '---',
22
+ '',
23
+ '### Registration',
24
+ '',
25
+ '```tsx',
26
+ "import { DateCellEditor } from '@arbor-education/design-system.components';",
27
+ '',
28
+ 'const colDefs = [',
29
+ ' {',
30
+ " field: 'dob',",
31
+ " headerName: 'Date of birth',",
32
+ ' cellEditor: DateCellEditor,',
33
+ ' // or via string key:',
34
+ " cellEditor: 'dsDateCellEditor',",
35
+ ' },',
36
+ '];',
37
+ '```',
38
+ '',
39
+ '---',
40
+ '',
41
+ '### `cellEditorParams`',
42
+ '',
43
+ 'Any additional props to pass to the underlying `DatePicker` can be provided via `cellEditorParams`:',
44
+ '',
45
+ '```tsx',
46
+ 'cellEditorParams: {',
47
+ " placeholder: 'dd/mm/yyyy',",
48
+ ' disabled: false,',
49
+ '},',
50
+ '```',
51
+ '',
52
+ '---',
53
+ '',
54
+ '### Value format',
55
+ '',
56
+ 'The `value` and `onValueChange` use the same date format as the Arbor `DatePicker`.',
57
+ 'Refer to the [DatePicker docs](?path=/docs/components-datepicker--docs) for format details.',
58
+ ].join('\n');
59
+ const RELATED_COMPONENTS = [
60
+ '## Related components',
61
+ '',
62
+ '[Table](?path=/docs/components-table--docs) · [DatePicker](?path=/docs/components-datepicker--docs)',
63
+ ].join('\n');
64
+ const PROPS_INTRO = 'The preview below shows `DateCellEditor` rendering the Arbor `DatePicker` with a pre-set date value. In a real table this component is mounted by AG Grid when the user begins editing a date cell.';
65
+ // ---------------------------------------------------------------------------
66
+ // Custom DocsPage
67
+ // ---------------------------------------------------------------------------
68
+ function DateCellEditorDocsPage() {
69
+ 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: "Examples" }), _jsx(Stories, { title: "" }), _jsx(Markdown, { children: RELATED_COMPONENTS })] }));
70
+ }
71
+ // ---------------------------------------------------------------------------
72
+ // Helpers
73
+ // ---------------------------------------------------------------------------
74
+ const makeEditorProps = (value) => ({
75
+ value,
76
+ onValueChange: fn(),
77
+ colDef: { cellEditorParams: {} },
78
+ });
79
+ // ---------------------------------------------------------------------------
80
+ // Meta
81
+ // ---------------------------------------------------------------------------
82
+ const meta = {
83
+ title: 'Components/Table/CellEditors/DateCellEditor',
84
+ component: DateCellEditor,
85
+ tags: ['autodocs'],
86
+ parameters: {
87
+ layout: 'padded',
88
+ docs: { page: DateCellEditorDocsPage },
89
+ },
90
+ argTypes: {
91
+ value: {
92
+ description: 'The current date value of the cell being edited. Format matches the Arbor `DatePicker` value format.',
93
+ control: false,
94
+ table: { type: { summary: 'string' }, defaultValue: { summary: 'undefined' } },
95
+ },
96
+ onValueChange: {
97
+ description: 'Called by AG Grid when the editor value changes. Receives the new date value.',
98
+ control: false,
99
+ table: { type: { summary: '(value: string) => void' } },
100
+ },
101
+ },
102
+ };
103
+ export default meta;
104
+ const withDescription = (story, description) => ({
105
+ ...story,
106
+ parameters: {
107
+ ...story.parameters,
108
+ docs: { ...story.parameters?.docs, description: { story: description } },
109
+ },
110
+ });
111
+ // ---------------------------------------------------------------------------
112
+ // Stories
113
+ // ---------------------------------------------------------------------------
114
+ export const Default = withDescription({
115
+ render: () => _jsx(DateCellEditor, { ...makeEditorProps(undefined) }),
116
+ }, 'The `DateCellEditor` with no initial value — renders an empty `DatePicker` ready for input.');
117
+ export const WithExistingDate = withDescription({
118
+ parameters: { controls: { disable: true } },
119
+ render: () => _jsx(DateCellEditor, { ...makeEditorProps(new Date('2024-09-01')) }),
120
+ }, 'Pre-populated with an existing date value. In a table, AG Grid passes the cell\'s current value as `value` when the editor opens.');
121
+ const DATE_EDITOR_IN_TABLE_DATA = [
122
+ { name: 'Alice Johnson', dateOfBirth: new Date(1990, 0, 15) },
123
+ { name: 'Bob Smith', dateOfBirth: new Date(1985, 5, 20) },
124
+ { name: 'Charlie Brown', dateOfBirth: new Date(1992, 10, 3) },
125
+ { name: 'Diana Prince', dateOfBirth: new Date(1988, 3, 12) },
126
+ ];
127
+ export const InATable = withDescription({
128
+ parameters: {
129
+ controls: { disable: true },
130
+ docs: {
131
+ source: {
132
+ language: 'tsx',
133
+ code: `
134
+ import { Table } from '@arbor-education/design-system.components';
135
+
136
+ const rowData = [
137
+ { name: 'Alice Johnson', dateOfBirth: new Date(1990, 0, 15) },
138
+ { name: 'Bob Smith', dateOfBirth: new Date(1985, 5, 20) },
139
+ { name: 'Charlie Brown', dateOfBirth: new Date(1992, 10, 3) },
140
+ { name: 'Diana Prince', dateOfBirth: new Date(1988, 3, 12) },
141
+ ];
142
+
143
+ function DateCellEditorExample() {
144
+ return (
145
+ <Table
146
+ rowData={rowData}
147
+ columnDefs={[
148
+ { field: 'name', headerName: 'Name', flex: 2, editable: false },
149
+ {
150
+ field: 'dateOfBirth',
151
+ headerName: 'Date of birth',
152
+ flex: 1,
153
+ editable: true,
154
+ cellEditor: 'dsDateCellEditor',
155
+ valueFormatter: (params) =>
156
+ params.value instanceof Date
157
+ ? params.value.toLocaleDateString('en-GB')
158
+ : params.value,
159
+ },
160
+ ]}
161
+ defaultColDef={{ flex: 1, minWidth: 120 }}
162
+ domLayout="autoHeight"
163
+ />
164
+ );
165
+ }
166
+
167
+ export default DateCellEditorExample;
168
+ `.trim(),
169
+ },
170
+ },
171
+ },
172
+ render: () => (_jsx(Table, { rowData: DATE_EDITOR_IN_TABLE_DATA, columnDefs: [
173
+ { field: 'name', headerName: 'Name', flex: 2, editable: false },
174
+ {
175
+ field: 'dateOfBirth',
176
+ headerName: 'Date of birth',
177
+ flex: 1,
178
+ editable: true,
179
+ cellEditor: 'dsDateCellEditor',
180
+ valueFormatter: params => params.value instanceof Date
181
+ ? params.value.toLocaleDateString('en-GB')
182
+ : params.value,
183
+ },
184
+ ], defaultColDef: { flex: 1, minWidth: 120 }, domLayout: "autoHeight" })),
185
+ }, '`dsDateCellEditor` wired up inside a full `Table`. Double-click (or press F2/Enter) on a Date of birth cell to open the `DatePicker` editor — AG Grid mounts the editor component and passes the current cell value as `value`. The `valueFormatter` formats the stored `Date` object as a localised string for display.');
186
+ //# sourceMappingURL=DateCellEditor.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateCellEditor.stories.js","sourceRoot":"","sources":["../../../../src/components/table/cellEditors/DateCellEditor.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,QAAQ,EACR,OAAO,IAAI,UAAU,EACrB,QAAQ,EACR,OAAO,IAAI,UAAU,EACrB,OAAO,EACP,QAAQ,EACR,KAAK,GACN,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,MAAM,iBAAiB,GAAG;IACxB,8GAA8G;IAC9G,8GAA8G;IAC9G,EAAE;IACF,sEAAsE;CACvE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,cAAc,GAAG;IACrB,iBAAiB;IACjB,EAAE;IACF,0DAA0D;IAC1D,gGAAgG;IAChG,EAAE;IACF,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EAAE,KAAK,EAAE;YAC/D;gBACE,KAAK,EAAE,aAAa;gBACpB,UAAU,EAAE,eAAe;gBAC3B,IAAI,EAAE,CAAC;gBACP,QAAQ,EAAE,IAAI;gBACd,UAAU,EAAE,kBAAkB;gBAC9B,cAAc,EAAE,MAAM,CAAC,EAAE,CACvB,MAAM,CAAC,KAAK,YAAY,IAAI;oBAC1B,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC;oBAC1C,CAAC,CAAC,MAAM,CAAC,KAAK;aACnB;SACF,EACD,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,EACzC,SAAS,EAAC,YAAY,GACtB,CACH;CACF,EACD,0TAA0T,CAC3T,CAAC"}
@@ -0,0 +1,13 @@
1
+ export type NumberCellEditorProps = {
2
+ value: number | null | undefined;
3
+ onValueChange: (value: number | null) => void;
4
+ min: number;
5
+ max: number;
6
+ step: number;
7
+ disableSpinners: boolean;
8
+ };
9
+ export declare const NumberCellEditor: {
10
+ (props: NumberCellEditorProps): import("react/jsx-runtime").JSX.Element;
11
+ displayName: string;
12
+ };
13
+ //# sourceMappingURL=NumberCellEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberCellEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/table/cellEditors/NumberCellEditor.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAMF,eAAO,MAAM,gBAAgB;YAAW,qBAAqB;;CA6D5D,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { NumberInput } from '../../formField/inputs/number/NumberInput';
3
+ import {} from 'react';
4
+ const clampValue = (value, min, max) => (Math.min(Math.max(value, min), max));
5
+ export const NumberCellEditor = (props) => {
6
+ const { value, onValueChange, min, max, step, disableSpinners, } = props;
7
+ const handleChange = (event) => {
8
+ const nextValue = event.currentTarget.value.trim();
9
+ if (nextValue === '') {
10
+ onValueChange(null);
11
+ return;
12
+ }
13
+ const parsedValue = Number(nextValue);
14
+ if (!Number.isNaN(parsedValue)) {
15
+ onValueChange(clampValue(parsedValue, min, max));
16
+ }
17
+ };
18
+ const handleKeyDown = (event) => {
19
+ if (event.key !== 'Enter') {
20
+ return;
21
+ }
22
+ const rawValue = event.currentTarget.value.trim();
23
+ if (rawValue === '') {
24
+ onValueChange(null);
25
+ return;
26
+ }
27
+ const parsedValue = Number(rawValue);
28
+ if (!Number.isNaN(parsedValue)) {
29
+ onValueChange(clampValue(parsedValue, min, max));
30
+ }
31
+ };
32
+ return (_jsx("div", { className: "ds-number-cell-editor__wrapper", children: _jsx(NumberInput, { containerClassName: "ds-number-cell-editor__container", defaultValue: value == null ? '' : String(value), autoFocus: true, min: min, max: max, step: step, disableSpinners: disableSpinners, onChange: handleChange, onKeyDown: handleKeyDown }) }));
33
+ };
34
+ NumberCellEditor.displayName = 'NumberCellEditor';
35
+ //# sourceMappingURL=NumberCellEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberCellEditor.js","sourceRoot":"","sources":["../../../../src/components/table/cellEditors/NumberCellEditor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAC7E,OAAO,EAGN,MAAM,OAAO,CAAC;AAWf,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW,EAAE,EAAE,CAAC,CAC9D,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAA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,cACE,SAAS,EAAC,gCAAgC,YAE1C,KAAC,WAAW,IACV,kBAAkB,EAAC,kCAAkC,EACrD,YAAY,EAAE,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAChD,SAAS,QACT,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,aAAa,GACxB,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC"}
@@ -0,0 +1,40 @@
1
+ import type { StoryObj } from '@storybook/react-vite';
2
+ import type { CustomCellRendererProps } from 'ag-grid-react';
3
+ import { BooleanCellRenderer } from './BooleanCellRenderer';
4
+ declare function BooleanCellRendererDocsPage(): import("react/jsx-runtime").JSX.Element;
5
+ declare const meta: {
6
+ title: string;
7
+ component: (props: CustomCellRendererProps) => import("react/jsx-runtime").JSX.Element | null;
8
+ tags: string[];
9
+ parameters: {
10
+ layout: string;
11
+ docs: {
12
+ page: typeof BooleanCellRendererDocsPage;
13
+ };
14
+ };
15
+ argTypes: {
16
+ value: {
17
+ control: {
18
+ type: "select";
19
+ };
20
+ options: (boolean | null)[];
21
+ description: string;
22
+ table: {
23
+ type: {
24
+ summary: string;
25
+ };
26
+ defaultValue: {
27
+ summary: string;
28
+ };
29
+ };
30
+ };
31
+ };
32
+ };
33
+ export default meta;
34
+ type Story = StoryObj<typeof BooleanCellRenderer>;
35
+ export declare const Default: Story;
36
+ export declare const True: Story;
37
+ export declare const False: Story;
38
+ export declare const Empty: Story;
39
+ export declare const InATable: Story;
40
+ //# sourceMappingURL=BooleanCellRenderer.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BooleanCellRenderer.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/table/cellRenderers/BooleanCellRenderer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAU5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAiF5D,iBAAS,2BAA2B,4CAmBnC;AAQD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBkC,CAAC;AAE7C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAkBlD,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAwBlB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AASF,eAAO,MAAM,QAAQ,EAAE,KA6DtB,CAAC"}