@cullsin/lnc-menu 6.3.0 → 6.6.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.
@@ -63,6 +63,7 @@ function SideMenu({ useDrawer, SampleMgmtIcon, location, language = 'en' }) {
63
63
  overflowY: "auto",
64
64
  zIndex: 100,
65
65
  },
66
- }, 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: selectedMainMenu === item.text ? "selected" : "", onClick: () => handleMenuClick(item), children: [_jsx(ListItemIcon, { children: item.icon }), isDrawerOpen && _jsx(ListItemText, { primary: item.text })] }) }, index))) }) }) }));
66
+ }, children: _jsx(List, { children: menuItems.map((item, index) => (_jsx(Tooltip, { title: item.text, placement: "right", disableHoverListener: isDrawerOpen, children: _jsxs(ListItem, { button: true, selected: true, className: "selected" // DEBUG: Force selected class for all items
67
+ , onClick: () => handleMenuClick(item), children: [_jsx(ListItemIcon, { children: item.icon }), isDrawerOpen && _jsx(ListItemText, { primary: item.text })] }) }, index))) }) }) }));
67
68
  }
68
69
  export default SideMenu;
@@ -17,13 +17,20 @@
17
17
 
18
18
  .MuiList-root {
19
19
  .MuiListItem-root {
20
- padding: 15px;
21
- margin-bottom: 4px;
20
+ // Apply capsule layout with gradient permanently for testing
21
+ padding: 10px 15px;
22
+ margin: 4px 12px;
23
+ border-radius: 20px;
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: center;
27
+ background: linear-gradient(to bottom, #7ad4f7, #20a9ef) !important;
22
28
 
23
29
  // Normalize all icons (MUI icons and custom SVGs)
24
30
  .MuiListItemIcon-root {
25
- color: #fff;
26
- min-width: 30px;
31
+ color: #1e2f97;
32
+ min-width: auto;
33
+ margin-right: 0;
27
34
  cursor: pointer;
28
35
  display: flex;
29
36
  align-items: center;
@@ -35,80 +42,26 @@
35
42
  width: 24px;
36
43
  height: 25px;
37
44
  display: block;
45
+ fill: #1e2f97;
46
+ color: #1e2f97;
38
47
  }
39
48
  }
40
49
 
50
+ // Add margin-right to icon only when text is visible
51
+ .MuiListItemIcon-root + .MuiListItemText-root {
52
+ margin-left: 8px;
53
+ }
54
+
41
55
  .MuiListItemText-root {
42
- margin-top: 0;
43
- margin-bottom: 0;
56
+ margin: 0;
44
57
 
45
58
  .MuiTypography-root {
46
59
  font: 14px/24px "OpenSans-SemiBold";
47
- color: #fff;
60
+ color: #1e2f97;
48
61
  cursor: pointer;
49
62
  white-space: nowrap;
50
63
  }
51
64
  }
52
-
53
- // Selected state - unified capsule background
54
- &.selected {
55
- padding: 10px 15px;
56
- background: linear-gradient(to bottom, #7ad4f7, #20a9ef) !important;
57
- border-radius: 20px;
58
- margin: 0 12px;
59
- display: flex;
60
- align-items: center;
61
-
62
- .MuiListItemIcon-root {
63
- color: #1e2f97;
64
- min-width: auto;
65
- margin-right: 8px;
66
-
67
- svg,
68
- .MuiSvgIcon-root {
69
- fill: #1e2f97;
70
- color: #1e2f97;
71
- }
72
- }
73
-
74
- .MuiListItemText-root {
75
- margin: 0;
76
-
77
- .MuiTypography-root {
78
- color: #1e2f97;
79
- }
80
- }
81
- }
82
-
83
- // Hover state - unified capsule background
84
- &:hover:not(.selected) {
85
- padding: 10px 15px;
86
- background: linear-gradient(to bottom, #7ad4f7, #20a9ef) !important;
87
- border-radius: 20px;
88
- margin: 0 12px;
89
- display: flex;
90
- align-items: center;
91
-
92
- .MuiListItemIcon-root {
93
- color: #1e2f97;
94
- min-width: auto;
95
- margin-right: 8px;
96
-
97
- svg,
98
- .MuiSvgIcon-root {
99
- fill: #1e2f97;
100
- color: #1e2f97;
101
- }
102
- }
103
-
104
- .MuiListItemText-root {
105
- margin: 0;
106
-
107
- .MuiTypography-root {
108
- color: #1e2f97;
109
- }
110
- }
111
- }
112
65
  }
113
66
  }
114
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cullsin/lnc-menu",
3
- "version": "6.3.0",
3
+ "version": "6.6.0",
4
4
  "description": "Reusable SideMenu component for MedGenome LNC platform using MUI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",