@onewelcome/react-lib-components 9.7.1 → 9.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/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.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.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/DataGridFilterPopover.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js.map +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.cjs.js +1 -1
- package/dist/cjs/Form/Checkbox/Checkbox.cjs.js.map +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.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/FormErrorText/FormErrorText.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.cjs.js +1 -1
- package/dist/cjs/Form/FormSelectorWrapper/FormSelectorWrapper.cjs.js.map +1 -1
- package/dist/cjs/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/FormStatusIndicator/FormStatusIndicator.cjs.js +2 -0
- package/dist/cjs/Form/FormStatusIndicator/FormStatusIndicator.cjs.js.map +1 -0
- 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.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/InlineEditing/InlineCheckbox/InlineCheckbox.cjs.js +2 -0
- package/dist/cjs/InlineEditing/InlineCheckbox/InlineCheckbox.cjs.js.map +1 -0
- package/dist/cjs/InlineEditing/InlineEditingContext.cjs.js +2 -0
- package/dist/cjs/InlineEditing/InlineEditingContext.cjs.js.map +1 -0
- package/dist/cjs/InlineEditing/InlineEditingSelect/InlineSelect.cjs.js +2 -0
- package/dist/cjs/InlineEditing/InlineEditingSelect/InlineSelect.cjs.js.map +1 -0
- package/dist/cjs/Layout/Card/Card.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/RequiredSign/RequiredSign.cjs.js +2 -0
- package/dist/cjs/RequiredSign/RequiredSign.cjs.js.map +1 -0
- 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.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.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 +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.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/LeftNav/LeftNav.module.scss.cjs.js +1 -1
- package/dist/cjs/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.cjs.js +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/DataGrid/DataGrid.d.ts +1 -0
- package/dist/cjs/src/components/Form/Checkbox/Checkbox.d.ts +3 -2
- package/dist/cjs/src/components/Form/FormSelectorWrapper/FormSelectorWrapper.d.ts +1 -0
- package/dist/cjs/src/components/Form/FormStatusIndicator/FormStatusIndicator.d.ts +8 -0
- package/dist/cjs/src/components/Form/Select/SingleSelect/Select.test.d.ts +61 -0
- package/dist/cjs/src/components/InlineEditing/InlineCheckbox/InlineCheckbox.d.ts +6 -0
- package/dist/cjs/src/components/InlineEditing/InlineEditingContext.d.ts +10 -0
- package/dist/cjs/src/components/InlineEditing/InlineEditingSelect/InlineSelect.d.ts +6 -0
- package/dist/cjs/src/components/RequiredSign/RequiredSign.d.ts +5 -0
- package/dist/cjs/src/components/Tabs/Tabs.d.ts +1 -0
- package/dist/cjs/src/components/Tooltip/Tooltip.d.ts +2 -0
- package/dist/cjs/src/components/_BaseStyling_/BaseStyling.d.ts +2 -1
- package/dist/cjs/src/index.cjs.js +1 -1
- package/dist/cjs/src/index.d.ts +2 -0
- package/dist/cjs/src/readyclasses.module.scss.cjs.js +1 -1
- package/dist/cjs/src/utils/statusUtils.cjs.js +2 -0
- package/dist/cjs/src/utils/statusUtils.cjs.js.map +1 -0
- package/dist/cjs/src/utils/statusUtils.d.ts +10 -0
- package/dist/esm/Breadcrumbs/Breadcrumbs.module.scss.esm.js +2 -2
- 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.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGrid.esm.js +3 -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.module.scss.esm.js +2 -2
- 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.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilter.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilterPopover.esm.js +2 -8
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilterPopover.esm.js.map +1 -1
- 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.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.esm.js +2 -2
- package/dist/esm/DatePicker/DatePicker.module.scss.esm.js +2 -2
- package/dist/esm/Form/Checkbox/Checkbox.esm.js +5 -3
- 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.module.scss.esm.js +2 -2
- package/dist/esm/Form/FileUpload/FileItem/FileItem.module.scss.esm.js +2 -2
- 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/FormErrorText/FormErrorText.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.esm.js +13 -3
- 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/FormStatusIndicator/FormStatusIndicator.esm.js +47 -0
- package/dist/esm/Form/FormStatusIndicator/FormStatusIndicator.esm.js.map +1 -0
- 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.module.scss.esm.js +2 -2
- 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/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 +24 -19
- package/dist/esm/Form/Select/SingleSelect/Select.esm.js.map +1 -1
- package/dist/esm/Form/Select/SingleSelect/Select.module.scss.esm.js +3 -3
- 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/InlineEditing/InlineCheckbox/InlineCheckbox.esm.js +34 -0
- package/dist/esm/InlineEditing/InlineCheckbox/InlineCheckbox.esm.js.map +1 -0
- package/dist/esm/InlineEditing/InlineEditingContext.esm.js +23 -0
- package/dist/esm/InlineEditing/InlineEditingContext.esm.js.map +1 -0
- package/dist/esm/InlineEditing/InlineEditingSelect/InlineSelect.esm.js +37 -0
- package/dist/esm/InlineEditing/InlineEditingSelect/InlineSelect.esm.js.map +1 -0
- package/dist/esm/Layout/Card/Card.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.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.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.esm.js +2 -2
- 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.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/RequiredSign/RequiredSign.esm.js +25 -0
- package/dist/esm/RequiredSign/RequiredSign.esm.js.map +1 -0
- 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.module.scss.esm.js +2 -2
- package/dist/esm/Tabs/TabButton.module.scss.esm.js +2 -2
- package/dist/esm/Tabs/Tabs.esm.js +32 -15
- 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.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 -2
- 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.module.scss.esm.js +2 -2
- package/dist/esm/_BaseStyling_/BaseStyling.esm.js +4 -3
- package/dist/esm/_BaseStyling_/BaseStyling.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/LeftNavItem.module.scss.esm.js +2 -2
- package/dist/esm/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.esm.js +2 -2
- package/dist/esm/miscellaneous/IdentityProviderButton.module.scss.esm.js +2 -2
- package/dist/esm/src/components/DataGrid/DataGrid.d.ts +1 -0
- package/dist/esm/src/components/Form/Checkbox/Checkbox.d.ts +3 -2
- package/dist/esm/src/components/Form/FormSelectorWrapper/FormSelectorWrapper.d.ts +1 -0
- package/dist/esm/src/components/Form/FormStatusIndicator/FormStatusIndicator.d.ts +8 -0
- package/dist/esm/src/components/Form/Select/SingleSelect/Select.test.d.ts +61 -0
- package/dist/esm/src/components/InlineEditing/InlineCheckbox/InlineCheckbox.d.ts +6 -0
- package/dist/esm/src/components/InlineEditing/InlineEditingContext.d.ts +10 -0
- package/dist/esm/src/components/InlineEditing/InlineEditingSelect/InlineSelect.d.ts +6 -0
- package/dist/esm/src/components/RequiredSign/RequiredSign.d.ts +5 -0
- package/dist/esm/src/components/Tabs/Tabs.d.ts +1 -0
- package/dist/esm/src/components/Tooltip/Tooltip.d.ts +2 -0
- package/dist/esm/src/components/_BaseStyling_/BaseStyling.d.ts +2 -1
- package/dist/esm/src/index.d.ts +2 -0
- package/dist/esm/src/index.esm.js +2 -0
- package/dist/esm/src/index.esm.js.map +1 -1
- package/dist/esm/src/readyclasses.module.scss.esm.js +2 -2
- package/dist/esm/src/utils/statusUtils.d.ts +10 -0
- package/dist/esm/src/utils/statusUtils.esm.js +41 -0
- package/dist/esm/src/utils/statusUtils.esm.js.map +1 -0
- package/package.json +1 -1
- package/src/components/DataGrid/DataGrid.module.scss +9 -0
- package/src/components/DataGrid/DataGrid.tsx +6 -0
- package/src/components/DataGrid/DataGridFilters/DataGridFilterPopover.tsx +2 -7
- package/src/components/Form/Checkbox/Checkbox.tsx +9 -2
- package/src/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss +25 -0
- package/src/components/Form/FormSelectorWrapper/FormSelectorWrapper.tsx +23 -2
- package/src/components/Form/FormStatusIndicator/FormStatusIndicator.tsx +75 -0
- package/src/components/Form/Select/SingleSelect/Select.module.scss +71 -0
- package/src/components/Form/Select/SingleSelect/Select.tsx +15 -8
- package/src/components/Form/Textarea/Textarea.module.scss +1 -0
- package/src/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss +1 -0
- package/src/components/InlineEditing/InlineCheckbox/InlineCheckbox.tsx +40 -0
- package/src/components/InlineEditing/InlineEditingContext.tsx +32 -0
- package/src/components/InlineEditing/InlineEditingSelect/InlineSelect.tsx +44 -0
- package/src/components/RequiredSign/RequiredSign.tsx +28 -0
- package/src/components/Tabs/Tabs.tsx +35 -15
- package/src/components/TextEllipsis/TextEllipsis.module.scss +1 -0
- package/src/components/Tooltip/Tooltip.module.scss +5 -0
- package/src/components/Tooltip/Tooltip.tsx +4 -1
- package/src/components/_BaseStyling_/BaseStyling.tsx +6 -4
- package/src/index.ts +8 -0
- package/src/utils/statusUtils.ts +51 -0
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import React
|
|
17
|
+
import React from "react";
|
|
18
18
|
import classes from "./DataGridFilter.module.scss";
|
|
19
19
|
import { Button } from "../../Button/Button";
|
|
20
20
|
import { Option } from "../../Form/Select/SingleSelect/Option";
|
|
@@ -81,12 +81,6 @@ export const DataGridFilterPopover = ({
|
|
|
81
81
|
const isValueRequired = operator && !operator.allowEmptyValues;
|
|
82
82
|
const hasValidationError = Boolean(isValueRequired && pickedValues.length === 0);
|
|
83
83
|
|
|
84
|
-
useEffect(() => {
|
|
85
|
-
if (isOpen) {
|
|
86
|
-
popoverRef.current?.focus();
|
|
87
|
-
}
|
|
88
|
-
}, [isOpen]);
|
|
89
|
-
|
|
90
84
|
return (
|
|
91
85
|
<Popover
|
|
92
86
|
tabIndex={-1}
|
|
@@ -100,6 +94,7 @@ export const DataGridFilterPopover = ({
|
|
|
100
94
|
<div className={classes["popover"]}>
|
|
101
95
|
<div className={classes["controls"]}>
|
|
102
96
|
<SelectWrapper
|
|
97
|
+
selectProps={{ selectButtonProps: { autoFocus: true } }}
|
|
103
98
|
label={columnSelectLabel}
|
|
104
99
|
value={column}
|
|
105
100
|
name={"column"}
|
|
@@ -31,20 +31,23 @@ import {
|
|
|
31
31
|
} from "../FormSelectorWrapper/FormSelectorWrapper";
|
|
32
32
|
import { FormSelector } from "../form.interfaces";
|
|
33
33
|
import { withReadOnly } from "../../withReadOnly";
|
|
34
|
+
import { useInlineEditing } from "../../InlineEditing/InlineEditingContext";
|
|
34
35
|
|
|
35
36
|
const isToggle = (children: ReactNode) => !!(children as ReactElement)?.props?.["data-toggle"];
|
|
36
37
|
|
|
37
|
-
export interface Props extends ComponentPropsWithRef<"input">,
|
|
38
|
-
label?: string | React.
|
|
38
|
+
export interface Props extends ComponentPropsWithRef<"input">, FormSelector {
|
|
39
|
+
label?: string | React.ReactElement;
|
|
39
40
|
indeterminate?: boolean;
|
|
40
41
|
required?: boolean;
|
|
41
42
|
helperProps?: FormHelperTextProps;
|
|
42
43
|
formSelectorWrapperProps?: FormSelectorWrapperProps;
|
|
43
44
|
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
45
|
+
readOnlyView?: boolean;
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
const CheckboxComponent: ForwardRefRenderFunction<HTMLInputElement, Props> = (
|
|
47
49
|
{
|
|
50
|
+
readOnly,
|
|
48
51
|
children,
|
|
49
52
|
name,
|
|
50
53
|
helperText,
|
|
@@ -75,6 +78,8 @@ const CheckboxComponent: ForwardRefRenderFunction<HTMLInputElement, Props> = (
|
|
|
75
78
|
parentHelperId
|
|
76
79
|
});
|
|
77
80
|
|
|
81
|
+
const { required: inlineRequired } = useInlineEditing();
|
|
82
|
+
|
|
78
83
|
useEffect(() => {
|
|
79
84
|
if (!name) {
|
|
80
85
|
throw new Error("Please pass a 'name' prop to your <Checkbox> component.");
|
|
@@ -150,6 +155,7 @@ const CheckboxComponent: ForwardRefRenderFunction<HTMLInputElement, Props> = (
|
|
|
150
155
|
error={error}
|
|
151
156
|
disabled={disabled}
|
|
152
157
|
identifier={identifier}
|
|
158
|
+
required={inlineRequired}
|
|
153
159
|
nestedChildren={
|
|
154
160
|
typeof children === "object" && !isToggle(children) && renderNestedCheckboxes()
|
|
155
161
|
}
|
|
@@ -164,6 +170,7 @@ const CheckboxComponent: ForwardRefRenderFunction<HTMLInputElement, Props> = (
|
|
|
164
170
|
aria-invalid={error as boolean}
|
|
165
171
|
aria-checked={indeterminate ? "mixed" : checked}
|
|
166
172
|
aria-describedby={describedBy}
|
|
173
|
+
aria-required={required || inlineRequired}
|
|
167
174
|
id={`${identifier}-checkbox`}
|
|
168
175
|
name={name}
|
|
169
176
|
type="checkbox"
|
|
@@ -28,6 +28,27 @@
|
|
|
28
28
|
margin-left: relativeToBaseFontSize(1.75);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
.children-container {
|
|
32
|
+
& > span:nth-of-type(2) {
|
|
33
|
+
margin-right: 0.5rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[data-icon-status="success"] {
|
|
37
|
+
color: var(--success);
|
|
38
|
+
font-size: var(--font-size-big);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[data-icon-status="error"] {
|
|
42
|
+
color: var(--error);
|
|
43
|
+
font-size: var(--font-size-big);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[data-icon-status="info"] {
|
|
47
|
+
color: var(--default);
|
|
48
|
+
font-size: var(--font-size-big);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
31
52
|
.disabled {
|
|
32
53
|
input {
|
|
33
54
|
color: var(--disabled);
|
|
@@ -41,3 +62,7 @@
|
|
|
41
62
|
cursor: not-allowed;
|
|
42
63
|
}
|
|
43
64
|
}
|
|
65
|
+
|
|
66
|
+
.required {
|
|
67
|
+
color: var(--error);
|
|
68
|
+
}
|
|
@@ -24,7 +24,10 @@ import { KeyValuePair } from "../../../interfaces";
|
|
|
24
24
|
import { FormSelector } from "../form.interfaces";
|
|
25
25
|
import { FormHelperText, Props as FormHelperTextProps } from "../FormHelperText/FormHelperText";
|
|
26
26
|
import classes from "./FormSelectorWrapper.module.scss";
|
|
27
|
+
import { useInlineEditing } from "../../InlineEditing/InlineEditingContext";
|
|
28
|
+
import { RequiredSign } from "../../RequiredSign/RequiredSign";
|
|
27
29
|
import { FormErrorText } from "../FormErrorText/FormErrorText";
|
|
30
|
+
import { FormStatusIndicator } from "../FormStatusIndicator/FormStatusIndicator";
|
|
28
31
|
|
|
29
32
|
export interface Props extends ComponentPropsWithRef<"div">, FormSelector {
|
|
30
33
|
children?: ReactNode;
|
|
@@ -34,6 +37,7 @@ export interface Props extends ComponentPropsWithRef<"div">, FormSelector {
|
|
|
34
37
|
disabled?: boolean;
|
|
35
38
|
errorId?: string;
|
|
36
39
|
identifier?: string;
|
|
40
|
+
required?: boolean;
|
|
37
41
|
}
|
|
38
42
|
|
|
39
43
|
const FormSelectorWrapperComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
@@ -46,16 +50,19 @@ const FormSelectorWrapperComponent: ForwardRefRenderFunction<HTMLDivElement, Pro
|
|
|
46
50
|
error,
|
|
47
51
|
disabled,
|
|
48
52
|
helperText,
|
|
53
|
+
success,
|
|
49
54
|
errorMessage,
|
|
50
55
|
errorMessageProps,
|
|
51
56
|
parentErrorId,
|
|
52
57
|
errorId,
|
|
53
58
|
identifier,
|
|
59
|
+
required,
|
|
54
60
|
...rest
|
|
55
61
|
}: Props,
|
|
56
62
|
ref
|
|
57
63
|
) => {
|
|
58
64
|
const helperRef = helperProps?.ref ?? createRef();
|
|
65
|
+
const { enabled } = useInlineEditing();
|
|
59
66
|
|
|
60
67
|
const hasHelperText = helperText ?? helperProps?.children;
|
|
61
68
|
const showHelperText = !error && hasHelperText;
|
|
@@ -69,8 +76,22 @@ const FormSelectorWrapperComponent: ForwardRefRenderFunction<HTMLDivElement, Pro
|
|
|
69
76
|
className ?? ""
|
|
70
77
|
}`}
|
|
71
78
|
>
|
|
72
|
-
<div
|
|
73
|
-
|
|
79
|
+
<div
|
|
80
|
+
{...containerProps}
|
|
81
|
+
className={`${containerProps?.className} ${classes["children-container"]}`}
|
|
82
|
+
>
|
|
83
|
+
{children}
|
|
84
|
+
{enabled && (
|
|
85
|
+
<>
|
|
86
|
+
<RequiredSign className={classes["required"]} />
|
|
87
|
+
<FormStatusIndicator success={success} error={error}>
|
|
88
|
+
<></>
|
|
89
|
+
</FormStatusIndicator>
|
|
90
|
+
</>
|
|
91
|
+
)}
|
|
92
|
+
</div>
|
|
93
|
+
{!enabled &&
|
|
94
|
+
(showHelperText || showErrorText) &&
|
|
74
95
|
(showErrorText ? (
|
|
75
96
|
<FormErrorText
|
|
76
97
|
error={error}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import React from "react";
|
|
18
|
+
import { useInlineEditing } from "../../InlineEditing/InlineEditingContext";
|
|
19
|
+
import { useDetermineStatusIcon } from "../../../hooks/useDetermineStatusIcon";
|
|
20
|
+
import { getStatusIcon, getStatusState } from "../../../utils/statusUtils";
|
|
21
|
+
import { Tooltip } from "../../Tooltip/Tooltip";
|
|
22
|
+
import { Icon } from "../../Icon/Icon";
|
|
23
|
+
|
|
24
|
+
export interface FormStatusIndicatorProps {
|
|
25
|
+
isReadOnlyView?: boolean;
|
|
26
|
+
success?: boolean;
|
|
27
|
+
error?: boolean;
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const FormStatusIndicator: React.FC<FormStatusIndicatorProps> = ({
|
|
32
|
+
isReadOnlyView,
|
|
33
|
+
success,
|
|
34
|
+
error,
|
|
35
|
+
children
|
|
36
|
+
}) => {
|
|
37
|
+
const { enabled, tooltipText, ...restProps } = useInlineEditing();
|
|
38
|
+
const showTooltip = enabled && tooltipText;
|
|
39
|
+
const isSuccess = restProps.success ?? success;
|
|
40
|
+
const isError = restProps.error ?? error;
|
|
41
|
+
const statusIcon = useDetermineStatusIcon({
|
|
42
|
+
success: isSuccess,
|
|
43
|
+
error: isError
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
if (showTooltip && !isReadOnlyView) {
|
|
47
|
+
const status = getStatusState(
|
|
48
|
+
{
|
|
49
|
+
success: isSuccess,
|
|
50
|
+
error: isError
|
|
51
|
+
},
|
|
52
|
+
true
|
|
53
|
+
);
|
|
54
|
+
return (
|
|
55
|
+
<Tooltip
|
|
56
|
+
label={
|
|
57
|
+
<Icon
|
|
58
|
+
data-testid="tooltip-icon"
|
|
59
|
+
data-icon-status={status}
|
|
60
|
+
icon={getStatusIcon({
|
|
61
|
+
success: isSuccess,
|
|
62
|
+
error: isError
|
|
63
|
+
})}
|
|
64
|
+
/>
|
|
65
|
+
}
|
|
66
|
+
location="right"
|
|
67
|
+
position="center"
|
|
68
|
+
>
|
|
69
|
+
{tooltipText}
|
|
70
|
+
</Tooltip>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return <>{statusIcon || (!isReadOnlyView && children)}</>;
|
|
75
|
+
};
|
|
@@ -233,6 +233,9 @@ $listItemHeight: 2.5rem;
|
|
|
233
233
|
top: 50%;
|
|
234
234
|
transform: translateY(-50%);
|
|
235
235
|
pointer-events: none;
|
|
236
|
+
.required {
|
|
237
|
+
color: var(--error);
|
|
238
|
+
}
|
|
236
239
|
}
|
|
237
240
|
|
|
238
241
|
.status {
|
|
@@ -253,6 +256,11 @@ $listItemHeight: 2.5rem;
|
|
|
253
256
|
font-size: var(--font-size-big);
|
|
254
257
|
}
|
|
255
258
|
|
|
259
|
+
[data-icon-status="info"] {
|
|
260
|
+
color: var(--default);
|
|
261
|
+
font-size: var(--font-size-big);
|
|
262
|
+
}
|
|
263
|
+
|
|
256
264
|
.chevron-icon {
|
|
257
265
|
color: var(--default);
|
|
258
266
|
font-size: var(--font-size-small);
|
|
@@ -327,3 +335,66 @@ $listItemHeight: 2.5rem;
|
|
|
327
335
|
}
|
|
328
336
|
}
|
|
329
337
|
}
|
|
338
|
+
|
|
339
|
+
.inlineEditing {
|
|
340
|
+
& .select {
|
|
341
|
+
background-color: transparent;
|
|
342
|
+
transition: none;
|
|
343
|
+
&:not(.expanded) {
|
|
344
|
+
button:focus:not(.error) {
|
|
345
|
+
border-width: 0;
|
|
346
|
+
border-radius: 0.3125rem;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
&:focus {
|
|
350
|
+
& button {
|
|
351
|
+
&:focus {
|
|
352
|
+
border: 0.125rem solid var(--color-focus);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
&:hover {
|
|
357
|
+
& button {
|
|
358
|
+
& .status {
|
|
359
|
+
span.chevron-icon {
|
|
360
|
+
visibility: visible;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
&:not(.disabled):not(.expanded):not(.error) {
|
|
365
|
+
button:not(:focus) {
|
|
366
|
+
border: 0;
|
|
367
|
+
background-color: transparent;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
& button {
|
|
372
|
+
border: 0;
|
|
373
|
+
&.expanded {
|
|
374
|
+
div.status {
|
|
375
|
+
span.chevron-icon {
|
|
376
|
+
visibility: visible;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
&:focus-visible {
|
|
381
|
+
outline: 0.125rem solid var(--color-focus);
|
|
382
|
+
border-radius: 0.3125rem;
|
|
383
|
+
outline-offset: -1px;
|
|
384
|
+
}
|
|
385
|
+
&.error {
|
|
386
|
+
color: var(--color-default);
|
|
387
|
+
}
|
|
388
|
+
& .status {
|
|
389
|
+
span.chevron-icon {
|
|
390
|
+
visibility: hidden;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
&[data-readonlyview="true"] {
|
|
395
|
+
& button {
|
|
396
|
+
background-color: transparent;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
@@ -25,7 +25,6 @@ import React, {
|
|
|
25
25
|
useState
|
|
26
26
|
} from "react";
|
|
27
27
|
import { useClickOutside } from "../../../../hooks/useClickOutside";
|
|
28
|
-
import { useDetermineStatusIcon } from "../../../../hooks/useDetermineStatusIcon";
|
|
29
28
|
import readyclasses from "../../../../readyclasses.module.scss";
|
|
30
29
|
import { filterProps } from "../../../../util/helper";
|
|
31
30
|
import { Icon, Icons } from "../../../Icon/Icon";
|
|
@@ -35,6 +34,9 @@ import { useAddNewBtn } from "../useAddNewBtn";
|
|
|
35
34
|
import { useSearch } from "./useSearch";
|
|
36
35
|
import { useArrowNavigation } from "./useArrowNavigation";
|
|
37
36
|
import { withReadOnly } from "../../../withReadOnly";
|
|
37
|
+
import { RequiredSign } from "../../../RequiredSign/RequiredSign";
|
|
38
|
+
import { FormStatusIndicator } from "../../FormStatusIndicator/FormStatusIndicator";
|
|
39
|
+
import { useInlineEditing } from "../../../InlineEditing/InlineEditingContext";
|
|
38
40
|
|
|
39
41
|
const SelectComponent: ForwardRefRenderFunction<HTMLSelectElement, SingleSelectProps> = (
|
|
40
42
|
{
|
|
@@ -91,6 +93,9 @@ const SelectComponent: ForwardRefRenderFunction<HTMLSelectElement, SingleSelectP
|
|
|
91
93
|
searchInputRef
|
|
92
94
|
});
|
|
93
95
|
|
|
96
|
+
const { inlineClassNames } = useInlineEditing();
|
|
97
|
+
const rootClassNames = inlineClassNames ? ` ${inlineClassNames}` : "";
|
|
98
|
+
|
|
94
99
|
const nativeSelect = (ref as React.RefObject<HTMLSelectElement>) || createRef();
|
|
95
100
|
|
|
96
101
|
const onOptionChangeHandler = (optionElement: HTMLElement | null) => {
|
|
@@ -135,9 +140,8 @@ const SelectComponent: ForwardRefRenderFunction<HTMLSelectElement, SingleSelectP
|
|
|
135
140
|
*/
|
|
136
141
|
const renderOptions = () => {
|
|
137
142
|
if (isSearching || filter !== "") {
|
|
138
|
-
const filteredChildren = React.Children.toArray(children).filter(
|
|
139
|
-
child
|
|
140
|
-
(child as ReactElement).props.children.toLowerCase().match(filter.toLowerCase()) !== null
|
|
143
|
+
const filteredChildren = React.Children.toArray(children).filter(child =>
|
|
144
|
+
(child as ReactElement).props.children.toLowerCase().includes(filter.toLowerCase())
|
|
141
145
|
);
|
|
142
146
|
|
|
143
147
|
const internalChildren = _internalRenderChildren(filteredChildren as ReactElement[]);
|
|
@@ -181,8 +185,6 @@ const SelectComponent: ForwardRefRenderFunction<HTMLSelectElement, SingleSelectP
|
|
|
181
185
|
);
|
|
182
186
|
};
|
|
183
187
|
|
|
184
|
-
const icon = useDetermineStatusIcon({ success, error });
|
|
185
|
-
|
|
186
188
|
const nativeOnChangeHandler = (event: React.ChangeEvent<HTMLSelectElement>) => {
|
|
187
189
|
onChange?.(event);
|
|
188
190
|
};
|
|
@@ -223,7 +225,7 @@ const SelectComponent: ForwardRefRenderFunction<HTMLSelectElement, SingleSelectP
|
|
|
223
225
|
|
|
224
226
|
/** 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
227
|
return (
|
|
226
|
-
<div ref={myElementRef} className={classes["root"]}>
|
|
228
|
+
<div ref={myElementRef} className={`${classes["root"]}${rootClassNames}`}>
|
|
227
229
|
<select
|
|
228
230
|
{...filterProps(rest, /^data-/, false)}
|
|
229
231
|
tabIndex={-1}
|
|
@@ -266,8 +268,13 @@ const SelectComponent: ForwardRefRenderFunction<HTMLSelectElement, SingleSelectP
|
|
|
266
268
|
<div data-display className={classes["selected"]}>
|
|
267
269
|
{!value && placeholder && <span className={classes["placeholder"]}>{placeholder}</span>}
|
|
268
270
|
{value?.length > 0 && <span data-display-inner>{display}</span>}
|
|
271
|
+
<RequiredSign className={classes["required"]} />
|
|
272
|
+
</div>
|
|
273
|
+
<div className={classes["status"]}>
|
|
274
|
+
<FormStatusIndicator isReadOnlyView={isReadOnlyView} success={success} error={error}>
|
|
275
|
+
{renderChevronIcon()}
|
|
276
|
+
</FormStatusIndicator>
|
|
269
277
|
</div>
|
|
270
|
-
<div className={classes["status"]}>{icon || renderChevronIcon()}</div>
|
|
271
278
|
</button>
|
|
272
279
|
<div className="list-wrapper-container">
|
|
273
280
|
<div
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import React from "react";
|
|
18
|
+
import { Checkbox, CheckboxProps } from "../../..";
|
|
19
|
+
import { InlineEditingProvider } from "../InlineEditingContext";
|
|
20
|
+
|
|
21
|
+
export interface InlineCheckboxProps extends CheckboxProps {
|
|
22
|
+
tooltipText?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const InlineCheckbox = (props: InlineCheckboxProps) => {
|
|
26
|
+
const { error, success, tooltipText, required, ...rest } = props;
|
|
27
|
+
const inlineEditingValues = {
|
|
28
|
+
enabled: true,
|
|
29
|
+
error: error,
|
|
30
|
+
success: success,
|
|
31
|
+
required: required,
|
|
32
|
+
tooltipText: tooltipText
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<InlineEditingProvider value={inlineEditingValues}>
|
|
37
|
+
<Checkbox {...rest} />
|
|
38
|
+
</InlineEditingProvider>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { createContext, useContext } from "react";
|
|
18
|
+
|
|
19
|
+
export interface InlineEditingInterface {
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
required?: boolean;
|
|
22
|
+
error?: boolean;
|
|
23
|
+
success?: boolean;
|
|
24
|
+
tooltipText?: string;
|
|
25
|
+
inlineClassNames?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const InlineEditingContext = createContext<InlineEditingInterface>({ enabled: false });
|
|
29
|
+
|
|
30
|
+
export const InlineEditingProvider = InlineEditingContext.Provider;
|
|
31
|
+
|
|
32
|
+
export const useInlineEditing = () => useContext(InlineEditingContext);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import React from "react";
|
|
18
|
+
import { SingleSelectProps } from "../../Form/Select/Select.interfaces";
|
|
19
|
+
import { Select } from "../../Form/Select/SingleSelect/Select";
|
|
20
|
+
import { InlineEditingProvider } from "../InlineEditingContext";
|
|
21
|
+
import selectClasses from "../../Form/Select/SingleSelect/Select.module.scss";
|
|
22
|
+
|
|
23
|
+
export interface InlineSelectProps extends SingleSelectProps {
|
|
24
|
+
tooltipText?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const InlineSelect = (props: InlineSelectProps) => {
|
|
28
|
+
const { className, error, success, tooltipText, required, ...rest } = props;
|
|
29
|
+
const finalClassName = [className, selectClasses.inlineEditing].filter(Boolean).join(" ");
|
|
30
|
+
const inlineEditingValues = {
|
|
31
|
+
enabled: true,
|
|
32
|
+
error: error,
|
|
33
|
+
success: success,
|
|
34
|
+
required: required,
|
|
35
|
+
tooltipText: tooltipText,
|
|
36
|
+
inlineClassNames: finalClassName
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<InlineEditingProvider value={inlineEditingValues}>
|
|
41
|
+
<Select {...rest} />
|
|
42
|
+
</InlineEditingProvider>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import React from "react";
|
|
18
|
+
import { useInlineEditing } from "../InlineEditing/InlineEditingContext";
|
|
19
|
+
|
|
20
|
+
export interface Props {
|
|
21
|
+
className: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const RequiredSign: React.FC<Props> = ({ className }) => {
|
|
25
|
+
const { enabled, required } = useInlineEditing();
|
|
26
|
+
|
|
27
|
+
return enabled && required ? <span className={className}> *</span> : null;
|
|
28
|
+
};
|
|
@@ -32,6 +32,7 @@ export interface Props extends ComponentPropsWithRef<"div"> {
|
|
|
32
32
|
children: ReactElement<TabProps>[];
|
|
33
33
|
selected?: number;
|
|
34
34
|
onTabChange?: (index: number) => void;
|
|
35
|
+
tabChanging?: (newIndex: number, oldIndex: number) => Promise<boolean> | boolean;
|
|
35
36
|
fluid?: boolean;
|
|
36
37
|
align?: "left" | "center" | "right";
|
|
37
38
|
tabListClassName?: string;
|
|
@@ -48,6 +49,7 @@ const TabsComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
|
48
49
|
tabListClassName,
|
|
49
50
|
align,
|
|
50
51
|
iconsPosition = "left",
|
|
52
|
+
tabChanging,
|
|
51
53
|
...rest
|
|
52
54
|
}: Props,
|
|
53
55
|
ref
|
|
@@ -78,21 +80,21 @@ const TabsComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
switch (e.key) {
|
|
81
|
-
case "ArrowRight":
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
});
|
|
83
|
+
case "ArrowRight": {
|
|
84
|
+
const nextIndex = activeTabIndex + 1 > totalAmountOfTabs - 1 ? 0 : activeTabIndex + 1;
|
|
85
|
+
void handleTabClick(nextIndex);
|
|
85
86
|
break;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
}
|
|
88
|
+
case "ArrowLeft": {
|
|
89
|
+
const prevIndex = activeTabIndex - 1 < 0 ? totalAmountOfTabs - 1 : activeTabIndex - 1;
|
|
90
|
+
void handleTabClick(prevIndex);
|
|
90
91
|
break;
|
|
92
|
+
}
|
|
91
93
|
case "Home":
|
|
92
|
-
|
|
94
|
+
void handleTabClick(0);
|
|
93
95
|
break;
|
|
94
96
|
case "End":
|
|
95
|
-
|
|
97
|
+
void handleTabClick(totalAmountOfTabs - 1);
|
|
96
98
|
break;
|
|
97
99
|
default:
|
|
98
100
|
return;
|
|
@@ -117,16 +119,32 @@ const TabsComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
|
117
119
|
}
|
|
118
120
|
};
|
|
119
121
|
|
|
122
|
+
const handleTabClick = async (newIndex: number) => {
|
|
123
|
+
try {
|
|
124
|
+
const allowed =
|
|
125
|
+
typeof tabChanging === "function"
|
|
126
|
+
? await Promise.resolve(tabChanging(newIndex, activeTabIndex))
|
|
127
|
+
: true;
|
|
128
|
+
|
|
129
|
+
if (!allowed) {
|
|
130
|
+
const buttons = tabsRef.current?.querySelectorAll<HTMLButtonElement>('button[role="tab"]');
|
|
131
|
+
buttons?.[activeTabIndex]?.focus();
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
setActiveTabIndex(newIndex);
|
|
136
|
+
onTabChange?.(newIndex);
|
|
137
|
+
} catch (error) {
|
|
138
|
+
console.error("handleTabClick failed: ", error);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
|
|
120
142
|
useEffect(() => {
|
|
121
143
|
if (tabsRef.current && renderedButtons.length) {
|
|
122
144
|
calculateIndicatorPosition();
|
|
123
145
|
}
|
|
124
146
|
}, [tabsRef.current, activeTabIndex, renderedButtons]);
|
|
125
147
|
|
|
126
|
-
useEffect(() => {
|
|
127
|
-
onTabChange?.(activeTabIndex);
|
|
128
|
-
}, [activeTabIndex]);
|
|
129
|
-
|
|
130
148
|
useEffect(() => {
|
|
131
149
|
const buttons = React.Children.map(children, (child, index) => {
|
|
132
150
|
if (Object.prototype.hasOwnProperty.call(child.props, "title")) {
|
|
@@ -139,7 +157,9 @@ const TabsComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
|
139
157
|
focused: usingKeyboardNavigation && activeTabIndex === index,
|
|
140
158
|
tabActive: activeTabIndex === index,
|
|
141
159
|
"aria-controls": `tab_${index}`,
|
|
142
|
-
onClick: () =>
|
|
160
|
+
onClick: () => {
|
|
161
|
+
void handleTabClick(index);
|
|
162
|
+
},
|
|
143
163
|
disabled: child.props.disabled,
|
|
144
164
|
fluid: fluid,
|
|
145
165
|
iconPosition: iconsPosition,
|