beem-component 2.0.27 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +4 -2
- package/Jenkinsfile +20 -5
- package/dist/components/Accordion/Accordion.js +55 -66
- package/dist/components/Accordion/Accordion.stories.js +5 -6
- package/dist/components/Avatars/avatars.js +33 -23
- package/dist/components/Avatars/avatars.stories.js +5 -10
- package/dist/components/BannerCard/bannerCard.stories.js +6 -7
- package/dist/components/BannerCard/bannerCards.js +38 -40
- package/dist/components/BmSelector/BmSelector.js +120 -0
- package/dist/components/BmSelector/BmSelector.stories.js +138 -0
- package/dist/components/ButtonGroup/buttonGroup.js +14 -15
- package/dist/components/ButtonGroup/buttonGroup.stories.js +11 -26
- package/dist/components/Buttons/Stories/basicbutton.stories.js +5 -10
- package/dist/components/Buttons/Stories/buttonAlertIcons.stories.js +4 -8
- package/dist/components/Buttons/Stories/buttonIconsOnly.stories.js +4 -8
- package/dist/components/Buttons/buttonAlertIcons.js +40 -58
- package/dist/components/Buttons/buttonDropdown copy.js +52 -35
- package/dist/components/Buttons/buttonDropdown.js +5 -3
- package/dist/components/Buttons/buttonIconsOnly.js +32 -25
- package/dist/components/Buttons/buttons.js +105 -72
- package/dist/components/Card_v2/Card.js +78 -0
- package/dist/components/Card_v2/Card.stories.js +60 -0
- package/dist/components/Cards/cards.js +3 -4
- package/dist/components/Cards/cards.stories.js +4 -5
- package/dist/components/ChatComponents/ChatBody/FeedPostComments.js +65 -39
- package/dist/components/ChatComponents/ChatBody/chatBody.js +224 -189
- package/dist/components/ChatComponents/ChatBody/chatBody.stories.js +4 -5
- package/dist/components/ChatComponents/ChatBody/sessionDetails.js +11 -9
- package/dist/components/ChatComponents/ChatBody/sessionTimeline.js +12 -10
- package/dist/components/ChatComponents/ChatHeader/chatHeader.js +3 -4
- package/dist/components/ChatComponents/ChatHeader/chatHeader.stories.js +3 -4
- package/dist/components/ChatComponents/ColorPicker/colorPicker.js +3 -6
- package/dist/components/ChatComponents/ColorPicker/colorPicker.stories.js +7 -10
- package/dist/components/ChatComponents/ContactCards/contactCards.js +40 -31
- package/dist/components/ChatComponents/ContactCards/contactCards.stories.js +3 -4
- package/dist/components/ChatComponents/FormAccordion/FormAccordion.js +3 -4
- package/dist/components/ChatComponents/FormAccordion/FormAccordion.stories.js +3 -4
- package/dist/components/ChatComponents/InfoTab/infoTab.js +3 -5
- package/dist/components/ChatComponents/InfoTab/infoTab.stories.js +3 -4
- package/dist/components/ChatComponents/LabelAccordion/LabelAccordion.js +3 -4
- package/dist/components/ChatComponents/LabelAccordion/LabelAccordion.stories.js +3 -4
- package/dist/components/ChatComponents/NoteAccordion/NoteAccordion.js +3 -4
- package/dist/components/ChatComponents/NoteAccordion/NoteAccordion.stories.js +3 -4
- package/dist/components/Chats/chat.js +56 -50
- package/dist/components/Chats/chatInput.js +9 -14
- package/dist/components/Chats/chatwrapper.js +8 -14
- package/dist/components/Checkbox/checkboxToggler.js +20 -20
- package/dist/components/Checkbox/checkboxToggler.stories.js +12 -35
- package/dist/components/InfoPanel/InfoPanel.js +141 -0
- package/dist/components/InfoPanel/InfoPanel.stories.js +200 -0
- package/dist/components/InputCounter/inputCounter.js +17 -18
- package/dist/components/Jumbotron/Jumbotron.js +8 -11
- package/dist/components/Jumbotron/Jumbotron.stories.js +3 -4
- package/dist/components/LabelWithIcon/LabelWithIcon.js +63 -0
- package/dist/components/LabelWithIcon/LabelWithIcon.stories.js +59 -0
- package/dist/components/Lists/listBox.js +21 -25
- package/dist/components/Lists/listBox.stories.js +7 -20
- package/dist/components/Lists/listHeader.stories.js +4 -8
- package/dist/components/Lists/listheader.js +17 -14
- package/dist/components/Lists/rowLabels.js +26 -24
- package/dist/components/Lists/rowLabels.stories.js +11 -18
- package/dist/components/Loader/loader.js +16 -14
- package/dist/components/Loader/loader.stories.js +4 -8
- package/dist/components/MainWrapper/index.js +3 -4
- package/dist/components/MessageCounter/MessageCounter.stories.js +4 -5
- package/dist/components/MessageCounter/messageCounter.js +15 -10
- package/dist/components/Modals/modal.js +57 -72
- package/dist/components/Modals/modals.stories.js +16 -45
- package/dist/components/MojaAccordion/MojaAccordion.js +49 -55
- package/dist/components/MultipleDateSelector/multipleDateSelector.js +14 -18
- package/dist/components/NoteBar/noteBar.js +22 -32
- package/dist/components/NoteBar/noteBar.stories.js +5 -10
- package/dist/components/PaymentBox/paymentBox.js +14 -11
- package/dist/components/PaymentBox/paymentBox.stories.js +3 -4
- package/dist/components/PerformanceIndicator/performaceIndicator.stories.js +4 -8
- package/dist/components/PerformanceIndicator/performanceIndicator.js +17 -14
- package/dist/components/Pills/pills.js +30 -38
- package/dist/components/Pills/pills.stories.js +5 -10
- package/dist/components/ProfileIcon/ProfileIcon.js +26 -36
- package/dist/components/ProfileIcon/profileIcon.stories.js +6 -12
- package/dist/components/ProgressBar/progressbar.js +14 -12
- package/dist/components/ProgressBar/progressbar.stories.js +4 -8
- package/dist/components/ProgressIndicator/ProgressIndicator.js +121 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.stories.js +99 -0
- package/dist/components/ProgressRing/progressRing.js +48 -50
- package/dist/components/ProgressRing/progressRing.stories.js +5 -10
- package/dist/components/RouteLink/link.js +3 -8
- package/dist/components/RouteLink/link.stories.js +3 -4
- package/dist/components/ScrollBar/scrollBar.js +18 -26
- package/dist/components/SelectionNotice/SelectionNotice.js +57 -0
- package/dist/components/SelectionNotice/SelectionNotice.stories.js +35 -0
- package/dist/components/Stepper/stepper.js +4 -11
- package/dist/components/SuperFluid/Content/index.js +3 -4
- package/dist/components/SuperFluid/ContentTitle.js/index.js +6 -10
- package/dist/components/SuperFluid/SegmentCard/index.js +11 -21
- package/dist/components/Tabs/tabs.js +32 -24
- package/dist/components/Tabs/tabs.stories.js +6 -12
- package/dist/components/Tags/tags.js +65 -63
- package/dist/components/Tags/tags.stories.js +6 -12
- package/dist/components/breakpoints.js +3 -5
- package/dist/components/chatHeader.js +7 -12
- package/dist/components/checkbox.js +30 -25
- package/dist/components/colors.js +31 -62
- package/dist/components/contacts.js +32 -35
- package/dist/components/dropdown.js +18 -39
- package/dist/components/dropdownButton.js +38 -28
- package/dist/components/dropdownItems.js +23 -26
- package/dist/components/examples/App.js +3 -4
- package/dist/components/examples/InfoAccordion.js +3 -4
- package/dist/components/examples/chatBodyExample.js +4 -7
- package/dist/components/examples/selectExample.js +12 -30
- package/dist/components/globalStyles.js +1 -2
- package/dist/components/iconStyles.js +69 -103
- package/dist/components/index-copy.js +197 -197
- package/dist/components/index.js +106 -66
- package/dist/components/input.js +36 -25
- package/dist/components/logo.js +10 -9
- package/dist/components/navbar.js +9 -16
- package/dist/components/search.js +18 -16
- package/dist/components/shadow.js +1 -2
- package/dist/components/text.js +9 -18
- package/dist/components/typography.js +14 -28
- package/dist/components/wrapper.js +4 -6
- package/nginx.conf +26 -12
- package/package.json +3 -1
- package/src/App.js +246 -3
- package/src/lib/components/BmSelector/BmSelector.js +154 -0
- package/src/lib/components/BmSelector/BmSelector.stories.jsx +125 -0
- package/src/lib/components/Buttons/buttons.js +12 -8
- package/src/lib/components/Card_v2/Card.js +128 -0
- package/src/lib/components/Card_v2/Card.stories.jsx +94 -0
- package/src/lib/components/InfoPanel/InfoPanel.js +221 -0
- package/src/lib/components/InfoPanel/InfoPanel.stories.jsx +169 -0
- package/src/lib/components/LabelWithIcon/LabelWithIcon.js +61 -0
- package/src/lib/components/LabelWithIcon/LabelWithIcon.stories.jsx +59 -0
- package/src/lib/components/ProgressIndicator/ProgressIndicator.js +208 -0
- package/src/lib/components/ProgressIndicator/ProgressIndicator.stories.jsx +91 -0
- package/src/lib/components/SelectionNotice/SelectionNotice.js +65 -0
- package/src/lib/components/SelectionNotice/SelectionNotice.stories.jsx +40 -0
- package/src/lib/components/index.js +14 -0
- package/src/util/convertToRGBA.js +21 -0
- package/storybook-static/140.d6695a165d8dcc810b2e.manager.bundle.js +1 -0
- package/storybook-static/140.f87feb0b.iframe.bundle.js +1 -0
- package/storybook-static/149.7cc11ef8.iframe.bundle.js +2 -0
- package/storybook-static/149.7cc11ef8.iframe.bundle.js.LICENSE.txt +14 -0
- package/storybook-static/192.08b67b8c.iframe.bundle.js +1 -0
- package/storybook-static/246.9ad91c22.iframe.bundle.js +2 -0
- package/storybook-static/{vendors~main.7fe78cc2.iframe.bundle.js.LICENSE.txt → 246.9ad91c22.iframe.bundle.js.LICENSE.txt} +48 -16
- package/storybook-static/448.0ad0b2a9.iframe.bundle.js +2 -0
- package/storybook-static/448.0ad0b2a9.iframe.bundle.js.LICENSE.txt +8 -0
- package/storybook-static/448.502f738789de31a83e1c.manager.bundle.js +2 -0
- package/storybook-static/448.502f738789de31a83e1c.manager.bundle.js.LICENSE.txt +8 -0
- package/storybook-static/463.694cb3b0a2f8b0deba70.manager.bundle.js +2 -0
- package/storybook-static/463.694cb3b0a2f8b0deba70.manager.bundle.js.LICENSE.txt +31 -0
- package/storybook-static/463.7b3b5742.iframe.bundle.js +2 -0
- package/storybook-static/463.7b3b5742.iframe.bundle.js.LICENSE.txt +31 -0
- package/storybook-static/58.56a2198b.iframe.bundle.js +1 -0
- package/storybook-static/58.cd3f8ad06a1200571eab.manager.bundle.js +1 -0
- package/storybook-static/676.d74803c6ab12eac1cdb2.manager.bundle.js +2 -0
- package/storybook-static/{vendors~main.1750028c2d68e574fb1d.manager.bundle.js.LICENSE.txt → 676.d74803c6ab12eac1cdb2.manager.bundle.js.LICENSE.txt} +20 -30
- package/storybook-static/720.d729a720931e1312e597.manager.bundle.js +2 -0
- package/storybook-static/720.e12f6aa2.iframe.bundle.js +2 -0
- package/storybook-static/794.0543a68a8b5aa273273a.manager.bundle.js +1 -0
- package/storybook-static/929.5353bbe2.iframe.bundle.js +1 -0
- package/storybook-static/929.ed1807a8ea3e2353d440.manager.bundle.js +1 -0
- package/storybook-static/9b058fcb1416fea75e6c.png +0 -0
- package/storybook-static/f29af3502f15acc765a8.png +0 -0
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/iframe.html +22 -6
- package/storybook-static/index.html +66 -109
- package/storybook-static/main.1a29aa69.iframe.bundle.js +1 -0
- package/storybook-static/main.69bad789e0a3d801264b.manager.bundle.js +1 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/runtime~main.87eecef7.iframe.bundle.js +1 -0
- package/storybook-static/runtime~main.dd5308492057ff00c469.manager.bundle.js +1 -0
- package/storybook-static/static/css/main.08a2eb27.css +6 -0
- package/storybook-static/static/css/main.08a2eb27.css.map +1 -0
- package/storybook-static/0.00c62ec79c260aedbb98.manager.bundle.js +0 -2
- package/storybook-static/0.00c62ec79c260aedbb98.manager.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/0.96c45dd8.iframe.bundle.js +0 -1
- package/storybook-static/1.dc6acfa9.iframe.bundle.js +0 -3
- package/storybook-static/1.dc6acfa9.iframe.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/1.dc6acfa9.iframe.bundle.js.map +0 -1
- package/storybook-static/1.dc7dcdaec2def2f224fd.manager.bundle.js +0 -1
- package/storybook-static/2.24353ddc.iframe.bundle.js +0 -1
- package/storybook-static/3.8bb2173c.iframe.bundle.js +0 -1
- package/storybook-static/5.0779e3847d325dece216.manager.bundle.js +0 -1
- package/storybook-static/6.8bd405c2576206749a16.manager.bundle.js +0 -2
- package/storybook-static/7.9d4ba19cf58425e7ff0d.manager.bundle.js +0 -1
- package/storybook-static/7.f0cfc757.iframe.bundle.js +0 -1
- package/storybook-static/8.91de97de.iframe.bundle.js +0 -3
- package/storybook-static/8.91de97de.iframe.bundle.js.map +0 -1
- package/storybook-static/8.b4e9ec0ec7648e02a923.manager.bundle.js +0 -1
- package/storybook-static/9.40ec65d6.iframe.bundle.js +0 -1
- package/storybook-static/asset-manifest.json +0 -30
- package/storybook-static/main.3c8d8027.iframe.bundle.js +0 -1
- package/storybook-static/main.3e5804fe56d1f580b088.manager.bundle.js +0 -1
- package/storybook-static/runtime~main.d3a18d6a.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.ff106120648356c6069d.manager.bundle.js +0 -1
- package/storybook-static/static/css/main.b44a190d.chunk.css +0 -4
- package/storybook-static/static/css/main.b44a190d.chunk.css.map +0 -1
- package/storybook-static/vendors~main.1750028c2d68e574fb1d.manager.bundle.js +0 -2
- package/storybook-static/vendors~main.7fe78cc2.iframe.bundle.js +0 -3
- package/storybook-static/vendors~main.7fe78cc2.iframe.bundle.js.map +0 -1
- /package/storybook-static/{static/media/PoppinsMedium.0ba26f6c.woff → 0ba26f6cfe2f94ec2b43.woff} +0 -0
- /package/storybook-static/{static/media/PoppinsRegular.13b9af9c.eot → 13b9af9c8b2b4d656251.eot} +0 -0
- /package/storybook-static/{static/media/OpenSans-Regular.1b0809d5.ttf → 1b0809d519837cb7aad3.ttf} +0 -0
- /package/storybook-static/{static/media/PoppinsBold.1eae2d48.woff2 → 1eae2d48398534b6e1fe.woff2} +0 -0
- /package/storybook-static/{static/media/PoppinsRegular.43e9b50d.svg → 43e9b50d6f4141c6275f.svg} +0 -0
- /package/storybook-static/{static/media/PoppinsMedium.49b46ace.eot → 49b46acec5a811ce1edd.eot} +0 -0
- /package/storybook-static/{static/media/PoppinsRegular.4a4d5420.woff → 4a4d54208e3b43dcdd6e.woff} +0 -0
- /package/storybook-static/{static/media/PoppinsBold.53ff6749.eot → 53ff67494885a390867f.eot} +0 -0
- /package/storybook-static/{static/media/PoppinsBold.53ff971f.ttf → 53ff971f3c691d03daf6.ttf} +0 -0
- /package/storybook-static/{static/media/PoppinsSemiBold.5692c77f.ttf → 5692c77f2768f53db4fb.ttf} +0 -0
- /package/storybook-static/{static/media/PoppinsMedium.57a99fa8.woff2 → 57a99fa8569430db3aa1.woff2} +0 -0
- /package/storybook-static/{6.8bd405c2576206749a16.manager.bundle.js.LICENSE.txt → 720.d729a720931e1312e597.manager.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{8.91de97de.iframe.bundle.js.LICENSE.txt → 720.e12f6aa2.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{static/media/PoppinsSemiBold.80138c67.woff → 80138c67abf7843ea7e5.woff} +0 -0
- /package/storybook-static/{static/media/PoppinsBold.850fc4f3.svg → 850fc4f3768c0af34ea8.svg} +0 -0
- /package/storybook-static/{static/media/PoppinsRegular.9a7cc7ec.woff2 → 9a7cc7ec4e1eda4f7e6d.woff2} +0 -0
- /package/storybook-static/{static/media/PoppinsBold.b33c148b.woff → b33c148b95e9b282af64.woff} +0 -0
- /package/storybook-static/{static/media/PoppinsMedium.b7e43707.svg → b7e43707906d1445e127.svg} +0 -0
- /package/storybook-static/{static/media/PoppinsSemiBold.c442695a.eot → c442695a5fcf958609b8.eot} +0 -0
- /package/storybook-static/{static/media/PoppinsMedium.c98dddbd.ttf → c98dddbdc5b1e18988b9.ttf} +0 -0
- /package/storybook-static/{static/media/PoppinsSemiBold.e1948d56.svg → e1948d56fc87f569ef8d.svg} +0 -0
- /package/storybook-static/{static/media/PoppinsRegular.e1bc9021.ttf → e1bc9021c9d8ba86968b.ttf} +0 -0
- /package/storybook-static/{static/media/PoppinsSemiBold.f27050e2.woff2 → f27050e2684287d42c91.woff2} +0 -0
|
@@ -9,23 +9,26 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _colors = require("../colors");
|
|
11
11
|
var _iconStyles = require("../iconStyles");
|
|
12
|
-
|
|
13
|
-
function _interopRequireDefault(
|
|
14
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
15
|
-
function _objectWithoutProperties(
|
|
16
|
-
function _objectWithoutPropertiesLoose(
|
|
17
|
-
|
|
12
|
+
const _excluded = ["children", "trailingIcon", "size", "color"];
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
15
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
16
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
17
|
+
const Container = exports.Container = _styledComponents.default.div.withConfig({
|
|
18
18
|
displayName: "listheader__Container"
|
|
19
|
-
})(["display:flex;flex-direction:row;justify-content:space-between;padding:0rem 1rem 1rem 1rem;border-bottom:0.125rem solid ", ";"],
|
|
20
|
-
|
|
19
|
+
})(["display:flex;flex-direction:row;justify-content:space-between;padding:0rem 1rem 1rem 1rem;border-bottom:0.125rem solid ", ";"], _ref => {
|
|
20
|
+
let {
|
|
21
|
+
color
|
|
22
|
+
} = _ref;
|
|
21
23
|
return color || "".concat(_colors.BmPrimaryBlue);
|
|
22
24
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
const BmListHeader = _ref2 => {
|
|
26
|
+
let {
|
|
27
|
+
children,
|
|
28
|
+
trailingIcon,
|
|
29
|
+
size,
|
|
30
|
+
color
|
|
31
|
+
} = _ref2,
|
|
29
32
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
30
33
|
return /*#__PURE__*/_react.default.createElement(Container, _extends({
|
|
31
34
|
color: color
|
|
@@ -9,40 +9,42 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _colors = require("../colors");
|
|
11
11
|
var _iconStyles = require("../iconStyles");
|
|
12
|
-
|
|
13
|
-
function _interopRequireDefault(
|
|
14
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
15
|
-
function _objectWithoutProperties(
|
|
16
|
-
function _objectWithoutPropertiesLoose(
|
|
17
|
-
|
|
12
|
+
const _excluded = ["children", "trailingIcon", "leadingIcon", "label", "color", "size"];
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
15
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
16
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
17
|
+
const Container = exports.Container = _styledComponents.default.div.withConfig({
|
|
18
18
|
displayName: "rowLabels__Container"
|
|
19
|
-
})(["display:flex;flex-direction:row;align-items:center;padding:0.5rem 1rem;justify-content:space-between;background:", ";margin:0rem;&:hover{background:", ";}", ";"], _colors.BmPrimaryWhite, _colors.BmGrey100,
|
|
20
|
-
|
|
19
|
+
})(["display:flex;flex-direction:row;align-items:center;padding:0.5rem 1rem;justify-content:space-between;background:", ";margin:0rem;&:hover{background:", ";}", ";"], _colors.BmPrimaryWhite, _colors.BmGrey100, _ref => {
|
|
20
|
+
let {
|
|
21
|
+
disabled
|
|
22
|
+
} = _ref;
|
|
21
23
|
return disabled && " \n pointer-events: none;\n opacity: 0.5;\n background: ".concat(_colors.BmGrey100, ";\n");
|
|
22
24
|
});
|
|
23
|
-
exports.
|
|
24
|
-
var LeftContainer = _styledComponents.default.div.withConfig({
|
|
25
|
+
const LeftContainer = exports.LeftContainer = _styledComponents.default.div.withConfig({
|
|
25
26
|
displayName: "rowLabels__LeftContainer"
|
|
26
27
|
})(["display:flex;flex-direction:flex-start;align-items:center;> *{margin-right:0.5rem;}"]);
|
|
27
|
-
exports.
|
|
28
|
-
var RightContainer = _styledComponents.default.div.withConfig({
|
|
28
|
+
const RightContainer = exports.RightContainer = _styledComponents.default.div.withConfig({
|
|
29
29
|
displayName: "rowLabels__RightContainer"
|
|
30
30
|
})(["margin-left:auto;display:flex;flex-direction:flex-end;align-items:center;"]);
|
|
31
|
-
exports.
|
|
32
|
-
var Label = _styledComponents.default.p.withConfig({
|
|
31
|
+
const Label = exports.Label = _styledComponents.default.p.withConfig({
|
|
33
32
|
displayName: "rowLabels__Label"
|
|
34
|
-
})(["color:", ";", ""], _colors.BmPrimaryBlack,
|
|
35
|
-
|
|
33
|
+
})(["color:", ";", ""], _colors.BmPrimaryBlack, _ref2 => {
|
|
34
|
+
let {
|
|
35
|
+
trailingIcon
|
|
36
|
+
} = _ref2;
|
|
36
37
|
return trailingIcon && "\n margin-right: 0.5rem;\n ";
|
|
37
38
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
const BmRowLabel = _ref3 => {
|
|
40
|
+
let {
|
|
41
|
+
children,
|
|
42
|
+
trailingIcon,
|
|
43
|
+
leadingIcon,
|
|
44
|
+
label,
|
|
45
|
+
color,
|
|
46
|
+
size
|
|
47
|
+
} = _ref3,
|
|
46
48
|
rest = _objectWithoutProperties(_ref3, _excluded);
|
|
47
49
|
return /*#__PURE__*/_react.default.createElement(Container, _extends({
|
|
48
50
|
trailingIcon: trailingIcon,
|
|
@@ -8,14 +8,13 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _icons = require("@material-ui/icons");
|
|
9
9
|
var _rowLabels = require("./rowLabels");
|
|
10
10
|
require("../../../main.scss");
|
|
11
|
-
function _interopRequireDefault(
|
|
12
|
-
function
|
|
13
|
-
function
|
|
14
|
-
function
|
|
15
|
-
function
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
var _default = {
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
16
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /* eslint-disable import/no-anonymous-default-export */
|
|
17
|
+
var _default = exports.default = {
|
|
19
18
|
component: _rowLabels.BmRowLabel,
|
|
20
19
|
title: 'components/Lists/RowLabels',
|
|
21
20
|
argTypes: {
|
|
@@ -52,23 +51,17 @@ var _default = {
|
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
53
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return /*#__PURE__*/_react.default.createElement(_rowLabels.BmRowLabel, args);
|
|
58
|
-
};
|
|
59
|
-
var TextOnly = MainRowLabel.bind({});
|
|
60
|
-
exports.TextOnly = TextOnly;
|
|
54
|
+
const MainRowLabel = args => /*#__PURE__*/_react.default.createElement(_rowLabels.BmRowLabel, args);
|
|
55
|
+
const TextOnly = exports.TextOnly = MainRowLabel.bind({});
|
|
61
56
|
TextOnly.args = {
|
|
62
57
|
children: /*#__PURE__*/_react.default.createElement("h3", null, "Row Label")
|
|
63
58
|
};
|
|
64
|
-
|
|
65
|
-
exports.TextLabel = TextLabel;
|
|
59
|
+
const TextLabel = exports.TextLabel = MainRowLabel.bind({});
|
|
66
60
|
TextLabel.args = {
|
|
67
61
|
children: /*#__PURE__*/_react.default.createElement("h3", null, "Row Label"),
|
|
68
62
|
label: /*#__PURE__*/_react.default.createElement("h3", null, "Label")
|
|
69
63
|
};
|
|
70
|
-
|
|
71
|
-
exports.LabelIcons = LabelIcons;
|
|
64
|
+
const LabelIcons = exports.LabelIcons = MainRowLabel.bind({});
|
|
72
65
|
LabelIcons.args = _objectSpread(_objectSpread({}, TextLabel.args), {}, {
|
|
73
66
|
trailingIcon: /*#__PURE__*/_react.default.createElement(_icons.KeyboardArrowRight, null),
|
|
74
67
|
leadingIcon: /*#__PURE__*/_react.default.createElement(_icons.Favorite, null),
|
|
@@ -10,15 +10,17 @@ var _CircularProgress = _interopRequireDefault(require("@material-ui/core/Circul
|
|
|
10
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
11
|
var _styles = require("@material-ui/core/styles");
|
|
12
12
|
var _colors = require("../colors");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(
|
|
15
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
16
|
-
function _objectWithoutProperties(
|
|
17
|
-
function _objectWithoutPropertiesLoose(
|
|
18
|
-
|
|
13
|
+
const _excluded = ["size"];
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
16
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
17
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
18
|
+
const style = {
|
|
19
19
|
colorPrimary: {
|
|
20
|
-
color:
|
|
21
|
-
|
|
20
|
+
color: _ref => {
|
|
21
|
+
let {
|
|
22
|
+
type
|
|
23
|
+
} = _ref;
|
|
22
24
|
if (type === 'success') return "".concat(_colors.BmSecondaryDarkGreen);
|
|
23
25
|
if (type === 'warning') return "".concat(_colors.BmPrimaryGold);
|
|
24
26
|
if (type === 'error') return "".concat(_colors.BmSecondaryRed);
|
|
@@ -26,10 +28,12 @@ var style = {
|
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
const BmLoader = exports.BmLoader = (0, _styles.withStyles)(style)(_ref2 => {
|
|
32
|
+
let {
|
|
33
|
+
size
|
|
34
|
+
} = _ref2,
|
|
31
35
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
32
|
-
|
|
36
|
+
let defaultSize = size || '2.286rem';
|
|
33
37
|
if (size) {
|
|
34
38
|
if (size === 'large') defaultSize = '2.286rem';
|
|
35
39
|
if (size === 'medium') defaultSize = '1.714rem';
|
|
@@ -40,11 +44,9 @@ var BmLoader = (0, _styles.withStyles)(style)(function (_ref2) {
|
|
|
40
44
|
size: defaultSize
|
|
41
45
|
}, rest));
|
|
42
46
|
});
|
|
43
|
-
exports.
|
|
44
|
-
var Loader = _styledComponents.default.div.withConfig({
|
|
47
|
+
const Loader = exports.Loader = _styledComponents.default.div.withConfig({
|
|
45
48
|
displayName: "loader__Loader"
|
|
46
49
|
})(["display:flex;align-items:center;justify-content:center;"]);
|
|
47
|
-
exports.Loader = Loader;
|
|
48
50
|
BmLoader.propTypes = {
|
|
49
51
|
size: _propTypes.default.string,
|
|
50
52
|
type: _propTypes.default.string
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.Loader = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _loader = require("./loader");
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
/* eslint-disable import/no-anonymous-default-export */
|
|
11
|
-
var _default = {
|
|
11
|
+
var _default = exports.default = {
|
|
12
12
|
component: _loader.BmLoader,
|
|
13
13
|
title: 'components/Loader',
|
|
14
14
|
argTypes: {
|
|
@@ -34,12 +34,8 @@ var _default = {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return /*#__PURE__*/_react.default.createElement(_loader.BmLoader, args);
|
|
40
|
-
};
|
|
41
|
-
var Loader = MainLoader.bind({});
|
|
42
|
-
exports.Loader = Loader;
|
|
37
|
+
const MainLoader = args => /*#__PURE__*/_react.default.createElement(_loader.BmLoader, args);
|
|
38
|
+
const Loader = exports.Loader = MainLoader.bind({});
|
|
43
39
|
Loader.args = {
|
|
44
40
|
type: 'success',
|
|
45
41
|
size: 'small'
|
|
@@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.MainWrapper = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _colors = require("../colors");
|
|
9
|
-
function _interopRequireDefault(
|
|
10
|
-
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const MainWrapper = exports.MainWrapper = _styledComponents.default.div.withConfig({
|
|
11
11
|
displayName: "MainWrapper"
|
|
12
|
-
})(["padding:2.1875rem;background-color:", ";"], _colors.BmBgGreyBlue);
|
|
13
|
-
exports.MainWrapper = MainWrapper;
|
|
12
|
+
})(["padding:2.1875rem;background-color:", ";"], _colors.BmBgGreyBlue);
|
|
@@ -7,9 +7,9 @@ exports.default = exports.MessageCounter = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _addonKnobs = require("@storybook/addon-knobs");
|
|
9
9
|
var _messageCounter = _interopRequireDefault(require("./messageCounter"));
|
|
10
|
-
function _interopRequireDefault(
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
/* eslint-disable import/no-anonymous-default-export */
|
|
12
|
-
var _default = {
|
|
12
|
+
var _default = exports.default = {
|
|
13
13
|
component: _messageCounter.default,
|
|
14
14
|
title: 'components/MessageCounter',
|
|
15
15
|
argTypes: {
|
|
@@ -31,13 +31,12 @@ var _default = {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
var optionSize = {
|
|
34
|
+
const optionSize = {
|
|
36
35
|
small: 'small',
|
|
37
36
|
medium: 'medium',
|
|
38
37
|
large: 'large'
|
|
39
38
|
};
|
|
40
|
-
|
|
39
|
+
const MessageCounter = () => {
|
|
41
40
|
return /*#__PURE__*/_react.default.createElement(_messageCounter.default, {
|
|
42
41
|
size: (0, _addonKnobs.select)('size', optionSize, 'large')
|
|
43
42
|
}, (0, _addonKnobs.text)('children', '00'));
|
|
@@ -8,25 +8,31 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _colors = require("../colors");
|
|
10
10
|
var _text = require("../text");
|
|
11
|
-
function _interopRequireDefault(
|
|
12
|
-
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const BmCounter = _styledComponents.default.div.withConfig({
|
|
13
13
|
displayName: "messageCounter__BmCounter"
|
|
14
|
-
})(["display:flex;align-items:center;justify-content:center;text-align:center;color:", ";width:", ";height:", ";", " border-radius:50%;text-align:center;background:", ";"], _colors.BmPrimaryWhite,
|
|
15
|
-
|
|
14
|
+
})(["display:flex;align-items:center;justify-content:center;text-align:center;color:", ";width:", ";height:", ";", " border-radius:50%;text-align:center;background:", ";"], _colors.BmPrimaryWhite, _ref => {
|
|
15
|
+
let {
|
|
16
|
+
size
|
|
17
|
+
} = _ref;
|
|
16
18
|
if (size === 'small') return '1.429rem';
|
|
17
19
|
if (size === 'medium') return '1.714rem';
|
|
18
20
|
if (size === 'large') return '2.286rem';
|
|
19
21
|
if (!size) return '1.429rem';
|
|
20
22
|
return size;
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
+
}, _ref2 => {
|
|
24
|
+
let {
|
|
25
|
+
size
|
|
26
|
+
} = _ref2;
|
|
23
27
|
if (size === 'small') return '1.429rem';
|
|
24
28
|
if (size === 'medium') return '1.714rem';
|
|
25
29
|
if (size === 'large') return '2.286rem';
|
|
26
30
|
if (!size) return '1.429rem';
|
|
27
31
|
return size;
|
|
28
|
-
},
|
|
29
|
-
|
|
32
|
+
}, _ref3 => {
|
|
33
|
+
let {
|
|
34
|
+
size
|
|
35
|
+
} = _ref3;
|
|
30
36
|
if (size === 'large') return "".concat(_text.h3);
|
|
31
37
|
if (size === 'medium') return "".concat(_text.h4);
|
|
32
38
|
if (size === 'small') return "".concat(_text.p);
|
|
@@ -36,5 +42,4 @@ BmCounter.propTypes = {
|
|
|
36
42
|
children: _propTypes.default.string,
|
|
37
43
|
size: _propTypes.default.string
|
|
38
44
|
};
|
|
39
|
-
var _default = BmCounter;
|
|
40
|
-
exports.default = _default;
|
|
45
|
+
var _default = exports.default = BmCounter;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -11,59 +10,49 @@ var _icons = require("@material-ui/icons");
|
|
|
11
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
12
11
|
var _colors = require("../colors");
|
|
13
12
|
var _iconStyles = require("../iconStyles");
|
|
14
|
-
|
|
13
|
+
const _excluded = ["children", "show", "size", "onHide", "centered"],
|
|
15
14
|
_excluded2 = ["children", "size", "onHide", "subHeading", "closeButton", "show", "icon", "trailingIcon"];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var _React$createContext = /*#__PURE__*/_react.default.createContext(),
|
|
29
|
-
Provider = _React$createContext.Provider,
|
|
30
|
-
Consumer = _React$createContext.Consumer;
|
|
31
|
-
var Overlay = _styledComponents.default.div.withConfig({
|
|
15
|
+
/* eslint-disable no-undef */
|
|
16
|
+
/* eslint-disable react/display-name */
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
19
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
20
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
21
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
22
|
+
const {
|
|
23
|
+
Provider,
|
|
24
|
+
Consumer
|
|
25
|
+
} = /*#__PURE__*/_react.default.createContext();
|
|
26
|
+
const Overlay = exports.Overlay = _styledComponents.default.div.withConfig({
|
|
32
27
|
displayName: "modal__Overlay"
|
|
33
28
|
})(["position:fixed;top:0;left:0;z-index:9999;width:100vw;height:100vh;background-color:", ";"], _colors.BmBgGrey45);
|
|
34
|
-
exports.
|
|
35
|
-
var ModalContent = _styledComponents.default.div.withConfig({
|
|
29
|
+
const ModalContent = exports.ModalContent = _styledComponents.default.div.withConfig({
|
|
36
30
|
displayName: "modal__ModalContent"
|
|
37
31
|
})(["display:flex;flex-direction:column;border-radius:0.8571rem;padding:1rem;margin:2rem auto;background:", ";width:auto;max-width:100%;> *:not(:last-child){margin-bottom:0.5rem;}@media (min-width:576px){width:500px;}"], _colors.BmPrimaryWhite);
|
|
38
|
-
exports.
|
|
39
|
-
var ModalWrapper = _styledComponents.default.div.withConfig({
|
|
32
|
+
const ModalWrapper = exports.ModalWrapper = _styledComponents.default.div.withConfig({
|
|
40
33
|
displayName: "modal__ModalWrapper"
|
|
41
34
|
})(["position:fixed;top:0;left:0;z-index:9999;display:block;width:100%;height:100%;overflow:hidden;outline:0;margin:auto;overflow-x:hidden;overflow-y:auto;"]);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
35
|
+
const BmModal = _ref => {
|
|
36
|
+
let {
|
|
37
|
+
children,
|
|
38
|
+
show,
|
|
39
|
+
size,
|
|
40
|
+
onHide,
|
|
41
|
+
centered
|
|
42
|
+
} = _ref,
|
|
49
43
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
toggle = _useState2[0],
|
|
53
|
-
setToggle = _useState2[1];
|
|
54
|
-
(0, _react.useEffect)(function () {
|
|
44
|
+
const [toggle, setToggle] = (0, _react.useState)(show);
|
|
45
|
+
(0, _react.useEffect)(() => {
|
|
55
46
|
setToggle(show);
|
|
56
47
|
}, [show]);
|
|
57
|
-
|
|
48
|
+
const keyPress = (0, _react.useCallback)(e => {
|
|
58
49
|
if (e.key === 'Escape' && show && onHide !== undefined) {
|
|
59
50
|
onHide(false);
|
|
60
51
|
}
|
|
61
52
|
}, [onHide, show]);
|
|
62
|
-
(0, _react.useEffect)(
|
|
53
|
+
(0, _react.useEffect)(() => {
|
|
63
54
|
document.addEventListener('keydown', keyPress);
|
|
64
|
-
return
|
|
65
|
-
return document.removeEventListener('keydown', keyPress);
|
|
66
|
-
};
|
|
55
|
+
return () => document.removeEventListener('keydown', keyPress);
|
|
67
56
|
}, [keyPress]);
|
|
68
57
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, toggle && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(Overlay, null), /*#__PURE__*/_react.default.createElement(ModalWrapper, {
|
|
69
58
|
showModal: show,
|
|
@@ -71,48 +60,46 @@ var BmModal = function BmModal(_ref) {
|
|
|
71
60
|
onHide: onHide
|
|
72
61
|
}, /*#__PURE__*/_react.default.createElement(Provider, {
|
|
73
62
|
value: {
|
|
74
|
-
toggle
|
|
75
|
-
setToggle
|
|
76
|
-
size
|
|
77
|
-
show
|
|
78
|
-
onHide
|
|
63
|
+
toggle,
|
|
64
|
+
setToggle,
|
|
65
|
+
size,
|
|
66
|
+
show,
|
|
67
|
+
onHide
|
|
79
68
|
}
|
|
80
69
|
}, /*#__PURE__*/_react.default.createElement(ModalContent, _extends({
|
|
81
70
|
size: size
|
|
82
71
|
}, rest), children)))));
|
|
83
72
|
};
|
|
84
|
-
|
|
73
|
+
const ModalHeader = _styledComponents.default.div.withConfig({
|
|
85
74
|
displayName: "modal__ModalHeader"
|
|
86
75
|
})(["display:flex;padding:1.7143rem 1.7143rem 1.7143rem 1.7143rem;flex-direction:row;align-items:center;gap:1.1429rem;align-self:stretch;"]);
|
|
87
|
-
|
|
76
|
+
const ModalHeaderContent = _styledComponents.default.div.withConfig({
|
|
88
77
|
displayName: "modal__ModalHeaderContent"
|
|
89
78
|
})(["display:flex;flex-direction:row;justify-content:space-between;align-items:center;width:100%;"]);
|
|
90
|
-
|
|
79
|
+
const IconContainer = _styledComponents.default.div.withConfig({
|
|
91
80
|
displayName: "modal__IconContainer"
|
|
92
81
|
})(["display:flex;padding:0.5714rem;justify-content:center;align-items:center;border-radius:0.7143rem;border:0.0714rem solid var(--Gray-200,#eaecf0);background:var(--Base-White,#fff);box-shadow:0rem 0.0714rem 0.1429rem 0rem rgba(16,24,40,0.05);"]);
|
|
93
|
-
BmModal.Header =
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
82
|
+
BmModal.Header = _ref2 => {
|
|
83
|
+
let {
|
|
84
|
+
children,
|
|
85
|
+
size,
|
|
86
|
+
onHide,
|
|
87
|
+
subHeading,
|
|
88
|
+
closeButton,
|
|
89
|
+
show,
|
|
90
|
+
icon,
|
|
91
|
+
trailingIcon
|
|
92
|
+
} = _ref2,
|
|
102
93
|
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
103
|
-
return /*#__PURE__*/_react.default.createElement(Consumer, null,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
return value && value.onHide && value.onHide(!value.show);
|
|
113
|
-
}
|
|
114
|
-
}, rest)) : /*#__PURE__*/_react.default.createElement("p", null, "\xA0")), /*#__PURE__*/_react.default.createElement("p", null, subHeading))));
|
|
115
|
-
});
|
|
94
|
+
return /*#__PURE__*/_react.default.createElement(Consumer, null, value => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(ModalHeader, rest, trailingIcon && /*#__PURE__*/_react.default.createElement(IconContainer, null, trailingIcon), /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
+
style: {
|
|
96
|
+
width: '100%'
|
|
97
|
+
}
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement(ModalHeaderContent, null, children || /*#__PURE__*/_react.default.createElement("p", null, "\xA0"), closeButton ? /*#__PURE__*/_react.default.createElement(_iconStyles.BmIcons, _extends({
|
|
99
|
+
size: "large",
|
|
100
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.Clear, null),
|
|
101
|
+
onClick: () => value && value.onHide && value.onHide(!value.show)
|
|
102
|
+
}, rest)) : /*#__PURE__*/_react.default.createElement("p", null, "\xA0")), /*#__PURE__*/_react.default.createElement("p", null, subHeading)))));
|
|
116
103
|
};
|
|
117
104
|
BmModal.Body = _styledComponents.default.div.withConfig({
|
|
118
105
|
displayName: "modal__Body"
|
|
@@ -127,7 +114,6 @@ BmModal.Body = _styledComponents.default.div.withConfig({
|
|
|
127
114
|
return "35.714rem";
|
|
128
115
|
}};
|
|
129
116
|
overflow: auto; */);
|
|
130
|
-
|
|
131
117
|
BmModal.Footer = _styledComponents.default.div.withConfig({
|
|
132
118
|
displayName: "modal__Footer"
|
|
133
119
|
})(["display:flex;justify-content:space-between;padding:0rem 1.7143rem 1.7143rem 1.7143rem;padding-top:2.2857rem;gap:0.8571rem;"]);
|
|
@@ -138,5 +124,4 @@ BmModal.propTypes = {
|
|
|
138
124
|
onHide: _propTypes.default.func.isRequired,
|
|
139
125
|
closeButton: _propTypes.default.bool
|
|
140
126
|
};
|
|
141
|
-
var _default = BmModal;
|
|
142
|
-
exports.default = _default;
|
|
127
|
+
var _default = exports.default = BmModal;
|