@pareto-engineering/design-system 2.0.0-alpha.5 → 2.0.0-alpha.9
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/OvalIllustration/OvalIllustration.js +102 -0
- package/dist/cjs/a/OvalIllustration/index.js +15 -0
- package/dist/cjs/a/OvalIllustration/styles.scss +105 -0
- package/dist/cjs/a/Shapes/Shapes.js +31 -9
- package/dist/cjs/a/Shapes/styles.scss +41 -19
- package/dist/cjs/a/index.js +9 -1
- package/dist/cjs/b/Page/common/Section/Section.js +21 -7
- package/dist/es/a/OvalIllustration/OvalIllustration.js +86 -0
- package/dist/es/a/OvalIllustration/index.js +2 -0
- package/dist/es/a/OvalIllustration/styles.scss +105 -0
- package/dist/es/a/Shapes/Shapes.js +31 -9
- package/dist/es/a/Shapes/styles.scss +41 -19
- package/dist/es/a/index.js +2 -1
- package/dist/es/b/Page/common/Section/Section.js +19 -5
- package/package.json +2 -2
- package/src/__snapshots__/Storyshots.test.js.snap +103 -12
- package/src/stories/a/OvalIllustration.stories.jsx +36 -0
- package/src/stories/a/Shapes.stories.jsx +56 -43
- package/src/stories/b/Page.stories.jsx +2 -1
- package/src/ui/a/OvalIllustration/OvalIllustration.jsx +108 -0
- package/src/ui/a/OvalIllustration/index.js +2 -0
- package/src/ui/a/OvalIllustration/styles.scss +105 -0
- package/src/ui/a/Shapes/Shapes.jsx +34 -7
- package/src/ui/a/Shapes/styles.scss +41 -19
- package/src/ui/a/index.js +1 -0
- package/src/ui/b/Page/common/Section/Section.jsx +21 -4
|
@@ -14,9 +14,11 @@ const Shapes = ({
|
|
|
14
14
|
id,
|
|
15
15
|
className: userClassName,
|
|
16
16
|
style,
|
|
17
|
-
pin,
|
|
18
17
|
shape,
|
|
19
|
-
height
|
|
18
|
+
height,
|
|
19
|
+
overflow,
|
|
20
|
+
verticalAlign,
|
|
21
|
+
horizontalAlign // ...otherProps
|
|
20
22
|
|
|
21
23
|
}) => {
|
|
22
24
|
useLayoutEffect(() => {
|
|
@@ -26,8 +28,10 @@ const Shapes = ({
|
|
|
26
28
|
id: id,
|
|
27
29
|
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
28
30
|
style: { ...style,
|
|
29
|
-
'--
|
|
30
|
-
'--
|
|
31
|
+
'--shape-height': height,
|
|
32
|
+
'--overflow': overflow,
|
|
33
|
+
'--vertical-align': verticalAlign,
|
|
34
|
+
'--horizontal-align': horizontalAlign
|
|
31
35
|
} // {...otherProps}
|
|
32
36
|
|
|
33
37
|
}, shape === 'triangle' && /*#__PURE__*/React.createElement("div", {
|
|
@@ -78,6 +82,12 @@ const Shapes = ({
|
|
|
78
82
|
className: "circle-three"
|
|
79
83
|
}), /*#__PURE__*/React.createElement("div", {
|
|
80
84
|
className: "circle-four"
|
|
85
|
+
})), shape === 'rotated-ellipses' && /*#__PURE__*/React.createElement("div", {
|
|
86
|
+
className: "rotated-ellipses"
|
|
87
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
88
|
+
className: "ellipse-one"
|
|
89
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
90
|
+
className: "ellipse-two"
|
|
81
91
|
})));
|
|
82
92
|
};
|
|
83
93
|
|
|
@@ -103,17 +113,29 @@ Shapes.propTypes = {
|
|
|
103
113
|
height: PropTypes.string,
|
|
104
114
|
|
|
105
115
|
/**
|
|
106
|
-
*
|
|
116
|
+
* The vertical alignment of the shape.
|
|
117
|
+
*/
|
|
118
|
+
verticalAlign: PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The horizontal alignment of the shape.
|
|
107
122
|
*/
|
|
108
|
-
|
|
123
|
+
horizontalAlign: PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
|
|
109
124
|
|
|
110
125
|
/**
|
|
111
126
|
* The options of a shape to use
|
|
112
127
|
*/
|
|
113
|
-
shape: PropTypes.oneOf(['triangle', 'ellipse', 'half-ellipse', 'half-ellipses', 'spiral', 'diamonds', 'circle', 'half-circle', 'ellipses', 'rectangles'])
|
|
128
|
+
shape: PropTypes.oneOf(['triangle', 'ellipse', 'half-ellipse', 'half-ellipses', 'spiral', 'diamonds', 'circle', 'half-circle', 'ellipses', 'rectangles', 'rotated-ellipses']),
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The overflow of the shape.
|
|
132
|
+
*/
|
|
133
|
+
overflow: PropTypes.oneOf(['hidden', 'visible'])
|
|
114
134
|
};
|
|
115
135
|
Shapes.defaultProps = {
|
|
116
|
-
|
|
117
|
-
|
|
136
|
+
verticalAlign: 'center',
|
|
137
|
+
horizontalAlign: 'center',
|
|
138
|
+
shape: 'triangle',
|
|
139
|
+
overflow: 'hidden'
|
|
118
140
|
};
|
|
119
141
|
export default Shapes;
|
|
@@ -15,8 +15,9 @@ $default-shapes-opacity:.8;
|
|
|
15
15
|
left: 0;
|
|
16
16
|
display: flex;
|
|
17
17
|
flex-direction: column;
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
overflow: var(--overflow);
|
|
19
|
+
justify-content: var(--vertical-align);
|
|
20
|
+
align-items: var(--horizontal-align);
|
|
20
21
|
height: 100%;
|
|
21
22
|
width: 100%;
|
|
22
23
|
|
|
@@ -34,24 +35,23 @@ $default-shapes-opacity:.8;
|
|
|
34
35
|
width: calc(var(--shape-height, #{$default-ellipse-height}) * 2);
|
|
35
36
|
|
|
36
37
|
.up {
|
|
37
|
-
background-image:
|
|
38
|
-
clip-path: ellipse(
|
|
38
|
+
background-image: radial-gradient(ellipse at center bottom, var(--y) 5%, transparent 65%);
|
|
39
|
+
clip-path: ellipse(35% 100% at 50% 0%);
|
|
39
40
|
height: 50%;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
.down {
|
|
43
|
-
background-image:
|
|
44
|
-
clip-path: ellipse(
|
|
44
|
+
background-image: radial-gradient(ellipse at center top, var(--y) 5%, transparent 65%);
|
|
45
|
+
clip-path: ellipse(35% 100% at 50% 100%);
|
|
45
46
|
height: 50%;
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
.ellipse {
|
|
50
|
-
background-image: linear-gradient(
|
|
51
|
-
clip-path: ellipse(50%
|
|
51
|
+
background-image: linear-gradient(var(--dark-y), var(--light-y));
|
|
52
|
+
clip-path: ellipse(50% 50% at 50% 50%);
|
|
52
53
|
height: var(--shape-height, #{$default-ellipse-height});
|
|
53
54
|
opacity: $default-shapes-opacity;
|
|
54
|
-
transform: rotate3d(0, 0, -1, 10deg);
|
|
55
55
|
width: calc(var(--shape-height, #{$default-ellipse-height}) * 2);
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -109,8 +109,8 @@ $default-shapes-opacity:.8;
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
.half-ellipse {
|
|
112
|
-
background-image:
|
|
113
|
-
clip-path: ellipse(
|
|
112
|
+
background-image: radial-gradient(ellipse at center bottom, var(--y) 10%, transparent 65%);
|
|
113
|
+
clip-path: ellipse(60% 100% at 50% 0%);
|
|
114
114
|
height: var(--shape-height, #{$default-ellipse-height});
|
|
115
115
|
opacity: $default-shapes-opacity;
|
|
116
116
|
width: calc(var(--shape-height, #{$default-ellipse-height}) * 2);
|
|
@@ -174,26 +174,48 @@ $default-shapes-opacity:.8;
|
|
|
174
174
|
|
|
175
175
|
.circle-one {
|
|
176
176
|
transform: rotate(45deg);
|
|
177
|
-
height:
|
|
178
|
-
width:
|
|
177
|
+
height:calc(var(--shape-height, #{$default-ellipse-height})* 0.4);
|
|
178
|
+
width: calc(var(--shape-height, #{$default-ellipse-height})* 0.4);
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
.circle-two {
|
|
182
|
-
height:
|
|
183
|
-
width:
|
|
182
|
+
height: calc(var(--shape-height, #{$default-ellipse-height})* 0.6);
|
|
183
|
+
width: calc(var(--shape-height, #{$default-ellipse-height})* 0.6);
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
.circle-three {
|
|
187
187
|
transform: rotate(-45deg);
|
|
188
|
-
height:
|
|
189
|
-
width:
|
|
188
|
+
height: calc(var(--shape-height, #{$default-ellipse-height})* 0.8);
|
|
189
|
+
width: calc(var(--shape-height, #{$default-ellipse-height})* 0.8);
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
.circle-four {
|
|
193
193
|
transform: rotate(-90deg);
|
|
194
|
-
height:
|
|
195
|
-
width:
|
|
194
|
+
height: calc(var(--shape-height, #{$default-ellipse-height})* 1);
|
|
195
|
+
width: calc(var(--shape-height, #{$default-ellipse-height})* 1);
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
+
.rotated-ellipses {
|
|
199
|
+
height: var(--shape-height, #{$default-ellipse-height});
|
|
200
|
+
opacity: $default-shapes-opacity;
|
|
201
|
+
width: var(--shape-height, #{$default-ellipse-height});
|
|
202
|
+
display: flex;
|
|
198
203
|
|
|
204
|
+
> *{
|
|
205
|
+
width: 100%;
|
|
206
|
+
height: 100%;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.ellipse-one {
|
|
210
|
+
background-image: radial-gradient(ellipse at bottom left, var(--y) 30%, transparent 65%);
|
|
211
|
+
transform: rotate(-15deg);
|
|
212
|
+
clip-path: ellipse(50% 35% at 50% 50%);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.ellipse-two {
|
|
216
|
+
background-image: radial-gradient(ellipse at top right, var(--y) 30%, transparent 65%);
|
|
217
|
+
transform: rotate(-15deg);
|
|
218
|
+
clip-path: ellipse(50% 35% at 50% 50%);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
199
221
|
}
|
package/dist/es/a/index.js
CHANGED
|
@@ -18,4 +18,5 @@ export { Quote } from "./Quote";
|
|
|
18
18
|
export { ContentCard } from "./ContentCard";
|
|
19
19
|
export { DotInfo } from "./DotInfo";
|
|
20
20
|
export { Timestamp } from "./Timestamp";
|
|
21
|
-
export { Shapes } from "./Shapes";
|
|
21
|
+
export { Shapes } from "./Shapes";
|
|
22
|
+
export { OvalIllustration } from "./OvalIllustration";
|
|
@@ -16,8 +16,10 @@ const Section = ({
|
|
|
16
16
|
style,
|
|
17
17
|
children,
|
|
18
18
|
backgroundShape,
|
|
19
|
-
|
|
19
|
+
backgroundVerticalAlign,
|
|
20
|
+
backgroundHorizontalAlign,
|
|
20
21
|
backgroundHeight,
|
|
22
|
+
backgroundOverflow,
|
|
21
23
|
...otherProps
|
|
22
24
|
}) => {
|
|
23
25
|
const {
|
|
@@ -29,7 +31,9 @@ const Section = ({
|
|
|
29
31
|
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
30
32
|
style: style
|
|
31
33
|
}, otherProps), children, backgroundShape && /*#__PURE__*/React.createElement(Shapes, {
|
|
32
|
-
|
|
34
|
+
verticalAlign: backgroundVerticalAlign,
|
|
35
|
+
horizontalAlign: backgroundHorizontalAlign,
|
|
36
|
+
backgroundOverflow: backgroundOverflow,
|
|
33
37
|
height: backgroundHeight,
|
|
34
38
|
shape: backgroundShape
|
|
35
39
|
}));
|
|
@@ -62,14 +66,24 @@ Section.propTypes = {
|
|
|
62
66
|
backgroundShape: PropTypes.oneOf(['triangle', 'ellipse', 'half-ellipse', 'half-ellipses', 'spiral', 'diamonds', 'circle', 'half-circle', 'ellipses', 'rectangles']),
|
|
63
67
|
|
|
64
68
|
/**
|
|
65
|
-
* The background
|
|
69
|
+
* The background vertical alingment to use for if the background shape is set.
|
|
66
70
|
*/
|
|
67
|
-
|
|
71
|
+
backgroundVerticalAlign: PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The background horizontal alingment to use for if the background shape is set.
|
|
75
|
+
*/
|
|
76
|
+
backgroundHorizontalAlign: PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
|
|
68
77
|
|
|
69
78
|
/**
|
|
70
79
|
* The background height to use for if the background shape is set.
|
|
71
80
|
*/
|
|
72
|
-
backgroundHeight: PropTypes.string
|
|
81
|
+
backgroundHeight: PropTypes.string,
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The background overflow to use for if the background shape is set.
|
|
85
|
+
*/
|
|
86
|
+
backgroundOverflow: PropTypes.oneOf(['visible', 'hidden', 'scroll'])
|
|
73
87
|
};
|
|
74
88
|
Section.defaultProps = {// someProp:false
|
|
75
89
|
};
|
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.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/es/index.js",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@pareto-engineering/assets": "^2.0.0-alpha.3",
|
|
83
83
|
"@pareto-engineering/bem": "^0.1.5",
|
|
84
|
-
"@pareto-engineering/styles": "^2.0.0-alpha.
|
|
84
|
+
"@pareto-engineering/styles": "^2.0.0-alpha.6",
|
|
85
85
|
"date-fns": "^2.22.1",
|
|
86
86
|
"formik": "^2.2.9",
|
|
87
87
|
"hamburgers": "^1.1.3",
|
|
@@ -783,6 +783,39 @@ exports[`Storyshots a/LoadingCircle Base 1`] = `
|
|
|
783
783
|
</div>
|
|
784
784
|
`;
|
|
785
785
|
|
|
786
|
+
exports[`Storyshots a/OvalIllustration With Background 1`] = `
|
|
787
|
+
<div
|
|
788
|
+
className="base oval-illustration right"
|
|
789
|
+
>
|
|
790
|
+
<div
|
|
791
|
+
className="oval-background y-background3"
|
|
792
|
+
/>
|
|
793
|
+
<div
|
|
794
|
+
className="illustration"
|
|
795
|
+
>
|
|
796
|
+
<img
|
|
797
|
+
alt="illustration"
|
|
798
|
+
src="https://www.azernews.az/media/pictures/company_picture.jpg"
|
|
799
|
+
/>
|
|
800
|
+
</div>
|
|
801
|
+
</div>
|
|
802
|
+
`;
|
|
803
|
+
|
|
804
|
+
exports[`Storyshots a/OvalIllustration Without Background 1`] = `
|
|
805
|
+
<div
|
|
806
|
+
className="base oval-illustration left"
|
|
807
|
+
>
|
|
808
|
+
<div
|
|
809
|
+
className="illustration"
|
|
810
|
+
>
|
|
811
|
+
<img
|
|
812
|
+
alt="illustration"
|
|
813
|
+
src="https://www.azernews.az/media/pictures/company_picture.jpg"
|
|
814
|
+
/>
|
|
815
|
+
</div>
|
|
816
|
+
</div>
|
|
817
|
+
`;
|
|
818
|
+
|
|
786
819
|
exports[`Storyshots a/People Base 1`] = `
|
|
787
820
|
<div
|
|
788
821
|
className="x-background1 b-x v1 p-v"
|
|
@@ -1161,8 +1194,10 @@ exports[`Storyshots a/Shapes Circle 1`] = `
|
|
|
1161
1194
|
className="base shapes"
|
|
1162
1195
|
style={
|
|
1163
1196
|
Object {
|
|
1164
|
-
"--
|
|
1197
|
+
"--horizontal-align": "center",
|
|
1198
|
+
"--overflow": "hidden",
|
|
1165
1199
|
"--shape-height": "30em",
|
|
1200
|
+
"--vertical-align": "flex-end",
|
|
1166
1201
|
}
|
|
1167
1202
|
}
|
|
1168
1203
|
>
|
|
@@ -1188,8 +1223,10 @@ exports[`Storyshots a/Shapes Diamonds 1`] = `
|
|
|
1188
1223
|
className="base shapes"
|
|
1189
1224
|
style={
|
|
1190
1225
|
Object {
|
|
1191
|
-
"--
|
|
1226
|
+
"--horizontal-align": "center",
|
|
1227
|
+
"--overflow": "hidden",
|
|
1192
1228
|
"--shape-height": "30em",
|
|
1229
|
+
"--vertical-align": "flex-end",
|
|
1193
1230
|
}
|
|
1194
1231
|
}
|
|
1195
1232
|
>
|
|
@@ -1225,8 +1262,10 @@ exports[`Storyshots a/Shapes Ellipse 1`] = `
|
|
|
1225
1262
|
className="base shapes"
|
|
1226
1263
|
style={
|
|
1227
1264
|
Object {
|
|
1228
|
-
"--
|
|
1265
|
+
"--horizontal-align": "center",
|
|
1266
|
+
"--overflow": "hidden",
|
|
1229
1267
|
"--shape-height": "30em",
|
|
1268
|
+
"--vertical-align": "flex-end",
|
|
1230
1269
|
}
|
|
1231
1270
|
}
|
|
1232
1271
|
>
|
|
@@ -1252,8 +1291,10 @@ exports[`Storyshots a/Shapes Ellipses 1`] = `
|
|
|
1252
1291
|
className="base shapes"
|
|
1253
1292
|
style={
|
|
1254
1293
|
Object {
|
|
1255
|
-
"--
|
|
1294
|
+
"--horizontal-align": "center",
|
|
1295
|
+
"--overflow": "hidden",
|
|
1256
1296
|
"--shape-height": "30em",
|
|
1297
|
+
"--vertical-align": "flex-end",
|
|
1257
1298
|
}
|
|
1258
1299
|
}
|
|
1259
1300
|
>
|
|
@@ -1286,8 +1327,10 @@ exports[`Storyshots a/Shapes Half Circle 1`] = `
|
|
|
1286
1327
|
className="base shapes"
|
|
1287
1328
|
style={
|
|
1288
1329
|
Object {
|
|
1289
|
-
"--
|
|
1330
|
+
"--horizontal-align": "center",
|
|
1331
|
+
"--overflow": "hidden",
|
|
1290
1332
|
"--shape-height": "30em",
|
|
1333
|
+
"--vertical-align": "flex-end",
|
|
1291
1334
|
}
|
|
1292
1335
|
}
|
|
1293
1336
|
>
|
|
@@ -1313,8 +1356,10 @@ exports[`Storyshots a/Shapes Half Ellipse 1`] = `
|
|
|
1313
1356
|
className="base shapes"
|
|
1314
1357
|
style={
|
|
1315
1358
|
Object {
|
|
1316
|
-
"--
|
|
1359
|
+
"--horizontal-align": "center",
|
|
1360
|
+
"--overflow": "hidden",
|
|
1317
1361
|
"--shape-height": "25em",
|
|
1362
|
+
"--vertical-align": "flex-end",
|
|
1318
1363
|
}
|
|
1319
1364
|
}
|
|
1320
1365
|
>
|
|
@@ -1340,8 +1385,10 @@ exports[`Storyshots a/Shapes Half Ellipses 1`] = `
|
|
|
1340
1385
|
className="base shapes"
|
|
1341
1386
|
style={
|
|
1342
1387
|
Object {
|
|
1343
|
-
"--
|
|
1388
|
+
"--horizontal-align": "center",
|
|
1389
|
+
"--overflow": "hidden",
|
|
1344
1390
|
"--shape-height": "25em",
|
|
1391
|
+
"--vertical-align": "flex-end",
|
|
1345
1392
|
}
|
|
1346
1393
|
}
|
|
1347
1394
|
>
|
|
@@ -1374,8 +1421,10 @@ exports[`Storyshots a/Shapes Rectangles 1`] = `
|
|
|
1374
1421
|
className="base shapes"
|
|
1375
1422
|
style={
|
|
1376
1423
|
Object {
|
|
1377
|
-
"--
|
|
1424
|
+
"--horizontal-align": "center",
|
|
1425
|
+
"--overflow": "hidden",
|
|
1378
1426
|
"--shape-height": "30em",
|
|
1427
|
+
"--vertical-align": "flex-end",
|
|
1379
1428
|
}
|
|
1380
1429
|
}
|
|
1381
1430
|
>
|
|
@@ -1396,6 +1445,42 @@ exports[`Storyshots a/Shapes Rectangles 1`] = `
|
|
|
1396
1445
|
</div>
|
|
1397
1446
|
`;
|
|
1398
1447
|
|
|
1448
|
+
exports[`Storyshots a/Shapes Rotated Ellipses 1`] = `
|
|
1449
|
+
<div
|
|
1450
|
+
className="y-background5 b-light-y"
|
|
1451
|
+
style={
|
|
1452
|
+
Object {
|
|
1453
|
+
"height": "1000px",
|
|
1454
|
+
"overflow": "hidden",
|
|
1455
|
+
"position": "relative",
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
>
|
|
1459
|
+
<div
|
|
1460
|
+
className="base shapes"
|
|
1461
|
+
style={
|
|
1462
|
+
Object {
|
|
1463
|
+
"--horizontal-align": "center",
|
|
1464
|
+
"--overflow": "hidden",
|
|
1465
|
+
"--shape-height": "60em",
|
|
1466
|
+
"--vertical-align": "center",
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
>
|
|
1470
|
+
<div
|
|
1471
|
+
className="rotated-ellipses"
|
|
1472
|
+
>
|
|
1473
|
+
<div
|
|
1474
|
+
className="ellipse-one"
|
|
1475
|
+
/>
|
|
1476
|
+
<div
|
|
1477
|
+
className="ellipse-two"
|
|
1478
|
+
/>
|
|
1479
|
+
</div>
|
|
1480
|
+
</div>
|
|
1481
|
+
</div>
|
|
1482
|
+
`;
|
|
1483
|
+
|
|
1399
1484
|
exports[`Storyshots a/Shapes Spiral 1`] = `
|
|
1400
1485
|
<div
|
|
1401
1486
|
className="y-background6 b-light-y"
|
|
@@ -1411,8 +1496,10 @@ exports[`Storyshots a/Shapes Spiral 1`] = `
|
|
|
1411
1496
|
className="base shapes"
|
|
1412
1497
|
style={
|
|
1413
1498
|
Object {
|
|
1414
|
-
"--
|
|
1415
|
-
"--
|
|
1499
|
+
"--horizontal-align": "center",
|
|
1500
|
+
"--overflow": "hidden",
|
|
1501
|
+
"--shape-height": "100em",
|
|
1502
|
+
"--vertical-align": "center",
|
|
1416
1503
|
}
|
|
1417
1504
|
}
|
|
1418
1505
|
>
|
|
@@ -1451,8 +1538,10 @@ exports[`Storyshots a/Shapes Triangle 1`] = `
|
|
|
1451
1538
|
className="base shapes"
|
|
1452
1539
|
style={
|
|
1453
1540
|
Object {
|
|
1454
|
-
"--
|
|
1541
|
+
"--horizontal-align": "center",
|
|
1542
|
+
"--overflow": "hidden",
|
|
1455
1543
|
"--shape-height": "30em",
|
|
1544
|
+
"--vertical-align": "flex-end",
|
|
1456
1545
|
}
|
|
1457
1546
|
}
|
|
1458
1547
|
>
|
|
@@ -6343,8 +6432,10 @@ exports[`Storyshots b/Page Sections With Background 1`] = `
|
|
|
6343
6432
|
className="base shapes"
|
|
6344
6433
|
style={
|
|
6345
6434
|
Object {
|
|
6346
|
-
"--
|
|
6435
|
+
"--horizontal-align": "center",
|
|
6436
|
+
"--overflow": "hidden",
|
|
6347
6437
|
"--shape-height": "30em",
|
|
6438
|
+
"--vertical-align": "flex-end",
|
|
6348
6439
|
}
|
|
6349
6440
|
}
|
|
6350
6441
|
>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
|
|
4
|
+
import { OvalIllustration } from 'ui'
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title :'a/OvalIllustration',
|
|
8
|
+
component :OvalIllustration,
|
|
9
|
+
subcomponents:{
|
|
10
|
+
// Item:OvalIllustration.Item
|
|
11
|
+
},
|
|
12
|
+
decorators:[
|
|
13
|
+
// storyfn => <div className="">{ storyfn() }</div>,
|
|
14
|
+
],
|
|
15
|
+
argTypes:{
|
|
16
|
+
backgroundColor:{ control: 'color' },
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const WithBackground = () => (
|
|
21
|
+
<OvalIllustration
|
|
22
|
+
backgroundColor="background3"
|
|
23
|
+
src="https://www.azernews.az/media/pictures/company_picture.jpg"
|
|
24
|
+
alt="illustration"
|
|
25
|
+
ovalBackground
|
|
26
|
+
layout="right"
|
|
27
|
+
/>
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
export const WithoutBackground = () => (
|
|
31
|
+
<OvalIllustration
|
|
32
|
+
src="https://www.azernews.az/media/pictures/company_picture.jpg"
|
|
33
|
+
alt="illustration"
|
|
34
|
+
layout="left"
|
|
35
|
+
/>
|
|
36
|
+
)
|
|
@@ -13,10 +13,11 @@ export default {
|
|
|
13
13
|
// storyfn => <div className="">{ storyfn() }</div>,
|
|
14
14
|
],
|
|
15
15
|
argTypes:{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
verticalAlign :{ control: 'select' },
|
|
17
|
+
horizontalAlign:{ control: 'select' },
|
|
18
|
+
shape :{ control: 'select' },
|
|
19
|
+
height :{ control: 'text' },
|
|
20
|
+
color :{ control: 'text' },
|
|
20
21
|
},
|
|
21
22
|
}
|
|
22
23
|
|
|
@@ -34,79 +35,91 @@ const Template = ({ color, ...rest }) => (
|
|
|
34
35
|
|
|
35
36
|
export const Triangle = Template.bind({})
|
|
36
37
|
Triangle.args = {
|
|
37
|
-
height:'30em',
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
height :'30em',
|
|
39
|
+
verticalAlign :'flex-end',
|
|
40
|
+
horizontalAlign:'center',
|
|
41
|
+
color :'background6',
|
|
42
|
+
shape :'triangle',
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
export const HalfEllipses = Template.bind({})
|
|
44
46
|
HalfEllipses.args = {
|
|
45
|
-
height:'25em',
|
|
46
|
-
|
|
47
|
-
color
|
|
48
|
-
shape
|
|
47
|
+
height :'25em',
|
|
48
|
+
verticalAlign:'flex-end',
|
|
49
|
+
color :'background3',
|
|
50
|
+
shape :'half-ellipses',
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
export const Ellipse = Template.bind({})
|
|
52
54
|
Ellipse.args = {
|
|
53
|
-
height:'30em',
|
|
54
|
-
|
|
55
|
-
color
|
|
56
|
-
shape
|
|
55
|
+
height :'30em',
|
|
56
|
+
verticalAlign:'flex-end',
|
|
57
|
+
color :'main3',
|
|
58
|
+
shape :'ellipse',
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
export const HalfEllipse = Template.bind({})
|
|
60
62
|
HalfEllipse.args = {
|
|
61
|
-
height:'25em',
|
|
62
|
-
|
|
63
|
-
color
|
|
64
|
-
shape
|
|
63
|
+
height :'25em',
|
|
64
|
+
verticalAlign:'flex-end',
|
|
65
|
+
color :'background3',
|
|
66
|
+
shape :'half-ellipse',
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
export const Diamonds = Template.bind({})
|
|
68
70
|
Diamonds.args = {
|
|
69
|
-
height:'30em',
|
|
70
|
-
|
|
71
|
-
color
|
|
72
|
-
shape
|
|
71
|
+
height :'30em',
|
|
72
|
+
verticalAlign:'flex-end',
|
|
73
|
+
color :'background4',
|
|
74
|
+
shape :'diamonds',
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
export const Rectangles = Template.bind({})
|
|
76
78
|
Rectangles.args = {
|
|
77
|
-
height:'30em',
|
|
78
|
-
|
|
79
|
-
color
|
|
80
|
-
shape
|
|
79
|
+
height :'30em',
|
|
80
|
+
verticalAlign:'flex-end',
|
|
81
|
+
color :'background5',
|
|
82
|
+
shape :'rectangles',
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
export const Circle = Template.bind({})
|
|
84
86
|
Circle.args = {
|
|
85
|
-
height:'30em',
|
|
86
|
-
|
|
87
|
-
color
|
|
88
|
-
shape
|
|
87
|
+
height :'30em',
|
|
88
|
+
verticalAlign:'flex-end',
|
|
89
|
+
color :'background5',
|
|
90
|
+
shape :'circle',
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
export const HalfCircle = Template.bind({})
|
|
92
94
|
HalfCircle.args = {
|
|
93
|
-
height:'30em',
|
|
94
|
-
|
|
95
|
-
color
|
|
96
|
-
shape
|
|
95
|
+
height :'30em',
|
|
96
|
+
verticalAlign:'flex-end',
|
|
97
|
+
color :'background4',
|
|
98
|
+
shape :'half-circle',
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
export const Ellipses = Template.bind({})
|
|
100
102
|
Ellipses.args = {
|
|
101
|
-
height:'30em',
|
|
102
|
-
|
|
103
|
-
color
|
|
104
|
-
shape
|
|
103
|
+
height :'30em',
|
|
104
|
+
verticalAlign:'flex-end',
|
|
105
|
+
color :'background4',
|
|
106
|
+
shape :'ellipses',
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
export const Spiral = Template.bind({})
|
|
108
110
|
Spiral.args = {
|
|
109
|
-
height:'
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
height :'100em',
|
|
112
|
+
verticalAlign :'center',
|
|
113
|
+
horizontalAlign:'center',
|
|
114
|
+
color :'background6',
|
|
115
|
+
shape :'spiral',
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export const RotatedEllipses = Template.bind({})
|
|
119
|
+
RotatedEllipses.args = {
|
|
120
|
+
height :'60em',
|
|
121
|
+
verticalAlign :'center',
|
|
122
|
+
horizontalAlign:'center',
|
|
123
|
+
color :'background5',
|
|
124
|
+
shape :'rotated-ellipses',
|
|
112
125
|
}
|
|
@@ -66,7 +66,8 @@ export const SectionsWithBackground = () => (
|
|
|
66
66
|
id="s1"
|
|
67
67
|
backgroundShape="triangle"
|
|
68
68
|
backgroundHeight="30em"
|
|
69
|
-
|
|
69
|
+
backgroundVerticalAlign="flex-end"
|
|
70
|
+
backgroundHorizontalAlign="center"
|
|
70
71
|
className="y-success b-light-y"
|
|
71
72
|
style={{
|
|
72
73
|
height :'30em',
|