@pareto-engineering/design-system 2.0.0-alpha.2 → 2.0.0-alpha.6
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/AnimatedCounter/AnimatedCounter.js +16 -29
- package/dist/cjs/a/AnimatedCounter/styles.scss +3 -11
- package/dist/cjs/a/Conversation/styles.scss +2 -0
- package/dist/cjs/a/GradientBackground/GradientBackground.js +140 -0
- package/dist/cjs/a/GradientBackground/index.js +15 -0
- package/dist/cjs/a/GradientBackground/styles.scss +191 -0
- package/dist/cjs/a/People/People.js +15 -7
- package/dist/cjs/a/People/common/Person/Person.js +11 -4
- package/dist/cjs/a/People/styles.scss +13 -15
- package/dist/cjs/a/Shapes/Shapes.js +163 -0
- package/dist/cjs/a/{RatingsInput/common/Rating → Shapes}/index.js +3 -3
- package/dist/cjs/a/Shapes/styles.scss +222 -0
- package/dist/cjs/a/TeamInfo/styles.scss +2 -2
- package/dist/cjs/a/index.js +9 -1
- package/dist/cjs/b/Button/styles.scss +38 -19
- package/dist/cjs/{a/RatingsInput/RatingsInput.js → b/Metrics/Metrics.js} +30 -29
- package/dist/cjs/{a/RatingsInput → b/Metrics}/index.js +3 -3
- package/dist/cjs/b/Metrics/styles.scss +91 -0
- package/dist/cjs/b/Page/common/Section/Section.js +42 -5
- package/dist/cjs/b/Page/styles.scss +8 -2
- package/dist/cjs/b/QuestionDropdown/styles.scss +1 -1
- package/dist/cjs/b/index.js +9 -1
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +1 -1
- package/dist/cjs/experimental/GradientBackground/GradientBackground.js +98 -0
- package/dist/cjs/experimental/GradientBackground/index.js +15 -0
- package/dist/cjs/experimental/GradientBackground/styles.scss +64 -0
- package/dist/cjs/experimental/index.js +13 -0
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +1 -1
- package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
- package/dist/cjs/f/fields/SelectInput/styles.scss +3 -3
- package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +2 -2
- package/dist/cjs/f/fields/TaskRecommendationInput/styles.scss +4 -0
- package/dist/cjs/f/fields/TextInput/styles.scss +3 -3
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +1 -1
- package/dist/cjs/form.scss +1 -1
- package/dist/es/a/AnimatedCounter/AnimatedCounter.js +17 -30
- package/dist/es/a/AnimatedCounter/styles.scss +3 -11
- package/dist/es/a/Conversation/styles.scss +2 -0
- package/dist/es/a/GradientBackground/GradientBackground.js +118 -0
- package/dist/es/a/GradientBackground/index.js +2 -0
- package/dist/es/a/GradientBackground/styles.scss +191 -0
- package/dist/es/a/People/People.js +14 -7
- package/dist/es/a/People/common/Person/Person.js +11 -4
- package/dist/es/a/People/styles.scss +13 -15
- package/dist/es/a/Shapes/Shapes.js +141 -0
- package/dist/es/a/{RatingsInput/common/Rating → Shapes}/index.js +1 -1
- package/dist/es/a/Shapes/styles.scss +222 -0
- package/dist/es/a/TeamInfo/styles.scss +2 -2
- package/dist/es/a/index.js +2 -1
- package/dist/es/b/Button/styles.scss +38 -19
- package/dist/es/b/Metrics/Metrics.js +72 -0
- package/dist/es/b/Metrics/index.js +2 -0
- package/dist/es/b/Metrics/styles.scss +91 -0
- package/dist/es/b/Page/common/Section/Section.js +41 -4
- package/dist/es/b/Page/styles.scss +8 -2
- package/dist/es/b/QuestionDropdown/styles.scss +1 -1
- package/dist/es/b/index.js +2 -1
- package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +1 -1
- package/dist/es/experimental/GradientBackground/GradientBackground.js +76 -0
- package/dist/es/experimental/GradientBackground/index.js +2 -0
- package/dist/es/experimental/GradientBackground/styles.scss +64 -0
- package/dist/es/experimental/index.js +1 -0
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +1 -1
- package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
- package/dist/es/f/fields/SelectInput/styles.scss +3 -3
- package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +2 -2
- package/dist/es/f/fields/TaskRecommendationInput/styles.scss +4 -0
- package/dist/es/f/fields/TextInput/styles.scss +3 -3
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +1 -1
- package/dist/es/form.scss +1 -1
- package/package.json +3 -3
- package/src/__snapshots__/Storyshots.test.js.snap +3654 -339
- package/src/local.scss +3 -0
- package/src/stories/a/AnimatedCounter.stories.jsx +9 -5
- package/src/stories/a/ContentCard.stories.jsx +1 -1
- package/src/stories/a/Conversation.stories.jsx +1 -1
- package/src/stories/a/People.stories.jsx +25 -1
- package/src/stories/a/ProgressBar.stories.jsx +1 -1
- package/src/stories/a/Quote.stories.jsx +1 -1
- package/src/stories/a/Shapes.stories.jsx +125 -0
- package/src/stories/a/Spinner.stories.jsx +1 -1
- package/src/stories/b/Button.stories.jsx +57 -51
- package/src/stories/b/Metrics.stories.jsx +62 -0
- package/src/stories/b/Page.stories.jsx +27 -1
- package/src/stories/b/ThemeSelector.stories.jsx +1 -1
- package/src/stories/b/Title.stories.jsx +1 -1
- package/src/stories/c/ContentSlides.stories.jsx +2 -2
- package/src/stories/colors.js +5 -3
- package/src/stories/f/CheckboxInput.stories.jsx +1 -1
- package/src/stories/f/TaskRecommendationInput.stories.jsx +1 -1
- package/src/stories/f/TextInput.stories.jsx +4 -4
- package/src/stories/f/TextareaInput.stories.jsx +2 -2
- package/src/ui/a/AnimatedCounter/AnimatedCounter.jsx +21 -27
- package/src/ui/a/AnimatedCounter/styles.scss +3 -11
- package/src/ui/a/Conversation/styles.scss +2 -0
- package/src/ui/a/People/People.jsx +12 -4
- package/src/ui/a/People/common/Person/Person.jsx +7 -1
- package/src/ui/a/People/styles.scss +13 -15
- package/src/ui/a/Shapes/Shapes.jsx +181 -0
- package/src/ui/a/Shapes/index.js +2 -0
- package/src/ui/a/Shapes/styles.scss +222 -0
- package/src/ui/a/TeamInfo/styles.scss +2 -2
- package/src/ui/a/index.js +1 -0
- package/src/ui/b/Button/styles.scss +38 -19
- package/src/ui/b/Metrics/Metrics.jsx +93 -0
- package/src/ui/b/Metrics/index.js +2 -0
- package/src/ui/b/Metrics/styles.scss +91 -0
- package/src/ui/b/Page/common/Section/Section.jsx +51 -2
- package/src/ui/b/Page/styles.scss +8 -2
- package/src/ui/b/QuestionDropdown/styles.scss +1 -1
- package/src/ui/b/index.js +1 -0
- package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +1 -1
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +1 -1
- package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +2 -2
- package/src/ui/f/fields/SelectInput/styles.scss +3 -3
- package/src/ui/f/fields/TaskRecommendationInput/TaskRecommendationInput.jsx +2 -2
- package/src/ui/f/fields/TaskRecommendationInput/styles.scss +4 -0
- package/src/ui/f/fields/TextInput/styles.scss +3 -3
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +1 -1
- package/src/ui/form.scss +1 -1
- package/dist/cjs/a/RatingsInput/common/Rating/Rating.js +0 -120
- package/dist/cjs/a/RatingsInput/common/index.js +0 -13
- package/dist/cjs/a/RatingsInput/styles.scss +0 -35
- package/dist/es/a/RatingsInput/RatingsInput.js +0 -72
- package/dist/es/a/RatingsInput/common/Rating/Rating.js +0 -102
- package/dist/es/a/RatingsInput/common/index.js +0 -1
- package/dist/es/a/RatingsInput/index.js +0 -2
- package/dist/es/a/RatingsInput/styles.scss +0 -35
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useLayoutEffect } from 'react'
|
|
4
|
+
import { useLayoutEffect, useCallback } from 'react'
|
|
5
5
|
|
|
6
6
|
import CountUp from 'react-countup'
|
|
7
7
|
|
|
@@ -26,10 +26,8 @@ const AnimatedCounter = ({
|
|
|
26
26
|
style,
|
|
27
27
|
color,
|
|
28
28
|
number,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
descriptionPosition,
|
|
32
|
-
unitPosition,
|
|
29
|
+
before,
|
|
30
|
+
after,
|
|
33
31
|
delay,
|
|
34
32
|
// ...otherProps
|
|
35
33
|
}) => {
|
|
@@ -37,6 +35,11 @@ const AnimatedCounter = ({
|
|
|
37
35
|
import('./styles.scss')
|
|
38
36
|
}, [])
|
|
39
37
|
|
|
38
|
+
const countDecimals = useCallback((value) => {
|
|
39
|
+
if ((value % 1) !== 0) return value.toString().split('.')[1].length
|
|
40
|
+
return 0
|
|
41
|
+
}, [])
|
|
42
|
+
|
|
40
43
|
return (
|
|
41
44
|
<div
|
|
42
45
|
id={id}
|
|
@@ -51,19 +54,17 @@ const AnimatedCounter = ({
|
|
|
51
54
|
style={style}
|
|
52
55
|
// {...otherProps}
|
|
53
56
|
>
|
|
54
|
-
{descriptionPosition === 'top' && <p className="info top-description uc s-1 md-s0">{description}</p>}
|
|
55
57
|
<div className="count s3">
|
|
56
|
-
{
|
|
57
|
-
<CountUp end={number} delay={delay} redraw>
|
|
58
|
+
{before && <span>{before}</span>}
|
|
59
|
+
<CountUp end={number} delay={delay} decimals={countDecimals(number)} redraw>
|
|
58
60
|
{({ countUpRef, start }) => (
|
|
59
61
|
<VisibilitySensor onChange={start} delayedCall>
|
|
60
62
|
<span ref={countUpRef} />
|
|
61
63
|
</VisibilitySensor>
|
|
62
64
|
)}
|
|
63
65
|
</CountUp>
|
|
64
|
-
{
|
|
66
|
+
{after && <span>{after}</span>}
|
|
65
67
|
</div>
|
|
66
|
-
{descriptionPosition === 'bottom' && <p className="info uc s-1 md-s0 v50 mt-v">{description}</p>}
|
|
67
68
|
</div>
|
|
68
69
|
)
|
|
69
70
|
}
|
|
@@ -92,33 +93,26 @@ AnimatedCounter.propTypes = {
|
|
|
92
93
|
/**
|
|
93
94
|
* The review count value
|
|
94
95
|
*/
|
|
95
|
-
number
|
|
96
|
+
number:PropTypes.number,
|
|
97
|
+
|
|
96
98
|
/**
|
|
97
|
-
* The
|
|
99
|
+
* The unit before the number
|
|
98
100
|
*/
|
|
99
|
-
|
|
101
|
+
before:PropTypes.string,
|
|
102
|
+
|
|
100
103
|
/**
|
|
101
|
-
* The
|
|
104
|
+
* The unit after the number
|
|
102
105
|
*/
|
|
103
|
-
|
|
106
|
+
after:PropTypes.string,
|
|
107
|
+
|
|
104
108
|
/**
|
|
105
109
|
* react counter delay
|
|
106
110
|
*/
|
|
107
|
-
delay
|
|
108
|
-
/**
|
|
109
|
-
* If the animated counter description should be at the top
|
|
110
|
-
*/
|
|
111
|
-
descriptionPosition:PropTypes.oneOf(['top', 'bottom']),
|
|
112
|
-
/**
|
|
113
|
-
* If the unit should be before or after the animated numbers
|
|
114
|
-
*/
|
|
115
|
-
unitPosition :PropTypes.string,
|
|
111
|
+
delay:PropTypes.number,
|
|
116
112
|
}
|
|
117
113
|
|
|
118
114
|
AnimatedCounter.defaultProps = {
|
|
119
|
-
color
|
|
120
|
-
descriptionPosition:'bottom',
|
|
121
|
-
unitPosition :'after',
|
|
115
|
+
color:'main1',
|
|
122
116
|
}
|
|
123
117
|
|
|
124
118
|
export default AnimatedCounter
|
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
|
|
3
3
|
@use "@pareto-engineering/bem";
|
|
4
|
-
|
|
4
|
+
//@use "@aztlan/stylebook/src/mixins";
|
|
5
|
+
//@use "@aztlan/stylebook/src/globals" as *;
|
|
5
6
|
|
|
6
7
|
.#{bem.$base}.animated-counter {
|
|
7
|
-
align-items: center;
|
|
8
8
|
display: flex;
|
|
9
|
-
|
|
9
|
+
justify-content: center;
|
|
10
10
|
|
|
11
11
|
.count {
|
|
12
12
|
color: var(--x);
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
.top-description {
|
|
16
|
-
margin-bottom: .5em;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.info {
|
|
20
|
-
color: var(--metadata);
|
|
21
|
-
}
|
|
22
14
|
}
|
|
23
15
|
|
|
24
16
|
|
|
@@ -7,6 +7,7 @@ $default-padding: var(--u);
|
|
|
7
7
|
$default-conversation-background: var(--y);
|
|
8
8
|
$default-message-max-width: calc(100% - #{$default-padding});
|
|
9
9
|
$default-message-min-width: 12em;
|
|
10
|
+
$default-message-border: var(--theme-border);
|
|
10
11
|
|
|
11
12
|
.#{bem.$base}.conversation {
|
|
12
13
|
display: flex;
|
|
@@ -26,6 +27,7 @@ $default-message-min-width: 12em;
|
|
|
26
27
|
border-radius: var(--theme-border-radius);
|
|
27
28
|
background-color: var(--x);
|
|
28
29
|
align-self: flex-start;
|
|
30
|
+
border: $default-message-border;
|
|
29
31
|
|
|
30
32
|
.#{bem.$element-content} {
|
|
31
33
|
display: flex;
|
|
@@ -22,8 +22,9 @@ const People = ({
|
|
|
22
22
|
id,
|
|
23
23
|
className:userClassName,
|
|
24
24
|
style,
|
|
25
|
-
|
|
25
|
+
imageSize,
|
|
26
26
|
children,
|
|
27
|
+
columnWidth,
|
|
27
28
|
// ...otherProps
|
|
28
29
|
}) => {
|
|
29
30
|
useLayoutEffect(() => {
|
|
@@ -44,8 +45,9 @@ const People = ({
|
|
|
44
45
|
.filter((e) => e)
|
|
45
46
|
.join(' ')}
|
|
46
47
|
style={{
|
|
47
|
-
'--image-height-width':imageHeightWidth,
|
|
48
48
|
...style,
|
|
49
|
+
'--image-size' :imageSize,
|
|
50
|
+
'--column-width':columnWidth,
|
|
49
51
|
}}
|
|
50
52
|
// {...otherProps}
|
|
51
53
|
>
|
|
@@ -78,11 +80,17 @@ People.propTypes = {
|
|
|
78
80
|
/**
|
|
79
81
|
* The height and width of all the person's image
|
|
80
82
|
*/
|
|
81
|
-
|
|
83
|
+
imageSize:PropTypes.string,
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The width of the a person's column
|
|
87
|
+
*/
|
|
88
|
+
columnWidth:PropTypes.string,
|
|
82
89
|
}
|
|
83
90
|
|
|
84
91
|
People.defaultProps = {
|
|
85
|
-
|
|
92
|
+
imageSize :'3em',
|
|
93
|
+
columnWidth:'12em',
|
|
86
94
|
}
|
|
87
95
|
|
|
88
96
|
People.Person = Person
|
|
@@ -21,6 +21,7 @@ const Person = ({
|
|
|
21
21
|
name,
|
|
22
22
|
image,
|
|
23
23
|
role,
|
|
24
|
+
color,
|
|
24
25
|
// ...otherProps
|
|
25
26
|
}) => (
|
|
26
27
|
<div
|
|
@@ -31,6 +32,7 @@ const Person = ({
|
|
|
31
32
|
|
|
32
33
|
componentClassName,
|
|
33
34
|
userClassName,
|
|
35
|
+
`y-${color}`,
|
|
34
36
|
]
|
|
35
37
|
.filter((e) => e)
|
|
36
38
|
.join(' ')}
|
|
@@ -72,10 +74,14 @@ Person.propTypes = {
|
|
|
72
74
|
* The person's role
|
|
73
75
|
*/
|
|
74
76
|
role :PropTypes.string.isRequired,
|
|
77
|
+
/**
|
|
78
|
+
* The base color of the person's component
|
|
79
|
+
*/
|
|
80
|
+
color:PropTypes.string,
|
|
75
81
|
}
|
|
76
82
|
|
|
77
83
|
Person.defaultProps = {
|
|
78
|
-
|
|
84
|
+
color:'background2',
|
|
79
85
|
}
|
|
80
86
|
|
|
81
87
|
export default Person
|
|
@@ -9,22 +9,26 @@ $default-person-border-radius:2em;
|
|
|
9
9
|
$default-padding:var(--u);
|
|
10
10
|
$default-horizontal-margin: .5em;
|
|
11
11
|
|
|
12
|
+
$default-grid-gap: 1em;
|
|
13
|
+
|
|
12
14
|
.#{bem.$base}.people {
|
|
13
|
-
display:
|
|
14
|
-
|
|
15
|
+
display: grid;
|
|
16
|
+
grid-template-columns: repeat(auto-fill, minmax(var(--column-width), 1fr));
|
|
17
|
+
gap:$default-grid-gap;
|
|
18
|
+
|
|
15
19
|
|
|
16
20
|
.person {
|
|
17
21
|
align-items: center;
|
|
18
|
-
background-color: var(--
|
|
22
|
+
background-color: var(--y);
|
|
19
23
|
border-radius: $default-person-border-radius;
|
|
20
24
|
display: flex;
|
|
21
|
-
|
|
25
|
+
|
|
22
26
|
padding-right: $default-padding;
|
|
23
27
|
|
|
24
28
|
.image {
|
|
25
29
|
border-radius: $default-border-radius;
|
|
26
|
-
height: var(--image-
|
|
27
|
-
width: var(--image-
|
|
30
|
+
height: var(--image-size);
|
|
31
|
+
width: var(--image-size);
|
|
28
32
|
}
|
|
29
33
|
|
|
30
34
|
.details {
|
|
@@ -34,21 +38,15 @@ $default-horizontal-margin: .5em;
|
|
|
34
38
|
|
|
35
39
|
.name {
|
|
36
40
|
margin-bottom: .25em;
|
|
41
|
+
color: var(--on-y);
|
|
37
42
|
}
|
|
38
43
|
|
|
39
44
|
.role {
|
|
40
|
-
color: var(--
|
|
45
|
+
color: var(--on-y);
|
|
46
|
+
opacity: .5;
|
|
41
47
|
}
|
|
42
48
|
}
|
|
43
49
|
}
|
|
44
|
-
|
|
45
|
-
@include mixins.media($to:$sm-md) {
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
|
|
48
|
-
>:not(:last-child) {
|
|
49
|
-
margin-bottom: var(--u);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
50
|
}
|
|
53
51
|
|
|
54
52
|
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
|
|
4
|
+
import { useLayoutEffect } from 'react'
|
|
5
|
+
|
|
6
|
+
import PropTypes from 'prop-types'
|
|
7
|
+
|
|
8
|
+
import styleNames from '@pareto-engineering/bem'
|
|
9
|
+
|
|
10
|
+
// Local Definitions
|
|
11
|
+
|
|
12
|
+
const baseClassName = styleNames.base
|
|
13
|
+
|
|
14
|
+
const componentClassName = 'shapes'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* This is the component description.
|
|
18
|
+
*/
|
|
19
|
+
const Shapes = ({
|
|
20
|
+
id,
|
|
21
|
+
className:userClassName,
|
|
22
|
+
style,
|
|
23
|
+
shape,
|
|
24
|
+
height,
|
|
25
|
+
overflow,
|
|
26
|
+
verticalAlign,
|
|
27
|
+
horizontalAlign,
|
|
28
|
+
// ...otherProps
|
|
29
|
+
}) => {
|
|
30
|
+
useLayoutEffect(() => {
|
|
31
|
+
import('./styles.scss')
|
|
32
|
+
}, [])
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div
|
|
36
|
+
id={id}
|
|
37
|
+
className={[
|
|
38
|
+
|
|
39
|
+
baseClassName,
|
|
40
|
+
|
|
41
|
+
componentClassName,
|
|
42
|
+
userClassName,
|
|
43
|
+
]
|
|
44
|
+
.filter((e) => e)
|
|
45
|
+
.join(' ')}
|
|
46
|
+
style={{
|
|
47
|
+
...style,
|
|
48
|
+
'--shape-height' :height,
|
|
49
|
+
'--overflow' :overflow,
|
|
50
|
+
'--vertical-align' :verticalAlign,
|
|
51
|
+
'--horizontal-align':horizontalAlign,
|
|
52
|
+
}}
|
|
53
|
+
// {...otherProps}
|
|
54
|
+
>
|
|
55
|
+
{ shape === 'triangle'
|
|
56
|
+
&& <div className="triangle" />}
|
|
57
|
+
{ shape === 'half-ellipses'
|
|
58
|
+
&& (
|
|
59
|
+
<div className="half-ellipses">
|
|
60
|
+
<div className="up" />
|
|
61
|
+
<div className="down" />
|
|
62
|
+
</div>
|
|
63
|
+
)}
|
|
64
|
+
{ shape === 'ellipse' && <div className="ellipse" />}
|
|
65
|
+
{ shape === 'diamonds' && (
|
|
66
|
+
<div className="diamonds">
|
|
67
|
+
<div className="top-right" />
|
|
68
|
+
<div className="bottom-left" />
|
|
69
|
+
<div className="bottom-right" />
|
|
70
|
+
</div>
|
|
71
|
+
)}
|
|
72
|
+
{ shape === 'rectangles' && (
|
|
73
|
+
<div className="rectangles">
|
|
74
|
+
<div className="top" />
|
|
75
|
+
<div className="center" />
|
|
76
|
+
<div className="bottom" />
|
|
77
|
+
</div>
|
|
78
|
+
)}
|
|
79
|
+
{ shape === 'half-ellipse' && (
|
|
80
|
+
<div className="half-ellipse" />
|
|
81
|
+
)}
|
|
82
|
+
{ shape === 'circle' && (
|
|
83
|
+
<div className="circle" />
|
|
84
|
+
)}
|
|
85
|
+
{ shape === 'half-circle' && (
|
|
86
|
+
<div className="half-circle" />
|
|
87
|
+
)}
|
|
88
|
+
{ shape === 'ellipses' && (
|
|
89
|
+
<div className="ellipses">
|
|
90
|
+
<div className="first" />
|
|
91
|
+
<div className="second" />
|
|
92
|
+
</div>
|
|
93
|
+
)}
|
|
94
|
+
{shape === 'spiral' && (
|
|
95
|
+
<div className="spiral">
|
|
96
|
+
<div className="circle-one" />
|
|
97
|
+
<div className="circle-two" />
|
|
98
|
+
<div className="circle-three" />
|
|
99
|
+
<div className="circle-four" />
|
|
100
|
+
</div>
|
|
101
|
+
)}
|
|
102
|
+
{shape === 'rotated-ellipses' && (
|
|
103
|
+
<div className="rotated-ellipses">
|
|
104
|
+
<div className="ellipse-one" />
|
|
105
|
+
<div className="ellipse-two" />
|
|
106
|
+
</div>
|
|
107
|
+
)}
|
|
108
|
+
</div>
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
Shapes.propTypes = {
|
|
113
|
+
/**
|
|
114
|
+
* The HTML id for this element
|
|
115
|
+
*/
|
|
116
|
+
id:PropTypes.string,
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The HTML class names for this element
|
|
120
|
+
*/
|
|
121
|
+
className:PropTypes.string,
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* The React-written, css properties for this element.
|
|
125
|
+
*/
|
|
126
|
+
style:PropTypes.objectOf(PropTypes.string),
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The height of the shape.
|
|
130
|
+
*/
|
|
131
|
+
height:PropTypes.string,
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The vertical alignment of the shape.
|
|
135
|
+
*/
|
|
136
|
+
verticalAlign:PropTypes.oneOf([
|
|
137
|
+
'flex-start',
|
|
138
|
+
'center',
|
|
139
|
+
'flex-end',
|
|
140
|
+
]),
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The horizontal alignment of the shape.
|
|
144
|
+
*/
|
|
145
|
+
horizontalAlign:PropTypes.oneOf([
|
|
146
|
+
'flex-start',
|
|
147
|
+
'center',
|
|
148
|
+
'flex-end',
|
|
149
|
+
]),
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The options of a shape to use
|
|
153
|
+
*/
|
|
154
|
+
shape:PropTypes.oneOf([
|
|
155
|
+
'triangle',
|
|
156
|
+
'ellipse',
|
|
157
|
+
'half-ellipse',
|
|
158
|
+
'half-ellipses',
|
|
159
|
+
'spiral',
|
|
160
|
+
'diamonds',
|
|
161
|
+
'circle',
|
|
162
|
+
'half-circle',
|
|
163
|
+
'ellipses',
|
|
164
|
+
'rectangles',
|
|
165
|
+
'rotated-ellipses',
|
|
166
|
+
]),
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The overflow of the shape.
|
|
170
|
+
*/
|
|
171
|
+
overflow:PropTypes.oneOf(['hidden', 'visible']),
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
Shapes.defaultProps = {
|
|
175
|
+
verticalAlign :'center',
|
|
176
|
+
horizontalAlign:'center',
|
|
177
|
+
shape :'triangle',
|
|
178
|
+
overflow :'hidden',
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export default Shapes
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
|
|
5
|
+
$default-ellipse-height:50em;
|
|
6
|
+
$default-diamond-height:40em;
|
|
7
|
+
$default-circle-height:50em;
|
|
8
|
+
$default-triangle-height:40em;
|
|
9
|
+
$default-rectangle-height:50em;
|
|
10
|
+
$default-shapes-opacity:.8;
|
|
11
|
+
|
|
12
|
+
.#{bem.$base}.shapes {
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
overflow: var(--overflow);
|
|
19
|
+
justify-content: var(--vertical-align);
|
|
20
|
+
align-items: var(--horizontal-align);
|
|
21
|
+
height: 100%;
|
|
22
|
+
width: 100%;
|
|
23
|
+
|
|
24
|
+
.triangle {
|
|
25
|
+
background-image: linear-gradient(transparent, var(--dark-y));
|
|
26
|
+
clip-path: polygon(0 0, 50% 100%, 100% 0);
|
|
27
|
+
height: calc(var(--shape-height, #{$default-triangle-height}) * 0.86);
|
|
28
|
+
opacity: $default-shapes-opacity;
|
|
29
|
+
width: var(--shape-height, #{$default-triangle-height});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.half-ellipses {
|
|
33
|
+
height: var(--shape-height, #{$default-ellipse-height});
|
|
34
|
+
opacity: $default-shapes-opacity;
|
|
35
|
+
width: calc(var(--shape-height, #{$default-ellipse-height}) * 2);
|
|
36
|
+
|
|
37
|
+
.up {
|
|
38
|
+
background-image: radial-gradient(ellipse at center bottom, var(--y) 5%, transparent 65%);
|
|
39
|
+
clip-path: ellipse(35% 100% at 50% 0%);
|
|
40
|
+
height: 50%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.down {
|
|
44
|
+
background-image: radial-gradient(ellipse at center top, var(--y) 5%, transparent 65%);
|
|
45
|
+
clip-path: ellipse(35% 100% at 50% 100%);
|
|
46
|
+
height: 50%;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ellipse {
|
|
51
|
+
background-image: linear-gradient(to top left, var(--dark-y), var(--light-y), var(--dark-y));
|
|
52
|
+
clip-path: ellipse(50% 25% at 50% 50%);
|
|
53
|
+
height: var(--shape-height, #{$default-ellipse-height});
|
|
54
|
+
opacity: $default-shapes-opacity;
|
|
55
|
+
transform: rotate3d(0, 0, -1, 10deg);
|
|
56
|
+
width: calc(var(--shape-height, #{$default-ellipse-height}) * 2);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.diamonds {
|
|
60
|
+
height: var(--shape-height, #{$default-diamond-height});
|
|
61
|
+
opacity: $default-shapes-opacity;
|
|
62
|
+
position: relative;
|
|
63
|
+
width: var(--shape-height, #{$default-diamond-height});
|
|
64
|
+
|
|
65
|
+
.top-right {
|
|
66
|
+
background-image: linear-gradient(to right, var(--dark-y), var(--y));
|
|
67
|
+
clip-path: polygon(100% 100%, 0 0, 100% 0);
|
|
68
|
+
height: 100%;
|
|
69
|
+
position: absolute;
|
|
70
|
+
width: 100%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.bottom-left {
|
|
74
|
+
background-image: linear-gradient(to left, var(--dark-y), var(--y));
|
|
75
|
+
clip-path: polygon(0 100%, 0 0, 100% 100%);
|
|
76
|
+
height: 100%;
|
|
77
|
+
opacity: .95;
|
|
78
|
+
position: absolute;
|
|
79
|
+
width: 100%;
|
|
80
|
+
z-index: 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.bottom-right {
|
|
84
|
+
background-image: linear-gradient(to bottom, var(--dark-y), var(--y));
|
|
85
|
+
clip-path: polygon(100% 100%, 100% 0, 0 100%);
|
|
86
|
+
height: 100%;
|
|
87
|
+
position: absolute;
|
|
88
|
+
width: 100%;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.rectangles {
|
|
93
|
+
display: grid;
|
|
94
|
+
grid-template-rows: repeat(3, 1fr);
|
|
95
|
+
height: var(--shape-height, #{$default-rectangle-height});
|
|
96
|
+
opacity: $default-shapes-opacity;
|
|
97
|
+
width: var(--shape-height, #{$default-rectangle-height});
|
|
98
|
+
|
|
99
|
+
.top {
|
|
100
|
+
background-image: linear-gradient(to right, var(--dark-y), var(--y));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.center {
|
|
104
|
+
background-image: linear-gradient(to left, var(--dark-y), var(--y));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.bottom {
|
|
108
|
+
background-image: linear-gradient(to right, var(--dark-y), var(--y));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.half-ellipse {
|
|
113
|
+
background-image: radial-gradient(ellipse at center bottom, var(--y) 10%, transparent 65%);
|
|
114
|
+
clip-path: ellipse(60% 100% at 50% 0%);
|
|
115
|
+
height: var(--shape-height, #{$default-ellipse-height});
|
|
116
|
+
opacity: $default-shapes-opacity;
|
|
117
|
+
width: calc(var(--shape-height, #{$default-ellipse-height}) * 2);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.circle {
|
|
121
|
+
background-image: linear-gradient(var(--light-y), var(--dark-y));
|
|
122
|
+
clip-path: circle(50% at 50% 50%);
|
|
123
|
+
height: var(--shape-height, #{$default-circle-height});
|
|
124
|
+
opacity: $default-shapes-opacity;
|
|
125
|
+
width: var(--shape-height, #{$default-circle-height});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.half-circle {
|
|
129
|
+
background: linear-gradient(var(--light-y) 30%, var(--dark-y) 100%);
|
|
130
|
+
clip-path: circle(50% at 50% 100%);
|
|
131
|
+
height: var(--shape-height, #{$default-circle-height});
|
|
132
|
+
opacity: $default-shapes-opacity;
|
|
133
|
+
width: calc(var(--shape-height, #{$default-circle-height}) * 2);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.ellipses {
|
|
137
|
+
height: var(--shape-height, #{$default-ellipse-height});
|
|
138
|
+
opacity: $default-shapes-opacity;
|
|
139
|
+
position: relative;
|
|
140
|
+
width: var(--shape-height, #{$default-ellipse-height});
|
|
141
|
+
|
|
142
|
+
.first {
|
|
143
|
+
background-image: linear-gradient(to top, var(--dark-y), var(--y), var(--light-y) 50%, transparent);
|
|
144
|
+
clip-path: ellipse(50% 20% at 50% 60%);
|
|
145
|
+
height: 100%;
|
|
146
|
+
position: absolute;
|
|
147
|
+
width: 100%;
|
|
148
|
+
z-index: 1;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.second {
|
|
152
|
+
background-image: linear-gradient(to bottom,var(--dark-y), var(--y), var(--light-y) 45%, transparent);
|
|
153
|
+
clip-path: ellipse(50% 20% at 50% 40%);
|
|
154
|
+
height: 100%;
|
|
155
|
+
position: absolute;
|
|
156
|
+
width: 100%;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.spiral {
|
|
161
|
+
height: var(--shape-height, #{$default-ellipse-height});
|
|
162
|
+
width: var(--shape-height, #{$default-ellipse-height});
|
|
163
|
+
opacity: $default-shapes-opacity;
|
|
164
|
+
position: relative;
|
|
165
|
+
display: flex;
|
|
166
|
+
justify-content: center;
|
|
167
|
+
align-items: center;
|
|
168
|
+
|
|
169
|
+
> * {
|
|
170
|
+
border-radius: 50%;
|
|
171
|
+
background: radial-gradient(ellipse at center bottom ,var(--dark-y) 10%, transparent 60%);
|
|
172
|
+
position: absolute;
|
|
173
|
+
opacity: .5;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.circle-one {
|
|
177
|
+
transform: rotate(45deg);
|
|
178
|
+
height:calc(var(--shape-height, #{$default-ellipse-height})* 0.4);
|
|
179
|
+
width: calc(var(--shape-height, #{$default-ellipse-height})* 0.4);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.circle-two {
|
|
183
|
+
height: calc(var(--shape-height, #{$default-ellipse-height})* 0.6);
|
|
184
|
+
width: calc(var(--shape-height, #{$default-ellipse-height})* 0.6);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.circle-three {
|
|
188
|
+
transform: rotate(-45deg);
|
|
189
|
+
height: calc(var(--shape-height, #{$default-ellipse-height})* 0.8);
|
|
190
|
+
width: calc(var(--shape-height, #{$default-ellipse-height})* 0.8);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.circle-four {
|
|
194
|
+
transform: rotate(-90deg);
|
|
195
|
+
height: calc(var(--shape-height, #{$default-ellipse-height})* 1);
|
|
196
|
+
width: calc(var(--shape-height, #{$default-ellipse-height})* 1);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
.rotated-ellipses {
|
|
200
|
+
height: var(--shape-height, #{$default-ellipse-height});
|
|
201
|
+
opacity: $default-shapes-opacity;
|
|
202
|
+
width: var(--shape-height, #{$default-ellipse-height});
|
|
203
|
+
display: flex;
|
|
204
|
+
|
|
205
|
+
> *{
|
|
206
|
+
width: 100%;
|
|
207
|
+
height: 100%;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.ellipse-one {
|
|
211
|
+
background-image: radial-gradient(ellipse at bottom left, var(--y) 30%, transparent 65%);
|
|
212
|
+
transform: rotate(-15deg);
|
|
213
|
+
clip-path: ellipse(50% 35% at 50% 50%);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.ellipse-two {
|
|
217
|
+
background-image: radial-gradient(ellipse at top right, var(--y) 30%, transparent 65%);
|
|
218
|
+
transform: rotate(-15deg);
|
|
219
|
+
clip-path: ellipse(50% 35% at 50% 50%);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
@@ -10,11 +10,11 @@ $img-border-radius: var(--theme-border-radius);
|
|
|
10
10
|
$p-h4-color:var(--subtitle);
|
|
11
11
|
$role-color:var(--metadata);
|
|
12
12
|
$default-name-color:var(--main1);
|
|
13
|
-
$box-shadow:0 .45em 1em 0 var(--
|
|
13
|
+
$box-shadow:0 .45em 1em 0 var(--background1);
|
|
14
14
|
|
|
15
15
|
.#{bem.$base}.team-info {
|
|
16
16
|
align-items: flex-start;
|
|
17
|
-
background: var(--light-y, var(--light-
|
|
17
|
+
background: var(--light-y, var(--light-background1));
|
|
18
18
|
box-shadow: $box-shadow;
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-direction: column;
|
package/src/ui/a/index.js
CHANGED