@onewelcome/react-lib-components 10.0.2 → 11.0.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/components/Breadcrumbs/Breadcrumbs.module.scss.cjs.js +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.es.js +5 -5
- package/dist/components/Button/BaseButton.module.scss.cjs.js +2 -2
- package/dist/components/Button/BaseButton.module.scss.es.js +4 -4
- package/dist/components/Button/Button.module.scss.cjs.js +2 -2
- package/dist/components/Button/Button.module.scss.es.js +17 -17
- package/dist/components/Button/IconButton.module.scss.cjs.js +2 -2
- package/dist/components/Button/IconButton.module.scss.es.js +18 -18
- package/dist/components/ContextMenu/ContextMenu.cjs.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.cjs.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.es.js +32 -19
- package/dist/components/ContextMenu/ContextMenu.es.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenu.module.scss.es.js +5 -5
- package/dist/components/ContextMenu/ContextMenuDivider.cjs.js +2 -0
- package/dist/components/ContextMenu/ContextMenuDivider.cjs.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenuDivider.es.js +9 -0
- package/dist/components/ContextMenu/ContextMenuDivider.es.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenuDivider.module.scss.cjs.js +3 -0
- package/dist/components/ContextMenu/ContextMenuDivider.module.scss.cjs.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenuDivider.module.scss.es.js +8 -0
- package/dist/components/ContextMenu/ContextMenuDivider.module.scss.es.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenuItem.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenuItem.module.scss.es.js +3 -3
- package/dist/components/DataGrid/DataGrid.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGrid.module.scss.es.js +6 -6
- package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.es.js +6 -6
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.es.js +2 -2
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.es.js +7 -7
- package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.es.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.es.js +5 -5
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.es.js +4 -4
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.es.js +5 -5
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.es.js +11 -3
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.es.js +24 -24
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.es.js +9 -9
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.es.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.es.js +8 -8
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.es.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.es.js +17 -17
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.es.js +3 -3
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.es.js +7 -7
- package/dist/components/DatePicker/DatePicker.module.scss.cjs.js +2 -2
- package/dist/components/DatePicker/DatePicker.module.scss.es.js +31 -31
- package/dist/components/Form/Checkbox/Checkbox.module.scss.cjs.js +2 -2
- package/dist/components/Form/Checkbox/Checkbox.module.scss.es.js +13 -13
- package/dist/components/Form/Fieldset/Fieldset.module.scss.cjs.js +2 -2
- package/dist/components/Form/Fieldset/Fieldset.module.scss.es.js +5 -5
- package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.cjs.js +2 -2
- package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.es.js +18 -18
- package/dist/components/Form/FileUpload/FileUpload.module.scss.cjs.js +2 -2
- package/dist/components/Form/FileUpload/FileUpload.module.scss.es.js +16 -16
- package/dist/components/Form/Form.module.scss.cjs.js +2 -2
- package/dist/components/Form/Form.module.scss.es.js +2 -2
- package/dist/components/Form/FormControl/FormControl.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormControl/FormControl.module.scss.es.js +13 -13
- package/dist/components/Form/FormErrorText/FormErrorText.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormErrorText/FormErrorText.module.scss.es.js +5 -5
- package/dist/components/Form/FormGroup/FormGroup.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormGroup/FormGroup.module.scss.es.js +3 -3
- package/dist/components/Form/FormHelperText/FormHelperText.cjs.js +1 -1
- package/dist/components/Form/FormHelperText/FormHelperText.cjs.js.map +1 -1
- package/dist/components/Form/FormHelperText/FormHelperText.es.js +1 -1
- package/dist/components/Form/FormHelperText/FormHelperText.es.js.map +1 -1
- package/dist/components/Form/FormHelperText/FormHelperText.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormHelperText/FormHelperText.module.scss.es.js +4 -4
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.es.js +6 -6
- package/dist/components/Form/Input/Input.module.scss.cjs.js +2 -2
- package/dist/components/Form/Input/Input.module.scss.es.js +9 -9
- package/dist/components/Form/Label/Label.module.scss.cjs.js +2 -2
- package/dist/components/Form/Label/Label.module.scss.es.js +2 -2
- package/dist/components/Form/Radio/Radio.module.scss.cjs.js +2 -2
- package/dist/components/Form/Radio/Radio.module.scss.es.js +11 -11
- package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.es.js +15 -15
- package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.es.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.es.js +4 -4
- package/dist/components/Form/Select/MultiSelect/useSearch.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/useSearch.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/useSearch.es.js +7 -1
- package/dist/components/Form/Select/MultiSelect/useSearch.es.js.map +1 -1
- package/dist/components/Form/Select/Select.interfaces.cjs.js.map +1 -1
- package/dist/components/Form/Select/Select.interfaces.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.cjs.js +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.cjs.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.es.js +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/SingleSelect/Select.module.scss.es.js +17 -17
- package/dist/components/Form/Select/SingleSelect/useSearch.cjs.js +1 -1
- package/dist/components/Form/Select/SingleSelect/useSearch.cjs.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/useSearch.es.js +3 -1
- package/dist/components/Form/Select/SingleSelect/useSearch.es.js.map +1 -1
- package/dist/components/Form/Select/useAddNewBtn.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/useAddNewBtn.module.scss.es.js +4 -4
- package/dist/components/Form/Textarea/Textarea.module.scss.cjs.js +2 -2
- package/dist/components/Form/Textarea/Textarea.module.scss.es.js +6 -6
- package/dist/components/Form/Toggle/Toggle.cjs.js.map +1 -1
- package/dist/components/Form/Toggle/Toggle.es.js.map +1 -1
- package/dist/components/Form/Toggle/Toggle.module.scss.cjs.js +2 -2
- package/dist/components/Form/Toggle/Toggle.module.scss.es.js +18 -18
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.es.js +4 -4
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.es.js +8 -8
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.es.js +6 -6
- package/dist/components/Icon/Icon.module.scss.cjs.js +2 -2
- package/dist/components/Icon/Icon.module.scss.es.js +104 -104
- package/dist/components/InlineEditing/InlineCheckbox/InlineCheckbox.cjs.js.map +1 -1
- package/dist/components/InlineEditing/InlineCheckbox/InlineCheckbox.es.js.map +1 -1
- package/dist/components/InlineEditing/InlineEditingSelect/InlineSelect.cjs.js.map +1 -1
- package/dist/components/InlineEditing/InlineEditingSelect/InlineSelect.es.js.map +1 -1
- package/dist/components/Layout/Card/Card.module.scss.cjs.js +2 -2
- package/dist/components/Layout/Card/Card.module.scss.es.js +12 -12
- package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.cjs.js +2 -2
- package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.es.js +12 -12
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.es.js +4 -4
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.es.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.es.js +3 -3
- package/dist/components/Link/Link.module.scss.cjs.js +2 -2
- package/dist/components/Link/Link.module.scss.es.js +16 -16
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.es.js +11 -11
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.es.js +22 -22
- package/dist/components/Notifications/Banner/Banner.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Banner/Banner.module.scss.es.js +9 -9
- package/dist/components/Notifications/BaseModal/BaseModal.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModal.module.scss.es.js +5 -5
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.es.js +4 -4
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.es.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.es.js +6 -6
- package/dist/components/Notifications/Dialog/Dialog.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/Dialog.module.scss.es.js +4 -4
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.es.js +3 -3
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.es.js +10 -10
- package/dist/components/Notifications/SideSheet/SideSheet.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheet.module.scss.es.js +13 -13
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.es.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.es.js +2 -2
- package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.es.js +10 -10
- package/dist/components/Pagination/Pagination.cjs.js +1 -1
- package/dist/components/Pagination/Pagination.cjs.js.map +1 -1
- package/dist/components/Pagination/Pagination.es.js +1 -1
- package/dist/components/Pagination/Pagination.es.js.map +1 -1
- package/dist/components/Pagination/Pagination.module.scss.cjs.js +2 -2
- package/dist/components/Pagination/Pagination.module.scss.es.js +14 -14
- package/dist/components/Popover/Popover.cjs.js +1 -1
- package/dist/components/Popover/Popover.cjs.js.map +1 -1
- package/dist/components/Popover/Popover.es.js +32 -9
- package/dist/components/Popover/Popover.es.js.map +1 -1
- package/dist/components/Popover/Popover.module.scss.cjs.js +2 -2
- package/dist/components/Popover/Popover.module.scss.es.js +3 -3
- package/dist/components/ProgressBar/ProgressBar.module.scss.cjs.js +2 -2
- package/dist/components/ProgressBar/ProgressBar.module.scss.es.js +9 -9
- package/dist/components/Skeleton/Skeleton.module.scss.cjs.js +2 -2
- package/dist/components/Skeleton/Skeleton.module.scss.es.js +5 -5
- package/dist/components/Spinner/Spinner.module.scss.cjs.js +2 -2
- package/dist/components/Spinner/Spinner.module.scss.es.js +3 -3
- package/dist/components/Stepper/Step.module.scss.cjs.js +2 -2
- package/dist/components/Stepper/Step.module.scss.es.js +22 -22
- package/dist/components/Stepper/Stepper.module.scss.cjs.js +2 -2
- package/dist/components/Stepper/Stepper.module.scss.es.js +4 -4
- package/dist/components/Tabs/Tab.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/Tab.module.scss.es.js +3 -3
- package/dist/components/Tabs/TabButton.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/TabButton.module.scss.es.js +12 -12
- package/dist/components/Tabs/Tabs.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/Tabs.module.scss.es.js +10 -10
- package/dist/components/Tag/RemoveButton.module.scss.cjs.js +2 -2
- package/dist/components/Tag/RemoveButton.module.scss.es.js +3 -3
- package/dist/components/Tag/Tag.module.scss.cjs.js +2 -2
- package/dist/components/Tag/Tag.module.scss.es.js +6 -6
- package/dist/components/TextEllipsis/TextEllipsis.module.scss.cjs.js +2 -2
- package/dist/components/TextEllipsis/TextEllipsis.module.scss.es.js +3 -3
- package/dist/components/Tiles/Tile.module.scss.cjs.js +2 -2
- package/dist/components/Tiles/Tile.module.scss.es.js +8 -8
- package/dist/components/Tiles/Tiles.module.scss.cjs.js +2 -2
- package/dist/components/Tiles/Tiles.module.scss.es.js +2 -2
- package/dist/components/Tooltip/Tooltip.cjs.js +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.es.js +38 -12
- package/dist/components/Tooltip/Tooltip.es.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.module.scss.cjs.js +2 -2
- package/dist/components/Tooltip/Tooltip.module.scss.es.js +27 -27
- package/dist/components/Typography/Typography.module.scss.cjs.js +2 -2
- package/dist/components/Typography/Typography.module.scss.es.js +13 -13
- package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.es.js +5 -5
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.es.js +14 -14
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.es.js +3 -3
- package/dist/components/miscellaneous/IdentityProviderButton.module.scss.cjs.js +2 -2
- package/dist/components/miscellaneous/IdentityProviderButton.module.scss.es.js +3 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.es.js +2 -0
- package/dist/index.es.js.map +1 -1
- package/dist/readyclasses.module.scss.cjs.js +2 -2
- package/dist/readyclasses.module.scss.es.js +5 -5
- package/package.json +5 -47
- package/LICENSE +0 -202
- package/README.md +0 -94
package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.cjs.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".SideSheetContent_side-sheet-
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default={"side-sheet-content":"SideSheetContent_side-sheet-
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".SideSheetContent_side-sheet-content_HO9cY{padding:1.5rem}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default={"side-sheet-content":"SideSheetContent_side-sheet-content_HO9cY"};
|
|
3
3
|
//# sourceMappingURL=SideSheetContent.module.scss.cjs.js.map
|
package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".SideSheetContent_side-sheet-
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".SideSheetContent_side-sheet-content_HO9cY{padding:1.5rem}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
2
|
const classes = {
|
|
3
|
-
"side-sheet-content": "SideSheetContent_side-sheet-
|
|
3
|
+
"side-sheet-content": "SideSheetContent_side-sheet-content_HO9cY"
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
6
|
classes as default
|
package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.cjs.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".SideSheetHeader_side-sheet-
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default={"side-sheet-header":"SideSheetHeader_side-sheet-
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".SideSheetHeader_side-sheet-header_HO9cY{padding:1rem 1.5rem}")),document.head.appendChild(e)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default={"side-sheet-header":"SideSheetHeader_side-sheet-header_HO9cY"};
|
|
3
3
|
//# sourceMappingURL=SideSheetHeader.module.scss.cjs.js.map
|
package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".SideSheetHeader_side-sheet-
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".SideSheetHeader_side-sheet-header_HO9cY{padding:1rem 1.5rem}")),document.head.appendChild(e)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}}();
|
|
2
2
|
const classes = {
|
|
3
|
-
"side-sheet-header": "SideSheetHeader_side-sheet-
|
|
3
|
+
"side-sheet-header": "SideSheetHeader_side-sheet-header_HO9cY"
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
6
|
classes as default
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.SlideInModal_sr-
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.SlideInModal_sr-only_HO9cY{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.SlideInModal_hidden_HO9cY{display:none}.SlideInModal_slide-in_HO9cY{animation:SlideInModal_slide-in_HO9cY .5s forwards}@media (prefers-reduced-motion: reduce){.SlideInModal_slide-in_HO9cY{animation-duration:.1ms}}.SlideInModal_slide-out_HO9cY{animation:SlideInModal_slide-out_HO9cY .5s forwards}@media (prefers-reduced-motion: reduce){.SlideInModal_slide-out_HO9cY{animation-duration:.1ms}}@keyframes SlideInModal_slide-in_HO9cY{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes SlideInModal_slide-out_HO9cY{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.SlideInModal_slide-in-modal_HO9cY{justify-content:flex-end;visibility:visible;transform:translate(120%);transition-property:transform;transition-duration:.5s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){.SlideInModal_slide-in-modal_HO9cY{transition-duration:.1ms}}.SlideInModal_slide-in-modal_HO9cY.SlideInModal_hide_HO9cY{visibility:hidden}.SlideInModal_slide-in-modal_HO9cY.SlideInModal_visible_HO9cY{visibility:visible;transform:translate(0)}.SlideInModal_slide-in-modal_HO9cY.SlideInModal_visible_HO9cY #SlideInModal_backdrop-slide_HO9cY,#SlideInModal_backdrop-slide_HO9cY{background-color:transparent}@media only screen and (min-width: 50rem){.SlideInModal_container_HO9cY{margin-top:0;width:50rem;height:100%;max-height:unset;border-radius:0;box-shadow:0 1.875rem 3.125rem var(--modal-shadow-color)}}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="SlideInModal_hidden_HO9cY",d="SlideInModal_hide_HO9cY",i="SlideInModal_visible_HO9cY",l="SlideInModal_container_HO9cY",o={"sr-only":"SlideInModal_sr-only_HO9cY",hidden:e,"slide-in":"SlideInModal_slide-in_HO9cY","slide-out":"SlideInModal_slide-out_HO9cY","slide-in-modal":"SlideInModal_slide-in-modal_HO9cY",hide:d,visible:i,"backdrop-slide":"SlideInModal_backdrop-slide_HO9cY",container:l};exports.container=l,exports.default=o,exports.hidden=e,exports.hide=d,exports.visible=i;
|
|
3
3
|
//# sourceMappingURL=SlideInModal.module.scss.cjs.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.SlideInModal_sr-
|
|
2
|
-
const hidden = "
|
|
3
|
-
const hide = "
|
|
4
|
-
const visible = "
|
|
5
|
-
const container = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.SlideInModal_sr-only_HO9cY{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.SlideInModal_hidden_HO9cY{display:none}.SlideInModal_slide-in_HO9cY{animation:SlideInModal_slide-in_HO9cY .5s forwards}@media (prefers-reduced-motion: reduce){.SlideInModal_slide-in_HO9cY{animation-duration:.1ms}}.SlideInModal_slide-out_HO9cY{animation:SlideInModal_slide-out_HO9cY .5s forwards}@media (prefers-reduced-motion: reduce){.SlideInModal_slide-out_HO9cY{animation-duration:.1ms}}@keyframes SlideInModal_slide-in_HO9cY{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes SlideInModal_slide-out_HO9cY{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.SlideInModal_slide-in-modal_HO9cY{justify-content:flex-end;visibility:visible;transform:translate(120%);transition-property:transform;transition-duration:.5s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){.SlideInModal_slide-in-modal_HO9cY{transition-duration:.1ms}}.SlideInModal_slide-in-modal_HO9cY.SlideInModal_hide_HO9cY{visibility:hidden}.SlideInModal_slide-in-modal_HO9cY.SlideInModal_visible_HO9cY{visibility:visible;transform:translate(0)}.SlideInModal_slide-in-modal_HO9cY.SlideInModal_visible_HO9cY #SlideInModal_backdrop-slide_HO9cY,#SlideInModal_backdrop-slide_HO9cY{background-color:transparent}@media only screen and (min-width: 50rem){.SlideInModal_container_HO9cY{margin-top:0;width:50rem;height:100%;max-height:unset;border-radius:0;box-shadow:0 1.875rem 3.125rem var(--modal-shadow-color)}}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
|
|
2
|
+
const hidden = "SlideInModal_hidden_HO9cY";
|
|
3
|
+
const hide = "SlideInModal_hide_HO9cY";
|
|
4
|
+
const visible = "SlideInModal_visible_HO9cY";
|
|
5
|
+
const container = "SlideInModal_container_HO9cY";
|
|
6
6
|
const classes = {
|
|
7
|
-
"sr-only": "SlideInModal_sr-
|
|
7
|
+
"sr-only": "SlideInModal_sr-only_HO9cY",
|
|
8
8
|
hidden,
|
|
9
|
-
"slide-in": "SlideInModal_slide-
|
|
10
|
-
"slide-out": "SlideInModal_slide-
|
|
11
|
-
"slide-in-modal": "SlideInModal_slide-in-
|
|
9
|
+
"slide-in": "SlideInModal_slide-in_HO9cY",
|
|
10
|
+
"slide-out": "SlideInModal_slide-out_HO9cY",
|
|
11
|
+
"slide-in-modal": "SlideInModal_slide-in-modal_HO9cY",
|
|
12
12
|
hide,
|
|
13
13
|
visible,
|
|
14
|
-
"backdrop-slide": "SlideInModal_backdrop-
|
|
14
|
+
"backdrop-slide": "SlideInModal_backdrop-slide_HO9cY",
|
|
15
15
|
container
|
|
16
16
|
};
|
|
17
17
|
export {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./Pagination.module.scss.cjs.js"),a=require("../../readyclasses.module.scss.cjs.js"),l=require("../Button/IconButton.cjs.js"),n=require("../Icon/Icon.cjs.js"),r=require("../Form/Select/SingleSelect/Select.cjs.js"),c=require("../Form/Select/SingleSelect/Option.cjs.js"),s=require("../Form/Label/Label.cjs.js");var i=(e=>(e.totalItems="items in total",e.itemsPerPage="Items per page",e.currentPage="of %1 pages",e.itemsPerPageLabel="Select how many items per page you want to see.",e.currentPageLabel="What page you are currently on.",e))(i||{});const o=e.forwardRef((({totalElements:o,pageSize:u=10,translate:m=i,currentPage:p,className:g,onPageChange:d,onPageSizeChange:f,...v},E)=>{const b=o?Math.ceil(o/u)<1?1:Math.ceil(o/u):1,[S,I]=e.useState(!1),h=e=>{d(e)};return e.useEffect((()=>{S&&I(!1)}),[S]),null==o||0===o?null:e.createElement("div",{...v,ref:E,className:`${t.default["pagination-wrapper"]} ${g??""}`},e.createElement("div",{className:t.default.left},u&&e.createElement("div",{className:t.default["per-page"]},e.createElement(s.Label,{id:"page-size-select-label",htmlFor:"page-size-select",className:t.default.label},m.itemsPerPage),e.createElement(r.Select,{name:"page-size-select",id:"page-size-select",labeledBy:"page-size-select-label",className:`${t.default["form-element"]} ${t.default["page-size-select"]}`,value:u.toString(),onChange:e=>{const t=Number(e.target.value);I(!0),f(t)}},e.createElement(c.Option,{value:"10"},"10"),e.createElement(c.Option,{value:"25"},"25"),e.createElement(c.Option,{value:"50"},"50"))),e.createElement("div",{className:t.default.total},e.createElement("span",{tabIndex:0},o," ",m.totalItems))),e.createElement("div",{className:t.default.pagination},e.createElement(e.Fragment,null,!!b&&e.createElement("div",{className:t.default.page},e.createElement(s.Label,{id:"current-value-input-label",htmlFor:"current-value-input",className:`${a.default["sr-only"]} ${t.default["current-value-select-label"]}`},m.currentPageLabel),e.createElement(r.Select,{labeledBy:"current-value-input-label",key:"input",id:"current-value-input",size:p.toString().length,onChange:e=>h(Number(e.target.value)),name:"current-value-input",value:p.toString(),className:`${t.default["form-element"]} ${t.default["current-page-select"]}`,search:{enabled:!0,searchInputProps:{wrapperProps:{className:t.default["search-input-wrapper"]}
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./Pagination.module.scss.cjs.js"),a=require("../../readyclasses.module.scss.cjs.js"),l=require("../Button/IconButton.cjs.js"),n=require("../Icon/Icon.cjs.js"),r=require("../Form/Select/SingleSelect/Select.cjs.js"),c=require("../Form/Select/SingleSelect/Option.cjs.js"),s=require("../Form/Label/Label.cjs.js");var i=(e=>(e.totalItems="items in total",e.itemsPerPage="Items per page",e.currentPage="of %1 pages",e.itemsPerPageLabel="Select how many items per page you want to see.",e.currentPageLabel="What page you are currently on.",e))(i||{});const o=e.forwardRef((({totalElements:o,pageSize:u=10,translate:m=i,currentPage:p,className:g,onPageChange:d,onPageSizeChange:f,...v},E)=>{const b=o?Math.ceil(o/u)<1?1:Math.ceil(o/u):1,[S,I]=e.useState(!1),h=e=>{d(e)};return e.useEffect((()=>{S&&I(!1)}),[S]),null==o||0===o?null:e.createElement("div",{...v,ref:E,className:`${t.default["pagination-wrapper"]} ${g??""}`},e.createElement("div",{className:t.default.left},u&&e.createElement("div",{className:t.default["per-page"]},e.createElement(s.Label,{id:"page-size-select-label",htmlFor:"page-size-select",className:t.default.label},m.itemsPerPage),e.createElement(r.Select,{name:"page-size-select",id:"page-size-select",labeledBy:"page-size-select-label",className:`${t.default["form-element"]} ${t.default["page-size-select"]}`,value:u.toString(),onChange:e=>{const t=Number(e.target.value);I(!0),f(t)}},e.createElement(c.Option,{value:"10"},"10"),e.createElement(c.Option,{value:"25"},"25"),e.createElement(c.Option,{value:"50"},"50"))),e.createElement("div",{className:t.default.total},e.createElement("span",{tabIndex:0},o," ",m.totalItems))),e.createElement("div",{className:t.default.pagination},e.createElement(e.Fragment,null,!!b&&e.createElement("div",{className:t.default.page},e.createElement(s.Label,{id:"current-value-input-label",htmlFor:"current-value-input",className:`${a.default["sr-only"]} ${t.default["current-value-select-label"]}`},m.currentPageLabel),e.createElement(r.Select,{labeledBy:"current-value-input-label",key:"input",id:"current-value-input",size:p.toString().length,onChange:e=>h(Number(e.target.value)),name:"current-value-input",value:p.toString(),className:`${t.default["form-element"]} ${t.default["current-page-select"]}`,search:{enabled:!0,searchInputProps:{wrapperProps:{className:t.default["search-input-wrapper"]},...S&&{reset:!0},autoComplete:"off"}}},Array.from(Array(b).keys()).map((t=>e.createElement(c.Option,{key:t,value:(t+1).toString()},(t+1).toString())))),e.createElement("span",{className:t.default["page-total"]},m.currentPage.replace("%1",Math.ceil(o/u).toString()))),!!p&&e.createElement("div",{className:t.default.previous},e.createElement(l.IconButton,{disabled:p<=1,title:"first",onClick:()=>h(1),"data-paginate":"first"},e.createElement(n.Icon,{icon:n.Icons.NavigationFirst})),e.createElement(l.IconButton,{disabled:p<=1,title:"previous",onClick:()=>h(p-1),"data-paginate":"previous"},e.createElement(n.Icon,{icon:n.Icons.ChevronLeft}))),e.createElement("div",{className:t.default.next},void 0!==p&&e.createElement(l.IconButton,{disabled:p>=b,title:"next",onClick:()=>h(p+1),"data-paginate":"next"},e.createElement(n.Icon,{icon:n.Icons.ChevronRight})),!!p&&e.createElement(l.IconButton,{disabled:p>=b,title:"last",onClick:()=>h(Math.ceil(o/u)),"data-paginate":"last"},e.createElement(n.Icon,{icon:n.Icons.NavigationLast}))))))}));exports.Pagination=o;
|
|
2
2
|
//# sourceMappingURL=Pagination.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.cjs.js","sources":["../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n ForwardRefRenderFunction,\n ComponentPropsWithRef,\n Fragment,\n useState,\n useEffect\n} from \"react\";\nimport classes from \"./Pagination.module.scss\";\nimport readyclasses from \"../../readyclasses.module.scss\";\nimport { IconButton } from \"../Button/IconButton\";\nimport { Icons, Icon } from \"../Icon/Icon\";\nimport { Select } from \"../Form/Select/SingleSelect/Select\";\nimport { Option } from \"../Form/Select/SingleSelect/Option\";\nimport { Label } from \"../Form/Label/Label\";\n\nexport type PaginationTranslations = {\n totalItems: string;\n itemsPerPage: string;\n itemsPerPageLabel: string;\n currentPage: string;\n currentPageLabel: string;\n};\n\nexport type PageChangeLabels = \"next\" | \"previous\" | \"first\" | \"last\";\n\nenum DefaultTranslations {\n totalItems = \"items in total\",\n itemsPerPage = \"Items per page\",\n currentPage = \"of %1 pages\",\n itemsPerPageLabel = \"Select how many items per page you want to see.\",\n currentPageLabel = \"What page you are currently on.\"\n}\n\nexport type PageSize = 10 | 25 | 50;\n\nexport interface Props extends Omit<ComponentPropsWithRef<\"div\">, \"translate\"> {\n currentPage: number;\n totalElements?: number;\n pageSize?: PageSize;\n translate?: PaginationTranslations;\n onPageChange: (pageToGoTo: number) => void;\n onPageSizeChange: (pageSize: PageSize) => void;\n}\n\nconst PaginationComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n totalElements,\n pageSize = 10,\n translate = DefaultTranslations,\n currentPage,\n className,\n onPageChange,\n onPageSizeChange,\n ...rest\n }: Props,\n ref\n) => {\n const calculateAmountOfPages = () => {\n if (!totalElements) {\n return 1;\n }\n\n if (Math.ceil(totalElements / pageSize) < 1) {\n return 1;\n }\n\n return Math.ceil(totalElements / pageSize);\n };\n const pagesAmount = calculateAmountOfPages();\n const [resetPageNoSelect, setResetPageNoSelect] = useState(false);\n\n const onPageSizeChangeHandler = (event: React.ChangeEvent<HTMLSelectElement>) => {\n const pageSizeNumber = Number(event.target.value) as PageSize;\n setResetPageNoSelect(true);\n onPageSizeChange(pageSizeNumber);\n };\n\n const onPageChangeHandler = (pageToGoTo: number) => {\n onPageChange(pageToGoTo);\n };\n\n useEffect(() => {\n resetPageNoSelect && setResetPageNoSelect(false);\n }, [resetPageNoSelect]);\n\n if (totalElements === undefined || totalElements === null || totalElements === 0) {\n return null;\n }\n\n return (\n <div {...rest} ref={ref} className={`${classes[\"pagination-wrapper\"]} ${className ?? \"\"}`}>\n <div className={classes[\"left\"]}>\n {pageSize && (\n <div className={classes[\"per-page\"]}>\n <Label\n id=\"page-size-select-label\"\n htmlFor=\"page-size-select\"\n className={classes[\"label\"]}\n >\n {translate.itemsPerPage}\n </Label>\n <Select\n name=\"page-size-select\"\n id=\"page-size-select\"\n labeledBy=\"page-size-select-label\"\n className={`${classes[\"form-element\"]} ${classes[\"page-size-select\"]}`}\n value={pageSize.toString()}\n onChange={onPageSizeChangeHandler}\n >\n <Option value=\"10\">10</Option>\n <Option value=\"25\">25</Option>\n <Option value=\"50\">50</Option>\n </Select>\n </div>\n )}\n <div className={classes[\"total\"]}>\n <span tabIndex={0}>\n {totalElements} {translate.totalItems}\n </span>\n </div>\n </div>\n <div className={classes[\"pagination\"]}>\n <Fragment>\n {!!pagesAmount && (\n <div className={classes[\"page\"]}>\n <Label\n id=\"current-value-input-label\"\n htmlFor=\"current-value-input\"\n className={`${readyclasses[\"sr-only\"]} ${classes[\"current-value-select-label\"]}`}\n >\n {translate.currentPageLabel}\n </Label>\n <Select\n labeledBy=\"current-value-input-label\"\n key=\"input\"\n id=\"current-value-input\"\n size={currentPage.toString().length}\n onChange={(e: React.ChangeEvent<HTMLSelectElement>) =>\n onPageChangeHandler(Number(e.target.value))\n }\n name=\"current-value-input\"\n value={currentPage.toString()}\n className={`${classes[\"form-element\"]} ${classes[\"current-page-select\"]}`}\n search={{\n enabled: true,\n searchInputProps: {\n wrapperProps: { className: classes[\"search-input-wrapper\"] },\n reset: resetPageNoSelect ? resetPageNoSelect : undefined,\n autoComplete: \"off\"\n }\n }}\n >\n {Array.from(Array(pagesAmount).keys()).map(page => (\n <Option key={page} value={(page + 1).toString()}>\n {(page + 1).toString()}\n </Option>\n ))}\n </Select>\n <span className={classes[\"page-total\"]}>\n {translate.currentPage.replace(\n \"%1\",\n Math.ceil(totalElements / pageSize).toString()\n )}\n </span>\n </div>\n )}\n {!!currentPage && (\n <div className={classes[\"previous\"]}>\n {\n <IconButton\n disabled={currentPage <= 1}\n title=\"first\"\n onClick={() => onPageChangeHandler(1)}\n data-paginate=\"first\"\n >\n <Icon icon={Icons.NavigationFirst} />\n </IconButton>\n }\n {\n <IconButton\n disabled={currentPage <= 1}\n title=\"previous\"\n onClick={() => onPageChangeHandler(currentPage - 1)}\n data-paginate=\"previous\"\n >\n <Icon icon={Icons.ChevronLeft} />\n </IconButton>\n }\n </div>\n )}\n <div className={classes[\"next\"]}>\n {(currentPage !== undefined || false) && (\n <IconButton\n disabled={currentPage >= pagesAmount}\n title=\"next\"\n onClick={() => onPageChangeHandler(currentPage + 1)}\n data-paginate=\"next\"\n >\n <Icon icon={Icons.ChevronRight} />\n </IconButton>\n )}\n {!!currentPage && (\n <IconButton\n disabled={currentPage >= pagesAmount}\n title=\"last\"\n onClick={() => onPageChangeHandler(Math.ceil(totalElements / pageSize))}\n data-paginate=\"last\"\n >\n <Icon icon={Icons.NavigationLast} />\n </IconButton>\n )}\n </div>\n </Fragment>\n </div>\n </div>\n );\n};\n\nexport const Pagination = React.forwardRef(PaginationComponent);\n"],"names":["DefaultTranslations","Pagination","React","forwardRef","totalElements","pageSize","translate","currentPage","className","onPageChange","onPageSizeChange","rest","ref","pagesAmount","Math","ceil","resetPageNoSelect","setResetPageNoSelect","useState","onPageChangeHandler","pageToGoTo","useEffect","createElement","classes","default","Label","id","htmlFor","itemsPerPage","Select","name","labeledBy","value","toString","onChange","event","pageSizeNumber","Number","target","Option","tabIndex","totalItems","Fragment","readyclasses","currentPageLabel","key","size","length","e","search","enabled","searchInputProps","wrapperProps","reset","autoComplete","Array","from","keys","map","page","replace","IconButton","disabled","title","onClick","Icon","icon","Icons","NavigationFirst","ChevronLeft","ChevronRight","NavigationLast"],"mappings":"yaAyCA,IAAKA,GAAAA,IACHA,EAAa,WAAA,iBACbA,EAAe,aAAA,iBACfA,EAAc,YAAA,cACdA,EAAoB,kBAAA,kDACpBA,EAAmB,iBAAA,kCALhBA,IAAAA,GAAA,CAAA,GAmBL,MA8KaC,EAAaC,EAAMC,YA9K6C,EAEzEC,gBACAC,WAAW,GACXC,YAAYN,EACZO,cACAC,YACAC,eACAC,sBACGC,GAELC,KAEA,MAWMC,EAVCT,EAIDU,KAAKC,KAAKX,EAAgBC,GAAY,EACjC,EAGFS,KAAKC,KAAKX,EAAgBC,GAPxB,GAUJW,EAAmBC,GAAwBC,EAAAA,UAAS,GAQrDC,EAAuBC,IAC3BX,EAAaW,EAAU,EAOzB,OAJAC,EAAAA,WAAU,KACRL,GAAqBC,GAAqB,EAAK,GAC9C,CAACD,IAEAZ,SAA2E,IAAlBA,EACpD,OAIPkB,cAAC,MAAK,IAAGX,EAAMC,MAAUJ,UAAW,GAAGe,EAAQC,QAAA,yBAAyBhB,GAAa,MAClFN,EAAAoB,cAA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,EAAoBL,KAAKC,KAAKX,EAAgBC,IAC7D,gBAAc,QAEbH,EAAAoB,cAAA2C,EAAAA,KAAA,CAAKC,KAAMC,EAAAA,MAAMI,qBAM9B"}
|
|
1
|
+
{"version":3,"file":"Pagination.cjs.js","sources":["../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n ForwardRefRenderFunction,\n ComponentPropsWithRef,\n Fragment,\n useState,\n useEffect\n} from \"react\";\nimport classes from \"./Pagination.module.scss\";\nimport readyclasses from \"../../readyclasses.module.scss\";\nimport { IconButton } from \"../Button/IconButton\";\nimport { Icons, Icon } from \"../Icon/Icon\";\nimport { Select } from \"../Form/Select/SingleSelect/Select\";\nimport { Option } from \"../Form/Select/SingleSelect/Option\";\nimport { Label } from \"../Form/Label/Label\";\n\nexport type PaginationTranslations = {\n totalItems: string;\n itemsPerPage: string;\n itemsPerPageLabel: string;\n currentPage: string;\n currentPageLabel: string;\n};\n\nexport type PageChangeLabels = \"next\" | \"previous\" | \"first\" | \"last\";\n\nenum DefaultTranslations {\n totalItems = \"items in total\",\n itemsPerPage = \"Items per page\",\n currentPage = \"of %1 pages\",\n itemsPerPageLabel = \"Select how many items per page you want to see.\",\n currentPageLabel = \"What page you are currently on.\"\n}\n\nexport type PageSize = 10 | 25 | 50;\n\nexport interface Props extends Omit<ComponentPropsWithRef<\"div\">, \"translate\"> {\n currentPage: number;\n totalElements?: number;\n pageSize?: PageSize;\n translate?: PaginationTranslations;\n onPageChange: (pageToGoTo: number) => void;\n onPageSizeChange: (pageSize: PageSize) => void;\n}\n\nconst PaginationComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n totalElements,\n pageSize = 10,\n translate = DefaultTranslations,\n currentPage,\n className,\n onPageChange,\n onPageSizeChange,\n ...rest\n }: Props,\n ref\n) => {\n const calculateAmountOfPages = () => {\n if (!totalElements) {\n return 1;\n }\n\n if (Math.ceil(totalElements / pageSize) < 1) {\n return 1;\n }\n\n return Math.ceil(totalElements / pageSize);\n };\n const pagesAmount = calculateAmountOfPages();\n const [resetPageNoSelect, setResetPageNoSelect] = useState(false);\n\n const onPageSizeChangeHandler = (event: React.ChangeEvent<HTMLSelectElement>) => {\n const pageSizeNumber = Number(event.target.value) as PageSize;\n setResetPageNoSelect(true);\n onPageSizeChange(pageSizeNumber);\n };\n\n const onPageChangeHandler = (pageToGoTo: number) => {\n onPageChange(pageToGoTo);\n };\n\n useEffect(() => {\n resetPageNoSelect && setResetPageNoSelect(false);\n }, [resetPageNoSelect]);\n\n if (totalElements === undefined || totalElements === null || totalElements === 0) {\n return null;\n }\n\n return (\n <div {...rest} ref={ref} className={`${classes[\"pagination-wrapper\"]} ${className ?? \"\"}`}>\n <div className={classes[\"left\"]}>\n {pageSize && (\n <div className={classes[\"per-page\"]}>\n <Label\n id=\"page-size-select-label\"\n htmlFor=\"page-size-select\"\n className={classes[\"label\"]}\n >\n {translate.itemsPerPage}\n </Label>\n <Select\n name=\"page-size-select\"\n id=\"page-size-select\"\n labeledBy=\"page-size-select-label\"\n className={`${classes[\"form-element\"]} ${classes[\"page-size-select\"]}`}\n value={pageSize.toString()}\n onChange={onPageSizeChangeHandler}\n >\n <Option value=\"10\">10</Option>\n <Option value=\"25\">25</Option>\n <Option value=\"50\">50</Option>\n </Select>\n </div>\n )}\n <div className={classes[\"total\"]}>\n <span tabIndex={0}>\n {totalElements} {translate.totalItems}\n </span>\n </div>\n </div>\n <div className={classes[\"pagination\"]}>\n <Fragment>\n {!!pagesAmount && (\n <div className={classes[\"page\"]}>\n <Label\n id=\"current-value-input-label\"\n htmlFor=\"current-value-input\"\n className={`${readyclasses[\"sr-only\"]} ${classes[\"current-value-select-label\"]}`}\n >\n {translate.currentPageLabel}\n </Label>\n <Select\n labeledBy=\"current-value-input-label\"\n key=\"input\"\n id=\"current-value-input\"\n size={currentPage.toString().length}\n onChange={(e: React.ChangeEvent<HTMLSelectElement>) =>\n onPageChangeHandler(Number(e.target.value))\n }\n name=\"current-value-input\"\n value={currentPage.toString()}\n className={`${classes[\"form-element\"]} ${classes[\"current-page-select\"]}`}\n search={{\n enabled: true,\n searchInputProps: {\n wrapperProps: { className: classes[\"search-input-wrapper\"] },\n ...(resetPageNoSelect && { reset: true }),\n autoComplete: \"off\"\n }\n }}\n >\n {Array.from(Array(pagesAmount).keys()).map(page => (\n <Option key={page} value={(page + 1).toString()}>\n {(page + 1).toString()}\n </Option>\n ))}\n </Select>\n <span className={classes[\"page-total\"]}>\n {translate.currentPage.replace(\n \"%1\",\n Math.ceil(totalElements / pageSize).toString()\n )}\n </span>\n </div>\n )}\n {!!currentPage && (\n <div className={classes[\"previous\"]}>\n {\n <IconButton\n disabled={currentPage <= 1}\n title=\"first\"\n onClick={() => onPageChangeHandler(1)}\n data-paginate=\"first\"\n >\n <Icon icon={Icons.NavigationFirst} />\n </IconButton>\n }\n {\n <IconButton\n disabled={currentPage <= 1}\n title=\"previous\"\n onClick={() => onPageChangeHandler(currentPage - 1)}\n data-paginate=\"previous\"\n >\n <Icon icon={Icons.ChevronLeft} />\n </IconButton>\n }\n </div>\n )}\n <div className={classes[\"next\"]}>\n {(currentPage !== undefined || false) && (\n <IconButton\n disabled={currentPage >= pagesAmount}\n title=\"next\"\n onClick={() => onPageChangeHandler(currentPage + 1)}\n data-paginate=\"next\"\n >\n <Icon icon={Icons.ChevronRight} />\n </IconButton>\n )}\n {!!currentPage && (\n <IconButton\n disabled={currentPage >= pagesAmount}\n title=\"last\"\n onClick={() => onPageChangeHandler(Math.ceil(totalElements / pageSize))}\n data-paginate=\"last\"\n >\n <Icon icon={Icons.NavigationLast} />\n </IconButton>\n )}\n </div>\n </Fragment>\n </div>\n </div>\n );\n};\n\nexport const Pagination = React.forwardRef(PaginationComponent);\n"],"names":["DefaultTranslations","Pagination","React","forwardRef","totalElements","pageSize","translate","currentPage","className","onPageChange","onPageSizeChange","rest","ref","pagesAmount","Math","ceil","resetPageNoSelect","setResetPageNoSelect","useState","onPageChangeHandler","pageToGoTo","useEffect","createElement","classes","default","Label","id","htmlFor","itemsPerPage","Select","name","labeledBy","value","toString","onChange","event","pageSizeNumber","Number","target","Option","tabIndex","totalItems","Fragment","readyclasses","currentPageLabel","key","size","length","e","search","enabled","searchInputProps","wrapperProps","reset","autoComplete","Array","from","keys","map","page","replace","IconButton","disabled","title","onClick","Icon","icon","Icons","NavigationFirst","ChevronLeft","ChevronRight","NavigationLast"],"mappings":"yaAyCA,IAAKA,GAAAA,IACHA,EAAa,WAAA,iBACbA,EAAe,aAAA,iBACfA,EAAc,YAAA,cACdA,EAAoB,kBAAA,kDACpBA,EAAmB,iBAAA,kCALhBA,IAAAA,GAAA,CAAA,GAmBL,MA8KaC,EAAaC,EAAMC,YA9K6C,EAEzEC,gBACAC,WAAW,GACXC,YAAYN,EACZO,cACAC,YACAC,eACAC,sBACGC,GAELC,KAEA,MAWMC,EAVCT,EAIDU,KAAKC,KAAKX,EAAgBC,GAAY,EACjC,EAGFS,KAAKC,KAAKX,EAAgBC,GAPxB,GAUJW,EAAmBC,GAAwBC,EAAAA,UAAS,GAQrDC,EAAuBC,IAC3BX,EAAaW,EAAU,EAOzB,OAJAC,EAAAA,WAAU,KACRL,GAAqBC,GAAqB,EAAK,GAC9C,CAACD,IAEAZ,SAA2E,IAAlBA,EACpD,OAIPkB,cAAC,MAAK,IAAGX,EAAMC,MAAUJ,UAAW,GAAGe,EAAQC,QAAA,yBAAyBhB,GAAa,MAClFN,EAAAoB,cAAA,MAAA,CAAId,UAAWe,EAAAC,QAAc,MAC3BnB,GACCH,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QAEbH,EAAAoB,cAAA2C,EAAAA,KAAA,CAAKC,KAAMC,EAAAA,MAAMI,qBAM9B"}
|
|
@@ -93,7 +93,7 @@ const PaginationComponent = ({
|
|
|
93
93
|
enabled: true,
|
|
94
94
|
searchInputProps: {
|
|
95
95
|
wrapperProps: { className: classes["search-input-wrapper"] },
|
|
96
|
-
|
|
96
|
+
...resetPageNoSelect && { reset: true },
|
|
97
97
|
autoComplete: "off"
|
|
98
98
|
}
|
|
99
99
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.es.js","sources":["../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n ForwardRefRenderFunction,\n ComponentPropsWithRef,\n Fragment,\n useState,\n useEffect\n} from \"react\";\nimport classes from \"./Pagination.module.scss\";\nimport readyclasses from \"../../readyclasses.module.scss\";\nimport { IconButton } from \"../Button/IconButton\";\nimport { Icons, Icon } from \"../Icon/Icon\";\nimport { Select } from \"../Form/Select/SingleSelect/Select\";\nimport { Option } from \"../Form/Select/SingleSelect/Option\";\nimport { Label } from \"../Form/Label/Label\";\n\nexport type PaginationTranslations = {\n totalItems: string;\n itemsPerPage: string;\n itemsPerPageLabel: string;\n currentPage: string;\n currentPageLabel: string;\n};\n\nexport type PageChangeLabels = \"next\" | \"previous\" | \"first\" | \"last\";\n\nenum DefaultTranslations {\n totalItems = \"items in total\",\n itemsPerPage = \"Items per page\",\n currentPage = \"of %1 pages\",\n itemsPerPageLabel = \"Select how many items per page you want to see.\",\n currentPageLabel = \"What page you are currently on.\"\n}\n\nexport type PageSize = 10 | 25 | 50;\n\nexport interface Props extends Omit<ComponentPropsWithRef<\"div\">, \"translate\"> {\n currentPage: number;\n totalElements?: number;\n pageSize?: PageSize;\n translate?: PaginationTranslations;\n onPageChange: (pageToGoTo: number) => void;\n onPageSizeChange: (pageSize: PageSize) => void;\n}\n\nconst PaginationComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n totalElements,\n pageSize = 10,\n translate = DefaultTranslations,\n currentPage,\n className,\n onPageChange,\n onPageSizeChange,\n ...rest\n }: Props,\n ref\n) => {\n const calculateAmountOfPages = () => {\n if (!totalElements) {\n return 1;\n }\n\n if (Math.ceil(totalElements / pageSize) < 1) {\n return 1;\n }\n\n return Math.ceil(totalElements / pageSize);\n };\n const pagesAmount = calculateAmountOfPages();\n const [resetPageNoSelect, setResetPageNoSelect] = useState(false);\n\n const onPageSizeChangeHandler = (event: React.ChangeEvent<HTMLSelectElement>) => {\n const pageSizeNumber = Number(event.target.value) as PageSize;\n setResetPageNoSelect(true);\n onPageSizeChange(pageSizeNumber);\n };\n\n const onPageChangeHandler = (pageToGoTo: number) => {\n onPageChange(pageToGoTo);\n };\n\n useEffect(() => {\n resetPageNoSelect && setResetPageNoSelect(false);\n }, [resetPageNoSelect]);\n\n if (totalElements === undefined || totalElements === null || totalElements === 0) {\n return null;\n }\n\n return (\n <div {...rest} ref={ref} className={`${classes[\"pagination-wrapper\"]} ${className ?? \"\"}`}>\n <div className={classes[\"left\"]}>\n {pageSize && (\n <div className={classes[\"per-page\"]}>\n <Label\n id=\"page-size-select-label\"\n htmlFor=\"page-size-select\"\n className={classes[\"label\"]}\n >\n {translate.itemsPerPage}\n </Label>\n <Select\n name=\"page-size-select\"\n id=\"page-size-select\"\n labeledBy=\"page-size-select-label\"\n className={`${classes[\"form-element\"]} ${classes[\"page-size-select\"]}`}\n value={pageSize.toString()}\n onChange={onPageSizeChangeHandler}\n >\n <Option value=\"10\">10</Option>\n <Option value=\"25\">25</Option>\n <Option value=\"50\">50</Option>\n </Select>\n </div>\n )}\n <div className={classes[\"total\"]}>\n <span tabIndex={0}>\n {totalElements} {translate.totalItems}\n </span>\n </div>\n </div>\n <div className={classes[\"pagination\"]}>\n <Fragment>\n {!!pagesAmount && (\n <div className={classes[\"page\"]}>\n <Label\n id=\"current-value-input-label\"\n htmlFor=\"current-value-input\"\n className={`${readyclasses[\"sr-only\"]} ${classes[\"current-value-select-label\"]}`}\n >\n {translate.currentPageLabel}\n </Label>\n <Select\n labeledBy=\"current-value-input-label\"\n key=\"input\"\n id=\"current-value-input\"\n size={currentPage.toString().length}\n onChange={(e: React.ChangeEvent<HTMLSelectElement>) =>\n onPageChangeHandler(Number(e.target.value))\n }\n name=\"current-value-input\"\n value={currentPage.toString()}\n className={`${classes[\"form-element\"]} ${classes[\"current-page-select\"]}`}\n search={{\n enabled: true,\n searchInputProps: {\n wrapperProps: { className: classes[\"search-input-wrapper\"] },\n reset: resetPageNoSelect ? resetPageNoSelect : undefined,\n autoComplete: \"off\"\n }\n }}\n >\n {Array.from(Array(pagesAmount).keys()).map(page => (\n <Option key={page} value={(page + 1).toString()}>\n {(page + 1).toString()}\n </Option>\n ))}\n </Select>\n <span className={classes[\"page-total\"]}>\n {translate.currentPage.replace(\n \"%1\",\n Math.ceil(totalElements / pageSize).toString()\n )}\n </span>\n </div>\n )}\n {!!currentPage && (\n <div className={classes[\"previous\"]}>\n {\n <IconButton\n disabled={currentPage <= 1}\n title=\"first\"\n onClick={() => onPageChangeHandler(1)}\n data-paginate=\"first\"\n >\n <Icon icon={Icons.NavigationFirst} />\n </IconButton>\n }\n {\n <IconButton\n disabled={currentPage <= 1}\n title=\"previous\"\n onClick={() => onPageChangeHandler(currentPage - 1)}\n data-paginate=\"previous\"\n >\n <Icon icon={Icons.ChevronLeft} />\n </IconButton>\n }\n </div>\n )}\n <div className={classes[\"next\"]}>\n {(currentPage !== undefined || false) && (\n <IconButton\n disabled={currentPage >= pagesAmount}\n title=\"next\"\n onClick={() => onPageChangeHandler(currentPage + 1)}\n data-paginate=\"next\"\n >\n <Icon icon={Icons.ChevronRight} />\n </IconButton>\n )}\n {!!currentPage && (\n <IconButton\n disabled={currentPage >= pagesAmount}\n title=\"last\"\n onClick={() => onPageChangeHandler(Math.ceil(totalElements / pageSize))}\n data-paginate=\"last\"\n >\n <Icon icon={Icons.NavigationLast} />\n </IconButton>\n )}\n </div>\n </Fragment>\n </div>\n </div>\n );\n};\n\nexport const Pagination = React.forwardRef(PaginationComponent);\n"],"names":["DefaultTranslations"],"mappings":";;;;;;;;AAyCA,IAAK,wCAAAA,yBAAL;AACEA,uBAAA,YAAa,IAAA;AACbA,uBAAA,cAAe,IAAA;AACfA,uBAAA,aAAc,IAAA;AACdA,uBAAA,mBAAoB,IAAA;AACpBA,uBAAA,kBAAmB,IAAA;AALhBA,SAAAA;AAAA,GAAA,uBAAA,CAAA,CAAA;AAmBL,MAAM,sBAAuE,CAC3E;AAAA,EACE;AAAA,EACA,WAAW;AAAA,EACX,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,QACG;AACH,QAAM,yBAAyB,MAAM;AACnC,QAAI,CAAC,eAAe;AACX,aAAA;AAAA,IAAA;AAGT,QAAI,KAAK,KAAK,gBAAgB,QAAQ,IAAI,GAAG;AACpC,aAAA;AAAA,IAAA;AAGF,WAAA,KAAK,KAAK,gBAAgB,QAAQ;AAAA,EAC3C;AACA,QAAM,cAAc,uBAAuB;AAC3C,QAAM,CAAC,mBAAmB,oBAAoB,IAAI,SAAS,KAAK;AAE1D,QAAA,0BAA0B,CAAC,UAAgD;AAC/E,UAAM,iBAAiB,OAAO,MAAM,OAAO,KAAK;AAChD,yBAAqB,IAAI;AACzB,qBAAiB,cAAc;AAAA,EACjC;AAEM,QAAA,sBAAsB,CAAC,eAAuB;AAClD,iBAAa,UAAU;AAAA,EACzB;AAEA,YAAU,MAAM;AACd,yBA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AAM,MAAM,gBAAiB,CAAA;AAAA,EAIrC,GAAA,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,UAAU,eAAe;AAAA,MACzB,OAAM;AAAA,MACN,SAAS,MAAM,oBAAoB,cAAc,CAAC;AAAA,MAClD,iBAAc;AAAA,IAAA;AAAA,IAEb,sBAAA,cAAA,MAAA,EAAK,MAAM,MAAM,YAAa,CAAA;AAAA,EAGrC,CAAA,GAEF,sBAAA,cAAC,OAAI,EAAA,WAAW,QAAQ,MAAM,EAAA,IAC1B,gBAAgB,UAAa,UAC7B,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,UAAU,eAAe;AAAA,MACzB,OAAM;AAAA,MACN,SAAS,MAAM,oBAAoB,cAAc,CAAC;AAAA,MAClD,iBAAc;AAAA,IAAA;AAAA,IAEb,sBAAA,cAAA,MAAA,EAAK,MAAM,MAAM,aAAc,CAAA;AAAA,EAAA,GAGnC,CAAC,CAAC,eACD,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,UAAU,eAAe;AAAA,MACzB,OAAM;AAAA,MACN,SAAS,MAAM,oBAAoB,KAAK,KAAK,gBAAgB,QAAQ,CAAC;AAAA,MACtE,iBAAc;AAAA,IAAA;AAAA,IAEb,sBAAA,cAAA,MAAA,EAAK,MAAM,MAAM,eAAgB,CAAA;AAAA,EAGxC,CAAA,CACF,CACF,CACF;AAEJ;AAEa,MAAA,aAAa,MAAM,WAAW,mBAAmB;"}
|
|
1
|
+
{"version":3,"file":"Pagination.es.js","sources":["../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n ForwardRefRenderFunction,\n ComponentPropsWithRef,\n Fragment,\n useState,\n useEffect\n} from \"react\";\nimport classes from \"./Pagination.module.scss\";\nimport readyclasses from \"../../readyclasses.module.scss\";\nimport { IconButton } from \"../Button/IconButton\";\nimport { Icons, Icon } from \"../Icon/Icon\";\nimport { Select } from \"../Form/Select/SingleSelect/Select\";\nimport { Option } from \"../Form/Select/SingleSelect/Option\";\nimport { Label } from \"../Form/Label/Label\";\n\nexport type PaginationTranslations = {\n totalItems: string;\n itemsPerPage: string;\n itemsPerPageLabel: string;\n currentPage: string;\n currentPageLabel: string;\n};\n\nexport type PageChangeLabels = \"next\" | \"previous\" | \"first\" | \"last\";\n\nenum DefaultTranslations {\n totalItems = \"items in total\",\n itemsPerPage = \"Items per page\",\n currentPage = \"of %1 pages\",\n itemsPerPageLabel = \"Select how many items per page you want to see.\",\n currentPageLabel = \"What page you are currently on.\"\n}\n\nexport type PageSize = 10 | 25 | 50;\n\nexport interface Props extends Omit<ComponentPropsWithRef<\"div\">, \"translate\"> {\n currentPage: number;\n totalElements?: number;\n pageSize?: PageSize;\n translate?: PaginationTranslations;\n onPageChange: (pageToGoTo: number) => void;\n onPageSizeChange: (pageSize: PageSize) => void;\n}\n\nconst PaginationComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n totalElements,\n pageSize = 10,\n translate = DefaultTranslations,\n currentPage,\n className,\n onPageChange,\n onPageSizeChange,\n ...rest\n }: Props,\n ref\n) => {\n const calculateAmountOfPages = () => {\n if (!totalElements) {\n return 1;\n }\n\n if (Math.ceil(totalElements / pageSize) < 1) {\n return 1;\n }\n\n return Math.ceil(totalElements / pageSize);\n };\n const pagesAmount = calculateAmountOfPages();\n const [resetPageNoSelect, setResetPageNoSelect] = useState(false);\n\n const onPageSizeChangeHandler = (event: React.ChangeEvent<HTMLSelectElement>) => {\n const pageSizeNumber = Number(event.target.value) as PageSize;\n setResetPageNoSelect(true);\n onPageSizeChange(pageSizeNumber);\n };\n\n const onPageChangeHandler = (pageToGoTo: number) => {\n onPageChange(pageToGoTo);\n };\n\n useEffect(() => {\n resetPageNoSelect && setResetPageNoSelect(false);\n }, [resetPageNoSelect]);\n\n if (totalElements === undefined || totalElements === null || totalElements === 0) {\n return null;\n }\n\n return (\n <div {...rest} ref={ref} className={`${classes[\"pagination-wrapper\"]} ${className ?? \"\"}`}>\n <div className={classes[\"left\"]}>\n {pageSize && (\n <div className={classes[\"per-page\"]}>\n <Label\n id=\"page-size-select-label\"\n htmlFor=\"page-size-select\"\n className={classes[\"label\"]}\n >\n {translate.itemsPerPage}\n </Label>\n <Select\n name=\"page-size-select\"\n id=\"page-size-select\"\n labeledBy=\"page-size-select-label\"\n className={`${classes[\"form-element\"]} ${classes[\"page-size-select\"]}`}\n value={pageSize.toString()}\n onChange={onPageSizeChangeHandler}\n >\n <Option value=\"10\">10</Option>\n <Option value=\"25\">25</Option>\n <Option value=\"50\">50</Option>\n </Select>\n </div>\n )}\n <div className={classes[\"total\"]}>\n <span tabIndex={0}>\n {totalElements} {translate.totalItems}\n </span>\n </div>\n </div>\n <div className={classes[\"pagination\"]}>\n <Fragment>\n {!!pagesAmount && (\n <div className={classes[\"page\"]}>\n <Label\n id=\"current-value-input-label\"\n htmlFor=\"current-value-input\"\n className={`${readyclasses[\"sr-only\"]} ${classes[\"current-value-select-label\"]}`}\n >\n {translate.currentPageLabel}\n </Label>\n <Select\n labeledBy=\"current-value-input-label\"\n key=\"input\"\n id=\"current-value-input\"\n size={currentPage.toString().length}\n onChange={(e: React.ChangeEvent<HTMLSelectElement>) =>\n onPageChangeHandler(Number(e.target.value))\n }\n name=\"current-value-input\"\n value={currentPage.toString()}\n className={`${classes[\"form-element\"]} ${classes[\"current-page-select\"]}`}\n search={{\n enabled: true,\n searchInputProps: {\n wrapperProps: { className: classes[\"search-input-wrapper\"] },\n ...(resetPageNoSelect && { reset: true }),\n autoComplete: \"off\"\n }\n }}\n >\n {Array.from(Array(pagesAmount).keys()).map(page => (\n <Option key={page} value={(page + 1).toString()}>\n {(page + 1).toString()}\n </Option>\n ))}\n </Select>\n <span className={classes[\"page-total\"]}>\n {translate.currentPage.replace(\n \"%1\",\n Math.ceil(totalElements / pageSize).toString()\n )}\n </span>\n </div>\n )}\n {!!currentPage && (\n <div className={classes[\"previous\"]}>\n {\n <IconButton\n disabled={currentPage <= 1}\n title=\"first\"\n onClick={() => onPageChangeHandler(1)}\n data-paginate=\"first\"\n >\n <Icon icon={Icons.NavigationFirst} />\n </IconButton>\n }\n {\n <IconButton\n disabled={currentPage <= 1}\n title=\"previous\"\n onClick={() => onPageChangeHandler(currentPage - 1)}\n data-paginate=\"previous\"\n >\n <Icon icon={Icons.ChevronLeft} />\n </IconButton>\n }\n </div>\n )}\n <div className={classes[\"next\"]}>\n {(currentPage !== undefined || false) && (\n <IconButton\n disabled={currentPage >= pagesAmount}\n title=\"next\"\n onClick={() => onPageChangeHandler(currentPage + 1)}\n data-paginate=\"next\"\n >\n <Icon icon={Icons.ChevronRight} />\n </IconButton>\n )}\n {!!currentPage && (\n <IconButton\n disabled={currentPage >= pagesAmount}\n title=\"last\"\n onClick={() => onPageChangeHandler(Math.ceil(totalElements / pageSize))}\n data-paginate=\"last\"\n >\n <Icon icon={Icons.NavigationLast} />\n </IconButton>\n )}\n </div>\n </Fragment>\n </div>\n </div>\n );\n};\n\nexport const Pagination = React.forwardRef(PaginationComponent);\n"],"names":["DefaultTranslations"],"mappings":";;;;;;;;AAyCA,IAAK,wCAAAA,yBAAL;AACEA,uBAAA,YAAa,IAAA;AACbA,uBAAA,cAAe,IAAA;AACfA,uBAAA,aAAc,IAAA;AACdA,uBAAA,mBAAoB,IAAA;AACpBA,uBAAA,kBAAmB,IAAA;AALhBA,SAAAA;AAAA,GAAA,uBAAA,CAAA,CAAA;AAmBL,MAAM,sBAAuE,CAC3E;AAAA,EACE;AAAA,EACA,WAAW;AAAA,EACX,YAAY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C,UAAU,eAAe;AAAA,MACzB,OAAM;AAAA,MACN,SAAS,MAAM,oBAAoB,KAAK,KAAK,gBAAgB,QAAQ,CAAC;AAAA,MACtE,iBAAc;AAAA,IAAA;AAAA,IAEb,sBAAA,cAAA,MAAA,EAAK,MAAM,MAAM,eAAgB,CAAA;AAAA,EAGxC,CAAA,CACF,CACF,CACF;AAEJ;AAEa,MAAA,aAAa,MAAM,WAAW,mBAAmB;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var a=document.createElement("style");a.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.Pagination_pagination-
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var a=document.createElement("style");a.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.Pagination_pagination-wrapper_HO9cY{font-family:var(--font-family);font-size:var(--font-size-data-grid);line-height:var(--data-grid-line-height);color:var(--greyed-out);display:flex;flex-direction:column;justify-content:space-between}.Pagination_pagination-wrapper_HO9cY .Pagination_left_HO9cY{display:flex}.Pagination_pagination-wrapper_HO9cY .Pagination_form-element_HO9cY{height:calc(2.5 * var(--font-size))}.Pagination_pagination-wrapper_HO9cY .Pagination_form-element_HO9cY .Pagination_search-input-wrapper_HO9cY{width:2.75rem}.Pagination_pagination-wrapper_HO9cY .Pagination_form-element_HO9cY button{min-height:calc(2.5 * var(--font-size))}.Pagination_pagination-wrapper_HO9cY .Pagination_total_HO9cY{flex:1 0 auto;display:flex;align-items:center;justify-content:center}.Pagination_pagination-wrapper_HO9cY .Pagination_total_HO9cY span{color:var(--color-blue-grey500)}.Pagination_pagination-wrapper_HO9cY .Pagination_pagination_HO9cY{flex:1 0 auto;display:flex;align-items:center;justify-content:center;margin-top:1rem}.Pagination_pagination-wrapper_HO9cY .Pagination_pagination_HO9cY .Pagination_previous_HO9cY,.Pagination_pagination-wrapper_HO9cY .Pagination_pagination_HO9cY .Pagination_next_HO9cY{display:flex;align-items:center}.Pagination_pagination-wrapper_HO9cY .Pagination_pagination_HO9cY .Pagination_previous_HO9cY button span:before,.Pagination_pagination-wrapper_HO9cY .Pagination_pagination_HO9cY .Pagination_next_HO9cY button span:before{font-size:var(--font-size-sub)}.Pagination_pagination-wrapper_HO9cY .Pagination_per-page_HO9cY{display:none;align-items:center;gap:.5rem}.Pagination_pagination-wrapper_HO9cY .Pagination_per-page_HO9cY label{font-size:var(--font-size-data-grid);line-height:var(--data-grid-line-height);font-weight:500;color:var(--color-blue-grey900)}.Pagination_pagination-wrapper_HO9cY .Pagination_per-page_HO9cY+.Pagination_total_HO9cY{padding-left:.9375rem;border-left:1px solid var(--color-blue-grey100)}.Pagination_pagination-wrapper_HO9cY .Pagination_page_HO9cY{display:flex;align-items:center;flex-basis:min-content;padding-right:1rem}.Pagination_pagination-wrapper_HO9cY .Pagination_page-total_HO9cY{display:inline-block;margin-left:.5rem;white-space:nowrap;font-weight:500;color:var(--color-blue-grey900)}.Pagination_pagination-wrapper_HO9cY .Pagination_page_HO9cY+.Pagination_previous_HO9cY{padding-left:.9375rem;border-left:1px solid var(--color-blue-grey100)}.Pagination_pagination-wrapper_HO9cY .Pagination_page-size-select_HO9cY button{min-width:calc(4.25 * var(--font-size));padding:0}.Pagination_pagination-wrapper_HO9cY .Pagination_page-size-select_HO9cY button div[data-display]{left:.5rem}.Pagination_pagination-wrapper_HO9cY .Pagination_page-size-select_HO9cY button div:not([data-display]){right:.5rem}.Pagination_current-page-select_HO9cY button{min-width:calc(3.75 * var(--font-size));padding:0}.Pagination_current-page-select_HO9cY button div[data-display]{left:.5rem}.Pagination_current-page-select_HO9cY button div:not([data-display]){right:.5rem}@media screen and (min-width: 30em){.Pagination_pagination-wrapper_HO9cY{flex-direction:row}.Pagination_pagination-wrapper_HO9cY .Pagination_total_HO9cY{justify-content:flex-start}.Pagination_pagination-wrapper_HO9cY .Pagination_pagination_HO9cY{margin-top:0;justify-content:flex-end}}@media screen and (min-width: 48em){.Pagination_pagination-wrapper_HO9cY .Pagination_per-page_HO9cY{display:flex;margin-right:1rem}}')),document.head.appendChild(a)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="Pagination_left_HO9cY",a="Pagination_total_HO9cY",t="Pagination_pagination_HO9cY",n="Pagination_previous_HO9cY",i="Pagination_next_HO9cY",o="Pagination_page_HO9cY",p={"pagination-wrapper":"Pagination_pagination-wrapper_HO9cY",left:e,"form-element":"Pagination_form-element_HO9cY","search-input-wrapper":"Pagination_search-input-wrapper_HO9cY",total:a,pagination:t,previous:n,next:i,"per-page":"Pagination_per-page_HO9cY",page:o,"page-total":"Pagination_page-total_HO9cY","page-size-select":"Pagination_page-size-select_HO9cY","current-page-select":"Pagination_current-page-select_HO9cY"};exports.default=p,exports.left=e,exports.next=i,exports.page=o,exports.pagination=t,exports.previous=n,exports.total=a;
|
|
3
3
|
//# sourceMappingURL=Pagination.module.scss.cjs.js.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var a=document.createElement("style");a.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.Pagination_pagination-
|
|
2
|
-
const left = "
|
|
3
|
-
const total = "
|
|
4
|
-
const pagination = "
|
|
5
|
-
const previous = "
|
|
6
|
-
const next = "
|
|
7
|
-
const page = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var a=document.createElement("style");a.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.Pagination_pagination-wrapper_HO9cY{font-family:var(--font-family);font-size:var(--font-size-data-grid);line-height:var(--data-grid-line-height);color:var(--greyed-out);display:flex;flex-direction:column;justify-content:space-between}.Pagination_pagination-wrapper_HO9cY .Pagination_left_HO9cY{display:flex}.Pagination_pagination-wrapper_HO9cY .Pagination_form-element_HO9cY{height:calc(2.5 * var(--font-size))}.Pagination_pagination-wrapper_HO9cY .Pagination_form-element_HO9cY .Pagination_search-input-wrapper_HO9cY{width:2.75rem}.Pagination_pagination-wrapper_HO9cY .Pagination_form-element_HO9cY button{min-height:calc(2.5 * var(--font-size))}.Pagination_pagination-wrapper_HO9cY .Pagination_total_HO9cY{flex:1 0 auto;display:flex;align-items:center;justify-content:center}.Pagination_pagination-wrapper_HO9cY .Pagination_total_HO9cY span{color:var(--color-blue-grey500)}.Pagination_pagination-wrapper_HO9cY .Pagination_pagination_HO9cY{flex:1 0 auto;display:flex;align-items:center;justify-content:center;margin-top:1rem}.Pagination_pagination-wrapper_HO9cY .Pagination_pagination_HO9cY .Pagination_previous_HO9cY,.Pagination_pagination-wrapper_HO9cY .Pagination_pagination_HO9cY .Pagination_next_HO9cY{display:flex;align-items:center}.Pagination_pagination-wrapper_HO9cY .Pagination_pagination_HO9cY .Pagination_previous_HO9cY button span:before,.Pagination_pagination-wrapper_HO9cY .Pagination_pagination_HO9cY .Pagination_next_HO9cY button span:before{font-size:var(--font-size-sub)}.Pagination_pagination-wrapper_HO9cY .Pagination_per-page_HO9cY{display:none;align-items:center;gap:.5rem}.Pagination_pagination-wrapper_HO9cY .Pagination_per-page_HO9cY label{font-size:var(--font-size-data-grid);line-height:var(--data-grid-line-height);font-weight:500;color:var(--color-blue-grey900)}.Pagination_pagination-wrapper_HO9cY .Pagination_per-page_HO9cY+.Pagination_total_HO9cY{padding-left:.9375rem;border-left:1px solid var(--color-blue-grey100)}.Pagination_pagination-wrapper_HO9cY .Pagination_page_HO9cY{display:flex;align-items:center;flex-basis:min-content;padding-right:1rem}.Pagination_pagination-wrapper_HO9cY .Pagination_page-total_HO9cY{display:inline-block;margin-left:.5rem;white-space:nowrap;font-weight:500;color:var(--color-blue-grey900)}.Pagination_pagination-wrapper_HO9cY .Pagination_page_HO9cY+.Pagination_previous_HO9cY{padding-left:.9375rem;border-left:1px solid var(--color-blue-grey100)}.Pagination_pagination-wrapper_HO9cY .Pagination_page-size-select_HO9cY button{min-width:calc(4.25 * var(--font-size));padding:0}.Pagination_pagination-wrapper_HO9cY .Pagination_page-size-select_HO9cY button div[data-display]{left:.5rem}.Pagination_pagination-wrapper_HO9cY .Pagination_page-size-select_HO9cY button div:not([data-display]){right:.5rem}.Pagination_current-page-select_HO9cY button{min-width:calc(3.75 * var(--font-size));padding:0}.Pagination_current-page-select_HO9cY button div[data-display]{left:.5rem}.Pagination_current-page-select_HO9cY button div:not([data-display]){right:.5rem}@media screen and (min-width: 30em){.Pagination_pagination-wrapper_HO9cY{flex-direction:row}.Pagination_pagination-wrapper_HO9cY .Pagination_total_HO9cY{justify-content:flex-start}.Pagination_pagination-wrapper_HO9cY .Pagination_pagination_HO9cY{margin-top:0;justify-content:flex-end}}@media screen and (min-width: 48em){.Pagination_pagination-wrapper_HO9cY .Pagination_per-page_HO9cY{display:flex;margin-right:1rem}}')),document.head.appendChild(a)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
|
+
const left = "Pagination_left_HO9cY";
|
|
3
|
+
const total = "Pagination_total_HO9cY";
|
|
4
|
+
const pagination = "Pagination_pagination_HO9cY";
|
|
5
|
+
const previous = "Pagination_previous_HO9cY";
|
|
6
|
+
const next = "Pagination_next_HO9cY";
|
|
7
|
+
const page = "Pagination_page_HO9cY";
|
|
8
8
|
const classes = {
|
|
9
|
-
"pagination-wrapper": "Pagination_pagination-
|
|
9
|
+
"pagination-wrapper": "Pagination_pagination-wrapper_HO9cY",
|
|
10
10
|
left,
|
|
11
|
-
"form-element": "Pagination_form-
|
|
12
|
-
"search-input-wrapper": "Pagination_search-input-
|
|
11
|
+
"form-element": "Pagination_form-element_HO9cY",
|
|
12
|
+
"search-input-wrapper": "Pagination_search-input-wrapper_HO9cY",
|
|
13
13
|
total,
|
|
14
14
|
pagination,
|
|
15
15
|
previous,
|
|
16
16
|
next,
|
|
17
|
-
"per-page": "Pagination_per-
|
|
17
|
+
"per-page": "Pagination_per-page_HO9cY",
|
|
18
18
|
page,
|
|
19
|
-
"page-total": "Pagination_page-
|
|
20
|
-
"page-size-select": "Pagination_page-size-
|
|
21
|
-
"current-page-select": "Pagination_current-page-
|
|
19
|
+
"page-total": "Pagination_page-total_HO9cY",
|
|
20
|
+
"page-size-select": "Pagination_page-size-select_HO9cY",
|
|
21
|
+
"current-page-select": "Pagination_current-page-select_HO9cY"
|
|
22
22
|
};
|
|
23
23
|
export {
|
|
24
24
|
classes as default,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../../hooks/usePosition.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../../hooks/usePosition.cjs.js"),n=require("./Popover.module.scss.cjs.js"),o=e.forwardRef((({children:o,className:r,show:i,placement:s,offset:u,debounceAmount:c,transformOrigin:l,anchorEl:a,onAnchorOutOfView:f,...d},m)=>{const[v,p]=e.useState(!1),[E,w]=e.useState(!1),b=e.useRef(null),{top:g,left:N,right:h,bottom:L,calculatePosition:P}=t.usePosition({elementToBePositioned:b,relativeElement:a,offset:u,placement:s,transformOrigin:l,debounceAmount:c??void 0}),y=e=>"initial"===e?"initial":isNaN(e)?0:Number(e);return e.useEffect((()=>{i?p(!0):w(!1)}),[i]),e.useLayoutEffect((()=>{v&&!E&&i&&(P(),requestAnimationFrame((()=>{w(!0)})))}),[v,E,i,P]),e.useEffect((()=>{if(E)return window.addEventListener("resize",P),window.addEventListener("scroll",P),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",P)}}),[E,P]),e.useEffect((()=>{const e=b.current;if(!e||E)return;const t=e=>{"opacity"===e.propertyName&&p(!1)};return e.addEventListener("transitionend",t),()=>{e.removeEventListener("transitionend",t)}}),[E]),e.useEffect((()=>{const e=null==a?void 0:a.current;if(e){const t=e.getBoundingClientRect().top,n=e.getBoundingClientRect().bottom;E&&(Number(g)<0||Number(N)<0||Number(h)<0||Number(L)<0||t<0||n>window.innerHeight)&&(null==f||f())}}),[g,N,h,L]),e.createElement("div",{ref:m,...d},v&&e.createElement("div",{ref:b,className:`${n.default.popover} ${r??""} ${E?n.default.show:""}`,style:{top:y(g),left:y(N),right:y(h),bottom:y(L)}},o))}));exports.Popover=o;
|
|
2
2
|
//# sourceMappingURL=Popover.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.cjs.js","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n ForwardRefRenderFunction,\n ComponentPropsWithRef,\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState\n} from \"react\";\nimport { Offset, Placement, PositionType, usePosition } from \"../../hooks/usePosition\";\nimport classes from \"./Popover.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children?: ReactNode;\n show?: boolean;\n anchorEl?: RefObject<HTMLOrSVGElement>; //eslint-disable-line no-undef\n placement?: Placement;\n offset?: Offset;\n debounceAmount?: number;\n transformOrigin?: Placement;\n onAnchorOutOfView?: () => void;\n}\n\nconst PopoverComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n children,\n className,\n show,\n placement,\n offset,\n debounceAmount,\n transformOrigin,\n anchorEl,\n onAnchorOutOfView,\n ...rest\n },\n ref\n) => {\n const [showPopover, setShowPopover] = useState(false);\n const elToBePositioned = useRef<HTMLDivElement>(null);\n const { top, left, right, bottom, calculatePosition
|
|
1
|
+
{"version":3,"file":"Popover.cjs.js","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n ForwardRefRenderFunction,\n ComponentPropsWithRef,\n ReactNode,\n RefObject,\n useEffect,\n useLayoutEffect,\n useRef,\n useState\n} from \"react\";\nimport { Offset, Placement, PositionType, usePosition } from \"../../hooks/usePosition\";\nimport classes from \"./Popover.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children?: ReactNode;\n show?: boolean;\n anchorEl?: RefObject<HTMLOrSVGElement>; //eslint-disable-line no-undef\n placement?: Placement;\n offset?: Offset;\n debounceAmount?: number;\n transformOrigin?: Placement;\n onAnchorOutOfView?: () => void;\n}\n\nconst PopoverComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n children,\n className,\n show,\n placement,\n offset,\n debounceAmount,\n transformOrigin,\n anchorEl,\n onAnchorOutOfView,\n ...rest\n },\n ref\n) => {\n const [shouldRender, setShouldRender] = useState(false);\n const [showPopover, setShowPopover] = useState(false);\n const elToBePositioned = useRef<HTMLDivElement>(null);\n const { top, left, right, bottom, calculatePosition } = usePosition({\n elementToBePositioned: elToBePositioned,\n relativeElement: anchorEl,\n offset: offset,\n placement: placement,\n transformOrigin: transformOrigin,\n debounceAmount: debounceAmount ?? undefined\n });\n\n const normalizePosition = (value: PositionType) => {\n if (value === \"initial\") {\n return \"initial\";\n }\n\n if (isNaN(value)) {\n return 0;\n }\n\n return Number(value);\n };\n\n useEffect(() => {\n if (show) {\n setShouldRender(true);\n } else {\n setShowPopover(false);\n }\n }, [show]);\n\n useLayoutEffect(() => {\n if (shouldRender && !showPopover && show) {\n calculatePosition();\n requestAnimationFrame(() => {\n setShowPopover(true);\n });\n }\n }, [shouldRender, showPopover, show, calculatePosition]);\n\n useEffect(() => {\n if (!showPopover) {\n return;\n }\n\n window.addEventListener(\"resize\", calculatePosition);\n window.addEventListener(\"scroll\", calculatePosition);\n\n return () => {\n window.removeEventListener(\"resize\", calculatePosition);\n window.removeEventListener(\"scroll\", calculatePosition);\n };\n }, [showPopover, calculatePosition]);\n\n useEffect(() => {\n const element = elToBePositioned.current;\n\n if (!element || showPopover) {\n return;\n }\n\n const handleTransitionEnd = (event: TransitionEvent) => {\n if (event.propertyName === \"opacity\") {\n setShouldRender(false);\n }\n };\n\n element.addEventListener(\"transitionend\", handleTransitionEnd);\n\n return () => {\n element.removeEventListener(\"transitionend\", handleTransitionEnd);\n };\n }, [showPopover]);\n\n useEffect(() => {\n const anchor = anchorEl?.current as HTMLElement;\n\n if (anchor) {\n const anchorTop = anchor.getBoundingClientRect().top;\n const anchorBottom = anchor.getBoundingClientRect().bottom;\n\n const isAnchorOffscreen =\n showPopover &&\n (Number(top) < 0 ||\n Number(left) < 0 ||\n Number(right) < 0 ||\n Number(bottom) < 0 ||\n anchorTop < 0 ||\n anchorBottom > window.innerHeight);\n\n if (isAnchorOffscreen) {\n onAnchorOutOfView?.();\n }\n }\n }, [top, left, right, bottom]);\n\n return (\n <div ref={ref} {...rest}>\n {shouldRender && (\n <div\n ref={elToBePositioned}\n className={`${classes.popover} ${className ?? \"\"} ${showPopover ? classes.show : \"\"}`}\n style={{\n top: normalizePosition(top),\n left: normalizePosition(left),\n right: normalizePosition(right),\n bottom: normalizePosition(bottom)\n }}\n >\n {children}\n </div>\n )}\n </div>\n );\n};\n\nexport const Popover = React.forwardRef(PopoverComponent);\n"],"names":["Popover","React","forwardRef","children","className","show","placement","offset","debounceAmount","transformOrigin","anchorEl","onAnchorOutOfView","rest","ref","shouldRender","setShouldRender","useState","showPopover","setShowPopover","elToBePositioned","useRef","top","left","right","bottom","calculatePosition","usePosition","elementToBePositioned","relativeElement","normalizePosition","value","isNaN","Number","useEffect","useLayoutEffect","requestAnimationFrame","window","addEventListener","removeEventListener","element","current","handleTransitionEnd","event","propertyName","anchor","anchorTop","getBoundingClientRect","anchorBottom","innerHeight","createElement","classes","popover","style"],"mappings":"+LA4KaA,EAAUC,EAAMC,YApI6C,EAEtEC,WACAC,YACAC,OACAC,YACAC,SACAC,iBACAC,kBACAC,WACAC,uBACGC,GAELC,KAEA,MAAOC,EAAcC,GAAmBC,EAAAA,UAAS,IAC1CC,EAAaC,GAAkBF,EAAAA,UAAS,GACzCG,EAAmBC,SAAuB,OAC1CC,IAAEA,OAAKC,EAAMC,MAAAA,EAAAC,OAAOA,oBAAQC,GAAsBC,cAAY,CAClEC,sBAAuBR,EACvBS,gBAAiBlB,EACjBH,SACAD,YACAG,kBACAD,eAAgBA,QAAkB,IAG9BqB,EAAqBC,GACX,YAAVA,EACK,UAGLC,MAAMD,GACD,EAGFE,OAAOF,GA6Eb,OA1EHG,EAAAA,WAAU,KACJ5B,EACFU,GAAgB,GAEhBG,GAAe,EAAK,GAErB,CAACb,IAEJ6B,EAAAA,iBAAgB,KACVpB,IAAiBG,GAAeZ,IAChBoB,IAClBU,uBAAsB,KACpBjB,GAAe,EAAI,IACpB,GAEF,CAACJ,EAAcG,EAAaZ,EAAMoB,IAErCQ,EAAAA,WAAU,KACR,GAAKhB,EAOL,OAHOmB,OAAAC,iBAAiB,SAAUZ,GAC3BW,OAAAC,iBAAiB,SAAUZ,GAE3B,KACEW,OAAAE,oBAAoB,SAAUb,GAC9BW,OAAAE,oBAAoB,SAAUb,EAAiB,CACxD,GACC,CAACR,EAAaQ,IAEjBQ,EAAAA,WAAU,KACR,MAAMM,EAAUpB,EAAiBqB,QAE7B,IAACD,GAAWtB,EACd,OAGI,MAAAwB,EAAuBC,IACA,YAAvBA,EAAMC,cACR5B,GAAgB,EAAK,EAMzB,OAFQwB,EAAAF,iBAAiB,gBAAiBI,GAEnC,KACGF,EAAAD,oBAAoB,gBAAiBG,EAAmB,CAClE,GACC,CAACxB,IAEJgB,EAAAA,WAAU,KACR,MAAMW,EAAmB,MAAVlC,OAAU,EAAAA,EAAA8B,QAEzB,GAAII,EAAQ,CACJ,MAAAC,EAAYD,EAAOE,wBAAwBzB,IAC3C0B,EAAeH,EAAOE,wBAAwBtB,OAGlDP,IACCe,OAAOX,GAAO,GACbW,OAAOV,GAAQ,GACfU,OAAOT,GAAS,GAChBS,OAAOR,GAAU,GACjBqB,EAAY,GACZE,EAAeX,OAAOY,eAGJ,MAAArC,GAAAA,IACtB,IAED,CAACU,EAAKC,EAAMC,EAAOC,IAGnBvB,EAAAgD,cAAA,MAAA,CAAIpC,SAAcD,GAChBE,GACCb,EAAAgD,cAAC,MAAA,CACCpC,IAAKM,EACLf,UAAW,GAAG8C,EAAAA,QAAQC,WAAW/C,GAAa,MAAMa,EAAciC,EAAAA,QAAQ7C,KAAO,KACjF+C,MAAO,CACL/B,IAAKQ,EAAkBR,GACvBC,KAAMO,EAAkBP,GACxBC,MAAOM,EAAkBN,GACzBC,OAAQK,EAAkBL,KAG3BrB,GAGP"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useRef, useEffect } from "react";
|
|
1
|
+
import React, { useState, useRef, useEffect, useLayoutEffect } from "react";
|
|
2
2
|
import { usePosition } from "../../hooks/usePosition.es.js";
|
|
3
3
|
import classes from "./Popover.module.scss.es.js";
|
|
4
4
|
const PopoverComponent = ({
|
|
@@ -13,9 +13,10 @@ const PopoverComponent = ({
|
|
|
13
13
|
onAnchorOutOfView,
|
|
14
14
|
...rest
|
|
15
15
|
}, ref) => {
|
|
16
|
+
const [shouldRender, setShouldRender] = useState(false);
|
|
16
17
|
const [showPopover, setShowPopover] = useState(false);
|
|
17
18
|
const elToBePositioned = useRef(null);
|
|
18
|
-
const { top, left, right, bottom, calculatePosition
|
|
19
|
+
const { top, left, right, bottom, calculatePosition } = usePosition({
|
|
19
20
|
elementToBePositioned: elToBePositioned,
|
|
20
21
|
relativeElement: anchorEl,
|
|
21
22
|
offset,
|
|
@@ -33,10 +34,20 @@ const PopoverComponent = ({
|
|
|
33
34
|
return Number(value);
|
|
34
35
|
};
|
|
35
36
|
useEffect(() => {
|
|
36
|
-
if (
|
|
37
|
-
|
|
37
|
+
if (show) {
|
|
38
|
+
setShouldRender(true);
|
|
39
|
+
} else {
|
|
40
|
+
setShowPopover(false);
|
|
38
41
|
}
|
|
39
|
-
}, [show
|
|
42
|
+
}, [show]);
|
|
43
|
+
useLayoutEffect(() => {
|
|
44
|
+
if (shouldRender && !showPopover && show) {
|
|
45
|
+
calculatePosition();
|
|
46
|
+
requestAnimationFrame(() => {
|
|
47
|
+
setShowPopover(true);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}, [shouldRender, showPopover, show, calculatePosition]);
|
|
40
51
|
useEffect(() => {
|
|
41
52
|
if (!showPopover) {
|
|
42
53
|
return;
|
|
@@ -47,10 +58,22 @@ const PopoverComponent = ({
|
|
|
47
58
|
window.removeEventListener("resize", calculatePosition);
|
|
48
59
|
window.removeEventListener("scroll", calculatePosition);
|
|
49
60
|
};
|
|
50
|
-
}, [showPopover]);
|
|
61
|
+
}, [showPopover, calculatePosition]);
|
|
51
62
|
useEffect(() => {
|
|
52
|
-
|
|
53
|
-
|
|
63
|
+
const element = elToBePositioned.current;
|
|
64
|
+
if (!element || showPopover) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const handleTransitionEnd = (event) => {
|
|
68
|
+
if (event.propertyName === "opacity") {
|
|
69
|
+
setShouldRender(false);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
element.addEventListener("transitionend", handleTransitionEnd);
|
|
73
|
+
return () => {
|
|
74
|
+
element.removeEventListener("transitionend", handleTransitionEnd);
|
|
75
|
+
};
|
|
76
|
+
}, [showPopover]);
|
|
54
77
|
useEffect(() => {
|
|
55
78
|
const anchor = anchorEl == null ? void 0 : anchorEl.current;
|
|
56
79
|
if (anchor) {
|
|
@@ -62,7 +85,7 @@ const PopoverComponent = ({
|
|
|
62
85
|
}
|
|
63
86
|
}
|
|
64
87
|
}, [top, left, right, bottom]);
|
|
65
|
-
return /* @__PURE__ */ React.createElement("div", { ref, ...rest }, /* @__PURE__ */ React.createElement(
|
|
88
|
+
return /* @__PURE__ */ React.createElement("div", { ref, ...rest }, shouldRender && /* @__PURE__ */ React.createElement(
|
|
66
89
|
"div",
|
|
67
90
|
{
|
|
68
91
|
ref: elToBePositioned,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.es.js","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n ForwardRefRenderFunction,\n ComponentPropsWithRef,\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState\n} from \"react\";\nimport { Offset, Placement, PositionType, usePosition } from \"../../hooks/usePosition\";\nimport classes from \"./Popover.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children?: ReactNode;\n show?: boolean;\n anchorEl?: RefObject<HTMLOrSVGElement>; //eslint-disable-line no-undef\n placement?: Placement;\n offset?: Offset;\n debounceAmount?: number;\n transformOrigin?: Placement;\n onAnchorOutOfView?: () => void;\n}\n\nconst PopoverComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n children,\n className,\n show,\n placement,\n offset,\n debounceAmount,\n transformOrigin,\n anchorEl,\n onAnchorOutOfView,\n ...rest\n },\n ref\n) => {\n const [showPopover, setShowPopover] = useState(false);\n const elToBePositioned = useRef<HTMLDivElement>(null);\n const { top, left, right, bottom, calculatePosition
|
|
1
|
+
{"version":3,"file":"Popover.es.js","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n ForwardRefRenderFunction,\n ComponentPropsWithRef,\n ReactNode,\n RefObject,\n useEffect,\n useLayoutEffect,\n useRef,\n useState\n} from \"react\";\nimport { Offset, Placement, PositionType, usePosition } from \"../../hooks/usePosition\";\nimport classes from \"./Popover.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n children?: ReactNode;\n show?: boolean;\n anchorEl?: RefObject<HTMLOrSVGElement>; //eslint-disable-line no-undef\n placement?: Placement;\n offset?: Offset;\n debounceAmount?: number;\n transformOrigin?: Placement;\n onAnchorOutOfView?: () => void;\n}\n\nconst PopoverComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n children,\n className,\n show,\n placement,\n offset,\n debounceAmount,\n transformOrigin,\n anchorEl,\n onAnchorOutOfView,\n ...rest\n },\n ref\n) => {\n const [shouldRender, setShouldRender] = useState(false);\n const [showPopover, setShowPopover] = useState(false);\n const elToBePositioned = useRef<HTMLDivElement>(null);\n const { top, left, right, bottom, calculatePosition } = usePosition({\n elementToBePositioned: elToBePositioned,\n relativeElement: anchorEl,\n offset: offset,\n placement: placement,\n transformOrigin: transformOrigin,\n debounceAmount: debounceAmount ?? undefined\n });\n\n const normalizePosition = (value: PositionType) => {\n if (value === \"initial\") {\n return \"initial\";\n }\n\n if (isNaN(value)) {\n return 0;\n }\n\n return Number(value);\n };\n\n useEffect(() => {\n if (show) {\n setShouldRender(true);\n } else {\n setShowPopover(false);\n }\n }, [show]);\n\n useLayoutEffect(() => {\n if (shouldRender && !showPopover && show) {\n calculatePosition();\n requestAnimationFrame(() => {\n setShowPopover(true);\n });\n }\n }, [shouldRender, showPopover, show, calculatePosition]);\n\n useEffect(() => {\n if (!showPopover) {\n return;\n }\n\n window.addEventListener(\"resize\", calculatePosition);\n window.addEventListener(\"scroll\", calculatePosition);\n\n return () => {\n window.removeEventListener(\"resize\", calculatePosition);\n window.removeEventListener(\"scroll\", calculatePosition);\n };\n }, [showPopover, calculatePosition]);\n\n useEffect(() => {\n const element = elToBePositioned.current;\n\n if (!element || showPopover) {\n return;\n }\n\n const handleTransitionEnd = (event: TransitionEvent) => {\n if (event.propertyName === \"opacity\") {\n setShouldRender(false);\n }\n };\n\n element.addEventListener(\"transitionend\", handleTransitionEnd);\n\n return () => {\n element.removeEventListener(\"transitionend\", handleTransitionEnd);\n };\n }, [showPopover]);\n\n useEffect(() => {\n const anchor = anchorEl?.current as HTMLElement;\n\n if (anchor) {\n const anchorTop = anchor.getBoundingClientRect().top;\n const anchorBottom = anchor.getBoundingClientRect().bottom;\n\n const isAnchorOffscreen =\n showPopover &&\n (Number(top) < 0 ||\n Number(left) < 0 ||\n Number(right) < 0 ||\n Number(bottom) < 0 ||\n anchorTop < 0 ||\n anchorBottom > window.innerHeight);\n\n if (isAnchorOffscreen) {\n onAnchorOutOfView?.();\n }\n }\n }, [top, left, right, bottom]);\n\n return (\n <div ref={ref} {...rest}>\n {shouldRender && (\n <div\n ref={elToBePositioned}\n className={`${classes.popover} ${className ?? \"\"} ${showPopover ? classes.show : \"\"}`}\n style={{\n top: normalizePosition(top),\n left: normalizePosition(left),\n right: normalizePosition(right),\n bottom: normalizePosition(bottom)\n }}\n >\n {children}\n </div>\n )}\n </div>\n );\n};\n\nexport const Popover = React.forwardRef(PopoverComponent);\n"],"names":[],"mappings":";;;AAwCA,MAAM,mBAAoE,CACxE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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,aAAa;AAC3B;AAAA,IAAA;AAGI,UAAA,sBAAsB,CAAC,UAA2B;AAClD,UAAA,MAAM,iBAAiB,WAAW;AACpC,wBAAgB,KAAK;AAAA,MAAA;AAAA,IAEzB;AAEQ,YAAA,iBAAiB,iBAAiB,mBAAmB;AAE7D,WAAO,MAAM;AACH,cAAA,oBAAoB,iBAAiB,mBAAmB;AAAA,IAClE;AAAA,EAAA,GACC,CAAC,WAAW,CAAC;AAEhB,YAAU,MAAM;AACd,UAAM,SAAS,qCAAU;AAEzB,QAAI,QAAQ;AACJ,YAAA,YAAY,OAAO,sBAAA,EAAwB;AAC3C,YAAA,eAAe,OAAO,sBAAA,EAAwB;AAE9C,YAAA,oBACJ,gBACC,OAAO,GAAG,IAAI,KACb,OAAO,IAAI,IAAI,KACf,OAAO,KAAK,IAAI,KAChB,OAAO,MAAM,IAAI,KACjB,YAAY,KACZ,eAAe,OAAO;AAE1B,UAAI,mBAAmB;AACD;AAAA,MAAA;AAAA,IACtB;AAAA,KAED,CAAC,KAAK,MAAM,OAAO,MAAM,CAAC;AAE7B,SACG,sBAAA,cAAA,OAAA,EAAI,KAAW,GAAG,QAChB,gBACC,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL,WAAW,GAAG,QAAQ,OAAO,IAAI,aAAa,EAAE,IAAI,cAAc,QAAQ,OAAO,EAAE;AAAA,MACnF,OAAO;AAAA,QACL,KAAK,kBAAkB,GAAG;AAAA,QAC1B,MAAM,kBAAkB,IAAI;AAAA,QAC5B,OAAO,kBAAkB,KAAK;AAAA,QAC9B,QAAQ,kBAAkB,MAAM;AAAA,MAAA;AAAA,IAClC;AAAA,IAEC;AAAA,EAAA,CAGP;AAEJ;AAEa,MAAA,UAAU,MAAM,WAAW,gBAAgB;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.Popover_sr-
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.Popover_sr-only_HO9cY{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.Popover_hidden_HO9cY{display:none}.Popover_slide-in_HO9cY{animation:Popover_slide-in_HO9cY .5s forwards}@media (prefers-reduced-motion: reduce){.Popover_slide-in_HO9cY{animation-duration:.1ms}}.Popover_slide-out_HO9cY{animation:Popover_slide-out_HO9cY .5s forwards}@media (prefers-reduced-motion: reduce){.Popover_slide-out_HO9cY{animation-duration:.1ms}}@keyframes Popover_slide-in_HO9cY{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Popover_slide-out_HO9cY{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.Popover_popover_HO9cY{position:fixed;z-index:100;pointer-events:none;background-color:var(--light);border-radius:.125rem;box-shadow:0 4px 5px #01053233,0 3px 14px #0105321f,0 8px 10px #01053224;opacity:0;transform:scale(.5);transition-property:transform,opacity;transition-duration:.2s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){.Popover_popover_HO9cY{transition-duration:.1ms}}.Popover_popover_HO9cY.Popover_show_HO9cY{transform:scale(1);pointer-events:auto;opacity:1}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o="Popover_popover_HO9cY",e="Popover_show_HO9cY",p={popover:o,show:e};exports.default=p,exports.popover=o,exports.show=e;
|
|
3
3
|
//# sourceMappingURL=Popover.module.scss.cjs.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.Popover_sr-
|
|
2
|
-
const popover = "
|
|
3
|
-
const show = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.Popover_sr-only_HO9cY{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.Popover_hidden_HO9cY{display:none}.Popover_slide-in_HO9cY{animation:Popover_slide-in_HO9cY .5s forwards}@media (prefers-reduced-motion: reduce){.Popover_slide-in_HO9cY{animation-duration:.1ms}}.Popover_slide-out_HO9cY{animation:Popover_slide-out_HO9cY .5s forwards}@media (prefers-reduced-motion: reduce){.Popover_slide-out_HO9cY{animation-duration:.1ms}}@keyframes Popover_slide-in_HO9cY{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Popover_slide-out_HO9cY{0%{transform:translateY(0)}to{transform:translateY(100vh)}}/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.Popover_popover_HO9cY{position:fixed;z-index:100;pointer-events:none;background-color:var(--light);border-radius:.125rem;box-shadow:0 4px 5px #01053233,0 3px 14px #0105321f,0 8px 10px #01053224;opacity:0;transform:scale(.5);transition-property:transform,opacity;transition-duration:.2s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){.Popover_popover_HO9cY{transition-duration:.1ms}}.Popover_popover_HO9cY.Popover_show_HO9cY{transform:scale(1);pointer-events:auto;opacity:1}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}}();
|
|
2
|
+
const popover = "Popover_popover_HO9cY";
|
|
3
|
+
const show = "Popover_show_HO9cY";
|
|
4
4
|
const classes = {
|
|
5
5
|
popover,
|
|
6
6
|
show
|