@pareto-engineering/design-system 2.0.0-alpha.25 → 2.0.0-alpha.29
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/SVG/SVG.js +9 -3
- package/dist/cjs/b/Logo/Logo.js +20 -39
- package/dist/cjs/b/Logo/styles.scss +0 -138
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +1 -2
- package/dist/es/a/SVG/SVG.js +1 -1
- package/dist/es/b/Logo/Logo.js +20 -39
- package/dist/es/b/Logo/styles.scss +0 -138
- package/dist/es/f/fields/SelectInput/SelectInput.js +1 -2
- package/package.json +2 -2
- package/src/__snapshots__/Storyshots.test.js.snap +235 -729
- package/src/stories/b/Logo.stories.jsx +9 -9
- package/src/ui/a/SVG/SVG.jsx +1 -1
- package/src/ui/b/Logo/Logo.jsx +17 -40
- package/src/ui/b/Logo/styles.scss +0 -138
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +0 -1
|
@@ -24,14 +24,14 @@ export const Base = () => (
|
|
|
24
24
|
|
|
25
25
|
export const Color = () => ALL_COLORS.map((color) => <Logo color={color} key={color} />)
|
|
26
26
|
|
|
27
|
-
export const Animated = () => (
|
|
28
|
-
|
|
29
|
-
)
|
|
27
|
+
// export const Animated = () => (
|
|
28
|
+
// <Logo animated />
|
|
29
|
+
// )
|
|
30
30
|
|
|
31
|
-
export const Loop = () => (
|
|
32
|
-
|
|
33
|
-
)
|
|
31
|
+
// export const Loop = () => (
|
|
32
|
+
// <Logo animated loop />
|
|
33
|
+
// )
|
|
34
34
|
|
|
35
|
-
export const Beta = () => (
|
|
36
|
-
|
|
37
|
-
)
|
|
35
|
+
// export const Beta = () => (
|
|
36
|
+
// <Logo variant="beta" color="main1" />
|
|
37
|
+
// )
|
package/src/ui/a/SVG/SVG.jsx
CHANGED
package/src/ui/b/Logo/Logo.jsx
CHANGED
|
@@ -17,36 +17,21 @@ const componentClassName = 'logo'
|
|
|
17
17
|
|
|
18
18
|
const defaultTargets = [
|
|
19
19
|
{
|
|
20
|
-
id :'
|
|
21
|
-
target:'
|
|
20
|
+
id :'logo_squares',
|
|
21
|
+
target:'logo_squares',
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
id :'
|
|
25
|
-
target:'
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
id :'logo__t',
|
|
29
|
-
target:'logo__t',
|
|
24
|
+
id :'logo_pareto',
|
|
25
|
+
target:'logo_pareto',
|
|
30
26
|
},
|
|
31
27
|
]
|
|
32
28
|
|
|
33
29
|
const contentMap = {
|
|
34
30
|
default:{
|
|
35
|
-
sprite :'/
|
|
36
|
-
viewBox:'0 0
|
|
31
|
+
sprite :'/logo.svg',
|
|
32
|
+
viewBox:'0 0 156 30',
|
|
37
33
|
targets:defaultTargets,
|
|
38
34
|
},
|
|
39
|
-
beta:{
|
|
40
|
-
sprite :'/logo_parts_beta.svg',
|
|
41
|
-
viewBox:'0 0 1000 300',
|
|
42
|
-
targets:[
|
|
43
|
-
...defaultTargets,
|
|
44
|
-
{
|
|
45
|
-
id :'logo__beta',
|
|
46
|
-
target:'logo__beta',
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
},
|
|
50
35
|
}
|
|
51
36
|
|
|
52
37
|
/**
|
|
@@ -57,11 +42,10 @@ const Logo = ({
|
|
|
57
42
|
className:userClassName,
|
|
58
43
|
style,
|
|
59
44
|
color,
|
|
60
|
-
animated,
|
|
61
|
-
loop,
|
|
62
45
|
height,
|
|
63
46
|
width,
|
|
64
47
|
variant,
|
|
48
|
+
strokeColor,
|
|
65
49
|
// ...otherProps
|
|
66
50
|
}) => {
|
|
67
51
|
useLayoutEffect(() => {
|
|
@@ -82,13 +66,12 @@ const Logo = ({
|
|
|
82
66
|
baseClassName,
|
|
83
67
|
componentClassName,
|
|
84
68
|
`x-${color}`,
|
|
69
|
+
`y-${strokeColor}`,
|
|
85
70
|
userClassName,
|
|
86
|
-
loop && 'loop',
|
|
87
71
|
]
|
|
88
72
|
.filter((e) => e)
|
|
89
73
|
.join(' ')}
|
|
90
74
|
style={style}
|
|
91
|
-
animated={animated}
|
|
92
75
|
// {...otherProps}
|
|
93
76
|
/>
|
|
94
77
|
)
|
|
@@ -115,16 +98,6 @@ Logo.propTypes = {
|
|
|
115
98
|
*/
|
|
116
99
|
color:PropTypes.string,
|
|
117
100
|
|
|
118
|
-
/**
|
|
119
|
-
* Whether the logo is animated
|
|
120
|
-
*/
|
|
121
|
-
animated:PropTypes.bool,
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Whether the animation loops
|
|
125
|
-
*/
|
|
126
|
-
loop:PropTypes.bool,
|
|
127
|
-
|
|
128
101
|
/**
|
|
129
102
|
* The height of the element
|
|
130
103
|
*/
|
|
@@ -139,14 +112,18 @@ Logo.propTypes = {
|
|
|
139
112
|
* The variant to display. At the moment only `beta` is available.
|
|
140
113
|
*/
|
|
141
114
|
variant:PropTypes.string,
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The color of the svg stroke
|
|
118
|
+
*/
|
|
119
|
+
strokeColor:PropTypes.string,
|
|
142
120
|
}
|
|
143
121
|
|
|
144
122
|
Logo.defaultProps = {
|
|
145
|
-
color
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
variant :'default',
|
|
123
|
+
color :'paragraph',
|
|
124
|
+
height :'2em',
|
|
125
|
+
variant :'default',
|
|
126
|
+
strokeColor:'transparent',
|
|
150
127
|
}
|
|
151
128
|
|
|
152
129
|
export default Logo
|
|
@@ -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
|
|