@pareto-engineering/design-system 2.0.0-alpha.13 → 2.0.0-alpha.17
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/styles.scss +2 -2
- 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/b/Button/styles.scss +43 -18
- 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/SelectInput.js +25 -6
- package/dist/cjs/f/fields/SelectInput/styles.scss +4 -4
- package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
- package/dist/cjs/f/fields/TextInput/TextInput.js +18 -4
- 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/styles.scss +2 -2
- 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/b/Button/styles.scss +43 -18
- 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/SelectInput.js +25 -6
- package/dist/es/f/fields/SelectInput/styles.scss +4 -4
- package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
- package/dist/es/f/fields/TextInput/TextInput.js +18 -4
- 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 +401 -91
- package/src/local.scss +1 -0
- package/src/stories/a/BackgroundGradient.stories.jsx +2 -3
- package/src/stories/a/Conversation.stories.jsx +78 -1
- package/src/stories/b/Button.stories.jsx +5 -4
- package/src/stories/f/SelectInput.stories.jsx +29 -0
- package/src/stories/f/TextInput.stories.jsx +10 -0
- package/src/ui/a/BackgroundGradient/styles.scss +2 -2
- 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/b/Button/Button.jsx +2 -1
- package/src/ui/b/Button/styles.scss +43 -18
- 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/SelectInput.jsx +35 -5
- package/src/ui/f/fields/SelectInput/styles.scss +4 -4
- package/src/ui/f/fields/TaskRecommendationInput/TaskRecommendationInput.jsx +1 -1
- package/src/ui/f/fields/TextInput/TextInput.jsx +14 -0
- package/src/ui/f/fields/TextInput/styles.scss +4 -4
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +1 -1
package/src/local.scss
CHANGED
|
@@ -13,9 +13,8 @@ export default {
|
|
|
13
13
|
// storyfn => <div className="">{ storyfn() }</div>,
|
|
14
14
|
],
|
|
15
15
|
argTypes:{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
color :{ control: 'text' },
|
|
16
|
+
height:{ control: 'text' },
|
|
17
|
+
color :{ control: 'text' },
|
|
19
18
|
},
|
|
20
19
|
}
|
|
21
20
|
|
|
@@ -25,7 +25,7 @@ export const Base = () => {
|
|
|
25
25
|
from :'theirs',
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
message:'Hi
|
|
28
|
+
message:'Hi Morgan! Here is the database we prepared for you.',
|
|
29
29
|
sender :'CAMILLE',
|
|
30
30
|
from :'ours',
|
|
31
31
|
},
|
|
@@ -34,6 +34,83 @@ export const Base = () => {
|
|
|
34
34
|
sender :'HUMBL',
|
|
35
35
|
from :'theirs',
|
|
36
36
|
},
|
|
37
|
+
{
|
|
38
|
+
message:'Hi Morgan! Here is the database we prepared for you.',
|
|
39
|
+
sender :'CAMILLE',
|
|
40
|
+
from :'ours',
|
|
41
|
+
},
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<Conversation>
|
|
46
|
+
{conversations.map((conversation) => (
|
|
47
|
+
<Conversation.Message key={conversation.message} {...conversation} />
|
|
48
|
+
))}
|
|
49
|
+
</Conversation>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const WithTriangle = () => {
|
|
54
|
+
const conversations = [
|
|
55
|
+
{
|
|
56
|
+
message:'Hi Camille, please compile an assesment of top 5 firms/brand providers for the listed fields in the US.',
|
|
57
|
+
sender :'HUMBL',
|
|
58
|
+
from :'theirs',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
message:'Hi Morgan! Here is the database we prepared for you.',
|
|
62
|
+
sender :'CAMILLE',
|
|
63
|
+
from :'ours',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
message:'Hi Camille, please compile an assesment of top 5 firms/brand providers for the listed fields in the US.',
|
|
67
|
+
sender :'HUMBL',
|
|
68
|
+
from :'theirs',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
message:'Hi Morgan! Here is the database we prepared for you.',
|
|
72
|
+
sender :'CAMILLE',
|
|
73
|
+
from :'ours',
|
|
74
|
+
},
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<Conversation
|
|
79
|
+
hasTriangle
|
|
80
|
+
>
|
|
81
|
+
{conversations.map((conversation) => (
|
|
82
|
+
<Conversation.Message key={conversation.message} {...conversation} />
|
|
83
|
+
))}
|
|
84
|
+
</Conversation>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export const WithAttachment = () => {
|
|
89
|
+
const conversations = [
|
|
90
|
+
{
|
|
91
|
+
message:'Hi Camille, please compile an assesment of top 5 firms/brand providers for the listed fields in the US.',
|
|
92
|
+
sender :'HUMBL',
|
|
93
|
+
from :'theirs',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
message :'Hi Morgan! Here is the database we prepared for you.',
|
|
97
|
+
sender :'CAMILLE',
|
|
98
|
+
from :'ours',
|
|
99
|
+
attachment :'spreadsheet.xlsx',
|
|
100
|
+
attachmentColor:'main4',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
message:'Hi Camille, please compile an assesment of top 5 firms/brand providers for the listed fields in the US.',
|
|
104
|
+
sender :'HUMBL',
|
|
105
|
+
from :'theirs',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
message :'Hi Morgan! Here is the database we prepared for you.',
|
|
109
|
+
sender :'CAMILLE',
|
|
110
|
+
from :'ours',
|
|
111
|
+
attachment :'spreadsheet.xlsx',
|
|
112
|
+
attachmentColor:'main4',
|
|
113
|
+
},
|
|
37
114
|
]
|
|
38
115
|
|
|
39
116
|
return (
|
|
@@ -14,10 +14,11 @@ export default {
|
|
|
14
14
|
// storyfn => <div className="">{ storyfn() }</div>,
|
|
15
15
|
],
|
|
16
16
|
argTypes:{
|
|
17
|
-
color
|
|
18
|
-
disabled:{ control: { type: 'boolean' } },
|
|
19
|
-
isGhost
|
|
20
|
-
isSimple:{ control: { type: 'boolean' } },
|
|
17
|
+
color :{ control: { type: 'select', options: ALL_COLORS } },
|
|
18
|
+
disabled :{ control: { type: 'boolean' } },
|
|
19
|
+
isGhost :{ control: { type: 'boolean' } },
|
|
20
|
+
isSimple :{ control: { type: 'boolean' } },
|
|
21
|
+
isAnimated:{ control: { type: 'boolean' } },
|
|
21
22
|
},
|
|
22
23
|
}
|
|
23
24
|
|
|
@@ -38,6 +38,35 @@ export const Base = () => (
|
|
|
38
38
|
</>
|
|
39
39
|
)
|
|
40
40
|
|
|
41
|
+
export const RequiredSelect = () => {
|
|
42
|
+
const requiredInput = (inputValue) => {
|
|
43
|
+
let error = ''
|
|
44
|
+
|
|
45
|
+
if (!inputValue || !inputValue?.length === 0) {
|
|
46
|
+
error = 'This information is required'
|
|
47
|
+
}
|
|
48
|
+
return error
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<>
|
|
53
|
+
<SelectInput
|
|
54
|
+
validate={requiredInput}
|
|
55
|
+
name="activity"
|
|
56
|
+
label="Activity Type"
|
|
57
|
+
options={[
|
|
58
|
+
{
|
|
59
|
+
value:'', label:'Select activity type', disabled:true,
|
|
60
|
+
},
|
|
61
|
+
{ value: 'review', label: 'Review' },
|
|
62
|
+
{ value: 'Approve', label: 'Approve' },
|
|
63
|
+
]}
|
|
64
|
+
/>
|
|
65
|
+
<FormDebugger />
|
|
66
|
+
</>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
41
70
|
export const Objects = () => (
|
|
42
71
|
<>
|
|
43
72
|
<SelectInput
|
|
@@ -52,6 +52,16 @@ export const Base = () => {
|
|
|
52
52
|
)
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
export const TextInputWithPlaceHolder = () => (
|
|
56
|
+
<div className="y-background1 b-dark-y u2 pb-u">
|
|
57
|
+
<TextInput
|
|
58
|
+
name="firstName"
|
|
59
|
+
label="What's your first name ?"
|
|
60
|
+
placeholder="First Name"
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
)
|
|
64
|
+
|
|
55
65
|
export const DisabledTextInput = () => (
|
|
56
66
|
<div className="y-background1 b-dark-y u2 pb-u">
|
|
57
67
|
<TextInput
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
position: absolute;
|
|
6
6
|
top: 0;
|
|
7
7
|
left: 0;
|
|
8
|
-
justify-content: var(--vertical-align);
|
|
9
8
|
width: 100%;
|
|
10
9
|
height: var(--gradient-height);
|
|
11
10
|
background-image: linear-gradient(transparent, var(--y) 25%, var(--light-y) 75%, transparent);
|
|
12
|
-
opacity: .
|
|
11
|
+
opacity: .4;
|
|
12
|
+
z-index: -1;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
|
|
@@ -28,19 +28,19 @@ const Conversation = ({
|
|
|
28
28
|
ourColor,
|
|
29
29
|
theirColor,
|
|
30
30
|
children,
|
|
31
|
+
hasTriangle,
|
|
31
32
|
// ...otherProps
|
|
32
33
|
}) => {
|
|
33
34
|
useLayoutEffect(() => {
|
|
34
35
|
import('./styles.scss')
|
|
35
36
|
}, [])
|
|
36
37
|
|
|
37
|
-
// const messageColors = { ours: color, theirs: 'main2' }
|
|
38
|
-
|
|
39
38
|
return (
|
|
40
39
|
<ConversationContext.Provider
|
|
41
40
|
value={{
|
|
42
41
|
ourColor,
|
|
43
42
|
theirColor,
|
|
43
|
+
hasTriangle,
|
|
44
44
|
}}
|
|
45
45
|
>
|
|
46
46
|
<div
|
|
@@ -76,11 +76,13 @@ Conversation.propTypes = {
|
|
|
76
76
|
/**
|
|
77
77
|
* The React-written, css properties for this element.
|
|
78
78
|
*/
|
|
79
|
-
style
|
|
79
|
+
style:PropTypes.objectOf(PropTypes.string),
|
|
80
|
+
|
|
80
81
|
/**
|
|
81
82
|
* The base color to our messages component
|
|
82
83
|
*/
|
|
83
|
-
ourColor
|
|
84
|
+
ourColor:PropTypes.string,
|
|
85
|
+
|
|
84
86
|
/**
|
|
85
87
|
* The base color to their messages component
|
|
86
88
|
*/
|
|
@@ -94,12 +96,18 @@ Conversation.propTypes = {
|
|
|
94
96
|
* The children JSX
|
|
95
97
|
*/
|
|
96
98
|
children :PropTypes.node,
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* whether to add triangle to bubble chats
|
|
102
|
+
*/
|
|
103
|
+
hasTriangle:PropTypes.bool,
|
|
97
104
|
}
|
|
98
105
|
|
|
99
106
|
Conversation.defaultProps = {
|
|
100
|
-
backgroundColor:'
|
|
101
|
-
ourColor :'
|
|
102
|
-
theirColor :'
|
|
107
|
+
backgroundColor:'background2',
|
|
108
|
+
ourColor :'background1',
|
|
109
|
+
theirColor :'background1',
|
|
110
|
+
hasTriangle :'false',
|
|
103
111
|
}
|
|
104
112
|
|
|
105
113
|
Conversation.Message = Message
|
|
@@ -23,9 +23,12 @@ const Message = ({
|
|
|
23
23
|
message,
|
|
24
24
|
sender,
|
|
25
25
|
from,
|
|
26
|
+
attachment,
|
|
27
|
+
attachmentIcon,
|
|
28
|
+
attachmentColor,
|
|
26
29
|
// ...otherProps
|
|
27
30
|
}) => {
|
|
28
|
-
const { ourColor, theirColor } = useConversation()
|
|
31
|
+
const { hasTriangle, ourColor, theirColor } = useConversation()
|
|
29
32
|
|
|
30
33
|
return (
|
|
31
34
|
<div
|
|
@@ -36,6 +39,8 @@ const Message = ({
|
|
|
36
39
|
userClassName,
|
|
37
40
|
`x-${from === 'ours' ? ourColor : theirColor}`,
|
|
38
41
|
from === 'ours' && 'ours',
|
|
42
|
+
hasTriangle === true ? 'has-triangle' : '',
|
|
43
|
+
'v1',
|
|
39
44
|
]
|
|
40
45
|
.filter((e) => e)
|
|
41
46
|
.join(' ')}
|
|
@@ -49,11 +54,19 @@ const Message = ({
|
|
|
49
54
|
<p>
|
|
50
55
|
{message}
|
|
51
56
|
</p>
|
|
57
|
+
{attachment
|
|
58
|
+
&& (
|
|
59
|
+
<div className={`attachment y-${attachmentColor}`}>
|
|
60
|
+
<span className="f-icons">{attachmentIcon}</span>
|
|
61
|
+
<p className="ml-v">
|
|
62
|
+
{attachment}
|
|
63
|
+
</p>
|
|
64
|
+
</div>
|
|
65
|
+
)}
|
|
52
66
|
</div>
|
|
53
67
|
</div>
|
|
54
68
|
)
|
|
55
69
|
}
|
|
56
|
-
|
|
57
70
|
Message.propTypes = {
|
|
58
71
|
/**
|
|
59
72
|
* The HTML id for this element
|
|
@@ -65,26 +78,46 @@ Message.propTypes = {
|
|
|
65
78
|
*/
|
|
66
79
|
className:PropTypes.string,
|
|
67
80
|
|
|
81
|
+
/**
|
|
82
|
+
* The React-written, css properties for this element.
|
|
83
|
+
*/
|
|
84
|
+
style:PropTypes.objectOf(PropTypes.string),
|
|
85
|
+
|
|
68
86
|
/**
|
|
69
87
|
* The message in the conversation
|
|
70
88
|
*/
|
|
71
89
|
message:PropTypes.string.isRequired,
|
|
90
|
+
|
|
72
91
|
/**
|
|
73
92
|
* The sender of the message
|
|
74
93
|
*/
|
|
75
|
-
sender
|
|
94
|
+
sender:PropTypes.string.isRequired,
|
|
95
|
+
|
|
76
96
|
/**
|
|
77
97
|
* The owner of the message
|
|
78
98
|
*/
|
|
79
|
-
from
|
|
99
|
+
from:PropTypes.oneOf(['ours', 'theirs']),
|
|
100
|
+
|
|
80
101
|
/**
|
|
81
|
-
*
|
|
102
|
+
* name of the attachment file
|
|
103
|
+
*/
|
|
104
|
+
attachment:PropTypes.string,
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* source of the attachment icon
|
|
108
|
+
*/
|
|
109
|
+
attachmentIcon:PropTypes.string,
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* background color of the attachment box
|
|
82
113
|
*/
|
|
83
|
-
|
|
114
|
+
attachmentColor:PropTypes.string,
|
|
84
115
|
}
|
|
85
116
|
|
|
86
117
|
Message.defaultProps = {
|
|
87
|
-
from:'theirs',
|
|
118
|
+
from :'theirs',
|
|
119
|
+
attachmentIcon :'A',
|
|
120
|
+
attachmentColor:'main4',
|
|
88
121
|
}
|
|
89
122
|
|
|
90
123
|
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
|
+
//}
|
|
@@ -7,31 +7,47 @@ $compact-padding: .6em .6em .48em;
|
|
|
7
7
|
$default-color:primary;
|
|
8
8
|
$font-weight:bold;
|
|
9
9
|
$default-margin:.5em;
|
|
10
|
+
$default-animation-time: .3s;
|
|
10
11
|
|
|
11
12
|
.#{bem.$base}.button {
|
|
12
13
|
background: var(--x, var(--#{$default-color}));
|
|
13
14
|
border: transparent;
|
|
14
15
|
border-radius: var(--theme-border-radius);
|
|
15
16
|
color: var(--on-x, var(--on-#{$default-color}));
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
font-family: var(--theme-default-paragraph);
|
|
16
19
|
font-weight: 600;
|
|
20
|
+
justify-content: space-between;
|
|
17
21
|
padding: $default-padding;
|
|
18
22
|
transition: all .25s;
|
|
19
23
|
|
|
20
|
-
&.arrow-right{
|
|
24
|
+
&.arrow-right {
|
|
21
25
|
&::after {
|
|
22
|
-
content: "
|
|
23
|
-
font-family: "icons";
|
|
24
|
-
vertical-align: middle;
|
|
26
|
+
content: "-->";
|
|
25
27
|
margin-left: $default-margin;
|
|
28
|
+
vertical-align: middle;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
&::after {
|
|
33
|
+
--final-position: 50%;
|
|
34
|
+
animation: animateArrow $default-animation-time forwards;
|
|
35
|
+
}
|
|
26
36
|
}
|
|
27
37
|
}
|
|
28
38
|
|
|
29
|
-
&.arrow-left{
|
|
39
|
+
&.arrow-left {
|
|
30
40
|
&::before {
|
|
31
|
-
content: "
|
|
32
|
-
font-family: "icons";
|
|
33
|
-
vertical-align: middle;
|
|
41
|
+
content: "<--";
|
|
34
42
|
margin-right: $default-margin;
|
|
43
|
+
vertical-align: middle;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:hover {
|
|
47
|
+
&::before {
|
|
48
|
+
--final-position: -50%;
|
|
49
|
+
animation: animateArrow $default-animation-time forwards;
|
|
50
|
+
}
|
|
35
51
|
}
|
|
36
52
|
}
|
|
37
53
|
|
|
@@ -41,12 +57,12 @@ $default-margin:.5em;
|
|
|
41
57
|
&:hover {
|
|
42
58
|
background: var(--light-x, var(--light-#{$default-color}));
|
|
43
59
|
}
|
|
60
|
+
|
|
44
61
|
&:focus {
|
|
45
62
|
background: var(--dark-x, var(--dark-#{$default-color}));
|
|
46
63
|
}
|
|
47
64
|
}
|
|
48
65
|
|
|
49
|
-
|
|
50
66
|
&.#{bem.$modifier-compact} {
|
|
51
67
|
padding: $compact-padding;
|
|
52
68
|
}
|
|
@@ -58,7 +74,7 @@ $default-margin:.5em;
|
|
|
58
74
|
|
|
59
75
|
&:hover,
|
|
60
76
|
&:focus,
|
|
61
|
-
&:disabled{
|
|
77
|
+
&:disabled {
|
|
62
78
|
background: transparent;
|
|
63
79
|
}
|
|
64
80
|
|
|
@@ -74,7 +90,7 @@ $default-margin:.5em;
|
|
|
74
90
|
}
|
|
75
91
|
}
|
|
76
92
|
|
|
77
|
-
&:disabled{
|
|
93
|
+
&:disabled {
|
|
78
94
|
border: 1px solid var(--x, var(--#{$default-color}));
|
|
79
95
|
color: var(--x, var(--#{$default-color}));
|
|
80
96
|
}
|
|
@@ -83,8 +99,8 @@ $default-margin:.5em;
|
|
|
83
99
|
&.#{bem.$modifier-simple} {
|
|
84
100
|
background: transparent;
|
|
85
101
|
border: 1px solid transparent;
|
|
86
|
-
padding: 0;
|
|
87
102
|
color: var(--x, var(--#{$default-color}));
|
|
103
|
+
padding: 0;
|
|
88
104
|
|
|
89
105
|
&:disabled,
|
|
90
106
|
&:hover,
|
|
@@ -93,13 +109,13 @@ $default-margin:.5em;
|
|
|
93
109
|
}
|
|
94
110
|
|
|
95
111
|
&:not(:disabled) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
112
|
+
&:hover {
|
|
113
|
+
color: var(--light-x, var(--light-#{$default-color}));
|
|
114
|
+
}
|
|
99
115
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
116
|
+
&:focus {
|
|
117
|
+
color: var(--dark-x, var(--dark-#{$default-color}));
|
|
118
|
+
}
|
|
103
119
|
}
|
|
104
120
|
|
|
105
121
|
&:disabled {
|
|
@@ -114,3 +130,12 @@ $default-margin:.5em;
|
|
|
114
130
|
}
|
|
115
131
|
|
|
116
132
|
|
|
133
|
+
@keyframes animateArrow {
|
|
134
|
+
from {
|
|
135
|
+
transform: translateX(0);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
to {
|
|
139
|
+
transform: translateX(var(--final-position));
|
|
140
|
+
}
|
|
141
|
+
}
|