beem-component 1.5.6 → 1.5.9
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/.babelrc +17 -0
- package/.eslintrc +62 -0
- package/.prettierrc +6 -0
- package/dist/assets/fb.png +0 -0
- package/dist/assets/insta.png +0 -0
- package/dist/assets/wa.png +0 -0
- package/dist/components/Accordion/Accordion.js +31 -64
- package/dist/components/Accordion/Accordion.stories.js +29 -29
- package/dist/components/Avatars/avatars.js +31 -46
- package/dist/components/Avatars/avatars.stories.js +18 -18
- package/dist/components/BannerCard/bannerCard.stories.js +14 -14
- package/dist/components/BannerCard/bannerCards.js +30 -48
- package/dist/components/Buttons/Stories/basicbutton.stories.js +24 -24
- package/dist/components/Buttons/Stories/buttonAlertIcons.stories.js +17 -17
- package/dist/components/Buttons/Stories/buttonIconsOnly.stories.js +17 -17
- package/dist/components/Buttons/buttonAlertIcons.js +28 -44
- package/dist/components/Buttons/buttonDropdown copy.js +15 -18
- package/dist/components/Buttons/buttonDropdown.js +2 -2
- package/dist/components/Buttons/buttonIconsOnly.js +35 -49
- package/dist/components/Buttons/buttons.js +75 -86
- package/dist/components/Cards/cards.js +15 -11
- package/dist/components/Cards/cards.stories.js +8 -8
- package/dist/components/ChatComponents/ChatBody/chatBody.js +80 -69
- package/dist/components/ChatComponents/ChatBody/chatBody.stories.js +6 -6
- package/dist/components/ChatComponents/ChatBody/sessionDetails.js +9 -16
- package/dist/components/ChatComponents/ChatHeader/chatHeader.js +5 -7
- package/dist/components/ChatComponents/ChatHeader/chatHeader.stories.js +3 -3
- package/dist/components/ChatComponents/ColorPicker/colorPicker.js +5 -7
- package/dist/components/ChatComponents/ColorPicker/colorPicker.stories.js +7 -3
- package/dist/components/ChatComponents/ContactCards/contactCards.js +15 -12
- package/dist/components/ChatComponents/ContactCards/contactCards.stories.js +4 -4
- package/dist/components/ChatComponents/FormAccordion/FormAccordion.js +14 -10
- package/dist/components/ChatComponents/FormAccordion/FormAccordion.stories.js +9 -5
- package/dist/components/ChatComponents/InfoTab/infoTab.js +11 -9
- package/dist/components/ChatComponents/InfoTab/infoTab.stories.js +6 -6
- package/dist/components/ChatComponents/LabelAccordion/LabelAccordion.js +5 -7
- package/dist/components/ChatComponents/LabelAccordion/LabelAccordion.stories.js +12 -7
- package/dist/components/ChatComponents/NoteAccordion/NoteAccordion.js +11 -9
- package/dist/components/ChatComponents/NoteAccordion/NoteAccordion.stories.js +15 -13
- package/dist/components/Chats/chat.js +41 -32
- package/dist/components/Chats/chatInput.js +18 -14
- package/dist/components/Chats/chatwrapper.js +20 -12
- package/dist/components/Checkbox/checkboxToggler.js +61 -0
- package/dist/components/Checkbox/checkboxToggler.stories.js +81 -0
- package/dist/components/Lists/listBox.js +14 -30
- package/dist/components/Lists/listBox.stories.js +12 -23
- package/dist/components/Lists/listHeader.stories.js +13 -13
- package/dist/components/Lists/listheader.js +12 -27
- package/dist/components/Lists/rowLabels.js +19 -30
- package/dist/components/Lists/rowLabels.stories.js +22 -25
- package/dist/components/Loader/loader.js +17 -31
- package/dist/components/Loader/loader.stories.js +13 -13
- package/dist/components/MainWrapper/index.js +5 -7
- package/dist/components/MessageCounter/MessageCounter.stories.js +14 -14
- package/dist/components/MessageCounter/messageCounter.js +16 -18
- package/dist/components/Modals/modal.js +38 -57
- package/dist/components/Modals/modals.stories.js +38 -29
- package/dist/components/NoteBar/noteBar.js +28 -57
- package/dist/components/NoteBar/noteBar.stories.js +17 -17
- package/dist/components/PerformanceIndicator/performaceIndicator.stories.js +15 -15
- package/dist/components/PerformanceIndicator/performanceIndicator.js +21 -34
- package/dist/components/Pills/pills.js +24 -56
- package/dist/components/Pills/pills.stories.js +21 -23
- package/dist/components/ProfileIcon/ProfileIcon.js +96 -0
- package/dist/components/ProfileIcon/profileIcon.stories.js +82 -0
- package/dist/components/ProgressBar/progressbar.js +15 -17
- package/dist/components/ProgressBar/progressbar.stories.js +8 -10
- package/dist/components/ProgressRing/progressRing.js +38 -54
- package/dist/components/ProgressRing/progressRing.stories.js +16 -16
- package/dist/components/RouteLink/link.js +8 -10
- package/dist/components/RouteLink/link.stories.js +3 -3
- package/dist/components/ScrollBar/scrollBar.js +19 -17
- package/dist/components/SuperFluid/Content/index.js +5 -7
- package/dist/components/SuperFluid/ContentTitle.js/index.js +14 -10
- package/dist/components/SuperFluid/SegmentCard/index.js +22 -13
- package/dist/components/Tabs/tabs.js +16 -35
- package/dist/components/Tabs/tabs.stories.js +19 -19
- package/dist/components/Tags/tags.js +33 -65
- package/dist/components/Tags/tags.stories.js +18 -18
- package/dist/components/breakpoints.js +3 -3
- package/dist/components/chatHeader.js +17 -11
- package/dist/components/checkbox.js +27 -26
- package/dist/components/colors.js +32 -30
- package/dist/components/contacts.js +39 -25
- package/dist/components/dropdown.js +29 -35
- package/dist/components/dropdownButton.js +50 -53
- package/dist/components/dropdownItems.js +26 -19
- package/dist/components/examples/App.js +137 -0
- package/dist/components/examples/InfoAccordion.js +23 -0
- package/dist/components/examples/chatBodyExample.js +68 -0
- package/dist/components/examples/selectExample.js +63 -0
- package/dist/components/globalStyles.js +1 -5
- package/dist/components/iconStyles.js +56 -58
- package/dist/components/index.js +35 -23
- package/dist/components/input.js +33 -36
- package/dist/components/logo.js +9 -16
- package/dist/components/navbar.js +24 -13
- package/dist/components/search.js +20 -21
- package/dist/components/text.js +15 -6
- package/dist/components/typography.js +14 -14
- package/dist/components/wrapper.js +8 -8
- package/package.json +54 -30
- package/src/App.js +31 -175
- package/src/index.js +6 -8
- package/src/lib/assets/fb.png +0 -0
- package/src/lib/assets/insta.png +0 -0
- package/src/lib/assets/wa.png +0 -0
- package/src/lib/components/Accordion/Accordion.js +32 -14
- package/src/lib/components/Accordion/Accordion.stories.js +31 -31
- package/src/lib/components/Avatars/avatars.js +33 -28
- package/src/lib/components/Avatars/avatars.stories.js +18 -18
- package/src/lib/components/BannerCard/bannerCard.stories.js +16 -17
- package/src/lib/components/BannerCard/bannerCards.js +18 -18
- package/src/lib/components/Buttons/Stories/basicbutton.stories.js +29 -29
- package/src/lib/components/Buttons/Stories/buttonAlertIcons.stories.js +17 -17
- package/src/lib/components/Buttons/Stories/buttonIconsOnly.stories.js +24 -24
- package/src/lib/components/Buttons/buttonAlertIcons.js +22 -25
- package/src/lib/components/Buttons/buttonIconsOnly.js +32 -28
- package/src/lib/components/Buttons/buttons.js +70 -73
- package/src/lib/components/Cards/cards.js +2 -3
- package/src/lib/components/Cards/cards.stories.js +10 -10
- package/src/lib/components/ChatComponents/ChatBody/chatBody.js +46 -45
- package/src/lib/components/ChatComponents/ChatBody/chatBody.stories.js +34 -28
- package/src/lib/components/ChatComponents/ChatBody/sessionDetails.js +2 -2
- package/src/lib/components/ChatComponents/ChatHeader/chatHeader.js +2 -2
- package/src/lib/components/ChatComponents/ChatHeader/chatHeader.stories.js +4 -4
- package/src/lib/components/ChatComponents/ColorPicker/colorPicker.js +2 -2
- package/src/lib/components/ChatComponents/ColorPicker/colorPicker.stories.js +4 -3
- package/src/lib/components/ChatComponents/ContactCards/contactCards.js +7 -5
- package/src/lib/components/ChatComponents/ContactCards/contactCards.stories.js +6 -6
- package/src/lib/components/ChatComponents/FormAccordion/FormAccordion.js +3 -3
- package/src/lib/components/ChatComponents/FormAccordion/FormAccordion.stories.js +4 -3
- package/src/lib/components/ChatComponents/InfoTab/infoTab.js +2 -2
- package/src/lib/components/ChatComponents/InfoTab/infoTab.stories.js +7 -7
- package/src/lib/components/ChatComponents/LabelAccordion/LabelAccordion.stories.js +5 -3
- package/src/lib/components/ChatComponents/NoteAccordion/NoteAccordion.js +2 -2
- package/src/lib/components/ChatComponents/NoteAccordion/NoteAccordion.stories.js +6 -5
- package/src/lib/components/Checkbox/checkboxToggler.js +89 -0
- package/src/lib/components/Checkbox/checkboxToggler.stories.js +48 -0
- package/src/lib/components/Lists/listBox.js +7 -7
- package/src/lib/components/Lists/listBox.stories.js +8 -11
- package/src/lib/components/Lists/listHeader.stories.js +13 -13
- package/src/lib/components/Lists/listheader.js +7 -7
- package/src/lib/components/Lists/rowLabels.js +6 -6
- package/src/lib/components/Lists/rowLabels.stories.js +18 -18
- package/src/lib/components/Loader/loader.js +13 -13
- package/src/lib/components/Loader/loader.stories.js +14 -14
- package/src/lib/components/MainWrapper/index.js +2 -2
- package/src/lib/components/MessageCounter/MessageCounter.stories.js +14 -14
- package/src/lib/components/MessageCounter/messageCounter.js +16 -16
- package/src/lib/components/Modals/modal.js +33 -23
- package/src/lib/components/Modals/modals.stories.js +34 -9
- package/src/lib/components/NoteBar/noteBar.js +20 -20
- package/src/lib/components/NoteBar/noteBar.stories.js +18 -17
- package/src/lib/components/PerformanceIndicator/performaceIndicator.stories.js +15 -15
- package/src/lib/components/PerformanceIndicator/performanceIndicator.js +11 -10
- package/src/lib/components/Pills/pills.js +16 -16
- package/src/lib/components/Pills/pills.stories.js +22 -23
- package/src/lib/components/ProfileIcon/ProfileIcon.js +76 -0
- package/src/lib/components/ProfileIcon/profileIcon.stories.js +57 -0
- package/src/lib/components/ProgressBar/progressbar.js +4 -5
- package/src/lib/components/ProgressBar/progressbar.stories.js +8 -9
- package/src/lib/components/ProgressRing/progressRing.js +25 -24
- package/src/lib/components/ProgressRing/progressRing.stories.js +18 -18
- package/src/lib/components/RouteLink/link.js +10 -8
- package/src/lib/components/RouteLink/link.stories.js +4 -4
- package/src/lib/components/ScrollBar/scrollBar.js +15 -14
- package/src/lib/components/SuperFluid/Content/index.js +2 -2
- package/src/lib/components/SuperFluid/ContentTitle.js/index.js +2 -2
- package/src/lib/components/SuperFluid/SegmentCard/index.js +9 -8
- package/src/lib/components/Tabs/tabs.js +11 -11
- package/src/lib/components/Tabs/tabs.stories.js +20 -20
- package/src/lib/components/Tags/tags.js +26 -24
- package/src/lib/components/Tags/tags.stories.js +19 -19
- package/src/lib/components/breakpoints.js +3 -3
- package/src/lib/components/checkbox.js +7 -6
- package/src/lib/components/colors.js +30 -28
- package/src/lib/components/dropdownButton.js +36 -39
- package/src/lib/components/examples/App.js +181 -0
- package/src/{InfoAccordion.js → lib/components/examples/InfoAccordion.js} +1 -1
- package/src/{App1.js → lib/components/examples/chatBodyExample.js} +2 -2
- package/src/{App copy.js → lib/components/examples/selectExample.js} +0 -0
- package/src/lib/components/globalStyles.js +4 -5
- package/src/lib/components/iconStyles.js +45 -48
- package/src/lib/components/index.js +48 -45
- package/src/lib/components/input.js +20 -20
- package/src/lib/components/text.js +17 -3
- package/src/lib/components/typography.js +14 -14
- package/src/reportWebVitals.js +1 -1
- package/babel.config.js +0 -12
- package/dist/components/checkboxToggler.js +0 -50
- package/dist/components/example.js +0 -47
- package/dist/components/sidebar.js +0 -32
- package/dist/components/tabs.js +0 -106
- package/dist/components/tags.js +0 -100
- package/dist/images/azam.png +0 -0
- package/dist/images/azam1.png +0 -0
- package/src/ChatHeader.js +0 -22
- package/src/CustomerInfo.js +0 -46
- package/src/MainChat.js +0 -41
- package/src/SideBar.js +0 -81
- package/src/lib/components/checkboxToggler.js +0 -19
- package/src/lib/components/example.js +0 -30
- package/src/lib/components/sidebar.js +0 -33
- package/src/lib/components/tabs.js +0 -123
- package/src/lib/components/tags.js +0 -101
- package/src/lib/images/azam.png +0 -0
- package/src/lib/images/azam1.png +0 -0
- package/src/list.scss +0 -4
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.BmSideBarTab = exports.BmSideBarSearch = exports.BmSideBarBtnIcon = exports.BmSideBar = void 0;
|
|
7
|
-
|
|
8
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
|
|
10
|
-
var _buttonIconsOnly = require("../components/Buttons/buttonIconsOnly");
|
|
11
|
-
|
|
12
|
-
var _colors = require("./colors");
|
|
13
|
-
|
|
14
|
-
var _tabs = require("./tabs");
|
|
15
|
-
|
|
16
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
21
|
-
|
|
22
|
-
var BmSideBar = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n background: ", ";\n border: 0.071rem solid ", ";\n max-height: 100%;\n height: 100%;\n overflow: auto;\n max-width: 20%;\n width: 20%;\n"])), _colors.BmPrimaryWhite, _colors.BmGrey400);
|
|
23
|
-
|
|
24
|
-
exports.BmSideBar = BmSideBar;
|
|
25
|
-
|
|
26
|
-
var BmSideBarSearch = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: flex-start;\n align-items: center;\n padding: 1.714rem !important;\n flex-wrap: wrap;\n"])));
|
|
27
|
-
|
|
28
|
-
exports.BmSideBarSearch = BmSideBarSearch;
|
|
29
|
-
var BmSideBarBtnIcon = (0, _styledComponents.default)(_buttonIconsOnly.BmBtnIcon)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: 0.571rem;\n"])));
|
|
30
|
-
exports.BmSideBarBtnIcon = BmSideBarBtnIcon;
|
|
31
|
-
var BmSideBarTab = (0, _styledComponents.default)(_tabs.BmTab)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 50%;\n padding: 1.714rem;\n"])));
|
|
32
|
-
exports.BmSideBarTab = BmSideBarTab;
|
package/dist/components/tabs.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.BmTabWrapper = exports.BmTabText = exports.BmTabItem = exports.BmTab = exports.BmRightTabIcon = exports.BmLeftTabIcon = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
-
|
|
12
|
-
var _colors = require("./colors");
|
|
13
|
-
|
|
14
|
-
var _iconStyles = require("./iconStyles");
|
|
15
|
-
|
|
16
|
-
var _excluded = ["variant", "size", "disabled", "children", "leadingIcon", "trailingIcon", "color", "state"];
|
|
17
|
-
|
|
18
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
19
|
-
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
-
|
|
24
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
25
|
-
|
|
26
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
27
|
-
|
|
28
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
29
|
-
|
|
30
|
-
var BmTabItem = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-around;\n padding: 0rem !important;\n flex-wrap: wrap;\n"])));
|
|
31
|
-
|
|
32
|
-
exports.BmTabItem = BmTabItem;
|
|
33
|
-
|
|
34
|
-
var BmTabWrapper = _styledComponents.default.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 0.714rem 1.714rem;\n background: ", ";\n box-shadow: inset 0rem -0.214rem 0rem ", ";\n &:hover {\n box-shadow: inset 0rem -0.214rem 0rem ", ";\n }\n border: none;\n"])), _colors.BmPrimaryWhite, function (_ref) {
|
|
35
|
-
var state = _ref.state;
|
|
36
|
-
if (state === "active") return "".concat(_colors.BmPrimaryBlue);
|
|
37
|
-
if (state === "active") return "".concat(_colors.BmPrimaryBlue);
|
|
38
|
-
if (state === "disabled") return "transparent";
|
|
39
|
-
return "transparent";
|
|
40
|
-
}, function (_ref2) {
|
|
41
|
-
var state = _ref2.state;
|
|
42
|
-
if (state === "disabled") return "transparent";
|
|
43
|
-
return "".concat(_colors.BmGrey400);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
exports.BmTabWrapper = BmTabWrapper;
|
|
47
|
-
|
|
48
|
-
var BmTabText = _styledComponents.default.h3(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n letter-spacing: -0.02em;\n color: ", ";\n flex: none;\n order: 0;\n flex-grow: 0;\n"])), function (_ref3) {
|
|
49
|
-
var state = _ref3.state,
|
|
50
|
-
color = _ref3.color;
|
|
51
|
-
if (state === "disabled") return "".concat(_colors.BmGrey400);
|
|
52
|
-
if (color && state !== "disabled") return color;
|
|
53
|
-
return "".concat(_colors.BmPrimaryBlack);
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
exports.BmTabText = BmTabText;
|
|
57
|
-
|
|
58
|
-
var BmLeftTabIcon = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding-right: 0.714rem !important;\n"])));
|
|
59
|
-
|
|
60
|
-
exports.BmLeftTabIcon = BmLeftTabIcon;
|
|
61
|
-
|
|
62
|
-
var BmRightTabIcon = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-left: 0.714rem !important;\n"])));
|
|
63
|
-
|
|
64
|
-
exports.BmRightTabIcon = BmRightTabIcon;
|
|
65
|
-
|
|
66
|
-
var BmTab = function BmTab(props) {
|
|
67
|
-
var variant = props.variant,
|
|
68
|
-
size = props.size,
|
|
69
|
-
disabled = props.disabled,
|
|
70
|
-
children = props.children,
|
|
71
|
-
leadingIcon = props.leadingIcon,
|
|
72
|
-
trailingIcon = props.trailingIcon,
|
|
73
|
-
color = props.color,
|
|
74
|
-
state = props.state,
|
|
75
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
76
|
-
|
|
77
|
-
var IconColor = state === "disabled" ? "".concat(_colors.BmGrey400) : color && state !== "disabled" ? color : "".concat(_colors.BmPrimaryBlack);
|
|
78
|
-
return /*#__PURE__*/_react.default.createElement(BmTabWrapper, _extends({
|
|
79
|
-
size: size,
|
|
80
|
-
variant: variant,
|
|
81
|
-
disabled: state === "disabled" ? true : false,
|
|
82
|
-
state: state
|
|
83
|
-
}, rest), leadingIcon && /*#__PURE__*/_react.default.createElement(BmLeftTabIcon, null, /*#__PURE__*/_react.default.createElement(_iconStyles.BmButtonIcon, {
|
|
84
|
-
icon: leadingIcon,
|
|
85
|
-
disabled: state === "disabled" ? true : false,
|
|
86
|
-
variant: variant,
|
|
87
|
-
size: size,
|
|
88
|
-
state: state,
|
|
89
|
-
color: IconColor
|
|
90
|
-
})), /*#__PURE__*/_react.default.createElement(BmTabText, {
|
|
91
|
-
disabled: state === "disabled" ? true : false,
|
|
92
|
-
variant: variant,
|
|
93
|
-
size: size,
|
|
94
|
-
state: state,
|
|
95
|
-
color: color
|
|
96
|
-
}, children), trailingIcon && /*#__PURE__*/_react.default.createElement(BmRightTabIcon, null, /*#__PURE__*/_react.default.createElement(_iconStyles.BmButtonIcon, {
|
|
97
|
-
icon: trailingIcon,
|
|
98
|
-
disabled: state === "disabled" ? true : false,
|
|
99
|
-
state: state,
|
|
100
|
-
variant: variant,
|
|
101
|
-
size: size,
|
|
102
|
-
color: IconColor
|
|
103
|
-
})));
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
exports.BmTab = BmTab;
|
package/dist/components/tags.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.BmTag = exports.BmRightIcon = exports.BmLeftIcon = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
-
|
|
12
|
-
var _colors = require("../components/colors");
|
|
13
|
-
|
|
14
|
-
var _iconStyles = require("../components/iconStyles");
|
|
15
|
-
|
|
16
|
-
var _excluded = ["variant", "size", "disabled", "children", "leadingIcon", "trailingIcon"];
|
|
17
|
-
|
|
18
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
19
|
-
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
-
|
|
24
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
25
|
-
|
|
26
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
27
|
-
|
|
28
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
29
|
-
|
|
30
|
-
var BeemTag = _styledComponents.default.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n border-radius: 0.25rem;\n height: ", ";\n padding: ", ";\n background: ", ";\n border: 0.071rem solid\n ", ";\n border-radius: 0.25rem;\n"])), function (_ref) {
|
|
31
|
-
var size = _ref.size;
|
|
32
|
-
if (size === "small") return "1.286rem";
|
|
33
|
-
if (size === "default") return "1.714rem";
|
|
34
|
-
return "1.714rem";
|
|
35
|
-
}, function (_ref2) {
|
|
36
|
-
var size = _ref2.size;
|
|
37
|
-
if (size === "small") return "0.071rem 0.571rem";
|
|
38
|
-
if (size === "default") return "0.214rem 0.571rem";
|
|
39
|
-
return "0.214rem 0.571rem";
|
|
40
|
-
}, function (_ref3) {
|
|
41
|
-
var variant = _ref3.variant;
|
|
42
|
-
if (variant === "neutral") return "".concat(_colors.BmGrey100);
|
|
43
|
-
if (variant === "success") return "".concat(_colors.BmSecondaryDarkGreen);
|
|
44
|
-
if (variant === "warning") return "".concat(_colors.BmPrimaryGold);
|
|
45
|
-
if (variant === "error") return "".concat(_colors.BmSecondaryRed);
|
|
46
|
-
if (variant === "light") return "".concat(_colors.BmPrimaryWhite);
|
|
47
|
-
if (variant === undefined) return "".concat(_colors.BmGrey100);
|
|
48
|
-
return variant;
|
|
49
|
-
}, function (_ref4) {
|
|
50
|
-
var variant = _ref4.variant;
|
|
51
|
-
if (variant === "neutral") return "".concat(_colors.BmGrey100);
|
|
52
|
-
if (variant === "success") return "".concat(_colors.BmSecondaryDarkGreen);
|
|
53
|
-
if (variant === "warning") return "".concat(_colors.BmPrimaryGold);
|
|
54
|
-
if (variant === "error") return "".concat(_colors.BmSecondaryRed);
|
|
55
|
-
if (variant === "light") return "".concat(_colors.BmGrey400);
|
|
56
|
-
return "".concat(_colors.BmGrey100);
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
var TagText = _styledComponents.default.p(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n text-transform: uppercase;\n"])), function (_ref5) {
|
|
60
|
-
var variant = _ref5.variant;
|
|
61
|
-
if (variant === "light" || variant === "neutral") return "".concat(_colors.BmPrimaryBlack);
|
|
62
|
-
return "".concat(_colors.BmPrimaryWhite);
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
var BmLeftIcon = (0, _styledComponents.default)(_iconStyles.BmTagIcon)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-right: 0.643rem;\n"])));
|
|
66
|
-
exports.BmLeftIcon = BmLeftIcon;
|
|
67
|
-
var BmRightIcon = (0, _styledComponents.default)(_iconStyles.BmTagIcon)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-left: 0.643rem;\n"])));
|
|
68
|
-
exports.BmRightIcon = BmRightIcon;
|
|
69
|
-
|
|
70
|
-
var BmTag = function BmTag(props) {
|
|
71
|
-
var variant = props.variant,
|
|
72
|
-
size = props.size,
|
|
73
|
-
disabled = props.disabled,
|
|
74
|
-
children = props.children,
|
|
75
|
-
leadingIcon = props.leadingIcon,
|
|
76
|
-
trailingIcon = props.trailingIcon,
|
|
77
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
78
|
-
|
|
79
|
-
return /*#__PURE__*/_react.default.createElement(BeemTag, _extends({
|
|
80
|
-
size: size,
|
|
81
|
-
variant: variant,
|
|
82
|
-
disabled: disabled
|
|
83
|
-
}, rest), leadingIcon && /*#__PURE__*/_react.default.createElement(BmLeftIcon, {
|
|
84
|
-
disabled: disabled,
|
|
85
|
-
icon: leadingIcon,
|
|
86
|
-
variant: variant,
|
|
87
|
-
size: size
|
|
88
|
-
}), /*#__PURE__*/_react.default.createElement(TagText, {
|
|
89
|
-
disabled: disabled,
|
|
90
|
-
variant: variant,
|
|
91
|
-
size: size
|
|
92
|
-
}, children), trailingIcon && /*#__PURE__*/_react.default.createElement(BmRightIcon, {
|
|
93
|
-
icon: trailingIcon,
|
|
94
|
-
disabled: disabled,
|
|
95
|
-
variant: variant,
|
|
96
|
-
size: size
|
|
97
|
-
}));
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
exports.BmTag = BmTag;
|
package/dist/images/azam.png
DELETED
|
Binary file
|
package/dist/images/azam1.png
DELETED
|
Binary file
|
package/src/ChatHeader.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { BmChatHeader, BmButton } from "../src/lib/components/";
|
|
3
|
-
import "../src/lib/assets/css/sidebar.scss";
|
|
4
|
-
|
|
5
|
-
export const ChatHeader = () => {
|
|
6
|
-
return (
|
|
7
|
-
<>
|
|
8
|
-
<div className="chat-header">
|
|
9
|
-
<BmChatHeader>
|
|
10
|
-
<h2>Contact Name</h2>
|
|
11
|
-
<p>Last seen: 00:00</p>
|
|
12
|
-
<div className="chat-header-buttons">
|
|
13
|
-
<BmButton size="medium">End Session</BmButton>
|
|
14
|
-
<BmButton size="medium">End Session</BmButton>
|
|
15
|
-
</div>
|
|
16
|
-
</BmChatHeader>
|
|
17
|
-
</div>
|
|
18
|
-
</>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default ChatHeader;
|
package/src/CustomerInfo.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/prop-types */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { BmBtnIcon, BmInfoTab, BmIcons } from '../src/lib/components/';
|
|
4
|
-
import CallIcon from '@material-ui/icons/Call';
|
|
5
|
-
import EmailIcon from '@material-ui/icons/Email';
|
|
6
|
-
import NoteAddIcon from '@material-ui/icons/NoteAdd';
|
|
7
|
-
import AddIcon from '@material-ui/icons/Add';
|
|
8
|
-
import PriorityHighIcon from '@material-ui/icons/PriorityHigh';
|
|
9
|
-
import { MoreVert } from '@material-ui/icons';
|
|
10
|
-
|
|
11
|
-
const CustomerInfo = () => {
|
|
12
|
-
return (
|
|
13
|
-
<>
|
|
14
|
-
<BmInfoTab>
|
|
15
|
-
<BmInfoTab.Content>
|
|
16
|
-
<h3>Contact Name</h3>
|
|
17
|
-
<BmIcons icon={<MoreVert />} />
|
|
18
|
-
</BmInfoTab.Content>
|
|
19
|
-
<BmInfoTab.Content>
|
|
20
|
-
<BmInfoTab.Tabs>
|
|
21
|
-
<BmBtnIcon icon={<CallIcon />} />
|
|
22
|
-
<h4>Call</h4>
|
|
23
|
-
</BmInfoTab.Tabs>
|
|
24
|
-
<BmInfoTab.Tabs>
|
|
25
|
-
<BmBtnIcon icon={<EmailIcon />} />
|
|
26
|
-
<h4>Email</h4>
|
|
27
|
-
</BmInfoTab.Tabs>
|
|
28
|
-
<BmInfoTab.Tabs>
|
|
29
|
-
<BmBtnIcon icon={<NoteAddIcon />} />
|
|
30
|
-
<h4>Note</h4>
|
|
31
|
-
</BmInfoTab.Tabs>
|
|
32
|
-
<BmInfoTab.Tabs>
|
|
33
|
-
<BmBtnIcon icon={<AddIcon />} />
|
|
34
|
-
<h4>Log</h4>
|
|
35
|
-
</BmInfoTab.Tabs>
|
|
36
|
-
<BmInfoTab.Tabs>
|
|
37
|
-
<BmBtnIcon icon={<PriorityHighIcon />} variant="enabled" />
|
|
38
|
-
<h4>Priority</h4>
|
|
39
|
-
</BmInfoTab.Tabs>
|
|
40
|
-
</BmInfoTab.Content>
|
|
41
|
-
</BmInfoTab>
|
|
42
|
-
</>
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export default CustomerInfo;
|
package/src/MainChat.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "../src/main.scss";
|
|
3
|
-
import { MainWrapper } from "./lib/components";
|
|
4
|
-
import { GlobalStyle } from "./lib/components/globalStyles";
|
|
5
|
-
import "./lib/assets/css/sidebar.scss";
|
|
6
|
-
import SideBar from "./SideBar";
|
|
7
|
-
import ChatHeader from "./ChatHeader";
|
|
8
|
-
import Chat from "./Chat";
|
|
9
|
-
import CustomerInfo from "./CustomerInfo";
|
|
10
|
-
import InfoAccordion from "./InfoAccordion";
|
|
11
|
-
|
|
12
|
-
export const App = () => {
|
|
13
|
-
return (
|
|
14
|
-
<>
|
|
15
|
-
<GlobalStyle />
|
|
16
|
-
<MainWrapper>
|
|
17
|
-
<div className="main-chat-container">
|
|
18
|
-
<div className="chat-container">
|
|
19
|
-
<div className="sidebar">
|
|
20
|
-
<SideBar />
|
|
21
|
-
</div>
|
|
22
|
-
<div className="chat">
|
|
23
|
-
<ChatHeader />
|
|
24
|
-
<div className="chat-menu">
|
|
25
|
-
<div className="chat-messages">
|
|
26
|
-
<Chat />
|
|
27
|
-
</div>
|
|
28
|
-
<div className="chat-contact-info">
|
|
29
|
-
<CustomerInfo />
|
|
30
|
-
<InfoAccordion />
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</MainWrapper>
|
|
37
|
-
</>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export default App;
|
package/src/SideBar.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { BmTab } from "./lib/components/Tabs/tabs";
|
|
3
|
-
import { BmTag } from "./lib/components/Tags/tags";
|
|
4
|
-
import ForumIcon from "@material-ui/icons/Forum";
|
|
5
|
-
import { BmContactCard, BmAvatar, BmCounter } from "./lib/components";
|
|
6
|
-
|
|
7
|
-
const SideBar = () => {
|
|
8
|
-
return (
|
|
9
|
-
<>
|
|
10
|
-
<div className="main-sidebar-tabs">
|
|
11
|
-
<BmTab
|
|
12
|
-
state="active"
|
|
13
|
-
className="sidebar-tabs"
|
|
14
|
-
leadingIcon={<ForumIcon />}
|
|
15
|
-
>
|
|
16
|
-
<h3>Chats</h3>
|
|
17
|
-
</BmTab>
|
|
18
|
-
</div>
|
|
19
|
-
<div className="sidebar-contacts">
|
|
20
|
-
<BmContactCard>
|
|
21
|
-
<BmContactCard.Profile>
|
|
22
|
-
<BmAvatar user="employee" size="small" color="{$BmPrimaryBlack}" />
|
|
23
|
-
</BmContactCard.Profile>
|
|
24
|
-
<BmContactCard.Details>
|
|
25
|
-
<BmContactCard.SubDetails>
|
|
26
|
-
<h3>Contact Names</h3>
|
|
27
|
-
</BmContactCard.SubDetails>
|
|
28
|
-
<BmContactCard.SubDetails>
|
|
29
|
-
<p>Message text</p>
|
|
30
|
-
<BmCounter>10</BmCounter>
|
|
31
|
-
</BmContactCard.SubDetails>
|
|
32
|
-
<BmContactCard.SubDetails>
|
|
33
|
-
<BmTag variant="success">
|
|
34
|
-
<p>label</p>
|
|
35
|
-
</BmTag>
|
|
36
|
-
<p>10:00 am</p>
|
|
37
|
-
</BmContactCard.SubDetails>
|
|
38
|
-
</BmContactCard.Details>
|
|
39
|
-
</BmContactCard>
|
|
40
|
-
<BmContactCard>
|
|
41
|
-
<BmContactCard.Profile>
|
|
42
|
-
<BmAvatar user="employee" size="small" color="{$BmPrimaryBlack}" />
|
|
43
|
-
</BmContactCard.Profile>
|
|
44
|
-
<BmContactCard.Details>
|
|
45
|
-
<BmContactCard.SubDetails>
|
|
46
|
-
<h3>Contact Names</h3>
|
|
47
|
-
</BmContactCard.SubDetails>
|
|
48
|
-
<BmContactCard.SubDetails>
|
|
49
|
-
<p>Message text</p>
|
|
50
|
-
<BmCounter>10</BmCounter>
|
|
51
|
-
</BmContactCard.SubDetails>
|
|
52
|
-
<BmContactCard.SubDetails>
|
|
53
|
-
<BmTag variant="success">label</BmTag>
|
|
54
|
-
<p>10:00 am</p>
|
|
55
|
-
</BmContactCard.SubDetails>
|
|
56
|
-
</BmContactCard.Details>
|
|
57
|
-
</BmContactCard>
|
|
58
|
-
<BmContactCard>
|
|
59
|
-
<BmContactCard.Profile>
|
|
60
|
-
<BmAvatar user="employee" size="small" color="{$BmPrimaryBlack}" />
|
|
61
|
-
</BmContactCard.Profile>
|
|
62
|
-
<BmContactCard.Details>
|
|
63
|
-
<BmContactCard.SubDetails>
|
|
64
|
-
<h3>Contact Names</h3>
|
|
65
|
-
</BmContactCard.SubDetails>
|
|
66
|
-
<BmContactCard.SubDetails>
|
|
67
|
-
<p>Message text</p>
|
|
68
|
-
<BmCounter>10</BmCounter>
|
|
69
|
-
</BmContactCard.SubDetails>
|
|
70
|
-
<BmContactCard.SubDetails>
|
|
71
|
-
{/* <BmTag variant="success">label</BmTag> */}
|
|
72
|
-
<p>10:00 am</p>
|
|
73
|
-
</BmContactCard.SubDetails>
|
|
74
|
-
</BmContactCard.Details>
|
|
75
|
-
</BmContactCard>
|
|
76
|
-
</div>
|
|
77
|
-
</>
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export default SideBar;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Switch from "@material-ui/core/Switch";
|
|
3
|
-
|
|
4
|
-
export const BmCheckboxToggler = () => {
|
|
5
|
-
const [state, setState] = React.useState(false);
|
|
6
|
-
|
|
7
|
-
const handleChange = (event) => {
|
|
8
|
-
setState({ ...state, [event.target.name]: event.target.checked });
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<Switch
|
|
13
|
-
checked={state}
|
|
14
|
-
onChange={handleChange}
|
|
15
|
-
name="checkedA"
|
|
16
|
-
// inputProps={{ "aria-label": "secondary checkbox" }}
|
|
17
|
-
/>
|
|
18
|
-
);
|
|
19
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
const btnVariants = {
|
|
2
|
-
primary: "primary",
|
|
3
|
-
danger: "danger",
|
|
4
|
-
tertiary: "tertiary",
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
// Variant styles
|
|
8
|
-
const variantStyles = {
|
|
9
|
-
[btnVariants.primary]: {
|
|
10
|
-
background: "#1890ff",
|
|
11
|
-
},
|
|
12
|
-
[btnVariants.danger]: {
|
|
13
|
-
background: "#f81d22",
|
|
14
|
-
},
|
|
15
|
-
[btnVariants.tertiary]: {
|
|
16
|
-
background: "#fff",
|
|
17
|
-
color: "#000",
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
function BaseButton({ variant, ...props }) {
|
|
22
|
-
const btnStyle = {
|
|
23
|
-
color: "#fff",
|
|
24
|
-
border: "none",
|
|
25
|
-
padding: "5px 10px",
|
|
26
|
-
...variantStyles[variant],
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
return <button {...props} style={btnStyle} />;
|
|
30
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import { BmBtnIcon } from "../components/Buttons/buttonIconsOnly";
|
|
3
|
-
import { BmGrey400, BmPrimaryWhite } from "./colors";
|
|
4
|
-
import { BmTab } from "./tabs";
|
|
5
|
-
|
|
6
|
-
export const BmSideBar = styled.div`
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
background: ${BmPrimaryWhite};
|
|
10
|
-
border: 0.071rem solid ${BmGrey400};
|
|
11
|
-
max-height: 100%;
|
|
12
|
-
height: 100%;
|
|
13
|
-
overflow: auto;
|
|
14
|
-
max-width: 20%;
|
|
15
|
-
width: 20%;
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
export const BmSideBarSearch = styled.div`
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: flex-start;
|
|
21
|
-
align-items: center;
|
|
22
|
-
padding: 1.714rem !important;
|
|
23
|
-
flex-wrap: wrap;
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
export const BmSideBarBtnIcon = styled(BmBtnIcon)`
|
|
27
|
-
margin-left: 0.571rem;
|
|
28
|
-
`;
|
|
29
|
-
|
|
30
|
-
export const BmSideBarTab = styled(BmTab)`
|
|
31
|
-
width: 50%;
|
|
32
|
-
padding: 1.714rem;
|
|
33
|
-
`;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import {
|
|
4
|
-
BmGrey400,
|
|
5
|
-
BmPrimaryBlack,
|
|
6
|
-
BmPrimaryBlue,
|
|
7
|
-
BmPrimaryWhite,
|
|
8
|
-
} from "./colors";
|
|
9
|
-
import { BmButtonIcon } from "./iconStyles";
|
|
10
|
-
|
|
11
|
-
export const BmTabItem = styled.div`
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: row;
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: space-around;
|
|
16
|
-
padding: 0rem !important;
|
|
17
|
-
flex-wrap: wrap;
|
|
18
|
-
`;
|
|
19
|
-
|
|
20
|
-
export const BmTabWrapper = styled.button`
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: row;
|
|
23
|
-
justify-content: center;
|
|
24
|
-
align-items: center;
|
|
25
|
-
padding: 0.714rem 1.714rem;
|
|
26
|
-
background: ${BmPrimaryWhite};
|
|
27
|
-
box-shadow: inset 0rem -0.214rem 0rem ${({ state }) => {
|
|
28
|
-
if (state === "active") return `${BmPrimaryBlue}`;
|
|
29
|
-
if (state === "active") return `${BmPrimaryBlue}`;
|
|
30
|
-
if (state === "disabled") return "transparent";
|
|
31
|
-
return "transparent";
|
|
32
|
-
}};
|
|
33
|
-
&:hover {
|
|
34
|
-
box-shadow: inset 0rem -0.214rem 0rem ${({ state }) => {
|
|
35
|
-
if (state === "disabled") return "transparent";
|
|
36
|
-
return `${BmGrey400}`;
|
|
37
|
-
}};
|
|
38
|
-
}
|
|
39
|
-
border: none;
|
|
40
|
-
`;
|
|
41
|
-
|
|
42
|
-
export const BmTabText = styled.h3`
|
|
43
|
-
letter-spacing: -0.02em;
|
|
44
|
-
color: ${({ state, color }) => {
|
|
45
|
-
if (state === "disabled") return `${BmGrey400}`;
|
|
46
|
-
if (color && state !== "disabled") return color;
|
|
47
|
-
return `${BmPrimaryBlack}`;
|
|
48
|
-
}};
|
|
49
|
-
flex: none;
|
|
50
|
-
order: 0;
|
|
51
|
-
flex-grow: 0;
|
|
52
|
-
`;
|
|
53
|
-
|
|
54
|
-
export const BmLeftTabIcon = styled.div`
|
|
55
|
-
padding-right: 0.714rem !important;
|
|
56
|
-
`;
|
|
57
|
-
|
|
58
|
-
export const BmRightTabIcon = styled.div`
|
|
59
|
-
padding-left: 0.714rem !important;
|
|
60
|
-
`;
|
|
61
|
-
|
|
62
|
-
export const BmTab = (props) => {
|
|
63
|
-
const {
|
|
64
|
-
variant,
|
|
65
|
-
size,
|
|
66
|
-
disabled,
|
|
67
|
-
children,
|
|
68
|
-
leadingIcon,
|
|
69
|
-
trailingIcon,
|
|
70
|
-
color,
|
|
71
|
-
state,
|
|
72
|
-
...rest
|
|
73
|
-
} = props;
|
|
74
|
-
const IconColor =
|
|
75
|
-
state === "disabled"
|
|
76
|
-
? `${BmGrey400}`
|
|
77
|
-
: color && state !== "disabled"
|
|
78
|
-
? color
|
|
79
|
-
: `${BmPrimaryBlack}`;
|
|
80
|
-
return (
|
|
81
|
-
<BmTabWrapper
|
|
82
|
-
size={size}
|
|
83
|
-
variant={variant}
|
|
84
|
-
disabled={state === "disabled" ? true : false}
|
|
85
|
-
state={state}
|
|
86
|
-
{...rest}
|
|
87
|
-
>
|
|
88
|
-
{leadingIcon && (
|
|
89
|
-
<BmLeftTabIcon>
|
|
90
|
-
<BmButtonIcon
|
|
91
|
-
icon={leadingIcon}
|
|
92
|
-
disabled={state === "disabled" ? true : false}
|
|
93
|
-
variant={variant}
|
|
94
|
-
size={size}
|
|
95
|
-
state={state}
|
|
96
|
-
color={IconColor}
|
|
97
|
-
/>
|
|
98
|
-
</BmLeftTabIcon>
|
|
99
|
-
)}
|
|
100
|
-
<BmTabText
|
|
101
|
-
disabled={state === "disabled" ? true : false}
|
|
102
|
-
variant={variant}
|
|
103
|
-
size={size}
|
|
104
|
-
state={state}
|
|
105
|
-
color={color}
|
|
106
|
-
>
|
|
107
|
-
{children}
|
|
108
|
-
</BmTabText>
|
|
109
|
-
{trailingIcon && (
|
|
110
|
-
<BmRightTabIcon>
|
|
111
|
-
<BmButtonIcon
|
|
112
|
-
icon={trailingIcon}
|
|
113
|
-
disabled={state === "disabled" ? true : false}
|
|
114
|
-
state={state}
|
|
115
|
-
variant={variant}
|
|
116
|
-
size={size}
|
|
117
|
-
color={IconColor}
|
|
118
|
-
/>
|
|
119
|
-
</BmRightTabIcon>
|
|
120
|
-
)}
|
|
121
|
-
</BmTabWrapper>
|
|
122
|
-
);
|
|
123
|
-
};
|