@pareto-engineering/design-system 2.0.0-alpha.10 → 2.0.0-alpha.14

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 (44) hide show
  1. package/dist/cjs/a/BackgroundGradient/BackgroundGradient.js +77 -0
  2. package/dist/cjs/a/BackgroundGradient/index.js +15 -0
  3. package/dist/cjs/a/BackgroundGradient/styles.scss +16 -0
  4. package/dist/cjs/a/Conversation/Conversation.js +15 -8
  5. package/dist/cjs/a/Conversation/common/Message/Message.js +33 -6
  6. package/dist/cjs/a/Conversation/styles.scss +139 -32
  7. package/dist/cjs/a/Shapes/Shapes.js +9 -1
  8. package/dist/cjs/a/Shapes/styles.scss +35 -1
  9. package/dist/cjs/a/index.js +9 -1
  10. package/dist/cjs/b/Button/Button.js +10 -4
  11. package/dist/cjs/b/Button/styles.scss +28 -8
  12. package/dist/cjs/b/Page/common/Section/Section.js +17 -3
  13. package/dist/es/a/BackgroundGradient/BackgroundGradient.js +55 -0
  14. package/dist/es/a/BackgroundGradient/index.js +2 -0
  15. package/dist/es/a/BackgroundGradient/styles.scss +16 -0
  16. package/dist/es/a/Conversation/Conversation.js +15 -8
  17. package/dist/es/a/Conversation/common/Message/Message.js +33 -6
  18. package/dist/es/a/Conversation/styles.scss +139 -32
  19. package/dist/es/a/Shapes/Shapes.js +9 -1
  20. package/dist/es/a/Shapes/styles.scss +35 -1
  21. package/dist/es/a/index.js +2 -1
  22. package/dist/es/b/Button/Button.js +8 -2
  23. package/dist/es/b/Button/styles.scss +28 -8
  24. package/dist/es/b/Page/common/Section/Section.js +17 -3
  25. package/package.json +3 -3
  26. package/src/__snapshots__/Storyshots.test.js.snap +1632 -162
  27. package/src/local.scss +1 -0
  28. package/src/stories/a/BackgroundGradient.stories.jsx +38 -0
  29. package/src/stories/a/Conversation.stories.jsx +78 -1
  30. package/src/stories/a/Shapes.stories.jsx +18 -0
  31. package/src/stories/b/Button.stories.jsx +22 -0
  32. package/src/stories/b/Page.stories.jsx +25 -1
  33. package/src/ui/a/BackgroundGradient/BackgroundGradient.jsx +76 -0
  34. package/src/ui/a/BackgroundGradient/index.js +2 -0
  35. package/src/ui/a/BackgroundGradient/styles.scss +16 -0
  36. package/src/ui/a/Conversation/Conversation.jsx +15 -7
  37. package/src/ui/a/Conversation/common/Message/Message.jsx +40 -7
  38. package/src/ui/a/Conversation/styles.scss +139 -32
  39. package/src/ui/a/Shapes/Shapes.jsx +10 -0
  40. package/src/ui/a/Shapes/styles.scss +35 -1
  41. package/src/ui/a/index.js +1 -0
  42. package/src/ui/b/Button/Button.jsx +7 -0
  43. package/src/ui/b/Button/styles.scss +28 -8
  44. package/src/ui/b/Page/common/Section/Section.jsx +19 -2
@@ -15,7 +15,7 @@ var _a = require("../../../../a");
15
15
 
16
16
  var _usePage = _interopRequireDefault(require("../../usePage"));
17
17
 
18
- var _excluded = ["id", "className", "style", "children", "backgroundShape", "backgroundVerticalAlign", "backgroundHorizontalAlign", "backgroundHeight", "backgroundOverflow"];
18
+ var _excluded = ["id", "className", "style", "children", "backgroundShape", "backgroundGradient", "backgroundGradientHeight", "backgroundVerticalAlign", "backgroundHorizontalAlign", "backgroundHeight", "backgroundOverflow"];
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
@@ -39,6 +39,8 @@ var Section = _ref => {
39
39
  style,
40
40
  children,
41
41
  backgroundShape,
42
+ backgroundGradient,
43
+ backgroundGradientHeight,
42
44
  backgroundVerticalAlign,
43
45
  backgroundHorizontalAlign,
44
46
  backgroundHeight,
@@ -57,9 +59,11 @@ var Section = _ref => {
57
59
  }, otherProps), children, backgroundShape && /*#__PURE__*/React.createElement(_a.Shapes, {
58
60
  verticalAlign: backgroundVerticalAlign,
59
61
  horizontalAlign: backgroundHorizontalAlign,
60
- backgroundOverflow: backgroundOverflow,
62
+ overflow: backgroundOverflow,
61
63
  height: backgroundHeight,
62
64
  shape: backgroundShape
65
+ }), backgroundGradient && /*#__PURE__*/React.createElement(_a.BackgroundGradient, {
66
+ height: backgroundGradientHeight
63
67
  }));
64
68
  };
65
69
 
@@ -107,7 +111,17 @@ Section.propTypes = {
107
111
  /**
108
112
  * The background overflow to use for if the background shape is set.
109
113
  */
110
- backgroundOverflow: _propTypes.default.oneOf(['visible', 'hidden', 'scroll'])
114
+ backgroundOverflow: _propTypes.default.oneOf(['visible', 'hidden', 'scroll']),
115
+
116
+ /**
117
+ * The background gradient to use for if the background gradient is set.
118
+ */
119
+ backgroundGradient: _propTypes.default.bool,
120
+
121
+ /**
122
+ * The background gradient height to use for if the background gradient is set.
123
+ */
124
+ backgroundGradientHeight: _propTypes.default.string
111
125
  };
112
126
  Section.defaultProps = {// someProp:false
113
127
  };
@@ -0,0 +1,55 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react';
3
+ import { useLayoutEffect } from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import styleNames from '@pareto-engineering/bem'; // Local Definitions
6
+
7
+ const baseClassName = styleNames.base;
8
+ const componentClassName = 'background-gradient';
9
+ /**
10
+ * This is the component description.
11
+ */
12
+
13
+ const BackgroundGradient = ({
14
+ id,
15
+ className: userClassName,
16
+ style,
17
+ height // ...otherProps
18
+
19
+ }) => {
20
+ useLayoutEffect(() => {
21
+ import("./styles.scss");
22
+ }, []);
23
+ return /*#__PURE__*/React.createElement("div", {
24
+ id: id,
25
+ className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
26
+ style: { ...style,
27
+ '--gradient-height': height
28
+ }
29
+ });
30
+ };
31
+
32
+ BackgroundGradient.propTypes = {
33
+ /**
34
+ * The HTML id for this element
35
+ */
36
+ id: PropTypes.string,
37
+
38
+ /**
39
+ * The HTML class names for this element
40
+ */
41
+ className: PropTypes.string,
42
+
43
+ /**
44
+ * The React-written, css properties for this element.
45
+ */
46
+ style: PropTypes.objectOf(PropTypes.string),
47
+
48
+ /**
49
+ * The height of the shape.
50
+ */
51
+ height: PropTypes.string
52
+ };
53
+ BackgroundGradient.defaultProps = {// someProp: false,
54
+ };
55
+ export default BackgroundGradient;
@@ -0,0 +1,2 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ export { default as BackgroundGradient } from "./BackgroundGradient";
@@ -0,0 +1,16 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ @use "@pareto-engineering/bem";
3
+
4
+ .#{bem.$base}.background-gradient{
5
+ position: absolute;
6
+ top: 0;
7
+ left: 0;
8
+ width: 100%;
9
+ height: var(--gradient-height);
10
+ background-image: linear-gradient(transparent, var(--y) 25%, var(--light-y) 75%, transparent);
11
+ opacity: .4;
12
+ z-index: -1;
13
+ }
14
+
15
+
16
+
@@ -19,17 +19,18 @@ const Conversation = ({
19
19
  backgroundColor,
20
20
  ourColor,
21
21
  theirColor,
22
- children // ...otherProps
22
+ children,
23
+ hasTriangle // ...otherProps
23
24
 
24
25
  }) => {
25
26
  useLayoutEffect(() => {
26
27
  import("./styles.scss");
27
- }, []); // const messageColors = { ours: color, theirs: 'main2' }
28
-
28
+ }, []);
29
29
  return /*#__PURE__*/React.createElement(ConversationContext.Provider, {
30
30
  value: {
31
31
  ourColor,
32
- theirColor
32
+ theirColor,
33
+ hasTriangle
33
34
  }
34
35
  }, /*#__PURE__*/React.createElement("div", {
35
36
  id: id,
@@ -72,12 +73,18 @@ Conversation.propTypes = {
72
73
  /**
73
74
  * The children JSX
74
75
  */
75
- children: PropTypes.node
76
+ children: PropTypes.node,
77
+
78
+ /**
79
+ * whether to add triangle to bubble chats
80
+ */
81
+ hasTriangle: PropTypes.bool
76
82
  };
77
83
  Conversation.defaultProps = {
78
- backgroundColor: 'background',
79
- ourColor: 'main2',
80
- theirColor: 'background2'
84
+ backgroundColor: 'background2',
85
+ ourColor: 'background1',
86
+ theirColor: 'background1',
87
+ hasTriangle: 'false'
81
88
  };
82
89
  Conversation.Message = Message;
83
90
  export default Conversation;
@@ -16,22 +16,32 @@ const Message = ({
16
16
  style,
17
17
  message,
18
18
  sender,
19
- from // ...otherProps
19
+ from,
20
+ attachment,
21
+ attachmentIcon,
22
+ attachmentColor // ...otherProps
20
23
 
21
24
  }) => {
22
25
  const {
26
+ hasTriangle,
23
27
  ourColor,
24
28
  theirColor
25
29
  } = useConversation();
26
30
  return /*#__PURE__*/React.createElement("div", {
27
31
  id: id,
28
- className: [baseClassName, componentClassName, userClassName, `x-${from === 'ours' ? ourColor : theirColor}`, from === 'ours' && 'ours'].filter(e => e).join(' '),
32
+ className: [baseClassName, componentClassName, userClassName, `x-${from === 'ours' ? ourColor : theirColor}`, from === 'ours' && 'ours', hasTriangle === true ? 'has-triangle' : '', 'v1'].filter(e => e).join(' '),
29
33
  style: style
30
34
  }, /*#__PURE__*/React.createElement("div", {
31
35
  className: styleNames.elementContent
32
36
  }, /*#__PURE__*/React.createElement("p", {
33
37
  className: "sender v25 mb-v s-1"
34
- }, sender, ":"), /*#__PURE__*/React.createElement("p", null, message)));
38
+ }, sender, ":"), /*#__PURE__*/React.createElement("p", null, message), attachment && /*#__PURE__*/React.createElement("div", {
39
+ className: `attachment y-${attachmentColor}`
40
+ }, /*#__PURE__*/React.createElement("span", {
41
+ className: "f-icons"
42
+ }, attachmentIcon), /*#__PURE__*/React.createElement("p", {
43
+ className: "ml-v"
44
+ }, attachment))));
35
45
  };
36
46
 
37
47
  Message.propTypes = {
@@ -45,6 +55,11 @@ Message.propTypes = {
45
55
  */
46
56
  className: PropTypes.string,
47
57
 
58
+ /**
59
+ * The React-written, css properties for this element.
60
+ */
61
+ style: PropTypes.objectOf(PropTypes.string),
62
+
48
63
  /**
49
64
  * The message in the conversation
50
65
  */
@@ -61,11 +76,23 @@ Message.propTypes = {
61
76
  from: PropTypes.oneOf(['ours', 'theirs']),
62
77
 
63
78
  /**
64
- * The React-written, css properties for this element.
79
+ * name of the attachment file
80
+ */
81
+ attachment: PropTypes.string,
82
+
83
+ /**
84
+ * source of the attachment icon
85
+ */
86
+ attachmentIcon: PropTypes.string,
87
+
88
+ /**
89
+ * background color of the attachment box
65
90
  */
66
- style: PropTypes.objectOf(PropTypes.string)
91
+ attachmentColor: PropTypes.string
67
92
  };
68
93
  Message.defaultProps = {
69
- from: 'theirs'
94
+ from: 'theirs',
95
+ attachmentIcon: 'A',
96
+ attachmentColor: 'main4'
70
97
  };
71
98
  export default Message;
@@ -1,4 +1,5 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
+
2
3
  @use "@pareto-engineering/bem";
3
4
  @use "@aztlan/stylebook/src/mixins";
4
5
  @use "@aztlan/stylebook/src/globals" as *;
@@ -8,47 +9,153 @@ $default-conversation-background: var(--y);
8
9
  $default-message-max-width: calc(100% - #{$default-padding});
9
10
  $default-message-min-width: 12em;
10
11
  $default-message-border: var(--theme-border);
12
+ $triangle-border-size: 15px;
13
+ $triangle-border-style: $triangle-border-size solid;
14
+ $triangle-border-style-subtracted: ($triangle-border-size - 1px) solid;
15
+ $triangle-border1: $triangle-border-style var(--paragraph);
16
+ $triangle-border2: $triangle-border-style transparent;
17
+ $triangle-border3: $triangle-border-style-subtracted var(--x);
18
+ $triangle-border4: $triangle-border-style-subtracted transparent;
19
+ $triangle-before-side:24px;
20
+ $triangle-before-bottom:-30px;
21
+ $triangle-after-bottom:-27px;
22
+ $triangle-after-side:25px;
11
23
 
12
24
  .#{bem.$base}.conversation {
13
- display: flex;
14
- flex-direction: column;
15
- background-color: $default-conversation-background;
16
- padding: $default-padding;
25
+ background-color: $default-conversation-background;
26
+ border-radius: var(--theme-border-radius);
27
+ display: flex;
28
+ flex-direction: column;
29
+ padding: $default-padding;
30
+
31
+ >:not(:last-child) {
32
+ margin-bottom: $default-padding;
33
+ }
34
+
35
+ // >:nth-child(1) {
36
+ // animation-delay: 1s;
37
+ // }
38
+ // >:nth-child(2) {
39
+ // animation-delay: 3s;
40
+ // }
41
+
42
+ .#{bem.$base}.message {
43
+ align-self: flex-start;
44
+ background-color: var(--x);
45
+ // animation: fadeIn 1s ease-in both;
46
+ border: $default-message-border;
17
47
  border-radius: var(--theme-border-radius);
48
+ max-width: $default-message-max-width;
49
+ min-width: $default-message-min-width;
50
+ padding: $default-padding;
51
+ position: relative;
18
52
 
19
- >:not(:last-child) {
20
- margin-bottom: $default-padding;
21
- }
53
+ .#{bem.$element-content} {
54
+ display: flex;
55
+ flex-direction: column;
56
+
57
+ >p {
58
+ color: var(--on-x);
59
+ }
60
+
61
+ .sender {
62
+ font-weight: 800;
63
+ margin-bottom: .5em;
64
+ }
22
65
 
23
- .#{bem.$base}.message {
24
- min-width: $default-message-min-width;
25
- max-width: $default-message-max-width;
26
- padding: $default-padding;
27
- border-radius: var(--theme-border-radius);
28
- background-color: var(--x);
29
- align-self: flex-start;
30
- border: $default-message-border;
31
-
32
- .#{bem.$element-content} {
33
- display: flex;
34
- flex-direction: column;
35
-
36
- >p {
37
- color: var(--on-x);
38
- }
39
-
40
- .sender {
41
- font-weight: 800;
42
- margin-bottom: .5em;
43
- }
66
+ .attachment {
67
+ align-self: baseline;
68
+ background-color: var(--y);
69
+ display: flex;
70
+ flex-direction: row;
71
+ padding: .5em 1em;
72
+
73
+ > p {
74
+ margin-bottom: 0;
44
75
  }
45
- }
46
76
 
47
- .#{bem.$base}.ours {
48
- align-self: flex-end;
77
+ > img {
78
+ width: 40px;
79
+ }
80
+ }
81
+ }
82
+ &.#{bem.$base}.ours {
83
+ align-self: flex-end;
49
84
  }
50
85
 
51
- }
86
+ &.has-triangle {
87
+ ::before {
88
+ border-bottom: $triangle-border2;
89
+ border-left: $triangle-border2;
90
+ border-right: $triangle-border1;
91
+ border-top: $triangle-border1;
92
+ bottom: $triangle-before-bottom;
93
+ content: "";
94
+ height: 0;
95
+ position: absolute;
96
+ right: $triangle-before-side;
97
+ width: 0;
98
+ }
99
+
100
+ ::after {
101
+ border-bottom: $triangle-border4;
102
+ border-left: $triangle-border4;
103
+ border-right: $triangle-border3;
104
+ border-top: $triangle-border3;
105
+ bottom: $triangle-after-bottom;
106
+ content: "";
107
+ height: 0;
108
+ position: absolute;
109
+ right: $triangle-after-side;
110
+ width: 0;
111
+ }
112
+
113
+ &:not(.ours) {
114
+ ::before {
115
+ border-bottom: $triangle-border2;
116
+ border-left: $triangle-border1;
117
+ border-right: $triangle-border2;
118
+ border-top: $triangle-border1;
119
+ bottom: $triangle-before-bottom;
120
+ content: "";
121
+ height: 0;
122
+ left: $triangle-before-side;
123
+ position: absolute;
124
+ width: 0;
125
+ }
52
126
 
127
+ ::after {
128
+ border-bottom: $triangle-border4;
129
+ border-left: $triangle-border3;
130
+ border-right: $triangle-border4;
131
+ border-top: $triangle-border3;
132
+ bottom: $triangle-after-bottom;
133
+ content: "";
134
+ height: 0;
135
+ left: $triangle-after-side;
136
+ position: absolute;
137
+ width: 0;
138
+ }
139
+ }
140
+ }
53
141
 
142
+ // mobile style
143
+ @include mixins.media($to:$sm-md) {
144
+ .message {
145
+ margin-top: 2em;
146
+ }
147
+ }
148
+ }
149
+ }
54
150
 
151
+ //@keyframes fadeIn {
152
+ // from {
153
+ // opacity: 0;
154
+ // transform: translate3d(0, 50%, 0);
155
+ // }
156
+ //
157
+ // to {
158
+ // opacity: 1;
159
+ // transform: translate3d(0, 0, 0);
160
+ // }
161
+ //}
@@ -36,6 +36,8 @@ const Shapes = ({
36
36
 
37
37
  }, shape === 'triangle' && /*#__PURE__*/React.createElement("div", {
38
38
  className: "triangle"
39
+ }), shape === 'inverted-triangle' && /*#__PURE__*/React.createElement("div", {
40
+ className: "inverted-triangle"
39
41
  }), shape === 'half-ellipses' && /*#__PURE__*/React.createElement("div", {
40
42
  className: "half-ellipses"
41
43
  }, /*#__PURE__*/React.createElement("div", {
@@ -88,6 +90,12 @@ const Shapes = ({
88
90
  className: "ellipse-one"
89
91
  }), /*#__PURE__*/React.createElement("div", {
90
92
  className: "ellipse-two"
93
+ })), shape === 'intersecting-circles' && /*#__PURE__*/React.createElement("div", {
94
+ className: "intersecting-circles"
95
+ }, /*#__PURE__*/React.createElement("div", {
96
+ className: "left"
97
+ }), /*#__PURE__*/React.createElement("div", {
98
+ className: "right"
91
99
  })));
92
100
  };
93
101
 
@@ -125,7 +133,7 @@ Shapes.propTypes = {
125
133
  /**
126
134
  * The options of a shape to use
127
135
  */
128
- shape: PropTypes.oneOf(['triangle', 'ellipse', 'half-ellipse', 'half-ellipses', 'spiral', 'diamonds', 'circle', 'half-circle', 'ellipses', 'rectangles', 'rotated-ellipses']),
136
+ shape: PropTypes.oneOf(['triangle', 'ellipse', 'half-ellipse', 'half-ellipses', 'spiral', 'diamonds', 'circle', 'half-circle', 'ellipses', 'rectangles', 'rotated-ellipses', 'inverted-triangle', 'intersecting-circles']),
129
137
 
130
138
  /**
131
139
  * The overflow of the shape.
@@ -29,6 +29,14 @@ $default-shapes-opacity:.8;
29
29
  width: var(--shape-height, #{$default-triangle-height});
30
30
  }
31
31
 
32
+ .inverted-triangle {
33
+ background-image: linear-gradient(var(--dark-y), transparent);
34
+ clip-path: polygon(50% 0, 0 100%, 100% 100%);
35
+ height: calc(var(--shape-height, #{$default-triangle-height}) * 0.86);
36
+ opacity: $default-shapes-opacity;
37
+ width: var(--shape-height, #{$default-triangle-height});
38
+ }
39
+
32
40
  .half-ellipses {
33
41
  height: var(--shape-height, #{$default-ellipse-height});
34
42
  opacity: $default-shapes-opacity;
@@ -218,4 +226,30 @@ $default-shapes-opacity:.8;
218
226
  clip-path: ellipse(50% 35% at 50% 50%);
219
227
  }
220
228
  }
221
- }
229
+
230
+ .intersecting-circles {
231
+ height: var(--shape-height, #{$default-circle-height});
232
+ opacity: $default-shapes-opacity;
233
+ width: calc(var(--shape-height, #{$default-circle-height}) * 2);
234
+ display: grid;
235
+ grid-template-columns: repeat(7, 1fr);
236
+ position: relative;
237
+
238
+ > * {
239
+ border-radius: 50%;
240
+ height: 100%;
241
+ width: 100%;
242
+ position: absolute;
243
+ opacity: .8;
244
+ }
245
+
246
+ .left {
247
+ background-image: linear-gradient(to right ,var(--dark-y),var(--y), transparent);
248
+ grid-column: 1 / 5;
249
+ }
250
+ .right {
251
+ background-image: linear-gradient(to left, var(--dark-y), var(--y), transparent);
252
+ grid-column: 4 / 8;
253
+ }
254
+ }
255
+ }
@@ -19,4 +19,5 @@ export { ContentCard } from "./ContentCard";
19
19
  export { DotInfo } from "./DotInfo";
20
20
  export { Timestamp } from "./Timestamp";
21
21
  export { Shapes } from "./Shapes";
22
- export { OvalIllustration } from "./OvalIllustration";
22
+ export { OvalIllustration } from "./OvalIllustration";
23
+ export { BackgroundGradient } from "./BackgroundGradient";
@@ -23,6 +23,7 @@ const Button = ({
23
23
  isCompact,
24
24
  isGhost,
25
25
  isSimple,
26
+ arrowDirection,
26
27
  ...otherProps
27
28
  }) => {
28
29
  useLayoutEffect(() => {
@@ -30,7 +31,7 @@ const Button = ({
30
31
  }, []);
31
32
  return /*#__PURE__*/React.createElement("button", _extends({
32
33
  id: id,
33
- className: [baseClassName, componentClassName, userClassName, `x-${color}`, isGhost && styleNames.modifierGhost, isCompact && styleNames.modifierCompact, isSimple && styleNames.modifierSimple].filter(e => e).join(' '),
34
+ className: [baseClassName, componentClassName, userClassName, `x-${color}`, isGhost && styleNames.modifierGhost, isCompact && styleNames.modifierCompact, isSimple && styleNames.modifierSimple, arrowDirection && `arrow-${arrowDirection}`].filter(e => e).join(' '),
34
35
  style: style,
35
36
  type: "button"
36
37
  }, otherProps), isLoading ? /*#__PURE__*/React.createElement(LoadingCircle, {
@@ -85,7 +86,12 @@ Button.propTypes = {
85
86
  /**
86
87
  * Button loading state
87
88
  */
88
- isLoading: PropTypes.bool
89
+ isLoading: PropTypes.bool,
90
+
91
+ /**
92
+ * The direction of the arrow if the button has one
93
+ */
94
+ arrowDirection: PropTypes.string
89
95
  };
90
96
  Button.defaultProps = {
91
97
  color: 'main1'
@@ -6,22 +6,41 @@ $default-padding: 1em 1em .84em;
6
6
  $compact-padding: .6em .6em .48em;
7
7
  $default-color:primary;
8
8
  $font-weight:bold;
9
+ $default-margin:.5em;
9
10
 
10
11
  .#{bem.$base}.button {
11
12
  background: var(--x, var(--#{$default-color}));
12
13
  border: transparent;
13
14
  border-radius: var(--theme-border-radius);
14
15
  color: var(--on-x, var(--on-#{$default-color}));
16
+ display: inline-flex;
15
17
  font-weight: 600;
18
+ font-family: var(--theme-default-paragraph);
19
+ justify-content: space-between;
16
20
  padding: $default-padding;
17
21
  transition: all .25s;
18
22
 
23
+ &.arrow-right {
24
+ &::after {
25
+ content: "-->";
26
+ margin-left: $default-margin;
27
+ }
28
+ }
29
+
30
+ &.arrow-left {
31
+ &::before {
32
+ content: "<--";
33
+ margin-right: $default-margin;
34
+ }
35
+ }
36
+
19
37
  &:not(:disabled) {
20
38
  cursor: pointer;
21
39
 
22
40
  &:hover {
23
41
  background: var(--light-x, var(--light-#{$default-color}));
24
42
  }
43
+
25
44
  &:focus {
26
45
  background: var(--dark-x, var(--dark-#{$default-color}));
27
46
  }
@@ -39,7 +58,7 @@ $font-weight:bold;
39
58
 
40
59
  &:hover,
41
60
  &:focus,
42
- &:disabled{
61
+ &:disabled {
43
62
  background: transparent;
44
63
  }
45
64
 
@@ -55,7 +74,7 @@ $font-weight:bold;
55
74
  }
56
75
  }
57
76
 
58
- &:disabled{
77
+ &:disabled {
59
78
  border: 1px solid var(--x, var(--#{$default-color}));
60
79
  color: var(--x, var(--#{$default-color}));
61
80
  }
@@ -65,6 +84,7 @@ $font-weight:bold;
65
84
  background: transparent;
66
85
  border: 1px solid transparent;
67
86
  color: var(--x, var(--#{$default-color}));
87
+ padding: 0;
68
88
 
69
89
  &:disabled,
70
90
  &:hover,
@@ -73,13 +93,13 @@ $font-weight:bold;
73
93
  }
74
94
 
75
95
  &:not(:disabled) {
76
- &:hover {
77
- color: var(--light-x, var(--light-#{$default-color}));
78
- }
96
+ &:hover {
97
+ color: var(--light-x, var(--light-#{$default-color}));
98
+ }
79
99
 
80
- &:focus {
81
- color: var(--dark-x, var(--dark-#{$default-color}));
82
- }
100
+ &:focus {
101
+ color: var(--dark-x, var(--dark-#{$default-color}));
102
+ }
83
103
  }
84
104
 
85
105
  &:disabled {
@@ -5,7 +5,7 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import styleNames from '@pareto-engineering/bem'; // Local Definitions
7
7
 
8
- import { Shapes } from "../../../../a";
8
+ import { Shapes, BackgroundGradient } from "../../../../a";
9
9
  import usePage from "../../usePage";
10
10
  const baseClassName = styleNames.base;
11
11
  const componentClassName = 'section';
@@ -16,6 +16,8 @@ const Section = ({
16
16
  style,
17
17
  children,
18
18
  backgroundShape,
19
+ backgroundGradient,
20
+ backgroundGradientHeight,
19
21
  backgroundVerticalAlign,
20
22
  backgroundHorizontalAlign,
21
23
  backgroundHeight,
@@ -33,9 +35,11 @@ const Section = ({
33
35
  }, otherProps), children, backgroundShape && /*#__PURE__*/React.createElement(Shapes, {
34
36
  verticalAlign: backgroundVerticalAlign,
35
37
  horizontalAlign: backgroundHorizontalAlign,
36
- backgroundOverflow: backgroundOverflow,
38
+ overflow: backgroundOverflow,
37
39
  height: backgroundHeight,
38
40
  shape: backgroundShape
41
+ }), backgroundGradient && /*#__PURE__*/React.createElement(BackgroundGradient, {
42
+ height: backgroundGradientHeight
39
43
  }));
40
44
  };
41
45
 
@@ -83,7 +87,17 @@ Section.propTypes = {
83
87
  /**
84
88
  * The background overflow to use for if the background shape is set.
85
89
  */
86
- backgroundOverflow: PropTypes.oneOf(['visible', 'hidden', 'scroll'])
90
+ backgroundOverflow: PropTypes.oneOf(['visible', 'hidden', 'scroll']),
91
+
92
+ /**
93
+ * The background gradient to use for if the background gradient is set.
94
+ */
95
+ backgroundGradient: PropTypes.bool,
96
+
97
+ /**
98
+ * The background gradient height to use for if the background gradient is set.
99
+ */
100
+ backgroundGradientHeight: PropTypes.string
87
101
  };
88
102
  Section.defaultProps = {// someProp:false
89
103
  };