react-simple-dashboard 1.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/LICENSE +21 -0
- package/README.md +162 -0
- package/dist/index.d.ts +423 -0
- package/dist/index.es.js +7545 -0
- package/dist/index.umd.js +38 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rajat455
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# react-simple-dashboard
|
|
2
|
+
✨ Main Features ->
|
|
3
|
+
|
|
4
|
+
Customizable Layouts: Vertical, Mini, and Horizontal layout support.
|
|
5
|
+
|
|
6
|
+
Theme Presets: Multiple color presetes (Default, Cyan, Purple, Blue, Yellow, Red ,...any).
|
|
7
|
+
|
|
8
|
+
Dark & Light Mode: Inbuilt mode switching support.
|
|
9
|
+
|
|
10
|
+
Contrast Mode: Heigh-Contrast visual expression with Grey background.
|
|
11
|
+
|
|
12
|
+
RTL Support: For right to left Layout support.
|
|
13
|
+
|
|
14
|
+
TypeScript Ready: Enough Type support and Auto compliment.
|
|
15
|
+
|
|
16
|
+
Responsive: Ready for mobile and desktop or any size device.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
📦 Installation ->
|
|
20
|
+
|
|
21
|
+
Run:npm install react-simple-dashboard @mui/material @emotion/react @emotion/styled
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
🛠️ Customization (Props)
|
|
25
|
+
|
|
26
|
+
ThemeProvider ->
|
|
27
|
+
.-------------------------------------------------------------------.
|
|
28
|
+
| Prop | Type | Description |
|
|
29
|
+
|-------------------------------------------------------------------|
|
|
30
|
+
| themeOptions | ThemeOption | Options for Dashboard Visuals |
|
|
31
|
+
| settings | SettingsValueProps | For Close Drawer. |
|
|
32
|
+
'-------------------------------------------------------------------'
|
|
33
|
+
|
|
34
|
+
SettingDrawer ->
|
|
35
|
+
.-----------------------------------------------------------.
|
|
36
|
+
| Prop | Type | Description |
|
|
37
|
+
|------------------|----------------------------------------|
|
|
38
|
+
| open | boolean | is Drawer open or not. |
|
|
39
|
+
| onClose | function | For Close Drawer. |
|
|
40
|
+
| onChangeSettings | function | Calls when settings change. |
|
|
41
|
+
'-----------------------------------------------------------'
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
HOW TO USE IT ->
|
|
45
|
+
(./App.js)
|
|
46
|
+
|
|
47
|
+
import { useMemo, useState } from 'react';
|
|
48
|
+
import {
|
|
49
|
+
ThemeProvider,
|
|
50
|
+
DashboardLayout,
|
|
51
|
+
SettingsDrawer,
|
|
52
|
+
navConfig,
|
|
53
|
+
fonts,
|
|
54
|
+
colorPresets
|
|
55
|
+
} from 'react-simple-dashboard';
|
|
56
|
+
|
|
57
|
+
const defaultAvatar = "your Image";
|
|
58
|
+
|
|
59
|
+
function App() {
|
|
60
|
+
const [openSettings, setOpenSettings] = useState(false);
|
|
61
|
+
const settings = {
|
|
62
|
+
themeMode: "light",
|
|
63
|
+
themeColorPresets: "default",
|
|
64
|
+
themeFont: 'Public Sans',
|
|
65
|
+
themeFontSize: 17,
|
|
66
|
+
themeLayout: "vertical",
|
|
67
|
+
isContrast: false,
|
|
68
|
+
reverseLayout: false,
|
|
69
|
+
state:{} // For Access Your State With Redering Methods by Settings Argument (renderLogo, renderFooter, rednerIcons, rednerNavItems) //
|
|
70
|
+
};
|
|
71
|
+
const ThemeOptions = useMemo(() => ({
|
|
72
|
+
navigationList: [...navConfig],
|
|
73
|
+
fonts: [...fonts],
|
|
74
|
+
colorPresets: colorPresets,
|
|
75
|
+
|
|
76
|
+
renderLogo: (theme) => (
|
|
77
|
+
<svg width="40" height="40" viewBox="0 0 512 512">
|
|
78
|
+
</svg>
|
|
79
|
+
),
|
|
80
|
+
|
|
81
|
+
renderNavItem: (item, theme, settings) => {
|
|
82
|
+
const vertical = settings.themeLayout === "vertical"
|
|
83
|
+
const mini = settings.themeLayout === "mini"
|
|
84
|
+
const horizontal = settings.themeLayout === "horizontal"
|
|
85
|
+
const { reverseLayout } = settings
|
|
86
|
+
|
|
87
|
+
return <ListItem key={item.heading} disablePadding sx={{ display: 'block', mb: 0.5 }}>
|
|
88
|
+
<ListItemButton
|
|
89
|
+
selected={item.selected}
|
|
90
|
+
sx={{
|
|
91
|
+
minHeight: horizontal ? 32 : 44,
|
|
92
|
+
borderRadius: 1,
|
|
93
|
+
display: 'flex',
|
|
94
|
+
maxWidth: "100%",
|
|
95
|
+
flexDirection: !mini ? (reverseLayout ? "row-reverse" : "row") : "column",
|
|
96
|
+
justifyContent: !mini ? (reverseLayout ? "end" : 'start') : 'center',
|
|
97
|
+
alignItems: 'center',
|
|
98
|
+
paddingY: horizontal ? 0 : 0.5,
|
|
99
|
+
gap: (!mini && !reverseLayout && !horizontal ? 0.7 : !mini && reverseLayout && !horizontal ? 1.5 : 0.7),
|
|
100
|
+
paddingLeft: !mini && !horizontal ? (reverseLayout ? 1 : 1.5) : 1,
|
|
101
|
+
paddingRight: !mini && !horizontal ? (reverseLayout ? 1.5 : 1) : 1,
|
|
102
|
+
paddingTop: horizontal ? 0 : (!mini ? 0.5 : 1)
|
|
103
|
+
}}
|
|
104
|
+
>
|
|
105
|
+
<ListItemIcon sx={{
|
|
106
|
+
minWidth: 0,
|
|
107
|
+
mr: (!mini && !horizontal && vertical) ? (!reverseLayout ? 0.8 : 0) : 0,
|
|
108
|
+
justifyContent: 'center',
|
|
109
|
+
alignItems: "center",
|
|
110
|
+
color: item.selected ? (theme.palette.mode === "light" ? "primary.main" : "primary.light") : "text.secondary",
|
|
111
|
+
}}>
|
|
112
|
+
{item.icon}
|
|
113
|
+
</ListItemIcon>
|
|
114
|
+
<ListItemText style={{ marginTop: 0, marginBottom: 3, flex: "unset" }} primary={item.heading} primaryTypographyProps={{ minWidth: "max-content", fontWeight: item.selected ? (!mini ? 600 : 700) : (!mini ? 500 : 600), color: item.selected ? (theme.palette.mode === "light" ? "primary.main" : "primary.light") : "text.secondary", sx: { lineHeight: "16px", fontSize: !mini ? theme.typography.body2.fontSize : `calc(${theme.typography.subtitle2.fontSize} - 1px)` } }} />
|
|
115
|
+
</ListItemButton>
|
|
116
|
+
</ListItem>
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
renderFooter: (theme) => (
|
|
120
|
+
<div style={{ textAlign: 'center', padding: '20px' }}>
|
|
121
|
+
<p>Rajat Jayswal</p>
|
|
122
|
+
<button>Sign Out</button>
|
|
123
|
+
</div>
|
|
124
|
+
),
|
|
125
|
+
|
|
126
|
+
sideBarHeader: {
|
|
127
|
+
renderTitle: () => "Dashboard",
|
|
128
|
+
renderIcons: (theme, settings) => (
|
|
129
|
+
// Header's icons (Notifications, Settings,...All)
|
|
130
|
+
<button onClick={() => setOpenSettings(true)}>Settings</button>
|
|
131
|
+
)
|
|
132
|
+
}
|
|
133
|
+
}), []);
|
|
134
|
+
return (
|
|
135
|
+
|
|
136
|
+
<ThemeProvider themeOptions={ThemeOptions} settings={settings}>
|
|
137
|
+
|
|
138
|
+
<DashboardLayout themeOptions={ThemeOptions}>
|
|
139
|
+
|
|
140
|
+
<h1>Welcome to Dashboard</h1>
|
|
141
|
+
|
|
142
|
+
</DashboardLayout>
|
|
143
|
+
|
|
144
|
+
<SettingsDrawer
|
|
145
|
+
|
|
146
|
+
themeOptions={ThemeOptions}
|
|
147
|
+
|
|
148
|
+
open={openSettings}
|
|
149
|
+
|
|
150
|
+
onClose={() => setOpenSettings(false)}
|
|
151
|
+
|
|
152
|
+
onChangeSettings={(newSettings) => console.log(newSettings)}
|
|
153
|
+
|
|
154
|
+
/>
|
|
155
|
+
</ThemeProvider>
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
export default App;
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
📄 License ->
|
|
162
|
+
MIT © 2026 rajat455
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import { MUIStyledCommonProps } from '@mui/system';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import { StyledComponent } from '@emotion/styled';
|
|
6
|
+
import { SwitchProps } from '@mui/material';
|
|
7
|
+
import { Theme } from '@mui/material';
|
|
8
|
+
|
|
9
|
+
export declare const AntSwitch: StyledComponent<SwitchProps & MUIStyledCommonProps<Theme>, {}, {}>;
|
|
10
|
+
|
|
11
|
+
export declare type ColorPreset = 'default' | "cyan" | "purple" | "blue" | "yellow" | "red";
|
|
12
|
+
|
|
13
|
+
declare interface ColorPresets {
|
|
14
|
+
main: string;
|
|
15
|
+
name: ColorPreset;
|
|
16
|
+
light: string;
|
|
17
|
+
dark: string;
|
|
18
|
+
lighter: string;
|
|
19
|
+
contrastText: string;
|
|
20
|
+
darker: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export declare const colorPresets: ColorPresets[];
|
|
24
|
+
|
|
25
|
+
export declare const commonBlack = "#000000";
|
|
26
|
+
|
|
27
|
+
export declare const commonWhite = "#FFFFFF";
|
|
28
|
+
|
|
29
|
+
export declare function CustomeAvatar({ src, border, width, height }: Props_7): JSX.Element;
|
|
30
|
+
|
|
31
|
+
export declare function CustomeSlider({ onChange, marks, min, max, value, ...other }: any): JSX.Element;
|
|
32
|
+
|
|
33
|
+
export declare function CustomeThemeProvider({ children, themeOptions }: Props_2): JSX.Element;
|
|
34
|
+
|
|
35
|
+
export declare function DashboardLayout({ children, themeOptions }: Props_3): JSX.Element;
|
|
36
|
+
|
|
37
|
+
declare interface Fonts {
|
|
38
|
+
name: string;
|
|
39
|
+
main: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export declare const fonts: Fonts[];
|
|
43
|
+
|
|
44
|
+
export declare const getCustomShadows: (palette: any) => {
|
|
45
|
+
primary: string;
|
|
46
|
+
secondary: string;
|
|
47
|
+
error: string;
|
|
48
|
+
success: string;
|
|
49
|
+
info: string;
|
|
50
|
+
warning: string;
|
|
51
|
+
0: string;
|
|
52
|
+
1: string;
|
|
53
|
+
2: string;
|
|
54
|
+
3: string;
|
|
55
|
+
4: string;
|
|
56
|
+
5: string;
|
|
57
|
+
6: string;
|
|
58
|
+
7: string;
|
|
59
|
+
8: string;
|
|
60
|
+
9: string;
|
|
61
|
+
10: string;
|
|
62
|
+
11: string;
|
|
63
|
+
12: string;
|
|
64
|
+
13: string;
|
|
65
|
+
14: string;
|
|
66
|
+
15: string;
|
|
67
|
+
16: string;
|
|
68
|
+
17: string;
|
|
69
|
+
18: string;
|
|
70
|
+
19: string;
|
|
71
|
+
20: string;
|
|
72
|
+
21: string;
|
|
73
|
+
22: string;
|
|
74
|
+
23: string;
|
|
75
|
+
24: string;
|
|
76
|
+
z1: string;
|
|
77
|
+
z4: string;
|
|
78
|
+
z8: string;
|
|
79
|
+
z12: string;
|
|
80
|
+
z16: string;
|
|
81
|
+
z20: string;
|
|
82
|
+
z24: string;
|
|
83
|
+
dialog: string;
|
|
84
|
+
card: string;
|
|
85
|
+
dropDown: string;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export declare const getPalette: (colorPresets: ColorPresets[], themeMode: ThemeMode, themeColorPresets: ColorPreset, isContrast: boolean) => {
|
|
89
|
+
mode: ThemeMode;
|
|
90
|
+
primary: {
|
|
91
|
+
main: string;
|
|
92
|
+
name: ColorPreset;
|
|
93
|
+
light: string;
|
|
94
|
+
dark: string;
|
|
95
|
+
lighter: string;
|
|
96
|
+
contrastText: string;
|
|
97
|
+
darker: string;
|
|
98
|
+
};
|
|
99
|
+
grey: {
|
|
100
|
+
50: string;
|
|
101
|
+
100: string;
|
|
102
|
+
200: string;
|
|
103
|
+
300: string;
|
|
104
|
+
400: string;
|
|
105
|
+
500: string;
|
|
106
|
+
600: string;
|
|
107
|
+
700: string;
|
|
108
|
+
800: string;
|
|
109
|
+
900: string;
|
|
110
|
+
A100: string;
|
|
111
|
+
A200: string;
|
|
112
|
+
A400: string;
|
|
113
|
+
A700: string;
|
|
114
|
+
};
|
|
115
|
+
secondary: {
|
|
116
|
+
main: string;
|
|
117
|
+
contrastText: string;
|
|
118
|
+
};
|
|
119
|
+
info: {
|
|
120
|
+
lighter: string;
|
|
121
|
+
light: string;
|
|
122
|
+
main: string;
|
|
123
|
+
dark: string;
|
|
124
|
+
darker: string;
|
|
125
|
+
contrastText: string;
|
|
126
|
+
};
|
|
127
|
+
success: {
|
|
128
|
+
lighter: string;
|
|
129
|
+
light: string;
|
|
130
|
+
main: string;
|
|
131
|
+
dark: string;
|
|
132
|
+
darker: string;
|
|
133
|
+
contrastText: string;
|
|
134
|
+
};
|
|
135
|
+
error: {
|
|
136
|
+
lighter: string;
|
|
137
|
+
light: string;
|
|
138
|
+
main: string;
|
|
139
|
+
dark: string;
|
|
140
|
+
darker: string;
|
|
141
|
+
contrastText: string;
|
|
142
|
+
};
|
|
143
|
+
warning: {
|
|
144
|
+
lighter: string;
|
|
145
|
+
light: string;
|
|
146
|
+
main: string;
|
|
147
|
+
dark: string;
|
|
148
|
+
darker: string;
|
|
149
|
+
contrastText: string;
|
|
150
|
+
};
|
|
151
|
+
background: {
|
|
152
|
+
default: string;
|
|
153
|
+
paper: string;
|
|
154
|
+
neutral: string;
|
|
155
|
+
};
|
|
156
|
+
divider: string;
|
|
157
|
+
common: {
|
|
158
|
+
black: string;
|
|
159
|
+
white: string;
|
|
160
|
+
};
|
|
161
|
+
action: {
|
|
162
|
+
active: string;
|
|
163
|
+
hover: string;
|
|
164
|
+
selected: string;
|
|
165
|
+
focus: string;
|
|
166
|
+
disabledBackground: string;
|
|
167
|
+
disabled: string;
|
|
168
|
+
};
|
|
169
|
+
text: {
|
|
170
|
+
primary: string;
|
|
171
|
+
secondary: string;
|
|
172
|
+
disabled: string;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export declare const getTypography: (themeFont: any, themeFontSize: number) => {
|
|
177
|
+
fontFamily: any;
|
|
178
|
+
fontSize: number;
|
|
179
|
+
fontWeightRegular: number;
|
|
180
|
+
fontWeightMedium: number;
|
|
181
|
+
fontWeightBold: number;
|
|
182
|
+
h1: {
|
|
183
|
+
fontWeight: number;
|
|
184
|
+
lineHeight: number;
|
|
185
|
+
fontSize: string;
|
|
186
|
+
};
|
|
187
|
+
h2: {
|
|
188
|
+
fontWeight: number;
|
|
189
|
+
lineHeight: number;
|
|
190
|
+
fontSize: string;
|
|
191
|
+
};
|
|
192
|
+
h3: {
|
|
193
|
+
fontWeight: number;
|
|
194
|
+
lineHeight: number;
|
|
195
|
+
fontSize: string;
|
|
196
|
+
};
|
|
197
|
+
h4: {
|
|
198
|
+
fontWeight: number;
|
|
199
|
+
lineHeight: number;
|
|
200
|
+
fontSize: string;
|
|
201
|
+
};
|
|
202
|
+
h5: {
|
|
203
|
+
fontWeight: number;
|
|
204
|
+
lineHeight: number;
|
|
205
|
+
fontSize: string;
|
|
206
|
+
};
|
|
207
|
+
h6: {
|
|
208
|
+
fontWeight: number;
|
|
209
|
+
lineHeight: number;
|
|
210
|
+
fontSize: string;
|
|
211
|
+
};
|
|
212
|
+
subtitle1: {
|
|
213
|
+
fontSize: string;
|
|
214
|
+
fontWeight: number;
|
|
215
|
+
lineHeight: number;
|
|
216
|
+
};
|
|
217
|
+
subtitle2: {
|
|
218
|
+
fontSize: string;
|
|
219
|
+
fontWeight: number;
|
|
220
|
+
textTransform: string;
|
|
221
|
+
};
|
|
222
|
+
body1: {
|
|
223
|
+
fontSize: string;
|
|
224
|
+
lineHeight: number;
|
|
225
|
+
};
|
|
226
|
+
body2: {
|
|
227
|
+
fontSize: string;
|
|
228
|
+
lineHeight: number;
|
|
229
|
+
fontWeight: number;
|
|
230
|
+
};
|
|
231
|
+
caption: {
|
|
232
|
+
fontWeight: number;
|
|
233
|
+
lineHeight: number;
|
|
234
|
+
fontSize: string;
|
|
235
|
+
};
|
|
236
|
+
button: {
|
|
237
|
+
fontWeight: number;
|
|
238
|
+
fontSize: string;
|
|
239
|
+
textTransform: string;
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
export declare const HEADER: Header_2;
|
|
244
|
+
|
|
245
|
+
export declare function Header({ themeOptions }: Props_4): JSX.Element;
|
|
246
|
+
|
|
247
|
+
declare interface Header_2 {
|
|
248
|
+
H_MOBILE: number;
|
|
249
|
+
H_DESKTOP: number;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export declare const Icons: {
|
|
253
|
+
App: JSX.Element;
|
|
254
|
+
ecommerce: JSX.Element;
|
|
255
|
+
analytics: JSX.Element;
|
|
256
|
+
banking: JSX.Element;
|
|
257
|
+
booking: JSX.Element;
|
|
258
|
+
file: JSX.Element;
|
|
259
|
+
course: JSX.Element;
|
|
260
|
+
user: JSX.Element;
|
|
261
|
+
product: JSX.Element;
|
|
262
|
+
order: JSX.Element;
|
|
263
|
+
invoice: JSX.Element;
|
|
264
|
+
blog: JSX.Element;
|
|
265
|
+
job: JSX.Element;
|
|
266
|
+
tour: JSX.Element;
|
|
267
|
+
fileManager: JSX.Element;
|
|
268
|
+
mail: JSX.Element;
|
|
269
|
+
chat: JSX.Element;
|
|
270
|
+
calendar: JSX.Element;
|
|
271
|
+
permission: JSX.Element;
|
|
272
|
+
notification: JSX.Element;
|
|
273
|
+
contact: JSX.Element;
|
|
274
|
+
settings: JSX.Element;
|
|
275
|
+
fullScreen: JSX.Element;
|
|
276
|
+
windowScreen: JSX.Element;
|
|
277
|
+
reset: JSX.Element;
|
|
278
|
+
close: JSX.Element;
|
|
279
|
+
nightMode: JSX.Element;
|
|
280
|
+
contrast: JSX.Element;
|
|
281
|
+
rightToLeft: JSX.Element;
|
|
282
|
+
compact: JSX.Element;
|
|
283
|
+
info: JSX.Element;
|
|
284
|
+
layout1: JSX.Element;
|
|
285
|
+
layout2: JSX.Element;
|
|
286
|
+
layout3: JSX.Element;
|
|
287
|
+
menu: JSX.Element;
|
|
288
|
+
arrowLeft: JSX.Element;
|
|
289
|
+
arrowRight: JSX.Element;
|
|
290
|
+
fonts: JSX.Element;
|
|
291
|
+
colorPresets: JSX.Element;
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
export declare const NAV: Nav;
|
|
295
|
+
|
|
296
|
+
declare interface Nav {
|
|
297
|
+
WIDTH: number;
|
|
298
|
+
WIDTH_MIN: number;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export declare const navConfig: NavigationList[];
|
|
302
|
+
|
|
303
|
+
export declare interface NavigationList {
|
|
304
|
+
href: string;
|
|
305
|
+
heading: string;
|
|
306
|
+
selected?: boolean;
|
|
307
|
+
icon?: any;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export declare function NavVertical({ themeOptions }: Props_5): JSX.Element;
|
|
311
|
+
|
|
312
|
+
export declare const paletteGray: {
|
|
313
|
+
50: string;
|
|
314
|
+
100: string;
|
|
315
|
+
200: string;
|
|
316
|
+
300: string;
|
|
317
|
+
400: string;
|
|
318
|
+
500: string;
|
|
319
|
+
600: string;
|
|
320
|
+
700: string;
|
|
321
|
+
800: string;
|
|
322
|
+
900: string;
|
|
323
|
+
A100: string;
|
|
324
|
+
A200: string;
|
|
325
|
+
A400: string;
|
|
326
|
+
A700: string;
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
declare interface Props {
|
|
330
|
+
children: ReactNode;
|
|
331
|
+
settings: SettingsValueProps;
|
|
332
|
+
themeOptions: ThemeOptions;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
declare interface Props_2 {
|
|
336
|
+
children: default_2.ReactNode;
|
|
337
|
+
themeOptions: ThemeOptions;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
declare interface Props_3 {
|
|
341
|
+
children: ReactNode;
|
|
342
|
+
themeOptions: ThemeOptions;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
declare interface Props_4 {
|
|
346
|
+
themeOptions: ThemeOptions;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
declare interface Props_5 {
|
|
350
|
+
themeOptions: ThemeOptions;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
declare interface Props_6 {
|
|
354
|
+
open: boolean;
|
|
355
|
+
onClose: () => void;
|
|
356
|
+
themeOptions: ThemeOptions;
|
|
357
|
+
onChangeSettings?: (settings: SettingsValueProps) => void;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
declare interface Props_7 {
|
|
361
|
+
border?: number;
|
|
362
|
+
width: number;
|
|
363
|
+
height: number;
|
|
364
|
+
sx?: any;
|
|
365
|
+
src: string;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export declare function pxToRem(value: number): string;
|
|
369
|
+
|
|
370
|
+
export declare function SettingsDrawer({ open, onClose, onChangeSettings, themeOptions }: Props_6): JSX.Element;
|
|
371
|
+
|
|
372
|
+
export declare const SettingsProvider: ({ children, defaultSettings }: {
|
|
373
|
+
children: ReactNode;
|
|
374
|
+
defaultSettings: SettingsValueProps;
|
|
375
|
+
}) => JSX.Element;
|
|
376
|
+
|
|
377
|
+
export declare interface SettingsValueProps {
|
|
378
|
+
themeMode: ThemeMode;
|
|
379
|
+
themeColorPresets: ColorPreset;
|
|
380
|
+
themeFont: string;
|
|
381
|
+
themeFontSize: number;
|
|
382
|
+
themeLayout: ThemeLayout;
|
|
383
|
+
isContrast: boolean;
|
|
384
|
+
isFullScreen: boolean;
|
|
385
|
+
reverseLayout: boolean;
|
|
386
|
+
state?: any;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export declare type ThemeLayout = 'vertical' | 'mini' | 'horizontal';
|
|
390
|
+
|
|
391
|
+
export declare type ThemeMode = "light" | "dark";
|
|
392
|
+
|
|
393
|
+
export declare interface ThemeOptions {
|
|
394
|
+
fonts: Fonts[];
|
|
395
|
+
colorPresets: ColorPresets[];
|
|
396
|
+
renderLogo?: (theme: any, settings: SettingsValueProps) => ReactNode;
|
|
397
|
+
renderNavItem?: (navItem: any, theme: any, settings: SettingsValueProps) => ReactNode;
|
|
398
|
+
navigationList?: NavigationList[];
|
|
399
|
+
renderFooter?: (theme: any, settings: SettingsValueProps) => ReactNode;
|
|
400
|
+
sideBarHeader?: {
|
|
401
|
+
title: string;
|
|
402
|
+
renderTitle: (theme: any, settings: SettingsValueProps) => ReactNode | string;
|
|
403
|
+
renderIcons: (theme: any, settings: SettingsValueProps) => ReactNode;
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export declare function ThemeProvider({ settings, children, themeOptions }: Props): JSX.Element;
|
|
408
|
+
|
|
409
|
+
export declare const useSettings: () => {
|
|
410
|
+
settings: SettingsValueProps;
|
|
411
|
+
onChangeMode: (_mode: ThemeMode) => void;
|
|
412
|
+
onChangeColor: (_color: string) => void;
|
|
413
|
+
onChangeLayout: (_layout: ThemeLayout) => void;
|
|
414
|
+
onResizeFont: (_fontSize: number) => void;
|
|
415
|
+
onChangeFont: (_fontName: string) => void;
|
|
416
|
+
onResetSettings: (_oldSettings?: SettingsValueProps) => void;
|
|
417
|
+
onChangeState: (_newState: any) => void;
|
|
418
|
+
toggleContrast: () => void;
|
|
419
|
+
toggleReverseLayout: () => void;
|
|
420
|
+
toggleFullScreen: () => void;
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
export { }
|