beem-component 2.0.27 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +4 -2
- package/Jenkinsfile +20 -5
- package/dist/components/Accordion/Accordion.js +55 -66
- package/dist/components/Accordion/Accordion.stories.js +5 -6
- package/dist/components/Avatars/avatars.js +33 -23
- package/dist/components/Avatars/avatars.stories.js +5 -10
- package/dist/components/BannerCard/bannerCard.stories.js +6 -7
- package/dist/components/BannerCard/bannerCards.js +38 -40
- package/dist/components/BmSelector/BmSelector.js +120 -0
- package/dist/components/BmSelector/BmSelector.stories.js +138 -0
- package/dist/components/ButtonGroup/buttonGroup.js +14 -15
- package/dist/components/ButtonGroup/buttonGroup.stories.js +11 -26
- package/dist/components/Buttons/Stories/basicbutton.stories.js +5 -10
- package/dist/components/Buttons/Stories/buttonAlertIcons.stories.js +4 -8
- package/dist/components/Buttons/Stories/buttonIconsOnly.stories.js +4 -8
- package/dist/components/Buttons/buttonAlertIcons.js +40 -58
- package/dist/components/Buttons/buttonDropdown copy.js +52 -35
- package/dist/components/Buttons/buttonDropdown.js +5 -3
- package/dist/components/Buttons/buttonIconsOnly.js +32 -25
- package/dist/components/Buttons/buttons.js +105 -72
- package/dist/components/Card_v2/Card.js +78 -0
- package/dist/components/Card_v2/Card.stories.js +60 -0
- package/dist/components/Cards/cards.js +3 -4
- package/dist/components/Cards/cards.stories.js +4 -5
- package/dist/components/ChatComponents/ChatBody/FeedPostComments.js +65 -39
- package/dist/components/ChatComponents/ChatBody/chatBody.js +224 -189
- package/dist/components/ChatComponents/ChatBody/chatBody.stories.js +4 -5
- package/dist/components/ChatComponents/ChatBody/sessionDetails.js +11 -9
- package/dist/components/ChatComponents/ChatBody/sessionTimeline.js +12 -10
- package/dist/components/ChatComponents/ChatHeader/chatHeader.js +3 -4
- package/dist/components/ChatComponents/ChatHeader/chatHeader.stories.js +3 -4
- package/dist/components/ChatComponents/ColorPicker/colorPicker.js +3 -6
- package/dist/components/ChatComponents/ColorPicker/colorPicker.stories.js +7 -10
- package/dist/components/ChatComponents/ContactCards/contactCards.js +40 -31
- package/dist/components/ChatComponents/ContactCards/contactCards.stories.js +3 -4
- package/dist/components/ChatComponents/FormAccordion/FormAccordion.js +3 -4
- package/dist/components/ChatComponents/FormAccordion/FormAccordion.stories.js +3 -4
- package/dist/components/ChatComponents/InfoTab/infoTab.js +3 -5
- package/dist/components/ChatComponents/InfoTab/infoTab.stories.js +3 -4
- package/dist/components/ChatComponents/LabelAccordion/LabelAccordion.js +3 -4
- package/dist/components/ChatComponents/LabelAccordion/LabelAccordion.stories.js +3 -4
- package/dist/components/ChatComponents/NoteAccordion/NoteAccordion.js +3 -4
- package/dist/components/ChatComponents/NoteAccordion/NoteAccordion.stories.js +3 -4
- package/dist/components/Chats/chat.js +56 -50
- package/dist/components/Chats/chatInput.js +9 -14
- package/dist/components/Chats/chatwrapper.js +8 -14
- package/dist/components/Checkbox/checkboxToggler.js +20 -20
- package/dist/components/Checkbox/checkboxToggler.stories.js +12 -35
- package/dist/components/InfoPanel/InfoPanel.js +141 -0
- package/dist/components/InfoPanel/InfoPanel.stories.js +200 -0
- package/dist/components/InputCounter/inputCounter.js +17 -18
- package/dist/components/Jumbotron/Jumbotron.js +8 -11
- package/dist/components/Jumbotron/Jumbotron.stories.js +3 -4
- package/dist/components/LabelWithIcon/LabelWithIcon.js +63 -0
- package/dist/components/LabelWithIcon/LabelWithIcon.stories.js +59 -0
- package/dist/components/Lists/listBox.js +21 -25
- package/dist/components/Lists/listBox.stories.js +7 -20
- package/dist/components/Lists/listHeader.stories.js +4 -8
- package/dist/components/Lists/listheader.js +17 -14
- package/dist/components/Lists/rowLabels.js +26 -24
- package/dist/components/Lists/rowLabels.stories.js +11 -18
- package/dist/components/Loader/loader.js +16 -14
- package/dist/components/Loader/loader.stories.js +4 -8
- package/dist/components/MainWrapper/index.js +3 -4
- package/dist/components/MessageCounter/MessageCounter.stories.js +4 -5
- package/dist/components/MessageCounter/messageCounter.js +15 -10
- package/dist/components/Modals/modal.js +57 -72
- package/dist/components/Modals/modals.stories.js +16 -45
- package/dist/components/MojaAccordion/MojaAccordion.js +49 -55
- package/dist/components/MultipleDateSelector/multipleDateSelector.js +14 -18
- package/dist/components/NoteBar/noteBar.js +22 -32
- package/dist/components/NoteBar/noteBar.stories.js +5 -10
- package/dist/components/PaymentBox/paymentBox.js +14 -11
- package/dist/components/PaymentBox/paymentBox.stories.js +3 -4
- package/dist/components/PerformanceIndicator/performaceIndicator.stories.js +4 -8
- package/dist/components/PerformanceIndicator/performanceIndicator.js +17 -14
- package/dist/components/Pills/pills.js +30 -38
- package/dist/components/Pills/pills.stories.js +5 -10
- package/dist/components/ProfileIcon/ProfileIcon.js +26 -36
- package/dist/components/ProfileIcon/profileIcon.stories.js +6 -12
- package/dist/components/ProgressBar/progressbar.js +14 -12
- package/dist/components/ProgressBar/progressbar.stories.js +4 -8
- package/dist/components/ProgressIndicator/ProgressIndicator.js +121 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.stories.js +99 -0
- package/dist/components/ProgressRing/progressRing.js +48 -50
- package/dist/components/ProgressRing/progressRing.stories.js +5 -10
- package/dist/components/RouteLink/link.js +3 -8
- package/dist/components/RouteLink/link.stories.js +3 -4
- package/dist/components/ScrollBar/scrollBar.js +18 -26
- package/dist/components/SelectionNotice/SelectionNotice.js +57 -0
- package/dist/components/SelectionNotice/SelectionNotice.stories.js +35 -0
- package/dist/components/Stepper/stepper.js +4 -11
- package/dist/components/SuperFluid/Content/index.js +3 -4
- package/dist/components/SuperFluid/ContentTitle.js/index.js +6 -10
- package/dist/components/SuperFluid/SegmentCard/index.js +11 -21
- package/dist/components/Tabs/tabs.js +32 -24
- package/dist/components/Tabs/tabs.stories.js +6 -12
- package/dist/components/Tags/tags.js +65 -63
- package/dist/components/Tags/tags.stories.js +6 -12
- package/dist/components/breakpoints.js +3 -5
- package/dist/components/chatHeader.js +7 -12
- package/dist/components/checkbox.js +30 -25
- package/dist/components/colors.js +31 -62
- package/dist/components/contacts.js +32 -35
- package/dist/components/dropdown.js +18 -39
- package/dist/components/dropdownButton.js +38 -28
- package/dist/components/dropdownItems.js +23 -26
- package/dist/components/examples/App.js +3 -4
- package/dist/components/examples/InfoAccordion.js +3 -4
- package/dist/components/examples/chatBodyExample.js +4 -7
- package/dist/components/examples/selectExample.js +12 -30
- package/dist/components/globalStyles.js +1 -2
- package/dist/components/iconStyles.js +69 -103
- package/dist/components/index-copy.js +197 -197
- package/dist/components/index.js +106 -66
- package/dist/components/input.js +36 -25
- package/dist/components/logo.js +10 -9
- package/dist/components/navbar.js +9 -16
- package/dist/components/search.js +18 -16
- package/dist/components/shadow.js +1 -2
- package/dist/components/text.js +9 -18
- package/dist/components/typography.js +14 -28
- package/dist/components/wrapper.js +4 -6
- package/nginx.conf +26 -12
- package/package.json +3 -1
- package/src/App.js +246 -3
- package/src/lib/components/BmSelector/BmSelector.js +154 -0
- package/src/lib/components/BmSelector/BmSelector.stories.jsx +125 -0
- package/src/lib/components/Buttons/buttons.js +12 -8
- package/src/lib/components/Card_v2/Card.js +128 -0
- package/src/lib/components/Card_v2/Card.stories.jsx +94 -0
- package/src/lib/components/InfoPanel/InfoPanel.js +221 -0
- package/src/lib/components/InfoPanel/InfoPanel.stories.jsx +169 -0
- package/src/lib/components/LabelWithIcon/LabelWithIcon.js +61 -0
- package/src/lib/components/LabelWithIcon/LabelWithIcon.stories.jsx +59 -0
- package/src/lib/components/ProgressIndicator/ProgressIndicator.js +208 -0
- package/src/lib/components/ProgressIndicator/ProgressIndicator.stories.jsx +91 -0
- package/src/lib/components/SelectionNotice/SelectionNotice.js +65 -0
- package/src/lib/components/SelectionNotice/SelectionNotice.stories.jsx +40 -0
- package/src/lib/components/index.js +14 -0
- package/src/util/convertToRGBA.js +21 -0
- package/storybook-static/140.d6695a165d8dcc810b2e.manager.bundle.js +1 -0
- package/storybook-static/140.f87feb0b.iframe.bundle.js +1 -0
- package/storybook-static/149.7cc11ef8.iframe.bundle.js +2 -0
- package/storybook-static/149.7cc11ef8.iframe.bundle.js.LICENSE.txt +14 -0
- package/storybook-static/192.08b67b8c.iframe.bundle.js +1 -0
- package/storybook-static/246.9ad91c22.iframe.bundle.js +2 -0
- package/storybook-static/{vendors~main.7fe78cc2.iframe.bundle.js.LICENSE.txt → 246.9ad91c22.iframe.bundle.js.LICENSE.txt} +48 -16
- package/storybook-static/448.0ad0b2a9.iframe.bundle.js +2 -0
- package/storybook-static/448.0ad0b2a9.iframe.bundle.js.LICENSE.txt +8 -0
- package/storybook-static/448.502f738789de31a83e1c.manager.bundle.js +2 -0
- package/storybook-static/448.502f738789de31a83e1c.manager.bundle.js.LICENSE.txt +8 -0
- package/storybook-static/463.694cb3b0a2f8b0deba70.manager.bundle.js +2 -0
- package/storybook-static/463.694cb3b0a2f8b0deba70.manager.bundle.js.LICENSE.txt +31 -0
- package/storybook-static/463.7b3b5742.iframe.bundle.js +2 -0
- package/storybook-static/463.7b3b5742.iframe.bundle.js.LICENSE.txt +31 -0
- package/storybook-static/58.56a2198b.iframe.bundle.js +1 -0
- package/storybook-static/58.cd3f8ad06a1200571eab.manager.bundle.js +1 -0
- package/storybook-static/676.d74803c6ab12eac1cdb2.manager.bundle.js +2 -0
- package/storybook-static/{vendors~main.1750028c2d68e574fb1d.manager.bundle.js.LICENSE.txt → 676.d74803c6ab12eac1cdb2.manager.bundle.js.LICENSE.txt} +20 -30
- package/storybook-static/720.d729a720931e1312e597.manager.bundle.js +2 -0
- package/storybook-static/720.e12f6aa2.iframe.bundle.js +2 -0
- package/storybook-static/794.0543a68a8b5aa273273a.manager.bundle.js +1 -0
- package/storybook-static/929.5353bbe2.iframe.bundle.js +1 -0
- package/storybook-static/929.ed1807a8ea3e2353d440.manager.bundle.js +1 -0
- package/storybook-static/9b058fcb1416fea75e6c.png +0 -0
- package/storybook-static/f29af3502f15acc765a8.png +0 -0
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/iframe.html +22 -6
- package/storybook-static/index.html +66 -109
- package/storybook-static/main.1a29aa69.iframe.bundle.js +1 -0
- package/storybook-static/main.69bad789e0a3d801264b.manager.bundle.js +1 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/runtime~main.87eecef7.iframe.bundle.js +1 -0
- package/storybook-static/runtime~main.dd5308492057ff00c469.manager.bundle.js +1 -0
- package/storybook-static/static/css/main.08a2eb27.css +6 -0
- package/storybook-static/static/css/main.08a2eb27.css.map +1 -0
- package/storybook-static/0.00c62ec79c260aedbb98.manager.bundle.js +0 -2
- package/storybook-static/0.00c62ec79c260aedbb98.manager.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/0.96c45dd8.iframe.bundle.js +0 -1
- package/storybook-static/1.dc6acfa9.iframe.bundle.js +0 -3
- package/storybook-static/1.dc6acfa9.iframe.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/1.dc6acfa9.iframe.bundle.js.map +0 -1
- package/storybook-static/1.dc7dcdaec2def2f224fd.manager.bundle.js +0 -1
- package/storybook-static/2.24353ddc.iframe.bundle.js +0 -1
- package/storybook-static/3.8bb2173c.iframe.bundle.js +0 -1
- package/storybook-static/5.0779e3847d325dece216.manager.bundle.js +0 -1
- package/storybook-static/6.8bd405c2576206749a16.manager.bundle.js +0 -2
- package/storybook-static/7.9d4ba19cf58425e7ff0d.manager.bundle.js +0 -1
- package/storybook-static/7.f0cfc757.iframe.bundle.js +0 -1
- package/storybook-static/8.91de97de.iframe.bundle.js +0 -3
- package/storybook-static/8.91de97de.iframe.bundle.js.map +0 -1
- package/storybook-static/8.b4e9ec0ec7648e02a923.manager.bundle.js +0 -1
- package/storybook-static/9.40ec65d6.iframe.bundle.js +0 -1
- package/storybook-static/asset-manifest.json +0 -30
- package/storybook-static/main.3c8d8027.iframe.bundle.js +0 -1
- package/storybook-static/main.3e5804fe56d1f580b088.manager.bundle.js +0 -1
- package/storybook-static/runtime~main.d3a18d6a.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.ff106120648356c6069d.manager.bundle.js +0 -1
- package/storybook-static/static/css/main.b44a190d.chunk.css +0 -4
- package/storybook-static/static/css/main.b44a190d.chunk.css.map +0 -1
- package/storybook-static/vendors~main.1750028c2d68e574fb1d.manager.bundle.js +0 -2
- package/storybook-static/vendors~main.7fe78cc2.iframe.bundle.js +0 -3
- package/storybook-static/vendors~main.7fe78cc2.iframe.bundle.js.map +0 -1
- /package/storybook-static/{static/media/PoppinsMedium.0ba26f6c.woff → 0ba26f6cfe2f94ec2b43.woff} +0 -0
- /package/storybook-static/{static/media/PoppinsRegular.13b9af9c.eot → 13b9af9c8b2b4d656251.eot} +0 -0
- /package/storybook-static/{static/media/OpenSans-Regular.1b0809d5.ttf → 1b0809d519837cb7aad3.ttf} +0 -0
- /package/storybook-static/{static/media/PoppinsBold.1eae2d48.woff2 → 1eae2d48398534b6e1fe.woff2} +0 -0
- /package/storybook-static/{static/media/PoppinsRegular.43e9b50d.svg → 43e9b50d6f4141c6275f.svg} +0 -0
- /package/storybook-static/{static/media/PoppinsMedium.49b46ace.eot → 49b46acec5a811ce1edd.eot} +0 -0
- /package/storybook-static/{static/media/PoppinsRegular.4a4d5420.woff → 4a4d54208e3b43dcdd6e.woff} +0 -0
- /package/storybook-static/{static/media/PoppinsBold.53ff6749.eot → 53ff67494885a390867f.eot} +0 -0
- /package/storybook-static/{static/media/PoppinsBold.53ff971f.ttf → 53ff971f3c691d03daf6.ttf} +0 -0
- /package/storybook-static/{static/media/PoppinsSemiBold.5692c77f.ttf → 5692c77f2768f53db4fb.ttf} +0 -0
- /package/storybook-static/{static/media/PoppinsMedium.57a99fa8.woff2 → 57a99fa8569430db3aa1.woff2} +0 -0
- /package/storybook-static/{6.8bd405c2576206749a16.manager.bundle.js.LICENSE.txt → 720.d729a720931e1312e597.manager.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{8.91de97de.iframe.bundle.js.LICENSE.txt → 720.e12f6aa2.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{static/media/PoppinsSemiBold.80138c67.woff → 80138c67abf7843ea7e5.woff} +0 -0
- /package/storybook-static/{static/media/PoppinsBold.850fc4f3.svg → 850fc4f3768c0af34ea8.svg} +0 -0
- /package/storybook-static/{static/media/PoppinsRegular.9a7cc7ec.woff2 → 9a7cc7ec4e1eda4f7e6d.woff2} +0 -0
- /package/storybook-static/{static/media/PoppinsBold.b33c148b.woff → b33c148b95e9b282af64.woff} +0 -0
- /package/storybook-static/{static/media/PoppinsMedium.b7e43707.svg → b7e43707906d1445e127.svg} +0 -0
- /package/storybook-static/{static/media/PoppinsSemiBold.c442695a.eot → c442695a5fcf958609b8.eot} +0 -0
- /package/storybook-static/{static/media/PoppinsMedium.c98dddbd.ttf → c98dddbdc5b1e18988b9.ttf} +0 -0
- /package/storybook-static/{static/media/PoppinsSemiBold.e1948d56.svg → e1948d56fc87f569ef8d.svg} +0 -0
- /package/storybook-static/{static/media/PoppinsRegular.e1bc9021.ttf → e1bc9021c9d8ba86968b.ttf} +0 -0
- /package/storybook-static/{static/media/PoppinsSemiBold.f27050e2.woff2 → f27050e2684287d42c91.woff2} +0 -0
|
@@ -10,16 +10,18 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
10
10
|
var _buttonIconsOnly = require("./buttonIconsOnly");
|
|
11
11
|
var _buttons = require("./buttons");
|
|
12
12
|
var _colors = require("../colors");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(
|
|
15
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
16
|
-
function _objectWithoutProperties(
|
|
17
|
-
function _objectWithoutPropertiesLoose(
|
|
18
|
-
|
|
13
|
+
const _excluded = ["children"];
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
16
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
17
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
18
|
+
const ButtonDropdownWrapper = _styledComponents.default.div.withConfig({
|
|
19
19
|
displayName: "buttonDropdowncopy__ButtonDropdownWrapper"
|
|
20
|
-
})(["display:flex;&:hover{background:", ";border:0.071rem solid ", ";}&:active{background:", ";box-shadow:", ";border:0.071rem solid ", ";}"],
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
})(["display:flex;&:hover{background:", ";border:0.071rem solid ", ";}&:active{background:", ";box-shadow:", ";border:0.071rem solid ", ";}"], _ref => {
|
|
21
|
+
let {
|
|
22
|
+
variant,
|
|
23
|
+
disabled
|
|
24
|
+
} = _ref;
|
|
23
25
|
if (!disabled) {
|
|
24
26
|
if (variant === 'primary') return "".concat(_colors.BmSecondaryCyan);
|
|
25
27
|
if (variant === 'neutral') return "".concat(_colors.BmGrey50);
|
|
@@ -29,16 +31,20 @@ var ButtonDropdownWrapper = _styledComponents.default.div.withConfig({
|
|
|
29
31
|
return "".concat(_colors.BmSecondaryCyan);
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
}, _ref2 => {
|
|
35
|
+
let {
|
|
36
|
+
variant,
|
|
37
|
+
disabled
|
|
38
|
+
} = _ref2;
|
|
35
39
|
if (!disabled) {
|
|
36
40
|
if (variant === 'secondary') return "".concat(_colors.BmSecondaryCyan);
|
|
37
41
|
}
|
|
38
42
|
return 'none';
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
}, _ref3 => {
|
|
44
|
+
let {
|
|
45
|
+
variant,
|
|
46
|
+
disabled
|
|
47
|
+
} = _ref3;
|
|
42
48
|
if (!disabled) {
|
|
43
49
|
if (variant === 'primary') return "".concat(_colors.BmPrimaryBlue);
|
|
44
50
|
if (variant === 'neutral') return "".concat(_colors.BmGrey100);
|
|
@@ -48,28 +54,34 @@ var ButtonDropdownWrapper = _styledComponents.default.div.withConfig({
|
|
|
48
54
|
return "".concat(_colors.BmPrimaryBlue);
|
|
49
55
|
}
|
|
50
56
|
}
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
}, _ref4 => {
|
|
58
|
+
let {
|
|
59
|
+
variant,
|
|
60
|
+
disabled
|
|
61
|
+
} = _ref4;
|
|
54
62
|
if (!disabled) {
|
|
55
63
|
if (variant === 'primary' || variant === 'success' || variant === 'destructive') return 'inset 0rem 0.125rem 0.25rem rgba(0, 0, 0, 0.25)';
|
|
56
64
|
if (!variant) {
|
|
57
65
|
return 'inset 0rem 0.125rem 0.25rem rgba(0, 0, 0, 0.25)';
|
|
58
66
|
}
|
|
59
67
|
}
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
}, _ref5 => {
|
|
69
|
+
let {
|
|
70
|
+
variant,
|
|
71
|
+
disabled
|
|
72
|
+
} = _ref5;
|
|
63
73
|
if (!disabled) {
|
|
64
74
|
if (variant === 'secondary') return "".concat(_colors.BmPrimaryBlue);
|
|
65
75
|
}
|
|
66
76
|
return 'none';
|
|
67
77
|
});
|
|
68
|
-
|
|
78
|
+
const Dropdown = (0, _styledComponents.default)(_buttonIconsOnly.BmBtnIcon).withConfig({
|
|
69
79
|
displayName: "buttonDropdowncopy__Dropdown"
|
|
70
|
-
})(["background:", ";border:0.0625rem solid ", ";border-left:0.071rem solid ", ";border-top-left-radius:0.071rem;border-bottom-left-radius:0.071rem;padding:0rem;"],
|
|
71
|
-
|
|
72
|
-
|
|
80
|
+
})(["background:", ";border:0.0625rem solid ", ";border-left:0.071rem solid ", ";border-top-left-radius:0.071rem;border-bottom-left-radius:0.071rem;padding:0rem;"], _ref6 => {
|
|
81
|
+
let {
|
|
82
|
+
variant,
|
|
83
|
+
disabled
|
|
84
|
+
} = _ref6;
|
|
73
85
|
if (!disabled) {
|
|
74
86
|
if (variant === 'primary') return "".concat(_colors.BmPrimaryBlue);
|
|
75
87
|
if (variant === 'secondary') return 'none';
|
|
@@ -83,9 +95,11 @@ var Dropdown = (0, _styledComponents.default)(_buttonIconsOnly.BmBtnIcon).withCo
|
|
|
83
95
|
if (variant === 'secondary') return 'none';
|
|
84
96
|
if (variant === 'tertiary') return 'none';
|
|
85
97
|
return "".concat(_colors.BmGrey100);
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
|
|
98
|
+
}, _ref7 => {
|
|
99
|
+
let {
|
|
100
|
+
variant,
|
|
101
|
+
disabled
|
|
102
|
+
} = _ref7;
|
|
89
103
|
if (!disabled) {
|
|
90
104
|
if (variant === 'primary') return "".concat(_colors.BmPrimaryBlue);
|
|
91
105
|
if (variant === 'secondary') return "".concat(_colors.BmPrimaryBlue);
|
|
@@ -98,9 +112,11 @@ var Dropdown = (0, _styledComponents.default)(_buttonIconsOnly.BmBtnIcon).withCo
|
|
|
98
112
|
if (variant === 'primary') return "".concat(_colors.BmGrey100);
|
|
99
113
|
if (variant === 'secondary') return "".concat(_colors.BmGrey400);
|
|
100
114
|
if (variant === 'tertiary') return 'transparent';
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
|
|
115
|
+
}, _ref8 => {
|
|
116
|
+
let {
|
|
117
|
+
variant,
|
|
118
|
+
disabled
|
|
119
|
+
} = _ref8;
|
|
104
120
|
if (!disabled) {
|
|
105
121
|
if (variant === 'primary') return "".concat(_colors.BmPrimaryWhite);
|
|
106
122
|
if (variant === 'secondary') return "".concat(_colors.BmPrimaryBlue);
|
|
@@ -114,12 +130,13 @@ var Dropdown = (0, _styledComponents.default)(_buttonIconsOnly.BmBtnIcon).withCo
|
|
|
114
130
|
if (variant === 'secondary') return "".concat(_colors.BmGrey400);
|
|
115
131
|
if (variant === 'tertiary') return 'transparent';
|
|
116
132
|
});
|
|
117
|
-
|
|
133
|
+
const Button = exports.Button = (0, _styledComponents.default)(_buttons.BmButton).withConfig({
|
|
118
134
|
displayName: "buttonDropdowncopy__Button"
|
|
119
135
|
})(["border-top-right-radius:0.071rem;border-bottom-right-radius:0.071rem;border-radius:none;border-right:none;"]);
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
136
|
+
const BmButtonDropDown = _ref9 => {
|
|
137
|
+
let {
|
|
138
|
+
children
|
|
139
|
+
} = _ref9,
|
|
123
140
|
rest = _objectWithoutProperties(_ref9, _excluded);
|
|
124
141
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(ButtonDropdownWrapper, rest, /*#__PURE__*/_react.default.createElement(Button, rest, children), /*#__PURE__*/_react.default.createElement(Dropdown, _extends({}, rest, {
|
|
125
142
|
icon: /*#__PURE__*/_react.default.createElement(_icons.KeyboardArrowDown, null)
|
|
@@ -8,9 +8,11 @@ var _icons = require("@material-ui/icons");
|
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
9
|
var _buttonIconsOnly = require("./buttonIconsOnly");
|
|
10
10
|
var _buttons = require("./buttons");
|
|
11
|
-
function _interopRequireDefault(
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const BmButtonDropdown = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
children
|
|
15
|
+
} = _ref;
|
|
14
16
|
return /*#__PURE__*/React.createElement("div", {
|
|
15
17
|
style: {
|
|
16
18
|
display: 'flex',
|
|
@@ -9,17 +9,19 @@ 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 = ["variant", "size", "disabled", "children", "icon", "color"];
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
15
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
16
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
17
|
+
const BeemButtonIcon = _styledComponents.default.button.withConfig({
|
|
18
18
|
displayName: "buttonIconsOnly__BeemButtonIcon"
|
|
19
|
-
})(["display:flex;flex-direction:row;align-items:center;justify-content:center;background:", ";border:0.071rem solid ", ";box-sizing:border-box;border-radius:0.25rem;padding:0rem;"],
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
})(["display:flex;flex-direction:row;align-items:center;justify-content:center;background:", ";border:0.071rem solid ", ";box-sizing:border-box;border-radius:0.25rem;padding:0rem;"], _ref => {
|
|
20
|
+
let {
|
|
21
|
+
variant,
|
|
22
|
+
disabled,
|
|
23
|
+
color
|
|
24
|
+
} = _ref;
|
|
23
25
|
if (!disabled) {
|
|
24
26
|
if (variant === 'active') return "".concat(_colors.BmPrimaryBlue);
|
|
25
27
|
if (variant === 'enabled') return "".concat(_colors.BmGrey50);
|
|
@@ -32,10 +34,12 @@ var BeemButtonIcon = _styledComponents.default.button.withConfig({
|
|
|
32
34
|
return "".concat(color || _colors.BmPrimaryBlue);
|
|
33
35
|
}
|
|
34
36
|
return "".concat(_colors.BmGrey100);
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
}, _ref2 => {
|
|
38
|
+
let {
|
|
39
|
+
variant,
|
|
40
|
+
disabled,
|
|
41
|
+
color
|
|
42
|
+
} = _ref2;
|
|
39
43
|
if (!disabled) {
|
|
40
44
|
if (variant === 'active') return "".concat(_colors.BmPrimaryBlue);
|
|
41
45
|
if (variant === 'enabled') return "".concat(_colors.BmGrey50);
|
|
@@ -49,23 +53,26 @@ var BeemButtonIcon = _styledComponents.default.button.withConfig({
|
|
|
49
53
|
}
|
|
50
54
|
return "".concat(_colors.BmGrey100);
|
|
51
55
|
});
|
|
52
|
-
|
|
56
|
+
const BmIconWrapper = exports.BmIconWrapper = _styledComponents.default.div.withConfig({
|
|
53
57
|
displayName: "buttonIconsOnly__BmIconWrapper"
|
|
54
|
-
})(["padding:", ";"],
|
|
55
|
-
|
|
58
|
+
})(["padding:", ";"], _ref3 => {
|
|
59
|
+
let {
|
|
60
|
+
size
|
|
61
|
+
} = _ref3;
|
|
56
62
|
if (size === 'xxsmall') {
|
|
57
63
|
return '0rem !important';
|
|
58
64
|
}
|
|
59
65
|
return '0.5rem !important';
|
|
60
66
|
});
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
const BmBtnIcon = props => {
|
|
68
|
+
const {
|
|
69
|
+
variant,
|
|
70
|
+
size,
|
|
71
|
+
disabled,
|
|
72
|
+
children,
|
|
73
|
+
icon,
|
|
74
|
+
color
|
|
75
|
+
} = props,
|
|
69
76
|
rest = _objectWithoutProperties(props, _excluded);
|
|
70
77
|
return /*#__PURE__*/_react.default.createElement(BeemButtonIcon, _extends({
|
|
71
78
|
color: color,
|
|
@@ -11,24 +11,28 @@ var _polished = require("polished");
|
|
|
11
11
|
var _colors = require("../colors");
|
|
12
12
|
var _iconStyles = require("../iconStyles");
|
|
13
13
|
var _text = require("../text");
|
|
14
|
-
|
|
15
|
-
function _interopRequireDefault(
|
|
16
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
17
|
-
function _objectWithoutProperties(
|
|
18
|
-
function _objectWithoutPropertiesLoose(
|
|
19
|
-
|
|
14
|
+
const _excluded = ["variant", "size", "disabled", "children", "leadingIcon", "trailingIcon", "color", "borderColor", "type"]; // TODO: Button Links Pending
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
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); }
|
|
17
|
+
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; }
|
|
18
|
+
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; }
|
|
19
|
+
const ButtonText = _styledComponents.default.div.withConfig({
|
|
20
20
|
displayName: "buttons__ButtonText"
|
|
21
|
-
})(["", " text-align:center;color:", ";padding:0rem;"],
|
|
22
|
-
|
|
21
|
+
})(["", " text-align:center;color:", ";padding:0rem;"], _ref => {
|
|
22
|
+
let {
|
|
23
|
+
size
|
|
24
|
+
} = _ref;
|
|
23
25
|
if (size === 'large') return "".concat(_text.h5);
|
|
24
26
|
if (size === 'medium') return "".concat(_text.h5);
|
|
25
27
|
if (size === 'small') return "".concat(_text.h5);
|
|
26
28
|
if (size === 'xsmall') return "".concat(_text.h5);
|
|
27
29
|
return "".concat(_text.h5);
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
}, _ref2 => {
|
|
31
|
+
let {
|
|
32
|
+
variant,
|
|
33
|
+
disabled,
|
|
34
|
+
color
|
|
35
|
+
} = _ref2;
|
|
32
36
|
if (!disabled) {
|
|
33
37
|
if (variant === 'primary') return "".concat(_colors.BmPrimaryWhite);
|
|
34
38
|
if (variant === 'secondary') return "".concat(color || _colors.BmPrimaryBlue);
|
|
@@ -40,29 +44,37 @@ var ButtonText = _styledComponents.default.div.withConfig({
|
|
|
40
44
|
}
|
|
41
45
|
return "".concat(_colors.BmGrey400);
|
|
42
46
|
});
|
|
43
|
-
|
|
47
|
+
const BeemButton = _styledComponents.default.button.withConfig({
|
|
44
48
|
displayName: "buttons__BeemButton"
|
|
45
|
-
})(["display:flex;flex-direction:row;justify-content:center;align-items:center;width:", ";border-radius:0.5714rem;padding:", ";line-height:", ";background:", ";border:0.994px solid ", ";&:hover{background:", ";border:0.994px solid ", ";}&:active{background:", ";box-shadow:", ";border:0.071rem solid ", ";}&:hover ", "{color:", ";}&:active ", "{color:", ";}"],
|
|
46
|
-
|
|
49
|
+
})(["display:flex;flex-direction:row;justify-content:center;align-items:center;width:", ";border-radius:0.5714rem;padding:", ";line-height:", ";background:", ";border:0.994px solid ", ";&:hover{background:", ";border:0.994px solid ", ";}&:active{background:", ";box-shadow:", ";border:0.071rem solid ", ";}&:hover ", "{color:", ";}&:active ", "{color:", ";}"], _ref3 => {
|
|
50
|
+
let {
|
|
51
|
+
width
|
|
52
|
+
} = _ref3;
|
|
47
53
|
return width || '';
|
|
48
|
-
},
|
|
49
|
-
|
|
54
|
+
}, _ref4 => {
|
|
55
|
+
let {
|
|
56
|
+
size
|
|
57
|
+
} = _ref4;
|
|
50
58
|
if (size === 'large') return '.7143rem 1.2857rem';
|
|
51
59
|
if (size === 'medium') return '.7143rem 1.1429rem';
|
|
52
60
|
if (size === 'small') return '.5714rem 1rem';
|
|
53
61
|
if (size === 'xsmall') return '.4286rem .8571rem';
|
|
54
62
|
return '.7143rem 1.1429rem';
|
|
55
|
-
},
|
|
56
|
-
|
|
63
|
+
}, _ref5 => {
|
|
64
|
+
let {
|
|
65
|
+
size
|
|
66
|
+
} = _ref5;
|
|
57
67
|
if (size === 'large') return '1.7143rem';
|
|
58
68
|
if (size === 'medium') return '1.4286rem';
|
|
59
69
|
if (size === 'small') return '1.4286rem';
|
|
60
70
|
if (size === 'xsmall') return '1.4286rem';
|
|
61
71
|
return '1.4286rem';
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
72
|
+
}, _ref6 => {
|
|
73
|
+
let {
|
|
74
|
+
variant,
|
|
75
|
+
disabled,
|
|
76
|
+
color
|
|
77
|
+
} = _ref6;
|
|
66
78
|
if (!disabled) {
|
|
67
79
|
if (variant === 'primary') return "".concat(color || _colors.BmPrimaryBlue);
|
|
68
80
|
if (variant === 'secondary') return 'none';
|
|
@@ -76,26 +88,31 @@ var BeemButton = _styledComponents.default.button.withConfig({
|
|
|
76
88
|
if (variant === 'secondary') return 'none';
|
|
77
89
|
if (variant === 'tertiary') return 'none';
|
|
78
90
|
return "".concat(_colors.BmGrey100);
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
91
|
+
}, _ref7 => {
|
|
92
|
+
let {
|
|
93
|
+
variant,
|
|
94
|
+
disabled,
|
|
95
|
+
color,
|
|
96
|
+
borderColor
|
|
97
|
+
} = _ref7;
|
|
83
98
|
if (!disabled) {
|
|
84
|
-
if (variant === 'primary') return "".concat(color || _colors.BmPrimaryBlue);
|
|
85
|
-
if (variant === 'secondary') return "".concat(color || _colors.BmPrimaryBlue);
|
|
99
|
+
if (variant === 'primary') return "".concat(borderColor || color || _colors.BmPrimaryBlue);
|
|
100
|
+
if (variant === 'secondary') return "".concat(borderColor || color || _colors.BmPrimaryBlue);
|
|
86
101
|
if (variant === 'tertiary') return 'transparent';
|
|
87
102
|
if (variant === 'destructive') return "".concat(_colors.BmSecondaryRed);
|
|
88
103
|
if (variant === 'success') return "".concat(_colors.BmSecondaryDarkGreen);
|
|
89
104
|
if (variant === 'neutral') return "".concat(_colors.BmGrey400);
|
|
90
|
-
return "".concat(color || _colors.BmPrimaryBlue);
|
|
105
|
+
return "".concat(borderColor || color || _colors.BmPrimaryBlue);
|
|
91
106
|
}
|
|
92
107
|
if (variant === 'primary') return "".concat(_colors.BmGrey100);
|
|
93
108
|
if (variant === 'secondary') return "".concat(_colors.BmGrey400);
|
|
94
109
|
if (variant === 'tertiary') return 'transparent';
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
110
|
+
}, _ref8 => {
|
|
111
|
+
let {
|
|
112
|
+
variant,
|
|
113
|
+
disabled,
|
|
114
|
+
color
|
|
115
|
+
} = _ref8;
|
|
99
116
|
if (!disabled) {
|
|
100
117
|
if (variant === 'primary') return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
|
|
101
118
|
if (variant === 'neutral') return "".concat(_colors.BmGrey50);
|
|
@@ -105,18 +122,23 @@ var BeemButton = _styledComponents.default.button.withConfig({
|
|
|
105
122
|
return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
|
|
106
123
|
}
|
|
107
124
|
}
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
125
|
+
}, _ref9 => {
|
|
126
|
+
let {
|
|
127
|
+
variant,
|
|
128
|
+
disabled,
|
|
129
|
+
color,
|
|
130
|
+
borderColor
|
|
131
|
+
} = _ref9;
|
|
112
132
|
if (!disabled) {
|
|
113
|
-
if (variant === 'secondary') return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
|
|
133
|
+
if (variant === 'secondary') return "".concat((0, _polished.darken)(0.1, borderColor || color || _colors.BmPrimaryBlue));
|
|
114
134
|
}
|
|
115
135
|
return 'none';
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
136
|
+
}, _ref0 => {
|
|
137
|
+
let {
|
|
138
|
+
variant,
|
|
139
|
+
disabled,
|
|
140
|
+
color
|
|
141
|
+
} = _ref0;
|
|
120
142
|
if (!disabled) {
|
|
121
143
|
if (variant === 'primary') return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
|
|
122
144
|
if (variant === 'neutral') return "".concat(_colors.BmGrey100);
|
|
@@ -126,61 +148,72 @@ var BeemButton = _styledComponents.default.button.withConfig({
|
|
|
126
148
|
return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
|
|
127
149
|
}
|
|
128
150
|
}
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
|
|
151
|
+
}, _ref1 => {
|
|
152
|
+
let {
|
|
153
|
+
variant,
|
|
154
|
+
disabled
|
|
155
|
+
} = _ref1;
|
|
132
156
|
if (!disabled) {
|
|
133
157
|
if (variant === 'primary' || variant === 'success' || variant === 'destructive') return 'inset 0rem .125rem .25rem rgba(0, 0, 0, 0.25)';
|
|
134
158
|
if (!variant) {
|
|
135
159
|
return 'inset 0rem .125rem .25rem rgba(0, 0, 0, 0.25)';
|
|
136
160
|
}
|
|
137
161
|
}
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
162
|
+
}, _ref10 => {
|
|
163
|
+
let {
|
|
164
|
+
variant,
|
|
165
|
+
disabled,
|
|
166
|
+
color,
|
|
167
|
+
borderColor
|
|
168
|
+
} = _ref10;
|
|
142
169
|
if (!disabled) {
|
|
143
|
-
if (variant === 'secondary') return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
|
|
170
|
+
if (variant === 'secondary') return "".concat((0, _polished.darken)(0.1, borderColor || color || _colors.BmPrimaryBlue));
|
|
144
171
|
}
|
|
145
172
|
return 'none';
|
|
146
|
-
}, ButtonText,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
173
|
+
}, ButtonText, _ref11 => {
|
|
174
|
+
let {
|
|
175
|
+
variant,
|
|
176
|
+
disabled,
|
|
177
|
+
color
|
|
178
|
+
} = _ref11;
|
|
150
179
|
if (!disabled) {
|
|
151
180
|
if (variant === 'secondary' || variant === 'tertiary') return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
|
|
152
181
|
}
|
|
153
|
-
}, ButtonText,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
182
|
+
}, ButtonText, _ref12 => {
|
|
183
|
+
let {
|
|
184
|
+
variant,
|
|
185
|
+
disabled,
|
|
186
|
+
color
|
|
187
|
+
} = _ref12;
|
|
157
188
|
if (!disabled) {
|
|
158
189
|
if (variant === 'secondary' || variant === 'tertiary') return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
|
|
159
190
|
}
|
|
160
191
|
});
|
|
161
|
-
|
|
192
|
+
const BmLeftIcon = exports.BmLeftIcon = (0, _styledComponents.default)(_iconStyles.BmButtonIcon).withConfig({
|
|
162
193
|
displayName: "buttons__BmLeftIcon"
|
|
163
194
|
})(["margin-right:0.5rem;"]);
|
|
164
|
-
exports.
|
|
165
|
-
var BmRightIcon = (0, _styledComponents.default)(_iconStyles.BmButtonIcon).withConfig({
|
|
195
|
+
const BmRightIcon = exports.BmRightIcon = (0, _styledComponents.default)(_iconStyles.BmButtonIcon).withConfig({
|
|
166
196
|
displayName: "buttons__BmRightIcon"
|
|
167
197
|
})(["margin-left:0.5rem;"]);
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
198
|
+
const BmButton = props => {
|
|
199
|
+
const {
|
|
200
|
+
variant,
|
|
201
|
+
size,
|
|
202
|
+
disabled,
|
|
203
|
+
children,
|
|
204
|
+
leadingIcon,
|
|
205
|
+
trailingIcon,
|
|
206
|
+
color,
|
|
207
|
+
borderColor,
|
|
208
|
+
type
|
|
209
|
+
} = props,
|
|
178
210
|
rest = _objectWithoutProperties(props, _excluded);
|
|
179
211
|
return /*#__PURE__*/_react.default.createElement(BeemButton, _extends({
|
|
180
212
|
size: size,
|
|
181
213
|
variant: variant,
|
|
182
214
|
disabled: disabled,
|
|
183
215
|
color: color,
|
|
216
|
+
borderColor: borderColor,
|
|
184
217
|
type: type
|
|
185
218
|
}, rest), leadingIcon && /*#__PURE__*/_react.default.createElement(BmLeftIcon, {
|
|
186
219
|
disabled: disabled,
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BmCardv2 = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
const _excluded = ["className", "children", "borderColor", "borderWidth"];
|
|
10
|
+
/* eslint-disable func-style */
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
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; }
|
|
15
|
+
const hexToRgba = function (hex) {
|
|
16
|
+
let opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.6;
|
|
17
|
+
try {
|
|
18
|
+
const normalizedHex = hex === null || hex === void 0 ? void 0 : hex.replace('#', '');
|
|
19
|
+
if (!normalizedHex || normalizedHex.length !== 6 || !/^[0-9a-fA-F]{6}$/.test(normalizedHex)) {
|
|
20
|
+
throw new Error('Invalid hex');
|
|
21
|
+
}
|
|
22
|
+
const r = parseInt(normalizedHex.slice(0, 2), 16);
|
|
23
|
+
const g = parseInt(normalizedHex.slice(2, 4), 16);
|
|
24
|
+
const b = parseInt(normalizedHex.slice(4, 6), 16);
|
|
25
|
+
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(opacity, ")");
|
|
26
|
+
} catch (e) {
|
|
27
|
+
return "rgba(0, 0, 0, ".concat(opacity, ")");
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const StyledCard = _styledComponents.default.div.withConfig({
|
|
31
|
+
displayName: "Card__StyledCard"
|
|
32
|
+
})(["background-color:var(--card,#fff);color:var(--card-foreground,#000);display:flex;flex-direction:column;gap:1.5rem;border-radius:0.75rem;border-style:solid;border-color:", ";border-width:", ";width:100%;"], _ref => {
|
|
33
|
+
let {
|
|
34
|
+
borderColor
|
|
35
|
+
} = _ref;
|
|
36
|
+
return hexToRgba(borderColor || '#ccc', 0.1);
|
|
37
|
+
}, _ref2 => {
|
|
38
|
+
let {
|
|
39
|
+
borderWidth
|
|
40
|
+
} = _ref2;
|
|
41
|
+
return borderWidth || '.0714rem';
|
|
42
|
+
});
|
|
43
|
+
const Header = _styledComponents.default.div.withConfig({
|
|
44
|
+
displayName: "Card__Header"
|
|
45
|
+
})(["display:grid;grid-template-columns:1fr;grid-auto-rows:auto;gap:0.375rem;padding:1.5rem 1.5rem 0 1.5rem;"]);
|
|
46
|
+
const Title = _styledComponents.default.h4.withConfig({
|
|
47
|
+
displayName: "Card__Title"
|
|
48
|
+
})(["line-height:1;margin:0;"]);
|
|
49
|
+
const Description = _styledComponents.default.p.withConfig({
|
|
50
|
+
displayName: "Card__Description"
|
|
51
|
+
})(["color:var(--muted-foreground,#666);margin:0;"]);
|
|
52
|
+
const Content = _styledComponents.default.div.withConfig({
|
|
53
|
+
displayName: "Card__Content"
|
|
54
|
+
})(["min-height:180px;padding:0 1.5rem;max-height:calc(100vh - 28.5714rem);overflow-y:auto;scrollbar-width:thin;scrollbar-color:", " transparent;&::-webkit-scrollbar-thumb{background:", ";border-radius:0.6429rem;transition:background 0.2s ease;}&::-webkit-scrollbar-thumb:hover{background:", ";}&:last-child{padding-bottom:1.5rem;}@media (max-width:54.8571rem){max-height:calc(100vh - 17.8572rem);}"], () => hexToRgba('#33b1ba', 0.2), () => hexToRgba('#33b1ba', 0.3), () => hexToRgba('#33b1ba', 0.3));
|
|
55
|
+
const Footer = _styledComponents.default.div.withConfig({
|
|
56
|
+
displayName: "Card__Footer"
|
|
57
|
+
})(["display:flex;justify-content:space-between;align-items:center;padding:0 1.5rem 1.5rem 1.5rem;gap:1rem;@media (max-width:42.8571rem){flex-direction:column;align-items:stretch;& > *{width:100%;}}"]);
|
|
58
|
+
function CardComponent(_ref3) {
|
|
59
|
+
let {
|
|
60
|
+
className,
|
|
61
|
+
children,
|
|
62
|
+
borderColor,
|
|
63
|
+
borderWidth
|
|
64
|
+
} = _ref3,
|
|
65
|
+
props = _objectWithoutProperties(_ref3, _excluded);
|
|
66
|
+
return /*#__PURE__*/_react.default.createElement(StyledCard, _extends({
|
|
67
|
+
className: className,
|
|
68
|
+
borderColor: borderColor,
|
|
69
|
+
borderWidth: borderWidth
|
|
70
|
+
}, props), children);
|
|
71
|
+
}
|
|
72
|
+
const BmCardv2 = exports.BmCardv2 = Object.assign(CardComponent, {
|
|
73
|
+
Header,
|
|
74
|
+
Title,
|
|
75
|
+
Description,
|
|
76
|
+
Content,
|
|
77
|
+
Footer
|
|
78
|
+
});
|