igloo-d2c-components 1.0.34 → 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 +322 -139
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +322 -139
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/CheckoutFormButton/styled.d.ts +9 -0
- package/dist/types/components/ChildInformationForm/ChildInformationForm.d.ts +26 -0
- package/dist/types/components/ContactDetailsForm/ContactDetailsForm.d.ts +29 -0
- package/dist/types/components/DesktopHeaderMenuBar/DesktopHeaderMenuBar.d.ts +1 -1
- package/dist/types/components/DesktopHeaderMenuBar/index.d.ts +1 -1
- package/dist/types/components/DesktopHeaderMenuBar/types.d.ts +22 -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/PersonalInformationForm/PersonalInformationForm.d.ts +5 -0
- package/dist/types/components/ProductSelectionDrawer/ProductSelectionDrawer.d.ts +13 -0
- package/dist/types/components/ProductSelectionDrawer/styled.d.ts +35 -6
- package/dist/types/components/RecommendationsDrawer/styled.d.ts +3 -0
- package/dist/types/storybook-components/BillingToggle.stories.d.ts +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1090,10 +1090,10 @@ const PurchaseButton = styles.styled(material.Button)(() => ({
|
|
|
1090
1090
|
borderRadius: '24px',
|
|
1091
1091
|
whiteSpace: 'nowrap',
|
|
1092
1092
|
'&:hover': {
|
|
1093
|
-
backgroundColor: '
|
|
1093
|
+
backgroundColor: 'rgba(0, 144, 218, 0.7)',
|
|
1094
1094
|
},
|
|
1095
1095
|
'&:active': {
|
|
1096
|
-
backgroundColor: '#
|
|
1096
|
+
backgroundColor: '#0090DA',
|
|
1097
1097
|
},
|
|
1098
1098
|
}));
|
|
1099
1099
|
/**
|
|
@@ -1170,11 +1170,34 @@ function DesktopHeaderMenuBar({ logo, logoAlt = 'Logo', menuItems,
|
|
|
1170
1170
|
// Legacy props (deprecated)
|
|
1171
1171
|
showLoginButton, loginButtonText, onLoginClick,
|
|
1172
1172
|
// New CTA props
|
|
1173
|
-
showCtaButton = true, ctaButtonText = 'Purchase Now', onCtaClick, ctaScrollTargetId, onScrollToSection, onLogoClick, formatMessage = (descriptor) => descriptor.id, className,
|
|
1173
|
+
showCtaButton = true, ctaButtonText = 'Purchase Now', onCtaClick, ctaScrollTargetId, onScrollToSection, onLogoClick, formatMessage = (descriptor) => descriptor.id, className,
|
|
1174
|
+
// Language switcher props
|
|
1175
|
+
languages = [], currentLocale, onLanguageChange, }) {
|
|
1174
1176
|
var _a;
|
|
1175
1177
|
// Track which dropdown is currently open (for backward compatibility)
|
|
1176
1178
|
const [openMenuKey, setOpenMenuKey] = React__namespace.useState(null);
|
|
1177
1179
|
const [anchorEl, setAnchorEl] = React__namespace.useState(null);
|
|
1180
|
+
// Language menu state
|
|
1181
|
+
const [langAnchorEl, setLangAnchorEl] = React__namespace.useState(null);
|
|
1182
|
+
const isLangMenuOpen = Boolean(langAnchorEl);
|
|
1183
|
+
const handleLangMenuOpen = (event) => {
|
|
1184
|
+
setLangAnchorEl(event.currentTarget);
|
|
1185
|
+
};
|
|
1186
|
+
const handleLangMenuClose = () => {
|
|
1187
|
+
setLangAnchorEl(null);
|
|
1188
|
+
};
|
|
1189
|
+
const handleLangSelect = (locale, value) => {
|
|
1190
|
+
onLanguageChange === null || onLanguageChange === void 0 ? void 0 : onLanguageChange(locale, value);
|
|
1191
|
+
handleLangMenuClose();
|
|
1192
|
+
};
|
|
1193
|
+
// Derive short code for language switch trigger (per Figma: "EN" with chevron)
|
|
1194
|
+
const currentLangShortCode = React__namespace.useMemo(() => {
|
|
1195
|
+
var _a;
|
|
1196
|
+
const match = languages.find((l) => l.locale === currentLocale);
|
|
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';
|
|
1200
|
+
}, [languages, currentLocale]);
|
|
1178
1201
|
// Determine which button props to use (support legacy props)
|
|
1179
1202
|
const shouldShowCtaButton = (_a = showCtaButton !== null && showCtaButton !== void 0 ? showCtaButton : showLoginButton) !== null && _a !== void 0 ? _a : true;
|
|
1180
1203
|
const ctaText = ctaButtonText || loginButtonText || 'Purchase Now';
|
|
@@ -1241,7 +1264,20 @@ showCtaButton = true, ctaButtonText = 'Purchase Now', onCtaClick, ctaScrollTarge
|
|
|
1241
1264
|
horizontal: 'left',
|
|
1242
1265
|
}, MenuListProps: {
|
|
1243
1266
|
'aria-labelledby': `menu-button-${item.key}`,
|
|
1244
|
-
} }, { 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))),
|
|
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: {
|
|
1268
|
+
transform: isLangMenuOpen
|
|
1269
|
+
? 'rotate(180deg)'
|
|
1270
|
+
: 'rotate(0deg)',
|
|
1271
|
+
transition: 'transform 0.2s',
|
|
1272
|
+
} })] })), jsxRuntime.jsx(StyledMenu$1, Object.assign({ id: "language-menu", anchorEl: langAnchorEl, open: isLangMenuOpen, onClose: handleLangMenuClose, anchorOrigin: {
|
|
1273
|
+
vertical: 'bottom',
|
|
1274
|
+
horizontal: 'left',
|
|
1275
|
+
}, transformOrigin: {
|
|
1276
|
+
vertical: 'top',
|
|
1277
|
+
horizontal: 'left',
|
|
1278
|
+
}, MenuListProps: {
|
|
1279
|
+
'aria-labelledby': 'language-switcher',
|
|
1280
|
+
} }, { children: languages.map((lang) => (jsxRuntime.jsx(StyledMenuItem$1, Object.assign({ onClick: () => handleLangSelect(lang.locale, lang.value), selected: lang.locale === currentLocale, "data-testid": `lang-${lang.locale}` }, { children: lang.label }), lang.value))) }))] })), shouldShowCtaButton && (jsxRuntime.jsx(PurchaseButton, Object.assign({ onClick: handleCtaButtonClick, "data-testid": "header-cta-button" }, { children: formatMessage({ id: ctaText }) })))] })] }) })));
|
|
1245
1281
|
}
|
|
1246
1282
|
|
|
1247
1283
|
const StyledAppBar$1 = styles.styled(AppBar)(({ theme, ispartnershippagemobileview, scrolled }) => {
|
|
@@ -1660,7 +1696,7 @@ function Header$1({ logo, navigationLinks, languages, currentLocale, userToken,
|
|
|
1660
1696
|
// Render new desktop layout when enabled and on actual desktop viewport
|
|
1661
1697
|
// Uses isActuallyDesktop to avoid SSR/prop issues with isMobile detection
|
|
1662
1698
|
if (useNewDesktopLayout && isActuallyDesktop) {
|
|
1663
|
-
return (jsxRuntime.jsx(DesktopHeaderMenuBar, { logo: logo, logoAlt: "Logo", menuItems: convertedDesktopMenuItems, showCtaButton: showCtaButton, ctaButtonText: ctaButtonText, onCtaClick: onCtaClick, ctaScrollTargetId: ctaScrollTargetId, onScrollToSection: onScrollToSection, onLogoClick: onLogoClick, formatMessage: formatMessage }));
|
|
1699
|
+
return (jsxRuntime.jsx(DesktopHeaderMenuBar, { logo: logo, logoAlt: "Logo", menuItems: convertedDesktopMenuItems, showCtaButton: showCtaButton, ctaButtonText: ctaButtonText, onCtaClick: onCtaClick, ctaScrollTargetId: ctaScrollTargetId, onScrollToSection: onScrollToSection, onLogoClick: onLogoClick, formatMessage: formatMessage, languages: languages, currentLocale: currentLocale, onLanguageChange: onLanguageChange }));
|
|
1664
1700
|
}
|
|
1665
1701
|
return (jsxRuntime.jsx(StyledAppBar$1, Object.assign({ ispartnershippagemobileview: isPartnershipPageMobileView, scrolled: scrolled }, { children: jsxRuntime.jsx(ResponsiveB2CLayout, { children: jsxRuntime.jsx(StyledContainer, Object.assign({ ispartnershippagemobileview: isPartnershipPageMobileView, scrolled: scrolled, maxWidth: "xl" }, { children: jsxRuntime.jsxs(material.Toolbar, Object.assign({ disableGutters: true }, { children: [jsxRuntime.jsx("a", Object.assign({ href: host || '#', onClick: (e) => {
|
|
1666
1702
|
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
@@ -2077,7 +2113,7 @@ function Footer({ simplifiedLayout = false, introText, addressText, socialLinks,
|
|
|
2077
2113
|
}), index === navigationLinks.length - 1 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ButtonBottomLink, Object.assign({ onClick: onPrivacyPolicyClick }, { children: jsxRuntime.jsx(material.Typography, Object.assign({ variant: "body1" }, { children: jsxRuntime.jsx(AnchorLink, Object.assign({ href: `${host}/${currentLocale}/terms/privacypolicy`, onClick: (e) => e === null || e === void 0 ? void 0 : e.preventDefault() }, { children: formatMessage({ id: 'Privacy Policy' }) })) })) })), jsxRuntime.jsx(ButtonBottomLink, Object.assign({ onClick: onTermsOfServiceClick }, { children: jsxRuntime.jsx(material.Typography, Object.assign({ variant: "body1" }, { children: jsxRuntime.jsx(AnchorLink, Object.assign({ href: `${host}/${currentLocale}/terms/termsofservice`, onClick: (e) => e === null || e === void 0 ? void 0 : e.preventDefault() }, { children: formatMessage({ id: 'Terms of Service' }) })) })) })), jsxRuntime.jsx(DivSocial, { children: socialLinks.map((social) => (jsxRuntime.jsx(ButtonIcon, Object.assign({ onClick: () => onSocialClick === null || onSocialClick === void 0 ? void 0 : onSocialClick(social.platform, social.url), "aria-label": social.ariaLabel || social.platform }, { children: jsxRuntime.jsx(AnchorLink, Object.assign({ href: social.url, onClick: (e) => e === null || e === void 0 ? void 0 : e.preventDefault() }, { children: jsxRuntime.jsx("img", { src: social.icon, alt: social.platform, height: isMobile ? '24' : '28', width: isMobile ? '24' : '28', loading: "lazy" }) })) }), social.platform))) })] }))] }, index))) }))] })), isMobile && jsxRuntime.jsx(StyledDivider, {}), isMobile && (jsxRuntime.jsx(DivBottom, { children: jsxRuntime.jsxs(DivLinks, { children: [jsxRuntime.jsx("div", Object.assign({ onClick: onPrivacyPolicyClick, style: { cursor: 'pointer' } }, { children: jsxRuntime.jsx(material.Typography, Object.assign({ variant: "body2" }, { children: jsxRuntime.jsx(AnchorLink, Object.assign({ href: `${host}/${currentLocale}/terms/privacypolicy`, onClick: (e) => e === null || e === void 0 ? void 0 : e.preventDefault() }, { children: formatMessage({ id: 'Privacy Policy' }) })) })) })), jsxRuntime.jsx(DivSep, {}), jsxRuntime.jsx("div", Object.assign({ onClick: onTermsOfServiceClick, style: { cursor: 'pointer' } }, { children: jsxRuntime.jsx(material.Typography, Object.assign({ variant: "body2" }, { children: jsxRuntime.jsx(AnchorLink, Object.assign({ href: `${host}/${currentLocale}/terms/termsofservice`, onClick: (e) => e === null || e === void 0 ? void 0 : e.preventDefault() }, { children: formatMessage({ id: 'Terms of Service' }) })) })) }))] }) }))] }) }));
|
|
2078
2114
|
}
|
|
2079
2115
|
|
|
2080
|
-
const StyledDrawer$1 = styles.styled(material.Drawer)(() => ({
|
|
2116
|
+
const StyledDrawer$1 = styles.styled(material.Drawer)(({ theme }) => ({
|
|
2081
2117
|
zIndex: '1300 !important',
|
|
2082
2118
|
'& .MuiDrawer-root': {
|
|
2083
2119
|
zIndex: 1300,
|
|
@@ -2087,17 +2123,26 @@ const StyledDrawer$1 = styles.styled(material.Drawer)(() => ({
|
|
|
2087
2123
|
boxSizing: 'border-box',
|
|
2088
2124
|
overflow: 'hidden',
|
|
2089
2125
|
zIndex: 1300,
|
|
2126
|
+
[theme.breakpoints.up('md')]: {
|
|
2127
|
+
maxWidth: '680px',
|
|
2128
|
+
margin: '0 auto',
|
|
2129
|
+
borderRadius: '16px',
|
|
2130
|
+
},
|
|
2090
2131
|
},
|
|
2091
2132
|
'& .MuiBackdrop-root': {
|
|
2092
2133
|
zIndex: 1299,
|
|
2093
2134
|
},
|
|
2094
2135
|
}));
|
|
2095
|
-
const DrawerHeader$1 = styles.styled(material.Box)(() => ({
|
|
2136
|
+
const DrawerHeader$1 = styles.styled(material.Box)(({ theme }) => ({
|
|
2096
2137
|
display: 'flex',
|
|
2097
2138
|
alignItems: 'center',
|
|
2098
|
-
justifyContent: 'flex-
|
|
2099
|
-
padding: '16px',
|
|
2100
|
-
minHeight: '
|
|
2139
|
+
justifyContent: 'flex-start',
|
|
2140
|
+
padding: '16px 24px',
|
|
2141
|
+
minHeight: '64px',
|
|
2142
|
+
[theme.breakpoints.down('md')]: {
|
|
2143
|
+
padding: '16px',
|
|
2144
|
+
minHeight: '56px',
|
|
2145
|
+
},
|
|
2101
2146
|
}));
|
|
2102
2147
|
const DrawerContent$1 = styles.styled(material.Box)(() => ({
|
|
2103
2148
|
flex: 1,
|
|
@@ -2176,6 +2221,15 @@ const SecondaryButton = styles.styled(material.Button)(() => ({
|
|
|
2176
2221
|
lineHeight: '18px',
|
|
2177
2222
|
wordSpacing: '-5px',
|
|
2178
2223
|
}));
|
|
2224
|
+
const BackArrowButton = styles.styled(material.IconButton)(() => ({
|
|
2225
|
+
padding: 0,
|
|
2226
|
+
width: '32px',
|
|
2227
|
+
height: '32px',
|
|
2228
|
+
color: '#13131B',
|
|
2229
|
+
'& .MuiSvgIcon-root': {
|
|
2230
|
+
fontSize: '24px',
|
|
2231
|
+
},
|
|
2232
|
+
}));
|
|
2179
2233
|
|
|
2180
2234
|
/**
|
|
2181
2235
|
* RecommendationsDrawer - Mobile drawer for recommendations and forms
|
|
@@ -2231,7 +2285,7 @@ function RecommendationsDrawer({ open, onClose, children, headerIcon, title, sub
|
|
|
2231
2285
|
},
|
|
2232
2286
|
}, sx: {
|
|
2233
2287
|
zIndex: 1300,
|
|
2234
|
-
} }, { children: jsxRuntime.jsxs(material.Box, Object.assign({ sx: { display: 'flex', flexDirection: 'column', height: '100%' } }, { children: [jsxRuntime.jsx(DrawerHeader$1, { children: jsxRuntime.jsx(
|
|
2288
|
+
} }, { children: jsxRuntime.jsxs(material.Box, Object.assign({ sx: { display: 'flex', flexDirection: 'column', height: '100%' } }, { children: [jsxRuntime.jsx(DrawerHeader$1, { children: jsxRuntime.jsx(BackArrowButton, Object.assign({ onClick: handleBackOrClose, "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: {
|
|
2235
2289
|
backgroundColor: primaryColor,
|
|
2236
2290
|
'&:hover': {
|
|
2237
2291
|
backgroundColor: primaryColor,
|
|
@@ -2293,12 +2347,25 @@ const DialogContent = material.styled(material.Box)(() => ({
|
|
|
2293
2347
|
overflowY: 'auto',
|
|
2294
2348
|
padding: '24px',
|
|
2295
2349
|
}));
|
|
2296
|
-
|
|
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 }) => ({
|
|
2297
2354
|
display: 'grid',
|
|
2298
2355
|
gridTemplateColumns: 'repeat(2, 1fr)',
|
|
2299
|
-
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' }),
|
|
2300
2367
|
}));
|
|
2301
|
-
|
|
2368
|
+
material.styled(material.Box)(() => ({
|
|
2302
2369
|
border: '1px solid #E0E0E0',
|
|
2303
2370
|
borderRadius: '0px',
|
|
2304
2371
|
padding: '16px',
|
|
@@ -2307,13 +2374,13 @@ const DialogProductCard = material.styled(material.Box)(() => ({
|
|
|
2307
2374
|
alignItems: 'center',
|
|
2308
2375
|
gap: '16px',
|
|
2309
2376
|
}));
|
|
2310
|
-
|
|
2377
|
+
material.styled(material.Box)(() => ({
|
|
2311
2378
|
height: '32px',
|
|
2312
2379
|
display: 'flex',
|
|
2313
2380
|
alignItems: 'center',
|
|
2314
2381
|
justifyContent: 'center',
|
|
2315
2382
|
}));
|
|
2316
|
-
|
|
2383
|
+
material.styled(material.Typography)(() => ({
|
|
2317
2384
|
fontFamily: 'Montserrat, sans-serif',
|
|
2318
2385
|
fontSize: '16px',
|
|
2319
2386
|
fontWeight: 600,
|
|
@@ -2322,7 +2389,7 @@ const DialogProductName = material.styled(material.Typography)(() => ({
|
|
|
2322
2389
|
textAlign: 'center',
|
|
2323
2390
|
wordSpacing: '0px',
|
|
2324
2391
|
}));
|
|
2325
|
-
|
|
2392
|
+
material.styled(material.Typography)(() => ({
|
|
2326
2393
|
fontFamily: 'Montserrat, sans-serif',
|
|
2327
2394
|
fontSize: '14px',
|
|
2328
2395
|
fontWeight: 400,
|
|
@@ -2375,45 +2442,120 @@ const ProductsContainer = material.styled(material.Box)({
|
|
|
2375
2442
|
padding: '16px',
|
|
2376
2443
|
backgroundColor: '#ffffff',
|
|
2377
2444
|
});
|
|
2378
|
-
|
|
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 }) => ({
|
|
2379
2449
|
display: 'grid',
|
|
2380
2450
|
gridTemplateColumns: 'repeat(2, 1fr)',
|
|
2381
2451
|
gap: '12px',
|
|
2382
|
-
|
|
2383
|
-
|
|
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)(() => ({
|
|
2384
2474
|
display: 'flex',
|
|
2385
2475
|
flexDirection: 'column',
|
|
2386
|
-
gap: '
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
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',
|
|
2394
2486
|
display: 'flex',
|
|
2395
2487
|
flexDirection: 'column',
|
|
2396
|
-
|
|
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',
|
|
2397
2525
|
alignItems: 'center',
|
|
2398
2526
|
justifyContent: 'center',
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
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)(() => ({
|
|
2402
2535
|
display: 'flex',
|
|
2403
2536
|
alignItems: 'center',
|
|
2404
2537
|
justifyContent: 'center',
|
|
2405
|
-
|
|
2406
|
-
|
|
2538
|
+
flexShrink: 0,
|
|
2539
|
+
height: '11px',
|
|
2540
|
+
width: '40.7px',
|
|
2541
|
+
'& img': {
|
|
2542
|
+
width: '100%',
|
|
2543
|
+
height: '100%',
|
|
2544
|
+
objectFit: 'contain',
|
|
2545
|
+
},
|
|
2546
|
+
}));
|
|
2407
2547
|
const ProductName$1 = material.styled(material.Typography)({
|
|
2408
|
-
fontFamily: 'Montserrat, sans-serif',
|
|
2409
|
-
fontSize: '14px',
|
|
2548
|
+
fontFamily: '"MetLifeCircular", "Montserrat", sans-serif',
|
|
2410
2549
|
fontWeight: 700,
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
color: '#
|
|
2550
|
+
fontSize: '14px',
|
|
2551
|
+
lineHeight: '20px',
|
|
2552
|
+
color: '#75787b',
|
|
2414
2553
|
textAlign: 'center',
|
|
2554
|
+
letterSpacing: '0px',
|
|
2555
|
+
whiteSpace: 'nowrap',
|
|
2415
2556
|
});
|
|
2416
|
-
|
|
2557
|
+
/** @deprecated Use ProductCategoryLabel - kept for Dialog variant */
|
|
2558
|
+
material.styled(material.Typography)({
|
|
2417
2559
|
fontFamily: 'Montserrat, sans-serif',
|
|
2418
2560
|
fontSize: '12px',
|
|
2419
2561
|
fontWeight: 400,
|
|
@@ -2422,68 +2564,62 @@ const ProductType = material.styled(material.Typography)({
|
|
|
2422
2564
|
color: '#13131b',
|
|
2423
2565
|
textAlign: 'center',
|
|
2424
2566
|
});
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
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',
|
|
2435
2582
|
});
|
|
2436
2583
|
|
|
2437
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', }) {
|
|
2438
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2439
|
-
const tenantTheme = useTenantTheme();
|
|
2440
|
-
// Get primary color from tenant theme, fallback to default
|
|
2441
|
-
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';
|
|
2442
|
-
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';
|
|
2443
|
-
const primaryDarker = '#006699'; // Active state
|
|
2444
2585
|
// Desktop Dialog variant
|
|
2445
2586
|
if (variant === 'dialog') {
|
|
2446
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: {
|
|
2447
2588
|
position: 'absolute',
|
|
2448
2589
|
right: 16,
|
|
2449
2590
|
top: 16,
|
|
2450
|
-
} }, { children: jsxRuntime.jsx(CloseIcon, {}) })), jsxRuntime.jsx(DialogHeaderTitle, { children: title }), jsxRuntime.jsx(DialogHeaderSubtitle, { children: subtitle })] }), jsxRuntime.jsx(DialogContent, { children: jsxRuntime.jsx(DialogProductsGrid, {
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
'&:active': {
|
|
2460
|
-
backgroundColor: primaryDarker,
|
|
2461
|
-
},
|
|
2462
|
-
} }, { 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
|
+
}) })) })] })));
|
|
2463
2600
|
}
|
|
2464
2601
|
// Mobile Drawer variant (default)
|
|
2465
|
-
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, {
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
'&:active': {
|
|
2475
|
-
backgroundColor: primaryDarker,
|
|
2476
|
-
},
|
|
2477
|
-
} }, { 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
|
+
}) })) })] }) })));
|
|
2478
2611
|
}
|
|
2479
2612
|
|
|
2480
|
-
const QuestionContainer$1 = styles.styled(material.Box)(() => ({
|
|
2613
|
+
const QuestionContainer$1 = styles.styled(material.Box)(({ theme }) => ({
|
|
2481
2614
|
backgroundColor: '#FFFFFF',
|
|
2482
|
-
padding: '12px
|
|
2615
|
+
padding: '12px 0px',
|
|
2483
2616
|
display: 'flex',
|
|
2484
2617
|
flexDirection: 'column',
|
|
2485
2618
|
gap: '16px',
|
|
2486
2619
|
width: '100%',
|
|
2620
|
+
[theme.breakpoints.down('md')]: {
|
|
2621
|
+
padding: '8px 12px',
|
|
2622
|
+
},
|
|
2487
2623
|
}));
|
|
2488
2624
|
const QuestionHeader = styles.styled(material.Box)(() => ({
|
|
2489
2625
|
display: 'flex',
|
|
@@ -2574,6 +2710,14 @@ const variantColors = {
|
|
|
2574
2710
|
hoverBg: 'rgba(0, 0, 0, 0.02)',
|
|
2575
2711
|
hoverBorder: '#5f5e62',
|
|
2576
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
|
+
},
|
|
2577
2721
|
};
|
|
2578
2722
|
const StyledOptionButton = styles.styled(material.ButtonBase, {
|
|
2579
2723
|
shouldForwardProp: (prop) => prop !== 'colorVariant',
|
|
@@ -2897,16 +3041,16 @@ function BillingToggle({ value, onChange, formatMessage = (descriptor) => descri
|
|
|
2897
3041
|
? toggleActiveTextColor
|
|
2898
3042
|
: toggleInactiveTextColor,
|
|
2899
3043
|
} }, { children: jsxRuntime.jsx(ToggleText, { children: formatMessage({
|
|
2900
|
-
id: 'Billed
|
|
2901
|
-
defaultMessage: 'Billed
|
|
3044
|
+
id: 'Billed Monthly',
|
|
3045
|
+
defaultMessage: 'Billed Monthly',
|
|
2902
3046
|
}) }) })), jsxRuntime.jsx(ToggleButton, Object.assign({ active: value === 'annually', onClick: () => onChange('annually'), sx: {
|
|
2903
3047
|
backgroundColor: value === 'annually' ? toggleActiveColor : 'transparent',
|
|
2904
3048
|
color: value === 'annually'
|
|
2905
3049
|
? toggleActiveTextColor
|
|
2906
3050
|
: toggleInactiveTextColor,
|
|
2907
3051
|
} }, { children: jsxRuntime.jsx(ToggleText, { children: formatMessage({
|
|
2908
|
-
id: 'Billed
|
|
2909
|
-
defaultMessage: 'Billed
|
|
3052
|
+
id: 'Billed Annually',
|
|
3053
|
+
defaultMessage: 'Billed Annually',
|
|
2910
3054
|
}) }) }))] })));
|
|
2911
3055
|
}
|
|
2912
3056
|
|
|
@@ -3454,6 +3598,15 @@ const CheckoutHeader = ({ progress, product, sectionTitle, sectionDescription, s
|
|
|
3454
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 })] })] })));
|
|
3455
3599
|
};
|
|
3456
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
|
+
*/
|
|
3457
3610
|
const ButtonContainer = styles.styled(material.Box)(({ isFixed, desktopRightAligned }) => ({
|
|
3458
3611
|
position: isFixed ? 'fixed' : 'relative',
|
|
3459
3612
|
bottom: 0,
|
|
@@ -3463,39 +3616,45 @@ const ButtonContainer = styles.styled(material.Box)(({ isFixed, desktopRightAlig
|
|
|
3463
3616
|
padding: '16px',
|
|
3464
3617
|
boxShadow: isFixed ? '0px 2px 10px 0px rgba(0, 0, 0, 0.12)' : 'none',
|
|
3465
3618
|
zIndex: 999,
|
|
3466
|
-
// Desktop styles for
|
|
3467
|
-
'@media (min-width: 900px)':
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
}
|
|
3478
|
-
: {},
|
|
3619
|
+
// Desktop styles for button alignment
|
|
3620
|
+
'@media (min-width: 900px)': {
|
|
3621
|
+
display: 'flex',
|
|
3622
|
+
justifyContent: desktopRightAligned ? 'flex-end' : 'center',
|
|
3623
|
+
maxWidth: '938px',
|
|
3624
|
+
margin: '0 auto',
|
|
3625
|
+
padding: '24px 0',
|
|
3626
|
+
backgroundColor: 'transparent',
|
|
3627
|
+
boxShadow: 'none',
|
|
3628
|
+
position: 'relative',
|
|
3629
|
+
},
|
|
3479
3630
|
}));
|
|
3480
3631
|
const StyledButton = styles.styled('button')(({ isDisabled, desktopWidth }) => ({
|
|
3481
3632
|
width: '100%',
|
|
3482
|
-
|
|
3483
|
-
|
|
3633
|
+
minHeight: '48px',
|
|
3634
|
+
padding: '14px 32px',
|
|
3635
|
+
borderRadius: '100px',
|
|
3484
3636
|
border: 'none',
|
|
3485
|
-
backgroundColor: isDisabled
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
fontSize: '14px',
|
|
3637
|
+
backgroundColor: isDisabled ? '#f2f2f2' : '#0090da',
|
|
3638
|
+
color: isDisabled ? '#75787b' : '#ffffff',
|
|
3639
|
+
fontFamily: '"MetLifeCircular", "Roboto", "Helvetica", "Arial", sans-serif',
|
|
3640
|
+
fontSize: '16px',
|
|
3490
3641
|
fontWeight: 500,
|
|
3491
|
-
lineHeight: '
|
|
3642
|
+
lineHeight: '20px',
|
|
3643
|
+
letterSpacing: 0,
|
|
3644
|
+
textTransform: 'none',
|
|
3492
3645
|
wordSpacing: '0px',
|
|
3493
3646
|
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
|
3494
|
-
transition: 'all 0.2s ease',
|
|
3647
|
+
transition: 'all 0.2s ease-in-out',
|
|
3648
|
+
boxSizing: 'border-box',
|
|
3495
3649
|
'&:hover': {
|
|
3496
|
-
backgroundColor: isDisabled
|
|
3497
|
-
|
|
3498
|
-
|
|
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)',
|
|
3499
3658
|
},
|
|
3500
3659
|
// Desktop styles for fixed width button
|
|
3501
3660
|
'@media (min-width: 900px)': desktopWidth
|
|
@@ -3507,7 +3666,7 @@ const StyledButton = styles.styled('button')(({ isDisabled, desktopWidth }) => (
|
|
|
3507
3666
|
}));
|
|
3508
3667
|
|
|
3509
3668
|
const CheckoutFormButton = ({ text = 'Next', disabled = false, onClick, fixed = true, type = 'button', sx, loading = false, desktopRightAligned = false, desktopWidth = '180px', }) => {
|
|
3510
|
-
return (jsxRuntime.jsx(ButtonContainer, Object.assign({ isFixed: fixed, desktopRightAligned: desktopRightAligned, sx: sx }, { children: jsxRuntime.jsx(StyledButton, Object.assign({ type: type, disabled: disabled || loading, isDisabled: disabled || loading, desktopWidth:
|
|
3669
|
+
return (jsxRuntime.jsx(ButtonContainer, Object.assign({ isFixed: fixed, desktopRightAligned: desktopRightAligned, sx: sx }, { children: jsxRuntime.jsx(StyledButton, Object.assign({ type: type, disabled: disabled || loading, isDisabled: disabled || loading, desktopWidth: desktopWidth, onClick: onClick }, { children: loading ? 'Processing...' : text })) })));
|
|
3511
3670
|
};
|
|
3512
3671
|
|
|
3513
3672
|
const QuestionContainer = styles.styled(material.Box)({
|
|
@@ -3634,7 +3793,7 @@ const PersonalInformationForm = ({ renderField, fields, consents, onSubmit, form
|
|
|
3634
3793
|
color: '#5F5E62',
|
|
3635
3794
|
fontSize: '12px',
|
|
3636
3795
|
wordSpacing: '-5px',
|
|
3637
|
-
} }, { children: fields.full_name.helperText })))] }), renderField(fields.nric), renderField(fields.date_of_birth), renderField(fields.gender), renderField(fields.salutation), renderField(fields.nationality), renderField(fields.occupation), renderField(fields.industry), renderField(fields.crediting_bank_name), renderField(fields.crediting_bank_account_number), 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 ||
|
|
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 ||
|
|
3638
3797
|
defaultBankConfirmationLabel }) }), consents.bank_account_confirmation.error && (jsxRuntime.jsx(material.Typography, Object.assign({ sx: {
|
|
3639
3798
|
color: 'error.main',
|
|
3640
3799
|
fontSize: '12px',
|
|
@@ -3717,8 +3876,10 @@ const SectionTitle$1 = styles.styled(material.Typography)({
|
|
|
3717
3876
|
wordSpacing: '-5px',
|
|
3718
3877
|
});
|
|
3719
3878
|
|
|
3720
|
-
const ContactDetailsForm = ({ renderField, fields, mailingFields, mailingAddressSame, onSubmit, formRef, sx, desktopGridLayout = false, }) => {
|
|
3879
|
+
const ContactDetailsForm = ({ renderField, fields, isForChild = false, mailingFields, mailingAddressSame, childContactFields, childContactNotSame, onSubmit, formRef, sx, desktopGridLayout = false, }) => {
|
|
3721
3880
|
const defaultMailingLabel = 'My mailing address is not the same as residential';
|
|
3881
|
+
const defaultChildContactLabel = 'My child contact details is not the same as residential';
|
|
3882
|
+
const childContactHelperText = 'Tick this box if the child has a different address, phone number, or email';
|
|
3722
3883
|
const Container = desktopGridLayout ? DesktopFormContainer$2 : FormContainer$2;
|
|
3723
3884
|
// Helper to render field with or without full width wrapper
|
|
3724
3885
|
const renderFieldWithLayout = (field, fullWidth = false) => {
|
|
@@ -3740,18 +3901,28 @@ const ContactDetailsForm = ({ renderField, fields, mailingFields, mailingAddress
|
|
|
3740
3901
|
}
|
|
3741
3902
|
return content;
|
|
3742
3903
|
};
|
|
3743
|
-
return (jsxRuntime.jsx(Container, Object.assign({ ref: formRef, component: "form", onSubmit: onSubmit, sx: sx }, { children: desktopGridLayout ? (jsxRuntime.jsxs(FieldsGridContainer$1, { children: [renderFieldWithHelperText(fields.phone_number, false), renderFieldWithLayout(fields.email_address, false), jsxRuntime.jsx(FullWidthField, { children: jsxRuntime.jsx(material.Divider, { sx: { borderColor: 'rgba(0,0,0,0.1)' } }) }), jsxRuntime.jsx(FullWidthField, { children: jsxRuntime.jsx(SectionTitle$1, { children: "Residential address" }) }), renderFieldWithHelperText(fields.residential_address_line1, false), renderFieldWithHelperText(fields.residential_address_line2, false), renderField(fields.postal_code), renderField(fields.city), renderField(fields.state), jsxRuntime.jsx(FullWidthField, { children: jsxRuntime.jsx(material.Divider, { sx: { borderColor: 'rgba(0,0,0,0.1)' } }) }), (
|
|
3904
|
+
return (jsxRuntime.jsx(Container, Object.assign({ ref: formRef, component: "form", onSubmit: onSubmit, sx: sx }, { children: desktopGridLayout ? (jsxRuntime.jsxs(FieldsGridContainer$1, { children: [isForChild && (jsxRuntime.jsx(FullWidthField, { children: jsxRuntime.jsx(SectionTitle$1, { children: "Policyowner contact details" }) })), renderFieldWithHelperText(fields.phone_number, false), renderFieldWithLayout(fields.email_address, false), ((mailingAddressSame === null || mailingAddressSame === void 0 ? void 0 : mailingAddressSame.checked) && !isForChild) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(FullWidthField, { children: jsxRuntime.jsx(material.Divider, { sx: { borderColor: 'rgba(0,0,0,0.1)' } }) }), jsxRuntime.jsx(FullWidthField, { children: jsxRuntime.jsx(SectionTitle$1, { children: "Residential address" }) })] })), renderFieldWithHelperText(fields.residential_address_line1, false), renderFieldWithHelperText(fields.residential_address_line2, false), fields.country && renderField(fields.country), renderField(fields.postal_code), renderField(fields.city), renderField(fields.state), (mailingAddressSame === null || mailingAddressSame === void 0 ? void 0 : mailingAddressSame.checked) && mailingFields && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(FullWidthField, { children: jsxRuntime.jsx(material.Divider, { sx: { borderColor: 'rgba(0,0,0,0.1)' } }) }), jsxRuntime.jsx(FullWidthField, { children: jsxRuntime.jsx(SectionTitle$1, { children: isForChild ? 'Policyowner mailing address' : 'Mailing address' }) }), isForChild && mailingFields.mailing_phone_number && (renderFieldWithHelperText(mailingFields.mailing_phone_number, false)), isForChild && mailingFields.mailing_email_address && (renderFieldWithLayout(mailingFields.mailing_email_address, false)), renderFieldWithHelperText(mailingFields.mailing_address_line1, false), renderFieldWithHelperText(mailingFields.mailing_address_line2, false), mailingFields.mailing_country && renderField(mailingFields.mailing_country), renderField(mailingFields.mailing_postal_code), renderField(mailingFields.mailing_city), renderField(mailingFields.mailing_state)] })), (childContactNotSame === null || childContactNotSame === void 0 ? void 0 : childContactNotSame.checked) && childContactFields && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(FullWidthField, { children: jsxRuntime.jsx(material.Divider, { sx: { borderColor: 'rgba(0,0,0,0.1)' } }) }), jsxRuntime.jsx(FullWidthField, { children: jsxRuntime.jsx(SectionTitle$1, { children: "Child's contact details" }) }), renderFieldWithHelperText(childContactFields.child_phone_number, false), renderFieldWithLayout(childContactFields.child_email_address, false), renderFieldWithHelperText(childContactFields.child_address_line1, false), renderFieldWithHelperText(childContactFields.child_address_line2, false), renderField(childContactFields.child_postal_code), childContactFields.child_country && renderField(childContactFields.child_country), renderField(childContactFields.child_city), renderField(childContactFields.child_state)] })), mailingAddressSame && (jsxRuntime.jsx(FullWidthField, { children: jsxRuntime.jsx(CheckboxContainer, { children: jsxRuntime.jsx(material.FormControlLabel, { control: jsxRuntime.jsx(material.Checkbox, { checked: mailingAddressSame.checked, onChange: (e) => mailingAddressSame.onChange(e.target.checked), name: "mailing_not_same_as_residential", sx: {
|
|
3744
3905
|
color: '#929094',
|
|
3745
3906
|
'&.Mui-checked': {
|
|
3746
3907
|
color: '#317abc',
|
|
3747
3908
|
},
|
|
3748
|
-
} }), label: jsxRuntime.jsx(CheckboxLabel, { children: mailingAddressSame.label || defaultMailingLabel }) }) }) }))
|
|
3909
|
+
} }), label: jsxRuntime.jsx(CheckboxLabel, { children: mailingAddressSame.label || defaultMailingLabel }) }) }) })), childContactNotSame && (jsxRuntime.jsx(FullWidthField, { children: jsxRuntime.jsx(CheckboxContainer, { children: jsxRuntime.jsx(material.FormControlLabel, { control: jsxRuntime.jsx(material.Checkbox, { checked: childContactNotSame.checked, onChange: (e) => childContactNotSame.onChange(e.target.checked), name: "child_contact_not_same", sx: {
|
|
3910
|
+
color: '#929094',
|
|
3911
|
+
'&.Mui-checked': {
|
|
3912
|
+
color: '#317abc',
|
|
3913
|
+
},
|
|
3914
|
+
} }), label: jsxRuntime.jsxs(material.Box, { children: [jsxRuntime.jsx(CheckboxLabel, { children: childContactNotSame.label || defaultChildContactLabel }), jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: {
|
|
3915
|
+
display: 'block',
|
|
3916
|
+
fontSize: '12px',
|
|
3917
|
+
color: '#5F5E62',
|
|
3918
|
+
mt: 0.5,
|
|
3919
|
+
} }, { children: childContactHelperText }))] }) }) }) }))] })) : (jsxRuntime.jsxs(material.Box, Object.assign({ sx: { display: 'flex', flexDirection: 'column', gap: '24px' } }, { children: [isForChild && (jsxRuntime.jsx(SectionTitle$1, { children: "Policyowner contact details" })), jsxRuntime.jsxs(material.Box, { children: [renderField(fields.phone_number), fields.phone_number.helperText && (jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: {
|
|
3749
3920
|
display: 'block',
|
|
3750
3921
|
mt: 0.5,
|
|
3751
3922
|
ml: 2,
|
|
3752
3923
|
color: '#5F5E62',
|
|
3753
3924
|
fontSize: '12px',
|
|
3754
|
-
} }, { 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: {
|
|
3925
|
+
} }, { children: fields.phone_number.helperText })))] }), renderField(fields.email_address), ((mailingAddressSame === null || mailingAddressSame === void 0 ? void 0 : mailingAddressSame.checked) && !isForChild) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [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: {
|
|
3755
3926
|
display: 'block',
|
|
3756
3927
|
mt: 0.5,
|
|
3757
3928
|
color: '#5F5E62',
|
|
@@ -3761,7 +3932,7 @@ const ContactDetailsForm = ({ renderField, fields, mailingFields, mailingAddress
|
|
|
3761
3932
|
mt: 0.5,
|
|
3762
3933
|
color: '#5F5E62',
|
|
3763
3934
|
fontSize: '12px',
|
|
3764
|
-
} }, { 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)' } }), (
|
|
3935
|
+
} }, { children: fields.residential_address_line2.helperText })))] }), fields.country && renderField(fields.country), renderField(fields.postal_code), renderField(fields.city), renderField(fields.state), (mailingAddressSame === null || mailingAddressSame === void 0 ? void 0 : mailingAddressSame.checked) && mailingFields && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(material.Divider, { sx: { borderColor: 'rgba(0,0,0,0.1)' } }), jsxRuntime.jsx(SectionTitle$1, { children: isForChild ? 'Policyowner mailing address' : 'Mailing address' }), isForChild && mailingFields.mailing_phone_number && (jsxRuntime.jsxs(material.Box, { children: [renderField(mailingFields.mailing_phone_number), mailingFields.mailing_phone_number.helperText && (jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: { display: 'block', mt: 0.5, ml: 2, color: '#5F5E62', fontSize: '12px' } }, { children: mailingFields.mailing_phone_number.helperText })))] })), isForChild && mailingFields.mailing_email_address && (renderField(mailingFields.mailing_email_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: {
|
|
3765
3936
|
display: 'block',
|
|
3766
3937
|
mt: 0.5,
|
|
3767
3938
|
color: '#5F5E62',
|
|
@@ -3771,12 +3942,22 @@ const ContactDetailsForm = ({ renderField, fields, mailingFields, mailingAddress
|
|
|
3771
3942
|
mt: 0.5,
|
|
3772
3943
|
color: '#5F5E62',
|
|
3773
3944
|
fontSize: '12px',
|
|
3774
|
-
} }, { children: mailingFields.mailing_address_line2.helperText })))] }), renderField(mailingFields.mailing_postal_code), renderField(mailingFields.mailing_city), renderField(mailingFields.mailing_state)] })), mailingAddressSame && (jsxRuntime.jsx(CheckboxContainer, { children: jsxRuntime.jsx(material.FormControlLabel, { control: jsxRuntime.jsx(material.Checkbox, { checked: mailingAddressSame.checked, onChange: (e) => mailingAddressSame.onChange(e.target.checked), name: "mailing_not_same_as_residential", sx: {
|
|
3945
|
+
} }, { children: mailingFields.mailing_address_line2.helperText })))] }), mailingFields.mailing_country && renderField(mailingFields.mailing_country), renderField(mailingFields.mailing_postal_code), renderField(mailingFields.mailing_city), renderField(mailingFields.mailing_state)] })), (childContactNotSame === null || childContactNotSame === void 0 ? void 0 : childContactNotSame.checked) && childContactFields && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(material.Divider, { sx: { borderColor: 'rgba(0,0,0,0.1)' } }), jsxRuntime.jsx(SectionTitle$1, { children: "Child's contact details" }), jsxRuntime.jsxs(material.Box, { children: [renderField(childContactFields.child_phone_number), childContactFields.child_phone_number.helperText && (jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: { display: 'block', mt: 0.5, ml: 2, color: '#5F5E62', fontSize: '12px' } }, { children: childContactFields.child_phone_number.helperText })))] }), renderField(childContactFields.child_email_address), jsxRuntime.jsxs(material.Box, { children: [renderField(childContactFields.child_address_line1), childContactFields.child_address_line1.helperText && (jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: { display: 'block', mt: 0.5, color: '#5F5E62', fontSize: '12px' } }, { children: childContactFields.child_address_line1.helperText })))] }), jsxRuntime.jsxs(material.Box, { children: [renderField(childContactFields.child_address_line2), childContactFields.child_address_line2.helperText && (jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: { display: 'block', mt: 0.5, color: '#5F5E62', fontSize: '12px' } }, { children: childContactFields.child_address_line2.helperText })))] }), renderField(childContactFields.child_postal_code), childContactFields.child_country && renderField(childContactFields.child_country), renderField(childContactFields.child_city), renderField(childContactFields.child_state)] })), mailingAddressSame && (jsxRuntime.jsx(CheckboxContainer, { children: jsxRuntime.jsx(material.FormControlLabel, { control: jsxRuntime.jsx(material.Checkbox, { checked: mailingAddressSame.checked, onChange: (e) => mailingAddressSame.onChange(e.target.checked), name: "mailing_not_same_as_residential", sx: {
|
|
3946
|
+
color: '#929094',
|
|
3947
|
+
'&.Mui-checked': {
|
|
3948
|
+
color: '#317abc',
|
|
3949
|
+
},
|
|
3950
|
+
} }), label: jsxRuntime.jsx(CheckboxLabel, { children: mailingAddressSame.label || defaultMailingLabel }) }) })), childContactNotSame && (jsxRuntime.jsx(CheckboxContainer, { children: jsxRuntime.jsx(material.FormControlLabel, { control: jsxRuntime.jsx(material.Checkbox, { checked: childContactNotSame.checked, onChange: (e) => childContactNotSame.onChange(e.target.checked), name: "child_contact_not_same", sx: {
|
|
3775
3951
|
color: '#929094',
|
|
3776
3952
|
'&.Mui-checked': {
|
|
3777
3953
|
color: '#317abc',
|
|
3778
3954
|
},
|
|
3779
|
-
} }), label: jsxRuntime.jsx(CheckboxLabel, { children:
|
|
3955
|
+
} }), label: jsxRuntime.jsxs(material.Box, { children: [jsxRuntime.jsx(CheckboxLabel, { children: childContactNotSame.label || defaultChildContactLabel }), jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: {
|
|
3956
|
+
display: 'block',
|
|
3957
|
+
fontSize: '12px',
|
|
3958
|
+
color: '#5F5E62',
|
|
3959
|
+
mt: 0.5,
|
|
3960
|
+
} }, { children: childContactHelperText }))] }) }) }))] }))) })));
|
|
3780
3961
|
};
|
|
3781
3962
|
|
|
3782
3963
|
const FormContainer$1 = styles.styled(material.Box)({
|
|
@@ -3851,28 +4032,30 @@ styles.styled(material.Box)({
|
|
|
3851
4032
|
},
|
|
3852
4033
|
});
|
|
3853
4034
|
|
|
3854
|
-
const ChildInformationForm = ({ renderField, fields, onSubmit, formRef, sx, desktopGridLayout = false, }) => {
|
|
4035
|
+
const ChildInformationForm = ({ renderField, fields, consents, onSubmit, formRef, sx, desktopGridLayout = false, }) => {
|
|
3855
4036
|
const Container = desktopGridLayout ? DesktopFormContainer : FormContainer;
|
|
4037
|
+
const defaultBankConfirmationLabel = "I confirm this bank account is my child's and consent to AmMetLife crediting payouts to it";
|
|
4038
|
+
const defaultMarketingLabel = "I/We consent to AmMetLife Insurance Berhad using my child's personal data for marketing and communication via digital platforms such as email, WhatsApp, and mobile";
|
|
4039
|
+
const renderHelperField = (field) => (jsxRuntime.jsxs(material.Box, { children: [renderField(field), field.helperText && (jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: {
|
|
4040
|
+
display: 'block',
|
|
4041
|
+
mt: 0.5,
|
|
4042
|
+
ml: 2,
|
|
4043
|
+
color: '#5F5E62',
|
|
4044
|
+
fontSize: '12px',
|
|
4045
|
+
wordSpacing: '-5px',
|
|
4046
|
+
} }, { children: field.helperText })))] }));
|
|
4047
|
+
const renderConsents = () => {
|
|
4048
|
+
if (!consents)
|
|
4049
|
+
return null;
|
|
4050
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [consents.bank_account_confirmation && (jsxRuntime.jsxs(material.Box, Object.assign({ sx: desktopGridLayout ? { gridColumn: '1 / -1' } : undefined }, { children: [jsxRuntime.jsx(material.FormControlLabel, { control: jsxRuntime.jsx(material.Checkbox, { checked: consents.bank_account_confirmation.checked, onChange: (e) => { var _a; return (_a = consents.bank_account_confirmation) === null || _a === void 0 ? void 0 : _a.onChange(e.target.checked); }, name: "bank_account_confirmation" }), label: jsxRuntime.jsx(material.Typography, Object.assign({ sx: { fontSize: '14px', color: '#5f5e62', lineHeight: '18px' } }, { children: consents.bank_account_confirmation.label || defaultBankConfirmationLabel })), sx: { alignItems: 'flex-start', m: 0, '& .MuiCheckbox-root': { pt: '2px' } } }), consents.bank_account_confirmation.error && (jsxRuntime.jsx(material.Typography, Object.assign({ sx: { color: 'error.main', fontSize: '12px', mt: 0.5, ml: 4 } }, { children: consents.bank_account_confirmation.error })))] }))), consents.marketing_consent && (jsxRuntime.jsx(material.Box, Object.assign({ sx: desktopGridLayout ? { gridColumn: '1 / -1' } : undefined }, { children: jsxRuntime.jsx(material.FormControlLabel, { control: jsxRuntime.jsx(material.Checkbox, { checked: consents.marketing_consent.checked, onChange: (e) => { var _a; return (_a = consents.marketing_consent) === null || _a === void 0 ? void 0 : _a.onChange(e.target.checked); }, name: "marketing_consent" }), label: jsxRuntime.jsx(material.Typography, Object.assign({ sx: { fontSize: '14px', color: '#5f5e62', lineHeight: '18px' } }, { children: consents.marketing_consent.label || defaultMarketingLabel })), sx: { alignItems: 'flex-start', m: 0, '& .MuiCheckbox-root': { pt: '2px' } } }) })))] }));
|
|
4051
|
+
};
|
|
4052
|
+
const renderAdditionalFields = () => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [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), fields.occupation && renderField(fields.occupation), fields.industry && renderField(fields.industry), fields.crediting_bank_name && renderField(fields.crediting_bank_name), fields.crediting_bank_account_number && renderField(fields.crediting_bank_account_number), fields.annual_income && renderField(fields.annual_income)] }));
|
|
3856
4053
|
// Desktop layout with 2-column grid
|
|
3857
4054
|
if (desktopGridLayout) {
|
|
3858
|
-
return (jsxRuntime.jsx(Container, Object.assign({ ref: formRef, component: "form", onSubmit: onSubmit, sx: sx }, { children: jsxRuntime.jsxs(FieldsGridContainer, { children: [
|
|
3859
|
-
display: 'block',
|
|
3860
|
-
mt: 0.5,
|
|
3861
|
-
ml: 2,
|
|
3862
|
-
color: '#5F5E62',
|
|
3863
|
-
fontSize: '12px',
|
|
3864
|
-
wordSpacing: '-5px',
|
|
3865
|
-
} }, { children: fields.full_name.helperText })))] }), fields.nric ? renderField(fields.nric) : renderField(fields.date_of_birth), fields.nric && renderField(fields.date_of_birth), renderField(fields.gender), renderField(fields.nationality)] }) })));
|
|
4055
|
+
return (jsxRuntime.jsx(Container, Object.assign({ ref: formRef, component: "form", onSubmit: onSubmit, sx: sx }, { children: jsxRuntime.jsxs(FieldsGridContainer, { children: [renderHelperField(fields.full_name), fields.nric ? renderHelperField(fields.nric) : renderField(fields.date_of_birth), fields.nric && renderField(fields.date_of_birth), renderField(fields.gender), fields.salutation && renderField(fields.salutation), renderField(fields.nationality), renderAdditionalFields(), renderConsents()] }) })));
|
|
3866
4056
|
}
|
|
3867
4057
|
// Mobile layout - single column
|
|
3868
|
-
return (jsxRuntime.jsx(Container, Object.assign({ ref: formRef, component: "form", onSubmit: onSubmit, sx: sx }, { children: jsxRuntime.jsxs(material.Box, Object.assign({ sx: { display: 'flex', flexDirection: 'column', gap: '24px' } }, { children: [
|
|
3869
|
-
display: 'block',
|
|
3870
|
-
mt: 0.5,
|
|
3871
|
-
ml: 2,
|
|
3872
|
-
color: '#5F5E62',
|
|
3873
|
-
fontSize: '12px',
|
|
3874
|
-
wordSpacing: '-5px',
|
|
3875
|
-
} }, { children: fields.full_name.helperText })))] }), fields.nric && renderField(fields.nric), renderField(fields.date_of_birth), renderField(fields.gender), renderField(fields.nationality)] })) })));
|
|
4058
|
+
return (jsxRuntime.jsx(Container, Object.assign({ ref: formRef, component: "form", onSubmit: onSubmit, sx: sx }, { children: jsxRuntime.jsxs(material.Box, Object.assign({ sx: { display: 'flex', flexDirection: 'column', gap: '24px' } }, { children: [renderHelperField(fields.full_name), fields.nric && renderHelperField(fields.nric), renderField(fields.date_of_birth), renderField(fields.gender), fields.salutation && renderField(fields.salutation), renderField(fields.nationality), renderAdditionalFields(), renderConsents()] })) })));
|
|
3876
4059
|
};
|
|
3877
4060
|
|
|
3878
4061
|
/**
|