@pareto-engineering/design-system 2.0.0-alpha.6 → 2.0.0-alpha.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.scripts.example +4 -0
- package/.eslintrc.js +25 -1
- package/babel.config.js +1 -0
- package/dist/cjs/a/Alert/Alert.js +141 -0
- package/dist/cjs/a/Alert/index.js +15 -0
- package/dist/cjs/a/Alert/styles.scss +74 -0
- package/dist/cjs/a/AppContext/Context.js +16 -0
- package/dist/cjs/a/AppContext/ContextProvider.js +96 -0
- package/dist/cjs/a/AppContext/index.js +39 -0
- package/dist/cjs/a/AppContext/useApp.js +16 -0
- package/dist/cjs/a/AppContext/useTheme.js +45 -0
- package/dist/cjs/a/BackgroundGradient/BackgroundGradient.js +77 -0
- package/dist/cjs/a/BackgroundGradient/index.js +15 -0
- package/dist/cjs/a/BackgroundGradient/styles.scss +16 -0
- package/dist/cjs/a/ContentTree/ContentTree.js +83 -0
- package/dist/cjs/a/ContentTree/common/Tree/Tree.js +116 -0
- package/dist/cjs/a/ContentTree/common/Tree/index.js +15 -0
- package/dist/cjs/a/ContentTree/common/index.js +31 -0
- package/dist/cjs/a/ContentTree/common/useContentTree.js +82 -0
- package/dist/cjs/a/ContentTree/common/useFirstVisibleNode.js +65 -0
- package/dist/cjs/a/ContentTree/index.js +15 -0
- package/dist/cjs/a/ContentTree/styles.scss +33 -0
- package/dist/cjs/a/Conversation/Conversation.js +14 -8
- package/dist/cjs/a/Conversation/common/Message/Message.js +32 -6
- package/dist/cjs/a/Conversation/styles.scss +132 -33
- package/dist/cjs/a/OvalIllustration/OvalIllustration.js +133 -0
- package/dist/cjs/a/OvalIllustration/index.js +15 -0
- package/dist/cjs/a/OvalIllustration/styles.scss +102 -0
- package/dist/cjs/a/Popover/Popover.js +134 -0
- package/dist/cjs/a/Popover/common/Divider/Divider.js +67 -0
- package/dist/cjs/a/Popover/common/Divider/index.js +15 -0
- package/dist/cjs/a/Popover/common/Item/Item.js +67 -0
- package/dist/cjs/a/Popover/common/Item/index.js +15 -0
- package/dist/cjs/a/Popover/common/index.js +21 -0
- package/dist/cjs/a/Popover/index.js +15 -0
- package/dist/cjs/a/Popover/styles.scss +33 -0
- package/dist/cjs/a/Shapes/Shapes.js +9 -1
- package/dist/cjs/a/Shapes/styles.scss +42 -9
- package/dist/cjs/a/SnapScroller/SnapScroller.js +77 -0
- package/dist/cjs/a/SnapScroller/index.js +15 -0
- package/dist/cjs/a/SnapScroller/styles.scss +38 -0
- package/dist/cjs/a/index.js +57 -9
- package/dist/cjs/b/Button/Button.js +10 -4
- package/dist/cjs/b/Button/styles.scss +55 -10
- package/dist/cjs/b/Logo/Logo.js +41 -41
- package/dist/cjs/b/Logo/styles.scss +0 -138
- package/dist/cjs/b/Page/common/PageHelmet/PageHelmet.js +1 -1
- package/dist/cjs/b/Page/common/Section/Section.js +17 -3
- package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +4 -4
- package/dist/cjs/b/ThemeSelector/ThemeSelector.js +1 -1
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +16 -9
- package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- package/dist/cjs/c/ContentSlides/styles.scss +10 -4
- package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +111 -0
- package/dist/cjs/c/SocialMediaShareButton/index.js +15 -0
- package/dist/cjs/c/SocialMediaShareButton/styles.scss +39 -0
- package/dist/cjs/c/index.js +9 -1
- package/dist/cjs/f/FormInput/FormInput.js +26 -3
- package/dist/cjs/f/FormInput/styles.scss +11 -0
- package/dist/cjs/f/common/Debugger/Debugger.js +1 -1
- package/dist/cjs/f/common/Description/Description.js +20 -14
- package/dist/cjs/f/common/Label/Label.js +1 -1
- package/dist/cjs/f/common/Label/styles.scss +1 -1
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +2 -2
- package/dist/cjs/f/fields/ChoicesInput/common/Choice/Choice.js +5 -2
- package/dist/cjs/f/fields/ChoicesInput/styles.scss +17 -2
- package/dist/cjs/f/fields/IntlTelInput/IntlTelInput.js +170 -0
- package/dist/cjs/f/fields/IntlTelInput/index.js +15 -0
- package/dist/cjs/f/fields/IntlTelInput/styles.scss +37 -0
- package/dist/cjs/f/fields/PhoneIntlTelInput/PhoneIntlTelInput.js +180 -0
- package/dist/cjs/f/fields/PhoneIntlTelInput/index.js +15 -0
- package/dist/cjs/f/fields/PhoneIntlTelInput/styles.scss +43 -0
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +235 -0
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +208 -0
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/index.js +15 -0
- package/dist/cjs/f/fields/QueryCombobox/common/Menu/Menu.js +103 -0
- package/dist/cjs/f/fields/QueryCombobox/common/Menu/index.js +15 -0
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +307 -0
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/index.js +15 -0
- package/dist/cjs/f/fields/QueryCombobox/common/index.js +29 -0
- package/dist/cjs/f/fields/QueryCombobox/index.js +15 -0
- package/dist/cjs/f/fields/QueryCombobox/styles.scss +90 -0
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +201 -0
- package/dist/cjs/f/fields/QuerySelect/index.js +15 -0
- package/dist/cjs/f/fields/QuerySelect/styles.scss +21 -0
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +39 -6
- package/dist/cjs/f/fields/RatingsInput/styles.scss +29 -20
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +59 -14
- package/dist/cjs/f/fields/SelectInput/styles.scss +33 -13
- package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
- package/dist/cjs/f/fields/TextInput/TextInput.js +50 -13
- package/dist/cjs/f/fields/TextInput/styles.scss +16 -7
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +41 -15
- package/dist/cjs/f/fields/TextareaInput/styles.scss +19 -6
- package/dist/cjs/f/fields/index.js +15 -23
- package/dist/cjs/form-reset.scss +1 -1
- package/dist/cjs/index.js +26 -0
- package/dist/cjs/test/QueryLoader/QueryLoader.js +41 -0
- package/dist/cjs/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +71 -0
- package/dist/cjs/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +49 -0
- package/dist/cjs/test/QueryLoader/common/PreloadedTestData/index.js +15 -0
- package/dist/cjs/test/QueryLoader/common/index.js +13 -0
- package/dist/cjs/test/QueryLoader/index.js +15 -0
- package/dist/cjs/test/QueryLoader/styles.scss +9 -0
- package/dist/cjs/test/index.js +13 -0
- package/dist/cjs/utils/hooks/index.js +23 -0
- package/dist/cjs/utils/hooks/useDynamicPosition.js +107 -0
- package/dist/cjs/utils/hooks/useWindowSize.js +39 -0
- package/dist/cjs/utils/index.js +19 -0
- package/dist/es/a/Alert/Alert.js +118 -0
- package/dist/es/a/Alert/index.js +2 -0
- package/dist/es/a/Alert/styles.scss +74 -0
- package/dist/es/a/AppContext/Context.js +2 -0
- package/dist/es/a/AppContext/ContextProvider.js +78 -0
- package/dist/es/a/AppContext/index.js +5 -0
- package/dist/es/a/AppContext/useApp.js +3 -0
- package/dist/es/a/AppContext/useTheme.js +34 -0
- package/dist/es/a/BackgroundGradient/BackgroundGradient.js +55 -0
- package/dist/es/a/BackgroundGradient/index.js +2 -0
- package/dist/es/a/BackgroundGradient/styles.scss +16 -0
- package/dist/es/a/ContentTree/ContentTree.js +67 -0
- package/dist/es/a/ContentTree/common/Tree/Tree.js +98 -0
- package/dist/es/a/ContentTree/common/Tree/index.js +2 -0
- package/dist/es/a/ContentTree/common/index.js +3 -0
- package/dist/es/a/ContentTree/common/useContentTree.js +74 -0
- package/dist/es/a/ContentTree/common/useFirstVisibleNode.js +54 -0
- package/dist/es/a/ContentTree/index.js +2 -0
- package/dist/es/a/ContentTree/styles.scss +33 -0
- package/dist/es/a/Conversation/Conversation.js +14 -8
- package/dist/es/a/Conversation/common/Message/Message.js +32 -6
- package/dist/es/a/Conversation/styles.scss +132 -33
- package/dist/es/a/OvalIllustration/OvalIllustration.js +111 -0
- package/dist/es/a/OvalIllustration/index.js +2 -0
- package/dist/es/a/OvalIllustration/styles.scss +102 -0
- package/dist/es/a/Popover/Popover.js +118 -0
- package/dist/es/a/Popover/common/Divider/Divider.js +47 -0
- package/dist/es/a/Popover/common/Divider/index.js +2 -0
- package/dist/es/a/Popover/common/Item/Item.js +47 -0
- package/dist/es/a/Popover/common/Item/index.js +2 -0
- package/dist/es/a/Popover/common/index.js +2 -0
- package/dist/es/a/Popover/index.js +2 -0
- package/dist/es/a/Popover/styles.scss +33 -0
- package/dist/es/a/Shapes/Shapes.js +9 -1
- package/dist/es/a/Shapes/styles.scss +42 -9
- package/dist/es/a/SnapScroller/SnapScroller.js +61 -0
- package/dist/es/a/SnapScroller/index.js +2 -0
- package/dist/es/a/SnapScroller/styles.scss +38 -0
- package/dist/es/a/index.js +8 -2
- package/dist/es/b/Button/Button.js +8 -2
- package/dist/es/b/Button/styles.scss +55 -10
- package/dist/es/b/Logo/Logo.js +41 -41
- package/dist/es/b/Logo/styles.scss +0 -138
- package/dist/es/b/Page/common/PageHelmet/PageHelmet.js +2 -2
- package/dist/es/b/Page/common/Section/Section.js +17 -3
- package/dist/es/b/SocialMediaButton/SocialMediaButton.js +5 -5
- package/dist/es/b/ThemeSelector/ThemeSelector.js +2 -2
- package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +16 -9
- package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- package/dist/es/c/ContentSlides/styles.scss +10 -4
- package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +95 -0
- package/dist/es/c/SocialMediaShareButton/index.js +2 -0
- package/dist/es/c/SocialMediaShareButton/styles.scss +39 -0
- package/dist/es/c/index.js +2 -1
- package/dist/es/f/FormInput/FormInput.js +26 -3
- package/dist/es/f/FormInput/styles.scss +11 -0
- package/dist/es/f/common/Debugger/Debugger.js +1 -1
- package/dist/es/f/common/Description/Description.js +19 -14
- package/dist/es/f/common/Label/Label.js +1 -1
- package/dist/es/f/common/Label/styles.scss +1 -1
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +2 -2
- package/dist/es/f/fields/ChoicesInput/common/Choice/Choice.js +5 -2
- package/dist/es/f/fields/ChoicesInput/styles.scss +17 -2
- package/dist/es/f/fields/IntlTelInput/IntlTelInput.js +152 -0
- package/dist/es/f/fields/IntlTelInput/index.js +2 -0
- package/dist/es/f/fields/IntlTelInput/styles.scss +37 -0
- package/dist/es/f/fields/PhoneIntlTelInput/PhoneIntlTelInput.js +163 -0
- package/dist/es/f/fields/PhoneIntlTelInput/index.js +2 -0
- package/dist/es/f/fields/PhoneIntlTelInput/styles.scss +43 -0
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +212 -0
- package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +188 -0
- package/dist/es/f/fields/QueryCombobox/common/Combobox/index.js +2 -0
- package/dist/es/f/fields/QueryCombobox/common/Menu/Menu.js +77 -0
- package/dist/es/f/fields/QueryCombobox/common/Menu/index.js +2 -0
- package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +279 -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 +90 -0
- package/dist/es/f/fields/QuerySelect/QuerySelect.js +179 -0
- package/dist/es/f/fields/QuerySelect/index.js +2 -0
- package/dist/es/f/fields/QuerySelect/styles.scss +21 -0
- package/dist/es/f/fields/RatingsInput/RatingsInput.js +38 -6
- package/dist/es/f/fields/RatingsInput/styles.scss +29 -20
- package/dist/es/f/fields/SelectInput/SelectInput.js +58 -14
- package/dist/es/f/fields/SelectInput/styles.scss +33 -13
- package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
- package/dist/es/f/fields/TextInput/TextInput.js +50 -13
- package/dist/es/f/fields/TextInput/styles.scss +16 -7
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +41 -15
- package/dist/es/f/fields/TextareaInput/styles.scss +19 -6
- package/dist/es/f/fields/index.js +3 -4
- package/dist/es/form-reset.scss +1 -1
- package/dist/es/index.js +3 -1
- package/dist/es/test/QueryLoader/QueryLoader.js +29 -0
- package/dist/es/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +71 -0
- package/dist/es/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +31 -0
- package/dist/es/test/QueryLoader/common/PreloadedTestData/index.js +2 -0
- package/dist/es/test/QueryLoader/common/index.js +1 -0
- package/dist/es/test/QueryLoader/index.js +2 -0
- package/dist/es/test/QueryLoader/styles.scss +9 -0
- package/dist/es/test/index.js +1 -0
- package/dist/es/utils/hooks/index.js +2 -0
- package/dist/es/utils/hooks/useDynamicPosition.js +93 -0
- package/dist/es/utils/hooks/useWindowSize.js +27 -0
- package/dist/es/utils/index.js +1 -0
- package/package.json +18 -4
- package/relay.config.js +12 -0
- package/schema.graphql +4075 -0
- package/scripts/fetchSchema.js +74 -0
- package/src/__snapshots__/Storyshots.test.js.snap +10152 -5495
- package/src/local.scss +4 -2
- package/src/stories/StyleGuide/Sprites.stories.mdx +25 -0
- package/src/stories/StyleGuide/helpers.js +16 -0
- package/src/stories/a/Alert.stories.jsx +75 -0
- package/src/stories/a/{SiteContext.stories.jsx → AppContext.stories.jsx} +8 -8
- package/src/stories/a/BackgroundGradient.stories.jsx +38 -0
- package/src/stories/a/ContentTree.stories.jsx +662 -0
- package/src/stories/a/Conversation.stories.jsx +78 -1
- package/src/stories/a/DotInfo.stories.jsx +14 -13
- package/src/stories/a/OvalIllustration.stories.jsx +59 -0
- package/src/stories/a/Popover.stories.jsx +106 -0
- package/src/stories/a/ProgressBar.stories.jsx +16 -7
- package/src/stories/a/Shapes.stories.jsx +18 -0
- package/src/stories/a/SnapScroller.stories.jsx +98 -0
- package/src/stories/a/Timestamp.stories.jsx +35 -39
- package/src/stories/b/Button.stories.jsx +27 -4
- package/src/stories/b/Logo.stories.jsx +23 -14
- package/src/stories/b/Page.stories.jsx +25 -1
- package/src/stories/b/QuestionDropdown.stories.jsx +20 -30
- package/src/stories/b/SocialMediaButton.stories.jsx +36 -53
- package/src/stories/b/ThemeSelector.stories.jsx +5 -5
- package/src/stories/b/Title.stories.jsx +13 -15
- package/src/stories/c/ContentSlides.stories.jsx +35 -151
- package/src/stories/c/Shortener.stories.jsx +9 -3
- package/src/stories/c/SocialMediaShareButton.stories.jsx +33 -0
- package/src/stories/f/ChoicesInput.stories.jsx +91 -129
- package/src/stories/f/Description.stories.jsx +22 -4
- package/src/stories/f/FormInput.stories.jsx +259 -0
- package/src/stories/f/QueryCombobox.stories.jsx +273 -0
- package/src/stories/f/QuerySelect.stories.jsx +135 -0
- package/src/stories/f/RatingsInput.stories.jsx +29 -22
- package/src/stories/f/SelectInput.stories.jsx +41 -49
- package/src/stories/f/TextInput.stories.jsx +63 -43
- package/src/stories/f/TextareaInput.stories.jsx +63 -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__/QueryComboboxAllTeamsQuery.graphql.js +139 -0
- package/src/stories/f/__generated__/QuerySelectAllTaskStatusesQuery.graphql.js +122 -0
- package/src/stories/test/QueryLoader.stories.jsx +36 -0
- package/src/stories/utils/generateNodeId.js +12 -0
- package/src/stories/utils/lorem.js +15 -0
- package/src/stories/utils/relay/EnvironmentProvider.jsx +14 -0
- package/src/stories/utils/relay/environment.js +5 -0
- package/src/stories/utils/relay/index.js +4 -0
- package/src/stories/utils/relay/mockRelayOperation.js +14 -0
- package/src/stories/utils/relay/mockResolvers.js +299 -0
- package/src/stories/utils/testData.js +63 -0
- package/src/ui/a/Alert/Alert.jsx +144 -0
- package/src/ui/a/Alert/index.js +2 -0
- package/src/ui/a/Alert/styles.scss +74 -0
- package/src/ui/a/{SiteContext → AppContext}/Context.js +0 -0
- package/src/ui/a/{SiteContext → AppContext}/ContextProvider.jsx +8 -7
- package/src/ui/a/AppContext/index.js +5 -0
- package/src/ui/a/{SiteContext/useSite.js → AppContext/useApp.js} +0 -0
- package/src/ui/a/{SiteContext → AppContext}/useTheme.js +0 -0
- package/src/ui/a/BackgroundGradient/BackgroundGradient.jsx +76 -0
- package/src/ui/a/BackgroundGradient/index.js +2 -0
- package/src/ui/a/BackgroundGradient/styles.scss +16 -0
- package/src/ui/a/ContentTree/ContentTree.jsx +88 -0
- package/src/ui/a/ContentTree/common/Tree/Tree.jsx +138 -0
- package/src/ui/a/ContentTree/common/Tree/index.js +2 -0
- package/src/ui/a/ContentTree/common/index.js +3 -0
- package/src/ui/a/ContentTree/common/useContentTree.js +83 -0
- package/src/ui/a/ContentTree/common/useFirstVisibleNode.js +59 -0
- package/src/ui/a/ContentTree/index.js +2 -0
- package/src/ui/a/ContentTree/styles.scss +33 -0
- package/src/ui/a/Conversation/Conversation.jsx +15 -7
- package/src/ui/a/Conversation/common/Message/Message.jsx +38 -6
- package/src/ui/a/Conversation/styles.scss +132 -33
- package/src/ui/a/OvalIllustration/OvalIllustration.jsx +134 -0
- package/src/ui/a/OvalIllustration/index.js +2 -0
- package/src/ui/a/OvalIllustration/styles.scss +102 -0
- package/src/ui/a/Popover/Popover.jsx +157 -0
- package/src/ui/a/Popover/index.js +2 -0
- package/src/ui/a/Popover/styles.scss +33 -0
- package/src/ui/a/Shapes/Shapes.jsx +10 -0
- package/src/ui/a/Shapes/styles.scss +42 -9
- package/src/ui/a/SnapScroller/SnapScroller.jsx +83 -0
- package/src/ui/a/SnapScroller/index.js +2 -0
- package/src/ui/a/SnapScroller/styles.scss +38 -0
- package/src/ui/a/index.js +10 -4
- package/src/ui/b/Button/Button.jsx +9 -1
- package/src/ui/b/Button/styles.scss +55 -10
- package/src/ui/b/Logo/Logo.jsx +41 -41
- package/src/ui/b/Logo/styles.scss +0 -138
- package/src/ui/b/Page/common/PageHelmet/PageHelmet.jsx +2 -2
- package/src/ui/b/Page/common/Section/Section.jsx +19 -2
- package/src/ui/b/SocialMediaButton/SocialMediaButton.jsx +4 -4
- package/src/ui/b/ThemeSelector/ThemeSelector.jsx +2 -2
- package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +12 -5
- package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +3 -2
- package/src/ui/c/ContentSlides/styles.scss +10 -4
- package/src/ui/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 +1 -0
- package/src/ui/f/FormInput/FormInput.jsx +38 -1
- package/src/ui/f/FormInput/styles.scss +11 -0
- package/src/ui/f/common/Debugger/Debugger.jsx +1 -1
- package/src/ui/f/common/Description/Description.jsx +34 -29
- package/src/ui/f/common/Label/Label.jsx +1 -1
- package/src/ui/f/common/Label/styles.scss +1 -1
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +2 -2
- package/src/ui/f/fields/ChoicesInput/common/Choice/Choice.jsx +10 -2
- package/src/ui/f/fields/ChoicesInput/styles.scss +17 -2
- package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +227 -0
- package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +218 -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 +314 -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 +90 -0
- package/src/ui/f/fields/QuerySelect/QuerySelect.jsx +200 -0
- package/src/ui/f/fields/QuerySelect/index.js +2 -0
- package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +54 -19
- package/src/ui/f/fields/RatingsInput/styles.scss +29 -20
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +66 -8
- package/src/ui/f/fields/SelectInput/styles.scss +33 -13
- package/src/ui/f/fields/TextInput/TextInput.jsx +44 -10
- package/src/ui/f/fields/TextInput/styles.scss +16 -7
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +42 -21
- package/src/ui/f/fields/TextareaInput/styles.scss +19 -6
- package/src/ui/f/fields/index.js +2 -3
- package/src/ui/form-reset.scss +1 -1
- package/src/ui/index.js +2 -0
- package/src/ui/test/QueryLoader/QueryLoader.jsx +41 -0
- package/src/ui/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +68 -0
- package/src/ui/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.jsx +51 -0
- package/src/ui/test/QueryLoader/common/PreloadedTestData/index.js +2 -0
- package/src/ui/test/QueryLoader/common/index.js +1 -0
- package/src/ui/test/QueryLoader/index.js +2 -0
- package/src/ui/test/index.js +1 -0
- package/src/ui/utils/hooks/index.js +2 -0
- package/src/ui/utils/hooks/useDynamicPosition.js +104 -0
- package/src/ui/utils/hooks/useWindowSize.js +32 -0
- package/src/ui/utils/index.js +1 -0
- package/stylelint.config.js +13 -13
- package/src/stories/f/CheckboxInput.stories.jsx +0 -37
- package/src/stories/f/RadioInput.stories.jsx +0 -37
- package/src/stories/f/TaskRecommendationInput.stories.jsx +0 -38
- package/src/ui/a/SiteContext/index.js +0 -5
- package/src/ui/f/fields/CheckboxInput/CheckboxInput.jsx +0 -107
- 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
|
@@ -7,34 +7,43 @@ $default-transition: all .2s;
|
|
|
7
7
|
|
|
8
8
|
.#{bem.$base}.ratings-input {
|
|
9
9
|
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
p {
|
|
13
|
+
padding: $default-padding;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
.stars {
|
|
16
17
|
display: flex;
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
position: absolute;
|
|
21
|
-
visibility: none;
|
|
22
|
-
z-index: -1;
|
|
19
|
+
>:not(:last-child) {
|
|
20
|
+
margin-right: $default-rating-icon-margin;
|
|
23
21
|
}
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
|
|
23
|
+
.#{bem.$base}.rating {
|
|
26
24
|
display: flex;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
|
|
26
|
+
input {
|
|
27
|
+
opacity: 0;
|
|
28
|
+
position: absolute;
|
|
29
|
+
visibility: none;
|
|
30
|
+
z-index: -1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
label {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
align-items: center;
|
|
37
|
+
padding: $default-padding;
|
|
38
|
+
transition: $default-transition;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.label-text {
|
|
44
|
+
margin-bottom: 0;
|
|
45
|
+
align-self: flex-end;
|
|
32
46
|
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.label-text {
|
|
36
|
-
margin-bottom: 0;
|
|
37
|
-
align-self: flex-end;
|
|
38
47
|
}
|
|
39
48
|
}
|
|
40
49
|
|
|
@@ -6,6 +6,7 @@ import { useLayoutEffect, memo } from 'react';
|
|
|
6
6
|
import { useField } from 'formik';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import styleNames from '@pareto-engineering/bem';
|
|
9
|
+
import { LoadingCircle } from "../../../a";
|
|
9
10
|
import { FormLabel, FormDescription } from "../../common"; // Local Definitions
|
|
10
11
|
|
|
11
12
|
const baseClassName = styleNames.base;
|
|
@@ -20,27 +21,38 @@ const SelectInput = ({
|
|
|
20
21
|
style,
|
|
21
22
|
name,
|
|
22
23
|
label,
|
|
24
|
+
color,
|
|
23
25
|
options,
|
|
24
|
-
|
|
26
|
+
validate,
|
|
27
|
+
description,
|
|
28
|
+
disabled,
|
|
29
|
+
isLoading,
|
|
30
|
+
autoComplete // ...otherProps
|
|
25
31
|
|
|
26
32
|
}) => {
|
|
27
33
|
useLayoutEffect(() => {
|
|
28
34
|
import("./styles.scss");
|
|
29
35
|
}, []);
|
|
30
|
-
const [field
|
|
36
|
+
const [field] = useField({
|
|
37
|
+
name,
|
|
38
|
+
validate
|
|
39
|
+
});
|
|
31
40
|
return /*#__PURE__*/React.createElement("div", {
|
|
32
41
|
id: id,
|
|
33
|
-
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
42
|
+
className: [baseClassName, componentClassName, userClassName, `y-${color}`].filter(e => e).join(' '),
|
|
34
43
|
style: style // {...otherProps}
|
|
35
44
|
|
|
36
45
|
}, /*#__PURE__*/React.createElement(FormLabel, {
|
|
37
|
-
className: "input-label",
|
|
38
46
|
name: name
|
|
39
|
-
}, label), /*#__PURE__*/React.createElement("
|
|
40
|
-
className: "
|
|
47
|
+
}, label), /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: "select-wrapper"
|
|
49
|
+
}, /*#__PURE__*/React.createElement("select", _extends({
|
|
50
|
+
className: "input"
|
|
41
51
|
}, field, {
|
|
52
|
+
value: field.value || '',
|
|
42
53
|
id: name,
|
|
43
|
-
disabled: disabled
|
|
54
|
+
disabled: disabled,
|
|
55
|
+
autoComplete: autoComplete
|
|
44
56
|
}), options.map(option => {
|
|
45
57
|
// i.e if option is a string like "blah", return { value: "blah", label: "blah" }
|
|
46
58
|
const newOption = typeof option === 'string' ? {
|
|
@@ -49,11 +61,16 @@ const SelectInput = ({
|
|
|
49
61
|
} : option;
|
|
50
62
|
return /*#__PURE__*/React.createElement("option", {
|
|
51
63
|
key: newOption.value,
|
|
52
|
-
value: newOption.value
|
|
64
|
+
value: newOption.value,
|
|
65
|
+
disabled: (newOption === null || newOption === void 0 ? void 0 : newOption.disabled) || false
|
|
53
66
|
}, newOption.label);
|
|
54
|
-
})),
|
|
55
|
-
|
|
56
|
-
},
|
|
67
|
+
})), isLoading && /*#__PURE__*/React.createElement(LoadingCircle, {
|
|
68
|
+
className: "x-main2"
|
|
69
|
+
})), /*#__PURE__*/React.createElement(FormDescription, {
|
|
70
|
+
className: "v50 mt-v s-1",
|
|
71
|
+
description: description,
|
|
72
|
+
name: name
|
|
73
|
+
}));
|
|
57
74
|
};
|
|
58
75
|
|
|
59
76
|
SelectInput.propTypes = {
|
|
@@ -82,20 +99,47 @@ SelectInput.propTypes = {
|
|
|
82
99
|
*/
|
|
83
100
|
label: PropTypes.string,
|
|
84
101
|
|
|
102
|
+
/**
|
|
103
|
+
* The input field validator function
|
|
104
|
+
*/
|
|
105
|
+
validate: PropTypes.func,
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The select input description
|
|
109
|
+
*/
|
|
110
|
+
description: PropTypes.string,
|
|
111
|
+
|
|
85
112
|
/**
|
|
86
113
|
* The options of the select input
|
|
87
114
|
*/
|
|
88
115
|
options: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
|
|
89
116
|
value: PropTypes.string,
|
|
90
|
-
label: PropTypes.string
|
|
117
|
+
label: PropTypes.string,
|
|
118
|
+
disabled: PropTypes.bool
|
|
91
119
|
})])),
|
|
92
120
|
|
|
93
121
|
/**
|
|
94
122
|
* Whether the select input should be disabled
|
|
95
123
|
*/
|
|
96
|
-
disabled: PropTypes.bool
|
|
124
|
+
disabled: PropTypes.bool,
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The color of the select input
|
|
128
|
+
*/
|
|
129
|
+
color: PropTypes.string,
|
|
130
|
+
|
|
131
|
+
/*
|
|
132
|
+
* Whether the query that is fetching the select options is still in flight
|
|
133
|
+
*/
|
|
134
|
+
isLoading: PropTypes.bool,
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The autoComplete value that the browser should watch for the input
|
|
138
|
+
*/
|
|
139
|
+
autoComplete: PropTypes.string
|
|
97
140
|
};
|
|
98
141
|
SelectInput.defaultProps = {
|
|
99
|
-
disabled: false
|
|
142
|
+
disabled: false,
|
|
143
|
+
color: 'background2'
|
|
100
144
|
};
|
|
101
145
|
export default /*#__PURE__*/memo(SelectInput);
|
|
@@ -5,26 +5,46 @@
|
|
|
5
5
|
@use "../../../form.scss";
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
$default-padding: 0.75em
|
|
9
|
-
|
|
8
|
+
$default-padding: 0.75em;
|
|
9
|
+
$default-margin: 1em;
|
|
10
10
|
|
|
11
11
|
.#{bem.$base}.select-input {
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-direction: column;
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
color: var(--main1);
|
|
15
|
+
.#{bem.$base}.label {
|
|
16
|
+
margin-bottom: $default-margin
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
.
|
|
21
|
-
|
|
22
|
-
color: var(--on-background1);
|
|
23
|
-
padding: $default-padding;
|
|
19
|
+
.select-wrapper {
|
|
20
|
+
position: relative;
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
>.#{bem.$base}.loading-circle {
|
|
23
|
+
position: absolute;
|
|
24
|
+
right: 0;
|
|
25
|
+
top: 50%;
|
|
26
|
+
transform: translateY(-50%);
|
|
27
27
|
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
28
|
|
|
29
|
+
>.input {
|
|
30
|
+
width: 100%;
|
|
31
|
+
border: var(--theme-border-style) var(--dark-y);
|
|
32
|
+
background: var(--light-y);
|
|
33
|
+
color: var(--on-y);
|
|
34
|
+
padding: $default-padding;
|
|
35
|
+
|
|
36
|
+
&:not(:disabled):hover {
|
|
37
|
+
border: var(--theme-border-style) var(--light-background4);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:disabled {
|
|
41
|
+
background-color: var(--dark-y);
|
|
42
|
+
appearance: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:focus {
|
|
46
|
+
background: var(--y);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -21,36 +21,46 @@ const TextInput = ({
|
|
|
21
21
|
type,
|
|
22
22
|
name,
|
|
23
23
|
label,
|
|
24
|
+
color,
|
|
25
|
+
labelColor,
|
|
24
26
|
validate,
|
|
25
27
|
oneInputLabel,
|
|
26
28
|
description,
|
|
27
|
-
disabled
|
|
29
|
+
disabled,
|
|
30
|
+
placeholder,
|
|
31
|
+
optional,
|
|
32
|
+
autoComplete // ...otherProps
|
|
28
33
|
|
|
29
34
|
}) => {
|
|
30
35
|
useLayoutEffect(() => {
|
|
31
36
|
import("./styles.scss");
|
|
32
37
|
}, []);
|
|
33
|
-
const [field
|
|
38
|
+
const [field] = useField({
|
|
34
39
|
name,
|
|
35
40
|
validate
|
|
36
41
|
});
|
|
37
42
|
return /*#__PURE__*/React.createElement("div", {
|
|
38
43
|
id: id,
|
|
39
|
-
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
44
|
+
className: [baseClassName, componentClassName, userClassName, `y-${color}`].filter(e => e).join(' '),
|
|
40
45
|
style: style // {...otherProps}
|
|
41
46
|
|
|
42
47
|
}, /*#__PURE__*/React.createElement(FormLabel, {
|
|
43
|
-
className: [
|
|
44
|
-
name: name
|
|
48
|
+
className: [oneInputLabel ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
|
|
49
|
+
name: name,
|
|
50
|
+
color: labelColor,
|
|
51
|
+
optional: optional
|
|
45
52
|
}, label), /*#__PURE__*/React.createElement("input", _extends({
|
|
46
53
|
id: name,
|
|
47
|
-
className:
|
|
54
|
+
className: "input",
|
|
48
55
|
type: type,
|
|
49
|
-
disabled: disabled
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
disabled: disabled,
|
|
57
|
+
placeholder: placeholder,
|
|
58
|
+
autoComplete: autoComplete
|
|
59
|
+
}, field)), /*#__PURE__*/React.createElement(FormDescription, {
|
|
60
|
+
className: "v50 mt-v s-1",
|
|
61
|
+
description: description,
|
|
62
|
+
name: name
|
|
63
|
+
}));
|
|
54
64
|
};
|
|
55
65
|
|
|
56
66
|
TextInput.propTypes = {
|
|
@@ -79,10 +89,15 @@ TextInput.propTypes = {
|
|
|
79
89
|
*/
|
|
80
90
|
label: PropTypes.string.isRequired,
|
|
81
91
|
|
|
92
|
+
/**
|
|
93
|
+
* The input label color
|
|
94
|
+
*/
|
|
95
|
+
labelColor: PropTypes.string,
|
|
96
|
+
|
|
82
97
|
/**
|
|
83
98
|
* The type of the input (html)
|
|
84
99
|
*/
|
|
85
|
-
type: PropTypes.oneOf(['text', 'email', 'password', 'number', 'date', 'time', 'datetime', 'month', 'tel', 'hidden']),
|
|
100
|
+
type: PropTypes.oneOf(['text', 'email', 'password', 'number', 'date', 'time', 'datetime', 'month', 'tel', 'hidden', 'url']),
|
|
86
101
|
|
|
87
102
|
/**
|
|
88
103
|
* The input field validator function
|
|
@@ -102,10 +117,32 @@ TextInput.propTypes = {
|
|
|
102
117
|
/**
|
|
103
118
|
* Whether the text input should be disabled
|
|
104
119
|
*/
|
|
105
|
-
disabled: PropTypes.bool
|
|
120
|
+
disabled: PropTypes.bool,
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* The placeholder text for the input
|
|
124
|
+
*/
|
|
125
|
+
placeholder: PropTypes.string,
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The text input color
|
|
129
|
+
*/
|
|
130
|
+
color: PropTypes.string,
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Whether the input is optional or not
|
|
134
|
+
*/
|
|
135
|
+
optional: PropTypes.bool,
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The autoComplete value that the browser should watch for the input
|
|
139
|
+
* `https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete`
|
|
140
|
+
*/
|
|
141
|
+
autoComplete: PropTypes.string
|
|
106
142
|
};
|
|
107
143
|
TextInput.defaultProps = {
|
|
108
144
|
type: 'text',
|
|
145
|
+
color: 'background2',
|
|
109
146
|
disabled: false
|
|
110
147
|
};
|
|
111
148
|
export default /*#__PURE__*/memo(TextInput);
|
|
@@ -9,17 +9,26 @@ $default-padding: 0.75em 0.75em 0.55em;
|
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
|
|
12
|
-
.input-label {
|
|
13
|
-
color: var(--main1);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
12
|
.input {
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
border: var(--theme-border-style) var(--dark-y);
|
|
14
|
+
background: var(--light-y);
|
|
15
|
+
color: var(--on-y);
|
|
19
16
|
padding: $default-padding;
|
|
20
17
|
|
|
18
|
+
&::placeholder{
|
|
19
|
+
color: var(--metadata);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:not(:disabled):hover{
|
|
23
|
+
border: var(--theme-border-style) var(--light-background4);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:disabled {
|
|
27
|
+
background-color: var(--dark-y);
|
|
28
|
+
}
|
|
29
|
+
|
|
21
30
|
&:focus {
|
|
22
|
-
background: var(--
|
|
31
|
+
background: var(--light-background4);
|
|
23
32
|
}
|
|
24
33
|
}
|
|
25
34
|
}
|
|
@@ -27,34 +27,44 @@ const TextareaInput = ({
|
|
|
27
27
|
textAreaColor,
|
|
28
28
|
labelColor,
|
|
29
29
|
description,
|
|
30
|
-
disabled
|
|
30
|
+
disabled,
|
|
31
|
+
placeholder,
|
|
32
|
+
autoComplete,
|
|
33
|
+
resize // ...otherProps
|
|
31
34
|
|
|
32
35
|
}) => {
|
|
33
36
|
useLayoutEffect(() => {
|
|
34
37
|
import("./styles.scss");
|
|
35
38
|
}, []);
|
|
36
|
-
const [field
|
|
39
|
+
const [field] = useField({
|
|
37
40
|
name,
|
|
38
41
|
validate
|
|
39
42
|
});
|
|
40
43
|
return /*#__PURE__*/React.createElement("div", {
|
|
41
44
|
id: id,
|
|
42
|
-
className: [baseClassName, componentClassName, userClassName, `
|
|
45
|
+
className: [baseClassName, componentClassName, userClassName, `y-${textAreaColor}`].filter(e => e).join(' '),
|
|
43
46
|
style: style // {...otherProps}
|
|
44
47
|
|
|
45
48
|
}, /*#__PURE__*/React.createElement(FormLabel, {
|
|
46
|
-
className: [
|
|
47
|
-
name: name
|
|
49
|
+
className: [labelAsDescription ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
|
|
50
|
+
name: name,
|
|
51
|
+
color: labelColor
|
|
48
52
|
}, label), /*#__PURE__*/React.createElement("textarea", _extends({
|
|
49
53
|
id: textAreaId,
|
|
50
|
-
className:
|
|
54
|
+
className: "textarea"
|
|
51
55
|
}, field, {
|
|
56
|
+
style: {
|
|
57
|
+
resize
|
|
58
|
+
},
|
|
59
|
+
placeholder: placeholder,
|
|
52
60
|
rows: rows,
|
|
53
|
-
disabled: disabled
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
className: "v50 mt-v s-1"
|
|
57
|
-
|
|
61
|
+
disabled: disabled,
|
|
62
|
+
autoComplete: autoComplete
|
|
63
|
+
})), /*#__PURE__*/React.createElement(FormDescription, {
|
|
64
|
+
className: "v50 mt-v s-1",
|
|
65
|
+
description: description,
|
|
66
|
+
name: name
|
|
67
|
+
}));
|
|
58
68
|
};
|
|
59
69
|
|
|
60
70
|
TextareaInput.propTypes = {
|
|
@@ -121,12 +131,28 @@ TextareaInput.propTypes = {
|
|
|
121
131
|
/**
|
|
122
132
|
* Whether the text area should be disabled
|
|
123
133
|
*/
|
|
124
|
-
disabled: PropTypes.bool
|
|
134
|
+
disabled: PropTypes.bool,
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The textarea placeholder text
|
|
138
|
+
*/
|
|
139
|
+
placeholder: PropTypes.string,
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The autoComplete value that the browser should watch for the input
|
|
143
|
+
*/
|
|
144
|
+
autoComplete: PropTypes.string,
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Whether to disable or allow only a certain method of resizing the area
|
|
148
|
+
* Textarea docs - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
|
|
149
|
+
*/
|
|
150
|
+
resize: PropTypes.string
|
|
125
151
|
};
|
|
126
152
|
TextareaInput.defaultProps = {
|
|
127
153
|
rows: 3,
|
|
128
|
-
textAreaColor: '
|
|
129
|
-
|
|
130
|
-
|
|
154
|
+
textAreaColor: 'background2',
|
|
155
|
+
disabled: false,
|
|
156
|
+
resize: 'vertical'
|
|
131
157
|
};
|
|
132
158
|
export default /*#__PURE__*/memo(TextareaInput);
|
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
@use "@pareto-engineering/bem";
|
|
3
3
|
|
|
4
|
+
$default-padding: .5em;
|
|
5
|
+
|
|
4
6
|
.#{bem.$base}.text-area-input{
|
|
5
7
|
display: flex;
|
|
6
8
|
flex-direction: column;
|
|
7
9
|
|
|
8
10
|
.textarea {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
border: var(--theme-border-style) var(--dark-y);
|
|
12
|
+
background: var(--light-y);
|
|
13
|
+
color: var(--on-y);
|
|
14
|
+
padding: $default-padding;
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
&::placeholder{
|
|
17
|
+
color: var(--metadata);
|
|
14
18
|
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
19
|
|
|
20
|
+
&:not(:disabled):hover{
|
|
21
|
+
border: var(--theme-border-style) var(--light-background4);
|
|
22
|
+
}
|
|
18
23
|
|
|
24
|
+
&:disabled {
|
|
25
|
+
background-color: var(--dark-y);
|
|
26
|
+
}
|
|
19
27
|
|
|
28
|
+
&:focus {
|
|
29
|
+
background: var(--light-background4);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export { TextInput } from "./TextInput";
|
|
2
2
|
export { SelectInput } from "./SelectInput";
|
|
3
|
-
export { RadioInput } from "./RadioInput";
|
|
4
|
-
export { CheckboxInput } from "./CheckboxInput";
|
|
5
|
-
export { TaskRecommendationInput } from "./TaskRecommendationInput";
|
|
6
3
|
export { ChoicesInput } from "./ChoicesInput";
|
|
7
4
|
export { TextareaInput } from "./TextareaInput";
|
|
8
|
-
export { RatingsInput } from "./RatingsInput";
|
|
5
|
+
export { RatingsInput } from "./RatingsInput";
|
|
6
|
+
export { QueryCombobox } from "./QueryCombobox";
|
|
7
|
+
export { QuerySelect } from "./QuerySelect";
|
package/dist/es/form-reset.scss
CHANGED
package/dist/es/index.js
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var _QueryLoaderHelloQuery;
|
|
2
|
+
|
|
3
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { useEffect, Suspense } from 'react';
|
|
6
|
+
import { useQueryLoader } from 'react-relay'; // Local Definitions
|
|
7
|
+
|
|
8
|
+
import { PreloadedTestData } from "./common";
|
|
9
|
+
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);
|
|
10
|
+
/**
|
|
11
|
+
* This is the component description.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const QueryLoader = () => {
|
|
15
|
+
const [queryReference, loadQuery] = useQueryLoader(testQuery);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
loadQuery({});
|
|
18
|
+
}, []);
|
|
19
|
+
return /*#__PURE__*/React.createElement(Suspense, {
|
|
20
|
+
fallback: "loading"
|
|
21
|
+
}, queryReference ? /*#__PURE__*/React.createElement(PreloadedTestData, {
|
|
22
|
+
queryReference: queryReference,
|
|
23
|
+
query: testQuery
|
|
24
|
+
}) : null);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
QueryLoader.defaultProps = {// someProp:false
|
|
28
|
+
};
|
|
29
|
+
export default QueryLoader;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @flow
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
'use strict';
|
|
7
|
+
/*::
|
|
8
|
+
import type { ConcreteRequest } from 'relay-runtime';
|
|
9
|
+
export type QueryLoaderHelloQueryVariables = {||};
|
|
10
|
+
export type QueryLoaderHelloQueryResponse = {|
|
|
11
|
+
+hello: ?string
|
|
12
|
+
|};
|
|
13
|
+
export type QueryLoaderHelloQuery = {|
|
|
14
|
+
variables: QueryLoaderHelloQueryVariables,
|
|
15
|
+
response: QueryLoaderHelloQueryResponse,
|
|
16
|
+
|};
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
query QueryLoaderHelloQuery {
|
|
21
|
+
hello
|
|
22
|
+
}
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
const node
|
|
26
|
+
/*: ConcreteRequest*/
|
|
27
|
+
= function () {
|
|
28
|
+
var v0 = [{
|
|
29
|
+
"alias": null,
|
|
30
|
+
"args": null,
|
|
31
|
+
"kind": "ScalarField",
|
|
32
|
+
"name": "hello",
|
|
33
|
+
"storageKey": null
|
|
34
|
+
}];
|
|
35
|
+
return {
|
|
36
|
+
"fragment": {
|
|
37
|
+
"argumentDefinitions": [],
|
|
38
|
+
"kind": "Fragment",
|
|
39
|
+
"metadata": null,
|
|
40
|
+
"name": "QueryLoaderHelloQuery",
|
|
41
|
+
"selections": v0
|
|
42
|
+
/*: any*/
|
|
43
|
+
,
|
|
44
|
+
"type": "Query",
|
|
45
|
+
"abstractKey": null
|
|
46
|
+
},
|
|
47
|
+
"kind": "Request",
|
|
48
|
+
"operation": {
|
|
49
|
+
"argumentDefinitions": [],
|
|
50
|
+
"kind": "Operation",
|
|
51
|
+
"name": "QueryLoaderHelloQuery",
|
|
52
|
+
"selections": v0
|
|
53
|
+
/*: any*/
|
|
54
|
+
|
|
55
|
+
},
|
|
56
|
+
"params": {
|
|
57
|
+
"cacheID": "463f9ee8a82dd6ec8dedeb28649cce74",
|
|
58
|
+
"id": null,
|
|
59
|
+
"metadata": {},
|
|
60
|
+
"name": "QueryLoaderHelloQuery",
|
|
61
|
+
"operationKind": "query",
|
|
62
|
+
"text": "query QueryLoaderHelloQuery {\n hello\n}\n"
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}(); // prettier-ignore
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
node
|
|
69
|
+
/*: any*/
|
|
70
|
+
.hash = 'b92d001ab0208bd484a99f77c274d5ef';
|
|
71
|
+
module.exports = node;
|