@onewelcome/react-lib-components 0.0.0-experimental-8e3a0fd
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/LICENSE +202 -0
- package/README.md +94 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +9 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.test.d.ts +1 -0
- package/dist/components/Button/BaseButton.d.ts +8 -0
- package/dist/components/Button/BaseButton.test.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +8 -0
- package/dist/components/Button/Button.test.d.ts +1 -0
- package/dist/components/Button/IconButton.d.ts +11 -0
- package/dist/components/Button/IconButton.test.d.ts +1 -0
- package/dist/components/Button/Spinner.d.ts +2 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +24 -0
- package/dist/components/ContextMenu/ContextMenu.test.d.ts +1 -0
- package/dist/components/ContextMenu/ContextMenuItem.d.ts +15 -0
- package/dist/components/ContextMenu/ContextMenuService.d.ts +21 -0
- package/dist/components/DataGrid/DataGrid.d.ts +46 -0
- package/dist/components/DataGrid/DataGrid.test.d.ts +1 -0
- package/dist/components/DataGrid/DataGridActions/DataGridActions.d.ts +15 -0
- package/dist/components/DataGrid/DataGridActions/DataGridActions.test.d.ts +1 -0
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.d.ts +13 -0
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.test.d.ts +1 -0
- package/dist/components/DataGrid/DataGridBody/DataGridBody.d.ts +21 -0
- package/dist/components/DataGrid/DataGridBody/DataGridBody.test.d.ts +1 -0
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.d.ts +12 -0
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.test.d.ts +1 -0
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.d.ts +5 -0
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.d.ts +6 -0
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.test.d.ts +1 -0
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.d.ts +33 -0
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.test.d.ts +1 -0
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridWithNestedRows.test.d.ts +1 -0
- package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.d.ts +855 -0
- package/dist/components/DataGrid/DataGridFilters/DataGridDateFilter.d.ts +9 -0
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.d.ts +16 -0
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.d.ts +23 -0
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.d.ts +16 -0
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.d.ts +15 -0
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.test.d.ts +1 -0
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.d.ts +15 -0
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.test.d.ts +1 -0
- package/dist/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.d.ts +78 -0
- package/dist/components/DataGrid/DataGridFilters/DataGridSearchbar.d.ts +10 -0
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.d.ts +15 -0
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.test.d.ts +1 -0
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbarWrapper.d.ts +10 -0
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.d.ts +31 -0
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.d.ts +15 -0
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerInputSection.d.ts +18 -0
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimeService.d.ts +10 -0
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/SideMenu.d.ts +10 -0
- package/dist/components/DataGrid/DataGridFilters/FilterKeyMapper.d.ts +14 -0
- package/dist/components/DataGrid/DataGridFilters/FilterKeyMapper.test.d.ts +1 -0
- package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.d.ts +9 -0
- package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.test.d.ts +1 -0
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.d.ts +13 -0
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.test.d.ts +1 -0
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.d.ts +10 -0
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.test.d.ts +1 -0
- package/dist/components/DataGrid/datagrid.interfaces.d.ts +13 -0
- package/dist/components/DataGrid/testUtils.d.ts +22 -0
- package/dist/components/DatePicker/DatePicker.d.ts +14 -0
- package/dist/components/DatePicker/DatePicker.test.d.ts +1 -0
- package/dist/components/Form/Checkbox/Checkbox.d.ts +14 -0
- package/dist/components/Form/Checkbox/Checkbox.test.d.ts +1 -0
- package/dist/components/Form/Fieldset/Fieldset.d.ts +14 -0
- package/dist/components/Form/Fieldset/Fieldset.test.d.ts +1 -0
- package/dist/components/Form/FileUpload/FileItem/FileItem.d.ts +28 -0
- package/dist/components/Form/FileUpload/FileItem/FileItem.test.d.ts +1 -0
- package/dist/components/Form/FileUpload/FileUpload.d.ts +32 -0
- package/dist/components/Form/FileUpload/FileUpload.test.d.ts +1 -0
- package/dist/components/Form/Form.d.ts +5 -0
- package/dist/components/Form/Form.test.d.ts +1 -0
- package/dist/components/Form/FormControl/FormControl.d.ts +8 -0
- package/dist/components/Form/FormControl/FormControl.test.d.ts +1 -0
- package/dist/components/Form/FormErrorText/FormErrorText.d.ts +12 -0
- package/dist/components/Form/FormErrorText/FormErrorText.test.d.ts +1 -0
- package/dist/components/Form/FormGroup/FormGroup.d.ts +17 -0
- package/dist/components/Form/FormGroup/FormGroup.test.d.ts +1 -0
- package/dist/components/Form/FormHelperText/FormHelperText.d.ts +7 -0
- package/dist/components/Form/FormHelperText/FormHelperText.test.d.ts +1 -0
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.d.ts +15 -0
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.test.d.ts +1 -0
- package/dist/components/Form/FormStatusIndicator/FormStatusIndicator.d.ts +8 -0
- package/dist/components/Form/Input/Input.d.ts +14 -0
- package/dist/components/Form/Input/Input.test.d.ts +1 -0
- package/dist/components/Form/Label/Label.d.ts +5 -0
- package/dist/components/Form/Label/Label.test.d.ts +1 -0
- package/dist/components/Form/Radio/Radio.d.ts +11 -0
- package/dist/components/Form/Radio/Radio.test.d.ts +1 -0
- package/dist/components/Form/Select/MultiSelect/MultiOption.d.ts +6 -0
- package/dist/components/Form/Select/MultiSelect/MultiSelect.d.ts +3 -0
- package/dist/components/Form/Select/MultiSelect/MultiSelect.test.d.ts +63 -0
- package/dist/components/Form/Select/MultiSelect/MultiSelectKeyboardNavigation.test.d.ts +1 -0
- package/dist/components/Form/Select/MultiSelect/SelectButton.d.ts +4 -0
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.d.ts +12 -0
- package/dist/components/Form/Select/MultiSelect/useArrowNavigation.d.ts +17 -0
- package/dist/components/Form/Select/MultiSelect/useMultiSelect.d.ts +16 -0
- package/dist/components/Form/Select/MultiSelect/useMultiSelect.test.d.ts +1 -0
- package/dist/components/Form/Select/MultiSelect/useSearch.d.ts +24 -0
- package/dist/components/Form/Select/Select.interfaces.d.ts +60 -0
- package/dist/components/Form/Select/SingleSelect/Option.d.ts +18 -0
- package/dist/components/Form/Select/SingleSelect/Option.test.d.ts +1 -0
- package/dist/components/Form/Select/SingleSelect/Select.d.ts +3 -0
- package/dist/components/Form/Select/SingleSelect/Select.test.d.ts +124 -0
- package/dist/components/Form/Select/SingleSelect/SelectKeyboardNavigation.test.d.ts +1 -0
- package/dist/components/Form/Select/SingleSelect/useArrowNavigation.d.ts +5 -0
- package/dist/components/Form/Select/SingleSelect/useSearch.d.ts +20 -0
- package/dist/components/Form/Select/useAddNewBtn.d.ts +19 -0
- package/dist/components/Form/Select/useSelectPositionList.d.ts +12 -0
- package/dist/components/Form/Textarea/Textarea.d.ts +7 -0
- package/dist/components/Form/Textarea/Textarea.test.d.ts +1 -0
- package/dist/components/Form/Toggle/Toggle.d.ts +11 -0
- package/dist/components/Form/Toggle/Toggle.test.d.ts +1 -0
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.d.ts +12 -0
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.test.d.ts +1 -0
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.d.ts +18 -0
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.test.d.ts +1 -0
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.d.ts +16 -0
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.test.d.ts +1 -0
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.d.ts +10 -0
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.test.d.ts +1 -0
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.d.ts +16 -0
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.test.d.ts +1 -0
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.d.ts +16 -0
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.test.d.ts +1 -0
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.d.ts +27 -0
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.test.d.ts +1 -0
- package/dist/components/Form/form.interfaces.d.ts +16 -0
- package/dist/components/Icon/Icon.d.ts +114 -0
- package/dist/components/Icon/Icon.test.d.ts +1 -0
- package/dist/components/InlineEditing/InlineCheckbox/InlineCheckbox.d.ts +6 -0
- package/dist/components/InlineEditing/InlineEditingContext.d.ts +10 -0
- package/dist/components/InlineEditing/InlineEditingSelect/InlineSelect.d.ts +6 -0
- package/dist/components/Layout/Card/Card.d.ts +16 -0
- package/dist/components/Layout/Card/Card.test.d.ts +0 -0
- package/dist/components/Layout/ContentHeader/ContentHeader.d.ts +24 -0
- package/dist/components/Layout/ContentHeader/ContentHeader.test.d.ts +1 -0
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.d.ts +7 -0
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.test.d.ts +1 -0
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.d.ts +10 -0
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.test.d.ts +1 -0
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.d.ts +6 -0
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.test.d.ts +1 -0
- package/dist/components/Link/Link.d.ts +14 -0
- package/dist/components/Link/Link.test.d.ts +1 -0
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.d.ts +12 -0
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.test.d.ts +1 -0
- package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.d.ts +4 -0
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.d.ts +22 -0
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.test.d.ts +1 -0
- package/dist/components/Notifications/Alert/AlertProvider/AlertContext.d.ts +13 -0
- package/dist/components/Notifications/Alert/AlertProvider/AlertProvider.d.ts +22 -0
- package/dist/components/Notifications/Alert/AlertProvider/AlertProvider.test.d.ts +1 -0
- package/dist/components/Notifications/Alert/useAlert.d.ts +7 -0
- package/dist/components/Notifications/Alert/useAlert.test.d.ts +1 -0
- package/dist/components/Notifications/Banner/Banner.d.ts +11 -0
- package/dist/components/Notifications/Banner/Banner.test.d.ts +1 -0
- package/dist/components/Notifications/BaseModal/BaseModal.d.ts +21 -0
- package/dist/components/Notifications/BaseModal/BaseModal.test.d.ts +1 -0
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.d.ts +13 -0
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.test.d.ts +1 -0
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.d.ts +8 -0
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.test.d.ts +1 -0
- package/dist/components/Notifications/BaseModal/BaseModalContext.d.ts +2 -0
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.d.ts +9 -0
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.test.d.ts +1 -0
- package/dist/components/Notifications/Dialog/Dialog.d.ts +22 -0
- package/dist/components/Notifications/Dialog/Dialog.test.d.ts +1 -0
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.d.ts +6 -0
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.test.d.ts +1 -0
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.d.ts +9 -0
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.test.d.ts +1 -0
- package/dist/components/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.d.ts +15 -0
- package/dist/components/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.test.d.ts +1 -0
- package/dist/components/Notifications/DiscardChangesModal/DiscardChangesModal.d.ts +13 -0
- package/dist/components/Notifications/DiscardChangesModal/DiscardChangesModal.test.d.ts +1 -0
- package/dist/components/Notifications/Modal/Modal.d.ts +2 -0
- package/dist/components/Notifications/Modal/Modal.test.d.ts +1 -0
- package/dist/components/Notifications/Modal/ModalActions/ModalActions.d.ts +2 -0
- package/dist/components/Notifications/Modal/ModalContent/ModalContent.d.ts +2 -0
- package/dist/components/Notifications/Modal/ModalHeader/ModalHeader.d.ts +2 -0
- package/dist/components/Notifications/NotificationProvider/NotificationContext.d.ts +35 -0
- package/dist/components/Notifications/NotificationProvider/NotificationContext.test.d.ts +1 -0
- package/dist/components/Notifications/NotificationProvider/NotificationService.d.ts +2 -0
- package/dist/components/Notifications/NotificationProvider/notification.interfaces.d.ts +46 -0
- package/dist/components/Notifications/SideSheet/SideSheet.d.ts +10 -0
- package/dist/components/Notifications/SideSheet/SideSheet.test.d.ts +1 -0
- package/dist/components/Notifications/SideSheet/SideSheetActions/SideSheetActions.d.ts +2 -0
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.d.ts +4 -0
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.d.ts +4 -0
- package/dist/components/Notifications/SlideInModal/SlideInModal.d.ts +4 -0
- package/dist/components/Notifications/SlideInModal/SlideInModal.test.d.ts +1 -0
- package/dist/components/Pagination/Pagination.d.ts +19 -0
- package/dist/components/Pagination/Pagination.test.d.ts +1 -0
- package/dist/components/Popover/Popover.d.ts +13 -0
- package/dist/components/Popover/Popover.test.d.ts +1 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +9 -0
- package/dist/components/ProgressBar/ProgressBar.test.d.ts +1 -0
- package/dist/components/RequiredSign/RequiredSign.d.ts +5 -0
- package/dist/components/Skeleton/Skeleton.d.ts +7 -0
- package/dist/components/Skeleton/Skeleton.test.d.ts +1 -0
- package/dist/components/Spinner/Spinner.d.ts +6 -0
- package/dist/components/Spinner/Spinner.test.d.ts +1 -0
- package/dist/components/Stepper/Step.d.ts +15 -0
- package/dist/components/Stepper/Stepper.d.ts +8 -0
- package/dist/components/Stepper/Stepper.test.d.ts +1 -0
- package/dist/components/Tabs/Tab.d.ts +8 -0
- package/dist/components/Tabs/Tab.test.d.ts +1 -0
- package/dist/components/Tabs/TabButton.d.ts +9 -0
- package/dist/components/Tabs/TabButton.test.d.ts +1 -0
- package/dist/components/Tabs/Tabs.d.ts +13 -0
- package/dist/components/Tabs/Tabs.test.d.ts +1 -0
- package/dist/components/Tag/RemoveButton.d.ts +7 -0
- package/dist/components/Tag/Tag.d.ts +13 -0
- package/dist/components/Tag/Tag.test.d.ts +1 -0
- package/dist/components/TextEllipsis/TextEllipsis.d.ts +6 -0
- package/dist/components/TextEllipsis/TextEllipsis.test.d.ts +1 -0
- package/dist/components/Tiles/Tile.d.ts +15 -0
- package/dist/components/Tiles/Tile.test.d.ts +1 -0
- package/dist/components/Tiles/Tiles.d.ts +6 -0
- package/dist/components/Tiles/Tiles.test.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +13 -0
- package/dist/components/Tooltip/Tooltip.test.d.ts +1 -0
- package/dist/components/Typography/Typography.d.ts +14 -0
- package/dist/components/Typography/Typography.test.d.ts +1 -0
- package/dist/components/_BaseStyling_/BaseStyling.d.ts +208 -0
- package/dist/components/_BaseStyling_/BaseStyling.test.d.ts +1 -0
- package/dist/components/_BaseStyling_/buttonBaseStyling.d.ts +14 -0
- package/dist/components/admin/layout/LeftNav/LeftNav.d.ts +13 -0
- package/dist/components/admin/layout/LeftNav/LeftNav.interfaces.d.ts +13 -0
- package/dist/components/admin/layout/LeftNav/LeftNav.test.d.ts +0 -0
- package/dist/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.d.ts +14 -0
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.d.ts +3 -0
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.interface.d.ts +11 -0
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.test.d.ts +0 -0
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.d.ts +12 -0
- package/dist/components/admin/layout/LeftNav/LeftNavItem/useKeyboardNavigation.d.ts +13 -0
- package/dist/components/admin/layout/LeftNav/useRefItems.d.ts +22 -0
- package/dist/components/admin/layout/LeftNav/useRefItems.test.d.ts +1 -0
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.d.ts +8 -0
- package/dist/components/miscellaneous/IdentityProviderButton.d.ts +18 -0
- package/dist/components/miscellaneous/IdentityProviderButton.test.d.ts +1 -0
- package/dist/components/withReadOnly.d.ts +12 -0
- package/dist/components/withReadOnly.test.d.ts +1 -0
- package/dist/hooks/useAnimation.d.ts +5 -0
- package/dist/hooks/useAnimation.test.d.ts +1 -0
- package/dist/hooks/useClickOutside.d.ts +2 -0
- package/dist/hooks/useClickOutside.test.d.ts +1 -0
- package/dist/hooks/useDebouncedCallback.d.ts +1 -0
- package/dist/hooks/useDebouncedCallback.test.d.ts +1 -0
- package/dist/hooks/useDetermineStatusIcon.d.ts +3 -0
- package/dist/hooks/useDetermineStatusIcon.test.d.ts +1 -0
- package/dist/hooks/useFormSelector.d.ts +13 -0
- package/dist/hooks/useFormSelector.test.d.ts +1 -0
- package/dist/hooks/useFullHeightCollapse.d.ts +4 -0
- package/dist/hooks/useFullHeightCollapse.test.d.ts +1 -0
- package/dist/hooks/useGetDomRoot.d.ts +3 -0
- package/dist/hooks/usePosition.d.ts +50 -0
- package/dist/hooks/usePosition.test.d.ts +1 -0
- package/dist/hooks/useRepeatFocus.d.ts +7 -0
- package/dist/hooks/useRepeater.d.ts +10 -0
- package/dist/hooks/useRepeater.test.d.ts +6 -0
- package/dist/hooks/useScreenSize.d.ts +9 -0
- package/dist/hooks/useScreenSize.test.d.ts +1 -0
- package/dist/hooks/useScroll.d.ts +2 -0
- package/dist/hooks/useScroll.test.d.ts +1 -0
- package/dist/hooks/useSpacing.d.ts +18 -0
- package/dist/hooks/useSpacing.test.d.ts +1 -0
- package/dist/hooks/useUploadFile.d.ts +27 -0
- package/dist/hooks/useUploadFile.test.d.ts +1 -0
- package/dist/hooks/useWrapper.d.ts +7 -0
- package/dist/hooks/useWrapper.test.d.ts +1 -0
- package/dist/index.cjs.js +205 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +175 -0
- package/dist/index.es.js +65380 -0
- package/dist/index.es.js.map +1 -0
- package/dist/interfaces.d.ts +9 -0
- package/dist/util/helper.d.ts +14 -0
- package/dist/util/helper.test.d.ts +1 -0
- package/dist/util/unitTestUtils.d.ts +12 -0
- package/dist/utils/statusUtils.d.ts +10 -0
- package/dist/variables.d.ts +8 -0
- package/package.json +144 -0
- package/src/_functions.scss +19 -0
- package/src/components/Breadcrumbs/Breadcrumbs.module.scss +54 -0
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +84 -0
- package/src/components/Button/BaseButton.module.scss +48 -0
- package/src/components/Button/BaseButton.tsx +65 -0
- package/src/components/Button/Button.module.scss +58 -0
- package/src/components/Button/Button.tsx +70 -0
- package/src/components/Button/IconButton.module.scss +73 -0
- package/src/components/Button/IconButton.tsx +63 -0
- package/src/components/Button/Spinner.tsx +33 -0
- package/src/components/ContextMenu/ContextMenu.module.scss +41 -0
- package/src/components/ContextMenu/ContextMenu.tsx +206 -0
- package/src/components/ContextMenu/ContextMenuItem.module.scss +73 -0
- package/src/components/ContextMenu/ContextMenuItem.tsx +100 -0
- package/src/components/ContextMenu/ContextMenuService.ts +171 -0
- package/src/components/DataGrid/DataGrid.module.scss +51 -0
- package/src/components/DataGrid/DataGrid.tsx +225 -0
- package/src/components/DataGrid/DataGridActions/DataGridActions.module.scss +51 -0
- package/src/components/DataGrid/DataGridActions/DataGridActions.tsx +140 -0
- package/src/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss +58 -0
- package/src/components/DataGrid/DataGridActions/DataGridColumnsToggle.tsx +107 -0
- package/src/components/DataGrid/DataGridBody/DataGridBody.module.scss +26 -0
- package/src/components/DataGrid/DataGridBody/DataGridBody.tsx +110 -0
- package/src/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss +61 -0
- package/src/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.tsx +131 -0
- package/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss +60 -0
- package/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.tsx +39 -0
- package/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss +21 -0
- package/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.tsx +47 -0
- package/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss +127 -0
- package/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.tsx +192 -0
- package/src/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.tsx +143 -0
- package/src/components/DataGrid/DataGridBody/__snapshots__/DataGridBody.test.tsx.snap +262 -0
- package/src/components/DataGrid/DataGridFilters/DataGridDateFilter.tsx +65 -0
- package/src/components/DataGrid/DataGridFilters/DataGridFilter.module.scss +116 -0
- package/src/components/DataGrid/DataGridFilters/DataGridFilter.tsx +161 -0
- package/src/components/DataGrid/DataGridFilters/DataGridFilterPopover.tsx +172 -0
- package/src/components/DataGrid/DataGridFilters/DataGridFilterService.ts +124 -0
- package/src/components/DataGrid/DataGridFilters/DataGridFilterTag.tsx +146 -0
- package/src/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.tsx +136 -0
- package/src/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.ts +123 -0
- package/src/components/DataGrid/DataGridFilters/DataGridSearchbar.tsx +71 -0
- package/src/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss +73 -0
- package/src/components/DataGrid/DataGridFilters/DataGridToolbar.tsx +132 -0
- package/src/components/DataGrid/DataGridFilters/DataGridToolbarWrapper.tsx +38 -0
- package/src/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss +136 -0
- package/src/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.tsx +267 -0
- package/src/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.tsx +103 -0
- package/src/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerInputSection.tsx +121 -0
- package/src/components/DataGrid/DataGridFilters/DateTimePicker/DateTimeService.ts +30 -0
- package/src/components/DataGrid/DataGridFilters/DateTimePicker/SideMenu.tsx +50 -0
- package/src/components/DataGrid/DataGridFilters/FilterKeyMapper.ts +48 -0
- package/src/components/DataGrid/DataGridFilters/useFiltersReducer.tsx +73 -0
- package/src/components/DataGrid/DataGridHeader/DataGridHeader.module.scss +32 -0
- package/src/components/DataGrid/DataGridHeader/DataGridHeader.tsx +128 -0
- package/src/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss +93 -0
- package/src/components/DataGrid/DataGridHeader/DataGridHeaderCell.tsx +83 -0
- package/src/components/DataGrid/dataGridMixins.module.scss +33 -0
- package/src/components/DataGrid/datagrid.interfaces.ts +30 -0
- package/src/components/DataGrid/testUtils.ts +117 -0
- package/src/components/DatePicker/DatePicker.module.scss +360 -0
- package/src/components/DatePicker/DatePicker.tsx +98 -0
- package/src/components/Form/Checkbox/Checkbox.module.scss +221 -0
- package/src/components/Form/Checkbox/Checkbox.tsx +205 -0
- package/src/components/Form/Fieldset/Fieldset.module.scss +49 -0
- package/src/components/Form/Fieldset/Fieldset.tsx +128 -0
- package/src/components/Form/FileUpload/FileItem/FileItem.module.scss +204 -0
- package/src/components/Form/FileUpload/FileItem/FileItem.tsx +271 -0
- package/src/components/Form/FileUpload/FileUpload.module.scss +241 -0
- package/src/components/Form/FileUpload/FileUpload.tsx +317 -0
- package/src/components/Form/Form.module.scss +19 -0
- package/src/components/Form/Form.tsx +35 -0
- package/src/components/Form/FormControl/FormControl.module.scss +65 -0
- package/src/components/Form/FormControl/FormControl.tsx +62 -0
- package/src/components/Form/FormErrorText/FormErrorText.module.scss +35 -0
- package/src/components/Form/FormErrorText/FormErrorText.tsx +65 -0
- package/src/components/Form/FormGroup/FormGroup.module.scss +24 -0
- package/src/components/Form/FormGroup/FormGroup.tsx +96 -0
- package/src/components/Form/FormHelperText/FormHelperText.module.scss +32 -0
- package/src/components/Form/FormHelperText/FormHelperText.tsx +43 -0
- package/src/components/Form/FormSection/FormSection.module.scss +12 -0
- package/src/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss +68 -0
- package/src/components/Form/FormSelectorWrapper/FormSelectorWrapper.tsx +117 -0
- package/src/components/Form/FormStatusIndicator/FormStatusIndicator.tsx +75 -0
- package/src/components/Form/Input/Input.module.scss +186 -0
- package/src/components/Form/Input/Input.tsx +161 -0
- package/src/components/Form/Label/Label.module.scss +21 -0
- package/src/components/Form/Label/Label.tsx +40 -0
- package/src/components/Form/Radio/Radio.module.scss +196 -0
- package/src/components/Form/Radio/Radio.tsx +142 -0
- package/src/components/Form/Select/MultiSelect/MultiOption.tsx +66 -0
- package/src/components/Form/Select/MultiSelect/MultiSelect.module.scss +318 -0
- package/src/components/Form/Select/MultiSelect/MultiSelect.tsx +406 -0
- package/src/components/Form/Select/MultiSelect/SelectButton.module.scss +28 -0
- package/src/components/Form/Select/MultiSelect/SelectButton.tsx +37 -0
- package/src/components/Form/Select/MultiSelect/SelectedOptions.module.scss +39 -0
- package/src/components/Form/Select/MultiSelect/SelectedOptions.tsx +68 -0
- package/src/components/Form/Select/MultiSelect/useArrowNavigation.ts +133 -0
- package/src/components/Form/Select/MultiSelect/useMultiSelect.tsx +98 -0
- package/src/components/Form/Select/MultiSelect/useSearch.tsx +117 -0
- package/src/components/Form/Select/Select.interfaces.ts +84 -0
- package/src/components/Form/Select/SingleSelect/Option.tsx +116 -0
- package/src/components/Form/Select/SingleSelect/Select.module.scss +409 -0
- package/src/components/Form/Select/SingleSelect/Select.tsx +312 -0
- package/src/components/Form/Select/SingleSelect/useArrowNavigation.ts +177 -0
- package/src/components/Form/Select/SingleSelect/useSearch.tsx +113 -0
- package/src/components/Form/Select/useAddNewBtn.module.scss +66 -0
- package/src/components/Form/Select/useAddNewBtn.tsx +89 -0
- package/src/components/Form/Select/useSelectPositionList.ts +109 -0
- package/src/components/Form/Textarea/Textarea.module.scss +142 -0
- package/src/components/Form/Textarea/Textarea.tsx +97 -0
- package/src/components/Form/Toggle/Toggle.module.scss +214 -0
- package/src/components/Form/Toggle/Toggle.tsx +80 -0
- package/src/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss +32 -0
- package/src/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.tsx +99 -0
- package/src/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss +79 -0
- package/src/components/Form/Wrapper/InputWrapper/InputWrapper.tsx +125 -0
- package/src/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss +27 -0
- package/src/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.tsx +88 -0
- package/src/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss +30 -0
- package/src/components/Form/Wrapper/RadioWrapper/RadioWrapper.tsx +109 -0
- package/src/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss +27 -0
- package/src/components/Form/Wrapper/SelectWrapper/SelectWrapper.tsx +89 -0
- package/src/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss +100 -0
- package/src/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.tsx +154 -0
- package/src/components/Form/Wrapper/Wrapper/Wrapper.module.scss +87 -0
- package/src/components/Form/Wrapper/Wrapper/Wrapper.tsx +116 -0
- package/src/components/Form/form.interfaces.ts +34 -0
- package/src/components/Icon/Icon.module.scss +455 -0
- package/src/components/Icon/Icon.tsx +152 -0
- package/src/components/InlineEditing/InlineCheckbox/InlineCheckbox.tsx +40 -0
- package/src/components/InlineEditing/InlineEditingContext.tsx +32 -0
- package/src/components/InlineEditing/InlineEditingSelect/InlineSelect.tsx +44 -0
- package/src/components/Layout/Card/Card.module.scss +68 -0
- package/src/components/Layout/Card/Card.tsx +108 -0
- package/src/components/Layout/ContentHeader/ContentHeader.module.scss +95 -0
- package/src/components/Layout/ContentHeader/ContentHeader.tsx +146 -0
- package/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss +12 -0
- package/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.tsx +53 -0
- package/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss +25 -0
- package/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.tsx +54 -0
- package/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss +36 -0
- package/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.tsx +32 -0
- package/src/components/Link/Link.module.scss +106 -0
- package/src/components/Link/Link.tsx +111 -0
- package/src/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss +57 -0
- package/src/components/Notifications/Alert/AlertContainer/AlertContainer.tsx +52 -0
- package/src/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.ts +47 -0
- package/src/components/Notifications/Alert/AlertItem/AlertItem.module.scss +279 -0
- package/src/components/Notifications/Alert/AlertItem/AlertItem.tsx +214 -0
- package/src/components/Notifications/Alert/AlertProvider/AlertContext.ts +42 -0
- package/src/components/Notifications/Alert/AlertProvider/AlertProvider.tsx +173 -0
- package/src/components/Notifications/Alert/alertVariables.scss +17 -0
- package/src/components/Notifications/Alert/useAlert.ts +30 -0
- package/src/components/Notifications/Banner/Banner.module.scss +76 -0
- package/src/components/Notifications/Banner/Banner.tsx +78 -0
- package/src/components/Notifications/BaseModal/BaseModal.module.scss +76 -0
- package/src/components/Notifications/BaseModal/BaseModal.tsx +186 -0
- package/src/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss +65 -0
- package/src/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.tsx +66 -0
- package/src/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss +25 -0
- package/src/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.tsx +60 -0
- package/src/components/Notifications/BaseModal/BaseModalContext.ts +18 -0
- package/src/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss +43 -0
- package/src/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.tsx +69 -0
- package/src/components/Notifications/Dialog/Dialog.module.scss +31 -0
- package/src/components/Notifications/Dialog/Dialog.tsx +143 -0
- package/src/components/Notifications/Dialog/DialogActions/DialogActions.module.scss +35 -0
- package/src/components/Notifications/Dialog/DialogActions/DialogActions.tsx +48 -0
- package/src/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss +58 -0
- package/src/components/Notifications/Dialog/DialogTitle/DialogTitle.tsx +75 -0
- package/src/components/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.tsx +77 -0
- package/src/components/Notifications/DiscardChangesModal/DiscardChangesModal.tsx +77 -0
- package/src/components/Notifications/Modal/Modal.tsx +18 -0
- package/src/components/Notifications/Modal/ModalActions/ModalActions.tsx +18 -0
- package/src/components/Notifications/Modal/ModalContent/ModalContent.tsx +18 -0
- package/src/components/Notifications/Modal/ModalHeader/ModalHeader.tsx +18 -0
- package/src/components/Notifications/NotificationProvider/NotificationContext.tsx +217 -0
- package/src/components/Notifications/NotificationProvider/NotificationService.ts +33 -0
- package/src/components/Notifications/NotificationProvider/notification.interfaces.ts +68 -0
- package/src/components/Notifications/SideSheet/SideSheet.module.scss +97 -0
- package/src/components/Notifications/SideSheet/SideSheet.tsx +114 -0
- package/src/components/Notifications/SideSheet/SideSheetActions/SideSheetActions.tsx +18 -0
- package/src/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss +19 -0
- package/src/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.tsx +25 -0
- package/src/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss +19 -0
- package/src/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.tsx +25 -0
- package/src/components/Notifications/SlideInModal/SlideInModal.module.scss +54 -0
- package/src/components/Notifications/SlideInModal/SlideInModal.tsx +75 -0
- package/src/components/Pagination/Pagination.module.scss +162 -0
- package/src/components/Pagination/Pagination.tsx +235 -0
- package/src/components/Popover/Popover.module.scss +42 -0
- package/src/components/Popover/Popover.tsx +142 -0
- package/src/components/ProgressBar/ProgressBar.module.scss +95 -0
- package/src/components/ProgressBar/ProgressBar.tsx +75 -0
- package/src/components/RequiredSign/RequiredSign.tsx +28 -0
- package/src/components/Skeleton/Skeleton.module.scss +36 -0
- package/src/components/Skeleton/Skeleton.tsx +48 -0
- package/src/components/Spinner/Spinner.module.scss +33 -0
- package/src/components/Spinner/Spinner.tsx +61 -0
- package/src/components/Stepper/Step.module.scss +301 -0
- package/src/components/Stepper/Step.tsx +116 -0
- package/src/components/Stepper/Stepper.module.scss +17 -0
- package/src/components/Stepper/Stepper.tsx +53 -0
- package/src/components/Tabs/Tab.module.scss +27 -0
- package/src/components/Tabs/Tab.tsx +41 -0
- package/src/components/Tabs/TabButton.module.scss +87 -0
- package/src/components/Tabs/TabButton.tsx +66 -0
- package/src/components/Tabs/Tabs.module.scss +58 -0
- package/src/components/Tabs/Tabs.tsx +217 -0
- package/src/components/Tag/RemoveButton.module.scss +42 -0
- package/src/components/Tag/RemoveButton.tsx +53 -0
- package/src/components/Tag/Tag.module.scss +43 -0
- package/src/components/Tag/Tag.tsx +79 -0
- package/src/components/TextEllipsis/TextEllipsis.module.scss +35 -0
- package/src/components/TextEllipsis/TextEllipsis.tsx +80 -0
- package/src/components/Tiles/Tile.module.scss +91 -0
- package/src/components/Tiles/Tile.tsx +105 -0
- package/src/components/Tiles/Tiles.module.scss +27 -0
- package/src/components/Tiles/Tiles.tsx +70 -0
- package/src/components/Tooltip/Tooltip.module.scss +221 -0
- package/src/components/Tooltip/Tooltip.tsx +251 -0
- package/src/components/Typography/Typography.module.scss +80 -0
- package/src/components/Typography/Typography.tsx +111 -0
- package/src/components/_BaseStyling_/BaseStyling.tsx +481 -0
- package/src/components/_BaseStyling_/buttonBaseStyling.ts +123 -0
- package/src/components/admin/layout/LeftNav/LeftNav.interfaces.ts +30 -0
- package/src/components/admin/layout/LeftNav/LeftNav.module.scss +66 -0
- package/src/components/admin/layout/LeftNav/LeftNav.tsx +96 -0
- package/src/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.tsx +173 -0
- package/src/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.interface.ts +28 -0
- package/src/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss +222 -0
- package/src/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.tsx +34 -0
- package/src/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.tsx +106 -0
- package/src/components/admin/layout/LeftNav/LeftNavItem/useKeyboardNavigation.ts +75 -0
- package/src/components/admin/layout/LeftNav/useRefItems.ts +280 -0
- package/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss +25 -0
- package/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.tsx +47 -0
- package/src/components/miscellaneous/IdentityProviderButton.module.scss +31 -0
- package/src/components/miscellaneous/IdentityProviderButton.tsx +92 -0
- package/src/components/withReadOnly.tsx +121 -0
- package/src/font/README.md +47 -0
- package/src/font/icomoon.eot +0 -0
- package/src/font/icomoon.svg +111 -0
- package/src/font/icomoon.ttf +0 -0
- package/src/font/icomoon.woff +0 -0
- package/src/font/selection.json +1 -0
- package/src/hooks/useAnimation.ts +36 -0
- package/src/hooks/useClickOutside.ts +42 -0
- package/src/hooks/useDebouncedCallback.tsx +34 -0
- package/src/hooks/useDetermineStatusIcon.tsx +33 -0
- package/src/hooks/useFormSelector.ts +63 -0
- package/src/hooks/useFullHeightCollapse.ts +33 -0
- package/src/hooks/useGetDomRoot.ts +40 -0
- package/src/hooks/usePosition.ts +387 -0
- package/src/hooks/useRepeatFocus.tsx +89 -0
- package/src/hooks/useRepeater.ts +50 -0
- package/src/hooks/useScreenSize.ts +60 -0
- package/src/hooks/useScroll.ts +32 -0
- package/src/hooks/useSpacing.ts +58 -0
- package/src/hooks/useUploadFile.tsx +141 -0
- package/src/hooks/useWrapper.ts +33 -0
- package/src/index.ts +237 -0
- package/src/interfaces.ts +37 -0
- package/src/mixins.module.scss +371 -0
- package/src/readyclasses.module.scss +64 -0
- package/src/types.d.ts +20 -0
- package/src/util/helper.tsx +219 -0
- package/src/util/unitTestUtils.ts +32 -0
- package/src/utils/statusUtils.ts +51 -0
- package/src/variables.scss +38 -0
- package/src/variables.ts +32 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
@use "../../../../mixins.module.scss";
|
|
18
|
+
|
|
19
|
+
.sidenavbar {
|
|
20
|
+
--margin-top: 4rem;
|
|
21
|
+
position: fixed;
|
|
22
|
+
z-index: 2;
|
|
23
|
+
|
|
24
|
+
display: block;
|
|
25
|
+
overflow-y: auto;
|
|
26
|
+
flex-shrink: 0;
|
|
27
|
+
width: 15rem;
|
|
28
|
+
height: calc(100vh - var(--margin-top));
|
|
29
|
+
padding: 0;
|
|
30
|
+
margin: 0;
|
|
31
|
+
|
|
32
|
+
font-family: var(--font-family);
|
|
33
|
+
|
|
34
|
+
background-color: white;
|
|
35
|
+
box-shadow:
|
|
36
|
+
0px 2px 2px 0px rgba(1, 5, 50, 0.02),
|
|
37
|
+
0px 3px 4px 0px rgba(1, 5, 50, 0.02),
|
|
38
|
+
0px 1px 5px 0px rgba(1, 5, 50, 0.04);
|
|
39
|
+
|
|
40
|
+
transition: transform 200ms ease-in-out;
|
|
41
|
+
|
|
42
|
+
@include mixins.breakpoint("max", "medium") {
|
|
43
|
+
box-shadow: 0 30px 50px #00000029;
|
|
44
|
+
transform: translateX(-110%);
|
|
45
|
+
|
|
46
|
+
&.hidden {
|
|
47
|
+
visibility: hidden;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.open {
|
|
51
|
+
visibility: visible;
|
|
52
|
+
transform: translateX(0);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@include mixins.breakpoint("min", "medium") {
|
|
57
|
+
&.sidenavbar--collapsed {
|
|
58
|
+
box-shadow: 0 30px 50px #00000029;
|
|
59
|
+
transform: translateX(-110%);
|
|
60
|
+
|
|
61
|
+
&.hidden {
|
|
62
|
+
visibility: hidden;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import React, {
|
|
18
|
+
ComponentPropsWithRef,
|
|
19
|
+
CSSProperties,
|
|
20
|
+
ForwardRefRenderFunction,
|
|
21
|
+
useState
|
|
22
|
+
} from "react";
|
|
23
|
+
import classes from "./LeftNav.module.scss";
|
|
24
|
+
import { MenuItem } from "./LeftNav.interfaces";
|
|
25
|
+
import { LeftNavItem } from "./LeftNavItem/LeftNavItem";
|
|
26
|
+
import { useRefItems } from "./useRefItems";
|
|
27
|
+
import { ScreenSize } from "../../../../variables";
|
|
28
|
+
import { useScreenSize } from "../../../../hooks/useScreenSize";
|
|
29
|
+
|
|
30
|
+
export interface Props extends ComponentPropsWithRef<"nav"> {
|
|
31
|
+
isSideMenuOpen?: boolean;
|
|
32
|
+
onScreenSizeChange?: (nextScreenSize: ScreenSize, prevScreenSize?: ScreenSize) => void;
|
|
33
|
+
items: MenuItem[];
|
|
34
|
+
navigate: (path: string) => void;
|
|
35
|
+
onItemClick?: (path?: string, button?: boolean) => void;
|
|
36
|
+
marginTop?: string;
|
|
37
|
+
internalLinkPrefix?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const LeftNavComponent: ForwardRefRenderFunction<HTMLElement, Props> = (
|
|
41
|
+
{
|
|
42
|
+
isSideMenuOpen,
|
|
43
|
+
onScreenSizeChange,
|
|
44
|
+
items,
|
|
45
|
+
navigate,
|
|
46
|
+
onItemClick,
|
|
47
|
+
marginTop,
|
|
48
|
+
internalLinkPrefix,
|
|
49
|
+
...rest
|
|
50
|
+
},
|
|
51
|
+
ref
|
|
52
|
+
) => {
|
|
53
|
+
const [isSideNavbarVisible, setIsSideNavbarVisible] = useState(isSideMenuOpen);
|
|
54
|
+
useScreenSize({ onScreenSizeChange });
|
|
55
|
+
const refItems = useRefItems({ items });
|
|
56
|
+
|
|
57
|
+
const onSideNavbarTransitionEnd: React.TransitionEventHandler<HTMLUListElement> = () => {
|
|
58
|
+
setIsSideNavbarVisible(isSideMenuOpen);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const renderMenuItems = () => {
|
|
62
|
+
if (!items.length) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return items.map(item => {
|
|
67
|
+
return (
|
|
68
|
+
<LeftNavItem
|
|
69
|
+
ref={el => refItems.addElementReference(el, item.key)}
|
|
70
|
+
key={item.key}
|
|
71
|
+
item={item}
|
|
72
|
+
navigate={navigate}
|
|
73
|
+
onItemClick={onItemClick}
|
|
74
|
+
refItems={refItems}
|
|
75
|
+
internalLinkPrefix={internalLinkPrefix}
|
|
76
|
+
/>
|
|
77
|
+
);
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<nav {...rest} ref={ref}>
|
|
83
|
+
<ul
|
|
84
|
+
style={{ "--margin-top": marginTop } as CSSProperties}
|
|
85
|
+
className={`${classes["sidenavbar"]} ${!isSideMenuOpen ? classes["sidenavbar--collapsed"] : ""} ${isSideMenuOpen ? classes["open"] : ""} ${
|
|
86
|
+
!isSideNavbarVisible ? classes["hidden"] : ""
|
|
87
|
+
}`}
|
|
88
|
+
onTransitionEnd={onSideNavbarTransitionEnd}
|
|
89
|
+
>
|
|
90
|
+
{renderMenuItems()}
|
|
91
|
+
</ul>
|
|
92
|
+
</nav>
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export const LeftNav = React.forwardRef(LeftNavComponent);
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import React, {
|
|
18
|
+
ForwardRefExoticComponent,
|
|
19
|
+
ForwardRefRenderFunction,
|
|
20
|
+
HTMLProps,
|
|
21
|
+
MouseEvent,
|
|
22
|
+
Ref,
|
|
23
|
+
useEffect,
|
|
24
|
+
useState
|
|
25
|
+
} from "react";
|
|
26
|
+
import classes from "./LeftNavItem.module.scss";
|
|
27
|
+
import { MenuItem } from "../LeftNav.interfaces";
|
|
28
|
+
import { Icon, Icons } from "../../../../Icon/Icon";
|
|
29
|
+
import { useKeyboardNavigation } from "./useKeyboardNavigation";
|
|
30
|
+
import { UseRefItemsReturnType } from "../useRefItems";
|
|
31
|
+
import { LeftNavItemProps } from "./LeftNavItem.interface";
|
|
32
|
+
|
|
33
|
+
export interface Props extends HTMLProps<HTMLElement> {
|
|
34
|
+
item: MenuItem;
|
|
35
|
+
navigate: (path: string) => void;
|
|
36
|
+
onItemClick?: (path?: string, button?: boolean) => void;
|
|
37
|
+
refItems: UseRefItemsReturnType;
|
|
38
|
+
NestedComponent: ForwardRefExoticComponent<LeftNavItemProps>;
|
|
39
|
+
closeParentList?: () => void;
|
|
40
|
+
internalLinkPrefix?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const chevronIconDataKey = { attributeKey: "chevron-icon", objectKey: "chevronIcon" };
|
|
44
|
+
|
|
45
|
+
const ButtonLeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, Props> = (
|
|
46
|
+
{
|
|
47
|
+
item,
|
|
48
|
+
navigate,
|
|
49
|
+
onItemClick,
|
|
50
|
+
refItems,
|
|
51
|
+
NestedComponent,
|
|
52
|
+
closeParentList,
|
|
53
|
+
internalLinkPrefix = ""
|
|
54
|
+
},
|
|
55
|
+
ref
|
|
56
|
+
) => {
|
|
57
|
+
const [expanded, setExpanded] = useState(false);
|
|
58
|
+
const isActiveParent = !!item.items?.find(menuItem => menuItem.active);
|
|
59
|
+
|
|
60
|
+
const onExpandIconClickHandler = () => {
|
|
61
|
+
setExpanded(expanded => !expanded);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const { onKeyPressNavigation } = useKeyboardNavigation({
|
|
65
|
+
refItems,
|
|
66
|
+
item,
|
|
67
|
+
closeParentList,
|
|
68
|
+
onExpandIconClickHandler
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const onButtonClickHandler = (event: MouseEvent<HTMLButtonElement>) => {
|
|
72
|
+
const isChevronIcon = !!(event.target as HTMLElement).dataset[chevronIconDataKey.objectKey];
|
|
73
|
+
if (!isChevronIcon && item.path && !item.disabled) {
|
|
74
|
+
event.preventDefault();
|
|
75
|
+
navigate(item.path);
|
|
76
|
+
onItemClick?.(item.path, true);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const onLinkClickHandler = (event: MouseEvent<HTMLAnchorElement>) => {
|
|
81
|
+
event.preventDefault();
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const openParentWithActiveElement = () => {
|
|
85
|
+
if (isActiveParent) {
|
|
86
|
+
setExpanded(true);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
useEffect(openParentWithActiveElement, [isActiveParent]);
|
|
91
|
+
|
|
92
|
+
const getStylingClasses = () => {
|
|
93
|
+
const buttonClasses = [classes["menu-item"], classes["menu-button"]];
|
|
94
|
+
expanded && buttonClasses.push(classes["expanded"]);
|
|
95
|
+
(item.active || isActiveParent) && buttonClasses.push(classes["menu-item-active"]);
|
|
96
|
+
item.disabled && buttonClasses.push(classes["disabled"]);
|
|
97
|
+
const buttonWrapperClasses = [classes["menu-button-wrapper"], classes["menu-list-item"]];
|
|
98
|
+
expanded && buttonWrapperClasses.push(classes["expanded"]);
|
|
99
|
+
item.active && buttonWrapperClasses.push(classes["menu-item-active"]);
|
|
100
|
+
return {
|
|
101
|
+
buttonClasses,
|
|
102
|
+
buttonWrapperClasses
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const { buttonClasses, buttonWrapperClasses } = getStylingClasses();
|
|
107
|
+
const tabIndexActive = item.active ? 0 : -1;
|
|
108
|
+
const tabIndex = item.disabled ? -1 : tabIndexActive;
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<li className={buttonWrapperClasses.join(" ")} data-testid={item.key}>
|
|
112
|
+
<button
|
|
113
|
+
aria-controls={item.key}
|
|
114
|
+
data-testid={`left-nav-item-${item.key}`}
|
|
115
|
+
aria-expanded={expanded}
|
|
116
|
+
ref={ref as Ref<HTMLButtonElement>}
|
|
117
|
+
onKeyDown={onKeyPressNavigation}
|
|
118
|
+
onClick={onButtonClickHandler}
|
|
119
|
+
className={buttonClasses.join(" ")}
|
|
120
|
+
disabled={item.disabled}
|
|
121
|
+
tabIndex={tabIndex}
|
|
122
|
+
>
|
|
123
|
+
<div className={classes["menu-item-text-wrapper"]}>
|
|
124
|
+
{item.iconComponent &&
|
|
125
|
+
React.cloneElement(item.iconComponent, { className: classes["menu-item-icon"] })}
|
|
126
|
+
{item.path ? (
|
|
127
|
+
<a
|
|
128
|
+
href={item.path ? internalLinkPrefix + item.path : ""}
|
|
129
|
+
aria-current={item.active ? "page" : false}
|
|
130
|
+
className={classes["menu-item-text"]}
|
|
131
|
+
onClick={onLinkClickHandler}
|
|
132
|
+
tabIndex={-1}
|
|
133
|
+
>
|
|
134
|
+
{item.title}
|
|
135
|
+
</a>
|
|
136
|
+
) : (
|
|
137
|
+
<span className={classes["menu-item-text"]}>{item.title}</span>
|
|
138
|
+
)}
|
|
139
|
+
</div>
|
|
140
|
+
<Icon
|
|
141
|
+
onClick={onExpandIconClickHandler}
|
|
142
|
+
className={classes["menu-item-expand-icon"]}
|
|
143
|
+
icon={Icons.ChevronDown}
|
|
144
|
+
{...{ [`data-${chevronIconDataKey.attributeKey}`]: "true" }}
|
|
145
|
+
/>
|
|
146
|
+
</button>
|
|
147
|
+
<ul
|
|
148
|
+
id={item.key}
|
|
149
|
+
style={{ maxHeight: expanded ? undefined : 0 }}
|
|
150
|
+
className={classes["menu-list"]}
|
|
151
|
+
>
|
|
152
|
+
{!item.disabled &&
|
|
153
|
+
item.items?.map(item => (
|
|
154
|
+
<NestedComponent
|
|
155
|
+
ref={el => refItems.addElementReference(el, item.key)}
|
|
156
|
+
key={item.key}
|
|
157
|
+
closeParentList={() => setExpanded(false)}
|
|
158
|
+
onKeyUp={onKeyPressNavigation}
|
|
159
|
+
item={item}
|
|
160
|
+
navigate={navigate}
|
|
161
|
+
onItemClick={onItemClick}
|
|
162
|
+
refItems={refItems}
|
|
163
|
+
internalLinkPrefix={internalLinkPrefix}
|
|
164
|
+
>
|
|
165
|
+
{item.title}
|
|
166
|
+
</NestedComponent>
|
|
167
|
+
))}
|
|
168
|
+
</ul>
|
|
169
|
+
</li>
|
|
170
|
+
);
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
export const ButtonLeftNavItem = React.forwardRef(ButtonLeftNavItemComponent);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { HTMLProps } from "react";
|
|
18
|
+
import { MenuItem } from "../LeftNav.interfaces";
|
|
19
|
+
import { UseRefItemsReturnType } from "../useRefItems";
|
|
20
|
+
|
|
21
|
+
export interface LeftNavItemProps extends HTMLProps<HTMLElement> {
|
|
22
|
+
item: MenuItem;
|
|
23
|
+
navigate: (path: string) => void;
|
|
24
|
+
onItemClick?: (path?: string, button?: boolean) => void;
|
|
25
|
+
refItems: UseRefItemsReturnType;
|
|
26
|
+
closeParentList?: () => void;
|
|
27
|
+
internalLinkPrefix?: string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
.menu-button {
|
|
18
|
+
background-color: transparent;
|
|
19
|
+
border: 0;
|
|
20
|
+
font-family: var(--font-family);
|
|
21
|
+
|
|
22
|
+
a {
|
|
23
|
+
color: inherit;
|
|
24
|
+
text-decoration: inherit;
|
|
25
|
+
|
|
26
|
+
&:hover,
|
|
27
|
+
&:active,
|
|
28
|
+
&:focus {
|
|
29
|
+
color: inherit;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.menu-link {
|
|
35
|
+
text-decoration: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.menu-button-wrapper {
|
|
39
|
+
> .menu-button + ul > .menu-button-wrapper,
|
|
40
|
+
> .menu-button + ul > a {
|
|
41
|
+
opacity: 0;
|
|
42
|
+
transform: translateY(-60px);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
$maxElementsOnOneSubLevel: 20;
|
|
46
|
+
&.expanded {
|
|
47
|
+
> .menu-button + ul > .menu-button-wrapper,
|
|
48
|
+
> .menu-button + ul > li {
|
|
49
|
+
opacity: 0;
|
|
50
|
+
animation-name: item-fade-in;
|
|
51
|
+
animation-duration: 250ms;
|
|
52
|
+
animation-fill-mode: forwards;
|
|
53
|
+
|
|
54
|
+
@for $i from 1 to $maxElementsOnOneSubLevel {
|
|
55
|
+
&:nth-child(#{$i}) {
|
|
56
|
+
animation-delay: (100ms * ($i - 1));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.menu-button-wrapper .menu-link {
|
|
63
|
+
padding-left: 2.5rem;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.menu-list {
|
|
68
|
+
padding: 0;
|
|
69
|
+
margin: 0;
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
max-height: 100000px; /* because transition does not work on 'height:auto', we use 'max-height' with very large value to just run transition */
|
|
72
|
+
|
|
73
|
+
list-style: none;
|
|
74
|
+
text-align: left;
|
|
75
|
+
|
|
76
|
+
transition: max-height 0.15s ease-in-out;
|
|
77
|
+
|
|
78
|
+
.menu-item-text-wrapper {
|
|
79
|
+
padding-left: 2rem;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
a,
|
|
83
|
+
button {
|
|
84
|
+
&:focus-visible {
|
|
85
|
+
outline-offset: -0.0625rem;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.menu-item {
|
|
91
|
+
box-sizing: border-box;
|
|
92
|
+
display: flex;
|
|
93
|
+
padding: 1.125rem 1rem;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: space-between;
|
|
96
|
+
width: 100%;
|
|
97
|
+
|
|
98
|
+
color: var(--color-blue-grey900);
|
|
99
|
+
|
|
100
|
+
line-height: 1.5rem;
|
|
101
|
+
font-size: 1rem;
|
|
102
|
+
font-weight: 400;
|
|
103
|
+
|
|
104
|
+
transition: all 0.15s ease-in-out;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
|
|
107
|
+
&:focus-visible {
|
|
108
|
+
outline-offset: -0.0625rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.menu-item-text-wrapper {
|
|
112
|
+
display: flex;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.menu-item-expand-icon {
|
|
116
|
+
padding: 0.375rem;
|
|
117
|
+
margin: -0.375rem;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
& &-icon {
|
|
121
|
+
display: flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
justify-content: center;
|
|
124
|
+
width: 1.5rem;
|
|
125
|
+
margin-right: 0.5rem;
|
|
126
|
+
font-size: 1.125rem;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&-text {
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&-expand-icon {
|
|
135
|
+
font-size: 0.75rem;
|
|
136
|
+
color: var(--color-blue-grey900);
|
|
137
|
+
transition: all 0.15s ease-in-out;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&.expanded .menu-item-expand-icon {
|
|
141
|
+
transform: rotate(180deg);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
a {
|
|
145
|
+
color: inherit;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&:hover {
|
|
149
|
+
background-color: var(--color-blue-grey50);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&:focus,
|
|
153
|
+
&:active {
|
|
154
|
+
color: inherit;
|
|
155
|
+
background-color: var(--color-blue-grey100);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&.disabled {
|
|
159
|
+
color: var(--color-blue-grey400);
|
|
160
|
+
background-color: var(--color-blue-grey25);
|
|
161
|
+
pointer-events: none;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.menu-list-item {
|
|
166
|
+
position: relative;
|
|
167
|
+
|
|
168
|
+
a.menu-item {
|
|
169
|
+
padding: 0.75rem 1rem;
|
|
170
|
+
color: var(--color-blue-grey900);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
a.menu-item-active {
|
|
174
|
+
background-color: var(--left-nav-item-active-background-color);
|
|
175
|
+
|
|
176
|
+
&:hover {
|
|
177
|
+
background-color: var(--color-blue-grey50);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&:focus,
|
|
181
|
+
&:active {
|
|
182
|
+
background-color: var(--color-blue-grey100);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&:before {
|
|
186
|
+
content: "";
|
|
187
|
+
height: 100%;
|
|
188
|
+
position: absolute;
|
|
189
|
+
left: 0;
|
|
190
|
+
z-index: 2;
|
|
191
|
+
border-top-right-radius: 0.125rem;
|
|
192
|
+
border-bottom-right-radius: 0.125rem;
|
|
193
|
+
border-left: 0.25rem solid var(--left-nav-item-active-ribbon-color);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.menu-item-text {
|
|
197
|
+
font-weight: 700;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
button.menu-item-active {
|
|
202
|
+
.menu-item-text {
|
|
203
|
+
font-weight: 700;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@keyframes item-fade-in {
|
|
209
|
+
0% {
|
|
210
|
+
opacity: 0;
|
|
211
|
+
transform: translateY(-60px);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
80% {
|
|
215
|
+
opacity: 0.6;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
100% {
|
|
219
|
+
opacity: 1;
|
|
220
|
+
transform: translateY(0px);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import React, { ForwardRefRenderFunction } from "react";
|
|
18
|
+
import { ButtonLeftNavItem } from "./ButtonLeftNavItem";
|
|
19
|
+
import { LinkLeftNavItem } from "./LinkLeftNavItem";
|
|
20
|
+
import { LeftNavItemProps } from "./LeftNavItem.interface";
|
|
21
|
+
|
|
22
|
+
const LeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, LeftNavItemProps> = (
|
|
23
|
+
props,
|
|
24
|
+
ref
|
|
25
|
+
) => {
|
|
26
|
+
const shouldBeButton = !!(props.item.items?.length ?? 0 >= 1);
|
|
27
|
+
return shouldBeButton ? (
|
|
28
|
+
<ButtonLeftNavItem {...props} ref={ref} NestedComponent={LeftNavItem} />
|
|
29
|
+
) : (
|
|
30
|
+
<LinkLeftNavItem {...props} ref={ref} />
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const LeftNavItem = React.forwardRef(LeftNavItemComponent);
|