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
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.ExampleSummary = exports.ExampleDetails = exports.Default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _CalendarToday = _interopRequireDefault(require("@mui/icons-material/CalendarToday"));
|
|
9
|
+
var _Person = _interopRequireDefault(require("@mui/icons-material/Person"));
|
|
10
|
+
var _Business = _interopRequireDefault(require("@mui/icons-material/Business"));
|
|
11
|
+
var _InfoPanel = _interopRequireDefault(require("./InfoPanel"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
const formData = {
|
|
14
|
+
departmentName: 'Marketing',
|
|
15
|
+
resourceName: 'John Doe',
|
|
16
|
+
date: new Date(),
|
|
17
|
+
timeSlot: '09:00 - 09:30',
|
|
18
|
+
name: 'Jane Smith',
|
|
19
|
+
phone: '+1234567890',
|
|
20
|
+
email: 'jane.smith@example.com'
|
|
21
|
+
};
|
|
22
|
+
const appointmentDetails = {
|
|
23
|
+
title: 'Consultation',
|
|
24
|
+
duration: '30 mins'
|
|
25
|
+
};
|
|
26
|
+
var _default = exports.default = {
|
|
27
|
+
title: 'Components/BmInfoPanel',
|
|
28
|
+
component: _InfoPanel.default,
|
|
29
|
+
argTypes: {
|
|
30
|
+
variant: {
|
|
31
|
+
control: {
|
|
32
|
+
type: 'select'
|
|
33
|
+
},
|
|
34
|
+
options: ['detailed', 'summary'],
|
|
35
|
+
defaultValue: 'detailed'
|
|
36
|
+
},
|
|
37
|
+
showDivider: {
|
|
38
|
+
control: 'boolean'
|
|
39
|
+
},
|
|
40
|
+
backgroundColor: {
|
|
41
|
+
control: 'color'
|
|
42
|
+
},
|
|
43
|
+
iconColor: {
|
|
44
|
+
control: 'color'
|
|
45
|
+
},
|
|
46
|
+
textColor: {
|
|
47
|
+
control: 'color'
|
|
48
|
+
},
|
|
49
|
+
iconBackgroundColor: {
|
|
50
|
+
control: 'boolean'
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const Template = _ref => {
|
|
55
|
+
let {
|
|
56
|
+
variant,
|
|
57
|
+
showDivider,
|
|
58
|
+
backgroundColor,
|
|
59
|
+
iconColor,
|
|
60
|
+
textColor,
|
|
61
|
+
iconBackgroundColor
|
|
62
|
+
} = _ref;
|
|
63
|
+
if (variant === 'summary') {
|
|
64
|
+
return /*#__PURE__*/_react.default.createElement(_InfoPanel.default, {
|
|
65
|
+
className: "p3"
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement(_InfoPanel.default.SectionSummary, {
|
|
67
|
+
icon: _Business.default,
|
|
68
|
+
title: "Operations Department",
|
|
69
|
+
subtitle: "Department",
|
|
70
|
+
iconColor: iconColor,
|
|
71
|
+
textColor: textColor
|
|
72
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.SectionSummary, {
|
|
73
|
+
icon: _Business.default,
|
|
74
|
+
title: "Customer Service",
|
|
75
|
+
subtitle: "Department",
|
|
76
|
+
iconColor: iconColor,
|
|
77
|
+
textColor: textColor,
|
|
78
|
+
iconBackgroundColor: iconBackgroundColor
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
return /*#__PURE__*/_react.default.createElement(_InfoPanel.default, null, /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Section, {
|
|
82
|
+
title: "Appointment Details",
|
|
83
|
+
icon: _CalendarToday.default,
|
|
84
|
+
backgroundColor: backgroundColor,
|
|
85
|
+
iconColor: iconColor,
|
|
86
|
+
iconBackgroundColor: iconBackgroundColor
|
|
87
|
+
}, /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
88
|
+
label: "Type",
|
|
89
|
+
value: "Consultation"
|
|
90
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
91
|
+
label: "Department",
|
|
92
|
+
value: "General Medicine"
|
|
93
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
94
|
+
label: "Resource",
|
|
95
|
+
value: "Dr. Smith"
|
|
96
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
97
|
+
label: "Duration",
|
|
98
|
+
value: "30 minutes"
|
|
99
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
100
|
+
label: "Date",
|
|
101
|
+
value: "Monday, June 24, 2025"
|
|
102
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
103
|
+
label: "Time",
|
|
104
|
+
value: "09:00 AM"
|
|
105
|
+
})), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Section, {
|
|
106
|
+
title: "Personal Information",
|
|
107
|
+
icon: _Person.default,
|
|
108
|
+
showDivider: showDivider,
|
|
109
|
+
iconColor: iconColor
|
|
110
|
+
}, /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
111
|
+
label: "Name",
|
|
112
|
+
value: "John Doe"
|
|
113
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
114
|
+
label: "Email",
|
|
115
|
+
value: "john@example.com"
|
|
116
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
117
|
+
label: "Phone",
|
|
118
|
+
value: "+255 712 345 678"
|
|
119
|
+
})));
|
|
120
|
+
};
|
|
121
|
+
const Default = exports.Default = Template.bind({});
|
|
122
|
+
Default.args = {
|
|
123
|
+
variant: 'detailed',
|
|
124
|
+
showDivider: true,
|
|
125
|
+
backgroundColor: '#33B1BA',
|
|
126
|
+
iconColor: '#33B1BA',
|
|
127
|
+
textColor: '#000000',
|
|
128
|
+
iconBackgroundColor: false
|
|
129
|
+
};
|
|
130
|
+
const ExampleSummary = () => {
|
|
131
|
+
return /*#__PURE__*/_react.default.createElement(_InfoPanel.default, null, /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Section, {
|
|
132
|
+
title: "Appointment Details",
|
|
133
|
+
icon: _CalendarToday.default,
|
|
134
|
+
backgroundColor: "#fcba03",
|
|
135
|
+
iconColor: "#fcba03",
|
|
136
|
+
iconBackgroundColor: true
|
|
137
|
+
}, /*#__PURE__*/_react.default.createElement(_InfoPanel.default.SectionSummary, {
|
|
138
|
+
iconColor: "#fcba03",
|
|
139
|
+
textColor: "#fcba03",
|
|
140
|
+
icon: _Business.default,
|
|
141
|
+
title: "sales",
|
|
142
|
+
subtitle: "Department"
|
|
143
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.SectionSummary, {
|
|
144
|
+
icon: _Business.default,
|
|
145
|
+
title: "Pharma",
|
|
146
|
+
subtitle: "Department"
|
|
147
|
+
})));
|
|
148
|
+
};
|
|
149
|
+
exports.ExampleSummary = ExampleSummary;
|
|
150
|
+
const ExampleDetails = () => {
|
|
151
|
+
return /*#__PURE__*/_react.default.createElement(_InfoPanel.default, null, /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Section, {
|
|
152
|
+
title: "Appointment Details",
|
|
153
|
+
icon: _CalendarToday.default,
|
|
154
|
+
backgroundColor: "rgba(51, 177, 186, 0.05)"
|
|
155
|
+
}, /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
156
|
+
label: "Type",
|
|
157
|
+
value: appointmentDetails.title
|
|
158
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
159
|
+
label: "Department",
|
|
160
|
+
value: formData.departmentName
|
|
161
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
162
|
+
label: "Resource",
|
|
163
|
+
value: formData.resourceName
|
|
164
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
165
|
+
label: "Duration",
|
|
166
|
+
value: appointmentDetails.duration
|
|
167
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
168
|
+
label: "Date",
|
|
169
|
+
value: formData.date.toDateString()
|
|
170
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
171
|
+
label: "Time",
|
|
172
|
+
value: formData.timeSlot.split(' - ')[1]
|
|
173
|
+
})), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Section, {
|
|
174
|
+
title: "Personal Information",
|
|
175
|
+
icon: _Person.default,
|
|
176
|
+
showDivider: true
|
|
177
|
+
}, /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
178
|
+
label: "Name",
|
|
179
|
+
value: formData.name
|
|
180
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
181
|
+
label: "Phone",
|
|
182
|
+
value: formData.phone
|
|
183
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
184
|
+
label: "Email",
|
|
185
|
+
value: formData.email
|
|
186
|
+
})), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Section, {
|
|
187
|
+
title: "Personal Information",
|
|
188
|
+
icon: _Person.default
|
|
189
|
+
}, /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
190
|
+
label: "Name",
|
|
191
|
+
value: formData.name
|
|
192
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
193
|
+
label: "Phone",
|
|
194
|
+
value: formData.phone
|
|
195
|
+
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
196
|
+
label: "Email",
|
|
197
|
+
value: formData.email
|
|
198
|
+
})));
|
|
199
|
+
};
|
|
200
|
+
exports.ExampleDetails = ExampleDetails;
|
|
@@ -10,31 +10,30 @@ var _RemoveCircle = _interopRequireDefault(require("@mui/icons-material/RemoveCi
|
|
|
10
10
|
var _AddCircle = _interopRequireDefault(require("@mui/icons-material/AddCircle"));
|
|
11
11
|
var _iconStyles = require("../iconStyles");
|
|
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 = ["min", "max", "onChange", "inputStyle", "BtnStyle", "count"];
|
|
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 Wrapper = _styledComponents.default.div.withConfig({
|
|
19
19
|
displayName: "inputCounter__Wrapper"
|
|
20
20
|
})(["display:flex;border-radius:0.25rem;border:0.071rem solid ", ";justify-content:space-between;padding:0.5rem;&:hover{border:0.071rem solid ", ";}"], _colors.BmGrey200, _colors.BmGrey400);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
count = _ref$count === void 0 ? 0 : _ref$count,
|
|
21
|
+
const BmInputCounter = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
min = 0,
|
|
24
|
+
max = 10,
|
|
25
|
+
onChange,
|
|
26
|
+
inputStyle,
|
|
27
|
+
BtnStyle,
|
|
28
|
+
count = 0
|
|
29
|
+
} = _ref,
|
|
31
30
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
-
|
|
31
|
+
const increment = () => {
|
|
33
32
|
if (count < max) {
|
|
34
33
|
onChange(count + 1);
|
|
35
34
|
}
|
|
36
35
|
};
|
|
37
|
-
|
|
36
|
+
const decrement = () => {
|
|
38
37
|
if (count > min) {
|
|
39
38
|
onChange(count - 1);
|
|
40
39
|
}
|
|
@@ -6,30 +6,27 @@ 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(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
/* eslint-disable import/prefer-default-export */
|
|
11
11
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
const Title = _styledComponents.default.div.withConfig({
|
|
14
14
|
displayName: "Jumbotron__Title"
|
|
15
|
-
})(["display:flex;justify-content:space-between;padding:1rem 0.5rem;background:", ";"],
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
var Body = _styledComponents.default.div.withConfig({
|
|
15
|
+
})(["display:flex;justify-content:space-between;padding:1rem 0.5rem;background:", ";"], props => props.bgColor ? props.bgColor : _colors.BmPrimaryBlue);
|
|
16
|
+
const Body = _styledComponents.default.div.withConfig({
|
|
19
17
|
displayName: "Jumbotron__Body"
|
|
20
18
|
})(["display:flex;padding:0.5rem;> *{display:flex;flex-direction:column;flex-wrap:wrap;overflow-wrap:break-word !important;word-wrap:break-word !important;flex-grow:grow;> *:not(:last-child){margin-bottom:0.5rem;}}@media all and (max-width:960px){flex-direction:column;}"]);
|
|
21
|
-
|
|
19
|
+
const BmJumbotron = _styledComponents.default.div.withConfig({
|
|
22
20
|
displayName: "Jumbotron__BmJumbotron"
|
|
23
21
|
})(["display:flex;flex-direction:column;border:0.071rem solid ", ";border-radius:0.25rem;"], _colors.BmGrey200);
|
|
24
|
-
|
|
22
|
+
const text = _styledComponents.default.div.withConfig({
|
|
25
23
|
displayName: "Jumbotron__text"
|
|
26
24
|
})(["width:100%;"]);
|
|
27
|
-
|
|
25
|
+
const image = _styledComponents.default.div.withConfig({
|
|
28
26
|
displayName: "Jumbotron__image"
|
|
29
27
|
})(["width:20%;@media all and (max-width:960px){width:100%;}"]);
|
|
30
28
|
BmJumbotron.Title = Title;
|
|
31
29
|
BmJumbotron.Body = Body;
|
|
32
30
|
BmJumbotron.Body.Text = text;
|
|
33
31
|
BmJumbotron.Body.Image = image;
|
|
34
|
-
var _default = BmJumbotron;
|
|
35
|
-
exports.default = _default;
|
|
32
|
+
var _default = exports.default = BmJumbotron;
|
|
@@ -8,9 +8,9 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _addonKnobs = require("@storybook/addon-knobs");
|
|
9
9
|
var _Jumbotron = _interopRequireDefault(require("./Jumbotron"));
|
|
10
10
|
var _beem = _interopRequireDefault(require("../../assets/beem.jpeg"));
|
|
11
|
-
function _interopRequireDefault(
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
/* eslint-disable import/no-anonymous-default-export */
|
|
13
|
-
var _default = {
|
|
13
|
+
var _default = exports.default = {
|
|
14
14
|
component: _Jumbotron.default,
|
|
15
15
|
title: 'components/Jumbotron',
|
|
16
16
|
argTypes: {
|
|
@@ -22,8 +22,7 @@ var _default = {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
|
|
26
|
-
var BasicJumbotronSample = function BasicJumbotronSample() {
|
|
25
|
+
const BasicJumbotronSample = () => {
|
|
27
26
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Jumbotron.default, null, /*#__PURE__*/_react.default.createElement(_Jumbotron.default.Title, null, /*#__PURE__*/_react.default.createElement("h3", null, (0, _addonKnobs.text)('children', 'Title'))), /*#__PURE__*/_react.default.createElement(_Jumbotron.default.Body.Text, null, "Body Text"), /*#__PURE__*/_react.default.createElement(_Jumbotron.default.Body.Image, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
28
27
|
src: _beem.default,
|
|
29
28
|
alt: "sampleImage"
|
|
@@ -0,0 +1,63 @@
|
|
|
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 Wrapper = _styledComponents.default.div.withConfig({
|
|
11
|
+
displayName: "LabelWithIcon__Wrapper"
|
|
12
|
+
})(["display:flex;align-items:center;font-size:0.875rem;@media (min-width:45.7143rem){font-size:1rem;}@media (min-width:73.1429rem){font-size:1.125rem;}"]);
|
|
13
|
+
const IconWrapper = _styledComponents.default.span.withConfig({
|
|
14
|
+
displayName: "LabelWithIcon__IconWrapper"
|
|
15
|
+
})(["display:inline-flex;align-items:center;margin-right:0.575rem;svg{color:", ";font-size:", ";@media (min-width:45.7143rem){font-size:calc(", " * 1.15);}@media (min-width:73.1429rem){font-size:calc(", " * 1.3);}}"], _ref => {
|
|
16
|
+
let {
|
|
17
|
+
color
|
|
18
|
+
} = _ref;
|
|
19
|
+
return color || 'inherit';
|
|
20
|
+
}, _ref2 => {
|
|
21
|
+
let {
|
|
22
|
+
size
|
|
23
|
+
} = _ref2;
|
|
24
|
+
return size || '0.875rem';
|
|
25
|
+
}, _ref3 => {
|
|
26
|
+
let {
|
|
27
|
+
size
|
|
28
|
+
} = _ref3;
|
|
29
|
+
return size || '0.875rem';
|
|
30
|
+
}, _ref4 => {
|
|
31
|
+
let {
|
|
32
|
+
size
|
|
33
|
+
} = _ref4;
|
|
34
|
+
return size || '0.875rem';
|
|
35
|
+
});
|
|
36
|
+
const TextWrapper = _styledComponents.default.span.withConfig({
|
|
37
|
+
displayName: "LabelWithIcon__TextWrapper"
|
|
38
|
+
})(["color:", ";display:flex;flex-direction:row;"], _ref5 => {
|
|
39
|
+
let {
|
|
40
|
+
color,
|
|
41
|
+
theme
|
|
42
|
+
} = _ref5;
|
|
43
|
+
return color || theme.labelColor || '#333';
|
|
44
|
+
});
|
|
45
|
+
const BmLabelWithIcon = _ref6 => {
|
|
46
|
+
let {
|
|
47
|
+
icon: Icon,
|
|
48
|
+
iconColor,
|
|
49
|
+
iconSize = '0.875rem',
|
|
50
|
+
textColor,
|
|
51
|
+
children,
|
|
52
|
+
className
|
|
53
|
+
} = _ref6;
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement(Wrapper, {
|
|
55
|
+
className: className
|
|
56
|
+
}, Icon && /*#__PURE__*/_react.default.createElement(IconWrapper, {
|
|
57
|
+
color: iconColor,
|
|
58
|
+
size: iconSize
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement(Icon, null)), /*#__PURE__*/_react.default.createElement(TextWrapper, {
|
|
60
|
+
color: textColor
|
|
61
|
+
}, children));
|
|
62
|
+
};
|
|
63
|
+
var _default = exports.default = BmLabelWithIcon;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.StrongText = exports.Example = exports.Default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _People = _interopRequireDefault(require("@mui/icons-material/People"));
|
|
9
|
+
var _Email = _interopRequireDefault(require("@mui/icons-material/Email"));
|
|
10
|
+
var _Settings = _interopRequireDefault(require("@mui/icons-material/Settings"));
|
|
11
|
+
var _LabelWithIcon = _interopRequireDefault(require("./LabelWithIcon"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
var _default = exports.default = {
|
|
14
|
+
title: 'Components/BmLabelWithIcon',
|
|
15
|
+
component: _LabelWithIcon.default,
|
|
16
|
+
argTypes: {
|
|
17
|
+
iconColor: {
|
|
18
|
+
control: 'color'
|
|
19
|
+
},
|
|
20
|
+
iconSize: {
|
|
21
|
+
control: 'text'
|
|
22
|
+
},
|
|
23
|
+
icon: {
|
|
24
|
+
options: ['People', 'Email', 'Settings'],
|
|
25
|
+
mapping: {
|
|
26
|
+
People: _People.default,
|
|
27
|
+
Email: _Email.default,
|
|
28
|
+
Settings: _Settings.default
|
|
29
|
+
},
|
|
30
|
+
control: {
|
|
31
|
+
type: 'select'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const Template = args => /*#__PURE__*/_react.default.createElement(_LabelWithIcon.default, args, args.children);
|
|
37
|
+
const Default = exports.Default = Template.bind({});
|
|
38
|
+
Default.args = {
|
|
39
|
+
icon: _People.default,
|
|
40
|
+
iconColor: '#6b7280',
|
|
41
|
+
iconSize: '0.875rem',
|
|
42
|
+
children: 'Team Members'
|
|
43
|
+
};
|
|
44
|
+
const Example = () => {
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_LabelWithIcon.default, {
|
|
46
|
+
textColor: "#fcba03",
|
|
47
|
+
icon: _People.default,
|
|
48
|
+
iconColor: "#fffff",
|
|
49
|
+
iconSize: "16px"
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement("p", null, "yooo"), "\xA0", /*#__PURE__*/_react.default.createElement("h5", null, "Team: Engineering"));
|
|
51
|
+
};
|
|
52
|
+
exports.Example = Example;
|
|
53
|
+
const StrongText = exports.StrongText = Template.bind({});
|
|
54
|
+
StrongText.args = {
|
|
55
|
+
icon: _Email.default,
|
|
56
|
+
iconColor: '#d97706',
|
|
57
|
+
iconSize: '1.1rem',
|
|
58
|
+
children: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "Department: ", /*#__PURE__*/_react.default.createElement("strong", null, "Marketing"))
|
|
59
|
+
};
|
|
@@ -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,14 +8,13 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
10
|
var _colors = require("../colors");
|
|
12
|
-
|
|
13
|
-
function _interopRequireDefault(
|
|
14
|
-
function
|
|
15
|
-
function
|
|
16
|
-
function
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
var show = function show(isOpen) {
|
|
11
|
+
const _excluded = ["children", "showList", "setShowList"];
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
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); }
|
|
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 show = isOpen => {
|
|
20
18
|
if (isOpen !== undefined) {
|
|
21
19
|
if (isOpen === true) {
|
|
22
20
|
return "display: flex;\n position: absolute;\n margin-top: 0.5rem";
|
|
@@ -27,34 +25,32 @@ var show = function show(isOpen) {
|
|
|
27
25
|
}
|
|
28
26
|
return 'flex';
|
|
29
27
|
};
|
|
30
|
-
|
|
28
|
+
const BmListBoxWrapper = _styledComponents.default.div.withConfig({
|
|
31
29
|
displayName: "listBox__BmListBoxWrapper"
|
|
32
|
-
})(["", ";flex-direction:column;padding:0.25rem 0rem;background:", ";border:0.071rem solid ", ";box-shadow:0rem 0.25rem 0.25rem rgba(0,0,0,0.25);border-radius:0.25rem;z-index:10000;cursor:pointer;"],
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
})(["", ";flex-direction:column;padding:0.25rem 0rem;background:", ";border:0.071rem solid ", ";box-shadow:0rem 0.25rem 0.25rem rgba(0,0,0,0.25);border-radius:0.25rem;z-index:10000;cursor:pointer;"], props => show(props.isOpen), _colors.BmPrimaryWhite, _colors.BmGrey400);
|
|
31
|
+
const BmListBox = _ref => {
|
|
32
|
+
let {
|
|
33
|
+
children,
|
|
34
|
+
showList,
|
|
35
|
+
setShowList
|
|
36
|
+
} = _ref,
|
|
39
37
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
40
|
-
|
|
41
|
-
(0, _react.useEffect)(
|
|
42
|
-
|
|
38
|
+
const ref = (0, _react.useRef)();
|
|
39
|
+
(0, _react.useEffect)(() => {
|
|
40
|
+
const checkIfClickedOutside = e => {
|
|
43
41
|
if (showList && ref.current && !ref.current.contains(e.target)) {
|
|
44
42
|
setShowList(false);
|
|
45
43
|
}
|
|
46
44
|
};
|
|
47
45
|
document.addEventListener('mousedown', checkIfClickedOutside);
|
|
48
|
-
return
|
|
46
|
+
return () => {
|
|
49
47
|
document.removeEventListener('mousedown', checkIfClickedOutside);
|
|
50
48
|
};
|
|
51
49
|
}, [setShowList, showList]);
|
|
52
50
|
return /*#__PURE__*/_react.default.createElement(BmListBoxWrapper, _extends({
|
|
53
51
|
ref: ref,
|
|
54
|
-
onClick:
|
|
55
|
-
setShowList(
|
|
56
|
-
return !oldState;
|
|
57
|
-
});
|
|
52
|
+
onClick: () => {
|
|
53
|
+
setShowList(oldState => !oldState);
|
|
58
54
|
},
|
|
59
55
|
isOpen: showList
|
|
60
56
|
}, rest), children);
|
|
@@ -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
|
});
|
|
@@ -10,15 +9,9 @@ var _icons = require("@material-ui/icons");
|
|
|
10
9
|
var _listBox = require("./listBox");
|
|
11
10
|
var _rowLabels = require("./rowLabels");
|
|
12
11
|
var _buttons = require("../Buttons/buttons");
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
-
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); }
|
|
18
|
-
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; }
|
|
19
|
-
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; } }
|
|
20
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
|
-
var _default = {
|
|
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 import/no-anonymous-default-export */
|
|
14
|
+
var _default = exports.default = {
|
|
22
15
|
component: _listBox.BmListBox,
|
|
23
16
|
title: 'components/Lists/ListBox',
|
|
24
17
|
argTypes: {
|
|
@@ -30,8 +23,7 @@ var _default = {
|
|
|
30
23
|
}
|
|
31
24
|
}
|
|
32
25
|
};
|
|
33
|
-
|
|
34
|
-
var ListBox = function ListBox() {
|
|
26
|
+
const ListBox = () => {
|
|
35
27
|
return /*#__PURE__*/_react.default.createElement(_listBox.BmListBox, null, /*#__PURE__*/_react.default.createElement(_rowLabels.BmRowLabel, {
|
|
36
28
|
trailingIcon: /*#__PURE__*/_react.default.createElement(_icons.KeyboardArrowRight, null),
|
|
37
29
|
size: "large"
|
|
@@ -40,15 +32,10 @@ var ListBox = function ListBox() {
|
|
|
40
32
|
}, /*#__PURE__*/_react.default.createElement("h4", null, "Row Label")));
|
|
41
33
|
};
|
|
42
34
|
exports.ListBox = ListBox;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
46
|
-
List = _useState2[0],
|
|
47
|
-
showList = _useState2[1];
|
|
35
|
+
const FunctionalListBox = () => {
|
|
36
|
+
const [List, showList] = (0, _react.useState)(true);
|
|
48
37
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_buttons.BmButton, {
|
|
49
|
-
onClick:
|
|
50
|
-
return showList(!List);
|
|
51
|
-
}
|
|
38
|
+
onClick: () => showList(!List)
|
|
52
39
|
}, "Click Me!"), /*#__PURE__*/_react.default.createElement(_listBox.BmListBox, {
|
|
53
40
|
showList: List,
|
|
54
41
|
setShowList: showList
|
|
@@ -8,9 +8,9 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _icons = require("@material-ui/icons");
|
|
9
9
|
var _listheader = require("./listheader");
|
|
10
10
|
require("../../../main.scss");
|
|
11
|
-
function _interopRequireDefault(
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
/* eslint-disable import/no-anonymous-default-export */
|
|
13
|
-
var _default = {
|
|
13
|
+
var _default = exports.default = {
|
|
14
14
|
component: _listheader.BmListHeader,
|
|
15
15
|
title: 'components/Lists/ListHeader',
|
|
16
16
|
argTypes: {
|
|
@@ -38,12 +38,8 @@ var _default = {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return /*#__PURE__*/_react.default.createElement(_listheader.BmListHeader, args);
|
|
44
|
-
};
|
|
45
|
-
var ListHeader = MainListHeader.bind({});
|
|
46
|
-
exports.ListHeader = ListHeader;
|
|
41
|
+
const MainListHeader = args => /*#__PURE__*/_react.default.createElement(_listheader.BmListHeader, args);
|
|
42
|
+
const ListHeader = exports.ListHeader = MainListHeader.bind({});
|
|
47
43
|
ListHeader.args = {
|
|
48
44
|
children: /*#__PURE__*/_react.default.createElement("h3", null, "List Header"),
|
|
49
45
|
trailingIcon: /*#__PURE__*/_react.default.createElement(_icons.Favorite, null)
|