@pareto-engineering/design-system 2.0.0-alpha.39 → 2.0.0-alpha.41
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/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +11 -4
- 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/TextInput/TextInput.js +10 -3
- package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +11 -4
- 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/TextInput/TextInput.js +10 -3
- package/package.json +1 -1
- package/src/__snapshots__/Storyshots.test.js.snap +655 -625
- package/src/stories/f/RatingsInput.stories.jsx +3 -2
- package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +8 -1
- 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/TextInput/TextInput.jsx +7 -0
- package/dist/cjs/a/GradientBackground/GradientBackground.js +0 -140
- package/dist/cjs/a/GradientBackground/index.js +0 -15
- package/dist/cjs/a/GradientBackground/styles.scss +0 -191
- package/dist/cjs/c/AcceptCookies/AcceptCookies.js +0 -134
- package/dist/cjs/c/AcceptCookies/index.js +0 -15
- package/dist/cjs/c/AcceptCookies/styles.scss +0 -49
- package/dist/cjs/c/BlogCategoryButton/BlogCategoryButton.js +0 -95
- package/dist/cjs/c/BlogCategoryButton/index.js +0 -15
- package/dist/cjs/c/BlogContext/BlogContextProvider.js +0 -63
- package/dist/cjs/c/BlogContext/Context.js +0 -16
- package/dist/cjs/c/BlogContext/ContextProvider.js +0 -63
- package/dist/cjs/c/BlogContext/index.js +0 -31
- package/dist/cjs/c/BlogContext/useBlog.js +0 -16
- package/dist/cjs/c/BlogPost/BlogPost.js +0 -147
- package/dist/cjs/c/BlogPost/index.js +0 -15
- package/dist/cjs/c/BlogPost/styles.scss +0 -33
- package/dist/cjs/c/BlogPostsList/BlogPostsList.js +0 -73
- package/dist/cjs/c/BlogPostsList/common/Card/Card.js +0 -170
- package/dist/cjs/c/BlogPostsList/common/Card/index.js +0 -15
- package/dist/cjs/c/BlogPostsList/common/index.js +0 -13
- package/dist/cjs/c/BlogPostsList/index.js +0 -15
- package/dist/cjs/c/BlogPostsList/styles.scss +0 -72
- package/dist/cjs/c/SiteFooter/SiteFooter.js +0 -73
- package/dist/cjs/c/SiteFooter/common/Section/Section.js +0 -95
- package/dist/cjs/c/SiteFooter/common/Section/index.js +0 -15
- package/dist/cjs/c/SiteFooter/common/index.js +0 -13
- package/dist/cjs/c/SiteFooter/index.js +0 -15
- package/dist/cjs/c/SiteFooter/styles.scss +0 -34
- package/dist/cjs/c/SiteHeaderCTA/SiteHeaderCTA.js +0 -108
- package/dist/cjs/c/SiteHeaderCTA/index.js +0 -15
- package/dist/cjs/c/SiteHeaderCTA/styles.scss +0 -44
- package/dist/cjs/c/SiteMission/SiteMission.js +0 -113
- package/dist/cjs/c/SiteMission/index.js +0 -15
- package/dist/cjs/c/SiteMission/styles.scss +0 -30
- package/dist/cjs/c/SiteNavigation/SiteNavigation.js +0 -130
- package/dist/cjs/c/SiteNavigation/index.js +0 -15
- package/dist/cjs/c/SiteNavigation/styles.scss +0 -118
- package/dist/cjs/c/SiteOnboardingStep/SiteOnboardingStep.js +0 -98
- package/dist/cjs/c/SiteOnboardingStep/index.js +0 -15
- package/dist/cjs/c/SiteOnboardingStep/styles.scss +0 -51
- package/dist/cjs/c/SitePricing/SitePricing.js +0 -108
- package/dist/cjs/c/SitePricing/index.js +0 -15
- package/dist/cjs/c/SitePricing/styles.scss +0 -73
- package/dist/cjs/c/SiteServices/SiteServices.js +0 -211
- package/dist/cjs/c/SiteServices/index.js +0 -15
- package/dist/cjs/c/SiteServices/styles.scss +0 -138
- package/dist/cjs/c/TeamGallery/TeamGallery.js +0 -80
- package/dist/cjs/c/TeamGallery/common/PersonCard/PersonCard.js +0 -84
- package/dist/cjs/c/TeamGallery/common/PersonCard/index.js +0 -15
- package/dist/cjs/c/TeamGallery/common/index.js +0 -13
- package/dist/cjs/c/TeamGallery/index.js +0 -15
- package/dist/cjs/c/TeamGallery/styles.scss +0 -100
- package/dist/cjs/c/Testimonials/Testimonials.js +0 -119
- package/dist/cjs/c/Testimonials/index.js +0 -15
- package/dist/cjs/c/Testimonials/styles.scss +0 -112
- package/dist/cjs/experimental/GradientBackground/GradientBackground.js +0 -98
- package/dist/cjs/experimental/GradientBackground/index.js +0 -15
- package/dist/cjs/experimental/GradientBackground/styles.scss +0 -64
- package/dist/cjs/experimental/index.js +0 -13
- package/dist/cjs/f/fields/CheckboxInput/CheckboxInput.js +0 -105
- package/dist/cjs/f/fields/CheckboxInput/index.js +0 -15
- package/dist/cjs/f/fields/CheckboxInput/styles.scss +0 -28
- package/dist/cjs/f/fields/RadioInput/RadioInput.js +0 -110
- package/dist/cjs/f/fields/RadioInput/index.js +0 -15
- package/dist/cjs/f/fields/RadioInput/styles.scss +0 -26
- package/dist/cjs/f/fields/TaskRecommendation/TaskRecommendation.js +0 -129
- package/dist/cjs/f/fields/TaskRecommendation/index.js +0 -15
- package/dist/cjs/f/fields/TaskRecommendation/styles.scss +0 -37
- package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +0 -131
- package/dist/cjs/f/fields/TaskRecommendationInput/index.js +0 -15
- package/dist/cjs/f/fields/TaskRecommendationInput/styles.scss +0 -41
- package/dist/cjs/f/fields/TextArea/TextArea.js +0 -141
- package/dist/cjs/f/fields/TextArea/index.js +0 -15
- package/dist/cjs/f/fields/TextArea/styles.scss +0 -19
- package/dist/es/a/GradientBackground/GradientBackground.js +0 -118
- package/dist/es/a/GradientBackground/index.js +0 -2
- package/dist/es/a/GradientBackground/styles.scss +0 -191
- package/dist/es/c/AcceptCookies/AcceptCookies.js +0 -117
- package/dist/es/c/AcceptCookies/index.js +0 -2
- package/dist/es/c/AcceptCookies/styles.scss +0 -49
- package/dist/es/c/BlogCategoryButton/BlogCategoryButton.js +0 -68
- package/dist/es/c/BlogCategoryButton/index.js +0 -2
- package/dist/es/c/BlogContext/BlogContextProvider.js +0 -45
- package/dist/es/c/BlogContext/Context.js +0 -2
- package/dist/es/c/BlogContext/ContextProvider.js +0 -45
- package/dist/es/c/BlogContext/index.js +0 -4
- package/dist/es/c/BlogContext/useBlog.js +0 -3
- package/dist/es/c/BlogPost/BlogPost.js +0 -128
- package/dist/es/c/BlogPost/index.js +0 -2
- package/dist/es/c/BlogPost/styles.scss +0 -33
- package/dist/es/c/BlogPostsList/BlogPostsList.js +0 -56
- package/dist/es/c/BlogPostsList/common/Card/Card.js +0 -143
- package/dist/es/c/BlogPostsList/common/Card/index.js +0 -2
- package/dist/es/c/BlogPostsList/common/index.js +0 -1
- package/dist/es/c/BlogPostsList/index.js +0 -2
- package/dist/es/c/BlogPostsList/styles.scss +0 -72
- package/dist/es/c/SiteFooter/SiteFooter.js +0 -56
- package/dist/es/c/SiteFooter/common/Section/Section.js +0 -73
- package/dist/es/c/SiteFooter/common/Section/index.js +0 -2
- package/dist/es/c/SiteFooter/common/index.js +0 -1
- package/dist/es/c/SiteFooter/index.js +0 -2
- package/dist/es/c/SiteFooter/styles.scss +0 -34
- package/dist/es/c/SiteHeaderCTA/SiteHeaderCTA.js +0 -92
- package/dist/es/c/SiteHeaderCTA/index.js +0 -2
- package/dist/es/c/SiteHeaderCTA/styles.scss +0 -44
- package/dist/es/c/SiteMission/SiteMission.js +0 -96
- package/dist/es/c/SiteMission/index.js +0 -2
- package/dist/es/c/SiteMission/styles.scss +0 -30
- package/dist/es/c/SiteNavigation/SiteNavigation.js +0 -111
- package/dist/es/c/SiteNavigation/index.js +0 -2
- package/dist/es/c/SiteNavigation/styles.scss +0 -118
- package/dist/es/c/SiteOnboardingStep/SiteOnboardingStep.js +0 -81
- package/dist/es/c/SiteOnboardingStep/index.js +0 -2
- package/dist/es/c/SiteOnboardingStep/styles.scss +0 -51
- package/dist/es/c/SitePricing/SitePricing.js +0 -91
- package/dist/es/c/SitePricing/index.js +0 -2
- package/dist/es/c/SitePricing/styles.scss +0 -73
- package/dist/es/c/SiteServices/SiteServices.js +0 -195
- package/dist/es/c/SiteServices/index.js +0 -2
- package/dist/es/c/SiteServices/styles.scss +0 -138
- package/dist/es/c/TeamGallery/TeamGallery.js +0 -64
- package/dist/es/c/TeamGallery/common/PersonCard/PersonCard.js +0 -64
- package/dist/es/c/TeamGallery/common/PersonCard/index.js +0 -2
- package/dist/es/c/TeamGallery/common/index.js +0 -1
- package/dist/es/c/TeamGallery/index.js +0 -2
- package/dist/es/c/TeamGallery/styles.scss +0 -100
- package/dist/es/c/Testimonials/Testimonials.js +0 -99
- package/dist/es/c/Testimonials/index.js +0 -2
- package/dist/es/c/Testimonials/styles.scss +0 -112
- package/dist/es/experimental/GradientBackground/GradientBackground.js +0 -76
- package/dist/es/experimental/GradientBackground/index.js +0 -2
- package/dist/es/experimental/GradientBackground/styles.scss +0 -64
- package/dist/es/experimental/index.js +0 -1
- package/dist/es/f/fields/CheckboxInput/CheckboxInput.js +0 -85
- package/dist/es/f/fields/CheckboxInput/index.js +0 -2
- package/dist/es/f/fields/CheckboxInput/styles.scss +0 -28
- package/dist/es/f/fields/RadioInput/RadioInput.js +0 -90
- package/dist/es/f/fields/RadioInput/index.js +0 -2
- package/dist/es/f/fields/RadioInput/styles.scss +0 -26
- package/dist/es/f/fields/TaskRecommendation/TaskRecommendation.js +0 -111
- package/dist/es/f/fields/TaskRecommendation/index.js +0 -2
- package/dist/es/f/fields/TaskRecommendation/styles.scss +0 -37
- package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +0 -111
- package/dist/es/f/fields/TaskRecommendationInput/index.js +0 -2
- package/dist/es/f/fields/TaskRecommendationInput/styles.scss +0 -41
- package/dist/es/f/fields/TextArea/TextArea.js +0 -124
- package/dist/es/f/fields/TextArea/index.js +0 -2
- package/dist/es/f/fields/TextArea/styles.scss +0 -19
|
@@ -29,14 +29,14 @@ export default {
|
|
|
29
29
|
|
|
30
30
|
export const Base = () => (
|
|
31
31
|
<>
|
|
32
|
-
<RatingsInput ratingCount={5} name="ratings" />
|
|
32
|
+
<RatingsInput ratingCount={5} name="ratings" label="Your Rating" />
|
|
33
33
|
<FormDebugger />
|
|
34
34
|
</>
|
|
35
35
|
)
|
|
36
36
|
|
|
37
37
|
export const Numbers = () => (
|
|
38
38
|
<>
|
|
39
|
-
<RatingsInput ratingCount={10} name="ratings" showRatingValue />
|
|
39
|
+
<RatingsInput ratingCount={10} name="ratings" showRatingValue label="Your Rating" />
|
|
40
40
|
<FormDebugger />
|
|
41
41
|
</>
|
|
42
42
|
)
|
|
@@ -44,6 +44,7 @@ export const Numbers = () => (
|
|
|
44
44
|
export const Labels = () => (
|
|
45
45
|
<>
|
|
46
46
|
<RatingsInput
|
|
47
|
+
label="Your Rating"
|
|
47
48
|
labelMax="very satisfied."
|
|
48
49
|
labelMin="not satisfied."
|
|
49
50
|
ratingCount={10}
|
|
@@ -24,6 +24,7 @@ const HorizontalMenu = ({
|
|
|
24
24
|
hideBackIcon,
|
|
25
25
|
stepsBackwards,
|
|
26
26
|
customPrevStep,
|
|
27
|
+
color,
|
|
27
28
|
// ...otherProps
|
|
28
29
|
}) => {
|
|
29
30
|
const {
|
|
@@ -59,7 +60,7 @@ const HorizontalMenu = ({
|
|
|
59
60
|
>
|
|
60
61
|
{
|
|
61
62
|
(currentStep?.progress > 0)
|
|
62
|
-
&& <ProgressBar progress={currentStep.progress} attached height=".4em" color=
|
|
63
|
+
&& <ProgressBar progress={currentStep.progress} attached height=".4em" color={color} className="y-background1 b-dark-y" />
|
|
63
64
|
}
|
|
64
65
|
<div className={styleNames.elementContent}>
|
|
65
66
|
<div className="left">
|
|
@@ -128,11 +129,17 @@ HorizontalMenu.propTypes = {
|
|
|
128
129
|
* Hide back icon boolean
|
|
129
130
|
*/
|
|
130
131
|
hideBackIcon:PropTypes.bool,
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* String that will represent color for Progress bar
|
|
135
|
+
*/
|
|
136
|
+
color:PropTypes.string,
|
|
131
137
|
}
|
|
132
138
|
|
|
133
139
|
HorizontalMenu.defaultProps = {
|
|
134
140
|
logoColor :'paragraph',
|
|
135
141
|
stepsBackwards:1,
|
|
142
|
+
color :'main2',
|
|
136
143
|
}
|
|
137
144
|
|
|
138
145
|
export default HorizontalMenu
|
|
@@ -10,6 +10,7 @@ import styleNames from '@pareto-engineering/bem'
|
|
|
10
10
|
// Local Definitions
|
|
11
11
|
|
|
12
12
|
import { Rating } from './common'
|
|
13
|
+
import { FormLabel } from '../../common'
|
|
13
14
|
|
|
14
15
|
const baseClassName = styleNames.base
|
|
15
16
|
|
|
@@ -25,9 +26,13 @@ const RatingsInput = ({
|
|
|
25
26
|
name,
|
|
26
27
|
ratingCount,
|
|
27
28
|
showRatingValue,
|
|
29
|
+
oneInputLabel,
|
|
30
|
+
label,
|
|
31
|
+
labelColor,
|
|
28
32
|
labelMax,
|
|
29
33
|
labelMin,
|
|
30
34
|
displayRatingsLabel,
|
|
35
|
+
optional,
|
|
31
36
|
// ...otherProps
|
|
32
37
|
}) => {
|
|
33
38
|
useLayoutEffect(() => {
|
|
@@ -47,24 +52,36 @@ const RatingsInput = ({
|
|
|
47
52
|
.filter((e) => e)
|
|
48
53
|
.join(' ')}
|
|
49
54
|
style={style}
|
|
50
|
-
// {...otherProps}
|
|
51
55
|
>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
)
|
|
66
|
-
|
|
67
|
-
|
|
56
|
+
<FormLabel
|
|
57
|
+
className={[
|
|
58
|
+
'input-label', oneInputLabel ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v']
|
|
59
|
+
.filter((e) => e)
|
|
60
|
+
.join(' ')}
|
|
61
|
+
name={name}
|
|
62
|
+
color={labelColor}
|
|
63
|
+
optional={optional}
|
|
64
|
+
>
|
|
65
|
+
{ label }
|
|
66
|
+
</FormLabel>
|
|
67
|
+
<div className="stars">
|
|
68
|
+
{displayRatingsLabel && <p className="label-text md-s-1 s-2 x-metadata c-x">{labelMin}</p>}
|
|
69
|
+
{[...Array(ratingCount)].map((_, index) => {
|
|
70
|
+
const ratingValue = index + 1
|
|
71
|
+
return (
|
|
72
|
+
<Rating
|
|
73
|
+
key={ratingValue}
|
|
74
|
+
ratingId={`${name}-${ratingValue}`}
|
|
75
|
+
value={ratingValue}
|
|
76
|
+
name={name}
|
|
77
|
+
hover={hover}
|
|
78
|
+
setHover={setHover}
|
|
79
|
+
showRatingValue={showRatingValue}
|
|
80
|
+
/>
|
|
81
|
+
)
|
|
82
|
+
})}
|
|
83
|
+
{displayRatingsLabel && <p className="label-text md-s-1 s-2 x-metadata c-x">{labelMax}</p>}
|
|
84
|
+
</div>
|
|
68
85
|
</div>
|
|
69
86
|
)
|
|
70
87
|
}
|
|
@@ -97,6 +114,10 @@ RatingsInput.propTypes = {
|
|
|
97
114
|
* Determines if the rating start value should be shown
|
|
98
115
|
*/
|
|
99
116
|
showRatingValue :PropTypes.bool,
|
|
117
|
+
/**
|
|
118
|
+
* The label of the ratings input
|
|
119
|
+
*/
|
|
120
|
+
label :PropTypes.string.isRequired,
|
|
100
121
|
/**
|
|
101
122
|
* description for the highest rating value
|
|
102
123
|
*/
|
|
@@ -109,11 +130,25 @@ RatingsInput.propTypes = {
|
|
|
109
130
|
* If the rating lables should be shown
|
|
110
131
|
*/
|
|
111
132
|
displayRatingsLabel:PropTypes.bool,
|
|
133
|
+
/**
|
|
134
|
+
* Whether the input is optional or not
|
|
135
|
+
*/
|
|
136
|
+
optional :PropTypes.bool,
|
|
137
|
+
/**
|
|
138
|
+
* If the slide will only have one input
|
|
139
|
+
*/
|
|
140
|
+
oneInputLabel :PropTypes.bool,
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* String that will represent color for the label
|
|
144
|
+
*/
|
|
145
|
+
labelColor:PropTypes.string,
|
|
112
146
|
}
|
|
113
147
|
|
|
114
148
|
RatingsInput.defaultProps = {
|
|
115
|
-
labelMin:'not satisfied.',
|
|
116
|
-
labelMax:'very satisfied.',
|
|
149
|
+
labelMin :'not satisfied.',
|
|
150
|
+
labelMax :'very satisfied.',
|
|
151
|
+
labelColor:'main2',
|
|
117
152
|
}
|
|
118
153
|
|
|
119
154
|
export default memo(RatingsInput)
|
|
@@ -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
|
|
|
@@ -34,6 +34,7 @@ const TextInput = ({
|
|
|
34
34
|
description,
|
|
35
35
|
disabled,
|
|
36
36
|
placeholder,
|
|
37
|
+
optional,
|
|
37
38
|
// ...otherProps
|
|
38
39
|
}) => {
|
|
39
40
|
useLayoutEffect(() => {
|
|
@@ -62,6 +63,7 @@ const TextInput = ({
|
|
|
62
63
|
.join(' ')}
|
|
63
64
|
name={name}
|
|
64
65
|
color={labelColor}
|
|
66
|
+
optional={optional}
|
|
65
67
|
>
|
|
66
68
|
{ label }
|
|
67
69
|
</FormLabel>
|
|
@@ -156,6 +158,11 @@ TextInput.propTypes = {
|
|
|
156
158
|
* The text input color
|
|
157
159
|
*/
|
|
158
160
|
color:PropTypes.string,
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Whether the input is optional or not
|
|
164
|
+
*/
|
|
165
|
+
optional:PropTypes.bool,
|
|
159
166
|
}
|
|
160
167
|
|
|
161
168
|
TextInput.defaultProps = {
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
var _bem = _interopRequireDefault(require("@pareto-engineering/bem"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
|
-
|
|
20
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
-
|
|
22
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
-
|
|
24
|
-
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; }
|
|
25
|
-
|
|
26
|
-
// Local Definitions
|
|
27
|
-
var baseClassName = _bem.default.base;
|
|
28
|
-
var componentClassName = 'gradient-background';
|
|
29
|
-
/**
|
|
30
|
-
* This is the component description.
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
var GradientBackground = _ref => {
|
|
34
|
-
var {
|
|
35
|
-
id,
|
|
36
|
-
className: userClassName,
|
|
37
|
-
style,
|
|
38
|
-
pin,
|
|
39
|
-
shape,
|
|
40
|
-
height,
|
|
41
|
-
width // ...otherProps
|
|
42
|
-
|
|
43
|
-
} = _ref;
|
|
44
|
-
(0, React.useLayoutEffect)(() => {
|
|
45
|
-
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
46
|
-
}, []);
|
|
47
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
48
|
-
id: id,
|
|
49
|
-
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
50
|
-
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
51
|
-
'--pin': pin,
|
|
52
|
-
'--height': height,
|
|
53
|
-
'--width': width
|
|
54
|
-
}) // {...otherProps}
|
|
55
|
-
|
|
56
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
57
|
-
className: "shapes"
|
|
58
|
-
}, shape === 'triangle' && /*#__PURE__*/React.createElement("div", {
|
|
59
|
-
className: "triangle"
|
|
60
|
-
}), shape === 'half-ellipses' && /*#__PURE__*/React.createElement("div", {
|
|
61
|
-
className: "half-ellipses"
|
|
62
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
63
|
-
className: "up"
|
|
64
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
65
|
-
className: "down"
|
|
66
|
-
})), shape === 'ellipse' && /*#__PURE__*/React.createElement("div", {
|
|
67
|
-
className: "ellipse"
|
|
68
|
-
}), shape === 'diamonds' && /*#__PURE__*/React.createElement("div", {
|
|
69
|
-
className: "diamonds"
|
|
70
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
71
|
-
className: "top-right"
|
|
72
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
73
|
-
className: "bottom-left"
|
|
74
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
75
|
-
className: "bottom-right"
|
|
76
|
-
})), shape === 'rectangles' && /*#__PURE__*/React.createElement("div", {
|
|
77
|
-
className: "rectangles"
|
|
78
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
79
|
-
className: "top"
|
|
80
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
81
|
-
className: "center"
|
|
82
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
83
|
-
className: "bottom"
|
|
84
|
-
})), shape === 'half-ellipse' && /*#__PURE__*/React.createElement("div", {
|
|
85
|
-
className: "half-ellipse"
|
|
86
|
-
}), shape === 'circle' && /*#__PURE__*/React.createElement("div", {
|
|
87
|
-
className: "circle"
|
|
88
|
-
}), shape === 'half-circle' && /*#__PURE__*/React.createElement("div", {
|
|
89
|
-
className: "half-circle"
|
|
90
|
-
}), shape === 'ellipses' && /*#__PURE__*/React.createElement("div", {
|
|
91
|
-
className: "ellipses"
|
|
92
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
93
|
-
className: "first"
|
|
94
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
95
|
-
className: "second"
|
|
96
|
-
})), shape === 'spiral' && /*#__PURE__*/React.createElement("div", {
|
|
97
|
-
className: "spiral"
|
|
98
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
99
|
-
className: "quater-circle-one"
|
|
100
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
101
|
-
className: "quater-circle-two"
|
|
102
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
103
|
-
className: "quater-circle-three"
|
|
104
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
105
|
-
className: "quater-circle-four"
|
|
106
|
-
}))));
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
GradientBackground.propTypes = {
|
|
110
|
-
/**
|
|
111
|
-
* The HTML id for this element
|
|
112
|
-
*/
|
|
113
|
-
id: _propTypes.default.string,
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* The HTML class names for this element
|
|
117
|
-
*/
|
|
118
|
-
className: _propTypes.default.string,
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* The React-written, css properties for this element.
|
|
122
|
-
*/
|
|
123
|
-
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Where to pin the shapes
|
|
127
|
-
*/
|
|
128
|
-
pin: _propTypes.default.oneOf(['flex-start', 'center', 'flex-end']),
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* The options of a shape to use
|
|
132
|
-
*/
|
|
133
|
-
shape: _propTypes.default.oneOf(['triangle', 'ellipse', 'half-ellipse', 'half-ellipses', 'spiral', 'diamonds', 'circle', 'half-circle', 'ellipses', 'rectangles'])
|
|
134
|
-
};
|
|
135
|
-
GradientBackground.defaultProps = {
|
|
136
|
-
pin: 'center',
|
|
137
|
-
shape: 'triangle'
|
|
138
|
-
};
|
|
139
|
-
var _default = GradientBackground;
|
|
140
|
-
exports.default = _default;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "GradientBackground", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _GradientBackground.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
var _GradientBackground = _interopRequireDefault(require("./GradientBackground"));
|
|
14
|
-
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
-
|
|
3
|
-
@use "@pareto-engineering/bem";
|
|
4
|
-
|
|
5
|
-
$default-triangle-dimension:30em;
|
|
6
|
-
$default-ellipses-dimension:50em;
|
|
7
|
-
$default-ellipse-dimension:50em;
|
|
8
|
-
$default-shapes-opacity:.8;
|
|
9
|
-
$default-diamonds-dimension:40em;
|
|
10
|
-
$default-circle-dimension:40em;
|
|
11
|
-
|
|
12
|
-
.#{bem.$base}.gradient-background {
|
|
13
|
-
align-items: center;
|
|
14
|
-
background: var(--light-y);
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
height: 100%;
|
|
18
|
-
justify-content: var(--pin);
|
|
19
|
-
position: absolute;
|
|
20
|
-
width: 100%;
|
|
21
|
-
|
|
22
|
-
.shapes {
|
|
23
|
-
display: flex;
|
|
24
|
-
justify-content: center;
|
|
25
|
-
|
|
26
|
-
.triangle {
|
|
27
|
-
background-image: linear-gradient(var(--light-y), var(--dark-y));
|
|
28
|
-
clip-path: polygon(0 0, 50% 100%, 100% 0);
|
|
29
|
-
height: $default-triangle-dimension * .86;
|
|
30
|
-
opacity: $default-shapes-opacity;
|
|
31
|
-
width: $default-triangle-dimension;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.half-ellipses {
|
|
35
|
-
|
|
36
|
-
height: $default-ellipses-dimension / 2;
|
|
37
|
-
width: $default-ellipses-dimension;
|
|
38
|
-
opacity: $default-shapes-opacity;
|
|
39
|
-
|
|
40
|
-
.up {
|
|
41
|
-
background-image: linear-gradient(var(--light-y), var(--y));
|
|
42
|
-
clip-path: ellipse(40% 100% at 50% 0%);
|
|
43
|
-
height:50%;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.down {
|
|
47
|
-
background-image: linear-gradient(to top, var(--light-y), var(--y));
|
|
48
|
-
clip-path: ellipse(40% 100% at 50% 100%);
|
|
49
|
-
height:50%;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.ellipse {
|
|
55
|
-
height: $default-ellipse-dimension / 1.5;
|
|
56
|
-
width: $default-ellipse-dimension;
|
|
57
|
-
background-image: linear-gradient( to top left, var(--dark-y), var(--light-y),var(--dark-y));
|
|
58
|
-
clip-path: ellipse(50% 25% at 50% 50%);
|
|
59
|
-
opacity: $default-shapes-opacity;
|
|
60
|
-
transform: rotate3d(0, 0, -1, 10deg);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.diamonds {
|
|
64
|
-
|
|
65
|
-
height: $default-diamonds-dimension;
|
|
66
|
-
width: $default-diamonds-dimension;
|
|
67
|
-
opacity: $default-shapes-opacity;
|
|
68
|
-
position: relative;
|
|
69
|
-
|
|
70
|
-
.top-right {
|
|
71
|
-
height: 100%;
|
|
72
|
-
width: 100%;
|
|
73
|
-
background-image: linear-gradient(to right, var(--dark-y), var(--y));
|
|
74
|
-
clip-path: polygon(100% 100%, 0 0, 100% 0);
|
|
75
|
-
position: absolute;
|
|
76
|
-
}
|
|
77
|
-
.bottom-left {
|
|
78
|
-
height: 100%;
|
|
79
|
-
width: 100%;
|
|
80
|
-
background-image: linear-gradient(to left, var(--dark-y), var(--y));
|
|
81
|
-
clip-path: polygon(0 100%, 0 0, 100% 100%);
|
|
82
|
-
position: absolute;
|
|
83
|
-
z-index: 1;
|
|
84
|
-
opacity: .95;
|
|
85
|
-
}
|
|
86
|
-
.bottom-right {
|
|
87
|
-
height: 100%;
|
|
88
|
-
width: 100%;
|
|
89
|
-
background-image: linear-gradient(to bottom, var(--dark-y), var(--y));
|
|
90
|
-
clip-path: polygon(100% 100%, 100% 0, 0 100%);
|
|
91
|
-
position: absolute;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.rectangles {
|
|
96
|
-
height: $default-diamonds-dimension;
|
|
97
|
-
width: $default-diamonds-dimension;
|
|
98
|
-
opacity: $default-shapes-opacity;
|
|
99
|
-
display: grid;
|
|
100
|
-
grid-template-rows: repeat(3, 1fr);
|
|
101
|
-
|
|
102
|
-
.top {
|
|
103
|
-
background-image: linear-gradient(to right, var(--dark-y), var(--y));
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.center {
|
|
107
|
-
background-image: linear-gradient(to left, var(--dark-y), var(--y));
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.bottom {
|
|
111
|
-
background-image: linear-gradient(to right, var(--dark-y), var(--y));
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.half-ellipse {
|
|
116
|
-
height: $default-ellipses-dimension / 2;
|
|
117
|
-
width: $default-ellipses-dimension;
|
|
118
|
-
opacity: $default-shapes-opacity;
|
|
119
|
-
background-image: linear-gradient(var(--light-y), var(--dark-y));
|
|
120
|
-
clip-path: ellipse(50% 50% at 50% 0);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.circle {
|
|
124
|
-
height: $default-circle-dimension;
|
|
125
|
-
width: $default-circle-dimension;
|
|
126
|
-
opacity: $default-shapes-opacity;
|
|
127
|
-
background-image: linear-gradient(var(--light-y), var(--dark-y));
|
|
128
|
-
clip-path: circle(50% at 50% 50%);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.ellipses {
|
|
132
|
-
height: var(--height);
|
|
133
|
-
width: var(--width);
|
|
134
|
-
opacity: $default-shapes-opacity;
|
|
135
|
-
position: relative;
|
|
136
|
-
|
|
137
|
-
.first {
|
|
138
|
-
height: 100%;
|
|
139
|
-
width: 100%;
|
|
140
|
-
position: absolute;
|
|
141
|
-
background-image: linear-gradient(to top, var(--dark-y), var(--light-y));
|
|
142
|
-
clip-path: ellipse(50% 20% at 50% 60%);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.second{
|
|
146
|
-
height: 100%;
|
|
147
|
-
width: 100%;
|
|
148
|
-
position: absolute;
|
|
149
|
-
background-image: linear-gradient(to bottom, var(--dark-y), var(--light-y));
|
|
150
|
-
clip-path: ellipse(50% 20% at 50% 40%);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// .spiral {
|
|
156
|
-
// height: $default-ellipses-dimension;
|
|
157
|
-
// width: $default-ellipses-dimension;
|
|
158
|
-
// opacity: $default-shapes-opacity;
|
|
159
|
-
// position: relative;
|
|
160
|
-
|
|
161
|
-
// > *{
|
|
162
|
-
// position: absolute;
|
|
163
|
-
// height: 100%;
|
|
164
|
-
// width: 100%;
|
|
165
|
-
// background: radial-gradient(var(--dark-y) 30%, var(--light-y));
|
|
166
|
-
// transform-origin: 0 0;
|
|
167
|
-
// }
|
|
168
|
-
|
|
169
|
-
// .quater-circle-one{
|
|
170
|
-
// transform: rotate(90deg);
|
|
171
|
-
// clip-path: circle(200px at 0 0);
|
|
172
|
-
// z-index: 1;
|
|
173
|
-
// }
|
|
174
|
-
|
|
175
|
-
// .quater-circle-two {
|
|
176
|
-
// clip-path: circle(250px at 0 0);
|
|
177
|
-
// transform: rotate(45deg);
|
|
178
|
-
// }
|
|
179
|
-
|
|
180
|
-
// .quater-circle-three {
|
|
181
|
-
// clip-path: circle(300px at 0 0);
|
|
182
|
-
// }
|
|
183
|
-
|
|
184
|
-
// .quater-circle-four{
|
|
185
|
-
// clip-path: circle(350px at 0 0);
|
|
186
|
-
// transform: rotate(-45deg);
|
|
187
|
-
// }
|
|
188
|
-
// }
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
}
|