igloo-d2c-components 1.0.35 → 1.0.36
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 +197 -91
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +197 -91
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/CheckoutFormButton/styled.d.ts +9 -0
- package/dist/types/components/DesktopHeaderMenuBar/types.d.ts +2 -0
- package/dist/types/components/OptionButton/OptionButton.d.ts +1 -0
- package/dist/types/components/OptionButton/styled.d.ts +1 -1
- package/dist/types/components/ProductSelectionDrawer/ProductSelectionDrawer.d.ts +13 -0
- package/dist/types/components/ProductSelectionDrawer/styled.d.ts +35 -6
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -5,7 +5,6 @@ import { createContext, useMemo, useContext, useState, useEffect } from 'react';
|
|
|
5
5
|
import { Button as Button$1, Card as Card$1, CardHeader, CardContent, CardActions, Box, Typography, Menu, MenuItem, Avatar, Drawer, IconButton, FormControlLabel, useTheme, useMediaQuery, Toolbar, Icon, RadioGroup, Radio, AppBar as AppBar$1, Divider, List, ListItem, ListItemButton, ListItemText, styled as styled$1, Dialog, ButtonBase, Slider, Checkbox, Accordion, AccordionSummary, AccordionDetails } from '@mui/material';
|
|
6
6
|
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
|
|
7
7
|
import CloseIcon from '@mui/icons-material/Close';
|
|
8
|
-
import LanguageIcon from '@mui/icons-material/Language';
|
|
9
8
|
import AppBar from '@mui/material/AppBar';
|
|
10
9
|
import { styled } from '@mui/material/styles';
|
|
11
10
|
import MenuIcon from '@mui/icons-material/Menu';
|
|
@@ -1071,10 +1070,10 @@ const PurchaseButton = styled(Button$1)(() => ({
|
|
|
1071
1070
|
borderRadius: '24px',
|
|
1072
1071
|
whiteSpace: 'nowrap',
|
|
1073
1072
|
'&:hover': {
|
|
1074
|
-
backgroundColor: '
|
|
1073
|
+
backgroundColor: 'rgba(0, 144, 218, 0.7)',
|
|
1075
1074
|
},
|
|
1076
1075
|
'&:active': {
|
|
1077
|
-
backgroundColor: '#
|
|
1076
|
+
backgroundColor: '#0090DA',
|
|
1078
1077
|
},
|
|
1079
1078
|
}));
|
|
1080
1079
|
/**
|
|
@@ -1171,10 +1170,13 @@ languages = [], currentLocale, onLanguageChange, }) {
|
|
|
1171
1170
|
onLanguageChange === null || onLanguageChange === void 0 ? void 0 : onLanguageChange(locale, value);
|
|
1172
1171
|
handleLangMenuClose();
|
|
1173
1172
|
};
|
|
1174
|
-
// Derive
|
|
1175
|
-
const
|
|
1173
|
+
// Derive short code for language switch trigger (per Figma: "EN" with chevron)
|
|
1174
|
+
const currentLangShortCode = React.useMemo(() => {
|
|
1175
|
+
var _a;
|
|
1176
1176
|
const match = languages.find((l) => l.locale === currentLocale);
|
|
1177
|
-
|
|
1177
|
+
if (match === null || match === void 0 ? void 0 : match.shortCode)
|
|
1178
|
+
return match.shortCode;
|
|
1179
|
+
return ((_a = match === null || match === void 0 ? void 0 : match.locale) === null || _a === void 0 ? void 0 : _a.toUpperCase().substring(0, 2)) || 'EN';
|
|
1178
1180
|
}, [languages, currentLocale]);
|
|
1179
1181
|
// Determine which button props to use (support legacy props)
|
|
1180
1182
|
const shouldShowCtaButton = (_a = showCtaButton !== null && showCtaButton !== void 0 ? showCtaButton : showLoginButton) !== null && _a !== void 0 ? _a : true;
|
|
@@ -1242,7 +1244,7 @@ languages = [], currentLocale, onLanguageChange, }) {
|
|
|
1242
1244
|
horizontal: 'left',
|
|
1243
1245
|
}, MenuListProps: {
|
|
1244
1246
|
'aria-labelledby': `menu-button-${item.key}`,
|
|
1245
|
-
} }, { children: item.subItems.map((subItem) => (jsxs(StyledMenuItem$1, Object.assign({ onClick: () => handleSubItemClick(item, subItem.key), "data-testid": `submenu-item-${subItem.key}` }, { children: [subItem.icon && (jsx(MenuItemIcon, { src: subItem.icon, alt: subItem.label })), formatMessage({ id: subItem.label })] }), subItem.key))) })))] }, item.key))), languages.length > 0 && (jsxs(Fragment, { children: [jsxs(MenuItemButton, Object.assign({ onClick: handleLangMenuOpen, "aria-haspopup": "true", "aria-expanded": isLangMenuOpen, "data-testid": "language-switcher" }, { children: [jsx(
|
|
1247
|
+
} }, { children: item.subItems.map((subItem) => (jsxs(StyledMenuItem$1, Object.assign({ onClick: () => handleSubItemClick(item, subItem.key), "data-testid": `submenu-item-${subItem.key}` }, { children: [subItem.icon && (jsx(MenuItemIcon, { src: subItem.icon, alt: subItem.label })), formatMessage({ id: subItem.label })] }), subItem.key))) })))] }, item.key))), languages.length > 0 && (jsxs(Fragment, { children: [jsxs(MenuItemButton, Object.assign({ onClick: handleLangMenuOpen, "aria-haspopup": "true", "aria-expanded": isLangMenuOpen, "data-testid": "language-switcher" }, { children: [jsx(MenuItemText, { children: currentLangShortCode }), jsx(DropdownIcon, { sx: {
|
|
1246
1248
|
transform: isLangMenuOpen
|
|
1247
1249
|
? 'rotate(180deg)'
|
|
1248
1250
|
: 'rotate(0deg)',
|
|
@@ -2325,12 +2327,25 @@ const DialogContent = styled$1(Box)(() => ({
|
|
|
2325
2327
|
overflowY: 'auto',
|
|
2326
2328
|
padding: '24px',
|
|
2327
2329
|
}));
|
|
2328
|
-
|
|
2330
|
+
/** Product grid for dialog - matches featured-form-section ProductGrid from life-landing-page */
|
|
2331
|
+
const DialogProductsGrid = styled$1(Box, {
|
|
2332
|
+
shouldForwardProp: (prop) => prop !== 'productCount',
|
|
2333
|
+
})(({ theme, productCount = 1 }) => ({
|
|
2329
2334
|
display: 'grid',
|
|
2330
2335
|
gridTemplateColumns: 'repeat(2, 1fr)',
|
|
2331
|
-
gap: '
|
|
2336
|
+
gap: '12px',
|
|
2337
|
+
width: '100%',
|
|
2338
|
+
maxWidth: '744px',
|
|
2339
|
+
[theme.breakpoints.up('md')]: Object.assign(Object.assign({}, (productCount >= 2
|
|
2340
|
+
? {
|
|
2341
|
+
gridTemplateColumns: `repeat(${productCount}, 158px)`,
|
|
2342
|
+
justifyContent: 'left',
|
|
2343
|
+
}
|
|
2344
|
+
: {
|
|
2345
|
+
gridTemplateColumns: '1fr',
|
|
2346
|
+
})), { gap: '12px' }),
|
|
2332
2347
|
}));
|
|
2333
|
-
|
|
2348
|
+
styled$1(Box)(() => ({
|
|
2334
2349
|
border: '1px solid #E0E0E0',
|
|
2335
2350
|
borderRadius: '0px',
|
|
2336
2351
|
padding: '16px',
|
|
@@ -2339,13 +2354,13 @@ const DialogProductCard = styled$1(Box)(() => ({
|
|
|
2339
2354
|
alignItems: 'center',
|
|
2340
2355
|
gap: '16px',
|
|
2341
2356
|
}));
|
|
2342
|
-
|
|
2357
|
+
styled$1(Box)(() => ({
|
|
2343
2358
|
height: '32px',
|
|
2344
2359
|
display: 'flex',
|
|
2345
2360
|
alignItems: 'center',
|
|
2346
2361
|
justifyContent: 'center',
|
|
2347
2362
|
}));
|
|
2348
|
-
|
|
2363
|
+
styled$1(Typography)(() => ({
|
|
2349
2364
|
fontFamily: 'Montserrat, sans-serif',
|
|
2350
2365
|
fontSize: '16px',
|
|
2351
2366
|
fontWeight: 600,
|
|
@@ -2354,7 +2369,7 @@ const DialogProductName = styled$1(Typography)(() => ({
|
|
|
2354
2369
|
textAlign: 'center',
|
|
2355
2370
|
wordSpacing: '0px',
|
|
2356
2371
|
}));
|
|
2357
|
-
|
|
2372
|
+
styled$1(Typography)(() => ({
|
|
2358
2373
|
fontFamily: 'Montserrat, sans-serif',
|
|
2359
2374
|
fontSize: '14px',
|
|
2360
2375
|
fontWeight: 400,
|
|
@@ -2407,45 +2422,120 @@ const ProductsContainer = styled$1(Box)({
|
|
|
2407
2422
|
padding: '16px',
|
|
2408
2423
|
backgroundColor: '#ffffff',
|
|
2409
2424
|
});
|
|
2410
|
-
|
|
2425
|
+
/** Product grid - matches featured-form-section ProductGrid from life-landing-page */
|
|
2426
|
+
const ProductsGrid = styled$1(Box, {
|
|
2427
|
+
shouldForwardProp: (prop) => prop !== 'productCount',
|
|
2428
|
+
})(({ theme, productCount = 1 }) => ({
|
|
2411
2429
|
display: 'grid',
|
|
2412
2430
|
gridTemplateColumns: 'repeat(2, 1fr)',
|
|
2413
2431
|
gap: '12px',
|
|
2414
|
-
|
|
2415
|
-
|
|
2432
|
+
width: '100%',
|
|
2433
|
+
maxWidth: '744px',
|
|
2434
|
+
[theme.breakpoints.up('md')]: Object.assign(Object.assign({}, (productCount >= 2
|
|
2435
|
+
? {
|
|
2436
|
+
gridTemplateColumns: `repeat(${productCount}, 158px)`,
|
|
2437
|
+
justifyContent: 'left',
|
|
2438
|
+
}
|
|
2439
|
+
: {
|
|
2440
|
+
gridTemplateColumns: '1fr',
|
|
2441
|
+
})), { gap: '12px' }),
|
|
2442
|
+
}));
|
|
2443
|
+
/** Category label above the product card (e.g., "Medical", "Critical Illness") */
|
|
2444
|
+
const ProductCategoryLabel = styled$1(Typography)(() => ({
|
|
2445
|
+
fontFamily: '"MetLifeCircular", "Montserrat", sans-serif',
|
|
2446
|
+
fontWeight: 500,
|
|
2447
|
+
fontSize: '12px',
|
|
2448
|
+
lineHeight: '16px',
|
|
2449
|
+
color: '#5f5e62',
|
|
2450
|
+
letterSpacing: '0px',
|
|
2451
|
+
}));
|
|
2452
|
+
/** Product card wrapper: includes category label + card */
|
|
2453
|
+
const ProductCardWrapper = styled$1(Box)(() => ({
|
|
2416
2454
|
display: 'flex',
|
|
2417
2455
|
flexDirection: 'column',
|
|
2418
|
-
gap: '
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2456
|
+
gap: '4px',
|
|
2457
|
+
alignItems: 'flex-start',
|
|
2458
|
+
}));
|
|
2459
|
+
/** Product card - square, clickable, matches featured-form-section design */
|
|
2460
|
+
const ProductCard$1 = styled$1(Box)(() => ({
|
|
2461
|
+
position: 'relative',
|
|
2462
|
+
width: '100%',
|
|
2463
|
+
aspectRatio: '1 / 1',
|
|
2464
|
+
border: '1px solid #0090da',
|
|
2465
|
+
borderRadius: '0px',
|
|
2426
2466
|
display: 'flex',
|
|
2427
2467
|
flexDirection: 'column',
|
|
2428
|
-
|
|
2468
|
+
justifyContent: 'flex-end',
|
|
2469
|
+
cursor: 'pointer',
|
|
2470
|
+
overflow: 'clip',
|
|
2471
|
+
transition: 'border 0.2s ease, box-shadow 0.2s ease',
|
|
2472
|
+
'&:hover': {
|
|
2473
|
+
borderWidth: '2px',
|
|
2474
|
+
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.15)',
|
|
2475
|
+
},
|
|
2476
|
+
'&:focus': {
|
|
2477
|
+
outline: '2px solid #ffffff',
|
|
2478
|
+
outlineOffset: '2px',
|
|
2479
|
+
},
|
|
2480
|
+
'@media (min-width: 900px)': {
|
|
2481
|
+
width: '158px',
|
|
2482
|
+
height: '158px',
|
|
2483
|
+
},
|
|
2484
|
+
}));
|
|
2485
|
+
/** Background image that fills the product card */
|
|
2486
|
+
const ProductCardImage = styled$1('img')(() => ({
|
|
2487
|
+
position: 'absolute',
|
|
2488
|
+
inset: 0,
|
|
2489
|
+
width: '100%',
|
|
2490
|
+
height: '100%',
|
|
2491
|
+
objectFit: 'cover',
|
|
2492
|
+
pointerEvents: 'none',
|
|
2493
|
+
}));
|
|
2494
|
+
/** Placeholder gradient when no card image is provided */
|
|
2495
|
+
const ProductCardPlaceholder = styled$1(Box)(() => ({
|
|
2496
|
+
position: 'absolute',
|
|
2497
|
+
inset: 0,
|
|
2498
|
+
background: 'linear-gradient(135deg, #e8f4fd 0%, #b8dff5 100%)',
|
|
2499
|
+
pointerEvents: 'none',
|
|
2500
|
+
}));
|
|
2501
|
+
/** White bottom bar with logo + product name */
|
|
2502
|
+
const ProductCardBottomBar = styled$1(Box)(() => ({
|
|
2503
|
+
position: 'relative',
|
|
2504
|
+
display: 'flex',
|
|
2429
2505
|
alignItems: 'center',
|
|
2430
2506
|
justifyContent: 'center',
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2507
|
+
gap: '4px',
|
|
2508
|
+
height: '32px',
|
|
2509
|
+
width: '100%',
|
|
2510
|
+
flexShrink: 0,
|
|
2511
|
+
backgroundColor: '#ffffff',
|
|
2512
|
+
}));
|
|
2513
|
+
/** Icon inside the bottom bar */
|
|
2514
|
+
const ProductIcon = styled$1(Box)(() => ({
|
|
2434
2515
|
display: 'flex',
|
|
2435
2516
|
alignItems: 'center',
|
|
2436
2517
|
justifyContent: 'center',
|
|
2437
|
-
|
|
2438
|
-
|
|
2518
|
+
flexShrink: 0,
|
|
2519
|
+
height: '11px',
|
|
2520
|
+
width: '40.7px',
|
|
2521
|
+
'& img': {
|
|
2522
|
+
width: '100%',
|
|
2523
|
+
height: '100%',
|
|
2524
|
+
objectFit: 'contain',
|
|
2525
|
+
},
|
|
2526
|
+
}));
|
|
2439
2527
|
const ProductName$1 = styled$1(Typography)({
|
|
2440
|
-
fontFamily: 'Montserrat, sans-serif',
|
|
2441
|
-
fontSize: '14px',
|
|
2528
|
+
fontFamily: '"MetLifeCircular", "Montserrat", sans-serif',
|
|
2442
2529
|
fontWeight: 700,
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
color: '#
|
|
2530
|
+
fontSize: '14px',
|
|
2531
|
+
lineHeight: '20px',
|
|
2532
|
+
color: '#75787b',
|
|
2446
2533
|
textAlign: 'center',
|
|
2534
|
+
letterSpacing: '0px',
|
|
2535
|
+
whiteSpace: 'nowrap',
|
|
2447
2536
|
});
|
|
2448
|
-
|
|
2537
|
+
/** @deprecated Use ProductCategoryLabel - kept for Dialog variant */
|
|
2538
|
+
styled$1(Typography)({
|
|
2449
2539
|
fontFamily: 'Montserrat, sans-serif',
|
|
2450
2540
|
fontSize: '12px',
|
|
2451
2541
|
fontWeight: 400,
|
|
@@ -2454,59 +2544,50 @@ const ProductType = styled$1(Typography)({
|
|
|
2454
2544
|
color: '#13131b',
|
|
2455
2545
|
textAlign: 'center',
|
|
2456
2546
|
});
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2547
|
+
/** @deprecated Use new ProductCard - kept for Dialog variant */
|
|
2548
|
+
styled$1(Box)({
|
|
2549
|
+
display: 'flex',
|
|
2550
|
+
flexDirection: 'column',
|
|
2551
|
+
gap: '6px',
|
|
2552
|
+
alignItems: 'center',
|
|
2553
|
+
justifyContent: 'center',
|
|
2554
|
+
flex: 1,
|
|
2555
|
+
});
|
|
2556
|
+
/** @deprecated Use ProductIcon - kept for Dialog variant */
|
|
2557
|
+
styled$1(Box)({
|
|
2558
|
+
display: 'flex',
|
|
2559
|
+
alignItems: 'center',
|
|
2560
|
+
justifyContent: 'center',
|
|
2561
|
+
padding: '4px',
|
|
2467
2562
|
});
|
|
2468
2563
|
|
|
2469
2564
|
function ProductSelectionDrawer({ open, onClose, products, onProductSelect, title = 'Select your product', subtitle = 'Pick the product that suits your protection goals to view available plans', viewPlansButtonText = 'View plans', variant = 'drawer', }) {
|
|
2470
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2471
|
-
const tenantTheme = useTenantTheme();
|
|
2472
|
-
// Get primary color from tenant theme, fallback to default
|
|
2473
|
-
const primaryColor = ((_c = (_b = (_a = tenantTheme === null || tenantTheme === void 0 ? void 0 : tenantTheme.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.primary) === null || _c === void 0 ? void 0 : _c.main) || '#0090DA';
|
|
2474
|
-
const primaryDark = ((_f = (_e = (_d = tenantTheme === null || tenantTheme === void 0 ? void 0 : tenantTheme.theme) === null || _d === void 0 ? void 0 : _d.palette) === null || _e === void 0 ? void 0 : _e.primary) === null || _f === void 0 ? void 0 : _f.dark) || '#007bb8';
|
|
2475
|
-
const primaryDarker = '#006699'; // Active state
|
|
2476
2565
|
// Desktop Dialog variant
|
|
2477
2566
|
if (variant === 'dialog') {
|
|
2478
2567
|
return (jsxs(StyledDialog, Object.assign({ open: open, onClose: onClose, maxWidth: "md", fullWidth: true }, { children: [jsxs(DialogHeader, { children: [jsx(IconButton, Object.assign({ onClick: onClose, sx: {
|
|
2479
2568
|
position: 'absolute',
|
|
2480
2569
|
right: 16,
|
|
2481
2570
|
top: 16,
|
|
2482
|
-
} }, { children: jsx(CloseIcon, {}) })), jsx(DialogHeaderTitle, { children: title }), jsx(DialogHeaderSubtitle, { children: subtitle })] }), jsx(DialogContent, { children: jsx(DialogProductsGrid, {
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
'&:active': {
|
|
2492
|
-
backgroundColor: primaryDarker,
|
|
2493
|
-
},
|
|
2494
|
-
} }, { children: viewPlansButtonText }))] }, product.id))) }) })] })));
|
|
2571
|
+
} }, { children: jsx(CloseIcon, {}) })), jsx(DialogHeaderTitle, { children: title }), jsx(DialogHeaderSubtitle, { children: subtitle })] }), jsx(DialogContent, { children: jsx(DialogProductsGrid, Object.assign({ productCount: products.length }, { children: products.map((product) => {
|
|
2572
|
+
var _a, _b;
|
|
2573
|
+
return (jsxs(ProductCardWrapper, { children: [jsx(ProductCategoryLabel, { children: (_a = product.subtitle) !== null && _a !== void 0 ? _a : product.type }), jsxs(ProductCard$1, Object.assign({ onClick: () => onProductSelect(product.id), role: "button", tabIndex: 0, onKeyDown: (e) => {
|
|
2574
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
2575
|
+
e.preventDefault();
|
|
2576
|
+
onProductSelect(product.id);
|
|
2577
|
+
}
|
|
2578
|
+
} }, { children: [product.cardImage ? (jsx(ProductCardImage, { src: product.cardImage, alt: product.name })) : (jsx(ProductCardPlaceholder, {})), jsxs(ProductCardBottomBar, { children: [jsx(ProductIcon, { children: jsx("img", { src: (_b = product.icon) !== null && _b !== void 0 ? _b : product.logo, alt: "" }) }), jsx(ProductName$1, { children: product.name })] })] }))] }, product.id));
|
|
2579
|
+
}) })) })] })));
|
|
2495
2580
|
}
|
|
2496
2581
|
// Mobile Drawer variant (default)
|
|
2497
|
-
return (jsx(StyledDrawer, Object.assign({ anchor: "bottom", open: open, onClose: onClose }, { children: jsxs(DrawerContent, { children: [jsx(DrawerHeader, { children: jsx(CloseButtonContainer, { children: jsx(IconButton, Object.assign({ onClick: onClose, sx: { padding: 0 } }, { children: jsx(CloseIcon, { sx: { fontSize: 24, color: '#13131b' } }) })) }) }), jsxs(Header, { children: [jsx(HeaderTitle, { children: title }), jsx(HeaderSubtitle, { children: subtitle })] }), jsx(ProductsContainer, { children: jsx(ProductsGrid, {
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
'&:active': {
|
|
2507
|
-
backgroundColor: primaryDarker,
|
|
2508
|
-
},
|
|
2509
|
-
} }, { children: viewPlansButtonText }))] }, product.id))) }) })] }) })));
|
|
2582
|
+
return (jsx(StyledDrawer, Object.assign({ anchor: "bottom", open: open, onClose: onClose }, { children: jsxs(DrawerContent, { children: [jsx(DrawerHeader, { children: jsx(CloseButtonContainer, { children: jsx(IconButton, Object.assign({ onClick: onClose, sx: { padding: 0 } }, { children: jsx(CloseIcon, { sx: { fontSize: 24, color: '#13131b' } }) })) }) }), jsxs(Header, { children: [jsx(HeaderTitle, { children: title }), jsx(HeaderSubtitle, { children: subtitle })] }), jsx(ProductsContainer, { children: jsx(ProductsGrid, Object.assign({ productCount: products.length }, { children: products.map((product) => {
|
|
2583
|
+
var _a, _b;
|
|
2584
|
+
return (jsxs(ProductCardWrapper, { children: [jsx(ProductCategoryLabel, { children: (_a = product.subtitle) !== null && _a !== void 0 ? _a : product.type }), jsxs(ProductCard$1, Object.assign({ onClick: () => onProductSelect(product.id), role: "button", tabIndex: 0, onKeyDown: (e) => {
|
|
2585
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
2586
|
+
e.preventDefault();
|
|
2587
|
+
onProductSelect(product.id);
|
|
2588
|
+
}
|
|
2589
|
+
} }, { children: [product.cardImage ? (jsx(ProductCardImage, { src: product.cardImage, alt: product.name })) : (jsx(ProductCardPlaceholder, {})), jsxs(ProductCardBottomBar, { children: [jsx(ProductIcon, { children: jsx("img", { src: (_b = product.icon) !== null && _b !== void 0 ? _b : product.logo, alt: "" }) }), jsx(ProductName$1, { children: product.name })] })] }))] }, product.id));
|
|
2590
|
+
}) })) })] }) })));
|
|
2510
2591
|
}
|
|
2511
2592
|
|
|
2512
2593
|
const QuestionContainer$1 = styled(Box)(({ theme }) => ({
|
|
@@ -2609,6 +2690,14 @@ const variantColors = {
|
|
|
2609
2690
|
hoverBg: 'rgba(0, 0, 0, 0.02)',
|
|
2610
2691
|
hoverBorder: '#5f5e62',
|
|
2611
2692
|
},
|
|
2693
|
+
formLightBorder: {
|
|
2694
|
+
unselectedBorder: '#E0E0E0',
|
|
2695
|
+
unselectedText: '#5f5e62',
|
|
2696
|
+
unselectedBg: 'transparent',
|
|
2697
|
+
selectedBg: 'rgba(61, 147, 222, 0.1)',
|
|
2698
|
+
hoverBg: 'rgba(0, 0, 0, 0.02)',
|
|
2699
|
+
hoverBorder: '#D0D0D0',
|
|
2700
|
+
},
|
|
2612
2701
|
};
|
|
2613
2702
|
const StyledOptionButton = styled(ButtonBase, {
|
|
2614
2703
|
shouldForwardProp: (prop) => prop !== 'colorVariant',
|
|
@@ -3489,6 +3578,15 @@ const CheckoutHeader = ({ progress, product, sectionTitle, sectionDescription, s
|
|
|
3489
3578
|
return (jsxs(HeaderContainer, Object.assign({ sticky: sticky, sx: sx }, { children: [jsx(CheckoutProgress, Object.assign({}, progress, { progressBarTheme: progressBarTheme })), product && (jsx(Box, Object.assign({ sx: { padding: '0 16px 24px' } }, { children: jsx(ProductCard, Object.assign({}, product)) }))), jsxs(SectionHeader, { children: [jsx(SectionTitle$2, { children: sectionTitle }), jsx(SectionDescription, { children: sectionDescription })] })] })));
|
|
3490
3579
|
};
|
|
3491
3580
|
|
|
3581
|
+
/**
|
|
3582
|
+
* Checkout Form Button - styled components
|
|
3583
|
+
* Aligns with Figma button design system (node 133-11111)
|
|
3584
|
+
*
|
|
3585
|
+
* Filled button tokens:
|
|
3586
|
+
* - Default: #0090da bg, #ffffff text
|
|
3587
|
+
* - Hover: #007AC1
|
|
3588
|
+
* - Disabled: #f2f2f2 bg, #75787b text, 1px solid #a7a8aa
|
|
3589
|
+
*/
|
|
3492
3590
|
const ButtonContainer = styled(Box)(({ isFixed, desktopRightAligned }) => ({
|
|
3493
3591
|
position: isFixed ? 'fixed' : 'relative',
|
|
3494
3592
|
bottom: 0,
|
|
@@ -3512,23 +3610,31 @@ const ButtonContainer = styled(Box)(({ isFixed, desktopRightAligned }) => ({
|
|
|
3512
3610
|
}));
|
|
3513
3611
|
const StyledButton = styled('button')(({ isDisabled, desktopWidth }) => ({
|
|
3514
3612
|
width: '100%',
|
|
3515
|
-
|
|
3516
|
-
|
|
3613
|
+
minHeight: '48px',
|
|
3614
|
+
padding: '14px 32px',
|
|
3615
|
+
borderRadius: '100px',
|
|
3517
3616
|
border: 'none',
|
|
3518
|
-
backgroundColor: isDisabled
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
fontSize: '14px',
|
|
3617
|
+
backgroundColor: isDisabled ? '#f2f2f2' : '#0090da',
|
|
3618
|
+
color: isDisabled ? '#75787b' : '#ffffff',
|
|
3619
|
+
fontFamily: '"MetLifeCircular", "Roboto", "Helvetica", "Arial", sans-serif',
|
|
3620
|
+
fontSize: '16px',
|
|
3523
3621
|
fontWeight: 500,
|
|
3524
|
-
lineHeight: '
|
|
3622
|
+
lineHeight: '20px',
|
|
3623
|
+
letterSpacing: 0,
|
|
3624
|
+
textTransform: 'none',
|
|
3525
3625
|
wordSpacing: '0px',
|
|
3526
3626
|
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
|
3527
|
-
transition: 'all 0.2s ease',
|
|
3627
|
+
transition: 'all 0.2s ease-in-out',
|
|
3628
|
+
boxSizing: 'border-box',
|
|
3528
3629
|
'&:hover': {
|
|
3529
|
-
backgroundColor: isDisabled
|
|
3530
|
-
|
|
3531
|
-
|
|
3630
|
+
backgroundColor: isDisabled ? '#f2f2f2' : 'rgba(0, 144, 218, 0.7)',
|
|
3631
|
+
},
|
|
3632
|
+
'&:focus': {
|
|
3633
|
+
outline: isDisabled ? 'none' : '2px solid #0090da',
|
|
3634
|
+
outlineOffset: '2px',
|
|
3635
|
+
},
|
|
3636
|
+
'&:active': {
|
|
3637
|
+
backgroundColor: isDisabled ? '#f2f2f2' : 'rgba(0, 144, 218, 0.7)',
|
|
3532
3638
|
},
|
|
3533
3639
|
// Desktop styles for fixed width button
|
|
3534
3640
|
'@media (min-width: 900px)': desktopWidth
|
|
@@ -3667,7 +3773,7 @@ const PersonalInformationForm = ({ renderField, fields, consents, onSubmit, form
|
|
|
3667
3773
|
color: '#5F5E62',
|
|
3668
3774
|
fontSize: '12px',
|
|
3669
3775
|
wordSpacing: '-5px',
|
|
3670
|
-
} }, { children: fields.full_name.helperText })))] }), renderField(fields.nric), renderField(fields.date_of_birth), renderField(fields.gender), renderField(fields.salutation), renderField(fields.nationality), fields.place_of_birth && renderField(fields.place_of_birth), fields.marital_status && renderField(fields.marital_status), fields.race && renderField(fields.race), fields.religion && renderField(fields.religion),
|
|
3776
|
+
} }, { children: fields.full_name.helperText })))] }), renderField(fields.nric), renderField(fields.date_of_birth), renderField(fields.gender), renderField(fields.salutation), renderField(fields.nationality), fields.place_of_birth && renderField(fields.place_of_birth), fields.marital_status && renderField(fields.marital_status), fields.race && renderField(fields.race), fields.religion && renderField(fields.religion), renderField(fields.occupation), renderField(fields.industry), renderField(fields.crediting_bank_name), renderField(fields.crediting_bank_account_number), fields.annual_income && renderField(fields.annual_income), desktopGridLayout ? (jsx(FullWidthField$1, { children: jsxs(CheckboxContainer$1, { children: [jsx(FormControlLabel, { control: jsx(Checkbox, { checked: consents.bank_account_confirmation.checked, onChange: (e) => consents.bank_account_confirmation.onChange(e.target.checked), name: "bank_account_confirmation" }), label: jsx(CheckboxLabel$1, { children: consents.bank_account_confirmation.label ||
|
|
3671
3777
|
defaultBankConfirmationLabel }) }), consents.bank_account_confirmation.error && (jsx(Typography, Object.assign({ sx: {
|
|
3672
3778
|
color: 'error.main',
|
|
3673
3779
|
fontSize: '12px',
|