@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
|
@@ -4,17 +4,17 @@ 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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
10
|
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
10
11
|
var _formik = require("formik");
|
|
11
12
|
var _common = require("../../common");
|
|
13
|
+
require("./styles.scss");
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function
|
|
14
|
-
function
|
|
15
|
-
function
|
|
16
|
-
// Local Definitions
|
|
17
|
-
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /* @pareto-engineering/generator-front 1.0.12 */ // Local Definitions
|
|
18
18
|
const baseClassName = _exports.default.base;
|
|
19
19
|
const componentClassName = 'text-input';
|
|
20
20
|
|
|
@@ -32,42 +32,45 @@ const TextInput = _ref => {
|
|
|
32
32
|
color,
|
|
33
33
|
labelColor,
|
|
34
34
|
validate,
|
|
35
|
-
oneInputLabel,
|
|
36
35
|
description,
|
|
37
36
|
disabled,
|
|
38
37
|
placeholder,
|
|
39
38
|
optional,
|
|
40
|
-
autoComplete
|
|
41
|
-
|
|
39
|
+
autoComplete,
|
|
40
|
+
symbol,
|
|
41
|
+
...otherProps
|
|
42
42
|
} = _ref;
|
|
43
|
-
(0, React.useInsertionEffect)(() => {
|
|
44
|
-
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
45
|
-
}, []);
|
|
46
43
|
const [field] = (0, _formik.useField)({
|
|
47
44
|
name,
|
|
48
45
|
validate
|
|
49
46
|
});
|
|
47
|
+
const symbolStyle = symbol ? {
|
|
48
|
+
'--symbol': symbol
|
|
49
|
+
} : {};
|
|
50
|
+
const InputWrapper = symbol ? 'div' : React.Fragment;
|
|
51
|
+
const inputWrapperProps = symbol ? {
|
|
52
|
+
className: 'input-wrapper'
|
|
53
|
+
} : {};
|
|
50
54
|
return /*#__PURE__*/React.createElement("div", {
|
|
51
55
|
id: id,
|
|
52
|
-
className: [baseClassName, componentClassName, userClassName, `y-${color}`].filter(e => e).join(' '),
|
|
53
|
-
style:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
className: [baseClassName, componentClassName, userClassName, `y-${color} ${symbol ? 'has-symbol' : ''}`].filter(e => e).join(' '),
|
|
57
|
+
style: {
|
|
58
|
+
...symbolStyle,
|
|
59
|
+
...style
|
|
60
|
+
}
|
|
61
|
+
}, label && /*#__PURE__*/React.createElement(_common.FormLabel, {
|
|
57
62
|
name: name,
|
|
58
63
|
color: labelColor,
|
|
59
64
|
optional: optional
|
|
60
|
-
}, label), /*#__PURE__*/React.createElement("
|
|
61
|
-
className: "input-wrapper with-faded-border"
|
|
62
|
-
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
65
|
+
}, label), /*#__PURE__*/React.createElement(InputWrapper, inputWrapperProps, /*#__PURE__*/React.createElement("input", _extends({
|
|
63
66
|
id: name,
|
|
64
67
|
className: "input",
|
|
65
68
|
type: type,
|
|
66
69
|
disabled: disabled,
|
|
67
70
|
placeholder: placeholder,
|
|
68
71
|
autoComplete: autoComplete
|
|
69
|
-
}, field))), /*#__PURE__*/React.createElement(_common.FormDescription, {
|
|
70
|
-
className: "
|
|
72
|
+
}, field, otherProps))), /*#__PURE__*/React.createElement(_common.FormDescription, {
|
|
73
|
+
className: "s-1",
|
|
71
74
|
description: description,
|
|
72
75
|
name: name
|
|
73
76
|
}));
|
|
@@ -133,12 +136,15 @@ TextInput.propTypes = {
|
|
|
133
136
|
* The autoComplete value that the browser should watch for the input
|
|
134
137
|
* `https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete`
|
|
135
138
|
*/
|
|
136
|
-
autoComplete: _propTypes.default.string
|
|
139
|
+
autoComplete: _propTypes.default.string,
|
|
140
|
+
/**
|
|
141
|
+
* A symbol to be set inside the input field
|
|
142
|
+
*/
|
|
143
|
+
symbol: _propTypes.default.string
|
|
137
144
|
};
|
|
138
145
|
TextInput.defaultProps = {
|
|
139
146
|
type: 'text',
|
|
140
|
-
color: '
|
|
147
|
+
color: 'paragraph',
|
|
141
148
|
disabled: false
|
|
142
149
|
};
|
|
143
|
-
var _default = /*#__PURE__*/(0,
|
|
144
|
-
exports.default = _default;
|
|
150
|
+
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(TextInput);
|
|
@@ -1,44 +1,81 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
|
|
3
3
|
@use "@pareto-engineering/bem";
|
|
4
|
-
@use "
|
|
4
|
+
@use "@pareto-engineering/styles/src/mixins";
|
|
5
|
+
@use "@pareto-engineering/styles/src/globals" as *;
|
|
5
6
|
|
|
6
|
-
$default-padding: .
|
|
7
|
+
$default-padding: .55em .75em;
|
|
8
|
+
$default-symbol-left: 1em;
|
|
9
|
+
$default-padding-with-symbol:
|
|
10
|
+
.55em
|
|
11
|
+
calc($default-symbol-left - 1em)
|
|
12
|
+
.55em
|
|
13
|
+
calc($default-symbol-left + 1em);
|
|
7
14
|
$default-input-border-radius: var(--theme-default-input-border-radius);
|
|
8
|
-
|
|
15
|
+
$default-border: var(--theme-default-input-border);
|
|
16
|
+
$hover-border: var(--theme-hover-input-border);
|
|
17
|
+
$focus-border: var(--theme-focus-input-border);
|
|
18
|
+
$default-background: var(--background-inputs);
|
|
19
|
+
$disabled-background: var(--background-inputs-30);
|
|
9
20
|
|
|
10
21
|
.#{bem.$base}.text-input {
|
|
11
22
|
display: flex;
|
|
12
23
|
flex-direction: column;
|
|
13
24
|
|
|
14
|
-
|
|
15
|
-
|
|
25
|
+
> .#{bem.$base}.form-label {
|
|
26
|
+
margin-bottom: var(--gap);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.has-symbol {
|
|
30
|
+
> .input-wrapper {
|
|
31
|
+
position: relative;
|
|
16
32
|
|
|
17
|
-
|
|
18
|
-
|
|
33
|
+
&::before {
|
|
34
|
+
color: var(--y);
|
|
35
|
+
content: var(--symbol);
|
|
36
|
+
left: $default-symbol-left;
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: 50%;
|
|
39
|
+
transform: translate(-50%, -50%);
|
|
40
|
+
}
|
|
19
41
|
}
|
|
20
42
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
border-radius: $default-input-border-radius;
|
|
24
|
-
color: var(--x);
|
|
25
|
-
height: 100%;
|
|
26
|
-
padding: $default-padding;
|
|
27
|
-
width: 100%;
|
|
43
|
+
input {
|
|
44
|
+
padding: $default-padding-with-symbol;
|
|
28
45
|
|
|
29
|
-
|
|
30
|
-
|
|
46
|
+
&::-webkit-outer-spin-button,
|
|
47
|
+
&::-webkit-inner-spin-button {
|
|
48
|
+
margin-right: calc($default-symbol-left / 4);
|
|
31
49
|
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
32
52
|
|
|
33
|
-
|
|
34
|
-
|
|
53
|
+
.input {
|
|
54
|
+
background-color: $default-background;
|
|
55
|
+
border: $default-border;
|
|
56
|
+
border-radius: $default-input-border-radius;
|
|
57
|
+
color: var(--y);
|
|
58
|
+
outline: none;
|
|
59
|
+
padding: $default-padding;
|
|
60
|
+
width: 100%;
|
|
61
|
+
|
|
62
|
+
&::placeholder {
|
|
63
|
+
color: var(--metadata);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:disabled {
|
|
67
|
+
background-color: $disabled-background;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:not(:disabled) {
|
|
71
|
+
&:hover,
|
|
72
|
+
&:active {
|
|
73
|
+
border: $hover-border;
|
|
35
74
|
}
|
|
36
75
|
|
|
37
|
-
&:
|
|
38
|
-
border
|
|
39
|
-
box-shadow: var(--theme-default-input-box-shadow);
|
|
76
|
+
&:focus {
|
|
77
|
+
border: $focus-border;
|
|
40
78
|
}
|
|
41
79
|
}
|
|
42
80
|
}
|
|
43
81
|
}
|
|
44
|
-
|
|
@@ -4,15 +4,17 @@ 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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
10
|
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
10
11
|
var _formik = require("formik");
|
|
12
|
+
require("./styles.scss");
|
|
11
13
|
var _common = require("../../common");
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function
|
|
14
|
-
function
|
|
15
|
-
function
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /* @pareto-engineering/generator-front 1.0.12 */ // Local Definitions
|
|
16
18
|
const baseClassName = _exports.default.base;
|
|
17
19
|
const componentClassName = 'text-area-input';
|
|
18
20
|
|
|
@@ -27,11 +29,9 @@ const TextareaInput = _ref => {
|
|
|
27
29
|
name,
|
|
28
30
|
label,
|
|
29
31
|
validate,
|
|
30
|
-
|
|
31
|
-
textAreaId,
|
|
32
|
+
color,
|
|
32
33
|
rows,
|
|
33
34
|
optional,
|
|
34
|
-
textAreaColor,
|
|
35
35
|
labelColor,
|
|
36
36
|
description,
|
|
37
37
|
disabled,
|
|
@@ -40,25 +40,20 @@ const TextareaInput = _ref => {
|
|
|
40
40
|
resize
|
|
41
41
|
// ...otherProps
|
|
42
42
|
} = _ref;
|
|
43
|
-
(0, React.useInsertionEffect)(() => {
|
|
44
|
-
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
45
|
-
}, []);
|
|
46
43
|
const [field] = (0, _formik.useField)({
|
|
47
44
|
name,
|
|
48
45
|
validate
|
|
49
46
|
});
|
|
50
47
|
return /*#__PURE__*/React.createElement("div", {
|
|
51
48
|
id: id,
|
|
52
|
-
className: [baseClassName, componentClassName, userClassName, `y-${
|
|
49
|
+
className: [baseClassName, componentClassName, userClassName, `y-${color}`].filter(e => e).join(' '),
|
|
53
50
|
style: style
|
|
54
|
-
|
|
55
|
-
}, /*#__PURE__*/React.createElement(_common.FormLabel, {
|
|
56
|
-
className: [labelAsDescription ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
|
|
51
|
+
}, label && /*#__PURE__*/React.createElement(_common.FormLabel, {
|
|
57
52
|
name: name,
|
|
58
53
|
color: labelColor,
|
|
59
54
|
optional: optional
|
|
60
55
|
}, label), /*#__PURE__*/React.createElement("textarea", _extends({
|
|
61
|
-
id:
|
|
56
|
+
id: name,
|
|
62
57
|
className: "textarea"
|
|
63
58
|
}, field, {
|
|
64
59
|
style: {
|
|
@@ -69,7 +64,7 @@ const TextareaInput = _ref => {
|
|
|
69
64
|
disabled: disabled,
|
|
70
65
|
autoComplete: autoComplete
|
|
71
66
|
})), /*#__PURE__*/React.createElement(_common.FormDescription, {
|
|
72
|
-
className: "
|
|
67
|
+
className: "s-1",
|
|
73
68
|
description: description,
|
|
74
69
|
name: name
|
|
75
70
|
}));
|
|
@@ -112,9 +107,9 @@ TextareaInput.propTypes = {
|
|
|
112
107
|
*/
|
|
113
108
|
rows: _propTypes.default.number,
|
|
114
109
|
/**
|
|
115
|
-
*
|
|
110
|
+
* Color of the text
|
|
116
111
|
*/
|
|
117
|
-
|
|
112
|
+
color: _propTypes.default.string,
|
|
118
113
|
/**
|
|
119
114
|
* Label base color
|
|
120
115
|
*/
|
|
@@ -146,10 +141,9 @@ TextareaInput.propTypes = {
|
|
|
146
141
|
optional: _propTypes.default.bool
|
|
147
142
|
};
|
|
148
143
|
TextareaInput.defaultProps = {
|
|
149
|
-
rows:
|
|
150
|
-
textAreaColor: 'background2',
|
|
144
|
+
rows: 10,
|
|
151
145
|
disabled: false,
|
|
152
|
-
resize: 'vertical'
|
|
146
|
+
resize: 'vertical',
|
|
147
|
+
color: 'paragraph'
|
|
153
148
|
};
|
|
154
|
-
var _default = /*#__PURE__*/(0,
|
|
155
|
-
exports.default = _default;
|
|
149
|
+
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(TextareaInput);
|
|
@@ -1,33 +1,53 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
|
|
3
3
|
@use "@pareto-engineering/bem";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
@use "@pareto-engineering/styles/src/mixins";
|
|
5
|
+
@use "@pareto-engineering/styles/src/globals" as *;
|
|
6
|
+
|
|
7
|
+
$default-padding: .55em .75em;
|
|
8
|
+
$default-border: 1px solid var(--outline-inputs);
|
|
9
|
+
$default-input-border-radius: var(--theme-default-input-border-radius);
|
|
10
|
+
$default-border: var(--theme-default-input-border);
|
|
11
|
+
$hover-border: var(--theme-hover-input-border);
|
|
12
|
+
$focus-border: var(--theme-focus-input-border);
|
|
13
|
+
$default-background: var(--background-inputs);
|
|
14
|
+
$disabled-background: var(--background-inputs-30);
|
|
6
15
|
|
|
7
16
|
.#{bem.$base}.text-area-input {
|
|
8
17
|
display: flex;
|
|
9
18
|
flex-direction: column;
|
|
10
19
|
|
|
11
|
-
.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
> .#{bem.$base}.form-label {
|
|
21
|
+
margin-bottom: var(--gap);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
> .textarea {
|
|
26
|
+
background: $default-background;
|
|
27
|
+
border: $default-border;
|
|
28
|
+
border-radius: $default-input-border-radius;
|
|
29
|
+
color: var(--y);
|
|
30
|
+
outline: none;
|
|
15
31
|
padding: $default-padding;
|
|
32
|
+
width: 100%;
|
|
16
33
|
|
|
17
34
|
&::placeholder {
|
|
18
35
|
color: var(--metadata);
|
|
19
36
|
}
|
|
20
37
|
|
|
21
|
-
&:not(:disabled):hover {
|
|
22
|
-
border: var(--theme-border-style) var(--soft-background4);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
38
|
&:disabled {
|
|
26
|
-
background-color:
|
|
39
|
+
background-color: $disabled-background;
|
|
27
40
|
}
|
|
28
41
|
|
|
29
|
-
&:
|
|
30
|
-
|
|
42
|
+
&:not(:disabled) {
|
|
43
|
+
&:hover,
|
|
44
|
+
&:active {
|
|
45
|
+
border: $hover-border;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:focus {
|
|
49
|
+
border: $focus-border;
|
|
50
|
+
}
|
|
31
51
|
}
|
|
32
52
|
}
|
|
33
53
|
}
|
|
@@ -15,6 +15,18 @@ Object.defineProperty(exports, "ChoicesInput", {
|
|
|
15
15
|
return _ChoicesInput.ChoicesInput;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "EditorInput", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _EditorInput.EditorInput;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "LinkInput", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _LinkInput.LinkInput;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
18
30
|
Object.defineProperty(exports, "QueryChoices", {
|
|
19
31
|
enumerable: true,
|
|
20
32
|
get: function () {
|
|
@@ -65,4 +77,6 @@ var _RatingsInput = require("./RatingsInput");
|
|
|
65
77
|
var _QueryCombobox = require("./QueryCombobox");
|
|
66
78
|
var _QuerySelect = require("./QuerySelect");
|
|
67
79
|
var _Checkbox = require("./Checkbox");
|
|
68
|
-
var _QueryChoices = require("./QueryChoices");
|
|
80
|
+
var _QueryChoices = require("./QueryChoices");
|
|
81
|
+
var _LinkInput = require("./LinkInput");
|
|
82
|
+
var _EditorInput = require("./EditorInput");
|
package/dist/cjs/form.scss
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use "form-reset.scss";
|
|
2
2
|
|
|
3
|
-
$form-input-border-bottom: 1px solid var(--hard-
|
|
3
|
+
$form-input-border-bottom: 1px solid var(--hard-background-far);
|
|
4
4
|
$form-input-on-focus-border-bottom: 1px solid var(--soft-main1);
|
|
5
5
|
$form-input-on-error-border-bottom: 1px solid var(--error);
|
|
6
6
|
$label-input-heigth-width: 100%;
|
|
@@ -0,0 +1,97 @@
|
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
11
|
+
var _common = require("./common");
|
|
12
|
+
require("./styles.scss");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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; }
|
|
16
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /* @pareto-engineering/generator-front 1.0.12 */ // Local Definitions
|
|
17
|
+
const baseClassName = _exports.default.base;
|
|
18
|
+
const componentClassName = 'drag-and-drop';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* This is the component description.
|
|
22
|
+
*/
|
|
23
|
+
const DragAndDrop = _ref => {
|
|
24
|
+
let {
|
|
25
|
+
id,
|
|
26
|
+
className: userClassName,
|
|
27
|
+
style,
|
|
28
|
+
as: Wrapper,
|
|
29
|
+
onOrderChange,
|
|
30
|
+
items
|
|
31
|
+
// ...otherProps
|
|
32
|
+
} = _ref;
|
|
33
|
+
const [draggableItems, setDraggableItems] = (0, _react.useState)(items);
|
|
34
|
+
const handleDrop = (e, dragOverItemIndex) => {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
const dragItemIndex = e.dataTransfer.getData('text');
|
|
37
|
+
const orderedItems = [...draggableItems];
|
|
38
|
+
const [reorderedItem] = orderedItems.splice(dragItemIndex, 1);
|
|
39
|
+
orderedItems.splice(dragOverItemIndex, 0, reorderedItem);
|
|
40
|
+
setDraggableItems(orderedItems);
|
|
41
|
+
onOrderChange?.(orderedItems);
|
|
42
|
+
};
|
|
43
|
+
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
44
|
+
id: id,
|
|
45
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
46
|
+
style: style
|
|
47
|
+
// {...otherProps}
|
|
48
|
+
}, draggableItems.map((_ref2, index) => {
|
|
49
|
+
let {
|
|
50
|
+
identifier,
|
|
51
|
+
disabled,
|
|
52
|
+
Content,
|
|
53
|
+
...rest
|
|
54
|
+
} = _ref2;
|
|
55
|
+
return /*#__PURE__*/React.createElement(_common.DraggableItem, _extends({
|
|
56
|
+
draggable: true,
|
|
57
|
+
onDrop: e => handleDrop(e, index),
|
|
58
|
+
index: index,
|
|
59
|
+
key: identifier
|
|
60
|
+
}, rest), Content);
|
|
61
|
+
}));
|
|
62
|
+
};
|
|
63
|
+
DragAndDrop.propTypes = {
|
|
64
|
+
/**
|
|
65
|
+
* The HTML id for this element
|
|
66
|
+
*/
|
|
67
|
+
id: _propTypes.default.string,
|
|
68
|
+
/**
|
|
69
|
+
* The HTML class names for this element
|
|
70
|
+
*/
|
|
71
|
+
className: _propTypes.default.string,
|
|
72
|
+
/**
|
|
73
|
+
* The React-written, css properties for this element.
|
|
74
|
+
*/
|
|
75
|
+
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
76
|
+
/**
|
|
77
|
+
* The html element to use to display this component.
|
|
78
|
+
*/
|
|
79
|
+
as: _propTypes.default.string,
|
|
80
|
+
/**
|
|
81
|
+
* The node list of items to be dragged around
|
|
82
|
+
*/
|
|
83
|
+
items: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
84
|
+
Content: _propTypes.default.node.isRequired,
|
|
85
|
+
identifier: _propTypes.default.string.isRequired,
|
|
86
|
+
as: _propTypes.default.string
|
|
87
|
+
})).isRequired,
|
|
88
|
+
/*
|
|
89
|
+
* A function to be called when the draggable items are re-ordered
|
|
90
|
+
*/
|
|
91
|
+
onOrderChange: _propTypes.default.func
|
|
92
|
+
};
|
|
93
|
+
DragAndDrop.defaultProps = {
|
|
94
|
+
as: 'ul'
|
|
95
|
+
};
|
|
96
|
+
DragAndDrop.DraggableItem = _common.DraggableItem;
|
|
97
|
+
var _default = exports.default = DragAndDrop;
|
|
@@ -0,0 +1,80 @@
|
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
11
|
+
require("./styles.scss");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /* @pareto-engineering/generator-front 1.0.12 */
|
|
16
|
+
// Local Definitions
|
|
17
|
+
|
|
18
|
+
const baseClassName = _exports.default.base;
|
|
19
|
+
const componentClassName = 'draggable-item';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* This is the component description.
|
|
23
|
+
*/
|
|
24
|
+
const DraggableItem = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
id,
|
|
27
|
+
className: userClassName,
|
|
28
|
+
style,
|
|
29
|
+
as: Wrapper,
|
|
30
|
+
children,
|
|
31
|
+
index,
|
|
32
|
+
...otherProps
|
|
33
|
+
} = _ref;
|
|
34
|
+
const [isDragging, setIsDragging] = (0, _react.useState)(false);
|
|
35
|
+
const handleDragStart = e => {
|
|
36
|
+
setIsDragging(true);
|
|
37
|
+
e.dataTransfer.effectAllowed = 'move';
|
|
38
|
+
e.dataTransfer.setData('text/plain', index);
|
|
39
|
+
};
|
|
40
|
+
const handleDragEnd = () => {
|
|
41
|
+
setIsDragging(false);
|
|
42
|
+
};
|
|
43
|
+
const handleDragOver = e => {
|
|
44
|
+
e.preventDefault();
|
|
45
|
+
};
|
|
46
|
+
return /*#__PURE__*/React.createElement(Wrapper, _extends({
|
|
47
|
+
id: id,
|
|
48
|
+
className: [baseClassName, componentClassName, userClassName, isDragging && 'dragging'].filter(e => e).join(' '),
|
|
49
|
+
style: style,
|
|
50
|
+
onDragStart: e => handleDragStart(e),
|
|
51
|
+
onDragOver: e => handleDragOver(e),
|
|
52
|
+
onDragEnd: e => handleDragEnd(e)
|
|
53
|
+
}, otherProps), children);
|
|
54
|
+
};
|
|
55
|
+
DraggableItem.propTypes = {
|
|
56
|
+
/**
|
|
57
|
+
* The HTML id for this element
|
|
58
|
+
*/
|
|
59
|
+
id: _propTypes.default.string,
|
|
60
|
+
/**
|
|
61
|
+
* The HTML class names for this element
|
|
62
|
+
*/
|
|
63
|
+
className: _propTypes.default.string,
|
|
64
|
+
/**
|
|
65
|
+
* The React-written, css properties for this element.
|
|
66
|
+
*/
|
|
67
|
+
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
68
|
+
/**
|
|
69
|
+
* The children JSX
|
|
70
|
+
*/
|
|
71
|
+
children: _propTypes.default.node,
|
|
72
|
+
/**
|
|
73
|
+
* The html element to use to display this component.
|
|
74
|
+
*/
|
|
75
|
+
as: _propTypes.default.string
|
|
76
|
+
};
|
|
77
|
+
DraggableItem.defaultProps = {
|
|
78
|
+
as: 'li'
|
|
79
|
+
};
|
|
80
|
+
var _default = exports.default = DraggableItem;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "DraggableItem", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _DraggableItem.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _DraggableItem = _interopRequireDefault(require("./DraggableItem"));
|
|
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, "DraggableItem", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _DraggableItem.DraggableItem;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _DraggableItem = require("./DraggableItem");
|
|
@@ -0,0 +1,13 @@
|
|
|
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.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _DragAndDrop = _interopRequireDefault(require("./DragAndDrop"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|