beem-component 1.5.8 → 1.6.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/.eslintrc +62 -0
- package/.prettierrc +6 -0
- package/babel.config.js +9 -10
- package/dist/components/Accordion/Accordion.js +7 -7
- package/dist/components/Accordion/Accordion.stories.js +28 -28
- package/dist/components/Avatars/avatars.js +30 -22
- package/dist/components/Avatars/avatars.stories.js +17 -17
- package/dist/components/BannerCard/bannerCard.stories.js +12 -12
- package/dist/components/BannerCard/bannerCards.js +14 -14
- package/dist/components/Buttons/Stories/basicbutton.stories.js +23 -23
- package/dist/components/Buttons/Stories/buttonAlertIcons.stories.js +16 -16
- package/dist/components/Buttons/Stories/buttonIconsOnly.stories.js +16 -16
- package/dist/components/Buttons/buttonAlertIcons.js +16 -16
- package/dist/components/Buttons/buttonIconsOnly.js +22 -22
- package/dist/components/Buttons/buttons.js +56 -56
- package/dist/components/Cards/cards.js +1 -1
- package/dist/components/Cards/cards.stories.js +6 -6
- package/dist/components/ChatComponents/ChatBody/chatBody.js +43 -36
- package/dist/components/ChatComponents/ChatBody/chatBody.stories.js +5 -5
- package/dist/components/ChatComponents/ChatHeader/chatHeader.js +1 -1
- package/dist/components/ChatComponents/ChatHeader/chatHeader.stories.js +1 -1
- package/dist/components/ChatComponents/ColorPicker/colorPicker.stories.js +7 -3
- package/dist/components/ChatComponents/ContactCards/contactCards.js +1 -2
- package/dist/components/ChatComponents/ContactCards/contactCards.stories.js +1 -1
- package/dist/components/ChatComponents/FormAccordion/FormAccordion.stories.js +9 -5
- package/dist/components/ChatComponents/InfoTab/infoTab.js +1 -1
- package/dist/components/ChatComponents/InfoTab/infoTab.stories.js +4 -4
- package/dist/components/ChatComponents/LabelAccordion/LabelAccordion.stories.js +12 -7
- package/dist/components/ChatComponents/NoteAccordion/NoteAccordion.stories.js +14 -12
- package/dist/components/Checkbox/checkboxToggler.js +64 -0
- package/dist/components/Checkbox/checkboxToggler.stories.js +92 -0
- package/dist/components/Lists/listBox.js +5 -5
- package/dist/components/Lists/listBox.stories.js +5 -5
- package/dist/components/Lists/listHeader.stories.js +11 -11
- package/dist/components/Lists/listheader.js +4 -4
- package/dist/components/Lists/rowLabels.js +2 -2
- package/dist/components/Lists/rowLabels.stories.js +16 -16
- package/dist/components/Loader/loader.js +7 -7
- package/dist/components/Loader/loader.stories.js +11 -11
- package/dist/components/MessageCounter/MessageCounter.stories.js +13 -13
- package/dist/components/MessageCounter/messageCounter.js +11 -11
- package/dist/components/Modals/modal.js +6 -8
- package/dist/components/Modals/modals.stories.js +6 -6
- package/dist/components/NoteBar/noteBar.js +14 -14
- package/dist/components/NoteBar/noteBar.stories.js +15 -15
- package/dist/components/PerformanceIndicator/performaceIndicator.stories.js +13 -13
- package/dist/components/PerformanceIndicator/performanceIndicator.js +14 -12
- package/dist/components/Pills/pills.js +10 -10
- package/dist/components/Pills/pills.stories.js +19 -21
- package/dist/components/ProfileIcon/ProfileIcon.js +14 -14
- package/dist/components/ProfileIcon/profileIcon.stories.js +16 -16
- package/dist/components/ProgressBar/progressbar.stories.js +6 -8
- package/dist/components/ProgressRing/progressRing.js +19 -19
- package/dist/components/ProgressRing/progressRing.stories.js +14 -14
- package/dist/components/RouteLink/link.js +3 -3
- package/dist/components/RouteLink/link.stories.js +1 -1
- package/dist/components/ScrollBar/scrollBar.js +9 -9
- package/dist/components/SuperFluid/SegmentCard/index.js +2 -2
- package/dist/components/Tabs/tabs.js +6 -6
- package/dist/components/Tabs/tabs.stories.js +17 -17
- package/dist/components/Tags/tags.js +21 -21
- package/dist/components/Tags/tags.stories.js +16 -16
- package/dist/components/breakpoints.js +3 -3
- package/dist/components/checkbox.js +4 -4
- package/dist/components/colors.js +32 -30
- package/dist/components/dropdownButton.js +35 -35
- package/dist/components/examples/InfoAccordion.js +0 -1
- package/dist/components/iconStyles.js +45 -45
- package/dist/components/index.js +24 -16
- package/dist/components/input.js +16 -16
- package/dist/components/typography.js +14 -14
- package/package.json +54 -31
- package/src/App.js +10 -7
- package/src/index.js +6 -8
- package/src/lib/components/Accordion/Accordion.js +32 -14
- package/src/lib/components/Accordion/Accordion.stories.js +31 -31
- package/src/lib/components/Avatars/avatars.js +44 -29
- package/src/lib/components/Avatars/avatars.stories.js +18 -18
- package/src/lib/components/BannerCard/bannerCard.stories.js +16 -17
- package/src/lib/components/BannerCard/bannerCards.js +18 -18
- package/src/lib/components/Buttons/Stories/basicbutton.stories.js +29 -29
- package/src/lib/components/Buttons/Stories/buttonAlertIcons.stories.js +17 -17
- package/src/lib/components/Buttons/Stories/buttonIconsOnly.stories.js +24 -24
- package/src/lib/components/Buttons/buttonAlertIcons.js +22 -25
- package/src/lib/components/Buttons/buttonIconsOnly.js +32 -28
- package/src/lib/components/Buttons/buttons.js +70 -73
- package/src/lib/components/Cards/cards.js +2 -3
- package/src/lib/components/Cards/cards.stories.js +10 -10
- package/src/lib/components/ChatComponents/ChatBody/chatBody.js +49 -45
- package/src/lib/components/ChatComponents/ChatBody/chatBody.stories.js +34 -28
- package/src/lib/components/ChatComponents/ChatBody/sessionDetails.js +2 -2
- package/src/lib/components/ChatComponents/ChatHeader/chatHeader.js +2 -2
- package/src/lib/components/ChatComponents/ChatHeader/chatHeader.stories.js +4 -4
- package/src/lib/components/ChatComponents/ColorPicker/colorPicker.js +2 -2
- package/src/lib/components/ChatComponents/ColorPicker/colorPicker.stories.js +4 -3
- package/src/lib/components/ChatComponents/ContactCards/contactCards.js +7 -5
- package/src/lib/components/ChatComponents/ContactCards/contactCards.stories.js +6 -6
- package/src/lib/components/ChatComponents/FormAccordion/FormAccordion.js +3 -3
- package/src/lib/components/ChatComponents/FormAccordion/FormAccordion.stories.js +4 -3
- package/src/lib/components/ChatComponents/InfoTab/infoTab.js +2 -2
- package/src/lib/components/ChatComponents/InfoTab/infoTab.stories.js +7 -7
- package/src/lib/components/ChatComponents/LabelAccordion/LabelAccordion.stories.js +5 -3
- package/src/lib/components/ChatComponents/NoteAccordion/NoteAccordion.js +2 -2
- package/src/lib/components/ChatComponents/NoteAccordion/NoteAccordion.stories.js +6 -5
- package/src/lib/components/Checkbox/checkboxToggler.js +89 -0
- package/src/lib/components/Checkbox/checkboxToggler.stories.js +48 -0
- package/src/lib/components/Lists/listBox.js +7 -7
- package/src/lib/components/Lists/listBox.stories.js +8 -11
- package/src/lib/components/Lists/listHeader.stories.js +13 -13
- package/src/lib/components/Lists/listheader.js +7 -7
- package/src/lib/components/Lists/rowLabels.js +6 -6
- package/src/lib/components/Lists/rowLabels.stories.js +18 -18
- package/src/lib/components/Loader/loader.js +13 -13
- package/src/lib/components/Loader/loader.stories.js +14 -14
- package/src/lib/components/MainWrapper/index.js +2 -2
- package/src/lib/components/MessageCounter/MessageCounter.stories.js +14 -14
- package/src/lib/components/MessageCounter/messageCounter.js +16 -16
- package/src/lib/components/Modals/modal.js +25 -23
- package/src/lib/components/Modals/modals.stories.js +9 -9
- package/src/lib/components/NoteBar/noteBar.js +20 -20
- package/src/lib/components/NoteBar/noteBar.stories.js +18 -17
- package/src/lib/components/PerformanceIndicator/performaceIndicator.stories.js +15 -15
- package/src/lib/components/PerformanceIndicator/performanceIndicator.js +11 -10
- package/src/lib/components/Pills/pills.js +16 -16
- package/src/lib/components/Pills/pills.stories.js +22 -23
- package/src/lib/components/ProfileIcon/ProfileIcon.js +50 -52
- package/src/lib/components/ProfileIcon/profileIcon.stories.js +22 -22
- package/src/lib/components/ProgressBar/progressbar.js +4 -5
- package/src/lib/components/ProgressBar/progressbar.stories.js +8 -9
- package/src/lib/components/ProgressRing/progressRing.js +25 -24
- package/src/lib/components/ProgressRing/progressRing.stories.js +18 -18
- package/src/lib/components/RouteLink/link.js +10 -8
- package/src/lib/components/RouteLink/link.stories.js +4 -4
- package/src/lib/components/ScrollBar/scrollBar.js +15 -14
- package/src/lib/components/SuperFluid/Content/index.js +2 -2
- package/src/lib/components/SuperFluid/ContentTitle.js/index.js +2 -2
- package/src/lib/components/SuperFluid/SegmentCard/index.js +9 -8
- package/src/lib/components/Tabs/tabs.js +11 -11
- package/src/lib/components/Tabs/tabs.stories.js +20 -20
- package/src/lib/components/Tags/tags.js +26 -24
- package/src/lib/components/Tags/tags.stories.js +19 -19
- package/src/lib/components/breakpoints.js +3 -3
- package/src/lib/components/checkbox.js +7 -6
- package/src/lib/components/colors.js +30 -28
- package/src/lib/components/dropdownButton.js +36 -39
- package/src/lib/components/examples/InfoAccordion.js +1 -1
- package/src/lib/components/globalStyles.js +2 -2
- package/src/lib/components/iconStyles.js +45 -48
- package/src/lib/components/index.js +47 -46
- package/src/lib/components/input.js +20 -20
- package/src/lib/components/text.js +1 -1
- package/src/lib/components/typography.js +14 -14
- package/src/reportWebVitals.js +1 -1
- package/dist/components/checkboxToggler.js +0 -50
- package/src/lib/components/checkboxToggler.js +0 -19
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import React, { useState } from
|
|
2
|
-
import { Clear } from
|
|
3
|
-
import styled from
|
|
4
|
-
import { BmIcons } from
|
|
5
|
-
import { BmGrey50, BmPrimaryBlue } from
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Clear } from '@material-ui/icons';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { BmIcons } from '../iconStyles';
|
|
5
|
+
import { BmGrey50, BmPrimaryBlue } from '../colors';
|
|
6
6
|
|
|
7
7
|
const BannerCardWrapper = styled.div`
|
|
8
8
|
display: ${({ closeButton, show }) => {
|
|
9
9
|
if (!closeButton) {
|
|
10
|
-
return
|
|
10
|
+
return 'flex';
|
|
11
11
|
}
|
|
12
|
-
return show ?
|
|
12
|
+
return show ? 'flex' : 'none';
|
|
13
13
|
}};
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
padding: 0.5rem;
|
|
16
16
|
border: 0.071rem
|
|
17
17
|
${({ border }) => {
|
|
18
|
-
if (border ===
|
|
19
|
-
if (border ===
|
|
20
|
-
return
|
|
18
|
+
if (border === 'dashed') return 'dashed';
|
|
19
|
+
if (border === 'solid') return 'solid';
|
|
20
|
+
return 'none';
|
|
21
21
|
}}
|
|
22
22
|
${({ color }) => {
|
|
23
|
-
return color
|
|
23
|
+
return color || BmPrimaryBlue;
|
|
24
24
|
}};
|
|
25
25
|
border-radius: 0.25rem;
|
|
26
26
|
align-items: ${({ content, closeButton }) => {
|
|
27
27
|
if (!closeButton) {
|
|
28
|
-
if (content ===
|
|
29
|
-
if (content ===
|
|
30
|
-
if (content ===
|
|
31
|
-
return
|
|
28
|
+
if (content === 'center') return 'center';
|
|
29
|
+
if (content === 'left') return 'flex-start';
|
|
30
|
+
if (content === 'right') return 'flex-end';
|
|
31
|
+
return 'center';
|
|
32
32
|
}
|
|
33
33
|
}};
|
|
34
34
|
background: ${({ bannerBg }) => {
|
|
35
|
-
if (bannerBg ===
|
|
36
|
-
if (!bannerBg) return
|
|
35
|
+
if (bannerBg === 'default') return `${BmGrey50}`;
|
|
36
|
+
if (!bannerBg) return 'none';
|
|
37
37
|
return bannerBg;
|
|
38
38
|
}}};
|
|
39
39
|
> *:not(:last-child) {
|
|
@@ -53,7 +53,7 @@ const BmBanner = ({ closeButton, children, ...rest }) => {
|
|
|
53
53
|
<BannerCardWrapper closeButton={closeButton} {...rest} show={show}>
|
|
54
54
|
{closeButton && (
|
|
55
55
|
<BannerComponent>
|
|
56
|
-
{children[0]}{
|
|
56
|
+
{children[0]}{' '}
|
|
57
57
|
<BmIcons
|
|
58
58
|
icon={<Clear />}
|
|
59
59
|
size="small"
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
/* eslint-disable import/no-anonymous-default-export */
|
|
2
|
-
import React from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Favorite, Home } from '@material-ui/icons';
|
|
4
|
+
import { BmButton } from '../buttons';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
component: BmButton,
|
|
8
|
-
title:
|
|
8
|
+
title: 'components/Buttons/Basic',
|
|
9
9
|
argTypes: {
|
|
10
10
|
size: {
|
|
11
|
-
options: [
|
|
12
|
-
control: { type:
|
|
13
|
-
description:
|
|
14
|
-
defaultValue: { summary:
|
|
11
|
+
options: ['small', 'medium', 'large'],
|
|
12
|
+
control: { type: 'select' },
|
|
13
|
+
description: 'Size',
|
|
14
|
+
defaultValue: { summary: 'large' },
|
|
15
15
|
},
|
|
16
16
|
variant: {
|
|
17
17
|
options: [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
'primary',
|
|
19
|
+
'secondary',
|
|
20
|
+
'tertiary',
|
|
21
|
+
'success',
|
|
22
|
+
'neutral',
|
|
23
|
+
'destructive',
|
|
24
24
|
],
|
|
25
|
-
control: { type:
|
|
26
|
-
description:
|
|
27
|
-
defaultValue: { summary:
|
|
25
|
+
control: { type: 'select' },
|
|
26
|
+
description: 'Variant',
|
|
27
|
+
defaultValue: { summary: 'primary' },
|
|
28
28
|
},
|
|
29
29
|
leadingIcon: {
|
|
30
|
-
description:
|
|
30
|
+
description: 'Material UI Icons',
|
|
31
31
|
},
|
|
32
32
|
trailingIcon: {
|
|
33
|
-
description:
|
|
33
|
+
description: 'Material UI Icons',
|
|
34
34
|
},
|
|
35
35
|
color: {
|
|
36
|
-
description:
|
|
36
|
+
description: 'Color of the Button',
|
|
37
37
|
},
|
|
38
38
|
children: {
|
|
39
|
-
description:
|
|
40
|
-
default:
|
|
39
|
+
description: 'Text of the button',
|
|
40
|
+
default: 'Button',
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
};
|
|
@@ -46,19 +46,19 @@ const MainButton = (args) => <BmButton {...args} />;
|
|
|
46
46
|
|
|
47
47
|
export const BasicButton = MainButton.bind({});
|
|
48
48
|
BasicButton.args = {
|
|
49
|
-
variant:
|
|
50
|
-
size:
|
|
51
|
-
children:
|
|
49
|
+
variant: 'primary',
|
|
50
|
+
size: 'large',
|
|
51
|
+
children: 'Button',
|
|
52
52
|
leadingIcon: <Home />,
|
|
53
53
|
trailingIcon: <Favorite />,
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
export const ColoredButton = MainButton.bind({});
|
|
57
57
|
ColoredButton.args = {
|
|
58
|
-
variant:
|
|
59
|
-
size:
|
|
60
|
-
children:
|
|
58
|
+
variant: 'primary',
|
|
59
|
+
size: 'large',
|
|
60
|
+
children: 'Button',
|
|
61
61
|
leadingIcon: <Home />,
|
|
62
62
|
trailingIcon: <Favorite />,
|
|
63
|
-
color:
|
|
63
|
+
color: 'pink',
|
|
64
64
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
/* eslint-disable import/no-anonymous-default-export */
|
|
2
|
-
import React from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AssignmentLateOutlined } from '@material-ui/icons';
|
|
4
|
+
import { BmAlertIcon } from '../buttonAlertIcons';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
component: BmAlertIcon,
|
|
8
|
-
title:
|
|
8
|
+
title: 'components/Buttons/AlertIcons',
|
|
9
9
|
argTypes: {
|
|
10
10
|
size: {
|
|
11
|
-
options: [
|
|
12
|
-
control: { type:
|
|
13
|
-
description:
|
|
14
|
-
defaultValue: { summary:
|
|
11
|
+
options: ['small', 'medium', 'large'],
|
|
12
|
+
control: { type: 'select' },
|
|
13
|
+
description: 'Size',
|
|
14
|
+
defaultValue: { summary: 'large' },
|
|
15
15
|
},
|
|
16
16
|
icon: {
|
|
17
|
-
description:
|
|
17
|
+
description: 'Material UI Icons',
|
|
18
18
|
},
|
|
19
19
|
color: {
|
|
20
|
-
description:
|
|
21
|
-
defaultValue: { summary:
|
|
20
|
+
description: 'Color of the icon',
|
|
21
|
+
defaultValue: { summary: '#575757' },
|
|
22
22
|
},
|
|
23
23
|
badgeContent: {
|
|
24
|
-
description:
|
|
24
|
+
description: 'Badge Content',
|
|
25
25
|
},
|
|
26
26
|
badgeColor: {
|
|
27
|
-
description:
|
|
28
|
-
defaultValue: { summary:
|
|
27
|
+
description: 'Color of the badge content',
|
|
28
|
+
defaultValue: { summary: '#F62E48' },
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
31
|
};
|
|
@@ -36,7 +36,7 @@ export const ButtonAlertIcon = MainButtonAlertIcon.bind({});
|
|
|
36
36
|
ButtonAlertIcon.args = {
|
|
37
37
|
icon: <AssignmentLateOutlined />,
|
|
38
38
|
badgeContent: 4,
|
|
39
|
-
badgeColor:
|
|
40
|
-
size:
|
|
41
|
-
color:
|
|
39
|
+
badgeColor: 'red',
|
|
40
|
+
size: 'large',
|
|
41
|
+
color: 'black',
|
|
42
42
|
};
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
/* eslint-disable import/no-anonymous-default-export */
|
|
2
|
-
import React from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Favorite } from '@material-ui/icons';
|
|
4
|
+
import { BmBtnIcon } from '../buttonIconsOnly';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
component: BmBtnIcon,
|
|
8
|
-
title:
|
|
8
|
+
title: 'components/Buttons/IconsOnly',
|
|
9
9
|
argTypes: {
|
|
10
10
|
size: {
|
|
11
|
-
options: [
|
|
12
|
-
control: { type:
|
|
13
|
-
description:
|
|
14
|
-
defaultValue: { summary:
|
|
11
|
+
options: ['small', 'medium', 'large'],
|
|
12
|
+
control: { type: 'select' },
|
|
13
|
+
description: 'Size',
|
|
14
|
+
defaultValue: { summary: 'large' },
|
|
15
15
|
},
|
|
16
16
|
variant: {
|
|
17
17
|
options: [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
'primary',
|
|
19
|
+
'secondary',
|
|
20
|
+
'tertiary',
|
|
21
|
+
'success',
|
|
22
|
+
'neutral',
|
|
23
|
+
'destructive',
|
|
24
|
+
'active',
|
|
25
|
+
'enabled',
|
|
26
26
|
],
|
|
27
|
-
control: { type:
|
|
28
|
-
description:
|
|
29
|
-
defaultValue: { summary:
|
|
27
|
+
control: { type: 'select' },
|
|
28
|
+
description: 'Variant',
|
|
29
|
+
defaultValue: { summary: 'primary' },
|
|
30
30
|
},
|
|
31
31
|
icon: {
|
|
32
|
-
description:
|
|
32
|
+
description: 'Material UI Icons',
|
|
33
33
|
},
|
|
34
34
|
color: {
|
|
35
|
-
description:
|
|
36
|
-
defaultValue: { summary:
|
|
35
|
+
description: 'Color of the button',
|
|
36
|
+
defaultValue: { summary: 'primary color' },
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
39
|
};
|
|
@@ -43,7 +43,7 @@ const MainButtonIcon = (args) => <BmBtnIcon {...args} />;
|
|
|
43
43
|
export const ButtonIcon = MainButtonIcon.bind({});
|
|
44
44
|
ButtonIcon.args = {
|
|
45
45
|
icon: <Favorite />,
|
|
46
|
-
size:
|
|
47
|
-
variant:
|
|
46
|
+
size: 'large',
|
|
47
|
+
variant: 'primary',
|
|
48
48
|
color: undefined,
|
|
49
49
|
};
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from "../colors";
|
|
10
|
-
import Badge from "@material-ui/core/Badge";
|
|
11
|
-
import { PoppinsMedium } from "../typography";
|
|
1
|
+
/* eslint-disable no-shadow */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
6
|
+
import Badge from '@material-ui/core/Badge';
|
|
7
|
+
import { BmSecondaryGrey, BmSecondaryRed, BmPrimaryWhite } from '../colors';
|
|
8
|
+
import { PoppinsMedium } from '../typography';
|
|
12
9
|
|
|
13
10
|
const size = (props) => {
|
|
14
|
-
if (props.size ===
|
|
15
|
-
if (props.size ===
|
|
16
|
-
if (props.size ===
|
|
17
|
-
return
|
|
11
|
+
if (props.size === 'small') return '1.429rem';
|
|
12
|
+
if (props.size === 'medium') return '1.714rem';
|
|
13
|
+
if (props.size === 'large') return '2.286rem';
|
|
14
|
+
return '2.286rem';
|
|
18
15
|
};
|
|
19
16
|
|
|
20
17
|
const Badgesize = (props) => {
|
|
21
|
-
if (props.size ===
|
|
22
|
-
if (props.size ===
|
|
23
|
-
if (props.size ===
|
|
24
|
-
return
|
|
18
|
+
if (props.size === 'small') return '0.857rem';
|
|
19
|
+
if (props.size === 'medium') return '0.857rem';
|
|
20
|
+
if (props.size === 'large') return '0.857rem';
|
|
21
|
+
return '0.857rem';
|
|
25
22
|
};
|
|
26
23
|
|
|
27
24
|
const AlertIcon = {
|
|
@@ -40,13 +37,13 @@ const BadgeIcon = () => ({
|
|
|
40
37
|
background: (props) => props.badgeColor || `${BmSecondaryRed}`,
|
|
41
38
|
color: `${BmPrimaryWhite}`,
|
|
42
39
|
fontFamily: `${PoppinsMedium}`,
|
|
43
|
-
fontStyle:
|
|
40
|
+
fontStyle: 'normal',
|
|
44
41
|
fontWeight: 500,
|
|
45
|
-
fontSize:
|
|
46
|
-
display:
|
|
47
|
-
alignItems:
|
|
48
|
-
textAlign:
|
|
49
|
-
letterSpacing:
|
|
42
|
+
fontSize: '0.643rem',
|
|
43
|
+
display: 'flex',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
textAlign: 'center',
|
|
46
|
+
letterSpacing: '-0.02em',
|
|
50
47
|
},
|
|
51
48
|
});
|
|
52
49
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import styled from
|
|
3
|
-
import PropTypes from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
BmPrimaryWhite,
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
BmSecondaryRed,
|
|
11
11
|
BmSecondaryDarkGreen,
|
|
12
12
|
BmGrey400,
|
|
13
|
-
} from
|
|
14
|
-
import { BmButtonIcon } from
|
|
13
|
+
} from '../colors';
|
|
14
|
+
import { BmButtonIcon } from '../iconStyles';
|
|
15
15
|
|
|
16
16
|
const BeemButtonIcon = styled.button`
|
|
17
17
|
display: flex;
|
|
@@ -20,34 +20,32 @@ const BeemButtonIcon = styled.button`
|
|
|
20
20
|
justify-content: center;
|
|
21
21
|
background: ${({ variant, disabled, color }) => {
|
|
22
22
|
if (!disabled) {
|
|
23
|
-
if (variant ===
|
|
24
|
-
if (variant ===
|
|
25
|
-
if (variant ===
|
|
26
|
-
if (variant ===
|
|
27
|
-
if (variant ===
|
|
28
|
-
if (variant ===
|
|
29
|
-
if (variant ===
|
|
30
|
-
if (variant ===
|
|
31
|
-
return `${color
|
|
32
|
-
} else {
|
|
33
|
-
return `${BmGrey100}`;
|
|
23
|
+
if (variant === 'active') return `${BmPrimaryBlue}`;
|
|
24
|
+
if (variant === 'enabled') return `${BmGrey50}`;
|
|
25
|
+
if (variant === 'destructive') return `${BmSecondaryRed}`;
|
|
26
|
+
if (variant === 'success') return `${BmSecondaryDarkGreen}`;
|
|
27
|
+
if (variant === 'neutral') return `${BmPrimaryWhite}`;
|
|
28
|
+
if (variant === 'primary') return `${color || BmPrimaryBlue}`;
|
|
29
|
+
if (variant === 'secondary') return `${BmPrimaryWhite}`;
|
|
30
|
+
if (variant === 'tertiary') return `${BmPrimaryWhite}`;
|
|
31
|
+
return `${color || BmPrimaryBlue}`;
|
|
34
32
|
}
|
|
33
|
+
return `${BmGrey100}`;
|
|
35
34
|
}};
|
|
36
35
|
border: 0.071rem solid
|
|
37
36
|
${({ variant, disabled, color }) => {
|
|
38
37
|
if (!disabled) {
|
|
39
|
-
if (variant ===
|
|
40
|
-
if (variant ===
|
|
41
|
-
if (variant ===
|
|
42
|
-
if (variant ===
|
|
43
|
-
if (variant ===
|
|
44
|
-
if (variant ===
|
|
45
|
-
if (variant ===
|
|
46
|
-
if (variant ===
|
|
47
|
-
return `${color
|
|
48
|
-
} else {
|
|
49
|
-
return `${BmGrey100}`;
|
|
38
|
+
if (variant === 'active') return `${BmPrimaryBlue}`;
|
|
39
|
+
if (variant === 'enabled') return `${BmGrey50}`;
|
|
40
|
+
if (variant === 'destructive') return `${BmSecondaryRed}`;
|
|
41
|
+
if (variant === 'success') return `${BmSecondaryDarkGreen}`;
|
|
42
|
+
if (variant === 'neutral') return `${BmGrey400}`;
|
|
43
|
+
if (variant === 'primary') return `${color || BmPrimaryBlue}`;
|
|
44
|
+
if (variant === 'secondary') return `${color || BmPrimaryBlue}`;
|
|
45
|
+
if (variant === 'tertiary') return `${BmPrimaryWhite}`;
|
|
46
|
+
return `${color || BmPrimaryBlue}`;
|
|
50
47
|
}
|
|
48
|
+
return `${BmGrey100}`;
|
|
51
49
|
}};
|
|
52
50
|
box-sizing: border-box;
|
|
53
51
|
border-radius: 0.25rem;
|
|
@@ -62,7 +60,13 @@ export const BmBtnIcon = (props) => {
|
|
|
62
60
|
const { variant, size, disabled, children, icon, color, ...rest } = props;
|
|
63
61
|
|
|
64
62
|
return (
|
|
65
|
-
<BeemButtonIcon
|
|
63
|
+
<BeemButtonIcon
|
|
64
|
+
color={color}
|
|
65
|
+
size={size}
|
|
66
|
+
variant={variant}
|
|
67
|
+
disabled={disabled}
|
|
68
|
+
{...rest}
|
|
69
|
+
>
|
|
66
70
|
{icon && (
|
|
67
71
|
<BmIconWrapper>
|
|
68
72
|
<BmButtonIcon
|