beem-component 1.5.6 → 1.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/fb.png +0 -0
- package/dist/assets/insta.png +0 -0
- package/dist/assets/wa.png +0 -0
- package/dist/components/ChatComponents/ContactCards/contactCards.stories.js +1 -1
- package/dist/components/Modals/modal.js +7 -6
- package/dist/components/Modals/modals.stories.js +24 -2
- package/dist/components/ProfileIcon/ProfileIcon.js +97 -0
- package/dist/components/ProfileIcon/profileIcon.stories.js +82 -0
- package/dist/components/examples/App.js +137 -0
- package/dist/components/examples/InfoAccordion.js +24 -0
- package/dist/components/examples/chatBodyExample.js +72 -0
- package/dist/components/examples/selectExample.js +77 -0
- package/dist/components/globalStyles.js +1 -1
- package/dist/components/text.js +15 -6
- package/package.json +3 -2
- package/src/App.js +28 -175
- package/src/lib/assets/fb.png +0 -0
- package/src/lib/assets/insta.png +0 -0
- package/src/lib/assets/wa.png +0 -0
- package/src/lib/components/ChatComponents/ContactCards/contactCards.stories.js +1 -1
- package/src/lib/components/Modals/modal.js +11 -3
- package/src/lib/components/Modals/modals.stories.js +25 -0
- package/src/lib/components/ProfileIcon/ProfileIcon.js +78 -0
- package/src/lib/components/ProfileIcon/profileIcon.stories.js +57 -0
- package/src/lib/components/examples/App.js +181 -0
- package/src/{InfoAccordion.js → lib/components/examples/InfoAccordion.js} +0 -0
- package/src/{App1.js → lib/components/examples/chatBodyExample.js} +2 -2
- package/src/{App copy.js → lib/components/examples/selectExample.js} +0 -0
- package/src/lib/components/globalStyles.js +3 -4
- package/src/lib/components/text.js +16 -2
- package/dist/components/example.js +0 -47
- package/dist/components/sidebar.js +0 -32
- package/dist/components/tabs.js +0 -106
- package/dist/components/tags.js +0 -100
- package/dist/images/azam.png +0 -0
- package/dist/images/azam1.png +0 -0
- package/src/ChatHeader.js +0 -22
- package/src/CustomerInfo.js +0 -46
- package/src/MainChat.js +0 -41
- package/src/SideBar.js +0 -81
- package/src/lib/components/example.js +0 -30
- package/src/lib/components/sidebar.js +0 -33
- package/src/lib/components/tabs.js +0 -123
- package/src/lib/components/tags.js +0 -101
- package/src/lib/images/azam.png +0 -0
- package/src/lib/images/azam1.png +0 -0
- package/src/list.scss +0 -4
package/dist/components/text.js
CHANGED
|
@@ -3,20 +3,29 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.p = exports.input = exports.h5 = exports.h4 = exports.h3 = exports.h2 = exports.h1 = exports.a = void 0;
|
|
6
|
+
exports.p = exports.input = exports.h6 = exports.h5 = exports.h4 = exports.h3 = exports.h2 = exports.h1 = exports.a = void 0;
|
|
7
7
|
|
|
8
8
|
var _typography = require("./typography");
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// 32px
|
|
11
|
+
var h1 = "font-family: ".concat(_typography.PoppinsMedium, ";\nfont-style: normal;\nfont-weight: 500;\nfont-size: 2.286rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;"); // 24px
|
|
12
|
+
|
|
11
13
|
exports.h1 = h1;
|
|
12
|
-
var h2 = "font-family: ".concat(_typography.PoppinsMedium, ";\nfont-style: normal;\nfont-weight: 500;\nfont-size: 1.714rem;\nletter-spacing: -0.02em;\nmargin: 0rem;");
|
|
14
|
+
var h2 = "font-family: ".concat(_typography.PoppinsMedium, ";\nfont-style: normal;\nfont-weight: 500;\nfont-size: 1.714rem;\nletter-spacing: -0.02em;\nmargin: 0rem;"); // 18px
|
|
15
|
+
|
|
13
16
|
exports.h2 = h2;
|
|
14
|
-
var h3 = "font-family: ".concat(_typography.PoppinsMedium, ";\nfont-style: normal;\nfont-weight: 500;\nfont-size: 1.286rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;");
|
|
17
|
+
var h3 = "font-family: ".concat(_typography.PoppinsMedium, ";\nfont-style: normal;\nfont-weight: 500;\nfont-size: 1.286rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;"); // 16px
|
|
18
|
+
|
|
15
19
|
exports.h3 = h3;
|
|
16
|
-
var h4 = " font-family: ".concat(_typography.PoppinsMedium, ";\nfont-style: normal;\nfont-weight: 500;\nfont-size:
|
|
20
|
+
var h4 = " font-family: ".concat(_typography.PoppinsMedium, ";\nfont-style: normal;\nfont-weight: 500;\nfont-size: 1.143rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;"); // 14px
|
|
21
|
+
|
|
17
22
|
exports.h4 = h4;
|
|
18
|
-
var h5 = " font-family: ".concat(_typography.PoppinsMedium, ";\nfont-style: normal;\nfont-weight: 500;\nfont-size: 1rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;");
|
|
23
|
+
var h5 = " font-family: ".concat(_typography.PoppinsMedium, ";\nfont-style: normal;\nfont-weight: 500;\nfont-size: 1rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;"); // 12px
|
|
24
|
+
|
|
19
25
|
exports.h5 = h5;
|
|
26
|
+
var h6 = " font-family: ".concat(_typography.PoppinsMedium, ";\nfont-style: normal;\nfont-weight: 500;\nfont-size: 0.857rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;"); // 14px
|
|
27
|
+
|
|
28
|
+
exports.h6 = h6;
|
|
20
29
|
var p = "font-family: ".concat(_typography.OpenSans, ";\nfont-style: normal;\nfont-weight: normal;\nfont-size: 1rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;");
|
|
21
30
|
exports.p = p;
|
|
22
31
|
var input = " font-family: ".concat(_typography.OpenSans, ";\nfont-style: normal;\nfont-weight: normal;\nfont-size: 1rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "beem-component",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/components/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"react": "^17.0.2",
|
|
18
18
|
"react-dom": "^17.0.2",
|
|
19
19
|
"react-scripts": "4.0.3",
|
|
20
|
-
"web-vitals": "^1.1.2"
|
|
20
|
+
"web-vitals": "^1.1.2",
|
|
21
|
+
"babel-loader": "8.1.0"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
23
24
|
"@emotion/react": "^11.7.1",
|
package/src/App.js
CHANGED
|
@@ -1,181 +1,34 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import SendIcon from "@mui/icons-material/Send";
|
|
6
|
-
import { BmChat, BmIcons, BmInput } from "./lib/components";
|
|
7
|
-
import "../src/lib/assets/css/sidebar.scss";
|
|
8
|
-
import image from "../src/lib/assets/chart-img.png";
|
|
9
|
-
import azam from "../src/lib/images/azam1.png";
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { BmModal, BmButton, GlobalStyle } from "./lib/components";
|
|
3
|
+
import { BmProfileIcon } from "./lib/components/ProfileIcon/ProfileIcon";
|
|
4
|
+
import beem from './lib/assets/beem.jpeg';
|
|
10
5
|
|
|
11
6
|
const Chat = () => {
|
|
7
|
+
const [showModal, setShowModal] = useState(false);
|
|
8
|
+
|
|
12
9
|
return (
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Au kama una aina nyingine ya kisimbuzi;
|
|
36
|
-
Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, Bonyeza OK kwenye AUTOMATIC SEARCH.
|
|
37
|
-
Shuka kwenye frequency na uangalie frequency zote kuanzia 11044, 10981, 11106 na 10971.
|
|
38
|
-
Au
|
|
39
|
-
Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, kwenye EUTELSAT 7C bonyeza kitufe cha KIJANI.
|
|
40
|
-
Angalia QUALITY kwenye frequency zote kuanzia 11044, 10981, 11106 na 10971.
|
|
41
|
-
Angalia asilimia ya QUALITY pale chini.
|
|
42
|
-
QUALITY inatakiwa isiwe pungufu ya asilimia 60%.
|
|
43
|
-
Je, kwako inasoma ngapi? Kama ipo chini ya 60%, wasiliana na aliyekufungia dish arekebishe.</p>
|
|
44
|
-
</BmChat.Details>
|
|
45
|
-
<BmChat.Details
|
|
46
|
-
state="inbound"
|
|
47
|
-
session="bot"
|
|
48
|
-
displayTime={<p>12:00pm</p>}
|
|
49
|
-
status="sent"
|
|
50
|
-
// src={image}
|
|
51
|
-
// fileName={<p>attachment.jpg</p>}
|
|
52
|
-
>
|
|
53
|
-
<p>Technical No Signal - Ili kupata chaneli au chaneli zifunguke kwa wakati ukilipia kifurushi, hakikisha kwanza kama unapata signal vizuri kutoka kwenye dish kwa kutumia remote control.
|
|
54
|
-
Bonyeza MENU, Bonyeza OK kwenye SEARCH, Bonyeza OK kwenye TP LIST.
|
|
55
|
-
Angalia asilimia ya QUALITY pale chini.
|
|
56
|
-
Angalia Transponder zote, 001, 002, 003 na 004 zinatakiwa ziwe na QUALITY si pungufu ya asilimia 60%.
|
|
57
|
-
Au kama una aina nyingine ya kisimbuzi;
|
|
58
|
-
Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, Bonyeza OK kwenye AUTOMATIC SEARCH.
|
|
59
|
-
Shuka kwenye frequency na uangalie frequency zote kuanzia 11044, 10981, 11106 na 10971.
|
|
60
|
-
Au
|
|
61
|
-
Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, kwenye EUTELSAT 7C bonyeza kitufe cha KIJANI.
|
|
62
|
-
Angalia QUALITY kwenye frequency zote kuanzia 11044, 10981, 11106 na 10971.
|
|
63
|
-
Angalia asilimia ya QUALITY pale chini.
|
|
64
|
-
QUALITY inatakiwa isiwe pungufu ya asilimia 60%.
|
|
65
|
-
Je, kwako inasoma ngapi? Kama ipo chini ya 60%, wasiliana na aliyekufungia dish arekebishe.</p>
|
|
66
|
-
</BmChat.Details>
|
|
67
|
-
<BmChat.Details
|
|
68
|
-
state="outbound"
|
|
69
|
-
session="live"
|
|
70
|
-
displayTime={<p>10:00am</p>}
|
|
71
|
-
status="failed"
|
|
72
|
-
src={azam}
|
|
73
|
-
file={<p>fildjfdlkfjlkfdjfldjfldsjfldsje.jpg</p>}
|
|
74
|
-
>
|
|
75
|
-
<p>Hekkoi</p>
|
|
76
|
-
</BmChat.Details>
|
|
77
|
-
<BmChat.Details
|
|
78
|
-
state="outbound"
|
|
79
|
-
session="live"
|
|
80
|
-
displayTime={<p>10:00am</p>}
|
|
81
|
-
status="failed"
|
|
82
|
-
>
|
|
83
|
-
<p>Outbound</p>
|
|
84
|
-
</BmChat.Details>
|
|
85
|
-
<BmChat.Details
|
|
86
|
-
state="outbound"
|
|
87
|
-
session="live"
|
|
88
|
-
displayTime={<p>10:00am</p>}
|
|
89
|
-
status="failed"
|
|
90
|
-
>
|
|
91
|
-
<p>Outbound</p>
|
|
92
|
-
</BmChat.Details>
|
|
93
|
-
<BmChat.Details
|
|
94
|
-
state="outbound"
|
|
95
|
-
session="live"
|
|
96
|
-
displayTime={<p>10:00am</p>}
|
|
97
|
-
status="failed"
|
|
98
|
-
>
|
|
99
|
-
<p>Outbound</p>
|
|
100
|
-
</BmChat.Details>{" "}
|
|
101
|
-
<BmChat.Details
|
|
102
|
-
state="outbound"
|
|
103
|
-
session="live"
|
|
104
|
-
displayTime={<p>10:00am</p>}
|
|
105
|
-
status="failed"
|
|
106
|
-
>
|
|
107
|
-
<p>
|
|
108
|
-
Habari! Mimi ni msaidizi wako binafsi Azam TV. Ningependa
|
|
109
|
-
nikusaidie, lakini tafadhali anza kwa kuchagua kati ya haya
|
|
110
|
-
nikuhudumie (Mfano chagua namba 2 kubadili kifurushi au 5 kwa msaada
|
|
111
|
-
zaidi). 1. Angalia Salio 2. Badilisha Kifurishi 3. Tuma Ujumbe
|
|
112
|
-
Kuwasha Kisimbuzi 4. Huduma za mteja mpya 5. Nahitaji msaada (Huduma
|
|
113
|
-
kwa mteja) 6. Change language 0. Au ungependa kutuuliza swali
|
|
114
|
-
lingine?
|
|
115
|
-
</p>
|
|
116
|
-
</BmChat.Details>{" "}
|
|
117
|
-
<BmChat.Details
|
|
118
|
-
state="outbound"
|
|
119
|
-
session="live"
|
|
120
|
-
displayTime={<p>10:00am</p>}
|
|
121
|
-
status="failed"
|
|
122
|
-
>
|
|
123
|
-
<p>Outbound</p>
|
|
124
|
-
</BmChat.Details>{" "}
|
|
125
|
-
<BmChat.Details
|
|
126
|
-
state="outbound"
|
|
127
|
-
session="live"
|
|
128
|
-
displayTime={<p>10:00am</p>}
|
|
129
|
-
status="failed"
|
|
130
|
-
>
|
|
131
|
-
<p>Outbound</p>
|
|
132
|
-
</BmChat.Details>{" "}
|
|
133
|
-
<BmChat.Details
|
|
134
|
-
state="outbound"
|
|
135
|
-
session="live"
|
|
136
|
-
displayTime={<p>10:00am</p>}
|
|
137
|
-
status="failed"
|
|
138
|
-
>
|
|
139
|
-
<p>Outbound</p>
|
|
140
|
-
</BmChat.Details>{" "}
|
|
141
|
-
<BmChat.Details
|
|
142
|
-
state="outbound"
|
|
143
|
-
session="live"
|
|
144
|
-
displayTime={<p>10:00am</p>}
|
|
145
|
-
status="failed"
|
|
146
|
-
>
|
|
147
|
-
<p>Outbound</p>
|
|
148
|
-
</BmChat.Details>{" "}
|
|
149
|
-
<BmChat.Details
|
|
150
|
-
state="outbound"
|
|
151
|
-
session="live"
|
|
152
|
-
displayTime={<p>10:00am</p>}
|
|
153
|
-
status="failed"
|
|
154
|
-
>
|
|
155
|
-
<p>Outbound</p>
|
|
156
|
-
</BmChat.Details>{" "}
|
|
157
|
-
<BmChat.Details
|
|
158
|
-
state="outbound"
|
|
159
|
-
session="live"
|
|
160
|
-
displayTime={<p>10:00am</p>}
|
|
161
|
-
status="failed"
|
|
162
|
-
>
|
|
163
|
-
<p>Outbound</p>
|
|
164
|
-
</BmChat.Details>
|
|
165
|
-
</BmChat.Body>
|
|
166
|
-
<BmChat.Footer style={{ justifyContent: "flex-start" }}>
|
|
167
|
-
<div class="chat-footer">
|
|
168
|
-
<BmIcons icon={<EmojiEmotionsIcon />} size="xlarge" />
|
|
169
|
-
</div>
|
|
170
|
-
<div class="chat-footer">
|
|
171
|
-
<BmIcons icon={<EmojiEmotionsIcon />} size="xlarge" />
|
|
172
|
-
<BmIcons icon={<AttachFile />} size="xlarge" />
|
|
173
|
-
<BmIcons icon={<QuickreplyIcon />} size="xlarge" />
|
|
174
|
-
<BmInput placeholder="Enter Message" style={{ flex: 1 }} />
|
|
175
|
-
<BmIcons icon={<SendIcon />} size="xlarge" />
|
|
176
|
-
</div>
|
|
177
|
-
</BmChat.Footer>
|
|
178
|
-
</BmChat>
|
|
10
|
+
<>
|
|
11
|
+
<GlobalStyle />
|
|
12
|
+
<div>
|
|
13
|
+
<BmButton onClick={() => setShowModal(!showModal)}>Click Me!</BmButton>
|
|
14
|
+
</div>
|
|
15
|
+
<BmModal show={showModal} onHide={() => setShowModal(false)}>
|
|
16
|
+
<BmModal.Header closeButton>
|
|
17
|
+
<h2>Header</h2>
|
|
18
|
+
</BmModal.Header>
|
|
19
|
+
<BmModal.SubHeader>
|
|
20
|
+
<h5>This modal has a sub heading</h5>
|
|
21
|
+
</BmModal.SubHeader>
|
|
22
|
+
<BmModal.Body>
|
|
23
|
+
<BmProfileIcon img={beem} content={<h3>TV</h3>} channel="facebook" size="xsmall" />
|
|
24
|
+
<p>This is a body</p>
|
|
25
|
+
</BmModal.Body>
|
|
26
|
+
<BmModal.Footer>
|
|
27
|
+
<p>This is a footer</p>
|
|
28
|
+
</BmModal.Footer>
|
|
29
|
+
</BmModal>
|
|
30
|
+
<BmProfileIcon img={beem} channel="instagram" />
|
|
31
|
+
</>
|
|
179
32
|
);
|
|
180
33
|
};
|
|
181
34
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import BmContactCard from "./contactCards";
|
|
4
4
|
import BmAvatar from "../../Avatars/avatars";
|
|
5
5
|
import BmCounter from "../../MessageCounter/messageCounter";
|
|
6
|
-
import { BmTag } from "../../tags";
|
|
6
|
+
import { BmTag } from "../../Tags/tags";
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
9
|
component: { BmContactCard, BmAvatar, BmTag, BmCounter },
|
|
@@ -28,7 +28,7 @@ export const ModalContent = styled.div`
|
|
|
28
28
|
max-width: 100%;
|
|
29
29
|
|
|
30
30
|
> *:not(:last-child) {
|
|
31
|
-
margin-bottom:
|
|
31
|
+
margin-bottom: 0.5rem;
|
|
32
32
|
}
|
|
33
33
|
@media (min-width: 576px) {
|
|
34
34
|
max-width: 500px;
|
|
@@ -109,8 +109,9 @@ BmModal.Header = ({ children, size, onHide, closeButton, show, ...rest }) => {
|
|
|
109
109
|
{(value) => (
|
|
110
110
|
<>
|
|
111
111
|
<ModalHeader {...rest}>
|
|
112
|
+
<p> </p>
|
|
112
113
|
{children}
|
|
113
|
-
{closeButton
|
|
114
|
+
{closeButton ? (
|
|
114
115
|
<BmIcons
|
|
115
116
|
size="xlarge"
|
|
116
117
|
icon={<Clear />}
|
|
@@ -119,7 +120,7 @@ BmModal.Header = ({ children, size, onHide, closeButton, show, ...rest }) => {
|
|
|
119
120
|
}
|
|
120
121
|
{...rest}
|
|
121
122
|
/>
|
|
122
|
-
)}
|
|
123
|
+
) : <p> </p>}
|
|
123
124
|
</ModalHeader>
|
|
124
125
|
</>
|
|
125
126
|
)}
|
|
@@ -127,6 +128,13 @@ BmModal.Header = ({ children, size, onHide, closeButton, show, ...rest }) => {
|
|
|
127
128
|
);
|
|
128
129
|
};
|
|
129
130
|
|
|
131
|
+
BmModal.SubHeader = styled.div`
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-direction: row;
|
|
134
|
+
justify-content: center;
|
|
135
|
+
align-items:center;
|
|
136
|
+
`;
|
|
137
|
+
|
|
130
138
|
BmModal.Body = styled.div`
|
|
131
139
|
display: flex;
|
|
132
140
|
flex-direction: column;
|
|
@@ -51,6 +51,31 @@ export const SampleModal = () => {
|
|
|
51
51
|
</>
|
|
52
52
|
);
|
|
53
53
|
};
|
|
54
|
+
|
|
55
|
+
export const ModalWithSubHeader = () => {
|
|
56
|
+
const [showModal, setShowModal] = useState(false);
|
|
57
|
+
return (
|
|
58
|
+
<>
|
|
59
|
+
<div>
|
|
60
|
+
<BmButton onClick={() => setShowModal(!showModal)}>Click Me!</BmButton>
|
|
61
|
+
</div>
|
|
62
|
+
<BmModal show={showModal} onHide={() => setShowModal(false)}>
|
|
63
|
+
<BmModal.Header closeButton>
|
|
64
|
+
<h2>Header</h2>
|
|
65
|
+
</BmModal.Header>
|
|
66
|
+
<BmModal.SubHeader>
|
|
67
|
+
<h5>This modal has a sub heading</h5>
|
|
68
|
+
</BmModal.SubHeader>
|
|
69
|
+
<BmModal.Body>
|
|
70
|
+
<p>This is a body</p>
|
|
71
|
+
</BmModal.Body>
|
|
72
|
+
<BmModal.Footer>
|
|
73
|
+
<p>This is a footer</p>
|
|
74
|
+
</BmModal.Footer>
|
|
75
|
+
</BmModal>
|
|
76
|
+
</>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
54
79
|
export const ExampleModal = () => {
|
|
55
80
|
const [showModal, setShowModal] = useState(false);
|
|
56
81
|
return (
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { BmSecondaryBlue12, BmBgLightBlue } from '../colors';
|
|
4
|
+
import wa from '../../assets/wa.png';
|
|
5
|
+
import fb from '../../assets/fb.png';
|
|
6
|
+
import insta from '../../assets/insta.png';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const handleSize = (size) => {
|
|
10
|
+
if (size) {
|
|
11
|
+
if (size === "large") return "3.429rem";
|
|
12
|
+
if (size === "medium") return "2.286rem";
|
|
13
|
+
if (size === "small") return "1.714rem";
|
|
14
|
+
if (size === "xsmall") return "1.429rem";
|
|
15
|
+
}
|
|
16
|
+
return "3.429rem"
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const position = (size) => {
|
|
20
|
+
if (size) {
|
|
21
|
+
if (size === "large") return "2.286rem";
|
|
22
|
+
if (size === "medium") return "1.5rem";
|
|
23
|
+
if (size === "small") return "1rem";
|
|
24
|
+
if (size === "xsmall") return "0.714rem";
|
|
25
|
+
}
|
|
26
|
+
return "2.286rem"
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const ProfileImg = styled.img`
|
|
30
|
+
height: ${(props) => handleSize(props.size)};
|
|
31
|
+
width: ${(props) => handleSize(props.size)};
|
|
32
|
+
object-fit: contain;
|
|
33
|
+
border-radius: 50%;
|
|
34
|
+
display:flex;
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
const Profile = styled.div`
|
|
38
|
+
height: ${(props) => handleSize(props.size)};
|
|
39
|
+
width: ${(props) => handleSize(props.size)};
|
|
40
|
+
border-radius: 50%;
|
|
41
|
+
border: 1px solid ${BmBgLightBlue};
|
|
42
|
+
display:flex;
|
|
43
|
+
align-items:center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
position: relative;
|
|
46
|
+
background: ${BmSecondaryBlue12};
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
const Content = styled.div`
|
|
50
|
+
display:flex;
|
|
51
|
+
align-items:center;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
position: absolute;
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
const Dot = styled.img`
|
|
58
|
+
position: absolute;
|
|
59
|
+
left: ${(props) => position(props.size)};
|
|
60
|
+
bottom: 0rem;
|
|
61
|
+
object-fit: contain;
|
|
62
|
+
height: 1rem;
|
|
63
|
+
width: 1rem;
|
|
64
|
+
`;
|
|
65
|
+
|
|
66
|
+
export const BmProfileIcon = ({ img, content, channel, size, ...rest }) => {
|
|
67
|
+
return (
|
|
68
|
+
<>
|
|
69
|
+
<Profile size={size} {...rest}>
|
|
70
|
+
{content && !img && <Content>{content}</Content>}
|
|
71
|
+
{img && !content && <ProfileImg src={img} />}
|
|
72
|
+
{channel && channel === 'whatsapp' && <Dot size={size} src={wa} />}
|
|
73
|
+
{channel && channel === 'facebook' && <Dot size={size} src={fb} />}
|
|
74
|
+
{channel && channel === 'instagram' && <Dot size={size} src={insta} />}
|
|
75
|
+
</Profile>
|
|
76
|
+
</>
|
|
77
|
+
)
|
|
78
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* eslint-disable import/no-anonymous-default-export */
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BmProfileIcon } from "./ProfileIcon";
|
|
4
|
+
import beem from '../../assets/beem.jpeg';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
component: BmProfileIcon,
|
|
9
|
+
title: "components/ProfileIcon",
|
|
10
|
+
argTypes: {
|
|
11
|
+
size: {
|
|
12
|
+
options: ["xsmall", "small", "medium", "large"],
|
|
13
|
+
control: { type: "select" },
|
|
14
|
+
description: "Size of the profile",
|
|
15
|
+
defaultValue: { summary: "large" },
|
|
16
|
+
},
|
|
17
|
+
img: {
|
|
18
|
+
description: "Image to be displayed (will not be displayed if content is present)",
|
|
19
|
+
defaultValue: { summary: undefined },
|
|
20
|
+
},
|
|
21
|
+
content: {
|
|
22
|
+
description: "Content to be displayed (will not be displayed if image is present)",
|
|
23
|
+
defaultValue: { summary: undefined },
|
|
24
|
+
},
|
|
25
|
+
channel: {
|
|
26
|
+
options: ["whatsapp", "instagram", "facebook"],
|
|
27
|
+
control: { type: "select" },
|
|
28
|
+
description: "Profile badge",
|
|
29
|
+
defaultValue: { summary: undefined },
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const MainProfileIcon = (args) => <BmProfileIcon {...args} />;
|
|
35
|
+
|
|
36
|
+
export const Sample = MainProfileIcon.bind({});
|
|
37
|
+
Sample.args = {
|
|
38
|
+
channel: "whatsapp",
|
|
39
|
+
size: "large",
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const ImageProfile = MainProfileIcon.bind({});
|
|
43
|
+
ImageProfile.args = {
|
|
44
|
+
channel: "whatsapp",
|
|
45
|
+
size: "large",
|
|
46
|
+
img: beem,
|
|
47
|
+
content: undefined
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const ContentProfile = MainProfileIcon.bind({});
|
|
51
|
+
ContentProfile.args = {
|
|
52
|
+
channel: "whatsapp",
|
|
53
|
+
size: "large",
|
|
54
|
+
content: <h4>BC</h4>,
|
|
55
|
+
img: undefined
|
|
56
|
+
};
|
|
57
|
+
|
|
@@ -0,0 +1,181 @@
|
|
|
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
|
+
import "../src/lib/assets/css/sidebar.scss";
|
|
8
|
+
import image from "../src/lib/assets/chart-img.png";
|
|
9
|
+
|
|
10
|
+
const Chat = () => {
|
|
11
|
+
return (
|
|
12
|
+
<BmChat>
|
|
13
|
+
<BmChat.Body>
|
|
14
|
+
<BmChat.Details
|
|
15
|
+
state="inbound"
|
|
16
|
+
session="bot"
|
|
17
|
+
displayTime={<p>12:00pm</p>}
|
|
18
|
+
status="sent"
|
|
19
|
+
src={image}
|
|
20
|
+
fileName={<p>attachment.jpg</p>}
|
|
21
|
+
/>
|
|
22
|
+
<BmChat.Details
|
|
23
|
+
state="outbound"
|
|
24
|
+
session="bot"
|
|
25
|
+
displayTime={<p>12:00pm</p>}
|
|
26
|
+
status="sent"
|
|
27
|
+
// src={image}
|
|
28
|
+
// fileName={<p>attachment.jpg</p>}
|
|
29
|
+
>
|
|
30
|
+
<p>Technical No Signal - Ili kupata chaneli au chaneli zifunguke kwa wakati ukilipia kifurushi, hakikisha kwanza kama unapata signal vizuri kutoka kwenye dish kwa kutumia remote control.
|
|
31
|
+
Bonyeza MENU, Bonyeza OK kwenye SEARCH, Bonyeza OK kwenye TP LIST.
|
|
32
|
+
Angalia asilimia ya QUALITY pale chini.
|
|
33
|
+
Angalia Transponder zote, 001, 002, 003 na 004 zinatakiwa ziwe na QUALITY si pungufu ya asilimia 60%.
|
|
34
|
+
Au kama una aina nyingine ya kisimbuzi;
|
|
35
|
+
Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, Bonyeza OK kwenye AUTOMATIC SEARCH.
|
|
36
|
+
Shuka kwenye frequency na uangalie frequency zote kuanzia 11044, 10981, 11106 na 10971.
|
|
37
|
+
Au
|
|
38
|
+
Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, kwenye EUTELSAT 7C bonyeza kitufe cha KIJANI.
|
|
39
|
+
Angalia QUALITY kwenye frequency zote kuanzia 11044, 10981, 11106 na 10971.
|
|
40
|
+
Angalia asilimia ya QUALITY pale chini.
|
|
41
|
+
QUALITY inatakiwa isiwe pungufu ya asilimia 60%.
|
|
42
|
+
Je, kwako inasoma ngapi? Kama ipo chini ya 60%, wasiliana na aliyekufungia dish arekebishe.</p>
|
|
43
|
+
</BmChat.Details>
|
|
44
|
+
<BmChat.Details
|
|
45
|
+
state="inbound"
|
|
46
|
+
session="bot"
|
|
47
|
+
displayTime={<p>12:00pm</p>}
|
|
48
|
+
status="sent"
|
|
49
|
+
// src={image}
|
|
50
|
+
// fileName={<p>attachment.jpg</p>}
|
|
51
|
+
>
|
|
52
|
+
<p>Technical No Signal - Ili kupata chaneli au chaneli zifunguke kwa wakati ukilipia kifurushi, hakikisha kwanza kama unapata signal vizuri kutoka kwenye dish kwa kutumia remote control.
|
|
53
|
+
Bonyeza MENU, Bonyeza OK kwenye SEARCH, Bonyeza OK kwenye TP LIST.
|
|
54
|
+
Angalia asilimia ya QUALITY pale chini.
|
|
55
|
+
Angalia Transponder zote, 001, 002, 003 na 004 zinatakiwa ziwe na QUALITY si pungufu ya asilimia 60%.
|
|
56
|
+
Au kama una aina nyingine ya kisimbuzi;
|
|
57
|
+
Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, Bonyeza OK kwenye AUTOMATIC SEARCH.
|
|
58
|
+
Shuka kwenye frequency na uangalie frequency zote kuanzia 11044, 10981, 11106 na 10971.
|
|
59
|
+
Au
|
|
60
|
+
Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, kwenye EUTELSAT 7C bonyeza kitufe cha KIJANI.
|
|
61
|
+
Angalia QUALITY kwenye frequency zote kuanzia 11044, 10981, 11106 na 10971.
|
|
62
|
+
Angalia asilimia ya QUALITY pale chini.
|
|
63
|
+
QUALITY inatakiwa isiwe pungufu ya asilimia 60%.
|
|
64
|
+
Je, kwako inasoma ngapi? Kama ipo chini ya 60%, wasiliana na aliyekufungia dish arekebishe.</p>
|
|
65
|
+
</BmChat.Details>
|
|
66
|
+
<BmChat.Details
|
|
67
|
+
state="outbound"
|
|
68
|
+
session="live"
|
|
69
|
+
displayTime={<p>10:00am</p>}
|
|
70
|
+
status="failed"
|
|
71
|
+
// src={azam}
|
|
72
|
+
file={<p>fildjfdlkfjlkfdjfldjfldsjfldsje.jpg</p>}
|
|
73
|
+
>
|
|
74
|
+
<p>Hekkoi</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>
|
|
107
|
+
Habari! Mimi ni msaidizi wako binafsi Azam TV. Ningependa
|
|
108
|
+
nikusaidie, lakini tafadhali anza kwa kuchagua kati ya haya
|
|
109
|
+
nikuhudumie (Mfano chagua namba 2 kubadili kifurushi au 5 kwa msaada
|
|
110
|
+
zaidi). 1. Angalia Salio 2. Badilisha Kifurishi 3. Tuma Ujumbe
|
|
111
|
+
Kuwasha Kisimbuzi 4. Huduma za mteja mpya 5. Nahitaji msaada (Huduma
|
|
112
|
+
kwa mteja) 6. Change language 0. Au ungependa kutuuliza swali
|
|
113
|
+
lingine?
|
|
114
|
+
</p>
|
|
115
|
+
</BmChat.Details>{" "}
|
|
116
|
+
<BmChat.Details
|
|
117
|
+
state="outbound"
|
|
118
|
+
session="live"
|
|
119
|
+
displayTime={<p>10:00am</p>}
|
|
120
|
+
status="failed"
|
|
121
|
+
>
|
|
122
|
+
<p>Outbound</p>
|
|
123
|
+
</BmChat.Details>{" "}
|
|
124
|
+
<BmChat.Details
|
|
125
|
+
state="outbound"
|
|
126
|
+
session="live"
|
|
127
|
+
displayTime={<p>10:00am</p>}
|
|
128
|
+
status="failed"
|
|
129
|
+
>
|
|
130
|
+
<p>Outbound</p>
|
|
131
|
+
</BmChat.Details>{" "}
|
|
132
|
+
<BmChat.Details
|
|
133
|
+
state="outbound"
|
|
134
|
+
session="live"
|
|
135
|
+
displayTime={<p>10:00am</p>}
|
|
136
|
+
status="failed"
|
|
137
|
+
>
|
|
138
|
+
<p>Outbound</p>
|
|
139
|
+
</BmChat.Details>{" "}
|
|
140
|
+
<BmChat.Details
|
|
141
|
+
state="outbound"
|
|
142
|
+
session="live"
|
|
143
|
+
displayTime={<p>10:00am</p>}
|
|
144
|
+
status="failed"
|
|
145
|
+
>
|
|
146
|
+
<p>Outbound</p>
|
|
147
|
+
</BmChat.Details>{" "}
|
|
148
|
+
<BmChat.Details
|
|
149
|
+
state="outbound"
|
|
150
|
+
session="live"
|
|
151
|
+
displayTime={<p>10:00am</p>}
|
|
152
|
+
status="failed"
|
|
153
|
+
>
|
|
154
|
+
<p>Outbound</p>
|
|
155
|
+
</BmChat.Details>{" "}
|
|
156
|
+
<BmChat.Details
|
|
157
|
+
state="outbound"
|
|
158
|
+
session="live"
|
|
159
|
+
displayTime={<p>10:00am</p>}
|
|
160
|
+
status="failed"
|
|
161
|
+
>
|
|
162
|
+
<p>Outbound</p>
|
|
163
|
+
</BmChat.Details>
|
|
164
|
+
</BmChat.Body>
|
|
165
|
+
<BmChat.Footer style={{ justifyContent: "flex-start" }}>
|
|
166
|
+
<div class="chat-footer">
|
|
167
|
+
<BmIcons icon={<EmojiEmotionsIcon />} size="xlarge" />
|
|
168
|
+
</div>
|
|
169
|
+
<div class="chat-footer">
|
|
170
|
+
<BmIcons icon={<EmojiEmotionsIcon />} size="xlarge" />
|
|
171
|
+
<BmIcons icon={<AttachFile />} size="xlarge" />
|
|
172
|
+
<BmIcons icon={<QuickreplyIcon />} size="xlarge" />
|
|
173
|
+
<BmInput placeholder="Enter Message" style={{ flex: 1 }} />
|
|
174
|
+
<BmIcons icon={<SendIcon />} size="xlarge" />
|
|
175
|
+
</div>
|
|
176
|
+
</BmChat.Footer>
|
|
177
|
+
</BmChat>
|
|
178
|
+
);
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
export default Chat;
|
|
File without changes
|