@pareto-engineering/design-system 2.0.0-alpha.7 → 2.0.0-alpha.71
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/.env.scripts.example +4 -0
- package/.eslintrc.js +25 -1
- package/babel.config.js +1 -0
- package/dist/cjs/a/{GradientBackground/GradientBackground.js → Alert/Alert.js} +68 -67
- package/dist/cjs/{c/SiteFooter/common/Section → a/Alert}/index.js +3 -3
- package/dist/cjs/a/Alert/styles.scss +74 -0
- package/dist/cjs/{c/BlogContext → a/AppContext}/Context.js +0 -0
- package/dist/cjs/a/AppContext/ContextProvider.js +96 -0
- package/dist/cjs/{c/BlogContext → a/AppContext}/index.js +13 -5
- package/dist/cjs/{c/BlogContext/useBlog.js → a/AppContext/useApp.js} +0 -0
- package/dist/cjs/a/AppContext/useTheme.js +45 -0
- package/dist/cjs/{c/SiteFooter/common/Section/Section.js → a/BackgroundGradient/BackgroundGradient.js} +20 -38
- package/dist/cjs/a/BackgroundGradient/index.js +15 -0
- package/dist/cjs/a/BackgroundGradient/styles.scss +16 -0
- package/dist/cjs/{experimental/GradientBackground/GradientBackground.js → a/ColumnLabel/ColumnLabel.js} +32 -30
- package/dist/cjs/{c/SiteMission → a/ColumnLabel}/index.js +3 -3
- package/dist/cjs/a/ColumnLabel/styles.scss +22 -0
- package/dist/cjs/{c/TeamGallery/common/PersonCard/PersonCard.js → a/ContentTree/ContentTree.js} +28 -29
- package/dist/cjs/a/ContentTree/common/Tree/Tree.js +116 -0
- package/dist/cjs/{c/BlogPostsList/common/Card → a/ContentTree/common/Tree}/index.js +3 -3
- package/dist/cjs/a/ContentTree/common/index.js +31 -0
- package/dist/cjs/a/ContentTree/common/useContentTree.js +82 -0
- package/dist/cjs/a/ContentTree/common/useFirstVisibleNode.js +65 -0
- package/dist/cjs/{c/SitePricing → a/ContentTree}/index.js +3 -3
- package/dist/cjs/a/ContentTree/styles.scss +33 -0
- package/dist/cjs/a/Conversation/Conversation.js +14 -8
- package/dist/cjs/a/Conversation/common/Message/Message.js +32 -6
- package/dist/cjs/a/Conversation/styles.scss +132 -33
- package/dist/cjs/{c/SiteFooter/SiteFooter.js → a/Label/Label.js} +28 -14
- package/dist/cjs/{f/fields/TextArea → a/Label}/index.js +3 -3
- package/dist/cjs/a/Label/styles.scss +34 -0
- package/dist/cjs/a/ModalContextProvider/Context.js +16 -0
- package/dist/cjs/{c/BlogContext/ContextProvider.js → a/ModalContextProvider/ModalContextProvider.js} +27 -25
- package/dist/cjs/a/ModalContextProvider/common/ModalRoot/ModalRoot.js +53 -0
- package/dist/cjs/a/ModalContextProvider/common/ModalRoot/index.js +15 -0
- package/dist/cjs/a/ModalContextProvider/common/ModalRoot/styles.scss +14 -0
- package/dist/cjs/{c/BlogPostsList → a/ModalContextProvider}/common/index.js +3 -3
- package/dist/cjs/a/ModalContextProvider/index.js +31 -0
- package/dist/cjs/a/ModalContextProvider/useModal.js +16 -0
- package/dist/cjs/a/OvalIllustration/OvalIllustration.js +35 -4
- package/dist/cjs/a/OvalIllustration/styles.scss +13 -16
- package/dist/cjs/{c/AcceptCookies/AcceptCookies.js → a/Popover/Popover.js} +57 -57
- package/dist/cjs/{c/BlogPost → a/Popover}/index.js +3 -3
- package/dist/cjs/a/Popover/styles.scss +33 -0
- package/dist/cjs/a/Shapes/Shapes.js +9 -1
- package/dist/cjs/a/Shapes/styles.scss +42 -9
- package/dist/cjs/{c/BlogPostsList/BlogPostsList.js → a/SnapScroller/SnapScroller.js} +15 -11
- package/dist/cjs/{c/SiteFooter → a/SnapScroller}/index.js +3 -3
- package/dist/cjs/a/SnapScroller/styles.scss +38 -0
- package/dist/cjs/a/index.js +57 -9
- package/dist/cjs/b/Button/Button.js +10 -4
- package/dist/cjs/b/Button/styles.scss +55 -10
- package/dist/cjs/b/Logo/Logo.js +41 -41
- package/dist/cjs/b/Logo/styles.scss +0 -138
- package/dist/cjs/b/Page/common/PageHelmet/PageHelmet.js +1 -1
- package/dist/cjs/b/Page/common/Section/Section.js +17 -3
- package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +4 -4
- package/dist/cjs/b/ThemeSelector/ThemeSelector.js +1 -1
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +16 -9
- package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- package/dist/cjs/c/ContentSlides/styles.scss +10 -4
- package/dist/cjs/c/{TeamGallery/TeamGallery.js → Modal/Modal.js} +32 -16
- package/dist/cjs/c/Modal/common/ModalHeader/ModalHeader.js +88 -0
- package/dist/cjs/c/{TeamGallery → Modal/common/ModalHeader}/index.js +3 -3
- package/dist/cjs/c/{TeamGallery → Modal}/common/index.js +3 -3
- package/dist/cjs/c/Modal/index.js +15 -0
- package/dist/cjs/c/Modal/styles.scss +46 -0
- package/dist/cjs/c/{BlogContext/BlogContextProvider.js → ModalButton/ModalButton.js} +28 -25
- package/dist/cjs/c/ModalButton/index.js +15 -0
- package/dist/cjs/c/{SiteMission/SiteMission.js → ObjectButton/ObjectButton.js} +59 -43
- package/dist/cjs/c/ObjectButton/index.js +15 -0
- package/dist/cjs/c/ObjectButton/styles.scss +52 -0
- package/dist/cjs/c/{SiteHeaderCTA/SiteHeaderCTA.js → SocialMediaShareButton/SocialMediaShareButton.js} +46 -43
- package/dist/cjs/c/SocialMediaShareButton/index.js +15 -0
- package/dist/cjs/c/SocialMediaShareButton/styles.scss +39 -0
- package/dist/cjs/c/index.js +17 -1
- package/dist/cjs/d/Modal/Modal.js +94 -0
- package/dist/cjs/d/Modal/common/ModalFooter/ModalFooter.js +77 -0
- package/dist/cjs/d/Modal/common/ModalFooter/index.js +15 -0
- package/dist/cjs/d/Modal/common/ModalHeader/ModalHeader.js +79 -0
- package/dist/cjs/d/Modal/common/ModalHeader/index.js +15 -0
- package/dist/cjs/d/Modal/common/index.js +21 -0
- package/dist/cjs/d/Modal/index.js +15 -0
- package/dist/cjs/d/Modal/styles.scss +52 -0
- package/dist/cjs/f/FormInput/FormInput.js +40 -3
- package/dist/cjs/f/FormInput/styles.scss +11 -0
- package/dist/cjs/f/common/Debugger/Debugger.js +1 -1
- package/dist/cjs/f/common/Description/Description.js +20 -14
- package/dist/cjs/f/common/Label/Label.js +11 -5
- package/dist/cjs/f/common/Label/styles.scss +2 -5
- package/dist/cjs/f/fields/{TaskRecommendation/TaskRecommendation.js → Checkbox/Checkbox.js} +36 -48
- package/dist/cjs/f/fields/Checkbox/index.js +15 -0
- package/dist/cjs/f/fields/Checkbox/styles.scss +14 -0
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +11 -4
- package/dist/cjs/f/fields/ChoicesInput/common/Choice/Choice.js +5 -2
- package/dist/cjs/f/fields/ChoicesInput/styles.scss +17 -2
- package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +168 -0
- package/dist/cjs/{c/SiteServices → f/fields/QueryChoices}/index.js +3 -3
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +251 -0
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +229 -0
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/index.js +15 -0
- package/dist/cjs/{c/BlogCategoryButton/BlogCategoryButton.js → f/fields/QueryCombobox/common/Menu/Menu.js} +39 -31
- package/dist/cjs/f/fields/QueryCombobox/common/Menu/index.js +15 -0
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +326 -0
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/index.js +15 -0
- package/dist/cjs/f/fields/QueryCombobox/common/index.js +29 -0
- package/dist/cjs/{c/AcceptCookies → f/fields/QueryCombobox}/index.js +3 -3
- package/dist/cjs/f/fields/QueryCombobox/styles.scss +91 -0
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +217 -0
- package/dist/cjs/f/fields/QuerySelect/index.js +15 -0
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +39 -6
- package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +11 -2
- package/dist/cjs/f/fields/RatingsInput/styles.scss +29 -20
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +67 -15
- package/dist/cjs/f/fields/SelectInput/styles.scss +33 -13
- package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +2 -2
- package/dist/cjs/f/fields/TaskRecommendationInput/styles.scss +0 -4
- package/dist/cjs/f/fields/TextInput/TextInput.js +50 -13
- package/dist/cjs/f/fields/TextInput/styles.scss +16 -7
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +48 -15
- package/dist/cjs/f/fields/TextareaInput/styles.scss +19 -6
- package/dist/cjs/f/fields/index.js +26 -18
- package/dist/cjs/form-reset.scss +1 -1
- package/dist/cjs/index.js +26 -0
- package/dist/cjs/test/QueryLoader/QueryLoader.js +41 -0
- package/dist/cjs/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +71 -0
- package/dist/cjs/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +49 -0
- package/dist/cjs/test/QueryLoader/common/PreloadedTestData/index.js +15 -0
- package/dist/cjs/test/QueryLoader/common/index.js +13 -0
- package/dist/cjs/test/QueryLoader/index.js +15 -0
- package/dist/cjs/{c/SiteFooter/common → test}/index.js +3 -3
- package/dist/cjs/utils/hooks/index.js +23 -0
- package/dist/cjs/utils/hooks/useDynamicPosition.js +107 -0
- package/dist/cjs/utils/hooks/useWindowSize.js +39 -0
- package/dist/cjs/utils/index.js +19 -0
- package/dist/cjs/utils/relay/EnvironmentProvider.js +23 -0
- package/dist/cjs/utils/relay/environment.js +12 -0
- package/dist/cjs/utils/relay/index.js +39 -0
- package/dist/cjs/utils/relay/mockRelayOperation.js +23 -0
- package/dist/cjs/utils/relay/mockResolvers.js +282 -0
- package/dist/es/a/Alert/Alert.js +118 -0
- package/dist/es/{c/SiteFooter/common/Section → a/Alert}/index.js +1 -1
- package/dist/es/a/Alert/styles.scss +74 -0
- package/dist/es/{c/BlogContext → a/AppContext}/Context.js +0 -0
- package/dist/es/a/AppContext/ContextProvider.js +78 -0
- package/dist/es/a/AppContext/index.js +5 -0
- package/dist/es/{c/BlogContext/useBlog.js → a/AppContext/useApp.js} +0 -0
- package/dist/es/a/AppContext/useTheme.js +34 -0
- package/dist/es/{c/SiteFooter/SiteFooter.js → a/BackgroundGradient/BackgroundGradient.js} +14 -15
- package/dist/es/a/BackgroundGradient/index.js +2 -0
- package/dist/es/a/BackgroundGradient/styles.scss +16 -0
- package/dist/es/a/ColumnLabel/ColumnLabel.js +78 -0
- package/dist/es/a/ColumnLabel/index.js +2 -0
- package/dist/es/a/ColumnLabel/styles.scss +22 -0
- package/dist/es/a/ContentTree/ContentTree.js +67 -0
- package/dist/es/a/ContentTree/common/Tree/Tree.js +98 -0
- package/dist/es/{c/BlogPostsList/common/Card → a/ContentTree/common/Tree}/index.js +1 -1
- package/dist/es/a/ContentTree/common/index.js +3 -0
- package/dist/es/a/ContentTree/common/useContentTree.js +74 -0
- package/dist/es/a/ContentTree/common/useFirstVisibleNode.js +54 -0
- package/dist/es/a/ContentTree/index.js +2 -0
- package/dist/es/a/ContentTree/styles.scss +33 -0
- package/dist/es/a/Conversation/Conversation.js +14 -8
- package/dist/es/a/Conversation/common/Message/Message.js +32 -6
- package/dist/es/a/Conversation/styles.scss +132 -33
- package/dist/es/{c/TeamGallery/TeamGallery.js → a/Label/Label.js} +30 -23
- package/dist/es/{f/fields/TextArea → a/Label}/index.js +1 -1
- package/dist/es/a/Label/styles.scss +34 -0
- package/dist/es/a/ModalContextProvider/Context.js +2 -0
- package/dist/es/a/ModalContextProvider/ModalContextProvider.js +47 -0
- package/dist/es/a/ModalContextProvider/common/ModalRoot/ModalRoot.js +36 -0
- package/dist/es/a/ModalContextProvider/common/ModalRoot/index.js +2 -0
- package/dist/es/a/ModalContextProvider/common/ModalRoot/styles.scss +14 -0
- package/dist/es/{c/BlogPost → a/ModalContextProvider/common}/index.js +1 -1
- package/dist/es/a/ModalContextProvider/index.js +4 -0
- package/dist/es/a/ModalContextProvider/useModal.js +3 -0
- package/dist/es/a/OvalIllustration/OvalIllustration.js +29 -4
- package/dist/es/a/OvalIllustration/styles.scss +13 -16
- package/dist/es/a/Popover/Popover.js +118 -0
- package/dist/es/a/Popover/index.js +2 -0
- package/dist/es/a/Popover/styles.scss +33 -0
- package/dist/es/a/Shapes/Shapes.js +9 -1
- package/dist/es/a/Shapes/styles.scss +42 -9
- package/dist/es/{c/BlogPostsList/BlogPostsList.js → a/SnapScroller/SnapScroller.js} +16 -11
- package/dist/es/a/SnapScroller/index.js +2 -0
- package/dist/es/a/SnapScroller/styles.scss +38 -0
- package/dist/es/a/index.js +8 -2
- package/dist/es/b/Button/Button.js +8 -2
- package/dist/es/b/Button/styles.scss +55 -10
- package/dist/es/b/Logo/Logo.js +41 -41
- package/dist/es/b/Logo/styles.scss +0 -138
- package/dist/es/b/Page/common/PageHelmet/PageHelmet.js +2 -2
- package/dist/es/b/Page/common/Section/Section.js +17 -3
- package/dist/es/b/SocialMediaButton/SocialMediaButton.js +5 -5
- package/dist/es/b/ThemeSelector/ThemeSelector.js +2 -2
- package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +16 -9
- package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- package/dist/es/c/ContentSlides/styles.scss +10 -4
- package/dist/es/c/Modal/Modal.js +79 -0
- package/dist/es/c/Modal/common/ModalHeader/ModalHeader.js +67 -0
- package/dist/es/c/Modal/common/ModalHeader/index.js +1 -0
- package/dist/es/c/Modal/common/index.js +1 -0
- package/dist/es/c/Modal/index.js +2 -0
- package/dist/es/c/Modal/styles.scss +46 -0
- package/dist/es/c/ModalButton/ModalButton.js +48 -0
- package/dist/es/c/ModalButton/index.js +2 -0
- package/dist/es/c/ObjectButton/ObjectButton.js +111 -0
- package/dist/es/c/ObjectButton/index.js +2 -0
- package/dist/es/c/ObjectButton/styles.scss +52 -0
- package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +95 -0
- package/dist/es/c/SocialMediaShareButton/index.js +2 -0
- package/dist/es/c/SocialMediaShareButton/styles.scss +39 -0
- package/dist/es/c/index.js +3 -1
- package/dist/es/d/Modal/Modal.js +77 -0
- package/dist/es/d/Modal/common/ModalFooter/ModalFooter.js +56 -0
- package/dist/es/d/Modal/common/ModalFooter/index.js +1 -0
- package/dist/es/d/Modal/common/ModalHeader/ModalHeader.js +60 -0
- package/dist/es/d/Modal/common/ModalHeader/index.js +1 -0
- package/dist/es/d/Modal/common/index.js +2 -0
- package/dist/es/d/Modal/index.js +2 -0
- package/dist/es/d/Modal/styles.scss +52 -0
- package/dist/es/f/FormInput/FormInput.js +40 -3
- package/dist/es/f/FormInput/styles.scss +11 -0
- package/dist/es/f/common/Debugger/Debugger.js +1 -1
- package/dist/es/f/common/Description/Description.js +19 -14
- package/dist/es/f/common/Label/Label.js +11 -5
- package/dist/es/f/common/Label/styles.scss +2 -5
- package/dist/es/f/fields/Checkbox/Checkbox.js +99 -0
- package/dist/es/f/fields/Checkbox/index.js +2 -0
- package/dist/es/f/fields/Checkbox/styles.scss +14 -0
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +11 -4
- package/dist/es/f/fields/ChoicesInput/common/Choice/Choice.js +5 -2
- package/dist/es/f/fields/ChoicesInput/styles.scss +17 -2
- package/dist/es/f/fields/QueryChoices/QueryChoices.js +137 -0
- package/dist/es/f/fields/QueryChoices/index.js +2 -0
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +228 -0
- package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +208 -0
- package/dist/es/f/fields/QueryCombobox/common/Combobox/index.js +2 -0
- package/dist/es/f/fields/QueryCombobox/common/Menu/Menu.js +77 -0
- package/dist/es/f/fields/QueryCombobox/common/Menu/index.js +2 -0
- package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +298 -0
- package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/index.js +2 -0
- package/dist/es/f/fields/QueryCombobox/common/index.js +3 -0
- package/dist/es/f/fields/QueryCombobox/index.js +2 -0
- package/dist/es/f/fields/QueryCombobox/styles.scss +91 -0
- package/dist/es/f/fields/QuerySelect/QuerySelect.js +195 -0
- package/dist/es/f/fields/QuerySelect/index.js +2 -0
- package/dist/es/f/fields/RatingsInput/RatingsInput.js +38 -6
- package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +11 -2
- package/dist/es/f/fields/RatingsInput/styles.scss +29 -20
- package/dist/es/f/fields/SelectInput/SelectInput.js +66 -15
- package/dist/es/f/fields/SelectInput/styles.scss +33 -13
- package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +2 -2
- package/dist/es/f/fields/TaskRecommendationInput/styles.scss +0 -4
- package/dist/es/f/fields/TextInput/TextInput.js +50 -13
- package/dist/es/f/fields/TextInput/styles.scss +16 -7
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +48 -15
- package/dist/es/f/fields/TextareaInput/styles.scss +19 -6
- package/dist/es/f/fields/index.js +5 -4
- package/dist/es/form-reset.scss +1 -1
- package/dist/es/index.js +3 -1
- package/dist/es/test/QueryLoader/QueryLoader.js +29 -0
- package/dist/es/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +71 -0
- package/dist/es/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +31 -0
- package/dist/es/test/QueryLoader/common/PreloadedTestData/index.js +2 -0
- package/dist/es/test/QueryLoader/common/index.js +1 -0
- package/dist/es/test/QueryLoader/index.js +2 -0
- package/dist/es/test/index.js +1 -0
- package/dist/es/utils/hooks/index.js +2 -0
- package/dist/es/utils/hooks/useDynamicPosition.js +93 -0
- package/dist/es/utils/hooks/useWindowSize.js +27 -0
- package/dist/es/utils/index.js +1 -0
- package/dist/es/utils/relay/EnvironmentProvider.js +11 -0
- package/dist/es/utils/relay/environment.js +3 -0
- package/dist/es/utils/relay/index.js +4 -0
- package/dist/es/utils/relay/mockRelayOperation.js +9 -0
- package/dist/es/utils/relay/mockResolvers.js +275 -0
- package/package.json +18 -4
- package/relay.config.js +12 -0
- package/schema.graphql +4075 -0
- package/scripts/fetchSchema.js +74 -0
- package/src/__snapshots__/Storyshots.test.js.snap +13640 -7189
- package/src/local.scss +4 -2
- package/src/stories/StyleGuide/Sprites.stories.mdx +25 -0
- package/src/stories/StyleGuide/helpers.js +16 -0
- package/src/stories/a/Alert.stories.jsx +75 -0
- package/src/stories/a/{SiteContext.stories.jsx → AppContext.stories.jsx} +8 -8
- package/src/stories/a/BackgroundGradient.stories.jsx +38 -0
- package/src/stories/a/ContentTree.stories.jsx +662 -0
- package/src/stories/a/Conversation.stories.jsx +78 -1
- package/src/stories/a/DotInfo.stories.jsx +14 -13
- package/src/stories/a/Label.stories.jsx +49 -0
- package/src/stories/a/OvalIllustration.stories.jsx +39 -16
- package/src/stories/a/Popover.stories.jsx +106 -0
- package/src/stories/a/ProgressBar.stories.jsx +16 -7
- package/src/stories/a/Shapes.stories.jsx +18 -0
- package/src/stories/a/SnapScroller.stories.jsx +98 -0
- package/src/stories/a/Timestamp.stories.jsx +35 -39
- package/src/stories/b/Button.stories.jsx +27 -4
- package/src/stories/b/Logo.stories.jsx +23 -14
- package/src/stories/b/Page.stories.jsx +25 -1
- package/src/stories/b/QuestionDropdown.stories.jsx +20 -30
- package/src/stories/b/SocialMediaButton.stories.jsx +36 -53
- package/src/stories/b/ThemeSelector.stories.jsx +5 -5
- package/src/stories/b/Title.stories.jsx +13 -15
- package/src/stories/c/ContentSlides.stories.jsx +35 -151
- package/src/stories/c/Modal.stories.jsx +67 -0
- package/src/stories/c/Shortener.stories.jsx +9 -3
- package/src/stories/c/SocialMediaShareButton.stories.jsx +33 -0
- package/src/stories/f/Checkbox.stories.jsx +95 -0
- package/src/stories/f/ChoicesInput.stories.jsx +100 -128
- package/src/stories/f/Description.stories.jsx +22 -4
- package/src/stories/f/FormInput.stories.jsx +264 -0
- package/src/stories/f/Label.stories.jsx +8 -3
- package/src/stories/f/QueryChoices.stories.jsx +135 -0
- package/src/stories/f/QueryCombobox.stories.jsx +279 -0
- package/src/stories/f/QuerySelect.stories.jsx +142 -0
- package/src/stories/f/RatingsInput.stories.jsx +36 -22
- package/src/stories/f/SelectInput.stories.jsx +48 -49
- package/src/stories/f/TextInput.stories.jsx +70 -43
- package/src/stories/f/TextareaInput.stories.jsx +70 -19
- package/src/stories/f/__generated__/FormInputAllTaskStatusesQuery.graphql.js +122 -0
- package/src/stories/f/__generated__/FormInputAllTeamsQuery.graphql.js +139 -0
- package/src/stories/f/__generated__/QueryChoicesAllTaskStatusesQuery.graphql.js +122 -0
- package/src/stories/f/__generated__/QueryChoicesUserChoicesQuery.graphql.js +122 -0
- package/src/stories/f/__generated__/QueryComboboxAllTeamsQuery.graphql.js +139 -0
- package/src/stories/f/__generated__/QuerySelectAllTaskStatusesQuery.graphql.js +122 -0
- package/src/stories/test/QueryLoader.stories.jsx +36 -0
- package/src/stories/utils/generateNodeId.js +12 -0
- package/src/stories/utils/lorem.js +15 -0
- package/src/stories/utils/relay/EnvironmentProvider.jsx +14 -0
- package/src/stories/utils/relay/environment.js +5 -0
- package/src/stories/utils/relay/index.js +4 -0
- package/src/stories/utils/relay/mockRelayOperation.js +14 -0
- package/src/stories/utils/relay/mockResolvers.js +299 -0
- package/src/stories/utils/testData.js +63 -0
- package/src/ui/a/Alert/Alert.jsx +144 -0
- package/src/ui/a/Alert/index.js +2 -0
- package/src/ui/a/Alert/styles.scss +74 -0
- package/src/ui/a/{SiteContext → AppContext}/Context.js +0 -0
- package/src/ui/a/{SiteContext → AppContext}/ContextProvider.jsx +8 -7
- package/src/ui/a/AppContext/index.js +5 -0
- package/src/ui/a/{SiteContext/useSite.js → AppContext/useApp.js} +0 -0
- package/src/ui/a/{SiteContext → AppContext}/useTheme.js +0 -0
- package/src/ui/a/BackgroundGradient/BackgroundGradient.jsx +76 -0
- package/src/ui/a/BackgroundGradient/index.js +2 -0
- package/src/ui/a/BackgroundGradient/styles.scss +16 -0
- package/src/ui/a/ContentTree/ContentTree.jsx +88 -0
- package/src/ui/a/ContentTree/common/Tree/Tree.jsx +138 -0
- package/src/ui/a/ContentTree/common/Tree/index.js +2 -0
- package/src/ui/a/ContentTree/common/index.js +3 -0
- package/src/ui/a/ContentTree/common/useContentTree.js +83 -0
- package/src/ui/a/ContentTree/common/useFirstVisibleNode.js +59 -0
- package/src/ui/a/ContentTree/index.js +2 -0
- package/src/ui/a/ContentTree/styles.scss +33 -0
- package/src/ui/a/Conversation/Conversation.jsx +15 -7
- package/src/ui/a/Conversation/common/Message/Message.jsx +38 -6
- package/src/ui/a/Conversation/styles.scss +132 -33
- package/src/ui/a/Label/Label.jsx +93 -0
- package/src/ui/a/Label/index.js +2 -0
- package/src/ui/a/Label/styles.scss +34 -0
- package/src/ui/a/OvalIllustration/OvalIllustration.jsx +28 -2
- package/src/ui/a/OvalIllustration/styles.scss +13 -16
- package/src/ui/a/Popover/Popover.jsx +157 -0
- package/src/ui/a/Popover/index.js +2 -0
- package/src/ui/a/Popover/styles.scss +33 -0
- package/src/ui/a/Shapes/Shapes.jsx +10 -0
- package/src/ui/a/Shapes/styles.scss +42 -9
- package/src/ui/a/SnapScroller/SnapScroller.jsx +83 -0
- package/src/ui/a/SnapScroller/index.js +2 -0
- package/src/ui/a/SnapScroller/styles.scss +38 -0
- package/src/ui/a/index.js +10 -4
- package/src/ui/b/Button/Button.jsx +9 -1
- package/src/ui/b/Button/styles.scss +55 -10
- package/src/ui/b/Logo/Logo.jsx +41 -41
- package/src/ui/b/Logo/styles.scss +0 -138
- package/src/ui/b/Page/common/PageHelmet/PageHelmet.jsx +2 -2
- package/src/ui/b/Page/common/Section/Section.jsx +19 -2
- package/src/ui/b/SocialMediaButton/SocialMediaButton.jsx +4 -4
- package/src/ui/b/ThemeSelector/ThemeSelector.jsx +2 -2
- package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +12 -5
- package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +3 -2
- package/src/ui/c/ContentSlides/styles.scss +10 -4
- package/src/ui/{f/fields/RadioInput/RadioInput.jsx → c/Modal/Modal.jsx} +25 -36
- package/src/ui/c/Modal/common/ModalHeader/ModalHeader.jsx +89 -0
- package/src/ui/c/Modal/common/ModalHeader/index.js +1 -0
- package/src/ui/c/Modal/common/index.js +1 -0
- package/src/ui/c/Modal/index.js +2 -0
- package/src/ui/c/Modal/styles.scss +46 -0
- package/src/ui/c/SocialMediaShareButton/SocialMediaShareButton.jsx +121 -0
- package/src/ui/c/SocialMediaShareButton/index.js +2 -0
- package/src/ui/c/SocialMediaShareButton/styles.scss +39 -0
- package/src/ui/c/index.js +2 -0
- package/src/ui/f/FormInput/FormInput.jsx +61 -1
- package/src/ui/f/FormInput/styles.scss +11 -0
- package/src/ui/f/common/Debugger/Debugger.jsx +1 -1
- package/src/ui/f/common/Description/Description.jsx +34 -29
- package/src/ui/f/common/Label/Label.jsx +10 -4
- package/src/ui/f/common/Label/styles.scss +2 -5
- package/src/ui/f/fields/{CheckboxInput/CheckboxInput.jsx → Checkbox/Checkbox.jsx} +43 -32
- package/src/ui/f/fields/Checkbox/index.js +2 -0
- package/src/ui/f/fields/Checkbox/styles.scss +14 -0
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +9 -3
- package/src/ui/f/fields/ChoicesInput/common/Choice/Choice.jsx +10 -2
- package/src/ui/f/fields/ChoicesInput/styles.scss +17 -2
- package/src/ui/f/fields/QueryChoices/QueryChoices.jsx +153 -0
- package/src/ui/f/fields/QueryChoices/index.js +2 -0
- package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +240 -0
- package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +241 -0
- package/src/ui/f/fields/QueryCombobox/common/Combobox/index.js +2 -0
- package/src/ui/f/fields/QueryCombobox/common/Menu/Menu.jsx +103 -0
- package/src/ui/f/fields/QueryCombobox/common/Menu/index.js +2 -0
- package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +340 -0
- package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/index.js +2 -0
- package/src/ui/f/fields/QueryCombobox/common/index.js +3 -0
- package/src/ui/f/fields/QueryCombobox/index.js +2 -0
- package/src/ui/f/fields/QueryCombobox/styles.scss +91 -0
- package/src/ui/f/fields/QuerySelect/QuerySelect.jsx +213 -0
- package/src/ui/f/fields/QuerySelect/index.js +2 -0
- package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +54 -19
- package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +7 -1
- package/src/ui/f/fields/RatingsInput/styles.scss +29 -20
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +72 -8
- package/src/ui/f/fields/SelectInput/styles.scss +33 -13
- package/src/ui/f/fields/TextInput/TextInput.jsx +44 -10
- package/src/ui/f/fields/TextInput/styles.scss +16 -7
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +49 -21
- package/src/ui/f/fields/TextareaInput/styles.scss +19 -6
- package/src/ui/f/fields/index.js +4 -3
- package/src/ui/form-reset.scss +1 -1
- package/src/ui/index.js +2 -0
- package/src/ui/test/QueryLoader/QueryLoader.jsx +41 -0
- package/src/ui/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +68 -0
- package/src/ui/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.jsx +51 -0
- package/src/ui/test/QueryLoader/common/PreloadedTestData/index.js +2 -0
- package/src/ui/test/QueryLoader/common/index.js +1 -0
- package/src/ui/test/QueryLoader/index.js +2 -0
- package/src/ui/test/index.js +1 -0
- package/src/ui/utils/hooks/index.js +2 -0
- package/src/ui/utils/hooks/useDynamicPosition.js +104 -0
- package/src/ui/utils/hooks/useWindowSize.js +32 -0
- package/src/ui/utils/index.js +1 -0
- package/stylelint.config.js +13 -13
- package/dist/cjs/a/GradientBackground/index.js +0 -15
- package/dist/cjs/a/GradientBackground/styles.scss +0 -191
- package/dist/cjs/c/AcceptCookies/styles.scss +0 -49
- package/dist/cjs/c/BlogCategoryButton/index.js +0 -15
- package/dist/cjs/c/BlogPost/BlogPost.js +0 -147
- package/dist/cjs/c/BlogPost/styles.scss +0 -33
- package/dist/cjs/c/BlogPostsList/common/Card/Card.js +0 -170
- package/dist/cjs/c/BlogPostsList/index.js +0 -15
- package/dist/cjs/c/BlogPostsList/styles.scss +0 -72
- package/dist/cjs/c/SiteFooter/styles.scss +0 -34
- package/dist/cjs/c/SiteHeaderCTA/index.js +0 -15
- package/dist/cjs/c/SiteHeaderCTA/styles.scss +0 -44
- package/dist/cjs/c/SiteMission/styles.scss +0 -30
- package/dist/cjs/c/SiteNavigation/SiteNavigation.js +0 -130
- package/dist/cjs/c/SiteNavigation/index.js +0 -15
- package/dist/cjs/c/SiteNavigation/styles.scss +0 -118
- package/dist/cjs/c/SiteOnboardingStep/SiteOnboardingStep.js +0 -98
- package/dist/cjs/c/SiteOnboardingStep/index.js +0 -15
- package/dist/cjs/c/SiteOnboardingStep/styles.scss +0 -51
- package/dist/cjs/c/SitePricing/SitePricing.js +0 -108
- package/dist/cjs/c/SitePricing/styles.scss +0 -73
- package/dist/cjs/c/SiteServices/SiteServices.js +0 -211
- package/dist/cjs/c/SiteServices/styles.scss +0 -138
- package/dist/cjs/c/TeamGallery/common/PersonCard/index.js +0 -15
- package/dist/cjs/c/TeamGallery/styles.scss +0 -100
- package/dist/cjs/c/Testimonials/Testimonials.js +0 -119
- package/dist/cjs/c/Testimonials/index.js +0 -15
- package/dist/cjs/c/Testimonials/styles.scss +0 -112
- package/dist/cjs/experimental/GradientBackground/index.js +0 -15
- package/dist/cjs/experimental/GradientBackground/styles.scss +0 -64
- package/dist/cjs/experimental/index.js +0 -13
- package/dist/cjs/f/fields/TaskRecommendation/index.js +0 -15
- package/dist/cjs/f/fields/TaskRecommendation/styles.scss +0 -37
- package/dist/cjs/f/fields/TextArea/TextArea.js +0 -141
- package/dist/cjs/f/fields/TextArea/styles.scss +0 -19
- package/dist/es/a/GradientBackground/GradientBackground.js +0 -118
- package/dist/es/a/GradientBackground/index.js +0 -2
- package/dist/es/a/GradientBackground/styles.scss +0 -191
- package/dist/es/c/AcceptCookies/AcceptCookies.js +0 -117
- package/dist/es/c/AcceptCookies/index.js +0 -2
- package/dist/es/c/AcceptCookies/styles.scss +0 -49
- package/dist/es/c/BlogCategoryButton/BlogCategoryButton.js +0 -68
- package/dist/es/c/BlogCategoryButton/index.js +0 -2
- package/dist/es/c/BlogContext/BlogContextProvider.js +0 -45
- package/dist/es/c/BlogContext/ContextProvider.js +0 -45
- package/dist/es/c/BlogContext/index.js +0 -4
- package/dist/es/c/BlogPost/BlogPost.js +0 -128
- package/dist/es/c/BlogPost/styles.scss +0 -33
- package/dist/es/c/BlogPostsList/common/Card/Card.js +0 -143
- package/dist/es/c/BlogPostsList/common/index.js +0 -1
- package/dist/es/c/BlogPostsList/index.js +0 -2
- package/dist/es/c/BlogPostsList/styles.scss +0 -72
- package/dist/es/c/SiteFooter/common/Section/Section.js +0 -73
- package/dist/es/c/SiteFooter/common/index.js +0 -1
- package/dist/es/c/SiteFooter/index.js +0 -2
- package/dist/es/c/SiteFooter/styles.scss +0 -34
- package/dist/es/c/SiteHeaderCTA/SiteHeaderCTA.js +0 -92
- package/dist/es/c/SiteHeaderCTA/index.js +0 -2
- package/dist/es/c/SiteHeaderCTA/styles.scss +0 -44
- package/dist/es/c/SiteMission/SiteMission.js +0 -96
- package/dist/es/c/SiteMission/index.js +0 -2
- package/dist/es/c/SiteMission/styles.scss +0 -30
- package/dist/es/c/SiteNavigation/SiteNavigation.js +0 -111
- package/dist/es/c/SiteNavigation/index.js +0 -2
- package/dist/es/c/SiteNavigation/styles.scss +0 -118
- package/dist/es/c/SiteOnboardingStep/SiteOnboardingStep.js +0 -81
- package/dist/es/c/SiteOnboardingStep/index.js +0 -2
- package/dist/es/c/SiteOnboardingStep/styles.scss +0 -51
- package/dist/es/c/SitePricing/SitePricing.js +0 -91
- package/dist/es/c/SitePricing/index.js +0 -2
- package/dist/es/c/SitePricing/styles.scss +0 -73
- package/dist/es/c/SiteServices/SiteServices.js +0 -195
- package/dist/es/c/SiteServices/index.js +0 -2
- package/dist/es/c/SiteServices/styles.scss +0 -138
- package/dist/es/c/TeamGallery/common/PersonCard/PersonCard.js +0 -64
- package/dist/es/c/TeamGallery/common/PersonCard/index.js +0 -2
- package/dist/es/c/TeamGallery/common/index.js +0 -1
- package/dist/es/c/TeamGallery/index.js +0 -2
- package/dist/es/c/TeamGallery/styles.scss +0 -100
- package/dist/es/c/Testimonials/Testimonials.js +0 -99
- package/dist/es/c/Testimonials/index.js +0 -2
- package/dist/es/c/Testimonials/styles.scss +0 -112
- package/dist/es/experimental/GradientBackground/GradientBackground.js +0 -76
- package/dist/es/experimental/GradientBackground/index.js +0 -2
- package/dist/es/experimental/GradientBackground/styles.scss +0 -64
- package/dist/es/experimental/index.js +0 -1
- package/dist/es/f/fields/TaskRecommendation/TaskRecommendation.js +0 -111
- package/dist/es/f/fields/TaskRecommendation/index.js +0 -2
- package/dist/es/f/fields/TaskRecommendation/styles.scss +0 -37
- package/dist/es/f/fields/TextArea/TextArea.js +0 -124
- package/dist/es/f/fields/TextArea/styles.scss +0 -19
- package/src/stories/f/CheckboxInput.stories.jsx +0 -37
- package/src/stories/f/RadioInput.stories.jsx +0 -37
- package/src/stories/f/TaskRecommendationInput.stories.jsx +0 -38
- package/src/ui/a/SiteContext/index.js +0 -5
- package/src/ui/f/fields/CheckboxInput/index.js +0 -2
- package/src/ui/f/fields/CheckboxInput/styles.scss +0 -28
- package/src/ui/f/fields/RadioInput/index.js +0 -2
- package/src/ui/f/fields/RadioInput/styles.scss +0 -26
- package/src/ui/f/fields/TaskRecommendationInput/TaskRecommendationInput.jsx +0 -130
- package/src/ui/f/fields/TaskRecommendationInput/index.js +0 -2
- package/src/ui/f/fields/TaskRecommendationInput/styles.scss +0 -41
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || 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
|
+
|
|
3
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { useState, useRef, useLayoutEffect } from 'react';
|
|
6
|
+
import { Popover, Label } from "../../a";
|
|
7
|
+
import { Button } from "../../b";
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import styleNames from '@pareto-engineering/bem'; // Local Definitions
|
|
10
|
+
|
|
11
|
+
const baseClassName = styleNames.base;
|
|
12
|
+
const componentClassName = 'object-button';
|
|
13
|
+
/**
|
|
14
|
+
* This is the component description.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const ObjectButton = ({
|
|
18
|
+
id,
|
|
19
|
+
className: userClassName,
|
|
20
|
+
style,
|
|
21
|
+
color,
|
|
22
|
+
node,
|
|
23
|
+
nodeToString,
|
|
24
|
+
options,
|
|
25
|
+
image // ...otherProps
|
|
26
|
+
|
|
27
|
+
}) => {
|
|
28
|
+
useLayoutEffect(() => {
|
|
29
|
+
import("./styles.scss");
|
|
30
|
+
}, []);
|
|
31
|
+
const parentRef = useRef(null);
|
|
32
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
33
|
+
|
|
34
|
+
const handleClick = () => {
|
|
35
|
+
setIsOpen(!isOpen);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const nodeName = nodeToString(node);
|
|
39
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
41
|
+
style: style,
|
|
42
|
+
ref: parentRef
|
|
43
|
+
}, /*#__PURE__*/React.createElement(Label, {
|
|
44
|
+
id: id,
|
|
45
|
+
color: color
|
|
46
|
+
}, image && /*#__PURE__*/React.createElement("img", {
|
|
47
|
+
src: image,
|
|
48
|
+
alt: nodeName
|
|
49
|
+
}), /*#__PURE__*/React.createElement("span", null, nodeName)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
50
|
+
id: id,
|
|
51
|
+
color: color,
|
|
52
|
+
onClick: handleClick
|
|
53
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
54
|
+
className: "f-icons"
|
|
55
|
+
}, "E")), /*#__PURE__*/React.createElement(Popover, {
|
|
56
|
+
isOpen: isOpen,
|
|
57
|
+
parentRef: parentRef,
|
|
58
|
+
preferredPrimaryOrder: ['bottom', 'top', 'right', 'left']
|
|
59
|
+
}, /*#__PURE__*/React.createElement("ul", null, options.map(option => /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(Button, _extends({}, option, {
|
|
60
|
+
color: color,
|
|
61
|
+
isSimple: true
|
|
62
|
+
}))))))));
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
ObjectButton.propTypes = {
|
|
66
|
+
/**
|
|
67
|
+
* The HTML id for this element
|
|
68
|
+
*/
|
|
69
|
+
id: PropTypes.string,
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The HTML class names for this element
|
|
73
|
+
*/
|
|
74
|
+
className: PropTypes.string,
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The React-written, css properties for this element.
|
|
78
|
+
*/
|
|
79
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The color of the button
|
|
83
|
+
*/
|
|
84
|
+
color: PropTypes.string,
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The node for the button
|
|
88
|
+
*/
|
|
89
|
+
node: PropTypes.objectOf(PropTypes.string).isRequired,
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The function to determine the string to display on the button
|
|
93
|
+
*/
|
|
94
|
+
nodeToString: PropTypes.func.isRequired,
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The options provided to the button on click
|
|
98
|
+
*/
|
|
99
|
+
options: PropTypes.arrayOf(PropTypes.shape({
|
|
100
|
+
name: PropTypes.string,
|
|
101
|
+
func: PropTypes.func
|
|
102
|
+
})),
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Image of the button (optional)
|
|
106
|
+
*/
|
|
107
|
+
image: PropTypes.string
|
|
108
|
+
};
|
|
109
|
+
ObjectButton.defaultProps = {// someProp:false
|
|
110
|
+
};
|
|
111
|
+
export default ObjectButton;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
@use "@pareto-engineering/bem";
|
|
3
|
+
|
|
4
|
+
$default-border-radius: 5px;
|
|
5
|
+
$default-border-radius-image: 50%;
|
|
6
|
+
$default-image-size: 1.5em;
|
|
7
|
+
$default-padding: .5em .5em .42em;
|
|
8
|
+
|
|
9
|
+
.#{bem.$base}.object-button{
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
position: relative;
|
|
12
|
+
|
|
13
|
+
> .label {
|
|
14
|
+
border-radius: 0;
|
|
15
|
+
margin-right: .5px;
|
|
16
|
+
padding: $default-padding;
|
|
17
|
+
|
|
18
|
+
p {
|
|
19
|
+
color: inherit;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
> img {
|
|
23
|
+
border-radius: $default-border-radius-image;
|
|
24
|
+
height: $default-image-size;
|
|
25
|
+
margin-right: .5em;
|
|
26
|
+
width: $default-image-size;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
> div {
|
|
31
|
+
> .button {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
height: 100%;
|
|
34
|
+
padding: $default-padding;
|
|
35
|
+
padding-top: .6em;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
> .popover {
|
|
39
|
+
&.bottom {
|
|
40
|
+
left: auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
> ul {
|
|
44
|
+
margin: 0;
|
|
45
|
+
padding: 0;
|
|
46
|
+
list-style: none;
|
|
47
|
+
max-width: 10em;
|
|
48
|
+
white-space: nowrap;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useLayoutEffect } from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import styleNames from '@pareto-engineering/bem'; // Local Definitions
|
|
6
|
+
|
|
7
|
+
const baseClassName = styleNames.base;
|
|
8
|
+
const componentClassName = 'social-media-share-button';
|
|
9
|
+
/**
|
|
10
|
+
* This is the component description.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const SocialMediaShareButton = ({
|
|
14
|
+
id,
|
|
15
|
+
className: userClassName,
|
|
16
|
+
style,
|
|
17
|
+
icon,
|
|
18
|
+
// children,
|
|
19
|
+
type,
|
|
20
|
+
color
|
|
21
|
+
}) => {
|
|
22
|
+
useLayoutEffect(() => {
|
|
23
|
+
import("./styles.scss");
|
|
24
|
+
}, []);
|
|
25
|
+
const isServer = typeof window === 'undefined';
|
|
26
|
+
const link = isServer ? '' : window.location.href; // We can pass additional text to the social media share buttons such as the title.
|
|
27
|
+
// See commented code below for an example on how to pass text.
|
|
28
|
+
// It is important we encode the text with the encodeURIComponent function to pass
|
|
29
|
+
// special characters (such as |, &, etc.) properly through the URL.
|
|
30
|
+
// const title = isServer ? '' : encodeURIComponent(document.title)
|
|
31
|
+
|
|
32
|
+
const defaultsMap = {
|
|
33
|
+
facebook: {
|
|
34
|
+
icon: 'f',
|
|
35
|
+
link: `https://www.facebook.com/sharer/sharer.php?u=${link}` // link: `https://www.facebook.com/sharer/sharer.php?u=${link}"e=${title}`,
|
|
36
|
+
|
|
37
|
+
},
|
|
38
|
+
twitter: {
|
|
39
|
+
icon: 't',
|
|
40
|
+
link: `https://twitter.com/intent/tweet?url=${link}` // link: `https://twitter.com/intent/tweet?text=${title}&url=${link}`,
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
45
|
+
href: defaultsMap[type].link,
|
|
46
|
+
target: "_blank",
|
|
47
|
+
rel: "noreferrer",
|
|
48
|
+
id: id,
|
|
49
|
+
className: [baseClassName, componentClassName, `x-${color || type}`, userClassName].filter(e => e).join(' '),
|
|
50
|
+
style: style
|
|
51
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
52
|
+
type: "button"
|
|
53
|
+
}, icon || defaultsMap[type].icon));
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
SocialMediaShareButton.propTypes = {
|
|
57
|
+
/**
|
|
58
|
+
* The HTML id for this element
|
|
59
|
+
*/
|
|
60
|
+
id: PropTypes.string,
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The HTML class names for this element
|
|
64
|
+
*/
|
|
65
|
+
className: PropTypes.string,
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The React-written, css properties for this element.
|
|
69
|
+
*/
|
|
70
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The children JSX
|
|
74
|
+
*/
|
|
75
|
+
// children:PropTypes.node,
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The Social Media to Target.
|
|
79
|
+
* If blank, you need to provide both an icon letter (from glyphter) and a link.
|
|
80
|
+
*/
|
|
81
|
+
type: PropTypes.oneOf(['twitter', 'facebook']),
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The icon of the social media
|
|
85
|
+
*/
|
|
86
|
+
icon: PropTypes.string,
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The button color
|
|
90
|
+
*/
|
|
91
|
+
color: PropTypes.string
|
|
92
|
+
};
|
|
93
|
+
SocialMediaShareButton.defaultProps = {// someProp:false
|
|
94
|
+
};
|
|
95
|
+
export default SocialMediaShareButton;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
@use "@aztlan/stylebook/src/mixins";
|
|
5
|
+
@use "@aztlan/stylebook/src/globals" as *;
|
|
6
|
+
|
|
7
|
+
$default-dimensions: 2em;
|
|
8
|
+
$mobile-dimensions: 2.75em;
|
|
9
|
+
|
|
10
|
+
.#{bem.$base}.social-media-share-button{
|
|
11
|
+
|
|
12
|
+
> button {
|
|
13
|
+
appearance: none;
|
|
14
|
+
background: transparent;
|
|
15
|
+
border: 0;
|
|
16
|
+
border-radius: 3em;
|
|
17
|
+
color: var(--x);
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
font-family: "icons", sans-serif;
|
|
20
|
+
height: $default-dimensions;
|
|
21
|
+
transition: all .3s;
|
|
22
|
+
width: $default-dimensions;
|
|
23
|
+
|
|
24
|
+
@include mixins.media($to:$sm-md) {
|
|
25
|
+
height: $mobile-dimensions;
|
|
26
|
+
width: $mobile-dimensions;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
background: var(--x);
|
|
31
|
+
color: var(--on-x);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:focus, &:active {
|
|
35
|
+
background: var(--light-x);
|
|
36
|
+
color: var(--on-x);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
package/dist/es/c/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { Hero } from "./Hero";
|
|
2
2
|
export { ContentSlides, useContentSlides } from "./ContentSlides";
|
|
3
|
-
export { Shortener } from "./Shortener";
|
|
3
|
+
export { Shortener } from "./Shortener";
|
|
4
|
+
export { SocialMediaShareButton } from "./SocialMediaShareButton";
|
|
5
|
+
export { Modal } from "./Modal";
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useLayoutEffect } from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import styleNames from '@pareto-engineering/bem';
|
|
6
|
+
import { ModalFooter, ModalHeader } from "./common"; // Local Definitions
|
|
7
|
+
|
|
8
|
+
const baseClassName = styleNames.base;
|
|
9
|
+
const componentClassName = 'modal';
|
|
10
|
+
/**
|
|
11
|
+
* This is the component description.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const Modal = ({
|
|
15
|
+
id,
|
|
16
|
+
className: userClassName,
|
|
17
|
+
style,
|
|
18
|
+
children,
|
|
19
|
+
title,
|
|
20
|
+
actions // ...otherProps
|
|
21
|
+
|
|
22
|
+
}) => {
|
|
23
|
+
useLayoutEffect(() => {
|
|
24
|
+
import("./styles.scss");
|
|
25
|
+
}, []);
|
|
26
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
id: id,
|
|
28
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
29
|
+
style: style // {...otherProps}
|
|
30
|
+
|
|
31
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
32
|
+
title: title
|
|
33
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
className: "modal-content"
|
|
35
|
+
}, children), actions && /*#__PURE__*/React.createElement(ModalFooter, {
|
|
36
|
+
actions: actions
|
|
37
|
+
}));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
Modal.propTypes = {
|
|
41
|
+
/**
|
|
42
|
+
* The HTML id for this element
|
|
43
|
+
*/
|
|
44
|
+
id: PropTypes.string,
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The HTML class names for this element
|
|
48
|
+
*/
|
|
49
|
+
className: PropTypes.string,
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The React-written, css properties for this element.
|
|
53
|
+
*/
|
|
54
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The children JSX
|
|
58
|
+
*/
|
|
59
|
+
children: PropTypes.node,
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The title to pass to the header
|
|
63
|
+
*/
|
|
64
|
+
title: PropTypes.string.isRequired,
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The button options to provide to the footer
|
|
68
|
+
*/
|
|
69
|
+
actions: PropTypes.arrayOf(PropTypes.shape({
|
|
70
|
+
color: PropTypes.string,
|
|
71
|
+
text: PropTypes.string,
|
|
72
|
+
onClick: PropTypes.func
|
|
73
|
+
}))
|
|
74
|
+
};
|
|
75
|
+
Modal.defaultProps = {//
|
|
76
|
+
};
|
|
77
|
+
export default Modal;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import styleNames from '@pareto-engineering/bem';
|
|
5
|
+
import { Button } from "../../../.."; // Local Definitions
|
|
6
|
+
|
|
7
|
+
const baseClassName = styleNames.base;
|
|
8
|
+
const componentClassName = 'modal-footer';
|
|
9
|
+
/**
|
|
10
|
+
* This is the component description.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const ModalFooter = ({
|
|
14
|
+
id,
|
|
15
|
+
className: userClassName,
|
|
16
|
+
style,
|
|
17
|
+
actions // ...otherProps
|
|
18
|
+
|
|
19
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
id: id,
|
|
21
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
22
|
+
style: style
|
|
23
|
+
}, actions.map(action => /*#__PURE__*/React.createElement(Button, {
|
|
24
|
+
color: action.color,
|
|
25
|
+
onClick: action.onClick,
|
|
26
|
+
isCompact: true
|
|
27
|
+
}, action.text)));
|
|
28
|
+
|
|
29
|
+
ModalFooter.propTypes = {
|
|
30
|
+
/**
|
|
31
|
+
* The HTML id for this element
|
|
32
|
+
*/
|
|
33
|
+
id: PropTypes.string,
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The HTML class names for this element
|
|
37
|
+
*/
|
|
38
|
+
className: PropTypes.string,
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The React-written, css properties for this element.
|
|
42
|
+
*/
|
|
43
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The button options to provide to the footer
|
|
47
|
+
*/
|
|
48
|
+
actions: PropTypes.arrayOf(PropTypes.shape({
|
|
49
|
+
color: PropTypes.string,
|
|
50
|
+
text: PropTypes.string,
|
|
51
|
+
onClick: PropTypes.func
|
|
52
|
+
}))
|
|
53
|
+
};
|
|
54
|
+
ModalFooter.defaultProps = {// someProp:false
|
|
55
|
+
};
|
|
56
|
+
export default ModalFooter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ModalFooter } from "./ModalFooter";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import styleNames from '@pareto-engineering/bem';
|
|
5
|
+
import { Button, useModal } from "../../../.."; // Local Definitions
|
|
6
|
+
|
|
7
|
+
const baseClassName = styleNames.base;
|
|
8
|
+
const componentClassName = 'modal-header';
|
|
9
|
+
/**
|
|
10
|
+
* This is the component description.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const ModalHeader = ({
|
|
14
|
+
id,
|
|
15
|
+
className: userClassName,
|
|
16
|
+
style,
|
|
17
|
+
title // ...otherProps
|
|
18
|
+
|
|
19
|
+
}) => {
|
|
20
|
+
const {
|
|
21
|
+
setClose
|
|
22
|
+
} = useModal();
|
|
23
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
id: id,
|
|
25
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
26
|
+
style: style
|
|
27
|
+
}, /*#__PURE__*/React.createElement("span", null, title), /*#__PURE__*/React.createElement(Button, {
|
|
28
|
+
color: "anchor",
|
|
29
|
+
onClick: setClose,
|
|
30
|
+
isCompact: true,
|
|
31
|
+
className: "close-button"
|
|
32
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
33
|
+
className: "f-icons"
|
|
34
|
+
}, "Y")));
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
ModalHeader.propTypes = {
|
|
38
|
+
/**
|
|
39
|
+
* The HTML id for this element
|
|
40
|
+
*/
|
|
41
|
+
id: PropTypes.string,
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The HTML class names for this element
|
|
45
|
+
*/
|
|
46
|
+
className: PropTypes.string,
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The React-written, css properties for this element.
|
|
50
|
+
*/
|
|
51
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The children JSX
|
|
55
|
+
*/
|
|
56
|
+
title: PropTypes.string
|
|
57
|
+
};
|
|
58
|
+
ModalHeader.defaultProps = {// someProp:false
|
|
59
|
+
};
|
|
60
|
+
export default ModalHeader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ModalHeader } from "./ModalHeader";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
@use "@pareto-engineering/bem";
|
|
3
|
+
|
|
4
|
+
$default-padding: 1em;
|
|
5
|
+
$default-margin: 2em;
|
|
6
|
+
|
|
7
|
+
.#{bem.$base}.modal{
|
|
8
|
+
display: flex;
|
|
9
|
+
background: #ffffff;
|
|
10
|
+
box-shadow: 0 10px 20px rgba(black, 0.2);
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
left: 50%;
|
|
13
|
+
max-height: 90vh;
|
|
14
|
+
max-width: 90%;
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: 50%;
|
|
17
|
+
transform: translate(-50%, -50%);
|
|
18
|
+
min-width: 20em;
|
|
19
|
+
|
|
20
|
+
.modal-header {
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
padding: $default-padding;
|
|
24
|
+
|
|
25
|
+
> span {
|
|
26
|
+
margin: 0 $default-margin;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
> .button {
|
|
30
|
+
align-items: center;
|
|
31
|
+
display: flex;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
position: absolute;
|
|
34
|
+
right: 0px;
|
|
35
|
+
top: 0px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.modal-content {
|
|
40
|
+
border-bottom: 1px solid #e0e0e0;
|
|
41
|
+
border-top: 1px solid #e0e0e0;
|
|
42
|
+
display: flex;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
padding: $default-padding;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.modal-footer {
|
|
48
|
+
display: flex;
|
|
49
|
+
justify-content: flex-end;
|
|
50
|
+
padding-top: $default-padding;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -2,9 +2,9 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { memo } from 'react';
|
|
5
|
+
import { memo, useLayoutEffect } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import { TextInput, TextareaInput, ChoicesInput, SelectInput } from "../fields"; // Local Definitions
|
|
7
|
+
import { TextInput, TextareaInput, ChoicesInput, SelectInput, QueryCombobox, QuerySelect, RatingsInput, Checkbox, QueryChoices } from "../fields"; // Local Definitions
|
|
8
8
|
// const baseClassName = styleNames.base
|
|
9
9
|
|
|
10
10
|
const componentClassName = 'form-input';
|
|
@@ -19,6 +19,9 @@ const FormInput = ({
|
|
|
19
19
|
disabled,
|
|
20
20
|
...otherProps
|
|
21
21
|
}) => {
|
|
22
|
+
useLayoutEffect(() => {
|
|
23
|
+
import("./styles.scss");
|
|
24
|
+
}, []);
|
|
22
25
|
const newClassName = [className, componentClassName].filter(Boolean).join(' ');
|
|
23
26
|
|
|
24
27
|
if (type === 'textarea') {
|
|
@@ -42,6 +45,40 @@ const FormInput = ({
|
|
|
42
45
|
}, otherProps));
|
|
43
46
|
}
|
|
44
47
|
|
|
48
|
+
if (type === 'query-combobox') {
|
|
49
|
+
return /*#__PURE__*/React.createElement(QueryCombobox, _extends({
|
|
50
|
+
className: newClassName,
|
|
51
|
+
disabled: disabled
|
|
52
|
+
}, otherProps));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (type === 'query-select') {
|
|
56
|
+
return /*#__PURE__*/React.createElement(QuerySelect, _extends({
|
|
57
|
+
className: newClassName,
|
|
58
|
+
disabled: disabled
|
|
59
|
+
}, otherProps));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (type === 'query-choices') {
|
|
63
|
+
return /*#__PURE__*/React.createElement(QueryChoices, _extends({
|
|
64
|
+
className: newClassName,
|
|
65
|
+
disabled: disabled
|
|
66
|
+
}, otherProps));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (type === 'rating') {
|
|
70
|
+
return /*#__PURE__*/React.createElement(RatingsInput, _extends({
|
|
71
|
+
className: newClassName
|
|
72
|
+
}, otherProps));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (type === 'checkbox') {
|
|
76
|
+
return /*#__PURE__*/React.createElement(Checkbox, _extends({
|
|
77
|
+
className: newClassName,
|
|
78
|
+
disabled: disabled
|
|
79
|
+
}, otherProps));
|
|
80
|
+
}
|
|
81
|
+
|
|
45
82
|
if (extraTypes !== null && extraTypes !== void 0 && extraTypes[type]) {
|
|
46
83
|
const Component = extraTypes[type];
|
|
47
84
|
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
@@ -66,7 +103,7 @@ FormInput.propTypes = {
|
|
|
66
103
|
/**
|
|
67
104
|
* The HTML class names for this element
|
|
68
105
|
*/
|
|
69
|
-
type: PropTypes.oneOf(['text', 'email', 'password', 'number', 'date', 'datetime', 'month', 'tel', 'hidden', 'select', 'choices', 'textarea', // to be removed
|
|
106
|
+
type: PropTypes.oneOf(['text', 'email', 'password', 'number', 'date', 'datetime', 'month', 'tel', 'hidden', 'select', 'choices', 'textarea', 'query-combobox', 'url', 'rating', // to be removed
|
|
70
107
|
'extendedTypeInput']),
|
|
71
108
|
|
|
72
109
|
/**
|
|
@@ -31,7 +31,7 @@ const Debugger = ({
|
|
|
31
31
|
style: style
|
|
32
32
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
33
33
|
onClick: toggleDebugger,
|
|
34
|
-
color: "
|
|
34
|
+
color: "main2"
|
|
35
35
|
}, isOpen ? 'Close FormDebugger' : 'Open FormDebugger'), isOpen && /*#__PURE__*/React.createElement("pre", {
|
|
36
36
|
className: "debuger-content"
|
|
37
37
|
}, JSON.stringify(formikContext, null, 2)));
|