@onewelcome/react-lib-components 8.9.1 → 8.10.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/Breadcrumbs/Breadcrumbs.cjs.js +1 -1
- package/dist/cjs/Breadcrumbs/Breadcrumbs.cjs.js.map +1 -1
- package/dist/cjs/Breadcrumbs/Breadcrumbs.module.scss.cjs.js +1 -1
- package/dist/cjs/Button/BaseButton.cjs.js.map +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.cjs.js +1 -1
- package/dist/cjs/ContextMenu/ContextMenuItem.cjs.js.map +1 -1
- package/dist/cjs/ContextMenu/ContextMenuItem.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGrid.cjs.js.map +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.cjs.js.map +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridBody.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.cjs.js.map +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.cjs.js.map +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.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.cjs.js.map +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.cjs.js.map +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.cjs.js.map +1 -1
- package/dist/cjs/Form/Fieldset/Fieldset.module.scss.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.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.cjs.js.map +1 -1
- package/dist/cjs/Form/Radio/Radio.module.scss.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.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/MultiSelect/useSearch.cjs.js.map +1 -1
- 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.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.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.cjs.js.map +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.cjs.js.map +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/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.cjs.js.map +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.cjs.js.map +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.cjs.js.map +1 -1
- package/dist/cjs/Tabs/Tab.module.scss.cjs.js +1 -1
- package/dist/cjs/Tabs/TabButton.cjs.js +1 -1
- package/dist/cjs/Tabs/TabButton.cjs.js.map +1 -1
- package/dist/cjs/Tabs/TabButton.module.scss.cjs.js +1 -1
- package/dist/cjs/Tabs/Tabs.cjs.js.map +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.cjs.js.map +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.cjs.js.map +1 -1
- package/dist/cjs/Tooltip/Tooltip.module.scss.cjs.js +1 -1
- package/dist/cjs/Typography/Typography.cjs.js +1 -1
- package/dist/cjs/Typography/Typography.cjs.js.map +1 -1
- package/dist/cjs/Typography/Typography.module.scss.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/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.cjs.js +1 -1
- package/dist/cjs/miscellaneous/IdentityProviderButton.cjs.js +1 -1
- package/dist/cjs/miscellaneous/IdentityProviderButton.cjs.js.map +1 -1
- package/dist/cjs/miscellaneous/IdentityProviderButton.module.scss.cjs.js +1 -1
- package/dist/cjs/src/components/DataGrid/DataGrid.d.ts +1 -1
- package/dist/cjs/src/components/DataGrid/DataGridBody/DataGridBody.d.ts +1 -1
- package/dist/cjs/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.d.ts +1 -1
- package/dist/cjs/src/components/Form/Checkbox/Checkbox.d.ts +1 -1
- package/dist/cjs/src/components/Form/Fieldset/Fieldset.d.ts +1 -1
- package/dist/cjs/src/components/Form/FileUpload/FileItem/FileItem.d.ts +1 -1
- package/dist/cjs/src/components/Form/FileUpload/FileUpload.d.ts +1 -1
- package/dist/cjs/src/components/Form/Input/Input.d.ts +1 -1
- package/dist/cjs/src/components/Form/Radio/Radio.d.ts +1 -1
- package/dist/cjs/src/components/Form/Select/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/cjs/src/components/Form/Select/SingleSelect/Select.d.ts +1 -1
- package/dist/cjs/src/components/Form/Textarea/Textarea.d.ts +1 -1
- package/dist/cjs/src/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.d.ts +1 -1
- package/dist/cjs/src/components/Form/Wrapper/InputWrapper/InputWrapper.d.ts +1 -1
- package/dist/cjs/src/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.d.ts +1 -1
- package/dist/cjs/src/components/Form/Wrapper/RadioWrapper/RadioWrapper.d.ts +1 -1
- package/dist/cjs/src/components/Form/Wrapper/SelectWrapper/SelectWrapper.d.ts +1 -1
- package/dist/cjs/src/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.d.ts +1 -1
- package/dist/cjs/src/components/Typography/Typography.d.ts +1 -1
- package/dist/cjs/src/components/_BaseStyling_/BaseStyling.d.ts +8 -2
- package/dist/cjs/src/components/miscellaneous/IdentityProviderButton.d.ts +1 -0
- package/dist/cjs/src/components/withReadOnly.d.ts +1 -1
- package/dist/cjs/src/hooks/useDebouncedCallback.cjs.js.map +1 -1
- package/dist/cjs/src/hooks/useRepeatFocus.cjs.js.map +1 -1
- package/dist/cjs/src/index.d.ts +1 -1
- package/dist/cjs/src/readyclasses.module.scss.cjs.js +1 -1
- 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 -2
- package/dist/cjs/withReadOnly.cjs.js.map +1 -1
- package/dist/esm/Breadcrumbs/Breadcrumbs.esm.js +1 -1
- 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 +2 -1
- 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.module.scss.esm.js +2 -2
- package/dist/esm/Button/IconButton.module.scss.esm.js +2 -2
- package/dist/esm/ContextMenu/ContextMenu.module.scss.esm.js +2 -2
- package/dist/esm/ContextMenu/ContextMenuItem.esm.js +1 -1
- 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.map +1 -1
- package/dist/esm/DataGrid/DataGrid.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridActions/DataGridActions.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.esm.js +2 -2
- 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 +3 -2
- 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.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.esm.js +2 -2
- 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/DataGridFilters/DataGridFilter.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridFilters/DataGridToolbar.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.esm.js +2 -2
- 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.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.esm.js +2 -2
- package/dist/esm/DatePicker/DatePicker.esm.js +1 -1
- 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.module.scss.esm.js +2 -2
- package/dist/esm/Form/Fieldset/Fieldset.esm.js +4 -3
- 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 +1 -1
- 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 +5 -5
- 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.module.scss.esm.js +2 -2
- package/dist/esm/Form/FormControl/FormControl.module.scss.esm.js +2 -2
- package/dist/esm/Form/FormGroup/FormGroup.module.scss.esm.js +2 -2
- package/dist/esm/Form/FormHelperText/FormHelperText.module.scss.esm.js +2 -2
- package/dist/esm/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Input/Input.module.scss.esm.js +2 -2
- package/dist/esm/Form/Label/Label.module.scss.esm.js +2 -2
- package/dist/esm/Form/Radio/Radio.esm.js +1 -0
- 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 +1 -1
- package/dist/esm/Form/Select/MultiSelect/MultiOption.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.module.scss.esm.js +2 -2
- package/dist/esm/Form/Select/MultiSelect/SelectedOptions.module.scss.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 +1 -1
- package/dist/esm/Form/Select/SingleSelect/Option.esm.js.map +1 -1
- package/dist/esm/Form/Select/SingleSelect/Select.module.scss.esm.js +2 -2
- package/dist/esm/Form/Select/useAddNewBtn.module.scss.esm.js +2 -2
- package/dist/esm/Form/Textarea/Textarea.module.scss.esm.js +2 -2
- package/dist/esm/Form/Toggle/Toggle.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/InputWrapper/InputWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/Wrapper/Wrapper.module.scss.esm.js +2 -2
- package/dist/esm/Icon/Icon.module.scss.esm.js +2 -2
- package/dist/esm/Layout/ContentHeader/ContentHeader.module.scss.esm.js +2 -2
- package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.esm.js +2 -2
- package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.esm.js +2 -2
- package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.esm.js +2 -2
- 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.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Alert/AlertItem/AlertItem.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Banner/Banner.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/BaseModal/BaseModal.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Dialog/Dialog.module.scss.esm.js +2 -2
- 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.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.esm.js.map +1 -1
- package/dist/esm/Notifications/SideSheet/SideSheet.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/SlideInModal/SlideInModal.module.scss.esm.js +2 -2
- package/dist/esm/Pagination/Pagination.esm.js +2 -1
- 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.module.scss.esm.js +2 -2
- package/dist/esm/ProgressBar/ProgressBar.module.scss.esm.js +2 -2
- package/dist/esm/Skeleton/Skeleton.module.scss.esm.js +2 -2
- package/dist/esm/Spinner/Spinner.module.scss.esm.js +2 -2
- package/dist/esm/Stepper/Step.module.scss.esm.js +2 -2
- package/dist/esm/Stepper/Stepper.module.scss.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 +1 -1
- 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 +4 -2
- 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.module.scss.esm.js +2 -2
- 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.module.scss.esm.js +2 -2
- package/dist/esm/Tiles/Tile.module.scss.esm.js +2 -2
- package/dist/esm/Tiles/Tiles.module.scss.esm.js +2 -2
- package/dist/esm/Tooltip/Tooltip.esm.js +2 -1
- 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 +1 -1
- 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 +13 -6
- package/dist/esm/_BaseStyling_/BaseStyling.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 +3 -3
- 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/DataGrid/DataGrid.d.ts +1 -1
- package/dist/esm/src/components/DataGrid/DataGridBody/DataGridBody.d.ts +1 -1
- package/dist/esm/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.d.ts +1 -1
- package/dist/esm/src/components/Form/Checkbox/Checkbox.d.ts +1 -1
- package/dist/esm/src/components/Form/Fieldset/Fieldset.d.ts +1 -1
- package/dist/esm/src/components/Form/FileUpload/FileItem/FileItem.d.ts +1 -1
- package/dist/esm/src/components/Form/FileUpload/FileUpload.d.ts +1 -1
- package/dist/esm/src/components/Form/Input/Input.d.ts +1 -1
- package/dist/esm/src/components/Form/Radio/Radio.d.ts +1 -1
- package/dist/esm/src/components/Form/Select/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/esm/src/components/Form/Select/SingleSelect/Select.d.ts +1 -1
- package/dist/esm/src/components/Form/Textarea/Textarea.d.ts +1 -1
- package/dist/esm/src/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.d.ts +1 -1
- package/dist/esm/src/components/Form/Wrapper/InputWrapper/InputWrapper.d.ts +1 -1
- package/dist/esm/src/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.d.ts +1 -1
- package/dist/esm/src/components/Form/Wrapper/RadioWrapper/RadioWrapper.d.ts +1 -1
- package/dist/esm/src/components/Form/Wrapper/SelectWrapper/SelectWrapper.d.ts +1 -1
- package/dist/esm/src/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.d.ts +1 -1
- package/dist/esm/src/components/Typography/Typography.d.ts +1 -1
- package/dist/esm/src/components/_BaseStyling_/BaseStyling.d.ts +8 -2
- package/dist/esm/src/components/miscellaneous/IdentityProviderButton.d.ts +1 -0
- package/dist/esm/src/components/withReadOnly.d.ts +1 -1
- package/dist/esm/src/hooks/useDebouncedCallback.esm.js +2 -0
- package/dist/esm/src/hooks/useDebouncedCallback.esm.js.map +1 -1
- package/dist/esm/src/hooks/useRepeatFocus.esm.js +6 -3
- package/dist/esm/src/hooks/useRepeatFocus.esm.js.map +1 -1
- package/dist/esm/src/index.d.ts +1 -1
- package/dist/esm/src/readyclasses.module.scss.esm.js +2 -2
- package/dist/esm/src/util/helper.d.ts +1 -2
- package/dist/esm/src/util/helper.esm.js +7 -6
- package/dist/esm/src/util/helper.esm.js.map +1 -1
- package/dist/esm/withReadOnly.esm.js.map +1 -1
- package/package.json +11 -12
- package/src/_functions.scss +19 -0
- package/src/components/Breadcrumbs/Breadcrumbs.module.scss +1 -1
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
- package/src/components/Button/BaseButton.tsx +2 -1
- package/src/components/Button/Button.module.scss +3 -2
- package/src/components/Button/IconButton.module.scss +10 -9
- package/src/components/ContextMenu/ContextMenuItem.module.scss +2 -2
- package/src/components/ContextMenu/ContextMenuItem.tsx +1 -1
- package/src/components/DataGrid/DataGrid.tsx +2 -2
- package/src/components/DataGrid/DataGridBody/DataGridBody.tsx +2 -2
- package/src/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.tsx +4 -2
- package/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss +3 -2
- package/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.tsx +1 -1
- package/src/components/DataGrid/DataGridFilters/DataGridFilter.module.scss +2 -1
- package/src/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss +9 -7
- package/src/components/DataGrid/DataGridHeader/DataGridHeader.tsx +1 -1
- package/src/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss +1 -1
- package/src/components/DatePicker/DatePicker.module.scss +10 -6
- package/src/components/DatePicker/DatePicker.tsx +2 -1
- package/src/components/Form/Checkbox/Checkbox.module.scss +9 -6
- package/src/components/Form/Fieldset/Fieldset.tsx +4 -3
- package/src/components/Form/FileUpload/FileItem/FileItem.module.scss +7 -7
- package/src/components/Form/FileUpload/FileItem/FileItem.tsx +1 -1
- package/src/components/Form/FileUpload/FileUpload.module.scss +2 -2
- package/src/components/Form/FileUpload/FileUpload.tsx +6 -5
- package/src/components/Form/FormGroup/FormGroup.module.scss +2 -2
- package/src/components/Form/FormSection/FormSection.module.scss +1 -1
- package/src/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss +3 -1
- package/src/components/Form/Input/Input.module.scss +5 -4
- package/src/components/Form/Radio/Radio.module.scss +11 -9
- package/src/components/Form/Radio/Radio.tsx +1 -0
- package/src/components/Form/Select/MultiSelect/MultiOption.tsx +1 -1
- package/src/components/Form/Select/MultiSelect/MultiSelect.module.scss +7 -5
- package/src/components/Form/Select/MultiSelect/useSearch.tsx +1 -0
- package/src/components/Form/Select/SingleSelect/Option.tsx +1 -1
- package/src/components/Form/Select/SingleSelect/Select.module.scss +6 -5
- package/src/components/Form/Select/useAddNewBtn.module.scss +2 -1
- package/src/components/Form/Textarea/Textarea.module.scss +4 -4
- package/src/components/Form/Toggle/Toggle.module.scss +11 -10
- package/src/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss +3 -1
- package/src/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss +2 -2
- package/src/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss +1 -1
- package/src/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss +1 -1
- package/src/components/Icon/Icon.module.scss +1 -1
- package/src/components/Layout/ContentHeader/ContentHeader.module.scss +1 -1
- package/src/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss +1 -1
- package/src/components/Link/Link.tsx +1 -0
- package/src/components/Notifications/Alert/AlertItem/AlertItem.module.scss +9 -9
- package/src/components/Notifications/Banner/Banner.module.scss +1 -1
- package/src/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss +2 -2
- package/src/components/Notifications/Dialog/DialogActions/DialogActions.tsx +1 -0
- package/src/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss +1 -1
- package/src/components/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.tsx +3 -0
- package/src/components/Notifications/SideSheet/SideSheet.module.scss +2 -1
- package/src/components/Pagination/Pagination.module.scss +7 -5
- package/src/components/Pagination/Pagination.tsx +3 -1
- package/src/components/Tabs/Tab.tsx +1 -0
- package/src/components/Tabs/TabButton.module.scss +5 -3
- package/src/components/Tabs/TabButton.tsx +1 -1
- package/src/components/Tabs/Tabs.tsx +6 -2
- package/src/components/Tag/RemoveButton.module.scss +1 -1
- package/src/components/Tag/Tag.module.scss +1 -3
- package/src/components/Tag/Tag.tsx +1 -1
- package/src/components/Tooltip/Tooltip.module.scss +4 -4
- package/src/components/Tooltip/Tooltip.tsx +3 -1
- package/src/components/Typography/Typography.module.scss +1 -1
- package/src/components/Typography/Typography.tsx +3 -2
- package/src/components/_BaseStyling_/BaseStyling.tsx +21 -7
- package/src/components/miscellaneous/IdentityProviderButton.tsx +4 -1
- package/src/components/withReadOnly.tsx +3 -3
- package/src/hooks/useDebouncedCallback.tsx +2 -0
- package/src/hooks/useRepeatFocus.tsx +9 -3
- package/src/index.ts +4 -1
- package/src/mixins.module.scss +1 -1
- package/src/util/helper.tsx +12 -8
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* and make sure to add it to the shouldBeColorPicker array!
|
|
4
4
|
*/
|
|
5
5
|
import React, { HTMLAttributes, ReactElement } from "react";
|
|
6
|
-
interface CSSProperties {
|
|
6
|
+
export interface CSSProperties {
|
|
7
7
|
colorFocus?: string;
|
|
8
8
|
colorPrimary?: string;
|
|
9
9
|
colorSuccess?: string;
|
|
@@ -95,14 +95,17 @@ interface CSSProperties {
|
|
|
95
95
|
inputHelperTextColor?: string;
|
|
96
96
|
inputHoverBackgroundColor?: string;
|
|
97
97
|
inputDisabledBackgroundColor?: string;
|
|
98
|
+
inputFontSize?: string;
|
|
98
99
|
dragBorderStyle?: string;
|
|
99
100
|
modalShadowColor?: string;
|
|
100
101
|
modalBackgroundColor?: string;
|
|
101
102
|
modalBackdropColor?: string;
|
|
103
|
+
modalContentFontSize?: string;
|
|
102
104
|
sideSheetShadowColorOne?: string;
|
|
103
105
|
sideSheetShadowColorTwo?: string;
|
|
104
106
|
skeletonBackgroundColor?: string;
|
|
105
107
|
skeletonAnimationColorRgb?: string;
|
|
108
|
+
alertFontSize?: string;
|
|
106
109
|
alertTextColor?: string;
|
|
107
110
|
alertTextInvertedColor?: string;
|
|
108
111
|
alertNeutralBackgroundColor?: string;
|
|
@@ -163,6 +166,7 @@ interface CSSProperties {
|
|
|
163
166
|
tooltipBackgroundColor?: string;
|
|
164
167
|
contextMenuHoverColor?: string;
|
|
165
168
|
contextMenuPressedColor?: string;
|
|
169
|
+
contextMenuFontSize?: string;
|
|
166
170
|
default?: string;
|
|
167
171
|
success?: string;
|
|
168
172
|
error?: string;
|
|
@@ -181,6 +185,8 @@ interface CSSProperties {
|
|
|
181
185
|
fontSizeH3?: string;
|
|
182
186
|
fontSizeH4?: string;
|
|
183
187
|
fontSizeSub?: string;
|
|
188
|
+
fontSizeSmall?: string;
|
|
189
|
+
fontSizeBig?: string;
|
|
184
190
|
fontSizeCode?: string;
|
|
185
191
|
formControlFontSize?: string;
|
|
186
192
|
fileUploadBorderWidth?: string;
|
|
@@ -188,10 +194,10 @@ interface CSSProperties {
|
|
|
188
194
|
fontSizeDataGrid?: string;
|
|
189
195
|
readOnlyBorderColor?: string;
|
|
190
196
|
readOnlyTextColor?: string;
|
|
197
|
+
iconFontBig?: string;
|
|
191
198
|
}
|
|
192
199
|
export interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
193
200
|
children?: ReactElement[] | ReactElement | string[] | string | number[] | number;
|
|
194
201
|
properties?: CSSProperties;
|
|
195
202
|
}
|
|
196
203
|
export declare const BaseStyling: ({ children, properties }: Props) => React.JSX.Element;
|
|
197
|
-
export {};
|
|
@@ -13,5 +13,6 @@ export interface Props extends Omit<ComponentPropsWithRef<"button">, "color"> {
|
|
|
13
13
|
imgAltText?: string;
|
|
14
14
|
idpType: string;
|
|
15
15
|
customization?: SupportedCustomizationKeys;
|
|
16
|
+
loading?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare const IdentityProviderButton: ForwardRefRenderFunction<HTMLButtonElement, Props>;
|
|
@@ -5,4 +5,4 @@ export interface WithReadOnlyProps {
|
|
|
5
5
|
helperText?: string;
|
|
6
6
|
type?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const withReadOnly: <P extends object>(WrappedComponent: ComponentType<P>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<React.PropsWithChildren<P & WithReadOnlyProps>> & React.RefAttributes<
|
|
8
|
+
export declare const withReadOnly: <P extends object>(WrappedComponent: ComponentType<P>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<React.PropsWithChildren<P & WithReadOnlyProps>> & React.RefAttributes<unknown>>;
|
|
@@ -15,9 +15,11 @@ import React from 'react';
|
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types */
|
|
18
19
|
const useDebouncedCallback = (callback, delay, dependencies) => {
|
|
19
20
|
const timeout = React.useRef();
|
|
20
21
|
const comboDeps = dependencies ? [callback, delay, ...dependencies] : [callback, delay];
|
|
22
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
21
23
|
return React.useCallback((...args) => {
|
|
22
24
|
if (timeout.current != null) {
|
|
23
25
|
clearTimeout(timeout.current);
|
|
@@ -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\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 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;
|
|
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;;;;"}
|
|
@@ -44,15 +44,18 @@ const useRepeatFocus = (ref) => {
|
|
|
44
44
|
return null;
|
|
45
45
|
};
|
|
46
46
|
useEffect(() => {
|
|
47
|
-
if (!ref.current || !open)
|
|
47
|
+
if (!ref.current || !open) {
|
|
48
48
|
return;
|
|
49
|
+
}
|
|
49
50
|
const lastFocusableElement = getFocusableElement(ref.current, "last");
|
|
50
51
|
const firstFocusableElement = getFocusableElement(ref.current, "first");
|
|
51
|
-
if (!lastFocusableElement || !firstFocusableElement)
|
|
52
|
+
if (!lastFocusableElement || !firstFocusableElement) {
|
|
52
53
|
return;
|
|
54
|
+
}
|
|
53
55
|
const handleTabKeyPress = (event) => {
|
|
54
|
-
if (event.key !== "Tab")
|
|
56
|
+
if (event.key !== "Tab") {
|
|
55
57
|
return;
|
|
58
|
+
}
|
|
56
59
|
if (event.shiftKey) {
|
|
57
60
|
if (document.activeElement === firstFocusableElement) {
|
|
58
61
|
event.preventDefault();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRepeatFocus.esm.js","sources":["../../../../../../src/hooks/useRepeatFocus.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 { RefObject, useEffect } from \"react\";\n\n/**\n * @description This is a hook that will make sure that when a modal is open and the user tabs through the it,\n * the focus will be repeated and the user will not lose their entire focusable element to an element in the background\n * that is being blocked by the modal.\n */\n\nexport const useRepeatFocus = (ref: RefObject<HTMLDivElement>) => {\n const getFocusableElement = (\n element: HTMLElement,\n position: \"first\" | \"last\"\n ): HTMLElement | null => {\n const baseSelectors = [\n \"button\",\n \"[href]\",\n \"input\",\n \"select\",\n \"textarea\",\n \"[tabindex]\",\n \"[contenteditable]\"\n ];\n const focusableSelectors = baseSelectors\n .map(selector => `${selector}:not([tabindex=\"-1\"])`)\n .join(\", \");\n const focusableElements = element.querySelectorAll<HTMLElement>(focusableSelectors);\n\n if (position === \"first\") {\n return focusableElements[0] || null;\n } else if (position === \"last\") {\n return focusableElements[focusableElements.length - 1] || null;\n }\n\n return null;\n };\n\n useEffect(() => {\n if (!ref.current || !open) return;\n\n const lastFocusableElement = getFocusableElement(ref.current, \"last\");\n const firstFocusableElement = getFocusableElement(ref.current, \"first\");\n\n if (!lastFocusableElement || !firstFocusableElement) return;\n\n const handleTabKeyPress = (event: KeyboardEvent) => {\n if (event.key !== \"Tab\") return;\n\n if (event.shiftKey) {\n if (document.activeElement === firstFocusableElement) {\n event.preventDefault();\n lastFocusableElement?.focus();\n }\n } else if (document.activeElement === lastFocusableElement) {\n event.preventDefault();\n firstFocusableElement?.focus();\n }\n };\n\n lastFocusableElement.addEventListener(\"keydown\", handleTabKeyPress);\n firstFocusableElement.addEventListener(\"keydown\", handleTabKeyPress);\n\n return () => {\n lastFocusableElement.removeEventListener(\"keydown\", handleTabKeyPress);\n firstFocusableElement.removeEventListener(\"keydown\", handleTabKeyPress);\n };\n }, [ref, open]);\n};\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;AAcG;AAIH;;;;AAIG;AAEU,MAAA,cAAc,GAAG,CAAC,GAA8B,KAAI;AAC/D,IAAA,MAAM,mBAAmB,GAAG,CAC1B,OAAoB,EACpB,QAA0B,KACJ;AACtB,QAAA,MAAM,aAAa,GAAG;YACpB,QAAQ;YACR,QAAQ;YACR,OAAO;YACP,QAAQ;YACR,UAAU;YACV,YAAY;YACZ,mBAAmB;SACpB,CAAC;QACF,MAAM,kBAAkB,GAAG,aAAa;aACrC,GAAG,CAAC,QAAQ,IAAI,CAAG,EAAA,QAAQ,uBAAuB,CAAC;aACnD,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,MAAM,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAc,kBAAkB,CAAC,CAAC;AAEpF,QAAA,IAAI,QAAQ,KAAK,OAAO,EAAE;AACxB,YAAA,OAAO,iBAAiB,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;SACrC;AAAM,aAAA,IAAI,QAAQ,KAAK,MAAM,EAAE;YAC9B,OAAO,iBAAiB,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;SAChE;AAED,QAAA,OAAO,IAAI,CAAC;AACd,KAAC,CAAC;IAEF,SAAS,CAAC,MAAK;
|
|
1
|
+
{"version":3,"file":"useRepeatFocus.esm.js","sources":["../../../../../../src/hooks/useRepeatFocus.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 { RefObject, useEffect } from \"react\";\n\n/**\n * @description This is a hook that will make sure that when a modal is open and the user tabs through the it,\n * the focus will be repeated and the user will not lose their entire focusable element to an element in the background\n * that is being blocked by the modal.\n */\n\nexport const useRepeatFocus = (ref: RefObject<HTMLDivElement>) => {\n const getFocusableElement = (\n element: HTMLElement,\n position: \"first\" | \"last\"\n ): HTMLElement | null => {\n const baseSelectors = [\n \"button\",\n \"[href]\",\n \"input\",\n \"select\",\n \"textarea\",\n \"[tabindex]\",\n \"[contenteditable]\"\n ];\n const focusableSelectors = baseSelectors\n .map(selector => `${selector}:not([tabindex=\"-1\"])`)\n .join(\", \");\n const focusableElements = element.querySelectorAll<HTMLElement>(focusableSelectors);\n\n if (position === \"first\") {\n return focusableElements[0] || null;\n } else if (position === \"last\") {\n return focusableElements[focusableElements.length - 1] || null;\n }\n\n return null;\n };\n\n useEffect(() => {\n if (!ref.current || !open) {\n return;\n }\n\n const lastFocusableElement = getFocusableElement(ref.current, \"last\");\n const firstFocusableElement = getFocusableElement(ref.current, \"first\");\n\n if (!lastFocusableElement || !firstFocusableElement) {\n return;\n }\n\n const handleTabKeyPress = (event: KeyboardEvent) => {\n if (event.key !== \"Tab\") {\n return;\n }\n\n if (event.shiftKey) {\n if (document.activeElement === firstFocusableElement) {\n event.preventDefault();\n lastFocusableElement?.focus();\n }\n } else if (document.activeElement === lastFocusableElement) {\n event.preventDefault();\n firstFocusableElement?.focus();\n }\n };\n\n lastFocusableElement.addEventListener(\"keydown\", handleTabKeyPress);\n firstFocusableElement.addEventListener(\"keydown\", handleTabKeyPress);\n\n return () => {\n lastFocusableElement.removeEventListener(\"keydown\", handleTabKeyPress);\n firstFocusableElement.removeEventListener(\"keydown\", handleTabKeyPress);\n };\n }, [ref, open]);\n};\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;AAcG;AAIH;;;;AAIG;AAEU,MAAA,cAAc,GAAG,CAAC,GAA8B,KAAI;AAC/D,IAAA,MAAM,mBAAmB,GAAG,CAC1B,OAAoB,EACpB,QAA0B,KACJ;AACtB,QAAA,MAAM,aAAa,GAAG;YACpB,QAAQ;YACR,QAAQ;YACR,OAAO;YACP,QAAQ;YACR,UAAU;YACV,YAAY;YACZ,mBAAmB;SACpB,CAAC;QACF,MAAM,kBAAkB,GAAG,aAAa;aACrC,GAAG,CAAC,QAAQ,IAAI,CAAG,EAAA,QAAQ,uBAAuB,CAAC;aACnD,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,MAAM,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAc,kBAAkB,CAAC,CAAC;AAEpF,QAAA,IAAI,QAAQ,KAAK,OAAO,EAAE;AACxB,YAAA,OAAO,iBAAiB,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;SACrC;AAAM,aAAA,IAAI,QAAQ,KAAK,MAAM,EAAE;YAC9B,OAAO,iBAAiB,CAAC,iBAAiB,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YAAA,oBAAoB,CAAC,mBAAmB,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;AACvE,YAAA,qBAAqB,CAAC,mBAAmB,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;AAC1E,SAAC,CAAC;AACJ,KAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;AAClB;;;;"}
|
package/dist/esm/src/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BaseStyling } from "./components/_BaseStyling_/BaseStyling";
|
|
1
|
+
export { BaseStyling, CSSProperties as BaseStylingCSSProperties } from "./components/_BaseStyling_/BaseStyling";
|
|
2
2
|
export type { Props as BaseStylingProps } from "./components/_BaseStyling_/BaseStyling";
|
|
3
3
|
export { Button } from "./components/Button/Button";
|
|
4
4
|
export type { Props as ButtonProps } from "./components/Button/Button";
|
|
@@ -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_jzOEv{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.readyclasses_hidden_jzOEv{display:none}.readyclasses_slide-in_jzOEv{animation:readyclasses_slide-in_jzOEv .5s forwards}@media (prefers-reduced-motion:reduce){.readyclasses_slide-in_jzOEv{animation-duration:.1ms}}.readyclasses_slide-out_jzOEv{animation:readyclasses_slide-out_jzOEv .5s forwards}@media (prefers-reduced-motion:reduce){.readyclasses_slide-out_jzOEv{animation-duration:.1ms}}@keyframes readyclasses_slide-in_jzOEv{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes readyclasses_slide-out_jzOEv{0%{transform:translateY(0)}to{transform:translateY(100vh)}}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlYWR5Y2xhc3Nlcy5tb2R1bGUuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7RUFjRSxDQUNGLDRCQU9FLGtCQUFzQixDQUN0QixRQUFTLENBTFQsVUFBVyxDQUVYLFdBQVksQ0FDWixlQUFnQixDQUZoQixTQUFVLENBSFYsaUJBQWtCLENBQ2xCLFNBT0YsQ0FFQSwyQkFDRSxZQUNGLENBRUEsNkJBQ0Usa0RBQ0YsQ0FDQSx1Q0FDRSw2QkFDRSx1QkFDRixDQUNGLENBRUEsOEJBQ0UsbURBQ0YsQ0FDQSx1Q0FDRSw4QkFDRSx1QkFDRixDQUNGLENBRUEsdUNBQ0UsR0FDRSwyQkFDRixDQUNBLEdBQ0UsdUJBQ0YsQ0FDRixDQUNBLHdDQUNFLEdBQ0UsdUJBQ0YsQ0FDQSxHQUNFLDJCQUNGLENBQ0YiLCJmaWxlIjoicmVhZHljbGFzc2VzLm1vZHVsZS5zY3NzIiwic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kZXI6IDA7XG59XG5cbi5oaWRkZW4ge1xuICBkaXNwbGF5OiBub25lO1xufVxuXG4uc2xpZGUtaW4ge1xuICBhbmltYXRpb246IHNsaWRlLWluIDAuNXMgZm9yd2FyZHM7XG59XG5AbWVkaWEgKHByZWZlcnMtcmVkdWNlZC1tb3Rpb246IHJlZHVjZSkge1xuICAuc2xpZGUtaW4ge1xuICAgIGFuaW1hdGlvbi1kdXJhdGlvbjogMC4xbXM7XG4gIH1cbn1cblxuLnNsaWRlLW91dCB7XG4gIGFuaW1hdGlvbjogc2xpZGUtb3V0IDAuNXMgZm9yd2FyZHM7XG59XG5AbWVkaWEgKHByZWZlcnMtcmVkdWNlZC1tb3Rpb246IHJlZHVjZSkge1xuICAuc2xpZGUtb3V0IHtcbiAgICBhbmltYXRpb24tZHVyYXRpb246IDAuMW1zO1xuICB9XG59XG5cbkBrZXlmcmFtZXMgc2xpZGUtaW4ge1xuICAwJSB7XG4gICAgdHJhbnNmb3JtOiB0cmFuc2xhdGVZKDEwMHZoKTtcbiAgfVxuICAxMDAlIHtcbiAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoMCUpO1xuICB9XG59XG5Aa2V5ZnJhbWVzIHNsaWRlLW91dCB7XG4gIDAlIHtcbiAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoMCUpO1xuICB9XG4gIDEwMCUge1xuICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgxMDB2aCk7XG4gIH1cbn0iXX0= */";
|
|
4
|
+
var readyclasses = {"sr-only":"readyclasses_sr-only_jzOEv","hidden":"readyclasses_hidden_jzOEv","slide-in":"readyclasses_slide-in_jzOEv","slide-out":"readyclasses_slide-out_jzOEv"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { readyclasses as default };
|
|
@@ -2,7 +2,6 @@ export declare const generateID: (length?: number, stringToWeaveIn?: string) =>
|
|
|
2
2
|
export declare const filterProps: (props: any, regexPattern: RegExp, returnFiltered?: boolean) => {};
|
|
3
3
|
export declare const debounce: (fn: (...args: unknown[]) => unknown, delay: number) => (...args: unknown[]) => void;
|
|
4
4
|
export declare const throttle: (fn: (...args: unknown[]) => unknown, delay: number) => () => void;
|
|
5
|
-
export declare const isEqual: (x: any, y: any) => boolean;
|
|
6
5
|
export declare const areArraysDifferent: (arr1: Record<string, any>[], arr2: Record<string, any>[], key: string) => boolean;
|
|
7
6
|
/** Source: https://stackoverflow.com/a/42769683/5084110 */
|
|
8
7
|
export declare const remToPx: (rem: number) => number;
|
|
@@ -10,6 +9,6 @@ export declare const isJsonString: (str: any) => boolean;
|
|
|
10
9
|
type ObjectType = {
|
|
11
10
|
[key: string]: any;
|
|
12
11
|
};
|
|
13
|
-
export declare const deepMerge: <T extends
|
|
12
|
+
export declare const deepMerge: <T extends object>(obj1: ObjectType, obj2: ObjectType | false) => T;
|
|
14
13
|
export declare const escapeRegExp: (str: string) => string;
|
|
15
14
|
export {};
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
const generateID = (length = 15, stringToWeaveIn) => {
|
|
17
17
|
/** We will make sure to mesh the generate id and name property together to basically create a unique ID */
|
|
18
|
-
|
|
18
|
+
const hashCharacters = [
|
|
19
19
|
"1",
|
|
20
20
|
"2",
|
|
21
21
|
"3",
|
|
@@ -82,7 +82,7 @@ const generateID = (length = 15, stringToWeaveIn) => {
|
|
|
82
82
|
let id = "";
|
|
83
83
|
/** Generate an id of x characters in length */
|
|
84
84
|
for (let i = 0; i < length && id.length < length; i++) {
|
|
85
|
-
|
|
85
|
+
const stringCharacter = typeof stringToWeaveIn === "string" &&
|
|
86
86
|
(stringToWeaveIn === null || stringToWeaveIn === void 0 ? void 0 : stringToWeaveIn[i]) !== undefined &&
|
|
87
87
|
!/\s/.test(stringToWeaveIn[i])
|
|
88
88
|
? stringToWeaveIn[i]
|
|
@@ -120,7 +120,7 @@ const debounce = (fn, delay) => {
|
|
|
120
120
|
const throttle = (fn, delay) => {
|
|
121
121
|
let lastTime = 0;
|
|
122
122
|
return function () {
|
|
123
|
-
|
|
123
|
+
const now = Date.now();
|
|
124
124
|
if (now - lastTime >= delay) {
|
|
125
125
|
fn();
|
|
126
126
|
lastTime = now;
|
|
@@ -141,10 +141,11 @@ const isJsonString = (str) => {
|
|
|
141
141
|
return true;
|
|
142
142
|
};
|
|
143
143
|
const deepMerge = (obj1, obj2) => {
|
|
144
|
-
if (!obj2)
|
|
144
|
+
if (!obj2) {
|
|
145
145
|
return obj1;
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
}
|
|
147
|
+
const result = { ...obj1 };
|
|
148
|
+
for (const key in obj2) {
|
|
148
149
|
if (Object.prototype.hasOwnProperty.call(obj2, key)) {
|
|
149
150
|
if (typeof obj2[key] === "object" &&
|
|
150
151
|
obj2[key] !== null &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.esm.js","sources":["../../../../../../src/util/helper.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\ntype KeyValuePair = { [key: string]: unknown };\n\nexport const generateID = (length = 15, stringToWeaveIn?: string) => {\n /** We will make sure to mesh the generate id and name property together to basically create a unique ID */\n
|
|
1
|
+
{"version":3,"file":"helper.esm.js","sources":["../../../../../../src/util/helper.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\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\ntype KeyValuePair = { [key: string]: unknown };\n\nexport const generateID = (length = 15, stringToWeaveIn?: string) => {\n /** We will make sure to mesh the generate id and name property together to basically create a unique ID */\n const hashCharacters = [\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"7\",\n \"8\",\n \"9\",\n \"0\",\n \"A\",\n \"B\",\n \"C\",\n \"D\",\n \"E\",\n \"F\",\n \"G\",\n \"H\",\n \"I\",\n \"J\",\n \"K\",\n \"L\",\n \"M\",\n \"N\",\n \"O\",\n \"P\",\n \"Q\",\n \"R\",\n \"S\",\n \"T\",\n \"U\",\n \"V\",\n \"W\",\n \"X\",\n \"Y\",\n \"Z\",\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\",\n \"f\",\n \"g\",\n \"h\",\n \"i\",\n \"j\",\n \"k\",\n \"l\",\n \"m\",\n \"n\",\n \"o\",\n \"p\",\n \"q\",\n \"r\",\n \"s\",\n \"t\",\n \"u\",\n \"v\",\n \"w\",\n \"x\",\n \"y\",\n \"z\"\n ];\n\n let id = \"\";\n\n /** Generate an id of x characters in length */\n for (let i = 0; i < length && id.length < length; i++) {\n const stringCharacter =\n typeof stringToWeaveIn === \"string\" &&\n stringToWeaveIn?.[i] !== undefined &&\n !/\\s/.test(stringToWeaveIn[i])\n ? stringToWeaveIn[i]\n : \"\";\n id = id + stringCharacter + hashCharacters[Math.floor(Math.random() * hashCharacters.length)];\n }\n\n return id.slice(0, length);\n};\n\nexport const filterProps = (props: any, regexPattern: RegExp, returnFiltered: boolean = true) => {\n if (returnFiltered) {\n return Object.keys(props).reduce((acc: KeyValuePair, key) => {\n if (regexPattern.test(key)) {\n acc[key] = props[key];\n }\n\n return acc;\n }, {});\n } else {\n return Object.entries(props)\n .filter(([key]) => !regexPattern.test(key))\n .reduce(\n (prevObj, currKeyValPair) => ({ ...prevObj, [currKeyValPair[0]]: currKeyValPair[1] }),\n {}\n );\n }\n};\n\nexport const debounce = (fn: (...args: unknown[]) => unknown, delay: number) => {\n let timeout: undefined | ReturnType<typeof setTimeout>;\n\n return function executedFunction(...args: unknown[]) {\n const later = () => {\n clearTimeout(timeout);\n fn(...args);\n };\n\n clearTimeout(timeout);\n\n timeout = setTimeout(later, delay);\n };\n};\n\nexport const throttle = (fn: (...args: unknown[]) => unknown, delay: number) => {\n let lastTime = 0;\n\n return function () {\n const now = Date.now();\n\n if (now - lastTime >= delay) {\n fn();\n lastTime = now;\n }\n };\n};\n\nconst isEqual = (x: any, y: any): boolean => {\n const typesCoincide = x && y && typeof x === \"object\" && typeof y === \"object\";\n return typesCoincide\n ? Object.keys(x).length === Object.keys(y).length &&\n Object.keys(x).every(key => isEqual(x[key], y[key]))\n : x === y;\n};\n\nexport const areArraysDifferent = (\n arr1: Record<string, any>[],\n arr2: Record<string, any>[],\n key: string\n) => {\n if (arr1.length !== arr2.length) {\n return true;\n } else {\n const firstFilteredArray = arr1.filter(arr1Item =>\n arr2.some((arr2Item: { [x: string]: any }) => !isEqual(arr1Item[key], arr2Item[key]))\n );\n const secondFilteredArray = arr2.filter(arr2Item =>\n arr1.some((arr1Item: { [x: string]: any }) => !isEqual(arr1Item[key], arr2Item[key]))\n );\n\n return !!firstFilteredArray.length || !!secondFilteredArray.length;\n }\n};\n\n/** Source: https://stackoverflow.com/a/42769683/5084110 */\nexport const remToPx = (rem: number): number => {\n return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n};\n\nexport const isJsonString = (str: any) => {\n try {\n JSON.parse(str);\n } catch (e) {\n return false;\n }\n return true;\n};\n\ntype ObjectType = { [key: string]: any };\n\nexport const deepMerge = <T extends object>(obj1: ObjectType, obj2: ObjectType | false): T => {\n if (!obj2) {\n return obj1 as T;\n }\n\n const result: ObjectType = { ...obj1 };\n\n for (const key in obj2) {\n if (Object.prototype.hasOwnProperty.call(obj2, key)) {\n if (\n typeof obj2[key] === \"object\" &&\n obj2[key] !== null &&\n Object.prototype.hasOwnProperty.call(obj1, key) &&\n !Array.isArray(obj2[key])\n ) {\n result[key] = deepMerge(obj1[key], obj2[key]);\n } else {\n result[key] = obj2[key];\n }\n }\n }\n\n return result as T;\n};\n\nexport const escapeRegExp = (str: string) => str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;AAcG;AAMU,MAAA,UAAU,GAAG,CAAC,MAAM,GAAG,EAAE,EAAE,eAAwB,KAAI;;AAElE,IAAA,MAAM,cAAc,GAAG;QACrB,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;QACH,GAAG;KACJ,CAAC;IAEF,IAAI,EAAE,GAAG,EAAE,CAAC;;AAGZ,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,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MAIW,SAAS,GAAG,CAAmB,IAAgB,EAAE,IAAwB,KAAO;IAC3F,IAAI,CAAC,IAAI,EAAE;AACT,QAAA,OAAO,IAAS,CAAC;KAClB;AAED,IAAA,MAAM,MAAM,GAAe,EAAE,GAAG,IAAI,EAAE,CAAC;AAEvC,IAAA,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;AACtB,QAAA,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;AACnD,YAAA,IACE,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,QAAQ;AAC7B,gBAAA,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI;gBAClB,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC;gBAC/C,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EACzB;AACA,gBAAA,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;aAC/C;iBAAM;gBACL,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;aACzB;SACF;KACF;AAED,IAAA,OAAO,MAAW,CAAC;AACrB,EAAE;AAEW,MAAA,YAAY,GAAG,CAAC,GAAW,KAAK,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM;;;;"}
|
|
@@ -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,
|
|
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,MAA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,CAAC,CAAC,CAAC;AAC3B,aAAC,CAAC;AAEF,YAAA,KAAK,CAAC,SAAS,GAAG,CAAC,CAAgB,KAAI;gBACrC,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAC3B,aAAC,CAAC;AAEF,YAAA,OAAO,KAAK,CAAC;SACd;AAED,QAAA,OAAO,EAAE,CAAC;AACZ,KAAC,CAAC;IAEF,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAC5C,CAAC,KAA+C,EAAE,GAA0B,KAAI;QAC9E,MAAM,EACJ,YAAY,GAAG,KAAK,EACpB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,IAAI,GAAG,EAAE,EACT,GAAG,SAAS,EACb,GAAG,KAAK,CAAC;AAEV,QAAA,QACE,KAAC,CAAA,aAAA,CAAA,gBAAgB,IACf,GAAG,EAAE,GAAG,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.
|
|
4
|
+
"version": "8.10.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "OneWelcome B.V.",
|
|
7
7
|
"main": "dist/cjs/src/index.cjs.js",
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
"node": ">=16"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@babel/core": "^7.
|
|
61
|
-
"@babel/preset-env": "^7.
|
|
62
|
-
"@babel/preset-react": "^7.
|
|
63
|
-
"@babel/preset-typescript": "^7.
|
|
60
|
+
"@babel/core": "^7.26.9",
|
|
61
|
+
"@babel/preset-env": "^7.26.9",
|
|
62
|
+
"@babel/preset-react": "^7.26.3",
|
|
63
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
64
64
|
"@chromatic-com/storybook": "^1.6.0",
|
|
65
65
|
"@mdx-js/react": "^3.0.1",
|
|
66
|
-
"@onewelcome/eslint-config-shared-codestyle": "^9.
|
|
66
|
+
"@onewelcome/eslint-config-shared-codestyle": "^9.3.0",
|
|
67
67
|
"@onewelcome/storybook-addon-basestyling": "^2.0.0",
|
|
68
68
|
"@rollup/plugin-commonjs": "^28.0.1",
|
|
69
69
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
@@ -97,9 +97,8 @@
|
|
|
97
97
|
"babel-loader": "^9.1.3",
|
|
98
98
|
"chromatic": "^11.5.4",
|
|
99
99
|
"css-loader": "^7.1.2",
|
|
100
|
-
"eslint": "^8.57.
|
|
100
|
+
"eslint": "^8.57.1",
|
|
101
101
|
"eslint-config-prettier": "^9.1.0",
|
|
102
|
-
"eslint-plugin-cypress": "^3.3.0",
|
|
103
102
|
"eslint-plugin-export-scope": "^2.4.0",
|
|
104
103
|
"eslint-plugin-jest": "^28.6.0",
|
|
105
104
|
"eslint-plugin-license-header": "^0.6.1",
|
|
@@ -107,24 +106,24 @@
|
|
|
107
106
|
"eslint-plugin-react": "^7.34.3",
|
|
108
107
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
109
108
|
"eslint-plugin-storybook": "^0.8.0",
|
|
110
|
-
"husky": "^9.1.
|
|
109
|
+
"husky": "^9.1.7",
|
|
111
110
|
"identity-obj-proxy": "^3.0.0",
|
|
112
111
|
"jest": "^29.7.0",
|
|
113
112
|
"jest-environment-jsdom": "^29.7.0",
|
|
114
113
|
"jest-junit": "^16.0.0",
|
|
115
114
|
"jest-sonar-reporter": "^2.0.0",
|
|
116
115
|
"lint-staged": "^15.2.7",
|
|
117
|
-
"mini-css-extract-plugin": "^2.9.
|
|
116
|
+
"mini-css-extract-plugin": "^2.9.2",
|
|
118
117
|
"npm-run-all": "^4.1.5",
|
|
119
118
|
"postcss": "^8.4.39",
|
|
120
|
-
"postcss-modules": "^6.0.
|
|
119
|
+
"postcss-modules": "^6.0.1",
|
|
121
120
|
"postcss-url": "^10.1.3",
|
|
122
121
|
"prettier": "^3.3.2",
|
|
123
122
|
"react": "^18.3.1",
|
|
124
123
|
"react-dom": "^18.3.1",
|
|
125
124
|
"react-is": "^18.3.1",
|
|
126
125
|
"react-router-dom": "^6.24.1",
|
|
127
|
-
"remark-gfm": "^4.0.
|
|
126
|
+
"remark-gfm": "^4.0.1",
|
|
128
127
|
"rimraf": "^6.0.1",
|
|
129
128
|
"rollup": "^4.18.0",
|
|
130
129
|
"rollup-plugin-postcss": "^4.0.2",
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
@function relativeToBaseFontSize($ratio) {
|
|
18
|
+
@return calc($ratio * var(--font-size));
|
|
19
|
+
}
|
|
@@ -39,7 +39,7 @@ const BreadcrumbsComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
|
39
39
|
const items = React.Children.map(children, (child, index) => {
|
|
40
40
|
const isLastElement = Array.isArray(children) ? index === children.length - 1 : true;
|
|
41
41
|
const isFirstElement = Array.isArray(children) && index === 0;
|
|
42
|
-
|
|
42
|
+
const item = React.cloneElement(child, {
|
|
43
43
|
className: classes["breadcrumb-link"],
|
|
44
44
|
...(isFirstElement
|
|
45
45
|
? {
|
|
@@ -31,10 +31,11 @@ const BaseButtonComponent: ForwardRefRenderFunction<HTMLButtonElement, Props> =
|
|
|
31
31
|
) => {
|
|
32
32
|
const validTypes = ["submit", "button", "reset"];
|
|
33
33
|
const isDisabled = disabled ?? loading;
|
|
34
|
-
if (!validTypes.includes(type))
|
|
34
|
+
if (!validTypes.includes(type)) {
|
|
35
35
|
throw new Error(
|
|
36
36
|
`You have entered an invalid button type. Expected 'submit', 'button' or 'reset' got ${type}`
|
|
37
37
|
);
|
|
38
|
+
}
|
|
38
39
|
|
|
39
40
|
const buttonClasses = [classes.button];
|
|
40
41
|
loading && buttonClasses.push(classes.loading);
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
@use "../../mixins.module.scss";
|
|
18
|
+
@use "src/functions" as *;
|
|
18
19
|
|
|
19
20
|
.fill {
|
|
20
21
|
@include mixins.button("fill");
|
|
@@ -47,11 +48,11 @@
|
|
|
47
48
|
align-items: center;
|
|
48
49
|
justify-content: center;
|
|
49
50
|
|
|
50
|
-
width: 1.
|
|
51
|
+
width: relativeToBaseFontSize(1.5);
|
|
51
52
|
margin-right: 0.25rem;
|
|
52
53
|
|
|
53
54
|
span {
|
|
54
|
-
font-size:
|
|
55
|
+
font-size: var(--font-size);
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
@use "../../mixins.module.scss";
|
|
18
|
+
@use "src/functions" as *;
|
|
18
19
|
|
|
19
20
|
.icon-button {
|
|
20
21
|
border: var(--button-border-width) var(--button-border-style) transparent;
|
|
@@ -32,29 +33,29 @@
|
|
|
32
33
|
|
|
33
34
|
/** Sizes **/
|
|
34
35
|
&.button-s {
|
|
35
|
-
width: 1.
|
|
36
|
-
height: 1.
|
|
36
|
+
width: relativeToBaseFontSize(1.875);
|
|
37
|
+
height: relativeToBaseFontSize(1.875);
|
|
37
38
|
|
|
38
39
|
span {
|
|
39
|
-
font-size: 0.
|
|
40
|
+
font-size: relativeToBaseFontSize(0.75);
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
&.button-m {
|
|
44
|
-
width: 2.
|
|
45
|
-
height: 2.
|
|
45
|
+
width: relativeToBaseFontSize(2.5);
|
|
46
|
+
height: relativeToBaseFontSize(2.5);
|
|
46
47
|
|
|
47
48
|
span {
|
|
48
|
-
font-size:
|
|
49
|
+
font-size: var(--font-size);
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
&.button-l {
|
|
53
|
-
width: 3.
|
|
54
|
-
height: 3.
|
|
54
|
+
width: relativeToBaseFontSize(3.125);
|
|
55
|
+
height: relativeToBaseFontSize(3.125);
|
|
55
56
|
|
|
56
57
|
span {
|
|
57
|
-
font-size: 1.
|
|
58
|
+
font-size: relativeToBaseFontSize(1.375);
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
background-color: transparent;
|
|
25
25
|
border: 0;
|
|
26
26
|
font-family: var(--font-family);
|
|
27
|
-
font-size: var(--font-size
|
|
28
|
-
line-height: 1.
|
|
27
|
+
font-size: var(--context-menu-font-size);
|
|
28
|
+
line-height: 1.43;
|
|
29
29
|
cursor: pointer;
|
|
30
30
|
width: 100%;
|
|
31
31
|
height: 100%;
|
|
@@ -54,7 +54,7 @@ const ContextMenuItemComponent: ForwardRefRenderFunction<HTMLButtonElement, Prop
|
|
|
54
54
|
}: Props,
|
|
55
55
|
ref
|
|
56
56
|
) => {
|
|
57
|
-
|
|
57
|
+
const innerButtonRef = (ref as RefObject<HTMLButtonElement>) || createRef<HTMLButtonElement>();
|
|
58
58
|
|
|
59
59
|
useEffect(() => {
|
|
60
60
|
if (isSelected && innerButtonRef.current && shouldClick) {
|
|
@@ -69,7 +69,7 @@ export interface Props<T> extends Omit<ComponentPropsWithRef<"div">, "children">
|
|
|
69
69
|
spacing?: Spacing;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
const DataGridInner = <T extends
|
|
72
|
+
const DataGridInner = <T extends object>(
|
|
73
73
|
{
|
|
74
74
|
children,
|
|
75
75
|
data,
|
|
@@ -214,6 +214,6 @@ const DataGridInner = <T extends {}>(
|
|
|
214
214
|
);
|
|
215
215
|
};
|
|
216
216
|
|
|
217
|
-
export const DataGrid = React.forwardRef(DataGridInner) as <T extends
|
|
217
|
+
export const DataGrid = React.forwardRef(DataGridInner) as <T extends object>(
|
|
218
218
|
p: Props<T> & { ref?: Ref<HTMLDivElement> }
|
|
219
219
|
) => ReactElement;
|
|
@@ -37,7 +37,7 @@ export interface Props<T> extends Omit<ComponentPropsWithRef<"tbody">, "children
|
|
|
37
37
|
|
|
38
38
|
const skeletonLoadingRows = 9;
|
|
39
39
|
|
|
40
|
-
const DataGridBodyInner = <T extends
|
|
40
|
+
const DataGridBodyInner = <T extends object>(
|
|
41
41
|
{
|
|
42
42
|
children,
|
|
43
43
|
data,
|
|
@@ -105,6 +105,6 @@ const DataGridBodyInner = <T extends {}>(
|
|
|
105
105
|
);
|
|
106
106
|
};
|
|
107
107
|
|
|
108
|
-
export const DataGridBody = React.forwardRef(DataGridBodyInner) as <T extends
|
|
108
|
+
export const DataGridBody = React.forwardRef(DataGridBodyInner) as <T extends object>(
|
|
109
109
|
p: Props<T> & { ref?: Ref<HTMLTableSectionElement> }
|
|
110
110
|
) => ReactElement;
|
|
@@ -49,7 +49,7 @@ const DataGridCellComponent: ForwardRefRenderFunction<HTMLTableCellElement, Prop
|
|
|
49
49
|
}: Props,
|
|
50
50
|
ref
|
|
51
51
|
) => {
|
|
52
|
-
|
|
52
|
+
const cellStyle: React.CSSProperties = {};
|
|
53
53
|
|
|
54
54
|
if (cellIndex === 0) {
|
|
55
55
|
cellStyle.paddingLeft = spacing?.paddingLeft;
|
|
@@ -72,7 +72,9 @@ const DataGridCellComponent: ForwardRefRenderFunction<HTMLTableCellElement, Prop
|
|
|
72
72
|
|
|
73
73
|
const parts = children.split(matchingSequence?.[0] ?? "");
|
|
74
74
|
return parts.map((part, i) => {
|
|
75
|
-
if (i === parts.length - 1)
|
|
75
|
+
if (i === parts.length - 1) {
|
|
76
|
+
return <Fragment key={`${part}-${i}`}>{part}</Fragment>;
|
|
77
|
+
}
|
|
76
78
|
|
|
77
79
|
return (
|
|
78
80
|
<Fragment key={`${part}-${i}`}>
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
@use "../../dataGridMixins.module";
|
|
17
|
+
@use "src/functions" as *;
|
|
17
18
|
|
|
18
19
|
$nesting-limit: 6;
|
|
19
20
|
|
|
@@ -67,7 +68,7 @@ $nesting-limit: 6;
|
|
|
67
68
|
top: 0;
|
|
68
69
|
left: 0;
|
|
69
70
|
width: 2.875rem;
|
|
70
|
-
height: 3.
|
|
71
|
+
height: relativeToBaseFontSize(3.25);
|
|
71
72
|
|
|
72
73
|
@include offset-left();
|
|
73
74
|
|
|
@@ -87,7 +88,7 @@ $nesting-limit: 6;
|
|
|
87
88
|
position: absolute;
|
|
88
89
|
content: "";
|
|
89
90
|
left: 50%;
|
|
90
|
-
height: 3.
|
|
91
|
+
height: relativeToBaseFontSize(3.25);
|
|
91
92
|
width: 0.0625rem;
|
|
92
93
|
background-color: var(--color-blue-grey200);
|
|
93
94
|
}
|
|
@@ -187,6 +187,6 @@ const DataGridRowComponent = <T,>(
|
|
|
187
187
|
);
|
|
188
188
|
};
|
|
189
189
|
|
|
190
|
-
export const DataGridRow = React.forwardRef(DataGridRowComponent) as <T extends
|
|
190
|
+
export const DataGridRow = React.forwardRef(DataGridRowComponent) as <T extends object>(
|
|
191
191
|
p: Props<T> & { ref?: Ref<HTMLTableRowElement> }
|
|
192
192
|
) => ReactElement;
|