beem-component 1.5.8 → 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/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 +3 -3
- 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 +37 -57
- package/dist/components/Modals/modals.stories.js +15 -28
- 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 +28 -29
- package/dist/components/ProfileIcon/profileIcon.stories.js +18 -18
- 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 +2 -2
- package/dist/components/examples/InfoAccordion.js +2 -3
- package/dist/components/examples/chatBodyExample.js +1 -5
- package/dist/components/examples/selectExample.js +6 -20
- package/dist/components/globalStyles.js +1 -5
- package/dist/components/iconStyles.js +56 -58
- package/dist/components/index.js +27 -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/typography.js +14 -14
- package/dist/components/wrapper.js +8 -8
- package/package.json +54 -31
- package/src/App.js +10 -7
- package/src/index.js +6 -8
- 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 +25 -23
- package/src/lib/components/Modals/modals.stories.js +9 -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 +50 -52
- package/src/lib/components/ProfileIcon/profileIcon.stories.js +22 -22
- 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/InfoAccordion.js +1 -1
- package/src/lib/components/globalStyles.js +2 -2
- package/src/lib/components/iconStyles.js +45 -48
- package/src/lib/components/index.js +47 -46
- package/src/lib/components/input.js +20 -20
- package/src/lib/components/text.js +1 -1
- 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/src/lib/components/checkboxToggler.js +0 -19
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("/home/tejal/Desktop/Beem-UI/bm-components/node_modules/@babel/runtime/helpers/interopRequireDefault.js").default;
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -11,36 +13,45 @@ var _colors = require("./colors");
|
|
|
11
13
|
|
|
12
14
|
var _search = require("./search");
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
19
|
-
|
|
16
|
+
// import React from 'react';
|
|
20
17
|
// Old with NavbarContent Main wrapper for navbar
|
|
21
|
-
var BmNavbar = _styledComponents.default.div
|
|
18
|
+
var BmNavbar = _styledComponents.default.div.withConfig({
|
|
19
|
+
displayName: "navbar__BmNavbar"
|
|
20
|
+
})(["background:", ";box-shadow:0rem 0.286rem 0.214rem rgba(0,0,0,0.25);padding:0rem 2.5rem !important;flex-wrap:wrap;", "}"], _colors.BmPrimaryWhite, ""
|
|
22
21
|
/* width: 100vw; */
|
|
23
22
|
); // Spacing between the contents of navbar
|
|
24
23
|
|
|
25
24
|
|
|
26
25
|
exports.BmNavbar = BmNavbar;
|
|
27
26
|
|
|
28
|
-
var BmNavbarItems = _styledComponents.default.div(
|
|
27
|
+
var BmNavbarItems = _styledComponents.default.div.withConfig({
|
|
28
|
+
displayName: "navbar__BmNavbarItems"
|
|
29
|
+
})(["display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:1.429rem 0rem !important;flex-wrap:wrap;"]);
|
|
29
30
|
|
|
30
31
|
exports.BmNavbarItems = BmNavbarItems;
|
|
31
32
|
|
|
32
|
-
var GlobalNavbarWrapper = _styledComponents.default.div(
|
|
33
|
+
var GlobalNavbarWrapper = _styledComponents.default.div.withConfig({
|
|
34
|
+
displayName: "navbar__GlobalNavbarWrapper"
|
|
35
|
+
})(["display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;"]); // Main wrapper for navbar
|
|
33
36
|
|
|
34
37
|
|
|
35
38
|
exports.GlobalNavbarWrapper = GlobalNavbarWrapper;
|
|
36
|
-
var OldBmNavbar = (0, _styledComponents.default)(GlobalNavbarWrapper)
|
|
39
|
+
var OldBmNavbar = (0, _styledComponents.default)(GlobalNavbarWrapper).withConfig({
|
|
40
|
+
displayName: "navbar__OldBmNavbar"
|
|
41
|
+
})(["flex-direction:row;padding:1.429rem 2.5rem !important;background:", ";box-shadow:0rem 0.286rem 0.214rem rgba(0,0,0,0.25);}"], _colors.BmPrimaryWhite); // Navbar Profile Icon Wrapper
|
|
37
42
|
|
|
38
43
|
exports.OldBmNavbar = OldBmNavbar;
|
|
39
|
-
var BmNavBarProfile = (0, _styledComponents.default)(GlobalNavbarWrapper)(
|
|
44
|
+
var BmNavBarProfile = (0, _styledComponents.default)(GlobalNavbarWrapper).withConfig({
|
|
45
|
+
displayName: "navbar__BmNavBarProfile"
|
|
46
|
+
})(["@media (max-width:768px){display:none !important;}"]); // Navbar Search Icon Wrapper
|
|
40
47
|
|
|
41
48
|
exports.BmNavBarProfile = BmNavBarProfile;
|
|
42
|
-
var BmNavbarSearch = (0, _styledComponents.default)(_search.BmSearch)(
|
|
49
|
+
var BmNavbarSearch = (0, _styledComponents.default)(_search.BmSearch).withConfig({
|
|
50
|
+
displayName: "navbar__BmNavbarSearch"
|
|
51
|
+
})(["width:30vw;@media (max-width:768px){display:none !important;}"]); // Navbar Logo Icon Wrapper
|
|
43
52
|
|
|
44
53
|
exports.BmNavbarSearch = BmNavbarSearch;
|
|
45
|
-
var BmNavbarLogo = (0, _styledComponents.default)(GlobalNavbarWrapper)(
|
|
54
|
+
var BmNavbarLogo = (0, _styledComponents.default)(GlobalNavbarWrapper).withConfig({
|
|
55
|
+
displayName: "navbar__BmNavbarLogo"
|
|
56
|
+
})([""]);
|
|
46
57
|
exports.BmNavbarLogo = BmNavbarLogo;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("/home/tejal/Desktop/Beem-UI/bm-components/node_modules/@babel/runtime/helpers/interopRequireDefault.js").default;
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.BmSearch = void 0;
|
|
7
9
|
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("/home/tejal/Desktop/Beem-UI/bm-components/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"));
|
|
11
|
+
|
|
8
12
|
var _react = _interopRequireDefault(require("react"));
|
|
9
13
|
|
|
10
14
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
@@ -17,23 +21,15 @@ var _iconStyles = require("./iconStyles");
|
|
|
17
21
|
|
|
18
22
|
var _excluded = ["dropdown"];
|
|
19
23
|
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
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); }
|
|
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 BmSearchField = _styledComponents.default.input(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n border: none;\n padding: 0rem;\n &:visited,\n &:active,\n &:hover,\n &:focus {\n outline: none !important;\n text-decoration: none;\n color: ", ";\n }\n ", "\n"])), _colors.BmSecondaryGrey, _colors.BmPrimaryBlack, function (props) {
|
|
24
|
+
var BmSearchField = _styledComponents.default.input.withConfig({
|
|
25
|
+
displayName: "search__BmSearchField"
|
|
26
|
+
})(["color:", ";border:none;padding:0rem;&:visited,&:active,&:hover,&:focus{outline:none !important;text-decoration:none;color:", ";}", ""], _colors.BmSecondaryGrey, _colors.BmPrimaryBlack, function (props) {
|
|
33
27
|
return props.dropdown === "yes" && "margin-right: 1.714rem;";
|
|
34
28
|
});
|
|
35
29
|
|
|
36
|
-
var BmSearchWrapper = _styledComponents.default.div(
|
|
30
|
+
var BmSearchWrapper = _styledComponents.default.div.withConfig({
|
|
31
|
+
displayName: "search__BmSearchWrapper"
|
|
32
|
+
})(["display:flex;flex-direction:row;align-items:center;background:", ";border:0.071rem solid ", ";box-sizing:border-box;border-radius:0.25rem;", " padding:", ";"], _colors.BmPrimaryWhite, _colors.BmGrey400, ""
|
|
37
33
|
/* height: 2.929rem; */
|
|
38
34
|
, function (_ref) {
|
|
39
35
|
var dropdown = _ref.dropdown;
|
|
@@ -45,19 +41,22 @@ var BmSearchWrapper = _styledComponents.default.div(_templateObject2 || (_templa
|
|
|
45
41
|
}
|
|
46
42
|
});
|
|
47
43
|
|
|
48
|
-
var BmStretch = _styledComponents.default.div(
|
|
44
|
+
var BmStretch = _styledComponents.default.div.withConfig({
|
|
45
|
+
displayName: "search__BmStretch"
|
|
46
|
+
})(["display:flex;flex-direction:row;"]);
|
|
49
47
|
|
|
50
|
-
var SearchIcon = (0, _styledComponents.default)(_iconStyles.BmSearchIcon)(
|
|
48
|
+
var SearchIcon = (0, _styledComponents.default)(_iconStyles.BmSearchIcon).withConfig({
|
|
49
|
+
displayName: "search__SearchIcon"
|
|
50
|
+
})(["margin-right:0.714rem;display:flex;"]);
|
|
51
51
|
|
|
52
52
|
var BmSearch = function BmSearch(_ref2) {
|
|
53
53
|
var dropdown = _ref2.dropdown,
|
|
54
|
-
rest =
|
|
55
|
-
|
|
56
|
-
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(BmStretch, rest, /*#__PURE__*/_react.default.createElement(BmSearchWrapper, _extends({
|
|
54
|
+
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
55
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(BmStretch, rest, /*#__PURE__*/_react.default.createElement(BmSearchWrapper, Object.assign({
|
|
57
56
|
dropdown: dropdown
|
|
58
|
-
}, rest), /*#__PURE__*/_react.default.createElement(SearchIcon,
|
|
57
|
+
}, rest), /*#__PURE__*/_react.default.createElement(SearchIcon, Object.assign({
|
|
59
58
|
size: "small"
|
|
60
|
-
}, rest)), /*#__PURE__*/_react.default.createElement(BmSearchField,
|
|
59
|
+
}, rest)), /*#__PURE__*/_react.default.createElement(BmSearchField, Object.assign({}, rest, {
|
|
61
60
|
dropdown: dropdown
|
|
62
61
|
}))), dropdown === "yes" && /*#__PURE__*/_react.default.createElement(_dropdown.BmDropdown, null)));
|
|
63
62
|
};
|
|
@@ -4,31 +4,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.QuoteMark = exports.PullQuote = exports.PoppinsMedium = exports.Poppins = exports.P = exports.OpenSans = exports.Hero = exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = exports.Captions = void 0;
|
|
7
|
-
var H1 =
|
|
7
|
+
var H1 = '2.286rem';
|
|
8
8
|
exports.H1 = H1;
|
|
9
|
-
var H2 =
|
|
9
|
+
var H2 = '1.714rem';
|
|
10
10
|
exports.H2 = H2;
|
|
11
|
-
var H3 =
|
|
11
|
+
var H3 = '1.286rem';
|
|
12
12
|
exports.H3 = H3;
|
|
13
|
-
var H4 =
|
|
13
|
+
var H4 = '1.143rem';
|
|
14
14
|
exports.H4 = H4;
|
|
15
|
-
var H5 =
|
|
15
|
+
var H5 = '0.857rem';
|
|
16
16
|
exports.H5 = H5;
|
|
17
|
-
var H6 =
|
|
17
|
+
var H6 = '0.714rem';
|
|
18
18
|
exports.H6 = H6;
|
|
19
|
-
var P =
|
|
19
|
+
var P = '0.929rem';
|
|
20
20
|
exports.P = P;
|
|
21
|
-
var QuoteMark =
|
|
21
|
+
var QuoteMark = '3.429rem';
|
|
22
22
|
exports.QuoteMark = QuoteMark;
|
|
23
|
-
var PullQuote =
|
|
23
|
+
var PullQuote = '1.286rem';
|
|
24
24
|
exports.PullQuote = PullQuote;
|
|
25
|
-
var Captions =
|
|
25
|
+
var Captions = '0.714rem';
|
|
26
26
|
exports.Captions = Captions;
|
|
27
|
-
var Hero =
|
|
27
|
+
var Hero = '1rem';
|
|
28
28
|
exports.Hero = Hero;
|
|
29
|
-
var PoppinsMedium =
|
|
29
|
+
var PoppinsMedium = 'PoppinsMedium';
|
|
30
30
|
exports.PoppinsMedium = PoppinsMedium;
|
|
31
|
-
var Poppins =
|
|
31
|
+
var Poppins = 'Poppins';
|
|
32
32
|
exports.Poppins = Poppins;
|
|
33
|
-
var OpenSans =
|
|
33
|
+
var OpenSans = 'OpenSans';
|
|
34
34
|
exports.OpenSans = OpenSans;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("/home/tejal/Desktop/Beem-UI/bm-components/node_modules/@babel/runtime/helpers/interopRequireDefault.js").default;
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -7,19 +9,17 @@ exports.BmChatMenuWrapper = exports.BmChatInfoWrapper = void 0;
|
|
|
7
9
|
|
|
8
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
11
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
|
-
|
|
16
|
-
var BmChatInfoWrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n max-height: 100%;\n height: 100%;\n flex-grow: 1;\n max-width: 75%;\n width: 75%;\n ", "\n max-height: 100%;\n height: 100%;\n"])), ''
|
|
12
|
+
var BmChatInfoWrapper = _styledComponents.default.div.withConfig({
|
|
13
|
+
displayName: "wrapper__BmChatInfoWrapper"
|
|
14
|
+
})(["display:flex;flex-direction:column;max-height:100%;height:100%;flex-grow:1;max-width:75%;width:75%;", " max-height:100%;height:100%;"], ''
|
|
17
15
|
/* border: 0.714rem solid orange; */
|
|
18
16
|
);
|
|
19
17
|
|
|
20
18
|
exports.BmChatInfoWrapper = BmChatInfoWrapper;
|
|
21
19
|
|
|
22
|
-
var BmChatMenuWrapper = _styledComponents.default.div(
|
|
20
|
+
var BmChatMenuWrapper = _styledComponents.default.div.withConfig({
|
|
21
|
+
displayName: "wrapper__BmChatMenuWrapper"
|
|
22
|
+
})(["display:flex;flex-direction:row;justify-content:space-between;max-height:100%;height:100%;max-width:100%;width:100%;", " max-height:85%;height:85%;"], ''
|
|
23
23
|
/* border: 0.714rem solid orange; */
|
|
24
24
|
);
|
|
25
25
|
|
package/package.json
CHANGED
|
@@ -1,24 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "beem-component",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/components/index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"start": "PORT=3002 react-scripts start",
|
|
8
7
|
"build": "react-scripts build",
|
|
9
|
-
"
|
|
10
|
-
"eject": "react-scripts eject",
|
|
8
|
+
"build-storybook": "build-storybook",
|
|
11
9
|
"clean": "rimraf dist",
|
|
12
10
|
"compile": "npm run clean && cross-env NODE_ENV=production babel src/lib --out-dir dist --copy-files --ignore __tests__,spec.js,test.js,stories.js,__snapshots__",
|
|
11
|
+
"eject": "react-scripts eject",
|
|
12
|
+
"start": "PORT=3002 react-scripts start",
|
|
13
13
|
"storybook": "start-storybook -p 6006",
|
|
14
|
-
"
|
|
14
|
+
"test": "react-scripts test"
|
|
15
15
|
},
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
"browserslist": {
|
|
17
|
+
"production": [
|
|
18
|
+
">0.2%",
|
|
19
|
+
"not dead",
|
|
20
|
+
"not op_mini all"
|
|
21
|
+
],
|
|
22
|
+
"development": [
|
|
23
|
+
"last 1 chrome version",
|
|
24
|
+
"last 1 firefox version",
|
|
25
|
+
"last 1 safari version"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"eslintConfig": {
|
|
29
|
+
"extends": [
|
|
30
|
+
"react-app",
|
|
31
|
+
"react-app/jest"
|
|
32
|
+
]
|
|
22
33
|
},
|
|
23
34
|
"dependencies": {
|
|
24
35
|
"@emotion/react": "^11.7.1",
|
|
@@ -30,6 +41,7 @@
|
|
|
30
41
|
"js-file-download": "^0.4.12",
|
|
31
42
|
"node-sass": "^6.0.1",
|
|
32
43
|
"polished": "^4.1.3",
|
|
44
|
+
"prop-types": "^15.8.1",
|
|
33
45
|
"react": "^17.0.2",
|
|
34
46
|
"react-dom": "^17.0.2",
|
|
35
47
|
"react-router-dom": "^5.3.0",
|
|
@@ -38,29 +50,14 @@
|
|
|
38
50
|
"styled-components": "^5.3.0",
|
|
39
51
|
"web-vitals": "^1.1.2"
|
|
40
52
|
},
|
|
41
|
-
"eslintConfig": {
|
|
42
|
-
"extends": [
|
|
43
|
-
"react-app",
|
|
44
|
-
"react-app/jest"
|
|
45
|
-
]
|
|
46
|
-
},
|
|
47
|
-
"browserslist": {
|
|
48
|
-
"production": [
|
|
49
|
-
">0.2%",
|
|
50
|
-
"not dead",
|
|
51
|
-
"not op_mini all"
|
|
52
|
-
],
|
|
53
|
-
"development": [
|
|
54
|
-
"last 1 chrome version",
|
|
55
|
-
"last 1 firefox version",
|
|
56
|
-
"last 1 safari version"
|
|
57
|
-
]
|
|
58
|
-
},
|
|
59
53
|
"devDependencies": {
|
|
60
|
-
"@babel/cli": "^7.
|
|
54
|
+
"@babel/cli": "^7.16.0",
|
|
55
|
+
"@babel/core": "^7.16.0",
|
|
61
56
|
"@babel/preset-env": "^7.14.8",
|
|
62
57
|
"@babel/preset-react": "^7.14.5",
|
|
63
|
-
"
|
|
58
|
+
"@commitlint/cli": "^14.1.0",
|
|
59
|
+
"@commitlint/config-conventional": "^14.1.0",
|
|
60
|
+
"@commitlint/travis-cli": "^14.1.0",
|
|
64
61
|
"@storybook/addon-actions": "^6.3.2",
|
|
65
62
|
"@storybook/addon-controls": "^6.3.12",
|
|
66
63
|
"@storybook/addon-docs": "^6.3.12",
|
|
@@ -72,6 +69,32 @@
|
|
|
72
69
|
"@storybook/preset-create-react-app": "^3.2.0",
|
|
73
70
|
"@storybook/react": "^6.3.2",
|
|
74
71
|
"@storybook/theming": "^6.4.9",
|
|
72
|
+
"babel-eslint": "^10.1.0",
|
|
73
|
+
"babel-plugin-react-intl": "^5.1.18",
|
|
74
|
+
"babel-plugin-styled-components": "^1.13.3",
|
|
75
|
+
"babel-preset-react-app": "^10.0.0",
|
|
76
|
+
"commitizen": "^4.2.4",
|
|
77
|
+
"cross-env": "^7.0.3",
|
|
78
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
79
|
+
"eslint-config-airbnb": "^18.2.1",
|
|
80
|
+
"eslint-config-prettier": "^8.3.0",
|
|
81
|
+
"eslint-plugin-import": "^2.25.2",
|
|
82
|
+
"eslint-plugin-jest": "^25.2.2",
|
|
83
|
+
"eslint-plugin-jsdoc": "^32.2.0",
|
|
84
|
+
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
85
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
86
|
+
"eslint-plugin-react": "^7.26.1",
|
|
87
|
+
"generate-changelog": "^1.8.0",
|
|
88
|
+
"husky": "^7.0.4",
|
|
89
|
+
"lint-staged": "^11.2.6",
|
|
90
|
+
"prettier": "^2.4.1",
|
|
75
91
|
"storybook-addon-jsx": "^7.3.14"
|
|
92
|
+
},
|
|
93
|
+
"peerDependencies": {
|
|
94
|
+
"babel-loader": "8.1.0",
|
|
95
|
+
"react": "^17.0.2",
|
|
96
|
+
"react-dom": "^17.0.2",
|
|
97
|
+
"react-scripts": "4.0.3",
|
|
98
|
+
"web-vitals": "^1.1.2"
|
|
76
99
|
}
|
|
77
100
|
}
|
package/src/App.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import React, { useState } from
|
|
2
|
-
import { BmModal, BmButton
|
|
3
|
-
import {
|
|
4
|
-
import beem from './lib/assets/beem.jpeg';
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { GlobalStyle, BmModal, BmButton } from './lib/components';
|
|
3
|
+
import { BmCheckboxToggle } from './lib/components/Checkbox/checkboxToggler';
|
|
5
4
|
|
|
6
5
|
const Chat = () => {
|
|
6
|
+
const [checked, setChecked] = useState(false);
|
|
7
7
|
const [showModal, setShowModal] = useState(false);
|
|
8
|
-
|
|
9
8
|
return (
|
|
10
9
|
<>
|
|
11
10
|
<GlobalStyle />
|
|
@@ -20,14 +19,18 @@ const Chat = () => {
|
|
|
20
19
|
<h5>This modal has a sub heading</h5>
|
|
21
20
|
</BmModal.SubHeader>
|
|
22
21
|
<BmModal.Body>
|
|
23
|
-
<
|
|
22
|
+
<BmCheckboxToggle
|
|
23
|
+
checked={checked}
|
|
24
|
+
onChange={() => setChecked(!checked)}
|
|
25
|
+
disabled
|
|
26
|
+
label={<h3>Field Label</h3>}
|
|
27
|
+
/>
|
|
24
28
|
<p>This is a body</p>
|
|
25
29
|
</BmModal.Body>
|
|
26
30
|
<BmModal.Footer>
|
|
27
31
|
<p>This is a footer</p>
|
|
28
32
|
</BmModal.Footer>
|
|
29
33
|
</BmModal>
|
|
30
|
-
<BmProfileIcon img={beem} channel="instagram" />
|
|
31
34
|
</>
|
|
32
35
|
);
|
|
33
36
|
};
|
package/src/index.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import ReactDOM from
|
|
3
|
-
import App from
|
|
4
|
-
import reportWebVitals from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
import App from './App';
|
|
4
|
+
import reportWebVitals from './reportWebVitals';
|
|
5
|
+
|
|
5
6
|
ReactDOM.render(
|
|
6
7
|
<React.StrictMode>
|
|
7
8
|
<App />
|
|
8
9
|
</React.StrictMode>,
|
|
9
|
-
document.getElementById(
|
|
10
|
+
document.getElementById('root')
|
|
10
11
|
);
|
|
11
12
|
|
|
12
|
-
// If you want to start measuring performance in your app, pass a function
|
|
13
|
-
// to log results (for example: reportWebVitals(console.log))
|
|
14
|
-
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
|
15
13
|
reportWebVitals();
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { KeyboardArrowDown, KeyboardArrowUp } from
|
|
1
|
+
/* eslint-disable react/display-name */
|
|
2
|
+
/* eslint-disable react/destructuring-assignment */
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import { KeyboardArrowDown, KeyboardArrowUp } from '@material-ui/icons';
|
|
7
|
+
import { BmPrimaryWhite } from '../colors';
|
|
8
|
+
import { BmIcons } from '../iconStyles';
|
|
7
9
|
|
|
8
10
|
const { Provider, Consumer } = React.createContext({});
|
|
9
11
|
|
|
10
12
|
const Dropdown = (value, rest) => {
|
|
11
|
-
if (value.expandIcon && value.expandIcon ===
|
|
13
|
+
if (value.expandIcon && value.expandIcon === 'none') {
|
|
12
14
|
return;
|
|
13
15
|
}
|
|
14
16
|
if (!value.expandIcon) {
|
|
@@ -18,7 +20,7 @@ const Dropdown = (value, rest) => {
|
|
|
18
20
|
<BmIcons icon={<KeyboardArrowDown />} {...rest} />
|
|
19
21
|
);
|
|
20
22
|
}
|
|
21
|
-
if (value.expandIcon && value.expandIcon !==
|
|
23
|
+
if (value.expandIcon && value.expandIcon !== 'none') {
|
|
22
24
|
return <BmIcons icon={value.expandIcon} />;
|
|
23
25
|
}
|
|
24
26
|
};
|
|
@@ -44,12 +46,28 @@ const BmAccordionWrapper = styled.div`
|
|
|
44
46
|
flex-direction: column;
|
|
45
47
|
`;
|
|
46
48
|
|
|
47
|
-
const BmAccordion = ({
|
|
48
|
-
|
|
49
|
+
const BmAccordion = ({
|
|
50
|
+
children,
|
|
51
|
+
disabled,
|
|
52
|
+
expandIcon,
|
|
53
|
+
Open,
|
|
54
|
+
expandIconPosition,
|
|
55
|
+
...rest
|
|
56
|
+
}) => {
|
|
57
|
+
const [toggle, setToggle] = useState(!!Open);
|
|
49
58
|
|
|
50
59
|
return (
|
|
51
60
|
<BmAccordionWrapper>
|
|
52
|
-
<Provider
|
|
61
|
+
<Provider
|
|
62
|
+
value={{
|
|
63
|
+
toggle,
|
|
64
|
+
setToggle,
|
|
65
|
+
disabled,
|
|
66
|
+
expandIcon,
|
|
67
|
+
expandIconPosition,
|
|
68
|
+
...rest,
|
|
69
|
+
}}
|
|
70
|
+
>
|
|
53
71
|
{children}
|
|
54
72
|
</Provider>
|
|
55
73
|
</BmAccordionWrapper>
|
|
@@ -74,12 +92,12 @@ BmAccordion.Title = ({
|
|
|
74
92
|
: value.setToggle(false)
|
|
75
93
|
}
|
|
76
94
|
>
|
|
77
|
-
{value.expandIconPosition ===
|
|
78
|
-
|
|
95
|
+
{value.expandIconPosition === 'left' ||
|
|
96
|
+
(value.expandIconPosition === undefined && Dropdown(value, rest))}
|
|
79
97
|
{leadingIcon && <BmIcons icon={leadingIcon} size={size} />}
|
|
80
98
|
<BmAccordionDetails>{children}</BmAccordionDetails>
|
|
81
99
|
{trailingIcon && <BmIcons icon={trailingIcon} size={size} />}
|
|
82
|
-
{value.expandIconPosition ===
|
|
100
|
+
{value.expandIconPosition === 'right' && Dropdown(value, rest)}
|
|
83
101
|
</BmAccordionMenu>
|
|
84
102
|
)}
|
|
85
103
|
</Consumer>
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
/* eslint-disable import/no-anonymous-default-export */
|
|
2
|
-
import React from
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { text, boolean, select } from '@storybook/addon-knobs';
|
|
4
|
+
import { Favorite, Home } from '@material-ui/icons';
|
|
5
|
+
import BmAccordion from './Accordion';
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
8
|
component: BmAccordion,
|
|
9
9
|
subcomponents: BmAccordion.Title,
|
|
10
|
-
title:
|
|
10
|
+
title: 'components/Accordion',
|
|
11
11
|
argTypes: {
|
|
12
12
|
size: {
|
|
13
|
-
options: [
|
|
14
|
-
control: { type:
|
|
15
|
-
description:
|
|
16
|
-
defaultValue: { summary:
|
|
13
|
+
options: ['small', 'medium', 'large'],
|
|
14
|
+
control: { type: 'select' },
|
|
15
|
+
description: 'Size of the icons',
|
|
16
|
+
defaultValue: { summary: 'large' },
|
|
17
17
|
},
|
|
18
18
|
disabled: {
|
|
19
|
-
description:
|
|
19
|
+
description: 'Optional',
|
|
20
20
|
defaultValue: { summary: false },
|
|
21
|
-
control: { type:
|
|
21
|
+
control: { type: 'boolean' },
|
|
22
22
|
},
|
|
23
23
|
Open: {
|
|
24
|
-
description:
|
|
24
|
+
description: 'Accordion body will be open initially',
|
|
25
25
|
defaultValue: { summary: false },
|
|
26
|
-
control: { type:
|
|
26
|
+
control: { type: 'boolean' },
|
|
27
27
|
},
|
|
28
28
|
children: {
|
|
29
|
-
description:
|
|
29
|
+
description: 'Accordion Title Text',
|
|
30
30
|
defaultValue: { summary: undefined },
|
|
31
31
|
},
|
|
32
32
|
expandIcon: {
|
|
@@ -34,51 +34,51 @@ export default {
|
|
|
34
34
|
defaultValue: { summary: undefined },
|
|
35
35
|
},
|
|
36
36
|
expandIconPosition: {
|
|
37
|
-
options: [
|
|
38
|
-
control: { type:
|
|
39
|
-
description:
|
|
40
|
-
defaultValue: { summary:
|
|
37
|
+
options: ['left', 'right'],
|
|
38
|
+
control: { type: 'select' },
|
|
39
|
+
description: 'Position of the expand Icon',
|
|
40
|
+
defaultValue: { summary: 'left' },
|
|
41
41
|
},
|
|
42
42
|
leadingIcon: {
|
|
43
|
-
description:
|
|
43
|
+
description: 'Material-UI icon(optional)',
|
|
44
44
|
defaultValue: { summary: undefined },
|
|
45
45
|
},
|
|
46
46
|
trailingIcon: {
|
|
47
|
-
description:
|
|
47
|
+
description: 'Material-UI icon(optional)',
|
|
48
48
|
defaultValue: { summary: undefined },
|
|
49
49
|
},
|
|
50
50
|
},
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
const optionSize = {
|
|
54
|
-
small:
|
|
55
|
-
medium:
|
|
56
|
-
large:
|
|
54
|
+
small: 'small',
|
|
55
|
+
medium: 'medium',
|
|
56
|
+
large: 'large',
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
const optionExpandIcon = {
|
|
60
|
-
left:
|
|
61
|
-
right:
|
|
60
|
+
left: 'left',
|
|
61
|
+
right: 'medium',
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
export const Accordion = () => {
|
|
65
65
|
return (
|
|
66
66
|
<div>
|
|
67
67
|
<BmAccordion
|
|
68
|
-
disabled={boolean(
|
|
69
|
-
Open={boolean(
|
|
68
|
+
disabled={boolean('disabled', false)}
|
|
69
|
+
Open={boolean('disabled', false)}
|
|
70
70
|
>
|
|
71
71
|
<BmAccordion.Title
|
|
72
72
|
leadingIcon={<Home />}
|
|
73
73
|
trailingIcon={<Favorite />}
|
|
74
|
-
size={select(
|
|
74
|
+
size={select('size', optionSize, 'large')}
|
|
75
75
|
expandIconPosition={select(
|
|
76
|
-
|
|
76
|
+
'expandIconPosition',
|
|
77
77
|
optionExpandIcon,
|
|
78
|
-
|
|
78
|
+
'left'
|
|
79
79
|
)}
|
|
80
80
|
>
|
|
81
|
-
<h3>{text(
|
|
81
|
+
<h3>{text('children', 'Accordion')}</h3>
|
|
82
82
|
</BmAccordion.Title>
|
|
83
83
|
<BmAccordion.Body>Accordion Body</BmAccordion.Body>
|
|
84
84
|
</BmAccordion>
|