beem-component 1.0.2 → 1.0.6

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 (249) hide show
  1. package/.storybook/favicon.ico +0 -0
  2. package/.storybook/logo-blue.png +0 -0
  3. package/.storybook/main.js +18 -0
  4. package/.storybook/manager-head.html +14 -0
  5. package/.storybook/manager.js +6 -0
  6. package/.storybook/preview.js +10 -0
  7. package/.storybook/theme.js +10 -0
  8. package/Dockerfile +30 -0
  9. package/Jenkinsfile +73 -0
  10. package/build-storybook.log +14621 -0
  11. package/dist/assets/beem.jpeg +0 -0
  12. package/dist/assets/css/sidebar.css +12 -0
  13. package/dist/components/{Accordion.js → Accordion/Accordion.js} +13 -7
  14. package/dist/components/Accordion/Accordion.stories.js +86 -0
  15. package/dist/components/{avatars.js → Avatars/avatars.js} +32 -11
  16. package/dist/components/Avatars/avatars.stories.js +69 -0
  17. package/dist/components/Buttons/Stories/basicbutton.stories.js +67 -0
  18. package/dist/components/Buttons/Stories/buttonAlertIcons.stories.js +65 -0
  19. package/dist/components/Buttons/Stories/buttonIconsOnly.stories.js +65 -0
  20. package/dist/components/{buttonAlertIcons.js → Buttons/buttonAlertIcons.js} +17 -9
  21. package/dist/components/Buttons/buttonDropdown copy.js +158 -0
  22. package/dist/components/Buttons/buttonDropdown.js +30 -0
  23. package/dist/components/{buttonIconsOnly.js → Buttons/buttonIconsOnly.js} +14 -5
  24. package/dist/components/{buttons.js → Buttons/buttons.js} +12 -11
  25. package/dist/components/Cards/cards.js +24 -0
  26. package/dist/components/Cards/cards.stories.js +57 -0
  27. package/dist/components/ChatBody/chatBody.js +138 -0
  28. package/dist/components/ChatBody/chatBody.stories.js +65 -0
  29. package/dist/components/{Modals/noteModalBody.js → ChatHeader/chatHeader.js} +5 -5
  30. package/dist/components/ChatHeader/chatHeader.stories.js +29 -0
  31. package/dist/components/Chats/chat.js +1 -1
  32. package/dist/components/Chats/chatInput.js +1 -1
  33. package/dist/components/Chats/chatwrapper.js +1 -1
  34. package/dist/components/ContactCards/contactCards.js +34 -0
  35. package/dist/components/ContactCards/contactCards.stories.js +41 -0
  36. package/dist/components/InfoTab/infoTab.js +23 -0
  37. package/dist/components/InfoTab/infoTab.stories.js +49 -0
  38. package/dist/components/Lists/listBox.js +41 -0
  39. package/dist/components/Lists/listBox.stories.js +78 -0
  40. package/dist/components/Lists/listHeader.stories.js +58 -0
  41. package/dist/components/Lists/listheader.js +17 -12
  42. package/dist/components/Lists/rowLabels.js +34 -16
  43. package/dist/components/Lists/rowLabels.stories.js +85 -0
  44. package/dist/components/{loaders.js → Loader/loader.js} +13 -7
  45. package/dist/components/Loader/loader.stories.js +52 -0
  46. package/dist/components/{Reports/buttons.js → MainWrapper/index.js} +5 -3
  47. package/dist/components/MessageCounter/MessageCounter.stories.js +52 -0
  48. package/dist/components/MessageCounter/messageCounter.js +49 -0
  49. package/dist/components/Modals/modal copy.js +160 -0
  50. package/dist/components/Modals/modal.js +166 -0
  51. package/dist/components/Modals/modals.stories.js +117 -0
  52. package/dist/components/{infoNote.js → NoteBar/noteBar.js} +23 -19
  53. package/dist/components/NoteBar/noteBar.stories.js +66 -0
  54. package/dist/components/PerformanceIndicator/performaceIndicator.stories.js +66 -0
  55. package/dist/components/PerformanceIndicator/performanceIndicator.js +68 -0
  56. package/dist/components/Pills/pills.js +126 -0
  57. package/dist/components/Pills/pills.stories.js +110 -0
  58. package/dist/components/{progressbar.js → ProgressBar/progressbar.js} +8 -2
  59. package/dist/components/ProgressBar/progressbar.stories.js +45 -0
  60. package/dist/components/{Link.js → RouteLink/link.js} +8 -3
  61. package/dist/components/RouteLink/link.stories.js +29 -0
  62. package/dist/components/SuperFluid/ContentTitle.js/index.js +1 -1
  63. package/dist/components/SuperFluid/SegmentCard/index.js +1 -1
  64. package/dist/components/Tabs/tabs.js +85 -0
  65. package/dist/components/Tabs/tabs.stories.js +60 -0
  66. package/dist/components/breakpoints.js +18 -0
  67. package/dist/components/chatHeader.js +1 -1
  68. package/dist/components/checkboxToggler.js +2 -2
  69. package/dist/components/colors.js +5 -3
  70. package/dist/components/contacts.js +1 -1
  71. package/dist/components/dropdown.js +1 -1
  72. package/dist/components/dropdownButton.js +3 -3
  73. package/dist/components/dropdownItems.js +1 -1
  74. package/dist/components/example.js +47 -0
  75. package/dist/components/iconStyles.js +69 -119
  76. package/dist/components/index-copy.js +1285 -0
  77. package/dist/components/index.js +88 -1134
  78. package/dist/components/input.js +9 -3
  79. package/dist/components/logo.js +1 -1
  80. package/dist/components/navbar.js +1 -1
  81. package/dist/components/sidebar.js +4 -6
  82. package/dist/components/tabs.js +1 -1
  83. package/dist/components/text.js +1 -1
  84. package/dist/components/typography.js +1 -1
  85. package/nginx.conf +17 -0
  86. package/package.json +30 -11
  87. package/public/favicon.ico +0 -0
  88. package/public/index.html +1 -1
  89. package/src/App.js +85 -30
  90. package/src/examples/Navbar.js +1 -1
  91. package/src/lib/assets/beem.jpeg +0 -0
  92. package/src/lib/assets/css/sidebar.css +12 -0
  93. package/src/lib/components/{Accordion.js → Accordion/Accordion.js} +6 -5
  94. package/src/lib/components/Accordion/Accordion.stories.js +63 -0
  95. package/src/lib/components/{avatars.js → Avatars/avatars.js} +27 -9
  96. package/src/lib/components/Avatars/avatars.stories.js +45 -0
  97. package/src/lib/components/Buttons/Stories/basicbutton.stories.js +51 -0
  98. package/src/lib/components/Buttons/Stories/buttonAlertIcons.stories.js +42 -0
  99. package/src/lib/components/Buttons/Stories/buttonIconsOnly.stories.js +49 -0
  100. package/src/lib/components/{buttonAlertIcons.js → Buttons/buttonAlertIcons.js} +20 -9
  101. package/src/lib/components/Buttons/buttonDropdown copy.js +147 -0
  102. package/src/lib/components/Buttons/buttonDropdown.js +13 -0
  103. package/src/lib/components/{buttonIconsOnly.js → Buttons/buttonIconsOnly.js} +13 -3
  104. package/src/lib/components/{buttons.js → Buttons/buttons.js} +14 -14
  105. package/src/lib/components/Cards/cards.js +37 -0
  106. package/src/lib/components/Cards/cards.stories.js +50 -0
  107. package/src/lib/components/ChatBody/chatBody.js +145 -0
  108. package/src/lib/components/ChatBody/chatBody.stories.js +48 -0
  109. package/src/lib/components/ChatHeader/chatHeader.js +16 -0
  110. package/src/lib/components/ChatHeader/chatHeader.stories.js +19 -0
  111. package/src/lib/components/ContactCards/contactCards.js +58 -0
  112. package/src/lib/components/ContactCards/contactCards.stories.js +34 -0
  113. package/src/lib/components/InfoTab/infoTab.js +28 -0
  114. package/src/lib/components/InfoTab/infoTab.stories.js +47 -0
  115. package/src/lib/components/Lists/listBox.js +34 -0
  116. package/src/lib/components/Lists/listBox.stories.js +47 -0
  117. package/src/lib/components/Lists/listHeader.stories.js +36 -0
  118. package/src/lib/components/Lists/listheader.js +17 -11
  119. package/src/lib/components/Lists/rowLabels.js +47 -16
  120. package/src/lib/components/Lists/rowLabels.stories.js +59 -0
  121. package/src/lib/components/{loaders.js → Loader/loader.js} +18 -7
  122. package/src/lib/components/Loader/loader.stories.js +30 -0
  123. package/src/lib/components/MainWrapper/index.js +7 -0
  124. package/src/lib/components/MessageCounter/MessageCounter.stories.js +35 -0
  125. package/src/lib/components/MessageCounter/messageCounter.js +42 -0
  126. package/src/lib/components/Modals/modal copy.js +159 -0
  127. package/src/lib/components/Modals/modal.js +152 -0
  128. package/src/lib/components/Modals/modals.stories.js +82 -0
  129. package/src/lib/components/{infoNote.js → NoteBar/noteBar.js} +24 -25
  130. package/src/lib/components/NoteBar/noteBar.stories.js +40 -0
  131. package/src/lib/components/PerformanceIndicator/performaceIndicator.stories.js +40 -0
  132. package/src/lib/components/PerformanceIndicator/performanceIndicator.js +56 -0
  133. package/src/lib/components/Pills/pills.js +91 -0
  134. package/src/lib/components/Pills/pills.stories.js +74 -0
  135. package/src/lib/components/{progressbar.js → ProgressBar/progressbar.js} +8 -1
  136. package/src/lib/components/ProgressBar/progressbar.stories.js +26 -0
  137. package/src/lib/components/{Link.js → RouteLink/link.js} +5 -4
  138. package/src/lib/components/RouteLink/link.stories.js +21 -0
  139. package/src/lib/components/Tabs/tabs.js +84 -0
  140. package/src/lib/components/Tabs/tabs.stories.js +37 -0
  141. package/src/lib/components/breakpoints.js +11 -0
  142. package/src/lib/components/colors.js +2 -0
  143. package/src/lib/components/dropdownButton.js +2 -2
  144. package/src/lib/components/example.js +30 -0
  145. package/src/lib/components/iconStyles.js +44 -101
  146. package/src/lib/components/index-copy.js +468 -0
  147. package/src/lib/components/index.js +50 -446
  148. package/src/lib/components/input.js +8 -2
  149. package/src/lib/components/sidebar.js +4 -4
  150. package/storybook-static/0.00c62ec79c260aedbb98.manager.bundle.js +2 -0
  151. package/storybook-static/0.00c62ec79c260aedbb98.manager.bundle.js.LICENSE.txt +8 -0
  152. package/storybook-static/0.96c45dd8.iframe.bundle.js +1 -0
  153. package/storybook-static/1.dc6acfa9.iframe.bundle.js +3 -0
  154. package/storybook-static/1.dc6acfa9.iframe.bundle.js.LICENSE.txt +8 -0
  155. package/storybook-static/1.dc6acfa9.iframe.bundle.js.map +1 -0
  156. package/storybook-static/1.dc7dcdaec2def2f224fd.manager.bundle.js +1 -0
  157. package/storybook-static/2.24353ddc.iframe.bundle.js +1 -0
  158. package/storybook-static/3.8bb2173c.iframe.bundle.js +1 -0
  159. package/storybook-static/5.0779e3847d325dece216.manager.bundle.js +1 -0
  160. package/storybook-static/6.8bd405c2576206749a16.manager.bundle.js +2 -0
  161. package/storybook-static/6.8bd405c2576206749a16.manager.bundle.js.LICENSE.txt +12 -0
  162. package/storybook-static/7.9d4ba19cf58425e7ff0d.manager.bundle.js +1 -0
  163. package/storybook-static/7.f0cfc757.iframe.bundle.js +1 -0
  164. package/storybook-static/8.91de97de.iframe.bundle.js +3 -0
  165. package/storybook-static/8.91de97de.iframe.bundle.js.LICENSE.txt +12 -0
  166. package/storybook-static/8.91de97de.iframe.bundle.js.map +1 -0
  167. package/storybook-static/8.b4e9ec0ec7648e02a923.manager.bundle.js +1 -0
  168. package/storybook-static/9.40ec65d6.iframe.bundle.js +1 -0
  169. package/storybook-static/asset-manifest.json +30 -0
  170. package/storybook-static/favicon.ico +0 -0
  171. package/storybook-static/iframe.html +348 -0
  172. package/storybook-static/index.html +110 -0
  173. package/storybook-static/main.3c8d8027.iframe.bundle.js +1 -0
  174. package/storybook-static/main.3e5804fe56d1f580b088.manager.bundle.js +1 -0
  175. package/storybook-static/runtime~main.d3a18d6a.iframe.bundle.js +1 -0
  176. package/storybook-static/runtime~main.ff106120648356c6069d.manager.bundle.js +1 -0
  177. package/storybook-static/static/css/main.b44a190d.chunk.css +4 -0
  178. package/storybook-static/static/css/main.b44a190d.chunk.css.map +1 -0
  179. package/storybook-static/static/media/OpenSans-Regular.1b0809d5.ttf +0 -0
  180. package/storybook-static/static/media/PoppinsBold.1eae2d48.woff2 +0 -0
  181. package/storybook-static/static/media/PoppinsBold.53ff6749.eot +0 -0
  182. package/storybook-static/static/media/PoppinsBold.53ff971f.ttf +0 -0
  183. package/storybook-static/static/media/PoppinsBold.850fc4f3.svg +3066 -0
  184. package/storybook-static/static/media/PoppinsBold.b33c148b.woff +0 -0
  185. package/storybook-static/static/media/PoppinsMedium.0ba26f6c.woff +0 -0
  186. package/storybook-static/static/media/PoppinsMedium.49b46ace.eot +0 -0
  187. package/storybook-static/static/media/PoppinsMedium.57a99fa8.woff2 +0 -0
  188. package/storybook-static/static/media/PoppinsMedium.b7e43707.svg +3103 -0
  189. package/storybook-static/static/media/PoppinsMedium.c98dddbd.ttf +0 -0
  190. package/storybook-static/static/media/PoppinsRegular.13b9af9c.eot +0 -0
  191. package/storybook-static/static/media/PoppinsRegular.43e9b50d.svg +3138 -0
  192. package/storybook-static/static/media/PoppinsRegular.4a4d5420.woff +0 -0
  193. package/storybook-static/static/media/PoppinsRegular.9a7cc7ec.woff2 +0 -0
  194. package/storybook-static/static/media/PoppinsRegular.e1bc9021.ttf +0 -0
  195. package/storybook-static/static/media/PoppinsSemiBold.5692c77f.ttf +0 -0
  196. package/storybook-static/static/media/PoppinsSemiBold.80138c67.woff +0 -0
  197. package/storybook-static/static/media/PoppinsSemiBold.c442695a.eot +0 -0
  198. package/storybook-static/static/media/PoppinsSemiBold.e1948d56.svg +3098 -0
  199. package/storybook-static/static/media/PoppinsSemiBold.f27050e2.woff2 +0 -0
  200. package/storybook-static/static/media/logo-blue.bfc5ba6d.png +0 -0
  201. package/storybook-static/vendors~main.1750028c2d68e574fb1d.manager.bundle.js +2 -0
  202. package/storybook-static/vendors~main.1750028c2d68e574fb1d.manager.bundle.js.LICENSE.txt +104 -0
  203. package/storybook-static/vendors~main.7fe78cc2.iframe.bundle.js +3 -0
  204. package/storybook-static/vendors~main.7fe78cc2.iframe.bundle.js.LICENSE.txt +122 -0
  205. package/storybook-static/vendors~main.7fe78cc2.iframe.bundle.js.map +1 -0
  206. package/dist/assets/content_copy_black.svg +0 -1
  207. package/dist/assets/profile-pic.jpg +0 -0
  208. package/dist/components/Accordicon.js +0 -51
  209. package/dist/components/CustomerInfo/customerInfo.js +0 -89
  210. package/dist/components/CustomerInfo/customerInfoBar.js +0 -24
  211. package/dist/components/CustomerInfo/infoAccordion.js +0 -78
  212. package/dist/components/CustomerInfo/labelsInfo.js +0 -37
  213. package/dist/components/CustomerInfo/notesInfo.js +0 -39
  214. package/dist/components/Modals/modalBody.js +0 -61
  215. package/dist/components/Modals/noteModalFooter.js +0 -24
  216. package/dist/components/Modals/noteModalHeader.js +0 -93
  217. package/dist/components/Reports/cards.js +0 -62
  218. package/dist/components/Reports/charts.js +0 -70
  219. package/dist/components/Reports/infoHeader.js +0 -65
  220. package/dist/components/Reports/reportsBody.js +0 -28
  221. package/dist/components/Reports/title.js +0 -28
  222. package/dist/components/performanceIndicator.js +0 -41
  223. package/dist/components/pills.js +0 -73
  224. package/src/App1.js +0 -229
  225. package/src/CHAT.js +0 -170
  226. package/src/Complete.js +0 -48
  227. package/src/CreateSegments.js +0 -48
  228. package/src/FileUploadSFL.js +0 -110
  229. package/src/examples/CustomerInfo.js +0 -248
  230. package/src/lib/assets/content_copy_black.svg +0 -1
  231. package/src/lib/assets/profile-pic.jpg +0 -0
  232. package/src/lib/components/Accordicon.js +0 -43
  233. package/src/lib/components/CustomerInfo/customerInfo.js +0 -91
  234. package/src/lib/components/CustomerInfo/customerInfoBar.js +0 -23
  235. package/src/lib/components/CustomerInfo/infoAccordion.js +0 -96
  236. package/src/lib/components/CustomerInfo/labelsInfo.js +0 -37
  237. package/src/lib/components/CustomerInfo/notesInfo.js +0 -61
  238. package/src/lib/components/Modals/modalBody.js +0 -66
  239. package/src/lib/components/Modals/noteModalBody.js +0 -10
  240. package/src/lib/components/Modals/noteModalFooter.js +0 -16
  241. package/src/lib/components/Modals/noteModalHeader.js +0 -103
  242. package/src/lib/components/Reports/buttons.js +0 -5
  243. package/src/lib/components/Reports/cards.js +0 -78
  244. package/src/lib/components/Reports/charts.js +0 -79
  245. package/src/lib/components/Reports/infoHeader.js +0 -63
  246. package/src/lib/components/Reports/reportsBody.js +0 -29
  247. package/src/lib/components/Reports/title.js +0 -19
  248. package/src/lib/components/performanceIndicator.js +0 -27
  249. package/src/lib/components/pills.js +0 -65
@@ -0,0 +1,42 @@
1
+ /* eslint-disable import/no-anonymous-default-export */
2
+ import React from "react";
3
+ import { BmAlertIcon } from "../buttonAlertIcons";
4
+ import { AssignmentLateOutlined } from "@material-ui/icons";
5
+
6
+ export default {
7
+ component: BmAlertIcon,
8
+ title: "components/Buttons/AlertIcons",
9
+ argTypes: {
10
+ size: {
11
+ options: ["small", "medium", "large"],
12
+ control: { type: "select" },
13
+ description: "Size",
14
+ defaultValue: { summary: "large" },
15
+ },
16
+ icon: {
17
+ description: "Material UI Icons",
18
+ },
19
+ color: {
20
+ description: "Color of the icon",
21
+ defaultValue: { summary: "#575757" },
22
+ },
23
+ badgeContent: {
24
+ description: "Badge Content",
25
+ },
26
+ badgeColor: {
27
+ description: "Color of the badge content",
28
+ defaultValue: { summary: "#F62E48" },
29
+ },
30
+ },
31
+ };
32
+
33
+ const MainButtonAlertIcon = (args) => <BmAlertIcon {...args} />;
34
+
35
+ export const ButtonAlertIcon = MainButtonAlertIcon.bind({});
36
+ ButtonAlertIcon.args = {
37
+ icon: <AssignmentLateOutlined />,
38
+ badgeContent: 4,
39
+ badgeColor: "red",
40
+ size: "large",
41
+ color: "black",
42
+ };
@@ -0,0 +1,49 @@
1
+ /* eslint-disable import/no-anonymous-default-export */
2
+ import React from "react";
3
+ import { BmBtnIcon } from "../buttonIconsOnly";
4
+ import { Favorite } from "@material-ui/icons";
5
+
6
+ export default {
7
+ component: BmBtnIcon,
8
+ title: "components/Buttons/IconsOnly",
9
+ argTypes: {
10
+ size: {
11
+ options: ["small", "medium", "large"],
12
+ control: { type: "select" },
13
+ description: "Size",
14
+ defaultValue: { summary: "large" },
15
+ },
16
+ variant: {
17
+ options: [
18
+ "primary",
19
+ "secondary",
20
+ "tertiary",
21
+ "success",
22
+ "neutral",
23
+ "destructive",
24
+ "active",
25
+ "enabled",
26
+ ],
27
+ control: { type: "select" },
28
+ description: "Variant",
29
+ defaultValue: { summary: "primary" },
30
+ },
31
+ icon: {
32
+ description: "Material UI Icons",
33
+ },
34
+ color: {
35
+ description: "Color of the button",
36
+ defaultValue: { summary: "primary color" },
37
+ },
38
+ },
39
+ };
40
+
41
+ const MainButtonIcon = (args) => <BmBtnIcon {...args} />;
42
+
43
+ export const ButtonIcon = MainButtonIcon.bind({});
44
+ ButtonIcon.args = {
45
+ icon: <Favorite />,
46
+ size: "large",
47
+ variant: "primary",
48
+ color: undefined,
49
+ };
@@ -1,8 +1,14 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  import styled from "styled-components";
3
+ import PropTypes from "prop-types";
3
4
  import { withStyles } from "@material-ui/core/styles";
4
- import { BmSecondaryGrey, BmSecondaryRed, BmPrimaryWhite } from "./colors";
5
+ import {
6
+ BmSecondaryGrey,
7
+ BmSecondaryRed,
8
+ BmPrimaryWhite,
9
+ } from "../colors";
5
10
  import Badge from "@material-ui/core/Badge";
11
+ import { PoppinsMedium } from "../typography";
6
12
 
7
13
  const size = (props) => {
8
14
  if (props.size === "small") return "1.429rem";
@@ -22,22 +28,21 @@ const AlertIcon = {
22
28
  root: {
23
29
  height: (props) => size(props),
24
30
  width: (props) => size(props),
25
- fill: (props) => props.color ||`${BmSecondaryGrey}`
31
+ fill: (props) => props.color || `${BmSecondaryGrey}`,
26
32
  },
27
33
  };
28
34
 
29
- const BadgeIcon = (props) => ({
35
+ const BadgeIcon = () => ({
30
36
  badge: {
31
37
  height: (props) => Badgesize(props),
32
38
  width: (props) => Badgesize(props),
33
39
  minWidth: (props) => Badgesize(props),
34
- background:(props) => props.badgeColor || `${BmSecondaryRed}`,
40
+ background: (props) => props.badgeColor || `${BmSecondaryRed}`,
35
41
  color: `${BmPrimaryWhite}`,
36
- fontFamily: "Poppins",
42
+ fontFamily: `${PoppinsMedium}`,
37
43
  fontStyle: "normal",
38
44
  fontWeight: 500,
39
45
  fontSize: "0.643rem",
40
- lineHeight: "0.929rem",
41
46
  display: "flex",
42
47
  alignItems: "center",
43
48
  textAlign: "center",
@@ -69,8 +74,6 @@ export const BmBtnIconWrapper = styled.button`
69
74
  justify-content: center;
70
75
  align-items: center;
71
76
  padding: 0.536rem;
72
- height: 3.357rem;
73
- ${"" /* added */}
74
77
  border: none;
75
78
  background: none;
76
79
  `;
@@ -89,3 +92,11 @@ export const BmAlertIcon = (props) => {
89
92
  </BmBtnIconWrapper>
90
93
  );
91
94
  };
95
+
96
+ BmAlertIcon.propTypes = {
97
+ size: PropTypes.string,
98
+ badgeColor: PropTypes.string,
99
+ badgeContent: PropTypes.string,
100
+ icon: PropTypes.node,
101
+ color: PropTypes.string,
102
+ };
@@ -0,0 +1,147 @@
1
+ import React from "react";
2
+ import { KeyboardArrowDown } from "@material-ui/icons";
3
+ import styled from "styled-components";
4
+ import { BmBtnIcon } from "./buttonIconsOnly";
5
+ import { BmButton } from "./buttons";
6
+ import {
7
+ BmPrimaryWhite,
8
+ BmPrimaryBlue,
9
+ BmSecondaryRed,
10
+ BmSecondaryDarkGreen,
11
+ BmGrey400,
12
+ BmGrey100,
13
+ BmSecondaryCyan,
14
+ BmGrey50,
15
+ BmSecondaryGreen8,
16
+ BmSecondaryRed8,
17
+ } from "../colors";
18
+
19
+ const ButtonDropdownWrapper = styled.div`
20
+ display: flex;
21
+ &:hover {
22
+ background: ${({ variant, disabled }) => {
23
+ if (!disabled) {
24
+ if (variant === "primary") return `${BmSecondaryCyan}`;
25
+ if (variant === "neutral") return `${BmGrey50}`;
26
+ if (variant === "success") return `${BmSecondaryGreen8}`;
27
+ if (variant === "destructive") return `${BmSecondaryRed8}`;
28
+ if (!variant) {
29
+ return `${BmSecondaryCyan}`;
30
+ }
31
+ }
32
+ }};
33
+ border: 0.071rem solid
34
+ ${({ variant, disabled }) => {
35
+ if (!disabled) {
36
+ if (variant === "secondary") return `${BmSecondaryCyan}`;
37
+ }
38
+ return "none";
39
+ }};
40
+ }
41
+ &:active {
42
+ background: ${({ variant, disabled }) => {
43
+ if (!disabled) {
44
+ if (variant === "primary") return `${BmPrimaryBlue}`;
45
+ if (variant === "neutral") return `${BmGrey100}`;
46
+ if (variant === "success") return `${BmSecondaryDarkGreen}`;
47
+ if (variant === "destructive") return `${BmSecondaryRed}`;
48
+ if (!variant) {
49
+ return `${BmPrimaryBlue}`;
50
+ }
51
+ }
52
+ }};
53
+ box-shadow: ${({ variant, disabled }) => {
54
+ if (!disabled) {
55
+ if (
56
+ variant === "primary" ||
57
+ variant === "success" ||
58
+ variant === "destructive"
59
+ )
60
+ return "inset 0rem 0.125rem 0.25rem rgba(0, 0, 0, 0.25)";
61
+ if (!variant) {
62
+ return "inset 0rem 0.125rem 0.25rem rgba(0, 0, 0, 0.25)";
63
+ }
64
+ }
65
+ }};
66
+ border: 0.071rem solid
67
+ ${({ variant, disabled }) => {
68
+ if (!disabled) {
69
+ if (variant === "secondary") return `${BmPrimaryBlue}`;
70
+ }
71
+ return "none";
72
+ }};
73
+ }
74
+ `;
75
+
76
+ const Dropdown = styled(BmBtnIcon)`
77
+ background: ${({ variant, disabled }) => {
78
+ if (!disabled) {
79
+ if (variant === "primary") return `${BmPrimaryBlue}`;
80
+ if (variant === "secondary") return "none";
81
+ if (variant === "tertiary") return "none";
82
+ if (variant === "destructive") return `${BmSecondaryRed}`;
83
+ if (variant === "success") return `${BmSecondaryDarkGreen}`;
84
+ if (variant === "neutral") return `${BmPrimaryWhite}`;
85
+ return `${BmPrimaryBlue}`;
86
+ } else {
87
+ if (variant === "primary") return `${BmGrey100}`;
88
+ if (variant === "secondary") return "none";
89
+ if (variant === "tertiary") return "none";
90
+ return `${BmGrey100}`;
91
+ }
92
+ }};
93
+ border: 0.0625rem solid
94
+ ${({ variant, disabled }) => {
95
+ if (!disabled) {
96
+ if (variant === "primary") return `${BmPrimaryBlue}`;
97
+ if (variant === "secondary") return `${BmPrimaryBlue}`;
98
+ if (variant === "tertiary") return "transparent";
99
+ if (variant === "destructive") return `${BmSecondaryRed}`;
100
+ if (variant === "success") return `${BmSecondaryDarkGreen}`;
101
+ if (variant === "neutral") return `${BmGrey400}`;
102
+ return `${BmPrimaryBlue}`;
103
+ } else {
104
+ if (variant === "primary") return `${BmGrey100}`;
105
+ if (variant === "secondary") return `${BmGrey400}`;
106
+ if (variant === "tertiary") return "transparent";
107
+ }
108
+ }};
109
+
110
+ border-left: 0.071rem solid
111
+ ${({ variant, disabled }) => {
112
+ if (!disabled) {
113
+ if (variant === "primary") return `${BmPrimaryWhite}`;
114
+ if (variant === "secondary") return `${BmPrimaryBlue}`;
115
+ if (variant === "tertiary") return "transparent";
116
+ if (variant === "destructive") return `${BmSecondaryRed}`;
117
+ if (variant === "success") return `${BmSecondaryDarkGreen}`;
118
+ if (variant === "neutral") return `${BmGrey400}`;
119
+ return `${BmPrimaryWhite}`;
120
+ } else {
121
+ if (variant === "primary") return `${BmGrey400}`;
122
+ if (variant === "secondary") return `${BmGrey400}`;
123
+ if (variant === "tertiary") return "transparent";
124
+ }
125
+ }};
126
+ border-top-left-radius: 0.071rem;
127
+ border-bottom-left-radius: 0.071rem;
128
+ padding: 0rem;
129
+ `;
130
+
131
+ export const Button = styled(BmButton)`
132
+ border-top-right-radius: 0.071rem;
133
+ border-bottom-right-radius: 0.071rem;
134
+ border-radius: none;
135
+ border-right: none;
136
+ `;
137
+
138
+ export const BmButtonDropDown = ({ children, ...rest }) => {
139
+ return (
140
+ <>
141
+ <ButtonDropdownWrapper {...rest}>
142
+ <Button {...rest}>{children}</Button>
143
+ <Dropdown {...rest} icon={<KeyboardArrowDown />} />
144
+ </ButtonDropdownWrapper>
145
+ </>
146
+ );
147
+ };
@@ -0,0 +1,13 @@
1
+ import { Home, KeyboardArrowDown } from "@material-ui/icons";
2
+ import styled from "styled-components";
3
+ import { BmBtnIcon } from "./buttonIconsOnly";
4
+ import { BmButton } from "./buttons";
5
+
6
+ export const BmButtonDropdown = ({ children }) => {
7
+ return (
8
+ <div style={{ display: "flex", flexDirection: "row" }}>
9
+ <BmButton>{children}</BmButton>
10
+ <BmButton leadingIcon={<KeyboardArrowDown />}></BmButton>
11
+ </div>
12
+ );
13
+ };
@@ -1,5 +1,7 @@
1
1
  import React from "react";
2
2
  import styled from "styled-components";
3
+ import PropTypes from "prop-types";
4
+
3
5
  import {
4
6
  BmPrimaryWhite,
5
7
  BmPrimaryBlue,
@@ -8,8 +10,8 @@ import {
8
10
  BmSecondaryRed,
9
11
  BmSecondaryDarkGreen,
10
12
  BmGrey400,
11
- } from "./colors";
12
- import { BmButtonIcon } from "./iconStyles";
13
+ } from "../colors";
14
+ import { BmButtonIcon } from "../iconStyles";
13
15
 
14
16
  const BeemButtonIcon = styled.button`
15
17
  display: flex;
@@ -31,7 +33,7 @@ const BeemButtonIcon = styled.button`
31
33
  return `${BmGrey100}`;
32
34
  }
33
35
  }};
34
- border: 0.0625rem solid
36
+ border: 0.071rem solid
35
37
  ${({ variant, disabled }) => {
36
38
  if (!disabled) {
37
39
  if (variant === "active") return `${BmPrimaryBlue}`;
@@ -75,3 +77,11 @@ export const BmBtnIcon = (props) => {
75
77
  </BeemButtonIcon>
76
78
  );
77
79
  };
80
+
81
+ BmBtnIcon.propTypes = {
82
+ size: PropTypes.string,
83
+ variant: PropTypes.string,
84
+ icon: PropTypes.node,
85
+ color: PropTypes.string,
86
+ disabled: PropTypes.bool,
87
+ };
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import styled from "styled-components";
3
3
  import PropTypes from "prop-types";
4
-
4
+ //TODO: Button Links Pending
5
5
  import {
6
6
  BmPrimaryWhite,
7
7
  BmPrimaryBlue,
@@ -13,9 +13,9 @@ import {
13
13
  BmSecondaryCyan,
14
14
  BmSecondaryGreen8,
15
15
  BmSecondaryRed8,
16
- } from "./colors";
17
- import { BmButtonIcon } from "./iconStyles";
18
- import { h3, h4 } from "./text";
16
+ } from "../colors";
17
+ import { BmButtonIcon } from "../iconStyles";
18
+ import { h3, h4 } from "../text";
19
19
 
20
20
  const ButtonText = styled.div`
21
21
  ${({ size }) => {
@@ -71,7 +71,7 @@ const BeemButton = styled.button`
71
71
  }
72
72
  }};
73
73
 
74
- border: 0.0625rem solid
74
+ border: 0.071rem solid
75
75
  ${({ variant, disabled }) => {
76
76
  if (!disabled) {
77
77
  if (variant === "primary") return `${BmPrimaryBlue}`;
@@ -100,7 +100,7 @@ const BeemButton = styled.button`
100
100
  }
101
101
  }
102
102
  }};
103
- border: 0.0625rem solid
103
+ border: 0.071rem solid
104
104
  ${({ variant, disabled }) => {
105
105
  if (!disabled) {
106
106
  if (variant === "secondary") return `${BmSecondaryCyan}`;
@@ -133,7 +133,7 @@ const BeemButton = styled.button`
133
133
  }
134
134
  }
135
135
  }};
136
- border: 0.0625rem solid
136
+ border: 0.071rem solid
137
137
  ${({ variant, disabled }) => {
138
138
  if (!disabled) {
139
139
  if (variant === "secondary") return `${BmPrimaryBlue}`;
@@ -161,11 +161,11 @@ const BeemButton = styled.button`
161
161
  `;
162
162
 
163
163
  export const BmLeftIcon = styled(BmButtonIcon)`
164
- padding-right: 0.5rem;
164
+ margin-right: 0.5rem;
165
165
  `;
166
166
 
167
167
  export const BmRightIcon = styled(BmButtonIcon)`
168
- padding-left: 0.5rem;
168
+ margin-left: 0.5rem;
169
169
  `;
170
170
  export const BmButton = (props) => {
171
171
  const {
@@ -219,9 +219,9 @@ export const BmButton = (props) => {
219
219
 
220
220
  BmButton.propTypes = {
221
221
  size: PropTypes.string,
222
- variant: PropTypes.string.isRequired,
223
- };
224
-
225
- BmButton.defaultProps = {
226
- onClick: undefined,
222
+ variant: PropTypes.string,
223
+ leadingIcon: PropTypes.node,
224
+ trailingIcon: PropTypes.node,
225
+ color: PropTypes.string,
226
+ disabled: PropTypes.bool,
227
227
  };
@@ -0,0 +1,37 @@
1
+ import styled from "styled-components";
2
+ import { BmGrey400, BmPrimaryWhite } from "../colors";
3
+
4
+ const BmCard = styled.div`
5
+ display: flex;
6
+ flex-direction: column;
7
+ background: ${BmPrimaryWhite};
8
+ border: 0.071rem solid ${BmGrey400};
9
+ border-radius: 0.21875rem;
10
+ `;
11
+
12
+ BmCard.Header = styled.div`
13
+ display: flex;
14
+ flex-direction: row;
15
+ justify-content: space-between;
16
+ padding: 1rem 1rem 0rem 1rem;
17
+ `;
18
+
19
+ BmCard.Body = styled.div`
20
+ display: flex;
21
+ flex-direction: row;
22
+ justify-content: space-between;
23
+ margin-top: 0.5rem;
24
+ margin-bottom: 1rem;
25
+ padding: 0rem 1rem;
26
+ `;
27
+
28
+ BmCard.Footer = styled.div`
29
+ display: flex;
30
+ flex-direction: row;
31
+ justify-content: space-between;
32
+ border-top: 0.071rem solid ${BmGrey400};
33
+ padding: 1rem;
34
+ align-items: center;
35
+ `;
36
+
37
+ export default BmCard;
@@ -0,0 +1,50 @@
1
+ /* eslint-disable import/no-anonymous-default-export */
2
+ import React from "react";
3
+ import BmCard from "./cards";
4
+ import { text, boolean } from "@storybook/addon-knobs";
5
+ import "../../../main.scss";
6
+ import { BmButton } from "../Buttons/buttons";
7
+ import Image from "../../assets/beem.jpeg";
8
+
9
+ export default {
10
+ component: BmCard,
11
+ title: "components/Card",
12
+ argTypes: {
13
+ children: {
14
+ description: "Accordion Title Text",
15
+ defaultValue: { summary: undefined },
16
+ },
17
+ },
18
+ };
19
+ export const BasicCardSample = () => {
20
+ return (
21
+ <div>
22
+ <BmCard disabled={boolean("disabled", false)}>
23
+ <BmCard.Header>
24
+ <h3>{text("children", "Card Header")}</h3>
25
+ </BmCard.Header>
26
+ <BmCard.Body>Card Body</BmCard.Body>
27
+ <BmCard.Footer>Card Footer</BmCard.Footer>
28
+ </BmCard>
29
+ </div>
30
+ );
31
+ };
32
+
33
+ export const Example = () => {
34
+ return (
35
+ <BmCard>
36
+ <BmCard.Header>
37
+ <h3>Overview</h3>
38
+ </BmCard.Header>
39
+ <BmCard.Body>
40
+ <img src={Image} alt="Imagebody" />
41
+ </BmCard.Body>
42
+ <BmCard.Footer>
43
+ <BmButton size="small">Send</BmButton>
44
+ <BmButton variant="tertiary" size="small">
45
+ View
46
+ </BmButton>
47
+ </BmCard.Footer>
48
+ </BmCard>
49
+ );
50
+ };
@@ -0,0 +1,145 @@
1
+ import { Done, DoneAll } from "@material-ui/icons";
2
+ import React from "react";
3
+ import styled from "styled-components";
4
+ import BmAvatar from "../Avatars/avatars";
5
+ import { BmIcons } from "../iconStyles";
6
+ import {
7
+ BmGrey400,
8
+ BmGrey50,
9
+ BmPrimaryWhite,
10
+ BmPrimaryBlue,
11
+ BmPrimaryBlack,
12
+ BmSecondaryDarkGreen,
13
+ } from "../colors";
14
+
15
+ const BmChat = styled.div`
16
+ display: flex;
17
+ flex-direction: column;
18
+ ${"" /* border: 0.071rem solid ${BmGrey400}; */}
19
+ `;
20
+
21
+ BmChat.Body = styled.div`
22
+ display: flex;
23
+ flex-direction: column;
24
+ padding: 0rem 1.5rem;
25
+ `;
26
+
27
+ const Details = styled.div`
28
+ display: flex;
29
+ ${"" /* align-items: center; */}
30
+ justify-content: ${({ state }) => {
31
+ if (state === "inbound") {
32
+ return "flex-start";
33
+ }
34
+ if (state === "outbound") {
35
+ return "flex-end";
36
+ }
37
+ return "row";
38
+ }};
39
+ > *:not(:last-child) {
40
+ margin-right: 1rem;
41
+ }
42
+ overflow-wrap: break-word !important;
43
+ word-wrap: break-word !important;
44
+ margin: 0rem;
45
+ `;
46
+
47
+ const MessageDetails = styled.div`
48
+ display: flex;
49
+ flex-direction: column;
50
+ max-width: 50%;
51
+ > * {
52
+ margin-top: 0.5rem;
53
+ }
54
+ `;
55
+
56
+ const Messages = styled.div`
57
+ display: flex;
58
+ flex-direction: row;
59
+ align-items: center;
60
+ padding: 1.143rem;
61
+ background: ${({ state }) => {
62
+ if (state) {
63
+ if (state === "inbound") return `${BmPrimaryWhite}`;
64
+ if (state === "outbound") return `${BmPrimaryBlue}`;
65
+ }
66
+ return `${BmPrimaryWhite}`;
67
+ }};
68
+ color: ${({ state }) => {
69
+ if (state) {
70
+ if (state === "inbound") return `${BmPrimaryBlack}`;
71
+ if (state === "outbound") return `${BmPrimaryWhite}`;
72
+ }
73
+ return `${BmPrimaryWhite}`;
74
+ }};
75
+ border-radius: ${({ state }) => {
76
+ if (state) {
77
+ if (state === "inbound") return "0.21875rem 0.21875rem 0.21875rem 0rem";
78
+ if (state === "outbound") return "0.21875rem 0.21875rem 0rem 0.21875rem";
79
+ }
80
+ return `${BmPrimaryWhite}`;
81
+ }};
82
+ border: 0.071rem solid ${BmGrey400};
83
+ word-break: break-all;
84
+ margin: 0rem;
85
+ `;
86
+
87
+ const MessagesSubDetails = styled.div`
88
+ display: flex;
89
+ flex-direction: row;
90
+ align-items: center;
91
+ > *:not(:last-child) {
92
+ margin-right: 0.5rem;
93
+ }
94
+ margin-top: 0.5rem;
95
+ `;
96
+
97
+ const handleState = ({ session }) => {
98
+ if (session === "bot") {
99
+ return <BmAvatar size="small" user="chatbot" />;
100
+ }
101
+ if (session === "live") {
102
+ return <BmAvatar size="small" user="employee" />;
103
+ }
104
+ };
105
+
106
+ BmChat.Details = ({
107
+ children,
108
+ state,
109
+ displayTime,
110
+ status,
111
+ session,
112
+ ...rest
113
+ }) => {
114
+ return (
115
+ <Details state={state} {...rest}>
116
+ {state === "inbound" && session && handleState({ state, session })}
117
+ <MessageDetails>
118
+ <Messages state={state}>{children}</Messages>
119
+ <MessagesSubDetails>
120
+ {displayTime && displayTime}
121
+ {status === "sent" && (
122
+ <BmIcons icon={<DoneAll />} color={`${BmSecondaryDarkGreen}`} size="small" />
123
+ )}
124
+ {status === "failed" && <BmIcons icon={<Done />} color={`${BmPrimaryBlack}`} size="small" />}
125
+ </MessagesSubDetails>
126
+ </MessageDetails>
127
+ {state === "outbound" && session && handleState({ state, session })}
128
+ </Details>
129
+ );
130
+ };
131
+
132
+ BmChat.Footer = styled.div`
133
+ display: flex;
134
+ flex-direction: row;
135
+ border-top: 0.071rem solid ${BmGrey400};
136
+ padding: 0.5rem 0rem;
137
+ align-items: center;
138
+ justify-content: center;
139
+ background: ${BmGrey50};
140
+ > *:not(:last-child) {
141
+ margin-right: 0.5rem;
142
+ }
143
+ `;
144
+
145
+ export default BmChat;