@pareto-engineering/design-system 2.0.0-alpha.25 → 2.0.0-alpha.26
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 +11 -40
- package/dist/cjs/b/Logo/styles.scss +0 -138
- package/dist/es/a/SVG/SVG.js +1 -1
- package/dist/es/b/Logo/Logo.js +11 -40
- package/dist/es/b/Logo/styles.scss +0 -138
- package/package.json +2 -2
- package/src/__snapshots__/Storyshots.test.js.snap +225 -1021
- 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 +11 -48
- package/src/ui/b/Logo/styles.scss +0 -138
|
@@ -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
|
@@ -15,37 +15,16 @@ const baseClassName = styleNames.base
|
|
|
15
15
|
|
|
16
16
|
const componentClassName = 'logo'
|
|
17
17
|
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
id :'logo__areto',
|
|
25
|
-
target:'logo__areto',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
id :'logo__t',
|
|
29
|
-
target:'logo__t',
|
|
30
|
-
},
|
|
31
|
-
]
|
|
18
|
+
const defaultTarget = {
|
|
19
|
+
id :'logo',
|
|
20
|
+
target:'logo',
|
|
21
|
+
}
|
|
32
22
|
|
|
33
23
|
const contentMap = {
|
|
34
24
|
default:{
|
|
35
|
-
sprite :'/
|
|
36
|
-
viewBox:'0 0
|
|
37
|
-
|
|
38
|
-
},
|
|
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
|
-
],
|
|
25
|
+
sprite :'/logo.svg',
|
|
26
|
+
viewBox:'0 0 39 39',
|
|
27
|
+
target :defaultTarget,
|
|
49
28
|
},
|
|
50
29
|
}
|
|
51
30
|
|
|
@@ -57,8 +36,6 @@ const Logo = ({
|
|
|
57
36
|
className:userClassName,
|
|
58
37
|
style,
|
|
59
38
|
color,
|
|
60
|
-
animated,
|
|
61
|
-
loop,
|
|
62
39
|
height,
|
|
63
40
|
width,
|
|
64
41
|
variant,
|
|
@@ -75,7 +52,7 @@ const Logo = ({
|
|
|
75
52
|
height={height}
|
|
76
53
|
width={width}
|
|
77
54
|
viewBox={svgConfig.viewBox}
|
|
78
|
-
|
|
55
|
+
target={svgConfig.target}
|
|
79
56
|
sprite={svgConfig.sprite}
|
|
80
57
|
id={id}
|
|
81
58
|
className={[
|
|
@@ -83,12 +60,10 @@ const Logo = ({
|
|
|
83
60
|
componentClassName,
|
|
84
61
|
`x-${color}`,
|
|
85
62
|
userClassName,
|
|
86
|
-
loop && 'loop',
|
|
87
63
|
]
|
|
88
64
|
.filter((e) => e)
|
|
89
65
|
.join(' ')}
|
|
90
66
|
style={style}
|
|
91
|
-
animated={animated}
|
|
92
67
|
// {...otherProps}
|
|
93
68
|
/>
|
|
94
69
|
)
|
|
@@ -115,16 +90,6 @@ Logo.propTypes = {
|
|
|
115
90
|
*/
|
|
116
91
|
color:PropTypes.string,
|
|
117
92
|
|
|
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
93
|
/**
|
|
129
94
|
* The height of the element
|
|
130
95
|
*/
|
|
@@ -142,11 +107,9 @@ Logo.propTypes = {
|
|
|
142
107
|
}
|
|
143
108
|
|
|
144
109
|
Logo.defaultProps = {
|
|
145
|
-
color
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
height :'4em',
|
|
149
|
-
variant :'default',
|
|
110
|
+
color :'paragraph',
|
|
111
|
+
height :'4em',
|
|
112
|
+
variant:'default',
|
|
150
113
|
}
|
|
151
114
|
|
|
152
115
|
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
|
|