@onewelcome/react-lib-components 6.5.0 → 6.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DataGrid/DataGrid.module.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell.cjs.js.map +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell.module.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridRow.module.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.cjs.js.map +1 -1
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.module.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeaderCell.module.cjs.js +1 -1
- package/dist/cjs/Form/FileUpload/FileItem/FileItem.cjs.js +1 -1
- package/dist/cjs/Form/FileUpload/FileItem/FileItem.cjs.js.map +1 -1
- package/dist/cjs/Form/FileUpload/FileItem/FileItem.module.cjs.js +1 -1
- package/dist/cjs/Form/FileUpload/FileUpload.cjs.js +1 -1
- package/dist/cjs/Form/FileUpload/FileUpload.cjs.js.map +1 -1
- package/dist/cjs/Form/FileUpload/FileUpload.module.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/MultiOption.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/MultiOption.cjs.js.map +1 -1
- package/dist/cjs/Form/Select/MultiSelect/MultiSelect.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/MultiSelect.cjs.js.map +1 -1
- package/dist/cjs/Form/Select/MultiSelect/MultiSelect.module.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/SelectButton.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/SelectButton.cjs.js.map +1 -1
- package/dist/cjs/Form/Select/MultiSelect/SelectButton.module.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/SelectedOptions.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/SelectedOptions.cjs.js.map +1 -1
- package/dist/cjs/Form/Select/MultiSelect/useArrowNavigation.cjs.js +2 -0
- package/dist/cjs/Form/Select/MultiSelect/useArrowNavigation.cjs.js.map +1 -0
- package/dist/cjs/Form/Select/MultiSelect/useSearch.cjs.js +2 -0
- package/dist/cjs/Form/Select/MultiSelect/useSearch.cjs.js.map +1 -0
- package/dist/cjs/Form/Select/SingleSelect/Option.cjs.js +1 -1
- package/dist/cjs/Form/Select/SingleSelect/Option.cjs.js.map +1 -1
- package/dist/cjs/Form/Select/SingleSelect/Select.cjs.js +1 -1
- package/dist/cjs/Form/Select/SingleSelect/Select.cjs.js.map +1 -1
- package/dist/cjs/Form/Select/SingleSelect/Select.module.cjs.js +1 -1
- package/dist/cjs/Form/Select/SingleSelect/useArrowNavigation.cjs.js +2 -0
- package/dist/cjs/Form/Select/SingleSelect/useArrowNavigation.cjs.js.map +1 -0
- package/dist/cjs/Form/Select/SingleSelect/useSearch.cjs.js +2 -0
- package/dist/cjs/Form/Select/SingleSelect/useSearch.cjs.js.map +1 -0
- package/dist/cjs/Form/Select/useAddNewBtn.cjs.js +1 -1
- package/dist/cjs/Form/Select/useAddNewBtn.cjs.js.map +1 -1
- package/dist/cjs/Form/Select/useAddNewBtn.module.cjs.js +1 -1
- package/dist/cjs/Form/Select/useSelectPositionList.cjs.js +2 -0
- package/dist/cjs/Form/Select/useSelectPositionList.cjs.js.map +1 -0
- package/dist/cjs/Icon/Icon.cjs.js +1 -1
- package/dist/cjs/Icon/Icon.cjs.js.map +1 -1
- package/dist/cjs/Icon/Icon.module.cjs.js +1 -1
- package/dist/cjs/Layout/ContentHeader/ContentHeader.cjs.js +2 -0
- package/dist/cjs/Layout/ContentHeader/ContentHeader.cjs.js.map +1 -0
- package/dist/cjs/Layout/ContentHeader/ContentHeader.module.cjs.js +2 -0
- package/dist/cjs/Layout/ContentHeader/ContentHeader.module.cjs.js.map +1 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.cjs.js +2 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.cjs.js.map +1 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.cjs.js +2 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.cjs.js.map +1 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.cjs.js +2 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.cjs.js.map +1 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.cjs.js +2 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.cjs.js.map +1 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.cjs.js +2 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.cjs.js.map +1 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.module.cjs.js +2 -0
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.module.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.cjs.js +2 -0
- package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.module.cjs.js +2 -0
- package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.module.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js +2 -0
- package/dist/cjs/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.cjs.js +2 -0
- package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.module.cjs.js +2 -0
- package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.module.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Alert/AlertProvider/AlertContext.cjs.js +2 -0
- package/dist/cjs/Notifications/Alert/AlertProvider/AlertContext.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Alert/AlertProvider/AlertProvider.cjs.js +2 -0
- package/dist/cjs/Notifications/Alert/AlertProvider/AlertProvider.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Alert/useAlert.cjs.js +2 -0
- package/dist/cjs/Notifications/Alert/useAlert.cjs.js.map +1 -0
- package/dist/cjs/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.cjs.js.map +1 -1
- package/dist/cjs/Notifications/Snackbar/SnackbarItem/SnackbarItem.cjs.js.map +1 -1
- package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.cjs.js.map +1 -1
- package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.cjs.js.map +1 -1
- package/dist/cjs/Notifications/Snackbar/interfaces.cjs.js.map +1 -1
- package/dist/cjs/Notifications/Snackbar/useSnackbar.cjs.js.map +1 -1
- package/dist/cjs/Pagination/Pagination.cjs.js +1 -1
- package/dist/cjs/Pagination/Pagination.cjs.js.map +1 -1
- package/dist/cjs/Pagination/Pagination.module.cjs.js +1 -1
- package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js +1 -1
- package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
- package/dist/cjs/src/components/Form/FileUpload/FileItem/FileItem.d.ts +10 -0
- package/dist/cjs/src/components/Form/FileUpload/FileUpload.d.ts +3 -0
- package/dist/cjs/src/components/Form/Select/MultiSelect/MultiSelect.test.d.ts +63 -1
- package/dist/cjs/src/components/Form/Select/MultiSelect/MultiSelectKeyboardNavigation.test.d.ts +1 -0
- package/dist/cjs/src/components/Form/Select/MultiSelect/SelectedOptions.d.ts +2 -1
- package/dist/cjs/src/components/Form/Select/MultiSelect/useArrowNavigation.d.ts +16 -0
- package/dist/cjs/src/components/Form/Select/MultiSelect/useSearch.d.ts +34 -0
- package/dist/cjs/src/components/Form/Select/Select.interfaces.d.ts +1 -0
- package/dist/cjs/src/components/Form/Select/SingleSelect/Option.d.ts +1 -0
- package/dist/cjs/src/components/Form/Select/SingleSelect/useArrowNavigation.d.ts +5 -0
- package/dist/cjs/src/components/Form/Select/{useSearch.d.ts → SingleSelect/useSearch.d.ts} +2 -1
- package/dist/cjs/src/components/Form/Select/useAddNewBtn.d.ts +10 -3
- package/dist/cjs/src/components/Form/Select/useSelectPositionList.d.ts +12 -0
- package/dist/cjs/src/components/Icon/Icon.d.ts +5 -1
- package/dist/cjs/src/components/Layout/ContentHeader/ContentHeader.d.ts +10 -0
- package/dist/cjs/src/components/Layout/ContentHeader/ContentHeader.test.d.ts +1 -0
- package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.d.ts +7 -0
- package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.test.d.ts +1 -0
- package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.d.ts +10 -0
- package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.test.d.ts +1 -0
- package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.d.ts +6 -0
- package/dist/cjs/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.test.d.ts +1 -0
- package/dist/cjs/src/components/Notifications/Alert/AlertContainer/AlertContainer.d.ts +12 -0
- package/dist/cjs/src/components/Notifications/Alert/AlertContainer/AlertContainer.test.d.ts +1 -0
- package/dist/cjs/src/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.d.ts +4 -0
- package/dist/cjs/src/components/Notifications/Alert/AlertItem/AlertItem.d.ts +22 -0
- package/dist/cjs/src/components/Notifications/Alert/AlertItem/AlertItem.test.d.ts +1 -0
- package/dist/cjs/src/components/Notifications/Alert/AlertProvider/AlertContext.d.ts +13 -0
- package/dist/cjs/src/components/Notifications/Alert/AlertProvider/AlertProvider.d.ts +22 -0
- package/dist/cjs/src/components/Notifications/Alert/AlertProvider/AlertProvider.test.d.ts +1 -0
- package/dist/cjs/src/components/Notifications/Alert/useAlert.d.ts +7 -0
- package/dist/cjs/src/components/Notifications/Alert/useAlert.test.d.ts +1 -0
- package/dist/cjs/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +9 -0
- package/dist/cjs/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +6 -0
- package/dist/cjs/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +9 -0
- package/dist/cjs/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +9 -0
- package/dist/cjs/src/components/Notifications/Snackbar/interfaces.d.ts +18 -0
- package/dist/cjs/src/components/Notifications/Snackbar/useSnackbar.d.ts +3 -0
- package/dist/cjs/src/components/_BaseStyling_/BaseStyling.d.ts +40 -0
- package/dist/cjs/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.d.ts +8 -0
- package/dist/cjs/src/index.cjs.js +1 -1
- package/dist/cjs/src/index.d.ts +15 -0
- package/dist/cjs/src/util/helper.cjs.js +1 -1
- package/dist/cjs/src/util/helper.cjs.js.map +1 -1
- package/dist/cjs/src/util/helper.d.ts +1 -0
- package/dist/esm/DataGrid/DataGrid.module.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridCell.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridCell.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridCell.module.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridRow.module.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.module.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeaderCell.module.esm.js +1 -1
- package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js +1 -1
- package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js.map +1 -1
- package/dist/esm/Form/FileUpload/FileItem/FileItem.module.esm.js +1 -1
- package/dist/esm/Form/FileUpload/FileUpload.esm.js +1 -1
- package/dist/esm/Form/FileUpload/FileUpload.esm.js.map +1 -1
- package/dist/esm/Form/FileUpload/FileUpload.module.esm.js +1 -1
- package/dist/esm/Form/Select/MultiSelect/MultiOption.esm.js +1 -1
- package/dist/esm/Form/Select/MultiSelect/MultiOption.esm.js.map +1 -1
- package/dist/esm/Form/Select/MultiSelect/MultiSelect.esm.js +1 -1
- package/dist/esm/Form/Select/MultiSelect/MultiSelect.esm.js.map +1 -1
- package/dist/esm/Form/Select/MultiSelect/MultiSelect.module.esm.js +1 -1
- package/dist/esm/Form/Select/MultiSelect/SelectButton.esm.js +1 -1
- package/dist/esm/Form/Select/MultiSelect/SelectButton.esm.js.map +1 -1
- package/dist/esm/Form/Select/MultiSelect/SelectButton.module.esm.js +1 -1
- package/dist/esm/Form/Select/MultiSelect/SelectedOptions.esm.js +1 -1
- package/dist/esm/Form/Select/MultiSelect/SelectedOptions.esm.js.map +1 -1
- package/dist/esm/Form/Select/MultiSelect/useArrowNavigation.esm.js +2 -0
- package/dist/esm/Form/Select/MultiSelect/useArrowNavigation.esm.js.map +1 -0
- package/dist/esm/Form/Select/MultiSelect/useSearch.esm.js +2 -0
- package/dist/esm/Form/Select/MultiSelect/useSearch.esm.js.map +1 -0
- package/dist/esm/Form/Select/SingleSelect/Option.esm.js +1 -1
- package/dist/esm/Form/Select/SingleSelect/Option.esm.js.map +1 -1
- package/dist/esm/Form/Select/SingleSelect/Select.esm.js +1 -1
- package/dist/esm/Form/Select/SingleSelect/Select.esm.js.map +1 -1
- package/dist/esm/Form/Select/SingleSelect/Select.module.esm.js +1 -1
- package/dist/esm/Form/Select/SingleSelect/useArrowNavigation.esm.js +2 -0
- package/dist/esm/Form/Select/SingleSelect/useArrowNavigation.esm.js.map +1 -0
- package/dist/esm/Form/Select/SingleSelect/useSearch.esm.js +2 -0
- package/dist/esm/Form/Select/SingleSelect/useSearch.esm.js.map +1 -0
- package/dist/esm/Form/Select/useAddNewBtn.esm.js +1 -1
- package/dist/esm/Form/Select/useAddNewBtn.esm.js.map +1 -1
- package/dist/esm/Form/Select/useAddNewBtn.module.esm.js +1 -1
- package/dist/esm/Form/Select/useSelectPositionList.esm.js +2 -0
- package/dist/esm/Form/Select/useSelectPositionList.esm.js.map +1 -0
- package/dist/esm/Icon/Icon.esm.js +1 -1
- package/dist/esm/Icon/Icon.esm.js.map +1 -1
- package/dist/esm/Icon/Icon.module.esm.js +1 -1
- package/dist/esm/Layout/ContentHeader/ContentHeader.esm.js +2 -0
- package/dist/esm/Layout/ContentHeader/ContentHeader.esm.js.map +1 -0
- package/dist/esm/Layout/ContentHeader/ContentHeader.module.esm.js +2 -0
- package/dist/esm/Layout/ContentHeader/ContentHeader.module.esm.js.map +1 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.esm.js +2 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.esm.js.map +1 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.esm.js +2 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.esm.js.map +1 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.esm.js +2 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.esm.js.map +1 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.esm.js +2 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.esm.js.map +1 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.esm.js +2 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.esm.js.map +1 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.module.esm.js +2 -0
- package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.module.esm.js.map +1 -0
- package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.esm.js +2 -0
- package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.esm.js.map +1 -0
- package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.module.esm.js +2 -0
- package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.module.esm.js.map +1 -0
- package/dist/esm/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.esm.js +2 -0
- package/dist/esm/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.esm.js.map +1 -0
- package/dist/esm/Notifications/Alert/AlertItem/AlertItem.esm.js +2 -0
- package/dist/esm/Notifications/Alert/AlertItem/AlertItem.esm.js.map +1 -0
- package/dist/esm/Notifications/Alert/AlertItem/AlertItem.module.esm.js +2 -0
- package/dist/esm/Notifications/Alert/AlertItem/AlertItem.module.esm.js.map +1 -0
- package/dist/esm/Notifications/Alert/AlertProvider/AlertContext.esm.js +2 -0
- package/dist/esm/Notifications/Alert/AlertProvider/AlertContext.esm.js.map +1 -0
- package/dist/esm/Notifications/Alert/AlertProvider/AlertProvider.esm.js +2 -0
- package/dist/esm/Notifications/Alert/AlertProvider/AlertProvider.esm.js.map +1 -0
- package/dist/esm/Notifications/Alert/useAlert.esm.js +2 -0
- package/dist/esm/Notifications/Alert/useAlert.esm.js.map +1 -0
- package/dist/esm/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.esm.js.map +1 -1
- package/dist/esm/Notifications/Snackbar/SnackbarItem/SnackbarItem.esm.js.map +1 -1
- package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.esm.js.map +1 -1
- package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.esm.js.map +1 -1
- package/dist/esm/Notifications/Snackbar/interfaces.esm.js.map +1 -1
- package/dist/esm/Notifications/Snackbar/useSnackbar.esm.js.map +1 -1
- package/dist/esm/Pagination/Pagination.esm.js +1 -1
- package/dist/esm/Pagination/Pagination.esm.js.map +1 -1
- package/dist/esm/Pagination/Pagination.module.esm.js +1 -1
- package/dist/esm/_BaseStyling_/BaseStyling.esm.js +1 -1
- package/dist/esm/_BaseStyling_/BaseStyling.esm.js.map +1 -1
- package/dist/esm/src/components/Form/FileUpload/FileItem/FileItem.d.ts +10 -0
- package/dist/esm/src/components/Form/FileUpload/FileUpload.d.ts +3 -0
- package/dist/esm/src/components/Form/Select/MultiSelect/MultiSelect.test.d.ts +63 -1
- package/dist/esm/src/components/Form/Select/MultiSelect/MultiSelectKeyboardNavigation.test.d.ts +1 -0
- package/dist/esm/src/components/Form/Select/MultiSelect/SelectedOptions.d.ts +2 -1
- package/dist/esm/src/components/Form/Select/MultiSelect/useArrowNavigation.d.ts +16 -0
- package/dist/esm/src/components/Form/Select/MultiSelect/useSearch.d.ts +34 -0
- package/dist/esm/src/components/Form/Select/Select.interfaces.d.ts +1 -0
- package/dist/esm/src/components/Form/Select/SingleSelect/Option.d.ts +1 -0
- package/dist/esm/src/components/Form/Select/SingleSelect/useArrowNavigation.d.ts +5 -0
- package/dist/esm/src/components/Form/Select/{useSearch.d.ts → SingleSelect/useSearch.d.ts} +2 -1
- package/dist/esm/src/components/Form/Select/useAddNewBtn.d.ts +10 -3
- package/dist/esm/src/components/Form/Select/useSelectPositionList.d.ts +12 -0
- package/dist/esm/src/components/Icon/Icon.d.ts +5 -1
- package/dist/esm/src/components/Layout/ContentHeader/ContentHeader.d.ts +10 -0
- package/dist/esm/src/components/Layout/ContentHeader/ContentHeader.test.d.ts +1 -0
- package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.d.ts +7 -0
- package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.test.d.ts +1 -0
- package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.d.ts +10 -0
- package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.test.d.ts +1 -0
- package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.d.ts +6 -0
- package/dist/esm/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.test.d.ts +1 -0
- package/dist/esm/src/components/Notifications/Alert/AlertContainer/AlertContainer.d.ts +12 -0
- package/dist/esm/src/components/Notifications/Alert/AlertContainer/AlertContainer.test.d.ts +1 -0
- package/dist/esm/src/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.d.ts +4 -0
- package/dist/esm/src/components/Notifications/Alert/AlertItem/AlertItem.d.ts +22 -0
- package/dist/esm/src/components/Notifications/Alert/AlertItem/AlertItem.test.d.ts +1 -0
- package/dist/esm/src/components/Notifications/Alert/AlertProvider/AlertContext.d.ts +13 -0
- package/dist/esm/src/components/Notifications/Alert/AlertProvider/AlertProvider.d.ts +22 -0
- package/dist/esm/src/components/Notifications/Alert/AlertProvider/AlertProvider.test.d.ts +1 -0
- package/dist/esm/src/components/Notifications/Alert/useAlert.d.ts +7 -0
- package/dist/esm/src/components/Notifications/Alert/useAlert.test.d.ts +1 -0
- package/dist/esm/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +9 -0
- package/dist/esm/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +6 -0
- package/dist/esm/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +9 -0
- package/dist/esm/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +9 -0
- package/dist/esm/src/components/Notifications/Snackbar/interfaces.d.ts +18 -0
- package/dist/esm/src/components/Notifications/Snackbar/useSnackbar.d.ts +3 -0
- package/dist/esm/src/components/_BaseStyling_/BaseStyling.d.ts +40 -0
- package/dist/esm/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.d.ts +8 -0
- package/dist/esm/src/index.d.ts +15 -0
- package/dist/esm/src/index.esm.js +1 -1
- package/dist/esm/src/util/helper.d.ts +1 -0
- package/dist/esm/src/util/helper.esm.js +1 -1
- package/dist/esm/src/util/helper.esm.js.map +1 -1
- package/package.json +6 -6
- package/src/components/DataGrid/DataGrid.module.scss +2 -2
- package/src/components/DataGrid/DataGridBody/DataGridCell.module.scss +7 -2
- package/src/components/DataGrid/DataGridBody/DataGridCell.tsx +1 -1
- package/src/components/DataGrid/DataGridBody/DataGridRow.module.scss +10 -0
- package/src/components/DataGrid/DataGridBody/__snapshots__/DataGridBody.test.tsx.snap +16 -16
- package/src/components/DataGrid/DataGridHeader/DataGridHeader.module.scss +0 -10
- package/src/components/DataGrid/DataGridHeader/DataGridHeader.tsx +1 -1
- package/src/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss +3 -3
- package/src/components/Form/FileUpload/FileItem/FileItem.module.scss +114 -3
- package/src/components/Form/FileUpload/FileItem/FileItem.tsx +154 -47
- package/src/components/Form/FileUpload/FileUpload.module.scss +73 -16
- package/src/components/Form/FileUpload/FileUpload.tsx +82 -53
- package/src/components/Form/FormSection/FormSection.module.scss +12 -0
- package/src/components/Form/Select/MultiSelect/MultiOption.tsx +36 -3
- package/src/components/Form/Select/MultiSelect/MultiSelect.module.scss +29 -19
- package/src/components/Form/Select/MultiSelect/MultiSelect.tsx +85 -62
- package/src/components/Form/Select/MultiSelect/SelectButton.module.scss +1 -1
- package/src/components/Form/Select/MultiSelect/SelectButton.tsx +1 -1
- package/src/components/Form/Select/MultiSelect/SelectedOptions.tsx +5 -4
- package/src/components/Form/Select/MultiSelect/useArrowNavigation.ts +128 -0
- package/src/components/Form/Select/MultiSelect/useSearch.tsx +126 -0
- package/src/components/Form/Select/Select.interfaces.ts +1 -0
- package/src/components/Form/Select/SingleSelect/Option.tsx +15 -4
- package/src/components/Form/Select/SingleSelect/Select.module.scss +13 -2
- package/src/components/Form/Select/SingleSelect/Select.tsx +7 -3
- package/src/components/Form/Select/{SelectService.ts → SingleSelect/useArrowNavigation.ts} +1 -101
- package/src/components/Form/Select/{useSearch.tsx → SingleSelect/useSearch.tsx} +3 -2
- package/src/components/Form/Select/useAddNewBtn.module.scss +18 -4
- package/src/components/Form/Select/useAddNewBtn.tsx +42 -8
- package/src/components/Form/Select/useSelectPositionList.ts +113 -0
- package/src/components/Icon/Icon.module.scss +16 -1
- package/src/components/Icon/Icon.tsx +5 -1
- package/src/components/Layout/ContentHeader/ContentHeader.module.scss +44 -0
- package/src/components/Layout/ContentHeader/ContentHeader.tsx +70 -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 +39 -0
- package/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.tsx +34 -0
- package/src/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss +56 -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 +277 -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/useAlert.ts +30 -0
- package/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.tsx +9 -0
- package/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.tsx +6 -0
- package/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.tsx +9 -0
- package/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.tsx +9 -0
- package/src/components/Notifications/Snackbar/interfaces.ts +18 -0
- package/src/components/Notifications/Snackbar/useSnackbar.ts +3 -0
- package/src/components/Pagination/Pagination.module.scss +4 -6
- package/src/components/Pagination/Pagination.tsx +3 -1
- package/src/components/_BaseStyling_/BaseStyling.tsx +78 -1
- package/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss +25 -0
- package/src/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.tsx +47 -0
- package/src/font/icomoon.eot +0 -0
- package/src/font/icomoon.svg +3 -0
- package/src/font/icomoon.ttf +0 -0
- package/src/font/icomoon.woff +0 -0
- package/src/font/selection.json +1 -1
- package/src/index.ts +21 -0
- package/src/mixins.module.scss +7 -0
- package/src/util/helper.tsx +2 -0
- package/src/variables.scss +1 -0
- package/dist/cjs/Form/Select/SelectService.cjs.js +0 -2
- package/dist/cjs/Form/Select/SelectService.cjs.js.map +0 -1
- package/dist/cjs/Form/Select/useSearch.cjs.js +0 -2
- package/dist/cjs/Form/Select/useSearch.cjs.js.map +0 -1
- package/dist/cjs/src/components/Form/Select/SelectService.d.ts +0 -17
- package/dist/esm/Form/Select/SelectService.esm.js +0 -2
- package/dist/esm/Form/Select/SelectService.esm.js.map +0 -1
- package/dist/esm/Form/Select/useSearch.esm.js +0 -2
- package/dist/esm/Form/Select/useSearch.esm.js.map +0 -1
- package/dist/esm/src/components/Form/Select/SelectService.d.ts +0 -17
|
@@ -125,8 +125,19 @@ $listItemHeight: 2.5rem;
|
|
|
125
125
|
cursor: pointer;
|
|
126
126
|
|
|
127
127
|
&:focus {
|
|
128
|
-
outline:
|
|
129
|
-
|
|
128
|
+
outline: none;
|
|
129
|
+
|
|
130
|
+
&::before {
|
|
131
|
+
@include mixins.focusVisibleOutline($outlineOffset: 0, $selectors: null);
|
|
132
|
+
content: "";
|
|
133
|
+
position: absolute;
|
|
134
|
+
top: 0;
|
|
135
|
+
left: 0.125rem;
|
|
136
|
+
height: 100%;
|
|
137
|
+
width: calc(100% - 0.25rem);
|
|
138
|
+
opacity: 1;
|
|
139
|
+
z-index: calc(variables.$popover-z-index + 1);
|
|
140
|
+
}
|
|
130
141
|
}
|
|
131
142
|
|
|
132
143
|
&:hover {
|
|
@@ -31,9 +31,10 @@ import readyclasses from "../../../../readyclasses.module.scss";
|
|
|
31
31
|
import { filterProps } from "../../../../util/helper";
|
|
32
32
|
import { Icon, Icons } from "../../../Icon/Icon";
|
|
33
33
|
import { SingleSelectProps } from "../Select.interfaces";
|
|
34
|
-
import {
|
|
34
|
+
import { useSelectPositionList } from "../useSelectPositionList";
|
|
35
35
|
import { useAddNewBtn } from "../useAddNewBtn";
|
|
36
|
-
import { useSearch } from "
|
|
36
|
+
import { useSearch } from "./useSearch";
|
|
37
|
+
import { useArrowNavigation } from "./useArrowNavigation";
|
|
37
38
|
|
|
38
39
|
const SelectComponent: ForwardRefRenderFunction<HTMLSelectElement, SingleSelectProps> = (
|
|
39
40
|
{
|
|
@@ -87,7 +88,10 @@ const SelectComponent: ForwardRefRenderFunction<HTMLSelectElement, SingleSelectP
|
|
|
87
88
|
});
|
|
88
89
|
const { addBtnRef, addNewBtnOptionsContainerClassName, renderAddNew } = useAddNewBtn({
|
|
89
90
|
addNew,
|
|
90
|
-
filter
|
|
91
|
+
filter,
|
|
92
|
+
focusedSelectItem,
|
|
93
|
+
optionsCount,
|
|
94
|
+
searchInputRef
|
|
91
95
|
});
|
|
92
96
|
|
|
93
97
|
const nativeSelect = (ref as React.RefObject<HTMLSelectElement>) || createRef();
|
|
@@ -14,12 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
Position,
|
|
20
|
-
UseArrowNavigationParams,
|
|
21
|
-
UseSelectPositionListParams
|
|
22
|
-
} from "./Select.interfaces";
|
|
17
|
+
import { UseArrowNavigationParams } from "../Select.interfaces";
|
|
23
18
|
|
|
24
19
|
/** @scope .*/
|
|
25
20
|
export const useArrowNavigation = ({
|
|
@@ -175,98 +170,3 @@ export const useArrowNavigation = ({
|
|
|
175
170
|
|
|
176
171
|
return { onArrowNavigation };
|
|
177
172
|
};
|
|
178
|
-
|
|
179
|
-
/** @scope .*/
|
|
180
|
-
export const useSelectPositionList = ({
|
|
181
|
-
expanded,
|
|
182
|
-
optionListReference,
|
|
183
|
-
addBtnRef,
|
|
184
|
-
containerReference
|
|
185
|
-
}: UseSelectPositionListParams) => {
|
|
186
|
-
const [optionsListMaxHeight, setOptionsListMaxHeight] = useState<{
|
|
187
|
-
wrapper?: string;
|
|
188
|
-
list?: string;
|
|
189
|
-
}>({
|
|
190
|
-
wrapper: undefined,
|
|
191
|
-
list: undefined
|
|
192
|
-
});
|
|
193
|
-
const [opacity, setOpacity] = useState(0); // We set opacity because otherwise if we calculate the max height you see the list full height for a split second and then it shortens.
|
|
194
|
-
const [listPosition, setListPosition] = useState<Partial<Position>>({});
|
|
195
|
-
|
|
196
|
-
useEffect(() => {
|
|
197
|
-
rePositionList();
|
|
198
|
-
}, [expanded]);
|
|
199
|
-
|
|
200
|
-
const rePositionList = () => {
|
|
201
|
-
if (!expanded || !optionListReference.current || !containerReference.current) {
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
// Check whether there is more space above or below the select
|
|
206
|
-
// Check space between the bottom of select and top of viewport
|
|
207
|
-
const spaceOnTopOfSelect = containerReference.current.getBoundingClientRect().bottom;
|
|
208
|
-
|
|
209
|
-
// Check space between the top of the select and bottom of viewport
|
|
210
|
-
const spaceOnBottomOfSelect =
|
|
211
|
-
window.innerHeight - containerReference.current.getBoundingClientRect().top;
|
|
212
|
-
|
|
213
|
-
// Set position as if there's more space on the bottom
|
|
214
|
-
let position: Position = { top: "2.75rem", bottom: "initial" };
|
|
215
|
-
|
|
216
|
-
// Set the position of the select
|
|
217
|
-
if (spaceOnTopOfSelect > spaceOnBottomOfSelect) {
|
|
218
|
-
position = { top: "initial", bottom: "2.75rem" };
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
setListPosition(position);
|
|
222
|
-
|
|
223
|
-
// Calculate the potential max height of the options list
|
|
224
|
-
calculateOptionListMaxHeight(position);
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
const calculateOptionListMaxHeight = (position: Position) => {
|
|
228
|
-
// Calculate max height if there's more space below the select
|
|
229
|
-
const listHeight = optionListReference.current?.getBoundingClientRect().height;
|
|
230
|
-
const addNewButtonHeightWithMargin = addBtnRef.current
|
|
231
|
-
? addBtnRef.current.getBoundingClientRect().height +
|
|
232
|
-
parseInt(getComputedStyle(addBtnRef.current).marginBottom)
|
|
233
|
-
: 0;
|
|
234
|
-
const transformOrigin = position.top !== "initial" ? "top" : "bottom";
|
|
235
|
-
|
|
236
|
-
if (!containerReference.current) {
|
|
237
|
-
console.error(
|
|
238
|
-
"The containerReference is empty for some reason in the SelectService.ts for the Select component in react-lib-components. We are trying to calculate the option list max height on expand"
|
|
239
|
-
);
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
const availableSpace =
|
|
244
|
-
transformOrigin === "top"
|
|
245
|
-
? window.innerHeight - containerReference.current.getBoundingClientRect().bottom - 16
|
|
246
|
-
: containerReference.current.getBoundingClientRect().top - 16;
|
|
247
|
-
|
|
248
|
-
if (listHeight && availableSpace < listHeight + addNewButtonHeightWithMargin) {
|
|
249
|
-
const maxHeightObject = {
|
|
250
|
-
wrapper: `${availableSpace}px`,
|
|
251
|
-
list:
|
|
252
|
-
addNewButtonHeightWithMargin > 0
|
|
253
|
-
? `${availableSpace - addNewButtonHeightWithMargin}px`
|
|
254
|
-
: "none"
|
|
255
|
-
};
|
|
256
|
-
setOptionsListMaxHeight(maxHeightObject);
|
|
257
|
-
setOpacity(100);
|
|
258
|
-
return;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
setOptionsListMaxHeight({ wrapper: undefined, list: undefined });
|
|
262
|
-
setOpacity(100);
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
return {
|
|
266
|
-
optionsListMaxHeight,
|
|
267
|
-
opacity,
|
|
268
|
-
setOpacity,
|
|
269
|
-
listPosition,
|
|
270
|
-
setListPosition
|
|
271
|
-
};
|
|
272
|
-
};
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import React, { useEffect, useRef, useState } from "react";
|
|
18
|
-
import { PartialInputProps, SearchProps } from "
|
|
19
|
-
import { Input } from "
|
|
18
|
+
import { PartialInputProps, SearchProps } from "../Select.interfaces";
|
|
19
|
+
import { Input } from "../../Input/Input";
|
|
20
20
|
|
|
21
21
|
interface Props {
|
|
22
22
|
search?: SearchProps;
|
|
@@ -34,6 +34,7 @@ interface Props {
|
|
|
34
34
|
setFocusedSelectItem: (idx: number) => void;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
/** @scope .*/
|
|
37
38
|
export const useSearch = ({
|
|
38
39
|
search,
|
|
39
40
|
optionsCount,
|
|
@@ -13,12 +13,15 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
@use "src/mixins.module";
|
|
17
|
+
@use "src/variables";
|
|
16
18
|
|
|
17
19
|
ul.has-sibling {
|
|
18
20
|
padding-bottom: 2px;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
.action-button {
|
|
24
|
+
position: relative;
|
|
22
25
|
border: none;
|
|
23
26
|
border-top: 1px solid var(--color-blue-grey50);
|
|
24
27
|
width: 100%;
|
|
@@ -35,10 +38,21 @@ ul.has-sibling {
|
|
|
35
38
|
font-family: var(--font-family);
|
|
36
39
|
font-size: var(--form-control-font-size);
|
|
37
40
|
|
|
38
|
-
&:focus
|
|
39
|
-
|
|
40
|
-
outline
|
|
41
|
-
|
|
41
|
+
&:focus,
|
|
42
|
+
&.focus {
|
|
43
|
+
outline: none;
|
|
44
|
+
|
|
45
|
+
&::before {
|
|
46
|
+
@include mixins.focusVisibleOutline($outlineOffset: 0, $selectors: null);
|
|
47
|
+
content: "";
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: 0;
|
|
50
|
+
left: 0.125rem;
|
|
51
|
+
height: 100%;
|
|
52
|
+
width: calc(100% - 0.25rem);
|
|
53
|
+
opacity: 1;
|
|
54
|
+
z-index: calc(variables.$popover-z-index + 1);
|
|
55
|
+
}
|
|
42
56
|
}
|
|
43
57
|
|
|
44
58
|
&:hover {
|
|
@@ -16,28 +16,62 @@
|
|
|
16
16
|
|
|
17
17
|
import classes from "./useAddNewBtn.module.scss";
|
|
18
18
|
|
|
19
|
-
import React, { useRef } from "react";
|
|
19
|
+
import React, { RefObject, useEffect, useRef } from "react";
|
|
20
20
|
import { AddNewProps } from "./Select.interfaces";
|
|
21
21
|
|
|
22
22
|
interface Props {
|
|
23
|
+
id?: string;
|
|
23
24
|
addNew?: AddNewProps;
|
|
24
25
|
filter: string;
|
|
26
|
+
focusedSelectItem: number;
|
|
27
|
+
optionsCount: number;
|
|
28
|
+
searchInputRef: RefObject<HTMLInputElement>;
|
|
29
|
+
shouldClick?: boolean;
|
|
30
|
+
onClickCallback?: () => void;
|
|
25
31
|
}
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+
/** @scope .*/
|
|
34
|
+
export const useAddNewBtn = ({
|
|
35
|
+
id,
|
|
36
|
+
addNew,
|
|
37
|
+
filter,
|
|
38
|
+
focusedSelectItem,
|
|
39
|
+
optionsCount,
|
|
40
|
+
searchInputRef,
|
|
41
|
+
shouldClick,
|
|
42
|
+
onClickCallback
|
|
43
|
+
}: Props) => {
|
|
28
44
|
const addBtnRef = useRef<HTMLButtonElement>(null);
|
|
29
|
-
|
|
30
45
|
const addNewLabel = addNew?.label ?? "Create new";
|
|
46
|
+
const isProgrammaticallyFocused = focusedSelectItem === optionsCount;
|
|
47
|
+
const isSearchDisabled = !searchInputRef.current;
|
|
48
|
+
const hasSearchQuery = typeof filter === "string" && !!filter.trim() && !!searchInputRef.current;
|
|
49
|
+
const shouldRender = addNew && (isSearchDisabled || hasSearchQuery || addNew.alwaysEnabled);
|
|
50
|
+
|
|
51
|
+
const additionalClasses = [classes["action-button"]];
|
|
52
|
+
addNew?.btnProps?.className && additionalClasses.push(addNew?.btnProps?.className);
|
|
53
|
+
isProgrammaticallyFocused && additionalClasses.push(classes["focus"]);
|
|
54
|
+
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
const addBtnClicked = addBtnRef.current && isProgrammaticallyFocused && shouldClick;
|
|
57
|
+
if (addBtnClicked) {
|
|
58
|
+
addBtnRef.current.click();
|
|
59
|
+
}
|
|
60
|
+
}, [addBtnRef.current, isProgrammaticallyFocused, shouldClick]);
|
|
31
61
|
|
|
32
62
|
const renderAddNew = () =>
|
|
33
|
-
|
|
63
|
+
shouldRender && (
|
|
34
64
|
<button
|
|
35
|
-
data-testid=
|
|
36
|
-
|
|
37
|
-
onClick={() => addNew.onAddNew(filter)}
|
|
65
|
+
data-testid="select-action-button"
|
|
66
|
+
{...addNew.btnProps}
|
|
38
67
|
ref={addBtnRef}
|
|
39
68
|
type="button"
|
|
40
|
-
{
|
|
69
|
+
className={additionalClasses.join(" ")}
|
|
70
|
+
onClick={() => {
|
|
71
|
+
addNew.onAddNew(filter);
|
|
72
|
+
onClickCallback?.();
|
|
73
|
+
}}
|
|
74
|
+
id={id}
|
|
41
75
|
>
|
|
42
76
|
{!filter && addNewLabel}
|
|
43
77
|
{filter && <span style={{ fontWeight: "700" }}>{`"${filter}"`}</span>}
|
|
@@ -0,0 +1,113 @@
|
|
|
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 { useEffect, useState } from "react";
|
|
18
|
+
import { Position, UseSelectPositionListParams } from "./Select.interfaces";
|
|
19
|
+
|
|
20
|
+
/** @scope .*/
|
|
21
|
+
export const useSelectPositionList = ({
|
|
22
|
+
expanded,
|
|
23
|
+
optionListReference,
|
|
24
|
+
addBtnRef,
|
|
25
|
+
containerReference
|
|
26
|
+
}: UseSelectPositionListParams) => {
|
|
27
|
+
const [optionsListMaxHeight, setOptionsListMaxHeight] = useState<{
|
|
28
|
+
wrapper?: string;
|
|
29
|
+
list?: string;
|
|
30
|
+
}>({
|
|
31
|
+
wrapper: undefined,
|
|
32
|
+
list: undefined
|
|
33
|
+
});
|
|
34
|
+
const [opacity, setOpacity] = useState(0); // We set opacity because otherwise if we calculate the max height you see the list full height for a split second and then it shortens.
|
|
35
|
+
const [listPosition, setListPosition] = useState<Partial<Position>>({});
|
|
36
|
+
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
rePositionList();
|
|
39
|
+
}, [expanded]);
|
|
40
|
+
|
|
41
|
+
const rePositionList = () => {
|
|
42
|
+
if (!expanded || !optionListReference.current || !containerReference.current) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Check whether there is more space above or below the select
|
|
47
|
+
// Check space between the bottom of select and top of viewport
|
|
48
|
+
const spaceOnTopOfSelect = containerReference.current.getBoundingClientRect().bottom;
|
|
49
|
+
|
|
50
|
+
// Check space between the top of the select and bottom of viewport
|
|
51
|
+
const spaceOnBottomOfSelect =
|
|
52
|
+
window.innerHeight - containerReference.current.getBoundingClientRect().top;
|
|
53
|
+
|
|
54
|
+
// Set position as if there's more space on the bottom
|
|
55
|
+
let position: Position = { top: "2.75rem", bottom: "initial" };
|
|
56
|
+
|
|
57
|
+
// Set the position of the select
|
|
58
|
+
if (spaceOnTopOfSelect > spaceOnBottomOfSelect) {
|
|
59
|
+
position = { top: "initial", bottom: "2.75rem" };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
setListPosition(position);
|
|
63
|
+
|
|
64
|
+
// Calculate the potential max height of the options list
|
|
65
|
+
calculateOptionListMaxHeight(position);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const calculateOptionListMaxHeight = (position: Position) => {
|
|
69
|
+
// Calculate max height if there's more space below the select
|
|
70
|
+
const listHeight = optionListReference.current?.getBoundingClientRect().height;
|
|
71
|
+
const addNewButtonHeightWithMargin = addBtnRef.current
|
|
72
|
+
? addBtnRef.current.getBoundingClientRect().height +
|
|
73
|
+
parseInt(getComputedStyle(addBtnRef.current).marginBottom)
|
|
74
|
+
: 0;
|
|
75
|
+
const transformOrigin = position.top !== "initial" ? "top" : "bottom";
|
|
76
|
+
|
|
77
|
+
if (!containerReference.current) {
|
|
78
|
+
console.error(
|
|
79
|
+
"The containerReference is empty for some reason in the SelectService.ts for the Select component in react-lib-components. We are trying to calculate the option list max height on expand"
|
|
80
|
+
);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const availableSpace =
|
|
85
|
+
transformOrigin === "top"
|
|
86
|
+
? window.innerHeight - containerReference.current.getBoundingClientRect().bottom - 16
|
|
87
|
+
: containerReference.current.getBoundingClientRect().top - 16;
|
|
88
|
+
|
|
89
|
+
if (listHeight && availableSpace < listHeight + addNewButtonHeightWithMargin) {
|
|
90
|
+
const maxHeightObject = {
|
|
91
|
+
wrapper: `${availableSpace}px`,
|
|
92
|
+
list:
|
|
93
|
+
addNewButtonHeightWithMargin > 0
|
|
94
|
+
? `${availableSpace - addNewButtonHeightWithMargin}px`
|
|
95
|
+
: "none"
|
|
96
|
+
};
|
|
97
|
+
setOptionsListMaxHeight(maxHeightObject);
|
|
98
|
+
setOpacity(100);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
setOptionsListMaxHeight({ wrapper: undefined, list: undefined });
|
|
103
|
+
setOpacity(100);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
optionsListMaxHeight,
|
|
108
|
+
opacity,
|
|
109
|
+
setOpacity,
|
|
110
|
+
listPosition,
|
|
111
|
+
setListPosition
|
|
112
|
+
};
|
|
113
|
+
};
|
|
@@ -337,8 +337,23 @@
|
|
|
337
337
|
content: "\e9d1";
|
|
338
338
|
@include fontProperties();
|
|
339
339
|
}
|
|
340
|
-
|
|
341
340
|
.icon-warning-filled:before {
|
|
342
341
|
content: "\e948";
|
|
343
342
|
@include fontProperties();
|
|
344
343
|
}
|
|
344
|
+
.icon-download-file-outline:before {
|
|
345
|
+
content: "\e945";
|
|
346
|
+
@include fontProperties();
|
|
347
|
+
}
|
|
348
|
+
.icon-retry:before {
|
|
349
|
+
content: "\e949";
|
|
350
|
+
@include fontProperties();
|
|
351
|
+
}
|
|
352
|
+
.icon-cancel:before {
|
|
353
|
+
content: "\e94a";
|
|
354
|
+
@include fontProperties();
|
|
355
|
+
}
|
|
356
|
+
.icon-file-alt:before {
|
|
357
|
+
content: "\e94b";
|
|
358
|
+
@include fontProperties();
|
|
359
|
+
}
|
|
@@ -91,7 +91,11 @@ export enum Icons {
|
|
|
91
91
|
FileDownload = "file-download-outline",
|
|
92
92
|
UploadOutline = "upload-outline",
|
|
93
93
|
ReplyOutline = "reply-outline",
|
|
94
|
-
SaveOutline = "save-outline"
|
|
94
|
+
SaveOutline = "save-outline",
|
|
95
|
+
DownloadFile = "download-file-outline",
|
|
96
|
+
RetryFile = "retry",
|
|
97
|
+
AbortFile = "cancel",
|
|
98
|
+
FileAltIcon = "file-alt"
|
|
95
99
|
}
|
|
96
100
|
|
|
97
101
|
type Tag = "span" | "div" | "i";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.header {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: flex-end;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
gap: 2rem;
|
|
6
|
+
padding: 2rem;
|
|
7
|
+
z-index: 1;
|
|
8
|
+
-webkit-transition: 0.5s;
|
|
9
|
+
transition: 0.5s;
|
|
10
|
+
max-width: 105rem;
|
|
11
|
+
|
|
12
|
+
&.collapsed-header {
|
|
13
|
+
padding: 1rem 2rem 1rem 2rem;
|
|
14
|
+
-webkit-transition: 0.5s;
|
|
15
|
+
transition: 0.5s;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-background-color {
|
|
19
|
+
background-color: var(--color-blue-grey25);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.hide-text {
|
|
24
|
+
display: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.header-text {
|
|
28
|
+
margin: 0;
|
|
29
|
+
font-weight: 500;
|
|
30
|
+
color: var(--color-blue-grey900);
|
|
31
|
+
line-height: 3.125rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.header-subtitle {
|
|
35
|
+
color: var(--color-blue-grey400);
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.buttons-wrapper {
|
|
40
|
+
display: flex;
|
|
41
|
+
justify-content: flex-end;
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
gap: 1rem;
|
|
44
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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, { HTMLAttributes, ReactElement } from "react";
|
|
18
|
+
import { Button, Props as ButtonProps } from "../../Button/Button";
|
|
19
|
+
import { Typography } from "../../Typography/Typography";
|
|
20
|
+
|
|
21
|
+
import classes from "./ContentHeader.module.scss";
|
|
22
|
+
|
|
23
|
+
export interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
24
|
+
title: string;
|
|
25
|
+
subtitle?: string;
|
|
26
|
+
buttons?: ReactElement<ButtonProps, typeof Button> | ReactElement<ButtonProps, typeof Button>[];
|
|
27
|
+
collapsed?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const ContentHeaderComponent = ({
|
|
31
|
+
title,
|
|
32
|
+
children,
|
|
33
|
+
buttons,
|
|
34
|
+
collapsed,
|
|
35
|
+
subtitle,
|
|
36
|
+
...rest
|
|
37
|
+
}: Props) => {
|
|
38
|
+
return (
|
|
39
|
+
<div className={classes["header-background-color"]}>
|
|
40
|
+
<div
|
|
41
|
+
className={`${classes["header"]} ${rest.className} ${collapsed ? classes["collapsed-header"] : ""}`}
|
|
42
|
+
{...rest}
|
|
43
|
+
>
|
|
44
|
+
<div>
|
|
45
|
+
<Typography className={classes["header-text"]} variant={"h1"}>
|
|
46
|
+
{title}
|
|
47
|
+
</Typography>
|
|
48
|
+
{subtitle && (
|
|
49
|
+
<Typography
|
|
50
|
+
className={`${classes["header-subtitle"]} ${collapsed ? classes["hide-text"] : ""}`}
|
|
51
|
+
variant={"h4"}
|
|
52
|
+
>
|
|
53
|
+
{subtitle}
|
|
54
|
+
</Typography>
|
|
55
|
+
)}
|
|
56
|
+
<Typography
|
|
57
|
+
className={`${collapsed ? classes["hide-text"] : ""}`}
|
|
58
|
+
variant={"body"}
|
|
59
|
+
spacing={{ margin: 0 }}
|
|
60
|
+
>
|
|
61
|
+
{children}
|
|
62
|
+
</Typography>
|
|
63
|
+
</div>
|
|
64
|
+
{buttons && <div className={classes["buttons-wrapper"]}>{buttons}</div>}
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const ContentHeader = ContentHeaderComponent;
|
|
@@ -0,0 +1,53 @@
|
|
|
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, { ComponentPropsWithRef, ForwardRefRenderFunction } from "react";
|
|
18
|
+
import classes from "./FormSection.module.scss";
|
|
19
|
+
import { Typography } from "../../../../Typography/Typography";
|
|
20
|
+
|
|
21
|
+
export interface Props extends ComponentPropsWithRef<"div"> {
|
|
22
|
+
header?: string;
|
|
23
|
+
subtext?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const FormSectionComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
27
|
+
{ header, subtext, children, ...rest },
|
|
28
|
+
ref
|
|
29
|
+
) => {
|
|
30
|
+
return (
|
|
31
|
+
<div {...rest} className={classes["section-wrapper"]} ref={ref}>
|
|
32
|
+
{header && (
|
|
33
|
+
<div className={classes["section-header-wrapper"]}>
|
|
34
|
+
<Typography
|
|
35
|
+
variant="h4"
|
|
36
|
+
className={classes["section-header"]}
|
|
37
|
+
spacing={{ marginBottom: 0 }}
|
|
38
|
+
>
|
|
39
|
+
{header}
|
|
40
|
+
</Typography>
|
|
41
|
+
{subtext && (
|
|
42
|
+
<Typography variant="sub-text" spacing={{ marginBottom: 0 }}>
|
|
43
|
+
{subtext}
|
|
44
|
+
</Typography>
|
|
45
|
+
)}
|
|
46
|
+
</div>
|
|
47
|
+
)}
|
|
48
|
+
{children}
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const FormSection = React.forwardRef(FormSectionComponent);
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
.stepper {
|
|
18
|
+
position: sticky;
|
|
19
|
+
top: 0;
|
|
20
|
+
& > div:first-child {
|
|
21
|
+
height: auto;
|
|
22
|
+
min-height: 15rem;
|
|
23
|
+
align-items: flex-start;
|
|
24
|
+
}
|
|
25
|
+
}
|