@pareto-engineering/design-system 4.0.0-alpha.4 → 4.0.0-alpha.9
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/dist/cjs/a/AnimatedBlobs/AnimatedBlobs.js +90 -0
- package/dist/cjs/a/AnimatedBlobs/index.js +13 -0
- package/dist/cjs/a/AnimatedBlobs/styles.scss +87 -0
- package/dist/cjs/a/AnimatedGradient/AnimatedGradient.js +56 -0
- package/dist/cjs/a/AnimatedGradient/index.js +13 -0
- package/dist/cjs/a/AnimatedGradient/styles.scss +14 -0
- package/dist/cjs/a/AnimatedGradient/webGIRenderer.js +528 -0
- package/dist/cjs/a/ContentTree/ContentTree.js +2 -2
- package/dist/cjs/a/Conversation/Conversation.js +1 -1
- package/dist/cjs/a/DotInfo/DotInfo.js +1 -1
- package/dist/cjs/a/Figure/Figure.js +1 -1
- package/dist/cjs/a/HamburgerButton/HamburgerButton.js +1 -1
- package/dist/cjs/a/IconList/IconList.js +1 -1
- package/dist/cjs/a/Label/Label.js +13 -5
- package/dist/cjs/a/Label/styles.scss +1 -1
- package/dist/cjs/a/LoadingCircle/LoadingCircle.js +1 -1
- package/dist/cjs/a/MetaCard/MetaCard.js +60 -0
- package/dist/cjs/a/MetaCard/index.js +13 -0
- package/dist/cjs/a/MetaCard/styles.scss +28 -0
- package/dist/cjs/a/People/People.js +1 -1
- package/dist/cjs/a/Popover/Popover.js +2 -2
- package/dist/cjs/a/ProgressBar/ProgressBar.js +1 -1
- package/dist/cjs/a/Quote/Quote.js +1 -1
- package/dist/cjs/a/SVG/SVG.js +1 -1
- package/dist/cjs/a/SnapScroller/SnapScroller.js +1 -1
- package/dist/cjs/a/SnapScroller/styles.scss +18 -10
- package/dist/cjs/a/Spinner/Spinner.js +1 -1
- package/dist/cjs/a/TextSteps/TextSteps.js +70 -0
- package/dist/cjs/a/TextSteps/index.js +13 -0
- package/dist/cjs/a/TextSteps/styles.scss +29 -0
- package/dist/cjs/a/Timestamp/Timestamp.js +1 -1
- package/dist/cjs/a/Tip/Tip.js +72 -0
- package/dist/cjs/a/Tip/index.js +13 -0
- package/dist/cjs/a/Tip/styles.scss +22 -0
- package/dist/cjs/a/index.js +36 -1
- package/dist/cjs/b/Button/Button.js +2 -1
- package/dist/cjs/b/Button/styles.scss +2 -0
- package/dist/cjs/b/Card/Card.js +74 -0
- package/dist/cjs/b/Card/common/Group/Group.js +73 -0
- package/dist/cjs/b/Card/common/Group/index.js +13 -0
- package/dist/cjs/b/Card/common/Group/styles.scss +42 -0
- package/dist/cjs/b/Card/common/Section/Section.js +59 -0
- package/dist/cjs/b/Card/common/Section/index.js +13 -0
- package/dist/cjs/b/Card/common/index.js +19 -0
- package/dist/cjs/b/Card/index.js +13 -0
- package/dist/cjs/b/Card/styles.scss +46 -0
- package/dist/cjs/b/Logo/Logo.js +1 -1
- package/dist/cjs/b/Page/Page.js +10 -3
- package/dist/cjs/b/Page/common/Section/Section.js +6 -1
- package/dist/cjs/b/Page/styles.scss +22 -4
- package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +1 -1
- package/dist/cjs/b/SocialMediaButton/styles.scss +1 -1
- package/dist/cjs/b/ThemeSelector/ThemeSelector.js +1 -1
- package/dist/cjs/b/Title/Title.js +4 -1
- package/dist/cjs/b/index.js +8 -1
- package/dist/cjs/c/ContentSlides/ContentSlides.js +2 -2
- package/dist/cjs/c/Modal/Modal.js +1 -1
- package/dist/cjs/c/Modal/styles.scss +2 -1
- package/dist/cjs/c/Shortener/Shortener.js +1 -1
- package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +1 -1
- package/dist/cjs/f/FormInput/FormInput.js +1 -1
- package/dist/cjs/f/common/Debugger/Debugger.js +1 -1
- package/dist/cjs/f/common/Description/Description.js +1 -1
- package/dist/cjs/f/common/Label/Label.js +1 -1
- package/dist/cjs/f/fields/Checkbox/Checkbox.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +16 -8
- package/dist/cjs/f/fields/ChoicesInput/styles.scss +21 -33
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/styles.scss +5 -4
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +1 -1
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +3 -3
- package/dist/cjs/f/fields/SelectInput/styles.scss +31 -21
- package/dist/cjs/f/fields/TextInput/TextInput.js +5 -3
- package/dist/cjs/f/fields/TextInput/styles.scss +26 -17
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +1 -1
- package/dist/es/a/AnimatedBlobs/AnimatedBlobs.js +82 -0
- package/dist/es/a/AnimatedBlobs/index.js +1 -0
- package/dist/es/a/AnimatedBlobs/styles.scss +87 -0
- package/dist/es/a/AnimatedGradient/AnimatedGradient.js +48 -0
- package/dist/es/a/AnimatedGradient/index.js +1 -0
- package/dist/es/a/AnimatedGradient/styles.scss +14 -0
- package/dist/es/a/AnimatedGradient/webGIRenderer.js +492 -0
- package/dist/es/a/ContentTree/ContentTree.js +3 -3
- package/dist/es/a/Conversation/Conversation.js +2 -2
- package/dist/es/a/DotInfo/DotInfo.js +2 -2
- package/dist/es/a/Figure/Figure.js +2 -2
- package/dist/es/a/HamburgerButton/HamburgerButton.js +2 -2
- package/dist/es/a/IconList/IconList.js +2 -2
- package/dist/es/a/Label/Label.js +14 -6
- package/dist/es/a/Label/styles.scss +1 -1
- package/dist/es/a/LoadingCircle/LoadingCircle.js +2 -2
- package/dist/es/a/MetaCard/MetaCard.js +52 -0
- package/dist/es/a/MetaCard/index.js +1 -0
- package/dist/es/a/MetaCard/styles.scss +28 -0
- package/dist/es/a/People/People.js +2 -2
- package/dist/es/a/Popover/Popover.js +3 -3
- package/dist/es/a/ProgressBar/ProgressBar.js +2 -2
- package/dist/es/a/Quote/Quote.js +2 -2
- package/dist/es/a/SVG/SVG.js +2 -2
- package/dist/es/a/SnapScroller/SnapScroller.js +2 -2
- package/dist/es/a/SnapScroller/styles.scss +18 -10
- package/dist/es/a/Spinner/Spinner.js +2 -2
- package/dist/es/a/TextSteps/TextSteps.js +61 -0
- package/dist/es/a/TextSteps/index.js +1 -0
- package/dist/es/a/TextSteps/styles.scss +29 -0
- package/dist/es/a/Timestamp/Timestamp.js +2 -2
- package/dist/es/a/Tip/Tip.js +64 -0
- package/dist/es/a/Tip/index.js +2 -0
- package/dist/es/a/Tip/styles.scss +22 -0
- package/dist/es/a/index.js +6 -1
- package/dist/es/b/Button/Button.js +2 -1
- package/dist/es/b/Button/styles.scss +2 -0
- package/dist/es/b/Card/Card.js +66 -0
- package/dist/es/b/Card/common/Group/Group.js +65 -0
- package/dist/es/b/Card/common/Group/index.js +1 -0
- package/dist/es/b/Card/common/Group/styles.scss +42 -0
- package/dist/es/b/Card/common/Section/Section.js +48 -0
- package/dist/es/b/Card/common/Section/index.js +1 -0
- package/dist/es/b/Card/common/index.js +2 -0
- package/dist/es/b/Card/index.js +1 -0
- package/dist/es/b/Card/styles.scss +46 -0
- package/dist/es/b/Logo/Logo.js +2 -2
- package/dist/es/b/Page/Page.js +11 -4
- package/dist/es/b/Page/common/Section/Section.js +6 -1
- package/dist/es/b/Page/styles.scss +22 -4
- package/dist/es/b/SocialMediaButton/SocialMediaButton.js +2 -2
- package/dist/es/b/SocialMediaButton/styles.scss +1 -1
- package/dist/es/b/ThemeSelector/ThemeSelector.js +2 -2
- package/dist/es/b/Title/Title.js +18 -12
- package/dist/es/b/index.js +2 -1
- package/dist/es/c/ContentSlides/ContentSlides.js +3 -3
- package/dist/es/c/Modal/Modal.js +2 -2
- package/dist/es/c/Modal/styles.scss +2 -1
- package/dist/es/c/Shortener/Shortener.js +2 -2
- package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +2 -2
- package/dist/es/f/FormInput/FormInput.js +2 -2
- package/dist/es/f/common/Debugger/Debugger.js +2 -2
- package/dist/es/f/common/Description/Description.js +2 -2
- package/dist/es/f/common/Label/Label.js +2 -2
- package/dist/es/f/fields/Checkbox/Checkbox.js +2 -2
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +18 -10
- package/dist/es/f/fields/ChoicesInput/styles.scss +21 -33
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +2 -2
- package/dist/es/f/fields/QueryCombobox/styles.scss +5 -4
- package/dist/es/f/fields/RatingsInput/RatingsInput.js +2 -2
- package/dist/es/f/fields/SelectInput/SelectInput.js +4 -4
- package/dist/es/f/fields/SelectInput/styles.scss +31 -21
- package/dist/es/f/fields/TextInput/TextInput.js +6 -4
- package/dist/es/f/fields/TextInput/styles.scss +26 -17
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +2 -2
- package/package.json +16 -16
- package/src/stories/a/MetaCard.stories.jsx +35 -0
- package/src/stories/a/TextSteps.stories.jsx +19 -0
- package/src/stories/a/Tip.stories.jsx +28 -0
- package/src/stories/b/Card/Card.stories.jsx +59 -0
- package/src/stories/b/Card/Group.stories.jsx +59 -0
- package/src/stories/b/Page.stories.jsx +19 -3
- package/src/stories/f/SelectInput.stories.jsx +7 -0
- package/src/stories/f/TextInput.stories.jsx +4 -4
- package/src/ui/a/AnimatedBlobs/AnimatedBlobs.jsx +102 -0
- package/src/ui/a/AnimatedBlobs/index.js +1 -0
- package/src/ui/a/AnimatedBlobs/styles.scss +87 -0
- package/src/ui/a/AnimatedGradient/AnimatedGradient.jsx +69 -0
- package/src/ui/a/AnimatedGradient/index.js +1 -0
- package/src/ui/a/AnimatedGradient/styles.scss +14 -0
- package/src/ui/a/AnimatedGradient/webGIRenderer.js +541 -0
- package/src/ui/a/ContentTree/ContentTree.jsx +3 -3
- package/src/ui/a/Conversation/Conversation.jsx +2 -2
- package/src/ui/a/DotInfo/DotInfo.jsx +2 -2
- package/src/ui/a/Figure/Figure.jsx +2 -2
- package/src/ui/a/HamburgerButton/HamburgerButton.jsx +2 -2
- package/src/ui/a/IconList/IconList.jsx +2 -2
- package/src/ui/a/Label/Label.jsx +13 -4
- package/src/ui/a/Label/styles.scss +1 -1
- package/src/ui/a/LoadingCircle/LoadingCircle.jsx +2 -2
- package/src/ui/a/MetaCard/MetaCard.jsx +74 -0
- package/src/ui/a/MetaCard/index.js +1 -0
- package/src/ui/a/MetaCard/styles.scss +28 -0
- package/src/ui/a/People/People.jsx +2 -2
- package/src/ui/a/Popover/Popover.jsx +3 -3
- package/src/ui/a/ProgressBar/ProgressBar.jsx +2 -2
- package/src/ui/a/Quote/Quote.jsx +2 -2
- package/src/ui/a/SVG/SVG.jsx +2 -2
- package/src/ui/a/SnapScroller/SnapScroller.jsx +2 -2
- package/src/ui/a/SnapScroller/styles.scss +18 -10
- package/src/ui/a/Spinner/Spinner.jsx +2 -2
- package/src/ui/a/TextSteps/TextSteps.jsx +87 -0
- package/src/ui/a/TextSteps/index.js +1 -0
- package/src/ui/a/TextSteps/styles.scss +29 -0
- package/src/ui/a/Timestamp/Timestamp.jsx +2 -2
- package/src/ui/a/Tip/Tip.jsx +88 -0
- package/src/ui/a/Tip/index.js +2 -0
- package/src/ui/a/Tip/styles.scss +22 -0
- package/src/ui/a/index.js +5 -0
- package/src/ui/b/Button/Button.jsx +2 -1
- package/src/ui/b/Button/styles.scss +2 -0
- package/src/ui/b/Card/Card.jsx +94 -0
- package/src/ui/b/Card/common/Group/Group.jsx +91 -0
- package/src/ui/b/Card/common/Group/index.js +1 -0
- package/src/ui/b/Card/common/Group/styles.scss +42 -0
- package/src/ui/b/Card/common/Section/Section.jsx +70 -0
- package/src/ui/b/Card/common/Section/index.js +1 -0
- package/src/ui/b/Card/common/index.js +2 -0
- package/src/ui/b/Card/index.js +1 -0
- package/src/ui/b/Card/styles.scss +46 -0
- package/src/ui/b/Logo/Logo.jsx +2 -2
- package/src/ui/b/Page/Page.jsx +9 -3
- package/src/ui/b/Page/common/Section/Section.jsx +8 -0
- package/src/ui/b/Page/styles.scss +22 -4
- package/src/ui/b/SocialMediaButton/SocialMediaButton.jsx +2 -2
- package/src/ui/b/SocialMediaButton/styles.scss +1 -1
- package/src/ui/b/ThemeSelector/ThemeSelector.jsx +2 -2
- package/src/ui/b/Title/Title.jsx +30 -23
- package/src/ui/b/index.js +1 -0
- package/src/ui/c/ContentSlides/ContentSlides.jsx +3 -3
- package/src/ui/c/Modal/Modal.jsx +2 -2
- package/src/ui/c/Modal/styles.scss +2 -1
- package/src/ui/c/Shortener/Shortener.jsx +2 -2
- package/src/ui/c/SocialMediaShareButton/SocialMediaShareButton.jsx +2 -2
- package/src/ui/f/FormInput/FormInput.jsx +2 -2
- package/src/ui/f/common/Debugger/Debugger.jsx +2 -2
- package/src/ui/f/common/Description/Description.jsx +2 -2
- package/src/ui/f/common/Label/Label.jsx +2 -2
- package/src/ui/f/fields/Checkbox/Checkbox.jsx +2 -2
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +12 -7
- package/src/ui/f/fields/ChoicesInput/styles.scss +21 -33
- package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +2 -2
- package/src/ui/f/fields/QueryCombobox/styles.scss +5 -4
- package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +2 -2
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +4 -4
- package/src/ui/f/fields/SelectInput/styles.scss +31 -21
- package/src/ui/f/fields/TextInput/TextInput.jsx +13 -11
- package/src/ui/f/fields/TextInput/styles.scss +26 -17
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +2 -2
- package/tests/__snapshots__/Storyshots.test.js.snap +1049 -485
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
|
|
4
|
+
import { Card } from 'ui'
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title :'b/Card/Group',
|
|
8
|
+
component :Card.Group,
|
|
9
|
+
decorators:[
|
|
10
|
+
// (storyfn) => <Router>{storyfn()}</Router>,
|
|
11
|
+
],
|
|
12
|
+
argTypes:{
|
|
13
|
+
type :{ control: 'select', options: ['vertical-flexbox', 'grid', 'snap-scroller'] },
|
|
14
|
+
desktopType:{ control: 'select', options: ['vertical-flexbox', 'grid'] },
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const Template = ({ ...args }) => (
|
|
19
|
+
<Card.Group
|
|
20
|
+
className="span-8"
|
|
21
|
+
{...args}
|
|
22
|
+
>
|
|
23
|
+
<Card className="span-2">
|
|
24
|
+
<Card.Section>
|
|
25
|
+
<h1>
|
|
26
|
+
Span Two on Grid
|
|
27
|
+
</h1>
|
|
28
|
+
</Card.Section>
|
|
29
|
+
</Card>
|
|
30
|
+
<Card>
|
|
31
|
+
<Card.Section>
|
|
32
|
+
<h1>
|
|
33
|
+
Card Two
|
|
34
|
+
</h1>
|
|
35
|
+
</Card.Section>
|
|
36
|
+
</Card>
|
|
37
|
+
<Card>
|
|
38
|
+
<Card.Section>
|
|
39
|
+
<h1>
|
|
40
|
+
Card Three
|
|
41
|
+
</h1>
|
|
42
|
+
</Card.Section>
|
|
43
|
+
</Card>
|
|
44
|
+
</Card.Group>
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
export const Base = Template.bind({})
|
|
48
|
+
Base.args = {}
|
|
49
|
+
|
|
50
|
+
export const CardGroupGridOnDesktop = Template.bind({})
|
|
51
|
+
CardGroupGridOnDesktop.args = {
|
|
52
|
+
desktopType:'grid',
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const CardGroupNotSnapScroller = Template.bind({})
|
|
56
|
+
CardGroupNotSnapScroller.args = {
|
|
57
|
+
type :'vertical-flexbox',
|
|
58
|
+
desktopType:'vertical-flexbox',
|
|
59
|
+
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.0 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
Page,
|
|
6
|
+
// AnimatedGradient,
|
|
7
|
+
// AnimatedBlobs,
|
|
8
|
+
} from 'ui'
|
|
5
9
|
import { HelmetProvider } from 'react-helmet-async'
|
|
6
10
|
|
|
7
11
|
export default {
|
|
@@ -52,9 +56,21 @@ export const WithSections = () => (
|
|
|
52
56
|
<Page.Section id="s1">
|
|
53
57
|
Section 1
|
|
54
58
|
</Page.Section>
|
|
55
|
-
<Page.Section id="s2">
|
|
59
|
+
<Page.Section id="s2" spaced className="x-main b-x">
|
|
56
60
|
Section 2.
|
|
57
|
-
|
|
61
|
+
This section is spaced
|
|
58
62
|
</Page.Section>
|
|
59
63
|
</Page>
|
|
60
64
|
)
|
|
65
|
+
|
|
66
|
+
// Story is commented out due to snapshots and animations
|
|
67
|
+
// export const WithAnimatedBlobsBackground = () => (
|
|
68
|
+
// <Page
|
|
69
|
+
// id="with-sections"
|
|
70
|
+
// Background={AnimatedBlobs}
|
|
71
|
+
// >
|
|
72
|
+
// <Page.Section id="s1">
|
|
73
|
+
// Section 1
|
|
74
|
+
// </Page.Section>
|
|
75
|
+
// </Page>
|
|
76
|
+
// )
|
|
@@ -78,3 +78,10 @@ DisabledSelectInput.args = {
|
|
|
78
78
|
...Base.args,
|
|
79
79
|
disabled:true,
|
|
80
80
|
}
|
|
81
|
+
|
|
82
|
+
export const DisabledWithDescriptionSelectInput = Template.bind({})
|
|
83
|
+
DisabledWithDescriptionSelectInput.args = {
|
|
84
|
+
...Base.args,
|
|
85
|
+
disabled :true,
|
|
86
|
+
description:'This is a description',
|
|
87
|
+
}
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
decorators:[
|
|
17
17
|
(storyfn) => (
|
|
18
18
|
<Formik
|
|
19
|
-
initialValues={{
|
|
19
|
+
initialValues={{ email: '', name: '', company: '' }}
|
|
20
20
|
>
|
|
21
21
|
<Form>
|
|
22
22
|
|
|
@@ -47,8 +47,8 @@ const Template = (args) => (
|
|
|
47
47
|
|
|
48
48
|
export const Base = Template.bind({})
|
|
49
49
|
Base.args = {
|
|
50
|
-
name :'
|
|
51
|
-
label:
|
|
50
|
+
name :'email',
|
|
51
|
+
label:'How can we reach you ?',
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export const Optional = Template.bind({})
|
|
@@ -76,7 +76,7 @@ WithValidation.args = {
|
|
|
76
76
|
export const WithPlaceholder = Template.bind({})
|
|
77
77
|
WithPlaceholder.args = {
|
|
78
78
|
...Base.args,
|
|
79
|
-
placeholder:'
|
|
79
|
+
placeholder:'Email address',
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
export const WithAutoCompleteOff = Template.bind({})
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
|
|
4
|
+
import { useInsertionEffect } from 'react'
|
|
5
|
+
|
|
6
|
+
import PropTypes from 'prop-types'
|
|
7
|
+
|
|
8
|
+
import styleNames from '@pareto-engineering/bem/exports'
|
|
9
|
+
|
|
10
|
+
// Local Definitions
|
|
11
|
+
|
|
12
|
+
const baseClassName = styleNames.base
|
|
13
|
+
|
|
14
|
+
const componentClassName = 'animated-blobs'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* This is the component description.
|
|
18
|
+
*/
|
|
19
|
+
const AnimatedBlobs = ({
|
|
20
|
+
id,
|
|
21
|
+
className: userClassName,
|
|
22
|
+
color,
|
|
23
|
+
style,
|
|
24
|
+
height,
|
|
25
|
+
width,
|
|
26
|
+
opacity,
|
|
27
|
+
// ...otherProps
|
|
28
|
+
}) => {
|
|
29
|
+
useInsertionEffect(() => {
|
|
30
|
+
import('./styles.scss')
|
|
31
|
+
}, [])
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<div
|
|
35
|
+
id={id}
|
|
36
|
+
className={[
|
|
37
|
+
baseClassName,
|
|
38
|
+
componentClassName,
|
|
39
|
+
userClassName,
|
|
40
|
+
]
|
|
41
|
+
.filter((e) => e)
|
|
42
|
+
.join(' ')}
|
|
43
|
+
style={{
|
|
44
|
+
...style,
|
|
45
|
+
'--blob-color':`var(--${color})`,
|
|
46
|
+
'--height' :height,
|
|
47
|
+
'--opacity' :opacity,
|
|
48
|
+
'--width' :width,
|
|
49
|
+
}}
|
|
50
|
+
>
|
|
51
|
+
<div className="shape-blob" />
|
|
52
|
+
<div className="shape-blob one" />
|
|
53
|
+
<div className="shape-blob two" />
|
|
54
|
+
</div>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
AnimatedBlobs.propTypes = {
|
|
59
|
+
/**
|
|
60
|
+
* The HTML id for this element
|
|
61
|
+
*/
|
|
62
|
+
id:PropTypes.string,
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The HTML class names for this element
|
|
66
|
+
*/
|
|
67
|
+
className:PropTypes.string,
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The React-written, css properties for this element.
|
|
71
|
+
*/
|
|
72
|
+
style:PropTypes.objectOf(PropTypes.string),
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The color of the blobs
|
|
76
|
+
*/
|
|
77
|
+
color:PropTypes.string,
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The height of the blobs
|
|
81
|
+
*/
|
|
82
|
+
height:PropTypes.string,
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The width of the blobs
|
|
86
|
+
*/
|
|
87
|
+
width:PropTypes.string,
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The opacity of the blobs
|
|
91
|
+
*/
|
|
92
|
+
opacity:PropTypes.string,
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
AnimatedBlobs.defaultProps = {
|
|
96
|
+
color :'background-mesh',
|
|
97
|
+
height :'200px',
|
|
98
|
+
width :'200px',
|
|
99
|
+
opacity:'0.7',
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export default AnimatedBlobs
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AnimatedBlobs } from './AnimatedBlobs'
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
|
|
5
|
+
@keyframes transform {
|
|
6
|
+
0%,
|
|
7
|
+
100% {
|
|
8
|
+
border-radius: 33% 67% 70% 30% / 30% 30% 70% 70%;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
20% {
|
|
12
|
+
border-radius: 37% 63% 51% 49% / 37% 65% 35% 63%;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
40% {
|
|
16
|
+
border-radius: 36% 64% 64% 36% / 64% 48% 52% 36%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
60% {
|
|
20
|
+
border-radius: 37% 63% 51% 49% / 30% 30% 70% 70%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
80% {
|
|
24
|
+
border-radius: 40% 60% 42% 58% / 41% 51% 49% 59%;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
@keyframes movement_one {
|
|
28
|
+
0%,
|
|
29
|
+
100% {
|
|
30
|
+
transform: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
50% {
|
|
34
|
+
transform: translate(50%, 20%) rotateY(10deg) scale(1.2);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
@keyframes movement_two {
|
|
38
|
+
0%,
|
|
39
|
+
500% {
|
|
40
|
+
transform: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
50% {
|
|
44
|
+
transform: translate(50%, 20%) rotate(-200deg) scale(1.2);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.#{bem.$base}.animated-blobs {
|
|
49
|
+
height: 100%;
|
|
50
|
+
left: 0;
|
|
51
|
+
top: 0;
|
|
52
|
+
width: 100%;
|
|
53
|
+
|
|
54
|
+
> .shape-blob {
|
|
55
|
+
animation:
|
|
56
|
+
transform 20s ease-in-out infinite both alternate,
|
|
57
|
+
movement_one 40s ease-in-out infinite both;
|
|
58
|
+
background: var(--blob-color);
|
|
59
|
+
border-radius: 30% 50% 20% 40%;
|
|
60
|
+
height: var(--height);
|
|
61
|
+
left: 70%;
|
|
62
|
+
opacity: var(--opacity);
|
|
63
|
+
position: absolute;
|
|
64
|
+
top: 50%;
|
|
65
|
+
width: var(--width);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
> .shape-blob.one {
|
|
69
|
+
animation: transform 30s ease-in-out infinite both alternate,
|
|
70
|
+
movement_two 60s ease-in-out infinite both;
|
|
71
|
+
height: calc(var(--height) * 2.5);
|
|
72
|
+
left: -200px;
|
|
73
|
+
top: -150px;
|
|
74
|
+
transform: rotate(-180deg);
|
|
75
|
+
width: calc(var(--width) * 2.5);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
> .shape-blob.two {
|
|
79
|
+
animation: transform 30s ease-in-out infinite both alternate,
|
|
80
|
+
movement_two 60s ease-in-out infinite both;
|
|
81
|
+
height: calc(var(--height) * 1.75);
|
|
82
|
+
left: 500px;
|
|
83
|
+
top: -150px;
|
|
84
|
+
transform: rotate(-180deg);
|
|
85
|
+
width: calc(var(--width) * 1.75);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
useEffect,
|
|
6
|
+
useInsertionEffect,
|
|
7
|
+
} from 'react'
|
|
8
|
+
|
|
9
|
+
import PropTypes from 'prop-types'
|
|
10
|
+
|
|
11
|
+
import styleNames from '@pareto-engineering/bem/exports'
|
|
12
|
+
|
|
13
|
+
import { Gradient } from './webGIRenderer'
|
|
14
|
+
|
|
15
|
+
// Local Definitions
|
|
16
|
+
|
|
17
|
+
const baseClassName = styleNames.base
|
|
18
|
+
|
|
19
|
+
const componentClassName = 'animated-gradient'
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* This is the component description.
|
|
23
|
+
*/
|
|
24
|
+
const AnimatedGradient = ({
|
|
25
|
+
className: userClassName,
|
|
26
|
+
// ...otherProps
|
|
27
|
+
}) => {
|
|
28
|
+
useInsertionEffect(() => {
|
|
29
|
+
import('./styles.scss')
|
|
30
|
+
}, [])
|
|
31
|
+
|
|
32
|
+
const isClient = typeof window !== 'undefined'
|
|
33
|
+
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
// Only initialize the Gradient if we're in the browser
|
|
36
|
+
if (isClient) {
|
|
37
|
+
const gradient = new Gradient()
|
|
38
|
+
gradient.initGradient('#gradient-canvas')
|
|
39
|
+
}
|
|
40
|
+
}, [])
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<canvas
|
|
44
|
+
id="gradient-canvas"
|
|
45
|
+
data-transition-in
|
|
46
|
+
className={[
|
|
47
|
+
baseClassName,
|
|
48
|
+
componentClassName,
|
|
49
|
+
userClassName,
|
|
50
|
+
]
|
|
51
|
+
.filter((e) => e)
|
|
52
|
+
.join(' ')}
|
|
53
|
+
// {...otherProps}
|
|
54
|
+
/>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
AnimatedGradient.propTypes = {
|
|
59
|
+
/**
|
|
60
|
+
* The HTML class names for this element
|
|
61
|
+
*/
|
|
62
|
+
className:PropTypes.string,
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
AnimatedGradient.defaultProps = {
|
|
66
|
+
// primaryColor:'black',
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export default AnimatedGradient
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AnimatedGradient } from './AnimatedGradient'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
|
|
5
|
+
.#{bem.$base}.animated-gradient {
|
|
6
|
+
--gradient-color-1: var(--background-mesh);
|
|
7
|
+
--gradient-color-2: var(--soft-background-mesh);
|
|
8
|
+
--gradient-color-3: var(--background-mesh);
|
|
9
|
+
--gradient-color-4: var(--soft-background-mesh);
|
|
10
|
+
height: 100%;
|
|
11
|
+
left: 0;
|
|
12
|
+
top: 0;
|
|
13
|
+
width: 100%;
|
|
14
|
+
}
|