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.
Files changed (46) hide show
  1. package/dist/assets/css/sidebar.css +68 -0
  2. package/dist/components/Buttons/buttonIconsOnly.js +1 -1
  3. package/dist/components/Buttons/buttons.js +1 -1
  4. package/dist/components/Cards/cards.js +1 -1
  5. package/dist/components/ChatBody/chatBody.js +6 -4
  6. package/dist/components/ChatHeader/chatHeader.js +4 -3
  7. package/dist/components/Chats/chat.js +2 -2
  8. package/dist/components/Chats/chatInput.js +1 -1
  9. package/dist/components/ContactCards/contactCards.js +1 -1
  10. package/dist/components/InfoTab/infoTab.js +4 -3
  11. package/dist/components/Lists/listBox.js +1 -1
  12. package/dist/components/Tags/tags.js +116 -0
  13. package/dist/components/Tags/tags.stories.js +62 -0
  14. package/dist/components/dropdown.js +1 -1
  15. package/dist/components/dropdownItems.js +1 -1
  16. package/dist/components/index.js +8 -0
  17. package/dist/components/input.js +1 -1
  18. package/dist/components/search.js +1 -1
  19. package/dist/components/tags.js +3 -3
  20. package/package.json +1 -1
  21. package/src/App.js +25 -81
  22. package/src/Chat.js +120 -0
  23. package/src/ChatHeader.js +19 -0
  24. package/src/CustomerInfo.js +46 -0
  25. package/src/SideBar.js +80 -0
  26. package/src/lib/assets/css/sidebar.css +68 -0
  27. package/src/lib/components/Buttons/buttonIconsOnly.js +1 -1
  28. package/src/lib/components/Buttons/buttons.js +1 -1
  29. package/src/lib/components/Cards/cards.js +1 -1
  30. package/src/lib/components/ChatBody/chatBody.js +5 -1
  31. package/src/lib/components/ChatBody/chatBody.stories.js +27 -27
  32. package/src/lib/components/ChatHeader/chatHeader.js +2 -2
  33. package/src/lib/components/Chats/chat.js +2 -2
  34. package/src/lib/components/Chats/chatInput.js +1 -1
  35. package/src/lib/components/ContactCards/contactCards.js +1 -0
  36. package/src/lib/components/InfoTab/infoTab.js +2 -2
  37. package/src/lib/components/Lists/listBox.js +1 -1
  38. package/src/lib/components/Tags/tags.js +109 -0
  39. package/src/lib/components/Tags/tags.stories.js +37 -0
  40. package/src/lib/components/dropdown.js +1 -1
  41. package/src/lib/components/dropdownItems.js +1 -1
  42. package/src/lib/components/index.js +3 -1
  43. package/src/lib/components/input.js +1 -1
  44. package/src/lib/components/search.js +1 -1
  45. package/src/lib/components/tags.js +4 -4
  46. package/storybook-static/main.3c8d8027.iframe.bundle.js +1 -1
@@ -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
  }
@@ -29,7 +29,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
29
29
 
30
30
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
31
31
 
32
- var BeemButtonIcon = _styledComponents.default.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n background: ", ";\n border: 0.071rem solid\n ", ";\n box-sizing: border-box;\n border-radius: 0.21875rem;\n padding: 0rem;\n"])), function (_ref) {
32
+ var BeemButtonIcon = _styledComponents.default.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n background: ", ";\n border: 0.071rem solid\n ", ";\n box-sizing: border-box;\n border-radius: 0.25rem;\n padding: 0rem;\n"])), function (_ref) {
33
33
  var variant = _ref.variant,
34
34
  disabled = _ref.disabled;
35
35
 
@@ -56,7 +56,7 @@ var ButtonText = _styledComponents.default.div(_templateObject || (_templateObje
56
56
  }
57
57
  });
58
58
 
59
- var BeemButton = _styledComponents.default.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n border-radius: 0.21875rem;\n padding: ", ";\n background: ", ";\n\n border: 0.071rem solid\n ", ";\n\n &:hover {\n background: ", ";\n border: 0.071rem solid\n ", ";\n }\n &:active {\n background: ", ";\n box-shadow: ", ";\n border: 0.071rem solid\n ", ";\n }\n\n &:hover ", " {\n color: ", ";\n }\n &:active ", " {\n color: ", ";\n }\n"])), function (_ref3) {
59
+ var BeemButton = _styledComponents.default.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n border-radius: 0.25rem;\n padding: ", ";\n background: ", ";\n\n border: 0.071rem solid\n ", ";\n\n &:hover {\n background: ", ";\n border: 0.071rem solid\n ", ";\n }\n &:active {\n background: ", ";\n box-shadow: ", ";\n border: 0.071rem solid\n ", ";\n }\n\n &:hover ", " {\n color: ", ";\n }\n &:active ", " {\n color: ", ";\n }\n"])), function (_ref3) {
60
60
  var size = _ref3.size;
61
61
  if (size === "large") return "0.625rem 1.5rem";
62
62
  if (size === "medium") return "0.4375rem 1rem";
@@ -15,7 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
15
15
 
16
16
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
17
17
 
18
- var BmCard = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n background: ", ";\n border: 0.071rem solid ", ";\n border-radius: 0.21875rem;\n"])), _colors.BmPrimaryWhite, _colors.BmGrey400);
18
+ var BmCard = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n background: ", ";\n border: 0.071rem solid ", ";\n border-radius: 0.25rem;\n"])), _colors.BmPrimaryWhite, _colors.BmGrey400);
19
19
 
20
20
  BmCard.Header = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 1rem 1rem 0rem 1rem;\n"])));
21
21
  BmCard.Body = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-top: 0.5rem;\n margin-bottom: 1rem;\n padding: 0rem 1rem;\n"])));
@@ -31,13 +31,13 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
31
31
 
32
32
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
33
33
 
34
- var BmChat = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n"])), ""
34
+ var BmChat = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n height: 100%;\n ", "\n"])), ""
35
35
  /* border: 0.071rem solid ${BmGrey400}; */
36
36
  );
37
37
 
38
- BmChat.Body = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 0rem 1.5rem;\n"])));
38
+ BmChat.Body = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 0rem 1.5rem;\n flex-grow: 1;\n overflow: auto;\n"])));
39
39
 
40
- var Details = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n ", "\n justify-content: ", ";\n > *:not(:last-child) {\n margin-right: 1rem;\n }\n overflow-wrap: break-word !important;\n word-wrap: break-word !important;\n margin: 0rem;\n"])), ""
40
+ var Details = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n ", "\n justify-content: ", ";\n > *:not(:last-child) {\n margin-right: 1rem;\n }\n overflow-wrap: break-word !important;\n word-wrap: break-word !important;\n margin: 0rem;\n flex-grow: 1;\n"])), ""
41
41
  /* align-items: center; */
42
42
  , function (_ref) {
43
43
  var state = _ref.state;
@@ -133,6 +133,8 @@ BmChat.Details = function (_ref6) {
133
133
  }));
134
134
  };
135
135
 
136
- BmChat.Footer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n border-top: 0.071rem solid ", ";\n padding: 0.5rem 0rem;\n align-items: center;\n justify-content: center;\n background: ", ";\n > *:not(:last-child) {\n margin-right: 0.5rem;\n }\n"])), _colors.BmGrey400, _colors.BmGrey50);
136
+ BmChat.Footer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n border-top: 0.071rem solid ", ";\n padding: 0.5rem 0rem;\n align-items: center;\n justify-content: center;\n ", "\n > *:not(:last-child) {\n margin-right: 0.5rem;\n }\n"])), _colors.BmGrey400, ''
137
+ /* background: ${BmGrey50}; */
138
+ );
137
139
  var _default = BmChat;
138
140
  exports.default = _default;
@@ -7,14 +7,15 @@ exports.BmChatHeader = void 0;
7
7
 
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
 
10
- var _colors = require("../colors");
11
-
12
10
  var _templateObject;
13
11
 
14
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
13
 
16
14
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
17
15
 
18
- var BmChatHeader = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n border: 0.071rem solid ", ";\n padding: 1rem;\n > *:not(:last-child) {\n margin-right: 0.5rem;\n }\n button {\n margin-left: auto;\n }\n"])), _colors.BmGrey400);
16
+ // import { BmGrey400 } from "../colors";
17
+ var BmChatHeader = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n ", "\n padding: 1rem;\n > *:not(:last-child) {\n margin-right: 0.5rem;\n }\n button {\n margin-left: auto;\n }\n"])), ''
18
+ /* border: 0.071rem solid ${BmGrey400}; */
19
+ );
19
20
 
20
21
  exports.BmChatHeader = BmChatHeader;
@@ -31,7 +31,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
31
31
 
32
32
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
33
33
 
34
- var BmChatWrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 1.143rem;\n background: ", ";\n border: 0.071rem solid ", ";\n border-radius: 0.21875rem 0.21875rem 0.21875rem 0rem;\n max-width: 50%;\n overflow-wrap: break-word !important;\n word-wrap: break-word !important;\n margin: 0rem;\n"])), function (_ref) {
34
+ var BmChatWrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 1.143rem;\n background: ", ";\n border: 0.071rem solid ", ";\n border-radius: 0.25rem 0.21875rem 0.21875rem 0rem;\n max-width: 50%;\n overflow-wrap: break-word !important;\n word-wrap: break-word !important;\n margin: 0rem;\n"])), function (_ref) {
35
35
  var type = _ref.type;
36
36
 
37
37
  if (type) {
@@ -150,7 +150,7 @@ var BmFileChat = function BmFileChat(_ref7) {
150
150
 
151
151
  exports.BmFileChat = BmFileChat;
152
152
 
153
- var BmImageWrapper = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background: ", ";\n border: 0.071rem solid ", ";\n border-radius: 0.21875rem 0.21875rem 0rem 0.21875rem;\n display: flex;\n flex-direction: column;\n max-width: 50%;\n max-height: 50%;\n"])), _colors.BmGrey100, _colors.BmGrey400);
153
+ var BmImageWrapper = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background: ", ";\n border: 0.071rem solid ", ";\n border-radius: 0.25rem 0.21875rem 0rem 0.21875rem;\n display: flex;\n flex-direction: column;\n max-width: 50%;\n max-height: 50%;\n"])), _colors.BmGrey100, _colors.BmGrey400);
154
154
 
155
155
  exports.BmImageWrapper = BmImageWrapper;
156
156
 
@@ -49,5 +49,5 @@ exports.BmSend = BmSend;
49
49
  var BmAttachment = (0, _styledComponents.default)("div")(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n justify-content: center;\n padding-right: 1.143rem !important;\n"]))); // Div for message input
50
50
 
51
51
  exports.BmAttachment = BmAttachment;
52
- var BmMessage = (0, _styledComponents.default)("div")(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0.714rem 1.143rem !important;\n background: ", ";\n border: 0.071rem solid ", ";\n box-sizing: border-box;\n border-radius: 0.21875rem;\n flex-grow: 1;\n max-width: 75%;\n"])), _colors.BmPrimaryWhite, _colors.BmGrey400);
52
+ var BmMessage = (0, _styledComponents.default)("div")(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0.714rem 1.143rem !important;\n background: ", ";\n border: 0.071rem solid ", ";\n box-sizing: border-box;\n border-radius: 0.25rem;\n flex-grow: 1;\n max-width: 75%;\n"])), _colors.BmPrimaryWhite, _colors.BmGrey400);
53
53
  exports.BmMessage = BmMessage;
@@ -15,7 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
15
15
 
16
16
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
17
17
 
18
- var BmContactCard = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n > *:not(:last-child) {\n margin-right: 1rem;\n }\n &:hover {\n background: ", ";\n }\n\n ", "\n cursor: pointer;\n"])), _colors.BmGrey100, function (_ref) {
18
+ var BmContactCard = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n > *:not(:last-child) {\n margin-right: 1rem;\n }\n &:hover {\n background: ", ";\n }\n\n ", "\n cursor: pointer;\n padding: 1rem 1.5rem;\n"])), _colors.BmGrey100, function (_ref) {
19
19
  var active = _ref.active;
20
20
  return active && " \n background: ".concat(_colors.BmGrey100, ";\n ");
21
21
  });
@@ -7,15 +7,16 @@ exports.default = void 0;
7
7
 
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
 
10
- var _colors = require("../colors");
11
-
12
10
  var _templateObject, _templateObject2, _templateObject3;
13
11
 
14
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
13
 
16
14
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
17
15
 
18
- var BmInfoTab = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 1.5rem;\n border: 0.071rem solid ", ";\n > *:not(:last-child) {\n margin-bottom: 1rem;\n }\n"])), _colors.BmGrey400);
16
+ // import { BmGrey400 } from "../colors";
17
+ var BmInfoTab = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 1.5rem;\n ", "\n > *:not(:last-child) {\n margin-bottom: 1rem;\n }\n"])), ''
18
+ /* border: 0.071rem solid ${BmGrey400}; */
19
+ );
19
20
 
20
21
  BmInfoTab.Content = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n"])));
21
22
  BmInfoTab.Tabs = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n >*:not(:first-child) {\n margin-top: 0.5rem;\n }\n"])));
@@ -31,7 +31,7 @@ var show = function show(isOpen) {
31
31
  return "flex";
32
32
  };
33
33
 
34
- var BmListBox = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", ";\n flex-direction: column;\n padding: 0.286rem 0rem;\n background: ", ";\n border: 0.071rem solid ", ";\n box-shadow: 0rem 0.286rem 0.286rem rgba(0, 0, 0, 0.25);\n border-radius: 0.21875rem;\n z-index: 99999;\n cursor: pointer;\n"])), function (props) {
34
+ var BmListBox = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", ";\n flex-direction: column;\n padding: 0.286rem 0rem;\n background: ", ";\n border: 0.071rem solid ", ";\n box-shadow: 0rem 0.286rem 0.286rem rgba(0, 0, 0, 0.25);\n border-radius: 0.25rem;\n z-index: 99999;\n cursor: pointer;\n"])), function (props) {
35
35
  return show(props.isOpen);
36
36
  }, _colors.BmPrimaryWhite, _colors.BmGrey400);
37
37
 
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BmTag = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
11
+
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
+
14
+ var _iconStyles = require("../iconStyles");
15
+
16
+ var _colors = require("../../components/colors");
17
+
18
+ var _excluded = ["variant", "size", "disabled", "children", "leadingIcon", "trailingIcon", "color"];
19
+
20
+ var _templateObject;
21
+
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
+
24
+ function _extends() { _extends = Object.assign || 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); }
25
+
26
+ 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; }
27
+
28
+ 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; }
29
+
30
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
31
+
32
+ var Color = function Color(_ref) {
33
+ var variant = _ref.variant,
34
+ color = _ref.color;
35
+
36
+ if (variant === "success" || variant === "warning" || variant === "danger") {
37
+ return "".concat(_colors.BmPrimaryWhite);
38
+ }
39
+
40
+ if (!variant && color) {
41
+ return color;
42
+ }
43
+
44
+ return "".concat(_colors.BmPrimaryBlack);
45
+ };
46
+
47
+ var BeemTag = _styledComponents.default.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 0.214rem 0.571rem;\n border-radius: 0.25rem;\n background: ", ";\n border: 0.071rem solid\n ", ";\n > * {\n color: ", ";\n text-transform: uppercase;\n }\n\n > *:not(:last-child) {\n margin-right: 0.5rem;\n }\n"])), function (_ref2) {
48
+ var variant = _ref2.variant;
49
+ if (variant === "neutral") return "".concat(_colors.BmGrey100);
50
+ if (variant === "success") return "".concat(_colors.BmSecondaryDarkGreen);
51
+ if (variant === "warning") return "".concat(_colors.BmPrimaryGold);
52
+ if (variant === "danger") return "".concat(_colors.BmSecondaryRed);
53
+ if (variant === "light") return "".concat(_colors.BmPrimaryWhite);
54
+ if (!variant) return "".concat(_colors.BmGrey100);
55
+ }, function (_ref3) {
56
+ var variant = _ref3.variant;
57
+ if (variant === "neutral") return "".concat(_colors.BmGrey100);
58
+ if (variant === "success") return "".concat(_colors.BmSecondaryDarkGreen);
59
+ if (variant === "warning") return "".concat(_colors.BmPrimaryGold);
60
+ if (variant === "danger") return "".concat(_colors.BmSecondaryRed);
61
+ if (variant === "light") return "".concat(_colors.BmGrey400);
62
+ return "".concat(_colors.BmGrey100);
63
+ }, function (_ref4) {
64
+ var variant = _ref4.variant,
65
+ color = _ref4.color;
66
+ return Color({
67
+ variant: variant,
68
+ color: color
69
+ });
70
+ });
71
+
72
+ var BmTag = function BmTag(props) {
73
+ var variant = props.variant,
74
+ size = props.size,
75
+ disabled = props.disabled,
76
+ children = props.children,
77
+ leadingIcon = props.leadingIcon,
78
+ trailingIcon = props.trailingIcon,
79
+ color = props.color,
80
+ rest = _objectWithoutProperties(props, _excluded);
81
+
82
+ return /*#__PURE__*/_react.default.createElement(BeemTag, _extends({
83
+ size: size,
84
+ variant: variant,
85
+ disabled: disabled,
86
+ children: children,
87
+ color: color
88
+ }, rest), leadingIcon && /*#__PURE__*/_react.default.createElement(_iconStyles.BmIcons, {
89
+ disabled: disabled,
90
+ icon: leadingIcon,
91
+ variant: variant,
92
+ color: Color({
93
+ color: color,
94
+ variant: variant
95
+ }),
96
+ size: size || 'small'
97
+ }), children, trailingIcon && /*#__PURE__*/_react.default.createElement(_iconStyles.BmIcons, {
98
+ icon: trailingIcon,
99
+ disabled: disabled,
100
+ color: Color({
101
+ color: color,
102
+ variant: variant
103
+ }),
104
+ size: size || 'small'
105
+ }));
106
+ };
107
+
108
+ exports.BmTag = BmTag;
109
+ BmTag.propTypes = {
110
+ children: _propTypes.default.object,
111
+ trailingIcon: _propTypes.default.node,
112
+ leadingIcon: _propTypes.default.node,
113
+ color: _propTypes.default.string,
114
+ size: _propTypes.default.string,
115
+ variant: _propTypes.default.string
116
+ };
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.Tabs = void 0;
7
+
8
+ var _icons = require("@material-ui/icons");
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _tags = require("./tags");
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+
16
+ /* eslint-disable import/no-anonymous-default-export */
17
+ var _default = {
18
+ component: _tags.BmTag,
19
+ title: "components/Tags",
20
+ argTypes: {
21
+ color: {
22
+ control: {
23
+ type: "text"
24
+ },
25
+ description: "Color of the Icons and Text, will work only if variant is not present"
26
+ },
27
+ size: {
28
+ options: ["xsmall", "small", "medium", "large", "xlarge"],
29
+ control: {
30
+ type: "select"
31
+ },
32
+ description: "Size of the icons",
33
+ defaultValue: {
34
+ summary: "small"
35
+ }
36
+ },
37
+ variant: {
38
+ options: ["success", "warning", "danger", "light", "neutral", undefined],
39
+ control: {
40
+ type: "select"
41
+ },
42
+ description: "Type of tag",
43
+ defaultValue: {
44
+ summary: "neutral"
45
+ }
46
+ }
47
+ }
48
+ };
49
+ exports.default = _default;
50
+
51
+ var MainTab = function MainTab(args) {
52
+ return /*#__PURE__*/_react.default.createElement(_tags.BmTag, args);
53
+ };
54
+
55
+ var Tabs = MainTab.bind({});
56
+ exports.Tabs = Tabs;
57
+ Tabs.args = {
58
+ children: /*#__PURE__*/_react.default.createElement("p", null, "Tabs"),
59
+ leadingIcon: /*#__PURE__*/_react.default.createElement(_icons.Favorite, null),
60
+ trailingIcon: /*#__PURE__*/_react.default.createElement(_icons.Favorite, null),
61
+ variant: 'success'
62
+ };
@@ -39,7 +39,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
39
39
 
40
40
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
41
41
 
42
- var BmDropdownWrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: static;\n ", "\n margin: 0rem;\n padding: 0.5rem 1.143rem;\n background: ", ";\n border: 0.071rem solid ", ";\n border-radius: 0.21875rem;\n ", "\n"])), ""
42
+ var BmDropdownWrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: static;\n ", "\n margin: 0rem;\n padding: 0.5rem 1.143rem;\n background: ", ";\n border: 0.071rem solid ", ";\n border-radius: 0.25rem;\n ", "\n"])), ""
43
43
  /* box-sizing: border-box; */
44
44
  , _colors.BmPrimaryWhite, _colors.BmGrey400, ''
45
45
  /* box-shadow: inset 0.071rem 0rem 0rem #afafaf; */
@@ -29,7 +29,7 @@ var BmCustomizedDropdown = _styledComponents.default.div(_templateObject || (_te
29
29
 
30
30
  exports.BmCustomizedDropdown = BmCustomizedDropdown;
31
31
 
32
- var BmButtonDropdownItem = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n display: ", "};\n flex-direction: column;\n ", "\n padding: 0.286rem 0rem;\n background: ", ";\n border: 0.071rem solid ", ";\n box-shadow: 0rem 0.286rem 0.286rem rgba(0, 0, 0, 0.25);\n border-radius: 0.21875rem;\n z-index: 99999;\n position: absolute;\n cursor: pointer;\n width: 100%;\n"])), ""
32
+ var BmButtonDropdownItem = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n display: ", "};\n flex-direction: column;\n ", "\n padding: 0.286rem 0rem;\n background: ", ";\n border: 0.071rem solid ", ";\n box-shadow: 0rem 0.286rem 0.286rem rgba(0, 0, 0, 0.25);\n border-radius: 0.25rem;\n z-index: 99999;\n position: absolute;\n cursor: pointer;\n width: 100%;\n"])), ""
33
33
  /* display: inline-block; */
34
34
  , function (_ref) {
35
35
  var isOpen = _ref.isOpen;
@@ -180,6 +180,12 @@ Object.defineProperty(exports, "BmTab", {
180
180
  return _tabs.BmTab;
181
181
  }
182
182
  });
183
+ Object.defineProperty(exports, "BmTag", {
184
+ enumerable: true,
185
+ get: function get() {
186
+ return _tags.BmTag;
187
+ }
188
+ });
183
189
  Object.defineProperty(exports, "BmTagIcon", {
184
190
  enumerable: true,
185
191
  get: function get() {
@@ -245,6 +251,8 @@ var _loader = require("./Loader/loader");
245
251
 
246
252
  var _checkbox = require("./checkbox");
247
253
 
254
+ var _tags = require("../components/Tags/tags");
255
+
248
256
  var _iconStyles = require("./iconStyles");
249
257
 
250
258
  var _noteBar = require("./NoteBar/noteBar");
@@ -68,7 +68,7 @@ var BmInputField = _styledComponents.default.input(_templateObject2 || (_templat
68
68
 
69
69
  exports.BmInputField = BmInputField;
70
70
 
71
- var BmInputWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: center;\n align-items: center;\n height: 2.929rem;\n border-radius: 0.21875rem;\n padding: 0rem;\n background: ", ";\n\n border: ", ";\n &:visited,\n &:active,\n &:hover,\n &:focus {\n border: 0.071rem solid ", ";\n }\n"])), function (_ref4) {
71
+ var BmInputWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: center;\n align-items: center;\n height: 2.929rem;\n border-radius: 0.25rem;\n padding: 0rem;\n background: ", ";\n\n border: ", ";\n &:visited,\n &:active,\n &:hover,\n &:focus {\n border: 0.071rem solid ", ";\n }\n"])), function (_ref4) {
72
72
  var state = _ref4.state;
73
73
 
74
74
  if (state) {
@@ -33,7 +33,7 @@ var BmSearchField = _styledComponents.default.input(_templateObject || (_templat
33
33
  return props.dropdown === "yes" && "margin-right: 1.714rem;";
34
34
  });
35
35
 
36
- var BmSearchWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n background: ", ";\n border: 0.071rem solid ", ";\n box-sizing: border-box;\n border-radius: 0.21875rem;\n ", "\n padding: ", ";\n"])), _colors.BmPrimaryWhite, _colors.BmGrey400, ""
36
+ var BmSearchWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n background: ", ";\n border: 0.071rem solid ", ";\n box-sizing: border-box;\n border-radius: 0.25rem;\n ", "\n padding: ", ";\n"])), _colors.BmPrimaryWhite, _colors.BmGrey400, ""
37
37
  /* height: 2.929rem; */
38
38
  , function (_ref) {
39
39
  var dropdown = _ref.dropdown;
@@ -9,9 +9,9 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _styledComponents = _interopRequireDefault(require("styled-components"));
11
11
 
12
- var _colors = require("./colors");
12
+ var _colors = require("../components/colors");
13
13
 
14
- var _iconStyles = require("./iconStyles");
14
+ var _iconStyles = require("../components/iconStyles");
15
15
 
16
16
  var _excluded = ["variant", "size", "disabled", "children", "leadingIcon", "trailingIcon"];
17
17
 
@@ -27,7 +27,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
27
27
 
28
28
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
29
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.21875rem;\n height: ", ";\n padding: ", ";\n background: ", ";\n border: 0.071rem solid\n ", ";\n border-radius: 0.21875rem;\n"])), function (_ref) {
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
31
  var size = _ref.size;
32
32
  if (size === "small") return "1.286rem";
33
33
  if (size === "default") return "1.714rem";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beem-component",
3
- "version": "1.0.7",
3
+ "version": "1.1.1",
4
4
  "private": false,
5
5
  "main": "dist/components/index.js",
6
6
  "scripts": {
package/src/App.js CHANGED
@@ -1,94 +1,38 @@
1
- import React, { useState } from "react";
1
+ import React from "react";
2
2
  import "../src/main.scss";
3
- import { BmAvatar, BmInput, BmTab, MainWrapper } from "./lib/components";
3
+ import { MainWrapper } from "./lib/components";
4
4
  import { GlobalStyle } from "./lib/components/globalStyles";
5
- import { BmSideBar } from "./lib/components/sidebar";
6
5
  import "./lib/assets/css/sidebar.css";
7
- import BmChat from "./lib/components/ChatBody/chatBody";
8
- import { DoneAll, Home, MoreVert, Person, Phone } from "@material-ui/icons";
9
- import { BmIcons } from "./lib/components/iconStyles";
10
- import EmojiEmotionsIcon from "@mui/icons-material/EmojiEmotions";
11
- import AttachFileIcon from "@mui/icons-material/AttachFile";
12
- import QuickreplyIcon from "@mui/icons-material/Quickreply";
13
- import SendIcon from "@mui/icons-material/Send";
14
- import BmInfoTab from "./lib/components/InfoTab/infoTab";
15
- import { BmButton } from "./lib/components/Buttons/buttons";
16
- import {
17
- BmCustomizedDropdown,
18
- BmDropDownMenu,
19
- BmDropDownItem,
20
- BmButtonDropdownItem,
21
- } from "./lib/components/dropdownItems";
22
-
23
- import { BmButtonDropDown } from "./lib/components/dropdownButton";
24
- import { BmListBox } from "./lib/components/Lists/listBox";
25
- import { BmRowLabel } from "./lib/components/Lists/rowLabels";
6
+ import SideBar from "./SideBar";
7
+ import ChatHeader from "./ChatHeader";
8
+ import Chat from "./Chat";
9
+ import CustomerInfo from "./CustomerInfo";
10
+ import { BmTag } from "./lib/components/Tags/tags";
11
+ import { Home } from "@material-ui/icons";
26
12
 
27
13
  export const App = () => {
28
- const [dropDownItem, setDropdownItem] = useState(false);
29
-
30
14
  return (
31
15
  <>
32
16
  <GlobalStyle />
33
17
  <MainWrapper>
34
- <BmSideBar>
35
- <div className="main-sidebar-tabs">
36
- <BmTab state="active" className="sidebar-tabs">
37
- <h3>Tabs</h3>
38
- </BmTab>
39
- <BmTab state="inactive" className="sidebar-tabs">
40
- <h3>Tabs</h3>
41
- </BmTab>
42
- </div>
43
- </BmSideBar>
18
+ <BmTag leadingIcon={<Home/>} trailingIcon={<Home/>}><p>Hello</p></BmTag>
44
19
 
45
- <BmChat>
46
- <BmChat.Body>
47
- <BmChat.Details
48
- state="inbound"
49
- session="bot"
50
- displayTime={<p>12:00pm</p>}
51
- status="sent"
52
- >
53
- <p>Inbound</p>
54
- </BmChat.Details>
55
- <BmChat.Details
56
- state="outbound"
57
- session="live"
58
- displayTime={<p>10:00am</p>}
59
- status="failed"
60
- >
61
- <p>Outbound</p>
62
- </BmChat.Details>
63
- </BmChat.Body>
64
- <BmChat.Footer>
65
- <BmIcons icon={<EmojiEmotionsIcon />} size="xlarge" />
66
- <BmIcons icon={<AttachFileIcon />} size="xlarge" />
67
- <BmIcons icon={<QuickreplyIcon />} size="xlarge" />
68
- <BmInput placeholder="Enter Message" />
69
- <BmIcons icon={<SendIcon />} size="xlarge" />
70
- </BmChat.Footer>
71
- </BmChat>
72
- {/* <BmCustomizedDropdown> */}
73
- <BmButton>Create Ticket</BmButton>
74
- <BmButtonDropDown
75
- size="medium"
76
- onClick={() => {
77
- setDropdownItem(!dropDownItem);
78
- }}
79
- variant="primary"
80
- >
81
- Session
82
- </BmButtonDropDown>
83
- <BmListBox isOpen={dropDownItem}>
84
- <BmRowLabel trailingIcon={<Person />} size="large">
85
- <h4>Row Label</h4>
86
- </BmRowLabel>
87
- <BmRowLabel size="large">
88
- <h4>Row Label</h4>
89
- </BmRowLabel>
90
- </BmListBox>
91
- {/* </BmCustomizedDropdown> */}
20
+ <div className="main-chat-container">
21
+ <div className="sidebar">
22
+ <SideBar />
23
+ </div>
24
+ <div className="chat">
25
+ <ChatHeader />
26
+ <div className="chat-menu">
27
+ <div className="chat-messages">
28
+ <Chat />
29
+ </div>
30
+ <div className="chat-contact-info">
31
+ <CustomerInfo />
32
+ </div>
33
+ </div>
34
+ </div>
35
+ </div>
92
36
  </MainWrapper>
93
37
  </>
94
38
  );