@pareto-engineering/design-system 4.0.0-alpha.3 → 4.0.0-alpha.34
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/babel.config.js +24 -16
- package/dist/cjs/a/AnimatedBlobs/AnimatedBlobs.js +90 -0
- package/dist/cjs/a/AnimatedBlobs/index.js +13 -0
- package/dist/cjs/a/AnimatedBlobs/styles.scss +87 -0
- package/dist/cjs/a/AnimatedGradient/AnimatedGradient.js +60 -0
- package/dist/cjs/a/AnimatedGradient/index.js +13 -0
- package/dist/cjs/a/AnimatedGradient/styles.scss +14 -0
- package/dist/cjs/a/AnimatedGradient/webGIRenderer.js +528 -0
- package/dist/cjs/a/AppContext/Context.js +1 -1
- package/dist/cjs/a/AppContext/ContextProvider.js +19 -17
- package/dist/cjs/a/AppContext/index.js +4 -4
- package/dist/cjs/a/AppContext/useTheme.js +7 -11
- package/dist/cjs/a/BlurOverlay/BlurOverlay.js +59 -0
- package/dist/cjs/a/BlurOverlay/index.js +13 -0
- package/dist/cjs/a/BlurOverlay/styles.scss +31 -0
- package/dist/cjs/a/ContentTree/ContentTree.js +17 -11
- package/dist/cjs/a/ContentTree/common/Tree/Tree.js +24 -17
- package/dist/cjs/a/ContentTree/common/Tree/index.js +1 -1
- package/dist/cjs/a/ContentTree/common/index.js +3 -3
- package/dist/cjs/a/ContentTree/common/useContentTree.js +14 -14
- package/dist/cjs/a/ContentTree/common/useFirstVisibleNode.js +10 -11
- package/dist/cjs/a/ContentTree/index.js +1 -1
- package/dist/cjs/a/ContentTree/styles.scss +34 -11
- package/dist/cjs/a/Conversation/Context.js +1 -1
- package/dist/cjs/a/Conversation/Conversation.js +17 -22
- package/dist/cjs/a/Conversation/common/Message/Message.js +22 -19
- package/dist/cjs/a/Conversation/common/Message/index.js +1 -1
- package/dist/cjs/a/Conversation/common/index.js +1 -1
- package/dist/cjs/a/Conversation/index.js +3 -3
- package/dist/cjs/a/Conversation/styles.scss +56 -124
- package/dist/cjs/a/DotInfo/DotInfo.js +12 -16
- package/dist/cjs/a/DotInfo/index.js +1 -1
- package/dist/cjs/a/Figure/Figure.js +7 -7
- package/dist/cjs/a/Figure/index.js +1 -1
- package/dist/cjs/a/HamburgerButton/HamburgerButton.js +18 -21
- package/dist/cjs/a/HamburgerButton/index.js +1 -1
- package/dist/cjs/a/IconList/IconList.js +20 -27
- package/dist/cjs/a/IconList/common/Item/Item.js +18 -25
- package/dist/cjs/a/IconList/common/Item/index.js +1 -1
- package/dist/cjs/a/IconList/common/index.js +1 -1
- package/dist/cjs/a/IconList/index.js +1 -1
- package/dist/cjs/a/Label/Label.js +20 -12
- package/dist/cjs/a/Label/index.js +1 -1
- package/dist/cjs/a/Label/styles.scss +4 -4
- package/dist/cjs/a/LoadingCircle/LoadingCircle.js +12 -16
- package/dist/cjs/a/LoadingCircle/index.js +1 -1
- package/dist/cjs/a/MetaCard/MetaCard.js +65 -0
- package/dist/cjs/a/MetaCard/index.js +13 -0
- package/dist/cjs/a/MetaCard/styles.scss +45 -0
- package/dist/cjs/a/People/People.js +10 -14
- package/dist/cjs/a/People/common/Person/Person.js +8 -8
- package/dist/cjs/a/People/common/Person/index.js +1 -1
- package/dist/cjs/a/People/common/index.js +1 -1
- package/dist/cjs/a/People/index.js +1 -1
- package/dist/cjs/a/Popover/Popover.js +12 -12
- package/dist/cjs/a/Popover/index.js +1 -1
- package/dist/cjs/a/Popover/styles.scss +1 -1
- package/dist/cjs/a/ProgressBar/ProgressBar.js +12 -16
- package/dist/cjs/a/ProgressBar/index.js +1 -1
- package/dist/cjs/a/Quote/Quote.js +8 -8
- package/dist/cjs/a/Quote/index.js +1 -1
- package/dist/cjs/a/SVG/SVG.js +24 -27
- package/dist/cjs/a/SVG/common/UseSVG/UseSVG.js +9 -11
- package/dist/cjs/a/SVG/common/UseSVG/index.js +1 -1
- package/dist/cjs/a/SVG/common/index.js +1 -1
- package/dist/cjs/a/SVG/index.js +1 -1
- package/dist/cjs/a/SnapScroller/SnapScroller.js +7 -7
- package/dist/cjs/a/SnapScroller/index.js +1 -1
- package/dist/cjs/a/SnapScroller/styles.scss +30 -9
- package/dist/cjs/a/Spinner/Spinner.js +8 -8
- package/dist/cjs/a/Spinner/index.js +1 -1
- package/dist/cjs/a/TextSteps/TextSteps.js +70 -0
- package/dist/cjs/a/TextSteps/index.js +13 -0
- package/dist/cjs/a/TextSteps/styles.scss +29 -0
- package/dist/cjs/a/Timestamp/Timestamp.js +13 -13
- package/dist/cjs/a/Timestamp/index.js +1 -1
- package/dist/cjs/a/Tip/Tip.js +72 -0
- package/dist/cjs/a/Tip/index.js +13 -0
- package/dist/cjs/a/Tip/styles.scss +22 -0
- package/dist/cjs/a/index.js +63 -21
- package/dist/cjs/b/Button/Button.js +38 -28
- package/dist/cjs/b/Button/common/Group/Group.js +57 -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/index.js +1 -1
- package/dist/cjs/b/Button/styles.scss +38 -8
- package/dist/cjs/b/Card/Card.js +74 -0
- package/dist/cjs/b/Card/common/Group/Group.js +73 -0
- package/dist/cjs/b/Card/common/Group/index.js +13 -0
- package/dist/cjs/b/Card/common/Group/styles.scss +38 -0
- package/dist/cjs/b/Card/common/Section/Section.js +59 -0
- package/dist/cjs/b/Card/common/Section/index.js +13 -0
- package/dist/cjs/b/Card/common/index.js +19 -0
- package/dist/cjs/b/Card/index.js +13 -0
- package/dist/cjs/b/Card/styles.scss +57 -0
- package/dist/cjs/b/Logo/Logo.js +14 -14
- package/dist/cjs/b/Logo/index.js +1 -1
- package/dist/cjs/b/Page/Context.js +1 -1
- package/dist/cjs/b/Page/Page.js +31 -24
- package/dist/cjs/b/Page/common/PageHelmet/PageHelmet.js +42 -44
- package/dist/cjs/b/Page/common/PageHelmet/index.js +1 -1
- package/dist/cjs/b/Page/common/Section/Section.js +26 -19
- package/dist/cjs/b/Page/common/Section/index.js +1 -1
- package/dist/cjs/b/Page/common/index.js +2 -2
- package/dist/cjs/b/Page/index.js +3 -3
- package/dist/cjs/b/Page/styles.scss +25 -4
- package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +22 -26
- package/dist/cjs/b/SocialMediaButton/index.js +1 -1
- package/dist/cjs/b/SocialMediaButton/styles.scss +1 -15
- package/dist/cjs/b/ThemeSelector/ThemeSelector.js +27 -39
- package/dist/cjs/b/ThemeSelector/index.js +1 -1
- package/dist/cjs/b/ThemeSelector/styles.scss +2 -7
- package/dist/cjs/b/Title/Title.js +10 -8
- package/dist/cjs/b/Title/index.js +1 -1
- package/dist/cjs/b/index.js +14 -7
- package/dist/cjs/c/ContentSlides/ContentSlides.js +34 -31
- package/dist/cjs/c/ContentSlides/Context.js +1 -1
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +9 -11
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/index.js +1 -1
- package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +7 -7
- package/dist/cjs/c/ContentSlides/common/Navigator/index.js +1 -1
- package/dist/cjs/c/ContentSlides/common/Sidebar/Sidebar.js +5 -7
- package/dist/cjs/c/ContentSlides/common/Sidebar/index.js +1 -1
- package/dist/cjs/c/ContentSlides/common/Slide/Slide.js +6 -6
- package/dist/cjs/c/ContentSlides/common/Slide/index.js +1 -1
- package/dist/cjs/c/ContentSlides/common/index.js +4 -4
- package/dist/cjs/c/ContentSlides/index.js +3 -3
- package/dist/cjs/c/ContentSlides/styles.scss +2 -2
- package/dist/cjs/c/Modal/Modal.js +8 -8
- package/dist/cjs/c/Modal/common/ModalHeader/ModalHeader.js +6 -6
- package/dist/cjs/c/Modal/common/ModalHeader/index.js +1 -1
- package/dist/cjs/c/Modal/common/index.js +1 -1
- package/dist/cjs/c/Modal/index.js +1 -1
- package/dist/cjs/c/Modal/styles.scss +9 -13
- package/dist/cjs/c/Shortener/Shortener.js +11 -11
- package/dist/cjs/c/Shortener/index.js +1 -1
- package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +13 -13
- package/dist/cjs/c/SocialMediaShareButton/index.js +1 -1
- package/dist/cjs/c/index.js +5 -5
- package/dist/cjs/f/FormInput/FormInput.js +15 -20
- package/dist/cjs/f/FormInput/index.js +1 -1
- package/dist/cjs/f/common/Debugger/Debugger.js +9 -9
- package/dist/cjs/f/common/Debugger/index.js +1 -1
- package/dist/cjs/f/common/Description/Description.js +9 -9
- package/dist/cjs/f/common/Description/index.js +1 -1
- package/dist/cjs/f/common/Label/Label.js +8 -8
- package/dist/cjs/f/common/Label/index.js +1 -1
- package/dist/cjs/f/common/Label/styles.scss +1 -1
- package/dist/cjs/f/common/index.js +3 -3
- package/dist/cjs/f/fields/Checkbox/Checkbox.js +8 -8
- package/dist/cjs/f/fields/Checkbox/index.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +30 -25
- package/dist/cjs/f/fields/ChoicesInput/common/Choice/Choice.js +8 -8
- package/dist/cjs/f/fields/ChoicesInput/common/Choice/index.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/common/index.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/index.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/styles.scss +26 -32
- package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +26 -31
- package/dist/cjs/f/fields/QueryChoices/index.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +22 -24
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +16 -16
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/index.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/common/Menu/Menu.js +15 -18
- package/dist/cjs/f/fields/QueryCombobox/common/Menu/index.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +25 -29
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/index.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/common/index.js +3 -3
- package/dist/cjs/f/fields/QueryCombobox/index.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/styles.scss +13 -11
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +12 -12
- package/dist/cjs/f/fields/QuerySelect/index.js +1 -1
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +10 -10
- package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +11 -11
- package/dist/cjs/f/fields/RatingsInput/common/Rating/index.js +1 -1
- package/dist/cjs/f/fields/RatingsInput/common/index.js +1 -1
- package/dist/cjs/f/fields/RatingsInput/index.js +1 -1
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +13 -13
- package/dist/cjs/f/fields/SelectInput/index.js +1 -1
- package/dist/cjs/f/fields/SelectInput/styles.scss +33 -22
- package/dist/cjs/f/fields/TextInput/TextInput.js +25 -14
- package/dist/cjs/f/fields/TextInput/index.js +1 -1
- package/dist/cjs/f/fields/TextInput/styles.scss +44 -14
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +14 -14
- package/dist/cjs/f/fields/TextareaInput/index.js +1 -1
- package/dist/cjs/f/fields/TextareaInput/styles.scss +7 -5
- package/dist/cjs/f/fields/index.js +9 -9
- package/dist/cjs/f/index.js +3 -3
- package/dist/cjs/form.scss +1 -1
- package/dist/cjs/index.js +8 -8
- package/dist/cjs/r/SwitchRouteMap/SwitchRouteMap.js +8 -11
- package/dist/cjs/r/SwitchRouteMap/index.js +1 -1
- package/dist/cjs/r/common/PrivateRoute/PrivateRoute.js +14 -17
- package/dist/cjs/r/common/PrivateRoute/index.js +1 -1
- package/dist/cjs/r/common/index.js +1 -1
- package/dist/cjs/r/index.js +2 -2
- package/dist/cjs/test/QueryLoader/QueryLoader.js +6 -4
- package/dist/cjs/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +1 -1
- package/dist/cjs/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +4 -4
- package/dist/cjs/test/QueryLoader/common/PreloadedTestData/index.js +1 -1
- package/dist/cjs/test/QueryLoader/common/index.js +1 -1
- package/dist/cjs/test/QueryLoader/index.js +1 -1
- package/dist/cjs/test/index.js +1 -1
- package/dist/cjs/utils/hooks/index.js +2 -2
- package/dist/cjs/utils/hooks/useDynamicPosition.js +24 -24
- package/dist/cjs/utils/hooks/useWindowSize.js +6 -6
- package/dist/cjs/utils/index.js +2 -2
- package/dist/es/a/AnimatedBlobs/AnimatedBlobs.js +82 -0
- package/dist/es/a/AnimatedBlobs/index.js +1 -0
- package/dist/es/a/AnimatedBlobs/styles.scss +87 -0
- package/dist/es/a/AnimatedGradient/AnimatedGradient.js +52 -0
- package/dist/es/a/AnimatedGradient/index.js +1 -0
- package/dist/es/a/AnimatedGradient/styles.scss +14 -0
- package/dist/es/a/AnimatedGradient/webGIRenderer.js +492 -0
- package/dist/es/a/AppContext/useTheme.js +0 -4
- package/dist/es/a/BlurOverlay/BlurOverlay.js +51 -0
- package/dist/es/a/BlurOverlay/index.js +2 -0
- package/dist/es/a/BlurOverlay/styles.scss +31 -0
- package/dist/es/a/ContentTree/ContentTree.js +11 -5
- 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 +12 -17
- package/dist/es/a/Conversation/common/Message/Message.js +15 -12
- package/dist/es/a/Conversation/styles.scss +56 -124
- package/dist/es/a/DotInfo/DotInfo.js +2 -2
- package/dist/es/a/Figure/Figure.js +2 -2
- package/dist/es/a/HamburgerButton/HamburgerButton.js +2 -2
- package/dist/es/a/IconList/IconList.js +2 -2
- package/dist/es/a/Label/Label.js +14 -6
- package/dist/es/a/Label/styles.scss +4 -4
- package/dist/es/a/LoadingCircle/LoadingCircle.js +2 -2
- package/dist/es/a/MetaCard/MetaCard.js +57 -0
- package/dist/es/a/MetaCard/index.js +1 -0
- package/dist/es/a/MetaCard/styles.scss +45 -0
- package/dist/es/a/People/People.js +2 -2
- package/dist/es/a/People/common/Person/Person.js +1 -1
- package/dist/es/a/Popover/Popover.js +4 -4
- package/dist/es/a/Popover/styles.scss +1 -1
- package/dist/es/a/ProgressBar/ProgressBar.js +2 -2
- package/dist/es/a/Quote/Quote.js +2 -2
- package/dist/es/a/SVG/SVG.js +2 -2
- package/dist/es/a/SnapScroller/SnapScroller.js +2 -2
- package/dist/es/a/SnapScroller/styles.scss +30 -9
- package/dist/es/a/Spinner/Spinner.js +2 -2
- package/dist/es/a/TextSteps/TextSteps.js +61 -0
- package/dist/es/a/TextSteps/index.js +1 -0
- package/dist/es/a/TextSteps/styles.scss +29 -0
- package/dist/es/a/Timestamp/Timestamp.js +2 -2
- package/dist/es/a/Tip/Tip.js +64 -0
- package/dist/es/a/Tip/index.js +2 -0
- package/dist/es/a/Tip/styles.scss +22 -0
- package/dist/es/a/index.js +7 -1
- package/dist/es/b/Button/Button.js +21 -7
- package/dist/es/b/Button/common/Group/Group.js +49 -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 +38 -8
- package/dist/es/b/Card/Card.js +66 -0
- package/dist/es/b/Card/common/Group/Group.js +65 -0
- package/dist/es/b/Card/common/Group/index.js +1 -0
- package/dist/es/b/Card/common/Group/styles.scss +38 -0
- package/dist/es/b/Card/common/Section/Section.js +48 -0
- package/dist/es/b/Card/common/Section/index.js +1 -0
- package/dist/es/b/Card/common/index.js +2 -0
- package/dist/es/b/Card/index.js +1 -0
- package/dist/es/b/Card/styles.scss +57 -0
- package/dist/es/b/Logo/Logo.js +2 -2
- package/dist/es/b/Page/Page.js +16 -5
- package/dist/es/b/Page/common/PageHelmet/PageHelmet.js +4 -2
- package/dist/es/b/Page/common/Section/Section.js +12 -2
- package/dist/es/b/Page/styles.scss +25 -4
- package/dist/es/b/SocialMediaButton/SocialMediaButton.js +2 -2
- package/dist/es/b/SocialMediaButton/styles.scss +1 -15
- package/dist/es/b/ThemeSelector/ThemeSelector.js +19 -32
- package/dist/es/b/ThemeSelector/styles.scss +2 -7
- package/dist/es/b/Title/Title.js +18 -12
- package/dist/es/b/index.js +2 -1
- package/dist/es/c/ContentSlides/ContentSlides.js +3 -3
- package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +1 -1
- package/dist/es/c/ContentSlides/styles.scss +2 -2
- package/dist/es/c/Modal/Modal.js +3 -3
- package/dist/es/c/Modal/common/ModalHeader/ModalHeader.js +1 -1
- package/dist/es/c/Modal/styles.scss +9 -13
- package/dist/es/c/Shortener/Shortener.js +2 -2
- package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +2 -2
- package/dist/es/f/FormInput/FormInput.js +2 -2
- package/dist/es/f/common/Debugger/Debugger.js +2 -2
- package/dist/es/f/common/Description/Description.js +2 -2
- package/dist/es/f/common/Label/Label.js +2 -2
- package/dist/es/f/common/Label/styles.scss +1 -1
- package/dist/es/f/fields/Checkbox/Checkbox.js +2 -2
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +21 -12
- package/dist/es/f/fields/ChoicesInput/styles.scss +26 -32
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +3 -3
- package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +3 -3
- package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +2 -2
- package/dist/es/f/fields/QueryCombobox/styles.scss +13 -11
- package/dist/es/f/fields/QuerySelect/QuerySelect.js +1 -1
- package/dist/es/f/fields/RatingsInput/RatingsInput.js +2 -2
- package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +3 -3
- package/dist/es/f/fields/SelectInput/SelectInput.js +4 -4
- package/dist/es/f/fields/SelectInput/styles.scss +33 -22
- package/dist/es/f/fields/TextInput/TextInput.js +18 -7
- package/dist/es/f/fields/TextInput/styles.scss +44 -14
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +8 -8
- package/dist/es/f/fields/TextareaInput/styles.scss +7 -5
- package/dist/es/form.scss +1 -1
- package/package.json +17 -16
- package/src/stories/a/BlurOverlay.stories.jsx +39 -0
- package/src/stories/a/Conversation.stories.jsx +11 -42
- package/src/stories/a/MetaCard.stories.jsx +35 -0
- package/src/stories/a/People.stories.jsx +2 -2
- package/src/stories/a/Quote.stories.jsx +1 -1
- package/src/stories/a/SnapScroller.stories.jsx +2 -2
- package/src/stories/a/Spinner.stories.jsx +1 -1
- package/src/stories/a/TextSteps.stories.jsx +19 -0
- package/src/stories/a/Tip.stories.jsx +28 -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/Card/Card.stories.jsx +59 -0
- package/src/stories/b/Card/Group.stories.jsx +59 -0
- package/src/stories/b/Page.stories.jsx +19 -3
- package/src/stories/b/ThemeSelector.stories.jsx +1 -1
- package/src/stories/b/Title.stories.jsx +1 -1
- package/src/stories/c/ContentSlides.stories.jsx +1 -1
- package/src/stories/colors.js +22 -10
- package/src/stories/f/SelectInput.stories.jsx +7 -0
- package/src/stories/f/TextInput.stories.jsx +11 -4
- package/src/ui/a/AnimatedBlobs/AnimatedBlobs.jsx +102 -0
- package/src/ui/a/AnimatedBlobs/index.js +1 -0
- package/src/ui/a/AnimatedBlobs/styles.scss +87 -0
- package/src/ui/a/AnimatedGradient/AnimatedGradient.jsx +73 -0
- package/src/ui/a/AnimatedGradient/index.js +1 -0
- package/src/ui/a/AnimatedGradient/styles.scss +14 -0
- package/src/ui/a/AnimatedGradient/webGIRenderer.js +541 -0
- package/src/ui/a/AppContext/useTheme.js +0 -4
- package/src/ui/a/BlurOverlay/BlurOverlay.jsx +75 -0
- package/src/ui/a/BlurOverlay/index.js +2 -0
- package/src/ui/a/BlurOverlay/styles.scss +31 -0
- package/src/ui/a/ContentTree/ContentTree.jsx +10 -6
- 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 +16 -20
- package/src/ui/a/Conversation/common/Message/Message.jsx +18 -11
- package/src/ui/a/Conversation/styles.scss +56 -124
- package/src/ui/a/DotInfo/DotInfo.jsx +2 -2
- package/src/ui/a/Figure/Figure.jsx +2 -2
- package/src/ui/a/HamburgerButton/HamburgerButton.jsx +2 -2
- package/src/ui/a/IconList/IconList.jsx +2 -2
- package/src/ui/a/Label/Label.jsx +13 -4
- package/src/ui/a/Label/styles.scss +4 -4
- package/src/ui/a/LoadingCircle/LoadingCircle.jsx +2 -2
- package/src/ui/a/MetaCard/MetaCard.jsx +81 -0
- package/src/ui/a/MetaCard/index.js +1 -0
- package/src/ui/a/MetaCard/styles.scss +45 -0
- package/src/ui/a/People/People.jsx +2 -2
- package/src/ui/a/People/common/Person/Person.jsx +1 -1
- package/src/ui/a/Popover/Popover.jsx +4 -4
- package/src/ui/a/Popover/styles.scss +1 -1
- package/src/ui/a/ProgressBar/ProgressBar.jsx +2 -2
- package/src/ui/a/Quote/Quote.jsx +2 -2
- package/src/ui/a/SVG/SVG.jsx +2 -2
- package/src/ui/a/SnapScroller/SnapScroller.jsx +2 -2
- package/src/ui/a/SnapScroller/styles.scss +30 -9
- package/src/ui/a/Spinner/Spinner.jsx +2 -2
- package/src/ui/a/TextSteps/TextSteps.jsx +87 -0
- package/src/ui/a/TextSteps/index.js +1 -0
- package/src/ui/a/TextSteps/styles.scss +29 -0
- package/src/ui/a/Timestamp/Timestamp.jsx +2 -2
- package/src/ui/a/Tip/Tip.jsx +88 -0
- package/src/ui/a/Tip/index.js +2 -0
- package/src/ui/a/Tip/styles.scss +22 -0
- package/src/ui/a/index.js +6 -0
- package/src/ui/b/Button/Button.jsx +26 -7
- package/src/ui/b/Button/common/Group/Group.jsx +71 -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 +38 -8
- package/src/ui/b/Card/Card.jsx +94 -0
- package/src/ui/b/Card/common/Group/Group.jsx +91 -0
- package/src/ui/b/Card/common/Group/index.js +1 -0
- package/src/ui/b/Card/common/Group/styles.scss +38 -0
- package/src/ui/b/Card/common/Section/Section.jsx +70 -0
- package/src/ui/b/Card/common/Section/index.js +1 -0
- package/src/ui/b/Card/common/index.js +2 -0
- package/src/ui/b/Card/index.js +1 -0
- package/src/ui/b/Card/styles.scss +57 -0
- package/src/ui/b/Logo/Logo.jsx +2 -2
- package/src/ui/b/Page/Page.jsx +13 -3
- package/src/ui/b/Page/common/PageHelmet/PageHelmet.jsx +2 -3
- package/src/ui/b/Page/common/Section/Section.jsx +16 -1
- package/src/ui/b/Page/styles.scss +25 -4
- package/src/ui/b/SocialMediaButton/SocialMediaButton.jsx +2 -2
- package/src/ui/b/SocialMediaButton/styles.scss +1 -15
- package/src/ui/b/ThemeSelector/ThemeSelector.jsx +12 -30
- package/src/ui/b/ThemeSelector/styles.scss +2 -7
- package/src/ui/b/Title/Title.jsx +30 -23
- package/src/ui/b/index.js +1 -0
- package/src/ui/c/ContentSlides/ContentSlides.jsx +3 -3
- package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +1 -1
- package/src/ui/c/ContentSlides/styles.scss +2 -2
- package/src/ui/c/Modal/Modal.jsx +3 -3
- package/src/ui/c/Modal/common/ModalHeader/ModalHeader.jsx +1 -1
- package/src/ui/c/Modal/styles.scss +9 -13
- package/src/ui/c/Shortener/Shortener.jsx +2 -2
- package/src/ui/c/SocialMediaShareButton/SocialMediaShareButton.jsx +2 -2
- package/src/ui/f/FormInput/FormInput.jsx +2 -2
- package/src/ui/f/common/Debugger/Debugger.jsx +2 -2
- package/src/ui/f/common/Description/Description.jsx +2 -2
- package/src/ui/f/common/Label/Label.jsx +2 -2
- package/src/ui/f/common/Label/styles.scss +1 -1
- package/src/ui/f/fields/Checkbox/Checkbox.jsx +2 -2
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +16 -9
- package/src/ui/f/fields/ChoicesInput/styles.scss +26 -32
- package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +3 -3
- package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +3 -3
- package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +2 -2
- package/src/ui/f/fields/QueryCombobox/styles.scss +13 -11
- package/src/ui/f/fields/QuerySelect/QuerySelect.jsx +1 -1
- package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +2 -2
- package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +3 -3
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +4 -4
- package/src/ui/f/fields/SelectInput/styles.scss +33 -22
- package/src/ui/f/fields/TextInput/TextInput.jsx +25 -12
- package/src/ui/f/fields/TextInput/styles.scss +44 -14
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +10 -10
- package/src/ui/f/fields/TextareaInput/styles.scss +7 -5
- package/src/ui/form.scss +1 -1
- package/tests/__snapshots__/Storyshots.test.js.snap +8572 -2878
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useInsertionEffect, useCallback } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import styleNames from '@pareto-engineering/bem/exports';
|
|
6
6
|
import { useApp } from "../../a";
|
|
@@ -17,31 +17,33 @@ const ThemeSelector = ({
|
|
|
17
17
|
id,
|
|
18
18
|
className: userClassName,
|
|
19
19
|
style,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
themes,
|
|
23
|
-
iconMap
|
|
20
|
+
themes
|
|
24
21
|
}) => {
|
|
25
22
|
const {
|
|
26
23
|
userTheme,
|
|
27
24
|
setPreferredTheme
|
|
28
25
|
} = useApp();
|
|
29
|
-
|
|
26
|
+
useInsertionEffect(() => {
|
|
30
27
|
import("./styles.scss");
|
|
31
28
|
}, []);
|
|
32
29
|
const loopThemes = useCallback(() => {
|
|
33
30
|
const current = themes.indexOf(userTheme);
|
|
34
31
|
setPreferredTheme(themes[(current + 1) % themes.length]);
|
|
35
32
|
}, [userTheme]);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
const current = userTheme ? themes.indexOf(userTheme) : 0;
|
|
34
|
+
const nextTheme = themes[(current + 1) % themes.length];
|
|
35
|
+
const themeText = nextTheme && nextTheme.charAt(0).toUpperCase() + nextTheme.slice(1);
|
|
36
|
+
return (
|
|
37
|
+
/*#__PURE__*/
|
|
38
|
+
// eslint-disable-next-line jsx-a11y/anchor-is-valid, jsx-a11y/no-static-element-interactions
|
|
39
|
+
React.createElement("a", {
|
|
40
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
41
|
+
id: id,
|
|
42
|
+
style: style,
|
|
43
|
+
onClick: loopThemes,
|
|
44
|
+
onKeyDown: loopThemes
|
|
45
|
+
}, themeText)
|
|
46
|
+
);
|
|
45
47
|
};
|
|
46
48
|
ThemeSelector.propTypes = {
|
|
47
49
|
/**
|
|
@@ -56,27 +58,12 @@ ThemeSelector.propTypes = {
|
|
|
56
58
|
* The React-written, css properties for this element.
|
|
57
59
|
*/
|
|
58
60
|
style: PropTypes.objectOf(PropTypes.string),
|
|
59
|
-
/**
|
|
60
|
-
* The children JSX
|
|
61
|
-
*/
|
|
62
|
-
// children: PropTypes.node,
|
|
63
|
-
|
|
64
61
|
/**
|
|
65
62
|
* The themes and the order in which they appear
|
|
66
63
|
*/
|
|
67
|
-
themes: PropTypes.arrayOf(PropTypes.string)
|
|
68
|
-
/**
|
|
69
|
-
* A map of the theme names with the icons that represent them. Uses the default font icon.
|
|
70
|
-
*/
|
|
71
|
-
iconMap: PropTypes.objectOf(PropTypes.string)
|
|
64
|
+
themes: PropTypes.arrayOf(PropTypes.string)
|
|
72
65
|
};
|
|
73
66
|
ThemeSelector.defaultProps = {
|
|
74
|
-
themes: ['light', 'dark']
|
|
75
|
-
iconMap: {
|
|
76
|
-
dark: 'n',
|
|
77
|
-
// sun,
|
|
78
|
-
light: 'm' // moon,
|
|
79
|
-
}
|
|
67
|
+
themes: ['light', 'dark']
|
|
80
68
|
};
|
|
81
|
-
|
|
82
69
|
export default ThemeSelector;
|
|
@@ -2,13 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
@use "@pareto-engineering/bem";
|
|
4
4
|
|
|
5
|
-
$default-color:var(--x, var(--contrast));
|
|
6
|
-
|
|
7
5
|
.#{bem.$base}.theme-selector {
|
|
8
|
-
background: transparent;
|
|
9
|
-
border: none;
|
|
10
|
-
color: $default-color;
|
|
11
6
|
cursor: pointer;
|
|
7
|
+
display: block;
|
|
8
|
+
text-decoration: none;
|
|
12
9
|
}
|
|
13
|
-
|
|
14
|
-
|
package/dist/es/b/Title/Title.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
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); }
|
|
2
2
|
/* @pareto-engineering/generator-front 0.3.1 */
|
|
3
3
|
import * as React from 'react';
|
|
4
|
+
import { useInsertionEffect } from 'react';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
5
6
|
|
|
6
7
|
// Package-level Imports
|
|
7
8
|
import styleNames from '@pareto-engineering/bem/exports';
|
|
8
9
|
|
|
9
10
|
// Component-level imports
|
|
10
|
-
import(
|
|
11
|
+
// import('./styles.scss')
|
|
11
12
|
|
|
12
13
|
// Helper Definition
|
|
13
14
|
const baseClassName = styleNames.base;
|
|
@@ -28,17 +29,22 @@ const Title = ({
|
|
|
28
29
|
subtitleStyle,
|
|
29
30
|
subtitleProps
|
|
30
31
|
// ...otherProps
|
|
31
|
-
}) =>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
}) => {
|
|
33
|
+
useInsertionEffect(() => {
|
|
34
|
+
import("./styles.scss");
|
|
35
|
+
}, []);
|
|
36
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
id: id,
|
|
38
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
39
|
+
style: style
|
|
40
|
+
}, /*#__PURE__*/React.createElement(HeadingWrapper, _extends({
|
|
41
|
+
className: [headingClassName, styleNames.heading].filter(e => e).join(' '),
|
|
42
|
+
style: headingStyle
|
|
43
|
+
}, headingProps), heading), subtitle && /*#__PURE__*/React.createElement(SubtitleWrapper, _extends({
|
|
44
|
+
className: [subtitleClassName, styleNames.subtitle].filter(e => e).join(' '),
|
|
45
|
+
style: subtitleStyle
|
|
46
|
+
}, subtitleProps), subtitle));
|
|
47
|
+
};
|
|
42
48
|
Title.propTypes = {
|
|
43
49
|
/**
|
|
44
50
|
* The HTML id for this element
|
package/dist/es/b/index.js
CHANGED
|
@@ -3,4 +3,5 @@ export { Logo } from "./Logo";
|
|
|
3
3
|
export { Page } from "./Page";
|
|
4
4
|
export { SocialMediaButton } from "./SocialMediaButton";
|
|
5
5
|
export { ThemeSelector } from "./ThemeSelector";
|
|
6
|
-
export { Title } from "./Title";
|
|
6
|
+
export { Title } from "./Title";
|
|
7
|
+
export { Card } from "./Card";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useInsertionEffect, useReducer } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { useHistory } from 'react-router-dom';
|
|
6
6
|
import styleNames from '@pareto-engineering/bem/exports';
|
|
@@ -48,7 +48,7 @@ const ContentSlides = ({
|
|
|
48
48
|
isDebug
|
|
49
49
|
// ...otherProps
|
|
50
50
|
}) => {
|
|
51
|
-
|
|
51
|
+
useInsertionEffect(() => {
|
|
52
52
|
import("./styles.scss");
|
|
53
53
|
}, []);
|
|
54
54
|
const history = useHistory();
|
|
@@ -97,7 +97,7 @@ const ContentSlides = ({
|
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
};
|
|
100
|
-
|
|
100
|
+
useInsertionEffect(() => {
|
|
101
101
|
setCurrentStep(currentStepIndex);
|
|
102
102
|
}, [currentStepIndex]);
|
|
103
103
|
return /*#__PURE__*/React.createElement(ContentSlidesContext.Provider, {
|
|
@@ -53,7 +53,7 @@ const HorizontalMenu = ({
|
|
|
53
53
|
attached: true,
|
|
54
54
|
height: ".4em",
|
|
55
55
|
color: color,
|
|
56
|
-
className: "y-
|
|
56
|
+
className: "y-background-far b-hard-y"
|
|
57
57
|
}), /*#__PURE__*/React.createElement("div", {
|
|
58
58
|
className: styleNames.elementContent
|
|
59
59
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -16,8 +16,8 @@ $class-navigator:navigator;
|
|
|
16
16
|
$default-sidebar-width:minmax(250px, 330px);
|
|
17
17
|
$default-border:none;//2px solid var(--grid);
|
|
18
18
|
$default-border-radius:var(--theme-border-radius);
|
|
19
|
-
$default-content-background: var(--
|
|
20
|
-
$default-padding:var(--
|
|
19
|
+
$default-content-background: var(--background-far);
|
|
20
|
+
$default-padding:var(--theme-default-padding);
|
|
21
21
|
|
|
22
22
|
$mobile-content-margin:6em;
|
|
23
23
|
|
package/dist/es/c/Modal/Modal.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useInsertionEffect } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import styleNames from '@pareto-engineering/bem/exports';
|
|
6
6
|
import { ModalHeader } from "./common";
|
|
@@ -23,7 +23,7 @@ const Modal = ({
|
|
|
23
23
|
close
|
|
24
24
|
// ...otherProps
|
|
25
25
|
}) => {
|
|
26
|
-
|
|
26
|
+
useInsertionEffect(() => {
|
|
27
27
|
import("./styles.scss");
|
|
28
28
|
}, []);
|
|
29
29
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -70,6 +70,6 @@ Modal.propTypes = {
|
|
|
70
70
|
close: PropTypes.func
|
|
71
71
|
};
|
|
72
72
|
Modal.defaultProps = {
|
|
73
|
-
|
|
73
|
+
color: 'heading'
|
|
74
74
|
};
|
|
75
75
|
export default Modal;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
|
|
3
3
|
@use "@pareto-engineering/bem";
|
|
4
|
+
@use "sass:math";
|
|
4
5
|
|
|
5
|
-
$default-background: var(--
|
|
6
|
+
$default-background: var(--background-cards);
|
|
7
|
+
$default-border: var(--theme-default-border-style) var(--metadata);
|
|
6
8
|
/* stylelint-disable-next-line color-named -- needed for rgba function */
|
|
7
9
|
$default-box-shadow: 0 10px 20px rgba(black, .2);
|
|
8
|
-
$default-padding: 1em
|
|
10
|
+
$default-padding: math.div(1em, 2);
|
|
9
11
|
$default-margin: 2em;
|
|
10
|
-
$default-max-height: 75vh;
|
|
11
|
-
$default-max-width: 90%;
|
|
12
|
-
$default-min-width: 20em;
|
|
13
12
|
|
|
14
13
|
.#{bem.$base}.modal {
|
|
15
14
|
background: $default-background;
|
|
@@ -17,22 +16,15 @@ $default-min-width: 20em;
|
|
|
17
16
|
display: flex;
|
|
18
17
|
flex-direction: column;
|
|
19
18
|
left: 50%;
|
|
20
|
-
max-height: $default-max-height;
|
|
21
|
-
max-width: $default-max-width;
|
|
22
|
-
min-width: $default-min-width;
|
|
23
19
|
overflow: auto;
|
|
24
20
|
position: absolute;
|
|
25
21
|
top: 50%;
|
|
26
22
|
transform: translate(-50%, -50%);
|
|
27
23
|
z-index: 100;
|
|
28
24
|
|
|
29
|
-
.modal-body {
|
|
30
|
-
padding: $default-padding;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
25
|
.modal-header {
|
|
34
26
|
background: $default-background;
|
|
35
|
-
border-bottom:
|
|
27
|
+
border-bottom: $default-border;
|
|
36
28
|
display: flex;
|
|
37
29
|
font-size: calc(var(--theme-heading-font-size-multiplier, 1) * var(--s1) * 1em);
|
|
38
30
|
justify-content: space-between;
|
|
@@ -44,5 +36,9 @@ $default-min-width: 20em;
|
|
|
44
36
|
margin: 0;
|
|
45
37
|
padding: $default-padding;
|
|
46
38
|
}
|
|
39
|
+
|
|
40
|
+
.close-button {
|
|
41
|
+
display: block;
|
|
42
|
+
}
|
|
47
43
|
}
|
|
48
44
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useInsertionEffect, useState } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import styleNames from '@pareto-engineering/bem/exports';
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ const Shortener = ({
|
|
|
24
24
|
separator,
|
|
25
25
|
countLetters
|
|
26
26
|
}) => {
|
|
27
|
-
|
|
27
|
+
useInsertionEffect(() => {
|
|
28
28
|
import("./styles.scss");
|
|
29
29
|
}, []);
|
|
30
30
|
const [displayFull, setDisplayFull] = useState(false);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useInsertionEffect } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import styleNames from '@pareto-engineering/bem/exports';
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@ const SocialMediaShareButton = ({
|
|
|
21
21
|
type,
|
|
22
22
|
color
|
|
23
23
|
}) => {
|
|
24
|
-
|
|
24
|
+
useInsertionEffect(() => {
|
|
25
25
|
import("./styles.scss");
|
|
26
26
|
}, []);
|
|
27
27
|
const isServer = typeof window === 'undefined';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
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); }
|
|
2
2
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { memo,
|
|
4
|
+
import { memo, useInsertionEffect } from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { TextInput, TextareaInput, ChoicesInput, SelectInput, QueryCombobox, QuerySelect, RatingsInput, Checkbox, QueryChoices } from "../fields";
|
|
7
7
|
|
|
@@ -21,7 +21,7 @@ const FormInput = ({
|
|
|
21
21
|
disabled,
|
|
22
22
|
...otherProps
|
|
23
23
|
}) => {
|
|
24
|
-
|
|
24
|
+
useInsertionEffect(() => {
|
|
25
25
|
import("./styles.scss");
|
|
26
26
|
}, []);
|
|
27
27
|
const newClassName = [className, componentClassName].filter(Boolean).join(' ');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { useState,
|
|
3
|
+
import { useState, useInsertionEffect, useContext } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { Button } from "../../../b";
|
|
6
6
|
import { FormikContext } from 'formik';
|
|
@@ -19,7 +19,7 @@ const Debugger = ({
|
|
|
19
19
|
initialIsOpen
|
|
20
20
|
// ...otherProps
|
|
21
21
|
}) => {
|
|
22
|
-
|
|
22
|
+
useInsertionEffect(() => {
|
|
23
23
|
import("./styles.scss");
|
|
24
24
|
}, []);
|
|
25
25
|
const [isOpen, setIsOpen] = useState(initialIsOpen);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useInsertionEffect } from 'react';
|
|
4
4
|
import { useField } from 'formik';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import styleNames from '@pareto-engineering/bem/exports';
|
|
@@ -22,7 +22,7 @@ const Description = ({
|
|
|
22
22
|
color
|
|
23
23
|
// ...otherProps
|
|
24
24
|
}) => {
|
|
25
|
-
|
|
25
|
+
useInsertionEffect(() => {
|
|
26
26
|
import("./styles.scss");
|
|
27
27
|
}, []);
|
|
28
28
|
const [field, meta] = useField(name);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useInsertionEffect } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import styleNames from '@pareto-engineering/bem/exports';
|
|
6
6
|
|
|
@@ -23,7 +23,7 @@ const Label = ({
|
|
|
23
23
|
as: Wrapper
|
|
24
24
|
// ...otherProps
|
|
25
25
|
}) => {
|
|
26
|
-
|
|
26
|
+
useInsertionEffect(() => {
|
|
27
27
|
import("./styles.scss");
|
|
28
28
|
}, []);
|
|
29
29
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
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); }
|
|
2
2
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { useInsertionEffect } from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import styleNames from '@pareto-engineering/bem/exports';
|
|
7
7
|
import { useField } from 'formik';
|
|
@@ -26,7 +26,7 @@ const Checkbox = ({
|
|
|
26
26
|
optional
|
|
27
27
|
// ...otherProps
|
|
28
28
|
}) => {
|
|
29
|
-
|
|
29
|
+
useInsertionEffect(() => {
|
|
30
30
|
import("./styles.scss");
|
|
31
31
|
}, []);
|
|
32
32
|
const [field] = useField({
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
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); }
|
|
2
2
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { useInsertionEffect, memo } from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import styleNames from '@pareto-engineering/bem/exports';
|
|
7
7
|
|
|
8
8
|
// Local Definitions
|
|
9
9
|
|
|
10
10
|
import { Choice } from "./common";
|
|
11
|
-
import { FormLabel } from "../../common";
|
|
11
|
+
import { FormDescription, FormLabel } from "../../common";
|
|
12
12
|
const baseClassName = styleNames.base;
|
|
13
13
|
const componentClassName = 'choices-input';
|
|
14
14
|
|
|
@@ -26,18 +26,19 @@ const ChoicesInput = ({
|
|
|
26
26
|
gridColumnsMobile,
|
|
27
27
|
gridColumnsDesktop,
|
|
28
28
|
color,
|
|
29
|
-
colorChecked,
|
|
30
29
|
label,
|
|
31
30
|
optional,
|
|
32
|
-
disabled
|
|
33
|
-
|
|
31
|
+
disabled,
|
|
32
|
+
description,
|
|
33
|
+
spaceBetween,
|
|
34
|
+
...otherProps
|
|
34
35
|
}) => {
|
|
35
|
-
|
|
36
|
+
useInsertionEffect(() => {
|
|
36
37
|
import("./styles.scss");
|
|
37
38
|
}, []);
|
|
38
39
|
return /*#__PURE__*/React.createElement("div", {
|
|
39
40
|
id: id,
|
|
40
|
-
className: [baseClassName, componentClassName, userClassName, multiple && 'multiple', color && `x-${color}
|
|
41
|
+
className: [baseClassName, componentClassName, userClassName, multiple && 'multiple', color && `x-${color}`].filter(e => e).join(' '),
|
|
41
42
|
style: {
|
|
42
43
|
'--grid-columns-desktop': gridColumnsDesktop,
|
|
43
44
|
'--grid-columns-mobile': gridColumnsMobile,
|
|
@@ -48,15 +49,20 @@ const ChoicesInput = ({
|
|
|
48
49
|
as: "p",
|
|
49
50
|
optional: optional
|
|
50
51
|
}, label), /*#__PURE__*/React.createElement("div", {
|
|
51
|
-
className:
|
|
52
|
+
className: ['choices', spaceBetween && 'space-between'].filter(Boolean).join(' ')
|
|
52
53
|
}, options.map(choice => /*#__PURE__*/React.createElement(Choice, _extends({
|
|
54
|
+
labelClassName: "with-faded-border",
|
|
53
55
|
key: choice.value,
|
|
54
56
|
name: name,
|
|
55
57
|
id: `${name}-${choice.value}`,
|
|
56
58
|
multiple: multiple,
|
|
57
59
|
validate: validate,
|
|
58
60
|
disabled: disabled
|
|
59
|
-
}, choice))))
|
|
61
|
+
}, otherProps, choice)))), /*#__PURE__*/React.createElement(FormDescription, {
|
|
62
|
+
className: "v50 mt-v s-1",
|
|
63
|
+
description: description,
|
|
64
|
+
name: name
|
|
65
|
+
}));
|
|
60
66
|
};
|
|
61
67
|
ChoicesInput.propTypes = {
|
|
62
68
|
/**
|
|
@@ -117,13 +123,16 @@ ChoicesInput.propTypes = {
|
|
|
117
123
|
/**
|
|
118
124
|
* Whether the input is optional or not
|
|
119
125
|
*/
|
|
120
|
-
optional: PropTypes.bool
|
|
126
|
+
optional: PropTypes.bool,
|
|
127
|
+
/**
|
|
128
|
+
* The select input description
|
|
129
|
+
*/
|
|
130
|
+
description: PropTypes.string
|
|
121
131
|
};
|
|
122
132
|
ChoicesInput.defaultProps = {
|
|
123
133
|
gridColumnsMobile: 2,
|
|
124
134
|
gridColumnsDesktop: 3,
|
|
125
|
-
color: '
|
|
126
|
-
colorChecked: 'main2',
|
|
135
|
+
color: 'interactive',
|
|
127
136
|
disabled: false
|
|
128
137
|
};
|
|
129
138
|
export default /*#__PURE__*/memo(ChoicesInput);
|
|
@@ -5,21 +5,22 @@
|
|
|
5
5
|
@use "@pareto-engineering/styles/src/mixins";
|
|
6
6
|
@use "@pareto-engineering/styles/src/globals" as *;
|
|
7
7
|
|
|
8
|
-
$default-
|
|
9
|
-
$default-
|
|
10
|
-
$default-
|
|
8
|
+
$default-flex-separator:calc(1em / 2) calc(.75em / 2);
|
|
9
|
+
$default-transition:var(--theme-default-transition);
|
|
10
|
+
$default-label-padding: .3em 1em calc(2em - .3em);
|
|
11
|
+
$default-label-height: .5em;
|
|
11
12
|
|
|
12
13
|
.#{bem.$base}.choices-input {
|
|
13
|
-
|
|
14
|
-
display:
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
>.choices {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-wrap: wrap;
|
|
17
|
+
gap: $default-flex-separator;
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
&.space-between {
|
|
20
|
+
justify-content: space-between;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
>.choice {
|
|
23
24
|
display: flex;
|
|
24
25
|
|
|
25
26
|
input {
|
|
@@ -33,35 +34,28 @@ $default-transition:all .3s;
|
|
|
33
34
|
background-color: var(--hard-x);
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
label {
|
|
43
|
-
background: var(--soft-x);
|
|
44
|
-
border: var(--theme-border-style) var(--hard-x);
|
|
45
|
-
border-radius: var(--theme-border-radius);
|
|
46
|
-
color: var(--on-x);
|
|
37
|
+
> label {
|
|
38
|
+
background-color: var(--background-inputs);
|
|
39
|
+
border-radius: var(--theme-default-border-radius);
|
|
40
|
+
color: var(--paragraph);
|
|
47
41
|
cursor: pointer;
|
|
48
42
|
display: block;
|
|
49
|
-
height:
|
|
50
|
-
|
|
43
|
+
height: $default-label-height;
|
|
44
|
+
max-width: 100%;
|
|
45
|
+
padding: $default-label-padding;
|
|
46
|
+
position: relative;
|
|
51
47
|
transition: $default-transition;
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
input:checked + label {
|
|
56
|
-
background: var(--y);
|
|
57
|
-
color: var(--on-y);
|
|
48
|
+
white-space: nowrap;
|
|
58
49
|
|
|
59
50
|
&:hover {
|
|
60
|
-
|
|
51
|
+
box-shadow: var(--theme-default-input-box-shadow);
|
|
61
52
|
}
|
|
62
53
|
}
|
|
54
|
+
|
|
55
|
+
input:checked + label {
|
|
56
|
+
background: var(--x);
|
|
57
|
+
color: var(--on-x);
|
|
58
|
+
}
|
|
63
59
|
}
|
|
64
60
|
}
|
|
65
61
|
}
|
|
66
|
-
|
|
67
|
-
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { useState,
|
|
3
|
+
import { useState, useInsertionEffect } from 'react';
|
|
4
4
|
import { useField } from 'formik';
|
|
5
5
|
import { useRelayEnvironment, fetchQuery } from 'react-relay';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
@@ -33,7 +33,7 @@ const QueryCombobox = ({
|
|
|
33
33
|
validate
|
|
34
34
|
// ...otherProps
|
|
35
35
|
}) => {
|
|
36
|
-
|
|
36
|
+
useInsertionEffect(() => {
|
|
37
37
|
import("./styles.scss");
|
|
38
38
|
}, []);
|
|
39
39
|
const [, meta, helpers] = useField({
|
|
@@ -195,7 +195,7 @@ QueryCombobox.defaultProps = {
|
|
|
195
195
|
getLabel: node => node.name
|
|
196
196
|
},
|
|
197
197
|
multiple: false,
|
|
198
|
-
color: '
|
|
198
|
+
color: 'background-near',
|
|
199
199
|
searchVariable: 'search',
|
|
200
200
|
transformSearch: search => search,
|
|
201
201
|
minLength: 2,
|
|
@@ -93,14 +93,14 @@ const Combobox = ({
|
|
|
93
93
|
className: "input",
|
|
94
94
|
disabled: disabled
|
|
95
95
|
})), isFetching && /*#__PURE__*/React.createElement(LoadingCircle, {
|
|
96
|
-
className: "x-
|
|
96
|
+
className: "x-main"
|
|
97
97
|
}), inputValue.length > minLength && !isFetching && /*#__PURE__*/React.createElement(Button, {
|
|
98
98
|
isSimple: true,
|
|
99
99
|
isCompact: true,
|
|
100
|
-
color: "
|
|
100
|
+
color: "heading",
|
|
101
101
|
onClick: resetInputValue
|
|
102
102
|
}, /*#__PURE__*/React.createElement("span", {
|
|
103
|
-
className: "
|
|
103
|
+
className: "icon"
|
|
104
104
|
}, "Y"))), /*#__PURE__*/React.createElement(Popover, {
|
|
105
105
|
isOpen: isOpen,
|
|
106
106
|
parentRef: parentRef
|
|
@@ -164,7 +164,7 @@ const MultipleCombobox = ({
|
|
|
164
164
|
}, /*#__PURE__*/React.createElement("span", {
|
|
165
165
|
className: "v25 mr-v"
|
|
166
166
|
}, selectedItem.label), /*#__PURE__*/React.createElement("span", {
|
|
167
|
-
className: "
|
|
167
|
+
className: "icon close"
|
|
168
168
|
}, "Y"))))), /*#__PURE__*/React.createElement("div", _extends({}, getComboboxProps(), {
|
|
169
169
|
className: "input-wrapper"
|
|
170
170
|
}), /*#__PURE__*/React.createElement("input", _extends({}, getInputProps(getDropdownProps({
|
|
@@ -180,7 +180,7 @@ const MultipleCombobox = ({
|
|
|
180
180
|
color: "main2",
|
|
181
181
|
onClick: resetInputValue
|
|
182
182
|
}, /*#__PURE__*/React.createElement("span", {
|
|
183
|
-
className: "
|
|
183
|
+
className: "icon"
|
|
184
184
|
}, "Y"))), /*#__PURE__*/React.createElement(Popover, {
|
|
185
185
|
isOpen: isOpen,
|
|
186
186
|
parentRef: parentRef
|