beem-component 1.5.3 → 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.
Files changed (53) hide show
  1. package/dist/assets/fb.png +0 -0
  2. package/dist/assets/insta.png +0 -0
  3. package/dist/assets/wa.png +0 -0
  4. package/dist/components/ChatComponents/ChatBody/chatBody.js +1 -1
  5. package/dist/components/ChatComponents/ContactCards/contactCards.stories.js +1 -1
  6. package/dist/components/Lists/listBox.js +13 -3
  7. package/dist/components/Modals/modal.js +7 -6
  8. package/dist/components/Modals/modals.stories.js +24 -2
  9. package/dist/components/ProfileIcon/ProfileIcon.js +97 -0
  10. package/dist/components/ProfileIcon/profileIcon.stories.js +82 -0
  11. package/dist/components/ScrollBar/scrollBar.js +44 -0
  12. package/dist/components/examples/App.js +137 -0
  13. package/dist/components/examples/InfoAccordion.js +24 -0
  14. package/dist/components/examples/chatBodyExample.js +72 -0
  15. package/dist/components/examples/selectExample.js +77 -0
  16. package/dist/components/globalStyles.js +1 -1
  17. package/dist/components/text.js +15 -6
  18. package/package.json +3 -2
  19. package/src/App.js +26 -14
  20. package/src/lib/assets/fb.png +0 -0
  21. package/src/lib/assets/insta.png +0 -0
  22. package/src/lib/assets/wa.png +0 -0
  23. package/src/lib/components/ChatComponents/ChatBody/chatBody.js +1 -1
  24. package/src/lib/components/ChatComponents/ContactCards/contactCards.stories.js +1 -1
  25. package/src/lib/components/Lists/listBox.js +2 -1
  26. package/src/lib/components/Modals/modal.js +11 -3
  27. package/src/lib/components/Modals/modals.stories.js +25 -0
  28. package/src/lib/components/ProfileIcon/ProfileIcon.js +78 -0
  29. package/src/lib/components/ProfileIcon/profileIcon.stories.js +57 -0
  30. package/src/lib/components/ScrollBar/scrollBar.js +26 -0
  31. package/src/{Chat.js → lib/components/examples/App.js} +1 -2
  32. package/src/{InfoAccordion.js → lib/components/examples/InfoAccordion.js} +0 -0
  33. package/src/lib/components/examples/chatBodyExample.js +75 -0
  34. package/src/{App copy.js → lib/components/examples/selectExample.js} +0 -0
  35. package/src/lib/components/globalStyles.js +3 -1
  36. package/src/lib/components/text.js +16 -2
  37. package/dist/components/example.js +0 -47
  38. package/dist/components/sidebar.js +0 -32
  39. package/dist/components/tabs.js +0 -106
  40. package/dist/components/tags.js +0 -100
  41. package/dist/images/azam.png +0 -0
  42. package/dist/images/azam1.png +0 -0
  43. package/src/ChatHeader.js +0 -22
  44. package/src/CustomerInfo.js +0 -46
  45. package/src/MainChat.js +0 -41
  46. package/src/SideBar.js +0 -81
  47. package/src/lib/components/example.js +0 -30
  48. package/src/lib/components/sidebar.js +0 -33
  49. package/src/lib/components/tabs.js +0 -123
  50. package/src/lib/components/tags.js +0 -101
  51. package/src/lib/images/azam.png +0 -0
  52. package/src/lib/images/azam1.png +0 -0
  53. package/src/list.scss +0 -4
@@ -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;
@@ -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;
@@ -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;
Binary file
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;
@@ -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
- `;
@@ -1,123 +0,0 @@
1
- import React from "react";
2
- import styled from "styled-components";
3
- import {
4
- BmGrey400,
5
- BmPrimaryBlack,
6
- BmPrimaryBlue,
7
- BmPrimaryWhite,
8
- } from "./colors";
9
- import { BmButtonIcon } from "./iconStyles";
10
-
11
- export const BmTabItem = styled.div`
12
- display: flex;
13
- flex-direction: row;
14
- align-items: center;
15
- justify-content: space-around;
16
- padding: 0rem !important;
17
- flex-wrap: wrap;
18
- `;
19
-
20
- export const BmTabWrapper = styled.button`
21
- display: flex;
22
- flex-direction: row;
23
- justify-content: center;
24
- align-items: center;
25
- padding: 0.714rem 1.714rem;
26
- background: ${BmPrimaryWhite};
27
- box-shadow: inset 0rem -0.214rem 0rem ${({ state }) => {
28
- if (state === "active") return `${BmPrimaryBlue}`;
29
- if (state === "active") return `${BmPrimaryBlue}`;
30
- if (state === "disabled") return "transparent";
31
- return "transparent";
32
- }};
33
- &:hover {
34
- box-shadow: inset 0rem -0.214rem 0rem ${({ state }) => {
35
- if (state === "disabled") return "transparent";
36
- return `${BmGrey400}`;
37
- }};
38
- }
39
- border: none;
40
- `;
41
-
42
- export const BmTabText = styled.h3`
43
- letter-spacing: -0.02em;
44
- color: ${({ state, color }) => {
45
- if (state === "disabled") return `${BmGrey400}`;
46
- if (color && state !== "disabled") return color;
47
- return `${BmPrimaryBlack}`;
48
- }};
49
- flex: none;
50
- order: 0;
51
- flex-grow: 0;
52
- `;
53
-
54
- export const BmLeftTabIcon = styled.div`
55
- padding-right: 0.714rem !important;
56
- `;
57
-
58
- export const BmRightTabIcon = styled.div`
59
- padding-left: 0.714rem !important;
60
- `;
61
-
62
- export const BmTab = (props) => {
63
- const {
64
- variant,
65
- size,
66
- disabled,
67
- children,
68
- leadingIcon,
69
- trailingIcon,
70
- color,
71
- state,
72
- ...rest
73
- } = props;
74
- const IconColor =
75
- state === "disabled"
76
- ? `${BmGrey400}`
77
- : color && state !== "disabled"
78
- ? color
79
- : `${BmPrimaryBlack}`;
80
- return (
81
- <BmTabWrapper
82
- size={size}
83
- variant={variant}
84
- disabled={state === "disabled" ? true : false}
85
- state={state}
86
- {...rest}
87
- >
88
- {leadingIcon && (
89
- <BmLeftTabIcon>
90
- <BmButtonIcon
91
- icon={leadingIcon}
92
- disabled={state === "disabled" ? true : false}
93
- variant={variant}
94
- size={size}
95
- state={state}
96
- color={IconColor}
97
- />
98
- </BmLeftTabIcon>
99
- )}
100
- <BmTabText
101
- disabled={state === "disabled" ? true : false}
102
- variant={variant}
103
- size={size}
104
- state={state}
105
- color={color}
106
- >
107
- {children}
108
- </BmTabText>
109
- {trailingIcon && (
110
- <BmRightTabIcon>
111
- <BmButtonIcon
112
- icon={trailingIcon}
113
- disabled={state === "disabled" ? true : false}
114
- state={state}
115
- variant={variant}
116
- size={size}
117
- color={IconColor}
118
- />
119
- </BmRightTabIcon>
120
- )}
121
- </BmTabWrapper>
122
- );
123
- };