beem-component 1.0.1 → 1.0.5
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/.storybook/favicon.ico +0 -0
- package/.storybook/logo-blue.png +0 -0
- package/.storybook/main.js +15 -0
- package/.storybook/manager-head.html +14 -0
- package/.storybook/manager.js +6 -0
- package/.storybook/preview.js +10 -0
- package/.storybook/theme.js +10 -0
- package/Dockerfile +30 -0
- package/Jenkinsfile +73 -0
- package/build-storybook.log +14621 -0
- package/dist/assets/beem.jpeg +0 -0
- package/dist/components/{Accordion.js → Accordion/Accordion.js} +12 -6
- package/dist/components/Accordion/Accordion.stories.js +86 -0
- package/dist/components/{avatars.js → Avatars/avatars.js} +31 -11
- package/dist/components/Avatars/avatars.stories.js +69 -0
- package/dist/components/Buttons/Stories/basicbutton.stories.js +67 -0
- package/dist/components/Buttons/Stories/buttonAlertIcons.stories.js +65 -0
- package/dist/components/Buttons/Stories/buttonIconsOnly.stories.js +65 -0
- package/dist/components/{buttonAlertIcons.js → Buttons/buttonAlertIcons.js} +17 -9
- package/dist/components/{buttonIconsOnly.js → Buttons/buttonIconsOnly.js} +13 -4
- package/dist/components/{buttons.js → Buttons/buttons.js} +11 -10
- package/dist/components/{Reports → Cards}/cards.js +9 -24
- package/dist/components/Cards/cards.stories.js +61 -0
- package/dist/components/Chats/chat.js +1 -1
- package/dist/components/Chats/chatInput.js +1 -1
- package/dist/components/Chats/chatwrapper.js +1 -1
- package/dist/components/Lists/listBox.js +41 -0
- package/dist/components/Lists/listBox.stories.js +78 -0
- package/dist/components/Lists/listHeader.stories.js +58 -0
- package/dist/components/Lists/listheader.js +17 -12
- package/dist/components/Lists/rowLabels.js +34 -16
- package/dist/components/Lists/rowLabels.stories.js +85 -0
- package/dist/components/{loaders.js → Loader/loader.js} +13 -7
- package/dist/components/Loader/loader.stories.js +52 -0
- package/dist/components/{Reports/buttons.js → MainWrapper/index.js} +5 -3
- package/dist/components/Modals/modal copy.js +160 -0
- package/dist/components/Modals/modal.js +166 -0
- package/dist/components/Modals/modals.stories.js +117 -0
- package/dist/components/{infoNote.js → NoteBar.js/noteBar.js} +23 -19
- package/dist/components/NoteBar.js/noteBar.stories.js +66 -0
- package/dist/components/PerformanceIndicator/performaceIndicator.stories.js +66 -0
- package/dist/components/PerformanceIndicator/performanceIndicator.js +68 -0
- package/dist/components/Pills/pills.js +126 -0
- package/dist/components/Pills/pills.stories.js +110 -0
- package/dist/components/{progressbar.js → ProgressBar/progressbar.js} +8 -2
- package/dist/components/ProgressBar/progressbar.stories.js +45 -0
- package/dist/components/{Link.js → RouteLink/link.js} +8 -3
- package/dist/components/RouteLink/link.stories.js +29 -0
- package/dist/components/SuperFluid/ContentTitle.js/index.js +1 -1
- package/dist/components/SuperFluid/SegmentCard/index.js +1 -1
- package/dist/components/Tabs/tabs.js +85 -0
- package/dist/components/Tabs/tabs.stories.js +59 -0
- package/dist/components/breakpoints.js +18 -0
- package/dist/components/chatHeader.js +1 -1
- package/dist/components/checkboxToggler.js +2 -2
- package/dist/components/colors.js +5 -3
- package/dist/components/contacts.js +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/dropdownButton.js +3 -3
- package/dist/components/dropdownItems.js +1 -1
- package/dist/components/example.js +47 -0
- package/dist/components/iconStyles.js +69 -119
- package/dist/components/index-copy.js +1285 -0
- package/dist/components/index.js +80 -1155
- package/dist/components/input.js +9 -3
- package/dist/components/logo.js +1 -1
- package/dist/components/navbar.js +1 -1
- package/dist/components/sidebar.js +2 -2
- package/dist/components/tabs.js +1 -1
- package/dist/components/text.js +1 -1
- package/dist/components/typography.js +1 -1
- package/nginx.conf +17 -0
- package/package.json +30 -11
- package/public/favicon.ico +0 -0
- package/public/index.html +1 -1
- package/src/App.js +12 -29
- package/src/examples/Navbar.js +1 -1
- package/src/lib/assets/beem.jpeg +0 -0
- package/src/lib/components/{Accordion.js → Accordion/Accordion.js} +5 -4
- package/src/lib/components/Accordion/Accordion.stories.js +63 -0
- package/src/lib/components/{avatars.js → Avatars/avatars.js} +24 -8
- package/src/lib/components/Avatars/avatars.stories.js +45 -0
- package/src/lib/components/Buttons/Stories/basicbutton.stories.js +51 -0
- package/src/lib/components/Buttons/Stories/buttonAlertIcons.stories.js +42 -0
- package/src/lib/components/Buttons/Stories/buttonIconsOnly.stories.js +49 -0
- package/src/lib/components/{buttonAlertIcons.js → Buttons/buttonAlertIcons.js} +20 -9
- package/src/lib/components/{buttonIconsOnly.js → Buttons/buttonIconsOnly.js} +12 -2
- package/src/lib/components/{buttons.js → Buttons/buttons.js} +10 -10
- package/src/lib/components/{Reports → Cards}/cards.js +10 -18
- package/src/lib/components/Cards/cards.stories.js +52 -0
- package/src/lib/components/Lists/listBox.js +34 -0
- package/src/lib/components/Lists/listBox.stories.js +47 -0
- package/src/lib/components/Lists/listHeader.stories.js +36 -0
- package/src/lib/components/Lists/listheader.js +17 -11
- package/src/lib/components/Lists/rowLabels.js +47 -16
- package/src/lib/components/Lists/rowLabels.stories.js +59 -0
- package/src/lib/components/{loaders.js → Loader/loader.js} +18 -7
- package/src/lib/components/Loader/loader.stories.js +30 -0
- package/src/lib/components/MainWrapper/index.js +7 -0
- package/src/lib/components/Modals/modal copy.js +159 -0
- package/src/lib/components/Modals/modal.js +152 -0
- package/src/lib/components/Modals/modals.stories.js +82 -0
- package/src/lib/components/{infoNote.js → NoteBar.js/noteBar.js} +24 -25
- package/src/lib/components/NoteBar.js/noteBar.stories.js +40 -0
- package/src/lib/components/PerformanceIndicator/performaceIndicator.stories.js +40 -0
- package/src/lib/components/PerformanceIndicator/performanceIndicator.js +56 -0
- package/src/lib/components/Pills/pills.js +91 -0
- package/src/lib/components/Pills/pills.stories.js +74 -0
- package/src/lib/components/{progressbar.js → ProgressBar/progressbar.js} +8 -1
- package/src/lib/components/ProgressBar/progressbar.stories.js +26 -0
- package/src/lib/components/{Link.js → RouteLink/link.js} +5 -4
- package/src/lib/components/RouteLink/link.stories.js +21 -0
- package/src/lib/components/Tabs/tabs.js +84 -0
- package/src/lib/components/Tabs/tabs.stories.js +36 -0
- package/src/lib/components/breakpoints.js +11 -0
- package/src/lib/components/colors.js +2 -0
- package/src/lib/components/dropdownButton.js +2 -2
- package/src/lib/components/example.js +30 -0
- package/src/lib/components/iconStyles.js +46 -101
- package/src/lib/components/index-copy.js +468 -0
- package/src/lib/components/index.js +38 -445
- package/src/lib/components/input.js +8 -2
- package/src/lib/components/sidebar.js +1 -1
- package/storybook-static/0.00c62ec79c260aedbb98.manager.bundle.js +2 -0
- package/storybook-static/0.00c62ec79c260aedbb98.manager.bundle.js.LICENSE.txt +8 -0
- package/storybook-static/0.96c45dd8.iframe.bundle.js +1 -0
- package/storybook-static/1.dc6acfa9.iframe.bundle.js +3 -0
- package/storybook-static/1.dc6acfa9.iframe.bundle.js.LICENSE.txt +8 -0
- package/storybook-static/1.dc6acfa9.iframe.bundle.js.map +1 -0
- package/storybook-static/1.dc7dcdaec2def2f224fd.manager.bundle.js +1 -0
- package/storybook-static/2.24353ddc.iframe.bundle.js +1 -0
- package/storybook-static/3.8bb2173c.iframe.bundle.js +1 -0
- package/storybook-static/5.0779e3847d325dece216.manager.bundle.js +1 -0
- package/storybook-static/6.8bd405c2576206749a16.manager.bundle.js +2 -0
- package/storybook-static/6.8bd405c2576206749a16.manager.bundle.js.LICENSE.txt +12 -0
- package/storybook-static/7.9d4ba19cf58425e7ff0d.manager.bundle.js +1 -0
- package/storybook-static/7.f0cfc757.iframe.bundle.js +1 -0
- package/storybook-static/8.91de97de.iframe.bundle.js +3 -0
- package/storybook-static/8.91de97de.iframe.bundle.js.LICENSE.txt +12 -0
- package/storybook-static/8.91de97de.iframe.bundle.js.map +1 -0
- package/storybook-static/8.b4e9ec0ec7648e02a923.manager.bundle.js +1 -0
- package/storybook-static/9.40ec65d6.iframe.bundle.js +1 -0
- package/storybook-static/asset-manifest.json +30 -0
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/iframe.html +348 -0
- package/storybook-static/index.html +110 -0
- package/storybook-static/main.3c8d8027.iframe.bundle.js +1 -0
- package/storybook-static/main.3e5804fe56d1f580b088.manager.bundle.js +1 -0
- package/storybook-static/runtime~main.d3a18d6a.iframe.bundle.js +1 -0
- package/storybook-static/runtime~main.ff106120648356c6069d.manager.bundle.js +1 -0
- package/storybook-static/static/css/main.b44a190d.chunk.css +4 -0
- package/storybook-static/static/css/main.b44a190d.chunk.css.map +1 -0
- package/storybook-static/static/media/OpenSans-Regular.1b0809d5.ttf +0 -0
- package/storybook-static/static/media/PoppinsBold.1eae2d48.woff2 +0 -0
- package/storybook-static/static/media/PoppinsBold.53ff6749.eot +0 -0
- package/storybook-static/static/media/PoppinsBold.53ff971f.ttf +0 -0
- package/storybook-static/static/media/PoppinsBold.850fc4f3.svg +3066 -0
- package/storybook-static/static/media/PoppinsBold.b33c148b.woff +0 -0
- package/storybook-static/static/media/PoppinsMedium.0ba26f6c.woff +0 -0
- package/storybook-static/static/media/PoppinsMedium.49b46ace.eot +0 -0
- package/storybook-static/static/media/PoppinsMedium.57a99fa8.woff2 +0 -0
- package/storybook-static/static/media/PoppinsMedium.b7e43707.svg +3103 -0
- package/storybook-static/static/media/PoppinsMedium.c98dddbd.ttf +0 -0
- package/storybook-static/static/media/PoppinsRegular.13b9af9c.eot +0 -0
- package/storybook-static/static/media/PoppinsRegular.43e9b50d.svg +3138 -0
- package/storybook-static/static/media/PoppinsRegular.4a4d5420.woff +0 -0
- package/storybook-static/static/media/PoppinsRegular.9a7cc7ec.woff2 +0 -0
- package/storybook-static/static/media/PoppinsRegular.e1bc9021.ttf +0 -0
- package/storybook-static/static/media/PoppinsSemiBold.5692c77f.ttf +0 -0
- package/storybook-static/static/media/PoppinsSemiBold.80138c67.woff +0 -0
- package/storybook-static/static/media/PoppinsSemiBold.c442695a.eot +0 -0
- package/storybook-static/static/media/PoppinsSemiBold.e1948d56.svg +3098 -0
- package/storybook-static/static/media/PoppinsSemiBold.f27050e2.woff2 +0 -0
- package/storybook-static/static/media/logo-blue.bfc5ba6d.png +0 -0
- package/storybook-static/vendors~main.1750028c2d68e574fb1d.manager.bundle.js +2 -0
- package/storybook-static/vendors~main.1750028c2d68e574fb1d.manager.bundle.js.LICENSE.txt +104 -0
- package/storybook-static/vendors~main.7fe78cc2.iframe.bundle.js +3 -0
- package/storybook-static/vendors~main.7fe78cc2.iframe.bundle.js.LICENSE.txt +122 -0
- package/storybook-static/vendors~main.7fe78cc2.iframe.bundle.js.map +1 -0
- package/dist/assets/content_copy_black.svg +0 -1
- package/dist/assets/profile-pic.jpg +0 -0
- package/dist/components/Accordicon.js +0 -51
- package/dist/components/CustomerInfo/customerInfo.js +0 -89
- package/dist/components/CustomerInfo/customerInfoBar.js +0 -24
- package/dist/components/CustomerInfo/infoAccordion.js +0 -78
- package/dist/components/CustomerInfo/labelsInfo.js +0 -37
- package/dist/components/CustomerInfo/notesInfo.js +0 -39
- package/dist/components/Modals/modalBody.js +0 -61
- package/dist/components/Modals/noteModalBody.js +0 -20
- package/dist/components/Modals/noteModalFooter.js +0 -24
- package/dist/components/Modals/noteModalHeader.js +0 -93
- package/dist/components/Reports/charts.js +0 -70
- package/dist/components/Reports/infoHeader.js +0 -65
- package/dist/components/Reports/reportsBody.js +0 -28
- package/dist/components/Reports/title.js +0 -28
- package/dist/components/performanceIndicator.js +0 -41
- package/dist/components/pills.js +0 -73
- package/src/App1.js +0 -229
- package/src/CHAT.js +0 -170
- package/src/Complete.js +0 -48
- package/src/CreateSegments.js +0 -48
- package/src/FileUploadSFL.js +0 -110
- package/src/examples/CustomerInfo.js +0 -248
- package/src/lib/assets/content_copy_black.svg +0 -1
- package/src/lib/assets/profile-pic.jpg +0 -0
- package/src/lib/components/Accordicon.js +0 -43
- package/src/lib/components/CustomerInfo/customerInfo.js +0 -91
- package/src/lib/components/CustomerInfo/customerInfoBar.js +0 -23
- package/src/lib/components/CustomerInfo/infoAccordion.js +0 -96
- package/src/lib/components/CustomerInfo/labelsInfo.js +0 -37
- package/src/lib/components/CustomerInfo/notesInfo.js +0 -61
- package/src/lib/components/Modals/modalBody.js +0 -66
- package/src/lib/components/Modals/noteModalBody.js +0 -10
- package/src/lib/components/Modals/noteModalFooter.js +0 -16
- package/src/lib/components/Modals/noteModalHeader.js +0 -103
- package/src/lib/components/Reports/buttons.js +0 -5
- package/src/lib/components/Reports/charts.js +0 -79
- package/src/lib/components/Reports/infoHeader.js +0 -63
- package/src/lib/components/Reports/reportsBody.js +0 -29
- package/src/lib/components/Reports/title.js +0 -19
- package/src/lib/components/performanceIndicator.js +0 -27
- package/src/lib/components/pills.js +0 -65
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* eslint-disable import/no-anonymous-default-export */
|
|
2
|
+
import { Delete, Favorite, Person } from "@material-ui/icons";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { BmPrimaryBlue } from "../colors";
|
|
5
|
+
import { BmPill } from "./pills";
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
component: BmPill,
|
|
9
|
+
title: "components/Pills",
|
|
10
|
+
argTypes: {
|
|
11
|
+
icon: {
|
|
12
|
+
description: "Material-UI icon(optional)",
|
|
13
|
+
defaultValue: { summary: undefined },
|
|
14
|
+
},
|
|
15
|
+
avatarIcon: {
|
|
16
|
+
description: "Material-UI icon(optional)",
|
|
17
|
+
defaultValue: { summary: undefined },
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
options: ["xsmall", "small", "medium", "large", "xlarge"],
|
|
21
|
+
control: { type: "select" },
|
|
22
|
+
description: "Size of the Icon (Can also be predefined e.g. 10px)",
|
|
23
|
+
defaultValue: { summary: "xsmall" },
|
|
24
|
+
},
|
|
25
|
+
avatarSize: {
|
|
26
|
+
options: ["xsmall", "small", "medium", "large", "xlarge"],
|
|
27
|
+
control: { type: "select" },
|
|
28
|
+
description: "Size of the AvatarIcon (Can also be predefined e.g. 10px)",
|
|
29
|
+
defaultValue: { summary: "xsmall" },
|
|
30
|
+
},
|
|
31
|
+
label: {
|
|
32
|
+
description: "Pill label in uppercase",
|
|
33
|
+
defaultValue: { summary: "undefined" },
|
|
34
|
+
},
|
|
35
|
+
color: {
|
|
36
|
+
description: "Color of Pill ",
|
|
37
|
+
defaultValue: { summary: "black" },
|
|
38
|
+
},
|
|
39
|
+
onDelete: {
|
|
40
|
+
description: "Handles Deleting Pill",
|
|
41
|
+
defaultValue: { summary: undefined },
|
|
42
|
+
},
|
|
43
|
+
deleteIcon: {
|
|
44
|
+
description: "Material-UI icon (Used only when OnDelete is present)",
|
|
45
|
+
defaultValue: { summary: undefined },
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const MainPill = (args) => <BmPill {...args} />;
|
|
51
|
+
|
|
52
|
+
export const BasicPill = MainPill.bind({});
|
|
53
|
+
BasicPill.args = {
|
|
54
|
+
icon: <Favorite />,
|
|
55
|
+
label: "label",
|
|
56
|
+
color: undefined,
|
|
57
|
+
onDelete: undefined,
|
|
58
|
+
deleteIcon: undefined,
|
|
59
|
+
avatarIcon: undefined,
|
|
60
|
+
avatarSize: undefined,
|
|
61
|
+
size: undefined,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const CustomPill = MainPill.bind({});
|
|
65
|
+
CustomPill.args = {
|
|
66
|
+
icon: undefined,
|
|
67
|
+
label: "label",
|
|
68
|
+
color: undefined,
|
|
69
|
+
onDelete: true,
|
|
70
|
+
deleteIcon: <Delete />,
|
|
71
|
+
avatarIcon: <Person />,
|
|
72
|
+
avatarSize: undefined,
|
|
73
|
+
size: undefined,
|
|
74
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import styled from "styled-components";
|
|
3
|
-
import
|
|
3
|
+
import Proptypes from 'prop-types';
|
|
4
|
+
import { BmGrey100, BmPrimaryBlue } from "../colors";
|
|
4
5
|
|
|
5
6
|
const Container = styled.div`
|
|
6
7
|
height: 0.75rem;
|
|
@@ -34,3 +35,9 @@ export const BmProgressBar = (props) => {
|
|
|
34
35
|
</Container>
|
|
35
36
|
);
|
|
36
37
|
};
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
BmProgressBar.propTypes = {
|
|
41
|
+
value: Proptypes.string.isRequired,
|
|
42
|
+
color: Proptypes.string,
|
|
43
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* eslint-disable import/no-anonymous-default-export */
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BmProgressBar } from "./progressbar";
|
|
4
|
+
import { Home } from "@material-ui/icons";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
component: BmProgressBar,
|
|
8
|
+
title: "components/ProgressBar",
|
|
9
|
+
argTypes: {
|
|
10
|
+
value: {
|
|
11
|
+
control: { type: "text" },
|
|
12
|
+
description: "Progress value",
|
|
13
|
+
},
|
|
14
|
+
color: {
|
|
15
|
+
control: { type: "text" },
|
|
16
|
+
description: "Color of the progress bar",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const MainProgressBar = (args) => <BmProgressBar {...args} />;
|
|
22
|
+
|
|
23
|
+
export const ProgressBar = MainProgressBar.bind({});
|
|
24
|
+
ProgressBar.args = {
|
|
25
|
+
value: "50",
|
|
26
|
+
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
import { Link } from "react-router-dom";
|
|
3
|
-
import {
|
|
4
|
-
import { p } from "../
|
|
3
|
+
import { BmPrimaryBlue } from "../colors";
|
|
4
|
+
import { p } from "../text";
|
|
5
5
|
|
|
6
6
|
export const BmRouteLink = styled(Link)`
|
|
7
7
|
${p}
|
|
8
|
-
color: ${
|
|
8
|
+
color: ${(props) => (props.color ? props.color : `${BmPrimaryBlue} `)};
|
|
9
9
|
text-decoration: none;
|
|
10
10
|
&:hover,
|
|
11
11
|
&:focus,
|
|
12
12
|
&:active {
|
|
13
|
-
color: ${
|
|
13
|
+
${'' /* color: ${(props) =>
|
|
14
|
+
darken(0.1, props.color ? props.color : `${BmPrimaryBlue} `)} !important; */}
|
|
14
15
|
font-weight: 600;
|
|
15
16
|
&:before {
|
|
16
17
|
font-weight: normal;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* eslint-disable import/no-anonymous-default-export */
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BrowserRouter, Switch } from "react-router-dom";
|
|
4
|
+
import { BmRouteLink } from "./link";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
component: BmRouteLink,
|
|
8
|
+
title: "components/RouteLink",
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const SampleLink = () => {
|
|
12
|
+
return (
|
|
13
|
+
<>
|
|
14
|
+
<BrowserRouter>
|
|
15
|
+
<Switch>
|
|
16
|
+
<BmRouteLink to="#">Click Me!</BmRouteLink>
|
|
17
|
+
</Switch>
|
|
18
|
+
</BrowserRouter>
|
|
19
|
+
</>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { BmGrey400, BmPrimaryBlue, BmPrimaryWhite } from "../colors";
|
|
5
|
+
import { BmIcons } from "../iconStyles";
|
|
6
|
+
|
|
7
|
+
const BmTabWrapper = styled.div`
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
flex-direction: row;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
padding: 0.714rem 1.714rem;
|
|
13
|
+
background: ${BmPrimaryWhite};
|
|
14
|
+
box-shadow: ${({ state }) => {
|
|
15
|
+
if (state === "active") {
|
|
16
|
+
return `inset 0px -3px 0px ${BmPrimaryBlue}`;
|
|
17
|
+
}
|
|
18
|
+
if (state === "inactive") {
|
|
19
|
+
return `inset 0px -3px 0px ${BmGrey400}`;
|
|
20
|
+
}
|
|
21
|
+
return "none";
|
|
22
|
+
}};
|
|
23
|
+
> *:not(:last-child) {
|
|
24
|
+
margin-right: 0.5rem;
|
|
25
|
+
}
|
|
26
|
+
${({ color, children, disabled }) =>
|
|
27
|
+
children && disabled
|
|
28
|
+
? `
|
|
29
|
+
> * {
|
|
30
|
+
color: ${BmGrey400};
|
|
31
|
+
}
|
|
32
|
+
`
|
|
33
|
+
: `
|
|
34
|
+
> * {
|
|
35
|
+
color: ${color};
|
|
36
|
+
}
|
|
37
|
+
`}
|
|
38
|
+
`;
|
|
39
|
+
|
|
40
|
+
export const BmTab = ({
|
|
41
|
+
leadingIcon,
|
|
42
|
+
trailingIcon,
|
|
43
|
+
children,
|
|
44
|
+
size,
|
|
45
|
+
color,
|
|
46
|
+
icon,
|
|
47
|
+
disabled,
|
|
48
|
+
...rest
|
|
49
|
+
}) => {
|
|
50
|
+
return (
|
|
51
|
+
<BmTabWrapper
|
|
52
|
+
leadingIcon={leadingIcon}
|
|
53
|
+
trailingIcon={trailingIcon}
|
|
54
|
+
color={color}
|
|
55
|
+
disabled={disabled}
|
|
56
|
+
{...rest}
|
|
57
|
+
>
|
|
58
|
+
{leadingIcon && (
|
|
59
|
+
<BmIcons
|
|
60
|
+
icon={leadingIcon}
|
|
61
|
+
size={size || 'large'}
|
|
62
|
+
color={disabled ? `${BmGrey400}` : color}
|
|
63
|
+
/>
|
|
64
|
+
)}
|
|
65
|
+
{children}
|
|
66
|
+
{trailingIcon && (
|
|
67
|
+
<BmIcons
|
|
68
|
+
icon={trailingIcon}
|
|
69
|
+
size={size || 'large'}
|
|
70
|
+
color={disabled ? `${BmGrey400}` : color}
|
|
71
|
+
/>
|
|
72
|
+
)}
|
|
73
|
+
</BmTabWrapper>
|
|
74
|
+
);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
BmTab.propTypes = {
|
|
78
|
+
children: PropTypes.object,
|
|
79
|
+
trailingIcon: PropTypes.node,
|
|
80
|
+
leadingIcon: PropTypes.node,
|
|
81
|
+
state: PropTypes.string,
|
|
82
|
+
color: PropTypes.string,
|
|
83
|
+
size: PropTypes.string,
|
|
84
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* eslint-disable import/no-anonymous-default-export */
|
|
2
|
+
import { Favorite, KeyboardArrowDown } from "@material-ui/icons";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { BmTab } from "./tabs";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
component: BmTab,
|
|
8
|
+
title: "components/Tabs",
|
|
9
|
+
argTypes: {
|
|
10
|
+
color: {
|
|
11
|
+
control: { type: "text" },
|
|
12
|
+
description: "Color of the Icons and Text",
|
|
13
|
+
},
|
|
14
|
+
state: {
|
|
15
|
+
options: ["active", "inactive"],
|
|
16
|
+
control: { type: "select" },
|
|
17
|
+
description: "State of the Tabs (optional)",
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
options: ["small", "medium", "large"],
|
|
21
|
+
control: { type: "select" },
|
|
22
|
+
description: "Size of the icons",
|
|
23
|
+
defaultValue: { summary: "large" },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const MainTab = (args) => <BmTab {...args} />;
|
|
29
|
+
|
|
30
|
+
export const Tabs = MainTab.bind({});
|
|
31
|
+
Tabs.args = {
|
|
32
|
+
children: <h3>Tabs</h3>,
|
|
33
|
+
leadingIcon: <Favorite />,
|
|
34
|
+
trailingIcon: <KeyboardArrowDown />,
|
|
35
|
+
disabled: false,
|
|
36
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { KeyboardArrowDown } from "@material-ui/icons";
|
|
3
3
|
import styled from "styled-components";
|
|
4
|
-
import { BmBtnIcon } from "
|
|
5
|
-
import { BmButton } from "
|
|
4
|
+
import { BmBtnIcon } from "../components/Buttons/buttonIconsOnly";
|
|
5
|
+
import { BmButton } from "../components/Buttons/buttons";
|
|
6
6
|
import {
|
|
7
7
|
BmPrimaryWhite,
|
|
8
8
|
BmPrimaryBlue,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const btnVariants = {
|
|
2
|
+
primary: "primary",
|
|
3
|
+
danger: "danger",
|
|
4
|
+
tertiary: "tertiary",
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
// Variant styles
|
|
8
|
+
const variantStyles = {
|
|
9
|
+
[btnVariants.primary]: {
|
|
10
|
+
background: "#1890ff",
|
|
11
|
+
},
|
|
12
|
+
[btnVariants.danger]: {
|
|
13
|
+
background: "#f81d22",
|
|
14
|
+
},
|
|
15
|
+
[btnVariants.tertiary]: {
|
|
16
|
+
background: "#fff",
|
|
17
|
+
color: "#000",
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
function BaseButton({ variant, ...props }) {
|
|
22
|
+
const btnStyle = {
|
|
23
|
+
color: "#fff",
|
|
24
|
+
border: "none",
|
|
25
|
+
padding: "5px 10px",
|
|
26
|
+
...variantStyles[variant],
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return <button {...props} style={btnStyle} />;
|
|
30
|
+
}
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
Done,
|
|
5
|
-
ErrorOutline,
|
|
6
|
-
Search,
|
|
7
|
-
KeyboardArrowDown,
|
|
8
|
-
KeyboardArrowUp,
|
|
9
|
-
} from "@material-ui/icons";
|
|
10
3
|
import { withStyles } from "@material-ui/core/styles";
|
|
11
4
|
import {
|
|
12
|
-
BmSecondaryDarkGreen,
|
|
13
|
-
BmSecondaryRed,
|
|
14
5
|
BmPrimaryWhite,
|
|
15
6
|
BmPrimaryBlue,
|
|
16
7
|
BmGrey400,
|
|
@@ -30,14 +21,6 @@ const size = (props) => {
|
|
|
30
21
|
return props.size;
|
|
31
22
|
};
|
|
32
23
|
|
|
33
|
-
const DropdownIcon = {
|
|
34
|
-
root: {
|
|
35
|
-
fill: `${BmSecondaryGrey}`,
|
|
36
|
-
height: (props) => size(props),
|
|
37
|
-
width: (props) => size(props),
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
|
|
41
24
|
// Button Icons
|
|
42
25
|
const ButtonIcon = {
|
|
43
26
|
root: {
|
|
@@ -59,6 +42,22 @@ const ButtonIcon = {
|
|
|
59
42
|
return `${BmGrey400}`;
|
|
60
43
|
}
|
|
61
44
|
},
|
|
45
|
+
color: ({ variant, disabled, color }) => {
|
|
46
|
+
if (color) return color;
|
|
47
|
+
if (!disabled) {
|
|
48
|
+
if (variant === "active") return `${BmPrimaryWhite}`;
|
|
49
|
+
if (variant === "enabled") return `${BmPrimaryBlack}`;
|
|
50
|
+
if (variant === "destructive") return `${BmPrimaryWhite}`;
|
|
51
|
+
if (variant === "success") return `${BmPrimaryWhite}`;
|
|
52
|
+
if (variant === "neutral") return `${BmPrimaryBlue}`;
|
|
53
|
+
if (variant === "primary") return `${BmPrimaryWhite}`;
|
|
54
|
+
if (variant === "secondary") return `${BmPrimaryBlue}`;
|
|
55
|
+
if (variant === "tertiary") return `${BmPrimaryBlue}`;
|
|
56
|
+
return `${BmPrimaryWhite}`;
|
|
57
|
+
} else {
|
|
58
|
+
return `${BmGrey400}`;
|
|
59
|
+
}
|
|
60
|
+
},
|
|
62
61
|
},
|
|
63
62
|
};
|
|
64
63
|
|
|
@@ -70,58 +69,11 @@ export const BmButtonIcon = withStyles(ButtonIcon)((props) => {
|
|
|
70
69
|
return null;
|
|
71
70
|
});
|
|
72
71
|
|
|
73
|
-
const SuccessIcon = {
|
|
74
|
-
root: {
|
|
75
|
-
fill: `${BmSecondaryDarkGreen}`,
|
|
76
|
-
height: (props) => size(props),
|
|
77
|
-
width: (props) => size(props),
|
|
78
|
-
margin: "0rem 0.571rem !important",
|
|
79
|
-
},
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export const BmSuccessIcon = withStyles(SuccessIcon)((props) => (
|
|
83
|
-
<Done action {...props} />
|
|
84
|
-
));
|
|
85
|
-
|
|
86
|
-
const ErrorIcon = {
|
|
87
|
-
root: {
|
|
88
|
-
fill: `${BmSecondaryRed}`,
|
|
89
|
-
height: (props) => size(props),
|
|
90
|
-
width: (props) => size(props),
|
|
91
|
-
margin: "0rem 0.571rem !important",
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
export const BmErrorIcon = withStyles(ErrorIcon)((props) => (
|
|
95
|
-
<ErrorOutline action {...props} />
|
|
96
|
-
));
|
|
97
|
-
|
|
98
|
-
// Search Icon for Search Component
|
|
99
|
-
const SearchIcon = {
|
|
100
|
-
root: {
|
|
101
|
-
fill: `${BmSecondaryGrey}`,
|
|
102
|
-
height: (props) => size(props),
|
|
103
|
-
width: (props) => size(props),
|
|
104
|
-
// margin: "0rem 0.571rem",
|
|
105
|
-
},
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export const BmSearchIcon = withStyles(SearchIcon)((props) => (
|
|
109
|
-
<Search action {...props} />
|
|
110
|
-
));
|
|
111
|
-
|
|
112
|
-
export const BmDropdownIcon = withStyles(DropdownIcon)((props) => (
|
|
113
|
-
<KeyboardArrowDown action {...props} />
|
|
114
|
-
));
|
|
115
|
-
|
|
116
|
-
export const BmDropupIcon = withStyles(DropdownIcon)((props) => (
|
|
117
|
-
<KeyboardArrowUp action {...props} />
|
|
118
|
-
));
|
|
119
|
-
|
|
120
72
|
// Tags
|
|
121
73
|
const TagIcon = {
|
|
122
74
|
root: {
|
|
123
|
-
height: "1.143rem !important",
|
|
124
|
-
width: "1.143rem !important",
|
|
75
|
+
height: (props) => size(props) || "1.143rem !important",
|
|
76
|
+
width: (props) => size(props) || "1.143rem !important",
|
|
125
77
|
fill: ({ variant, color }) => {
|
|
126
78
|
if (color) {
|
|
127
79
|
return color;
|
|
@@ -130,7 +82,14 @@ const TagIcon = {
|
|
|
130
82
|
return `${BmPrimaryBlack}`;
|
|
131
83
|
return `${BmPrimaryWhite}`;
|
|
132
84
|
},
|
|
133
|
-
|
|
85
|
+
color: ({ variant, color }) => {
|
|
86
|
+
if (color) {
|
|
87
|
+
return color;
|
|
88
|
+
}
|
|
89
|
+
if (variant === "neutral" || variant === "light")
|
|
90
|
+
return `${BmPrimaryBlack}`;
|
|
91
|
+
return `${BmPrimaryWhite}`;
|
|
92
|
+
},
|
|
134
93
|
},
|
|
135
94
|
};
|
|
136
95
|
export const BmTagIcon = withStyles(TagIcon)((props) => {
|
|
@@ -143,16 +102,19 @@ export const BmTagIcon = withStyles(TagIcon)((props) => {
|
|
|
143
102
|
|
|
144
103
|
// Avatar Icons
|
|
145
104
|
const Avatarsize = (props) => {
|
|
146
|
-
if (props.size === "xsmall") return "0.857rem";
|
|
147
|
-
if (props.size === "small") return "1.143rem";
|
|
148
|
-
if (props.size === "medium") return "1.429rem";
|
|
149
|
-
if (props.size === "large") return "2.286rem";
|
|
150
|
-
return "2.286rem";
|
|
105
|
+
if (props.size === "xsmall") return "0.857rem !important";
|
|
106
|
+
if (props.size === "small") return "1.143rem !important";
|
|
107
|
+
if (props.size === "medium") return "1.429rem !important";
|
|
108
|
+
if (props.size === "large") return "2.286rem !important";
|
|
109
|
+
if(!props.size) return "2.286rem !important";
|
|
110
|
+
return props.size;
|
|
151
111
|
};
|
|
152
112
|
|
|
113
|
+
|
|
153
114
|
const AvatarIcon = {
|
|
154
115
|
root: {
|
|
155
116
|
fill: (props) => props.color || `${BmPrimaryWhite}`,
|
|
117
|
+
color: (props) => props.color || `${BmPrimaryWhite}`,
|
|
156
118
|
height: (props) => Avatarsize(props),
|
|
157
119
|
width: (props) => Avatarsize(props),
|
|
158
120
|
},
|
|
@@ -166,17 +128,19 @@ export const BmAvatarIcon = withStyles(AvatarIcon)((props) => {
|
|
|
166
128
|
return null;
|
|
167
129
|
});
|
|
168
130
|
|
|
131
|
+
//check on sizing
|
|
169
132
|
export const BmChatbotIcon = withStyles(AvatarIcon)((props) => {
|
|
170
133
|
return (
|
|
171
134
|
<SvgIcon action {...props}>
|
|
172
135
|
<path
|
|
173
136
|
d="M19 8.975V6C19 5.46957 18.7893 4.96086 18.4142 4.58579C18.0391 4.21072 17.5304 4 17 4H11V2.688C11.305 2.414 11.5 2.02 11.5 1.578C11.5 1.18018 11.342 0.798647 11.0607 0.517343C10.7794 0.236038 10.3978 0.0780029 10 0.0780029C9.60218 0.0780029 9.22064 0.236038 8.93934 0.517343C8.65804 0.798647 8.5 1.18018 8.5 1.578C8.5 2.02 8.695 2.414 9 2.688V4H3C2.46957 4 1.96086 4.21072 1.58579 4.58579C1.21071 4.96086 1 5.46957 1 6V8.998L0.928 9.003C0.675888 9.02097 0.439955 9.13382 0.26775 9.31883C0.095544 9.50384 -0.000132994 9.74725 1.38752e-07 10V12C1.38752e-07 12.2652 0.105357 12.5196 0.292893 12.7071C0.48043 12.8946 0.734784 13 1 13V18C1 18.5304 1.21071 19.0391 1.58579 19.4142C1.96086 19.7893 2.46957 20 3 20H17C17.5304 20 18.0391 19.7893 18.4142 19.4142C18.7893 19.0391 19 18.5304 19 18V13C19.2652 13 19.5196 12.8946 19.7071 12.7071C19.8946 12.5196 20 12.2652 20 12V10.062C20.0116 9.90681 19.9869 9.75104 19.928 9.607C19.726 9.119 19.293 9.002 19 8.975ZM5 10C5 8.896 5.672 8 6.5 8C7.328 8 8 8.896 8 10C8 11.104 7.328 12 6.5 12C5.672 12 5 11.104 5 10ZM13.998 16C12.997 15.997 6.001 16 6 16V14C6 14 13.001 13.998 14.002 14L13.998 16ZM13.5 12C12.672 12 12 11.104 12 10C12 8.896 12.672 8 13.5 8C14.328 8 15 8.896 15 10C15 11.104 14.328 12 13.5 12Z"
|
|
174
|
-
fill="white"
|
|
137
|
+
fill={props.color || "white"}
|
|
175
138
|
/>
|
|
176
139
|
</SvgIcon>
|
|
177
140
|
);
|
|
178
141
|
});
|
|
179
142
|
|
|
143
|
+
// To be refacotored
|
|
180
144
|
// Emoji Icons
|
|
181
145
|
const EmojiSize = () => {
|
|
182
146
|
// if (props.size === "small") return "1.429rem";
|
|
@@ -188,6 +152,7 @@ const EmojiSize = () => {
|
|
|
188
152
|
const EmojiIcon = {
|
|
189
153
|
root: {
|
|
190
154
|
fill: (props) => props.color || `${BmSecondaryGrey}`,
|
|
155
|
+
color: (props) => props.color || `${BmSecondaryGrey}`,
|
|
191
156
|
height: (props) => EmojiSize(props),
|
|
192
157
|
width: (props) => EmojiSize(props),
|
|
193
158
|
},
|
|
@@ -206,7 +171,7 @@ export const BmQuickReplyIcon = withStyles(EmojiIcon)((props) => {
|
|
|
206
171
|
<SvgIcon action {...props}>
|
|
207
172
|
<path
|
|
208
173
|
d="M5.33332 23.3932V5.83317H26.6667V13.8332H29.3333V5.83317C29.3333 4.3665 28.1333 3.1665 26.6667 3.1665H5.33332C3.86666 3.1665 2.67999 4.3665 2.67999 5.83317L2.66666 29.8332L7.99999 24.4998H20V21.8332H6.89332L5.33332 23.3932Z"
|
|
209
|
-
fill="#575757"
|
|
174
|
+
fill={props.color || "#575757"}
|
|
210
175
|
/>
|
|
211
176
|
</SvgIcon>
|
|
212
177
|
);
|
|
@@ -217,13 +182,14 @@ const icon = {
|
|
|
217
182
|
fill: (props) => props.color || `${BmSecondaryGrey}`,
|
|
218
183
|
height: (props) => size(props),
|
|
219
184
|
width: (props) => size(props),
|
|
185
|
+
color: (props) => props.color || `${BmSecondaryGrey}`,
|
|
220
186
|
},
|
|
221
187
|
};
|
|
222
188
|
|
|
223
189
|
export const BmIcons = withStyles(icon)((props) => {
|
|
224
190
|
if (props.icon) {
|
|
225
191
|
const Icon = props.icon.type;
|
|
226
|
-
return <Icon action {...props} />;
|
|
192
|
+
return <Icon action {...props} fill={props.color} />;
|
|
227
193
|
}
|
|
228
194
|
return null;
|
|
229
195
|
});
|
|
@@ -244,41 +210,19 @@ export const BmSupport = withStyles(icon)((props) => {
|
|
|
244
210
|
<SvgIcon action {...props}>
|
|
245
211
|
<path
|
|
246
212
|
d="M21 12.22C21 6.73 16.74 3 12 3C7.31 3 3 6.65 3 12.28C2.4 12.62 2 13.26 2 14V16C2 17.1 2.9 18 4 18H5V11.9C5 8.03 8.13 4.9 12 4.9C15.87 4.9 19 8.03 19 11.9V19H11V21H19C20.1 21 21 20.1 21 19V17.78C21.59 17.47 22 16.86 22 16.14V13.84C22 13.14 21.59 12.53 21 12.22Z"
|
|
247
|
-
fill="black"
|
|
213
|
+
fill={props.color || "black"}
|
|
248
214
|
/>
|
|
249
215
|
<path
|
|
250
216
|
d="M9 14C9.55228 14 10 13.5523 10 13C10 12.4477 9.55228 12 9 12C8.44772 12 8 12.4477 8 13C8 13.5523 8.44772 14 9 14Z"
|
|
251
|
-
fill="black"
|
|
217
|
+
fill={props.color || "black"}
|
|
252
218
|
/>
|
|
253
219
|
<path
|
|
254
220
|
d="M15 14C15.5523 14 16 13.5523 16 13C16 12.4477 15.5523 12 15 12C14.4477 12 14 12.4477 14 13C14 13.5523 14.4477 14 15 14Z"
|
|
255
|
-
fill="black"
|
|
221
|
+
fill={props.color || "black"}
|
|
256
222
|
/>
|
|
257
223
|
<path
|
|
258
224
|
d="M18 11.03C17.7615 9.62413 17.0334 8.34796 15.9444 7.42738C14.8555 6.5068 13.4759 6.00117 12.05 6C9.01997 6 5.75997 8.51 6.01997 12.45C7.2531 11.9454 8.34221 11.1435 9.1902 10.1158C10.0382 9.08808 10.6187 7.86652 10.88 6.56C12.19 9.19 14.88 11 18 11.03Z"
|
|
259
|
-
fill="black"
|
|
260
|
-
/>
|
|
261
|
-
</SvgIcon>
|
|
262
|
-
);
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
export const BmArrowCircleDown = withStyles(icon)((props) => {
|
|
266
|
-
return (
|
|
267
|
-
<SvgIcon action {...props}>
|
|
268
|
-
<path
|
|
269
|
-
d="M16 5.33329C21.88 5.33329 26.6667 10.12 26.6667 16C26.6667 21.88 21.88 26.6666 16 26.6666C10.12 26.6666 5.33335 21.88 5.33335 16C5.33335 10.12 10.12 5.33329 16 5.33329ZM16 2.66663C8.64002 2.66663 2.66669 8.63996 2.66669 16C2.66669 23.36 8.64002 29.3333 16 29.3333C23.36 29.3333 29.3334 23.36 29.3334 16C29.3334 8.63996 23.36 2.66663 16 2.66663ZM17.3334 16V10.6666H14.6667V16H10.6667L16 21.3333L21.3334 16H17.3334Z"
|
|
270
|
-
fill={"#AFAFAF" || props.color}
|
|
271
|
-
/>
|
|
272
|
-
</SvgIcon>
|
|
273
|
-
);
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
export const BmArrowCircleUp = withStyles(icon)((props) => {
|
|
277
|
-
return (
|
|
278
|
-
<SvgIcon action {...props}>
|
|
279
|
-
<path
|
|
280
|
-
d="M9.99997 18C5.58997 18 1.99997 14.41 1.99997 10C1.99997 5.59 5.58997 2 9.99997 2C14.41 2 18 5.59 18 10C18 14.41 14.41 18 9.99997 18ZM9.99997 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 9.99997 0C4.47997 0 -3.05176e-05 4.48 -3.05176e-05 10C-3.05176e-05 15.52 4.47997 20 9.99997 20ZM8.99997 10V14H11V10H14L9.99997 6L5.99997 10H8.99997Z"
|
|
281
|
-
fill={"#AFAFAF" || props.color}
|
|
225
|
+
fill={props.color || "black"}
|
|
282
226
|
/>
|
|
283
227
|
</SvgIcon>
|
|
284
228
|
);
|
|
@@ -292,3 +236,4 @@ export const CopyToClipBoard = withStyles(icon)((props) => {
|
|
|
292
236
|
</SvgIcon>
|
|
293
237
|
);
|
|
294
238
|
});
|
|
239
|
+
|