@pareto-engineering/design-system 4.0.0-alpha.9 → 4.0.1-alpha.1
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 +86 -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 +26 -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 +238 -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 -51
- 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/FormBuilder/FormBuilder.js +77 -0
- package/dist/cjs/g/FormBuilder/common/Builder/Builder.js +156 -0
- package/dist/cjs/g/FormBuilder/common/Builder/common/InputBuilder/InputBuilder.js +229 -0
- package/dist/cjs/g/FormBuilder/common/Builder/common/InputBuilder/index.js +13 -0
- package/dist/cjs/g/FormBuilder/common/Builder/common/InputBuilder/styles.scss +192 -0
- package/dist/cjs/g/FormBuilder/common/Builder/common/Section/Section.js +133 -0
- package/dist/cjs/g/FormBuilder/common/Builder/common/Section/index.js +13 -0
- package/dist/cjs/g/FormBuilder/common/Builder/common/index.js +19 -0
- package/dist/cjs/g/FormBuilder/common/Builder/index.js +13 -0
- package/dist/cjs/g/FormBuilder/common/Builder/styles.scss +106 -0
- package/dist/cjs/g/FormBuilder/common/Renderer/Renderer.js +119 -0
- package/dist/cjs/g/FormBuilder/common/Renderer/common/Section/Section.js +60 -0
- package/dist/cjs/g/FormBuilder/common/Renderer/common/Section/index.js +13 -0
- package/dist/cjs/g/FormBuilder/common/Renderer/common/index.js +12 -0
- package/dist/cjs/g/FormBuilder/common/Renderer/index.js +13 -0
- package/dist/cjs/g/FormBuilder/common/Renderer/styles.scss +15 -0
- package/dist/cjs/g/FormBuilder/common/index.js +19 -0
- package/dist/cjs/g/FormBuilder/index.js +13 -0
- package/dist/cjs/g/FormBuilder/styles.scss +7 -0
- package/dist/cjs/g/index.js +26 -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 +74 -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 +22 -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 +227 -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 +47 -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/FormBuilder/FormBuilder.js +65 -0
- package/dist/es/g/FormBuilder/common/Builder/Builder.js +142 -0
- package/dist/es/g/FormBuilder/common/Builder/common/InputBuilder/InputBuilder.js +216 -0
- package/dist/es/g/FormBuilder/common/Builder/common/InputBuilder/index.js +2 -0
- package/dist/es/g/FormBuilder/common/Builder/common/InputBuilder/styles.scss +192 -0
- package/dist/es/g/FormBuilder/common/Builder/common/Section/Section.js +120 -0
- package/dist/es/g/FormBuilder/common/Builder/common/Section/index.js +2 -0
- package/dist/es/g/FormBuilder/common/Builder/common/index.js +2 -0
- package/dist/es/g/FormBuilder/common/Builder/index.js +2 -0
- package/dist/es/g/FormBuilder/common/Builder/styles.scss +106 -0
- package/dist/es/g/FormBuilder/common/Renderer/Renderer.js +113 -0
- package/dist/es/g/FormBuilder/common/Renderer/common/Section/Section.js +52 -0
- package/dist/es/g/FormBuilder/common/Renderer/common/Section/index.js +2 -0
- package/dist/es/g/FormBuilder/common/Renderer/common/index.js +1 -0
- package/dist/es/g/FormBuilder/common/Renderer/index.js +2 -0
- package/dist/es/g/FormBuilder/common/Renderer/styles.scss +15 -0
- package/dist/es/g/FormBuilder/common/index.js +2 -0
- package/dist/es/g/FormBuilder/index.js +2 -0
- package/dist/es/g/FormBuilder/styles.scss +7 -0
- package/dist/es/g/index.js +3 -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 +28 -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/stories/g/FormBuilder.stories.jsx +97 -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 +99 -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 +36 -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 +285 -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 +54 -49
- 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 +140 -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/FormBuilder/FormBuilder.jsx +85 -0
- package/src/ui/g/FormBuilder/common/Builder/Builder.jsx +175 -0
- package/src/ui/g/FormBuilder/common/Builder/common/InputBuilder/InputBuilder.jsx +279 -0
- package/src/ui/g/FormBuilder/common/Builder/common/InputBuilder/index.js +2 -0
- package/src/ui/g/FormBuilder/common/Builder/common/InputBuilder/styles.scss +192 -0
- package/src/ui/g/FormBuilder/common/Builder/common/Section/Section.jsx +156 -0
- package/src/ui/g/FormBuilder/common/Builder/common/Section/index.js +2 -0
- package/src/ui/g/FormBuilder/common/Builder/common/index.js +2 -0
- package/src/ui/g/FormBuilder/common/Builder/index.js +2 -0
- package/src/ui/g/FormBuilder/common/Builder/styles.scss +106 -0
- package/src/ui/g/FormBuilder/common/Renderer/Renderer.jsx +145 -0
- package/src/ui/g/FormBuilder/common/Renderer/common/Section/Section.jsx +75 -0
- package/src/ui/g/FormBuilder/common/Renderer/common/Section/index.js +2 -0
- package/src/ui/g/FormBuilder/common/Renderer/common/index.js +1 -0
- package/src/ui/g/FormBuilder/common/Renderer/index.js +2 -0
- package/src/ui/g/FormBuilder/common/Renderer/styles.scss +15 -0
- package/src/ui/g/FormBuilder/common/index.js +2 -0
- package/src/ui/g/FormBuilder/index.js +2 -0
- package/src/ui/g/FormBuilder/styles.scss +7 -0
- package/src/ui/g/index.js +3 -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 +26281 -8829
- 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,227 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
/* eslint-disable import/no-extraneous-dependencies -- required here */
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { memo, useEffect } from 'react';
|
|
5
|
+
import { useFormikContext } from 'formik';
|
|
6
|
+
import { LexicalComposer } from '@lexical/react/LexicalComposer';
|
|
7
|
+
import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin';
|
|
8
|
+
import { ContentEditable } from '@lexical/react/LexicalContentEditable';
|
|
9
|
+
import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin';
|
|
10
|
+
import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin';
|
|
11
|
+
import { LinkPlugin } from '@lexical/react/LexicalLinkPlugin';
|
|
12
|
+
import LexicalClickableLinkPlugin from '@lexical/react/LexicalClickableLinkPlugin';
|
|
13
|
+
import { ListPlugin } from '@lexical/react/LexicalListPlugin';
|
|
14
|
+
import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary';
|
|
15
|
+
import { TabIndentationPlugin } from '@lexical/react/LexicalTabIndentationPlugin';
|
|
16
|
+
import { AutoLinkNode, LinkNode } from '@lexical/link';
|
|
17
|
+
import { ListItemNode, ListNode } from '@lexical/list';
|
|
18
|
+
import { CheckListPlugin } from '@lexical/react/LexicalCheckListPlugin';
|
|
19
|
+
import { HeadingNode, QuoteNode } from '@lexical/rich-text';
|
|
20
|
+
import { CodeHighlightNode, CodeNode } from '@lexical/code';
|
|
21
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
22
|
+
import PropTypes from 'prop-types';
|
|
23
|
+
import styleNames from '@pareto-engineering/bem/exports';
|
|
24
|
+
|
|
25
|
+
// Local Definitions
|
|
26
|
+
|
|
27
|
+
import { FormLabel, FormDescription } from "../../common";
|
|
28
|
+
import { ToolbarPlugin, TreeViewPlugin, StopPropagationPlugin } from "./common";
|
|
29
|
+
import "./styles.scss";
|
|
30
|
+
const baseClassName = styleNames.base;
|
|
31
|
+
const componentClassName = 'editor-input';
|
|
32
|
+
const ExposeEditorStatePlugin = ({
|
|
33
|
+
setEditorState
|
|
34
|
+
}) => {
|
|
35
|
+
const [editor] = useLexicalComposerContext();
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
setEditorState(editor);
|
|
38
|
+
}, [editor]);
|
|
39
|
+
return null;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* This is the component description.
|
|
44
|
+
*/
|
|
45
|
+
const EditorInput = ({
|
|
46
|
+
id,
|
|
47
|
+
className: userClassName,
|
|
48
|
+
style,
|
|
49
|
+
name,
|
|
50
|
+
label,
|
|
51
|
+
// validate,
|
|
52
|
+
resize,
|
|
53
|
+
color,
|
|
54
|
+
rows,
|
|
55
|
+
optional,
|
|
56
|
+
labelColor,
|
|
57
|
+
description,
|
|
58
|
+
disabled,
|
|
59
|
+
showDebugger,
|
|
60
|
+
stopPropagationKeys,
|
|
61
|
+
setEditorState
|
|
62
|
+
// handleOnChange,
|
|
63
|
+
// ...otherProps
|
|
64
|
+
}) => {
|
|
65
|
+
const {
|
|
66
|
+
values,
|
|
67
|
+
setFieldValue
|
|
68
|
+
} = useFormikContext();
|
|
69
|
+
const setInitialValue = () => {
|
|
70
|
+
const value = values[name];
|
|
71
|
+
try {
|
|
72
|
+
JSON.parse(value);
|
|
73
|
+
return value;
|
|
74
|
+
} catch {
|
|
75
|
+
const defaultValue = {
|
|
76
|
+
root: {
|
|
77
|
+
children: [{
|
|
78
|
+
children: [{
|
|
79
|
+
detail: 0,
|
|
80
|
+
format: 0,
|
|
81
|
+
mode: 'normal',
|
|
82
|
+
style: '',
|
|
83
|
+
text: '',
|
|
84
|
+
type: 'text',
|
|
85
|
+
version: 1
|
|
86
|
+
}],
|
|
87
|
+
direction: 'ltr',
|
|
88
|
+
format: '',
|
|
89
|
+
indent: 0,
|
|
90
|
+
type: 'paragraph',
|
|
91
|
+
version: 1
|
|
92
|
+
}],
|
|
93
|
+
direction: 'ltr',
|
|
94
|
+
format: '',
|
|
95
|
+
indent: 0,
|
|
96
|
+
type: 'root',
|
|
97
|
+
version: 1
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
defaultValue.root.children[0].children[0].text = value;
|
|
101
|
+
return JSON.stringify(defaultValue);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const onChange = state => {
|
|
105
|
+
setFieldValue(name, JSON.stringify(state));
|
|
106
|
+
};
|
|
107
|
+
const initialConfig = {
|
|
108
|
+
nameSpace: name,
|
|
109
|
+
editable: !disabled,
|
|
110
|
+
editorState: setInitialValue(),
|
|
111
|
+
theme: {
|
|
112
|
+
text: {
|
|
113
|
+
italic: 'italic',
|
|
114
|
+
strikethrough: 'strikethrough',
|
|
115
|
+
underline: 'underlined'
|
|
116
|
+
},
|
|
117
|
+
list: {
|
|
118
|
+
listitemChecked: 'lexical-list-item-checked',
|
|
119
|
+
listitemUnchecked: 'lexical-list-item-unchecked'
|
|
120
|
+
},
|
|
121
|
+
code: 'lexical-code'
|
|
122
|
+
},
|
|
123
|
+
nodes: [HeadingNode, QuoteNode, CodeNode, CodeHighlightNode, AutoLinkNode, LinkNode, ListNode, ListItemNode]
|
|
124
|
+
};
|
|
125
|
+
return /*#__PURE__*/React.createElement(LexicalComposer, {
|
|
126
|
+
initialConfig: initialConfig
|
|
127
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
128
|
+
id: id,
|
|
129
|
+
className: [baseClassName, componentClassName, userClassName, `y-${color}`, disabled && 'disabled'].filter(e => e).join(' '),
|
|
130
|
+
style: {
|
|
131
|
+
...style,
|
|
132
|
+
'--resize': resize,
|
|
133
|
+
'--rows': `${rows}em`
|
|
134
|
+
}
|
|
135
|
+
}, /*#__PURE__*/React.createElement(FormLabel, {
|
|
136
|
+
name: name,
|
|
137
|
+
color: labelColor,
|
|
138
|
+
optional: optional
|
|
139
|
+
}, label), !disabled && /*#__PURE__*/React.createElement(ToolbarPlugin, null), /*#__PURE__*/React.createElement(RichTextPlugin, {
|
|
140
|
+
contentEditable: /*#__PURE__*/React.createElement(ContentEditable, {
|
|
141
|
+
className: "content-editable",
|
|
142
|
+
id: name,
|
|
143
|
+
name: name
|
|
144
|
+
}),
|
|
145
|
+
ErrorBoundary: LexicalErrorBoundary
|
|
146
|
+
}), /*#__PURE__*/React.createElement(ListPlugin, null), /*#__PURE__*/React.createElement(CheckListPlugin, null), /*#__PURE__*/React.createElement(OnChangePlugin, {
|
|
147
|
+
onChange: onChange
|
|
148
|
+
}), /*#__PURE__*/React.createElement(LinkPlugin, null), /*#__PURE__*/React.createElement(LexicalClickableLinkPlugin, null), /*#__PURE__*/React.createElement(TabIndentationPlugin, null), setEditorState && /*#__PURE__*/React.createElement(ExposeEditorStatePlugin, {
|
|
149
|
+
setEditorState: setEditorState
|
|
150
|
+
}), /*#__PURE__*/React.createElement(HistoryPlugin, null), stopPropagationKeys && /*#__PURE__*/React.createElement(StopPropagationPlugin, {
|
|
151
|
+
stopPropagationKeys: stopPropagationKeys
|
|
152
|
+
}), /*#__PURE__*/React.createElement(FormDescription, {
|
|
153
|
+
className: "s-1",
|
|
154
|
+
description: description,
|
|
155
|
+
name: name
|
|
156
|
+
}), showDebugger && /*#__PURE__*/React.createElement(TreeViewPlugin, null)));
|
|
157
|
+
};
|
|
158
|
+
EditorInput.propTypes = {
|
|
159
|
+
/**
|
|
160
|
+
* The HTML id for this element
|
|
161
|
+
*/
|
|
162
|
+
id: PropTypes.string,
|
|
163
|
+
/**
|
|
164
|
+
* The HTML class names for this element
|
|
165
|
+
*/
|
|
166
|
+
className: PropTypes.string,
|
|
167
|
+
/**
|
|
168
|
+
* The React-written, css properties for this element.
|
|
169
|
+
*/
|
|
170
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
171
|
+
/**
|
|
172
|
+
* The input name (html - and Formik state)
|
|
173
|
+
*/
|
|
174
|
+
name: PropTypes.string.isRequired,
|
|
175
|
+
/**
|
|
176
|
+
* The input label
|
|
177
|
+
*/
|
|
178
|
+
label: PropTypes.string.isRequired,
|
|
179
|
+
/**
|
|
180
|
+
* The input value validator function
|
|
181
|
+
*/
|
|
182
|
+
// validate:PropTypes.func,
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The number of rows int the text area
|
|
186
|
+
*/
|
|
187
|
+
rows: PropTypes.number,
|
|
188
|
+
/**
|
|
189
|
+
* Color of the text
|
|
190
|
+
*/
|
|
191
|
+
color: PropTypes.string,
|
|
192
|
+
/**
|
|
193
|
+
* Label base color
|
|
194
|
+
*/
|
|
195
|
+
labelColor: PropTypes.string,
|
|
196
|
+
/**
|
|
197
|
+
* Text area description
|
|
198
|
+
*/
|
|
199
|
+
description: PropTypes.string,
|
|
200
|
+
/**
|
|
201
|
+
* Whether the text area should be disabled
|
|
202
|
+
*/
|
|
203
|
+
disabled: PropTypes.bool,
|
|
204
|
+
/**
|
|
205
|
+
* Whether the input is optional or not
|
|
206
|
+
*/
|
|
207
|
+
optional: PropTypes.bool,
|
|
208
|
+
/**
|
|
209
|
+
* The resize property of the text area
|
|
210
|
+
*/
|
|
211
|
+
resize: PropTypes.oneOf(['none', 'both', 'horizontal', 'vertical']),
|
|
212
|
+
/**
|
|
213
|
+
* Whether to show the debugger or not
|
|
214
|
+
*/
|
|
215
|
+
showDebugger: PropTypes.bool,
|
|
216
|
+
/**
|
|
217
|
+
* Map to stop propagation of the given keys
|
|
218
|
+
*/
|
|
219
|
+
stopPropagationKeys: PropTypes.arrayOf(PropTypes.string)
|
|
220
|
+
};
|
|
221
|
+
EditorInput.defaultProps = {
|
|
222
|
+
rows: 10,
|
|
223
|
+
disabled: false,
|
|
224
|
+
color: 'paragraph',
|
|
225
|
+
resize: 'vertical'
|
|
226
|
+
};
|
|
227
|
+
export default /*#__PURE__*/memo(EditorInput);
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useState, useRef } from 'react';
|
|
4
|
+
import { $createParagraphNode, $getSelection, $isRangeSelection, DEPRECATED_$isGridSelection } from 'lexical';
|
|
5
|
+
import { $createHeadingNode, $createQuoteNode } from '@lexical/rich-text';
|
|
6
|
+
import { $setBlocksType } from '@lexical/selection';
|
|
7
|
+
import { INSERT_CHECK_LIST_COMMAND, INSERT_ORDERED_LIST_COMMAND, INSERT_UNORDERED_LIST_COMMAND, REMOVE_LIST_COMMAND } from '@lexical/list';
|
|
8
|
+
import { $createCodeNode } from '@lexical/code';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
|
+
import styleNames from '@pareto-engineering/bem/exports';
|
|
11
|
+
import "./styles.scss";
|
|
12
|
+
import { Popover } from "../../../../../a";
|
|
13
|
+
import { useOutsideClick } from "../../../../../utils";
|
|
14
|
+
import { blockTypeToBlockName } from "../ToolbarPlugin/ToolbarPlugin";
|
|
15
|
+
|
|
16
|
+
// Local Definitions
|
|
17
|
+
|
|
18
|
+
const baseClassName = styleNames.base;
|
|
19
|
+
const componentClassName = 'block-format-drop-down';
|
|
20
|
+
const iconsMap = {
|
|
21
|
+
bullet: {
|
|
22
|
+
icon: '.',
|
|
23
|
+
className: 'icon'
|
|
24
|
+
},
|
|
25
|
+
check: {
|
|
26
|
+
icon: '4',
|
|
27
|
+
className: 'ai-icon'
|
|
28
|
+
},
|
|
29
|
+
code: {
|
|
30
|
+
icon: '6',
|
|
31
|
+
className: 'ai-icon'
|
|
32
|
+
},
|
|
33
|
+
h1: {
|
|
34
|
+
icon: '1',
|
|
35
|
+
className: 'ai-icon'
|
|
36
|
+
},
|
|
37
|
+
h2: {
|
|
38
|
+
icon: '2',
|
|
39
|
+
className: 'ai-icon'
|
|
40
|
+
},
|
|
41
|
+
h3: {
|
|
42
|
+
icon: '3',
|
|
43
|
+
className: 'ai-icon'
|
|
44
|
+
},
|
|
45
|
+
number: {
|
|
46
|
+
icon: '-',
|
|
47
|
+
className: 'icon'
|
|
48
|
+
},
|
|
49
|
+
paragraph: {
|
|
50
|
+
icon: 'N',
|
|
51
|
+
className: 'ai-icon'
|
|
52
|
+
},
|
|
53
|
+
quote: {
|
|
54
|
+
icon: '5',
|
|
55
|
+
className: 'ai-icon'
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* This is the component description.
|
|
60
|
+
*/
|
|
61
|
+
const BlockFormatDropDown = ({
|
|
62
|
+
id,
|
|
63
|
+
className: userClassName,
|
|
64
|
+
style,
|
|
65
|
+
editor,
|
|
66
|
+
blockType
|
|
67
|
+
// ...otherProps
|
|
68
|
+
}) => {
|
|
69
|
+
const formatParagraph = () => {
|
|
70
|
+
editor.update(() => {
|
|
71
|
+
const selection = $getSelection();
|
|
72
|
+
if ($isRangeSelection(selection) || DEPRECATED_$isGridSelection(selection)) {
|
|
73
|
+
$setBlocksType(selection, () => $createParagraphNode());
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
const formatHeading = headingSize => {
|
|
78
|
+
if (blockType !== headingSize) {
|
|
79
|
+
editor.update(() => {
|
|
80
|
+
const selection = $getSelection();
|
|
81
|
+
if ($isRangeSelection(selection) || DEPRECATED_$isGridSelection(selection)) {
|
|
82
|
+
$setBlocksType(selection, () => $createHeadingNode(headingSize));
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const formatBulletList = () => {
|
|
88
|
+
if (blockType !== 'bullet') {
|
|
89
|
+
editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined);
|
|
90
|
+
} else {
|
|
91
|
+
editor.dispatchCommand(REMOVE_LIST_COMMAND, undefined);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const formatCheckList = () => {
|
|
95
|
+
if (blockType !== 'check') {
|
|
96
|
+
editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined);
|
|
97
|
+
} else {
|
|
98
|
+
editor.dispatchCommand(REMOVE_LIST_COMMAND, undefined);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
const formatNumberedList = () => {
|
|
102
|
+
if (blockType !== 'number') {
|
|
103
|
+
editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined);
|
|
104
|
+
} else {
|
|
105
|
+
editor.dispatchCommand(REMOVE_LIST_COMMAND, undefined);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
const formatQuote = () => {
|
|
109
|
+
if (blockType !== 'quote') {
|
|
110
|
+
editor.update(() => {
|
|
111
|
+
const selection = $getSelection();
|
|
112
|
+
if ($isRangeSelection(selection) || DEPRECATED_$isGridSelection(selection)) {
|
|
113
|
+
$setBlocksType(selection, () => $createQuoteNode());
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
const formatCode = () => {
|
|
119
|
+
if (blockType !== 'code') {
|
|
120
|
+
editor.update(() => {
|
|
121
|
+
let selection = $getSelection();
|
|
122
|
+
if ($isRangeSelection(selection) || DEPRECATED_$isGridSelection(selection)) {
|
|
123
|
+
if (selection.isCollapsed()) {
|
|
124
|
+
$setBlocksType(selection, () => $createCodeNode());
|
|
125
|
+
} else {
|
|
126
|
+
const textContent = selection.getTextContent();
|
|
127
|
+
const codeNode = $createCodeNode();
|
|
128
|
+
selection.insertNodes([codeNode]);
|
|
129
|
+
selection = $getSelection();
|
|
130
|
+
if ($isRangeSelection(selection)) selection.insertRawText(textContent);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
const parentRef = useRef(null);
|
|
137
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
138
|
+
useOutsideClick(parentRef, () => setIsOpen(false));
|
|
139
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
140
|
+
id: id,
|
|
141
|
+
className: [baseClassName, componentClassName, userClassName, 'group'].filter(e => e).join(' '),
|
|
142
|
+
style: style,
|
|
143
|
+
ref: parentRef,
|
|
144
|
+
type: "button",
|
|
145
|
+
onClick: () => setIsOpen(!isOpen)
|
|
146
|
+
// {...otherProps}
|
|
147
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
148
|
+
className: iconsMap[blockType].className
|
|
149
|
+
}, iconsMap[blockType].icon), /*#__PURE__*/React.createElement("span", null, blockTypeToBlockName[blockType]), /*#__PURE__*/React.createElement("span", {
|
|
150
|
+
className: "icon"
|
|
151
|
+
}, "V"), isOpen && /*#__PURE__*/React.createElement(Popover, {
|
|
152
|
+
parentRef: parentRef,
|
|
153
|
+
isOpen: isOpen,
|
|
154
|
+
color: "background-far"
|
|
155
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
156
|
+
className: `item ${blockType === 'paragraph' ? 'active' : ''}`,
|
|
157
|
+
onClick: formatParagraph,
|
|
158
|
+
type: "button"
|
|
159
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
160
|
+
className: "ai-icon"
|
|
161
|
+
}, "N"), /*#__PURE__*/React.createElement("span", {
|
|
162
|
+
className: "text"
|
|
163
|
+
}, "Normal")), /*#__PURE__*/React.createElement("button", {
|
|
164
|
+
className: `item ${blockType === 'h1' ? 'active' : ''}`,
|
|
165
|
+
onClick: () => formatHeading('h1'),
|
|
166
|
+
type: "button"
|
|
167
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
168
|
+
className: "ai-icon"
|
|
169
|
+
}, "1"), /*#__PURE__*/React.createElement("span", {
|
|
170
|
+
className: "text"
|
|
171
|
+
}, "Heading 1")), /*#__PURE__*/React.createElement("button", {
|
|
172
|
+
className: `item ${blockType === 'h2' ? 'active' : ''}`,
|
|
173
|
+
onClick: () => formatHeading('h2'),
|
|
174
|
+
type: "button"
|
|
175
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
176
|
+
className: "ai-icon"
|
|
177
|
+
}, "2"), /*#__PURE__*/React.createElement("span", {
|
|
178
|
+
className: "text"
|
|
179
|
+
}, "Heading 2")), /*#__PURE__*/React.createElement("button", {
|
|
180
|
+
className: `item ${blockType === 'h3' ? 'active' : ''}`,
|
|
181
|
+
onClick: () => formatHeading('h3'),
|
|
182
|
+
type: "button"
|
|
183
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
184
|
+
className: "ai-icon"
|
|
185
|
+
}, "3"), /*#__PURE__*/React.createElement("span", {
|
|
186
|
+
className: "text"
|
|
187
|
+
}, "Heading 3")), /*#__PURE__*/React.createElement("button", {
|
|
188
|
+
className: `item ${blockType === 'bullet' ? 'active' : ''}`,
|
|
189
|
+
onClick: formatBulletList,
|
|
190
|
+
type: "button"
|
|
191
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
192
|
+
className: "icon"
|
|
193
|
+
}, "."), /*#__PURE__*/React.createElement("span", {
|
|
194
|
+
className: "text"
|
|
195
|
+
}, "Bullet List")), /*#__PURE__*/React.createElement("button", {
|
|
196
|
+
className: `item ${blockType === 'number' ? 'active' : ''}`,
|
|
197
|
+
onClick: formatNumberedList,
|
|
198
|
+
type: "button"
|
|
199
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
200
|
+
className: "icon"
|
|
201
|
+
}, "-"), /*#__PURE__*/React.createElement("span", {
|
|
202
|
+
className: "text"
|
|
203
|
+
}, "Numbered List")), /*#__PURE__*/React.createElement("button", {
|
|
204
|
+
className: `item ${blockType === 'check' ? 'active' : ''}`,
|
|
205
|
+
onClick: formatCheckList,
|
|
206
|
+
type: "button"
|
|
207
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
208
|
+
className: "ai-icon"
|
|
209
|
+
}, "4"), /*#__PURE__*/React.createElement("span", {
|
|
210
|
+
className: "text"
|
|
211
|
+
}, "Check List")), /*#__PURE__*/React.createElement("button", {
|
|
212
|
+
className: `item ${blockType === 'quote' ? 'active' : ''}`,
|
|
213
|
+
onClick: formatQuote,
|
|
214
|
+
type: "button"
|
|
215
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
216
|
+
className: "ai-icon"
|
|
217
|
+
}, "5"), /*#__PURE__*/React.createElement("span", {
|
|
218
|
+
className: "text"
|
|
219
|
+
}, "Quote")), /*#__PURE__*/React.createElement("button", {
|
|
220
|
+
className: `item ${blockType === 'code' ? 'active' : ''}`,
|
|
221
|
+
onClick: formatCode,
|
|
222
|
+
type: "button"
|
|
223
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
224
|
+
className: "ai-icon"
|
|
225
|
+
}, "6"), /*#__PURE__*/React.createElement("span", {
|
|
226
|
+
className: "text"
|
|
227
|
+
}, "Code Block"))));
|
|
228
|
+
};
|
|
229
|
+
BlockFormatDropDown.propTypes = {
|
|
230
|
+
/**
|
|
231
|
+
* The HTML id for this element
|
|
232
|
+
*/
|
|
233
|
+
id: PropTypes.string,
|
|
234
|
+
/**
|
|
235
|
+
* The HTML class names for this element
|
|
236
|
+
*/
|
|
237
|
+
className: PropTypes.string,
|
|
238
|
+
/**
|
|
239
|
+
* The React-written, css properties for this element.
|
|
240
|
+
*/
|
|
241
|
+
style: PropTypes.objectOf(PropTypes.string)
|
|
242
|
+
};
|
|
243
|
+
BlockFormatDropDown.defaultProps = {
|
|
244
|
+
// someProp:false
|
|
245
|
+
};
|
|
246
|
+
export default BlockFormatDropDown;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
|
|
5
|
+
$default-width: 15em;
|
|
6
|
+
|
|
7
|
+
.#{bem.$base}.block-format-drop-down {
|
|
8
|
+
align-items: center;
|
|
9
|
+
background-color: var(--x);
|
|
10
|
+
border: 0;
|
|
11
|
+
color: var(--on-background-inputs);
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
display: flex;
|
|
14
|
+
gap: calc(var(--gap) / 2);
|
|
15
|
+
margin-inline: calc(var(--theme-default-padding) / 4);
|
|
16
|
+
padding: calc(var(--theme-default-padding) / 2);
|
|
17
|
+
position: relative;
|
|
18
|
+
|
|
19
|
+
&:hover {
|
|
20
|
+
background: var(--hard-x);
|
|
21
|
+
border-radius: calc(var(--theme-default-border-radius) / 2);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
> .#{bem.$base}.popover {
|
|
25
|
+
background-color: var(--background-far);
|
|
26
|
+
border: 1px solid var(--hard-background-cards);
|
|
27
|
+
border-radius: calc(var(--theme-default-border-radius) / 2);
|
|
28
|
+
color: var(--heading);
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
padding: calc(var(--theme-default-padding) / 2);
|
|
32
|
+
width: $default-width;
|
|
33
|
+
|
|
34
|
+
> .item {
|
|
35
|
+
align-items: center;
|
|
36
|
+
background-color: var(--x);
|
|
37
|
+
border: 0;
|
|
38
|
+
border-radius: calc(var(--theme-default-border-radius) / 2);
|
|
39
|
+
color: var(--paragraph);
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
display: flex;
|
|
42
|
+
gap: calc(var(--gap) / 2);
|
|
43
|
+
padding: calc(var(--theme-default-padding) / 2);
|
|
44
|
+
transition: all .2s;
|
|
45
|
+
|
|
46
|
+
&:hover {
|
|
47
|
+
background-color: var(--hard-x);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.active {
|
|
51
|
+
background-color: var(--hard-ui-main);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useRef, useEffect, useState } from 'react';
|
|
4
|
+
import { ColorPicker as ReactColorPicker, useColor } from 'react-color-palette';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import styleNames from '@pareto-engineering/bem/exports';
|
|
7
|
+
import "./styles.scss";
|
|
8
|
+
import { Popover } from "../../../../../a";
|
|
9
|
+
import { useOutsideClick } from "../../../../../utils";
|
|
10
|
+
// Local Definitions
|
|
11
|
+
|
|
12
|
+
const baseClassName = styleNames.base;
|
|
13
|
+
const componentClassName = 'color-picker';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* This is the component description.
|
|
17
|
+
*/
|
|
18
|
+
const ColorPicker = ({
|
|
19
|
+
id,
|
|
20
|
+
className: userClassName,
|
|
21
|
+
style,
|
|
22
|
+
icon,
|
|
23
|
+
defaultColorHex,
|
|
24
|
+
onChange
|
|
25
|
+
// ...otherProps
|
|
26
|
+
}) => {
|
|
27
|
+
const [colorValue, setColor] = useColor(defaultColorHex);
|
|
28
|
+
const parentRef = useRef(null);
|
|
29
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
30
|
+
useOutsideClick(parentRef, () => setIsOpen(false));
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
const {
|
|
33
|
+
hex
|
|
34
|
+
} = colorValue;
|
|
35
|
+
if (hex) {
|
|
36
|
+
onChange(hex);
|
|
37
|
+
}
|
|
38
|
+
}, [colorValue]);
|
|
39
|
+
return (
|
|
40
|
+
/*#__PURE__*/
|
|
41
|
+
// eslint-disable-next-line jsx-a11y/control-has-associated-label
|
|
42
|
+
React.createElement("div", {
|
|
43
|
+
id: id,
|
|
44
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
45
|
+
style: style,
|
|
46
|
+
ref: parentRef
|
|
47
|
+
// {...otherProps}
|
|
48
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
49
|
+
type: "button",
|
|
50
|
+
onClick: () => setIsOpen(!isOpen)
|
|
51
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
52
|
+
className: "icon"
|
|
53
|
+
}, icon), /*#__PURE__*/React.createElement("span", {
|
|
54
|
+
className: "icon"
|
|
55
|
+
}, "V")), /*#__PURE__*/React.createElement(Popover, {
|
|
56
|
+
parentRef: parentRef,
|
|
57
|
+
isOpen: isOpen,
|
|
58
|
+
color: "background-far"
|
|
59
|
+
}, /*#__PURE__*/React.createElement(ReactColorPicker, {
|
|
60
|
+
color: colorValue,
|
|
61
|
+
onChange: setColor,
|
|
62
|
+
hideInput: true
|
|
63
|
+
})))
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
ColorPicker.propTypes = {
|
|
67
|
+
/**
|
|
68
|
+
* The HTML id for this element
|
|
69
|
+
*/
|
|
70
|
+
id: PropTypes.string,
|
|
71
|
+
/**
|
|
72
|
+
* The HTML class names for this element
|
|
73
|
+
*/
|
|
74
|
+
className: PropTypes.string,
|
|
75
|
+
/**
|
|
76
|
+
* The React-written, css properties for this element.
|
|
77
|
+
*/
|
|
78
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
79
|
+
/**
|
|
80
|
+
* The required default hex value for the color picker
|
|
81
|
+
*/
|
|
82
|
+
defaultColorHex: PropTypes.string
|
|
83
|
+
};
|
|
84
|
+
ColorPicker.defaultProps = {
|
|
85
|
+
defaultColorHex: '#ffffff'
|
|
86
|
+
};
|
|
87
|
+
export default ColorPicker;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
@use "react-color-palette/css";
|
|
5
|
+
|
|
6
|
+
$default-width: 20rem;
|
|
7
|
+
|
|
8
|
+
.#{bem.$base}.color-picker {
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
position: relative;
|
|
11
|
+
|
|
12
|
+
> button {
|
|
13
|
+
align-items: center;
|
|
14
|
+
background-color: var(--x);
|
|
15
|
+
border: 0;
|
|
16
|
+
color: var(--on-background-inputs);
|
|
17
|
+
display: flex;
|
|
18
|
+
gap: calc(var(--gap) / 2);
|
|
19
|
+
padding: calc(var(--theme-default-padding) / 2);
|
|
20
|
+
|
|
21
|
+
&:hover {
|
|
22
|
+
background: var(--hard-x);
|
|
23
|
+
border-radius: calc(var(--theme-default-border-radius) / 2);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
> .#{bem.$base}.popover {
|
|
29
|
+
background-color: var(--background-far);
|
|
30
|
+
border: 1px solid var(--hard-background-cards);
|
|
31
|
+
border-radius: calc(var(--theme-default-border-radius) / 2);
|
|
32
|
+
color: var(--heading);
|
|
33
|
+
padding: calc(var(--theme-default-padding) / 2);
|
|
34
|
+
width: $default-width;
|
|
35
|
+
}
|
|
36
|
+
}
|