beem-component 1.0.3 → 1.0.7

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 (56) hide show
  1. package/.storybook/main.js +3 -0
  2. package/dist/assets/css/sidebar.css +12 -0
  3. package/dist/components/Avatars/avatars.js +4 -3
  4. package/dist/components/Avatars/avatars.stories.js +3 -3
  5. package/dist/components/Buttons/buttonDropdown copy.js +158 -0
  6. package/dist/components/Buttons/buttonDropdown.js +30 -0
  7. package/dist/components/Buttons/buttonIconsOnly.js +1 -1
  8. package/dist/components/Buttons/buttons.js +1 -1
  9. package/dist/components/Cards/cards.js +5 -28
  10. package/dist/components/Cards/cards.stories.js +0 -4
  11. package/dist/components/ChatBody/chatBody.js +138 -0
  12. package/dist/components/ChatBody/chatBody.stories.js +65 -0
  13. package/dist/components/ChatHeader/chatHeader.js +20 -0
  14. package/dist/components/ChatHeader/chatHeader.stories.js +29 -0
  15. package/dist/components/ContactCards/contactCards.js +34 -0
  16. package/dist/components/ContactCards/contactCards.stories.js +41 -0
  17. package/dist/components/InfoTab/infoTab.js +23 -0
  18. package/dist/components/InfoTab/infoTab.stories.js +49 -0
  19. package/dist/components/MessageCounter/MessageCounter.stories.js +52 -0
  20. package/dist/components/MessageCounter/messageCounter.js +49 -0
  21. package/dist/components/{NoteBar.js → NoteBar}/noteBar.js +0 -0
  22. package/dist/components/{NoteBar.js → NoteBar}/noteBar.stories.js +0 -0
  23. package/dist/components/RouteLink/link.js +6 -1
  24. package/dist/components/Tabs/tabs.js +1 -1
  25. package/dist/components/Tabs/tabs.stories.js +2 -1
  26. package/dist/components/index.js +52 -4
  27. package/dist/components/sidebar.js +2 -4
  28. package/package.json +2 -1
  29. package/src/App.js +83 -6
  30. package/src/lib/assets/css/sidebar.css +12 -0
  31. package/src/lib/components/Avatars/avatars.js +3 -1
  32. package/src/lib/components/Avatars/avatars.stories.js +1 -1
  33. package/src/lib/components/Buttons/buttonDropdown copy.js +147 -0
  34. package/src/lib/components/Buttons/buttonDropdown.js +13 -0
  35. package/src/lib/components/Buttons/buttonIconsOnly.js +1 -1
  36. package/src/lib/components/Buttons/buttons.js +4 -4
  37. package/src/lib/components/Cards/cards.js +6 -39
  38. package/src/lib/components/Cards/cards.stories.js +1 -3
  39. package/src/lib/components/ChatBody/chatBody.js +145 -0
  40. package/src/lib/components/ChatBody/chatBody.stories.js +48 -0
  41. package/src/lib/components/ChatHeader/chatHeader.js +16 -0
  42. package/src/lib/components/ChatHeader/chatHeader.stories.js +19 -0
  43. package/src/lib/components/ContactCards/contactCards.js +58 -0
  44. package/src/lib/components/ContactCards/contactCards.stories.js +34 -0
  45. package/src/lib/components/InfoTab/infoTab.js +28 -0
  46. package/src/lib/components/InfoTab/infoTab.stories.js +47 -0
  47. package/src/lib/components/MessageCounter/MessageCounter.stories.js +35 -0
  48. package/src/lib/components/MessageCounter/messageCounter.js +42 -0
  49. package/src/lib/components/{NoteBar.js → NoteBar}/noteBar.js +0 -0
  50. package/src/lib/components/{NoteBar.js → NoteBar}/noteBar.stories.js +0 -0
  51. package/src/lib/components/RouteLink/link.js +4 -3
  52. package/src/lib/components/Tabs/tabs.js +1 -1
  53. package/src/lib/components/Tabs/tabs.stories.js +1 -0
  54. package/src/lib/components/iconStyles.js +1 -3
  55. package/src/lib/components/index.js +20 -5
  56. package/src/lib/components/sidebar.js +3 -3
@@ -0,0 +1,35 @@
1
+ /* eslint-disable import/no-anonymous-default-export */
2
+ import React from "react";
3
+ import BmCounter from "./messageCounter";
4
+ import { text, select } from "@storybook/addon-knobs";
5
+
6
+ export default {
7
+ component: BmCounter,
8
+ title: "components/MessageCounter",
9
+ argTypes: {
10
+ size: {
11
+ options: ["small", "medium", "large"],
12
+ control: { type: "select" },
13
+ description: "Size of the counter (can also be custom example: 10px)",
14
+ defaultValue: { summary: "small" },
15
+ },
16
+ children: {
17
+ description: "Counter Text",
18
+ defaultValue: { summary: undefined },
19
+ },
20
+ },
21
+ };
22
+
23
+ const optionSize = {
24
+ small: "small",
25
+ medium: "medium",
26
+ large: "large",
27
+ };
28
+
29
+ export const MessageCounter = () => {
30
+ return (
31
+ <BmCounter size={select("size", optionSize, "large")}>
32
+ {text("children", "00")}
33
+ </BmCounter>
34
+ );
35
+ };
@@ -0,0 +1,42 @@
1
+ import styled from "styled-components";
2
+ import PropTypes from "prop-types";
3
+ import { BmPrimaryWhite, BmPrimaryBlue } from "../colors";
4
+ import { h3, h4, p } from "../text";
5
+
6
+ const BmCounter = styled.div`
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ text-align: center;
11
+ color: ${BmPrimaryWhite};
12
+ width: ${({ size }) => {
13
+ if (size === "small") return "1.429rem";
14
+ if (size === "medium") return "1.714rem";
15
+ if (size === "large") return "2.286rem";
16
+ if (!size) return "1.429rem";
17
+ return size;
18
+ }};
19
+ height: ${({ size }) => {
20
+ if (size === "small") return "1.429rem";
21
+ if (size === "medium") return "1.714rem";
22
+ if (size === "large") return "2.286rem";
23
+ if (!size) return "1.429rem";
24
+ return size;
25
+ }};
26
+ ${({ size }) => {
27
+ if (size === "large") return `${h3}`;
28
+ if (size === "medium") return `${h4}`;
29
+ if (size === "small") return `${p}`;
30
+ return `${p}`;
31
+ }}
32
+ border-radius: 50%;
33
+ text-align: center;
34
+ background: ${BmPrimaryBlue};
35
+ `;
36
+
37
+ BmCounter.propTypes = {
38
+ children: PropTypes.string,
39
+ size: PropTypes.string,
40
+ };
41
+
42
+ export default BmCounter;
@@ -1,16 +1,17 @@
1
1
  import styled from "styled-components";
2
2
  import { Link } from "react-router-dom";
3
- import { BmPrimaryBlue, BmPrimaryBlack } from "../colors";
3
+ import { BmPrimaryBlue } from "../colors";
4
4
  import { p } from "../text";
5
5
 
6
6
  export const BmRouteLink = styled(Link)`
7
7
  ${p}
8
- color: ${BmPrimaryBlue};
8
+ color: ${(props) => (props.color ? props.color : `${BmPrimaryBlue} `)};
9
9
  text-decoration: none;
10
10
  &:hover,
11
11
  &:focus,
12
12
  &:active {
13
- color: ${BmPrimaryBlack};
13
+ ${'' /* color: ${(props) =>
14
+ darken(0.1, props.color ? props.color : `${BmPrimaryBlue} `)} !important; */}
14
15
  font-weight: 600;
15
16
  &:before {
16
17
  font-weight: normal;
@@ -5,7 +5,7 @@ import { BmGrey400, BmPrimaryBlue, BmPrimaryWhite } from "../colors";
5
5
  import { BmIcons } from "../iconStyles";
6
6
 
7
7
  const BmTabWrapper = styled.div`
8
- display: inline-flex;
8
+ display: flex;
9
9
  flex-direction: row;
10
10
  justify-content: center;
11
11
  align-items: center;
@@ -33,4 +33,5 @@ Tabs.args = {
33
33
  leadingIcon: <Favorite />,
34
34
  trailingIcon: <KeyboardArrowDown />,
35
35
  disabled: false,
36
+ state: 'active',
36
37
  };
@@ -106,11 +106,10 @@ const Avatarsize = (props) => {
106
106
  if (props.size === "small") return "1.143rem !important";
107
107
  if (props.size === "medium") return "1.429rem !important";
108
108
  if (props.size === "large") return "2.286rem !important";
109
- if(!props.size) return "2.286rem !important";
109
+ if (!props.size) return "2.286rem !important";
110
110
  return props.size;
111
111
  };
112
112
 
113
-
114
113
  const AvatarIcon = {
115
114
  root: {
116
115
  fill: (props) => props.color || `${BmPrimaryWhite}`,
@@ -236,4 +235,3 @@ export const CopyToClipBoard = withStyles(icon)((props) => {
236
235
  </SvgIcon>
237
236
  );
238
237
  });
239
-
@@ -1,5 +1,5 @@
1
- import BmAccordicon from "./Accordion/Accordion";
2
- import { BmAvatar } from "./Avatars/avatars";
1
+ import BmAccordion from "./Accordion/Accordion";
2
+ import BmAvatar from "./Avatars/avatars";
3
3
  import { BmAlertIcon } from "./Buttons/buttonAlertIcons";
4
4
  import { BmBtnIcon } from "./Buttons/buttonIconsOnly";
5
5
  import { BmButton } from "./Buttons/buttons";
@@ -10,6 +10,7 @@ import { BmInput } from "./input";
10
10
  import { BmRouteLink } from "./RouteLink/link";
11
11
  import { BmListHeader } from "./Lists/listheader";
12
12
  import { BmRowLabel } from "./Lists/rowLabels";
13
+ import { BmListBox } from "./Lists/listBox";
13
14
  import BmModal from "./Modals/modal";
14
15
  import { BmProgressBar } from "./ProgressBar/progressbar";
15
16
  import { BmTab } from "./Tabs/tabs";
@@ -26,17 +27,25 @@ import {
26
27
  BmSupport,
27
28
  CopyToClipBoard,
28
29
  } from "./iconStyles";
29
- import { BmNoteBar } from "./NoteBar.js/noteBar";
30
- import {MainWrapper} from '../components/MainWrapper'
30
+ import { BmNoteBar } from "./NoteBar/noteBar";
31
+ import { MainWrapper } from "../components/MainWrapper";
32
+
33
+ //Chat Components
34
+ import BmChat from "../components/ChatBody/chatBody";
35
+ import { BmChatHeader } from "./ChatHeader/chatHeader";
36
+ import BmContactCard from "./ContactCards/contactCards";
37
+ import BmInfoTab from "./InfoTab/infoTab";
38
+ import BmCounter from "./MessageCounter/messageCounter";
31
39
 
32
40
  export {
33
- BmAccordicon,
41
+ BmAccordion,
34
42
  BmAvatar,
35
43
  BmAlertIcon,
36
44
  BmButton,
37
45
  BmBtnIcon,
38
46
  BmColors,
39
47
  BmCard,
48
+ BmListBox,
40
49
  BmListHeader,
41
50
  BmRowLabel,
42
51
  BmModal,
@@ -60,4 +69,10 @@ export {
60
69
  BmQuickReplyIcon,
61
70
  BmSupport,
62
71
  CopyToClipBoard,
72
+ //Chat Components
73
+ BmChatHeader,
74
+ BmChat,
75
+ BmInfoTab,
76
+ BmContactCard,
77
+ BmCounter,
63
78
  };
@@ -11,9 +11,8 @@ export const BmSideBar = styled.div`
11
11
  max-height: 100%;
12
12
  height: 100%;
13
13
  overflow: auto;
14
- max-width: 25%;
15
- width: 25%;
16
- ${'' /* border: 0.714rem solid black; */}
14
+ max-width: 20%;
15
+ width: 20%;
17
16
  `;
18
17
 
19
18
  export const BmSideBarSearch = styled.div`
@@ -21,6 +20,7 @@ export const BmSideBarSearch = styled.div`
21
20
  flex-direction: flex-start;
22
21
  align-items: center;
23
22
  padding: 1.714rem !important;
23
+ flex-wrap: wrap;
24
24
  `;
25
25
 
26
26
  export const BmSideBarBtnIcon = styled(BmBtnIcon)`