@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,266 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRef } from 'react';
3
+ import { Heading as DocHeading, Markdown, Stories, Subtitle, Title, } from '@storybook/addon-docs/blocks';
4
+ import { PopupParentContext } from './PopupParentContext';
5
+ import { Button } from '../components/button/Button';
6
+ import { Dropdown } from '../components/dropdown/Dropdown';
7
+ // ---------------------------------------------------------------------------
8
+ // Docs page content
9
+ // ---------------------------------------------------------------------------
10
+ const DESCRIPTION_INTRO = [
11
+ '`PopupParentContext` is a React context that controls where portalled floating elements',
12
+ '— dropdowns, tooltips, date pickers, comboboxes — are rendered in the DOM.',
13
+ 'In most applications you do **not** need to configure this: the default behaviour portals all floating',
14
+ 'content to a shared `<div id="ds-popup-parent">` appended to `document.body`.',
15
+ ].join(' ');
16
+ const USAGE_GUIDANCE = [
17
+ '### When you need PopupParentContext',
18
+ '',
19
+ '- **Custom virtualised panels** — when your layout clips content with `overflow: hidden` AND you need',
20
+ ' popups to appear inside that container (not body), provide a ref to a container element inside the',
21
+ ' clip boundary',
22
+ '- **Non-Arbor modals and drawers** — if you wrap Arbor components inside a third-party modal, floating',
23
+ ' elements may render beneath the modal overlay due to z-index stacking. Provide a container inside the',
24
+ ' modal to keep popups on top',
25
+ '- **Custom stacking contexts** — when `transform`, `isolation`, or `will-change` creates a stacking',
26
+ ' context above `z-index: 1` (the default popup parent z-index), popups may appear beneath fixed UI',
27
+ ' chrome. Move the container inside the stacking context',
28
+ '',
29
+ '---',
30
+ '',
31
+ '### When you do NOT need PopupParentContext',
32
+ '',
33
+ '| Situation | Why you are safe |',
34
+ '|---|---|',
35
+ '| `Dropdown`, `Tooltip`, `Combobox` in a standard page layout | Default context portals to `document.body` — no clipping |',
36
+ '| Floating elements inside Arbor `Modal` | Modal provides its overlay as the popup parent automatically |',
37
+ '| `Table` column filters | `BooleanFilter` and `TimeFilter` wrap their children in a provider automatically |',
38
+ ].join('\n');
39
+ const DEVELOPER_NOTES = [
40
+ '### Components that consume PopupParentContext',
41
+ '',
42
+ '| Component | What gets portalled |',
43
+ '|---|---|',
44
+ '| `Dropdown` | `Dropdown.Content` panel |',
45
+ '| `Tooltip` | Tooltip bubble |',
46
+ '| `Combobox` | Options listbox |',
47
+ '| `DatePicker` | Calendar popup |',
48
+ '| `DateTimePicker` | Calendar + time popup |',
49
+ '| `Modal` | Modal overlay (also provides itself as parent for any floating elements inside) |',
50
+ '| `SlideoverManager` | Slideover panel |',
51
+ '| `Table` column filters | `BooleanFilter`, `TimeFilter` (wraps automatically) |',
52
+ '',
53
+ '---',
54
+ '',
55
+ '### Usage',
56
+ '',
57
+ '```tsx',
58
+ 'import { useRef } from \'react\';',
59
+ 'import { PopupParentContext, Dropdown } from \'@arbor-education/design-system.components\';',
60
+ '',
61
+ 'function ClippedPanel() {',
62
+ ' // ref points to the container that should receive portalled content',
63
+ ' const popupContainerRef = useRef<HTMLDivElement>(null);',
64
+ '',
65
+ ' return (',
66
+ ' <div style={{ position: \'relative\', overflow: \'hidden\', maxHeight: 300 }}>',
67
+ ' {/*',
68
+ ' This div sits OUTSIDE the overflow:hidden clip boundary.',
69
+ ' Floating elements portal here instead of document.body.',
70
+ ' */}',
71
+ ' <div ref={popupContainerRef} style={{ position: \'fixed\', zIndex: 100 }} />',
72
+ '',
73
+ ' <PopupParentContext.Provider value={popupContainerRef}>',
74
+ ' <Dropdown>',
75
+ ' <Dropdown.Trigger>',
76
+ ' <Button variant="dropdown">Actions</Button>',
77
+ ' </Dropdown.Trigger>',
78
+ ' <Dropdown.Content>',
79
+ ' <Dropdown.Item>Edit record</Dropdown.Item>',
80
+ ' <Dropdown.Item>Delete record</Dropdown.Item>',
81
+ ' </Dropdown.Content>',
82
+ ' </Dropdown>',
83
+ ' </PopupParentContext.Provider>',
84
+ ' </div>',
85
+ ' );',
86
+ '}',
87
+ '```',
88
+ '',
89
+ '---',
90
+ '',
91
+ '### Default behaviour',
92
+ '',
93
+ 'When no provider wraps your component tree, `PopupParentContext` falls back to a ref pointing to',
94
+ '`div#ds-popup-parent`. This element is created once and appended to `document.body` with',
95
+ '`position: fixed; z-index: 1`. All floating elements on the page share it.',
96
+ '',
97
+ 'You can pre-create this element for SSR environments:',
98
+ '```html',
99
+ '<div id="ds-popup-parent" style="position: fixed; z-index: 1;"></div>',
100
+ '```',
101
+ '',
102
+ '---',
103
+ '',
104
+ '### Accessibility',
105
+ '',
106
+ '- Portalling to `document.body` or a fixed container does not break focus management — Radix UI',
107
+ ' and the DS components handle focus trapping and restoration internally',
108
+ '- Ensure the portal container has no `aria-hidden` ancestor — this would hide portalled content from',
109
+ ' assistive technology even if it is visible on screen',
110
+ ].join('\n');
111
+ const RELATED_COMPONENTS = [
112
+ '## Related components',
113
+ '',
114
+ '[Dropdown](?path=/docs/components-dropdown--docs) · [Tooltip](?path=/docs/components-tooltip--docs) · [Combobox](?path=/docs/components-combobox--docs) · [DatePicker](?path=/docs/components-datepicker--docs) · [Modal](?path=/docs/components-modal--docs)',
115
+ ].join('\n');
116
+ // ---------------------------------------------------------------------------
117
+ // Docs page
118
+ // ---------------------------------------------------------------------------
119
+ function PopupParentContextDocsPage() {
120
+ return (_jsxs(_Fragment, { children: [_jsx(Title, {}), _jsx(Subtitle, {}), _jsx(Markdown, { children: DESCRIPTION_INTRO }), _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 })] }));
121
+ }
122
+ // ---------------------------------------------------------------------------
123
+ // Meta
124
+ // ---------------------------------------------------------------------------
125
+ const meta = {
126
+ title: 'Utils/PopupParentContext',
127
+ parameters: {
128
+ layout: 'padded',
129
+ docs: {
130
+ page: PopupParentContextDocsPage,
131
+ },
132
+ },
133
+ tags: ['autodocs'],
134
+ };
135
+ export default meta;
136
+ // ---------------------------------------------------------------------------
137
+ // Helper
138
+ // ---------------------------------------------------------------------------
139
+ const withDescription = (story, description) => ({
140
+ ...story,
141
+ parameters: {
142
+ ...story.parameters,
143
+ docs: {
144
+ ...story.parameters?.docs,
145
+ description: {
146
+ story: description,
147
+ },
148
+ },
149
+ },
150
+ });
151
+ // ---------------------------------------------------------------------------
152
+ // Templates
153
+ // ---------------------------------------------------------------------------
154
+ const DefaultTemplate = () => (_jsxs("div", { style: {
155
+ border: 'var(--border-weight) solid var(--color-grey-200)',
156
+ borderRadius: 'var(--border-radius-small)',
157
+ padding: 'var(--spacing-medium)',
158
+ overflow: 'hidden',
159
+ maxHeight: '120px',
160
+ display: 'flex',
161
+ flexDirection: 'column',
162
+ gap: 'var(--spacing-small)',
163
+ }, children: [_jsxs("p", { style: { margin: 0, fontSize: 'var(--font-size-2-13)', color: 'var(--color-grey-700)' }, children: ["This panel has", ' ', _jsx("code", { children: "overflow: hidden" }), ' ', "\u2014 yet the dropdown opens correctly."] }), _jsxs(Dropdown, { children: [_jsx(Dropdown.Trigger, { children: _jsx(Button, { variant: "dropdown", children: "Actions" }) }), _jsxs(Dropdown.Content, { children: [_jsx(Dropdown.Item, { children: "View pupil profile" }), _jsx(Dropdown.Item, { children: "Edit enrolment" }), _jsx(Dropdown.Separator, {}), _jsx(Dropdown.Item, { children: "Remove from group" })] })] })] }));
164
+ const WithCustomContainerTemplate = () => {
165
+ const popupContainerRef = useRef(null);
166
+ return (_jsxs("div", { style: { position: 'relative', display: 'flex', flexDirection: 'column', gap: 'var(--spacing-small)' }, children: [_jsxs("p", { style: { margin: 0, fontSize: 'var(--font-size-2-13)', color: 'var(--color-grey-700)' }, children: ["The dropdown portals into", ' ', _jsx("code", { children: "popupContainerRef" }), ' ', "(the pink border below) instead of", ' ', _jsx("code", { children: "document.body" }), "."] }), _jsx("div", { ref: popupContainerRef, style: {
167
+ position: 'relative',
168
+ zIndex: 10,
169
+ border: '2px dashed var(--color-semantic-destructive-300)',
170
+ borderRadius: 'var(--border-radius-small)',
171
+ padding: 'var(--spacing-xsmall)',
172
+ minHeight: '2rem',
173
+ }, "aria-label": "Custom popup container" }), _jsx(PopupParentContext.Provider, { value: popupContainerRef, children: _jsxs(Dropdown, { children: [_jsx(Dropdown.Trigger, { children: _jsx(Button, { variant: "dropdown", children: "Actions" }) }), _jsxs(Dropdown.Content, { children: [_jsx(Dropdown.Item, { children: "View pupil profile" }), _jsx(Dropdown.Item, { children: "Edit enrolment" }), _jsx(Dropdown.Separator, {}), _jsx(Dropdown.Item, { children: "Remove from group" })] })] }) })] }));
174
+ };
175
+ // ---------------------------------------------------------------------------
176
+ // Stories
177
+ // ---------------------------------------------------------------------------
178
+ export const Default = withDescription({
179
+ render: DefaultTemplate,
180
+ parameters: {
181
+ controls: { disable: true },
182
+ docs: {
183
+ source: {
184
+ language: 'tsx',
185
+ code: `
186
+ import { Dropdown, Button } from '@arbor-education/design-system.components';
187
+
188
+ // No PopupParentContext setup needed — the dropdown portals to document.body automatically.
189
+ function PupilActionsDropdown() {
190
+ return (
191
+ <Dropdown>
192
+ <Dropdown.Trigger>
193
+ <Button variant="dropdown">Actions</Button>
194
+ </Dropdown.Trigger>
195
+ <Dropdown.Content>
196
+ <Dropdown.Item>View pupil profile</Dropdown.Item>
197
+ <Dropdown.Item>Edit enrolment</Dropdown.Item>
198
+ <Dropdown.Separator />
199
+ <Dropdown.Item>Remove from group</Dropdown.Item>
200
+ </Dropdown.Content>
201
+ </Dropdown>
202
+ );
203
+ }
204
+ export default PupilActionsDropdown;
205
+ `.trim(),
206
+ },
207
+ },
208
+ },
209
+ }, [
210
+ 'The default behaviour — no `PopupParentContext` setup required.',
211
+ 'The dropdown portals its content to `div#ds-popup-parent` in `document.body` via the context default.',
212
+ 'Even inside an `overflow: hidden` container, the popup appears correctly because it exits the clip',
213
+ 'boundary by rendering in the body.',
214
+ ].join(' '));
215
+ export const WithCustomContainer = withDescription({
216
+ render: WithCustomContainerTemplate,
217
+ parameters: {
218
+ controls: { disable: true },
219
+ docs: {
220
+ source: {
221
+ language: 'tsx',
222
+ code: `
223
+ import { useRef } from 'react';
224
+ import { PopupParentContext, Dropdown, Button } from '@arbor-education/design-system.components';
225
+
226
+ function ClippedPanel() {
227
+ const popupContainerRef = useRef<HTMLDivElement>(null);
228
+
229
+ return (
230
+ <div style={{ position: 'relative' }}>
231
+ {/*
232
+ This container receives portalled popups.
233
+ Place it outside any overflow:hidden ancestor,
234
+ with a z-index high enough to appear above surrounding content.
235
+ */}
236
+ <div ref={popupContainerRef} style={{ position: 'fixed', zIndex: 100 }} />
237
+
238
+ <PopupParentContext.Provider value={popupContainerRef}>
239
+ <Dropdown>
240
+ <Dropdown.Trigger>
241
+ <Button variant="dropdown">Actions</Button>
242
+ </Dropdown.Trigger>
243
+ <Dropdown.Content>
244
+ <Dropdown.Item>View pupil profile</Dropdown.Item>
245
+ <Dropdown.Item>Edit enrolment</Dropdown.Item>
246
+ <Dropdown.Separator />
247
+ <Dropdown.Item>Remove from group</Dropdown.Item>
248
+ </Dropdown.Content>
249
+ </Dropdown>
250
+ </PopupParentContext.Provider>
251
+ </div>
252
+ );
253
+ }
254
+ export default ClippedPanel;
255
+ `.trim(),
256
+ },
257
+ },
258
+ },
259
+ }, [
260
+ 'Override the popup container with `PopupParentContext.Provider`. The `value` prop accepts a',
261
+ '`RefObject<HTMLElement | null>` pointing to the element that should receive portalled content.',
262
+ 'Open the dropdown to see it appear inside the dashed container (highlighted in pink) instead of',
263
+ '`document.body`. In production you would omit the visual indicator and size/position the container',
264
+ 'as needed for your layout.',
265
+ ].join(' '));
266
+ //# sourceMappingURL=PopupParentContext.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PopupParentContext.stories.js","sourceRoot":"","sources":["../../src/utils/PopupParentContext.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,OAAO,IAAI,UAAU,EACrB,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,KAAK,GACN,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAA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CAoBf,CAAC,IAAI,EAAE;aACC;SACF;KACF;CACF,EACD;IACE,iEAAiE;IACjE,uGAAuG;IACvG,oGAAoG;IACpG,oCAAoC;CACrC,CAAC,IAAI,CAAC,GAAG,CAAC,CACZ,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAU,eAAe,CACvD;IACE,MAAM,EAAE,2BAA2B;IACnC,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;QAC3B,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCf,CAAC,IAAI,EAAE;aACC;SACF;KACF;CACF,EACD;IACE,6FAA6F;IAC7F,gGAAgG;IAChG,iGAAiG;IACjG,oGAAoG;IACpG,4BAA4B;CAC7B,CAAC,IAAI,CAAC,GAAG,CAAC,CACZ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getDefaultPopupParent.d.ts","sourceRoot":"","sources":["../../src/utils/getDefaultPopupParent.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,mBAajC,CAAC"}
1
+ {"version":3,"file":"getDefaultPopupParent.d.ts","sourceRoot":"","sources":["../../src/utils/getDefaultPopupParent.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,mBAmBjC,CAAC"}
@@ -7,6 +7,12 @@ export const getDefaultPopupParent = () => {
7
7
  newContainer.id = 'ds-popup-parent';
8
8
  newContainer.style.zIndex = '1';
9
9
  newContainer.style.position = 'fixed';
10
+ // ag grid has clamping behaviour for floating elements - it clamps the area
11
+ // to whichever has the largest boundingRect between its own main container
12
+ // and whatever is passed to the popupParent prop. without this inset here
13
+ // the container ends up with a height and width of zero so they get clamped
14
+ // to the ag container instead of the viewport (most heinous).
15
+ newContainer.style.inset = '0';
10
16
  document.body.appendChild(newContainer);
11
17
  return newContainer;
12
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"getDefaultPopupParent.js","sourceRoot":"","sources":["../../src/utils/getDefaultPopupParent.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,MAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;IAC3D,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACnD,YAAY,CAAC,EAAE,GAAG,iBAAiB,CAAC;IACpC,YAAY,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC;IAChC,YAAY,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC;IACtC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAExC,OAAO,YAA2B,CAAC;AACrC,CAAC,CAAC"}
1
+ {"version":3,"file":"getDefaultPopupParent.js","sourceRoot":"","sources":["../../src/utils/getDefaultPopupParent.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,MAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;IAC3D,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACnD,YAAY,CAAC,EAAE,GAAG,iBAAiB,CAAC;IACpC,YAAY,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC;IAChC,YAAY,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC;IACtC,4EAA4E;IAC5E,2EAA2E;IAC3E,0EAA0E;IAC1E,4EAA4E;IAC5E,8DAA8D;IAC9D,YAAY,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC;IAC/B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAExC,OAAO,YAA2B,CAAC;AACrC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbor-education/design-system.components",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "The component library for the design system (the baby)",
5
5
  "main": "dist/index.js",
6
6
  "repository": {