@pareto-engineering/design-system 2.0.0-alpha.2 → 2.0.0-alpha.23
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/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/Conversation/Conversation.js +15 -8
- package/dist/cjs/a/Conversation/common/Message/Message.js +33 -6
- package/dist/cjs/a/Conversation/styles.scss +129 -32
- 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/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 +171 -0
- package/dist/cjs/a/Shapes/index.js +15 -0
- package/dist/cjs/a/Shapes/styles.scss +255 -0
- 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/TeamInfo/styles.scss +2 -2
- package/dist/cjs/a/index.js +33 -1
- package/dist/cjs/b/Button/Button.js +10 -4
- package/dist/cjs/b/Button/styles.scss +83 -19
- package/dist/cjs/b/Metrics/Metrics.js +89 -0
- package/dist/cjs/b/Metrics/index.js +15 -0
- package/dist/cjs/b/Metrics/styles.scss +91 -0
- package/dist/cjs/b/Page/common/Section/Section.js +56 -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 +4 -4
- package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- package/dist/cjs/c/ContentSlides/styles.scss +10 -4
- package/dist/cjs/f/common/Debugger/Debugger.js +1 -1
- 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/styles.scss +17 -2
- package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +37 -10
- package/dist/cjs/f/fields/SelectInput/styles.scss +13 -8
- package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
- package/dist/cjs/f/fields/TaskRecommendationInput/styles.scss +4 -0
- package/dist/cjs/f/fields/TextInput/TextInput.js +28 -7
- package/dist/cjs/f/fields/TextInput/styles.scss +16 -7
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +15 -8
- package/dist/cjs/f/fields/TextareaInput/styles.scss +19 -6
- package/dist/cjs/f/fields/index.js +0 -24
- package/dist/cjs/form-reset.scss +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/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/Conversation/Conversation.js +15 -8
- package/dist/es/a/Conversation/common/Message/Message.js +33 -6
- package/dist/es/a/Conversation/styles.scss +129 -32
- 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/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 +149 -0
- package/dist/es/a/Shapes/index.js +2 -0
- package/dist/es/a/Shapes/styles.scss +255 -0
- 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/TeamInfo/styles.scss +2 -2
- package/dist/es/a/index.js +5 -1
- package/dist/es/b/Button/Button.js +8 -2
- package/dist/es/b/Button/styles.scss +83 -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 +55 -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 +4 -4
- package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- package/dist/es/c/ContentSlides/styles.scss +10 -4
- package/dist/es/f/common/Debugger/Debugger.js +1 -1
- 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/styles.scss +17 -2
- package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
- package/dist/es/f/fields/SelectInput/SelectInput.js +37 -10
- package/dist/es/f/fields/SelectInput/styles.scss +13 -8
- package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
- package/dist/es/f/fields/TaskRecommendationInput/styles.scss +4 -0
- package/dist/es/f/fields/TextInput/TextInput.js +28 -7
- package/dist/es/f/fields/TextInput/styles.scss +16 -7
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +15 -8
- package/dist/es/f/fields/TextareaInput/styles.scss +19 -6
- package/dist/es/f/fields/index.js +0 -3
- package/dist/es/form-reset.scss +1 -1
- package/dist/es/form.scss +1 -1
- package/package.json +3 -3
- package/src/__snapshots__/Storyshots.test.js.snap +6050 -812
- package/src/local.scss +4 -0
- package/src/stories/a/AnimatedCounter.stories.jsx +9 -5
- package/src/stories/a/BackgroundGradient.stories.jsx +38 -0
- package/src/stories/a/ContentCard.stories.jsx +1 -1
- package/src/stories/a/Conversation.stories.jsx +78 -1
- package/src/stories/a/OvalIllustration.stories.jsx +59 -0
- 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 +143 -0
- package/src/stories/a/SnapScroller.stories.jsx +98 -0
- package/src/stories/a/Spinner.stories.jsx +1 -1
- package/src/stories/b/Button.stories.jsx +83 -54
- package/src/stories/b/Metrics.stories.jsx +62 -0
- package/src/stories/b/Page.stories.jsx +51 -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 +154 -2
- package/src/stories/colors.js +5 -3
- package/src/stories/f/SelectInput.stories.jsx +36 -5
- package/src/stories/f/TextInput.stories.jsx +16 -5
- package/src/stories/f/TextareaInput.stories.jsx +42 -6
- package/src/ui/a/AnimatedCounter/AnimatedCounter.jsx +21 -27
- package/src/ui/a/AnimatedCounter/styles.scss +3 -11
- 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/Conversation/Conversation.jsx +15 -7
- package/src/ui/a/Conversation/common/Message/Message.jsx +40 -7
- package/src/ui/a/Conversation/styles.scss +129 -32
- 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/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 +191 -0
- package/src/ui/a/Shapes/index.js +2 -0
- package/src/ui/a/Shapes/styles.scss +255 -0
- 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/TeamInfo/styles.scss +2 -2
- package/src/ui/a/index.js +4 -0
- package/src/ui/b/Button/Button.jsx +9 -1
- package/src/ui/b/Button/styles.scss +83 -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 +68 -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 +4 -4
- package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +3 -2
- package/src/ui/c/ContentSlides/styles.scss +10 -4
- package/src/ui/f/common/Debugger/Debugger.jsx +1 -1
- 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/styles.scss +17 -2
- package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +2 -2
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +44 -5
- package/src/ui/f/fields/SelectInput/styles.scss +13 -8
- package/src/ui/f/fields/TextInput/TextInput.jsx +24 -3
- package/src/ui/f/fields/TextInput/styles.scss +16 -7
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +24 -13
- package/src/ui/f/fields/TextareaInput/styles.scss +19 -6
- package/src/ui/f/fields/index.js +0 -3
- package/src/ui/form-reset.scss +1 -1
- package/src/ui/form.scss +1 -1
- 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/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 -37
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
@use "@aztlan/stylebook/src/mixins";
|
|
5
|
+
@use "@aztlan/stylebook/src/globals" as *;
|
|
6
|
+
|
|
7
|
+
$default-spacing:var(--spacing, var(--u));
|
|
8
|
+
|
|
9
|
+
.#{bem.$base}.snap-scroller {
|
|
10
|
+
display: flex;
|
|
11
|
+
-ms-overflow-style: none; /* for Internet Explorer, Edge */
|
|
12
|
+
overflow-x: auto;
|
|
13
|
+
scroll-padding: calc(#{$default-spacing} *2);
|
|
14
|
+
scroll-snap-type: x mandatory;
|
|
15
|
+
scrollbar-width: none;
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
> * {
|
|
19
|
+
&:first-child {
|
|
20
|
+
margin-left: $default-spacing;
|
|
21
|
+
}
|
|
22
|
+
display: inline-block;
|
|
23
|
+
margin-right: $default-spacing;
|
|
24
|
+
scroll-snap-align: start;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@include mixins.media($from:$sm-md) {
|
|
29
|
+
&.desktop-no-scroll {
|
|
30
|
+
overflow: auto;
|
|
31
|
+
-ms-overflow-style: unset; /* for Internet Explorer, Edge */
|
|
32
|
+
scroll-snap-type: none;
|
|
33
|
+
scrollbar-width: unset;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
@@ -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/dist/es/a/index.js
CHANGED
|
@@ -17,4 +17,8 @@ export { CustomerStat } from "./CustomerStat";
|
|
|
17
17
|
export { Quote } from "./Quote";
|
|
18
18
|
export { ContentCard } from "./ContentCard";
|
|
19
19
|
export { DotInfo } from "./DotInfo";
|
|
20
|
-
export { Timestamp } from "./Timestamp";
|
|
20
|
+
export { Timestamp } from "./Timestamp";
|
|
21
|
+
export { Shapes } from "./Shapes";
|
|
22
|
+
export { OvalIllustration } from "./OvalIllustration";
|
|
23
|
+
export { SnapScroller } from "./SnapScroller";
|
|
24
|
+
export { BackgroundGradient } from "./BackgroundGradient";
|
|
@@ -23,6 +23,7 @@ const Button = ({
|
|
|
23
23
|
isCompact,
|
|
24
24
|
isGhost,
|
|
25
25
|
isSimple,
|
|
26
|
+
arrowDirection,
|
|
26
27
|
...otherProps
|
|
27
28
|
}) => {
|
|
28
29
|
useLayoutEffect(() => {
|
|
@@ -30,7 +31,7 @@ const Button = ({
|
|
|
30
31
|
}, []);
|
|
31
32
|
return /*#__PURE__*/React.createElement("button", _extends({
|
|
32
33
|
id: id,
|
|
33
|
-
className: [baseClassName, componentClassName, userClassName, `x-${color}`, isGhost && styleNames.modifierGhost, isCompact && styleNames.modifierCompact, isSimple && styleNames.modifierSimple].filter(e => e).join(' '),
|
|
34
|
+
className: [baseClassName, componentClassName, userClassName, `x-${color}`, isGhost && styleNames.modifierGhost, isCompact && styleNames.modifierCompact, isSimple && styleNames.modifierSimple, arrowDirection && `arrow-${arrowDirection}`].filter(e => e).join(' '),
|
|
34
35
|
style: style,
|
|
35
36
|
type: "button"
|
|
36
37
|
}, otherProps), isLoading ? /*#__PURE__*/React.createElement(LoadingCircle, {
|
|
@@ -85,7 +86,12 @@ Button.propTypes = {
|
|
|
85
86
|
/**
|
|
86
87
|
* Button loading state
|
|
87
88
|
*/
|
|
88
|
-
isLoading: PropTypes.bool
|
|
89
|
+
isLoading: PropTypes.bool,
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The direction of the arrow if the button has one
|
|
93
|
+
*/
|
|
94
|
+
arrowDirection: PropTypes.string
|
|
89
95
|
};
|
|
90
96
|
Button.defaultProps = {
|
|
91
97
|
color: 'main1'
|
|
@@ -4,28 +4,64 @@
|
|
|
4
4
|
|
|
5
5
|
$default-padding: 1em 1em .84em;
|
|
6
6
|
$compact-padding: .6em .6em .48em;
|
|
7
|
-
$default-border-radius:2em;
|
|
8
7
|
$default-color:primary;
|
|
9
8
|
$font-weight:bold;
|
|
9
|
+
$default-margin:.5em;
|
|
10
|
+
$default-animation-time: .3s;
|
|
10
11
|
|
|
11
12
|
.#{bem.$base}.button {
|
|
12
13
|
background: var(--x, var(--#{$default-color}));
|
|
13
14
|
border: transparent;
|
|
14
|
-
|
|
15
|
-
border-radius: $default-border-radius;
|
|
15
|
+
border-radius: var(--theme-border-radius);
|
|
16
16
|
color: var(--on-x, var(--on-#{$default-color}));
|
|
17
|
-
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
font-family: var(--theme-default-paragraph);
|
|
19
|
+
font-weight: 400;
|
|
20
|
+
justify-content: space-between;
|
|
18
21
|
padding: $default-padding;
|
|
19
22
|
transition: all .25s;
|
|
20
23
|
|
|
24
|
+
&.arrow-right {
|
|
25
|
+
&::after {
|
|
26
|
+
content: "-->";
|
|
27
|
+
margin-left: $default-margin;
|
|
28
|
+
vertical-align: middle;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
&::after {
|
|
33
|
+
--final-position: 50%;
|
|
34
|
+
animation: animateArrow $default-animation-time forwards;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.arrow-left {
|
|
40
|
+
&::before {
|
|
41
|
+
content: "<--";
|
|
42
|
+
margin-right: $default-margin;
|
|
43
|
+
vertical-align: middle;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:hover {
|
|
47
|
+
&::before {
|
|
48
|
+
--final-position: -50%;
|
|
49
|
+
animation: animateArrow $default-animation-time forwards;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
21
54
|
&:not(:disabled) {
|
|
22
55
|
cursor: pointer;
|
|
23
56
|
|
|
24
57
|
&:hover {
|
|
25
58
|
background: var(--light-x, var(--light-#{$default-color}));
|
|
26
59
|
}
|
|
27
|
-
}
|
|
28
60
|
|
|
61
|
+
&:focus {
|
|
62
|
+
background: var(--dark-x, var(--dark-#{$default-color}));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
29
65
|
|
|
30
66
|
&.#{bem.$modifier-compact} {
|
|
31
67
|
padding: $compact-padding;
|
|
@@ -36,42 +72,70 @@ $font-weight:bold;
|
|
|
36
72
|
border: 1px solid var(--x, var(--#{$default-color}));
|
|
37
73
|
color: var(--x, var(--#{$default-color}));
|
|
38
74
|
|
|
39
|
-
&:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
75
|
+
&:hover,
|
|
76
|
+
&:focus,
|
|
77
|
+
&:disabled {
|
|
78
|
+
background: transparent;
|
|
79
|
+
}
|
|
45
80
|
|
|
81
|
+
&:not(:disabled) {
|
|
46
82
|
&:hover {
|
|
47
|
-
|
|
83
|
+
border: 1px solid var(--light-x, var(--light-#{$default-color}));
|
|
84
|
+
color: var(--light-x, var(--light-#{$default-color}));
|
|
48
85
|
}
|
|
49
86
|
|
|
50
87
|
&:focus {
|
|
51
|
-
|
|
88
|
+
border: 1px solid var(--dark-x, var(--dark-#{$default-color}));
|
|
89
|
+
color: var(--dark-x, var(--dark-#{$default-color}));
|
|
52
90
|
}
|
|
53
91
|
}
|
|
92
|
+
|
|
93
|
+
&:disabled {
|
|
94
|
+
border: 1px solid var(--x, var(--#{$default-color}));
|
|
95
|
+
color: var(--x, var(--#{$default-color}));
|
|
96
|
+
}
|
|
54
97
|
}
|
|
55
98
|
|
|
56
99
|
&.#{bem.$modifier-simple} {
|
|
57
100
|
background: transparent;
|
|
58
101
|
border: 1px solid transparent;
|
|
59
102
|
color: var(--x, var(--#{$default-color}));
|
|
103
|
+
padding: 0;
|
|
104
|
+
|
|
105
|
+
&:disabled,
|
|
106
|
+
&:hover,
|
|
107
|
+
&:focus {
|
|
108
|
+
background: transparent;
|
|
109
|
+
}
|
|
60
110
|
|
|
61
111
|
&:not(:disabled) {
|
|
62
|
-
&:hover
|
|
112
|
+
&:hover {
|
|
113
|
+
color: var(--light-x, var(--light-#{$default-color}));
|
|
114
|
+
}
|
|
115
|
+
|
|
63
116
|
&:focus {
|
|
64
|
-
|
|
65
|
-
border: 1px solid transparent;
|
|
66
|
-
color: var(--dark-x, var(--on-#{$default-color}));
|
|
117
|
+
color: var(--dark-x, var(--dark-#{$default-color}));
|
|
67
118
|
}
|
|
68
119
|
}
|
|
120
|
+
|
|
121
|
+
&:disabled {
|
|
122
|
+
color: var(--x, var(--#{$default-color}));
|
|
123
|
+
}
|
|
69
124
|
}
|
|
70
125
|
|
|
71
126
|
&:disabled {
|
|
72
|
-
background: var(--
|
|
73
|
-
filter: brightness(
|
|
127
|
+
background: var(--x);
|
|
128
|
+
filter: brightness(125%);
|
|
74
129
|
}
|
|
75
130
|
}
|
|
76
131
|
|
|
77
132
|
|
|
133
|
+
@keyframes animateArrow {
|
|
134
|
+
from {
|
|
135
|
+
transform: translateX(0);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
to {
|
|
139
|
+
transform: translateX(var(--final-position));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useLayoutEffect } from 'react';
|
|
4
|
+
import { AnimatedCounter } from "../..";
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import styleNames from '@pareto-engineering/bem'; // Local Definitions
|
|
7
|
+
|
|
8
|
+
const baseClassName = styleNames.base;
|
|
9
|
+
const componentClassName = 'metrics';
|
|
10
|
+
/**
|
|
11
|
+
* This is the component description.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const Metrics = ({
|
|
15
|
+
id,
|
|
16
|
+
className: userClassName,
|
|
17
|
+
style,
|
|
18
|
+
items // ...otherProps
|
|
19
|
+
|
|
20
|
+
}) => {
|
|
21
|
+
useLayoutEffect(() => {
|
|
22
|
+
import("./styles.scss");
|
|
23
|
+
}, []);
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
id: id,
|
|
26
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
27
|
+
style: style // {...otherProps}
|
|
28
|
+
|
|
29
|
+
}, items.map(counter => /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
className: "metric"
|
|
31
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: `circle y-${counter.circleColor}`
|
|
33
|
+
}, /*#__PURE__*/React.createElement(AnimatedCounter, {
|
|
34
|
+
color: counter.color,
|
|
35
|
+
delay: counter.delay,
|
|
36
|
+
number: counter.number,
|
|
37
|
+
before: counter.before,
|
|
38
|
+
after: counter.after
|
|
39
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
40
|
+
className: "description-md sm-h xs-h md-s1"
|
|
41
|
+
}, counter.description)), /*#__PURE__*/React.createElement("p", {
|
|
42
|
+
className: "description-sm md-h lg-h sm-s-2"
|
|
43
|
+
}, counter.description))));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
Metrics.propTypes = {
|
|
47
|
+
/**
|
|
48
|
+
* The HTML id for this element
|
|
49
|
+
*/
|
|
50
|
+
id: PropTypes.string,
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The HTML class names for this element
|
|
54
|
+
*/
|
|
55
|
+
className: PropTypes.string,
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The React-written, css properties for this element.
|
|
59
|
+
*/
|
|
60
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The array of details
|
|
64
|
+
*/
|
|
65
|
+
items: PropTypes.node
|
|
66
|
+
};
|
|
67
|
+
/*
|
|
68
|
+
Metrics.defaultProps = {
|
|
69
|
+
}
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
export default Metrics;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
@use "@aztlan/stylebook/src/mixins";
|
|
5
|
+
@use "@aztlan/stylebook/src/globals" as *;
|
|
6
|
+
|
|
7
|
+
$default-mobile-row-gap: 1em;
|
|
8
|
+
$default-desktop-row-gap: 3em;
|
|
9
|
+
$default-border-radius: 50%;
|
|
10
|
+
$default-mobile-circle-size: 8em;
|
|
11
|
+
$default-desktop-circle-size: 10em;
|
|
12
|
+
$default-translateY:3em;
|
|
13
|
+
$default-desktop-description-width:12em;
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
$default-mobile-description-width:9em;
|
|
17
|
+
|
|
18
|
+
.#{bem.$base}.metrics {
|
|
19
|
+
display: grid;
|
|
20
|
+
row-gap: 1em;
|
|
21
|
+
|
|
22
|
+
.metric {
|
|
23
|
+
align-items: center;
|
|
24
|
+
display: flex;
|
|
25
|
+
row-gap: $default-mobile-row-gap;
|
|
26
|
+
|
|
27
|
+
.circle {
|
|
28
|
+
align-items: center;
|
|
29
|
+
background: var(--light-y);
|
|
30
|
+
border-radius: $default-border-radius;
|
|
31
|
+
display: flex;
|
|
32
|
+
height: $default-mobile-circle-size;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
width: $default-mobile-circle-size;
|
|
35
|
+
|
|
36
|
+
.description-md {
|
|
37
|
+
color: var(--subtitle);
|
|
38
|
+
font-style: italic;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.description-sm {
|
|
43
|
+
color: var(--subtitle);
|
|
44
|
+
font-style: italic;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// mobile style
|
|
49
|
+
@include mixins.media($to:$sm-md) {
|
|
50
|
+
.metric {
|
|
51
|
+
column-gap: $default-mobile-row-gap;
|
|
52
|
+
|
|
53
|
+
.description-sm {
|
|
54
|
+
width: 50%;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// tablet style
|
|
60
|
+
@include mixins.media($from:$xs-sm,$to:$sm-md) {
|
|
61
|
+
.metric {
|
|
62
|
+
.description-sm {
|
|
63
|
+
width: 30%;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// desktop style
|
|
69
|
+
@include mixins.media($from:$sm-md) {
|
|
70
|
+
grid-template-columns: repeat(2, 1fr);
|
|
71
|
+
row-gap: 2em;
|
|
72
|
+
|
|
73
|
+
.metric {
|
|
74
|
+
.circle {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
height: $default-desktop-circle-size;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
position: relative;
|
|
80
|
+
width: $default-desktop-circle-size;
|
|
81
|
+
|
|
82
|
+
.description-md {
|
|
83
|
+
left: 40%;
|
|
84
|
+
position: absolute;
|
|
85
|
+
top: 70%;
|
|
86
|
+
width: $default-desktop-description-width;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -3,9 +3,10 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
/* @pareto-engineering/generator-front 1.0.0 */
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import styleNames from '@pareto-engineering/bem';
|
|
7
|
-
import usePage from "../../usePage"; // Local Definitions
|
|
6
|
+
import styleNames from '@pareto-engineering/bem'; // Local Definitions
|
|
8
7
|
|
|
8
|
+
import { Shapes, BackgroundGradient } from "../../../../a";
|
|
9
|
+
import usePage from "../../usePage";
|
|
9
10
|
const baseClassName = styleNames.base;
|
|
10
11
|
const componentClassName = 'section';
|
|
11
12
|
|
|
@@ -14,6 +15,13 @@ const Section = ({
|
|
|
14
15
|
className: userClassName,
|
|
15
16
|
style,
|
|
16
17
|
children,
|
|
18
|
+
backgroundShape,
|
|
19
|
+
backgroundGradient,
|
|
20
|
+
backgroundGradientHeight,
|
|
21
|
+
backgroundVerticalAlign,
|
|
22
|
+
backgroundHorizontalAlign,
|
|
23
|
+
backgroundHeight,
|
|
24
|
+
backgroundOverflow,
|
|
17
25
|
...otherProps
|
|
18
26
|
}) => {
|
|
19
27
|
const {
|
|
@@ -24,7 +32,15 @@ const Section = ({
|
|
|
24
32
|
id: sectionId,
|
|
25
33
|
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
26
34
|
style: style
|
|
27
|
-
}, otherProps), children
|
|
35
|
+
}, otherProps), children, backgroundShape && /*#__PURE__*/React.createElement(Shapes, {
|
|
36
|
+
verticalAlign: backgroundVerticalAlign,
|
|
37
|
+
horizontalAlign: backgroundHorizontalAlign,
|
|
38
|
+
overflow: backgroundOverflow,
|
|
39
|
+
height: backgroundHeight,
|
|
40
|
+
shape: backgroundShape
|
|
41
|
+
}), backgroundGradient && /*#__PURE__*/React.createElement(BackgroundGradient, {
|
|
42
|
+
height: backgroundGradientHeight
|
|
43
|
+
}));
|
|
28
44
|
};
|
|
29
45
|
|
|
30
46
|
Section.propTypes = {
|
|
@@ -46,7 +62,42 @@ Section.propTypes = {
|
|
|
46
62
|
/**
|
|
47
63
|
* The children JSX
|
|
48
64
|
*/
|
|
49
|
-
children: PropTypes.node
|
|
65
|
+
children: PropTypes.node,
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The background shape to use for this section.
|
|
69
|
+
*/
|
|
70
|
+
backgroundShape: PropTypes.oneOf(['triangle', 'ellipse', 'half-ellipse', 'half-ellipses', 'spiral', 'diamonds', 'circle', 'half-circle', 'ellipses', 'rectangles']),
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The background vertical alingment to use for if the background shape is set.
|
|
74
|
+
*/
|
|
75
|
+
backgroundVerticalAlign: PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The background horizontal alingment to use for if the background shape is set.
|
|
79
|
+
*/
|
|
80
|
+
backgroundHorizontalAlign: PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The background height to use for if the background shape is set.
|
|
84
|
+
*/
|
|
85
|
+
backgroundHeight: PropTypes.string,
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The background overflow to use for if the background shape is set.
|
|
89
|
+
*/
|
|
90
|
+
backgroundOverflow: PropTypes.oneOf(['visible', 'hidden', 'scroll']),
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The background gradient to use for if the background gradient is set.
|
|
94
|
+
*/
|
|
95
|
+
backgroundGradient: PropTypes.bool,
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The background gradient height to use for if the background gradient is set.
|
|
99
|
+
*/
|
|
100
|
+
backgroundGradientHeight: PropTypes.string
|
|
50
101
|
};
|
|
51
102
|
Section.defaultProps = {// someProp:false
|
|
52
103
|
};
|
package/dist/es/b/index.js
CHANGED
|
@@ -6,4 +6,5 @@ export { Page } from "./Page";
|
|
|
6
6
|
export { QuestionDropdown } from "./QuestionDropdown";
|
|
7
7
|
export { ThemeSelector } from "./ThemeSelector";
|
|
8
8
|
export { Logo } from "./Logo";
|
|
9
|
-
export { SocialMediaButton } from "./SocialMediaButton";
|
|
9
|
+
export { SocialMediaButton } from "./SocialMediaButton";
|
|
10
|
+
export { Metrics } from "./Metrics";
|
|
@@ -49,18 +49,18 @@ const HorizontalMenu = ({
|
|
|
49
49
|
attached: true,
|
|
50
50
|
height: ".4em",
|
|
51
51
|
color: "main2",
|
|
52
|
-
className: "y-
|
|
52
|
+
className: "y-background1 b-dark-y"
|
|
53
53
|
}), /*#__PURE__*/React.createElement("div", {
|
|
54
54
|
className: styleNames.elementContent
|
|
55
55
|
}, /*#__PURE__*/React.createElement("div", {
|
|
56
56
|
className: "left"
|
|
57
57
|
}, !isFirstStep && !hideBackIcon && /*#__PURE__*/React.createElement("span", {
|
|
58
|
-
className: "
|
|
58
|
+
className: "prev-button pointer",
|
|
59
59
|
onClick: mobilePreviousStep,
|
|
60
60
|
role: "button",
|
|
61
61
|
onKeyDown: mobilePreviousStep,
|
|
62
62
|
tabIndex: 0
|
|
63
|
-
},
|
|
63
|
+
}, '<--')), /*#__PURE__*/React.createElement("div", {
|
|
64
64
|
className: "title"
|
|
65
65
|
}, /*#__PURE__*/React.createElement("span", {
|
|
66
66
|
className: "md-h lg-h"
|
|
@@ -108,7 +108,7 @@ HorizontalMenu.propTypes = {
|
|
|
108
108
|
hideBackIcon: PropTypes.bool
|
|
109
109
|
};
|
|
110
110
|
HorizontalMenu.defaultProps = {
|
|
111
|
-
logoColor: '
|
|
111
|
+
logoColor: 'paragraph',
|
|
112
112
|
stepsBackwards: 1
|
|
113
113
|
};
|
|
114
114
|
export default HorizontalMenu;
|
|
@@ -56,7 +56,8 @@ const Navigator = ({
|
|
|
56
56
|
} else {
|
|
57
57
|
setNextStepIndex(stepsForward);
|
|
58
58
|
}
|
|
59
|
-
}
|
|
59
|
+
},
|
|
60
|
+
isCompact: true
|
|
60
61
|
}, "Next") : /*#__PURE__*/React.createElement("span", null));
|
|
61
62
|
};
|
|
62
63
|
|
|
@@ -118,8 +119,8 @@ Navigator.propTypes = {
|
|
|
118
119
|
};
|
|
119
120
|
Navigator.defaultProps = {
|
|
120
121
|
canMoveForward: true,
|
|
121
|
-
previousColor: '
|
|
122
|
-
nextColor: '
|
|
122
|
+
previousColor: 'main2',
|
|
123
|
+
nextColor: 'main2',
|
|
123
124
|
stepsForward: 1,
|
|
124
125
|
stepsBackwards: 1
|
|
125
126
|
};
|
|
@@ -14,7 +14,7 @@ $class-navigator:navigator;
|
|
|
14
14
|
$default-sidebar-width:minmax(250px, 330px);
|
|
15
15
|
$default-border:none;//2px solid var(--grid);
|
|
16
16
|
$default-border-radius:var(--theme-border-radius);
|
|
17
|
-
$default-content-background:var(--
|
|
17
|
+
$default-content-background: var(--background1);
|
|
18
18
|
$default-padding:var(--u);
|
|
19
19
|
|
|
20
20
|
$mobile-content-margin:6em;
|
|
@@ -61,7 +61,6 @@ $mobile-content-margin:6em;
|
|
|
61
61
|
|
|
62
62
|
//.#{$class-main-container} {
|
|
63
63
|
main {
|
|
64
|
-
background: var(--dark-y);
|
|
65
64
|
overflow: hidden;
|
|
66
65
|
position: relative;
|
|
67
66
|
|
|
@@ -79,7 +78,7 @@ $mobile-content-margin:6em;
|
|
|
79
78
|
.#{bem.$element-content} {
|
|
80
79
|
background: $default-content-background;
|
|
81
80
|
|
|
82
|
-
border:
|
|
81
|
+
border: var(--theme-border);
|
|
83
82
|
border-radius: $default-border-radius;
|
|
84
83
|
max-width: 600px;
|
|
85
84
|
padding: $default-padding;
|
|
@@ -108,8 +107,9 @@ $mobile-content-margin:6em;
|
|
|
108
107
|
|
|
109
108
|
.#{$class-horizontal-menu} {
|
|
110
109
|
background: $default-content-background;
|
|
111
|
-
border-bottom:
|
|
110
|
+
border-bottom: var(--theme-border);
|
|
112
111
|
color: var(--heading);
|
|
112
|
+
z-index: 1;
|
|
113
113
|
|
|
114
114
|
.#{bem.$element-content} {
|
|
115
115
|
display: grid;
|
|
@@ -124,6 +124,11 @@ $mobile-content-margin:6em;
|
|
|
124
124
|
|
|
125
125
|
.left {
|
|
126
126
|
text-align: left;
|
|
127
|
+
|
|
128
|
+
.prev-button {
|
|
129
|
+
font-family: var(--theme-default-paragraph);
|
|
130
|
+
font-size: calc(var(--s2) * 1em);
|
|
131
|
+
}
|
|
127
132
|
}
|
|
128
133
|
|
|
129
134
|
.right {
|
|
@@ -210,6 +215,7 @@ $mobile-content-margin:6em;
|
|
|
210
215
|
|
|
211
216
|
.next {
|
|
212
217
|
flex-grow: 1;
|
|
218
|
+
justify-content: flex-end;
|
|
213
219
|
}
|
|
214
220
|
}
|
|
215
221
|
}
|
|
@@ -31,7 +31,7 @@ const Debugger = ({
|
|
|
31
31
|
style: style
|
|
32
32
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
33
33
|
onClick: toggleDebugger,
|
|
34
|
-
color: "
|
|
34
|
+
color: "main2"
|
|
35
35
|
}, isOpen ? 'Close FormDebugger' : 'Open FormDebugger'), isOpen && /*#__PURE__*/React.createElement("pre", {
|
|
36
36
|
className: "debuger-content"
|
|
37
37
|
}, JSON.stringify(formikContext, null, 2)));
|