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
|
});
|
|
@@ -13,54 +12,47 @@ var _avatars = _interopRequireDefault(require("../Avatars/avatars"));
|
|
|
13
12
|
var _colors = require("../colors");
|
|
14
13
|
var _iconStyles = require("../iconStyles");
|
|
15
14
|
var _text = require("../text");
|
|
16
|
-
|
|
17
|
-
function _interopRequireDefault(
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
24
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
25
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
26
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
28
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
29
|
-
var BmPillWrapper = _styledComponents.default.div.withConfig({
|
|
15
|
+
const _excluded = ["type", "icon", "avatarIcon", "size", "avatarSize", "color", "label", "onDelete", "deleteIcon"]; // eslint-disable-next-line no-unused-vars
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
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); }
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
20
|
+
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; }
|
|
21
|
+
const BmPillWrapper = exports.BmPillWrapper = _styledComponents.default.div.withConfig({
|
|
30
22
|
displayName: "pills__BmPillWrapper"
|
|
31
|
-
})(["display:", ";flex-direction:row;justify-content:center;align-items:center;padding:0.214rem 0.571rem;background:", ";border-radius:0.25rem;", " > *{margin-right:0.25rem;}"],
|
|
32
|
-
|
|
23
|
+
})(["display:", ";flex-direction:row;justify-content:center;align-items:center;padding:0.214rem 0.571rem;background:", ";border-radius:0.25rem;", " > *{margin-right:0.25rem;}"], _ref => {
|
|
24
|
+
let {
|
|
25
|
+
clicked
|
|
26
|
+
} = _ref;
|
|
33
27
|
if (clicked) {
|
|
34
28
|
return 'flex';
|
|
35
29
|
}
|
|
36
30
|
return 'none';
|
|
37
|
-
}, _colors.BmGrey100,
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
}, _colors.BmGrey100, _ref2 => {
|
|
32
|
+
let {
|
|
33
|
+
label,
|
|
34
|
+
color
|
|
35
|
+
} = _ref2;
|
|
40
36
|
return label && "\n ".concat(_text.p, "\n text-transform: uppercase;\n color: ").concat(color, ";\n ");
|
|
41
37
|
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
38
|
+
const BmPill = _ref3 => {
|
|
39
|
+
let {
|
|
40
|
+
type,
|
|
41
|
+
icon,
|
|
42
|
+
avatarIcon,
|
|
43
|
+
size,
|
|
44
|
+
avatarSize,
|
|
45
|
+
color,
|
|
46
|
+
label,
|
|
47
|
+
onDelete,
|
|
48
|
+
deleteIcon
|
|
49
|
+
} = _ref3,
|
|
53
50
|
rest = _objectWithoutProperties(_ref3, _excluded);
|
|
54
|
-
|
|
55
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
56
|
-
clicked = _useState2[0],
|
|
57
|
-
setClicked = _useState2[1];
|
|
51
|
+
const [clicked, setClicked] = (0, _react.useState)(true);
|
|
58
52
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(BmPillWrapper, _extends({
|
|
59
53
|
label: label,
|
|
60
54
|
onDelete: onDelete,
|
|
61
|
-
onClick:
|
|
62
|
-
return onDelete ? setClicked(false) : setClicked(true);
|
|
63
|
-
},
|
|
55
|
+
onClick: () => onDelete ? setClicked(false) : setClicked(true),
|
|
64
56
|
color: color,
|
|
65
57
|
clicked: clicked
|
|
66
58
|
}, rest), icon && /*#__PURE__*/_react.default.createElement(_iconStyles.BmIcons, {
|
|
@@ -7,9 +7,9 @@ exports.default = exports.CustomPill = exports.BasicPill = void 0;
|
|
|
7
7
|
var _icons = require("@material-ui/icons");
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _pills = require("./pills");
|
|
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: _pills.BmPill,
|
|
14
14
|
title: 'components/Pills',
|
|
15
15
|
argTypes: {
|
|
@@ -71,12 +71,8 @@ var _default = {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return /*#__PURE__*/_react.default.createElement(_pills.BmPill, args);
|
|
77
|
-
};
|
|
78
|
-
var BasicPill = MainPill.bind({});
|
|
79
|
-
exports.BasicPill = BasicPill;
|
|
74
|
+
const MainPill = args => /*#__PURE__*/_react.default.createElement(_pills.BmPill, args);
|
|
75
|
+
const BasicPill = exports.BasicPill = MainPill.bind({});
|
|
80
76
|
BasicPill.args = {
|
|
81
77
|
icon: /*#__PURE__*/_react.default.createElement(_icons.Favorite, null),
|
|
82
78
|
label: 'label',
|
|
@@ -87,8 +83,7 @@ BasicPill.args = {
|
|
|
87
83
|
avatarSize: undefined,
|
|
88
84
|
size: undefined
|
|
89
85
|
};
|
|
90
|
-
|
|
91
|
-
exports.CustomPill = CustomPill;
|
|
86
|
+
const CustomPill = exports.CustomPill = MainPill.bind({});
|
|
92
87
|
CustomPill.args = {
|
|
93
88
|
icon: undefined,
|
|
94
89
|
label: 'label',
|
|
@@ -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
|
});
|
|
@@ -12,14 +11,13 @@ var _wa = _interopRequireDefault(require("../../assets/wa.png"));
|
|
|
12
11
|
var _fb = _interopRequireDefault(require("../../assets/fb.png"));
|
|
13
12
|
var _insta = _interopRequireDefault(require("../../assets/insta.png"));
|
|
14
13
|
var _Google_Messages_logo = _interopRequireDefault(require("../../assets/Google_Messages_logo.png"));
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
function
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
var handleSize = function handleSize(size) {
|
|
14
|
+
const _excluded = ["img", "content", "channel", "size"];
|
|
15
|
+
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); }
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
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); }
|
|
18
|
+
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; }
|
|
19
|
+
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; }
|
|
20
|
+
const handleSize = size => {
|
|
23
21
|
if (size) {
|
|
24
22
|
if (size === 'large') return '3.429rem';
|
|
25
23
|
if (size === 'medium') return '2.286rem';
|
|
@@ -28,7 +26,7 @@ var handleSize = function handleSize(size) {
|
|
|
28
26
|
}
|
|
29
27
|
return '3.429rem';
|
|
30
28
|
};
|
|
31
|
-
|
|
29
|
+
const position = size => {
|
|
32
30
|
if (size) {
|
|
33
31
|
if (size === 'large') return '2.286rem';
|
|
34
32
|
if (size === 'medium') return '1.5rem';
|
|
@@ -37,41 +35,33 @@ var position = function position(size) {
|
|
|
37
35
|
}
|
|
38
36
|
return '2.286rem';
|
|
39
37
|
};
|
|
40
|
-
|
|
38
|
+
const ProfileImg = _styledComponents.default.img.withConfig({
|
|
41
39
|
displayName: "ProfileIcon__ProfileImg"
|
|
42
|
-
})(["height:", ";width:", ";object-fit:contain;border-radius:50%;display:flex;"],
|
|
43
|
-
|
|
44
|
-
}, function (props) {
|
|
45
|
-
return handleSize(props.size);
|
|
46
|
-
});
|
|
47
|
-
var Profile = _styledComponents.default.div.withConfig({
|
|
40
|
+
})(["height:", ";width:", ";object-fit:contain;border-radius:50%;display:flex;"], props => handleSize(props.size), props => handleSize(props.size));
|
|
41
|
+
const Profile = _styledComponents.default.div.withConfig({
|
|
48
42
|
displayName: "ProfileIcon__Profile"
|
|
49
|
-
})(["height:", ";width:", ";border-radius:50%;border:", ";display:flex;align-items:center;justify-content:center;position:relative;background:", ";", ""],
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}, function (_ref) {
|
|
54
|
-
var multiChannel = _ref.multiChannel;
|
|
43
|
+
})(["height:", ";width:", ";border-radius:50%;border:", ";display:flex;align-items:center;justify-content:center;position:relative;background:", ";", ""], props => handleSize(props.size), props => handleSize(props.size), _ref => {
|
|
44
|
+
let {
|
|
45
|
+
multiChannel
|
|
46
|
+
} = _ref;
|
|
55
47
|
if (multiChannel) {
|
|
56
48
|
return ".1429rem solid ".concat(multiChannel, " ");
|
|
57
49
|
}
|
|
58
50
|
return ".0714rem solid ".concat(_colors.BmBgLightBlue);
|
|
59
|
-
}, _colors.BmSecondaryBlue12,
|
|
60
|
-
|
|
61
|
-
});
|
|
62
|
-
var Content = _styledComponents.default.div.withConfig({
|
|
51
|
+
}, _colors.BmSecondaryBlue12, props => props.hoverEnabled && props.hoverText && (0, _styledComponents.css)(["&:hover::after{content:'", "';position:absolute;bottom:-1.8em;left:50%;transform:translateX(-50%);background:#fff;color:rgba(0,0,0,0.7);padding:6px 12px;border-radius:12px;text-transform:capitalize;font-weight:500;font-size:0.9rem;max-width:100px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;z-index:1;}"], props.hoverText.length > 10 ? "".concat(props.hoverText.slice(0, 10), "\u2026") : props.hoverText));
|
|
52
|
+
const Content = _styledComponents.default.div.withConfig({
|
|
63
53
|
displayName: "ProfileIcon__Content"
|
|
64
54
|
})(["display:flex;align-items:center;justify-content:center;position:absolute;"]);
|
|
65
|
-
|
|
55
|
+
const Dot = _styledComponents.default.img.withConfig({
|
|
66
56
|
displayName: "ProfileIcon__Dot"
|
|
67
|
-
})(["position:absolute;left:", ";bottom:0rem;object-fit:contain;height:1rem;width:1rem;"],
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
57
|
+
})(["position:absolute;left:", ";bottom:0rem;object-fit:contain;height:1rem;width:1rem;"], props => position(props.size));
|
|
58
|
+
const BmProfileIcon = _ref2 => {
|
|
59
|
+
let {
|
|
60
|
+
img,
|
|
61
|
+
content,
|
|
62
|
+
channel,
|
|
63
|
+
size
|
|
64
|
+
} = _ref2,
|
|
75
65
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
76
66
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(Profile, _extends({
|
|
77
67
|
size: size
|
|
@@ -7,9 +7,9 @@ exports.default = exports.Sample = exports.ImageProfile = exports.ContentProfile
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _ProfileIcon = require("./ProfileIcon");
|
|
9
9
|
var _beem = _interopRequireDefault(require("../../assets/beem.jpeg"));
|
|
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: _ProfileIcon.BmProfileIcon,
|
|
14
14
|
title: 'components/ProfileIcon',
|
|
15
15
|
argTypes: {
|
|
@@ -47,26 +47,20 @@ var _default = {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return /*#__PURE__*/_react.default.createElement(_ProfileIcon.BmProfileIcon, args);
|
|
53
|
-
};
|
|
54
|
-
var Sample = MainProfileIcon.bind({});
|
|
55
|
-
exports.Sample = Sample;
|
|
50
|
+
const MainProfileIcon = args => /*#__PURE__*/_react.default.createElement(_ProfileIcon.BmProfileIcon, args);
|
|
51
|
+
const Sample = exports.Sample = MainProfileIcon.bind({});
|
|
56
52
|
Sample.args = {
|
|
57
53
|
channel: 'whatsapp',
|
|
58
54
|
size: 'large'
|
|
59
55
|
};
|
|
60
|
-
|
|
61
|
-
exports.ImageProfile = ImageProfile;
|
|
56
|
+
const ImageProfile = exports.ImageProfile = MainProfileIcon.bind({});
|
|
62
57
|
ImageProfile.args = {
|
|
63
58
|
channel: 'whatsapp',
|
|
64
59
|
size: 'large',
|
|
65
60
|
img: _beem.default,
|
|
66
61
|
content: undefined
|
|
67
62
|
};
|
|
68
|
-
|
|
69
|
-
exports.ContentProfile = ContentProfile;
|
|
63
|
+
const ContentProfile = exports.ContentProfile = MainProfileIcon.bind({});
|
|
70
64
|
ContentProfile.args = {
|
|
71
65
|
channel: 'whatsapp',
|
|
72
66
|
size: 'large',
|
|
@@ -8,27 +8,29 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _colors = require("../colors");
|
|
11
|
-
function _interopRequireDefault(
|
|
12
|
-
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const Container = _styledComponents.default.div.withConfig({
|
|
13
13
|
displayName: "progressbar__Container"
|
|
14
14
|
})(["height:0.75rem;width:100%;position:relative;"]);
|
|
15
|
-
|
|
15
|
+
const BaseBox = _styledComponents.default.div.withConfig({
|
|
16
16
|
displayName: "progressbar__BaseBox"
|
|
17
17
|
})(["height:100%;position:absolute;border-radius:0.25rem;transition:width 1s ease-in-out;"]);
|
|
18
|
-
|
|
18
|
+
const Background = (0, _styledComponents.default)(BaseBox).withConfig({
|
|
19
19
|
displayName: "progressbar__Background"
|
|
20
20
|
})(["background:", ";width:100%;"], _colors.BmGrey100);
|
|
21
|
-
|
|
21
|
+
const Progress = (0, _styledComponents.default)(BaseBox).withConfig({
|
|
22
22
|
displayName: "progressbar__Progress"
|
|
23
|
-
})(["background:", ";width:", "%;"],
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
})(["background:", ";width:", "%;"], props => props.color ? props.color : "".concat(_colors.BmPrimaryBlue, " "), _ref => {
|
|
24
|
+
let {
|
|
25
|
+
value
|
|
26
|
+
} = _ref;
|
|
27
27
|
return value;
|
|
28
28
|
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const BmProgressBar = props => {
|
|
30
|
+
const {
|
|
31
|
+
value,
|
|
32
|
+
color
|
|
33
|
+
} = props;
|
|
32
34
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(Background, null), /*#__PURE__*/_react.default.createElement(Progress, {
|
|
33
35
|
value: value,
|
|
34
36
|
color: color
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.ProgressBar = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _progressbar = require("./progressbar");
|
|
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: _progressbar.BmProgressBar,
|
|
13
13
|
title: 'components/ProgressBar',
|
|
14
14
|
argTypes: {
|
|
@@ -26,12 +26,8 @@ var _default = {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return /*#__PURE__*/_react.default.createElement(_progressbar.BmProgressBar, args);
|
|
32
|
-
};
|
|
33
|
-
var ProgressBar = MainProgressBar.bind({});
|
|
34
|
-
exports.ProgressBar = ProgressBar;
|
|
29
|
+
const MainProgressBar = args => /*#__PURE__*/_react.default.createElement(_progressbar.BmProgressBar, args);
|
|
30
|
+
const ProgressBar = exports.ProgressBar = MainProgressBar.bind({});
|
|
35
31
|
ProgressBar.args = {
|
|
36
32
|
value: '50'
|
|
37
33
|
};
|
|
@@ -0,0 +1,121 @@
|
|
|
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: "ProgressIndicator__Container"
|
|
27
|
+
})(["margin-bottom:1rem;--primary-color:", ";--primary-light:", ";--primary-lighter:", ";--muted-color:", ";--muted-foreground-color:", ";@media (min-width:45.7143rem){margin-bottom:1.5rem;}"], _ref => {
|
|
28
|
+
let {
|
|
29
|
+
primaryColor
|
|
30
|
+
} = _ref;
|
|
31
|
+
return primaryColor;
|
|
32
|
+
}, _ref2 => {
|
|
33
|
+
let {
|
|
34
|
+
primaryColor
|
|
35
|
+
} = _ref2;
|
|
36
|
+
return hexToRgba(primaryColor, 0.2);
|
|
37
|
+
}, _ref3 => {
|
|
38
|
+
let {
|
|
39
|
+
primaryColor
|
|
40
|
+
} = _ref3;
|
|
41
|
+
return hexToRgba(primaryColor, 0.4);
|
|
42
|
+
}, _ref4 => {
|
|
43
|
+
let {
|
|
44
|
+
mutedColor
|
|
45
|
+
} = _ref4;
|
|
46
|
+
return mutedColor;
|
|
47
|
+
}, _ref5 => {
|
|
48
|
+
let {
|
|
49
|
+
mutedForegroundColor
|
|
50
|
+
} = _ref5;
|
|
51
|
+
return mutedForegroundColor;
|
|
52
|
+
});
|
|
53
|
+
const ProgressMobile = _styledComponents.default.div.withConfig({
|
|
54
|
+
displayName: "ProgressIndicator__ProgressMobile"
|
|
55
|
+
})(["display:flex;justify-content:center;gap:0.5rem;margin-bottom:0.5rem;@media (min-width:45.7143rem){display:none;}"]);
|
|
56
|
+
const ProgressDot = _styledComponents.default.div.withConfig({
|
|
57
|
+
displayName: "ProgressIndicator__ProgressDot"
|
|
58
|
+
})(["width:0.625rem;height:0.625rem;border-radius:50%;background-color:var(--muted-color);transition:background-color 0.3s ease;&.active{background-color:var(--primary-color);}&.completed{background-color:var(--primary-lighter);}"]);
|
|
59
|
+
const ProgressDesktop = _styledComponents.default.div.withConfig({
|
|
60
|
+
displayName: "ProgressIndicator__ProgressDesktop"
|
|
61
|
+
})(["display:none;justify-content:space-between;align-items:center;margin-bottom:0.5rem;@media (min-width:45.7143rem){display:flex;}"]);
|
|
62
|
+
const Step = _styledComponents.default.div.withConfig({
|
|
63
|
+
displayName: "ProgressIndicator__Step"
|
|
64
|
+
})(["display:flex;flex-direction:column;align-items:center;flex:1;position:relative;"]);
|
|
65
|
+
const Circle = _styledComponents.default.div.withConfig({
|
|
66
|
+
displayName: "ProgressIndicator__Circle"
|
|
67
|
+
})(["width:2rem;height:2rem;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:0.875rem;background-color:var(--muted-color);color:var(--muted-foreground-color);margin-bottom:0.25rem;transition:all 0.3s ease;&.active{background-color:var(--primary-color);color:white;}&.completed{background-color:var(--primary-light);color:var(--primary-color);}svg{width:1rem;height:1rem;}"]);
|
|
68
|
+
const Label = _styledComponents.default.span.withConfig({
|
|
69
|
+
displayName: "ProgressIndicator__Label"
|
|
70
|
+
})(["font-size:0.75rem;margin-top:0.25rem;color:var(--muted-foreground-color);text-align:center;font-weight:400;transition:color 0.3s ease;&.active{color:var(--primary-color);font-weight:500;}"]);
|
|
71
|
+
const ProgressBar = _styledComponents.default.div.withConfig({
|
|
72
|
+
displayName: "ProgressIndicator__ProgressBar"
|
|
73
|
+
})(["width:100%;background-color:var(--muted-color);height:0.25rem;border-radius:714.2143rem;overflow:hidden;"]);
|
|
74
|
+
const Fill = _styledComponents.default.div.withConfig({
|
|
75
|
+
displayName: "ProgressIndicator__Fill"
|
|
76
|
+
})(["height:100%;background-color:var(--primary-color);transition:width 0.3s ease-out;width:", "%;border-radius:714.2143rem;"], _ref6 => {
|
|
77
|
+
let {
|
|
78
|
+
percentage
|
|
79
|
+
} = _ref6;
|
|
80
|
+
return percentage;
|
|
81
|
+
});
|
|
82
|
+
const BmProgressIndicator = _ref7 => {
|
|
83
|
+
let {
|
|
84
|
+
steps = [],
|
|
85
|
+
currentStep = 0,
|
|
86
|
+
primaryColor = '#33B1BA',
|
|
87
|
+
mutedColor = '#ececf0',
|
|
88
|
+
mutedForegroundColor = '#717182'
|
|
89
|
+
} = _ref7;
|
|
90
|
+
if (!steps || steps.length <= 1) return null;
|
|
91
|
+
const progressPercentage = currentStep / (steps.length - 1) * 100;
|
|
92
|
+
return /*#__PURE__*/_react.default.createElement(Container, {
|
|
93
|
+
primaryColor: primaryColor,
|
|
94
|
+
mutedColor: mutedColor,
|
|
95
|
+
mutedForegroundColor: mutedForegroundColor
|
|
96
|
+
}, /*#__PURE__*/_react.default.createElement(ProgressMobile, null, steps.map((step, index) => /*#__PURE__*/_react.default.createElement(ProgressDot, {
|
|
97
|
+
key: step.key || index,
|
|
98
|
+
className: "".concat(index === currentStep ? 'active' : '', " ").concat(index < currentStep ? 'completed' : '')
|
|
99
|
+
}))), /*#__PURE__*/_react.default.createElement(ProgressDesktop, null, steps.map((step, index) => {
|
|
100
|
+
const isActive = index === currentStep;
|
|
101
|
+
const isCompleted = index < currentStep;
|
|
102
|
+
return /*#__PURE__*/_react.default.createElement(Step, {
|
|
103
|
+
key: step.key || index
|
|
104
|
+
}, /*#__PURE__*/_react.default.createElement(Circle, {
|
|
105
|
+
className: "".concat(isActive ? 'active' : '', " ").concat(isCompleted ? 'completed' : '')
|
|
106
|
+
}, isCompleted ? /*#__PURE__*/_react.default.createElement("svg", {
|
|
107
|
+
width: "16",
|
|
108
|
+
height: "16",
|
|
109
|
+
viewBox: "0 0 16 16",
|
|
110
|
+
fill: "none"
|
|
111
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
112
|
+
d: "M13.854 4.146a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.793l6.646-6.647a.5.5 0 0 1 .708 0z",
|
|
113
|
+
fill: "currentColor"
|
|
114
|
+
})) : /*#__PURE__*/_react.default.createElement("span", null, index + 1)), /*#__PURE__*/_react.default.createElement(Label, {
|
|
115
|
+
className: isActive ? 'active' : ''
|
|
116
|
+
}, step.label));
|
|
117
|
+
})), /*#__PURE__*/_react.default.createElement(ProgressBar, null, /*#__PURE__*/_react.default.createElement(Fill, {
|
|
118
|
+
percentage: progressPercentage
|
|
119
|
+
})));
|
|
120
|
+
};
|
|
121
|
+
var _default = exports.default = BmProgressIndicator;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Example = exports.Default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _ProgressIndicator = _interopRequireDefault(require("./ProgressIndicator"));
|
|
9
|
+
var _buttons = require("../Buttons/buttons");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
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); }
|
|
12
|
+
const steps = [{
|
|
13
|
+
key: 'step1',
|
|
14
|
+
label: 'Start'
|
|
15
|
+
}, {
|
|
16
|
+
key: 'step2',
|
|
17
|
+
label: 'Details'
|
|
18
|
+
}, {
|
|
19
|
+
key: 'step3',
|
|
20
|
+
label: 'Review'
|
|
21
|
+
}, {
|
|
22
|
+
key: 'step4',
|
|
23
|
+
label: 'Complete'
|
|
24
|
+
}];
|
|
25
|
+
var _default = exports.default = {
|
|
26
|
+
title: 'Components/BmProgressIndicator',
|
|
27
|
+
component: _ProgressIndicator.default,
|
|
28
|
+
argTypes: {
|
|
29
|
+
primaryColor: {
|
|
30
|
+
control: 'color',
|
|
31
|
+
defaultValue: '#33B1BA'
|
|
32
|
+
},
|
|
33
|
+
mutedColor: {
|
|
34
|
+
control: 'color',
|
|
35
|
+
defaultValue: '#ececf0'
|
|
36
|
+
},
|
|
37
|
+
mutedForegroundColor: {
|
|
38
|
+
control: 'color',
|
|
39
|
+
defaultValue: '#717182'
|
|
40
|
+
},
|
|
41
|
+
currentStep: {
|
|
42
|
+
control: {
|
|
43
|
+
type: 'number',
|
|
44
|
+
min: 0,
|
|
45
|
+
max: 3,
|
|
46
|
+
step: 1
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const Template = args => /*#__PURE__*/_react.default.createElement(_ProgressIndicator.default, args);
|
|
52
|
+
const Default = exports.Default = Template.bind({});
|
|
53
|
+
Default.args = {
|
|
54
|
+
steps: [{
|
|
55
|
+
key: 'step1',
|
|
56
|
+
label: 'Details'
|
|
57
|
+
}, {
|
|
58
|
+
key: 'step2',
|
|
59
|
+
label: 'Verification'
|
|
60
|
+
}, {
|
|
61
|
+
key: 'step3',
|
|
62
|
+
label: 'Review'
|
|
63
|
+
}, {
|
|
64
|
+
key: 'step4',
|
|
65
|
+
label: 'Complete'
|
|
66
|
+
}],
|
|
67
|
+
currentStep: 1,
|
|
68
|
+
primaryColor: '#33B1BA',
|
|
69
|
+
mutedColor: '#ececf0',
|
|
70
|
+
mutedForegroundColor: '#717182'
|
|
71
|
+
};
|
|
72
|
+
const Example = () => {
|
|
73
|
+
const [currentStep, setCurrentStep] = (0, _react.useState)(1);
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ProgressIndicator.default, {
|
|
75
|
+
steps: steps,
|
|
76
|
+
currentStep: currentStep,
|
|
77
|
+
primaryColor: "#10b981"
|
|
78
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
79
|
+
style: {
|
|
80
|
+
marginTop: '2rem',
|
|
81
|
+
display: 'flex',
|
|
82
|
+
flexDirection: 'row',
|
|
83
|
+
justifyContent: 'space-between'
|
|
84
|
+
}
|
|
85
|
+
}, /*#__PURE__*/_react.default.createElement(_buttons.BmButton, {
|
|
86
|
+
width: "50%",
|
|
87
|
+
size: "medium",
|
|
88
|
+
variant: "primary",
|
|
89
|
+
onClick: () => setCurrentStep(prev => Math.max(prev - 1, 0))
|
|
90
|
+
}, "Prev"), /*#__PURE__*/_react.default.createElement(_buttons.BmButton, {
|
|
91
|
+
onClick: () => setCurrentStep(prev => Math.min(prev + 1, steps.length - 1)),
|
|
92
|
+
borderColor: "#000000",
|
|
93
|
+
width: "50%",
|
|
94
|
+
size: "medium",
|
|
95
|
+
variant: "secondary",
|
|
96
|
+
color: "#000000"
|
|
97
|
+
}, "Next")));
|
|
98
|
+
};
|
|
99
|
+
exports.Example = Example;
|