beem-component 1.5.6 → 1.5.9

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 (209) hide show
  1. package/.babelrc +17 -0
  2. package/.eslintrc +62 -0
  3. package/.prettierrc +6 -0
  4. package/dist/assets/fb.png +0 -0
  5. package/dist/assets/insta.png +0 -0
  6. package/dist/assets/wa.png +0 -0
  7. package/dist/components/Accordion/Accordion.js +31 -64
  8. package/dist/components/Accordion/Accordion.stories.js +29 -29
  9. package/dist/components/Avatars/avatars.js +31 -46
  10. package/dist/components/Avatars/avatars.stories.js +18 -18
  11. package/dist/components/BannerCard/bannerCard.stories.js +14 -14
  12. package/dist/components/BannerCard/bannerCards.js +30 -48
  13. package/dist/components/Buttons/Stories/basicbutton.stories.js +24 -24
  14. package/dist/components/Buttons/Stories/buttonAlertIcons.stories.js +17 -17
  15. package/dist/components/Buttons/Stories/buttonIconsOnly.stories.js +17 -17
  16. package/dist/components/Buttons/buttonAlertIcons.js +28 -44
  17. package/dist/components/Buttons/buttonDropdown copy.js +15 -18
  18. package/dist/components/Buttons/buttonDropdown.js +2 -2
  19. package/dist/components/Buttons/buttonIconsOnly.js +35 -49
  20. package/dist/components/Buttons/buttons.js +75 -86
  21. package/dist/components/Cards/cards.js +15 -11
  22. package/dist/components/Cards/cards.stories.js +8 -8
  23. package/dist/components/ChatComponents/ChatBody/chatBody.js +80 -69
  24. package/dist/components/ChatComponents/ChatBody/chatBody.stories.js +6 -6
  25. package/dist/components/ChatComponents/ChatBody/sessionDetails.js +9 -16
  26. package/dist/components/ChatComponents/ChatHeader/chatHeader.js +5 -7
  27. package/dist/components/ChatComponents/ChatHeader/chatHeader.stories.js +3 -3
  28. package/dist/components/ChatComponents/ColorPicker/colorPicker.js +5 -7
  29. package/dist/components/ChatComponents/ColorPicker/colorPicker.stories.js +7 -3
  30. package/dist/components/ChatComponents/ContactCards/contactCards.js +15 -12
  31. package/dist/components/ChatComponents/ContactCards/contactCards.stories.js +4 -4
  32. package/dist/components/ChatComponents/FormAccordion/FormAccordion.js +14 -10
  33. package/dist/components/ChatComponents/FormAccordion/FormAccordion.stories.js +9 -5
  34. package/dist/components/ChatComponents/InfoTab/infoTab.js +11 -9
  35. package/dist/components/ChatComponents/InfoTab/infoTab.stories.js +6 -6
  36. package/dist/components/ChatComponents/LabelAccordion/LabelAccordion.js +5 -7
  37. package/dist/components/ChatComponents/LabelAccordion/LabelAccordion.stories.js +12 -7
  38. package/dist/components/ChatComponents/NoteAccordion/NoteAccordion.js +11 -9
  39. package/dist/components/ChatComponents/NoteAccordion/NoteAccordion.stories.js +15 -13
  40. package/dist/components/Chats/chat.js +41 -32
  41. package/dist/components/Chats/chatInput.js +18 -14
  42. package/dist/components/Chats/chatwrapper.js +20 -12
  43. package/dist/components/Checkbox/checkboxToggler.js +61 -0
  44. package/dist/components/Checkbox/checkboxToggler.stories.js +81 -0
  45. package/dist/components/Lists/listBox.js +14 -30
  46. package/dist/components/Lists/listBox.stories.js +12 -23
  47. package/dist/components/Lists/listHeader.stories.js +13 -13
  48. package/dist/components/Lists/listheader.js +12 -27
  49. package/dist/components/Lists/rowLabels.js +19 -30
  50. package/dist/components/Lists/rowLabels.stories.js +22 -25
  51. package/dist/components/Loader/loader.js +17 -31
  52. package/dist/components/Loader/loader.stories.js +13 -13
  53. package/dist/components/MainWrapper/index.js +5 -7
  54. package/dist/components/MessageCounter/MessageCounter.stories.js +14 -14
  55. package/dist/components/MessageCounter/messageCounter.js +16 -18
  56. package/dist/components/Modals/modal.js +38 -57
  57. package/dist/components/Modals/modals.stories.js +38 -29
  58. package/dist/components/NoteBar/noteBar.js +28 -57
  59. package/dist/components/NoteBar/noteBar.stories.js +17 -17
  60. package/dist/components/PerformanceIndicator/performaceIndicator.stories.js +15 -15
  61. package/dist/components/PerformanceIndicator/performanceIndicator.js +21 -34
  62. package/dist/components/Pills/pills.js +24 -56
  63. package/dist/components/Pills/pills.stories.js +21 -23
  64. package/dist/components/ProfileIcon/ProfileIcon.js +96 -0
  65. package/dist/components/ProfileIcon/profileIcon.stories.js +82 -0
  66. package/dist/components/ProgressBar/progressbar.js +15 -17
  67. package/dist/components/ProgressBar/progressbar.stories.js +8 -10
  68. package/dist/components/ProgressRing/progressRing.js +38 -54
  69. package/dist/components/ProgressRing/progressRing.stories.js +16 -16
  70. package/dist/components/RouteLink/link.js +8 -10
  71. package/dist/components/RouteLink/link.stories.js +3 -3
  72. package/dist/components/ScrollBar/scrollBar.js +19 -17
  73. package/dist/components/SuperFluid/Content/index.js +5 -7
  74. package/dist/components/SuperFluid/ContentTitle.js/index.js +14 -10
  75. package/dist/components/SuperFluid/SegmentCard/index.js +22 -13
  76. package/dist/components/Tabs/tabs.js +16 -35
  77. package/dist/components/Tabs/tabs.stories.js +19 -19
  78. package/dist/components/Tags/tags.js +33 -65
  79. package/dist/components/Tags/tags.stories.js +18 -18
  80. package/dist/components/breakpoints.js +3 -3
  81. package/dist/components/chatHeader.js +17 -11
  82. package/dist/components/checkbox.js +27 -26
  83. package/dist/components/colors.js +32 -30
  84. package/dist/components/contacts.js +39 -25
  85. package/dist/components/dropdown.js +29 -35
  86. package/dist/components/dropdownButton.js +50 -53
  87. package/dist/components/dropdownItems.js +26 -19
  88. package/dist/components/examples/App.js +137 -0
  89. package/dist/components/examples/InfoAccordion.js +23 -0
  90. package/dist/components/examples/chatBodyExample.js +68 -0
  91. package/dist/components/examples/selectExample.js +63 -0
  92. package/dist/components/globalStyles.js +1 -5
  93. package/dist/components/iconStyles.js +56 -58
  94. package/dist/components/index.js +35 -23
  95. package/dist/components/input.js +33 -36
  96. package/dist/components/logo.js +9 -16
  97. package/dist/components/navbar.js +24 -13
  98. package/dist/components/search.js +20 -21
  99. package/dist/components/text.js +15 -6
  100. package/dist/components/typography.js +14 -14
  101. package/dist/components/wrapper.js +8 -8
  102. package/package.json +54 -30
  103. package/src/App.js +31 -175
  104. package/src/index.js +6 -8
  105. package/src/lib/assets/fb.png +0 -0
  106. package/src/lib/assets/insta.png +0 -0
  107. package/src/lib/assets/wa.png +0 -0
  108. package/src/lib/components/Accordion/Accordion.js +32 -14
  109. package/src/lib/components/Accordion/Accordion.stories.js +31 -31
  110. package/src/lib/components/Avatars/avatars.js +33 -28
  111. package/src/lib/components/Avatars/avatars.stories.js +18 -18
  112. package/src/lib/components/BannerCard/bannerCard.stories.js +16 -17
  113. package/src/lib/components/BannerCard/bannerCards.js +18 -18
  114. package/src/lib/components/Buttons/Stories/basicbutton.stories.js +29 -29
  115. package/src/lib/components/Buttons/Stories/buttonAlertIcons.stories.js +17 -17
  116. package/src/lib/components/Buttons/Stories/buttonIconsOnly.stories.js +24 -24
  117. package/src/lib/components/Buttons/buttonAlertIcons.js +22 -25
  118. package/src/lib/components/Buttons/buttonIconsOnly.js +32 -28
  119. package/src/lib/components/Buttons/buttons.js +70 -73
  120. package/src/lib/components/Cards/cards.js +2 -3
  121. package/src/lib/components/Cards/cards.stories.js +10 -10
  122. package/src/lib/components/ChatComponents/ChatBody/chatBody.js +46 -45
  123. package/src/lib/components/ChatComponents/ChatBody/chatBody.stories.js +34 -28
  124. package/src/lib/components/ChatComponents/ChatBody/sessionDetails.js +2 -2
  125. package/src/lib/components/ChatComponents/ChatHeader/chatHeader.js +2 -2
  126. package/src/lib/components/ChatComponents/ChatHeader/chatHeader.stories.js +4 -4
  127. package/src/lib/components/ChatComponents/ColorPicker/colorPicker.js +2 -2
  128. package/src/lib/components/ChatComponents/ColorPicker/colorPicker.stories.js +4 -3
  129. package/src/lib/components/ChatComponents/ContactCards/contactCards.js +7 -5
  130. package/src/lib/components/ChatComponents/ContactCards/contactCards.stories.js +6 -6
  131. package/src/lib/components/ChatComponents/FormAccordion/FormAccordion.js +3 -3
  132. package/src/lib/components/ChatComponents/FormAccordion/FormAccordion.stories.js +4 -3
  133. package/src/lib/components/ChatComponents/InfoTab/infoTab.js +2 -2
  134. package/src/lib/components/ChatComponents/InfoTab/infoTab.stories.js +7 -7
  135. package/src/lib/components/ChatComponents/LabelAccordion/LabelAccordion.stories.js +5 -3
  136. package/src/lib/components/ChatComponents/NoteAccordion/NoteAccordion.js +2 -2
  137. package/src/lib/components/ChatComponents/NoteAccordion/NoteAccordion.stories.js +6 -5
  138. package/src/lib/components/Checkbox/checkboxToggler.js +89 -0
  139. package/src/lib/components/Checkbox/checkboxToggler.stories.js +48 -0
  140. package/src/lib/components/Lists/listBox.js +7 -7
  141. package/src/lib/components/Lists/listBox.stories.js +8 -11
  142. package/src/lib/components/Lists/listHeader.stories.js +13 -13
  143. package/src/lib/components/Lists/listheader.js +7 -7
  144. package/src/lib/components/Lists/rowLabels.js +6 -6
  145. package/src/lib/components/Lists/rowLabels.stories.js +18 -18
  146. package/src/lib/components/Loader/loader.js +13 -13
  147. package/src/lib/components/Loader/loader.stories.js +14 -14
  148. package/src/lib/components/MainWrapper/index.js +2 -2
  149. package/src/lib/components/MessageCounter/MessageCounter.stories.js +14 -14
  150. package/src/lib/components/MessageCounter/messageCounter.js +16 -16
  151. package/src/lib/components/Modals/modal.js +33 -23
  152. package/src/lib/components/Modals/modals.stories.js +34 -9
  153. package/src/lib/components/NoteBar/noteBar.js +20 -20
  154. package/src/lib/components/NoteBar/noteBar.stories.js +18 -17
  155. package/src/lib/components/PerformanceIndicator/performaceIndicator.stories.js +15 -15
  156. package/src/lib/components/PerformanceIndicator/performanceIndicator.js +11 -10
  157. package/src/lib/components/Pills/pills.js +16 -16
  158. package/src/lib/components/Pills/pills.stories.js +22 -23
  159. package/src/lib/components/ProfileIcon/ProfileIcon.js +76 -0
  160. package/src/lib/components/ProfileIcon/profileIcon.stories.js +57 -0
  161. package/src/lib/components/ProgressBar/progressbar.js +4 -5
  162. package/src/lib/components/ProgressBar/progressbar.stories.js +8 -9
  163. package/src/lib/components/ProgressRing/progressRing.js +25 -24
  164. package/src/lib/components/ProgressRing/progressRing.stories.js +18 -18
  165. package/src/lib/components/RouteLink/link.js +10 -8
  166. package/src/lib/components/RouteLink/link.stories.js +4 -4
  167. package/src/lib/components/ScrollBar/scrollBar.js +15 -14
  168. package/src/lib/components/SuperFluid/Content/index.js +2 -2
  169. package/src/lib/components/SuperFluid/ContentTitle.js/index.js +2 -2
  170. package/src/lib/components/SuperFluid/SegmentCard/index.js +9 -8
  171. package/src/lib/components/Tabs/tabs.js +11 -11
  172. package/src/lib/components/Tabs/tabs.stories.js +20 -20
  173. package/src/lib/components/Tags/tags.js +26 -24
  174. package/src/lib/components/Tags/tags.stories.js +19 -19
  175. package/src/lib/components/breakpoints.js +3 -3
  176. package/src/lib/components/checkbox.js +7 -6
  177. package/src/lib/components/colors.js +30 -28
  178. package/src/lib/components/dropdownButton.js +36 -39
  179. package/src/lib/components/examples/App.js +181 -0
  180. package/src/{InfoAccordion.js → lib/components/examples/InfoAccordion.js} +1 -1
  181. package/src/{App1.js → lib/components/examples/chatBodyExample.js} +2 -2
  182. package/src/{App copy.js → lib/components/examples/selectExample.js} +0 -0
  183. package/src/lib/components/globalStyles.js +4 -5
  184. package/src/lib/components/iconStyles.js +45 -48
  185. package/src/lib/components/index.js +48 -45
  186. package/src/lib/components/input.js +20 -20
  187. package/src/lib/components/text.js +17 -3
  188. package/src/lib/components/typography.js +14 -14
  189. package/src/reportWebVitals.js +1 -1
  190. package/babel.config.js +0 -12
  191. package/dist/components/checkboxToggler.js +0 -50
  192. package/dist/components/example.js +0 -47
  193. package/dist/components/sidebar.js +0 -32
  194. package/dist/components/tabs.js +0 -106
  195. package/dist/components/tags.js +0 -100
  196. package/dist/images/azam.png +0 -0
  197. package/dist/images/azam1.png +0 -0
  198. package/src/ChatHeader.js +0 -22
  199. package/src/CustomerInfo.js +0 -46
  200. package/src/MainChat.js +0 -41
  201. package/src/SideBar.js +0 -81
  202. package/src/lib/components/checkboxToggler.js +0 -19
  203. package/src/lib/components/example.js +0 -30
  204. package/src/lib/components/sidebar.js +0 -33
  205. package/src/lib/components/tabs.js +0 -123
  206. package/src/lib/components/tags.js +0 -101
  207. package/src/lib/images/azam.png +0 -0
  208. package/src/lib/images/azam1.png +0 -0
  209. package/src/list.scss +0 -4
@@ -0,0 +1,57 @@
1
+ /* eslint-disable import/no-anonymous-default-export */
2
+ import React from 'react';
3
+ import { BmProfileIcon } from './ProfileIcon';
4
+ import beem from '../../assets/beem.jpeg';
5
+
6
+ export default {
7
+ component: BmProfileIcon,
8
+ title: 'components/ProfileIcon',
9
+ argTypes: {
10
+ size: {
11
+ options: ['xsmall', 'small', 'medium', 'large'],
12
+ control: { type: 'select' },
13
+ description: 'Size of the profile',
14
+ defaultValue: { summary: 'large' },
15
+ },
16
+ img: {
17
+ description:
18
+ 'Image to be displayed (will not be displayed if content is present)',
19
+ defaultValue: { summary: undefined },
20
+ },
21
+ content: {
22
+ description:
23
+ 'Content to be displayed (will not be displayed if image is present)',
24
+ defaultValue: { summary: undefined },
25
+ },
26
+ channel: {
27
+ options: ['whatsapp', 'instagram', 'facebook'],
28
+ control: { type: 'select' },
29
+ description: 'Profile badge',
30
+ defaultValue: { summary: undefined },
31
+ },
32
+ },
33
+ };
34
+
35
+ const MainProfileIcon = (args) => <BmProfileIcon {...args} />;
36
+
37
+ export const Sample = MainProfileIcon.bind({});
38
+ Sample.args = {
39
+ channel: 'whatsapp',
40
+ size: 'large',
41
+ };
42
+
43
+ export const ImageProfile = MainProfileIcon.bind({});
44
+ ImageProfile.args = {
45
+ channel: 'whatsapp',
46
+ size: 'large',
47
+ img: beem,
48
+ content: undefined,
49
+ };
50
+
51
+ export const ContentProfile = MainProfileIcon.bind({});
52
+ ContentProfile.args = {
53
+ channel: 'whatsapp',
54
+ size: 'large',
55
+ content: <h4>BC</h4>,
56
+ img: undefined,
57
+ };
@@ -1,7 +1,7 @@
1
- import React from "react";
2
- import styled from "styled-components";
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
3
  import Proptypes from 'prop-types';
4
- import { BmGrey100, BmPrimaryBlue } from "../colors";
4
+ import { BmGrey100, BmPrimaryBlue } from '../colors';
5
5
 
6
6
  const Container = styled.div`
7
7
  height: 0.75rem;
@@ -36,8 +36,7 @@ export const BmProgressBar = (props) => {
36
36
  );
37
37
  };
38
38
 
39
-
40
39
  BmProgressBar.propTypes = {
41
40
  value: Proptypes.string.isRequired,
42
41
  color: Proptypes.string,
43
- }
42
+ };
@@ -1,19 +1,18 @@
1
1
  /* eslint-disable import/no-anonymous-default-export */
2
- import React from "react";
3
- import { BmProgressBar } from "./progressbar";
4
- import { Home } from "@material-ui/icons";
2
+ import React from 'react';
3
+ import { BmProgressBar } from './progressbar';
5
4
 
6
5
  export default {
7
6
  component: BmProgressBar,
8
- title: "components/ProgressBar",
7
+ title: 'components/ProgressBar',
9
8
  argTypes: {
10
9
  value: {
11
- control: { type: "text" },
12
- description: "Progress value",
10
+ control: { type: 'text' },
11
+ description: 'Progress value',
13
12
  },
14
13
  color: {
15
- control: { type: "text" },
16
- description: "Color of the progress bar",
14
+ control: { type: 'text' },
15
+ description: 'Color of the progress bar',
17
16
  },
18
17
  },
19
18
  };
@@ -22,5 +21,5 @@ const MainProgressBar = (args) => <BmProgressBar {...args} />;
22
21
 
23
22
  export const ProgressBar = MainProgressBar.bind({});
24
23
  ProgressBar.args = {
25
- value: "50",
24
+ value: '50',
26
25
  };
@@ -1,13 +1,14 @@
1
- import React, { useEffect, useState, useRef } from "react";
2
- import PropTypes from "prop-types";
3
- import styled from "styled-components";
1
+ /* eslint-disable no-shadow */
2
+ import React, { useEffect, useState, useRef } from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import styled from 'styled-components';
4
5
  import {
5
6
  BmGrey100,
6
7
  BmPrimaryBlue,
7
8
  BmSecondaryDarkGreen,
8
9
  BmPrimaryGold,
9
10
  BmSecondaryRed,
10
- } from "../colors";
11
+ } from '../colors';
11
12
 
12
13
  const small = 1.429;
13
14
  const medium = 1.714;
@@ -16,18 +17,18 @@ const large = 2.286;
16
17
  let center;
17
18
  let radius;
18
19
  let circumference;
19
- let strokeWidth = 5;
20
+ const strokeWidth = 5;
20
21
  let initialSize;
21
22
 
22
23
  const measurement = (size) => {
23
24
  let initialSize = size || large * 14;
24
- if (size === "small") {
25
+ if (size === 'small') {
25
26
  initialSize = small * 14;
26
27
  }
27
- if (size === "medium") {
28
+ if (size === 'medium') {
28
29
  initialSize = medium * 14;
29
30
  }
30
- if (size === "large") {
31
+ if (size === 'large') {
31
32
  initialSize = large * 14;
32
33
  }
33
34
  center = initialSize / 2;
@@ -38,17 +39,17 @@ const measurement = (size) => {
38
39
  const ProgressRingWrapper = styled.svg`
39
40
  display: flex;
40
41
  width: ${({ size }) => {
41
- if (size === "small") return "1.429rem";
42
- if (size === "medium") return "1.714rem";
43
- if (size === "large") return "2.286rem";
44
- if (!size) return "2.286rem";
42
+ if (size === 'small') return '1.429rem';
43
+ if (size === 'medium') return '1.714rem';
44
+ if (size === 'large') return '2.286rem';
45
+ if (!size) return '2.286rem';
45
46
  return `${size}px`;
46
47
  }};
47
48
  height: ${({ size }) => {
48
- if (size === "small") return "1.429rem";
49
- if (size === "medium") return "1.714rem";
50
- if (size === "large") return "2.286rem";
51
- if (!size) return "2.286rem";
49
+ if (size === 'small') return '1.429rem';
50
+ if (size === 'medium') return '1.714rem';
51
+ if (size === 'large') return '2.286rem';
52
+ if (!size) return '2.286rem';
52
53
  return `${size}px`;
53
54
  }};
54
55
  `;
@@ -61,10 +62,10 @@ const ProgressRingCircle2 = styled.circle`
61
62
  fill: none;
62
63
  stroke: ${({ variant, progress }) => {
63
64
  if (progress) {
64
- if (variant === "primary") return `${BmPrimaryBlue}`;
65
- if (variant === "success") return `${BmSecondaryDarkGreen}`;
66
- if (variant === "warning") return `${BmPrimaryGold}`;
67
- if (variant === "danger") return `${BmSecondaryRed}`;
65
+ if (variant === 'primary') return `${BmPrimaryBlue}`;
66
+ if (variant === 'success') return `${BmSecondaryDarkGreen}`;
67
+ if (variant === 'warning') return `${BmPrimaryGold}`;
68
+ if (variant === 'danger') return `${BmSecondaryRed}`;
68
69
  if (!variant) return `${BmPrimaryBlue}`;
69
70
  }
70
71
  if (!progress) return `${BmGrey100}`;
@@ -74,12 +75,12 @@ const ProgressRingCircle2 = styled.circle`
74
75
  const Text = styled.text`
75
76
  font-size: ${() => {
76
77
  if (initialSize >= 50 && initialSize < 100) {
77
- return "1rem";
78
+ return '1rem';
78
79
  }
79
80
  if (initialSize >= 100) {
80
- return "2rem";
81
+ return '2rem';
81
82
  }
82
- return "0.5rem";
83
+ return '0.5rem';
83
84
  }};
84
85
  text-anchor: middle;
85
86
  fill: black;
@@ -101,7 +102,7 @@ const BmProgressRing = (props) => {
101
102
  const progressOffset = ((100 - progress) / 100) * circumference;
102
103
  setOffset(progressOffset);
103
104
 
104
- circleRef.current.style = "transition: stroke-dashoffset 850ms ease-in-out";
105
+ circleRef.current.style = 'transition: stroke-dashoffset 850ms ease-in-out';
105
106
  }, [setOffset, progress, offset]);
106
107
 
107
108
  return (
@@ -1,25 +1,25 @@
1
1
  /* eslint-disable import/no-anonymous-default-export */
2
- import React from "react";
3
- import BmProgressRing from "./progressRing";
2
+ import React from 'react';
3
+ import BmProgressRing from './progressRing';
4
4
 
5
5
  export default {
6
6
  component: BmProgressRing,
7
- title: "components/ProgressRing",
7
+ title: 'components/ProgressRing',
8
8
  argTypes: {
9
9
  size: {
10
- options: ["small", "medium", "large"],
11
- control: { type: "select" },
12
- description: "Size of the Progress Ring (Can also be predefined e.g. 50)",
13
- defaultValue: { summary: "large" },
10
+ options: ['small', 'medium', 'large'],
11
+ control: { type: 'select' },
12
+ description: 'Size of the Progress Ring (Can also be predefined e.g. 50)',
13
+ defaultValue: { summary: 'large' },
14
14
  },
15
15
  progress: {
16
- description: "Progress Indicator",
16
+ description: 'Progress Indicator',
17
17
  },
18
18
  variant: {
19
- options: ["primary", "success", "warning", "danger"],
20
- control: { type: "select" },
21
- description: "Color of the Progress Ring",
22
- defaultValue: { summary: "xsmall" },
19
+ options: ['primary', 'success', 'warning', 'danger'],
20
+ control: { type: 'select' },
21
+ description: 'Color of the Progress Ring',
22
+ defaultValue: { summary: 'xsmall' },
23
23
  },
24
24
  },
25
25
  };
@@ -28,14 +28,14 @@ const MainProgressRing = (args) => <BmProgressRing {...args} />;
28
28
 
29
29
  export const BasicProgressRing = MainProgressRing.bind({});
30
30
  BasicProgressRing.args = {
31
- progress: 30,
32
- variant: "success",
33
- size: "xlarge"
31
+ progress: 30,
32
+ variant: 'success',
33
+ size: 'xlarge',
34
34
  };
35
35
 
36
36
  export const CustomProgressRing = MainProgressRing.bind({});
37
37
  CustomProgressRing.args = {
38
38
  progress: 50,
39
- variant: "primary",
40
- size: "40"
41
- };
39
+ variant: 'primary',
40
+ size: '40',
41
+ };
@@ -1,13 +1,14 @@
1
- import styled from "styled-components";
2
- import { Link } from "react-router-dom";
3
- import { BmPrimaryBlue } from "../colors";
4
- import { p } from "../text";
5
- import { darken } from "polished";
1
+ import styled from 'styled-components';
2
+ import { Link } from 'react-router-dom';
3
+ import { darken } from 'polished';
4
+ import { BmPrimaryBlue } from '../colors';
5
+ import { p } from '../text';
6
6
 
7
- //TODO: To be fixed for hover states
7
+ // TODO: To be fixed for hover states
8
8
  export const BmRouteLink = styled(Link)`
9
9
  ${p}
10
- color: ${(props) => (props.color ? props.color : `${BmPrimaryBlue} `)} !important;
10
+ color: ${(props) =>
11
+ props.color ? props.color : `${BmPrimaryBlue} `} !important;
11
12
  text-decoration: none;
12
13
  &:hover,
13
14
  &:focus,
@@ -16,6 +17,7 @@ export const BmRouteLink = styled(Link)`
16
17
  &:before {
17
18
  font-weight: normal;
18
19
  }
19
- color: ${(props) => darken(0.1, props.color ? props.color : `${BmPrimaryBlue}`)} !important;
20
+ color: ${(props) =>
21
+ darken(0.1, props.color ? props.color : `${BmPrimaryBlue}`)} !important;
20
22
  }
21
23
  `;
@@ -1,11 +1,11 @@
1
1
  /* eslint-disable import/no-anonymous-default-export */
2
- import React from "react";
3
- import { BrowserRouter, Switch } from "react-router-dom";
4
- import { BmRouteLink } from "./link";
2
+ import React from 'react';
3
+ import { BrowserRouter, Switch } from 'react-router-dom';
4
+ import { BmRouteLink } from './link';
5
5
 
6
6
  export default {
7
7
  component: BmRouteLink,
8
- title: "components/RouteLink",
8
+ title: 'components/RouteLink',
9
9
  };
10
10
 
11
11
  export const SampleLink = () => {
@@ -1,26 +1,27 @@
1
- import styled from "styled-components";
1
+ import styled from 'styled-components';
2
2
 
3
3
  export const ScrollbarWrapper = styled.div(() => ({
4
- "::-webkit-scrollbar-thumb": {
5
- background: "blue",
6
- maxHeight: "10px",
7
- display: "block",
8
- width: "10em",
9
- overflow: "auto",
10
- height: "2em",
4
+ '::-webkit-scrollbar-thumb': {
5
+ background: 'blue',
6
+ maxHeight: '10px',
7
+ display: 'block',
8
+ width: '10em',
9
+ overflow: 'auto',
10
+ height: '2em',
11
11
  },
12
12
  }));
13
13
 
14
14
  export const Scrollbar = styled.div`
15
- ::-webkit-scrollbar {
15
+ ::-webkit-scrollbar {
16
16
  width: 0.714rem !important;
17
- }
18
- ::-webkit-scrollbar-thumb {
19
- background-color: #E2E2E2;
20
- }`;
17
+ }
18
+ ::-webkit-scrollbar-thumb {
19
+ background-color: #e2e2e2;
20
+ }
21
+ `;
21
22
 
22
23
  export const Content = styled.div(() => ({
23
- direction: "ltr", // if you want to show the scroll bar on the left
24
+ direction: 'ltr', // if you want to show the scroll bar on the left
24
25
  }));
25
26
 
26
27
  export default ScrollbarWrapper;
@@ -1,5 +1,5 @@
1
- import styled from "styled-components";
2
- import { BmGrey400, BmPrimaryWhite } from "../../colors";
1
+ import styled from 'styled-components';
2
+ import { BmGrey400, BmPrimaryWhite } from '../../colors';
3
3
 
4
4
  export const BmContent = styled.div`
5
5
  display: flex;
@@ -1,5 +1,5 @@
1
- import styled from "styled-components";
2
- import { BmPrimaryBlack } from "../../colors";
1
+ import styled from 'styled-components';
2
+ import { BmPrimaryBlack } from '../../colors';
3
3
 
4
4
  export const BmContentTitle = styled.h1`
5
5
  color: ${BmPrimaryBlack};
@@ -1,9 +1,10 @@
1
- import React from "react";
2
- import { CheckCircle } from "@material-ui/icons";
3
- import styled from "styled-components";
4
- import { BmCheckbox } from "../../checkbox";
5
- import { BmGrey400, BmPrimaryWhite, BmPrimaryBlue } from "../../colors";
6
- import { BmIcons } from "../../iconStyles";
1
+ /* eslint-disable react/destructuring-assignment */
2
+ import React from 'react';
3
+ import { CheckCircle } from '@material-ui/icons';
4
+ import styled from 'styled-components';
5
+ import { BmCheckbox } from '../../checkbox';
6
+ import { BmGrey400, BmPrimaryWhite, BmPrimaryBlue } from '../../colors';
7
+ import { BmIcons } from '../../iconStyles';
7
8
 
8
9
  export const BmSegmentCard = styled.div`
9
10
  display: flex;
@@ -27,7 +28,7 @@ export const BmSegmentSelector = styled.div`
27
28
  border-left: none;
28
29
  border-radius: 0rem 0.188rem 0.25rem 0rem;
29
30
  margin: 0rem;
30
- width: 80%;
31
+ width: 80%;
31
32
  `;
32
33
 
33
34
  export const BmSegment = styled.div`
@@ -86,7 +87,7 @@ export const BmSegmentCompleteIcon = (props) => {
86
87
  <BmIcons
87
88
  icon={<CheckCircle />}
88
89
  color={props.color ? props.color : `${BmPrimaryBlue}`}
89
- size={props.size ? props.size : "5rem"}
90
+ size={props.size ? props.size : '5rem'}
90
91
  />
91
92
  );
92
93
  };
@@ -1,8 +1,8 @@
1
- import React from "react";
2
- import styled from "styled-components";
3
- import PropTypes from "prop-types";
4
- import { BmGrey400, BmPrimaryBlue, BmPrimaryWhite } from "../colors";
5
- import { BmIcons } from "../iconStyles";
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+ import PropTypes from 'prop-types';
4
+ import { BmGrey400, BmPrimaryBlue, BmPrimaryWhite } from '../colors';
5
+ import { BmIcons } from '../iconStyles';
6
6
 
7
7
  const BmTabWrapper = styled.div`
8
8
  display: flex;
@@ -12,10 +12,10 @@ const BmTabWrapper = styled.div`
12
12
  padding: 1rem;
13
13
  background: ${BmPrimaryWhite};
14
14
  box-shadow: ${({ state, disabled, stateColor }) => {
15
- if (state === "active" && !disabled) {
16
- return `inset 0px -3px 0px ${stateColor ? stateColor : BmPrimaryBlue}`;
15
+ if (state === 'active' && !disabled) {
16
+ return `inset 0px -3px 0px ${stateColor || BmPrimaryBlue}`;
17
17
  }
18
- return "none";
18
+ return 'none';
19
19
  }};
20
20
  > *:not(:last-child) {
21
21
  margin-right: 0.5rem;
@@ -38,7 +38,7 @@ const BmTabWrapper = styled.div`
38
38
  if (!disabled) {
39
39
  return `inset 0px -3px 0px ${BmGrey400}`;
40
40
  }
41
- return "none";
41
+ return 'none';
42
42
  }};
43
43
  }
44
44
  `;
@@ -64,7 +64,7 @@ export const BmTab = ({
64
64
  {leadingIcon && (
65
65
  <BmIcons
66
66
  icon={leadingIcon}
67
- size={size || "large"}
67
+ size={size || 'large'}
68
68
  color={disabled ? `${BmGrey400}` : color}
69
69
  />
70
70
  )}
@@ -72,7 +72,7 @@ export const BmTab = ({
72
72
  {trailingIcon && (
73
73
  <BmIcons
74
74
  icon={trailingIcon}
75
- size={size || "large"}
75
+ size={size || 'large'}
76
76
  color={disabled ? `${BmGrey400}` : color}
77
77
  />
78
78
  )}
@@ -1,34 +1,34 @@
1
1
  /* eslint-disable import/no-anonymous-default-export */
2
- import { Favorite, KeyboardArrowDown } from "@material-ui/icons";
3
- import React from "react";
4
- import { BmTab } from "./tabs";
2
+ import { Favorite, KeyboardArrowDown } from '@material-ui/icons';
3
+ import React from 'react';
4
+ import { BmTab } from './tabs';
5
5
 
6
6
  export default {
7
7
  component: BmTab,
8
- title: "components/Tabs",
8
+ title: 'components/Tabs',
9
9
  argTypes: {
10
10
  color: {
11
- control: { type: "text" },
12
- description: "Color of the Icons and Text",
11
+ control: { type: 'text' },
12
+ description: 'Color of the Icons and Text',
13
13
  },
14
14
  state: {
15
- options: ["active"],
16
- control: { type: "select" },
17
- description: "State of the Tabs (optional)",
15
+ options: ['active'],
16
+ control: { type: 'select' },
17
+ description: 'State of the Tabs (optional)',
18
18
  },
19
19
  stateColor: {
20
- control: { type: "text" },
21
- description: "Color of the active state",
22
- defaultValue: { summary: "primary blue" },
20
+ control: { type: 'text' },
21
+ description: 'Color of the active state',
22
+ defaultValue: { summary: 'primary blue' },
23
23
  },
24
24
  size: {
25
- options: ["small", "medium", "large"],
26
- control: { type: "select" },
27
- description: "Size of the icons",
28
- defaultValue: { summary: "large" },
25
+ options: ['small', 'medium', 'large'],
26
+ control: { type: 'select' },
27
+ description: 'Size of the icons',
28
+ defaultValue: { summary: 'large' },
29
29
  },
30
30
  disabled: {
31
- description: "Disabled tab",
31
+ description: 'Disabled tab',
32
32
  },
33
33
  },
34
34
  };
@@ -41,7 +41,7 @@ BasicTab.args = {
41
41
  leadingIcon: <Favorite />,
42
42
  trailingIcon: <KeyboardArrowDown />,
43
43
  disabled: false,
44
- state: "active",
44
+ state: 'active',
45
45
  };
46
46
 
47
47
  export const DisabledTab = MainTab.bind({});
@@ -58,6 +58,6 @@ ColoredTab.args = {
58
58
  leadingIcon: <Favorite />,
59
59
  trailingIcon: <KeyboardArrowDown />,
60
60
  disabled: false,
61
- state: "active",
62
- stateColor: "red",
61
+ state: 'active',
62
+ stateColor: 'red',
63
63
  };
@@ -1,7 +1,10 @@
1
- import React, { useState } from "react";
2
- import styled from "styled-components";
3
- import PropTypes from "prop-types";
4
- import { BmIcons } from "../iconStyles";
1
+ /* eslint-disable react/no-children-prop */
2
+
3
+ import React, { useState } from 'react';
4
+ import styled from 'styled-components';
5
+ import PropTypes from 'prop-types';
6
+ import { Clear } from '@material-ui/icons';
7
+ import { BmIcons } from '../iconStyles';
5
8
  import {
6
9
  BmPrimaryWhite,
7
10
  BmSecondaryDarkGreen,
@@ -10,11 +13,10 @@ import {
10
13
  BmGrey100,
11
14
  BmGrey400,
12
15
  BmPrimaryGold,
13
- } from "../../components/colors";
14
- import { Clear } from "@material-ui/icons";
16
+ } from '../colors';
15
17
 
16
18
  const Color = ({ variant, color }) => {
17
- if (variant === "success" || variant === "warning" || variant === "danger") {
19
+ if (variant === 'success' || variant === 'warning' || variant === 'danger') {
18
20
  return `${BmPrimaryWhite}`;
19
21
  }
20
22
  if (!variant && color) {
@@ -24,12 +26,12 @@ const Color = ({ variant, color }) => {
24
26
  };
25
27
 
26
28
  const BeemTag = styled.button`
27
- ${"" /* display: flex; */}
29
+ ${'' /* display: flex; */}
28
30
  display: ${({ closeButton, show }) => {
29
31
  if (!closeButton) {
30
- return "flex";
32
+ return 'flex';
31
33
  }
32
- return show ? "flex" : "none";
34
+ return show ? 'flex' : 'none';
33
35
  }};
34
36
  flex-direction: row;
35
37
  justify-content: center;
@@ -37,20 +39,20 @@ const BeemTag = styled.button`
37
39
  padding: 0.25rem 0.5rem;
38
40
  border-radius: 0.25rem;
39
41
  background: ${({ variant }) => {
40
- if (variant === "neutral") return `${BmGrey100}`;
41
- if (variant === "success") return `${BmSecondaryDarkGreen}`;
42
- if (variant === "warning") return `${BmPrimaryGold}`;
43
- if (variant === "danger") return `${BmSecondaryRed}`;
44
- if (variant === "light") return `${BmPrimaryWhite}`;
42
+ if (variant === 'neutral') return `${BmGrey100}`;
43
+ if (variant === 'success') return `${BmSecondaryDarkGreen}`;
44
+ if (variant === 'warning') return `${BmPrimaryGold}`;
45
+ if (variant === 'danger') return `${BmSecondaryRed}`;
46
+ if (variant === 'light') return `${BmPrimaryWhite}`;
45
47
  if (!variant) return `${BmGrey100}`;
46
48
  }};
47
49
  border: 0.071rem solid
48
50
  ${({ variant }) => {
49
- if (variant === "neutral") return `${BmGrey100}`;
50
- if (variant === "success") return `${BmSecondaryDarkGreen}`;
51
- if (variant === "warning") return `${BmPrimaryGold}`;
52
- if (variant === "danger") return `${BmSecondaryRed}`;
53
- if (variant === "light") return `${BmGrey400}`;
51
+ if (variant === 'neutral') return `${BmGrey100}`;
52
+ if (variant === 'success') return `${BmSecondaryDarkGreen}`;
53
+ if (variant === 'warning') return `${BmPrimaryGold}`;
54
+ if (variant === 'danger') return `${BmSecondaryRed}`;
55
+ if (variant === 'light') return `${BmGrey400}`;
54
56
  return `${BmGrey100}`;
55
57
  }};
56
58
  > * {
@@ -96,7 +98,7 @@ export const BmTag = (props) => {
96
98
  icon={leadingIcon}
97
99
  variant={variant}
98
100
  color={Color({ color, variant })}
99
- size={size || "small"}
101
+ size={size || 'small'}
100
102
  />
101
103
  )}
102
104
  {children}
@@ -105,15 +107,15 @@ export const BmTag = (props) => {
105
107
  icon={trailingIcon}
106
108
  disabled={disabled}
107
109
  color={Color({ color, variant })}
108
- size={size || "small"}
110
+ size={size || 'small'}
109
111
  />
110
112
  )}
111
113
  {closeButton && (
112
114
  <BmIcons
113
115
  icon={<Clear />}
114
116
  color={Color({ color, variant })}
115
- size={size ? size : "small"}
116
- style={{ marginLeft: "auto" }}
117
+ size={size || 'small'}
118
+ style={{ marginLeft: 'auto' }}
117
119
  onClick={() => onHide && onHide(setToggle(!toggle))}
118
120
  />
119
121
  )}