@pareto-engineering/design-system 2.0.0-alpha.23 → 2.0.0-alpha.27
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/BackgroundGradient/styles.scss +1 -1
- 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/SVG/SVG.js +9 -3
- package/dist/cjs/a/Shapes/styles.scss +9 -9
- package/dist/cjs/b/Logo/Logo.js +11 -40
- package/dist/cjs/b/Logo/styles.scss +0 -138
- package/dist/cjs/{a/RatingsInput/RatingsInput.js → experimental/GradientBackground/GradientBackground.js} +37 -27
- package/dist/cjs/experimental/GradientBackground/index.js +15 -0
- package/dist/cjs/experimental/GradientBackground/styles.scss +64 -0
- package/dist/cjs/experimental/index.js +13 -0
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +1 -2
- package/dist/es/a/BackgroundGradient/styles.scss +1 -1
- 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/SVG/SVG.js +1 -1
- package/dist/es/a/Shapes/styles.scss +9 -9
- package/dist/es/b/Logo/Logo.js +11 -40
- package/dist/es/b/Logo/styles.scss +0 -138
- package/dist/es/experimental/GradientBackground/GradientBackground.js +76 -0
- package/dist/es/experimental/GradientBackground/index.js +2 -0
- package/dist/es/experimental/GradientBackground/styles.scss +64 -0
- package/dist/es/experimental/index.js +1 -0
- package/dist/es/f/fields/SelectInput/SelectInput.js +1 -2
- package/package.json +2 -2
- package/src/__snapshots__/Storyshots.test.js.snap +226 -1050
- package/src/stories/b/Logo.stories.jsx +9 -9
- package/src/ui/a/BackgroundGradient/styles.scss +1 -1
- package/src/ui/a/SVG/SVG.jsx +1 -1
- package/src/ui/a/Shapes/styles.scss +9 -9
- package/src/ui/b/Logo/Logo.jsx +11 -48
- package/src/ui/b/Logo/styles.scss +0 -138
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +0 -1
- package/dist/cjs/a/RatingsInput/common/Rating/Rating.js +0 -120
- package/dist/cjs/a/RatingsInput/common/Rating/index.js +0 -15
- package/dist/cjs/a/RatingsInput/common/index.js +0 -13
- package/dist/cjs/a/RatingsInput/index.js +0 -15
- package/dist/cjs/a/RatingsInput/styles.scss +0 -35
- package/dist/es/a/RatingsInput/RatingsInput.js +0 -72
- package/dist/es/a/RatingsInput/common/Rating/Rating.js +0 -102
- package/dist/es/a/RatingsInput/common/Rating/index.js +0 -2
- 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/es/b/Logo/Logo.js
CHANGED
|
@@ -7,29 +7,15 @@ import { SVG } from "../../a"; // Local Definitions
|
|
|
7
7
|
|
|
8
8
|
const baseClassName = styleNames.base;
|
|
9
9
|
const componentClassName = 'logo';
|
|
10
|
-
const
|
|
11
|
-
id: '
|
|
12
|
-
target: '
|
|
13
|
-
}
|
|
14
|
-
id: 'logo__areto',
|
|
15
|
-
target: 'logo__areto'
|
|
16
|
-
}, {
|
|
17
|
-
id: 'logo__t',
|
|
18
|
-
target: 'logo__t'
|
|
19
|
-
}];
|
|
10
|
+
const defaultTarget = {
|
|
11
|
+
id: 'logo',
|
|
12
|
+
target: 'logo'
|
|
13
|
+
};
|
|
20
14
|
const contentMap = {
|
|
21
15
|
default: {
|
|
22
|
-
sprite: '/
|
|
23
|
-
viewBox: '0 0
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
beta: {
|
|
27
|
-
sprite: '/logo_parts_beta.svg',
|
|
28
|
-
viewBox: '0 0 1000 300',
|
|
29
|
-
targets: [...defaultTargets, {
|
|
30
|
-
id: 'logo__beta',
|
|
31
|
-
target: 'logo__beta'
|
|
32
|
-
}]
|
|
16
|
+
sprite: '/logo.svg',
|
|
17
|
+
viewBox: '0 0 39 39',
|
|
18
|
+
target: defaultTarget
|
|
33
19
|
}
|
|
34
20
|
};
|
|
35
21
|
/**
|
|
@@ -41,8 +27,6 @@ const Logo = ({
|
|
|
41
27
|
className: userClassName,
|
|
42
28
|
style,
|
|
43
29
|
color,
|
|
44
|
-
animated,
|
|
45
|
-
loop,
|
|
46
30
|
height,
|
|
47
31
|
width,
|
|
48
32
|
variant // ...otherProps
|
|
@@ -56,12 +40,11 @@ const Logo = ({
|
|
|
56
40
|
height: height,
|
|
57
41
|
width: width,
|
|
58
42
|
viewBox: svgConfig.viewBox,
|
|
59
|
-
|
|
43
|
+
target: svgConfig.target,
|
|
60
44
|
sprite: svgConfig.sprite,
|
|
61
45
|
id: id,
|
|
62
|
-
className: [baseClassName, componentClassName, `x-${color}`, userClassName
|
|
63
|
-
style: style
|
|
64
|
-
animated: animated // {...otherProps}
|
|
46
|
+
className: [baseClassName, componentClassName, `x-${color}`, userClassName].filter(e => e).join(' '),
|
|
47
|
+
style: style // {...otherProps}
|
|
65
48
|
|
|
66
49
|
});
|
|
67
50
|
};
|
|
@@ -87,16 +70,6 @@ Logo.propTypes = {
|
|
|
87
70
|
*/
|
|
88
71
|
color: PropTypes.string,
|
|
89
72
|
|
|
90
|
-
/**
|
|
91
|
-
* Whether the logo is animated
|
|
92
|
-
*/
|
|
93
|
-
animated: PropTypes.bool,
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Whether the animation loops
|
|
97
|
-
*/
|
|
98
|
-
loop: PropTypes.bool,
|
|
99
|
-
|
|
100
73
|
/**
|
|
101
74
|
* The height of the element
|
|
102
75
|
*/
|
|
@@ -113,9 +86,7 @@ Logo.propTypes = {
|
|
|
113
86
|
variant: PropTypes.string
|
|
114
87
|
};
|
|
115
88
|
Logo.defaultProps = {
|
|
116
|
-
color: '
|
|
117
|
-
animated: false,
|
|
118
|
-
loop: false,
|
|
89
|
+
color: 'paragraph',
|
|
119
90
|
height: '4em',
|
|
120
91
|
variant: 'default'
|
|
121
92
|
};
|
|
@@ -1,147 +1,9 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
|
|
3
|
-
/* stylelint-disable selector-id-pattern, selector-max-id -- because of the custom svg */
|
|
4
|
-
|
|
5
3
|
@use "@pareto-engineering/bem";
|
|
6
4
|
|
|
7
|
-
// Main animation - finishes after the drawing
|
|
8
|
-
|
|
9
|
-
@keyframes draw-logo-p {
|
|
10
|
-
0% {
|
|
11
|
-
stroke-dashoffset: var(--svg-origin-stroke-dashoffset, 1000);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
20%,
|
|
15
|
-
100% {
|
|
16
|
-
stroke-dashoffset: var(--svg-target-stroke-dashoffset, 0);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
@keyframes draw-logo-areto {
|
|
20
|
-
0%,
|
|
21
|
-
20% {
|
|
22
|
-
stroke-dashoffset: var(--svg-origin-stroke-dashoffset, 1000);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
90%,
|
|
26
|
-
100% {
|
|
27
|
-
stroke-dashoffset: var(--svg-target-stroke-dashoffset, 0);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
@keyframes draw-logo-t {
|
|
31
|
-
0%,
|
|
32
|
-
90% {
|
|
33
|
-
stroke-dashoffset: var(--svg-origin-stroke-dashoffset, 1000);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
100% {
|
|
37
|
-
stroke-dashoffset: var(--svg-target-stroke-dashoffset, 0);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Alt animation - looping
|
|
42
|
-
|
|
43
|
-
@keyframes draw-alt-logo-p {
|
|
44
|
-
0% {
|
|
45
|
-
stroke-dashoffset: var(--svg-origin-stroke-dashoffset, 1000);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
10%,
|
|
49
|
-
50% {
|
|
50
|
-
stroke-dashoffset: var(--svg-target-stroke-dashoffset, 0);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
60%,
|
|
54
|
-
100% {
|
|
55
|
-
stroke-dashoffset: var(--svg-final-stroke-dashoffset, 1000);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
@keyframes draw-alt-logo-areto {
|
|
59
|
-
0%,
|
|
60
|
-
10% {
|
|
61
|
-
stroke-dashoffset: var(--svg-origin-stroke-dashoffset, 1000);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
45%,
|
|
65
|
-
60% {
|
|
66
|
-
stroke-dashoffset: var(--svg-target-stroke-dashoffset, 0);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
95%,
|
|
70
|
-
100% {
|
|
71
|
-
stroke-dashoffset: var(--svg-final-stroke-dashoffset, 1000);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
@keyframes draw-alt-logo-t {
|
|
75
|
-
0%,
|
|
76
|
-
45% {
|
|
77
|
-
stroke-dashoffset: var(--svg-origin-stroke-dashoffset, 1000);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
50%,
|
|
81
|
-
95% {
|
|
82
|
-
stroke-dashoffset: var(--svg-target-stroke-dashoffset, 0);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
100% {
|
|
86
|
-
stroke-dashoffset: var(--svg-final-stroke-dashoffset, 1000);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
5
|
.#{bem.$base}.logo {
|
|
91
|
-
&.animated.animated {
|
|
92
|
-
--svg-animation-repeats: 1;
|
|
93
|
-
--svg-animation-time: 3.5s;
|
|
94
|
-
|
|
95
|
-
&:hover,
|
|
96
|
-
&:focus {
|
|
97
|
-
//--path-animation: dash-a 1s linear 0s 1 forwards;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
use#logo__p {
|
|
101
|
-
//--svg-animation-delay: 0;
|
|
102
|
-
--svg-dasharray: 1000;
|
|
103
|
-
--svg-origin-stroke-dashoffset: -1000;
|
|
104
|
-
//--svg-target-stroke-dashoffset: 0;
|
|
105
|
-
--svg-final-stroke-dashoffset: 1000;
|
|
106
|
-
animation-name: draw-logo-p;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
use#logo__areto {
|
|
110
|
-
--svg-dasharray: 2000;
|
|
111
|
-
--svg-origin-stroke-dashoffset: 2000;
|
|
112
|
-
//--svg-target-stroke-dashoffset: 0;
|
|
113
|
-
--svg-final-stroke-dashoffset: -2000;
|
|
114
|
-
animation-name: draw-logo-areto;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
use#logo__t {
|
|
118
|
-
--svg-dasharray: 200;
|
|
119
|
-
--svg-origin-stroke-dashoffset: 200;
|
|
120
|
-
//--svg-target-stroke-dashoffset: 0;
|
|
121
|
-
--svg-final-stroke-dashoffset: -200;
|
|
122
|
-
animation-name: draw-logo-t;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
&.loop.loop {
|
|
126
|
-
--svg-animation-time: 6s;
|
|
127
|
-
--svg-animation-repeats: infinite;
|
|
128
|
-
|
|
129
|
-
use#logo__p {
|
|
130
|
-
--svg-final-stroke-dashoffset: 1000;
|
|
131
|
-
animation-name: draw-alt-logo-p;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
use#logo__areto {
|
|
135
|
-
--svg-final-stroke-dashoffset: -2000;
|
|
136
|
-
animation-name: draw-alt-logo-areto;
|
|
137
|
-
}
|
|
138
6
|
|
|
139
|
-
use#logo__t {
|
|
140
|
-
--svg-final-stroke-dashoffset: -200;
|
|
141
|
-
animation-name: draw-alt-logo-t;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
7
|
}
|
|
146
8
|
|
|
147
9
|
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useLayoutEffect } from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import styleNames from '@pareto-engineering/bem'; // Local Definitions
|
|
6
|
+
|
|
7
|
+
const baseClassName = styleNames.base;
|
|
8
|
+
const componentClassName = 'gradient-background';
|
|
9
|
+
/**
|
|
10
|
+
* This is the component description.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const GradientBackground = ({
|
|
14
|
+
id,
|
|
15
|
+
className: userClassName,
|
|
16
|
+
style,
|
|
17
|
+
pin,
|
|
18
|
+
shape // ...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,
|
|
28
|
+
'--pin': pin
|
|
29
|
+
} // {...otherProps}
|
|
30
|
+
|
|
31
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: "shapes"
|
|
33
|
+
}, shape === 'triangle' && /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
className: "triangle"
|
|
35
|
+
}), shape === 'ellipses' && /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: "ellipses"
|
|
37
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: "up"
|
|
39
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
className: "down"
|
|
41
|
+
})), shape === 'ellipse' && /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
className: "ellipse"
|
|
43
|
+
})));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
GradientBackground.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
|
+
* Where to pin the shapes
|
|
64
|
+
*/
|
|
65
|
+
pin: PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
*/
|
|
70
|
+
shape: PropTypes.oneOf(['triangle', 'ellipse', 'spiral', 'diamonds', 'circles', 'ellipses'])
|
|
71
|
+
};
|
|
72
|
+
GradientBackground.defaultProps = {
|
|
73
|
+
pin: 'center',
|
|
74
|
+
shape: 'triangle'
|
|
75
|
+
};
|
|
76
|
+
export default GradientBackground;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
|
|
5
|
+
$default-triangle-dimension:30em;
|
|
6
|
+
$default-ellipses-dimension:50em;
|
|
7
|
+
$default-ellipse-dimension:80em;
|
|
8
|
+
$default-shapes-opacity:.8;
|
|
9
|
+
|
|
10
|
+
.#{bem.$base}.gradient-background {
|
|
11
|
+
align-items: center;
|
|
12
|
+
background: var(--light-y);
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
height: 100%;
|
|
16
|
+
justify-content: var(--pin);
|
|
17
|
+
position: absolute;
|
|
18
|
+
width: 100%;
|
|
19
|
+
|
|
20
|
+
.shapes {
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
|
|
24
|
+
.triangle {
|
|
25
|
+
background-image: linear-gradient(var(--light-y), var(--dark-y));
|
|
26
|
+
clip-path: polygon(0 0, 50% 100%, 100% 0);
|
|
27
|
+
height: $default-triangle-dimension * .86;
|
|
28
|
+
opacity: $default-shapes-opacity;
|
|
29
|
+
width: $default-triangle-dimension;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ellipses {
|
|
33
|
+
|
|
34
|
+
height: $default-ellipses-dimension / 2;
|
|
35
|
+
width: $default-ellipses-dimension;
|
|
36
|
+
opacity: $default-shapes-opacity;
|
|
37
|
+
|
|
38
|
+
.up {
|
|
39
|
+
background-image: linear-gradient(var(--light-y), var(--y));
|
|
40
|
+
clip-path: ellipse(40% 100% at 50% 0%);
|
|
41
|
+
height:50%;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.down {
|
|
45
|
+
background-image: linear-gradient(to top, var(--light-y), var(--y));
|
|
46
|
+
clip-path: ellipse(40% 100% at 50% 100%);
|
|
47
|
+
height:50%;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ellipse {
|
|
53
|
+
height: $default-ellipse-dimension / 1.5;
|
|
54
|
+
width: $default-ellipse-dimension;
|
|
55
|
+
background-image: linear-gradient( to top left, var(--dark-y), var(--light-y),var(--dark-y));
|
|
56
|
+
clip-path: ellipse(50% 25% at 50% 50%);
|
|
57
|
+
opacity: $default-shapes-opacity;
|
|
58
|
+
transform: rotate3d(0, 0, -1, 10deg);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GradientBackground } from "./GradientBackground";
|
|
@@ -57,8 +57,7 @@ const SelectInput = ({
|
|
|
57
57
|
return /*#__PURE__*/React.createElement("option", {
|
|
58
58
|
key: newOption.value,
|
|
59
59
|
value: newOption.value,
|
|
60
|
-
disabled: (newOption === null || newOption === void 0 ? void 0 : newOption.disabled) || false
|
|
61
|
-
selected: (newOption === null || newOption === void 0 ? void 0 : newOption.disabled) || true
|
|
60
|
+
disabled: (newOption === null || newOption === void 0 ? void 0 : newOption.disabled) || false
|
|
62
61
|
}, newOption.label);
|
|
63
62
|
})), (description || meta.touched && meta.error) && /*#__PURE__*/React.createElement(FormDescription, {
|
|
64
63
|
isError: !!meta.error,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pareto-engineering/design-system",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.27",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/es/index.js",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"stylelint-config-palantir": "^5.1.0"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@pareto-engineering/assets": "^2.0.0-alpha.
|
|
82
|
+
"@pareto-engineering/assets": "^2.0.0-alpha.11",
|
|
83
83
|
"@pareto-engineering/bem": "^0.1.5",
|
|
84
84
|
"@pareto-engineering/styles": "^2.0.0-alpha.8",
|
|
85
85
|
"date-fns": "^2.22.1",
|