beem-component 1.0.7 → 1.1.1
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/assets/css/sidebar.css +68 -0
- package/dist/components/Buttons/buttonIconsOnly.js +1 -1
- package/dist/components/Buttons/buttons.js +1 -1
- package/dist/components/Cards/cards.js +1 -1
- package/dist/components/ChatBody/chatBody.js +6 -4
- package/dist/components/ChatHeader/chatHeader.js +4 -3
- package/dist/components/Chats/chat.js +2 -2
- package/dist/components/Chats/chatInput.js +1 -1
- package/dist/components/ContactCards/contactCards.js +1 -1
- package/dist/components/InfoTab/infoTab.js +4 -3
- package/dist/components/Lists/listBox.js +1 -1
- package/dist/components/Tags/tags.js +116 -0
- package/dist/components/Tags/tags.stories.js +62 -0
- package/dist/components/dropdown.js +1 -1
- package/dist/components/dropdownItems.js +1 -1
- package/dist/components/index.js +8 -0
- package/dist/components/input.js +1 -1
- package/dist/components/search.js +1 -1
- package/dist/components/tags.js +3 -3
- package/package.json +1 -1
- package/src/App.js +25 -81
- package/src/Chat.js +120 -0
- package/src/ChatHeader.js +19 -0
- package/src/CustomerInfo.js +46 -0
- package/src/SideBar.js +80 -0
- package/src/lib/assets/css/sidebar.css +68 -0
- package/src/lib/components/Buttons/buttonIconsOnly.js +1 -1
- package/src/lib/components/Buttons/buttons.js +1 -1
- package/src/lib/components/Cards/cards.js +1 -1
- package/src/lib/components/ChatBody/chatBody.js +5 -1
- package/src/lib/components/ChatBody/chatBody.stories.js +27 -27
- package/src/lib/components/ChatHeader/chatHeader.js +2 -2
- package/src/lib/components/Chats/chat.js +2 -2
- package/src/lib/components/Chats/chatInput.js +1 -1
- package/src/lib/components/ContactCards/contactCards.js +1 -0
- package/src/lib/components/InfoTab/infoTab.js +2 -2
- package/src/lib/components/Lists/listBox.js +1 -1
- package/src/lib/components/Tags/tags.js +109 -0
- package/src/lib/components/Tags/tags.stories.js +37 -0
- package/src/lib/components/dropdown.js +1 -1
- package/src/lib/components/dropdownItems.js +1 -1
- package/src/lib/components/index.js +3 -1
- package/src/lib/components/input.js +1 -1
- package/src/lib/components/search.js +1 -1
- package/src/lib/components/tags.js +4 -4
- package/storybook-static/main.3c8d8027.iframe.bundle.js +1 -1
package/src/Chat.js
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AttachFile } from '@material-ui/icons';
|
|
3
|
+
import EmojiEmotionsIcon from '@material-ui/icons/EmojiEmotions';
|
|
4
|
+
import QuickreplyIcon from '@mui/icons-material/Quickreply';
|
|
5
|
+
import SendIcon from '@mui/icons-material/Send';
|
|
6
|
+
import { BmChat, BmIcons, BmInput } from './lib/components';
|
|
7
|
+
|
|
8
|
+
const Chat = () => {
|
|
9
|
+
return (
|
|
10
|
+
<BmChat>
|
|
11
|
+
<BmChat.Body style={{ flex: 1 }}>
|
|
12
|
+
<BmChat.Details
|
|
13
|
+
state="inbound"
|
|
14
|
+
session="bot"
|
|
15
|
+
displayTime={<p>12:00pm</p>}
|
|
16
|
+
status="sent"
|
|
17
|
+
>
|
|
18
|
+
<p>Inbound</p>
|
|
19
|
+
</BmChat.Details>
|
|
20
|
+
<BmChat.Details
|
|
21
|
+
state="outbound"
|
|
22
|
+
session="live"
|
|
23
|
+
displayTime={<p>10:00am</p>}
|
|
24
|
+
status="failed"
|
|
25
|
+
>
|
|
26
|
+
<p>Outbound</p>
|
|
27
|
+
</BmChat.Details>
|
|
28
|
+
<BmChat.Details
|
|
29
|
+
state="outbound"
|
|
30
|
+
session="live"
|
|
31
|
+
displayTime={<p>10:00am</p>}
|
|
32
|
+
status="failed"
|
|
33
|
+
>
|
|
34
|
+
<p>Outbound</p>
|
|
35
|
+
</BmChat.Details>
|
|
36
|
+
<BmChat.Details
|
|
37
|
+
state="outbound"
|
|
38
|
+
session="live"
|
|
39
|
+
displayTime={<p>10:00am</p>}
|
|
40
|
+
status="failed"
|
|
41
|
+
>
|
|
42
|
+
<p>Outbound</p>
|
|
43
|
+
</BmChat.Details>
|
|
44
|
+
<BmChat.Details
|
|
45
|
+
state="outbound"
|
|
46
|
+
session="live"
|
|
47
|
+
displayTime={<p>10:00am</p>}
|
|
48
|
+
status="failed"
|
|
49
|
+
>
|
|
50
|
+
<p>Outbound</p>
|
|
51
|
+
</BmChat.Details>{' '}
|
|
52
|
+
<BmChat.Details
|
|
53
|
+
state="outbound"
|
|
54
|
+
session="live"
|
|
55
|
+
displayTime={<p>10:00am</p>}
|
|
56
|
+
status="failed"
|
|
57
|
+
>
|
|
58
|
+
<p>Outbound</p>
|
|
59
|
+
</BmChat.Details>{' '}
|
|
60
|
+
<BmChat.Details
|
|
61
|
+
state="outbound"
|
|
62
|
+
session="live"
|
|
63
|
+
displayTime={<p>10:00am</p>}
|
|
64
|
+
status="failed"
|
|
65
|
+
>
|
|
66
|
+
<p>Outbound</p>
|
|
67
|
+
</BmChat.Details>{' '}
|
|
68
|
+
<BmChat.Details
|
|
69
|
+
state="outbound"
|
|
70
|
+
session="live"
|
|
71
|
+
displayTime={<p>10:00am</p>}
|
|
72
|
+
status="failed"
|
|
73
|
+
>
|
|
74
|
+
<p>Outbound</p>
|
|
75
|
+
</BmChat.Details>{' '}
|
|
76
|
+
<BmChat.Details
|
|
77
|
+
state="outbound"
|
|
78
|
+
session="live"
|
|
79
|
+
displayTime={<p>10:00am</p>}
|
|
80
|
+
status="failed"
|
|
81
|
+
>
|
|
82
|
+
<p>Outbound</p>
|
|
83
|
+
</BmChat.Details>{' '}
|
|
84
|
+
<BmChat.Details
|
|
85
|
+
state="outbound"
|
|
86
|
+
session="live"
|
|
87
|
+
displayTime={<p>10:00am</p>}
|
|
88
|
+
status="failed"
|
|
89
|
+
>
|
|
90
|
+
<p>Outbound</p>
|
|
91
|
+
</BmChat.Details>{' '}
|
|
92
|
+
<BmChat.Details
|
|
93
|
+
state="outbound"
|
|
94
|
+
session="live"
|
|
95
|
+
displayTime={<p>10:00am</p>}
|
|
96
|
+
status="failed"
|
|
97
|
+
>
|
|
98
|
+
<p>Outbound</p>
|
|
99
|
+
</BmChat.Details>{' '}
|
|
100
|
+
<BmChat.Details
|
|
101
|
+
state="outbound"
|
|
102
|
+
session="live"
|
|
103
|
+
displayTime={<p>10:00am</p>}
|
|
104
|
+
status="failed"
|
|
105
|
+
>
|
|
106
|
+
<p>Outbound</p>
|
|
107
|
+
</BmChat.Details>
|
|
108
|
+
</BmChat.Body>
|
|
109
|
+
<BmChat.Footer>
|
|
110
|
+
<BmIcons icon={<EmojiEmotionsIcon />} size="xlarge" />
|
|
111
|
+
<BmIcons icon={<AttachFile />} size="xlarge" />
|
|
112
|
+
<BmIcons icon={<QuickreplyIcon />} size="xlarge" />
|
|
113
|
+
<BmInput placeholder="Enter Message" />
|
|
114
|
+
<BmIcons icon={<SendIcon />} size="xlarge" />
|
|
115
|
+
</BmChat.Footer>
|
|
116
|
+
</BmChat>
|
|
117
|
+
);
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export default Chat;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BmChatHeader, BmButton } from "../src/lib/components/";
|
|
3
|
+
import '../src/lib/assets/css/sidebar.css';
|
|
4
|
+
|
|
5
|
+
export const ChatHeader = () => {
|
|
6
|
+
return (
|
|
7
|
+
<>
|
|
8
|
+
<div className="chat-header">
|
|
9
|
+
<BmChatHeader>
|
|
10
|
+
<h2>Contact Name</h2>
|
|
11
|
+
<p>Last seen: 00:00</p>
|
|
12
|
+
<BmButton size="medium">End Session</BmButton>
|
|
13
|
+
</BmChatHeader>
|
|
14
|
+
</div>
|
|
15
|
+
</>
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default ChatHeader;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* eslint-disable react/prop-types */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BmBtnIcon, BmInfoTab, BmIcons } from '../src/lib/components/';
|
|
4
|
+
import CallIcon from '@material-ui/icons/Call';
|
|
5
|
+
import EmailIcon from '@material-ui/icons/Email';
|
|
6
|
+
import NoteAddIcon from '@material-ui/icons/NoteAdd';
|
|
7
|
+
import AddIcon from '@material-ui/icons/Add';
|
|
8
|
+
import PriorityHighIcon from '@material-ui/icons/PriorityHigh';
|
|
9
|
+
import { MoreVert } from '@material-ui/icons';
|
|
10
|
+
|
|
11
|
+
const CustomerInfo = () => {
|
|
12
|
+
return (
|
|
13
|
+
<>
|
|
14
|
+
<BmInfoTab>
|
|
15
|
+
<BmInfoTab.Content>
|
|
16
|
+
<h3>Contact Name</h3>
|
|
17
|
+
<BmIcons icon={<MoreVert />} />
|
|
18
|
+
</BmInfoTab.Content>
|
|
19
|
+
<BmInfoTab.Content>
|
|
20
|
+
<BmInfoTab.Tabs>
|
|
21
|
+
<BmBtnIcon icon={<CallIcon />} />
|
|
22
|
+
<h4>Call</h4>
|
|
23
|
+
</BmInfoTab.Tabs>
|
|
24
|
+
<BmInfoTab.Tabs>
|
|
25
|
+
<BmBtnIcon icon={<EmailIcon />} />
|
|
26
|
+
<h4>Email</h4>
|
|
27
|
+
</BmInfoTab.Tabs>
|
|
28
|
+
<BmInfoTab.Tabs>
|
|
29
|
+
<BmBtnIcon icon={<NoteAddIcon />} />
|
|
30
|
+
<h4>Note</h4>
|
|
31
|
+
</BmInfoTab.Tabs>
|
|
32
|
+
<BmInfoTab.Tabs>
|
|
33
|
+
<BmBtnIcon icon={<AddIcon />} />
|
|
34
|
+
<h4>Log</h4>
|
|
35
|
+
</BmInfoTab.Tabs>
|
|
36
|
+
<BmInfoTab.Tabs>
|
|
37
|
+
<BmBtnIcon icon={<PriorityHighIcon />} variant="enabled" />
|
|
38
|
+
<h4>Priority</h4>
|
|
39
|
+
</BmInfoTab.Tabs>
|
|
40
|
+
</BmInfoTab.Content>
|
|
41
|
+
</BmInfoTab>
|
|
42
|
+
</>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default CustomerInfo;
|
package/src/SideBar.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BmTab } from "./lib/components/Tabs/tabs";
|
|
3
|
+
import ForumIcon from "@material-ui/icons/Forum";
|
|
4
|
+
import { BmContactCard, BmAvatar, BmCounter, BmTag } from "./lib/components";
|
|
5
|
+
|
|
6
|
+
const SideBar = () => {
|
|
7
|
+
return (
|
|
8
|
+
<>
|
|
9
|
+
<div className="main-sidebar-tabs">
|
|
10
|
+
<BmTab
|
|
11
|
+
state="active"
|
|
12
|
+
className="sidebar-tabs"
|
|
13
|
+
leadingIcon={<ForumIcon />}
|
|
14
|
+
>
|
|
15
|
+
<h3>Chats</h3>
|
|
16
|
+
</BmTab>
|
|
17
|
+
</div>
|
|
18
|
+
<div className="sidebar-contacts">
|
|
19
|
+
<BmContactCard>
|
|
20
|
+
<BmContactCard.Profile>
|
|
21
|
+
<BmAvatar user="employee" size="small" color="{$BmPrimaryBlack}" />
|
|
22
|
+
</BmContactCard.Profile>
|
|
23
|
+
<BmContactCard.Details>
|
|
24
|
+
<BmContactCard.SubDetails>
|
|
25
|
+
<h3>Contact Names</h3>
|
|
26
|
+
</BmContactCard.SubDetails>
|
|
27
|
+
<BmContactCard.SubDetails>
|
|
28
|
+
<p>Message text</p>
|
|
29
|
+
<BmCounter>10</BmCounter>
|
|
30
|
+
</BmContactCard.SubDetails>
|
|
31
|
+
<BmContactCard.SubDetails>
|
|
32
|
+
<BmTag variant="success">
|
|
33
|
+
<p>label</p>
|
|
34
|
+
</BmTag>
|
|
35
|
+
<p>10:00 am</p>
|
|
36
|
+
</BmContactCard.SubDetails>
|
|
37
|
+
</BmContactCard.Details>
|
|
38
|
+
</BmContactCard>
|
|
39
|
+
<BmContactCard>
|
|
40
|
+
<BmContactCard.Profile>
|
|
41
|
+
<BmAvatar user="employee" size="small" color="{$BmPrimaryBlack}" />
|
|
42
|
+
</BmContactCard.Profile>
|
|
43
|
+
<BmContactCard.Details>
|
|
44
|
+
<BmContactCard.SubDetails>
|
|
45
|
+
<h3>Contact Names</h3>
|
|
46
|
+
</BmContactCard.SubDetails>
|
|
47
|
+
<BmContactCard.SubDetails>
|
|
48
|
+
<p>Message text</p>
|
|
49
|
+
<BmCounter>10</BmCounter>
|
|
50
|
+
</BmContactCard.SubDetails>
|
|
51
|
+
<BmContactCard.SubDetails>
|
|
52
|
+
<BmTag variant="success">label</BmTag>
|
|
53
|
+
<p>10:00 am</p>
|
|
54
|
+
</BmContactCard.SubDetails>
|
|
55
|
+
</BmContactCard.Details>
|
|
56
|
+
</BmContactCard>
|
|
57
|
+
<BmContactCard>
|
|
58
|
+
<BmContactCard.Profile>
|
|
59
|
+
<BmAvatar user="employee" size="small" color="{$BmPrimaryBlack}" />
|
|
60
|
+
</BmContactCard.Profile>
|
|
61
|
+
<BmContactCard.Details>
|
|
62
|
+
<BmContactCard.SubDetails>
|
|
63
|
+
<h3>Contact Names</h3>
|
|
64
|
+
</BmContactCard.SubDetails>
|
|
65
|
+
<BmContactCard.SubDetails>
|
|
66
|
+
<p>Message text</p>
|
|
67
|
+
<BmCounter>10</BmCounter>
|
|
68
|
+
</BmContactCard.SubDetails>
|
|
69
|
+
<BmContactCard.SubDetails>
|
|
70
|
+
{/* <BmTag variant="success">label</BmTag> */}
|
|
71
|
+
<p>10:00 am</p>
|
|
72
|
+
</BmContactCard.SubDetails>
|
|
73
|
+
</BmContactCard.Details>
|
|
74
|
+
</BmContactCard>
|
|
75
|
+
</div>
|
|
76
|
+
</>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export default SideBar;
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
.sidebar {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
max-height: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
overflow: auto;
|
|
7
|
+
max-width: 20%;
|
|
8
|
+
width: 20%;
|
|
9
|
+
border: 1px solid #E2E2E2;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.sidebar>* {
|
|
13
|
+
margin-bottom: 1.5rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
1
16
|
.main-sidebar-tabs {
|
|
2
17
|
display: flex;
|
|
3
18
|
flex-direction: row;
|
|
@@ -9,4 +24,57 @@
|
|
|
9
24
|
.main-sidebar-tabs>.sidebar-tabs {
|
|
10
25
|
padding: 1.714rem;
|
|
11
26
|
flex: 1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.sidebar-contacts {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
margin: 0rem;
|
|
33
|
+
overflow: auto;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.main-chat-container {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: row;
|
|
39
|
+
align-items: center;
|
|
40
|
+
height: calc(100vh - 180px);
|
|
41
|
+
max-width: 100%;
|
|
42
|
+
width: 100%;
|
|
43
|
+
background: white;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.chat {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
max-height: 100%;
|
|
50
|
+
height: 100%;
|
|
51
|
+
flex-grow: 1;
|
|
52
|
+
max-height: 100%;
|
|
53
|
+
height: 100%;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.chat-menu {
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: row;
|
|
59
|
+
height: 0%;
|
|
60
|
+
flex-grow: 1;
|
|
61
|
+
width: 100%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.chat-messages {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
height: 100%;
|
|
68
|
+
overflow: auto;
|
|
69
|
+
width: 80%;
|
|
70
|
+
border: 1px solid #E2E2E2;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.chat-contact-info {
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
height: 100%;
|
|
77
|
+
overflow: auto;
|
|
78
|
+
width: 25%;
|
|
79
|
+
border: 1px solid #E2E2E2;
|
|
12
80
|
}
|
|
@@ -47,7 +47,7 @@ const BeemButton = styled.button`
|
|
|
47
47
|
flex-direction: row;
|
|
48
48
|
justify-content: center;
|
|
49
49
|
align-items: center;
|
|
50
|
-
border-radius: 0.
|
|
50
|
+
border-radius: 0.25rem;
|
|
51
51
|
padding: ${({ size }) => {
|
|
52
52
|
if (size === "large") return "0.625rem 1.5rem";
|
|
53
53
|
if (size === "medium") return "0.4375rem 1rem";
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
const BmChat = styled.div`
|
|
16
16
|
display: flex;
|
|
17
17
|
flex-direction: column;
|
|
18
|
+
height: 100%;
|
|
18
19
|
${"" /* border: 0.071rem solid ${BmGrey400}; */}
|
|
19
20
|
`;
|
|
20
21
|
|
|
@@ -22,6 +23,8 @@ BmChat.Body = styled.div`
|
|
|
22
23
|
display: flex;
|
|
23
24
|
flex-direction: column;
|
|
24
25
|
padding: 0rem 1.5rem;
|
|
26
|
+
flex-grow: 1;
|
|
27
|
+
overflow: auto;
|
|
25
28
|
`;
|
|
26
29
|
|
|
27
30
|
const Details = styled.div`
|
|
@@ -42,6 +45,7 @@ const Details = styled.div`
|
|
|
42
45
|
overflow-wrap: break-word !important;
|
|
43
46
|
word-wrap: break-word !important;
|
|
44
47
|
margin: 0rem;
|
|
48
|
+
flex-grow: 1;
|
|
45
49
|
`;
|
|
46
50
|
|
|
47
51
|
const MessageDetails = styled.div`
|
|
@@ -136,7 +140,7 @@ BmChat.Footer = styled.div`
|
|
|
136
140
|
padding: 0.5rem 0rem;
|
|
137
141
|
align-items: center;
|
|
138
142
|
justify-content: center;
|
|
139
|
-
background: ${BmGrey50};
|
|
143
|
+
${'' /* background: ${BmGrey50}; */}
|
|
140
144
|
> *:not(:last-child) {
|
|
141
145
|
margin-right: 0.5rem;
|
|
142
146
|
}
|
|
@@ -17,32 +17,32 @@ export default {
|
|
|
17
17
|
|
|
18
18
|
export const ChatBody = () => {
|
|
19
19
|
return (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
20
|
+
<BmChat>
|
|
21
|
+
<BmChat.Body>
|
|
22
|
+
<BmChat.Details
|
|
23
|
+
state="inbound"
|
|
24
|
+
session="bot"
|
|
25
|
+
displayTime={<p>12:00pm</p>}
|
|
26
|
+
status="sent"
|
|
27
|
+
>
|
|
28
|
+
<p>Inbound</p>
|
|
29
|
+
</BmChat.Details>
|
|
30
|
+
<BmChat.Details
|
|
31
|
+
state="outbound"
|
|
32
|
+
session="live"
|
|
33
|
+
displayTime={<p>10:00am</p>}
|
|
34
|
+
status="failed"
|
|
35
|
+
>
|
|
36
|
+
<p>Outbound</p>
|
|
37
|
+
</BmChat.Details>
|
|
38
|
+
</BmChat.Body>
|
|
39
|
+
<BmChat.Footer>
|
|
40
|
+
<BmIcons icon={<EmojiEmotionsIcon />} size="xlarge" />
|
|
41
|
+
<BmIcons icon={<AttachFileIcon />} size="xlarge" />
|
|
42
|
+
<BmIcons icon={<QuickreplyIcon />} size="xlarge" />
|
|
43
|
+
<BmInput placeholder="Enter Message" />
|
|
44
|
+
<BmIcons icon={<SendIcon />} size="xlarge" />
|
|
45
|
+
</BmChat.Footer>
|
|
46
|
+
</BmChat>
|
|
47
47
|
);
|
|
48
48
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
-
import { BmGrey400 } from "../colors";
|
|
2
|
+
// import { BmGrey400 } from "../colors";
|
|
3
3
|
|
|
4
4
|
export const BmChatHeader = styled.div`
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: row;
|
|
7
7
|
align-items: center;
|
|
8
|
-
border: 0.071rem solid ${BmGrey400};
|
|
8
|
+
${'' /* border: 0.071rem solid ${BmGrey400}; */}
|
|
9
9
|
padding: 1rem;
|
|
10
10
|
> *:not(:last-child) {
|
|
11
11
|
margin-right: 0.5rem;
|
|
@@ -25,7 +25,7 @@ export const BmChatWrapper = styled.div`
|
|
|
25
25
|
return `${BmPrimaryWhite}`;
|
|
26
26
|
}};
|
|
27
27
|
border: 0.071rem solid ${BmGrey400};
|
|
28
|
-
border-radius: 0.
|
|
28
|
+
border-radius: 0.25rem 0.21875rem 0.21875rem 0rem;
|
|
29
29
|
max-width: 50%;
|
|
30
30
|
overflow-wrap: break-word !important;
|
|
31
31
|
word-wrap: break-word !important;
|
|
@@ -170,7 +170,7 @@ export const BmFileChat = ({ children, displayTime, type, ...rest }) => {
|
|
|
170
170
|
export const BmImageWrapper = styled.div`
|
|
171
171
|
background: ${BmGrey100};
|
|
172
172
|
border: 0.071rem solid ${BmGrey400};
|
|
173
|
-
border-radius: 0.
|
|
173
|
+
border-radius: 0.25rem 0.21875rem 0rem 0.21875rem;
|
|
174
174
|
display: flex;
|
|
175
175
|
flex-direction: column;
|
|
176
176
|
max-width: 50%;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
-
import { BmGrey400 } from "../colors";
|
|
2
|
+
// import { BmGrey400 } from "../colors";
|
|
3
3
|
|
|
4
4
|
const BmInfoTab = styled.div`
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
padding: 1.5rem;
|
|
8
|
-
border: 0.071rem solid ${BmGrey400};
|
|
8
|
+
${'' /* border: 0.071rem solid ${BmGrey400}; */}
|
|
9
9
|
> *:not(:last-child) {
|
|
10
10
|
margin-bottom: 1rem;
|
|
11
11
|
}
|
|
@@ -24,7 +24,7 @@ export const BmListBox = styled.div`
|
|
|
24
24
|
background: ${BmPrimaryWhite};
|
|
25
25
|
border: 0.071rem solid ${BmGrey400};
|
|
26
26
|
box-shadow: 0rem 0.286rem 0.286rem rgba(0, 0, 0, 0.25);
|
|
27
|
-
border-radius: 0.
|
|
27
|
+
border-radius: 0.25rem;
|
|
28
28
|
z-index: 99999;
|
|
29
29
|
cursor: pointer;
|
|
30
30
|
`;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { BmIcons } from "../iconStyles";
|
|
5
|
+
import {
|
|
6
|
+
BmPrimaryWhite,
|
|
7
|
+
BmSecondaryDarkGreen,
|
|
8
|
+
BmSecondaryRed,
|
|
9
|
+
BmPrimaryBlack,
|
|
10
|
+
BmGrey100,
|
|
11
|
+
BmGrey400,
|
|
12
|
+
BmPrimaryGold,
|
|
13
|
+
} from "../../components/colors";
|
|
14
|
+
|
|
15
|
+
const Color = ({ variant, color }) => {
|
|
16
|
+
if (variant === "success" || variant === "warning" || variant === "danger") {
|
|
17
|
+
return `${BmPrimaryWhite}`;
|
|
18
|
+
}
|
|
19
|
+
if (!variant && color) {
|
|
20
|
+
return color;
|
|
21
|
+
}
|
|
22
|
+
return `${BmPrimaryBlack}`;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const BeemTag = styled.button`
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: row;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
align-items: center;
|
|
30
|
+
padding: 0.214rem 0.571rem;
|
|
31
|
+
border-radius: 0.25rem;
|
|
32
|
+
background: ${({ variant }) => {
|
|
33
|
+
if (variant === "neutral") return `${BmGrey100}`;
|
|
34
|
+
if (variant === "success") return `${BmSecondaryDarkGreen}`;
|
|
35
|
+
if (variant === "warning") return `${BmPrimaryGold}`;
|
|
36
|
+
if (variant === "danger") return `${BmSecondaryRed}`;
|
|
37
|
+
if (variant === "light") return `${BmPrimaryWhite}`;
|
|
38
|
+
if (!variant) return `${BmGrey100}`;
|
|
39
|
+
}};
|
|
40
|
+
border: 0.071rem solid
|
|
41
|
+
${({ variant }) => {
|
|
42
|
+
if (variant === "neutral") return `${BmGrey100}`;
|
|
43
|
+
if (variant === "success") return `${BmSecondaryDarkGreen}`;
|
|
44
|
+
if (variant === "warning") return `${BmPrimaryGold}`;
|
|
45
|
+
if (variant === "danger") return `${BmSecondaryRed}`;
|
|
46
|
+
if (variant === "light") return `${BmGrey400}`;
|
|
47
|
+
return `${BmGrey100}`;
|
|
48
|
+
}};
|
|
49
|
+
> * {
|
|
50
|
+
color: ${({ variant, color }) => Color({ variant, color })};
|
|
51
|
+
text-transform: uppercase;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
> *:not(:last-child) {
|
|
55
|
+
margin-right: 0.5rem;
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
export const BmTag = (props) => {
|
|
60
|
+
const {
|
|
61
|
+
variant,
|
|
62
|
+
size,
|
|
63
|
+
disabled,
|
|
64
|
+
children,
|
|
65
|
+
leadingIcon,
|
|
66
|
+
trailingIcon,
|
|
67
|
+
color,
|
|
68
|
+
...rest
|
|
69
|
+
} = props;
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<BeemTag
|
|
73
|
+
size={size}
|
|
74
|
+
variant={variant}
|
|
75
|
+
disabled={disabled}
|
|
76
|
+
children={children}
|
|
77
|
+
color={color}
|
|
78
|
+
{...rest}
|
|
79
|
+
>
|
|
80
|
+
{leadingIcon && (
|
|
81
|
+
<BmIcons
|
|
82
|
+
disabled={disabled}
|
|
83
|
+
icon={leadingIcon}
|
|
84
|
+
variant={variant}
|
|
85
|
+
color={Color({color, variant})}
|
|
86
|
+
size={size || 'small'}
|
|
87
|
+
/>
|
|
88
|
+
)}
|
|
89
|
+
{children}
|
|
90
|
+
{trailingIcon && (
|
|
91
|
+
<BmIcons
|
|
92
|
+
icon={trailingIcon}
|
|
93
|
+
disabled={disabled}
|
|
94
|
+
color={Color({color, variant})}
|
|
95
|
+
size={size || 'small'}
|
|
96
|
+
/>
|
|
97
|
+
)}
|
|
98
|
+
</BeemTag>
|
|
99
|
+
);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
BmTag.propTypes = {
|
|
103
|
+
children: PropTypes.object,
|
|
104
|
+
trailingIcon: PropTypes.node,
|
|
105
|
+
leadingIcon: PropTypes.node,
|
|
106
|
+
color: PropTypes.string,
|
|
107
|
+
size: PropTypes.string,
|
|
108
|
+
variant: PropTypes.string,
|
|
109
|
+
};
|