beem-component 2.1.8 → 2.1.28
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 -3
- package/Jenkinsfile +5 -20
- package/dist/components/BmSelector/BmSelector.js +4 -31
- package/dist/components/BmSelector/BmSelector.stories.js +1 -14
- package/dist/components/Card_v2/Card.js +3 -17
- package/dist/components/InfoPanel/InfoPanel.js +21 -72
- package/dist/components/InfoPanel/InfoPanel.stories.js +4 -56
- package/dist/components/ProgressIndicator/ProgressIndicator.js +3 -17
- package/dist/components/SelectionNotice/SelectionNotice.js +3 -17
- 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/nginx.conf +12 -26
- 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 +2 -34
- package/src/lib/components/BmSelector/BmSelector.stories.jsx +0 -10
- package/src/lib/components/Card_v2/Card.js +1 -39
- package/src/lib/components/InfoPanel/InfoPanel.js +12 -55
- package/src/lib/components/InfoPanel/InfoPanel.stories.jsx +2 -42
- package/src/lib/components/ProgressIndicator/ProgressIndicator.js +1 -19
- package/src/lib/components/SelectionNotice/SelectionNotice.js +1 -19
- 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
|
@@ -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,25 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
try {
|
|
6
|
-
const normalizedHex = hex?.replace('#', '');
|
|
7
|
-
if (
|
|
8
|
-
!normalizedHex ||
|
|
9
|
-
normalizedHex.length !== 6 ||
|
|
10
|
-
!/^[0-9a-fA-F]{6}$/.test(normalizedHex)
|
|
11
|
-
) {
|
|
12
|
-
throw new Error('Invalid hex');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const r = parseInt(normalizedHex.slice(0, 2), 16);
|
|
16
|
-
const g = parseInt(normalizedHex.slice(2, 4), 16);
|
|
17
|
-
const b = parseInt(normalizedHex.slice(4, 6), 16);
|
|
18
|
-
return `rgba(${r}, ${g}, ${b}, ${opacity})`;
|
|
19
|
-
} catch (e) {
|
|
20
|
-
return `rgba(0, 0, 0, ${opacity})`;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
4
|
+
import hexToRgba from '../../../util/convertToRGBA';
|
|
23
5
|
|
|
24
6
|
const Container = styled.div`
|
|
25
7
|
margin-bottom: 1rem;
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
try {
|
|
6
|
-
const normalizedHex = hex?.replace('#', '');
|
|
7
|
-
if (
|
|
8
|
-
!normalizedHex ||
|
|
9
|
-
normalizedHex.length !== 6 ||
|
|
10
|
-
!/^[0-9a-fA-F]{6}$/.test(normalizedHex)
|
|
11
|
-
) {
|
|
12
|
-
throw new Error('Invalid hex');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const r = parseInt(normalizedHex.slice(0, 2), 16);
|
|
16
|
-
const g = parseInt(normalizedHex.slice(2, 4), 16);
|
|
17
|
-
const b = parseInt(normalizedHex.slice(4, 6), 16);
|
|
18
|
-
return `rgba(${r}, ${g}, ${b}, ${opacity})`;
|
|
19
|
-
} catch (e) {
|
|
20
|
-
return `rgba(0, 0, 0, ${opacity})`;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
4
|
+
import hexToRgba from '../../../util/convertToRGBA';
|
|
23
5
|
|
|
24
6
|
const Container = styled.div`
|
|
25
7
|
background-color: ${({ color }) => hexToRgba(color || '#33B1BA', 0.05)};
|
|
@@ -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;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
const hexToRgba = function (hex) {
|
|
11
|
-
let opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.6;
|
|
12
|
-
try {
|
|
13
|
-
const normalizedHex = hex === null || hex === void 0 ? void 0 : hex.replace('#', '');
|
|
14
|
-
if (!normalizedHex || normalizedHex.length !== 6 || !/^[0-9a-fA-F]{6}$/.test(normalizedHex)) {
|
|
15
|
-
throw new Error('Invalid hex');
|
|
16
|
-
}
|
|
17
|
-
const r = parseInt(normalizedHex.slice(0, 2), 16);
|
|
18
|
-
const g = parseInt(normalizedHex.slice(2, 4), 16);
|
|
19
|
-
const b = parseInt(normalizedHex.slice(4, 6), 16);
|
|
20
|
-
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(opacity, ")");
|
|
21
|
-
} catch (e) {
|
|
22
|
-
return "rgba(0, 0, 0, ".concat(opacity, ")");
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
const AlertWrapper = _styledComponents.default.div.withConfig({
|
|
26
|
-
displayName: "Alert__AlertWrapper"
|
|
27
|
-
})(["border:1px solid ", ";background-color:", ";border-radius:0.5rem;padding:0.75rem;@media (min-width:640px){padding:1rem;}"], _ref => {
|
|
28
|
-
let {
|
|
29
|
-
themeColor
|
|
30
|
-
} = _ref;
|
|
31
|
-
return hexToRgba(themeColor, 0.2);
|
|
32
|
-
}, _ref2 => {
|
|
33
|
-
let {
|
|
34
|
-
themeColor
|
|
35
|
-
} = _ref2;
|
|
36
|
-
return hexToRgba(themeColor, 0.05);
|
|
37
|
-
});
|
|
38
|
-
const Content = _styledComponents.default.div.withConfig({
|
|
39
|
-
displayName: "Alert__Content"
|
|
40
|
-
})(["display:flex;align-items:flex-start;gap:0.75rem;"]);
|
|
41
|
-
const IconContainer = _styledComponents.default.div.withConfig({
|
|
42
|
-
displayName: "Alert__IconContainer"
|
|
43
|
-
})(["background-color:", ";border-radius:9999px;display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;margin-top:0.125rem;@media (min-width:640px){width:2.1rem;height:2.1rem;}svg{width:1rem;height:1rem;color:", ";@media (min-width:640px){width:1.25rem;height:1.25rem;}}"], _ref3 => {
|
|
44
|
-
let {
|
|
45
|
-
themeColor
|
|
46
|
-
} = _ref3;
|
|
47
|
-
return hexToRgba(themeColor, 0.1);
|
|
48
|
-
}, _ref4 => {
|
|
49
|
-
let {
|
|
50
|
-
themeColor
|
|
51
|
-
} = _ref4;
|
|
52
|
-
return themeColor;
|
|
53
|
-
});
|
|
54
|
-
const TextContent = _styledComponents.default.div.withConfig({
|
|
55
|
-
displayName: "Alert__TextContent"
|
|
56
|
-
})(["flex:1;"]);
|
|
57
|
-
const Title = _styledComponents.default.h3.withConfig({
|
|
58
|
-
displayName: "Alert__Title"
|
|
59
|
-
})(["font-weight:500;color:", ";font-size:0.875rem;margin-bottom:0.25rem;"], _ref5 => {
|
|
60
|
-
let {
|
|
61
|
-
themeColor
|
|
62
|
-
} = _ref5;
|
|
63
|
-
return themeColor;
|
|
64
|
-
});
|
|
65
|
-
const Description = _styledComponents.default.p.withConfig({
|
|
66
|
-
displayName: "Alert__Description"
|
|
67
|
-
})(["color:#6b7280;font-size:0.75rem;@media (min-width:640px){font-size:0.875rem;}"]);
|
|
68
|
-
const BmAlertBox = _ref6 => {
|
|
69
|
-
let {
|
|
70
|
-
icon: Icon,
|
|
71
|
-
themeColor = '#EF4444',
|
|
72
|
-
title,
|
|
73
|
-
description
|
|
74
|
-
} = _ref6;
|
|
75
|
-
return /*#__PURE__*/_react.default.createElement(AlertWrapper, {
|
|
76
|
-
themeColor: themeColor
|
|
77
|
-
}, /*#__PURE__*/_react.default.createElement(Content, null, Icon && /*#__PURE__*/_react.default.createElement(IconContainer, {
|
|
78
|
-
themeColor: themeColor
|
|
79
|
-
}, /*#__PURE__*/_react.default.createElement(Icon, null)), /*#__PURE__*/_react.default.createElement(TextContent, null, /*#__PURE__*/_react.default.createElement(Title, {
|
|
80
|
-
themeColor: themeColor
|
|
81
|
-
}, title), /*#__PURE__*/_react.default.createElement(Description, null, description))));
|
|
82
|
-
};
|
|
83
|
-
var _default = exports.default = BmAlertBox;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.Example = exports.Default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _AccessTime = _interopRequireDefault(require("@mui/icons-material/AccessTime"));
|
|
9
|
-
var _Person = _interopRequireDefault(require("@mui/icons-material/Person"));
|
|
10
|
-
var _CalendarTodayOutlined = _interopRequireDefault(require("@mui/icons-material/CalendarTodayOutlined"));
|
|
11
|
-
var _Alert = _interopRequireDefault(require("./Alert"));
|
|
12
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
const iconOptions = {
|
|
14
|
-
AccessTimeIcon: _AccessTime.default,
|
|
15
|
-
PersonIcon: _Person.default,
|
|
16
|
-
CalendarTodayOutlinedIcon: _CalendarTodayOutlined.default,
|
|
17
|
-
None: null
|
|
18
|
-
};
|
|
19
|
-
const Template = args => {
|
|
20
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
21
|
-
style: {
|
|
22
|
-
maxWidth: 500,
|
|
23
|
-
margin: '2rem auto'
|
|
24
|
-
}
|
|
25
|
-
}, /*#__PURE__*/_react.default.createElement(_Alert.default, args));
|
|
26
|
-
};
|
|
27
|
-
const Default = exports.Default = Template.bind({});
|
|
28
|
-
Default.args = {
|
|
29
|
-
icon: _AccessTime.default,
|
|
30
|
-
themeColor: '#EF4444',
|
|
31
|
-
title: 'Submission Failed',
|
|
32
|
-
description: 'There was an issue processing your request. Please try again later.'
|
|
33
|
-
};
|
|
34
|
-
Default.argTypes = {
|
|
35
|
-
icon: {
|
|
36
|
-
control: {
|
|
37
|
-
type: 'select',
|
|
38
|
-
labels: Object.keys(iconOptions)
|
|
39
|
-
},
|
|
40
|
-
options: Object.keys(iconOptions),
|
|
41
|
-
mapping: iconOptions
|
|
42
|
-
},
|
|
43
|
-
themeColor: {
|
|
44
|
-
control: 'color'
|
|
45
|
-
},
|
|
46
|
-
title: {
|
|
47
|
-
control: 'text'
|
|
48
|
-
},
|
|
49
|
-
description: {
|
|
50
|
-
control: 'text'
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
var _default = exports.default = {
|
|
54
|
-
title: 'Components/BmAlertBox',
|
|
55
|
-
component: _Alert.default,
|
|
56
|
-
argTypes: Default.argTypes
|
|
57
|
-
};
|
|
58
|
-
const Example = () => {
|
|
59
|
-
return /*#__PURE__*/_react.default.createElement(_Alert.default, {
|
|
60
|
-
icon: _AccessTime.default,
|
|
61
|
-
themeColor: "#DC2626",
|
|
62
|
-
title: "Payment Error",
|
|
63
|
-
description: "We couldn't process your payment. Please try again later or contact support."
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
exports.Example = Example;
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
const hexToRgba = function (hex) {
|
|
11
|
-
let opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.6;
|
|
12
|
-
try {
|
|
13
|
-
const normalizedHex = hex === null || hex === void 0 ? void 0 : hex.replace('#', '');
|
|
14
|
-
if (!normalizedHex || normalizedHex.length !== 6 || !/^[0-9a-fA-F]{6}$/.test(normalizedHex)) {
|
|
15
|
-
throw new Error('Invalid hex');
|
|
16
|
-
}
|
|
17
|
-
const r = parseInt(normalizedHex.slice(0, 2), 16);
|
|
18
|
-
const g = parseInt(normalizedHex.slice(2, 4), 16);
|
|
19
|
-
const b = parseInt(normalizedHex.slice(4, 6), 16);
|
|
20
|
-
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(opacity, ")");
|
|
21
|
-
} catch (e) {
|
|
22
|
-
return "rgba(0, 0, 0, ".concat(opacity, ")");
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
const BackgroundStripe = _styledComponents.default.div.withConfig({
|
|
26
|
-
displayName: "CustomCardTitle__BackgroundStripe"
|
|
27
|
-
})(["background-color:", ";padding-top:", ";padding-bottom:", ";padding-left:1rem;padding-right:1rem;@media (min-width:640px){padding-top:", ";padding-bottom:", ";padding-left:1.5rem;padding-right:1.5rem;}"], _ref => {
|
|
28
|
-
let {
|
|
29
|
-
themeColor
|
|
30
|
-
} = _ref;
|
|
31
|
-
return hexToRgba(themeColor, 0.1);
|
|
32
|
-
}, _ref2 => {
|
|
33
|
-
let {
|
|
34
|
-
variant
|
|
35
|
-
} = _ref2;
|
|
36
|
-
return variant === 'confirmation' ? '1rem' : '1.5rem';
|
|
37
|
-
}, _ref3 => {
|
|
38
|
-
let {
|
|
39
|
-
variant
|
|
40
|
-
} = _ref3;
|
|
41
|
-
return variant === 'confirmation' ? '1rem' : '2rem';
|
|
42
|
-
}, _ref4 => {
|
|
43
|
-
let {
|
|
44
|
-
variant
|
|
45
|
-
} = _ref4;
|
|
46
|
-
return variant === 'confirmation' ? '1.5rem' : '2rem';
|
|
47
|
-
}, _ref5 => {
|
|
48
|
-
let {
|
|
49
|
-
variant
|
|
50
|
-
} = _ref5;
|
|
51
|
-
return variant === 'confirmation' ? '1.5rem' : '2.5rem';
|
|
52
|
-
});
|
|
53
|
-
const CardContainer = _styledComponents.default.div.withConfig({
|
|
54
|
-
displayName: "CustomCardTitle__CardContainer"
|
|
55
|
-
})(["background-color:", ";padding:1rem;border-radius:0.75rem;@media (min-width:640px){padding:1.5rem;}"], hexToRgba('#ffffff', 0.7));
|
|
56
|
-
const IconWrapper = _styledComponents.default.div.withConfig({
|
|
57
|
-
displayName: "CustomCardTitle__IconWrapper"
|
|
58
|
-
})(["background-color:", ";height:", ";width:", ";border-radius:9999px;display:flex;align-items:center;justify-content:center;margin:0 auto ", ";@media (min-width:640px){height:", ";width:", ";margin-bottom:", ";}svg{height:", ";width:", ";color:", ";@media (min-width:640px){height:", ";width:", ";}}"], _ref6 => {
|
|
59
|
-
let {
|
|
60
|
-
themeColor
|
|
61
|
-
} = _ref6;
|
|
62
|
-
return hexToRgba(themeColor, 0.1);
|
|
63
|
-
}, _ref7 => {
|
|
64
|
-
let {
|
|
65
|
-
variant
|
|
66
|
-
} = _ref7;
|
|
67
|
-
return variant === 'confirmation' ? '3.5rem' : '4rem';
|
|
68
|
-
}, _ref8 => {
|
|
69
|
-
let {
|
|
70
|
-
variant
|
|
71
|
-
} = _ref8;
|
|
72
|
-
return variant === 'confirmation' ? '3.5rem' : '4rem';
|
|
73
|
-
}, _ref9 => {
|
|
74
|
-
let {
|
|
75
|
-
variant
|
|
76
|
-
} = _ref9;
|
|
77
|
-
return variant === 'confirmation' ? '0.75rem' : '1rem';
|
|
78
|
-
}, _ref0 => {
|
|
79
|
-
let {
|
|
80
|
-
variant
|
|
81
|
-
} = _ref0;
|
|
82
|
-
return variant === 'confirmation' ? '4rem' : '5rem';
|
|
83
|
-
}, _ref1 => {
|
|
84
|
-
let {
|
|
85
|
-
variant
|
|
86
|
-
} = _ref1;
|
|
87
|
-
return variant === 'confirmation' ? '4rem' : '5rem';
|
|
88
|
-
}, _ref10 => {
|
|
89
|
-
let {
|
|
90
|
-
variant
|
|
91
|
-
} = _ref10;
|
|
92
|
-
return variant === 'confirmation' ? '1rem' : '1.25rem';
|
|
93
|
-
}, _ref11 => {
|
|
94
|
-
let {
|
|
95
|
-
variant
|
|
96
|
-
} = _ref11;
|
|
97
|
-
return variant === 'confirmation' ? '1.75rem' : '2rem';
|
|
98
|
-
}, _ref12 => {
|
|
99
|
-
let {
|
|
100
|
-
variant
|
|
101
|
-
} = _ref12;
|
|
102
|
-
return variant === 'confirmation' ? '1.75rem' : '2rem';
|
|
103
|
-
}, _ref13 => {
|
|
104
|
-
let {
|
|
105
|
-
themeColor
|
|
106
|
-
} = _ref13;
|
|
107
|
-
return themeColor;
|
|
108
|
-
}, _ref14 => {
|
|
109
|
-
let {
|
|
110
|
-
variant
|
|
111
|
-
} = _ref14;
|
|
112
|
-
return variant === 'confirmation' ? '2rem' : '2.5rem';
|
|
113
|
-
}, _ref15 => {
|
|
114
|
-
let {
|
|
115
|
-
variant
|
|
116
|
-
} = _ref15;
|
|
117
|
-
return variant === 'confirmation' ? '2rem' : '2.5rem';
|
|
118
|
-
});
|
|
119
|
-
const Title = _styledComponents.default.h2.withConfig({
|
|
120
|
-
displayName: "CustomCardTitle__Title"
|
|
121
|
-
})(["text-align:center;font-size:1.125rem;color:", ";margin-bottom:", ";@media (min-width:640px){font-size:1.25rem;margin-bottom:", ";}"], _ref16 => {
|
|
122
|
-
let {
|
|
123
|
-
themeColor
|
|
124
|
-
} = _ref16;
|
|
125
|
-
return themeColor;
|
|
126
|
-
}, _ref17 => {
|
|
127
|
-
let {
|
|
128
|
-
variant
|
|
129
|
-
} = _ref17;
|
|
130
|
-
return variant === 'confirmation' ? '0.25rem' : '0.5rem';
|
|
131
|
-
}, _ref18 => {
|
|
132
|
-
let {
|
|
133
|
-
variant
|
|
134
|
-
} = _ref18;
|
|
135
|
-
return variant === 'confirmation' ? '0.5rem' : '0.75rem';
|
|
136
|
-
});
|
|
137
|
-
const Description = _styledComponents.default.p.withConfig({
|
|
138
|
-
displayName: "CustomCardTitle__Description"
|
|
139
|
-
})(["text-align:center;font-size:", ";color:#6b7280;@media (min-width:640px){font-size:", ";}"], _ref19 => {
|
|
140
|
-
let {
|
|
141
|
-
variant
|
|
142
|
-
} = _ref19;
|
|
143
|
-
return variant === 'confirmation' ? '0.75rem' : '0.875rem';
|
|
144
|
-
}, _ref20 => {
|
|
145
|
-
let {
|
|
146
|
-
variant
|
|
147
|
-
} = _ref20;
|
|
148
|
-
return variant === 'confirmation' ? '0.875rem' : '1rem';
|
|
149
|
-
});
|
|
150
|
-
const BmCustomCardTitle = _ref21 => {
|
|
151
|
-
let {
|
|
152
|
-
icon: Icon,
|
|
153
|
-
themeColor = '#33B1BA',
|
|
154
|
-
title,
|
|
155
|
-
description,
|
|
156
|
-
variant = 'booking',
|
|
157
|
-
withStripe = false
|
|
158
|
-
} = _ref21;
|
|
159
|
-
const content = /*#__PURE__*/_react.default.createElement(CardContainer, {
|
|
160
|
-
variant: variant
|
|
161
|
-
}, /*#__PURE__*/_react.default.createElement(IconWrapper, {
|
|
162
|
-
themeColor: themeColor,
|
|
163
|
-
variant: variant
|
|
164
|
-
}, Icon && /*#__PURE__*/_react.default.createElement(Icon, null)), title && /*#__PURE__*/_react.default.createElement(Title, {
|
|
165
|
-
variant: variant
|
|
166
|
-
}, title), description && /*#__PURE__*/_react.default.createElement(Description, {
|
|
167
|
-
variant: variant
|
|
168
|
-
}, description));
|
|
169
|
-
return withStripe ? /*#__PURE__*/_react.default.createElement(BackgroundStripe, {
|
|
170
|
-
themeColor: themeColor,
|
|
171
|
-
variant: variant
|
|
172
|
-
}, content) : content;
|
|
173
|
-
};
|
|
174
|
-
var _default = exports.default = BmCustomCardTitle;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.Example = exports.Default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _CalendarTodayOutlined = _interopRequireDefault(require("@mui/icons-material/CalendarTodayOutlined"));
|
|
9
|
-
var _Check = _interopRequireDefault(require("@mui/icons-material/Check"));
|
|
10
|
-
var _AccessTime = _interopRequireDefault(require("@mui/icons-material/AccessTime"));
|
|
11
|
-
var _Favorite = _interopRequireDefault(require("@mui/icons-material/Favorite"));
|
|
12
|
-
var _CustomCardTitle = _interopRequireDefault(require("./CustomCardTitle"));
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
// MUI icons
|
|
15
|
-
|
|
16
|
-
// Icon options mapped by name
|
|
17
|
-
const iconOptions = {
|
|
18
|
-
Calendar: _CalendarTodayOutlined.default,
|
|
19
|
-
Check: _Check.default,
|
|
20
|
-
Clock: _AccessTime.default,
|
|
21
|
-
Heart: _Favorite.default
|
|
22
|
-
};
|
|
23
|
-
const Template = args => {
|
|
24
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
25
|
-
style: {
|
|
26
|
-
maxWidth: 500,
|
|
27
|
-
margin: '2rem auto'
|
|
28
|
-
}
|
|
29
|
-
}, /*#__PURE__*/_react.default.createElement(_CustomCardTitle.default, args));
|
|
30
|
-
};
|
|
31
|
-
const Default = exports.Default = Template.bind({});
|
|
32
|
-
Default.args = {
|
|
33
|
-
icon: _CalendarTodayOutlined.default,
|
|
34
|
-
themeColor: '#33B1BA',
|
|
35
|
-
title: 'Book Your Medical Appointment',
|
|
36
|
-
description: 'Schedule a 30-minute consultation with our healthcare specialists',
|
|
37
|
-
variant: 'booking',
|
|
38
|
-
withStripe: true
|
|
39
|
-
};
|
|
40
|
-
Default.argTypes = {
|
|
41
|
-
icon: {
|
|
42
|
-
control: {
|
|
43
|
-
type: 'select',
|
|
44
|
-
labels: Object.keys(iconOptions)
|
|
45
|
-
},
|
|
46
|
-
options: Object.keys(iconOptions),
|
|
47
|
-
mapping: iconOptions
|
|
48
|
-
},
|
|
49
|
-
themeColor: {
|
|
50
|
-
control: 'color'
|
|
51
|
-
},
|
|
52
|
-
title: {
|
|
53
|
-
control: 'text'
|
|
54
|
-
},
|
|
55
|
-
description: {
|
|
56
|
-
control: 'text'
|
|
57
|
-
},
|
|
58
|
-
variant: {
|
|
59
|
-
control: {
|
|
60
|
-
type: 'radio'
|
|
61
|
-
},
|
|
62
|
-
options: ['booking', 'confirmation']
|
|
63
|
-
},
|
|
64
|
-
withStripe: {
|
|
65
|
-
control: {
|
|
66
|
-
type: 'boolean'
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
var _default = exports.default = {
|
|
71
|
-
title: 'Components/BmCustomCardTitle',
|
|
72
|
-
component: _CustomCardTitle.default,
|
|
73
|
-
argTypes: Default.argTypes
|
|
74
|
-
};
|
|
75
|
-
const Example = () => {
|
|
76
|
-
/*#__PURE__*/_react.default.createElement(_CustomCardTitle.default, {
|
|
77
|
-
icon: _CalendarTodayOutlined.default,
|
|
78
|
-
themeColor: "#33B1BA",
|
|
79
|
-
title: "Book Your Medical Appointment",
|
|
80
|
-
description: "Schedule a 30-minute consultation with our healthcare specialists",
|
|
81
|
-
variant: "booking",
|
|
82
|
-
withStripe: true
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
exports.Example = Example;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|