@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,14 +4,20 @@ 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 _formik = require("formik");
|
|
9
10
|
var _reactRelay = require("react-relay");
|
|
10
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
+
require("./styles.scss");
|
|
11
13
|
var _common = require("./common");
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function _getRequireWildcardCache(
|
|
14
|
-
function _interopRequireWildcard(
|
|
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
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
18
|
+
|
|
19
|
+
// Local Definitions
|
|
20
|
+
|
|
15
21
|
/**
|
|
16
22
|
* This is the component description.
|
|
17
23
|
*/
|
|
@@ -24,6 +30,8 @@ const QueryCombobox = _ref => {
|
|
|
24
30
|
multiple,
|
|
25
31
|
name,
|
|
26
32
|
label,
|
|
33
|
+
labelColor,
|
|
34
|
+
getTagColor,
|
|
27
35
|
color,
|
|
28
36
|
optional,
|
|
29
37
|
description,
|
|
@@ -34,12 +42,11 @@ const QueryCombobox = _ref => {
|
|
|
34
42
|
optionsKeyMap,
|
|
35
43
|
minLength,
|
|
36
44
|
transformSearch,
|
|
37
|
-
validate
|
|
45
|
+
validate,
|
|
46
|
+
placeholder,
|
|
47
|
+
promptCreateNewOption
|
|
38
48
|
// ...otherProps
|
|
39
49
|
} = _ref;
|
|
40
|
-
(0, React.useInsertionEffect)(() => {
|
|
41
|
-
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
42
|
-
}, []);
|
|
43
50
|
const [, meta, helpers] = (0, _formik.useField)({
|
|
44
51
|
name,
|
|
45
52
|
validate
|
|
@@ -52,8 +59,8 @@ const QueryCombobox = _ref => {
|
|
|
52
59
|
value
|
|
53
60
|
} = meta;
|
|
54
61
|
const environment = (0, _reactRelay.useRelayEnvironment)();
|
|
55
|
-
const [isFetching, setIsFetching] = (0,
|
|
56
|
-
const [options, setOptions] = (0,
|
|
62
|
+
const [isFetching, setIsFetching] = (0, _react.useState)(false);
|
|
63
|
+
const [options, setOptions] = (0, _react.useState)([]);
|
|
57
64
|
const {
|
|
58
65
|
graphql,
|
|
59
66
|
accessor
|
|
@@ -98,10 +105,13 @@ const QueryCombobox = _ref => {
|
|
|
98
105
|
style,
|
|
99
106
|
options,
|
|
100
107
|
getOptions,
|
|
108
|
+
setOptions,
|
|
101
109
|
debounceMs,
|
|
102
110
|
disabled,
|
|
103
111
|
name,
|
|
104
112
|
label,
|
|
113
|
+
labelColor,
|
|
114
|
+
getTagColor,
|
|
105
115
|
optional,
|
|
106
116
|
description,
|
|
107
117
|
setValue,
|
|
@@ -110,7 +120,9 @@ const QueryCombobox = _ref => {
|
|
|
110
120
|
isFetching,
|
|
111
121
|
className,
|
|
112
122
|
minLength,
|
|
113
|
-
transformSearch
|
|
123
|
+
transformSearch,
|
|
124
|
+
placeholder,
|
|
125
|
+
promptCreateNewOption
|
|
114
126
|
};
|
|
115
127
|
const Input = multiple ? _common.MultipleCombobox : _common.Combobox;
|
|
116
128
|
return /*#__PURE__*/React.createElement(Input, comboboxProps);
|
|
@@ -136,6 +148,10 @@ QueryCombobox.propTypes = {
|
|
|
136
148
|
* The label of the custom select input
|
|
137
149
|
*/
|
|
138
150
|
label: _propTypes.default.string,
|
|
151
|
+
/**
|
|
152
|
+
* The label color of the custom select input
|
|
153
|
+
*/
|
|
154
|
+
labelColor: _propTypes.default.string,
|
|
139
155
|
/**
|
|
140
156
|
* The custom select input description
|
|
141
157
|
*/
|
|
@@ -145,7 +161,7 @@ QueryCombobox.propTypes = {
|
|
|
145
161
|
*/
|
|
146
162
|
disabled: _propTypes.default.bool,
|
|
147
163
|
/**
|
|
148
|
-
* The base color of the
|
|
164
|
+
* The base color of the tiles
|
|
149
165
|
*/
|
|
150
166
|
color: _propTypes.default.string,
|
|
151
167
|
/**
|
|
@@ -194,7 +210,20 @@ QueryCombobox.propTypes = {
|
|
|
194
210
|
/*
|
|
195
211
|
* Whether the input is optional or not
|
|
196
212
|
*/
|
|
197
|
-
optional: _propTypes.default.bool
|
|
213
|
+
optional: _propTypes.default.bool,
|
|
214
|
+
/**
|
|
215
|
+
* Whether to prompt the user to create a new option if the search input
|
|
216
|
+
* does not match any of the options
|
|
217
|
+
*/
|
|
218
|
+
promptCreateNewOption: _propTypes.default.bool,
|
|
219
|
+
/**
|
|
220
|
+
* The placeholder text for the input
|
|
221
|
+
* */
|
|
222
|
+
placeholder: _propTypes.default.string,
|
|
223
|
+
/**
|
|
224
|
+
* The function to get the color of the tag
|
|
225
|
+
* */
|
|
226
|
+
getTagColor: _propTypes.default.func
|
|
198
227
|
};
|
|
199
228
|
QueryCombobox.defaultProps = {
|
|
200
229
|
optionsKeyMap: {
|
|
@@ -202,11 +231,11 @@ QueryCombobox.defaultProps = {
|
|
|
202
231
|
getLabel: node => node.name
|
|
203
232
|
},
|
|
204
233
|
multiple: false,
|
|
205
|
-
color: '
|
|
234
|
+
color: 'interactive',
|
|
206
235
|
searchVariable: 'search',
|
|
207
236
|
transformSearch: search => search,
|
|
208
237
|
minLength: 2,
|
|
209
|
-
disabled: false
|
|
238
|
+
disabled: false,
|
|
239
|
+
promptCreateNewOption: false
|
|
210
240
|
};
|
|
211
|
-
var _default = QueryCombobox;
|
|
212
|
-
exports.default = _default;
|
|
241
|
+
var _default = exports.default = QueryCombobox;
|
|
@@ -4,18 +4,20 @@ 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 _downshift = require("downshift");
|
|
10
11
|
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
11
12
|
var _ = require("../../../..");
|
|
12
13
|
var _a = require("../../../../../a");
|
|
13
14
|
var _b = require("../../../../../b");
|
|
15
|
+
var _common = require("../../../../common");
|
|
14
16
|
var _Menu = require("../Menu");
|
|
15
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
function _getRequireWildcardCache(
|
|
17
|
-
function _interopRequireWildcard(
|
|
18
|
-
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); }
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
20
|
+
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
|
|
19
21
|
const baseClassName = _exports.default.base;
|
|
20
22
|
const componentClassName = 'combobox';
|
|
21
23
|
|
|
@@ -28,9 +30,11 @@ const Combobox = _ref => {
|
|
|
28
30
|
className: userClassName,
|
|
29
31
|
style,
|
|
30
32
|
label,
|
|
33
|
+
labelColor,
|
|
31
34
|
name,
|
|
32
35
|
options: items,
|
|
33
36
|
getOptions,
|
|
37
|
+
setOptions,
|
|
34
38
|
setValue,
|
|
35
39
|
description,
|
|
36
40
|
value,
|
|
@@ -39,7 +43,9 @@ const Combobox = _ref => {
|
|
|
39
43
|
isFetching,
|
|
40
44
|
transformSearch,
|
|
41
45
|
disabled,
|
|
42
|
-
optional
|
|
46
|
+
optional,
|
|
47
|
+
placeholder,
|
|
48
|
+
promptCreateNewOption
|
|
43
49
|
// ...otherProps
|
|
44
50
|
} = _ref;
|
|
45
51
|
const {
|
|
@@ -68,58 +74,71 @@ const Combobox = _ref => {
|
|
|
68
74
|
}
|
|
69
75
|
}
|
|
70
76
|
});
|
|
77
|
+
(0, _react.useEffect)(() => {
|
|
78
|
+
if (promptCreateNewOption) {
|
|
79
|
+
(0, _common.lookUpInputValueFromFetchedOptions)({
|
|
80
|
+
items,
|
|
81
|
+
inputValue,
|
|
82
|
+
setOptions,
|
|
83
|
+
minLength
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}, [inputValue, items, promptCreateNewOption]);
|
|
71
87
|
|
|
72
88
|
// If the user has selected an item, we'll set the value of the field
|
|
73
89
|
// or if the combobox state has a selected item, we'll set the value to the formik state
|
|
74
|
-
(0,
|
|
90
|
+
(0, _react.useEffect)(() => {
|
|
75
91
|
if (selectedItem) {
|
|
76
92
|
setValue(selectedItem);
|
|
77
93
|
}
|
|
78
94
|
}, [selectedItem]);
|
|
79
95
|
|
|
80
96
|
// If the formik state has a value, we'll set the selected item to the combobox state
|
|
81
|
-
(0,
|
|
97
|
+
(0, _react.useEffect)(() => {
|
|
82
98
|
if (value?.value !== selectedItem?.value) {
|
|
83
99
|
selectItem(value);
|
|
84
100
|
}
|
|
85
101
|
}, [value]);
|
|
86
|
-
const parentRef = (0,
|
|
102
|
+
const parentRef = (0, _react.useRef)(null);
|
|
87
103
|
const resetInputValue = () => setInputValue('');
|
|
88
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
104
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
89
105
|
id: id,
|
|
90
106
|
className: [baseClassName, componentClassName, userClassName, `y-${color}`].filter(e => e).join(' '),
|
|
91
107
|
style: style,
|
|
92
108
|
ref: parentRef
|
|
93
|
-
}, /*#__PURE__*/React.createElement(_.FormLabel, _extends({}, getLabelProps(), {
|
|
109
|
+
}, getComboboxProps()), /*#__PURE__*/React.createElement(_.FormLabel, _extends({}, getLabelProps(), {
|
|
94
110
|
name: name,
|
|
95
|
-
optional: optional
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
111
|
+
optional: optional,
|
|
112
|
+
color: labelColor
|
|
113
|
+
}), label), /*#__PURE__*/React.createElement("div", {
|
|
114
|
+
className: "input-container"
|
|
115
|
+
}, /*#__PURE__*/React.createElement("input", _extends({}, getInputProps(), {
|
|
99
116
|
className: "input",
|
|
100
|
-
disabled: disabled
|
|
117
|
+
disabled: disabled,
|
|
118
|
+
placeholder: placeholder
|
|
101
119
|
})), isFetching && /*#__PURE__*/React.createElement(_a.LoadingCircle, {
|
|
102
|
-
className: "x-
|
|
120
|
+
className: "x-main"
|
|
103
121
|
}), inputValue.length > minLength && !isFetching && /*#__PURE__*/React.createElement(_b.Button, {
|
|
104
122
|
isSimple: true,
|
|
105
123
|
isCompact: true,
|
|
106
|
-
color: "
|
|
124
|
+
color: "heading",
|
|
107
125
|
onClick: resetInputValue
|
|
108
126
|
}, /*#__PURE__*/React.createElement("span", {
|
|
109
|
-
className: "
|
|
110
|
-
}, "Y"))), /*#__PURE__*/React.createElement(
|
|
127
|
+
className: "icon"
|
|
128
|
+
}, "Y"))), /*#__PURE__*/React.createElement(_.FormDescription, {
|
|
129
|
+
className: "s-1",
|
|
130
|
+
description: description,
|
|
131
|
+
name: name
|
|
132
|
+
}), /*#__PURE__*/React.createElement(_a.Popover, {
|
|
111
133
|
isOpen: isOpen,
|
|
112
134
|
parentRef: parentRef
|
|
113
135
|
}, /*#__PURE__*/React.createElement(_Menu.Menu, _extends({
|
|
136
|
+
className: `y-${color}`,
|
|
114
137
|
isOpen: isOpen,
|
|
115
138
|
getItemProps: getItemProps,
|
|
116
139
|
highlightedIndex: highlightedIndex,
|
|
117
140
|
items: items
|
|
118
|
-
}, getMenuProps())))
|
|
119
|
-
className: "v50 mt-v s-1",
|
|
120
|
-
description: description,
|
|
121
|
-
name: name
|
|
122
|
-
}));
|
|
141
|
+
}, getMenuProps()))));
|
|
123
142
|
};
|
|
124
143
|
Combobox.propTypes = {
|
|
125
144
|
/**
|
|
@@ -189,12 +208,31 @@ Combobox.propTypes = {
|
|
|
189
208
|
*/
|
|
190
209
|
disabled: _propTypes.default.bool,
|
|
191
210
|
/**
|
|
211
|
+
* The number of columns the label should span
|
|
212
|
+
*/
|
|
213
|
+
labelSpan: _propTypes.default.number,
|
|
214
|
+
/**
|
|
215
|
+
* The number of columns the input should span
|
|
216
|
+
*/
|
|
217
|
+
inputSpan: _propTypes.default.number,
|
|
218
|
+
/**
|
|
219
|
+
* The number of columns the label should span on desktop
|
|
220
|
+
*/
|
|
221
|
+
desktopLabelSpan: _propTypes.default.number,
|
|
222
|
+
/**
|
|
223
|
+
* The number of columns the input should span on desktop
|
|
224
|
+
*/
|
|
225
|
+
desktopInputSpan: _propTypes.default.number,
|
|
226
|
+
/**
|
|
192
227
|
* Whether the input is optional or not
|
|
193
228
|
*/
|
|
194
|
-
optional: _propTypes.default.bool
|
|
229
|
+
optional: _propTypes.default.bool,
|
|
230
|
+
/**
|
|
231
|
+
* The placeholder text for the input
|
|
232
|
+
*/
|
|
233
|
+
placeholder: _propTypes.default.string
|
|
195
234
|
};
|
|
196
235
|
Combobox.defaultProps = {
|
|
197
236
|
// someProp: false
|
|
198
237
|
};
|
|
199
|
-
var _default = Combobox;
|
|
200
|
-
exports.default = _default;
|
|
238
|
+
var _default = exports.default = Combobox;
|
|
@@ -8,9 +8,9 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
function _getRequireWildcardCache(
|
|
12
|
-
function _interopRequireWildcard(
|
|
13
|
-
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); }
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
+
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 */
|
|
14
14
|
// Local Definitions
|
|
15
15
|
|
|
16
16
|
const baseClassName = _exports.default.base;
|
|
@@ -80,5 +80,4 @@ Menu.propTypes = {
|
|
|
80
80
|
Menu.defaultProps = {
|
|
81
81
|
// someProp:false
|
|
82
82
|
};
|
|
83
|
-
var _default = Menu;
|
|
84
|
-
exports.default = _default;
|
|
83
|
+
var _default = exports.default = Menu;
|
|
@@ -4,18 +4,20 @@ 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 _downshift = require("downshift");
|
|
11
12
|
var _b = require("../../../../../b");
|
|
12
13
|
var _a = require("../../../../../a");
|
|
13
14
|
var _ = require("../../../..");
|
|
15
|
+
var _common = require("../../../../common");
|
|
14
16
|
var _Menu = require("../Menu");
|
|
15
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
function _getRequireWildcardCache(
|
|
17
|
-
function _interopRequireWildcard(
|
|
18
|
-
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); }
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
20
|
+
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
|
|
19
21
|
const baseClassName = _exports.default.base;
|
|
20
22
|
const componentClassName = 'multiple-combobox';
|
|
21
23
|
|
|
@@ -36,8 +38,10 @@ const MultipleCombobox = _ref => {
|
|
|
36
38
|
className: userClassName,
|
|
37
39
|
style,
|
|
38
40
|
label,
|
|
41
|
+
labelColor,
|
|
39
42
|
name,
|
|
40
43
|
optional,
|
|
44
|
+
getTagColor,
|
|
41
45
|
options: items,
|
|
42
46
|
getOptions,
|
|
43
47
|
setValue,
|
|
@@ -47,10 +51,13 @@ const MultipleCombobox = _ref => {
|
|
|
47
51
|
isFetching,
|
|
48
52
|
minLength,
|
|
49
53
|
transformSearch,
|
|
50
|
-
disabled
|
|
54
|
+
disabled,
|
|
55
|
+
placeholder,
|
|
56
|
+
setOptions,
|
|
57
|
+
promptCreateNewOption
|
|
51
58
|
// ...otherProps
|
|
52
59
|
} = _ref;
|
|
53
|
-
const [searchInputValue, setSearchInputValue] = (0,
|
|
60
|
+
const [searchInputValue, setSearchInputValue] = (0, _react.useState)('');
|
|
54
61
|
const {
|
|
55
62
|
getSelectedItemProps,
|
|
56
63
|
getDropdownProps,
|
|
@@ -96,7 +103,6 @@ const MultipleCombobox = _ref => {
|
|
|
96
103
|
...changes,
|
|
97
104
|
isOpen: true // keep the menu open after selection.
|
|
98
105
|
};
|
|
99
|
-
|
|
100
106
|
default:
|
|
101
107
|
break;
|
|
102
108
|
}
|
|
@@ -131,25 +137,39 @@ const MultipleCombobox = _ref => {
|
|
|
131
137
|
}
|
|
132
138
|
}
|
|
133
139
|
});
|
|
134
|
-
(0,
|
|
140
|
+
(0, _react.useEffect)(() => {
|
|
135
141
|
if (selectedItems?.length > 0) {
|
|
136
142
|
setValue(selectedItems);
|
|
137
143
|
}
|
|
138
144
|
}, [selectedItems]);
|
|
139
|
-
(0,
|
|
145
|
+
(0, _react.useEffect)(() => {
|
|
146
|
+
if (promptCreateNewOption) {
|
|
147
|
+
(0, _common.lookUpInputValueFromFetchedOptions)({
|
|
148
|
+
items,
|
|
149
|
+
inputValue,
|
|
150
|
+
setOptions,
|
|
151
|
+
minLength
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}, [inputValue, items, promptCreateNewOption]);
|
|
155
|
+
(0, _react.useEffect)(() => {
|
|
140
156
|
if (value?.length > 0 && (testIfArraysAreUnique(value, selectedItems) || testIfArraysAreUnique(selectedItems, value))) {
|
|
141
157
|
setSelectedItems(value);
|
|
142
158
|
}
|
|
143
159
|
}, [value]);
|
|
144
|
-
const parentRef = (0,
|
|
160
|
+
const parentRef = (0, _react.useRef)(null);
|
|
145
161
|
const resetInputValue = () => setInputValue('');
|
|
146
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
162
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
147
163
|
id: id,
|
|
148
|
-
className: [baseClassName, componentClassName, userClassName
|
|
149
|
-
style: style
|
|
150
|
-
|
|
164
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
165
|
+
style: style,
|
|
166
|
+
ref: parentRef
|
|
167
|
+
}, getComboboxProps()), /*#__PURE__*/React.createElement(_.FormLabel, _extends({
|
|
168
|
+
className: [baseClassName, componentClassName].filter(e => e).join(' ')
|
|
169
|
+
}, getLabelProps(), {
|
|
151
170
|
name: name,
|
|
152
|
-
optional: optional
|
|
171
|
+
optional: optional,
|
|
172
|
+
color: labelColor
|
|
153
173
|
}), label), selectedItems?.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
154
174
|
className: "selected-items"
|
|
155
175
|
}, selectedItems.map((selectedItem, index) => /*#__PURE__*/React.createElement("div", _extends({
|
|
@@ -165,41 +185,40 @@ const MultipleCombobox = _ref => {
|
|
|
165
185
|
removeSelectedItem(selectedItem);
|
|
166
186
|
},
|
|
167
187
|
isCompact: true,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}, "Y"))))), /*#__PURE__*/React.createElement("div", _extends({}, getComboboxProps(), {
|
|
175
|
-
className: "input-wrapper"
|
|
176
|
-
}), /*#__PURE__*/React.createElement("input", _extends({}, getInputProps(getDropdownProps({
|
|
188
|
+
color: getTagColor ? getTagColor(selectedItem) : color
|
|
189
|
+
}, /*#__PURE__*/React.createElement("span", null, selectedItem.label), /*#__PURE__*/React.createElement("span", {
|
|
190
|
+
className: "icon close"
|
|
191
|
+
}, "Y"))))), /*#__PURE__*/React.createElement("div", {
|
|
192
|
+
className: "input-container"
|
|
193
|
+
}, /*#__PURE__*/React.createElement("input", _extends({}, getInputProps(getDropdownProps({
|
|
177
194
|
preventKeyAction: isOpen
|
|
178
195
|
})), {
|
|
179
196
|
className: "input",
|
|
180
|
-
disabled: disabled
|
|
197
|
+
disabled: disabled,
|
|
198
|
+
placeholder: placeholder
|
|
181
199
|
})), isFetching && /*#__PURE__*/React.createElement(_a.LoadingCircle, {
|
|
182
|
-
className: "x-
|
|
200
|
+
className: "x-main"
|
|
183
201
|
}), inputValue.length > minLength && !isFetching && /*#__PURE__*/React.createElement(_b.Button, {
|
|
184
202
|
isSimple: true,
|
|
185
203
|
isCompact: true,
|
|
186
|
-
color: "
|
|
204
|
+
color: "interactive",
|
|
187
205
|
onClick: resetInputValue
|
|
188
206
|
}, /*#__PURE__*/React.createElement("span", {
|
|
189
|
-
className: "
|
|
190
|
-
}, "Y"))), /*#__PURE__*/React.createElement(
|
|
207
|
+
className: "icon"
|
|
208
|
+
}, "Y"))), /*#__PURE__*/React.createElement(_.FormDescription, {
|
|
209
|
+
className: "s-1",
|
|
210
|
+
description: description,
|
|
211
|
+
name: name
|
|
212
|
+
}), /*#__PURE__*/React.createElement(_a.Popover, {
|
|
191
213
|
isOpen: isOpen,
|
|
192
214
|
parentRef: parentRef
|
|
193
215
|
}, /*#__PURE__*/React.createElement(_Menu.Menu, _extends({
|
|
216
|
+
className: `y-${color}`,
|
|
194
217
|
isOpen: isOpen,
|
|
195
218
|
getItemProps: getItemProps,
|
|
196
219
|
highlightedIndex: highlightedIndex,
|
|
197
220
|
items: getFilteredItems()
|
|
198
|
-
}, getMenuProps())))
|
|
199
|
-
className: "v50 mt-v s-1",
|
|
200
|
-
description: description,
|
|
201
|
-
name: name
|
|
202
|
-
}));
|
|
221
|
+
}, getMenuProps()))));
|
|
203
222
|
};
|
|
204
223
|
MultipleCombobox.propTypes = {
|
|
205
224
|
/**
|
|
@@ -271,10 +290,42 @@ MultipleCombobox.propTypes = {
|
|
|
271
290
|
/**
|
|
272
291
|
* Whether the input is optional or not
|
|
273
292
|
*/
|
|
274
|
-
optional: _propTypes.default.bool
|
|
293
|
+
optional: _propTypes.default.bool,
|
|
294
|
+
/**
|
|
295
|
+
* The placeholder text for the input
|
|
296
|
+
*/
|
|
297
|
+
placeholder: _propTypes.default.string,
|
|
298
|
+
/**
|
|
299
|
+
* The function to set the options of the custom select input
|
|
300
|
+
*/
|
|
301
|
+
setOptions: _propTypes.default.func,
|
|
302
|
+
/**
|
|
303
|
+
* Whether to prompt the user to create a new option if the search input
|
|
304
|
+
* does not match any of the options
|
|
305
|
+
*/
|
|
306
|
+
promptCreateNewOption: _propTypes.default.bool,
|
|
307
|
+
/**
|
|
308
|
+
* The function to get the color of the tag
|
|
309
|
+
*/
|
|
310
|
+
getTagColor: _propTypes.default.func,
|
|
311
|
+
/**
|
|
312
|
+
* The color of the label
|
|
313
|
+
*/
|
|
314
|
+
labelColor: _propTypes.default.string,
|
|
315
|
+
/**
|
|
316
|
+
* The function to validate the input
|
|
317
|
+
*/
|
|
318
|
+
validate: _propTypes.default.func,
|
|
319
|
+
/**
|
|
320
|
+
* Whether to allow multiple items selection
|
|
321
|
+
*/
|
|
322
|
+
multiple: _propTypes.default.bool,
|
|
323
|
+
/**
|
|
324
|
+
* The variable to be used to search the data
|
|
325
|
+
*/
|
|
326
|
+
searchVariable: _propTypes.default.string
|
|
275
327
|
};
|
|
276
328
|
MultipleCombobox.defaultProps = {
|
|
277
329
|
// someProp: false
|
|
278
330
|
};
|
|
279
|
-
var _default = MultipleCombobox;
|
|
280
|
-
exports.default = _default;
|
|
331
|
+
var _default = exports.default = MultipleCombobox;
|