beem-component 2.0.27 → 2.1.0
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 +127 -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
|
@@ -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
|
});
|
|
@@ -9,25 +8,20 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
10
|
var _colors = require("../colors");
|
|
12
|
-
function _interopRequireDefault(
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var circumference;
|
|
27
|
-
var strokeWidth = 5;
|
|
28
|
-
var initialSize;
|
|
29
|
-
var measurement = function measurement(size) {
|
|
30
|
-
var initialSize = size || large * 14;
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
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); }
|
|
13
|
+
/* eslint-disable no-shadow */
|
|
14
|
+
|
|
15
|
+
const small = 1.429;
|
|
16
|
+
const medium = 1.714;
|
|
17
|
+
const large = 2.286;
|
|
18
|
+
let center;
|
|
19
|
+
let radius;
|
|
20
|
+
let circumference;
|
|
21
|
+
const strokeWidth = 5;
|
|
22
|
+
let initialSize;
|
|
23
|
+
const measurement = size => {
|
|
24
|
+
let initialSize = size || large * 14;
|
|
31
25
|
if (size === 'small') {
|
|
32
26
|
initialSize = small * 14;
|
|
33
27
|
}
|
|
@@ -41,37 +35,43 @@ var measurement = function measurement(size) {
|
|
|
41
35
|
radius = initialSize / 2 - strokeWidth / 2;
|
|
42
36
|
circumference = 2 * Math.PI * radius;
|
|
43
37
|
return {
|
|
44
|
-
center
|
|
45
|
-
radius
|
|
46
|
-
circumference
|
|
47
|
-
initialSize
|
|
38
|
+
center,
|
|
39
|
+
radius,
|
|
40
|
+
circumference,
|
|
41
|
+
initialSize
|
|
48
42
|
};
|
|
49
43
|
};
|
|
50
|
-
|
|
44
|
+
const ProgressRingWrapper = _styledComponents.default.svg.withConfig({
|
|
51
45
|
displayName: "progressRing__ProgressRingWrapper"
|
|
52
|
-
})(["display:flex;width:", ";height:", ";"],
|
|
53
|
-
|
|
46
|
+
})(["display:flex;width:", ";height:", ";"], _ref => {
|
|
47
|
+
let {
|
|
48
|
+
size
|
|
49
|
+
} = _ref;
|
|
54
50
|
if (size === 'small') return '1.429rem';
|
|
55
51
|
if (size === 'medium') return '1.714rem';
|
|
56
52
|
if (size === 'large') return '2.286rem';
|
|
57
53
|
if (!size) return '2.286rem';
|
|
58
54
|
return "".concat(size, "px");
|
|
59
|
-
},
|
|
60
|
-
|
|
55
|
+
}, _ref2 => {
|
|
56
|
+
let {
|
|
57
|
+
size
|
|
58
|
+
} = _ref2;
|
|
61
59
|
if (size === 'small') return '1.429rem';
|
|
62
60
|
if (size === 'medium') return '1.714rem';
|
|
63
61
|
if (size === 'large') return '2.286rem';
|
|
64
62
|
if (!size) return '2.286rem';
|
|
65
63
|
return "".concat(size, "px");
|
|
66
64
|
});
|
|
67
|
-
|
|
65
|
+
const ProgressRingCircle1 = _styledComponents.default.circle.withConfig({
|
|
68
66
|
displayName: "progressRing__ProgressRingCircle1"
|
|
69
67
|
})(["fill:none;"]);
|
|
70
|
-
|
|
68
|
+
const ProgressRingCircle2 = _styledComponents.default.circle.withConfig({
|
|
71
69
|
displayName: "progressRing__ProgressRingCircle2"
|
|
72
|
-
})(["fill:none;stroke:", ";"],
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
})(["fill:none;stroke:", ";"], _ref3 => {
|
|
71
|
+
let {
|
|
72
|
+
variant,
|
|
73
|
+
progress
|
|
74
|
+
} = _ref3;
|
|
75
75
|
if (progress) {
|
|
76
76
|
if (variant === 'primary') return "".concat(_colors.BmPrimaryBlue);
|
|
77
77
|
if (variant === 'success') return "".concat(_colors.BmSecondaryDarkGreen);
|
|
@@ -81,9 +81,9 @@ var ProgressRingCircle2 = _styledComponents.default.circle.withConfig({
|
|
|
81
81
|
}
|
|
82
82
|
if (!progress) return "".concat(_colors.BmGrey100);
|
|
83
83
|
});
|
|
84
|
-
|
|
84
|
+
const Text = _styledComponents.default.text.withConfig({
|
|
85
85
|
displayName: "progressRing__Text"
|
|
86
|
-
})(["font-size:", ";text-anchor:middle;fill:black;"],
|
|
86
|
+
})(["font-size:", ";text-anchor:middle;fill:black;"], () => {
|
|
87
87
|
if (initialSize >= 50 && initialSize < 100) {
|
|
88
88
|
return '1rem';
|
|
89
89
|
}
|
|
@@ -92,22 +92,21 @@ var Text = _styledComponents.default.text.withConfig({
|
|
|
92
92
|
}
|
|
93
93
|
return '0.5rem';
|
|
94
94
|
});
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
var initialMeasure = measurement(size);
|
|
95
|
+
const BmProgressRing = props => {
|
|
96
|
+
const [offset, setOffset] = (0, _react.useState)(0);
|
|
97
|
+
const circleRef = (0, _react.useRef)(null);
|
|
98
|
+
const {
|
|
99
|
+
size,
|
|
100
|
+
progress,
|
|
101
|
+
variant
|
|
102
|
+
} = props;
|
|
103
|
+
const initialMeasure = measurement(size);
|
|
105
104
|
circumference = initialMeasure.circumference;
|
|
106
105
|
radius = initialMeasure.radius;
|
|
107
106
|
center = initialMeasure.center;
|
|
108
107
|
initialSize = initialMeasure.initialSize;
|
|
109
|
-
(0, _react.useEffect)(
|
|
110
|
-
|
|
108
|
+
(0, _react.useEffect)(() => {
|
|
109
|
+
const progressOffset = (100 - progress) / 100 * circumference;
|
|
111
110
|
setOffset(progressOffset);
|
|
112
111
|
circleRef.current.style = 'transition: stroke-dashoffset 850ms ease-in-out';
|
|
113
112
|
}, [setOffset, progress, offset]);
|
|
@@ -141,5 +140,4 @@ BmProgressRing.propTypes = {
|
|
|
141
140
|
progress: _propTypes.default.number.isRequired,
|
|
142
141
|
variant: _propTypes.default.string
|
|
143
142
|
};
|
|
144
|
-
var _default = BmProgressRing;
|
|
145
|
-
exports.default = _default;
|
|
143
|
+
var _default = exports.default = BmProgressRing;
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.CustomProgressRing = exports.BasicProgressRing = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _progressRing = _interopRequireDefault(require("./progressRing"));
|
|
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: _progressRing.default,
|
|
13
13
|
title: 'components/ProgressRing',
|
|
14
14
|
argTypes: {
|
|
@@ -37,19 +37,14 @@ var _default = {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return /*#__PURE__*/_react.default.createElement(_progressRing.default, args);
|
|
43
|
-
};
|
|
44
|
-
var BasicProgressRing = MainProgressRing.bind({});
|
|
45
|
-
exports.BasicProgressRing = BasicProgressRing;
|
|
40
|
+
const MainProgressRing = args => /*#__PURE__*/_react.default.createElement(_progressRing.default, args);
|
|
41
|
+
const BasicProgressRing = exports.BasicProgressRing = MainProgressRing.bind({});
|
|
46
42
|
BasicProgressRing.args = {
|
|
47
43
|
progress: 30,
|
|
48
44
|
variant: 'success',
|
|
49
45
|
size: 'xlarge'
|
|
50
46
|
};
|
|
51
|
-
|
|
52
|
-
exports.CustomProgressRing = CustomProgressRing;
|
|
47
|
+
const CustomProgressRing = exports.CustomProgressRing = MainProgressRing.bind({});
|
|
53
48
|
CustomProgressRing.args = {
|
|
54
49
|
progress: 50,
|
|
55
50
|
variant: 'primary',
|
|
@@ -9,13 +9,8 @@ var _reactRouterDom = require("react-router-dom");
|
|
|
9
9
|
var _polished = require("polished");
|
|
10
10
|
var _colors = require("../colors");
|
|
11
11
|
var _text = require("../text");
|
|
12
|
-
function _interopRequireDefault(
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
// TODO: To be fixed for hover states
|
|
14
|
-
|
|
14
|
+
const BmRouteLink = exports.BmRouteLink = (0, _styledComponents.default)(_reactRouterDom.Link).withConfig({
|
|
15
15
|
displayName: "link__BmRouteLink"
|
|
16
|
-
})(["", " color:", " !important;text-decoration:none;&:hover,&:focus,&:active{font-weight:600;&:before{font-weight:normal;}color:", " !important;}"], _text.p,
|
|
17
|
-
return props.color ? props.color : "".concat(_colors.BmPrimaryBlue, " ");
|
|
18
|
-
}, function (props) {
|
|
19
|
-
return (0, _polished.darken)(0.1, props.color ? props.color : "".concat(_colors.BmPrimaryBlue));
|
|
20
|
-
});
|
|
21
|
-
exports.BmRouteLink = BmRouteLink;
|
|
16
|
+
})(["", " color:", " !important;text-decoration:none;&:hover,&:focus,&:active{font-weight:600;&:before{font-weight:normal;}color:", " !important;}"], _text.p, props => props.color ? props.color : "".concat(_colors.BmPrimaryBlue, " "), props => (0, _polished.darken)(0.1, props.color ? props.color : "".concat(_colors.BmPrimaryBlue)));
|
|
@@ -7,14 +7,13 @@ exports.default = exports.SampleLink = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactRouterDom = require("react-router-dom");
|
|
9
9
|
var _link = require("./link");
|
|
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: _link.BmRouteLink,
|
|
14
14
|
title: 'components/RouteLink'
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
var SampleLink = function SampleLink() {
|
|
16
|
+
const SampleLink = () => {
|
|
18
17
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.BrowserRouter, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Switch, null, /*#__PURE__*/_react.default.createElement(_link.BmRouteLink, {
|
|
19
18
|
to: "#"
|
|
20
19
|
}, "Click Me!"))));
|
|
@@ -5,33 +5,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.ScrollbarWrapper = exports.Scrollbar = exports.Content = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
function _interopRequireDefault(
|
|
9
|
-
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
const ScrollbarWrapper = exports.ScrollbarWrapper = _styledComponents.default.div.withConfig({
|
|
10
10
|
displayName: "scrollBar__ScrollbarWrapper"
|
|
11
|
-
})(
|
|
12
|
-
|
|
13
|
-
'
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
23
|
-
exports.ScrollbarWrapper = ScrollbarWrapper;
|
|
24
|
-
var Scrollbar = _styledComponents.default.div.withConfig({
|
|
11
|
+
})(() => ({
|
|
12
|
+
'::-webkit-scrollbar-thumb': {
|
|
13
|
+
background: 'blue',
|
|
14
|
+
maxHeight: '10px',
|
|
15
|
+
display: 'block',
|
|
16
|
+
width: '10em',
|
|
17
|
+
overflow: 'auto',
|
|
18
|
+
height: '2em'
|
|
19
|
+
}
|
|
20
|
+
}));
|
|
21
|
+
const Scrollbar = exports.Scrollbar = _styledComponents.default.div.withConfig({
|
|
25
22
|
displayName: "scrollBar__Scrollbar"
|
|
26
23
|
})(["::-webkit-scrollbar{width:0.714rem !important;}::-webkit-scrollbar-thumb{background-color:#e2e2e2;}"]);
|
|
27
|
-
exports.
|
|
28
|
-
var Content = _styledComponents.default.div.withConfig({
|
|
24
|
+
const Content = exports.Content = _styledComponents.default.div.withConfig({
|
|
29
25
|
displayName: "scrollBar__Content"
|
|
30
|
-
})(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
});
|
|
35
|
-
exports.Content = Content;
|
|
36
|
-
var _default = ScrollbarWrapper;
|
|
37
|
-
exports.default = _default;
|
|
26
|
+
})(() => ({
|
|
27
|
+
direction: 'ltr' // if you want to show the scroll bar on the left
|
|
28
|
+
}));
|
|
29
|
+
var _default = exports.default = ScrollbarWrapper;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const hexToRgba = function (hex) {
|
|
11
|
+
let opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.6;
|
|
12
|
+
try {
|
|
13
|
+
const normalizedHex = hex === null || hex === void 0 ? void 0 : hex.replace('#', '');
|
|
14
|
+
if (!normalizedHex || normalizedHex.length !== 6 || !/^[0-9a-fA-F]{6}$/.test(normalizedHex)) {
|
|
15
|
+
throw new Error('Invalid hex');
|
|
16
|
+
}
|
|
17
|
+
const r = parseInt(normalizedHex.slice(0, 2), 16);
|
|
18
|
+
const g = parseInt(normalizedHex.slice(2, 4), 16);
|
|
19
|
+
const b = parseInt(normalizedHex.slice(4, 6), 16);
|
|
20
|
+
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(opacity, ")");
|
|
21
|
+
} catch (e) {
|
|
22
|
+
return "rgba(0, 0, 0, ".concat(opacity, ")");
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const Container = _styledComponents.default.div.withConfig({
|
|
26
|
+
displayName: "SelectionNotice__Container"
|
|
27
|
+
})(["background-color:", ";border:0.0714rem solid ", ";padding:0.5rem;border-radius:0.5rem;text-align:center;animation:fadeIn 0.3s ease-in;@media (min-width:45.7143rem){padding:0.75rem;}@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}"], _ref => {
|
|
28
|
+
let {
|
|
29
|
+
color
|
|
30
|
+
} = _ref;
|
|
31
|
+
return hexToRgba(color || '#33B1BA', 0.05);
|
|
32
|
+
}, _ref2 => {
|
|
33
|
+
let {
|
|
34
|
+
color
|
|
35
|
+
} = _ref2;
|
|
36
|
+
return hexToRgba(color || '#33B1BA', 0.2);
|
|
37
|
+
});
|
|
38
|
+
const Text = _styledComponents.default.p.withConfig({
|
|
39
|
+
displayName: "SelectionNotice__Text"
|
|
40
|
+
})(["font-size:0.875rem;strong{color:", ";font-weight:600;}"], _ref3 => {
|
|
41
|
+
let {
|
|
42
|
+
color
|
|
43
|
+
} = _ref3;
|
|
44
|
+
return color || '#33B1BA';
|
|
45
|
+
});
|
|
46
|
+
const BmSelectionNotice = _ref4 => {
|
|
47
|
+
let {
|
|
48
|
+
children,
|
|
49
|
+
color
|
|
50
|
+
} = _ref4;
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(Container, {
|
|
52
|
+
color: color
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement(Text, {
|
|
54
|
+
color: color
|
|
55
|
+
}, children));
|
|
56
|
+
};
|
|
57
|
+
var _default = exports.default = BmSelectionNotice;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Default = exports.CustomColor = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _SelectionNotice = _interopRequireDefault(require("./SelectionNotice"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
var _default = exports.default = {
|
|
11
|
+
title: 'Components/BmSelectionNotice',
|
|
12
|
+
component: _SelectionNotice.default,
|
|
13
|
+
argTypes: {
|
|
14
|
+
color: {
|
|
15
|
+
control: 'color',
|
|
16
|
+
defaultValue: '#33B1BA'
|
|
17
|
+
},
|
|
18
|
+
children: {
|
|
19
|
+
control: 'text',
|
|
20
|
+
defaultValue: 'Please select a valid <strong>Business Manager</strong> to continue.'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const Template = args => /*#__PURE__*/_react.default.createElement(_SelectionNotice.default, args);
|
|
25
|
+
const Default = exports.Default = Template.bind({});
|
|
26
|
+
Default.args = {
|
|
27
|
+
color: '#33B1BA',
|
|
28
|
+
children: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "Please select a valid ", /*#__PURE__*/_react.default.createElement("strong", null, "Business Manager"), " to continue.")
|
|
29
|
+
};
|
|
30
|
+
const CustomColor = exports.CustomColor = Template.bind({});
|
|
31
|
+
CustomColor.args = {
|
|
32
|
+
color: '#D97706',
|
|
33
|
+
// amber-600 for example
|
|
34
|
+
children: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "You must select a ", /*#__PURE__*/_react.default.createElement("strong", null, "Business Manager"), " before proceeding.")
|
|
35
|
+
};
|
|
@@ -6,15 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = 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 BmStepper = _styledComponents.default.div.withConfig({
|
|
11
11
|
displayName: "stepper__BmStepper"
|
|
12
|
-
})(["display:flex;justify-content:center;width:3rem;height:3rem;background-color:", ";color:", ";border-radius:50%;text-align:center;border:0.071rem solid ", ";align-items:center;cursor:pointer;"],
|
|
13
|
-
|
|
14
|
-
}, function (props) {
|
|
15
|
-
return props.activeStep ? _colors.BmPrimaryBlue : _colors.BmGrey600;
|
|
16
|
-
}, function (props) {
|
|
17
|
-
return props.activeStep ? _colors.BmPrimaryBlue : _colors.BmPrimaryWhite;
|
|
18
|
-
});
|
|
19
|
-
var _default = BmStepper;
|
|
20
|
-
exports.default = _default;
|
|
12
|
+
})(["display:flex;justify-content:center;width:3rem;height:3rem;background-color:", ";color:", ";border-radius:50%;text-align:center;border:0.071rem solid ", ";align-items:center;cursor:pointer;"], props => props.activeStep ? _colors.BmSecondaryGreen15 : _colors.BmGrey100, props => props.activeStep ? _colors.BmPrimaryBlue : _colors.BmGrey600, props => props.activeStep ? _colors.BmPrimaryBlue : _colors.BmPrimaryWhite);
|
|
13
|
+
var _default = exports.default = BmStepper;
|
|
@@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.BmContent = 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 BmContent = exports.BmContent = _styledComponents.default.div.withConfig({
|
|
11
11
|
displayName: "Content__BmContent"
|
|
12
|
-
})(["display:flex;flex-direction:column;align-items:flex-start;padding:1.5rem;background:", ";border:0.071rem solid ", ";border-radius:0.25rem;"], _colors.BmPrimaryWhite, _colors.BmGrey400);
|
|
13
|
-
exports.BmContent = BmContent;
|
|
12
|
+
})(["display:flex;flex-direction:column;align-items:flex-start;padding:1.5rem;background:", ";border:0.071rem solid ", ";border-radius:0.25rem;"], _colors.BmPrimaryWhite, _colors.BmGrey400);
|
|
@@ -6,20 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.BmFooterRight = exports.BmFooterLeft = exports.BmContentTitle = exports.BmContentFooter = 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 BmContentTitle = exports.BmContentTitle = _styledComponents.default.h1.withConfig({
|
|
11
11
|
displayName: "ContentTitlejs__BmContentTitle"
|
|
12
12
|
})(["color:", ";margin:0.75rem 0rem;"], _colors.BmPrimaryBlack);
|
|
13
|
-
exports.
|
|
14
|
-
var BmContentFooter = _styledComponents.default.div.withConfig({
|
|
13
|
+
const BmContentFooter = exports.BmContentFooter = _styledComponents.default.div.withConfig({
|
|
15
14
|
displayName: "ContentTitlejs__BmContentFooter"
|
|
16
15
|
})(["display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:0rem;margin:1rem 0rem 0rem;width:100%;"]);
|
|
17
|
-
exports.
|
|
18
|
-
var BmFooterLeft = _styledComponents.default.div.withConfig({
|
|
16
|
+
const BmFooterLeft = exports.BmFooterLeft = _styledComponents.default.div.withConfig({
|
|
19
17
|
displayName: "ContentTitlejs__BmFooterLeft"
|
|
20
18
|
})(["display:flex;flex-direction:flex-start;justify-content:space-between;align-items:center;padding:0rem;margin:0rem;div{margin:0rem 0.5rem;}"]);
|
|
21
|
-
exports.
|
|
22
|
-
var BmFooterRight = _styledComponents.default.div.withConfig({
|
|
19
|
+
const BmFooterRight = exports.BmFooterRight = _styledComponents.default.div.withConfig({
|
|
23
20
|
displayName: "ContentTitlejs__BmFooterRight"
|
|
24
|
-
})(["display:flex;flex-direction:flex-end;justify-content:space-between;align-items:center;padding:0rem;margin-left:auto;div{margin:0rem 0.5rem;}"]);
|
|
25
|
-
exports.BmFooterRight = BmFooterRight;
|
|
21
|
+
})(["display:flex;flex-direction:flex-end;justify-content:space-between;align-items:center;padding:0rem;margin-left:auto;div{margin:0rem 0.5rem;}"]);
|
|
@@ -10,36 +10,29 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
10
10
|
var _checkbox = require("../../checkbox");
|
|
11
11
|
var _colors = require("../../colors");
|
|
12
12
|
var _iconStyles = require("../../iconStyles");
|
|
13
|
-
function _interopRequireDefault(
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
14
|
/* eslint-disable react/destructuring-assignment */
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
const BmSegmentCard = exports.BmSegmentCard = _styledComponents.default.div.withConfig({
|
|
17
17
|
displayName: "SegmentCard__BmSegmentCard"
|
|
18
18
|
})(["display:flex;flex-direction:column;justify-content:space-between;padding:0.5rem 0rem;background:", ";border:0.071rem solid ", ";border-radius:0.25rem 0rem 0rem 0.25rem;margin:0rem;width:20%;"], _colors.BmPrimaryWhite, _colors.BmGrey400);
|
|
19
|
-
exports.
|
|
20
|
-
var BmSegmentSelector = _styledComponents.default.div.withConfig({
|
|
19
|
+
const BmSegmentSelector = exports.BmSegmentSelector = _styledComponents.default.div.withConfig({
|
|
21
20
|
displayName: "SegmentCard__BmSegmentSelector"
|
|
22
21
|
})(["display:flex;flex-direction:column;align-items:flex-start;padding:1rem;background:", ";border:0.071rem solid ", ";border-left:none;border-radius:0rem 0.188rem 0.25rem 0rem;margin:0rem;width:80%;"], _colors.BmPrimaryWhite, _colors.BmGrey400);
|
|
23
|
-
exports.
|
|
24
|
-
var BmSegment = _styledComponents.default.div.withConfig({
|
|
22
|
+
const BmSegment = exports.BmSegment = _styledComponents.default.div.withConfig({
|
|
25
23
|
displayName: "SegmentCard__BmSegment"
|
|
26
24
|
})(["display:flex;flex-direction:row;justify-content:space-between;background:", ";border-radius:0rem 0.188rem 0.25rem 0rem;margin:0rem;width:100%;h2{margin:1rem 0rem;display:flex;flex-direction:column;}"], _colors.BmPrimaryWhite);
|
|
27
|
-
exports.
|
|
28
|
-
var BmSegmentCheckBoxMargin = _styledComponents.default.div.withConfig({
|
|
25
|
+
const BmSegmentCheckBoxMargin = exports.BmSegmentCheckBoxMargin = _styledComponents.default.div.withConfig({
|
|
29
26
|
displayName: "SegmentCard__BmSegmentCheckBoxMargin"
|
|
30
27
|
})(["margin:0.5rem 0rem;"]);
|
|
31
|
-
|
|
32
|
-
var BmSegmentCheckBox = function BmSegmentCheckBox(props) {
|
|
28
|
+
const BmSegmentCheckBox = props => {
|
|
33
29
|
return /*#__PURE__*/_react.default.createElement(BmSegmentCheckBoxMargin, null, /*#__PURE__*/_react.default.createElement(_checkbox.BmCheckbox, props));
|
|
34
30
|
};
|
|
35
31
|
exports.BmSegmentCheckBox = BmSegmentCheckBox;
|
|
36
|
-
|
|
32
|
+
const BmSegmentCompleteContent = exports.BmSegmentCompleteContent = _styledComponents.default.div.withConfig({
|
|
37
33
|
displayName: "SegmentCard__BmSegmentCompleteContent"
|
|
38
|
-
})(["display:flex;flex-direction:column;justify-content:space-between;align-items:center;width:100%;margin:1rem 0rem;padding:0rem;p{margin-top:0.25rem;}h1{margin-top:0.5rem;}h4{margin-top:1.25rem;color:", ";}"],
|
|
39
|
-
|
|
40
|
-
});
|
|
41
|
-
exports.BmSegmentCompleteContent = BmSegmentCompleteContent;
|
|
42
|
-
var BmSegmentCompleteIcon = function BmSegmentCompleteIcon(props) {
|
|
34
|
+
})(["display:flex;flex-direction:column;justify-content:space-between;align-items:center;width:100%;margin:1rem 0rem;padding:0rem;p{margin-top:0.25rem;}h1{margin-top:0.5rem;}h4{margin-top:1.25rem;color:", ";}"], props => props.color ? props.color : "".concat(_colors.BmPrimaryBlue));
|
|
35
|
+
const BmSegmentCompleteIcon = props => {
|
|
43
36
|
return /*#__PURE__*/_react.default.createElement(_iconStyles.BmIcons, {
|
|
44
37
|
icon: /*#__PURE__*/_react.default.createElement(_icons.CheckCircle, null),
|
|
45
38
|
color: props.color ? props.color : "".concat(_colors.BmPrimaryBlue),
|
|
@@ -47,9 +40,6 @@ var BmSegmentCompleteIcon = function BmSegmentCompleteIcon(props) {
|
|
|
47
40
|
});
|
|
48
41
|
};
|
|
49
42
|
exports.BmSegmentCompleteIcon = BmSegmentCompleteIcon;
|
|
50
|
-
|
|
43
|
+
const BmSegmentCreateContent = exports.BmSegmentCreateContent = _styledComponents.default.div.withConfig({
|
|
51
44
|
displayName: "SegmentCard__BmSegmentCreateContent"
|
|
52
|
-
})(["display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;width:100%;p{margin-top:0.25rem;}h1{margin-top:0.5rem;}h4{margin-top:1.25rem;color:", ";}"],
|
|
53
|
-
return props.color ? props.color : "".concat(_colors.BmPrimaryBlue);
|
|
54
|
-
});
|
|
55
|
-
exports.BmSegmentCreateContent = BmSegmentCreateContent;
|
|
45
|
+
})(["display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;width:100%;p{margin-top:0.25rem;}h1{margin-top:0.5rem;}h4{margin-top:1.25rem;color:", ";}"], props => props.color ? props.color : "".concat(_colors.BmPrimaryBlue));
|
|
@@ -9,41 +9,49 @@ 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 = ["leadingIcon", "trailingIcon", "children", "size", "color", "icon", "disabled"];
|
|
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 BmTabWrapper = _styledComponents.default.div.withConfig({
|
|
18
18
|
displayName: "tabs__BmTabWrapper"
|
|
19
|
-
})(["display:flex;flex-direction:row;justify-content:center;align-items:center;padding:1rem;background:", ";box-shadow:", ";> *:not(:last-child){margin-right:0.5rem;}", " &:hover{box-shadow:", ";}"], _colors.BmPrimaryWhite,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
})(["display:flex;flex-direction:row;justify-content:center;align-items:center;padding:1rem;background:", ";box-shadow:", ";> *:not(:last-child){margin-right:0.5rem;}", " &:hover{box-shadow:", ";}"], _colors.BmPrimaryWhite, _ref => {
|
|
20
|
+
let {
|
|
21
|
+
state,
|
|
22
|
+
disabled,
|
|
23
|
+
stateColor
|
|
24
|
+
} = _ref;
|
|
23
25
|
if (state === 'active' && !disabled) {
|
|
24
26
|
return "inset 0px -3px 0px ".concat(stateColor || _colors.BmPrimaryBlue);
|
|
25
27
|
}
|
|
26
28
|
return 'none';
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
}, _ref2 => {
|
|
30
|
+
let {
|
|
31
|
+
color,
|
|
32
|
+
children,
|
|
33
|
+
disabled
|
|
34
|
+
} = _ref2;
|
|
31
35
|
return children && disabled ? "\n > * {\n color: ".concat(_colors.BmGrey400, ";\n }\n ") : "\n > * {\n color: ".concat(color, ";\n }\n ");
|
|
32
|
-
},
|
|
33
|
-
|
|
36
|
+
}, _ref3 => {
|
|
37
|
+
let {
|
|
38
|
+
disabled
|
|
39
|
+
} = _ref3;
|
|
34
40
|
if (!disabled) {
|
|
35
41
|
return "inset 0px -3px 0px ".concat(_colors.BmGrey400);
|
|
36
42
|
}
|
|
37
43
|
return 'none';
|
|
38
44
|
});
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
const BmTab = _ref4 => {
|
|
46
|
+
let {
|
|
47
|
+
leadingIcon,
|
|
48
|
+
trailingIcon,
|
|
49
|
+
children,
|
|
50
|
+
size,
|
|
51
|
+
color,
|
|
52
|
+
icon,
|
|
53
|
+
disabled
|
|
54
|
+
} = _ref4,
|
|
47
55
|
rest = _objectWithoutProperties(_ref4, _excluded);
|
|
48
56
|
return /*#__PURE__*/_react.default.createElement(BmTabWrapper, _extends({
|
|
49
57
|
leadingIcon: leadingIcon,
|
|
@@ -7,9 +7,9 @@ exports.default = exports.DisabledTab = exports.ColoredTab = exports.BasicTab =
|
|
|
7
7
|
var _icons = require("@material-ui/icons");
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _tabs = require("./tabs");
|
|
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: _tabs.BmTab,
|
|
14
14
|
title: 'components/Tabs',
|
|
15
15
|
argTypes: {
|
|
@@ -50,12 +50,8 @@ var _default = {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return /*#__PURE__*/_react.default.createElement(_tabs.BmTab, args);
|
|
56
|
-
};
|
|
57
|
-
var BasicTab = MainTab.bind({});
|
|
58
|
-
exports.BasicTab = BasicTab;
|
|
53
|
+
const MainTab = args => /*#__PURE__*/_react.default.createElement(_tabs.BmTab, args);
|
|
54
|
+
const BasicTab = exports.BasicTab = MainTab.bind({});
|
|
59
55
|
BasicTab.args = {
|
|
60
56
|
children: /*#__PURE__*/_react.default.createElement("h3", null, "Tabs"),
|
|
61
57
|
leadingIcon: /*#__PURE__*/_react.default.createElement(_icons.Favorite, null),
|
|
@@ -63,16 +59,14 @@ BasicTab.args = {
|
|
|
63
59
|
disabled: false,
|
|
64
60
|
state: 'active'
|
|
65
61
|
};
|
|
66
|
-
|
|
67
|
-
exports.DisabledTab = DisabledTab;
|
|
62
|
+
const DisabledTab = exports.DisabledTab = MainTab.bind({});
|
|
68
63
|
DisabledTab.args = {
|
|
69
64
|
children: /*#__PURE__*/_react.default.createElement("h3", null, "Disabled Tabs"),
|
|
70
65
|
leadingIcon: /*#__PURE__*/_react.default.createElement(_icons.Favorite, null),
|
|
71
66
|
trailingIcon: /*#__PURE__*/_react.default.createElement(_icons.KeyboardArrowDown, null),
|
|
72
67
|
disabled: true
|
|
73
68
|
};
|
|
74
|
-
|
|
75
|
-
exports.ColoredTab = ColoredTab;
|
|
69
|
+
const ColoredTab = exports.ColoredTab = MainTab.bind({});
|
|
76
70
|
ColoredTab.args = {
|
|
77
71
|
children: /*#__PURE__*/_react.default.createElement("h3", null, "Tabs"),
|
|
78
72
|
leadingIcon: /*#__PURE__*/_react.default.createElement(_icons.Favorite, null),
|