@pdg/react-admin-layout 1.0.36 → 1.0.37
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/assets/output-CGt0B9WV.css +137 -0
- package/dist/index.esm.js +13 -46
- package/dist/index.js +13 -46
- package/package.json +27 -26
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
.simplebar-track.simplebar-vertical {
|
|
2
|
+
width: 8px !important;
|
|
3
|
+
}
|
|
4
|
+
.simplebar-track.simplebar-vertical .simplebar-scrollbar.simplebar-visible:before {
|
|
5
|
+
opacity: 0.3 !important;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.MuiButtonBase-root.MuiButton-root.MuiButton-outlined {
|
|
9
|
+
padding: 5px 15px 4px;
|
|
10
|
+
}
|
|
11
|
+
.MuiButtonBase-root.MuiButton-root.MuiButton-outlined.MuiButton-sizeLarge {
|
|
12
|
+
padding: 7px 21px 6px;
|
|
13
|
+
}
|
|
14
|
+
.MuiButtonBase-root.MuiButton-root.MuiButton-outlined.MuiButton-sizeSmall {
|
|
15
|
+
padding: 3px 9px 2px;
|
|
16
|
+
}
|
|
17
|
+
.MuiButtonBase-root.MuiButton-root.MuiButton-contained {
|
|
18
|
+
padding: 6px 16px 5px;
|
|
19
|
+
}
|
|
20
|
+
.MuiButtonBase-root.MuiButton-root.MuiButton-contained.MuiButton-sizeLarge {
|
|
21
|
+
padding: 8px 22px 7px;
|
|
22
|
+
}
|
|
23
|
+
.MuiButtonBase-root.MuiButton-root.MuiButton-contained.MuiButton-sizeSmall {
|
|
24
|
+
padding: 4px 10px 3px;
|
|
25
|
+
}
|
|
26
|
+
.MuiButtonBase-root.MuiButton-root.MuiButton-text {
|
|
27
|
+
padding: 6px 8px 5px;
|
|
28
|
+
}
|
|
29
|
+
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-sizeLarge {
|
|
30
|
+
padding: 8px 11px 7px;
|
|
31
|
+
}
|
|
32
|
+
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-sizeSmall {
|
|
33
|
+
padding: 4px 5px 3px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
html,
|
|
37
|
+
body,
|
|
38
|
+
div,
|
|
39
|
+
span,
|
|
40
|
+
applet,
|
|
41
|
+
object,
|
|
42
|
+
iframe,
|
|
43
|
+
h1,
|
|
44
|
+
h2,
|
|
45
|
+
h3,
|
|
46
|
+
h4,
|
|
47
|
+
h5,
|
|
48
|
+
h6,
|
|
49
|
+
p,
|
|
50
|
+
blockquote,
|
|
51
|
+
pre,
|
|
52
|
+
a,
|
|
53
|
+
abbr,
|
|
54
|
+
acronym,
|
|
55
|
+
address,
|
|
56
|
+
big,
|
|
57
|
+
cite,
|
|
58
|
+
code,
|
|
59
|
+
del,
|
|
60
|
+
dfn,
|
|
61
|
+
em,
|
|
62
|
+
img,
|
|
63
|
+
ins,
|
|
64
|
+
kbd,
|
|
65
|
+
q,
|
|
66
|
+
s,
|
|
67
|
+
samp,
|
|
68
|
+
small,
|
|
69
|
+
strike,
|
|
70
|
+
strong,
|
|
71
|
+
sub,
|
|
72
|
+
sup,
|
|
73
|
+
tt,
|
|
74
|
+
var,
|
|
75
|
+
b,
|
|
76
|
+
u,
|
|
77
|
+
i,
|
|
78
|
+
center,
|
|
79
|
+
dl,
|
|
80
|
+
dt,
|
|
81
|
+
dd,
|
|
82
|
+
ol,
|
|
83
|
+
ul,
|
|
84
|
+
li,
|
|
85
|
+
fieldset,
|
|
86
|
+
form,
|
|
87
|
+
label,
|
|
88
|
+
legend,
|
|
89
|
+
table,
|
|
90
|
+
caption,
|
|
91
|
+
tbody,
|
|
92
|
+
tfoot,
|
|
93
|
+
thead,
|
|
94
|
+
tr,
|
|
95
|
+
th,
|
|
96
|
+
td,
|
|
97
|
+
article,
|
|
98
|
+
aside,
|
|
99
|
+
canvas,
|
|
100
|
+
details,
|
|
101
|
+
embed,
|
|
102
|
+
figure,
|
|
103
|
+
figcaption,
|
|
104
|
+
footer,
|
|
105
|
+
header,
|
|
106
|
+
hgroup,
|
|
107
|
+
menu,
|
|
108
|
+
nav,
|
|
109
|
+
output,
|
|
110
|
+
ruby,
|
|
111
|
+
section,
|
|
112
|
+
summary,
|
|
113
|
+
time,
|
|
114
|
+
mark,
|
|
115
|
+
audio,
|
|
116
|
+
video,
|
|
117
|
+
main,
|
|
118
|
+
input,
|
|
119
|
+
button,
|
|
120
|
+
textarea,
|
|
121
|
+
pre,
|
|
122
|
+
select,
|
|
123
|
+
a {
|
|
124
|
+
font-family: "Pretendard", "Apple Gothic", "Dotum", sans-serif;
|
|
125
|
+
margin: 0;
|
|
126
|
+
padding: 0;
|
|
127
|
+
border: 0;
|
|
128
|
+
vertical-align: top;
|
|
129
|
+
box-sizing: border-box;
|
|
130
|
+
word-break: keep-all;
|
|
131
|
+
line-height: unset;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
*:before,
|
|
135
|
+
*:after {
|
|
136
|
+
box-sizing: border-box;
|
|
137
|
+
}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,33 +1,7 @@
|
|
|
1
|
-
import {Grid,styled,ListItemIcon,ListItemButton,Icon,ListItemText,Badge,Collapse,List,useTheme,alpha,Box,Toolbar,Typography,AppBar,Drawer,IconButton}from'@mui/material';import React,{useState,useEffect,useCallback,useMemo}from'react';import {useLocation,useNavigate}from'react-router-dom';import {ExpandMore,Menu}from'@mui/icons-material';import {notEmpty,empty}from'@pdg/util';import SimpleBar from'simplebar-react';function
|
|
2
|
-
if ( ref === void 0 ) ref = {};
|
|
3
|
-
var insertAt = ref.insertAt;
|
|
4
|
-
|
|
5
|
-
if (typeof document === 'undefined') { return; }
|
|
6
|
-
|
|
7
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
8
|
-
var style = document.createElement('style');
|
|
9
|
-
style.type = 'text/css';
|
|
10
|
-
|
|
11
|
-
if (insertAt === 'top') {
|
|
12
|
-
if (head.firstChild) {
|
|
13
|
-
head.insertBefore(style, head.firstChild);
|
|
14
|
-
} else {
|
|
15
|
-
head.appendChild(style);
|
|
16
|
-
}
|
|
17
|
-
} else {
|
|
18
|
-
head.appendChild(style);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (style.styleSheet) {
|
|
22
|
-
style.styleSheet.cssText = css;
|
|
23
|
-
} else {
|
|
24
|
-
style.appendChild(document.createTextNode(css));
|
|
25
|
-
}
|
|
26
|
-
}var css_248z = ".simplebar-track.simplebar-vertical {\n width: 8px !important;\n}\n.simplebar-track.simplebar-vertical .simplebar-scrollbar.simplebar-visible:before {\n opacity: 0.3 !important;\n}\n\n.MuiButtonBase-root.MuiButton-root.MuiButton-outlined {\n padding: 5px 15px 4px;\n}\n.MuiButtonBase-root.MuiButton-root.MuiButton-outlined.MuiButton-sizeLarge {\n padding: 7px 21px 6px;\n}\n.MuiButtonBase-root.MuiButton-root.MuiButton-outlined.MuiButton-sizeSmall {\n padding: 3px 9px 2px;\n}\n.MuiButtonBase-root.MuiButton-root.MuiButton-contained {\n padding: 6px 16px 5px;\n}\n.MuiButtonBase-root.MuiButton-root.MuiButton-contained.MuiButton-sizeLarge {\n padding: 8px 22px 7px;\n}\n.MuiButtonBase-root.MuiButton-root.MuiButton-contained.MuiButton-sizeSmall {\n padding: 4px 10px 3px;\n}\n.MuiButtonBase-root.MuiButton-root.MuiButton-text {\n padding: 6px 8px 5px;\n}\n.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-sizeLarge {\n padding: 8px 11px 7px;\n}\n.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-sizeSmall {\n padding: 4px 5px 3px;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo,\nmain,\ninput,\nbutton,\ntextarea,\npre,\nselect,\na {\n font-family: \"Pretendard\", \"Apple Gothic\", \"Dotum\", sans-serif;\n margin: 0;\n padding: 0;\n border: 0;\n vertical-align: top;\n box-sizing: border-box;\n word-break: keep-all;\n line-height: unset;\n}\n\n*:before,\n*:after {\n box-sizing: border-box;\n}";
|
|
27
|
-
styleInject(css_248z);var CardLayout = function (_a) {
|
|
1
|
+
import {Grid,styled,ListItemIcon,ListItemButton,Icon,ListItemText,Badge,Collapse,List,useTheme,alpha,Box,Toolbar,Typography,AppBar,Drawer,IconButton}from'@mui/material';import React,{useState,useEffect,useCallback,useMemo}from'react';import {useLocation,useNavigate}from'react-router-dom';import {ExpandMore,Menu}from'@mui/icons-material';import {notEmpty,empty}from'@pdg/util';import SimpleBar from'simplebar-react';var CardLayout = function (_a) {
|
|
28
2
|
var children = _a.children, _b = _a.backgroundColor, backgroundColor = _b === void 0 ? '#eff3f8' : _b;
|
|
29
3
|
return (React.createElement(Grid, { container: true, direction: 'column', alignItems: 'center', justifyContent: 'center', bgcolor: backgroundColor, minHeight: '100vh' },
|
|
30
|
-
React.createElement(Grid,
|
|
4
|
+
React.createElement(Grid, null, children)));
|
|
31
5
|
};/******************************************************************************
|
|
32
6
|
Copyright (c) Microsoft Corporation.
|
|
33
7
|
|
|
@@ -42,7 +16,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
42
16
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
43
17
|
PERFORMANCE OF THIS SOFTWARE.
|
|
44
18
|
***************************************************************************** */
|
|
45
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
19
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
46
20
|
|
|
47
21
|
|
|
48
22
|
var __assign = function() {
|
|
@@ -205,10 +179,6 @@ var StyledAppBar = styled(AppBar)(function (_a) {
|
|
|
205
179
|
borderBottom: 'thin solid #f5f5f5',
|
|
206
180
|
});
|
|
207
181
|
});
|
|
208
|
-
var StyledSideMenuContainerBox = styled(Box)(function (_a) {
|
|
209
|
-
var theme = _a.theme;
|
|
210
|
-
return theme.unstable_sx({});
|
|
211
|
-
});
|
|
212
182
|
var StyledSideMenuTemporaryDrawer = styled(Drawer)(function (_a) {
|
|
213
183
|
var theme = _a.theme;
|
|
214
184
|
return theme.unstable_sx({
|
|
@@ -221,16 +191,6 @@ var StyledSideMenuPermanentDrawer = styled(Drawer)(function (_a) {
|
|
|
221
191
|
'& .MuiDrawer-paper': { boxSizing: 'border-box', width: SIDE_MENU_WIDTH },
|
|
222
192
|
});
|
|
223
193
|
});
|
|
224
|
-
var StyledMainBox = styled(Box)(function (_a) {
|
|
225
|
-
var theme = _a.theme;
|
|
226
|
-
return theme.unstable_sx({
|
|
227
|
-
flexGrow: 1,
|
|
228
|
-
p: 2,
|
|
229
|
-
display: 'flex',
|
|
230
|
-
flexDirection: 'column',
|
|
231
|
-
minHeight: '100vh',
|
|
232
|
-
});
|
|
233
|
-
});
|
|
234
194
|
var StyledMainContentDiv = styled('div')(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n flex: 1;\n"], ["\n display: flex;\n flex-direction: column;\n flex: 1;\n"])));
|
|
235
195
|
var templateObject_1, templateObject_2;var SCREENS = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
236
196
|
var _getNextScreen = function (screen) {
|
|
@@ -329,7 +289,14 @@ var DefaultLayout = function (_a) {
|
|
|
329
289
|
width: (_e = {}, _e[nextMenuScreen] = SIDE_MENU_WIDTH, _e),
|
|
330
290
|
flexShrink: (_f = {}, _f[nextMenuScreen] = 0, _f),
|
|
331
291
|
};
|
|
332
|
-
var mainBoxSx = {
|
|
292
|
+
var mainBoxSx = {
|
|
293
|
+
width: (_g = {}, _g[nextMenuScreen] = "calc(100% - ".concat(SIDE_MENU_WIDTH, "px)"), _g),
|
|
294
|
+
flexGrow: 1,
|
|
295
|
+
p: 2,
|
|
296
|
+
display: 'flex',
|
|
297
|
+
flexDirection: 'column',
|
|
298
|
+
minHeight: '100vh',
|
|
299
|
+
};
|
|
333
300
|
var titleData = menuTitles[location.pathname];
|
|
334
301
|
/********************************************************************************************************************
|
|
335
302
|
* Render
|
|
@@ -341,12 +308,12 @@ var DefaultLayout = function (_a) {
|
|
|
341
308
|
React.createElement(Menu, null)),
|
|
342
309
|
React.createElement(Typography, { variant: 'h6', noWrap: true, component: 'div', sx: { flexGrow: 1 } }, titleData && (React.createElement(Title$1, { title: titleData.name, icon: titleData.icon, headTitle: titleData.parentName, headIcon: titleData.parentIcon }))),
|
|
343
310
|
appBarControl)),
|
|
344
|
-
React.createElement(
|
|
311
|
+
React.createElement(Box, { component: 'nav', "aria-label": 'mailbox folders', sx: sideMenuContainerBoxSx },
|
|
345
312
|
React.createElement(StyledSideMenuTemporaryDrawer, { variant: 'temporary', open: isMobileOpen, onClose: toggleIsMobileOpen, sx: sideMenuTemporaryDrawerSx, ModalProps: {
|
|
346
313
|
keepMounted: true, // Better open performance on mobile.
|
|
347
314
|
} }, menu && React.createElement(SideMenu$1, { logo: logo, badgeVariant: badgeVariant, list: menu })),
|
|
348
315
|
React.createElement(StyledSideMenuPermanentDrawer, { variant: 'permanent', open: true, sx: sideMenuPermanentDrawerSx }, menu && React.createElement(SideMenu$1, { logo: logo, badgeVariant: badgeVariant, list: menu }))),
|
|
349
|
-
React.createElement(
|
|
316
|
+
React.createElement(Box, { component: 'main', sx: mainBoxSx },
|
|
350
317
|
React.createElement(Toolbar, null),
|
|
351
318
|
React.createElement(StyledMainContentDiv, null, children))));
|
|
352
319
|
};export{CardLayout,DefaultLayout};
|
package/dist/index.js
CHANGED
|
@@ -1,33 +1,7 @@
|
|
|
1
|
-
'use strict';var material=require('@mui/material'),React=require('react'),reactRouterDom=require('react-router-dom'),iconsMaterial=require('@mui/icons-material'),util=require('@pdg/util'),SimpleBar=require('simplebar-react');function
|
|
2
|
-
if ( ref === void 0 ) ref = {};
|
|
3
|
-
var insertAt = ref.insertAt;
|
|
4
|
-
|
|
5
|
-
if (typeof document === 'undefined') { return; }
|
|
6
|
-
|
|
7
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
8
|
-
var style = document.createElement('style');
|
|
9
|
-
style.type = 'text/css';
|
|
10
|
-
|
|
11
|
-
if (insertAt === 'top') {
|
|
12
|
-
if (head.firstChild) {
|
|
13
|
-
head.insertBefore(style, head.firstChild);
|
|
14
|
-
} else {
|
|
15
|
-
head.appendChild(style);
|
|
16
|
-
}
|
|
17
|
-
} else {
|
|
18
|
-
head.appendChild(style);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (style.styleSheet) {
|
|
22
|
-
style.styleSheet.cssText = css;
|
|
23
|
-
} else {
|
|
24
|
-
style.appendChild(document.createTextNode(css));
|
|
25
|
-
}
|
|
26
|
-
}var css_248z = ".simplebar-track.simplebar-vertical {\n width: 8px !important;\n}\n.simplebar-track.simplebar-vertical .simplebar-scrollbar.simplebar-visible:before {\n opacity: 0.3 !important;\n}\n\n.MuiButtonBase-root.MuiButton-root.MuiButton-outlined {\n padding: 5px 15px 4px;\n}\n.MuiButtonBase-root.MuiButton-root.MuiButton-outlined.MuiButton-sizeLarge {\n padding: 7px 21px 6px;\n}\n.MuiButtonBase-root.MuiButton-root.MuiButton-outlined.MuiButton-sizeSmall {\n padding: 3px 9px 2px;\n}\n.MuiButtonBase-root.MuiButton-root.MuiButton-contained {\n padding: 6px 16px 5px;\n}\n.MuiButtonBase-root.MuiButton-root.MuiButton-contained.MuiButton-sizeLarge {\n padding: 8px 22px 7px;\n}\n.MuiButtonBase-root.MuiButton-root.MuiButton-contained.MuiButton-sizeSmall {\n padding: 4px 10px 3px;\n}\n.MuiButtonBase-root.MuiButton-root.MuiButton-text {\n padding: 6px 8px 5px;\n}\n.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-sizeLarge {\n padding: 8px 11px 7px;\n}\n.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-sizeSmall {\n padding: 4px 5px 3px;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo,\nmain,\ninput,\nbutton,\ntextarea,\npre,\nselect,\na {\n font-family: \"Pretendard\", \"Apple Gothic\", \"Dotum\", sans-serif;\n margin: 0;\n padding: 0;\n border: 0;\n vertical-align: top;\n box-sizing: border-box;\n word-break: keep-all;\n line-height: unset;\n}\n\n*:before,\n*:after {\n box-sizing: border-box;\n}";
|
|
27
|
-
styleInject(css_248z);var CardLayout = function (_a) {
|
|
1
|
+
'use strict';var material=require('@mui/material'),React=require('react'),reactRouterDom=require('react-router-dom'),iconsMaterial=require('@mui/icons-material'),util=require('@pdg/util'),SimpleBar=require('simplebar-react');var CardLayout = function (_a) {
|
|
28
2
|
var children = _a.children, _b = _a.backgroundColor, backgroundColor = _b === void 0 ? '#eff3f8' : _b;
|
|
29
3
|
return (React.createElement(material.Grid, { container: true, direction: 'column', alignItems: 'center', justifyContent: 'center', bgcolor: backgroundColor, minHeight: '100vh' },
|
|
30
|
-
React.createElement(material.Grid,
|
|
4
|
+
React.createElement(material.Grid, null, children)));
|
|
31
5
|
};/******************************************************************************
|
|
32
6
|
Copyright (c) Microsoft Corporation.
|
|
33
7
|
|
|
@@ -42,7 +16,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
42
16
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
43
17
|
PERFORMANCE OF THIS SOFTWARE.
|
|
44
18
|
***************************************************************************** */
|
|
45
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
19
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
46
20
|
|
|
47
21
|
|
|
48
22
|
var __assign = function() {
|
|
@@ -205,10 +179,6 @@ var StyledAppBar = material.styled(material.AppBar)(function (_a) {
|
|
|
205
179
|
borderBottom: 'thin solid #f5f5f5',
|
|
206
180
|
});
|
|
207
181
|
});
|
|
208
|
-
var StyledSideMenuContainerBox = material.styled(material.Box)(function (_a) {
|
|
209
|
-
var theme = _a.theme;
|
|
210
|
-
return theme.unstable_sx({});
|
|
211
|
-
});
|
|
212
182
|
var StyledSideMenuTemporaryDrawer = material.styled(material.Drawer)(function (_a) {
|
|
213
183
|
var theme = _a.theme;
|
|
214
184
|
return theme.unstable_sx({
|
|
@@ -221,16 +191,6 @@ var StyledSideMenuPermanentDrawer = material.styled(material.Drawer)(function (_
|
|
|
221
191
|
'& .MuiDrawer-paper': { boxSizing: 'border-box', width: SIDE_MENU_WIDTH },
|
|
222
192
|
});
|
|
223
193
|
});
|
|
224
|
-
var StyledMainBox = material.styled(material.Box)(function (_a) {
|
|
225
|
-
var theme = _a.theme;
|
|
226
|
-
return theme.unstable_sx({
|
|
227
|
-
flexGrow: 1,
|
|
228
|
-
p: 2,
|
|
229
|
-
display: 'flex',
|
|
230
|
-
flexDirection: 'column',
|
|
231
|
-
minHeight: '100vh',
|
|
232
|
-
});
|
|
233
|
-
});
|
|
234
194
|
var StyledMainContentDiv = material.styled('div')(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n flex: 1;\n"], ["\n display: flex;\n flex-direction: column;\n flex: 1;\n"])));
|
|
235
195
|
var templateObject_1, templateObject_2;var SCREENS = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
236
196
|
var _getNextScreen = function (screen) {
|
|
@@ -329,7 +289,14 @@ var DefaultLayout = function (_a) {
|
|
|
329
289
|
width: (_e = {}, _e[nextMenuScreen] = SIDE_MENU_WIDTH, _e),
|
|
330
290
|
flexShrink: (_f = {}, _f[nextMenuScreen] = 0, _f),
|
|
331
291
|
};
|
|
332
|
-
var mainBoxSx = {
|
|
292
|
+
var mainBoxSx = {
|
|
293
|
+
width: (_g = {}, _g[nextMenuScreen] = "calc(100% - ".concat(SIDE_MENU_WIDTH, "px)"), _g),
|
|
294
|
+
flexGrow: 1,
|
|
295
|
+
p: 2,
|
|
296
|
+
display: 'flex',
|
|
297
|
+
flexDirection: 'column',
|
|
298
|
+
minHeight: '100vh',
|
|
299
|
+
};
|
|
333
300
|
var titleData = menuTitles[location.pathname];
|
|
334
301
|
/********************************************************************************************************************
|
|
335
302
|
* Render
|
|
@@ -341,12 +308,12 @@ var DefaultLayout = function (_a) {
|
|
|
341
308
|
React.createElement(iconsMaterial.Menu, null)),
|
|
342
309
|
React.createElement(material.Typography, { variant: 'h6', noWrap: true, component: 'div', sx: { flexGrow: 1 } }, titleData && (React.createElement(Title$1, { title: titleData.name, icon: titleData.icon, headTitle: titleData.parentName, headIcon: titleData.parentIcon }))),
|
|
343
310
|
appBarControl)),
|
|
344
|
-
React.createElement(
|
|
311
|
+
React.createElement(material.Box, { component: 'nav', "aria-label": 'mailbox folders', sx: sideMenuContainerBoxSx },
|
|
345
312
|
React.createElement(StyledSideMenuTemporaryDrawer, { variant: 'temporary', open: isMobileOpen, onClose: toggleIsMobileOpen, sx: sideMenuTemporaryDrawerSx, ModalProps: {
|
|
346
313
|
keepMounted: true, // Better open performance on mobile.
|
|
347
314
|
} }, menu && React.createElement(SideMenu$1, { logo: logo, badgeVariant: badgeVariant, list: menu })),
|
|
348
315
|
React.createElement(StyledSideMenuPermanentDrawer, { variant: 'permanent', open: true, sx: sideMenuPermanentDrawerSx }, menu && React.createElement(SideMenu$1, { logo: logo, badgeVariant: badgeVariant, list: menu }))),
|
|
349
|
-
React.createElement(
|
|
316
|
+
React.createElement(material.Box, { component: 'main', sx: mainBoxSx },
|
|
350
317
|
React.createElement(material.Toolbar, null),
|
|
351
318
|
React.createElement(StyledMainContentDiv, null, children))));
|
|
352
319
|
};exports.CardLayout=CardLayout;exports.DefaultLayout=DefaultLayout;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pdg/react-admin-layout",
|
|
3
3
|
"title": "React Admin Layout",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.37",
|
|
5
5
|
"description": "Admin Layout for React",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -42,36 +42,37 @@
|
|
|
42
42
|
"javascript"
|
|
43
43
|
],
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@emotion/react": "^11.
|
|
46
|
-
"@emotion/styled": "^11.
|
|
47
|
-
"@mui/icons-material": "^
|
|
48
|
-
"@mui/material": "^
|
|
45
|
+
"@emotion/react": "^11.14.0",
|
|
46
|
+
"@emotion/styled": "^11.14.0",
|
|
47
|
+
"@mui/icons-material": "^7.0.2",
|
|
48
|
+
"@mui/material": "^7.0.2",
|
|
49
49
|
"@pdg/util": "^1.0.22",
|
|
50
|
-
"@types/react": "^17.0.0 || ^18.0.0",
|
|
51
|
-
"react": "^17.0.0 || ^18.0.0",
|
|
52
|
-
"react-dom": "^17.0.0 || ^18.0.0",
|
|
53
|
-
"react-router-dom": "^6.
|
|
54
|
-
"simplebar-react": "3.
|
|
50
|
+
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
51
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
52
|
+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
53
|
+
"react-router-dom": "^6.30.0",
|
|
54
|
+
"simplebar-react": "3.3.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@rollup/plugin-commonjs": "^
|
|
57
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
58
58
|
"@rollup/plugin-eslint": "^9.0.5",
|
|
59
|
-
"@rollup/plugin-node-resolve": "^
|
|
60
|
-
"@
|
|
61
|
-
"@typescript-eslint/
|
|
62
|
-
"eslint": "8.
|
|
63
|
-
"eslint
|
|
64
|
-
"eslint-
|
|
65
|
-
"eslint-plugin-
|
|
66
|
-
"eslint-plugin-
|
|
67
|
-
"eslint-plugin-react
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"rollup
|
|
59
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
60
|
+
"@types/node": "^22.14.0",
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "^8.29.1",
|
|
62
|
+
"@typescript-eslint/parser": "^8.29.1",
|
|
63
|
+
"eslint": "8.57.1",
|
|
64
|
+
"eslint-config-prettier": "^10.1.2",
|
|
65
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
66
|
+
"eslint-plugin-prettier": "^5.2.6",
|
|
67
|
+
"eslint-plugin-react": "^7.37.5",
|
|
68
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
69
|
+
"prettier": "^3.5.3",
|
|
70
|
+
"rollup": "^4.39.0",
|
|
71
|
+
"rollup-plugin-delete": "^2.2.0",
|
|
71
72
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
72
|
-
"rollup-plugin-
|
|
73
|
+
"rollup-plugin-scss": "^4.0.1",
|
|
73
74
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
74
|
-
"sass": "^1.
|
|
75
|
-
"typescript": "^5.
|
|
75
|
+
"sass": "^1.86.3",
|
|
76
|
+
"typescript": "^5.8.3"
|
|
76
77
|
}
|
|
77
78
|
}
|