@chayns-components/core 5.0.0-beta.48 → 5.0.0-beta.482
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/README.md +3 -19
- package/lib/api/image/post.d.ts +14 -0
- package/lib/api/image/post.js +33 -0
- package/lib/api/image/post.js.map +1 -0
- package/lib/api/signature/delete.d.ts +1 -0
- package/lib/api/signature/delete.js +27 -0
- package/lib/api/signature/delete.js.map +1 -0
- package/lib/api/signature/get.d.ts +1 -0
- package/lib/api/signature/get.js +33 -0
- package/lib/api/signature/get.js.map +1 -0
- package/lib/api/signature/put.d.ts +1 -0
- package/lib/api/signature/put.js +31 -0
- package/lib/api/signature/put.js.map +1 -0
- package/lib/api/theme/get.d.ts +2 -0
- package/lib/api/theme/get.js +14 -0
- package/lib/api/theme/get.js.map +1 -0
- package/lib/api/video/post.d.ts +15 -0
- package/lib/api/video/post.js +30 -0
- package/lib/api/video/post.js.map +1 -0
- package/lib/components/accordion/Accordion.d.ts +21 -6
- package/lib/components/accordion/Accordion.js +78 -54
- package/lib/components/accordion/Accordion.js.map +1 -1
- package/lib/components/accordion/Accordion.styles.d.ts +11 -7
- package/lib/components/accordion/Accordion.styles.js +66 -53
- package/lib/components/accordion/Accordion.styles.js.map +1 -1
- package/lib/components/accordion/accordion-body/AccordionBody.d.ts +9 -1
- package/lib/components/accordion/accordion-body/AccordionBody.js +12 -20
- package/lib/components/accordion/accordion-body/AccordionBody.js.map +1 -1
- package/lib/components/accordion/accordion-body/AccordionBody.styles.d.ts +268 -3
- package/lib/components/accordion/accordion-body/AccordionBody.styles.js +6 -15
- package/lib/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
- package/lib/components/accordion/accordion-content/AccordionContent.js +8 -16
- package/lib/components/accordion/accordion-content/AccordionContent.js.map +1 -1
- package/lib/components/accordion/accordion-content/AccordionContent.styles.d.ts +8 -6
- package/lib/components/accordion/accordion-content/AccordionContent.styles.js +7 -16
- package/lib/components/accordion/accordion-content/AccordionContent.styles.js.map +1 -1
- package/lib/components/accordion/accordion-group/AccordionGroup.d.ts +9 -2
- package/lib/components/accordion/accordion-group/AccordionGroup.js +15 -20
- package/lib/components/accordion/accordion-group/AccordionGroup.js.map +1 -1
- package/lib/components/accordion/accordion-head/AccordionHead.d.ts +2 -0
- package/lib/components/accordion/accordion-head/AccordionHead.js +45 -40
- package/lib/components/accordion/accordion-head/AccordionHead.js.map +1 -1
- package/lib/components/accordion/accordion-head/AccordionHead.styles.d.ts +2424 -15
- package/lib/components/accordion/accordion-head/AccordionHead.styles.js +70 -61
- package/lib/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
- package/lib/components/accordion/accordion-intro/AccordionIntro.js +4 -12
- package/lib/components/accordion/accordion-intro/AccordionIntro.js.map +1 -1
- package/lib/components/accordion/accordion-intro/AccordionIntro.styles.d.ts +2 -1
- package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js +2 -10
- package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js.map +1 -1
- package/lib/components/accordion/accordion-item/AccordionItem.d.ts +9 -0
- package/lib/components/accordion/accordion-item/AccordionItem.js +20 -0
- package/lib/components/accordion/accordion-item/AccordionItem.js.map +1 -0
- package/lib/components/accordion/accordion-item/AccordionItem.styles.d.ts +7 -0
- package/lib/components/accordion/accordion-item/AccordionItem.styles.js +26 -0
- package/lib/components/accordion/accordion-item/AccordionItem.styles.js.map +1 -0
- package/lib/components/amount-control/AmountControl.d.ts +22 -0
- package/lib/components/amount-control/AmountControl.js +178 -0
- package/lib/components/amount-control/AmountControl.js.map +1 -0
- package/lib/components/amount-control/AmountControl.styles.d.ts +288 -0
- package/lib/components/amount-control/AmountControl.styles.js +50 -0
- package/lib/components/amount-control/AmountControl.styles.js.map +1 -0
- package/lib/components/badge/Badge.d.ts +5 -1
- package/lib/components/badge/Badge.js +12 -17
- package/lib/components/badge/Badge.js.map +1 -1
- package/lib/components/badge/Badge.styles.d.ts +9 -4
- package/lib/components/badge/Badge.styles.js +12 -14
- package/lib/components/badge/Badge.styles.js.map +1 -1
- package/lib/components/button/Button.d.ts +5 -1
- package/lib/components/button/Button.js +71 -20
- package/lib/components/button/Button.js.map +1 -1
- package/lib/components/button/Button.styles.d.ts +813 -6
- package/lib/components/button/Button.styles.js +44 -26
- package/lib/components/button/Button.styles.js.map +1 -1
- package/lib/components/checkbox/Checkbox.d.ts +10 -2
- package/lib/components/checkbox/Checkbox.js +19 -22
- package/lib/components/checkbox/Checkbox.js.map +1 -1
- package/lib/components/checkbox/Checkbox.styles.d.ts +12 -5
- package/lib/components/checkbox/Checkbox.styles.js +70 -63
- package/lib/components/checkbox/Checkbox.styles.js.map +1 -1
- package/lib/components/color-scheme-provider/ColorSchemeProvider.d.ts +6 -0
- package/lib/components/color-scheme-provider/ColorSchemeProvider.js +75 -40
- package/lib/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
- package/lib/components/combobox/ComboBox.d.ts +43 -0
- package/lib/components/combobox/ComboBox.js +183 -0
- package/lib/components/combobox/ComboBox.js.map +1 -0
- package/lib/components/combobox/ComboBox.styles.d.ts +291 -0
- package/lib/components/combobox/ComboBox.styles.js +198 -0
- package/lib/components/combobox/ComboBox.styles.js.map +1 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.d.ts +12 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.js +32 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.js.map +1 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.d.ts +12 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js +54 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js.map +1 -0
- package/lib/components/content-card/ContentCard.d.ts +13 -0
- package/lib/components/content-card/ContentCard.js +14 -0
- package/lib/components/content-card/ContentCard.js.map +1 -0
- package/lib/components/content-card/ContentCard.styles.d.ts +2 -0
- package/lib/components/content-card/ContentCard.styles.js +32 -0
- package/lib/components/content-card/ContentCard.styles.js.map +1 -0
- package/lib/components/context-menu/ContextMenu.d.ts +3 -3
- package/lib/components/context-menu/ContextMenu.js +43 -53
- package/lib/components/context-menu/ContextMenu.js.map +1 -1
- package/lib/components/context-menu/ContextMenu.styles.d.ts +2 -1
- package/lib/components/context-menu/ContextMenu.styles.js +2 -10
- package/lib/components/context-menu/ContextMenu.styles.js.map +1 -1
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.d.ts +1 -1
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.js +17 -23
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.js.map +1 -1
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +275 -10
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js +25 -38
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js.map +1 -1
- package/lib/components/file-input/FileInput.d.ts +29 -0
- package/lib/components/file-input/FileInput.js +112 -0
- package/lib/components/file-input/FileInput.js.map +1 -0
- package/lib/components/file-input/FileInput.styles.d.ts +277 -0
- package/lib/components/file-input/FileInput.styles.js +39 -0
- package/lib/components/file-input/FileInput.styles.js.map +1 -0
- package/lib/components/file-input/file-list/FileListItem.d.ts +9 -0
- package/lib/components/file-input/file-list/FileListItem.js +27 -0
- package/lib/components/file-input/file-list/FileListItem.js.map +1 -0
- package/lib/components/file-input/file-list/FileListItem.styles.d.ts +2 -0
- package/lib/components/file-input/file-list/FileListItem.styles.js +3 -0
- package/lib/components/file-input/file-list/FileListItem.styles.js.map +1 -0
- package/lib/components/filter-buttons/FilterButtons.d.ts +22 -0
- package/lib/components/filter-buttons/FilterButtons.js +79 -0
- package/lib/components/filter-buttons/FilterButtons.js.map +1 -0
- package/lib/components/filter-buttons/FilterButtons.styles.d.ts +2 -0
- package/lib/components/filter-buttons/FilterButtons.styles.js +7 -0
- package/lib/components/filter-buttons/FilterButtons.styles.js.map +1 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.d.ts +14 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.js +38 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.js.map +1 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.styles.d.ts +287 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.styles.js +98 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.styles.js.map +1 -0
- package/lib/components/grid-image/GridImage.js +20 -29
- package/lib/components/grid-image/GridImage.js.map +1 -1
- package/lib/components/grid-image/GridImage.styles.d.ts +15 -14
- package/lib/components/grid-image/GridImage.styles.js +21 -32
- package/lib/components/grid-image/GridImage.styles.js.map +1 -1
- package/lib/components/icon/Icon.js +20 -25
- package/lib/components/icon/Icon.js.map +1 -1
- package/lib/components/icon/Icon.styles.d.ts +13 -12
- package/lib/components/icon/Icon.styles.js +23 -33
- package/lib/components/icon/Icon.styles.js.map +1 -1
- package/lib/components/input/Input.d.ts +42 -2
- package/lib/components/input/Input.js +96 -29
- package/lib/components/input/Input.js.map +1 -1
- package/lib/components/input/Input.styles.d.ts +559 -7
- package/lib/components/input/Input.styles.js +118 -41
- package/lib/components/input/Input.styles.js.map +1 -1
- package/lib/components/list/List.d.ts +6 -0
- package/lib/components/list/List.js +16 -23
- package/lib/components/list/List.js.map +1 -1
- package/lib/components/list/list-item/ListItem.d.ts +1 -1
- package/lib/components/list/list-item/ListItem.js +24 -30
- package/lib/components/list/list-item/ListItem.js.map +1 -1
- package/lib/components/list/list-item/ListItem.styles.d.ts +9 -6
- package/lib/components/list/list-item/ListItem.styles.js +30 -39
- package/lib/components/list/list-item/ListItem.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-body/ListItemBody.d.ts +6 -2
- package/lib/components/list/list-item/list-item-body/ListItemBody.js +28 -15
- package/lib/components/list/list-item/list-item-body/ListItemBody.js.map +1 -1
- package/lib/components/list/list-item/list-item-body/ListItemBody.styles.d.ts +267 -1
- package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js +3 -11
- package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-content/ListItemContent.d.ts +8 -2
- package/lib/components/list/list-item/list-item-content/ListItemContent.js +4 -12
- package/lib/components/list/list-item/list-item-content/ListItemContent.js.map +1 -1
- package/lib/components/list/list-item/list-item-content/ListItemContent.styles.d.ts +2 -1
- package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js +2 -10
- package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/ListItemHead.js +25 -35
- package/lib/components/list/list-item/list-item-head/ListItemHead.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +546 -16
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js +19 -38
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js +5 -13
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.d.ts +2 -1
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js +2 -10
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js +11 -21
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.d.ts +8 -7
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js +7 -16
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js.map +1 -1
- package/lib/components/mention-finder/MentionFinder.d.ts +31 -0
- package/lib/components/mention-finder/MentionFinder.js +130 -0
- package/lib/components/mention-finder/MentionFinder.js.map +1 -0
- package/lib/components/mention-finder/MentionFinder.styles.d.ts +272 -0
- package/lib/components/mention-finder/MentionFinder.styles.js +84 -0
- package/lib/components/mention-finder/MentionFinder.styles.js.map +1 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.d.ts +10 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.js +23 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.js.map +1 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.d.ts +11 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js +83 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js.map +1 -0
- package/lib/components/number-input/NumberInput.d.ts +54 -0
- package/lib/components/number-input/NumberInput.js +133 -0
- package/lib/components/number-input/NumberInput.js.map +1 -0
- package/lib/components/popup/Popup.d.ts +30 -0
- package/lib/components/popup/Popup.js +150 -0
- package/lib/components/popup/Popup.js.map +1 -0
- package/lib/components/popup/Popup.styles.d.ts +5 -0
- package/lib/components/popup/Popup.styles.js +21 -0
- package/lib/components/popup/Popup.styles.js.map +1 -0
- package/lib/components/popup/popup-content/PopupContent.d.ts +10 -0
- package/lib/components/popup/popup-content/PopupContent.js +64 -0
- package/lib/components/popup/popup-content/PopupContent.js.map +1 -0
- package/lib/components/popup/popup-content/PopupContent.styles.d.ts +274 -0
- package/lib/components/popup/popup-content/PopupContent.styles.js +84 -0
- package/lib/components/popup/popup-content/PopupContent.styles.js.map +1 -0
- package/lib/components/progress-bar/ProgressBar.d.ts +13 -0
- package/lib/components/progress-bar/ProgressBar.js +31 -0
- package/lib/components/progress-bar/ProgressBar.js.map +1 -0
- package/lib/components/progress-bar/ProgressBar.styles.d.ts +272 -0
- package/lib/components/progress-bar/ProgressBar.styles.js +30 -0
- package/lib/components/progress-bar/ProgressBar.styles.js.map +1 -0
- package/lib/components/radio-button/RadioButton.d.ts +30 -0
- package/lib/components/radio-button/RadioButton.js +92 -0
- package/lib/components/radio-button/RadioButton.js.map +1 -0
- package/lib/components/radio-button/RadioButton.styles.d.ts +287 -0
- package/lib/components/radio-button/RadioButton.styles.js +105 -0
- package/lib/components/radio-button/RadioButton.styles.js.map +1 -0
- package/lib/components/radio-button/radio-button-group/RadioButtonGroup.d.ts +17 -0
- package/lib/components/radio-button/radio-button-group/RadioButtonGroup.js +38 -0
- package/lib/components/radio-button/radio-button-group/RadioButtonGroup.js.map +1 -0
- package/lib/components/scroll-view/ScrollView.d.ts +13 -0
- package/lib/components/scroll-view/ScrollView.js +19 -0
- package/lib/components/scroll-view/ScrollView.js.map +1 -0
- package/lib/components/scroll-view/ScrollView.styles.d.ts +9 -0
- package/lib/components/scroll-view/ScrollView.styles.js +41 -0
- package/lib/components/scroll-view/ScrollView.styles.js.map +1 -0
- package/lib/components/search-box/SearchBox.d.ts +41 -0
- package/lib/components/search-box/SearchBox.js +267 -0
- package/lib/components/search-box/SearchBox.js.map +1 -0
- package/lib/components/search-box/SearchBox.styles.d.ts +274 -0
- package/lib/components/search-box/SearchBox.styles.js +71 -0
- package/lib/components/search-box/SearchBox.styles.js.map +1 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.d.ts +11 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.js +27 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.js.map +1 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.d.ts +13 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js +55 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js.map +1 -0
- package/lib/components/search-input/SearchInput.d.ts +33 -0
- package/lib/components/search-input/SearchInput.js +93 -0
- package/lib/components/search-input/SearchInput.js.map +1 -0
- package/lib/components/search-input/SearchInput.styles.d.ts +534 -0
- package/lib/components/search-input/SearchInput.styles.js +19 -0
- package/lib/components/search-input/SearchInput.styles.js.map +1 -0
- package/lib/components/select-button/SelectButton.d.ts +34 -0
- package/lib/components/select-button/SelectButton.js +56 -0
- package/lib/components/select-button/SelectButton.js.map +1 -0
- package/lib/components/select-button/SelectButton.styles.d.ts +2 -0
- package/lib/components/select-button/SelectButton.styles.js +3 -0
- package/lib/components/select-button/SelectButton.styles.js.map +1 -0
- package/lib/components/setup-wizard/SetupWizard.d.ts +27 -0
- package/lib/components/setup-wizard/SetupWizard.js +73 -0
- package/lib/components/setup-wizard/SetupWizard.js.map +1 -0
- package/lib/components/setup-wizard/SetupWizard.styles.d.ts +2 -0
- package/lib/components/setup-wizard/SetupWizard.styles.js +3 -0
- package/lib/components/setup-wizard/SetupWizard.styles.js.map +1 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.d.ts +21 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.js +49 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.js.map +1 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.d.ts +3 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.js +7 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.js.map +1 -0
- package/lib/components/sharing-bar/SharingBar.d.ts +18 -0
- package/lib/components/sharing-bar/SharingBar.js +101 -0
- package/lib/components/sharing-bar/SharingBar.js.map +1 -0
- package/lib/components/sharing-bar/SharingBar.styles.d.ts +6 -0
- package/lib/components/sharing-bar/SharingBar.styles.js +17 -0
- package/lib/components/sharing-bar/SharingBar.styles.js.map +1 -0
- package/lib/components/signature/Signature.d.ts +33 -0
- package/lib/components/signature/Signature.js +95 -0
- package/lib/components/signature/Signature.js.map +1 -0
- package/lib/components/signature/Signature.styles.d.ts +5 -0
- package/lib/components/signature/Signature.styles.js +14 -0
- package/lib/components/signature/Signature.styles.js.map +1 -0
- package/lib/components/slider/Slider.d.ts +45 -0
- package/lib/components/slider/Slider.js +181 -0
- package/lib/components/slider/Slider.js.map +1 -0
- package/lib/components/slider/Slider.styles.d.ts +16 -0
- package/lib/components/slider/Slider.styles.js +98 -0
- package/lib/components/slider/Slider.styles.js.map +1 -0
- package/lib/components/slider-button/SliderButton.d.ts +23 -0
- package/lib/components/slider-button/SliderButton.js +148 -0
- package/lib/components/slider-button/SliderButton.js.map +1 -0
- package/lib/components/slider-button/SliderButton.styles.d.ts +279 -0
- package/lib/components/slider-button/SliderButton.styles.js +62 -0
- package/lib/components/slider-button/SliderButton.styles.js.map +1 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.d.ts +31 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.js +36 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.js.map +1 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.styles.d.ts +19 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js +93 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js.map +1 -0
- package/lib/components/tag-input/TagInput.d.ts +22 -0
- package/lib/components/tag-input/TagInput.js +79 -0
- package/lib/components/tag-input/TagInput.js.map +1 -0
- package/lib/components/tag-input/TagInput.styles.d.ts +9 -0
- package/lib/components/tag-input/TagInput.styles.js +41 -0
- package/lib/components/tag-input/TagInput.styles.js.map +1 -0
- package/lib/components/text-area/TextArea.d.ts +29 -0
- package/lib/components/text-area/TextArea.js +49 -0
- package/lib/components/text-area/TextArea.js.map +1 -0
- package/lib/components/text-area/TextArea.styles.d.ts +16 -0
- package/lib/components/text-area/TextArea.styles.js +101 -0
- package/lib/components/text-area/TextArea.styles.js.map +1 -0
- package/lib/components/tooltip/Tooltip.d.ts +22 -0
- package/lib/components/tooltip/Tooltip.js +33 -0
- package/lib/components/tooltip/Tooltip.js.map +1 -0
- package/lib/components/tooltip/Tooltip.styles.d.ts +2 -0
- package/lib/components/tooltip/Tooltip.styles.js +3 -0
- package/lib/components/tooltip/Tooltip.styles.js.map +1 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.d.ts +13 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.js +22 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.js.map +1 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.d.ts +15 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js +36 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js.map +1 -0
- package/lib/components/truncation/Truncation.d.ts +34 -0
- package/lib/components/truncation/Truncation.js +132 -0
- package/lib/components/truncation/Truncation.js.map +1 -0
- package/lib/components/truncation/Truncation.styles.d.ts +277 -0
- package/lib/components/truncation/Truncation.styles.js +44 -0
- package/lib/components/truncation/Truncation.styles.js.map +1 -0
- package/lib/constants/mentionFinder.d.ts +4 -0
- package/lib/constants/mentionFinder.js +6 -0
- package/lib/constants/mentionFinder.js.map +1 -0
- package/lib/constants/numberInput.d.ts +5 -0
- package/lib/constants/numberInput.js +6 -0
- package/lib/constants/numberInput.js.map +1 -0
- package/lib/constants/signature.d.ts +1 -0
- package/lib/constants/signature.js +2 -0
- package/lib/constants/signature.js.map +1 -0
- package/lib/hooks/useElementSize.d.ts +2 -0
- package/lib/hooks/useElementSize.js +9 -0
- package/lib/hooks/useElementSize.js.map +1 -0
- package/lib/hooks/uuid.js +4 -11
- package/lib/hooks/uuid.js.map +1 -1
- package/lib/index.d.ts +44 -1
- package/lib/index.js +49 -111
- package/lib/index.js.map +1 -1
- package/lib/types/chayns.d.ts +67 -1
- package/lib/types/chayns.js +3 -10
- package/lib/types/chayns.js.map +1 -1
- package/lib/types/colorSchemeProvider.d.ts +15 -0
- package/lib/types/colorSchemeProvider.js +9 -0
- package/lib/types/colorSchemeProvider.js.map +1 -0
- package/lib/types/comboBox.d.ts +4 -0
- package/lib/types/comboBox.js +6 -0
- package/lib/types/comboBox.js.map +1 -0
- package/lib/{components/context-menu/constants/alignment.js → types/contextMenu.js} +4 -11
- package/lib/types/contextMenu.js.map +1 -0
- package/lib/types/file.d.ts +46 -0
- package/lib/types/file.js +2 -0
- package/lib/types/file.js.map +1 -0
- package/lib/types/filterButtons.d.ts +15 -0
- package/lib/types/filterButtons.js +11 -0
- package/lib/types/filterButtons.js.map +1 -0
- package/lib/types/popup.d.ts +16 -0
- package/lib/types/popup.js +10 -0
- package/lib/types/popup.js.map +1 -0
- package/lib/types/radioButton.d.ts +4 -0
- package/lib/types/radioButton.js +2 -0
- package/lib/types/radioButton.js.map +1 -0
- package/lib/types/searchBox.d.ts +5 -0
- package/lib/types/searchBox.js +2 -0
- package/lib/types/searchBox.js.map +1 -0
- package/lib/types/selectButton.d.ts +4 -0
- package/lib/types/selectButton.js +2 -0
- package/lib/types/selectButton.js.map +1 -0
- package/lib/types/signature.d.ts +10 -0
- package/lib/types/signature.js +2 -0
- package/lib/types/signature.js.map +1 -0
- package/lib/types/slider-button.d.ts +4 -0
- package/lib/types/slider-button.js +2 -0
- package/lib/types/slider-button.js.map +1 -0
- package/lib/types/tagInput.d.ts +4 -0
- package/lib/types/tagInput.js +2 -0
- package/lib/types/tagInput.js.map +1 -0
- package/lib/types/tooltip.d.ts +9 -0
- package/lib/types/tooltip.js +2 -0
- package/lib/types/tooltip.js.map +1 -0
- package/lib/types/truncation.d.ts +5 -0
- package/lib/types/truncation.js +7 -0
- package/lib/types/truncation.js.map +1 -0
- package/lib/{components/accordion/utils.js → utils/accordion.js} +2 -9
- package/lib/utils/accordion.js.map +1 -0
- package/lib/utils/amountControl.d.ts +7 -0
- package/lib/utils/amountControl.js +15 -0
- package/lib/utils/amountControl.js.map +1 -0
- package/lib/utils/calculate.d.ts +5 -0
- package/lib/utils/calculate.js +63 -0
- package/lib/utils/calculate.js.map +1 -0
- package/lib/utils/file.d.ts +363 -0
- package/lib/utils/file.js +393 -0
- package/lib/utils/file.js.map +1 -0
- package/lib/utils/fileDialog.d.ts +7 -0
- package/lib/utils/fileDialog.js +65 -0
- package/lib/utils/fileDialog.js.map +1 -0
- package/lib/utils/font.d.ts +8 -0
- package/lib/utils/font.js +67 -0
- package/lib/utils/font.js.map +1 -0
- package/lib/utils/icon.js +5 -0
- package/lib/utils/icon.js.map +1 -0
- package/lib/utils/isTobitEmployee.d.ts +1 -0
- package/lib/utils/isTobitEmployee.js +21 -0
- package/lib/utils/isTobitEmployee.js.map +1 -0
- package/lib/utils/numberInput.d.ts +23 -0
- package/lib/utils/numberInput.js +83 -0
- package/lib/utils/numberInput.js.map +1 -0
- package/lib/utils/searchBox.d.ts +7 -0
- package/lib/utils/searchBox.js +16 -0
- package/lib/utils/searchBox.js.map +1 -0
- package/lib/utils/slider.d.ts +7 -0
- package/lib/utils/slider.js +28 -0
- package/lib/utils/slider.js.map +1 -0
- package/lib/utils/sliderButton.d.ts +15 -0
- package/lib/utils/sliderButton.js +45 -0
- package/lib/utils/sliderButton.js.map +1 -0
- package/lib/utils/truncation.d.ts +1 -0
- package/lib/utils/truncation.js +27 -0
- package/lib/utils/truncation.js.map +1 -0
- package/lib/utils/uploadFile.d.ts +7 -0
- package/lib/utils/uploadFile.js +35 -0
- package/lib/utils/uploadFile.js.map +1 -0
- package/package.json +32 -21
- package/lib/components/accordion/utils.js.map +0 -1
- package/lib/components/context-menu/constants/alignment.js.map +0 -1
- package/lib/components/icon/utils.js +0 -13
- package/lib/components/icon/utils.js.map +0 -1
- /package/lib/{components/context-menu/constants/alignment.d.ts → types/contextMenu.d.ts} +0 -0
- /package/lib/{components/accordion/utils.d.ts → utils/accordion.d.ts} +0 -0
- /package/lib/{components/icon/utils.d.ts → utils/icon.d.ts} +0 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import Input from '../input/Input';
|
|
3
|
+
import { NUMBER_CLEAR_REGEX } from '../../constants/numberInput';
|
|
4
|
+
import { formateNumber, isValidString, parseFloatWithDecimals } from '../../utils/numberInput';
|
|
5
|
+
const NumberInput = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
isDecimalInput,
|
|
8
|
+
isMoneyInput,
|
|
9
|
+
isTimeInput,
|
|
10
|
+
maxNumber = Infinity,
|
|
11
|
+
value,
|
|
12
|
+
placeholder,
|
|
13
|
+
onBlur,
|
|
14
|
+
isDisabled,
|
|
15
|
+
onChange,
|
|
16
|
+
shouldShowOnlyBottomBorder,
|
|
17
|
+
minNumber = -Infinity
|
|
18
|
+
} = _ref;
|
|
19
|
+
// the plainText will be shown in the input, when it is in focus
|
|
20
|
+
const [plainText, setPlainText] = useState('');
|
|
21
|
+
// the formattedValue will be shown in the input, when it is not in focus
|
|
22
|
+
const [formattedValue, setFormattedValue] = useState('');
|
|
23
|
+
const [hasFocus, setHasFocus] = useState(false);
|
|
24
|
+
const [isValueInvalid, setIsValueInvalid] = useState(false);
|
|
25
|
+
const localPlaceholder = placeholder ?? (isMoneyInput ? '€' : undefined);
|
|
26
|
+
const onLocalChange = event => {
|
|
27
|
+
const newValue = event.target.value;
|
|
28
|
+
if (newValue.replaceAll(':', '').length > 4) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const sanitizedValueString = newValue
|
|
32
|
+
// Removes everything except numbers, commas and points
|
|
33
|
+
.replace(NUMBER_CLEAR_REGEX, '');
|
|
34
|
+
const valueToCheck = sanitizedValueString.replaceAll(',', '.');
|
|
35
|
+
if (!isValidString({
|
|
36
|
+
string: valueToCheck,
|
|
37
|
+
isMoneyInput,
|
|
38
|
+
isDecimalInput,
|
|
39
|
+
isTimeInput
|
|
40
|
+
})) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
setPlainText(sanitizedValueString.replaceAll('.', ','));
|
|
44
|
+
if (typeof onChange === 'function') {
|
|
45
|
+
onChange(sanitizedValueString.replaceAll('.', ','));
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const onLocalBlur = () => {
|
|
49
|
+
const sanitizedValue = plainText.length === 0 ? '0' : plainText;
|
|
50
|
+
let isInvalid = false;
|
|
51
|
+
let parsedNumber = null;
|
|
52
|
+
if (!isTimeInput) {
|
|
53
|
+
parsedNumber = parseFloatWithDecimals({
|
|
54
|
+
stringValue: sanitizedValue.replace(',', '.').replaceAll(':', ''),
|
|
55
|
+
decimals: isMoneyInput ? 2 : undefined
|
|
56
|
+
});
|
|
57
|
+
if (parsedNumber !== 0 && (parsedNumber > maxNumber || parsedNumber < minNumber)) {
|
|
58
|
+
isInvalid = true;
|
|
59
|
+
}
|
|
60
|
+
setIsValueInvalid(isInvalid);
|
|
61
|
+
}
|
|
62
|
+
const newStringValue = plainText.length === 0 ? '' : formateNumber({
|
|
63
|
+
number: isTimeInput ? sanitizedValue : parsedNumber,
|
|
64
|
+
isMoneyInput,
|
|
65
|
+
isTimeInput
|
|
66
|
+
});
|
|
67
|
+
setFormattedValue(newStringValue);
|
|
68
|
+
setPlainText(newStringValue.replaceAll('.', ''));
|
|
69
|
+
setHasFocus(false);
|
|
70
|
+
if (typeof onChange === 'function') {
|
|
71
|
+
onChange(newStringValue.replaceAll('.', ''));
|
|
72
|
+
}
|
|
73
|
+
if (typeof onBlur === 'function') {
|
|
74
|
+
if (isTimeInput) {
|
|
75
|
+
onBlur(newStringValue, isInvalid);
|
|
76
|
+
} else {
|
|
77
|
+
onBlur(parsedNumber === 0 ? null : parsedNumber, isInvalid);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
const onLocalFocus = () => {
|
|
82
|
+
// formattedValue will be a number string with german number format (e.g. 1.000,00)
|
|
83
|
+
// It will remove all dots, so that the user can type in the number
|
|
84
|
+
setPlainText(formattedValue.replaceAll('.', ''));
|
|
85
|
+
|
|
86
|
+
// This will update the external state
|
|
87
|
+
if (typeof onChange === 'function') {
|
|
88
|
+
onChange(formattedValue.replaceAll('.', ''));
|
|
89
|
+
}
|
|
90
|
+
setIsValueInvalid(false);
|
|
91
|
+
setHasFocus(true);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
// updates the formattedValue, when the value changes
|
|
95
|
+
useEffect(() => {
|
|
96
|
+
let parsedNumber = null;
|
|
97
|
+
if (!isTimeInput) {
|
|
98
|
+
parsedNumber = parseFloatWithDecimals({
|
|
99
|
+
stringValue: plainText.replace(',', '.').replaceAll(':', ''),
|
|
100
|
+
decimals: isMoneyInput ? 2 : undefined
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
// checks, if a given number is invalid, if the input is not in focus
|
|
104
|
+
if (!hasFocus) {
|
|
105
|
+
setIsValueInvalid(parsedNumber > maxNumber || parsedNumber < minNumber);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
setFormattedValue(plainText.length === 0 ? '' : formateNumber({
|
|
109
|
+
number: isTimeInput ? plainText : parsedNumber,
|
|
110
|
+
isMoneyInput,
|
|
111
|
+
isTimeInput
|
|
112
|
+
}));
|
|
113
|
+
}, [hasFocus, isMoneyInput, isTimeInput, maxNumber, minNumber, plainText]);
|
|
114
|
+
useEffect(() => {
|
|
115
|
+
if (typeof value === 'string') {
|
|
116
|
+
setPlainText(value);
|
|
117
|
+
}
|
|
118
|
+
}, [value]);
|
|
119
|
+
return /*#__PURE__*/React.createElement(Input, {
|
|
120
|
+
shouldShowOnlyBottomBorder: shouldShowOnlyBottomBorder,
|
|
121
|
+
inputMode: "decimal",
|
|
122
|
+
onChange: onLocalChange,
|
|
123
|
+
value: hasFocus ? plainText : formattedValue,
|
|
124
|
+
placeholder: localPlaceholder,
|
|
125
|
+
onBlur: onLocalBlur,
|
|
126
|
+
onFocus: onLocalFocus,
|
|
127
|
+
isDisabled: isDisabled,
|
|
128
|
+
isInvalid: isValueInvalid
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
NumberInput.displayName = 'NumberInput';
|
|
132
|
+
export default NumberInput;
|
|
133
|
+
//# sourceMappingURL=NumberInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberInput.js","names":["React","useEffect","useState","Input","NUMBER_CLEAR_REGEX","formateNumber","isValidString","parseFloatWithDecimals","NumberInput","_ref","isDecimalInput","isMoneyInput","isTimeInput","maxNumber","Infinity","value","placeholder","onBlur","isDisabled","onChange","shouldShowOnlyBottomBorder","minNumber","plainText","setPlainText","formattedValue","setFormattedValue","hasFocus","setHasFocus","isValueInvalid","setIsValueInvalid","localPlaceholder","undefined","onLocalChange","event","newValue","target","replaceAll","length","sanitizedValueString","replace","valueToCheck","string","onLocalBlur","sanitizedValue","isInvalid","parsedNumber","stringValue","decimals","newStringValue","number","onLocalFocus","createElement","inputMode","onFocus","displayName"],"sources":["../../../src/components/number-input/NumberInput.tsx"],"sourcesContent":["import React, { ChangeEventHandler, FC, useEffect, useState } from 'react';\nimport Input from '../input/Input';\nimport { NUMBER_CLEAR_REGEX } from '../../constants/numberInput';\nimport { formateNumber, isValidString, parseFloatWithDecimals } from '../../utils/numberInput';\n\nexport type NumberInputProps = {\n /**\n * Applies rules for decimal input.\n * Enables the user to input one zero as number before the comma\n */\n isDecimalInput?: boolean;\n /**\n * Whether the input is disabled\n */\n isDisabled?: boolean;\n /**\n * Applies rules for money input.\n * Rules: only two decimal places, one zero before the comma\n */\n isMoneyInput?: boolean;\n /**\n * Whether the value should be formatted as a time.\n */\n isTimeInput?: boolean;\n /**\n * Limits the number to this value\n */\n maxNumber?: number;\n /**\n * Limits the number to this value\n */\n minNumber?: number;\n /**\n * Callback function that is called when the input gets out of focus\n */\n onBlur?: (newNumber: number | string | null, isInvalid: boolean) => void;\n /**\n * Callback function that is called when the input changes\n * It will pass the text from the input\n */\n onChange?: (newValue: string) => void;\n /**\n * Placeholder for the input field\n */\n placeholder?: string;\n /**\n * Whether only the bottom border should be displayed\n */\n shouldShowOnlyBottomBorder?: boolean;\n /**\n * The value, that should be displayed in the input, when it is in focus.\n * You can also pass a stringified number as default value.\n * NOTE: If you pass a stringified number, it will be formatted to the selected format\n */\n value?: string;\n};\n\nconst NumberInput: FC<NumberInputProps> = ({\n isDecimalInput,\n isMoneyInput,\n isTimeInput,\n maxNumber = Infinity,\n value,\n placeholder,\n onBlur,\n isDisabled,\n onChange,\n shouldShowOnlyBottomBorder,\n minNumber = -Infinity,\n}) => {\n // the plainText will be shown in the input, when it is in focus\n const [plainText, setPlainText] = useState<string>('');\n // the formattedValue will be shown in the input, when it is not in focus\n const [formattedValue, setFormattedValue] = useState<string>('');\n const [hasFocus, setHasFocus] = useState<boolean>(false);\n\n const [isValueInvalid, setIsValueInvalid] = useState(false);\n const localPlaceholder = placeholder ?? (isMoneyInput ? '€' : undefined);\n\n const onLocalChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n const newValue = event.target.value;\n\n if (newValue.replaceAll(':', '').length > 4) {\n return;\n }\n\n const sanitizedValueString = newValue\n // Removes everything except numbers, commas and points\n .replace(NUMBER_CLEAR_REGEX, '');\n\n const valueToCheck = sanitizedValueString.replaceAll(',', '.');\n\n if (!isValidString({ string: valueToCheck, isMoneyInput, isDecimalInput, isTimeInput })) {\n return;\n }\n\n setPlainText(sanitizedValueString.replaceAll('.', ','));\n\n if (typeof onChange === 'function') {\n onChange(sanitizedValueString.replaceAll('.', ','));\n }\n };\n\n const onLocalBlur = () => {\n const sanitizedValue = plainText.length === 0 ? '0' : plainText;\n let isInvalid = false;\n let parsedNumber = null;\n\n if (!isTimeInput) {\n parsedNumber = parseFloatWithDecimals({\n stringValue: sanitizedValue.replace(',', '.').replaceAll(':', ''),\n decimals: isMoneyInput ? 2 : undefined,\n });\n\n if (parsedNumber !== 0 && (parsedNumber > maxNumber || parsedNumber < minNumber)) {\n isInvalid = true;\n }\n\n setIsValueInvalid(isInvalid);\n }\n\n const newStringValue =\n plainText.length === 0\n ? ''\n : formateNumber({\n number: isTimeInput ? sanitizedValue : parsedNumber,\n isMoneyInput,\n isTimeInput,\n });\n\n setFormattedValue(newStringValue);\n setPlainText(newStringValue.replaceAll('.', ''));\n setHasFocus(false);\n\n if (typeof onChange === 'function') {\n onChange(newStringValue.replaceAll('.', ''));\n }\n\n if (typeof onBlur === 'function') {\n if (isTimeInput) {\n onBlur(newStringValue, isInvalid);\n } else {\n onBlur(parsedNumber === 0 ? null : parsedNumber, isInvalid);\n }\n }\n };\n\n const onLocalFocus = () => {\n // formattedValue will be a number string with german number format (e.g. 1.000,00)\n // It will remove all dots, so that the user can type in the number\n setPlainText(formattedValue.replaceAll('.', ''));\n\n // This will update the external state\n if (typeof onChange === 'function') {\n onChange(formattedValue.replaceAll('.', ''));\n }\n\n setIsValueInvalid(false);\n setHasFocus(true);\n };\n\n // updates the formattedValue, when the value changes\n useEffect(() => {\n let parsedNumber = null;\n\n if (!isTimeInput) {\n parsedNumber = parseFloatWithDecimals({\n stringValue: plainText.replace(',', '.').replaceAll(':', ''),\n decimals: isMoneyInput ? 2 : undefined,\n });\n\n // checks, if a given number is invalid, if the input is not in focus\n if (!hasFocus) {\n setIsValueInvalid(parsedNumber > maxNumber || parsedNumber < minNumber);\n }\n }\n\n setFormattedValue(\n plainText.length === 0\n ? ''\n : formateNumber({\n number: isTimeInput ? plainText : parsedNumber,\n isMoneyInput,\n isTimeInput,\n }),\n );\n }, [hasFocus, isMoneyInput, isTimeInput, maxNumber, minNumber, plainText]);\n\n useEffect(() => {\n if (typeof value === 'string') {\n setPlainText(value);\n }\n }, [value]);\n\n return (\n <Input\n shouldShowOnlyBottomBorder={shouldShowOnlyBottomBorder}\n inputMode=\"decimal\"\n onChange={onLocalChange}\n value={hasFocus ? plainText : formattedValue}\n placeholder={localPlaceholder}\n onBlur={onLocalBlur}\n onFocus={onLocalFocus}\n isDisabled={isDisabled}\n isInvalid={isValueInvalid}\n />\n );\n};\n\nNumberInput.displayName = 'NumberInput';\n\nexport default NumberInput;\n"],"mappings":"AAAA,OAAOA,KAAK,IAA4BC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC1E,OAAOC,KAAK,MAAM,gBAAgB;AAClC,SAASC,kBAAkB,QAAQ,6BAA6B;AAChE,SAASC,aAAa,EAAEC,aAAa,EAAEC,sBAAsB,QAAQ,yBAAyB;AAsD9F,MAAMC,WAAiC,GAAGC,IAAA,IAYpC;EAAA,IAZqC;IACvCC,cAAc;IACdC,YAAY;IACZC,WAAW;IACXC,SAAS,GAAGC,QAAQ;IACpBC,KAAK;IACLC,WAAW;IACXC,MAAM;IACNC,UAAU;IACVC,QAAQ;IACRC,0BAA0B;IAC1BC,SAAS,GAAG,CAACP;EACjB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AAAmD,aAAA,CAAChD,KAAK;IACFiB,0BAA0B,EAAEA,0BAA2B;IACvDgC,SAAS,EAAC,SAAS;IACnBjC,QAAQ,EAAEa,aAAc;IACxBjB,KAAK,EAAEW,QAAQ,GAAGJ,SAAS,GAAGE,cAAe;IAC7CR,WAAW,EAAEc,gBAAiB;IAC9Bb,MAAM,EAAEyB,WAAY;IACpBW,OAAO,EAAEH,YAAa;IACtBhC,UAAU,EAAEA,UAAW;IACvB0B,SAAS,EAAEhB;EAAe,CAC7B,CAAC;AAEV,CAAC;AAEDpB,WAAW,CAAC8C,WAAW,GAAG,aAAa;AAEvC,eAAe9C,WAAW"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { PopupRef } from '../../types/popup';
|
|
3
|
+
export type PopupProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The element over which the content of the `ContextMenu` should be displayed.
|
|
6
|
+
*/
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* The content that should be displayed inside the popup.
|
|
10
|
+
*/
|
|
11
|
+
content: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Function to be executed when the content of the Context menu has been hidden.
|
|
14
|
+
*/
|
|
15
|
+
onHide?: VoidFunction;
|
|
16
|
+
/**
|
|
17
|
+
* Function to be executed when the content of the Context menu has been shown.
|
|
18
|
+
*/
|
|
19
|
+
onShow?: VoidFunction;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the popup should be opened on hover. If not, the popup will be opened on click.
|
|
22
|
+
*/
|
|
23
|
+
shouldShowOnHover?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The Y offset of the popup to the children.
|
|
26
|
+
*/
|
|
27
|
+
yOffset?: number;
|
|
28
|
+
};
|
|
29
|
+
declare const Popup: React.ForwardRefExoticComponent<PopupProps & React.RefAttributes<PopupRef>>;
|
|
30
|
+
export default Popup;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { getWindowMetrics } from 'chayns-api';
|
|
2
|
+
import { AnimatePresence } from 'framer-motion';
|
|
3
|
+
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
4
|
+
import { createPortal } from 'react-dom';
|
|
5
|
+
import { useUuid } from '../../hooks/uuid';
|
|
6
|
+
import { PopupAlignment } from '../../types/popup';
|
|
7
|
+
import PopupContent from './popup-content/PopupContent';
|
|
8
|
+
import { StyledPopup, StyledPopupPseudo } from './Popup.styles';
|
|
9
|
+
const Popup = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
10
|
+
let {
|
|
11
|
+
content,
|
|
12
|
+
onShow,
|
|
13
|
+
onHide,
|
|
14
|
+
children,
|
|
15
|
+
shouldShowOnHover = false,
|
|
16
|
+
yOffset = 0
|
|
17
|
+
} = _ref;
|
|
18
|
+
const [coordinates, setCoordinates] = useState({
|
|
19
|
+
x: 0,
|
|
20
|
+
y: 0
|
|
21
|
+
});
|
|
22
|
+
const container = document.querySelector('.tapp') || document.body;
|
|
23
|
+
const [alignment, setAlignment] = useState(PopupAlignment.TopLeft);
|
|
24
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
25
|
+
const [portal, setPortal] = useState();
|
|
26
|
+
const [menuHeight, setMenuHeight] = useState(0);
|
|
27
|
+
const uuid = useUuid();
|
|
28
|
+
|
|
29
|
+
// ToDo: Replace with hook if new chayns api is ready
|
|
30
|
+
const popupContentRef = useRef(null);
|
|
31
|
+
const popupPseudoContentRef = useRef(null);
|
|
32
|
+
const popupRef = useRef(null);
|
|
33
|
+
const handleShow = useCallback(() => {
|
|
34
|
+
if (popupRef.current && popupPseudoContentRef.current) {
|
|
35
|
+
const {
|
|
36
|
+
height: pseudoHeight,
|
|
37
|
+
width: pseudoWidth
|
|
38
|
+
} = popupPseudoContentRef.current.getBoundingClientRect();
|
|
39
|
+
const {
|
|
40
|
+
height: childrenHeight,
|
|
41
|
+
left: childrenLeft,
|
|
42
|
+
top: childrenTop,
|
|
43
|
+
width: childrenWidth
|
|
44
|
+
} = popupRef.current.getBoundingClientRect();
|
|
45
|
+
if (pseudoHeight > childrenTop - 25) {
|
|
46
|
+
if (pseudoWidth > childrenLeft + childrenWidth / 2 - 25) {
|
|
47
|
+
setAlignment(PopupAlignment.BottomRight);
|
|
48
|
+
} else {
|
|
49
|
+
setAlignment(PopupAlignment.BottomLeft);
|
|
50
|
+
}
|
|
51
|
+
setCoordinates({
|
|
52
|
+
x: childrenLeft + childrenWidth / 2,
|
|
53
|
+
y: childrenTop + childrenHeight + yOffset
|
|
54
|
+
});
|
|
55
|
+
} else {
|
|
56
|
+
if (pseudoWidth > childrenLeft + childrenWidth / 2 - 25) {
|
|
57
|
+
setAlignment(PopupAlignment.TopRight);
|
|
58
|
+
} else {
|
|
59
|
+
setAlignment(PopupAlignment.TopLeft);
|
|
60
|
+
}
|
|
61
|
+
setCoordinates({
|
|
62
|
+
x: childrenLeft + childrenWidth / 2,
|
|
63
|
+
y: childrenTop - yOffset
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
setIsOpen(true);
|
|
67
|
+
}
|
|
68
|
+
}, [yOffset]);
|
|
69
|
+
const handleChildrenClick = () => {
|
|
70
|
+
if (!shouldShowOnHover) {
|
|
71
|
+
handleShow();
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const handleHide = useCallback(() => {
|
|
75
|
+
setIsOpen(false);
|
|
76
|
+
}, []);
|
|
77
|
+
const handleMouseEnter = () => {
|
|
78
|
+
if (shouldShowOnHover) {
|
|
79
|
+
handleShow();
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
const handleMouseLeave = useCallback(event => {
|
|
83
|
+
if (shouldShowOnHover) {
|
|
84
|
+
if (event.currentTarget.dataset.ispopup === 'true') {
|
|
85
|
+
handleHide();
|
|
86
|
+
}
|
|
87
|
+
if (event.relatedTarget && (event.relatedTarget === popupContentRef.current || popupContentRef.current?.contains(event.relatedTarget))) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
handleHide();
|
|
91
|
+
}
|
|
92
|
+
}, [handleHide, shouldShowOnHover]);
|
|
93
|
+
const handleDocumentClick = useCallback(event => {
|
|
94
|
+
if (!popupContentRef.current?.contains(event.target) && !shouldShowOnHover) {
|
|
95
|
+
event.preventDefault();
|
|
96
|
+
event.stopPropagation();
|
|
97
|
+
handleHide();
|
|
98
|
+
}
|
|
99
|
+
}, [handleHide, shouldShowOnHover]);
|
|
100
|
+
useImperativeHandle(ref, () => ({
|
|
101
|
+
hide: handleHide,
|
|
102
|
+
show: handleShow
|
|
103
|
+
}), [handleHide, handleShow]);
|
|
104
|
+
useEffect(() => {
|
|
105
|
+
void getWindowMetrics().then(result => {
|
|
106
|
+
if (result.topBarHeight) {
|
|
107
|
+
setMenuHeight(result.topBarHeight);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}, []);
|
|
111
|
+
useEffect(() => {
|
|
112
|
+
if (isOpen) {
|
|
113
|
+
document.addEventListener('click', handleDocumentClick, true);
|
|
114
|
+
window.addEventListener('blur', handleHide);
|
|
115
|
+
if (typeof onShow === 'function') {
|
|
116
|
+
onShow();
|
|
117
|
+
}
|
|
118
|
+
} else if (typeof onHide === 'function') {
|
|
119
|
+
onHide();
|
|
120
|
+
}
|
|
121
|
+
return () => {
|
|
122
|
+
document.removeEventListener('click', handleDocumentClick, true);
|
|
123
|
+
window.removeEventListener('blur', handleHide);
|
|
124
|
+
};
|
|
125
|
+
}, [handleDocumentClick, handleHide, isOpen, onHide, onShow]);
|
|
126
|
+
useEffect(() => {
|
|
127
|
+
setPortal(() => /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(AnimatePresence, {
|
|
128
|
+
initial: false
|
|
129
|
+
}, isOpen && /*#__PURE__*/React.createElement(PopupContent, {
|
|
130
|
+
coordinates: coordinates,
|
|
131
|
+
content: content,
|
|
132
|
+
key: `tooltip_${uuid}`,
|
|
133
|
+
alignment: alignment,
|
|
134
|
+
ref: popupContentRef,
|
|
135
|
+
onMouseLeave: handleMouseLeave
|
|
136
|
+
})), container));
|
|
137
|
+
}, [alignment, container, content, coordinates, handleMouseLeave, isOpen, uuid]);
|
|
138
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledPopupPseudo, {
|
|
139
|
+
ref: popupPseudoContentRef,
|
|
140
|
+
$menuHeight: menuHeight
|
|
141
|
+
}, content), /*#__PURE__*/React.createElement(StyledPopup, {
|
|
142
|
+
ref: popupRef,
|
|
143
|
+
onClick: handleChildrenClick,
|
|
144
|
+
onMouseLeave: handleMouseLeave,
|
|
145
|
+
onMouseEnter: handleMouseEnter
|
|
146
|
+
}, children), portal);
|
|
147
|
+
});
|
|
148
|
+
Popup.displayName = 'Popup';
|
|
149
|
+
export default Popup;
|
|
150
|
+
//# sourceMappingURL=Popup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popup.js","names":["getWindowMetrics","AnimatePresence","React","forwardRef","useCallback","useEffect","useImperativeHandle","useRef","useState","createPortal","useUuid","PopupAlignment","PopupContent","StyledPopup","StyledPopupPseudo","Popup","_ref","ref","content","onShow","onHide","children","shouldShowOnHover","yOffset","coordinates","setCoordinates","x","y","container","document","querySelector","body","alignment","setAlignment","TopLeft","isOpen","setIsOpen","portal","setPortal","menuHeight","setMenuHeight","uuid","popupContentRef","popupPseudoContentRef","popupRef","handleShow","current","height","pseudoHeight","width","pseudoWidth","getBoundingClientRect","childrenHeight","left","childrenLeft","top","childrenTop","childrenWidth","BottomRight","BottomLeft","TopRight","handleChildrenClick","handleHide","handleMouseEnter","handleMouseLeave","event","currentTarget","dataset","ispopup","relatedTarget","contains","handleDocumentClick","target","preventDefault","stopPropagation","hide","show","then","result","topBarHeight","addEventListener","window","removeEventListener","createElement","initial","key","onMouseLeave","Fragment","$menuHeight","onClick","onMouseEnter","displayName"],"sources":["../../../src/components/popup/Popup.tsx"],"sourcesContent":["import { getWindowMetrics } from 'chayns-api';\nimport { AnimatePresence } from 'framer-motion';\nimport React, {\n forwardRef,\n MouseEvent,\n ReactNode,\n ReactPortal,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { useUuid } from '../../hooks/uuid';\nimport { PopupAlignment, PopupCoordinates, PopupRef } from '../../types/popup';\nimport PopupContent from './popup-content/PopupContent';\nimport { StyledPopup, StyledPopupPseudo } from './Popup.styles';\n\nexport type PopupProps = {\n /**\n * The element over which the content of the `ContextMenu` should be displayed.\n */\n children?: ReactNode;\n /**\n * The content that should be displayed inside the popup.\n */\n content: ReactNode;\n /**\n * Function to be executed when the content of the Context menu has been hidden.\n */\n onHide?: VoidFunction;\n /**\n * Function to be executed when the content of the Context menu has been shown.\n */\n onShow?: VoidFunction;\n /**\n * Whether the popup should be opened on hover. If not, the popup will be opened on click.\n */\n shouldShowOnHover?: boolean;\n /**\n * The Y offset of the popup to the children.\n */\n yOffset?: number;\n};\n\nconst Popup = forwardRef<PopupRef, PopupProps>(\n ({ content, onShow, onHide, children, shouldShowOnHover = false, yOffset = 0 }, ref) => {\n const [coordinates, setCoordinates] = useState<PopupCoordinates>({\n x: 0,\n y: 0,\n });\n const container = document.querySelector('.tapp') || document.body;\n\n const [alignment, setAlignment] = useState<PopupAlignment>(PopupAlignment.TopLeft);\n const [isOpen, setIsOpen] = useState(false);\n const [portal, setPortal] = useState<ReactPortal>();\n const [menuHeight, setMenuHeight] = useState(0);\n\n const uuid = useUuid();\n\n // ToDo: Replace with hook if new chayns api is ready\n const popupContentRef = useRef<HTMLDivElement>(null);\n const popupPseudoContentRef = useRef<HTMLDivElement>(null);\n const popupRef = useRef<HTMLDivElement>(null);\n\n const handleShow = useCallback(() => {\n if (popupRef.current && popupPseudoContentRef.current) {\n const { height: pseudoHeight, width: pseudoWidth } =\n popupPseudoContentRef.current.getBoundingClientRect();\n\n const {\n height: childrenHeight,\n left: childrenLeft,\n top: childrenTop,\n width: childrenWidth,\n } = popupRef.current.getBoundingClientRect();\n\n if (pseudoHeight > childrenTop - 25) {\n if (pseudoWidth > childrenLeft + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.BottomRight);\n } else {\n setAlignment(PopupAlignment.BottomLeft);\n }\n\n setCoordinates({\n x: childrenLeft + childrenWidth / 2,\n y: childrenTop + childrenHeight + yOffset,\n });\n } else {\n if (pseudoWidth > childrenLeft + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.TopRight);\n } else {\n setAlignment(PopupAlignment.TopLeft);\n }\n\n setCoordinates({\n x: childrenLeft + childrenWidth / 2,\n y: childrenTop - yOffset,\n });\n }\n\n setIsOpen(true);\n }\n }, [yOffset]);\n\n const handleChildrenClick = () => {\n if (!shouldShowOnHover) {\n handleShow();\n }\n };\n\n const handleHide = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n const handleMouseEnter = () => {\n if (shouldShowOnHover) {\n handleShow();\n }\n };\n\n const handleMouseLeave = useCallback(\n (event: MouseEvent) => {\n if (shouldShowOnHover) {\n if ((event.currentTarget as HTMLElement).dataset.ispopup === 'true') {\n handleHide();\n }\n\n if (\n event.relatedTarget &&\n (event.relatedTarget === popupContentRef.current ||\n popupContentRef.current?.contains(event.relatedTarget as Node))\n ) {\n return;\n }\n\n handleHide();\n }\n },\n [handleHide, shouldShowOnHover],\n );\n\n const handleDocumentClick = useCallback<EventListener>(\n (event) => {\n if (\n !popupContentRef.current?.contains(event.target as Node) &&\n !shouldShowOnHover\n ) {\n event.preventDefault();\n event.stopPropagation();\n\n handleHide();\n }\n },\n [handleHide, shouldShowOnHover],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n hide: handleHide,\n show: handleShow,\n }),\n [handleHide, handleShow],\n );\n\n useEffect(() => {\n void getWindowMetrics().then((result) => {\n if (result.topBarHeight) {\n setMenuHeight(result.topBarHeight);\n }\n });\n }, []);\n\n useEffect(() => {\n if (isOpen) {\n document.addEventListener('click', handleDocumentClick, true);\n window.addEventListener('blur', handleHide);\n\n if (typeof onShow === 'function') {\n onShow();\n }\n } else if (typeof onHide === 'function') {\n onHide();\n }\n\n return () => {\n document.removeEventListener('click', handleDocumentClick, true);\n window.removeEventListener('blur', handleHide);\n };\n }, [handleDocumentClick, handleHide, isOpen, onHide, onShow]);\n\n useEffect(() => {\n setPortal(() =>\n createPortal(\n <AnimatePresence initial={false}>\n {isOpen && (\n <PopupContent\n coordinates={coordinates}\n content={content}\n key={`tooltip_${uuid}`}\n alignment={alignment}\n ref={popupContentRef}\n onMouseLeave={handleMouseLeave}\n />\n )}\n </AnimatePresence>,\n container,\n ),\n );\n }, [alignment, container, content, coordinates, handleMouseLeave, isOpen, uuid]);\n\n return (\n <>\n <StyledPopupPseudo ref={popupPseudoContentRef} $menuHeight={menuHeight}>\n {content}\n </StyledPopupPseudo>\n <StyledPopup\n ref={popupRef}\n onClick={handleChildrenClick}\n onMouseLeave={handleMouseLeave}\n onMouseEnter={handleMouseEnter}\n >\n {children}\n </StyledPopup>\n {portal}\n </>\n );\n },\n);\n\nPopup.displayName = 'Popup';\n\nexport default Popup;\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,eAAe,QAAQ,eAAe;AAC/C,OAAOC,KAAK,IACRC,UAAU,EAIVC,WAAW,EACXC,SAAS,EACTC,mBAAmB,EACnBC,MAAM,EACNC,QAAQ,QACL,OAAO;AACd,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,OAAO,QAAQ,kBAAkB;AAC1C,SAASC,cAAc,QAAoC,mBAAmB;AAC9E,OAAOC,YAAY,MAAM,8BAA8B;AACvD,SAASC,WAAW,EAAEC,iBAAiB,QAAQ,gBAAgB;AA6B/D,MAAMC,KAAK,gBAAGZ,UAAU,CACpB,CAAAa,IAAA,EAAgFC,GAAG,KAAK;EAAA,IAAvF;IAAEC,OAAO;IAAEC,MAAM;IAAEC,MAAM;IAAEC,QAAQ;IAAEC,iBAAiB,GAAG,KAAK;IAAEC,OAAO,GAA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AAG,EAAE2B,QAAS;IACd6C,OAAO,EAAE5B,mBAAoB;IAC7ByB,YAAY,EAAEtB,gBAAiB;IAC/B0B,YAAY,EAAE3B;EAAiB,GAE9B1C,QACQ,CAAC,EACbgB,MACH,CAAC;AAEX,CACJ,CAAC;AAEDtB,KAAK,CAAC4E,WAAW,GAAG,OAAO;AAE3B,eAAe5E,KAAK"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledPopup: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>;
|
|
3
|
+
export declare const StyledPopupPseudo: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
4
|
+
$menuHeight: number;
|
|
5
|
+
}>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
export const StyledPopup = styled.span`
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
position: relative;
|
|
5
|
+
display: flex;
|
|
6
|
+
width: fit-content;
|
|
7
|
+
height: fit-content;
|
|
8
|
+
`;
|
|
9
|
+
export const StyledPopupPseudo = styled.div`
|
|
10
|
+
top: ${_ref => {
|
|
11
|
+
let {
|
|
12
|
+
$menuHeight
|
|
13
|
+
} = _ref;
|
|
14
|
+
return `${$menuHeight - 0}px`;
|
|
15
|
+
}};
|
|
16
|
+
left: 0;
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
visibility: hidden;
|
|
19
|
+
position: absolute;
|
|
20
|
+
`;
|
|
21
|
+
//# sourceMappingURL=Popup.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popup.styles.js","names":["styled","StyledPopup","span","StyledPopupPseudo","div","_ref","$menuHeight"],"sources":["../../../src/components/popup/Popup.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledPopup = styled.span`\n cursor: pointer;\n position: relative;\n display: flex;\n width: fit-content;\n height: fit-content;\n`;\n\nexport const StyledPopupPseudo = styled.div<{\n $menuHeight: number;\n}>`\n top: ${({ $menuHeight }) => `${$menuHeight - 0}px`};\n left: 0;\n pointer-events: none;\n visibility: hidden;\n position: absolute;\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,OAAO,MAAMC,WAAW,GAAGD,MAAM,CAACE,IAAK;AACvC;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,iBAAiB,GAAGH,MAAM,CAACI,GAErC;AACH,WAAWC,IAAA;EAAA,IAAC;IAAEC;EAAY,CAAC,GAAAD,IAAA;EAAA,OAAM,GAAEC,WAAW,GAAG,CAAE,IAAG;AAAA,CAAC;AACvD;AACA;AACA;AACA;AACA,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { ReactNode, type MouseEventHandler } from 'react';
|
|
2
|
+
import { PopupAlignment, PopupCoordinates } from '../../../types/popup';
|
|
3
|
+
type PopupContentProps = {
|
|
4
|
+
alignment: PopupAlignment;
|
|
5
|
+
coordinates: PopupCoordinates;
|
|
6
|
+
content: ReactNode;
|
|
7
|
+
onMouseLeave: MouseEventHandler<HTMLSpanElement>;
|
|
8
|
+
};
|
|
9
|
+
declare const PopupContent: React.ForwardRefExoticComponent<PopupContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default PopupContent;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { useSite } from 'chayns-api';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PopupAlignment } from '../../../types/popup';
|
|
4
|
+
import { StyledMotionPopupContent, StyledPopupContentInner } from './PopupContent.styles';
|
|
5
|
+
const PopupContent = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
6
|
+
let {
|
|
7
|
+
alignment,
|
|
8
|
+
coordinates,
|
|
9
|
+
content,
|
|
10
|
+
onMouseLeave
|
|
11
|
+
} = _ref;
|
|
12
|
+
const {
|
|
13
|
+
colorMode
|
|
14
|
+
} = useSite();
|
|
15
|
+
const isBottomLeftAlignment = alignment === PopupAlignment.BottomLeft;
|
|
16
|
+
const isTopLeftAlignment = alignment === PopupAlignment.TopLeft;
|
|
17
|
+
const isTopRightAlignment = alignment === PopupAlignment.TopRight;
|
|
18
|
+
const percentageOffsetX = isBottomLeftAlignment || isTopLeftAlignment ? -100 : 0;
|
|
19
|
+
const percentageOffsetY = isTopRightAlignment || isTopLeftAlignment ? -100 : 0;
|
|
20
|
+
const anchorOffsetX = isBottomLeftAlignment || isTopLeftAlignment ? 21 : -21;
|
|
21
|
+
const anchorOffsetY = isTopRightAlignment || isTopLeftAlignment ? -21 : 21;
|
|
22
|
+
const exitAndInitialY = isTopLeftAlignment || isTopRightAlignment ? -16 : 16;
|
|
23
|
+
return /*#__PURE__*/React.createElement(StyledMotionPopupContent, {
|
|
24
|
+
animate: {
|
|
25
|
+
opacity: 1,
|
|
26
|
+
y: 0
|
|
27
|
+
},
|
|
28
|
+
$colorMode: colorMode,
|
|
29
|
+
exit: {
|
|
30
|
+
opacity: 0,
|
|
31
|
+
y: exitAndInitialY
|
|
32
|
+
},
|
|
33
|
+
initial: {
|
|
34
|
+
opacity: 0,
|
|
35
|
+
y: exitAndInitialY
|
|
36
|
+
},
|
|
37
|
+
$position: alignment,
|
|
38
|
+
ref: ref,
|
|
39
|
+
"data-ispopup": "true",
|
|
40
|
+
onMouseLeave: onMouseLeave,
|
|
41
|
+
style: {
|
|
42
|
+
left: coordinates.x,
|
|
43
|
+
top: coordinates.y
|
|
44
|
+
},
|
|
45
|
+
transition: {
|
|
46
|
+
type: 'tween'
|
|
47
|
+
},
|
|
48
|
+
transformTemplate: _ref2 => {
|
|
49
|
+
let {
|
|
50
|
+
y = '0px'
|
|
51
|
+
} = _ref2;
|
|
52
|
+
return `
|
|
53
|
+
translateX(${percentageOffsetX}%)
|
|
54
|
+
translateY(${percentageOffsetY}%)
|
|
55
|
+
translateX(${anchorOffsetX}px)
|
|
56
|
+
translateY(${anchorOffsetY}px)
|
|
57
|
+
translateY(${y})
|
|
58
|
+
`;
|
|
59
|
+
}
|
|
60
|
+
}, /*#__PURE__*/React.createElement(StyledPopupContentInner, null, content));
|
|
61
|
+
});
|
|
62
|
+
PopupContent.displayName = 'PopupContent';
|
|
63
|
+
export default PopupContent;
|
|
64
|
+
//# sourceMappingURL=PopupContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopupContent.js","names":["useSite","React","PopupAlignment","StyledMotionPopupContent","StyledPopupContentInner","PopupContent","forwardRef","_ref","ref","alignment","coordinates","content","onMouseLeave","colorMode","isBottomLeftAlignment","BottomLeft","isTopLeftAlignment","TopLeft","isTopRightAlignment","TopRight","percentageOffsetX","percentageOffsetY","anchorOffsetX","anchorOffsetY","exitAndInitialY","createElement","animate","opacity","y","$colorMode","exit","initial","$position","style","left","x","top","transition","type","transformTemplate","_ref2","displayName"],"sources":["../../../../src/components/popup/popup-content/PopupContent.tsx"],"sourcesContent":["import { useSite } from 'chayns-api';\nimport React, { ReactNode, type MouseEventHandler } from 'react';\nimport { PopupAlignment, PopupCoordinates } from '../../../types/popup';\nimport { StyledMotionPopupContent, StyledPopupContentInner } from './PopupContent.styles';\n\ntype PopupContentProps = {\n alignment: PopupAlignment;\n coordinates: PopupCoordinates;\n content: ReactNode;\n onMouseLeave: MouseEventHandler<HTMLSpanElement>;\n};\n\nconst PopupContent = React.forwardRef<HTMLDivElement, PopupContentProps>(\n ({ alignment, coordinates, content, onMouseLeave }, ref) => {\n const { colorMode } = useSite();\n\n const isBottomLeftAlignment = alignment === PopupAlignment.BottomLeft;\n const isTopLeftAlignment = alignment === PopupAlignment.TopLeft;\n const isTopRightAlignment = alignment === PopupAlignment.TopRight;\n\n const percentageOffsetX = isBottomLeftAlignment || isTopLeftAlignment ? -100 : 0;\n const percentageOffsetY = isTopRightAlignment || isTopLeftAlignment ? -100 : 0;\n\n const anchorOffsetX = isBottomLeftAlignment || isTopLeftAlignment ? 21 : -21;\n const anchorOffsetY = isTopRightAlignment || isTopLeftAlignment ? -21 : 21;\n\n const exitAndInitialY = isTopLeftAlignment || isTopRightAlignment ? -16 : 16;\n\n return (\n <StyledMotionPopupContent\n animate={{ opacity: 1, y: 0 }}\n $colorMode={colorMode}\n exit={{ opacity: 0, y: exitAndInitialY }}\n initial={{ opacity: 0, y: exitAndInitialY }}\n $position={alignment}\n ref={ref}\n data-ispopup=\"true\"\n onMouseLeave={onMouseLeave}\n style={{ left: coordinates.x, top: coordinates.y }}\n transition={{ type: 'tween' }}\n transformTemplate={({ y = '0px' }) => `\n translateX(${percentageOffsetX}%)\n translateY(${percentageOffsetY}%)\n translateX(${anchorOffsetX}px)\n translateY(${anchorOffsetY}px)\n translateY(${y})\n `}\n >\n <StyledPopupContentInner>{content}</StyledPopupContentInner>\n </StyledMotionPopupContent>\n );\n },\n);\n\nPopupContent.displayName = 'PopupContent';\n\nexport default PopupContent;\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,YAAY;AACpC,OAAOC,KAAK,MAA6C,OAAO;AAChE,SAASC,cAAc,QAA0B,sBAAsB;AACvE,SAASC,wBAAwB,EAAEC,uBAAuB,QAAQ,uBAAuB;AASzF,MAAMC,YAAY,gBAAGJ,KAAK,CAACK,UAAU,CACjC,CAAAC,IAAA,EAAoDC,GAAG,KAAK;EAAA,IAA3D;IAAEC,SAAS;IAAEC,WAAW;IAAEC,OAAO;IAAEC;EAAa,CAAC,GAAAL,IAAA;EAC9C,MAAM;IAAEM;EAAU,CAAC,GAAGb,OAAO,CAAC,CAAC;EAE/B,MAAMc,qBAAqB,GAAGL,SAAS,KAAKP,cAAc,CAACa,UAAU;EACrE,MAAMC,kBAAkB,GAAGP,SAAS,KAAKP,cAAc,CAACe,OAAO;EAC/D,MAAMC,mBAAmB,GAAGT,SA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