igloo-d2c-components 1.0.18 → 1.0.19
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/dist/cjs/index.js +258 -48
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +258 -48
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/ChildInformationForm/ChildInformationForm.d.ts +1 -1
- package/dist/types/components/OptionButton/OptionButton.d.ts +18 -2
- package/dist/types/components/OptionButton/styled.d.ts +3 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -198,7 +198,191 @@ const cimbTypography = Object.assign(Object.assign({}, iglooTypography), { fontF
|
|
|
198
198
|
/**
|
|
199
199
|
* AmmetLife Typography Configuration
|
|
200
200
|
*/
|
|
201
|
-
const ammetlifeTypography = Object.assign(Object.assign({}, iglooTypography), { fontFamily: '
|
|
201
|
+
const ammetlifeTypography = Object.assign(Object.assign({}, iglooTypography), { fontFamily: 'MetLifeCircular',
|
|
202
|
+
/**
|
|
203
|
+
* AmMetLife Typography Configuration
|
|
204
|
+
* Font: MetLifeCircular
|
|
205
|
+
* Based on Figma Design: Tech-Solution-V1.0 (node 2901-37059)
|
|
206
|
+
*
|
|
207
|
+
* Typography Scale Reference:
|
|
208
|
+
* ===========================
|
|
209
|
+
* DISPLAY (Large promotional text):
|
|
210
|
+
* - Display Large: Bold 64/72
|
|
211
|
+
* - Display Medium: Bold 45/52
|
|
212
|
+
* - Display Small: Bold 34/44
|
|
213
|
+
*
|
|
214
|
+
* HEADLINE PC (Desktop headings):
|
|
215
|
+
* - Headline Large (H1): Bold 30/44
|
|
216
|
+
* - Headline Medium (H2): Bold 22/26
|
|
217
|
+
* - Headline Small (H3): Bold 18/24
|
|
218
|
+
*
|
|
219
|
+
* TITLE MOBILE (Mobile headings):
|
|
220
|
+
* - Title Large (H1): Bold 20/28
|
|
221
|
+
* - Title Medium (H2): Bold 16/24
|
|
222
|
+
* - Title Small (H3): Bold 14/20
|
|
223
|
+
*
|
|
224
|
+
* BODY STRONG (Emphasized body text):
|
|
225
|
+
* - Body Large Strong: Medium 16/20
|
|
226
|
+
* - Body Medium Strong: Medium 14/18
|
|
227
|
+
* - Body Small Strong: Medium 12/16
|
|
228
|
+
*
|
|
229
|
+
* BODY (Regular body text):
|
|
230
|
+
* - Body Large: Normal 16/20
|
|
231
|
+
* - Body Medium: Normal 14/18
|
|
232
|
+
* - Body Small: Normal 12/16
|
|
233
|
+
*/
|
|
234
|
+
fontWeightLight: 300, fontWeightNormal: 400, fontWeightMedium: 500, fontWeightBold: 700,
|
|
235
|
+
/* ========================================
|
|
236
|
+
* DISPLAY VARIANTS
|
|
237
|
+
* For hero banners and large promotional text
|
|
238
|
+
* Font: MetLife Circular Bold
|
|
239
|
+
* ======================================== */
|
|
240
|
+
// Display Large - MetLife Circular Bold 64/72
|
|
241
|
+
displayLargeFigma: {
|
|
242
|
+
fontSize: '64px',
|
|
243
|
+
fontStyle: 'normal',
|
|
244
|
+
fontWeight: 700,
|
|
245
|
+
lineHeight: '72px',
|
|
246
|
+
letterSpacing: 0,
|
|
247
|
+
},
|
|
248
|
+
// Display Medium - MetLife Circular Bold 45/52
|
|
249
|
+
displayMediumFigma: {
|
|
250
|
+
fontSize: '45px',
|
|
251
|
+
fontStyle: 'normal',
|
|
252
|
+
fontWeight: 700,
|
|
253
|
+
lineHeight: '52px',
|
|
254
|
+
letterSpacing: 0,
|
|
255
|
+
},
|
|
256
|
+
// Display Small - MetLife Circular Bold 34/44
|
|
257
|
+
displaySmallFigma: {
|
|
258
|
+
fontSize: '34px',
|
|
259
|
+
fontStyle: 'normal',
|
|
260
|
+
fontWeight: 700,
|
|
261
|
+
lineHeight: '44px',
|
|
262
|
+
letterSpacing: 0,
|
|
263
|
+
},
|
|
264
|
+
/* ========================================
|
|
265
|
+
* HEADLINE VARIANTS (PC/Desktop)
|
|
266
|
+
* For desktop headings
|
|
267
|
+
* Font: MetLife Circular Bold
|
|
268
|
+
* ======================================== */
|
|
269
|
+
// Headline Large (H1) - MetLife Circular Bold 30/44
|
|
270
|
+
headlineLarge: {
|
|
271
|
+
fontSize: '30px',
|
|
272
|
+
fontStyle: 'normal',
|
|
273
|
+
fontWeight: 700,
|
|
274
|
+
lineHeight: '44px',
|
|
275
|
+
letterSpacing: 0,
|
|
276
|
+
},
|
|
277
|
+
// Headline Medium (H2) - MetLife Circular Bold 22/26
|
|
278
|
+
headlineMedium: {
|
|
279
|
+
fontSize: '22px',
|
|
280
|
+
fontStyle: 'normal',
|
|
281
|
+
fontWeight: 700,
|
|
282
|
+
lineHeight: '26px',
|
|
283
|
+
letterSpacing: 0,
|
|
284
|
+
},
|
|
285
|
+
// Headline Small (H3) - MetLife Circular Bold 18/24
|
|
286
|
+
headlineSmall: {
|
|
287
|
+
fontSize: '18px',
|
|
288
|
+
fontStyle: 'normal',
|
|
289
|
+
fontWeight: 700,
|
|
290
|
+
lineHeight: '24px',
|
|
291
|
+
letterSpacing: 0,
|
|
292
|
+
},
|
|
293
|
+
/* ========================================
|
|
294
|
+
* TITLE VARIANTS (Mobile)
|
|
295
|
+
* For mobile headings
|
|
296
|
+
* Font: MetLife Circular Bold
|
|
297
|
+
* ======================================== */
|
|
298
|
+
// Title Large (H1) - MetLife Circular Bold 20/28
|
|
299
|
+
titleLarge: {
|
|
300
|
+
fontSize: '20px',
|
|
301
|
+
fontStyle: 'normal',
|
|
302
|
+
fontWeight: 700,
|
|
303
|
+
lineHeight: '28px',
|
|
304
|
+
letterSpacing: 0,
|
|
305
|
+
},
|
|
306
|
+
// Title Medium (H2) - MetLife Circular Bold 16/24
|
|
307
|
+
titleMedium: {
|
|
308
|
+
fontSize: '16px',
|
|
309
|
+
fontStyle: 'normal',
|
|
310
|
+
fontWeight: 700,
|
|
311
|
+
lineHeight: '24px',
|
|
312
|
+
letterSpacing: 0,
|
|
313
|
+
},
|
|
314
|
+
// Title Small (H3) - MetLife Circular Bold 14/20
|
|
315
|
+
titleSmall: {
|
|
316
|
+
fontSize: '14px',
|
|
317
|
+
fontStyle: 'normal',
|
|
318
|
+
fontWeight: 700,
|
|
319
|
+
lineHeight: '20px',
|
|
320
|
+
letterSpacing: 0,
|
|
321
|
+
},
|
|
322
|
+
/* ========================================
|
|
323
|
+
* BODY STRONG VARIANTS
|
|
324
|
+
* Emphasized body text with medium weight
|
|
325
|
+
* Font: MetLife Circular Medium
|
|
326
|
+
* ======================================== */
|
|
327
|
+
// Body Large Strong - MetLife Circular Medium 16/20
|
|
328
|
+
bodyLargeStrong: {
|
|
329
|
+
fontSize: '16px',
|
|
330
|
+
fontStyle: 'normal',
|
|
331
|
+
fontWeight: 500,
|
|
332
|
+
lineHeight: '20px',
|
|
333
|
+
letterSpacing: 0,
|
|
334
|
+
},
|
|
335
|
+
// Body Medium Strong - MetLife Circular Medium 14/18
|
|
336
|
+
bodyMediumStrong: {
|
|
337
|
+
fontSize: '14px',
|
|
338
|
+
fontStyle: 'normal',
|
|
339
|
+
fontWeight: 500,
|
|
340
|
+
lineHeight: '18px',
|
|
341
|
+
letterSpacing: 0,
|
|
342
|
+
},
|
|
343
|
+
// Body Small Strong - MetLife Circular Medium 12/16
|
|
344
|
+
bodySmallStrong: {
|
|
345
|
+
fontSize: '12px',
|
|
346
|
+
fontStyle: 'normal',
|
|
347
|
+
fontWeight: 500,
|
|
348
|
+
lineHeight: '16px',
|
|
349
|
+
letterSpacing: 0,
|
|
350
|
+
},
|
|
351
|
+
/* ========================================
|
|
352
|
+
* BODY VARIANTS
|
|
353
|
+
* Regular body text
|
|
354
|
+
* Font: MetLife Circular Normal
|
|
355
|
+
* ======================================== */
|
|
356
|
+
// Body Large - MetLife Circular Normal 16/20
|
|
357
|
+
bodyLargeFigma: {
|
|
358
|
+
fontSize: '16px',
|
|
359
|
+
fontStyle: 'normal',
|
|
360
|
+
fontWeight: 400,
|
|
361
|
+
lineHeight: '20px',
|
|
362
|
+
letterSpacing: 0,
|
|
363
|
+
},
|
|
364
|
+
// Body Medium - MetLife Circular Normal 14/18
|
|
365
|
+
bodyMediumFigma: {
|
|
366
|
+
fontSize: '14px',
|
|
367
|
+
fontStyle: 'normal',
|
|
368
|
+
fontWeight: 400,
|
|
369
|
+
lineHeight: '18px',
|
|
370
|
+
letterSpacing: 0,
|
|
371
|
+
},
|
|
372
|
+
// Body Small - MetLife Circular Normal 12/16
|
|
373
|
+
bodySmallFigma: {
|
|
374
|
+
fontSize: '12px',
|
|
375
|
+
fontStyle: 'normal',
|
|
376
|
+
fontWeight: 400,
|
|
377
|
+
lineHeight: '16px',
|
|
378
|
+
letterSpacing: 0,
|
|
379
|
+
}, bodyTinyFigma: {
|
|
380
|
+
fontSize: '9px',
|
|
381
|
+
fontStyle: 'normal',
|
|
382
|
+
fontWeight: 400,
|
|
383
|
+
lineHeight: 'normal',
|
|
384
|
+
letterSpacing: 0,
|
|
385
|
+
} });
|
|
202
386
|
/**
|
|
203
387
|
* Typography Registry
|
|
204
388
|
* Map of tenant IDs to their typography configurations
|
|
@@ -296,7 +480,7 @@ const iglooTheme = {
|
|
|
296
480
|
main: '#F3A100',
|
|
297
481
|
},
|
|
298
482
|
},
|
|
299
|
-
typography: Object.assign(Object.assign({}, iglooTypography), { fontFamily: '"
|
|
483
|
+
typography: Object.assign(Object.assign({}, iglooTypography), { fontFamily: '"Montserrat", "Roboto", "Helvetica", "Arial", sans-serif' }),
|
|
300
484
|
logo: '/assets/tenants/igloo/logo.svg',
|
|
301
485
|
favicon: 'https://static.iglooinsure.com/icons/favicon.ico',
|
|
302
486
|
assetBaseUrl: '/assets/tenants/igloo',
|
|
@@ -465,7 +649,7 @@ const ammetlifeTheme = {
|
|
|
465
649
|
main: '#FF9800',
|
|
466
650
|
},
|
|
467
651
|
},
|
|
468
|
-
typography: Object.assign(Object.assign({}, ammetlifeTypography), { fontFamily: '"
|
|
652
|
+
typography: Object.assign(Object.assign({}, ammetlifeTypography), { fontFamily: '"MetLifeCircular", "Roboto", "Helvetica", "Arial", sans-serif' }),
|
|
469
653
|
logo: '/assets/tenants/ammetlife/logo_aml.svg',
|
|
470
654
|
favicon: 'https://static.iglooinsure.com/icons/favicon.ico',
|
|
471
655
|
assetBaseUrl: '/assets/tenants/ammetlife',
|
|
@@ -1449,7 +1633,7 @@ const StyledDrawer$1 = styled(Drawer)(({ theme }) => ({
|
|
|
1449
1633
|
const DrawerHeader$1 = styled(Box)(({ theme }) => ({
|
|
1450
1634
|
display: 'flex',
|
|
1451
1635
|
alignItems: 'center',
|
|
1452
|
-
justifyContent: 'flex-
|
|
1636
|
+
justifyContent: 'flex-end',
|
|
1453
1637
|
padding: '16px',
|
|
1454
1638
|
minHeight: '56px',
|
|
1455
1639
|
}));
|
|
@@ -1505,7 +1689,7 @@ const FooterButtons = styled(Box)(({ theme }) => ({
|
|
|
1505
1689
|
// Base button styles - colors will be injected via sx prop from component
|
|
1506
1690
|
const PrimaryButton = styled(Button$1)(({ theme }) => ({
|
|
1507
1691
|
color: '#FFFFFF',
|
|
1508
|
-
borderRadius: '
|
|
1692
|
+
borderRadius: '24px',
|
|
1509
1693
|
height: '48px',
|
|
1510
1694
|
textTransform: 'none',
|
|
1511
1695
|
fontFamily: '"Montserrat", sans-serif',
|
|
@@ -1550,8 +1734,8 @@ function RecommendationsDrawer({ open, onClose, children, headerIcon, title, sub
|
|
|
1550
1734
|
useMediaQuery((_a = muiTheme === null || muiTheme === void 0 ? void 0 : muiTheme.breakpoints) === null || _a === void 0 ? void 0 : _a.down('md'));
|
|
1551
1735
|
const tenantTheme = useTenantTheme();
|
|
1552
1736
|
// Get primary color from tenant theme, fallback to default
|
|
1553
|
-
const primaryColor = ((_d = (_c = (_b = tenantTheme === null || tenantTheme === void 0 ? void 0 : tenantTheme.theme) === null || _b === void 0 ? void 0 : _b.palette) === null || _c === void 0 ? void 0 : _c.primary) === null || _d === void 0 ? void 0 : _d.main) || '#
|
|
1554
|
-
|
|
1737
|
+
const primaryColor = ((_d = (_c = (_b = tenantTheme === null || tenantTheme === void 0 ? void 0 : tenantTheme.theme) === null || _b === void 0 ? void 0 : _b.palette) === null || _c === void 0 ? void 0 : _c.primary) === null || _d === void 0 ? void 0 : _d.main) || '#0090DA';
|
|
1738
|
+
((_g = (_f = (_e = tenantTheme === null || tenantTheme === void 0 ? void 0 : tenantTheme.theme) === null || _e === void 0 ? void 0 : _e.palette) === null || _f === void 0 ? void 0 : _f.primary) === null || _g === void 0 ? void 0 : _g.dark) || '#2869a8';
|
|
1555
1739
|
// Helper to convert hex to rgba
|
|
1556
1740
|
const hexToRgba = (hex, alpha) => {
|
|
1557
1741
|
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
@@ -1586,7 +1770,7 @@ function RecommendationsDrawer({ open, onClose, children, headerIcon, title, sub
|
|
|
1586
1770
|
} }, { children: jsxs(Box, Object.assign({ sx: { display: 'flex', flexDirection: 'column', height: '100%' } }, { children: [jsx(DrawerHeader$1, { children: jsx(IconButton, Object.assign({ onClick: handleBackOrClose, sx: { padding: 0 }, "aria-label": showBackButton ? 'back' : 'close' }, { children: showBackButton ? jsx(ArrowBackIcon, {}) : jsx(CloseIcon, {}) })) }), (title || subtitle || headerIcon) && (jsxs(HeaderSection, { children: [headerIcon && (jsx(CategoryIcon, { children: jsx("img", { src: headerIcon, alt: "Category icon", width: 32, height: 32 }) })), title && (jsx(TitleText, Object.assign({ variant: "h5" }, { children: formatMessage({ id: title }) }))), subtitle && (jsx(SubtitleText, Object.assign({ variant: "body2" }, { children: formatMessage({ id: subtitle }) })))] })), jsx(DrawerContent$1, { children: children }), showFooter && (jsx(DrawerFooter, { children: customFooter ? (customFooter) : (jsxs(FooterButtons, { children: [primaryButtonText && (jsx(PrimaryButton, Object.assign({ variant: "contained", fullWidth: true, onClick: onPrimaryAction, disabled: primaryButtonDisabled, sx: {
|
|
1587
1771
|
backgroundColor: primaryColor,
|
|
1588
1772
|
'&:hover': {
|
|
1589
|
-
backgroundColor:
|
|
1773
|
+
backgroundColor: primaryColor,
|
|
1590
1774
|
},
|
|
1591
1775
|
} }, { children: formatMessage({ id: primaryButtonText }) }))), secondaryButtonText && (jsx(SecondaryButton, Object.assign({ variant: "text", fullWidth: true, onClick: onSecondaryAction, sx: {
|
|
1592
1776
|
color: primaryColor,
|
|
@@ -1741,7 +1925,7 @@ const QuestionHeader = styled(Box)(({ theme }) => ({
|
|
|
1741
1925
|
}));
|
|
1742
1926
|
const QuestionTitle = styled(Typography)(({ theme }) => ({
|
|
1743
1927
|
fontFamily: '"Montserrat", sans-serif',
|
|
1744
|
-
fontWeight:
|
|
1928
|
+
fontWeight: 700,
|
|
1745
1929
|
fontSize: '14px',
|
|
1746
1930
|
lineHeight: '20px',
|
|
1747
1931
|
color: '#13131B',
|
|
@@ -1792,20 +1976,40 @@ function QuestionSection({ questionNumber, question, helperText, options, select
|
|
|
1792
1976
|
}) })] }));
|
|
1793
1977
|
}
|
|
1794
1978
|
|
|
1795
|
-
|
|
1979
|
+
// Color configurations for different variants
|
|
1980
|
+
const variantColors = {
|
|
1981
|
+
default: {
|
|
1982
|
+
unselectedBorder: '#D9D9D6',
|
|
1983
|
+
unselectedText: 'rgba(0, 0, 0, 0.40)',
|
|
1984
|
+
unselectedBg: '#FFFFFF',
|
|
1985
|
+
selectedBg: 'rgba(49, 122, 188, 0.10)',
|
|
1986
|
+
hoverBg: 'rgba(0, 0, 0, 0.04)',
|
|
1987
|
+
hoverBorder: '#D9D9D6',
|
|
1988
|
+
},
|
|
1989
|
+
form: {
|
|
1990
|
+
unselectedBorder: '#929094',
|
|
1991
|
+
unselectedText: '#5f5e62',
|
|
1992
|
+
unselectedBg: 'transparent',
|
|
1993
|
+
selectedBg: 'rgba(61, 147, 222, 0.1)',
|
|
1994
|
+
hoverBg: 'rgba(0, 0, 0, 0.02)',
|
|
1995
|
+
hoverBorder: '#5f5e62',
|
|
1996
|
+
},
|
|
1997
|
+
};
|
|
1998
|
+
const StyledOptionButton = styled(ButtonBase)(({ selected, size = 'medium', fullWidth, colorVariant = 'default' }) => {
|
|
1796
1999
|
const heights = {
|
|
1797
2000
|
small: '32px',
|
|
1798
2001
|
medium: '40px',
|
|
1799
2002
|
large: '48px',
|
|
1800
2003
|
};
|
|
2004
|
+
const colors = variantColors[colorVariant];
|
|
1801
2005
|
return {
|
|
1802
2006
|
height: heights[size],
|
|
1803
2007
|
width: fullWidth ? '100%' : 'auto',
|
|
1804
|
-
borderRadius: '
|
|
2008
|
+
borderRadius: '24px',
|
|
1805
2009
|
border: selected
|
|
1806
|
-
? '2px solid #
|
|
1807
|
-
:
|
|
1808
|
-
backgroundColor: selected ?
|
|
2010
|
+
? '2px solid #0090DA'
|
|
2011
|
+
: `1px solid ${colors.unselectedBorder}`,
|
|
2012
|
+
backgroundColor: selected ? colors.selectedBg : colors.unselectedBg,
|
|
1809
2013
|
padding: '10px 24px',
|
|
1810
2014
|
display: 'flex',
|
|
1811
2015
|
alignItems: 'center',
|
|
@@ -1813,7 +2017,8 @@ const StyledOptionButton = styled(ButtonBase)(({ theme, selected, size = 'medium
|
|
|
1813
2017
|
cursor: 'pointer',
|
|
1814
2018
|
transition: 'all 0.2s ease',
|
|
1815
2019
|
'&:hover': {
|
|
1816
|
-
backgroundColor: selected ?
|
|
2020
|
+
backgroundColor: selected ? colors.selectedBg : colors.hoverBg,
|
|
2021
|
+
borderColor: selected ? '#0090DA' : colors.hoverBorder,
|
|
1817
2022
|
},
|
|
1818
2023
|
'&:disabled': {
|
|
1819
2024
|
backgroundColor: '#F5F5F5',
|
|
@@ -1823,48 +2028,59 @@ const StyledOptionButton = styled(ButtonBase)(({ theme, selected, size = 'medium
|
|
|
1823
2028
|
},
|
|
1824
2029
|
};
|
|
1825
2030
|
});
|
|
1826
|
-
const OptionContent = styled(Box)((
|
|
2031
|
+
const OptionContent = styled(Box)(() => ({
|
|
1827
2032
|
display: 'flex',
|
|
1828
2033
|
alignItems: 'center',
|
|
1829
2034
|
justifyContent: 'center',
|
|
1830
2035
|
gap: '8px',
|
|
1831
2036
|
width: '100%',
|
|
1832
2037
|
}));
|
|
1833
|
-
const OptionIcon = styled('span')((
|
|
2038
|
+
const OptionIcon = styled('span')(() => ({
|
|
1834
2039
|
fontSize: '18px',
|
|
1835
2040
|
lineHeight: 1,
|
|
1836
2041
|
flexShrink: 0,
|
|
1837
2042
|
}));
|
|
1838
|
-
const OptionLabel = styled(Typography)(({
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
2043
|
+
const OptionLabel = styled(Typography)(({ selected, colorVariant = 'default' }) => {
|
|
2044
|
+
const colors = variantColors[colorVariant];
|
|
2045
|
+
return {
|
|
2046
|
+
fontWeight: selected ? 600 : 500,
|
|
2047
|
+
fontSize: '16px',
|
|
2048
|
+
lineHeight: '20px',
|
|
2049
|
+
color: selected ? '#0090DA' : colors.unselectedText,
|
|
2050
|
+
textAlign: 'center',
|
|
2051
|
+
};
|
|
2052
|
+
});
|
|
1846
2053
|
|
|
1847
2054
|
/**
|
|
1848
2055
|
* OptionButton - Selectable button for questionnaire options
|
|
1849
2056
|
*
|
|
1850
2057
|
* @example
|
|
1851
2058
|
* ```tsx
|
|
2059
|
+
* // Default variant (lighter colors) for recommendations
|
|
1852
2060
|
* <OptionButton
|
|
1853
2061
|
* value="option1"
|
|
1854
2062
|
* label="Option 1"
|
|
1855
|
-
* icon="🎯"
|
|
1856
2063
|
* selected={selectedValue === 'option1'}
|
|
1857
2064
|
* onClick={(value) => setSelectedValue(value)}
|
|
1858
2065
|
* />
|
|
2066
|
+
*
|
|
2067
|
+
* // Form variant (darker colors) for gender selection, health questions
|
|
2068
|
+
* <OptionButton
|
|
2069
|
+
* value="male"
|
|
2070
|
+
* label="Male"
|
|
2071
|
+
* variant="form"
|
|
2072
|
+
* selected={gender === 'male'}
|
|
2073
|
+
* onClick={(value) => setGender(value)}
|
|
2074
|
+
* />
|
|
1859
2075
|
* ```
|
|
1860
2076
|
*/
|
|
1861
|
-
function OptionButton
|
|
2077
|
+
function OptionButton({ value, label, icon, selected = false, disabled = false, onClick, size = 'medium', fullWidth = true, variant = 'default', formatMessage = (descriptor) => descriptor.id, }) {
|
|
1862
2078
|
const handleClick = () => {
|
|
1863
2079
|
if (!disabled && onClick) {
|
|
1864
2080
|
onClick(value);
|
|
1865
2081
|
}
|
|
1866
2082
|
};
|
|
1867
|
-
return (jsx(StyledOptionButton, Object.assign({ selected: selected, disabled: disabled, onClick: handleClick, size: size, fullWidth: fullWidth }, { children: jsxs(OptionContent, { children: [icon && jsx(OptionIcon, { children: icon }), jsx(OptionLabel, Object.assign({ selected: selected, disabled: disabled,
|
|
2083
|
+
return (jsx(StyledOptionButton, Object.assign({ selected: selected, disabled: disabled, onClick: handleClick, size: size, fullWidth: fullWidth, colorVariant: variant }, { children: jsxs(OptionContent, { children: [icon && jsx(OptionIcon, { children: icon }), jsx(OptionLabel, Object.assign({ selected: selected, disabled: disabled, colorVariant: variant }, { children: formatMessage({ id: label }) }))] }) })));
|
|
1868
2084
|
}
|
|
1869
2085
|
|
|
1870
2086
|
const ToggleContainer$1 = styled(Box)(({ theme }) => ({
|
|
@@ -2073,12 +2289,13 @@ function BillingToggle({ value, onChange, formatMessage = (descriptor) => descri
|
|
|
2073
2289
|
const tenantTheme = useTenantTheme();
|
|
2074
2290
|
const theme = tenantTheme === null || tenantTheme === void 0 ? void 0 : tenantTheme.theme;
|
|
2075
2291
|
// Get theme colors with SSR-safe fallbacks
|
|
2076
|
-
const toggleActiveColor = getThemeColor(theme, 'ui.toggleActive', '#
|
|
2292
|
+
const toggleActiveColor = getThemeColor(theme, 'ui.toggleActive', '#0090DA');
|
|
2077
2293
|
const toggleActiveTextColor = getThemeColor(theme, 'ui.toggleActiveText', '#fefbff');
|
|
2078
|
-
const toggleInactiveTextColor = getThemeColor(theme, 'ui.toggleInactiveText', '#
|
|
2294
|
+
const toggleInactiveTextColor = getThemeColor(theme, 'ui.toggleInactiveText', '#0090DA');
|
|
2079
2295
|
const toggleBgColor = getThemeColor(theme, 'ui.sliderBackground', '#f9f9f9');
|
|
2080
2296
|
return (jsxs(ToggleContainer, Object.assign({ sx: {
|
|
2081
2297
|
backgroundColor: toggleBgColor,
|
|
2298
|
+
border: `1px solid ${toggleActiveColor}`,
|
|
2082
2299
|
} }, { children: [jsx(ToggleButton, Object.assign({ active: value === 'annually', onClick: () => onChange('monthly'), sx: {
|
|
2083
2300
|
backgroundColor: value === 'monthly' ? toggleActiveColor : 'transparent',
|
|
2084
2301
|
color: value === 'monthly'
|
|
@@ -2646,15 +2863,15 @@ const ButtonContainer = styled(Box)(({ isFixed }) => ({
|
|
|
2646
2863
|
zIndex: 999,
|
|
2647
2864
|
}));
|
|
2648
2865
|
const StyledButton = styled('button')(({ theme, isDisabled }) => {
|
|
2649
|
-
var _a, _b
|
|
2866
|
+
var _a, _b;
|
|
2650
2867
|
return ({
|
|
2651
2868
|
width: '100%',
|
|
2652
2869
|
height: '48px',
|
|
2653
|
-
borderRadius: '
|
|
2870
|
+
borderRadius: '24px',
|
|
2654
2871
|
border: 'none',
|
|
2655
2872
|
backgroundColor: isDisabled
|
|
2656
2873
|
? '#E1E2EB'
|
|
2657
|
-
:
|
|
2874
|
+
: '#0090DA',
|
|
2658
2875
|
color: isDisabled ? '#929094' : '#fff',
|
|
2659
2876
|
fontFamily: 'Montserrat',
|
|
2660
2877
|
fontSize: '14px',
|
|
@@ -2665,7 +2882,7 @@ const StyledButton = styled('button')(({ theme, isDisabled }) => {
|
|
|
2665
2882
|
'&:hover': {
|
|
2666
2883
|
backgroundColor: isDisabled
|
|
2667
2884
|
? '#E1E2EB'
|
|
2668
|
-
: ((
|
|
2885
|
+
: ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _a === void 0 ? void 0 : _a.primary) === null || _b === void 0 ? void 0 : _b.dark) || '#2a2a33',
|
|
2669
2886
|
},
|
|
2670
2887
|
});
|
|
2671
2888
|
});
|
|
@@ -2678,10 +2895,8 @@ const QuestionContainer = styled(Box)({
|
|
|
2678
2895
|
display: 'flex',
|
|
2679
2896
|
flexDirection: 'column',
|
|
2680
2897
|
gap: '8px',
|
|
2681
|
-
marginBottom: '24px',
|
|
2682
2898
|
});
|
|
2683
2899
|
const QuestionText = styled(Typography)({
|
|
2684
|
-
fontFamily: 'Montserrat',
|
|
2685
2900
|
fontSize: '14px',
|
|
2686
2901
|
fontWeight: 400,
|
|
2687
2902
|
color: '#13131B',
|
|
@@ -2692,7 +2907,7 @@ const OptionsContainer = styled(Box)({
|
|
|
2692
2907
|
gap: '16px',
|
|
2693
2908
|
marginTop: '12px',
|
|
2694
2909
|
});
|
|
2695
|
-
|
|
2910
|
+
styled(Box)(({ selected }) => ({
|
|
2696
2911
|
flex: 1,
|
|
2697
2912
|
height: '48px',
|
|
2698
2913
|
border: `1px solid ${selected ? '#13131B' : '#929094'}`,
|
|
@@ -2707,7 +2922,7 @@ const OptionButton = styled(Box)(({ selected }) => ({
|
|
|
2707
2922
|
borderColor: '#13131B',
|
|
2708
2923
|
},
|
|
2709
2924
|
}));
|
|
2710
|
-
|
|
2925
|
+
styled(Typography)(({ selected }) => ({
|
|
2711
2926
|
fontFamily: 'Montserrat',
|
|
2712
2927
|
fontSize: '14px',
|
|
2713
2928
|
fontWeight: 600,
|
|
@@ -2716,11 +2931,10 @@ const OptionText = styled(Typography)(({ selected }) => ({
|
|
|
2716
2931
|
}));
|
|
2717
2932
|
|
|
2718
2933
|
const HealthQuestionGroup = ({ question, questionNumber, value, onChange, error, labels = { yes: 'Yes', no: 'No' }, sx, }) => {
|
|
2719
|
-
return (jsxs(QuestionContainer, Object.assign({ sx: sx }, { children: [jsxs(QuestionText, { children: [questionNumber && `${questionNumber}. `, question] }), jsxs(OptionsContainer, { children: [jsx(OptionButton,
|
|
2934
|
+
return (jsxs(QuestionContainer, Object.assign({ sx: sx }, { children: [jsxs(QuestionText, { children: [questionNumber && `${questionNumber}. `, question] }), jsxs(OptionsContainer, { children: [jsx(OptionButton, { value: "yes", label: labels.yes || 'Yes', selected: value === 'yes', onClick: () => onChange('yes'), variant: "form" }), jsx(OptionButton, { value: "no", label: labels.no || 'No', selected: value === 'no', onClick: () => onChange('no'), variant: "form" })] }), error && (jsx(Typography, Object.assign({ sx: {
|
|
2720
2935
|
color: 'error.main',
|
|
2721
2936
|
fontSize: '12px',
|
|
2722
2937
|
mt: 0.5,
|
|
2723
|
-
ml: 2,
|
|
2724
2938
|
} }, { children: error })))] })));
|
|
2725
2939
|
};
|
|
2726
2940
|
|
|
@@ -2804,28 +3018,24 @@ const ContactDetailsForm = ({ renderField, fields, mailingFields, mailingAddress
|
|
|
2804
3018
|
} }, { children: fields.phone_number.helperText })))] }), renderField(fields.email_address), jsx(Divider, { sx: { borderColor: 'rgba(0,0,0,0.1)' } }), jsx(SectionTitle$1, { children: "Residential address" }), jsxs(Box, { children: [renderField(fields.residential_address_line1), fields.residential_address_line1.helperText && (jsx(Box, Object.assign({ component: "span", sx: {
|
|
2805
3019
|
display: 'block',
|
|
2806
3020
|
mt: 0.5,
|
|
2807
|
-
ml: 2,
|
|
2808
3021
|
color: '#5F5E62',
|
|
2809
3022
|
fontSize: '12px',
|
|
2810
3023
|
fontFamily: 'Montserrat',
|
|
2811
3024
|
} }, { children: fields.residential_address_line1.helperText })))] }), jsxs(Box, { children: [renderField(fields.residential_address_line2), fields.residential_address_line2.helperText && (jsx(Box, Object.assign({ component: "span", sx: {
|
|
2812
3025
|
display: 'block',
|
|
2813
3026
|
mt: 0.5,
|
|
2814
|
-
ml: 2,
|
|
2815
3027
|
color: '#5F5E62',
|
|
2816
3028
|
fontSize: '12px',
|
|
2817
3029
|
fontFamily: 'Montserrat',
|
|
2818
3030
|
} }, { children: fields.residential_address_line2.helperText })))] }), renderField(fields.postal_code), renderField(fields.city), renderField(fields.state), jsx(Divider, { sx: { borderColor: 'rgba(0,0,0,0.1)' } }), (mailingAddressSame === null || mailingAddressSame === void 0 ? void 0 : mailingAddressSame.checked) && mailingFields && (jsxs(Fragment, { children: [jsx(SectionTitle$1, { children: "Mailing address" }), jsxs(Box, { children: [renderField(mailingFields.mailing_address_line1), mailingFields.mailing_address_line1.helperText && (jsx(Box, Object.assign({ component: "span", sx: {
|
|
2819
3031
|
display: 'block',
|
|
2820
3032
|
mt: 0.5,
|
|
2821
|
-
ml: 2,
|
|
2822
3033
|
color: '#5F5E62',
|
|
2823
3034
|
fontSize: '12px',
|
|
2824
3035
|
fontFamily: 'Montserrat',
|
|
2825
3036
|
} }, { children: mailingFields.mailing_address_line1.helperText })))] }), jsxs(Box, { children: [renderField(mailingFields.mailing_address_line2), mailingFields.mailing_address_line2.helperText && (jsx(Box, Object.assign({ component: "span", sx: {
|
|
2826
3037
|
display: 'block',
|
|
2827
3038
|
mt: 0.5,
|
|
2828
|
-
ml: 2,
|
|
2829
3039
|
color: '#5F5E62',
|
|
2830
3040
|
fontSize: '12px',
|
|
2831
3041
|
fontFamily: 'Montserrat',
|
|
@@ -2857,7 +3067,7 @@ const ChildInformationForm = ({ renderField, fields, onSubmit, formRef, sx, }) =
|
|
|
2857
3067
|
color: '#5F5E62',
|
|
2858
3068
|
fontSize: '12px',
|
|
2859
3069
|
fontFamily: 'Montserrat',
|
|
2860
|
-
} }, { children: fields.full_name.helperText })))] }), renderField(fields.nric), renderField(fields.date_of_birth), renderField(fields.gender), renderField(fields.nationality)] })) })));
|
|
3070
|
+
} }, { children: fields.full_name.helperText })))] }), fields.nric && renderField(fields.nric), renderField(fields.date_of_birth), renderField(fields.gender), renderField(fields.nationality)] })) })));
|
|
2861
3071
|
};
|
|
2862
3072
|
|
|
2863
3073
|
/**
|
|
@@ -2922,7 +3132,7 @@ const StyledAccordionSummary = styled$1(AccordionSummary)(({ theme }) => ({
|
|
|
2922
3132
|
},
|
|
2923
3133
|
}));
|
|
2924
3134
|
const FAQQuestion = styled$1(Typography)(({ theme }) => ({
|
|
2925
|
-
fontWeight:
|
|
3135
|
+
fontWeight: 700,
|
|
2926
3136
|
fontSize: '14px',
|
|
2927
3137
|
lineHeight: '20px',
|
|
2928
3138
|
flex: 1,
|
|
@@ -3042,7 +3252,7 @@ const BenefitContent = styled$1(Box)({
|
|
|
3042
3252
|
gap: '6px',
|
|
3043
3253
|
});
|
|
3044
3254
|
const BenefitTitle = styled$1(Typography)(({ theme }) => ({
|
|
3045
|
-
fontWeight:
|
|
3255
|
+
fontWeight: 700,
|
|
3046
3256
|
fontSize: '14px',
|
|
3047
3257
|
lineHeight: '20px',
|
|
3048
3258
|
margin: 0,
|
|
@@ -3224,5 +3434,5 @@ function getIconPath(iconName) {
|
|
|
3224
3434
|
return ICON_PATHS[iconName];
|
|
3225
3435
|
}
|
|
3226
3436
|
|
|
3227
|
-
export { Banner, BenefitsSummary, BillingToggle, Button, Card, CheckoutFormButton, CheckoutHeader, CheckoutProgress, ChildInformationForm, ContactDetailsForm, CoverageAmountSlider, FAQAccordion, Footer, Header$1 as Header, HealthInformationForm, HealthQuestionGroup, ICON_PATHS, InfoCallout, NewHeader, OptionButton
|
|
3437
|
+
export { Banner, BenefitsSummary, BillingToggle, Button, Card, CheckoutFormButton, CheckoutHeader, CheckoutProgress, ChildInformationForm, ContactDetailsForm, CoverageAmountSlider, FAQAccordion, Footer, Header$1 as Header, HealthInformationForm, HealthQuestionGroup, ICON_PATHS, InfoCallout, NewHeader, OptionButton, PersonalInformationForm, ProductCard, ProductSelectionDrawer, QuestionSection, RecommendationsDrawer, TenantThemeProvider, ToggleGroup, ammetlifeTheme, ammetlifeTypography, cimbTheme, cimbTypography, createThemeCSSVariables, getAvailableTenants, getIconPath, getTenantAssetPath, getTenantLogoPath, getTenantTheme, getTenantTypography, getThemeColor, iglooTheme, iglooTypography, isValidTenantId, mergeTenantTheme, tenantThemes, tenantTypography, useIsTenant, useTenantAsset, useTenantFavicon, useTenantId, useTenantLogo, useTenantTheme };
|
|
3228
3438
|
//# sourceMappingURL=index.js.map
|