@onewelcome/react-lib-components 13.1.0 → 13.2.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.cjs.js +1 -1
- package/dist/components/Button/Button.cjs.js.map +1 -1
- package/dist/components/Button/Button.es.js +11 -2
- package/dist/components/Button/Button.es.js.map +1 -1
- 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.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenu.module.scss.es.js +6 -6
- package/dist/components/ContextMenu/ContextMenuDivider.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenuDivider.module.scss.es.js +2 -2
- 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.cjs.js +1 -1
- package/dist/components/DataGrid/DataGrid.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGrid.es.js +28 -10
- package/dist/components/DataGrid/DataGrid.es.js.map +1 -1
- package/dist/components/DataGrid/DataGrid.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGrid.module.scss.es.js +7 -6
- package/dist/components/DataGrid/DataGrid.module.scss.es.js.map +1 -1
- 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.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 +2 -1
- 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/DataGridToolbar.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.es.js +10 -10
- 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.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.es.js +1 -0
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.es.js.map +1 -1
- 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.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.es.js +13 -11
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.es.js +11 -10
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.es.js.map +1 -1
- 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.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 +8 -8
- 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/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/useAddNewBtn.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/useAddNewBtn.module.scss.es.js +4 -4
- package/dist/components/Form/Select/useSelectPositionList.cjs.js +1 -1
- package/dist/components/Form/Select/useSelectPositionList.cjs.js.map +1 -1
- package/dist/components/Form/Select/useSelectPositionList.es.js +18 -5
- package/dist/components/Form/Select/useSelectPositionList.es.js.map +1 -1
- 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.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 +5 -5
- 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.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.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.cjs.js +1 -1
- package/dist/components/Icon/Icon.cjs.js.map +1 -1
- package/dist/components/Icon/Icon.es.js +1 -0
- package/dist/components/Icon/Icon.es.js.map +1 -1
- package/dist/components/Icon/Icon.module.scss.cjs.js +2 -2
- package/dist/components/Icon/Icon.module.scss.es.js +108 -107
- package/dist/components/Icon/Icon.module.scss.es.js.map +1 -1
- package/dist/components/Layout/ActionBar/ActionBar.cjs.js +2 -0
- package/dist/components/Layout/ActionBar/ActionBar.cjs.js.map +1 -0
- package/dist/components/Layout/ActionBar/ActionBar.es.js +122 -0
- package/dist/components/Layout/ActionBar/ActionBar.es.js.map +1 -0
- package/dist/components/Layout/ActionBar/ActionBar.module.scss.cjs.js +3 -0
- package/dist/components/Layout/ActionBar/ActionBar.module.scss.cjs.js.map +1 -0
- package/dist/components/Layout/ActionBar/ActionBar.module.scss.es.js +24 -0
- package/dist/components/Layout/ActionBar/ActionBar.module.scss.es.js.map +1 -0
- 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 +17 -17
- 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.module.scss.cjs.js +2 -2
- package/dist/components/Pagination/Pagination.module.scss.es.js +14 -14
- 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.cjs.js +1 -1
- package/dist/components/Tabs/Tabs.cjs.js.map +1 -1
- package/dist/components/Tabs/Tabs.es.js +1 -1
- package/dist/components/Tabs/Tabs.es.js.map +1 -1
- 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 -23
- 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/_BaseStyling_/BaseStyling.cjs.js +1 -0
- package/dist/components/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
- package/dist/components/_BaseStyling_/BaseStyling.es.js +2 -0
- package/dist/components/_BaseStyling_/BaseStyling.es.js.map +1 -1
- 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/admin/layout/ProfileMenu/ProfileMenu.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.es.js +7 -7
- package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.es.js +13 -13
- package/dist/components/miscellaneous/IdentityProviderButton.module.scss.cjs.js +2 -2
- package/dist/components/miscellaneous/IdentityProviderButton.module.scss.es.js +3 -3
- package/dist/hooks/usePosition.cjs.js +1 -1
- package/dist/hooks/usePosition.cjs.js.map +1 -1
- package/dist/hooks/usePosition.es.js +105 -4
- package/dist/hooks/usePosition.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +22 -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 +4 -4
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.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 */.
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.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 */.Tag_tag_EVNeA{font-size:var(--font-size-sub);padding:.25rem .75rem;border:none;border-radius:3.125rem;display:inline-flex;align-items:center;gap:.25rem}.Tag_tag_EVNeA.Tag_tag-enabled_EVNeA{background-color:var(--color-green100)}.Tag_tag_EVNeA.Tag_tag-disabled_EVNeA{background-color:var(--color-blue-grey100)}.Tag_tag_EVNeA.Tag_sharp_EVNeA{border-radius:.125rem}.Tag_tag_EVNeA .Tag_label_EVNeA{line-height:2;font-size:inherit;color:inherit}')),document.head.appendChild(e)}}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="Tag_tag_EVNeA",a="Tag_sharp_EVNeA",t="Tag_label_EVNeA",l={tag:e,"tag-enabled":"Tag_tag-enabled_EVNeA","tag-disabled":"Tag_tag-disabled_EVNeA",sharp:a,label:t};exports.default=l,exports.label=t,exports.sharp=a,exports.tag=e;
|
|
3
3
|
//# sourceMappingURL=Tag.module.scss.cjs.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.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 */.
|
|
2
|
-
const tag = "
|
|
3
|
-
const sharp = "
|
|
4
|
-
const label = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.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 */.Tag_tag_EVNeA{font-size:var(--font-size-sub);padding:.25rem .75rem;border:none;border-radius:3.125rem;display:inline-flex;align-items:center;gap:.25rem}.Tag_tag_EVNeA.Tag_tag-enabled_EVNeA{background-color:var(--color-green100)}.Tag_tag_EVNeA.Tag_tag-disabled_EVNeA{background-color:var(--color-blue-grey100)}.Tag_tag_EVNeA.Tag_sharp_EVNeA{border-radius:.125rem}.Tag_tag_EVNeA .Tag_label_EVNeA{line-height:2;font-size:inherit;color:inherit}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
|
+
const tag = "Tag_tag_EVNeA";
|
|
3
|
+
const sharp = "Tag_sharp_EVNeA";
|
|
4
|
+
const label = "Tag_label_EVNeA";
|
|
5
5
|
const classes = {
|
|
6
6
|
tag,
|
|
7
|
-
"tag-enabled": "Tag_tag-
|
|
8
|
-
"tag-disabled": "Tag_tag-
|
|
7
|
+
"tag-enabled": "Tag_tag-enabled_EVNeA",
|
|
8
|
+
"tag-disabled": "Tag_tag-disabled_EVNeA",
|
|
9
9
|
sharp,
|
|
10
10
|
label
|
|
11
11
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.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 */.TextEllipsis_text-
|
|
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('/*!\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 */.TextEllipsis_text-ellipsis_EVNeA{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.TextEllipsis_popover_EVNeA{max-width:min(75ch,90%);padding:.6875rem .6875rem .6875rem .875rem;border-radius:.25rem;box-shadow:0 .1875rem .375rem #0000004a;white-space:pre-wrap;word-wrap:break-word;transition-property:opacity;transform:scale(1);z-index:1}')),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="TextEllipsis_popover_EVNeA",t={"text-ellipsis":"TextEllipsis_text-ellipsis_EVNeA",popover:e};exports.default=t,exports.popover=e;
|
|
3
3
|
//# sourceMappingURL=TextEllipsis.module.scss.cjs.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.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 */.TextEllipsis_text-
|
|
2
|
-
const popover = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.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 */.TextEllipsis_text-ellipsis_EVNeA{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.TextEllipsis_popover_EVNeA{max-width:min(75ch,90%);padding:.6875rem .6875rem .6875rem .875rem;border-radius:.25rem;box-shadow:0 .1875rem .375rem #0000004a;white-space:pre-wrap;word-wrap:break-word;transition-property:opacity;transform:scale(1);z-index:1}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
|
|
2
|
+
const popover = "TextEllipsis_popover_EVNeA";
|
|
3
3
|
const classes = {
|
|
4
|
-
"text-ellipsis": "TextEllipsis_text-
|
|
4
|
+
"text-ellipsis": "TextEllipsis_text-ellipsis_EVNeA",
|
|
5
5
|
popover
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.Tile_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('.Tile_sr-only_EVNeA{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.Tile_hidden_EVNeA{display:none}.Tile_slide-in_EVNeA{animation:Tile_slide-in_EVNeA .5s forwards}@media(prefers-reduced-motion:reduce){.Tile_slide-in_EVNeA{animation-duration:.1ms}}.Tile_slide-out_EVNeA{animation:Tile_slide-out_EVNeA .5s forwards}@media(prefers-reduced-motion:reduce){.Tile_slide-out_EVNeA{animation-duration:.1ms}}@keyframes Tile_slide-in_EVNeA{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Tile_slide-out_EVNeA{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 */.Tile_tile_EVNeA{border:1px solid var(--light-grey-border);border-radius:8px;box-sizing:border-box;padding:0 0 2rem;background-color:var(--light);font-family:var(--font-family);transition-property:box-shadow;transition-duration:.2s;transition-timing-function:ease-in-out}@media(prefers-reduced-motion:reduce){.Tile_tile_EVNeA{transition-duration:.1ms}}.Tile_tile_EVNeA:hover{box-shadow:0 3px 6px #0000004a}.Tile_tile_EVNeA header{display:flex;align-items:center}.Tile_tile_EVNeA header .Tile_icon_EVNeA{padding:0 1rem}.Tile_tile_EVNeA figure{margin:0 0 1rem;height:3rem}.Tile_tile_EVNeA figure img{vertical-align:top;height:3rem;width:auto}.Tile_tile_EVNeA .Tile_placeholder_EVNeA{font-size:3rem;margin:0 0 1rem;color:var(--greyed-out)}.Tile_tile_EVNeA .Tile_content_EVNeA{display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:default;padding:0 1rem}.Tile_tile_EVNeA.Tile_loading_EVNeA header{display:none}.Tile_tile_EVNeA.Tile_loading_EVNeA .Tile_image_EVNeA{margin-top:2.5rem;border-radius:.5rem;width:3rem;height:3rem;position:relative;overflow:hidden;background-color:var(--skeleton-background-color)}.Tile_tile_EVNeA.Tile_loading_EVNeA .Tile_image_EVNeA:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(var(--skeleton-animation-color-rgb),0) 0,rgba(var(--skeleton-animation-color-rgb),.2) 20%,rgba(var(--skeleton-animation-color-rgb),.5) 60%,rgba(var(--skeleton-animation-color-rgb),0));content:"";animation:Tile_shimmer_EVNeA 2s infinite}@media(prefers-reduced-motion:reduce){.Tile_tile_EVNeA.Tile_loading_EVNeA .Tile_image_EVNeA:after{animation:none}}.Tile_tile_EVNeA.Tile_loading_EVNeA .Tile_title_EVNeA{color:transparent;display:inline-block;width:70%;border-radius:.5rem;position:relative;overflow:hidden;background-color:var(--skeleton-background-color)}.Tile_tile_EVNeA.Tile_loading_EVNeA .Tile_title_EVNeA:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(var(--skeleton-animation-color-rgb),0) 0,rgba(var(--skeleton-animation-color-rgb),.2) 20%,rgba(var(--skeleton-animation-color-rgb),.5) 60%,rgba(var(--skeleton-animation-color-rgb),0));content:"";animation:Tile_shimmer_EVNeA 2s infinite}@media(prefers-reduced-motion:reduce){.Tile_tile_EVNeA.Tile_loading_EVNeA .Tile_title_EVNeA:after{animation:none}}@keyframes Tile_shimmer_EVNeA{to{transform:translate(100%)}}')),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="Tile_tile_EVNeA",t="Tile_icon_EVNeA",l="Tile_placeholder_EVNeA",o="Tile_content_EVNeA",i="Tile_loading_EVNeA",r="Tile_image_EVNeA",_="Tile_title_EVNeA",n={tile:e,icon:t,placeholder:l,content:o,loading:i,image:r,title:_};exports.content=o,exports.default=n,exports.icon=t,exports.image=r,exports.loading=i,exports.placeholder=l,exports.tile=e,exports.title=_;
|
|
3
3
|
//# sourceMappingURL=Tile.module.scss.cjs.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.Tile_sr-
|
|
2
|
-
const tile = "
|
|
3
|
-
const icon = "
|
|
4
|
-
const placeholder = "
|
|
5
|
-
const content = "
|
|
6
|
-
const loading = "
|
|
7
|
-
const image = "
|
|
8
|
-
const title = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.Tile_sr-only_EVNeA{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.Tile_hidden_EVNeA{display:none}.Tile_slide-in_EVNeA{animation:Tile_slide-in_EVNeA .5s forwards}@media(prefers-reduced-motion:reduce){.Tile_slide-in_EVNeA{animation-duration:.1ms}}.Tile_slide-out_EVNeA{animation:Tile_slide-out_EVNeA .5s forwards}@media(prefers-reduced-motion:reduce){.Tile_slide-out_EVNeA{animation-duration:.1ms}}@keyframes Tile_slide-in_EVNeA{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Tile_slide-out_EVNeA{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 */.Tile_tile_EVNeA{border:1px solid var(--light-grey-border);border-radius:8px;box-sizing:border-box;padding:0 0 2rem;background-color:var(--light);font-family:var(--font-family);transition-property:box-shadow;transition-duration:.2s;transition-timing-function:ease-in-out}@media(prefers-reduced-motion:reduce){.Tile_tile_EVNeA{transition-duration:.1ms}}.Tile_tile_EVNeA:hover{box-shadow:0 3px 6px #0000004a}.Tile_tile_EVNeA header{display:flex;align-items:center}.Tile_tile_EVNeA header .Tile_icon_EVNeA{padding:0 1rem}.Tile_tile_EVNeA figure{margin:0 0 1rem;height:3rem}.Tile_tile_EVNeA figure img{vertical-align:top;height:3rem;width:auto}.Tile_tile_EVNeA .Tile_placeholder_EVNeA{font-size:3rem;margin:0 0 1rem;color:var(--greyed-out)}.Tile_tile_EVNeA .Tile_content_EVNeA{display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:default;padding:0 1rem}.Tile_tile_EVNeA.Tile_loading_EVNeA header{display:none}.Tile_tile_EVNeA.Tile_loading_EVNeA .Tile_image_EVNeA{margin-top:2.5rem;border-radius:.5rem;width:3rem;height:3rem;position:relative;overflow:hidden;background-color:var(--skeleton-background-color)}.Tile_tile_EVNeA.Tile_loading_EVNeA .Tile_image_EVNeA:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(var(--skeleton-animation-color-rgb),0) 0,rgba(var(--skeleton-animation-color-rgb),.2) 20%,rgba(var(--skeleton-animation-color-rgb),.5) 60%,rgba(var(--skeleton-animation-color-rgb),0));content:"";animation:Tile_shimmer_EVNeA 2s infinite}@media(prefers-reduced-motion:reduce){.Tile_tile_EVNeA.Tile_loading_EVNeA .Tile_image_EVNeA:after{animation:none}}.Tile_tile_EVNeA.Tile_loading_EVNeA .Tile_title_EVNeA{color:transparent;display:inline-block;width:70%;border-radius:.5rem;position:relative;overflow:hidden;background-color:var(--skeleton-background-color)}.Tile_tile_EVNeA.Tile_loading_EVNeA .Tile_title_EVNeA:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(var(--skeleton-animation-color-rgb),0) 0,rgba(var(--skeleton-animation-color-rgb),.2) 20%,rgba(var(--skeleton-animation-color-rgb),.5) 60%,rgba(var(--skeleton-animation-color-rgb),0));content:"";animation:Tile_shimmer_EVNeA 2s infinite}@media(prefers-reduced-motion:reduce){.Tile_tile_EVNeA.Tile_loading_EVNeA .Tile_title_EVNeA:after{animation:none}}@keyframes Tile_shimmer_EVNeA{to{transform:translate(100%)}}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
|
|
2
|
+
const tile = "Tile_tile_EVNeA";
|
|
3
|
+
const icon = "Tile_icon_EVNeA";
|
|
4
|
+
const placeholder = "Tile_placeholder_EVNeA";
|
|
5
|
+
const content = "Tile_content_EVNeA";
|
|
6
|
+
const loading = "Tile_loading_EVNeA";
|
|
7
|
+
const image = "Tile_image_EVNeA";
|
|
8
|
+
const title = "Tile_title_EVNeA";
|
|
9
9
|
const classes = {
|
|
10
10
|
tile,
|
|
11
11
|
icon,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.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 */.
|
|
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('/*!\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 */.Tiles_tiles_EVNeA{display:grid;grid-gap:1rem;grid-template-columns:repeat(1,1fr)}@media screen and (min-width:30em){.Tiles_tiles_EVNeA{grid-template-columns:repeat(auto-fit,minmax(14.5rem,1fr))}}')),document.head.appendChild(e)}}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="Tiles_tiles_EVNeA",t={tiles:e};exports.default=t,exports.tiles=e;
|
|
3
3
|
//# sourceMappingURL=Tiles.module.scss.cjs.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.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 */.
|
|
2
|
-
const tiles = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.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 */.Tiles_tiles_EVNeA{display:grid;grid-gap:1rem;grid-template-columns:repeat(1,1fr)}@media screen and (min-width:30em){.Tiles_tiles_EVNeA{grid-template-columns:repeat(auto-fit,minmax(14.5rem,1fr))}}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
|
+
const tiles = "Tiles_tiles_EVNeA";
|
|
3
3
|
const classes = {
|
|
4
4
|
tiles
|
|
5
5
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=require("../Icon/Icon.cjs.js"),o=require("./Tooltip.module.scss.cjs.js"),r=require("../../util/helper.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=require("../Icon/Icon.cjs.js"),o=require("./Tooltip.module.scss.cjs.js"),r=require("../../util/helper.cjs.js"),l=require("../../hooks/usePosition.cjs.js"),a=require("react-dom"),i=require("../../hooks/useGetDomRoot.cjs.js"),n={left:{placement:{horizontal:"left",vertical:"center"},offset:{left:0,right:12,top:0,bottom:0},transformOrigin:{horizontal:"right",vertical:"center"}},leftEnd:{placement:{horizontal:"left",vertical:"top"},offset:{left:0,right:12,top:-12,bottom:0},transformOrigin:{horizontal:"right",vertical:"top"}},leftStart:{placement:{horizontal:"left",vertical:"bottom"},offset:{left:0,right:12,top:0,bottom:-12},transformOrigin:{horizontal:"right",vertical:"bottom"}},right:{placement:{horizontal:"right",vertical:"center"},offset:{left:12,right:0,top:0,bottom:0},transformOrigin:{horizontal:"left",vertical:"center"}},rightEnd:{placement:{horizontal:"right",vertical:"top"},offset:{left:12,right:0,top:-12,bottom:0},transformOrigin:{horizontal:"left",vertical:"top"}},rightStart:{placement:{horizontal:"right",vertical:"bottom"},offset:{left:12,right:0,top:0,bottom:-12},transformOrigin:{horizontal:"left",vertical:"bottom"}},top:{placement:{horizontal:"center",vertical:"top"},offset:{left:0,right:0,top:0,bottom:12},transformOrigin:{horizontal:"center",vertical:"bottom"}},topEnd:{placement:{horizontal:"left",vertical:"top"},offset:{left:-12,right:0,top:0,bottom:12},transformOrigin:{horizontal:"left",vertical:"bottom"}},topStart:{placement:{horizontal:"right",vertical:"top"},offset:{left:0,right:-12,top:0,bottom:12},transformOrigin:{horizontal:"right",vertical:"bottom"}},bottom:{placement:{horizontal:"center",vertical:"bottom"},offset:{left:0,right:0,top:12,bottom:0},transformOrigin:{horizontal:"center",vertical:"top"}},bottomEnd:{placement:{horizontal:"left",vertical:"bottom"},offset:{left:-12,right:0,top:12,bottom:0},transformOrigin:{horizontal:"left",vertical:"top"}},bottomStart:{placement:{horizontal:"right",vertical:"bottom"},offset:{left:0,right:-12,top:12,bottom:0},transformOrigin:{horizontal:"right",vertical:"top"}}},c=t.forwardRef(({title:c,children:s,className:f,domRoot:m,label:u,location:p="right",position:h="center",color:g="black",icon:b,...d},v)=>{const[z]=t.useState(r.generateID()),[E,O]=t.useState(!1),[$,j]=t.useState(!1),y=v||t.createRef(),{root:I}=i.useGetDomRoot(m,y),S=t.useRef(null),N=t.useRef(null),M=t.useRef(null),R=t.useMemo(()=>"center"===h?p:`${p}${h.charAt(0).toUpperCase()+h.slice(1)}`,[p,h]),{top:q,bottom:L,right:k,left:P,calculatePositionImmediate:T,resetCalculationState:x}=l.usePosition({relativeElement:S,elementToBePositioned:N,placement:n[R].placement,offset:n[R].offset,transformOrigin:n[R].transformOrigin}),w=()=>{M.current&&(clearTimeout(M.current),M.current=null),O(!0)},B=()=>{j(!1),O(!1),x()};t.useEffect(()=>{if(!$)return;const t=t=>{"Escape"===t.key&&B()};return document.addEventListener("keyup",t),()=>{document.removeEventListener("keyup",t)}},[$]),t.useLayoutEffect(()=>{E&&(T(),j(!0))},[E]),t.useEffect(()=>()=>{M.current&&(clearTimeout(M.current),M.current=null)},[]);const C=`${o.default.tooltip} ${o.default[g]} ${$?o.default.visible:""} ${o.default[R.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()]}`;return t.createElement("div",{...d,ref:y,className:`${o.default.wrapper} ${f??""}`},(()=>{if(t.isValidElement(u)){const e=u.props;return t.cloneElement(u,{ref:S,onMouseEnter:t=>{var o;null==(o=e.onMouseEnter)||o.call(e,t),w()},onMouseLeave:t=>{var o;null==(o=e.onMouseLeave)||o.call(e,t),B()},onFocus:t=>{var o;null==(o=e.onFocus)||o.call(e,t),w()},onBlur:t=>{var o;null==(o=e.onBlur)||o.call(e,t),B()},"aria-describedby":z,tabIndex:e.tabIndex??0,className:`${e.className||""} ${o.default.label}`.trim()})}return t.createElement("span",{className:o.default.label,tabIndex:0,onFocus:w,onBlur:B,"aria-describedby":z},u)})(),t.createElement("div",{className:`${o.default["tooltip-wrapper"]}`},!t.isValidElement(u)&&t.createElement(e.Icon,{ref:S,tag:"div",onMouseEnter:w,onMouseLeave:B,icon:e.Icons.InfoCircle,"aria-describedby":z,className:`${o.default.icon}`}),E&&a.createPortal(t.createElement("div",{ref:N,style:{...d.style,top:q,left:P,right:k,bottom:L},id:z,className:C},c&&t.createElement("span",{className:o.default["tooltip-title"]},c),s),I)))});exports.Tooltip=c;
|
|
2
2
|
//# sourceMappingURL=Tooltip.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.cjs.js","sources":["../../../src/components/Tooltip/Tooltip.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 ComponentPropsWithRef,\n createRef,\n ForwardRefRenderFunction,\n ReactElement,\n ReactNode,\n RefObject,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport { Icon, Icons } from \"../Icon/Icon\";\nimport classes from \"./Tooltip.module.scss\";\nimport { generateID } from \"../../util/helper\";\nimport { Offset, Placement, usePosition } from \"../../hooks/usePosition\";\nimport { createPortal } from \"react-dom\";\nimport { useGetDomRoot } from \"../../hooks/useGetDomRoot\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n label: ReactNode;\n title?: string;\n children: ReactNode;\n domRoot?: HTMLElement;\n icon?: Icons;\n location?: \"left\" | \"right\" | \"top\" | \"bottom\";\n color?: \"black\" | \"blue\";\n position?: \"start\" | \"center\" | \"end\";\n}\n\ninterface DefaultPosition {\n placement: Placement;\n offset: Offset;\n transformOrigin: Placement;\n}\n\ntype Location = \"left\" | \"right\" | \"top\" | \"bottom\";\ntype Position = \"start\" | \"end\";\ntype LocationPosition = `${Location}${Capitalize<Position>}` | `${Location}`;\nconst locations: Record<LocationPosition, DefaultPosition> = {\n left: {\n placement: { horizontal: \"left\", vertical: \"center\" },\n offset: { left: 0, right: 12, top: 0, bottom: 0 },\n transformOrigin: { horizontal: \"right\", vertical: \"center\" }\n },\n leftEnd: {\n placement: { horizontal: \"left\", vertical: \"top\" },\n offset: { left: 0, right: 12, top: -12, bottom: 0 },\n transformOrigin: { horizontal: \"right\", vertical: \"top\" }\n },\n leftStart: {\n placement: { horizontal: \"left\", vertical: \"bottom\" },\n offset: { left: 0, right: 12, top: 0, bottom: -12 },\n transformOrigin: { horizontal: \"right\", vertical: \"bottom\" }\n },\n right: {\n placement: { horizontal: \"right\", vertical: \"center\" },\n offset: { left: 12, right: 0, top: 0, bottom: 0 },\n transformOrigin: { horizontal: \"left\", vertical: \"center\" }\n },\n rightEnd: {\n placement: { horizontal: \"right\", vertical: \"top\" },\n offset: { left: 12, right: 0, top: -12, bottom: 0 },\n transformOrigin: { horizontal: \"left\", vertical: \"top\" }\n },\n rightStart: {\n placement: { horizontal: \"right\", vertical: \"bottom\" },\n offset: { left: 12, right: 0, top: 0, bottom: -12 },\n transformOrigin: { horizontal: \"left\", vertical: \"bottom\" }\n },\n top: {\n placement: { horizontal: \"center\", vertical: \"top\" },\n offset: { left: 0, right: 0, top: 0, bottom: 12 },\n transformOrigin: { horizontal: \"center\", vertical: \"bottom\" }\n },\n topEnd: {\n placement: { horizontal: \"left\", vertical: \"top\" },\n offset: { left: -12, right: 0, top: 0, bottom: 12 },\n transformOrigin: { horizontal: \"left\", vertical: \"bottom\" }\n },\n topStart: {\n placement: { horizontal: \"right\", vertical: \"top\" },\n offset: { left: 0, right: -12, top: 0, bottom: 12 },\n transformOrigin: { horizontal: \"right\", vertical: \"bottom\" }\n },\n bottom: {\n placement: { horizontal: \"center\", vertical: \"bottom\" },\n offset: { left: 0, right: 0, top: 12, bottom: 0 },\n transformOrigin: { horizontal: \"center\", vertical: \"top\" }\n },\n bottomEnd: {\n placement: { horizontal: \"left\", vertical: \"bottom\" },\n offset: { left: -12, right: 0, top: 12, bottom: 0 },\n transformOrigin: { horizontal: \"left\", vertical: \"top\" }\n },\n bottomStart: {\n placement: { horizontal: \"right\", vertical: \"bottom\" },\n offset: { left: 0, right: -12, top: 12, bottom: 0 },\n transformOrigin: { horizontal: \"right\", vertical: \"top\" }\n }\n};\n\nconst TooltipComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n title,\n children,\n className,\n domRoot,\n label,\n location = \"right\",\n position = \"center\",\n color = \"black\",\n icon,\n ...rest\n }: Props,\n ref\n) => {\n const [identifier] = useState(generateID());\n const [shouldRender, setShouldRender] = useState(false);\n const [visible, setVisible] = useState(false);\n const wrappingDivRef = (ref as RefObject<HTMLDivElement>) || createRef<HTMLDivElement>();\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n\n const relativeElement = useRef<HTMLDivElement>(null);\n const elementToBePositioned = useRef<HTMLDivElement>(null);\n\n const determinedLocation = useMemo(() => {\n if (position === \"center\") {\n return location;\n }\n\n return `${location}${position.charAt(0).toUpperCase() + position.slice(1)}` as LocationPosition;\n }, [location, position]);\n\n const { top, bottom, right, left, calculatePosition } = usePosition({\n relativeElement: relativeElement,\n elementToBePositioned: elementToBePositioned,\n placement: locations[determinedLocation].placement,\n offset: locations[determinedLocation].offset,\n transformOrigin: locations[determinedLocation].transformOrigin\n });\n\n const show = () => {\n setShouldRender(true);\n requestAnimationFrame(() => {\n setVisible(true);\n });\n };\n\n const hide = () => {\n setVisible(false);\n };\n\n useEffect(() => {\n if (!visible) {\n return;\n }\n\n const escapePressHandler = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n hide();\n }\n };\n\n document.addEventListener(\"keyup\", escapePressHandler);\n\n return () => {\n document.removeEventListener(\"keyup\", escapePressHandler);\n };\n }, [visible]);\n\n useLayoutEffect(() => {\n if (shouldRender) {\n calculatePosition();\n }\n }, [shouldRender]);\n\n useEffect(() => {\n const element = elementToBePositioned.current;\n\n if (!element || visible) {\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 }, [visible]);\n\n const renderChildren = () => {\n if (React.isValidElement(label)) {\n return React.cloneElement(label as ReactElement, {\n ref: relativeElement,\n onMouseEnter: show,\n onMouseLeave: hide,\n onFocus: show,\n onBlur: hide,\n \"aria-describedby\": identifier,\n tabIndex: (label as ReactElement).props.tabIndex ?? 0,\n className: classes[\"label\"]\n });\n }\n\n return (\n <span\n className={classes[\"label\"]}\n tabIndex={0}\n onFocus={show}\n onBlur={hide}\n aria-describedby={identifier}\n >\n {label}\n </span>\n );\n };\n\n const tooltipClasses = `${classes[\"tooltip\"]} ${classes[color]} ${\n visible ? classes[\"visible\"] : \"\"\n } ${classes[determinedLocation.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, \"$1-$2\").toLowerCase()]}`;\n\n return (\n <div {...rest} ref={wrappingDivRef} className={`${classes.wrapper} ${className ?? \"\"}`}>\n {renderChildren()}\n <div className={`${classes[\"tooltip-wrapper\"]}`}>\n {!React.isValidElement(label) && (\n <Icon\n ref={relativeElement}\n tag=\"div\"\n onMouseEnter={show}\n onMouseLeave={hide}\n icon={Icons.InfoCircle}\n aria-describedby={identifier}\n className={`${classes.icon}`}\n />\n )}\n {shouldRender &&\n createPortal(\n <div\n ref={elementToBePositioned}\n style={{\n ...rest.style,\n top: top,\n left: left,\n right: right,\n bottom: bottom\n }}\n id={identifier}\n className={tooltipClasses}\n >\n {title && <span className={classes[\"tooltip-title\"]}>{title}</span>}\n {children}\n </div>,\n root\n )}\n </div>\n </div>\n );\n};\n\nexport const Tooltip = React.forwardRef(TooltipComponent);\n"],"names":["locations","left","placement","horizontal","vertical","offset","right","top","bottom","transformOrigin","leftEnd","leftStart","rightEnd","rightStart","topEnd","topStart","bottomEnd","bottomStart","Tooltip","React","forwardRef","title","children","className","domRoot","label","location","position","color","icon","rest","ref","identifier","useState","generateID","shouldRender","setShouldRender","visible","setVisible","wrappingDivRef","createRef","root","useGetDomRoot","relativeElement","useRef","elementToBePositioned","determinedLocation","useMemo","charAt","toUpperCase","slice","calculatePosition","usePosition","show","requestAnimationFrame","hide","useEffect","escapePressHandler","event","key","document","addEventListener","removeEventListener","useLayoutEffect","element","current","handleTransitionEnd","propertyName","tooltipClasses","classes","replace","toLowerCase","createElement","wrapper","isValidElement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AASzB,EACT0B,OAAQxB,EACR,mBAAoBvB,EACpBgD,SAAWvD,EAAuBwD,MAAMD,UAAY,EACpDzD,UAAW8C,EAAAA,QAAe,QAK5BlD,EAAAqD,cAAC,OAAA,CACCjD,UAAW8C,EAAAA,QAAe,MAC1BW,SAAU,EACVF,QAASzB,EACT0B,OAAQxB,EACR,mBAAkBvB,GAEjBP,KAYH+C,cAAC,MAAA,CAAIjD,UAAW,GAAG8C,UAAQ,uBACvBlD,EAAMuD,eAAejD,IACrBN,EAAAqD,cAACU,EAAAA,KAAA,CACCnD,IAAKY,EACLwC,IAAI,MACJP,aAAcvB,EACdwB,aAActB,EACd1B,KAAMuD,EAAAA,MAAMC,WACZ,mBAAkBrD,EAClBT,UAAW,GAAG8C,EAAAA,QAAQxC,SAGzBM,GACCmD,EAAAA,aACEnE,EAAAqD,cAAC,MAAA,CACCzC,IAAKc,EACL0C,MAAO,IACFzD,EAAKyD,MACRhF,MACAN,OACAK,QACAE,UAEFgF,GAAIxD,EACJT,UAAW6C,GAEV/C,GAASF,EAAAqD,cAAC,OAAA,CAAKjD,UAAW8C,UAAQ,kBAAmBhD,GACrDC,GAEHmB"}
|
|
1
|
+
{"version":3,"file":"Tooltip.cjs.js","sources":["../../../src/components/Tooltip/Tooltip.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 ComponentPropsWithRef,\n createRef,\n ForwardRefRenderFunction,\n ReactElement,\n ReactNode,\n RefObject,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport { Icon, Icons } from \"../Icon/Icon\";\nimport classes from \"./Tooltip.module.scss\";\nimport { generateID } from \"../../util/helper\";\nimport { Offset, Placement, usePosition } from \"../../hooks/usePosition\";\nimport { createPortal } from \"react-dom\";\nimport { useGetDomRoot } from \"../../hooks/useGetDomRoot\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n label: ReactNode;\n title?: string;\n children: ReactNode;\n domRoot?: HTMLElement;\n icon?: Icons;\n location?: \"left\" | \"right\" | \"top\" | \"bottom\";\n color?: \"black\" | \"blue\";\n position?: \"start\" | \"center\" | \"end\";\n}\n\ninterface DefaultPosition {\n placement: Placement;\n offset: Offset;\n transformOrigin: Placement;\n}\n\ntype Location = \"left\" | \"right\" | \"top\" | \"bottom\";\ntype Position = \"start\" | \"end\";\ntype LocationPosition = `${Location}${Capitalize<Position>}` | `${Location}`;\nconst locations: Record<LocationPosition, DefaultPosition> = {\n left: {\n placement: { horizontal: \"left\", vertical: \"center\" },\n offset: { left: 0, right: 12, top: 0, bottom: 0 },\n transformOrigin: { horizontal: \"right\", vertical: \"center\" }\n },\n leftEnd: {\n placement: { horizontal: \"left\", vertical: \"top\" },\n offset: { left: 0, right: 12, top: -12, bottom: 0 },\n transformOrigin: { horizontal: \"right\", vertical: \"top\" }\n },\n leftStart: {\n placement: { horizontal: \"left\", vertical: \"bottom\" },\n offset: { left: 0, right: 12, top: 0, bottom: -12 },\n transformOrigin: { horizontal: \"right\", vertical: \"bottom\" }\n },\n right: {\n placement: { horizontal: \"right\", vertical: \"center\" },\n offset: { left: 12, right: 0, top: 0, bottom: 0 },\n transformOrigin: { horizontal: \"left\", vertical: \"center\" }\n },\n rightEnd: {\n placement: { horizontal: \"right\", vertical: \"top\" },\n offset: { left: 12, right: 0, top: -12, bottom: 0 },\n transformOrigin: { horizontal: \"left\", vertical: \"top\" }\n },\n rightStart: {\n placement: { horizontal: \"right\", vertical: \"bottom\" },\n offset: { left: 12, right: 0, top: 0, bottom: -12 },\n transformOrigin: { horizontal: \"left\", vertical: \"bottom\" }\n },\n top: {\n placement: { horizontal: \"center\", vertical: \"top\" },\n offset: { left: 0, right: 0, top: 0, bottom: 12 },\n transformOrigin: { horizontal: \"center\", vertical: \"bottom\" }\n },\n topEnd: {\n placement: { horizontal: \"left\", vertical: \"top\" },\n offset: { left: -12, right: 0, top: 0, bottom: 12 },\n transformOrigin: { horizontal: \"left\", vertical: \"bottom\" }\n },\n topStart: {\n placement: { horizontal: \"right\", vertical: \"top\" },\n offset: { left: 0, right: -12, top: 0, bottom: 12 },\n transformOrigin: { horizontal: \"right\", vertical: \"bottom\" }\n },\n bottom: {\n placement: { horizontal: \"center\", vertical: \"bottom\" },\n offset: { left: 0, right: 0, top: 12, bottom: 0 },\n transformOrigin: { horizontal: \"center\", vertical: \"top\" }\n },\n bottomEnd: {\n placement: { horizontal: \"left\", vertical: \"bottom\" },\n offset: { left: -12, right: 0, top: 12, bottom: 0 },\n transformOrigin: { horizontal: \"left\", vertical: \"top\" }\n },\n bottomStart: {\n placement: { horizontal: \"right\", vertical: \"bottom\" },\n offset: { left: 0, right: -12, top: 12, bottom: 0 },\n transformOrigin: { horizontal: \"right\", vertical: \"top\" }\n }\n};\n\nconst TooltipComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n title,\n children,\n className,\n domRoot,\n label,\n location = \"right\",\n position = \"center\",\n color = \"black\",\n icon,\n ...rest\n }: Props,\n ref\n) => {\n const [identifier] = useState(generateID());\n const [shouldRender, setShouldRender] = useState(false);\n const [visible, setVisible] = useState(false);\n const wrappingDivRef = (ref as RefObject<HTMLDivElement>) || createRef<HTMLDivElement>();\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n\n const relativeElement = useRef<HTMLDivElement>(null);\n const elementToBePositioned = useRef<HTMLDivElement>(null);\n const cleanupTimeoutRef = useRef<NodeJS.Timeout | null>(null);\n\n const determinedLocation = useMemo(() => {\n if (position === \"center\") {\n return location;\n }\n\n return `${location}${position.charAt(0).toUpperCase() + position.slice(1)}` as LocationPosition;\n }, [location, position]);\n\n const { top, bottom, right, left, calculatePositionImmediate, resetCalculationState } =\n usePosition({\n relativeElement: relativeElement,\n elementToBePositioned: elementToBePositioned,\n placement: locations[determinedLocation].placement,\n offset: locations[determinedLocation].offset,\n transformOrigin: locations[determinedLocation].transformOrigin\n });\n\n const show = () => {\n if (cleanupTimeoutRef.current) {\n clearTimeout(cleanupTimeoutRef.current);\n cleanupTimeoutRef.current = null;\n }\n setShouldRender(true);\n };\n\n const hide = () => {\n setVisible(false);\n setShouldRender(false);\n resetCalculationState();\n };\n\n useEffect(() => {\n if (!visible) {\n return;\n }\n\n const escapePressHandler = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n hide();\n }\n };\n\n document.addEventListener(\"keyup\", escapePressHandler);\n\n return () => {\n document.removeEventListener(\"keyup\", escapePressHandler);\n };\n }, [visible]);\n\n useLayoutEffect(() => {\n if (shouldRender) {\n calculatePositionImmediate();\n setVisible(true);\n }\n }, [shouldRender]);\n\n useEffect(() => {\n return () => {\n if (cleanupTimeoutRef.current) {\n clearTimeout(cleanupTimeoutRef.current);\n cleanupTimeoutRef.current = null;\n }\n };\n }, []);\n\n const renderChildren = () => {\n if (React.isValidElement(label)) {\n const existingProps = (label as ReactElement).props;\n return React.cloneElement(label as ReactElement, {\n ref: relativeElement,\n onMouseEnter: (e: React.MouseEvent) => {\n existingProps.onMouseEnter?.(e);\n show();\n },\n onMouseLeave: (e: React.MouseEvent) => {\n existingProps.onMouseLeave?.(e);\n hide();\n },\n onFocus: (e: React.FocusEvent) => {\n existingProps.onFocus?.(e);\n show();\n },\n onBlur: (e: React.FocusEvent) => {\n existingProps.onBlur?.(e);\n hide();\n },\n \"aria-describedby\": identifier,\n tabIndex: existingProps.tabIndex ?? 0,\n className: `${existingProps.className || \"\"} ${classes[\"label\"]}`.trim()\n });\n }\n\n return (\n <span\n className={classes[\"label\"]}\n tabIndex={0}\n onFocus={show}\n onBlur={hide}\n aria-describedby={identifier}\n >\n {label}\n </span>\n );\n };\n\n const tooltipClasses = `${classes[\"tooltip\"]} ${classes[color]} ${\n visible ? classes[\"visible\"] : \"\"\n } ${classes[determinedLocation.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, \"$1-$2\").toLowerCase()]}`;\n\n return (\n <div {...rest} ref={wrappingDivRef} className={`${classes.wrapper} ${className ?? \"\"}`}>\n {renderChildren()}\n <div className={`${classes[\"tooltip-wrapper\"]}`}>\n {!React.isValidElement(label) && (\n <Icon\n ref={relativeElement}\n tag=\"div\"\n onMouseEnter={show}\n onMouseLeave={hide}\n icon={Icons.InfoCircle}\n aria-describedby={identifier}\n className={`${classes.icon}`}\n />\n )}\n {shouldRender &&\n createPortal(\n <div\n ref={elementToBePositioned}\n style={{\n ...rest.style,\n top: top,\n left: left,\n right: right,\n bottom: bottom\n }}\n id={identifier}\n className={tooltipClasses}\n >\n {title && <span className={classes[\"tooltip-title\"]}>{title}</span>}\n {children}\n </div>,\n root\n )}\n </div>\n </div>\n );\n};\n\nexport const Tooltip = React.forwardRef(TooltipComponent);\n"],"names":["locations","left","placement","horizontal","vertical","offset","right","top","bottom","transformOrigin","leftEnd","leftStart","rightEnd","rightStart","topEnd","topStart","bottomEnd","bottomStart","Tooltip","React","forwardRef","title","children","className","domRoot","label","location","position","color","icon","rest","ref","identifier","useState","generateID","shouldRender","setShouldRender","visible","setVisible","wrappingDivRef","createRef","root","useGetDomRoot","relativeElement","useRef","elementToBePositioned","cleanupTimeoutRef","determinedLocation","useMemo","charAt","toUpperCase","slice","calculatePositionImmediate","resetCalculationState","usePosition","show","current","clearTimeout","hide","useEffect","escapePressHandler","event","key","document","addEventListener","removeEventListener","useLayoutEffect","tooltipClasses","classes","replace","toLowerCase","createElement","wrapper","isValidElement","existingProps","props","cloneElement","onMouseEnter","e","_a","call","onMouseLeave","onFocus","onBlur","tabIndex","trim","renderChildren","Icon","tag","Icons","InfoCircle","createPortal","style","id"],"mappings":"2UAwDMA,EAAuD,CAC3DC,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AcO,eAAdF,EAAAC,KAAAN,EAA6BI,GAC7BpB,KAEFwB,QAAUJ,UACR,OAAAC,EAAAL,EAAcQ,UAAdH,EAAAC,KAAAN,EAAwBI,GACxBvB,KAEF4B,OAASL,UACP,OAAAC,EAAAL,EAAcS,SAAdJ,EAAAC,KAAAN,EAAuBI,GACvBpB,KAEF,mBAAoB1B,EACpBoD,SAAUV,EAAcU,UAAY,EACpC7D,UAAW,GAAGmD,EAAcnD,WAAa,MAAM6C,UAAe,QAAIiB,QAEtE,CAEA,OACElE,EAAAoD,cAAC,OAAA,CACChD,UAAW6C,EAAAA,QAAe,MAC1BgB,SAAU,EACVF,QAAS3B,EACT4B,OAAQzB,EACR,mBAAkB1B,GAEjBP,IAWF6D,KACDf,cAAC,MAAA,CAAIhD,UAAW,GAAG6C,UAAQ,uBACvBjD,EAAMsD,eAAehD,IACrBN,EAAAoD,cAACgB,EAAAA,KAAA,CACCxD,IAAKY,EACL6C,IAAI,MACJX,aAActB,EACd0B,aAAcvB,EACd7B,KAAM4D,EAAAA,MAAMC,WACZ,mBAAkB1D,EAClBT,UAAW,GAAG6C,EAAAA,QAAQvC,SAGzBM,GACCwD,EAAAA,aACExE,EAAAoD,cAAC,MAAA,CACCxC,IAAKc,EACL+C,MAAO,IACF9D,EAAK8D,MACRrF,MACAN,OACAK,QACAE,UAEFqF,GAAI7D,EACJT,UAAW4C,GAEV9C,GAASF,EAAAoD,cAAC,OAAA,CAAKhD,UAAW6C,UAAQ,kBAAmB/C,GACrDC,GAEHmB"}
|
|
@@ -86,13 +86,14 @@ const TooltipComponent = ({
|
|
|
86
86
|
const { root } = useGetDomRoot(domRoot, wrappingDivRef);
|
|
87
87
|
const relativeElement = useRef(null);
|
|
88
88
|
const elementToBePositioned = useRef(null);
|
|
89
|
+
const cleanupTimeoutRef = useRef(null);
|
|
89
90
|
const determinedLocation = useMemo(() => {
|
|
90
91
|
if (position === "center") {
|
|
91
92
|
return location;
|
|
92
93
|
}
|
|
93
94
|
return `${location}${position.charAt(0).toUpperCase() + position.slice(1)}`;
|
|
94
95
|
}, [location, position]);
|
|
95
|
-
const { top, bottom, right, left,
|
|
96
|
+
const { top, bottom, right, left, calculatePositionImmediate, resetCalculationState } = usePosition({
|
|
96
97
|
relativeElement,
|
|
97
98
|
elementToBePositioned,
|
|
98
99
|
placement: locations[determinedLocation].placement,
|
|
@@ -100,13 +101,16 @@ const TooltipComponent = ({
|
|
|
100
101
|
transformOrigin: locations[determinedLocation].transformOrigin
|
|
101
102
|
});
|
|
102
103
|
const show = () => {
|
|
104
|
+
if (cleanupTimeoutRef.current) {
|
|
105
|
+
clearTimeout(cleanupTimeoutRef.current);
|
|
106
|
+
cleanupTimeoutRef.current = null;
|
|
107
|
+
}
|
|
103
108
|
setShouldRender(true);
|
|
104
|
-
requestAnimationFrame(() => {
|
|
105
|
-
setVisible(true);
|
|
106
|
-
});
|
|
107
109
|
};
|
|
108
110
|
const hide = () => {
|
|
109
111
|
setVisible(false);
|
|
112
|
+
setShouldRender(false);
|
|
113
|
+
resetCalculationState();
|
|
110
114
|
};
|
|
111
115
|
useEffect(() => {
|
|
112
116
|
if (!visible) {
|
|
@@ -124,35 +128,46 @@ const TooltipComponent = ({
|
|
|
124
128
|
}, [visible]);
|
|
125
129
|
useLayoutEffect(() => {
|
|
126
130
|
if (shouldRender) {
|
|
127
|
-
|
|
131
|
+
calculatePositionImmediate();
|
|
132
|
+
setVisible(true);
|
|
128
133
|
}
|
|
129
134
|
}, [shouldRender]);
|
|
130
135
|
useEffect(() => {
|
|
131
|
-
const element = elementToBePositioned.current;
|
|
132
|
-
if (!element || visible) {
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
const handleTransitionEnd = (event) => {
|
|
136
|
-
if (event.propertyName === "opacity") {
|
|
137
|
-
setShouldRender(false);
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
element.addEventListener("transitionend", handleTransitionEnd);
|
|
141
136
|
return () => {
|
|
142
|
-
|
|
137
|
+
if (cleanupTimeoutRef.current) {
|
|
138
|
+
clearTimeout(cleanupTimeoutRef.current);
|
|
139
|
+
cleanupTimeoutRef.current = null;
|
|
140
|
+
}
|
|
143
141
|
};
|
|
144
|
-
}, [
|
|
142
|
+
}, []);
|
|
145
143
|
const renderChildren = () => {
|
|
146
144
|
if (React.isValidElement(label)) {
|
|
145
|
+
const existingProps = label.props;
|
|
147
146
|
return React.cloneElement(label, {
|
|
148
147
|
ref: relativeElement,
|
|
149
|
-
onMouseEnter:
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
148
|
+
onMouseEnter: (e) => {
|
|
149
|
+
var _a;
|
|
150
|
+
(_a = existingProps.onMouseEnter) == null ? void 0 : _a.call(existingProps, e);
|
|
151
|
+
show();
|
|
152
|
+
},
|
|
153
|
+
onMouseLeave: (e) => {
|
|
154
|
+
var _a;
|
|
155
|
+
(_a = existingProps.onMouseLeave) == null ? void 0 : _a.call(existingProps, e);
|
|
156
|
+
hide();
|
|
157
|
+
},
|
|
158
|
+
onFocus: (e) => {
|
|
159
|
+
var _a;
|
|
160
|
+
(_a = existingProps.onFocus) == null ? void 0 : _a.call(existingProps, e);
|
|
161
|
+
show();
|
|
162
|
+
},
|
|
163
|
+
onBlur: (e) => {
|
|
164
|
+
var _a;
|
|
165
|
+
(_a = existingProps.onBlur) == null ? void 0 : _a.call(existingProps, e);
|
|
166
|
+
hide();
|
|
167
|
+
},
|
|
153
168
|
"aria-describedby": identifier,
|
|
154
|
-
tabIndex:
|
|
155
|
-
className: classes["label"]
|
|
169
|
+
tabIndex: existingProps.tabIndex ?? 0,
|
|
170
|
+
className: `${existingProps.className || ""} ${classes["label"]}`.trim()
|
|
156
171
|
});
|
|
157
172
|
}
|
|
158
173
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.es.js","sources":["../../../src/components/Tooltip/Tooltip.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 ComponentPropsWithRef,\n createRef,\n ForwardRefRenderFunction,\n ReactElement,\n ReactNode,\n RefObject,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport { Icon, Icons } from \"../Icon/Icon\";\nimport classes from \"./Tooltip.module.scss\";\nimport { generateID } from \"../../util/helper\";\nimport { Offset, Placement, usePosition } from \"../../hooks/usePosition\";\nimport { createPortal } from \"react-dom\";\nimport { useGetDomRoot } from \"../../hooks/useGetDomRoot\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n label: ReactNode;\n title?: string;\n children: ReactNode;\n domRoot?: HTMLElement;\n icon?: Icons;\n location?: \"left\" | \"right\" | \"top\" | \"bottom\";\n color?: \"black\" | \"blue\";\n position?: \"start\" | \"center\" | \"end\";\n}\n\ninterface DefaultPosition {\n placement: Placement;\n offset: Offset;\n transformOrigin: Placement;\n}\n\ntype Location = \"left\" | \"right\" | \"top\" | \"bottom\";\ntype Position = \"start\" | \"end\";\ntype LocationPosition = `${Location}${Capitalize<Position>}` | `${Location}`;\nconst locations: Record<LocationPosition, DefaultPosition> = {\n left: {\n placement: { horizontal: \"left\", vertical: \"center\" },\n offset: { left: 0, right: 12, top: 0, bottom: 0 },\n transformOrigin: { horizontal: \"right\", vertical: \"center\" }\n },\n leftEnd: {\n placement: { horizontal: \"left\", vertical: \"top\" },\n offset: { left: 0, right: 12, top: -12, bottom: 0 },\n transformOrigin: { horizontal: \"right\", vertical: \"top\" }\n },\n leftStart: {\n placement: { horizontal: \"left\", vertical: \"bottom\" },\n offset: { left: 0, right: 12, top: 0, bottom: -12 },\n transformOrigin: { horizontal: \"right\", vertical: \"bottom\" }\n },\n right: {\n placement: { horizontal: \"right\", vertical: \"center\" },\n offset: { left: 12, right: 0, top: 0, bottom: 0 },\n transformOrigin: { horizontal: \"left\", vertical: \"center\" }\n },\n rightEnd: {\n placement: { horizontal: \"right\", vertical: \"top\" },\n offset: { left: 12, right: 0, top: -12, bottom: 0 },\n transformOrigin: { horizontal: \"left\", vertical: \"top\" }\n },\n rightStart: {\n placement: { horizontal: \"right\", vertical: \"bottom\" },\n offset: { left: 12, right: 0, top: 0, bottom: -12 },\n transformOrigin: { horizontal: \"left\", vertical: \"bottom\" }\n },\n top: {\n placement: { horizontal: \"center\", vertical: \"top\" },\n offset: { left: 0, right: 0, top: 0, bottom: 12 },\n transformOrigin: { horizontal: \"center\", vertical: \"bottom\" }\n },\n topEnd: {\n placement: { horizontal: \"left\", vertical: \"top\" },\n offset: { left: -12, right: 0, top: 0, bottom: 12 },\n transformOrigin: { horizontal: \"left\", vertical: \"bottom\" }\n },\n topStart: {\n placement: { horizontal: \"right\", vertical: \"top\" },\n offset: { left: 0, right: -12, top: 0, bottom: 12 },\n transformOrigin: { horizontal: \"right\", vertical: \"bottom\" }\n },\n bottom: {\n placement: { horizontal: \"center\", vertical: \"bottom\" },\n offset: { left: 0, right: 0, top: 12, bottom: 0 },\n transformOrigin: { horizontal: \"center\", vertical: \"top\" }\n },\n bottomEnd: {\n placement: { horizontal: \"left\", vertical: \"bottom\" },\n offset: { left: -12, right: 0, top: 12, bottom: 0 },\n transformOrigin: { horizontal: \"left\", vertical: \"top\" }\n },\n bottomStart: {\n placement: { horizontal: \"right\", vertical: \"bottom\" },\n offset: { left: 0, right: -12, top: 12, bottom: 0 },\n transformOrigin: { horizontal: \"right\", vertical: \"top\" }\n }\n};\n\nconst TooltipComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n title,\n children,\n className,\n domRoot,\n label,\n location = \"right\",\n position = \"center\",\n color = \"black\",\n icon,\n ...rest\n }: Props,\n ref\n) => {\n const [identifier] = useState(generateID());\n const [shouldRender, setShouldRender] = useState(false);\n const [visible, setVisible] = useState(false);\n const wrappingDivRef = (ref as RefObject<HTMLDivElement>) || createRef<HTMLDivElement>();\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n\n const relativeElement = useRef<HTMLDivElement>(null);\n const elementToBePositioned = useRef<HTMLDivElement>(null);\n\n const determinedLocation = useMemo(() => {\n if (position === \"center\") {\n return location;\n }\n\n return `${location}${position.charAt(0).toUpperCase() + position.slice(1)}` as LocationPosition;\n }, [location, position]);\n\n const { top, bottom, right, left, calculatePosition } = usePosition({\n relativeElement: relativeElement,\n elementToBePositioned: elementToBePositioned,\n placement: locations[determinedLocation].placement,\n offset: locations[determinedLocation].offset,\n transformOrigin: locations[determinedLocation].transformOrigin\n });\n\n const show = () => {\n setShouldRender(true);\n requestAnimationFrame(() => {\n setVisible(true);\n });\n };\n\n const hide = () => {\n setVisible(false);\n };\n\n useEffect(() => {\n if (!visible) {\n return;\n }\n\n const escapePressHandler = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n hide();\n }\n };\n\n document.addEventListener(\"keyup\", escapePressHandler);\n\n return () => {\n document.removeEventListener(\"keyup\", escapePressHandler);\n };\n }, [visible]);\n\n useLayoutEffect(() => {\n if (shouldRender) {\n calculatePosition();\n }\n }, [shouldRender]);\n\n useEffect(() => {\n const element = elementToBePositioned.current;\n\n if (!element || visible) {\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 }, [visible]);\n\n const renderChildren = () => {\n if (React.isValidElement(label)) {\n return React.cloneElement(label as ReactElement, {\n ref: relativeElement,\n onMouseEnter: show,\n onMouseLeave: hide,\n onFocus: show,\n onBlur: hide,\n \"aria-describedby\": identifier,\n tabIndex: (label as ReactElement).props.tabIndex ?? 0,\n className: classes[\"label\"]\n });\n }\n\n return (\n <span\n className={classes[\"label\"]}\n tabIndex={0}\n onFocus={show}\n onBlur={hide}\n aria-describedby={identifier}\n >\n {label}\n </span>\n );\n };\n\n const tooltipClasses = `${classes[\"tooltip\"]} ${classes[color]} ${\n visible ? classes[\"visible\"] : \"\"\n } ${classes[determinedLocation.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, \"$1-$2\").toLowerCase()]}`;\n\n return (\n <div {...rest} ref={wrappingDivRef} className={`${classes.wrapper} ${className ?? \"\"}`}>\n {renderChildren()}\n <div className={`${classes[\"tooltip-wrapper\"]}`}>\n {!React.isValidElement(label) && (\n <Icon\n ref={relativeElement}\n tag=\"div\"\n onMouseEnter={show}\n onMouseLeave={hide}\n icon={Icons.InfoCircle}\n aria-describedby={identifier}\n className={`${classes.icon}`}\n />\n )}\n {shouldRender &&\n createPortal(\n <div\n ref={elementToBePositioned}\n style={{\n ...rest.style,\n top: top,\n left: left,\n right: right,\n bottom: bottom\n }}\n id={identifier}\n className={tooltipClasses}\n >\n {title && <span className={classes[\"tooltip-title\"]}>{title}</span>}\n {children}\n </div>,\n root\n )}\n </div>\n </div>\n );\n};\n\nexport const Tooltip = React.forwardRef(TooltipComponent);\n"],"names":[],"mappings":";;;;;;;AAwDA,MAAM,YAAuD;AAAA,EAC3D,MAAM;AAAA,IACJ,WAAW,EAAE,YAAY,QAAQ,UAAU,SAAA;AAAA,IAC3C,QAAQ,EAAE,MAAM,GAAG,OAAO,IAAI,KAAK,GAAG,QAAQ,EAAA;AAAA,IAC9C,iBAAiB,EAAE,YAAY,SAAS,UAAU,SAAA;AAAA,EAAS;AAAA,EAE7D,SAAS;AAAA,IACP,WAAW,EAAE,YAAY,QAAQ,UAAU,MAAA;AAAA,IAC3C,QAAQ,EAAE,MAAM,GAAG,OAAO,IAAI,KAAK,KAAK,QAAQ,EAAA;AAAA,IAChD,i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A,MACd,cAAc;AAAA,MACd,MAAM,MAAM;AAAA,MACZ,oBAAkB;AAAA,MAClB,WAAW,GAAG,QAAQ,IAAI;AAAA,IAAA;AAAA,EAAA,GAG7B,gBACC;AAAA,IACE,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAK;AAAA,QACL,OAAO;AAAA,UACL,GAAG,KAAK;AAAA,UACR;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,QAEF,IAAI;AAAA,QACJ,WAAW;AAAA,MAAA;AAAA,MAEV,SAAS,sBAAA,cAAC,QAAA,EAAK,WAAW,QAAQ,eAAe,KAAI,KAAM;AAAA,MAC3D;AAAA,IAAA;AAAA,IAEH;AAAA,EAAA,CAEN,CACF;AAEJ;AAEO,MAAM,UAAU,MAAM,WAAW,gBAAgB;"}
|
|
1
|
+
{"version":3,"file":"Tooltip.es.js","sources":["../../../src/components/Tooltip/Tooltip.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 ComponentPropsWithRef,\n createRef,\n ForwardRefRenderFunction,\n ReactElement,\n ReactNode,\n RefObject,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport { Icon, Icons } from \"../Icon/Icon\";\nimport classes from \"./Tooltip.module.scss\";\nimport { generateID } from \"../../util/helper\";\nimport { Offset, Placement, usePosition } from \"../../hooks/usePosition\";\nimport { createPortal } from \"react-dom\";\nimport { useGetDomRoot } from \"../../hooks/useGetDomRoot\";\n\nexport interface Props extends ComponentPropsWithRef<\"div\"> {\n label: ReactNode;\n title?: string;\n children: ReactNode;\n domRoot?: HTMLElement;\n icon?: Icons;\n location?: \"left\" | \"right\" | \"top\" | \"bottom\";\n color?: \"black\" | \"blue\";\n position?: \"start\" | \"center\" | \"end\";\n}\n\ninterface DefaultPosition {\n placement: Placement;\n offset: Offset;\n transformOrigin: Placement;\n}\n\ntype Location = \"left\" | \"right\" | \"top\" | \"bottom\";\ntype Position = \"start\" | \"end\";\ntype LocationPosition = `${Location}${Capitalize<Position>}` | `${Location}`;\nconst locations: Record<LocationPosition, DefaultPosition> = {\n left: {\n placement: { horizontal: \"left\", vertical: \"center\" },\n offset: { left: 0, right: 12, top: 0, bottom: 0 },\n transformOrigin: { horizontal: \"right\", vertical: \"center\" }\n },\n leftEnd: {\n placement: { horizontal: \"left\", vertical: \"top\" },\n offset: { left: 0, right: 12, top: -12, bottom: 0 },\n transformOrigin: { horizontal: \"right\", vertical: \"top\" }\n },\n leftStart: {\n placement: { horizontal: \"left\", vertical: \"bottom\" },\n offset: { left: 0, right: 12, top: 0, bottom: -12 },\n transformOrigin: { horizontal: \"right\", vertical: \"bottom\" }\n },\n right: {\n placement: { horizontal: \"right\", vertical: \"center\" },\n offset: { left: 12, right: 0, top: 0, bottom: 0 },\n transformOrigin: { horizontal: \"left\", vertical: \"center\" }\n },\n rightEnd: {\n placement: { horizontal: \"right\", vertical: \"top\" },\n offset: { left: 12, right: 0, top: -12, bottom: 0 },\n transformOrigin: { horizontal: \"left\", vertical: \"top\" }\n },\n rightStart: {\n placement: { horizontal: \"right\", vertical: \"bottom\" },\n offset: { left: 12, right: 0, top: 0, bottom: -12 },\n transformOrigin: { horizontal: \"left\", vertical: \"bottom\" }\n },\n top: {\n placement: { horizontal: \"center\", vertical: \"top\" },\n offset: { left: 0, right: 0, top: 0, bottom: 12 },\n transformOrigin: { horizontal: \"center\", vertical: \"bottom\" }\n },\n topEnd: {\n placement: { horizontal: \"left\", vertical: \"top\" },\n offset: { left: -12, right: 0, top: 0, bottom: 12 },\n transformOrigin: { horizontal: \"left\", vertical: \"bottom\" }\n },\n topStart: {\n placement: { horizontal: \"right\", vertical: \"top\" },\n offset: { left: 0, right: -12, top: 0, bottom: 12 },\n transformOrigin: { horizontal: \"right\", vertical: \"bottom\" }\n },\n bottom: {\n placement: { horizontal: \"center\", vertical: \"bottom\" },\n offset: { left: 0, right: 0, top: 12, bottom: 0 },\n transformOrigin: { horizontal: \"center\", vertical: \"top\" }\n },\n bottomEnd: {\n placement: { horizontal: \"left\", vertical: \"bottom\" },\n offset: { left: -12, right: 0, top: 12, bottom: 0 },\n transformOrigin: { horizontal: \"left\", vertical: \"top\" }\n },\n bottomStart: {\n placement: { horizontal: \"right\", vertical: \"bottom\" },\n offset: { left: 0, right: -12, top: 12, bottom: 0 },\n transformOrigin: { horizontal: \"right\", vertical: \"top\" }\n }\n};\n\nconst TooltipComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (\n {\n title,\n children,\n className,\n domRoot,\n label,\n location = \"right\",\n position = \"center\",\n color = \"black\",\n icon,\n ...rest\n }: Props,\n ref\n) => {\n const [identifier] = useState(generateID());\n const [shouldRender, setShouldRender] = useState(false);\n const [visible, setVisible] = useState(false);\n const wrappingDivRef = (ref as RefObject<HTMLDivElement>) || createRef<HTMLDivElement>();\n const { root } = useGetDomRoot(domRoot, wrappingDivRef);\n\n const relativeElement = useRef<HTMLDivElement>(null);\n const elementToBePositioned = useRef<HTMLDivElement>(null);\n const cleanupTimeoutRef = useRef<NodeJS.Timeout | null>(null);\n\n const determinedLocation = useMemo(() => {\n if (position === \"center\") {\n return location;\n }\n\n return `${location}${position.charAt(0).toUpperCase() + position.slice(1)}` as LocationPosition;\n }, [location, position]);\n\n const { top, bottom, right, left, calculatePositionImmediate, resetCalculationState } =\n usePosition({\n relativeElement: relativeElement,\n elementToBePositioned: elementToBePositioned,\n placement: locations[determinedLocation].placement,\n offset: locations[determinedLocation].offset,\n transformOrigin: locations[determinedLocation].transformOrigin\n });\n\n const show = () => {\n if (cleanupTimeoutRef.current) {\n clearTimeout(cleanupTimeoutRef.current);\n cleanupTimeoutRef.current = null;\n }\n setShouldRender(true);\n };\n\n const hide = () => {\n setVisible(false);\n setShouldRender(false);\n resetCalculationState();\n };\n\n useEffect(() => {\n if (!visible) {\n return;\n }\n\n const escapePressHandler = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n hide();\n }\n };\n\n document.addEventListener(\"keyup\", escapePressHandler);\n\n return () => {\n document.removeEventListener(\"keyup\", escapePressHandler);\n };\n }, [visible]);\n\n useLayoutEffect(() => {\n if (shouldRender) {\n calculatePositionImmediate();\n setVisible(true);\n }\n }, [shouldRender]);\n\n useEffect(() => {\n return () => {\n if (cleanupTimeoutRef.current) {\n clearTimeout(cleanupTimeoutRef.current);\n cleanupTimeoutRef.current = null;\n }\n };\n }, []);\n\n const renderChildren = () => {\n if (React.isValidElement(label)) {\n const existingProps = (label as ReactElement).props;\n return React.cloneElement(label as ReactElement, {\n ref: relativeElement,\n onMouseEnter: (e: React.MouseEvent) => {\n existingProps.onMouseEnter?.(e);\n show();\n },\n onMouseLeave: (e: React.MouseEvent) => {\n existingProps.onMouseLeave?.(e);\n hide();\n },\n onFocus: (e: React.FocusEvent) => {\n existingProps.onFocus?.(e);\n show();\n },\n onBlur: (e: React.FocusEvent) => {\n existingProps.onBlur?.(e);\n hide();\n },\n \"aria-describedby\": identifier,\n tabIndex: existingProps.tabIndex ?? 0,\n className: `${existingProps.className || \"\"} ${classes[\"label\"]}`.trim()\n });\n }\n\n return (\n <span\n className={classes[\"label\"]}\n tabIndex={0}\n onFocus={show}\n onBlur={hide}\n aria-describedby={identifier}\n >\n {label}\n </span>\n );\n };\n\n const tooltipClasses = `${classes[\"tooltip\"]} ${classes[color]} ${\n visible ? classes[\"visible\"] : \"\"\n } ${classes[determinedLocation.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, \"$1-$2\").toLowerCase()]}`;\n\n return (\n <div {...rest} ref={wrappingDivRef} className={`${classes.wrapper} ${className ?? \"\"}`}>\n {renderChildren()}\n <div className={`${classes[\"tooltip-wrapper\"]}`}>\n {!React.isValidElement(label) && (\n <Icon\n ref={relativeElement}\n tag=\"div\"\n onMouseEnter={show}\n onMouseLeave={hide}\n icon={Icons.InfoCircle}\n aria-describedby={identifier}\n className={`${classes.icon}`}\n />\n )}\n {shouldRender &&\n createPortal(\n <div\n ref={elementToBePositioned}\n style={{\n ...rest.style,\n top: top,\n left: left,\n right: right,\n bottom: bottom\n }}\n id={identifier}\n className={tooltipClasses}\n >\n {title && <span className={classes[\"tooltip-title\"]}>{title}</span>}\n {children}\n </div>,\n root\n )}\n </div>\n </div>\n );\n};\n\nexport const Tooltip = React.forwardRef(TooltipComponent);\n"],"names":[],"mappings":";;;;;;;AAwDA,MAAM,YAAuD;AAAA,EAC3D,MAAM;AAAA,IACJ,WAAW,EAAE,YAAY,QAAQ,UAAU,SAAA;AAAA,IAC3C,QAAQ,EAAE,MAAM,GAAG,OAAO,IAAI,KAAK,GAAG,QAAQ,EAAA;AAAA,IAC9C,iBAAiB,EAAE,YAAY,SAAS,UAAU,SAAA;AAAA,EAAS;AAAA,EAE7D,SAAS;AAAA,IACP,WAAW,EAAE,YAAY,QAAQ,UAAU,MAAA;AAAA,IAC3C,QAAQ,EAAE,MAAM,GAAG,OAAO,IAAI,KAAK,KAAK,QAAQ,EAAA;AAAA,IAChD,iBAAiB,EAAE,YAAY,SAAS,UAAU,MAAA;AAAA,EAAM;AAAA,EAE1D,WAAW;AAAA,IACT,WAAW,EAAE,YAAY,QAAQ,UAAU,SAAA;AAAA,IAC3C,QAAQ,EAAE,MAAM,GAAG,OAAO,IAAI,KAAK,GAAG,QAAQ,IAAA;AAAA,IAC9C,iBAAiB,EAAE,YAAY,SAAS,UAAU,SAAA;AAAA,EAAS;AAAA,EAE7D,OAAO;AAAA,IACL,WAAW,EAAE,YAAY,SAAS,UAAU,SAAA;AAAA,IAC5C,QAAQ,EAAE,MAAM,IAAI,OAAO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AAI;AAAA,IAAA;AAAA,EAAA,GAG7B,gBACC;AAAA,IACE,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAK;AAAA,QACL,OAAO;AAAA,UACL,GAAG,KAAK;AAAA,UACR;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,QAEF,IAAI;AAAA,QACJ,WAAW;AAAA,MAAA;AAAA,MAEV,SAAS,sBAAA,cAAC,QAAA,EAAK,WAAW,QAAQ,eAAe,KAAI,KAAM;AAAA,MAC3D;AAAA,IAAA;AAAA,IAEH;AAAA,EAAA,CAEN,CACF;AAEJ;AAEO,MAAM,UAAU,MAAM,WAAW,gBAAgB;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('.Tooltip_sr-
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('.Tooltip_sr-only_EVNeA{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.Tooltip_hidden_EVNeA{display:none}.Tooltip_slide-in_EVNeA{animation:Tooltip_slide-in_EVNeA .5s forwards}@media(prefers-reduced-motion:reduce){.Tooltip_slide-in_EVNeA{animation-duration:.1ms}}.Tooltip_slide-out_EVNeA{animation:Tooltip_slide-out_EVNeA .5s forwards}@media(prefers-reduced-motion:reduce){.Tooltip_slide-out_EVNeA{animation-duration:.1ms}}@keyframes Tooltip_slide-in_EVNeA{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Tooltip_slide-out_EVNeA{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 */.Tooltip_wrapper_EVNeA{display:flex;align-items:center}.Tooltip_tooltip-wrapper_EVNeA .Tooltip_icon_EVNeA{margin-left:.5rem;color:var(--greyed-out);transition-property:all;transition-duration:.2s;transition-timing-function:ease-in-out}@media(prefers-reduced-motion:reduce){.Tooltip_tooltip-wrapper_EVNeA .Tooltip_icon_EVNeA{transition-duration:.1ms}}.Tooltip_tooltip-wrapper_EVNeA .Tooltip_icon_EVNeA:hover{color:var(--default)}.Tooltip_tooltip-wrapper_EVNeA .Tooltip_icon_EVNeA.Tooltip_error_EVNeA{color:var(--error)}.Tooltip_tooltip_EVNeA{position:fixed;font-size:var(--font-size-sub);line-height:1.33;border-radius:.125rem;padding:.75rem;color:var(--light);max-width:20.625rem;opacity:0;transform:scale(0);transform-origin:center center;pointer-events:none;box-shadow:0 .0625rem .3125rem #0105324d;word-break:break-word;z-index:var(--tooltip-index);transition-property:opacity,transform;transition-duration:.2s;transition-timing-function:ease-in-out}@media(prefers-reduced-motion:reduce){.Tooltip_tooltip_EVNeA{transition-duration:.1ms}}.Tooltip_tooltip_EVNeA.Tooltip_black_EVNeA{background-color:var(--tooltip-background-color)}.Tooltip_tooltip_EVNeA.Tooltip_black_EVNeA.Tooltip_top_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-top-color:var(--tooltip-background-color);position:absolute;left:50%;right:initial;transform:translate(-50%);top:100%;border-bottom-width:0}.Tooltip_tooltip_EVNeA.Tooltip_black_EVNeA.Tooltip_top-start_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-top-color:var(--tooltip-background-color);position:absolute;right:.75rem;left:initial;top:100%;border-bottom-width:0}.Tooltip_tooltip_EVNeA.Tooltip_black_EVNeA.Tooltip_top-end_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-top-color:var(--tooltip-background-color);position:absolute;left:1rem;right:initial;top:100%;border-bottom-width:0}.Tooltip_tooltip_EVNeA.Tooltip_black_EVNeA.Tooltip_bottom_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-bottom-color:var(--tooltip-background-color);position:absolute;left:50%;right:initial;transform:translate(-50%);bottom:100%;border-top-width:0}.Tooltip_tooltip_EVNeA.Tooltip_black_EVNeA.Tooltip_bottom-start_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-bottom-color:var(--tooltip-background-color);position:absolute;right:.75rem;left:initial;bottom:100%;border-top-width:0}.Tooltip_tooltip_EVNeA.Tooltip_black_EVNeA.Tooltip_bottom-end_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-bottom-color:var(--tooltip-background-color);position:absolute;left:1rem;right:initial;bottom:100%;border-top-width:0}.Tooltip_tooltip_EVNeA.Tooltip_black_EVNeA.Tooltip_left_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-left-color:var(--tooltip-background-color);position:absolute;top:50%;bottom:initial;transform:translateY(-50%);left:100%;border-right-width:0}.Tooltip_tooltip_EVNeA.Tooltip_black_EVNeA.Tooltip_left-start_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-left-color:var(--tooltip-background-color);position:absolute;bottom:.9375rem;top:initial;left:100%;border-right-width:0}.Tooltip_tooltip_EVNeA.Tooltip_black_EVNeA.Tooltip_left-end_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-left-color:var(--tooltip-background-color);position:absolute;top:.875rem;bottom:initial;left:100%;border-right-width:0}.Tooltip_tooltip_EVNeA.Tooltip_black_EVNeA.Tooltip_right_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-right-color:var(--tooltip-background-color);position:absolute;top:50%;bottom:initial;transform:translateY(-50%);right:100%;border-left-width:0}.Tooltip_tooltip_EVNeA.Tooltip_black_EVNeA.Tooltip_right-start_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-right-color:var(--tooltip-background-color);position:absolute;bottom:.9375rem;top:initial;right:100%;border-left-width:0}.Tooltip_tooltip_EVNeA.Tooltip_black_EVNeA.Tooltip_right-end_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-right-color:var(--tooltip-background-color);position:absolute;top:.875rem;bottom:initial;right:100%;border-left-width:0}.Tooltip_tooltip_EVNeA.Tooltip_blue_EVNeA{background-color:var(--color-blue-grey500)}.Tooltip_tooltip_EVNeA.Tooltip_blue_EVNeA.Tooltip_top_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-top-color:var(--color-blue-grey500);position:absolute;left:50%;right:initial;transform:translate(-50%);top:100%;border-bottom-width:0}.Tooltip_tooltip_EVNeA.Tooltip_blue_EVNeA.Tooltip_top-start_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-top-color:var(--color-blue-grey500);position:absolute;right:.75rem;left:initial;top:100%;border-bottom-width:0}.Tooltip_tooltip_EVNeA.Tooltip_blue_EVNeA.Tooltip_top-end_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-top-color:var(--color-blue-grey500);position:absolute;left:1rem;right:initial;top:100%;border-bottom-width:0}.Tooltip_tooltip_EVNeA.Tooltip_blue_EVNeA.Tooltip_bottom_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-bottom-color:var(--color-blue-grey500);position:absolute;left:50%;right:initial;transform:translate(-50%);bottom:100%;border-top-width:0}.Tooltip_tooltip_EVNeA.Tooltip_blue_EVNeA.Tooltip_bottom-start_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-bottom-color:var(--color-blue-grey500);position:absolute;right:.75rem;left:initial;bottom:100%;border-top-width:0}.Tooltip_tooltip_EVNeA.Tooltip_blue_EVNeA.Tooltip_bottom-end_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-bottom-color:var(--color-blue-grey500);position:absolute;left:1rem;right:initial;bottom:100%;border-top-width:0}.Tooltip_tooltip_EVNeA.Tooltip_blue_EVNeA.Tooltip_left_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-left-color:var(--color-blue-grey500);position:absolute;top:50%;bottom:initial;transform:translateY(-50%);left:100%;border-right-width:0}.Tooltip_tooltip_EVNeA.Tooltip_blue_EVNeA.Tooltip_left-start_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-left-color:var(--color-blue-grey500);position:absolute;bottom:.9375rem;top:initial;left:100%;border-right-width:0}.Tooltip_tooltip_EVNeA.Tooltip_blue_EVNeA.Tooltip_left-end_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-left-color:var(--color-blue-grey500);position:absolute;top:.875rem;bottom:initial;left:100%;border-right-width:0}.Tooltip_tooltip_EVNeA.Tooltip_blue_EVNeA.Tooltip_right_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-right-color:var(--color-blue-grey500);position:absolute;top:50%;bottom:initial;transform:translateY(-50%);right:100%;border-left-width:0}.Tooltip_tooltip_EVNeA.Tooltip_blue_EVNeA.Tooltip_right-start_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-right-color:var(--color-blue-grey500);position:absolute;bottom:.9375rem;top:initial;right:100%;border-left-width:0}.Tooltip_tooltip_EVNeA.Tooltip_blue_EVNeA.Tooltip_right-end_EVNeA:after{width:0;height:0;border-style:solid;border-width:.25rem;border-color:transparent;border-right-color:var(--color-blue-grey500);position:absolute;top:.875rem;bottom:initial;right:100%;border-left-width:0}.Tooltip_tooltip_EVNeA:after{content:""}.Tooltip_tooltip_EVNeA.Tooltip_visible_EVNeA{opacity:1;transform:scale(1)}.Tooltip_label_EVNeA:focus-visible{outline:calc(.125 * var(--font-size)) solid var(--color-focus);outline-offset:calc(.125 * var(--font-size));border-radius:var(--focus-border-radius)}.Tooltip_tooltip-title_EVNeA{font-weight:500;font-size:var(--font-size-form-label);line-height:1.43;display:block;margin-bottom:.25rem}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="Tooltip_hidden_EVNeA",o="Tooltip_wrapper_EVNeA",e="Tooltip_icon_EVNeA",l="Tooltip_error_EVNeA",p="Tooltip_tooltip_EVNeA",i="Tooltip_black_EVNeA",r="Tooltip_top_EVNeA",_="Tooltip_bottom_EVNeA",s="Tooltip_left_EVNeA",T="Tooltip_right_EVNeA",A="Tooltip_blue_EVNeA",E="Tooltip_visible_EVNeA",N="Tooltip_label_EVNeA",V={"sr-only":"Tooltip_sr-only_EVNeA",hidden:t,"slide-in":"Tooltip_slide-in_EVNeA","slide-out":"Tooltip_slide-out_EVNeA",wrapper:o,"tooltip-wrapper":"Tooltip_tooltip-wrapper_EVNeA",icon:e,error:l,tooltip:p,black:i,top:r,"top-start":"Tooltip_top-start_EVNeA","top-end":"Tooltip_top-end_EVNeA",bottom:_,"bottom-start":"Tooltip_bottom-start_EVNeA","bottom-end":"Tooltip_bottom-end_EVNeA",left:s,"left-start":"Tooltip_left-start_EVNeA","left-end":"Tooltip_left-end_EVNeA",right:T,"right-start":"Tooltip_right-start_EVNeA","right-end":"Tooltip_right-end_EVNeA",blue:A,visible:E,label:N,"tooltip-title":"Tooltip_tooltip-title_EVNeA"};exports.black=i,exports.blue=A,exports.bottom=_,exports.default=V,exports.error=l,exports.hidden=t,exports.icon=e,exports.label=N,exports.left=s,exports.right=T,exports.tooltip=p,exports.top=r,exports.visible=E,exports.wrapper=o;
|
|
3
3
|
//# sourceMappingURL=Tooltip.module.scss.cjs.js.map
|