@cullsin/lnc-menu 7.0.0 → 7.0.3
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.d.ts +1 -3
- package/dist/src/SideMenu.js +3 -2
- package/dist/src/sidemenu.scss +28 -27
- package/dist/src/src/sidemenu.scss +186 -0
- package/dist/src/themes/index.d.ts +10 -0
- package/dist/src/themes/index.js +15 -0
- package/dist/src/themes/themesData.d.ts +3 -0
- package/dist/src/themes/themesData.js +83 -0
- package/dist/src/themes/types.d.ts +29 -0
- package/dist/src/themes/types.js +1 -0
- package/dist/src/themes.d.ts +30 -0
- package/dist/src/themes.js +68 -0
- package/package.json +1 -1
package/dist/src/SideMenu.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { Location, NavigateFunction } from "react-router-dom";
|
|
3
2
|
import { Language } from "./translations";
|
|
4
3
|
interface SideMenuProps {
|
|
@@ -6,11 +5,10 @@ interface SideMenuProps {
|
|
|
6
5
|
isDrawerOpen: boolean;
|
|
7
6
|
toggleDrawer: () => void;
|
|
8
7
|
};
|
|
9
|
-
SampleMgmtIcon: React.ElementType;
|
|
10
8
|
navigate: NavigateFunction;
|
|
11
9
|
location: Location;
|
|
12
10
|
language?: Language;
|
|
13
11
|
module?: 'sample' | 'patient';
|
|
14
12
|
}
|
|
15
|
-
declare function SideMenu({ useDrawer,
|
|
13
|
+
declare function SideMenu({ useDrawer, location, language, module }: SideMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
16
14
|
export default SideMenu;
|
package/dist/src/SideMenu.js
CHANGED
|
@@ -9,7 +9,8 @@ import ListItemText from "@mui/material/ListItemText";
|
|
|
9
9
|
import Tooltip from "@mui/material/Tooltip";
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import { getTranslations } from "./translations";
|
|
12
|
-
|
|
12
|
+
const SampleMgmtIcon = (props) => (_jsxs("svg", Object.assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: [_jsx("path", { d: "M20.144 1.03155C18.7687 -0.343852 16.5307 -0.343852 15.1552 1.03155L13.6553 2.53152L13.154 2.03015C12.8794 1.75559 12.4342 1.75559 12.1595 2.03015C11.8849 2.30472 11.8849 2.74997 12.1595 3.02458L12.6609 3.52594L6.30985 9.877C5.592 10.5948 5.3345 11.6309 5.60293 12.5811L3.92764 14.2564C3.65303 14.531 3.65303 14.9762 3.92764 15.2508L5.92376 17.247C6.06107 17.3843 6.24103 17.4529 6.42095 17.4529C6.60087 17.4529 6.78088 17.3843 6.91814 17.247L8.59319 15.5719C9.54379 15.841 10.5806 15.5838 11.2989 14.8655L17.6496 8.51467L18.151 9.01604C18.2883 9.15334 18.4683 9.22202 18.6482 9.22202C18.8281 9.22202 19.0081 9.15334 19.1454 9.01604C19.42 8.74147 19.42 8.29622 19.1454 8.02161L18.644 7.52025L20.144 6.02033C21.5194 4.64493 21.5194 2.40696 20.144 1.03155ZM10.3044 13.871C9.8905 14.285 9.26121 14.3873 8.73758 14.1262C8.46643 13.9878 8.13669 14.0396 7.92091 14.2554L6.42095 15.7553L5.41926 14.7536L6.91917 13.2537C7.1334 13.0395 7.18633 12.7121 7.05052 12.4412C6.78763 11.917 6.88954 11.2862 7.30428 10.8715L8.29777 9.87799H14.2975L10.3044 13.871ZM15.7039 8.47159H9.70411L13.6553 4.52037L16.6552 7.52025L15.7039 8.47159ZM19.1496 5.02591L17.6496 6.52582L14.6498 3.52594L16.1497 2.02598C16.9767 1.19891 18.3226 1.19891 19.1496 2.02598C19.9767 2.85305 19.9767 4.19879 19.1496 5.02591Z", fill: "currentColor" }), _jsx("path", { d: "M5.51817 18.6605C5.38686 18.4704 5.17061 18.3569 4.9396 18.3569C4.70858 18.3569 4.49233 18.4704 4.36103 18.6605C4.34598 18.6823 3.98802 19.2016 3.62527 19.827C2.90729 21.0648 2.82422 21.5941 2.82422 21.8846C2.82422 23.051 3.77317 23.9999 4.9396 23.9999C6.10602 23.9999 7.05498 23.051 7.05498 21.8846C7.05498 21.5941 6.97195 21.0648 6.25392 19.827C5.89118 19.2016 5.53322 18.6823 5.51817 18.6605ZM4.9396 22.5936C4.54863 22.5936 4.23056 22.2755 4.23056 21.8853C4.23605 21.669 4.53124 21.0509 4.93974 20.3631C5.34791 21.0501 5.64286 21.6679 5.64863 21.885C5.6484 22.2758 5.33042 22.5936 4.9396 22.5936Z", fill: "currentColor" })] })));
|
|
13
|
+
function SideMenu({ useDrawer, location, language = 'en', module }) {
|
|
13
14
|
const [selectedMainMenu, setSelectedMainMenu] = React.useState(null);
|
|
14
15
|
const { isDrawerOpen } = useDrawer();
|
|
15
16
|
const t = React.useMemo(() => getTranslations(language), [language]);
|
|
@@ -24,7 +25,7 @@ function SideMenu({ useDrawer, SampleMgmtIcon, location, language = 'en', module
|
|
|
24
25
|
icon: _jsx(SampleMgmtIcon, {}),
|
|
25
26
|
path: `/sample/${language}/sample-listing`,
|
|
26
27
|
},
|
|
27
|
-
], [
|
|
28
|
+
], [t, language]);
|
|
28
29
|
// Sync selection with module prop or current path
|
|
29
30
|
React.useEffect(() => {
|
|
30
31
|
// If module prop is provided, use it to set the selection
|
package/dist/src/sidemenu.scss
CHANGED
|
@@ -7,52 +7,51 @@
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.MuiBox-root .MuiList-root {
|
|
10
|
-
background:
|
|
11
|
-
color:
|
|
10
|
+
background: var(--side-menu-bg) !important;
|
|
11
|
+
color: var(--side-menu-list-color);
|
|
12
12
|
height: 100vh;
|
|
13
13
|
bottom: 0;
|
|
14
|
-
padding:
|
|
14
|
+
padding: var(--side-menu-padding);
|
|
15
15
|
overflow-x: hidden;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.MuiList-root {
|
|
19
19
|
.MuiListItem-root {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
border-radius: 15px;
|
|
20
|
+
padding: var(--side-menu-item-padding);
|
|
21
|
+
margin: var(--side-menu-item-margin);
|
|
22
|
+
border-radius: var(--side-menu-item-radius);
|
|
24
23
|
display: flex;
|
|
25
24
|
align-items: center;
|
|
26
25
|
justify-content: center;
|
|
27
|
-
background:
|
|
26
|
+
background: var(--side-menu-item-active-bg) !important;
|
|
28
27
|
|
|
29
28
|
// Width based on menu open/closed state
|
|
30
29
|
&.menu-closed {
|
|
31
|
-
width:
|
|
30
|
+
width: var(--side-menu-item-width-closed);
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
&.menu-open {
|
|
35
|
-
width:
|
|
34
|
+
width: var(--side-menu-item-width-open);
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
// Hover design - override the default background on hover
|
|
39
38
|
&:hover {
|
|
40
|
-
background:
|
|
39
|
+
background: var(--side-menu-item-active-bg) !important;
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
// Default state (not hovered and not selected) - transparent background
|
|
44
43
|
&:not(:hover):not(.Mui-selected) {
|
|
45
|
-
background:
|
|
44
|
+
background: var(--side-menu-item-bg-default) !important;
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
// Selected state - same as hover design
|
|
49
48
|
&.Mui-selected {
|
|
50
|
-
background:
|
|
49
|
+
background: var(--side-menu-item-active-bg) !important;
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
// Normalize all icons (MUI icons and custom SVGs)
|
|
54
53
|
.MuiListItemIcon-root {
|
|
55
|
-
color:
|
|
54
|
+
color: var(--side-menu-icon-color-active);
|
|
56
55
|
min-width: auto;
|
|
57
56
|
margin-right: 0;
|
|
58
57
|
cursor: pointer;
|
|
@@ -63,11 +62,11 @@
|
|
|
63
62
|
// Ensure consistent icon sizing for both MUI icons and custom SVGs
|
|
64
63
|
svg,
|
|
65
64
|
.MuiSvgIcon-root {
|
|
66
|
-
width:
|
|
67
|
-
height:
|
|
65
|
+
width: var(--side-menu-icon-size);
|
|
66
|
+
height: var(--side-menu-icon-size);
|
|
68
67
|
display: block;
|
|
69
|
-
fill:
|
|
70
|
-
color:
|
|
68
|
+
fill: var(--side-menu-icon-color-active);
|
|
69
|
+
color: var(--side-menu-icon-color-active);
|
|
71
70
|
}
|
|
72
71
|
}
|
|
73
72
|
|
|
@@ -75,8 +74,8 @@
|
|
|
75
74
|
&:not(:hover):not(.Mui-selected) .MuiListItemIcon-root {
|
|
76
75
|
svg,
|
|
77
76
|
.MuiSvgIcon-root {
|
|
78
|
-
fill:
|
|
79
|
-
color:
|
|
77
|
+
fill: var(--side-menu-icon-color-default);
|
|
78
|
+
color: var(--side-menu-icon-color-default);
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
81
|
|
|
@@ -89,8 +88,10 @@
|
|
|
89
88
|
margin: 0;
|
|
90
89
|
|
|
91
90
|
.MuiTypography-root {
|
|
92
|
-
font:
|
|
93
|
-
|
|
91
|
+
font-family: var(--side-menu-text-font-family);
|
|
92
|
+
font-size: var(--side-menu-text-font-size);
|
|
93
|
+
line-height: var(--side-menu-text-line-height);
|
|
94
|
+
color: var(--side-menu-text-color-active);
|
|
94
95
|
cursor: pointer;
|
|
95
96
|
white-space: nowrap;
|
|
96
97
|
}
|
|
@@ -98,7 +99,7 @@
|
|
|
98
99
|
|
|
99
100
|
// Text color changes on hover (white when not hovered and not selected)
|
|
100
101
|
&:not(:hover):not(.Mui-selected) .MuiListItemText-root .MuiTypography-root {
|
|
101
|
-
color:
|
|
102
|
+
color: var(--side-menu-text-color-default);
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
}
|
|
@@ -112,16 +113,16 @@
|
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
.MuiList-root.MuiMenu-list {
|
|
115
|
-
border-radius:
|
|
116
|
+
border-radius: var(--side-menu-popover-radius);
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
#more-menu {
|
|
119
120
|
.MuiPaper-root {
|
|
120
121
|
.MuiMenu-list {
|
|
121
|
-
color:
|
|
122
|
+
color: var(--side-menu-more-menu-color);
|
|
122
123
|
.MuiMenuItem-root {
|
|
123
|
-
font-size:
|
|
124
|
+
font-size: var(--side-menu-more-menu-font-size);
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
|
-
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
// Theme-aware: colors from CSS vars (set by SideMenu when themeId is passed). Fallbacks = default theme.
|
|
2
|
+
.parent-container .MuiDrawer-paper .MuiList-root {
|
|
3
|
+
background: linear-gradient(
|
|
4
|
+
to bottom,
|
|
5
|
+
var(--menu-list-bg-start, #1e2f97),
|
|
6
|
+
var(--menu-list-bg-end, #0b1659)
|
|
7
|
+
) !important;
|
|
8
|
+
color: var(--menu-list-color, #fff);
|
|
9
|
+
height: 100%;
|
|
10
|
+
bottom: 0;
|
|
11
|
+
padding: 20px 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.parent-container .MuiList-root {
|
|
15
|
+
.MuiListItem-root {
|
|
16
|
+
padding: 15px;
|
|
17
|
+
&.selected {
|
|
18
|
+
padding: 7px;
|
|
19
|
+
|
|
20
|
+
.MuiListItemIcon-root {
|
|
21
|
+
background: linear-gradient(
|
|
22
|
+
to bottom,
|
|
23
|
+
var(--menu-selected-bg-start, #7ad4f7),
|
|
24
|
+
var(--menu-selected-bg-end, #20a9ef)
|
|
25
|
+
) !important;
|
|
26
|
+
color: var(--menu-selected-color, #1e2f97);
|
|
27
|
+
padding: 10px;
|
|
28
|
+
min-width: 25px;
|
|
29
|
+
border-top-left-radius: 5px;
|
|
30
|
+
border-bottom-left-radius: 5px;
|
|
31
|
+
|
|
32
|
+
&:only-of-type {
|
|
33
|
+
border-top-right-radius: 5px;
|
|
34
|
+
border-bottom-right-radius: 5px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.MuiListItemText-root {
|
|
39
|
+
span {
|
|
40
|
+
background: linear-gradient(
|
|
41
|
+
to bottom,
|
|
42
|
+
var(--menu-selected-bg-start, #7ad4f7),
|
|
43
|
+
var(--menu-selected-bg-end, #20a9ef)
|
|
44
|
+
) !important;
|
|
45
|
+
padding: 10px 0;
|
|
46
|
+
min-width: 25px;
|
|
47
|
+
border-top-right-radius: 5px;
|
|
48
|
+
border-bottom-right-radius: 5px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:hover:not(.selected) {
|
|
54
|
+
padding: 5px 7px;
|
|
55
|
+
|
|
56
|
+
.MuiListItemIcon-root {
|
|
57
|
+
background: linear-gradient(
|
|
58
|
+
to bottom,
|
|
59
|
+
var(--menu-selected-bg-start, #7ad4f7),
|
|
60
|
+
var(--menu-selected-bg-end, #20a9ef)
|
|
61
|
+
) !important;
|
|
62
|
+
color: var(--menu-selected-color, #1e2f97);
|
|
63
|
+
padding: 10px;
|
|
64
|
+
min-width: 25px;
|
|
65
|
+
border-top-left-radius: 5px;
|
|
66
|
+
border-bottom-left-radius: 5px;
|
|
67
|
+
|
|
68
|
+
&:only-of-type {
|
|
69
|
+
border-top-right-radius: 5px;
|
|
70
|
+
border-bottom-right-radius: 5px;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.MuiListItemText-root {
|
|
75
|
+
span {
|
|
76
|
+
background: linear-gradient(
|
|
77
|
+
to bottom,
|
|
78
|
+
var(--menu-selected-bg-start, #7ad4f7),
|
|
79
|
+
var(--menu-selected-bg-end, #20a9ef)
|
|
80
|
+
) !important;
|
|
81
|
+
padding: 10px 0;
|
|
82
|
+
min-width: 25px;
|
|
83
|
+
border-top-right-radius: 5px;
|
|
84
|
+
border-bottom-right-radius: 5px;
|
|
85
|
+
}
|
|
86
|
+
.MuiTypography-root {
|
|
87
|
+
color: var(--menu-selected-color, #1e2f97);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.MuiListItemIcon-root {
|
|
93
|
+
color: var(--menu-list-color, #fff);
|
|
94
|
+
min-width: 30px;
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.MuiListItemText-root {
|
|
99
|
+
margin-top: 0;
|
|
100
|
+
margin-bottom: 0;
|
|
101
|
+
.MuiTypography-root {
|
|
102
|
+
font: 14px/24px "OpenSans-SemiBold";
|
|
103
|
+
color: var(--menu-list-color, #fff);
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
white-space: nowrap;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.app-menu-item {
|
|
112
|
+
.MuiList-root {
|
|
113
|
+
&.MuiMenu-list {
|
|
114
|
+
background: var(--menu-popover-bg, #fff) !important;
|
|
115
|
+
color: var(--menu-popover-text, #1e2f97);
|
|
116
|
+
width: 200px;
|
|
117
|
+
padding: 10px;
|
|
118
|
+
position: relative;
|
|
119
|
+
overflow: visible;
|
|
120
|
+
border: 1px solid var(--menu-popover-border, #dadada);
|
|
121
|
+
.submenu-title {
|
|
122
|
+
text-transform: uppercase;
|
|
123
|
+
font: 12px / 18px "OpenSans-Regular";
|
|
124
|
+
color: var(--menu-popover-text, #1e2f97);
|
|
125
|
+
padding: 0 0 5px 10px;
|
|
126
|
+
display: block;
|
|
127
|
+
border-bottom: 1px solid var(--menu-popover-border, rgba(0, 0, 0, 0.12));
|
|
128
|
+
margin-bottom: 5px;
|
|
129
|
+
}
|
|
130
|
+
.MuiMenuItem-root {
|
|
131
|
+
&.Mui-focusVisible {
|
|
132
|
+
background-color: transparent;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&:hover {
|
|
136
|
+
font: 16px/24px "OpenSans-SemiBold";
|
|
137
|
+
background: var(--menu-popover-selected, #DDF7FF);
|
|
138
|
+
border-radius: 6px;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&.collapsed-menu {
|
|
145
|
+
.MuiList-root {
|
|
146
|
+
&.MuiMenu-list {
|
|
147
|
+
&::before {
|
|
148
|
+
content: "";
|
|
149
|
+
position: absolute;
|
|
150
|
+
top: 15px;
|
|
151
|
+
left: -8px;
|
|
152
|
+
width: 0;
|
|
153
|
+
height: 0;
|
|
154
|
+
border-top: 8px solid transparent;
|
|
155
|
+
border-bottom: 8px solid transparent;
|
|
156
|
+
border-right: 8px solid var(--menu-popover-border, #516578);
|
|
157
|
+
z-index: 2;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
.MuiPopover-root {
|
|
166
|
+
.MuiPaper-root {
|
|
167
|
+
overflow: visible;
|
|
168
|
+
position: relative;
|
|
169
|
+
width: max-content;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.MuiList-root.MuiMenu-list {
|
|
174
|
+
border-radius: 5px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
#more-menu {
|
|
178
|
+
.MuiPaper-root {
|
|
179
|
+
.MuiMenu-list {
|
|
180
|
+
color: #1e2f97;
|
|
181
|
+
.MuiMenuItem-root {
|
|
182
|
+
font-size: 14px;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CustomColors, ThemeId, ThemesJson as ThemesJsonType } from "./types";
|
|
2
|
+
declare const themes: ThemesJsonType;
|
|
3
|
+
/**
|
|
4
|
+
* Returns custom colors for the given theme id.
|
|
5
|
+
* Used by SideMenu to inject CSS variables so menu colors match the host app theme.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getThemeColors(themeId: string): CustomColors;
|
|
8
|
+
export declare const themeIds: ThemeId[];
|
|
9
|
+
export { themes as themesConfig };
|
|
10
|
+
export type { ThemeId, CustomColors, ThemeConfig, ThemesJson } from "./types";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { themesData } from "./themesData";
|
|
2
|
+
const themes = themesData;
|
|
3
|
+
const VALID_THEME_IDS = ["default", "ocean", "forest", "sunset"];
|
|
4
|
+
/**
|
|
5
|
+
* Returns custom colors for the given theme id.
|
|
6
|
+
* Used by SideMenu to inject CSS variables so menu colors match the host app theme.
|
|
7
|
+
*/
|
|
8
|
+
export function getThemeColors(themeId) {
|
|
9
|
+
var _a;
|
|
10
|
+
const id = VALID_THEME_IDS.indexOf(themeId) !== -1 ? themeId : "default";
|
|
11
|
+
const config = (_a = themes[id]) !== null && _a !== void 0 ? _a : themes.default;
|
|
12
|
+
return config.customColors;
|
|
13
|
+
}
|
|
14
|
+
export const themeIds = VALID_THEME_IDS;
|
|
15
|
+
export { themes as themesConfig };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/** Theme definitions matching mgm-linc-patient-ui themes for consistent menu colors. */
|
|
2
|
+
export const themesData = {
|
|
3
|
+
default: {
|
|
4
|
+
name: "Default",
|
|
5
|
+
customColors: {
|
|
6
|
+
primaryText: "#1E2F97",
|
|
7
|
+
accentBlue: "#1AA7EE",
|
|
8
|
+
lightBlueBg: "#EBEFF5",
|
|
9
|
+
selectedRow: "#DDF7FF",
|
|
10
|
+
borderGray: "#dadada",
|
|
11
|
+
columnSeparator: "#999",
|
|
12
|
+
switchTrack: "#657BFD",
|
|
13
|
+
black: "#000",
|
|
14
|
+
white: "#fff",
|
|
15
|
+
borderColor: "#B5E6FF",
|
|
16
|
+
titleSectionBackground: "#e6f2ff",
|
|
17
|
+
errorTextColor: "#D32F2F",
|
|
18
|
+
columnHeaders: "#b5e6ff",
|
|
19
|
+
columnRowsEven: "#EDFBFF",
|
|
20
|
+
primaryButtonHoverColor: "#0A8BCC",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
ocean: {
|
|
24
|
+
name: "Ocean",
|
|
25
|
+
customColors: {
|
|
26
|
+
primaryText: "#0D47A1",
|
|
27
|
+
accentBlue: "#0288D1",
|
|
28
|
+
lightBlueBg: "#E3F2FD",
|
|
29
|
+
selectedRow: "#B3E5FC",
|
|
30
|
+
borderGray: "#B0BEC5",
|
|
31
|
+
columnSeparator: "#78909C",
|
|
32
|
+
switchTrack: "#0288D1",
|
|
33
|
+
black: "#263238",
|
|
34
|
+
white: "#fff",
|
|
35
|
+
borderColor: "#81D4FA",
|
|
36
|
+
titleSectionBackground: "#E1F5FE",
|
|
37
|
+
errorTextColor: "#C62828",
|
|
38
|
+
columnHeaders: "#E3F2FD",
|
|
39
|
+
columnRowsEven: "#E1F5FE",
|
|
40
|
+
primaryButtonHoverColor: "#01579B",
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
forest: {
|
|
44
|
+
name: "Forest",
|
|
45
|
+
customColors: {
|
|
46
|
+
primaryText: "#1B5E20",
|
|
47
|
+
accentBlue: "#2E7D32",
|
|
48
|
+
lightBlueBg: "#E8F5E9",
|
|
49
|
+
selectedRow: "#C8E6C9",
|
|
50
|
+
borderGray: "#C8E6C9",
|
|
51
|
+
columnSeparator: "#66BB6A",
|
|
52
|
+
switchTrack: "#43A047",
|
|
53
|
+
black: "#1B5E20",
|
|
54
|
+
white: "#fff",
|
|
55
|
+
borderColor: "#A5D6A7",
|
|
56
|
+
titleSectionBackground: "#E8F5E9",
|
|
57
|
+
errorTextColor: "#B71C1C",
|
|
58
|
+
columnHeaders: "#E8F5E9",
|
|
59
|
+
columnRowsEven: "#F1F8E9",
|
|
60
|
+
primaryButtonHoverColor: "#1B5E20",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
sunset: {
|
|
64
|
+
name: "Sunset",
|
|
65
|
+
customColors: {
|
|
66
|
+
primaryText: "#BF360C",
|
|
67
|
+
accentBlue: "#E64A19",
|
|
68
|
+
lightBlueBg: "#FBE9E7",
|
|
69
|
+
selectedRow: "#FFCCBC",
|
|
70
|
+
borderGray: "#D7CCC8",
|
|
71
|
+
columnSeparator: "#A1887F",
|
|
72
|
+
switchTrack: "#FF5722",
|
|
73
|
+
black: "#3E2723",
|
|
74
|
+
white: "#fff",
|
|
75
|
+
borderColor: "#FFAB91",
|
|
76
|
+
titleSectionBackground: "#FBE9E7",
|
|
77
|
+
errorTextColor: "#B71C1C",
|
|
78
|
+
columnHeaders: "#FBE9E7",
|
|
79
|
+
columnRowsEven: "#FFF8E1",
|
|
80
|
+
primaryButtonHoverColor: "#BF360C",
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Custom colors per theme – must match mgm-linc-patient-ui themes for consistent menu styling. */
|
|
2
|
+
export interface CustomColors {
|
|
3
|
+
primaryText: string;
|
|
4
|
+
accentBlue: string;
|
|
5
|
+
lightBlueBg: string;
|
|
6
|
+
selectedRow: string;
|
|
7
|
+
borderGray: string;
|
|
8
|
+
columnSeparator: string;
|
|
9
|
+
switchTrack: string;
|
|
10
|
+
black: string;
|
|
11
|
+
white: string;
|
|
12
|
+
borderColor: string;
|
|
13
|
+
titleSectionBackground: string;
|
|
14
|
+
errorTextColor: string;
|
|
15
|
+
columnHeaders: string;
|
|
16
|
+
columnRowsEven: string;
|
|
17
|
+
primaryButtonHoverColor: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ThemeConfig {
|
|
20
|
+
name: string;
|
|
21
|
+
customColors: CustomColors;
|
|
22
|
+
}
|
|
23
|
+
export type ThemeId = "default" | "ocean" | "forest" | "sunset";
|
|
24
|
+
export interface ThemesJson {
|
|
25
|
+
default: ThemeConfig;
|
|
26
|
+
ocean: ThemeConfig;
|
|
27
|
+
forest: ThemeConfig;
|
|
28
|
+
sunset: ThemeConfig;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme colors aligned with mgm-linc-patient-ui (default, ocean, forest, sunset).
|
|
3
|
+
* Used when themeId is passed to SideMenu to reflect the host app's theme.
|
|
4
|
+
*/
|
|
5
|
+
export type ThemeId = "default" | "ocean" | "forest" | "sunset";
|
|
6
|
+
export interface MenuThemeColors {
|
|
7
|
+
/** Primary text and icon color */
|
|
8
|
+
primaryText: string;
|
|
9
|
+
/** Accent / primary actions */
|
|
10
|
+
accentBlue: string;
|
|
11
|
+
/** Drawer/menu background */
|
|
12
|
+
lightBlueBg: string;
|
|
13
|
+
/** Selected item background */
|
|
14
|
+
selectedRow: string;
|
|
15
|
+
/** Borders */
|
|
16
|
+
borderGray: string;
|
|
17
|
+
borderColor: string;
|
|
18
|
+
/** Hover state (derived or from theme) */
|
|
19
|
+
primaryButtonHoverColor: string;
|
|
20
|
+
white: string;
|
|
21
|
+
black: string;
|
|
22
|
+
/** Sidebar list gradient (dark strip) – start and end for theme coherence */
|
|
23
|
+
sidebarBgStart: string;
|
|
24
|
+
sidebarBgEnd: string;
|
|
25
|
+
/** Selected/hover pill gradient in sidebar */
|
|
26
|
+
sidebarSelectedStart: string;
|
|
27
|
+
sidebarSelectedEnd: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function getMenuTheme(themeId: string | undefined): MenuThemeColors;
|
|
30
|
+
export declare const themeIds: ThemeId[];
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
const MENU_THEMES = {
|
|
2
|
+
default: {
|
|
3
|
+
primaryText: "#1E2F97",
|
|
4
|
+
accentBlue: "#1AA7EE",
|
|
5
|
+
lightBlueBg: "#EBEFF5",
|
|
6
|
+
selectedRow: "#DDF7FF",
|
|
7
|
+
borderGray: "#dadada",
|
|
8
|
+
borderColor: "#B5E6FF",
|
|
9
|
+
primaryButtonHoverColor: "#0A8BCC",
|
|
10
|
+
white: "#fff",
|
|
11
|
+
black: "#000",
|
|
12
|
+
sidebarBgStart: "#1E2F97",
|
|
13
|
+
sidebarBgEnd: "#0b1659",
|
|
14
|
+
sidebarSelectedStart: "#7ad4f7",
|
|
15
|
+
sidebarSelectedEnd: "#20a9ef",
|
|
16
|
+
},
|
|
17
|
+
ocean: {
|
|
18
|
+
primaryText: "#0D47A1",
|
|
19
|
+
accentBlue: "#0288D1",
|
|
20
|
+
lightBlueBg: "#E3F2FD",
|
|
21
|
+
selectedRow: "#B3E5FC",
|
|
22
|
+
borderGray: "#B0BEC5",
|
|
23
|
+
borderColor: "#81D4FA",
|
|
24
|
+
primaryButtonHoverColor: "#01579B",
|
|
25
|
+
white: "#fff",
|
|
26
|
+
black: "#263238",
|
|
27
|
+
sidebarBgStart: "#0D47A1",
|
|
28
|
+
sidebarBgEnd: "#01579B",
|
|
29
|
+
sidebarSelectedStart: "#81D4FA",
|
|
30
|
+
sidebarSelectedEnd: "#0288D1",
|
|
31
|
+
},
|
|
32
|
+
forest: {
|
|
33
|
+
primaryText: "#1B5E20",
|
|
34
|
+
accentBlue: "#2E7D32",
|
|
35
|
+
lightBlueBg: "#E8F5E9",
|
|
36
|
+
selectedRow: "#C8E6C9",
|
|
37
|
+
borderGray: "#C8E6C9",
|
|
38
|
+
borderColor: "#A5D6A7",
|
|
39
|
+
primaryButtonHoverColor: "#1B5E20",
|
|
40
|
+
white: "#fff",
|
|
41
|
+
black: "#1B5E20",
|
|
42
|
+
sidebarBgStart: "#1B5E20",
|
|
43
|
+
sidebarBgEnd: "#0d3312",
|
|
44
|
+
sidebarSelectedStart: "#A5D6A7",
|
|
45
|
+
sidebarSelectedEnd: "#2E7D32",
|
|
46
|
+
},
|
|
47
|
+
sunset: {
|
|
48
|
+
primaryText: "#BF360C",
|
|
49
|
+
accentBlue: "#E64A19",
|
|
50
|
+
lightBlueBg: "#FBE9E7",
|
|
51
|
+
selectedRow: "#FFCCBC",
|
|
52
|
+
borderGray: "#D7CCC8",
|
|
53
|
+
borderColor: "#FFAB91",
|
|
54
|
+
primaryButtonHoverColor: "#BF360C",
|
|
55
|
+
white: "#fff",
|
|
56
|
+
black: "#3E2723",
|
|
57
|
+
sidebarBgStart: "#BF360C",
|
|
58
|
+
sidebarBgEnd: "#8B250A",
|
|
59
|
+
sidebarSelectedStart: "#FFAB91",
|
|
60
|
+
sidebarSelectedEnd: "#E64A19",
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
const DEFAULT_THEME_ID = "default";
|
|
64
|
+
export function getMenuTheme(themeId) {
|
|
65
|
+
const id = themeId && themeId in MENU_THEMES ? themeId : DEFAULT_THEME_ID;
|
|
66
|
+
return MENU_THEMES[id];
|
|
67
|
+
}
|
|
68
|
+
export const themeIds = ["default", "ocean", "forest", "sunset"];
|