beem-component 1.1.0 → 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 (33) hide show
  1. package/dist/components/Buttons/buttonIconsOnly.js +1 -1
  2. package/dist/components/Buttons/buttons.js +1 -1
  3. package/dist/components/Cards/cards.js +1 -1
  4. package/dist/components/Chats/chat.js +2 -2
  5. package/dist/components/Chats/chatInput.js +1 -1
  6. package/dist/components/Lists/listBox.js +1 -1
  7. package/dist/components/Tags/tags.js +116 -0
  8. package/dist/components/Tags/tags.stories.js +62 -0
  9. package/dist/components/dropdown.js +1 -1
  10. package/dist/components/dropdownItems.js +1 -1
  11. package/dist/components/index.js +1 -1
  12. package/dist/components/input.js +1 -1
  13. package/dist/components/search.js +1 -1
  14. package/dist/components/tags.js +3 -3
  15. package/package.json +1 -1
  16. package/src/App.js +4 -1
  17. package/src/ChatHeader.js +10 -7
  18. package/src/SideBar.js +5 -3
  19. package/src/lib/components/Buttons/buttonIconsOnly.js +1 -1
  20. package/src/lib/components/Buttons/buttons.js +1 -1
  21. package/src/lib/components/Cards/cards.js +1 -1
  22. package/src/lib/components/Chats/chat.js +2 -2
  23. package/src/lib/components/Chats/chatInput.js +1 -1
  24. package/src/lib/components/Lists/listBox.js +1 -1
  25. package/src/lib/components/Tags/tags.js +109 -0
  26. package/src/lib/components/Tags/tags.stories.js +37 -0
  27. package/src/lib/components/dropdown.js +1 -1
  28. package/src/lib/components/dropdownItems.js +1 -1
  29. package/src/lib/components/index.js +1 -1
  30. package/src/lib/components/input.js +1 -1
  31. package/src/lib/components/search.js +1 -1
  32. package/src/lib/components/tags.js +4 -4
  33. package/storybook-static/main.3c8d8027.iframe.bundle.js +1 -1
@@ -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,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;
@@ -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;
@@ -251,7 +251,7 @@ var _loader = require("./Loader/loader");
251
251
 
252
252
  var _checkbox = require("./checkbox");
253
253
 
254
- var _tags = require("./tags");
254
+ var _tags = require("../components/Tags/tags");
255
255
 
256
256
  var _iconStyles = require("./iconStyles");
257
257
 
@@ -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.1.0",
3
+ "version": "1.1.1",
4
4
  "private": false,
5
5
  "main": "dist/components/index.js",
6
6
  "scripts": {
package/src/App.js CHANGED
@@ -7,13 +7,16 @@ import SideBar from "./SideBar";
7
7
  import ChatHeader from "./ChatHeader";
8
8
  import Chat from "./Chat";
9
9
  import CustomerInfo from "./CustomerInfo";
10
+ import { BmTag } from "./lib/components/Tags/tags";
11
+ import { Home } from "@material-ui/icons";
10
12
 
11
13
  export const App = () => {
12
-
13
14
  return (
14
15
  <>
15
16
  <GlobalStyle />
16
17
  <MainWrapper>
18
+ <BmTag leadingIcon={<Home/>} trailingIcon={<Home/>}><p>Hello</p></BmTag>
19
+
17
20
  <div className="main-chat-container">
18
21
  <div className="sidebar">
19
22
  <SideBar />
package/src/ChatHeader.js CHANGED
@@ -1,14 +1,17 @@
1
1
  import React from "react";
2
- import { BmChatHeader, BmButton} from '../src/lib/components/';
2
+ import { BmChatHeader, BmButton } from "../src/lib/components/";
3
+ import '../src/lib/assets/css/sidebar.css';
3
4
 
4
- export const ChatHeader = ({ info }) => {
5
+ export const ChatHeader = () => {
5
6
  return (
6
7
  <>
7
- <BmChatHeader style={{ border: "1px solid #E2E2E2" }}>
8
- <h2>Contact Name</h2>
9
- <p>Last seen: 00:00</p>
10
- <BmButton size="medium">End Session</BmButton>
11
- </BmChatHeader>
8
+ <div className="chat-header">
9
+ <BmChatHeader>
10
+ <h2>Contact Name</h2>
11
+ <p>Last seen: 00:00</p>
12
+ <BmButton size="medium">End Session</BmButton>
13
+ </BmChatHeader>
14
+ </div>
12
15
  </>
13
16
  );
14
17
  };
package/src/SideBar.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { BmTab } from "./lib/components/Tabs/tabs";
3
- import ForumIcon from '@material-ui/icons/Forum';
3
+ import ForumIcon from "@material-ui/icons/Forum";
4
4
  import { BmContactCard, BmAvatar, BmCounter, BmTag } from "./lib/components";
5
5
 
6
6
  const SideBar = () => {
@@ -29,7 +29,9 @@ const SideBar = () => {
29
29
  <BmCounter>10</BmCounter>
30
30
  </BmContactCard.SubDetails>
31
31
  <BmContactCard.SubDetails>
32
- <BmTag variant="success">label</BmTag>
32
+ <BmTag variant="success">
33
+ <p>label</p>
34
+ </BmTag>
33
35
  <p>10:00 am</p>
34
36
  </BmContactCard.SubDetails>
35
37
  </BmContactCard.Details>
@@ -75,4 +77,4 @@ const SideBar = () => {
75
77
  );
76
78
  };
77
79
 
78
- export default SideBar;
80
+ export default SideBar;
@@ -50,7 +50,7 @@ const BeemButtonIcon = styled.button`
50
50
  }
51
51
  }};
52
52
  box-sizing: border-box;
53
- border-radius: 0.21875rem;
53
+ border-radius: 0.25rem;
54
54
  padding: 0rem;
55
55
  `;
56
56
 
@@ -47,7 +47,7 @@ const BeemButton = styled.button`
47
47
  flex-direction: row;
48
48
  justify-content: center;
49
49
  align-items: center;
50
- border-radius: 0.21875rem;
50
+ border-radius: 0.25rem;
51
51
  padding: ${({ size }) => {
52
52
  if (size === "large") return "0.625rem 1.5rem";
53
53
  if (size === "medium") return "0.4375rem 1rem";
@@ -6,7 +6,7 @@ const BmCard = styled.div`
6
6
  flex-direction: column;
7
7
  background: ${BmPrimaryWhite};
8
8
  border: 0.071rem solid ${BmGrey400};
9
- border-radius: 0.21875rem;
9
+ border-radius: 0.25rem;
10
10
  `;
11
11
 
12
12
  BmCard.Header = styled.div`
@@ -25,7 +25,7 @@ export const BmChatWrapper = styled.div`
25
25
  return `${BmPrimaryWhite}`;
26
26
  }};
27
27
  border: 0.071rem solid ${BmGrey400};
28
- border-radius: 0.21875rem 0.21875rem 0.21875rem 0rem;
28
+ border-radius: 0.25rem 0.21875rem 0.21875rem 0rem;
29
29
  max-width: 50%;
30
30
  overflow-wrap: break-word !important;
31
31
  word-wrap: break-word !important;
@@ -170,7 +170,7 @@ export const BmFileChat = ({ children, displayTime, type, ...rest }) => {
170
170
  export const BmImageWrapper = styled.div`
171
171
  background: ${BmGrey100};
172
172
  border: 0.071rem solid ${BmGrey400};
173
- border-radius: 0.21875rem 0.21875rem 0rem 0.21875rem;
173
+ border-radius: 0.25rem 0.21875rem 0rem 0.21875rem;
174
174
  display: flex;
175
175
  flex-direction: column;
176
176
  max-width: 50%;
@@ -63,7 +63,7 @@ export const BmMessage = styled("div")`
63
63
  background: ${BmPrimaryWhite};
64
64
  border: 0.071rem solid ${BmGrey400};
65
65
  box-sizing: border-box;
66
- border-radius: 0.21875rem;
66
+ border-radius: 0.25rem;
67
67
  flex-grow: 1;
68
68
  max-width: 75%;
69
69
  `;
@@ -24,7 +24,7 @@ export const BmListBox = styled.div`
24
24
  background: ${BmPrimaryWhite};
25
25
  border: 0.071rem solid ${BmGrey400};
26
26
  box-shadow: 0rem 0.286rem 0.286rem rgba(0, 0, 0, 0.25);
27
- border-radius: 0.21875rem;
27
+ border-radius: 0.25rem;
28
28
  z-index: 99999;
29
29
  cursor: pointer;
30
30
  `;
@@ -0,0 +1,109 @@
1
+ import React from "react";
2
+ import styled from "styled-components";
3
+ import PropTypes from "prop-types";
4
+ import { BmIcons } from "../iconStyles";
5
+ import {
6
+ BmPrimaryWhite,
7
+ BmSecondaryDarkGreen,
8
+ BmSecondaryRed,
9
+ BmPrimaryBlack,
10
+ BmGrey100,
11
+ BmGrey400,
12
+ BmPrimaryGold,
13
+ } from "../../components/colors";
14
+
15
+ const Color = ({ variant, color }) => {
16
+ if (variant === "success" || variant === "warning" || variant === "danger") {
17
+ return `${BmPrimaryWhite}`;
18
+ }
19
+ if (!variant && color) {
20
+ return color;
21
+ }
22
+ return `${BmPrimaryBlack}`;
23
+ };
24
+
25
+ const BeemTag = styled.button`
26
+ display: flex;
27
+ flex-direction: row;
28
+ justify-content: center;
29
+ align-items: center;
30
+ padding: 0.214rem 0.571rem;
31
+ border-radius: 0.25rem;
32
+ background: ${({ variant }) => {
33
+ if (variant === "neutral") return `${BmGrey100}`;
34
+ if (variant === "success") return `${BmSecondaryDarkGreen}`;
35
+ if (variant === "warning") return `${BmPrimaryGold}`;
36
+ if (variant === "danger") return `${BmSecondaryRed}`;
37
+ if (variant === "light") return `${BmPrimaryWhite}`;
38
+ if (!variant) return `${BmGrey100}`;
39
+ }};
40
+ border: 0.071rem solid
41
+ ${({ variant }) => {
42
+ if (variant === "neutral") return `${BmGrey100}`;
43
+ if (variant === "success") return `${BmSecondaryDarkGreen}`;
44
+ if (variant === "warning") return `${BmPrimaryGold}`;
45
+ if (variant === "danger") return `${BmSecondaryRed}`;
46
+ if (variant === "light") return `${BmGrey400}`;
47
+ return `${BmGrey100}`;
48
+ }};
49
+ > * {
50
+ color: ${({ variant, color }) => Color({ variant, color })};
51
+ text-transform: uppercase;
52
+ }
53
+
54
+ > *:not(:last-child) {
55
+ margin-right: 0.5rem;
56
+ }
57
+ `;
58
+
59
+ export const BmTag = (props) => {
60
+ const {
61
+ variant,
62
+ size,
63
+ disabled,
64
+ children,
65
+ leadingIcon,
66
+ trailingIcon,
67
+ color,
68
+ ...rest
69
+ } = props;
70
+
71
+ return (
72
+ <BeemTag
73
+ size={size}
74
+ variant={variant}
75
+ disabled={disabled}
76
+ children={children}
77
+ color={color}
78
+ {...rest}
79
+ >
80
+ {leadingIcon && (
81
+ <BmIcons
82
+ disabled={disabled}
83
+ icon={leadingIcon}
84
+ variant={variant}
85
+ color={Color({color, variant})}
86
+ size={size || 'small'}
87
+ />
88
+ )}
89
+ {children}
90
+ {trailingIcon && (
91
+ <BmIcons
92
+ icon={trailingIcon}
93
+ disabled={disabled}
94
+ color={Color({color, variant})}
95
+ size={size || 'small'}
96
+ />
97
+ )}
98
+ </BeemTag>
99
+ );
100
+ };
101
+
102
+ BmTag.propTypes = {
103
+ children: PropTypes.object,
104
+ trailingIcon: PropTypes.node,
105
+ leadingIcon: PropTypes.node,
106
+ color: PropTypes.string,
107
+ size: PropTypes.string,
108
+ variant: PropTypes.string,
109
+ };
@@ -0,0 +1,37 @@
1
+ /* eslint-disable import/no-anonymous-default-export */
2
+ import { Favorite, Home, KeyboardArrowDown } from "@material-ui/icons";
3
+ import React from "react";
4
+ import { BmTag } from "./tags";
5
+
6
+ export default {
7
+ component: BmTag,
8
+ title: "components/Tags",
9
+ argTypes: {
10
+ color: {
11
+ control: { type: "text" },
12
+ description: "Color of the Icons and Text, will work only if variant is not present",
13
+ },
14
+ size: {
15
+ options: ["xsmall", "small", "medium", "large", "xlarge"],
16
+ control: { type: "select" },
17
+ description: "Size of the icons",
18
+ defaultValue: { summary: "small" },
19
+ },
20
+ variant: {
21
+ options: ["success", "warning", "danger", "light", "neutral", undefined],
22
+ control: { type: "select" },
23
+ description: "Type of tag",
24
+ defaultValue: { summary: "neutral" },
25
+ },
26
+ },
27
+ };
28
+
29
+ const MainTab = (args) => <BmTag {...args} />;
30
+
31
+ export const Tabs = MainTab.bind({});
32
+ Tabs.args = {
33
+ children: <p>Tabs</p>,
34
+ leadingIcon: <Favorite />,
35
+ trailingIcon: <Favorite />,
36
+ variant: 'success',
37
+ };
@@ -13,7 +13,7 @@ const BmDropdownWrapper = styled.div`
13
13
  padding: 0.5rem 1.143rem;
14
14
  background: ${BmPrimaryWhite};
15
15
  border: 0.071rem solid ${BmGrey400};
16
- border-radius: 0.21875rem;
16
+ border-radius: 0.25rem;
17
17
  ${'' /* box-shadow: inset 0.071rem 0rem 0rem #afafaf; */}
18
18
  `;
19
19
 
@@ -17,7 +17,7 @@ export const BmButtonDropdownItem = styled.div`
17
17
  background: ${BmPrimaryWhite};
18
18
  border: 0.071rem solid ${BmGrey400};
19
19
  box-shadow: 0rem 0.286rem 0.286rem rgba(0, 0, 0, 0.25);
20
- border-radius: 0.21875rem;
20
+ border-radius: 0.25rem;
21
21
  z-index: 99999;
22
22
  position: absolute;
23
23
  cursor: pointer;