@onewelcome/react-lib-components 9.7.1 → 9.8.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.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/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.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/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/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 +23 -18
- 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.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/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/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 +13 -5
- 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/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
|
@@ -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) => {
|
|
@@ -181,8 +186,6 @@ const SelectComponent: ForwardRefRenderFunction<HTMLSelectElement, SingleSelectP
|
|
|
181
186
|
);
|
|
182
187
|
};
|
|
183
188
|
|
|
184
|
-
const icon = useDetermineStatusIcon({ success, error });
|
|
185
|
-
|
|
186
189
|
const nativeOnChangeHandler = (event: React.ChangeEvent<HTMLSelectElement>) => {
|
|
187
190
|
onChange?.(event);
|
|
188
191
|
};
|
|
@@ -223,7 +226,7 @@ const SelectComponent: ForwardRefRenderFunction<HTMLSelectElement, SingleSelectP
|
|
|
223
226
|
|
|
224
227
|
/** 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
228
|
return (
|
|
226
|
-
<div ref={myElementRef} className={classes["root"]}>
|
|
229
|
+
<div ref={myElementRef} className={`${classes["root"]}${rootClassNames}`}>
|
|
227
230
|
<select
|
|
228
231
|
{...filterProps(rest, /^data-/, false)}
|
|
229
232
|
tabIndex={-1}
|
|
@@ -266,8 +269,13 @@ const SelectComponent: ForwardRefRenderFunction<HTMLSelectElement, SingleSelectP
|
|
|
266
269
|
<div data-display className={classes["selected"]}>
|
|
267
270
|
{!value && placeholder && <span className={classes["placeholder"]}>{placeholder}</span>}
|
|
268
271
|
{value?.length > 0 && <span data-display-inner>{display}</span>}
|
|
272
|
+
<RequiredSign className={classes["required"]} />
|
|
273
|
+
</div>
|
|
274
|
+
<div className={classes["status"]}>
|
|
275
|
+
<FormStatusIndicator isReadOnlyView={isReadOnlyView} success={success} error={error}>
|
|
276
|
+
{renderChevronIcon()}
|
|
277
|
+
</FormStatusIndicator>
|
|
269
278
|
</div>
|
|
270
|
-
<div className={classes["status"]}>{icon || renderChevronIcon()}</div>
|
|
271
279
|
</button>
|
|
272
280
|
<div className="list-wrapper-container">
|
|
273
281
|
<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
|
+
};
|
|
@@ -156,6 +156,10 @@
|
|
|
156
156
|
&:hover {
|
|
157
157
|
color: var(--default);
|
|
158
158
|
}
|
|
159
|
+
|
|
160
|
+
&.error {
|
|
161
|
+
color: var(--error);
|
|
162
|
+
}
|
|
159
163
|
}
|
|
160
164
|
}
|
|
161
165
|
|
|
@@ -175,6 +179,7 @@
|
|
|
175
179
|
pointer-events: none;
|
|
176
180
|
box-shadow: 0 0.0625rem 0.3125rem 0 rgba(1, 5, 50, 0.3);
|
|
177
181
|
word-break: break-word;
|
|
182
|
+
z-index: var(--tooltip-index);
|
|
178
183
|
|
|
179
184
|
@include mixins.transition($transition-property, 0.2s, ease-in-out);
|
|
180
185
|
|
|
@@ -39,6 +39,7 @@ export interface Props extends ComponentPropsWithRef<"div"> {
|
|
|
39
39
|
title?: string;
|
|
40
40
|
children: ReactNode;
|
|
41
41
|
domRoot?: HTMLElement;
|
|
42
|
+
icon?: Icons;
|
|
42
43
|
location?: "left" | "right" | "top" | "bottom";
|
|
43
44
|
color?: "black" | "blue";
|
|
44
45
|
position?: "start" | "center" | "end";
|
|
@@ -126,6 +127,7 @@ const TooltipComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
|
126
127
|
location = "right",
|
|
127
128
|
position = "center",
|
|
128
129
|
color = "black",
|
|
130
|
+
icon,
|
|
129
131
|
...rest
|
|
130
132
|
}: Props,
|
|
131
133
|
ref
|
|
@@ -218,7 +220,8 @@ const TooltipComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
|
218
220
|
onMouseEnter={() => setVisible(true)}
|
|
219
221
|
onMouseLeave={() => setVisible(false)}
|
|
220
222
|
icon={Icons.InfoCircle}
|
|
221
|
-
|
|
223
|
+
aria-describedby={identifier}
|
|
224
|
+
className={`${classes.icon}`}
|
|
222
225
|
/>
|
|
223
226
|
)}
|
|
224
227
|
{createPortal(
|
|
@@ -102,7 +102,6 @@ export interface CSSProperties extends ButtonColorProps {
|
|
|
102
102
|
inputHoverBackgroundColor?: string;
|
|
103
103
|
inputDisabledBackgroundColor?: string;
|
|
104
104
|
inputFontSize?: string;
|
|
105
|
-
iconFontBig?: string;
|
|
106
105
|
dragBorderStyle?: string;
|
|
107
106
|
modalTitleColor?: string;
|
|
108
107
|
modalShadowColor?: string;
|
|
@@ -229,6 +228,8 @@ export interface CSSProperties extends ButtonColorProps {
|
|
|
229
228
|
fontSizeDataGrid?: string;
|
|
230
229
|
readOnlyBorderColor?: string;
|
|
231
230
|
readOnlyTextColor?: string;
|
|
231
|
+
iconFontBig?: string;
|
|
232
|
+
tooltipIndex?: string;
|
|
232
233
|
}
|
|
233
234
|
|
|
234
235
|
export interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -319,7 +320,6 @@ export const BaseStyling = ({ children, properties = {} }: Props) => {
|
|
|
319
320
|
inputHoverBackgroundColor: "var(--default-hover-color)",
|
|
320
321
|
inputDisabledBackgroundColor: "var(--input-hover-background-color)",
|
|
321
322
|
inputFontSize: "0.875rem",
|
|
322
|
-
iconFontBig: "1.125rem",
|
|
323
323
|
dragBorderStyle: "solid",
|
|
324
324
|
modalTitleColor: "var(--font-color-h4)",
|
|
325
325
|
modalShadowColor: "rgba(0, 0, 0, 0.16)",
|
|
@@ -376,7 +376,7 @@ export const BaseStyling = ({ children, properties = {} }: Props) => {
|
|
|
376
376
|
stepperCaptionDisabledColor: "var(--color-blue-grey400)",
|
|
377
377
|
stepperCaptionErrorDisabledColor: "var(--color-red200)",
|
|
378
378
|
bannerBorderRadius: "2px",
|
|
379
|
-
bannerBorderWidth: "
|
|
379
|
+
bannerBorderWidth: "4px",
|
|
380
380
|
dataGridRowBackgroundColor: "transparent",
|
|
381
381
|
dataGridRowHoverBackgroundColor: "var(--default-hover-color)",
|
|
382
382
|
progressBarBackgroundColor: "var(--disabled)",
|
|
@@ -444,7 +444,9 @@ export const BaseStyling = ({ children, properties = {} }: Props) => {
|
|
|
444
444
|
readOnlyBorderColor: "var(--color-blue-grey100)",
|
|
445
445
|
readOnlyTextColor: "var(--color-blue-grey900)",
|
|
446
446
|
formControlFontSize: "0.875rem",
|
|
447
|
-
fontSizeDataGrid: "0.875rem"
|
|
447
|
+
fontSizeDataGrid: "0.875rem",
|
|
448
|
+
iconFontBig: "1.125rem",
|
|
449
|
+
tooltipIndex: "12"
|
|
448
450
|
};
|
|
449
451
|
|
|
450
452
|
/** We need a loading state, because otherwise you see the colors flash from the default to the possible overridden ones. */
|
package/src/index.ts
CHANGED
|
@@ -133,6 +133,10 @@ export type { Props as SideSheetHeaderProps } from "./components/Notifications/S
|
|
|
133
133
|
/** Form components */
|
|
134
134
|
export { Checkbox } from "./components/Form/Checkbox/Checkbox";
|
|
135
135
|
export type { Props as CheckboxProps } from "./components/Form/Checkbox/Checkbox";
|
|
136
|
+
export {
|
|
137
|
+
InlineCheckbox,
|
|
138
|
+
InlineCheckboxProps
|
|
139
|
+
} from "./components/InlineEditing/InlineCheckbox/InlineCheckbox";
|
|
136
140
|
export { Fieldset } from "./components/Form/Fieldset/Fieldset";
|
|
137
141
|
export type { Props as FieldsetProps } from "./components/Form/Fieldset/Fieldset";
|
|
138
142
|
export { Form } from "./components/Form/Form";
|
|
@@ -154,6 +158,10 @@ export type { Props as RadioProps } from "./components/Form/Radio/Radio";
|
|
|
154
158
|
export { RadioWrapper } from "./components/Form/Wrapper/RadioWrapper/RadioWrapper";
|
|
155
159
|
export type { Props as RadioWrapperProps } from "./components/Form/Wrapper/RadioWrapper/RadioWrapper";
|
|
156
160
|
export { Select } from "./components/Form/Select/SingleSelect/Select";
|
|
161
|
+
export {
|
|
162
|
+
InlineSelect,
|
|
163
|
+
InlineSelectProps
|
|
164
|
+
} from "./components/InlineEditing/InlineEditingSelect/InlineSelect";
|
|
157
165
|
export { MultiSelect } from "./components/Form/Select/MultiSelect/MultiSelect";
|
|
158
166
|
export type {
|
|
159
167
|
SingleSelectProps,
|