@pareto-engineering/design-system 2.0.0-alpha.2 → 2.0.0-alpha.20
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/{RatingsInput/common/Rating/Rating.js → BackgroundGradient/BackgroundGradient.js} +22 -65
- 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/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/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/{RatingsInput/common/Rating → Shapes}/index.js +3 -3
- package/dist/cjs/a/Shapes/styles.scss +255 -0
- package/dist/cjs/a/{RatingsInput/RatingsInput.js → SnapScroller/SnapScroller.js} +15 -26
- package/dist/cjs/a/{RatingsInput → SnapScroller}/index.js +3 -3
- 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 +82 -18
- 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 +1 -1
- package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- 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/common/Debugger/Debugger.js +1 -1
- package/dist/cjs/f/common/Label/Label.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +2 -2
- package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +25 -6
- package/dist/cjs/f/fields/SelectInput/styles.scss +4 -4
- 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 +19 -5
- package/dist/cjs/f/fields/TextInput/styles.scss +3 -7
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +14 -7
- 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/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/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/{RatingsInput/common/Rating → Shapes}/index.js +1 -1
- package/dist/es/a/Shapes/styles.scss +255 -0
- package/dist/es/a/{RatingsInput/RatingsInput.js → SnapScroller/SnapScroller.js} +15 -26
- 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 +82 -18
- 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 +1 -1
- package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- 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/common/Debugger/Debugger.js +1 -1
- package/dist/es/f/common/Label/Label.js +1 -1
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +2 -2
- package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
- package/dist/es/f/fields/SelectInput/SelectInput.js +25 -6
- package/dist/es/f/fields/SelectInput/styles.scss +4 -4
- 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 +19 -5
- package/dist/es/f/fields/TextInput/styles.scss +3 -7
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +14 -7
- package/dist/es/form.scss +1 -1
- package/package.json +3 -3
- package/src/__snapshots__/Storyshots.test.js.snap +5662 -449
- 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 +2 -2
- package/src/stories/colors.js +5 -3
- package/src/stories/f/CheckboxInput.stories.jsx +1 -1
- package/src/stories/f/SelectInput.stories.jsx +29 -0
- package/src/stories/f/TaskRecommendationInput.stories.jsx +1 -1
- package/src/stories/f/TextInput.stories.jsx +14 -4
- 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 +82 -18
- 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 +1 -1
- package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +3 -2
- package/src/ui/f/common/Debugger/Debugger.jsx +1 -1
- package/src/ui/f/common/Label/Label.jsx +1 -1
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +2 -2
- package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +2 -2
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +35 -5
- package/src/ui/f/fields/SelectInput/styles.scss +4 -4
- package/src/ui/f/fields/TaskRecommendationInput/TaskRecommendationInput.jsx +1 -1
- package/src/ui/f/fields/TaskRecommendationInput/styles.scss +4 -0
- package/src/ui/f/fields/TextInput/TextInput.jsx +15 -2
- package/src/ui/f/fields/TextInput/styles.scss +3 -7
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +22 -11
- package/src/ui/form.scss +1 -1
- package/dist/cjs/a/RatingsInput/common/index.js +0 -13
- package/dist/cjs/a/RatingsInput/styles.scss +0 -35
- 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
package/dist/cjs/a/index.js
CHANGED
|
@@ -141,6 +141,30 @@ Object.defineProperty(exports, "Timestamp", {
|
|
|
141
141
|
return _Timestamp.Timestamp;
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
|
+
Object.defineProperty(exports, "Shapes", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function get() {
|
|
147
|
+
return _Shapes.Shapes;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
Object.defineProperty(exports, "OvalIllustration", {
|
|
151
|
+
enumerable: true,
|
|
152
|
+
get: function get() {
|
|
153
|
+
return _OvalIllustration.OvalIllustration;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
Object.defineProperty(exports, "SnapScroller", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
get: function get() {
|
|
159
|
+
return _SnapScroller.SnapScroller;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
Object.defineProperty(exports, "BackgroundGradient", {
|
|
163
|
+
enumerable: true,
|
|
164
|
+
get: function get() {
|
|
165
|
+
return _BackgroundGradient.BackgroundGradient;
|
|
166
|
+
}
|
|
167
|
+
});
|
|
144
168
|
|
|
145
169
|
var _SVG = require("./SVG");
|
|
146
170
|
|
|
@@ -180,4 +204,12 @@ var _ContentCard = require("./ContentCard");
|
|
|
180
204
|
|
|
181
205
|
var _DotInfo = require("./DotInfo");
|
|
182
206
|
|
|
183
|
-
var _Timestamp = require("./Timestamp");
|
|
207
|
+
var _Timestamp = require("./Timestamp");
|
|
208
|
+
|
|
209
|
+
var _Shapes = require("./Shapes");
|
|
210
|
+
|
|
211
|
+
var _OvalIllustration = require("./OvalIllustration");
|
|
212
|
+
|
|
213
|
+
var _SnapScroller = require("./SnapScroller");
|
|
214
|
+
|
|
215
|
+
var _BackgroundGradient = require("./BackgroundGradient");
|
|
@@ -13,7 +13,7 @@ var _bem = _interopRequireDefault(require("@pareto-engineering/bem"));
|
|
|
13
13
|
|
|
14
14
|
var _ = require("../..");
|
|
15
15
|
|
|
16
|
-
var _excluded = ["id", "className", "style", "children", "isLoading", "color", "isCompact", "isGhost", "isSimple"];
|
|
16
|
+
var _excluded = ["id", "className", "style", "children", "isLoading", "color", "isCompact", "isGhost", "isSimple", "arrowDirection"];
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
@@ -43,7 +43,8 @@ var Button = _ref => {
|
|
|
43
43
|
color,
|
|
44
44
|
isCompact,
|
|
45
45
|
isGhost,
|
|
46
|
-
isSimple
|
|
46
|
+
isSimple,
|
|
47
|
+
arrowDirection
|
|
47
48
|
} = _ref,
|
|
48
49
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
49
50
|
|
|
@@ -52,7 +53,7 @@ var Button = _ref => {
|
|
|
52
53
|
}, []);
|
|
53
54
|
return /*#__PURE__*/React.createElement("button", _extends({
|
|
54
55
|
id: id,
|
|
55
|
-
className: [baseClassName, componentClassName, userClassName, "x-".concat(color), isGhost && _bem.default.modifierGhost, isCompact && _bem.default.modifierCompact, isSimple && _bem.default.modifierSimple].filter(e => e).join(' '),
|
|
56
|
+
className: [baseClassName, componentClassName, userClassName, "x-".concat(color), isGhost && _bem.default.modifierGhost, isCompact && _bem.default.modifierCompact, isSimple && _bem.default.modifierSimple, arrowDirection && "arrow-".concat(arrowDirection)].filter(e => e).join(' '),
|
|
56
57
|
style: style,
|
|
57
58
|
type: "button"
|
|
58
59
|
}, otherProps), isLoading ? /*#__PURE__*/React.createElement(_.LoadingCircle, {
|
|
@@ -107,7 +108,12 @@ Button.propTypes = {
|
|
|
107
108
|
/**
|
|
108
109
|
* Button loading state
|
|
109
110
|
*/
|
|
110
|
-
isLoading: _propTypes.default.bool
|
|
111
|
+
isLoading: _propTypes.default.bool,
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The direction of the arrow if the button has one
|
|
115
|
+
*/
|
|
116
|
+
arrowDirection: _propTypes.default.string
|
|
111
117
|
};
|
|
112
118
|
Button.defaultProps = {
|
|
113
119
|
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
|
+
display: inline-flex;
|
|
18
|
+
font-family: var(--theme-default-paragraph);
|
|
17
19
|
font-weight: 600;
|
|
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,89 @@
|
|
|
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 _ = require("../..");
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _bem = _interopRequireDefault(require("@pareto-engineering/bem"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
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); }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
// Local Definitions
|
|
23
|
+
var baseClassName = _bem.default.base;
|
|
24
|
+
var componentClassName = 'metrics';
|
|
25
|
+
/**
|
|
26
|
+
* This is the component description.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
var Metrics = _ref => {
|
|
30
|
+
var {
|
|
31
|
+
id,
|
|
32
|
+
className: userClassName,
|
|
33
|
+
style,
|
|
34
|
+
items // ...otherProps
|
|
35
|
+
|
|
36
|
+
} = _ref;
|
|
37
|
+
(0, React.useLayoutEffect)(() => {
|
|
38
|
+
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
39
|
+
}, []);
|
|
40
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
id: id,
|
|
42
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
43
|
+
style: style // {...otherProps}
|
|
44
|
+
|
|
45
|
+
}, items.map(counter => /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: "metric"
|
|
47
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: "circle y-".concat(counter.circleColor)
|
|
49
|
+
}, /*#__PURE__*/React.createElement(_.AnimatedCounter, {
|
|
50
|
+
color: counter.color,
|
|
51
|
+
delay: counter.delay,
|
|
52
|
+
number: counter.number,
|
|
53
|
+
before: counter.before,
|
|
54
|
+
after: counter.after
|
|
55
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
56
|
+
className: "description-md sm-h xs-h md-s1"
|
|
57
|
+
}, counter.description)), /*#__PURE__*/React.createElement("p", {
|
|
58
|
+
className: "description-sm md-h lg-h sm-s-2"
|
|
59
|
+
}, counter.description))));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
Metrics.propTypes = {
|
|
63
|
+
/**
|
|
64
|
+
* The HTML id for this element
|
|
65
|
+
*/
|
|
66
|
+
id: _propTypes.default.string,
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The HTML class names for this element
|
|
70
|
+
*/
|
|
71
|
+
className: _propTypes.default.string,
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The React-written, css properties for this element.
|
|
75
|
+
*/
|
|
76
|
+
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The array of details
|
|
80
|
+
*/
|
|
81
|
+
items: _propTypes.default.node
|
|
82
|
+
};
|
|
83
|
+
/*
|
|
84
|
+
Metrics.defaultProps = {
|
|
85
|
+
}
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
var _default = Metrics;
|
|
89
|
+
exports.default = _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Metrics", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _Metrics.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _Metrics = _interopRequireDefault(require("./Metrics"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -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
|
+
}
|
|
@@ -11,9 +11,11 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _bem = _interopRequireDefault(require("@pareto-engineering/bem"));
|
|
13
13
|
|
|
14
|
+
var _a = require("../../../../a");
|
|
15
|
+
|
|
14
16
|
var _usePage = _interopRequireDefault(require("../../usePage"));
|
|
15
17
|
|
|
16
|
-
var _excluded = ["id", "className", "style", "children"];
|
|
18
|
+
var _excluded = ["id", "className", "style", "children", "backgroundShape", "backgroundGradient", "backgroundGradientHeight", "backgroundVerticalAlign", "backgroundHorizontalAlign", "backgroundHeight", "backgroundOverflow"];
|
|
17
19
|
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
21
|
|
|
@@ -27,7 +29,6 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
27
29
|
|
|
28
30
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
29
31
|
|
|
30
|
-
// Local Definitions
|
|
31
32
|
var baseClassName = _bem.default.base;
|
|
32
33
|
var componentClassName = 'section';
|
|
33
34
|
|
|
@@ -36,7 +37,14 @@ var Section = _ref => {
|
|
|
36
37
|
id: userId,
|
|
37
38
|
className: userClassName,
|
|
38
39
|
style,
|
|
39
|
-
children
|
|
40
|
+
children,
|
|
41
|
+
backgroundShape,
|
|
42
|
+
backgroundGradient,
|
|
43
|
+
backgroundGradientHeight,
|
|
44
|
+
backgroundVerticalAlign,
|
|
45
|
+
backgroundHorizontalAlign,
|
|
46
|
+
backgroundHeight,
|
|
47
|
+
backgroundOverflow
|
|
40
48
|
} = _ref,
|
|
41
49
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
42
50
|
|
|
@@ -48,7 +56,15 @@ var Section = _ref => {
|
|
|
48
56
|
id: sectionId,
|
|
49
57
|
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
50
58
|
style: style
|
|
51
|
-
}, otherProps), children
|
|
59
|
+
}, otherProps), children, backgroundShape && /*#__PURE__*/React.createElement(_a.Shapes, {
|
|
60
|
+
verticalAlign: backgroundVerticalAlign,
|
|
61
|
+
horizontalAlign: backgroundHorizontalAlign,
|
|
62
|
+
overflow: backgroundOverflow,
|
|
63
|
+
height: backgroundHeight,
|
|
64
|
+
shape: backgroundShape
|
|
65
|
+
}), backgroundGradient && /*#__PURE__*/React.createElement(_a.BackgroundGradient, {
|
|
66
|
+
height: backgroundGradientHeight
|
|
67
|
+
}));
|
|
52
68
|
};
|
|
53
69
|
|
|
54
70
|
Section.propTypes = {
|
|
@@ -70,7 +86,42 @@ Section.propTypes = {
|
|
|
70
86
|
/**
|
|
71
87
|
* The children JSX
|
|
72
88
|
*/
|
|
73
|
-
children: _propTypes.default.node
|
|
89
|
+
children: _propTypes.default.node,
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The background shape to use for this section.
|
|
93
|
+
*/
|
|
94
|
+
backgroundShape: _propTypes.default.oneOf(['triangle', 'ellipse', 'half-ellipse', 'half-ellipses', 'spiral', 'diamonds', 'circle', 'half-circle', 'ellipses', 'rectangles']),
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The background vertical alingment to use for if the background shape is set.
|
|
98
|
+
*/
|
|
99
|
+
backgroundVerticalAlign: _propTypes.default.oneOf(['flex-start', 'center', 'flex-end']),
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The background horizontal alingment to use for if the background shape is set.
|
|
103
|
+
*/
|
|
104
|
+
backgroundHorizontalAlign: _propTypes.default.oneOf(['flex-start', 'center', 'flex-end']),
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The background height to use for if the background shape is set.
|
|
108
|
+
*/
|
|
109
|
+
backgroundHeight: _propTypes.default.string,
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The background overflow to use for if the background shape is set.
|
|
113
|
+
*/
|
|
114
|
+
backgroundOverflow: _propTypes.default.oneOf(['visible', 'hidden', 'scroll']),
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The background gradient to use for if the background gradient is set.
|
|
118
|
+
*/
|
|
119
|
+
backgroundGradient: _propTypes.default.bool,
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The background gradient height to use for if the background gradient is set.
|
|
123
|
+
*/
|
|
124
|
+
backgroundGradientHeight: _propTypes.default.string
|
|
74
125
|
};
|
|
75
126
|
Section.defaultProps = {// someProp:false
|
|
76
127
|
};
|
package/dist/cjs/b/index.js
CHANGED
|
@@ -57,6 +57,12 @@ Object.defineProperty(exports, "SocialMediaButton", {
|
|
|
57
57
|
return _SocialMediaButton.SocialMediaButton;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
+
Object.defineProperty(exports, "Metrics", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function get() {
|
|
63
|
+
return _Metrics.Metrics;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
60
66
|
|
|
61
67
|
var _Button = require("./Button");
|
|
62
68
|
|
|
@@ -74,4 +80,6 @@ var _ThemeSelector = require("./ThemeSelector");
|
|
|
74
80
|
|
|
75
81
|
var _Logo = require("./Logo");
|
|
76
82
|
|
|
77
|
-
var _SocialMediaButton = require("./SocialMediaButton");
|
|
83
|
+
var _SocialMediaButton = require("./SocialMediaButton");
|
|
84
|
+
|
|
85
|
+
var _Metrics = require("./Metrics");
|
|
@@ -69,7 +69,7 @@ var HorizontalMenu = _ref => {
|
|
|
69
69
|
attached: true,
|
|
70
70
|
height: ".4em",
|
|
71
71
|
color: "main2",
|
|
72
|
-
className: "y-
|
|
72
|
+
className: "y-background1 b-dark-y"
|
|
73
73
|
}), /*#__PURE__*/React.createElement("div", {
|
|
74
74
|
className: _bem.default.elementContent
|
|
75
75
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -74,7 +74,8 @@ var Navigator = _ref => {
|
|
|
74
74
|
} else {
|
|
75
75
|
setNextStepIndex(stepsForward);
|
|
76
76
|
}
|
|
77
|
-
}
|
|
77
|
+
},
|
|
78
|
+
isCompact: true
|
|
78
79
|
}, "Next") : /*#__PURE__*/React.createElement("span", null));
|
|
79
80
|
};
|
|
80
81
|
|
|
@@ -136,8 +137,8 @@ Navigator.propTypes = {
|
|
|
136
137
|
};
|
|
137
138
|
Navigator.defaultProps = {
|
|
138
139
|
canMoveForward: true,
|
|
139
|
-
previousColor: '
|
|
140
|
-
nextColor: '
|
|
140
|
+
previousColor: 'main2',
|
|
141
|
+
nextColor: 'main2',
|
|
141
142
|
stepsForward: 1,
|
|
142
143
|
stepsBackwards: 1
|
|
143
144
|
};
|