@pareto-engineering/design-system 2.0.0-alpha.11 → 2.0.0-alpha.15
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/BackgroundGradient/BackgroundGradient.js +77 -0
- package/dist/cjs/a/BackgroundGradient/index.js +15 -0
- package/dist/cjs/a/BackgroundGradient/styles.scss +16 -0
- package/dist/cjs/a/Conversation/Conversation.js +15 -8
- package/dist/cjs/a/Conversation/common/Message/Message.js +33 -6
- package/dist/cjs/a/Conversation/styles.scss +139 -32
- package/dist/cjs/a/Shapes/Shapes.js +9 -1
- package/dist/cjs/a/Shapes/styles.scss +35 -1
- package/dist/cjs/a/index.js +9 -1
- package/dist/cjs/b/Button/styles.scss +43 -18
- package/dist/cjs/b/Page/common/Section/Section.js +17 -3
- package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- package/dist/cjs/f/common/Debugger/Debugger.js +1 -1
- package/dist/cjs/f/common/Label/Label.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +1 -1
- package/dist/cjs/f/fields/SelectInput/styles.scss +1 -1
- package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
- package/dist/cjs/f/fields/TextInput/styles.scss +4 -4
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +1 -1
- package/dist/es/a/BackgroundGradient/BackgroundGradient.js +55 -0
- package/dist/es/a/BackgroundGradient/index.js +2 -0
- package/dist/es/a/BackgroundGradient/styles.scss +16 -0
- package/dist/es/a/Conversation/Conversation.js +15 -8
- package/dist/es/a/Conversation/common/Message/Message.js +33 -6
- package/dist/es/a/Conversation/styles.scss +139 -32
- package/dist/es/a/Shapes/Shapes.js +9 -1
- package/dist/es/a/Shapes/styles.scss +35 -1
- package/dist/es/a/index.js +2 -1
- package/dist/es/b/Button/styles.scss +43 -18
- package/dist/es/b/Page/common/Section/Section.js +17 -3
- package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- package/dist/es/f/common/Debugger/Debugger.js +1 -1
- package/dist/es/f/common/Label/Label.js +1 -1
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +1 -1
- package/dist/es/f/fields/SelectInput/styles.scss +1 -1
- package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
- package/dist/es/f/fields/TextInput/styles.scss +4 -4
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +1 -1
- package/package.json +2 -2
- package/src/__snapshots__/Storyshots.test.js.snap +423 -93
- package/src/local.scss +1 -0
- package/src/stories/a/BackgroundGradient.stories.jsx +38 -0
- package/src/stories/a/Conversation.stories.jsx +78 -1
- package/src/stories/a/Shapes.stories.jsx +18 -0
- package/src/stories/b/Button.stories.jsx +5 -4
- package/src/stories/b/Page.stories.jsx +25 -1
- package/src/ui/a/BackgroundGradient/BackgroundGradient.jsx +76 -0
- package/src/ui/a/BackgroundGradient/index.js +2 -0
- package/src/ui/a/BackgroundGradient/styles.scss +16 -0
- package/src/ui/a/Conversation/Conversation.jsx +15 -7
- package/src/ui/a/Conversation/common/Message/Message.jsx +40 -7
- package/src/ui/a/Conversation/styles.scss +139 -32
- package/src/ui/a/Shapes/Shapes.jsx +10 -0
- package/src/ui/a/Shapes/styles.scss +35 -1
- package/src/ui/a/index.js +1 -0
- package/src/ui/b/Button/Button.jsx +2 -1
- package/src/ui/b/Button/styles.scss +43 -18
- package/src/ui/b/Page/common/Section/Section.jsx +19 -2
- package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +3 -2
- package/src/ui/f/common/Debugger/Debugger.jsx +1 -1
- package/src/ui/f/common/Label/Label.jsx +1 -1
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +1 -1
- package/src/ui/f/fields/SelectInput/styles.scss +1 -1
- package/src/ui/f/fields/TaskRecommendationInput/TaskRecommendationInput.jsx +1 -1
- package/src/ui/f/fields/TextInput/styles.scss +4 -4
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +1 -1
|
@@ -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
|
-
|
|
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
|
};
|
|
@@ -74,7 +74,8 @@ var Navigator = _ref => {
|
|
|
74
74
|
} else {
|
|
75
75
|
setNextStepIndex(stepsForward);
|
|
76
76
|
}
|
|
77
|
-
}
|
|
77
|
+
},
|
|
78
|
+
isCompact: true
|
|
78
79
|
}, "Next") : /*#__PURE__*/React.createElement("span", null));
|
|
79
80
|
};
|
|
80
81
|
|
|
@@ -136,8 +137,8 @@ Navigator.propTypes = {
|
|
|
136
137
|
};
|
|
137
138
|
Navigator.defaultProps = {
|
|
138
139
|
canMoveForward: true,
|
|
139
|
-
previousColor: '
|
|
140
|
-
nextColor: '
|
|
140
|
+
previousColor: 'main2',
|
|
141
|
+
nextColor: 'main2',
|
|
141
142
|
stepsForward: 1,
|
|
142
143
|
stepsBackwards: 1
|
|
143
144
|
};
|
|
@@ -47,7 +47,7 @@ var Debugger = _ref => {
|
|
|
47
47
|
style: style
|
|
48
48
|
}, /*#__PURE__*/React.createElement(_b.Button, {
|
|
49
49
|
onClick: toggleDebugger,
|
|
50
|
-
color: "
|
|
50
|
+
color: "main2"
|
|
51
51
|
}, isOpen ? 'Close FormDebugger' : 'Open FormDebugger'), isOpen && /*#__PURE__*/React.createElement("pre", {
|
|
52
52
|
className: "debuger-content"
|
|
53
53
|
}, JSON.stringify(formikContext, null, 2)));
|
|
@@ -123,7 +123,7 @@ TaskRecommendationInput.propTypes = {
|
|
|
123
123
|
image: _propTypes.default.string.isRequired
|
|
124
124
|
};
|
|
125
125
|
TaskRecommendationInput.defaultProps = {
|
|
126
|
-
color: '
|
|
126
|
+
color: 'main2'
|
|
127
127
|
};
|
|
128
128
|
|
|
129
129
|
var _default = /*#__PURE__*/(0, React.memo)(TaskRecommendationInput);
|
|
@@ -10,16 +10,16 @@ $default-padding: 0.75em 0.75em 0.55em;
|
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
|
|
12
12
|
.input-label {
|
|
13
|
-
color: var(--
|
|
13
|
+
color: var(--main2);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.input {
|
|
17
|
-
background: var(--light-
|
|
18
|
-
color: var(--on-
|
|
17
|
+
background: var(--light-background2);
|
|
18
|
+
color: var(--on-background2);
|
|
19
19
|
padding: $default-padding;
|
|
20
20
|
|
|
21
21
|
&:focus {
|
|
22
|
-
background: var(--dark-
|
|
22
|
+
background: var(--dark-background2);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -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,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
|
|
22
|
+
children,
|
|
23
|
+
hasTriangle // ...otherProps
|
|
23
24
|
|
|
24
25
|
}) => {
|
|
25
26
|
useLayoutEffect(() => {
|
|
26
27
|
import("./styles.scss");
|
|
27
|
-
}, []);
|
|
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: '
|
|
79
|
-
ourColor: '
|
|
80
|
-
theirColor: '
|
|
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
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
20
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
48
|
-
|
|
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
|
+
}
|
package/dist/es/a/index.js
CHANGED
|
@@ -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";
|