igloo-d2c-components 1.0.23 → 1.0.25
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 +164 -140
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +164 -140
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/DesktopHeaderMenuBar/styled.d.ts +18 -4
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -101,7 +101,7 @@ function useIsTenant(checkTenantId) {
|
|
|
101
101
|
* Igloo Typography Configuration
|
|
102
102
|
*/
|
|
103
103
|
const iglooTypography = {
|
|
104
|
-
fontFamily: '
|
|
104
|
+
fontFamily: 'Inter, sans-serif',
|
|
105
105
|
fontWeightRegular: 400,
|
|
106
106
|
fontWeightMedium: 500,
|
|
107
107
|
fontWeightSemiBold: 600,
|
|
@@ -849,29 +849,47 @@ function Banner(_a) {
|
|
|
849
849
|
/**
|
|
850
850
|
* Styled components for Desktop Header Menu Bar
|
|
851
851
|
* Based on Figma Design: Tech-Solution-V1.0 (node 1581-22604)
|
|
852
|
+
*
|
|
853
|
+
* Design Specifications:
|
|
854
|
+
* - Header height: 80px
|
|
855
|
+
* - Background: white (#ffffff)
|
|
856
|
+
* - Content max-width: 1128px (equivalent to 156px padding on 1440px width)
|
|
857
|
+
* - Logo width: 126px
|
|
858
|
+
* - Gap between logo and menu items: 32px
|
|
859
|
+
* - Menu text: MetLife Circular Bold, 18px, #13131B
|
|
860
|
+
* - Login button: Text style, #0090da (teal/cyan)
|
|
852
861
|
*/
|
|
862
|
+
/**
|
|
863
|
+
* Design System Colors (from Figma node 1581-22604)
|
|
864
|
+
*/
|
|
865
|
+
const designColors = {
|
|
866
|
+
natural: {
|
|
867
|
+
dim100: '#13131B',
|
|
868
|
+
light00: '#ffffff',
|
|
869
|
+
},
|
|
870
|
+
primary: {
|
|
871
|
+
main60: '#0090da',
|
|
872
|
+
},
|
|
873
|
+
};
|
|
853
874
|
/**
|
|
854
875
|
* Main AppBar container
|
|
855
876
|
* Height: 80px, white background, centered content
|
|
856
877
|
*/
|
|
857
|
-
const StyledAppBar$2 = styles.styled(AppBar)(({ theme }) => {
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
justifyContent: 'center',
|
|
870
|
-
});
|
|
871
|
-
});
|
|
878
|
+
const StyledAppBar$2 = styles.styled(AppBar)(({ theme }) => ({
|
|
879
|
+
backgroundColor: designColors.natural.light00,
|
|
880
|
+
boxShadow: 'none',
|
|
881
|
+
position: 'fixed',
|
|
882
|
+
top: 0,
|
|
883
|
+
left: 0,
|
|
884
|
+
right: 0,
|
|
885
|
+
zIndex: 1000,
|
|
886
|
+
height: '80px',
|
|
887
|
+
display: 'flex',
|
|
888
|
+
justifyContent: 'center',
|
|
889
|
+
}));
|
|
872
890
|
/**
|
|
873
891
|
* Inner container with max-width constraint
|
|
874
|
-
* Max-width: 1128px, centered
|
|
892
|
+
* Max-width: 1128px, centered (equivalent to px-156 on 1440px viewport)
|
|
875
893
|
*/
|
|
876
894
|
const HeaderContainer$1 = styles.styled(material.Box)(({ theme }) => ({
|
|
877
895
|
display: 'flex',
|
|
@@ -888,6 +906,7 @@ const HeaderContainer$1 = styles.styled(material.Box)(({ theme }) => ({
|
|
|
888
906
|
}));
|
|
889
907
|
/**
|
|
890
908
|
* Left section containing logo and menu items
|
|
909
|
+
* Gap: 32px between all children (logo and menu items)
|
|
891
910
|
*/
|
|
892
911
|
const LeftSection = styles.styled(material.Box)({
|
|
893
912
|
display: 'flex',
|
|
@@ -903,57 +922,58 @@ const LogoContainer$2 = styles.styled(material.Box)({
|
|
|
903
922
|
alignItems: 'center',
|
|
904
923
|
cursor: 'pointer',
|
|
905
924
|
height: '100%',
|
|
925
|
+
flexShrink: 0,
|
|
906
926
|
});
|
|
907
927
|
/**
|
|
908
928
|
* Logo image
|
|
909
|
-
* Width: 126px, height:
|
|
929
|
+
* Width: 126px, height: 16px (per Figma)
|
|
910
930
|
*/
|
|
911
931
|
const LogoImage$1 = styles.styled('img')({
|
|
912
932
|
width: '126px',
|
|
913
|
-
height: '
|
|
933
|
+
height: '16px',
|
|
914
934
|
objectFit: 'contain',
|
|
915
935
|
});
|
|
916
936
|
/**
|
|
917
937
|
* Navigation menu container
|
|
938
|
+
* No additional gap - items are spaced by LeftSection's gap
|
|
918
939
|
*/
|
|
919
|
-
|
|
940
|
+
styles.styled(material.Box)({
|
|
920
941
|
display: 'flex',
|
|
921
942
|
alignItems: 'center',
|
|
922
943
|
height: '100%',
|
|
923
|
-
gap: '
|
|
944
|
+
gap: '0',
|
|
924
945
|
});
|
|
925
946
|
/**
|
|
926
947
|
* Individual menu item button
|
|
927
|
-
* Font: MetLife Circular Bold, 18px
|
|
948
|
+
* Font: MetLife Circular Bold, 18px, color: #13131B
|
|
949
|
+
* Padding: 10px horizontal (creates visual spacing between items)
|
|
928
950
|
*/
|
|
929
|
-
const MenuItemButton = styles.styled(material.Button)(({ theme }) => {
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
},
|
|
950
|
-
});
|
|
951
|
-
});
|
|
951
|
+
const MenuItemButton = styles.styled(material.Button)(({ theme }) => ({
|
|
952
|
+
display: 'flex',
|
|
953
|
+
alignItems: 'center',
|
|
954
|
+
gap: '8px',
|
|
955
|
+
padding: '0 10px',
|
|
956
|
+
height: '100%',
|
|
957
|
+
minWidth: 'auto',
|
|
958
|
+
textTransform: 'none',
|
|
959
|
+
color: designColors.natural.dim100,
|
|
960
|
+
fontFamily: '"MetLifeCircular", "Montserrat", "Roboto", "Helvetica", "Arial", sans-serif',
|
|
961
|
+
fontWeight: 700,
|
|
962
|
+
fontSize: '18px',
|
|
963
|
+
lineHeight: '24px',
|
|
964
|
+
letterSpacing: '0px',
|
|
965
|
+
borderRadius: 0,
|
|
966
|
+
'&:hover': {
|
|
967
|
+
backgroundColor: 'transparent',
|
|
968
|
+
color: designColors.primary.main60,
|
|
969
|
+
},
|
|
970
|
+
}));
|
|
952
971
|
/**
|
|
953
972
|
* Menu item text
|
|
973
|
+
* Font: MetLife Circular Bold, 18px
|
|
954
974
|
*/
|
|
955
975
|
const MenuItemText = styles.styled(material.Typography)({
|
|
956
|
-
fontFamily: '"Montserrat", "
|
|
976
|
+
fontFamily: '"MetLifeCircular", "Montserrat", "Roboto", "Helvetica", "Arial", sans-serif',
|
|
957
977
|
fontWeight: 700,
|
|
958
978
|
fontSize: '18px',
|
|
959
979
|
lineHeight: '24px',
|
|
@@ -962,12 +982,12 @@ const MenuItemText = styles.styled(material.Typography)({
|
|
|
962
982
|
});
|
|
963
983
|
/**
|
|
964
984
|
* Dropdown arrow icon
|
|
965
|
-
* Size: 24px
|
|
985
|
+
* Size: 24px, color: #13131B
|
|
966
986
|
*/
|
|
967
987
|
const DropdownIcon = styles.styled(ArrowDropDownIcon)({
|
|
968
988
|
width: '24px',
|
|
969
989
|
height: '24px',
|
|
970
|
-
color:
|
|
990
|
+
color: designColors.natural.dim100,
|
|
971
991
|
});
|
|
972
992
|
/**
|
|
973
993
|
* Right section containing login button
|
|
@@ -980,30 +1000,28 @@ const RightSection = styles.styled(material.Box)({
|
|
|
980
1000
|
/**
|
|
981
1001
|
* Login button (text style)
|
|
982
1002
|
* Based on Figma: Style=Text, State=enabled, Show Icon=False
|
|
1003
|
+
* Color: #0090da (primary blue/teal)
|
|
983
1004
|
*/
|
|
984
|
-
const LoginButton = styles.styled(material.Button)(({ theme }) => {
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1005
|
+
const LoginButton = styles.styled(material.Button)(({ theme }) => ({
|
|
1006
|
+
display: 'flex',
|
|
1007
|
+
alignItems: 'center',
|
|
1008
|
+
padding: '0 10px',
|
|
1009
|
+
height: '100%',
|
|
1010
|
+
minWidth: 'auto',
|
|
1011
|
+
textTransform: 'none',
|
|
1012
|
+
color: designColors.primary.main60,
|
|
1013
|
+
fontFamily: '"MetLifeCircular", "Montserrat", "Roboto", "Helvetica", "Arial", sans-serif',
|
|
1014
|
+
fontWeight: 700,
|
|
1015
|
+
fontSize: '18px',
|
|
1016
|
+
lineHeight: '24px',
|
|
1017
|
+
letterSpacing: '0px',
|
|
1018
|
+
borderRadius: 0,
|
|
1019
|
+
backgroundColor: 'transparent',
|
|
1020
|
+
'&:hover': {
|
|
1000
1021
|
backgroundColor: 'transparent',
|
|
1001
|
-
'
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
},
|
|
1005
|
-
});
|
|
1006
|
-
});
|
|
1022
|
+
textDecoration: 'underline',
|
|
1023
|
+
},
|
|
1024
|
+
}));
|
|
1007
1025
|
/**
|
|
1008
1026
|
* Dropdown menu container
|
|
1009
1027
|
*/
|
|
@@ -1023,11 +1041,11 @@ const StyledMenuItem$1 = styles.styled(material.MenuItem)(({ theme }) => ({
|
|
|
1023
1041
|
alignItems: 'center',
|
|
1024
1042
|
gap: '12px',
|
|
1025
1043
|
padding: '16px 20px',
|
|
1026
|
-
fontFamily: '"Montserrat", "
|
|
1044
|
+
fontFamily: '"MetLifeCircular", "Montserrat", "Roboto", "Helvetica", "Arial", sans-serif',
|
|
1027
1045
|
fontWeight: 500,
|
|
1028
1046
|
fontSize: '16px',
|
|
1029
1047
|
lineHeight: '24px',
|
|
1030
|
-
color:
|
|
1048
|
+
color: designColors.natural.dim100,
|
|
1031
1049
|
'&:hover': {
|
|
1032
1050
|
backgroundColor: 'rgba(0, 144, 218, 0.08)',
|
|
1033
1051
|
},
|
|
@@ -1092,15 +1110,15 @@ function DesktopHeaderMenuBar({ logo, logoAlt = 'Logo', menuItems, showLoginButt
|
|
|
1092
1110
|
e.preventDefault();
|
|
1093
1111
|
onLogoClick === null || onLogoClick === void 0 ? void 0 : onLogoClick();
|
|
1094
1112
|
};
|
|
1095
|
-
return (jsxRuntime.jsx(StyledAppBar$2, Object.assign({ className: className }, { children: jsxRuntime.jsxs(HeaderContainer$1, { children: [jsxRuntime.jsxs(LeftSection, { children: [jsxRuntime.jsx(LogoContainer$2, Object.assign({ onClick: handleLogoClick }, { children: jsxRuntime.jsx(LogoImage$1, { src: logo, alt: logoAlt }) })),
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1113
|
+
return (jsxRuntime.jsx(StyledAppBar$2, Object.assign({ className: className }, { children: jsxRuntime.jsxs(HeaderContainer$1, { children: [jsxRuntime.jsxs(LeftSection, { children: [jsxRuntime.jsx(LogoContainer$2, Object.assign({ onClick: handleLogoClick }, { children: jsxRuntime.jsx(LogoImage$1, { src: logo, alt: logoAlt }) })), menuItems.map((item) => (jsxRuntime.jsxs(React__namespace.Fragment, { children: [jsxRuntime.jsxs(MenuItemButton, Object.assign({ onClick: (e) => handleMenuClick(e, item), "aria-haspopup": item.hasDropdown ? 'true' : undefined, "aria-expanded": item.hasDropdown ? openMenuKey === item.key : undefined, "data-testid": `menu-item-${item.key}` }, { children: [jsxRuntime.jsx(MenuItemText, { children: formatMessage({ id: item.label }) }), item.hasDropdown && jsxRuntime.jsx(DropdownIcon, {})] })), item.hasDropdown && item.subItems && (jsxRuntime.jsx(StyledMenu$1, Object.assign({ id: `menu-${item.key}`, anchorEl: anchorEl, open: openMenuKey === item.key, onClose: handleCloseMenu, anchorOrigin: {
|
|
1114
|
+
vertical: 'bottom',
|
|
1115
|
+
horizontal: 'left',
|
|
1116
|
+
}, transformOrigin: {
|
|
1117
|
+
vertical: 'top',
|
|
1118
|
+
horizontal: 'left',
|
|
1119
|
+
}, MenuListProps: {
|
|
1120
|
+
'aria-labelledby': `menu-button-${item.key}`,
|
|
1121
|
+
} }, { 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)))] }), jsxRuntime.jsx(RightSection, { children: showLoginButton && (jsxRuntime.jsx(LoginButton, Object.assign({ onClick: onLoginClick, "data-testid": "header-login-button" }, { children: formatMessage({ id: loginButtonText }) }))) })] }) })));
|
|
1104
1122
|
}
|
|
1105
1123
|
|
|
1106
1124
|
const StyledAppBar$1 = styles.styled(AppBar)(({ theme, ispartnershippagemobileview, scrolled }) => {
|
|
@@ -1994,14 +2012,16 @@ const CategoryIcon = styles.styled(material.Box)(({ theme }) => ({
|
|
|
1994
2012
|
justifyContent: 'center',
|
|
1995
2013
|
}));
|
|
1996
2014
|
const TitleText = styles.styled(material.Typography)(({ theme }) => ({
|
|
1997
|
-
fontFamily: '"Montserrat", sans-serif',
|
|
1998
2015
|
fontWeight: 700,
|
|
1999
|
-
fontSize: '
|
|
2016
|
+
fontSize: '28px',
|
|
2000
2017
|
lineHeight: '28px',
|
|
2001
2018
|
color: '#13131B',
|
|
2019
|
+
[theme.breakpoints.down('md')]: {
|
|
2020
|
+
fontSize: '20px',
|
|
2021
|
+
lineHeight: '24px',
|
|
2022
|
+
},
|
|
2002
2023
|
}));
|
|
2003
2024
|
const SubtitleText = styles.styled(material.Typography)(({ theme }) => ({
|
|
2004
|
-
fontFamily: '"Montserrat", sans-serif',
|
|
2005
2025
|
fontWeight: 400,
|
|
2006
2026
|
fontSize: '14px',
|
|
2007
2027
|
lineHeight: '18px',
|
|
@@ -2019,7 +2039,6 @@ const PrimaryButton = styles.styled(material.Button)(({ theme }) => ({
|
|
|
2019
2039
|
borderRadius: '24px',
|
|
2020
2040
|
height: '48px',
|
|
2021
2041
|
textTransform: 'none',
|
|
2022
|
-
fontFamily: '"Montserrat", sans-serif',
|
|
2023
2042
|
fontWeight: 500,
|
|
2024
2043
|
fontSize: '14px',
|
|
2025
2044
|
lineHeight: '18px',
|
|
@@ -2032,7 +2051,6 @@ const SecondaryButton = styles.styled(material.Button)(({ theme }) => ({
|
|
|
2032
2051
|
borderRadius: '8px',
|
|
2033
2052
|
height: '40px',
|
|
2034
2053
|
textTransform: 'none',
|
|
2035
|
-
fontFamily: '"Montserrat", sans-serif',
|
|
2036
2054
|
fontWeight: 500,
|
|
2037
2055
|
fontSize: '14px',
|
|
2038
2056
|
lineHeight: '18px',
|
|
@@ -2251,24 +2269,34 @@ const QuestionHeader = styles.styled(material.Box)(({ theme }) => ({
|
|
|
2251
2269
|
width: '100%',
|
|
2252
2270
|
}));
|
|
2253
2271
|
const QuestionTitle = styles.styled(material.Typography)(({ theme }) => ({
|
|
2254
|
-
fontFamily: '"Montserrat", sans-serif',
|
|
2255
2272
|
fontWeight: 700,
|
|
2256
|
-
fontSize: '
|
|
2257
|
-
lineHeight: '
|
|
2273
|
+
fontSize: '18px',
|
|
2274
|
+
lineHeight: '24px',
|
|
2258
2275
|
color: '#13131B',
|
|
2276
|
+
[theme.breakpoints.down('md')]: {
|
|
2277
|
+
fontSize: '14px',
|
|
2278
|
+
lineHeight: '20px',
|
|
2279
|
+
},
|
|
2259
2280
|
}));
|
|
2260
2281
|
const QuestionSubtext = styles.styled(material.Typography)(({ theme }) => ({
|
|
2261
|
-
fontFamily: '"Montserrat", sans-serif',
|
|
2262
2282
|
fontWeight: 400,
|
|
2263
|
-
fontSize: '
|
|
2264
|
-
lineHeight: '
|
|
2283
|
+
fontSize: '16px',
|
|
2284
|
+
lineHeight: '20px',
|
|
2265
2285
|
color: '#5F5E62',
|
|
2286
|
+
[theme.breakpoints.down('md')]: {
|
|
2287
|
+
fontSize: '12px',
|
|
2288
|
+
lineHeight: '14px',
|
|
2289
|
+
},
|
|
2266
2290
|
}));
|
|
2267
2291
|
const OptionsContainer$1 = styles.styled(material.Box)(({ theme }) => ({
|
|
2268
2292
|
display: 'flex',
|
|
2269
|
-
flexDirection: '
|
|
2293
|
+
flexDirection: 'row',
|
|
2294
|
+
flexWrap: 'wrap',
|
|
2270
2295
|
gap: '8px',
|
|
2271
2296
|
width: '100%',
|
|
2297
|
+
[theme.breakpoints.down('md')]: {
|
|
2298
|
+
flexDirection: 'column',
|
|
2299
|
+
},
|
|
2272
2300
|
}));
|
|
2273
2301
|
|
|
2274
2302
|
/**
|
|
@@ -2322,7 +2350,9 @@ const variantColors = {
|
|
|
2322
2350
|
hoverBorder: '#5f5e62',
|
|
2323
2351
|
},
|
|
2324
2352
|
};
|
|
2325
|
-
const StyledOptionButton = styles.styled(material.ButtonBase
|
|
2353
|
+
const StyledOptionButton = styles.styled(material.ButtonBase, {
|
|
2354
|
+
shouldForwardProp: (prop) => prop !== 'colorVariant',
|
|
2355
|
+
})(({ theme, selected, size = 'medium', fullWidth, colorVariant = 'default' }) => {
|
|
2326
2356
|
const heights = {
|
|
2327
2357
|
small: '32px',
|
|
2328
2358
|
medium: '40px',
|
|
@@ -2331,6 +2361,7 @@ const StyledOptionButton = styles.styled(material.ButtonBase)(({ selected, size
|
|
|
2331
2361
|
const colors = variantColors[colorVariant];
|
|
2332
2362
|
return {
|
|
2333
2363
|
height: heights[size],
|
|
2364
|
+
// On desktop: auto width (inline), on mobile: full width
|
|
2334
2365
|
width: fullWidth ? '100%' : 'auto',
|
|
2335
2366
|
borderRadius: '24px',
|
|
2336
2367
|
border: selected
|
|
@@ -2353,6 +2384,10 @@ const StyledOptionButton = styles.styled(material.ButtonBase)(({ selected, size
|
|
|
2353
2384
|
cursor: 'not-allowed',
|
|
2354
2385
|
opacity: 0.6,
|
|
2355
2386
|
},
|
|
2387
|
+
// Mobile: always full width
|
|
2388
|
+
[theme.breakpoints.down('md')]: {
|
|
2389
|
+
width: '100%',
|
|
2390
|
+
},
|
|
2356
2391
|
};
|
|
2357
2392
|
});
|
|
2358
2393
|
const OptionContent = styles.styled(material.Box)(() => ({
|
|
@@ -2367,14 +2402,18 @@ const OptionIcon = styles.styled('span')(() => ({
|
|
|
2367
2402
|
lineHeight: 1,
|
|
2368
2403
|
flexShrink: 0,
|
|
2369
2404
|
}));
|
|
2370
|
-
const OptionLabel = styles.styled(material.Typography)(({ selected, colorVariant = 'default' }) => {
|
|
2405
|
+
const OptionLabel = styles.styled(material.Typography)(({ theme, selected, colorVariant = 'default' }) => {
|
|
2371
2406
|
const colors = variantColors[colorVariant];
|
|
2372
2407
|
return {
|
|
2373
|
-
fontWeight: selected ?
|
|
2408
|
+
fontWeight: selected ? 700 : 500,
|
|
2374
2409
|
fontSize: '16px',
|
|
2375
|
-
lineHeight: '
|
|
2410
|
+
lineHeight: '24px',
|
|
2376
2411
|
color: selected ? '#0090DA' : colors.unselectedText,
|
|
2377
2412
|
textAlign: 'center',
|
|
2413
|
+
[theme.breakpoints.down('md')]: {
|
|
2414
|
+
lineHeight: '20px',
|
|
2415
|
+
fontWeight: 500,
|
|
2416
|
+
},
|
|
2378
2417
|
};
|
|
2379
2418
|
});
|
|
2380
2419
|
|
|
@@ -2401,7 +2440,7 @@ const OptionLabel = styles.styled(material.Typography)(({ selected, colorVariant
|
|
|
2401
2440
|
* />
|
|
2402
2441
|
* ```
|
|
2403
2442
|
*/
|
|
2404
|
-
function OptionButton({ value, label, icon, selected = false, disabled = false, onClick, size = 'medium', fullWidth =
|
|
2443
|
+
function OptionButton({ value, label, icon, selected = false, disabled = false, onClick, size = 'medium', fullWidth = false, variant = 'default', formatMessage = (descriptor) => descriptor.id, }) {
|
|
2405
2444
|
const handleClick = () => {
|
|
2406
2445
|
if (!disabled && onClick) {
|
|
2407
2446
|
onClick(value);
|
|
@@ -2591,8 +2630,7 @@ const ToggleButton = styles.styled(material.Box)(({ theme, active }) => {
|
|
|
2591
2630
|
const ToggleText = styles.styled(material.Typography)(({ theme }) => {
|
|
2592
2631
|
var _a, _b, _c, _d, _e, _f;
|
|
2593
2632
|
return ({
|
|
2594
|
-
fontFamily: (
|
|
2595
|
-
"'Montserrat', sans-serif",
|
|
2633
|
+
fontFamily: (_a = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _a === void 0 ? void 0 : _a.fontFamily,
|
|
2596
2634
|
fontSize: ((_c = (_b = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _b === void 0 ? void 0 : _b.bodyMedium) === null || _c === void 0 ? void 0 : _c.fontSize) || '14px',
|
|
2597
2635
|
fontWeight: ((_d = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _d === void 0 ? void 0 : _d.fontWeightSemiBold) || 600,
|
|
2598
2636
|
lineHeight: ((_f = (_e = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _e === void 0 ? void 0 : _e.bodyMedium) === null || _f === void 0 ? void 0 : _f.lineHeight) || '20px',
|
|
@@ -2671,23 +2709,30 @@ const CalloutIcon = styles.styled(InfoIcon)(({ theme }) => {
|
|
|
2671
2709
|
const CalloutTitle = styles.styled(material.Typography)(({ theme }) => {
|
|
2672
2710
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2673
2711
|
return ({
|
|
2674
|
-
fontFamily: (
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
fontWeight: ((_d = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _d === void 0 ? void 0 : _d.fontWeightSemiBold) || 600,
|
|
2712
|
+
fontFamily: (_a = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _a === void 0 ? void 0 : _a.fontFamily,
|
|
2713
|
+
fontSize: ((_c = (_b = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _b === void 0 ? void 0 : _b.bodyMedium) === null || _c === void 0 ? void 0 : _c.fontSize) || '16px',
|
|
2714
|
+
fontWeight: ((_d = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _d === void 0 ? void 0 : _d.fontWeightSemiBold) || 700,
|
|
2678
2715
|
lineHeight: ((_f = (_e = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _e === void 0 ? void 0 : _e.bodyMedium) === null || _f === void 0 ? void 0 : _f.lineHeight) || '20px',
|
|
2679
2716
|
color: ((_h = (_g = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _g === void 0 ? void 0 : _g.natural) === null || _h === void 0 ? void 0 : _h.dim) || '#13131b',
|
|
2717
|
+
[theme.breakpoints.down('md')]: {
|
|
2718
|
+
fontSize: '14px',
|
|
2719
|
+
lineHeight: '20px',
|
|
2720
|
+
},
|
|
2680
2721
|
});
|
|
2681
2722
|
});
|
|
2682
2723
|
const CalloutText = styles.styled(material.Typography)(({ theme }) => {
|
|
2683
2724
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2684
2725
|
return ({
|
|
2685
2726
|
fontFamily: ((_a = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _a === void 0 ? void 0 : _a.fontFamily) ||
|
|
2686
|
-
|
|
2687
|
-
fontSize: ((_c = (_b = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _b === void 0 ? void 0 : _b.bodySmall) === null || _c === void 0 ? void 0 : _c.fontSize) || '
|
|
2727
|
+
'',
|
|
2728
|
+
fontSize: ((_c = (_b = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _b === void 0 ? void 0 : _b.bodySmall) === null || _c === void 0 ? void 0 : _c.fontSize) || '14px',
|
|
2688
2729
|
fontWeight: ((_e = (_d = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _d === void 0 ? void 0 : _d.bodySmall) === null || _e === void 0 ? void 0 : _e.fontWeight) || 400,
|
|
2689
2730
|
lineHeight: ((_g = (_f = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _f === void 0 ? void 0 : _f.bodySmall) === null || _g === void 0 ? void 0 : _g.lineHeight) || '16px',
|
|
2690
2731
|
color: ((_j = (_h = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _h === void 0 ? void 0 : _h.natural) === null || _j === void 0 ? void 0 : _j.dark) || '#5f5e62',
|
|
2732
|
+
[theme.breakpoints.down('md')]: {
|
|
2733
|
+
fontSize: '12px',
|
|
2734
|
+
lineHeight: '14px',
|
|
2735
|
+
},
|
|
2691
2736
|
});
|
|
2692
2737
|
});
|
|
2693
2738
|
|
|
@@ -2741,7 +2786,7 @@ const InputLabel = styles.styled(material.Typography)(({ theme }) => {
|
|
|
2741
2786
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2742
2787
|
return ({
|
|
2743
2788
|
fontFamily: ((_a = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _a === void 0 ? void 0 : _a.fontFamily) ||
|
|
2744
|
-
|
|
2789
|
+
'',
|
|
2745
2790
|
fontSize: ((_c = (_b = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _b === void 0 ? void 0 : _b.bodySmall) === null || _c === void 0 ? void 0 : _c.fontSize) || '12px',
|
|
2746
2791
|
fontWeight: ((_e = (_d = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _d === void 0 ? void 0 : _d.bodySmall) === null || _e === void 0 ? void 0 : _e.fontWeight) || 400,
|
|
2747
2792
|
lineHeight: ((_g = (_f = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _f === void 0 ? void 0 : _f.bodySmall) === null || _g === void 0 ? void 0 : _g.lineHeight) || '16px',
|
|
@@ -2768,7 +2813,7 @@ const InputValue = styles.styled(material.Typography)(({ theme }) => {
|
|
|
2768
2813
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2769
2814
|
return ({
|
|
2770
2815
|
fontFamily: ((_a = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _a === void 0 ? void 0 : _a.fontFamily) ||
|
|
2771
|
-
|
|
2816
|
+
'',
|
|
2772
2817
|
fontSize: ((_c = (_b = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _b === void 0 ? void 0 : _b.bodyMedium) === null || _c === void 0 ? void 0 : _c.fontSize) || '14px',
|
|
2773
2818
|
fontWeight: ((_e = (_d = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _d === void 0 ? void 0 : _d.bodyMedium) === null || _e === void 0 ? void 0 : _e.fontWeight) || 400,
|
|
2774
2819
|
lineHeight: ((_g = (_f = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _f === void 0 ? void 0 : _f.bodyMedium) === null || _g === void 0 ? void 0 : _g.lineHeight) || '18px',
|
|
@@ -2856,7 +2901,7 @@ const RangeLabel = styles.styled(material.Typography)(({ theme }) => {
|
|
|
2856
2901
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2857
2902
|
return ({
|
|
2858
2903
|
fontFamily: ((_a = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _a === void 0 ? void 0 : _a.fontFamily) ||
|
|
2859
|
-
|
|
2904
|
+
'',
|
|
2860
2905
|
fontSize: ((_c = (_b = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _b === void 0 ? void 0 : _b.smallText) === null || _c === void 0 ? void 0 : _c.fontSize) || '8px',
|
|
2861
2906
|
fontWeight: ((_e = (_d = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _d === void 0 ? void 0 : _d.smallText) === null || _e === void 0 ? void 0 : _e.fontWeight) || 500,
|
|
2862
2907
|
lineHeight: ((_g = (_f = theme === null || theme === void 0 ? void 0 : theme.typography) === null || _f === void 0 ? void 0 : _f.smallText) === null || _g === void 0 ? void 0 : _g.lineHeight) || '16px',
|
|
@@ -3071,7 +3116,6 @@ const ProgressFill = styles.styled(material.Box)(({ width, progressBarTheme }) =
|
|
|
3071
3116
|
transition: 'width 0.3s ease',
|
|
3072
3117
|
}));
|
|
3073
3118
|
const ProgressText = styles.styled(material.Typography)({
|
|
3074
|
-
fontFamily: 'Montserrat',
|
|
3075
3119
|
fontSize: '12px',
|
|
3076
3120
|
color: '#5F5E62',
|
|
3077
3121
|
fontWeight: 400,
|
|
@@ -3114,14 +3158,12 @@ const ProductInfo = styles.styled(material.Box)({
|
|
|
3114
3158
|
marginLeft: '4px',
|
|
3115
3159
|
});
|
|
3116
3160
|
const ProductName = styles.styled(material.Typography)({
|
|
3117
|
-
fontFamily: 'Montserrat',
|
|
3118
3161
|
fontSize: '14px',
|
|
3119
3162
|
fontWeight: 600,
|
|
3120
3163
|
color: '#13131B',
|
|
3121
3164
|
lineHeight: '20px',
|
|
3122
3165
|
});
|
|
3123
3166
|
const PlanName = styles.styled(material.Typography)({
|
|
3124
|
-
fontFamily: 'Montserrat',
|
|
3125
3167
|
fontSize: '12px',
|
|
3126
3168
|
fontWeight: 400,
|
|
3127
3169
|
color: '#13131B',
|
|
@@ -3133,14 +3175,12 @@ const PriceContainer = styles.styled(material.Box)({
|
|
|
3133
3175
|
gap: '2px',
|
|
3134
3176
|
});
|
|
3135
3177
|
const Price = styles.styled(material.Typography)({
|
|
3136
|
-
fontFamily: 'Montserrat',
|
|
3137
3178
|
fontSize: '14px',
|
|
3138
3179
|
fontWeight: 600,
|
|
3139
3180
|
color: '#13131B',
|
|
3140
3181
|
lineHeight: '20px',
|
|
3141
3182
|
});
|
|
3142
3183
|
const PricePeriod = styles.styled(material.Typography)({
|
|
3143
|
-
fontFamily: 'Montserrat',
|
|
3144
3184
|
fontSize: '12px',
|
|
3145
3185
|
fontWeight: 400,
|
|
3146
3186
|
color: '#13131B',
|
|
@@ -3160,7 +3200,6 @@ const SectionHeader = styles.styled(material.Box)({
|
|
|
3160
3200
|
padding: '0 16px 24px',
|
|
3161
3201
|
});
|
|
3162
3202
|
const SectionTitle$2 = styles.styled(material.Typography)({
|
|
3163
|
-
fontFamily: 'Montserrat',
|
|
3164
3203
|
fontSize: '20px',
|
|
3165
3204
|
fontWeight: 700,
|
|
3166
3205
|
color: '#13131B',
|
|
@@ -3168,7 +3207,6 @@ const SectionTitle$2 = styles.styled(material.Typography)({
|
|
|
3168
3207
|
marginBottom: '8px',
|
|
3169
3208
|
});
|
|
3170
3209
|
const SectionDescription = styles.styled(material.Typography)({
|
|
3171
|
-
fontFamily: 'Montserrat',
|
|
3172
3210
|
fontSize: '14px',
|
|
3173
3211
|
fontWeight: 400,
|
|
3174
3212
|
color: '#5F5E62',
|
|
@@ -3211,7 +3249,6 @@ const StyledButton = styles.styled('button')(({ isDisabled, desktopWidth }) => (
|
|
|
3211
3249
|
? '#E1E2EB'
|
|
3212
3250
|
: '#0090DA',
|
|
3213
3251
|
color: isDisabled ? '#929094' : '#fff',
|
|
3214
|
-
fontFamily: 'Montserrat',
|
|
3215
3252
|
fontSize: '14px',
|
|
3216
3253
|
fontWeight: 500,
|
|
3217
3254
|
lineHeight: '18px',
|
|
@@ -3267,7 +3304,6 @@ styles.styled(material.Box)(({ selected }) => ({
|
|
|
3267
3304
|
},
|
|
3268
3305
|
}));
|
|
3269
3306
|
styles.styled(material.Typography)(({ selected }) => ({
|
|
3270
|
-
fontFamily: 'Montserrat',
|
|
3271
3307
|
fontSize: '14px',
|
|
3272
3308
|
fontWeight: 600,
|
|
3273
3309
|
color: selected ? '#13131B' : '#5F5E62',
|
|
@@ -3315,7 +3351,7 @@ const FieldsGridContainer$2 = styles.styled(material.Box)({
|
|
|
3315
3351
|
/**
|
|
3316
3352
|
* Full width field - spans both columns on desktop grid
|
|
3317
3353
|
*/
|
|
3318
|
-
const FullWidthField$
|
|
3354
|
+
const FullWidthField$1 = styles.styled(material.Box)({
|
|
3319
3355
|
'@media (min-width: 900px)': {
|
|
3320
3356
|
gridColumn: '1 / -1',
|
|
3321
3357
|
},
|
|
@@ -3331,7 +3367,6 @@ const CheckboxContainer$1 = styles.styled(material.Box)({
|
|
|
3331
3367
|
},
|
|
3332
3368
|
});
|
|
3333
3369
|
const CheckboxLabel$1 = styles.styled(material.Typography)({
|
|
3334
|
-
fontFamily: 'Montserrat',
|
|
3335
3370
|
fontSize: '14px',
|
|
3336
3371
|
fontWeight: 400,
|
|
3337
3372
|
color: '#5F5E62',
|
|
@@ -3352,8 +3387,7 @@ const PersonalInformationForm = ({ renderField, fields, consents, onSubmit, form
|
|
|
3352
3387
|
ml: 2,
|
|
3353
3388
|
color: '#5F5E62',
|
|
3354
3389
|
fontSize: '12px',
|
|
3355
|
-
|
|
3356
|
-
} }, { 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$2, { 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 ||
|
|
3390
|
+
} }, { 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 ||
|
|
3357
3391
|
defaultBankConfirmationLabel }) }), consents.bank_account_confirmation.error && (jsxRuntime.jsx(material.Typography, Object.assign({ sx: {
|
|
3358
3392
|
color: 'error.main',
|
|
3359
3393
|
fontSize: '12px',
|
|
@@ -3365,7 +3399,7 @@ const PersonalInformationForm = ({ renderField, fields, consents, onSubmit, form
|
|
|
3365
3399
|
fontSize: '12px',
|
|
3366
3400
|
mt: 0.5,
|
|
3367
3401
|
ml: 4,
|
|
3368
|
-
} }, { children: consents.bank_account_confirmation.error })))] })), desktopGridLayout ? (jsxRuntime.jsx(FullWidthField$
|
|
3402
|
+
} }, { children: consents.bank_account_confirmation.error })))] })), desktopGridLayout ? (jsxRuntime.jsx(FullWidthField$1, { children: jsxRuntime.jsx(CheckboxContainer$1, { children: jsxRuntime.jsx(material.FormControlLabel, { control: jsxRuntime.jsx(material.Checkbox, { checked: consents.marketing_consent.checked, onChange: (e) => consents.marketing_consent.onChange(e.target.checked), name: "marketing_consent" }), label: jsxRuntime.jsx(CheckboxLabel$1, { children: consents.marketing_consent.label || defaultMarketingLabel }) }) }) })) : (jsxRuntime.jsx(CheckboxContainer$1, { children: jsxRuntime.jsx(material.FormControlLabel, { control: jsxRuntime.jsx(material.Checkbox, { checked: consents.marketing_consent.checked, onChange: (e) => consents.marketing_consent.onChange(e.target.checked), name: "marketing_consent" }), label: jsxRuntime.jsx(CheckboxLabel$1, { children: consents.marketing_consent.label || defaultMarketingLabel }) }) }))] })) })));
|
|
3369
3403
|
};
|
|
3370
3404
|
|
|
3371
3405
|
const FormContainer$2 = styles.styled(material.Box)({
|
|
@@ -3401,7 +3435,7 @@ const FieldsGridContainer$1 = styles.styled(material.Box)({
|
|
|
3401
3435
|
/**
|
|
3402
3436
|
* Full width field - spans both columns on desktop grid
|
|
3403
3437
|
*/
|
|
3404
|
-
const FullWidthField
|
|
3438
|
+
const FullWidthField = styles.styled(material.Box)({
|
|
3405
3439
|
'@media (min-width: 900px)': {
|
|
3406
3440
|
gridColumn: '1 / -1',
|
|
3407
3441
|
},
|
|
@@ -3420,14 +3454,12 @@ const CheckboxContainer = styles.styled(material.Box)({
|
|
|
3420
3454
|
},
|
|
3421
3455
|
});
|
|
3422
3456
|
const CheckboxLabel = styles.styled(material.Typography)({
|
|
3423
|
-
fontFamily: 'Montserrat',
|
|
3424
3457
|
fontSize: '14px',
|
|
3425
3458
|
fontWeight: 400,
|
|
3426
3459
|
color: '#5F5E62',
|
|
3427
3460
|
lineHeight: '18px',
|
|
3428
3461
|
});
|
|
3429
3462
|
const SectionTitle$1 = styles.styled(material.Typography)({
|
|
3430
|
-
fontFamily: 'Montserrat',
|
|
3431
3463
|
fontSize: '16px',
|
|
3432
3464
|
fontWeight: 600,
|
|
3433
3465
|
color: '#13131B',
|
|
@@ -3440,7 +3472,7 @@ const ContactDetailsForm = ({ renderField, fields, mailingFields, mailingAddress
|
|
|
3440
3472
|
// Helper to render field with or without full width wrapper
|
|
3441
3473
|
const renderFieldWithLayout = (field, fullWidth = false) => {
|
|
3442
3474
|
if (desktopGridLayout && fullWidth) {
|
|
3443
|
-
return jsxRuntime.jsx(FullWidthField
|
|
3475
|
+
return jsxRuntime.jsx(FullWidthField, { children: renderField(field) });
|
|
3444
3476
|
}
|
|
3445
3477
|
return renderField(field);
|
|
3446
3478
|
};
|
|
@@ -3451,14 +3483,13 @@ const ContactDetailsForm = ({ renderField, fields, mailingFields, mailingAddress
|
|
|
3451
3483
|
mt: 0.5,
|
|
3452
3484
|
color: '#5F5E62',
|
|
3453
3485
|
fontSize: '12px',
|
|
3454
|
-
fontFamily: 'Montserrat',
|
|
3455
3486
|
} }, { children: field.helperText })))] }));
|
|
3456
3487
|
if (desktopGridLayout && fullWidth) {
|
|
3457
|
-
return jsxRuntime.jsx(FullWidthField
|
|
3488
|
+
return jsxRuntime.jsx(FullWidthField, { children: content });
|
|
3458
3489
|
}
|
|
3459
3490
|
return content;
|
|
3460
3491
|
};
|
|
3461
|
-
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
|
|
3492
|
+
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)' } }) }), (mailingAddressSame === null || mailingAddressSame === void 0 ? void 0 : mailingAddressSame.checked) && mailingFields && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(FullWidthField, { children: jsxRuntime.jsx(SectionTitle$1, { children: "Mailing address" }) }), renderFieldWithHelperText(mailingFields.mailing_address_line1, false), renderFieldWithHelperText(mailingFields.mailing_address_line2, false), renderField(mailingFields.mailing_postal_code), renderField(mailingFields.mailing_city), renderField(mailingFields.mailing_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: {
|
|
3462
3493
|
color: '#929094',
|
|
3463
3494
|
'&.Mui-checked': {
|
|
3464
3495
|
color: '#317abc',
|
|
@@ -3469,31 +3500,26 @@ const ContactDetailsForm = ({ renderField, fields, mailingFields, mailingAddress
|
|
|
3469
3500
|
ml: 2,
|
|
3470
3501
|
color: '#5F5E62',
|
|
3471
3502
|
fontSize: '12px',
|
|
3472
|
-
fontFamily: 'Montserrat',
|
|
3473
3503
|
} }, { 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: {
|
|
3474
3504
|
display: 'block',
|
|
3475
3505
|
mt: 0.5,
|
|
3476
3506
|
color: '#5F5E62',
|
|
3477
3507
|
fontSize: '12px',
|
|
3478
|
-
fontFamily: 'Montserrat',
|
|
3479
3508
|
} }, { children: fields.residential_address_line1.helperText })))] }), jsxRuntime.jsxs(material.Box, { children: [renderField(fields.residential_address_line2), fields.residential_address_line2.helperText && (jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: {
|
|
3480
3509
|
display: 'block',
|
|
3481
3510
|
mt: 0.5,
|
|
3482
3511
|
color: '#5F5E62',
|
|
3483
3512
|
fontSize: '12px',
|
|
3484
|
-
fontFamily: 'Montserrat',
|
|
3485
3513
|
} }, { children: fields.residential_address_line2.helperText })))] }), renderField(fields.postal_code), renderField(fields.city), renderField(fields.state), jsxRuntime.jsx(material.Divider, { sx: { borderColor: 'rgba(0,0,0,0.1)' } }), (mailingAddressSame === null || mailingAddressSame === void 0 ? void 0 : mailingAddressSame.checked) && mailingFields && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionTitle$1, { children: "Mailing address" }), jsxRuntime.jsxs(material.Box, { children: [renderField(mailingFields.mailing_address_line1), mailingFields.mailing_address_line1.helperText && (jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: {
|
|
3486
3514
|
display: 'block',
|
|
3487
3515
|
mt: 0.5,
|
|
3488
3516
|
color: '#5F5E62',
|
|
3489
3517
|
fontSize: '12px',
|
|
3490
|
-
fontFamily: 'Montserrat',
|
|
3491
3518
|
} }, { children: mailingFields.mailing_address_line1.helperText })))] }), jsxRuntime.jsxs(material.Box, { children: [renderField(mailingFields.mailing_address_line2), mailingFields.mailing_address_line2.helperText && (jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: {
|
|
3492
3519
|
display: 'block',
|
|
3493
3520
|
mt: 0.5,
|
|
3494
3521
|
color: '#5F5E62',
|
|
3495
3522
|
fontSize: '12px',
|
|
3496
|
-
fontFamily: 'Montserrat',
|
|
3497
3523
|
} }, { 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: {
|
|
3498
3524
|
color: '#929094',
|
|
3499
3525
|
'&.Mui-checked': {
|
|
@@ -3568,7 +3594,7 @@ const FieldsGridContainer = styles.styled(material.Box)({
|
|
|
3568
3594
|
/**
|
|
3569
3595
|
* Full width field - spans both columns on desktop grid
|
|
3570
3596
|
*/
|
|
3571
|
-
|
|
3597
|
+
styles.styled(material.Box)({
|
|
3572
3598
|
'@media (min-width: 900px)': {
|
|
3573
3599
|
gridColumn: '1 / -1',
|
|
3574
3600
|
},
|
|
@@ -3578,14 +3604,13 @@ const ChildInformationForm = ({ renderField, fields, onSubmit, formRef, sx, desk
|
|
|
3578
3604
|
const Container = desktopGridLayout ? DesktopFormContainer : FormContainer;
|
|
3579
3605
|
// Desktop layout with 2-column grid
|
|
3580
3606
|
if (desktopGridLayout) {
|
|
3581
|
-
return (jsxRuntime.jsx(Container, Object.assign({ ref: formRef, component: "form", onSubmit: onSubmit, sx: sx }, { children: jsxRuntime.jsxs(FieldsGridContainer, { children: [jsxRuntime.jsxs(
|
|
3607
|
+
return (jsxRuntime.jsx(Container, Object.assign({ ref: formRef, component: "form", onSubmit: onSubmit, sx: sx }, { children: jsxRuntime.jsxs(FieldsGridContainer, { children: [jsxRuntime.jsxs(material.Box, { children: [renderField(fields.full_name), fields.full_name.helperText && (jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: {
|
|
3582
3608
|
display: 'block',
|
|
3583
3609
|
mt: 0.5,
|
|
3584
3610
|
ml: 2,
|
|
3585
3611
|
color: '#5F5E62',
|
|
3586
3612
|
fontSize: '12px',
|
|
3587
|
-
|
|
3588
|
-
} }, { children: fields.full_name.helperText })))] }), fields.nric && (jsxRuntime.jsx(FullWidthField, { children: renderField(fields.nric) })), renderField(fields.date_of_birth), renderField(fields.gender), renderField(fields.nationality)] }) })));
|
|
3613
|
+
} }, { 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)] }) })));
|
|
3589
3614
|
}
|
|
3590
3615
|
// Mobile layout - single column
|
|
3591
3616
|
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: [jsxRuntime.jsxs(material.Box, { children: [renderField(fields.full_name), fields.full_name.helperText && (jsxRuntime.jsx(material.Box, Object.assign({ component: "span", sx: {
|
|
@@ -3594,7 +3619,6 @@ const ChildInformationForm = ({ renderField, fields, onSubmit, formRef, sx, desk
|
|
|
3594
3619
|
ml: 2,
|
|
3595
3620
|
color: '#5F5E62',
|
|
3596
3621
|
fontSize: '12px',
|
|
3597
|
-
fontFamily: 'Montserrat',
|
|
3598
3622
|
} }, { children: fields.full_name.helperText })))] }), fields.nric && renderField(fields.nric), renderField(fields.date_of_birth), renderField(fields.gender), renderField(fields.nationality)] })) })));
|
|
3599
3623
|
};
|
|
3600
3624
|
|