@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,83 @@
|
|
|
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 = 'snap-scroller'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* This is the component description.
|
|
18
|
+
*/
|
|
19
|
+
const SnapScroller = ({
|
|
20
|
+
id,
|
|
21
|
+
className:userClassName,
|
|
22
|
+
style,
|
|
23
|
+
children,
|
|
24
|
+
noScrollOnDesktop,
|
|
25
|
+
// ...otherProps
|
|
26
|
+
}) => {
|
|
27
|
+
useLayoutEffect(() => {
|
|
28
|
+
import('./styles.scss')
|
|
29
|
+
}, [])
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div
|
|
33
|
+
id={id}
|
|
34
|
+
className={[
|
|
35
|
+
|
|
36
|
+
baseClassName,
|
|
37
|
+
|
|
38
|
+
componentClassName,
|
|
39
|
+
userClassName,
|
|
40
|
+
noScrollOnDesktop && 'desktop-no-scroll',
|
|
41
|
+
]
|
|
42
|
+
.filter((e) => e)
|
|
43
|
+
.join(' ')}
|
|
44
|
+
style={style}
|
|
45
|
+
// {...otherProps}
|
|
46
|
+
>
|
|
47
|
+
{children}
|
|
48
|
+
</div>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
SnapScroller.propTypes = {
|
|
53
|
+
/**
|
|
54
|
+
* The HTML id for this element
|
|
55
|
+
*/
|
|
56
|
+
id:PropTypes.string,
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The HTML class names for this element
|
|
60
|
+
*/
|
|
61
|
+
className:PropTypes.string,
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The React-written, css properties for this element.
|
|
65
|
+
*/
|
|
66
|
+
style:PropTypes.objectOf(PropTypes.string),
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The children JSX
|
|
70
|
+
*/
|
|
71
|
+
children:PropTypes.node,
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Whether to snap scroll on desktop (false will enable a flexbox)
|
|
75
|
+
*/
|
|
76
|
+
noScrollOnDesktop:PropTypes.bool,
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
SnapScroller.defaultProps = {
|
|
80
|
+
noScrollOnDesktop:false,
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export default SnapScroller
|
|
@@ -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/src/ui/a/index.js
CHANGED
|
@@ -23,3 +23,7 @@ export { Quote } from './Quote'
|
|
|
23
23
|
export { ContentCard } from './ContentCard'
|
|
24
24
|
export { DotInfo } from './DotInfo'
|
|
25
25
|
export { Timestamp } from './Timestamp'
|
|
26
|
+
export { Shapes } from './Shapes'
|
|
27
|
+
export { OvalIllustration } from './OvalIllustration'
|
|
28
|
+
export { SnapScroller } from './SnapScroller'
|
|
29
|
+
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(() => {
|
|
@@ -40,6 +41,7 @@ const Button = ({
|
|
|
40
41
|
isGhost && styleNames.modifierGhost,
|
|
41
42
|
isCompact && styleNames.modifierCompact,
|
|
42
43
|
isSimple && styleNames.modifierSimple,
|
|
44
|
+
arrowDirection && `arrow-${arrowDirection}`,
|
|
43
45
|
]
|
|
44
46
|
.filter((e) => e)
|
|
45
47
|
.join(' ')}
|
|
@@ -98,11 +100,17 @@ Button.propTypes = {
|
|
|
98
100
|
/**
|
|
99
101
|
* The button color
|
|
100
102
|
*/
|
|
101
|
-
color
|
|
103
|
+
color:PropTypes.string,
|
|
104
|
+
|
|
102
105
|
/**
|
|
103
106
|
* Button loading state
|
|
104
107
|
*/
|
|
105
108
|
isLoading:PropTypes.bool,
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The direction of the arrow if the button has one
|
|
112
|
+
*/
|
|
113
|
+
arrowDirection:PropTypes.string,
|
|
106
114
|
}
|
|
107
115
|
|
|
108
116
|
Button.defaultProps = {
|
|
@@ -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,93 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
|
|
4
|
+
import { useLayoutEffect } from 'react'
|
|
5
|
+
|
|
6
|
+
import { AnimatedCounter } from 'ui'
|
|
7
|
+
|
|
8
|
+
import PropTypes from 'prop-types'
|
|
9
|
+
|
|
10
|
+
import styleNames from '@pareto-engineering/bem'
|
|
11
|
+
|
|
12
|
+
// Local Definitions
|
|
13
|
+
|
|
14
|
+
const baseClassName = styleNames.base
|
|
15
|
+
|
|
16
|
+
const componentClassName = 'metrics'
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* This is the component description.
|
|
20
|
+
*/
|
|
21
|
+
const Metrics = ({
|
|
22
|
+
id,
|
|
23
|
+
className:userClassName,
|
|
24
|
+
style,
|
|
25
|
+
items,
|
|
26
|
+
// ...otherProps
|
|
27
|
+
}) => {
|
|
28
|
+
useLayoutEffect(() => {
|
|
29
|
+
import('./styles.scss')
|
|
30
|
+
}, [])
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div
|
|
34
|
+
id={id}
|
|
35
|
+
className={[
|
|
36
|
+
|
|
37
|
+
baseClassName,
|
|
38
|
+
|
|
39
|
+
componentClassName,
|
|
40
|
+
userClassName,
|
|
41
|
+
]
|
|
42
|
+
.filter((e) => e)
|
|
43
|
+
.join(' ')}
|
|
44
|
+
style={style}
|
|
45
|
+
// {...otherProps}
|
|
46
|
+
>
|
|
47
|
+
{items.map((counter) => (
|
|
48
|
+
<div className="metric">
|
|
49
|
+
<div className={`circle y-${counter.circleColor}`}>
|
|
50
|
+
<AnimatedCounter
|
|
51
|
+
color={counter.color}
|
|
52
|
+
delay={counter.delay}
|
|
53
|
+
number={counter.number}
|
|
54
|
+
before={counter.before}
|
|
55
|
+
after={counter.after}
|
|
56
|
+
/>
|
|
57
|
+
<p className="description-md sm-h xs-h md-s1">{counter.description}</p>
|
|
58
|
+
</div>
|
|
59
|
+
<p className="description-sm md-h lg-h sm-s-2">{counter.description}</p>
|
|
60
|
+
</div>
|
|
61
|
+
))}
|
|
62
|
+
</div>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
Metrics.propTypes = {
|
|
67
|
+
/**
|
|
68
|
+
* The HTML id for this element
|
|
69
|
+
*/
|
|
70
|
+
id:PropTypes.string,
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The HTML class names for this element
|
|
74
|
+
*/
|
|
75
|
+
className:PropTypes.string,
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The React-written, css properties for this element.
|
|
79
|
+
*/
|
|
80
|
+
style:PropTypes.objectOf(PropTypes.string),
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The array of details
|
|
84
|
+
*/
|
|
85
|
+
items:PropTypes.node,
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/*
|
|
89
|
+
Metrics.defaultProps = {
|
|
90
|
+
}
|
|
91
|
+
*/
|
|
92
|
+
|
|
93
|
+
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 @@ import * as React from 'react'
|
|
|
3
3
|
import PropTypes from 'prop-types'
|
|
4
4
|
import styleNames from '@pareto-engineering/bem'
|
|
5
5
|
|
|
6
|
+
// Local Definitions
|
|
7
|
+
import { Shapes, BackgroundGradient } from 'ui/a'
|
|
6
8
|
import usePage from '../../usePage'
|
|
7
9
|
|
|
8
|
-
// Local Definitions
|
|
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 {
|
|
@@ -21,7 +29,6 @@ const Section = ({
|
|
|
21
29
|
} = usePage()
|
|
22
30
|
|
|
23
31
|
const sectionId = userId && `${pageId}_${userId}`
|
|
24
|
-
|
|
25
32
|
return (
|
|
26
33
|
<section
|
|
27
34
|
id={sectionId}
|
|
@@ -36,6 +43,20 @@ const Section = ({
|
|
|
36
43
|
{...otherProps}
|
|
37
44
|
>
|
|
38
45
|
{children}
|
|
46
|
+
{backgroundShape && (
|
|
47
|
+
<Shapes
|
|
48
|
+
verticalAlign={backgroundVerticalAlign}
|
|
49
|
+
horizontalAlign={backgroundHorizontalAlign}
|
|
50
|
+
overflow={backgroundOverflow}
|
|
51
|
+
height={backgroundHeight}
|
|
52
|
+
shape={backgroundShape}
|
|
53
|
+
/>
|
|
54
|
+
)}
|
|
55
|
+
{backgroundGradient && (
|
|
56
|
+
<BackgroundGradient
|
|
57
|
+
height={backgroundGradientHeight}
|
|
58
|
+
/>
|
|
59
|
+
)}
|
|
39
60
|
</section>
|
|
40
61
|
)
|
|
41
62
|
}
|
|
@@ -60,6 +81,51 @@ Section.propTypes = {
|
|
|
60
81
|
* The children JSX
|
|
61
82
|
*/
|
|
62
83
|
children:PropTypes.node,
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The background shape to use for this section.
|
|
87
|
+
*/
|
|
88
|
+
backgroundShape:PropTypes.oneOf([
|
|
89
|
+
'triangle',
|
|
90
|
+
'ellipse',
|
|
91
|
+
'half-ellipse',
|
|
92
|
+
'half-ellipses',
|
|
93
|
+
'spiral',
|
|
94
|
+
'diamonds',
|
|
95
|
+
'circle',
|
|
96
|
+
'half-circle',
|
|
97
|
+
'ellipses',
|
|
98
|
+
'rectangles',
|
|
99
|
+
]),
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The background vertical alingment to use for if the background shape is set.
|
|
103
|
+
*/
|
|
104
|
+
backgroundVerticalAlign :PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
|
|
105
|
+
/**
|
|
106
|
+
* The background horizontal alingment to use for if the background shape is set.
|
|
107
|
+
*/
|
|
108
|
+
backgroundHorizontalAlign:PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The background height to use for if the background shape is set.
|
|
112
|
+
*/
|
|
113
|
+
backgroundHeight:PropTypes.string,
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The background overflow to use for if the background shape is set.
|
|
117
|
+
*/
|
|
118
|
+
backgroundOverflow:PropTypes.oneOf(['visible', 'hidden', 'scroll']),
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The background gradient to use for if the background gradient is set.
|
|
122
|
+
*/
|
|
123
|
+
backgroundGradient:PropTypes.bool,
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The background gradient height to use for if the background gradient is set.
|
|
127
|
+
*/
|
|
128
|
+
backgroundGradientHeight:PropTypes.string,
|
|
63
129
|
}
|
|
64
130
|
|
|
65
131
|
Section.defaultProps = {
|
package/src/ui/b/index.js
CHANGED
|
@@ -59,19 +59,19 @@ const HorizontalMenu = ({
|
|
|
59
59
|
>
|
|
60
60
|
{
|
|
61
61
|
(currentStep?.progress > 0)
|
|
62
|
-
&& <ProgressBar progress={currentStep.progress} attached height=".4em" color="main2" className="y-
|
|
62
|
+
&& <ProgressBar progress={currentStep.progress} attached height=".4em" color="main2" className="y-background1 b-dark-y" />
|
|
63
63
|
}
|
|
64
64
|
<div className={styleNames.elementContent}>
|
|
65
65
|
<div className="left">
|
|
66
66
|
{(!isFirstStep && !hideBackIcon) && (
|
|
67
67
|
<span
|
|
68
|
-
className="
|
|
68
|
+
className="prev-button pointer"
|
|
69
69
|
onClick={mobilePreviousStep}
|
|
70
70
|
role="button"
|
|
71
71
|
onKeyDown={mobilePreviousStep}
|
|
72
72
|
tabIndex={0}
|
|
73
73
|
>
|
|
74
|
-
|
|
74
|
+
{'<--'}
|
|
75
75
|
</span>
|
|
76
76
|
)}
|
|
77
77
|
</div>
|
|
@@ -131,7 +131,7 @@ HorizontalMenu.propTypes = {
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
HorizontalMenu.defaultProps = {
|
|
134
|
-
logoColor :'
|
|
134
|
+
logoColor :'paragraph',
|
|
135
135
|
stepsBackwards:1,
|
|
136
136
|
}
|
|
137
137
|
|