beem-component 1.0.5 → 1.0.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.
- package/.storybook/main.js +3 -0
- package/dist/assets/css/sidebar.css +22 -0
- package/dist/components/Avatars/avatars.js +4 -3
- package/dist/components/Avatars/avatars.stories.js +3 -3
- package/dist/components/Buttons/buttonDropdown copy.js +158 -0
- package/dist/components/Buttons/buttonDropdown.js +30 -0
- package/dist/components/Buttons/buttonIconsOnly.js +1 -1
- package/dist/components/Buttons/buttons.js +1 -1
- package/dist/components/Cards/cards.js +5 -28
- package/dist/components/Cards/cards.stories.js +0 -4
- package/dist/components/ChatBody/chatBody.js +140 -0
- package/dist/components/ChatBody/chatBody.stories.js +65 -0
- package/dist/components/ChatHeader/chatHeader.js +21 -0
- package/dist/components/ChatHeader/chatHeader.stories.js +29 -0
- package/dist/components/ContactCards/contactCards.js +34 -0
- package/dist/components/ContactCards/contactCards.stories.js +41 -0
- package/dist/components/InfoTab/infoTab.js +24 -0
- package/dist/components/InfoTab/infoTab.stories.js +49 -0
- package/dist/components/MessageCounter/MessageCounter.stories.js +52 -0
- package/dist/components/MessageCounter/messageCounter.js +49 -0
- package/dist/components/{NoteBar.js → NoteBar}/noteBar.js +0 -0
- package/dist/components/{NoteBar.js → NoteBar}/noteBar.stories.js +0 -0
- package/dist/components/Tabs/tabs.js +1 -1
- package/dist/components/Tabs/tabs.stories.js +2 -1
- package/dist/components/index.js +59 -3
- package/dist/components/sidebar.js +2 -4
- package/package.json +1 -1
- package/src/App.js +83 -10
- package/src/lib/assets/css/sidebar.css +22 -0
- package/src/lib/components/Avatars/avatars.js +3 -1
- package/src/lib/components/Avatars/avatars.stories.js +1 -1
- package/src/lib/components/Buttons/buttonDropdown copy.js +147 -0
- package/src/lib/components/Buttons/buttonDropdown.js +13 -0
- package/src/lib/components/Buttons/buttonIconsOnly.js +1 -1
- package/src/lib/components/Buttons/buttons.js +4 -4
- package/src/lib/components/Cards/cards.js +6 -39
- package/src/lib/components/Cards/cards.stories.js +1 -3
- package/src/lib/components/ChatBody/chatBody.js +145 -0
- package/src/lib/components/ChatBody/chatBody.stories.js +48 -0
- package/src/lib/components/ChatHeader/chatHeader.js +16 -0
- package/src/lib/components/ChatHeader/chatHeader.stories.js +19 -0
- package/src/lib/components/ContactCards/contactCards.js +59 -0
- package/src/lib/components/ContactCards/contactCards.stories.js +34 -0
- package/src/lib/components/InfoTab/infoTab.js +28 -0
- package/src/lib/components/InfoTab/infoTab.stories.js +47 -0
- package/src/lib/components/MessageCounter/MessageCounter.stories.js +35 -0
- package/src/lib/components/MessageCounter/messageCounter.js +42 -0
- package/src/lib/components/{NoteBar.js → NoteBar}/noteBar.js +0 -0
- package/src/lib/components/{NoteBar.js → NoteBar}/noteBar.stories.js +0 -0
- package/src/lib/components/Tabs/tabs.js +1 -1
- package/src/lib/components/Tabs/tabs.stories.js +1 -0
- package/src/lib/components/iconStyles.js +1 -3
- package/src/lib/components/index.js +20 -3
- 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;
|
|
File without changes
|
|
File without changes
|
|
@@ -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
1
|
import BmAccordion from "./Accordion/Accordion";
|
|
2
|
-
import
|
|
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,12 +10,14 @@ 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";
|
|
16
17
|
import * as BmColors from "./colors";
|
|
17
18
|
import { BmLoader } from "./Loader/loader";
|
|
18
19
|
import { BmCheckbox } from "./checkbox";
|
|
20
|
+
import { BmTag } from "./tags";
|
|
19
21
|
import {
|
|
20
22
|
BmTagIcon,
|
|
21
23
|
BmAvatarIcon,
|
|
@@ -26,9 +28,16 @@ import {
|
|
|
26
28
|
BmSupport,
|
|
27
29
|
CopyToClipBoard,
|
|
28
30
|
} from "./iconStyles";
|
|
29
|
-
import { BmNoteBar } from "./NoteBar
|
|
31
|
+
import { BmNoteBar } from "./NoteBar/noteBar";
|
|
30
32
|
import { MainWrapper } from "../components/MainWrapper";
|
|
31
33
|
|
|
34
|
+
//Chat Components
|
|
35
|
+
import BmChat from "../components/ChatBody/chatBody";
|
|
36
|
+
import { BmChatHeader } from "./ChatHeader/chatHeader";
|
|
37
|
+
import BmContactCard from "./ContactCards/contactCards";
|
|
38
|
+
import BmInfoTab from "./InfoTab/infoTab";
|
|
39
|
+
import BmCounter from "./MessageCounter/messageCounter";
|
|
40
|
+
|
|
32
41
|
export {
|
|
33
42
|
BmAccordion,
|
|
34
43
|
BmAvatar,
|
|
@@ -37,6 +46,7 @@ export {
|
|
|
37
46
|
BmBtnIcon,
|
|
38
47
|
BmColors,
|
|
39
48
|
BmCard,
|
|
49
|
+
BmListBox,
|
|
40
50
|
BmListHeader,
|
|
41
51
|
BmRowLabel,
|
|
42
52
|
BmModal,
|
|
@@ -46,11 +56,12 @@ export {
|
|
|
46
56
|
BmTab,
|
|
47
57
|
GlobalStyle,
|
|
48
58
|
MainWrapper,
|
|
59
|
+
BmLoader,
|
|
49
60
|
// Old components to be refactored
|
|
50
61
|
BmButtonDropDown,
|
|
51
62
|
BmCheckbox,
|
|
52
63
|
BmInput,
|
|
53
|
-
|
|
64
|
+
BmTag,
|
|
54
65
|
//Icons (Remove unused ones and check on the sizing for custom icons)
|
|
55
66
|
BmAvatarIcon,
|
|
56
67
|
BmIcons,
|
|
@@ -60,4 +71,10 @@ export {
|
|
|
60
71
|
BmQuickReplyIcon,
|
|
61
72
|
BmSupport,
|
|
62
73
|
CopyToClipBoard,
|
|
74
|
+
//Chat Components
|
|
75
|
+
BmChatHeader,
|
|
76
|
+
BmChat,
|
|
77
|
+
BmInfoTab,
|
|
78
|
+
BmContactCard,
|
|
79
|
+
BmCounter,
|
|
63
80
|
};
|
|
@@ -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:
|
|
15
|
-
width:
|
|
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)`
|