beem-component 2.1.1 → 2.1.2
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.
|
@@ -86,8 +86,19 @@ const Value = _styledComponents.default.span.withConfig({
|
|
|
86
86
|
})(["font-weight:500;@media (max-width:42.8571rem){font-size:0.75rem;}"]);
|
|
87
87
|
const Divider = _styledComponents.default.hr.withConfig({
|
|
88
88
|
displayName: "InfoPanel__Divider"
|
|
89
|
-
})(["border:none;border-top:
|
|
90
|
-
|
|
89
|
+
})(["border:none;border-top:", ";margin:1rem auto;max-width:97%;@media (max-width:42.8571rem){margin:0.75rem auto;max-width:97%;}"], _ref6 => {
|
|
90
|
+
let {
|
|
91
|
+
showDivider,
|
|
92
|
+
dividerColor = '#33b1ba',
|
|
93
|
+
dividerType = 'dashed',
|
|
94
|
+
dividerWitdh = '1px',
|
|
95
|
+
dividerOpacity = '0.2'
|
|
96
|
+
} = _ref6;
|
|
97
|
+
if (showDivider) {
|
|
98
|
+
return "".concat(dividerWitdh, " ").concat(dividerType, " ").concat(hexToRgba(dividerColor, dividerOpacity));
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
const SectionSummary = _ref7 => {
|
|
91
102
|
let {
|
|
92
103
|
icon: Icon,
|
|
93
104
|
title,
|
|
@@ -95,7 +106,7 @@ const SectionSummary = _ref6 => {
|
|
|
95
106
|
textColor,
|
|
96
107
|
subtitle,
|
|
97
108
|
iconBackgroundColor
|
|
98
|
-
} =
|
|
109
|
+
} = _ref7;
|
|
99
110
|
return /*#__PURE__*/_react.default.createElement(SectionSummaryContainer, null, Icon && /*#__PURE__*/_react.default.createElement(IconBox, {
|
|
100
111
|
iconColor: iconColor,
|
|
101
112
|
iconBackgroundColor: iconBackgroundColor
|
|
@@ -105,13 +116,13 @@ const SectionSummary = _ref6 => {
|
|
|
105
116
|
textColor: textColor
|
|
106
117
|
}, subtitle)));
|
|
107
118
|
};
|
|
108
|
-
const BmInfoPanel =
|
|
119
|
+
const BmInfoPanel = _ref8 => {
|
|
109
120
|
let {
|
|
110
121
|
children
|
|
111
|
-
} =
|
|
122
|
+
} = _ref8;
|
|
112
123
|
return /*#__PURE__*/_react.default.createElement(Panel, null, children);
|
|
113
124
|
};
|
|
114
|
-
const Section =
|
|
125
|
+
const Section = _ref9 => {
|
|
115
126
|
let {
|
|
116
127
|
title,
|
|
117
128
|
icon: Icon,
|
|
@@ -119,20 +130,30 @@ const Section = _ref8 => {
|
|
|
119
130
|
showDivider,
|
|
120
131
|
backgroundColor,
|
|
121
132
|
iconColor,
|
|
122
|
-
iconBackgroundColor
|
|
123
|
-
|
|
124
|
-
|
|
133
|
+
iconBackgroundColor,
|
|
134
|
+
dividerColor,
|
|
135
|
+
dividerWitdh,
|
|
136
|
+
dividerType,
|
|
137
|
+
dividerOpacity
|
|
138
|
+
} = _ref9;
|
|
139
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showDivider && /*#__PURE__*/_react.default.createElement(Divider, {
|
|
140
|
+
dividerColor: dividerColor,
|
|
141
|
+
showDivider: showDivider,
|
|
142
|
+
dividerWitdh: dividerWitdh,
|
|
143
|
+
dividerType: dividerType,
|
|
144
|
+
dividerOpacity: dividerOpacity
|
|
145
|
+
}), /*#__PURE__*/_react.default.createElement(SectionContainer, {
|
|
125
146
|
backgroundColor: backgroundColor
|
|
126
147
|
}, Icon && /*#__PURE__*/_react.default.createElement(IconBox, {
|
|
127
148
|
iconColor: iconColor,
|
|
128
149
|
iconBackgroundColor: iconBackgroundColor
|
|
129
150
|
}, /*#__PURE__*/_react.default.createElement(Icon, null)), /*#__PURE__*/_react.default.createElement(SectionTitle, null, title)), /*#__PURE__*/_react.default.createElement(SectionBody, null, children));
|
|
130
151
|
};
|
|
131
|
-
const Row =
|
|
152
|
+
const Row = _ref0 => {
|
|
132
153
|
let {
|
|
133
154
|
label,
|
|
134
155
|
value
|
|
135
|
-
} =
|
|
156
|
+
} = _ref0;
|
|
136
157
|
return /*#__PURE__*/_react.default.createElement(RowContainer, null, /*#__PURE__*/_react.default.createElement(Label, null, label, ":"), /*#__PURE__*/_react.default.createElement(Value, null, value));
|
|
137
158
|
};
|
|
138
159
|
BmInfoPanel.Section = Section;
|
|
@@ -48,6 +48,28 @@ var _default = exports.default = {
|
|
|
48
48
|
},
|
|
49
49
|
iconBackgroundColor: {
|
|
50
50
|
control: 'boolean'
|
|
51
|
+
},
|
|
52
|
+
dividerColor: {
|
|
53
|
+
control: 'color'
|
|
54
|
+
},
|
|
55
|
+
dividerWidth: {
|
|
56
|
+
control: {
|
|
57
|
+
type: 'text'
|
|
58
|
+
},
|
|
59
|
+
defaultValue: '3px'
|
|
60
|
+
},
|
|
61
|
+
dividerOpacity: {
|
|
62
|
+
control: {
|
|
63
|
+
type: 'text'
|
|
64
|
+
},
|
|
65
|
+
defaultValue: '0.2'
|
|
66
|
+
},
|
|
67
|
+
dividerType: {
|
|
68
|
+
control: {
|
|
69
|
+
type: 'select'
|
|
70
|
+
},
|
|
71
|
+
options: ['dashed', 'solid'],
|
|
72
|
+
defaultValue: 'dashed'
|
|
51
73
|
}
|
|
52
74
|
}
|
|
53
75
|
};
|
|
@@ -58,7 +80,11 @@ const Template = _ref => {
|
|
|
58
80
|
backgroundColor,
|
|
59
81
|
iconColor,
|
|
60
82
|
textColor,
|
|
61
|
-
iconBackgroundColor
|
|
83
|
+
iconBackgroundColor,
|
|
84
|
+
dividerColor,
|
|
85
|
+
dividerOpacity,
|
|
86
|
+
dividerType,
|
|
87
|
+
dividerWidth
|
|
62
88
|
} = _ref;
|
|
63
89
|
if (variant === 'summary') {
|
|
64
90
|
return /*#__PURE__*/_react.default.createElement(_InfoPanel.default, {
|
|
@@ -106,7 +132,11 @@ const Template = _ref => {
|
|
|
106
132
|
title: "Personal Information",
|
|
107
133
|
icon: _Person.default,
|
|
108
134
|
showDivider: showDivider,
|
|
109
|
-
iconColor: iconColor
|
|
135
|
+
iconColor: iconColor,
|
|
136
|
+
dividerColor: dividerColor,
|
|
137
|
+
dividerType: dividerType,
|
|
138
|
+
dividerOpacity: dividerOpacity,
|
|
139
|
+
dividerWitdh: dividerWidth
|
|
110
140
|
}, /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
111
141
|
label: "Name",
|
|
112
142
|
value: "John Doe"
|
|
@@ -125,7 +155,11 @@ Default.args = {
|
|
|
125
155
|
backgroundColor: '#33B1BA',
|
|
126
156
|
iconColor: '#33B1BA',
|
|
127
157
|
textColor: '#000000',
|
|
128
|
-
iconBackgroundColor: false
|
|
158
|
+
iconBackgroundColor: false,
|
|
159
|
+
dividerColor: '#33b1ba',
|
|
160
|
+
dividerType: 'dashed',
|
|
161
|
+
dividerWidth: '1px',
|
|
162
|
+
dividerOpacity: '0.2'
|
|
129
163
|
};
|
|
130
164
|
const ExampleSummary = () => {
|
|
131
165
|
return /*#__PURE__*/_react.default.createElement(_InfoPanel.default, null, /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Section, {
|
|
@@ -173,7 +207,11 @@ const ExampleDetails = () => {
|
|
|
173
207
|
})), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Section, {
|
|
174
208
|
title: "Personal Information",
|
|
175
209
|
icon: _Person.default,
|
|
176
|
-
showDivider: true
|
|
210
|
+
showDivider: true,
|
|
211
|
+
dividerColor: "#33b1ba",
|
|
212
|
+
dividerType: "dashed",
|
|
213
|
+
dividerWitdh: "1px",
|
|
214
|
+
dividerOpacity: "0.2"
|
|
177
215
|
}, /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
178
216
|
label: "Name",
|
|
179
217
|
value: formData.name
|
package/package.json
CHANGED
package/src/App.js
CHANGED
|
@@ -6,7 +6,7 @@ import React, { useState } from 'react';
|
|
|
6
6
|
// import LocalOfferOutlinedIcon from '@mui/icons-material/LocalOfferOutlined';
|
|
7
7
|
// import CalendarTodayIcon from '@mui/icons-material/CalendarToday';
|
|
8
8
|
import AccessTimeIcon from '@mui/icons-material/AccessTime';
|
|
9
|
-
|
|
9
|
+
import PersonIcon from '@mui/icons-material/Person';
|
|
10
10
|
// import { Tooltip } from '@mui/material';
|
|
11
11
|
import PeopleIcon from '@mui/icons-material/People';
|
|
12
12
|
// import BusinessIcon from '@mui/icons-material/Business';
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
BmProgressIndicator,
|
|
30
30
|
BmLabelWithIcon,
|
|
31
31
|
BmCardv2,
|
|
32
|
-
|
|
32
|
+
BmInfoPanel,
|
|
33
33
|
BmButton,
|
|
34
34
|
BmSelectionNotice,
|
|
35
35
|
BmSelector,
|
|
@@ -929,15 +929,15 @@ const Chat = () => {
|
|
|
929
929
|
// ];
|
|
930
930
|
// console.log({ selected });
|
|
931
931
|
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
932
|
+
const formData = {
|
|
933
|
+
departmentName: 'Marketing',
|
|
934
|
+
resourceName: 'John Doe',
|
|
935
|
+
date: new Date(),
|
|
936
|
+
timeSlot: '09:00 - 09:30',
|
|
937
|
+
name: 'Jane Smith',
|
|
938
|
+
phone: '+1234567890',
|
|
939
|
+
email: 'jane.smith@example.com',
|
|
940
|
+
};
|
|
941
941
|
const slots = [
|
|
942
942
|
{
|
|
943
943
|
id: 'slot-1', // ⚠️ id is required
|
|
@@ -1072,6 +1072,19 @@ const Chat = () => {
|
|
|
1072
1072
|
/>
|
|
1073
1073
|
</BmInfoPanel.Section>
|
|
1074
1074
|
</BmInfoPanel> */}
|
|
1075
|
+
<BmInfoPanel.Section
|
|
1076
|
+
title="Personal Information"
|
|
1077
|
+
icon={PersonIcon}
|
|
1078
|
+
showDivider
|
|
1079
|
+
dividerColor="#33b1ba"
|
|
1080
|
+
dividerWitdh="2px"
|
|
1081
|
+
dividerType="solid"
|
|
1082
|
+
dividerOpacity="0.5"
|
|
1083
|
+
>
|
|
1084
|
+
<BmInfoPanel.Row label="Name" value={formData.name} />
|
|
1085
|
+
<BmInfoPanel.Row label="Phone" value={formData.phone} />
|
|
1086
|
+
<BmInfoPanel.Row label="Email" value={formData.email} />
|
|
1087
|
+
</BmInfoPanel.Section>
|
|
1075
1088
|
</BmCardv2.Content>
|
|
1076
1089
|
<BmCardv2.Footer>
|
|
1077
1090
|
<BmButton
|
|
@@ -151,7 +151,20 @@ const Value = styled.span`
|
|
|
151
151
|
|
|
152
152
|
const Divider = styled.hr`
|
|
153
153
|
border: none;
|
|
154
|
-
border-top:
|
|
154
|
+
border-top: ${({
|
|
155
|
+
showDivider,
|
|
156
|
+
dividerColor = '#33b1ba',
|
|
157
|
+
dividerType = 'dashed',
|
|
158
|
+
dividerWitdh = '1px',
|
|
159
|
+
dividerOpacity = '0.2',
|
|
160
|
+
}) => {
|
|
161
|
+
if (showDivider) {
|
|
162
|
+
return `${dividerWitdh} ${dividerType} ${hexToRgba(
|
|
163
|
+
dividerColor,
|
|
164
|
+
dividerOpacity
|
|
165
|
+
)}`;
|
|
166
|
+
}
|
|
167
|
+
}};
|
|
155
168
|
margin: 1rem auto;
|
|
156
169
|
max-width: 97%;
|
|
157
170
|
@media (max-width: 42.8571rem) {
|
|
@@ -189,9 +202,21 @@ const Section = ({
|
|
|
189
202
|
backgroundColor,
|
|
190
203
|
iconColor,
|
|
191
204
|
iconBackgroundColor,
|
|
205
|
+
dividerColor,
|
|
206
|
+
dividerWitdh,
|
|
207
|
+
dividerType,
|
|
208
|
+
dividerOpacity,
|
|
192
209
|
}) => (
|
|
193
210
|
<>
|
|
194
|
-
{showDivider &&
|
|
211
|
+
{showDivider && (
|
|
212
|
+
<Divider
|
|
213
|
+
dividerColor={dividerColor}
|
|
214
|
+
showDivider={showDivider}
|
|
215
|
+
dividerWitdh={dividerWitdh}
|
|
216
|
+
dividerType={dividerType}
|
|
217
|
+
dividerOpacity={dividerOpacity}
|
|
218
|
+
/>
|
|
219
|
+
)}
|
|
195
220
|
<SectionContainer backgroundColor={backgroundColor}>
|
|
196
221
|
{Icon && (
|
|
197
222
|
<IconBox
|
|
@@ -31,6 +31,14 @@ export default {
|
|
|
31
31
|
iconColor: { control: 'color' },
|
|
32
32
|
textColor: { control: 'color' },
|
|
33
33
|
iconBackgroundColor: { control: 'boolean' },
|
|
34
|
+
dividerColor: { control: 'color' },
|
|
35
|
+
dividerWidth: { control: { type: 'text' }, defaultValue: '3px' },
|
|
36
|
+
dividerOpacity: { control: { type: 'text' }, defaultValue: '0.2' },
|
|
37
|
+
dividerType: {
|
|
38
|
+
control: { type: 'select' },
|
|
39
|
+
options: ['dashed', 'solid'],
|
|
40
|
+
defaultValue: 'dashed',
|
|
41
|
+
},
|
|
34
42
|
},
|
|
35
43
|
};
|
|
36
44
|
|
|
@@ -41,6 +49,10 @@ const Template = ({
|
|
|
41
49
|
iconColor,
|
|
42
50
|
textColor,
|
|
43
51
|
iconBackgroundColor,
|
|
52
|
+
dividerColor,
|
|
53
|
+
dividerOpacity,
|
|
54
|
+
dividerType,
|
|
55
|
+
dividerWidth,
|
|
44
56
|
}) => {
|
|
45
57
|
if (variant === 'summary') {
|
|
46
58
|
return (
|
|
@@ -86,6 +98,10 @@ const Template = ({
|
|
|
86
98
|
icon={PersonIcon}
|
|
87
99
|
showDivider={showDivider}
|
|
88
100
|
iconColor={iconColor}
|
|
101
|
+
dividerColor={dividerColor}
|
|
102
|
+
dividerType={dividerType}
|
|
103
|
+
dividerOpacity={dividerOpacity}
|
|
104
|
+
dividerWitdh={dividerWidth}
|
|
89
105
|
>
|
|
90
106
|
<BmInfoPanel.Row label="Name" value="John Doe" />
|
|
91
107
|
<BmInfoPanel.Row label="Email" value="john@example.com" />
|
|
@@ -103,6 +119,10 @@ Default.args = {
|
|
|
103
119
|
iconColor: '#33B1BA',
|
|
104
120
|
textColor: '#000000',
|
|
105
121
|
iconBackgroundColor: false,
|
|
122
|
+
dividerColor: '#33b1ba',
|
|
123
|
+
dividerType: 'dashed',
|
|
124
|
+
dividerWidth: '1px',
|
|
125
|
+
dividerOpacity: '0.2',
|
|
106
126
|
};
|
|
107
127
|
|
|
108
128
|
export const ExampleSummary = () => {
|
|
@@ -154,6 +174,10 @@ export const ExampleDetails = () => {
|
|
|
154
174
|
title="Personal Information"
|
|
155
175
|
icon={PersonIcon}
|
|
156
176
|
showDivider
|
|
177
|
+
dividerColor="#33b1ba"
|
|
178
|
+
dividerType="dashed"
|
|
179
|
+
dividerWitdh="1px"
|
|
180
|
+
dividerOpacity="0.2"
|
|
157
181
|
>
|
|
158
182
|
<BmInfoPanel.Row label="Name" value={formData.name} />
|
|
159
183
|
<BmInfoPanel.Row label="Phone" value={formData.phone} />
|