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
package/Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
FROM node:
|
|
1
|
+
FROM node:16 AS build
|
|
2
2
|
|
|
3
3
|
WORKDIR /app
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ COPY ./package.json /app/
|
|
|
8
8
|
|
|
9
9
|
COPY ./package-lock.json /app/
|
|
10
10
|
|
|
11
|
-
RUN npm install
|
|
11
|
+
RUN npm install --legacy-peer-deps
|
|
12
12
|
|
|
13
13
|
COPY . /app
|
|
14
14
|
|
|
@@ -23,8 +23,10 @@ COPY --from=build /app/storybook-static /usr/share/nginx/html
|
|
|
23
23
|
|
|
24
24
|
RUN rm /etc/nginx/conf.d/default.conf
|
|
25
25
|
|
|
26
|
+
# Replace the default NGINX config with your custom one
|
|
26
27
|
COPY nginx.conf /etc/nginx/conf.d/
|
|
27
28
|
|
|
29
|
+
|
|
28
30
|
EXPOSE 3000
|
|
29
31
|
|
|
30
32
|
CMD ["nginx", "-g", "daemon off;"]
|
package/Jenkinsfile
CHANGED
|
@@ -1,33 +1,43 @@
|
|
|
1
1
|
pipeline{
|
|
2
2
|
agent any
|
|
3
|
+
parameters {
|
|
4
|
+
string(name: 'TAG', description: 'Tag Number Ex: v2.0.0')
|
|
5
|
+
}
|
|
3
6
|
tools {nodejs "nodejs"}
|
|
4
7
|
environment
|
|
5
8
|
{
|
|
6
|
-
|
|
9
|
+
VERSION = "${params.TAG != "" ? params.TAG : "v2.0.${BUILD_NUMBER}"}"
|
|
7
10
|
PROJECT = "bm-components"
|
|
8
11
|
IMAGE = "$PROJECT:$VERSION"
|
|
9
12
|
ECRURL = "https://347944191864.dkr.ecr.eu-west-1.amazonaws.com"
|
|
10
13
|
ECRCRED = "ecr:eu-west-1:awscred"
|
|
11
|
-
|
|
14
|
+
GIT_CREDS = "master-user-dev"
|
|
15
|
+
GIT_URL = "git@bitbucket.org:bongolive/${PROJECT}.git"
|
|
12
16
|
|
|
17
|
+
}
|
|
13
18
|
stages{
|
|
14
19
|
stage('Deploy for development') {
|
|
15
20
|
when {
|
|
16
21
|
branch 'develop'
|
|
17
22
|
}
|
|
18
23
|
steps {
|
|
19
|
-
git branch: 'develop',credentialsId:
|
|
24
|
+
git branch: 'develop',credentialsId: "${GIT_CREDS}",url: "${GIT_URL}"
|
|
20
25
|
}
|
|
21
26
|
}
|
|
22
27
|
stage('Deploy for production') {
|
|
23
28
|
when {
|
|
24
29
|
branch 'master'
|
|
25
30
|
}
|
|
26
|
-
|
|
27
|
-
git branch: 'master',credentialsId:
|
|
31
|
+
steps {
|
|
32
|
+
git branch: 'master',credentialsId: "${GIT_CREDS}",url: "${GIT_URL}"
|
|
28
33
|
}
|
|
29
34
|
}
|
|
30
35
|
stage('Image build') {
|
|
36
|
+
when {
|
|
37
|
+
expression {
|
|
38
|
+
return params.TAG == ''
|
|
39
|
+
}
|
|
40
|
+
}
|
|
31
41
|
steps{
|
|
32
42
|
script
|
|
33
43
|
{
|
|
@@ -36,6 +46,11 @@ pipeline{
|
|
|
36
46
|
}
|
|
37
47
|
}
|
|
38
48
|
stage('Image push') {
|
|
49
|
+
when {
|
|
50
|
+
expression {
|
|
51
|
+
return params.TAG == ''
|
|
52
|
+
}
|
|
53
|
+
}
|
|
39
54
|
steps {
|
|
40
55
|
script
|
|
41
56
|
{
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -11,29 +10,23 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
10
|
var _icons = require("@material-ui/icons");
|
|
12
11
|
var _colors = require("../colors");
|
|
13
12
|
var _iconStyles = require("../iconStyles");
|
|
14
|
-
|
|
13
|
+
const _excluded = ["children", "disabled", "expandIcon", "Open", "expandIconPosition"],
|
|
15
14
|
_excluded2 = ["children", "leadingIcon", "trailingIcon", "size"];
|
|
16
|
-
function _interopRequireDefault(
|
|
17
|
-
function
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
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; }
|
|
32
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
33
|
-
var _React$createContext = /*#__PURE__*/_react.default.createContext({}),
|
|
34
|
-
Provider = _React$createContext.Provider,
|
|
35
|
-
Consumer = _React$createContext.Consumer;
|
|
36
|
-
var Dropdown = function Dropdown(value, rest) {
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
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); }
|
|
17
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
21
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
22
|
+
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; }
|
|
23
|
+
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; }
|
|
24
|
+
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); } /* eslint-disable react/display-name */ /* eslint-disable react/destructuring-assignment */
|
|
25
|
+
const {
|
|
26
|
+
Provider,
|
|
27
|
+
Consumer
|
|
28
|
+
} = /*#__PURE__*/_react.default.createContext({});
|
|
29
|
+
const Dropdown = (value, rest) => {
|
|
37
30
|
if (value.expandIcon && value.expandIcon === 'none') {
|
|
38
31
|
return;
|
|
39
32
|
}
|
|
@@ -50,61 +43,58 @@ var Dropdown = function Dropdown(value, rest) {
|
|
|
50
43
|
});
|
|
51
44
|
}
|
|
52
45
|
};
|
|
53
|
-
|
|
46
|
+
const BmAccordionMenu = _styledComponents.default.div.withConfig({
|
|
54
47
|
displayName: "Accordion__BmAccordionMenu"
|
|
55
48
|
})(["display:flex;align-items:center;flex-direction:row;padding:0.571rem 1.143rem;background:", ";> *:not(:last-child){margin-right:0.5rem;}"], _colors.BmPrimaryWhite);
|
|
56
|
-
|
|
49
|
+
const BmAccordionDetails = _styledComponents.default.div.withConfig({
|
|
57
50
|
displayName: "Accordion__BmAccordionDetails"
|
|
58
51
|
})(["display:flex;justify-content:space-between;width:100%;"]);
|
|
59
|
-
|
|
52
|
+
const BmAccordionWrapper = _styledComponents.default.div.withConfig({
|
|
60
53
|
displayName: "Accordion__BmAccordionWrapper"
|
|
61
54
|
})(["display:flex;flex-direction:column;"]);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
55
|
+
const BmAccordion = _ref => {
|
|
56
|
+
let {
|
|
57
|
+
children,
|
|
58
|
+
disabled,
|
|
59
|
+
expandIcon,
|
|
60
|
+
Open,
|
|
61
|
+
expandIconPosition
|
|
62
|
+
} = _ref,
|
|
68
63
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
69
|
-
|
|
70
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
71
|
-
toggle = _useState2[0],
|
|
72
|
-
setToggle = _useState2[1];
|
|
64
|
+
const [toggle, setToggle] = (0, _react.useState)(!!Open);
|
|
73
65
|
return /*#__PURE__*/_react.default.createElement(BmAccordionWrapper, null, /*#__PURE__*/_react.default.createElement(Provider, {
|
|
74
66
|
value: _objectSpread({
|
|
75
|
-
toggle
|
|
76
|
-
setToggle
|
|
77
|
-
disabled
|
|
78
|
-
expandIcon
|
|
79
|
-
expandIconPosition
|
|
67
|
+
toggle,
|
|
68
|
+
setToggle,
|
|
69
|
+
disabled,
|
|
70
|
+
expandIcon,
|
|
71
|
+
expandIconPosition
|
|
80
72
|
}, rest)
|
|
81
73
|
}, children));
|
|
82
74
|
};
|
|
83
|
-
BmAccordion.Title =
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
75
|
+
BmAccordion.Title = _ref2 => {
|
|
76
|
+
let {
|
|
77
|
+
children,
|
|
78
|
+
leadingIcon,
|
|
79
|
+
trailingIcon,
|
|
80
|
+
size
|
|
81
|
+
} = _ref2,
|
|
88
82
|
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
89
|
-
return /*#__PURE__*/_react.default.createElement(Consumer, null,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
icon: trailingIcon,
|
|
99
|
-
size: size
|
|
100
|
-
}), value.expandIconPosition === 'right' && Dropdown(value, rest));
|
|
101
|
-
});
|
|
83
|
+
return /*#__PURE__*/_react.default.createElement(Consumer, null, value => /*#__PURE__*/_react.default.createElement(BmAccordionMenu, _extends({}, rest, {
|
|
84
|
+
onClick: () => !value.disabled || value.disabled === false ? value.setToggle(!value.toggle) : value.setToggle(false)
|
|
85
|
+
}), value.expandIconPosition === 'left' || value.expandIconPosition === undefined && Dropdown(value, rest), leadingIcon && /*#__PURE__*/_react.default.createElement(_iconStyles.BmIcons, {
|
|
86
|
+
icon: leadingIcon,
|
|
87
|
+
size: size
|
|
88
|
+
}), /*#__PURE__*/_react.default.createElement(BmAccordionDetails, null, children), trailingIcon && /*#__PURE__*/_react.default.createElement(_iconStyles.BmIcons, {
|
|
89
|
+
icon: trailingIcon,
|
|
90
|
+
size: size
|
|
91
|
+
}), value.expandIconPosition === 'right' && Dropdown(value, rest)));
|
|
102
92
|
};
|
|
103
|
-
BmAccordion.Body =
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
93
|
+
BmAccordion.Body = _ref3 => {
|
|
94
|
+
let {
|
|
95
|
+
children
|
|
96
|
+
} = _ref3;
|
|
97
|
+
return /*#__PURE__*/_react.default.createElement(Consumer, null, value => value.toggle && /*#__PURE__*/_react.default.createElement("div", null, children));
|
|
108
98
|
};
|
|
109
99
|
BmAccordion.propTypes = {
|
|
110
100
|
children: _propTypes.default.object,
|
|
@@ -116,5 +106,4 @@ BmAccordion.propTypes = {
|
|
|
116
106
|
disabled: _propTypes.default.bool,
|
|
117
107
|
Open: _propTypes.default.bool
|
|
118
108
|
};
|
|
119
|
-
var _default = BmAccordion;
|
|
120
|
-
exports.default = _default;
|
|
109
|
+
var _default = exports.default = BmAccordion;
|
|
@@ -8,9 +8,9 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _addonKnobs = require("@storybook/addon-knobs");
|
|
9
9
|
var _icons = require("@material-ui/icons");
|
|
10
10
|
var _Accordion = _interopRequireDefault(require("./Accordion"));
|
|
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: _Accordion.default,
|
|
15
15
|
subcomponents: _Accordion.default.Title,
|
|
16
16
|
title: 'components/Accordion',
|
|
@@ -79,17 +79,16 @@ var _default = {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
-
|
|
83
|
-
var optionSize = {
|
|
82
|
+
const optionSize = {
|
|
84
83
|
small: 'small',
|
|
85
84
|
medium: 'medium',
|
|
86
85
|
large: 'large'
|
|
87
86
|
};
|
|
88
|
-
|
|
87
|
+
const optionExpandIcon = {
|
|
89
88
|
left: 'left',
|
|
90
89
|
right: 'medium'
|
|
91
90
|
};
|
|
92
|
-
|
|
91
|
+
const Accordion = () => {
|
|
93
92
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Accordion.default, {
|
|
94
93
|
disabled: (0, _addonKnobs.boolean)('disabled', false),
|
|
95
94
|
Open: (0, _addonKnobs.boolean)('disabled', false)
|
|
@@ -12,52 +12,63 @@ var _SmartToy = _interopRequireDefault(require("@mui/icons-material/SmartToy"));
|
|
|
12
12
|
var _Chat = _interopRequireDefault(require("@mui/icons-material/Chat"));
|
|
13
13
|
var _colors = require("../colors");
|
|
14
14
|
var _iconStyles = require("../iconStyles");
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(
|
|
17
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
18
|
-
function _objectWithoutProperties(
|
|
19
|
-
function _objectWithoutPropertiesLoose(
|
|
20
|
-
|
|
15
|
+
const _excluded = ["user", "size", "color"];
|
|
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 BmAvatarWrapper = exports.BmAvatarWrapper = _styledComponents.default.div.withConfig({
|
|
21
21
|
displayName: "avatars__BmAvatarWrapper"
|
|
22
|
-
})(["display:flex;align-items:center;justify-content:center;height:", ";width:", ";background:", ";border-radius:", ";border:0.071rem solid ", ";"],
|
|
23
|
-
|
|
22
|
+
})(["display:flex;align-items:center;justify-content:center;height:", ";width:", ";background:", ";border-radius:", ";border:0.071rem solid ", ";"], _ref => {
|
|
23
|
+
let {
|
|
24
|
+
size
|
|
25
|
+
} = _ref;
|
|
24
26
|
if (size === 'large') return '3.429rem';
|
|
25
27
|
if (size === 'medium') return '2.286rem';
|
|
26
28
|
if (size === 'small') return '1.714rem';
|
|
27
29
|
if (size === 'xsmall') return '1.429rem';
|
|
28
30
|
if (!size) return '3.429rem';
|
|
29
31
|
return size;
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
+
}, _ref2 => {
|
|
33
|
+
let {
|
|
34
|
+
size
|
|
35
|
+
} = _ref2;
|
|
32
36
|
if (size === 'large') return '3.429rem';
|
|
33
37
|
if (size === 'medium') return '2.286rem';
|
|
34
38
|
if (size === 'small') return '1.714rem';
|
|
35
39
|
if (size === 'xsmall') return '1.429rem';
|
|
36
40
|
if (!size) return '3.429rem';
|
|
37
41
|
return size;
|
|
38
|
-
},
|
|
39
|
-
|
|
42
|
+
}, _ref3 => {
|
|
43
|
+
let {
|
|
44
|
+
user
|
|
45
|
+
} = _ref3;
|
|
40
46
|
if (user === 'chatbot') return "".concat(_colors.BmPrimaryBlue);
|
|
41
47
|
if (user === 'employee') return "".concat(_colors.BmPrimaryBlue);
|
|
42
48
|
if (user === 'sms') return "".concat(_colors.BmPrimaryBlue);
|
|
43
49
|
return "".concat(_colors.BmGrey100);
|
|
44
|
-
},
|
|
45
|
-
|
|
50
|
+
}, _ref4 => {
|
|
51
|
+
let {
|
|
52
|
+
type
|
|
53
|
+
} = _ref4;
|
|
46
54
|
if (type === 'circle') return '7.143rem';
|
|
47
55
|
if (type === 'square') return '0.179rem';
|
|
48
56
|
return '7.143rem';
|
|
49
|
-
},
|
|
50
|
-
|
|
57
|
+
}, _ref5 => {
|
|
58
|
+
let {
|
|
59
|
+
user
|
|
60
|
+
} = _ref5;
|
|
51
61
|
if (user === 'chatbot') return "".concat(_colors.BmPrimaryBlue);
|
|
52
62
|
if (user === 'employee') return "".concat(_colors.BmPrimaryBlue);
|
|
53
63
|
if (user === 'sms') return "".concat(_colors.BmPrimaryBlue);
|
|
54
64
|
return "".concat(_colors.BmGrey100);
|
|
55
65
|
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
const BmAvatar = props => {
|
|
67
|
+
const {
|
|
68
|
+
user,
|
|
69
|
+
size,
|
|
70
|
+
color
|
|
71
|
+
} = props,
|
|
61
72
|
rest = _objectWithoutProperties(props, _excluded);
|
|
62
73
|
return /*#__PURE__*/_react.default.createElement(BmAvatarWrapper, _extends({
|
|
63
74
|
user: user,
|
|
@@ -86,5 +97,4 @@ BmAvatar.propTypes = {
|
|
|
86
97
|
color: _propTypes.default.string,
|
|
87
98
|
user: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node])
|
|
88
99
|
};
|
|
89
|
-
var _default = BmAvatar;
|
|
90
|
-
exports.default = _default;
|
|
100
|
+
var _default = exports.default = BmAvatar;
|
|
@@ -7,9 +7,9 @@ exports.default = exports.CustomAvatar = exports.Avatar = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _icons = require("@material-ui/icons");
|
|
9
9
|
var _avatars = _interopRequireDefault(require("./avatars"));
|
|
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: _avatars.default,
|
|
14
14
|
title: 'components/Avatars',
|
|
15
15
|
argTypes: {
|
|
@@ -41,19 +41,14 @@ var _default = {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return /*#__PURE__*/_react.default.createElement(_avatars.default, args);
|
|
47
|
-
};
|
|
48
|
-
var Avatar = MainAvatar.bind({});
|
|
49
|
-
exports.Avatar = Avatar;
|
|
44
|
+
const MainAvatar = args => /*#__PURE__*/_react.default.createElement(_avatars.default, args);
|
|
45
|
+
const Avatar = exports.Avatar = MainAvatar.bind({});
|
|
50
46
|
Avatar.args = {
|
|
51
47
|
user: 'chatbot',
|
|
52
48
|
size: 'large',
|
|
53
49
|
type: 'circle'
|
|
54
50
|
};
|
|
55
|
-
|
|
56
|
-
exports.CustomAvatar = CustomAvatar;
|
|
51
|
+
const CustomAvatar = exports.CustomAvatar = MainAvatar.bind({});
|
|
57
52
|
CustomAvatar.args = {
|
|
58
53
|
user: /*#__PURE__*/_react.default.createElement(_icons.Home, null),
|
|
59
54
|
size: 'large',
|
|
@@ -8,9 +8,9 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _bannerCards = _interopRequireDefault(require("./bannerCards"));
|
|
9
9
|
var _ = require("..");
|
|
10
10
|
var _colors = require("../colors");
|
|
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: _bannerCards.default,
|
|
15
15
|
title: 'components/Banner',
|
|
16
16
|
argTypes: {
|
|
@@ -36,8 +36,7 @@ var _default = {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
var SampleBanner = function SampleBanner() {
|
|
39
|
+
const SampleBanner = () => {
|
|
41
40
|
return /*#__PURE__*/_react.default.createElement(_bannerCards.default, {
|
|
42
41
|
border: "dashed",
|
|
43
42
|
content: "center",
|
|
@@ -47,7 +46,7 @@ var SampleBanner = function SampleBanner() {
|
|
|
47
46
|
}, "Label")));
|
|
48
47
|
};
|
|
49
48
|
exports.SampleBanner = SampleBanner;
|
|
50
|
-
|
|
49
|
+
const AnnouncementBanner = () => {
|
|
51
50
|
return /*#__PURE__*/_react.default.createElement(_bannerCards.default, {
|
|
52
51
|
bannerBg: "".concat(_colors.BmPrimaryBlue),
|
|
53
52
|
closeButton: true
|
|
@@ -65,7 +64,7 @@ var AnnouncementBanner = function AnnouncementBanner() {
|
|
|
65
64
|
}, "Label")));
|
|
66
65
|
};
|
|
67
66
|
exports.AnnouncementBanner = AnnouncementBanner;
|
|
68
|
-
|
|
67
|
+
const FeatureBanner = () => {
|
|
69
68
|
return /*#__PURE__*/_react.default.createElement(_bannerCards.default, {
|
|
70
69
|
bannerBg: "".concat(_colors.BmSecondaryYellow),
|
|
71
70
|
closeButton: true
|
|
@@ -84,7 +83,7 @@ var FeatureBanner = function FeatureBanner() {
|
|
|
84
83
|
}, "Label")));
|
|
85
84
|
};
|
|
86
85
|
exports.FeatureBanner = FeatureBanner;
|
|
87
|
-
|
|
86
|
+
const GenericBanner = () => {
|
|
88
87
|
return /*#__PURE__*/_react.default.createElement(_bannerCards.default, {
|
|
89
88
|
border: "solid",
|
|
90
89
|
bannerBg: "default",
|
|
@@ -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,62 +9,64 @@ var _icons = require("@material-ui/icons");
|
|
|
10
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
10
|
var _iconStyles = require("../iconStyles");
|
|
12
11
|
var _colors = require("../colors");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(
|
|
15
|
-
function
|
|
16
|
-
function
|
|
17
|
-
function
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
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); }
|
|
21
|
-
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; }
|
|
22
|
-
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; } }
|
|
23
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
|
-
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; }
|
|
25
|
-
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; }
|
|
26
|
-
var BannerCardWrapper = _styledComponents.default.div.withConfig({
|
|
12
|
+
const _excluded = ["closeButton", "children"];
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
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); }
|
|
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 BannerCardWrapper = _styledComponents.default.div.withConfig({
|
|
27
19
|
displayName: "bannerCards__BannerCardWrapper"
|
|
28
|
-
})(["display:", ";flex-direction:column;padding:0.5rem;border:0.071rem ", " ", ";border-radius:0.25rem;align-items:", ";background:", "};> *:not(:last-child){margin-bottom:0.5rem;}"],
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
})(["display:", ";flex-direction:column;padding:0.5rem;border:0.071rem ", " ", ";border-radius:0.25rem;align-items:", ";background:", "};> *:not(:last-child){margin-bottom:0.5rem;}"], _ref => {
|
|
21
|
+
let {
|
|
22
|
+
closeButton,
|
|
23
|
+
show
|
|
24
|
+
} = _ref;
|
|
31
25
|
if (!closeButton) {
|
|
32
26
|
return 'flex';
|
|
33
27
|
}
|
|
34
28
|
return show ? 'flex' : 'none';
|
|
35
|
-
},
|
|
36
|
-
|
|
29
|
+
}, _ref2 => {
|
|
30
|
+
let {
|
|
31
|
+
border
|
|
32
|
+
} = _ref2;
|
|
37
33
|
if (border === 'dashed') return 'dashed';
|
|
38
34
|
if (border === 'solid') return 'solid';
|
|
39
35
|
return 'none';
|
|
40
|
-
},
|
|
41
|
-
|
|
36
|
+
}, _ref3 => {
|
|
37
|
+
let {
|
|
38
|
+
color
|
|
39
|
+
} = _ref3;
|
|
42
40
|
return color || _colors.BmPrimaryBlue;
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
}, _ref4 => {
|
|
42
|
+
let {
|
|
43
|
+
content,
|
|
44
|
+
closeButton
|
|
45
|
+
} = _ref4;
|
|
46
46
|
if (!closeButton) {
|
|
47
47
|
if (content === 'center') return 'center';
|
|
48
48
|
if (content === 'left') return 'flex-start';
|
|
49
49
|
if (content === 'right') return 'flex-end';
|
|
50
50
|
return 'center';
|
|
51
51
|
}
|
|
52
|
-
},
|
|
53
|
-
|
|
52
|
+
}, _ref5 => {
|
|
53
|
+
let {
|
|
54
|
+
bannerBg
|
|
55
|
+
} = _ref5;
|
|
54
56
|
if (bannerBg === 'default') return "".concat(_colors.BmGrey50);
|
|
55
57
|
if (!bannerBg) return 'none';
|
|
56
58
|
return bannerBg;
|
|
57
59
|
});
|
|
58
|
-
|
|
60
|
+
const BannerComponent = _styledComponents.default.div.withConfig({
|
|
59
61
|
displayName: "bannerCards__BannerComponent"
|
|
60
62
|
})(["display:flex;flex-direction:row;justify-content:space-between;"]);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
const BmBanner = _ref6 => {
|
|
64
|
+
let {
|
|
65
|
+
closeButton,
|
|
66
|
+
children
|
|
67
|
+
} = _ref6,
|
|
64
68
|
rest = _objectWithoutProperties(_ref6, _excluded);
|
|
65
|
-
|
|
66
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
67
|
-
show = _useState2[0],
|
|
68
|
-
setShow = _useState2[1];
|
|
69
|
+
const [show, setShow] = (0, _react.useState)(true);
|
|
69
70
|
return /*#__PURE__*/_react.default.createElement(BannerCardWrapper, _extends({
|
|
70
71
|
closeButton: closeButton
|
|
71
72
|
}, rest, {
|
|
@@ -73,10 +74,7 @@ var BmBanner = function BmBanner(_ref6) {
|
|
|
73
74
|
}), closeButton && /*#__PURE__*/_react.default.createElement(BannerComponent, null, children[0], ' ', /*#__PURE__*/_react.default.createElement(_iconStyles.BmIcons, {
|
|
74
75
|
icon: /*#__PURE__*/_react.default.createElement(_icons.Clear, null),
|
|
75
76
|
size: "small",
|
|
76
|
-
onClick:
|
|
77
|
-
return setShow(!show);
|
|
78
|
-
}
|
|
77
|
+
onClick: () => setShow(!show)
|
|
79
78
|
})), closeButton ? children.slice(1) : children);
|
|
80
79
|
};
|
|
81
|
-
var _default = BmBanner;
|
|
82
|
-
exports.default = _default;
|
|
80
|
+
var _default = exports.default = BmBanner;
|