@pareto-engineering/design-system 2.0.0-alpha.9 → 3.0.0-alpha.22
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/.eslintrc.js +1 -39
- package/.storybook/main.js +12 -1
- package/babel.config.js +2 -0
- package/dist/cjs/a/AnimatedCounter/AnimatedCounter.js +8 -24
- package/dist/cjs/a/AnimatedCounter/index.js +0 -2
- package/dist/cjs/a/AnimatedCounter/styles.scss +2 -2
- package/dist/cjs/{c/BlogContext → a/AppContext}/Context.js +0 -5
- package/dist/cjs/a/{SiteContext → AppContext}/ContextProvider.js +18 -30
- package/dist/cjs/a/{SiteContext → AppContext}/index.js +5 -10
- package/dist/cjs/a/{SiteContext/useSite.js → AppContext/useApp.js} +0 -5
- package/dist/cjs/a/{SiteContext → AppContext}/useTheme.js +6 -8
- package/dist/cjs/{c/Hero/Hero.js → a/ContentTree/ContentTree.js} +24 -42
- package/dist/cjs/a/ContentTree/common/Tree/Tree.js +104 -0
- package/dist/cjs/{b/Card → a/ContentTree/common/Tree}/index.js +3 -5
- package/dist/cjs/a/ContentTree/common/index.js +27 -0
- package/dist/cjs/a/ContentTree/common/useContentTree.js +80 -0
- package/dist/cjs/a/ContentTree/common/useFirstVisibleNode.js +63 -0
- package/dist/cjs/{c/SiteMission → a/ContentTree}/index.js +3 -5
- package/dist/cjs/a/ContentTree/styles.scss +33 -0
- package/dist/cjs/a/Conversation/Context.js +0 -5
- package/dist/cjs/a/Conversation/Conversation.js +17 -28
- package/dist/cjs/a/Conversation/common/Message/Message.js +36 -25
- package/dist/cjs/a/Conversation/common/Message/index.js +0 -2
- package/dist/cjs/a/Conversation/common/index.js +0 -1
- package/dist/cjs/a/Conversation/index.js +0 -4
- package/dist/cjs/a/Conversation/styles.scss +134 -35
- package/dist/cjs/a/Conversation/useConversation.js +0 -5
- package/dist/cjs/a/DotInfo/DotInfo.js +13 -28
- package/dist/cjs/a/DotInfo/index.js +0 -2
- package/dist/cjs/a/Figure/Figure.js +8 -19
- package/dist/cjs/a/Figure/index.js +0 -2
- package/dist/cjs/a/HamburgerButton/HamburgerButton.js +13 -32
- package/dist/cjs/a/HamburgerButton/index.js +0 -2
- package/dist/cjs/a/IconList/IconList.js +20 -38
- package/dist/cjs/a/IconList/common/Item/Item.js +19 -37
- package/dist/cjs/a/IconList/common/Item/index.js +0 -2
- package/dist/cjs/a/IconList/common/index.js +0 -1
- package/dist/cjs/a/IconList/index.js +0 -2
- package/dist/cjs/a/IconList/styles.scss +1 -1
- package/dist/cjs/{c/BlogPostsList/BlogPostsList.js → a/Label/Label.js} +28 -27
- package/dist/cjs/{c/Hero → a/Label}/index.js +3 -5
- package/dist/cjs/a/Label/styles.scss +34 -0
- package/dist/cjs/a/LoadingCircle/LoadingCircle.js +13 -27
- package/dist/cjs/a/LoadingCircle/index.js +0 -2
- package/dist/cjs/a/People/People.js +12 -27
- package/dist/cjs/a/People/common/Person/Person.js +9 -21
- package/dist/cjs/a/People/common/Person/index.js +0 -2
- package/dist/cjs/a/People/common/index.js +0 -1
- package/dist/cjs/a/People/index.js +0 -2
- package/dist/cjs/a/People/styles.scss +8 -6
- package/dist/cjs/{c/AcceptCookies/AcceptCookies.js → a/Popover/Popover.js} +58 -77
- package/dist/cjs/a/{Shapes → Popover}/index.js +3 -5
- package/dist/cjs/a/Popover/styles.scss +33 -0
- package/dist/cjs/a/ProgressBar/ProgressBar.js +14 -27
- package/dist/cjs/a/ProgressBar/index.js +0 -2
- package/dist/cjs/a/Quote/Quote.js +8 -21
- package/dist/cjs/a/Quote/index.js +0 -2
- package/dist/cjs/a/Quote/styles.scss +2 -2
- package/dist/cjs/a/SVG/SVG.js +21 -48
- package/dist/cjs/a/SVG/common/UseSVG/UseSVG.js +5 -19
- package/dist/cjs/a/SVG/common/UseSVG/index.js +0 -2
- package/dist/cjs/a/SVG/common/index.js +0 -1
- package/dist/cjs/a/SVG/index.js +0 -2
- package/dist/cjs/a/{ContentCard/ContentCard.js → SnapScroller/SnapScroller.js} +19 -32
- package/dist/cjs/a/{DashboardNavbar/common/NavProfile → SnapScroller}/index.js +3 -5
- package/dist/cjs/a/SnapScroller/styles.scss +38 -0
- package/dist/cjs/a/Spinner/Spinner.js +8 -18
- package/dist/cjs/a/Spinner/index.js +0 -2
- package/dist/cjs/a/Timestamp/Timestamp.js +8 -25
- package/dist/cjs/a/Timestamp/index.js +0 -2
- package/dist/cjs/a/index.js +49 -99
- package/dist/cjs/b/Button/Button.js +24 -41
- package/dist/cjs/b/Button/index.js +0 -2
- package/dist/cjs/b/Button/styles.scss +65 -19
- package/dist/cjs/b/Logo/Logo.js +46 -61
- package/dist/cjs/b/Logo/index.js +0 -2
- package/dist/cjs/b/Logo/styles.scss +0 -138
- package/dist/cjs/b/Page/Context.js +0 -5
- package/dist/cjs/b/Page/Page.js +14 -34
- package/dist/cjs/b/Page/common/PageHelmet/PageHelmet.js +9 -28
- package/dist/cjs/b/Page/common/PageHelmet/index.js +0 -2
- package/dist/cjs/b/Page/common/Section/Section.js +14 -69
- package/dist/cjs/b/Page/common/Section/index.js +0 -2
- package/dist/cjs/b/Page/common/index.js +0 -2
- package/dist/cjs/b/Page/index.js +4 -8
- package/dist/cjs/b/Page/usePage.js +0 -5
- package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +22 -43
- package/dist/cjs/b/SocialMediaButton/index.js +0 -2
- package/dist/cjs/b/SocialMediaButton/styles.scss +4 -4
- package/dist/cjs/b/ThemeSelector/ThemeSelector.js +6 -18
- package/dist/cjs/b/ThemeSelector/index.js +0 -2
- package/dist/cjs/b/Title/Title.js +10 -33
- package/dist/cjs/b/Title/index.js +0 -2
- package/dist/cjs/b/index.js +9 -47
- package/dist/cjs/c/ContentSlides/ContentSlides.js +11 -42
- package/dist/cjs/c/ContentSlides/Context.js +0 -5
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +28 -36
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/index.js +0 -2
- package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +11 -27
- package/dist/cjs/c/ContentSlides/common/Navigator/index.js +0 -2
- package/dist/cjs/c/ContentSlides/common/Sidebar/Sidebar.js +14 -25
- package/dist/cjs/c/ContentSlides/common/Sidebar/index.js +0 -2
- package/dist/cjs/c/ContentSlides/common/Slide/Slide.js +12 -20
- package/dist/cjs/c/ContentSlides/common/Slide/index.js +0 -2
- package/dist/cjs/c/ContentSlides/common/index.js +8 -12
- package/dist/cjs/c/ContentSlides/index.js +4 -8
- package/dist/cjs/c/ContentSlides/styles.scss +12 -6
- package/dist/cjs/c/ContentSlides/useContentSlides.js +0 -5
- package/dist/cjs/c/{TeamGallery/TeamGallery.js → Modal/Modal.js} +34 -31
- package/dist/cjs/{a/ContentCard/common/Section/Section.js → c/Modal/common/ModalHeader/ModalHeader.js} +38 -41
- package/dist/cjs/c/{SitePricing → Modal/common/ModalHeader}/index.js +3 -5
- package/dist/cjs/c/{BlogPostsList → Modal}/common/index.js +3 -4
- package/dist/cjs/{b/Card/common/Group → c/Modal}/index.js +3 -5
- package/dist/cjs/c/Modal/styles.scss +46 -0
- package/dist/cjs/c/Shortener/Shortener.js +6 -20
- package/dist/cjs/c/Shortener/index.js +0 -2
- package/dist/cjs/c/{SiteHeaderCTA/SiteHeaderCTA.js → SocialMediaShareButton/SocialMediaShareButton.js} +56 -59
- package/dist/cjs/c/SocialMediaShareButton/index.js +13 -0
- package/dist/cjs/c/SocialMediaShareButton/styles.scss +39 -0
- package/dist/cjs/c/index.js +17 -13
- package/dist/cjs/f/FormInput/FormInput.js +44 -32
- package/dist/cjs/f/FormInput/index.js +0 -2
- package/dist/cjs/f/FormInput/styles.scss +11 -0
- package/dist/cjs/f/common/Debugger/Debugger.js +5 -18
- package/dist/cjs/f/common/Debugger/index.js +0 -2
- package/dist/cjs/f/common/Description/Description.js +24 -33
- package/dist/cjs/f/common/Description/index.js +0 -2
- package/dist/cjs/f/common/Label/Label.js +18 -26
- package/dist/cjs/f/common/Label/index.js +0 -2
- package/dist/cjs/f/common/Label/styles.scss +2 -5
- package/dist/cjs/f/common/index.js +4 -7
- package/dist/cjs/f/fields/{CheckboxInput/CheckboxInput.js → Checkbox/Checkbox.js} +49 -54
- package/dist/cjs/{a/ContentCard/common/Section → f/fields/Checkbox}/index.js +3 -5
- package/dist/cjs/f/fields/Checkbox/styles.scss +14 -0
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +23 -43
- package/dist/cjs/f/fields/ChoicesInput/common/Choice/Choice.js +9 -26
- package/dist/cjs/f/fields/ChoicesInput/common/Choice/index.js +0 -2
- package/dist/cjs/f/fields/ChoicesInput/common/index.js +0 -1
- package/dist/cjs/f/fields/ChoicesInput/index.js +0 -2
- package/dist/cjs/f/fields/ChoicesInput/styles.scss +19 -4
- package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +142 -0
- package/dist/cjs/{c/SiteServices → f/fields/QueryChoices}/index.js +3 -5
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +214 -0
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +200 -0
- package/dist/cjs/{a/DashboardNavbar/common/NavItem → f/fields/QueryCombobox/common/Combobox}/index.js +3 -5
- package/dist/cjs/{c/BlogCategoryButton/BlogCategoryButton.js → f/fields/QueryCombobox/common/Menu/Menu.js} +48 -56
- package/dist/cjs/{c/BlogPostsList/common/Card → f/fields/QueryCombobox/common/Menu}/index.js +3 -5
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +284 -0
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/index.js +13 -0
- package/dist/cjs/f/fields/QueryCombobox/common/index.js +26 -0
- package/dist/cjs/{a/CustomerStat → f/fields/QueryCombobox}/index.js +3 -5
- package/dist/cjs/f/fields/QueryCombobox/styles.scss +91 -0
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +192 -0
- package/dist/cjs/{a/ContentCard → f/fields/QuerySelect}/index.js +3 -5
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +38 -29
- package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +18 -29
- package/dist/cjs/f/fields/RatingsInput/common/Rating/index.js +0 -2
- package/dist/cjs/f/fields/RatingsInput/common/index.js +0 -1
- package/dist/cjs/f/fields/RatingsInput/index.js +0 -2
- package/dist/cjs/f/fields/RatingsInput/styles.scss +29 -20
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +68 -41
- package/dist/cjs/f/fields/SelectInput/index.js +0 -2
- package/dist/cjs/f/fields/SelectInput/styles.scss +33 -13
- package/dist/cjs/f/fields/TextInput/TextInput.js +53 -42
- package/dist/cjs/f/fields/TextInput/index.js +0 -2
- package/dist/cjs/f/fields/TextInput/styles.scss +16 -7
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +51 -47
- package/dist/cjs/f/fields/TextareaInput/index.js +0 -2
- package/dist/cjs/f/fields/TextareaInput/styles.scss +19 -6
- package/dist/cjs/f/fields/index.js +27 -28
- package/dist/cjs/f/index.js +0 -5
- package/dist/cjs/form-reset.scss +1 -1
- package/dist/cjs/form.scss +2 -2
- package/dist/cjs/index.js +22 -12
- package/dist/cjs/r/SwitchRouteMap/SwitchRouteMap.js +6 -22
- package/dist/cjs/r/SwitchRouteMap/index.js +0 -2
- package/dist/cjs/r/common/PrivateRoute/PrivateRoute.js +12 -24
- package/dist/cjs/r/common/PrivateRoute/index.js +0 -2
- package/dist/cjs/r/common/index.js +0 -1
- package/dist/cjs/r/index.js +0 -3
- package/dist/cjs/{a/SiteContext/Context.js → test/QueryLoader/QueryLoader.js} +23 -5
- package/dist/cjs/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +64 -0
- package/dist/cjs/{c/BlogContext/BlogContextProvider.js → test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js} +15 -37
- package/dist/cjs/test/QueryLoader/common/PreloadedTestData/index.js +13 -0
- package/dist/cjs/test/QueryLoader/common/index.js +12 -0
- package/dist/cjs/{c/TeamGallery → test/QueryLoader}/index.js +3 -5
- package/dist/cjs/{a/ContentCard/common → test}/index.js +3 -4
- package/dist/cjs/utils/hooks/index.js +20 -0
- package/dist/cjs/utils/hooks/useDynamicPosition.js +92 -0
- package/dist/cjs/utils/hooks/useWindowSize.js +31 -0
- package/dist/cjs/utils/index.js +18 -0
- package/dist/es/a/AnimatedCounter/AnimatedCounter.js +30 -32
- package/dist/es/a/AnimatedCounter/styles.scss +2 -2
- package/dist/es/a/{SiteContext → AppContext}/ContextProvider.js +24 -23
- package/dist/es/a/AppContext/index.js +5 -0
- package/dist/es/a/{SiteContext → AppContext}/useTheme.js +8 -6
- package/dist/es/a/ContentTree/ContentTree.js +64 -0
- package/dist/es/a/ContentTree/common/Tree/Tree.js +95 -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 +73 -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 +27 -26
- package/dist/es/a/Conversation/common/Message/Message.js +42 -22
- package/dist/es/a/Conversation/styles.scss +134 -35
- package/dist/es/a/DotInfo/DotInfo.js +19 -23
- package/dist/es/a/Figure/Figure.js +17 -19
- package/dist/es/a/HamburgerButton/HamburgerButton.js +15 -21
- package/dist/es/a/IconList/IconList.js +20 -22
- package/dist/es/a/IconList/common/Item/Item.js +26 -26
- package/dist/es/a/IconList/styles.scss +1 -1
- package/dist/es/{c/BlogPostsList/BlogPostsList.js → a/Label/Label.js} +33 -22
- package/{src/ui/a/Shapes → dist/es/a/Label}/index.js +1 -1
- package/dist/es/a/Label/styles.scss +34 -0
- package/dist/es/a/LoadingCircle/LoadingCircle.js +17 -21
- package/dist/es/a/People/People.js +18 -20
- package/dist/es/a/People/common/Person/Person.js +31 -33
- package/dist/es/a/People/styles.scss +8 -6
- package/dist/es/a/Popover/Popover.js +109 -0
- package/dist/es/a/{ContentCard/common/Section → Popover}/index.js +1 -1
- package/dist/es/a/Popover/styles.scss +33 -0
- package/dist/es/a/ProgressBar/ProgressBar.js +17 -20
- package/dist/es/a/Quote/Quote.js +17 -21
- package/dist/es/a/Quote/styles.scss +2 -2
- package/dist/es/a/SVG/SVG.js +23 -36
- package/dist/es/a/SVG/common/UseSVG/UseSVG.js +23 -26
- package/dist/es/a/{ContentCard/ContentCard.js → SnapScroller/SnapScroller.js} +25 -29
- package/dist/es/a/SnapScroller/index.js +2 -0
- package/dist/es/a/SnapScroller/styles.scss +38 -0
- package/dist/es/a/Spinner/Spinner.js +14 -15
- package/dist/es/a/Timestamp/Timestamp.js +24 -31
- package/dist/es/a/index.js +13 -17
- package/dist/es/b/Button/Button.js +28 -31
- package/dist/es/b/Button/styles.scss +65 -19
- package/dist/es/b/Logo/Logo.js +56 -61
- package/dist/es/b/Logo/styles.scss +0 -138
- package/dist/es/b/Page/Page.js +20 -24
- package/dist/es/b/Page/common/PageHelmet/PageHelmet.js +40 -55
- package/dist/es/b/Page/common/Section/Section.js +15 -55
- package/dist/es/b/SocialMediaButton/SocialMediaButton.js +23 -31
- package/dist/es/b/SocialMediaButton/styles.scss +4 -4
- package/dist/es/b/ThemeSelector/ThemeSelector.js +16 -17
- package/dist/es/b/Title/Title.js +38 -49
- package/dist/es/b/index.js +3 -7
- package/dist/es/c/ContentSlides/ContentSlides.js +26 -37
- package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +39 -36
- package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +25 -32
- package/dist/es/c/ContentSlides/common/Sidebar/Sidebar.js +21 -21
- package/dist/es/c/ContentSlides/common/Slide/Slide.js +19 -18
- package/dist/es/c/ContentSlides/styles.scss +12 -6
- package/dist/es/c/Modal/Modal.js +76 -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/{a/Shapes → c/Modal}/index.js +1 -1
- package/dist/es/c/Modal/styles.scss +46 -0
- package/dist/es/c/Shortener/Shortener.js +17 -21
- package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +98 -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 -2
- package/dist/es/f/FormInput/FormInput.js +50 -23
- package/dist/es/f/FormInput/styles.scss +11 -0
- package/dist/es/f/common/Debugger/Debugger.js +13 -16
- package/dist/es/f/common/Description/Description.js +30 -30
- package/dist/es/f/common/Label/Label.js +27 -26
- package/dist/es/f/common/Label/styles.scss +2 -5
- package/dist/es/f/fields/Checkbox/Checkbox.js +93 -0
- package/dist/es/{a/TeamInfo → f/fields/Checkbox}/index.js +1 -1
- package/dist/es/f/fields/Checkbox/styles.scss +14 -0
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +34 -39
- package/dist/es/f/fields/ChoicesInput/common/Choice/Choice.js +24 -31
- package/dist/es/f/fields/ChoicesInput/styles.scss +19 -4
- package/dist/es/f/fields/QueryChoices/QueryChoices.js +130 -0
- package/dist/es/f/fields/QueryChoices/index.js +2 -0
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +208 -0
- package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +195 -0
- package/dist/es/f/fields/QueryCombobox/common/Combobox/index.js +2 -0
- package/dist/es/f/fields/QueryCombobox/common/Menu/Menu.js +76 -0
- package/dist/es/{b/Metrics → f/fields/QueryCombobox/common/Menu}/index.js +1 -1
- package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +275 -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 +184 -0
- package/dist/es/f/fields/QuerySelect/index.js +2 -0
- package/dist/es/f/fields/RatingsInput/RatingsInput.js +50 -28
- package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +31 -32
- package/dist/es/f/fields/RatingsInput/styles.scss +29 -20
- package/dist/es/f/fields/SelectInput/SelectInput.js +78 -38
- package/dist/es/f/fields/SelectInput/styles.scss +33 -13
- package/dist/es/f/fields/TextInput/TextInput.js +66 -42
- package/dist/es/f/fields/TextInput/styles.scss +16 -7
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +68 -50
- 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/form.scss +2 -2
- package/dist/es/index.js +3 -2
- package/dist/es/r/SwitchRouteMap/SwitchRouteMap.js +25 -23
- package/dist/es/r/common/PrivateRoute/PrivateRoute.js +17 -16
- package/dist/es/test/QueryLoader/QueryLoader.js +30 -0
- package/dist/es/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +64 -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 +84 -0
- package/dist/es/utils/hooks/useWindowSize.js +23 -0
- package/dist/es/utils/index.js +1 -0
- package/jest.config.js +1 -0
- package/package.json +31 -21
- package/relay.config.js +12 -0
- package/src/__snapshots__/Storyshots.test.js.snap +11558 -7291
- package/src/local.scss +4 -2
- package/src/stories/Introduction.stories.mdx +0 -14
- package/src/stories/StyleGuide/Sprites.stories.mdx +25 -0
- package/src/stories/StyleGuide/helpers.js +18 -2
- package/src/stories/StyleGuide/typography.stories.mdx +0 -1
- package/src/stories/a/{SiteContext.stories.jsx → AppContext.stories.jsx} +8 -8
- 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/Popover.stories.jsx +106 -0
- package/src/stories/a/ProgressBar.stories.jsx +16 -7
- 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 +1 -27
- 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 +14 -16
- package/src/stories/c/ContentSlides.stories.jsx +18 -152
- package/src/stories/c/Modal.stories.jsx +49 -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__/QueryComboboxAllTeamsQuery.graphql.js +139 -0
- package/src/stories/f/__generated__/QuerySelectAllTaskStatusesQuery.graphql.js +122 -0
- package/src/stories/r/PrivateRoute.stories.jsx +1 -1
- 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/AnimatedCounter/AnimatedCounter.jsx +1 -1
- package/src/ui/a/AnimatedCounter/styles.scss +2 -2
- package/src/ui/a/{SiteContext → AppContext}/ContextProvider.jsx +8 -7
- package/src/ui/a/AppContext/index.js +5 -0
- package/src/ui/{b/Metrics/Metrics.jsx → a/ContentTree/ContentTree.jsx} +23 -28
- 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 +16 -8
- package/src/ui/a/Conversation/common/Message/Message.jsx +39 -7
- package/src/ui/a/Conversation/styles.scss +134 -35
- package/src/ui/a/DotInfo/DotInfo.jsx +1 -1
- package/src/ui/a/Figure/Figure.jsx +1 -1
- package/src/ui/a/HamburgerButton/HamburgerButton.jsx +1 -1
- package/src/ui/a/IconList/IconList.jsx +1 -1
- package/src/ui/a/IconList/common/Item/Item.jsx +1 -1
- package/src/ui/a/IconList/styles.scss +1 -1
- package/src/ui/a/{CustomerStat/CustomerStat.jsx → Label/Label.jsx} +25 -20
- package/src/ui/a/Label/index.js +2 -0
- package/src/ui/a/Label/styles.scss +34 -0
- package/src/ui/a/LoadingCircle/LoadingCircle.jsx +1 -1
- package/src/ui/a/People/People.jsx +1 -1
- package/src/ui/a/People/common/Person/Person.jsx +3 -3
- package/src/ui/a/People/styles.scss +8 -6
- 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/ProgressBar/ProgressBar.jsx +1 -1
- package/src/ui/a/Quote/Quote.jsx +1 -1
- package/src/ui/a/Quote/styles.scss +2 -2
- package/src/ui/a/SVG/SVG.jsx +1 -1
- package/src/ui/a/{ContentCard/ContentCard.jsx → SnapScroller/SnapScroller.jsx} +20 -21
- package/src/ui/a/SnapScroller/index.js +2 -0
- package/src/ui/a/SnapScroller/styles.scss +38 -0
- package/src/ui/a/Spinner/Spinner.jsx +1 -1
- package/src/ui/a/Timestamp/Timestamp.jsx +1 -1
- package/src/ui/a/index.js +14 -21
- package/src/ui/b/Button/Button.jsx +10 -2
- package/src/ui/b/Button/styles.scss +65 -19
- package/src/ui/b/Logo/Logo.jsx +42 -42
- package/src/ui/b/Logo/styles.scss +0 -138
- package/src/ui/b/Page/Page.jsx +1 -1
- package/src/ui/b/Page/common/PageHelmet/PageHelmet.jsx +2 -2
- package/src/ui/b/Page/common/Section/Section.jsx +1 -51
- package/src/ui/b/SocialMediaButton/SocialMediaButton.jsx +5 -5
- package/src/ui/b/SocialMediaButton/styles.scss +4 -4
- package/src/ui/b/ThemeSelector/ThemeSelector.jsx +3 -3
- package/src/ui/b/Title/Title.jsx +1 -1
- package/src/ui/b/index.js +3 -7
- package/src/ui/c/ContentSlides/ContentSlides.jsx +1 -1
- package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +13 -6
- package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +3 -2
- package/src/ui/c/ContentSlides/common/Sidebar/Sidebar.jsx +2 -2
- package/src/ui/c/ContentSlides/common/Slide/Slide.jsx +1 -1
- package/src/ui/c/ContentSlides/styles.scss +12 -6
- package/src/ui/c/{Hero/Hero.jsx → Modal/Modal.jsx} +31 -26
- 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/Shortener/Shortener.jsx +1 -1
- 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 -1
- package/src/ui/f/FormInput/FormInput.jsx +63 -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 +35 -30
- package/src/ui/f/common/Label/Label.jsx +11 -5
- package/src/ui/f/common/Label/styles.scss +2 -5
- package/src/ui/f/fields/{CheckboxInput/CheckboxInput.jsx → Checkbox/Checkbox.jsx} +44 -33
- 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 +10 -4
- package/src/ui/f/fields/ChoicesInput/common/Choice/Choice.jsx +11 -3
- package/src/ui/f/fields/ChoicesInput/styles.scss +19 -4
- 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 +235 -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 +55 -20
- package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +9 -3
- package/src/ui/f/fields/RatingsInput/styles.scss +29 -20
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +73 -9
- package/src/ui/f/fields/SelectInput/styles.scss +33 -13
- package/src/ui/f/fields/TextInput/TextInput.jsx +45 -11
- package/src/ui/f/fields/TextInput/styles.scss +16 -7
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +50 -22
- 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/form.scss +2 -2
- 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 +1 -43
- package/.githooks/pre-commit +0 -5
- package/.github/workflows/push-main-branches.yaml +0 -89
- package/.github/workflows/push-pr.yaml +0 -83
- package/.github/workflows.old/push-production.yaml +0 -34
- package/.github/workflows.old/push-staging.yaml +0 -34
- package/.github/workflows.old/test-publish.no +0 -63
- package/.github/workflows.old/test-publish.yaml +0 -68
- package/dist/cjs/a/ContentCard/styles.scss +0 -78
- package/dist/cjs/a/CustomerLogos/CustomerLogos.js +0 -86
- package/dist/cjs/a/CustomerLogos/index.js +0 -15
- package/dist/cjs/a/CustomerLogos/styles.scss +0 -41
- package/dist/cjs/a/CustomerStat/CustomerStat.js +0 -87
- package/dist/cjs/a/CustomerStat/styles.scss +0 -16
- package/dist/cjs/a/DashboardNavbar/DashboardNavbar.js +0 -70
- package/dist/cjs/a/DashboardNavbar/common/NavItem/NavItem.js +0 -66
- package/dist/cjs/a/DashboardNavbar/common/NavItem/styles.scss +0 -9
- package/dist/cjs/a/DashboardNavbar/common/NavProfile/NavProfile.js +0 -66
- package/dist/cjs/a/DashboardNavbar/common/NavProfile/styles.scss +0 -9
- package/dist/cjs/a/DashboardNavbar/common/index.js +0 -21
- package/dist/cjs/a/DashboardNavbar/index.js +0 -15
- package/dist/cjs/a/DashboardNavbar/styles.scss +0 -14
- package/dist/cjs/a/FeaturedOn/FeaturedOn.js +0 -88
- package/dist/cjs/a/FeaturedOn/index.js +0 -15
- package/dist/cjs/a/FeaturedOn/styles.scss +0 -41
- package/dist/cjs/a/GradientBackground/GradientBackground.js +0 -140
- package/dist/cjs/a/GradientBackground/index.js +0 -15
- package/dist/cjs/a/GradientBackground/styles.scss +0 -191
- package/dist/cjs/a/OvalIllustration/OvalIllustration.js +0 -102
- package/dist/cjs/a/OvalIllustration/index.js +0 -15
- package/dist/cjs/a/OvalIllustration/styles.scss +0 -105
- package/dist/cjs/a/Shapes/Shapes.js +0 -163
- package/dist/cjs/a/Shapes/styles.scss +0 -221
- package/dist/cjs/a/TeamInfo/TeamInfo.js +0 -102
- package/dist/cjs/a/TeamInfo/index.js +0 -15
- package/dist/cjs/a/TeamInfo/styles.scss +0 -58
- package/dist/cjs/b/Card/Card.js +0 -67
- package/dist/cjs/b/Card/common/Group/Group.js +0 -71
- package/dist/cjs/b/Card/common/Group/styles.scss +0 -61
- package/dist/cjs/b/Card/common/index.js +0 -13
- package/dist/cjs/b/Card/styles.scss +0 -12
- package/dist/cjs/b/Metrics/Metrics.js +0 -89
- package/dist/cjs/b/Metrics/index.js +0 -15
- package/dist/cjs/b/Metrics/styles.scss +0 -91
- package/dist/cjs/b/QuestionDropdown/QuestionDropdown.js +0 -119
- package/dist/cjs/b/QuestionDropdown/index.js +0 -15
- package/dist/cjs/b/QuestionDropdown/styles.scss +0 -95
- package/dist/cjs/b/Segment/Segment.js +0 -79
- package/dist/cjs/b/Segment/index.js +0 -15
- package/dist/cjs/b/Segment/styles.scss +0 -26
- package/dist/cjs/c/AcceptCookies/index.js +0 -15
- package/dist/cjs/c/AcceptCookies/styles.scss +0 -49
- package/dist/cjs/c/BlogCategoryButton/index.js +0 -15
- package/dist/cjs/c/BlogContext/ContextProvider.js +0 -63
- package/dist/cjs/c/BlogContext/index.js +0 -31
- package/dist/cjs/c/BlogContext/useBlog.js +0 -16
- package/dist/cjs/c/BlogPost/BlogPost.js +0 -147
- package/dist/cjs/c/BlogPost/index.js +0 -15
- 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/Hero/styles.scss +0 -41
- package/dist/cjs/c/SiteFooter/SiteFooter.js +0 -73
- package/dist/cjs/c/SiteFooter/common/Section/Section.js +0 -95
- package/dist/cjs/c/SiteFooter/common/Section/index.js +0 -15
- package/dist/cjs/c/SiteFooter/common/index.js +0 -13
- package/dist/cjs/c/SiteFooter/index.js +0 -15
- 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/SiteMission.js +0 -113
- 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/PersonCard.js +0 -84
- package/dist/cjs/c/TeamGallery/common/PersonCard/index.js +0 -15
- package/dist/cjs/c/TeamGallery/common/index.js +0 -13
- 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/GradientBackground.js +0 -98
- 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/CheckboxInput/index.js +0 -15
- package/dist/cjs/f/fields/CheckboxInput/styles.scss +0 -28
- package/dist/cjs/f/fields/RadioInput/RadioInput.js +0 -110
- package/dist/cjs/f/fields/RadioInput/index.js +0 -15
- package/dist/cjs/f/fields/RadioInput/styles.scss +0 -26
- package/dist/cjs/f/fields/TaskRecommendation/TaskRecommendation.js +0 -129
- 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/TaskRecommendationInput/TaskRecommendationInput.js +0 -131
- package/dist/cjs/f/fields/TaskRecommendationInput/index.js +0 -15
- package/dist/cjs/f/fields/TaskRecommendationInput/styles.scss +0 -41
- package/dist/cjs/f/fields/TextArea/TextArea.js +0 -141
- package/dist/cjs/f/fields/TextArea/index.js +0 -15
- package/dist/cjs/f/fields/TextArea/styles.scss +0 -19
- package/dist/es/a/ContentCard/common/Section/Section.js +0 -60
- package/dist/es/a/ContentCard/common/index.js +0 -1
- package/dist/es/a/ContentCard/index.js +0 -2
- package/dist/es/a/ContentCard/styles.scss +0 -78
- package/dist/es/a/CustomerLogos/CustomerLogos.js +0 -70
- package/dist/es/a/CustomerLogos/index.js +0 -2
- package/dist/es/a/CustomerLogos/styles.scss +0 -41
- package/dist/es/a/CustomerStat/CustomerStat.js +0 -71
- package/dist/es/a/CustomerStat/index.js +0 -2
- package/dist/es/a/CustomerStat/styles.scss +0 -16
- package/dist/es/a/DashboardNavbar/DashboardNavbar.js +0 -53
- package/dist/es/a/DashboardNavbar/common/NavItem/NavItem.js +0 -48
- package/dist/es/a/DashboardNavbar/common/NavItem/index.js +0 -2
- package/dist/es/a/DashboardNavbar/common/NavItem/styles.scss +0 -9
- package/dist/es/a/DashboardNavbar/common/NavProfile/NavProfile.js +0 -48
- package/dist/es/a/DashboardNavbar/common/NavProfile/index.js +0 -2
- package/dist/es/a/DashboardNavbar/common/NavProfile/styles.scss +0 -9
- package/dist/es/a/DashboardNavbar/common/index.js +0 -2
- package/dist/es/a/DashboardNavbar/index.js +0 -2
- package/dist/es/a/DashboardNavbar/styles.scss +0 -14
- package/dist/es/a/FeaturedOn/FeaturedOn.js +0 -72
- package/dist/es/a/FeaturedOn/index.js +0 -2
- package/dist/es/a/FeaturedOn/styles.scss +0 -41
- 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/a/OvalIllustration/OvalIllustration.js +0 -86
- package/dist/es/a/OvalIllustration/index.js +0 -2
- package/dist/es/a/OvalIllustration/styles.scss +0 -105
- package/dist/es/a/Shapes/Shapes.js +0 -141
- package/dist/es/a/Shapes/styles.scss +0 -221
- package/dist/es/a/SiteContext/index.js +0 -5
- package/dist/es/a/TeamInfo/TeamInfo.js +0 -86
- package/dist/es/a/TeamInfo/styles.scss +0 -58
- package/dist/es/b/Card/Card.js +0 -49
- package/dist/es/b/Card/common/Group/Group.js +0 -53
- package/dist/es/b/Card/common/Group/index.js +0 -2
- package/dist/es/b/Card/common/Group/styles.scss +0 -61
- package/dist/es/b/Card/common/index.js +0 -1
- package/dist/es/b/Card/index.js +0 -2
- package/dist/es/b/Card/styles.scss +0 -12
- package/dist/es/b/Metrics/Metrics.js +0 -72
- package/dist/es/b/Metrics/styles.scss +0 -91
- package/dist/es/b/QuestionDropdown/QuestionDropdown.js +0 -104
- package/dist/es/b/QuestionDropdown/index.js +0 -2
- package/dist/es/b/QuestionDropdown/styles.scss +0 -95
- package/dist/es/b/Segment/Segment.js +0 -61
- package/dist/es/b/Segment/index.js +0 -2
- package/dist/es/b/Segment/styles.scss +0 -26
- 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/Context.js +0 -2
- package/dist/es/c/BlogContext/ContextProvider.js +0 -45
- package/dist/es/c/BlogContext/index.js +0 -4
- package/dist/es/c/BlogContext/useBlog.js +0 -3
- package/dist/es/c/BlogPost/BlogPost.js +0 -128
- package/dist/es/c/BlogPost/index.js +0 -2
- 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/Hero/Hero.js +0 -72
- package/dist/es/c/Hero/index.js +0 -2
- package/dist/es/c/Hero/styles.scss +0 -41
- package/dist/es/c/SiteFooter/SiteFooter.js +0 -56
- package/dist/es/c/SiteFooter/common/Section/Section.js +0 -73
- package/dist/es/c/SiteFooter/common/Section/index.js +0 -2
- 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/TeamGallery.js +0 -64
- 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/CheckboxInput/CheckboxInput.js +0 -85
- package/dist/es/f/fields/CheckboxInput/index.js +0 -2
- package/dist/es/f/fields/CheckboxInput/styles.scss +0 -28
- package/dist/es/f/fields/RadioInput/RadioInput.js +0 -90
- package/dist/es/f/fields/RadioInput/index.js +0 -2
- package/dist/es/f/fields/RadioInput/styles.scss +0 -26
- 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/TaskRecommendationInput/TaskRecommendationInput.js +0 -111
- package/dist/es/f/fields/TaskRecommendationInput/index.js +0 -2
- package/dist/es/f/fields/TaskRecommendationInput/styles.scss +0 -41
- package/dist/es/f/fields/TextArea/TextArea.js +0 -124
- package/dist/es/f/fields/TextArea/index.js +0 -2
- package/dist/es/f/fields/TextArea/styles.scss +0 -19
- package/scripts/postinstall.js +0 -1
- package/scripts/upgrade.sh +0 -10
- package/src/stories/a/ContentCard.stories.jsx +0 -158
- package/src/stories/a/CustomerLogos.stories.jsx +0 -35
- package/src/stories/a/CustomerStat.stories.jsx +0 -22
- package/src/stories/a/DashboardNavbar.stories.jsx +0 -57
- package/src/stories/a/FeaturedOn.stories.jsx +0 -33
- package/src/stories/a/OvalIllustration.stories.jsx +0 -36
- package/src/stories/a/Shapes.stories.jsx +0 -125
- package/src/stories/a/TeamInfo.stories.jsx +0 -31
- package/src/stories/b/Card.stories.jsx +0 -36
- package/src/stories/b/Metrics.stories.jsx +0 -62
- package/src/stories/b/QuestionDropdown.stories.jsx +0 -62
- package/src/stories/b/Segment.stories.jsx +0 -34
- package/src/stories/c/Hero.stories.jsx +0 -46
- 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/ContentCard/common/Section/Section.jsx +0 -79
- package/src/ui/a/ContentCard/common/Section/index.js +0 -2
- package/src/ui/a/ContentCard/common/index.js +0 -1
- package/src/ui/a/ContentCard/index.js +0 -2
- package/src/ui/a/ContentCard/styles.scss +0 -78
- package/src/ui/a/CustomerLogos/CustomerLogos.jsx +0 -92
- package/src/ui/a/CustomerLogos/index.js +0 -2
- package/src/ui/a/CustomerLogos/styles.scss +0 -41
- package/src/ui/a/CustomerStat/index.js +0 -2
- package/src/ui/a/CustomerStat/styles.scss +0 -16
- package/src/ui/a/DashboardNavbar/DashboardNavbar.jsx +0 -74
- package/src/ui/a/DashboardNavbar/common/NavItem/NavItem.jsx +0 -64
- package/src/ui/a/DashboardNavbar/common/NavItem/index.js +0 -2
- package/src/ui/a/DashboardNavbar/common/NavItem/styles.scss +0 -9
- package/src/ui/a/DashboardNavbar/common/NavProfile/NavProfile.jsx +0 -64
- package/src/ui/a/DashboardNavbar/common/NavProfile/index.js +0 -2
- package/src/ui/a/DashboardNavbar/common/NavProfile/styles.scss +0 -9
- package/src/ui/a/DashboardNavbar/common/index.js +0 -2
- package/src/ui/a/DashboardNavbar/index.js +0 -2
- package/src/ui/a/DashboardNavbar/styles.scss +0 -14
- package/src/ui/a/FeaturedOn/FeaturedOn.jsx +0 -95
- package/src/ui/a/FeaturedOn/index.js +0 -2
- package/src/ui/a/FeaturedOn/styles.scss +0 -41
- package/src/ui/a/OvalIllustration/OvalIllustration.jsx +0 -108
- package/src/ui/a/OvalIllustration/index.js +0 -2
- package/src/ui/a/OvalIllustration/styles.scss +0 -105
- package/src/ui/a/Shapes/Shapes.jsx +0 -181
- package/src/ui/a/Shapes/styles.scss +0 -221
- package/src/ui/a/SiteContext/index.js +0 -5
- package/src/ui/a/TeamInfo/TeamInfo.jsx +0 -99
- package/src/ui/a/TeamInfo/index.js +0 -2
- package/src/ui/a/TeamInfo/styles.scss +0 -58
- package/src/ui/b/Card/Card.jsx +0 -63
- package/src/ui/b/Card/common/Group/Group.jsx +0 -70
- package/src/ui/b/Card/common/Group/index.js +0 -2
- package/src/ui/b/Card/common/Group/styles.scss +0 -61
- package/src/ui/b/Card/common/index.js +0 -1
- package/src/ui/b/Card/index.js +0 -2
- package/src/ui/b/Card/styles.scss +0 -12
- package/src/ui/b/Metrics/index.js +0 -2
- package/src/ui/b/Metrics/styles.scss +0 -91
- package/src/ui/b/QuestionDropdown/QuestionDropdown.jsx +0 -112
- package/src/ui/b/QuestionDropdown/index.js +0 -2
- package/src/ui/b/QuestionDropdown/styles.scss +0 -95
- package/src/ui/b/Segment/Segment.jsx +0 -78
- package/src/ui/b/Segment/index.js +0 -2
- package/src/ui/b/Segment/styles.scss +0 -26
- package/src/ui/c/Hero/index.js +0 -2
- package/src/ui/c/Hero/styles.scss +0 -41
- 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/RadioInput.jsx +0 -112
- 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
- /package/dist/es/a/{SiteContext → AppContext}/Context.js +0 -0
- /package/dist/es/a/{SiteContext/useSite.js → AppContext/useApp.js} +0 -0
- /package/src/ui/a/{SiteContext → AppContext}/Context.js +0 -0
- /package/src/ui/a/{SiteContext/useSite.js → AppContext/useApp.js} +0 -0
- /package/src/ui/a/{SiteContext → AppContext}/useTheme.js +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
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/exports';
|
|
6
|
+
|
|
7
|
+
// Local Definitions
|
|
8
|
+
import { Tree, useContentTree } from "./common";
|
|
9
|
+
const baseClassName = styleNames.base;
|
|
10
|
+
const componentClassName = 'content-tree';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* This is the component description.
|
|
14
|
+
*/
|
|
15
|
+
const ContentTree = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
id,
|
|
18
|
+
className: userClassName,
|
|
19
|
+
style,
|
|
20
|
+
target,
|
|
21
|
+
selectors
|
|
22
|
+
// ...otherProps
|
|
23
|
+
} = _ref;
|
|
24
|
+
useLayoutEffect(() => {
|
|
25
|
+
import("./styles.scss");
|
|
26
|
+
}, []);
|
|
27
|
+
const contentTree = useContentTree(target, selectors);
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
id: id,
|
|
30
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
31
|
+
style: style
|
|
32
|
+
// {...otherProps}
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Tree, {
|
|
34
|
+
tree: contentTree
|
|
35
|
+
}));
|
|
36
|
+
};
|
|
37
|
+
ContentTree.propTypes = {
|
|
38
|
+
/**
|
|
39
|
+
* The HTML id for this element
|
|
40
|
+
*/
|
|
41
|
+
id: PropTypes.string,
|
|
42
|
+
/**
|
|
43
|
+
* The HTML class names for this element
|
|
44
|
+
*/
|
|
45
|
+
className: PropTypes.string,
|
|
46
|
+
/**
|
|
47
|
+
* The React-written, css properties for this element.
|
|
48
|
+
*/
|
|
49
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
50
|
+
/**
|
|
51
|
+
* The selectors to use to extract the navigation tree from the content.
|
|
52
|
+
*/
|
|
53
|
+
selectors: PropTypes.arrayOf(PropTypes.string),
|
|
54
|
+
/**
|
|
55
|
+
* The reference to the parent element.
|
|
56
|
+
*/
|
|
57
|
+
target: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
58
|
+
current: PropTypes.instanceOf(Element)
|
|
59
|
+
})])
|
|
60
|
+
};
|
|
61
|
+
ContentTree.defaultProps = {
|
|
62
|
+
selectors: ['h2', 'h3']
|
|
63
|
+
};
|
|
64
|
+
export default ContentTree;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useState, useEffect, useMemo } from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import styleNames from '@pareto-engineering/bem/exports';
|
|
6
|
+
|
|
7
|
+
// Local Definitions
|
|
8
|
+
|
|
9
|
+
import useFirstVisibleNode from "../useFirstVisibleNode";
|
|
10
|
+
const baseClassName = styleNames.base;
|
|
11
|
+
const componentClassName = 'tree';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* This is the component description.
|
|
15
|
+
*/
|
|
16
|
+
const Tree = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
id,
|
|
19
|
+
className: userClassName,
|
|
20
|
+
style,
|
|
21
|
+
tree,
|
|
22
|
+
displayDepth
|
|
23
|
+
// ...otherProps
|
|
24
|
+
} = _ref;
|
|
25
|
+
// The nodeIds to be used to get the first visible node
|
|
26
|
+
const [nodeIds, setNodeIds] = useState([]);
|
|
27
|
+
|
|
28
|
+
// current visible nodeId
|
|
29
|
+
const visibleNodeId = useFirstVisibleNode(nodeIds);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
const node = document.getElementsByClassName(visibleNodeId)[0];
|
|
32
|
+
node?.classList.add(styleNames.modifierActive);
|
|
33
|
+
return () => {
|
|
34
|
+
node?.classList.remove(styleNames.modifierActive);
|
|
35
|
+
};
|
|
36
|
+
}, [visibleNodeId]);
|
|
37
|
+
|
|
38
|
+
// Generate the tree structure from the content tree data depending on the display depth
|
|
39
|
+
const getNestedTree = (node, depth) => {
|
|
40
|
+
setNodeIds(prev => [...prev, node.id]);
|
|
41
|
+
if (depth <= 1) {
|
|
42
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
43
|
+
key: node.id
|
|
44
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
45
|
+
className: node.id,
|
|
46
|
+
href: node.id
|
|
47
|
+
}, node.text));
|
|
48
|
+
}
|
|
49
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
50
|
+
key: node.id
|
|
51
|
+
}, /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("a", {
|
|
52
|
+
href: node.id,
|
|
53
|
+
className: node.id
|
|
54
|
+
}, node.text)), node.children.length > 0 && /*#__PURE__*/React.createElement("ul", null, node.children.map(child => getNestedTree(child, depth - 1))));
|
|
55
|
+
};
|
|
56
|
+
const ContentTree = useMemo(() => tree.map(node => getNestedTree(node, displayDepth)), [tree]);
|
|
57
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
58
|
+
id: id,
|
|
59
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
60
|
+
style: style
|
|
61
|
+
}, ContentTree);
|
|
62
|
+
};
|
|
63
|
+
Tree.propTypes = {
|
|
64
|
+
/**
|
|
65
|
+
* The HTML id for this element
|
|
66
|
+
*/
|
|
67
|
+
id: PropTypes.string,
|
|
68
|
+
/**
|
|
69
|
+
* The HTML class names for this element
|
|
70
|
+
*/
|
|
71
|
+
className: PropTypes.string,
|
|
72
|
+
/**
|
|
73
|
+
* The React-written, css properties for this element.
|
|
74
|
+
*/
|
|
75
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
76
|
+
/**
|
|
77
|
+
* The tree to render.
|
|
78
|
+
*/
|
|
79
|
+
tree: PropTypes.arrayOf(PropTypes.shape({
|
|
80
|
+
text: PropTypes.string,
|
|
81
|
+
id: PropTypes.string,
|
|
82
|
+
children: PropTypes.arrayOf(PropTypes.shape({
|
|
83
|
+
text: PropTypes.string,
|
|
84
|
+
id: PropTypes.string
|
|
85
|
+
}))
|
|
86
|
+
})),
|
|
87
|
+
/**
|
|
88
|
+
* The levels of the tree to display.
|
|
89
|
+
*/
|
|
90
|
+
displayDepth: PropTypes.number
|
|
91
|
+
};
|
|
92
|
+
Tree.defaultProps = {
|
|
93
|
+
displayDepth: 4
|
|
94
|
+
};
|
|
95
|
+
export default Tree;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
-
export { default as
|
|
2
|
+
export { default as Tree } from "./Tree";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { useState, useEffect, useCallback } from 'react';
|
|
2
|
+
const useContentTree = (target, selectors) => {
|
|
3
|
+
const [contentTree, setContentTree] = useState([]);
|
|
4
|
+
const getNodes = useCallback(parentTag => {
|
|
5
|
+
const nodeList = parentTag.querySelectorAll(selectors.join(', '));
|
|
6
|
+
const nodes = [];
|
|
7
|
+
nodeList.forEach(nodeNode => {
|
|
8
|
+
const {
|
|
9
|
+
id,
|
|
10
|
+
innerText,
|
|
11
|
+
tagName
|
|
12
|
+
} = nodeNode;
|
|
13
|
+
nodes.push({
|
|
14
|
+
id: `#${id}`,
|
|
15
|
+
text: innerText,
|
|
16
|
+
level: selectors.indexOf(tagName.toLowerCase())
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
return nodes;
|
|
20
|
+
}, [selectors]);
|
|
21
|
+
const buildTree = useCallback(nodes => {
|
|
22
|
+
// Track the nodes we've seen so far in the same level
|
|
23
|
+
const currentSameLevelNodes = [];
|
|
24
|
+
// Track nodes of the next level which will be children of the current node
|
|
25
|
+
let nextLevelNodes = [];
|
|
26
|
+
// Track the current node level
|
|
27
|
+
let lastLevel = -1;
|
|
28
|
+
|
|
29
|
+
// If the nodes are empty, return an empty tree
|
|
30
|
+
if (nodes.length === 0) {
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
const buildSubTree = () => {
|
|
34
|
+
if (nextLevelNodes.length > 0) {
|
|
35
|
+
currentSameLevelNodes[currentSameLevelNodes.length - 1].children.push(...buildTree(nextLevelNodes));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
nodes.forEach(node => {
|
|
39
|
+
// If the node is of a greater level, we need to build the sub tree
|
|
40
|
+
if (lastLevel !== -1 && lastLevel < node.level) {
|
|
41
|
+
nextLevelNodes.push(node);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// build a subtree
|
|
46
|
+
buildSubTree();
|
|
47
|
+
|
|
48
|
+
// reset the next level nodes
|
|
49
|
+
lastLevel = node.level;
|
|
50
|
+
// add the current node to the current level nodes
|
|
51
|
+
currentSameLevelNodes.push({
|
|
52
|
+
id: node.id,
|
|
53
|
+
text: node.text,
|
|
54
|
+
children: []
|
|
55
|
+
});
|
|
56
|
+
// reset the next level nodes after building the subtree
|
|
57
|
+
nextLevelNodes = [];
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
// build subtree
|
|
61
|
+
buildSubTree();
|
|
62
|
+
return currentSameLevelNodes;
|
|
63
|
+
}, []);
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (target.current) {
|
|
66
|
+
const nodes = getNodes(target.current);
|
|
67
|
+
const tree = buildTree(nodes);
|
|
68
|
+
setContentTree(tree);
|
|
69
|
+
}
|
|
70
|
+
}, [target.current]);
|
|
71
|
+
return contentTree;
|
|
72
|
+
};
|
|
73
|
+
export default useContentTree;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { useState, useEffect, useMemo, useCallback } from 'react';
|
|
2
|
+
import debounce from 'lodash/debounce';
|
|
3
|
+
const useFirstVisibleNode = (nodeIds, config) => {
|
|
4
|
+
const [visibleNodeId, setVisibleNodeId] = useState(null);
|
|
5
|
+
const {
|
|
6
|
+
debounceMs = 25
|
|
7
|
+
} = config || {};
|
|
8
|
+
|
|
9
|
+
// get headlines nodes - Should only be recalculated when the ids change
|
|
10
|
+
const nodes = useMemo(() => {
|
|
11
|
+
if (nodeIds?.length > 0) {
|
|
12
|
+
return Array.from(document.querySelectorAll(nodeIds.join(',')));
|
|
13
|
+
}
|
|
14
|
+
return [];
|
|
15
|
+
}, [nodeIds]);
|
|
16
|
+
const getVisibleNodeId = useCallback(debounce(() => {
|
|
17
|
+
// Get the top postion of each headline node relative to the viewport
|
|
18
|
+
const topOffsets = nodes.map(node => node.getBoundingClientRect().top);
|
|
19
|
+
|
|
20
|
+
// Get the node closer to zero (the top of the viewport)
|
|
21
|
+
// We have the default offset as Infinity so it's always greater that the first node Y position
|
|
22
|
+
const visibleNode = topOffsets.reduce((prev, currentOffset, currentIndex) => {
|
|
23
|
+
const node = Math.abs(currentOffset - 0) < Math.abs(prev.offset - 0) ? {
|
|
24
|
+
node: nodes[currentIndex],
|
|
25
|
+
offset: currentOffset
|
|
26
|
+
} : prev;
|
|
27
|
+
return node;
|
|
28
|
+
}, {
|
|
29
|
+
node: nodes[0],
|
|
30
|
+
offset: Infinity
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// Set the visible node id
|
|
34
|
+
setVisibleNodeId(`#${visibleNode?.node?.id}`);
|
|
35
|
+
}, debounceMs), [nodes]);
|
|
36
|
+
|
|
37
|
+
// Recalculate the visible node id when the page is scrolled
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
window.addEventListener('scroll', getVisibleNodeId);
|
|
40
|
+
return () => {
|
|
41
|
+
window.removeEventListener('scroll', getVisibleNodeId);
|
|
42
|
+
};
|
|
43
|
+
}, [getVisibleNodeId]);
|
|
44
|
+
|
|
45
|
+
// Recalculate the visible node id when the page is resized
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
window.addEventListener('resize', getVisibleNodeId);
|
|
48
|
+
return () => {
|
|
49
|
+
window.removeEventListener('resize', getVisibleNodeId);
|
|
50
|
+
};
|
|
51
|
+
}, [getVisibleNodeId]);
|
|
52
|
+
return visibleNodeId;
|
|
53
|
+
};
|
|
54
|
+
export default useFirstVisibleNode;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
@use "@pareto-engineering/bem";
|
|
3
|
+
|
|
4
|
+
$default-margin: 1em;
|
|
5
|
+
$default-padding: 1em;
|
|
6
|
+
|
|
7
|
+
.#{bem.$base}.content-tree{
|
|
8
|
+
|
|
9
|
+
ul {
|
|
10
|
+
list-style: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.#{bem.$base}.tree {
|
|
14
|
+
position: sticky;
|
|
15
|
+
top: 0;
|
|
16
|
+
padding: 0;
|
|
17
|
+
|
|
18
|
+
.#{bem.$modifier-active} {
|
|
19
|
+
color: var(--main2);
|
|
20
|
+
transition: color 0.2s;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
li:not(:last-child) {
|
|
24
|
+
margin-bottom: $default-margin;
|
|
25
|
+
ul {
|
|
26
|
+
padding-left: $default-padding;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
@@ -2,30 +2,33 @@
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useLayoutEffect } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import styleNames from '@pareto-engineering/bem';
|
|
5
|
+
import styleNames from '@pareto-engineering/bem/exports';
|
|
6
|
+
|
|
7
|
+
// Local Definitions
|
|
6
8
|
|
|
7
9
|
import { Message } from "./common";
|
|
8
10
|
import ConversationContext from "./Context";
|
|
9
11
|
const baseClassName = styleNames.base;
|
|
10
12
|
const componentClassName = 'conversation';
|
|
13
|
+
|
|
11
14
|
/**
|
|
12
15
|
* This is the component description.
|
|
13
16
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
const Conversation = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
id,
|
|
20
|
+
className: userClassName,
|
|
21
|
+
style,
|
|
22
|
+
backgroundColor,
|
|
23
|
+
ourColor,
|
|
24
|
+
theirColor,
|
|
25
|
+
children,
|
|
26
|
+
hasTriangle
|
|
27
|
+
// ...otherProps
|
|
28
|
+
} = _ref;
|
|
25
29
|
useLayoutEffect(() => {
|
|
26
30
|
import("./styles.scss");
|
|
27
|
-
}, []);
|
|
28
|
-
|
|
31
|
+
}, []);
|
|
29
32
|
return /*#__PURE__*/React.createElement(ConversationContext.Provider, {
|
|
30
33
|
value: {
|
|
31
34
|
ourColor,
|
|
@@ -33,51 +36,49 @@ const Conversation = ({
|
|
|
33
36
|
}
|
|
34
37
|
}, /*#__PURE__*/React.createElement("div", {
|
|
35
38
|
id: id,
|
|
36
|
-
className: [baseClassName, componentClassName, userClassName, `y-${backgroundColor}`, 'u1'].filter(e => e).join(' '),
|
|
39
|
+
className: [baseClassName, componentClassName, userClassName, hasTriangle && 'has-triangle', `y-${backgroundColor}`, 'u1'].filter(e => e).join(' '),
|
|
37
40
|
style: style
|
|
38
41
|
}, children));
|
|
39
42
|
};
|
|
40
|
-
|
|
41
43
|
Conversation.propTypes = {
|
|
42
44
|
/**
|
|
43
45
|
* The HTML id for this element
|
|
44
46
|
*/
|
|
45
47
|
id: PropTypes.string,
|
|
46
|
-
|
|
47
48
|
/**
|
|
48
49
|
* The HTML class names for this element
|
|
49
50
|
*/
|
|
50
51
|
className: PropTypes.string,
|
|
51
|
-
|
|
52
52
|
/**
|
|
53
53
|
* The React-written, css properties for this element.
|
|
54
54
|
*/
|
|
55
55
|
style: PropTypes.objectOf(PropTypes.string),
|
|
56
|
-
|
|
57
56
|
/**
|
|
58
57
|
* The base color to our messages component
|
|
59
58
|
*/
|
|
60
59
|
ourColor: PropTypes.string,
|
|
61
|
-
|
|
62
60
|
/**
|
|
63
61
|
* The base color to their messages component
|
|
64
62
|
*/
|
|
65
63
|
theirColor: PropTypes.string,
|
|
66
|
-
|
|
67
64
|
/**
|
|
68
65
|
* The component background color
|
|
69
66
|
*/
|
|
70
67
|
backgroundColor: PropTypes.string,
|
|
71
|
-
|
|
72
68
|
/**
|
|
73
69
|
* The children JSX
|
|
74
70
|
*/
|
|
75
|
-
children: PropTypes.node
|
|
71
|
+
children: PropTypes.node,
|
|
72
|
+
/**
|
|
73
|
+
* whether to add triangle to bubble chats
|
|
74
|
+
*/
|
|
75
|
+
hasTriangle: PropTypes.bool
|
|
76
76
|
};
|
|
77
77
|
Conversation.defaultProps = {
|
|
78
|
-
backgroundColor: '
|
|
79
|
-
ourColor: '
|
|
80
|
-
theirColor: '
|
|
78
|
+
backgroundColor: 'background2',
|
|
79
|
+
ourColor: 'background1',
|
|
80
|
+
theirColor: 'background1',
|
|
81
|
+
hasTriangle: false
|
|
81
82
|
};
|
|
82
83
|
Conversation.Message = Message;
|
|
83
84
|
export default Conversation;
|
|
@@ -1,71 +1,91 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import styleNames from '@pareto-engineering/bem';
|
|
4
|
+
import styleNames from '@pareto-engineering/bem/exports';
|
|
5
|
+
|
|
6
|
+
// Local Definitions
|
|
5
7
|
|
|
6
8
|
import useConversation from "../../useConversation";
|
|
7
9
|
const baseClassName = styleNames.base;
|
|
8
10
|
const componentClassName = 'message';
|
|
11
|
+
|
|
9
12
|
/**
|
|
10
13
|
* This is the component description.
|
|
11
14
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
const Message = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
id,
|
|
18
|
+
className: userClassName,
|
|
19
|
+
style,
|
|
20
|
+
message,
|
|
21
|
+
sender,
|
|
22
|
+
from,
|
|
23
|
+
attachment,
|
|
24
|
+
attachmentIcon,
|
|
25
|
+
attachmentColor
|
|
26
|
+
// ...otherProps
|
|
27
|
+
} = _ref;
|
|
22
28
|
const {
|
|
23
29
|
ourColor,
|
|
24
30
|
theirColor
|
|
25
31
|
} = useConversation();
|
|
26
32
|
return /*#__PURE__*/React.createElement("div", {
|
|
27
33
|
id: id,
|
|
28
|
-
className: [baseClassName, componentClassName, userClassName, `x-${from === 'ours' ? ourColor : theirColor}`, from === 'ours' && 'ours'].filter(e => e).join(' '),
|
|
34
|
+
className: [baseClassName, componentClassName, userClassName, `x-${from === 'ours' ? ourColor : theirColor}`, from === 'ours' && 'ours', 'v1'].filter(e => e).join(' '),
|
|
29
35
|
style: style
|
|
30
36
|
}, /*#__PURE__*/React.createElement("div", {
|
|
31
37
|
className: styleNames.elementContent
|
|
32
38
|
}, /*#__PURE__*/React.createElement("p", {
|
|
33
39
|
className: "sender v25 mb-v s-1"
|
|
34
|
-
}, sender, ":"), /*#__PURE__*/React.createElement("p", null, message)
|
|
40
|
+
}, sender, ":"), /*#__PURE__*/React.createElement("p", null, message), attachment && /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
className: `attachment y-${attachmentColor}`
|
|
42
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
43
|
+
className: "f-icons"
|
|
44
|
+
}, attachmentIcon), /*#__PURE__*/React.createElement("p", {
|
|
45
|
+
className: "ml-v"
|
|
46
|
+
}, attachment))));
|
|
35
47
|
};
|
|
36
|
-
|
|
37
48
|
Message.propTypes = {
|
|
38
49
|
/**
|
|
39
50
|
* The HTML id for this element
|
|
40
51
|
*/
|
|
41
52
|
id: PropTypes.string,
|
|
42
|
-
|
|
43
53
|
/**
|
|
44
54
|
* The HTML class names for this element
|
|
45
55
|
*/
|
|
46
56
|
className: PropTypes.string,
|
|
47
|
-
|
|
57
|
+
/**
|
|
58
|
+
* The React-written, css properties for this element.
|
|
59
|
+
*/
|
|
60
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
48
61
|
/**
|
|
49
62
|
* The message in the conversation
|
|
50
63
|
*/
|
|
51
64
|
message: PropTypes.string.isRequired,
|
|
52
|
-
|
|
53
65
|
/**
|
|
54
66
|
* The sender of the message
|
|
55
67
|
*/
|
|
56
68
|
sender: PropTypes.string.isRequired,
|
|
57
|
-
|
|
58
69
|
/**
|
|
59
70
|
* The owner of the message
|
|
60
71
|
*/
|
|
61
72
|
from: PropTypes.oneOf(['ours', 'theirs']),
|
|
62
|
-
|
|
63
73
|
/**
|
|
64
|
-
*
|
|
74
|
+
* name of the attachment file
|
|
75
|
+
*/
|
|
76
|
+
attachment: PropTypes.string,
|
|
77
|
+
/**
|
|
78
|
+
* source of the attachment icon
|
|
79
|
+
*/
|
|
80
|
+
attachmentIcon: PropTypes.string,
|
|
81
|
+
/**
|
|
82
|
+
* background color of the attachment box
|
|
65
83
|
*/
|
|
66
|
-
|
|
84
|
+
attachmentColor: PropTypes.string
|
|
67
85
|
};
|
|
68
86
|
Message.defaultProps = {
|
|
69
|
-
from: 'theirs'
|
|
87
|
+
from: 'theirs',
|
|
88
|
+
attachmentIcon: 'A',
|
|
89
|
+
attachmentColor: 'main4'
|
|
70
90
|
};
|
|
71
91
|
export default Message;
|