beem-component 2.1.3 → 2.1.4
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.
|
@@ -80,25 +80,35 @@ const RowContainer = _styledComponents.default.div.withConfig({
|
|
|
80
80
|
})(["display:flex;justify-content:space-between;font-size:0.875rem;align-items:center;@media (max-width:42.8571rem){font-size:0.8rem;}"]);
|
|
81
81
|
const Label = _styledComponents.default.span.withConfig({
|
|
82
82
|
displayName: "InfoPanel__Label"
|
|
83
|
-
})(["color:
|
|
83
|
+
})(["color:", ";@media (max-width:42.8571rem){font-size:0.75rem;}"], _ref6 => {
|
|
84
|
+
let {
|
|
85
|
+
labelTextColor
|
|
86
|
+
} = _ref6;
|
|
87
|
+
return hexToRgba(labelTextColor || '#000000', 0.6);
|
|
88
|
+
});
|
|
84
89
|
const Value = _styledComponents.default.span.withConfig({
|
|
85
90
|
displayName: "InfoPanel__Value"
|
|
86
|
-
})(["font-weight:500;@media (max-width:42.8571rem){font-size:0.75rem;}"]
|
|
91
|
+
})(["font-weight:500;color:", ";@media (max-width:42.8571rem){font-size:0.75rem;}"], _ref7 => {
|
|
92
|
+
let {
|
|
93
|
+
valueTextColor
|
|
94
|
+
} = _ref7;
|
|
95
|
+
return hexToRgba(valueTextColor || '#000000', 1);
|
|
96
|
+
});
|
|
87
97
|
const Divider = _styledComponents.default.hr.withConfig({
|
|
88
98
|
displayName: "InfoPanel__Divider"
|
|
89
|
-
})(["border:none;border-top:", ";margin:1rem auto;max-width:97%;@media (max-width:42.8571rem){margin:0.75rem auto;max-width:97%;}"],
|
|
99
|
+
})(["border:none;border-top:", ";margin:1rem auto;max-width:97%;@media (max-width:42.8571rem){margin:0.75rem auto;max-width:97%;}"], _ref8 => {
|
|
90
100
|
let {
|
|
91
101
|
showDivider,
|
|
92
102
|
dividerColor = '#33b1ba',
|
|
93
103
|
dividerType = 'dashed',
|
|
94
104
|
dividerWitdh = '1px',
|
|
95
105
|
dividerOpacity = '0.2'
|
|
96
|
-
} =
|
|
106
|
+
} = _ref8;
|
|
97
107
|
if (showDivider) {
|
|
98
108
|
return "".concat(dividerWitdh, " ").concat(dividerType, " ").concat(hexToRgba(dividerColor, dividerOpacity));
|
|
99
109
|
}
|
|
100
110
|
});
|
|
101
|
-
const SectionSummary =
|
|
111
|
+
const SectionSummary = _ref9 => {
|
|
102
112
|
let {
|
|
103
113
|
icon: Icon,
|
|
104
114
|
title,
|
|
@@ -106,7 +116,7 @@ const SectionSummary = _ref7 => {
|
|
|
106
116
|
textColor,
|
|
107
117
|
subtitle,
|
|
108
118
|
iconBackgroundColor
|
|
109
|
-
} =
|
|
119
|
+
} = _ref9;
|
|
110
120
|
return /*#__PURE__*/_react.default.createElement(SectionSummaryContainer, null, Icon && /*#__PURE__*/_react.default.createElement(IconBox, {
|
|
111
121
|
iconColor: iconColor,
|
|
112
122
|
iconBackgroundColor: iconBackgroundColor
|
|
@@ -116,13 +126,13 @@ const SectionSummary = _ref7 => {
|
|
|
116
126
|
textColor: textColor
|
|
117
127
|
}, subtitle)));
|
|
118
128
|
};
|
|
119
|
-
const BmInfoPanel =
|
|
129
|
+
const BmInfoPanel = _ref0 => {
|
|
120
130
|
let {
|
|
121
131
|
children
|
|
122
|
-
} =
|
|
132
|
+
} = _ref0;
|
|
123
133
|
return /*#__PURE__*/_react.default.createElement(Panel, null, children);
|
|
124
134
|
};
|
|
125
|
-
const Section =
|
|
135
|
+
const Section = _ref1 => {
|
|
126
136
|
let {
|
|
127
137
|
title,
|
|
128
138
|
icon: Icon,
|
|
@@ -135,7 +145,7 @@ const Section = _ref9 => {
|
|
|
135
145
|
dividerWitdh,
|
|
136
146
|
dividerType,
|
|
137
147
|
dividerOpacity
|
|
138
|
-
} =
|
|
148
|
+
} = _ref1;
|
|
139
149
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showDivider && /*#__PURE__*/_react.default.createElement(Divider, {
|
|
140
150
|
dividerColor: dividerColor,
|
|
141
151
|
showDivider: showDivider,
|
|
@@ -149,12 +159,18 @@ const Section = _ref9 => {
|
|
|
149
159
|
iconBackgroundColor: iconBackgroundColor
|
|
150
160
|
}, /*#__PURE__*/_react.default.createElement(Icon, null)), /*#__PURE__*/_react.default.createElement(SectionTitle, null, title)), /*#__PURE__*/_react.default.createElement(SectionBody, null, children));
|
|
151
161
|
};
|
|
152
|
-
const Row =
|
|
162
|
+
const Row = _ref10 => {
|
|
153
163
|
let {
|
|
154
164
|
label,
|
|
155
|
-
value
|
|
156
|
-
|
|
157
|
-
|
|
165
|
+
value,
|
|
166
|
+
labelTextColor,
|
|
167
|
+
valueTextColor
|
|
168
|
+
} = _ref10;
|
|
169
|
+
return /*#__PURE__*/_react.default.createElement(RowContainer, null, /*#__PURE__*/_react.default.createElement(Label, {
|
|
170
|
+
labelTextColor: labelTextColor
|
|
171
|
+
}, label, ":"), /*#__PURE__*/_react.default.createElement(Value, {
|
|
172
|
+
valueTextColor: valueTextColor
|
|
173
|
+
}, value));
|
|
158
174
|
};
|
|
159
175
|
BmInfoPanel.Section = Section;
|
|
160
176
|
BmInfoPanel.Row = Row;
|
|
@@ -70,6 +70,12 @@ var _default = exports.default = {
|
|
|
70
70
|
},
|
|
71
71
|
options: ['dashed', 'solid'],
|
|
72
72
|
defaultValue: 'dashed'
|
|
73
|
+
},
|
|
74
|
+
labelTextColor: {
|
|
75
|
+
control: 'color'
|
|
76
|
+
},
|
|
77
|
+
valueTextColor: {
|
|
78
|
+
control: 'color'
|
|
73
79
|
}
|
|
74
80
|
}
|
|
75
81
|
};
|
|
@@ -84,7 +90,9 @@ const Template = _ref => {
|
|
|
84
90
|
dividerColor,
|
|
85
91
|
dividerOpacity,
|
|
86
92
|
dividerType,
|
|
87
|
-
dividerWidth
|
|
93
|
+
dividerWidth,
|
|
94
|
+
labelTextColor,
|
|
95
|
+
valueTextColor
|
|
88
96
|
} = _ref;
|
|
89
97
|
if (variant === 'summary') {
|
|
90
98
|
return /*#__PURE__*/_react.default.createElement(_InfoPanel.default, {
|
|
@@ -126,6 +134,8 @@ const Template = _ref => {
|
|
|
126
134
|
label: "Date",
|
|
127
135
|
value: "Monday, June 24, 2025"
|
|
128
136
|
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
137
|
+
labelTextColor: labelTextColor,
|
|
138
|
+
valueTextColor: valueTextColor,
|
|
129
139
|
label: "Time",
|
|
130
140
|
value: "09:00 AM"
|
|
131
141
|
})), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Section, {
|
|
@@ -159,7 +169,9 @@ Default.args = {
|
|
|
159
169
|
dividerColor: '#33b1ba',
|
|
160
170
|
dividerType: 'dashed',
|
|
161
171
|
dividerWidth: '1px',
|
|
162
|
-
dividerOpacity: '0.2'
|
|
172
|
+
dividerOpacity: '0.2',
|
|
173
|
+
labelTextColor: '#e46a8e',
|
|
174
|
+
valueTextColor: '#235e92'
|
|
163
175
|
};
|
|
164
176
|
const ExampleSummary = () => {
|
|
165
177
|
return /*#__PURE__*/_react.default.createElement(_InfoPanel.default, null, /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Section, {
|
|
@@ -196,6 +208,8 @@ const ExampleDetails = () => {
|
|
|
196
208
|
label: "Resource",
|
|
197
209
|
value: formData.resourceName
|
|
198
210
|
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
|
211
|
+
labelTextColor: "#e46a8e",
|
|
212
|
+
valueTextColor: "#235e92",
|
|
199
213
|
label: "Duration",
|
|
200
214
|
value: appointmentDetails.duration
|
|
201
215
|
}), /*#__PURE__*/_react.default.createElement(_InfoPanel.default.Row, {
|
package/package.json
CHANGED
|
@@ -134,8 +134,7 @@ const RowContainer = styled.div`
|
|
|
134
134
|
`;
|
|
135
135
|
|
|
136
136
|
const Label = styled.span`
|
|
137
|
-
color:
|
|
138
|
-
|
|
137
|
+
color: ${({ labelTextColor }) => hexToRgba(labelTextColor || '#000000', 0.6)};
|
|
139
138
|
@media (max-width: 42.8571rem) {
|
|
140
139
|
font-size: 0.75rem;
|
|
141
140
|
}
|
|
@@ -143,7 +142,7 @@ const Label = styled.span`
|
|
|
143
142
|
|
|
144
143
|
const Value = styled.span`
|
|
145
144
|
font-weight: 500;
|
|
146
|
-
|
|
145
|
+
color: ${({ valueTextColor }) => hexToRgba(valueTextColor || '#000000', 1)};
|
|
147
146
|
@media (max-width: 42.8571rem) {
|
|
148
147
|
font-size: 0.75rem;
|
|
149
148
|
}
|
|
@@ -232,10 +231,10 @@ const Section = ({
|
|
|
232
231
|
</>
|
|
233
232
|
);
|
|
234
233
|
|
|
235
|
-
const Row = ({ label, value }) => (
|
|
234
|
+
const Row = ({ label, value, labelTextColor, valueTextColor }) => (
|
|
236
235
|
<RowContainer>
|
|
237
|
-
<Label>{label}:</Label>
|
|
238
|
-
<Value>{value}</Value>
|
|
236
|
+
<Label labelTextColor={labelTextColor}>{label}:</Label>
|
|
237
|
+
<Value valueTextColor={valueTextColor}>{value}</Value>
|
|
239
238
|
</RowContainer>
|
|
240
239
|
);
|
|
241
240
|
|
|
@@ -39,6 +39,8 @@ export default {
|
|
|
39
39
|
options: ['dashed', 'solid'],
|
|
40
40
|
defaultValue: 'dashed',
|
|
41
41
|
},
|
|
42
|
+
labelTextColor: { control: 'color' },
|
|
43
|
+
valueTextColor: { control: 'color' },
|
|
42
44
|
},
|
|
43
45
|
};
|
|
44
46
|
|
|
@@ -53,6 +55,8 @@ const Template = ({
|
|
|
53
55
|
dividerOpacity,
|
|
54
56
|
dividerType,
|
|
55
57
|
dividerWidth,
|
|
58
|
+
labelTextColor,
|
|
59
|
+
valueTextColor,
|
|
56
60
|
}) => {
|
|
57
61
|
if (variant === 'summary') {
|
|
58
62
|
return (
|
|
@@ -90,7 +94,12 @@ const Template = ({
|
|
|
90
94
|
<BmInfoPanel.Row label="Resource" value="Dr. Smith" />
|
|
91
95
|
<BmInfoPanel.Row label="Duration" value="30 minutes" />
|
|
92
96
|
<BmInfoPanel.Row label="Date" value="Monday, June 24, 2025" />
|
|
93
|
-
<BmInfoPanel.Row
|
|
97
|
+
<BmInfoPanel.Row
|
|
98
|
+
labelTextColor={labelTextColor}
|
|
99
|
+
valueTextColor={valueTextColor}
|
|
100
|
+
label="Time"
|
|
101
|
+
value="09:00 AM"
|
|
102
|
+
/>
|
|
94
103
|
</BmInfoPanel.Section>
|
|
95
104
|
|
|
96
105
|
<BmInfoPanel.Section
|
|
@@ -123,6 +132,8 @@ Default.args = {
|
|
|
123
132
|
dividerType: 'dashed',
|
|
124
133
|
dividerWidth: '1px',
|
|
125
134
|
dividerOpacity: '0.2',
|
|
135
|
+
labelTextColor: '#e46a8e',
|
|
136
|
+
valueTextColor: '#235e92',
|
|
126
137
|
};
|
|
127
138
|
|
|
128
139
|
export const ExampleSummary = () => {
|
|
@@ -162,7 +173,12 @@ export const ExampleDetails = () => {
|
|
|
162
173
|
<BmInfoPanel.Row label="Type" value={appointmentDetails.title} />
|
|
163
174
|
<BmInfoPanel.Row label="Department" value={formData.departmentName} />
|
|
164
175
|
<BmInfoPanel.Row label="Resource" value={formData.resourceName} />
|
|
165
|
-
<BmInfoPanel.Row
|
|
176
|
+
<BmInfoPanel.Row
|
|
177
|
+
labelTextColor="#e46a8e"
|
|
178
|
+
valueTextColor="#235e92"
|
|
179
|
+
label="Duration"
|
|
180
|
+
value={appointmentDetails.duration}
|
|
181
|
+
/>
|
|
166
182
|
<BmInfoPanel.Row label="Date" value={formData.date.toDateString()} />
|
|
167
183
|
<BmInfoPanel.Row
|
|
168
184
|
label="Time"
|