@onewelcome/react-lib-components 14.0.0-experiment.1 → 14.1.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 +3 -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 +109 -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 +141 -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
@@ -127,7 +127,9 @@ const LinkLeftNavItemComponent = ({ item, onItemClick, onNavigate, refItems, clo
127
127
  disabled: item.disabled,
128
128
  tabIndex
129
129
  },
130
- /* @__PURE__ */ React.createElement("div", { className: classes["menu-item-text-wrapper"] }, item.iconComponent && React.cloneElement(item.iconComponent, { className: classes["menu-item-icon"] }), /* @__PURE__ */ React.createElement("span", { className: classes["menu-item-text"] }, item.title))
130
+ /* @__PURE__ */ React.createElement("div", { className: classes["menu-item-text-wrapper"] }, item.iconComponent && React.cloneElement(item.iconComponent, {
131
+ className: classes["menu-item-icon"]
132
+ }), /* @__PURE__ */ React.createElement("span", { className: classes["menu-item-text"] }, item.title))
131
133
  ) : /* @__PURE__ */ React.createElement(
132
134
  "a",
133
135
  {
@@ -141,7 +143,9 @@ const LinkLeftNavItemComponent = ({ item, onItemClick, onNavigate, refItems, clo
141
143
  href: item.path ? internalLinkPrefix + item.path : "",
142
144
  tabIndex
143
145
  },
144
- /* @__PURE__ */ React.createElement("div", { className: classes["menu-item-text-wrapper"] }, item.iconComponent && React.cloneElement(item.iconComponent, { className: classes["menu-item-icon"] }), /* @__PURE__ */ React.createElement("span", { className: classes["menu-item-text"] }, item.title))
146
+ /* @__PURE__ */ React.createElement("div", { className: classes["menu-item-text-wrapper"] }, item.iconComponent && React.cloneElement(item.iconComponent, {
147
+ className: classes["menu-item-icon"]
148
+ }), /* @__PURE__ */ React.createElement("span", { className: classes["menu-item-text"] }, item.title))
145
149
  ));
146
150
  };
147
151
  const LinkLeftNavItem = React.forwardRef(LinkLeftNavItemComponent);
@@ -1 +1 @@
1
- {"version":3,"file":"LinkLeftNavItem.es.js","sources":["../../../../../../src/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.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, HTMLProps, MouseEvent, Ref } from \"react\";\nimport { getTabbableElements } from \"../../../../../utils/focusManagement\";\nimport classes from \"./LeftNavItem.module.scss\";\nimport { MenuItem } from \"../LeftNav.interfaces\";\nimport { Link } from \"../../../../Link/Link\";\nimport { useKeyboardNavigation } from \"./useKeyboardNavigation\";\nimport { UseRefItemsReturnType } from \"../useRefItems\";\n\nexport interface Props extends HTMLProps<HTMLElement> {\n item: MenuItem;\n navigate: (path: string) => void;\n onItemClick?: (path?: string, button?: boolean) => void;\n onNavigate?: (path: string) => void;\n refItems: UseRefItemsReturnType;\n closeParentList?: () => void;\n internalLinkPrefix?: string;\n}\n\nconst LinkLeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, Props> = (\n { item, onItemClick, onNavigate, refItems, closeParentList, navigate, internalLinkPrefix = \"\" },\n ref\n) => {\n const { onKeyPressNavigation } = useKeyboardNavigation({ refItems, item, closeParentList });\n\n const onLinkClickHandler = (event: MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n if (!item.disabled) {\n onItemClick?.(item.path);\n if (item.path) {\n const path = item.path;\n navigate(path);\n setTimeout(() => {\n if (onNavigate) {\n onNavigate(path);\n } else {\n const findMainContent = (): HTMLElement | null => {\n const semantic = document.querySelector<HTMLElement>('[role=\"main\"], main');\n if (semantic) {\n return semantic;\n }\n\n const selectors = [\n \"#content\",\n \"#main-content\",\n \"#app-content\",\n \".content\",\n \".main-content\"\n ];\n for (const sel of selectors) {\n const el = document.querySelector<HTMLElement>(sel);\n if (el) {\n return el;\n }\n }\n\n const allTabbable = getTabbableElements(document.body);\n for (const el of allTabbable) {\n if (el instanceof HTMLElement && !el.closest(\"nav\")) {\n return el.closest<HTMLElement>(\"div, section, article, main\") || el;\n }\n }\n return null;\n };\n\n let attempts = 0;\n const maxAttempts = 30;\n let userHasTakenControl = false;\n let isOurFocusChange = false;\n\n const checkUserTookControl = (e: FocusEvent) => {\n if (isOurFocusChange) {\n isOurFocusChange = false;\n return;\n }\n\n const target = e.target as HTMLElement;\n if (target && !target.closest(\"nav\")) {\n userHasTakenControl = true;\n }\n };\n\n const tryFocusContent = () => {\n if (userHasTakenControl) {\n document.removeEventListener(\"focusin\", checkUserTookControl);\n return false;\n }\n\n attempts++;\n const mainContent = findMainContent();\n if (mainContent) {\n const tabbableElements = getTabbableElements(mainContent);\n const firstTabbable = tabbableElements[0];\n\n if (firstTabbable) {\n if (!userHasTakenControl) {\n isOurFocusChange = true;\n firstTabbable.focus();\n }\n document.removeEventListener(\"focusin\", checkUserTookControl);\n return true;\n } else {\n mainContent.setAttribute(\"tabindex\", \"-1\");\n if (!userHasTakenControl) {\n isOurFocusChange = true;\n mainContent.focus();\n }\n document.removeEventListener(\"focusin\", checkUserTookControl);\n return true;\n }\n }\n if (attempts < maxAttempts) {\n setTimeout(tryFocusContent, 100);\n } else {\n document.removeEventListener(\"focusin\", checkUserTookControl);\n }\n return false;\n };\n\n setTimeout(() => {\n document.addEventListener(\"focusin\", checkUserTookControl);\n }, 100);\n\n tryFocusContent();\n }\n }, 500);\n }\n }\n };\n\n const getStylingClasses = () => {\n const menuItemLinkClasses = [classes[\"menu-item\"], classes[\"menu-link\"]];\n item.active && menuItemLinkClasses.push(classes[\"menu-item-active\"]);\n item.disabled && menuItemLinkClasses.push(classes[\"disabled\"]);\n const menuLinkWrapperClasses = [classes[\"menu-list-item\"]];\n return {\n menuItemLinkClasses,\n menuLinkWrapperClasses\n };\n };\n\n const { menuItemLinkClasses, menuLinkWrapperClasses } = getStylingClasses();\n const tabIndexActive = item.active ? 0 : -1;\n const tabIndex = item.disabled ? -1 : tabIndexActive;\n\n return (\n <li className={menuLinkWrapperClasses.join(\" \")} data-testid={`${item.key}`}>\n {item.path?.match(/^https?:\\/\\//) ? (\n <Link\n ref={ref as Ref<HTMLAnchorElement>}\n onKeyDown={onKeyPressNavigation}\n data-testid={`left-nav-item-${item.key}`}\n aria-current={item.active ? \"page\" : false}\n aria-disabled={item.disabled}\n className={menuItemLinkClasses.join(\" \")}\n to={item.path ?? \"\"}\n type=\"external\"\n disabled={item.disabled}\n tabIndex={tabIndex}\n >\n <div className={classes[\"menu-item-text-wrapper\"]}>\n {item.iconComponent &&\n React.cloneElement(item.iconComponent, { className: classes[\"menu-item-icon\"] })}\n <span className={classes[\"menu-item-text\"]}>{item.title}</span>\n </div>\n </Link>\n ) : (\n <a\n ref={ref as Ref<HTMLAnchorElement>}\n onKeyDown={onKeyPressNavigation}\n onClick={onLinkClickHandler}\n data-testid={`left-nav-item-${item.key}`}\n aria-current={item.active ? \"page\" : false}\n aria-disabled={item.disabled}\n className={menuItemLinkClasses.join(\" \")}\n href={item.path ? internalLinkPrefix + item.path : \"\"}\n tabIndex={tabIndex}\n >\n <div className={classes[\"menu-item-text-wrapper\"]}>\n {item.iconComponent &&\n React.cloneElement(item.iconComponent, { className: classes[\"menu-item-icon\"] })}\n <span className={classes[\"menu-item-text\"]}>{item.title}</span>\n </div>\n </a>\n )}\n </li>\n );\n};\n\nexport const LinkLeftNavItem = React.forwardRef(LinkLeftNavItemComponent);\n"],"names":["menuItemLinkClasses","menuLinkWrapperClasses"],"mappings":";;;;;AAkCA,MAAM,2BAAyE,CAC7E,EAAE,MAAM,aAAa,YAAY,UAAU,iBAAiB,UAAU,qBAAqB,GAAA,GAC3F,QACG;;AACH,QAAM,EAAE,yBAAyB,sBAAsB,EAAE,UAAU,MAAM,iBAAiB;AAE1F,QAAM,qBAAqB,CAAC,UAAyC;AACnE,UAAM,eAAA;AACN,QAAI,C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right 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, HTMLProps, MouseEvent, Ref } from \"react\";\nimport { getTabbableElements } from \"../../../../../utils/focusManagement\";\nimport classes from \"./LeftNavItem.module.scss\";\nimport { MenuItem } from \"../LeftNav.interfaces\";\nimport { Link } from \"../../../../Link/Link\";\nimport { useKeyboardNavigation } from \"./useKeyboardNavigation\";\nimport { UseRefItemsReturnType } from \"../useRefItems\";\nimport { CloneableElement } from \"../../../../../interfaces\";\n\nexport interface Props extends HTMLProps<HTMLElement> {\n item: MenuItem;\n navigate: (path: string) => void;\n onItemClick?: (path?: string, button?: boolean) => void;\n onNavigate?: (path: string) => void;\n refItems: UseRefItemsReturnType;\n closeParentList?: () => void;\n internalLinkPrefix?: string;\n}\n\nconst LinkLeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, Props> = (\n { item, onItemClick, onNavigate, refItems, closeParentList, navigate, internalLinkPrefix = \"\" },\n ref\n) => {\n const { onKeyPressNavigation } = useKeyboardNavigation({ refItems, item, closeParentList });\n\n const onLinkClickHandler = (event: MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n if (!item.disabled) {\n onItemClick?.(item.path);\n if (item.path) {\n const path = item.path;\n navigate(path);\n setTimeout(() => {\n if (onNavigate) {\n onNavigate(path);\n } else {\n const findMainContent = (): HTMLElement | null => {\n const semantic = document.querySelector<HTMLElement>('[role=\"main\"], main');\n if (semantic) {\n return semantic;\n }\n\n const selectors = [\n \"#content\",\n \"#main-content\",\n \"#app-content\",\n \".content\",\n \".main-content\"\n ];\n for (const sel of selectors) {\n const el = document.querySelector<HTMLElement>(sel);\n if (el) {\n return el;\n }\n }\n\n const allTabbable = getTabbableElements(document.body);\n for (const el of allTabbable) {\n if (el instanceof HTMLElement && !el.closest(\"nav\")) {\n return el.closest<HTMLElement>(\"div, section, article, main\") || el;\n }\n }\n return null;\n };\n\n let attempts = 0;\n const maxAttempts = 30;\n let userHasTakenControl = false;\n let isOurFocusChange = false;\n\n const checkUserTookControl = (e: FocusEvent) => {\n if (isOurFocusChange) {\n isOurFocusChange = false;\n return;\n }\n\n const target = e.target as HTMLElement;\n if (target && !target.closest(\"nav\")) {\n userHasTakenControl = true;\n }\n };\n\n const tryFocusContent = () => {\n if (userHasTakenControl) {\n document.removeEventListener(\"focusin\", checkUserTookControl);\n return false;\n }\n\n attempts++;\n const mainContent = findMainContent();\n if (mainContent) {\n const tabbableElements = getTabbableElements(mainContent);\n const firstTabbable = tabbableElements[0];\n\n if (firstTabbable) {\n if (!userHasTakenControl) {\n isOurFocusChange = true;\n firstTabbable.focus();\n }\n document.removeEventListener(\"focusin\", checkUserTookControl);\n return true;\n } else {\n mainContent.setAttribute(\"tabindex\", \"-1\");\n if (!userHasTakenControl) {\n isOurFocusChange = true;\n mainContent.focus();\n }\n document.removeEventListener(\"focusin\", checkUserTookControl);\n return true;\n }\n }\n if (attempts < maxAttempts) {\n setTimeout(tryFocusContent, 100);\n } else {\n document.removeEventListener(\"focusin\", checkUserTookControl);\n }\n return false;\n };\n\n setTimeout(() => {\n document.addEventListener(\"focusin\", checkUserTookControl);\n }, 100);\n\n tryFocusContent();\n }\n }, 500);\n }\n }\n };\n\n const getStylingClasses = () => {\n const menuItemLinkClasses = [classes[\"menu-item\"], classes[\"menu-link\"]];\n item.active && menuItemLinkClasses.push(classes[\"menu-item-active\"]);\n item.disabled && menuItemLinkClasses.push(classes[\"disabled\"]);\n const menuLinkWrapperClasses = [classes[\"menu-list-item\"]];\n return {\n menuItemLinkClasses,\n menuLinkWrapperClasses\n };\n };\n\n const { menuItemLinkClasses, menuLinkWrapperClasses } = getStylingClasses();\n const tabIndexActive = item.active ? 0 : -1;\n const tabIndex = item.disabled ? -1 : tabIndexActive;\n\n return (\n <li className={menuLinkWrapperClasses.join(\" \")} data-testid={`${item.key}`}>\n {item.path?.match(/^https?:\\/\\//) ? (\n <Link\n ref={ref as Ref<HTMLAnchorElement>}\n onKeyDown={onKeyPressNavigation}\n data-testid={`left-nav-item-${item.key}`}\n aria-current={item.active ? \"page\" : false}\n aria-disabled={item.disabled}\n className={menuItemLinkClasses.join(\" \")}\n to={item.path ?? \"\"}\n type=\"external\"\n disabled={item.disabled}\n tabIndex={tabIndex}\n >\n <div className={classes[\"menu-item-text-wrapper\"]}>\n {item.iconComponent &&\n React.cloneElement(item.iconComponent as CloneableElement, {\n className: classes[\"menu-item-icon\"]\n })}\n <span className={classes[\"menu-item-text\"]}>{item.title}</span>\n </div>\n </Link>\n ) : (\n <a\n ref={ref as Ref<HTMLAnchorElement>}\n onKeyDown={onKeyPressNavigation}\n onClick={onLinkClickHandler}\n data-testid={`left-nav-item-${item.key}`}\n aria-current={item.active ? \"page\" : false}\n aria-disabled={item.disabled}\n className={menuItemLinkClasses.join(\" \")}\n href={item.path ? internalLinkPrefix + item.path : \"\"}\n tabIndex={tabIndex}\n >\n <div className={classes[\"menu-item-text-wrapper\"]}>\n {item.iconComponent &&\n React.cloneElement(item.iconComponent as CloneableElement, {\n className: classes[\"menu-item-icon\"]\n })}\n <span className={classes[\"menu-item-text\"]}>{item.title}</span>\n </div>\n </a>\n )}\n </li>\n );\n};\n\nexport const LinkLeftNavItem = React.forwardRef(LinkLeftNavItemComponent);\n"],"names":["menuItemLinkClasses","menuLinkWrapperClasses"],"mappings":";;;;;AAmCA,MAAM,2BAAyE,CAC7E,EAAE,MAAM,aAAa,YAAY,UAAU,iBAAiB,UAAU,qBAAqB,GAAA,GAC3F,QACG;;AACH,QAAM,EAAE,yBAAyB,sBAAsB,EAAE,UAAU,MAAM,iBAAiB;AAE1F,QA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.toStringTag,{value:"Module"});const e=require("react");exports.useRefItems=({items:r})=>{const t=e.useRef({}),l=e.useRef({});e.useEffect(()=>{n(r)},[r]);const n=e=>{const r={};u(r,0,e),l.current=r},u=(e,r,t,l,n)=>{let i=l,v=n;const d=null==t?void 0:t.filter(e=>!e.disabled);return null==d||d.forEach((t,l)=>{var c,o;const s=l===d.length-1;if(v=s?n:d[l+1],0!==((null==(c=t.items)?void 0:c.filter(e=>!e.disabled))??[]).length){e[t.key]={item:t,level:r,prev:i,next:null==(o=null==t?void 0:t.items)?void 0:o.filter(e=>!e.disabled)[0]},i=t;const{lastItem:l}=u(e,r+1,null==t?void 0:t.items,i,v);i=l}else e[t.key]={item:t,level:r,prev:i,next:v},i=t}),{lastItem:i}},i=e=>{var r,n,u;const v=null==(r=l.current)?void 0:r[e],d=v.level,o=c({currentItem:v,desiredLevel:d}),s=null==o?void 0:o.item.key;if(s)return c({currentItem:null==(n=l.current)?void 0:n[s],desiredLevel:d})?i(s):null==(u=t.current)?void 0:u[s]},v=e=>{var r,n,u;const i=null==(r=l.current)?void 0:r[e],c=i.level,o=d({currentItem:i,desiredLevel:c,currentLevel:c}),s=null==o?void 0:o.item.key;if(s)return d({currentItem:null==(n=l.current)?void 0:n[s],desiredLevel:c,currentLevel:c})?v(s):null==(u=t.current)?void 0:u[s]},d=({currentItem:e,desiredLevel:r,currentLevel:t})=>{var n,u;const i=null==(n=e.next)?void 0:n.key;if(!i)return;if(r>t)return;const v=null==(u=l.current)?void 0:u[i];return v&&v.level===r?v:d({currentItem:v,desiredLevel:r,currentLevel:v.level})},c=({currentItem:e,desiredLevel:r,checkForMenuEscape:t=!0})=>{var n,u;const i=null==(n=e.prev)?void 0:n.key;if(!i)return;const v=null==(u=l.current)?void 0:u[i],d=v.level;return t&&r>d?void 0:v&&v.level===r?v:c({currentItem:v,desiredLevel:r})};return{addElementReference:(e,r)=>{e?t.current[r]=e:delete t.current[r]},getNextElement:(e,r=!1)=>{var n,u,i;const v=null==(n=l.current)?void 0:n[e];if(r&&!v.item.items)return;const d=null==(u=v.next)?void 0:u.key;return d?null==(i=t.current)?void 0:i[d]:void 0},getNextElementOnSameLevel:e=>{var r,n;const u=null==(r=l.current)?void 0:r[e],i=u.level,v=d({currentItem:u,desiredLevel:i,currentLevel:i});return(null==v?void 0:v.item.key)?null==(n=t.current)?void 0:n[null==v?void 0:v.item.key]:void 0},getPrevElementOnSameLevel:e=>{var r,n;const u=null==(r=l.current)?void 0:r[e],i=u.level,v=c({currentItem:u,desiredLevel:i});return(null==v?void 0:v.item.key)?null==(n=t.current)?void 0:n[null==v?void 0:v.item.key]:void 0},getFirstElementOnSameLevel:i,getLastElementOnSameLevel:v,getParentElement:e=>{var r,n;const u=null==(r=l.current)?void 0:r[e],i=u.level,v=c({currentItem:u,desiredLevel:i-1,checkForMenuEscape:!1});return(null==v?void 0:v.item.key)?null==(n=t.current)?void 0:n[null==v?void 0:v.item.key]:void 0},getItemMap:()=>l.current}};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useRefItems=({items:r})=>{const t=e.useRef({}),l=e.useRef({});e.useEffect(()=>{n(r)},[r]);const n=e=>{const r={};u(r,0,e),l.current=r},u=(e,r,t,l,n)=>{let i=l,v=n;const d=null==t?void 0:t.filter(e=>!e.disabled);return null==d||d.forEach((t,l)=>{var c,o;const s=l===d.length-1;if(v=s?n:d[l+1],0!==((null==(c=t.items)?void 0:c.filter(e=>!e.disabled))??[]).length){e[t.key]={item:t,level:r,prev:i,next:null==(o=null==t?void 0:t.items)?void 0:o.find(e=>!e.disabled)},i=t;const{lastItem:l}=u(e,r+1,null==t?void 0:t.items,i,v);i=l}else e[t.key]={item:t,level:r,prev:i,next:v},i=t}),{lastItem:i}},i=e=>{var r,n,u;const v=null==(r=l.current)?void 0:r[e],d=v.level,o=c({currentItem:v,desiredLevel:d}),s=null==o?void 0:o.item.key;if(s)return c({currentItem:null==(n=l.current)?void 0:n[s],desiredLevel:d})?i(s):null==(u=t.current)?void 0:u[s]},v=e=>{var r,n,u;const i=null==(r=l.current)?void 0:r[e],c=i.level,o=d({currentItem:i,desiredLevel:c,currentLevel:c}),s=null==o?void 0:o.item.key;if(s)return d({currentItem:null==(n=l.current)?void 0:n[s],desiredLevel:c,currentLevel:c})?v(s):null==(u=t.current)?void 0:u[s]},d=({currentItem:e,desiredLevel:r,currentLevel:t})=>{var n,u;const i=null==(n=e.next)?void 0:n.key;if(!i)return;if(r>t)return;const v=null==(u=l.current)?void 0:u[i];return(null==v?void 0:v.level)===r?v:d({currentItem:v,desiredLevel:r,currentLevel:v.level})},c=({currentItem:e,desiredLevel:r,checkForMenuEscape:t=!0})=>{var n,u;const i=null==(n=e.prev)?void 0:n.key;if(!i)return;const v=null==(u=l.current)?void 0:u[i],d=v.level;return t&&r>d?void 0:(null==v?void 0:v.level)===r?v:c({currentItem:v,desiredLevel:r})};return{addElementReference:(e,r)=>{e?t.current[r]=e:delete t.current[r]},getNextElement:(e,r=!1)=>{var n,u,i;const v=null==(n=l.current)?void 0:n[e];if(r&&!v.item.items)return;const d=null==(u=v.next)?void 0:u.key;return d?null==(i=t.current)?void 0:i[d]:void 0},getNextElementOnSameLevel:e=>{var r,n;const u=null==(r=l.current)?void 0:r[e],i=u.level,v=d({currentItem:u,desiredLevel:i,currentLevel:i});return(null==v?void 0:v.item.key)?null==(n=t.current)?void 0:n[null==v?void 0:v.item.key]:void 0},getPrevElementOnSameLevel:e=>{var r,n;const u=null==(r=l.current)?void 0:r[e],i=u.level,v=c({currentItem:u,desiredLevel:i});return(null==v?void 0:v.item.key)?null==(n=t.current)?void 0:n[null==v?void 0:v.item.key]:void 0},getFirstElementOnSameLevel:i,getLastElementOnSameLevel:v,getParentElement:e=>{var r,n;const u=null==(r=l.current)?void 0:r[e],i=u.level,v=c({currentItem:u,desiredLevel:i-1,checkForMenuEscape:!1});return(null==v?void 0:v.item.key)?null==(n=t.current)?void 0:n[null==v?void 0:v.item.key]:void 0},getItemMap:()=>l.current}};
2
2
  //# sourceMappingURL=useRefItems.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useRefItems.cjs.js","sources":["../../../../../src/components/admin/layout/LeftNav/useRefItems.ts"],"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 { useEffect, useRef } from \"react\";\nimport { MenuItem } from \"./LeftNav.interfaces\";\n\ninterface Props {\n items: MenuItem[];\n}\n\ninterface LinkedMapValue {\n item: MenuItem;\n level: number;\n prev?: MenuItem;\n next?: MenuItem;\n}\n\nexport type UseRefItemsReturnType = ReturnType<typeof useRefItems>;\n\nexport const useRefItems = ({ items }: Props) => {\n const navRefs = useRef<Record<string, HTMLElement>>({});\n const itemsMap = useRef<Record<string, LinkedMapValue>>({});\n\n useEffect(() => {\n createLinkedMap(items);\n }, [items]);\n\n /**\n * Creates linked list of provided menu items.\n * Disabled items are filtered out.\n */\n const createLinkedMap = (menuItems: MenuItem[]) => {\n const map: Record<string, LinkedMapValue> = {};\n createRecursiveLinkedMap(map, 0, menuItems);\n itemsMap.current = map;\n };\n\n const createRecursiveLinkedMap = (\n itemsMap: Record<string, LinkedMapValue>,\n level: number,\n items?: MenuItem[],\n prevItem?: MenuItem,\n nextItem?: MenuItem\n ): { lastItem?: MenuItem } => {\n let currentPreviousItem: MenuItem | undefined = prevItem,\n currentNextItem: MenuItem | undefined = nextItem;\n const nonDisabledItems = items?.filter(item => !item.disabled);\n nonDisabledItems?.forEach((currentItem, index) => {\n const isLast = index === nonDisabledItems.length - 1;\n if (!isLast) {\n currentNextItem = nonDisabledItems[index + 1];\n } else {\n currentNextItem = nextItem;\n }\n\n const hasChildren = (currentItem.items?.filter(item => !item.disabled) ?? []).length !== 0;\n if (hasChildren) {\n itemsMap[currentItem.key] = {\n item: currentItem,\n level,\n prev: currentPreviousItem,\n next: currentItem?.items?.filter(item => !item.disabled)[0]\n };\n currentPreviousItem = currentItem;\n const { lastItem } = createRecursiveLinkedMap(\n itemsMap,\n level + 1,\n currentItem?.items,\n currentPreviousItem,\n currentNextItem\n );\n currentPreviousItem = lastItem;\n } else {\n itemsMap[currentItem.key] = {\n item: currentItem,\n level,\n prev: currentPreviousItem,\n next: currentNextItem\n };\n currentPreviousItem = currentItem;\n }\n });\n return { lastItem: currentPreviousItem };\n };\n\n const addElementReference = (el: HTMLElement | null, key: string) => {\n if (el) {\n navRefs.current[key] = el;\n } else {\n delete navRefs.current[key];\n }\n };\n\n /**\n * Get next element that is rendered. It could be nested element\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the last element on that level\n */\n const getNextElement = (currentKey: string, whenHavingChildren: boolean = false) => {\n const currentItem = itemsMap.current?.[currentKey];\n if (whenHavingChildren && !currentItem.item.items) {\n return;\n }\n const nextKey = currentItem.next?.key;\n return nextKey ? navRefs.current?.[nextKey] : undefined;\n };\n\n /**\n * Get next element on the same level as currentKey param\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the last element on that level\n */\n const getNextElementOnSameLevel = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const nextItem = _traverseNextElements({\n currentItem,\n desiredLevel: currentLevel,\n currentLevel\n });\n return nextItem?.item.key ? navRefs.current?.[nextItem?.item.key] : undefined;\n };\n\n /**\n * Get previous element on the same level as currentKey param\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the first element on that level\n */\n const getPrevElementOnSameLevel = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const prevItem = _traversePrevElements({\n currentItem,\n desiredLevel: currentLevel\n });\n return prevItem?.item.key ? navRefs.current?.[prevItem?.item.key] : undefined;\n };\n\n /**\n * Get first element on the same level as currentKey param\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the first element on that level\n */\n const getFirstElementOnSameLevel = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const prevItem = _traversePrevElements({\n currentItem,\n desiredLevel: currentLevel\n });\n const prevItemKey = prevItem?.item.key;\n if (prevItemKey) {\n const hasNextPrevElement = !!_traversePrevElements({\n currentItem: itemsMap.current?.[prevItemKey],\n desiredLevel: currentLevel\n });\n if (hasNextPrevElement) {\n return getFirstElementOnSameLevel(prevItemKey);\n }\n return navRefs.current?.[prevItemKey];\n }\n };\n\n /**\n * Get last element on the same level as currentKey param\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the last element on that level\n */\n const getLastElementOnSameLevel = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const nextItem = _traverseNextElements({\n currentItem,\n desiredLevel: currentLevel,\n currentLevel\n });\n const nextItemKey = nextItem?.item.key;\n if (nextItemKey) {\n const hasNextNextElement = !!_traverseNextElements({\n currentItem: itemsMap.current?.[nextItemKey],\n desiredLevel: currentLevel,\n currentLevel\n });\n if (hasNextNextElement) {\n return getLastElementOnSameLevel(nextItemKey);\n }\n return navRefs.current?.[nextItemKey];\n }\n };\n\n const getParentElement = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const parentLevel = currentLevel - 1;\n const parentItem = _traversePrevElements({\n currentItem,\n desiredLevel: parentLevel,\n checkForMenuEscape: false\n });\n return parentItem?.item.key ? navRefs.current?.[parentItem?.item.key] : undefined;\n };\n\n const _traverseNextElements = ({\n currentItem,\n desiredLevel,\n currentLevel\n }: {\n currentItem: LinkedMapValue;\n desiredLevel: number;\n currentLevel: number;\n }) => {\n const nextKey = currentItem.next?.key;\n if (!nextKey) {\n return;\n }\n const escapedSubMenu = desiredLevel > currentLevel;\n if (escapedSubMenu) {\n return;\n }\n\n const next = itemsMap.current?.[nextKey];\n if (next && next.level === desiredLevel) {\n return next;\n } else {\n return _traverseNextElements({ currentItem: next, desiredLevel, currentLevel: next.level });\n }\n };\n\n const _traversePrevElements = ({\n currentItem,\n desiredLevel,\n checkForMenuEscape = true\n }: {\n currentItem: LinkedMapValue;\n desiredLevel: number;\n checkForMenuEscape?: boolean;\n }) => {\n const prevKey = currentItem.prev?.key;\n if (!prevKey) {\n return;\n }\n const prev = itemsMap.current?.[prevKey];\n const prevLevel = prev.level;\n\n const escapedSubMenu = desiredLevel > prevLevel;\n if (checkForMenuEscape && escapedSubMenu) {\n return;\n }\n\n if (prev && prev.level === desiredLevel) {\n return prev;\n } else {\n return _traversePrevElements({ currentItem: prev, desiredLevel });\n }\n };\n\n return {\n addElementReference,\n getNextElement,\n getNextElementOnSameLevel,\n getPrevElementOnSameLevel,\n getFirstElementOnSameLevel,\n getLastElementOnSameLevel,\n getParentElement,\n getItemMap: () => itemsMap.current\n };\n};\n"],"names":["items","navRefs","useRef","itemsMap","useEffect","createLinkedMap","menuItems","map","createRecursiveLinkedMap","current","level","prevItem","nextItem","currentPreviousItem","currentNextItem","nonDisabledItems","filter","item","disabled","forEach","currentItem","index","isLast","length","_a","key","prev","next","_b","lastItem","getFirstElementOnSameLevel","currentKey","currentLevel","_traversePrevElements","desiredLevel","prevItemKey","_c","getLastElementOnSameLevel","_traverseNextElements","nextItemKey","nextKey","checkForMenuEscape","prevKey","prevLevel","addElementReference","el","getNextElement","whenHavingChildren","getNextElementOnSameLevel","getPrevElementOnSameLevel","getParentElement","parentItem","getItemMap"],"mappings":"6HAgC2B,EAAGA,YAC5B,MAAMC,EAAUC,EAAAA,OAAoC,IAC9CC,EAAWD,EAAAA,OAAuC,IAExDE,EAAAA,UAAU,KACRC,EAAgBL,IACf,CAACA,IAMJ,MAAMK,EAAmBC,IACvB,MAAMC,EAAsC,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yright 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 { useEffect, useRef } from \"react\";\nimport { MenuItem } from \"./LeftNav.interfaces\";\n\ninterface Props {\n items: MenuItem[];\n}\n\ninterface LinkedMapValue {\n item: MenuItem;\n level: number;\n prev?: MenuItem;\n next?: MenuItem;\n}\n\nexport type UseRefItemsReturnType = ReturnType<typeof useRefItems>;\n\nexport const useRefItems = ({ items }: Props) => {\n const navRefs = useRef<Record<string, HTMLElement>>({});\n const itemsMap = useRef<Record<string, LinkedMapValue>>({});\n\n useEffect(() => {\n createLinkedMap(items);\n }, [items]);\n\n /**\n * Creates linked list of provided menu items.\n * Disabled items are filtered out.\n */\n const createLinkedMap = (menuItems: MenuItem[]) => {\n const map: Record<string, LinkedMapValue> = {};\n createRecursiveLinkedMap(map, 0, menuItems);\n itemsMap.current = map;\n };\n\n const createRecursiveLinkedMap = (\n itemsMap: Record<string, LinkedMapValue>,\n level: number,\n items?: MenuItem[],\n prevItem?: MenuItem,\n nextItem?: MenuItem\n ): { lastItem?: MenuItem } => {\n let currentPreviousItem: MenuItem | undefined = prevItem,\n currentNextItem: MenuItem | undefined = nextItem;\n const nonDisabledItems = items?.filter(item => !item.disabled);\n nonDisabledItems?.forEach((currentItem, index) => {\n const isLast = index === nonDisabledItems.length - 1;\n if (isLast) {\n currentNextItem = nextItem;\n } else {\n currentNextItem = nonDisabledItems[index + 1];\n }\n\n const hasChildren = (currentItem.items?.filter(item => !item.disabled) ?? []).length !== 0;\n if (hasChildren) {\n itemsMap[currentItem.key] = {\n item: currentItem,\n level,\n prev: currentPreviousItem,\n next: currentItem?.items?.find(item => !item.disabled) // NOSONAR S1874 - `disabled` is deprecated but still a supported MenuItem prop.\n };\n currentPreviousItem = currentItem;\n const { lastItem } = createRecursiveLinkedMap(\n itemsMap,\n level + 1,\n currentItem?.items,\n currentPreviousItem,\n currentNextItem\n );\n currentPreviousItem = lastItem;\n } else {\n itemsMap[currentItem.key] = {\n item: currentItem,\n level,\n prev: currentPreviousItem,\n next: currentNextItem\n };\n currentPreviousItem = currentItem;\n }\n });\n return { lastItem: currentPreviousItem };\n };\n\n const addElementReference = (el: HTMLElement | null, key: string) => {\n if (el) {\n navRefs.current[key] = el;\n } else {\n delete navRefs.current[key];\n }\n };\n\n /**\n * Get next element that is rendered. It could be nested element\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the last element on that level\n */\n const getNextElement = (currentKey: string, whenHavingChildren: boolean = false) => {\n const currentItem = itemsMap.current?.[currentKey];\n if (whenHavingChildren && !currentItem.item.items) {\n return;\n }\n const nextKey = currentItem.next?.key;\n return nextKey ? navRefs.current?.[nextKey] : undefined;\n };\n\n /**\n * Get next element on the same level as currentKey param\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the last element on that level\n */\n const getNextElementOnSameLevel = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const nextItem = _traverseNextElements({\n currentItem,\n desiredLevel: currentLevel,\n currentLevel\n });\n return nextItem?.item.key ? navRefs.current?.[nextItem?.item.key] : undefined;\n };\n\n /**\n * Get previous element on the same level as currentKey param\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the first element on that level\n */\n const getPrevElementOnSameLevel = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const prevItem = _traversePrevElements({\n currentItem,\n desiredLevel: currentLevel\n });\n return prevItem?.item.key ? navRefs.current?.[prevItem?.item.key] : undefined;\n };\n\n /**\n * Get first element on the same level as currentKey param\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the first element on that level\n */\n const getFirstElementOnSameLevel = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const prevItem = _traversePrevElements({\n currentItem,\n desiredLevel: currentLevel\n });\n const prevItemKey = prevItem?.item.key;\n if (prevItemKey) {\n const hasNextPrevElement = !!_traversePrevElements({\n currentItem: itemsMap.current?.[prevItemKey],\n desiredLevel: currentLevel\n });\n if (hasNextPrevElement) {\n return getFirstElementOnSameLevel(prevItemKey);\n }\n return navRefs.current?.[prevItemKey];\n }\n };\n\n /**\n * Get last element on the same level as currentKey param\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the last element on that level\n */\n const getLastElementOnSameLevel = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const nextItem = _traverseNextElements({\n currentItem,\n desiredLevel: currentLevel,\n currentLevel\n });\n const nextItemKey = nextItem?.item.key;\n if (nextItemKey) {\n const hasNextNextElement = !!_traverseNextElements({\n currentItem: itemsMap.current?.[nextItemKey],\n desiredLevel: currentLevel,\n currentLevel\n });\n if (hasNextNextElement) {\n return getLastElementOnSameLevel(nextItemKey);\n }\n return navRefs.current?.[nextItemKey];\n }\n };\n\n const getParentElement = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const parentLevel = currentLevel - 1;\n const parentItem = _traversePrevElements({\n currentItem,\n desiredLevel: parentLevel,\n checkForMenuEscape: false\n });\n return parentItem?.item.key ? navRefs.current?.[parentItem?.item.key] : undefined;\n };\n\n const _traverseNextElements = ({\n currentItem,\n desiredLevel,\n currentLevel\n }: {\n currentItem: LinkedMapValue;\n desiredLevel: number;\n currentLevel: number;\n }) => {\n const nextKey = currentItem.next?.key;\n if (!nextKey) {\n return;\n }\n const escapedSubMenu = desiredLevel > currentLevel;\n if (escapedSubMenu) {\n return;\n }\n\n const next = itemsMap.current?.[nextKey];\n if (next?.level === desiredLevel) {\n return next;\n } else {\n return _traverseNextElements({ currentItem: next, desiredLevel, currentLevel: next.level });\n }\n };\n\n const _traversePrevElements = ({\n currentItem,\n desiredLevel,\n checkForMenuEscape = true\n }: {\n currentItem: LinkedMapValue;\n desiredLevel: number;\n checkForMenuEscape?: boolean;\n }) => {\n const prevKey = currentItem.prev?.key;\n if (!prevKey) {\n return;\n }\n const prev = itemsMap.current?.[prevKey];\n const prevLevel = prev.level;\n\n const escapedSubMenu = desiredLevel > prevLevel;\n if (checkForMenuEscape && escapedSubMenu) {\n return;\n }\n\n if (prev?.level === desiredLevel) {\n return prev;\n } else {\n return _traversePrevElements({ currentItem: prev, desiredLevel });\n }\n };\n\n return {\n addElementReference,\n getNextElement,\n getNextElementOnSameLevel,\n getPrevElementOnSameLevel,\n getFirstElementOnSameLevel,\n getLastElementOnSameLevel,\n getParentElement,\n getItemMap: () => itemsMap.current\n };\n};\n"],"names":["items","navRefs","useRef","itemsMap","useEffect","createLinkedMap","menuItems","map","createRecursiveLinkedMap","current","level","prevItem","nextItem","currentPreviousItem","currentNextItem","nonDisabledItems","filter","item","disabled","forEach","currentItem","index","isLast","length","_a","key","prev","next","_b","find","lastItem","getFirstElementOnSameLevel","currentKey","currentLevel","_traversePrevElements","desiredLevel","prevItemKey","_c","getLastElementOnSameLevel","_traverseNextElements","nextItemKey","nextKey","checkForMenuEscape","prevKey","prevLevel","addElementReference","el","getNextElement","whenHavingChildren","getNextElementOnSameLevel","getPrevElementOnSameLevel","getParentElement","parentItem","getItemMap"],"mappings":"6HAgC2B,EAAGA,YAC5B,MAAMC,EAAUC,EAAAA,OAAoC,IAC9CC,EAAWD,EAAAA,OAAuC,IAExDE,EAAAA,UAAU,KACRC,EAAgBL,IACf,CAACA,IAMJ,MAAMK,EAAmBC,IACvB,MAAMC,EAAsC,CAAA,EAC5CC,EAAyBD,EAAK,EAAGD,GACjCH,EAASM,QAAUF,GAGfC,EAA2B,CAC/BL,EACAO,EACAV,EACAW,EACAC,KAEA,IAAIC,E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EAAkBH,IAClC,OAAOgB,EAAU,OAAAJ,EAAApC,EAAQQ,cAAR,EAAA4B,EAAkBI,QAAW,GA2J9CQ,0BAnJiCjB,YACjC,MAAMZ,EAAc,OAAAI,EAAArB,EAASM,cAAT,EAAAe,EAAmBQ,GACjCC,EAAeb,EAAYV,MAC3BE,EAAW2B,EAAsB,CACrCnB,cACAe,aAAcF,EACdA,iBAEF,OAAO,MAAArB,OAAA,EAAAA,EAAUK,KAAKQ,KAAM,OAAAG,EAAA3B,EAAQQ,cAAR,EAAAmB,EAAkB,MAAAhB,OAAA,EAAAA,EAAUK,KAAKQ,UAAO,GA4IpEyB,0BApIiClB,YACjC,MAAMZ,EAAc,OAAAI,EAAArB,EAASM,cAAT,EAAAe,EAAmBQ,GACjCC,EAAeb,EAAYV,MAC3BC,EAAWuB,EAAsB,CACrCd,cACAe,aAAcF,IAEhB,OAAO,MAAAtB,OAAA,EAAAA,EAAUM,KAAKQ,KAAM,OAAAG,EAAA3B,EAAQQ,cAAR,EAAAmB,EAAkB,MAAAjB,OAAA,EAAAA,EAAUM,KAAKQ,UAAO,GA8HpEM,6BACAO,4BACAa,iBAzEwBnB,YACxB,MAAMZ,EAAc,OAAAI,EAAArB,EAASM,cAAT,EAAAe,EAAmBQ,GACjCC,EAAeb,EAAYV,MAE3B0C,EAAalB,EAAsB,CACvCd,cACAe,aAHkBF,EAAe,EAIjCS,oBAAoB,IAEtB,OAAO,MAAAU,OAAA,EAAAA,EAAYnC,KAAKQ,KAAM,OAAAG,EAAA3B,EAAQQ,cAAR,EAAAmB,EAAkB,MAAAwB,OAAA,EAAAA,EAAYnC,KAAKQ,UAAO,GAiExE4B,WAAY,IAAMlD,EAASM"}
@@ -16,10 +16,10 @@ const useRefItems = ({ items }) => {
16
16
  nonDisabledItems == null ? void 0 : nonDisabledItems.forEach((currentItem, index) => {
17
17
  var _a, _b;
18
18
  const isLast = index === nonDisabledItems.length - 1;
19
- if (!isLast) {
20
- currentNextItem = nonDisabledItems[index + 1];
21
- } else {
19
+ if (isLast) {
22
20
  currentNextItem = nextItem;
21
+ } else {
22
+ currentNextItem = nonDisabledItems[index + 1];
23
23
  }
24
24
  const hasChildren = (((_a = currentItem.items) == null ? void 0 : _a.filter((item) => !item.disabled)) ?? []).length !== 0;
25
25
  if (hasChildren) {
@@ -27,7 +27,8 @@ const useRefItems = ({ items }) => {
27
27
  item: currentItem,
28
28
  level,
29
29
  prev: currentPreviousItem,
30
- next: (_b = currentItem == null ? void 0 : currentItem.items) == null ? void 0 : _b.filter((item) => !item.disabled)[0]
30
+ next: (_b = currentItem == null ? void 0 : currentItem.items) == null ? void 0 : _b.find((item) => !item.disabled)
31
+ // NOSONAR S1874 - `disabled` is deprecated but still a supported MenuItem prop.
31
32
  };
32
33
  currentPreviousItem = currentItem;
33
34
  const { lastItem } = createRecursiveLinkedMap(
@@ -156,7 +157,7 @@ const useRefItems = ({ items }) => {
156
157
  return;
157
158
  }
158
159
  const next = (_b = itemsMap.current) == null ? void 0 : _b[nextKey];
159
- if (next && next.level === desiredLevel) {
160
+ if ((next == null ? void 0 : next.level) === desiredLevel) {
160
161
  return next;
161
162
  } else {
162
163
  return _traverseNextElements({ currentItem: next, desiredLevel, currentLevel: next.level });
@@ -178,7 +179,7 @@ const useRefItems = ({ items }) => {
178
179
  if (checkForMenuEscape && escapedSubMenu) {
179
180
  return;
180
181
  }
181
- if (prev && prev.level === desiredLevel) {
182
+ if ((prev == null ? void 0 : prev.level) === desiredLevel) {
182
183
  return prev;
183
184
  } else {
184
185
  return _traversePrevElements({ currentItem: prev, desiredLevel });
@@ -1 +1 @@
1
- {"version":3,"file":"useRefItems.es.js","sources":["../../../../../src/components/admin/layout/LeftNav/useRefItems.ts"],"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 { useEffect, useRef } from \"react\";\nimport { MenuItem } from \"./LeftNav.interfaces\";\n\ninterface Props {\n items: MenuItem[];\n}\n\ninterface LinkedMapValue {\n item: MenuItem;\n level: number;\n prev?: MenuItem;\n next?: MenuItem;\n}\n\nexport type UseRefItemsReturnType = ReturnType<typeof useRefItems>;\n\nexport const useRefItems = ({ items }: Props) => {\n const navRefs = useRef<Record<string, HTMLElement>>({});\n const itemsMap = useRef<Record<string, LinkedMapValue>>({});\n\n useEffect(() => {\n createLinkedMap(items);\n }, [items]);\n\n /**\n * Creates linked list of provided menu items.\n * Disabled items are filtered out.\n */\n const createLinkedMap = (menuItems: MenuItem[]) => {\n const map: Record<string, LinkedMapValue> = {};\n createRecursiveLinkedMap(map, 0, menuItems);\n itemsMap.current = map;\n };\n\n const createRecursiveLinkedMap = (\n itemsMap: Record<string, LinkedMapValue>,\n level: number,\n items?: MenuItem[],\n prevItem?: MenuItem,\n nextItem?: MenuItem\n ): { lastItem?: MenuItem } => {\n let currentPreviousItem: MenuItem | undefined = prevItem,\n currentNextItem: MenuItem | undefined = nextItem;\n const nonDisabledItems = items?.filter(item => !item.disabled);\n nonDisabledItems?.forEach((currentItem, index) => {\n const isLast = index === nonDisabledItems.length - 1;\n if (!isLast) {\n currentNextItem = nonDisabledItems[index + 1];\n } else {\n currentNextItem = nextItem;\n }\n\n const hasChildren = (currentItem.items?.filter(item => !item.disabled) ?? []).length !== 0;\n if (hasChildren) {\n itemsMap[currentItem.key] = {\n item: currentItem,\n level,\n prev: currentPreviousItem,\n next: currentItem?.items?.filter(item => !item.disabled)[0]\n };\n currentPreviousItem = currentItem;\n const { lastItem } = createRecursiveLinkedMap(\n itemsMap,\n level + 1,\n currentItem?.items,\n currentPreviousItem,\n currentNextItem\n );\n currentPreviousItem = lastItem;\n } else {\n itemsMap[currentItem.key] = {\n item: currentItem,\n level,\n prev: currentPreviousItem,\n next: currentNextItem\n };\n currentPreviousItem = currentItem;\n }\n });\n return { lastItem: currentPreviousItem };\n };\n\n const addElementReference = (el: HTMLElement | null, key: string) => {\n if (el) {\n navRefs.current[key] = el;\n } else {\n delete navRefs.current[key];\n }\n };\n\n /**\n * Get next element that is rendered. It could be nested element\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the last element on that level\n */\n const getNextElement = (currentKey: string, whenHavingChildren: boolean = false) => {\n const currentItem = itemsMap.current?.[currentKey];\n if (whenHavingChildren && !currentItem.item.items) {\n return;\n }\n const nextKey = currentItem.next?.key;\n return nextKey ? navRefs.current?.[nextKey] : undefined;\n };\n\n /**\n * Get next element on the same level as currentKey param\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the last element on that level\n */\n const getNextElementOnSameLevel = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const nextItem = _traverseNextElements({\n currentItem,\n desiredLevel: currentLevel,\n currentLevel\n });\n return nextItem?.item.key ? navRefs.current?.[nextItem?.item.key] : undefined;\n };\n\n /**\n * Get previous element on the same level as currentKey param\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the first element on that level\n */\n const getPrevElementOnSameLevel = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const prevItem = _traversePrevElements({\n currentItem,\n desiredLevel: currentLevel\n });\n return prevItem?.item.key ? navRefs.current?.[prevItem?.item.key] : undefined;\n };\n\n /**\n * Get first element on the same level as currentKey param\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the first element on that level\n */\n const getFirstElementOnSameLevel = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const prevItem = _traversePrevElements({\n currentItem,\n desiredLevel: currentLevel\n });\n const prevItemKey = prevItem?.item.key;\n if (prevItemKey) {\n const hasNextPrevElement = !!_traversePrevElements({\n currentItem: itemsMap.current?.[prevItemKey],\n desiredLevel: currentLevel\n });\n if (hasNextPrevElement) {\n return getFirstElementOnSameLevel(prevItemKey);\n }\n return navRefs.current?.[prevItemKey];\n }\n };\n\n /**\n * Get last element on the same level as currentKey param\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the last element on that level\n */\n const getLastElementOnSameLevel = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const nextItem = _traverseNextElements({\n currentItem,\n desiredLevel: currentLevel,\n currentLevel\n });\n const nextItemKey = nextItem?.item.key;\n if (nextItemKey) {\n const hasNextNextElement = !!_traverseNextElements({\n currentItem: itemsMap.current?.[nextItemKey],\n desiredLevel: currentLevel,\n currentLevel\n });\n if (hasNextNextElement) {\n return getLastElementOnSameLevel(nextItemKey);\n }\n return navRefs.current?.[nextItemKey];\n }\n };\n\n const getParentElement = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const parentLevel = currentLevel - 1;\n const parentItem = _traversePrevElements({\n currentItem,\n desiredLevel: parentLevel,\n checkForMenuEscape: false\n });\n return parentItem?.item.key ? navRefs.current?.[parentItem?.item.key] : undefined;\n };\n\n const _traverseNextElements = ({\n currentItem,\n desiredLevel,\n currentLevel\n }: {\n currentItem: LinkedMapValue;\n desiredLevel: number;\n currentLevel: number;\n }) => {\n const nextKey = currentItem.next?.key;\n if (!nextKey) {\n return;\n }\n const escapedSubMenu = desiredLevel > currentLevel;\n if (escapedSubMenu) {\n return;\n }\n\n const next = itemsMap.current?.[nextKey];\n if (next && next.level === desiredLevel) {\n return next;\n } else {\n return _traverseNextElements({ currentItem: next, desiredLevel, currentLevel: next.level });\n }\n };\n\n const _traversePrevElements = ({\n currentItem,\n desiredLevel,\n checkForMenuEscape = true\n }: {\n currentItem: LinkedMapValue;\n desiredLevel: number;\n checkForMenuEscape?: boolean;\n }) => {\n const prevKey = currentItem.prev?.key;\n if (!prevKey) {\n return;\n }\n const prev = itemsMap.current?.[prevKey];\n const prevLevel = prev.level;\n\n const escapedSubMenu = desiredLevel > prevLevel;\n if (checkForMenuEscape && escapedSubMenu) {\n return;\n }\n\n if (prev && prev.level === desiredLevel) {\n return prev;\n } else {\n return _traversePrevElements({ currentItem: prev, desiredLevel });\n }\n };\n\n return {\n addElementReference,\n getNextElement,\n getNextElementOnSameLevel,\n getPrevElementOnSameLevel,\n getFirstElementOnSameLevel,\n getLastElementOnSameLevel,\n getParentElement,\n getItemMap: () => itemsMap.current\n };\n};\n"],"names":["itemsMap","items"],"mappings":";AAgCO,MAAM,cAAc,CAAC,EAAE,YAAmB;AAC/C,QAAM,UAAU,OAAoC,EAAE;AACtD,QAAM,WAAW,OAAuC,EAAE;AAE1D,YAAU,MAAM;AACd,oBAAgB,KAAK;AAAA,EACvB,GAAG,CAAC,KAAK,CAAC;AAMV,QAAM,kBAAkB,CAAC,cAA0B;AACjD,UAAM,MAAsC,CAAA;AAC5C,6BAAyB,KAAK,GAAG,SAAS;AAC1C,aAAS,UAAU;AAAA,EACrB;AAEA,QAAM,2BAA2B,CAC/BA,WACA,OACAC,QACA,UACA,aAC4B;AAC5B,QAAI,sBAA4C,UAC9C,kBAAwC;AAC1C,UAAM,mBAAmBA,iCAAO,OAAO,CAAA,SAAQ,CAAC,KAAK;AACrD,yDAAkB,QAAQ,CAAC,aAAa,UAAU;;AAChD,YAAM,SAAS,UAAU,iBAAiB,SAAS;AACnD,UAAI,CAAC,QAAQ;AACX,0BAAkB,iBAAiB,QAAQ,CAAC;AAAA,MAC9C,OAAO;AACL,0BAAkB;AAAA,MACpB;AAEA,YAAM,iBAAe,iBAAY,UAAZ,mBAAmB,OAAO,CAAA,SAAQ,CAAC,KAAK,cAAa,CAAA,GAAI,WAAW;AACzF,UAAI,aAAa;AACfD,kBAAS,YAAY,GAAG,IAAI;AAAA,UAC1B,MAAM;AAAA,UACN;AAAA,UACA,MAAM;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AA,IAAA,CACrB;AACD,YAAO,yCAAY,KAAK,QAAM,aAAQ,YAAR,mBAAkB,yCAAY,KAAK,OAAO;AAAA,EAC1E;AAEA,QAAM,wBAAwB,CAAC;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,EAAA,MAKI;;AACJ,UAAM,WAAU,iBAAY,SAAZ,mBAAkB;AAClC,QAAI,CAAC,SAAS;AACZ;AAAA,IACF;AACA,UAAM,iBAAiB,eAAe;AACtC,QAAI,gBAAgB;AAClB;AAAA,IACF;AAEA,UAAM,QAAO,cAAS,YAAT,mBAAmB;AAChC,QAAI,QAAQ,KAAK,UAAU,cAAc;AACvC,aAAO;AAAA,IACT,OAAO;AACL,aAAO,sBAAsB,EAAE,aAAa,MAAM,cAAc,cAAc,KAAK,OAAO;AAAA,IAC5F;AAAA,EACF;AAEA,QAAM,wBAAwB,CAAC;AAAA,IAC7B;AAAA,IACA;AAAA,IACA,qBAAqB;AAAA,EAAA,MAKjB;;AACJ,UAAM,WAAU,iBAAY,SAAZ,mBAAkB;AAClC,QAAI,CAAC,SAAS;AACZ;AAAA,IACF;AACA,UAAM,QAAO,cAAS,YAAT,mBAAmB;AAChC,UAAM,YAAY,KAAK;AAEvB,UAAM,iBAAiB,eAAe;AACtC,QAAI,sBAAsB,gBAAgB;AACxC;AAAA,IACF;AAEA,QAAI,QAAQ,KAAK,UAAU,cAAc;AACvC,aAAO;AAAA,IACT,OAAO;AACL,aAAO,sBAAsB,EAAE,aAAa,MAAM,cAAc;AAAA,IAClE;AAAA,EACF;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY,MAAM,SAAS;AAAA,EAAA;AAE/B;"}
1
+ {"version":3,"file":"useRefItems.es.js","sources":["../../../../../src/components/admin/layout/LeftNav/useRefItems.ts"],"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 { useEffect, useRef } from \"react\";\nimport { MenuItem } from \"./LeftNav.interfaces\";\n\ninterface Props {\n items: MenuItem[];\n}\n\ninterface LinkedMapValue {\n item: MenuItem;\n level: number;\n prev?: MenuItem;\n next?: MenuItem;\n}\n\nexport type UseRefItemsReturnType = ReturnType<typeof useRefItems>;\n\nexport const useRefItems = ({ items }: Props) => {\n const navRefs = useRef<Record<string, HTMLElement>>({});\n const itemsMap = useRef<Record<string, LinkedMapValue>>({});\n\n useEffect(() => {\n createLinkedMap(items);\n }, [items]);\n\n /**\n * Creates linked list of provided menu items.\n * Disabled items are filtered out.\n */\n const createLinkedMap = (menuItems: MenuItem[]) => {\n const map: Record<string, LinkedMapValue> = {};\n createRecursiveLinkedMap(map, 0, menuItems);\n itemsMap.current = map;\n };\n\n const createRecursiveLinkedMap = (\n itemsMap: Record<string, LinkedMapValue>,\n level: number,\n items?: MenuItem[],\n prevItem?: MenuItem,\n nextItem?: MenuItem\n ): { lastItem?: MenuItem } => {\n let currentPreviousItem: MenuItem | undefined = prevItem,\n currentNextItem: MenuItem | undefined = nextItem;\n const nonDisabledItems = items?.filter(item => !item.disabled);\n nonDisabledItems?.forEach((currentItem, index) => {\n const isLast = index === nonDisabledItems.length - 1;\n if (isLast) {\n currentNextItem = nextItem;\n } else {\n currentNextItem = nonDisabledItems[index + 1];\n }\n\n const hasChildren = (currentItem.items?.filter(item => !item.disabled) ?? []).length !== 0;\n if (hasChildren) {\n itemsMap[currentItem.key] = {\n item: currentItem,\n level,\n prev: currentPreviousItem,\n next: currentItem?.items?.find(item => !item.disabled) // NOSONAR S1874 - `disabled` is deprecated but still a supported MenuItem prop.\n };\n currentPreviousItem = currentItem;\n const { lastItem } = createRecursiveLinkedMap(\n itemsMap,\n level + 1,\n currentItem?.items,\n currentPreviousItem,\n currentNextItem\n );\n currentPreviousItem = lastItem;\n } else {\n itemsMap[currentItem.key] = {\n item: currentItem,\n level,\n prev: currentPreviousItem,\n next: currentNextItem\n };\n currentPreviousItem = currentItem;\n }\n });\n return { lastItem: currentPreviousItem };\n };\n\n const addElementReference = (el: HTMLElement | null, key: string) => {\n if (el) {\n navRefs.current[key] = el;\n } else {\n delete navRefs.current[key];\n }\n };\n\n /**\n * Get next element that is rendered. It could be nested element\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the last element on that level\n */\n const getNextElement = (currentKey: string, whenHavingChildren: boolean = false) => {\n const currentItem = itemsMap.current?.[currentKey];\n if (whenHavingChildren && !currentItem.item.items) {\n return;\n }\n const nextKey = currentItem.next?.key;\n return nextKey ? navRefs.current?.[nextKey] : undefined;\n };\n\n /**\n * Get next element on the same level as currentKey param\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the last element on that level\n */\n const getNextElementOnSameLevel = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const nextItem = _traverseNextElements({\n currentItem,\n desiredLevel: currentLevel,\n currentLevel\n });\n return nextItem?.item.key ? navRefs.current?.[nextItem?.item.key] : undefined;\n };\n\n /**\n * Get previous element on the same level as currentKey param\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the first element on that level\n */\n const getPrevElementOnSameLevel = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const prevItem = _traversePrevElements({\n currentItem,\n desiredLevel: currentLevel\n });\n return prevItem?.item.key ? navRefs.current?.[prevItem?.item.key] : undefined;\n };\n\n /**\n * Get first element on the same level as currentKey param\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the first element on that level\n */\n const getFirstElementOnSameLevel = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const prevItem = _traversePrevElements({\n currentItem,\n desiredLevel: currentLevel\n });\n const prevItemKey = prevItem?.item.key;\n if (prevItemKey) {\n const hasNextPrevElement = !!_traversePrevElements({\n currentItem: itemsMap.current?.[prevItemKey],\n desiredLevel: currentLevel\n });\n if (hasNextPrevElement) {\n return getFirstElementOnSameLevel(prevItemKey);\n }\n return navRefs.current?.[prevItemKey];\n }\n };\n\n /**\n * Get last element on the same level as currentKey param\n * @param currentKey key of item\n * @returns element or undefined if element does not exists or current element is the last element on that level\n */\n const getLastElementOnSameLevel = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const nextItem = _traverseNextElements({\n currentItem,\n desiredLevel: currentLevel,\n currentLevel\n });\n const nextItemKey = nextItem?.item.key;\n if (nextItemKey) {\n const hasNextNextElement = !!_traverseNextElements({\n currentItem: itemsMap.current?.[nextItemKey],\n desiredLevel: currentLevel,\n currentLevel\n });\n if (hasNextNextElement) {\n return getLastElementOnSameLevel(nextItemKey);\n }\n return navRefs.current?.[nextItemKey];\n }\n };\n\n const getParentElement = (currentKey: string) => {\n const currentItem = itemsMap.current?.[currentKey];\n const currentLevel = currentItem.level;\n const parentLevel = currentLevel - 1;\n const parentItem = _traversePrevElements({\n currentItem,\n desiredLevel: parentLevel,\n checkForMenuEscape: false\n });\n return parentItem?.item.key ? navRefs.current?.[parentItem?.item.key] : undefined;\n };\n\n const _traverseNextElements = ({\n currentItem,\n desiredLevel,\n currentLevel\n }: {\n currentItem: LinkedMapValue;\n desiredLevel: number;\n currentLevel: number;\n }) => {\n const nextKey = currentItem.next?.key;\n if (!nextKey) {\n return;\n }\n const escapedSubMenu = desiredLevel > currentLevel;\n if (escapedSubMenu) {\n return;\n }\n\n const next = itemsMap.current?.[nextKey];\n if (next?.level === desiredLevel) {\n return next;\n } else {\n return _traverseNextElements({ currentItem: next, desiredLevel, currentLevel: next.level });\n }\n };\n\n const _traversePrevElements = ({\n currentItem,\n desiredLevel,\n checkForMenuEscape = true\n }: {\n currentItem: LinkedMapValue;\n desiredLevel: number;\n checkForMenuEscape?: boolean;\n }) => {\n const prevKey = currentItem.prev?.key;\n if (!prevKey) {\n return;\n }\n const prev = itemsMap.current?.[prevKey];\n const prevLevel = prev.level;\n\n const escapedSubMenu = desiredLevel > prevLevel;\n if (checkForMenuEscape && escapedSubMenu) {\n return;\n }\n\n if (prev?.level === desiredLevel) {\n return prev;\n } else {\n return _traversePrevElements({ currentItem: prev, desiredLevel });\n }\n };\n\n return {\n addElementReference,\n getNextElement,\n getNextElementOnSameLevel,\n getPrevElementOnSameLevel,\n getFirstElementOnSameLevel,\n getLastElementOnSameLevel,\n getParentElement,\n getItemMap: () => itemsMap.current\n };\n};\n"],"names":["itemsMap","items"],"mappings":";AAgCO,MAAM,cAAc,CAAC,EAAE,YAAmB;AAC/C,QAAM,UAAU,OAAoC,EAAE;AACtD,QAAM,WAAW,OAAuC,EAAE;AAE1D,YAAU,MAAM;AACd,oBAAgB,KAAK;AAAA,EACvB,GAAG,CAAC,KAAK,CAAC;AAMV,QAAM,kBAAkB,CAAC,cAA0B;AACjD,UAAM,MAAsC,CAAA;AAC5C,6BAAyB,KAAK,GAAG,SAAS;AAC1C,aAAS,UAAU;AAAA,EACrB;AAEA,QAAM,2BAA2B,CAC/BA,WACA,OACAC,QACA,UACA,aAC4B;AAC5B,QAAI,sBAA4C,UAC9C,kBAAwC;AAC1C,UAAM,mBAAmBA,iCAAO,OAAO,CAAA,SAAQ,CAAC,KAAK;AACrD,yDAAkB,QAAQ,CAAC,aAAa,UAAU;;AAChD,YAAM,SAAS,UAAU,iBAAiB,SAAS;AACnD,UAAI,QAAQ;AACV,0BAAkB;AAAA,MACpB,OAAO;AACL,0BAAkB,iBAAiB,QAAQ,CAAC;AAAA,MAC9C;AAEA,YAAM,iBAAe,iBAAY,UAAZ,mBAAmB,OAAO,CAAA,SAAQ,CAA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 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.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 */.MicrofrontendContainer_microfrontend-container-margin_gLrTA{padding:2rem}.MicrofrontendContainer_microfrontend-container-max-width_gLrTA{max-width:105rem}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default={"microfrontend-container-margin":"MicrofrontendContainer_microfrontend-container-margin_gLrTA","microfrontend-container-max-width":"MicrofrontendContainer_microfrontend-container-max-width_gLrTA"};
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.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 */.MicrofrontendContainer_microfrontend-container-margin_8eZbI{padding:2rem}.MicrofrontendContainer_microfrontend-container-max-width_8eZbI{max-width:105rem}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default={"microfrontend-container-margin":"MicrofrontendContainer_microfrontend-container-margin_8eZbI","microfrontend-container-max-width":"MicrofrontendContainer_microfrontend-container-max-width_8eZbI"};
3
3
  //# sourceMappingURL=MicrofrontendContainer.module.scss.cjs.js.map
@@ -1,7 +1,7 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.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 */.MicrofrontendContainer_microfrontend-container-margin_gLrTA{padding:2rem}.MicrofrontendContainer_microfrontend-container-max-width_gLrTA{max-width:105rem}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.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 */.MicrofrontendContainer_microfrontend-container-margin_8eZbI{padding:2rem}.MicrofrontendContainer_microfrontend-container-max-width_8eZbI{max-width:105rem}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
2
2
  const classes = {
3
- "microfrontend-container-margin": "MicrofrontendContainer_microfrontend-container-margin_gLrTA",
4
- "microfrontend-container-max-width": "MicrofrontendContainer_microfrontend-container-max-width_gLrTA"
3
+ "microfrontend-container-margin": "MicrofrontendContainer_microfrontend-container-margin_8eZbI",
4
+ "microfrontend-container-max-width": "MicrofrontendContainer_microfrontend-container-max-width_8eZbI"
5
5
  };
6
6
  export {
7
7
  classes as default
@@ -1,3 +1,3 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.ProfileMenu_sr-only_gLrTA{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.ProfileMenu_hidden_gLrTA{display:none}.ProfileMenu_slide-in_gLrTA{animation:ProfileMenu_slide-in_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.ProfileMenu_slide-in_gLrTA{animation-duration:.1ms}}.ProfileMenu_slide-out_gLrTA{animation:ProfileMenu_slide-out_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.ProfileMenu_slide-out_gLrTA{animation-duration:.1ms}}@keyframes ProfileMenu_slide-in_gLrTA{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes ProfileMenu_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 */.ProfileMenu_trigger_gLrTA{display:flex;align-items:center;background:none;border:none;cursor:pointer;padding:0 .75rem}.ProfileMenu_trigger_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)}.ProfileMenu_circle_gLrTA{width:2.5rem;height:2.5rem;border-radius:50%;background-color:var(--color-primary);color:var(--light);display:flex;align-items:center;justify-content:center;overflow:hidden}.ProfileMenu_circle_gLrTA:hover{background-color:var(--color-primary600)}.ProfileMenu_circle_gLrTA.ProfileMenu_active_gLrTA{background-color:var(--color-primary700)}.ProfileMenu_initials_gLrTA{font-weight:700;font-size:1rem;pointer-events:none}.ProfileMenu_img_gLrTA{width:100%;height:100%;object-fit:cover;border-radius:50%}.ProfileMenu_popover_gLrTA{z-index:11;--font-size: .875rem}')),document.head.appendChild(e)}}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 e="ProfileMenu_trigger_gLrTA",r="ProfileMenu_circle_gLrTA",i="ProfileMenu_active_gLrTA",o="ProfileMenu_initials_gLrTA",t="ProfileMenu_img_gLrTA",l="ProfileMenu_popover_gLrTA",g={trigger:e,circle:r,active:i,initials:o,img:t,popover:l};exports.active=i,exports.circle=r,exports.default=g,exports.img=t,exports.initials=o,exports.popover=l,exports.trigger=e;
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.ProfileMenu_sr-only_8eZbI{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.ProfileMenu_hidden_8eZbI{display:none}.ProfileMenu_slide-in_8eZbI{animation:ProfileMenu_slide-in_8eZbI .5s forwards}@media(prefers-reduced-motion:reduce){.ProfileMenu_slide-in_8eZbI{animation-duration:.1ms}}.ProfileMenu_slide-out_8eZbI{animation:ProfileMenu_slide-out_8eZbI .5s forwards}@media(prefers-reduced-motion:reduce){.ProfileMenu_slide-out_8eZbI{animation-duration:.1ms}}@keyframes ProfileMenu_slide-in_8eZbI{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes ProfileMenu_slide-out_8eZbI{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 */.ProfileMenu_trigger_8eZbI{display:flex;align-items:center;background:none;border:none;cursor:pointer;padding:0 .75rem}.ProfileMenu_trigger_8eZbI: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)}.ProfileMenu_circle_8eZbI{width:2.5rem;height:2.5rem;border-radius:50%;background-color:var(--color-primary);color:var(--light);display:flex;align-items:center;justify-content:center;overflow:hidden}.ProfileMenu_circle_8eZbI:hover{background-color:var(--color-primary600)}.ProfileMenu_circle_8eZbI.ProfileMenu_active_8eZbI{background-color:var(--color-primary700)}.ProfileMenu_initials_8eZbI{font-weight:700;font-size:1rem;pointer-events:none}.ProfileMenu_img_8eZbI{width:100%;height:100%;object-fit:cover;border-radius:50%}.ProfileMenu_popover_8eZbI{z-index:11;--font-size: .875rem}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="ProfileMenu_trigger_8eZbI",i="ProfileMenu_circle_8eZbI",r="ProfileMenu_active_8eZbI",o="ProfileMenu_initials_8eZbI",t="ProfileMenu_img_8eZbI",l="ProfileMenu_popover_8eZbI",s={trigger:e,circle:i,active:r,initials:o,img:t,popover:l};exports.active=r,exports.circle=i,exports.default=s,exports.img=t,exports.initials=o,exports.popover=l,exports.trigger=e;
3
3
  //# sourceMappingURL=ProfileMenu.module.scss.cjs.js.map
@@ -1,10 +1,10 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.ProfileMenu_sr-only_gLrTA{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.ProfileMenu_hidden_gLrTA{display:none}.ProfileMenu_slide-in_gLrTA{animation:ProfileMenu_slide-in_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.ProfileMenu_slide-in_gLrTA{animation-duration:.1ms}}.ProfileMenu_slide-out_gLrTA{animation:ProfileMenu_slide-out_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.ProfileMenu_slide-out_gLrTA{animation-duration:.1ms}}@keyframes ProfileMenu_slide-in_gLrTA{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes ProfileMenu_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 */.ProfileMenu_trigger_gLrTA{display:flex;align-items:center;background:none;border:none;cursor:pointer;padding:0 .75rem}.ProfileMenu_trigger_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)}.ProfileMenu_circle_gLrTA{width:2.5rem;height:2.5rem;border-radius:50%;background-color:var(--color-primary);color:var(--light);display:flex;align-items:center;justify-content:center;overflow:hidden}.ProfileMenu_circle_gLrTA:hover{background-color:var(--color-primary600)}.ProfileMenu_circle_gLrTA.ProfileMenu_active_gLrTA{background-color:var(--color-primary700)}.ProfileMenu_initials_gLrTA{font-weight:700;font-size:1rem;pointer-events:none}.ProfileMenu_img_gLrTA{width:100%;height:100%;object-fit:cover;border-radius:50%}.ProfileMenu_popover_gLrTA{z-index:11;--font-size: .875rem}')),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}}();
2
- const trigger = "ProfileMenu_trigger_gLrTA";
3
- const circle = "ProfileMenu_circle_gLrTA";
4
- const active = "ProfileMenu_active_gLrTA";
5
- const initials = "ProfileMenu_initials_gLrTA";
6
- const img = "ProfileMenu_img_gLrTA";
7
- const popover = "ProfileMenu_popover_gLrTA";
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.ProfileMenu_sr-only_8eZbI{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.ProfileMenu_hidden_8eZbI{display:none}.ProfileMenu_slide-in_8eZbI{animation:ProfileMenu_slide-in_8eZbI .5s forwards}@media(prefers-reduced-motion:reduce){.ProfileMenu_slide-in_8eZbI{animation-duration:.1ms}}.ProfileMenu_slide-out_8eZbI{animation:ProfileMenu_slide-out_8eZbI .5s forwards}@media(prefers-reduced-motion:reduce){.ProfileMenu_slide-out_8eZbI{animation-duration:.1ms}}@keyframes ProfileMenu_slide-in_8eZbI{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes ProfileMenu_slide-out_8eZbI{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 */.ProfileMenu_trigger_8eZbI{display:flex;align-items:center;background:none;border:none;cursor:pointer;padding:0 .75rem}.ProfileMenu_trigger_8eZbI: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)}.ProfileMenu_circle_8eZbI{width:2.5rem;height:2.5rem;border-radius:50%;background-color:var(--color-primary);color:var(--light);display:flex;align-items:center;justify-content:center;overflow:hidden}.ProfileMenu_circle_8eZbI:hover{background-color:var(--color-primary600)}.ProfileMenu_circle_8eZbI.ProfileMenu_active_8eZbI{background-color:var(--color-primary700)}.ProfileMenu_initials_8eZbI{font-weight:700;font-size:1rem;pointer-events:none}.ProfileMenu_img_8eZbI{width:100%;height:100%;object-fit:cover;border-radius:50%}.ProfileMenu_popover_8eZbI{z-index:11;--font-size: .875rem}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
2
+ const trigger = "ProfileMenu_trigger_8eZbI";
3
+ const circle = "ProfileMenu_circle_8eZbI";
4
+ const active = "ProfileMenu_active_8eZbI";
5
+ const initials = "ProfileMenu_initials_8eZbI";
6
+ const img = "ProfileMenu_img_8eZbI";
7
+ const popover = "ProfileMenu_popover_8eZbI";
8
8
  const classes = {
9
9
  trigger,
10
10
  circle,
@@ -1,3 +1,3 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var a=document.createElement("style");a.appendChild(document.createTextNode('.TopNavBar_sr-only_gLrTA{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.TopNavBar_hidden_gLrTA{display:none}.TopNavBar_slide-in_gLrTA{animation:TopNavBar_slide-in_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.TopNavBar_slide-in_gLrTA{animation-duration:.1ms}}.TopNavBar_slide-out_gLrTA{animation:TopNavBar_slide-out_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.TopNavBar_slide-out_gLrTA{animation-duration:.1ms}}@keyframes TopNavBar_slide-in_gLrTA{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes TopNavBar_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 */.TopNavBar_topnavbar_gLrTA{position:sticky;top:0;left:0;z-index:3;width:100%;display:flex;align-items:center;height:4rem;padding:0 .75rem 0 0;background-color:var(--sidenavbar-background);box-shadow:0 2px 4px #0105320a,0 4px 5px #0105320a,0 1px 10px #01053214;--font-size: .875rem;flex-wrap:nowrap}.TopNavBar_topnavbar_gLrTA .TopNavBar_left-section_gLrTA{flex-shrink:0;display:flex;align-items:center}.TopNavBar_topnavbar_gLrTA .TopNavBar_logo-link_gLrTA{display:flex;align-items:center;text-decoration:none}.TopNavBar_topnavbar_gLrTA .TopNavBar_logo-container_gLrTA{display:flex;align-items:center}.TopNavBar_topnavbar_gLrTA .TopNavBar_logo-container_gLrTA .TopNavBar_logo-small_gLrTA{height:2.5rem;display:flex;align-items:center;margin:0 1rem}.TopNavBar_topnavbar_gLrTA .TopNavBar_logo-container_gLrTA .TopNavBar_logo_gLrTA{display:none}@media screen and (min-width:30em){.TopNavBar_topnavbar_gLrTA .TopNavBar_logo-container_gLrTA .TopNavBar_logo-small_gLrTA{display:none;height:0}.TopNavBar_topnavbar_gLrTA .TopNavBar_logo-container_gLrTA .TopNavBar_logo_gLrTA{display:block;margin-left:1rem}}@media screen and (min-width:30em)and (min-width:50em){.TopNavBar_topnavbar_gLrTA .TopNavBar_logo-container_gLrTA .TopNavBar_logo_gLrTA{margin-left:.75rem;margin-right:0}}.TopNavBar_topnavbar_gLrTA .TopNavBar_sr-only_gLrTA{position:absolute;margin:-1px;height:1px;width:1px;overflow:hidden}.TopNavBar_topnavbar_gLrTA .TopNavBar_separator_gLrTA{border:none;width:1px;height:2.5rem;background-color:#dedee6;flex-shrink:0;align-self:center;margin:0 3rem}.TopNavBar_topnavbar_gLrTA .TopNavBar_middle-section_gLrTA{flex:1;display:flex;align-items:center;min-width:0;margin-left:6.0625rem}@media screen and (max-width:50em){.TopNavBar_topnavbar_gLrTA .TopNavBar_middle-section_gLrTA{margin-left:0}}.TopNavBar_topnavbar_gLrTA .TopNavBar_separator_gLrTA+.TopNavBar_middle-section_gLrTA{margin-left:0}.TopNavBar_topnavbar_gLrTA .TopNavBar_right-section_gLrTA{display:flex;align-items:center;margin-left:auto;justify-content:flex-end;gap:1rem;padding-left:1rem}.TopNavBar_topnavbar_gLrTA .TopNavBar_menu-button_gLrTA{flex-shrink:0;margin-left:.75rem;display:none;--font-size: 1rem}@media screen and (max-width:50em){.TopNavBar_topnavbar_gLrTA .TopNavBar_menu-button_gLrTA{display:initial}}.TopNavBar_topnavbar_gLrTA .TopNavBar_menu-button_gLrTA.TopNavBar_menu--collapsed_gLrTA{display:initial}')),document.head.appendChild(a)}}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 o="TopNavBar_topnavbar_gLrTA",r="TopNavBar_logo_gLrTA",a="TopNavBar_separator_gLrTA",e={"sr-only":"TopNavBar_sr-only_gLrTA",topnavbar:o,"left-section":"TopNavBar_left-section_gLrTA","logo-link":"TopNavBar_logo-link_gLrTA","logo-container":"TopNavBar_logo-container_gLrTA","logo-small":"TopNavBar_logo-small_gLrTA",logo:r,separator:a,"middle-section":"TopNavBar_middle-section_gLrTA","right-section":"TopNavBar_right-section_gLrTA","menu-button":"TopNavBar_menu-button_gLrTA","menu--collapsed":"TopNavBar_menu--collapsed_gLrTA"};exports.default=e,exports.logo=r,exports.separator=a,exports.topnavbar=o;
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.TopNavBar_sr-only_8eZbI{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.TopNavBar_hidden_8eZbI{display:none}.TopNavBar_slide-in_8eZbI{animation:TopNavBar_slide-in_8eZbI .5s forwards}@media(prefers-reduced-motion:reduce){.TopNavBar_slide-in_8eZbI{animation-duration:.1ms}}.TopNavBar_slide-out_8eZbI{animation:TopNavBar_slide-out_8eZbI .5s forwards}@media(prefers-reduced-motion:reduce){.TopNavBar_slide-out_8eZbI{animation-duration:.1ms}}@keyframes TopNavBar_slide-in_8eZbI{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes TopNavBar_slide-out_8eZbI{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 */.TopNavBar_topnavbar_8eZbI{position:sticky;top:0;left:0;z-index:3;width:100%;display:flex;align-items:center;height:4rem;padding:0 .75rem 0 0;background-color:var(--sidenavbar-background);box-shadow:0 2px 4px #0105320a,0 4px 5px #0105320a,0 1px 10px #01053214;--font-size: .875rem;flex-wrap:nowrap}.TopNavBar_topnavbar_8eZbI .TopNavBar_left-section_8eZbI{flex-shrink:0;display:flex;align-items:center}.TopNavBar_topnavbar_8eZbI .TopNavBar_logo-link_8eZbI{display:flex;align-items:center;text-decoration:none}.TopNavBar_topnavbar_8eZbI .TopNavBar_logo-container_8eZbI{display:flex;align-items:center}.TopNavBar_topnavbar_8eZbI .TopNavBar_logo-container_8eZbI .TopNavBar_logo-small_8eZbI{height:2.5rem;display:flex;align-items:center;margin:0 1rem}.TopNavBar_topnavbar_8eZbI .TopNavBar_logo-container_8eZbI .TopNavBar_logo_8eZbI{display:none}@media screen and (min-width:30em){.TopNavBar_topnavbar_8eZbI .TopNavBar_logo-container_8eZbI .TopNavBar_logo-small_8eZbI{display:none;height:0}.TopNavBar_topnavbar_8eZbI .TopNavBar_logo-container_8eZbI .TopNavBar_logo_8eZbI{display:block;margin-left:1rem}}@media screen and (min-width:30em)and (min-width:50em){.TopNavBar_topnavbar_8eZbI .TopNavBar_logo-container_8eZbI .TopNavBar_logo_8eZbI{margin-left:.75rem;margin-right:0}}.TopNavBar_topnavbar_8eZbI .TopNavBar_sr-only_8eZbI{position:absolute;margin:-1px;height:1px;width:1px;overflow:hidden}.TopNavBar_topnavbar_8eZbI .TopNavBar_separator_8eZbI{border:none;width:1px;height:2.5rem;background-color:#dedee6;flex-shrink:0;align-self:center;margin:0 3rem}.TopNavBar_topnavbar_8eZbI .TopNavBar_middle-section_8eZbI{flex:1;display:flex;align-items:center;min-width:0;margin-left:6.0625rem}@media screen and (max-width:50em){.TopNavBar_topnavbar_8eZbI .TopNavBar_middle-section_8eZbI{margin-left:0}}.TopNavBar_topnavbar_8eZbI .TopNavBar_separator_8eZbI+.TopNavBar_middle-section_8eZbI{margin-left:0}.TopNavBar_topnavbar_8eZbI .TopNavBar_right-section_8eZbI{display:flex;align-items:center;margin-left:auto;justify-content:flex-end;gap:1rem;padding-left:1rem}.TopNavBar_topnavbar_8eZbI .TopNavBar_menu-button_8eZbI{flex-shrink:0;margin-left:.75rem;display:none;--font-size: 1rem}@media screen and (max-width:50em){.TopNavBar_topnavbar_8eZbI .TopNavBar_menu-button_8eZbI{display:initial}}.TopNavBar_topnavbar_8eZbI .TopNavBar_menu-button_8eZbI.TopNavBar_menu--collapsed_8eZbI{display:initial}')),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 o="TopNavBar_topnavbar_8eZbI",e="TopNavBar_logo_8eZbI",a="TopNavBar_separator_8eZbI",r={"sr-only":"TopNavBar_sr-only_8eZbI",topnavbar:o,"left-section":"TopNavBar_left-section_8eZbI","logo-link":"TopNavBar_logo-link_8eZbI","logo-container":"TopNavBar_logo-container_8eZbI","logo-small":"TopNavBar_logo-small_8eZbI",logo:e,separator:a,"middle-section":"TopNavBar_middle-section_8eZbI","right-section":"TopNavBar_right-section_8eZbI","menu-button":"TopNavBar_menu-button_8eZbI","menu--collapsed":"TopNavBar_menu--collapsed_8eZbI"};exports.default=r,exports.logo=e,exports.separator=a,exports.topnavbar=o;
3
3
  //# sourceMappingURL=TopNavBar.module.scss.cjs.js.map
@@ -1,20 +1,20 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var a=document.createElement("style");a.appendChild(document.createTextNode('.TopNavBar_sr-only_gLrTA{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.TopNavBar_hidden_gLrTA{display:none}.TopNavBar_slide-in_gLrTA{animation:TopNavBar_slide-in_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.TopNavBar_slide-in_gLrTA{animation-duration:.1ms}}.TopNavBar_slide-out_gLrTA{animation:TopNavBar_slide-out_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.TopNavBar_slide-out_gLrTA{animation-duration:.1ms}}@keyframes TopNavBar_slide-in_gLrTA{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes TopNavBar_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 */.TopNavBar_topnavbar_gLrTA{position:sticky;top:0;left:0;z-index:3;width:100%;display:flex;align-items:center;height:4rem;padding:0 .75rem 0 0;background-color:var(--sidenavbar-background);box-shadow:0 2px 4px #0105320a,0 4px 5px #0105320a,0 1px 10px #01053214;--font-size: .875rem;flex-wrap:nowrap}.TopNavBar_topnavbar_gLrTA .TopNavBar_left-section_gLrTA{flex-shrink:0;display:flex;align-items:center}.TopNavBar_topnavbar_gLrTA .TopNavBar_logo-link_gLrTA{display:flex;align-items:center;text-decoration:none}.TopNavBar_topnavbar_gLrTA .TopNavBar_logo-container_gLrTA{display:flex;align-items:center}.TopNavBar_topnavbar_gLrTA .TopNavBar_logo-container_gLrTA .TopNavBar_logo-small_gLrTA{height:2.5rem;display:flex;align-items:center;margin:0 1rem}.TopNavBar_topnavbar_gLrTA .TopNavBar_logo-container_gLrTA .TopNavBar_logo_gLrTA{display:none}@media screen and (min-width:30em){.TopNavBar_topnavbar_gLrTA .TopNavBar_logo-container_gLrTA .TopNavBar_logo-small_gLrTA{display:none;height:0}.TopNavBar_topnavbar_gLrTA .TopNavBar_logo-container_gLrTA .TopNavBar_logo_gLrTA{display:block;margin-left:1rem}}@media screen and (min-width:30em)and (min-width:50em){.TopNavBar_topnavbar_gLrTA .TopNavBar_logo-container_gLrTA .TopNavBar_logo_gLrTA{margin-left:.75rem;margin-right:0}}.TopNavBar_topnavbar_gLrTA .TopNavBar_sr-only_gLrTA{position:absolute;margin:-1px;height:1px;width:1px;overflow:hidden}.TopNavBar_topnavbar_gLrTA .TopNavBar_separator_gLrTA{border:none;width:1px;height:2.5rem;background-color:#dedee6;flex-shrink:0;align-self:center;margin:0 3rem}.TopNavBar_topnavbar_gLrTA .TopNavBar_middle-section_gLrTA{flex:1;display:flex;align-items:center;min-width:0;margin-left:6.0625rem}@media screen and (max-width:50em){.TopNavBar_topnavbar_gLrTA .TopNavBar_middle-section_gLrTA{margin-left:0}}.TopNavBar_topnavbar_gLrTA .TopNavBar_separator_gLrTA+.TopNavBar_middle-section_gLrTA{margin-left:0}.TopNavBar_topnavbar_gLrTA .TopNavBar_right-section_gLrTA{display:flex;align-items:center;margin-left:auto;justify-content:flex-end;gap:1rem;padding-left:1rem}.TopNavBar_topnavbar_gLrTA .TopNavBar_menu-button_gLrTA{flex-shrink:0;margin-left:.75rem;display:none;--font-size: 1rem}@media screen and (max-width:50em){.TopNavBar_topnavbar_gLrTA .TopNavBar_menu-button_gLrTA{display:initial}}.TopNavBar_topnavbar_gLrTA .TopNavBar_menu-button_gLrTA.TopNavBar_menu--collapsed_gLrTA{display:initial}')),document.head.appendChild(a)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}}();
2
- const topnavbar = "TopNavBar_topnavbar_gLrTA";
3
- const logo = "TopNavBar_logo_gLrTA";
4
- const separator = "TopNavBar_separator_gLrTA";
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.TopNavBar_sr-only_8eZbI{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.TopNavBar_hidden_8eZbI{display:none}.TopNavBar_slide-in_8eZbI{animation:TopNavBar_slide-in_8eZbI .5s forwards}@media(prefers-reduced-motion:reduce){.TopNavBar_slide-in_8eZbI{animation-duration:.1ms}}.TopNavBar_slide-out_8eZbI{animation:TopNavBar_slide-out_8eZbI .5s forwards}@media(prefers-reduced-motion:reduce){.TopNavBar_slide-out_8eZbI{animation-duration:.1ms}}@keyframes TopNavBar_slide-in_8eZbI{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes TopNavBar_slide-out_8eZbI{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 */.TopNavBar_topnavbar_8eZbI{position:sticky;top:0;left:0;z-index:3;width:100%;display:flex;align-items:center;height:4rem;padding:0 .75rem 0 0;background-color:var(--sidenavbar-background);box-shadow:0 2px 4px #0105320a,0 4px 5px #0105320a,0 1px 10px #01053214;--font-size: .875rem;flex-wrap:nowrap}.TopNavBar_topnavbar_8eZbI .TopNavBar_left-section_8eZbI{flex-shrink:0;display:flex;align-items:center}.TopNavBar_topnavbar_8eZbI .TopNavBar_logo-link_8eZbI{display:flex;align-items:center;text-decoration:none}.TopNavBar_topnavbar_8eZbI .TopNavBar_logo-container_8eZbI{display:flex;align-items:center}.TopNavBar_topnavbar_8eZbI .TopNavBar_logo-container_8eZbI .TopNavBar_logo-small_8eZbI{height:2.5rem;display:flex;align-items:center;margin:0 1rem}.TopNavBar_topnavbar_8eZbI .TopNavBar_logo-container_8eZbI .TopNavBar_logo_8eZbI{display:none}@media screen and (min-width:30em){.TopNavBar_topnavbar_8eZbI .TopNavBar_logo-container_8eZbI .TopNavBar_logo-small_8eZbI{display:none;height:0}.TopNavBar_topnavbar_8eZbI .TopNavBar_logo-container_8eZbI .TopNavBar_logo_8eZbI{display:block;margin-left:1rem}}@media screen and (min-width:30em)and (min-width:50em){.TopNavBar_topnavbar_8eZbI .TopNavBar_logo-container_8eZbI .TopNavBar_logo_8eZbI{margin-left:.75rem;margin-right:0}}.TopNavBar_topnavbar_8eZbI .TopNavBar_sr-only_8eZbI{position:absolute;margin:-1px;height:1px;width:1px;overflow:hidden}.TopNavBar_topnavbar_8eZbI .TopNavBar_separator_8eZbI{border:none;width:1px;height:2.5rem;background-color:#dedee6;flex-shrink:0;align-self:center;margin:0 3rem}.TopNavBar_topnavbar_8eZbI .TopNavBar_middle-section_8eZbI{flex:1;display:flex;align-items:center;min-width:0;margin-left:6.0625rem}@media screen and (max-width:50em){.TopNavBar_topnavbar_8eZbI .TopNavBar_middle-section_8eZbI{margin-left:0}}.TopNavBar_topnavbar_8eZbI .TopNavBar_separator_8eZbI+.TopNavBar_middle-section_8eZbI{margin-left:0}.TopNavBar_topnavbar_8eZbI .TopNavBar_right-section_8eZbI{display:flex;align-items:center;margin-left:auto;justify-content:flex-end;gap:1rem;padding-left:1rem}.TopNavBar_topnavbar_8eZbI .TopNavBar_menu-button_8eZbI{flex-shrink:0;margin-left:.75rem;display:none;--font-size: 1rem}@media screen and (max-width:50em){.TopNavBar_topnavbar_8eZbI .TopNavBar_menu-button_8eZbI{display:initial}}.TopNavBar_topnavbar_8eZbI .TopNavBar_menu-button_8eZbI.TopNavBar_menu--collapsed_8eZbI{display:initial}')),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}}();
2
+ const topnavbar = "TopNavBar_topnavbar_8eZbI";
3
+ const logo = "TopNavBar_logo_8eZbI";
4
+ const separator = "TopNavBar_separator_8eZbI";
5
5
  const classes = {
6
- "sr-only": "TopNavBar_sr-only_gLrTA",
6
+ "sr-only": "TopNavBar_sr-only_8eZbI",
7
7
  topnavbar,
8
- "left-section": "TopNavBar_left-section_gLrTA",
9
- "logo-link": "TopNavBar_logo-link_gLrTA",
10
- "logo-container": "TopNavBar_logo-container_gLrTA",
11
- "logo-small": "TopNavBar_logo-small_gLrTA",
8
+ "left-section": "TopNavBar_left-section_8eZbI",
9
+ "logo-link": "TopNavBar_logo-link_8eZbI",
10
+ "logo-container": "TopNavBar_logo-container_8eZbI",
11
+ "logo-small": "TopNavBar_logo-small_8eZbI",
12
12
  logo,
13
13
  separator,
14
- "middle-section": "TopNavBar_middle-section_gLrTA",
15
- "right-section": "TopNavBar_right-section_gLrTA",
16
- "menu-button": "TopNavBar_menu-button_gLrTA",
17
- "menu--collapsed": "TopNavBar_menu--collapsed_gLrTA"
14
+ "middle-section": "TopNavBar_middle-section_8eZbI",
15
+ "right-section": "TopNavBar_right-section_8eZbI",
16
+ "menu-button": "TopNavBar_menu-button_8eZbI",
17
+ "menu--collapsed": "TopNavBar_menu--collapsed_8eZbI"
18
18
  };
19
19
  export {
20
20
  classes as default,
@@ -1 +1 @@
1
- {"version":3,"file":"IdentityProviderButton.cjs.js","sources":["../../../src/components/miscellaneous/IdentityProviderButton.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, { ComponentPropsWithRef, CSSProperties, ForwardRefRenderFunction } from \"react\";\nimport classes from \"./IdentityProviderButton.module.scss\";\nimport { Button } from \"../Button/Button\";\n\nexport interface SupportedCustomizationKeys {\n backgroundColor: string;\n focusBorderColor: string;\n focusBackgroundColor: string;\n hoverBackgroundColor: string;\n pressedBackgroundColor: string;\n textColor: string;\n borderColor: string;\n}\n\nexport interface Props extends Omit<ComponentPropsWithRef<\"button\">, \"color\"> {\n iconUrl?: string;\n imgAltText?: string;\n idpType: string;\n customization?: SupportedCustomizationKeys;\n loading?: boolean;\n}\n\nexport const IdentityProviderButton: ForwardRefRenderFunction<HTMLButtonElement, Props> = ({\n children,\n iconUrl,\n imgAltText,\n idpType,\n customization,\n loading,\n ...rest\n}) => {\n const DEFAULT_BACKGROUND_COLOR = \"#FFFFFF\";\n const DEFAULT_BORDER_COLOR = \"#000000\";\n const DEFAULT_TEXT_COLOR = \"#000000\";\n const DEFAULT_FOCUS_OUTLINE_COLOR = \"var(--color-black50)\";\n const DEFAULT_HOVER_COLOR = \"var(--color-black10)\";\n const DEFAULT_PRESSED_COLOR = \"var(--color-black20)\";\n\n const generateCSSProperties = () => {\n return {\n \"--button-fill-primary-default-color\":\n customization?.backgroundColor ?? DEFAULT_BACKGROUND_COLOR,\n borderColor: customization?.borderColor ?? DEFAULT_BORDER_COLOR,\n \"--button-fill-text-color\": customization?.textColor ?? DEFAULT_TEXT_COLOR,\n \"--color-focus\": customization?.focusBorderColor ?? DEFAULT_FOCUS_OUTLINE_COLOR,\n \"--button-fill-primary-focused-color\":\n customization?.focusBackgroundColor ?? DEFAULT_BACKGROUND_COLOR,\n \"--button-fill-primary-hover-color\":\n customization?.hoverBackgroundColor ?? DEFAULT_HOVER_COLOR,\n \"--button-fill-primary-pressed-color\":\n customization?.pressedBackgroundColor ?? DEFAULT_PRESSED_COLOR\n } as CSSProperties;\n };\n\n return (\n <Button\n style={generateCSSProperties()}\n color=\"primary\"\n variant=\"fill\"\n className={classes[\"idp-button\"]}\n loading={loading}\n {...rest}\n >\n <span className={classes[\"idp-button--with-icon\"]}>\n <img\n height={24}\n width={24}\n aria-hidden={!imgAltText}\n src={iconUrl || `/ui-resources-static/common/idb/icons/${idpType}.svg`}\n alt={imgAltText || \"Identity Provider icon\"}\n />\n {children}\n </span>\n </Button>\n );\n};\n"],"names":["children","iconUrl","imgAltText","idpType","customization","loading","rest","DEFAULT_BACKGROUND_COLOR","React","createElement","Button","style","backgroundColor","borderColor","textColor","focusBorderColor","focusBackgroundColor","hoverBackgroundColor","pressedBackgroundColor","color","variant","className","classes","height","width","src","alt"],"mappings":"sOAsC0F,EACxFA,WACAC,UACAC,aACAC,UACAC,gBACAC,aACGC,MAEH,MAAMC,EAA2B,UAuBjC,OACEC,EAAAC,cAACC,EAAAA,OAAA,CACCC,MAjBK,CACL,6CACEP,WAAeQ,kBAAmBL,EACpCM,mBAAaT,WAAeS,cAVH,UAWzB,kCAA4BT,WAAeU,YAVpB,UAWvB,uBAAiBV,WAAeW,mBAVA,uBAWhC,6CACEX,WAAeY,uBAAwBT,EACzC,2CACEH,WAAea,uBAbO,uBAcxB,6CACEb,WAAec,yBAdS,wBAqB1BC,MAAM,UACNC,QAAQ,OACRC,UAAWC,EAAAA,QAAQ,cACnBjB,aACIC,GAEJE,EAAAC,cAAC,OAAA,CAAKY,UAAWC,EAAAA,QAAQ,0BACvBd,EAAAC,cAAC,MAAA,CACCc,OAAQ,GACRC,MAAO,GACP,eAActB,EACduB,IAAKxB,GAAW,yCAAyCE,QACzDuB,IAAKxB,GAAc,2BAEpBF"}
1
+ {"version":3,"file":"IdentityProviderButton.cjs.js","sources":["../../../src/components/miscellaneous/IdentityProviderButton.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, { ComponentPropsWithRef, CSSProperties, FunctionComponent } from \"react\";\nimport classes from \"./IdentityProviderButton.module.scss\";\nimport { Button } from \"../Button/Button\";\n\nexport interface SupportedCustomizationKeys {\n backgroundColor: string;\n focusBorderColor: string;\n focusBackgroundColor: string;\n hoverBackgroundColor: string;\n pressedBackgroundColor: string;\n textColor: string;\n borderColor: string;\n}\n\nexport interface Props extends Omit<ComponentPropsWithRef<\"button\">, \"color\"> {\n iconUrl?: string;\n imgAltText?: string;\n idpType: string;\n customization?: SupportedCustomizationKeys;\n loading?: boolean;\n}\n\nexport const IdentityProviderButton: FunctionComponent<Props> = ({\n children,\n iconUrl,\n imgAltText,\n idpType,\n customization,\n loading,\n ...rest\n}) => {\n const DEFAULT_BACKGROUND_COLOR = \"#FFFFFF\";\n const DEFAULT_BORDER_COLOR = \"#000000\";\n const DEFAULT_TEXT_COLOR = \"#000000\";\n const DEFAULT_FOCUS_OUTLINE_COLOR = \"var(--color-black50)\";\n const DEFAULT_HOVER_COLOR = \"var(--color-black10)\";\n const DEFAULT_PRESSED_COLOR = \"var(--color-black20)\";\n\n const generateCSSProperties = () => {\n return {\n \"--button-fill-primary-default-color\":\n customization?.backgroundColor ?? DEFAULT_BACKGROUND_COLOR,\n borderColor: customization?.borderColor ?? DEFAULT_BORDER_COLOR,\n \"--button-fill-text-color\": customization?.textColor ?? DEFAULT_TEXT_COLOR,\n \"--color-focus\": customization?.focusBorderColor ?? DEFAULT_FOCUS_OUTLINE_COLOR,\n \"--button-fill-primary-focused-color\":\n customization?.focusBackgroundColor ?? DEFAULT_BACKGROUND_COLOR,\n \"--button-fill-primary-hover-color\":\n customization?.hoverBackgroundColor ?? DEFAULT_HOVER_COLOR,\n \"--button-fill-primary-pressed-color\":\n customization?.pressedBackgroundColor ?? DEFAULT_PRESSED_COLOR\n } as CSSProperties;\n };\n\n return (\n <Button\n style={generateCSSProperties()}\n color=\"primary\"\n variant=\"fill\"\n className={classes[\"idp-button\"]}\n loading={loading}\n {...rest}\n >\n <span className={classes[\"idp-button--with-icon\"]}>\n <img\n height={24}\n width={24}\n aria-hidden={!imgAltText}\n src={iconUrl || `/ui-resources-static/common/idb/icons/${idpType}.svg`}\n alt={imgAltText || \"Identity Provider icon\"}\n />\n {children}\n </span>\n </Button>\n );\n};\n"],"names":["children","iconUrl","imgAltText","idpType","customization","loading","rest","DEFAULT_BACKGROUND_COLOR","React","createElement","Button","style","backgroundColor","borderColor","textColor","focusBorderColor","focusBackgroundColor","hoverBackgroundColor","pressedBackgroundColor","color","variant","className","classes","height","width","src","alt"],"mappings":"sOAsCgE,EAC9DA,WACAC,UACAC,aACAC,UACAC,gBACAC,aACGC,MAEH,MAAMC,EAA2B,UAuBjC,OACEC,EAAAC,cAACC,EAAAA,OAAA,CACCC,MAjBK,CACL,6CACEP,WAAeQ,kBAAmBL,EACpCM,mBAAaT,WAAeS,cAVH,UAWzB,kCAA4BT,WAAeU,YAVpB,UAWvB,uBAAiBV,WAAeW,mBAVA,uBAWhC,6CACEX,WAAeY,uBAAwBT,EACzC,2CACEH,WAAea,uBAbO,uBAcxB,6CACEb,WAAec,yBAdS,wBAqB1BC,MAAM,UACNC,QAAQ,OACRC,UAAWC,EAAAA,QAAQ,cACnBjB,aACIC,GAEJE,EAAAC,cAAC,OAAA,CAAKY,UAAWC,EAAAA,QAAQ,0BACvBd,EAAAC,cAAC,MAAA,CACCc,OAAQ,GACRC,MAAO,GACP,eAActB,EACduB,IAAKxB,GAAW,yCAAyCE,QACzDuB,IAAKxB,GAAc,2BAEpBF"}
@@ -1 +1 @@
1
- {"version":3,"file":"IdentityProviderButton.es.js","sources":["../../../src/components/miscellaneous/IdentityProviderButton.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, { ComponentPropsWithRef, CSSProperties, ForwardRefRenderFunction } from \"react\";\nimport classes from \"./IdentityProviderButton.module.scss\";\nimport { Button } from \"../Button/Button\";\n\nexport interface SupportedCustomizationKeys {\n backgroundColor: string;\n focusBorderColor: string;\n focusBackgroundColor: string;\n hoverBackgroundColor: string;\n pressedBackgroundColor: string;\n textColor: string;\n borderColor: string;\n}\n\nexport interface Props extends Omit<ComponentPropsWithRef<\"button\">, \"color\"> {\n iconUrl?: string;\n imgAltText?: string;\n idpType: string;\n customization?: SupportedCustomizationKeys;\n loading?: boolean;\n}\n\nexport const IdentityProviderButton: ForwardRefRenderFunction<HTMLButtonElement, Props> = ({\n children,\n iconUrl,\n imgAltText,\n idpType,\n customization,\n loading,\n ...rest\n}) => {\n const DEFAULT_BACKGROUND_COLOR = \"#FFFFFF\";\n const DEFAULT_BORDER_COLOR = \"#000000\";\n const DEFAULT_TEXT_COLOR = \"#000000\";\n const DEFAULT_FOCUS_OUTLINE_COLOR = \"var(--color-black50)\";\n const DEFAULT_HOVER_COLOR = \"var(--color-black10)\";\n const DEFAULT_PRESSED_COLOR = \"var(--color-black20)\";\n\n const generateCSSProperties = () => {\n return {\n \"--button-fill-primary-default-color\":\n customization?.backgroundColor ?? DEFAULT_BACKGROUND_COLOR,\n borderColor: customization?.borderColor ?? DEFAULT_BORDER_COLOR,\n \"--button-fill-text-color\": customization?.textColor ?? DEFAULT_TEXT_COLOR,\n \"--color-focus\": customization?.focusBorderColor ?? DEFAULT_FOCUS_OUTLINE_COLOR,\n \"--button-fill-primary-focused-color\":\n customization?.focusBackgroundColor ?? DEFAULT_BACKGROUND_COLOR,\n \"--button-fill-primary-hover-color\":\n customization?.hoverBackgroundColor ?? DEFAULT_HOVER_COLOR,\n \"--button-fill-primary-pressed-color\":\n customization?.pressedBackgroundColor ?? DEFAULT_PRESSED_COLOR\n } as CSSProperties;\n };\n\n return (\n <Button\n style={generateCSSProperties()}\n color=\"primary\"\n variant=\"fill\"\n className={classes[\"idp-button\"]}\n loading={loading}\n {...rest}\n >\n <span className={classes[\"idp-button--with-icon\"]}>\n <img\n height={24}\n width={24}\n aria-hidden={!imgAltText}\n src={iconUrl || `/ui-resources-static/common/idb/icons/${idpType}.svg`}\n alt={imgAltText || \"Identity Provider icon\"}\n />\n {children}\n </span>\n </Button>\n );\n};\n"],"names":[],"mappings":";;;AAsCO,MAAM,yBAA6E,CAAC;AAAA,EACzF;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,2BAA2B;AACjC,QAAM,uBAAuB;AAC7B,QAAM,qBAAqB;AAC3B,QAAM,8BAA8B;AACpC,QAAM,sBAAsB;AAC5B,QAAM,wBAAwB;AAE9B,QAAM,wBAAwB,MAAM;AAClC,WAAO;AAAA,MACL,wCACE,+CAAe,oBAAmB;AAAA,MACpC,cAAa,+CAAe,gBAAe;AAAA,MAC3C,6BAA4B,+CAAe,cAAa;AAAA,MACxD,kBAAiB,+CAAe,qBAAoB;AAAA,MACpD,wCACE,+CAAe,yBAAwB;AAAA,MACzC,sCACE,+CAAe,yBAAwB;AAAA,MACzC,wCACE,+CAAe,2BAA0B;AAAA,IAAA;AAAA,EAE/C;AAEA,SACE,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO,sBAAA;AAAA,MACP,OAAM;AAAA,MACN,SAAQ;AAAA,MACR,WAAW,QAAQ,YAAY;AAAA,MAC/B;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,IAEJ,sBAAA,cAAC,QAAA,EAAK,WAAW,QAAQ,uBAAuB,KAC9C,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,eAAa,CAAC;AAAA,QACd,KAAK,WAAW,yCAAyC,OAAO;AAAA,QAChE,KAAK,cAAc;AAAA,MAAA;AAAA,IAAA,GAEpB,QACH;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"IdentityProviderButton.es.js","sources":["../../../src/components/miscellaneous/IdentityProviderButton.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, { ComponentPropsWithRef, CSSProperties, FunctionComponent } from \"react\";\nimport classes from \"./IdentityProviderButton.module.scss\";\nimport { Button } from \"../Button/Button\";\n\nexport interface SupportedCustomizationKeys {\n backgroundColor: string;\n focusBorderColor: string;\n focusBackgroundColor: string;\n hoverBackgroundColor: string;\n pressedBackgroundColor: string;\n textColor: string;\n borderColor: string;\n}\n\nexport interface Props extends Omit<ComponentPropsWithRef<\"button\">, \"color\"> {\n iconUrl?: string;\n imgAltText?: string;\n idpType: string;\n customization?: SupportedCustomizationKeys;\n loading?: boolean;\n}\n\nexport const IdentityProviderButton: FunctionComponent<Props> = ({\n children,\n iconUrl,\n imgAltText,\n idpType,\n customization,\n loading,\n ...rest\n}) => {\n const DEFAULT_BACKGROUND_COLOR = \"#FFFFFF\";\n const DEFAULT_BORDER_COLOR = \"#000000\";\n const DEFAULT_TEXT_COLOR = \"#000000\";\n const DEFAULT_FOCUS_OUTLINE_COLOR = \"var(--color-black50)\";\n const DEFAULT_HOVER_COLOR = \"var(--color-black10)\";\n const DEFAULT_PRESSED_COLOR = \"var(--color-black20)\";\n\n const generateCSSProperties = () => {\n return {\n \"--button-fill-primary-default-color\":\n customization?.backgroundColor ?? DEFAULT_BACKGROUND_COLOR,\n borderColor: customization?.borderColor ?? DEFAULT_BORDER_COLOR,\n \"--button-fill-text-color\": customization?.textColor ?? DEFAULT_TEXT_COLOR,\n \"--color-focus\": customization?.focusBorderColor ?? DEFAULT_FOCUS_OUTLINE_COLOR,\n \"--button-fill-primary-focused-color\":\n customization?.focusBackgroundColor ?? DEFAULT_BACKGROUND_COLOR,\n \"--button-fill-primary-hover-color\":\n customization?.hoverBackgroundColor ?? DEFAULT_HOVER_COLOR,\n \"--button-fill-primary-pressed-color\":\n customization?.pressedBackgroundColor ?? DEFAULT_PRESSED_COLOR\n } as CSSProperties;\n };\n\n return (\n <Button\n style={generateCSSProperties()}\n color=\"primary\"\n variant=\"fill\"\n className={classes[\"idp-button\"]}\n loading={loading}\n {...rest}\n >\n <span className={classes[\"idp-button--with-icon\"]}>\n <img\n height={24}\n width={24}\n aria-hidden={!imgAltText}\n src={iconUrl || `/ui-resources-static/common/idb/icons/${idpType}.svg`}\n alt={imgAltText || \"Identity Provider icon\"}\n />\n {children}\n </span>\n </Button>\n );\n};\n"],"names":[],"mappings":";;;AAsCO,MAAM,yBAAmD,CAAC;AAAA,EAC/D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,2BAA2B;AACjC,QAAM,uBAAuB;AAC7B,QAAM,qBAAqB;AAC3B,QAAM,8BAA8B;AACpC,QAAM,sBAAsB;AAC5B,QAAM,wBAAwB;AAE9B,QAAM,wBAAwB,MAAM;AAClC,WAAO;AAAA,MACL,wCACE,+CAAe,oBAAmB;AAAA,MACpC,cAAa,+CAAe,gBAAe;AAAA,MAC3C,6BAA4B,+CAAe,cAAa;AAAA,MACxD,kBAAiB,+CAAe,qBAAoB;AAAA,MACpD,wCACE,+CAAe,yBAAwB;AAAA,MACzC,sCACE,+CAAe,yBAAwB;AAAA,MACzC,wCACE,+CAAe,2BAA0B;AAAA,IAAA;AAAA,EAE/C;AAEA,SACE,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO,sBAAA;AAAA,MACP,OAAM;AAAA,MACN,SAAQ;AAAA,MACR,WAAW,QAAQ,YAAY;AAAA,MAC/B;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,IAEJ,sBAAA,cAAC,QAAA,EAAK,WAAW,QAAQ,uBAAuB,KAC9C,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,eAAa,CAAC;AAAA,QACd,KAAK,WAAW,yCAAyC,OAAO;AAAA,QAChE,KAAK,cAAc;AAAA,MAAA;AAAA,IAAA,GAEpB,QACH;AAAA,EAAA;AAGN;"}
@@ -1,3 +1,3 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.IdentityProviderButton_sr-only_gLrTA{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.IdentityProviderButton_hidden_gLrTA{display:none}.IdentityProviderButton_slide-in_gLrTA{animation:IdentityProviderButton_slide-in_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.IdentityProviderButton_slide-in_gLrTA{animation-duration:.1ms}}.IdentityProviderButton_slide-out_gLrTA{animation:IdentityProviderButton_slide-out_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.IdentityProviderButton_slide-out_gLrTA{animation-duration:.1ms}}@keyframes IdentityProviderButton_slide-in_gLrTA{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes IdentityProviderButton_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 */.IdentityProviderButton_idp-button_gLrTA{width:100%}.IdentityProviderButton_idp-button--with-icon_gLrTA{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:-.125rem;margin-bottom:-.125rem}')),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"}}),exports.default={"idp-button":"IdentityProviderButton_idp-button_gLrTA","idp-button--with-icon":"IdentityProviderButton_idp-button--with-icon_gLrTA"};
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.IdentityProviderButton_sr-only_8eZbI{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.IdentityProviderButton_hidden_8eZbI{display:none}.IdentityProviderButton_slide-in_8eZbI{animation:IdentityProviderButton_slide-in_8eZbI .5s forwards}@media(prefers-reduced-motion:reduce){.IdentityProviderButton_slide-in_8eZbI{animation-duration:.1ms}}.IdentityProviderButton_slide-out_8eZbI{animation:IdentityProviderButton_slide-out_8eZbI .5s forwards}@media(prefers-reduced-motion:reduce){.IdentityProviderButton_slide-out_8eZbI{animation-duration:.1ms}}@keyframes IdentityProviderButton_slide-in_8eZbI{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes IdentityProviderButton_slide-out_8eZbI{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 */.IdentityProviderButton_idp-button_8eZbI{width:100%}.IdentityProviderButton_idp-button--with-icon_8eZbI{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:-.125rem;margin-bottom:-.125rem}')),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"}}),exports.default={"idp-button":"IdentityProviderButton_idp-button_8eZbI","idp-button--with-icon":"IdentityProviderButton_idp-button--with-icon_8eZbI"};
3
3
  //# sourceMappingURL=IdentityProviderButton.module.scss.cjs.js.map
@@ -1,7 +1,7 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.IdentityProviderButton_sr-only_gLrTA{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.IdentityProviderButton_hidden_gLrTA{display:none}.IdentityProviderButton_slide-in_gLrTA{animation:IdentityProviderButton_slide-in_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.IdentityProviderButton_slide-in_gLrTA{animation-duration:.1ms}}.IdentityProviderButton_slide-out_gLrTA{animation:IdentityProviderButton_slide-out_gLrTA .5s forwards}@media(prefers-reduced-motion:reduce){.IdentityProviderButton_slide-out_gLrTA{animation-duration:.1ms}}@keyframes IdentityProviderButton_slide-in_gLrTA{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes IdentityProviderButton_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 */.IdentityProviderButton_idp-button_gLrTA{width:100%}.IdentityProviderButton_idp-button--with-icon_gLrTA{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:-.125rem;margin-bottom:-.125rem}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.IdentityProviderButton_sr-only_8eZbI{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.IdentityProviderButton_hidden_8eZbI{display:none}.IdentityProviderButton_slide-in_8eZbI{animation:IdentityProviderButton_slide-in_8eZbI .5s forwards}@media(prefers-reduced-motion:reduce){.IdentityProviderButton_slide-in_8eZbI{animation-duration:.1ms}}.IdentityProviderButton_slide-out_8eZbI{animation:IdentityProviderButton_slide-out_8eZbI .5s forwards}@media(prefers-reduced-motion:reduce){.IdentityProviderButton_slide-out_8eZbI{animation-duration:.1ms}}@keyframes IdentityProviderButton_slide-in_8eZbI{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes IdentityProviderButton_slide-out_8eZbI{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 */.IdentityProviderButton_idp-button_8eZbI{width:100%}.IdentityProviderButton_idp-button--with-icon_8eZbI{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:-.125rem;margin-bottom:-.125rem}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
2
2
  const classes = {
3
- "idp-button": "IdentityProviderButton_idp-button_gLrTA",
4
- "idp-button--with-icon": "IdentityProviderButton_idp-button--with-icon_gLrTA"
3
+ "idp-button": "IdentityProviderButton_idp-button_8eZbI",
4
+ "idp-button--with-icon": "IdentityProviderButton_idp-button--with-icon_8eZbI"
5
5
  };
6
6
  export {
7
7
  classes as default
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=["CheckboxWrapper"],t=(e,r,t)=>{const n={};return e?(n.style={pointerEvents:"none",userSelect:"text"},t&&(n.helperText="")):t&&(n.helperText=t),r&&(n.type=r),n};exports.withReadOnly=(n,a)=>{const{isWrapperComponent:o}=a||{},p=e=>{const t=e=>{var r;("Enter"===(r=e).key||" "===r.key)&&(e.stopPropagation(),e.preventDefault())};if(e&&r.includes(n.displayName||n.name)){return{onKeyUp:e=>{t(e)},onKeyDown:e=>{t(e)}}}return{}},i=e.forwardRef((r,a)=>{const{readOnlyView:i=!1,required:l,children:s,helperText:d,type:y="",...u}=r;return e.createElement(n,{ref:a,...u,"data-readonlyview":i,"aria-readonly":o?void 0:i,required:!i&&l,...t(i,y,d),...p(i)},s)});return i.displayName=`withReadOnly_${(e=>e.displayName??e.name??"Component")(n)}`,i};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=new Set(["CheckboxWrapper"]),t=(e,r,t)=>{const n={};return e?(n.style={pointerEvents:"none",userSelect:"text"},t&&(n.helperText="")):t&&(n.helperText=t),r&&(n.type=r),n};exports.withReadOnly=(n,a)=>{const{isWrapperComponent:o}=a||{},p=e=>{const t=e=>{var r;("Enter"===(r=e).key||" "===r.key)&&(e.stopPropagation(),e.preventDefault())};if(e&&r.has(n.displayName||n.name)){return{onKeyUp:e=>{t(e)},onKeyDown:e=>{t(e)}}}return{}},i=e.forwardRef((r,a)=>{const{readOnlyView:i=!1,required:l,children:s,helperText:y,type:d="",...u}=r;return e.createElement(n,{ref:a,...u,"data-readonlyview":i,"aria-readonly":o?void 0:i,required:!i&&l,...t(i,d,y),...p(i)},s)});return i.displayName=`withReadOnly_${(e=>e.displayName??e.name??"Component")(n)}`,i};
2
2
  //# sourceMappingURL=withReadOnly.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"withReadOnly.cjs.js","sources":["../../src/components/withReadOnly.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, { ComponentType, ForwardedRef, PropsWithChildren, PropsWithoutRef } from \"react\";\n\nexport interface WithReadOnlyProps {\n readOnlyView?: boolean;\n required?: boolean;\n helperText?: string;\n type?: string;\n}\n\nconst componentsWithKeyEventsToPrevent: string[] = [\"CheckboxWrapper\"];\n\nconst getDisplayName = <P,>(WrappedComponent: ComponentType<P>) => {\n return WrappedComponent.displayName ?? WrappedComponent.name ?? \"Component\";\n};\n\nconst getConditionalProps = (readOnlyView: boolean, type: string, helperText?: string) => {\n const props: Record<string, unknown> = {};\n\n if (readOnlyView) {\n props.style = { pointerEvents: \"none\", userSelect: \"text\" };\n if (helperText) {\n props.helperText = \"\";\n }\n } else if (helperText) {\n props.helperText = helperText;\n }\n\n if (type) {\n props.type = type;\n }\n\n return props;\n};\n\ntype WithReadOnlyOptions = {\n isWrapperComponent: boolean;\n};\n\nexport const withReadOnly = <P extends object>(\n WrappedComponent: ComponentType<P>,\n options?: WithReadOnlyOptions\n) => {\n const { isWrapperComponent } = options || {};\n\n const preventKeyUpAndKeyDownHandlerForSpecificComponents = (readOnlyView: boolean) => {\n const preventSubmissionKeys = (e: KeyboardEvent) => {\n const isEnterOrSpace = (e: KeyboardEvent) => e.key === \"Enter\" || e.key === \" \";\n if (isEnterOrSpace(e)) {\n e.stopPropagation();\n e.preventDefault();\n }\n };\n\n if (\n readOnlyView &&\n componentsWithKeyEventsToPrevent.includes(\n WrappedComponent.displayName || WrappedComponent.name\n )\n ) {\n const props: Record<string, unknown> = {};\n\n props.onKeyUp = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n props.onKeyDown = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n return props;\n }\n\n return {};\n };\n\n const WithReadOnlyComponent = React.forwardRef(\n (\n props: PropsWithoutRef<PropsWithChildren<P & WithReadOnlyProps>>,\n ref: ForwardedRef<unknown>\n ) => {\n const {\n readOnlyView = false,\n required,\n children,\n helperText,\n type = \"\",\n ...restProps\n } = props;\n\n return (\n <WrappedComponent\n ref={ref}\n {...(restProps as P)}\n data-readonlyview={readOnlyView}\n aria-readonly={isWrapperComponent ? undefined : readOnlyView}\n required={readOnlyView ? false : required}\n {...getConditionalProps(readOnlyView, type, helperText)}\n {...preventKeyUpAndKeyDownHandlerForSpecificComponents(readOnlyView)}\n >\n {children}\n </WrappedComponent>\n );\n }\n );\n\n WithReadOnlyComponent.displayName = `withReadOnly_${getDisplayName(WrappedComponent)}`;\n return WithReadOnlyComponent;\n};\n"],"names":["componentsWithKeyEventsToPrevent","getConditionalProps","readOnlyView","type","helperText","props","style","pointerEvents","userSelect","WrappedComponent","options","isWrapperComponent","preventKeyUpAndKeyDownHandlerForSpecificComponents","preventSubmissionKeys","e","key","stopPropagation","preventDefault","includes","displayName","name","WithReadOnlyComponent","React","forwardRef","ref","required","children","restProps","createElement","getDisplayName"],"mappings":"yGAyBMA,EAA6C,CAAC,mBAM9CC,EAAsB,CAACC,EAAuBC,EAAcC,KAChE,MAAMC,EAAiC,CAAA,EAevC,OAbIH,GACFG,EAAMC,MAAQ,CAAEC,cAAe,OAAQC,WAAY,QAC/CJ,IACFC,EAAMD,WAAa,KAEZA,IACTC,EAAMD,WAAaA,GAGjBD,IACFE,EAAMF,KAAOA,GAGRE,wBAOmB,CAC1BI,EACAC,KAEA,MAAMC,mBAAEA,GAAuBD,GAAW,CAAA,EAEpCE,EAAsDV,IAC1D,MAAMW,EAAyBC,IACN,IAACA,GAA+B,WAA/BA,EACLA,GAD4BC,KAA6B,MAAVD,EAAEC,OAElED,EAAEE,kBACFF,EAAEG,mBAIN,GACEf,GACAF,EAAiCkB,SAC/BT,EAAiBU,aAAeV,EAAiBW,MAEnD,CAWA,MAVuC,CAEvCf,QAAiBS,IACfD,EAAsBC,IAGxBT,UAAmBS,IACjBD,EAAsBC,IAI1B,CAEA,MAAO,CAAA,GAGHO,EAAwBC,EAAMC,WAClC,CACElB,EACAmB,KAEA,MAAMtB,aACJA,GAAe,EAAAuB,SACfA,EAAAC,SACAA,EAAAtB,WACAA,EAAAD,KACAA,EAAO,MACJwB,GACDtB,EAEJ,OACEiB,EAAAM,cAACnB,EAAA,CACCe,SACKG,EACL,oBAAmBzB,EACnB,gBAAeS,OAAqB,EAAYT,EAChDuB,UAAUvB,GAAuBuB,KAC7BxB,EAAoBC,EAAcC,EAAMC,MACxCQ,EAAmDV,IAEtDwB,KAOT,OADAL,EAAsBF,YAAc,gBA9Ff,CAAKV,GACnBA,EAAiBU,aAAeV,EAAiBW,MAAQ,YA6FZS,CAAepB,KAC5DY"}
1
+ {"version":3,"file":"withReadOnly.cjs.js","sources":["../../src/components/withReadOnly.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, { ComponentType, ForwardedRef, PropsWithChildren, PropsWithoutRef } from \"react\";\n\nexport interface WithReadOnlyProps {\n readOnlyView?: boolean;\n required?: boolean;\n helperText?: string;\n type?: string;\n}\n\nconst componentsWithKeyEventsToPrevent = new Set<string>([\"CheckboxWrapper\"]);\n\nconst getDisplayName = <P,>(WrappedComponent: ComponentType<P>) => {\n return WrappedComponent.displayName ?? WrappedComponent.name ?? \"Component\";\n};\n\nconst getConditionalProps = (readOnlyView: boolean, type: string, helperText?: string) => {\n const props: Record<string, unknown> = {};\n\n if (readOnlyView) {\n props.style = { pointerEvents: \"none\", userSelect: \"text\" };\n if (helperText) {\n props.helperText = \"\";\n }\n } else if (helperText) {\n props.helperText = helperText;\n }\n\n if (type) {\n props.type = type;\n }\n\n return props;\n};\n\ntype WithReadOnlyOptions = {\n isWrapperComponent: boolean;\n};\n\nexport const withReadOnly = <P extends object>(\n WrappedComponent: ComponentType<P>,\n options?: WithReadOnlyOptions\n) => {\n const { isWrapperComponent } = options || {};\n\n const preventKeyUpAndKeyDownHandlerForSpecificComponents = (readOnlyView: boolean) => {\n const preventSubmissionKeys = (e: KeyboardEvent) => {\n const isEnterOrSpace = (e: KeyboardEvent) => e.key === \"Enter\" || e.key === \" \";\n if (isEnterOrSpace(e)) {\n e.stopPropagation();\n e.preventDefault();\n }\n };\n\n if (\n readOnlyView &&\n componentsWithKeyEventsToPrevent.has(WrappedComponent.displayName || WrappedComponent.name)\n ) {\n const props: Record<string, unknown> = {};\n\n props.onKeyUp = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n props.onKeyDown = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n return props;\n }\n\n return {};\n };\n\n const WithReadOnlyComponent = React.forwardRef(\n (\n props: PropsWithoutRef<PropsWithChildren<P & WithReadOnlyProps>>,\n ref: ForwardedRef<unknown>\n ) => {\n const {\n readOnlyView = false,\n required,\n children,\n helperText,\n type = \"\",\n ...restProps\n } = props;\n\n return (\n <WrappedComponent\n ref={ref}\n {...(restProps as P)}\n data-readonlyview={readOnlyView}\n aria-readonly={isWrapperComponent ? undefined : readOnlyView}\n required={readOnlyView ? false : required}\n {...getConditionalProps(readOnlyView, type, helperText)}\n {...preventKeyUpAndKeyDownHandlerForSpecificComponents(readOnlyView)}\n >\n {children}\n </WrappedComponent>\n );\n }\n );\n\n WithReadOnlyComponent.displayName = `withReadOnly_${getDisplayName(WrappedComponent)}`;\n return WithReadOnlyComponent;\n};\n"],"names":["componentsWithKeyEventsToPrevent","Set","getConditionalProps","readOnlyView","type","helperText","props","style","pointerEvents","userSelect","WrappedComponent","options","isWrapperComponent","preventKeyUpAndKeyDownHandlerForSpecificComponents","preventSubmissionKeys","e","key","stopPropagation","preventDefault","has","displayName","name","WithReadOnlyComponent","React","forwardRef","ref","required","children","restProps","createElement","getDisplayName"],"mappings":"yGAyBMA,EAAmC,IAAIC,IAAY,CAAC,oBAMpDC,EAAsB,CAACC,EAAuBC,EAAcC,KAChE,MAAMC,EAAiC,CAAA,EAevC,OAbIH,GACFG,EAAMC,MAAQ,CAAEC,cAAe,OAAQC,WAAY,QAC/CJ,IACFC,EAAMD,WAAa,KAEZA,IACTC,EAAMD,WAAaA,GAGjBD,IACFE,EAAMF,KAAOA,GAGRE,wBAOmB,CAC1BI,EACAC,KAEA,MAAMC,mBAAEA,GAAuBD,GAAW,CAAA,EAEpCE,EAAsDV,IAC1D,MAAMW,EAAyBC,IACN,IAACA,GAA+B,WAA/BA,EACLA,GAD4BC,KAA6B,MAAVD,EAAEC,OAElED,EAAEE,kBACFF,EAAEG,mBAIN,GACEf,GACAH,EAAiCmB,IAAIT,EAAiBU,aAAeV,EAAiBW,MACtF,CAWA,MAVuC,CAEvCf,QAAiBS,IACfD,EAAsBC,IAGxBT,UAAmBS,IACjBD,EAAsBC,IAI1B,CAEA,MAAO,CAAA,GAGHO,EAAwBC,EAAMC,WAClC,CACElB,EACAmB,KAEA,MAAMtB,aACJA,GAAe,EAAAuB,SACfA,EAAAC,SACAA,EAAAtB,WACAA,EAAAD,KACAA,EAAO,MACJwB,GACDtB,EAEJ,OACEiB,EAAAM,cAACnB,EAAA,CACCe,SACKG,EACL,oBAAmBzB,EACnB,gBAAeS,OAAqB,EAAYT,EAChDuB,UAAUvB,GAAuBuB,KAC7BxB,EAAoBC,EAAcC,EAAMC,MACxCQ,EAAmDV,IAEtDwB,KAOT,OADAL,EAAsBF,YAAc,gBA5Ff,CAAKV,GACnBA,EAAiBU,aAAeV,EAAiBW,MAAQ,YA2FZS,CAAepB,KAC5DY"}