@onewelcome/react-lib-components 14.0.0-experiment.1 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (510) hide show
  1. package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.cjs.js +2 -2
  2. package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.es.js +5 -5
  3. package/dist/components/Button/BaseButton.module.scss.cjs.js +2 -2
  4. package/dist/components/Button/BaseButton.module.scss.es.js +4 -4
  5. package/dist/components/Button/Button.cjs.js +1 -1
  6. package/dist/components/Button/Button.cjs.js.map +1 -1
  7. package/dist/components/Button/Button.es.js +11 -2
  8. package/dist/components/Button/Button.es.js.map +1 -1
  9. package/dist/components/Button/Button.module.scss.cjs.js +2 -2
  10. package/dist/components/Button/Button.module.scss.es.js +17 -17
  11. package/dist/components/Button/IconButton.module.scss.cjs.js +2 -2
  12. package/dist/components/Button/IconButton.module.scss.es.js +18 -18
  13. package/dist/components/ContextMenu/ContextMenu.cjs.js.map +1 -1
  14. package/dist/components/ContextMenu/ContextMenu.es.js.map +1 -1
  15. package/dist/components/ContextMenu/ContextMenu.module.scss.cjs.js +2 -2
  16. package/dist/components/ContextMenu/ContextMenu.module.scss.es.js +6 -6
  17. package/dist/components/ContextMenu/ContextMenuDivider.module.scss.cjs.js +2 -2
  18. package/dist/components/ContextMenu/ContextMenuDivider.module.scss.es.js +2 -2
  19. package/dist/components/ContextMenu/ContextMenuItem.cjs.js.map +1 -1
  20. package/dist/components/ContextMenu/ContextMenuItem.es.js.map +1 -1
  21. package/dist/components/ContextMenu/ContextMenuItem.module.scss.cjs.js +2 -2
  22. package/dist/components/ContextMenu/ContextMenuItem.module.scss.es.js +3 -3
  23. package/dist/components/ContextMenu/ContextMenuService.cjs.js +1 -1
  24. package/dist/components/ContextMenu/ContextMenuService.cjs.js.map +1 -1
  25. package/dist/components/ContextMenu/ContextMenuService.es.js +20 -17
  26. package/dist/components/ContextMenu/ContextMenuService.es.js.map +1 -1
  27. package/dist/components/DataGrid/DataGrid.cjs.js +1 -1
  28. package/dist/components/DataGrid/DataGrid.cjs.js.map +1 -1
  29. package/dist/components/DataGrid/DataGrid.es.js +102 -59
  30. package/dist/components/DataGrid/DataGrid.es.js.map +1 -1
  31. package/dist/components/DataGrid/DataGrid.module.scss.cjs.js +2 -2
  32. package/dist/components/DataGrid/DataGrid.module.scss.es.js +8 -6
  33. package/dist/components/DataGrid/DataGrid.module.scss.es.js.map +1 -1
  34. package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.cjs.js +2 -2
  35. package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.es.js +6 -6
  36. package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.cjs.js +2 -2
  37. package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.es.js +7 -7
  38. package/dist/components/DataGrid/DataGridBody/DataGridBody.cjs.js +1 -1
  39. package/dist/components/DataGrid/DataGridBody/DataGridBody.cjs.js.map +1 -1
  40. package/dist/components/DataGrid/DataGridBody/DataGridBody.es.js +4 -2
  41. package/dist/components/DataGrid/DataGridBody/DataGridBody.es.js.map +1 -1
  42. package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.cjs.js +2 -2
  43. package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.es.js +2 -2
  44. package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.cjs.js +2 -2
  45. package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.es.js +5 -5
  46. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.cjs.js +2 -2
  47. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.es.js +4 -4
  48. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.cjs.js +2 -2
  49. package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.es.js +5 -5
  50. package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js +1 -1
  51. package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js.map +1 -1
  52. package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.es.js +2 -1
  53. package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.es.js.map +1 -1
  54. package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.cjs.js +2 -2
  55. package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.es.js +24 -24
  56. package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.cjs.js.map +1 -1
  57. package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.es.js +1 -1
  58. package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.es.js.map +1 -1
  59. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.cjs.js +1 -1
  60. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.cjs.js.map +1 -1
  61. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.es.js +4 -4
  62. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.es.js.map +1 -1
  63. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.cjs.js +2 -2
  64. package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.es.js +9 -9
  65. package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js.map +1 -1
  66. package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.es.js.map +1 -1
  67. package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.cjs.js +1 -1
  68. package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.cjs.js.map +1 -1
  69. package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.es.js +17 -21
  70. package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.es.js.map +1 -1
  71. package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.cjs.js +1 -1
  72. package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.cjs.js.map +1 -1
  73. package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.es.js +15 -4
  74. package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.es.js.map +1 -1
  75. package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.cjs.js +1 -1
  76. package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.cjs.js.map +1 -1
  77. package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.es.js +54 -6
  78. package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.es.js.map +1 -1
  79. package/dist/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.cjs.js.map +1 -1
  80. package/dist/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.es.js.map +1 -1
  81. package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.cjs.js +1 -1
  82. package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.cjs.js.map +1 -1
  83. package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.es.js +4 -4
  84. package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.es.js.map +1 -1
  85. package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.cjs.js +2 -2
  86. package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.es.js +10 -10
  87. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.cjs.js +1 -1
  88. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.cjs.js.map +1 -1
  89. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.es.js +1 -1
  90. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.es.js.map +1 -1
  91. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.cjs.js +2 -2
  92. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.es.js +17 -17
  93. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.cjs.js +1 -1
  94. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.cjs.js.map +1 -1
  95. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.es.js +45 -24
  96. package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.es.js.map +1 -1
  97. package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.cjs.js +1 -1
  98. package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.cjs.js.map +1 -1
  99. package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.es.js +7 -9
  100. package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.es.js.map +1 -1
  101. package/dist/components/DataGrid/DataGridHeader/DataGridHeader.cjs.js +1 -1
  102. package/dist/components/DataGrid/DataGridHeader/DataGridHeader.cjs.js.map +1 -1
  103. package/dist/components/DataGrid/DataGridHeader/DataGridHeader.es.js +6 -2
  104. package/dist/components/DataGrid/DataGridHeader/DataGridHeader.es.js.map +1 -1
  105. package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.cjs.js +2 -2
  106. package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.es.js +7 -4
  107. package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.es.js.map +1 -1
  108. package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.cjs.js +1 -1
  109. package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.cjs.js.map +1 -1
  110. package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.es.js +14 -12
  111. package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.es.js.map +1 -1
  112. package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.cjs.js +2 -2
  113. package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.es.js +11 -10
  114. package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.es.js.map +1 -1
  115. package/dist/components/DatePicker/DatePicker.module.scss.cjs.js +2 -2
  116. package/dist/components/DatePicker/DatePicker.module.scss.es.js +31 -31
  117. package/dist/components/Form/Checkbox/Checkbox.cjs.js.map +1 -1
  118. package/dist/components/Form/Checkbox/Checkbox.es.js.map +1 -1
  119. package/dist/components/Form/Checkbox/Checkbox.module.scss.cjs.js +2 -2
  120. package/dist/components/Form/Checkbox/Checkbox.module.scss.es.js +13 -13
  121. package/dist/components/Form/Fieldset/Fieldset.cjs.js +1 -1
  122. package/dist/components/Form/Fieldset/Fieldset.cjs.js.map +1 -1
  123. package/dist/components/Form/Fieldset/Fieldset.es.js +3 -2
  124. package/dist/components/Form/Fieldset/Fieldset.es.js.map +1 -1
  125. package/dist/components/Form/Fieldset/Fieldset.module.scss.cjs.js +2 -2
  126. package/dist/components/Form/Fieldset/Fieldset.module.scss.es.js +8 -5
  127. package/dist/components/Form/Fieldset/Fieldset.module.scss.es.js.map +1 -1
  128. package/dist/components/Form/FileUpload/FileItem/FileItem.cjs.js +1 -1
  129. package/dist/components/Form/FileUpload/FileItem/FileItem.cjs.js.map +1 -1
  130. package/dist/components/Form/FileUpload/FileItem/FileItem.es.js +1 -1
  131. package/dist/components/Form/FileUpload/FileItem/FileItem.es.js.map +1 -1
  132. package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.cjs.js +2 -2
  133. package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.es.js +18 -18
  134. package/dist/components/Form/FileUpload/FileUpload.cjs.js +1 -1
  135. package/dist/components/Form/FileUpload/FileUpload.cjs.js.map +1 -1
  136. package/dist/components/Form/FileUpload/FileUpload.es.js +6 -6
  137. package/dist/components/Form/FileUpload/FileUpload.es.js.map +1 -1
  138. package/dist/components/Form/FileUpload/FileUpload.module.scss.cjs.js +2 -2
  139. package/dist/components/Form/FileUpload/FileUpload.module.scss.es.js +16 -16
  140. package/dist/components/Form/Form.module.scss.cjs.js +2 -2
  141. package/dist/components/Form/Form.module.scss.es.js +2 -2
  142. package/dist/components/Form/FormControl/FormControl.cjs.js +1 -1
  143. package/dist/components/Form/FormControl/FormControl.cjs.js.map +1 -1
  144. package/dist/components/Form/FormControl/FormControl.es.js +3 -3
  145. package/dist/components/Form/FormControl/FormControl.es.js.map +1 -1
  146. package/dist/components/Form/FormControl/FormControl.module.scss.cjs.js +2 -2
  147. package/dist/components/Form/FormControl/FormControl.module.scss.es.js +13 -13
  148. package/dist/components/Form/FormErrorText/FormErrorText.module.scss.cjs.js +2 -2
  149. package/dist/components/Form/FormErrorText/FormErrorText.module.scss.es.js +9 -6
  150. package/dist/components/Form/FormErrorText/FormErrorText.module.scss.es.js.map +1 -1
  151. package/dist/components/Form/FormGroup/FormGroup.cjs.js.map +1 -1
  152. package/dist/components/Form/FormGroup/FormGroup.es.js.map +1 -1
  153. package/dist/components/Form/FormGroup/FormGroup.module.scss.cjs.js +2 -2
  154. package/dist/components/Form/FormGroup/FormGroup.module.scss.es.js +3 -3
  155. package/dist/components/Form/FormHelperText/FormHelperText.module.scss.cjs.js +2 -2
  156. package/dist/components/Form/FormHelperText/FormHelperText.module.scss.es.js +4 -4
  157. package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.cjs.js +1 -1
  158. package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.cjs.js.map +1 -1
  159. package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.es.js +4 -1
  160. package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.es.js.map +1 -1
  161. package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.cjs.js +2 -2
  162. package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.es.js +6 -6
  163. package/dist/components/Form/Input/Input.cjs.js +1 -1
  164. package/dist/components/Form/Input/Input.cjs.js.map +1 -1
  165. package/dist/components/Form/Input/Input.es.js +48 -5
  166. package/dist/components/Form/Input/Input.es.js.map +1 -1
  167. package/dist/components/Form/Input/Input.module.scss.cjs.js +2 -2
  168. package/dist/components/Form/Input/Input.module.scss.es.js +8 -8
  169. package/dist/components/Form/Label/Label.module.scss.cjs.js +2 -2
  170. package/dist/components/Form/Label/Label.module.scss.es.js +2 -2
  171. package/dist/components/Form/Radio/Radio.cjs.js.map +1 -1
  172. package/dist/components/Form/Radio/Radio.es.js +1 -1
  173. package/dist/components/Form/Radio/Radio.es.js.map +1 -1
  174. package/dist/components/Form/Radio/Radio.module.scss.cjs.js +2 -2
  175. package/dist/components/Form/Radio/Radio.module.scss.es.js +11 -11
  176. package/dist/components/Form/Select/MultiSelect/MultiOption.cjs.js +1 -1
  177. package/dist/components/Form/Select/MultiSelect/MultiOption.cjs.js.map +1 -1
  178. package/dist/components/Form/Select/MultiSelect/MultiOption.es.js +11 -10
  179. package/dist/components/Form/Select/MultiSelect/MultiOption.es.js.map +1 -1
  180. package/dist/components/Form/Select/MultiSelect/MultiSelect.cjs.js +1 -1
  181. package/dist/components/Form/Select/MultiSelect/MultiSelect.cjs.js.map +1 -1
  182. package/dist/components/Form/Select/MultiSelect/MultiSelect.es.js +236 -57
  183. package/dist/components/Form/Select/MultiSelect/MultiSelect.es.js.map +1 -1
  184. package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.cjs.js +2 -2
  185. package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.es.js +20 -15
  186. package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.es.js.map +1 -1
  187. package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.cjs.js +2 -2
  188. package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.es.js +2 -2
  189. package/dist/components/Form/Select/MultiSelect/SelectedOptions.cjs.js.map +1 -1
  190. package/dist/components/Form/Select/MultiSelect/SelectedOptions.es.js.map +1 -1
  191. package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.cjs.js +2 -2
  192. package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.es.js +4 -4
  193. package/dist/components/Form/Select/MultiSelect/useArrowNavigation.cjs.js +1 -1
  194. package/dist/components/Form/Select/MultiSelect/useArrowNavigation.cjs.js.map +1 -1
  195. package/dist/components/Form/Select/MultiSelect/useArrowNavigation.es.js +134 -32
  196. package/dist/components/Form/Select/MultiSelect/useArrowNavigation.es.js.map +1 -1
  197. package/dist/components/Form/Select/MultiSelect/useSearch.cjs.js +1 -1
  198. package/dist/components/Form/Select/MultiSelect/useSearch.cjs.js.map +1 -1
  199. package/dist/components/Form/Select/MultiSelect/useSearch.es.js +73 -55
  200. package/dist/components/Form/Select/MultiSelect/useSearch.es.js.map +1 -1
  201. package/dist/components/Form/Select/Select.interfaces.cjs.js.map +1 -1
  202. package/dist/components/Form/Select/Select.interfaces.es.js.map +1 -1
  203. package/dist/components/Form/Select/SingleSelect/Option.cjs.js +1 -1
  204. package/dist/components/Form/Select/SingleSelect/Option.cjs.js.map +1 -1
  205. package/dist/components/Form/Select/SingleSelect/Option.es.js +16 -9
  206. package/dist/components/Form/Select/SingleSelect/Option.es.js.map +1 -1
  207. package/dist/components/Form/Select/SingleSelect/Select.cjs.js +1 -1
  208. package/dist/components/Form/Select/SingleSelect/Select.cjs.js.map +1 -1
  209. package/dist/components/Form/Select/SingleSelect/Select.es.js +202 -46
  210. package/dist/components/Form/Select/SingleSelect/Select.es.js.map +1 -1
  211. package/dist/components/Form/Select/SingleSelect/Select.module.scss.cjs.js +2 -2
  212. package/dist/components/Form/Select/SingleSelect/Select.module.scss.es.js +21 -17
  213. package/dist/components/Form/Select/SingleSelect/Select.module.scss.es.js.map +1 -1
  214. package/dist/components/Form/Select/SingleSelect/useArrowNavigation.cjs.js +1 -1
  215. package/dist/components/Form/Select/SingleSelect/useArrowNavigation.cjs.js.map +1 -1
  216. package/dist/components/Form/Select/SingleSelect/useArrowNavigation.es.js +176 -89
  217. package/dist/components/Form/Select/SingleSelect/useArrowNavigation.es.js.map +1 -1
  218. package/dist/components/Form/Select/SingleSelect/useSearch.cjs.js +1 -1
  219. package/dist/components/Form/Select/SingleSelect/useSearch.cjs.js.map +1 -1
  220. package/dist/components/Form/Select/SingleSelect/useSearch.es.js +48 -36
  221. package/dist/components/Form/Select/SingleSelect/useSearch.es.js.map +1 -1
  222. package/dist/components/Form/Select/useAddNewBtn.cjs.js +1 -1
  223. package/dist/components/Form/Select/useAddNewBtn.cjs.js.map +1 -1
  224. package/dist/components/Form/Select/useAddNewBtn.es.js +8 -6
  225. package/dist/components/Form/Select/useAddNewBtn.es.js.map +1 -1
  226. package/dist/components/Form/Select/useAddNewBtn.module.scss.cjs.js +2 -2
  227. package/dist/components/Form/Select/useAddNewBtn.module.scss.es.js +4 -4
  228. package/dist/components/Form/Select/useBaseSearch.cjs.js +2 -0
  229. package/dist/components/Form/Select/useBaseSearch.cjs.js.map +1 -0
  230. package/dist/components/Form/Select/useBaseSearch.es.js +85 -0
  231. package/dist/components/Form/Select/useBaseSearch.es.js.map +1 -0
  232. package/dist/components/Form/Select/useSelectPositionList.cjs.js +1 -1
  233. package/dist/components/Form/Select/useSelectPositionList.cjs.js.map +1 -1
  234. package/dist/components/Form/Select/useSelectPositionList.es.js +18 -5
  235. package/dist/components/Form/Select/useSelectPositionList.es.js.map +1 -1
  236. package/dist/components/Form/Textarea/Textarea.cjs.js +1 -1
  237. package/dist/components/Form/Textarea/Textarea.cjs.js.map +1 -1
  238. package/dist/components/Form/Textarea/Textarea.es.js +4 -0
  239. package/dist/components/Form/Textarea/Textarea.es.js.map +1 -1
  240. package/dist/components/Form/Textarea/Textarea.module.scss.cjs.js +2 -2
  241. package/dist/components/Form/Textarea/Textarea.module.scss.es.js +6 -6
  242. package/dist/components/Form/Toggle/Toggle.cjs.js +1 -1
  243. package/dist/components/Form/Toggle/Toggle.cjs.js.map +1 -1
  244. package/dist/components/Form/Toggle/Toggle.es.js +5 -3
  245. package/dist/components/Form/Toggle/Toggle.es.js.map +1 -1
  246. package/dist/components/Form/Toggle/Toggle.module.scss.cjs.js +2 -2
  247. package/dist/components/Form/Toggle/Toggle.module.scss.es.js +18 -18
  248. package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.cjs.js +1 -1
  249. package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.cjs.js.map +1 -1
  250. package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.es.js +25 -17
  251. package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.es.js.map +1 -1
  252. package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.cjs.js +2 -2
  253. package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.es.js +8 -4
  254. package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.es.js.map +1 -1
  255. package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.cjs.js +2 -2
  256. package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.es.js +5 -5
  257. package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.cjs.js.map +1 -1
  258. package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.es.js.map +1 -1
  259. package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.cjs.js +2 -2
  260. package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.es.js +3 -3
  261. package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.cjs.js +1 -1
  262. package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.cjs.js.map +1 -1
  263. package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.es.js +41 -22
  264. package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.es.js.map +1 -1
  265. package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.cjs.js +2 -2
  266. package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.es.js +8 -4
  267. package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.es.js.map +1 -1
  268. package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.cjs.js.map +1 -1
  269. package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.es.js.map +1 -1
  270. package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.cjs.js +2 -2
  271. package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.es.js +3 -3
  272. package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.cjs.js +1 -1
  273. package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.cjs.js.map +1 -1
  274. package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.es.js +2 -0
  275. package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.es.js.map +1 -1
  276. package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.cjs.js +2 -2
  277. package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.es.js +8 -8
  278. package/dist/components/Form/Wrapper/Wrapper/Wrapper.cjs.js +1 -1
  279. package/dist/components/Form/Wrapper/Wrapper/Wrapper.cjs.js.map +1 -1
  280. package/dist/components/Form/Wrapper/Wrapper/Wrapper.es.js +1 -1
  281. package/dist/components/Form/Wrapper/Wrapper/Wrapper.es.js.map +1 -1
  282. package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.cjs.js +2 -2
  283. package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.es.js +6 -6
  284. package/dist/components/Icon/Icon.cjs.js +1 -1
  285. package/dist/components/Icon/Icon.cjs.js.map +1 -1
  286. package/dist/components/Icon/Icon.es.js +2 -1
  287. package/dist/components/Icon/Icon.es.js.map +1 -1
  288. package/dist/components/Icon/Icon.module.scss.cjs.js +2 -2
  289. package/dist/components/Icon/Icon.module.scss.es.js +108 -107
  290. package/dist/components/Icon/Icon.module.scss.es.js.map +1 -1
  291. package/dist/components/Layout/ActionBar/ActionBar.cjs.js +2 -0
  292. package/dist/components/Layout/ActionBar/ActionBar.cjs.js.map +1 -0
  293. package/dist/components/Layout/ActionBar/ActionBar.es.js +122 -0
  294. package/dist/components/Layout/ActionBar/ActionBar.es.js.map +1 -0
  295. package/dist/components/Layout/ActionBar/ActionBar.module.scss.cjs.js +3 -0
  296. package/dist/components/Layout/ActionBar/ActionBar.module.scss.cjs.js.map +1 -0
  297. package/dist/components/Layout/ActionBar/ActionBar.module.scss.es.js +24 -0
  298. package/dist/components/Layout/ActionBar/ActionBar.module.scss.es.js.map +1 -0
  299. package/dist/components/Layout/Card/Card.module.scss.cjs.js +2 -2
  300. package/dist/components/Layout/Card/Card.module.scss.es.js +12 -12
  301. package/dist/components/Layout/ContentHeader/ContentHeader.cjs.js +1 -1
  302. package/dist/components/Layout/ContentHeader/ContentHeader.cjs.js.map +1 -1
  303. package/dist/components/Layout/ContentHeader/ContentHeader.es.js +66 -41
  304. package/dist/components/Layout/ContentHeader/ContentHeader.es.js.map +1 -1
  305. package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.cjs.js +2 -2
  306. package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.es.js +28 -13
  307. package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.es.js.map +1 -1
  308. package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.cjs.js +2 -2
  309. package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.es.js +4 -4
  310. package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.cjs.js +2 -2
  311. package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.es.js +2 -2
  312. package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.cjs.js +2 -2
  313. package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.es.js +3 -3
  314. package/dist/components/Link/Link.cjs.js.map +1 -1
  315. package/dist/components/Link/Link.es.js +1 -1
  316. package/dist/components/Link/Link.es.js.map +1 -1
  317. package/dist/components/Link/Link.module.scss.cjs.js +2 -2
  318. package/dist/components/Link/Link.module.scss.es.js +17 -17
  319. package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.cjs.js +2 -2
  320. package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.es.js +11 -11
  321. package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js +1 -1
  322. package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js.map +1 -1
  323. package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.es.js +7 -1
  324. package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.es.js.map +1 -1
  325. package/dist/components/Notifications/Alert/AlertItem/AlertItem.cjs.js +1 -1
  326. package/dist/components/Notifications/Alert/AlertItem/AlertItem.cjs.js.map +1 -1
  327. package/dist/components/Notifications/Alert/AlertItem/AlertItem.es.js +1 -1
  328. package/dist/components/Notifications/Alert/AlertItem/AlertItem.es.js.map +1 -1
  329. package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.cjs.js +2 -2
  330. package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.es.js +22 -22
  331. package/dist/components/Notifications/Banner/Banner.module.scss.cjs.js +2 -2
  332. package/dist/components/Notifications/Banner/Banner.module.scss.es.js +9 -9
  333. package/dist/components/Notifications/BaseModal/BaseModal.cjs.js +1 -1
  334. package/dist/components/Notifications/BaseModal/BaseModal.cjs.js.map +1 -1
  335. package/dist/components/Notifications/BaseModal/BaseModal.es.js +1 -1
  336. package/dist/components/Notifications/BaseModal/BaseModal.es.js.map +1 -1
  337. package/dist/components/Notifications/BaseModal/BaseModal.module.scss.cjs.js +2 -2
  338. package/dist/components/Notifications/BaseModal/BaseModal.module.scss.es.js +5 -5
  339. package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.cjs.js.map +1 -1
  340. package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.es.js.map +1 -1
  341. package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.cjs.js +2 -2
  342. package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.es.js +4 -4
  343. package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.cjs.js.map +1 -1
  344. package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.es.js.map +1 -1
  345. package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.cjs.js +2 -2
  346. package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.es.js +2 -2
  347. package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.cjs.js +2 -2
  348. package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.es.js +6 -6
  349. package/dist/components/Notifications/Dialog/Dialog.module.scss.cjs.js +2 -2
  350. package/dist/components/Notifications/Dialog/Dialog.module.scss.es.js +4 -4
  351. package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.cjs.js +2 -2
  352. package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.es.js +3 -3
  353. package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.cjs.js +2 -2
  354. package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.es.js +10 -10
  355. package/dist/components/Notifications/DiscardChangesModal/DiscardChangesModal.cjs.js.map +1 -1
  356. package/dist/components/Notifications/DiscardChangesModal/DiscardChangesModal.es.js.map +1 -1
  357. package/dist/components/Notifications/SideSheet/SideSheet.cjs.js.map +1 -1
  358. package/dist/components/Notifications/SideSheet/SideSheet.es.js +1 -1
  359. package/dist/components/Notifications/SideSheet/SideSheet.es.js.map +1 -1
  360. package/dist/components/Notifications/SideSheet/SideSheet.module.scss.cjs.js +2 -2
  361. package/dist/components/Notifications/SideSheet/SideSheet.module.scss.es.js +13 -13
  362. package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.cjs.js +2 -2
  363. package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.es.js +2 -2
  364. package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.cjs.js +2 -2
  365. package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.es.js +2 -2
  366. package/dist/components/Notifications/SlideInModal/SlideInModal.cjs.js.map +1 -1
  367. package/dist/components/Notifications/SlideInModal/SlideInModal.es.js +1 -1
  368. package/dist/components/Notifications/SlideInModal/SlideInModal.es.js.map +1 -1
  369. package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.cjs.js +2 -2
  370. package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.es.js +10 -10
  371. package/dist/components/Pagination/Pagination.cjs.js +1 -1
  372. package/dist/components/Pagination/Pagination.cjs.js.map +1 -1
  373. package/dist/components/Pagination/Pagination.es.js +118 -90
  374. package/dist/components/Pagination/Pagination.es.js.map +1 -1
  375. package/dist/components/Pagination/Pagination.module.scss.cjs.js +2 -2
  376. package/dist/components/Pagination/Pagination.module.scss.es.js +15 -14
  377. package/dist/components/Pagination/Pagination.module.scss.es.js.map +1 -1
  378. package/dist/components/Popover/Popover.cjs.js.map +1 -1
  379. package/dist/components/Popover/Popover.es.js.map +1 -1
  380. package/dist/components/Popover/Popover.module.scss.cjs.js +2 -2
  381. package/dist/components/Popover/Popover.module.scss.es.js +3 -3
  382. package/dist/components/ProgressBar/ProgressBar.cjs.js.map +1 -1
  383. package/dist/components/ProgressBar/ProgressBar.es.js.map +1 -1
  384. package/dist/components/ProgressBar/ProgressBar.module.scss.cjs.js +2 -2
  385. package/dist/components/ProgressBar/ProgressBar.module.scss.es.js +9 -9
  386. package/dist/components/Skeleton/Skeleton.module.scss.cjs.js +2 -2
  387. package/dist/components/Skeleton/Skeleton.module.scss.es.js +5 -5
  388. package/dist/components/Spinner/Spinner.module.scss.cjs.js +2 -2
  389. package/dist/components/Spinner/Spinner.module.scss.es.js +3 -3
  390. package/dist/components/Stepper/Step.module.scss.cjs.js +2 -2
  391. package/dist/components/Stepper/Step.module.scss.es.js +22 -22
  392. package/dist/components/Stepper/Stepper.module.scss.cjs.js +2 -2
  393. package/dist/components/Stepper/Stepper.module.scss.es.js +4 -4
  394. package/dist/components/Tabs/Tab.module.scss.cjs.js +2 -2
  395. package/dist/components/Tabs/Tab.module.scss.es.js +3 -3
  396. package/dist/components/Tabs/TabButton.cjs.js.map +1 -1
  397. package/dist/components/Tabs/TabButton.es.js.map +1 -1
  398. package/dist/components/Tabs/TabButton.module.scss.cjs.js +2 -2
  399. package/dist/components/Tabs/TabButton.module.scss.es.js +12 -12
  400. package/dist/components/Tabs/Tabs.cjs.js +1 -1
  401. package/dist/components/Tabs/Tabs.cjs.js.map +1 -1
  402. package/dist/components/Tabs/Tabs.es.js +1 -1
  403. package/dist/components/Tabs/Tabs.es.js.map +1 -1
  404. package/dist/components/Tabs/Tabs.module.scss.cjs.js +2 -2
  405. package/dist/components/Tabs/Tabs.module.scss.es.js +10 -10
  406. package/dist/components/Tag/RemoveButton.module.scss.cjs.js +2 -2
  407. package/dist/components/Tag/RemoveButton.module.scss.es.js +3 -3
  408. package/dist/components/Tag/Tag.cjs.js +1 -1
  409. package/dist/components/Tag/Tag.cjs.js.map +1 -1
  410. package/dist/components/Tag/Tag.es.js +7 -1
  411. package/dist/components/Tag/Tag.es.js.map +1 -1
  412. package/dist/components/Tag/Tag.module.scss.cjs.js +2 -2
  413. package/dist/components/Tag/Tag.module.scss.es.js +6 -6
  414. package/dist/components/TextEllipsis/TextEllipsis.cjs.js.map +1 -1
  415. package/dist/components/TextEllipsis/TextEllipsis.es.js.map +1 -1
  416. package/dist/components/TextEllipsis/TextEllipsis.module.scss.cjs.js +2 -2
  417. package/dist/components/TextEllipsis/TextEllipsis.module.scss.es.js +3 -3
  418. package/dist/components/Tiles/Tile.cjs.js.map +1 -1
  419. package/dist/components/Tiles/Tile.es.js.map +1 -1
  420. package/dist/components/Tiles/Tile.module.scss.cjs.js +2 -2
  421. package/dist/components/Tiles/Tile.module.scss.es.js +8 -8
  422. package/dist/components/Tiles/Tiles.module.scss.cjs.js +2 -2
  423. package/dist/components/Tiles/Tiles.module.scss.es.js +2 -2
  424. package/dist/components/Tooltip/Tooltip.cjs.js +1 -1
  425. package/dist/components/Tooltip/Tooltip.cjs.js.map +1 -1
  426. package/dist/components/Tooltip/Tooltip.es.js +47 -39
  427. package/dist/components/Tooltip/Tooltip.es.js.map +1 -1
  428. package/dist/components/Tooltip/Tooltip.module.scss.cjs.js +2 -2
  429. package/dist/components/Tooltip/Tooltip.module.scss.es.js +28 -27
  430. package/dist/components/Tooltip/Tooltip.module.scss.es.js.map +1 -1
  431. package/dist/components/Typography/Typography.module.scss.cjs.js +2 -2
  432. package/dist/components/Typography/Typography.module.scss.es.js +13 -13
  433. package/dist/components/_BaseStyling_/BaseStyling.cjs.js +2 -1
  434. package/dist/components/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
  435. package/dist/components/_BaseStyling_/BaseStyling.es.js +3 -3
  436. package/dist/components/_BaseStyling_/BaseStyling.es.js.map +1 -1
  437. package/dist/components/admin/layout/LeftNav/LeftNav.cjs.js.map +1 -1
  438. package/dist/components/admin/layout/LeftNav/LeftNav.es.js +1 -1
  439. package/dist/components/admin/layout/LeftNav/LeftNav.es.js.map +1 -1
  440. package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.cjs.js +2 -2
  441. package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.es.js +5 -5
  442. package/dist/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.cjs.js.map +1 -1
  443. package/dist/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.es.js +3 -1
  444. package/dist/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.es.js.map +1 -1
  445. package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.cjs.js +2 -2
  446. package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.es.js +14 -14
  447. package/dist/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.cjs.js.map +1 -1
  448. package/dist/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.es.js +6 -2
  449. package/dist/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.es.js.map +1 -1
  450. package/dist/components/admin/layout/LeftNav/useRefItems.cjs.js +1 -1
  451. package/dist/components/admin/layout/LeftNav/useRefItems.cjs.js.map +1 -1
  452. package/dist/components/admin/layout/LeftNav/useRefItems.es.js +7 -6
  453. package/dist/components/admin/layout/LeftNav/useRefItems.es.js.map +1 -1
  454. package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.cjs.js +2 -2
  455. package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.es.js +3 -3
  456. package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.cjs.js +2 -2
  457. package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.es.js +7 -7
  458. package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.cjs.js +2 -2
  459. package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.es.js +13 -13
  460. package/dist/components/miscellaneous/IdentityProviderButton.cjs.js.map +1 -1
  461. package/dist/components/miscellaneous/IdentityProviderButton.es.js.map +1 -1
  462. package/dist/components/miscellaneous/IdentityProviderButton.module.scss.cjs.js +2 -2
  463. package/dist/components/miscellaneous/IdentityProviderButton.module.scss.es.js +3 -3
  464. package/dist/components/withReadOnly.cjs.js +1 -1
  465. package/dist/components/withReadOnly.cjs.js.map +1 -1
  466. package/dist/components/withReadOnly.es.js +2 -4
  467. package/dist/components/withReadOnly.es.js.map +1 -1
  468. package/dist/hooks/useClickOutside.cjs.js +1 -1
  469. package/dist/hooks/useClickOutside.cjs.js.map +1 -1
  470. package/dist/hooks/useClickOutside.es.js +1 -1
  471. package/dist/hooks/useClickOutside.es.js.map +1 -1
  472. package/dist/hooks/useDebouncedCallback.cjs.js +1 -1
  473. package/dist/hooks/useDebouncedCallback.cjs.js.map +1 -1
  474. package/dist/hooks/useDebouncedCallback.es.js +9 -2
  475. package/dist/hooks/useDebouncedCallback.es.js.map +1 -1
  476. package/dist/hooks/useGetDomRoot.cjs.js.map +1 -1
  477. package/dist/hooks/useGetDomRoot.es.js.map +1 -1
  478. package/dist/hooks/usePosition.cjs.js +1 -1
  479. package/dist/hooks/usePosition.cjs.js.map +1 -1
  480. package/dist/hooks/usePosition.es.js +105 -4
  481. package/dist/hooks/usePosition.es.js.map +1 -1
  482. package/dist/hooks/useRepeatFocus.cjs.js.map +1 -1
  483. package/dist/hooks/useRepeatFocus.es.js.map +1 -1
  484. package/dist/hooks/useScreenSize.cjs.js +1 -1
  485. package/dist/hooks/useScreenSize.cjs.js.map +1 -1
  486. package/dist/hooks/useScreenSize.es.js +1 -1
  487. package/dist/hooks/useScreenSize.es.js.map +1 -1
  488. package/dist/hooks/useStickyStacking.cjs.js +2 -0
  489. package/dist/hooks/useStickyStacking.cjs.js.map +1 -0
  490. package/dist/hooks/useStickyStacking.es.js +208 -0
  491. package/dist/hooks/useStickyStacking.es.js.map +1 -0
  492. package/dist/hooks/useUploadFile.cjs.js +1 -1
  493. package/dist/hooks/useUploadFile.cjs.js.map +1 -1
  494. package/dist/hooks/useUploadFile.es.js +1 -1
  495. package/dist/hooks/useUploadFile.es.js.map +1 -1
  496. package/dist/index.cjs.js +1 -1
  497. package/dist/index.d.ts +140 -29
  498. package/dist/index.es.js +4 -0
  499. package/dist/index.es.js.map +1 -1
  500. package/dist/node_modules/tabbable/dist/index.esm.cjs.js +1 -1
  501. package/dist/node_modules/tabbable/dist/index.esm.cjs.js.map +1 -1
  502. package/dist/node_modules/tabbable/dist/index.esm.es.js +4 -3
  503. package/dist/node_modules/tabbable/dist/index.esm.es.js.map +1 -1
  504. package/dist/readyclasses.module.scss.cjs.js +2 -2
  505. package/dist/readyclasses.module.scss.es.js +5 -5
  506. package/dist/util/helper.cjs.js +1 -1
  507. package/dist/util/helper.cjs.js.map +1 -1
  508. package/dist/util/helper.es.js +33 -16
  509. package/dist/util/helper.es.js.map +1 -1
  510. package/package.json +12 -12
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../../../Button/IconButton.cjs.js"),r=require("../../../Icon/Icon.cjs.js"),n=require("./AlertItem.module.scss.cjs.js"),a=require("../../../../readyclasses.module.scss.cjs.js"),l=require("../../../../hooks/useAnimation.cjs.js"),s=require("../../../Typography/Typography.cjs.js"),o=require("../AlertProvider/AlertContext.cjs.js");let c=1;exports.AlertItem=({id:i,title:u,duration:d,variant:m="neutral",emphasis:p="low",content:f,className:g,actions:h=[],onClose:v,closeButtonTitle:E,wasShown:j})=>{const y=e.useRef(),{ref:I,animationStarted:b,startAnimation:T}=l.useAnimation(()=>{null==v||v()});((t,r)=>{const n=e.useContext(o.default);e.useEffect(()=>{t.current&&n.setAlertHeight(r,t.current.getBoundingClientRect().height)},[t.current])})(I,i),e.useEffect(()=>{var e,t,r,n;return d&&d>0&&(y.current=setTimeout(()=>T(),d)),I&&(null==(e=I.current)||e.addEventListener("focus",A),null==(t=I.current)||t.addEventListener("blur",C),null==(r=I.current)||r.addEventListener("mouseenter",A),null==(n=I.current)||n.addEventListener("mouseleave",C)),()=>{y.current&&clearTimeout(y.current)}},[]);const A=()=>{y.current&&clearTimeout(y.current)},C=()=>{d&&d>0&&(y.current=setTimeout(()=>T(),d))},N=h.map(t=>e.createElement("button",{key:`alert-action-button-${(c++).toString()}`,...t,onClick:e=>{var r;null==v||v(),null==(r=t.onClick)||r.call(t,e)},className:n.default["action-button"]},t.label));return e.createElement("div",{"data-testid":"alert-container",ref:I,"aria-live":"error"!==m||"medium"!==p&&"high"!==p?"polite":"assertive",className:(()=>{const e=[n.default.alert,n.default[`${m}`],n.default[`emph-${p}`]];return b&&e.push(a.default["slide-out"]),b||j||e.push(a.default["slide-in"]),g&&e.push(g),e.join(" ")})(),role:"alert"},e.createElement("div",{className:n.default["outer-content-wrapper"]},e.createElement(r.Icon,{icon:"error"===m?r.Icons.ErrorAlt:"warning"===m?r.Icons.Warning:"success"===m?r.Icons.CheckmarkCircleAlt:r.Icons.InfoCircle,className:n.default.icon}),e.createElement("div",{className:n.default["content-wrapper"],role:"log"},!!u&&!!f&&e.createElement(s.Typography,{"data-testid":"alert-title",className:n.default.title,variant:"body-bold",tag:"span"},u),(!!f||!!u)&&e.createElement(s.Typography,{"data-testid":"alert-content",className:n.default.content,variant:"body"},f||u))),N.length>0&&e.createElement("div",{"data-testid":"alert-actions",className:n.default.actions},N),v&&e.createElement(t.IconButton,{className:n.default["close-btn"],onClick:e=>{e.stopPropagation(),T()},title:E,"data-testid":"alert-close"},e.createElement(r.Icon,{icon:r.Icons.Times})))};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../../../Button/IconButton.cjs.js"),r=require("../../../Icon/Icon.cjs.js"),n=require("./AlertItem.module.scss.cjs.js"),a=require("../../../../readyclasses.module.scss.cjs.js"),l=require("../../../../hooks/useAnimation.cjs.js"),s=require("../../../Typography/Typography.cjs.js"),o=require("../AlertProvider/AlertContext.cjs.js");let c=1;exports.AlertItem=({id:i,title:u,duration:d,variant:m="neutral",emphasis:p="low",content:f,className:v,actions:g=[],onClose:h,closeButtonTitle:E,wasShown:j})=>{const y=e.useRef(void 0),{ref:I,animationStarted:b,startAnimation:T}=l.useAnimation(()=>{null==h||h()});((t,r)=>{const n=e.useContext(o.default);e.useEffect(()=>{t.current&&n.setAlertHeight(r,t.current.getBoundingClientRect().height)},[t.current])})(I,i),e.useEffect(()=>{var e,t,r,n;return d&&d>0&&(y.current=setTimeout(()=>T(),d)),I&&(null==(e=I.current)||e.addEventListener("focus",A),null==(t=I.current)||t.addEventListener("blur",C),null==(r=I.current)||r.addEventListener("mouseenter",A),null==(n=I.current)||n.addEventListener("mouseleave",C)),()=>{y.current&&clearTimeout(y.current)}},[]);const A=()=>{y.current&&clearTimeout(y.current)},C=()=>{d&&d>0&&(y.current=setTimeout(()=>T(),d))},N=g.map(t=>e.createElement("button",{key:`alert-action-button-${(c++).toString()}`,...t,onClick:e=>{var r;null==h||h(),null==(r=t.onClick)||r.call(t,e)},className:n.default["action-button"]},t.label));return e.createElement("div",{"data-testid":"alert-container",ref:I,"aria-live":"error"!==m||"medium"!==p&&"high"!==p?"polite":"assertive",className:(()=>{const e=[n.default.alert,n.default[`${m}`],n.default[`emph-${p}`]];return b&&e.push(a.default["slide-out"]),b||j||e.push(a.default["slide-in"]),v&&e.push(v),e.join(" ")})(),role:"alert"},e.createElement("div",{className:n.default["outer-content-wrapper"]},e.createElement(r.Icon,{icon:"error"===m?r.Icons.ErrorAlt:"warning"===m?r.Icons.Warning:"success"===m?r.Icons.CheckmarkCircleAlt:r.Icons.InfoCircle,className:n.default.icon}),e.createElement("div",{className:n.default["content-wrapper"],role:"log"},!!u&&!!f&&e.createElement(s.Typography,{"data-testid":"alert-title",className:n.default.title,variant:"body-bold",tag:"span"},u),(!!f||!!u)&&e.createElement(s.Typography,{"data-testid":"alert-content",className:n.default.content,variant:"body"},f||u))),N.length>0&&e.createElement("div",{"data-testid":"alert-actions",className:n.default.actions},N),h&&e.createElement(t.IconButton,{className:n.default["close-btn"],onClick:e=>{e.stopPropagation(),T()},title:E,"data-testid":"alert-close"},e.createElement(r.Icon,{icon:r.Icons.Times})))};
2
2
  //# sourceMappingURL=AlertItem.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AlertItem.cjs.js","sources":["../../../../../src/components/Notifications/Alert/AlertItem/AlertItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ButtonHTMLAttributes, useContext, useEffect, useRef } from \"react\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport classes from \"./AlertItem.module.scss\";\nimport readyclasses from \"../../../../readyclasses.module.scss\";\nimport { useAnimation } from \"../../../../hooks/useAnimation\";\nimport { Typography } from \"../../../Typography/Typography\";\nimport AlertContext from \"../AlertProvider/AlertContext\";\n\nexport const EMPHASES = [\"low\", \"medium\", \"high\"] as const;\nexport type Emphasis = (typeof EMPHASES)[keyof typeof EMPHASES];\n\nexport const VARIANTS = [\"neutral\", \"informative\", \"success\", \"warning\", \"error\"] as const;\nexport type Variant = (typeof VARIANTS)[keyof typeof VARIANTS];\n\nexport type Actions = (ButtonHTMLAttributes<HTMLButtonElement> & { label: string })[];\n\nexport interface Props {\n id: string;\n title?: string | React.ReactNode;\n content?: string | React.ReactNode;\n duration?: number;\n emphasis?: Emphasis;\n variant?: Variant;\n className?: string;\n onClose?: () => void;\n closeButtonTitle?: string;\n actions?: Actions;\n wasShown?: boolean;\n}\n\nconst useRegisterAlertHeight = (\n singleAlertRef: React.RefObject<HTMLDivElement>,\n alertId: string\n) => {\n const ctx = useContext(AlertContext);\n\n useEffect(() => {\n if (singleAlertRef.current) {\n ctx.setAlertHeight(alertId, singleAlertRef.current.getBoundingClientRect().height);\n }\n }, [singleAlertRef.current]);\n};\n\nlet actionButtonKeyCounter = 1;\nexport const AlertItem = ({\n id,\n title,\n duration,\n variant = \"neutral\",\n emphasis = \"low\",\n content,\n className,\n actions = [],\n onClose,\n closeButtonTitle,\n wasShown\n}: Props) => {\n const timerHandler = useRef<ReturnType<typeof setTimeout>>();\n const onAnimationEnd = () => {\n onClose?.();\n };\n const { ref, animationStarted, startAnimation } = useAnimation<HTMLDivElement>(onAnimationEnd);\n\n useRegisterAlertHeight(ref, id);\n\n useEffect(() => {\n if (duration && duration > 0) {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n }\n if (ref) {\n ref.current?.addEventListener(\"focus\", onItemFocus);\n ref.current?.addEventListener(\"blur\", onItemBlur);\n ref.current?.addEventListener(\"mouseenter\", onItemFocus);\n ref.current?.addEventListener(\"mouseleave\", onItemBlur);\n }\n return () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n }, []);\n\n const onItemFocus = () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n\n const onItemBlur = () => {\n if (duration && duration > 0) {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n }\n };\n\n const getVariantIcon = () => {\n if (variant === \"error\") {\n return Icons.ErrorAlt;\n }\n\n if (variant === \"warning\") {\n return Icons.Warning;\n }\n\n return variant === \"success\" ? Icons.CheckmarkCircleAlt : Icons.InfoCircle;\n };\n\n const actionButtons = actions.map(actionProp => (\n <button\n key={`alert-action-button-${(actionButtonKeyCounter++).toString()}`}\n {...actionProp}\n onClick={e => {\n onClose?.();\n actionProp.onClick?.(e);\n }}\n className={classes[\"action-button\"]}\n >\n {actionProp.label}\n </button>\n ));\n\n const getAlertClasses = (): string => {\n const alertClasses = [classes[\"alert\"], classes[`${variant}`], classes[`emph-${emphasis}`]];\n if (animationStarted) {\n alertClasses.push(readyclasses[\"slide-out\"]);\n }\n if (!animationStarted && !wasShown) {\n alertClasses.push(readyclasses[\"slide-in\"]);\n }\n if (className) {\n alertClasses.push(className);\n }\n return alertClasses.join(\" \");\n };\n\n const getAria = () => {\n if (variant === \"error\" && (emphasis === \"medium\" || emphasis === \"high\")) {\n return \"assertive\";\n }\n return \"polite\";\n };\n\n const getContentOrTitle = () => {\n if (content) {\n return content;\n }\n return title;\n };\n\n return (\n <div\n {...{ [\"data-testid\"]: \"alert-container\" }}\n ref={ref}\n aria-live={getAria()}\n className={getAlertClasses()}\n role=\"alert\"\n >\n <div className={classes[\"outer-content-wrapper\"]}>\n <Icon icon={getVariantIcon()} className={classes[\"icon\"]} />\n <div className={classes[\"content-wrapper\"]} role=\"log\">\n {!!title && !!content && (\n <Typography\n {...{ [\"data-testid\"]: \"alert-title\" }}\n className={classes[\"title\"]}\n variant=\"body-bold\"\n tag=\"span\"\n >\n {title}\n </Typography>\n )}\n {(!!content || !!title) && (\n <Typography\n {...{ [\"data-testid\"]: \"alert-content\" }}\n className={classes[\"content\"]}\n variant=\"body\"\n >\n {getContentOrTitle()}\n </Typography>\n )}\n </div>\n </div>\n {actionButtons.length > 0 && (\n <div {...{ [\"data-testid\"]: \"alert-actions\" }} className={classes[\"actions\"]}>\n {actionButtons}\n </div>\n )}\n {onClose && (\n <IconButton\n className={classes[\"close-btn\"]}\n onClick={e => {\n e.stopPropagation();\n startAnimation();\n }}\n title={closeButtonTitle}\n {...{ [\"data-testid\"]: \"alert-close\" }}\n >\n <Icon icon={Icons.Times} />\n </IconButton>\n )}\n </div>\n );\n};\n"],"names":["actionButtonKeyCounter","id","title","duration","variant","emphasis","content","className","actions","onClose","closeButtonTitle","wasShown","timerHandler","useRef","ref","animationStarted","startAnimation","useAnimation","singleAlertRef","alertId","ctx","useContext","AlertContext","useEffect","current","setAlertHeight","getBoundingClientRect","height","useRegisterAlertHeight","setTimeout","_a","addEventListener","onItemFocus","_b","onItemBlur","_c","_d","clearTimeout","actionButtons","map","actionProp","React","createElement","key","toString","onClick","e","call","classes","label","alertClasses","push","readyclasses","join","getAlertClasses","role","Icon","icon","Icons","ErrorAlt","Warning","CheckmarkCircleAlt","InfoCircle","Typography","tag","length","IconButton","stopPropagation","Times"],"mappings":"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"}
1
+ {"version":3,"file":"AlertItem.cjs.js","sources":["../../../../../src/components/Notifications/Alert/AlertItem/AlertItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ButtonHTMLAttributes, useContext, useEffect, useRef } from \"react\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport classes from \"./AlertItem.module.scss\";\nimport readyclasses from \"../../../../readyclasses.module.scss\";\nimport { useAnimation } from \"../../../../hooks/useAnimation\";\nimport { Typography } from \"../../../Typography/Typography\";\nimport AlertContext from \"../AlertProvider/AlertContext\";\n\nexport const EMPHASES = [\"low\", \"medium\", \"high\"] as const;\nexport type Emphasis = (typeof EMPHASES)[keyof typeof EMPHASES];\n\nexport const VARIANTS = [\"neutral\", \"informative\", \"success\", \"warning\", \"error\"] as const;\nexport type Variant = (typeof VARIANTS)[keyof typeof VARIANTS];\n\nexport type Actions = (ButtonHTMLAttributes<HTMLButtonElement> & { label: string })[];\n\nexport interface Props {\n id: string;\n title?: string | React.ReactNode;\n content?: string | React.ReactNode;\n duration?: number;\n emphasis?: Emphasis;\n variant?: Variant;\n className?: string;\n onClose?: () => void;\n closeButtonTitle?: string;\n actions?: Actions;\n wasShown?: boolean;\n}\n\nconst useRegisterAlertHeight = (\n singleAlertRef: React.RefObject<HTMLDivElement | null>,\n alertId: string\n) => {\n const ctx = useContext(AlertContext);\n\n useEffect(() => {\n if (singleAlertRef.current) {\n ctx.setAlertHeight(alertId, singleAlertRef.current.getBoundingClientRect().height);\n }\n }, [singleAlertRef.current]);\n};\n\nlet actionButtonKeyCounter = 1;\nexport const AlertItem = ({\n id,\n title,\n duration,\n variant = \"neutral\",\n emphasis = \"low\",\n content,\n className,\n actions = [],\n onClose,\n closeButtonTitle,\n wasShown\n}: Props) => {\n const timerHandler = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n const onAnimationEnd = () => {\n onClose?.();\n };\n const { ref, animationStarted, startAnimation } = useAnimation<HTMLDivElement>(onAnimationEnd);\n\n useRegisterAlertHeight(ref, id);\n\n useEffect(() => {\n if (duration && duration > 0) {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n }\n if (ref) {\n ref.current?.addEventListener(\"focus\", onItemFocus);\n ref.current?.addEventListener(\"blur\", onItemBlur);\n ref.current?.addEventListener(\"mouseenter\", onItemFocus);\n ref.current?.addEventListener(\"mouseleave\", onItemBlur);\n }\n return () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n }, []);\n\n const onItemFocus = () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n\n const onItemBlur = () => {\n if (duration && duration > 0) {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n }\n };\n\n const getVariantIcon = () => {\n if (variant === \"error\") {\n return Icons.ErrorAlt;\n }\n\n if (variant === \"warning\") {\n return Icons.Warning;\n }\n\n return variant === \"success\" ? Icons.CheckmarkCircleAlt : Icons.InfoCircle;\n };\n\n const actionButtons = actions.map(actionProp => (\n <button\n key={`alert-action-button-${(actionButtonKeyCounter++).toString()}`}\n {...actionProp}\n onClick={e => {\n onClose?.();\n actionProp.onClick?.(e);\n }}\n className={classes[\"action-button\"]}\n >\n {actionProp.label}\n </button>\n ));\n\n const getAlertClasses = (): string => {\n const alertClasses = [classes[\"alert\"], classes[`${variant}`], classes[`emph-${emphasis}`]];\n if (animationStarted) {\n alertClasses.push(readyclasses[\"slide-out\"]);\n }\n if (!animationStarted && !wasShown) {\n alertClasses.push(readyclasses[\"slide-in\"]);\n }\n if (className) {\n alertClasses.push(className);\n }\n return alertClasses.join(\" \");\n };\n\n const getAria = () => {\n if (variant === \"error\" && (emphasis === \"medium\" || emphasis === \"high\")) {\n return \"assertive\";\n }\n return \"polite\";\n };\n\n const getContentOrTitle = () => {\n if (content) {\n return content;\n }\n return title;\n };\n\n return (\n <div\n {...{ [\"data-testid\"]: \"alert-container\" }}\n ref={ref}\n aria-live={getAria()}\n className={getAlertClasses()}\n role=\"alert\"\n >\n <div className={classes[\"outer-content-wrapper\"]}>\n <Icon icon={getVariantIcon()} className={classes[\"icon\"]} />\n <div className={classes[\"content-wrapper\"]} role=\"log\">\n {!!title && !!content && (\n <Typography\n {...{ [\"data-testid\"]: \"alert-title\" }}\n className={classes[\"title\"]}\n variant=\"body-bold\"\n tag=\"span\"\n >\n {title}\n </Typography>\n )}\n {(!!content || !!title) && (\n <Typography\n {...{ [\"data-testid\"]: \"alert-content\" }}\n className={classes[\"content\"]}\n variant=\"body\"\n >\n {getContentOrTitle()}\n </Typography>\n )}\n </div>\n </div>\n {actionButtons.length > 0 && (\n <div {...{ [\"data-testid\"]: \"alert-actions\" }} className={classes[\"actions\"]}>\n {actionButtons}\n </div>\n )}\n {onClose && (\n <IconButton\n className={classes[\"close-btn\"]}\n onClick={e => {\n e.stopPropagation();\n startAnimation();\n }}\n title={closeButtonTitle}\n {...{ [\"data-testid\"]: \"alert-close\" }}\n >\n <Icon icon={Icons.Times} />\n </IconButton>\n )}\n </div>\n );\n};\n"],"names":["actionButtonKeyCounter","id","title","duration","variant","emphasis","content","className","actions","onClose","closeButtonTitle","wasShown","timerHandler","useRef","ref","animationStarted","startAnimation","useAnimation","singleAlertRef","alertId","ctx","useContext","AlertContext","useEffect","current","setAlertHeight","getBoundingClientRect","height","useRegisterAlertHeight","setTimeout","_a","addEventListener","onItemFocus","_b","onItemBlur","_c","_d","clearTimeout","actionButtons","map","actionProp","React","createElement","key","toString","onClick","e","call","classes","label","alertClasses","push","readyclasses","join","getAlertClasses","role","Icon","icon","Icons","ErrorAlt","Warning","CheckmarkCircleAlt","InfoCircle","Typography","tag","length","IconButton","stopPropagation","Times"],"mappings":"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"}
@@ -28,7 +28,7 @@ const AlertItem = ({
28
28
  closeButtonTitle,
29
29
  wasShown
30
30
  }) => {
31
- const timerHandler = useRef();
31
+ const timerHandler = useRef(void 0);
32
32
  const onAnimationEnd = () => {
33
33
  onClose == null ? void 0 : onClose();
34
34
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AlertItem.es.js","sources":["../../../../../src/components/Notifications/Alert/AlertItem/AlertItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ButtonHTMLAttributes, useContext, useEffect, useRef } from \"react\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport classes from \"./AlertItem.module.scss\";\nimport readyclasses from \"../../../../readyclasses.module.scss\";\nimport { useAnimation } from \"../../../../hooks/useAnimation\";\nimport { Typography } from \"../../../Typography/Typography\";\nimport AlertContext from \"../AlertProvider/AlertContext\";\n\nexport const EMPHASES = [\"low\", \"medium\", \"high\"] as const;\nexport type Emphasis = (typeof EMPHASES)[keyof typeof EMPHASES];\n\nexport const VARIANTS = [\"neutral\", \"informative\", \"success\", \"warning\", \"error\"] as const;\nexport type Variant = (typeof VARIANTS)[keyof typeof VARIANTS];\n\nexport type Actions = (ButtonHTMLAttributes<HTMLButtonElement> & { label: string })[];\n\nexport interface Props {\n id: string;\n title?: string | React.ReactNode;\n content?: string | React.ReactNode;\n duration?: number;\n emphasis?: Emphasis;\n variant?: Variant;\n className?: string;\n onClose?: () => void;\n closeButtonTitle?: string;\n actions?: Actions;\n wasShown?: boolean;\n}\n\nconst useRegisterAlertHeight = (\n singleAlertRef: React.RefObject<HTMLDivElement>,\n alertId: string\n) => {\n const ctx = useContext(AlertContext);\n\n useEffect(() => {\n if (singleAlertRef.current) {\n ctx.setAlertHeight(alertId, singleAlertRef.current.getBoundingClientRect().height);\n }\n }, [singleAlertRef.current]);\n};\n\nlet actionButtonKeyCounter = 1;\nexport const AlertItem = ({\n id,\n title,\n duration,\n variant = \"neutral\",\n emphasis = \"low\",\n content,\n className,\n actions = [],\n onClose,\n closeButtonTitle,\n wasShown\n}: Props) => {\n const timerHandler = useRef<ReturnType<typeof setTimeout>>();\n const onAnimationEnd = () => {\n onClose?.();\n };\n const { ref, animationStarted, startAnimation } = useAnimation<HTMLDivElement>(onAnimationEnd);\n\n useRegisterAlertHeight(ref, id);\n\n useEffect(() => {\n if (duration && duration > 0) {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n }\n if (ref) {\n ref.current?.addEventListener(\"focus\", onItemFocus);\n ref.current?.addEventListener(\"blur\", onItemBlur);\n ref.current?.addEventListener(\"mouseenter\", onItemFocus);\n ref.current?.addEventListener(\"mouseleave\", onItemBlur);\n }\n return () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n }, []);\n\n const onItemFocus = () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n\n const onItemBlur = () => {\n if (duration && duration > 0) {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n }\n };\n\n const getVariantIcon = () => {\n if (variant === \"error\") {\n return Icons.ErrorAlt;\n }\n\n if (variant === \"warning\") {\n return Icons.Warning;\n }\n\n return variant === \"success\" ? Icons.CheckmarkCircleAlt : Icons.InfoCircle;\n };\n\n const actionButtons = actions.map(actionProp => (\n <button\n key={`alert-action-button-${(actionButtonKeyCounter++).toString()}`}\n {...actionProp}\n onClick={e => {\n onClose?.();\n actionProp.onClick?.(e);\n }}\n className={classes[\"action-button\"]}\n >\n {actionProp.label}\n </button>\n ));\n\n const getAlertClasses = (): string => {\n const alertClasses = [classes[\"alert\"], classes[`${variant}`], classes[`emph-${emphasis}`]];\n if (animationStarted) {\n alertClasses.push(readyclasses[\"slide-out\"]);\n }\n if (!animationStarted && !wasShown) {\n alertClasses.push(readyclasses[\"slide-in\"]);\n }\n if (className) {\n alertClasses.push(className);\n }\n return alertClasses.join(\" \");\n };\n\n const getAria = () => {\n if (variant === \"error\" && (emphasis === \"medium\" || emphasis === \"high\")) {\n return \"assertive\";\n }\n return \"polite\";\n };\n\n const getContentOrTitle = () => {\n if (content) {\n return content;\n }\n return title;\n };\n\n return (\n <div\n {...{ [\"data-testid\"]: \"alert-container\" }}\n ref={ref}\n aria-live={getAria()}\n className={getAlertClasses()}\n role=\"alert\"\n >\n <div className={classes[\"outer-content-wrapper\"]}>\n <Icon icon={getVariantIcon()} className={classes[\"icon\"]} />\n <div className={classes[\"content-wrapper\"]} role=\"log\">\n {!!title && !!content && (\n <Typography\n {...{ [\"data-testid\"]: \"alert-title\" }}\n className={classes[\"title\"]}\n variant=\"body-bold\"\n tag=\"span\"\n >\n {title}\n </Typography>\n )}\n {(!!content || !!title) && (\n <Typography\n {...{ [\"data-testid\"]: \"alert-content\" }}\n className={classes[\"content\"]}\n variant=\"body\"\n >\n {getContentOrTitle()}\n </Typography>\n )}\n </div>\n </div>\n {actionButtons.length > 0 && (\n <div {...{ [\"data-testid\"]: \"alert-actions\" }} className={classes[\"actions\"]}>\n {actionButtons}\n </div>\n )}\n {onClose && (\n <IconButton\n className={classes[\"close-btn\"]}\n onClick={e => {\n e.stopPropagation();\n startAnimation();\n }}\n title={closeButtonTitle}\n {...{ [\"data-testid\"]: \"alert-close\" }}\n >\n <Icon icon={Icons.Times} />\n </IconButton>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AA+CA,MAAM,yBAAyB,CAC7B,gBACA,YACG;AACH,QAAM,MAAM,WAAW,YAAY;AAEnC,YAAU,MAAM;AACd,QAAI,eAAe,SAAS;AAC1B,UAAI,eAAe,SAAS,eAAe,QAAQ,sBAAA,EAAwB,MAAM;AAAA,IACnF;AAAA,EACF,GAAG,CAAC,eAAe,OAAO,CAAC;AAC7B;AAEA,IAAI,yBAAyB;AACtB,MAAM,YAAY,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,UAAU,CAAA;AAAA,EACV;AAAA,EACA;AAAA,EACA;AACF,MAAa;AACX,QAAM,eAAe,OAAA;AACrB,QAAM,iBAAiB,MAAM;AAC3B;AAAA,EACF;AACA,QAAM,EAAE,KAAK,kBAAkB,eAAA,IAAmB,aAA6B,cAAc;AAE7F,yBAAuB,KAAK,EAAE;AAE9B,YAAU,MAAM;;AACd,QAAI,YAAY,WAAW,GAAG;AAC5B,mBAAa,UAAU,WAAW,MAAM,eAAA,GAAkB,QAAQ;AAAA,IACpE;AACA,QAAI,KAAK;AACP,gBAAI,YAAJ,mBAAa,iBAAiB,SAAS;AACvC,gBAAI,YAAJ,mBAAa,iBAAiB,QAAQ;AACtC,gBAAI,YAAJ,mBAAa,iBAAiB,cAAc;AAC5C,gBAAI,YAAJ,mBAAa,iBAAiB,cAAc;AAAA,IAC9C;AACA,WAAO,MAAM;AACX,mBAAa,WAAW,aAAa,aAAa,OAAO;AAAA,IAC3D;AAAA,EACF,GAAG,CAAA,CAAE;AAEL,QAAM,cAAc,MAAM;AACxB,iBAAa,WAAW,aAAa,aAAa,OAAO;AAAA,EAC3D;AAEA,QAAM,aAAa,MAAM;AACvB,QAAI,YAAY,WAAW,GAAG;AAC5B,mBAAa,UAAU,WAAW,MAAM,eAAA,GAAkB,QAAQ;AAAA,IACpE;AAAA,EACF;AAEA,QAAM,iBAAiB,MAAM;AAC3B,QAAI,YAAY,SAAS;AACvB,aAAO,MAAM;AAAA,IACf;AAEA,QAAI,YAAY,WAAW;AACzB,aAAO,MAAM;AAAA,IACf;AAEA,WAAO,YAAY,YAAY,MAAM,qBAAqB,MAAM;AAAA,EAClE;AAEA,QAAM,gBAAgB,QAAQ,IAAI,CAAA,eAChC,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK,wBAAwB,0BAA0B,SAAA,CAAU;AAAA,MAChE,GAAG;AAAA,MACJ,SAAS,CAAA,MAAK;;AACZ;AACA,yBAAW,YAAX,oCAAqB;AAAA,MACvB;AAAA,MACA,WAAW,QAAQ,eAAe;AAAA,IAAA;AAAA,IAEjC,WAAW;AAAA,EAAA,CAEf;AAED,QAAM,kBAAkB,MAAc;AACpC,UAAM,eAAe,CAAC,QAAQ,OAAO,GAAG,QAAQ,GAAG,OAAO,EAAE,GAAG,QAAQ,QAAQ,QAAQ,EAAE,CAAC;AAC1F,QAAI,kBAAkB;AACpB,mBAAa,KAAK,aAAa,WAAW,CAAC;AAAA,IAC7C;AACA,QAAI,CAAC,oBAAoB,CAAC,UAAU;AAClC,mBAAa,KAAK,aAAa,UAAU,CAAC;AAAA,IAC5C;AACA,QAAI,WAAW;AACb,mBAAa,KAAK,SAAS;AAAA,IAC7B;AACA,WAAO,aAAa,KAAK,GAAG;AAAA,EAC9B;AAEA,QAAM,UAAU,MAAM;AACpB,QAAI,YAAY,YAAY,aAAa,YAAY,aAAa,SAAS;AACzE,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AAEA,QAAM,oBAAoB,MAAM;AAC9B,QAAI,SAAS;AACX,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AAEA,SACE,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG,EAAE,CAAC,aAAa,GAAG,kBAAA;AAAA,MACvB;AAAA,MACA,aAAW,QAAA;AAAA,MACX,WAAW,gBAAA;AAAA,MACX,MAAK;AAAA,IAAA;AAAA,IAEL,sBAAA,cAAC,OAAA,EAAI,WAAW,QAAQ,uBAAuB,EAAA,GAC7C,sBAAA,cAAC,MAAA,EAAK,MAAM,eAAA,GAAkB,WAAW,QAAQ,MAAM,EAAA,CAAG,GAC1D,sBAAA,cAAC,OAAA,EAAI,WAAW,QAAQ,iBAAiB,GAAG,MAAK,MAAA,GAC9C,CAAC,CAAC,SAAS,CAAC,CAAC,WACZ,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG,EAAE,CAAC,aAAa,GAAG,cAAA;AAAA,QACvB,WAAW,QAAQ,OAAO;AAAA,QAC1B,SAAQ;AAAA,QACR,KAAI;AAAA,MAAA;AAAA,MAEH;AAAA,IAAA,IAGH,CAAC,CAAC,WAAW,CAAC,CAAC,UACf,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG,EAAE,CAAC,aAAa,GAAG,gBAAA;AAAA,QACvB,WAAW,QAAQ,SAAS;AAAA,QAC5B,SAAQ;AAAA,MAAA;AAAA,MAEP,kBAAA;AAAA,IAAkB,CAGzB,CACF;AAAA,IACC,cAAc,SAAS,KACtB,sBAAA,cAAC,OAAA,EAAK,GAAG,EAAE,CAAC,aAAa,GAAG,mBAAmB,WAAW,QAAQ,SAAS,KACxE,aACH;AAAA,IAED,WACC,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW,QAAQ,WAAW;AAAA,QAC9B,SAAS,CAAA,MAAK;AACZ,YAAE,gBAAA;AACF,yBAAA;AAAA,QACF;AAAA,QACA,OAAO;AAAA,QACN,GAAG,EAAE,CAAC,aAAa,GAAG,cAAA;AAAA,MAAc;AAAA,MAErC,sBAAA,cAAC,MAAA,EAAK,MAAM,MAAM,MAAA,CAAO;AAAA,IAAA;AAAA,EAC3B;AAIR;"}
1
+ {"version":3,"file":"AlertItem.es.js","sources":["../../../../../src/components/Notifications/Alert/AlertItem/AlertItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ButtonHTMLAttributes, useContext, useEffect, useRef } from \"react\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport classes from \"./AlertItem.module.scss\";\nimport readyclasses from \"../../../../readyclasses.module.scss\";\nimport { useAnimation } from \"../../../../hooks/useAnimation\";\nimport { Typography } from \"../../../Typography/Typography\";\nimport AlertContext from \"../AlertProvider/AlertContext\";\n\nexport const EMPHASES = [\"low\", \"medium\", \"high\"] as const;\nexport type Emphasis = (typeof EMPHASES)[keyof typeof EMPHASES];\n\nexport const VARIANTS = [\"neutral\", \"informative\", \"success\", \"warning\", \"error\"] as const;\nexport type Variant = (typeof VARIANTS)[keyof typeof VARIANTS];\n\nexport type Actions = (ButtonHTMLAttributes<HTMLButtonElement> & { label: string })[];\n\nexport interface Props {\n id: string;\n title?: string | React.ReactNode;\n content?: string | React.ReactNode;\n duration?: number;\n emphasis?: Emphasis;\n variant?: Variant;\n className?: string;\n onClose?: () => void;\n closeButtonTitle?: string;\n actions?: Actions;\n wasShown?: boolean;\n}\n\nconst useRegisterAlertHeight = (\n singleAlertRef: React.RefObject<HTMLDivElement | null>,\n alertId: string\n) => {\n const ctx = useContext(AlertContext);\n\n useEffect(() => {\n if (singleAlertRef.current) {\n ctx.setAlertHeight(alertId, singleAlertRef.current.getBoundingClientRect().height);\n }\n }, [singleAlertRef.current]);\n};\n\nlet actionButtonKeyCounter = 1;\nexport const AlertItem = ({\n id,\n title,\n duration,\n variant = \"neutral\",\n emphasis = \"low\",\n content,\n className,\n actions = [],\n onClose,\n closeButtonTitle,\n wasShown\n}: Props) => {\n const timerHandler = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n const onAnimationEnd = () => {\n onClose?.();\n };\n const { ref, animationStarted, startAnimation } = useAnimation<HTMLDivElement>(onAnimationEnd);\n\n useRegisterAlertHeight(ref, id);\n\n useEffect(() => {\n if (duration && duration > 0) {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n }\n if (ref) {\n ref.current?.addEventListener(\"focus\", onItemFocus);\n ref.current?.addEventListener(\"blur\", onItemBlur);\n ref.current?.addEventListener(\"mouseenter\", onItemFocus);\n ref.current?.addEventListener(\"mouseleave\", onItemBlur);\n }\n return () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n }, []);\n\n const onItemFocus = () => {\n timerHandler.current && clearTimeout(timerHandler.current);\n };\n\n const onItemBlur = () => {\n if (duration && duration > 0) {\n timerHandler.current = setTimeout(() => startAnimation(), duration);\n }\n };\n\n const getVariantIcon = () => {\n if (variant === \"error\") {\n return Icons.ErrorAlt;\n }\n\n if (variant === \"warning\") {\n return Icons.Warning;\n }\n\n return variant === \"success\" ? Icons.CheckmarkCircleAlt : Icons.InfoCircle;\n };\n\n const actionButtons = actions.map(actionProp => (\n <button\n key={`alert-action-button-${(actionButtonKeyCounter++).toString()}`}\n {...actionProp}\n onClick={e => {\n onClose?.();\n actionProp.onClick?.(e);\n }}\n className={classes[\"action-button\"]}\n >\n {actionProp.label}\n </button>\n ));\n\n const getAlertClasses = (): string => {\n const alertClasses = [classes[\"alert\"], classes[`${variant}`], classes[`emph-${emphasis}`]];\n if (animationStarted) {\n alertClasses.push(readyclasses[\"slide-out\"]);\n }\n if (!animationStarted && !wasShown) {\n alertClasses.push(readyclasses[\"slide-in\"]);\n }\n if (className) {\n alertClasses.push(className);\n }\n return alertClasses.join(\" \");\n };\n\n const getAria = () => {\n if (variant === \"error\" && (emphasis === \"medium\" || emphasis === \"high\")) {\n return \"assertive\";\n }\n return \"polite\";\n };\n\n const getContentOrTitle = () => {\n if (content) {\n return content;\n }\n return title;\n };\n\n return (\n <div\n {...{ [\"data-testid\"]: \"alert-container\" }}\n ref={ref}\n aria-live={getAria()}\n className={getAlertClasses()}\n role=\"alert\"\n >\n <div className={classes[\"outer-content-wrapper\"]}>\n <Icon icon={getVariantIcon()} className={classes[\"icon\"]} />\n <div className={classes[\"content-wrapper\"]} role=\"log\">\n {!!title && !!content && (\n <Typography\n {...{ [\"data-testid\"]: \"alert-title\" }}\n className={classes[\"title\"]}\n variant=\"body-bold\"\n tag=\"span\"\n >\n {title}\n </Typography>\n )}\n {(!!content || !!title) && (\n <Typography\n {...{ [\"data-testid\"]: \"alert-content\" }}\n className={classes[\"content\"]}\n variant=\"body\"\n >\n {getContentOrTitle()}\n </Typography>\n )}\n </div>\n </div>\n {actionButtons.length > 0 && (\n <div {...{ [\"data-testid\"]: \"alert-actions\" }} className={classes[\"actions\"]}>\n {actionButtons}\n </div>\n )}\n {onClose && (\n <IconButton\n className={classes[\"close-btn\"]}\n onClick={e => {\n e.stopPropagation();\n startAnimation();\n }}\n title={closeButtonTitle}\n {...{ [\"data-testid\"]: \"alert-close\" }}\n >\n <Icon icon={Icons.Times} />\n </IconButton>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":"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"}
@@ -1,3 +1,3 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var r=document.createElement("style");r.appendChild(document.createTextNode('.AlertItem_sr-only_gLrTA{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.AlertItem_hidden_gLrTA{display:none}.AlertItem_slide-in_gLrTA{animation:AlertItem_slide-in_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.AlertItem_slide-in_gLrTA{animation-duration:.1ms}}.AlertItem_slide-out_gLrTA{animation:AlertItem_slide-out_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.AlertItem_slide-out_gLrTA{animation-duration:.1ms}}@keyframes AlertItem_slide-in_gLrTA{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes AlertItem_slide-out_gLrTA{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.AlertItem_alert_gLrTA{padding:1rem .875rem;border-radius:var(--alert-border-radius);display:flex;gap:.5rem;align-items:center;width:100%;box-sizing:border-box;flex-grow:0;pointer-events:auto}.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA{background-color:var(--alert-neutral-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA.AlertItem_emph-low_gLrTA{color:unset}.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA.AlertItem_emph-medium_gLrTA{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-neutral-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA.AlertItem_emph-high_gLrTA{background-color:var(--alert-neutral-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_content_gLrTA,.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_title_gLrTA,.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_close-btn_gLrTA,.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_icon_gLrTA,.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_action-button_gLrTA{color:var(--alert-text-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA{background-color:var(--alert-info-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA.AlertItem_emph-low_gLrTA{color:unset}.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA.AlertItem_emph-medium_gLrTA{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-info-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA.AlertItem_emph-high_gLrTA{background-color:var(--alert-info-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_content_gLrTA,.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_title_gLrTA,.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_close-btn_gLrTA,.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_icon_gLrTA,.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_action-button_gLrTA{color:var(--alert-text-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_success_gLrTA{background-color:var(--alert-success-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-low_gLrTA .AlertItem_icon_gLrTA{color:var(--alert-success-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-medium_gLrTA{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-success-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-medium_gLrTA .AlertItem_icon_gLrTA{color:var(--alert-success-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-high_gLrTA{background-color:var(--alert-success-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_content_gLrTA,.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_title_gLrTA,.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_close-btn_gLrTA,.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_icon_gLrTA,.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_action-button_gLrTA{color:var(--alert-text-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA{background-color:var(--alert-warning-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-low_gLrTA .AlertItem_icon_gLrTA{color:var(--alert-warning-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-medium_gLrTA{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-warning-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-medium_gLrTA .AlertItem_icon_gLrTA{color:var(--alert-warning-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-high_gLrTA{background-color:var(--alert-warning-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_content_gLrTA,.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_title_gLrTA,.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_close-btn_gLrTA,.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_icon_gLrTA,.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_action-button_gLrTA{color:var(--alert-text-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_error_gLrTA{background-color:var(--alert-error-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-low_gLrTA .AlertItem_icon_gLrTA{color:var(--alert-error-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-medium_gLrTA{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-error-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-medium_gLrTA .AlertItem_icon_gLrTA{color:var(--alert-error-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-high_gLrTA{background-color:var(--alert-error-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_content_gLrTA,.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_title_gLrTA,.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_close-btn_gLrTA,.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_icon_gLrTA,.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_action-button_gLrTA{color:var(--alert-text-inverted-color)}.AlertItem_alert_gLrTA+.AlertItem_alert_gLrTA{margin-top:.5rem}.AlertItem_alert_gLrTA .AlertItem_close-btn_gLrTA{color:var(--alert-text-color);align-self:center;width:2.5rem;height:2.5rem;margin:-.5rem 0;flex-shrink:0;border:0}.AlertItem_alert_gLrTA .AlertItem_close-btn_gLrTA span{font-size:var(--alert-font-size)}.AlertItem_alert_gLrTA .AlertItem_close-btn_gLrTA:not(:disabled):hover,.AlertItem_alert_gLrTA .AlertItem_close-btn_gLrTA:not(:disabled):focus{background-color:var(--color-black10)}.AlertItem_alert_gLrTA .AlertItem_close-btn_gLrTA:not(:disabled):active{background-color:var(--color-black20)}.AlertItem_alert_gLrTA .AlertItem_icon_gLrTA{color:var(--alert-text-color);font-size:var(--font-size);height:var(--font-size-big);display:inline-flex;align-items:center;align-self:flex-start}.AlertItem_alert_gLrTA .AlertItem_title_gLrTA{color:var(--alert-text-color);flex:1;font-size:var(--alert-font-size);line-height:1.43;margin-bottom:.25rem;display:block}.AlertItem_alert_gLrTA .AlertItem_outer-content-wrapper_gLrTA{display:flex;gap:.5rem;flex-grow:1}.AlertItem_alert_gLrTA .AlertItem_content-wrapper_gLrTA{flex-grow:1;padding-left:.125rem}.AlertItem_alert_gLrTA .AlertItem_content_gLrTA{color:var(--alert-text-color);font-size:var(--alert-font-size);line-height:1.43;margin-bottom:0;word-break:break-word}.AlertItem_alert_gLrTA .AlertItem_actions_gLrTA{text-align:right;align-self:center}.AlertItem_alert_gLrTA .AlertItem_action-button_gLrTA{border-width:var(--button-border-width);border-style:var(--button-border-style);border-radius:var(--button-border-radius);white-space:nowrap;font-size:var(--alert-font-size);line-height:1;font-weight:400;margin:-.5rem 0;padding:.625rem 1.25rem;cursor:pointer;transition:color,background-color,border-color .2s ease-in-out;font-family:var(--font-family);color:var(--alert-text-color);background-color:transparent;border-color:transparent}.AlertItem_alert_gLrTA .AlertItem_action-button_gLrTA:disabled{color:var(--greyed-out);cursor:not-allowed}.AlertItem_alert_gLrTA .AlertItem_action-button_gLrTA:focus-visible{outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:calc(.125 * var(--font-size));border-radius:var(--focus-border-radius)}.AlertItem_alert_gLrTA .AlertItem_action-button_gLrTA:not(:disabled):hover,.AlertItem_alert_gLrTA .AlertItem_action-button_gLrTA:not(:disabled):focus{background-color:var(--color-black10)}.AlertItem_alert_gLrTA .AlertItem_action-button_gLrTA:not(:disabled):active{background-color:var(--color-black20)}@media only screen and (min-width:37.5em){.AlertItem_alert_gLrTA{width:min-content;min-width:25rem}}')),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="AlertItem_hidden_gLrTA",t="AlertItem_alert_gLrTA",r="AlertItem_neutral_gLrTA",o="AlertItem_content_gLrTA",n="AlertItem_title_gLrTA",l="AlertItem_icon_gLrTA",_="AlertItem_informative_gLrTA",A="AlertItem_success_gLrTA",s="AlertItem_warning_gLrTA",i="AlertItem_error_gLrTA",m="AlertItem_actions_gLrTA",g={"sr-only":"AlertItem_sr-only_gLrTA",hidden:e,"slide-in":"AlertItem_slide-in_gLrTA","slide-out":"AlertItem_slide-out_gLrTA",alert:t,neutral:r,"emph-low":"AlertItem_emph-low_gLrTA","emph-medium":"AlertItem_emph-medium_gLrTA","emph-high":"AlertItem_emph-high_gLrTA",content:o,title:n,"close-btn":"AlertItem_close-btn_gLrTA",icon:l,"action-button":"AlertItem_action-button_gLrTA",informative:_,success:A,warning:s,error:i,"outer-content-wrapper":"AlertItem_outer-content-wrapper_gLrTA","content-wrapper":"AlertItem_content-wrapper_gLrTA",actions:m};exports.actions=m,exports.alert=t,exports.content=o,exports.default=g,exports.error=i,exports.hidden=e,exports.icon=l,exports.informative=_,exports.neutral=r,exports.success=A,exports.title=n,exports.warning=s;
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.AlertItem_sr-only_pZ2y9{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.AlertItem_hidden_pZ2y9{display:none}.AlertItem_slide-in_pZ2y9{animation:AlertItem_slide-in_pZ2y9 .5s forwards}@media(prefers-reduced-motion:reduce){.AlertItem_slide-in_pZ2y9{animation-duration:.1ms}}.AlertItem_slide-out_pZ2y9{animation:AlertItem_slide-out_pZ2y9 .5s forwards}@media(prefers-reduced-motion:reduce){.AlertItem_slide-out_pZ2y9{animation-duration:.1ms}}@keyframes AlertItem_slide-in_pZ2y9{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes AlertItem_slide-out_pZ2y9{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.AlertItem_alert_pZ2y9{padding:1rem .875rem;border-radius:var(--alert-border-radius);display:flex;gap:.5rem;align-items:center;width:100%;box-sizing:border-box;flex-grow:0;pointer-events:auto}.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9{background-color:var(--alert-neutral-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9.AlertItem_emph-low_pZ2y9{color:unset}.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9.AlertItem_emph-medium_pZ2y9{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-neutral-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9.AlertItem_emph-high_pZ2y9{background-color:var(--alert-neutral-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_content_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_title_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_close-btn_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_icon_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_action-button_pZ2y9{color:var(--alert-text-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9{background-color:var(--alert-info-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9.AlertItem_emph-low_pZ2y9{color:unset}.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9.AlertItem_emph-medium_pZ2y9{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-info-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9.AlertItem_emph-high_pZ2y9{background-color:var(--alert-info-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_content_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_title_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_close-btn_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_icon_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_action-button_pZ2y9{color:var(--alert-text-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9{background-color:var(--alert-success-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-low_pZ2y9 .AlertItem_icon_pZ2y9{color:var(--alert-success-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-medium_pZ2y9{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-success-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-medium_pZ2y9 .AlertItem_icon_pZ2y9{color:var(--alert-success-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-high_pZ2y9{background-color:var(--alert-success-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_content_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_title_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_close-btn_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_icon_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_action-button_pZ2y9{color:var(--alert-text-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9{background-color:var(--alert-warning-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-low_pZ2y9 .AlertItem_icon_pZ2y9{color:var(--alert-warning-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-medium_pZ2y9{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-warning-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-medium_pZ2y9 .AlertItem_icon_pZ2y9{color:var(--alert-warning-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-high_pZ2y9{background-color:var(--alert-warning-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_content_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_title_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_close-btn_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_icon_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_action-button_pZ2y9{color:var(--alert-text-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9{background-color:var(--alert-error-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-low_pZ2y9 .AlertItem_icon_pZ2y9{color:var(--alert-error-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-medium_pZ2y9{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-error-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-medium_pZ2y9 .AlertItem_icon_pZ2y9{color:var(--alert-error-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-high_pZ2y9{background-color:var(--alert-error-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_content_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_title_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_close-btn_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_icon_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_action-button_pZ2y9{color:var(--alert-text-inverted-color)}.AlertItem_alert_pZ2y9+.AlertItem_alert_pZ2y9{margin-top:.5rem}.AlertItem_alert_pZ2y9 .AlertItem_close-btn_pZ2y9{color:var(--alert-text-color);align-self:center;width:2.5rem;height:2.5rem;margin:-.5rem 0;flex-shrink:0;border:0}.AlertItem_alert_pZ2y9 .AlertItem_close-btn_pZ2y9 span{font-size:var(--alert-font-size)}.AlertItem_alert_pZ2y9 .AlertItem_close-btn_pZ2y9:not(:disabled):hover,.AlertItem_alert_pZ2y9 .AlertItem_close-btn_pZ2y9:not(:disabled):focus{background-color:var(--color-black10)}.AlertItem_alert_pZ2y9 .AlertItem_close-btn_pZ2y9:not(:disabled):active{background-color:var(--color-black20)}.AlertItem_alert_pZ2y9 .AlertItem_icon_pZ2y9{color:var(--alert-text-color);font-size:var(--font-size);height:var(--font-size-big);display:inline-flex;align-items:center;align-self:flex-start}.AlertItem_alert_pZ2y9 .AlertItem_title_pZ2y9{color:var(--alert-text-color);flex:1;font-size:var(--alert-font-size);line-height:1.43;margin-bottom:.25rem;display:block}.AlertItem_alert_pZ2y9 .AlertItem_outer-content-wrapper_pZ2y9{display:flex;gap:.5rem;flex-grow:1}.AlertItem_alert_pZ2y9 .AlertItem_content-wrapper_pZ2y9{flex-grow:1;padding-left:.125rem}.AlertItem_alert_pZ2y9 .AlertItem_content_pZ2y9{color:var(--alert-text-color);font-size:var(--alert-font-size);line-height:1.43;margin-bottom:0;word-break:break-word}.AlertItem_alert_pZ2y9 .AlertItem_actions_pZ2y9{text-align:right;align-self:center}.AlertItem_alert_pZ2y9 .AlertItem_action-button_pZ2y9{border-width:var(--button-border-width);border-style:var(--button-border-style);border-radius:var(--button-border-radius);white-space:nowrap;font-size:var(--alert-font-size);line-height:1;font-weight:400;margin:-.5rem 0;padding:.625rem 1.25rem;cursor:pointer;transition:color,background-color,border-color .2s ease-in-out;font-family:var(--font-family);color:var(--alert-text-color);background-color:transparent;border-color:transparent}.AlertItem_alert_pZ2y9 .AlertItem_action-button_pZ2y9:disabled{color:var(--greyed-out);cursor:not-allowed}.AlertItem_alert_pZ2y9 .AlertItem_action-button_pZ2y9:focus-visible{outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:calc(.125 * var(--font-size));border-radius:var(--focus-border-radius)}.AlertItem_alert_pZ2y9 .AlertItem_action-button_pZ2y9:not(:disabled):hover,.AlertItem_alert_pZ2y9 .AlertItem_action-button_pZ2y9:not(:disabled):focus{background-color:var(--color-black10)}.AlertItem_alert_pZ2y9 .AlertItem_action-button_pZ2y9:not(:disabled):active{background-color:var(--color-black20)}@media only screen and (min-width:37.5em){.AlertItem_alert_pZ2y9{width:min-content;min-width:25rem}}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="AlertItem_hidden_pZ2y9",t="AlertItem_alert_pZ2y9",r="AlertItem_neutral_pZ2y9",o="AlertItem_content_pZ2y9",p="AlertItem_title_pZ2y9",n="AlertItem_icon_pZ2y9",l="AlertItem_informative_pZ2y9",_="AlertItem_success_pZ2y9",s="AlertItem_warning_pZ2y9",i="AlertItem_error_pZ2y9",m="AlertItem_actions_pZ2y9",c={"sr-only":"AlertItem_sr-only_pZ2y9",hidden:e,"slide-in":"AlertItem_slide-in_pZ2y9","slide-out":"AlertItem_slide-out_pZ2y9",alert:t,neutral:r,"emph-low":"AlertItem_emph-low_pZ2y9","emph-medium":"AlertItem_emph-medium_pZ2y9","emph-high":"AlertItem_emph-high_pZ2y9",content:o,title:p,"close-btn":"AlertItem_close-btn_pZ2y9",icon:n,"action-button":"AlertItem_action-button_pZ2y9",informative:l,success:_,warning:s,error:i,"outer-content-wrapper":"AlertItem_outer-content-wrapper_pZ2y9","content-wrapper":"AlertItem_content-wrapper_pZ2y9",actions:m};exports.actions=m,exports.alert=t,exports.content=o,exports.default=c,exports.error=i,exports.hidden=e,exports.icon=n,exports.informative=l,exports.neutral=r,exports.success=_,exports.title=p,exports.warning=s;
3
3
  //# sourceMappingURL=AlertItem.module.scss.cjs.js.map
@@ -1,36 +1,36 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var r=document.createElement("style");r.appendChild(document.createTextNode('.AlertItem_sr-only_gLrTA{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.AlertItem_hidden_gLrTA{display:none}.AlertItem_slide-in_gLrTA{animation:AlertItem_slide-in_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.AlertItem_slide-in_gLrTA{animation-duration:.1ms}}.AlertItem_slide-out_gLrTA{animation:AlertItem_slide-out_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.AlertItem_slide-out_gLrTA{animation-duration:.1ms}}@keyframes AlertItem_slide-in_gLrTA{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes AlertItem_slide-out_gLrTA{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.AlertItem_alert_gLrTA{padding:1rem .875rem;border-radius:var(--alert-border-radius);display:flex;gap:.5rem;align-items:center;width:100%;box-sizing:border-box;flex-grow:0;pointer-events:auto}.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA{background-color:var(--alert-neutral-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA.AlertItem_emph-low_gLrTA{color:unset}.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA.AlertItem_emph-medium_gLrTA{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-neutral-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA.AlertItem_emph-high_gLrTA{background-color:var(--alert-neutral-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_content_gLrTA,.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_title_gLrTA,.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_close-btn_gLrTA,.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_icon_gLrTA,.AlertItem_alert_gLrTA.AlertItem_neutral_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_action-button_gLrTA{color:var(--alert-text-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA{background-color:var(--alert-info-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA.AlertItem_emph-low_gLrTA{color:unset}.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA.AlertItem_emph-medium_gLrTA{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-info-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA.AlertItem_emph-high_gLrTA{background-color:var(--alert-info-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_content_gLrTA,.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_title_gLrTA,.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_close-btn_gLrTA,.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_icon_gLrTA,.AlertItem_alert_gLrTA.AlertItem_informative_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_action-button_gLrTA{color:var(--alert-text-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_success_gLrTA{background-color:var(--alert-success-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-low_gLrTA .AlertItem_icon_gLrTA{color:var(--alert-success-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-medium_gLrTA{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-success-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-medium_gLrTA .AlertItem_icon_gLrTA{color:var(--alert-success-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-high_gLrTA{background-color:var(--alert-success-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_content_gLrTA,.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_title_gLrTA,.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_close-btn_gLrTA,.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_icon_gLrTA,.AlertItem_alert_gLrTA.AlertItem_success_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_action-button_gLrTA{color:var(--alert-text-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA{background-color:var(--alert-warning-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-low_gLrTA .AlertItem_icon_gLrTA{color:var(--alert-warning-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-medium_gLrTA{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-warning-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-medium_gLrTA .AlertItem_icon_gLrTA{color:var(--alert-warning-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-high_gLrTA{background-color:var(--alert-warning-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_content_gLrTA,.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_title_gLrTA,.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_close-btn_gLrTA,.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_icon_gLrTA,.AlertItem_alert_gLrTA.AlertItem_warning_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_action-button_gLrTA{color:var(--alert-text-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_error_gLrTA{background-color:var(--alert-error-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-low_gLrTA .AlertItem_icon_gLrTA{color:var(--alert-error-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-medium_gLrTA{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-error-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-medium_gLrTA .AlertItem_icon_gLrTA{color:var(--alert-error-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-high_gLrTA{background-color:var(--alert-error-inverted-color)}.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_content_gLrTA,.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_title_gLrTA,.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_close-btn_gLrTA,.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_icon_gLrTA,.AlertItem_alert_gLrTA.AlertItem_error_gLrTA.AlertItem_emph-high_gLrTA .AlertItem_action-button_gLrTA{color:var(--alert-text-inverted-color)}.AlertItem_alert_gLrTA+.AlertItem_alert_gLrTA{margin-top:.5rem}.AlertItem_alert_gLrTA .AlertItem_close-btn_gLrTA{color:var(--alert-text-color);align-self:center;width:2.5rem;height:2.5rem;margin:-.5rem 0;flex-shrink:0;border:0}.AlertItem_alert_gLrTA .AlertItem_close-btn_gLrTA span{font-size:var(--alert-font-size)}.AlertItem_alert_gLrTA .AlertItem_close-btn_gLrTA:not(:disabled):hover,.AlertItem_alert_gLrTA .AlertItem_close-btn_gLrTA:not(:disabled):focus{background-color:var(--color-black10)}.AlertItem_alert_gLrTA .AlertItem_close-btn_gLrTA:not(:disabled):active{background-color:var(--color-black20)}.AlertItem_alert_gLrTA .AlertItem_icon_gLrTA{color:var(--alert-text-color);font-size:var(--font-size);height:var(--font-size-big);display:inline-flex;align-items:center;align-self:flex-start}.AlertItem_alert_gLrTA .AlertItem_title_gLrTA{color:var(--alert-text-color);flex:1;font-size:var(--alert-font-size);line-height:1.43;margin-bottom:.25rem;display:block}.AlertItem_alert_gLrTA .AlertItem_outer-content-wrapper_gLrTA{display:flex;gap:.5rem;flex-grow:1}.AlertItem_alert_gLrTA .AlertItem_content-wrapper_gLrTA{flex-grow:1;padding-left:.125rem}.AlertItem_alert_gLrTA .AlertItem_content_gLrTA{color:var(--alert-text-color);font-size:var(--alert-font-size);line-height:1.43;margin-bottom:0;word-break:break-word}.AlertItem_alert_gLrTA .AlertItem_actions_gLrTA{text-align:right;align-self:center}.AlertItem_alert_gLrTA .AlertItem_action-button_gLrTA{border-width:var(--button-border-width);border-style:var(--button-border-style);border-radius:var(--button-border-radius);white-space:nowrap;font-size:var(--alert-font-size);line-height:1;font-weight:400;margin:-.5rem 0;padding:.625rem 1.25rem;cursor:pointer;transition:color,background-color,border-color .2s ease-in-out;font-family:var(--font-family);color:var(--alert-text-color);background-color:transparent;border-color:transparent}.AlertItem_alert_gLrTA .AlertItem_action-button_gLrTA:disabled{color:var(--greyed-out);cursor:not-allowed}.AlertItem_alert_gLrTA .AlertItem_action-button_gLrTA:focus-visible{outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:calc(.125 * var(--font-size));border-radius:var(--focus-border-radius)}.AlertItem_alert_gLrTA .AlertItem_action-button_gLrTA:not(:disabled):hover,.AlertItem_alert_gLrTA .AlertItem_action-button_gLrTA:not(:disabled):focus{background-color:var(--color-black10)}.AlertItem_alert_gLrTA .AlertItem_action-button_gLrTA:not(:disabled):active{background-color:var(--color-black20)}@media only screen and (min-width:37.5em){.AlertItem_alert_gLrTA{width:min-content;min-width:25rem}}')),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
2
- const hidden = "AlertItem_hidden_gLrTA";
3
- const alert = "AlertItem_alert_gLrTA";
4
- const neutral = "AlertItem_neutral_gLrTA";
5
- const content = "AlertItem_content_gLrTA";
6
- const title = "AlertItem_title_gLrTA";
7
- const icon = "AlertItem_icon_gLrTA";
8
- const informative = "AlertItem_informative_gLrTA";
9
- const success = "AlertItem_success_gLrTA";
10
- const warning = "AlertItem_warning_gLrTA";
11
- const error = "AlertItem_error_gLrTA";
12
- const actions = "AlertItem_actions_gLrTA";
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.AlertItem_sr-only_pZ2y9{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.AlertItem_hidden_pZ2y9{display:none}.AlertItem_slide-in_pZ2y9{animation:AlertItem_slide-in_pZ2y9 .5s forwards}@media(prefers-reduced-motion:reduce){.AlertItem_slide-in_pZ2y9{animation-duration:.1ms}}.AlertItem_slide-out_pZ2y9{animation:AlertItem_slide-out_pZ2y9 .5s forwards}@media(prefers-reduced-motion:reduce){.AlertItem_slide-out_pZ2y9{animation-duration:.1ms}}@keyframes AlertItem_slide-in_pZ2y9{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes AlertItem_slide-out_pZ2y9{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.AlertItem_alert_pZ2y9{padding:1rem .875rem;border-radius:var(--alert-border-radius);display:flex;gap:.5rem;align-items:center;width:100%;box-sizing:border-box;flex-grow:0;pointer-events:auto}.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9{background-color:var(--alert-neutral-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9.AlertItem_emph-low_pZ2y9{color:unset}.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9.AlertItem_emph-medium_pZ2y9{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-neutral-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9.AlertItem_emph-high_pZ2y9{background-color:var(--alert-neutral-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_content_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_title_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_close-btn_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_icon_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_neutral_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_action-button_pZ2y9{color:var(--alert-text-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9{background-color:var(--alert-info-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9.AlertItem_emph-low_pZ2y9{color:unset}.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9.AlertItem_emph-medium_pZ2y9{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-info-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9.AlertItem_emph-high_pZ2y9{background-color:var(--alert-info-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_content_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_title_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_close-btn_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_icon_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_informative_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_action-button_pZ2y9{color:var(--alert-text-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9{background-color:var(--alert-success-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-low_pZ2y9 .AlertItem_icon_pZ2y9{color:var(--alert-success-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-medium_pZ2y9{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-success-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-medium_pZ2y9 .AlertItem_icon_pZ2y9{color:var(--alert-success-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-high_pZ2y9{background-color:var(--alert-success-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_content_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_title_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_close-btn_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_icon_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_success_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_action-button_pZ2y9{color:var(--alert-text-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9{background-color:var(--alert-warning-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-low_pZ2y9 .AlertItem_icon_pZ2y9{color:var(--alert-warning-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-medium_pZ2y9{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-warning-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-medium_pZ2y9 .AlertItem_icon_pZ2y9{color:var(--alert-warning-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-high_pZ2y9{background-color:var(--alert-warning-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_content_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_title_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_close-btn_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_icon_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_warning_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_action-button_pZ2y9{color:var(--alert-text-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9{background-color:var(--alert-error-background-color);border-radius:var(--alert-border-radius)}.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-low_pZ2y9 .AlertItem_icon_pZ2y9{color:var(--alert-error-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-medium_pZ2y9{border-style:none none none solid;border-width:var(--alert-border-width);border-color:var(--alert-error-inverted-color);padding-left:calc(1 * var(--font-size) - var(--alert-border-width))}.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-medium_pZ2y9 .AlertItem_icon_pZ2y9{color:var(--alert-error-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-high_pZ2y9{background-color:var(--alert-error-inverted-color)}.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_content_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_title_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_close-btn_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_icon_pZ2y9,.AlertItem_alert_pZ2y9.AlertItem_error_pZ2y9.AlertItem_emph-high_pZ2y9 .AlertItem_action-button_pZ2y9{color:var(--alert-text-inverted-color)}.AlertItem_alert_pZ2y9+.AlertItem_alert_pZ2y9{margin-top:.5rem}.AlertItem_alert_pZ2y9 .AlertItem_close-btn_pZ2y9{color:var(--alert-text-color);align-self:center;width:2.5rem;height:2.5rem;margin:-.5rem 0;flex-shrink:0;border:0}.AlertItem_alert_pZ2y9 .AlertItem_close-btn_pZ2y9 span{font-size:var(--alert-font-size)}.AlertItem_alert_pZ2y9 .AlertItem_close-btn_pZ2y9:not(:disabled):hover,.AlertItem_alert_pZ2y9 .AlertItem_close-btn_pZ2y9:not(:disabled):focus{background-color:var(--color-black10)}.AlertItem_alert_pZ2y9 .AlertItem_close-btn_pZ2y9:not(:disabled):active{background-color:var(--color-black20)}.AlertItem_alert_pZ2y9 .AlertItem_icon_pZ2y9{color:var(--alert-text-color);font-size:var(--font-size);height:var(--font-size-big);display:inline-flex;align-items:center;align-self:flex-start}.AlertItem_alert_pZ2y9 .AlertItem_title_pZ2y9{color:var(--alert-text-color);flex:1;font-size:var(--alert-font-size);line-height:1.43;margin-bottom:.25rem;display:block}.AlertItem_alert_pZ2y9 .AlertItem_outer-content-wrapper_pZ2y9{display:flex;gap:.5rem;flex-grow:1}.AlertItem_alert_pZ2y9 .AlertItem_content-wrapper_pZ2y9{flex-grow:1;padding-left:.125rem}.AlertItem_alert_pZ2y9 .AlertItem_content_pZ2y9{color:var(--alert-text-color);font-size:var(--alert-font-size);line-height:1.43;margin-bottom:0;word-break:break-word}.AlertItem_alert_pZ2y9 .AlertItem_actions_pZ2y9{text-align:right;align-self:center}.AlertItem_alert_pZ2y9 .AlertItem_action-button_pZ2y9{border-width:var(--button-border-width);border-style:var(--button-border-style);border-radius:var(--button-border-radius);white-space:nowrap;font-size:var(--alert-font-size);line-height:1;font-weight:400;margin:-.5rem 0;padding:.625rem 1.25rem;cursor:pointer;transition:color,background-color,border-color .2s ease-in-out;font-family:var(--font-family);color:var(--alert-text-color);background-color:transparent;border-color:transparent}.AlertItem_alert_pZ2y9 .AlertItem_action-button_pZ2y9:disabled{color:var(--greyed-out);cursor:not-allowed}.AlertItem_alert_pZ2y9 .AlertItem_action-button_pZ2y9:focus-visible{outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:calc(.125 * var(--font-size));border-radius:var(--focus-border-radius)}.AlertItem_alert_pZ2y9 .AlertItem_action-button_pZ2y9:not(:disabled):hover,.AlertItem_alert_pZ2y9 .AlertItem_action-button_pZ2y9:not(:disabled):focus{background-color:var(--color-black10)}.AlertItem_alert_pZ2y9 .AlertItem_action-button_pZ2y9:not(:disabled):active{background-color:var(--color-black20)}@media only screen and (min-width:37.5em){.AlertItem_alert_pZ2y9{width:min-content;min-width:25rem}}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
2
+ const hidden = "AlertItem_hidden_pZ2y9";
3
+ const alert = "AlertItem_alert_pZ2y9";
4
+ const neutral = "AlertItem_neutral_pZ2y9";
5
+ const content = "AlertItem_content_pZ2y9";
6
+ const title = "AlertItem_title_pZ2y9";
7
+ const icon = "AlertItem_icon_pZ2y9";
8
+ const informative = "AlertItem_informative_pZ2y9";
9
+ const success = "AlertItem_success_pZ2y9";
10
+ const warning = "AlertItem_warning_pZ2y9";
11
+ const error = "AlertItem_error_pZ2y9";
12
+ const actions = "AlertItem_actions_pZ2y9";
13
13
  const classes = {
14
- "sr-only": "AlertItem_sr-only_gLrTA",
14
+ "sr-only": "AlertItem_sr-only_pZ2y9",
15
15
  hidden,
16
- "slide-in": "AlertItem_slide-in_gLrTA",
17
- "slide-out": "AlertItem_slide-out_gLrTA",
16
+ "slide-in": "AlertItem_slide-in_pZ2y9",
17
+ "slide-out": "AlertItem_slide-out_pZ2y9",
18
18
  alert,
19
19
  neutral,
20
- "emph-low": "AlertItem_emph-low_gLrTA",
21
- "emph-medium": "AlertItem_emph-medium_gLrTA",
22
- "emph-high": "AlertItem_emph-high_gLrTA",
20
+ "emph-low": "AlertItem_emph-low_pZ2y9",
21
+ "emph-medium": "AlertItem_emph-medium_pZ2y9",
22
+ "emph-high": "AlertItem_emph-high_pZ2y9",
23
23
  content,
24
24
  title,
25
- "close-btn": "AlertItem_close-btn_gLrTA",
25
+ "close-btn": "AlertItem_close-btn_pZ2y9",
26
26
  icon,
27
- "action-button": "AlertItem_action-button_gLrTA",
27
+ "action-button": "AlertItem_action-button_pZ2y9",
28
28
  informative,
29
29
  success,
30
30
  warning,
31
31
  error,
32
- "outer-content-wrapper": "AlertItem_outer-content-wrapper_gLrTA",
33
- "content-wrapper": "AlertItem_content-wrapper_gLrTA",
32
+ "outer-content-wrapper": "AlertItem_outer-content-wrapper_pZ2y9",
33
+ "content-wrapper": "AlertItem_content-wrapper_pZ2y9",
34
34
  actions
35
35
  };
36
36
  export {
@@ -1,3 +1,3 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var n=document.createElement("style");n.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.Banner_banner_gLrTA{padding:1rem 1.25rem;background-color:var(--light);display:flex;border-width:0 0 0 var(--banner-border-width);border-style:solid;flex-grow:0;border-radius:var(--banner-border-radius)}.Banner_banner_gLrTA .Banner_container_gLrTA{display:block;margin-left:1rem;flex:1;color:var(--default)}.Banner_banner_gLrTA .Banner_headline_gLrTA{margin-bottom:.25rem}.Banner_banner_gLrTA .Banner_content_gLrTA{margin-bottom:0}.Banner_banner_gLrTA .Banner_icon_gLrTA{margin-top:.1rem;font-size:var(--font-size-big);line-height:var(--default-line-height)}.Banner_banner_gLrTA.Banner_info_gLrTA{border-color:var(--info)}.Banner_banner_gLrTA.Banner_info_gLrTA .Banner_icon_gLrTA,.Banner_banner_gLrTA.Banner_info_gLrTA .Banner_headline_gLrTA{color:var(--info)}.Banner_banner_gLrTA.Banner_warning_gLrTA{border-color:var(--warning)}.Banner_banner_gLrTA.Banner_warning_gLrTA .Banner_icon_gLrTA,.Banner_banner_gLrTA.Banner_warning_gLrTA .Banner_headline_gLrTA{color:var(--warning)}.Banner_banner_gLrTA.Banner_error_gLrTA{border-color:var(--error)}.Banner_banner_gLrTA.Banner_error_gLrTA .Banner_icon_gLrTA,.Banner_banner_gLrTA.Banner_error_gLrTA .Banner_headline_gLrTA{color:var(--error)}')),document.head.appendChild(n)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}}();
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n="Banner_banner_gLrTA",e="Banner_container_gLrTA",r="Banner_headline_gLrTA",o="Banner_content_gLrTA",t="Banner_icon_gLrTA",a="Banner_info_gLrTA",i="Banner_warning_gLrTA",_="Banner_error_gLrTA",s={banner:n,container:e,headline:r,content:o,icon:t,info:a,warning:i,error:_};exports.banner=n,exports.container=e,exports.content=o,exports.default=s,exports.error=_,exports.headline=r,exports.icon=t,exports.info=a,exports.warning=i;
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var n=document.createElement("style");n.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.Banner_banner_pZ2y9{padding:1rem 1.25rem;background-color:var(--light);display:flex;border-width:0 0 0 var(--banner-border-width);border-style:solid;flex-grow:0;border-radius:var(--banner-border-radius)}.Banner_banner_pZ2y9 .Banner_container_pZ2y9{display:block;margin-left:1rem;flex:1;color:var(--default)}.Banner_banner_pZ2y9 .Banner_headline_pZ2y9{margin-bottom:.25rem}.Banner_banner_pZ2y9 .Banner_content_pZ2y9{margin-bottom:0}.Banner_banner_pZ2y9 .Banner_icon_pZ2y9{margin-top:.1rem;font-size:var(--font-size-big);line-height:var(--default-line-height)}.Banner_banner_pZ2y9.Banner_info_pZ2y9{border-color:var(--info)}.Banner_banner_pZ2y9.Banner_info_pZ2y9 .Banner_icon_pZ2y9,.Banner_banner_pZ2y9.Banner_info_pZ2y9 .Banner_headline_pZ2y9{color:var(--info)}.Banner_banner_pZ2y9.Banner_warning_pZ2y9{border-color:var(--warning)}.Banner_banner_pZ2y9.Banner_warning_pZ2y9 .Banner_icon_pZ2y9,.Banner_banner_pZ2y9.Banner_warning_pZ2y9 .Banner_headline_pZ2y9{color:var(--warning)}.Banner_banner_pZ2y9.Banner_error_pZ2y9{border-color:var(--error)}.Banner_banner_pZ2y9.Banner_error_pZ2y9 .Banner_icon_pZ2y9,.Banner_banner_pZ2y9.Banner_error_pZ2y9 .Banner_headline_pZ2y9{color:var(--error)}')),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n="Banner_banner_pZ2y9",e="Banner_container_pZ2y9",r="Banner_headline_pZ2y9",o="Banner_content_pZ2y9",t="Banner_icon_pZ2y9",a="Banner_info_pZ2y9",i="Banner_warning_pZ2y9",p="Banner_error_pZ2y9",_={banner:n,container:e,headline:r,content:o,icon:t,info:a,warning:i,error:p};exports.banner=n,exports.container=e,exports.content=o,exports.default=_,exports.error=p,exports.headline=r,exports.icon=t,exports.info=a,exports.warning=i;
3
3
  //# sourceMappingURL=Banner.module.scss.cjs.js.map
@@ -1,12 +1,12 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var n=document.createElement("style");n.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.Banner_banner_gLrTA{padding:1rem 1.25rem;background-color:var(--light);display:flex;border-width:0 0 0 var(--banner-border-width);border-style:solid;flex-grow:0;border-radius:var(--banner-border-radius)}.Banner_banner_gLrTA .Banner_container_gLrTA{display:block;margin-left:1rem;flex:1;color:var(--default)}.Banner_banner_gLrTA .Banner_headline_gLrTA{margin-bottom:.25rem}.Banner_banner_gLrTA .Banner_content_gLrTA{margin-bottom:0}.Banner_banner_gLrTA .Banner_icon_gLrTA{margin-top:.1rem;font-size:var(--font-size-big);line-height:var(--default-line-height)}.Banner_banner_gLrTA.Banner_info_gLrTA{border-color:var(--info)}.Banner_banner_gLrTA.Banner_info_gLrTA .Banner_icon_gLrTA,.Banner_banner_gLrTA.Banner_info_gLrTA .Banner_headline_gLrTA{color:var(--info)}.Banner_banner_gLrTA.Banner_warning_gLrTA{border-color:var(--warning)}.Banner_banner_gLrTA.Banner_warning_gLrTA .Banner_icon_gLrTA,.Banner_banner_gLrTA.Banner_warning_gLrTA .Banner_headline_gLrTA{color:var(--warning)}.Banner_banner_gLrTA.Banner_error_gLrTA{border-color:var(--error)}.Banner_banner_gLrTA.Banner_error_gLrTA .Banner_icon_gLrTA,.Banner_banner_gLrTA.Banner_error_gLrTA .Banner_headline_gLrTA{color:var(--error)}')),document.head.appendChild(n)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}}();
2
- const banner = "Banner_banner_gLrTA";
3
- const container = "Banner_container_gLrTA";
4
- const headline = "Banner_headline_gLrTA";
5
- const content = "Banner_content_gLrTA";
6
- const icon = "Banner_icon_gLrTA";
7
- const info = "Banner_info_gLrTA";
8
- const warning = "Banner_warning_gLrTA";
9
- const error = "Banner_error_gLrTA";
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var n=document.createElement("style");n.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.Banner_banner_pZ2y9{padding:1rem 1.25rem;background-color:var(--light);display:flex;border-width:0 0 0 var(--banner-border-width);border-style:solid;flex-grow:0;border-radius:var(--banner-border-radius)}.Banner_banner_pZ2y9 .Banner_container_pZ2y9{display:block;margin-left:1rem;flex:1;color:var(--default)}.Banner_banner_pZ2y9 .Banner_headline_pZ2y9{margin-bottom:.25rem}.Banner_banner_pZ2y9 .Banner_content_pZ2y9{margin-bottom:0}.Banner_banner_pZ2y9 .Banner_icon_pZ2y9{margin-top:.1rem;font-size:var(--font-size-big);line-height:var(--default-line-height)}.Banner_banner_pZ2y9.Banner_info_pZ2y9{border-color:var(--info)}.Banner_banner_pZ2y9.Banner_info_pZ2y9 .Banner_icon_pZ2y9,.Banner_banner_pZ2y9.Banner_info_pZ2y9 .Banner_headline_pZ2y9{color:var(--info)}.Banner_banner_pZ2y9.Banner_warning_pZ2y9{border-color:var(--warning)}.Banner_banner_pZ2y9.Banner_warning_pZ2y9 .Banner_icon_pZ2y9,.Banner_banner_pZ2y9.Banner_warning_pZ2y9 .Banner_headline_pZ2y9{color:var(--warning)}.Banner_banner_pZ2y9.Banner_error_pZ2y9{border-color:var(--error)}.Banner_banner_pZ2y9.Banner_error_pZ2y9 .Banner_icon_pZ2y9,.Banner_banner_pZ2y9.Banner_error_pZ2y9 .Banner_headline_pZ2y9{color:var(--error)}')),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
2
+ const banner = "Banner_banner_pZ2y9";
3
+ const container = "Banner_container_pZ2y9";
4
+ const headline = "Banner_headline_pZ2y9";
5
+ const content = "Banner_content_pZ2y9";
6
+ const icon = "Banner_icon_pZ2y9";
7
+ const info = "Banner_info_pZ2y9";
8
+ const warning = "Banner_warning_pZ2y9";
9
+ const error = "Banner_error_pZ2y9";
10
10
  const classes = {
11
11
  banner,
12
12
  container,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),a=require("react-dom"),o=require("../../../hooks/useGetDomRoot.cjs.js"),l=require("./BaseModal.module.scss.cjs.js"),d=require("./BaseModalContext.cjs.js"),t=require("../../../hooks/useRepeatFocus.cjs.js"),s="overflow",r=a=>{e.useEffect(()=>{a?document.body.style[s]="hidden":0===document.querySelectorAll("[role=dialog][data-hidden=false]").length&&document.body.style.removeProperty(s)},[a])},n=e.forwardRef(({id:s,children:n,open:i,onClose:c,className:u="",containerProps:m,backdropProps:p,labelledby:b,describedby:f,disableEscapeKeyDown:y=!1,disableBackdrop:h=!1,disableContentAutoFocus:v=!1,hideBackdrop:E=!1,forceContainerOpen:j=!1,zIndex:x,domRoot:$,...g},k)=>{r(i);const C=e.useRef(null),N=k||e.createRef(),{root:R}=o.useGetDomRoot($,C);t.useRepeatFocus(N,i),e.useEffect(()=>{var e;i&&!v&&(null==(e=N.current)||e.focus())},[i]);const q=()=>e.Children.map(n,a=>e.isValidElement(a)?e.cloneElement(a,{onClose:a.props.onClose??c}):a);return e.createElement("div",{ref:C},a.createPortal(e.createElement("div",{...g,ref:N,id:s,className:`${l.default.modal} ${i?l.default.visible:""} ${u}`,role:"dialog","aria-modal":"true","aria-labelledby":b??d.labelId(s),"aria-describedby":f??d.descriptionId(s),"aria-hidden":!i,tabIndex:-1,"data-hidden":!i,onKeyDown:e=>{y||"Escape"!==e.key||(e.stopPropagation(),null==c||c())},style:{zIndex:x}},E?null:e.createElement("div",{...p,"aria-hidden":!0,className:`${l.default.backdrop} ${(null==p?void 0:p.className)??""}`,onClick:()=>!h&&c&&c()}),j?e.createElement("div",{...m,"aria-hidden":!i,"data-element":"dialog",hidden:!i,style:{zIndex:x&&x+1},className:`${l.default.container} ${(null==m?void 0:m.className)??""}`},q()):i&&e.createElement("div",{...m,"data-element":"dialog",style:{zIndex:x&&x+1},className:`${l.default.container} ${(null==m?void 0:m.className)??""}`},q())),R))});exports.BaseModal=n,exports.useSetBodyScroll=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),a=require("react-dom"),o=require("../../../hooks/useGetDomRoot.cjs.js"),l=require("./BaseModal.module.scss.cjs.js"),d=require("./BaseModalContext.cjs.js"),t=require("../../../hooks/useRepeatFocus.cjs.js"),s="overflow",r=a=>{e.useEffect(()=>{a?document.body.style[s]="hidden":0===document.querySelectorAll("[role=dialog][data-hidden=false]").length&&document.body.style.removeProperty(s)},[a])},n=e.forwardRef(({id:s,children:n,open:i,onClose:c,className:u="",containerProps:m,backdropProps:p,labelledby:b,describedby:f,disableEscapeKeyDown:y=!1,disableBackdrop:v=!1,disableContentAutoFocus:h=!1,hideBackdrop:E=!1,forceContainerOpen:j=!1,zIndex:x,domRoot:$,...g},k)=>{r(i);const C=e.useRef(null),N=k||e.createRef(),{root:R}=o.useGetDomRoot($,C);t.useRepeatFocus(N,i),e.useEffect(()=>{var e;i&&!h&&(null==(e=N.current)||e.focus())},[i]);const q=()=>e.Children.map(n,a=>e.isValidElement(a)?e.cloneElement(a,{onClose:a.props.onClose??c}):a);return e.createElement("div",{ref:C},a.createPortal(e.createElement("div",{...g,ref:N,id:s,className:`${l.default.modal} ${i?l.default.visible:""} ${u}`,role:"dialog","aria-modal":"true","aria-labelledby":b??d.labelId(s),"aria-describedby":f??d.descriptionId(s),"aria-hidden":!i,tabIndex:-1,"data-hidden":!i,onKeyDown:e=>{y||"Escape"!==e.key||(e.stopPropagation(),null==c||c())},style:{zIndex:x}},E?null:e.createElement("div",{...p,"aria-hidden":!0,className:`${l.default.backdrop} ${(null==p?void 0:p.className)??""}`,onClick:()=>!v&&(null==c?void 0:c())}),j?e.createElement("div",{...m,"aria-hidden":!i,"data-element":"dialog",hidden:!i,style:{zIndex:x&&x+1},className:`${l.default.container} ${(null==m?void 0:m.className)??""}`},q()):i&&e.createElement("div",{...m,"data-element":"dialog",style:{zIndex:x&&x+1},className:`${l.default.container} ${(null==m?void 0:m.className)??""}`},q())),R))});exports.BaseModal=n,exports.useSetBodyScroll=r;
2
2
  //# sourceMappingURL=BaseModal.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseModal.cjs.js","sources":["../../../../src/components/Notifications/BaseModal/BaseModal.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n ForwardRefRenderFunction,\n ComponentPropsWithRef,\n useEffect,\n useRef,\n ReactElement,\n RefObject,\n createRef\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useGetDomRoot } from \"../../../hooks/useGetDomRoot\";\nimport classes from \"./BaseModal.module.scss\";\nimport { labelId, descriptionId } from \"./BaseModalContext\";\nimport { useRepeatFocus } from \"../../../hooks/useRepeatFocus\";\n\nconst SCROLL_PROPERTY_NAME = \"overflow\";\nconst SCROLL_PROPERTY_VALUE = \"hidden\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n id: string;\n children: React.ReactNode;\n open: boolean;\n onClose?: (event?: React.MouseEvent<HTMLElement>) => unknown;\n className?: string;\n containerProps?: ComponentPropsWithRef<\"div\">;\n backdropProps?: ComponentPropsWithRef<\"div\">;\n labelledby?: string;\n describedby?: string;\n disableEscapeKeyDown?: boolean;\n disableBackdrop?: boolean;\n disableContentAutoFocus?: boolean;\n hideBackdrop?: boolean;\n forceContainerOpen?: boolean;\n zIndex?: number;\n domRoot?: HTMLElement;\n}\n\nexport const useSetBodyScroll = (open: boolean) => {\n const hideBodyScroll = () => {\n document.body.style[SCROLL_PROPERTY_NAME] = SCROLL_PROPERTY_VALUE;\n };\n\n const showBodyScroll = () => {\n const allModalsClosed =\n document.querySelectorAll(\"[role=dialog][data-hidden=false]\").length === 0;\n if (allModalsClosed) {\n document.body.style.removeProperty(SCROLL_PROPERTY_NAME);\n }\n };\n\n useEffect(() => {\n if (open) {\n hideBodyScroll();\n } else {\n showBodyScroll();\n }\n }, [open]);\n};\n\nconst BaseModalComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n id,\n children,\n open,\n onClose,\n className = \"\",\n containerProps,\n backdropProps,\n labelledby,\n describedby,\n disableEscapeKeyDown = false,\n disableBackdrop = false,\n disableContentAutoFocus = false,\n hideBackdrop = false,\n forceContainerOpen = false,\n zIndex,\n domRoot,\n ...rest\n }: Props,\n ref\n) => {\n useSetBodyScroll(open);\n const wrappingDivRef = useRef<HTMLDivElement>(null);\n const modalRef = (ref as RefObject<HTMLDivElement>) || createRef<HTMLDivElement>();\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n\n const handleEscKeyPress = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (!disableEscapeKeyDown && event.key === \"Escape\") {\n event.stopPropagation();\n onClose?.();\n }\n };\n\n useRepeatFocus(modalRef, open);\n\n useEffect(() => {\n if (open && !disableContentAutoFocus) {\n modalRef.current?.focus();\n }\n }, [open]);\n\n const handleBackdropClick = () => !disableBackdrop && onClose && onClose();\n\n const renderChildren = () =>\n React.Children.map(children, child => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child as ReactElement, {\n onClose: child.props.onClose ?? onClose\n });\n }\n return child;\n });\n\n return (\n <div ref={wrappingDivRef}>\n {createPortal(\n <div\n {...rest}\n ref={modalRef}\n id={id}\n className={`${classes[\"modal\"]} ${open ? classes[\"visible\"] : \"\"} ${className}`}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={labelledby ?? labelId(id)}\n aria-describedby={describedby ?? descriptionId(id)}\n aria-hidden={!open}\n tabIndex={-1}\n data-hidden={!open}\n onKeyDown={handleEscKeyPress}\n style={{ zIndex }}\n >\n {!hideBackdrop ? (\n <div\n {...backdropProps}\n aria-hidden={true}\n className={`${classes[\"backdrop\"]} ${backdropProps?.className ?? \"\"}`}\n onClick={handleBackdropClick}\n ></div>\n ) : null}\n {forceContainerOpen ? (\n <div\n {...containerProps}\n aria-hidden={!open}\n data-element=\"dialog\"\n hidden={!open}\n style={{ zIndex: zIndex && zIndex + 1 }}\n className={`${classes[\"container\"]} ${containerProps?.className ?? \"\"}`}\n >\n {renderChildren()}\n </div>\n ) : (\n open && (\n <div\n {...containerProps}\n data-element=\"dialog\"\n style={{ zIndex: zIndex && zIndex + 1 }}\n className={`${classes[\"container\"]} ${containerProps?.className ?? \"\"}`}\n >\n {renderChildren()}\n </div>\n )\n )}\n </div>,\n root\n )}\n </div>\n );\n};\n\nexport const BaseModal = React.forwardRef(BaseModalComponent);\n"],"names":["SCROLL_PROPERTY_NAME","useSetBodyScroll","open","useEffect","document","body","style","querySelectorAll","length","removeProperty","BaseModal","React","forwardRef","id","children","onClose","className","containerProps","backdropProps","labelledby","describedby","disableEscapeKeyDown","disableBackdrop","disableContentAutoFocus","hideBackdrop","forceContainerOpen","zIndex","domRoot","rest","ref","wrappingDivRef","useRef","modalRef","createRef","root","useGetDomRoot","useRepeatFocus","_a","current","focus","renderChildren","Children","map","child","isValidElement","cloneElement","props","createElement","createPortal","classes","role","labelId","descriptionId","tabIndex","onKeyDown","event","key","stopPropagation","onClick","hidden"],"mappings":"sTA+BMA,EAAuB,WAsBhBC,EAAoBC,IAa/BC,EAAAA,UAAU,KACJD,EAZJE,SAASC,KAAKC,MAAMN,GAvBM,SA4BiD,IAAzEI,SAASG,iBAAiB,oCAAoCC,QAE9DJ,SAASC,KAAKC,MAAMG,eAAeT,IAUpC,CAACE,KAiHOQ,EAAYC,EAAMC,WA9G6C,EAExEC,KACAC,WACAZ,OACAa,UACAC,YAAY,GACZC,iBACAC,gBACAC,aACAC,cACAC,wBAAuB,EACvBC,mBAAkB,EAClBC,2BAA0B,EAC1BC,gBAAe,EACfC,sBAAqB,EACrBC,SACAC,aACGC,GAELC,KAEA5B,EAAiBC,GACjB,MAAM4B,EAAiBC,EAAAA,OAAuB,MACxCC,EAAYH,GAAqCI,eACjDC,KAAEA,GAASC,gBAAcR,EAASG,GASxCM,EAAAA,eAAeJ,EAAU9B,GAEzBC,EAAAA,UAAU,WACJD,IAASqB,IACX,OAAAc,EAAAL,EAASM,UAATD,EAAkBE,UAEnB,CAACrC,IAEJ,MAEMsC,EAAiB,IACrB7B,EAAM8B,SAASC,IAAI5B,EAAU6B,GACvBhC,EAAMiC,eAAeD,GAChBhC,EAAMkC,aAAaF,EAAuB,CAC/C5B,QAAS4B,EAAMG,MAAM/B,SAAWA,IAG7B4B,GAGX,SACEI,cAAC,MAAA,CAAIlB,IAAKC,GACPkB,EAAAA,aACCrC,EAAAoC,cAAC,MAAA,IACKnB,EACJC,IAAKG,EACLnB,KACAG,UAAW,GAAGiC,EAAAA,QAAe,SAAK/C,EAAO+C,EAAAA,QAAiB,QAAI,MAAMjC,IACpEkC,KAAK,SACL,aAAW,OACX,kBAAiB/B,GAAcgC,EAAAA,QAAQtC,GACvC,mBAAkBO,GAAegC,EAAAA,cAAcvC,GAC/C,eAAcX,EACdmD,UAAU,EACV,eAAcnD,EACdoD,UA1CmBC,IACpBlC,GAAsC,WAAdkC,EAAMC,MACjCD,EAAME,kBACN,MAAA1C,GAAAA,MAwCIT,MAAO,CAAEoB,WAEPF,EAOE,KANFb,EAAAoC,cAAC,MAAA,IACK7B,EACJ,eAAa,EACbF,UAAW,GAAGiC,EAAAA,QAAkB,aAAK,MAAA/B,OAAA,EAAAA,EAAeF,YAAa,KACjE0C,QAnCgB,KAAOpC,GAAmBP,GAAWA,MAsCxDU,EACCd,EAAAoC,cAAC,MAAA,IACK9B,EACJ,eAAcf,EACd,eAAa,SACbyD,QAASzD,EACTI,MAAO,CAAEoB,OAAQA,GAAUA,EAAS,GACpCV,UAAW,GAAGiC,EAAAA,QAAmB,cAAK,MAAAhC,OAAA,EAAAA,EAAgBD,YAAa,MAElEwB,KAGHtC,GACES,EAAAoC,cAAC,MAAA,IACK9B,EACJ,eAAa,SACbX,MAAO,CAAEoB,OAAQA,GAAUA,EAAS,GACpCV,UAAW,GAAGiC,EAAAA,QAAmB,cAAK,MAAAhC,OAAA,EAAAA,EAAgBD,YAAa,MAElEwB,MAKTN"}
1
+ {"version":3,"file":"BaseModal.cjs.js","sources":["../../../../src/components/Notifications/BaseModal/BaseModal.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n ForwardRefRenderFunction,\n ComponentPropsWithRef,\n useEffect,\n useRef,\n RefObject,\n createRef\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useGetDomRoot } from \"../../../hooks/useGetDomRoot\";\nimport classes from \"./BaseModal.module.scss\";\nimport { labelId, descriptionId } from \"./BaseModalContext\";\nimport { useRepeatFocus } from \"../../../hooks/useRepeatFocus\";\n\nconst SCROLL_PROPERTY_NAME = \"overflow\";\nconst SCROLL_PROPERTY_VALUE = \"hidden\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n id: string;\n children: React.ReactNode;\n open: boolean;\n onClose?: (event?: React.MouseEvent<HTMLElement>) => unknown;\n className?: string;\n containerProps?: ComponentPropsWithRef<\"div\">;\n backdropProps?: ComponentPropsWithRef<\"div\">;\n labelledby?: string;\n describedby?: string;\n disableEscapeKeyDown?: boolean;\n disableBackdrop?: boolean;\n disableContentAutoFocus?: boolean;\n hideBackdrop?: boolean;\n forceContainerOpen?: boolean;\n zIndex?: number;\n domRoot?: HTMLElement;\n}\n\nexport const useSetBodyScroll = (open: boolean) => {\n const hideBodyScroll = () => {\n document.body.style[SCROLL_PROPERTY_NAME] = SCROLL_PROPERTY_VALUE;\n };\n\n const showBodyScroll = () => {\n const allModalsClosed =\n document.querySelectorAll(\"[role=dialog][data-hidden=false]\").length === 0;\n if (allModalsClosed) {\n document.body.style.removeProperty(SCROLL_PROPERTY_NAME);\n }\n };\n\n useEffect(() => {\n if (open) {\n hideBodyScroll();\n } else {\n showBodyScroll();\n }\n }, [open]);\n};\n\nconst BaseModalComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n id,\n children,\n open,\n onClose,\n className = \"\",\n containerProps,\n backdropProps,\n labelledby,\n describedby,\n disableEscapeKeyDown = false,\n disableBackdrop = false,\n disableContentAutoFocus = false,\n hideBackdrop = false,\n forceContainerOpen = false,\n zIndex,\n domRoot,\n ...rest\n }: Props,\n ref\n) => {\n useSetBodyScroll(open);\n const wrappingDivRef = useRef<HTMLDivElement>(null);\n const modalRef = (ref as RefObject<HTMLDivElement | null>) || createRef<HTMLDivElement>();\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n\n const handleEscKeyPress = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (!disableEscapeKeyDown && event.key === \"Escape\") {\n event.stopPropagation();\n onClose?.();\n }\n };\n\n useRepeatFocus(modalRef, open);\n\n useEffect(() => {\n if (open && !disableContentAutoFocus) {\n modalRef.current?.focus();\n }\n }, [open]);\n\n const handleBackdropClick = () => !disableBackdrop && onClose?.();\n\n const renderChildren = () =>\n React.Children.map(children, child => {\n if (React.isValidElement<{ onClose?: () => void }>(child)) {\n return React.cloneElement(child, {\n onClose: child.props.onClose ?? onClose\n });\n }\n return child;\n });\n\n return (\n <div ref={wrappingDivRef}>\n {createPortal(\n <div // NOSONAR S6819 S6847 - native <dialog> collides with this component's manual visibility model (aria-hidden/data-hidden/zIndex, separate backdrop div, useRepeatFocus + programmatic focus). onKeyDown is the Escape handler and relies on tabIndex={-1} plus that focus call.\n {...rest}\n ref={modalRef}\n id={id}\n className={`${classes[\"modal\"]} ${open ? classes[\"visible\"] : \"\"} ${className}`}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={labelledby ?? labelId(id)}\n aria-describedby={describedby ?? descriptionId(id)}\n aria-hidden={!open}\n tabIndex={-1}\n data-hidden={!open}\n onKeyDown={handleEscKeyPress}\n style={{ zIndex }}\n >\n {!hideBackdrop ? (\n <div\n {...backdropProps}\n aria-hidden={true}\n className={`${classes[\"backdrop\"]} ${backdropProps?.className ?? \"\"}`}\n onClick={handleBackdropClick}\n ></div>\n ) : null}\n {forceContainerOpen ? (\n <div\n {...containerProps}\n aria-hidden={!open}\n data-element=\"dialog\"\n hidden={!open}\n style={{ zIndex: zIndex && zIndex + 1 }}\n className={`${classes[\"container\"]} ${containerProps?.className ?? \"\"}`}\n >\n {renderChildren()}\n </div>\n ) : (\n open && (\n <div\n {...containerProps}\n data-element=\"dialog\"\n style={{ zIndex: zIndex && zIndex + 1 }}\n className={`${classes[\"container\"]} ${containerProps?.className ?? \"\"}`}\n >\n {renderChildren()}\n </div>\n )\n )}\n </div>,\n root\n )}\n </div>\n );\n};\n\nexport const BaseModal = React.forwardRef(BaseModalComponent);\n"],"names":["SCROLL_PROPERTY_NAME","useSetBodyScroll","open","useEffect","document","body","style","querySelectorAll","length","removeProperty","BaseModal","React","forwardRef","id","children","onClose","className","containerProps","backdropProps","labelledby","describedby","disableEscapeKeyDown","disableBackdrop","disableContentAutoFocus","hideBackdrop","forceContainerOpen","zIndex","domRoot","rest","ref","wrappingDivRef","useRef","modalRef","createRef","root","useGetDomRoot","useRepeatFocus","_a","current","focus","renderChildren","Children","map","child","isValidElement","cloneElement","props","createElement","createPortal","classes","role","labelId","descriptionId","tabIndex","onKeyDown","event","key","stopPropagation","onClick","hidden"],"mappings":"sTA8BMA,EAAuB,WAsBhBC,EAAoBC,IAa/BC,EAAAA,UAAU,KACJD,EAZJE,SAASC,KAAKC,MAAMN,GAvBM,SA4BiD,IAAzEI,SAASG,iBAAiB,oCAAoCC,QAE9DJ,SAASC,KAAKC,MAAMG,eAAeT,IAUpC,CAACE,KAiHOQ,EAAYC,EAAMC,WA9G6C,EAExEC,KACAC,WACAZ,OACAa,UACAC,YAAY,GACZC,iBACAC,gBACAC,aACAC,cACAC,wBAAuB,EACvBC,mBAAkB,EAClBC,2BAA0B,EAC1BC,gBAAe,EACfC,sBAAqB,EACrBC,SACAC,aACGC,GAELC,KAEA5B,EAAiBC,GACjB,MAAM4B,EAAiBC,EAAAA,OAAuB,MACxCC,EAAYH,GAA4CI,eACxDC,KAAEA,GAASC,gBAAcR,EAASG,GASxCM,EAAAA,eAAeJ,EAAU9B,GAEzBC,EAAAA,UAAU,WACJD,IAASqB,IACX,OAAAc,EAAAL,EAASM,UAATD,EAAkBE,UAEnB,CAACrC,IAEJ,MAEMsC,EAAiB,IACrB7B,EAAM8B,SAASC,IAAI5B,EAAU6B,GACvBhC,EAAMiC,eAAyCD,GAC1ChC,EAAMkC,aAAaF,EAAO,CAC/B5B,QAAS4B,EAAMG,MAAM/B,SAAWA,IAG7B4B,GAGX,SACEI,cAAC,MAAA,CAAIlB,IAAKC,GACPkB,EAAAA,aACCrC,EAAAoC,cAAC,MAAA,IACKnB,EACJC,IAAKG,EACLnB,KACAG,UAAW,GAAGiC,EAAAA,QAAe,SAAK/C,EAAO+C,EAAAA,QAAiB,QAAI,MAAMjC,IACpEkC,KAAK,SACL,aAAW,OACX,kBAAiB/B,GAAcgC,EAAAA,QAAQtC,GACvC,mBAAkBO,GAAegC,EAAAA,cAAcvC,GAC/C,eAAcX,EACdmD,UAAU,EACV,eAAcnD,EACdoD,UA1CmBC,IACpBlC,GAAsC,WAAdkC,EAAMC,MACjCD,EAAME,kBACN,MAAA1C,GAAAA,MAwCIT,MAAO,CAAEoB,WAEPF,EAOE,KANFb,EAAAoC,cAAC,MAAA,IACK7B,EACJ,eAAa,EACbF,UAAW,GAAGiC,EAAAA,QAAkB,aAAK,MAAA/B,OAAA,EAAAA,EAAeF,YAAa,KACjE0C,QAnCgB,KAAOpC,IAAmB,MAAAP,OAAA,EAAAA,OAsC7CU,EACCd,EAAAoC,cAAC,MAAA,IACK9B,EACJ,eAAcf,EACd,eAAa,SACbyD,QAASzD,EACTI,MAAO,CAAEoB,OAAQA,GAAUA,EAAS,GACpCV,UAAW,GAAGiC,EAAAA,QAAmB,cAAK,MAAAhC,OAAA,EAAAA,EAAgBD,YAAa,MAElEwB,KAGHtC,GACES,EAAAoC,cAAC,MAAA,IACK9B,EACJ,eAAa,SACbX,MAAO,CAAEoB,OAAQA,GAAUA,EAAS,GACpCV,UAAW,GAAGiC,EAAAA,QAAmB,cAAK,MAAAhC,OAAA,EAAAA,EAAgBD,YAAa,MAElEwB,MAKTN"}
@@ -60,7 +60,7 @@ const BaseModalComponent = ({
60
60
  (_a = modalRef.current) == null ? void 0 : _a.focus();
61
61
  }
62
62
  }, [open]);
63
- const handleBackdropClick = () => !disableBackdrop && onClose && onClose();
63
+ const handleBackdropClick = () => !disableBackdrop && (onClose == null ? void 0 : onClose());
64
64
  const renderChildren = () => React.Children.map(children, (child) => {
65
65
  if (React.isValidElement(child)) {
66
66
  return React.cloneElement(child, {
@@ -1 +1 @@
1
- {"version":3,"file":"BaseModal.es.js","sources":["../../../../src/components/Notifications/BaseModal/BaseModal.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n ForwardRefRenderFunction,\n ComponentPropsWithRef,\n useEffect,\n useRef,\n ReactElement,\n RefObject,\n createRef\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useGetDomRoot } from \"../../../hooks/useGetDomRoot\";\nimport classes from \"./BaseModal.module.scss\";\nimport { labelId, descriptionId } from \"./BaseModalContext\";\nimport { useRepeatFocus } from \"../../../hooks/useRepeatFocus\";\n\nconst SCROLL_PROPERTY_NAME = \"overflow\";\nconst SCROLL_PROPERTY_VALUE = \"hidden\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n id: string;\n children: React.ReactNode;\n open: boolean;\n onClose?: (event?: React.MouseEvent<HTMLElement>) => unknown;\n className?: string;\n containerProps?: ComponentPropsWithRef<\"div\">;\n backdropProps?: ComponentPropsWithRef<\"div\">;\n labelledby?: string;\n describedby?: string;\n disableEscapeKeyDown?: boolean;\n disableBackdrop?: boolean;\n disableContentAutoFocus?: boolean;\n hideBackdrop?: boolean;\n forceContainerOpen?: boolean;\n zIndex?: number;\n domRoot?: HTMLElement;\n}\n\nexport const useSetBodyScroll = (open: boolean) => {\n const hideBodyScroll = () => {\n document.body.style[SCROLL_PROPERTY_NAME] = SCROLL_PROPERTY_VALUE;\n };\n\n const showBodyScroll = () => {\n const allModalsClosed =\n document.querySelectorAll(\"[role=dialog][data-hidden=false]\").length === 0;\n if (allModalsClosed) {\n document.body.style.removeProperty(SCROLL_PROPERTY_NAME);\n }\n };\n\n useEffect(() => {\n if (open) {\n hideBodyScroll();\n } else {\n showBodyScroll();\n }\n }, [open]);\n};\n\nconst BaseModalComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n id,\n children,\n open,\n onClose,\n className = \"\",\n containerProps,\n backdropProps,\n labelledby,\n describedby,\n disableEscapeKeyDown = false,\n disableBackdrop = false,\n disableContentAutoFocus = false,\n hideBackdrop = false,\n forceContainerOpen = false,\n zIndex,\n domRoot,\n ...rest\n }: Props,\n ref\n) => {\n useSetBodyScroll(open);\n const wrappingDivRef = useRef<HTMLDivElement>(null);\n const modalRef = (ref as RefObject<HTMLDivElement>) || createRef<HTMLDivElement>();\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n\n const handleEscKeyPress = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (!disableEscapeKeyDown && event.key === \"Escape\") {\n event.stopPropagation();\n onClose?.();\n }\n };\n\n useRepeatFocus(modalRef, open);\n\n useEffect(() => {\n if (open && !disableContentAutoFocus) {\n modalRef.current?.focus();\n }\n }, [open]);\n\n const handleBackdropClick = () => !disableBackdrop && onClose && onClose();\n\n const renderChildren = () =>\n React.Children.map(children, child => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child as ReactElement, {\n onClose: child.props.onClose ?? onClose\n });\n }\n return child;\n });\n\n return (\n <div ref={wrappingDivRef}>\n {createPortal(\n <div\n {...rest}\n ref={modalRef}\n id={id}\n className={`${classes[\"modal\"]} ${open ? classes[\"visible\"] : \"\"} ${className}`}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={labelledby ?? labelId(id)}\n aria-describedby={describedby ?? descriptionId(id)}\n aria-hidden={!open}\n tabIndex={-1}\n data-hidden={!open}\n onKeyDown={handleEscKeyPress}\n style={{ zIndex }}\n >\n {!hideBackdrop ? (\n <div\n {...backdropProps}\n aria-hidden={true}\n className={`${classes[\"backdrop\"]} ${backdropProps?.className ?? \"\"}`}\n onClick={handleBackdropClick}\n ></div>\n ) : null}\n {forceContainerOpen ? (\n <div\n {...containerProps}\n aria-hidden={!open}\n data-element=\"dialog\"\n hidden={!open}\n style={{ zIndex: zIndex && zIndex + 1 }}\n className={`${classes[\"container\"]} ${containerProps?.className ?? \"\"}`}\n >\n {renderChildren()}\n </div>\n ) : (\n open && (\n <div\n {...containerProps}\n data-element=\"dialog\"\n style={{ zIndex: zIndex && zIndex + 1 }}\n className={`${classes[\"container\"]} ${containerProps?.className ?? \"\"}`}\n >\n {renderChildren()}\n </div>\n )\n )}\n </div>,\n root\n )}\n </div>\n );\n};\n\nexport const BaseModal = React.forwardRef(BaseModalComponent);\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"BaseModal.es.js","sources":["../../../../src/components/Notifications/BaseModal/BaseModal.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n ForwardRefRenderFunction,\n ComponentPropsWithRef,\n useEffect,\n useRef,\n RefObject,\n createRef\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useGetDomRoot } from \"../../../hooks/useGetDomRoot\";\nimport classes from \"./BaseModal.module.scss\";\nimport { labelId, descriptionId } from \"./BaseModalContext\";\nimport { useRepeatFocus } from \"../../../hooks/useRepeatFocus\";\n\nconst SCROLL_PROPERTY_NAME = \"overflow\";\nconst SCROLL_PROPERTY_VALUE = \"hidden\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n id: string;\n children: React.ReactNode;\n open: boolean;\n onClose?: (event?: React.MouseEvent<HTMLElement>) => unknown;\n className?: string;\n containerProps?: ComponentPropsWithRef<\"div\">;\n backdropProps?: ComponentPropsWithRef<\"div\">;\n labelledby?: string;\n describedby?: string;\n disableEscapeKeyDown?: boolean;\n disableBackdrop?: boolean;\n disableContentAutoFocus?: boolean;\n hideBackdrop?: boolean;\n forceContainerOpen?: boolean;\n zIndex?: number;\n domRoot?: HTMLElement;\n}\n\nexport const useSetBodyScroll = (open: boolean) => {\n const hideBodyScroll = () => {\n document.body.style[SCROLL_PROPERTY_NAME] = SCROLL_PROPERTY_VALUE;\n };\n\n const showBodyScroll = () => {\n const allModalsClosed =\n document.querySelectorAll(\"[role=dialog][data-hidden=false]\").length === 0;\n if (allModalsClosed) {\n document.body.style.removeProperty(SCROLL_PROPERTY_NAME);\n }\n };\n\n useEffect(() => {\n if (open) {\n hideBodyScroll();\n } else {\n showBodyScroll();\n }\n }, [open]);\n};\n\nconst BaseModalComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n id,\n children,\n open,\n onClose,\n className = \"\",\n containerProps,\n backdropProps,\n labelledby,\n describedby,\n disableEscapeKeyDown = false,\n disableBackdrop = false,\n disableContentAutoFocus = false,\n hideBackdrop = false,\n forceContainerOpen = false,\n zIndex,\n domRoot,\n ...rest\n }: Props,\n ref\n) => {\n useSetBodyScroll(open);\n const wrappingDivRef = useRef<HTMLDivElement>(null);\n const modalRef = (ref as RefObject<HTMLDivElement | null>) || createRef<HTMLDivElement>();\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n\n const handleEscKeyPress = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (!disableEscapeKeyDown && event.key === \"Escape\") {\n event.stopPropagation();\n onClose?.();\n }\n };\n\n useRepeatFocus(modalRef, open);\n\n useEffect(() => {\n if (open && !disableContentAutoFocus) {\n modalRef.current?.focus();\n }\n }, [open]);\n\n const handleBackdropClick = () => !disableBackdrop && onClose?.();\n\n const renderChildren = () =>\n React.Children.map(children, child => {\n if (React.isValidElement<{ onClose?: () => void }>(child)) {\n return React.cloneElement(child, {\n onClose: child.props.onClose ?? onClose\n });\n }\n return child;\n });\n\n return (\n <div ref={wrappingDivRef}>\n {createPortal(\n <div // NOSONAR S6819 S6847 - native <dialog> collides with this component's manual visibility model (aria-hidden/data-hidden/zIndex, separate backdrop div, useRepeatFocus + programmatic focus). onKeyDown is the Escape handler and relies on tabIndex={-1} plus that focus call.\n {...rest}\n ref={modalRef}\n id={id}\n className={`${classes[\"modal\"]} ${open ? classes[\"visible\"] : \"\"} ${className}`}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={labelledby ?? labelId(id)}\n aria-describedby={describedby ?? descriptionId(id)}\n aria-hidden={!open}\n tabIndex={-1}\n data-hidden={!open}\n onKeyDown={handleEscKeyPress}\n style={{ zIndex }}\n >\n {!hideBackdrop ? (\n <div\n {...backdropProps}\n aria-hidden={true}\n className={`${classes[\"backdrop\"]} ${backdropProps?.className ?? \"\"}`}\n onClick={handleBackdropClick}\n ></div>\n ) : null}\n {forceContainerOpen ? (\n <div\n {...containerProps}\n aria-hidden={!open}\n data-element=\"dialog\"\n hidden={!open}\n style={{ zIndex: zIndex && zIndex + 1 }}\n className={`${classes[\"container\"]} ${containerProps?.className ?? \"\"}`}\n >\n {renderChildren()}\n </div>\n ) : (\n open && (\n <div\n {...containerProps}\n data-element=\"dialog\"\n style={{ zIndex: zIndex && zIndex + 1 }}\n className={`${classes[\"container\"]} ${containerProps?.className ?? \"\"}`}\n >\n {renderChildren()}\n </div>\n )\n )}\n </div>,\n root\n )}\n </div>\n );\n};\n\nexport const BaseModal = React.forwardRef(BaseModalComponent);\n"],"names":[],"mappings":"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"}
@@ -1,3 +1,3 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.BaseModal_sr-only_gLrTA{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.BaseModal_hidden_gLrTA{display:none}.BaseModal_slide-in_gLrTA{animation:BaseModal_slide-in_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.BaseModal_slide-in_gLrTA{animation-duration:.1ms}}.BaseModal_slide-out_gLrTA{animation:BaseModal_slide-out_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.BaseModal_slide-out_gLrTA{animation-duration:.1ms}}@keyframes BaseModal_slide-in_gLrTA{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes BaseModal_slide-out_gLrTA{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.BaseModal_modal_gLrTA{position:fixed;z-index:10;top:0;left:0;height:100vh;width:100vw;visibility:hidden;display:flex;align-items:flex-start;justify-content:center}.BaseModal_modal_gLrTA .BaseModal_backdrop_gLrTA{content:"";position:absolute;width:100%;height:100%;left:0;top:0;background-color:transparent;opacity:0;transition-property:background-color;transition-duration:.5s;transition-timing-function:ease}.BaseModal_modal_gLrTA .BaseModal_backdrop_gLrTA{transition-property:opacity;transition-duration:.5s;transition-timing-function:ease}@media(prefers-reduced-motion:reduce){.BaseModal_modal_gLrTA .BaseModal_backdrop_gLrTA{transition-duration:.1ms}}.BaseModal_modal_gLrTA.BaseModal_visible_gLrTA{visibility:visible}.BaseModal_modal_gLrTA.BaseModal_visible_gLrTA .BaseModal_backdrop_gLrTA{background-color:var(--modal-backdrop-color);opacity:.75}.BaseModal_container_gLrTA{margin-top:3.125rem;background-color:var(--modal-background-color);z-index:11;width:calc(100% - 2rem);height:auto;max-height:calc(90% - 3.125rem);display:flex;flex-direction:column}@media only screen and (min-width:50em){.BaseModal_container_gLrTA{width:50rem;border-radius:2px;box-shadow:0 30px 50px var(--modal-shadow-color)}}')),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}}();
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="BaseModal_modal_gLrTA",o="BaseModal_backdrop_gLrTA",a="BaseModal_visible_gLrTA",r="BaseModal_container_gLrTA",s={modal:e,backdrop:o,visible:a,container:r};exports.backdrop=o,exports.container=r,exports.default=s,exports.modal=e,exports.visible=a;
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.BaseModal_sr-only_pZ2y9{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.BaseModal_hidden_pZ2y9{display:none}.BaseModal_slide-in_pZ2y9{animation:BaseModal_slide-in_pZ2y9 .5s forwards}@media(prefers-reduced-motion:reduce){.BaseModal_slide-in_pZ2y9{animation-duration:.1ms}}.BaseModal_slide-out_pZ2y9{animation:BaseModal_slide-out_pZ2y9 .5s forwards}@media(prefers-reduced-motion:reduce){.BaseModal_slide-out_pZ2y9{animation-duration:.1ms}}@keyframes BaseModal_slide-in_pZ2y9{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes BaseModal_slide-out_pZ2y9{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.BaseModal_modal_pZ2y9{position:fixed;z-index:10;top:0;left:0;height:100vh;width:100vw;visibility:hidden;display:flex;align-items:flex-start;justify-content:center}.BaseModal_modal_pZ2y9 .BaseModal_backdrop_pZ2y9{content:"";position:absolute;width:100%;height:100%;left:0;top:0;background-color:transparent;opacity:0;transition-property:background-color;transition-duration:.5s;transition-timing-function:ease}.BaseModal_modal_pZ2y9 .BaseModal_backdrop_pZ2y9{transition-property:opacity;transition-duration:.5s;transition-timing-function:ease}@media(prefers-reduced-motion:reduce){.BaseModal_modal_pZ2y9 .BaseModal_backdrop_pZ2y9{transition-duration:.1ms}}.BaseModal_modal_pZ2y9.BaseModal_visible_pZ2y9{visibility:visible}.BaseModal_modal_pZ2y9.BaseModal_visible_pZ2y9 .BaseModal_backdrop_pZ2y9{background-color:var(--modal-backdrop-color);opacity:.75}.BaseModal_container_pZ2y9{margin-top:3.125rem;background-color:var(--modal-background-color);z-index:11;width:calc(100% - 2rem);height:auto;max-height:calc(90% - 3.125rem);display:flex;flex-direction:column}@media only screen and (min-width:50em){.BaseModal_container_pZ2y9{width:50rem;border-radius:2px;box-shadow:0 30px 50px var(--modal-shadow-color)}}')),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}}();
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="BaseModal_modal_pZ2y9",o="BaseModal_backdrop_pZ2y9",a="BaseModal_visible_pZ2y9",s="BaseModal_container_pZ2y9",t={modal:e,backdrop:o,visible:a,container:s};exports.backdrop=o,exports.container=s,exports.default=t,exports.modal=e,exports.visible=a;
3
3
  //# sourceMappingURL=BaseModal.module.scss.cjs.js.map
@@ -1,8 +1,8 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.BaseModal_sr-only_gLrTA{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.BaseModal_hidden_gLrTA{display:none}.BaseModal_slide-in_gLrTA{animation:BaseModal_slide-in_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.BaseModal_slide-in_gLrTA{animation-duration:.1ms}}.BaseModal_slide-out_gLrTA{animation:BaseModal_slide-out_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.BaseModal_slide-out_gLrTA{animation-duration:.1ms}}@keyframes BaseModal_slide-in_gLrTA{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes BaseModal_slide-out_gLrTA{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.BaseModal_modal_gLrTA{position:fixed;z-index:10;top:0;left:0;height:100vh;width:100vw;visibility:hidden;display:flex;align-items:flex-start;justify-content:center}.BaseModal_modal_gLrTA .BaseModal_backdrop_gLrTA{content:"";position:absolute;width:100%;height:100%;left:0;top:0;background-color:transparent;opacity:0;transition-property:background-color;transition-duration:.5s;transition-timing-function:ease}.BaseModal_modal_gLrTA .BaseModal_backdrop_gLrTA{transition-property:opacity;transition-duration:.5s;transition-timing-function:ease}@media(prefers-reduced-motion:reduce){.BaseModal_modal_gLrTA .BaseModal_backdrop_gLrTA{transition-duration:.1ms}}.BaseModal_modal_gLrTA.BaseModal_visible_gLrTA{visibility:visible}.BaseModal_modal_gLrTA.BaseModal_visible_gLrTA .BaseModal_backdrop_gLrTA{background-color:var(--modal-backdrop-color);opacity:.75}.BaseModal_container_gLrTA{margin-top:3.125rem;background-color:var(--modal-background-color);z-index:11;width:calc(100% - 2rem);height:auto;max-height:calc(90% - 3.125rem);display:flex;flex-direction:column}@media only screen and (min-width:50em){.BaseModal_container_gLrTA{width:50rem;border-radius:2px;box-shadow:0 30px 50px var(--modal-shadow-color)}}')),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}}();
2
- const modal = "BaseModal_modal_gLrTA";
3
- const backdrop = "BaseModal_backdrop_gLrTA";
4
- const visible = "BaseModal_visible_gLrTA";
5
- const container = "BaseModal_container_gLrTA";
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.BaseModal_sr-only_pZ2y9{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.BaseModal_hidden_pZ2y9{display:none}.BaseModal_slide-in_pZ2y9{animation:BaseModal_slide-in_pZ2y9 .5s forwards}@media(prefers-reduced-motion:reduce){.BaseModal_slide-in_pZ2y9{animation-duration:.1ms}}.BaseModal_slide-out_pZ2y9{animation:BaseModal_slide-out_pZ2y9 .5s forwards}@media(prefers-reduced-motion:reduce){.BaseModal_slide-out_pZ2y9{animation-duration:.1ms}}@keyframes BaseModal_slide-in_pZ2y9{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes BaseModal_slide-out_pZ2y9{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.BaseModal_modal_pZ2y9{position:fixed;z-index:10;top:0;left:0;height:100vh;width:100vw;visibility:hidden;display:flex;align-items:flex-start;justify-content:center}.BaseModal_modal_pZ2y9 .BaseModal_backdrop_pZ2y9{content:"";position:absolute;width:100%;height:100%;left:0;top:0;background-color:transparent;opacity:0;transition-property:background-color;transition-duration:.5s;transition-timing-function:ease}.BaseModal_modal_pZ2y9 .BaseModal_backdrop_pZ2y9{transition-property:opacity;transition-duration:.5s;transition-timing-function:ease}@media(prefers-reduced-motion:reduce){.BaseModal_modal_pZ2y9 .BaseModal_backdrop_pZ2y9{transition-duration:.1ms}}.BaseModal_modal_pZ2y9.BaseModal_visible_pZ2y9{visibility:visible}.BaseModal_modal_pZ2y9.BaseModal_visible_pZ2y9 .BaseModal_backdrop_pZ2y9{background-color:var(--modal-backdrop-color);opacity:.75}.BaseModal_container_pZ2y9{margin-top:3.125rem;background-color:var(--modal-background-color);z-index:11;width:calc(100% - 2rem);height:auto;max-height:calc(90% - 3.125rem);display:flex;flex-direction:column}@media only screen and (min-width:50em){.BaseModal_container_pZ2y9{width:50rem;border-radius:2px;box-shadow:0 30px 50px var(--modal-shadow-color)}}')),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}}();
2
+ const modal = "BaseModal_modal_pZ2y9";
3
+ const backdrop = "BaseModal_backdrop_pZ2y9";
4
+ const visible = "BaseModal_visible_pZ2y9";
5
+ const container = "BaseModal_container_pZ2y9";
6
6
  const classes = {
7
7
  modal,
8
8
  backdrop,
@@ -1 +1 @@
1
- {"version":3,"file":"BaseModalActions.cjs.js","sources":["../../../../../src/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ForwardRefRenderFunction, ComponentPropsWithRef, useRef } from \"react\";\nimport classes from \"./BaseModalActions.module.scss\";\nimport { Button, Props as ButtonProps } from \"../../../Button/Button\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children?: React.ReactNode;\n onClose?: () => void;\n cancelAction?: CancelAction;\n cancelActionsClassName?: string;\n}\n\nexport interface CancelAction {\n label: string;\n cancelButtonProps?: ButtonProps;\n}\n\nconst BaseModalActionsComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n { children, cancelAction, cancelActionsClassName = \"\", onClose, className = \"\", ...rest }: Props,\n ref\n) => {\n const innerRef = (React.createRef() as React.RefObject<HTMLDivElement>) || ref;\n const cancelButtonRef = useRef<HTMLDivElement>(null);\n const primaryActionsRef = useRef<HTMLDivElement>(null);\n\n const cancelButton = (\n <Button variant=\"text\" color=\"default\" {...cancelAction?.cancelButtonProps} onClick={onClose}>\n {cancelAction?.label}\n </Button>\n );\n\n return (\n <div {...rest} ref={innerRef} className={`${classes[\"actions\"]} ${className}`}>\n {cancelAction && onClose && (\n <div\n className={`${classes[\"cancel-action\"]} ${cancelActionsClassName}`}\n ref={cancelButtonRef}\n >\n {cancelButton}\n </div>\n )}\n {children && (\n <div ref={primaryActionsRef} className={classes[\"primary-actions\"]}>\n {children}\n </div>\n )}\n </div>\n );\n};\n\nexport const BaseModalActions = React.forwardRef(BaseModalActionsComponent);\n"],"names":["BaseModalActions","React","forwardRef","children","cancelAction","cancelActionsClassName","onClose","className","rest","ref","innerRef","createRef","cancelButtonRef","useRef","primaryActionsRef","cancelButton","createElement","Button","variant","color","cancelButtonProps","onClick","label","classes"],"mappings":"uMAiEaA,EAAmBC,EAAMC,WAjC6C,EAC/EC,WAAUC,eAAcC,yBAAyB,GAAIC,UAASC,YAAY,MAAOC,GACnFC,KAEA,MAAMC,EAAYT,EAAMU,aAAmDF,EACrEG,EAAkBC,EAAAA,OAAuB,MACzCC,EAAoBD,EAAAA,OAAuB,MAE3CE,EACJd,EAAAe,cAACC,EAAAA,OAAA,CAAOC,QAAQ,OAAOC,MAAM,aAAc,MAAAf,OAAA,EAAAA,EAAcgB,kBAAmBC,QAASf,SAClFF,WAAckB,OAInB,OACErB,EAAAe,cAAC,MAAA,IAAQR,EAAMC,IAAKC,EAAUH,UAAW,GAAGgB,EAAAA,QAAiB,WAAKhB,KAC/DH,GAAgBE,GACfL,EAAAe,cAAC,MAAA,CACCT,UAAW,GAAGgB,EAAAA,QAAQ,oBAAoBlB,IAC1CI,IAAKG,GAEJG,GAGJZ,GACCF,EAAAe,cAAC,MAAA,CAAIP,IAAKK,EAAmBP,UAAWgB,EAAAA,QAAQ,oBAC7CpB"}
1
+ {"version":3,"file":"BaseModalActions.cjs.js","sources":["../../../../../src/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ForwardRefRenderFunction, ComponentPropsWithRef, useRef } from \"react\";\nimport classes from \"./BaseModalActions.module.scss\";\nimport { Button, Props as ButtonProps } from \"../../../Button/Button\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children?: React.ReactNode;\n onClose?: () => void;\n cancelAction?: CancelAction;\n cancelActionsClassName?: string;\n}\n\nexport interface CancelAction {\n label: string;\n cancelButtonProps?: ButtonProps;\n}\n\nconst BaseModalActionsComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n { children, cancelAction, cancelActionsClassName = \"\", onClose, className = \"\", ...rest }: Props,\n ref\n) => {\n const innerRef = (React.createRef() as React.RefObject<HTMLDivElement | null>) || ref;\n const cancelButtonRef = useRef<HTMLDivElement>(null);\n const primaryActionsRef = useRef<HTMLDivElement>(null);\n\n const cancelButton = (\n <Button variant=\"text\" color=\"default\" {...cancelAction?.cancelButtonProps} onClick={onClose}>\n {cancelAction?.label}\n </Button>\n );\n\n return (\n <div {...rest} ref={innerRef} className={`${classes[\"actions\"]} ${className}`}>\n {cancelAction && onClose && (\n <div\n className={`${classes[\"cancel-action\"]} ${cancelActionsClassName}`}\n ref={cancelButtonRef}\n >\n {cancelButton}\n </div>\n )}\n {children && (\n <div ref={primaryActionsRef} className={classes[\"primary-actions\"]}>\n {children}\n </div>\n )}\n </div>\n );\n};\n\nexport const BaseModalActions = React.forwardRef(BaseModalActionsComponent);\n"],"names":["BaseModalActions","React","forwardRef","children","cancelAction","cancelActionsClassName","onClose","className","rest","ref","innerRef","createRef","cancelButtonRef","useRef","primaryActionsRef","cancelButton","createElement","Button","variant","color","cancelButtonProps","onClick","label","classes"],"mappings":"uMAiEaA,EAAmBC,EAAMC,WAjC6C,EAC/EC,WAAUC,eAAcC,yBAAyB,GAAIC,UAASC,YAAY,MAAOC,GACnFC,KAEA,MAAMC,EAAYT,EAAMU,aAA0DF,EAC5EG,EAAkBC,EAAAA,OAAuB,MACzCC,EAAoBD,EAAAA,OAAuB,MAE3CE,EACJd,EAAAe,cAACC,EAAAA,OAAA,CAAOC,QAAQ,OAAOC,MAAM,aAAc,MAAAf,OAAA,EAAAA,EAAcgB,kBAAmBC,QAASf,SAClFF,WAAckB,OAInB,OACErB,EAAAe,cAAC,MAAA,IAAQR,EAAMC,IAAKC,EAAUH,UAAW,GAAGgB,EAAAA,QAAiB,WAAKhB,KAC/DH,GAAgBE,GACfL,EAAAe,cAAC,MAAA,CACCT,UAAW,GAAGgB,EAAAA,QAAQ,oBAAoBlB,IAC1CI,IAAKG,GAEJG,GAGJZ,GACCF,EAAAe,cAAC,MAAA,CAAIP,IAAKK,EAAmBP,UAAWgB,EAAAA,QAAQ,oBAC7CpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"BaseModalActions.es.js","sources":["../../../../../src/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ForwardRefRenderFunction, ComponentPropsWithRef, useRef } from \"react\";\nimport classes from \"./BaseModalActions.module.scss\";\nimport { Button, Props as ButtonProps } from \"../../../Button/Button\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children?: React.ReactNode;\n onClose?: () => void;\n cancelAction?: CancelAction;\n cancelActionsClassName?: string;\n}\n\nexport interface CancelAction {\n label: string;\n cancelButtonProps?: ButtonProps;\n}\n\nconst BaseModalActionsComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n { children, cancelAction, cancelActionsClassName = \"\", onClose, className = \"\", ...rest }: Props,\n ref\n) => {\n const innerRef = (React.createRef() as React.RefObject<HTMLDivElement>) || ref;\n const cancelButtonRef = useRef<HTMLDivElement>(null);\n const primaryActionsRef = useRef<HTMLDivElement>(null);\n\n const cancelButton = (\n <Button variant=\"text\" color=\"default\" {...cancelAction?.cancelButtonProps} onClick={onClose}>\n {cancelAction?.label}\n </Button>\n );\n\n return (\n <div {...rest} ref={innerRef} className={`${classes[\"actions\"]} ${className}`}>\n {cancelAction && onClose && (\n <div\n className={`${classes[\"cancel-action\"]} ${cancelActionsClassName}`}\n ref={cancelButtonRef}\n >\n {cancelButton}\n </div>\n )}\n {children && (\n <div ref={primaryActionsRef} className={classes[\"primary-actions\"]}>\n {children}\n </div>\n )}\n </div>\n );\n};\n\nexport const BaseModalActions = React.forwardRef(BaseModalActionsComponent);\n"],"names":[],"mappings":";;;AAgCA,MAAM,4BAA6E,CACjF,EAAE,UAAU,cAAc,yBAAyB,IAAI,SAAS,YAAY,IAAI,GAAG,KAAA,GACnF,QACG;AACH,QAAM,WAAY,MAAM,UAAA,KAAmD;AAC3E,QAAM,kBAAkB,OAAuB,IAAI;AACnD,QAAM,oBAAoB,OAAuB,IAAI;AAErD,QAAM,eACJ,sBAAA,cAAC,QAAA,EAAO,SAAQ,QAAO,OAAM,WAAW,GAAG,6CAAc,mBAAmB,SAAS,QAAA,GAClF,6CAAc,KACjB;AAGF,SACE,sBAAA,cAAC,OAAA,EAAK,GAAG,MAAM,KAAK,UAAU,WAAW,GAAG,QAAQ,SAAS,CAAC,IAAI,SAAS,GAAA,GACxE,gBAAgB,WACf,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,GAAG,QAAQ,eAAe,CAAC,IAAI,sBAAsB;AAAA,MAChE,KAAK;AAAA,IAAA;AAAA,IAEJ;AAAA,EAAA,GAGJ,YACC,sBAAA,cAAC,OAAA,EAAI,KAAK,mBAAmB,WAAW,QAAQ,iBAAiB,EAAA,GAC9D,QACH,CAEJ;AAEJ;AAEO,MAAM,mBAAmB,MAAM,WAAW,yBAAyB;"}
1
+ {"version":3,"file":"BaseModalActions.es.js","sources":["../../../../../src/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ForwardRefRenderFunction, ComponentPropsWithRef, useRef } from \"react\";\nimport classes from \"./BaseModalActions.module.scss\";\nimport { Button, Props as ButtonProps } from \"../../../Button/Button\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children?: React.ReactNode;\n onClose?: () => void;\n cancelAction?: CancelAction;\n cancelActionsClassName?: string;\n}\n\nexport interface CancelAction {\n label: string;\n cancelButtonProps?: ButtonProps;\n}\n\nconst BaseModalActionsComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n { children, cancelAction, cancelActionsClassName = \"\", onClose, className = \"\", ...rest }: Props,\n ref\n) => {\n const innerRef = (React.createRef() as React.RefObject<HTMLDivElement | null>) || ref;\n const cancelButtonRef = useRef<HTMLDivElement>(null);\n const primaryActionsRef = useRef<HTMLDivElement>(null);\n\n const cancelButton = (\n <Button variant=\"text\" color=\"default\" {...cancelAction?.cancelButtonProps} onClick={onClose}>\n {cancelAction?.label}\n </Button>\n );\n\n return (\n <div {...rest} ref={innerRef} className={`${classes[\"actions\"]} ${className}`}>\n {cancelAction && onClose && (\n <div\n className={`${classes[\"cancel-action\"]} ${cancelActionsClassName}`}\n ref={cancelButtonRef}\n >\n {cancelButton}\n </div>\n )}\n {children && (\n <div ref={primaryActionsRef} className={classes[\"primary-actions\"]}>\n {children}\n </div>\n )}\n </div>\n );\n};\n\nexport const BaseModalActions = React.forwardRef(BaseModalActionsComponent);\n"],"names":[],"mappings":";;;AAgCA,MAAM,4BAA6E,CACjF,EAAE,UAAU,cAAc,yBAAyB,IAAI,SAAS,YAAY,IAAI,GAAG,KAAA,GACnF,QACG;AACH,QAAM,WAAY,MAAM,UAAA,KAA0D;AAClF,QAAM,kBAAkB,OAAuB,IAAI;AACnD,QAAM,oBAAoB,OAAuB,IAAI;AAErD,QAAM,eACJ,sBAAA,cAAC,QAAA,EAAO,SAAQ,QAAO,OAAM,WAAW,GAAG,6CAAc,mBAAmB,SAAS,QAAA,GAClF,6CAAc,KACjB;AAGF,SACE,sBAAA,cAAC,OAAA,EAAK,GAAG,MAAM,KAAK,UAAU,WAAW,GAAG,QAAQ,SAAS,CAAC,IAAI,SAAS,GAAA,GACxE,gBAAgB,WACf,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,GAAG,QAAQ,eAAe,CAAC,IAAI,sBAAsB;AAAA,MAChE,KAAK;AAAA,IAAA;AAAA,IAEJ;AAAA,EAAA,GAGJ,YACC,sBAAA,cAAC,OAAA,EAAI,KAAK,mBAAmB,WAAW,QAAQ,iBAAiB,EAAA,GAC9D,QACH,CAEJ;AAEJ;AAEO,MAAM,mBAAmB,MAAM,WAAW,yBAAyB;"}