igloo-d2c-components 1.0.24 → 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
CHANGED
|
@@ -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)
|
|
861
|
+
*/
|
|
862
|
+
/**
|
|
863
|
+
* Design System Colors (from Figma node 1581-22604)
|
|
852
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 }) => {
|