@onewelcome/react-lib-components 10.0.1 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.cjs.js +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.es.js +5 -5
- package/dist/components/Button/BaseButton.module.scss.cjs.js +2 -2
- package/dist/components/Button/BaseButton.module.scss.es.js +4 -4
- package/dist/components/Button/Button.module.scss.cjs.js +2 -2
- package/dist/components/Button/Button.module.scss.es.js +17 -17
- package/dist/components/Button/IconButton.module.scss.cjs.js +2 -2
- package/dist/components/Button/IconButton.module.scss.es.js +18 -18
- package/dist/components/ContextMenu/ContextMenu.cjs.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.cjs.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.es.js +32 -19
- package/dist/components/ContextMenu/ContextMenu.es.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenu.module.scss.es.js +5 -5
- package/dist/components/ContextMenu/ContextMenuDivider.cjs.js +2 -0
- package/dist/components/ContextMenu/ContextMenuDivider.cjs.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenuDivider.es.js +9 -0
- package/dist/components/ContextMenu/ContextMenuDivider.es.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenuDivider.module.scss.cjs.js +3 -0
- package/dist/components/ContextMenu/ContextMenuDivider.module.scss.cjs.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenuDivider.module.scss.es.js +8 -0
- package/dist/components/ContextMenu/ContextMenuDivider.module.scss.es.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenuItem.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenuItem.module.scss.es.js +3 -3
- package/dist/components/DataGrid/DataGrid.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGrid.module.scss.es.js +6 -6
- package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.es.js +6 -6
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.es.js +2 -2
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.es.js +7 -7
- package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.es.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.es.js +5 -5
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.es.js +4 -4
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.es.js +5 -5
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.es.js +11 -3
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.es.js +24 -24
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.es.js +0 -8
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.es.js +9 -9
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.es.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterPopover.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.es.js +4 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.es.js +8 -8
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.es.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.es.js +17 -17
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.es.js +3 -3
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.es.js +7 -7
- package/dist/components/DatePicker/DatePicker.module.scss.cjs.js +2 -2
- package/dist/components/DatePicker/DatePicker.module.scss.es.js +31 -31
- package/dist/components/Form/Checkbox/Checkbox.module.scss.cjs.js +2 -2
- package/dist/components/Form/Checkbox/Checkbox.module.scss.es.js +13 -13
- package/dist/components/Form/Fieldset/Fieldset.module.scss.cjs.js +2 -2
- package/dist/components/Form/Fieldset/Fieldset.module.scss.es.js +5 -5
- package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.cjs.js +2 -2
- package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.es.js +18 -18
- package/dist/components/Form/FileUpload/FileUpload.module.scss.cjs.js +2 -2
- package/dist/components/Form/FileUpload/FileUpload.module.scss.es.js +16 -16
- package/dist/components/Form/Form.module.scss.cjs.js +2 -2
- package/dist/components/Form/Form.module.scss.es.js +2 -2
- package/dist/components/Form/FormControl/FormControl.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormControl/FormControl.module.scss.es.js +13 -13
- package/dist/components/Form/FormErrorText/FormErrorText.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormErrorText/FormErrorText.module.scss.es.js +5 -5
- package/dist/components/Form/FormGroup/FormGroup.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormGroup/FormGroup.module.scss.es.js +3 -3
- package/dist/components/Form/FormHelperText/FormHelperText.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormHelperText/FormHelperText.module.scss.es.js +4 -4
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.es.js +6 -6
- package/dist/components/Form/Input/Input.module.scss.cjs.js +2 -2
- package/dist/components/Form/Input/Input.module.scss.es.js +9 -9
- package/dist/components/Form/Label/Label.module.scss.cjs.js +2 -2
- package/dist/components/Form/Label/Label.module.scss.es.js +2 -2
- package/dist/components/Form/Radio/Radio.module.scss.cjs.js +2 -2
- package/dist/components/Form/Radio/Radio.module.scss.es.js +11 -11
- package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.es.js +15 -15
- package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.es.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.es.js +4 -4
- package/dist/components/Form/Select/Select.interfaces.cjs.js.map +1 -1
- package/dist/components/Form/Select/Select.interfaces.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.cjs.js +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.cjs.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.es.js +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/SingleSelect/Select.module.scss.es.js +17 -17
- package/dist/components/Form/Select/useAddNewBtn.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/useAddNewBtn.module.scss.es.js +4 -4
- package/dist/components/Form/Textarea/Textarea.module.scss.cjs.js +2 -2
- package/dist/components/Form/Textarea/Textarea.module.scss.es.js +6 -6
- package/dist/components/Form/Toggle/Toggle.cjs.js.map +1 -1
- package/dist/components/Form/Toggle/Toggle.es.js.map +1 -1
- package/dist/components/Form/Toggle/Toggle.module.scss.cjs.js +2 -2
- package/dist/components/Form/Toggle/Toggle.module.scss.es.js +18 -18
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.es.js +4 -4
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.es.js +8 -8
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.es.js +6 -6
- package/dist/components/Icon/Icon.module.scss.cjs.js +2 -2
- package/dist/components/Icon/Icon.module.scss.es.js +104 -104
- package/dist/components/Layout/Card/Card.module.scss.cjs.js +2 -2
- package/dist/components/Layout/Card/Card.module.scss.es.js +12 -12
- package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.cjs.js +2 -2
- package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.es.js +12 -12
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.es.js +4 -4
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.es.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.es.js +3 -3
- package/dist/components/Link/Link.module.scss.cjs.js +2 -2
- package/dist/components/Link/Link.module.scss.es.js +16 -16
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.es.js +11 -11
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.es.js +22 -22
- package/dist/components/Notifications/Banner/Banner.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Banner/Banner.module.scss.es.js +9 -9
- package/dist/components/Notifications/BaseModal/BaseModal.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModal.module.scss.es.js +5 -5
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.es.js +4 -4
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.es.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.es.js +6 -6
- package/dist/components/Notifications/Dialog/Dialog.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/Dialog.module.scss.es.js +4 -4
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.es.js +3 -3
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.es.js +10 -10
- package/dist/components/Notifications/SideSheet/SideSheet.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheet.module.scss.es.js +13 -13
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.es.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.es.js +2 -2
- package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.es.js +10 -10
- package/dist/components/Pagination/Pagination.module.scss.cjs.js +2 -2
- package/dist/components/Pagination/Pagination.module.scss.es.js +14 -14
- package/dist/components/Popover/Popover.cjs.js +1 -1
- package/dist/components/Popover/Popover.cjs.js.map +1 -1
- package/dist/components/Popover/Popover.es.js +32 -9
- package/dist/components/Popover/Popover.es.js.map +1 -1
- package/dist/components/Popover/Popover.module.scss.cjs.js +2 -2
- package/dist/components/Popover/Popover.module.scss.es.js +3 -3
- package/dist/components/ProgressBar/ProgressBar.module.scss.cjs.js +2 -2
- package/dist/components/ProgressBar/ProgressBar.module.scss.es.js +9 -9
- package/dist/components/Skeleton/Skeleton.module.scss.cjs.js +2 -2
- package/dist/components/Skeleton/Skeleton.module.scss.es.js +5 -5
- package/dist/components/Spinner/Spinner.module.scss.cjs.js +2 -2
- package/dist/components/Spinner/Spinner.module.scss.es.js +3 -3
- package/dist/components/Stepper/Step.module.scss.cjs.js +2 -2
- package/dist/components/Stepper/Step.module.scss.es.js +22 -22
- package/dist/components/Stepper/Stepper.module.scss.cjs.js +2 -2
- package/dist/components/Stepper/Stepper.module.scss.es.js +4 -4
- package/dist/components/Tabs/Tab.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/Tab.module.scss.es.js +3 -3
- package/dist/components/Tabs/TabButton.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/TabButton.module.scss.es.js +12 -12
- package/dist/components/Tabs/Tabs.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/Tabs.module.scss.es.js +10 -10
- package/dist/components/Tag/RemoveButton.module.scss.cjs.js +2 -2
- package/dist/components/Tag/RemoveButton.module.scss.es.js +3 -3
- package/dist/components/Tag/Tag.module.scss.cjs.js +2 -2
- package/dist/components/Tag/Tag.module.scss.es.js +6 -6
- package/dist/components/TextEllipsis/TextEllipsis.module.scss.cjs.js +2 -2
- package/dist/components/TextEllipsis/TextEllipsis.module.scss.es.js +3 -3
- package/dist/components/Tiles/Tile.module.scss.cjs.js +2 -2
- package/dist/components/Tiles/Tile.module.scss.es.js +8 -8
- package/dist/components/Tiles/Tiles.module.scss.cjs.js +2 -2
- package/dist/components/Tiles/Tiles.module.scss.es.js +2 -2
- package/dist/components/Tooltip/Tooltip.cjs.js +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.es.js +38 -12
- package/dist/components/Tooltip/Tooltip.es.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.module.scss.cjs.js +2 -2
- package/dist/components/Tooltip/Tooltip.module.scss.es.js +27 -27
- package/dist/components/Typography/Typography.module.scss.cjs.js +2 -2
- package/dist/components/Typography/Typography.module.scss.es.js +13 -13
- package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.es.js +5 -5
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.es.js +14 -14
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.es.js +3 -3
- package/dist/components/miscellaneous/IdentityProviderButton.module.scss.cjs.js +2 -2
- package/dist/components/miscellaneous/IdentityProviderButton.module.scss.es.js +3 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.es.js +2 -0
- package/dist/index.es.js.map +1 -1
- package/dist/readyclasses.module.scss.cjs.js +2 -2
- package/dist/readyclasses.module.scss.es.js +5 -5
- package/package.json +5 -47
- package/LICENSE +0 -202
- package/README.md +0 -94
|
@@ -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 [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 useEffect(() => {\n if (!visible) {\n return;\n }\n\n const escapePressHandler = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n setVisible(false);\n }\n };\n\n document.addEventListener(\"keyup\", escapePressHandler);\n\n return () => {\n document.removeEventListener(\"keyup\", escapePressHandler);\n };\n }, [visible]);\n\n useLayoutEffect(() => {\n calculatePosition();\n }, [visible]);\n\n const renderChildren = () => {\n if (React.isValidElement(label)) {\n return React.cloneElement(label as ReactElement, {\n ref: relativeElement,\n onMouseEnter: () => setVisible(true),\n onMouseLeave: () => setVisible(false),\n onFocus: () => setVisible(true),\n onBlur: () => setVisible(false),\n \"aria-describedby\": identifier,\n tabIndex: 0,\n className: classes[\"label\"]\n });\n }\n\n return (\n <span\n className={classes[\"label\"]}\n tabIndex={0}\n onFocus={() => setVisible(true)}\n onBlur={() => setVisible(false)}\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={() => setVisible(true)}\n onMouseLeave={() => setVisible(false)}\n icon={Icons.InfoCircle}\n aria-describedby={identifier}\n className={`${classes.icon}`}\n />\n )}\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 aria-hidden={!visible}\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","visible","setVisible","wrappingDivRef","createRef","root","useGetDomRoot","relativeElement","useRef","elementToBePositioned","determinedLocation","useMemo","charAt","toUpperCase","slice","calculatePosition","usePosition","useEffect","escapePressHandler","event","key","document","addEventListener","removeEventListener","useLayoutEffect","tooltipClasses","classes","default","replace","toLowerCase","createElement","wrapper","isValidElement","cloneElement","onMouseEnter","onMouseLeave","onFocus","onBlur","tabIndex","Icon","tag","Icons","InfoCircle","createPortal","style","id"],"mappings":"2UAwDMA,EAAuD,CAC3DC,KAAM,CACJC,UAAW,CAAEC,WAAY,OAAQC,SAAU,UAC3CC,OAAQ,CAAEJ,KAAM,EAAGK,MAAO,GAAIC,IAAK,EAAGC,OAAQ,GAC9CC,gBAAiB,CAAEN,WAAY,QAASC,SAAU,WAEpDM,QAAS,CACPR,UAAW,CAAEC,WAAY,OAAQC,SAAU,OAC3CC,OAAQ,CAAEJ,KAAM,EAAGK,MAAO,GAAIC,KAAU,GAAAC,OAAQ,GAChDC,gBAAiB,CAAEN,WAAY,QAASC,SAAU,QAEpDO,UAAW,CACTT,UAAW,CAAEC,WAAY,OAAQC,SAAU,UAC3CC,OAAQ,CAAEJ,KAAM,EAAGK,MAAO,GAAIC,IAAK,EAAGC,QAAY,IAClDC,gBAAiB,CAAEN,WAAY,QAASC,SAAU,WAEpDE,MAAO,CACLJ,UAAW,CAAEC,WAAY,QAASC,SAAU,UAC5CC,OAAQ,CAAEJ,KAAM,GAAIK,MAAO,EAAGC,IAAK,EAAGC,OAAQ,GAC9CC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EAAQC,QAAAI,WAAW1C,GAAa,MA/B9EJ,EAAM+C,eAAezC,GAChBN,EAAMgD,aAAa1C,EAAuB,CAC/CM,IAAKU,EACL2B,aAAc,IAAMhC,GAAW,GAC/BiC,aAAc,IAAMjC,GAAW,GAC/BkC,QAAS,IAAMlC,GAAW,GAC1BmC,OAAQ,IAAMnC,GAAW,GACzB,mBAAoBJ,EACpBwC,SAAU,EACVjD,UAAWqC,UAAe,QAK5BzC,EAAA6C,cAAC,OAAA,CACCzC,UAAWqC,UAAe,MAC1BY,SAAU,EACVF,QAAS,IAAMlC,GAAW,GAC1BmC,OAAQ,IAAMnC,GAAW,GACzB,mBAAkBJ,GAEjBP,KAYFuC,cAAA,MAAA,CAAIzC,UAAW,GAAGqC,UAAQ,uBACvBzC,EAAM+C,eAAezC,IACrBN,EAAA6C,cAACS,EAAAA,KAAA,CACC1C,IAAKU,EACLiC,IAAI,MACJN,aAAc,IAAMhC,GAAW,GAC/BiC,aAAc,IAAMjC,GAAW,GAC/BP,KAAM8C,EAAMA,MAAAC,WACZ,mBAAkB5C,EAClBT,UAAW,GAAGqC,EAAAC,QAAQhC,SAGzBgD,EAAAA,aACC1D,EAAA6C,cAAC,MAAA,CACCjC,IAAKY,EACLmC,MAAO,IACFhD,EAAKgD,MACRvE,MACAN,OACAK,QACAE,UAEF,eAAc2B,EACd4C,GAAI/C,EACJT,UAAWoC,GAEVtC,GAAUF,EAAA6C,cAAA,OAAA,CAAKzC,UAAWqC,UAAQ,kBAAmBvC,GACrDC,GAEHiB,IAGN"}
|
|
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: 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","default","replace","toLowerCase","createElement","wrapper","isValidElement","cloneElement","onMouseEnter","onMouseLeave","onFocus","onBlur","tabIndex","Icon","tag","Icons","InfoCircle","createPortal","style","id"],"mappings":"2UAwDMA,EAAuD,CAC3DC,KAAM,CACJC,UAAW,CAAEC,WAAY,OAAQC,SAAU,UAC3CC,OAAQ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Y,SAAU,EACVF,QAAS1B,EACT2B,OAAQzB,EACR,mBAAkBvB,GAEjBP,KAYFgD,cAAA,MAAA,CAAIlD,UAAW,GAAG8C,UAAQ,uBACvBlD,EAAMwD,eAAelD,IACrBN,EAAAsD,cAACS,EAAAA,KAAA,CACCnD,IAAKY,EACLwC,IAAI,MACJN,aAAcxB,EACdyB,aAAcvB,EACd1B,KAAMuD,EAAMA,MAAAC,WACZ,mBAAkBrD,EAClBT,UAAW,GAAG8C,EAAAC,QAAQzC,SAGzBM,GACCmD,EAAAA,aACEnE,EAAAsD,cAAC,MAAA,CACC1C,IAAKc,EACL0C,MAAO,IACFzD,EAAKyD,MACRhF,MACAN,OACAK,QACAE,UAEFgF,GAAIxD,EACJT,UAAW6C,GAEV/C,GAAUF,EAAAsD,cAAA,OAAA,CAAKlD,UAAW8C,UAAQ,kBAAmBhD,GACrDC,GAEHmB,IAGR"}
|
|
@@ -80,6 +80,7 @@ const TooltipComponent = ({
|
|
|
80
80
|
...rest
|
|
81
81
|
}, ref) => {
|
|
82
82
|
const [identifier] = useState(generateID());
|
|
83
|
+
const [shouldRender, setShouldRender] = useState(false);
|
|
83
84
|
const [visible, setVisible] = useState(false);
|
|
84
85
|
const wrappingDivRef = ref || createRef();
|
|
85
86
|
const { root } = useGetDomRoot(domRoot, wrappingDivRef);
|
|
@@ -98,13 +99,22 @@ const TooltipComponent = ({
|
|
|
98
99
|
offset: locations[determinedLocation].offset,
|
|
99
100
|
transformOrigin: locations[determinedLocation].transformOrigin
|
|
100
101
|
});
|
|
102
|
+
const show = () => {
|
|
103
|
+
setShouldRender(true);
|
|
104
|
+
requestAnimationFrame(() => {
|
|
105
|
+
setVisible(true);
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
const hide = () => {
|
|
109
|
+
setVisible(false);
|
|
110
|
+
};
|
|
101
111
|
useEffect(() => {
|
|
102
112
|
if (!visible) {
|
|
103
113
|
return;
|
|
104
114
|
}
|
|
105
115
|
const escapePressHandler = (event) => {
|
|
106
116
|
if (event.key === "Escape") {
|
|
107
|
-
|
|
117
|
+
hide();
|
|
108
118
|
}
|
|
109
119
|
};
|
|
110
120
|
document.addEventListener("keyup", escapePressHandler);
|
|
@@ -113,16 +123,33 @@ const TooltipComponent = ({
|
|
|
113
123
|
};
|
|
114
124
|
}, [visible]);
|
|
115
125
|
useLayoutEffect(() => {
|
|
116
|
-
|
|
126
|
+
if (shouldRender) {
|
|
127
|
+
calculatePosition();
|
|
128
|
+
}
|
|
129
|
+
}, [shouldRender]);
|
|
130
|
+
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
|
+
return () => {
|
|
142
|
+
element.removeEventListener("transitionend", handleTransitionEnd);
|
|
143
|
+
};
|
|
117
144
|
}, [visible]);
|
|
118
145
|
const renderChildren = () => {
|
|
119
146
|
if (React.isValidElement(label)) {
|
|
120
147
|
return React.cloneElement(label, {
|
|
121
148
|
ref: relativeElement,
|
|
122
|
-
onMouseEnter:
|
|
123
|
-
onMouseLeave:
|
|
124
|
-
onFocus:
|
|
125
|
-
onBlur:
|
|
149
|
+
onMouseEnter: show,
|
|
150
|
+
onMouseLeave: hide,
|
|
151
|
+
onFocus: show,
|
|
152
|
+
onBlur: hide,
|
|
126
153
|
"aria-describedby": identifier,
|
|
127
154
|
tabIndex: 0,
|
|
128
155
|
className: classes["label"]
|
|
@@ -133,8 +160,8 @@ const TooltipComponent = ({
|
|
|
133
160
|
{
|
|
134
161
|
className: classes["label"],
|
|
135
162
|
tabIndex: 0,
|
|
136
|
-
onFocus:
|
|
137
|
-
onBlur:
|
|
163
|
+
onFocus: show,
|
|
164
|
+
onBlur: hide,
|
|
138
165
|
"aria-describedby": identifier
|
|
139
166
|
},
|
|
140
167
|
label
|
|
@@ -146,13 +173,13 @@ const TooltipComponent = ({
|
|
|
146
173
|
{
|
|
147
174
|
ref: relativeElement,
|
|
148
175
|
tag: "div",
|
|
149
|
-
onMouseEnter:
|
|
150
|
-
onMouseLeave:
|
|
176
|
+
onMouseEnter: show,
|
|
177
|
+
onMouseLeave: hide,
|
|
151
178
|
icon: Icons.InfoCircle,
|
|
152
179
|
"aria-describedby": identifier,
|
|
153
180
|
className: `${classes.icon}`
|
|
154
181
|
}
|
|
155
|
-
), createPortal(
|
|
182
|
+
), shouldRender && createPortal(
|
|
156
183
|
/* @__PURE__ */ React.createElement(
|
|
157
184
|
"div",
|
|
158
185
|
{
|
|
@@ -164,7 +191,6 @@ const TooltipComponent = ({
|
|
|
164
191
|
right,
|
|
165
192
|
bottom
|
|
166
193
|
},
|
|
167
|
-
"aria-hidden": !visible,
|
|
168
194
|
id: identifier,
|
|
169
195
|
className: tooltipClasses
|
|
170
196
|
},
|
|
@@ -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 [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 useEffect(() => {\n if (!visible) {\n return;\n }\n\n const escapePressHandler = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n setVisible(false);\n }\n };\n\n document.addEventListener(\"keyup\", escapePressHandler);\n\n return () => {\n document.removeEventListener(\"keyup\", escapePressHandler);\n };\n }, [visible]);\n\n useLayoutEffect(() => {\n calculatePosition();\n }, [visible]);\n\n const renderChildren = () => {\n if (React.isValidElement(label)) {\n return React.cloneElement(label as ReactElement, {\n ref: relativeElement,\n onMouseEnter: () => setVisible(true),\n onMouseLeave: () => setVisible(false),\n onFocus: () => setVisible(true),\n onBlur: () => setVisible(false),\n \"aria-describedby\": identifier,\n tabIndex: 0,\n className: classes[\"label\"]\n });\n }\n\n return (\n <span\n className={classes[\"label\"]}\n tabIndex={0}\n onFocus={() => setVisible(true)}\n onBlur={() => setVisible(false)}\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={() => setVisible(true)}\n onMouseLeave={() => setVisible(false)}\n icon={Icons.InfoCircle}\n aria-describedby={identifier}\n className={`${classes.icon}`}\n />\n )}\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 aria-hidden={!visible}\n id={identifier}\n className={tooltipClasses}\n >\n {title && <span className={classes[\"tooltip-title\"]}>{title}</span>}\n {children}\n </div>,\n root\n )}\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,MAAM,MAAM;AAAA,MACZ,oBAAkB;AAAA,MAClB,WAAW,GAAG,QAAQ,IAAI;AAAA,IAAA;AAAA,EAAA,GAG7B;AAAA,IACC,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAK;AAAA,QACL,OAAO;AAAA,UACL,GAAG,KAAK;AAAA,UACR;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,eAAa,CAAC;AAAA,QACd,IAAI;AAAA,QACJ,WAAW;AAAA,MAAA;AAAA,MAEV,SAAU,sBAAA,cAAA,QAAA,EAAK,WAAW,QAAQ,eAAe,KAAI,KAAM;AAAA,MAC3D;AAAA,IACH;AAAA,IACA;AAAA,EAAA,CAEJ,CACF;AAEJ;AAEa,MAAA,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\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: 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,SAAS;AAAA,IACpD,QAAQ,EAAE,MAAM,GAAG,OAAO,IAAI,KAAK,GAAG,QAAQ,EAAE;AAAA,IAChD,iBAAiB,EAAE,YAAY,SAAS,UAAU,SAAS;AAAA,EAC7D;AAAA,EACA,SAAS;AAAA,IACP,WAAW,EAAE,YAAY,QAAQ,UAAU,MAAM;AAAA,IACjD,QAAQ,EAAE,MAAM,GAAG,OAAO,IAAI,KAAK,KAAK,QAAQ,EAAE;AAAA,IAClD,iBAAiB,EAAE,YAAY,SAAS,UAAU,MAAM;AAAA,EAC1D;AAAA,EACA,WAAW;AAAA,IACT,WAAW,EAAE,YAAY,QAAQ,UAAU,SAAS;AAAA,IACpD,QAAQ,EAAE,MAAM,GAAG,OAAO,IAAI,KAAK,GAAG,QAAQ,IAAI;AAAA,IAClD,iBAAiB,EAAE,YAAY,SAAS,UAAU,SAAS;AAAA,EAC7D;AAAA,EACA,OAAO;AAAA,IACL,WAAW,EAAE,YAAY,SAAS,UAAU,SAAS;AAAA,IACrD,QAAQ,EAAE,MAAM,IAAI,OAAO,GAAG,KAAK,GAAG,QAAQ,EAAE;AAAA,IAChD,iBAAiB,EAAE,YAAY,QAAQ,UAAU,SAAS;AAAA,EAC5D;AAAA,EACA,UAAU;AAAA,IACR,WAAW,EAAE,YAAY,SAAS,UAAU,MAAM;AAAA,IAClD,QAAQ,EAAE,MAAM,IAAI,OAAO,GAAG,KAAK,KAAK,QAAQ,EAAE;AAAA,IAClD,iBAAiB,EAAE,YAAY,QAAQ,UAAU,M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,MAEjB;AAAA,IACH;AAAA,EAEJ;AAEM,QAAA,iBAAiB,GAAG,QAAQ,SAAS,CAAC,IAAI,QAAQ,KAAK,CAAC,IAC5D,UAAU,QAAQ,SAAS,IAAI,EACjC,IAAI,QAAQ,mBAAmB,QAAQ,gCAAgC,OAAO,EAAE,YAAY,CAAC,CAAC;AAE9F,SACG,sBAAA,cAAA,OAAA,EAAK,GAAG,MAAM,KAAK,gBAAgB,WAAW,GAAG,QAAQ,OAAO,IAAI,aAAa,EAAE,GAAA,GACjF,eAAe,GACf,sBAAA,cAAA,OAAA,EAAI,WAAW,GAAG,QAAQ,iBAAiB,CAAC,GAAA,GAC1C,CAAC,MAAM,eAAe,KAAK,KAC1B,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL,KAAI;AAAA,MACJ,cAAc;AAAA,MACd,cAAc;AAAA,MACd,MAAM,MAAM;AAAA,MACZ,oBAAkB;AAAA,MAClB,WAAW,GAAG,QAAQ,IAAI;AAAA,IAAA;AAAA,KAG7B,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,QACF;AAAA,QACA,IAAI;AAAA,QACJ,WAAW;AAAA,MAAA;AAAA,MAEV,SAAU,sBAAA,cAAA,QAAA,EAAK,WAAW,QAAQ,eAAe,KAAI,KAAM;AAAA,MAC3D;AAAA,IACH;AAAA,IACA;AAAA,EAAA,CAEN,CACF;AAEJ;AAEa,MAAA,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_uJyTX{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.Tooltip_hidden_uJyTX{display:none}.Tooltip_slide-in_uJyTX{animation:Tooltip_slide-in_uJyTX .5s forwards}@media (prefers-reduced-motion: reduce){.Tooltip_slide-in_uJyTX{animation-duration:.1ms}}.Tooltip_slide-out_uJyTX{animation:Tooltip_slide-out_uJyTX .5s forwards}@media (prefers-reduced-motion: reduce){.Tooltip_slide-out_uJyTX{animation-duration:.1ms}}@keyframes Tooltip_slide-in_uJyTX{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Tooltip_slide-out_uJyTX{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_uJyTX{display:flex;align-items:center}.Tooltip_tooltip-wrapper_uJyTX .Tooltip_icon_uJyTX{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_uJyTX .Tooltip_icon_uJyTX{transition-duration:.1ms}}.Tooltip_tooltip-wrapper_uJyTX .Tooltip_icon_uJyTX:hover{color:var(--default)}.Tooltip_tooltip-wrapper_uJyTX .Tooltip_icon_uJyTX.Tooltip_error_uJyTX{color:var(--error)}.Tooltip_tooltip_uJyTX{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_uJyTX{transition-duration:.1ms}}.Tooltip_tooltip_uJyTX.Tooltip_black_uJyTX{background-color:var(--tooltip-background-color)}.Tooltip_tooltip_uJyTX.Tooltip_black_uJyTX.Tooltip_top_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_top-start_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_top-end_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_bottom_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_bottom-start_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_bottom-end_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_left_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_left-start_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_left-end_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_right_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_right-start_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_right-end_uJyTX: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_uJyTX.Tooltip_blue_uJyTX{background-color:var(--color-blue-grey500)}.Tooltip_tooltip_uJyTX.Tooltip_blue_uJyTX.Tooltip_top_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_top-start_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_top-end_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_bottom_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_bottom-start_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_bottom-end_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_left_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_left-start_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_left-end_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_right_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_right-start_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_right-end_uJyTX: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_uJyTX:after{content:""}.Tooltip_tooltip_uJyTX.Tooltip_visible_uJyTX{opacity:1;transform:scale(1)}.Tooltip_label_uJyTX:focus-visible{outline:.0313rem dashed var(--color-primary)}.Tooltip_tooltip-title_uJyTX{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_uJyTX",o="Tooltip_wrapper_uJyTX",l="Tooltip_icon_uJyTX",e="Tooltip_error_uJyTX",p="Tooltip_tooltip_uJyTX",i="Tooltip_black_uJyTX",r="Tooltip_top_uJyTX",_="Tooltip_bottom_uJyTX",T="Tooltip_left_uJyTX",s="Tooltip_right_uJyTX",u="Tooltip_blue_uJyTX",y="Tooltip_visible_uJyTX",J="Tooltip_label_uJyTX",X={"sr-only":"Tooltip_sr-only_uJyTX",hidden:t,"slide-in":"Tooltip_slide-in_uJyTX","slide-out":"Tooltip_slide-out_uJyTX",wrapper:o,"tooltip-wrapper":"Tooltip_tooltip-wrapper_uJyTX",icon:l,error:e,tooltip:p,black:i,top:r,"top-start":"Tooltip_top-start_uJyTX","top-end":"Tooltip_top-end_uJyTX",bottom:_,"bottom-start":"Tooltip_bottom-start_uJyTX","bottom-end":"Tooltip_bottom-end_uJyTX",left:T,"left-start":"Tooltip_left-start_uJyTX","left-end":"Tooltip_left-end_uJyTX",right:s,"right-start":"Tooltip_right-start_uJyTX","right-end":"Tooltip_right-end_uJyTX",blue:u,visible:y,label:J,"tooltip-title":"Tooltip_tooltip-title_uJyTX"};exports.black=i,exports.blue=u,exports.bottom=_,exports.default=X,exports.error=e,exports.hidden=t,exports.icon=l,exports.label=J,exports.left=T,exports.right=s,exports.tooltip=p,exports.top=r,exports.visible=y,exports.wrapper=o;
|
|
3
3
|
//# sourceMappingURL=Tooltip.module.scss.cjs.js.map
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('.Tooltip_sr-
|
|
2
|
-
const hidden = "
|
|
3
|
-
const wrapper = "
|
|
4
|
-
const icon = "
|
|
5
|
-
const error = "
|
|
6
|
-
const tooltip = "
|
|
7
|
-
const black = "
|
|
8
|
-
const top = "
|
|
9
|
-
const bottom = "
|
|
10
|
-
const left = "
|
|
11
|
-
const right = "
|
|
12
|
-
const blue = "
|
|
13
|
-
const visible = "
|
|
14
|
-
const label = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('.Tooltip_sr-only_uJyTX{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.Tooltip_hidden_uJyTX{display:none}.Tooltip_slide-in_uJyTX{animation:Tooltip_slide-in_uJyTX .5s forwards}@media (prefers-reduced-motion: reduce){.Tooltip_slide-in_uJyTX{animation-duration:.1ms}}.Tooltip_slide-out_uJyTX{animation:Tooltip_slide-out_uJyTX .5s forwards}@media (prefers-reduced-motion: reduce){.Tooltip_slide-out_uJyTX{animation-duration:.1ms}}@keyframes Tooltip_slide-in_uJyTX{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Tooltip_slide-out_uJyTX{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_uJyTX{display:flex;align-items:center}.Tooltip_tooltip-wrapper_uJyTX .Tooltip_icon_uJyTX{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_uJyTX .Tooltip_icon_uJyTX{transition-duration:.1ms}}.Tooltip_tooltip-wrapper_uJyTX .Tooltip_icon_uJyTX:hover{color:var(--default)}.Tooltip_tooltip-wrapper_uJyTX .Tooltip_icon_uJyTX.Tooltip_error_uJyTX{color:var(--error)}.Tooltip_tooltip_uJyTX{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_uJyTX{transition-duration:.1ms}}.Tooltip_tooltip_uJyTX.Tooltip_black_uJyTX{background-color:var(--tooltip-background-color)}.Tooltip_tooltip_uJyTX.Tooltip_black_uJyTX.Tooltip_top_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_top-start_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_top-end_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_bottom_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_bottom-start_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_bottom-end_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_left_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_left-start_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_left-end_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_right_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_right-start_uJyTX: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_uJyTX.Tooltip_black_uJyTX.Tooltip_right-end_uJyTX: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_uJyTX.Tooltip_blue_uJyTX{background-color:var(--color-blue-grey500)}.Tooltip_tooltip_uJyTX.Tooltip_blue_uJyTX.Tooltip_top_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_top-start_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_top-end_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_bottom_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_bottom-start_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_bottom-end_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_left_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_left-start_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_left-end_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_right_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_right-start_uJyTX: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_uJyTX.Tooltip_blue_uJyTX.Tooltip_right-end_uJyTX: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_uJyTX:after{content:""}.Tooltip_tooltip_uJyTX.Tooltip_visible_uJyTX{opacity:1;transform:scale(1)}.Tooltip_label_uJyTX:focus-visible{outline:.0313rem dashed var(--color-primary)}.Tooltip_tooltip-title_uJyTX{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
|
+
const hidden = "Tooltip_hidden_uJyTX";
|
|
3
|
+
const wrapper = "Tooltip_wrapper_uJyTX";
|
|
4
|
+
const icon = "Tooltip_icon_uJyTX";
|
|
5
|
+
const error = "Tooltip_error_uJyTX";
|
|
6
|
+
const tooltip = "Tooltip_tooltip_uJyTX";
|
|
7
|
+
const black = "Tooltip_black_uJyTX";
|
|
8
|
+
const top = "Tooltip_top_uJyTX";
|
|
9
|
+
const bottom = "Tooltip_bottom_uJyTX";
|
|
10
|
+
const left = "Tooltip_left_uJyTX";
|
|
11
|
+
const right = "Tooltip_right_uJyTX";
|
|
12
|
+
const blue = "Tooltip_blue_uJyTX";
|
|
13
|
+
const visible = "Tooltip_visible_uJyTX";
|
|
14
|
+
const label = "Tooltip_label_uJyTX";
|
|
15
15
|
const classes = {
|
|
16
|
-
"sr-only": "Tooltip_sr-
|
|
16
|
+
"sr-only": "Tooltip_sr-only_uJyTX",
|
|
17
17
|
hidden,
|
|
18
|
-
"slide-in": "Tooltip_slide-
|
|
19
|
-
"slide-out": "Tooltip_slide-
|
|
18
|
+
"slide-in": "Tooltip_slide-in_uJyTX",
|
|
19
|
+
"slide-out": "Tooltip_slide-out_uJyTX",
|
|
20
20
|
wrapper,
|
|
21
|
-
"tooltip-wrapper": "Tooltip_tooltip-
|
|
21
|
+
"tooltip-wrapper": "Tooltip_tooltip-wrapper_uJyTX",
|
|
22
22
|
icon,
|
|
23
23
|
error,
|
|
24
24
|
tooltip,
|
|
25
25
|
black,
|
|
26
26
|
top,
|
|
27
|
-
"top-start": "Tooltip_top-
|
|
28
|
-
"top-end": "Tooltip_top-
|
|
27
|
+
"top-start": "Tooltip_top-start_uJyTX",
|
|
28
|
+
"top-end": "Tooltip_top-end_uJyTX",
|
|
29
29
|
bottom,
|
|
30
|
-
"bottom-start": "Tooltip_bottom-
|
|
31
|
-
"bottom-end": "Tooltip_bottom-
|
|
30
|
+
"bottom-start": "Tooltip_bottom-start_uJyTX",
|
|
31
|
+
"bottom-end": "Tooltip_bottom-end_uJyTX",
|
|
32
32
|
left,
|
|
33
|
-
"left-start": "Tooltip_left-
|
|
34
|
-
"left-end": "Tooltip_left-
|
|
33
|
+
"left-start": "Tooltip_left-start_uJyTX",
|
|
34
|
+
"left-end": "Tooltip_left-end_uJyTX",
|
|
35
35
|
right,
|
|
36
|
-
"right-start": "Tooltip_right-
|
|
37
|
-
"right-end": "Tooltip_right-
|
|
36
|
+
"right-start": "Tooltip_right-start_uJyTX",
|
|
37
|
+
"right-end": "Tooltip_right-end_uJyTX",
|
|
38
38
|
blue,
|
|
39
39
|
visible,
|
|
40
40
|
label,
|
|
41
|
-
"tooltip-title": "Tooltip_tooltip-
|
|
41
|
+
"tooltip-title": "Tooltip_tooltip-title_uJyTX"
|
|
42
42
|
};
|
|
43
43
|
export {
|
|
44
44
|
black,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode('.Typography_sr-
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode('.Typography_sr-only_uJyTX{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.Typography_hidden_uJyTX{display:none}.Typography_slide-in_uJyTX{animation:Typography_slide-in_uJyTX .5s forwards}@media (prefers-reduced-motion: reduce){.Typography_slide-in_uJyTX{animation-duration:.1ms}}.Typography_slide-out_uJyTX{animation:Typography_slide-out_uJyTX .5s forwards}@media (prefers-reduced-motion: reduce){.Typography_slide-out_uJyTX{animation-duration:.1ms}}@keyframes Typography_slide-in_uJyTX{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Typography_slide-out_uJyTX{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 */.Typography_typography_style_h1_uJyTX{font-family:var(--font-family);font-size:var(--font-size-h1);font-style:normal;font-variant:normal;line-height:1.2;font-weight:700;text-transform:none;letter-spacing:0;color:var(--font-color-h1);margin:0 0 calc(1 * var(--font-size)) 0}.Typography_typography_style_h2_uJyTX{font-family:var(--font-family);font-size:var(--font-size-h2);font-style:normal;font-variant:normal;line-height:1.42857;font-weight:700;text-transform:none;letter-spacing:0;color:var(--font-color-h2);margin:0 0 calc(1 * var(--font-size)) 0}.Typography_typography_style_h3_uJyTX{font-family:var(--font-family);font-size:var(--font-size-h3);font-style:normal;font-variant:normal;line-height:1.16666;font-weight:500;text-transform:none;letter-spacing:0;color:var(--font-color-h3);margin:0 0 calc(1 * var(--font-size)) 0}.Typography_typography_style_h4_uJyTX{font-family:var(--font-family);font-size:var(--font-size-h4);font-style:normal;font-variant:normal;line-height:1.2;font-weight:500;text-transform:none;letter-spacing:0;color:var(--font-color-h4);margin:0 0 calc(1 * var(--font-size)) 0}.Typography_typography_style_body_uJyTX{font-family:var(--font-family);font-size:var(--font-size);font-style:normal;font-variant:normal;line-height:var(--default-line-height);font-weight:400;text-transform:none;letter-spacing:0;color:var(--font-color-body);margin:0 0 calc(1 * var(--font-size)) 0}.Typography_typography_style_body-bold_uJyTX{font-family:var(--font-family);font-size:var(--font-size);font-style:normal;font-variant:normal;line-height:var(--default-line-height);font-weight:700;text-transform:none;letter-spacing:0;color:var(--font-color-body);margin:0 0 calc(1 * var(--font-size)) 0}.Typography_typography_style_sub-text_uJyTX{font-family:var(--font-family);font-size:var(--font-size-sub);font-style:normal;font-variant:normal;line-height:var(--font-size);font-weight:400;text-transform:none;letter-spacing:0;color:var(--font-color-h4);margin:0 0 calc(1 * var(--font-size)) 0}.Typography_typography_style_code_uJyTX{font-family:var(--font-family-code);font-size:var(--font-size-code);font-style:normal;font-variant:normal;line-height:1.5;font-weight:400;text-transform:none;letter-spacing:0;color:var(--font-color-code);margin:0 0 calc(1 * var(--font-size)) 0}')),document.head.appendChild(t)}}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 y="Typography_hidden_uJyTX",p="Typography_typography_style_h1_uJyTX",_="Typography_typography_style_h2_uJyTX",t="Typography_typography_style_h3_uJyTX",o="Typography_typography_style_h4_uJyTX",e="Typography_typography_style_body_uJyTX",h="Typography_typography_style_code_uJyTX",r={"sr-only":"Typography_sr-only_uJyTX",hidden:y,"slide-in":"Typography_slide-in_uJyTX","slide-out":"Typography_slide-out_uJyTX",typography_style_h1:p,typography_style_h2:_,typography_style_h3:t,typography_style_h4:o,typography_style_body:e,"typography_style_body-bold":"Typography_typography_style_body-bold_uJyTX","typography_style_sub-text":"Typography_typography_style_sub-text_uJyTX",typography_style_code:h};exports.default=r,exports.hidden=y,exports.typography_style_body=e,exports.typography_style_code=h,exports.typography_style_h1=p,exports.typography_style_h2=_,exports.typography_style_h3=t,exports.typography_style_h4=o;
|
|
3
3
|
//# sourceMappingURL=Typography.module.scss.cjs.js.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode('.Typography_sr-
|
|
2
|
-
const hidden = "
|
|
3
|
-
const typography_style_h1 = "
|
|
4
|
-
const typography_style_h2 = "
|
|
5
|
-
const typography_style_h3 = "
|
|
6
|
-
const typography_style_h4 = "
|
|
7
|
-
const typography_style_body = "
|
|
8
|
-
const typography_style_code = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode('.Typography_sr-only_uJyTX{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.Typography_hidden_uJyTX{display:none}.Typography_slide-in_uJyTX{animation:Typography_slide-in_uJyTX .5s forwards}@media (prefers-reduced-motion: reduce){.Typography_slide-in_uJyTX{animation-duration:.1ms}}.Typography_slide-out_uJyTX{animation:Typography_slide-out_uJyTX .5s forwards}@media (prefers-reduced-motion: reduce){.Typography_slide-out_uJyTX{animation-duration:.1ms}}@keyframes Typography_slide-in_uJyTX{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Typography_slide-out_uJyTX{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 */.Typography_typography_style_h1_uJyTX{font-family:var(--font-family);font-size:var(--font-size-h1);font-style:normal;font-variant:normal;line-height:1.2;font-weight:700;text-transform:none;letter-spacing:0;color:var(--font-color-h1);margin:0 0 calc(1 * var(--font-size)) 0}.Typography_typography_style_h2_uJyTX{font-family:var(--font-family);font-size:var(--font-size-h2);font-style:normal;font-variant:normal;line-height:1.42857;font-weight:700;text-transform:none;letter-spacing:0;color:var(--font-color-h2);margin:0 0 calc(1 * var(--font-size)) 0}.Typography_typography_style_h3_uJyTX{font-family:var(--font-family);font-size:var(--font-size-h3);font-style:normal;font-variant:normal;line-height:1.16666;font-weight:500;text-transform:none;letter-spacing:0;color:var(--font-color-h3);margin:0 0 calc(1 * var(--font-size)) 0}.Typography_typography_style_h4_uJyTX{font-family:var(--font-family);font-size:var(--font-size-h4);font-style:normal;font-variant:normal;line-height:1.2;font-weight:500;text-transform:none;letter-spacing:0;color:var(--font-color-h4);margin:0 0 calc(1 * var(--font-size)) 0}.Typography_typography_style_body_uJyTX{font-family:var(--font-family);font-size:var(--font-size);font-style:normal;font-variant:normal;line-height:var(--default-line-height);font-weight:400;text-transform:none;letter-spacing:0;color:var(--font-color-body);margin:0 0 calc(1 * var(--font-size)) 0}.Typography_typography_style_body-bold_uJyTX{font-family:var(--font-family);font-size:var(--font-size);font-style:normal;font-variant:normal;line-height:var(--default-line-height);font-weight:700;text-transform:none;letter-spacing:0;color:var(--font-color-body);margin:0 0 calc(1 * var(--font-size)) 0}.Typography_typography_style_sub-text_uJyTX{font-family:var(--font-family);font-size:var(--font-size-sub);font-style:normal;font-variant:normal;line-height:var(--font-size);font-weight:400;text-transform:none;letter-spacing:0;color:var(--font-color-h4);margin:0 0 calc(1 * var(--font-size)) 0}.Typography_typography_style_code_uJyTX{font-family:var(--font-family-code);font-size:var(--font-size-code);font-style:normal;font-variant:normal;line-height:1.5;font-weight:400;text-transform:none;letter-spacing:0;color:var(--font-color-code);margin:0 0 calc(1 * var(--font-size)) 0}')),document.head.appendChild(t)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}}();
|
|
2
|
+
const hidden = "Typography_hidden_uJyTX";
|
|
3
|
+
const typography_style_h1 = "Typography_typography_style_h1_uJyTX";
|
|
4
|
+
const typography_style_h2 = "Typography_typography_style_h2_uJyTX";
|
|
5
|
+
const typography_style_h3 = "Typography_typography_style_h3_uJyTX";
|
|
6
|
+
const typography_style_h4 = "Typography_typography_style_h4_uJyTX";
|
|
7
|
+
const typography_style_body = "Typography_typography_style_body_uJyTX";
|
|
8
|
+
const typography_style_code = "Typography_typography_style_code_uJyTX";
|
|
9
9
|
const classes = {
|
|
10
|
-
"sr-only": "Typography_sr-
|
|
10
|
+
"sr-only": "Typography_sr-only_uJyTX",
|
|
11
11
|
hidden,
|
|
12
|
-
"slide-in": "Typography_slide-
|
|
13
|
-
"slide-out": "Typography_slide-
|
|
12
|
+
"slide-in": "Typography_slide-in_uJyTX",
|
|
13
|
+
"slide-out": "Typography_slide-out_uJyTX",
|
|
14
14
|
typography_style_h1,
|
|
15
15
|
typography_style_h2,
|
|
16
16
|
typography_style_h3,
|
|
17
17
|
typography_style_h4,
|
|
18
18
|
typography_style_body,
|
|
19
|
-
"typography_style_body-bold": "Typography_typography_style_body-
|
|
20
|
-
"typography_style_sub-text": "Typography_typography_style_sub-
|
|
19
|
+
"typography_style_body-bold": "Typography_typography_style_body-bold_uJyTX",
|
|
20
|
+
"typography_style_sub-text": "Typography_typography_style_sub-text_uJyTX",
|
|
21
21
|
typography_style_code
|
|
22
22
|
};
|
|
23
23
|
export {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.LeftNav_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('.LeftNav_sr-only_uJyTX{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.LeftNav_hidden_uJyTX{display:none}.LeftNav_slide-in_uJyTX{animation:LeftNav_slide-in_uJyTX .5s forwards}@media (prefers-reduced-motion: reduce){.LeftNav_slide-in_uJyTX{animation-duration:.1ms}}.LeftNav_slide-out_uJyTX{animation:LeftNav_slide-out_uJyTX .5s forwards}@media (prefers-reduced-motion: reduce){.LeftNav_slide-out_uJyTX{animation-duration:.1ms}}@keyframes LeftNav_slide-in_uJyTX{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes LeftNav_slide-out_uJyTX{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 */.LeftNav_sidenavbar_uJyTX{--margin-top: 4rem;position:fixed;z-index:2;display:block;overflow-y:auto;flex-shrink:0;width:15rem;height:calc(100vh - var(--margin-top));padding:0;margin:0;font-family:var(--font-family);background-color:#fff;box-shadow:0 2px 2px #01053205,0 3px 4px #01053205,0 1px 5px #0105320a;transition:transform .2s ease-in-out}@media screen and (max-width: 50em){.LeftNav_sidenavbar_uJyTX{box-shadow:0 30px 50px #00000029;transform:translate(-110%)}.LeftNav_sidenavbar_uJyTX.LeftNav_hidden_uJyTX{visibility:hidden}.LeftNav_sidenavbar_uJyTX.LeftNav_open_uJyTX{visibility:visible;transform:translate(0)}}@media screen and (min-width: 50em){.LeftNav_sidenavbar_uJyTX.LeftNav_sidenavbar--collapsed_uJyTX{box-shadow:0 30px 50px #00000029;transform:translate(-110%)}.LeftNav_sidenavbar_uJyTX.LeftNav_sidenavbar--collapsed_uJyTX.LeftNav_hidden_uJyTX{visibility:hidden}}')),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="LeftNav_hidden_uJyTX",a="LeftNav_sidenavbar_uJyTX",d="LeftNav_open_uJyTX",s={hidden:e,sidenavbar:a,open:d,"sidenavbar--collapsed":"LeftNav_sidenavbar--collapsed_uJyTX"};exports.default=s,exports.hidden=e,exports.open=d,exports.sidenavbar=a;
|
|
3
3
|
//# sourceMappingURL=LeftNav.module.scss.cjs.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.LeftNav_sr-
|
|
2
|
-
const hidden = "
|
|
3
|
-
const sidenavbar = "
|
|
4
|
-
const open = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.LeftNav_sr-only_uJyTX{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.LeftNav_hidden_uJyTX{display:none}.LeftNav_slide-in_uJyTX{animation:LeftNav_slide-in_uJyTX .5s forwards}@media (prefers-reduced-motion: reduce){.LeftNav_slide-in_uJyTX{animation-duration:.1ms}}.LeftNav_slide-out_uJyTX{animation:LeftNav_slide-out_uJyTX .5s forwards}@media (prefers-reduced-motion: reduce){.LeftNav_slide-out_uJyTX{animation-duration:.1ms}}@keyframes LeftNav_slide-in_uJyTX{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes LeftNav_slide-out_uJyTX{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 */.LeftNav_sidenavbar_uJyTX{--margin-top: 4rem;position:fixed;z-index:2;display:block;overflow-y:auto;flex-shrink:0;width:15rem;height:calc(100vh - var(--margin-top));padding:0;margin:0;font-family:var(--font-family);background-color:#fff;box-shadow:0 2px 2px #01053205,0 3px 4px #01053205,0 1px 5px #0105320a;transition:transform .2s ease-in-out}@media screen and (max-width: 50em){.LeftNav_sidenavbar_uJyTX{box-shadow:0 30px 50px #00000029;transform:translate(-110%)}.LeftNav_sidenavbar_uJyTX.LeftNav_hidden_uJyTX{visibility:hidden}.LeftNav_sidenavbar_uJyTX.LeftNav_open_uJyTX{visibility:visible;transform:translate(0)}}@media screen and (min-width: 50em){.LeftNav_sidenavbar_uJyTX.LeftNav_sidenavbar--collapsed_uJyTX{box-shadow:0 30px 50px #00000029;transform:translate(-110%)}.LeftNav_sidenavbar_uJyTX.LeftNav_sidenavbar--collapsed_uJyTX.LeftNav_hidden_uJyTX{visibility:hidden}}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
|
|
2
|
+
const hidden = "LeftNav_hidden_uJyTX";
|
|
3
|
+
const sidenavbar = "LeftNav_sidenavbar_uJyTX";
|
|
4
|
+
const open = "LeftNav_open_uJyTX";
|
|
5
5
|
const classes = {
|
|
6
6
|
hidden,
|
|
7
7
|
sidenavbar,
|
|
8
8
|
open,
|
|
9
|
-
"sidenavbar--collapsed": "LeftNav_sidenavbar--
|
|
9
|
+
"sidenavbar--collapsed": "LeftNav_sidenavbar--collapsed_uJyTX"
|
|
10
10
|
};
|
|
11
11
|
export {
|
|
12
12
|
classes as default,
|