@uva-glass/component-library 3.29.0 → 3.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. package/dist/Column-BL3dsYxn.js.map +1 -1
  2. package/dist/Lexical.prod-UwAbgYpF.js.map +1 -1
  3. package/dist/LexicalClipboard.prod-DHIGjydG.js.map +1 -1
  4. package/dist/LexicalLink.prod-Bsa9J7L-.js.map +1 -1
  5. package/dist/LexicalList.prod-jxGuZd4b.js.map +1 -1
  6. package/dist/LexicalSelection.prod-xk5MiZnZ.js.map +1 -1
  7. package/dist/LexicalTable.prod-BSjs04iE.js.map +1 -1
  8. package/dist/LexicalUtils.prod-cQutjKA3.js.map +1 -1
  9. package/dist/MultiSelectItem-DbOdEllV.js.map +1 -1
  10. package/dist/SortableProvider-CwX1lFMa.js.map +1 -1
  11. package/dist/TablePlugin-NmJsn2fm.js.map +1 -1
  12. package/dist/__mocks__/svgrMock.js.map +1 -1
  13. package/dist/assets/Notification.css +1 -1
  14. package/dist/{client-EQRlhXX7.js → client-D0KlBcsm.js} +1325 -1325
  15. package/dist/{client-EQRlhXX7.js.map → client-D0KlBcsm.js.map} +1 -1
  16. package/dist/components/Accordion/Accordion.js.map +1 -1
  17. package/dist/components/Accordion/Accordion.stories.d.ts +2 -2
  18. package/dist/components/Accordion/Accordion.stories.js.map +1 -1
  19. package/dist/components/Accordion/Accordion.test.js +3 -3
  20. package/dist/components/Accordion/Accordion.test.js.map +1 -1
  21. package/dist/components/AccordionCard/AccordionCard.js.map +1 -1
  22. package/dist/components/AccordionCard/AccordionCard.stories.d.ts +1 -1
  23. package/dist/components/AccordionCard/AccordionCard.stories.js.map +1 -1
  24. package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
  25. package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -1
  26. package/dist/components/ActionList/ActionList.js.map +1 -1
  27. package/dist/components/ActionList/ActionList.stories.d.ts +1 -1
  28. package/dist/components/ActionList/ActionList.stories.js.map +1 -1
  29. package/dist/components/ActionList/ActionList.test.js +3 -3
  30. package/dist/components/ActionList/ActionList.test.js.map +1 -1
  31. package/dist/components/AppStatusBar/AppStatusBar.js.map +1 -1
  32. package/dist/components/AppStatusBar/AppStatusBar.stories.d.ts +1 -1
  33. package/dist/components/AppStatusBar/AppStatusBar.stories.js.map +1 -1
  34. package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
  35. package/dist/components/AppStatusBar/AppStatusBar.test.js.map +1 -1
  36. package/dist/components/Attention/Attention.js.map +1 -1
  37. package/dist/components/Attention/Attention.stories.d.ts +1 -1
  38. package/dist/components/Attention/Attention.stories.js.map +1 -1
  39. package/dist/components/Attention/Attention.test.js +2 -2
  40. package/dist/components/Attention/Attention.test.js.map +1 -1
  41. package/dist/components/Backdrop/Backdrop.js.map +1 -1
  42. package/dist/components/Backdrop/Backdrop.stories.d.ts +1 -1
  43. package/dist/components/Backdrop/Backdrop.stories.js.map +1 -1
  44. package/dist/components/Backdrop/Backdrop.test.js +2 -2
  45. package/dist/components/Backdrop/Backdrop.test.js.map +1 -1
  46. package/dist/components/ButtonGroup/ButtonGroup.js.map +1 -1
  47. package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +1 -1
  48. package/dist/components/ButtonGroup/ButtonGroup.stories.js.map +1 -1
  49. package/dist/components/Buttons/Button.js.map +1 -1
  50. package/dist/components/Buttons/Button.stories.d.ts +2 -2
  51. package/dist/components/Buttons/Button.stories.js +8 -8
  52. package/dist/components/Buttons/Button.stories.js.map +1 -1
  53. package/dist/components/Buttons/Button.test.js +2 -2
  54. package/dist/components/Buttons/Button.test.js.map +1 -1
  55. package/dist/components/Buttons/LinkButton.js.map +1 -1
  56. package/dist/components/Buttons/LinkButton.stories.d.ts +2 -2
  57. package/dist/components/Buttons/LinkButton.stories.js +10 -10
  58. package/dist/components/Buttons/LinkButton.stories.js.map +1 -1
  59. package/dist/components/Buttons/LinkButton.test.js +2 -2
  60. package/dist/components/Buttons/LinkButton.test.js.map +1 -1
  61. package/dist/components/Buttons/MenuButton.js.map +1 -1
  62. package/dist/components/Buttons/MenuButton.stories.d.ts +3 -3
  63. package/dist/components/Buttons/MenuButton.stories.js +15 -15
  64. package/dist/components/Buttons/MenuButton.stories.js.map +1 -1
  65. package/dist/components/Buttons/MenuButton.test.js +2 -2
  66. package/dist/components/Buttons/MenuButton.test.js.map +1 -1
  67. package/dist/components/Card/Card.js.map +1 -1
  68. package/dist/components/Card/Card.stories.d.ts +3 -3
  69. package/dist/components/Card/Card.stories.js.map +1 -1
  70. package/dist/components/Card/Card.test.js +2 -2
  71. package/dist/components/Card/Card.test.js.map +1 -1
  72. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  73. package/dist/components/Checkbox/Checkbox.stories.d.ts +2 -2
  74. package/dist/components/Checkbox/Checkbox.stories.js +1 -1
  75. package/dist/components/Checkbox/Checkbox.stories.js.map +1 -1
  76. package/dist/components/Checkbox/Checkbox.test.js +3 -3
  77. package/dist/components/Checkbox/Checkbox.test.js.map +1 -1
  78. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +1 -1
  79. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.d.ts +3 -3
  80. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
  81. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js.map +1 -1
  82. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +2 -2
  83. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js.map +1 -1
  84. package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
  85. package/dist/components/CheckboxTree/CheckboxTree.stories.d.ts +1 -1
  86. package/dist/components/CheckboxTree/CheckboxTree.stories.js +108 -123
  87. package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
  88. package/dist/components/Chip/Chip.js.map +1 -1
  89. package/dist/components/Chip/Chip.stories.d.ts +2 -2
  90. package/dist/components/Chip/Chip.stories.js +1 -1
  91. package/dist/components/Chip/Chip.stories.js.map +1 -1
  92. package/dist/components/ControlsButton/ControlsButton.js.map +1 -1
  93. package/dist/components/ControlsButton/ControlsButton.stories.d.ts +1 -1
  94. package/dist/components/ControlsButton/ControlsButton.stories.js +4 -4
  95. package/dist/components/ControlsButton/ControlsButton.stories.js.map +1 -1
  96. package/dist/components/Drawer/Drawer.js.map +1 -1
  97. package/dist/components/Drawer/Drawer.stories.d.ts +2 -2
  98. package/dist/components/Drawer/Drawer.stories.js +9 -9
  99. package/dist/components/Drawer/Drawer.stories.js.map +1 -1
  100. package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.js.map +1 -1
  101. package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.d.ts +1 -1
  102. package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.js.map +1 -1
  103. package/dist/components/ExpandableInfoPanel/ExpandableInfoPanel.js.map +1 -1
  104. package/dist/components/ExpandableInfoPanel/ExpandableInfoPanel.stories.d.ts +1 -1
  105. package/dist/components/ExpandableInfoPanel/ExpandableInfoPanel.stories.js.map +1 -1
  106. package/dist/components/FeedbackBar/FeedbackBar.js.map +1 -1
  107. package/dist/components/FeedbackBar/FeedbackBar.stories.d.ts +1 -1
  108. package/dist/components/FeedbackBar/FeedbackBar.stories.js.map +1 -1
  109. package/dist/components/FeedbackBar/FeedbackBar.test.js +2 -2
  110. package/dist/components/FeedbackBar/FeedbackBar.test.js.map +1 -1
  111. package/dist/components/FeedbackBox/FeedbackBox.js.map +1 -1
  112. package/dist/components/FeedbackBox/FeedbackBox.stories.d.ts +2 -2
  113. package/dist/components/FeedbackBox/FeedbackBox.stories.js.map +1 -1
  114. package/dist/components/FieldHint/FieldHint.js.map +1 -1
  115. package/dist/components/FieldHint/FieldHint.stories.d.ts +2 -2
  116. package/dist/components/FieldHint/FieldHint.stories.js.map +1 -1
  117. package/dist/components/Fieldset/Fieldset.js.map +1 -1
  118. package/dist/components/Fieldset/Fieldset.stories.d.ts +2 -2
  119. package/dist/components/Fieldset/Fieldset.stories.js.map +1 -1
  120. package/dist/components/FormField/FormField.stories.d.ts +1 -1
  121. package/dist/components/FormField/FormField.stories.js.map +1 -1
  122. package/dist/components/FormInput/FormInput.js.map +1 -1
  123. package/dist/components/FormInput/FormInput.stories.d.ts +2 -2
  124. package/dist/components/FormInput/FormInput.stories.js +1 -1
  125. package/dist/components/FormInput/FormInput.stories.js.map +1 -1
  126. package/dist/components/GridRow/GridRow.js.map +1 -1
  127. package/dist/components/GridRow/GridRow.stories.d.ts +2 -2
  128. package/dist/components/GridRow/GridRow.stories.js.map +1 -1
  129. package/dist/components/HorizontalList/HorizontalList.js.map +1 -1
  130. package/dist/components/HorizontalList/HorizontalList.stories.d.ts +2 -2
  131. package/dist/components/HorizontalList/HorizontalList.stories.js.map +1 -1
  132. package/dist/components/Icon/Icon.js.map +1 -1
  133. package/dist/components/Icon/Icon.stories.d.ts +1 -1
  134. package/dist/components/Icon/Icon.stories.js.map +1 -1
  135. package/dist/components/Icon/icons/index.js.map +1 -1
  136. package/dist/components/IconButton/IconButton.stories.d.ts +1 -1
  137. package/dist/components/IconButton/IconButton.stories.js +5 -5
  138. package/dist/components/IconButton/IconButton.stories.js.map +1 -1
  139. package/dist/components/InfoBanner/InfoBanner.js.map +1 -1
  140. package/dist/components/InfoBanner/InfoBanner.stories.d.ts +1 -1
  141. package/dist/components/InfoBanner/InfoBanner.stories.js.map +1 -1
  142. package/dist/components/InfoMessage/InfoMessage.js.map +1 -1
  143. package/dist/components/InfoMessage/InfoMessage.stories.d.ts +1 -1
  144. package/dist/components/InfoMessage/InfoMessage.stories.js.map +1 -1
  145. package/dist/components/Input/Input.js.map +1 -1
  146. package/dist/components/Input/Input.stories.d.ts +4 -4
  147. package/dist/components/Input/Input.stories.js.map +1 -1
  148. package/dist/components/InputField/InputField.js.map +1 -1
  149. package/dist/components/InputField/InputField.stories.d.ts +3 -3
  150. package/dist/components/InputField/InputField.stories.js +12 -12
  151. package/dist/components/InputField/InputField.stories.js.map +1 -1
  152. package/dist/components/Label/Label.js.map +1 -1
  153. package/dist/components/Label/Label.stories.d.ts +2 -2
  154. package/dist/components/Label/Label.stories.js.map +1 -1
  155. package/dist/components/Label/Label.test.js +2 -2
  156. package/dist/components/Label/Label.test.js.map +1 -1
  157. package/dist/components/MenuLink/MenuLink.js.map +1 -1
  158. package/dist/components/MenuLink/MenuLink.stories.d.ts +2 -2
  159. package/dist/components/MenuLink/MenuLink.stories.js.map +1 -1
  160. package/dist/components/MetaDataList/MetaDataList.js.map +1 -1
  161. package/dist/components/MetaDataList/MetaDataList.stories.d.ts +1 -1
  162. package/dist/components/MetaDataList/MetaDataList.stories.js.map +1 -1
  163. package/dist/components/ModalDialog/ModalDialog.js.map +1 -1
  164. package/dist/components/ModalDialog/ModalDialog.stories.d.ts +3 -3
  165. package/dist/components/ModalDialog/ModalDialog.stories.js +8 -8
  166. package/dist/components/ModalDialog/ModalDialog.stories.js.map +1 -1
  167. package/dist/components/MultiSelect/MultiSelect.stories.d.ts +3 -3
  168. package/dist/components/MultiSelect/MultiSelect.stories.js +7 -7
  169. package/dist/components/MultiSelect/MultiSelect.stories.js.map +1 -1
  170. package/dist/components/MultiSelectBox/MultiSelectBox.js.map +1 -1
  171. package/dist/components/MultiSelectBox/MultiSelectBox.stories.d.ts +2 -2
  172. package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +5 -5
  173. package/dist/components/MultiSelectBox/MultiSelectBox.stories.js.map +1 -1
  174. package/dist/components/MultiSelectBox/MultiSelectBox.test.js +2 -2
  175. package/dist/components/MultiSelectBox/MultiSelectBox.test.js.map +1 -1
  176. package/dist/components/Notification/Notification.js +41 -41
  177. package/dist/components/Notification/Notification.js.map +1 -1
  178. package/dist/components/Notification/Notification.stories.d.ts +2 -2
  179. package/dist/components/Notification/Notification.stories.js +3 -3
  180. package/dist/components/Notification/Notification.stories.js.map +1 -1
  181. package/dist/components/Notification/Notification.test.js +2 -2
  182. package/dist/components/Notification/Notification.test.js.map +1 -1
  183. package/dist/components/OverlayCloseButton/OverlayCloseButton.js.map +1 -1
  184. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.d.ts +1 -1
  185. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +4 -4
  186. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js.map +1 -1
  187. package/dist/components/OverlayStepBar/OverlayStepBar.js.map +1 -1
  188. package/dist/components/OverlayStepBar/OverlayStepBar.stories.d.ts +2 -2
  189. package/dist/components/OverlayStepBar/OverlayStepBar.stories.js.map +1 -1
  190. package/dist/components/PageOverlay/PageOverlay.js.map +1 -1
  191. package/dist/components/PageOverlay/PageOverlay.stories.d.ts +3 -3
  192. package/dist/components/PageOverlay/PageOverlay.stories.js.map +1 -1
  193. package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
  194. package/dist/components/PeriodSelector/PeriodSelector.stories.d.ts +1 -1
  195. package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
  196. package/dist/components/PeriodSelector/PeriodSelector.stories.js.map +1 -1
  197. package/dist/components/Periods/Periods.js.map +1 -1
  198. package/dist/components/Periods/Periods.stories.d.ts +1 -1
  199. package/dist/components/Periods/Periods.stories.js.map +1 -1
  200. package/dist/components/ProgrammeCard/ProgrammeCard.js.map +1 -1
  201. package/dist/components/ProgrammeCard/ProgrammeCard.stories.d.ts +3 -3
  202. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
  203. package/dist/components/RadioButton/RadioButton.js.map +1 -1
  204. package/dist/components/RadioButton/RadioButton.stories.d.ts +1 -1
  205. package/dist/components/RadioButton/RadioButton.stories.js.map +1 -1
  206. package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
  207. package/dist/components/RadioGroup/RadioGroup.stories.d.ts +1 -1
  208. package/dist/components/RadioGroup/RadioGroup.stories.js +4 -4
  209. package/dist/components/RadioGroup/RadioGroup.stories.js.map +1 -1
  210. package/dist/components/RadioGroup/Radiogroup.test.js +2 -2
  211. package/dist/components/RadioGroup/Radiogroup.test.js.map +1 -1
  212. package/dist/components/RadioTabSelector/RadioTabSelector.js.map +1 -1
  213. package/dist/components/RadioTabSelector/RadioTabSelector.stories.d.ts +1 -1
  214. package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
  215. package/dist/components/RadioTabSelector/RadioTabSelector.stories.js.map +1 -1
  216. package/dist/components/Repeater/Repeater.js.map +1 -1
  217. package/dist/components/Repeater/Repeater.stories.d.ts +1 -1
  218. package/dist/components/Repeater/Repeater.stories.js.map +1 -1
  219. package/dist/components/RteEditor/EditorHeader/EditorHeader.js.map +1 -1
  220. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js.map +1 -1
  221. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -1
  222. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js.map +1 -1
  223. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
  224. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
  225. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js.map +1 -1
  226. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js.map +1 -1
  227. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
  228. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
  229. package/dist/components/RteEditor/Providers/LanguageProvider.js.map +1 -1
  230. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  231. package/dist/components/RteEditor/RteEditor.stories.d.ts +1 -1
  232. package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
  233. package/dist/components/RteEditor/UvaTheme/UvaTheme.js.map +1 -1
  234. package/dist/components/RteEditor/helpers.js.map +1 -1
  235. package/dist/components/RteEditor/hooks/components/Flyout.js.map +1 -1
  236. package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -1
  237. package/dist/components/RteEditor/hooks/useTranslation.js.map +1 -1
  238. package/dist/components/RteEditor/translations.js.map +1 -1
  239. package/dist/components/SectionNotification/SectionNotification.js.map +1 -1
  240. package/dist/components/SectionNotification/SectionNotification.stories.d.ts +1 -1
  241. package/dist/components/SectionNotification/SectionNotification.stories.js.map +1 -1
  242. package/dist/components/SelectListbox/SelectListBox.stories.d.ts +2 -2
  243. package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
  244. package/dist/components/SelectListbox/SelectListBox.stories.js.map +1 -1
  245. package/dist/components/SelectListbox/SelectListbox.js.map +1 -1
  246. package/dist/components/SelectListbox/SelectProvider.js.map +1 -1
  247. package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
  248. package/dist/components/SelectListbox/components/SelectContainer.js.map +1 -1
  249. package/dist/components/SelectListbox/components/SelectOption.js.map +1 -1
  250. package/dist/components/SelectListbox/components/SelectOptionBox.js.map +1 -1
  251. package/dist/components/Sortable/Sortable.js.map +1 -1
  252. package/dist/components/Sortable/Sortable.stories.d.ts +3 -3
  253. package/dist/components/Sortable/Sortable.stories.js +13 -13
  254. package/dist/components/Sortable/Sortable.stories.js.map +1 -1
  255. package/dist/components/Sortable/actions.js.map +1 -1
  256. package/dist/components/Sortable/components/SortableHandle.js.map +1 -1
  257. package/dist/components/Sortable/components/SortableItem.js.map +1 -1
  258. package/dist/components/Sortable/sortableReducer.js.map +1 -1
  259. package/dist/components/Spinner/Spinner.js.map +1 -1
  260. package/dist/components/Spinner/Spinner.stories.d.ts +1 -1
  261. package/dist/components/Spinner/Spinner.stories.js.map +1 -1
  262. package/dist/components/StatusBadge/StatusBadge.stories.d.ts +1 -1
  263. package/dist/components/StatusBadge/StatusBadge.stories.js.map +1 -1
  264. package/dist/components/StatusBadge/StatusBadge.test.js +2 -2
  265. package/dist/components/StatusBadge/StatusBadge.test.js.map +1 -1
  266. package/dist/components/StatusBadge/StatusBage.js.map +1 -1
  267. package/dist/components/StatusPill/StatusPill.js.map +1 -1
  268. package/dist/components/StatusPill/StatusPill.stories.d.ts +1 -1
  269. package/dist/components/StatusPill/StatusPill.stories.js.map +1 -1
  270. package/dist/components/TextArea/TextArea.js.map +1 -1
  271. package/dist/components/TextArea/TextArea.stories.d.ts +1 -1
  272. package/dist/components/TextArea/TextArea.stories.js +1 -1
  273. package/dist/components/TextArea/TextArea.stories.js.map +1 -1
  274. package/dist/components/TextArea/TextArea.test.js +9 -9
  275. package/dist/components/TextArea/TextArea.test.js.map +1 -1
  276. package/dist/components/ToggleSwitch/ToggleSwitch.js.map +1 -1
  277. package/dist/components/ToggleSwitch/ToggleSwitch.stories.d.ts +1 -1
  278. package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +5 -5
  279. package/dist/components/ToggleSwitch/ToggleSwitch.stories.js.map +1 -1
  280. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  281. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
  282. package/dist/components/Tooltip/Tooltip.stories.js.map +1 -1
  283. package/dist/components/VarIndicator/VarIndicator.js.map +1 -1
  284. package/dist/components/VarIndicator/VarIndicator.stories.d.ts +1 -1
  285. package/dist/components/VarIndicator/VarIndicator.stories.js +4 -4
  286. package/dist/components/VarIndicator/VarIndicator.stories.js.map +1 -1
  287. package/dist/components/VarIndicator/VarIndicator.test.js +3 -3
  288. package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -1
  289. package/dist/components/hooks/useDebounce.js.map +1 -1
  290. package/dist/components/hooks/useOnClickOutside.js.map +1 -1
  291. package/dist/components/hooks/usePositionedFloaters.js.map +1 -1
  292. package/dist/components/hooks/useResponsive.js.map +1 -1
  293. package/dist/helpers-DZIm3MiJ.js.map +1 -1
  294. package/dist/index-BVAvx58-.js +10648 -0
  295. package/dist/index-BVAvx58-.js.map +1 -0
  296. package/dist/{index-BqLi4tOb.js → index-DV47hRzi.js} +2891 -2818
  297. package/dist/index-DV47hRzi.js.map +1 -0
  298. package/dist/index-Di9WPZUe.js +34752 -0
  299. package/dist/index-Di9WPZUe.js.map +1 -0
  300. package/dist/index-DllfJcv4.js.map +1 -1
  301. package/dist/index-PaHiqSUg.js +3099 -0
  302. package/dist/index-PaHiqSUg.js.map +1 -0
  303. package/dist/{react-18-dpbWrd2-.js → react-18-inmoTCp-.js} +2 -2
  304. package/dist/{react-18-dpbWrd2-.js.map → react-18-inmoTCp-.js.map} +1 -1
  305. package/dist/{react.esm-CsMDid07.js → react.esm-CFMwGdo5.js} +3 -3
  306. package/dist/{react.esm-CsMDid07.js.map → react.esm-CFMwGdo5.js.map} +1 -1
  307. package/dist/setupTests.js +11 -1562
  308. package/dist/setupTests.js.map +1 -1
  309. package/dist/storyComponents/ClipboardButton/ClipboardButton.js.map +1 -1
  310. package/dist/storyComponents/Container/Container.js.map +1 -1
  311. package/dist/storybook__react.d.js +5345 -5766
  312. package/dist/storybook__react.d.js.map +1 -1
  313. package/dist/test-utils-ea_YDVtd.js.map +1 -1
  314. package/package.json +16 -20
  315. package/dist/index-BqLi4tOb.js.map +0 -1
  316. package/dist/index-CUap8sKR.js +0 -2962
  317. package/dist/index-CUap8sKR.js.map +0 -1
  318. package/dist/index-DH9Vbk37.js +0 -9507
  319. package/dist/index-DH9Vbk37.js.map +0 -1
  320. package/dist/index-Dwqes6RH.js +0 -14758
  321. package/dist/index-Dwqes6RH.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ModalDialog.stories.js","sources":["../../../src/components/ModalDialog/ModalDialog.stories.tsx"],"sourcesContent":["import { ModalProvider } from '@react-aria/overlays';\nimport { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { ModalDialogProps } from './ModalDialog';\n\nimport { ModalDialog } from './ModalDialog';\n\nimport { Button } from 'components/Buttons';\nimport { ButtonGroup } from 'components/ButtonGroup';\nimport { FormField } from 'components/FormField';\nimport { InputField } from 'components/InputField';\nimport { Label } from 'components/Label';\n\nconst codeString = `\n/* ModalDialog has more styling props (see Info-tab).\n Code example is made with the most commonly used props. **/\n <ModalDialog isOpen={isOpen} title={title} onClose={onCloseFunction}\n onSubmit={onSubmitFunction} buttons={buttons}> {children} </ModalDialog>\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/ModalDialog',\n component: ModalDialog,\n argTypes: {\n isOpen: {\n table: {\n disable: true,\n },\n },\n noValidate: {\n control: 'boolean',\n },\n role: {\n control: 'radio',\n options: ['dialog', 'alertdialog'],\n },\n onSubmit: {\n table: {\n disable: true,\n },\n },\n onClose: {\n table: {\n disable: true,\n },\n },\n buttons: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: ModalDialog,\n codeString: codeString,\n },\n} as Meta<ModalDialogProps>;\n\nconst Template: StoryFn<ModalDialogProps> = (args: ModalDialogProps) => (\n <ModalProvider>\n <ModalDialog {...args}>\n <FormField outerSpace>\n <Label htmlFor=\"text-field\">Example Text Field</Label>\n <InputField id=\"text-field\" />\n </FormField>\n </ModalDialog>\n </ModalProvider>\n);\n\nconst defaultArgs: Partial<ModalDialogProps> = {\n padded: false,\n size: 'regular',\n noButtonBorder: false,\n variant: 'dialog',\n role: 'dialog',\n title: 'Example Title',\n closeButtonAriaValueText: 'Close',\n noValidate: false,\n onSubmit: fn(),\n onClose: fn(),\n buttons: (\n <ButtonGroup reversed>\n <Button variant=\"primary\" onClick={fn()}>\n OK\n </Button>\n <Button variant=\"secondary\" onClick={fn()}>\n Cancel\n </Button>\n </ButtonGroup>\n ),\n isOpen: true,\n};\n\nexport const ModalDialogExample = Template.bind({});\nModalDialogExample.args = {\n ...defaultArgs,\n};\n\nexport const Loading = Template.bind({});\nLoading.args = {\n ...defaultArgs,\n isLoading: true,\n spinnerAriaValueText: 'Loading',\n};\n\nconst LongContentTemplate: StoryFn<ModalDialogProps> = (args: ModalDialogProps) => (\n <ModalProvider>\n <ModalDialog {...args}>\n <FormField outerSpace>\n <div>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ac dui et nibh eleifend ultricies a id nulla.\n Pellentesque eleifend sem a tellus dictum tempus. Proin non leo id risus placerat vulputate at ac erat. Ut\n fringilla imperdiet sollicitudin. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere\n cubilia curae; Cras molestie ante ac magna ornare rhoncus non at quam. Mauris elementum luctus euismod.\n Pellentesque molestie malesuada purus, sed egestas lacus interdum sit amet. Morbi blandit lacus sit amet\n dictum pulvinar. Ut semper nunc ac enim imperdiet, non interdum diam gravida. In nunc tortor, mollis ac\n molestie dignissim, elementum sed quam. Suspendisse mollis venenatis libero, pellentesque vestibulum elit\n consequat et. Aliquam fringilla tellus id libero tempus, sit amet suscipit augue tristique. Quisque cursus\n neque vel justo tristique, eget semper turpis elementum. Etiam venenatis mattis sapien ac mattis. Mauris vitae\n ultrices erat.\n </div>\n <div>\n Aliquam facilisis massa sed justo rhoncus bibendum. Sed lobortis urna orci, vitae porta leo placerat nec. Nam\n porta porttitor ornare. Suspendisse vehicula nunc nec egestas finibus. Aliquam non luctus risus. Phasellus ac\n diam tincidunt, bibendum sem eget, sollicitudin neque. Curabitur mauris risus, feugiat ac euismod non,\n vulputate ac justo. Curabitur pretium vehicula augue, blandit porta odio rutrum sit amet. Proin semper enim ut\n sapien tempor, a ornare ipsum faucibus.\n </div>\n </FormField>\n </ModalDialog>\n </ModalProvider>\n);\n\nexport const WithLongContentAndNoBorder = LongContentTemplate.bind({});\nWithLongContentAndNoBorder.args = {\n ...defaultArgs,\n noButtonBorder: true,\n};\n"],"names":["codeString","ModalDialog_stories","ModalDialog","Template","args","jsx","ModalProvider","jsxs","FormField","Label","InputField","defaultArgs","fn","ButtonGroup","Button","ModalDialogExample","Loading","LongContentTemplate","WithLongContentAndNoBorder"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAAa;AAAA;AAAA;AAAA;AAAA;AAAA,GAQJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AA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AAM,UAE3C,SAAA,CAAA;AAAA,EAAA,GACF;AAAA,EAEF,QAAQ;AACV,GAEaG,IAAqBZ,EAAS,KAAK,CAAE,CAAA;AAClDY,EAAmB,OAAO;AAAA,EACxB,GAAGJ;AACL;AAEO,MAAMK,IAAUb,EAAS,KAAK,CAAE,CAAA;AACvCa,EAAQ,OAAO;AAAA,EACb,GAAGL;AAAA,EACH,WAAW;AAAA,EACX,sBAAsB;AACxB;AAEA,MAAMM,IAAiD,CAACb,MACtD,gBAAAC,EAACC,GACC,EAAA,UAAA,gBAAAD,EAACH,GAAa,EAAA,GAAGE,GACf,UAAA,gBAAAG,EAACC,GAAU,EAAA,YAAU,IACnB,UAAA;AAAA,EAAA,gBAAAH,EAAC,SAAI,UAWL,88BAAA,CAAA;AAAA,EACA,gBAAAA,EAAC,SAAI,UAML,4dAAA,CAAA;AAAA,EACF,CAAA,EACF,CAAA,GACF,GAGWa,IAA6BD,EAAoB,KAAK,CAAE,CAAA;AACrEC,EAA2B,OAAO;AAAA,EAChC,GAAGP;AAAA,EACH,gBAAgB;AAClB;"}
1
+ {"version":3,"file":"ModalDialog.stories.js","sources":["../../../src/components/ModalDialog/ModalDialog.stories.tsx"],"sourcesContent":["import { ModalProvider } from '@react-aria/overlays';\nimport { fn } from 'storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { ModalDialogProps } from './ModalDialog';\n\nimport { ModalDialog } from './ModalDialog';\n\nimport { Button } from 'components/Buttons';\nimport { ButtonGroup } from 'components/ButtonGroup';\nimport { FormField } from 'components/FormField';\nimport { InputField } from 'components/InputField';\nimport { Label } from 'components/Label';\n\nconst codeString = `\n/* ModalDialog has more styling props (see Info-tab).\n Code example is made with the most commonly used props. **/\n <ModalDialog isOpen={isOpen} title={title} onClose={onCloseFunction}\n onSubmit={onSubmitFunction} buttons={buttons}> {children} </ModalDialog>\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/ModalDialog',\n component: ModalDialog,\n argTypes: {\n isOpen: {\n table: {\n disable: true,\n },\n },\n noValidate: {\n control: 'boolean',\n },\n role: {\n control: 'radio',\n options: ['dialog', 'alertdialog'],\n },\n onSubmit: {\n table: {\n disable: true,\n },\n },\n onClose: {\n table: {\n disable: true,\n },\n },\n buttons: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: ModalDialog,\n codeString: codeString,\n },\n} as Meta<ModalDialogProps>;\n\nconst Template: StoryFn<ModalDialogProps> = (args: ModalDialogProps) => (\n <ModalProvider>\n <ModalDialog {...args}>\n <FormField outerSpace>\n <Label htmlFor=\"text-field\">Example Text Field</Label>\n <InputField id=\"text-field\" />\n </FormField>\n </ModalDialog>\n </ModalProvider>\n);\n\nconst defaultArgs: Partial<ModalDialogProps> = {\n padded: false,\n size: 'regular',\n noButtonBorder: false,\n variant: 'dialog',\n role: 'dialog',\n title: 'Example Title',\n closeButtonAriaValueText: 'Close',\n noValidate: false,\n onSubmit: fn(),\n onClose: fn(),\n buttons: (\n <ButtonGroup reversed>\n <Button variant=\"primary\" onClick={fn()}>\n OK\n </Button>\n <Button variant=\"secondary\" onClick={fn()}>\n Cancel\n </Button>\n </ButtonGroup>\n ),\n isOpen: true,\n};\n\nexport const ModalDialogExample = Template.bind({});\nModalDialogExample.args = {\n ...defaultArgs,\n};\n\nexport const Loading = Template.bind({});\nLoading.args = {\n ...defaultArgs,\n isLoading: true,\n spinnerAriaValueText: 'Loading',\n};\n\nconst LongContentTemplate: StoryFn<ModalDialogProps> = (args: ModalDialogProps) => (\n <ModalProvider>\n <ModalDialog {...args}>\n <FormField outerSpace>\n <div>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ac dui et nibh eleifend ultricies a id nulla.\n Pellentesque eleifend sem a tellus dictum tempus. Proin non leo id risus placerat vulputate at ac erat. Ut\n fringilla imperdiet sollicitudin. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere\n cubilia curae; Cras molestie ante ac magna ornare rhoncus non at quam. Mauris elementum luctus euismod.\n Pellentesque molestie malesuada purus, sed egestas lacus interdum sit amet. Morbi blandit lacus sit amet\n dictum pulvinar. Ut semper nunc ac enim imperdiet, non interdum diam gravida. In nunc tortor, mollis ac\n molestie dignissim, elementum sed quam. Suspendisse mollis venenatis libero, pellentesque vestibulum elit\n consequat et. Aliquam fringilla tellus id libero tempus, sit amet suscipit augue tristique. Quisque cursus\n neque vel justo tristique, eget semper turpis elementum. Etiam venenatis mattis sapien ac mattis. Mauris vitae\n ultrices erat.\n </div>\n <div>\n Aliquam facilisis massa sed justo rhoncus bibendum. Sed lobortis urna orci, vitae porta leo placerat nec. Nam\n porta porttitor ornare. Suspendisse vehicula nunc nec egestas finibus. Aliquam non luctus risus. Phasellus ac\n diam tincidunt, bibendum sem eget, sollicitudin neque. Curabitur mauris risus, feugiat ac euismod non,\n vulputate ac justo. Curabitur pretium vehicula augue, blandit porta odio rutrum sit amet. Proin semper enim ut\n sapien tempor, a ornare ipsum faucibus.\n </div>\n </FormField>\n </ModalDialog>\n </ModalProvider>\n);\n\nexport const WithLongContentAndNoBorder = LongContentTemplate.bind({});\nWithLongContentAndNoBorder.args = {\n ...defaultArgs,\n noButtonBorder: true,\n};\n"],"names":["codeString","ModalDialog_stories","ModalDialog","Template","args","jsx","ModalProvider","jsxs","FormField","Label","InputField","defaultArgs","fn","ButtonGroup","Button","ModalDialogExample","Loading","LongContentTemplate","WithLongContentAndNoBorder"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAAa;AAAA;AAAA;AAAA;AAAA;AAAA,GAQnBC,IAAe;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,YAAY;AAAA,MACV,SAAS;AAAA,IAAA;AAAA,IAEX,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,SAAS,CAAC,UAAU,aAAa;AAAA,IAAA;AAAA,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ACb,GAAGL;AAAA,EACH,WAAW;AAAA,EACX,sBAAsB;AACxB;AAEA,MAAMM,IAAiD,CAACb,MACtD,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACH,GAAA,EAAa,GAAGE,GACf,UAAA,gBAAAG,EAACC,GAAA,EAAU,YAAU,IACnB,UAAA;AAAA,EAAA,gBAAAH,EAAC,SAAI,UAAA,88BAAA,CAWL;AAAA,EACA,gBAAAA,EAAC,SAAI,UAAA,4dAAA,CAML;AAAA,EAAA,CACF,GACF,GACF,GAGWa,IAA6BD,EAAoB,KAAK,CAAA,CAAE;AACrEC,EAA2B,OAAO;AAAA,EAChC,GAAGP;AAAA,EACH,gBAAgB;AAClB;"}
@@ -3,6 +3,6 @@ import { Meta } from '@storybook/react';
3
3
  import { MultiSelectProps } from './MultiSelect';
4
4
  declare const _default: Meta<PropsWithChildren<MultiSelectProps>>;
5
5
  export default _default;
6
- export declare const MultiSelectExample: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<MultiSelectProps>>;
7
- export declare const WithHeader: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<MultiSelectProps>>;
8
- export declare const WithheaderAndWithoutScrollContainerAndBorder: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<MultiSelectProps>>;
6
+ export declare const MultiSelectExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<MultiSelectProps>>;
7
+ export declare const WithHeader: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<MultiSelectProps>>;
8
+ export declare const WithheaderAndWithoutScrollContainerAndBorder: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<MultiSelectProps>>;
@@ -1,5 +1,5 @@
1
1
  import { jsxs as S, jsx as r } from "react/jsx-runtime";
2
- import { fn as d } from "../../index-Dwqes6RH.js";
2
+ import { W as d } from "../../index-Di9WPZUe.js";
3
3
  import { useState as p } from "react";
4
4
  import { M as e } from "../../TablePlugin-NmJsn2fm.js";
5
5
  import { Container as M } from "../../storyComponents/Container/Container.js";
@@ -12,7 +12,7 @@ const C = `
12
12
  checked={stateItems.includes(itemValue)} onChange={handleChange} disabled={disabled} />
13
13
  ))}
14
14
  </MultiSelect>
15
- `, H = {
15
+ `, A = {
16
16
  title: "Organisms/MultiSelect",
17
17
  component: e,
18
18
  argTypes: {
@@ -27,14 +27,14 @@ const C = `
27
27
  codeString: C
28
28
  }
29
29
  }, m = (i) => {
30
- const [n, o] = p([]), I = [
30
+ const [n, o] = p([]), h = [
31
31
  { itemName: "AItem 1", itemValue: "1", disabled: !0 },
32
32
  { itemName: "BItem 2", itemValue: "2" },
33
33
  { itemName: "Multi line Item 3 Item 3 Item 3 Item 3 Item 3 Item 3 Item 3 Item 3 Item 3 Item 3", itemValue: "3" },
34
34
  { itemName: "CItem 4", itemValue: "4" },
35
35
  { itemName: "DItem 5", itemValue: "5" },
36
36
  { itemName: "EItem 6", itemValue: "6" }
37
- ], h = () => {
37
+ ], I = () => {
38
38
  o([]), d()();
39
39
  }, b = (t) => {
40
40
  const { checked: l, value: a } = t.target;
@@ -49,10 +49,10 @@ const C = `
49
49
  {
50
50
  label: "Item list",
51
51
  clearTrigger: n.length > 0 ? "Clear Selection" : "",
52
- onClear: h
52
+ onClear: I
53
53
  }
54
54
  ),
55
- /* @__PURE__ */ r(e, { ...i, children: I.map(({ itemName: t, itemValue: l, disabled: a }) => /* @__PURE__ */ r(
55
+ /* @__PURE__ */ r(e, { ...i, children: h.map(({ itemName: t, itemValue: l, disabled: a }) => /* @__PURE__ */ r(
56
56
  e.MultiSelectItem,
57
57
  {
58
58
  label: t,
@@ -90,6 +90,6 @@ export {
90
90
  f as MultiSelectExample,
91
91
  N as WithHeader,
92
92
  V as WithheaderAndWithoutScrollContainerAndBorder,
93
- H as default
93
+ A as default
94
94
  };
95
95
  //# sourceMappingURL=MultiSelect.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelect.stories.js","sources":["../../../src/components/MultiSelect/MultiSelect.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\nimport { useState } from 'react';\n\nimport type { ChangeEvent, PropsWithChildren } from 'react';\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { MultiSelectProps } from './MultiSelect';\n\nimport { MultiSelect } from './MultiSelect';\n\nimport { Container } from 'storyComponents/Container';\n\nconst codeString = `\n // MultiSelectHeader can be added optionally\n <MultiSelect.MultiSelectHeader label={label} clearTrigger={clearTrigger} onClear={handleClear} />\n <MultiSelect noBorder={noBorder} scrollable={scrollable}>\n {mockItems.map(({ itemName, itemValue, disabled }) => (\n <MultiSelect.MultiSelectItem key={itemName} label={itemName} value={itemValue}\n checked={stateItems.includes(itemValue)} onChange={handleChange} disabled={disabled} />\n ))}\n </MultiSelect>\n `;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Organisms/MultiSelect',\n component: MultiSelect,\n argTypes: {\n header: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: MultiSelect,\n codeString: codeString,\n },\n} as Meta<PropsWithChildren<MultiSelectProps>>;\n\nconst Template: StoryFn<PropsWithChildren<MultiSelectProps>> = (args) => {\n const [items, setItems] = useState<string[]>([]);\n\n const mockItems = [\n { itemName: 'AItem 1', itemValue: '1', disabled: true },\n { itemName: 'BItem 2', itemValue: '2' },\n { itemName: 'Multi line Item 3 Item 3 Item 3 Item 3 Item 3 Item 3 Item 3 Item 3 Item 3 Item 3', itemValue: '3' },\n { itemName: 'CItem 4', itemValue: '4' },\n { itemName: 'DItem 5', itemValue: '5' },\n { itemName: 'EItem 6', itemValue: '6' },\n ];\n\n const handleClear = () => {\n setItems([]);\n fn()();\n };\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n const { checked, value } = event.target;\n setItems((prevState) => {\n const newItems = checked ? [...prevState, value] : prevState.filter((itemValue) => itemValue !== value);\n fn()(newItems);\n return newItems;\n });\n };\n\n return (\n <Container>\n {/* header added under separate boolean arg here for storybook purpose, \n it should be added as direct arg to MultiSelect when used in application */}\n {args.header && (\n <MultiSelect.MultiSelectHeader\n label=\"Item list\"\n clearTrigger={items.length > 0 ? 'Clear Selection' : ''}\n onClear={handleClear}\n />\n )}\n <MultiSelect {...args}>\n {mockItems.map(({ itemName, itemValue, disabled }) => (\n <MultiSelect.MultiSelectItem\n key={itemName}\n label={itemName}\n value={itemValue}\n checked={items.includes(itemValue)}\n onChange={handleChange}\n disabled={disabled}\n />\n ))}\n </MultiSelect>\n </Container>\n );\n};\n\nconst defaultArgs: Partial<MultiSelectProps> = {\n scrollable: true,\n noBorder: false,\n};\n\nexport const MultiSelectExample = Template.bind({});\nMultiSelectExample.args = {\n ...defaultArgs,\n};\n\nexport const WithHeader = Template.bind({});\nWithHeader.args = {\n ...defaultArgs,\n // boolean is not normal way of adding header but if added after template the rerender logic of\n // storybook would not correctly clear the checkboxes\n header: true,\n};\n\nexport const WithheaderAndWithoutScrollContainerAndBorder = Template.bind({});\nWithheaderAndWithoutScrollContainerAndBorder.args = {\n scrollable: false,\n noBorder: true,\n // boolean is not normal way of adding header but if added after template the rerender logic of\n // storybook would not correctly clear the checkboxes\n header: true,\n};\n"],"names":["codeString","MultiSelect_stories","MultiSelect","Template","args","items","setItems","useState","mockItems","handleClear","fn","handleChange","event","checked","value","prevState","newItems","itemValue","Container","jsx","itemName","disabled","defaultArgs","MultiSelectExample","WithHeader","WithheaderAndWithoutScrollContainerAndBorder"],"mappings":";;;;;AAWA,MAAMA,IAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAYJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,E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A,QACP,SAASZ,EAAM,SAASY,CAAS;AAAA,QACjC,UAAUN;AAAA,QACV,UAAAU;AAAA,MAAA;AAAA,MALKD;AAAA,IAAA,CAOR,EACH,CAAA;AAAA,EAAA,GACF;AAEJ,GAEME,IAAyC;AAAA,EAC7C,YAAY;AAAA,EACZ,UAAU;AACZ,GAEaC,IAAqBpB,EAAS,KAAK,CAAE,CAAA;AAClDoB,EAAmB,OAAO;AAAA,EACxB,GAAGD;AACL;AAEO,MAAME,IAAarB,EAAS,KAAK,CAAE,CAAA;AAC1CqB,EAAW,OAAO;AAAA,EAChB,GAAGF;AAAA;AAAA;AAAA,EAGH,QAAQ;AACV;AAEO,MAAMG,IAA+CtB,EAAS,KAAK,CAAE,CAAA;AAC5EsB,EAA6C,OAAO;AAAA,EAClD,YAAY;AAAA,EACZ,UAAU;AAAA;AAAA;AAAA,EAGV,QAAQ;AACV;"}
1
+ {"version":3,"file":"MultiSelect.stories.js","sources":["../../../src/components/MultiSelect/MultiSelect.stories.tsx"],"sourcesContent":["import { fn } from 'storybook/test';\nimport { useState } from 'react';\n\nimport type { ChangeEvent, PropsWithChildren } from 'react';\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { MultiSelectProps } from './MultiSelect';\n\nimport { MultiSelect } from './MultiSelect';\n\nimport { Container } from 'storyComponents/Container';\n\nconst codeString = `\n // MultiSelectHeader can be added optionally\n <MultiSelect.MultiSelectHeader label={label} clearTrigger={clearTrigger} onClear={handleClear} />\n <MultiSelect noBorder={noBorder} scrollable={scrollable}>\n {mockItems.map(({ itemName, itemValue, disabled }) => (\n <MultiSelect.MultiSelectItem key={itemName} label={itemName} value={itemValue}\n checked={stateItems.includes(itemValue)} onChange={handleChange} disabled={disabled} />\n ))}\n </MultiSelect>\n `;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Organisms/MultiSelect',\n component: MultiSelect,\n argTypes: {\n header: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: MultiSelect,\n codeString: codeString,\n },\n} as Meta<PropsWithChildren<MultiSelectProps>>;\n\nconst Template: StoryFn<PropsWithChildren<MultiSelectProps>> = (args) => {\n const [items, setItems] = useState<string[]>([]);\n\n const mockItems = [\n { itemName: 'AItem 1', itemValue: '1', disabled: true },\n { itemName: 'BItem 2', itemValue: '2' },\n { itemName: 'Multi line Item 3 Item 3 Item 3 Item 3 Item 3 Item 3 Item 3 Item 3 Item 3 Item 3', itemValue: '3' },\n { itemName: 'CItem 4', itemValue: '4' },\n { itemName: 'DItem 5', itemValue: '5' },\n { itemName: 'EItem 6', itemValue: '6' },\n ];\n\n const handleClear = () => {\n setItems([]);\n fn()();\n };\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n const { checked, value } = event.target;\n setItems((prevState) => {\n const newItems = checked ? [...prevState, value] : prevState.filter((itemValue) => itemValue !== value);\n fn()(newItems);\n return newItems;\n });\n };\n\n return (\n <Container>\n {/* header added under separate boolean arg here for storybook purpose, \n it should be added as direct arg to MultiSelect when used in application */}\n {args.header && (\n <MultiSelect.MultiSelectHeader\n label=\"Item list\"\n clearTrigger={items.length > 0 ? 'Clear Selection' : ''}\n onClear={handleClear}\n />\n )}\n <MultiSelect {...args}>\n {mockItems.map(({ itemName, itemValue, disabled }) => (\n <MultiSelect.MultiSelectItem\n key={itemName}\n label={itemName}\n value={itemValue}\n checked={items.includes(itemValue)}\n onChange={handleChange}\n disabled={disabled}\n />\n ))}\n </MultiSelect>\n </Container>\n );\n};\n\nconst defaultArgs: Partial<MultiSelectProps> = {\n scrollable: true,\n noBorder: false,\n};\n\nexport const MultiSelectExample = Template.bind({});\nMultiSelectExample.args = {\n ...defaultArgs,\n};\n\nexport const WithHeader = Template.bind({});\nWithHeader.args = {\n ...defaultArgs,\n // boolean is not normal way of adding header but if added after template the rerender logic of\n // storybook would not correctly clear the checkboxes\n header: true,\n};\n\nexport const WithheaderAndWithoutScrollContainerAndBorder = Template.bind({});\nWithheaderAndWithoutScrollContainerAndBorder.args = {\n scrollable: false,\n noBorder: true,\n // boolean is not normal way of adding header but if added after template the rerender logic of\n // storybook would not correctly clear the checkboxes\n header: true,\n};\n"],"names":["codeString","MultiSelect_stories","MultiSelect","Template","args","items","setItems","useState","mockItems","handleClear","fn","handleChange","event","checked","value","prevState","newItems","itemValue","Container","jsx","itemName","disabled","defaultArgs","MultiSelectExample","WithHeader","WithheaderAndWithoutScrollContainerAndBorder"],"mappings":";;;;;AAWA,MAAMA,IAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAYnBC,IAAe;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,EACF;AAAA,EAEF,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAyD,CAACC,MAAS;AACvE,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAmB,CAAA,CAAE,GAEzCC,IAAY;AAAA,IAChB,EAAE,UAAU,WAAW,WAAW,KAAK,UAAU,GAAA;AAAA,IACjD,EAAE,UAAU,WAAW,WAAW,IAAA;AAAA,IAClC,EAAE,UAAU,oFAAoF,WAAW,IAAA;AAAA,IAC3G,EAAE,UAAU,WAAW,WAAW,IAAA;AAAA,IAClC,EAAE,UAAU,WAAW,WAAW,IAAA;AAAA,IAClC,EAAE,UAAU,WAAW,WAAW,IAAA;AAAA,EAAI,GAGlCC,IAAc,MAAM;AACxB,IAAAH,EAAS,CAAA,CAAE,GACXI,IAAG;AAAA,EAAE,GAGDC,IAAe,CAACC,MAAyC;AAC7D,UAAM,EAAE,SAAAC,GAAS,OAAAC,EAAA,IAAUF,EAAM;AACjC,IAAAN,EAAS,CAACS,MAAc;AACtB,YAAMC,IAAWH,IAAU,CAAC,GAAGE,GAAWD,CAAK,IAAIC,EAAU,OAAO,CAACE,MAAcA,MAAcH,CAAK;AACtGJ,aAAAA,EAAA,EAAKM,CAAQ,GACNA;AAAA,IAAA,CACR;AAAA,EAAA;AAGH,2BACGE,GAAA,EAGE,UAAA;AAAA,IAAAd,EAAK,UACJ,gBAAAe;AAAA,MAACjB,EAAY;AAAA,MAAZ;AAAA,QACC,OAAM;AAAA,QACN,cAAcG,EAAM,SAAS,IAAI,oBAAoB;AAAA,QACrD,SAASI;AAAA,MAAA;AAAA,IAAA;AAAA,IAGb,gBAAAU,EAACjB,GAAA,EAAa,GAAGE,GACd,UAAAI,EAAU,IAAI,CAAC,EAAE,UAAAY,GAAU,WAAAH,GAAW,UAAAI,EAAA,MACrC,gBAAAF;AAAA,MAACjB,EAAY;AAAA,MAAZ;AAAA,QAEC,OAAOkB;AAAA,QACP,OAAOH;AAAA,QACP,SAASZ,EAAM,SAASY,CAAS;AAAA,QACjC,UAAUN;AAAA,QACV,UAAAU;AAAA,MAAA;AAAA,MALKD;AAAA,IAAA,CAOR,EAAA,CACH;AAAA,EAAA,GACF;AAEJ,GAEME,IAAyC;AAAA,EAC7C,YAAY;AAAA,EACZ,UAAU;AACZ,GAEaC,IAAqBpB,EAAS,KAAK,CAAA,CAAE;AAClDoB,EAAmB,OAAO;AAAA,EACxB,GAAGD;AACL;AAEO,MAAME,IAAarB,EAAS,KAAK,CAAA,CAAE;AAC1CqB,EAAW,OAAO;AAAA,EAChB,GAAGF;AAAA;AAAA;AAAA,EAGH,QAAQ;AACV;AAEO,MAAMG,IAA+CtB,EAAS,KAAK,CAAA,CAAE;AAC5EsB,EAA6C,OAAO;AAAA,EAClD,YAAY;AAAA,EACZ,UAAU;AAAA;AAAA;AAAA,EAGV,QAAQ;AACV;"}
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelectBox.js","sources":["../../../src/components/MultiSelectBox/MultiSelectBox.tsx"],"sourcesContent":["import { useRef, useState, useId, useEffect, useCallback } from 'react';\nimport clsx from 'clsx';\n\nimport type { KeyboardEvent, ChangeEvent, MouseEvent } from 'react';\n\nimport styles from './MultiSelectBox.module.css';\n\nimport { Icon } from 'components/Icon';\nimport { Checkbox } from 'components/Checkbox';\nimport { usePositionedFloaters } from 'components/hooks/usePositionedFloaters';\n\nexport type MultiSelectData = {\n label: string;\n value: string | number;\n disabled?: boolean;\n};\n\nexport interface MultiSelectBoxProps {\n /** Array of label, values pairs */\n selectData: MultiSelectData[];\n /** Retuns selected label, values */\n onChange: (values: MultiSelectData[]) => void;\n /** Array of label, value pairs that should be check by default */\n defaultSelectedItems?: MultiSelectData[];\n /** Suffix label in the selectbutton '[count] selected' */\n labelSuffix?: string;\n /** Disables the multiselect */\n disabled?: boolean;\n /** If true sets the option dropdown min-width to the width of the select button. */\n fullWidth?: boolean;\n /** Dark border. */\n darkBorder?: boolean;\n /** The max height of the options. */\n maxOptionHeight?: `${number}${'px' | 'rem'}`;\n /** `true` to align the right side of the options with the select box; otherwise, `false` to align on the left side. */\n optionPositionRight?: boolean;\n}\n\nexport const MultiSelectBox = ({\n selectData,\n onChange,\n defaultSelectedItems,\n labelSuffix = 'geselecteerd',\n disabled = false,\n fullWidth = false,\n darkBorder = false,\n maxOptionHeight,\n optionPositionRight,\n}: MultiSelectBoxProps) => {\n const multiselectboxId = useId();\n const [selectedItems, setSelectedItems] = useState<MultiSelectData[]>(defaultSelectedItems || []);\n const [selectedItemsCount, setSelectedItemsCount] = useState(defaultSelectedItems?.length || 0);\n const [isOpen, setIsOpen] = useState(false);\n const [activeIndex, setActiveIndex] = useState(-1);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const optionListRef = useRef<HTMLUListElement>(null);\n\n const [positionElement, setPositionElement] = useState<HTMLElement | null>(null);\n const [referenceElement, setReferenceElement] = useState<HTMLButtonElement | null>(null);\n const { style: positionStyle } = usePositionedFloaters(positionElement, referenceElement, {\n mouseEvent: 'click',\n position: 'bottomLeft',\n offset: 4,\n maxFixedHeight: maxOptionHeight,\n horizontalPosition: optionPositionRight ? 'right' : 'left',\n mobileBreakpoint: '28rem',\n fullWidth,\n });\n\n const onMouseEventOutside = useCallback(\n ({ target }: Event | MouseEvent) => {\n if (!target || !wrapperRef.current) return;\n\n if (!wrapperRef.current.contains(target as Node)) {\n setIsOpen(false);\n }\n },\n [setIsOpen]\n );\n\n const onTriggerKeyDown = useCallback(\n (event: KeyboardEvent<HTMLButtonElement>) => {\n switch (event.key) {\n case 'Enter':\n event.preventDefault();\n setIsOpen(true);\n break;\n case 'Escape':\n if (isOpen) {\n event.stopPropagation();\n setIsOpen(false);\n }\n break;\n default:\n break;\n }\n },\n [isOpen]\n );\n\n const onOptionKeyDown = useCallback(\n (event: KeyboardEvent<HTMLLIElement>) => {\n if (!isOpen) return;\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n setActiveIndex((prev) => {\n let nextIndex = prev;\n do {\n nextIndex = nextIndex < selectData.length - 1 ? nextIndex + 1 : 0;\n } while (selectData[nextIndex]?.disabled);\n return nextIndex;\n });\n break;\n case 'ArrowUp':\n event.preventDefault();\n setActiveIndex((prev) => {\n let nextIndex = prev;\n do {\n nextIndex = nextIndex <= 0 ? selectData.length - 1 : nextIndex - 1;\n } while (selectData[nextIndex]?.disabled);\n return nextIndex;\n });\n break;\n case 'Enter': {\n event.preventDefault();\n const selectedItem = selectData[activeIndex];\n if (!selectedItem || selectedItem.disabled) break;\n const isAlreadySelected = selectedItems.some((item) => item.value === selectedItem.value);\n const updatedSelectedItems = isAlreadySelected\n ? selectedItems.filter((item) => item.value !== selectedItem.value)\n : [...selectedItems, selectedItem];\n\n setSelectedItems(updatedSelectedItems);\n setSelectedItemsCount(updatedSelectedItems.length);\n onChange(updatedSelectedItems);\n break;\n }\n case 'Tab':\n event.preventDefault();\n setIsOpen(false);\n break;\n case 'Escape':\n event.stopPropagation();\n setIsOpen(false);\n break;\n default:\n break;\n }\n },\n [activeIndex, isOpen, selectData, selectedItems, onChange]\n );\n\n const onOptionClick = (event: MouseEvent<HTMLLIElement>, option: MultiSelectData) => {\n if (option.disabled) return;\n\n // Prevent toggle if click originated from the checkbox\n if ((event.target as HTMLElement).tagName === 'INPUT') return;\n\n const isAlreadySelected = selectedItems.some((item) => item.value === option.value);\n const updatedSelectedItems = isAlreadySelected\n ? selectedItems.filter((item) => item.value !== option.value)\n : [...selectedItems, option];\n\n setSelectedItems(updatedSelectedItems);\n setSelectedItemsCount(updatedSelectedItems.length);\n onChange(updatedSelectedItems);\n };\n\n const handleSelect = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const { checked, value } = event.target;\n let updatedSelectedItems = [...selectedItems];\n\n if (checked) {\n const selectedItem = selectData.find((item) => item.value === value);\n if (selectedItem) {\n updatedSelectedItems.push(selectedItem);\n }\n } else {\n updatedSelectedItems = updatedSelectedItems.filter((item) => item.value !== value);\n }\n\n setSelectedItems(updatedSelectedItems);\n setSelectedItemsCount(updatedSelectedItems.length);\n onChange(updatedSelectedItems);\n },\n [selectData, selectedItems, onChange]\n );\n\n useEffect(() => {\n if (isOpen) {\n setActiveIndex(0);\n }\n }, [isOpen]);\n\n useEffect(() => {\n const activeOption = optionListRef.current?.children[activeIndex] as HTMLElement;\n activeOption?.focus();\n }, [activeIndex]);\n\n useEffect(() => {\n if (!isOpen) return;\n\n document.addEventListener('click', onMouseEventOutside, true);\n document.addEventListener('scroll', onMouseEventOutside, true);\n\n return () => {\n document.removeEventListener('click', onMouseEventOutside, true);\n document.removeEventListener('scroll', onMouseEventOutside, true);\n };\n }, [onMouseEventOutside, isOpen]);\n\n return (\n <div className={styles['multi-select-box-wrapper']} ref={wrapperRef}>\n <button\n className={clsx(styles['multi-select-box-trigger'], {\n [styles['multi-select-box-trigger--darkBorder']]: darkBorder,\n })}\n type=\"button\"\n onClick={() => {\n setIsOpen(!isOpen);\n }}\n onKeyDown={onTriggerKeyDown}\n aria-expanded={isOpen}\n aria-haspopup=\"listbox\"\n aria-label={`${selectedItemsCount} ${labelSuffix}`}\n disabled={disabled}\n {...(isOpen && { 'aria-controls': multiselectboxId })}\n ref={setReferenceElement}\n >\n <span className={styles['multi-select-box-trigger-label']}>\n {selectedItemsCount} {labelSuffix}\n </span>\n <Icon\n className={clsx(styles['multi-select-box-trigger-icon'], {\n [styles['multi-select-box-trigger-icon--open']]: isOpen,\n })}\n name=\"CheveronDown\"\n size={16}\n />\n </button>\n\n <div\n id={multiselectboxId}\n className={clsx(styles['multi-select-box-listbox--wrapper'])}\n style={{ ...positionStyle.style, visibility: isOpen ? 'visible' : 'hidden' }}\n role=\"listbox\"\n ref={setPositionElement}\n >\n <ul className={styles['multi-select-box-listbox']} ref={optionListRef}>\n {selectData.map(({ label, value, disabled }, index) => (\n <li\n className={clsx(styles['multi-select-box-listbox-option'], {\n [styles['multi-select-box-listbox-option--active']]: index === activeIndex,\n [styles['multi-select-box-listbox-option--disabled']]: disabled,\n })}\n key={value}\n role=\"option\"\n onKeyDown={onOptionKeyDown}\n onClick={(event) => onOptionClick(event, { label, value, disabled })}\n onMouseOver={() => setActiveIndex(index)}\n onFocus={() => setActiveIndex(index)}\n tabIndex={0}\n aria-selected={selectedItems.some((item) => item.value === value)}\n >\n <label htmlFor={label} className={styles['multi-select-box-listbox-option-content']} tabIndex={-1}>\n <Checkbox\n id={`${label}-${multiselectboxId}`}\n onChange={handleSelect}\n value={value}\n tabIndex={-1}\n disabled={disabled}\n checked={selectedItems.some((item) => item.value === value)}\n />\n <span>{label}</span>\n </label>\n </li>\n ))}\n </ul>\n </div>\n </div>\n );\n};\n"],"names":["MultiSelectBox","selectData","onChange","defaultSelectedItems","labelSuffix","disabled","fullWidth","darkBorder","maxOptionHeight","optionPositionRight","multiselectboxId","useId","selectedItems","setSelectedItems","useState","selectedItemsCount","setSelectedItemsCount","isOpen","setIsOpen","activeIndex","setActiveIndex","wrapperRef","useRef","optionListRef","positionElement","setPositionElement","referenceElement","setReferenceElement","positionStyle","usePositionedFloaters","onMouseEventOutside","useCallback","target","onTriggerKeyDown","event","onOptionKeyDown","prev","nextIndex","_a","selectedItem","updatedSelectedItems","item","onOptionClick","option","handleSelect","checked","value","useEffect","activeOption","styles","jsxs","clsx","jsx","Icon","label","index","Checkbox"],"mappings":";;;;;;;;;;;;;;;;;;;GAsCaA,KAAiB,CAAC;AAAA,EAC7B,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,YAAAC,IAAa;AAAA,EACb,iBAAAC;AAAA,EACA,qBAAAC;AACF,MAA2B;AACzB,QAAMC,IAAmBC,EAAM,GACzB,CAACC,GAAeC,CAAgB,IAAIC,EAA4BX,KAAwB,CAAA,CAAE,GAC1F,CAACY,GAAoBC,CAAqB,IAAIF,GAASX,KAAA,gBAAAA,EAAsB,WAAU,CAAC,GACxF,CAACc,GAAQC,CAAS,IAAIJ,EAAS,EAAK,GACpC,CAACK,GAAaC,CAAc,IAAIN,EAAS,EAAE,GAC3CO,IAAaC,EAAuB,IAAI,GACxCC,IAAgBD,EAAyB,IAAI,GAE7C,CAACE,GAAiBC,CAAkB,IAAIX,EAA6B,IAAI,GACzE,CAACY,GAAkBC,CAAmB,IAAIb,EAAmC,IAAI,GACjF,EAAE,OAAOc,EAAA,IAAkBC,EAAsBL,GAAiBE,GAAkB;AAAA,IACxF,YAAY;AAAA,IAEZ,QAAQ;AAAA,IACR,gBAAgBlB;AAAA,IAChB,oBAAoBC,IAAsB,UAAU;AAAA,IACpD,kBAAkB;AAAA,IAClB,WAAAH;AAAA,EAAA,CACD,GAEKwB,IAAsBC;AAAA,IAC1B,CAAC,EAAE,QAAAC,EAAA,MAAiC;AAClC,MAAI,CAACA,KAAU,CAACX,EAAW,WAEtBA,EAAW,QAAQ,SAASW,CAAc,KAC7Cd,EAAU,EAAK;AAAA,IAEnB;AAAA,IACA,CAACA,CAAS;AAAA,EACZ,GAEMe,IAAmBF;AAAA,IACvB,CAACG,MAA4C;AAC3C,cAAQA,EAAM,KAAK;AAAA,QACjB,KAA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AC,UAAM,UAAME,EAAA,CAAA;AAAA,YAAA,EACf,CAAA;AAAA,UAAA;AAAA,UAnBKR;AAAA,QAAA,CAqBR,EACH,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"MultiSelectBox.js","sources":["../../../src/components/MultiSelectBox/MultiSelectBox.tsx"],"sourcesContent":["import { useRef, useState, useId, useEffect, useCallback } from 'react';\nimport { clsx } from 'clsx';\n\nimport type { KeyboardEvent, ChangeEvent, MouseEvent } from 'react';\n\nimport styles from './MultiSelectBox.module.css';\n\nimport { Icon } from 'components/Icon';\nimport { Checkbox } from 'components/Checkbox';\nimport { usePositionedFloaters } from 'components/hooks/usePositionedFloaters';\n\nexport type MultiSelectData = {\n label: string;\n value: string | number;\n disabled?: boolean;\n};\n\nexport interface MultiSelectBoxProps {\n /** Array of label, values pairs */\n selectData: MultiSelectData[];\n /** Retuns selected label, values */\n onChange: (values: MultiSelectData[]) => void;\n /** Array of label, value pairs that should be check by default */\n defaultSelectedItems?: MultiSelectData[];\n /** Suffix label in the selectbutton '[count] selected' */\n labelSuffix?: string;\n /** Disables the multiselect */\n disabled?: boolean;\n /** If true sets the option dropdown min-width to the width of the select button. */\n fullWidth?: boolean;\n /** Dark border. */\n darkBorder?: boolean;\n /** The max height of the options. */\n maxOptionHeight?: `${number}${'px' | 'rem'}`;\n /** `true` to align the right side of the options with the select box; otherwise, `false` to align on the left side. */\n optionPositionRight?: boolean;\n}\n\nexport const MultiSelectBox = ({\n selectData,\n onChange,\n defaultSelectedItems,\n labelSuffix = 'geselecteerd',\n disabled = false,\n fullWidth = false,\n darkBorder = false,\n maxOptionHeight,\n optionPositionRight,\n}: MultiSelectBoxProps) => {\n const multiselectboxId = useId();\n const [selectedItems, setSelectedItems] = useState<MultiSelectData[]>(defaultSelectedItems || []);\n const [selectedItemsCount, setSelectedItemsCount] = useState(defaultSelectedItems?.length || 0);\n const [isOpen, setIsOpen] = useState(false);\n const [activeIndex, setActiveIndex] = useState(-1);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const optionListRef = useRef<HTMLUListElement>(null);\n\n const [positionElement, setPositionElement] = useState<HTMLElement | null>(null);\n const [referenceElement, setReferenceElement] = useState<HTMLButtonElement | null>(null);\n const { style: positionStyle } = usePositionedFloaters(positionElement, referenceElement, {\n mouseEvent: 'click',\n position: 'bottomLeft',\n offset: 4,\n maxFixedHeight: maxOptionHeight,\n horizontalPosition: optionPositionRight ? 'right' : 'left',\n mobileBreakpoint: '28rem',\n fullWidth,\n });\n\n const onMouseEventOutside = useCallback(\n ({ target }: Event | MouseEvent) => {\n if (!target || !wrapperRef.current) return;\n\n if (!wrapperRef.current.contains(target as Node)) {\n setIsOpen(false);\n }\n },\n [setIsOpen]\n );\n\n const onTriggerKeyDown = useCallback(\n (event: KeyboardEvent<HTMLButtonElement>) => {\n switch (event.key) {\n case 'Enter':\n event.preventDefault();\n setIsOpen(true);\n break;\n case 'Escape':\n if (isOpen) {\n event.stopPropagation();\n setIsOpen(false);\n }\n break;\n default:\n break;\n }\n },\n [isOpen]\n );\n\n const onOptionKeyDown = useCallback(\n (event: KeyboardEvent<HTMLLIElement>) => {\n if (!isOpen) return;\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n setActiveIndex((prev) => {\n let nextIndex = prev;\n do {\n nextIndex = nextIndex < selectData.length - 1 ? nextIndex + 1 : 0;\n } while (selectData[nextIndex]?.disabled);\n return nextIndex;\n });\n break;\n case 'ArrowUp':\n event.preventDefault();\n setActiveIndex((prev) => {\n let nextIndex = prev;\n do {\n nextIndex = nextIndex <= 0 ? selectData.length - 1 : nextIndex - 1;\n } while (selectData[nextIndex]?.disabled);\n return nextIndex;\n });\n break;\n case 'Enter': {\n event.preventDefault();\n const selectedItem = selectData[activeIndex];\n if (!selectedItem || selectedItem.disabled) break;\n const isAlreadySelected = selectedItems.some((item) => item.value === selectedItem.value);\n const updatedSelectedItems = isAlreadySelected\n ? selectedItems.filter((item) => item.value !== selectedItem.value)\n : [...selectedItems, selectedItem];\n\n setSelectedItems(updatedSelectedItems);\n setSelectedItemsCount(updatedSelectedItems.length);\n onChange(updatedSelectedItems);\n break;\n }\n case 'Tab':\n event.preventDefault();\n setIsOpen(false);\n break;\n case 'Escape':\n event.stopPropagation();\n setIsOpen(false);\n break;\n default:\n break;\n }\n },\n [activeIndex, isOpen, selectData, selectedItems, onChange]\n );\n\n const onOptionClick = (event: MouseEvent<HTMLLIElement>, option: MultiSelectData) => {\n if (option.disabled) return;\n\n // Prevent toggle if click originated from the checkbox\n if ((event.target as HTMLElement).tagName === 'INPUT') return;\n\n const isAlreadySelected = selectedItems.some((item) => item.value === option.value);\n const updatedSelectedItems = isAlreadySelected\n ? selectedItems.filter((item) => item.value !== option.value)\n : [...selectedItems, option];\n\n setSelectedItems(updatedSelectedItems);\n setSelectedItemsCount(updatedSelectedItems.length);\n onChange(updatedSelectedItems);\n };\n\n const handleSelect = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const { checked, value } = event.target;\n let updatedSelectedItems = [...selectedItems];\n\n if (checked) {\n const selectedItem = selectData.find((item) => item.value === value);\n if (selectedItem) {\n updatedSelectedItems.push(selectedItem);\n }\n } else {\n updatedSelectedItems = updatedSelectedItems.filter((item) => item.value !== value);\n }\n\n setSelectedItems(updatedSelectedItems);\n setSelectedItemsCount(updatedSelectedItems.length);\n onChange(updatedSelectedItems);\n },\n [selectData, selectedItems, onChange]\n );\n\n useEffect(() => {\n if (isOpen) {\n setActiveIndex(0);\n }\n }, [isOpen]);\n\n useEffect(() => {\n const activeOption = optionListRef.current?.children[activeIndex] as HTMLElement;\n activeOption?.focus();\n }, [activeIndex]);\n\n useEffect(() => {\n if (!isOpen) return;\n\n document.addEventListener('click', onMouseEventOutside, true);\n document.addEventListener('scroll', onMouseEventOutside, true);\n\n return () => {\n document.removeEventListener('click', onMouseEventOutside, true);\n document.removeEventListener('scroll', onMouseEventOutside, true);\n };\n }, [onMouseEventOutside, isOpen]);\n\n return (\n <div className={styles['multi-select-box-wrapper']} ref={wrapperRef}>\n <button\n className={clsx(styles['multi-select-box-trigger'], {\n [styles['multi-select-box-trigger--darkBorder']]: darkBorder,\n })}\n type=\"button\"\n onClick={() => {\n setIsOpen(!isOpen);\n }}\n onKeyDown={onTriggerKeyDown}\n aria-expanded={isOpen}\n aria-haspopup=\"listbox\"\n aria-label={`${selectedItemsCount} ${labelSuffix}`}\n disabled={disabled}\n {...(isOpen && { 'aria-controls': multiselectboxId })}\n ref={setReferenceElement}\n >\n <span className={styles['multi-select-box-trigger-label']}>\n {selectedItemsCount} {labelSuffix}\n </span>\n <Icon\n className={clsx(styles['multi-select-box-trigger-icon'], {\n [styles['multi-select-box-trigger-icon--open']]: isOpen,\n })}\n name=\"CheveronDown\"\n size={16}\n />\n </button>\n\n <div\n id={multiselectboxId}\n className={clsx(styles['multi-select-box-listbox--wrapper'])}\n style={{ ...positionStyle.style, visibility: isOpen ? 'visible' : 'hidden' }}\n role=\"listbox\"\n ref={setPositionElement}\n >\n <ul className={styles['multi-select-box-listbox']} ref={optionListRef}>\n {selectData.map(({ label, value, disabled }, index) => (\n <li\n className={clsx(styles['multi-select-box-listbox-option'], {\n [styles['multi-select-box-listbox-option--active']]: index === activeIndex,\n [styles['multi-select-box-listbox-option--disabled']]: disabled,\n })}\n key={value}\n role=\"option\"\n onKeyDown={onOptionKeyDown}\n onClick={(event) => onOptionClick(event, { label, value, disabled })}\n onMouseOver={() => setActiveIndex(index)}\n onFocus={() => setActiveIndex(index)}\n tabIndex={0}\n aria-selected={selectedItems.some((item) => item.value === value)}\n >\n <label htmlFor={label} className={styles['multi-select-box-listbox-option-content']} tabIndex={-1}>\n <Checkbox\n id={`${label}-${multiselectboxId}`}\n onChange={handleSelect}\n value={value}\n tabIndex={-1}\n disabled={disabled}\n checked={selectedItems.some((item) => item.value === value)}\n />\n <span>{label}</span>\n </label>\n </li>\n ))}\n </ul>\n </div>\n </div>\n );\n};\n"],"names":["MultiSelectBox","selectData","onChange","defaultSelectedItems","labelSuffix","disabled","fullWidth","darkBorder","maxOptionHeight","optionPositionRight","multiselectboxId","useId","selectedItems","setSelectedItems","useState","selectedItemsCount","setSelectedItemsCount","isOpen","setIsOpen","activeIndex","setActiveIndex","wrapperRef","useRef","optionListRef","positionElement","setPositionElement","referenceElement","setReferenceElement","positionStyle","usePositionedFloaters","onMouseEventOutside","useCallback","target","onTriggerKeyDown","event","onOptionKeyDown","prev","nextIndex","_a","selectedItem","updatedSelectedItems","item","onOptionClick","option","handleSelect","checked","value","useEffect","activeOption","styles","jsxs","clsx","jsx","Icon","label","index","Checkbox"],"mappings":";;;;;;;;;;;;;;;;;;;GAsCaA,KAAiB,CAAC;AAAA,EAC7B,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,YAAAC,IAAa;AAAA,EACb,iBAAAC;AAAA,EACA,qBAAAC;AACF,MAA2B;AACzB,QAAMC,IAAmBC,EAAA,GACnB,CAACC,GAAeC,CAAgB,IAAIC,EAA4BX,KAAwB,CAAA,CAAE,GAC1F,CAACY,GAAoBC,CAAqB,IAAIF,GAASX,KAAA,gBAAAA,EAAsB,WAAU,CAAC,GACxF,CAACc,GAAQC,CAAS,IAAIJ,EAAS,EAAK,GACpC,CAACK,GAAaC,CAAc,IAAIN,EAAS,EAAE,GAC3CO,IAAaC,EAAuB,IAAI,GACxCC,IAAgBD,EAAyB,IAAI,GAE7C,CAACE,GAAiBC,CAAkB,IAAIX,EAA6B,IAAI,GACzE,CAACY,GAAkBC,CAAmB,IAAIb,EAAmC,IAAI,GACjF,EAAE,OAAOc,EAAA,IAAkBC,EAAsBL,GAAiBE,GAAkB;AAAA,IACxF,YAAY;AAAA,IAEZ,QAAQ;AAAA,IACR,gBAAgBlB;AAAA,IAChB,oBAAoBC,IAAsB,UAAU;AAAA,IACpD,kBAA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EAAO,yCAAyC,GAAG,UAAU,IAC7F,UAAA;AAAA,cAAA,gBAAAG;AAAA,gBAACI;AAAA,gBAAA;AAAA,kBACC,IAAI,GAAGF,CAAK,IAAI5C,CAAgB;AAAA,kBAChC,UAAUkC;AAAA,kBACV,OAAAE;AAAA,kBACA,UAAU;AAAA,kBACV,UAAUzC;AAAAA,kBACV,SAASO,EAAc,KAAK,CAAC6B,MAASA,EAAK,UAAUK,CAAK;AAAA,gBAAA;AAAA,cAAA;AAAA,cAE5D,gBAAAM,EAAC,UAAM,UAAAE,EAAA,CAAM;AAAA,YAAA,EAAA,CACf;AAAA,UAAA;AAAA,UAnBKR;AAAA,QAAA,CAqBR,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
@@ -2,5 +2,5 @@ import { Meta } from '@storybook/react';
2
2
  import { MultiSelectBoxProps } from './MultiSelectBox';
3
3
  declare const _default: Meta<MultiSelectBoxProps>;
4
4
  export default _default;
5
- export declare const MultiSelectBoxExample: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, MultiSelectBoxProps>;
6
- export declare const WithDefaultSelectedItems: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, MultiSelectBoxProps>;
5
+ export declare const MultiSelectBoxExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, MultiSelectBoxProps>;
6
+ export declare const WithDefaultSelectedItems: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, MultiSelectBoxProps>;
@@ -1,7 +1,7 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
- import { fn as o } from "../../index-Dwqes6RH.js";
2
+ import { W as n } from "../../index-Di9WPZUe.js";
3
3
  import { MultiSelectBox as e } from "./MultiSelectBox.js";
4
- const c = "<MultiSelectBox selectData={[{label, value}]} onChange={fn} labelSuffix={string} />", b = {
4
+ const c = "<MultiSelectBox selectData={[{label, value}]} onChange={fn} labelSuffix={string} />", f = {
5
5
  title: "Organisms/MultiSelectBox",
6
6
  component: e,
7
7
  argTypes: {},
@@ -26,14 +26,14 @@ const c = "<MultiSelectBox selectData={[{label, value}]} onChange={fn} labelSuff
26
26
  },
27
27
  { label: "H.I. Docent", value: "9" },
28
28
  { label: "K.L. Docent ", value: "10" }
29
- ], t = (n) => /* @__PURE__ */ l("div", { style: { width: "30rem", margin: "0rem auto 0 auto" }, children: /* @__PURE__ */ l(e, { ...n }) }), a = {
29
+ ], t = (o) => /* @__PURE__ */ l("div", { style: { width: "30rem", margin: "0rem auto 0 auto" }, children: /* @__PURE__ */ l(e, { ...o }) }), a = {
30
30
  fullWidth: !1,
31
31
  labelSuffix: "geselecteerd",
32
32
  maxOptionHeight: "20rem",
33
33
  optionPositionRight: !1,
34
34
  disabled: !1,
35
35
  selectData: s,
36
- onChange: o()
36
+ onChange: n()
37
37
  }, i = t.bind({});
38
38
  i.args = {
39
39
  ...a
@@ -50,6 +50,6 @@ r.args = {
50
50
  export {
51
51
  i as MultiSelectBoxExample,
52
52
  r as WithDefaultSelectedItems,
53
- b as default
53
+ f as default
54
54
  };
55
55
  //# sourceMappingURL=MultiSelectBox.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelectBox.stories.js","sources":["../../../src/components/MultiSelectBox/MultiSelectBox.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { MultiSelectBoxProps } from './MultiSelectBox';\n\nimport { MultiSelectBox } from './MultiSelectBox';\n\nconst codeString = `<MultiSelectBox selectData={[{label, value}]} onChange={fn} labelSuffix={string} />`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Organisms/MultiSelectBox',\n component: MultiSelectBox,\n argTypes: {},\n parameters: {\n inspectComponent: MultiSelectBox,\n codeString: codeString,\n },\n} as Meta<MultiSelectBoxProps>;\n\nconst mockItems = [\n { label: 'A.B. Docent', value: '1' },\n { label: 'B.C. Docent met lange achternaam', value: '2' },\n {\n label: 'prof. F.G. Docent met lang achternaam',\n value: '3',\n },\n { label: 'H.I. Docent', value: '4' },\n { label: 'K.L. Docent ', value: '5' },\n { label: 'A.B. Docent', value: '6' },\n { label: 'B.C. Docent met lange achternaam', value: '7' },\n {\n label: 'prof. F.G. Docent met lang achternaam',\n value: '8',\n },\n { label: 'H.I. Docent', value: '9' },\n { label: 'K.L. Docent ', value: '10' },\n];\n\nconst Template: StoryFn<MultiSelectBoxProps> = (args) => {\n return (\n <div style={{ width: '30rem', margin: '0rem auto 0 auto' }}>\n <MultiSelectBox {...args} />\n </div>\n );\n};\n\nconst defaultArgs: Partial<MultiSelectBoxProps> = {\n fullWidth: false,\n labelSuffix: 'geselecteerd',\n maxOptionHeight: '20rem',\n optionPositionRight: false,\n disabled: false,\n selectData: mockItems,\n onChange: fn(),\n};\n\nexport const MultiSelectBoxExample = Template.bind({});\nMultiSelectBoxExample.args = {\n ...defaultArgs,\n};\n\nexport const WithDefaultSelectedItems = Template.bind({});\nWithDefaultSelectedItems.args = {\n ...defaultArgs,\n defaultSelectedItems: [\n { label: 'A.B. Docent', value: '1' },\n { label: 'H.I. Docent', value: '4' },\n { label: 'A.B. Docent', value: '6' },\n ],\n};\n"],"names":["codeString","MultiSelectBox_stories","MultiSelectBox","mockItems","Template","args","jsx","defaultArgs","fn","MultiSelectBoxExample","WithDefaultSelectedItems"],"mappings":";;;AAOA,MAAMA,IAAa,uFAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU,CAAC;AAAA,EACX,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAY;AAAA,EAChB,EAAE,OAAO,eAAe,OAAO,IAAI;AAAA,EACnC,EAAE,OAAO,oCAAoC,OAAO,IAAI;AAAA,EACxD;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,EAAE,OAAO,eAAe,OAAO,IAAI;AAAA,EACnC,EAAE,OAAO,gBAAgB,OAAO,IAAI;AAAA,EACpC,EAAE,OAAO,eAAe,OAAO,IAAI;AAAA,EACnC,EAAE,OAAO,oCAAoC,OAAO,IAAI;AAAA,EACxD;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,EAAE,OAAO,eAAe,OAAO,IAAI;AAAA,EACnC,EAAE,OAAO,gBAAgB,OAAO,KAAK;AACvC,GAEMC,IAAyC,CAACC,MAE3C,gBAAAC,EAAA,OAAA,EAAI,OAAO,EAAE,OAAO,SAAS,QAAQ,mBAAA,GACpC,UAAA,gBAAAA,EAACJ,GAAgB,EAAA,GAAGG,EAAM,CAAA,GAC5B,GAIEE,IAA4C;AAAA,EAChD,WAAW;AAAA,EACX,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,UAAU;AAAA,EACV,YAAYJ;AAAA,EACZ,UAAUK,EAAG;AACf,GAEaC,IAAwBL,EAAS,KAAK,CAAE,CAAA;AACrDK,EAAsB,OAAO;AAAA,EAC3B,GAAGF;AACL;AAEO,MAAMG,IAA2BN,EAAS,KAAK,CAAE,CAAA;AACxDM,EAAyB,OAAO;AAAA,EAC9B,GAAGH;AAAA,EACH,sBAAsB;AAAA,IACpB,EAAE,OAAO,eAAe,OAAO,IAAI;AAAA,IACnC,EAAE,OAAO,eAAe,OAAO,IAAI;AAAA,IACnC,EAAE,OAAO,eAAe,OAAO,IAAI;AAAA,EAAA;AAEvC;"}
1
+ {"version":3,"file":"MultiSelectBox.stories.js","sources":["../../../src/components/MultiSelectBox/MultiSelectBox.stories.tsx"],"sourcesContent":["import { fn } from 'storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { MultiSelectBoxProps } from './MultiSelectBox';\n\nimport { MultiSelectBox } from './MultiSelectBox';\n\nconst codeString = `<MultiSelectBox selectData={[{label, value}]} onChange={fn} labelSuffix={string} />`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Organisms/MultiSelectBox',\n component: MultiSelectBox,\n argTypes: {},\n parameters: {\n inspectComponent: MultiSelectBox,\n codeString: codeString,\n },\n} as Meta<MultiSelectBoxProps>;\n\nconst mockItems = [\n { label: 'A.B. Docent', value: '1' },\n { label: 'B.C. Docent met lange achternaam', value: '2' },\n {\n label: 'prof. F.G. Docent met lang achternaam',\n value: '3',\n },\n { label: 'H.I. Docent', value: '4' },\n { label: 'K.L. Docent ', value: '5' },\n { label: 'A.B. Docent', value: '6' },\n { label: 'B.C. Docent met lange achternaam', value: '7' },\n {\n label: 'prof. F.G. Docent met lang achternaam',\n value: '8',\n },\n { label: 'H.I. Docent', value: '9' },\n { label: 'K.L. Docent ', value: '10' },\n];\n\nconst Template: StoryFn<MultiSelectBoxProps> = (args) => {\n return (\n <div style={{ width: '30rem', margin: '0rem auto 0 auto' }}>\n <MultiSelectBox {...args} />\n </div>\n );\n};\n\nconst defaultArgs: Partial<MultiSelectBoxProps> = {\n fullWidth: false,\n labelSuffix: 'geselecteerd',\n maxOptionHeight: '20rem',\n optionPositionRight: false,\n disabled: false,\n selectData: mockItems,\n onChange: fn(),\n};\n\nexport const MultiSelectBoxExample = Template.bind({});\nMultiSelectBoxExample.args = {\n ...defaultArgs,\n};\n\nexport const WithDefaultSelectedItems = Template.bind({});\nWithDefaultSelectedItems.args = {\n ...defaultArgs,\n defaultSelectedItems: [\n { label: 'A.B. Docent', value: '1' },\n { label: 'H.I. Docent', value: '4' },\n { label: 'A.B. Docent', value: '6' },\n ],\n};\n"],"names":["codeString","MultiSelectBox_stories","MultiSelectBox","mockItems","Template","args","jsx","defaultArgs","fn","MultiSelectBoxExample","WithDefaultSelectedItems"],"mappings":";;;AAOA,MAAMA,IAAa,uFAGnBC,IAAe;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU,CAAA;AAAA,EACV,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAA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tOb.js";
3
- import { r as n, s as t, f as a } from "../../react.esm-CsMDid07.js";
2
+ import "../../index-DV47hRzi.js";
3
+ import { r as n, s as t, f as a } from "../../react.esm-CFMwGdo5.js";
4
4
  import { MultiSelectBox as l } from "./MultiSelectBox.js";
5
5
  const i = jest.fn(), c = [
6
6
  { label: "Option 1", value: "1" },
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelectBox.test.js","sources":["../../../src/components/MultiSelectBox/MultiSelectBox.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen, fireEvent } from '@testing-library/react';\n\nimport { MultiSelectBox } from './MultiSelectBox';\n\nconst onChangeSpy = jest.fn();\n\nconst mockSelectData = [\n { label: 'Option 1', value: '1' },\n { label: 'Option 2', value: '2' },\n { label: 'Option 3', value: '3' },\n];\n\ndescribe('MultiSelectBox', () => {\n it('renders the component with default props', () => {\n render(<MultiSelectBox selectData={mockSelectData} onChange={onChangeSpy} labelSuffix=\"selected\" />);\n const button = screen.getByRole('button');\n expect(button).toBeInTheDocument();\n expect(button).toHaveAttribute('aria-expanded', 'false');\n });\n\n it('opens the dropdown when the button is clicked', () => {\n render(<MultiSelectBox selectData={mockSelectData} onChange={onChangeSpy} labelSuffix=\"selected\" />);\n const button = screen.getByRole('button');\n fireEvent.click(button);\n expect(button).toHaveAttribute('aria-expanded', 'true');\n expect(screen.getByRole('listbox')).toBeInTheDocument();\n });\n\n it('closes the dropdown when clicking outside', () => {\n render(\n <>\n <MultiSelectBox selectData={mockSelectData} onChange={onChangeSpy} labelSuffix=\"selected\" />\n <div data-testid=\"outside-element\">Outside</div>\n </>\n );\n\n const button = screen.getByRole('button');\n fireEvent.click(button);\n expect(button).toHaveAttribute('aria-expanded', 'true');\n const outsideElement = screen.getByTestId('outside-element');\n fireEvent.click(outsideElement);\n expect(button).toHaveAttribute('aria-expanded', 'false');\n });\n});\n"],"names":["onChangeSpy","mockSelectData","render","jsx","MultiSelectBox","button","screen","fireEvent","jsxs","Fragment","outs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CAAc,GAC9B,OAAOL,CAAM,EAAE,gBAAgB,iBAAiB,OAAO;AAAA,EAAA,CACxD;AACH,CAAC;"}
1
+ {"version":3,"file":"MultiSelectBox.test.js","sources":["../../../src/components/MultiSelectBox/MultiSelectBox.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen, fireEvent } from '@testing-library/react';\n\nimport { MultiSelectBox } from './MultiSelectBox';\n\nconst onChangeSpy = jest.fn();\n\nconst mockSelectData = [\n { label: 'Option 1', value: '1' },\n { label: 'Option 2', value: '2' },\n { label: 'Option 3', value: '3' },\n];\n\ndescribe('MultiSelectBox', () => {\n it('renders the component with default props', () => {\n render(<MultiSelectBox selectData={mockSelectData} onChange={onChangeSpy} labelSuffix=\"selected\" />);\n const button = screen.getByRole('button');\n expect(button).toBeInTheDocument();\n expect(button).toHaveAttribute('aria-expanded', 'false');\n });\n\n it('opens the dropdown when the button is clicked', () => {\n render(<MultiSelectBox selectData={mockSelectData} onChange={onChangeSpy} labelSuffix=\"selected\" />);\n const button = screen.getByRole('button');\n fireEvent.click(button);\n expect(button).toHaveAttribute('aria-expanded', 'true');\n expect(screen.getByRole('listbox')).toBeInTheDocument();\n });\n\n it('closes the dropdown when clicking outside', () => {\n render(\n <>\n <MultiSelectBox selectData={mockSelectData} onChange={onChangeSpy} labelSuffix=\"selected\" />\n <div data-testid=\"outside-element\">Outside</div>\n </>\n );\n\n const button = screen.getByRole('button');\n fireEvent.click(button);\n expect(button).toHaveAttribute('aria-expanded', 'true');\n const outsideElement = screen.getByTestId('outside-element');\n fireEvent.click(outsideElement);\n expect(button).toHaveAttribute('aria-expanded', 'false');\n });\n});\n"],"names":["onChangeSpy","mockSelectData","render","jsx","MultiSelectBox","button","screen","fireEvent","jsxs","Fragment","outsideElement"],"mappings":";;;;AAKA,MAAMA,IAAc,KAAK,GAAA,GAEnBC,IAAiB;AAAA,EACrB,EAAE,OAAO,YAAY,OAAO,IAAA;AAAA,EAC5B,EAAE,OAAO,YAAY,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ime";
2
- import { c as s } from "../../clsx-OuTLNxxd.js";
3
- import { Icon as r } from "../Icon/Icon.js";
4
- import '../../assets/Notification.css';const p = "_notification_eo06p_1", t = {
5
- notification: p,
6
- "notification--default": "_notification--default_eo06p_6",
7
- "notification--bar": "_notification--bar_eo06p_9",
8
- "notification--neutral": "_notification--neutral_eo06p_14",
9
- "notification--information": "_notification--information_eo06p_18",
10
- "notification--success": "_notification--success_eo06p_22",
11
- "notification--warning": "_notification--warning_eo06p_26",
12
- "notification--danger": "_notification--danger_eo06p_30",
13
- "notification-content": "_notification-content_eo06p_54",
14
- "notification-content--text": "_notification-content--text_eo06p_58",
15
- "notification-title": "_notification-title_eo06p_64",
16
- "notification-subtitle": "_notification-subtitle_eo06p_68",
17
- "notification-close-button": "_notification-close-button_eo06p_72",
18
- "notification-close-button--bar--neutral": "_notification-close-button--bar--neutral_eo06p_106",
19
- "notification-close-button--bar--information": "_notification-close-button--bar--information_eo06p_107",
20
- "notification-close-button--bar--danger": "_notification-close-button--bar--danger_eo06p_108",
21
- "notification-close-button--neutral": "_notification-close-button--neutral_eo06p_112",
22
- "notification-close-button--information": "_notification-close-button--information_eo06p_116",
23
- "notification-close-button--success": "_notification-close-button--success_eo06p_120",
24
- "notification-close-button--warning": "_notification-close-button--warning_eo06p_123",
25
- "notification-close-button--danger": "_notification-close-button--danger_eo06p_126",
26
- "notification-close-button--bar--success": "_notification-close-button--bar--success_eo06p_139",
27
- "notification-close-button--bar--warning": "_notification-close-button--bar--warning_eo06p_142"
28
- }, N = ({ title: _, subtitle: a, action: e, variant: f = "default", level: i, onClose: l }) => {
29
- const u = f === "bar";
30
- function b(n) {
31
- return n === "neutral" ? "CalendarEdit" : n === "information" ? "SquareInfo" : n === "success" ? "CheckCircle" : "ExclamationTriangleMini";
1
+ import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
+ import { c as e } from "../../clsx-OuTLNxxd.js";
3
+ import { Icon as f } from "../Icon/Icon.js";
4
+ import '../../assets/Notification.css';const w = "_notification_qwbrb_1", t = {
5
+ notification: w,
6
+ "notification--default": "_notification--default_qwbrb_7",
7
+ "notification--bar": "_notification--bar_qwbrb_10",
8
+ "notification--neutral": "_notification--neutral_qwbrb_15",
9
+ "notification--information": "_notification--information_qwbrb_19",
10
+ "notification--success": "_notification--success_qwbrb_23",
11
+ "notification--warning": "_notification--warning_qwbrb_27",
12
+ "notification--danger": "_notification--danger_qwbrb_31",
13
+ "notification-content": "_notification-content_qwbrb_55",
14
+ "notification-content--text": "_notification-content--text_qwbrb_59",
15
+ "notification-title": "_notification-title_qwbrb_65",
16
+ "notification-subtitle": "_notification-subtitle_qwbrb_69",
17
+ "notification-close-button": "_notification-close-button_qwbrb_73",
18
+ "notification-close-button--bar--neutral": "_notification-close-button--bar--neutral_qwbrb_107",
19
+ "notification-close-button--bar--information": "_notification-close-button--bar--information_qwbrb_108",
20
+ "notification-close-button--bar--danger": "_notification-close-button--bar--danger_qwbrb_109",
21
+ "notification-close-button--neutral": "_notification-close-button--neutral_qwbrb_113",
22
+ "notification-close-button--information": "_notification-close-button--information_qwbrb_117",
23
+ "notification-close-button--success": "_notification-close-button--success_qwbrb_121",
24
+ "notification-close-button--warning": "_notification-close-button--warning_qwbrb_124",
25
+ "notification-close-button--danger": "_notification-close-button--danger_qwbrb_127",
26
+ "notification-close-button--bar--success": "_notification-close-button--bar--success_qwbrb_140",
27
+ "notification-close-button--bar--warning": "_notification-close-button--bar--warning_qwbrb_143"
28
+ }, g = ({ title: s, subtitle: a, action: r, variant: b = "default", level: n, onClose: _ }) => {
29
+ const l = b === "bar";
30
+ function u(o) {
31
+ return o === "neutral" ? "CalendarEdit" : o === "information" ? "SquareInfo" : o === "success" ? "CheckCircle" : "ExclamationTriangleMini";
32
32
  }
33
- return /* @__PURE__ */ c("div", { className: s(t.notification, t[`notification--${f}`], t[`notification--${i}`]), children: [
33
+ return /* @__PURE__ */ c("div", { className: e(t.notification, t[`notification--${b}`], t[`notification--${n}`]), children: [
34
34
  /* @__PURE__ */ c("div", { className: t["notification-content"], children: [
35
- /* @__PURE__ */ o(r, { name: b(i) }),
35
+ /* @__PURE__ */ i(f, { name: u(n) }),
36
36
  /* @__PURE__ */ c("div", { className: t["notification-content--text"], children: [
37
- /* @__PURE__ */ o("p", { className: t["notification-title"], children: _ }),
38
- a && /* @__PURE__ */ o("p", { className: t["notification-subtitle"], children: a }),
39
- e && /* @__PURE__ */ o("div", { className: t["notification-action"], children: e })
37
+ /* @__PURE__ */ i("p", { className: t["notification-title"], children: s }),
38
+ a && /* @__PURE__ */ i("p", { className: t["notification-subtitle"], children: a }),
39
+ r && /* @__PURE__ */ i("div", { className: t["notification-action"], children: r })
40
40
  ] })
41
41
  ] }),
42
- l && /* @__PURE__ */ o(
42
+ _ && /* @__PURE__ */ i(
43
43
  "button",
44
44
  {
45
45
  type: "button",
46
46
  "aria-label": "close",
47
- className: s(t["notification-close-button"], t[`notification-close-button--${i}`], {
48
- [t[`notification-close-button--bar--${i}`]]: u
47
+ className: e(t["notification-close-button"], t[`notification-close-button--${n}`], {
48
+ [t[`notification-close-button--bar--${n}`]]: l
49
49
  }),
50
- children: /* @__PURE__ */ o(r, { name: "Cross", size: 24 })
50
+ children: /* @__PURE__ */ i(f, { name: "Cross", size: 24 })
51
51
  }
52
52
  )
53
53
  ] });
54
54
  };
55
55
  export {
56
- N as Notification
56
+ g as Notification
57
57
  };
58
58
  //# sourceMappingURL=Notification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.js","sources":["../../../src/components/Notification/Notification.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport type { ReactNode } from 'react';\n\nimport styles from './Notification.module.css';\n\nimport { Icon } from 'components/Icon';\n\nexport type NotificationVariant = 'default' | 'bar';\nexport type NotificationLevel = 'neutral' | 'information' | 'success' | 'warning' | 'danger';\n\nexport interface NotificationProps {\n title: string;\n subtitle?: string;\n action?: ReactNode;\n variant?: NotificationVariant;\n level: NotificationLevel;\n onClose?: () => void;\n}\n\nexport const Notification = ({ title, subtitle, action, variant = 'default', level, onClose }: NotificationProps) => {\n const isBar = variant === 'bar';\n\n function setIconName(toastType: NotificationLevel) {\n if (toastType === 'neutral') return 'CalendarEdit';\n if (toastType === 'information') return 'SquareInfo';\n if (toastType === 'success') return 'CheckCircle';\n return 'ExclamationTriangleMini';\n }\n\n return (\n <div className={clsx(styles['notification'], styles[`notification--${variant}`], styles[`notification--${level}`])}>\n <div className={styles['notification-content']}>\n <Icon name={setIconName(level)} />\n <div className={styles['notification-content--text']}>\n <p className={styles['notification-title']}>{title}</p>\n {subtitle && <p className={styles['notification-subtitle']}>{subtitle}</p>}\n {action && <div className={styles['notification-action']}>{action}</div>}\n </div>\n </div>\n {onClose && (\n <button\n type=\"button\"\n aria-label=\"close\"\n className={clsx(styles['notification-close-button'], styles[`notification-close-button--${level}`], {\n [styles[`notification-close-button--bar--${level}`]]: isBar,\n })}\n >\n <Icon name=\"Cross\" size={24} />\n </button>\n )}\n </div>\n );\n};\n"],"names":["Notification","title","subtitle","action","variant","level","onClose","isBar","setIconName","toastType","clsx","styles","jsxs","jsx","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;GAoBaA,IAAe,CAAC,EAAE,OAAAC,GAAO,UAAAC,GAAU,QAAAC,GAAQ,SAAAC,IAAU,WAAW,OAAAC,GAAO,SAAAC,QAAiC;AACnH,QAAMC,IAAQH,MAAY;AAE1B,WAASI,EAAYC,GAA8B;AAC7C,WAAAA,MAAc,YAAkB,iBAChCA,MAAc,gBAAsB,eACpCA,MAAc,YAAkB,gBAC7B;AAAA,EAAA;AAGT,2BACG,OAAI,EAAA,WAAWC,EAAKC,EAAO,cAAiBA,EAAO,iBAAiBP,CAAO,EAAE,GAAGO,EAAO,iBAAiBN,CAAK,EAAE,CAAC,GAC/G,UAAA;AAAA,IAAA,gBAAAO,EAAC,OAAI,EAAA,WAAWD,EAAO,sBAAsB,GAC3C,UAAA;AAAA,MAAA,gBAAAE,EAACC,GAAK,EAAA,MAAMN,EAAYH,CAAK,EAAG,CAAA;AAAA,MAC/B,gBAAAO,EAAA,OAAA,EAAI,WAAWD,EAAO,4BAA4B,GACjD,UAAA;AAAA,QAAA,gBAAAE,EAAC,KAAE,EAAA,WAAWF,EAAO,oBAAoB,GAAI,UAAMV,GAAA;AAAA,QAClDC,KAAa,gBAAAW,EAAA,KAAA,EAAE,WAAWF,EAAO,uBAAuB,GAAI,UAAST,GAAA;AAAA,QACrEC,KAAW,gBAAAU,EAAA,OAAA,EAAI,WAAWF,EAAO,qBAAqB,GAAI,UAAOR,EAAA,CAAA;AAAA,MAAA,EACpE,CAAA;AAAA,IAAA,GACF;AAAA,IACCG,KACC,gBAAAO;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAW;AAAA,QACX,WAAWH,EAAKC,EAAO,2BAA2B,GAAGA,EAAO,8BAA8BN,CAAK,EAAE,GAAG;AAAA,UAClG,CAACM,EAAO,mCAAmCN,CAAK,EAAE,CAAC,GAAGE;AAAA,QAAA,CACvD;AAAA,QAED,UAAC,gBAAAM,EAAAC,GAAA,EAAK,MAAK,SAAQ,MAAM,GAAI,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAC/B,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"Notification.js","sources":["../../../src/components/Notification/Notification.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport type { ReactNode } from 'react';\n\nimport styles from './Notification.module.css';\n\nimport { Icon } from 'components/Icon';\n\nexport type NotificationVariant = 'default' | 'bar';\nexport type NotificationLevel = 'neutral' | 'information' | 'success' | 'warning' | 'danger';\n\nexport interface NotificationProps {\n title: string;\n subtitle?: string;\n action?: ReactNode;\n variant?: NotificationVariant;\n level: NotificationLevel;\n onClose?: () => void;\n}\n\nexport const Notification = ({ title, subtitle, action, variant = 'default', level, onClose }: NotificationProps) => {\n const isBar = variant === 'bar';\n\n function setIconName(toastType: NotificationLevel) {\n if (toastType === 'neutral') return 'CalendarEdit';\n if (toastType === 'information') return 'SquareInfo';\n if (toastType === 'success') return 'CheckCircle';\n return 'ExclamationTriangleMini';\n }\n\n return (\n <div className={clsx(styles['notification'], styles[`notification--${variant}`], styles[`notification--${level}`])}>\n <div className={styles['notification-content']}>\n <Icon name={setIconName(level)} />\n <div className={styles['notification-content--text']}>\n <p className={styles['notification-title']}>{title}</p>\n {subtitle && <p className={styles['notification-subtitle']}>{subtitle}</p>}\n {action && <div className={styles['notification-action']}>{action}</div>}\n </div>\n </div>\n {onClose && (\n <button\n type=\"button\"\n aria-label=\"close\"\n className={clsx(styles['notification-close-button'], styles[`notification-close-button--${level}`], {\n [styles[`notification-close-button--bar--${level}`]]: isBar,\n })}\n >\n <Icon name=\"Cross\" size={24} />\n </button>\n )}\n </div>\n );\n};\n"],"names":["Notification","title","subtitle","action","variant","level","onClose","isBar","setIconName","toastType","clsx","styles","jsxs","jsx","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;GAoBaA,IAAe,CAAC,EAAE,OAAAC,GAAO,UAAAC,GAAU,QAAAC,GAAQ,SAAAC,IAAU,WAAW,OAAAC,GAAO,SAAAC,QAAiC;AACnH,QAAMC,IAAQH,MAAY;AAE1B,WAASI,EAAYC,GAA8B;AACjD,WAAIA,MAAc,YAAkB,iBAChCA,MAAc,gBAAsB,eACpCA,MAAc,YAAkB,gBAC7B;AAAA,EAAA;AAGT,2BACG,OAAA,EAAI,WAAWC,EAAKC,EAAO,cAAiBA,EAAO,iBAAiBP,CAAO,EAAE,GAAGO,EAAO,iBAAiBN,CAAK,EAAE,CAAC,GAC/G,UAAA;AAAA,IAAA,gBAAAO,EAAC,OAAA,EAAI,WAAWD,EAAO,sBAAsB,GAC3C,UAAA;AAAA,MAAA,gBAAAE,EAACC,GAAA,EAAK,MAAMN,EAAYH,CAAK,EAAA,CAAG;AAAA,MAChC,gBAAAO,EAAC,OAAA,EAAI,WAAWD,EAAO,4BAA4B,GACjD,UAAA;AAAA,QAAA,gBAAAE,EAAC,KAAA,EAAE,WAAWF,EAAO,oBAAoB,GAAI,UAAAV,GAAM;AAAA,QAClDC,KAAY,gBAAAW,EAAC,KAAA,EAAE,WAAWF,EAAO,uBAAuB,GAAI,UAAAT,GAAS;AAAA,QACrEC,KAAU,gBAAAU,EAAC,OAAA,EAAI,WAAWF,EAAO,qBAAqB,GAAI,UAAAR,EAAA,CAAO;AAAA,MAAA,EAAA,CACpE;AAAA,IAAA,GACF;AAAA,IACCG,KACC,gBAAAO;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAW;AAAA,QACX,WAAWH,EAAKC,EAAO,2BAA2B,GAAGA,EAAO,8BAA8BN,CAAK,EAAE,GAAG;AAAA,UAClG,CAACM,EAAO,mCAAmCN,CAAK,EAAE,CAAC,GAAGE;AAAA,QAAA,CACvD;AAAA,QAED,UAAA,gBAAAM,EAACC,GAAA,EAAK,MAAK,SAAQ,MAAM,GAAA,CAAI;AAAA,MAAA;AAAA,IAAA;AAAA,EAC/B,GAEJ;AAEJ;"}
@@ -2,5 +2,5 @@ import { Meta } from '@storybook/react';
2
2
  import { NotificationProps } from './Notification';
3
3
  declare const _default: Meta<NotificationProps>;
4
4
  export default _default;
5
- export declare const NotificationExample: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, NotificationProps>;
6
- export declare const AsBar: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, NotificationProps>;
5
+ export declare const NotificationExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, NotificationProps>;
6
+ export declare const AsBar: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, NotificationProps>;
@@ -1,8 +1,8 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import { fn as a } from "../../index-Dwqes6RH.js";
2
+ import { W as a } from "../../index-Di9WPZUe.js";
3
3
  import { Notification as t } from "./Notification.js";
4
4
  const r = `<Notification title={title} subtitle={subtitle} action={action}
5
- level={level} variant={variant} onClose={() => {}} />`, p = {
5
+ level={level} variant={variant} onClose={() => {}} />`, m = {
6
6
  title: "Molecules/Notification",
7
7
  component: t,
8
8
  argTypes: {
@@ -38,6 +38,6 @@ s.args = {
38
38
  export {
39
39
  s as AsBar,
40
40
  l as NotificationExample,
41
- p as default
41
+ m as default
42
42
  };
43
43
  //# sourceMappingURL=Notification.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.stories.js","sources":["../../../src/components/Notification/Notification.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { NotificationProps } from './Notification';\n\nimport { Notification } from './Notification';\n\nconst codeString = `<Notification title={title} subtitle={subtitle} action={action} \n level={level} variant={variant} onClose={() => {}} />`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/Notification',\n component: Notification,\n argTypes: {\n level: {\n options: ['neutral', 'information', 'success', 'warning', 'danger'],\n control: { type: 'radio' },\n },\n variant: {\n options: ['default', 'bar'],\n control: { type: 'radio' },\n },\n },\n parameters: {\n inspectComponent: Notification,\n codeString: codeString,\n },\n} as Meta<NotificationProps>;\n\nconst Template: StoryFn<NotificationProps> = (args) => <Notification {...args} />;\n\nconst defaultArgs: Partial<NotificationProps> = {\n level: 'information',\n title: 'Titel van de melding',\n onClose: fn(),\n};\n\nexport const NotificationExample = Template.bind({});\nNotificationExample.args = {\n ...defaultArgs,\n variant: 'default',\n subtitle: 'Subtekst ter verduidelijking van de melding.',\n action: <span>Actie</span>,\n};\n\nexport const AsBar = Template.bind({});\nAsBar.args = {\n ...defaultArgs,\n variant: 'bar',\n};\n"],"names":["codeString","Notification_stories","Notification","Template","args","jsx","defaultArgs","fn","NotificationExample","AsBar"],"mappings":";;;AAOA,MAAMA,IAAa;AAAA,0DAIJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS,CAAC,WAAW,eAAe,WAAW,WAAW,QAAQ;AAAA,MAClE,SAAS,EAAE,MAAM,QAAQ;AAAA,IAC3B;AAAA,IACA,SAAS;AAAA,MACP,SAAS,CAAC,WAAW,KAAK;AAAA,MAC1B,SAAS,EAAE,MAAM,QAAQ;AAAA,IAAA;AAAA,EAE7B;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAuC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAc,GAAGE,GAAM,GAEzEE,IAA0C;AAAA,EAC9C,OAAO;AAAA,EACP,OAAO;AAAA,EACP,SAASC,EAAG;AACd,GAEaC,IAAsBL,EAAS,KAAK,CAAE,CAAA;AACnDK,EAAoB,OAAO;AAAA,EACzB,GAAGF;AAAA,EACH,SAAS;AAAA,EACT,UAAU;AAAA,EACV,QAAS,gBAAAD,EAAA,QAAA,EAAK,UAAK,QAAA,CAAA;AACrB;AAEO,MAAMI,IAAQN,EAAS,KAAK,CAAE,CAAA;AACrCM,EAAM,OAAO;AAAA,EACX,GAAGH;AAAA,EACH,SAAS;AACX;"}
1
+ {"version":3,"file":"Notification.stories.js","sources":["../../../src/components/Notification/Notification.stories.tsx"],"sourcesContent":["import { fn } from 'storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { NotificationProps } from './Notification';\n\nimport { Notification } from './Notification';\n\nconst codeString = `<Notification title={title} subtitle={subtitle} action={action} \n level={level} variant={variant} onClose={() => {}} />`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/Notification',\n component: Notification,\n argTypes: {\n level: {\n options: ['neutral', 'information', 'success', 'warning', 'danger'],\n control: { type: 'radio' },\n },\n variant: {\n options: ['default', 'bar'],\n control: { type: 'radio' },\n },\n },\n parameters: {\n inspectComponent: Notification,\n codeString: codeString,\n },\n} as Meta<NotificationProps>;\n\nconst Template: StoryFn<NotificationProps> = (args) => <Notification {...args} />;\n\nconst defaultArgs: Partial<NotificationProps> = {\n level: 'information',\n title: 'Titel van de melding',\n onClose: fn(),\n};\n\nexport const NotificationExample = Template.bind({});\nNotificationExample.args = {\n ...defaultArgs,\n variant: 'default',\n subtitle: 'Subtekst ter verduidelijking van de melding.',\n action: <span>Actie</span>,\n};\n\nexport const AsBar = Template.bind({});\nAsBar.args = {\n ...defaultArgs,\n variant: 'bar',\n};\n"],"names":["codeString","Notification_stories","Notification","Template","args","jsx","defaultArgs","fn","NotificationExample","AsBar"],"mappings":";;;AAOA,MAAMA,IAAa;AAAA,0DAInBC,IAAe;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS,CAAC,WAAW,eAAe,WAAW,WAAW,QAAQ;AAAA,MAClE,SAAS,EAAE,MAAM,QAAA;AAAA,IAAQ;AAAA,IAE3B,SAAS;AAAA,MACP,SAAS,CAAC,WAAW,KAAK;AAAA,MAC1B,SAAS,EAAE,MAAM,QAAA;AAAA,IAAQ;AAAA,EAC3B;AAAA,EAEF,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAuC,CAACC,MAAS,gBAAAC,EAACH,GAAA,EAAc,GAAGE,GAAM,GAEzEE,IAA0C;AAAA,EAC9C,OAAO;AAAA,EACP,OAAO;AAAA,EACP,SAASC,EAAA;AACX,GAEaC,IAAsBL,EAAS,KAAK,CAAA,CAAE;AACnDK,EAAoB,OAAO;AAAA,EACzB,GAAGF;AAAA,EACH,SAAS;AAAA,EACT,UAAU;AAAA,EACV,QAAQ,gBAAAD,EAAC,QAAA,EAAK,UAAA,QAAA,CAAK;AACrB;AAEO,MAAMI,IAAQN,EAAS,KAAK,CAAA,CAAE;AACrCM,EAAM,OAAO;AAAA,EACX,GAAGH;AAAA,EACH,SAAS;AACX;"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import "../../index-BqLi4tOb.js";
3
- import { r as i, s as t } from "../../react.esm-CsMDid07.js";
2
+ import "../../index-DV47hRzi.js";
3
+ import { r as i, s as t } from "../../react.esm-CFMwGdo5.js";
4
4
  import { Notification as n } from "./Notification.js";
5
5
  describe("Notification", () => {
6
6
  it("renders title and subtitle", () => {
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.test.js","sources":["../../../src/components/Notification/Notification.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Notification } from './Notification';\n\ndescribe('Notification', () => {\n it('renders title and subtitle', () => {\n render(<Notification level=\"information\" title=\"Info title\" subtitle=\"Info subtitle\" />);\n expect(screen.getByText('Info title')).toBeInTheDocument();\n expect(screen.getByText('Info subtitle')).toBeInTheDocument();\n });\n\n it('renders bar variant', () => {\n render(<Notification level=\"danger\" variant=\"bar\" title=\"Danger title\" />);\n expect(screen.getByText('Danger title')).toBeInTheDocument();\n });\n});\n"],"names":["render","jsx","Notification","screen"],"mappings":";;;;AAKA,SAAS,gBAAgB,MAAM;AAC7B,KAAG,8BAA8B,MAAM;AAC9B,IAAAA,EAAA,gBAAAC,EAACC,KAAa,OAAM,eAAc,OAAM,cAAa,UAAS,iBAAgB,CAAE,GACvF,OAAOC,EAAO,UAAU,YAAY,CAAC,EAAE,kBAAkB,GACzD,OAAOA,EAAO,UAAU,eAAe,CAAC,EAAE,kBAAkB;AAAA,EAAA,CAC7D,GAED,GAAG,uBAAuB,MAAM;AACvB,IAAAH,EAAA,gBAAAC,EAACC,KAAa,OAAM,UAAS,SAAQ,OAAM,OAAM,gBAAe,CAAE,GACzE,OAAOC,EAAO,UAAU,cAAc,CAAC,EAAE,kBAAkB;AAAA,EAAA,CAC5D;AACH,CAAC;"}
1
+ {"version":3,"file":"Notification.test.js","sources":["../../../src/components/Notification/Notification.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Notification } from './Notification';\n\ndescribe('Notification', () => {\n it('renders title and subtitle', () => {\n render(<Notification level=\"information\" title=\"Info title\" subtitle=\"Info subtitle\" />);\n expect(screen.getByText('Info title')).toBeInTheDocument();\n expect(screen.getByText('Info subtitle')).toBeInTheDocument();\n });\n\n it('renders bar variant', () => {\n render(<Notification level=\"danger\" variant=\"bar\" title=\"Danger title\" />);\n expect(screen.getByText('Danger title')).toBeInTheDocument();\n });\n});\n"],"names":["render","jsx","Notification","screen"],"mappings":";;;;AAKA,SAAS,gBAAgB,MAAM;AAC7B,KAAG,8BAA8B,MAAM;AACrC,IAAAA,EAAO,gBAAAC,EAACC,KAAa,OAAM,eAAc,OAAM,cAAa,UAAS,iBAAgB,CAAE,GACvF,OAAOC,EAAO,UAAU,YAAY,CAAC,EAAE,kBAAA,GACvC,OAAOA,EAAO,UAAU,eAAe,CAAC,EAAE,kBAAA;AAAA,EAAkB,CAC7D,GAED,GAAG,uBAAuB,MAAM;AAC9B,IAAAH,EAAO,gBAAAC,EAACC,KAAa,OAAM,UAAS,SAAQ,OAAM,OAAM,gBAAe,CAAE,GACzE,OAAOC,EAAO,UAAU,cAAc,CAAC,EAAE,kBAAA;AAAA,EAAkB,CAC5D;AACH,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayCloseButton.js","sources":["../../../src/components/OverlayCloseButton/OverlayCloseButton.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport styles from './OverlayCloseButton.module.css';\n\nimport { Icon } from 'components/Icon';\n\nexport interface OverlayCloseButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'style'> {\n /** The `aria-label` value of the button. */\n 'aria-label': string; // mandatory\n /** `true` to add padding around the button; otherwise, `false`. The default is `false`. */\n paddedModal?: boolean;\n}\n\n/** Represents a component to render a close button in the top right corner of a container. */\nexport const OverlayCloseButton = forwardRef<HTMLButtonElement, OverlayCloseButtonProps>(\n ({ paddedModal, ...restProps }, forwardedRef) => (\n <button\n {...restProps}\n type=\"button\"\n ref={forwardedRef}\n className={clsx(styles['overlay-close-button'], {\n [styles['overlay-close-button--padded']]: paddedModal,\n })}\n >\n <Icon name=\"Cross\" size={24} />\n </button>\n )\n);\n"],"names":["OverlayCloseButton","forwardRef","paddedModal","restProps","forwardedRef","jsx","clsx","styles","Icon"],"mappings":";;;;;;;GAiBaA,IAAqBC;AAAA,EAChC,CAAC,EAAE,aAAAC,GAAa,GAAGC,KAAaC,MAC9B,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGF;AAAA,MACJ,MAAK;AAAA,MACL,KAAKC;AAAA,MACL,WAAWE,EAAKC,EAAO,sBAAsB,GAAG;AAAA,QAC9C,CAACA,EAAO,8BAA8B,CAAC,GAAGL;AAAA,MAAA,CAC3C;AAAA,MAED,UAAC,gBAAAG,EAAAG,GAAA,EAAK,MAAK,SAAQ,MAAM,GAAI,CAAA;AAAA,IAAA;AAAA,EAAA;AAGnC;"}
1
+ {"version":3,"file":"OverlayCloseButton.js","sources":["../../../src/components/OverlayCloseButton/OverlayCloseButton.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport styles from './OverlayCloseButton.module.css';\n\nimport { Icon } from 'components/Icon';\n\nexport interface OverlayCloseButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'style'> {\n /** The `aria-label` value of the button. */\n 'aria-label': string; // mandatory\n /** `true` to add padding around the button; otherwise, `false`. The default is `false`. */\n paddedModal?: boolean;\n}\n\n/** Represents a component to render a close button in the top right corner of a container. */\nexport const OverlayCloseButton = forwardRef<HTMLButtonElement, OverlayCloseButtonProps>(\n ({ paddedModal, ...restProps }, forwardedRef) => (\n <button\n {...restProps}\n type=\"button\"\n ref={forwardedRef}\n className={clsx(styles['overlay-close-button'], {\n [styles['overlay-close-button--padded']]: paddedModal,\n })}\n >\n <Icon name=\"Cross\" size={24} />\n </button>\n )\n);\n"],"names":["OverlayCloseButton","forwardRef","paddedModal","restProps","forwardedRef","jsx","clsx","styles","Icon"],"mappings":";;;;;;;GAiBaA,IAAqBC;AAAA,EAChC,CAAC,EAAE,aAAAC,GAAa,GAAGC,EAAA,GAAaC,MAC9B,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGF;AAAA,MACJ,MAAK;AAAA,MACL,KAAKC;AAAA,MACL,WAAWE,EAAKC,EAAO,sBAAsB,GAAG;AAAA,QAC9C,CAACA,EAAO,8BAA8B,CAAC,GAAGL;AAAA,MAAA,CAC3C;AAAA,MAED,UAAA,gBAAAG,EAACG,GAAA,EAAK,MAAK,SAAQ,MAAM,GAAA,CAAI;AAAA,IAAA;AAAA,EAAA;AAGnC;"}
@@ -2,4 +2,4 @@ import { Meta } from '@storybook/react';
2
2
  import { OverlayCloseButtonProps } from './OverlayCloseButton';
3
3
  declare const _default: Meta<OverlayCloseButtonProps>;
4
4
  export default _default;
5
- export declare const OverlayCloseButtonExample: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, OverlayCloseButtonProps>;
5
+ export declare const OverlayCloseButtonExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, OverlayCloseButtonProps>;
@@ -1,8 +1,8 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { fn as a } from "../../index-Dwqes6RH.js";
2
+ import { W as a } from "../../index-Di9WPZUe.js";
3
3
  import { OverlayCloseButton as o } from "./OverlayCloseButton.js";
4
4
  import { Container as l } from "../../storyComponents/Container/Container.js";
5
- const n = "<OverlayCloseButton aria-label={aria-label} onClick={onClickFunction} />", c = {
5
+ const r = "<OverlayCloseButton aria-label={aria-label} onClick={onClickFunction} />", c = {
6
6
  title: "Atoms/OverlayCloseButton",
7
7
  component: o,
8
8
  argTypes: {
@@ -15,9 +15,9 @@ const n = "<OverlayCloseButton aria-label={aria-label} onClick={onClickFunction}
15
15
  },
16
16
  parameters: {
17
17
  inspectComponent: o,
18
- codeString: n
18
+ codeString: r
19
19
  }
20
- }, r = (t) => /* @__PURE__ */ e(l, { size: "small", padded: !1, children: /* @__PURE__ */ e(o, { ...t }) }), s = r.bind({});
20
+ }, n = (t) => /* @__PURE__ */ e(l, { size: "small", padded: !1, children: /* @__PURE__ */ e(o, { ...t }) }), s = n.bind({});
21
21
  s.args = {
22
22
  paddedModal: !1,
23
23
  "aria-label": "Close",
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayCloseButton.stories.js","sources":["../../../src/components/OverlayCloseButton/OverlayCloseButton.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { OverlayCloseButtonProps } from './OverlayCloseButton';\n\nimport { OverlayCloseButton } from './OverlayCloseButton';\n\nimport { Container } from 'storyComponents/Container/';\n\nconst codeString = '<OverlayCloseButton aria-label={aria-label} onClick={onClickFunction} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/OverlayCloseButton',\n component: OverlayCloseButton,\n argTypes: {\n paddedModal: {\n control: 'boolean',\n },\n 'aria-label': {\n control: 'text',\n },\n },\n parameters: {\n inspectComponent: OverlayCloseButton,\n codeString: codeString,\n },\n} as Meta<OverlayCloseButtonProps>;\n\nconst Template: StoryFn<OverlayCloseButtonProps> = (args) => {\n return (\n <Container size=\"small\" padded={false}>\n <OverlayCloseButton {...args} />\n </Container>\n );\n};\n\nexport const OverlayCloseButtonExample = Template.bind({});\nOverlayCloseButtonExample.args = {\n paddedModal: false,\n 'aria-label': 'Close',\n onClick: fn(),\n};\n"],"names":["codeString","OverlayCloseButton_stories","OverlayCloseButton","Template","args","jsx","Container","OverlayCloseButtonExample","fn"],"mappings":";;;;AASA,MAAMA,IAAa,4EAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,aAAa;AAAA,MACX,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,IAAA;AAAA,EAEb;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAA6C,CAACC,MAEhD,gBAAAC,EAACC,GAAU,EAAA,MAAK,SAAQ,QAAQ,IAC9B,UAAC,gBAAAD,EAAAH,GAAA,EAAoB,GAAGE,EAAA,CAAM,EAChC,CAAA,GAISG,IAA4BJ,EAAS,KAAK,CAAE,CAAA;AACzDI,EAA0B,OAAO;AAAA,EAC/B,aAAa;AAAA,EACb,cAAc;AAAA,EACd,SAASC,EAAG;AACd;"}
1
+ {"version":3,"file":"OverlayCloseButton.stories.js","sources":["../../../src/components/OverlayCloseButton/OverlayCloseButton.stories.tsx"],"sourcesContent":["import { fn } from 'storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { OverlayCloseButtonProps } from './OverlayCloseButton';\n\nimport { OverlayCloseButton } from './OverlayCloseButton';\n\nimport { Container } from 'storyComponents/Container/';\n\nconst codeString = '<OverlayCloseButton aria-label={aria-label} onClick={onClickFunction} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/OverlayCloseButton',\n component: OverlayCloseButton,\n argTypes: {\n paddedModal: {\n control: 'boolean',\n },\n 'aria-label': {\n control: 'text',\n },\n },\n parameters: {\n inspectComponent: OverlayCloseButton,\n codeString: codeString,\n },\n} as Meta<OverlayCloseButtonProps>;\n\nconst Template: StoryFn<OverlayCloseButtonProps> = (args) => {\n return (\n <Container size=\"small\" padded={false}>\n <OverlayCloseButton {...args} />\n </Container>\n );\n};\n\nexport const OverlayCloseButtonExample = Template.bind({});\nOverlayCloseButtonExample.args = {\n paddedModal: false,\n 'aria-label': 'Close',\n onClick: fn(),\n};\n"],"names":["codeString","OverlayCloseButton_stories","OverlayCloseButton","Template","args","jsx","Container","OverlayCloseButtonExample","fn"],"mappings":";;;;AASA,MAAMA,IAAa,4EAGnBC,IAAe;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,aAAa;AAAA,MACX,SAAS;AAAA,IAAA;AAAA,IAEX,cAAc;AAAA,MACZ,SAAS;AAAA,IAAA;AAAA,EACX;AAAA,EAEF,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAA6C,CAACC,MAEhD,gBAAAC,EAACC,GAAA,EAAU,MAAK,SAAQ,QAAQ,IAC9B,UAAA,gBAAAD,EAACH,GAAA,EAAoB,GAAGE,EAAA,CAAM,EAAA,CAChC,GAISG,IAA4BJ,EAAS,KAAK,CAAA,CAAE;AACzDI,EAA0B,OAAO;AAAA,EAC/B,aAAa;AAAA,EACb,cAAc;AAAA,EACd,SAASC,EAAA;AACX;"}