@pareto-engineering/design-system 3.0.0-alpha.29 → 4.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.js +25 -63
- package/.storybook/preview.js +26 -9
- package/.storybook/webpackFinal.js +68 -0
- package/babel.config.js +25 -48
- package/dist/cjs/a/AppContext/Context.js +1 -1
- package/dist/cjs/a/AppContext/ContextProvider.js +19 -15
- package/dist/cjs/a/AppContext/index.js +4 -4
- package/dist/cjs/a/AppContext/useTheme.js +7 -7
- package/dist/cjs/a/ContentTree/ContentTree.js +6 -6
- package/dist/cjs/a/ContentTree/common/Tree/Tree.js +12 -12
- package/dist/cjs/a/ContentTree/common/Tree/index.js +1 -1
- package/dist/cjs/a/ContentTree/common/index.js +3 -3
- package/dist/cjs/a/ContentTree/common/useContentTree.js +14 -14
- package/dist/cjs/a/ContentTree/common/useFirstVisibleNode.js +10 -11
- package/dist/cjs/a/ContentTree/index.js +1 -1
- package/dist/cjs/a/ContentTree/styles.scss +20 -20
- package/dist/cjs/a/Conversation/Context.js +1 -1
- package/dist/cjs/a/Conversation/Conversation.js +6 -6
- package/dist/cjs/a/Conversation/common/Message/Message.js +8 -8
- package/dist/cjs/a/Conversation/common/Message/index.js +1 -1
- package/dist/cjs/a/Conversation/common/index.js +1 -1
- package/dist/cjs/a/Conversation/index.js +3 -3
- package/dist/cjs/a/Conversation/styles.scss +1 -0
- package/dist/cjs/a/DotInfo/DotInfo.js +10 -14
- package/dist/cjs/a/DotInfo/index.js +1 -1
- package/dist/cjs/a/Figure/Figure.js +5 -5
- package/dist/cjs/a/Figure/index.js +1 -1
- package/dist/cjs/a/HamburgerButton/HamburgerButton.js +16 -19
- package/dist/cjs/a/HamburgerButton/index.js +1 -1
- package/dist/cjs/a/IconList/IconList.js +18 -25
- package/dist/cjs/a/IconList/common/Item/Item.js +17 -24
- package/dist/cjs/a/IconList/common/Item/index.js +1 -1
- package/dist/cjs/a/IconList/common/index.js +1 -1
- package/dist/cjs/a/IconList/index.js +1 -1
- package/dist/cjs/a/Label/Label.js +6 -6
- package/dist/cjs/a/Label/index.js +1 -1
- package/dist/cjs/a/Label/styles.scss +18 -17
- package/dist/cjs/a/LoadingCircle/LoadingCircle.js +10 -14
- package/dist/cjs/a/LoadingCircle/index.js +1 -1
- package/dist/cjs/a/LoadingCircle/styles.scss +35 -37
- package/dist/cjs/a/People/People.js +8 -12
- package/dist/cjs/a/People/common/Person/Person.js +7 -7
- package/dist/cjs/a/People/common/Person/index.js +1 -1
- package/dist/cjs/a/People/common/index.js +1 -1
- package/dist/cjs/a/People/index.js +1 -1
- package/dist/cjs/a/People/styles.scss +4 -4
- package/dist/cjs/a/Popover/Popover.js +8 -8
- package/dist/cjs/a/Popover/index.js +1 -1
- package/dist/cjs/a/Popover/styles.scss +4 -3
- package/dist/cjs/a/ProgressBar/ProgressBar.js +10 -14
- package/dist/cjs/a/ProgressBar/index.js +1 -1
- package/dist/cjs/a/Quote/Quote.js +6 -6
- package/dist/cjs/a/Quote/index.js +1 -1
- package/dist/cjs/a/Quote/styles.scss +41 -38
- package/dist/cjs/a/SVG/SVG.js +22 -25
- package/dist/cjs/a/SVG/common/UseSVG/UseSVG.js +9 -11
- package/dist/cjs/a/SVG/common/UseSVG/index.js +1 -1
- package/dist/cjs/a/SVG/common/index.js +1 -1
- package/dist/cjs/a/SVG/index.js +1 -1
- package/dist/cjs/a/SnapScroller/SnapScroller.js +5 -5
- package/dist/cjs/a/SnapScroller/index.js +1 -1
- package/dist/cjs/a/SnapScroller/styles.scss +6 -4
- package/dist/cjs/a/Spinner/Spinner.js +6 -6
- package/dist/cjs/a/Spinner/index.js +1 -1
- package/dist/cjs/a/Timestamp/Timestamp.js +11 -11
- package/dist/cjs/a/Timestamp/index.js +1 -1
- package/dist/cjs/a/index.js +20 -27
- package/dist/cjs/b/Button/Button.js +18 -21
- package/dist/cjs/b/Button/index.js +1 -1
- package/dist/cjs/b/Button/styles.scss +2 -2
- package/dist/cjs/b/Logo/Logo.js +12 -12
- package/dist/cjs/b/Logo/index.js +1 -1
- package/dist/cjs/b/Logo/styles.scss +4 -2
- package/dist/cjs/b/Page/Context.js +1 -1
- package/dist/cjs/b/Page/Page.js +15 -18
- package/dist/cjs/b/Page/common/PageHelmet/PageHelmet.js +41 -45
- package/dist/cjs/b/Page/common/PageHelmet/index.js +1 -1
- package/dist/cjs/b/Page/common/Section/Section.js +13 -16
- package/dist/cjs/b/Page/common/Section/index.js +1 -1
- package/dist/cjs/b/Page/common/index.js +2 -2
- package/dist/cjs/b/Page/index.js +3 -3
- package/dist/cjs/b/Page/styles.scss +7 -6
- package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +20 -24
- package/dist/cjs/b/SocialMediaButton/index.js +1 -1
- package/dist/cjs/b/SocialMediaButton/styles.scss +1 -1
- package/dist/cjs/b/ThemeSelector/ThemeSelector.js +8 -8
- package/dist/cjs/b/ThemeSelector/index.js +1 -1
- package/dist/cjs/b/Title/Title.js +5 -5
- package/dist/cjs/b/Title/index.js +1 -1
- package/dist/cjs/b/index.js +6 -6
- package/dist/cjs/c/ContentSlides/ContentSlides.js +31 -28
- package/dist/cjs/c/ContentSlides/Context.js +1 -1
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +8 -8
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/index.js +1 -1
- package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +7 -7
- package/dist/cjs/c/ContentSlides/common/Navigator/index.js +1 -1
- package/dist/cjs/c/ContentSlides/common/Sidebar/Sidebar.js +5 -5
- package/dist/cjs/c/ContentSlides/common/Sidebar/index.js +1 -1
- package/dist/cjs/c/ContentSlides/common/Slide/Slide.js +6 -6
- package/dist/cjs/c/ContentSlides/common/Slide/index.js +1 -1
- package/dist/cjs/c/ContentSlides/common/index.js +4 -4
- package/dist/cjs/c/ContentSlides/index.js +3 -3
- package/dist/cjs/c/ContentSlides/styles.scss +2 -4
- package/dist/cjs/c/Modal/Modal.js +5 -5
- package/dist/cjs/c/Modal/common/ModalHeader/ModalHeader.js +5 -5
- package/dist/cjs/c/Modal/common/ModalHeader/index.js +1 -1
- package/dist/cjs/c/Modal/common/index.js +1 -1
- package/dist/cjs/c/Modal/index.js +1 -1
- package/dist/cjs/c/Modal/styles.scss +7 -5
- package/dist/cjs/c/Shortener/Shortener.js +9 -9
- package/dist/cjs/c/Shortener/index.js +1 -1
- package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +11 -11
- package/dist/cjs/c/SocialMediaShareButton/index.js +1 -1
- package/dist/cjs/c/SocialMediaShareButton/styles.scss +3 -3
- package/dist/cjs/c/index.js +5 -5
- package/dist/cjs/f/FormInput/FormInput.js +13 -16
- package/dist/cjs/f/FormInput/index.js +1 -1
- package/dist/cjs/f/FormInput/styles.scss +4 -4
- package/dist/cjs/f/common/Debugger/Debugger.js +7 -7
- package/dist/cjs/f/common/Debugger/index.js +1 -1
- package/dist/cjs/f/common/Description/Description.js +7 -7
- package/dist/cjs/f/common/Description/index.js +1 -1
- package/dist/cjs/f/common/Label/Label.js +6 -6
- package/dist/cjs/f/common/Label/index.js +1 -1
- package/dist/cjs/f/common/Label/styles.scss +1 -1
- package/dist/cjs/f/common/index.js +3 -3
- package/dist/cjs/f/fields/Checkbox/Checkbox.js +6 -6
- package/dist/cjs/f/fields/Checkbox/index.js +1 -1
- package/dist/cjs/f/fields/Checkbox/styles.scss +9 -8
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +11 -15
- package/dist/cjs/f/fields/ChoicesInput/common/Choice/Choice.js +7 -7
- package/dist/cjs/f/fields/ChoicesInput/common/Choice/index.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/common/index.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/index.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/styles.scss +4 -4
- package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +25 -30
- package/dist/cjs/f/fields/QueryChoices/index.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +19 -21
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +12 -12
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/index.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/common/Menu/Menu.js +14 -17
- package/dist/cjs/f/fields/QueryCombobox/common/Menu/index.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +22 -26
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/index.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/common/index.js +3 -3
- package/dist/cjs/f/fields/QueryCombobox/index.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/styles.scss +59 -59
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +11 -11
- package/dist/cjs/f/fields/QuerySelect/index.js +1 -1
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +8 -8
- package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +7 -7
- package/dist/cjs/f/fields/RatingsInput/common/Rating/index.js +1 -1
- package/dist/cjs/f/fields/RatingsInput/common/index.js +1 -1
- package/dist/cjs/f/fields/RatingsInput/index.js +1 -1
- package/dist/cjs/f/fields/RatingsInput/styles.scss +8 -9
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +9 -9
- package/dist/cjs/f/fields/SelectInput/index.js +1 -1
- package/dist/cjs/f/fields/SelectInput/styles.scss +6 -6
- package/dist/cjs/f/fields/TextInput/TextInput.js +7 -7
- package/dist/cjs/f/fields/TextInput/index.js +1 -1
- package/dist/cjs/f/fields/TextInput/styles.scss +4 -4
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +7 -7
- package/dist/cjs/f/fields/TextareaInput/index.js +1 -1
- package/dist/cjs/f/fields/TextareaInput/styles.scss +7 -6
- package/dist/cjs/f/fields/index.js +9 -9
- package/dist/cjs/f/index.js +3 -3
- package/dist/cjs/index.js +8 -8
- package/dist/cjs/r/SwitchRouteMap/SwitchRouteMap.js +7 -10
- package/dist/cjs/r/SwitchRouteMap/index.js +1 -1
- package/dist/cjs/r/common/PrivateRoute/PrivateRoute.js +13 -16
- package/dist/cjs/r/common/PrivateRoute/index.js +1 -1
- package/dist/cjs/r/common/index.js +1 -1
- package/dist/cjs/r/index.js +2 -2
- package/dist/cjs/test/QueryLoader/QueryLoader.js +4 -4
- package/dist/cjs/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +1 -1
- package/dist/cjs/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +4 -4
- package/dist/cjs/test/QueryLoader/common/PreloadedTestData/index.js +1 -1
- package/dist/cjs/test/QueryLoader/common/index.js +1 -1
- package/dist/cjs/test/QueryLoader/index.js +1 -1
- package/dist/cjs/test/index.js +1 -1
- package/dist/cjs/utils/hooks/index.js +2 -2
- package/dist/cjs/utils/hooks/useDynamicPosition.js +24 -24
- package/dist/cjs/utils/hooks/useWindowSize.js +6 -6
- package/dist/cjs/utils/index.js +2 -2
- package/dist/es/a/AppContext/ContextProvider.js +7 -8
- package/dist/es/a/AppContext/useTheme.js +1 -2
- package/dist/es/a/ContentTree/ContentTree.js +8 -9
- package/dist/es/a/ContentTree/common/Tree/Tree.js +8 -9
- package/dist/es/a/ContentTree/styles.scss +20 -20
- package/dist/es/a/Conversation/Conversation.js +11 -12
- package/dist/es/a/Conversation/common/Message/Message.js +12 -13
- package/dist/es/a/Conversation/styles.scss +1 -0
- package/dist/es/a/DotInfo/DotInfo.js +11 -12
- package/dist/es/a/Figure/Figure.js +8 -9
- package/dist/es/a/HamburgerButton/HamburgerButton.js +10 -11
- package/dist/es/a/IconList/IconList.js +9 -10
- package/dist/es/a/IconList/common/Item/Item.js +17 -20
- package/dist/es/a/Label/Label.js +9 -10
- package/dist/es/a/Label/styles.scss +18 -17
- package/dist/es/a/LoadingCircle/LoadingCircle.js +10 -11
- package/dist/es/a/LoadingCircle/styles.scss +35 -37
- package/dist/es/a/People/People.js +9 -10
- package/dist/es/a/People/common/Person/Person.js +24 -27
- package/dist/es/a/People/styles.scss +4 -4
- package/dist/es/a/Popover/Popover.js +14 -15
- package/dist/es/a/Popover/styles.scss +4 -3
- package/dist/es/a/ProgressBar/ProgressBar.js +10 -11
- package/dist/es/a/Quote/Quote.js +10 -11
- package/dist/es/a/Quote/styles.scss +41 -38
- package/dist/es/a/SVG/SVG.js +17 -18
- package/dist/es/a/SVG/common/UseSVG/UseSVG.js +19 -22
- package/dist/es/a/SnapScroller/SnapScroller.js +8 -9
- package/dist/es/a/SnapScroller/styles.scss +6 -4
- package/dist/es/a/Spinner/Spinner.js +7 -8
- package/dist/es/a/Timestamp/Timestamp.js +14 -15
- package/dist/es/a/index.js +0 -1
- package/dist/es/b/Button/Button.js +13 -14
- package/dist/es/b/Button/styles.scss +2 -2
- package/dist/es/b/Logo/Logo.js +12 -13
- package/dist/es/b/Logo/styles.scss +4 -2
- package/dist/es/b/Page/Page.js +10 -11
- package/dist/es/b/Page/common/PageHelmet/PageHelmet.js +9 -11
- package/dist/es/b/Page/common/Section/Section.js +7 -8
- package/dist/es/b/Page/styles.scss +7 -6
- package/dist/es/b/SocialMediaButton/SocialMediaButton.js +11 -12
- package/dist/es/b/SocialMediaButton/styles.scss +1 -1
- package/dist/es/b/ThemeSelector/ThemeSelector.js +8 -9
- package/dist/es/b/Title/Title.js +27 -30
- package/dist/es/c/ContentSlides/ContentSlides.js +12 -15
- package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +11 -12
- package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +14 -15
- package/dist/es/c/ContentSlides/common/Sidebar/Sidebar.js +8 -9
- package/dist/es/c/ContentSlides/common/Slide/Slide.js +8 -9
- package/dist/es/c/ContentSlides/styles.scss +2 -4
- package/dist/es/c/Modal/Modal.js +10 -11
- package/dist/es/c/Modal/common/ModalHeader/ModalHeader.js +20 -23
- package/dist/es/c/Modal/styles.scss +7 -5
- package/dist/es/c/Shortener/Shortener.js +11 -12
- package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +9 -10
- package/dist/es/c/SocialMediaShareButton/styles.scss +3 -3
- package/dist/es/f/FormInput/FormInput.js +7 -8
- package/dist/es/f/FormInput/styles.scss +4 -4
- package/dist/es/f/common/Debugger/Debugger.js +7 -8
- package/dist/es/f/common/Description/Description.js +9 -10
- package/dist/es/f/common/Label/Label.js +11 -12
- package/dist/es/f/common/Label/styles.scss +1 -1
- package/dist/es/f/fields/Checkbox/Checkbox.js +11 -12
- package/dist/es/f/fields/Checkbox/styles.scss +9 -8
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +17 -18
- package/dist/es/f/fields/ChoicesInput/common/Choice/Choice.js +13 -14
- package/dist/es/f/fields/ChoicesInput/styles.scss +4 -4
- package/dist/es/f/fields/QueryChoices/QueryChoices.js +16 -20
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +27 -31
- package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +22 -24
- package/dist/es/f/fields/QueryCombobox/common/Menu/Menu.js +22 -25
- package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +24 -26
- package/dist/es/f/fields/QueryCombobox/styles.scss +59 -59
- package/dist/es/f/fields/QuerySelect/QuerySelect.js +24 -28
- package/dist/es/f/fields/RatingsInput/RatingsInput.js +16 -17
- package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +15 -16
- package/dist/es/f/fields/RatingsInput/styles.scss +8 -9
- package/dist/es/f/fields/SelectInput/SelectInput.js +16 -17
- package/dist/es/f/fields/SelectInput/styles.scss +6 -6
- package/dist/es/f/fields/TextInput/TextInput.js +18 -19
- package/dist/es/f/fields/TextInput/styles.scss +4 -4
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +20 -21
- package/dist/es/f/fields/TextareaInput/styles.scss +7 -6
- package/dist/es/r/SwitchRouteMap/SwitchRouteMap.js +15 -21
- package/dist/es/r/common/PrivateRoute/PrivateRoute.js +6 -7
- package/dist/es/test/QueryLoader/QueryLoader.js +1 -1
- package/dist/es/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +5 -6
- package/dist/es/utils/hooks/useDynamicPosition.js +9 -10
- package/dist/es/utils/hooks/useWindowSize.js +1 -2
- package/jest.config.js +5 -5
- package/package.json +44 -82
- package/src/stories/b/Page.stories.jsx +2 -1
- package/src/stories/original/Button.jsx +55 -0
- package/src/stories/original/Button.stories.js +39 -0
- package/src/stories/original/Header.jsx +64 -0
- package/src/stories/original/Header.stories.js +22 -0
- package/src/stories/original/Introduction.mdx +211 -0
- package/src/stories/original/Page.jsx +76 -0
- package/src/stories/original/Page.stories.js +26 -0
- package/src/stories/original/assets/code-brackets.svg +1 -0
- package/src/stories/original/assets/colors.svg +1 -0
- package/src/stories/original/assets/comments.svg +1 -0
- package/src/stories/original/assets/direction.svg +1 -0
- package/src/stories/original/assets/flow.svg +1 -0
- package/src/stories/original/assets/plugin.svg +1 -0
- package/src/stories/original/assets/repo.svg +1 -0
- package/src/stories/original/assets/stackalt.svg +1 -0
- package/src/stories/original/button.css +30 -0
- package/src/stories/original/header.css +32 -0
- package/src/stories/original/page.css +69 -0
- package/src/ui/a/ContentTree/styles.scss +20 -20
- package/src/ui/a/Conversation/styles.scss +1 -0
- package/src/ui/a/Label/styles.scss +18 -17
- package/src/ui/a/LoadingCircle/styles.scss +35 -37
- package/src/ui/a/People/styles.scss +4 -4
- package/src/ui/a/Popover/styles.scss +4 -3
- package/src/ui/a/Quote/styles.scss +41 -38
- package/src/ui/a/SnapScroller/styles.scss +6 -4
- package/src/ui/a/index.js +0 -1
- package/src/ui/b/Button/styles.scss +2 -2
- package/src/ui/b/Logo/styles.scss +4 -2
- package/src/ui/b/Page/common/PageHelmet/PageHelmet.jsx +1 -1
- package/src/ui/b/Page/styles.scss +7 -6
- package/src/ui/b/SocialMediaButton/styles.scss +1 -1
- package/src/ui/c/ContentSlides/styles.scss +2 -4
- package/src/ui/c/Modal/styles.scss +7 -5
- package/src/ui/c/SocialMediaShareButton/styles.scss +3 -3
- package/src/ui/f/FormInput/styles.scss +4 -4
- package/src/ui/f/common/Label/styles.scss +1 -1
- package/src/ui/f/fields/Checkbox/styles.scss +9 -8
- package/src/ui/f/fields/ChoicesInput/styles.scss +4 -4
- package/src/ui/f/fields/QueryCombobox/styles.scss +59 -59
- package/src/ui/f/fields/RatingsInput/styles.scss +8 -9
- package/src/ui/f/fields/SelectInput/styles.scss +6 -6
- package/src/ui/f/fields/TextInput/styles.scss +4 -4
- package/src/ui/f/fields/TextareaInput/styles.scss +7 -6
- package/src/ui/test/QueryLoader/QueryLoader.jsx +1 -1
- package/{src → tests}/__snapshots__/Storyshots.test.js.snap +687 -301
- package/tests/staticStub.js +1 -0
- package/.storybook/manager-head.html +0 -6
- package/.storybook/preview-head.html +0 -5
- package/README.md +0 -1
- package/build-storybook.log +0 -2978
- package/config/CSSStub.js +0 -1
- package/dist/cjs/a/AnimatedCounter/AnimatedCounter.js +0 -105
- package/dist/cjs/a/AnimatedCounter/index.js +0 -13
- package/dist/cjs/a/AnimatedCounter/styles.scss +0 -16
- package/dist/es/a/AnimatedCounter/AnimatedCounter.js +0 -98
- package/dist/es/a/AnimatedCounter/index.js +0 -2
- package/dist/es/a/AnimatedCounter/styles.scss +0 -16
- package/postcss.config.js +0 -13
- package/relay.config.js +0 -12
- package/src/assets/images/Ellipse1.png +0 -0
- package/src/assets/images/Ellipse2.png +0 -0
- package/src/assets/images/Fundraising.svg +0 -40
- package/src/assets/images/ParetoSupport.svg +0 -190
- package/src/assets/images/ParetoWorld.svg +0 -207
- package/src/assets/images/Vector.png +0 -0
- package/src/assets/images/email-attach.svg +0 -1
- package/src/assets/images/email-delete.svg +0 -1
- package/src/assets/images/favicon.png +0 -0
- package/src/assets/images/onboarding/focus-on-strategic-work.webp +0 -0
- package/src/assets/images/onboarding/launch-project.webp +0 -0
- package/src/assets/images/onboarding/meet-pareto-partner.webp +0 -0
- package/src/assets/images/quality.png +0 -0
- package/src/assets/images/sprite.svg +0 -253
- package/src/assets/images/test +0 -1
- package/src/local.scss +0 -16
- package/src/stories/a/AnimatedCounter.stories.jsx +0 -34
- package/src/ui/a/AnimatedCounter/AnimatedCounter.jsx +0 -118
- package/src/ui/a/AnimatedCounter/index.js +0 -2
- package/src/ui/a/AnimatedCounter/styles.scss +0 -16
- /package/{src → tests}/Storyshots.test.js +0 -0
- /package/{config → tests}/global-setup.js +0 -0
- /package/{config → tests}/test-setup.js +0 -0
package/dist/cjs/index.js
CHANGED
|
@@ -9,7 +9,7 @@ Object.keys(_r).forEach(function (key) {
|
|
|
9
9
|
if (key in exports && exports[key] === _r[key]) return;
|
|
10
10
|
Object.defineProperty(exports, key, {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function
|
|
12
|
+
get: function () {
|
|
13
13
|
return _r[key];
|
|
14
14
|
}
|
|
15
15
|
});
|
|
@@ -20,7 +20,7 @@ Object.keys(_a).forEach(function (key) {
|
|
|
20
20
|
if (key in exports && exports[key] === _a[key]) return;
|
|
21
21
|
Object.defineProperty(exports, key, {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function
|
|
23
|
+
get: function () {
|
|
24
24
|
return _a[key];
|
|
25
25
|
}
|
|
26
26
|
});
|
|
@@ -31,7 +31,7 @@ Object.keys(_b).forEach(function (key) {
|
|
|
31
31
|
if (key in exports && exports[key] === _b[key]) return;
|
|
32
32
|
Object.defineProperty(exports, key, {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function
|
|
34
|
+
get: function () {
|
|
35
35
|
return _b[key];
|
|
36
36
|
}
|
|
37
37
|
});
|
|
@@ -42,7 +42,7 @@ Object.keys(_c).forEach(function (key) {
|
|
|
42
42
|
if (key in exports && exports[key] === _c[key]) return;
|
|
43
43
|
Object.defineProperty(exports, key, {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function
|
|
45
|
+
get: function () {
|
|
46
46
|
return _c[key];
|
|
47
47
|
}
|
|
48
48
|
});
|
|
@@ -53,7 +53,7 @@ Object.keys(_d).forEach(function (key) {
|
|
|
53
53
|
if (key in exports && exports[key] === _d[key]) return;
|
|
54
54
|
Object.defineProperty(exports, key, {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function
|
|
56
|
+
get: function () {
|
|
57
57
|
return _d[key];
|
|
58
58
|
}
|
|
59
59
|
});
|
|
@@ -64,7 +64,7 @@ Object.keys(_f).forEach(function (key) {
|
|
|
64
64
|
if (key in exports && exports[key] === _f[key]) return;
|
|
65
65
|
Object.defineProperty(exports, key, {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function
|
|
67
|
+
get: function () {
|
|
68
68
|
return _f[key];
|
|
69
69
|
}
|
|
70
70
|
});
|
|
@@ -75,7 +75,7 @@ Object.keys(_utils).forEach(function (key) {
|
|
|
75
75
|
if (key in exports && exports[key] === _utils[key]) return;
|
|
76
76
|
Object.defineProperty(exports, key, {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function
|
|
78
|
+
get: function () {
|
|
79
79
|
return _utils[key];
|
|
80
80
|
}
|
|
81
81
|
});
|
|
@@ -86,7 +86,7 @@ Object.keys(_test).forEach(function (key) {
|
|
|
86
86
|
if (key in exports && exports[key] === _test[key]) return;
|
|
87
87
|
Object.defineProperty(exports, key, {
|
|
88
88
|
enumerable: true,
|
|
89
|
-
get: function
|
|
89
|
+
get: function () {
|
|
90
90
|
return _test[key];
|
|
91
91
|
}
|
|
92
92
|
});
|
|
@@ -8,30 +8,27 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _reactRouterDom = require("react-router-dom");
|
|
10
10
|
var _common = require("../common");
|
|
11
|
-
var _excluded = ["isPrivate"];
|
|
12
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
14
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
16
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
15
|
/* eslint-disable react/no-children-prop */
|
|
19
16
|
/**
|
|
20
17
|
* **Dependencies : `react-router-dom.Router`,**
|
|
21
18
|
* **`SessionContextProvider` in case you're using PrivateRoutes. **
|
|
22
19
|
* `SwitchRouteMap` generates a routing `Switch` from an array of route Props
|
|
23
20
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
const SwitchRouteMap = _ref => {
|
|
22
|
+
let {
|
|
26
23
|
routes,
|
|
27
24
|
NotFound
|
|
28
25
|
} = _ref;
|
|
29
26
|
return /*#__PURE__*/React.createElement(_reactRouterDom.Switch, {
|
|
30
27
|
children: [...routes.map(_ref2 => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
let {
|
|
29
|
+
isPrivate,
|
|
30
|
+
...routeProps
|
|
31
|
+
} = _ref2;
|
|
35
32
|
return isPrivate ? /*#__PURE__*/React.createElement(_common.PrivateRoute, _extends({
|
|
36
33
|
key: routeProps.path
|
|
37
34
|
}, routeProps)) : /*#__PURE__*/React.createElement(_reactRouterDom.Route, _extends({
|
|
@@ -7,15 +7,12 @@ exports.default = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _reactRouterDom = require("react-router-dom");
|
|
10
|
-
var _excluded = ["component", "render", "test"];
|
|
11
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
13
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
14
|
// import { SessionContext } from '..'
|
|
18
|
-
|
|
15
|
+
const SessionContext = /*#__PURE__*/React.createContext({});
|
|
19
16
|
|
|
20
17
|
// Package-level Imports
|
|
21
18
|
// import styleNames from 'style_names.scss'
|
|
@@ -30,23 +27,23 @@ var SessionContext = /*#__PURE__*/React.createContext({});
|
|
|
30
27
|
* Please remember this is a front-end test, and is not equivalent to back-end permission checks.
|
|
31
28
|
* This component is meant to be used alongside back-end checks.
|
|
32
29
|
*/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
const PrivateRoute = _ref => {
|
|
31
|
+
let {
|
|
32
|
+
component: Component,
|
|
33
|
+
render,
|
|
34
|
+
test,
|
|
35
|
+
...rest
|
|
36
|
+
} = _ref;
|
|
37
|
+
const {
|
|
41
38
|
currentUserData: currentUser,
|
|
42
39
|
loginPath
|
|
43
40
|
} = (0, React.useContext)(SessionContext);
|
|
44
|
-
|
|
41
|
+
const location = (0, _reactRouterDom.useLocation)();
|
|
45
42
|
// console.log(me)
|
|
46
43
|
|
|
47
|
-
|
|
44
|
+
const isUserAllowed = currentUser && test(currentUser);
|
|
48
45
|
return /*#__PURE__*/React.createElement(_reactRouterDom.Route, _extends({}, rest, {
|
|
49
|
-
render: props => isUserAllowed ? (
|
|
46
|
+
render: props => isUserAllowed ? render?.(props) || /*#__PURE__*/React.createElement(Component, props) : /*#__PURE__*/React.createElement(_reactRouterDom.Redirect, {
|
|
50
47
|
to: {
|
|
51
48
|
pathname: loginPath,
|
|
52
49
|
state: {
|
package/dist/cjs/r/index.js
CHANGED
|
@@ -8,7 +8,7 @@ var _exportNames = {
|
|
|
8
8
|
};
|
|
9
9
|
Object.defineProperty(exports, "SwitchRouteMap", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function
|
|
11
|
+
get: function () {
|
|
12
12
|
return _SwitchRouteMap.SwitchRouteMap;
|
|
13
13
|
}
|
|
14
14
|
});
|
|
@@ -19,7 +19,7 @@ Object.keys(_common).forEach(function (key) {
|
|
|
19
19
|
if (key in exports && exports[key] === _common[key]) return;
|
|
20
20
|
Object.defineProperty(exports, key, {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function
|
|
22
|
+
get: function () {
|
|
23
23
|
return _common[key];
|
|
24
24
|
}
|
|
25
25
|
});
|
|
@@ -8,15 +8,15 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _reactRelay = require("react-relay");
|
|
9
9
|
var _common = require("./common");
|
|
10
10
|
var _QueryLoaderHelloQuery;
|
|
11
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
-
|
|
13
|
+
const testQuery = _QueryLoaderHelloQuery !== void 0 ? _QueryLoaderHelloQuery : (_QueryLoaderHelloQuery = require("./__generated__/QueryLoaderHelloQuery.graphql"), _QueryLoaderHelloQuery.hash && _QueryLoaderHelloQuery.hash !== "b92d001ab0208bd484a99f77c274d5ef" && console.error("The definition of 'QueryLoaderHelloQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _QueryLoaderHelloQuery);
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* This is the component description.
|
|
17
17
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const QueryLoader = () => {
|
|
19
|
+
const [queryReference, loadQuery] = (0, _reactRelay.useQueryLoader)(testQuery);
|
|
20
20
|
(0, React.useEffect)(() => {
|
|
21
21
|
loadQuery({});
|
|
22
22
|
}, []);
|
|
@@ -8,20 +8,20 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _reactRelay = require("react-relay");
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
13
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* This is the component description.
|
|
17
17
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const PreloadedTestData = _ref => {
|
|
19
|
+
let {
|
|
20
20
|
query,
|
|
21
21
|
queryReference
|
|
22
22
|
// ...otherProps
|
|
23
23
|
} = _ref;
|
|
24
|
-
|
|
24
|
+
const data = (0, _reactRelay.usePreloadedQuery)(query, queryReference);
|
|
25
25
|
return /*#__PURE__*/React.createElement("pre", null, JSON.stringify(data, null, 2));
|
|
26
26
|
};
|
|
27
27
|
PreloadedTestData.propTypes = {
|
package/dist/cjs/test/index.js
CHANGED
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "useDynamicPosition", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _useDynamicPosition.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "useWindowSize", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _useWindowSize.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
@@ -8,9 +8,9 @@ var _react = require("react");
|
|
|
8
8
|
var _throttle = _interopRequireDefault(require("lodash/throttle"));
|
|
9
9
|
var _useWindowSize = _interopRequireDefault(require("./useWindowSize"));
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
const verticalPositions = ['top', 'bottom'];
|
|
12
|
+
const horizontalPositions = ['left', 'right'];
|
|
13
|
+
const findCompatiblePositions = (primary, secondaryArray) => {
|
|
14
14
|
if (verticalPositions.includes(primary)) {
|
|
15
15
|
return secondaryArray.filter(secondary => horizontalPositions.includes(secondary));
|
|
16
16
|
}
|
|
@@ -19,8 +19,8 @@ var findCompatiblePositions = (primary, secondaryArray) => {
|
|
|
19
19
|
}
|
|
20
20
|
return [];
|
|
21
21
|
};
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const useDynamicPosition = _ref => {
|
|
23
|
+
let {
|
|
24
24
|
elementRef,
|
|
25
25
|
parentRef,
|
|
26
26
|
preferredPrimaryOrder,
|
|
@@ -29,44 +29,44 @@ var useDynamicPosition = _ref => {
|
|
|
29
29
|
offsetXPx,
|
|
30
30
|
throttleMs = 200
|
|
31
31
|
} = _ref;
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const isClient = typeof window === 'object';
|
|
33
|
+
const {
|
|
34
34
|
height: currentHeight,
|
|
35
35
|
width: currentWidth
|
|
36
36
|
} = (0, _useWindowSize.default)();
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
const [primaryPosition, setPrimaryPosition] = (0, _react.useState)(preferredPrimaryOrder[0]);
|
|
38
|
+
const compatibleSecondaryPositions = (0, _react.useMemo)(() => findCompatiblePositions(primaryPosition, preferredSecondaryOrder), [primaryPosition, preferredSecondaryOrder]);
|
|
39
|
+
const [secondaryPosition, setSecondaryPosition] = (0, _react.useState)(compatibleSecondaryPositions[0]);
|
|
40
|
+
const handle = (0, _react.useCallback)((0, _throttle.default)(() => {
|
|
41
|
+
const parentNode = parentRef?.current;
|
|
42
|
+
const elementNode = elementRef?.current;
|
|
43
|
+
const {
|
|
44
44
|
top: parentTop,
|
|
45
45
|
bottom: parentBottom,
|
|
46
46
|
right: parentRight,
|
|
47
47
|
left: parentLeft
|
|
48
|
-
} =
|
|
49
|
-
|
|
48
|
+
} = parentNode?.getBoundingClientRect() || {};
|
|
49
|
+
const {
|
|
50
50
|
width: elementWidth,
|
|
51
51
|
height: elementHeight
|
|
52
|
-
} =
|
|
53
|
-
|
|
52
|
+
} = elementNode?.getBoundingClientRect() || {};
|
|
53
|
+
const availablePositions = {
|
|
54
54
|
top: parentTop >= elementHeight,
|
|
55
55
|
bottom: currentHeight - parentBottom >= elementHeight,
|
|
56
56
|
right: parentRight >= elementWidth,
|
|
57
57
|
left: currentWidth - parentLeft >= elementWidth
|
|
58
58
|
};
|
|
59
|
-
for (
|
|
60
|
-
|
|
59
|
+
for (let i = 0; i < preferredPrimaryOrder.length; i += 1) {
|
|
60
|
+
const position = preferredPrimaryOrder[i];
|
|
61
61
|
if (availablePositions[position]) {
|
|
62
62
|
setPrimaryPosition(position);
|
|
63
63
|
break;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
for (
|
|
67
|
-
|
|
68
|
-
if (availablePositions[
|
|
69
|
-
setSecondaryPosition(
|
|
66
|
+
for (let i = 0; i < compatibleSecondaryPositions.length; i += 1) {
|
|
67
|
+
const position = compatibleSecondaryPositions[i];
|
|
68
|
+
if (availablePositions[position]) {
|
|
69
|
+
setSecondaryPosition(position);
|
|
70
70
|
break;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -7,15 +7,15 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
const useWindowSize = function () {
|
|
11
|
+
let debounceMs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 700;
|
|
12
|
+
const isClient = typeof window === 'object';
|
|
13
|
+
const getSize = () => ({
|
|
14
14
|
width: isClient ? window.innerWidth : undefined,
|
|
15
15
|
height: isClient ? window.innerHeight : undefined
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const [windowSize, setWindowSize] = (0, _react.useState)(getSize);
|
|
18
|
+
const handle = (0, _react.useCallback)((0, _debounce.default)(() => {
|
|
19
19
|
setWindowSize(getSize());
|
|
20
20
|
}, debounceMs));
|
|
21
21
|
(0, _react.useEffect)(() => {
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "useDynamicPosition", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _hooks.useDynamicPosition;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "useWindowSize", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _hooks.useWindowSize;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
@@ -22,14 +22,13 @@ const reducer = (state, action) => {
|
|
|
22
22
|
return state;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const AppContextProvider =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} = _ref;
|
|
25
|
+
const AppContextProvider = ({
|
|
26
|
+
children,
|
|
27
|
+
initialTheme,
|
|
28
|
+
config,
|
|
29
|
+
initialState
|
|
30
|
+
// ...otherProps
|
|
31
|
+
}) => {
|
|
33
32
|
const theme = useTheme(initialTheme);
|
|
34
33
|
const [state, dispatch] = useReducer(reducer, initialState);
|
|
35
34
|
return /*#__PURE__*/React.createElement(Context.Provider, {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useCallback, useState, useEffect } from 'react';
|
|
2
|
-
export default (
|
|
3
|
-
let storageKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'theme';
|
|
2
|
+
export default ((initialTheme, storageKey = 'theme') => {
|
|
4
3
|
const isClient = typeof window === 'object';
|
|
5
4
|
const [preferredTheme, setPreferredTheme] = useState(initialTheme);
|
|
6
5
|
const [userTheme, setUserTheme] = useState();
|
|
@@ -12,15 +12,14 @@ const componentClassName = 'content-tree';
|
|
|
12
12
|
/**
|
|
13
13
|
* This is the component description.
|
|
14
14
|
*/
|
|
15
|
-
const ContentTree =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} = _ref;
|
|
15
|
+
const ContentTree = ({
|
|
16
|
+
id,
|
|
17
|
+
className: userClassName,
|
|
18
|
+
style,
|
|
19
|
+
target,
|
|
20
|
+
selectors
|
|
21
|
+
// ...otherProps
|
|
22
|
+
}) => {
|
|
24
23
|
useLayoutEffect(() => {
|
|
25
24
|
import("./styles.scss");
|
|
26
25
|
}, []);
|
|
@@ -13,15 +13,14 @@ const componentClassName = 'tree';
|
|
|
13
13
|
/**
|
|
14
14
|
* This is the component description.
|
|
15
15
|
*/
|
|
16
|
-
const Tree =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} = _ref;
|
|
16
|
+
const Tree = ({
|
|
17
|
+
id,
|
|
18
|
+
className: userClassName,
|
|
19
|
+
style,
|
|
20
|
+
tree,
|
|
21
|
+
displayDepth
|
|
22
|
+
// ...otherProps
|
|
23
|
+
}) => {
|
|
25
24
|
// The nodeIds to be used to get the first visible node
|
|
26
25
|
const [nodeIds, setNodeIds] = useState([]);
|
|
27
26
|
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
|
|
2
3
|
@use "@pareto-engineering/bem";
|
|
3
4
|
|
|
4
5
|
$default-margin: 1em;
|
|
5
6
|
$default-padding: 1em;
|
|
6
7
|
|
|
7
|
-
.#{bem.$base}.content-tree{
|
|
8
|
+
.#{bem.$base}.content-tree {
|
|
9
|
+
ul {
|
|
10
|
+
list-style: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.#{bem.$base}.tree {
|
|
14
|
+
padding: 0;
|
|
15
|
+
position: sticky;
|
|
16
|
+
top: 0;
|
|
8
17
|
|
|
9
|
-
|
|
10
|
-
|
|
18
|
+
.#{bem.$modifier-active} {
|
|
19
|
+
color: var(--main2);
|
|
20
|
+
transition: color .2s;
|
|
11
21
|
}
|
|
12
22
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
}
|
|
23
|
+
li:not(:last-child) {
|
|
24
|
+
margin-bottom: $default-margin;
|
|
25
|
+
|
|
26
|
+
ul {
|
|
27
|
+
padding-left: $default-padding;
|
|
28
|
+
}
|
|
29
29
|
}
|
|
30
|
+
}
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
|
|
33
|
-
|
|
@@ -14,18 +14,17 @@ const componentClassName = 'conversation';
|
|
|
14
14
|
/**
|
|
15
15
|
* This is the component description.
|
|
16
16
|
*/
|
|
17
|
-
const Conversation =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} = _ref;
|
|
17
|
+
const Conversation = ({
|
|
18
|
+
id,
|
|
19
|
+
className: userClassName,
|
|
20
|
+
style,
|
|
21
|
+
backgroundColor,
|
|
22
|
+
ourColor,
|
|
23
|
+
theirColor,
|
|
24
|
+
children,
|
|
25
|
+
hasTriangle
|
|
26
|
+
// ...otherProps
|
|
27
|
+
}) => {
|
|
29
28
|
useLayoutEffect(() => {
|
|
30
29
|
import("./styles.scss");
|
|
31
30
|
}, []);
|