@pareto-engineering/design-system 2.0.0-alpha.4 → 2.0.0-alpha.5
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/Shapes/styles.scss +1 -1
- package/dist/cjs/a/index.js +9 -1
- package/dist/cjs/b/Page/common/Section/Section.js +28 -5
- package/dist/cjs/b/Page/styles.scss +8 -2
- package/dist/es/a/Shapes/styles.scss +1 -1
- package/dist/es/a/index.js +2 -1
- package/dist/es/b/Page/common/Section/Section.js +27 -4
- package/dist/es/b/Page/styles.scss +8 -2
- package/package.json +1 -1
- package/src/__snapshots__/Storyshots.test.js.snap +371 -0
- package/src/stories/a/Shapes.stories.jsx +112 -0
- package/src/stories/b/Page.stories.jsx +26 -1
- package/src/ui/a/Shapes/Shapes.jsx +154 -0
- package/src/ui/a/Shapes/index.js +2 -0
- package/src/ui/a/Shapes/styles.scss +199 -0
- package/src/ui/a/index.js +1 -0
- package/src/ui/b/Page/common/Section/Section.jsx +34 -2
- package/src/ui/b/Page/styles.scss +8 -2
|
@@ -21,7 +21,7 @@ $default-shapes-opacity:.8;
|
|
|
21
21
|
width: 100%;
|
|
22
22
|
|
|
23
23
|
.triangle {
|
|
24
|
-
background-image: linear-gradient(
|
|
24
|
+
background-image: linear-gradient(transparent, var(--dark-y));
|
|
25
25
|
clip-path: polygon(0 0, 50% 100%, 100% 0);
|
|
26
26
|
height: calc(var(--shape-height, #{$default-triangle-height}) * 0.86);
|
|
27
27
|
opacity: $default-shapes-opacity;
|
package/dist/cjs/a/index.js
CHANGED
|
@@ -141,6 +141,12 @@ 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
|
+
});
|
|
144
150
|
|
|
145
151
|
var _SVG = require("./SVG");
|
|
146
152
|
|
|
@@ -180,4 +186,6 @@ var _ContentCard = require("./ContentCard");
|
|
|
180
186
|
|
|
181
187
|
var _DotInfo = require("./DotInfo");
|
|
182
188
|
|
|
183
|
-
var _Timestamp = require("./Timestamp");
|
|
189
|
+
var _Timestamp = require("./Timestamp");
|
|
190
|
+
|
|
191
|
+
var _Shapes = require("./Shapes");
|
|
@@ -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", "backgroundPin", "backgroundHeight"];
|
|
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,10 @@ var Section = _ref => {
|
|
|
36
37
|
id: userId,
|
|
37
38
|
className: userClassName,
|
|
38
39
|
style,
|
|
39
|
-
children
|
|
40
|
+
children,
|
|
41
|
+
backgroundShape,
|
|
42
|
+
backgroundPin,
|
|
43
|
+
backgroundHeight
|
|
40
44
|
} = _ref,
|
|
41
45
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
42
46
|
|
|
@@ -48,7 +52,11 @@ var Section = _ref => {
|
|
|
48
52
|
id: sectionId,
|
|
49
53
|
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
50
54
|
style: style
|
|
51
|
-
}, otherProps), children
|
|
55
|
+
}, otherProps), children, backgroundShape && /*#__PURE__*/React.createElement(_a.Shapes, {
|
|
56
|
+
pin: backgroundPin,
|
|
57
|
+
height: backgroundHeight,
|
|
58
|
+
shape: backgroundShape
|
|
59
|
+
}));
|
|
52
60
|
};
|
|
53
61
|
|
|
54
62
|
Section.propTypes = {
|
|
@@ -70,7 +78,22 @@ Section.propTypes = {
|
|
|
70
78
|
/**
|
|
71
79
|
* The children JSX
|
|
72
80
|
*/
|
|
73
|
-
children: _propTypes.default.node
|
|
81
|
+
children: _propTypes.default.node,
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The background shape to use for this section.
|
|
85
|
+
*/
|
|
86
|
+
backgroundShape: _propTypes.default.oneOf(['triangle', 'ellipse', 'half-ellipse', 'half-ellipses', 'spiral', 'diamonds', 'circle', 'half-circle', 'ellipses', 'rectangles']),
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The background pin to use for if the background shape is set.
|
|
90
|
+
*/
|
|
91
|
+
backgroundPin: _propTypes.default.oneOf(['flex-start', 'center', 'flex-end']),
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The background height to use for if the background shape is set.
|
|
95
|
+
*/
|
|
96
|
+
backgroundHeight: _propTypes.default.string
|
|
74
97
|
};
|
|
75
98
|
Section.defaultProps = {// someProp:false
|
|
76
99
|
};
|
|
@@ -21,7 +21,7 @@ $default-shapes-opacity:.8;
|
|
|
21
21
|
width: 100%;
|
|
22
22
|
|
|
23
23
|
.triangle {
|
|
24
|
-
background-image: linear-gradient(
|
|
24
|
+
background-image: linear-gradient(transparent, var(--dark-y));
|
|
25
25
|
clip-path: polygon(0 0, 50% 100%, 100% 0);
|
|
26
26
|
height: calc(var(--shape-height, #{$default-triangle-height}) * 0.86);
|
|
27
27
|
opacity: $default-shapes-opacity;
|
package/dist/es/a/index.js
CHANGED
|
@@ -17,4 +17,5 @@ export { CustomerStat } from "./CustomerStat";
|
|
|
17
17
|
export { Quote } from "./Quote";
|
|
18
18
|
export { ContentCard } from "./ContentCard";
|
|
19
19
|
export { DotInfo } from "./DotInfo";
|
|
20
|
-
export { Timestamp } from "./Timestamp";
|
|
20
|
+
export { Timestamp } from "./Timestamp";
|
|
21
|
+
export { Shapes } from "./Shapes";
|
|
@@ -3,9 +3,10 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
/* @pareto-engineering/generator-front 1.0.0 */
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import styleNames from '@pareto-engineering/bem';
|
|
7
|
-
import usePage from "../../usePage"; // Local Definitions
|
|
6
|
+
import styleNames from '@pareto-engineering/bem'; // Local Definitions
|
|
8
7
|
|
|
8
|
+
import { Shapes } from "../../../../a";
|
|
9
|
+
import usePage from "../../usePage";
|
|
9
10
|
const baseClassName = styleNames.base;
|
|
10
11
|
const componentClassName = 'section';
|
|
11
12
|
|
|
@@ -14,6 +15,9 @@ const Section = ({
|
|
|
14
15
|
className: userClassName,
|
|
15
16
|
style,
|
|
16
17
|
children,
|
|
18
|
+
backgroundShape,
|
|
19
|
+
backgroundPin,
|
|
20
|
+
backgroundHeight,
|
|
17
21
|
...otherProps
|
|
18
22
|
}) => {
|
|
19
23
|
const {
|
|
@@ -24,7 +28,11 @@ const Section = ({
|
|
|
24
28
|
id: sectionId,
|
|
25
29
|
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
26
30
|
style: style
|
|
27
|
-
}, otherProps), children
|
|
31
|
+
}, otherProps), children, backgroundShape && /*#__PURE__*/React.createElement(Shapes, {
|
|
32
|
+
pin: backgroundPin,
|
|
33
|
+
height: backgroundHeight,
|
|
34
|
+
shape: backgroundShape
|
|
35
|
+
}));
|
|
28
36
|
};
|
|
29
37
|
|
|
30
38
|
Section.propTypes = {
|
|
@@ -46,7 +54,22 @@ Section.propTypes = {
|
|
|
46
54
|
/**
|
|
47
55
|
* The children JSX
|
|
48
56
|
*/
|
|
49
|
-
children: PropTypes.node
|
|
57
|
+
children: PropTypes.node,
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The background shape to use for this section.
|
|
61
|
+
*/
|
|
62
|
+
backgroundShape: PropTypes.oneOf(['triangle', 'ellipse', 'half-ellipse', 'half-ellipses', 'spiral', 'diamonds', 'circle', 'half-circle', 'ellipses', 'rectangles']),
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The background pin to use for if the background shape is set.
|
|
66
|
+
*/
|
|
67
|
+
backgroundPin: PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The background height to use for if the background shape is set.
|
|
71
|
+
*/
|
|
72
|
+
backgroundHeight: PropTypes.string
|
|
50
73
|
};
|
|
51
74
|
Section.defaultProps = {// someProp:false
|
|
52
75
|
};
|
package/package.json
CHANGED
|
@@ -1146,6 +1146,323 @@ exports[`Storyshots a/SVG Stroke 1`] = `
|
|
|
1146
1146
|
</svg>
|
|
1147
1147
|
`;
|
|
1148
1148
|
|
|
1149
|
+
exports[`Storyshots a/Shapes Circle 1`] = `
|
|
1150
|
+
<div
|
|
1151
|
+
className="y-background5 b-light-y"
|
|
1152
|
+
style={
|
|
1153
|
+
Object {
|
|
1154
|
+
"height": "1000px",
|
|
1155
|
+
"overflow": "hidden",
|
|
1156
|
+
"position": "relative",
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
>
|
|
1160
|
+
<div
|
|
1161
|
+
className="base shapes"
|
|
1162
|
+
style={
|
|
1163
|
+
Object {
|
|
1164
|
+
"--pin": "flex-end",
|
|
1165
|
+
"--shape-height": "30em",
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
>
|
|
1169
|
+
<div
|
|
1170
|
+
className="circle"
|
|
1171
|
+
/>
|
|
1172
|
+
</div>
|
|
1173
|
+
</div>
|
|
1174
|
+
`;
|
|
1175
|
+
|
|
1176
|
+
exports[`Storyshots a/Shapes Diamonds 1`] = `
|
|
1177
|
+
<div
|
|
1178
|
+
className="y-background4 b-light-y"
|
|
1179
|
+
style={
|
|
1180
|
+
Object {
|
|
1181
|
+
"height": "1000px",
|
|
1182
|
+
"overflow": "hidden",
|
|
1183
|
+
"position": "relative",
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
>
|
|
1187
|
+
<div
|
|
1188
|
+
className="base shapes"
|
|
1189
|
+
style={
|
|
1190
|
+
Object {
|
|
1191
|
+
"--pin": "flex-end",
|
|
1192
|
+
"--shape-height": "30em",
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
>
|
|
1196
|
+
<div
|
|
1197
|
+
className="diamonds"
|
|
1198
|
+
>
|
|
1199
|
+
<div
|
|
1200
|
+
className="top-right"
|
|
1201
|
+
/>
|
|
1202
|
+
<div
|
|
1203
|
+
className="bottom-left"
|
|
1204
|
+
/>
|
|
1205
|
+
<div
|
|
1206
|
+
className="bottom-right"
|
|
1207
|
+
/>
|
|
1208
|
+
</div>
|
|
1209
|
+
</div>
|
|
1210
|
+
</div>
|
|
1211
|
+
`;
|
|
1212
|
+
|
|
1213
|
+
exports[`Storyshots a/Shapes Ellipse 1`] = `
|
|
1214
|
+
<div
|
|
1215
|
+
className="y-main3 b-light-y"
|
|
1216
|
+
style={
|
|
1217
|
+
Object {
|
|
1218
|
+
"height": "1000px",
|
|
1219
|
+
"overflow": "hidden",
|
|
1220
|
+
"position": "relative",
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
>
|
|
1224
|
+
<div
|
|
1225
|
+
className="base shapes"
|
|
1226
|
+
style={
|
|
1227
|
+
Object {
|
|
1228
|
+
"--pin": "flex-end",
|
|
1229
|
+
"--shape-height": "30em",
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
>
|
|
1233
|
+
<div
|
|
1234
|
+
className="ellipse"
|
|
1235
|
+
/>
|
|
1236
|
+
</div>
|
|
1237
|
+
</div>
|
|
1238
|
+
`;
|
|
1239
|
+
|
|
1240
|
+
exports[`Storyshots a/Shapes Ellipses 1`] = `
|
|
1241
|
+
<div
|
|
1242
|
+
className="y-background4 b-light-y"
|
|
1243
|
+
style={
|
|
1244
|
+
Object {
|
|
1245
|
+
"height": "1000px",
|
|
1246
|
+
"overflow": "hidden",
|
|
1247
|
+
"position": "relative",
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
>
|
|
1251
|
+
<div
|
|
1252
|
+
className="base shapes"
|
|
1253
|
+
style={
|
|
1254
|
+
Object {
|
|
1255
|
+
"--pin": "flex-end",
|
|
1256
|
+
"--shape-height": "30em",
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
>
|
|
1260
|
+
<div
|
|
1261
|
+
className="ellipses"
|
|
1262
|
+
>
|
|
1263
|
+
<div
|
|
1264
|
+
className="first"
|
|
1265
|
+
/>
|
|
1266
|
+
<div
|
|
1267
|
+
className="second"
|
|
1268
|
+
/>
|
|
1269
|
+
</div>
|
|
1270
|
+
</div>
|
|
1271
|
+
</div>
|
|
1272
|
+
`;
|
|
1273
|
+
|
|
1274
|
+
exports[`Storyshots a/Shapes Half Circle 1`] = `
|
|
1275
|
+
<div
|
|
1276
|
+
className="y-background4 b-light-y"
|
|
1277
|
+
style={
|
|
1278
|
+
Object {
|
|
1279
|
+
"height": "1000px",
|
|
1280
|
+
"overflow": "hidden",
|
|
1281
|
+
"position": "relative",
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
>
|
|
1285
|
+
<div
|
|
1286
|
+
className="base shapes"
|
|
1287
|
+
style={
|
|
1288
|
+
Object {
|
|
1289
|
+
"--pin": "flex-end",
|
|
1290
|
+
"--shape-height": "30em",
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
>
|
|
1294
|
+
<div
|
|
1295
|
+
className="half-circle"
|
|
1296
|
+
/>
|
|
1297
|
+
</div>
|
|
1298
|
+
</div>
|
|
1299
|
+
`;
|
|
1300
|
+
|
|
1301
|
+
exports[`Storyshots a/Shapes Half Ellipse 1`] = `
|
|
1302
|
+
<div
|
|
1303
|
+
className="y-background3 b-light-y"
|
|
1304
|
+
style={
|
|
1305
|
+
Object {
|
|
1306
|
+
"height": "1000px",
|
|
1307
|
+
"overflow": "hidden",
|
|
1308
|
+
"position": "relative",
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
>
|
|
1312
|
+
<div
|
|
1313
|
+
className="base shapes"
|
|
1314
|
+
style={
|
|
1315
|
+
Object {
|
|
1316
|
+
"--pin": "flex-end",
|
|
1317
|
+
"--shape-height": "25em",
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
>
|
|
1321
|
+
<div
|
|
1322
|
+
className="half-ellipse"
|
|
1323
|
+
/>
|
|
1324
|
+
</div>
|
|
1325
|
+
</div>
|
|
1326
|
+
`;
|
|
1327
|
+
|
|
1328
|
+
exports[`Storyshots a/Shapes Half Ellipses 1`] = `
|
|
1329
|
+
<div
|
|
1330
|
+
className="y-background3 b-light-y"
|
|
1331
|
+
style={
|
|
1332
|
+
Object {
|
|
1333
|
+
"height": "1000px",
|
|
1334
|
+
"overflow": "hidden",
|
|
1335
|
+
"position": "relative",
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
>
|
|
1339
|
+
<div
|
|
1340
|
+
className="base shapes"
|
|
1341
|
+
style={
|
|
1342
|
+
Object {
|
|
1343
|
+
"--pin": "flex-end",
|
|
1344
|
+
"--shape-height": "25em",
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
>
|
|
1348
|
+
<div
|
|
1349
|
+
className="half-ellipses"
|
|
1350
|
+
>
|
|
1351
|
+
<div
|
|
1352
|
+
className="up"
|
|
1353
|
+
/>
|
|
1354
|
+
<div
|
|
1355
|
+
className="down"
|
|
1356
|
+
/>
|
|
1357
|
+
</div>
|
|
1358
|
+
</div>
|
|
1359
|
+
</div>
|
|
1360
|
+
`;
|
|
1361
|
+
|
|
1362
|
+
exports[`Storyshots a/Shapes Rectangles 1`] = `
|
|
1363
|
+
<div
|
|
1364
|
+
className="y-background5 b-light-y"
|
|
1365
|
+
style={
|
|
1366
|
+
Object {
|
|
1367
|
+
"height": "1000px",
|
|
1368
|
+
"overflow": "hidden",
|
|
1369
|
+
"position": "relative",
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
>
|
|
1373
|
+
<div
|
|
1374
|
+
className="base shapes"
|
|
1375
|
+
style={
|
|
1376
|
+
Object {
|
|
1377
|
+
"--pin": "flex-end",
|
|
1378
|
+
"--shape-height": "30em",
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
>
|
|
1382
|
+
<div
|
|
1383
|
+
className="rectangles"
|
|
1384
|
+
>
|
|
1385
|
+
<div
|
|
1386
|
+
className="top"
|
|
1387
|
+
/>
|
|
1388
|
+
<div
|
|
1389
|
+
className="center"
|
|
1390
|
+
/>
|
|
1391
|
+
<div
|
|
1392
|
+
className="bottom"
|
|
1393
|
+
/>
|
|
1394
|
+
</div>
|
|
1395
|
+
</div>
|
|
1396
|
+
</div>
|
|
1397
|
+
`;
|
|
1398
|
+
|
|
1399
|
+
exports[`Storyshots a/Shapes Spiral 1`] = `
|
|
1400
|
+
<div
|
|
1401
|
+
className="y-background6 b-light-y"
|
|
1402
|
+
style={
|
|
1403
|
+
Object {
|
|
1404
|
+
"height": "1000px",
|
|
1405
|
+
"overflow": "hidden",
|
|
1406
|
+
"position": "relative",
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
>
|
|
1410
|
+
<div
|
|
1411
|
+
className="base shapes"
|
|
1412
|
+
style={
|
|
1413
|
+
Object {
|
|
1414
|
+
"--pin": "center",
|
|
1415
|
+
"--shape-height": "70em",
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
>
|
|
1419
|
+
<div
|
|
1420
|
+
className="spiral"
|
|
1421
|
+
>
|
|
1422
|
+
<div
|
|
1423
|
+
className="circle-one"
|
|
1424
|
+
/>
|
|
1425
|
+
<div
|
|
1426
|
+
className="circle-two"
|
|
1427
|
+
/>
|
|
1428
|
+
<div
|
|
1429
|
+
className="circle-three"
|
|
1430
|
+
/>
|
|
1431
|
+
<div
|
|
1432
|
+
className="circle-four"
|
|
1433
|
+
/>
|
|
1434
|
+
</div>
|
|
1435
|
+
</div>
|
|
1436
|
+
</div>
|
|
1437
|
+
`;
|
|
1438
|
+
|
|
1439
|
+
exports[`Storyshots a/Shapes Triangle 1`] = `
|
|
1440
|
+
<div
|
|
1441
|
+
className="y-background6 b-light-y"
|
|
1442
|
+
style={
|
|
1443
|
+
Object {
|
|
1444
|
+
"height": "1000px",
|
|
1445
|
+
"overflow": "hidden",
|
|
1446
|
+
"position": "relative",
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
>
|
|
1450
|
+
<div
|
|
1451
|
+
className="base shapes"
|
|
1452
|
+
style={
|
|
1453
|
+
Object {
|
|
1454
|
+
"--pin": "center",
|
|
1455
|
+
"--shape-height": "30em",
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
>
|
|
1459
|
+
<div
|
|
1460
|
+
className="triangle"
|
|
1461
|
+
/>
|
|
1462
|
+
</div>
|
|
1463
|
+
</div>
|
|
1464
|
+
`;
|
|
1465
|
+
|
|
1149
1466
|
exports[`Storyshots a/SiteContext Base 1`] = `"Sample SiteContext"`;
|
|
1150
1467
|
|
|
1151
1468
|
exports[`Storyshots a/Spinner Base 1`] = `
|
|
@@ -5985,6 +6302,60 @@ exports[`Storyshots b/Page Item Type 1`] = `
|
|
|
5985
6302
|
</main>
|
|
5986
6303
|
`;
|
|
5987
6304
|
|
|
6305
|
+
exports[`Storyshots b/Page Sections With Background 1`] = `
|
|
6306
|
+
<main
|
|
6307
|
+
className="base page"
|
|
6308
|
+
id="with-sections"
|
|
6309
|
+
>
|
|
6310
|
+
<section
|
|
6311
|
+
className="base section y-success b-light-y"
|
|
6312
|
+
id="with-sections_s1"
|
|
6313
|
+
style={
|
|
6314
|
+
Object {
|
|
6315
|
+
"alignItems": "center",
|
|
6316
|
+
"display": "flex",
|
|
6317
|
+
"height": "30em",
|
|
6318
|
+
"justifyContent": "center",
|
|
6319
|
+
}
|
|
6320
|
+
}
|
|
6321
|
+
>
|
|
6322
|
+
<figure
|
|
6323
|
+
className="base quote x-paragraph"
|
|
6324
|
+
>
|
|
6325
|
+
<blockquote
|
|
6326
|
+
className="blockquote uc"
|
|
6327
|
+
>
|
|
6328
|
+
<p
|
|
6329
|
+
className="quotation c-x md-s0 s-1"
|
|
6330
|
+
>
|
|
6331
|
+
Pareto was like having a full-time employee without having to hire somebody. That’s how I would explain it. An on-call, on-demand full-time employee.
|
|
6332
|
+
</p>
|
|
6333
|
+
</blockquote>
|
|
6334
|
+
<figcaption
|
|
6335
|
+
className="figcaption"
|
|
6336
|
+
>
|
|
6337
|
+
<cite>
|
|
6338
|
+
Austen Spoonts
|
|
6339
|
+
</cite>
|
|
6340
|
+
</figcaption>
|
|
6341
|
+
</figure>
|
|
6342
|
+
<div
|
|
6343
|
+
className="base shapes"
|
|
6344
|
+
style={
|
|
6345
|
+
Object {
|
|
6346
|
+
"--pin": "center",
|
|
6347
|
+
"--shape-height": "30em",
|
|
6348
|
+
}
|
|
6349
|
+
}
|
|
6350
|
+
>
|
|
6351
|
+
<div
|
|
6352
|
+
className="triangle"
|
|
6353
|
+
/>
|
|
6354
|
+
</div>
|
|
6355
|
+
</section>
|
|
6356
|
+
</main>
|
|
6357
|
+
`;
|
|
6358
|
+
|
|
5988
6359
|
exports[`Storyshots b/Page With Sections 1`] = `
|
|
5989
6360
|
<main
|
|
5990
6361
|
className="base page"
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
|
|
4
|
+
import { Shapes } from 'ui'
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title :'a/Shapes',
|
|
8
|
+
component :Shapes,
|
|
9
|
+
subcomponents:{
|
|
10
|
+
// Item:Shapes.Item
|
|
11
|
+
},
|
|
12
|
+
decorators:[
|
|
13
|
+
// storyfn => <div className="">{ storyfn() }</div>,
|
|
14
|
+
],
|
|
15
|
+
argTypes:{
|
|
16
|
+
pin :{ control: 'select' },
|
|
17
|
+
shape :{ control: 'select' },
|
|
18
|
+
height:{ control: 'text' },
|
|
19
|
+
color :{ control: 'text' },
|
|
20
|
+
},
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// eslint-disable-next-line react/prop-types
|
|
24
|
+
const Template = ({ color, ...rest }) => (
|
|
25
|
+
<div
|
|
26
|
+
className={`y-${color} b-light-y`}
|
|
27
|
+
style={{
|
|
28
|
+
height:'1000px', position:'relative', overflow:'hidden',
|
|
29
|
+
}}
|
|
30
|
+
>
|
|
31
|
+
<Shapes {...rest} />
|
|
32
|
+
</div>
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
export const Triangle = Template.bind({})
|
|
36
|
+
Triangle.args = {
|
|
37
|
+
height:'30em',
|
|
38
|
+
pin :'center',
|
|
39
|
+
color :'background6',
|
|
40
|
+
shape :'triangle',
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const HalfEllipses = Template.bind({})
|
|
44
|
+
HalfEllipses.args = {
|
|
45
|
+
height:'25em',
|
|
46
|
+
pin :'flex-end',
|
|
47
|
+
color :'background3',
|
|
48
|
+
shape :'half-ellipses',
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export const Ellipse = Template.bind({})
|
|
52
|
+
Ellipse.args = {
|
|
53
|
+
height:'30em',
|
|
54
|
+
pin :'flex-end',
|
|
55
|
+
color :'main3',
|
|
56
|
+
shape :'ellipse',
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const HalfEllipse = Template.bind({})
|
|
60
|
+
HalfEllipse.args = {
|
|
61
|
+
height:'25em',
|
|
62
|
+
pin :'flex-end',
|
|
63
|
+
color :'background3',
|
|
64
|
+
shape :'half-ellipse',
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const Diamonds = Template.bind({})
|
|
68
|
+
Diamonds.args = {
|
|
69
|
+
height:'30em',
|
|
70
|
+
pin :'flex-end',
|
|
71
|
+
color :'background4',
|
|
72
|
+
shape :'diamonds',
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export const Rectangles = Template.bind({})
|
|
76
|
+
Rectangles.args = {
|
|
77
|
+
height:'30em',
|
|
78
|
+
pin :'flex-end',
|
|
79
|
+
color :'background5',
|
|
80
|
+
shape :'rectangles',
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export const Circle = Template.bind({})
|
|
84
|
+
Circle.args = {
|
|
85
|
+
height:'30em',
|
|
86
|
+
pin :'flex-end',
|
|
87
|
+
color :'background5',
|
|
88
|
+
shape :'circle',
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export const HalfCircle = Template.bind({})
|
|
92
|
+
HalfCircle.args = {
|
|
93
|
+
height:'30em',
|
|
94
|
+
pin :'flex-end',
|
|
95
|
+
color :'background4',
|
|
96
|
+
shape :'half-circle',
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export const Ellipses = Template.bind({})
|
|
100
|
+
Ellipses.args = {
|
|
101
|
+
height:'30em',
|
|
102
|
+
pin :'flex-end',
|
|
103
|
+
color :'background4',
|
|
104
|
+
shape :'ellipses',
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export const Spiral = Template.bind({})
|
|
108
|
+
Spiral.args = {
|
|
109
|
+
height:'70em',
|
|
110
|
+
color :'background6',
|
|
111
|
+
shape :'spiral',
|
|
112
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.0 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import { Page } from 'ui'
|
|
4
|
+
import { Page, Quote } from 'ui'
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title :'b/Page',
|
|
@@ -57,3 +57,28 @@ export const WithSections = () => (
|
|
|
57
57
|
</Page.Section>
|
|
58
58
|
</Page>
|
|
59
59
|
)
|
|
60
|
+
|
|
61
|
+
export const SectionsWithBackground = () => (
|
|
62
|
+
<Page
|
|
63
|
+
id="with-sections"
|
|
64
|
+
>
|
|
65
|
+
<Page.Section
|
|
66
|
+
id="s1"
|
|
67
|
+
backgroundShape="triangle"
|
|
68
|
+
backgroundHeight="30em"
|
|
69
|
+
backgroundPin="center"
|
|
70
|
+
className="y-success b-light-y"
|
|
71
|
+
style={{
|
|
72
|
+
height :'30em',
|
|
73
|
+
display :'flex',
|
|
74
|
+
justifyContent:'center',
|
|
75
|
+
alignItems :'center',
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
78
|
+
<Quote author="Austen Spoonts" color="paragraph">
|
|
79
|
+
Pareto was like having a full-time employee without having to hire somebody.
|
|
80
|
+
That’s how I would explain it. An on-call, on-demand full-time employee.
|
|
81
|
+
</Quote>
|
|
82
|
+
</Page.Section>
|
|
83
|
+
</Page>
|
|
84
|
+
)
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
|
|
4
|
+
import { useLayoutEffect } from 'react'
|
|
5
|
+
|
|
6
|
+
import PropTypes from 'prop-types'
|
|
7
|
+
|
|
8
|
+
import styleNames from '@pareto-engineering/bem'
|
|
9
|
+
|
|
10
|
+
// Local Definitions
|
|
11
|
+
|
|
12
|
+
const baseClassName = styleNames.base
|
|
13
|
+
|
|
14
|
+
const componentClassName = 'shapes'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* This is the component description.
|
|
18
|
+
*/
|
|
19
|
+
const Shapes = ({
|
|
20
|
+
id,
|
|
21
|
+
className:userClassName,
|
|
22
|
+
style,
|
|
23
|
+
pin,
|
|
24
|
+
shape,
|
|
25
|
+
height,
|
|
26
|
+
// ...otherProps
|
|
27
|
+
}) => {
|
|
28
|
+
useLayoutEffect(() => {
|
|
29
|
+
import('./styles.scss')
|
|
30
|
+
}, [])
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div
|
|
34
|
+
id={id}
|
|
35
|
+
className={[
|
|
36
|
+
|
|
37
|
+
baseClassName,
|
|
38
|
+
|
|
39
|
+
componentClassName,
|
|
40
|
+
userClassName,
|
|
41
|
+
]
|
|
42
|
+
.filter((e) => e)
|
|
43
|
+
.join(' ')}
|
|
44
|
+
style={{
|
|
45
|
+
...style,
|
|
46
|
+
'--pin' :pin,
|
|
47
|
+
'--shape-height':height,
|
|
48
|
+
}}
|
|
49
|
+
// {...otherProps}
|
|
50
|
+
>
|
|
51
|
+
{ shape === 'triangle'
|
|
52
|
+
&& <div className="triangle" />}
|
|
53
|
+
{ shape === 'half-ellipses'
|
|
54
|
+
&& (
|
|
55
|
+
<div className="half-ellipses">
|
|
56
|
+
<div className="up" />
|
|
57
|
+
<div className="down" />
|
|
58
|
+
</div>
|
|
59
|
+
)}
|
|
60
|
+
{ shape === 'ellipse' && <div className="ellipse" />}
|
|
61
|
+
{ shape === 'diamonds' && (
|
|
62
|
+
<div className="diamonds">
|
|
63
|
+
<div className="top-right" />
|
|
64
|
+
<div className="bottom-left" />
|
|
65
|
+
<div className="bottom-right" />
|
|
66
|
+
</div>
|
|
67
|
+
)}
|
|
68
|
+
{ shape === 'rectangles' && (
|
|
69
|
+
<div className="rectangles">
|
|
70
|
+
<div className="top" />
|
|
71
|
+
<div className="center" />
|
|
72
|
+
<div className="bottom" />
|
|
73
|
+
</div>
|
|
74
|
+
)}
|
|
75
|
+
{ shape === 'half-ellipse' && (
|
|
76
|
+
<div className="half-ellipse" />
|
|
77
|
+
)}
|
|
78
|
+
{ shape === 'circle' && (
|
|
79
|
+
<div className="circle" />
|
|
80
|
+
)}
|
|
81
|
+
{ shape === 'half-circle' && (
|
|
82
|
+
<div className="half-circle" />
|
|
83
|
+
)}
|
|
84
|
+
{ shape === 'ellipses' && (
|
|
85
|
+
<div className="ellipses">
|
|
86
|
+
<div className="first" />
|
|
87
|
+
<div className="second" />
|
|
88
|
+
</div>
|
|
89
|
+
)}
|
|
90
|
+
{shape === 'spiral' && (
|
|
91
|
+
<div className="spiral">
|
|
92
|
+
<div className="circle-one" />
|
|
93
|
+
<div className="circle-two" />
|
|
94
|
+
<div className="circle-three" />
|
|
95
|
+
<div className="circle-four" />
|
|
96
|
+
</div>
|
|
97
|
+
)}
|
|
98
|
+
</div>
|
|
99
|
+
)
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
Shapes.propTypes = {
|
|
103
|
+
/**
|
|
104
|
+
* The HTML id for this element
|
|
105
|
+
*/
|
|
106
|
+
id:PropTypes.string,
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The HTML class names for this element
|
|
110
|
+
*/
|
|
111
|
+
className:PropTypes.string,
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The React-written, css properties for this element.
|
|
115
|
+
*/
|
|
116
|
+
style:PropTypes.objectOf(PropTypes.string),
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The height of the shape.
|
|
120
|
+
*/
|
|
121
|
+
height:PropTypes.string,
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Where to pin the shapes
|
|
125
|
+
*/
|
|
126
|
+
pin:PropTypes.oneOf([
|
|
127
|
+
'flex-start',
|
|
128
|
+
'center',
|
|
129
|
+
'flex-end',
|
|
130
|
+
]),
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The options of a shape to use
|
|
134
|
+
*/
|
|
135
|
+
shape:PropTypes.oneOf([
|
|
136
|
+
'triangle',
|
|
137
|
+
'ellipse',
|
|
138
|
+
'half-ellipse',
|
|
139
|
+
'half-ellipses',
|
|
140
|
+
'spiral',
|
|
141
|
+
'diamonds',
|
|
142
|
+
'circle',
|
|
143
|
+
'half-circle',
|
|
144
|
+
'ellipses',
|
|
145
|
+
'rectangles',
|
|
146
|
+
]),
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
Shapes.defaultProps = {
|
|
150
|
+
pin :'center',
|
|
151
|
+
shape:'triangle',
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export default Shapes
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
|
|
5
|
+
$default-ellipse-height:50em;
|
|
6
|
+
$default-diamond-height:40em;
|
|
7
|
+
$default-circle-height:50em;
|
|
8
|
+
$default-triangle-height:40em;
|
|
9
|
+
$default-rectangle-height:50em;
|
|
10
|
+
$default-shapes-opacity:.8;
|
|
11
|
+
|
|
12
|
+
.#{bem.$base}.shapes {
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
justify-content: var(--pin);
|
|
19
|
+
align-items: center;
|
|
20
|
+
height: 100%;
|
|
21
|
+
width: 100%;
|
|
22
|
+
|
|
23
|
+
.triangle {
|
|
24
|
+
background-image: linear-gradient(transparent, var(--dark-y));
|
|
25
|
+
clip-path: polygon(0 0, 50% 100%, 100% 0);
|
|
26
|
+
height: calc(var(--shape-height, #{$default-triangle-height}) * 0.86);
|
|
27
|
+
opacity: $default-shapes-opacity;
|
|
28
|
+
width: var(--shape-height, #{$default-triangle-height});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.half-ellipses {
|
|
32
|
+
height: var(--shape-height, #{$default-ellipse-height});
|
|
33
|
+
opacity: $default-shapes-opacity;
|
|
34
|
+
width: calc(var(--shape-height, #{$default-ellipse-height}) * 2);
|
|
35
|
+
|
|
36
|
+
.up {
|
|
37
|
+
background-image: linear-gradient(var(--light-y), var(--y));
|
|
38
|
+
clip-path: ellipse(40% 100% at 50% 0%);
|
|
39
|
+
height: 50%;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.down {
|
|
43
|
+
background-image: linear-gradient(to top, var(--light-y), var(--y));
|
|
44
|
+
clip-path: ellipse(40% 100% at 50% 100%);
|
|
45
|
+
height: 50%;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ellipse {
|
|
50
|
+
background-image: linear-gradient(to top left, var(--dark-y), var(--light-y), var(--dark-y));
|
|
51
|
+
clip-path: ellipse(50% 25% at 50% 50%);
|
|
52
|
+
height: var(--shape-height, #{$default-ellipse-height});
|
|
53
|
+
opacity: $default-shapes-opacity;
|
|
54
|
+
transform: rotate3d(0, 0, -1, 10deg);
|
|
55
|
+
width: calc(var(--shape-height, #{$default-ellipse-height}) * 2);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.diamonds {
|
|
59
|
+
height: var(--shape-height, #{$default-diamond-height});
|
|
60
|
+
opacity: $default-shapes-opacity;
|
|
61
|
+
position: relative;
|
|
62
|
+
width: var(--shape-height, #{$default-diamond-height});
|
|
63
|
+
|
|
64
|
+
.top-right {
|
|
65
|
+
background-image: linear-gradient(to right, var(--dark-y), var(--y));
|
|
66
|
+
clip-path: polygon(100% 100%, 0 0, 100% 0);
|
|
67
|
+
height: 100%;
|
|
68
|
+
position: absolute;
|
|
69
|
+
width: 100%;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.bottom-left {
|
|
73
|
+
background-image: linear-gradient(to left, var(--dark-y), var(--y));
|
|
74
|
+
clip-path: polygon(0 100%, 0 0, 100% 100%);
|
|
75
|
+
height: 100%;
|
|
76
|
+
opacity: .95;
|
|
77
|
+
position: absolute;
|
|
78
|
+
width: 100%;
|
|
79
|
+
z-index: 1;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.bottom-right {
|
|
83
|
+
background-image: linear-gradient(to bottom, var(--dark-y), var(--y));
|
|
84
|
+
clip-path: polygon(100% 100%, 100% 0, 0 100%);
|
|
85
|
+
height: 100%;
|
|
86
|
+
position: absolute;
|
|
87
|
+
width: 100%;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.rectangles {
|
|
92
|
+
display: grid;
|
|
93
|
+
grid-template-rows: repeat(3, 1fr);
|
|
94
|
+
height: var(--shape-height, #{$default-rectangle-height});
|
|
95
|
+
opacity: $default-shapes-opacity;
|
|
96
|
+
width: var(--shape-height, #{$default-rectangle-height});
|
|
97
|
+
|
|
98
|
+
.top {
|
|
99
|
+
background-image: linear-gradient(to right, var(--dark-y), var(--y));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.center {
|
|
103
|
+
background-image: linear-gradient(to left, var(--dark-y), var(--y));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.bottom {
|
|
107
|
+
background-image: linear-gradient(to right, var(--dark-y), var(--y));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.half-ellipse {
|
|
112
|
+
background-image: linear-gradient(var(--light-y), var(--dark-y));
|
|
113
|
+
clip-path: ellipse(50% 50% at 50% 0);
|
|
114
|
+
height: var(--shape-height, #{$default-ellipse-height});
|
|
115
|
+
opacity: $default-shapes-opacity;
|
|
116
|
+
width: calc(var(--shape-height, #{$default-ellipse-height}) * 2);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.circle {
|
|
120
|
+
background-image: linear-gradient(var(--light-y), var(--dark-y));
|
|
121
|
+
clip-path: circle(50% at 50% 50%);
|
|
122
|
+
height: var(--shape-height, #{$default-circle-height});
|
|
123
|
+
opacity: $default-shapes-opacity;
|
|
124
|
+
width: var(--shape-height, #{$default-circle-height});
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.half-circle {
|
|
128
|
+
background: linear-gradient(var(--light-y) 30%, var(--dark-y) 100%);
|
|
129
|
+
clip-path: circle(50% at 50% 100%);
|
|
130
|
+
height: var(--shape-height, #{$default-circle-height});
|
|
131
|
+
opacity: $default-shapes-opacity;
|
|
132
|
+
width: calc(var(--shape-height, #{$default-circle-height}) * 2);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.ellipses {
|
|
136
|
+
height: var(--shape-height, #{$default-ellipse-height});
|
|
137
|
+
opacity: $default-shapes-opacity;
|
|
138
|
+
position: relative;
|
|
139
|
+
width: var(--shape-height, #{$default-ellipse-height});
|
|
140
|
+
|
|
141
|
+
.first {
|
|
142
|
+
background-image: linear-gradient(to top, var(--dark-y), var(--y), var(--light-y) 50%, transparent);
|
|
143
|
+
clip-path: ellipse(50% 20% at 50% 60%);
|
|
144
|
+
height: 100%;
|
|
145
|
+
position: absolute;
|
|
146
|
+
width: 100%;
|
|
147
|
+
z-index: 1;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.second {
|
|
151
|
+
background-image: linear-gradient(to bottom,var(--dark-y), var(--y), var(--light-y) 45%, transparent);
|
|
152
|
+
clip-path: ellipse(50% 20% at 50% 40%);
|
|
153
|
+
height: 100%;
|
|
154
|
+
position: absolute;
|
|
155
|
+
width: 100%;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.spiral {
|
|
160
|
+
height: var(--shape-height, #{$default-ellipse-height});
|
|
161
|
+
width: var(--shape-height, #{$default-ellipse-height});
|
|
162
|
+
opacity: $default-shapes-opacity;
|
|
163
|
+
position: relative;
|
|
164
|
+
display: flex;
|
|
165
|
+
justify-content: center;
|
|
166
|
+
align-items: center;
|
|
167
|
+
|
|
168
|
+
> * {
|
|
169
|
+
border-radius: 50%;
|
|
170
|
+
background: radial-gradient(ellipse at center bottom ,var(--dark-y) 10%, transparent 60%);
|
|
171
|
+
position: absolute;
|
|
172
|
+
opacity: .5;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.circle-one {
|
|
176
|
+
transform: rotate(45deg);
|
|
177
|
+
height: 55%;
|
|
178
|
+
width: 55%;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.circle-two {
|
|
182
|
+
height: 70%;
|
|
183
|
+
width: 70%;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.circle-three {
|
|
187
|
+
transform: rotate(-45deg);
|
|
188
|
+
height: 85%;
|
|
189
|
+
width: 85%;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.circle-four {
|
|
193
|
+
transform: rotate(-90deg);
|
|
194
|
+
height: 100%;
|
|
195
|
+
width: 100%;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
}
|
package/src/ui/a/index.js
CHANGED
|
@@ -3,9 +3,10 @@ import * as React from 'react'
|
|
|
3
3
|
import PropTypes from 'prop-types'
|
|
4
4
|
import styleNames from '@pareto-engineering/bem'
|
|
5
5
|
|
|
6
|
+
// Local Definitions
|
|
7
|
+
import { Shapes } from 'ui/a'
|
|
6
8
|
import usePage from '../../usePage'
|
|
7
9
|
|
|
8
|
-
// Local Definitions
|
|
9
10
|
const baseClassName = styleNames.base
|
|
10
11
|
const componentClassName = 'section'
|
|
11
12
|
|
|
@@ -14,6 +15,9 @@ const Section = ({
|
|
|
14
15
|
className:userClassName,
|
|
15
16
|
style,
|
|
16
17
|
children,
|
|
18
|
+
backgroundShape,
|
|
19
|
+
backgroundPin,
|
|
20
|
+
backgroundHeight,
|
|
17
21
|
...otherProps
|
|
18
22
|
}) => {
|
|
19
23
|
const {
|
|
@@ -21,7 +25,6 @@ const Section = ({
|
|
|
21
25
|
} = usePage()
|
|
22
26
|
|
|
23
27
|
const sectionId = userId && `${pageId}_${userId}`
|
|
24
|
-
|
|
25
28
|
return (
|
|
26
29
|
<section
|
|
27
30
|
id={sectionId}
|
|
@@ -36,6 +39,9 @@ const Section = ({
|
|
|
36
39
|
{...otherProps}
|
|
37
40
|
>
|
|
38
41
|
{children}
|
|
42
|
+
{backgroundShape && (
|
|
43
|
+
<Shapes pin={backgroundPin} height={backgroundHeight} shape={backgroundShape} />
|
|
44
|
+
)}
|
|
39
45
|
</section>
|
|
40
46
|
)
|
|
41
47
|
}
|
|
@@ -60,6 +66,32 @@ Section.propTypes = {
|
|
|
60
66
|
* The children JSX
|
|
61
67
|
*/
|
|
62
68
|
children:PropTypes.node,
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The background shape to use for this section.
|
|
72
|
+
*/
|
|
73
|
+
backgroundShape:PropTypes.oneOf([
|
|
74
|
+
'triangle',
|
|
75
|
+
'ellipse',
|
|
76
|
+
'half-ellipse',
|
|
77
|
+
'half-ellipses',
|
|
78
|
+
'spiral',
|
|
79
|
+
'diamonds',
|
|
80
|
+
'circle',
|
|
81
|
+
'half-circle',
|
|
82
|
+
'ellipses',
|
|
83
|
+
'rectangles',
|
|
84
|
+
]),
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The background pin to use for if the background shape is set.
|
|
88
|
+
*/
|
|
89
|
+
backgroundPin:PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The background height to use for if the background shape is set.
|
|
93
|
+
*/
|
|
94
|
+
backgroundHeight:PropTypes.string,
|
|
63
95
|
}
|
|
64
96
|
|
|
65
97
|
Section.defaultProps = {
|