@pareto-engineering/design-system 2.0.0-alpha.3 → 2.0.0-alpha.7

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.
Files changed (34) hide show
  1. package/dist/cjs/a/OvalIllustration/OvalIllustration.js +102 -0
  2. package/dist/cjs/a/OvalIllustration/index.js +15 -0
  3. package/dist/cjs/a/OvalIllustration/styles.scss +105 -0
  4. package/dist/cjs/a/Shapes/Shapes.js +31 -9
  5. package/dist/cjs/a/Shapes/styles.scss +40 -17
  6. package/dist/cjs/a/index.js +17 -1
  7. package/dist/cjs/b/Button/styles.scss +38 -19
  8. package/dist/cjs/b/Page/common/Section/Section.js +42 -5
  9. package/dist/cjs/b/Page/styles.scss +8 -2
  10. package/dist/es/a/OvalIllustration/OvalIllustration.js +86 -0
  11. package/dist/es/a/OvalIllustration/index.js +2 -0
  12. package/dist/es/a/OvalIllustration/styles.scss +105 -0
  13. package/dist/es/a/Shapes/Shapes.js +31 -9
  14. package/dist/es/a/Shapes/styles.scss +40 -17
  15. package/dist/es/a/index.js +3 -1
  16. package/dist/es/b/Button/styles.scss +38 -19
  17. package/dist/es/b/Page/common/Section/Section.js +41 -4
  18. package/dist/es/b/Page/styles.scss +8 -2
  19. package/package.json +1 -1
  20. package/src/__snapshots__/Storyshots.test.js.snap +1480 -336
  21. package/src/stories/a/OvalIllustration.stories.jsx +36 -0
  22. package/src/stories/a/Shapes.stories.jsx +125 -0
  23. package/src/stories/b/Button.stories.jsx +57 -82
  24. package/src/stories/b/Page.stories.jsx +27 -1
  25. package/src/ui/a/OvalIllustration/OvalIllustration.jsx +108 -0
  26. package/src/ui/a/OvalIllustration/index.js +2 -0
  27. package/src/ui/a/OvalIllustration/styles.scss +105 -0
  28. package/src/ui/a/Shapes/Shapes.jsx +181 -0
  29. package/src/ui/a/Shapes/index.js +2 -0
  30. package/src/ui/a/Shapes/styles.scss +222 -0
  31. package/src/ui/a/index.js +2 -0
  32. package/src/ui/b/Button/styles.scss +38 -19
  33. package/src/ui/b/Page/common/Section/Section.jsx +51 -2
  34. package/src/ui/b/Page/styles.scss +8 -2
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var React = _interopRequireWildcard(require("react"));
9
+
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
12
+ var _bem = _interopRequireDefault(require("@pareto-engineering/bem"));
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+
16
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
+
18
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
+
20
+ // Local Definitions
21
+ var baseClassName = _bem.default.base;
22
+ var componentClassName = 'oval-illustration';
23
+ /**
24
+ * This is the component description.
25
+ */
26
+
27
+ var OvalIllustration = _ref => {
28
+ var {
29
+ id,
30
+ className: userClassName,
31
+ style,
32
+ layout,
33
+ src,
34
+ alt,
35
+ ovalBackground,
36
+ backgroundColor // ...otherProps
37
+
38
+ } = _ref;
39
+ (0, React.useLayoutEffect)(() => {
40
+ Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
41
+ }, []);
42
+ return /*#__PURE__*/React.createElement("div", {
43
+ id: id,
44
+ className: [baseClassName, componentClassName, userClassName, layout].filter(e => e).join(' '),
45
+ style: style // {...otherProps}
46
+
47
+ }, ovalBackground && /*#__PURE__*/React.createElement("div", {
48
+ className: "oval-background y-".concat(backgroundColor)
49
+ }), /*#__PURE__*/React.createElement("div", {
50
+ className: "illustration"
51
+ }, /*#__PURE__*/React.createElement("img", {
52
+ src: src,
53
+ alt: alt
54
+ })));
55
+ };
56
+
57
+ OvalIllustration.propTypes = {
58
+ /**
59
+ * The HTML id for this element
60
+ */
61
+ id: _propTypes.default.string,
62
+
63
+ /**
64
+ * The HTML class names for this element
65
+ */
66
+ className: _propTypes.default.string,
67
+
68
+ /**
69
+ * The React-written, css properties for this element.
70
+ */
71
+ style: _propTypes.default.objectOf(_propTypes.default.string),
72
+
73
+ /**
74
+ * side definition of the illustration
75
+ */
76
+ layout: _propTypes.default.oneOf(['left', 'right']),
77
+
78
+ /**
79
+ * image url
80
+ */
81
+ src: _propTypes.default.string,
82
+
83
+ /**
84
+ * alt tag for the image
85
+ */
86
+ alt: _propTypes.default.string,
87
+
88
+ /**
89
+ * whether to have a oval shape as background
90
+ */
91
+ ovalBackground: _propTypes.default.bool,
92
+
93
+ /**
94
+ * background color of the oval behind the image
95
+ */
96
+ backgroundColor: _propTypes.default.string
97
+ };
98
+ OvalIllustration.defaultProps = {
99
+ layout: 'left'
100
+ };
101
+ var _default = OvalIllustration;
102
+ exports.default = _default;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "OvalIllustration", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _OvalIllustration.default;
10
+ }
11
+ });
12
+
13
+ var _OvalIllustration = _interopRequireDefault(require("./OvalIllustration"));
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -0,0 +1,105 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+
3
+ @use "@pareto-engineering/bem";
4
+ @use "@aztlan/stylebook/src/mixins";
5
+ @use "@aztlan/stylebook/src/globals" as *;
6
+
7
+ $default-desktop-shape-size:45em;
8
+ $default-tablet-shape-size:35em;
9
+ $default-mobile-shape-size:20em;
10
+ $default-clockwise-degree:60deg;
11
+ $default-counter-clockwise-degree:-60deg;
12
+ $default-ellipse-size:30% 43% at 50% 50%;
13
+
14
+ .#{bem.$base}.oval-illustration {
15
+ display: flex;
16
+ justify-content: center;
17
+ overflow: hidden;
18
+ position: relative;
19
+
20
+ &.left {
21
+ .oval-background {
22
+ transform: rotate($default-clockwise-degree);
23
+ }
24
+
25
+ .illustration {
26
+ transform: rotate($default-counter-clockwise-degree);
27
+
28
+ > img {
29
+ transform: rotate($default-clockwise-degree);
30
+ }
31
+ }
32
+ }
33
+
34
+ &.right {
35
+ .oval-background {
36
+ transform: rotate($default-counter-clockwise-degree);
37
+ }
38
+
39
+ .illustration {
40
+ transform: rotate($default-clockwise-degree);
41
+
42
+ > img {
43
+ transform: rotate($default-counter-clockwise-degree);
44
+ }
45
+ }
46
+ }
47
+
48
+ .oval-background {
49
+ background: var(--y);
50
+ clip-path: ellipse($default-ellipse-size);
51
+ overflow: hidden;
52
+ position: absolute;
53
+ z-index: -100;
54
+ }
55
+
56
+ .illustration {
57
+ clip-path: ellipse($default-ellipse-size);
58
+ overflow: hidden;
59
+
60
+ > img {
61
+ height: 100%;
62
+ object-fit: cover;
63
+ width: 100%;
64
+ }
65
+ }
66
+
67
+ // mobile style
68
+ @include mixins.media($to:$sm-md) {
69
+ .oval-background {
70
+ height: $default-mobile-shape-size;
71
+ width: $default-mobile-shape-size;
72
+ }
73
+
74
+ .illustration {
75
+ height: $default-mobile-shape-size;
76
+ width: $default-mobile-shape-size;
77
+ }
78
+ }
79
+
80
+ // tablet style
81
+ @include mixins.media($from:$xs-sm, $to:$sm-md) {
82
+ .oval-background {
83
+ height: $default-tablet-shape-size;
84
+ width: $default-tablet-shape-size;
85
+ }
86
+
87
+ .illustration {
88
+ height: $default-tablet-shape-size;
89
+ width: $default-tablet-shape-size;
90
+ }
91
+ }
92
+
93
+ // desktop style
94
+ @include mixins.media($from:$sm-md) {
95
+ .oval-background {
96
+ height: $default-desktop-shape-size;
97
+ width: $default-desktop-shape-size;
98
+ }
99
+
100
+ .illustration {
101
+ height: $default-desktop-shape-size;
102
+ width: $default-desktop-shape-size;
103
+ }
104
+ }
105
+ }
@@ -35,9 +35,11 @@ var Shapes = _ref => {
35
35
  id,
36
36
  className: userClassName,
37
37
  style,
38
- pin,
39
38
  shape,
40
- height // ...otherProps
39
+ height,
40
+ overflow,
41
+ verticalAlign,
42
+ horizontalAlign // ...otherProps
41
43
 
42
44
  } = _ref;
43
45
  (0, React.useLayoutEffect)(() => {
@@ -47,8 +49,10 @@ var Shapes = _ref => {
47
49
  id: id,
48
50
  className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
49
51
  style: _objectSpread(_objectSpread({}, style), {}, {
50
- '--pin': pin,
51
- '--shape-height': height
52
+ '--shape-height': height,
53
+ '--overflow': overflow,
54
+ '--vertical-align': verticalAlign,
55
+ '--horizontal-align': horizontalAlign
52
56
  }) // {...otherProps}
53
57
 
54
58
  }, shape === 'triangle' && /*#__PURE__*/React.createElement("div", {
@@ -99,6 +103,12 @@ var Shapes = _ref => {
99
103
  className: "circle-three"
100
104
  }), /*#__PURE__*/React.createElement("div", {
101
105
  className: "circle-four"
106
+ })), shape === 'rotated-ellipses' && /*#__PURE__*/React.createElement("div", {
107
+ className: "rotated-ellipses"
108
+ }, /*#__PURE__*/React.createElement("div", {
109
+ className: "ellipse-one"
110
+ }), /*#__PURE__*/React.createElement("div", {
111
+ className: "ellipse-two"
102
112
  })));
103
113
  };
104
114
 
@@ -124,18 +134,30 @@ Shapes.propTypes = {
124
134
  height: _propTypes.default.string,
125
135
 
126
136
  /**
127
- * Where to pin the shapes
137
+ * The vertical alignment of the shape.
138
+ */
139
+ verticalAlign: _propTypes.default.oneOf(['flex-start', 'center', 'flex-end']),
140
+
141
+ /**
142
+ * The horizontal alignment of the shape.
128
143
  */
129
- pin: _propTypes.default.oneOf(['flex-start', 'center', 'flex-end']),
144
+ horizontalAlign: _propTypes.default.oneOf(['flex-start', 'center', 'flex-end']),
130
145
 
131
146
  /**
132
147
  * The options of a shape to use
133
148
  */
134
- shape: _propTypes.default.oneOf(['triangle', 'ellipse', 'half-ellipse', 'half-ellipses', 'spiral', 'diamonds', 'circle', 'half-circle', 'ellipses', 'rectangles'])
149
+ shape: _propTypes.default.oneOf(['triangle', 'ellipse', 'half-ellipse', 'half-ellipses', 'spiral', 'diamonds', 'circle', 'half-circle', 'ellipses', 'rectangles', 'rotated-ellipses']),
150
+
151
+ /**
152
+ * The overflow of the shape.
153
+ */
154
+ overflow: _propTypes.default.oneOf(['hidden', 'visible'])
135
155
  };
136
156
  Shapes.defaultProps = {
137
- pin: 'center',
138
- shape: 'triangle'
157
+ verticalAlign: 'center',
158
+ horizontalAlign: 'center',
159
+ shape: 'triangle',
160
+ overflow: 'hidden'
139
161
  };
140
162
  var _default = Shapes;
141
163
  exports.default = _default;
@@ -15,13 +15,14 @@ $default-shapes-opacity:.8;
15
15
  left: 0;
16
16
  display: flex;
17
17
  flex-direction: column;
18
- justify-content: var(--pin);
19
- align-items: center;
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
 
23
24
  .triangle {
24
- background-image: linear-gradient(var(--light-y), var(--dark-y));
25
+ background-image: linear-gradient(transparent, var(--dark-y));
25
26
  clip-path: polygon(0 0, 50% 100%, 100% 0);
26
27
  height: calc(var(--shape-height, #{$default-triangle-height}) * 0.86);
27
28
  opacity: $default-shapes-opacity;
@@ -34,14 +35,14 @@ $default-shapes-opacity:.8;
34
35
  width: calc(var(--shape-height, #{$default-ellipse-height}) * 2);
35
36
 
36
37
  .up {
37
- background-image: linear-gradient(var(--light-y), var(--y));
38
- clip-path: ellipse(40% 100% at 50% 0%);
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: linear-gradient(to top, var(--light-y), var(--y));
44
- clip-path: ellipse(40% 100% at 50% 100%);
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
  }
@@ -109,8 +110,8 @@ $default-shapes-opacity:.8;
109
110
  }
110
111
 
111
112
  .half-ellipse {
112
- background-image: linear-gradient(var(--light-y), var(--dark-y));
113
- clip-path: ellipse(50% 50% at 50% 0);
113
+ background-image: radial-gradient(ellipse at center bottom, var(--y) 10%, transparent 65%);
114
+ clip-path: ellipse(60% 100% at 50% 0%);
114
115
  height: var(--shape-height, #{$default-ellipse-height});
115
116
  opacity: $default-shapes-opacity;
116
117
  width: calc(var(--shape-height, #{$default-ellipse-height}) * 2);
@@ -174,26 +175,48 @@ $default-shapes-opacity:.8;
174
175
 
175
176
  .circle-one {
176
177
  transform: rotate(45deg);
177
- height: 55%;
178
- width: 55%;
178
+ height:calc(var(--shape-height, #{$default-ellipse-height})* 0.4);
179
+ width: calc(var(--shape-height, #{$default-ellipse-height})* 0.4);
179
180
  }
180
181
 
181
182
  .circle-two {
182
- height: 70%;
183
- width: 70%;
183
+ height: calc(var(--shape-height, #{$default-ellipse-height})* 0.6);
184
+ width: calc(var(--shape-height, #{$default-ellipse-height})* 0.6);
184
185
  }
185
186
 
186
187
  .circle-three {
187
188
  transform: rotate(-45deg);
188
- height: 85%;
189
- width: 85%;
189
+ height: calc(var(--shape-height, #{$default-ellipse-height})* 0.8);
190
+ width: calc(var(--shape-height, #{$default-ellipse-height})* 0.8);
190
191
  }
191
192
 
192
193
  .circle-four {
193
194
  transform: rotate(-90deg);
194
- height: 100%;
195
- width: 100%;
195
+ height: calc(var(--shape-height, #{$default-ellipse-height})* 1);
196
+ width: calc(var(--shape-height, #{$default-ellipse-height})* 1);
196
197
  }
197
198
  }
199
+ .rotated-ellipses {
200
+ height: var(--shape-height, #{$default-ellipse-height});
201
+ opacity: $default-shapes-opacity;
202
+ width: var(--shape-height, #{$default-ellipse-height});
203
+ display: flex;
198
204
 
205
+ > *{
206
+ width: 100%;
207
+ height: 100%;
208
+ }
209
+
210
+ .ellipse-one {
211
+ background-image: radial-gradient(ellipse at bottom left, var(--y) 30%, transparent 65%);
212
+ transform: rotate(-15deg);
213
+ clip-path: ellipse(50% 35% at 50% 50%);
214
+ }
215
+
216
+ .ellipse-two {
217
+ background-image: radial-gradient(ellipse at top right, var(--y) 30%, transparent 65%);
218
+ transform: rotate(-15deg);
219
+ clip-path: ellipse(50% 35% at 50% 50%);
220
+ }
221
+ }
199
222
  }
@@ -141,6 +141,18 @@ 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
+ });
150
+ Object.defineProperty(exports, "OvalIllustration", {
151
+ enumerable: true,
152
+ get: function get() {
153
+ return _OvalIllustration.OvalIllustration;
154
+ }
155
+ });
144
156
 
145
157
  var _SVG = require("./SVG");
146
158
 
@@ -180,4 +192,8 @@ var _ContentCard = require("./ContentCard");
180
192
 
181
193
  var _DotInfo = require("./DotInfo");
182
194
 
183
- var _Timestamp = require("./Timestamp");
195
+ var _Timestamp = require("./Timestamp");
196
+
197
+ var _Shapes = require("./Shapes");
198
+
199
+ var _OvalIllustration = require("./OvalIllustration");
@@ -4,15 +4,13 @@
4
4
 
5
5
  $default-padding: 1em 1em .84em;
6
6
  $compact-padding: .6em .6em .48em;
7
- $default-border-radius:2em;
8
7
  $default-color:primary;
9
8
  $font-weight:bold;
10
9
 
11
10
  .#{bem.$base}.button {
12
11
  background: var(--x, var(--#{$default-color}));
13
12
  border: transparent;
14
- //border-radius: var(--theme-border-radius);
15
- border-radius: $default-border-radius;
13
+ border-radius: var(--theme-border-radius);
16
14
  color: var(--on-x, var(--on-#{$default-color}));
17
15
  font-weight: 600;
18
16
  padding: $default-padding;
@@ -24,6 +22,9 @@ $font-weight:bold;
24
22
  &:hover {
25
23
  background: var(--light-x, var(--light-#{$default-color}));
26
24
  }
25
+ &:focus {
26
+ background: var(--dark-x, var(--dark-#{$default-color}));
27
+ }
27
28
  }
28
29
 
29
30
 
@@ -36,21 +37,28 @@ $font-weight:bold;
36
37
  border: 1px solid var(--x, var(--#{$default-color}));
37
38
  color: var(--x, var(--#{$default-color}));
38
39
 
39
- &:not(:disabled) {
40
- &:hover,
41
- &:focus {
42
- border: 1px solid transparent;
43
- color: var(--on-x, var(--on-#{$default-color}));
44
- }
40
+ &:hover,
41
+ &:focus,
42
+ &:disabled{
43
+ background: transparent;
44
+ }
45
45
 
46
+ &:not(:disabled) {
46
47
  &:hover {
47
- background: var(--x, var(--#{$default-color}));
48
+ border: 1px solid var(--light-x, var(--light-#{$default-color}));
49
+ color: var(--light-x, var(--light-#{$default-color}));
48
50
  }
49
51
 
50
52
  &:focus {
51
- background: var(--dark-x, var(--#{$default-color}));
53
+ border: 1px solid var(--dark-x, var(--dark-#{$default-color}));
54
+ color: var(--dark-x, var(--dark-#{$default-color}));
52
55
  }
53
56
  }
57
+
58
+ &:disabled{
59
+ border: 1px solid var(--x, var(--#{$default-color}));
60
+ color: var(--x, var(--#{$default-color}));
61
+ }
54
62
  }
55
63
 
56
64
  &.#{bem.$modifier-simple} {
@@ -58,19 +66,30 @@ $font-weight:bold;
58
66
  border: 1px solid transparent;
59
67
  color: var(--x, var(--#{$default-color}));
60
68
 
69
+ &:disabled,
70
+ &:hover,
71
+ &:focus {
72
+ background: transparent;
73
+ }
74
+
61
75
  &:not(:disabled) {
62
- &:hover,
63
- &:focus {
64
- background:transparent;
65
- border: 1px solid transparent;
66
- color: var(--dark-x, var(--on-#{$default-color}));
67
- }
76
+ &:hover {
77
+ color: var(--light-x, var(--light-#{$default-color}));
78
+ }
79
+
80
+ &:focus {
81
+ color: var(--dark-x, var(--dark-#{$default-color}));
82
+ }
83
+ }
84
+
85
+ &:disabled {
86
+ color: var(--x, var(--#{$default-color}));
68
87
  }
69
88
  }
70
89
 
71
90
  &:disabled {
72
- background: var(--light-x);
73
- filter: brightness(120%);
91
+ background: var(--x);
92
+ filter: brightness(125%);
74
93
  }
75
94
  }
76
95
 
@@ -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", "backgroundVerticalAlign", "backgroundHorizontalAlign", "backgroundHeight", "backgroundOverflow"];
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,12 @@ var Section = _ref => {
36
37
  id: userId,
37
38
  className: userClassName,
38
39
  style,
39
- children
40
+ children,
41
+ backgroundShape,
42
+ backgroundVerticalAlign,
43
+ backgroundHorizontalAlign,
44
+ backgroundHeight,
45
+ backgroundOverflow
40
46
  } = _ref,
41
47
  otherProps = _objectWithoutProperties(_ref, _excluded);
42
48
 
@@ -48,7 +54,13 @@ var Section = _ref => {
48
54
  id: sectionId,
49
55
  className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
50
56
  style: style
51
- }, otherProps), children);
57
+ }, otherProps), children, backgroundShape && /*#__PURE__*/React.createElement(_a.Shapes, {
58
+ verticalAlign: backgroundVerticalAlign,
59
+ horizontalAlign: backgroundHorizontalAlign,
60
+ backgroundOverflow: backgroundOverflow,
61
+ height: backgroundHeight,
62
+ shape: backgroundShape
63
+ }));
52
64
  };
53
65
 
54
66
  Section.propTypes = {
@@ -70,7 +82,32 @@ Section.propTypes = {
70
82
  /**
71
83
  * The children JSX
72
84
  */
73
- children: _propTypes.default.node
85
+ children: _propTypes.default.node,
86
+
87
+ /**
88
+ * The background shape to use for this section.
89
+ */
90
+ backgroundShape: _propTypes.default.oneOf(['triangle', 'ellipse', 'half-ellipse', 'half-ellipses', 'spiral', 'diamonds', 'circle', 'half-circle', 'ellipses', 'rectangles']),
91
+
92
+ /**
93
+ * The background vertical alingment to use for if the background shape is set.
94
+ */
95
+ backgroundVerticalAlign: _propTypes.default.oneOf(['flex-start', 'center', 'flex-end']),
96
+
97
+ /**
98
+ * The background horizontal alingment to use for if the background shape is set.
99
+ */
100
+ backgroundHorizontalAlign: _propTypes.default.oneOf(['flex-start', 'center', 'flex-end']),
101
+
102
+ /**
103
+ * The background height to use for if the background shape is set.
104
+ */
105
+ backgroundHeight: _propTypes.default.string,
106
+
107
+ /**
108
+ * The background overflow to use for if the background shape is set.
109
+ */
110
+ backgroundOverflow: _propTypes.default.oneOf(['visible', 'hidden', 'scroll'])
74
111
  };
75
112
  Section.defaultProps = {// someProp:false
76
113
  };
@@ -2,9 +2,15 @@
2
2
 
3
3
  @use "@pareto-engineering/bem";
4
4
 
5
- /*
5
+
6
6
  .#{bem.$base}.page{
7
+ .#{bem.$base}.section {
8
+ position: relative;
7
9
 
8
- } */
10
+ > *:not(:last-child) {
11
+ z-index: 1;
12
+ }
13
+ }
14
+ }
9
15
 
10
16