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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import { GlobalStyle, BmChat } from "
|
|
2
|
+
import { GlobalStyle, BmChat } from "..";
|
|
3
3
|
import "./list.scss";
|
|
4
|
-
import { ScrollbarWrapper } from "
|
|
4
|
+
import { ScrollbarWrapper } from "../ScrollBar/scrollBar";
|
|
5
5
|
|
|
6
6
|
const App = () => {
|
|
7
7
|
return (
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createGlobalStyle } from "styled-components";
|
|
2
|
-
import { h1, h2, h3, h4, p, input, a } from "./text";
|
|
2
|
+
import { h1, h2, h3, h4, h5, h6, p, input, a } from "./text";
|
|
3
3
|
|
|
4
4
|
export const GlobalStyle = createGlobalStyle`
|
|
5
5
|
* { font-size: 14px; cursor: pointer}
|
|
@@ -7,10 +7,9 @@ export const GlobalStyle = createGlobalStyle`
|
|
|
7
7
|
h2 { ${h2} }
|
|
8
8
|
h3 { ${h3} }
|
|
9
9
|
h4 { ${h4} }
|
|
10
|
+
h5 { ${h5} }
|
|
11
|
+
h6 { ${h6} }
|
|
10
12
|
p { ${p} }
|
|
11
13
|
input {${input}}
|
|
12
14
|
a {${a}}
|
|
13
|
-
::-webkit-scrollbar-thumb: {
|
|
14
|
-
background:red;
|
|
15
|
-
maxHeight: '10px'}
|
|
16
15
|
`;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { PoppinsMedium, OpenSans } from "./typography";
|
|
2
2
|
|
|
3
|
+
// 32px
|
|
3
4
|
export const h1 = `font-family: ${PoppinsMedium};
|
|
4
5
|
font-style: normal;
|
|
5
6
|
font-weight: 500;
|
|
6
|
-
font-size: 2.
|
|
7
|
+
font-size: 2.286rem;
|
|
7
8
|
letter-spacing: -0.02rem;
|
|
8
9
|
margin: 0rem;`;
|
|
9
10
|
|
|
11
|
+
// 24px
|
|
10
12
|
export const h2 = `font-family: ${PoppinsMedium};
|
|
11
13
|
font-style: normal;
|
|
12
14
|
font-weight: 500;
|
|
@@ -14,6 +16,7 @@ font-size: 1.714rem;
|
|
|
14
16
|
letter-spacing: -0.02em;
|
|
15
17
|
margin: 0rem;`;
|
|
16
18
|
|
|
19
|
+
// 18px
|
|
17
20
|
export const h3 = `font-family: ${PoppinsMedium};
|
|
18
21
|
font-style: normal;
|
|
19
22
|
font-weight: 500;
|
|
@@ -21,13 +24,15 @@ font-size: 1.286rem;
|
|
|
21
24
|
letter-spacing: -0.02rem;
|
|
22
25
|
margin: 0rem;`;
|
|
23
26
|
|
|
27
|
+
// 16px
|
|
24
28
|
export const h4 = ` font-family: ${PoppinsMedium};
|
|
25
29
|
font-style: normal;
|
|
26
30
|
font-weight: 500;
|
|
27
|
-
font-size:
|
|
31
|
+
font-size: 1.143rem;
|
|
28
32
|
letter-spacing: -0.02rem;
|
|
29
33
|
margin: 0rem;`;
|
|
30
34
|
|
|
35
|
+
// 14px
|
|
31
36
|
export const h5 = ` font-family: ${PoppinsMedium};
|
|
32
37
|
font-style: normal;
|
|
33
38
|
font-weight: 500;
|
|
@@ -35,6 +40,15 @@ font-size: 1rem;
|
|
|
35
40
|
letter-spacing: -0.02rem;
|
|
36
41
|
margin: 0rem;`;
|
|
37
42
|
|
|
43
|
+
// 12px
|
|
44
|
+
export const h6 = ` font-family: ${PoppinsMedium};
|
|
45
|
+
font-style: normal;
|
|
46
|
+
font-weight: 500;
|
|
47
|
+
font-size: 0.857rem;
|
|
48
|
+
letter-spacing: -0.02rem;
|
|
49
|
+
margin: 0rem;`;
|
|
50
|
+
|
|
51
|
+
// 14px
|
|
38
52
|
export const p = `font-family: ${OpenSans};
|
|
39
53
|
font-style: normal;
|
|
40
54
|
font-weight: normal;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _excluded = ["variant"];
|
|
4
|
-
|
|
5
|
-
var _variantStyles;
|
|
6
|
-
|
|
7
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
8
|
-
|
|
9
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10
|
-
|
|
11
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
|
-
|
|
13
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
-
|
|
15
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
16
|
-
|
|
17
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
-
|
|
19
|
-
var btnVariants = {
|
|
20
|
-
primary: "primary",
|
|
21
|
-
danger: "danger",
|
|
22
|
-
tertiary: "tertiary"
|
|
23
|
-
}; // Variant styles
|
|
24
|
-
|
|
25
|
-
var variantStyles = (_variantStyles = {}, _defineProperty(_variantStyles, btnVariants.primary, {
|
|
26
|
-
background: "#1890ff"
|
|
27
|
-
}), _defineProperty(_variantStyles, btnVariants.danger, {
|
|
28
|
-
background: "#f81d22"
|
|
29
|
-
}), _defineProperty(_variantStyles, btnVariants.tertiary, {
|
|
30
|
-
background: "#fff",
|
|
31
|
-
color: "#000"
|
|
32
|
-
}), _variantStyles);
|
|
33
|
-
|
|
34
|
-
function BaseButton(_ref) {
|
|
35
|
-
var variant = _ref.variant,
|
|
36
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
37
|
-
|
|
38
|
-
var btnStyle = _objectSpread({
|
|
39
|
-
color: "#fff",
|
|
40
|
-
border: "none",
|
|
41
|
-
padding: "5px 10px"
|
|
42
|
-
}, variantStyles[variant]);
|
|
43
|
-
|
|
44
|
-
return /*#__PURE__*/React.createElement("button", _extends({}, props, {
|
|
45
|
-
style: btnStyle
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.BmSideBarTab = exports.BmSideBarSearch = exports.BmSideBarBtnIcon = exports.BmSideBar = void 0;
|
|
7
|
-
|
|
8
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
|
|
10
|
-
var _buttonIconsOnly = require("../components/Buttons/buttonIconsOnly");
|
|
11
|
-
|
|
12
|
-
var _colors = require("./colors");
|
|
13
|
-
|
|
14
|
-
var _tabs = require("./tabs");
|
|
15
|
-
|
|
16
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
21
|
-
|
|
22
|
-
var BmSideBar = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n background: ", ";\n border: 0.071rem solid ", ";\n max-height: 100%;\n height: 100%;\n overflow: auto;\n max-width: 20%;\n width: 20%;\n"])), _colors.BmPrimaryWhite, _colors.BmGrey400);
|
|
23
|
-
|
|
24
|
-
exports.BmSideBar = BmSideBar;
|
|
25
|
-
|
|
26
|
-
var BmSideBarSearch = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: flex-start;\n align-items: center;\n padding: 1.714rem !important;\n flex-wrap: wrap;\n"])));
|
|
27
|
-
|
|
28
|
-
exports.BmSideBarSearch = BmSideBarSearch;
|
|
29
|
-
var BmSideBarBtnIcon = (0, _styledComponents.default)(_buttonIconsOnly.BmBtnIcon)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: 0.571rem;\n"])));
|
|
30
|
-
exports.BmSideBarBtnIcon = BmSideBarBtnIcon;
|
|
31
|
-
var BmSideBarTab = (0, _styledComponents.default)(_tabs.BmTab)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 50%;\n padding: 1.714rem;\n"])));
|
|
32
|
-
exports.BmSideBarTab = BmSideBarTab;
|
package/dist/components/tabs.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.BmTabWrapper = exports.BmTabText = exports.BmTabItem = exports.BmTab = exports.BmRightTabIcon = exports.BmLeftTabIcon = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
-
|
|
12
|
-
var _colors = require("./colors");
|
|
13
|
-
|
|
14
|
-
var _iconStyles = require("./iconStyles");
|
|
15
|
-
|
|
16
|
-
var _excluded = ["variant", "size", "disabled", "children", "leadingIcon", "trailingIcon", "color", "state"];
|
|
17
|
-
|
|
18
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
19
|
-
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
-
|
|
24
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
25
|
-
|
|
26
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
27
|
-
|
|
28
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
29
|
-
|
|
30
|
-
var BmTabItem = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-around;\n padding: 0rem !important;\n flex-wrap: wrap;\n"])));
|
|
31
|
-
|
|
32
|
-
exports.BmTabItem = BmTabItem;
|
|
33
|
-
|
|
34
|
-
var BmTabWrapper = _styledComponents.default.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 0.714rem 1.714rem;\n background: ", ";\n box-shadow: inset 0rem -0.214rem 0rem ", ";\n &:hover {\n box-shadow: inset 0rem -0.214rem 0rem ", ";\n }\n border: none;\n"])), _colors.BmPrimaryWhite, function (_ref) {
|
|
35
|
-
var state = _ref.state;
|
|
36
|
-
if (state === "active") return "".concat(_colors.BmPrimaryBlue);
|
|
37
|
-
if (state === "active") return "".concat(_colors.BmPrimaryBlue);
|
|
38
|
-
if (state === "disabled") return "transparent";
|
|
39
|
-
return "transparent";
|
|
40
|
-
}, function (_ref2) {
|
|
41
|
-
var state = _ref2.state;
|
|
42
|
-
if (state === "disabled") return "transparent";
|
|
43
|
-
return "".concat(_colors.BmGrey400);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
exports.BmTabWrapper = BmTabWrapper;
|
|
47
|
-
|
|
48
|
-
var BmTabText = _styledComponents.default.h3(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n letter-spacing: -0.02em;\n color: ", ";\n flex: none;\n order: 0;\n flex-grow: 0;\n"])), function (_ref3) {
|
|
49
|
-
var state = _ref3.state,
|
|
50
|
-
color = _ref3.color;
|
|
51
|
-
if (state === "disabled") return "".concat(_colors.BmGrey400);
|
|
52
|
-
if (color && state !== "disabled") return color;
|
|
53
|
-
return "".concat(_colors.BmPrimaryBlack);
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
exports.BmTabText = BmTabText;
|
|
57
|
-
|
|
58
|
-
var BmLeftTabIcon = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding-right: 0.714rem !important;\n"])));
|
|
59
|
-
|
|
60
|
-
exports.BmLeftTabIcon = BmLeftTabIcon;
|
|
61
|
-
|
|
62
|
-
var BmRightTabIcon = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-left: 0.714rem !important;\n"])));
|
|
63
|
-
|
|
64
|
-
exports.BmRightTabIcon = BmRightTabIcon;
|
|
65
|
-
|
|
66
|
-
var BmTab = function BmTab(props) {
|
|
67
|
-
var variant = props.variant,
|
|
68
|
-
size = props.size,
|
|
69
|
-
disabled = props.disabled,
|
|
70
|
-
children = props.children,
|
|
71
|
-
leadingIcon = props.leadingIcon,
|
|
72
|
-
trailingIcon = props.trailingIcon,
|
|
73
|
-
color = props.color,
|
|
74
|
-
state = props.state,
|
|
75
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
76
|
-
|
|
77
|
-
var IconColor = state === "disabled" ? "".concat(_colors.BmGrey400) : color && state !== "disabled" ? color : "".concat(_colors.BmPrimaryBlack);
|
|
78
|
-
return /*#__PURE__*/_react.default.createElement(BmTabWrapper, _extends({
|
|
79
|
-
size: size,
|
|
80
|
-
variant: variant,
|
|
81
|
-
disabled: state === "disabled" ? true : false,
|
|
82
|
-
state: state
|
|
83
|
-
}, rest), leadingIcon && /*#__PURE__*/_react.default.createElement(BmLeftTabIcon, null, /*#__PURE__*/_react.default.createElement(_iconStyles.BmButtonIcon, {
|
|
84
|
-
icon: leadingIcon,
|
|
85
|
-
disabled: state === "disabled" ? true : false,
|
|
86
|
-
variant: variant,
|
|
87
|
-
size: size,
|
|
88
|
-
state: state,
|
|
89
|
-
color: IconColor
|
|
90
|
-
})), /*#__PURE__*/_react.default.createElement(BmTabText, {
|
|
91
|
-
disabled: state === "disabled" ? true : false,
|
|
92
|
-
variant: variant,
|
|
93
|
-
size: size,
|
|
94
|
-
state: state,
|
|
95
|
-
color: color
|
|
96
|
-
}, children), trailingIcon && /*#__PURE__*/_react.default.createElement(BmRightTabIcon, null, /*#__PURE__*/_react.default.createElement(_iconStyles.BmButtonIcon, {
|
|
97
|
-
icon: trailingIcon,
|
|
98
|
-
disabled: state === "disabled" ? true : false,
|
|
99
|
-
state: state,
|
|
100
|
-
variant: variant,
|
|
101
|
-
size: size,
|
|
102
|
-
color: IconColor
|
|
103
|
-
})));
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
exports.BmTab = BmTab;
|
package/dist/components/tags.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.BmTag = exports.BmRightIcon = exports.BmLeftIcon = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
-
|
|
12
|
-
var _colors = require("../components/colors");
|
|
13
|
-
|
|
14
|
-
var _iconStyles = require("../components/iconStyles");
|
|
15
|
-
|
|
16
|
-
var _excluded = ["variant", "size", "disabled", "children", "leadingIcon", "trailingIcon"];
|
|
17
|
-
|
|
18
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
19
|
-
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
-
|
|
24
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
25
|
-
|
|
26
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
27
|
-
|
|
28
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
29
|
-
|
|
30
|
-
var BeemTag = _styledComponents.default.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n border-radius: 0.25rem;\n height: ", ";\n padding: ", ";\n background: ", ";\n border: 0.071rem solid\n ", ";\n border-radius: 0.25rem;\n"])), function (_ref) {
|
|
31
|
-
var size = _ref.size;
|
|
32
|
-
if (size === "small") return "1.286rem";
|
|
33
|
-
if (size === "default") return "1.714rem";
|
|
34
|
-
return "1.714rem";
|
|
35
|
-
}, function (_ref2) {
|
|
36
|
-
var size = _ref2.size;
|
|
37
|
-
if (size === "small") return "0.071rem 0.571rem";
|
|
38
|
-
if (size === "default") return "0.214rem 0.571rem";
|
|
39
|
-
return "0.214rem 0.571rem";
|
|
40
|
-
}, function (_ref3) {
|
|
41
|
-
var variant = _ref3.variant;
|
|
42
|
-
if (variant === "neutral") return "".concat(_colors.BmGrey100);
|
|
43
|
-
if (variant === "success") return "".concat(_colors.BmSecondaryDarkGreen);
|
|
44
|
-
if (variant === "warning") return "".concat(_colors.BmPrimaryGold);
|
|
45
|
-
if (variant === "error") return "".concat(_colors.BmSecondaryRed);
|
|
46
|
-
if (variant === "light") return "".concat(_colors.BmPrimaryWhite);
|
|
47
|
-
if (variant === undefined) return "".concat(_colors.BmGrey100);
|
|
48
|
-
return variant;
|
|
49
|
-
}, function (_ref4) {
|
|
50
|
-
var variant = _ref4.variant;
|
|
51
|
-
if (variant === "neutral") return "".concat(_colors.BmGrey100);
|
|
52
|
-
if (variant === "success") return "".concat(_colors.BmSecondaryDarkGreen);
|
|
53
|
-
if (variant === "warning") return "".concat(_colors.BmPrimaryGold);
|
|
54
|
-
if (variant === "error") return "".concat(_colors.BmSecondaryRed);
|
|
55
|
-
if (variant === "light") return "".concat(_colors.BmGrey400);
|
|
56
|
-
return "".concat(_colors.BmGrey100);
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
var TagText = _styledComponents.default.p(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n text-transform: uppercase;\n"])), function (_ref5) {
|
|
60
|
-
var variant = _ref5.variant;
|
|
61
|
-
if (variant === "light" || variant === "neutral") return "".concat(_colors.BmPrimaryBlack);
|
|
62
|
-
return "".concat(_colors.BmPrimaryWhite);
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
var BmLeftIcon = (0, _styledComponents.default)(_iconStyles.BmTagIcon)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-right: 0.643rem;\n"])));
|
|
66
|
-
exports.BmLeftIcon = BmLeftIcon;
|
|
67
|
-
var BmRightIcon = (0, _styledComponents.default)(_iconStyles.BmTagIcon)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-left: 0.643rem;\n"])));
|
|
68
|
-
exports.BmRightIcon = BmRightIcon;
|
|
69
|
-
|
|
70
|
-
var BmTag = function BmTag(props) {
|
|
71
|
-
var variant = props.variant,
|
|
72
|
-
size = props.size,
|
|
73
|
-
disabled = props.disabled,
|
|
74
|
-
children = props.children,
|
|
75
|
-
leadingIcon = props.leadingIcon,
|
|
76
|
-
trailingIcon = props.trailingIcon,
|
|
77
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
78
|
-
|
|
79
|
-
return /*#__PURE__*/_react.default.createElement(BeemTag, _extends({
|
|
80
|
-
size: size,
|
|
81
|
-
variant: variant,
|
|
82
|
-
disabled: disabled
|
|
83
|
-
}, rest), leadingIcon && /*#__PURE__*/_react.default.createElement(BmLeftIcon, {
|
|
84
|
-
disabled: disabled,
|
|
85
|
-
icon: leadingIcon,
|
|
86
|
-
variant: variant,
|
|
87
|
-
size: size
|
|
88
|
-
}), /*#__PURE__*/_react.default.createElement(TagText, {
|
|
89
|
-
disabled: disabled,
|
|
90
|
-
variant: variant,
|
|
91
|
-
size: size
|
|
92
|
-
}, children), trailingIcon && /*#__PURE__*/_react.default.createElement(BmRightIcon, {
|
|
93
|
-
icon: trailingIcon,
|
|
94
|
-
disabled: disabled,
|
|
95
|
-
variant: variant,
|
|
96
|
-
size: size
|
|
97
|
-
}));
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
exports.BmTag = BmTag;
|
package/dist/images/azam.png
DELETED
|
Binary file
|
package/dist/images/azam1.png
DELETED
|
Binary file
|
package/src/ChatHeader.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { BmChatHeader, BmButton } from "../src/lib/components/";
|
|
3
|
-
import "../src/lib/assets/css/sidebar.scss";
|
|
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
|
-
<div className="chat-header-buttons">
|
|
13
|
-
<BmButton size="medium">End Session</BmButton>
|
|
14
|
-
<BmButton size="medium">End Session</BmButton>
|
|
15
|
-
</div>
|
|
16
|
-
</BmChatHeader>
|
|
17
|
-
</div>
|
|
18
|
-
</>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default ChatHeader;
|
package/src/CustomerInfo.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
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/MainChat.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "../src/main.scss";
|
|
3
|
-
import { MainWrapper } from "./lib/components";
|
|
4
|
-
import { GlobalStyle } from "./lib/components/globalStyles";
|
|
5
|
-
import "./lib/assets/css/sidebar.scss";
|
|
6
|
-
import SideBar from "./SideBar";
|
|
7
|
-
import ChatHeader from "./ChatHeader";
|
|
8
|
-
import Chat from "./Chat";
|
|
9
|
-
import CustomerInfo from "./CustomerInfo";
|
|
10
|
-
import InfoAccordion from "./InfoAccordion";
|
|
11
|
-
|
|
12
|
-
export const App = () => {
|
|
13
|
-
return (
|
|
14
|
-
<>
|
|
15
|
-
<GlobalStyle />
|
|
16
|
-
<MainWrapper>
|
|
17
|
-
<div className="main-chat-container">
|
|
18
|
-
<div className="chat-container">
|
|
19
|
-
<div className="sidebar">
|
|
20
|
-
<SideBar />
|
|
21
|
-
</div>
|
|
22
|
-
<div className="chat">
|
|
23
|
-
<ChatHeader />
|
|
24
|
-
<div className="chat-menu">
|
|
25
|
-
<div className="chat-messages">
|
|
26
|
-
<Chat />
|
|
27
|
-
</div>
|
|
28
|
-
<div className="chat-contact-info">
|
|
29
|
-
<CustomerInfo />
|
|
30
|
-
<InfoAccordion />
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</MainWrapper>
|
|
37
|
-
</>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export default App;
|
package/src/SideBar.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { BmTab } from "./lib/components/Tabs/tabs";
|
|
3
|
-
import { BmTag } from "./lib/components/Tags/tags";
|
|
4
|
-
import ForumIcon from "@material-ui/icons/Forum";
|
|
5
|
-
import { BmContactCard, BmAvatar, BmCounter } from "./lib/components";
|
|
6
|
-
|
|
7
|
-
const SideBar = () => {
|
|
8
|
-
return (
|
|
9
|
-
<>
|
|
10
|
-
<div className="main-sidebar-tabs">
|
|
11
|
-
<BmTab
|
|
12
|
-
state="active"
|
|
13
|
-
className="sidebar-tabs"
|
|
14
|
-
leadingIcon={<ForumIcon />}
|
|
15
|
-
>
|
|
16
|
-
<h3>Chats</h3>
|
|
17
|
-
</BmTab>
|
|
18
|
-
</div>
|
|
19
|
-
<div className="sidebar-contacts">
|
|
20
|
-
<BmContactCard>
|
|
21
|
-
<BmContactCard.Profile>
|
|
22
|
-
<BmAvatar user="employee" size="small" color="{$BmPrimaryBlack}" />
|
|
23
|
-
</BmContactCard.Profile>
|
|
24
|
-
<BmContactCard.Details>
|
|
25
|
-
<BmContactCard.SubDetails>
|
|
26
|
-
<h3>Contact Names</h3>
|
|
27
|
-
</BmContactCard.SubDetails>
|
|
28
|
-
<BmContactCard.SubDetails>
|
|
29
|
-
<p>Message text</p>
|
|
30
|
-
<BmCounter>10</BmCounter>
|
|
31
|
-
</BmContactCard.SubDetails>
|
|
32
|
-
<BmContactCard.SubDetails>
|
|
33
|
-
<BmTag variant="success">
|
|
34
|
-
<p>label</p>
|
|
35
|
-
</BmTag>
|
|
36
|
-
<p>10:00 am</p>
|
|
37
|
-
</BmContactCard.SubDetails>
|
|
38
|
-
</BmContactCard.Details>
|
|
39
|
-
</BmContactCard>
|
|
40
|
-
<BmContactCard>
|
|
41
|
-
<BmContactCard.Profile>
|
|
42
|
-
<BmAvatar user="employee" size="small" color="{$BmPrimaryBlack}" />
|
|
43
|
-
</BmContactCard.Profile>
|
|
44
|
-
<BmContactCard.Details>
|
|
45
|
-
<BmContactCard.SubDetails>
|
|
46
|
-
<h3>Contact Names</h3>
|
|
47
|
-
</BmContactCard.SubDetails>
|
|
48
|
-
<BmContactCard.SubDetails>
|
|
49
|
-
<p>Message text</p>
|
|
50
|
-
<BmCounter>10</BmCounter>
|
|
51
|
-
</BmContactCard.SubDetails>
|
|
52
|
-
<BmContactCard.SubDetails>
|
|
53
|
-
<BmTag variant="success">label</BmTag>
|
|
54
|
-
<p>10:00 am</p>
|
|
55
|
-
</BmContactCard.SubDetails>
|
|
56
|
-
</BmContactCard.Details>
|
|
57
|
-
</BmContactCard>
|
|
58
|
-
<BmContactCard>
|
|
59
|
-
<BmContactCard.Profile>
|
|
60
|
-
<BmAvatar user="employee" size="small" color="{$BmPrimaryBlack}" />
|
|
61
|
-
</BmContactCard.Profile>
|
|
62
|
-
<BmContactCard.Details>
|
|
63
|
-
<BmContactCard.SubDetails>
|
|
64
|
-
<h3>Contact Names</h3>
|
|
65
|
-
</BmContactCard.SubDetails>
|
|
66
|
-
<BmContactCard.SubDetails>
|
|
67
|
-
<p>Message text</p>
|
|
68
|
-
<BmCounter>10</BmCounter>
|
|
69
|
-
</BmContactCard.SubDetails>
|
|
70
|
-
<BmContactCard.SubDetails>
|
|
71
|
-
{/* <BmTag variant="success">label</BmTag> */}
|
|
72
|
-
<p>10:00 am</p>
|
|
73
|
-
</BmContactCard.SubDetails>
|
|
74
|
-
</BmContactCard.Details>
|
|
75
|
-
</BmContactCard>
|
|
76
|
-
</div>
|
|
77
|
-
</>
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export default SideBar;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
const btnVariants = {
|
|
2
|
-
primary: "primary",
|
|
3
|
-
danger: "danger",
|
|
4
|
-
tertiary: "tertiary",
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
// Variant styles
|
|
8
|
-
const variantStyles = {
|
|
9
|
-
[btnVariants.primary]: {
|
|
10
|
-
background: "#1890ff",
|
|
11
|
-
},
|
|
12
|
-
[btnVariants.danger]: {
|
|
13
|
-
background: "#f81d22",
|
|
14
|
-
},
|
|
15
|
-
[btnVariants.tertiary]: {
|
|
16
|
-
background: "#fff",
|
|
17
|
-
color: "#000",
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
function BaseButton({ variant, ...props }) {
|
|
22
|
-
const btnStyle = {
|
|
23
|
-
color: "#fff",
|
|
24
|
-
border: "none",
|
|
25
|
-
padding: "5px 10px",
|
|
26
|
-
...variantStyles[variant],
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
return <button {...props} style={btnStyle} />;
|
|
30
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import { BmBtnIcon } from "../components/Buttons/buttonIconsOnly";
|
|
3
|
-
import { BmGrey400, BmPrimaryWhite } from "./colors";
|
|
4
|
-
import { BmTab } from "./tabs";
|
|
5
|
-
|
|
6
|
-
export const BmSideBar = styled.div`
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
background: ${BmPrimaryWhite};
|
|
10
|
-
border: 0.071rem solid ${BmGrey400};
|
|
11
|
-
max-height: 100%;
|
|
12
|
-
height: 100%;
|
|
13
|
-
overflow: auto;
|
|
14
|
-
max-width: 20%;
|
|
15
|
-
width: 20%;
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
export const BmSideBarSearch = styled.div`
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: flex-start;
|
|
21
|
-
align-items: center;
|
|
22
|
-
padding: 1.714rem !important;
|
|
23
|
-
flex-wrap: wrap;
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
export const BmSideBarBtnIcon = styled(BmBtnIcon)`
|
|
27
|
-
margin-left: 0.571rem;
|
|
28
|
-
`;
|
|
29
|
-
|
|
30
|
-
export const BmSideBarTab = styled(BmTab)`
|
|
31
|
-
width: 50%;
|
|
32
|
-
padding: 1.714rem;
|
|
33
|
-
`;
|