@onewelcome/react-lib-components 2.3.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Button/BaseButton.module.cjs.js +1 -1
- package/dist/cjs/Button/Button.module.cjs.js +1 -1
- package/dist/cjs/Button/IconButton.module.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell.module.cjs.js +1 -1
- package/dist/cjs/Form/Fieldset/Fieldset.module.cjs.js +1 -1
- package/dist/cjs/Form/FormGroup/FormGroup.cjs.js +1 -1
- package/dist/cjs/Form/FormGroup/FormGroup.module.cjs.js +1 -1
- package/dist/cjs/Form/FormHelperText/FormHelperText.cjs.js +1 -1
- package/dist/cjs/Form/FormHelperText/FormHelperText.module.cjs.js +1 -1
- package/dist/cjs/Form/Input/Input.module.cjs.js +1 -1
- package/dist/cjs/Form/Select/Option.cjs.js +1 -1
- package/dist/cjs/Form/Select/Select.cjs.js +1 -1
- package/dist/cjs/Form/Select/Select.module.cjs.js +1 -1
- package/dist/cjs/Form/Select/SelectService.cjs.js +1 -1
- package/dist/cjs/Form/Textarea/Textarea.module.cjs.js +1 -1
- package/dist/cjs/Form/Toggle/Toggle.cjs.js +1 -1
- package/dist/cjs/Form/Toggle/Toggle.module.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/InputWrapper/InputWrapper.module.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/Wrapper/Wrapper.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/Wrapper/Wrapper.module.cjs.js +1 -1
- package/dist/cjs/Icon/Icon.cjs.js +1 -1
- package/dist/cjs/Icon/Icon.module.cjs.js +1 -1
- package/dist/cjs/Link/Link.module.cjs.js +1 -1
- package/dist/cjs/Notifications/BaseModal/BaseModal.cjs.js +1 -1
- package/dist/cjs/Notifications/BaseModal/BaseModal.module.cjs.js +1 -1
- package/dist/cjs/Notifications/BaseModal/BaseModalActions/BaseModalActions.cjs.js +1 -1
- package/dist/cjs/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.cjs.js +1 -1
- package/dist/cjs/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.cjs.js +1 -1
- package/dist/cjs/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.cjs.js +1 -1
- package/dist/cjs/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.cjs.js +1 -1
- package/dist/cjs/Notifications/Dialog/Dialog.cjs.js +1 -1
- package/dist/cjs/Notifications/Dialog/Dialog.module.cjs.js +1 -1
- package/dist/cjs/Notifications/Dialog/DialogActions/DialogActions.cjs.js +1 -1
- package/dist/cjs/Notifications/Dialog/DialogActions/DialogActions.module.cjs.js +1 -1
- package/dist/cjs/Notifications/Dialog/DialogTitle/DialogTitle.cjs.js +1 -1
- package/dist/cjs/Notifications/Dialog/DialogTitle/DialogTitle.module.cjs.js +1 -1
- package/dist/cjs/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.cjs.js +1 -1
- package/dist/cjs/Notifications/NotificationProvider/NotificationContext.cjs.js +2 -0
- package/dist/cjs/Notifications/NotificationProvider/NotificationContext.cjs.js.map +1 -0
- package/dist/cjs/Notifications/NotificationProvider/NotificationService.cjs.js +2 -0
- package/dist/cjs/Notifications/NotificationProvider/NotificationService.cjs.js.map +1 -0
- package/dist/cjs/Notifications/SlideInModal/SlideInModal.module.cjs.js +1 -1
- package/dist/cjs/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.module.cjs.js +1 -1
- package/dist/cjs/Notifications/Snackbar/SnackbarItem/SnackbarItem.cjs.js +1 -1
- package/dist/cjs/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.cjs.js +1 -1
- package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.cjs.js +1 -1
- package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.cjs.js +1 -1
- package/dist/cjs/Notifications/Snackbar/useSnackbar.cjs.js +1 -1
- package/dist/cjs/Pagination/Pagination.cjs.js +1 -1
- package/dist/cjs/Pagination/Pagination.module.cjs.js +1 -1
- package/dist/cjs/Popover/Popover.cjs.js +1 -1
- package/dist/cjs/Popover/Popover.module.cjs.js +1 -1
- package/dist/cjs/ProgressBar/ProgressBar.cjs.js +1 -1
- package/dist/cjs/ProgressBar/ProgressBar.module.cjs.js +1 -1
- package/dist/cjs/Skeleton/Skeleton.module.cjs.js +1 -1
- package/dist/cjs/Tabs/Tabs.module.cjs.js +1 -1
- package/dist/cjs/Tiles/Tile.module.cjs.js +1 -1
- package/dist/cjs/Tooltip/Tooltip.cjs.js +1 -1
- package/dist/cjs/Tooltip/Tooltip.module.cjs.js +1 -1
- package/dist/cjs/Wizard/WizardActions/WizardActions.cjs.js +1 -1
- package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js +1 -1
- package/dist/{esm → cjs/src}/components/Form/FormHelperText/FormHelperText.d.ts +1 -0
- package/dist/cjs/{components → src/components}/Form/Select/Option.d.ts +2 -2
- package/dist/{esm → cjs/src}/components/Form/Select/Select.d.ts +1 -0
- package/dist/{esm → cjs/src}/components/Form/Select/Select.interfaces.d.ts +3 -3
- package/dist/{esm → cjs/src}/components/Form/Select/SelectService.d.ts +1 -1
- package/dist/cjs/{components → src/components}/Form/Toggle/Toggle.d.ts +5 -0
- package/dist/cjs/{components → src/components}/Icon/Icon.d.ts +1 -0
- package/dist/cjs/{components → src/components}/Notifications/BaseModal/BaseModalActions/BaseModalActions.d.ts +6 -0
- package/dist/cjs/{components → src/components}/Notifications/Dialog/Dialog.d.ts +4 -1
- package/dist/cjs/{components → src/components}/Notifications/Dialog/DialogActions/DialogActions.d.ts +2 -2
- package/dist/cjs/{components → src/components}/Notifications/Dialog/DialogTitle/DialogTitle.d.ts +2 -0
- package/dist/cjs/{components → src/components}/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.d.ts +2 -0
- package/dist/cjs/src/components/Notifications/NotificationProvider/NotificationContext.d.ts +35 -0
- package/dist/cjs/src/components/Notifications/NotificationProvider/NotificationService.d.ts +2 -0
- package/dist/cjs/src/components/Notifications/NotificationProvider/notification.interfaces.d.ts +46 -0
- package/dist/{esm → cjs/src}/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +3 -2
- package/dist/{esm → cjs/src}/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +2 -1
- package/dist/cjs/{components → src/components}/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +4 -3
- package/dist/{esm → cjs/src}/components/Notifications/Snackbar/interfaces.d.ts +2 -1
- package/dist/cjs/src/components/Notifications/Snackbar/useSnackbar.d.ts +6 -0
- package/dist/{esm → cjs/src}/components/Pagination/Pagination.d.ts +1 -1
- package/dist/cjs/{components → src/components}/ProgressBar/ProgressBar.d.ts +4 -1
- package/dist/cjs/src/components/Tag/Tag.d.ts +10 -0
- package/dist/{esm → cjs/src}/components/Tooltip/Tooltip.d.ts +5 -5
- package/dist/cjs/src/components/Wizard/WizardActions/WizardActions.d.ts +28 -0
- package/dist/cjs/{components → src/components}/_BaseStyling_/BaseStyling.d.ts +7 -2
- package/dist/cjs/src/hooks/useDetermineStatusIcon.cjs.js +1 -1
- package/dist/cjs/src/hooks/usePosition.cjs.js +1 -1
- package/dist/cjs/{hooks → src/hooks}/usePosition.d.ts +1 -0
- package/dist/cjs/src/index.cjs.js +1 -1
- package/dist/cjs/{index.d.ts → src/index.d.ts} +3 -0
- package/dist/cjs/{interfaces.d.ts → src/interfaces.d.ts} +3 -0
- package/dist/cjs/src/util/helper.cjs.js +1 -1
- package/dist/{esm → cjs/src}/util/helper.d.ts +5 -0
- package/dist/cjs/stories/utils/useStoryCentring.d.ts +1 -0
- package/dist/esm/Button/BaseButton.module.esm.js +1 -1
- package/dist/esm/Button/Button.module.esm.js +1 -1
- package/dist/esm/Button/IconButton.module.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridCell.module.esm.js +1 -1
- package/dist/esm/Form/Fieldset/Fieldset.module.esm.js +1 -1
- package/dist/esm/Form/FormGroup/FormGroup.esm.js +1 -1
- package/dist/esm/Form/FormGroup/FormGroup.module.esm.js +1 -1
- package/dist/esm/Form/FormHelperText/FormHelperText.esm.js +1 -1
- package/dist/esm/Form/FormHelperText/FormHelperText.module.esm.js +1 -1
- package/dist/esm/Form/Input/Input.module.esm.js +1 -1
- package/dist/esm/Form/Select/Option.esm.js +1 -1
- package/dist/esm/Form/Select/Select.esm.js +1 -1
- package/dist/esm/Form/Select/Select.module.esm.js +1 -1
- package/dist/esm/Form/Select/SelectService.esm.js +1 -1
- package/dist/esm/Form/Textarea/Textarea.module.esm.js +1 -1
- package/dist/esm/Form/Toggle/Toggle.esm.js +1 -1
- package/dist/esm/Form/Toggle/Toggle.module.esm.js +1 -1
- package/dist/esm/Form/Wrapper/InputWrapper/InputWrapper.module.esm.js +1 -1
- package/dist/esm/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.esm.js +1 -1
- package/dist/esm/Form/Wrapper/Wrapper/Wrapper.esm.js +1 -1
- package/dist/esm/Form/Wrapper/Wrapper/Wrapper.module.esm.js +1 -1
- package/dist/esm/Icon/Icon.esm.js +1 -1
- package/dist/esm/Icon/Icon.module.esm.js +1 -1
- package/dist/esm/Link/Link.module.esm.js +1 -1
- package/dist/esm/Notifications/BaseModal/BaseModal.esm.js +1 -1
- package/dist/esm/Notifications/BaseModal/BaseModal.module.esm.js +1 -1
- package/dist/esm/Notifications/BaseModal/BaseModalActions/BaseModalActions.esm.js +1 -1
- package/dist/esm/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.esm.js +1 -1
- package/dist/esm/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.esm.js +1 -1
- package/dist/esm/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.esm.js +1 -1
- package/dist/esm/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.esm.js +1 -1
- package/dist/esm/Notifications/Dialog/Dialog.esm.js +1 -1
- package/dist/esm/Notifications/Dialog/Dialog.module.esm.js +1 -1
- package/dist/esm/Notifications/Dialog/DialogActions/DialogActions.esm.js +1 -1
- package/dist/esm/Notifications/Dialog/DialogActions/DialogActions.module.esm.js +1 -1
- package/dist/esm/Notifications/Dialog/DialogTitle/DialogTitle.esm.js +1 -1
- package/dist/esm/Notifications/Dialog/DialogTitle/DialogTitle.module.esm.js +1 -1
- package/dist/esm/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.esm.js +1 -1
- package/dist/esm/Notifications/NotificationProvider/NotificationContext.esm.js +2 -0
- package/dist/esm/Notifications/NotificationProvider/NotificationContext.esm.js.map +1 -0
- package/dist/esm/Notifications/NotificationProvider/NotificationService.esm.js +2 -0
- package/dist/esm/Notifications/NotificationProvider/NotificationService.esm.js.map +1 -0
- package/dist/esm/Notifications/SlideInModal/SlideInModal.module.esm.js +1 -1
- package/dist/esm/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.module.esm.js +1 -1
- package/dist/esm/Notifications/Snackbar/SnackbarItem/SnackbarItem.esm.js +1 -1
- package/dist/esm/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.esm.js +1 -1
- package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.esm.js +1 -1
- package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.esm.js +1 -1
- package/dist/esm/Notifications/Snackbar/useSnackbar.esm.js +1 -1
- package/dist/esm/Pagination/Pagination.esm.js +1 -1
- package/dist/esm/Pagination/Pagination.module.esm.js +1 -1
- package/dist/esm/Popover/Popover.esm.js +1 -1
- package/dist/esm/Popover/Popover.module.esm.js +1 -1
- package/dist/esm/ProgressBar/ProgressBar.esm.js +1 -1
- package/dist/esm/ProgressBar/ProgressBar.module.esm.js +1 -1
- package/dist/esm/Skeleton/Skeleton.module.esm.js +1 -1
- package/dist/esm/Tabs/Tabs.module.esm.js +1 -1
- package/dist/esm/Tiles/Tile.module.esm.js +1 -1
- package/dist/esm/Tooltip/Tooltip.esm.js +1 -1
- package/dist/esm/Tooltip/Tooltip.module.esm.js +1 -1
- package/dist/esm/Wizard/WizardActions/WizardActions.esm.js +1 -1
- package/dist/esm/_BaseStyling_/BaseStyling.esm.js +1 -1
- package/dist/{cjs → esm/src}/components/Form/FormHelperText/FormHelperText.d.ts +1 -0
- package/dist/esm/{components → src/components}/Form/Select/Option.d.ts +2 -2
- package/dist/{cjs → esm/src}/components/Form/Select/Select.d.ts +1 -0
- package/dist/{cjs → esm/src}/components/Form/Select/Select.interfaces.d.ts +3 -3
- package/dist/{cjs → esm/src}/components/Form/Select/SelectService.d.ts +1 -1
- package/dist/esm/{components → src/components}/Form/Toggle/Toggle.d.ts +5 -0
- package/dist/esm/{components → src/components}/Icon/Icon.d.ts +1 -0
- package/dist/esm/{components → src/components}/Notifications/BaseModal/BaseModalActions/BaseModalActions.d.ts +6 -0
- package/dist/esm/{components → src/components}/Notifications/Dialog/Dialog.d.ts +4 -1
- package/dist/esm/{components → src/components}/Notifications/Dialog/DialogActions/DialogActions.d.ts +2 -2
- package/dist/esm/{components → src/components}/Notifications/Dialog/DialogTitle/DialogTitle.d.ts +2 -0
- package/dist/esm/{components → src/components}/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.d.ts +2 -0
- package/dist/esm/src/components/Notifications/NotificationProvider/NotificationContext.d.ts +35 -0
- package/dist/esm/src/components/Notifications/NotificationProvider/NotificationService.d.ts +2 -0
- package/dist/esm/src/components/Notifications/NotificationProvider/notification.interfaces.d.ts +46 -0
- package/dist/{cjs → esm/src}/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +3 -2
- package/dist/{cjs → esm/src}/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +2 -1
- package/dist/esm/{components → src/components}/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +4 -3
- package/dist/{cjs → esm/src}/components/Notifications/Snackbar/interfaces.d.ts +2 -1
- package/dist/esm/src/components/Notifications/Snackbar/useSnackbar.d.ts +6 -0
- package/dist/{cjs → esm/src}/components/Pagination/Pagination.d.ts +1 -1
- package/dist/esm/{components → src/components}/ProgressBar/ProgressBar.d.ts +4 -1
- package/dist/esm/src/components/Tag/Tag.d.ts +10 -0
- package/dist/{cjs → esm/src}/components/Tooltip/Tooltip.d.ts +5 -5
- package/dist/esm/src/components/Wizard/WizardActions/WizardActions.d.ts +28 -0
- package/dist/esm/{components → src/components}/_BaseStyling_/BaseStyling.d.ts +7 -2
- package/dist/esm/src/hooks/useDetermineStatusIcon.esm.js +1 -1
- package/dist/esm/{hooks → src/hooks}/usePosition.d.ts +1 -0
- package/dist/esm/src/hooks/usePosition.esm.js +1 -1
- package/dist/esm/src/hooks/useSpacing.test.d.ts +1 -0
- package/dist/esm/src/hooks/useUploadFile.test.d.ts +1 -0
- package/dist/esm/src/hooks/useWrapper.test.d.ts +1 -0
- package/dist/esm/{index.d.ts → src/index.d.ts} +3 -0
- package/dist/esm/src/index.esm.js +1 -1
- package/dist/esm/{interfaces.d.ts → src/interfaces.d.ts} +3 -0
- package/dist/{cjs → esm/src}/util/helper.d.ts +5 -0
- package/dist/esm/src/util/helper.esm.js +1 -1
- package/dist/esm/src/util/helper.test.d.ts +1 -0
- package/dist/esm/stories/utils/useStoryCentring.d.ts +1 -0
- package/package.json +52 -52
- package/src/components/Form/Fieldset/Fieldset.module.scss +2 -2
- package/src/components/Form/FileUpload/FileItem/FileItem.tsx +1 -5
- package/src/components/Form/FormGroup/FormGroup.module.scss +2 -4
- package/src/components/Form/FormGroup/FormGroup.tsx +11 -7
- package/src/components/Form/FormHelperText/FormHelperText.module.scss +7 -3
- package/src/components/Form/FormHelperText/FormHelperText.tsx +8 -8
- package/src/components/Form/Input/Input.module.scss +8 -3
- package/src/components/Form/Input/Input.test.tsx +1 -1
- package/src/components/Form/Select/Option.tsx +4 -5
- package/src/components/Form/Select/Select.interfaces.ts +3 -3
- package/src/components/Form/Select/Select.module.scss +36 -31
- package/src/components/Form/Select/Select.test.tsx +106 -7
- package/src/components/Form/Select/Select.tsx +55 -21
- package/src/components/Form/Select/SelectService.ts +38 -10
- package/src/components/Form/Textarea/Textarea.module.scss +19 -5
- package/src/components/Form/Textarea/Textarea.test.tsx +1 -1
- package/src/components/Form/Toggle/Toggle.module.scss +127 -1
- package/src/components/Form/Toggle/Toggle.test.tsx +102 -1
- package/src/components/Form/Toggle/Toggle.tsx +25 -1
- package/src/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss +4 -2
- package/src/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss +0 -2
- package/src/components/Form/Wrapper/Wrapper/Wrapper.tsx +1 -0
- package/src/components/Icon/Icon.module.scss +14 -11
- package/src/components/Icon/Icon.tsx +1 -0
- package/src/components/Notifications/BaseModal/BaseModal.module.scss +5 -7
- package/src/components/Notifications/BaseModal/BaseModal.tsx +2 -0
- package/src/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss +43 -3
- package/src/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.test.tsx +33 -2
- package/src/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.tsx +35 -4
- package/src/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss +4 -1
- package/src/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss +3 -3
- package/src/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.tsx +11 -3
- package/src/components/Notifications/Dialog/Dialog.module.scss +1 -2
- package/src/components/Notifications/Dialog/Dialog.test.tsx +11 -22
- package/src/components/Notifications/Dialog/Dialog.tsx +13 -9
- package/src/components/Notifications/Dialog/DialogActions/DialogActions.module.scss +1 -7
- package/src/components/Notifications/Dialog/DialogActions/DialogActions.test.tsx +2 -8
- package/src/components/Notifications/Dialog/DialogActions/DialogActions.tsx +7 -4
- package/src/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss +12 -1
- package/src/components/Notifications/Dialog/DialogTitle/DialogTitle.test.tsx +27 -0
- package/src/components/Notifications/Dialog/DialogTitle/DialogTitle.tsx +25 -4
- package/src/components/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.tsx +4 -1
- package/src/components/Notifications/DiscardChangesModal/DiscardChangesModal.test.tsx +2 -5
- package/src/components/Notifications/NotificationProvider/NotificationContext.test.tsx +449 -0
- package/src/components/Notifications/NotificationProvider/NotificationContext.tsx +221 -0
- package/src/components/Notifications/NotificationProvider/NotificationService.ts +33 -0
- package/src/components/Notifications/NotificationProvider/notification.interfaces.ts +68 -0
- package/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.scss +63 -52
- package/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.test.tsx +1 -1
- package/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.tsx +31 -18
- package/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.test.tsx +32 -5
- package/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.tsx +16 -4
- package/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.tsx +13 -3
- package/src/components/Notifications/Snackbar/interfaces.ts +2 -1
- package/src/components/Notifications/Snackbar/useSnackbar.ts +1 -0
- package/src/components/Pagination/Pagination.module.scss +43 -27
- package/src/components/Pagination/Pagination.test.tsx +11 -22
- package/src/components/Pagination/Pagination.tsx +62 -105
- package/src/components/Popover/Popover.module.scss +1 -1
- package/src/components/Popover/Popover.tsx +31 -16
- package/src/components/ProgressBar/ProgressBar.module.scss +50 -13
- package/src/components/ProgressBar/ProgressBar.test.tsx +15 -3
- package/src/components/ProgressBar/ProgressBar.tsx +38 -9
- package/src/components/Tag/Tag.module.scss +24 -0
- package/src/components/Tag/Tag.test.tsx +89 -0
- package/src/components/Tag/Tag.tsx +69 -0
- package/src/components/Tiles/Tile.test.tsx +2 -1
- package/src/components/Tooltip/Tooltip.module.scss +158 -5
- package/src/components/Tooltip/Tooltip.test.tsx +339 -75
- package/src/components/Tooltip/Tooltip.tsx +91 -16
- package/src/components/Wizard/Wizard.test.tsx +32 -17
- package/src/components/Wizard/WizardActions/WizardActions.test.tsx +39 -23
- package/src/components/Wizard/WizardActions/WizardActions.tsx +40 -28
- package/src/components/_BaseStyling_/BaseStyling.tsx +17 -7
- package/src/font/icomoon.eot +0 -0
- package/src/font/icomoon.svg +3 -2
- package/src/font/icomoon.ttf +0 -0
- package/src/font/icomoon.woff +0 -0
- package/src/font/selection.json +1 -1
- package/src/hooks/useDetermineStatusIcon.tsx +1 -3
- package/src/hooks/usePosition.ts +7 -1
- package/src/index.ts +10 -0
- package/src/interfaces.ts +8 -0
- package/src/mixins.module.scss +4 -18
- package/src/util/helper.test.tsx +39 -1
- package/src/util/helper.tsx +25 -0
- package/src/variables.scss +4 -2
- package/dist/cjs/components/Notifications/Snackbar/useSnackbar.d.ts +0 -5
- package/dist/cjs/components/Wizard/WizardActions/WizardActions.d.ts +0 -12
- package/dist/esm/components/Notifications/Snackbar/useSnackbar.d.ts +0 -5
- package/dist/esm/components/Wizard/WizardActions/WizardActions.d.ts +0 -12
- /package/dist/cjs/{components → src/components}/Breadcrumbs/Breadcrumbs.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Breadcrumbs/Breadcrumbs.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Button/BaseButton.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Button/BaseButton.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Button/Button.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Button/Button.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Button/IconButton.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Button/IconButton.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Button/Spinner.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/ContextMenu/ContextMenu.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/ContextMenu/ContextMenu.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/ContextMenu/ContextMenuItem.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/DataGrid.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/DataGrid.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/DataGridActions/DataGridActions.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/DataGridActions/DataGridActions.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/DataGridActions/DataGridColumnsToggle.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/DataGridActions/DataGridColumnsToggle.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/DataGridBody/DataGridBody.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/DataGridBody/DataGridBody.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/DataGridBody/DataGridCell.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/DataGridBody/DataGridCell.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/DataGridBody/DataGridRow.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/DataGridBody/DataGridRow.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/DataGridHeader/DataGridHeader.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/DataGridHeader/DataGridHeader.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/DataGridHeader/DataGridHeaderCell.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/DataGridHeader/DataGridHeaderCell.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/DataGrid/datagrid.interfaces.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Checkbox/Checkbox.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Fieldset/Fieldset.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Fieldset/Fieldset.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/FileUpload/FileItem/FileItem.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/FileUpload/FileItem/FileItem.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/FileUpload/FileUpload.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/FileUpload/FileUpload.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Form.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Form.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/FormControl/FormControl.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/FormControl/FormControl.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/FormGroup/FormGroup.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/FormGroup/FormGroup.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/FormHelperText/FormHelperText.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/FormSelectorWrapper/FormSelectorWrapper.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/FormSelectorWrapper/FormSelectorWrapper.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Input/Input.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Input/Input.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Label/Label.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Label/Label.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Radio/Radio.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Radio/Radio.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Select/Option.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Select/Select.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Textarea/Textarea.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Textarea/Textarea.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Toggle/Toggle.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Wrapper/InputWrapper/InputWrapper.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Wrapper/InputWrapper/InputWrapper.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Wrapper/RadioWrapper/RadioWrapper.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Wrapper/RadioWrapper/RadioWrapper.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Wrapper/SelectWrapper/SelectWrapper.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Wrapper/SelectWrapper/SelectWrapper.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Wrapper/TextareaWrapper/TextareaWrapper.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Wrapper/TextareaWrapper/TextareaWrapper.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Wrapper/Wrapper/Wrapper.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/Wrapper/Wrapper/Wrapper.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Form/form.interfaces.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Icon/Icon.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Link/Link.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Link/Link.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/Banner/Banner.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/Banner/Banner.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/BaseModal/BaseModal.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/BaseModal/BaseModal.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/BaseModal/BaseModalActions/BaseModalActions.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/BaseModal/BaseModalContent/BaseModalContent.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/BaseModal/BaseModalContent/BaseModalContent.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/BaseModal/BaseModalContext.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/Dialog/Dialog.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/Dialog/DialogActions/DialogActions.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/Dialog/DialogTitle/DialogTitle.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/DiscardChangesModal/DiscardChangesModal.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/DiscardChangesModal/DiscardChangesModal.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/Modal/Modal.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/Modal/Modal.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/Modal/ModalActions/ModalActions.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/Modal/ModalContent/ModalContent.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/Modal/ModalHeader/ModalHeader.d.ts +0 -0
- /package/dist/cjs/{components/Notifications/SlideInModal/SlideInModal.test.d.ts → src/components/Notifications/NotificationProvider/NotificationContext.test.d.ts} +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/SlideInModal/SlideInModal.d.ts +0 -0
- /package/dist/{esm → cjs/src}/components/Notifications/SlideInModal/SlideInModal.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/Snackbar/SnackbarItem/SnackbarItem.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Pagination/Pagination.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Popover/Popover.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Popover/Popover.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/ProgressBar/ProgressBar.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Skeleton/Skeleton.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Skeleton/Skeleton.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/StatusIndicator/StatusIndicator.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/StatusIndicator/StatusIndicator.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Tabs/Tab.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Tabs/Tab.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Tabs/TabButton.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Tabs/TabButton.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Tabs/Tabs.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Tabs/Tabs.test.d.ts +0 -0
- /package/dist/cjs/{components/TextEllipsis/TextEllipsis.test.d.ts → src/components/Tag/Tag.test.d.ts} +0 -0
- /package/dist/cjs/{components → src/components}/TextEllipsis/TextEllipsis.d.ts +0 -0
- /package/dist/{esm → cjs/src}/components/TextEllipsis/TextEllipsis.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Tiles/Tile.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Tiles/Tile.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Tiles/Tiles.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Tiles/Tiles.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Tooltip/Tooltip.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Typography/Typography.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Typography/Typography.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Wizard/BaseWizardSteps/BaseWizardSteps.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Wizard/BaseWizardSteps/BaseWizardSteps.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Wizard/Wizard.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Wizard/Wizard.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Wizard/WizardActions/WizardActions.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Wizard/WizardStateProvider.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Wizard/WizardSteps/WizardSteps.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Wizard/WizardSteps/WizardSteps.test.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/Wizard/wizardStateReducer.d.ts +0 -0
- /package/dist/cjs/{components → src/components}/_BaseStyling_/BaseStyling.test.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useAnimation.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useAnimation.test.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useBodyClick.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useBodyClick.test.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useDebouncedCallback.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useDebouncedCallback.test.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useDetermineStatusIcon.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useDetermineStatusIcon.test.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useFormSelector.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useFormSelector.test.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useGetDomRoot.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/usePosition.test.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useRepeater.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useRepeater.test.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useScroll.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useScroll.test.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useSpacing.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useSpacing.test.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useUploadFile.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useUploadFile.test.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useWrapper.d.ts +0 -0
- /package/dist/cjs/{hooks → src/hooks}/useWrapper.test.d.ts +0 -0
- /package/dist/cjs/{util → src/util}/helper.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Breadcrumbs/Breadcrumbs.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Breadcrumbs/Breadcrumbs.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Button/BaseButton.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Button/BaseButton.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Button/Button.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Button/Button.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Button/IconButton.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Button/IconButton.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Button/Spinner.d.ts +0 -0
- /package/dist/esm/{components → src/components}/ContextMenu/ContextMenu.d.ts +0 -0
- /package/dist/esm/{components → src/components}/ContextMenu/ContextMenu.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/ContextMenu/ContextMenuItem.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/DataGrid.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/DataGrid.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/DataGridActions/DataGridActions.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/DataGridActions/DataGridActions.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/DataGridActions/DataGridColumnsToggle.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/DataGridActions/DataGridColumnsToggle.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/DataGridBody/DataGridBody.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/DataGridBody/DataGridBody.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/DataGridBody/DataGridCell.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/DataGridBody/DataGridCell.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/DataGridBody/DataGridRow.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/DataGridBody/DataGridRow.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/DataGridHeader/DataGridHeader.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/DataGridHeader/DataGridHeader.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/DataGridHeader/DataGridHeaderCell.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/DataGridHeader/DataGridHeaderCell.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/DataGrid/datagrid.interfaces.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Checkbox/Checkbox.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Fieldset/Fieldset.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Fieldset/Fieldset.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/FileUpload/FileItem/FileItem.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/FileUpload/FileItem/FileItem.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/FileUpload/FileUpload.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/FileUpload/FileUpload.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Form.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Form.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/FormControl/FormControl.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/FormControl/FormControl.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/FormGroup/FormGroup.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/FormGroup/FormGroup.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/FormHelperText/FormHelperText.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/FormSelectorWrapper/FormSelectorWrapper.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/FormSelectorWrapper/FormSelectorWrapper.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Input/Input.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Input/Input.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Label/Label.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Label/Label.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Radio/Radio.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Radio/Radio.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Select/Option.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Select/Select.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Textarea/Textarea.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Textarea/Textarea.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Toggle/Toggle.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Wrapper/InputWrapper/InputWrapper.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Wrapper/InputWrapper/InputWrapper.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Wrapper/RadioWrapper/RadioWrapper.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Wrapper/RadioWrapper/RadioWrapper.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Wrapper/SelectWrapper/SelectWrapper.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Wrapper/SelectWrapper/SelectWrapper.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Wrapper/TextareaWrapper/TextareaWrapper.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Wrapper/TextareaWrapper/TextareaWrapper.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Wrapper/Wrapper/Wrapper.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/Wrapper/Wrapper/Wrapper.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Form/form.interfaces.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Icon/Icon.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Link/Link.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Link/Link.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/Banner/Banner.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/Banner/Banner.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/BaseModal/BaseModal.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/BaseModal/BaseModal.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/BaseModal/BaseModalActions/BaseModalActions.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/BaseModal/BaseModalContent/BaseModalContent.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/BaseModal/BaseModalContent/BaseModalContent.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/BaseModal/BaseModalContext.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/Dialog/Dialog.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/Dialog/DialogActions/DialogActions.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/Dialog/DialogTitle/DialogTitle.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/DiscardChangesModal/DiscardChangesModal.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/DiscardChangesModal/DiscardChangesModal.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/Modal/Modal.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/Modal/Modal.test.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/Modal/ModalActions/ModalActions.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/Modal/ModalContent/ModalContent.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Notifications/Modal/ModalHeader/ModalHeader.d.ts +0 -0
- /package/dist/esm/{components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.test.d.ts → src/components/Notifications/NotificationProvider/NotificationContext.test.d.ts} +0 -0
- /package/dist/esm/{components → src/components}/Notifications/SlideInModal/SlideInModal.d.ts +0 -0
- /package/dist/esm/{components/Notifications/Snackbar/SnackbarItem/SnackbarItem.test.d.ts → src/components/Notifications/SlideInModal/SlideInModal.test.d.ts} +0 -0
- /package/dist/esm/{components → src/components}/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +0 -0
- /package/dist/esm/{components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.test.d.ts → src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.test.d.ts} +0 -0
- /package/dist/esm/{components/Pagination/Pagination.test.d.ts → src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.test.d.ts} +0 -0
- /package/dist/esm/{components/Popover/Popover.test.d.ts → src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.test.d.ts} +0 -0
- /package/dist/esm/{components/ProgressBar/ProgressBar.test.d.ts → src/components/Pagination/Pagination.test.d.ts} +0 -0
- /package/dist/esm/{components → src/components}/Popover/Popover.d.ts +0 -0
- /package/dist/esm/{components/Skeleton/Skeleton.test.d.ts → src/components/Popover/Popover.test.d.ts} +0 -0
- /package/dist/esm/{components/StatusIndicator/StatusIndicator.test.d.ts → src/components/ProgressBar/ProgressBar.test.d.ts} +0 -0
- /package/dist/esm/{components → src/components}/Skeleton/Skeleton.d.ts +0 -0
- /package/dist/esm/{components/Tabs/Tab.test.d.ts → src/components/Skeleton/Skeleton.test.d.ts} +0 -0
- /package/dist/esm/{components → src/components}/StatusIndicator/StatusIndicator.d.ts +0 -0
- /package/dist/esm/{components/Tabs/TabButton.test.d.ts → src/components/StatusIndicator/StatusIndicator.test.d.ts} +0 -0
- /package/dist/esm/{components → src/components}/Tabs/Tab.d.ts +0 -0
- /package/dist/esm/{components/Tabs/Tabs.test.d.ts → src/components/Tabs/Tab.test.d.ts} +0 -0
- /package/dist/esm/{components → src/components}/Tabs/TabButton.d.ts +0 -0
- /package/dist/esm/{components/Tiles/Tile.test.d.ts → src/components/Tabs/TabButton.test.d.ts} +0 -0
- /package/dist/esm/{components → src/components}/Tabs/Tabs.d.ts +0 -0
- /package/dist/esm/{components/Tiles/Tiles.test.d.ts → src/components/Tabs/Tabs.test.d.ts} +0 -0
- /package/dist/esm/{components/Tooltip/Tooltip.test.d.ts → src/components/Tag/Tag.test.d.ts} +0 -0
- /package/dist/esm/{components → src/components}/TextEllipsis/TextEllipsis.d.ts +0 -0
- /package/dist/esm/{components/Typography/Typography.test.d.ts → src/components/TextEllipsis/TextEllipsis.test.d.ts} +0 -0
- /package/dist/esm/{components → src/components}/Tiles/Tile.d.ts +0 -0
- /package/dist/esm/{components/Wizard/BaseWizardSteps/BaseWizardSteps.test.d.ts → src/components/Tiles/Tile.test.d.ts} +0 -0
- /package/dist/esm/{components → src/components}/Tiles/Tiles.d.ts +0 -0
- /package/dist/esm/{components/Wizard/Wizard.test.d.ts → src/components/Tiles/Tiles.test.d.ts} +0 -0
- /package/dist/esm/{components/Wizard/WizardActions/WizardActions.test.d.ts → src/components/Tooltip/Tooltip.test.d.ts} +0 -0
- /package/dist/esm/{components → src/components}/Typography/Typography.d.ts +0 -0
- /package/dist/esm/{components/Wizard/WizardSteps/WizardSteps.test.d.ts → src/components/Typography/Typography.test.d.ts} +0 -0
- /package/dist/esm/{components → src/components}/Wizard/BaseWizardSteps/BaseWizardSteps.d.ts +0 -0
- /package/dist/esm/{components/_BaseStyling_/BaseStyling.test.d.ts → src/components/Wizard/BaseWizardSteps/BaseWizardSteps.test.d.ts} +0 -0
- /package/dist/esm/{components → src/components}/Wizard/Wizard.d.ts +0 -0
- /package/dist/esm/{hooks/useAnimation.test.d.ts → src/components/Wizard/Wizard.test.d.ts} +0 -0
- /package/dist/esm/{hooks/useBodyClick.test.d.ts → src/components/Wizard/WizardActions/WizardActions.test.d.ts} +0 -0
- /package/dist/esm/{components → src/components}/Wizard/WizardStateProvider.d.ts +0 -0
- /package/dist/esm/{components → src/components}/Wizard/WizardSteps/WizardSteps.d.ts +0 -0
- /package/dist/esm/{hooks/useDebouncedCallback.test.d.ts → src/components/Wizard/WizardSteps/WizardSteps.test.d.ts} +0 -0
- /package/dist/esm/{components → src/components}/Wizard/wizardStateReducer.d.ts +0 -0
- /package/dist/esm/{hooks/useDetermineStatusIcon.test.d.ts → src/components/_BaseStyling_/BaseStyling.test.d.ts} +0 -0
- /package/dist/esm/{hooks → src/hooks}/useAnimation.d.ts +0 -0
- /package/dist/esm/{hooks/useFormSelector.test.d.ts → src/hooks/useAnimation.test.d.ts} +0 -0
- /package/dist/esm/{hooks → src/hooks}/useBodyClick.d.ts +0 -0
- /package/dist/esm/{hooks/usePosition.test.d.ts → src/hooks/useBodyClick.test.d.ts} +0 -0
- /package/dist/esm/{hooks → src/hooks}/useDebouncedCallback.d.ts +0 -0
- /package/dist/esm/{hooks/useScroll.test.d.ts → src/hooks/useDebouncedCallback.test.d.ts} +0 -0
- /package/dist/esm/{hooks → src/hooks}/useDetermineStatusIcon.d.ts +0 -0
- /package/dist/esm/{hooks/useSpacing.test.d.ts → src/hooks/useDetermineStatusIcon.test.d.ts} +0 -0
- /package/dist/esm/{hooks → src/hooks}/useFormSelector.d.ts +0 -0
- /package/dist/esm/{hooks/useUploadFile.test.d.ts → src/hooks/useFormSelector.test.d.ts} +0 -0
- /package/dist/esm/{hooks → src/hooks}/useGetDomRoot.d.ts +0 -0
- /package/dist/esm/{hooks/useWrapper.test.d.ts → src/hooks/usePosition.test.d.ts} +0 -0
- /package/dist/esm/{hooks → src/hooks}/useRepeater.d.ts +0 -0
- /package/dist/esm/{hooks → src/hooks}/useRepeater.test.d.ts +0 -0
- /package/dist/esm/{hooks → src/hooks}/useScroll.d.ts +0 -0
- /package/dist/esm/{util/helper.test.d.ts → src/hooks/useScroll.test.d.ts} +0 -0
- /package/dist/esm/{hooks → src/hooks}/useSpacing.d.ts +0 -0
- /package/dist/esm/{hooks → src/hooks}/useUploadFile.d.ts +0 -0
- /package/dist/esm/{hooks → src/hooks}/useWrapper.d.ts +0 -0
package/src/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss
CHANGED
|
@@ -15,11 +15,51 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
.actions {
|
|
18
|
-
margin: 1.
|
|
18
|
+
margin: 1.5rem 0 1rem;
|
|
19
|
+
padding: 1rem 1.5rem 0;
|
|
19
20
|
display: flex;
|
|
20
|
-
justify-content:
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
border-top: 1px solid var(--color-blue-grey100);
|
|
21
23
|
|
|
22
|
-
& > * {
|
|
24
|
+
& > * + * {
|
|
23
25
|
margin-left: 2rem;
|
|
24
26
|
}
|
|
27
|
+
|
|
28
|
+
@media screen and (max-width: 640px) {
|
|
29
|
+
display: block;
|
|
30
|
+
|
|
31
|
+
.cancel-action {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.primary-actions {
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
align-items: flex-end;
|
|
38
|
+
margin-left: 0;
|
|
39
|
+
|
|
40
|
+
> * {
|
|
41
|
+
width: 100%;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
> * + * {
|
|
45
|
+
margin-top: 0.5rem;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.primary-actions {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-grow: 1;
|
|
54
|
+
justify-content: flex-end;
|
|
55
|
+
|
|
56
|
+
button {
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media screen and (min-width: 640px) {
|
|
61
|
+
button + button {
|
|
62
|
+
margin-left: 0.5rem;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
25
65
|
}
|
|
@@ -23,13 +23,44 @@ describe("BaseModalActions", () => {
|
|
|
23
23
|
const children = "Content";
|
|
24
24
|
const classNames = ["class1", "class2"];
|
|
25
25
|
const { container } = render(
|
|
26
|
-
<BaseModalActions className={classNames.join(" ")}>
|
|
26
|
+
<BaseModalActions onClose={jest.fn()} className={classNames.join(" ")}>
|
|
27
|
+
{children}
|
|
28
|
+
</BaseModalActions>
|
|
27
29
|
);
|
|
28
30
|
|
|
29
31
|
const dialogActionsContainer = container.children[0];
|
|
30
32
|
expect(dialogActionsContainer).toHaveClass("actions", classNames[0], classNames[1]);
|
|
31
33
|
expect(dialogActionsContainer).toHaveTextContent(children);
|
|
32
34
|
});
|
|
35
|
+
|
|
36
|
+
it("Should render the default cancel action if we don't pass it", () => {
|
|
37
|
+
const { container } = render(<BaseModalActions onClose={jest.fn()} />);
|
|
38
|
+
const dialogActionsContainer = container.children[0];
|
|
39
|
+
expect(dialogActionsContainer).toHaveClass("actions");
|
|
40
|
+
expect(dialogActionsContainer).toHaveTextContent("Cancel");
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it("should render a cancel action with a custom label", () => {
|
|
44
|
+
const cancelAction = { label: "Close", disable: false };
|
|
45
|
+
const { container } = render(
|
|
46
|
+
<BaseModalActions onClose={jest.fn()} cancelAction={cancelAction} />
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
const dialogActionsContainer = container.children[0];
|
|
50
|
+
expect(dialogActionsContainer).toHaveClass("actions");
|
|
51
|
+
expect(dialogActionsContainer).toHaveTextContent(cancelAction.label);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it("Shouldn't render a label because of disabled cancel action", () => {
|
|
55
|
+
const cancelAction = { label: "Close", disable: true };
|
|
56
|
+
const { container } = render(
|
|
57
|
+
<BaseModalActions onClose={jest.fn()} cancelAction={cancelAction} />
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
const dialogActionsContainer = container.children[0];
|
|
61
|
+
expect(dialogActionsContainer).toHaveClass("actions");
|
|
62
|
+
expect(dialogActionsContainer).not.toHaveTextContent(cancelAction.label);
|
|
63
|
+
});
|
|
33
64
|
});
|
|
34
65
|
describe("ref should work", () => {
|
|
35
66
|
it("should give back the proper data prop, this also checks if the component propagates ...rest properly", () => {
|
|
@@ -46,7 +77,7 @@ describe("ref should work", () => {
|
|
|
46
77
|
}
|
|
47
78
|
}, [ref]);
|
|
48
79
|
|
|
49
|
-
return <BaseModalActions data-ref="testing" ref={ref} />;
|
|
80
|
+
return <BaseModalActions onClose={jest.fn()} data-ref="testing" ref={ref} />;
|
|
50
81
|
};
|
|
51
82
|
|
|
52
83
|
const refCheck = (ref: React.RefObject<HTMLElement>) => {
|
|
@@ -14,20 +14,51 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import React, { ForwardRefRenderFunction, ComponentPropsWithRef } from "react";
|
|
17
|
+
import React, { ForwardRefRenderFunction, ComponentPropsWithRef, useRef } from "react";
|
|
18
18
|
import classes from "./BaseModalActions.module.scss";
|
|
19
|
+
import { Button } from "../../../Button/Button";
|
|
19
20
|
|
|
20
21
|
export interface Props extends ComponentPropsWithRef<"div"> {
|
|
21
22
|
children?: React.ReactNode;
|
|
23
|
+
onClose: () => void;
|
|
24
|
+
cancelAction?: CancelAction;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface CancelAction {
|
|
28
|
+
label?: string;
|
|
29
|
+
disable?: boolean;
|
|
22
30
|
}
|
|
23
31
|
|
|
24
32
|
const BaseModalActionsComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
25
|
-
{
|
|
33
|
+
{
|
|
34
|
+
children,
|
|
35
|
+
onClose,
|
|
36
|
+
cancelAction = { label: undefined, disable: false },
|
|
37
|
+
className = "",
|
|
38
|
+
...rest
|
|
39
|
+
}: Props,
|
|
26
40
|
ref
|
|
27
41
|
) => {
|
|
42
|
+
const innerRef = (React.createRef() as React.RefObject<HTMLDivElement>) || ref;
|
|
43
|
+
const cancelButtonRef = useRef<HTMLDivElement>(null);
|
|
44
|
+
const primaryActionsRef = useRef<HTMLDivElement>(null);
|
|
45
|
+
|
|
46
|
+
const CancelButton = (
|
|
47
|
+
<Button key="cancel" variant="text" color="default" onClick={onClose}>
|
|
48
|
+
{cancelAction?.label ?? "Cancel"}
|
|
49
|
+
</Button>
|
|
50
|
+
);
|
|
51
|
+
|
|
28
52
|
return (
|
|
29
|
-
<div {...rest} ref={
|
|
30
|
-
{
|
|
53
|
+
<div {...rest} ref={innerRef} className={`${classes["actions"]} ${className}`}>
|
|
54
|
+
{!cancelAction.disable && (
|
|
55
|
+
<div className={classes["cancel-action"]} ref={cancelButtonRef}>
|
|
56
|
+
{CancelButton}
|
|
57
|
+
</div>
|
|
58
|
+
)}
|
|
59
|
+
<div ref={primaryActionsRef} className={classes["primary-actions"]}>
|
|
60
|
+
{children}
|
|
61
|
+
</div>
|
|
31
62
|
</div>
|
|
32
63
|
);
|
|
33
64
|
};
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
.header {
|
|
18
18
|
min-width: 80px;
|
|
19
|
-
padding:
|
|
20
|
-
background-color: var(--modal-header-background-color);
|
|
19
|
+
padding: 1.25rem 1.5rem 0;
|
|
21
20
|
border-top-left-radius: 8px;
|
|
22
21
|
border-top-right-radius: 8px;
|
|
23
22
|
}
|
|
@@ -25,9 +24,10 @@
|
|
|
25
24
|
.headline {
|
|
26
25
|
display: flex;
|
|
27
26
|
align-items: center;
|
|
27
|
+
justify-content: space-between;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.title {
|
|
31
31
|
flex: 1;
|
|
32
|
-
margin: 0
|
|
32
|
+
margin: 0;
|
|
33
33
|
}
|
|
@@ -34,9 +34,17 @@ const BaseModalHeaderComponent: ForwardRefRenderFunction<HTMLDivElement, Props>
|
|
|
34
34
|
return (
|
|
35
35
|
<div {...rest} ref={ref} className={classes["header"]}>
|
|
36
36
|
<div className={classes["headline"]}>
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
<div className={classes["title-wrapper"]}>
|
|
38
|
+
<Typography
|
|
39
|
+
id={id}
|
|
40
|
+
className={classes["title"]}
|
|
41
|
+
tag="h1"
|
|
42
|
+
spacing={{ marginBottom: 0 }}
|
|
43
|
+
variant="h4"
|
|
44
|
+
>
|
|
45
|
+
{title}
|
|
46
|
+
</Typography>
|
|
47
|
+
</div>
|
|
40
48
|
<IconButton onClick={onClose} className={classes["closeBtn"]} title="close modal">
|
|
41
49
|
<Icon icon={Icons.Times} />
|
|
42
50
|
</IconButton>
|
|
@@ -23,12 +23,15 @@ const initParams: Props = {
|
|
|
23
23
|
id: "modal",
|
|
24
24
|
open: true,
|
|
25
25
|
onClose: jest.fn(),
|
|
26
|
-
alignActions: "left",
|
|
27
26
|
title: "Example dialog",
|
|
28
27
|
primaryAction: {
|
|
29
28
|
label: "Save",
|
|
30
29
|
onClick: jest.fn()
|
|
31
30
|
},
|
|
31
|
+
cancelAction: {
|
|
32
|
+
label: "Cancel",
|
|
33
|
+
disable: false
|
|
34
|
+
},
|
|
32
35
|
secondaryAction: {
|
|
33
36
|
label: "Cancel",
|
|
34
37
|
onClick: jest.fn()
|
|
@@ -40,42 +43,29 @@ const getButtons = (container: HTMLElement) => getAllByRole(container, "button")
|
|
|
40
43
|
|
|
41
44
|
describe("Dialog", () => {
|
|
42
45
|
it("renders without crashing", () => {
|
|
43
|
-
const { getByText } = render(<Dialog {...initParams} />);
|
|
44
|
-
const [
|
|
46
|
+
const { getByText, debug } = render(<Dialog {...initParams} />);
|
|
47
|
+
const [_cancelButton, secondaryButton, primaryButton] = getButtons(document.body);
|
|
45
48
|
|
|
46
49
|
expect(getByText(initParams.title)).toBeDefined();
|
|
47
50
|
expect(getByText(initParams.children as string)).toBeDefined();
|
|
48
51
|
const actionsDiv = primaryButton.closest("div");
|
|
49
|
-
expect(actionsDiv).toHaveClass("left");
|
|
50
|
-
expect(actionsDiv?.children[0]).toEqual(primaryButton);
|
|
51
|
-
expect(actionsDiv?.children[1]).toEqual(secondaryButton);
|
|
52
|
-
expect(primaryButton).toHaveClass("fill");
|
|
53
|
-
expect(secondaryButton).toHaveClass("text");
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it("renders action aligned to right", () => {
|
|
57
|
-
render(<Dialog {...initParams} alignActions="right" />);
|
|
58
|
-
const [secondaryButton, primaryButton] = getButtons(document.body);
|
|
59
|
-
|
|
60
|
-
const actionsDiv = primaryButton.closest("div");
|
|
61
|
-
expect(actionsDiv).not.toHaveClass("left");
|
|
62
|
-
expect(actionsDiv?.children[0]).toEqual(secondaryButton);
|
|
63
52
|
expect(actionsDiv?.children[1]).toEqual(primaryButton);
|
|
53
|
+
expect(actionsDiv?.children[0]).toEqual(secondaryButton);
|
|
64
54
|
expect(primaryButton).toHaveClass("fill");
|
|
65
|
-
expect(secondaryButton).toHaveClass("
|
|
55
|
+
expect(secondaryButton).toHaveClass("outline");
|
|
66
56
|
});
|
|
67
57
|
|
|
68
58
|
it("renders only one button", () => {
|
|
69
59
|
render(<Dialog {...initParams} secondaryAction={undefined} />);
|
|
70
60
|
const buttons = getButtons(document.body);
|
|
71
61
|
|
|
72
|
-
expect(buttons).toHaveLength(
|
|
73
|
-
expect(buttons[
|
|
62
|
+
expect(buttons).toHaveLength(2);
|
|
63
|
+
expect(buttons[1]).toHaveClass("fill");
|
|
74
64
|
});
|
|
75
65
|
|
|
76
66
|
it("should handle clicking on buttons and ENTER press", async () => {
|
|
77
67
|
render(<Dialog {...initParams} />);
|
|
78
|
-
const [
|
|
68
|
+
const [_cancelButton, secondaryButton, primaryButton] = getButtons(document.body);
|
|
79
69
|
expect(initParams.primaryAction.onClick).toHaveBeenCalledTimes(0);
|
|
80
70
|
expect(initParams.secondaryAction?.onClick).toHaveBeenCalledTimes(0);
|
|
81
71
|
expect(initParams.onClose).toHaveBeenCalledTimes(0);
|
|
@@ -110,7 +100,6 @@ describe("ref should work", () => {
|
|
|
110
100
|
<Dialog
|
|
111
101
|
children="test"
|
|
112
102
|
open={false}
|
|
113
|
-
alignActions={"left"}
|
|
114
103
|
onClose={jest.fn()}
|
|
115
104
|
primaryAction={{ label: "test", onClick: jest.fn() }}
|
|
116
105
|
title="test"
|
|
@@ -23,18 +23,21 @@ import { DialogTitle } from "./DialogTitle/DialogTitle";
|
|
|
23
23
|
import { Button, Props as ButtonProps } from "../../Button/Button";
|
|
24
24
|
import { labelId, descriptionId } from "../BaseModal/BaseModalContext";
|
|
25
25
|
import { generateID } from "../../../util/helper";
|
|
26
|
+
import { CancelAction } from "../BaseModal/BaseModalActions/BaseModalActions";
|
|
26
27
|
|
|
27
28
|
export interface Props extends ComponentPropsWithRef<"div"> {
|
|
28
29
|
id?: string;
|
|
29
30
|
open: boolean;
|
|
30
31
|
children: React.ReactNode;
|
|
31
|
-
alignActions: "left" | "right";
|
|
32
32
|
onClose: () => void;
|
|
33
33
|
title: string;
|
|
34
34
|
primaryAction: Action;
|
|
35
35
|
secondaryAction?: Action;
|
|
36
|
+
cancelAction?: CancelAction;
|
|
36
37
|
zIndex?: number;
|
|
37
38
|
disableEscapeKeyDown?: boolean;
|
|
39
|
+
titleIcon?: React.ReactNode;
|
|
40
|
+
caption?: string;
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
export interface Action extends Omit<ButtonProps, "variant" | "ref"> {
|
|
@@ -47,13 +50,15 @@ const DialogComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
|
47
50
|
id,
|
|
48
51
|
open,
|
|
49
52
|
children,
|
|
50
|
-
alignActions,
|
|
51
53
|
onClose,
|
|
52
54
|
title,
|
|
53
55
|
primaryAction,
|
|
54
56
|
secondaryAction,
|
|
57
|
+
cancelAction,
|
|
55
58
|
zIndex,
|
|
56
59
|
disableEscapeKeyDown = true,
|
|
60
|
+
titleIcon,
|
|
61
|
+
caption,
|
|
57
62
|
...rest
|
|
58
63
|
}: Props,
|
|
59
64
|
ref
|
|
@@ -65,12 +70,13 @@ const DialogComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
|
65
70
|
{primaryLabel}
|
|
66
71
|
</Button>
|
|
67
72
|
);
|
|
68
|
-
|
|
73
|
+
|
|
74
|
+
const SecondaryButton =
|
|
69
75
|
secondaryAction &&
|
|
70
76
|
(function () {
|
|
71
77
|
const { label: secondaryLabel, ...restOfSecondaryAction } = secondaryAction;
|
|
72
78
|
return (
|
|
73
|
-
<Button key="tertiary" variant="
|
|
79
|
+
<Button key="tertiary" variant="outline" {...restOfSecondaryAction}>
|
|
74
80
|
{secondaryLabel}
|
|
75
81
|
</Button>
|
|
76
82
|
);
|
|
@@ -96,7 +102,7 @@ const DialogComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
|
96
102
|
zIndex={zIndex}
|
|
97
103
|
disableEscapeKeyDown={disableEscapeKeyDown}
|
|
98
104
|
>
|
|
99
|
-
<DialogTitle id={labelId(dialogId)} title={title} />
|
|
105
|
+
<DialogTitle titleIcon={titleIcon} caption={caption} id={labelId(dialogId)} title={title} />
|
|
100
106
|
<BaseModalContent
|
|
101
107
|
id={descriptionId(dialogId)}
|
|
102
108
|
className={classes["content"]}
|
|
@@ -104,10 +110,8 @@ const DialogComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
|
104
110
|
>
|
|
105
111
|
{children}
|
|
106
112
|
</BaseModalContent>
|
|
107
|
-
<DialogActions
|
|
108
|
-
{
|
|
109
|
-
? [PrimaryButton, TertiaryButton]
|
|
110
|
-
: [TertiaryButton, PrimaryButton]}
|
|
113
|
+
<DialogActions onClose={onClose} cancelAction={cancelAction}>
|
|
114
|
+
{[SecondaryButton, PrimaryButton]}
|
|
111
115
|
</DialogActions>
|
|
112
116
|
<input
|
|
113
117
|
autoFocus
|
|
@@ -20,7 +20,8 @@ import { render } from "@testing-library/react";
|
|
|
20
20
|
|
|
21
21
|
const initParams: Props = {
|
|
22
22
|
align: "right",
|
|
23
|
-
children: "Content"
|
|
23
|
+
children: "Content",
|
|
24
|
+
onClose: jest.fn()
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
describe("DialogActions", () => {
|
|
@@ -31,13 +32,6 @@ describe("DialogActions", () => {
|
|
|
31
32
|
expect(dialogActionsContainer).toHaveClass("actions");
|
|
32
33
|
expect(dialogActionsContainer).toHaveTextContent(initParams.children as string);
|
|
33
34
|
});
|
|
34
|
-
|
|
35
|
-
it("should align items to left", () => {
|
|
36
|
-
const { container } = render(<DialogActions {...initParams} align="left" />);
|
|
37
|
-
|
|
38
|
-
const dialogActionsContainer = container.children[0];
|
|
39
|
-
expect(dialogActionsContainer).toHaveClass("actions", "left");
|
|
40
|
-
});
|
|
41
35
|
});
|
|
42
36
|
|
|
43
37
|
describe("ref should work", () => {
|
|
@@ -17,23 +17,26 @@
|
|
|
17
17
|
import React, { ForwardRefRenderFunction, ComponentPropsWithRef } from "react";
|
|
18
18
|
import {
|
|
19
19
|
BaseModalActions,
|
|
20
|
-
Props as BaseModalActionsProps
|
|
20
|
+
Props as BaseModalActionsProps,
|
|
21
|
+
CancelAction
|
|
21
22
|
} from "../../BaseModal/BaseModalActions/BaseModalActions";
|
|
22
23
|
import classes from "./DialogActions.module.scss";
|
|
23
24
|
|
|
24
25
|
export interface Props extends ComponentPropsWithRef<any>, BaseModalActionsProps {
|
|
25
|
-
|
|
26
|
+
cancelAction?: CancelAction;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
const DialogActionsComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
29
|
-
{ children,
|
|
30
|
+
{ children, cancelAction, onClose, ...rest }: Props,
|
|
30
31
|
ref
|
|
31
32
|
) => {
|
|
32
33
|
return (
|
|
33
34
|
<BaseModalActions
|
|
34
35
|
{...rest}
|
|
36
|
+
cancelAction={{ label: cancelAction?.label, disable: cancelAction?.disable }}
|
|
37
|
+
onClose={onClose}
|
|
35
38
|
ref={ref}
|
|
36
|
-
className={
|
|
39
|
+
className={classes["actions"]}
|
|
37
40
|
>
|
|
38
41
|
{children}
|
|
39
42
|
</BaseModalActions>
|
|
@@ -15,9 +15,20 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
.header {
|
|
18
|
-
margin: 1.5rem
|
|
18
|
+
margin: 1rem 1.5rem;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: flex-start;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
.title {
|
|
22
24
|
margin: 0;
|
|
25
|
+
line-height: 1;
|
|
26
|
+
|
|
27
|
+
&-icon > [data-icon] {
|
|
28
|
+
font-size: 1.25rem;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.caption {
|
|
33
|
+
color: var(--color-blue-grey500);
|
|
23
34
|
}
|
|
@@ -31,6 +31,33 @@ describe("DialogTitle", () => {
|
|
|
31
31
|
expect(dialogTitleContainer).toHaveClass("header");
|
|
32
32
|
expect(getByText(container, initParams.title));
|
|
33
33
|
});
|
|
34
|
+
|
|
35
|
+
it("should render a title icon", () => {
|
|
36
|
+
const { container } = render(<DialogTitle {...initParams} titleIcon={true} />);
|
|
37
|
+
|
|
38
|
+
const dialogTitleContainer = container.children[0];
|
|
39
|
+
expect(dialogTitleContainer).toHaveClass("header");
|
|
40
|
+
expect(getByText(container, initParams.title));
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it("should render a custom title icon", () => {
|
|
44
|
+
const { container } = render(
|
|
45
|
+
<DialogTitle {...initParams} titleIcon={<div>Custom Icon</div>} />
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
const dialogTitleContainer = container.children[0];
|
|
49
|
+
expect(dialogTitleContainer).toHaveClass("header");
|
|
50
|
+
expect(getByText(container, initParams.title));
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("should render a caption", () => {
|
|
54
|
+
const { container } = render(<DialogTitle {...initParams} caption="Example caption" />);
|
|
55
|
+
|
|
56
|
+
const dialogTitleContainer = container.children[0];
|
|
57
|
+
expect(dialogTitleContainer).toHaveClass("header");
|
|
58
|
+
expect(getByText(container, initParams.title));
|
|
59
|
+
expect(getByText(container, "Example caption"));
|
|
60
|
+
});
|
|
34
61
|
});
|
|
35
62
|
|
|
36
63
|
describe("ref should work", () => {
|
|
@@ -17,21 +17,42 @@
|
|
|
17
17
|
import React, { ForwardRefRenderFunction, ComponentPropsWithRef } from "react";
|
|
18
18
|
import { Typography } from "../../../Typography/Typography";
|
|
19
19
|
import classes from "./DialogTitle.module.scss";
|
|
20
|
+
import { Icon, Icons } from "../../../Icon/Icon";
|
|
20
21
|
|
|
21
22
|
export interface Props extends ComponentPropsWithRef<"div"> {
|
|
22
23
|
id: string;
|
|
23
24
|
title: string;
|
|
25
|
+
titleIcon?: React.ReactNode;
|
|
26
|
+
caption?: string;
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
const DialogTitleComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
27
|
-
{ id, title, ...rest }: Props,
|
|
30
|
+
{ id, title, titleIcon, caption, ...rest }: Props,
|
|
28
31
|
ref
|
|
29
32
|
) => {
|
|
30
33
|
return (
|
|
31
34
|
<div {...rest} ref={ref} className={classes["header"]}>
|
|
32
|
-
|
|
33
|
-
{title}
|
|
34
|
-
|
|
35
|
+
{titleIcon && (
|
|
36
|
+
<div className={classes["title-icon"]}>
|
|
37
|
+
{typeof titleIcon === "boolean" ? <Icon icon={Icons.InfoCircle} /> : titleIcon}
|
|
38
|
+
</div>
|
|
39
|
+
)}
|
|
40
|
+
<div className={classes["title-wrapper"]}>
|
|
41
|
+
<Typography
|
|
42
|
+
id={id}
|
|
43
|
+
className={classes["title"]}
|
|
44
|
+
spacing={titleIcon && { marginLeft: 2 }}
|
|
45
|
+
tag="h1"
|
|
46
|
+
variant="h4"
|
|
47
|
+
>
|
|
48
|
+
{title}
|
|
49
|
+
</Typography>
|
|
50
|
+
{caption && (
|
|
51
|
+
<Typography className={classes["caption"]} spacing={{ marginLeft: 2 }} variant="sub-text">
|
|
52
|
+
{caption}
|
|
53
|
+
</Typography>
|
|
54
|
+
)}
|
|
55
|
+
</div>
|
|
35
56
|
</div>
|
|
36
57
|
);
|
|
37
58
|
};
|
|
@@ -18,11 +18,13 @@ import React, { ForwardRefRenderFunction, ComponentPropsWithRef } from "react";
|
|
|
18
18
|
import { Dialog } from "../../Dialog/Dialog";
|
|
19
19
|
import { Typography } from "../../../Typography/Typography";
|
|
20
20
|
import { DataAttributeKey } from "../../../../interfaces";
|
|
21
|
+
import { CancelAction } from "../../BaseModal/BaseModalActions/BaseModalActions";
|
|
21
22
|
|
|
22
23
|
export interface Props extends ComponentPropsWithRef<"div"> {
|
|
23
24
|
open: boolean;
|
|
24
25
|
discardChangesButtonLabel: string;
|
|
25
26
|
keepEditingButtonLabel: string;
|
|
27
|
+
cancelAction?: CancelAction;
|
|
26
28
|
contentLabel: string;
|
|
27
29
|
titleLabel: string;
|
|
28
30
|
[dataAttribute: DataAttributeKey]: any;
|
|
@@ -39,6 +41,7 @@ const DiscardChangesDialogComponent: ForwardRefRenderFunction<HTMLDivElement, Pr
|
|
|
39
41
|
keepEditingButtonLabel,
|
|
40
42
|
contentLabel,
|
|
41
43
|
titleLabel,
|
|
44
|
+
cancelAction,
|
|
42
45
|
...rest
|
|
43
46
|
}: Props,
|
|
44
47
|
ref
|
|
@@ -48,9 +51,9 @@ const DiscardChangesDialogComponent: ForwardRefRenderFunction<HTMLDivElement, Pr
|
|
|
48
51
|
{...rest}
|
|
49
52
|
ref={ref}
|
|
50
53
|
open={open}
|
|
51
|
-
alignActions="left"
|
|
52
54
|
title={titleLabel}
|
|
53
55
|
onClose={onKeepEditing}
|
|
56
|
+
cancelAction={cancelAction}
|
|
54
57
|
primaryAction={{
|
|
55
58
|
label: discardChangesButtonLabel,
|
|
56
59
|
onClick: onDiscardChanges
|
|
@@ -97,15 +97,12 @@ describe("DiscardChangesModal should show DiscardChangesDialog", () => {
|
|
|
97
97
|
|
|
98
98
|
expect(defaultParams.onClose).not.toBeCalled();
|
|
99
99
|
await findDiscardChangesDialog(container);
|
|
100
|
-
const [
|
|
100
|
+
const [_cancelButton, _discardButton, keepEditingBtn] = getDiscardChangesButtons(container);
|
|
101
101
|
expect(container).toHaveTextContent(defaultParams.discardChangedDialogProps.titleLabel);
|
|
102
102
|
expect(container).toHaveTextContent(defaultParams.discardChangedDialogProps.contentLabel);
|
|
103
103
|
|
|
104
104
|
await userEvent.click(keepEditingBtn);
|
|
105
105
|
expect(defaultParams.onClose).not.toBeCalled();
|
|
106
|
-
await waitFor(() =>
|
|
107
|
-
expect(container).not.toHaveTextContent(defaultParams.discardChangedDialogProps.titleLabel)
|
|
108
|
-
);
|
|
109
106
|
});
|
|
110
107
|
|
|
111
108
|
it("showing DiscardChangesDialog and clicking on `discard` button", async () => {
|
|
@@ -118,7 +115,7 @@ describe("DiscardChangesModal should show DiscardChangesDialog", () => {
|
|
|
118
115
|
await userEvent.click(closeBtn);
|
|
119
116
|
|
|
120
117
|
await findDiscardChangesDialog(container);
|
|
121
|
-
const [discardBtn] = getDiscardChangesButtons(container);
|
|
118
|
+
const [_cancelButton, discardBtn] = getDiscardChangesButtons(container);
|
|
122
119
|
expect(container).toHaveTextContent(defaultParams.discardChangedDialogProps.titleLabel);
|
|
123
120
|
|
|
124
121
|
await userEvent.click(discardBtn);
|