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/cjs/index.js
CHANGED
|
@@ -218,7 +218,191 @@ const cimbTypography = Object.assign(Object.assign({}, iglooTypography), { fontF
|
|
|
218
218
|
/**
|
|
219
219
|
* AmmetLife Typography Configuration
|
|
220
220
|
*/
|
|
221
|
-
const ammetlifeTypography = Object.assign(Object.assign({}, iglooTypography), { fontFamily: '
|
|
221
|
+
const ammetlifeTypography = Object.assign(Object.assign({}, iglooTypography), { fontFamily: 'MetLifeCircular',
|
|
222
|
+
/**
|
|
223
|
+
* AmMetLife Typography Configuration
|
|
224
|
+
* Font: MetLifeCircular
|
|
225
|
+
* Based on Figma Design: Tech-Solution-V1.0 (node 2901-37059)
|
|
226
|
+
*
|
|
227
|
+
* Typography Scale Reference:
|
|
228
|
+
* ===========================
|
|
229
|
+
* DISPLAY (Large promotional text):
|
|
230
|
+
* - Display Large: Bold 64/72
|
|
231
|
+
* - Display Medium: Bold 45/52
|
|
232
|
+
* - Display Small: Bold 34/44
|
|
233
|
+
*
|
|
234
|
+
* HEADLINE PC (Desktop headings):
|
|
235
|
+
* - Headline Large (H1): Bold 30/44
|
|
236
|
+
* - Headline Medium (H2): Bold 22/26
|
|
237
|
+
* - Headline Small (H3): Bold 18/24
|
|
238
|
+
*
|
|
239
|
+
* TITLE MOBILE (Mobile headings):
|
|
240
|
+
* - Title Large (H1): Bold 20/28
|
|
241
|
+
* - Title Medium (H2): Bold 16/24
|
|
242
|
+
* - Title Small (H3): Bold 14/20
|
|
243
|
+
*
|
|
244
|
+
* BODY STRONG (Emphasized body text):
|
|
245
|
+
* - Body Large Strong: Medium 16/20
|
|
246
|
+
* - Body Medium Strong: Medium 14/18
|
|
247
|
+
* - Body Small Strong: Medium 12/16
|
|
248
|
+
*
|
|
249
|
+
* BODY (Regular body text):
|
|
250
|
+
* - Body Large: Normal 16/20
|
|
251
|
+
* - Body Medium: Normal 14/18
|
|
252
|
+
* - Body Small: Normal 12/16
|
|
253
|
+
*/
|
|
254
|
+
fontWeightLight: 300, fontWeightNormal: 400, fontWeightMedium: 500, fontWeightBold: 700,
|
|
255
|
+
/* ========================================
|
|
256
|
+
* DISPLAY VARIANTS
|
|
257
|
+
* For hero banners and large promotional text
|
|
258
|
+
* Font: MetLife Circular Bold
|
|
259
|
+
* ======================================== */
|
|
260
|
+
// Display Large - MetLife Circular Bold 64/72
|
|
261
|
+
displayLargeFigma: {
|
|
262
|
+
fontSize: '64px',
|
|
263
|
+
fontStyle: 'normal',
|
|
264
|
+
fontWeight: 700,
|
|
265
|
+
lineHeight: '72px',
|
|
266
|
+
letterSpacing: 0,
|
|
267
|
+
},
|
|
268
|
+
// Display Medium - MetLife Circular Bold 45/52
|
|
269
|
+
displayMediumFigma: {
|
|
270
|
+
fontSize: '45px',
|
|
271
|
+
fontStyle: 'normal',
|
|
272
|
+
fontWeight: 700,
|
|
273
|
+
lineHeight: '52px',
|
|
274
|
+
letterSpacing: 0,
|
|
275
|
+
},
|
|
276
|
+
// Display Small - MetLife Circular Bold 34/44
|
|
277
|
+
displaySmallFigma: {
|
|
278
|
+
fontSize: '34px',
|
|
279
|
+
fontStyle: 'normal',
|
|
280
|
+
fontWeight: 700,
|
|
281
|
+
lineHeight: '44px',
|
|
282
|
+
letterSpacing: 0,
|
|
283
|
+
},
|
|
284
|
+
/* ========================================
|
|
285
|
+
* HEADLINE VARIANTS (PC/Desktop)
|
|
286
|
+
* For desktop headings
|
|
287
|
+
* Font: MetLife Circular Bold
|
|
288
|
+
* ======================================== */
|
|
289
|
+
// Headline Large (H1) - MetLife Circular Bold 30/44
|
|
290
|
+
headlineLarge: {
|
|
291
|
+
fontSize: '30px',
|
|
292
|
+
fontStyle: 'normal',
|
|
293
|
+
fontWeight: 700,
|
|
294
|
+
lineHeight: '44px',
|
|
295
|
+
letterSpacing: 0,
|
|
296
|
+
},
|
|
297
|
+
// Headline Medium (H2) - MetLife Circular Bold 22/26
|
|
298
|
+
headlineMedium: {
|
|
299
|
+
fontSize: '22px',
|
|
300
|
+
fontStyle: 'normal',
|
|
301
|
+
fontWeight: 700,
|
|
302
|
+
lineHeight: '26px',
|
|
303
|
+
letterSpacing: 0,
|
|
304
|
+
},
|
|
305
|
+
// Headline Small (H3) - MetLife Circular Bold 18/24
|
|
306
|
+
headlineSmall: {
|
|
307
|
+
fontSize: '18px',
|
|
308
|
+
fontStyle: 'normal',
|
|
309
|
+
fontWeight: 700,
|
|
310
|
+
lineHeight: '24px',
|
|
311
|
+
letterSpacing: 0,
|
|
312
|
+
},
|
|
313
|
+
/* ========================================
|
|
314
|
+
* TITLE VARIANTS (Mobile)
|
|
315
|
+
* For mobile headings
|
|
316
|
+
* Font: MetLife Circular Bold
|
|
317
|
+
* ======================================== */
|
|
318
|
+
// Title Large (H1) - MetLife Circular Bold 20/28
|
|
319
|
+
titleLarge: {
|
|
320
|
+
fontSize: '20px',
|
|
321
|
+
fontStyle: 'normal',
|
|
322
|
+
fontWeight: 700,
|
|
323
|
+
lineHeight: '28px',
|
|
324
|
+
letterSpacing: 0,
|
|
325
|
+
},
|
|
326
|
+
// Title Medium (H2) - MetLife Circular Bold 16/24
|
|
327
|
+
titleMedium: {
|
|
328
|
+
fontSize: '16px',
|
|
329
|
+
fontStyle: 'normal',
|
|
330
|
+
fontWeight: 700,
|
|
331
|
+
lineHeight: '24px',
|
|
332
|
+
letterSpacing: 0,
|
|
333
|
+
},
|
|
334
|
+
// Title Small (H3) - MetLife Circular Bold 14/20
|
|
335
|
+
titleSmall: {
|
|
336
|
+
fontSize: '14px',
|
|
337
|
+
fontStyle: 'normal',
|
|
338
|
+
fontWeight: 700,
|
|
339
|
+
lineHeight: '20px',
|
|
340
|
+
letterSpacing: 0,
|
|
341
|
+
},
|
|
342
|
+
/* ========================================
|
|
343
|
+
* BODY STRONG VARIANTS
|
|
344
|
+
* Emphasized body text with medium weight
|
|
345
|
+
* Font: MetLife Circular Medium
|
|
346
|
+
* ======================================== */
|
|
347
|
+
// Body Large Strong - MetLife Circular Medium 16/20
|
|
348
|
+
bodyLargeStrong: {
|
|
349
|
+
fontSize: '16px',
|
|
350
|
+
fontStyle: 'normal',
|
|
351
|
+
fontWeight: 500,
|
|
352
|
+
lineHeight: '20px',
|
|
353
|
+
letterSpacing: 0,
|
|
354
|
+
},
|
|
355
|
+
// Body Medium Strong - MetLife Circular Medium 14/18
|
|
356
|
+
bodyMediumStrong: {
|
|
357
|
+
fontSize: '14px',
|
|
358
|
+
fontStyle: 'normal',
|
|
359
|
+
fontWeight: 500,
|
|
360
|
+
lineHeight: '18px',
|
|
361
|
+
letterSpacing: 0,
|
|
362
|
+
},
|
|
363
|
+
// Body Small Strong - MetLife Circular Medium 12/16
|
|
364
|
+
bodySmallStrong: {
|
|
365
|
+
fontSize: '12px',
|
|
366
|
+
fontStyle: 'normal',
|
|
367
|
+
fontWeight: 500,
|
|
368
|
+
lineHeight: '16px',
|
|
369
|
+
letterSpacing: 0,
|
|
370
|
+
},
|
|
371
|
+
/* ========================================
|
|
372
|
+
* BODY VARIANTS
|
|
373
|
+
* Regular body text
|
|
374
|
+
* Font: MetLife Circular Normal
|
|
375
|
+
* ======================================== */
|
|
376
|
+
// Body Large - MetLife Circular Normal 16/20
|
|
377
|
+
bodyLargeFigma: {
|
|
378
|
+
fontSize: '16px',
|
|
379
|
+
fontStyle: 'normal',
|
|
380
|
+
fontWeight: 400,
|
|
381
|
+
lineHeight: '20px',
|
|
382
|
+
letterSpacing: 0,
|
|
383
|
+
},
|
|
384
|
+
// Body Medium - MetLife Circular Normal 14/18
|
|
385
|
+
bodyMediumFigma: {
|
|
386
|
+
fontSize: '14px',
|
|
387
|
+
fontStyle: 'normal',
|
|
388
|
+
fontWeight: 400,
|
|
389
|
+
lineHeight: '18px',
|
|
390
|
+
letterSpacing: 0,
|
|
391
|
+
},
|
|
392
|
+
// Body Small - MetLife Circular Normal 12/16
|
|
393
|
+
bodySmallFigma: {
|
|
394
|
+
fontSize: '12px',
|
|
395
|
+
fontStyle: 'normal',
|
|
396
|
+
fontWeight: 400,
|
|
397
|
+
lineHeight: '16px',
|
|
398
|
+
letterSpacing: 0,
|
|
399
|
+
}, bodyTinyFigma: {
|
|
400
|
+
fontSize: '9px',
|
|
401
|
+
fontStyle: 'normal',
|
|
402
|
+
fontWeight: 400,
|
|
403
|
+
lineHeight: 'normal',
|
|
404
|
+
letterSpacing: 0,
|
|
405
|
+
} });
|
|
222
406
|
/**
|
|
223
407
|
* Typography Registry
|
|
224
408
|
* Map of tenant IDs to their typography configurations
|
|
@@ -316,7 +500,7 @@ const iglooTheme = {
|
|
|
316
500
|
main: '#F3A100',
|
|
317
501
|
},
|
|
318
502
|
},
|
|
319
|
-
typography: Object.assign(Object.assign({}, iglooTypography), { fontFamily: '"
|
|
503
|
+
typography: Object.assign(Object.assign({}, iglooTypography), { fontFamily: '"Montserrat", "Roboto", "Helvetica", "Arial", sans-serif' }),
|
|
320
504
|
logo: '/assets/tenants/igloo/logo.svg',
|
|
321
505
|
favicon: 'https://static.iglooinsure.com/icons/favicon.ico',
|
|
322
506
|
assetBaseUrl: '/assets/tenants/igloo',
|
|
@@ -485,7 +669,7 @@ const ammetlifeTheme = {
|
|
|
485
669
|
main: '#FF9800',
|
|
486
670
|
},
|
|
487
671
|
},
|
|
488
|
-
typography: Object.assign(Object.assign({}, ammetlifeTypography), { fontFamily: '"
|
|
672
|
+
typography: Object.assign(Object.assign({}, ammetlifeTypography), { fontFamily: '"MetLifeCircular", "Roboto", "Helvetica", "Arial", sans-serif' }),
|
|
489
673
|
logo: '/assets/tenants/ammetlife/logo_aml.svg',
|
|
490
674
|
favicon: 'https://static.iglooinsure.com/icons/favicon.ico',
|
|
491
675
|
assetBaseUrl: '/assets/tenants/ammetlife',
|
|
@@ -1469,7 +1653,7 @@ const StyledDrawer$1 = styles.styled(material.Drawer)(({ theme }) => ({
|
|
|
1469
1653
|
const DrawerHeader$1 = styles.styled(material.Box)(({ theme }) => ({
|
|
1470
1654
|
display: 'flex',
|
|
1471
1655
|
alignItems: 'center',
|
|
1472
|
-
justifyContent: 'flex-
|
|
1656
|
+
justifyContent: 'flex-end',
|
|
1473
1657
|
padding: '16px',
|
|
1474
1658
|
minHeight: '56px',
|
|
1475
1659
|
}));
|
|
@@ -1525,7 +1709,7 @@ const FooterButtons = styles.styled(material.Box)(({ theme }) => ({
|
|
|
1525
1709
|
// Base button styles - colors will be injected via sx prop from component
|
|
1526
1710
|
const PrimaryButton = styles.styled(material.Button)(({ theme }) => ({
|
|
1527
1711
|
color: '#FFFFFF',
|
|
1528
|
-
borderRadius: '
|
|
1712
|
+
borderRadius: '24px',
|
|
1529
1713
|
height: '48px',
|
|
1530
1714
|
textTransform: 'none',
|
|
1531
1715
|
fontFamily: '"Montserrat", sans-serif',
|
|
@@ -1570,8 +1754,8 @@ function RecommendationsDrawer({ open, onClose, children, headerIcon, title, sub
|
|
|
1570
1754
|
material.useMediaQuery((_a = muiTheme === null || muiTheme === void 0 ? void 0 : muiTheme.breakpoints) === null || _a === void 0 ? void 0 : _a.down('md'));
|
|
1571
1755
|
const tenantTheme = useTenantTheme();
|
|
1572
1756
|
// Get primary color from tenant theme, fallback to default
|
|
1573
|
-
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) || '#
|
|
1574
|
-
|
|
1757
|
+
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';
|
|
1758
|
+
((_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';
|
|
1575
1759
|
// Helper to convert hex to rgba
|
|
1576
1760
|
const hexToRgba = (hex, alpha) => {
|
|
1577
1761
|
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
@@ -1606,7 +1790,7 @@ function RecommendationsDrawer({ open, onClose, children, headerIcon, title, sub
|
|
|
1606
1790
|
} }, { children: jsxRuntime.jsxs(material.Box, Object.assign({ sx: { display: 'flex', flexDirection: 'column', height: '100%' } }, { children: [jsxRuntime.jsx(DrawerHeader$1, { children: jsxRuntime.jsx(material.IconButton, Object.assign({ onClick: handleBackOrClose, sx: { padding: 0 }, "aria-label": showBackButton ? 'back' : 'close' }, { children: showBackButton ? jsxRuntime.jsx(ArrowBackIcon, {}) : jsxRuntime.jsx(CloseIcon, {}) })) }), (title || subtitle || headerIcon) && (jsxRuntime.jsxs(HeaderSection, { children: [headerIcon && (jsxRuntime.jsx(CategoryIcon, { children: jsxRuntime.jsx("img", { src: headerIcon, alt: "Category icon", width: 32, height: 32 }) })), title && (jsxRuntime.jsx(TitleText, Object.assign({ variant: "h5" }, { children: formatMessage({ id: title }) }))), subtitle && (jsxRuntime.jsx(SubtitleText, Object.assign({ variant: "body2" }, { children: formatMessage({ id: subtitle }) })))] })), jsxRuntime.jsx(DrawerContent$1, { children: children }), showFooter && (jsxRuntime.jsx(DrawerFooter, { children: customFooter ? (customFooter) : (jsxRuntime.jsxs(FooterButtons, { children: [primaryButtonText && (jsxRuntime.jsx(PrimaryButton, Object.assign({ variant: "contained", fullWidth: true, onClick: onPrimaryAction, disabled: primaryButtonDisabled, sx: {
|
|
1607
1791
|
backgroundColor: primaryColor,
|
|
1608
1792
|
'&:hover': {
|
|
1609
|
-
backgroundColor:
|
|
1793
|
+
backgroundColor: primaryColor,
|
|
1610
1794
|
},
|
|
1611
1795
|
} }, { children: formatMessage({ id: primaryButtonText }) }))), secondaryButtonText && (jsxRuntime.jsx(SecondaryButton, Object.assign({ variant: "text", fullWidth: true, onClick: onSecondaryAction, sx: {
|
|
1612
1796
|
color: primaryColor,
|
|
@@ -1761,7 +1945,7 @@ const QuestionHeader = styles.styled(material.Box)(({ theme }) => ({
|
|
|
1761
1945
|
}));
|
|
1762
1946
|
const QuestionTitle = styles.styled(material.Typography)(({ theme }) => ({
|
|
1763
1947
|
fontFamily: '"Montserrat", sans-serif',
|
|
1764
|
-
fontWeight:
|
|
1948
|
+
fontWeight: 700,
|
|
1765
1949
|
fontSize: '14px',
|
|
1766
1950
|
lineHeight: '20px',
|
|
1767
1951
|
color: '#13131B',
|
|
@@ -1812,20 +1996,40 @@ function QuestionSection({ questionNumber, question, helperText, options, select
|
|
|
1812
1996
|
}) })] }));
|
|
1813
1997
|
}
|
|
1814
1998
|
|
|
1815
|
-
|
|
1999
|
+
// Color configurations for different variants
|
|
2000
|
+
const variantColors = {
|
|
2001
|
+
default: {
|
|
2002
|
+
unselectedBorder: '#D9D9D6',
|
|
2003
|
+
unselectedText: 'rgba(0, 0, 0, 0.40)',
|
|
2004
|
+
unselectedBg: '#FFFFFF',
|
|
2005
|
+
selectedBg: 'rgba(49, 122, 188, 0.10)',
|
|
2006
|
+
hoverBg: 'rgba(0, 0, 0, 0.04)',
|
|
2007
|
+
hoverBorder: '#D9D9D6',
|
|
2008
|
+
},
|
|
2009
|
+
form: {
|
|
2010
|
+
unselectedBorder: '#929094',
|
|
2011
|
+
unselectedText: '#5f5e62',
|
|
2012
|
+
unselectedBg: 'transparent',
|
|
2013
|
+
selectedBg: 'rgba(61, 147, 222, 0.1)',
|
|
2014
|
+
hoverBg: 'rgba(0, 0, 0, 0.02)',
|
|
2015
|
+
hoverBorder: '#5f5e62',
|
|
2016
|
+
},
|
|
2017
|
+
};
|
|
2018
|
+
const StyledOptionButton = styles.styled(material.ButtonBase)(({ selected, size = 'medium', fullWidth, colorVariant = 'default' }) => {
|
|
1816
2019
|
const heights = {
|
|
1817
2020
|
small: '32px',
|
|
1818
2021
|
medium: '40px',
|
|
1819
2022
|
large: '48px',
|
|
1820
2023
|
};
|
|
2024
|
+
const colors = variantColors[colorVariant];
|
|
1821
2025
|
return {
|
|
1822
2026
|
height: heights[size],
|
|
1823
2027
|
width: fullWidth ? '100%' : 'auto',
|
|
1824
|
-
borderRadius: '
|
|
2028
|
+
borderRadius: '24px',
|
|
1825
2029
|
border: selected
|
|
1826
|
-
? '2px solid #
|
|
1827
|
-
:
|
|
1828
|
-
backgroundColor: selected ?
|
|
2030
|
+
? '2px solid #0090DA'
|
|
2031
|
+
: `1px solid ${colors.unselectedBorder}`,
|
|
2032
|
+
backgroundColor: selected ? colors.selectedBg : colors.unselectedBg,
|
|
1829
2033
|
padding: '10px 24px',
|
|
1830
2034
|
display: 'flex',
|
|
1831
2035
|
alignItems: 'center',
|
|
@@ -1833,7 +2037,8 @@ const StyledOptionButton = styles.styled(material.ButtonBase)(({ theme, selected
|
|
|
1833
2037
|
cursor: 'pointer',
|
|
1834
2038
|
transition: 'all 0.2s ease',
|
|
1835
2039
|
'&:hover': {
|
|
1836
|
-
backgroundColor: selected ?
|
|
2040
|
+
backgroundColor: selected ? colors.selectedBg : colors.hoverBg,
|
|
2041
|
+
borderColor: selected ? '#0090DA' : colors.hoverBorder,
|
|
1837
2042
|
},
|
|
1838
2043
|
'&:disabled': {
|
|
1839
2044
|
backgroundColor: '#F5F5F5',
|
|
@@ -1843,48 +2048,59 @@ const StyledOptionButton = styles.styled(material.ButtonBase)(({ theme, selected
|
|
|
1843
2048
|
},
|
|
1844
2049
|
};
|
|
1845
2050
|
});
|
|
1846
|
-
const OptionContent = styles.styled(material.Box)((
|
|
2051
|
+
const OptionContent = styles.styled(material.Box)(() => ({
|
|
1847
2052
|
display: 'flex',
|
|
1848
2053
|
alignItems: 'center',
|
|
1849
2054
|
justifyContent: 'center',
|
|
1850
2055
|
gap: '8px',
|
|
1851
2056
|
width: '100%',
|
|
1852
2057
|
}));
|
|
1853
|
-
const OptionIcon = styles.styled('span')((
|
|
2058
|
+
const OptionIcon = styles.styled('span')(() => ({
|
|
1854
2059
|
fontSize: '18px',
|
|
1855
2060
|
lineHeight: 1,
|
|
1856
2061
|
flexShrink: 0,
|
|
1857
2062
|
}));
|
|
1858
|
-
const OptionLabel = styles.styled(material.Typography)(({
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
2063
|
+
const OptionLabel = styles.styled(material.Typography)(({ selected, colorVariant = 'default' }) => {
|
|
2064
|
+
const colors = variantColors[colorVariant];
|
|
2065
|
+
return {
|
|
2066
|
+
fontWeight: selected ? 600 : 500,
|
|
2067
|
+
fontSize: '16px',
|
|
2068
|
+
lineHeight: '20px',
|
|
2069
|
+
color: selected ? '#0090DA' : colors.unselectedText,
|
|
2070
|
+
textAlign: 'center',
|
|
2071
|
+
};
|
|
2072
|
+
});
|
|
1866
2073
|
|
|
1867
2074
|
/**
|
|
1868
2075
|
* OptionButton - Selectable button for questionnaire options
|
|
1869
2076
|
*
|
|
1870
2077
|
* @example
|
|
1871
2078
|
* ```tsx
|
|
2079
|
+
* // Default variant (lighter colors) for recommendations
|
|
1872
2080
|
* <OptionButton
|
|
1873
2081
|
* value="option1"
|
|
1874
2082
|
* label="Option 1"
|
|
1875
|
-
* icon="🎯"
|
|
1876
2083
|
* selected={selectedValue === 'option1'}
|
|
1877
2084
|
* onClick={(value) => setSelectedValue(value)}
|
|
1878
2085
|
* />
|
|
2086
|
+
*
|
|
2087
|
+
* // Form variant (darker colors) for gender selection, health questions
|
|
2088
|
+
* <OptionButton
|
|
2089
|
+
* value="male"
|
|
2090
|
+
* label="Male"
|
|
2091
|
+
* variant="form"
|
|
2092
|
+
* selected={gender === 'male'}
|
|
2093
|
+
* onClick={(value) => setGender(value)}
|
|
2094
|
+
* />
|
|
1879
2095
|
* ```
|
|
1880
2096
|
*/
|
|
1881
|
-
function OptionButton
|
|
2097
|
+
function OptionButton({ value, label, icon, selected = false, disabled = false, onClick, size = 'medium', fullWidth = true, variant = 'default', formatMessage = (descriptor) => descriptor.id, }) {
|
|
1882
2098
|
const handleClick = () => {
|
|
1883
2099
|
if (!disabled && onClick) {
|
|
1884
2100
|
onClick(value);
|
|
1885
2101
|
}
|
|
1886
2102
|
};
|
|
1887
|
-
return (jsxRuntime.jsx(StyledOptionButton, Object.assign({ selected: selected, disabled: disabled, onClick: handleClick, size: size, fullWidth: fullWidth }, { children: jsxRuntime.jsxs(OptionContent, { children: [icon && jsxRuntime.jsx(OptionIcon, { children: icon }), jsxRuntime.jsx(OptionLabel, Object.assign({ selected: selected, disabled: disabled,
|
|
2103
|
+
return (jsxRuntime.jsx(StyledOptionButton, Object.assign({ selected: selected, disabled: disabled, onClick: handleClick, size: size, fullWidth: fullWidth, colorVariant: variant }, { children: jsxRuntime.jsxs(OptionContent, { children: [icon && jsxRuntime.jsx(OptionIcon, { children: icon }), jsxRuntime.jsx(OptionLabel, Object.assign({ selected: selected, disabled: disabled, colorVariant: variant }, { children: formatMessage({ id: label }) }))] }) })));
|
|
1888
2104
|
}
|
|
1889
2105
|
|
|
1890
2106
|
const ToggleContainer$1 = styles.styled(material.Box)(({ theme }) => ({
|
|
@@ -2093,12 +2309,13 @@ function BillingToggle({ value, onChange, formatMessage = (descriptor) => descri
|
|
|
2093
2309
|
const tenantTheme = useTenantTheme();
|
|
2094
2310
|
const theme = tenantTheme === null || tenantTheme === void 0 ? void 0 : tenantTheme.theme;
|
|
2095
2311
|
// Get theme colors with SSR-safe fallbacks
|
|
2096
|
-
const toggleActiveColor = getThemeColor(theme, 'ui.toggleActive', '#
|
|
2312
|
+
const toggleActiveColor = getThemeColor(theme, 'ui.toggleActive', '#0090DA');
|
|
2097
2313
|
const toggleActiveTextColor = getThemeColor(theme, 'ui.toggleActiveText', '#fefbff');
|
|
2098
|
-
const toggleInactiveTextColor = getThemeColor(theme, 'ui.toggleInactiveText', '#
|
|
2314
|
+
const toggleInactiveTextColor = getThemeColor(theme, 'ui.toggleInactiveText', '#0090DA');
|
|
2099
2315
|
const toggleBgColor = getThemeColor(theme, 'ui.sliderBackground', '#f9f9f9');
|
|
2100
2316
|
return (jsxRuntime.jsxs(ToggleContainer, Object.assign({ sx: {
|
|
2101
2317
|
backgroundColor: toggleBgColor,
|
|
2318
|
+
border: `1px solid ${toggleActiveColor}`,
|
|
2102
2319
|
} }, { children: [jsxRuntime.jsx(ToggleButton, Object.assign({ active: value === 'annually', onClick: () => onChange('monthly'), sx: {
|
|
2103
2320
|
backgroundColor: value === 'monthly' ? toggleActiveColor : 'transparent',
|
|
2104
2321
|
color: value === 'monthly'
|
|
@@ -2666,15 +2883,15 @@ const ButtonContainer = styles.styled(material.Box)(({ isFixed }) => ({
|
|
|
2666
2883
|
zIndex: 999,
|
|
2667
2884
|
}));
|
|
2668
2885
|
const StyledButton = styles.styled('button')(({ theme, isDisabled }) => {
|
|
2669
|
-
var _a, _b
|
|
2886
|
+
var _a, _b;
|
|
2670
2887
|
return ({
|
|
2671
2888
|
width: '100%',
|
|
2672
2889
|
height: '48px',
|
|
2673
|
-
borderRadius: '
|
|
2890
|
+
borderRadius: '24px',
|
|
2674
2891
|
border: 'none',
|
|
2675
2892
|
backgroundColor: isDisabled
|
|
2676
2893
|
? '#E1E2EB'
|
|
2677
|
-
:
|
|
2894
|
+
: '#0090DA',
|
|
2678
2895
|
color: isDisabled ? '#929094' : '#fff',
|
|
2679
2896
|
fontFamily: 'Montserrat',
|
|
2680
2897
|
fontSize: '14px',
|
|
@@ -2685,7 +2902,7 @@ const StyledButton = styles.styled('button')(({ theme, isDisabled }) => {
|
|
|
2685
2902
|
'&:hover': {
|
|
2686
2903
|
backgroundColor: isDisabled
|
|
2687
2904
|
? '#E1E2EB'
|
|
2688
|
-
: ((
|
|
2905
|
+
: ((_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',
|
|
2689
2906
|
},
|
|
2690
2907
|
});
|
|
2691
2908
|
});
|
|
@@ -2698,10 +2915,8 @@ const QuestionContainer = styles.styled(material.Box)({
|
|
|
2698
2915
|
display: 'flex',
|
|
2699
2916
|
flexDirection: 'column',
|
|
2700
2917
|
gap: '8px',
|
|
2701
|
-
marginBottom: '24px',
|
|
2702
2918
|
});
|
|
2703
2919
|
const QuestionText = styles.styled(material.Typography)({
|
|
2704
|
-
fontFamily: 'Montserrat',
|
|
2705
2920
|
fontSize: '14px',
|
|
2706
2921
|
fontWeight: 400,
|
|
2707
2922
|
color: '#13131B',
|
|
@@ -2712,7 +2927,7 @@ const OptionsContainer = styles.styled(material.Box)({
|
|
|
2712
2927
|
gap: '16px',
|
|
2713
2928
|
marginTop: '12px',
|
|
2714
2929
|
});
|
|
2715
|
-
|
|
2930
|
+
styles.styled(material.Box)(({ selected }) => ({
|
|
2716
2931
|
flex: 1,
|
|
2717
2932
|
height: '48px',
|
|
2718
2933
|
border: `1px solid ${selected ? '#13131B' : '#929094'}`,
|
|
@@ -2727,7 +2942,7 @@ const OptionButton = styles.styled(material.Box)(({ selected }) => ({
|
|
|
2727
2942
|
borderColor: '#13131B',
|
|
2728
2943
|
},
|
|
2729
2944
|
}));
|
|
2730
|
-
|
|
2945
|
+
styles.styled(material.Typography)(({ selected }) => ({
|
|
2731
2946
|
fontFamily: 'Montserrat',
|
|
2732
2947
|
fontSize: '14px',
|
|
2733
2948
|
fontWeight: 600,
|
|
@@ -2736,11 +2951,10 @@ const OptionText = styles.styled(material.Typography)(({ selected }) => ({
|
|
|
2736
2951
|
}));
|
|
2737
2952
|
|
|
2738
2953
|
const HealthQuestionGroup = ({ question, questionNumber, value, onChange, error, labels = { yes: 'Yes', no: 'No' }, sx, }) => {
|
|
2739
|
-
return (jsxRuntime.jsxs(QuestionContainer, Object.assign({ sx: sx }, { children: [jsxRuntime.jsxs(QuestionText, { children: [questionNumber && `${questionNumber}. `, question] }), jsxRuntime.jsxs(OptionsContainer, { children: [jsxRuntime.jsx(OptionButton,
|
|
2954
|
+
return (jsxRuntime.jsxs(QuestionContainer, Object.assign({ sx: sx }, { children: [jsxRuntime.jsxs(QuestionText, { children: [questionNumber && `${questionNumber}. `, question] }), jsxRuntime.jsxs(OptionsContainer, { children: [jsxRuntime.jsx(OptionButton, { value: "yes", label: labels.yes || 'Yes', selected: value === 'yes', onClick: () => onChange('yes'), variant: "form" }), jsxRuntime.jsx(OptionButton, { value: "no", label: labels.no || 'No', selected: value === 'no', onClick: () => onChange('no'), variant: "form" })] }), error && (jsxRuntime.jsx(material.Typography, Object.assign({ sx: {
|
|
2740
2955
|
color: 'error.main',
|
|
2741
2956
|
fontSize: '12px',
|
|
2742
2957
|
mt: 0.5,
|
|
2743
|
-
ml: 2,
|
|
2744
2958
|
} }, { children: error })))] })));
|
|
2745
2959
|
};
|
|
2746
2960
|
|
|
@@ -2824,28 +3038,24 @@ const ContactDetailsForm = ({ renderField, fields, mailingFields, mailingAddress
|
|
|
2824
3038
|
} }, { children: fields.phone_number.helperText })))] }), renderField(fields.email_address), jsxRuntime.jsx(material.Divider, { sx: { borderColor: 'rgba(0,0,0,0.1)' } }), jsxRuntime.jsx(SectionTitle$1, { children: "Residential address" }), jsxRuntime.jsxs(material.Box, { children: [renderField(fields.residential_address_line1), fields.residential_address_line1.helperText && (jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: {
|
|
2825
3039
|
display: 'block',
|
|
2826
3040
|
mt: 0.5,
|
|
2827
|
-
ml: 2,
|
|
2828
3041
|
color: '#5F5E62',
|
|
2829
3042
|
fontSize: '12px',
|
|
2830
3043
|
fontFamily: 'Montserrat',
|
|
2831
3044
|
} }, { children: fields.residential_address_line1.helperText })))] }), jsxRuntime.jsxs(material.Box, { children: [renderField(fields.residential_address_line2), fields.residential_address_line2.helperText && (jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: {
|
|
2832
3045
|
display: 'block',
|
|
2833
3046
|
mt: 0.5,
|
|
2834
|
-
ml: 2,
|
|
2835
3047
|
color: '#5F5E62',
|
|
2836
3048
|
fontSize: '12px',
|
|
2837
3049
|
fontFamily: 'Montserrat',
|
|
2838
3050
|
} }, { children: fields.residential_address_line2.helperText })))] }), renderField(fields.postal_code), renderField(fields.city), renderField(fields.state), jsxRuntime.jsx(material.Divider, { sx: { borderColor: 'rgba(0,0,0,0.1)' } }), (mailingAddressSame === null || mailingAddressSame === void 0 ? void 0 : mailingAddressSame.checked) && mailingFields && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionTitle$1, { children: "Mailing address" }), jsxRuntime.jsxs(material.Box, { children: [renderField(mailingFields.mailing_address_line1), mailingFields.mailing_address_line1.helperText && (jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: {
|
|
2839
3051
|
display: 'block',
|
|
2840
3052
|
mt: 0.5,
|
|
2841
|
-
ml: 2,
|
|
2842
3053
|
color: '#5F5E62',
|
|
2843
3054
|
fontSize: '12px',
|
|
2844
3055
|
fontFamily: 'Montserrat',
|
|
2845
3056
|
} }, { children: mailingFields.mailing_address_line1.helperText })))] }), jsxRuntime.jsxs(material.Box, { children: [renderField(mailingFields.mailing_address_line2), mailingFields.mailing_address_line2.helperText && (jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: {
|
|
2846
3057
|
display: 'block',
|
|
2847
3058
|
mt: 0.5,
|
|
2848
|
-
ml: 2,
|
|
2849
3059
|
color: '#5F5E62',
|
|
2850
3060
|
fontSize: '12px',
|
|
2851
3061
|
fontFamily: 'Montserrat',
|
|
@@ -2877,7 +3087,7 @@ const ChildInformationForm = ({ renderField, fields, onSubmit, formRef, sx, }) =
|
|
|
2877
3087
|
color: '#5F5E62',
|
|
2878
3088
|
fontSize: '12px',
|
|
2879
3089
|
fontFamily: 'Montserrat',
|
|
2880
|
-
} }, { children: fields.full_name.helperText })))] }), renderField(fields.nric), renderField(fields.date_of_birth), renderField(fields.gender), renderField(fields.nationality)] })) })));
|
|
3090
|
+
} }, { children: fields.full_name.helperText })))] }), fields.nric && renderField(fields.nric), renderField(fields.date_of_birth), renderField(fields.gender), renderField(fields.nationality)] })) })));
|
|
2881
3091
|
};
|
|
2882
3092
|
|
|
2883
3093
|
/**
|
|
@@ -2942,7 +3152,7 @@ const StyledAccordionSummary = material.styled(material.AccordionSummary)(({ the
|
|
|
2942
3152
|
},
|
|
2943
3153
|
}));
|
|
2944
3154
|
const FAQQuestion = material.styled(material.Typography)(({ theme }) => ({
|
|
2945
|
-
fontWeight:
|
|
3155
|
+
fontWeight: 700,
|
|
2946
3156
|
fontSize: '14px',
|
|
2947
3157
|
lineHeight: '20px',
|
|
2948
3158
|
flex: 1,
|
|
@@ -3062,7 +3272,7 @@ const BenefitContent = material.styled(material.Box)({
|
|
|
3062
3272
|
gap: '6px',
|
|
3063
3273
|
});
|
|
3064
3274
|
const BenefitTitle = material.styled(material.Typography)(({ theme }) => ({
|
|
3065
|
-
fontWeight:
|
|
3275
|
+
fontWeight: 700,
|
|
3066
3276
|
fontSize: '14px',
|
|
3067
3277
|
lineHeight: '20px',
|
|
3068
3278
|
margin: 0,
|
|
@@ -3263,7 +3473,7 @@ exports.HealthQuestionGroup = HealthQuestionGroup;
|
|
|
3263
3473
|
exports.ICON_PATHS = ICON_PATHS;
|
|
3264
3474
|
exports.InfoCallout = InfoCallout;
|
|
3265
3475
|
exports.NewHeader = NewHeader;
|
|
3266
|
-
exports.OptionButton = OptionButton
|
|
3476
|
+
exports.OptionButton = OptionButton;
|
|
3267
3477
|
exports.PersonalInformationForm = PersonalInformationForm;
|
|
3268
3478
|
exports.ProductCard = ProductCard;
|
|
3269
3479
|
exports.ProductSelectionDrawer = ProductSelectionDrawer;
|