@onewelcome/react-lib-components 8.12.0 → 8.12.2
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/Breadcrumbs/Breadcrumbs.module.scss.cjs.js +1 -1
- package/dist/cjs/Button/BaseButton.module.scss.cjs.js +1 -1
- package/dist/cjs/Button/Button.module.scss.cjs.js +1 -1
- package/dist/cjs/Button/IconButton.module.scss.cjs.js +1 -1
- package/dist/cjs/ContextMenu/ContextMenu.module.scss.cjs.js +1 -1
- package/dist/cjs/ContextMenu/ContextMenuItem.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGrid.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridActions/DataGridActions.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridBody.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilter.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridFilters/DataGridToolbar.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.cjs.js +1 -1
- package/dist/cjs/DatePicker/DatePicker.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Checkbox/Checkbox.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Fieldset/Fieldset.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/FileUpload/FileItem/FileItem.module.scss.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.scss.cjs.js +1 -1
- package/dist/cjs/Form/Form.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/FormControl/FormControl.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/FormGroup/FormGroup.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/FormHelperText/FormHelperText.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Input/Input.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Label/Label.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Radio/Radio.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/MultiSelect.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/SelectButton.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/SelectedOptions.module.scss.cjs.js +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.scss.cjs.js +1 -1
- package/dist/cjs/Form/Select/useAddNewBtn.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Textarea/Textarea.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Toggle/Toggle.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/InputWrapper/InputWrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/TextareaWrapper/TextareaWrapper.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/TextareaWrapper/TextareaWrapper.cjs.js.map +1 -1
- package/dist/cjs/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/Wrapper/Wrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Icon/Icon.module.scss.cjs.js +1 -1
- package/dist/cjs/Layout/ContentHeader/ContentHeader.module.scss.cjs.js +1 -1
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.cjs.js +1 -1
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.cjs.js +1 -1
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.cjs.js +1 -1
- package/dist/cjs/Link/Link.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/Banner/Banner.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/BaseModal/BaseModal.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/Dialog/Dialog.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/Dialog/DialogActions/DialogActions.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/SideSheet/SideSheet.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/SlideInModal/SlideInModal.module.scss.cjs.js +1 -1
- package/dist/cjs/Pagination/Pagination.module.scss.cjs.js +1 -1
- package/dist/cjs/Popover/Popover.module.scss.cjs.js +1 -1
- package/dist/cjs/ProgressBar/ProgressBar.module.scss.cjs.js +1 -1
- package/dist/cjs/Skeleton/Skeleton.module.scss.cjs.js +1 -1
- package/dist/cjs/Spinner/Spinner.module.scss.cjs.js +1 -1
- package/dist/cjs/Stepper/Step.module.scss.cjs.js +1 -1
- package/dist/cjs/Stepper/Stepper.module.scss.cjs.js +1 -1
- package/dist/cjs/Tabs/Tab.module.scss.cjs.js +1 -1
- package/dist/cjs/Tabs/TabButton.module.scss.cjs.js +1 -1
- package/dist/cjs/Tabs/Tabs.module.scss.cjs.js +1 -1
- package/dist/cjs/Tag/RemoveButton.module.scss.cjs.js +1 -1
- package/dist/cjs/Tag/Tag.module.scss.cjs.js +1 -1
- package/dist/cjs/TextEllipsis/TextEllipsis.module.scss.cjs.js +1 -1
- package/dist/cjs/Tiles/Tile.module.scss.cjs.js +1 -1
- package/dist/cjs/Tiles/Tiles.module.scss.cjs.js +1 -1
- package/dist/cjs/Tooltip/Tooltip.module.scss.cjs.js +1 -1
- package/dist/cjs/Typography/Typography.module.scss.cjs.js +1 -1
- package/dist/cjs/admin/layout/LeftNav/LeftNav.cjs.js.map +1 -1
- package/dist/cjs/admin/layout/LeftNav/LeftNav.module.scss.cjs.js +1 -1
- package/dist/cjs/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.cjs.js +1 -1
- package/dist/cjs/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.cjs.js.map +1 -1
- package/dist/cjs/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.cjs.js +1 -1
- package/dist/cjs/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.cjs.js +1 -1
- package/dist/cjs/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.cjs.js.map +1 -1
- package/dist/cjs/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.cjs.js +1 -1
- package/dist/cjs/miscellaneous/IdentityProviderButton.module.scss.cjs.js +1 -1
- package/dist/cjs/src/components/admin/layout/LeftNav/LeftNav.d.ts +1 -1
- package/dist/cjs/src/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.d.ts +1 -1
- package/dist/cjs/src/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.interface.d.ts +1 -1
- package/dist/cjs/src/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.d.ts +2 -1
- package/dist/cjs/src/hooks/useUploadFile.cjs.js +1 -1
- package/dist/cjs/src/hooks/useUploadFile.cjs.js.map +1 -1
- package/dist/cjs/src/index.d.ts +1 -0
- package/dist/cjs/src/readyclasses.module.scss.cjs.js +1 -1
- package/dist/esm/Breadcrumbs/Breadcrumbs.esm.js +9 -9
- package/dist/esm/Breadcrumbs/Breadcrumbs.esm.js.map +1 -1
- package/dist/esm/Breadcrumbs/Breadcrumbs.module.scss.esm.js +2 -2
- package/dist/esm/Button/BaseButton.esm.js +5 -5
- package/dist/esm/Button/BaseButton.esm.js.map +1 -1
- package/dist/esm/Button/BaseButton.module.scss.esm.js +2 -2
- package/dist/esm/Button/Button.esm.js +6 -6
- package/dist/esm/Button/Button.esm.js.map +1 -1
- package/dist/esm/Button/Button.module.scss.esm.js +2 -2
- package/dist/esm/Button/IconButton.esm.js +5 -5
- package/dist/esm/Button/IconButton.esm.js.map +1 -1
- package/dist/esm/Button/IconButton.module.scss.esm.js +2 -2
- package/dist/esm/Button/Spinner.esm.js +3 -3
- package/dist/esm/Button/Spinner.esm.js.map +1 -1
- package/dist/esm/ContextMenu/ContextMenu.esm.js +10 -10
- package/dist/esm/ContextMenu/ContextMenu.esm.js.map +1 -1
- package/dist/esm/ContextMenu/ContextMenu.module.scss.esm.js +2 -2
- package/dist/esm/ContextMenu/ContextMenuItem.esm.js +4 -4
- package/dist/esm/ContextMenu/ContextMenuItem.esm.js.map +1 -1
- package/dist/esm/ContextMenu/ContextMenuItem.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGrid.esm.js +11 -11
- package/dist/esm/DataGrid/DataGrid.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGrid.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridActions/DataGridActions.esm.js +14 -14
- package/dist/esm/DataGrid/DataGridActions/DataGridActions.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridActions/DataGridActions.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridActions/DataGridColumnsToggle.esm.js +11 -11
- package/dist/esm/DataGrid/DataGridActions/DataGridColumnsToggle.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridBody.esm.js +10 -10
- package/dist/esm/DataGrid/DataGridBody/DataGridBody.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridBody.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.esm.js +10 -10
- package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.esm.js +4 -4
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.esm.js +6 -6
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridRow/DataGridRow.esm.js +15 -15
- package/dist/esm/DataGrid/DataGridBody/DataGridRow/DataGridRow.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridRow/useNestedRow.esm.js +4 -4
- package/dist/esm/DataGrid/DataGridBody/DataGridRow/useNestedRow.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridFilters/DataGridDateFilter.esm.js +4 -4
- package/dist/esm/DataGrid/DataGridFilters/DataGridDateFilter.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilter.esm.js +4 -4
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilter.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilter.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilterPopover.esm.js +12 -12
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilterPopover.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilterTag.esm.js +17 -17
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilterTag.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridFilters/DataGridSearchbar.esm.js +3 -3
- package/dist/esm/DataGrid/DataGridFilters/DataGridSearchbar.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridFilters/DataGridToolbar.esm.js +8 -8
- package/dist/esm/DataGrid/DataGridFilters/DataGridToolbar.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridFilters/DataGridToolbar.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridFilters/DataGridToolbarWrapper.esm.js +5 -5
- package/dist/esm/DataGrid/DataGridFilters/DataGridToolbarWrapper.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.esm.js +13 -13
- package/dist/esm/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.esm.js +8 -8
- package/dist/esm/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerInputSection.esm.js +4 -4
- package/dist/esm/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerInputSection.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridFilters/DateTimePicker/SideMenu.esm.js +3 -3
- package/dist/esm/DataGrid/DataGridFilters/DateTimePicker/SideMenu.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js +7 -7
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeaderCell.esm.js +7 -7
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeaderCell.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.esm.js +2 -2
- package/dist/esm/DatePicker/DatePicker.esm.js +2 -2
- package/dist/esm/DatePicker/DatePicker.esm.js.map +1 -1
- package/dist/esm/DatePicker/DatePicker.module.scss.esm.js +2 -2
- package/dist/esm/Form/Checkbox/Checkbox.esm.js +12 -12
- package/dist/esm/Form/Checkbox/Checkbox.esm.js.map +1 -1
- package/dist/esm/Form/Checkbox/Checkbox.module.scss.esm.js +2 -2
- package/dist/esm/Form/Fieldset/Fieldset.esm.js +7 -7
- package/dist/esm/Form/Fieldset/Fieldset.esm.js.map +1 -1
- package/dist/esm/Form/Fieldset/Fieldset.module.scss.esm.js +2 -2
- package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js +17 -17
- package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js.map +1 -1
- package/dist/esm/Form/FileUpload/FileItem/FileItem.module.scss.esm.js +2 -2
- package/dist/esm/Form/FileUpload/FileUpload.esm.js +19 -18
- package/dist/esm/Form/FileUpload/FileUpload.esm.js.map +1 -1
- package/dist/esm/Form/FileUpload/FileUpload.module.scss.esm.js +2 -2
- package/dist/esm/Form/Form.esm.js +3 -3
- package/dist/esm/Form/Form.esm.js.map +1 -1
- package/dist/esm/Form/Form.module.scss.esm.js +2 -2
- package/dist/esm/Form/FormControl/FormControl.esm.js +6 -6
- package/dist/esm/Form/FormControl/FormControl.esm.js.map +1 -1
- package/dist/esm/Form/FormControl/FormControl.module.scss.esm.js +2 -2
- package/dist/esm/Form/FormGroup/FormGroup.esm.js +9 -9
- package/dist/esm/Form/FormGroup/FormGroup.esm.js.map +1 -1
- package/dist/esm/Form/FormGroup/FormGroup.module.scss.esm.js +2 -2
- package/dist/esm/Form/FormHelperText/FormHelperText.esm.js +3 -3
- package/dist/esm/Form/FormHelperText/FormHelperText.esm.js.map +1 -1
- package/dist/esm/Form/FormHelperText/FormHelperText.module.scss.esm.js +2 -2
- package/dist/esm/Form/FormSelectorWrapper/FormSelectorWrapper.esm.js +5 -5
- package/dist/esm/Form/FormSelectorWrapper/FormSelectorWrapper.esm.js.map +1 -1
- package/dist/esm/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Input/Input.esm.js +8 -8
- package/dist/esm/Form/Input/Input.esm.js.map +1 -1
- package/dist/esm/Form/Input/Input.module.scss.esm.js +2 -2
- package/dist/esm/Form/Label/Label.esm.js +3 -3
- package/dist/esm/Form/Label/Label.esm.js.map +1 -1
- package/dist/esm/Form/Label/Label.module.scss.esm.js +2 -2
- package/dist/esm/Form/Radio/Radio.esm.js +7 -7
- package/dist/esm/Form/Radio/Radio.esm.js.map +1 -1
- package/dist/esm/Form/Radio/Radio.module.scss.esm.js +2 -2
- package/dist/esm/Form/Select/MultiSelect/MultiOption.esm.js +3 -3
- package/dist/esm/Form/Select/MultiSelect/MultiOption.esm.js.map +1 -1
- package/dist/esm/Form/Select/MultiSelect/MultiSelect.esm.js +24 -24
- package/dist/esm/Form/Select/MultiSelect/MultiSelect.esm.js.map +1 -1
- package/dist/esm/Form/Select/MultiSelect/MultiSelect.module.scss.esm.js +2 -2
- package/dist/esm/Form/Select/MultiSelect/SelectButton.esm.js +3 -3
- package/dist/esm/Form/Select/MultiSelect/SelectButton.esm.js.map +1 -1
- package/dist/esm/Form/Select/MultiSelect/SelectButton.module.scss.esm.js +2 -2
- package/dist/esm/Form/Select/MultiSelect/SelectedOptions.esm.js +3 -3
- package/dist/esm/Form/Select/MultiSelect/SelectedOptions.esm.js.map +1 -1
- package/dist/esm/Form/Select/MultiSelect/SelectedOptions.module.scss.esm.js +2 -2
- package/dist/esm/Form/Select/MultiSelect/useMultiSelect.esm.js +2 -2
- package/dist/esm/Form/Select/MultiSelect/useMultiSelect.esm.js.map +1 -1
- package/dist/esm/Form/Select/MultiSelect/useSearch.esm.js +2 -2
- package/dist/esm/Form/Select/MultiSelect/useSearch.esm.js.map +1 -1
- package/dist/esm/Form/Select/SingleSelect/Option.esm.js +3 -3
- package/dist/esm/Form/Select/SingleSelect/Option.esm.js.map +1 -1
- package/dist/esm/Form/Select/SingleSelect/Select.esm.js +22 -22
- package/dist/esm/Form/Select/SingleSelect/Select.esm.js.map +1 -1
- package/dist/esm/Form/Select/SingleSelect/Select.module.scss.esm.js +2 -2
- package/dist/esm/Form/Select/SingleSelect/useSearch.esm.js +2 -2
- package/dist/esm/Form/Select/SingleSelect/useSearch.esm.js.map +1 -1
- package/dist/esm/Form/Select/useAddNewBtn.esm.js +3 -3
- package/dist/esm/Form/Select/useAddNewBtn.esm.js.map +1 -1
- package/dist/esm/Form/Select/useAddNewBtn.module.scss.esm.js +2 -2
- package/dist/esm/Form/Textarea/Textarea.esm.js +6 -6
- package/dist/esm/Form/Textarea/Textarea.esm.js.map +1 -1
- package/dist/esm/Form/Textarea/Textarea.module.scss.esm.js +2 -2
- package/dist/esm/Form/Toggle/Toggle.esm.js +5 -5
- package/dist/esm/Form/Toggle/Toggle.esm.js.map +1 -1
- package/dist/esm/Form/Toggle/Toggle.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.esm.js +5 -5
- package/dist/esm/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.esm.js.map +1 -1
- package/dist/esm/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/InputWrapper/InputWrapper.esm.js +4 -4
- package/dist/esm/Form/Wrapper/InputWrapper/InputWrapper.esm.js.map +1 -1
- package/dist/esm/Form/Wrapper/InputWrapper/InputWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.esm.js +4 -4
- package/dist/esm/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.esm.js.map +1 -1
- package/dist/esm/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/RadioWrapper/RadioWrapper.esm.js +6 -6
- package/dist/esm/Form/Wrapper/RadioWrapper/RadioWrapper.esm.js.map +1 -1
- package/dist/esm/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/SelectWrapper/SelectWrapper.esm.js +4 -4
- package/dist/esm/Form/Wrapper/SelectWrapper/SelectWrapper.esm.js.map +1 -1
- package/dist/esm/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/TextareaWrapper/TextareaWrapper.esm.js +6 -6
- package/dist/esm/Form/Wrapper/TextareaWrapper/TextareaWrapper.esm.js.map +1 -1
- package/dist/esm/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/Wrapper/Wrapper.esm.js +7 -7
- package/dist/esm/Form/Wrapper/Wrapper/Wrapper.esm.js.map +1 -1
- package/dist/esm/Form/Wrapper/Wrapper/Wrapper.module.scss.esm.js +2 -2
- package/dist/esm/Icon/Icon.esm.js +3 -3
- package/dist/esm/Icon/Icon.esm.js.map +1 -1
- package/dist/esm/Icon/Icon.module.scss.esm.js +2 -2
- package/dist/esm/Layout/ContentHeader/ContentHeader.esm.js +17 -17
- package/dist/esm/Layout/ContentHeader/ContentHeader.esm.js.map +1 -1
- package/dist/esm/Layout/ContentHeader/ContentHeader.module.scss.esm.js +2 -2
- package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.esm.js +6 -6
- package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.esm.js.map +1 -1
- package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.esm.js +2 -2
- package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.esm.js +3 -3
- package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.esm.js.map +1 -1
- package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.esm.js +2 -2
- package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.esm.js +3 -3
- package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.esm.js.map +1 -1
- package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.esm.js +2 -2
- package/dist/esm/Link/Link.esm.js +5 -5
- package/dist/esm/Link/Link.esm.js.map +1 -1
- package/dist/esm/Link/Link.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.esm.js +2 -2
- package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.esm.js.map +1 -1
- package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Alert/AlertItem/AlertItem.esm.js +11 -11
- package/dist/esm/Notifications/Alert/AlertItem/AlertItem.esm.js.map +1 -1
- package/dist/esm/Notifications/Alert/AlertItem/AlertItem.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Alert/AlertProvider/AlertProvider.esm.js +4 -4
- package/dist/esm/Notifications/Alert/AlertProvider/AlertProvider.esm.js.map +1 -1
- package/dist/esm/Notifications/Banner/Banner.esm.js +7 -7
- package/dist/esm/Notifications/Banner/Banner.esm.js.map +1 -1
- package/dist/esm/Notifications/Banner/Banner.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/BaseModal/BaseModal.esm.js +8 -8
- package/dist/esm/Notifications/BaseModal/BaseModal.esm.js.map +1 -1
- package/dist/esm/Notifications/BaseModal/BaseModal.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/BaseModal/BaseModalActions/BaseModalActions.esm.js +7 -7
- package/dist/esm/Notifications/BaseModal/BaseModalActions/BaseModalActions.esm.js.map +1 -1
- package/dist/esm/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/BaseModal/BaseModalContent/BaseModalContent.esm.js +3 -3
- package/dist/esm/Notifications/BaseModal/BaseModalContent/BaseModalContent.esm.js.map +1 -1
- package/dist/esm/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.esm.js +9 -9
- package/dist/esm/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.esm.js.map +1 -1
- package/dist/esm/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Dialog/Dialog.esm.js +9 -9
- package/dist/esm/Notifications/Dialog/Dialog.esm.js.map +1 -1
- package/dist/esm/Notifications/Dialog/Dialog.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Dialog/DialogActions/DialogActions.esm.js +3 -3
- package/dist/esm/Notifications/Dialog/DialogActions/DialogActions.esm.js.map +1 -1
- package/dist/esm/Notifications/Dialog/DialogActions/DialogActions.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Dialog/DialogTitle/DialogTitle.esm.js +10 -10
- package/dist/esm/Notifications/Dialog/DialogTitle/DialogTitle.esm.js.map +1 -1
- package/dist/esm/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.esm.js +4 -4
- package/dist/esm/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.esm.js.map +1 -1
- package/dist/esm/Notifications/DiscardChangesModal/DiscardChangesModal.esm.js +5 -5
- package/dist/esm/Notifications/DiscardChangesModal/DiscardChangesModal.esm.js.map +1 -1
- package/dist/esm/Notifications/NotificationProvider/NotificationContext.esm.js +3 -3
- package/dist/esm/Notifications/NotificationProvider/NotificationContext.esm.js.map +1 -1
- package/dist/esm/Notifications/SideSheet/SideSheet.esm.js +11 -11
- package/dist/esm/Notifications/SideSheet/SideSheet.esm.js.map +1 -1
- package/dist/esm/Notifications/SideSheet/SideSheet.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/SideSheet/SideSheetContent/SideSheetContent.esm.js +2 -2
- package/dist/esm/Notifications/SideSheet/SideSheetContent/SideSheetContent.esm.js.map +1 -1
- package/dist/esm/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.esm.js +2 -2
- package/dist/esm/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.esm.js.map +1 -1
- package/dist/esm/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/SlideInModal/SlideInModal.esm.js +3 -3
- package/dist/esm/Notifications/SlideInModal/SlideInModal.esm.js.map +1 -1
- package/dist/esm/Notifications/SlideInModal/SlideInModal.module.scss.esm.js +2 -2
- package/dist/esm/Pagination/Pagination.esm.js +29 -29
- package/dist/esm/Pagination/Pagination.esm.js.map +1 -1
- package/dist/esm/Pagination/Pagination.module.scss.esm.js +2 -2
- package/dist/esm/Popover/Popover.esm.js +4 -4
- package/dist/esm/Popover/Popover.esm.js.map +1 -1
- package/dist/esm/Popover/Popover.module.scss.esm.js +2 -2
- package/dist/esm/ProgressBar/ProgressBar.esm.js +10 -10
- package/dist/esm/ProgressBar/ProgressBar.esm.js.map +1 -1
- package/dist/esm/ProgressBar/ProgressBar.module.scss.esm.js +2 -2
- package/dist/esm/Skeleton/Skeleton.esm.js +3 -3
- package/dist/esm/Skeleton/Skeleton.esm.js.map +1 -1
- package/dist/esm/Skeleton/Skeleton.module.scss.esm.js +2 -2
- package/dist/esm/Spinner/Spinner.esm.js +4 -4
- package/dist/esm/Spinner/Spinner.esm.js.map +1 -1
- package/dist/esm/Spinner/Spinner.module.scss.esm.js +2 -2
- package/dist/esm/Stepper/Step.esm.js +10 -10
- package/dist/esm/Stepper/Step.esm.js.map +1 -1
- package/dist/esm/Stepper/Step.module.scss.esm.js +2 -2
- package/dist/esm/Stepper/Stepper.esm.js +2 -2
- package/dist/esm/Stepper/Stepper.esm.js.map +1 -1
- package/dist/esm/Stepper/Stepper.module.scss.esm.js +2 -2
- package/dist/esm/Tabs/Tab.esm.js +2 -2
- package/dist/esm/Tabs/Tab.esm.js.map +1 -1
- package/dist/esm/Tabs/Tab.module.scss.esm.js +2 -2
- package/dist/esm/Tabs/TabButton.esm.js +4 -4
- package/dist/esm/Tabs/TabButton.esm.js.map +1 -1
- package/dist/esm/Tabs/TabButton.module.scss.esm.js +2 -2
- package/dist/esm/Tabs/Tabs.esm.js +10 -10
- package/dist/esm/Tabs/Tabs.esm.js.map +1 -1
- package/dist/esm/Tabs/Tabs.module.scss.esm.js +2 -2
- package/dist/esm/Tag/RemoveButton.esm.js +4 -4
- package/dist/esm/Tag/RemoveButton.esm.js.map +1 -1
- package/dist/esm/Tag/RemoveButton.module.scss.esm.js +2 -2
- package/dist/esm/Tag/Tag.esm.js +7 -7
- package/dist/esm/Tag/Tag.esm.js.map +1 -1
- package/dist/esm/Tag/Tag.module.scss.esm.js +2 -2
- package/dist/esm/TextEllipsis/TextEllipsis.esm.js +4 -4
- package/dist/esm/TextEllipsis/TextEllipsis.esm.js.map +1 -1
- package/dist/esm/TextEllipsis/TextEllipsis.module.scss.esm.js +2 -2
- package/dist/esm/Tiles/Tile.esm.js +11 -11
- package/dist/esm/Tiles/Tile.esm.js.map +1 -1
- package/dist/esm/Tiles/Tile.module.scss.esm.js +2 -2
- package/dist/esm/Tiles/Tiles.esm.js +6 -6
- package/dist/esm/Tiles/Tiles.esm.js.map +1 -1
- package/dist/esm/Tiles/Tiles.module.scss.esm.js +2 -2
- package/dist/esm/Tooltip/Tooltip.esm.js +10 -10
- package/dist/esm/Tooltip/Tooltip.esm.js.map +1 -1
- package/dist/esm/Tooltip/Tooltip.module.scss.esm.js +2 -2
- package/dist/esm/Typography/Typography.esm.js +3 -3
- package/dist/esm/Typography/Typography.esm.js.map +1 -1
- package/dist/esm/Typography/Typography.module.scss.esm.js +2 -2
- package/dist/esm/_BaseStyling_/BaseStyling.esm.js +2 -2
- package/dist/esm/_BaseStyling_/BaseStyling.esm.js.map +1 -1
- package/dist/esm/admin/layout/LeftNav/LeftNav.esm.js +5 -5
- package/dist/esm/admin/layout/LeftNav/LeftNav.esm.js.map +1 -1
- package/dist/esm/admin/layout/LeftNav/LeftNav.module.scss.esm.js +2 -2
- package/dist/esm/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.esm.js +14 -12
- package/dist/esm/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.esm.js.map +1 -1
- package/dist/esm/admin/layout/LeftNav/LeftNavItem/LeftNavItem.esm.js +3 -3
- package/dist/esm/admin/layout/LeftNav/LeftNavItem/LeftNavItem.esm.js.map +1 -1
- package/dist/esm/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.esm.js +2 -2
- package/dist/esm/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.esm.js +14 -16
- package/dist/esm/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.esm.js.map +1 -1
- package/dist/esm/admin/layout/MicrofrontendContainer/MicrofrontendContainer.esm.js +4 -4
- package/dist/esm/admin/layout/MicrofrontendContainer/MicrofrontendContainer.esm.js.map +1 -1
- package/dist/esm/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.esm.js +2 -2
- package/dist/esm/miscellaneous/IdentityProviderButton.esm.js +4 -4
- package/dist/esm/miscellaneous/IdentityProviderButton.esm.js.map +1 -1
- package/dist/esm/miscellaneous/IdentityProviderButton.module.scss.esm.js +2 -2
- package/dist/esm/src/components/admin/layout/LeftNav/LeftNav.d.ts +1 -1
- package/dist/esm/src/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.d.ts +1 -1
- package/dist/esm/src/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.interface.d.ts +1 -1
- package/dist/esm/src/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.d.ts +2 -1
- package/dist/esm/src/hooks/useDebouncedCallback.esm.js +3 -3
- package/dist/esm/src/hooks/useDebouncedCallback.esm.js.map +1 -1
- package/dist/esm/src/hooks/useDetermineStatusIcon.esm.js +3 -3
- package/dist/esm/src/hooks/useDetermineStatusIcon.esm.js.map +1 -1
- package/dist/esm/src/hooks/useRepeater.esm.js +2 -2
- package/dist/esm/src/hooks/useRepeater.esm.js.map +1 -1
- package/dist/esm/src/hooks/useUploadFile.esm.js +1 -1
- package/dist/esm/src/hooks/useUploadFile.esm.js.map +1 -1
- package/dist/esm/src/index.d.ts +1 -0
- package/dist/esm/src/readyclasses.module.scss.esm.js +2 -2
- package/dist/esm/withReadOnly.esm.js +3 -3
- package/dist/esm/withReadOnly.esm.js.map +1 -1
- package/package.json +1 -3
- package/src/components/DataGrid/DataGrid.module.scss +1 -0
- package/src/components/Form/Checkbox/Checkbox.module.scss +11 -13
- package/src/components/Form/FileUpload/FileUpload.tsx +3 -1
- package/src/components/Form/Radio/Radio.module.scss +10 -12
- package/src/components/Form/Select/SingleSelect/Select.module.scss +1 -1
- package/src/components/Form/Select/SingleSelect/Select.tsx +1 -1
- package/src/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss +5 -5
- package/src/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.tsx +2 -0
- package/src/components/Form/Wrapper/Wrapper/Wrapper.module.scss +1 -1
- package/src/components/admin/layout/LeftNav/LeftNav.tsx +1 -1
- package/src/components/admin/layout/LeftNav/LeftNavItem/ButtonLeftNavItem.tsx +11 -7
- package/src/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.interface.ts +1 -1
- package/src/components/admin/layout/LeftNav/LeftNavItem/LinkLeftNavItem.tsx +12 -11
- package/src/hooks/useUploadFile.tsx +1 -1
- package/src/index.ts +1 -0
- package/dist/cjs/node_modules/@remix-run/router/dist/router.cjs.js +0 -12
- package/dist/cjs/node_modules/@remix-run/router/dist/router.cjs.js.map +0 -1
- package/dist/cjs/node_modules/react-router/dist/index.cjs.js +0 -12
- package/dist/cjs/node_modules/react-router/dist/index.cjs.js.map +0 -1
- package/dist/cjs/node_modules/react-router-dom/dist/index.cjs.js +0 -12
- package/dist/cjs/node_modules/react-router-dom/dist/index.cjs.js.map +0 -1
- package/dist/esm/node_modules/@remix-run/router/dist/router.esm.js +0 -373
- package/dist/esm/node_modules/@remix-run/router/dist/router.esm.js.map +0 -1
- package/dist/esm/node_modules/react-router/dist/index.esm.js +0 -328
- package/dist/esm/node_modules/react-router/dist/index.esm.js.map +0 -1
- package/dist/esm/node_modules/react-router-dom/dist/index.esm.js +0 -609
- package/dist/esm/node_modules/react-router-dom/dist/index.esm.js.map +0 -1
|
@@ -4,7 +4,7 @@ export interface Props extends ComponentPropsWithRef<"nav"> {
|
|
|
4
4
|
isSideMenuOpen?: boolean;
|
|
5
5
|
items: MenuItem[];
|
|
6
6
|
navigate: (path: string) => void;
|
|
7
|
-
onItemClick
|
|
7
|
+
onItemClick?: (path?: string, button?: boolean) => void;
|
|
8
8
|
marginTop?: string;
|
|
9
9
|
}
|
|
10
10
|
export declare const LeftNav: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
@@ -5,7 +5,7 @@ import { LeftNavItemProps } from "./LeftNavItem.interface";
|
|
|
5
5
|
export interface Props extends HTMLProps<HTMLElement> {
|
|
6
6
|
item: MenuItem;
|
|
7
7
|
navigate: (path: string) => void;
|
|
8
|
-
onItemClick
|
|
8
|
+
onItemClick?: (path?: string, button?: boolean) => void;
|
|
9
9
|
refItems: UseRefItemsReturnType;
|
|
10
10
|
NestedComponent: ForwardRefExoticComponent<LeftNavItemProps>;
|
|
11
11
|
closeParentList?: () => void;
|
|
@@ -4,7 +4,7 @@ import { UseRefItemsReturnType } from "../useRefItems";
|
|
|
4
4
|
export interface LeftNavItemProps extends HTMLProps<HTMLElement> {
|
|
5
5
|
item: MenuItem;
|
|
6
6
|
navigate: (path: string) => void;
|
|
7
|
-
onItemClick
|
|
7
|
+
onItemClick?: (path?: string, button?: boolean) => void;
|
|
8
8
|
refItems: UseRefItemsReturnType;
|
|
9
9
|
closeParentList?: () => void;
|
|
10
10
|
}
|
|
@@ -3,7 +3,8 @@ import { MenuItem } from "../LeftNav.interfaces";
|
|
|
3
3
|
import { UseRefItemsReturnType } from "../useRefItems";
|
|
4
4
|
export interface Props extends HTMLProps<HTMLElement> {
|
|
5
5
|
item: MenuItem;
|
|
6
|
-
|
|
6
|
+
navigate: (path: string) => void;
|
|
7
|
+
onItemClick?: (path?: string, button?: boolean) => void;
|
|
7
8
|
refItems: UseRefItemsReturnType;
|
|
8
9
|
closeParentList?: () => void;
|
|
9
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
* Copyright 2022 OneWelcome B.V.
|
|
@@ -17,10 +17,10 @@ import React__default from 'react';
|
|
|
17
17
|
*/
|
|
18
18
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types */
|
|
19
19
|
const useDebouncedCallback = (callback, delay, dependencies) => {
|
|
20
|
-
const timeout =
|
|
20
|
+
const timeout = React.useRef();
|
|
21
21
|
const comboDeps = dependencies ? [callback, delay, ...dependencies] : [callback, delay];
|
|
22
22
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
23
|
-
return
|
|
23
|
+
return React.useCallback((...args) => {
|
|
24
24
|
if (timeout.current != null) {
|
|
25
25
|
clearTimeout(timeout.current);
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDebouncedCallback.esm.js","sources":["../../../../../../src/hooks/useDebouncedCallback.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\n\n/* eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types */\nexport const useDebouncedCallback = (callback: Function, delay: number, dependencies?: any[]) => {\n const timeout = React.useRef<ReturnType<typeof setTimeout>>();\n const comboDeps = dependencies ? [callback, delay, ...dependencies] : [callback, delay];\n\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any */\n return React.useCallback((...args: any[]) => {\n if (timeout.current != null) {\n clearTimeout(timeout.current);\n }\n\n timeout.current = setTimeout(() => {\n callback(...args);\n }, delay);\n }, comboDeps);\n};\n"],"names":[
|
|
1
|
+
{"version":3,"file":"useDebouncedCallback.esm.js","sources":["../../../../../../src/hooks/useDebouncedCallback.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\n\n/* eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types */\nexport const useDebouncedCallback = (callback: Function, delay: number, dependencies?: any[]) => {\n const timeout = React.useRef<ReturnType<typeof setTimeout>>();\n const comboDeps = dependencies ? [callback, delay, ...dependencies] : [callback, delay];\n\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any */\n return React.useCallback((...args: any[]) => {\n if (timeout.current != null) {\n clearTimeout(timeout.current);\n }\n\n timeout.current = setTimeout(() => {\n callback(...args);\n }, delay);\n }, comboDeps);\n};\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;AAcG;AAIH;AACa,MAAA,oBAAoB,GAAG,CAAC,QAAkB,EAAE,KAAa,EAAE,YAAoB,KAAI;AAC9F,IAAA,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,EAAiC,CAAC;IAC9D,MAAM,SAAS,GAAG,YAAY,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;;IAGxF,OAAO,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,IAAW,KAAI;AAC1C,QAAA,IAAI,OAAO,CAAC,OAAO,IAAI,IAAI,EAAE;AAC3B,YAAA,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;SAC/B;AAED,QAAA,OAAO,CAAC,OAAO,GAAG,UAAU,CAAC,MAAK;AAChC,YAAA,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC;SACnB,EAAE,KAAK,CAAC,CAAC;KACX,EAAE,SAAS,CAAC,CAAC;AAChB;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
2
|
import { Icon, Icons } from '../../Icon/Icon.esm.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
@@ -22,10 +22,10 @@ const useDetermineStatusIcon = (params) => {
|
|
|
22
22
|
const errorRef = useRef(null);
|
|
23
23
|
const successRef = useRef(null);
|
|
24
24
|
if (error) {
|
|
25
|
-
icon =
|
|
25
|
+
icon = React.createElement(Icon, { ref: errorRef, "data-icon-status": "error", icon: Icons.Error });
|
|
26
26
|
}
|
|
27
27
|
else if (success) {
|
|
28
|
-
icon =
|
|
28
|
+
icon = React.createElement(Icon, { ref: successRef, "data-icon-status": "success", icon: Icons.CheckmarkCircleAlt });
|
|
29
29
|
}
|
|
30
30
|
return icon;
|
|
31
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDetermineStatusIcon.esm.js","sources":["../../../../../../src/hooks/useDetermineStatusIcon.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormElement } from \"../components/Form/form.interfaces\";\nimport React, { ReactElement, useRef } from \"react\";\nimport { Icon, Icons } from \"../components/Icon/Icon\";\nexport const useDetermineStatusIcon = (params: Partial<FormElement>): ReactElement | null => {\n const { error, success } = params || false;\n let icon = null;\n const errorRef = useRef(null);\n const successRef = useRef(null);\n\n if (error) {\n icon = <Icon ref={errorRef} data-icon-status=\"error\" icon={Icons.Error} />;\n } else if (success) {\n icon = <Icon ref={successRef} data-icon-status=\"success\" icon={Icons.CheckmarkCircleAlt} />;\n }\n\n return icon;\n};\n"],"names":[
|
|
1
|
+
{"version":3,"file":"useDetermineStatusIcon.esm.js","sources":["../../../../../../src/hooks/useDetermineStatusIcon.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormElement } from \"../components/Form/form.interfaces\";\nimport React, { ReactElement, useRef } from \"react\";\nimport { Icon, Icons } from \"../components/Icon/Icon\";\nexport const useDetermineStatusIcon = (params: Partial<FormElement>): ReactElement | null => {\n const { error, success } = params || false;\n let icon = null;\n const errorRef = useRef(null);\n const successRef = useRef(null);\n\n if (error) {\n icon = <Icon ref={errorRef} data-icon-status=\"error\" icon={Icons.Error} />;\n } else if (success) {\n icon = <Icon ref={successRef} data-icon-status=\"success\" icon={Icons.CheckmarkCircleAlt} />;\n }\n\n return icon;\n};\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;AAcG;AAKU,MAAA,sBAAsB,GAAG,CAAC,MAA4B,KAAyB;IAC1F,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,KAAK,CAAC;IAC3C,IAAI,IAAI,GAAG,IAAI,CAAC;AAChB,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AAC9B,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAEhC,IAAI,KAAK,EAAE;AACT,QAAA,IAAI,GAAG,KAAC,CAAA,aAAA,CAAA,IAAI,EAAC,EAAA,GAAG,EAAE,QAAQ,EAAA,kBAAA,EAAmB,OAAO,EAAC,IAAI,EAAE,KAAK,CAAC,KAAK,GAAI,CAAC;KAC5E;SAAM,IAAI,OAAO,EAAE;AAClB,QAAA,IAAI,GAAG,KAAC,CAAA,aAAA,CAAA,IAAI,EAAC,EAAA,GAAG,EAAE,UAAU,EAAA,kBAAA,EAAmB,SAAS,EAAC,IAAI,EAAE,KAAK,CAAC,kBAAkB,GAAI,CAAC;KAC7F;AAED,IAAA,OAAO,IAAI,CAAC;AACd;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { generateID } from '../util/helper.esm.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
@@ -22,7 +22,7 @@ const useRepeater = ({ componentToRepeat }) => {
|
|
|
22
22
|
repeat();
|
|
23
23
|
}, []);
|
|
24
24
|
const repeat = () => {
|
|
25
|
-
const clonedComponent =
|
|
25
|
+
const clonedComponent = React.cloneElement(componentToRepeat, { key: generateID(20) });
|
|
26
26
|
setRepeatedComponents(prevState => [...prevState, clonedComponent]);
|
|
27
27
|
};
|
|
28
28
|
const remove = (componentToRemove) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRepeater.esm.js","sources":["../../../../../../src/hooks/useRepeater.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useEffect, useState, JSX } from \"react\";\nimport { generateID } from \"../util/helper\";\n\ninterface Arguments {\n componentToRepeat: React.ReactElement;\n}\n\nexport const useRepeater = <T>({ componentToRepeat }: Arguments) => {\n const [repeatedComponents, setRepeatedComponents] = useState<JSX.Element[]>([]);\n\n useEffect(() => {\n repeat();\n }, []);\n\n const repeat = () => {\n const clonedComponent = React.cloneElement(componentToRepeat, { key: generateID(20) });\n\n setRepeatedComponents(prevState => [...prevState, clonedComponent]);\n };\n\n const remove = (componentToRemove: React.ReactElement<T>) => {\n const newRepeatedComponents = repeatedComponents.filter(\n component => component !== componentToRemove\n );\n\n setRepeatedComponents(newRepeatedComponents);\n };\n\n return {\n repeatedComponents,\n repeat,\n remove\n };\n};\n"],"names":[
|
|
1
|
+
{"version":3,"file":"useRepeater.esm.js","sources":["../../../../../../src/hooks/useRepeater.ts"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useEffect, useState, JSX } from \"react\";\nimport { generateID } from \"../util/helper\";\n\ninterface Arguments {\n componentToRepeat: React.ReactElement;\n}\n\nexport const useRepeater = <T>({ componentToRepeat }: Arguments) => {\n const [repeatedComponents, setRepeatedComponents] = useState<JSX.Element[]>([]);\n\n useEffect(() => {\n repeat();\n }, []);\n\n const repeat = () => {\n const clonedComponent = React.cloneElement(componentToRepeat, { key: generateID(20) });\n\n setRepeatedComponents(prevState => [...prevState, clonedComponent]);\n };\n\n const remove = (componentToRemove: React.ReactElement<T>) => {\n const newRepeatedComponents = repeatedComponents.filter(\n component => component !== componentToRemove\n );\n\n setRepeatedComponents(newRepeatedComponents);\n };\n\n return {\n repeatedComponents,\n repeat,\n remove\n };\n};\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;AAcG;MASU,WAAW,GAAG,CAAI,EAAE,iBAAiB,EAAa,KAAI;IACjE,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,CAAgB,EAAE,CAAC,CAAC;IAEhF,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,EAAE,CAAC;KACV,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,MAAM,GAAG,MAAK;AAClB,QAAA,MAAM,eAAe,GAAG,KAAK,CAAC,YAAY,CAAC,iBAAiB,EAAE,EAAE,GAAG,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAEvF,QAAA,qBAAqB,CAAC,SAAS,IAAI,CAAC,GAAG,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC;AACtE,KAAC,CAAC;AAEF,IAAA,MAAM,MAAM,GAAG,CAAC,iBAAwC,KAAI;AAC1D,QAAA,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,MAAM,CACrD,SAAS,IAAI,SAAS,KAAK,iBAAiB,CAC7C,CAAC;QAEF,qBAAqB,CAAC,qBAAqB,CAAC,CAAC;AAC/C,KAAC,CAAC;IAEF,OAAO;QACL,kBAAkB;QAClB,MAAM;QACN,MAAM;KACP,CAAC;AACJ;;;;"}
|
|
@@ -67,7 +67,7 @@ const useUploadFile = (files, request, callbacks) => {
|
|
|
67
67
|
const updatedList = getUpdatedList(fileName, fileStatus, undefined, error);
|
|
68
68
|
setUpdatedFiles(updatedList);
|
|
69
69
|
const response = { fileList: updatedList, status, responseJson };
|
|
70
|
-
setUploadingFiles(prevState => prevState.filter(selected => selected.name
|
|
70
|
+
setUploadingFiles(prevState => prevState.filter(selected => selected.name !== fileName));
|
|
71
71
|
onComplete === null || onComplete === void 0 ? void 0 : onComplete(response);
|
|
72
72
|
}
|
|
73
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUploadFile.esm.js","sources":["../../../../../../src/hooks/useUploadFile.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FileType } from \"../components/Form/FileUpload/FileUpload\";\nimport { useEffect, useState } from \"react\";\nimport { isJsonString } from \"../util/helper\";\n\nexport type UploadResponseStatus = XMLHttpRequest[\"status\"];\nexport type UploadResponseJson = Record<string, unknown>;\nexport interface UploadResponseType {\n fileList: FileType[];\n status: UploadResponseStatus;\n responseJson: UploadResponseJson;\n}\nexport interface OnErrorMessageMapperType {\n responseStatus: UploadResponseStatus;\n responseJson: UploadResponseJson;\n}\nexport interface UseUploadFileCallback {\n onComplete?: (response: UploadResponseType) => void;\n onProgress?: (fileName: string, progress: number) => void;\n onErrorMessageMapper?: (args: OnErrorMessageMapperType) => string | undefined;\n}\nexport interface UploadFileRequestParams {\n url: string;\n headers?: Headers;\n withCredentials?: boolean;\n}\n\nexport const useUploadFile = (\n files: FileType[],\n request: UploadFileRequestParams,\n callbacks?: UseUploadFileCallback\n) => {\n const { url, headers, withCredentials } = request;\n\n const { onComplete, onProgress, onErrorMessageMapper } = callbacks ?? {};\n\n const [uploadingFiles, setUploadingFiles] = useState<FileType[]>([]);\n const [updatedFiles, setUpdatedFiles] = useState<FileType[]>([...files]);\n\n const getUpdatedList = (\n fileName: string,\n fileStatus: FileType[\"status\"],\n progress?: number,\n error?: string\n ) => {\n return files.map(file => {\n if (file.name === fileName) {\n file.progress = progress;\n file.error = error;\n file.status = fileStatus;\n }\n return { ...file };\n });\n };\n\n const recordProgress = (e: ProgressEvent<XMLHttpRequestEventTarget>, fileName: string) => {\n const progress = (e.loaded / e.total) * 100;\n const updatedData = getUpdatedList(fileName, \"uploading\", progress);\n setUpdatedFiles(updatedData);\n onProgress?.(fileName, progress);\n };\n\n const getFileStatus = (\n responseStatus: UploadResponseStatus,\n responseJson: UploadResponseJson\n ) => {\n let fileStatus: FileType[\"status\"] = undefined;\n let error = \"\";\n if (responseStatus >= 200 && responseStatus < 400) {\n fileStatus = \"completed\";\n } else if (responseStatus === 0) {\n fileStatus = \"retry\";\n error =\n onErrorMessageMapper?.({ responseStatus, responseJson }) ??\n \"Network error. Check internet connection and retry uploading the file\";\n } else if (responseStatus >= 400 && responseStatus < 500) {\n fileStatus = \"error\";\n error = onErrorMessageMapper?.({ responseStatus, responseJson }) ?? \"Bad request\";\n } else if (responseStatus >= 500) {\n fileStatus = \"error\";\n error = onErrorMessageMapper?.({ responseStatus, responseJson }) ?? \"Server Error\";\n }\n return { fileStatus, error };\n };\n\n const handleOnComplete = (xhr: XMLHttpRequest, fileName: string) => {\n const { status, readyState, responseText } = xhr;\n if (readyState === xhr.DONE) {\n const responseJson = responseText && isJsonString(responseText) && JSON.parse(responseText);\n const { fileStatus, error } = getFileStatus(status, responseJson);\n const updatedList = getUpdatedList(fileName, fileStatus, undefined, error);\n setUpdatedFiles(updatedList);\n const response = { fileList: updatedList, status, responseJson };\n setUploadingFiles(prevState => prevState.filter(selected => selected.name
|
|
1
|
+
{"version":3,"file":"useUploadFile.esm.js","sources":["../../../../../../src/hooks/useUploadFile.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FileType } from \"../components/Form/FileUpload/FileUpload\";\nimport { useEffect, useState } from \"react\";\nimport { isJsonString } from \"../util/helper\";\n\nexport type UploadResponseStatus = XMLHttpRequest[\"status\"];\nexport type UploadResponseJson = Record<string, unknown>;\nexport interface UploadResponseType {\n fileList: FileType[];\n status: UploadResponseStatus;\n responseJson: UploadResponseJson;\n}\nexport interface OnErrorMessageMapperType {\n responseStatus: UploadResponseStatus;\n responseJson: UploadResponseJson;\n}\nexport interface UseUploadFileCallback {\n onComplete?: (response: UploadResponseType) => void;\n onProgress?: (fileName: string, progress: number) => void;\n onErrorMessageMapper?: (args: OnErrorMessageMapperType) => string | undefined;\n}\nexport interface UploadFileRequestParams {\n url: string;\n headers?: Headers;\n withCredentials?: boolean;\n}\n\nexport const useUploadFile = (\n files: FileType[],\n request: UploadFileRequestParams,\n callbacks?: UseUploadFileCallback\n) => {\n const { url, headers, withCredentials } = request;\n\n const { onComplete, onProgress, onErrorMessageMapper } = callbacks ?? {};\n\n const [uploadingFiles, setUploadingFiles] = useState<FileType[]>([]);\n const [updatedFiles, setUpdatedFiles] = useState<FileType[]>([...files]);\n\n const getUpdatedList = (\n fileName: string,\n fileStatus: FileType[\"status\"],\n progress?: number,\n error?: string\n ) => {\n return files.map(file => {\n if (file.name === fileName) {\n file.progress = progress;\n file.error = error;\n file.status = fileStatus;\n }\n return { ...file };\n });\n };\n\n const recordProgress = (e: ProgressEvent<XMLHttpRequestEventTarget>, fileName: string) => {\n const progress = (e.loaded / e.total) * 100;\n const updatedData = getUpdatedList(fileName, \"uploading\", progress);\n setUpdatedFiles(updatedData);\n onProgress?.(fileName, progress);\n };\n\n const getFileStatus = (\n responseStatus: UploadResponseStatus,\n responseJson: UploadResponseJson\n ) => {\n let fileStatus: FileType[\"status\"] = undefined;\n let error = \"\";\n if (responseStatus >= 200 && responseStatus < 400) {\n fileStatus = \"completed\";\n } else if (responseStatus === 0) {\n fileStatus = \"retry\";\n error =\n onErrorMessageMapper?.({ responseStatus, responseJson }) ??\n \"Network error. Check internet connection and retry uploading the file\";\n } else if (responseStatus >= 400 && responseStatus < 500) {\n fileStatus = \"error\";\n error = onErrorMessageMapper?.({ responseStatus, responseJson }) ?? \"Bad request\";\n } else if (responseStatus >= 500) {\n fileStatus = \"error\";\n error = onErrorMessageMapper?.({ responseStatus, responseJson }) ?? \"Server Error\";\n }\n return { fileStatus, error };\n };\n\n const handleOnComplete = (xhr: XMLHttpRequest, fileName: string) => {\n const { status, readyState, responseText } = xhr;\n if (readyState === xhr.DONE) {\n const responseJson = responseText && isJsonString(responseText) && JSON.parse(responseText);\n const { fileStatus, error } = getFileStatus(status, responseJson);\n const updatedList = getUpdatedList(fileName, fileStatus, undefined, error);\n setUpdatedFiles(updatedList);\n const response = { fileList: updatedList, status, responseJson };\n setUploadingFiles(prevState => prevState.filter(selected => selected.name !== fileName));\n onComplete?.(response);\n }\n };\n\n const uploadFile = (file: FileType) => {\n const xhr = new XMLHttpRequest();\n xhr.upload.addEventListener(\"progress\", e => recordProgress(e, file.name));\n xhr.addEventListener(\"readystatechange\", () => handleOnComplete(xhr, file.name));\n withCredentials && (xhr.withCredentials = true);\n xhr.open(\"POST\", url, true);\n headers?.forEach((value, key) => xhr.setRequestHeader(key, value));\n const formData = new FormData();\n formData.append(\"file\", file.data as File);\n formData.append(\"name\", file.name);\n xhr.send(formData);\n };\n\n useEffect(() => {\n if (!url || !files.length) {\n return;\n }\n\n files.forEach(file => {\n if (!file.status && !uploadingFiles.find(selected => selected.name === file.name)) {\n setUploadingFiles(prevState => [...prevState, file]);\n uploadFile(file);\n }\n });\n }, [url, files]);\n\n return { updatedFiles, setUpdatedFiles, uploadingFiles };\n};\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;AAcG;AA4BU,MAAA,aAAa,GAAG,CAC3B,KAAiB,EACjB,OAAgC,EAChC,SAAiC,KAC/B;IACF,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC;AAElD,IAAA,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,oBAAoB,EAAE,GAAG,SAAS,aAAT,SAAS,KAAA,KAAA,CAAA,GAAT,SAAS,GAAI,EAAE,CAAC;IAEzE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAa,EAAE,CAAC,CAAC;AACrE,IAAA,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAa,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IAEzE,MAAM,cAAc,GAAG,CACrB,QAAgB,EAChB,UAA8B,EAC9B,QAAiB,EACjB,KAAc,KACZ;AACF,QAAA,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,IAAG;AACtB,YAAA,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;AAC1B,gBAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACzB,gBAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACnB,gBAAA,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;aAC1B;AACD,YAAA,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;AACrB,SAAC,CAAC,CAAC;AACL,KAAC,CAAC;AAEF,IAAA,MAAM,cAAc,GAAG,CAAC,CAA2C,EAAE,QAAgB,KAAI;AACvF,QAAA,MAAM,QAAQ,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC;QAC5C,MAAM,W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AI,CAAC,CAAC;aAClB;AACH,SAAC,CAAC,CAAC;AACL,KAAC,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAEjB,IAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC;AAC3D;;;;"}
|
package/dist/esm/src/index.d.ts
CHANGED
|
@@ -158,6 +158,7 @@ export { MicrofrontendContainer } from "./components/admin/layout/MicrofrontendC
|
|
|
158
158
|
export type { Props as MicrofrontendContainerProps } from "./components/admin/layout/MicrofrontendContainer/MicrofrontendContainer";
|
|
159
159
|
export { LeftNav } from "./components/admin/layout/LeftNav/LeftNav";
|
|
160
160
|
export type { Props as LeftNavProps } from "./components/admin/layout/LeftNav/LeftNav";
|
|
161
|
+
export type { MenuItem as LeftNavMenuItem } from "./components/admin/layout/LeftNav/LeftNav.interfaces";
|
|
161
162
|
/**
|
|
162
163
|
* Miscellaneous
|
|
163
164
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../node_modules/style-inject/dist/style-inject.es.esm.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.readyclasses_sr-
|
|
4
|
-
var readyclasses = {"sr-only":"readyclasses_sr-
|
|
3
|
+
var css_248z = "/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.readyclasses_sr-only_rE09l{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.readyclasses_hidden_rE09l{display:none}.readyclasses_slide-in_rE09l{animation:readyclasses_slide-in_rE09l .5s forwards}@media (prefers-reduced-motion:reduce){.readyclasses_slide-in_rE09l{animation-duration:.1ms}}.readyclasses_slide-out_rE09l{animation:readyclasses_slide-out_rE09l .5s forwards}@media (prefers-reduced-motion:reduce){.readyclasses_slide-out_rE09l{animation-duration:.1ms}}@keyframes readyclasses_slide-in_rE09l{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes readyclasses_slide-out_rE09l{0%{transform:translateY(0)}to{transform:translateY(100vh)}}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlYWR5Y2xhc3Nlcy5tb2R1bGUuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7RUFjRSxDQUNGLDRCQU9FLGtCQUFzQixDQUN0QixRQUFTLENBTFQsVUFBVyxDQUVYLFdBQVksQ0FDWixlQUFnQixDQUZoQixTQUFVLENBSFYsaUJBQWtCLENBQ2xCLFNBT0YsQ0FFQSwyQkFDRSxZQUNGLENBRUEsNkJBQ0Usa0RBQ0YsQ0FDQSx1Q0FDRSw2QkFDRSx1QkFDRixDQUNGLENBRUEsOEJBQ0UsbURBQ0YsQ0FDQSx1Q0FDRSw4QkFDRSx1QkFDRixDQUNGLENBRUEsdUNBQ0UsR0FDRSwyQkFDRixDQUNBLEdBQ0UsdUJBQ0YsQ0FDRixDQUNBLHdDQUNFLEdBQ0UsdUJBQ0YsQ0FDQSxHQUNFLDJCQUNGLENBQ0YiLCJmaWxlIjoicmVhZH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ByZWN0KDAsIDAsIDAsIDApO1xuICBib3JkZXI6IDA7XG59XG5cbi5oaWRkZW4ge1xuICBkaXNwbGF5OiBub25lO1xufVxuXG4uc2xpZGUtaW4ge1xuICBhbmltYXRpb246IHNsaWRlLWluIDAuNXMgZm9yd2FyZHM7XG59XG5AbWVkaWEgKHByZWZlcnMtcmVkdWNlZC1tb3Rpb246IHJlZHVjZSkge1xuICAuc2xpZGUtaW4ge1xuICAgIGFuaW1hdGlvbi1kdXJhdGlvbjogMC4xbXM7XG4gIH1cbn1cblxuLnNsaWRlLW91dCB7XG4gIGFuaW1hdGlvbjogc2xpZGUtb3V0IDAuNXMgZm9yd2FyZHM7XG59XG5AbWVkaWEgKHByZWZlcnMtcmVkdWNlZC1tb3Rpb246IHJlZHVjZSkge1xuICAuc2xpZGUtb3V0IHtcbiAgICBhbmltYXRpb24tZHVyYXRpb246IDAuMW1zO1xuICB9XG59XG5cbkBrZXlmcmFtZXMgc2xpZGUtaW4ge1xuICAwJSB7XG4gICAgdHJhbnNmb3JtOiB0cmFuc2xhdGVZKDEwMHZoKTtcbiAgfVxuICAxMDAlIHtcbiAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoMCUpO1xuICB9XG59XG5Aa2V5ZnJhbWVzIHNsaWRlLW91dCB7XG4gIDAlIHtcbiAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoMCUpO1xuICB9XG4gIDEwMCUge1xuICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgxMDB2aCk7XG4gIH1cbn0iXX0= */";
|
|
4
|
+
var readyclasses = {"sr-only":"readyclasses_sr-only_rE09l","hidden":"readyclasses_hidden_rE09l","slide-in":"readyclasses_slide-in_rE09l","slide-out":"readyclasses_slide-out_rE09l"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { readyclasses as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
* Copyright 2022 OneWelcome B.V.
|
|
@@ -58,9 +58,9 @@ const withReadOnly = (WrappedComponent) => {
|
|
|
58
58
|
}
|
|
59
59
|
return {};
|
|
60
60
|
};
|
|
61
|
-
const WithReadOnlyComponent =
|
|
61
|
+
const WithReadOnlyComponent = React.forwardRef((props, ref) => {
|
|
62
62
|
const { readOnlyView = false, required, children, helperText, type = "", ...restProps } = props;
|
|
63
|
-
return (
|
|
63
|
+
return (React.createElement(WrappedComponent, { ref: ref, ...restProps, "data-readonlyview": readOnlyView, "aria-readonly": readOnlyView, required: readOnlyView ? false : required, ...getConditionalProps(readOnlyView, type, helperText), ...preventKeyUpAndKeyDownHandlerForSpecificComponents(readOnlyView) }, children));
|
|
64
64
|
});
|
|
65
65
|
WithReadOnlyComponent.displayName = `withReadOnly_${getDisplayName(WrappedComponent)}`;
|
|
66
66
|
return WithReadOnlyComponent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withReadOnly.esm.js","sources":["../../../../src/components/withReadOnly.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ComponentType, ForwardedRef, PropsWithChildren } from \"react\";\n\nexport interface WithReadOnlyProps {\n readOnlyView?: boolean;\n required?: boolean;\n helperText?: string;\n type?: string;\n}\n\nconst componentsWithKeyEventsToPrevent: string[] = [\"CheckboxWrapper\"];\n\nconst getDisplayName = <P,>(WrappedComponent: ComponentType<P>) => {\n return WrappedComponent.displayName ?? WrappedComponent.name ?? \"Component\";\n};\n\nconst getConditionalProps = (readOnlyView: boolean, type: string, helperText?: string) => {\n const props: Record<string, unknown> = {};\n\n if (readOnlyView) {\n props.style = { pointerEvents: \"none\", userSelect: \"text\" };\n if (helperText) {\n props.helperText = \"\";\n }\n } else {\n props.helperText = helperText;\n }\n\n if (type) {\n props.type = type;\n }\n\n return props;\n};\n\nexport const withReadOnly = <P extends object>(WrappedComponent: ComponentType<P>) => {\n const preventKeyUpAndKeyDownHandlerForSpecificComponents = (readOnlyView: boolean) => {\n const preventSubmissionKeys = (e: KeyboardEvent) => {\n const isEnterOrSpace = (e: KeyboardEvent) => e.key === \"Enter\" || e.key === \" \";\n if (isEnterOrSpace(e)) {\n e.stopPropagation();\n e.preventDefault();\n }\n };\n\n if (\n readOnlyView &&\n componentsWithKeyEventsToPrevent.includes(\n WrappedComponent.displayName || WrappedComponent.name\n )\n ) {\n const props: Record<string, unknown> = {};\n\n props.onKeyUp = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n props.onKeyDown = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n return props;\n }\n\n return {};\n };\n\n const WithReadOnlyComponent = React.forwardRef(\n (props: PropsWithChildren<P & WithReadOnlyProps>, ref: ForwardedRef<unknown>) => {\n const {\n readOnlyView = false,\n required,\n children,\n helperText,\n type = \"\",\n ...restProps\n } = props;\n\n return (\n <WrappedComponent\n ref={ref}\n {...(restProps as P)}\n data-readonlyview={readOnlyView}\n aria-readonly={readOnlyView}\n required={readOnlyView ? false : required}\n {...getConditionalProps(readOnlyView, type, helperText)}\n {...preventKeyUpAndKeyDownHandlerForSpecificComponents(readOnlyView)}\n >\n {children}\n </WrappedComponent>\n );\n }\n );\n\n WithReadOnlyComponent.displayName = `withReadOnly_${getDisplayName(WrappedComponent)}`;\n return WithReadOnlyComponent;\n};\n"],"names":[
|
|
1
|
+
{"version":3,"file":"withReadOnly.esm.js","sources":["../../../../src/components/withReadOnly.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ComponentType, ForwardedRef, PropsWithChildren } from \"react\";\n\nexport interface WithReadOnlyProps {\n readOnlyView?: boolean;\n required?: boolean;\n helperText?: string;\n type?: string;\n}\n\nconst componentsWithKeyEventsToPrevent: string[] = [\"CheckboxWrapper\"];\n\nconst getDisplayName = <P,>(WrappedComponent: ComponentType<P>) => {\n return WrappedComponent.displayName ?? WrappedComponent.name ?? \"Component\";\n};\n\nconst getConditionalProps = (readOnlyView: boolean, type: string, helperText?: string) => {\n const props: Record<string, unknown> = {};\n\n if (readOnlyView) {\n props.style = { pointerEvents: \"none\", userSelect: \"text\" };\n if (helperText) {\n props.helperText = \"\";\n }\n } else {\n props.helperText = helperText;\n }\n\n if (type) {\n props.type = type;\n }\n\n return props;\n};\n\nexport const withReadOnly = <P extends object>(WrappedComponent: ComponentType<P>) => {\n const preventKeyUpAndKeyDownHandlerForSpecificComponents = (readOnlyView: boolean) => {\n const preventSubmissionKeys = (e: KeyboardEvent) => {\n const isEnterOrSpace = (e: KeyboardEvent) => e.key === \"Enter\" || e.key === \" \";\n if (isEnterOrSpace(e)) {\n e.stopPropagation();\n e.preventDefault();\n }\n };\n\n if (\n readOnlyView &&\n componentsWithKeyEventsToPrevent.includes(\n WrappedComponent.displayName || WrappedComponent.name\n )\n ) {\n const props: Record<string, unknown> = {};\n\n props.onKeyUp = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n props.onKeyDown = (e: KeyboardEvent) => {\n preventSubmissionKeys(e);\n };\n\n return props;\n }\n\n return {};\n };\n\n const WithReadOnlyComponent = React.forwardRef(\n (props: PropsWithChildren<P & WithReadOnlyProps>, ref: ForwardedRef<unknown>) => {\n const {\n readOnlyView = false,\n required,\n children,\n helperText,\n type = \"\",\n ...restProps\n } = props;\n\n return (\n <WrappedComponent\n ref={ref}\n {...(restProps as P)}\n data-readonlyview={readOnlyView}\n aria-readonly={readOnlyView}\n required={readOnlyView ? false : required}\n {...getConditionalProps(readOnlyView, type, helperText)}\n {...preventKeyUpAndKeyDownHandlerForSpecificComponents(readOnlyView)}\n >\n {children}\n </WrappedComponent>\n );\n }\n );\n\n WithReadOnlyComponent.displayName = `withReadOnly_${getDisplayName(WrappedComponent)}`;\n return WithReadOnlyComponent;\n};\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;AAcG;AAWH,MAAM,gCAAgC,GAAa,CAAC,iBAAiB,CAAC,CAAC;AAEvE,MAAM,cAAc,GAAG,CAAK,gBAAkC,KAAI;;IAChE,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,gBAAgB,CAAC,WAAW,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,gBAAgB,CAAC,IAAI,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,WAAW,CAAC;AAC9E,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,YAAqB,EAAE,IAAY,EAAE,UAAmB,KAAI;IACvF,MAAM,KAAK,GAA4B,EAAE,CAAC;IAE1C,IAAI,YAAY,EAAE;AAChB,QAAA,KAAK,CAAC,KAAK,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;QAC5D,IAAI,UAAU,EAAE;AACd,YAAA,KAAK,CAAC,UAAU,GAAG,EAAE,CAAC;SACvB;KACF;SAAM;AACL,QAAA,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;KAC/B;IAED,IAAI,IAAI,EAAE;AACR,QAAA,KAAK,CAAC,IAAI,GAAG,IAA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AAG,EACH,GAAA,SAAe,uBACD,YAAY,EAAA,eAAA,EAChB,YAAY,EAC3B,QAAQ,EAAE,YAAY,GAAG,KAAK,GAAG,QAAQ,EACrC,GAAA,mBAAmB,CAAC,YAAY,EAAE,IAAI,EAAE,UAAU,CAAC,EACnD,GAAA,kDAAkD,CAAC,YAAY,CAAC,IAEnE,QAAQ,CACQ,EACnB;AACJ,KAAC,CACF,CAAC;IAEF,qBAAqB,CAAC,WAAW,GAAG,CAAA,aAAA,EAAgB,cAAc,CAAC,gBAAgB,CAAC,CAAA,CAAE,CAAC;AACvF,IAAA,OAAO,qBAAqB,CAAC;AAC/B;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"homepage": "http://onewelcome.github.io/react-lib-components",
|
|
3
3
|
"name": "@onewelcome/react-lib-components",
|
|
4
|
-
"version": "8.12.
|
|
4
|
+
"version": "8.12.2",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "OneWelcome B.V.",
|
|
7
7
|
"main": "dist/cjs/src/index.cjs.js",
|
|
@@ -91,8 +91,6 @@
|
|
|
91
91
|
"@types/mdx": "^2.0.13",
|
|
92
92
|
"@types/react": "^18.3.3",
|
|
93
93
|
"@types/react-dom": "^18.3.0",
|
|
94
|
-
"@types/react-router": "^5.1.20",
|
|
95
|
-
"@types/react-router-dom": "^5.3.3",
|
|
96
94
|
"@typescript-eslint/eslint-plugin": "^7.15.0",
|
|
97
95
|
"@typescript-eslint/parser": "^7.15.0",
|
|
98
96
|
"babel-loader": "^9.1.3",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
color: var(--color-primary);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
[data-readonlyview="true"] {
|
|
140
|
+
[data-readonlyview="true"] .checkbox-wrapper {
|
|
141
141
|
& label {
|
|
142
142
|
border-color: var(--read-only-border-color);
|
|
143
143
|
color: var(--read-only-text-color);
|
|
@@ -145,19 +145,17 @@
|
|
|
145
145
|
user-select: text;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
&
|
|
149
|
-
|
|
150
|
-
color: var(--color-blue-grey100);
|
|
148
|
+
& span {
|
|
149
|
+
color: var(--color-blue-grey100);
|
|
151
150
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
&.checkmark {
|
|
152
|
+
background-color: var(--color-blue-grey900);
|
|
153
|
+
color: var(--color-white);
|
|
154
|
+
border-radius: 2px;
|
|
155
|
+
&:before {
|
|
156
|
+
outline: 1px solid var(--read-only-border-color);
|
|
155
157
|
border-radius: 2px;
|
|
156
|
-
|
|
157
|
-
outline: 1px solid var(--read-only-border-color);
|
|
158
|
-
border-radius: 2px;
|
|
159
|
-
outline-offset: -1px;
|
|
160
|
-
}
|
|
158
|
+
outline-offset: -1px;
|
|
161
159
|
}
|
|
162
160
|
}
|
|
163
161
|
}
|
|
@@ -167,7 +165,7 @@
|
|
|
167
165
|
}
|
|
168
166
|
}
|
|
169
167
|
|
|
170
|
-
input[type="checkbox"] {
|
|
168
|
+
.checkbox-container input[type="checkbox"] {
|
|
171
169
|
&[data-readonlyview="true"] {
|
|
172
170
|
& ~ span {
|
|
173
171
|
&:before {
|
|
@@ -151,10 +151,12 @@ const FileUploadComponent: ForwardRefRenderFunction<HTMLInputElement, Props> = (
|
|
|
151
151
|
e.stopPropagation();
|
|
152
152
|
const files = getFileList(e.target.files);
|
|
153
153
|
const isFileValid = files.length && verifyExtensionValidity(files[files.length - 1]);
|
|
154
|
+
|
|
154
155
|
if (isFileValid) {
|
|
155
156
|
setErrorMsg("");
|
|
157
|
+
e.target.value = "";
|
|
158
|
+
onChange?.(files);
|
|
156
159
|
}
|
|
157
|
-
isFileValid && onChange?.(files);
|
|
158
160
|
};
|
|
159
161
|
|
|
160
162
|
const verifyExtensionValidity = (file: FileType) => {
|
|
@@ -146,19 +146,17 @@
|
|
|
146
146
|
pointer-events: none;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
[data-readonlyview="true"] {
|
|
150
|
-
|
|
151
|
-
color: var(--read-only-text-color);
|
|
149
|
+
[data-readonlyview="true"] .radio-wrapper {
|
|
150
|
+
color: var(--read-only-text-color);
|
|
152
151
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
& span.input {
|
|
153
|
+
color: var(--read-only-text-color);
|
|
154
|
+
cursor: not-allowed;
|
|
156
155
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
156
|
+
&:before {
|
|
157
|
+
outline: 1px solid var(--read-only-border-color);
|
|
158
|
+
outline-offset: -1px;
|
|
159
|
+
border-radius: 50%;
|
|
162
160
|
}
|
|
163
161
|
}
|
|
164
162
|
|
|
@@ -167,7 +165,7 @@
|
|
|
167
165
|
}
|
|
168
166
|
}
|
|
169
167
|
|
|
170
|
-
input[type="radio"] {
|
|
168
|
+
.radio-container input[type="radio"] {
|
|
171
169
|
&[data-readonlyview="true"] {
|
|
172
170
|
& ~ span.input {
|
|
173
171
|
color: var(--read-only-text-color);
|
|
@@ -223,7 +223,7 @@ const SelectComponent: ForwardRefRenderFunction<HTMLSelectElement, SingleSelectP
|
|
|
223
223
|
|
|
224
224
|
/** The native select is purely for external form libraries. We use it to emit an onChange with native select event object so they know exactly what's happening. */
|
|
225
225
|
return (
|
|
226
|
-
<div ref={myElementRef}>
|
|
226
|
+
<div ref={myElementRef} className={classes["root"]}>
|
|
227
227
|
<select
|
|
228
228
|
{...filterProps(rest, /^data-/, false)}
|
|
229
229
|
tabIndex={-1}
|
|
@@ -55,11 +55,7 @@
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.
|
|
59
|
-
margin-top: 0.14rem;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
[data-readonlyview="true"] {
|
|
58
|
+
.wrapper[data-readonlyview="true"] {
|
|
63
59
|
& ~ span.error {
|
|
64
60
|
background-color: var(--color-white);
|
|
65
61
|
}
|
|
@@ -97,3 +93,7 @@
|
|
|
97
93
|
}
|
|
98
94
|
}
|
|
99
95
|
}
|
|
96
|
+
|
|
97
|
+
.textarea-helper-text {
|
|
98
|
+
margin-top: 0.14rem;
|
|
99
|
+
}
|
|
@@ -56,6 +56,7 @@ const TextareaWrapperComponent: ForwardRefRenderFunction<HTMLDivElement, Props>
|
|
|
56
56
|
onMouseLeave,
|
|
57
57
|
disabled,
|
|
58
58
|
success,
|
|
59
|
+
className,
|
|
59
60
|
...rest
|
|
60
61
|
}: Props,
|
|
61
62
|
ref
|
|
@@ -127,6 +128,7 @@ const TextareaWrapperComponent: ForwardRefRenderFunction<HTMLDivElement, Props>
|
|
|
127
128
|
<Wrapper
|
|
128
129
|
{...rest}
|
|
129
130
|
ref={ref}
|
|
131
|
+
className={`${classes["wrapper"]} ${className ?? ""}`}
|
|
130
132
|
disabled={disabled}
|
|
131
133
|
labelProps={{
|
|
132
134
|
id: labelId,
|
|
@@ -29,7 +29,7 @@ export interface Props extends ComponentPropsWithRef<"nav"> {
|
|
|
29
29
|
isSideMenuOpen?: boolean;
|
|
30
30
|
items: MenuItem[];
|
|
31
31
|
navigate: (path: string) => void;
|
|
32
|
-
onItemClick
|
|
32
|
+
onItemClick?: (path?: string, button?: boolean) => void;
|
|
33
33
|
marginTop?: string;
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -24,7 +24,6 @@ import React, {
|
|
|
24
24
|
useState
|
|
25
25
|
} from "react";
|
|
26
26
|
import classes from "./LeftNavItem.module.scss";
|
|
27
|
-
import { Link as RouterLink } from "react-router-dom";
|
|
28
27
|
import { MenuItem } from "../LeftNav.interfaces";
|
|
29
28
|
import { Icon, Icons } from "../../../../Icon/Icon";
|
|
30
29
|
import { useKeyboardNavigation } from "./useKeyboardNavigation";
|
|
@@ -34,7 +33,7 @@ import { LeftNavItemProps } from "./LeftNavItem.interface";
|
|
|
34
33
|
export interface Props extends HTMLProps<HTMLElement> {
|
|
35
34
|
item: MenuItem;
|
|
36
35
|
navigate: (path: string) => void;
|
|
37
|
-
onItemClick
|
|
36
|
+
onItemClick?: (path?: string, button?: boolean) => void;
|
|
38
37
|
refItems: UseRefItemsReturnType;
|
|
39
38
|
NestedComponent: ForwardRefExoticComponent<LeftNavItemProps>;
|
|
40
39
|
closeParentList?: () => void;
|
|
@@ -55,10 +54,14 @@ const ButtonLeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, Props> =
|
|
|
55
54
|
if (!isChevronIcon && item.path && !item.disabled) {
|
|
56
55
|
event.preventDefault();
|
|
57
56
|
navigate(item.path);
|
|
58
|
-
onItemClick(item.path, true);
|
|
57
|
+
onItemClick?.(item.path, true);
|
|
59
58
|
}
|
|
60
59
|
};
|
|
61
60
|
|
|
61
|
+
const onLinkClickHandler = (event: MouseEvent<HTMLAnchorElement>) => {
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
};
|
|
64
|
+
|
|
62
65
|
const onExpandIconClickHandler = () => {
|
|
63
66
|
setExpanded(expanded => !expanded);
|
|
64
67
|
};
|
|
@@ -93,7 +96,7 @@ const ButtonLeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, Props> =
|
|
|
93
96
|
<li className={buttonWrapperClasses.join(" ")} data-testid={item.key}>
|
|
94
97
|
<button
|
|
95
98
|
aria-controls={item.key}
|
|
96
|
-
data-testid={`
|
|
99
|
+
data-testid={`left-nav-item-${item.key}`}
|
|
97
100
|
aria-expanded={expanded}
|
|
98
101
|
ref={ref as Ref<HTMLButtonElement>}
|
|
99
102
|
onKeyDown={onKeyPressNavigation}
|
|
@@ -106,14 +109,15 @@ const ButtonLeftNavItemComponent: ForwardRefRenderFunction<HTMLElement, Props> =
|
|
|
106
109
|
{item.iconComponent &&
|
|
107
110
|
React.cloneElement(item.iconComponent, { className: classes["menu-item-icon"] })}
|
|
108
111
|
{item.path ? (
|
|
109
|
-
<
|
|
110
|
-
|
|
112
|
+
<a
|
|
113
|
+
href={item.path}
|
|
111
114
|
aria-current={item.active ? "page" : false}
|
|
112
115
|
className={classes["menu-item-text"]}
|
|
116
|
+
onClick={onLinkClickHandler}
|
|
113
117
|
tabIndex={-1}
|
|
114
118
|
>
|
|
115
119
|
{item.title}
|
|
116
|
-
</
|
|
120
|
+
</a>
|
|
117
121
|
) : (
|
|
118
122
|
<span className={classes["menu-item-text"]}>{item.title}</span>
|
|
119
123
|
)}
|
|
@@ -21,7 +21,7 @@ import { UseRefItemsReturnType } from "../useRefItems";
|
|
|
21
21
|
export interface LeftNavItemProps extends HTMLProps<HTMLElement> {
|
|
22
22
|
item: MenuItem;
|
|
23
23
|
navigate: (path: string) => void;
|
|
24
|
-
onItemClick
|
|
24
|
+
onItemClick?: (path?: string, button?: boolean) => void;
|
|
25
25
|
refItems: UseRefItemsReturnType;
|
|
26
26
|
closeParentList?: () => void;
|
|
27
27
|
}
|