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/cjs/index.js
CHANGED
|
@@ -6,7 +6,6 @@ var React = require('react');
|
|
|
6
6
|
var material = require('@mui/material');
|
|
7
7
|
var ArrowDropDownIcon = require('@mui/icons-material/ArrowDropDown');
|
|
8
8
|
var CloseIcon = require('@mui/icons-material/Close');
|
|
9
|
-
var LanguageIcon = require('@mui/icons-material/Language');
|
|
10
9
|
var AppBar = require('@mui/material/AppBar');
|
|
11
10
|
var styles = require('@mui/material/styles');
|
|
12
11
|
var MenuIcon = require('@mui/icons-material/Menu');
|
|
@@ -1091,10 +1090,10 @@ const PurchaseButton = styles.styled(material.Button)(() => ({
|
|
|
1091
1090
|
borderRadius: '24px',
|
|
1092
1091
|
whiteSpace: 'nowrap',
|
|
1093
1092
|
'&:hover': {
|
|
1094
|
-
backgroundColor: '
|
|
1093
|
+
backgroundColor: 'rgba(0, 144, 218, 0.7)',
|
|
1095
1094
|
},
|
|
1096
1095
|
'&:active': {
|
|
1097
|
-
backgroundColor: '#
|
|
1096
|
+
backgroundColor: '#0090DA',
|
|
1098
1097
|
},
|
|
1099
1098
|
}));
|
|
1100
1099
|
/**
|
|
@@ -1191,10 +1190,13 @@ languages = [], currentLocale, onLanguageChange, }) {
|
|
|
1191
1190
|
onLanguageChange === null || onLanguageChange === void 0 ? void 0 : onLanguageChange(locale, value);
|
|
1192
1191
|
handleLangMenuClose();
|
|
1193
1192
|
};
|
|
1194
|
-
// Derive
|
|
1195
|
-
const
|
|
1193
|
+
// Derive short code for language switch trigger (per Figma: "EN" with chevron)
|
|
1194
|
+
const currentLangShortCode = React__namespace.useMemo(() => {
|
|
1195
|
+
var _a;
|
|
1196
1196
|
const match = languages.find((l) => l.locale === currentLocale);
|
|
1197
|
-
|
|
1197
|
+
if (match === null || match === void 0 ? void 0 : match.shortCode)
|
|
1198
|
+
return match.shortCode;
|
|
1199
|
+
return ((_a = match === null || match === void 0 ? void 0 : match.locale) === null || _a === void 0 ? void 0 : _a.toUpperCase().substring(0, 2)) || 'EN';
|
|
1198
1200
|
}, [languages, currentLocale]);
|
|
1199
1201
|
// Determine which button props to use (support legacy props)
|
|
1200
1202
|
const shouldShowCtaButton = (_a = showCtaButton !== null && showCtaButton !== void 0 ? showCtaButton : showLoginButton) !== null && _a !== void 0 ? _a : true;
|
|
@@ -1262,7 +1264,7 @@ languages = [], currentLocale, onLanguageChange, }) {
|
|
|
1262
1264
|
horizontal: 'left',
|
|
1263
1265
|
}, MenuListProps: {
|
|
1264
1266
|
'aria-labelledby': `menu-button-${item.key}`,
|
|
1265
|
-
} }, { children: item.subItems.map((subItem) => (jsxRuntime.jsxs(StyledMenuItem$1, Object.assign({ onClick: () => handleSubItemClick(item, subItem.key), "data-testid": `submenu-item-${subItem.key}` }, { children: [subItem.icon && (jsxRuntime.jsx(MenuItemIcon, { src: subItem.icon, alt: subItem.label })), formatMessage({ id: subItem.label })] }), subItem.key))) })))] }, item.key))), languages.length > 0 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(MenuItemButton, Object.assign({ onClick: handleLangMenuOpen, "aria-haspopup": "true", "aria-expanded": isLangMenuOpen, "data-testid": "language-switcher" }, { children: [jsxRuntime.jsx(
|
|
1267
|
+
} }, { children: item.subItems.map((subItem) => (jsxRuntime.jsxs(StyledMenuItem$1, Object.assign({ onClick: () => handleSubItemClick(item, subItem.key), "data-testid": `submenu-item-${subItem.key}` }, { children: [subItem.icon && (jsxRuntime.jsx(MenuItemIcon, { src: subItem.icon, alt: subItem.label })), formatMessage({ id: subItem.label })] }), subItem.key))) })))] }, item.key))), languages.length > 0 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(MenuItemButton, Object.assign({ onClick: handleLangMenuOpen, "aria-haspopup": "true", "aria-expanded": isLangMenuOpen, "data-testid": "language-switcher" }, { children: [jsxRuntime.jsx(MenuItemText, { children: currentLangShortCode }), jsxRuntime.jsx(DropdownIcon, { sx: {
|
|
1266
1268
|
transform: isLangMenuOpen
|
|
1267
1269
|
? 'rotate(180deg)'
|
|
1268
1270
|
: 'rotate(0deg)',
|
|
@@ -2345,12 +2347,25 @@ const DialogContent = material.styled(material.Box)(() => ({
|
|
|
2345
2347
|
overflowY: 'auto',
|
|
2346
2348
|
padding: '24px',
|
|
2347
2349
|
}));
|
|
2348
|
-
|
|
2350
|
+
/** Product grid for dialog - matches featured-form-section ProductGrid from life-landing-page */
|
|
2351
|
+
const DialogProductsGrid = material.styled(material.Box, {
|
|
2352
|
+
shouldForwardProp: (prop) => prop !== 'productCount',
|
|
2353
|
+
})(({ theme, productCount = 1 }) => ({
|
|
2349
2354
|
display: 'grid',
|
|
2350
2355
|
gridTemplateColumns: 'repeat(2, 1fr)',
|
|
2351
|
-
gap: '
|
|
2356
|
+
gap: '12px',
|
|
2357
|
+
width: '100%',
|
|
2358
|
+
maxWidth: '744px',
|
|
2359
|
+
[theme.breakpoints.up('md')]: Object.assign(Object.assign({}, (productCount >= 2
|
|
2360
|
+
? {
|
|
2361
|
+
gridTemplateColumns: `repeat(${productCount}, 158px)`,
|
|
2362
|
+
justifyContent: 'left',
|
|
2363
|
+
}
|
|
2364
|
+
: {
|
|
2365
|
+
gridTemplateColumns: '1fr',
|
|
2366
|
+
})), { gap: '12px' }),
|
|
2352
2367
|
}));
|
|
2353
|
-
|
|
2368
|
+
material.styled(material.Box)(() => ({
|
|
2354
2369
|
border: '1px solid #E0E0E0',
|
|
2355
2370
|
borderRadius: '0px',
|
|
2356
2371
|
padding: '16px',
|
|
@@ -2359,13 +2374,13 @@ const DialogProductCard = material.styled(material.Box)(() => ({
|
|
|
2359
2374
|
alignItems: 'center',
|
|
2360
2375
|
gap: '16px',
|
|
2361
2376
|
}));
|
|
2362
|
-
|
|
2377
|
+
material.styled(material.Box)(() => ({
|
|
2363
2378
|
height: '32px',
|
|
2364
2379
|
display: 'flex',
|
|
2365
2380
|
alignItems: 'center',
|
|
2366
2381
|
justifyContent: 'center',
|
|
2367
2382
|
}));
|
|
2368
|
-
|
|
2383
|
+
material.styled(material.Typography)(() => ({
|
|
2369
2384
|
fontFamily: 'Montserrat, sans-serif',
|
|
2370
2385
|
fontSize: '16px',
|
|
2371
2386
|
fontWeight: 600,
|
|
@@ -2374,7 +2389,7 @@ const DialogProductName = material.styled(material.Typography)(() => ({
|
|
|
2374
2389
|
textAlign: 'center',
|
|
2375
2390
|
wordSpacing: '0px',
|
|
2376
2391
|
}));
|
|
2377
|
-
|
|
2392
|
+
material.styled(material.Typography)(() => ({
|
|
2378
2393
|
fontFamily: 'Montserrat, sans-serif',
|
|
2379
2394
|
fontSize: '14px',
|
|
2380
2395
|
fontWeight: 400,
|
|
@@ -2427,45 +2442,120 @@ const ProductsContainer = material.styled(material.Box)({
|
|
|
2427
2442
|
padding: '16px',
|
|
2428
2443
|
backgroundColor: '#ffffff',
|
|
2429
2444
|
});
|
|
2430
|
-
|
|
2445
|
+
/** Product grid - matches featured-form-section ProductGrid from life-landing-page */
|
|
2446
|
+
const ProductsGrid = material.styled(material.Box, {
|
|
2447
|
+
shouldForwardProp: (prop) => prop !== 'productCount',
|
|
2448
|
+
})(({ theme, productCount = 1 }) => ({
|
|
2431
2449
|
display: 'grid',
|
|
2432
2450
|
gridTemplateColumns: 'repeat(2, 1fr)',
|
|
2433
2451
|
gap: '12px',
|
|
2434
|
-
|
|
2435
|
-
|
|
2452
|
+
width: '100%',
|
|
2453
|
+
maxWidth: '744px',
|
|
2454
|
+
[theme.breakpoints.up('md')]: Object.assign(Object.assign({}, (productCount >= 2
|
|
2455
|
+
? {
|
|
2456
|
+
gridTemplateColumns: `repeat(${productCount}, 158px)`,
|
|
2457
|
+
justifyContent: 'left',
|
|
2458
|
+
}
|
|
2459
|
+
: {
|
|
2460
|
+
gridTemplateColumns: '1fr',
|
|
2461
|
+
})), { gap: '12px' }),
|
|
2462
|
+
}));
|
|
2463
|
+
/** Category label above the product card (e.g., "Medical", "Critical Illness") */
|
|
2464
|
+
const ProductCategoryLabel = material.styled(material.Typography)(() => ({
|
|
2465
|
+
fontFamily: '"MetLifeCircular", "Montserrat", sans-serif',
|
|
2466
|
+
fontWeight: 500,
|
|
2467
|
+
fontSize: '12px',
|
|
2468
|
+
lineHeight: '16px',
|
|
2469
|
+
color: '#5f5e62',
|
|
2470
|
+
letterSpacing: '0px',
|
|
2471
|
+
}));
|
|
2472
|
+
/** Product card wrapper: includes category label + card */
|
|
2473
|
+
const ProductCardWrapper = material.styled(material.Box)(() => ({
|
|
2436
2474
|
display: 'flex',
|
|
2437
2475
|
flexDirection: 'column',
|
|
2438
|
-
gap: '
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2476
|
+
gap: '4px',
|
|
2477
|
+
alignItems: 'flex-start',
|
|
2478
|
+
}));
|
|
2479
|
+
/** Product card - square, clickable, matches featured-form-section design */
|
|
2480
|
+
const ProductCard$1 = material.styled(material.Box)(() => ({
|
|
2481
|
+
position: 'relative',
|
|
2482
|
+
width: '100%',
|
|
2483
|
+
aspectRatio: '1 / 1',
|
|
2484
|
+
border: '1px solid #0090da',
|
|
2485
|
+
borderRadius: '0px',
|
|
2446
2486
|
display: 'flex',
|
|
2447
2487
|
flexDirection: 'column',
|
|
2448
|
-
|
|
2488
|
+
justifyContent: 'flex-end',
|
|
2489
|
+
cursor: 'pointer',
|
|
2490
|
+
overflow: 'clip',
|
|
2491
|
+
transition: 'border 0.2s ease, box-shadow 0.2s ease',
|
|
2492
|
+
'&:hover': {
|
|
2493
|
+
borderWidth: '2px',
|
|
2494
|
+
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.15)',
|
|
2495
|
+
},
|
|
2496
|
+
'&:focus': {
|
|
2497
|
+
outline: '2px solid #ffffff',
|
|
2498
|
+
outlineOffset: '2px',
|
|
2499
|
+
},
|
|
2500
|
+
'@media (min-width: 900px)': {
|
|
2501
|
+
width: '158px',
|
|
2502
|
+
height: '158px',
|
|
2503
|
+
},
|
|
2504
|
+
}));
|
|
2505
|
+
/** Background image that fills the product card */
|
|
2506
|
+
const ProductCardImage = material.styled('img')(() => ({
|
|
2507
|
+
position: 'absolute',
|
|
2508
|
+
inset: 0,
|
|
2509
|
+
width: '100%',
|
|
2510
|
+
height: '100%',
|
|
2511
|
+
objectFit: 'cover',
|
|
2512
|
+
pointerEvents: 'none',
|
|
2513
|
+
}));
|
|
2514
|
+
/** Placeholder gradient when no card image is provided */
|
|
2515
|
+
const ProductCardPlaceholder = material.styled(material.Box)(() => ({
|
|
2516
|
+
position: 'absolute',
|
|
2517
|
+
inset: 0,
|
|
2518
|
+
background: 'linear-gradient(135deg, #e8f4fd 0%, #b8dff5 100%)',
|
|
2519
|
+
pointerEvents: 'none',
|
|
2520
|
+
}));
|
|
2521
|
+
/** White bottom bar with logo + product name */
|
|
2522
|
+
const ProductCardBottomBar = material.styled(material.Box)(() => ({
|
|
2523
|
+
position: 'relative',
|
|
2524
|
+
display: 'flex',
|
|
2449
2525
|
alignItems: 'center',
|
|
2450
2526
|
justifyContent: 'center',
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2527
|
+
gap: '4px',
|
|
2528
|
+
height: '32px',
|
|
2529
|
+
width: '100%',
|
|
2530
|
+
flexShrink: 0,
|
|
2531
|
+
backgroundColor: '#ffffff',
|
|
2532
|
+
}));
|
|
2533
|
+
/** Icon inside the bottom bar */
|
|
2534
|
+
const ProductIcon = material.styled(material.Box)(() => ({
|
|
2454
2535
|
display: 'flex',
|
|
2455
2536
|
alignItems: 'center',
|
|
2456
2537
|
justifyContent: 'center',
|
|
2457
|
-
|
|
2458
|
-
|
|
2538
|
+
flexShrink: 0,
|
|
2539
|
+
height: '11px',
|
|
2540
|
+
width: '40.7px',
|
|
2541
|
+
'& img': {
|
|
2542
|
+
width: '100%',
|
|
2543
|
+
height: '100%',
|
|
2544
|
+
objectFit: 'contain',
|
|
2545
|
+
},
|
|
2546
|
+
}));
|
|
2459
2547
|
const ProductName$1 = material.styled(material.Typography)({
|
|
2460
|
-
fontFamily: 'Montserrat, sans-serif',
|
|
2461
|
-
fontSize: '14px',
|
|
2548
|
+
fontFamily: '"MetLifeCircular", "Montserrat", sans-serif',
|
|
2462
2549
|
fontWeight: 700,
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
color: '#
|
|
2550
|
+
fontSize: '14px',
|
|
2551
|
+
lineHeight: '20px',
|
|
2552
|
+
color: '#75787b',
|
|
2466
2553
|
textAlign: 'center',
|
|
2554
|
+
letterSpacing: '0px',
|
|
2555
|
+
whiteSpace: 'nowrap',
|
|
2467
2556
|
});
|
|
2468
|
-
|
|
2557
|
+
/** @deprecated Use ProductCategoryLabel - kept for Dialog variant */
|
|
2558
|
+
material.styled(material.Typography)({
|
|
2469
2559
|
fontFamily: 'Montserrat, sans-serif',
|
|
2470
2560
|
fontSize: '12px',
|
|
2471
2561
|
fontWeight: 400,
|
|
@@ -2474,59 +2564,50 @@ const ProductType = material.styled(material.Typography)({
|
|
|
2474
2564
|
color: '#13131b',
|
|
2475
2565
|
textAlign: 'center',
|
|
2476
2566
|
});
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2567
|
+
/** @deprecated Use new ProductCard - kept for Dialog variant */
|
|
2568
|
+
material.styled(material.Box)({
|
|
2569
|
+
display: 'flex',
|
|
2570
|
+
flexDirection: 'column',
|
|
2571
|
+
gap: '6px',
|
|
2572
|
+
alignItems: 'center',
|
|
2573
|
+
justifyContent: 'center',
|
|
2574
|
+
flex: 1,
|
|
2575
|
+
});
|
|
2576
|
+
/** @deprecated Use ProductIcon - kept for Dialog variant */
|
|
2577
|
+
material.styled(material.Box)({
|
|
2578
|
+
display: 'flex',
|
|
2579
|
+
alignItems: 'center',
|
|
2580
|
+
justifyContent: 'center',
|
|
2581
|
+
padding: '4px',
|
|
2487
2582
|
});
|
|
2488
2583
|
|
|
2489
2584
|
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', }) {
|
|
2490
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2491
|
-
const tenantTheme = useTenantTheme();
|
|
2492
|
-
// Get primary color from tenant theme, fallback to default
|
|
2493
|
-
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';
|
|
2494
|
-
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';
|
|
2495
|
-
const primaryDarker = '#006699'; // Active state
|
|
2496
2585
|
// Desktop Dialog variant
|
|
2497
2586
|
if (variant === 'dialog') {
|
|
2498
2587
|
return (jsxRuntime.jsxs(StyledDialog, Object.assign({ open: open, onClose: onClose, maxWidth: "md", fullWidth: true }, { children: [jsxRuntime.jsxs(DialogHeader, { children: [jsxRuntime.jsx(material.IconButton, Object.assign({ onClick: onClose, sx: {
|
|
2499
2588
|
position: 'absolute',
|
|
2500
2589
|
right: 16,
|
|
2501
2590
|
top: 16,
|
|
2502
|
-
} }, { children: jsxRuntime.jsx(CloseIcon, {}) })), jsxRuntime.jsx(DialogHeaderTitle, { children: title }), jsxRuntime.jsx(DialogHeaderSubtitle, { children: subtitle })] }), jsxRuntime.jsx(DialogContent, { children: jsxRuntime.jsx(DialogProductsGrid, {
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
'&:active': {
|
|
2512
|
-
backgroundColor: primaryDarker,
|
|
2513
|
-
},
|
|
2514
|
-
} }, { children: viewPlansButtonText }))] }, product.id))) }) })] })));
|
|
2591
|
+
} }, { children: jsxRuntime.jsx(CloseIcon, {}) })), jsxRuntime.jsx(DialogHeaderTitle, { children: title }), jsxRuntime.jsx(DialogHeaderSubtitle, { children: subtitle })] }), jsxRuntime.jsx(DialogContent, { children: jsxRuntime.jsx(DialogProductsGrid, Object.assign({ productCount: products.length }, { children: products.map((product) => {
|
|
2592
|
+
var _a, _b;
|
|
2593
|
+
return (jsxRuntime.jsxs(ProductCardWrapper, { children: [jsxRuntime.jsx(ProductCategoryLabel, { children: (_a = product.subtitle) !== null && _a !== void 0 ? _a : product.type }), jsxRuntime.jsxs(ProductCard$1, Object.assign({ onClick: () => onProductSelect(product.id), role: "button", tabIndex: 0, onKeyDown: (e) => {
|
|
2594
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
2595
|
+
e.preventDefault();
|
|
2596
|
+
onProductSelect(product.id);
|
|
2597
|
+
}
|
|
2598
|
+
} }, { children: [product.cardImage ? (jsxRuntime.jsx(ProductCardImage, { src: product.cardImage, alt: product.name })) : (jsxRuntime.jsx(ProductCardPlaceholder, {})), jsxRuntime.jsxs(ProductCardBottomBar, { children: [jsxRuntime.jsx(ProductIcon, { children: jsxRuntime.jsx("img", { src: (_b = product.icon) !== null && _b !== void 0 ? _b : product.logo, alt: "" }) }), jsxRuntime.jsx(ProductName$1, { children: product.name })] })] }))] }, product.id));
|
|
2599
|
+
}) })) })] })));
|
|
2515
2600
|
}
|
|
2516
2601
|
// Mobile Drawer variant (default)
|
|
2517
|
-
return (jsxRuntime.jsx(StyledDrawer, Object.assign({ anchor: "bottom", open: open, onClose: onClose }, { children: jsxRuntime.jsxs(DrawerContent, { children: [jsxRuntime.jsx(DrawerHeader, { children: jsxRuntime.jsx(CloseButtonContainer, { children: jsxRuntime.jsx(material.IconButton, Object.assign({ onClick: onClose, sx: { padding: 0 } }, { children: jsxRuntime.jsx(CloseIcon, { sx: { fontSize: 24, color: '#13131b' } }) })) }) }), jsxRuntime.jsxs(Header, { children: [jsxRuntime.jsx(HeaderTitle, { children: title }), jsxRuntime.jsx(HeaderSubtitle, { children: subtitle })] }), jsxRuntime.jsx(ProductsContainer, { children: jsxRuntime.jsx(ProductsGrid, {
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
'&:active': {
|
|
2527
|
-
backgroundColor: primaryDarker,
|
|
2528
|
-
},
|
|
2529
|
-
} }, { children: viewPlansButtonText }))] }, product.id))) }) })] }) })));
|
|
2602
|
+
return (jsxRuntime.jsx(StyledDrawer, Object.assign({ anchor: "bottom", open: open, onClose: onClose }, { children: jsxRuntime.jsxs(DrawerContent, { children: [jsxRuntime.jsx(DrawerHeader, { children: jsxRuntime.jsx(CloseButtonContainer, { children: jsxRuntime.jsx(material.IconButton, Object.assign({ onClick: onClose, sx: { padding: 0 } }, { children: jsxRuntime.jsx(CloseIcon, { sx: { fontSize: 24, color: '#13131b' } }) })) }) }), jsxRuntime.jsxs(Header, { children: [jsxRuntime.jsx(HeaderTitle, { children: title }), jsxRuntime.jsx(HeaderSubtitle, { children: subtitle })] }), jsxRuntime.jsx(ProductsContainer, { children: jsxRuntime.jsx(ProductsGrid, Object.assign({ productCount: products.length }, { children: products.map((product) => {
|
|
2603
|
+
var _a, _b;
|
|
2604
|
+
return (jsxRuntime.jsxs(ProductCardWrapper, { children: [jsxRuntime.jsx(ProductCategoryLabel, { children: (_a = product.subtitle) !== null && _a !== void 0 ? _a : product.type }), jsxRuntime.jsxs(ProductCard$1, Object.assign({ onClick: () => onProductSelect(product.id), role: "button", tabIndex: 0, onKeyDown: (e) => {
|
|
2605
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
2606
|
+
e.preventDefault();
|
|
2607
|
+
onProductSelect(product.id);
|
|
2608
|
+
}
|
|
2609
|
+
} }, { children: [product.cardImage ? (jsxRuntime.jsx(ProductCardImage, { src: product.cardImage, alt: product.name })) : (jsxRuntime.jsx(ProductCardPlaceholder, {})), jsxRuntime.jsxs(ProductCardBottomBar, { children: [jsxRuntime.jsx(ProductIcon, { children: jsxRuntime.jsx("img", { src: (_b = product.icon) !== null && _b !== void 0 ? _b : product.logo, alt: "" }) }), jsxRuntime.jsx(ProductName$1, { children: product.name })] })] }))] }, product.id));
|
|
2610
|
+
}) })) })] }) })));
|
|
2530
2611
|
}
|
|
2531
2612
|
|
|
2532
2613
|
const QuestionContainer$1 = styles.styled(material.Box)(({ theme }) => ({
|
|
@@ -2629,6 +2710,14 @@ const variantColors = {
|
|
|
2629
2710
|
hoverBg: 'rgba(0, 0, 0, 0.02)',
|
|
2630
2711
|
hoverBorder: '#5f5e62',
|
|
2631
2712
|
},
|
|
2713
|
+
formLightBorder: {
|
|
2714
|
+
unselectedBorder: '#E0E0E0',
|
|
2715
|
+
unselectedText: '#5f5e62',
|
|
2716
|
+
unselectedBg: 'transparent',
|
|
2717
|
+
selectedBg: 'rgba(61, 147, 222, 0.1)',
|
|
2718
|
+
hoverBg: 'rgba(0, 0, 0, 0.02)',
|
|
2719
|
+
hoverBorder: '#D0D0D0',
|
|
2720
|
+
},
|
|
2632
2721
|
};
|
|
2633
2722
|
const StyledOptionButton = styles.styled(material.ButtonBase, {
|
|
2634
2723
|
shouldForwardProp: (prop) => prop !== 'colorVariant',
|
|
@@ -3509,6 +3598,15 @@ const CheckoutHeader = ({ progress, product, sectionTitle, sectionDescription, s
|
|
|
3509
3598
|
return (jsxRuntime.jsxs(HeaderContainer, Object.assign({ sticky: sticky, sx: sx }, { children: [jsxRuntime.jsx(CheckoutProgress, Object.assign({}, progress, { progressBarTheme: progressBarTheme })), product && (jsxRuntime.jsx(material.Box, Object.assign({ sx: { padding: '0 16px 24px' } }, { children: jsxRuntime.jsx(ProductCard, Object.assign({}, product)) }))), jsxRuntime.jsxs(SectionHeader, { children: [jsxRuntime.jsx(SectionTitle$2, { children: sectionTitle }), jsxRuntime.jsx(SectionDescription, { children: sectionDescription })] })] })));
|
|
3510
3599
|
};
|
|
3511
3600
|
|
|
3601
|
+
/**
|
|
3602
|
+
* Checkout Form Button - styled components
|
|
3603
|
+
* Aligns with Figma button design system (node 133-11111)
|
|
3604
|
+
*
|
|
3605
|
+
* Filled button tokens:
|
|
3606
|
+
* - Default: #0090da bg, #ffffff text
|
|
3607
|
+
* - Hover: #007AC1
|
|
3608
|
+
* - Disabled: #f2f2f2 bg, #75787b text, 1px solid #a7a8aa
|
|
3609
|
+
*/
|
|
3512
3610
|
const ButtonContainer = styles.styled(material.Box)(({ isFixed, desktopRightAligned }) => ({
|
|
3513
3611
|
position: isFixed ? 'fixed' : 'relative',
|
|
3514
3612
|
bottom: 0,
|
|
@@ -3532,23 +3630,31 @@ const ButtonContainer = styles.styled(material.Box)(({ isFixed, desktopRightAlig
|
|
|
3532
3630
|
}));
|
|
3533
3631
|
const StyledButton = styles.styled('button')(({ isDisabled, desktopWidth }) => ({
|
|
3534
3632
|
width: '100%',
|
|
3535
|
-
|
|
3536
|
-
|
|
3633
|
+
minHeight: '48px',
|
|
3634
|
+
padding: '14px 32px',
|
|
3635
|
+
borderRadius: '100px',
|
|
3537
3636
|
border: 'none',
|
|
3538
|
-
backgroundColor: isDisabled
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
fontSize: '14px',
|
|
3637
|
+
backgroundColor: isDisabled ? '#f2f2f2' : '#0090da',
|
|
3638
|
+
color: isDisabled ? '#75787b' : '#ffffff',
|
|
3639
|
+
fontFamily: '"MetLifeCircular", "Roboto", "Helvetica", "Arial", sans-serif',
|
|
3640
|
+
fontSize: '16px',
|
|
3543
3641
|
fontWeight: 500,
|
|
3544
|
-
lineHeight: '
|
|
3642
|
+
lineHeight: '20px',
|
|
3643
|
+
letterSpacing: 0,
|
|
3644
|
+
textTransform: 'none',
|
|
3545
3645
|
wordSpacing: '0px',
|
|
3546
3646
|
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
|
3547
|
-
transition: 'all 0.2s ease',
|
|
3647
|
+
transition: 'all 0.2s ease-in-out',
|
|
3648
|
+
boxSizing: 'border-box',
|
|
3548
3649
|
'&:hover': {
|
|
3549
|
-
backgroundColor: isDisabled
|
|
3550
|
-
|
|
3551
|
-
|
|
3650
|
+
backgroundColor: isDisabled ? '#f2f2f2' : 'rgba(0, 144, 218, 0.7)',
|
|
3651
|
+
},
|
|
3652
|
+
'&:focus': {
|
|
3653
|
+
outline: isDisabled ? 'none' : '2px solid #0090da',
|
|
3654
|
+
outlineOffset: '2px',
|
|
3655
|
+
},
|
|
3656
|
+
'&:active': {
|
|
3657
|
+
backgroundColor: isDisabled ? '#f2f2f2' : 'rgba(0, 144, 218, 0.7)',
|
|
3552
3658
|
},
|
|
3553
3659
|
// Desktop styles for fixed width button
|
|
3554
3660
|
'@media (min-width: 900px)': desktopWidth
|
|
@@ -3687,7 +3793,7 @@ const PersonalInformationForm = ({ renderField, fields, consents, onSubmit, form
|
|
|
3687
3793
|
color: '#5F5E62',
|
|
3688
3794
|
fontSize: '12px',
|
|
3689
3795
|
wordSpacing: '-5px',
|
|
3690
|
-
} }, { 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),
|
|
3796
|
+
} }, { 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 ? (jsxRuntime.jsx(FullWidthField$1, { children: jsxRuntime.jsxs(CheckboxContainer$1, { children: [jsxRuntime.jsx(material.FormControlLabel, { control: jsxRuntime.jsx(material.Checkbox, { checked: consents.bank_account_confirmation.checked, onChange: (e) => consents.bank_account_confirmation.onChange(e.target.checked), name: "bank_account_confirmation" }), label: jsxRuntime.jsx(CheckboxLabel$1, { children: consents.bank_account_confirmation.label ||
|
|
3691
3797
|
defaultBankConfirmationLabel }) }), consents.bank_account_confirmation.error && (jsxRuntime.jsx(material.Typography, Object.assign({ sx: {
|
|
3692
3798
|
color: 'error.main',
|
|
3693
3799
|
fontSize: '12px',
|