beem-component 1.5.7 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/.eslintrc +62 -0
  2. package/.prettierrc +6 -0
  3. package/babel.config.js +9 -10
  4. package/dist/components/Accordion/Accordion.js +7 -7
  5. package/dist/components/Accordion/Accordion.stories.js +28 -28
  6. package/dist/components/Avatars/avatars.js +22 -22
  7. package/dist/components/Avatars/avatars.stories.js +17 -17
  8. package/dist/components/BannerCard/bannerCard.stories.js +12 -12
  9. package/dist/components/BannerCard/bannerCards.js +14 -14
  10. package/dist/components/Buttons/Stories/basicbutton.stories.js +23 -23
  11. package/dist/components/Buttons/Stories/buttonAlertIcons.stories.js +16 -16
  12. package/dist/components/Buttons/Stories/buttonIconsOnly.stories.js +16 -16
  13. package/dist/components/Buttons/buttonAlertIcons.js +16 -16
  14. package/dist/components/Buttons/buttonIconsOnly.js +22 -22
  15. package/dist/components/Buttons/buttons.js +56 -56
  16. package/dist/components/Cards/cards.js +1 -1
  17. package/dist/components/Cards/cards.stories.js +6 -6
  18. package/dist/components/ChatComponents/ChatBody/chatBody.js +36 -36
  19. package/dist/components/ChatComponents/ChatBody/chatBody.stories.js +4 -4
  20. package/dist/components/ChatComponents/ChatHeader/chatHeader.js +1 -1
  21. package/dist/components/ChatComponents/ChatHeader/chatHeader.stories.js +1 -1
  22. package/dist/components/ChatComponents/ColorPicker/colorPicker.stories.js +7 -3
  23. package/dist/components/ChatComponents/ContactCards/contactCards.js +1 -2
  24. package/dist/components/ChatComponents/ContactCards/contactCards.stories.js +1 -1
  25. package/dist/components/ChatComponents/FormAccordion/FormAccordion.stories.js +9 -5
  26. package/dist/components/ChatComponents/InfoTab/infoTab.js +1 -1
  27. package/dist/components/ChatComponents/InfoTab/infoTab.stories.js +4 -4
  28. package/dist/components/ChatComponents/LabelAccordion/LabelAccordion.stories.js +12 -7
  29. package/dist/components/ChatComponents/NoteAccordion/NoteAccordion.stories.js +14 -12
  30. package/dist/components/Checkbox/checkboxToggler.js +64 -0
  31. package/dist/components/Checkbox/checkboxToggler.stories.js +92 -0
  32. package/dist/components/Lists/listBox.js +5 -5
  33. package/dist/components/Lists/listBox.stories.js +5 -5
  34. package/dist/components/Lists/listHeader.stories.js +11 -11
  35. package/dist/components/Lists/listheader.js +4 -4
  36. package/dist/components/Lists/rowLabels.js +2 -2
  37. package/dist/components/Lists/rowLabels.stories.js +16 -16
  38. package/dist/components/Loader/loader.js +7 -7
  39. package/dist/components/Loader/loader.stories.js +11 -11
  40. package/dist/components/MessageCounter/MessageCounter.stories.js +13 -13
  41. package/dist/components/MessageCounter/messageCounter.js +11 -11
  42. package/dist/components/Modals/modal.js +6 -8
  43. package/dist/components/Modals/modals.stories.js +6 -6
  44. package/dist/components/NoteBar/noteBar.js +14 -14
  45. package/dist/components/NoteBar/noteBar.stories.js +15 -15
  46. package/dist/components/PerformanceIndicator/performaceIndicator.stories.js +13 -13
  47. package/dist/components/PerformanceIndicator/performanceIndicator.js +14 -12
  48. package/dist/components/Pills/pills.js +10 -10
  49. package/dist/components/Pills/pills.stories.js +19 -21
  50. package/dist/components/ProfileIcon/ProfileIcon.js +14 -14
  51. package/dist/components/ProfileIcon/profileIcon.stories.js +16 -16
  52. package/dist/components/ProgressBar/progressbar.stories.js +6 -8
  53. package/dist/components/ProgressRing/progressRing.js +19 -19
  54. package/dist/components/ProgressRing/progressRing.stories.js +14 -14
  55. package/dist/components/RouteLink/link.js +3 -3
  56. package/dist/components/RouteLink/link.stories.js +1 -1
  57. package/dist/components/ScrollBar/scrollBar.js +9 -9
  58. package/dist/components/SuperFluid/SegmentCard/index.js +2 -2
  59. package/dist/components/Tabs/tabs.js +6 -6
  60. package/dist/components/Tabs/tabs.stories.js +17 -17
  61. package/dist/components/Tags/tags.js +21 -21
  62. package/dist/components/Tags/tags.stories.js +16 -16
  63. package/dist/components/breakpoints.js +3 -3
  64. package/dist/components/checkbox.js +4 -4
  65. package/dist/components/colors.js +32 -30
  66. package/dist/components/dropdownButton.js +35 -35
  67. package/dist/components/examples/InfoAccordion.js +0 -1
  68. package/dist/components/iconStyles.js +45 -45
  69. package/dist/components/index.js +32 -16
  70. package/dist/components/input.js +16 -16
  71. package/dist/components/typography.js +14 -14
  72. package/package.json +54 -31
  73. package/src/App.js +10 -7
  74. package/src/index.js +6 -8
  75. package/src/lib/components/Accordion/Accordion.js +32 -14
  76. package/src/lib/components/Accordion/Accordion.stories.js +31 -31
  77. package/src/lib/components/Avatars/avatars.js +33 -28
  78. package/src/lib/components/Avatars/avatars.stories.js +18 -18
  79. package/src/lib/components/BannerCard/bannerCard.stories.js +16 -17
  80. package/src/lib/components/BannerCard/bannerCards.js +18 -18
  81. package/src/lib/components/Buttons/Stories/basicbutton.stories.js +29 -29
  82. package/src/lib/components/Buttons/Stories/buttonAlertIcons.stories.js +17 -17
  83. package/src/lib/components/Buttons/Stories/buttonIconsOnly.stories.js +24 -24
  84. package/src/lib/components/Buttons/buttonAlertIcons.js +22 -25
  85. package/src/lib/components/Buttons/buttonIconsOnly.js +32 -28
  86. package/src/lib/components/Buttons/buttons.js +70 -73
  87. package/src/lib/components/Cards/cards.js +2 -3
  88. package/src/lib/components/Cards/cards.stories.js +10 -10
  89. package/src/lib/components/ChatComponents/ChatBody/chatBody.js +46 -45
  90. package/src/lib/components/ChatComponents/ChatBody/chatBody.stories.js +34 -28
  91. package/src/lib/components/ChatComponents/ChatBody/sessionDetails.js +2 -2
  92. package/src/lib/components/ChatComponents/ChatHeader/chatHeader.js +2 -2
  93. package/src/lib/components/ChatComponents/ChatHeader/chatHeader.stories.js +4 -4
  94. package/src/lib/components/ChatComponents/ColorPicker/colorPicker.js +2 -2
  95. package/src/lib/components/ChatComponents/ColorPicker/colorPicker.stories.js +4 -3
  96. package/src/lib/components/ChatComponents/ContactCards/contactCards.js +7 -5
  97. package/src/lib/components/ChatComponents/ContactCards/contactCards.stories.js +6 -6
  98. package/src/lib/components/ChatComponents/FormAccordion/FormAccordion.js +3 -3
  99. package/src/lib/components/ChatComponents/FormAccordion/FormAccordion.stories.js +4 -3
  100. package/src/lib/components/ChatComponents/InfoTab/infoTab.js +2 -2
  101. package/src/lib/components/ChatComponents/InfoTab/infoTab.stories.js +7 -7
  102. package/src/lib/components/ChatComponents/LabelAccordion/LabelAccordion.stories.js +5 -3
  103. package/src/lib/components/ChatComponents/NoteAccordion/NoteAccordion.js +2 -2
  104. package/src/lib/components/ChatComponents/NoteAccordion/NoteAccordion.stories.js +6 -5
  105. package/src/lib/components/Checkbox/checkboxToggler.js +89 -0
  106. package/src/lib/components/Checkbox/checkboxToggler.stories.js +48 -0
  107. package/src/lib/components/Lists/listBox.js +7 -7
  108. package/src/lib/components/Lists/listBox.stories.js +8 -11
  109. package/src/lib/components/Lists/listHeader.stories.js +13 -13
  110. package/src/lib/components/Lists/listheader.js +7 -7
  111. package/src/lib/components/Lists/rowLabels.js +6 -6
  112. package/src/lib/components/Lists/rowLabels.stories.js +18 -18
  113. package/src/lib/components/Loader/loader.js +13 -13
  114. package/src/lib/components/Loader/loader.stories.js +14 -14
  115. package/src/lib/components/MainWrapper/index.js +2 -2
  116. package/src/lib/components/MessageCounter/MessageCounter.stories.js +14 -14
  117. package/src/lib/components/MessageCounter/messageCounter.js +16 -16
  118. package/src/lib/components/Modals/modal.js +25 -23
  119. package/src/lib/components/Modals/modals.stories.js +9 -9
  120. package/src/lib/components/NoteBar/noteBar.js +20 -20
  121. package/src/lib/components/NoteBar/noteBar.stories.js +18 -17
  122. package/src/lib/components/PerformanceIndicator/performaceIndicator.stories.js +15 -15
  123. package/src/lib/components/PerformanceIndicator/performanceIndicator.js +11 -10
  124. package/src/lib/components/Pills/pills.js +16 -16
  125. package/src/lib/components/Pills/pills.stories.js +22 -23
  126. package/src/lib/components/ProfileIcon/ProfileIcon.js +50 -52
  127. package/src/lib/components/ProfileIcon/profileIcon.stories.js +22 -22
  128. package/src/lib/components/ProgressBar/progressbar.js +4 -5
  129. package/src/lib/components/ProgressBar/progressbar.stories.js +8 -9
  130. package/src/lib/components/ProgressRing/progressRing.js +25 -24
  131. package/src/lib/components/ProgressRing/progressRing.stories.js +18 -18
  132. package/src/lib/components/RouteLink/link.js +10 -8
  133. package/src/lib/components/RouteLink/link.stories.js +4 -4
  134. package/src/lib/components/ScrollBar/scrollBar.js +15 -14
  135. package/src/lib/components/SuperFluid/Content/index.js +2 -2
  136. package/src/lib/components/SuperFluid/ContentTitle.js/index.js +2 -2
  137. package/src/lib/components/SuperFluid/SegmentCard/index.js +9 -8
  138. package/src/lib/components/Tabs/tabs.js +11 -11
  139. package/src/lib/components/Tabs/tabs.stories.js +20 -20
  140. package/src/lib/components/Tags/tags.js +26 -24
  141. package/src/lib/components/Tags/tags.stories.js +19 -19
  142. package/src/lib/components/breakpoints.js +3 -3
  143. package/src/lib/components/checkbox.js +7 -6
  144. package/src/lib/components/colors.js +30 -28
  145. package/src/lib/components/dropdownButton.js +36 -39
  146. package/src/lib/components/examples/InfoAccordion.js +1 -1
  147. package/src/lib/components/globalStyles.js +2 -2
  148. package/src/lib/components/iconStyles.js +45 -48
  149. package/src/lib/components/index.js +48 -45
  150. package/src/lib/components/input.js +20 -20
  151. package/src/lib/components/text.js +1 -1
  152. package/src/lib/components/typography.js +14 -14
  153. package/src/reportWebVitals.js +1 -1
  154. package/dist/components/checkboxToggler.js +0 -50
  155. package/src/lib/components/checkboxToggler.js +0 -19
@@ -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: "components/Buttons/AlertIcons",
19
+ title: 'components/Buttons/AlertIcons',
20
20
  argTypes: {
21
21
  size: {
22
- options: ["small", "medium", "large"],
22
+ options: ['small', 'medium', 'large'],
23
23
  control: {
24
- type: "select"
24
+ type: 'select'
25
25
  },
26
- description: "Size",
26
+ description: 'Size',
27
27
  defaultValue: {
28
- summary: "large"
28
+ summary: 'large'
29
29
  }
30
30
  },
31
31
  icon: {
32
- description: "Material UI Icons"
32
+ description: 'Material UI Icons'
33
33
  },
34
34
  color: {
35
- description: "Color of the icon",
35
+ description: 'Color of the icon',
36
36
  defaultValue: {
37
- summary: "#575757"
37
+ summary: '#575757'
38
38
  }
39
39
  },
40
40
  badgeContent: {
41
- description: "Badge Content"
41
+ description: 'Badge Content'
42
42
  },
43
43
  badgeColor: {
44
- description: "Color of the badge content",
44
+ description: 'Color of the badge content',
45
45
  defaultValue: {
46
- summary: "#F62E48"
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: "red",
63
- size: "large",
64
- color: "black"
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: "components/Buttons/IconsOnly",
19
+ title: 'components/Buttons/IconsOnly',
20
20
  argTypes: {
21
21
  size: {
22
- options: ["small", "medium", "large"],
22
+ options: ['small', 'medium', 'large'],
23
23
  control: {
24
- type: "select"
24
+ type: 'select'
25
25
  },
26
- description: "Size",
26
+ description: 'Size',
27
27
  defaultValue: {
28
- summary: "large"
28
+ summary: 'large'
29
29
  }
30
30
  },
31
31
  variant: {
32
- options: ["primary", "secondary", "tertiary", "success", "neutral", "destructive", "active", "enabled"],
32
+ options: ['primary', 'secondary', 'tertiary', 'success', 'neutral', 'destructive', 'active', 'enabled'],
33
33
  control: {
34
- type: "select"
34
+ type: 'select'
35
35
  },
36
- description: "Variant",
36
+ description: 'Variant',
37
37
  defaultValue: {
38
- summary: "primary"
38
+ summary: 'primary'
39
39
  }
40
40
  },
41
41
  icon: {
42
- description: "Material UI Icons"
42
+ description: 'Material UI Icons'
43
43
  },
44
44
  color: {
45
- description: "Color of the button",
45
+ description: 'Color of the button',
46
46
  defaultValue: {
47
- summary: "primary color"
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: "large",
63
- variant: "primary",
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 === "small") return "1.429rem";
38
- if (props.size === "medium") return "1.714rem";
39
- if (props.size === "large") return "2.286rem";
40
- return "2.286rem";
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 === "small") return "0.857rem";
45
- if (props.size === "medium") return "0.857rem";
46
- if (props.size === "large") return "0.857rem";
47
- return "0.857rem";
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: "normal",
81
+ fontStyle: 'normal',
82
82
  fontWeight: 500,
83
- fontSize: "0.643rem",
84
- display: "flex",
85
- alignItems: "center",
86
- textAlign: "center",
87
- letterSpacing: "-0.02em"
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 === "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 ? color : _colors.BmPrimaryBlue);
44
- if (variant === "secondary") return "".concat(_colors.BmPrimaryWhite);
45
- if (variant === "tertiary") return "".concat(_colors.BmPrimaryWhite);
46
- return "".concat(color ? color : _colors.BmPrimaryBlue);
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 === "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 ? color : _colors.BmPrimaryBlue);
62
- if (variant === "secondary") return "".concat(color ? color : _colors.BmPrimaryBlue);
63
- if (variant === "tertiary") return "".concat(_colors.BmPrimaryWhite);
64
- return "".concat(color ? color : _colors.BmPrimaryBlue);
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 === "large") return "".concat(_text.h3);
39
- if (size === "medium") return "".concat(_text.h3);
40
- if (size === "small") return "".concat(_text.h4);
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 === "primary") return "".concat(_colors.BmPrimaryWhite);
49
- if (variant === "secondary") return "".concat(color ? color : _colors.BmPrimaryBlue);
50
- if (variant === "tertiary") return "".concat(color ? 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 ? color : _colors.BmPrimaryBlue);
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 === "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";
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 === "primary") return "".concat(color ? 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 ? color : _colors.BmPrimaryBlue);
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 === "primary") return "".concat(color ? color : _colors.BmPrimaryBlue);
92
- if (variant === "secondary") return "".concat(color ? 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 ? color : _colors.BmPrimaryBlue);
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 === "primary") return "".concat((0, _polished.darken)(0.1, color ? 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);
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 ? color : _colors.BmPrimaryBlue));
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 === "secondary") return "".concat((0, _polished.darken)(0.1, color ? color : _colors.BmPrimaryBlue));
124
+ if (variant === 'secondary') return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
125
125
  }
126
126
 
127
- return "none";
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 === "primary") return "".concat((0, _polished.darken)(0.1, color ? 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);
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 ? color : _colors.BmPrimaryBlue));
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 === "primary" || variant === "success" || variant === "destructive") return "inset 0rem 0.125rem 0.25rem rgba(0, 0, 0, 0.25)";
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 "inset 0rem 0.125rem 0.25rem rgba(0, 0, 0, 0.25)";
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 === "secondary") return "".concat((0, _polished.darken)(0.1, color ? color : _colors.BmPrimaryBlue));
160
+ if (variant === 'secondary') return "".concat((0, _polished.darken)(0.1, color || _colors.BmPrimaryBlue));
161
161
  }
162
162
 
163
- return "none";
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 === "secondary" || variant === "tertiary") return "".concat((0, _polished.darken)(0.1, color ? color : _colors.BmPrimaryBlue));
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 === "secondary" || variant === "tertiary") return "".concat((0, _polished.darken)(0.1, color ? color : _colors.BmPrimaryBlue));
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\n"])), _colors.BmPrimaryWhite, _colors.BmGrey400);
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: "components/Card",
25
+ title: 'components/Card',
26
26
  argTypes: {
27
27
  children: {
28
- description: "Accordion Title Text",
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)("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")));
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;