@onewelcome/react-lib-components 12.1.0-alpha → 12.1.0-alpha.4
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.
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs.js +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs.js.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.es.js.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.cjs.js +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.es.js +5 -5
- package/dist/components/Button/BaseButton.cjs.js +1 -1
- package/dist/components/Button/BaseButton.cjs.js.map +1 -1
- package/dist/components/Button/BaseButton.es.js.map +1 -1
- package/dist/components/Button/BaseButton.module.scss.cjs.js +2 -2
- package/dist/components/Button/BaseButton.module.scss.es.js +4 -4
- package/dist/components/Button/Button.cjs.js +1 -1
- package/dist/components/Button/Button.cjs.js.map +1 -1
- package/dist/components/Button/Button.es.js.map +1 -1
- package/dist/components/Button/Button.module.scss.cjs.js +2 -2
- package/dist/components/Button/Button.module.scss.es.js +17 -17
- package/dist/components/Button/IconButton.cjs.js.map +1 -1
- package/dist/components/Button/IconButton.es.js.map +1 -1
- package/dist/components/Button/IconButton.module.scss.cjs.js +2 -2
- package/dist/components/Button/IconButton.module.scss.es.js +18 -18
- package/dist/components/Button/Spinner.cjs.js.map +1 -1
- package/dist/components/Button/Spinner.es.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.cjs.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.cjs.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.es.js +28 -11
- package/dist/components/ContextMenu/ContextMenu.es.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenu.module.scss.es.js +8 -5
- package/dist/components/ContextMenu/ContextMenu.module.scss.es.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenuDivider.cjs.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenuDivider.es.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenuDivider.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenuDivider.module.scss.es.js +2 -2
- package/dist/components/ContextMenu/ContextMenuItem.cjs.js +1 -1
- package/dist/components/ContextMenu/ContextMenuItem.cjs.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenuItem.es.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenuItem.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenuItem.module.scss.es.js +3 -3
- package/dist/components/ContextMenu/ContextMenuService.cjs.js +1 -1
- package/dist/components/ContextMenu/ContextMenuService.cjs.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenuService.es.js.map +1 -1
- package/dist/components/DataGrid/DataGrid.cjs.js +1 -1
- package/dist/components/DataGrid/DataGrid.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGrid.es.js.map +1 -1
- package/dist/components/DataGrid/DataGrid.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGrid.module.scss.es.js +6 -6
- package/dist/components/DataGrid/DataGridActions/DataGridActions.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridActions.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridActions.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.es.js +6 -6
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.es.js +7 -7
- package/dist/components/DataGrid/DataGridBody/DataGridBody.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridBody.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridBody.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.es.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.es.js +5 -5
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.es.js +4 -4
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.es.js +5 -5
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.es.js +2 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.es.js +24 -24
- package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridDateFilter.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridDateFilter.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.es.js +9 -9
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridSearchbar.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridSearchbar.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridSearchbar.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.es.js +8 -8
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbarWrapper.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbarWrapper.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.es.js +17 -17
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerInputSection.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerInputSection.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerInputSection.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimeService.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimeService.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/SideMenu.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/SideMenu.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/SideMenu.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/FilterKeyMapper.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/FilterKeyMapper.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/FilterKeyMapper.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.es.js +3 -3
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.es.js +7 -7
- package/dist/components/DatePicker/DatePicker.cjs.js +1 -1
- package/dist/components/DatePicker/DatePicker.cjs.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.es.js +1 -1
- package/dist/components/DatePicker/DatePicker.es.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.module.scss.cjs.js +2 -2
- package/dist/components/DatePicker/DatePicker.module.scss.es.js +31 -31
- package/dist/components/Form/Checkbox/Checkbox.cjs.js +1 -1
- package/dist/components/Form/Checkbox/Checkbox.cjs.js.map +1 -1
- package/dist/components/Form/Checkbox/Checkbox.es.js +1 -0
- package/dist/components/Form/Checkbox/Checkbox.es.js.map +1 -1
- package/dist/components/Form/Checkbox/Checkbox.module.scss.cjs.js +2 -2
- package/dist/components/Form/Checkbox/Checkbox.module.scss.es.js +13 -13
- package/dist/components/Form/Fieldset/Fieldset.cjs.js +1 -1
- package/dist/components/Form/Fieldset/Fieldset.cjs.js.map +1 -1
- package/dist/components/Form/Fieldset/Fieldset.es.js.map +1 -1
- package/dist/components/Form/Fieldset/Fieldset.module.scss.cjs.js +2 -2
- package/dist/components/Form/Fieldset/Fieldset.module.scss.es.js +5 -5
- package/dist/components/Form/FileUpload/FileItem/FileItem.cjs.js +1 -1
- package/dist/components/Form/FileUpload/FileItem/FileItem.cjs.js.map +1 -1
- package/dist/components/Form/FileUpload/FileItem/FileItem.es.js.map +1 -1
- package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.cjs.js +2 -2
- package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.es.js +18 -18
- package/dist/components/Form/FileUpload/FileUpload.cjs.js +1 -1
- package/dist/components/Form/FileUpload/FileUpload.cjs.js.map +1 -1
- package/dist/components/Form/FileUpload/FileUpload.es.js +18 -4
- package/dist/components/Form/FileUpload/FileUpload.es.js.map +1 -1
- package/dist/components/Form/FileUpload/FileUpload.module.scss.cjs.js +2 -2
- package/dist/components/Form/FileUpload/FileUpload.module.scss.es.js +16 -16
- package/dist/components/Form/Form.cjs.js +1 -1
- package/dist/components/Form/Form.cjs.js.map +1 -1
- package/dist/components/Form/Form.es.js.map +1 -1
- package/dist/components/Form/Form.module.scss.cjs.js +2 -2
- package/dist/components/Form/Form.module.scss.es.js +2 -2
- package/dist/components/Form/FormControl/FormControl.cjs.js +1 -1
- package/dist/components/Form/FormControl/FormControl.cjs.js.map +1 -1
- package/dist/components/Form/FormControl/FormControl.es.js.map +1 -1
- package/dist/components/Form/FormControl/FormControl.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormControl/FormControl.module.scss.es.js +13 -13
- package/dist/components/Form/FormErrorText/FormErrorText.cjs.js.map +1 -1
- package/dist/components/Form/FormErrorText/FormErrorText.es.js.map +1 -1
- package/dist/components/Form/FormErrorText/FormErrorText.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormErrorText/FormErrorText.module.scss.es.js +5 -5
- package/dist/components/Form/FormGroup/FormGroup.cjs.js +1 -1
- package/dist/components/Form/FormGroup/FormGroup.cjs.js.map +1 -1
- package/dist/components/Form/FormGroup/FormGroup.es.js.map +1 -1
- package/dist/components/Form/FormGroup/FormGroup.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormGroup/FormGroup.module.scss.es.js +3 -3
- package/dist/components/Form/FormHelperText/FormHelperText.cjs.js +1 -1
- package/dist/components/Form/FormHelperText/FormHelperText.cjs.js.map +1 -1
- package/dist/components/Form/FormHelperText/FormHelperText.es.js.map +1 -1
- package/dist/components/Form/FormHelperText/FormHelperText.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormHelperText/FormHelperText.module.scss.es.js +4 -4
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.cjs.js +1 -1
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.cjs.js.map +1 -1
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.es.js.map +1 -1
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.es.js +6 -6
- package/dist/components/Form/FormStatusIndicator/FormStatusIndicator.cjs.js.map +1 -1
- package/dist/components/Form/FormStatusIndicator/FormStatusIndicator.es.js.map +1 -1
- package/dist/components/Form/Input/Input.cjs.js +1 -1
- package/dist/components/Form/Input/Input.cjs.js.map +1 -1
- package/dist/components/Form/Input/Input.es.js +1 -0
- package/dist/components/Form/Input/Input.es.js.map +1 -1
- package/dist/components/Form/Input/Input.module.scss.cjs.js +2 -2
- package/dist/components/Form/Input/Input.module.scss.es.js +9 -9
- package/dist/components/Form/Label/Label.cjs.js +1 -1
- package/dist/components/Form/Label/Label.cjs.js.map +1 -1
- package/dist/components/Form/Label/Label.es.js.map +1 -1
- package/dist/components/Form/Label/Label.module.scss.cjs.js +2 -2
- package/dist/components/Form/Label/Label.module.scss.es.js +2 -2
- package/dist/components/Form/Radio/Radio.cjs.js +1 -1
- package/dist/components/Form/Radio/Radio.cjs.js.map +1 -1
- package/dist/components/Form/Radio/Radio.es.js +1 -0
- package/dist/components/Form/Radio/Radio.es.js.map +1 -1
- package/dist/components/Form/Radio/Radio.module.scss.cjs.js +2 -2
- package/dist/components/Form/Radio/Radio.module.scss.es.js +11 -11
- package/dist/components/Form/Select/MultiSelect/MultiOption.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiOption.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiOption.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiSelect.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiSelect.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiSelect.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.es.js +15 -15
- package/dist/components/Form/Select/MultiSelect/SelectButton.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/SelectButton.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/SelectButton.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.es.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.es.js +4 -4
- package/dist/components/Form/Select/MultiSelect/useArrowNavigation.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/useArrowNavigation.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/useArrowNavigation.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/useMultiSelect.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/useMultiSelect.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/useMultiSelect.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/useSearch.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/useSearch.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/useSearch.es.js.map +1 -1
- package/dist/components/Form/Select/Select.interfaces.cjs.js.map +1 -1
- package/dist/components/Form/Select/Select.interfaces.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Option.cjs.js +1 -1
- package/dist/components/Form/Select/SingleSelect/Option.cjs.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Option.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.cjs.js +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.cjs.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/SingleSelect/Select.module.scss.es.js +17 -17
- package/dist/components/Form/Select/SingleSelect/useArrowNavigation.cjs.js +1 -1
- package/dist/components/Form/Select/SingleSelect/useArrowNavigation.cjs.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/useArrowNavigation.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/useSearch.cjs.js +1 -1
- package/dist/components/Form/Select/SingleSelect/useSearch.cjs.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/useSearch.es.js.map +1 -1
- package/dist/components/Form/Select/useAddNewBtn.cjs.js +1 -1
- package/dist/components/Form/Select/useAddNewBtn.cjs.js.map +1 -1
- package/dist/components/Form/Select/useAddNewBtn.es.js.map +1 -1
- package/dist/components/Form/Select/useAddNewBtn.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/useAddNewBtn.module.scss.es.js +4 -4
- package/dist/components/Form/Select/useSelectPositionList.cjs.js +1 -1
- package/dist/components/Form/Select/useSelectPositionList.cjs.js.map +1 -1
- package/dist/components/Form/Select/useSelectPositionList.es.js.map +1 -1
- package/dist/components/Form/Textarea/Textarea.cjs.js +1 -1
- package/dist/components/Form/Textarea/Textarea.cjs.js.map +1 -1
- package/dist/components/Form/Textarea/Textarea.es.js +1 -0
- package/dist/components/Form/Textarea/Textarea.es.js.map +1 -1
- package/dist/components/Form/Textarea/Textarea.module.scss.cjs.js +2 -2
- package/dist/components/Form/Textarea/Textarea.module.scss.es.js +6 -6
- package/dist/components/Form/Toggle/Toggle.cjs.js +1 -1
- package/dist/components/Form/Toggle/Toggle.cjs.js.map +1 -1
- package/dist/components/Form/Toggle/Toggle.es.js.map +1 -1
- package/dist/components/Form/Toggle/Toggle.module.scss.cjs.js +2 -2
- package/dist/components/Form/Toggle/Toggle.module.scss.es.js +18 -18
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.es.js +9 -1
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.es.js +4 -4
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.es.js +9 -1
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.es.js +9 -1
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.es.js +10 -2
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.es.js +8 -8
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.es.js +6 -6
- package/dist/components/Icon/Icon.cjs.js +1 -1
- package/dist/components/Icon/Icon.cjs.js.map +1 -1
- package/dist/components/Icon/Icon.es.js.map +1 -1
- package/dist/components/Icon/Icon.module.scss.cjs.js +2 -2
- package/dist/components/Icon/Icon.module.scss.es.js +107 -107
- package/dist/components/InlineEditing/InlineCheckbox/InlineCheckbox.cjs.js +1 -1
- package/dist/components/InlineEditing/InlineCheckbox/InlineCheckbox.cjs.js.map +1 -1
- package/dist/components/InlineEditing/InlineCheckbox/InlineCheckbox.es.js +11 -9
- package/dist/components/InlineEditing/InlineCheckbox/InlineCheckbox.es.js.map +1 -1
- package/dist/components/InlineEditing/InlineEditingContext.cjs.js +1 -1
- package/dist/components/InlineEditing/InlineEditingContext.cjs.js.map +1 -1
- package/dist/components/InlineEditing/InlineEditingContext.es.js +40 -2
- package/dist/components/InlineEditing/InlineEditingContext.es.js.map +1 -1
- package/dist/components/InlineEditing/InlineEditingSelect/InlineSelect.cjs.js +1 -1
- package/dist/components/InlineEditing/InlineEditingSelect/InlineSelect.cjs.js.map +1 -1
- package/dist/components/InlineEditing/InlineEditingSelect/InlineSelect.es.js +13 -10
- package/dist/components/InlineEditing/InlineEditingSelect/InlineSelect.es.js.map +1 -1
- package/dist/components/Layout/Card/Card.cjs.js.map +1 -1
- package/dist/components/Layout/Card/Card.es.js.map +1 -1
- package/dist/components/Layout/Card/Card.module.scss.cjs.js +2 -2
- package/dist/components/Layout/Card/Card.module.scss.es.js +12 -12
- package/dist/components/Layout/ContentHeader/ContentHeader.cjs.js +1 -1
- package/dist/components/Layout/ContentHeader/ContentHeader.cjs.js.map +1 -1
- package/dist/components/Layout/ContentHeader/ContentHeader.es.js.map +1 -1
- package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.cjs.js +2 -2
- package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.es.js +12 -12
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.cjs.js.map +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.es.js.map +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.es.js +4 -4
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.cjs.js +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.cjs.js.map +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.es.js +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.es.js.map +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.es.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.cjs.js.map +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.es.js.map +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.es.js +3 -3
- package/dist/components/Link/Link.cjs.js +1 -1
- package/dist/components/Link/Link.cjs.js.map +1 -1
- package/dist/components/Link/Link.es.js.map +1 -1
- package/dist/components/Link/Link.module.scss.cjs.js +2 -2
- package/dist/components/Link/Link.module.scss.es.js +19 -16
- package/dist/components/Link/Link.module.scss.es.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.cjs.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.es.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.es.js +11 -11
- package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js +1 -1
- package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.es.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.cjs.js +1 -1
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.cjs.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.es.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.es.js +22 -22
- package/dist/components/Notifications/Alert/AlertProvider/AlertContext.cjs.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertProvider/AlertContext.es.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertProvider/AlertProvider.cjs.js +1 -1
- package/dist/components/Notifications/Alert/AlertProvider/AlertProvider.cjs.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertProvider/AlertProvider.es.js.map +1 -1
- package/dist/components/Notifications/Alert/useAlert.cjs.js.map +1 -1
- package/dist/components/Notifications/Alert/useAlert.es.js.map +1 -1
- package/dist/components/Notifications/Banner/Banner.cjs.js +1 -1
- package/dist/components/Notifications/Banner/Banner.cjs.js.map +1 -1
- package/dist/components/Notifications/Banner/Banner.es.js.map +1 -1
- package/dist/components/Notifications/Banner/Banner.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Banner/Banner.module.scss.es.js +9 -9
- package/dist/components/Notifications/BaseModal/BaseModal.cjs.js +1 -1
- package/dist/components/Notifications/BaseModal/BaseModal.cjs.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModal.es.js +1 -1
- package/dist/components/Notifications/BaseModal/BaseModal.es.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModal.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModal.module.scss.es.js +5 -5
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.cjs.js +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.cjs.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.es.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.es.js +4 -4
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.cjs.js +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.cjs.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.es.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.es.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.cjs.js +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.cjs.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.es.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.es.js +6 -6
- package/dist/components/Notifications/Dialog/Dialog.cjs.js +1 -1
- package/dist/components/Notifications/Dialog/Dialog.cjs.js.map +1 -1
- package/dist/components/Notifications/Dialog/Dialog.es.js +2 -2
- package/dist/components/Notifications/Dialog/Dialog.es.js.map +1 -1
- package/dist/components/Notifications/Dialog/Dialog.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/Dialog.module.scss.es.js +4 -4
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.cjs.js +1 -1
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.cjs.js.map +1 -1
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.es.js.map +1 -1
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.es.js +3 -3
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.cjs.js +1 -1
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.cjs.js.map +1 -1
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.es.js.map +1 -1
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.es.js +10 -10
- package/dist/components/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.cjs.js +1 -1
- package/dist/components/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.cjs.js.map +1 -1
- package/dist/components/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.es.js.map +1 -1
- package/dist/components/Notifications/DiscardChangesModal/DiscardChangesModal.cjs.js.map +1 -1
- package/dist/components/Notifications/DiscardChangesModal/DiscardChangesModal.es.js.map +1 -1
- package/dist/components/Notifications/NotificationProvider/NotificationContext.cjs.js +1 -1
- package/dist/components/Notifications/NotificationProvider/NotificationContext.cjs.js.map +1 -1
- package/dist/components/Notifications/NotificationProvider/NotificationContext.es.js +1 -1
- package/dist/components/Notifications/NotificationProvider/NotificationContext.es.js.map +1 -1
- package/dist/components/Notifications/NotificationProvider/NotificationService.es.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheet.cjs.js +1 -1
- package/dist/components/Notifications/SideSheet/SideSheet.cjs.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheet.es.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheet.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheet.module.scss.es.js +13 -13
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.cjs.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.es.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.es.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.cjs.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.es.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.es.js +2 -2
- package/dist/components/Notifications/SlideInModal/SlideInModal.cjs.js +1 -1
- package/dist/components/Notifications/SlideInModal/SlideInModal.cjs.js.map +1 -1
- package/dist/components/Notifications/SlideInModal/SlideInModal.es.js.map +1 -1
- package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.es.js +10 -10
- package/dist/components/Pagination/Pagination.cjs.js +1 -1
- package/dist/components/Pagination/Pagination.cjs.js.map +1 -1
- package/dist/components/Pagination/Pagination.es.js.map +1 -1
- package/dist/components/Pagination/Pagination.module.scss.cjs.js +2 -2
- package/dist/components/Pagination/Pagination.module.scss.es.js +14 -14
- package/dist/components/Popover/Popover.cjs.js +1 -1
- package/dist/components/Popover/Popover.cjs.js.map +1 -1
- package/dist/components/Popover/Popover.es.js.map +1 -1
- package/dist/components/Popover/Popover.module.scss.cjs.js +2 -2
- package/dist/components/Popover/Popover.module.scss.es.js +3 -3
- package/dist/components/ProgressBar/ProgressBar.cjs.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.cjs.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.es.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.module.scss.cjs.js +2 -2
- package/dist/components/ProgressBar/ProgressBar.module.scss.es.js +9 -9
- package/dist/components/RequiredSign/RequiredSign.cjs.js.map +1 -1
- package/dist/components/RequiredSign/RequiredSign.es.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.cjs.js +1 -1
- package/dist/components/Skeleton/Skeleton.cjs.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.es.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.module.scss.cjs.js +2 -2
- package/dist/components/Skeleton/Skeleton.module.scss.es.js +5 -5
- package/dist/components/Spinner/Spinner.cjs.js.map +1 -1
- package/dist/components/Spinner/Spinner.es.js.map +1 -1
- package/dist/components/Spinner/Spinner.module.scss.cjs.js +2 -2
- package/dist/components/Spinner/Spinner.module.scss.es.js +3 -3
- package/dist/components/Stepper/Step.cjs.js.map +1 -1
- package/dist/components/Stepper/Step.es.js.map +1 -1
- package/dist/components/Stepper/Step.module.scss.cjs.js +2 -2
- package/dist/components/Stepper/Step.module.scss.es.js +22 -22
- package/dist/components/Stepper/Stepper.cjs.js +1 -1
- package/dist/components/Stepper/Stepper.cjs.js.map +1 -1
- package/dist/components/Stepper/Stepper.es.js.map +1 -1
- package/dist/components/Stepper/Stepper.module.scss.cjs.js +2 -2
- package/dist/components/Stepper/Stepper.module.scss.es.js +4 -4
- package/dist/components/Tabs/Tab.cjs.js.map +1 -1
- package/dist/components/Tabs/Tab.es.js.map +1 -1
- package/dist/components/Tabs/Tab.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/Tab.module.scss.es.js +3 -3
- package/dist/components/Tabs/TabButton.cjs.js +1 -1
- package/dist/components/Tabs/TabButton.cjs.js.map +1 -1
- package/dist/components/Tabs/TabButton.es.js.map +1 -1
- package/dist/components/Tabs/TabButton.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/TabButton.module.scss.es.js +12 -12
- package/dist/components/Tabs/Tabs.cjs.js +1 -1
- package/dist/components/Tabs/Tabs.cjs.js.map +1 -1
- package/dist/components/Tabs/Tabs.es.js +61 -36
- package/dist/components/Tabs/Tabs.es.js.map +1 -1
- package/dist/components/Tabs/Tabs.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/Tabs.module.scss.es.js +10 -10
- package/dist/components/Tag/RemoveButton.cjs.js +1 -1
- package/dist/components/Tag/RemoveButton.cjs.js.map +1 -1
- package/dist/components/Tag/RemoveButton.es.js.map +1 -1
- package/dist/components/Tag/RemoveButton.module.scss.cjs.js +2 -2
- package/dist/components/Tag/RemoveButton.module.scss.es.js +3 -3
- package/dist/components/Tag/Tag.cjs.js +1 -1
- package/dist/components/Tag/Tag.cjs.js.map +1 -1
- package/dist/components/Tag/Tag.es.js.map +1 -1
- package/dist/components/Tag/Tag.module.scss.cjs.js +2 -2
- package/dist/components/Tag/Tag.module.scss.es.js +6 -6
- package/dist/components/TextEllipsis/TextEllipsis.cjs.js +1 -1
- package/dist/components/TextEllipsis/TextEllipsis.cjs.js.map +1 -1
- package/dist/components/TextEllipsis/TextEllipsis.es.js.map +1 -1
- package/dist/components/TextEllipsis/TextEllipsis.module.scss.cjs.js +2 -2
- package/dist/components/TextEllipsis/TextEllipsis.module.scss.es.js +3 -3
- package/dist/components/Tiles/Tile.cjs.js +1 -1
- package/dist/components/Tiles/Tile.cjs.js.map +1 -1
- package/dist/components/Tiles/Tile.es.js.map +1 -1
- package/dist/components/Tiles/Tile.module.scss.cjs.js +2 -2
- package/dist/components/Tiles/Tile.module.scss.es.js +8 -8
- package/dist/components/Tiles/Tiles.cjs.js +1 -1
- package/dist/components/Tiles/Tiles.cjs.js.map +1 -1
- package/dist/components/Tiles/Tiles.es.js.map +1 -1
- package/dist/components/Tiles/Tiles.module.scss.cjs.js +2 -2
- package/dist/components/Tiles/Tiles.module.scss.es.js +2 -2
- package/dist/components/Tooltip/Tooltip.cjs.js +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.es.js +1 -1
- package/dist/components/Tooltip/Tooltip.es.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.module.scss.cjs.js +2 -2
- package/dist/components/Tooltip/Tooltip.module.scss.es.js +27 -27
- package/dist/components/Typography/Typography.cjs.js +1 -1
- package/dist/components/Typography/Typography.cjs.js.map +1 -1
- package/dist/components/Typography/Typography.es.js.map +1 -1
- package/dist/components/Typography/Typography.module.scss.cjs.js +2 -2
- package/dist/components/Typography/Typography.module.scss.es.js +13 -13
- package/dist/components/_BaseStyling_/BaseStyling.cjs.js +1 -1
- package/dist/components/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
- package/dist/components/_BaseStyling_/BaseStyling.es.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNav.cjs.js +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNav.cjs.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNav.es.js +2 -0
- package/dist/components/admin/layout/LeftNav/LeftNav.es.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.es.js +5 -5
- package/dist/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.cjs.js +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.cjs.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.es.js +2 -0
- package/dist/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.es.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.cjs.js +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.cjs.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.es.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.es.js +14 -14
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.cjs.js +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.cjs.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.es.js +90 -2
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.es.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/useKeyboardNavigation.cjs.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNavItem/useKeyboardNavigation.es.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/useRefItems.cjs.js +1 -1
- package/dist/components/admin/layout/LeftNav/useRefItems.cjs.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/useRefItems.es.js.map +1 -1
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.cjs.js +1 -1
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.cjs.js.map +1 -1
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.es.js +1 -1
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.es.js.map +1 -1
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.es.js +3 -3
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.cjs.js +2 -0
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.cjs.js.map +1 -0
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.es.js +33 -0
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.es.js.map +1 -0
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.cjs.js +3 -0
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.cjs.js.map +1 -0
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.es.js +25 -0
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.es.js.map +1 -0
- package/dist/components/admin/layout/TopNavBar/TopNavBar.cjs.js +2 -0
- package/dist/components/admin/layout/TopNavBar/TopNavBar.cjs.js.map +1 -0
- package/dist/components/admin/layout/TopNavBar/TopNavBar.es.js +45 -0
- package/dist/components/admin/layout/TopNavBar/TopNavBar.es.js.map +1 -0
- package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.cjs.js +3 -0
- package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.cjs.js.map +1 -0
- package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.es.js +25 -0
- package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.es.js.map +1 -0
- package/dist/components/miscellaneous/IdentityProviderButton.cjs.js.map +1 -1
- package/dist/components/miscellaneous/IdentityProviderButton.es.js.map +1 -1
- package/dist/components/miscellaneous/IdentityProviderButton.module.scss.cjs.js +2 -2
- package/dist/components/miscellaneous/IdentityProviderButton.module.scss.es.js +3 -3
- package/dist/components/withReadOnly.cjs.js +1 -1
- package/dist/components/withReadOnly.cjs.js.map +1 -1
- package/dist/components/withReadOnly.es.js.map +1 -1
- package/dist/hooks/useAnimation.cjs.js +1 -1
- package/dist/hooks/useAnimation.cjs.js.map +1 -1
- package/dist/hooks/useAnimation.es.js.map +1 -1
- package/dist/hooks/useClickOutside.cjs.js +1 -1
- package/dist/hooks/useClickOutside.cjs.js.map +1 -1
- package/dist/hooks/useClickOutside.es.js.map +1 -1
- package/dist/hooks/useDebouncedCallback.cjs.js +1 -1
- package/dist/hooks/useDebouncedCallback.cjs.js.map +1 -1
- package/dist/hooks/useDebouncedCallback.es.js.map +1 -1
- package/dist/hooks/useDescribedBy.cjs.js +2 -0
- package/dist/hooks/useDescribedBy.cjs.js.map +1 -0
- package/dist/hooks/useDescribedBy.es.js +30 -0
- package/dist/hooks/useDescribedBy.es.js.map +1 -0
- package/dist/hooks/useDetermineStatusIcon.cjs.js.map +1 -1
- package/dist/hooks/useDetermineStatusIcon.es.js.map +1 -1
- package/dist/hooks/useFormSelector.cjs.js +1 -1
- package/dist/hooks/useFormSelector.cjs.js.map +1 -1
- package/dist/hooks/useFormSelector.es.js +11 -16
- package/dist/hooks/useFormSelector.es.js.map +1 -1
- package/dist/hooks/useFullHeightCollapse.cjs.js.map +1 -1
- package/dist/hooks/useFullHeightCollapse.es.js.map +1 -1
- package/dist/hooks/useGetDomRoot.cjs.js +1 -1
- package/dist/hooks/useGetDomRoot.cjs.js.map +1 -1
- package/dist/hooks/useGetDomRoot.es.js.map +1 -1
- package/dist/hooks/usePosition.cjs.js +1 -1
- package/dist/hooks/usePosition.cjs.js.map +1 -1
- package/dist/hooks/usePosition.es.js.map +1 -1
- package/dist/hooks/useRepeatFocus.cjs.js +1 -1
- package/dist/hooks/useRepeatFocus.cjs.js.map +1 -1
- package/dist/hooks/useRepeatFocus.es.js +6 -23
- package/dist/hooks/useRepeatFocus.es.js.map +1 -1
- package/dist/hooks/useRepeater.cjs.js +1 -1
- package/dist/hooks/useRepeater.cjs.js.map +1 -1
- package/dist/hooks/useRepeater.es.js.map +1 -1
- package/dist/hooks/useScreenSize.cjs.js +1 -1
- package/dist/hooks/useScreenSize.cjs.js.map +1 -1
- package/dist/hooks/useScreenSize.es.js.map +1 -1
- package/dist/hooks/useSpacing.cjs.js +1 -1
- package/dist/hooks/useSpacing.cjs.js.map +1 -1
- package/dist/hooks/useSpacing.es.js.map +1 -1
- package/dist/hooks/useUploadFile.cjs.js +1 -1
- package/dist/hooks/useUploadFile.cjs.js.map +1 -1
- package/dist/hooks/useUploadFile.es.js.map +1 -1
- package/dist/hooks/useWrapper.cjs.js.map +1 -1
- package/dist/hooks/useWrapper.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +48 -4
- package/dist/index.es.js +6 -0
- package/dist/index.es.js.map +1 -1
- package/dist/node_modules/tabbable/dist/index.esm.cjs.js +2 -0
- package/dist/node_modules/tabbable/dist/index.esm.cjs.js.map +1 -0
- package/dist/node_modules/tabbable/dist/index.esm.es.js +322 -0
- package/dist/node_modules/tabbable/dist/index.esm.es.js.map +1 -0
- package/dist/readyclasses.module.scss.cjs.js +2 -2
- package/dist/readyclasses.module.scss.es.js +5 -5
- package/dist/util/helper.cjs.js +1 -1
- package/dist/util/helper.cjs.js.map +1 -1
- package/dist/util/helper.es.js +1 -1
- package/dist/util/helper.es.js.map +1 -1
- package/dist/utils/focusManagement.cjs.js +2 -0
- package/dist/utils/focusManagement.cjs.js.map +1 -0
- package/dist/utils/focusManagement.es.js +8 -0
- package/dist/utils/focusManagement.es.js.map +1 -0
- package/dist/utils/statusUtils.cjs.js.map +1 -1
- package/dist/utils/statusUtils.es.js.map +1 -1
- package/dist/variables.cjs.js.map +1 -1
- package/dist/variables.es.js.map +1 -1
- package/package.json +26 -21
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonLeftNavItem.cjs.js","sources":["../../../../../../src/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n ForwardRefExoticComponent,\n ForwardRefRenderFunction,\n HTMLProps,\n MouseEvent,\n Ref,\n useEffect,\n useState\n} from \"react\";\nimport classes from \"./LeftNavItem.module.scss\";\nimport { MenuItem } from \"../LeftNav.interfaces\";\nimport { Icon, Icons } from \"../../../../Icon/Icon\";\nimport { useKeyboardNavigation } from \"./useKeyboardNavigation\";\nimport { UseRefItemsReturnType } from \"../useRefItems\";\nimport { LeftNavItemProps } from \"./LeftNavItem.interface\";\n\nexport interface Props extends HTMLProps<HTMLElement> {\n item: MenuItem;\n navigate: (path: string) => void;\n onItemClick?: (path?: string, button?: boolean) => void;\n refItems: UseRefItemsReturnType;\n NestedComponent: ForwardRefExoticComponent<LeftNavItemProps>;\n closeParentList?: () => void;\n internalLinkPrefix?: string;\n}\n\nconst chevronIconDataKey = { attributeKey: \"chevron-icon\", objectKey: \"chevronIcon\" };\n\nconst ButtonLeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, Props> = (\n {\n item,\n navigate,\n onItemClick,\n refItems,\n NestedComponent,\n closeParentList,\n internalLinkPrefix = \"\"\n },\n ref\n) => {\n const [expanded, setExpanded] = useState(false);\n const isActiveParent = !!item.items?.find(menuItem => menuItem.active);\n\n const onExpandIconClickHandler = () => {\n setExpanded(expanded => !expanded);\n };\n\n const { onKeyPressNavigation } = useKeyboardNavigation({\n refItems,\n item,\n closeParentList,\n onExpandIconClickHandler\n });\n\n const onButtonClickHandler = (event: MouseEvent<HTMLButtonElement>) => {\n const isChevronIcon = !!(event.target as HTMLElement).dataset[chevronIconDataKey.objectKey];\n if (!isChevronIcon && item.path && !item.disabled) {\n event.preventDefault();\n navigate(item.path);\n onItemClick?.(item.path, true);\n }\n };\n\n const onLinkClickHandler = (event: MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n };\n\n const openParentWithActiveElement = () => {\n if (isActiveParent) {\n setExpanded(true);\n }\n };\n\n useEffect(openParentWithActiveElement, [isActiveParent]);\n\n const getStylingClasses = () => {\n const buttonClasses = [classes[\"menu-item\"], classes[\"menu-button\"]];\n expanded && buttonClasses.push(classes[\"expanded\"]);\n (item.active || isActiveParent) && buttonClasses.push(classes[\"menu-item-active\"]);\n item.disabled && buttonClasses.push(classes[\"disabled\"]);\n const buttonWrapperClasses = [classes[\"menu-button-wrapper\"], classes[\"menu-list-item\"]];\n expanded && buttonWrapperClasses.push(classes[\"expanded\"]);\n item.active && buttonWrapperClasses.push(classes[\"menu-item-active\"]);\n return {\n buttonClasses,\n buttonWrapperClasses\n };\n };\n\n const { buttonClasses, buttonWrapperClasses } = getStylingClasses();\n const tabIndexActive = item.active ? 0 : -1;\n const tabIndex = item.disabled ? -1 : tabIndexActive;\n\n return (\n <li className={buttonWrapperClasses.join(\" \")} data-testid={item.key}>\n <button\n aria-controls={item.key}\n data-testid={`left-nav-item-${item.key}`}\n aria-expanded={expanded}\n ref={ref as Ref<HTMLButtonElement>}\n onKeyDown={onKeyPressNavigation}\n onClick={onButtonClickHandler}\n className={buttonClasses.join(\" \")}\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 {item.path ? (\n <a\n href={item.path ? internalLinkPrefix + item.path : \"\"}\n aria-current={item.active ? \"page\" : false}\n className={classes[\"menu-item-text\"]}\n onClick={onLinkClickHandler}\n tabIndex={-1}\n >\n {item.title}\n </a>\n ) : (\n <span className={classes[\"menu-item-text\"]}>{item.title}</span>\n )}\n </div>\n <Icon\n onClick={onExpandIconClickHandler}\n className={classes[\"menu-item-expand-icon\"]}\n icon={Icons.ChevronDown}\n {...{ [`data-${chevronIconDataKey.attributeKey}`]: \"true\" }}\n />\n </button>\n <ul\n id={item.key}\n style={{ maxHeight: expanded ? undefined : 0 }}\n className={classes[\"menu-list\"]}\n >\n {!item.disabled &&\n item.items?.map(item => (\n <NestedComponent\n ref={el => refItems.addElementReference(el, item.key)}\n key={item.key}\n closeParentList={() => setExpanded(false)}\n onKeyUp={onKeyPressNavigation}\n item={item}\n navigate={navigate}\n onItemClick={onItemClick}\n refItems={refItems}\n internalLinkPrefix={internalLinkPrefix}\n >\n {item.title}\n </NestedComponent>\n ))}\n </ul>\n </li>\n );\n};\n\nexport const ButtonLeftNavItem = React.forwardRef(ButtonLeftNavItemComponent);\n"],"names":["ButtonLeftNavItem","React","forwardRef","item","navigate","onItemClick","refItems","NestedComponent","closeParentList","internalLinkPrefix","ref","expanded","setExpanded","useState","isActiveParent","_a","items","find","menuItem","active","onExpandIconClickHandler","onKeyPressNavigation","useKeyboardNavigation","useEffect","buttonClasses","buttonWrapperClasses","classes","
|
|
1
|
+
{"version":3,"file":"ButtonLeftNavItem.cjs.js","sources":["../../../../../../src/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n ForwardRefExoticComponent,\n ForwardRefRenderFunction,\n HTMLProps,\n MouseEvent,\n Ref,\n useEffect,\n useState\n} from \"react\";\nimport classes from \"./LeftNavItem.module.scss\";\nimport { MenuItem } from \"../LeftNav.interfaces\";\nimport { Icon, Icons } from \"../../../../Icon/Icon\";\nimport { useKeyboardNavigation } from \"./useKeyboardNavigation\";\nimport { UseRefItemsReturnType } from \"../useRefItems\";\nimport { LeftNavItemProps } from \"./LeftNavItem.interface\";\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 NestedComponent: ForwardRefExoticComponent<LeftNavItemProps>;\n closeParentList?: () => void;\n internalLinkPrefix?: string;\n}\n\nconst chevronIconDataKey = { attributeKey: \"chevron-icon\", objectKey: \"chevronIcon\" };\n\nconst ButtonLeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, Props> = (\n {\n item,\n navigate,\n onItemClick,\n onNavigate,\n refItems,\n NestedComponent,\n closeParentList,\n internalLinkPrefix = \"\"\n },\n ref\n) => {\n const [expanded, setExpanded] = useState(false);\n const isActiveParent = !!item.items?.find(menuItem => menuItem.active);\n\n const onExpandIconClickHandler = () => {\n setExpanded(expanded => !expanded);\n };\n\n const { onKeyPressNavigation } = useKeyboardNavigation({\n refItems,\n item,\n closeParentList,\n onExpandIconClickHandler\n });\n\n const onButtonClickHandler = (event: MouseEvent<HTMLButtonElement>) => {\n const isChevronIcon = !!(event.target as HTMLElement).dataset[chevronIconDataKey.objectKey];\n if (!isChevronIcon && item.path && !item.disabled) {\n event.preventDefault();\n navigate(item.path);\n onItemClick?.(item.path, true);\n }\n };\n\n const onLinkClickHandler = (event: MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n };\n\n const openParentWithActiveElement = () => {\n if (isActiveParent) {\n setExpanded(true);\n }\n };\n\n useEffect(openParentWithActiveElement, [isActiveParent]);\n\n const getStylingClasses = () => {\n const buttonClasses = [classes[\"menu-item\"], classes[\"menu-button\"]];\n expanded && buttonClasses.push(classes[\"expanded\"]);\n (item.active || isActiveParent) && buttonClasses.push(classes[\"menu-item-active\"]);\n item.disabled && buttonClasses.push(classes[\"disabled\"]);\n const buttonWrapperClasses = [classes[\"menu-button-wrapper\"], classes[\"menu-list-item\"]];\n expanded && buttonWrapperClasses.push(classes[\"expanded\"]);\n item.active && buttonWrapperClasses.push(classes[\"menu-item-active\"]);\n return {\n buttonClasses,\n buttonWrapperClasses\n };\n };\n\n const { buttonClasses, buttonWrapperClasses } = getStylingClasses();\n const tabIndexActive = item.active ? 0 : -1;\n const tabIndex = item.disabled ? -1 : tabIndexActive;\n\n return (\n <li className={buttonWrapperClasses.join(\" \")} data-testid={item.key}>\n <button\n aria-controls={item.key}\n data-testid={`left-nav-item-${item.key}`}\n aria-expanded={expanded}\n ref={ref as Ref<HTMLButtonElement>}\n onKeyDown={onKeyPressNavigation}\n onClick={onButtonClickHandler}\n className={buttonClasses.join(\" \")}\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 {item.path ? (\n <a\n href={item.path ? internalLinkPrefix + item.path : \"\"}\n aria-current={item.active ? \"page\" : false}\n className={classes[\"menu-item-text\"]}\n onClick={onLinkClickHandler}\n tabIndex={-1}\n >\n {item.title}\n </a>\n ) : (\n <span className={classes[\"menu-item-text\"]}>{item.title}</span>\n )}\n </div>\n <Icon\n onClick={onExpandIconClickHandler}\n className={classes[\"menu-item-expand-icon\"]}\n icon={Icons.ChevronDown}\n {...{ [`data-${chevronIconDataKey.attributeKey}`]: \"true\" }}\n />\n </button>\n <ul\n id={item.key}\n style={{ maxHeight: expanded ? undefined : 0 }}\n className={classes[\"menu-list\"]}\n >\n {!item.disabled &&\n item.items?.map(item => (\n <NestedComponent\n ref={el => refItems.addElementReference(el, item.key)}\n key={item.key}\n closeParentList={() => setExpanded(false)}\n onKeyUp={onKeyPressNavigation}\n item={item}\n navigate={navigate}\n onItemClick={onItemClick}\n onNavigate={onNavigate}\n refItems={refItems}\n internalLinkPrefix={internalLinkPrefix}\n >\n {item.title}\n </NestedComponent>\n ))}\n </ul>\n </li>\n );\n};\n\nexport const ButtonLeftNavItem = React.forwardRef(ButtonLeftNavItemComponent);\n"],"names":["ButtonLeftNavItem","React","forwardRef","item","navigate","onItemClick","onNavigate","refItems","NestedComponent","closeParentList","internalLinkPrefix","ref","expanded","setExpanded","useState","isActiveParent","_a","items","find","menuItem","active","onExpandIconClickHandler","onKeyPressNavigation","useKeyboardNavigation","useEffect","buttonClasses","buttonWrapperClasses","classes","push","disabled","getStylingClasses","tabIndexActive","tabIndex","createElement","className","join","key","onKeyDown","onClick","event","target","dataset","path","preventDefault","iconComponent","cloneElement","href","title","Icon","icon","Icons","ChevronDown","id","style","maxHeight","_b","map","el","addElementReference","onKeyUp"],"mappings":"6OA+KaA,EAAoBC,EAAMC,WAlI0C,EAE7EC,OACAC,WACAC,cACAC,aACAC,WACAC,kBACAC,kBACAC,qBAAqB,IAEvBC,aAEA,MAAOC,EAAUC,GAAeC,EAAAA,UAAS,GACnCC,KAAmB,OAAAC,EAAAb,EAAKc,YAAL,EAAAD,EAAYE,KAAKC,GAAYA,EAASC,SAEzDC,EAA2B,KAC/BR,EAAYD,IAAaA,KAGrBU,qBAAEA,GAAyBC,wBAAsB,CACrDhB,WACAJ,OACAM,kBACAY,6BAsBFG,YANoC,KAC9BT,GACFF,GAAY,IAIuB,CAACE,IAExC,MAcMU,cAAEA,EAAAC,qBAAeA,GAdG,MACxB,MAAMD,EAAgB,CAACE,EAAAA,QAAQ,aAAcA,EAAAA,QAAQ,gBACrDf,GAAYa,EAAcG,KAAKD,EAAAA,QAAkB,WAChDxB,EAAKiB,QAAUL,IAAmBU,EAAcG,KAAKD,EAAAA,QAAQ,qBAC9DxB,EAAK0B,UAAYJ,EAAcG,KAAKD,EAAAA,QAAkB,UACtD,MAAMD,EAAuB,CAACC,EAAAA,QAAQ,uBAAwBA,EAAAA,QAAQ,mBAGtE,OAFAf,GAAYc,EAAqBE,KAAKD,EAAAA,QAAkB,UACxDxB,EAAKiB,QAAUM,EAAqBE,KAAKD,EAAAA,QAAQ,qBAC1C,CACLF,cAAAA,EACAC,qBAAAA,IAI4CI,GAC1CC,EAAiB5B,EAAKiB,OAAS,GAAI,EACnCY,EAAW7B,EAAK0B,UAAW,EAAKE,EAEtC,OACE9B,EAAAgC,cAAC,MAAGC,UAAWR,EAAqBS,KAAK,KAAM,cAAahC,EAAKiC,KAC/DnC,EAAAgC,cAAC,SAAA,CACC,gBAAe9B,EAAKiC,IACpB,cAAa,iBAAiBjC,EAAKiC,MACnC,gBAAexB,EACfD,MACA0B,UAAWf,EACXgB,QA/CwBC,IACHA,EAAMC,OAAuBC,QAAoC,cACpEtC,EAAKuC,MAASvC,EAAK0B,WACvCU,EAAMI,iBACNvC,EAASD,EAAKuC,MACd,MAAArC,GAAAA,EAAcF,EAAKuC,MAAM,KA2CvBR,UAAWT,EAAcU,KAAK,KAC9BN,SAAU1B,EAAK0B,SACfG,YAEA/B,EAAAgC,cAAC,OAAIC,UAAWP,UAAQ,2BACrBxB,EAAKyC,eACJ3C,EAAM4C,aAAa1C,EAAKyC,cAAe,CAAEV,UAAWP,UAAQ,oBAC7DxB,EAAKuC,KACJzC,EAAAgC,cAAC,IAAA,CACCa,KAAM3C,EAAKuC,KAAOhC,EAAqBP,EAAKuC,KAAO,GACnD,iBAAcvC,EAAKiB,QAAS,OAC5Bc,UAAWP,EAAAA,QAAQ,kBACnBW,QAnDgBC,IAC1BA,EAAMI,kBAmDIX,UAAU,GAET7B,EAAK4C,uBAGP,OAAA,CAAKb,UAAWP,UAAQ,mBAAoBxB,EAAK4C,QAGtD9C,EAAAgC,cAACe,EAAAA,KAAA,CACCV,QAASjB,EACTa,UAAWP,EAAAA,QAAQ,yBACnBsB,KAAMC,EAAAA,MAAMC,YACN,oBAA6C,UAGvDlD,EAAAgC,cAAC,KAAA,CACCmB,GAAIjD,EAAKiC,IACTiB,MAAO,CAAEC,UAAW1C,SAAuB,GAC3CsB,UAAWP,EAAAA,QAAQ,eAEjBxB,EAAK0B,WACL,OAAA0B,EAAApD,EAAKc,YAAL,EAAAsC,EAAYC,IAAIrD,GACdF,EAAAgC,cAACzB,EAAA,CACCG,IAAK8C,GAAMlD,EAASmD,oBAAoBD,EAAItD,EAAKiC,KACjDA,IAAKjC,EAAKiC,IACV3B,gBAAiB,IAAMI,GAAY,GACnC8C,QAASrC,EACTnB,KAAMA,EACNC,WACAC,cACAC,aACAC,WACAG,sBAECP,EAAK4C"}
|
|
@@ -7,6 +7,7 @@ const ButtonLeftNavItemComponent = ({
|
|
|
7
7
|
item,
|
|
8
8
|
navigate,
|
|
9
9
|
onItemClick,
|
|
10
|
+
onNavigate,
|
|
10
11
|
refItems,
|
|
11
12
|
NestedComponent,
|
|
12
13
|
closeParentList,
|
|
@@ -107,6 +108,7 @@ const ButtonLeftNavItemComponent = ({
|
|
|
107
108
|
item: item2,
|
|
108
109
|
navigate,
|
|
109
110
|
onItemClick,
|
|
111
|
+
onNavigate,
|
|
110
112
|
refItems,
|
|
111
113
|
internalLinkPrefix
|
|
112
114
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonLeftNavItem.es.js","sources":["../../../../../../src/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n ForwardRefExoticComponent,\n ForwardRefRenderFunction,\n HTMLProps,\n MouseEvent,\n Ref,\n useEffect,\n useState\n} from \"react\";\nimport classes from \"./LeftNavItem.module.scss\";\nimport { MenuItem } from \"../LeftNav.interfaces\";\nimport { Icon, Icons } from \"../../../../Icon/Icon\";\nimport { useKeyboardNavigation } from \"./useKeyboardNavigation\";\nimport { UseRefItemsReturnType } from \"../useRefItems\";\nimport { LeftNavItemProps } from \"./LeftNavItem.interface\";\n\nexport interface Props extends HTMLProps<HTMLElement> {\n item: MenuItem;\n navigate: (path: string) => void;\n onItemClick?: (path?: string, button?: boolean) => void;\n refItems: UseRefItemsReturnType;\n NestedComponent: ForwardRefExoticComponent<LeftNavItemProps>;\n closeParentList?: () => void;\n internalLinkPrefix?: string;\n}\n\nconst chevronIconDataKey = { attributeKey: \"chevron-icon\", objectKey: \"chevronIcon\" };\n\nconst ButtonLeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, Props> = (\n {\n item,\n navigate,\n onItemClick,\n refItems,\n NestedComponent,\n closeParentList,\n internalLinkPrefix = \"\"\n },\n ref\n) => {\n const [expanded, setExpanded] = useState(false);\n const isActiveParent = !!item.items?.find(menuItem => menuItem.active);\n\n const onExpandIconClickHandler = () => {\n setExpanded(expanded => !expanded);\n };\n\n const { onKeyPressNavigation } = useKeyboardNavigation({\n refItems,\n item,\n closeParentList,\n onExpandIconClickHandler\n });\n\n const onButtonClickHandler = (event: MouseEvent<HTMLButtonElement>) => {\n const isChevronIcon = !!(event.target as HTMLElement).dataset[chevronIconDataKey.objectKey];\n if (!isChevronIcon && item.path && !item.disabled) {\n event.preventDefault();\n navigate(item.path);\n onItemClick?.(item.path, true);\n }\n };\n\n const onLinkClickHandler = (event: MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n };\n\n const openParentWithActiveElement = () => {\n if (isActiveParent) {\n setExpanded(true);\n }\n };\n\n useEffect(openParentWithActiveElement, [isActiveParent]);\n\n const getStylingClasses = () => {\n const buttonClasses = [classes[\"menu-item\"], classes[\"menu-button\"]];\n expanded && buttonClasses.push(classes[\"expanded\"]);\n (item.active || isActiveParent) && buttonClasses.push(classes[\"menu-item-active\"]);\n item.disabled && buttonClasses.push(classes[\"disabled\"]);\n const buttonWrapperClasses = [classes[\"menu-button-wrapper\"], classes[\"menu-list-item\"]];\n expanded && buttonWrapperClasses.push(classes[\"expanded\"]);\n item.active && buttonWrapperClasses.push(classes[\"menu-item-active\"]);\n return {\n buttonClasses,\n buttonWrapperClasses\n };\n };\n\n const { buttonClasses, buttonWrapperClasses } = getStylingClasses();\n const tabIndexActive = item.active ? 0 : -1;\n const tabIndex = item.disabled ? -1 : tabIndexActive;\n\n return (\n <li className={buttonWrapperClasses.join(\" \")} data-testid={item.key}>\n <button\n aria-controls={item.key}\n data-testid={`left-nav-item-${item.key}`}\n aria-expanded={expanded}\n ref={ref as Ref<HTMLButtonElement>}\n onKeyDown={onKeyPressNavigation}\n onClick={onButtonClickHandler}\n className={buttonClasses.join(\" \")}\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 {item.path ? (\n <a\n href={item.path ? internalLinkPrefix + item.path : \"\"}\n aria-current={item.active ? \"page\" : false}\n className={classes[\"menu-item-text\"]}\n onClick={onLinkClickHandler}\n tabIndex={-1}\n >\n {item.title}\n </a>\n ) : (\n <span className={classes[\"menu-item-text\"]}>{item.title}</span>\n )}\n </div>\n <Icon\n onClick={onExpandIconClickHandler}\n className={classes[\"menu-item-expand-icon\"]}\n icon={Icons.ChevronDown}\n {...{ [`data-${chevronIconDataKey.attributeKey}`]: \"true\" }}\n />\n </button>\n <ul\n id={item.key}\n style={{ maxHeight: expanded ? undefined : 0 }}\n className={classes[\"menu-list\"]}\n >\n {!item.disabled &&\n item.items?.map(item => (\n <NestedComponent\n ref={el => refItems.addElementReference(el, item.key)}\n key={item.key}\n closeParentList={() => setExpanded(false)}\n onKeyUp={onKeyPressNavigation}\n item={item}\n navigate={navigate}\n onItemClick={onItemClick}\n refItems={refItems}\n internalLinkPrefix={internalLinkPrefix}\n >\n {item.title}\n </NestedComponent>\n ))}\n </ul>\n </li>\n );\n};\n\nexport const ButtonLeftNavItem = React.forwardRef(ButtonLeftNavItemComponent);\n"],"names":["expanded","buttonClasses","buttonWrapperClasses","item"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"ButtonLeftNavItem.es.js","sources":["../../../../../../src/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n ForwardRefExoticComponent,\n ForwardRefRenderFunction,\n HTMLProps,\n MouseEvent,\n Ref,\n useEffect,\n useState\n} from \"react\";\nimport classes from \"./LeftNavItem.module.scss\";\nimport { MenuItem } from \"../LeftNav.interfaces\";\nimport { Icon, Icons } from \"../../../../Icon/Icon\";\nimport { useKeyboardNavigation } from \"./useKeyboardNavigation\";\nimport { UseRefItemsReturnType } from \"../useRefItems\";\nimport { LeftNavItemProps } from \"./LeftNavItem.interface\";\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 NestedComponent: ForwardRefExoticComponent<LeftNavItemProps>;\n closeParentList?: () => void;\n internalLinkPrefix?: string;\n}\n\nconst chevronIconDataKey = { attributeKey: \"chevron-icon\", objectKey: \"chevronIcon\" };\n\nconst ButtonLeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, Props> = (\n {\n item,\n navigate,\n onItemClick,\n onNavigate,\n refItems,\n NestedComponent,\n closeParentList,\n internalLinkPrefix = \"\"\n },\n ref\n) => {\n const [expanded, setExpanded] = useState(false);\n const isActiveParent = !!item.items?.find(menuItem => menuItem.active);\n\n const onExpandIconClickHandler = () => {\n setExpanded(expanded => !expanded);\n };\n\n const { onKeyPressNavigation } = useKeyboardNavigation({\n refItems,\n item,\n closeParentList,\n onExpandIconClickHandler\n });\n\n const onButtonClickHandler = (event: MouseEvent<HTMLButtonElement>) => {\n const isChevronIcon = !!(event.target as HTMLElement).dataset[chevronIconDataKey.objectKey];\n if (!isChevronIcon && item.path && !item.disabled) {\n event.preventDefault();\n navigate(item.path);\n onItemClick?.(item.path, true);\n }\n };\n\n const onLinkClickHandler = (event: MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n };\n\n const openParentWithActiveElement = () => {\n if (isActiveParent) {\n setExpanded(true);\n }\n };\n\n useEffect(openParentWithActiveElement, [isActiveParent]);\n\n const getStylingClasses = () => {\n const buttonClasses = [classes[\"menu-item\"], classes[\"menu-button\"]];\n expanded && buttonClasses.push(classes[\"expanded\"]);\n (item.active || isActiveParent) && buttonClasses.push(classes[\"menu-item-active\"]);\n item.disabled && buttonClasses.push(classes[\"disabled\"]);\n const buttonWrapperClasses = [classes[\"menu-button-wrapper\"], classes[\"menu-list-item\"]];\n expanded && buttonWrapperClasses.push(classes[\"expanded\"]);\n item.active && buttonWrapperClasses.push(classes[\"menu-item-active\"]);\n return {\n buttonClasses,\n buttonWrapperClasses\n };\n };\n\n const { buttonClasses, buttonWrapperClasses } = getStylingClasses();\n const tabIndexActive = item.active ? 0 : -1;\n const tabIndex = item.disabled ? -1 : tabIndexActive;\n\n return (\n <li className={buttonWrapperClasses.join(\" \")} data-testid={item.key}>\n <button\n aria-controls={item.key}\n data-testid={`left-nav-item-${item.key}`}\n aria-expanded={expanded}\n ref={ref as Ref<HTMLButtonElement>}\n onKeyDown={onKeyPressNavigation}\n onClick={onButtonClickHandler}\n className={buttonClasses.join(\" \")}\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 {item.path ? (\n <a\n href={item.path ? internalLinkPrefix + item.path : \"\"}\n aria-current={item.active ? \"page\" : false}\n className={classes[\"menu-item-text\"]}\n onClick={onLinkClickHandler}\n tabIndex={-1}\n >\n {item.title}\n </a>\n ) : (\n <span className={classes[\"menu-item-text\"]}>{item.title}</span>\n )}\n </div>\n <Icon\n onClick={onExpandIconClickHandler}\n className={classes[\"menu-item-expand-icon\"]}\n icon={Icons.ChevronDown}\n {...{ [`data-${chevronIconDataKey.attributeKey}`]: \"true\" }}\n />\n </button>\n <ul\n id={item.key}\n style={{ maxHeight: expanded ? undefined : 0 }}\n className={classes[\"menu-list\"]}\n >\n {!item.disabled &&\n item.items?.map(item => (\n <NestedComponent\n ref={el => refItems.addElementReference(el, item.key)}\n key={item.key}\n closeParentList={() => setExpanded(false)}\n onKeyUp={onKeyPressNavigation}\n item={item}\n navigate={navigate}\n onItemClick={onItemClick}\n onNavigate={onNavigate}\n refItems={refItems}\n internalLinkPrefix={internalLinkPrefix}\n >\n {item.title}\n </NestedComponent>\n ))}\n </ul>\n </li>\n );\n};\n\nexport const ButtonLeftNavItem = React.forwardRef(ButtonLeftNavItemComponent);\n"],"names":["expanded","buttonClasses","buttonWrapperClasses","item"],"mappings":";;;;AA2CA,MAAM,qBAAqB,EAAE,cAAc,gBAAgB,WAAW,cAAA;AAEtE,MAAM,6BAA2E,CAC/E;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,qBAAqB;AACvB,GACA,QACG;;AACH,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,QAAM,iBAAiB,CAAC,GAAC,UAAK,UAAL,mBAAY,KAAK,CAAA,aAAY,SAAS;AAE/D,QAAM,2BAA2B,MAAM;AACrC,gBAAY,CAAAA,cAAY,CAACA,SAAQ;AAAA,EACnC;AAEA,QAAM,EAAE,qBAAA,IAAyB,sBAAsB;AAAA,IACrD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,CACD;AAED,QAAM,uBAAuB,CAAC,UAAyC;AACrE,UAAM,gBAAgB,CAAC,CAAE,MAAM,OAAuB,QAAQ,mBAAmB,SAAS;AAC1F,QAAI,CAAC,iBAAiB,KAAK,QAAQ,CAAC,KAAK,UAAU;AACjD,YAAM,eAAA;AACN,eAAS,KAAK,IAAI;AAClB,iDAAc,KAAK,MAAM;AAAA,IAC3B;AAAA,EACF;AAEA,QAAM,qBAAqB,CAAC,UAAyC;AACnE,UAAM,eAAA;AAAA,EACR;AAEA,QAAM,8BAA8B,MAAM;AACxC,QAAI,gBAAgB;AAClB,kBAAY,IAAI;AAAA,IAClB;AAAA,EACF;AAEA,YAAU,6BAA6B,CAAC,cAAc,CAAC;AAEvD,QAAM,oBAAoB,MAAM;AAC9B,UAAMC,iBAAgB,CAAC,QAAQ,WAAW,GAAG,QAAQ,aAAa,CAAC;AACnE,gBAAYA,eAAc,KAAK,QAAQ,UAAU,CAAC;AAClD,KAAC,KAAK,UAAU,mBAAmBA,eAAc,KAAK,QAAQ,kBAAkB,CAAC;AACjF,SAAK,YAAYA,eAAc,KAAK,QAAQ,UAAU,CAAC;AACvD,UAAMC,wBAAuB,CAAC,QAAQ,qBAAqB,GAAG,QAAQ,gBAAgB,CAAC;AACvF,gBAAYA,sBAAqB,KAAK,QAAQ,UAAU,CAAC;AACzD,SAAK,UAAUA,sBAAqB,KAAK,QAAQ,kBAAkB,CAAC;AACpE,WAAO;AAAA,MACL,eAAAD;AAAAA,MACA,sBAAAC;AAAAA,IAAA;AAAA,EAEJ;AAEA,QAAM,EAAE,eAAe,qBAAA,IAAyB,kBAAA;AAChD,QAAM,iBAAiB,KAAK,SAAS,IAAI;AACzC,QAAM,WAAW,KAAK,WAAW,KAAK;AAEtC,SACE,sBAAA,cAAC,QAAG,WAAW,qBAAqB,KAAK,GAAG,GAAG,eAAa,KAAK,IAAA,GAC/D,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,iBAAe,KAAK;AAAA,MACpB,eAAa,iBAAiB,KAAK,GAAG;AAAA,MACtC,iBAAe;AAAA,MACf;AAAA,MACA,WAAW;AAAA,MACX,SAAS;AAAA,MACT,WAAW,cAAc,KAAK,GAAG;AAAA,MACjC,UAAU,KAAK;AAAA,MACf;AAAA,IAAA;AAAA,IAEA,sBAAA,cAAC,SAAI,WAAW,QAAQ,wBAAwB,EAAA,GAC7C,KAAK,iBACJ,MAAM,aAAa,KAAK,eAAe,EAAE,WAAW,QAAQ,gBAAgB,GAAG,GAChF,KAAK,OACJ,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAM,KAAK,OAAO,qBAAqB,KAAK,OAAO;AAAA,QACnD,gBAAc,KAAK,SAAS,SAAS;AAAA,QACrC,WAAW,QAAQ,gBAAgB;AAAA,QACnC,SAAS;AAAA,QACT,UAAU;AAAA,MAAA;AAAA,MAET,KAAK;AAAA,IAAA,wCAGP,QAAA,EAAK,WAAW,QAAQ,gBAAgB,EAAA,GAAI,KAAK,KAAM,CAE5D;AAAA,IACA,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAAS;AAAA,QACT,WAAW,QAAQ,uBAAuB;AAAA,QAC1C,MAAM,MAAM;AAAA,QACX,GAAG,EAAE,CAAC,QAAQ,mBAAmB,YAAY,EAAE,GAAG,OAAA;AAAA,MAAO;AAAA,IAAA;AAAA,EAC5D,GAEF,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,IAAI,KAAK;AAAA,MACT,OAAO,EAAE,WAAW,WAAW,SAAY,EAAA;AAAA,MAC3C,WAAW,QAAQ,WAAW;AAAA,IAAA;AAAA,IAE7B,CAAC,KAAK,cACL,UAAK,UAAL,mBAAY,IAAI,CAAAC,UACd,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAK,CAAA,OAAM,SAAS,oBAAoB,IAAIA,MAAK,GAAG;AAAA,QACpD,KAAKA,MAAK;AAAA,QACV,iBAAiB,MAAM,YAAY,KAAK;AAAA,QACxC,SAAS;AAAA,QACT,MAAMA;AAAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MAECA,MAAK;AAAA,IAAA;AAAA,EAET,CAEP;AAEJ;AAEO,MAAM,oBAAoB,MAAM,WAAW,0BAA0B;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./ButtonLeftNavItem.cjs.js"),r=require("./LinkLeftNavItem.cjs.js"),n=e.forwardRef((
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./ButtonLeftNavItem.cjs.js"),r=require("./LinkLeftNavItem.cjs.js"),n=e.forwardRef((o,a)=>{var i;return(null==(i=o.item.items)?void 0:i.length)?e.createElement(t.ButtonLeftNavItem,{...o,ref:a,NestedComponent:n}):e.createElement(r.LinkLeftNavItem,{...o,ref:a})});exports.LeftNavItem=n;
|
|
2
2
|
//# sourceMappingURL=LeftNavItem.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeftNavItem.cjs.js","sources":["../../../../../../src/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.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 } from \"react\";\nimport { ButtonLeftNavItem } from \"./ButtonLeftNavItem\";\nimport { LinkLeftNavItem } from \"./LinkLeftNavItem\";\nimport { LeftNavItemProps } from \"./LeftNavItem.interface\";\n\nconst LeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, LeftNavItemProps> = (\n props,\n ref\n) => {\n const shouldBeButton = !!(props.item.items?.length ?? 0 >= 1);\n return shouldBeButton ? (\n <ButtonLeftNavItem {...props} ref={ref} NestedComponent={LeftNavItem} />\n ) : (\n <LinkLeftNavItem {...props} ref={ref} />\n );\n};\n\nexport const LeftNavItem = React.forwardRef(LeftNavItemComponent);\n"],"names":["LeftNavItem","React","forwardRef","props","ref","_a","item","items","length","createElement","ButtonLeftNavItem","NestedComponent","LinkLeftNavItem"],"mappings":"uLAiCaA,EAAcC,EAAMC,
|
|
1
|
+
{"version":3,"file":"LeftNavItem.cjs.js","sources":["../../../../../../src/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.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 } from \"react\";\nimport { ButtonLeftNavItem } from \"./ButtonLeftNavItem\";\nimport { LinkLeftNavItem } from \"./LinkLeftNavItem\";\nimport { LeftNavItemProps } from \"./LeftNavItem.interface\";\n\nconst LeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, LeftNavItemProps> = (\n props,\n ref\n) => {\n const shouldBeButton = !!(props.item.items?.length ?? 0 >= 1);\n return shouldBeButton ? (\n <ButtonLeftNavItem {...props} ref={ref} NestedComponent={LeftNavItem} />\n ) : (\n <LinkLeftNavItem {...props} ref={ref} />\n );\n};\n\nexport const LeftNavItem = React.forwardRef(LeftNavItemComponent);\n"],"names":["LeftNavItem","React","forwardRef","props","ref","_a","item","items","length","createElement","ButtonLeftNavItem","NestedComponent","LinkLeftNavItem"],"mappings":"uLAiCaA,EAAcC,EAAMC,WAZqD,CACpFC,EACAC,WAGA,OAD0B,OAAAC,EAAAF,EAAMG,KAAKC,YAAX,EAAAF,EAAkBG,UAE1CC,cAACC,EAAAA,kBAAA,IAAsBP,EAAOC,MAAUO,gBAAiBX,MAEzDS,cAACG,EAAAA,gBAAA,IAAoBT,EAAOC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeftNavItem.es.js","sources":["../../../../../../src/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.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 } from \"react\";\nimport { ButtonLeftNavItem } from \"./ButtonLeftNavItem\";\nimport { LinkLeftNavItem } from \"./LinkLeftNavItem\";\nimport { LeftNavItemProps } from \"./LeftNavItem.interface\";\n\nconst LeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, LeftNavItemProps> = (\n props,\n ref\n) => {\n const shouldBeButton = !!(props.item.items?.length ?? 0 >= 1);\n return shouldBeButton ? (\n <ButtonLeftNavItem {...props} ref={ref} NestedComponent={LeftNavItem} />\n ) : (\n <LinkLeftNavItem {...props} ref={ref} />\n );\n};\n\nexport const LeftNavItem = React.forwardRef(LeftNavItemComponent);\n"],"names":[],"mappings":";;;AAqBA,MAAM,uBAAgF,CACpF,OACA,QACG;;AACH,QAAM,iBAAiB,CAAC,IAAE,WAAM,KAAK,UAAX,mBAAkB,WAAU,KAAK;AAC3D,SAAO,iBACL,sBAAA,cAAC,
|
|
1
|
+
{"version":3,"file":"LeftNavItem.es.js","sources":["../../../../../../src/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.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 } from \"react\";\nimport { ButtonLeftNavItem } from \"./ButtonLeftNavItem\";\nimport { LinkLeftNavItem } from \"./LinkLeftNavItem\";\nimport { LeftNavItemProps } from \"./LeftNavItem.interface\";\n\nconst LeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, LeftNavItemProps> = (\n props,\n ref\n) => {\n const shouldBeButton = !!(props.item.items?.length ?? 0 >= 1);\n return shouldBeButton ? (\n <ButtonLeftNavItem {...props} ref={ref} NestedComponent={LeftNavItem} />\n ) : (\n <LinkLeftNavItem {...props} ref={ref} />\n );\n};\n\nexport const LeftNavItem = React.forwardRef(LeftNavItemComponent);\n"],"names":[],"mappings":";;;AAqBA,MAAM,uBAAgF,CACpF,OACA,QACG;;AACH,QAAM,iBAAiB,CAAC,IAAE,WAAM,KAAK,UAAX,mBAAkB,WAAU,KAAK;AAC3D,SAAO,iBACL,sBAAA,cAAC,mBAAA,EAAmB,GAAG,OAAO,KAAU,iBAAiB,YAAA,CAAa,IAEtE,sBAAA,cAAC,iBAAA,EAAiB,GAAG,OAAO,KAAU;AAE1C;AAEO,MAAM,cAAc,MAAM,WAAW,oBAAoB;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.LeftNavItem_menu-
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.LeftNavItem_menu-button_SI2V3{background-color:transparent;border:0;font-family:var(--font-family)}.LeftNavItem_menu-button_SI2V3 a{color:inherit;text-decoration:inherit}.LeftNavItem_menu-button_SI2V3 a:hover,.LeftNavItem_menu-button_SI2V3 a:active,.LeftNavItem_menu-button_SI2V3 a:focus{color:inherit}.LeftNavItem_menu-link_SI2V3{text-decoration:none}.LeftNavItem_menu-button-wrapper_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3,.LeftNavItem_menu-button-wrapper_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>a{opacity:0;transform:translateY(-60px)}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3,.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li{opacity:0;animation-name:LeftNavItem_item-fade-in_SI2V3;animation-duration:.25s;animation-fill-mode:forwards}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(1),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(1){animation-delay:0ms}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(2),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(2){animation-delay:.1s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(3),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(3){animation-delay:.2s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(4),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(4){animation-delay:.3s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(5),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(5){animation-delay:.4s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(6),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(6){animation-delay:.5s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(7),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(7){animation-delay:.6s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(8),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(8){animation-delay:.7s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(9),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(9){animation-delay:.8s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(10),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(10){animation-delay:.9s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(11),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(11){animation-delay:1s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(12),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(12){animation-delay:1.1s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(13),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(13){animation-delay:1.2s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(14),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(14){animation-delay:1.3s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(15),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(15){animation-delay:1.4s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(16),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(16){animation-delay:1.5s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(17),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(17){animation-delay:1.6s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(18),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(18){animation-delay:1.7s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(19),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(19){animation-delay:1.8s}.LeftNavItem_menu-button-wrapper_SI2V3 .LeftNavItem_menu-button-wrapper_SI2V3 .LeftNavItem_menu-link_SI2V3{padding-left:2.5rem}.LeftNavItem_menu-list_SI2V3{padding:0;margin:0;overflow:hidden;max-height:100000px;list-style:none;text-align:left;transition:max-height .15s ease-in-out}.LeftNavItem_menu-list_SI2V3 .LeftNavItem_menu-item-text-wrapper_SI2V3{padding-left:2rem}.LeftNavItem_menu-list_SI2V3 a:focus-visible,.LeftNavItem_menu-list_SI2V3 button:focus-visible{outline-offset:-.0625rem}.LeftNavItem_menu-item_SI2V3{box-sizing:border-box;display:flex;padding:1.125rem 1rem;align-items:center;justify-content:space-between;width:100%;color:var(--color-blue-grey900);line-height:1.5rem;font-size:1rem;font-weight:400;transition:all .15s ease-in-out;cursor:pointer}.LeftNavItem_menu-item_SI2V3:focus-visible{outline-offset:-.0625rem}.LeftNavItem_menu-item_SI2V3 .LeftNavItem_menu-item-text-wrapper_SI2V3{display:flex}.LeftNavItem_menu-item_SI2V3 .LeftNavItem_menu-item-expand-icon_SI2V3{padding:.375rem;margin:-.375rem}.LeftNavItem_menu-item_SI2V3 .LeftNavItem_menu-item-icon_SI2V3{display:flex;align-items:center;justify-content:center;width:1.5rem;margin-right:.5rem;font-size:1.125rem}.LeftNavItem_menu-item-text_SI2V3{display:flex;align-items:center}.LeftNavItem_menu-item-expand-icon_SI2V3{font-size:.75rem;color:var(--color-blue-grey900);transition:all .15s ease-in-out}.LeftNavItem_menu-item_SI2V3.LeftNavItem_expanded_SI2V3 .LeftNavItem_menu-item-expand-icon_SI2V3{transform:rotate(180deg)}.LeftNavItem_menu-item_SI2V3 a{color:inherit}.LeftNavItem_menu-item_SI2V3:hover{background-color:var(--color-blue-grey50)}.LeftNavItem_menu-item_SI2V3:focus,.LeftNavItem_menu-item_SI2V3:active{color:inherit;background-color:var(--color-blue-grey100)}.LeftNavItem_menu-item_SI2V3.LeftNavItem_disabled_SI2V3{color:var(--color-blue-grey400);background-color:var(--color-blue-grey25);pointer-events:none}.LeftNavItem_menu-list-item_SI2V3{position:relative}.LeftNavItem_menu-list-item_SI2V3 a.LeftNavItem_menu-item_SI2V3{padding:.75rem 1rem;color:var(--color-blue-grey900)}.LeftNavItem_menu-list-item_SI2V3 a.LeftNavItem_menu-item-active_SI2V3{background-color:var(--left-nav-item-active-background-color)}.LeftNavItem_menu-list-item_SI2V3 a.LeftNavItem_menu-item-active_SI2V3:hover{background-color:var(--color-blue-grey50)}.LeftNavItem_menu-list-item_SI2V3 a.LeftNavItem_menu-item-active_SI2V3:focus,.LeftNavItem_menu-list-item_SI2V3 a.LeftNavItem_menu-item-active_SI2V3:active{background-color:var(--color-blue-grey100)}.LeftNavItem_menu-list-item_SI2V3 a.LeftNavItem_menu-item-active_SI2V3:before{content:"";height:100%;position:absolute;left:0;z-index:2;border-top-right-radius:.125rem;border-bottom-right-radius:.125rem;border-left:.25rem solid var(--left-nav-item-active-ribbon-color)}.LeftNavItem_menu-list-item_SI2V3 a.LeftNavItem_menu-item-active_SI2V3 .LeftNavItem_menu-item-text_SI2V3,.LeftNavItem_menu-list-item_SI2V3 button.LeftNavItem_menu-item-active_SI2V3 .LeftNavItem_menu-item-text_SI2V3{font-weight:700}@keyframes LeftNavItem_item-fade-in_SI2V3{0%{opacity:0;transform:translateY(-60px)}80%{opacity:.6}to{opacity:1;transform:translateY(0)}}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="LeftNavItem_expanded_SI2V3",t="LeftNavItem_disabled_SI2V3",m={"menu-button":"LeftNavItem_menu-button_SI2V3","menu-link":"LeftNavItem_menu-link_SI2V3","menu-button-wrapper":"LeftNavItem_menu-button-wrapper_SI2V3",expanded:e,"menu-list":"LeftNavItem_menu-list_SI2V3","menu-item-text-wrapper":"LeftNavItem_menu-item-text-wrapper_SI2V3","menu-item":"LeftNavItem_menu-item_SI2V3","menu-item-expand-icon":"LeftNavItem_menu-item-expand-icon_SI2V3","menu-item-icon":"LeftNavItem_menu-item-icon_SI2V3","menu-item-text":"LeftNavItem_menu-item-text_SI2V3",disabled:t,"menu-list-item":"LeftNavItem_menu-list-item_SI2V3","menu-item-active":"LeftNavItem_menu-item-active_SI2V3"};exports.default=m,exports.disabled=t,exports.expanded=e;
|
|
3
3
|
//# sourceMappingURL=LeftNavItem.module.scss.cjs.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.LeftNavItem_menu-
|
|
2
|
-
const expanded = "
|
|
3
|
-
const disabled = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.LeftNavItem_menu-button_SI2V3{background-color:transparent;border:0;font-family:var(--font-family)}.LeftNavItem_menu-button_SI2V3 a{color:inherit;text-decoration:inherit}.LeftNavItem_menu-button_SI2V3 a:hover,.LeftNavItem_menu-button_SI2V3 a:active,.LeftNavItem_menu-button_SI2V3 a:focus{color:inherit}.LeftNavItem_menu-link_SI2V3{text-decoration:none}.LeftNavItem_menu-button-wrapper_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3,.LeftNavItem_menu-button-wrapper_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>a{opacity:0;transform:translateY(-60px)}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3,.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li{opacity:0;animation-name:LeftNavItem_item-fade-in_SI2V3;animation-duration:.25s;animation-fill-mode:forwards}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(1),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(1){animation-delay:0ms}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(2),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(2){animation-delay:.1s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(3),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(3){animation-delay:.2s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(4),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(4){animation-delay:.3s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(5),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(5){animation-delay:.4s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(6),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(6){animation-delay:.5s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(7),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(7){animation-delay:.6s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(8),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(8){animation-delay:.7s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(9),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(9){animation-delay:.8s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(10),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(10){animation-delay:.9s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(11),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(11){animation-delay:1s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(12),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(12){animation-delay:1.1s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(13),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(13){animation-delay:1.2s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(14),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(14){animation-delay:1.3s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(15),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(15){animation-delay:1.4s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(16),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(16){animation-delay:1.5s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(17),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(17){animation-delay:1.6s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(18),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(18){animation-delay:1.7s}.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>.LeftNavItem_menu-button-wrapper_SI2V3:nth-child(19),.LeftNavItem_menu-button-wrapper_SI2V3.LeftNavItem_expanded_SI2V3>.LeftNavItem_menu-button_SI2V3+ul>li:nth-child(19){animation-delay:1.8s}.LeftNavItem_menu-button-wrapper_SI2V3 .LeftNavItem_menu-button-wrapper_SI2V3 .LeftNavItem_menu-link_SI2V3{padding-left:2.5rem}.LeftNavItem_menu-list_SI2V3{padding:0;margin:0;overflow:hidden;max-height:100000px;list-style:none;text-align:left;transition:max-height .15s ease-in-out}.LeftNavItem_menu-list_SI2V3 .LeftNavItem_menu-item-text-wrapper_SI2V3{padding-left:2rem}.LeftNavItem_menu-list_SI2V3 a:focus-visible,.LeftNavItem_menu-list_SI2V3 button:focus-visible{outline-offset:-.0625rem}.LeftNavItem_menu-item_SI2V3{box-sizing:border-box;display:flex;padding:1.125rem 1rem;align-items:center;justify-content:space-between;width:100%;color:var(--color-blue-grey900);line-height:1.5rem;font-size:1rem;font-weight:400;transition:all .15s ease-in-out;cursor:pointer}.LeftNavItem_menu-item_SI2V3:focus-visible{outline-offset:-.0625rem}.LeftNavItem_menu-item_SI2V3 .LeftNavItem_menu-item-text-wrapper_SI2V3{display:flex}.LeftNavItem_menu-item_SI2V3 .LeftNavItem_menu-item-expand-icon_SI2V3{padding:.375rem;margin:-.375rem}.LeftNavItem_menu-item_SI2V3 .LeftNavItem_menu-item-icon_SI2V3{display:flex;align-items:center;justify-content:center;width:1.5rem;margin-right:.5rem;font-size:1.125rem}.LeftNavItem_menu-item-text_SI2V3{display:flex;align-items:center}.LeftNavItem_menu-item-expand-icon_SI2V3{font-size:.75rem;color:var(--color-blue-grey900);transition:all .15s ease-in-out}.LeftNavItem_menu-item_SI2V3.LeftNavItem_expanded_SI2V3 .LeftNavItem_menu-item-expand-icon_SI2V3{transform:rotate(180deg)}.LeftNavItem_menu-item_SI2V3 a{color:inherit}.LeftNavItem_menu-item_SI2V3:hover{background-color:var(--color-blue-grey50)}.LeftNavItem_menu-item_SI2V3:focus,.LeftNavItem_menu-item_SI2V3:active{color:inherit;background-color:var(--color-blue-grey100)}.LeftNavItem_menu-item_SI2V3.LeftNavItem_disabled_SI2V3{color:var(--color-blue-grey400);background-color:var(--color-blue-grey25);pointer-events:none}.LeftNavItem_menu-list-item_SI2V3{position:relative}.LeftNavItem_menu-list-item_SI2V3 a.LeftNavItem_menu-item_SI2V3{padding:.75rem 1rem;color:var(--color-blue-grey900)}.LeftNavItem_menu-list-item_SI2V3 a.LeftNavItem_menu-item-active_SI2V3{background-color:var(--left-nav-item-active-background-color)}.LeftNavItem_menu-list-item_SI2V3 a.LeftNavItem_menu-item-active_SI2V3:hover{background-color:var(--color-blue-grey50)}.LeftNavItem_menu-list-item_SI2V3 a.LeftNavItem_menu-item-active_SI2V3:focus,.LeftNavItem_menu-list-item_SI2V3 a.LeftNavItem_menu-item-active_SI2V3:active{background-color:var(--color-blue-grey100)}.LeftNavItem_menu-list-item_SI2V3 a.LeftNavItem_menu-item-active_SI2V3:before{content:"";height:100%;position:absolute;left:0;z-index:2;border-top-right-radius:.125rem;border-bottom-right-radius:.125rem;border-left:.25rem solid var(--left-nav-item-active-ribbon-color)}.LeftNavItem_menu-list-item_SI2V3 a.LeftNavItem_menu-item-active_SI2V3 .LeftNavItem_menu-item-text_SI2V3,.LeftNavItem_menu-list-item_SI2V3 button.LeftNavItem_menu-item-active_SI2V3 .LeftNavItem_menu-item-text_SI2V3{font-weight:700}@keyframes LeftNavItem_item-fade-in_SI2V3{0%{opacity:0;transform:translateY(-60px)}80%{opacity:.6}to{opacity:1;transform:translateY(0)}}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
+
const expanded = "LeftNavItem_expanded_SI2V3";
|
|
3
|
+
const disabled = "LeftNavItem_disabled_SI2V3";
|
|
4
4
|
const classes = {
|
|
5
|
-
"menu-button": "LeftNavItem_menu-
|
|
6
|
-
"menu-link": "LeftNavItem_menu-
|
|
7
|
-
"menu-button-wrapper": "LeftNavItem_menu-button-
|
|
5
|
+
"menu-button": "LeftNavItem_menu-button_SI2V3",
|
|
6
|
+
"menu-link": "LeftNavItem_menu-link_SI2V3",
|
|
7
|
+
"menu-button-wrapper": "LeftNavItem_menu-button-wrapper_SI2V3",
|
|
8
8
|
expanded,
|
|
9
|
-
"menu-list": "LeftNavItem_menu-
|
|
10
|
-
"menu-item-text-wrapper": "LeftNavItem_menu-item-text-
|
|
11
|
-
"menu-item": "LeftNavItem_menu-
|
|
12
|
-
"menu-item-expand-icon": "LeftNavItem_menu-item-expand-
|
|
13
|
-
"menu-item-icon": "LeftNavItem_menu-item-
|
|
14
|
-
"menu-item-text": "LeftNavItem_menu-item-
|
|
9
|
+
"menu-list": "LeftNavItem_menu-list_SI2V3",
|
|
10
|
+
"menu-item-text-wrapper": "LeftNavItem_menu-item-text-wrapper_SI2V3",
|
|
11
|
+
"menu-item": "LeftNavItem_menu-item_SI2V3",
|
|
12
|
+
"menu-item-expand-icon": "LeftNavItem_menu-item-expand-icon_SI2V3",
|
|
13
|
+
"menu-item-icon": "LeftNavItem_menu-item-icon_SI2V3",
|
|
14
|
+
"menu-item-text": "LeftNavItem_menu-item-text_SI2V3",
|
|
15
15
|
disabled,
|
|
16
|
-
"menu-list-item": "LeftNavItem_menu-list-
|
|
17
|
-
"menu-item-active": "LeftNavItem_menu-item-
|
|
16
|
+
"menu-list-item": "LeftNavItem_menu-list-item_SI2V3",
|
|
17
|
+
"menu-item-active": "LeftNavItem_menu-item-active_SI2V3"
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
20
|
classes as default,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./LeftNavItem.module.scss.cjs.js"),a=require("../../../../Link/Link.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../../../../../utils/focusManagement.cjs.js"),n=require("./LeftNavItem.module.scss.cjs.js"),a=require("../../../../Link/Link.cjs.js"),s=require("./useKeyboardNavigation.cjs.js"),i=e.forwardRef(({item:i,onItemClick:o,onNavigate:r,refItems:c,closeParentList:l,navigate:m,internalLinkPrefix:u=""},d)=>{var f;const{onKeyPressNavigation:p}=s.useKeyboardNavigation({refItems:c,item:i,closeParentList:l}),{menuItemLinkClasses:v,menuLinkWrapperClasses:b}=(()=>{const e=[n.default["menu-item"],n.default["menu-link"]];return i.active&&e.push(n.default["menu-item-active"]),i.disabled&&e.push(n.default.disabled),{menuItemLinkClasses:e,menuLinkWrapperClasses:[n.default["menu-list-item"]]}})(),L=i.active?0:-1,E=i.disabled?-1:L;return e.createElement("li",{className:b.join(" "),"data-testid":`${i.key}`},(null==(f=i.path)?void 0:f.match(/^https?:\/\//))?e.createElement(a.Link,{ref:d,onKeyDown:p,"data-testid":`left-nav-item-${i.key}`,"aria-current":!!i.active&&"page","aria-disabled":i.disabled,className:v.join(" "),to:i.path??"",type:"external",disabled:i.disabled,tabIndex:E},e.createElement("div",{className:n.default["menu-item-text-wrapper"]},i.iconComponent&&e.cloneElement(i.iconComponent,{className:n.default["menu-item-icon"]}),e.createElement("span",{className:n.default["menu-item-text"]},i.title))):e.createElement("a",{ref:d,onKeyDown:p,onClick:e=>{if(e.preventDefault(),!i.disabled&&(null==o||o(i.path),i.path)){const e=i.path;m(e),setTimeout(()=>{if(r)r(e);else{const e=()=>{const e=document.querySelector('[role="main"], main');if(e)return e;const n=["#content","#main-content","#app-content",".content",".main-content"];for(const t of n){const e=document.querySelector(t);if(e)return e}const a=t.getTabbableElements(document.body);for(const t of a)if(t instanceof HTMLElement&&!t.closest("nav"))return t.closest("div, section, article, main")||t;return null};let n=0;const a=30;let s=!1,i=!1;const o=e=>{if(i)return void(i=!1);const t=e.target;t&&!t.closest("nav")&&(s=!0)},r=()=>{if(s)return document.removeEventListener("focusin",o),!1;n++;const c=e();if(c){const e=t.getTabbableElements(c)[0];return e?(s||(i=!0,e.focus()),document.removeEventListener("focusin",o),!0):(c.setAttribute("tabindex","-1"),s||(i=!0,c.focus()),document.removeEventListener("focusin",o),!0)}return n<a?setTimeout(r,100):document.removeEventListener("focusin",o),!1};setTimeout(()=>{document.addEventListener("focusin",o)},100),r()}},500)}},"data-testid":`left-nav-item-${i.key}`,"aria-current":!!i.active&&"page","aria-disabled":i.disabled,className:v.join(" "),href:i.path?u+i.path:"",tabIndex:E},e.createElement("div",{className:n.default["menu-item-text-wrapper"]},i.iconComponent&&e.cloneElement(i.iconComponent,{className:n.default["menu-item-icon"]}),e.createElement("span",{className:n.default["menu-item-text"]},i.title))))});exports.LinkLeftNavItem=i;
|
|
2
2
|
//# sourceMappingURL=LinkLeftNavItem.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkLeftNavItem.cjs.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 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 refItems: UseRefItemsReturnType;\n closeParentList?: () => void;\n internalLinkPrefix?: string;\n}\n\nconst LinkLeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, Props> = (\n { item, onItemClick, 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 item.path && navigate(item.path);\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":["LinkLeftNavItem","React","forwardRef","item","onItemClick","refItems","closeParentList","navigate","internalLinkPrefix","ref","onKeyPressNavigation","useKeyboardNavigation","menuItemLinkClasses","menuLinkWrapperClasses","classes","default","active","push","disabled","getStylingClasses","tabIndexActive","tabIndex","className","join","key","_a","path","match","createElement","Link","onKeyDown","to","type","iconComponent","cloneElement","title","onClick","event","preventDefault","href"],"mappings":"6OAyGaA,EAAkBC,EAAMC,YAzE0C,EAC3EC,OAAMC,cAAaC,WAAUC,kBAAiBC,WAAUC,qBAAqB,IAC/EC,WAEM,MAAAC,qBAAEA,GAAyBC,EAAAA,sBAAsB,CAAEN,WAAUF,OAAMG,qBAqBnEM,oBAAEA,EAAAC,uBAAqBA,GAXH,MAClBD,MAAAA,EAAsB,CAACE,EAAAC,QAAQ,aAAcD,EAAAA,QAAQ,cAIpD,OAHPX,EAAKa,QAAUJ,EAAoBK,KAAKH,EAAAC,QAAQ,qBAChDZ,EAAKe,UAAYN,EAAoBK,KAAKH,EAAAC,QAAkB,UAErD,CACLH,oBAAAA,EACAC,uBAH6B,CAACC,UAAQ,mBAIxC,EAGsDK,GAClDC,EAAiBjB,EAAKa,OAAS,GAAI,EACnCK,EAAWlB,EAAKe,UAAgB,EAAAE,yBAGnC,KAAG,CAAAE,UAAWT,EAAuBU,KAAK,KAAM,cAAa,GAAGpB,EAAKqB,QACnE,OAAAC,EAAAtB,EAAKuB,WAAM,EAAAD,EAAAE,MAAM,iBAChB1B,EAAA2B,cAACC,EAAAA,KAAA,CACCpB,MACAqB,UAAWpB,EACX,cAAa,iBAAiBP,EAAKqB,MACnC,iBAAcrB,EAAKa,QAAS,OAC5B,gBAAeb,EAAKe,SACpBI,UAAWV,EAAoBW,KAAK,KACpCQ,GAAI5B,EAAKuB,MAAQ,GACjBM,KAAK,WACLd,SAAUf,EAAKe,SACfG,cAEAO,cAAC,MAAI,CAAAN,UAAWR,EAAAA,QAAQ,2BACrBX,EAAK8B,eACJhC,EAAMiC,aAAa/B,EAAK8B,cAAe,CAAEX,UAAWR,EAAAC,QAAQ,oBAC7Dd,EAAA2B,cAAA,OAAA,CAAKN,UAAWR,EAAAA,QAAQ,mBAAoBX,EAAKgC,SAItDlC,EAAA2B,cAAC,IAAA,CACCnB,MACAqB,UAAWpB,EACX0B,QAhDoBC,IAC1BA,EAAMC,iBACDnC,EAAKe,WACR,MAAAd,GAAAA,EAAcD,EAAKuB,MACdvB,EAAAuB,MAAQnB,EAASJ,EAAKuB,MAAI,EA6C3B,cAAa,iBAAiBvB,EAAKqB,MACnC,iBAAcrB,EAAKa,QAAS,OAC5B,gBAAeb,EAAKe,SACpBI,UAAWV,EAAoBW,KAAK,KACpCgB,KAAMpC,EAAKuB,KAAOlB,EAAqBL,EAAKuB,KAAO,GACnDL,cAEAO,cAAC,MAAI,CAAAN,UAAWR,EAAAA,QAAQ,2BACrBX,EAAK8B,eACJhC,EAAMiC,aAAa/B,EAAK8B,cAAe,CAAEX,UAAWR,EAAAC,QAAQ,oBAC7Dd,EAAA2B,cAAA,OAAA,CAAKN,UAAWR,EAAAA,QAAQ,mBAAoBX,EAAKgC,SAI1D"}
|
|
1
|
+
{"version":3,"file":"LinkLeftNavItem.cjs.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":["LinkLeftNavItem","React","forwardRef","item","onItemClick","onNavigate","refItems","closeParentList","navigate","internalLinkPrefix","ref","onKeyPressNavigation","useKeyboardNavigation","menuItemLinkClasses","menuLinkWrapperClasses","classes","active","push","disabled","getStylingClasses","tabIndexActive","tabIndex","className","join","key","_a","path","match","createElement","Link","onKeyDown","to","type","iconComponent","cloneElement","title","onClick","event","preventDefault","setTimeout","findMainContent","semantic","document","querySelector","selectors","sel","el","allTabbable","getTabbableElements","body","HTMLElement","closest","attempts","maxAttempts","userHasTakenControl","isOurFocusChange","checkUserTookControl","e","target","tryFocusContent","removeEventListener","mainContent","firstTabbable","focus","setAttribute","addEventListener","href"],"mappings":"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"}
|
|
@@ -1,15 +1,103 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { getTabbableElements } from "../../../../../utils/focusManagement.es.js";
|
|
2
3
|
import classes from "./LeftNavItem.module.scss.es.js";
|
|
3
4
|
import { Link } from "../../../../Link/Link.es.js";
|
|
4
5
|
import { useKeyboardNavigation } from "./useKeyboardNavigation.es.js";
|
|
5
|
-
const LinkLeftNavItemComponent = ({ item, onItemClick, refItems, closeParentList, navigate, internalLinkPrefix = "" }, ref) => {
|
|
6
|
+
const LinkLeftNavItemComponent = ({ item, onItemClick, onNavigate, refItems, closeParentList, navigate, internalLinkPrefix = "" }, ref) => {
|
|
6
7
|
var _a;
|
|
7
8
|
const { onKeyPressNavigation } = useKeyboardNavigation({ refItems, item, closeParentList });
|
|
8
9
|
const onLinkClickHandler = (event) => {
|
|
9
10
|
event.preventDefault();
|
|
10
11
|
if (!item.disabled) {
|
|
11
12
|
onItemClick == null ? void 0 : onItemClick(item.path);
|
|
12
|
-
|
|
13
|
+
if (item.path) {
|
|
14
|
+
const path = item.path;
|
|
15
|
+
navigate(path);
|
|
16
|
+
setTimeout(() => {
|
|
17
|
+
if (onNavigate) {
|
|
18
|
+
onNavigate(path);
|
|
19
|
+
} else {
|
|
20
|
+
const findMainContent = () => {
|
|
21
|
+
const semantic = document.querySelector('[role="main"], main');
|
|
22
|
+
if (semantic) {
|
|
23
|
+
return semantic;
|
|
24
|
+
}
|
|
25
|
+
const selectors = [
|
|
26
|
+
"#content",
|
|
27
|
+
"#main-content",
|
|
28
|
+
"#app-content",
|
|
29
|
+
".content",
|
|
30
|
+
".main-content"
|
|
31
|
+
];
|
|
32
|
+
for (const sel of selectors) {
|
|
33
|
+
const el = document.querySelector(sel);
|
|
34
|
+
if (el) {
|
|
35
|
+
return el;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const allTabbable = getTabbableElements(document.body);
|
|
39
|
+
for (const el of allTabbable) {
|
|
40
|
+
if (el instanceof HTMLElement && !el.closest("nav")) {
|
|
41
|
+
return el.closest("div, section, article, main") || el;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
};
|
|
46
|
+
let attempts = 0;
|
|
47
|
+
const maxAttempts = 30;
|
|
48
|
+
let userHasTakenControl = false;
|
|
49
|
+
let isOurFocusChange = false;
|
|
50
|
+
const checkUserTookControl = (e) => {
|
|
51
|
+
if (isOurFocusChange) {
|
|
52
|
+
isOurFocusChange = false;
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const target = e.target;
|
|
56
|
+
if (target && !target.closest("nav")) {
|
|
57
|
+
userHasTakenControl = true;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const tryFocusContent = () => {
|
|
61
|
+
if (userHasTakenControl) {
|
|
62
|
+
document.removeEventListener("focusin", checkUserTookControl);
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
attempts++;
|
|
66
|
+
const mainContent = findMainContent();
|
|
67
|
+
if (mainContent) {
|
|
68
|
+
const tabbableElements = getTabbableElements(mainContent);
|
|
69
|
+
const firstTabbable = tabbableElements[0];
|
|
70
|
+
if (firstTabbable) {
|
|
71
|
+
if (!userHasTakenControl) {
|
|
72
|
+
isOurFocusChange = true;
|
|
73
|
+
firstTabbable.focus();
|
|
74
|
+
}
|
|
75
|
+
document.removeEventListener("focusin", checkUserTookControl);
|
|
76
|
+
return true;
|
|
77
|
+
} else {
|
|
78
|
+
mainContent.setAttribute("tabindex", "-1");
|
|
79
|
+
if (!userHasTakenControl) {
|
|
80
|
+
isOurFocusChange = true;
|
|
81
|
+
mainContent.focus();
|
|
82
|
+
}
|
|
83
|
+
document.removeEventListener("focusin", checkUserTookControl);
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (attempts < maxAttempts) {
|
|
88
|
+
setTimeout(tryFocusContent, 100);
|
|
89
|
+
} else {
|
|
90
|
+
document.removeEventListener("focusin", checkUserTookControl);
|
|
91
|
+
}
|
|
92
|
+
return false;
|
|
93
|
+
};
|
|
94
|
+
setTimeout(() => {
|
|
95
|
+
document.addEventListener("focusin", checkUserTookControl);
|
|
96
|
+
}, 100);
|
|
97
|
+
tryFocusContent();
|
|
98
|
+
}
|
|
99
|
+
}, 500);
|
|
100
|
+
}
|
|
13
101
|
}
|
|
14
102
|
};
|
|
15
103
|
const getStylingClasses = () => {
|
|
@@ -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 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 refItems: UseRefItemsReturnType;\n closeParentList?: () => void;\n internalLinkPrefix?: string;\n}\n\nconst LinkLeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, Props> = (\n { item, onItemClick, 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 item.path && navigate(item.path);\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":";;;;AAgCA,MAAM,2BAAyE,CAC7E,EAAE,MAAM,aAAa,UAAU,iBAAiB,UAAU,qBAAqB,GAAG,GAClF,QACG;;AACG,QAAA,EAAE,yBAAyB,sBAAsB,EAAE,UAAU,MAAM,iBAAiB;AAEpF,QAAA,qBAAqB,CAAC,UAAyC;AACnE,UAAM,eAAe;AACjB,QAAA,CAAC,KAAK,UAAU;AAClB,iDAAc,KAAK;AACd,WAAA,QAAQ,SAAS,KAAK,IAAI;AAAA,IAAA;AAAA,EAEnC;AAEA,QAAM,oBAAoB,MAAM;AAC9B,UAAMA,uBAAsB,CAAC,QAAQ,WAAW,GAAG,QAAQ,WAAW,CAAC;AACvE,SAAK,UAAUA,qBAAoB,KAAK,QAAQ,kBAAkB,CAAC;AACnE,SAAK,YAAYA,qBAAoB,KAAK,QAAQ,UAAU,CAAC;AAC7D,UAAMC,0BAAyB,CAAC,QAAQ,gBAAgB,CAAC;AAClD,WAAA;AAAA,MACL,qBAAAD;AAAAA,MACA,wBAAAC;AAAAA,IACF;AAAA,EACF;AAEA,QAAM,EAAE,qBAAqB,uBAAuB,IAAI,kBAAkB;AACpE,QAAA,iBAAiB,KAAK,SAAS,IAAI;AACnC,QAAA,WAAW,KAAK,WAAW,KAAK;AAEtC,6CACG,MAAG,EAAA,WAAW,uBAAuB,KAAK,GAAG,GAAG,eAAa,GAAG,KAAK,GAAG,GACtE,KAAA,UAAK,SAAL,mBAAW,MAAM,mBAChB,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,MACX,eAAa,iBAAiB,KAAK,GAAG;AAAA,MACtC,gBAAc,KAAK,SAAS,SAAS;AAAA,MACrC,iBAAe,KAAK;AAAA,MACpB,WAAW,oBAAoB,KAAK,GAAG;AAAA,MACvC,IAAI,KAAK,QAAQ;AAAA,MACjB,MAAK;AAAA,MACL,UAAU,KAAK;AAAA,MACf;AAAA,IAAA;AAAA,IAEA,sBAAA,cAAC,OAAI,EAAA,WAAW,QAAQ,wBAAwB,EAC7C,GAAA,KAAK,iBACJ,MAAM,aAAa,KAAK,eAAe,EAAE,WAAW,QAAQ,gBAAgB,EAAG,CAAA,GAChF,sBAAA,cAAA,QAAA,EAAK,WAAW,QAAQ,gBAAgB,EAAA,GAAI,KAAK,KAAM,CAC1D;AAAA,EAGF,IAAA,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,MACX,SAAS;AAAA,MACT,eAAa,iBAAiB,KAAK,GAAG;AAAA,MACtC,gBAAc,KAAK,SAAS,SAAS;AAAA,MACrC,iBAAe,KAAK;AAAA,MACpB,WAAW,oBAAoB,KAAK,GAAG;AAAA,MACvC,MAAM,KAAK,OAAO,qBAAqB,KAAK,OAAO;AAAA,MACnD;AAAA,IAAA;AAAA,IAEA,sBAAA,cAAC,OAAI,EAAA,WAAW,QAAQ,wBAAwB,EAC7C,GAAA,KAAK,iBACJ,MAAM,aAAa,KAAK,eAAe,EAAE,WAAW,QAAQ,gBAAgB,EAAG,CAAA,GAChF,sBAAA,cAAA,QAAA,EAAK,WAAW,QAAQ,gBAAgB,EAAA,GAAI,KAAK,KAAM,CAC1D;AAAA,EAAA,CAGN;AAEJ;AAEa,MAAA,kBAAkB,MAAM,WAAW,wBAAwB;"}
|
|
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":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useKeyboardNavigation.cjs.js","sources":["../../../../../../src/components/admin/layout/LeftNav/LeftNavItem/useKeyboardNavigation.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 { KeyboardEvent } from \"react\";\nimport { MenuItem } from \"../LeftNav.interfaces\";\nimport { UseRefItemsReturnType } from \"../useRefItems\";\n\ninterface Props {\n item: MenuItem;\n refItems: UseRefItemsReturnType;\n closeParentList?: () => void;\n onExpandIconClickHandler?: () => void;\n}\n\nexport const useKeyboardNavigation = ({\n refItems,\n item,\n closeParentList,\n onExpandIconClickHandler\n}: Props) => {\n const isButtonLeftNavItem = !!onExpandIconClickHandler;\n const onKeyPressNavigation = (e: KeyboardEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n if (e.code === \"Escape\" || e.code === \"ArrowLeft\") {\n e.preventDefault();\n e.stopPropagation();\n closeParentList?.();\n refItems.getParentElement(item.key)?.focus();\n }\n if (e.code === \"ArrowUp\") {\n e.preventDefault();\n e.stopPropagation();\n refItems.getPrevElementOnSameLevel(item.key)?.focus();\n }\n if (e.code === \"ArrowDown\") {\n e.preventDefault();\n e.stopPropagation();\n refItems.getNextElementOnSameLevel(item.key)?.focus();\n }\n if (e.code === \"Home\") {\n e.preventDefault();\n e.stopPropagation();\n refItems.getFirstElementOnSameLevel(item.key)?.focus();\n }\n if (e.code === \"End\") {\n e.preventDefault();\n e.stopPropagation();\n refItems.getLastElementOnSameLevel(item.key)?.focus();\n }\n if (e.code === \"Space\" || e.code === \"Enter\") {\n e.stopPropagation();\n e.preventDefault();\n isButtonLeftNavItem && refItems.getNextElement(item.key, true)?.focus();\n e.currentTarget.click();\n }\n if (e.code === \"ArrowRight\") {\n onExpandIconClickHandler?.();\n refItems.getNextElement(item.key, true)?.focus();\n }\n };\n\n return { onKeyPressNavigation };\n};\n"],"names":["refItems","item","closeParentList","onExpandIconClickHandler","isButtonLeftNavItem","onKeyPressNavigation","e","code","preventDefault","stopPropagation","_a","getParentElement","key","focus","_b","getPrevElementOnSameLevel","_c","getNextElementOnSameLevel","_d","getFirstElementOnSameLevel","_e","getLastElementOnSameLevel","_f","getNextElement","currentTarget","click","_g"],"mappings":"8GA2BqC,EACnCA,WACAC,OACAC,kBACAC,+
|
|
1
|
+
{"version":3,"file":"useKeyboardNavigation.cjs.js","sources":["../../../../../../src/components/admin/layout/LeftNav/LeftNavItem/useKeyboardNavigation.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 { KeyboardEvent } from \"react\";\nimport { MenuItem } from \"../LeftNav.interfaces\";\nimport { UseRefItemsReturnType } from \"../useRefItems\";\n\ninterface Props {\n item: MenuItem;\n refItems: UseRefItemsReturnType;\n closeParentList?: () => void;\n onExpandIconClickHandler?: () => void;\n}\n\nexport const useKeyboardNavigation = ({\n refItems,\n item,\n closeParentList,\n onExpandIconClickHandler\n}: Props) => {\n const isButtonLeftNavItem = !!onExpandIconClickHandler;\n const onKeyPressNavigation = (e: KeyboardEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n if (e.code === \"Escape\" || e.code === \"ArrowLeft\") {\n e.preventDefault();\n e.stopPropagation();\n closeParentList?.();\n refItems.getParentElement(item.key)?.focus();\n }\n if (e.code === \"ArrowUp\") {\n e.preventDefault();\n e.stopPropagation();\n refItems.getPrevElementOnSameLevel(item.key)?.focus();\n }\n if (e.code === \"ArrowDown\") {\n e.preventDefault();\n e.stopPropagation();\n refItems.getNextElementOnSameLevel(item.key)?.focus();\n }\n if (e.code === \"Home\") {\n e.preventDefault();\n e.stopPropagation();\n refItems.getFirstElementOnSameLevel(item.key)?.focus();\n }\n if (e.code === \"End\") {\n e.preventDefault();\n e.stopPropagation();\n refItems.getLastElementOnSameLevel(item.key)?.focus();\n }\n if (e.code === \"Space\" || e.code === \"Enter\") {\n e.stopPropagation();\n e.preventDefault();\n isButtonLeftNavItem && refItems.getNextElement(item.key, true)?.focus();\n e.currentTarget.click();\n }\n if (e.code === \"ArrowRight\") {\n onExpandIconClickHandler?.();\n refItems.getNextElement(item.key, true)?.focus();\n }\n };\n\n return { onKeyPressNavigation };\n};\n"],"names":["refItems","item","closeParentList","onExpandIconClickHandler","isButtonLeftNavItem","onKeyPressNavigation","e","code","preventDefault","stopPropagation","_a","getParentElement","key","focus","_b","getPrevElementOnSameLevel","_c","getNextElementOnSameLevel","_d","getFirstElementOnSameLevel","_e","getLastElementOnSameLevel","_f","getNextElement","currentTarget","click","_g"],"mappings":"8GA2BqC,EACnCA,WACAC,OACAC,kBACAC,+BAEA,MAAMC,IAAwBD,EAwC9B,MAAO,CAAEE,qBAvCqBC,sBACb,WAAXA,EAAEC,MAAgC,cAAXD,EAAEC,OAC3BD,EAAEE,iBACFF,EAAEG,kBACF,MAAAP,GAAAA,IACA,OAAAQ,EAAAV,EAASW,iBAAiBV,EAAKW,OAA/BF,EAAqCG,SAExB,YAAXP,EAAEC,OACJD,EAAEE,iBACFF,EAAEG,kBACF,OAAAK,EAAAd,EAASe,0BAA0Bd,EAAKW,OAAxCE,EAA8CD,SAEjC,cAAXP,EAAEC,OACJD,EAAEE,iBACFF,EAAEG,kBACF,OAAAO,EAAAhB,EAASiB,0BAA0BhB,EAAKW,OAAxCI,EAA8CH,SAEjC,SAAXP,EAAEC,OACJD,EAAEE,iBACFF,EAAEG,kBACF,OAAAS,EAAAlB,EAASmB,2BAA2BlB,EAAKW,OAAzCM,EAA+CL,SAElC,QAAXP,EAAEC,OACJD,EAAEE,iBACFF,EAAEG,kBACF,OAAAW,EAAApB,EAASqB,0BAA0BpB,EAAKW,OAAxCQ,EAA8CP,SAEjC,UAAXP,EAAEC,MAA+B,UAAXD,EAAEC,OAC1BD,EAAEG,kBACFH,EAAEE,iBACFJ,IAAuB,OAAAkB,IAASC,eAAetB,EAAKW,KAAK,KAAlCU,EAAyCT,SAChEP,EAAEkB,cAAcC,SAEH,eAAXnB,EAAEC,OACJ,MAAAJ,GAAAA,IACA,OAAAuB,EAAA1B,EAASuB,eAAetB,EAAKW,KAAK,KAAlCc,EAAyCb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useKeyboardNavigation.es.js","sources":["../../../../../../src/components/admin/layout/LeftNav/LeftNavItem/useKeyboardNavigation.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 { KeyboardEvent } from \"react\";\nimport { MenuItem } from \"../LeftNav.interfaces\";\nimport { UseRefItemsReturnType } from \"../useRefItems\";\n\ninterface Props {\n item: MenuItem;\n refItems: UseRefItemsReturnType;\n closeParentList?: () => void;\n onExpandIconClickHandler?: () => void;\n}\n\nexport const useKeyboardNavigation = ({\n refItems,\n item,\n closeParentList,\n onExpandIconClickHandler\n}: Props) => {\n const isButtonLeftNavItem = !!onExpandIconClickHandler;\n const onKeyPressNavigation = (e: KeyboardEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n if (e.code === \"Escape\" || e.code === \"ArrowLeft\") {\n e.preventDefault();\n e.stopPropagation();\n closeParentList?.();\n refItems.getParentElement(item.key)?.focus();\n }\n if (e.code === \"ArrowUp\") {\n e.preventDefault();\n e.stopPropagation();\n refItems.getPrevElementOnSameLevel(item.key)?.focus();\n }\n if (e.code === \"ArrowDown\") {\n e.preventDefault();\n e.stopPropagation();\n refItems.getNextElementOnSameLevel(item.key)?.focus();\n }\n if (e.code === \"Home\") {\n e.preventDefault();\n e.stopPropagation();\n refItems.getFirstElementOnSameLevel(item.key)?.focus();\n }\n if (e.code === \"End\") {\n e.preventDefault();\n e.stopPropagation();\n refItems.getLastElementOnSameLevel(item.key)?.focus();\n }\n if (e.code === \"Space\" || e.code === \"Enter\") {\n e.stopPropagation();\n e.preventDefault();\n isButtonLeftNavItem && refItems.getNextElement(item.key, true)?.focus();\n e.currentTarget.click();\n }\n if (e.code === \"ArrowRight\") {\n onExpandIconClickHandler?.();\n refItems.getNextElement(item.key, true)?.focus();\n }\n };\n\n return { onKeyPressNavigation };\n};\n"],"names":[],"mappings":"AA2BO,MAAM,wBAAwB,CAAC;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAa;
|
|
1
|
+
{"version":3,"file":"useKeyboardNavigation.es.js","sources":["../../../../../../src/components/admin/layout/LeftNav/LeftNavItem/useKeyboardNavigation.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 { KeyboardEvent } from \"react\";\nimport { MenuItem } from \"../LeftNav.interfaces\";\nimport { UseRefItemsReturnType } from \"../useRefItems\";\n\ninterface Props {\n item: MenuItem;\n refItems: UseRefItemsReturnType;\n closeParentList?: () => void;\n onExpandIconClickHandler?: () => void;\n}\n\nexport const useKeyboardNavigation = ({\n refItems,\n item,\n closeParentList,\n onExpandIconClickHandler\n}: Props) => {\n const isButtonLeftNavItem = !!onExpandIconClickHandler;\n const onKeyPressNavigation = (e: KeyboardEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n if (e.code === \"Escape\" || e.code === \"ArrowLeft\") {\n e.preventDefault();\n e.stopPropagation();\n closeParentList?.();\n refItems.getParentElement(item.key)?.focus();\n }\n if (e.code === \"ArrowUp\") {\n e.preventDefault();\n e.stopPropagation();\n refItems.getPrevElementOnSameLevel(item.key)?.focus();\n }\n if (e.code === \"ArrowDown\") {\n e.preventDefault();\n e.stopPropagation();\n refItems.getNextElementOnSameLevel(item.key)?.focus();\n }\n if (e.code === \"Home\") {\n e.preventDefault();\n e.stopPropagation();\n refItems.getFirstElementOnSameLevel(item.key)?.focus();\n }\n if (e.code === \"End\") {\n e.preventDefault();\n e.stopPropagation();\n refItems.getLastElementOnSameLevel(item.key)?.focus();\n }\n if (e.code === \"Space\" || e.code === \"Enter\") {\n e.stopPropagation();\n e.preventDefault();\n isButtonLeftNavItem && refItems.getNextElement(item.key, true)?.focus();\n e.currentTarget.click();\n }\n if (e.code === \"ArrowRight\") {\n onExpandIconClickHandler?.();\n refItems.getNextElement(item.key, true)?.focus();\n }\n };\n\n return { onKeyPressNavigation };\n};\n"],"names":[],"mappings":"AA2BO,MAAM,wBAAwB,CAAC;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAa;AACX,QAAM,sBAAsB,CAAC,CAAC;AAC9B,QAAM,uBAAuB,CAAC,MAA4D;AAPrF;AAQH,QAAI,EAAE,SAAS,YAAY,EAAE,SAAS,aAAa;AACjD,QAAE,eAAA;AACF,QAAE,gBAAA;AACF;AACA,qBAAS,iBAAiB,KAAK,GAAG,MAAlC,mBAAqC;AAAA,IACvC;AACA,QAAI,EAAE,SAAS,WAAW;AACxB,QAAE,eAAA;AACF,QAAE,gBAAA;AACF,qBAAS,0BAA0B,KAAK,GAAG,MAA3C,mBAA8C;AAAA,IAChD;AACA,QAAI,EAAE,SAAS,aAAa;AAC1B,QAAE,eAAA;AACF,QAAE,gBAAA;AACF,qBAAS,0BAA0B,KAAK,GAAG,MAA3C,mBAA8C;AAAA,IAChD;AACA,QAAI,EAAE,SAAS,QAAQ;AACrB,QAAE,eAAA;AACF,QAAE,gBAAA;AACF,qBAAS,2BAA2B,KAAK,GAAG,MAA5C,mBAA+C;AAAA,IACjD;AACA,QAAI,EAAE,SAAS,OAAO;AACpB,QAAE,eAAA;AACF,QAAE,gBAAA;AACF,qBAAS,0BAA0B,KAAK,GAAG,MAA3C,mBAA8C;AAAA,IAChD;AACA,QAAI,EAAE,SAAS,WAAW,EAAE,SAAS,SAAS;AAC5C,QAAE,gBAAA;AACF,QAAE,eAAA;AACF,+BAAuB,cAAS,eAAe,KAAK,KAAK,IAAI,MAAtC,mBAAyC;AAChE,QAAE,cAAc,MAAA;AAAA,IAClB;AACA,QAAI,EAAE,SAAS,cAAc;AAC3B;AACA,qBAAS,eAAe,KAAK,KAAK,IAAI,MAAtC,mBAAyC;AAAA,IAC3C;AAAA,EACF;AAEA,SAAO,EAAE,qBAAA;AACX;"}
|