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
|
@@ -7,49 +7,49 @@ exports.default = exports.ColoredButton = exports.BasicButton = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _buttons = require("../buttons");
|
|
11
|
-
|
|
12
10
|
var _icons = require("@material-ui/icons");
|
|
13
11
|
|
|
12
|
+
var _buttons = require("../buttons");
|
|
13
|
+
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
16
|
/* eslint-disable import/no-anonymous-default-export */
|
|
17
17
|
var _default = {
|
|
18
18
|
component: _buttons.BmButton,
|
|
19
|
-
title:
|
|
19
|
+
title: 'components/Buttons/Basic',
|
|
20
20
|
argTypes: {
|
|
21
21
|
size: {
|
|
22
|
-
options: [
|
|
22
|
+
options: ['small', 'medium', 'large'],
|
|
23
23
|
control: {
|
|
24
|
-
type:
|
|
24
|
+
type: 'select'
|
|
25
25
|
},
|
|
26
|
-
description:
|
|
26
|
+
description: 'Size',
|
|
27
27
|
defaultValue: {
|
|
28
|
-
summary:
|
|
28
|
+
summary: 'large'
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
variant: {
|
|
32
|
-
options: [
|
|
32
|
+
options: ['primary', 'secondary', 'tertiary', 'success', 'neutral', 'destructive'],
|
|
33
33
|
control: {
|
|
34
|
-
type:
|
|
34
|
+
type: 'select'
|
|
35
35
|
},
|
|
36
|
-
description:
|
|
36
|
+
description: 'Variant',
|
|
37
37
|
defaultValue: {
|
|
38
|
-
summary:
|
|
38
|
+
summary: 'primary'
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
leadingIcon: {
|
|
42
|
-
description:
|
|
42
|
+
description: 'Material UI Icons'
|
|
43
43
|
},
|
|
44
44
|
trailingIcon: {
|
|
45
|
-
description:
|
|
45
|
+
description: 'Material UI Icons'
|
|
46
46
|
},
|
|
47
47
|
color: {
|
|
48
|
-
description:
|
|
48
|
+
description: 'Color of the Button'
|
|
49
49
|
},
|
|
50
50
|
children: {
|
|
51
|
-
description:
|
|
52
|
-
default:
|
|
51
|
+
description: 'Text of the button',
|
|
52
|
+
default: 'Button'
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
};
|
|
@@ -62,19 +62,19 @@ var MainButton = function MainButton(args) {
|
|
|
62
62
|
var BasicButton = MainButton.bind({});
|
|
63
63
|
exports.BasicButton = BasicButton;
|
|
64
64
|
BasicButton.args = {
|
|
65
|
-
variant:
|
|
66
|
-
size:
|
|
67
|
-
children:
|
|
65
|
+
variant: 'primary',
|
|
66
|
+
size: 'large',
|
|
67
|
+
children: 'Button',
|
|
68
68
|
leadingIcon: /*#__PURE__*/_react.default.createElement(_icons.Home, null),
|
|
69
69
|
trailingIcon: /*#__PURE__*/_react.default.createElement(_icons.Favorite, null)
|
|
70
70
|
};
|
|
71
71
|
var ColoredButton = MainButton.bind({});
|
|
72
72
|
exports.ColoredButton = ColoredButton;
|
|
73
73
|
ColoredButton.args = {
|
|
74
|
-
variant:
|
|
75
|
-
size:
|
|
76
|
-
children:
|
|
74
|
+
variant: 'primary',
|
|
75
|
+
size: 'large',
|
|
76
|
+
children: 'Button',
|
|
77
77
|
leadingIcon: /*#__PURE__*/_react.default.createElement(_icons.Home, null),
|
|
78
78
|
trailingIcon: /*#__PURE__*/_react.default.createElement(_icons.Favorite, null),
|
|
79
|
-
color:
|
|
79
|
+
color: 'pink'
|
|
80
80
|
};
|
|
@@ -7,43 +7,43 @@ exports.default = exports.ButtonAlertIcon = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _buttonAlertIcons = require("../buttonAlertIcons");
|
|
11
|
-
|
|
12
10
|
var _icons = require("@material-ui/icons");
|
|
13
11
|
|
|
12
|
+
var _buttonAlertIcons = require("../buttonAlertIcons");
|
|
13
|
+
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
16
|
/* eslint-disable import/no-anonymous-default-export */
|
|
17
17
|
var _default = {
|
|
18
18
|
component: _buttonAlertIcons.BmAlertIcon,
|
|
19
|
-
title:
|
|
19
|
+
title: 'components/Buttons/AlertIcons',
|
|
20
20
|
argTypes: {
|
|
21
21
|
size: {
|
|
22
|
-
options: [
|
|
22
|
+
options: ['small', 'medium', 'large'],
|
|
23
23
|
control: {
|
|
24
|
-
type:
|
|
24
|
+
type: 'select'
|
|
25
25
|
},
|
|
26
|
-
description:
|
|
26
|
+
description: 'Size',
|
|
27
27
|
defaultValue: {
|
|
28
|
-
summary:
|
|
28
|
+
summary: 'large'
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
icon: {
|
|
32
|
-
description:
|
|
32
|
+
description: 'Material UI Icons'
|
|
33
33
|
},
|
|
34
34
|
color: {
|
|
35
|
-
description:
|
|
35
|
+
description: 'Color of the icon',
|
|
36
36
|
defaultValue: {
|
|
37
|
-
summary:
|
|
37
|
+
summary: '#575757'
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
badgeContent: {
|
|
41
|
-
description:
|
|
41
|
+
description: 'Badge Content'
|
|
42
42
|
},
|
|
43
43
|
badgeColor: {
|
|
44
|
-
description:
|
|
44
|
+
description: 'Color of the badge content',
|
|
45
45
|
defaultValue: {
|
|
46
|
-
summary:
|
|
46
|
+
summary: '#F62E48'
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -59,7 +59,7 @@ exports.ButtonAlertIcon = ButtonAlertIcon;
|
|
|
59
59
|
ButtonAlertIcon.args = {
|
|
60
60
|
icon: /*#__PURE__*/_react.default.createElement(_icons.AssignmentLateOutlined, null),
|
|
61
61
|
badgeContent: 4,
|
|
62
|
-
badgeColor:
|
|
63
|
-
size:
|
|
64
|
-
color:
|
|
62
|
+
badgeColor: 'red',
|
|
63
|
+
size: 'large',
|
|
64
|
+
color: 'black'
|
|
65
65
|
};
|
|
@@ -7,44 +7,44 @@ exports.default = exports.ButtonIcon = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _buttonIconsOnly = require("../buttonIconsOnly");
|
|
11
|
-
|
|
12
10
|
var _icons = require("@material-ui/icons");
|
|
13
11
|
|
|
12
|
+
var _buttonIconsOnly = require("../buttonIconsOnly");
|
|
13
|
+
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
16
|
/* eslint-disable import/no-anonymous-default-export */
|
|
17
17
|
var _default = {
|
|
18
18
|
component: _buttonIconsOnly.BmBtnIcon,
|
|
19
|
-
title:
|
|
19
|
+
title: 'components/Buttons/IconsOnly',
|
|
20
20
|
argTypes: {
|
|
21
21
|
size: {
|
|
22
|
-
options: [
|
|
22
|
+
options: ['small', 'medium', 'large'],
|
|
23
23
|
control: {
|
|
24
|
-
type:
|
|
24
|
+
type: 'select'
|
|
25
25
|
},
|
|
26
|
-
description:
|
|
26
|
+
description: 'Size',
|
|
27
27
|
defaultValue: {
|
|
28
|
-
summary:
|
|
28
|
+
summary: 'large'
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
variant: {
|
|
32
|
-
options: [
|
|
32
|
+
options: ['primary', 'secondary', 'tertiary', 'success', 'neutral', 'destructive', 'active', 'enabled'],
|
|
33
33
|
control: {
|
|
34
|
-
type:
|
|
34
|
+
type: 'select'
|
|
35
35
|
},
|
|
36
|
-
description:
|
|
36
|
+
description: 'Variant',
|
|
37
37
|
defaultValue: {
|
|
38
|
-
summary:
|
|
38
|
+
summary: 'primary'
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
icon: {
|
|
42
|
-
description:
|
|
42
|
+
description: 'Material UI Icons'
|
|
43
43
|
},
|
|
44
44
|
color: {
|
|
45
|
-
description:
|
|
45
|
+
description: 'Color of the button',
|
|
46
46
|
defaultValue: {
|
|
47
|
-
summary:
|
|
47
|
+
summary: 'primary color'
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -59,7 +59,7 @@ var ButtonIcon = MainButtonIcon.bind({});
|
|
|
59
59
|
exports.ButtonIcon = ButtonIcon;
|
|
60
60
|
ButtonIcon.args = {
|
|
61
61
|
icon: /*#__PURE__*/_react.default.createElement(_icons.Favorite, null),
|
|
62
|
-
size:
|
|
63
|
-
variant:
|
|
62
|
+
size: 'large',
|
|
63
|
+
variant: 'primary',
|
|
64
64
|
color: undefined
|
|
65
65
|
};
|
|
@@ -13,10 +13,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _styles = require("@material-ui/core/styles");
|
|
15
15
|
|
|
16
|
-
var _colors = require("../colors");
|
|
17
|
-
|
|
18
16
|
var _Badge = _interopRequireDefault(require("@material-ui/core/Badge"));
|
|
19
17
|
|
|
18
|
+
var _colors = require("../colors");
|
|
19
|
+
|
|
20
20
|
var _typography = require("../typography");
|
|
21
21
|
|
|
22
22
|
var _excluded = ["icon", "badgeContent", "badgeColor", "size"];
|
|
@@ -34,17 +34,17 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
34
34
|
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); }
|
|
35
35
|
|
|
36
36
|
var size = function size(props) {
|
|
37
|
-
if (props.size ===
|
|
38
|
-
if (props.size ===
|
|
39
|
-
if (props.size ===
|
|
40
|
-
return
|
|
37
|
+
if (props.size === 'small') return '1.429rem';
|
|
38
|
+
if (props.size === 'medium') return '1.714rem';
|
|
39
|
+
if (props.size === 'large') return '2.286rem';
|
|
40
|
+
return '2.286rem';
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
var Badgesize = function Badgesize(props) {
|
|
44
|
-
if (props.size ===
|
|
45
|
-
if (props.size ===
|
|
46
|
-
if (props.size ===
|
|
47
|
-
return
|
|
44
|
+
if (props.size === 'small') return '0.857rem';
|
|
45
|
+
if (props.size === 'medium') return '0.857rem';
|
|
46
|
+
if (props.size === 'large') return '0.857rem';
|
|
47
|
+
return '0.857rem';
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
var AlertIcon = {
|
|
@@ -78,13 +78,13 @@ var BadgeIcon = function BadgeIcon() {
|
|
|
78
78
|
},
|
|
79
79
|
color: "".concat(_colors.BmPrimaryWhite),
|
|
80
80
|
fontFamily: "".concat(_typography.PoppinsMedium),
|
|
81
|
-
fontStyle:
|
|
81
|
+
fontStyle: 'normal',
|
|
82
82
|
fontWeight: 500,
|
|
83
|
-
fontSize:
|
|
84
|
-
display:
|
|
85
|
-
alignItems:
|
|
86
|
-
textAlign:
|
|
87
|
-
letterSpacing:
|
|
83
|
+
fontSize: '0.643rem',
|
|
84
|
+
display: 'flex',
|
|
85
|
+
alignItems: 'center',
|
|
86
|
+
textAlign: 'center',
|
|
87
|
+
letterSpacing: '-0.02em'
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
90
|
};
|
|
@@ -35,36 +35,36 @@ var BeemButtonIcon = _styledComponents.default.button(_templateObject || (_templ
|
|
|
35
35
|
color = _ref.color;
|
|
36
36
|
|
|
37
37
|
if (!disabled) {
|
|
38
|
-
if (variant ===
|
|
39
|
-
if (variant ===
|
|
40
|
-
if (variant ===
|
|
41
|
-
if (variant ===
|
|
42
|
-
if (variant ===
|
|
43
|
-
if (variant ===
|
|
44
|
-
if (variant ===
|
|
45
|
-
if (variant ===
|
|
46
|
-
return "".concat(color
|
|
47
|
-
} else {
|
|
48
|
-
return "".concat(_colors.BmGrey100);
|
|
38
|
+
if (variant === 'active') return "".concat(_colors.BmPrimaryBlue);
|
|
39
|
+
if (variant === 'enabled') return "".concat(_colors.BmGrey50);
|
|
40
|
+
if (variant === 'destructive') return "".concat(_colors.BmSecondaryRed);
|
|
41
|
+
if (variant === 'success') return "".concat(_colors.BmSecondaryDarkGreen);
|
|
42
|
+
if (variant === 'neutral') return "".concat(_colors.BmPrimaryWhite);
|
|
43
|
+
if (variant === 'primary') return "".concat(color || _colors.BmPrimaryBlue);
|
|
44
|
+
if (variant === 'secondary') return "".concat(_colors.BmPrimaryWhite);
|
|
45
|
+
if (variant === 'tertiary') return "".concat(_colors.BmPrimaryWhite);
|
|
46
|
+
return "".concat(color || _colors.BmPrimaryBlue);
|
|
49
47
|
}
|
|
48
|
+
|
|
49
|
+
return "".concat(_colors.BmGrey100);
|
|
50
50
|
}, function (_ref2) {
|
|
51
51
|
var variant = _ref2.variant,
|
|
52
52
|
disabled = _ref2.disabled,
|
|
53
53
|
color = _ref2.color;
|
|
54
54
|
|
|
55
55
|
if (!disabled) {
|
|
56
|
-
if (variant ===
|
|
57
|
-
if (variant ===
|
|
58
|
-
if (variant ===
|
|
59
|
-
if (variant ===
|
|
60
|
-
if (variant ===
|
|
61
|
-
if (variant ===
|
|
62
|
-
if (variant ===
|
|
63
|
-
if (variant ===
|
|
64
|
-
return "".concat(color
|
|
65
|
-
} else {
|
|
66
|
-
return "".concat(_colors.BmGrey100);
|
|
56
|
+
if (variant === 'active') return "".concat(_colors.BmPrimaryBlue);
|
|
57
|
+
if (variant === 'enabled') return "".concat(_colors.BmGrey50);
|
|
58
|
+
if (variant === 'destructive') return "".concat(_colors.BmSecondaryRed);
|
|
59
|
+
if (variant === 'success') return "".concat(_colors.BmSecondaryDarkGreen);
|
|
60
|
+
if (variant === 'neutral') return "".concat(_colors.BmGrey400);
|
|
61
|
+
if (variant === 'primary') return "".concat(color || _colors.BmPrimaryBlue);
|
|
62
|
+
if (variant === 'secondary') return "".concat(color || _colors.BmPrimaryBlue);
|
|
63
|
+
if (variant === 'tertiary') return "".concat(_colors.BmPrimaryWhite);
|
|
64
|
+
return "".concat(color || _colors.BmPrimaryBlue);
|
|
67
65
|
}
|
|
66
|
+
|
|
67
|
+
return "".concat(_colors.BmGrey100);
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
var BmIconWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 0.5rem !important;\n"])));
|
|
@@ -35,9 +35,9 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
35
35
|
|
|
36
36
|
var ButtonText = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n text-align: center;\n color: ", ";\n padding: 0rem;\n"])), function (_ref) {
|
|
37
37
|
var size = _ref.size;
|
|
38
|
-
if (size ===
|
|
39
|
-
if (size ===
|
|
40
|
-
if (size ===
|
|
38
|
+
if (size === 'large') return "".concat(_text.h3);
|
|
39
|
+
if (size === 'medium') return "".concat(_text.h3);
|
|
40
|
+
if (size === 'small') return "".concat(_text.h4);
|
|
41
41
|
return "".concat(_text.h3);
|
|
42
42
|
}, function (_ref2) {
|
|
43
43
|
var variant = _ref2.variant,
|
|
@@ -45,74 +45,74 @@ var ButtonText = _styledComponents.default.div(_templateObject || (_templateObje
|
|
|
45
45
|
color = _ref2.color;
|
|
46
46
|
|
|
47
47
|
if (!disabled) {
|
|
48
|
-
if (variant ===
|
|
49
|
-
if (variant ===
|
|
50
|
-
if (variant ===
|
|
51
|
-
if (variant ===
|
|
52
|
-
if (variant ===
|
|
53
|
-
if (variant ===
|
|
48
|
+
if (variant === 'primary') return "".concat(_colors.BmPrimaryWhite);
|
|
49
|
+
if (variant === 'secondary') return "".concat(color || _colors.BmPrimaryBlue);
|
|
50
|
+
if (variant === 'tertiary') return "".concat(color || _colors.BmPrimaryBlue);
|
|
51
|
+
if (variant === 'destructive') return "".concat(_colors.BmPrimaryWhite);
|
|
52
|
+
if (variant === 'success') return "".concat(_colors.BmPrimaryWhite);
|
|
53
|
+
if (variant === 'neutral') return "".concat(color || _colors.BmPrimaryBlue);
|
|
54
54
|
return "".concat(_colors.BmPrimaryWhite);
|
|
55
|
-
} else {
|
|
56
|
-
return "".concat(_colors.BmGrey400);
|
|
57
55
|
}
|
|
56
|
+
|
|
57
|
+
return "".concat(_colors.BmGrey400);
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
var BeemButton = _styledComponents.default.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n border-radius: 0.25rem;\n padding: ", ";\n background: ", ";\n\n border: 0.071rem solid\n ", ";\n\n &:hover {\n background: ", ";\n border: 0.071rem solid\n ", ";\n }\n &:active {\n background: ", ";\n box-shadow: ", ";\n border: 0.071rem solid\n ", ";\n }\n\n &:hover ", " {\n color: ", ";\n }\n &:active ", " {\n color: ", ";\n }\n"])), function (_ref3) {
|
|
61
61
|
var size = _ref3.size;
|
|
62
|
-
if (size ===
|
|
63
|
-
if (size ===
|
|
64
|
-
if (size ===
|
|
65
|
-
return
|
|
62
|
+
if (size === 'large') return '0.625rem 1.5rem';
|
|
63
|
+
if (size === 'medium') return '0.4375rem 1rem';
|
|
64
|
+
if (size === 'small') return '0.375rem 0.75rem';
|
|
65
|
+
return '0.625rem 1.5rem';
|
|
66
66
|
}, function (_ref4) {
|
|
67
67
|
var variant = _ref4.variant,
|
|
68
68
|
disabled = _ref4.disabled,
|
|
69
69
|
color = _ref4.color;
|
|
70
70
|
|
|
71
71
|
if (!disabled) {
|
|
72
|
-
if (variant ===
|
|
73
|
-
if (variant ===
|
|
74
|
-
if (variant ===
|
|
75
|
-
if (variant ===
|
|
76
|
-
if (variant ===
|
|
77
|
-
if (variant ===
|
|
78
|
-
return "".concat(color
|
|
79
|
-
} else {
|
|
80
|
-
if (variant === "primary") return "".concat(_colors.BmGrey100);
|
|
81
|
-
if (variant === "secondary") return "none";
|
|
82
|
-
if (variant === "tertiary") return "none";
|
|
83
|
-
return "".concat(_colors.BmGrey100);
|
|
72
|
+
if (variant === 'primary') return "".concat(color || _colors.BmPrimaryBlue);
|
|
73
|
+
if (variant === 'secondary') return 'none';
|
|
74
|
+
if (variant === 'tertiary') return 'none';
|
|
75
|
+
if (variant === 'destructive') return "".concat(_colors.BmSecondaryRed);
|
|
76
|
+
if (variant === 'success') return "".concat(_colors.BmSecondaryDarkGreen);
|
|
77
|
+
if (variant === 'neutral') return "".concat(_colors.BmPrimaryWhite);
|
|
78
|
+
return "".concat(color || _colors.BmPrimaryBlue);
|
|
84
79
|
}
|
|
80
|
+
|
|
81
|
+
if (variant === 'primary') return "".concat(_colors.BmGrey100);
|
|
82
|
+
if (variant === 'secondary') return 'none';
|
|
83
|
+
if (variant === 'tertiary') return 'none';
|
|
84
|
+
return "".concat(_colors.BmGrey100);
|
|
85
85
|
}, function (_ref5) {
|
|
86
86
|
var variant = _ref5.variant,
|
|
87
87
|
disabled = _ref5.disabled,
|
|
88
88
|
color = _ref5.color;
|
|
89
89
|
|
|
90
90
|
if (!disabled) {
|
|
91
|
-
if (variant ===
|
|
92
|
-
if (variant ===
|
|
93
|
-
if (variant ===
|
|
94
|
-
if (variant ===
|
|
95
|
-
if (variant ===
|
|
96
|
-
if (variant ===
|
|
97
|
-
return "".concat(color
|
|
98
|
-
} else {
|
|
99
|
-
if (variant === "primary") return "".concat(_colors.BmGrey100);
|
|
100
|
-
if (variant === "secondary") return "".concat(_colors.BmGrey400);
|
|
101
|
-
if (variant === "tertiary") return "transparent";
|
|
91
|
+
if (variant === 'primary') return "".concat(color || _colors.BmPrimaryBlue);
|
|
92
|
+
if (variant === 'secondary') return "".concat(color || _colors.BmPrimaryBlue);
|
|
93
|
+
if (variant === 'tertiary') return 'transparent';
|
|
94
|
+
if (variant === 'destructive') return "".concat(_colors.BmSecondaryRed);
|
|
95
|
+
if (variant === 'success') return "".concat(_colors.BmSecondaryDarkGreen);
|
|
96
|
+
if (variant === 'neutral') return "".concat(_colors.BmGrey400);
|
|
97
|
+
return "".concat(color || _colors.BmPrimaryBlue);
|
|
102
98
|
}
|
|
99
|
+
|
|
100
|
+
if (variant === 'primary') return "".concat(_colors.BmGrey100);
|
|
101
|
+
if (variant === 'secondary') return "".concat(_colors.BmGrey400);
|
|
102
|
+
if (variant === 'tertiary') return 'transparent';
|
|
103
103
|
}, function (_ref6) {
|
|
104
104
|
var variant = _ref6.variant,
|
|
105
105
|
disabled = _ref6.disabled,
|
|
106
106
|
color = _ref6.color;
|
|
107
107
|
|
|
108
108
|
if (!disabled) {
|
|
109
|
-
if (variant ===
|
|
110
|
-
if (variant ===
|
|
111
|
-
if (variant ===
|
|
112
|
-
if (variant ===
|
|
109
|
+
if (variant === 'primary') return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
|
|
110
|
+
if (variant === 'neutral') return "".concat(_colors.BmGrey50);
|
|
111
|
+
if (variant === 'success') return "".concat(_colors.BmSecondaryGreen8);
|
|
112
|
+
if (variant === 'destructive') return "".concat(_colors.BmSecondaryRed8);
|
|
113
113
|
|
|
114
114
|
if (!variant) {
|
|
115
|
-
return "".concat((0, _polished.darken)(0.1, color
|
|
115
|
+
return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
}, function (_ref7) {
|
|
@@ -121,23 +121,23 @@ var BeemButton = _styledComponents.default.button(_templateObject2 || (_template
|
|
|
121
121
|
color = _ref7.color;
|
|
122
122
|
|
|
123
123
|
if (!disabled) {
|
|
124
|
-
if (variant ===
|
|
124
|
+
if (variant === 'secondary') return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
return
|
|
127
|
+
return 'none';
|
|
128
128
|
}, function (_ref8) {
|
|
129
129
|
var variant = _ref8.variant,
|
|
130
130
|
disabled = _ref8.disabled,
|
|
131
131
|
color = _ref8.color;
|
|
132
132
|
|
|
133
133
|
if (!disabled) {
|
|
134
|
-
if (variant ===
|
|
135
|
-
if (variant ===
|
|
136
|
-
if (variant ===
|
|
137
|
-
if (variant ===
|
|
134
|
+
if (variant === 'primary') return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
|
|
135
|
+
if (variant === 'neutral') return "".concat(_colors.BmGrey100);
|
|
136
|
+
if (variant === 'success') return "".concat(_colors.BmSecondaryDarkGreen);
|
|
137
|
+
if (variant === 'destructive') return "".concat(_colors.BmSecondaryRed);
|
|
138
138
|
|
|
139
139
|
if (!variant) {
|
|
140
|
-
return "".concat((0, _polished.darken)(0.1, color
|
|
140
|
+
return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}, function (_ref9) {
|
|
@@ -145,10 +145,10 @@ var BeemButton = _styledComponents.default.button(_templateObject2 || (_template
|
|
|
145
145
|
disabled = _ref9.disabled;
|
|
146
146
|
|
|
147
147
|
if (!disabled) {
|
|
148
|
-
if (variant ===
|
|
148
|
+
if (variant === 'primary' || variant === 'success' || variant === 'destructive') return 'inset 0rem 0.125rem 0.25rem rgba(0, 0, 0, 0.25)';
|
|
149
149
|
|
|
150
150
|
if (!variant) {
|
|
151
|
-
return
|
|
151
|
+
return 'inset 0rem 0.125rem 0.25rem rgba(0, 0, 0, 0.25)';
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
}, function (_ref10) {
|
|
@@ -157,17 +157,17 @@ var BeemButton = _styledComponents.default.button(_templateObject2 || (_template
|
|
|
157
157
|
color = _ref10.color;
|
|
158
158
|
|
|
159
159
|
if (!disabled) {
|
|
160
|
-
if (variant ===
|
|
160
|
+
if (variant === 'secondary') return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
return
|
|
163
|
+
return 'none';
|
|
164
164
|
}, ButtonText, function (_ref11) {
|
|
165
165
|
var variant = _ref11.variant,
|
|
166
166
|
disabled = _ref11.disabled,
|
|
167
167
|
color = _ref11.color;
|
|
168
168
|
|
|
169
169
|
if (!disabled) {
|
|
170
|
-
if (variant ===
|
|
170
|
+
if (variant === 'secondary' || variant === 'tertiary') return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
|
|
171
171
|
}
|
|
172
172
|
}, ButtonText, function (_ref12) {
|
|
173
173
|
var variant = _ref12.variant,
|
|
@@ -175,7 +175,7 @@ var BeemButton = _styledComponents.default.button(_templateObject2 || (_template
|
|
|
175
175
|
color = _ref12.color;
|
|
176
176
|
|
|
177
177
|
if (!disabled) {
|
|
178
|
-
if (variant ===
|
|
178
|
+
if (variant === 'secondary' || variant === 'tertiary') return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
|
|
179
179
|
}
|
|
180
180
|
});
|
|
181
181
|
|
|
@@ -15,7 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
15
|
|
|
16
16
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
17
17
|
|
|
18
|
-
var BmCard = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n background: ", ";\n border: 0.071rem solid ", ";\n border-radius: 0.25rem;\n > * {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 0.5rem;\n }\n
|
|
18
|
+
var BmCard = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n background: ", ";\n border: 0.071rem solid ", ";\n border-radius: 0.25rem;\n > * {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 0.5rem;\n }\n"])), _colors.BmPrimaryWhite, _colors.BmGrey400);
|
|
19
19
|
|
|
20
20
|
BmCard.Header = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 0.5rem 0.5rem 0rem 0.5rem;\n"])));
|
|
21
21
|
BmCard.Body = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 0rem 0.5rem;\n"])));
|
|
@@ -7,10 +7,10 @@ exports.default = exports.Example = exports.BasicCardSample = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _cards = _interopRequireDefault(require("./cards"));
|
|
11
|
-
|
|
12
10
|
var _addonKnobs = require("@storybook/addon-knobs");
|
|
13
11
|
|
|
12
|
+
var _cards = _interopRequireDefault(require("./cards"));
|
|
13
|
+
|
|
14
14
|
require("../../../main.scss");
|
|
15
15
|
|
|
16
16
|
var _buttons = require("../Buttons/buttons");
|
|
@@ -22,10 +22,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
22
22
|
/* eslint-disable import/no-anonymous-default-export */
|
|
23
23
|
var _default = {
|
|
24
24
|
component: _cards.default,
|
|
25
|
-
title:
|
|
25
|
+
title: 'components/Card',
|
|
26
26
|
argTypes: {
|
|
27
27
|
children: {
|
|
28
|
-
description:
|
|
28
|
+
description: 'Accordion Title Text',
|
|
29
29
|
defaultValue: {
|
|
30
30
|
summary: undefined
|
|
31
31
|
}
|
|
@@ -36,8 +36,8 @@ exports.default = _default;
|
|
|
36
36
|
|
|
37
37
|
var BasicCardSample = function BasicCardSample() {
|
|
38
38
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_cards.default, {
|
|
39
|
-
disabled: (0, _addonKnobs.boolean)(
|
|
40
|
-
}, /*#__PURE__*/_react.default.createElement(_cards.default.Header, null, /*#__PURE__*/_react.default.createElement("h3", null, (0, _addonKnobs.text)(
|
|
39
|
+
disabled: (0, _addonKnobs.boolean)('disabled', false)
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_cards.default.Header, null, /*#__PURE__*/_react.default.createElement("h3", null, (0, _addonKnobs.text)('children', 'Card Header'))), /*#__PURE__*/_react.default.createElement(_cards.default.Body, null, "Card Body"), /*#__PURE__*/_react.default.createElement(_cards.default.Footer, null, "Card Footer")));
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
exports.BasicCardSample = BasicCardSample;
|