beem-component 2.1.8 → 2.1.29
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/Dockerfile +1 -1
- package/Jenkinsfile +5 -20
- package/dist/components/BmSelector/BmSelector.js +2 -15
- package/dist/components/BmSelector/BmSelector.stories.js +1 -14
- package/dist/components/Card_v2/Card.js +1 -1
- package/dist/components/InfoPanel/InfoPanel.js +17 -54
- package/dist/components/InfoPanel/InfoPanel.stories.js +4 -56
- package/dist/components/globalStyles.js +1 -1
- package/dist/components/index.js +0 -14
- package/dist/components/text.js +10 -11
- package/dist/components/typography.js +2 -3
- package/package.json +1 -1
- package/public/index.html +0 -1
- package/src/App.js +65 -128
- package/src/fonts.scss +0 -6
- package/src/lib/components/BmSelector/BmSelector.js +1 -14
- package/src/lib/components/BmSelector/BmSelector.stories.jsx +0 -10
- package/src/lib/components/Card_v2/Card.js +0 -20
- package/src/lib/components/InfoPanel/InfoPanel.js +11 -35
- package/src/lib/components/InfoPanel/InfoPanel.stories.jsx +2 -42
- package/src/lib/components/globalStyles.js +1 -2
- package/src/lib/components/index.js +0 -4
- package/src/lib/components/text.js +11 -17
- package/src/lib/components/typography.js +0 -1
- package/dist/components/Alert/Alert.js +0 -83
- package/dist/components/Alert/Alert.stories.js +0 -66
- package/dist/components/BmCustomCardTitle/CustomCardTitle.js +0 -174
- package/dist/components/BmCustomCardTitle/CustomCardTitle.stories.js +0 -85
- package/src/fonts/Inter-Black.woff2 +0 -0
- package/src/fonts/Inter-Bold.woff2 +0 -0
- package/src/fonts/Inter-ExtraBold.woff2 +0 -0
- package/src/fonts/Inter-ExtraLight.woff2 +0 -0
- package/src/fonts/Inter-Light.woff2 +0 -0
- package/src/fonts/Inter-Medium.woff2 +0 -0
- package/src/fonts/Inter-Regular.woff2 +0 -0
- package/src/fonts/Inter-SemiBold.woff2 +0 -0
- package/src/fonts/Inter-Thin.woff2 +0 -0
- package/src/fonts/Inter-VariableFont_opsz,wght.ttf +0 -0
- package/src/fonts/InterDisplay-Black.woff2 +0 -0
- package/src/fonts/InterDisplay-Bold.woff2 +0 -0
- package/src/fonts/InterDisplay-ExtraBold.woff2 +0 -0
- package/src/fonts/InterDisplay-ExtraLight.woff2 +0 -0
- package/src/fonts/InterDisplay-Light.woff2 +0 -0
- package/src/fonts/InterDisplay-Medium.woff2 +0 -0
- package/src/fonts/InterDisplay-SemiBold.woff2 +0 -0
- package/src/fonts/InterDisplay-Thin.woff2 +0 -0
- package/src/lib/components/Alert/Alert.js +0 -111
- package/src/lib/components/Alert/Alert.stories.jsx +0 -66
- package/src/lib/components/BmCustomCardTitle/CustomCardTitle.js +0 -142
- package/src/lib/components/BmCustomCardTitle/CustomCardTitle.stories.jsx +0 -83
package/src/App.js
CHANGED
|
@@ -4,14 +4,12 @@
|
|
|
4
4
|
import React, { useState } from 'react';
|
|
5
5
|
// import AbcIcon from '@mui/icons-material/Abc';
|
|
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
|
-
import PersonIcon from '@mui/icons-material/Person';
|
|
10
|
-
import CalendarTodayOutlinedIcon from '@mui/icons-material/CalendarTodayOutlined';
|
|
11
|
-
import CheckIcon from '@mui/icons-material/Check';
|
|
9
|
+
// import PersonIcon from '@mui/icons-material/Person';
|
|
12
10
|
// import { Tooltip } from '@mui/material';
|
|
13
11
|
import PeopleIcon from '@mui/icons-material/People';
|
|
14
|
-
|
|
12
|
+
import BusinessIcon from '@mui/icons-material/Business';
|
|
15
13
|
|
|
16
14
|
import {
|
|
17
15
|
BmChat,
|
|
@@ -35,9 +33,7 @@ import {
|
|
|
35
33
|
BmButton,
|
|
36
34
|
BmSelectionNotice,
|
|
37
35
|
BmSelector,
|
|
38
|
-
BmCustomCardTitle,
|
|
39
36
|
} from './lib/components';
|
|
40
|
-
import AlertBox from './lib/components/Alert/Alert';
|
|
41
37
|
// import ProgressIndicator from './lib/components/newProgress';
|
|
42
38
|
|
|
43
39
|
// const datsa = JSON.stringify({
|
|
@@ -944,7 +940,7 @@ const Chat = () => {
|
|
|
944
940
|
};
|
|
945
941
|
const slots = [
|
|
946
942
|
{
|
|
947
|
-
id: 'slot-1',
|
|
943
|
+
id: 'slot-1',
|
|
948
944
|
label: '10:00 AM - 10:30 AM',
|
|
949
945
|
value: { startDate: '10:00 AM', endDate: '10:30 AM' },
|
|
950
946
|
},
|
|
@@ -953,56 +949,6 @@ const Chat = () => {
|
|
|
953
949
|
label: '10:30 AM - 11:10 AM',
|
|
954
950
|
value: { startDate: '10:30 AM', endDate: '11:10 AM' },
|
|
955
951
|
},
|
|
956
|
-
{
|
|
957
|
-
id: 'slot-3',
|
|
958
|
-
label: '11:10 AM - 11:50 AM',
|
|
959
|
-
value: { startDate: '11:10 AM', endDate: '11:50 AM' },
|
|
960
|
-
},
|
|
961
|
-
{
|
|
962
|
-
id: 'slot-4',
|
|
963
|
-
label: '11:50 AM - 12:30 PM',
|
|
964
|
-
value: { startDate: '11:50 AM', endDate: '12:30 PM' },
|
|
965
|
-
},
|
|
966
|
-
{
|
|
967
|
-
id: 'slot-5',
|
|
968
|
-
label: '12:30 PM - 1:10 PM',
|
|
969
|
-
value: { startDate: '12:30 PM', endDate: '1:10 PM' },
|
|
970
|
-
},
|
|
971
|
-
{
|
|
972
|
-
id: 'slot-6',
|
|
973
|
-
label: '1:10 PM - 1:50 PM',
|
|
974
|
-
value: { startDate: '1:10 PM', endDate: '1:50 PM' },
|
|
975
|
-
},
|
|
976
|
-
{
|
|
977
|
-
id: 'slot-7',
|
|
978
|
-
label: '1:50 PM - 2:30 PM',
|
|
979
|
-
value: { startDate: '1:50 PM', endDate: '2:30 PM' },
|
|
980
|
-
},
|
|
981
|
-
{
|
|
982
|
-
id: 'slot-8',
|
|
983
|
-
label: '2:30 PM - 3:10 PM',
|
|
984
|
-
value: { startDate: '2:30 PM', endDate: '3:10 PM' },
|
|
985
|
-
},
|
|
986
|
-
{
|
|
987
|
-
id: 'slot-9',
|
|
988
|
-
label: '3:10 PM - 3:50 PM',
|
|
989
|
-
value: { startDate: '3:10 PM', endDate: '3:50 PM' },
|
|
990
|
-
},
|
|
991
|
-
{
|
|
992
|
-
id: 'slot-10',
|
|
993
|
-
label: '3:50 PM - 4:30 PM',
|
|
994
|
-
value: { startDate: '3:50 PM', endDate: '4:30 PM' },
|
|
995
|
-
},
|
|
996
|
-
{
|
|
997
|
-
id: 'slot-11',
|
|
998
|
-
label: '4:30 PM - 5:10 PM',
|
|
999
|
-
value: { startDate: '4:30 PM', endDate: '5:10 PM' },
|
|
1000
|
-
},
|
|
1001
|
-
{
|
|
1002
|
-
id: 'slot-12',
|
|
1003
|
-
label: '5:10 PM - 5:50 PM',
|
|
1004
|
-
value: { startDate: '5:10 PM', endDate: '5:50 PM' },
|
|
1005
|
-
},
|
|
1006
952
|
];
|
|
1007
953
|
|
|
1008
954
|
const [selectedSlotId, setSelectedSlotId] = useState(null);
|
|
@@ -1010,48 +956,14 @@ const Chat = () => {
|
|
|
1010
956
|
return (
|
|
1011
957
|
<>
|
|
1012
958
|
<GlobalStyle />
|
|
1013
|
-
<
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
// iconBackgroundColor
|
|
1022
|
-
/>
|
|
1023
|
-
<AlertBox
|
|
1024
|
-
icon={AccessTimeIcon}
|
|
1025
|
-
themeColor="#DC2626"
|
|
1026
|
-
title="Payment Error"
|
|
1027
|
-
description="We couldn't process your payment. Please try again later or contact support."
|
|
1028
|
-
/>
|
|
1029
|
-
<BmCustomCardTitle
|
|
1030
|
-
icon={CalendarTodayOutlinedIcon}
|
|
1031
|
-
themeColor="#33B1BA"
|
|
1032
|
-
title="Book Your Medical Appointment"
|
|
1033
|
-
description="Schedule a 30-minute consultation with our healThcare specialists"
|
|
1034
|
-
variant="booking"
|
|
1035
|
-
withStripe
|
|
1036
|
-
/>
|
|
1037
|
-
</div>
|
|
1038
|
-
<div>
|
|
1039
|
-
<BmInfoPanel.Section
|
|
1040
|
-
title="Appointment Details"
|
|
1041
|
-
icon={CalendarTodayOutlinedIcon}
|
|
1042
|
-
backgroundColor="#fcba03"
|
|
1043
|
-
iconColor="#fcba03"
|
|
1044
|
-
/>
|
|
1045
|
-
<BmCustomCardTitle
|
|
1046
|
-
icon={CheckIcon}
|
|
1047
|
-
themeColor="#33B1BA"
|
|
1048
|
-
title="Appointment Confirmed!"
|
|
1049
|
-
description="Your booking has been successfully scheduled"
|
|
1050
|
-
variant="confirmation"
|
|
1051
|
-
withStripe
|
|
1052
|
-
/>
|
|
1053
|
-
</div>
|
|
1054
|
-
</div>
|
|
959
|
+
<BmSelector
|
|
960
|
+
data={slots}
|
|
961
|
+
selectedDataId={selectedSlotId}
|
|
962
|
+
onChange={setSelectedSlotId}
|
|
963
|
+
icon={AccessTimeIcon}
|
|
964
|
+
themeColor="#33B1BA"
|
|
965
|
+
/>
|
|
966
|
+
|
|
1055
967
|
<div style={{ maxWidth: '600px', margin: '2rem auto' }}>
|
|
1056
968
|
<div style={{ padding: '2rem' }}>
|
|
1057
969
|
<h1>Progress Indicator Demo</h1>
|
|
@@ -1088,20 +1000,13 @@ const Chat = () => {
|
|
|
1088
1000
|
</BmCardv2.Description>
|
|
1089
1001
|
</BmCardv2.Header>
|
|
1090
1002
|
<BmCardv2.Content>
|
|
1091
|
-
<
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
{/* <BmInfoPanel>
|
|
1099
|
-
// <BmInfoPanel.Section
|
|
1100
|
-
// title="Appointment Details"
|
|
1101
|
-
// icon={CalendarTodayIcon}
|
|
1102
|
-
// backgroundColor="#fcba03"
|
|
1103
|
-
// iconColor="#fcba03"
|
|
1104
|
-
// >
|
|
1003
|
+
<BmInfoPanel>
|
|
1004
|
+
<BmInfoPanel.Section
|
|
1005
|
+
title="Appointment Details"
|
|
1006
|
+
icon={CalendarTodayIcon}
|
|
1007
|
+
backgroundColor="#fcba03"
|
|
1008
|
+
iconColor="#fcba03"
|
|
1009
|
+
>
|
|
1105
1010
|
<BmInfoPanel.SectionSummary
|
|
1106
1011
|
iconColor="#33B1BA"
|
|
1107
1012
|
textColor="#fcba03"
|
|
@@ -1116,20 +1021,52 @@ const Chat = () => {
|
|
|
1116
1021
|
subtitle="Department"
|
|
1117
1022
|
/>
|
|
1118
1023
|
</BmInfoPanel.Section>
|
|
1119
|
-
</BmInfoPanel>
|
|
1120
|
-
<BmInfoPanel
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1024
|
+
</BmInfoPanel>
|
|
1025
|
+
<BmInfoPanel>
|
|
1026
|
+
{/* <BmInfoPanel.Section
|
|
1027
|
+
title="Appointment Details"
|
|
1028
|
+
icon={CalendarTodayIcon}
|
|
1029
|
+
background_color="rgba(51, 177, 186, 0.05)"
|
|
1030
|
+
>
|
|
1031
|
+
<BmInfoPanel.Row label="Type" value={appointmentDetails.title} />
|
|
1032
|
+
<BmInfoPanel.Row
|
|
1033
|
+
label="Department"
|
|
1034
|
+
value={formData.departmentName}
|
|
1035
|
+
/>
|
|
1036
|
+
<BmInfoPanel.Row label="Resource" value={formData.resourceName} />
|
|
1037
|
+
<BmInfoPanel.Row
|
|
1038
|
+
label="Duration"
|
|
1039
|
+
value={appointmentDetails.duration}
|
|
1040
|
+
/>
|
|
1041
|
+
<BmInfoPanel.Row
|
|
1042
|
+
label="Date"
|
|
1043
|
+
value={formData.date.toDateString()}
|
|
1044
|
+
/>
|
|
1045
|
+
<BmInfoPanel.Row
|
|
1046
|
+
label="Time"
|
|
1047
|
+
value={formData.timeSlot.split(' - ')[1]}
|
|
1048
|
+
/>
|
|
1049
|
+
</BmInfoPanel.Section> */}
|
|
1050
|
+
|
|
1051
|
+
{/* <BmInfoPanel.Section
|
|
1052
|
+
title="Personal Information"
|
|
1053
|
+
icon={PersonIcon}
|
|
1054
|
+
showDivider
|
|
1055
|
+
>
|
|
1056
|
+
<BmInfoPanel.Row label="Name" value={formData.name} />
|
|
1057
|
+
<BmInfoPanel.Row label="Phone" value={formData.phone} />
|
|
1058
|
+
<BmInfoPanel.Row label="Email" value={formData.email} />
|
|
1059
|
+
</BmInfoPanel.Section>
|
|
1060
|
+
<BmInfoPanel.Section
|
|
1061
|
+
title="Personal Information"
|
|
1062
|
+
icon={PersonIcon}
|
|
1063
|
+
showDivider
|
|
1064
|
+
>
|
|
1065
|
+
<BmInfoPanel.Row label="Name" value={formData.name} />
|
|
1066
|
+
<BmInfoPanel.Row label="Phone" value={formData.phone} />
|
|
1067
|
+
<BmInfoPanel.Row label="Email" value={formData.email} />
|
|
1068
|
+
</BmInfoPanel.Section> */}
|
|
1069
|
+
</BmInfoPanel>
|
|
1133
1070
|
</BmCardv2.Content>
|
|
1134
1071
|
<BmCardv2.Footer>
|
|
1135
1072
|
<BmButton
|
package/src/fonts.scss
CHANGED
|
@@ -25,10 +25,4 @@
|
|
|
25
25
|
@font-face {
|
|
26
26
|
font-family: 'OpenSans';
|
|
27
27
|
src: url('../src/fonts/OpenSans-Regular.ttf');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
@font-face {
|
|
32
|
-
font-family: 'Inter';
|
|
33
|
-
src: url('../src/fonts/Inter-regular.woff2')format('woff2'),url('../src/fonts/Inter-Bold.woff2')format('woff2'),url('../src/fonts/Inter-ExtraBold.woff2')format('woff2'),url('../src/fonts/Inter-ExtraLight.woff2')format('woff2'),url('../src/fonts/Inter-medium.woff2')format('woff2'),url('../src/fonts/Inter-SemiBold.woff2')format('woff2');
|
|
34
28
|
}
|
|
@@ -120,24 +120,11 @@ const BmSelector = ({
|
|
|
120
120
|
textColor,
|
|
121
121
|
fontWeight,
|
|
122
122
|
name = 'selection',
|
|
123
|
-
useFormik = false,
|
|
124
123
|
}) => {
|
|
125
124
|
return (
|
|
126
125
|
<RadioGroupWrapper>
|
|
127
126
|
{data.map((item) => {
|
|
128
127
|
const isSelected = selectedDataId === item.id;
|
|
129
|
-
const handleChange = () => {
|
|
130
|
-
if (useFormik) {
|
|
131
|
-
onChange({
|
|
132
|
-
target: {
|
|
133
|
-
name,
|
|
134
|
-
value: item.id,
|
|
135
|
-
},
|
|
136
|
-
});
|
|
137
|
-
} else {
|
|
138
|
-
onChange(item.id);
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
128
|
|
|
142
129
|
return (
|
|
143
130
|
<label key={item.id} htmlFor={item.id}>
|
|
@@ -146,7 +133,7 @@ const BmSelector = ({
|
|
|
146
133
|
name={name}
|
|
147
134
|
value={item.id}
|
|
148
135
|
checked={isSelected}
|
|
149
|
-
onChange={
|
|
136
|
+
onChange={() => onChange(item.id)}
|
|
150
137
|
/>
|
|
151
138
|
<TimeSlotCard selected={isSelected} themeColor={themeColor}>
|
|
152
139
|
<CustomRadio selected={isSelected} themeColor={themeColor} />
|
|
@@ -44,10 +44,6 @@ export default {
|
|
|
44
44
|
},
|
|
45
45
|
],
|
|
46
46
|
},
|
|
47
|
-
useFormik: {
|
|
48
|
-
control: { type: 'boolean' },
|
|
49
|
-
defaultValue: false,
|
|
50
|
-
},
|
|
51
47
|
},
|
|
52
48
|
};
|
|
53
49
|
|
|
@@ -93,7 +89,6 @@ Default.args = {
|
|
|
93
89
|
value: { startDate: '09:00 AM', endDate: '09:30 AM' },
|
|
94
90
|
},
|
|
95
91
|
],
|
|
96
|
-
useFormik: false,
|
|
97
92
|
|
|
98
93
|
themeColor: '#33B1BA',
|
|
99
94
|
textColor: '#33B1BA',
|
|
@@ -115,13 +110,9 @@ export const Example = () => {
|
|
|
115
110
|
},
|
|
116
111
|
];
|
|
117
112
|
|
|
118
|
-
// When you use useFormik as true then you need to pass handleChange func and the name [name="time"].
|
|
119
|
-
// so that is works accordingly
|
|
120
|
-
|
|
121
113
|
const [selectedDataId, setSelectedDataId] = useState(null);
|
|
122
114
|
return (
|
|
123
115
|
<BmSelector
|
|
124
|
-
name="time"
|
|
125
116
|
data={slots}
|
|
126
117
|
selectedDataId={selectedDataId}
|
|
127
118
|
onChange={setSelectedDataId}
|
|
@@ -129,7 +120,6 @@ export const Example = () => {
|
|
|
129
120
|
themeColor="#33B1BA"
|
|
130
121
|
textColor="#33B1BA"
|
|
131
122
|
fontWeight="600"
|
|
132
|
-
useFormik="false"
|
|
133
123
|
/>
|
|
134
124
|
);
|
|
135
125
|
};
|
|
@@ -54,31 +54,11 @@ const Description = styled.p`
|
|
|
54
54
|
`;
|
|
55
55
|
|
|
56
56
|
const Content = styled.div`
|
|
57
|
-
min-height: 180px;
|
|
58
57
|
padding: 0 1.5rem;
|
|
59
|
-
max-height: calc(100vh - 28.5714rem);
|
|
60
|
-
overflow-y: auto;
|
|
61
|
-
|
|
62
|
-
scrollbar-width: thin;
|
|
63
|
-
scrollbar-color: ${() => hexToRgba('#33b1ba', 0.2)} transparent;
|
|
64
|
-
|
|
65
|
-
&::-webkit-scrollbar-thumb {
|
|
66
|
-
background: ${() => hexToRgba('#33b1ba', 0.3)};
|
|
67
|
-
border-radius: 0.6429rem;
|
|
68
|
-
transition: background 0.2s ease;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
72
|
-
background: ${() => hexToRgba('#33b1ba', 0.3)};
|
|
73
|
-
}
|
|
74
58
|
|
|
75
59
|
&:last-child {
|
|
76
60
|
padding-bottom: 1.5rem;
|
|
77
61
|
}
|
|
78
|
-
|
|
79
|
-
@media (max-width: 54.8571rem) {
|
|
80
|
-
max-height: calc(100vh - 17.8572rem);
|
|
81
|
-
}
|
|
82
62
|
`;
|
|
83
63
|
|
|
84
64
|
const Footer = styled.div`
|
|
@@ -53,8 +53,8 @@ const IconBox = styled.div`
|
|
|
53
53
|
color: ${({ iconColor }) => iconColor || '#00000'};
|
|
54
54
|
|
|
55
55
|
@media (min-width: 45.7143rem) {
|
|
56
|
-
height: 1.
|
|
57
|
-
width: 1.
|
|
56
|
+
height: 1.5rem;
|
|
57
|
+
width: 1.5rem;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
`;
|
|
@@ -81,7 +81,7 @@ const SummarySubtitle = styled.p`
|
|
|
81
81
|
`;
|
|
82
82
|
|
|
83
83
|
const SectionContainer = styled.div`
|
|
84
|
-
padding: 0.
|
|
84
|
+
padding: 0.75rem 1rem;
|
|
85
85
|
display: flex;
|
|
86
86
|
align-items: center;
|
|
87
87
|
gap: 0.5rem;
|
|
@@ -134,7 +134,8 @@ const RowContainer = styled.div`
|
|
|
134
134
|
`;
|
|
135
135
|
|
|
136
136
|
const Label = styled.span`
|
|
137
|
-
color:
|
|
137
|
+
color: rgba(0, 0, 0, 0.6);
|
|
138
|
+
|
|
138
139
|
@media (max-width: 42.8571rem) {
|
|
139
140
|
font-size: 0.75rem;
|
|
140
141
|
}
|
|
@@ -142,7 +143,7 @@ const Label = styled.span`
|
|
|
142
143
|
|
|
143
144
|
const Value = styled.span`
|
|
144
145
|
font-weight: 500;
|
|
145
|
-
|
|
146
|
+
|
|
146
147
|
@media (max-width: 42.8571rem) {
|
|
147
148
|
font-size: 0.75rem;
|
|
148
149
|
}
|
|
@@ -150,20 +151,7 @@ const Value = styled.span`
|
|
|
150
151
|
|
|
151
152
|
const Divider = styled.hr`
|
|
152
153
|
border: none;
|
|
153
|
-
border-top:
|
|
154
|
-
showDivider,
|
|
155
|
-
dividerColor = '#33b1ba',
|
|
156
|
-
dividerType = 'dashed',
|
|
157
|
-
dividerWitdh = '1px',
|
|
158
|
-
dividerOpacity = '0.2',
|
|
159
|
-
}) => {
|
|
160
|
-
if (showDivider) {
|
|
161
|
-
return `${dividerWitdh} ${dividerType} ${hexToRgba(
|
|
162
|
-
dividerColor,
|
|
163
|
-
dividerOpacity
|
|
164
|
-
)}`;
|
|
165
|
-
}
|
|
166
|
-
}};
|
|
154
|
+
border-top: 0.0714rem dashed rgba(51, 177, 186, 0.2);
|
|
167
155
|
margin: 1rem auto;
|
|
168
156
|
max-width: 97%;
|
|
169
157
|
@media (max-width: 42.8571rem) {
|
|
@@ -201,21 +189,9 @@ const Section = ({
|
|
|
201
189
|
backgroundColor,
|
|
202
190
|
iconColor,
|
|
203
191
|
iconBackgroundColor,
|
|
204
|
-
dividerColor,
|
|
205
|
-
dividerWitdh,
|
|
206
|
-
dividerType,
|
|
207
|
-
dividerOpacity,
|
|
208
192
|
}) => (
|
|
209
193
|
<>
|
|
210
|
-
{showDivider &&
|
|
211
|
-
<Divider
|
|
212
|
-
dividerColor={dividerColor}
|
|
213
|
-
showDivider={showDivider}
|
|
214
|
-
dividerWitdh={dividerWitdh}
|
|
215
|
-
dividerType={dividerType}
|
|
216
|
-
dividerOpacity={dividerOpacity}
|
|
217
|
-
/>
|
|
218
|
-
)}
|
|
194
|
+
{showDivider && <Divider />}
|
|
219
195
|
<SectionContainer backgroundColor={backgroundColor}>
|
|
220
196
|
{Icon && (
|
|
221
197
|
<IconBox
|
|
@@ -231,10 +207,10 @@ const Section = ({
|
|
|
231
207
|
</>
|
|
232
208
|
);
|
|
233
209
|
|
|
234
|
-
const Row = ({ label, value
|
|
210
|
+
const Row = ({ label, value }) => (
|
|
235
211
|
<RowContainer>
|
|
236
|
-
<Label
|
|
237
|
-
<Value
|
|
212
|
+
<Label>{label}:</Label>
|
|
213
|
+
<Value>{value}</Value>
|
|
238
214
|
</RowContainer>
|
|
239
215
|
);
|
|
240
216
|
|
|
@@ -31,16 +31,6 @@ 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
|
-
},
|
|
42
|
-
labelTextColor: { control: 'color' },
|
|
43
|
-
valueTextColor: { control: 'color' },
|
|
44
34
|
},
|
|
45
35
|
};
|
|
46
36
|
|
|
@@ -51,12 +41,6 @@ const Template = ({
|
|
|
51
41
|
iconColor,
|
|
52
42
|
textColor,
|
|
53
43
|
iconBackgroundColor,
|
|
54
|
-
dividerColor,
|
|
55
|
-
dividerOpacity,
|
|
56
|
-
dividerType,
|
|
57
|
-
dividerWidth,
|
|
58
|
-
labelTextColor,
|
|
59
|
-
valueTextColor,
|
|
60
44
|
}) => {
|
|
61
45
|
if (variant === 'summary') {
|
|
62
46
|
return (
|
|
@@ -94,12 +78,7 @@ const Template = ({
|
|
|
94
78
|
<BmInfoPanel.Row label="Resource" value="Dr. Smith" />
|
|
95
79
|
<BmInfoPanel.Row label="Duration" value="30 minutes" />
|
|
96
80
|
<BmInfoPanel.Row label="Date" value="Monday, June 24, 2025" />
|
|
97
|
-
<BmInfoPanel.Row
|
|
98
|
-
labelTextColor={labelTextColor}
|
|
99
|
-
valueTextColor={valueTextColor}
|
|
100
|
-
label="Time"
|
|
101
|
-
value="09:00 AM"
|
|
102
|
-
/>
|
|
81
|
+
<BmInfoPanel.Row label="Time" value="09:00 AM" />
|
|
103
82
|
</BmInfoPanel.Section>
|
|
104
83
|
|
|
105
84
|
<BmInfoPanel.Section
|
|
@@ -107,10 +86,6 @@ const Template = ({
|
|
|
107
86
|
icon={PersonIcon}
|
|
108
87
|
showDivider={showDivider}
|
|
109
88
|
iconColor={iconColor}
|
|
110
|
-
dividerColor={dividerColor}
|
|
111
|
-
dividerType={dividerType}
|
|
112
|
-
dividerOpacity={dividerOpacity}
|
|
113
|
-
dividerWitdh={dividerWidth}
|
|
114
89
|
>
|
|
115
90
|
<BmInfoPanel.Row label="Name" value="John Doe" />
|
|
116
91
|
<BmInfoPanel.Row label="Email" value="john@example.com" />
|
|
@@ -128,12 +103,6 @@ Default.args = {
|
|
|
128
103
|
iconColor: '#33B1BA',
|
|
129
104
|
textColor: '#000000',
|
|
130
105
|
iconBackgroundColor: false,
|
|
131
|
-
dividerColor: '#33b1ba',
|
|
132
|
-
dividerType: 'dashed',
|
|
133
|
-
dividerWidth: '1px',
|
|
134
|
-
dividerOpacity: '0.2',
|
|
135
|
-
labelTextColor: '#e46a8e',
|
|
136
|
-
valueTextColor: '#235e92',
|
|
137
106
|
};
|
|
138
107
|
|
|
139
108
|
export const ExampleSummary = () => {
|
|
@@ -173,12 +142,7 @@ export const ExampleDetails = () => {
|
|
|
173
142
|
<BmInfoPanel.Row label="Type" value={appointmentDetails.title} />
|
|
174
143
|
<BmInfoPanel.Row label="Department" value={formData.departmentName} />
|
|
175
144
|
<BmInfoPanel.Row label="Resource" value={formData.resourceName} />
|
|
176
|
-
<BmInfoPanel.Row
|
|
177
|
-
labelTextColor="#e46a8e"
|
|
178
|
-
valueTextColor="#235e92"
|
|
179
|
-
label="Duration"
|
|
180
|
-
value={appointmentDetails.duration}
|
|
181
|
-
/>
|
|
145
|
+
<BmInfoPanel.Row label="Duration" value={appointmentDetails.duration} />
|
|
182
146
|
<BmInfoPanel.Row label="Date" value={formData.date.toDateString()} />
|
|
183
147
|
<BmInfoPanel.Row
|
|
184
148
|
label="Time"
|
|
@@ -190,10 +154,6 @@ export const ExampleDetails = () => {
|
|
|
190
154
|
title="Personal Information"
|
|
191
155
|
icon={PersonIcon}
|
|
192
156
|
showDivider
|
|
193
|
-
dividerColor="#33b1ba"
|
|
194
|
-
dividerType="dashed"
|
|
195
|
-
dividerWitdh="1px"
|
|
196
|
-
dividerOpacity="0.2"
|
|
197
157
|
>
|
|
198
158
|
<BmInfoPanel.Row label="Name" value={formData.name} />
|
|
199
159
|
<BmInfoPanel.Row label="Phone" value={formData.phone} />
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createGlobalStyle } from 'styled-components';
|
|
2
|
-
import { h1, h2, h3, h4, h5, h6, p, input, a
|
|
2
|
+
import { h1, h2, h3, h4, h5, h6, p, input, a } from './text';
|
|
3
3
|
|
|
4
4
|
export const GlobalStyle = createGlobalStyle`
|
|
5
5
|
* { font-size: 14px; cursor: pointer}
|
|
@@ -12,5 +12,4 @@ export const GlobalStyle = createGlobalStyle`
|
|
|
12
12
|
p { ${p} }
|
|
13
13
|
input {${input}}
|
|
14
14
|
a {${a}}
|
|
15
|
-
span {${span}}
|
|
16
15
|
`;
|
|
@@ -81,8 +81,6 @@ import BmLabelWithIcon from './LabelWithIcon/LabelWithIcon';
|
|
|
81
81
|
import { BmCardv2 } from './Card_v2/Card';
|
|
82
82
|
import BmInfoPanel from './InfoPanel/InfoPanel';
|
|
83
83
|
import BmSelector from './BmSelector/BmSelector';
|
|
84
|
-
import BmCustomCardTitle from './BmCustomCardTitle/CustomCardTitle';
|
|
85
|
-
import BmAlertBox from './Alert/Alert';
|
|
86
84
|
|
|
87
85
|
export {
|
|
88
86
|
BmAccordion,
|
|
@@ -161,6 +159,4 @@ export {
|
|
|
161
159
|
BmInfoPanel,
|
|
162
160
|
BmProgressIndicator,
|
|
163
161
|
BmSelector,
|
|
164
|
-
BmCustomCardTitle,
|
|
165
|
-
BmAlertBox,
|
|
166
162
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OpenSans } from './typography';
|
|
2
|
+
|
|
2
3
|
// 32px
|
|
3
|
-
export const h1 = `font-family: ${
|
|
4
|
+
export const h1 = `font-family: ${OpenSans};
|
|
4
5
|
font-style: normal;
|
|
5
6
|
font-weight: 500;
|
|
6
7
|
font-size: 2.286rem;
|
|
@@ -8,7 +9,7 @@ letter-spacing: -0.02rem;
|
|
|
8
9
|
margin: 0rem;`;
|
|
9
10
|
|
|
10
11
|
// 24px
|
|
11
|
-
export const h2 = `font-family: ${
|
|
12
|
+
export const h2 = `font-family: ${OpenSans};
|
|
12
13
|
font-style: normal;
|
|
13
14
|
font-weight: 500;
|
|
14
15
|
font-size: 1.714rem;
|
|
@@ -16,7 +17,7 @@ letter-spacing: -0.02em;
|
|
|
16
17
|
margin: 0rem;`;
|
|
17
18
|
|
|
18
19
|
// 18px
|
|
19
|
-
export const h3 = `font-family: ${
|
|
20
|
+
export const h3 = `font-family: ${OpenSans};
|
|
20
21
|
font-style: normal;
|
|
21
22
|
font-weight: 500;
|
|
22
23
|
font-size: 1.286rem;
|
|
@@ -24,7 +25,7 @@ letter-spacing: -0.02rem;
|
|
|
24
25
|
margin: 0rem;`;
|
|
25
26
|
|
|
26
27
|
// 16px
|
|
27
|
-
export const h4 = ` font-family: ${
|
|
28
|
+
export const h4 = ` font-family: ${OpenSans};
|
|
28
29
|
font-style: normal;
|
|
29
30
|
font-weight: 500;
|
|
30
31
|
font-size: 1.143rem;
|
|
@@ -32,7 +33,7 @@ letter-spacing: -0.02rem;
|
|
|
32
33
|
margin: 0rem;`;
|
|
33
34
|
|
|
34
35
|
// 14px
|
|
35
|
-
export const h5 = ` font-family: ${
|
|
36
|
+
export const h5 = ` font-family: ${OpenSans};
|
|
36
37
|
font-style: normal;
|
|
37
38
|
font-weight: 500;
|
|
38
39
|
font-size: 1rem;
|
|
@@ -40,7 +41,7 @@ letter-spacing: -0.02rem;
|
|
|
40
41
|
margin: 0rem;`;
|
|
41
42
|
|
|
42
43
|
// 12px
|
|
43
|
-
export const h6 = ` font-family: ${
|
|
44
|
+
export const h6 = ` font-family: ${OpenSans};
|
|
44
45
|
font-style: normal;
|
|
45
46
|
font-weight: 500;
|
|
46
47
|
font-size: .857rem;
|
|
@@ -48,28 +49,21 @@ letter-spacing: -0.02rem;
|
|
|
48
49
|
margin: 0rem;`;
|
|
49
50
|
|
|
50
51
|
// 14px
|
|
51
|
-
export const p = `font-family: ${
|
|
52
|
-
font-style: normal;
|
|
53
|
-
font-weight: normal;
|
|
54
|
-
font-size: 1rem;
|
|
55
|
-
letter-spacing: -0.02rem;
|
|
56
|
-
margin: 0rem;`;
|
|
57
|
-
|
|
58
|
-
export const input = ` font-family: ${Inter};
|
|
52
|
+
export const p = `font-family: ${OpenSans};
|
|
59
53
|
font-style: normal;
|
|
60
54
|
font-weight: normal;
|
|
61
55
|
font-size: 1rem;
|
|
62
56
|
letter-spacing: -0.02rem;
|
|
63
57
|
margin: 0rem;`;
|
|
64
58
|
|
|
65
|
-
export const
|
|
59
|
+
export const input = ` font-family: ${OpenSans};
|
|
66
60
|
font-style: normal;
|
|
67
61
|
font-weight: normal;
|
|
68
62
|
font-size: 1rem;
|
|
69
63
|
letter-spacing: -0.02rem;
|
|
70
64
|
margin: 0rem;`;
|
|
71
65
|
|
|
72
|
-
export const
|
|
66
|
+
export const a = `font-family: ${OpenSans};
|
|
73
67
|
font-style: normal;
|
|
74
68
|
font-weight: normal;
|
|
75
69
|
font-size: 1rem;
|