beem-component 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.js +3 -0
- package/dist/assets/css/sidebar.css +12 -0
- package/dist/components/Avatars/avatars.js +4 -3
- package/dist/components/Avatars/avatars.stories.js +3 -3
- package/dist/components/Buttons/buttonDropdown copy.js +158 -0
- package/dist/components/Buttons/buttonDropdown.js +30 -0
- package/dist/components/Buttons/buttonIconsOnly.js +1 -1
- package/dist/components/Buttons/buttons.js +1 -1
- package/dist/components/Cards/cards.js +5 -28
- package/dist/components/Cards/cards.stories.js +0 -4
- package/dist/components/ChatBody/chatBody.js +138 -0
- package/dist/components/ChatBody/chatBody.stories.js +65 -0
- package/dist/components/ChatHeader/chatHeader.js +20 -0
- package/dist/components/ChatHeader/chatHeader.stories.js +29 -0
- package/dist/components/ContactCards/contactCards.js +34 -0
- package/dist/components/ContactCards/contactCards.stories.js +41 -0
- package/dist/components/InfoTab/infoTab.js +23 -0
- package/dist/components/InfoTab/infoTab.stories.js +49 -0
- package/dist/components/MessageCounter/MessageCounter.stories.js +52 -0
- package/dist/components/MessageCounter/messageCounter.js +49 -0
- package/dist/components/{NoteBar.js → NoteBar}/noteBar.js +0 -0
- package/dist/components/{NoteBar.js → NoteBar}/noteBar.stories.js +0 -0
- package/dist/components/Tabs/tabs.js +1 -1
- package/dist/components/Tabs/tabs.stories.js +2 -1
- package/dist/components/index.js +43 -3
- package/dist/components/sidebar.js +2 -4
- package/package.json +1 -1
- package/src/App.js +83 -10
- package/src/lib/assets/css/sidebar.css +12 -0
- package/src/lib/components/Avatars/avatars.js +3 -1
- package/src/lib/components/Avatars/avatars.stories.js +1 -1
- package/src/lib/components/Buttons/buttonDropdown copy.js +147 -0
- package/src/lib/components/Buttons/buttonDropdown.js +13 -0
- package/src/lib/components/Buttons/buttonIconsOnly.js +1 -1
- package/src/lib/components/Buttons/buttons.js +4 -4
- package/src/lib/components/Cards/cards.js +6 -39
- package/src/lib/components/Cards/cards.stories.js +1 -3
- package/src/lib/components/ChatBody/chatBody.js +145 -0
- package/src/lib/components/ChatBody/chatBody.stories.js +48 -0
- package/src/lib/components/ChatHeader/chatHeader.js +16 -0
- package/src/lib/components/ChatHeader/chatHeader.stories.js +19 -0
- package/src/lib/components/ContactCards/contactCards.js +58 -0
- package/src/lib/components/ContactCards/contactCards.stories.js +34 -0
- package/src/lib/components/InfoTab/infoTab.js +28 -0
- package/src/lib/components/InfoTab/infoTab.stories.js +47 -0
- package/src/lib/components/MessageCounter/MessageCounter.stories.js +35 -0
- package/src/lib/components/MessageCounter/messageCounter.js +42 -0
- package/src/lib/components/{NoteBar.js → NoteBar}/noteBar.js +0 -0
- package/src/lib/components/{NoteBar.js → NoteBar}/noteBar.stories.js +0 -0
- package/src/lib/components/Tabs/tabs.js +1 -1
- package/src/lib/components/Tabs/tabs.stories.js +1 -0
- package/src/lib/components/iconStyles.js +1 -3
- package/src/lib/components/index.js +15 -2
- package/src/lib/components/sidebar.js +3 -3
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.ContactCard = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _contactCards = _interopRequireDefault(require("./contactCards"));
|
|
11
|
+
|
|
12
|
+
var _avatars = _interopRequireDefault(require("../Avatars/avatars"));
|
|
13
|
+
|
|
14
|
+
var _messageCounter = _interopRequireDefault(require("../MessageCounter/messageCounter"));
|
|
15
|
+
|
|
16
|
+
var _tags = require("../tags");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
/* eslint-disable import/no-anonymous-default-export */
|
|
21
|
+
var _default = {
|
|
22
|
+
component: {
|
|
23
|
+
BmContactCard: _contactCards.default,
|
|
24
|
+
BmAvatar: _avatars.default,
|
|
25
|
+
BmTag: _tags.BmTag,
|
|
26
|
+
BmCounter: _messageCounter.default
|
|
27
|
+
},
|
|
28
|
+
title: "components/ContactCard"
|
|
29
|
+
};
|
|
30
|
+
exports.default = _default;
|
|
31
|
+
|
|
32
|
+
var ContactCard = function ContactCard() {
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement(_contactCards.default, null, /*#__PURE__*/_react.default.createElement(_contactCards.default.Profile, null, /*#__PURE__*/_react.default.createElement(_avatars.default, {
|
|
34
|
+
user: "chatbot",
|
|
35
|
+
size: "medium"
|
|
36
|
+
})), /*#__PURE__*/_react.default.createElement(_contactCards.default.Details, null, /*#__PURE__*/_react.default.createElement(_contactCards.default.SubDetails, null, /*#__PURE__*/_react.default.createElement("h3", null, "Contact Names")), /*#__PURE__*/_react.default.createElement(_contactCards.default.SubDetails, null, /*#__PURE__*/_react.default.createElement("p", null, "Message text"), /*#__PURE__*/_react.default.createElement(_messageCounter.default, null, "10")), /*#__PURE__*/_react.default.createElement(_contactCards.default.SubDetails, null, /*#__PURE__*/_react.default.createElement(_tags.BmTag, {
|
|
37
|
+
variant: "success"
|
|
38
|
+
}, "label"), /*#__PURE__*/_react.default.createElement("p", null, "10:00 am"))));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
exports.ContactCard = ContactCard;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _colors = require("../colors");
|
|
11
|
+
|
|
12
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
17
|
+
|
|
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);
|
|
19
|
+
|
|
20
|
+
BmInfoTab.Content = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n"])));
|
|
21
|
+
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"])));
|
|
22
|
+
var _default = BmInfoTab;
|
|
23
|
+
exports.default = _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.InfoTab = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _infoTab = _interopRequireDefault(require("./infoTab"));
|
|
11
|
+
|
|
12
|
+
var _tags = require("../tags");
|
|
13
|
+
|
|
14
|
+
var _buttonIconsOnly = require("../Buttons/buttonIconsOnly");
|
|
15
|
+
|
|
16
|
+
var _icons = require("@material-ui/icons");
|
|
17
|
+
|
|
18
|
+
var _iconStyles = require("../iconStyles");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
/* eslint-disable import/no-anonymous-default-export */
|
|
23
|
+
var _default = {
|
|
24
|
+
component: _infoTab.default,
|
|
25
|
+
title: "components/InfoTab"
|
|
26
|
+
};
|
|
27
|
+
exports.default = _default;
|
|
28
|
+
|
|
29
|
+
var InfoTab = function InfoTab() {
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
31
|
+
style: {
|
|
32
|
+
maxWidth: "30%"
|
|
33
|
+
}
|
|
34
|
+
}, /*#__PURE__*/_react.default.createElement(_infoTab.default, null, /*#__PURE__*/_react.default.createElement(_infoTab.default.Content, null, /*#__PURE__*/_react.default.createElement("h2", null, "Contact Name"), /*#__PURE__*/_react.default.createElement(_iconStyles.BmIcons, {
|
|
35
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.MoreVert, null)
|
|
36
|
+
})), /*#__PURE__*/_react.default.createElement(_infoTab.default.Content, null, /*#__PURE__*/_react.default.createElement(_infoTab.default.Tabs, null, /*#__PURE__*/_react.default.createElement(_buttonIconsOnly.BmBtnIcon, {
|
|
37
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.Phone, null)
|
|
38
|
+
}), /*#__PURE__*/_react.default.createElement("h4", null, "Call")), /*#__PURE__*/_react.default.createElement(_infoTab.default.Tabs, null, /*#__PURE__*/_react.default.createElement(_buttonIconsOnly.BmBtnIcon, {
|
|
39
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.Phone, null)
|
|
40
|
+
}), /*#__PURE__*/_react.default.createElement("h4", null, "Call")), /*#__PURE__*/_react.default.createElement(_infoTab.default.Tabs, null, /*#__PURE__*/_react.default.createElement(_buttonIconsOnly.BmBtnIcon, {
|
|
41
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.Phone, null)
|
|
42
|
+
}), /*#__PURE__*/_react.default.createElement("h4", null, "Call")), /*#__PURE__*/_react.default.createElement(_infoTab.default.Tabs, null, /*#__PURE__*/_react.default.createElement(_buttonIconsOnly.BmBtnIcon, {
|
|
43
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.Phone, null)
|
|
44
|
+
}), /*#__PURE__*/_react.default.createElement("h4", null, "Call")), /*#__PURE__*/_react.default.createElement(_infoTab.default.Tabs, null, /*#__PURE__*/_react.default.createElement(_buttonIconsOnly.BmBtnIcon, {
|
|
45
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.Phone, null)
|
|
46
|
+
}), /*#__PURE__*/_react.default.createElement("h4", null, "Call")))));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
exports.InfoTab = InfoTab;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.MessageCounter = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _messageCounter = _interopRequireDefault(require("./messageCounter"));
|
|
11
|
+
|
|
12
|
+
var _addonKnobs = require("@storybook/addon-knobs");
|
|
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: _messageCounter.default,
|
|
19
|
+
title: "components/MessageCounter",
|
|
20
|
+
argTypes: {
|
|
21
|
+
size: {
|
|
22
|
+
options: ["small", "medium", "large"],
|
|
23
|
+
control: {
|
|
24
|
+
type: "select"
|
|
25
|
+
},
|
|
26
|
+
description: "Size of the counter (can also be custom example: 10px)",
|
|
27
|
+
defaultValue: {
|
|
28
|
+
summary: "small"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
children: {
|
|
32
|
+
description: "Counter Text",
|
|
33
|
+
defaultValue: {
|
|
34
|
+
summary: undefined
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
exports.default = _default;
|
|
40
|
+
var optionSize = {
|
|
41
|
+
small: "small",
|
|
42
|
+
medium: "medium",
|
|
43
|
+
large: "large"
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var MessageCounter = function MessageCounter() {
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_messageCounter.default, {
|
|
48
|
+
size: (0, _addonKnobs.select)("size", optionSize, "large")
|
|
49
|
+
}, (0, _addonKnobs.text)("children", "00"));
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
exports.MessageCounter = MessageCounter;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _colors = require("../colors");
|
|
13
|
+
|
|
14
|
+
var _text = require("../text");
|
|
15
|
+
|
|
16
|
+
var _templateObject;
|
|
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 BmCounter = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n color: ", ";\n width: ", ";\n height: ", ";\n ", "\n border-radius: 50%;\n text-align: center;\n background: ", ";\n"])), _colors.BmPrimaryWhite, function (_ref) {
|
|
23
|
+
var size = _ref.size;
|
|
24
|
+
if (size === "small") return "1.429rem";
|
|
25
|
+
if (size === "medium") return "1.714rem";
|
|
26
|
+
if (size === "large") return "2.286rem";
|
|
27
|
+
if (!size) return "1.429rem";
|
|
28
|
+
return size;
|
|
29
|
+
}, function (_ref2) {
|
|
30
|
+
var size = _ref2.size;
|
|
31
|
+
if (size === "small") return "1.429rem";
|
|
32
|
+
if (size === "medium") return "1.714rem";
|
|
33
|
+
if (size === "large") return "2.286rem";
|
|
34
|
+
if (!size) return "1.429rem";
|
|
35
|
+
return size;
|
|
36
|
+
}, function (_ref3) {
|
|
37
|
+
var size = _ref3.size;
|
|
38
|
+
if (size === "large") return "".concat(_text.h3);
|
|
39
|
+
if (size === "medium") return "".concat(_text.h4);
|
|
40
|
+
if (size === "small") return "".concat(_text.p);
|
|
41
|
+
return "".concat(_text.p);
|
|
42
|
+
}, _colors.BmPrimaryBlue);
|
|
43
|
+
|
|
44
|
+
BmCounter.propTypes = {
|
|
45
|
+
children: _propTypes.default.string,
|
|
46
|
+
size: _propTypes.default.string
|
|
47
|
+
};
|
|
48
|
+
var _default = BmCounter;
|
|
49
|
+
exports.default = _default;
|
|
File without changes
|
|
File without changes
|
|
@@ -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 BmTabWrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display:
|
|
32
|
+
var BmTabWrapper = _styledComponents.default.div(_templateObject || (_templateObject = _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: ", ";\n > *:not(:last-child) {\n margin-right: 0.5rem;\n }\n ", "\n"])), _colors.BmPrimaryWhite, function (_ref) {
|
|
33
33
|
var state = _ref.state;
|
|
34
34
|
|
|
35
35
|
if (state === "active") {
|
|
@@ -55,5 +55,6 @@ Tabs.args = {
|
|
|
55
55
|
children: /*#__PURE__*/_react.default.createElement("h3", null, "Tabs"),
|
|
56
56
|
leadingIcon: /*#__PURE__*/_react.default.createElement(_icons.Favorite, null),
|
|
57
57
|
trailingIcon: /*#__PURE__*/_react.default.createElement(_icons.KeyboardArrowDown, null),
|
|
58
|
-
disabled: false
|
|
58
|
+
disabled: false,
|
|
59
|
+
state: 'active'
|
|
59
60
|
};
|
package/dist/components/index.js
CHANGED
|
@@ -20,7 +20,7 @@ Object.defineProperty(exports, "BmAlertIcon", {
|
|
|
20
20
|
Object.defineProperty(exports, "BmAvatar", {
|
|
21
21
|
enumerable: true,
|
|
22
22
|
get: function get() {
|
|
23
|
-
return _avatars.
|
|
23
|
+
return _avatars.default;
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "BmAvatarIcon", {
|
|
@@ -53,6 +53,18 @@ Object.defineProperty(exports, "BmCard", {
|
|
|
53
53
|
return _cards.default;
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
+
Object.defineProperty(exports, "BmChat", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function get() {
|
|
59
|
+
return _chatBody.default;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "BmChatHeader", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function get() {
|
|
65
|
+
return _chatHeader.BmChatHeader;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
56
68
|
Object.defineProperty(exports, "BmChatbotIcon", {
|
|
57
69
|
enumerable: true,
|
|
58
70
|
get: function get() {
|
|
@@ -66,6 +78,18 @@ Object.defineProperty(exports, "BmCheckbox", {
|
|
|
66
78
|
}
|
|
67
79
|
});
|
|
68
80
|
exports.BmColors = void 0;
|
|
81
|
+
Object.defineProperty(exports, "BmContactCard", {
|
|
82
|
+
enumerable: true,
|
|
83
|
+
get: function get() {
|
|
84
|
+
return _contactCards.default;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(exports, "BmCounter", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function get() {
|
|
90
|
+
return _messageCounter.default;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
69
93
|
Object.defineProperty(exports, "BmEmojiIcon", {
|
|
70
94
|
enumerable: true,
|
|
71
95
|
get: function get() {
|
|
@@ -78,6 +102,12 @@ Object.defineProperty(exports, "BmIcons", {
|
|
|
78
102
|
return _iconStyles.BmIcons;
|
|
79
103
|
}
|
|
80
104
|
});
|
|
105
|
+
Object.defineProperty(exports, "BmInfoTab", {
|
|
106
|
+
enumerable: true,
|
|
107
|
+
get: function get() {
|
|
108
|
+
return _infoTab.default;
|
|
109
|
+
}
|
|
110
|
+
});
|
|
81
111
|
Object.defineProperty(exports, "BmInput", {
|
|
82
112
|
enumerable: true,
|
|
83
113
|
get: function get() {
|
|
@@ -171,7 +201,7 @@ Object.defineProperty(exports, "MainWrapper", {
|
|
|
171
201
|
|
|
172
202
|
var _Accordion = _interopRequireDefault(require("./Accordion/Accordion"));
|
|
173
203
|
|
|
174
|
-
var _avatars = require("./Avatars/avatars");
|
|
204
|
+
var _avatars = _interopRequireDefault(require("./Avatars/avatars"));
|
|
175
205
|
|
|
176
206
|
var _buttonAlertIcons = require("./Buttons/buttonAlertIcons");
|
|
177
207
|
|
|
@@ -209,10 +239,20 @@ var _checkbox = require("./checkbox");
|
|
|
209
239
|
|
|
210
240
|
var _iconStyles = require("./iconStyles");
|
|
211
241
|
|
|
212
|
-
var _noteBar = require("./NoteBar
|
|
242
|
+
var _noteBar = require("./NoteBar/noteBar");
|
|
213
243
|
|
|
214
244
|
var _MainWrapper = require("../components/MainWrapper");
|
|
215
245
|
|
|
246
|
+
var _chatBody = _interopRequireDefault(require("../components/ChatBody/chatBody"));
|
|
247
|
+
|
|
248
|
+
var _chatHeader = require("./ChatHeader/chatHeader");
|
|
249
|
+
|
|
250
|
+
var _contactCards = _interopRequireDefault(require("./ContactCards/contactCards"));
|
|
251
|
+
|
|
252
|
+
var _infoTab = _interopRequireDefault(require("./InfoTab/infoTab"));
|
|
253
|
+
|
|
254
|
+
var _messageCounter = _interopRequireDefault(require("./MessageCounter/messageCounter"));
|
|
255
|
+
|
|
216
256
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
217
257
|
|
|
218
258
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -19,13 +19,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
19
19
|
|
|
20
20
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
21
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:
|
|
23
|
-
/* border: 0.714rem solid black; */
|
|
24
|
-
);
|
|
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);
|
|
25
23
|
|
|
26
24
|
exports.BmSideBar = BmSideBar;
|
|
27
25
|
|
|
28
|
-
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"])));
|
|
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"])));
|
|
29
27
|
|
|
30
28
|
exports.BmSideBarSearch = BmSideBarSearch;
|
|
31
29
|
var BmSideBarBtnIcon = (0, _styledComponents.default)(_buttonIconsOnly.BmBtnIcon)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: 0.571rem;\n"])));
|
package/package.json
CHANGED
package/src/App.js
CHANGED
|
@@ -1,21 +1,94 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Switch, BrowserRouter } from "react-router-dom";
|
|
1
|
+
import React, { useState } from "react";
|
|
3
2
|
import "../src/main.scss";
|
|
4
|
-
import {
|
|
3
|
+
import { BmAvatar, BmInput, BmTab, MainWrapper } from "./lib/components";
|
|
5
4
|
import { GlobalStyle } from "./lib/components/globalStyles";
|
|
5
|
+
import { BmSideBar } from "./lib/components/sidebar";
|
|
6
|
+
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
26
|
|
|
7
27
|
export const App = () => {
|
|
28
|
+
const [dropDownItem, setDropdownItem] = useState(false);
|
|
29
|
+
|
|
8
30
|
return (
|
|
9
31
|
<>
|
|
10
32
|
<GlobalStyle />
|
|
11
33
|
<MainWrapper>
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
</
|
|
17
|
-
|
|
18
|
-
|
|
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>
|
|
44
|
+
|
|
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> */}
|
|
19
92
|
</MainWrapper>
|
|
20
93
|
</>
|
|
21
94
|
);
|
|
@@ -46,7 +46,7 @@ export const BmAvatarWrapper = styled.div`
|
|
|
46
46
|
}};
|
|
47
47
|
`;
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
const BmAvatar = (props) => {
|
|
50
50
|
const { user, size, color, ...rest } = props;
|
|
51
51
|
return (
|
|
52
52
|
<BmAvatarWrapper user={user} size={size} {...rest}>
|
|
@@ -69,3 +69,5 @@ BmAvatar.propTypes = {
|
|
|
69
69
|
color: PropTypes.string,
|
|
70
70
|
user: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
71
71
|
};
|
|
72
|
+
|
|
73
|
+
export default BmAvatar;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { KeyboardArrowDown } from "@material-ui/icons";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { BmBtnIcon } from "./buttonIconsOnly";
|
|
5
|
+
import { BmButton } from "./buttons";
|
|
6
|
+
import {
|
|
7
|
+
BmPrimaryWhite,
|
|
8
|
+
BmPrimaryBlue,
|
|
9
|
+
BmSecondaryRed,
|
|
10
|
+
BmSecondaryDarkGreen,
|
|
11
|
+
BmGrey400,
|
|
12
|
+
BmGrey100,
|
|
13
|
+
BmSecondaryCyan,
|
|
14
|
+
BmGrey50,
|
|
15
|
+
BmSecondaryGreen8,
|
|
16
|
+
BmSecondaryRed8,
|
|
17
|
+
} from "../colors";
|
|
18
|
+
|
|
19
|
+
const ButtonDropdownWrapper = styled.div`
|
|
20
|
+
display: flex;
|
|
21
|
+
&:hover {
|
|
22
|
+
background: ${({ variant, disabled }) => {
|
|
23
|
+
if (!disabled) {
|
|
24
|
+
if (variant === "primary") return `${BmSecondaryCyan}`;
|
|
25
|
+
if (variant === "neutral") return `${BmGrey50}`;
|
|
26
|
+
if (variant === "success") return `${BmSecondaryGreen8}`;
|
|
27
|
+
if (variant === "destructive") return `${BmSecondaryRed8}`;
|
|
28
|
+
if (!variant) {
|
|
29
|
+
return `${BmSecondaryCyan}`;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}};
|
|
33
|
+
border: 0.071rem solid
|
|
34
|
+
${({ variant, disabled }) => {
|
|
35
|
+
if (!disabled) {
|
|
36
|
+
if (variant === "secondary") return `${BmSecondaryCyan}`;
|
|
37
|
+
}
|
|
38
|
+
return "none";
|
|
39
|
+
}};
|
|
40
|
+
}
|
|
41
|
+
&:active {
|
|
42
|
+
background: ${({ variant, disabled }) => {
|
|
43
|
+
if (!disabled) {
|
|
44
|
+
if (variant === "primary") return `${BmPrimaryBlue}`;
|
|
45
|
+
if (variant === "neutral") return `${BmGrey100}`;
|
|
46
|
+
if (variant === "success") return `${BmSecondaryDarkGreen}`;
|
|
47
|
+
if (variant === "destructive") return `${BmSecondaryRed}`;
|
|
48
|
+
if (!variant) {
|
|
49
|
+
return `${BmPrimaryBlue}`;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}};
|
|
53
|
+
box-shadow: ${({ variant, disabled }) => {
|
|
54
|
+
if (!disabled) {
|
|
55
|
+
if (
|
|
56
|
+
variant === "primary" ||
|
|
57
|
+
variant === "success" ||
|
|
58
|
+
variant === "destructive"
|
|
59
|
+
)
|
|
60
|
+
return "inset 0rem 0.125rem 0.25rem rgba(0, 0, 0, 0.25)";
|
|
61
|
+
if (!variant) {
|
|
62
|
+
return "inset 0rem 0.125rem 0.25rem rgba(0, 0, 0, 0.25)";
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}};
|
|
66
|
+
border: 0.071rem solid
|
|
67
|
+
${({ variant, disabled }) => {
|
|
68
|
+
if (!disabled) {
|
|
69
|
+
if (variant === "secondary") return `${BmPrimaryBlue}`;
|
|
70
|
+
}
|
|
71
|
+
return "none";
|
|
72
|
+
}};
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
75
|
+
|
|
76
|
+
const Dropdown = styled(BmBtnIcon)`
|
|
77
|
+
background: ${({ variant, disabled }) => {
|
|
78
|
+
if (!disabled) {
|
|
79
|
+
if (variant === "primary") return `${BmPrimaryBlue}`;
|
|
80
|
+
if (variant === "secondary") return "none";
|
|
81
|
+
if (variant === "tertiary") return "none";
|
|
82
|
+
if (variant === "destructive") return `${BmSecondaryRed}`;
|
|
83
|
+
if (variant === "success") return `${BmSecondaryDarkGreen}`;
|
|
84
|
+
if (variant === "neutral") return `${BmPrimaryWhite}`;
|
|
85
|
+
return `${BmPrimaryBlue}`;
|
|
86
|
+
} else {
|
|
87
|
+
if (variant === "primary") return `${BmGrey100}`;
|
|
88
|
+
if (variant === "secondary") return "none";
|
|
89
|
+
if (variant === "tertiary") return "none";
|
|
90
|
+
return `${BmGrey100}`;
|
|
91
|
+
}
|
|
92
|
+
}};
|
|
93
|
+
border: 0.0625rem solid
|
|
94
|
+
${({ variant, disabled }) => {
|
|
95
|
+
if (!disabled) {
|
|
96
|
+
if (variant === "primary") return `${BmPrimaryBlue}`;
|
|
97
|
+
if (variant === "secondary") return `${BmPrimaryBlue}`;
|
|
98
|
+
if (variant === "tertiary") return "transparent";
|
|
99
|
+
if (variant === "destructive") return `${BmSecondaryRed}`;
|
|
100
|
+
if (variant === "success") return `${BmSecondaryDarkGreen}`;
|
|
101
|
+
if (variant === "neutral") return `${BmGrey400}`;
|
|
102
|
+
return `${BmPrimaryBlue}`;
|
|
103
|
+
} else {
|
|
104
|
+
if (variant === "primary") return `${BmGrey100}`;
|
|
105
|
+
if (variant === "secondary") return `${BmGrey400}`;
|
|
106
|
+
if (variant === "tertiary") return "transparent";
|
|
107
|
+
}
|
|
108
|
+
}};
|
|
109
|
+
|
|
110
|
+
border-left: 0.071rem solid
|
|
111
|
+
${({ variant, disabled }) => {
|
|
112
|
+
if (!disabled) {
|
|
113
|
+
if (variant === "primary") return `${BmPrimaryWhite}`;
|
|
114
|
+
if (variant === "secondary") return `${BmPrimaryBlue}`;
|
|
115
|
+
if (variant === "tertiary") return "transparent";
|
|
116
|
+
if (variant === "destructive") return `${BmSecondaryRed}`;
|
|
117
|
+
if (variant === "success") return `${BmSecondaryDarkGreen}`;
|
|
118
|
+
if (variant === "neutral") return `${BmGrey400}`;
|
|
119
|
+
return `${BmPrimaryWhite}`;
|
|
120
|
+
} else {
|
|
121
|
+
if (variant === "primary") return `${BmGrey400}`;
|
|
122
|
+
if (variant === "secondary") return `${BmGrey400}`;
|
|
123
|
+
if (variant === "tertiary") return "transparent";
|
|
124
|
+
}
|
|
125
|
+
}};
|
|
126
|
+
border-top-left-radius: 0.071rem;
|
|
127
|
+
border-bottom-left-radius: 0.071rem;
|
|
128
|
+
padding: 0rem;
|
|
129
|
+
`;
|
|
130
|
+
|
|
131
|
+
export const Button = styled(BmButton)`
|
|
132
|
+
border-top-right-radius: 0.071rem;
|
|
133
|
+
border-bottom-right-radius: 0.071rem;
|
|
134
|
+
border-radius: none;
|
|
135
|
+
border-right: none;
|
|
136
|
+
`;
|
|
137
|
+
|
|
138
|
+
export const BmButtonDropDown = ({ children, ...rest }) => {
|
|
139
|
+
return (
|
|
140
|
+
<>
|
|
141
|
+
<ButtonDropdownWrapper {...rest}>
|
|
142
|
+
<Button {...rest}>{children}</Button>
|
|
143
|
+
<Dropdown {...rest} icon={<KeyboardArrowDown />} />
|
|
144
|
+
</ButtonDropdownWrapper>
|
|
145
|
+
</>
|
|
146
|
+
);
|
|
147
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Home, KeyboardArrowDown } from "@material-ui/icons";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { BmBtnIcon } from "./buttonIconsOnly";
|
|
4
|
+
import { BmButton } from "./buttons";
|
|
5
|
+
|
|
6
|
+
export const BmButtonDropdown = ({ children }) => {
|
|
7
|
+
return (
|
|
8
|
+
<div style={{ display: "flex", flexDirection: "row" }}>
|
|
9
|
+
<BmButton>{children}</BmButton>
|
|
10
|
+
<BmButton leadingIcon={<KeyboardArrowDown />}></BmButton>
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
};
|