@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
package/src/ui/a/Tip/Tip.jsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useInsertionEffect } from 'react'
|
|
5
|
-
|
|
6
4
|
import PropTypes from 'prop-types'
|
|
7
5
|
|
|
8
6
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
9
7
|
|
|
8
|
+
import './styles.scss'
|
|
9
|
+
|
|
10
10
|
// Local Definitions
|
|
11
11
|
|
|
12
12
|
const baseClassName = styleNames.base
|
|
@@ -21,32 +21,31 @@ const Tip = ({
|
|
|
21
21
|
className:userClassName,
|
|
22
22
|
style,
|
|
23
23
|
children,
|
|
24
|
+
icon,
|
|
24
25
|
as:Wrapper,
|
|
25
26
|
color,
|
|
27
|
+
backgroundColor,
|
|
26
28
|
// ...otherProps
|
|
27
|
-
}) =>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
</Wrapper>
|
|
48
|
-
)
|
|
49
|
-
}
|
|
29
|
+
}) => (
|
|
30
|
+
<Wrapper
|
|
31
|
+
id={id}
|
|
32
|
+
className={[
|
|
33
|
+
baseClassName,
|
|
34
|
+
componentClassName,
|
|
35
|
+
userClassName,
|
|
36
|
+
`x-${backgroundColor}`,
|
|
37
|
+
]
|
|
38
|
+
.filter((e) => e)
|
|
39
|
+
.join(' ')}
|
|
40
|
+
style={style}
|
|
41
|
+
// {...otherProps}
|
|
42
|
+
>
|
|
43
|
+
<span className={`x-${color} c-x icon`}>
|
|
44
|
+
{icon}
|
|
45
|
+
</span>
|
|
46
|
+
{children}
|
|
47
|
+
</Wrapper>
|
|
48
|
+
)
|
|
50
49
|
|
|
51
50
|
Tip.propTypes = {
|
|
52
51
|
/**
|
|
@@ -70,10 +69,20 @@ Tip.propTypes = {
|
|
|
70
69
|
children:PropTypes.node.isRequired,
|
|
71
70
|
|
|
72
71
|
/**
|
|
73
|
-
* The
|
|
72
|
+
* The icon
|
|
73
|
+
*/
|
|
74
|
+
icon:PropTypes.string,
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The color of the icon
|
|
74
78
|
*/
|
|
75
79
|
color:PropTypes.string,
|
|
76
80
|
|
|
81
|
+
/**
|
|
82
|
+
* The background color
|
|
83
|
+
*/
|
|
84
|
+
backgroundColor:PropTypes.string,
|
|
85
|
+
|
|
77
86
|
/**
|
|
78
87
|
* The wrapper html type
|
|
79
88
|
*/
|
|
@@ -81,8 +90,10 @@ Tip.propTypes = {
|
|
|
81
90
|
}
|
|
82
91
|
|
|
83
92
|
Tip.defaultProps = {
|
|
84
|
-
as
|
|
85
|
-
|
|
93
|
+
as :'p',
|
|
94
|
+
icon :')',
|
|
95
|
+
color :'interactive',
|
|
96
|
+
backgroundColor:'background-near',
|
|
86
97
|
}
|
|
87
98
|
|
|
88
99
|
export default Tip
|
package/src/ui/a/Tip/styles.scss
CHANGED
|
@@ -4,19 +4,13 @@
|
|
|
4
4
|
@use "@pareto-engineering/styles/src/mixins";
|
|
5
5
|
@use "@pareto-engineering/styles/src/globals" as *;
|
|
6
6
|
|
|
7
|
-
$default-
|
|
8
|
-
$default-padding: 1em;
|
|
7
|
+
$default-padding: calc(var(--gap) * 2);
|
|
9
8
|
|
|
10
9
|
.#{bem.$base}.tip {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
height: 100%;
|
|
18
|
-
left: 0;
|
|
19
|
-
position: absolute;
|
|
20
|
-
width: $default-bar-width;
|
|
21
|
-
}
|
|
10
|
+
align-items: center;
|
|
11
|
+
background: var(--x);
|
|
12
|
+
border-radius: var(--theme-default-border-radius);
|
|
13
|
+
display: flex;
|
|
14
|
+
gap: var(--gap);
|
|
15
|
+
padding: $default-padding;
|
|
22
16
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
|
|
4
|
+
import PropTypes from 'prop-types'
|
|
5
|
+
|
|
6
|
+
import styleNames from '@pareto-engineering/bem/exports'
|
|
7
|
+
|
|
8
|
+
import './styles.scss'
|
|
9
|
+
|
|
10
|
+
// Local Definitions
|
|
11
|
+
|
|
12
|
+
const baseClassName = styleNames.base
|
|
13
|
+
|
|
14
|
+
const componentClassName = 'toggle-switch'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* This is the component description.
|
|
18
|
+
*/
|
|
19
|
+
const ToggleSwitch = ({
|
|
20
|
+
id,
|
|
21
|
+
className:userClassName,
|
|
22
|
+
style,
|
|
23
|
+
handleOnChange,
|
|
24
|
+
checked,
|
|
25
|
+
size,
|
|
26
|
+
// ...otherProps
|
|
27
|
+
}) => (
|
|
28
|
+
<button
|
|
29
|
+
id={id}
|
|
30
|
+
className={[
|
|
31
|
+
|
|
32
|
+
baseClassName,
|
|
33
|
+
|
|
34
|
+
componentClassName,
|
|
35
|
+
userClassName,
|
|
36
|
+
]
|
|
37
|
+
.filter((e) => e)
|
|
38
|
+
.join(' ')}
|
|
39
|
+
style={{
|
|
40
|
+
'--size':size,
|
|
41
|
+
...style,
|
|
42
|
+
}}
|
|
43
|
+
type="button"
|
|
44
|
+
// {...otherProps}
|
|
45
|
+
>
|
|
46
|
+
<input
|
|
47
|
+
type="checkbox"
|
|
48
|
+
id="switch"
|
|
49
|
+
checked={checked}
|
|
50
|
+
onChange={handleOnChange}
|
|
51
|
+
/>
|
|
52
|
+
{/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}
|
|
53
|
+
<label htmlFor="switch" />
|
|
54
|
+
</button>
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
ToggleSwitch.propTypes = {
|
|
58
|
+
/**
|
|
59
|
+
* The HTML id for this element
|
|
60
|
+
*/
|
|
61
|
+
id:PropTypes.string,
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The HTML class names for this element
|
|
65
|
+
*/
|
|
66
|
+
className:PropTypes.string,
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The React-written, css properties for this element.
|
|
70
|
+
*/
|
|
71
|
+
style:PropTypes.objectOf(PropTypes.string),
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The onClick handler for this element
|
|
75
|
+
*/
|
|
76
|
+
handleOnChange:PropTypes.func,
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The checked state of this element
|
|
80
|
+
*/
|
|
81
|
+
checked:PropTypes.bool,
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The size of this element
|
|
85
|
+
*/
|
|
86
|
+
size:PropTypes.string,
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
ToggleSwitch.defaultProps = {
|
|
90
|
+
// someProp:false,
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export default ToggleSwitch
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
|
|
5
|
+
$default-border-radius: var(--theme-default-border-radius);
|
|
6
|
+
$default-size: var(--size, 1.2em);
|
|
7
|
+
$default-slider-color: var(--slider-color, var(--background-far));
|
|
8
|
+
$default-slider-border-color: var(--slider-border-color, var(--ui-lines));
|
|
9
|
+
$default-background-color: var(--slider-background-color, var(--interactive));
|
|
10
|
+
|
|
11
|
+
.#{bem.$base}.toggle-switch {
|
|
12
|
+
background: transparent;
|
|
13
|
+
border: none;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
display: flex;
|
|
16
|
+
|
|
17
|
+
>input {
|
|
18
|
+
height: 0;
|
|
19
|
+
visibility: hidden;
|
|
20
|
+
width: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
>label {
|
|
24
|
+
background: $default-background-color;
|
|
25
|
+
border-radius: $default-border-radius;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
display: block;
|
|
28
|
+
height: $default-size;
|
|
29
|
+
position: relative;
|
|
30
|
+
width: calc($default-size * 2);
|
|
31
|
+
|
|
32
|
+
&::after {
|
|
33
|
+
background: $default-slider-color;
|
|
34
|
+
border: 1px solid $default-slider-border-color;
|
|
35
|
+
border-radius: $default-border-radius;
|
|
36
|
+
content: "";
|
|
37
|
+
height: $default-size;
|
|
38
|
+
left: 0;
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: 0;
|
|
41
|
+
transition: .3s;
|
|
42
|
+
width: $default-size;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
>input:checked + label::after {
|
|
47
|
+
left: $default-size;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
|
|
4
|
+
import PropTypes from 'prop-types'
|
|
5
|
+
|
|
6
|
+
import styleNames from '@pareto-engineering/bem/exports'
|
|
7
|
+
|
|
8
|
+
import './styles.scss'
|
|
9
|
+
|
|
10
|
+
// Local Definitions
|
|
11
|
+
|
|
12
|
+
const baseClassName = styleNames.base
|
|
13
|
+
|
|
14
|
+
const componentClassName = 'tooltip'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* This is the component description.
|
|
18
|
+
*/
|
|
19
|
+
const Tooltip = ({
|
|
20
|
+
id,
|
|
21
|
+
className:userClassName,
|
|
22
|
+
style,
|
|
23
|
+
position,
|
|
24
|
+
color,
|
|
25
|
+
description,
|
|
26
|
+
content,
|
|
27
|
+
children,
|
|
28
|
+
// ...otherProps
|
|
29
|
+
}) => (
|
|
30
|
+
<div
|
|
31
|
+
id={id}
|
|
32
|
+
className={[
|
|
33
|
+
baseClassName,
|
|
34
|
+
componentClassName,
|
|
35
|
+
userClassName,
|
|
36
|
+
`x-${color}`,
|
|
37
|
+
]
|
|
38
|
+
.filter((e) => e)
|
|
39
|
+
.join(' ')}
|
|
40
|
+
style={style}
|
|
41
|
+
|
|
42
|
+
>
|
|
43
|
+
<div
|
|
44
|
+
className="tooltip-trigger-wrapper"
|
|
45
|
+
aria-describedby={description}
|
|
46
|
+
>
|
|
47
|
+
{children}
|
|
48
|
+
</div>
|
|
49
|
+
<div
|
|
50
|
+
className={`tooltip-content ${position}`}
|
|
51
|
+
role="tooltip"
|
|
52
|
+
id={description}
|
|
53
|
+
>
|
|
54
|
+
{content}
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
Tooltip.propTypes = {
|
|
60
|
+
/**
|
|
61
|
+
* The HTML id for this element
|
|
62
|
+
*/
|
|
63
|
+
id:PropTypes.string.isRequired,
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The HTML class names for this element
|
|
67
|
+
*/
|
|
68
|
+
className:PropTypes.string,
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The React-written, css properties for this element.
|
|
72
|
+
*/
|
|
73
|
+
style:PropTypes.objectOf(PropTypes.string),
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The children JSX where the tooltip will be applied
|
|
77
|
+
*/
|
|
78
|
+
children:PropTypes.node.isRequired,
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The content JSX that renders the tooltip content
|
|
82
|
+
*/
|
|
83
|
+
content:PropTypes.node.isRequired,
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The text description to identify the element that describes the tooltip
|
|
87
|
+
*/
|
|
88
|
+
description:PropTypes.string.isRequired,
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The position of the tooltip with respect to the trigger element
|
|
92
|
+
*/
|
|
93
|
+
position:PropTypes.oneOf(['top', 'bottom', 'left', 'right']),
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The base color of the tooltip
|
|
97
|
+
*/
|
|
98
|
+
color:PropTypes.string,
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
Tooltip.defaultProps = {
|
|
102
|
+
position:'bottom',
|
|
103
|
+
color :'background-cards',
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export default Tooltip
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
|
|
5
|
+
$default-block-padding: calc(var(--theme-default-padding) / 2);
|
|
6
|
+
$default-inline-padding: var(--theme-default-padding);
|
|
7
|
+
$default-width: var(--tooltip-width, 20rem);
|
|
8
|
+
|
|
9
|
+
.#{bem.$base}.tooltip {
|
|
10
|
+
display: inline-block;
|
|
11
|
+
position: relative;
|
|
12
|
+
|
|
13
|
+
> .tooltip-content {
|
|
14
|
+
background: var(--x);
|
|
15
|
+
border: var(--theme-default-border-style) var(--ui-lines);
|
|
16
|
+
border-radius: calc(var(--theme-default-border-radius) / 2);
|
|
17
|
+
opacity: 0;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
padding: $default-block-padding $default-inline-padding;
|
|
20
|
+
position: absolute;
|
|
21
|
+
transform: translateX(var(--horizontal, 0)) translateY(var(--vertical, 0));
|
|
22
|
+
transition: opacity .2s ease, transform .2s ease;
|
|
23
|
+
visibility: hidden;
|
|
24
|
+
width: $default-width;
|
|
25
|
+
z-index: 10;
|
|
26
|
+
|
|
27
|
+
&.top {
|
|
28
|
+
--horizontal: -50%;
|
|
29
|
+
bottom: calc(100% + $default-block-padding);
|
|
30
|
+
left: 50%;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.right {
|
|
34
|
+
--vertical: 50%;
|
|
35
|
+
bottom: 50%;
|
|
36
|
+
left: calc(100% + $default-inline-padding);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.bottom {
|
|
40
|
+
--horizontal: -50%;
|
|
41
|
+
left: 50%;
|
|
42
|
+
top: calc(100% + $default-block-padding);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.left {
|
|
46
|
+
--vertical: 50%;
|
|
47
|
+
bottom: 50%;
|
|
48
|
+
right: calc(100% + $default-inline-padding);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
> .tooltip-trigger-wrapper {
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
|
|
55
|
+
&:is(:hover, :focus-visible, :active) + .tooltip-content {
|
|
56
|
+
opacity: 1;
|
|
57
|
+
transition-delay: 200ms;
|
|
58
|
+
visibility: visible;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
|
|
4
|
+
import { useEffect, useRef } from 'react'
|
|
5
|
+
|
|
6
|
+
import PropTypes from 'prop-types'
|
|
7
|
+
|
|
8
|
+
import { EditorState } from '@codemirror/state'
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
EditorView,
|
|
12
|
+
keymap,
|
|
13
|
+
lineNumbers,
|
|
14
|
+
drawSelection,
|
|
15
|
+
dropCursor,
|
|
16
|
+
highlightActiveLine,
|
|
17
|
+
highlightActiveLineGutter,
|
|
18
|
+
highlightSpecialChars,
|
|
19
|
+
crosshairCursor,
|
|
20
|
+
rectangularSelection,
|
|
21
|
+
} from '@codemirror/view'
|
|
22
|
+
|
|
23
|
+
import {
|
|
24
|
+
defaultKeymap,
|
|
25
|
+
indentWithTab,
|
|
26
|
+
} from '@codemirror/commands'
|
|
27
|
+
|
|
28
|
+
import {
|
|
29
|
+
indentOnInput,
|
|
30
|
+
bracketMatching,
|
|
31
|
+
foldGutter,
|
|
32
|
+
} from '@codemirror/language'
|
|
33
|
+
|
|
34
|
+
import { xml } from '@codemirror/lang-xml'
|
|
35
|
+
|
|
36
|
+
import styleNames from '@pareto-engineering/bem/exports'
|
|
37
|
+
|
|
38
|
+
import { theme } from './common'
|
|
39
|
+
|
|
40
|
+
import './styles.scss'
|
|
41
|
+
|
|
42
|
+
const baseClassName = styleNames.base
|
|
43
|
+
|
|
44
|
+
const componentClassName = 'code-editor'
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* codemirror documentation:
|
|
48
|
+
* https://codemirror.net/
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
const XMLEditor = ({
|
|
52
|
+
id,
|
|
53
|
+
className: userClassName,
|
|
54
|
+
style,
|
|
55
|
+
readOnly,
|
|
56
|
+
height,
|
|
57
|
+
gutterWidth,
|
|
58
|
+
config,
|
|
59
|
+
onChange,
|
|
60
|
+
onBlur,
|
|
61
|
+
stopAllPropagation,
|
|
62
|
+
stopPropagationKeys,
|
|
63
|
+
}) => {
|
|
64
|
+
const editorRef = useRef()
|
|
65
|
+
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
const startState = EditorState.create({
|
|
68
|
+
doc :config,
|
|
69
|
+
extensions:[
|
|
70
|
+
keymap.of([defaultKeymap, indentWithTab]),
|
|
71
|
+
indentOnInput(),
|
|
72
|
+
lineNumbers(),
|
|
73
|
+
bracketMatching(),
|
|
74
|
+
foldGutter(),
|
|
75
|
+
drawSelection(),
|
|
76
|
+
highlightActiveLine(),
|
|
77
|
+
highlightActiveLineGutter(),
|
|
78
|
+
highlightSpecialChars(),
|
|
79
|
+
dropCursor(),
|
|
80
|
+
rectangularSelection(),
|
|
81
|
+
crosshairCursor(),
|
|
82
|
+
xml(),
|
|
83
|
+
theme,
|
|
84
|
+
EditorState.readOnly.of(readOnly),
|
|
85
|
+
EditorView.updateListener.of((view) => {
|
|
86
|
+
onChange(view)
|
|
87
|
+
// view.state.doc.toString() to receive the current content in the editor.
|
|
88
|
+
}),
|
|
89
|
+
EditorView.focusChangeEffect.of((state, focused) => {
|
|
90
|
+
if (!focused) {
|
|
91
|
+
onBlur?.(state)
|
|
92
|
+
}
|
|
93
|
+
}),
|
|
94
|
+
EditorView.domEventHandlers({
|
|
95
|
+
keydown(e) {
|
|
96
|
+
if (stopPropagationKeys?.includes(e.key) || stopAllPropagation) {
|
|
97
|
+
e.stopPropagation()
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
}),
|
|
101
|
+
],
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
const view = new EditorView({
|
|
105
|
+
state :startState,
|
|
106
|
+
parent:editorRef.current,
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
return () => {
|
|
110
|
+
view.destroy()
|
|
111
|
+
}
|
|
112
|
+
}, [editorRef])
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<div
|
|
116
|
+
id={id}
|
|
117
|
+
ref={editorRef}
|
|
118
|
+
className={[
|
|
119
|
+
baseClassName,
|
|
120
|
+
componentClassName,
|
|
121
|
+
userClassName,
|
|
122
|
+
]
|
|
123
|
+
.filter((e) => e)
|
|
124
|
+
.join(' ')}
|
|
125
|
+
style={{
|
|
126
|
+
'--height' :height,
|
|
127
|
+
'--gutter-width':gutterWidth,
|
|
128
|
+
...style,
|
|
129
|
+
}}
|
|
130
|
+
/>
|
|
131
|
+
)
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
XMLEditor.propTypes = {
|
|
135
|
+
/**
|
|
136
|
+
* The HTML id for this element
|
|
137
|
+
*/
|
|
138
|
+
id:PropTypes.string,
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The HTML class names for this element
|
|
142
|
+
*/
|
|
143
|
+
className:PropTypes.string,
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* The React-written, css properties for this element.
|
|
147
|
+
*/
|
|
148
|
+
style:PropTypes.objectOf(PropTypes.string),
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Whether or not the content is read only.
|
|
152
|
+
*/
|
|
153
|
+
readOnly:PropTypes.bool,
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* The initial labeling configuration.
|
|
157
|
+
*/
|
|
158
|
+
config:PropTypes.string,
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The height of the editor.
|
|
162
|
+
*/
|
|
163
|
+
height:PropTypes.string,
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The callback for when the labeling configuration changes.
|
|
167
|
+
*/
|
|
168
|
+
onChange:PropTypes.func,
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* The width of the gutter.
|
|
172
|
+
*/
|
|
173
|
+
gutterWidth:PropTypes.string,
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* The keys to stop propagation on.
|
|
177
|
+
*/
|
|
178
|
+
stopPropagationKeys:PropTypes.arrayOf(PropTypes.string),
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* The callback for when the editor loses focus.
|
|
182
|
+
*/
|
|
183
|
+
onBlur:PropTypes.func,
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Whether to stop all propagation of keys to keep focus on the editor.
|
|
187
|
+
*/
|
|
188
|
+
stopAllPropagation:PropTypes.bool,
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
XMLEditor.defaultProps = {
|
|
192
|
+
config:`<View>
|
|
193
|
+
<!--Edit this config to customize the labeling interface.-->
|
|
194
|
+
</View>
|
|
195
|
+
`,
|
|
196
|
+
height :'20em',
|
|
197
|
+
gutterWidth:'3em',
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export default XMLEditor
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as theme } from './theme'
|