@pareto-engineering/design-system 4.0.0-alpha.9 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/preview.js +29 -12
- package/dist/cjs/a/AnimatedBlobs/AnimatedBlobs.js +6 -7
- package/dist/cjs/a/AnimatedGradient/AnimatedGradient.js +15 -12
- package/dist/cjs/a/AnimatedGradient/styles.scss +2 -1
- package/dist/cjs/a/AnimatedGradient/webGIRenderer.js +0 -1
- package/dist/cjs/a/AppContext/Context.js +3 -4
- package/dist/cjs/a/AppContext/ContextProvider.js +6 -6
- package/dist/cjs/a/AppContext/useTheme.js +2 -7
- package/dist/cjs/a/BlurOverlay/BlurOverlay.js +58 -0
- package/dist/cjs/{r/common/PrivateRoute → a/BlurOverlay}/index.js +3 -3
- package/dist/cjs/a/BlurOverlay/styles.scss +33 -0
- package/dist/cjs/a/ContentTree/ContentTree.js +16 -9
- package/dist/cjs/a/ContentTree/common/Tree/Tree.js +20 -13
- package/dist/cjs/a/ContentTree/common/useContentTree.js +1 -2
- package/dist/cjs/a/ContentTree/common/useFirstVisibleNode.js +1 -2
- package/dist/cjs/a/ContentTree/styles.scss +34 -11
- package/dist/cjs/a/Conversation/Context.js +3 -4
- package/dist/cjs/a/Conversation/Conversation.js +18 -22
- package/dist/cjs/a/Conversation/common/Message/Message.js +18 -16
- package/dist/cjs/a/Conversation/styles.scss +56 -124
- package/dist/cjs/a/DatePicker/DatePicker.js +162 -0
- package/dist/cjs/a/DatePicker/index.js +13 -0
- package/dist/cjs/a/DatePicker/styles.scss +380 -0
- package/dist/cjs/a/DotInfo/DotInfo.js +6 -7
- package/dist/cjs/a/Figure/Figure.js +6 -7
- package/dist/cjs/a/HamburgerButton/HamburgerButton.js +5 -8
- package/dist/cjs/a/IconList/IconList.js +5 -8
- package/dist/cjs/a/IconList/common/Item/Item.js +4 -5
- package/dist/cjs/a/Label/Label.js +5 -8
- package/dist/cjs/a/Label/styles.scss +5 -5
- package/dist/cjs/a/LoadingCircle/LoadingCircle.js +6 -7
- package/dist/cjs/a/MetaCard/MetaCard.js +14 -10
- package/dist/cjs/a/MetaCard/styles.scss +18 -1
- package/dist/cjs/a/People/People.js +8 -7
- package/dist/cjs/a/People/common/Person/Person.js +15 -11
- package/dist/cjs/a/People/styles.scss +10 -4
- package/dist/cjs/a/Popover/Popover.js +12 -10
- package/dist/cjs/a/Popover/styles.scss +1 -1
- package/dist/cjs/a/ProgressBar/ProgressBar.js +9 -10
- package/dist/cjs/a/ProgressBar/styles.scss +11 -1
- package/dist/cjs/a/Quote/Quote.js +21 -12
- package/dist/cjs/a/Quote/styles.scss +16 -37
- package/dist/cjs/a/Removable/Removable.js +71 -0
- package/dist/cjs/{c/ContentSlides/common/Navigator → a/Removable}/index.js +3 -3
- package/dist/cjs/a/Removable/styles.scss +33 -0
- package/dist/cjs/a/SVG/SVG.js +8 -10
- package/dist/cjs/a/SVG/common/UseSVG/UseSVG.js +3 -4
- package/dist/cjs/a/SnapScroller/SnapScroller.js +40 -14
- package/dist/cjs/a/SnapScroller/styles.scss +32 -3
- package/dist/cjs/a/Spinner/Spinner.js +6 -7
- package/dist/cjs/a/TextSteps/TextSteps.js +7 -10
- package/dist/cjs/a/TextSteps/styles.scss +1 -1
- package/dist/cjs/a/Timestamp/Timestamp.js +12 -12
- package/dist/cjs/a/Tip/Tip.js +25 -12
- package/dist/cjs/a/Tip/styles.scss +7 -13
- package/dist/cjs/a/ToggleSwitch/ToggleSwitch.js +81 -0
- package/dist/cjs/a/ToggleSwitch/index.js +13 -0
- package/dist/cjs/a/ToggleSwitch/styles.scss +51 -0
- package/dist/cjs/a/Tooltip/Tooltip.js +87 -0
- package/dist/cjs/{c/ContentSlides/common/Sidebar → a/Tooltip}/index.js +3 -3
- package/dist/cjs/a/Tooltip/styles.scss +61 -0
- package/dist/cjs/a/XMLEditor/XMLEditor.js +137 -0
- package/dist/cjs/{c/ContentSlides/common/Slide → a/XMLEditor/common}/index.js +3 -3
- package/dist/cjs/a/XMLEditor/common/theme.js +186 -0
- package/dist/cjs/a/XMLEditor/index.js +13 -0
- package/dist/cjs/a/XMLEditor/styles.scss +24 -0
- package/dist/cjs/a/index.js +43 -1
- package/dist/cjs/b/Button/Button.js +24 -15
- package/dist/cjs/b/Button/common/Group/Group.js +54 -0
- package/dist/cjs/b/Button/common/Group/index.js +13 -0
- package/dist/cjs/b/Button/common/Group/styles.scss +11 -0
- package/dist/cjs/b/Button/common/index.js +12 -0
- package/dist/cjs/b/Button/styles.scss +39 -11
- package/dist/cjs/b/Card/Card.js +6 -7
- package/dist/cjs/b/Card/common/Group/Group.js +6 -9
- package/dist/cjs/b/Card/common/Group/styles.scss +0 -7
- package/dist/cjs/b/Card/common/Section/Section.js +4 -5
- package/dist/cjs/b/Card/styles.scss +11 -0
- package/dist/cjs/b/Logo/Logo.js +9 -10
- package/dist/cjs/b/Page/Context.js +3 -4
- package/dist/cjs/b/Page/Page.js +13 -13
- package/dist/cjs/b/Page/common/PageHelmet/PageHelmet.js +21 -8
- package/dist/cjs/b/Page/common/Section/Section.js +12 -8
- package/dist/cjs/b/Page/styles.scss +5 -2
- package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +10 -9
- package/dist/cjs/b/SocialMediaButton/styles.scss +0 -14
- package/dist/cjs/b/ThemeSelector/ThemeSelector.js +19 -35
- package/dist/cjs/b/ThemeSelector/styles.scss +44 -6
- package/dist/cjs/b/Title/Title.js +4 -12
- package/dist/cjs/c/Modal/Modal.js +7 -8
- package/dist/cjs/c/Modal/common/ModalHeader/ModalHeader.js +4 -5
- package/dist/cjs/c/Modal/styles.scss +7 -12
- package/dist/cjs/c/Shortener/Shortener.js +11 -9
- package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +6 -9
- package/dist/cjs/c/index.js +0 -13
- package/dist/cjs/f/FormInput/FormInput.js +19 -9
- package/dist/cjs/f/common/Debugger/Debugger.js +10 -10
- package/dist/cjs/f/common/Description/Description.js +11 -11
- package/dist/cjs/f/common/Description/styles.scss +1 -2
- package/dist/cjs/f/common/Label/Label.js +7 -9
- package/dist/cjs/f/common/Label/styles.scss +3 -2
- package/dist/cjs/f/common/index.js +18 -1
- package/dist/cjs/f/common/utils/index.js +12 -0
- package/dist/cjs/f/common/utils/lookUpInputValueFromFetchedOptions.js +29 -0
- package/dist/cjs/f/fields/Checkbox/Checkbox.js +31 -14
- package/dist/cjs/f/fields/Checkbox/styles.scss +5 -4
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +42 -34
- package/dist/cjs/f/fields/ChoicesInput/common/Choice/Choice.js +5 -6
- package/dist/cjs/f/fields/ChoicesInput/styles.scss +32 -8
- package/dist/cjs/f/fields/EditorInput/EditorInput.js +236 -0
- package/dist/cjs/f/fields/EditorInput/common/BlockFormatDropDown/BlockFormatDropDown.js +256 -0
- package/dist/cjs/f/fields/EditorInput/common/BlockFormatDropDown/index.js +13 -0
- package/dist/cjs/f/fields/EditorInput/common/BlockFormatDropDown/styles.scss +55 -0
- package/dist/cjs/f/fields/EditorInput/common/ColorPicker/ColorPicker.js +98 -0
- package/dist/cjs/f/fields/EditorInput/common/ColorPicker/index.js +13 -0
- package/dist/cjs/f/fields/EditorInput/common/ColorPicker/styles.scss +36 -0
- package/dist/cjs/f/fields/EditorInput/common/FontSizeDropDown/FontSizeDropDown.js +94 -0
- package/dist/cjs/f/fields/EditorInput/common/FontSizeDropDown/index.js +13 -0
- package/dist/cjs/f/fields/EditorInput/common/FontSizeDropDown/styles.scss +55 -0
- package/dist/cjs/f/fields/EditorInput/common/StopPropagationPlugin.js +30 -0
- package/dist/cjs/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.js +289 -0
- package/dist/cjs/f/fields/EditorInput/common/ToolbarPlugin/index.js +13 -0
- package/dist/cjs/f/fields/EditorInput/common/ToolbarPlugin/styles.scss +56 -0
- package/dist/cjs/f/fields/EditorInput/common/TreeViewPlugin.js +18 -0
- package/dist/cjs/f/fields/EditorInput/common/index.js +48 -0
- package/dist/cjs/f/fields/EditorInput/index.js +13 -0
- package/dist/cjs/f/fields/EditorInput/styles.scss +240 -0
- package/dist/cjs/f/fields/LinkInput/LinkInput.js +152 -0
- package/dist/cjs/f/fields/LinkInput/index.js +13 -0
- package/dist/cjs/f/fields/LinkInput/styles.scss +90 -0
- package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +9 -9
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +45 -16
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +65 -27
- package/dist/cjs/f/fields/QueryCombobox/common/Menu/Menu.js +4 -5
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +88 -37
- package/dist/cjs/f/fields/QueryCombobox/styles.scss +69 -27
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +15 -9
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +20 -18
- package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +8 -9
- package/dist/cjs/f/fields/RatingsInput/styles.scss +7 -10
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +52 -50
- package/dist/cjs/f/fields/SelectInput/common/Menu/Menu.js +83 -0
- package/dist/cjs/f/fields/SelectInput/common/Menu/index.js +13 -0
- package/dist/cjs/f/fields/SelectInput/common/Multiple/Multiple.js +242 -0
- package/dist/cjs/f/fields/SelectInput/common/Multiple/index.js +13 -0
- package/dist/cjs/f/fields/SelectInput/common/Single/Single.js +115 -0
- package/dist/cjs/f/fields/SelectInput/common/Single/index.js +13 -0
- package/dist/cjs/f/fields/SelectInput/common/index.js +26 -0
- package/dist/cjs/f/fields/SelectInput/styles.scss +163 -32
- package/dist/cjs/f/fields/TextInput/TextInput.js +32 -26
- package/dist/cjs/f/fields/TextInput/styles.scss +59 -22
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +17 -23
- package/dist/cjs/f/fields/TextareaInput/styles.scss +33 -13
- package/dist/cjs/f/fields/index.js +15 -1
- package/dist/cjs/form.scss +1 -1
- package/dist/cjs/g/DragAndDrop/DragAndDrop.js +97 -0
- package/dist/cjs/g/DragAndDrop/common/DraggableItem/DraggableItem.js +80 -0
- package/dist/cjs/g/DragAndDrop/common/DraggableItem/index.js +13 -0
- package/dist/cjs/g/DragAndDrop/common/DraggableItem/styles.scss +12 -0
- package/dist/cjs/g/DragAndDrop/common/index.js +12 -0
- package/dist/cjs/g/DragAndDrop/index.js +13 -0
- package/dist/cjs/g/DragAndDrop/styles.scss +8 -0
- package/dist/cjs/g/ExpandableLexicalPreview/ExpandableLexicalPreview.js +137 -0
- package/dist/cjs/g/ExpandableLexicalPreview/common/NewWindowPortal/NewWindowPortal.js +79 -0
- package/dist/cjs/g/ExpandableLexicalPreview/common/NewWindowPortal/index.js +13 -0
- package/dist/cjs/g/ExpandableLexicalPreview/common/NewWindowPortal/styles.scss +9 -0
- package/dist/cjs/g/ExpandableLexicalPreview/common/index.js +12 -0
- package/dist/cjs/g/ExpandableLexicalPreview/index.js +13 -0
- package/dist/cjs/g/ExpandableLexicalPreview/styles.scss +34 -0
- package/dist/cjs/g/index.js +19 -0
- package/dist/cjs/index.js +11 -11
- package/dist/cjs/test/QueryLoader/QueryLoader.js +9 -7
- package/dist/cjs/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +0 -1
- package/dist/cjs/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +3 -4
- package/dist/cjs/utils/hooks/index.js +7 -0
- package/dist/cjs/utils/hooks/useDynamicPosition.js +1 -2
- package/dist/cjs/utils/hooks/useOutsideClick.js +25 -0
- package/dist/cjs/utils/hooks/useWindowSize.js +1 -2
- package/dist/cjs/utils/index.js +6 -0
- package/dist/es/a/AnimatedBlobs/AnimatedBlobs.js +18 -23
- package/dist/es/a/AnimatedGradient/AnimatedGradient.js +8 -7
- package/dist/es/a/AnimatedGradient/styles.scss +2 -1
- package/dist/es/a/AnimatedGradient/webGIRenderer.js +0 -1
- package/dist/es/a/AppContext/useTheme.js +0 -4
- package/dist/es/a/BlurOverlay/BlurOverlay.js +45 -0
- package/dist/es/a/BlurOverlay/index.js +2 -0
- package/dist/es/a/BlurOverlay/styles.scss +33 -0
- package/dist/es/a/ContentTree/ContentTree.js +9 -6
- package/dist/es/a/ContentTree/common/Tree/Tree.js +12 -5
- package/dist/es/a/ContentTree/styles.scss +34 -11
- package/dist/es/a/Conversation/Conversation.js +18 -28
- package/dist/es/a/Conversation/common/Message/Message.js +15 -12
- package/dist/es/a/Conversation/styles.scss +56 -124
- package/dist/es/a/DatePicker/DatePicker.js +154 -0
- package/dist/es/a/DatePicker/index.js +2 -0
- package/dist/es/a/DatePicker/styles.scss +380 -0
- package/dist/es/a/DotInfo/DotInfo.js +9 -15
- package/dist/es/a/Figure/Figure.js +10 -15
- package/dist/es/a/HamburgerButton/HamburgerButton.js +13 -18
- package/dist/es/a/IconList/IconList.js +10 -15
- package/dist/es/a/Label/Label.js +6 -11
- package/dist/es/a/Label/styles.scss +5 -5
- package/dist/es/a/LoadingCircle/LoadingCircle.js +32 -37
- package/dist/es/a/MetaCard/MetaCard.js +13 -13
- package/dist/es/a/MetaCard/styles.scss +18 -1
- package/dist/es/a/People/People.js +11 -16
- package/dist/es/a/People/common/Person/Person.js +25 -18
- package/dist/es/a/People/styles.scss +10 -4
- package/dist/es/a/Popover/Popover.js +3 -5
- package/dist/es/a/Popover/styles.scss +1 -1
- package/dist/es/a/ProgressBar/ProgressBar.js +14 -19
- package/dist/es/a/ProgressBar/styles.scss +11 -1
- package/dist/es/a/Quote/Quote.js +25 -20
- package/dist/es/a/Quote/styles.scss +16 -37
- package/dist/es/a/Removable/Removable.js +59 -0
- package/dist/es/a/Removable/index.js +2 -0
- package/dist/es/a/Removable/styles.scss +33 -0
- package/dist/es/a/SVG/SVG.js +2 -4
- package/dist/es/a/SnapScroller/SnapScroller.js +34 -10
- package/dist/es/a/SnapScroller/styles.scss +32 -3
- package/dist/es/a/Spinner/Spinner.js +9 -14
- package/dist/es/a/TextSteps/TextSteps.js +16 -21
- package/dist/es/a/TextSteps/styles.scss +1 -1
- package/dist/es/a/Timestamp/Timestamp.js +3 -5
- package/dist/es/a/Tip/Tip.js +24 -15
- package/dist/es/a/Tip/styles.scss +7 -13
- package/dist/es/a/ToggleSwitch/ToggleSwitch.js +69 -0
- package/dist/es/a/ToggleSwitch/index.js +2 -0
- package/dist/es/a/ToggleSwitch/styles.scss +51 -0
- package/dist/es/a/Tooltip/Tooltip.js +75 -0
- package/{src/ui/c/ContentSlides/common/Sidebar → dist/es/a/Tooltip}/index.js +1 -1
- package/dist/es/a/Tooltip/styles.scss +61 -0
- package/dist/es/a/XMLEditor/XMLEditor.js +126 -0
- package/dist/es/a/XMLEditor/common/index.js +1 -0
- package/dist/es/a/XMLEditor/common/theme.js +180 -0
- package/dist/es/a/XMLEditor/index.js +1 -0
- package/dist/es/a/XMLEditor/styles.scss +24 -0
- package/dist/es/a/index.js +7 -1
- package/dist/es/b/Button/Button.js +20 -10
- package/dist/es/b/Button/common/Group/Group.js +44 -0
- package/dist/es/b/Button/common/Group/index.js +1 -0
- package/dist/es/b/Button/common/Group/styles.scss +11 -0
- package/dist/es/b/Button/common/index.js +1 -0
- package/dist/es/b/Button/styles.scss +39 -11
- package/dist/es/b/Card/Card.js +11 -16
- package/dist/es/b/Card/common/Group/Group.js +2 -5
- package/dist/es/b/Card/common/Group/styles.scss +0 -7
- package/dist/es/b/Card/styles.scss +11 -0
- package/dist/es/b/Logo/Logo.js +2 -5
- package/dist/es/b/Page/Page.js +7 -7
- package/dist/es/b/Page/common/PageHelmet/PageHelmet.js +15 -2
- package/dist/es/b/Page/common/Section/Section.js +8 -3
- package/dist/es/b/Page/styles.scss +5 -2
- package/dist/es/b/SocialMediaButton/SocialMediaButton.js +6 -5
- package/dist/es/b/SocialMediaButton/styles.scss +0 -14
- package/dist/es/b/ThemeSelector/ThemeSelector.js +13 -32
- package/dist/es/b/ThemeSelector/styles.scss +44 -6
- package/dist/es/b/Title/Title.js +11 -21
- package/dist/es/c/Modal/Modal.js +14 -19
- package/dist/es/c/Modal/common/ModalHeader/ModalHeader.js +1 -1
- package/dist/es/c/Modal/styles.scss +7 -12
- package/dist/es/c/Shortener/Shortener.js +2 -4
- package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +1 -6
- package/dist/es/c/index.js +0 -1
- package/dist/es/f/FormInput/FormInput.js +15 -5
- package/dist/es/f/common/Debugger/Debugger.js +2 -4
- package/dist/es/f/common/Description/Description.js +6 -8
- package/dist/es/f/common/Description/styles.scss +1 -2
- package/dist/es/f/common/Label/Label.js +8 -15
- package/dist/es/f/common/Label/styles.scss +3 -2
- package/dist/es/f/common/index.js +2 -1
- package/dist/es/f/common/utils/index.js +1 -0
- package/dist/es/f/common/utils/lookUpInputValueFromFetchedOptions.js +20 -0
- package/dist/es/f/fields/Checkbox/Checkbox.js +27 -9
- package/dist/es/f/fields/Checkbox/styles.scss +5 -4
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +52 -46
- package/dist/es/f/fields/ChoicesInput/common/Choice/Choice.js +1 -1
- package/dist/es/f/fields/ChoicesInput/styles.scss +32 -8
- package/dist/es/f/fields/EditorInput/EditorInput.js +225 -0
- package/dist/es/f/fields/EditorInput/common/BlockFormatDropDown/BlockFormatDropDown.js +246 -0
- package/dist/es/f/fields/EditorInput/common/BlockFormatDropDown/index.js +2 -0
- package/dist/es/f/fields/EditorInput/common/BlockFormatDropDown/styles.scss +55 -0
- package/dist/es/f/fields/EditorInput/common/ColorPicker/ColorPicker.js +87 -0
- package/dist/es/f/fields/EditorInput/common/ColorPicker/index.js +2 -0
- package/dist/es/f/fields/EditorInput/common/ColorPicker/styles.scss +36 -0
- package/dist/es/f/fields/EditorInput/common/FontSizeDropDown/FontSizeDropDown.js +81 -0
- package/dist/es/f/fields/EditorInput/common/FontSizeDropDown/index.js +2 -0
- package/dist/es/f/fields/EditorInput/common/FontSizeDropDown/styles.scss +55 -0
- package/dist/es/f/fields/EditorInput/common/StopPropagationPlugin.js +23 -0
- package/dist/es/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.js +277 -0
- package/dist/es/f/fields/EditorInput/common/ToolbarPlugin/index.js +2 -0
- package/dist/es/f/fields/EditorInput/common/ToolbarPlugin/styles.scss +56 -0
- package/dist/es/f/fields/EditorInput/common/TreeViewPlugin.js +11 -0
- package/dist/es/f/fields/EditorInput/common/index.js +6 -0
- package/dist/es/f/fields/EditorInput/index.js +2 -0
- package/dist/es/f/fields/EditorInput/styles.scss +240 -0
- package/dist/es/f/fields/LinkInput/LinkInput.js +146 -0
- package/dist/es/f/fields/LinkInput/index.js +2 -0
- package/dist/es/f/fields/LinkInput/styles.scss +90 -0
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +35 -10
- package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +56 -18
- package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +78 -27
- package/dist/es/f/fields/QueryCombobox/styles.scss +69 -27
- package/dist/es/f/fields/QuerySelect/QuerySelect.js +7 -1
- package/dist/es/f/fields/RatingsInput/RatingsInput.js +11 -14
- package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +4 -4
- package/dist/es/f/fields/RatingsInput/styles.scss +7 -10
- package/dist/es/f/fields/SelectInput/SelectInput.js +46 -46
- package/dist/es/f/fields/SelectInput/common/Menu/Menu.js +73 -0
- package/{src/ui/c/ContentSlides/common/Slide → dist/es/f/fields/SelectInput/common/Menu}/index.js +1 -1
- package/dist/es/f/fields/SelectInput/common/Multiple/Multiple.js +233 -0
- package/dist/es/f/fields/SelectInput/common/Multiple/index.js +2 -0
- package/dist/es/f/fields/SelectInput/common/Single/Single.js +107 -0
- package/dist/es/{c/ContentSlides/common/Sidebar → f/fields/SelectInput/common/Single}/index.js +1 -1
- package/dist/es/f/fields/SelectInput/common/index.js +3 -0
- package/dist/es/f/fields/SelectInput/styles.scss +163 -32
- package/dist/es/f/fields/TextInput/TextInput.js +27 -19
- package/dist/es/f/fields/TextInput/styles.scss +59 -22
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +12 -18
- package/dist/es/f/fields/TextareaInput/styles.scss +33 -13
- package/dist/es/f/fields/index.js +3 -1
- package/dist/es/form.scss +1 -1
- package/dist/es/g/DragAndDrop/DragAndDrop.js +88 -0
- package/dist/es/g/DragAndDrop/common/DraggableItem/DraggableItem.js +72 -0
- package/dist/es/g/DragAndDrop/common/DraggableItem/index.js +2 -0
- package/dist/es/g/DragAndDrop/common/DraggableItem/styles.scss +12 -0
- package/dist/es/g/DragAndDrop/common/index.js +1 -0
- package/dist/es/g/DragAndDrop/index.js +2 -0
- package/dist/es/g/DragAndDrop/styles.scss +8 -0
- package/dist/es/g/ExpandableLexicalPreview/ExpandableLexicalPreview.js +126 -0
- package/dist/es/g/ExpandableLexicalPreview/common/NewWindowPortal/NewWindowPortal.js +70 -0
- package/dist/es/g/ExpandableLexicalPreview/common/NewWindowPortal/index.js +2 -0
- package/dist/es/g/ExpandableLexicalPreview/common/NewWindowPortal/styles.scss +9 -0
- package/dist/es/g/ExpandableLexicalPreview/common/index.js +1 -0
- package/dist/es/g/ExpandableLexicalPreview/index.js +2 -0
- package/dist/es/g/ExpandableLexicalPreview/styles.scss +34 -0
- package/dist/es/g/index.js +2 -0
- package/dist/es/index.js +1 -1
- package/dist/es/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +0 -1
- package/dist/es/utils/hooks/index.js +2 -1
- package/dist/es/utils/hooks/useOutsideClick.js +19 -0
- package/dist/es/utils/index.js +1 -1
- package/package.json +20 -5
- package/src/stories/StyleGuide/ai-icons.stories.mdx +27 -0
- package/src/stories/StyleGuide/icons.stories.mdx +22 -22
- package/src/stories/a/AppContext.stories.jsx +4 -2
- package/src/stories/a/BlurOverlay.stories.jsx +39 -0
- package/src/stories/a/Conversation.stories.jsx +11 -42
- package/src/stories/a/DatePicker.stories.jsx +96 -0
- package/src/stories/a/People.stories.jsx +22 -2
- package/src/stories/a/ProgressBar.stories.jsx +1 -1
- package/src/stories/a/Quote.stories.jsx +30 -10
- package/src/stories/a/Removable.stories.jsx +22 -0
- package/src/stories/a/SnapScroller.stories.jsx +2 -2
- package/src/stories/a/Spinner.stories.jsx +1 -1
- package/src/stories/a/Tip.stories.jsx +3 -2
- package/src/stories/a/ToggleSwitch.stories.jsx +22 -0
- package/src/stories/a/Tooltip.stories.jsx +75 -0
- package/src/stories/a/XMLEditor.stories.jsx +26 -0
- package/src/stories/b/{Button.stories.jsx → Button/Button.stories.jsx} +18 -0
- package/src/stories/b/Button/Group.stories.jsx +35 -0
- package/src/stories/b/SocialMediaButton.stories.jsx +4 -2
- package/src/stories/b/ThemeSelector.stories.jsx +1 -5
- package/src/stories/b/Title.stories.jsx +1 -1
- package/src/stories/colors.js +26 -28
- package/src/stories/f/Checkbox.stories.jsx +9 -2
- package/src/stories/f/ChoicesInput.stories.jsx +13 -14
- package/src/stories/f/EditorInput.stories.jsx +81 -0
- package/src/stories/f/LinkInput.stories.jsx +93 -0
- package/src/stories/f/QueryChoices.stories.jsx +13 -4
- package/src/stories/f/QueryCombobox.stories.jsx +57 -13
- package/src/stories/f/QuerySelect.stories.jsx +13 -5
- package/src/stories/f/RatingsInput.stories.jsx +9 -2
- package/src/stories/f/SelectInput.stories.jsx +46 -7
- package/src/stories/f/TextInput.stories.jsx +15 -1
- package/src/stories/f/TextareaInput.stories.jsx +9 -2
- package/src/stories/g/DragAndDrop.stories.jsx +114 -0
- package/src/stories/g/ExpandableLexicalPreview.stories.jsx +37 -0
- package/src/ui/a/AnimatedBlobs/AnimatedBlobs.jsx +25 -31
- package/src/ui/a/AnimatedGradient/AnimatedGradient.jsx +7 -6
- package/src/ui/a/AnimatedGradient/styles.scss +2 -1
- package/src/ui/a/AppContext/useTheme.js +0 -4
- package/src/ui/a/BlurOverlay/BlurOverlay.jsx +69 -0
- package/src/ui/a/BlurOverlay/index.js +2 -0
- package/src/ui/a/BlurOverlay/styles.scss +33 -0
- package/src/ui/a/ContentTree/ContentTree.jsx +9 -9
- package/src/ui/a/ContentTree/common/Tree/Tree.jsx +19 -7
- package/src/ui/a/ContentTree/styles.scss +34 -11
- package/src/ui/a/Conversation/Conversation.jsx +34 -44
- package/src/ui/a/Conversation/common/Message/Message.jsx +18 -11
- package/src/ui/a/Conversation/styles.scss +56 -124
- package/src/ui/a/DatePicker/DatePicker.jsx +201 -0
- package/src/ui/a/DatePicker/index.js +2 -0
- package/src/ui/a/DatePicker/styles.scss +380 -0
- package/src/ui/a/DotInfo/DotInfo.jsx +23 -29
- package/src/ui/a/Figure/Figure.jsx +21 -27
- package/src/ui/a/HamburgerButton/HamburgerButton.jsx +27 -33
- package/src/ui/a/IconList/IconList.jsx +22 -28
- package/src/ui/a/Label/Label.jsx +21 -27
- package/src/ui/a/Label/styles.scss +5 -5
- package/src/ui/a/LoadingCircle/LoadingCircle.jsx +43 -49
- package/src/ui/a/MetaCard/MetaCard.jsx +25 -24
- package/src/ui/a/MetaCard/styles.scss +18 -1
- package/src/ui/a/People/People.jsx +25 -31
- package/src/ui/a/People/common/Person/Person.jsx +34 -22
- package/src/ui/a/People/styles.scss +10 -4
- package/src/ui/a/Popover/Popover.jsx +4 -6
- package/src/ui/a/Popover/styles.scss +1 -1
- package/src/ui/a/ProgressBar/ProgressBar.jsx +27 -31
- package/src/ui/a/ProgressBar/styles.scss +11 -1
- package/src/ui/a/Quote/Quote.jsx +38 -37
- package/src/ui/a/Quote/styles.scss +16 -37
- package/src/ui/a/Removable/Removable.jsx +78 -0
- package/src/ui/a/Removable/index.js +2 -0
- package/src/ui/a/Removable/styles.scss +33 -0
- package/src/ui/a/SVG/SVG.jsx +3 -5
- package/src/ui/a/SnapScroller/SnapScroller.jsx +28 -6
- package/src/ui/a/SnapScroller/styles.scss +32 -3
- package/src/ui/a/Spinner/Spinner.jsx +19 -25
- package/src/ui/a/TextSteps/TextSteps.jsx +31 -38
- package/src/ui/a/TextSteps/styles.scss +1 -1
- package/src/ui/a/Timestamp/Timestamp.jsx +5 -7
- package/src/ui/a/Tip/Tip.jsx +39 -28
- package/src/ui/a/Tip/styles.scss +7 -13
- package/src/ui/a/ToggleSwitch/ToggleSwitch.jsx +93 -0
- package/src/ui/a/ToggleSwitch/index.js +2 -0
- package/src/ui/a/ToggleSwitch/styles.scss +51 -0
- package/src/ui/a/Tooltip/Tooltip.jsx +106 -0
- package/src/ui/a/Tooltip/index.js +2 -0
- package/src/ui/a/Tooltip/styles.scss +61 -0
- package/src/ui/a/XMLEditor/XMLEditor.jsx +200 -0
- package/src/ui/a/XMLEditor/common/index.js +1 -0
- package/src/ui/a/XMLEditor/common/theme.jsx +184 -0
- package/src/ui/a/XMLEditor/index.js +1 -0
- package/src/ui/a/XMLEditor/styles.scss +24 -0
- package/src/ui/a/index.js +6 -0
- package/src/ui/b/Button/Button.jsx +25 -10
- package/src/ui/b/Button/common/Group/Group.jsx +65 -0
- package/src/ui/b/Button/common/Group/index.js +1 -0
- package/src/ui/b/Button/common/Group/styles.scss +11 -0
- package/src/ui/b/Button/common/index.js +1 -0
- package/src/ui/b/Button/styles.scss +39 -11
- package/src/ui/b/Card/Card.jsx +25 -31
- package/src/ui/b/Card/common/Group/Group.jsx +3 -6
- package/src/ui/b/Card/common/Group/styles.scss +0 -7
- package/src/ui/b/Card/styles.scss +11 -0
- package/src/ui/b/Logo/Logo.jsx +3 -5
- package/src/ui/b/Page/Page.jsx +5 -6
- package/src/ui/b/Page/common/PageHelmet/PageHelmet.jsx +20 -3
- package/src/ui/b/Page/common/Section/Section.jsx +10 -3
- package/src/ui/b/Page/styles.scss +5 -2
- package/src/ui/b/SocialMediaButton/SocialMediaButton.jsx +7 -8
- package/src/ui/b/SocialMediaButton/styles.scss +0 -14
- package/src/ui/b/ThemeSelector/ThemeSelector.jsx +13 -35
- package/src/ui/b/ThemeSelector/styles.scss +44 -6
- package/src/ui/b/Title/Title.jsx +36 -46
- package/src/ui/c/Modal/Modal.jsx +25 -31
- package/src/ui/c/Modal/common/ModalHeader/ModalHeader.jsx +1 -1
- package/src/ui/c/Modal/styles.scss +7 -12
- package/src/ui/c/Shortener/Shortener.jsx +3 -5
- package/src/ui/c/SocialMediaShareButton/SocialMediaShareButton.jsx +2 -6
- package/src/ui/c/index.js +0 -1
- package/src/ui/f/FormInput/FormInput.jsx +26 -5
- package/src/ui/f/common/Debugger/Debugger.jsx +3 -5
- package/src/ui/f/common/Description/Description.jsx +7 -10
- package/src/ui/f/common/Description/styles.scss +1 -2
- package/src/ui/f/common/Label/Label.jsx +20 -28
- package/src/ui/f/common/Label/styles.scss +3 -2
- package/src/ui/f/common/index.js +1 -0
- package/src/ui/f/common/utils/index.js +1 -0
- package/src/ui/f/common/utils/lookUpInputValueFromFetchedOptions.js +23 -0
- package/src/ui/f/fields/Checkbox/Checkbox.jsx +37 -14
- package/src/ui/f/fields/Checkbox/styles.scss +5 -4
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +78 -66
- package/src/ui/f/fields/ChoicesInput/common/Choice/Choice.jsx +10 -3
- package/src/ui/f/fields/ChoicesInput/styles.scss +32 -8
- package/src/ui/f/fields/EditorInput/EditorInput.jsx +286 -0
- package/src/ui/f/fields/EditorInput/common/BlockFormatDropDown/BlockFormatDropDown.jsx +292 -0
- package/src/ui/f/fields/EditorInput/common/BlockFormatDropDown/index.js +2 -0
- package/src/ui/f/fields/EditorInput/common/BlockFormatDropDown/styles.scss +55 -0
- package/src/ui/f/fields/EditorInput/common/ColorPicker/ColorPicker.jsx +115 -0
- package/src/ui/f/fields/EditorInput/common/ColorPicker/index.js +2 -0
- package/src/ui/f/fields/EditorInput/common/ColorPicker/styles.scss +36 -0
- package/src/ui/f/fields/EditorInput/common/FontSizeDropDown/FontSizeDropDown.jsx +134 -0
- package/src/ui/f/fields/EditorInput/common/FontSizeDropDown/index.js +2 -0
- package/src/ui/f/fields/EditorInput/common/FontSizeDropDown/styles.scss +55 -0
- package/src/ui/f/fields/EditorInput/common/StopPropagationPlugin.jsx +29 -0
- package/src/ui/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.jsx +417 -0
- package/src/ui/f/fields/EditorInput/common/ToolbarPlugin/index.js +2 -0
- package/src/ui/f/fields/EditorInput/common/ToolbarPlugin/styles.scss +56 -0
- package/src/ui/f/fields/EditorInput/common/TreeViewPlugin.jsx +16 -0
- package/src/ui/f/fields/EditorInput/common/index.js +6 -0
- package/src/ui/f/fields/EditorInput/index.js +2 -0
- package/src/ui/f/fields/EditorInput/styles.scss +240 -0
- package/src/ui/f/fields/LinkInput/LinkInput.jsx +185 -0
- package/src/ui/f/fields/LinkInput/index.js +2 -0
- package/src/ui/f/fields/LinkInput/styles.scss +90 -0
- package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +41 -12
- package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +51 -14
- package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +101 -39
- package/src/ui/f/fields/QueryCombobox/styles.scss +69 -27
- package/src/ui/f/fields/QuerySelect/QuerySelect.jsx +8 -1
- package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +13 -18
- package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +4 -4
- package/src/ui/f/fields/RatingsInput/styles.scss +7 -10
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +50 -48
- package/src/ui/f/fields/SelectInput/common/Menu/Menu.jsx +103 -0
- package/{dist/es/c/ContentSlides/common/Slide → src/ui/f/fields/SelectInput/common/Menu}/index.js +1 -1
- package/src/ui/f/fields/SelectInput/common/Multiple/Multiple.jsx +288 -0
- package/src/ui/f/fields/SelectInput/common/Multiple/index.js +2 -0
- package/src/ui/f/fields/SelectInput/common/Single/Single.jsx +139 -0
- package/src/ui/f/fields/SelectInput/common/Single/index.js +2 -0
- package/src/ui/f/fields/SelectInput/common/index.js +3 -0
- package/src/ui/f/fields/SelectInput/styles.scss +163 -32
- package/src/ui/f/fields/TextInput/TextInput.jsx +35 -26
- package/src/ui/f/fields/TextInput/styles.scss +59 -22
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +22 -31
- package/src/ui/f/fields/TextareaInput/styles.scss +33 -13
- package/src/ui/f/fields/index.js +2 -0
- package/src/ui/form.scss +1 -1
- package/src/ui/g/DragAndDrop/DragAndDrop.jsx +118 -0
- package/src/ui/g/DragAndDrop/common/DraggableItem/DraggableItem.jsx +98 -0
- package/src/ui/g/DragAndDrop/common/DraggableItem/index.js +2 -0
- package/src/ui/g/DragAndDrop/common/DraggableItem/styles.scss +12 -0
- package/src/ui/g/DragAndDrop/common/index.js +1 -0
- package/src/ui/g/DragAndDrop/index.js +2 -0
- package/src/ui/g/DragAndDrop/styles.scss +8 -0
- package/src/ui/g/ExpandableLexicalPreview/ExpandableLexicalPreview.jsx +180 -0
- package/src/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/NewWindowPortal.jsx +80 -0
- package/src/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/index.js +2 -0
- package/src/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/styles.scss +9 -0
- package/src/ui/g/ExpandableLexicalPreview/common/index.js +1 -0
- package/src/ui/g/ExpandableLexicalPreview/index.js +2 -0
- package/src/ui/g/ExpandableLexicalPreview/styles.scss +34 -0
- package/src/ui/g/index.js +2 -0
- package/src/ui/index.js +1 -1
- package/src/ui/utils/hooks/index.js +1 -0
- package/src/ui/utils/hooks/useOutsideClick.js +23 -0
- package/src/ui/utils/index.js +1 -1
- package/tests/__snapshots__/Storyshots.test.js.snap +25444 -8784
- package/tests/mockResizeObserver.js +9 -0
- package/tests/test-setup.js +3 -0
- package/dist/cjs/b/Title/styles.scss +0 -16
- package/dist/cjs/c/ContentSlides/ContentSlides.js +0 -172
- package/dist/cjs/c/ContentSlides/Context.js +0 -11
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +0 -127
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/index.js +0 -13
- package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +0 -129
- package/dist/cjs/c/ContentSlides/common/Sidebar/Sidebar.js +0 -95
- package/dist/cjs/c/ContentSlides/common/Slide/Slide.js +0 -76
- package/dist/cjs/c/ContentSlides/common/index.js +0 -33
- package/dist/cjs/c/ContentSlides/index.js +0 -27
- package/dist/cjs/c/ContentSlides/styles.scss +0 -312
- package/dist/cjs/c/ContentSlides/useContentSlides.js +0 -11
- package/dist/cjs/r/SwitchRouteMap/SwitchRouteMap.js +0 -59
- package/dist/cjs/r/SwitchRouteMap/index.js +0 -13
- package/dist/cjs/r/common/PrivateRoute/PrivateRoute.js +0 -75
- package/dist/cjs/r/common/index.js +0 -12
- package/dist/cjs/r/index.js +0 -27
- package/dist/es/b/Title/styles.scss +0 -16
- package/dist/es/c/ContentSlides/ContentSlides.js +0 -162
- package/dist/es/c/ContentSlides/Context.js +0 -2
- package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +0 -116
- package/dist/es/c/ContentSlides/common/HorizontalMenu/index.js +0 -2
- package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +0 -118
- package/dist/es/c/ContentSlides/common/Navigator/index.js +0 -2
- package/dist/es/c/ContentSlides/common/Sidebar/Sidebar.js +0 -84
- package/dist/es/c/ContentSlides/common/Slide/Slide.js +0 -65
- package/dist/es/c/ContentSlides/common/index.js +0 -4
- package/dist/es/c/ContentSlides/index.js +0 -4
- package/dist/es/c/ContentSlides/styles.scss +0 -312
- package/dist/es/c/ContentSlides/useContentSlides.js +0 -3
- package/dist/es/r/SwitchRouteMap/SwitchRouteMap.js +0 -45
- package/dist/es/r/SwitchRouteMap/index.js +0 -2
- package/dist/es/r/common/PrivateRoute/PrivateRoute.js +0 -67
- package/dist/es/r/common/PrivateRoute/index.js +0 -2
- package/dist/es/r/common/index.js +0 -1
- package/dist/es/r/index.js +0 -2
- package/src/stories/c/ContentSlides.stories.jsx +0 -214
- package/src/ui/b/Title/styles.scss +0 -16
- package/src/ui/c/ContentSlides/ContentSlides.jsx +0 -216
- package/src/ui/c/ContentSlides/Context.js +0 -3
- package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +0 -145
- package/src/ui/c/ContentSlides/common/HorizontalMenu/index.js +0 -2
- package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +0 -150
- package/src/ui/c/ContentSlides/common/Navigator/index.js +0 -2
- package/src/ui/c/ContentSlides/common/Sidebar/Sidebar.jsx +0 -135
- package/src/ui/c/ContentSlides/common/Slide/Slide.jsx +0 -87
- package/src/ui/c/ContentSlides/common/index.js +0 -4
- package/src/ui/c/ContentSlides/index.js +0 -4
- package/src/ui/c/ContentSlides/styles.scss +0 -312
- package/src/ui/c/ContentSlides/useContentSlides.js +0 -4
- package/src/ui/r/SwitchRouteMap/SwitchRouteMap.jsx +0 -64
- package/src/ui/r/SwitchRouteMap/index.js +0 -2
- package/src/ui/r/common/PrivateRoute/PrivateRoute.jsx +0 -73
- package/src/ui/r/common/PrivateRoute/index.js +0 -2
- package/src/ui/r/common/index.js +0 -1
- package/src/ui/r/index.js +0 -2
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var React = _react;
|
|
9
|
+
var _formik = require("formik");
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
12
|
+
var _f = require("../../f");
|
|
13
|
+
var _b = require("../../b");
|
|
14
|
+
var _common = require("./common");
|
|
15
|
+
require("./styles.scss");
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
20
|
+
|
|
21
|
+
// Local Definitions
|
|
22
|
+
|
|
23
|
+
const baseClassName = _exports.default.base;
|
|
24
|
+
const componentClassName = 'expandable-lexical-preview';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* This is the component description.
|
|
28
|
+
*/
|
|
29
|
+
const ExpandableLexicalPreview = _ref => {
|
|
30
|
+
let {
|
|
31
|
+
id,
|
|
32
|
+
className: userClassName,
|
|
33
|
+
style,
|
|
34
|
+
nodes,
|
|
35
|
+
name,
|
|
36
|
+
color,
|
|
37
|
+
resize,
|
|
38
|
+
pageTitle,
|
|
39
|
+
onBlock,
|
|
40
|
+
onOpen,
|
|
41
|
+
header
|
|
42
|
+
// ...otherProps
|
|
43
|
+
} = _ref;
|
|
44
|
+
const [isCollapsed, setIsCollapsed] = (0, _react.useState)(false);
|
|
45
|
+
const handleButtonClick = () => {
|
|
46
|
+
setIsCollapsed(!isCollapsed);
|
|
47
|
+
};
|
|
48
|
+
return /*#__PURE__*/React.createElement(_formik.Formik, {
|
|
49
|
+
initialValues: {
|
|
50
|
+
[name]: nodes
|
|
51
|
+
}
|
|
52
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
id: id,
|
|
54
|
+
className: [baseClassName, componentClassName, userClassName, `y-${color}`, isCollapsed && 'collapsed'].filter(e => e).join(' '),
|
|
55
|
+
style: style
|
|
56
|
+
}, typeof header === 'string' ? /*#__PURE__*/React.createElement("p", {
|
|
57
|
+
className: "title h2"
|
|
58
|
+
}, header) : header, isCollapsed ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_b.Button, {
|
|
59
|
+
onClick: handleButtonClick,
|
|
60
|
+
color: "background-far",
|
|
61
|
+
isCompact: true
|
|
62
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
63
|
+
className: "ai-icon c-x x-paragraph"
|
|
64
|
+
}, "C")), /*#__PURE__*/React.createElement(_common.NewWindowPortal, {
|
|
65
|
+
pageTitle: pageTitle,
|
|
66
|
+
onBlock: () => {
|
|
67
|
+
onBlock?.();
|
|
68
|
+
setIsCollapsed(false);
|
|
69
|
+
},
|
|
70
|
+
onOpen: () => {
|
|
71
|
+
onOpen?.();
|
|
72
|
+
setIsCollapsed(true);
|
|
73
|
+
}
|
|
74
|
+
}, /*#__PURE__*/React.createElement(_f.EditorInput, {
|
|
75
|
+
name: name,
|
|
76
|
+
resize: resize,
|
|
77
|
+
disabled: true
|
|
78
|
+
}))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_f.EditorInput, {
|
|
79
|
+
name: name,
|
|
80
|
+
resize: resize,
|
|
81
|
+
disabled: true,
|
|
82
|
+
id: "the-bad-ass-input"
|
|
83
|
+
}), /*#__PURE__*/React.createElement(_b.Button, {
|
|
84
|
+
id: id,
|
|
85
|
+
className: "expand-button ai-icon",
|
|
86
|
+
color: "background-far",
|
|
87
|
+
isCompact: true,
|
|
88
|
+
onClick: handleButtonClick
|
|
89
|
+
}, "D"))));
|
|
90
|
+
};
|
|
91
|
+
ExpandableLexicalPreview.propTypes = {
|
|
92
|
+
/**
|
|
93
|
+
* The HTML id for this element
|
|
94
|
+
*/
|
|
95
|
+
id: _propTypes.default.string,
|
|
96
|
+
/**
|
|
97
|
+
* The HTML class names for this element
|
|
98
|
+
*/
|
|
99
|
+
className: _propTypes.default.string,
|
|
100
|
+
/**
|
|
101
|
+
* The React-written, css properties for this element.
|
|
102
|
+
*/
|
|
103
|
+
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
104
|
+
/**
|
|
105
|
+
* Color of the text
|
|
106
|
+
*/
|
|
107
|
+
color: _propTypes.default.string,
|
|
108
|
+
/**
|
|
109
|
+
* The nodes to render in the form of a json string
|
|
110
|
+
*/
|
|
111
|
+
nodes: _propTypes.default.string,
|
|
112
|
+
/**
|
|
113
|
+
* The resize property of the textarea
|
|
114
|
+
*/
|
|
115
|
+
resize: _propTypes.default.string,
|
|
116
|
+
/**
|
|
117
|
+
* The header for the preview component.
|
|
118
|
+
*/
|
|
119
|
+
header: _propTypes.default.node,
|
|
120
|
+
/**
|
|
121
|
+
* The page title for the expanded preview.
|
|
122
|
+
*/
|
|
123
|
+
pageTitle: _propTypes.default.string,
|
|
124
|
+
/**
|
|
125
|
+
* The name used to acces the nodes
|
|
126
|
+
*/
|
|
127
|
+
name: _propTypes.default.string.isRequired,
|
|
128
|
+
/**
|
|
129
|
+
* The function to run when a new window portal can be opened
|
|
130
|
+
*/
|
|
131
|
+
onBlock: _propTypes.default.func.isRequired
|
|
132
|
+
};
|
|
133
|
+
ExpandableLexicalPreview.defaultProps = {
|
|
134
|
+
color: 'paragraph',
|
|
135
|
+
resize: 'vertical'
|
|
136
|
+
};
|
|
137
|
+
var _default = exports.default = ExpandableLexicalPreview;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _reactDom = require("react-dom");
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
11
|
+
var _a = require("../../../../a");
|
|
12
|
+
require("./styles.scss");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
15
|
+
|
|
16
|
+
// Local Definitions
|
|
17
|
+
|
|
18
|
+
const baseClassName = _exports.default.base;
|
|
19
|
+
const copyStyles = (sourceDocument, targetDocument) => {
|
|
20
|
+
Array.from(sourceDocument.querySelectorAll('link[rel="stylesheet"], style')).forEach(link => {
|
|
21
|
+
targetDocument.head.appendChild(link.cloneNode(true));
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* This is the component description.
|
|
26
|
+
*/
|
|
27
|
+
const NewWindowPortal = _ref => {
|
|
28
|
+
let {
|
|
29
|
+
children,
|
|
30
|
+
pageTitle,
|
|
31
|
+
onBlock,
|
|
32
|
+
onOpen
|
|
33
|
+
} = _ref;
|
|
34
|
+
const [newWindow, setNewWindow] = (0, _react.useState)(null);
|
|
35
|
+
const container = (0, _react.useMemo)(() => document.createElement('div'), []);
|
|
36
|
+
const {
|
|
37
|
+
userTheme = 'light'
|
|
38
|
+
} = (0, _a.useTheme)();
|
|
39
|
+
(0, _react.useEffect)(() => {
|
|
40
|
+
if (!container) return;
|
|
41
|
+
container.classList.add(baseClassName, 'new-window-portal', `ui-${userTheme}`);
|
|
42
|
+
const newExternalWindow = window.open('', pageTitle, 'width="100%",height="100%"');
|
|
43
|
+
if (newExternalWindow) {
|
|
44
|
+
newExternalWindow.document.title = pageTitle;
|
|
45
|
+
newExternalWindow.document.body.appendChild(container);
|
|
46
|
+
setNewWindow(newExternalWindow);
|
|
47
|
+
onOpen();
|
|
48
|
+
} else {
|
|
49
|
+
console.warn('A new window / tab could not be opened. Check your settings and/or extensions, maybe it was blocked.');
|
|
50
|
+
onBlock();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// eslint-disable-next-line consistent-return
|
|
54
|
+
return () => {
|
|
55
|
+
container.classList.remove(...container.classList);
|
|
56
|
+
newExternalWindow?.close();
|
|
57
|
+
};
|
|
58
|
+
}, [container, pageTitle, userTheme]);
|
|
59
|
+
(0, _react.useEffect)(() => {
|
|
60
|
+
if (newWindow) {
|
|
61
|
+
copyStyles(document, newWindow.document);
|
|
62
|
+
}
|
|
63
|
+
}, [newWindow]);
|
|
64
|
+
return /*#__PURE__*/(0, _reactDom.createPortal)(children, container);
|
|
65
|
+
};
|
|
66
|
+
NewWindowPortal.propTypes = {
|
|
67
|
+
/**
|
|
68
|
+
* The children JSX
|
|
69
|
+
*/
|
|
70
|
+
children: _propTypes.default.node,
|
|
71
|
+
/**
|
|
72
|
+
* The new window page title
|
|
73
|
+
*/
|
|
74
|
+
pageTitle: _propTypes.default.string.isRequired
|
|
75
|
+
};
|
|
76
|
+
NewWindowPortal.defaultProps = {
|
|
77
|
+
// someProp:false
|
|
78
|
+
};
|
|
79
|
+
var _default = exports.default = NewWindowPortal;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "NewWindowPortal", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _NewWindowPortal.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _NewWindowPortal = _interopRequireDefault(require("./NewWindowPortal"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "NewWindowPortal", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _NewWindowPortal.NewWindowPortal;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _NewWindowPortal = require("./NewWindowPortal");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ExpandableLexicalPreview", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _ExpandableLexicalPreview.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _ExpandableLexicalPreview = _interopRequireDefault(require("./ExpandableLexicalPreview"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
|
|
5
|
+
.#{bem.$base}.expandable-lexical-preview {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
flex-wrap: wrap;
|
|
9
|
+
gap: var(--gap);
|
|
10
|
+
position: relative;
|
|
11
|
+
width: 100%;
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
&.collapsed {
|
|
15
|
+
flex-direction: row;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
> .title {
|
|
19
|
+
margin: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
> .#{bem.$base}.button {
|
|
23
|
+
align-items: center;
|
|
24
|
+
border: 1px solid var(--outline-inputs);
|
|
25
|
+
display: flex;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
> .#{bem.$base}.expand-button {
|
|
29
|
+
border: 1px solid var(--outline-inputs);
|
|
30
|
+
position: absolute;
|
|
31
|
+
right: 1em;
|
|
32
|
+
top: 5.5rem;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "DragAndDrop", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _DragAndDrop.DragAndDrop;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "ExpandableLexicalPreview", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _ExpandableLexicalPreview.ExpandableLexicalPreview;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var _ExpandableLexicalPreview = require("./ExpandableLexicalPreview");
|
|
19
|
+
var _DragAndDrop = require("./DragAndDrop");
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,17 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _r = require("./r");
|
|
7
|
-
Object.keys(_r).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _r[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _r[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
6
|
var _a = require("./a");
|
|
18
7
|
Object.keys(_a).forEach(function (key) {
|
|
19
8
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -69,6 +58,17 @@ Object.keys(_f).forEach(function (key) {
|
|
|
69
58
|
}
|
|
70
59
|
});
|
|
71
60
|
});
|
|
61
|
+
var _g = require("./g");
|
|
62
|
+
Object.keys(_g).forEach(function (key) {
|
|
63
|
+
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _g[key]) return;
|
|
65
|
+
Object.defineProperty(exports, key, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () {
|
|
68
|
+
return _g[key];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
72
|
var _utils = require("./utils");
|
|
73
73
|
Object.keys(_utils).forEach(function (key) {
|
|
74
74
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -4,12 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var React = _react;
|
|
8
9
|
var _reactRelay = require("react-relay");
|
|
9
10
|
var _common = require("./common");
|
|
10
11
|
var _QueryLoaderHelloQuery;
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
13
|
+
// Local Definitions
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
16
|
const testQuery = _QueryLoaderHelloQuery !== void 0 ? _QueryLoaderHelloQuery : (_QueryLoaderHelloQuery = require("./__generated__/QueryLoaderHelloQuery.graphql"), _QueryLoaderHelloQuery.hash && _QueryLoaderHelloQuery.hash !== "b92d001ab0208bd484a99f77c274d5ef" && console.error("The definition of 'QueryLoaderHelloQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _QueryLoaderHelloQuery);
|
|
14
17
|
|
|
15
18
|
/**
|
|
@@ -17,10 +20,10 @@ const testQuery = _QueryLoaderHelloQuery !== void 0 ? _QueryLoaderHelloQuery : (
|
|
|
17
20
|
*/
|
|
18
21
|
const QueryLoader = () => {
|
|
19
22
|
const [queryReference, loadQuery] = (0, _reactRelay.useQueryLoader)(testQuery);
|
|
20
|
-
(0,
|
|
23
|
+
(0, _react.useEffect)(() => {
|
|
21
24
|
loadQuery({});
|
|
22
25
|
}, []);
|
|
23
|
-
return /*#__PURE__*/React.createElement(
|
|
26
|
+
return /*#__PURE__*/React.createElement(_react.Suspense, {
|
|
24
27
|
fallback: "loading"
|
|
25
28
|
}, queryReference ? /*#__PURE__*/React.createElement(_common.PreloadedTestData, {
|
|
26
29
|
queryReference: queryReference,
|
|
@@ -30,5 +33,4 @@ const QueryLoader = () => {
|
|
|
30
33
|
QueryLoader.defaultProps = {
|
|
31
34
|
// someProp:false
|
|
32
35
|
};
|
|
33
|
-
var _default = QueryLoader;
|
|
34
|
-
exports.default = _default;
|
|
36
|
+
var _default = exports.default = QueryLoader;
|
|
@@ -8,8 +8,8 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _reactRelay = require("react-relay");
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
function _getRequireWildcardCache(
|
|
12
|
-
function _interopRequireWildcard(
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
13
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -37,5 +37,4 @@ PreloadedTestData.propTypes = {
|
|
|
37
37
|
PreloadedTestData.defaultProps = {
|
|
38
38
|
// someProp:false
|
|
39
39
|
};
|
|
40
|
-
var _default = PreloadedTestData;
|
|
41
|
-
exports.default = _default;
|
|
40
|
+
var _default = exports.default = PreloadedTestData;
|
|
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "useDynamicPosition", {
|
|
|
9
9
|
return _useDynamicPosition.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "useOutsideClick", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _useOutsideClick.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
Object.defineProperty(exports, "useWindowSize", {
|
|
13
19
|
enumerable: true,
|
|
14
20
|
get: function () {
|
|
@@ -17,4 +23,5 @@ Object.defineProperty(exports, "useWindowSize", {
|
|
|
17
23
|
});
|
|
18
24
|
var _useWindowSize = _interopRequireDefault(require("./useWindowSize"));
|
|
19
25
|
var _useDynamicPosition = _interopRequireDefault(require("./useDynamicPosition"));
|
|
26
|
+
var _useOutsideClick = _interopRequireDefault(require("./useOutsideClick"));
|
|
20
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
const useOutsideClick = (ref, callback) => {
|
|
9
|
+
// const ref = useRef(null)
|
|
10
|
+
|
|
11
|
+
(0, _react.useEffect)(() => {
|
|
12
|
+
const handleClickOutside = event => {
|
|
13
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
|
14
|
+
callback();
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
18
|
+
document.addEventListener('touchstart', handleClickOutside);
|
|
19
|
+
return () => {
|
|
20
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
21
|
+
document.removeEventListener('touchstart', handleClickOutside);
|
|
22
|
+
};
|
|
23
|
+
}, [callback]);
|
|
24
|
+
};
|
|
25
|
+
var _default = exports.default = useOutsideClick;
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "useDynamicPosition", {
|
|
|
9
9
|
return _hooks.useDynamicPosition;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "useOutsideClick", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _hooks.useOutsideClick;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
Object.defineProperty(exports, "useWindowSize", {
|
|
13
19
|
enumerable: true,
|
|
14
20
|
get: function () {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { useInsertionEffect } from 'react';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
5
4
|
import styleNames from '@pareto-engineering/bem/exports';
|
|
5
|
+
import "./styles.scss";
|
|
6
6
|
|
|
7
7
|
// Local Definitions
|
|
8
8
|
|
|
@@ -21,28 +21,23 @@ const AnimatedBlobs = ({
|
|
|
21
21
|
width,
|
|
22
22
|
opacity
|
|
23
23
|
// ...otherProps
|
|
24
|
-
}) => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
className: "shape-blob one"
|
|
42
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
43
|
-
className: "shape-blob two"
|
|
44
|
-
}));
|
|
45
|
-
};
|
|
24
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
id: id,
|
|
26
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
27
|
+
style: {
|
|
28
|
+
...style,
|
|
29
|
+
'--blob-color': `var(--${color})`,
|
|
30
|
+
'--height': height,
|
|
31
|
+
'--opacity': opacity,
|
|
32
|
+
'--width': width
|
|
33
|
+
}
|
|
34
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
className: "shape-blob"
|
|
36
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
className: "shape-blob one"
|
|
38
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
className: "shape-blob two"
|
|
40
|
+
}));
|
|
46
41
|
AnimatedBlobs.propTypes = {
|
|
47
42
|
/**
|
|
48
43
|
* The HTML id for this element
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { useEffect
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import styleNames from '@pareto-engineering/bem/exports';
|
|
6
|
+
import { useApp } from "./..";
|
|
6
7
|
import { Gradient } from "./webGIRenderer";
|
|
8
|
+
import "./styles.scss";
|
|
7
9
|
|
|
8
10
|
// Local Definitions
|
|
9
11
|
|
|
@@ -17,9 +19,9 @@ const AnimatedGradient = ({
|
|
|
17
19
|
className: userClassName
|
|
18
20
|
// ...otherProps
|
|
19
21
|
}) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
22
|
+
const {
|
|
23
|
+
userTheme
|
|
24
|
+
} = useApp();
|
|
23
25
|
const isClient = typeof window !== 'undefined';
|
|
24
26
|
useEffect(() => {
|
|
25
27
|
// Only initialize the Gradient if we're in the browser
|
|
@@ -27,7 +29,7 @@ const AnimatedGradient = ({
|
|
|
27
29
|
const gradient = new Gradient();
|
|
28
30
|
gradient.initGradient('#gradient-canvas');
|
|
29
31
|
}
|
|
30
|
-
}, []);
|
|
32
|
+
}, [userTheme]);
|
|
31
33
|
return /*#__PURE__*/React.createElement("canvas", {
|
|
32
34
|
id: "gradient-canvas",
|
|
33
35
|
"data-transition-in": true,
|
|
@@ -35,7 +37,6 @@ const AnimatedGradient = ({
|
|
|
35
37
|
// {...otherProps}
|
|
36
38
|
});
|
|
37
39
|
};
|
|
38
|
-
|
|
39
40
|
AnimatedGradient.propTypes = {
|
|
40
41
|
/**
|
|
41
42
|
* The HTML class names for this element
|
|
@@ -43,6 +44,6 @@ AnimatedGradient.propTypes = {
|
|
|
43
44
|
className: PropTypes.string
|
|
44
45
|
};
|
|
45
46
|
AnimatedGradient.defaultProps = {
|
|
46
|
-
// primaryColor:'
|
|
47
|
+
// primaryColor:'heading',
|
|
47
48
|
};
|
|
48
49
|
export default AnimatedGradient;
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
@use "@pareto-engineering/bem";
|
|
4
4
|
|
|
5
5
|
.#{bem.$base}.animated-gradient {
|
|
6
|
-
--gradient-color-1: var(--background-mesh);
|
|
6
|
+
--gradient-color-1: var(--hard-background-mesh);
|
|
7
7
|
--gradient-color-2: var(--soft-background-mesh);
|
|
8
8
|
--gradient-color-3: var(--background-mesh);
|
|
9
9
|
--gradient-color-4: var(--soft-background-mesh);
|
|
10
|
+
background-color: var(--background-mesh);
|
|
10
11
|
height: 100%;
|
|
11
12
|
left: 0;
|
|
12
13
|
top: 0;
|
|
@@ -319,7 +319,6 @@ class Gradient {
|
|
|
319
319
|
window.addEventListener("scroll", this.handleScroll), window.addEventListener("mousedown", this.handleMouseDown), window.addEventListener("mouseup", this.handleMouseUp), window.addEventListener("keydown", this.handleKeyDown), this.isIntersecting = !0, this.addIsLoadedClass(), this.play()
|
|
320
320
|
}) */);
|
|
321
321
|
}
|
|
322
|
-
|
|
323
322
|
disconnect() {
|
|
324
323
|
this.scrollObserver && (window.removeEventListener('scroll', this.handleScroll), window.removeEventListener('mousedown', this.handleMouseDown), window.removeEventListener('mouseup', this.handleMouseUp), window.removeEventListener('keydown', this.handleKeyDown), this.scrollObserver.disconnect()), window.removeEventListener('resize', this.resize);
|
|
325
324
|
}
|
|
@@ -7,19 +7,15 @@ export default ((initialTheme, storageKey = 'theme') => {
|
|
|
7
7
|
const storage = window.localStorage;
|
|
8
8
|
if (isClient) {
|
|
9
9
|
const storedTheme = window.localStorage.getItem(storageKey);
|
|
10
|
-
// console.log(storedTheme, storedTheme != userTheme)
|
|
11
10
|
if (storedTheme && storedTheme !== userTheme) {
|
|
12
|
-
// console.warn('Theme load')
|
|
13
11
|
setPreferredTheme(storedTheme);
|
|
14
12
|
setUserTheme(storedTheme);
|
|
15
13
|
} else if (preferredTheme && preferredTheme.length && preferredTheme !== 'system') {
|
|
16
14
|
setUserTheme(preferredTheme);
|
|
17
15
|
storage.setItem(storageKey, preferredTheme);
|
|
18
|
-
// console.warn('theme change', preferredTheme)
|
|
19
16
|
} else {
|
|
20
17
|
setUserTheme(window.matchMedia('(prefers-color-scheme:dark)').matches ? 'dark' : 'light');
|
|
21
18
|
storage.removeItem(storageKey);
|
|
22
|
-
// console.warn('theme reset')
|
|
23
19
|
}
|
|
24
20
|
} else {
|
|
25
21
|
setUserTheme('light');
|