@cullsin/lnc-menu 6.9.0 → 7.0.0
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/src/SideMenu.js +1 -16
- package/dist/src/sidemenu.scss +11 -6
- package/package.json +1 -1
package/dist/src/SideMenu.js
CHANGED
|
@@ -74,21 +74,6 @@ function SideMenu({ useDrawer, SampleMgmtIcon, location, language = 'en', module
|
|
|
74
74
|
overflowY: "auto",
|
|
75
75
|
zIndex: 100,
|
|
76
76
|
},
|
|
77
|
-
}, children: _jsx(List, { children: menuItems.map((item, index) => (_jsx(Tooltip, { title: item.text, placement: "right", disableHoverListener: isDrawerOpen, children: _jsxs(ListItem, { button: true, selected: selectedMainMenu === item.text, className: isDrawerOpen ? "menu-open" : "menu-closed", onClick: () => handleMenuClick(item),
|
|
78
|
-
"&.Mui-selected": {
|
|
79
|
-
backgroundColor: "rgba(25, 118, 210, 0.08)",
|
|
80
|
-
borderLeft: "3px solid #1976d2",
|
|
81
|
-
"&:hover": {
|
|
82
|
-
backgroundColor: "rgba(25, 118, 210, 0.12)",
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
"&.Mui-selected .MuiListItemIcon-root": {
|
|
86
|
-
color: "#1976d2",
|
|
87
|
-
},
|
|
88
|
-
"&.Mui-selected .MuiListItemText-primary": {
|
|
89
|
-
color: "#1976d2",
|
|
90
|
-
fontWeight: 600,
|
|
91
|
-
},
|
|
92
|
-
}, children: [_jsx(ListItemIcon, { children: item.icon }), isDrawerOpen && _jsx(ListItemText, { primary: item.text })] }) }, index))) }) }) }));
|
|
77
|
+
}, children: _jsx(List, { children: menuItems.map((item, index) => (_jsx(Tooltip, { title: item.text, placement: "right", disableHoverListener: isDrawerOpen, children: _jsxs(ListItem, { button: true, selected: selectedMainMenu === item.text, className: isDrawerOpen ? "menu-open" : "menu-closed", onClick: () => handleMenuClick(item), children: [_jsx(ListItemIcon, { children: item.icon }), isDrawerOpen && _jsx(ListItemText, { primary: item.text })] }) }, index))) }) }) }));
|
|
93
78
|
}
|
|
94
79
|
export default SideMenu;
|
package/dist/src/sidemenu.scss
CHANGED
|
@@ -40,11 +40,16 @@
|
|
|
40
40
|
background: linear-gradient(to bottom, #7ad4f7, #20a9ef) !important;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
// Default state (not hovered) - transparent background
|
|
44
|
-
&:not(:hover) {
|
|
43
|
+
// Default state (not hovered and not selected) - transparent background
|
|
44
|
+
&:not(:hover):not(.Mui-selected) {
|
|
45
45
|
background: transparent !important;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
// Selected state - same as hover design
|
|
49
|
+
&.Mui-selected {
|
|
50
|
+
background: linear-gradient(to bottom, #7ad4f7, #20a9ef) !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
48
53
|
// Normalize all icons (MUI icons and custom SVGs)
|
|
49
54
|
.MuiListItemIcon-root {
|
|
50
55
|
color: #1e2f97;
|
|
@@ -66,8 +71,8 @@
|
|
|
66
71
|
}
|
|
67
72
|
}
|
|
68
73
|
|
|
69
|
-
// Icon color changes on hover
|
|
70
|
-
&:not(:hover) .MuiListItemIcon-root {
|
|
74
|
+
// Icon color changes on hover (white when not hovered and not selected)
|
|
75
|
+
&:not(:hover):not(.Mui-selected) .MuiListItemIcon-root {
|
|
71
76
|
svg,
|
|
72
77
|
.MuiSvgIcon-root {
|
|
73
78
|
fill: #fff;
|
|
@@ -91,8 +96,8 @@
|
|
|
91
96
|
}
|
|
92
97
|
}
|
|
93
98
|
|
|
94
|
-
// Text color changes on hover
|
|
95
|
-
&:not(:hover) .MuiListItemText-root .MuiTypography-root {
|
|
99
|
+
// Text color changes on hover (white when not hovered and not selected)
|
|
100
|
+
&:not(:hover):not(.Mui-selected) .MuiListItemText-root .MuiTypography-root {
|
|
96
101
|
color: #fff;
|
|
97
102
|
}
|
|
98
103
|
}
|