@arbor-education/design-system.components 0.15.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 (297) hide show
  1. package/.gather/skills/write-stories/SKILL.md +207 -271
  2. package/.storybook/preview.ts +5 -0
  3. package/CHANGELOG.md +17 -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 +2 -0
  131. package/dist/components/table/Table.stories.d.ts.map +1 -1
  132. package/dist/components/table/Table.stories.js +357 -3
  133. package/dist/components/table/Table.stories.js.map +1 -1
  134. package/dist/components/table/TableFooter.stories.d.ts +49 -0
  135. package/dist/components/table/TableFooter.stories.d.ts.map +1 -0
  136. package/dist/components/table/TableFooter.stories.js +137 -0
  137. package/dist/components/table/TableFooter.stories.js.map +1 -0
  138. package/dist/components/table/TableHeader.stories.d.ts +93 -0
  139. package/dist/components/table/TableHeader.stories.d.ts.map +1 -0
  140. package/dist/components/table/TableHeader.stories.js +176 -0
  141. package/dist/components/table/TableHeader.stories.js.map +1 -0
  142. package/dist/components/table/cellEditors/DateCellEditor.stories.d.ts +44 -0
  143. package/dist/components/table/cellEditors/DateCellEditor.stories.d.ts.map +1 -0
  144. package/dist/components/table/cellEditors/DateCellEditor.stories.js +186 -0
  145. package/dist/components/table/cellEditors/DateCellEditor.stories.js.map +1 -0
  146. package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.d.ts +40 -0
  147. package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.d.ts.map +1 -0
  148. package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.js +209 -0
  149. package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.js.map +1 -0
  150. package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.d.ts +48 -0
  151. package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.d.ts.map +1 -0
  152. package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.js +244 -0
  153. package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.js.map +1 -0
  154. package/dist/components/table/cellRenderers/CheckboxCellRenderer.d.ts.map +1 -1
  155. package/dist/components/table/cellRenderers/CheckboxCellRenderer.js +3 -1
  156. package/dist/components/table/cellRenderers/CheckboxCellRenderer.js.map +1 -1
  157. package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.d.ts +64 -0
  158. package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.d.ts.map +1 -0
  159. package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.js +241 -0
  160. package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.js.map +1 -0
  161. package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.d.ts +55 -0
  162. package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.d.ts.map +1 -0
  163. package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.js +245 -0
  164. package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.js.map +1 -0
  165. package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.d.ts +67 -0
  166. package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.d.ts.map +1 -0
  167. package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.js +221 -0
  168. package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.js.map +1 -0
  169. package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.d.ts +75 -0
  170. package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.d.ts.map +1 -0
  171. package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.js +270 -0
  172. package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.js.map +1 -0
  173. package/dist/components/table/columnFilters/BooleanFilter.stories.d.ts +57 -0
  174. package/dist/components/table/columnFilters/BooleanFilter.stories.d.ts.map +1 -0
  175. package/dist/components/table/columnFilters/BooleanFilter.stories.js +198 -0
  176. package/dist/components/table/columnFilters/BooleanFilter.stories.js.map +1 -0
  177. package/dist/components/table/columnFilters/TimeFilter.stories.d.ts +58 -0
  178. package/dist/components/table/columnFilters/TimeFilter.stories.d.ts.map +1 -0
  179. package/dist/components/table/columnFilters/TimeFilter.stories.js +207 -0
  180. package/dist/components/table/columnFilters/TimeFilter.stories.js.map +1 -0
  181. package/dist/components/table/pagination/PaginationPanel.stories.d.ts +113 -0
  182. package/dist/components/table/pagination/PaginationPanel.stories.d.ts.map +1 -0
  183. package/dist/components/table/pagination/PaginationPanel.stories.js +272 -0
  184. package/dist/components/table/pagination/PaginationPanel.stories.js.map +1 -0
  185. package/dist/components/table/tableControls/TableControls.stories.d.ts +151 -0
  186. package/dist/components/table/tableControls/TableControls.stories.d.ts.map +1 -0
  187. package/dist/components/table/tableControls/TableControls.stories.js +356 -0
  188. package/dist/components/table/tableControls/TableControls.stories.js.map +1 -0
  189. package/dist/components/table/tableControls/TableSettingsDropdown.d.ts +27 -1
  190. package/dist/components/table/tableControls/TableSettingsDropdown.d.ts.map +1 -1
  191. package/dist/components/table/tableControls/TableSettingsDropdown.js +53 -26
  192. package/dist/components/table/tableControls/TableSettingsDropdown.js.map +1 -1
  193. package/dist/components/table/tableControls/TableSettingsDropdown.test.d.ts +2 -0
  194. package/dist/components/table/tableControls/TableSettingsDropdown.test.d.ts.map +1 -0
  195. package/dist/components/table/tableControls/TableSettingsDropdown.test.js +178 -0
  196. package/dist/components/table/tableControls/TableSettingsDropdown.test.js.map +1 -0
  197. package/dist/components/tabs/Tabs.stories.d.ts +22 -4
  198. package/dist/components/tabs/Tabs.stories.d.ts.map +1 -1
  199. package/dist/components/tabs/Tabs.stories.js +398 -22
  200. package/dist/components/tabs/Tabs.stories.js.map +1 -1
  201. package/dist/components/tabs/TabsItem.stories.d.ts +54 -1
  202. package/dist/components/tabs/TabsItem.stories.d.ts.map +1 -1
  203. package/dist/components/tabs/TabsItem.stories.js +61 -9
  204. package/dist/components/tabs/TabsItem.stories.js.map +1 -1
  205. package/dist/components/toast/Toast.stories.d.ts +103 -10
  206. package/dist/components/toast/Toast.stories.d.ts.map +1 -1
  207. package/dist/components/toast/Toast.stories.js +409 -47
  208. package/dist/components/toast/Toast.stories.js.map +1 -1
  209. package/dist/components/toggle/Toggle.stories.d.ts +61 -46
  210. package/dist/components/toggle/Toggle.stories.d.ts.map +1 -1
  211. package/dist/components/toggle/Toggle.stories.js +311 -122
  212. package/dist/components/toggle/Toggle.stories.js.map +1 -1
  213. package/dist/components/tooltip/Tooltip.stories.d.ts +78 -6
  214. package/dist/components/tooltip/Tooltip.stories.d.ts.map +1 -1
  215. package/dist/components/tooltip/Tooltip.stories.js +413 -7
  216. package/dist/components/tooltip/Tooltip.stories.js.map +1 -1
  217. package/dist/components/tooltip/TooltipWrapper.stories.d.ts +71 -7
  218. package/dist/components/tooltip/TooltipWrapper.stories.d.ts.map +1 -1
  219. package/dist/components/tooltip/TooltipWrapper.stories.js +238 -10
  220. package/dist/components/tooltip/TooltipWrapper.stories.js.map +1 -1
  221. package/dist/index.css +8 -0
  222. package/dist/index.css.map +1 -1
  223. package/dist/utils/PopupParentContext.stories.d.ts +17 -0
  224. package/dist/utils/PopupParentContext.stories.d.ts.map +1 -0
  225. package/dist/utils/PopupParentContext.stories.js +266 -0
  226. package/dist/utils/PopupParentContext.stories.js.map +1 -0
  227. package/dist/utils/getDefaultPopupParent.d.ts.map +1 -1
  228. package/dist/utils/getDefaultPopupParent.js +6 -0
  229. package/dist/utils/getDefaultPopupParent.js.map +1 -1
  230. package/package.json +1 -1
  231. package/src/components/articleCard/ArticleCard.stories.tsx +524 -111
  232. package/src/components/avatar/Avatar.stories.tsx +504 -59
  233. package/src/components/avatarGroup/AvatarGroup.stories.tsx +977 -175
  234. package/src/components/banner/Banner.stories.tsx +7 -3
  235. package/src/components/card/Card.stories.tsx +466 -36
  236. package/src/components/combobox/Combobox.stories.tsx +867 -260
  237. package/src/components/datePicker/DatePicker.stories.tsx +777 -60
  238. package/src/components/dateTimePicker/DateTimePicker.stories.tsx +910 -132
  239. package/src/components/editableText/EditableText.stories.tsx +567 -91
  240. package/src/components/formField/FormField.test.tsx +6 -0
  241. package/src/components/formField/FormField.tsx +5 -0
  242. package/src/components/formField/fieldset/Fieldset.stories.tsx +761 -51
  243. package/src/components/formField/inputs/checkbox/CheckboxGroup.tsx +1 -1
  244. package/src/components/formField/inputs/checkbox/CheckboxInput.tsx +1 -1
  245. package/src/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.tsx +504 -11
  246. package/src/components/formField/inputs/radio/RadioButtonGroup.tsx +17 -4
  247. package/src/components/formField/inputs/radio/RadioButtonInput.stories.tsx +71 -59
  248. package/src/components/formField/inputs/selectDropdown/SelectDropdown.stories.tsx +1079 -168
  249. package/src/components/formField/inputs/time/TimeInput.stories.tsx +1140 -104
  250. package/src/components/formField/label/Label.stories.tsx +317 -8
  251. package/src/components/icoText/IcoText.stories.tsx +442 -31
  252. package/src/components/kpiCard/KPICard.stories.tsx +475 -30
  253. package/src/components/kvpList/KVPList.stories.tsx +593 -26
  254. package/src/components/modal/Modal.stories.tsx +963 -26
  255. package/src/components/modal/modalManager/ModalManager.stories.tsx +612 -454
  256. package/src/components/pill/Pill.stories.tsx +11 -13
  257. package/src/components/pill/Pill.tsx +1 -0
  258. package/src/components/row/Row.stories.tsx +474 -58
  259. package/src/components/searchBar/SearchBar.stories.tsx +570 -38
  260. package/src/components/section/Section.stories.tsx +723 -70
  261. package/src/components/singleUser/SingleUser.stories.tsx +393 -34
  262. package/src/components/slideoverManager/SlideoverManager.stories.tsx +572 -342
  263. package/src/components/table/DSDefaultColDef.ts +25 -5
  264. package/src/components/table/Table.stories.tsx +411 -3
  265. package/src/components/table/Table.tsx +9 -2
  266. package/src/components/table/TableFooter.stories.tsx +196 -0
  267. package/src/components/table/TableHeader.stories.tsx +251 -0
  268. package/src/components/table/cellEditors/DateCellEditor.stories.tsx +245 -0
  269. package/src/components/table/cellRenderers/BooleanCellRenderer.stories.tsx +278 -0
  270. package/src/components/table/cellRenderers/ButtonCellRenderer.stories.tsx +333 -0
  271. package/src/components/table/cellRenderers/CheckboxCellRenderer.stories.tsx +337 -0
  272. package/src/components/table/cellRenderers/CheckboxCellRenderer.tsx +5 -1
  273. package/src/components/table/cellRenderers/DefaultCellRenderer.stories.tsx +342 -0
  274. package/src/components/table/cellRenderers/InlineTextCellRenderer.stories.tsx +292 -0
  275. package/src/components/table/cellRenderers/SelectDropdownCellRenderer.stories.tsx +369 -0
  276. package/src/components/table/columnFilters/BooleanFilter.stories.tsx +268 -0
  277. package/src/components/table/columnFilters/TimeFilter.stories.tsx +281 -0
  278. package/src/components/table/pagination/PaginationPanel.stories.tsx +327 -0
  279. package/src/components/table/tableControls/TableControls.stories.tsx +415 -0
  280. package/src/components/table/tableControls/TableSettingsDropdown.test.tsx +207 -0
  281. package/src/components/table/tableControls/TableSettingsDropdown.tsx +103 -39
  282. package/src/components/tabs/Tabs.stories.tsx +540 -60
  283. package/src/components/tabs/TabsItem.stories.tsx +82 -8
  284. package/src/components/toast/Toast.stories.tsx +539 -77
  285. package/src/components/toggle/Toggle.stories.tsx +371 -135
  286. package/src/components/tooltip/Tooltip.stories.tsx +606 -15
  287. package/src/components/tooltip/TooltipWrapper.stories.tsx +348 -12
  288. package/src/docs/Contributing.mdx +241 -0
  289. package/src/docs/UsingComponents.mdx +93 -0
  290. package/src/docs/Welcome.mdx +68 -0
  291. package/src/global.scss +7 -0
  292. package/src/utils/PopupParentContext.stories.tsx +367 -0
  293. package/src/utils/getDefaultPopupParent.ts +6 -0
  294. package/.ralph/storybook-upgrade/knowledge.md +0 -308
  295. package/.ralph/storybook-upgrade/prd.json +0 -777
  296. package/.ralph/storybook-upgrade/progress.md +0 -342
  297. package/src/components/table/TableWIP.mdx +0 -3
@@ -0,0 +1,270 @@
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 { SelectDropdownCellRenderer } from './SelectDropdownCellRenderer';
4
+ import { Table } from '../../table/Table';
5
+ // ---------------------------------------------------------------------------
6
+ // Docs page content
7
+ // ---------------------------------------------------------------------------
8
+ const DESCRIPTION_INTRO = [
9
+ '`SelectDropdownCellRenderer` is an AG Grid cell renderer that renders an Arbor `SelectDropdown`',
10
+ 'permanently inside a table cell. It listens for `cellKeyDown` events on the Grid API to open the',
11
+ 'dropdown when the user presses Enter in the focused cell. On selection, it calls `node.setDataValue`',
12
+ 'to update the row data in-place.',
13
+ '',
14
+ 'Register it via the string key `dsSelectDropdownCellRenderer` (pre-registered by Arbor\'s `Table`) or by importing the component directly.',
15
+ ].join('\n');
16
+ const USAGE_GUIDANCE = [
17
+ '### When to use',
18
+ '',
19
+ '- On columns where the user must choose from a fixed list of options (status, category, type)',
20
+ '- When the options are the same for every row',
21
+ '',
22
+ '---',
23
+ '',
24
+ '### When NOT to use',
25
+ '',
26
+ '| Situation | Use instead |',
27
+ '|---|---|',
28
+ '| Options vary per row | A custom cell renderer with a `SelectDropdown` and per-row option logic |',
29
+ '| The user can select multiple options in one cell | Not currently supported — use a form in a modal |',
30
+ '| The list is very long (100+ options) | A searchable select or a modal with filtering |',
31
+ ].join('\n');
32
+ const DEVELOPER_NOTES = [
33
+ '### Critical usage patterns',
34
+ '',
35
+ '**`api` is required.**',
36
+ 'The renderer attaches a `cellKeyDown` listener to the Grid API on mount so that pressing Enter',
37
+ 'in the focused cell opens the dropdown. Without `api`, the keyboard shortcut is silently skipped',
38
+ 'but the dropdown still renders and is clickable.',
39
+ '',
40
+ '**`options` must be passed via `cellRendererParams`.**',
41
+ 'Options are not part of the cell `value` — configure them in `cellRendererParams`.',
42
+ 'Option `value` fields are normalised to strings internally for comparison, but the original value',
43
+ '(string or number) is restored when calling `node.setDataValue`.',
44
+ '',
45
+ '```tsx',
46
+ "import { Table } from '@arbor-education/design-system.components';",
47
+ '',
48
+ 'const colDefs = [',
49
+ ' {',
50
+ " field: 'status',",
51
+ " headerName: 'Status',",
52
+ " cellRenderer: 'dsSelectDropdownCellRenderer',",
53
+ ' cellRendererParams: {',
54
+ ' options: [',
55
+ " { label: 'Active', value: 'active' },",
56
+ " { label: 'Inactive', value: 'inactive' },",
57
+ " { label: 'Pending', value: 'pending' },",
58
+ ' ],',
59
+ " placeholder: 'Select status',",
60
+ ' },',
61
+ ' },',
62
+ '];',
63
+ '```',
64
+ '',
65
+ '---',
66
+ '',
67
+ '### Accessibility',
68
+ '',
69
+ 'Pressing Enter in a focused cell opens the dropdown — no mouse click required.',
70
+ 'The `SelectDropdown` handles full keyboard navigation internally (arrow keys, Enter/Escape).',
71
+ '',
72
+ '---',
73
+ '',
74
+ '### TypeScript types',
75
+ '',
76
+ '```ts',
77
+ "import { SelectDropdownCellRenderer } from '@arbor-education/design-system.components';",
78
+ '```',
79
+ '',
80
+ '`SelectDropdownCellRenderer` extends `CustomCellRendererProps` with `SelectDropdownInputProps`.',
81
+ '`options` and `placeholder` are the most commonly used extra props.',
82
+ ].join('\n');
83
+ const RELATED_COMPONENTS = [
84
+ '## Related components',
85
+ '',
86
+ '[Table](?path=/docs/components-table--docs) · [SelectDropdown](?path=/docs/components-selectdropdown--docs) · [InlineTextCellRenderer](?path=/docs/components-table-cellrenderers-inlinetextcellrenderer--docs)',
87
+ ].join('\n');
88
+ const PROPS_INTRO = 'The preview below shows `SelectDropdownCellRenderer` with a set of status options. The dropdown can be opened by clicking it — the Enter-key shortcut requires a live AG Grid API and is a no-op in this preview.';
89
+ // ---------------------------------------------------------------------------
90
+ // Custom DocsPage
91
+ // ---------------------------------------------------------------------------
92
+ function SelectDropdownCellRendererDocsPage() {
93
+ 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 })] }));
94
+ }
95
+ // ---------------------------------------------------------------------------
96
+ // Meta
97
+ // ---------------------------------------------------------------------------
98
+ const MOCK_API = {
99
+ addEventListener: () => { },
100
+ removeEventListener: () => { },
101
+ };
102
+ const MOCK_CELL_PROPS = {};
103
+ const STATUS_OPTIONS = [
104
+ { label: 'Active', value: 'active' },
105
+ { label: 'Inactive', value: 'inactive' },
106
+ { label: 'Pending', value: 'pending' },
107
+ ];
108
+ const meta = {
109
+ title: 'Components/Table/CellRenderers/SelectDropdownCellRenderer',
110
+ component: SelectDropdownCellRenderer,
111
+ tags: ['autodocs'],
112
+ parameters: {
113
+ layout: 'padded',
114
+ docs: { page: SelectDropdownCellRendererDocsPage },
115
+ },
116
+ argTypes: {
117
+ value: {
118
+ control: false,
119
+ description: 'The currently selected option value. Used to set the initial selection in the `SelectDropdown`.',
120
+ table: {
121
+ type: { summary: 'string | number | null | undefined' },
122
+ },
123
+ },
124
+ options: {
125
+ control: false,
126
+ description: 'The list of options to display in the dropdown. Passed via `cellRendererParams` in the column definition.',
127
+ table: {
128
+ type: { summary: 'Array<{ label: string; value: string | number }>' },
129
+ defaultValue: { summary: '[]' },
130
+ },
131
+ },
132
+ placeholder: {
133
+ control: false,
134
+ description: 'Placeholder text shown when no option is selected.',
135
+ table: {
136
+ type: { summary: 'string' },
137
+ defaultValue: { summary: '"Select"' },
138
+ },
139
+ },
140
+ api: {
141
+ control: false,
142
+ description: 'AG Grid API. Required for the Enter-key shortcut that opens the dropdown. Provided automatically by AG Grid.',
143
+ table: { type: { summary: 'GridApi' } },
144
+ },
145
+ node: {
146
+ control: false,
147
+ description: 'AG Grid row node. The renderer calls `node.setDataValue` on option selection.',
148
+ table: { type: { summary: 'IRowNode' } },
149
+ },
150
+ },
151
+ };
152
+ export default meta;
153
+ // ---------------------------------------------------------------------------
154
+ // Helper: attach a per-story description to docs
155
+ // ---------------------------------------------------------------------------
156
+ const withDescription = (story, description) => ({
157
+ ...story,
158
+ parameters: {
159
+ ...story.parameters,
160
+ docs: { ...story.parameters?.docs, description: { story: description } },
161
+ },
162
+ });
163
+ // ---------------------------------------------------------------------------
164
+ // Stories
165
+ // ---------------------------------------------------------------------------
166
+ export const Default = withDescription({
167
+ parameters: { controls: { disable: true } },
168
+ render: () => (_jsx(SelectDropdownCellRenderer, { ...MOCK_CELL_PROPS, api: MOCK_API, value: "", options: STATUS_OPTIONS, placeholder: "Select status", node: { setDataValue: () => { } }, column: {} })),
169
+ }, 'No selection — the `SelectDropdown` shows the placeholder text. Click to open the dropdown and select an option.');
170
+ export const WithSelection = withDescription({
171
+ parameters: {
172
+ controls: { disable: true },
173
+ docs: {
174
+ source: {
175
+ language: 'tsx',
176
+ code: `
177
+ import { Table } from '@arbor-education/design-system.components';
178
+
179
+ const colDefs = [
180
+ {
181
+ field: 'status',
182
+ headerName: 'Status',
183
+ cellRenderer: 'dsSelectDropdownCellRenderer',
184
+ cellRendererParams: {
185
+ options: [
186
+ { label: 'Active', value: 'active' },
187
+ { label: 'Inactive', value: 'inactive' },
188
+ { label: 'Pending', value: 'pending' },
189
+ ],
190
+ placeholder: 'Select status',
191
+ },
192
+ },
193
+ ];
194
+ `.trim(),
195
+ },
196
+ },
197
+ },
198
+ render: () => (_jsx(SelectDropdownCellRenderer, { ...MOCK_CELL_PROPS, api: MOCK_API, value: "active", options: STATUS_OPTIONS, placeholder: "Select status", node: { setDataValue: () => { } }, column: {} })),
199
+ }, 'Pre-selected with `value="active"`. The `SelectDropdown` initialises with the matching option selected.');
200
+ export const Disabled = withDescription({
201
+ parameters: { controls: { disable: true } },
202
+ render: () => (_jsx(SelectDropdownCellRenderer, { ...MOCK_CELL_PROPS, api: MOCK_API, value: "active", options: STATUS_OPTIONS, placeholder: "Select status", disabled: true, node: { setDataValue: () => { } }, column: {} })),
203
+ }, 'Pass `disabled: true` via `cellRendererParams` to prevent the user from changing the selection for specific rows.');
204
+ const SELECT_IN_TABLE_DATA = [
205
+ { name: 'Alice Johnson', status: 'active' },
206
+ { name: 'Bob Smith', status: 'inactive' },
207
+ { name: 'Charlie Brown', status: 'pending' },
208
+ { name: 'Diana Prince', status: 'active' },
209
+ ];
210
+ export const InATable = withDescription({
211
+ parameters: {
212
+ controls: { disable: true },
213
+ docs: {
214
+ source: {
215
+ language: 'tsx',
216
+ code: `
217
+ import { Table } from '@arbor-education/design-system.components';
218
+
219
+ const rowData = [
220
+ { name: 'Alice Johnson', status: 'active' },
221
+ { name: 'Bob Smith', status: 'inactive' },
222
+ { name: 'Charlie Brown', status: 'pending' },
223
+ { name: 'Diana Prince', status: 'active' },
224
+ ];
225
+
226
+ const statusOptions = [
227
+ { label: 'Active', value: 'active' },
228
+ { label: 'Inactive', value: 'inactive' },
229
+ { label: 'Pending', value: 'pending' },
230
+ ];
231
+
232
+ function SelectDropdownCellRendererExample() {
233
+ return (
234
+ <Table
235
+ rowData={rowData}
236
+ columnDefs={[
237
+ { field: 'name', headerName: 'Name', flex: 2 },
238
+ {
239
+ field: 'status',
240
+ headerName: 'Status',
241
+ flex: 1,
242
+ editable: false,
243
+ cellRenderer: 'dsSelectDropdownCellRenderer',
244
+ cellRendererParams: { options: statusOptions },
245
+ },
246
+ ]}
247
+ defaultColDef={{ flex: 1, minWidth: 120 }}
248
+ domLayout="autoHeight"
249
+ />
250
+ );
251
+ }
252
+
253
+ export default SelectDropdownCellRendererExample;
254
+ `.trim(),
255
+ },
256
+ },
257
+ },
258
+ render: () => (_jsx(Table, { rowData: SELECT_IN_TABLE_DATA, columnDefs: [
259
+ { field: 'name', headerName: 'Name', flex: 2 },
260
+ {
261
+ field: 'status',
262
+ headerName: 'Status',
263
+ flex: 1,
264
+ editable: false,
265
+ cellRenderer: 'dsSelectDropdownCellRenderer',
266
+ cellRendererParams: { options: STATUS_OPTIONS },
267
+ },
268
+ ], defaultColDef: { flex: 1, minWidth: 120 }, domLayout: "autoHeight" })),
269
+ }, '`dsSelectDropdownCellRenderer` wired up inside a full `Table`. Click a Status dropdown to select a new value — the selection is committed to the row via `node.setDataValue`. Press Enter in a focused Status cell to open the dropdown via keyboard.');
270
+ //# sourceMappingURL=SelectDropdownCellRenderer.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectDropdownCellRenderer.stories.js","sourceRoot":"","sources":["../../../../src/components/table/cellRenderers/SelectDropdownCellRenderer.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;AAGtC,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,MAAM,iBAAiB,GAAG;IACxB,iGAAiG;IACjG,kGAAkG;IAClG,sGAAsG;IACtG,kCAAkC;IAClC,EAAE;IACF,4IAA4I;CAC7I,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,cAAc,GAAG;IACrB,iBAAiB;IACjB,EAAE;IACF,+FAA+F;IAC/F,+CAA+C;IAC/C,EAAE;IACF,KAAK;IACL,EAAE;IACF,qBAAqB;IACrB,EAAE;IACF,6BAA6B;IAC7B,WAAW;IACX,oGAAoG;IACpG,wGAAwG;IACxG,0FAA0F;CAC3F,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,eAAe,GAAG;IACtB,6BAA6B;IAC7B,EAAE;IACF,wBAAwB;IACxB,gGAAgG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F,MAAM,CAAC,MAAM,QAAQ,GAAU,eAAe,CAC5C;IACE,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;QAC3B,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCf,CAAC,IAAI,EAAE;aACC;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,CACZ,KAAC,KAAK,IACJ,OAAO,EAAE,oBAAoB,EAC7B,UAAU,EAAE;YACV,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE;YAC9C;gBACE,KAAK,EAAE,QAAQ;gBACf,UAAU,EAAE,QAAQ;gBACpB,IAAI,EAAE,CAAC;gBACP,QAAQ,EAAE,KAAK;gBACf,YAAY,EAAE,8BAA8B;gBAC5C,kBAAkB,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;aAChD;SACF,EACD,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,EACzC,SAAS,EAAC,YAAY,GACtB,CACH;CACF,EACD,uPAAuP,CACxP,CAAC"}
@@ -0,0 +1,57 @@
1
+ import type { StoryObj } from '@storybook/react-vite';
2
+ import { BooleanFilter } from './BooleanFilter/BooleanFilter';
3
+ declare function BooleanFilterDocsPage(): import("react/jsx-runtime").JSX.Element;
4
+ declare const meta: {
5
+ title: string;
6
+ component: (props: {
7
+ model: {
8
+ allowTrue: boolean;
9
+ allowFalse: boolean;
10
+ } | null;
11
+ onModelChange: (model: {
12
+ allowTrue: boolean;
13
+ allowFalse: boolean;
14
+ }) => void;
15
+ }) => import("react/jsx-runtime").JSX.Element;
16
+ tags: string[];
17
+ parameters: {
18
+ layout: string;
19
+ docs: {
20
+ page: typeof BooleanFilterDocsPage;
21
+ };
22
+ };
23
+ argTypes: {
24
+ model: {
25
+ description: string;
26
+ control: false;
27
+ table: {
28
+ type: {
29
+ summary: string;
30
+ };
31
+ defaultValue: {
32
+ summary: string;
33
+ };
34
+ };
35
+ };
36
+ onModelChange: {
37
+ description: string;
38
+ control: false;
39
+ table: {
40
+ type: {
41
+ summary: string;
42
+ };
43
+ };
44
+ };
45
+ };
46
+ args: {
47
+ onModelChange: import("@vitest/spy").Mock<(...args: any[]) => any>;
48
+ };
49
+ };
50
+ export default meta;
51
+ type Story = StoryObj<typeof BooleanFilter>;
52
+ export declare const Default: Story;
53
+ export declare const YesSelected: Story;
54
+ export declare const NoSelected: Story;
55
+ export declare const Controlled: Story;
56
+ export declare const InATable: Story;
57
+ //# sourceMappingURL=BooleanFilter.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BooleanFilter.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/table/columnFilters/BooleanFilter.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAW5D,OAAO,EAAE,aAAa,EAAyB,MAAM,+BAA+B,CAAC;AAgErF,iBAAS,qBAAqB,4CAiB7B;AAMD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuB4B,CAAC;AAEvC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAc5C,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KASzB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KASxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAgBxB,CAAC;AAUF,eAAO,MAAM,QAAQ,EAAE,KAsEtB,CAAC"}
@@ -0,0 +1,198 @@
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 { BooleanFilter, doesBooleanFilterPass } from './BooleanFilter/BooleanFilter';
6
+ import { Table } from '../../table/Table';
7
+ // ---------------------------------------------------------------------------
8
+ // Docs page content
9
+ // ---------------------------------------------------------------------------
10
+ const DESCRIPTION_INTRO = [
11
+ '`BooleanFilter` is an AG Grid column filter component for boolean columns.',
12
+ 'It renders a radio group with three options — **Yes**, **No**, and **Not set** —',
13
+ 'and calls `onModelChange` with a `{ allowTrue, allowFalse }` model whenever the selection changes.',
14
+ '',
15
+ 'Register it via the AG Grid `filter` column definition property alongside `doesBooleanFilterPass`.',
16
+ ].join('\n');
17
+ const USAGE_GUIDANCE = [
18
+ '### When to use',
19
+ '',
20
+ '- On boolean columns (active/inactive, yes/no flags) that need a user-friendly filter UI',
21
+ '- When you want a three-state filter: show all `true`, show all `false`, or show everything',
22
+ '',
23
+ '---',
24
+ '',
25
+ '### Registration',
26
+ '',
27
+ '```tsx',
28
+ "import { BooleanFilter, doesBooleanFilterPass } from '@arbor-education/design-system.components';",
29
+ '',
30
+ 'const colDefs = [',
31
+ ' {',
32
+ " field: 'isActive',",
33
+ ' filter: { component: BooleanFilter, doesFilterPass: doesBooleanFilterPass },',
34
+ ' },',
35
+ '];',
36
+ '```',
37
+ '',
38
+ '---',
39
+ '',
40
+ '### Filter model',
41
+ '',
42
+ '```ts',
43
+ 'type BooleanFilterModel = {',
44
+ ' allowTrue: boolean;',
45
+ ' allowFalse: boolean;',
46
+ '};',
47
+ '',
48
+ '// Yes selected: { allowTrue: true, allowFalse: false }',
49
+ '// No selected: { allowTrue: false, allowFalse: true }',
50
+ '// Not set / All: { allowTrue: true, allowFalse: true }',
51
+ '```',
52
+ ].join('\n');
53
+ const RELATED_COMPONENTS = [
54
+ '## Related components',
55
+ '',
56
+ '[Table](?path=/docs/components-table--docs) · [TimeFilter](?path=/docs/components-table-columnfilters-timefilter--docs)',
57
+ ].join('\n');
58
+ const PROPS_INTRO = 'The preview below is interactive — click the radio buttons to see the filter model update in the **Actions** panel.';
59
+ // ---------------------------------------------------------------------------
60
+ // Custom DocsPage
61
+ // ---------------------------------------------------------------------------
62
+ function BooleanFilterDocsPage() {
63
+ 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 })] }));
64
+ }
65
+ // ---------------------------------------------------------------------------
66
+ // Meta
67
+ // ---------------------------------------------------------------------------
68
+ const meta = {
69
+ title: 'Components/Table/ColumnFilters/BooleanFilter',
70
+ component: BooleanFilter,
71
+ tags: ['autodocs'],
72
+ parameters: {
73
+ layout: 'padded',
74
+ docs: { page: BooleanFilterDocsPage },
75
+ },
76
+ argTypes: {
77
+ model: {
78
+ description: 'The current filter model. `null` means no filter is active (same as Not set). Pass `{ allowTrue, allowFalse }` to set a specific state.',
79
+ control: false,
80
+ table: { type: { summary: '{ allowTrue: boolean; allowFalse: boolean } | null' }, defaultValue: { summary: 'null' } },
81
+ },
82
+ onModelChange: {
83
+ description: 'Called whenever the user changes the filter selection. Receives the new `{ allowTrue, allowFalse }` model.',
84
+ control: false,
85
+ table: { type: { summary: '(model: BooleanFilterModel) => void' } },
86
+ },
87
+ },
88
+ args: {
89
+ onModelChange: fn(),
90
+ },
91
+ };
92
+ export default meta;
93
+ const withDescription = (story, description) => ({
94
+ ...story,
95
+ parameters: {
96
+ ...story.parameters,
97
+ docs: { ...story.parameters?.docs, description: { story: description } },
98
+ },
99
+ });
100
+ // ---------------------------------------------------------------------------
101
+ // Stories
102
+ // ---------------------------------------------------------------------------
103
+ export const Default = withDescription({
104
+ args: {
105
+ model: null,
106
+ onModelChange: fn(),
107
+ },
108
+ }, 'No active filter (`model: null`) — all three options visible, **Not set** selected by default.');
109
+ export const YesSelected = withDescription({
110
+ parameters: { controls: { disable: true } },
111
+ args: {
112
+ model: { allowTrue: true, allowFalse: false },
113
+ onModelChange: fn(),
114
+ },
115
+ }, '**Yes** selected — filter model is `{ allowTrue: true, allowFalse: false }`. Only rows with `true` in this column pass the filter.');
116
+ export const NoSelected = withDescription({
117
+ parameters: { controls: { disable: true } },
118
+ args: {
119
+ model: { allowTrue: false, allowFalse: true },
120
+ onModelChange: fn(),
121
+ },
122
+ }, '**No** selected — filter model is `{ allowTrue: false, allowFalse: true }`. Only rows with `false` in this column pass the filter.');
123
+ export const Controlled = withDescription({
124
+ parameters: { controls: { disable: true } },
125
+ render: () => {
126
+ const [model, setModel] = React.useState(null);
127
+ return (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '12px' }, children: [_jsx(BooleanFilter, { model: model, onModelChange: setModel }), _jsx("pre", { style: { fontSize: '12px', background: 'var(--color-neutral-50)', padding: '8px', borderRadius: '4px' }, children: JSON.stringify(model, null, 2) ?? 'null' })] }));
128
+ },
129
+ }, 'Fully controlled — the current model is rendered below the filter as JSON. Click the radio buttons to see the model update.');
130
+ const BOOLEAN_FILTER_IN_TABLE_DATA = [
131
+ { name: 'Alice Johnson', active: true },
132
+ { name: 'Bob Smith', active: false },
133
+ { name: 'Charlie Brown', active: true },
134
+ { name: 'Diana Prince', active: false },
135
+ { name: 'Ethan Hunt', active: true },
136
+ ];
137
+ export const InATable = withDescription({
138
+ parameters: {
139
+ controls: { disable: true },
140
+ docs: {
141
+ source: {
142
+ language: 'tsx',
143
+ code: `
144
+ import {
145
+ Table,
146
+ BooleanFilter,
147
+ doesBooleanFilterPass,
148
+ } from '@arbor-education/design-system.components';
149
+
150
+ const rowData = [
151
+ { name: 'Alice Johnson', active: true },
152
+ { name: 'Bob Smith', active: false },
153
+ { name: 'Charlie Brown', active: true },
154
+ { name: 'Diana Prince', active: false },
155
+ { name: 'Ethan Hunt', active: true },
156
+ ];
157
+
158
+ function BooleanFilterExample() {
159
+ return (
160
+ <Table
161
+ rowData={rowData}
162
+ columnDefs={[
163
+ { field: 'name', headerName: 'Name', flex: 2 },
164
+ {
165
+ field: 'active',
166
+ headerName: 'Active',
167
+ flex: 1,
168
+ editable: false,
169
+ cellRenderer: 'dsBooleanCellRenderer',
170
+ filter: { component: BooleanFilter, doesFilterPass: doesBooleanFilterPass },
171
+ suppressHeaderFilterButton: false,
172
+ },
173
+ ]}
174
+ defaultColDef={{ flex: 1, minWidth: 120, suppressHeaderFilterButton: true }}
175
+ domLayout="autoHeight"
176
+ />
177
+ );
178
+ }
179
+
180
+ export default BooleanFilterExample;
181
+ `.trim(),
182
+ },
183
+ },
184
+ },
185
+ render: () => (_jsx(Table, { rowData: BOOLEAN_FILTER_IN_TABLE_DATA, columnDefs: [
186
+ { field: 'name', headerName: 'Name', flex: 2 },
187
+ {
188
+ field: 'active',
189
+ headerName: 'Active',
190
+ flex: 1,
191
+ editable: false,
192
+ cellRenderer: 'dsBooleanCellRenderer',
193
+ filter: { component: BooleanFilter, doesFilterPass: doesBooleanFilterPass },
194
+ suppressHeaderFilterButton: false,
195
+ },
196
+ ], defaultColDef: { flex: 1, minWidth: 120, suppressHeaderFilterButton: true }, domLayout: "autoHeight" })),
197
+ }, '`BooleanFilter` wired up inside a full `Table`. Click the funnel icon in the **Active** column header to open the filter panel — select **Yes**, **No**, or **Not set** to filter the rows. The Active column also uses `dsBooleanCellRenderer` to show check/✕ icons.');
198
+ //# sourceMappingURL=BooleanFilter.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BooleanFilter.stories.js","sourceRoot":"","sources":["../../../../src/components/table/columnFilters/BooleanFilter.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;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E,QAAQ;gBACpB,IAAI,EAAE,CAAC;gBACP,QAAQ,EAAE,KAAK;gBACf,YAAY,EAAE,uBAAuB;gBACrC,MAAM,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,qBAAqB,EAAE;gBAC3E,0BAA0B,EAAE,KAAK;aAClC;SACF,EACD,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,0BAA0B,EAAE,IAAI,EAAE,EAC3E,SAAS,EAAC,YAAY,GACtB,CACH;CACF,EACD,wQAAwQ,CACzQ,CAAC"}
@@ -0,0 +1,58 @@
1
+ import type { StoryObj } from '@storybook/react-vite';
2
+ import { TimeFilter } from './TimeFilter/TimeFilter';
3
+ declare function TimeFilterDocsPage(): import("react/jsx-runtime").JSX.Element;
4
+ declare const meta: {
5
+ title: string;
6
+ component: (props: {
7
+ model: {
8
+ filterType: import("./TimeFilter/utils/compareTimeByFilterType").FilterType;
9
+ pivot: string;
10
+ } | null;
11
+ onModelChange: (model: {
12
+ filterType: import("./TimeFilter/utils/compareTimeByFilterType").FilterType;
13
+ pivot: string;
14
+ }) => void;
15
+ }) => import("react/jsx-runtime").JSX.Element;
16
+ tags: string[];
17
+ parameters: {
18
+ layout: string;
19
+ docs: {
20
+ page: typeof TimeFilterDocsPage;
21
+ };
22
+ };
23
+ argTypes: {
24
+ model: {
25
+ description: string;
26
+ control: false;
27
+ table: {
28
+ type: {
29
+ summary: string;
30
+ };
31
+ defaultValue: {
32
+ summary: string;
33
+ };
34
+ };
35
+ };
36
+ onModelChange: {
37
+ description: string;
38
+ control: false;
39
+ table: {
40
+ type: {
41
+ summary: string;
42
+ };
43
+ };
44
+ };
45
+ };
46
+ args: {
47
+ onModelChange: import("@vitest/spy").Mock<(...args: any[]) => any>;
48
+ };
49
+ };
50
+ export default meta;
51
+ type Story = StoryObj<typeof TimeFilter>;
52
+ export declare const Default: Story;
53
+ export declare const BeforeNoon: Story;
54
+ export declare const AfterNine: Story;
55
+ export declare const ExactTime: Story;
56
+ export declare const Controlled: Story;
57
+ export declare const InATable: Story;
58
+ //# sourceMappingURL=TimeFilter.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimeFilter.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/table/columnFilters/TimeFilter.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAW5D,OAAO,EAAE,UAAU,EAAsB,MAAM,yBAAyB,CAAC;AAoEzE,iBAAS,kBAAkB,4CAiB1B;AAMD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuByB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAczC,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KASxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KASvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KASvB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAgBxB,CAAC;AAUF,eAAO,MAAM,QAAQ,EAAE,KAoEtB,CAAC"}