@pdg/react-admin-layout 1.0.38 → 1.0.41
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/index.esm.js +27 -1
- package/dist/index.js +30 -4
- package/package.json +12 -11
- package/dist/assets/output-CGt0B9WV.css +0 -137
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
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
|
|
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';import {ExpandMore,Menu}from'@mui/icons-material';import {notEmpty,empty}from'@pdg/util';import SimpleBar from'simplebar-react';function styleInject(css, ref) {
|
|
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) {
|
|
2
28
|
var children = _a.children, _b = _a.backgroundColor, backgroundColor = _b === void 0 ? '#eff3f8' : _b;
|
|
3
29
|
return (React.createElement(Grid, { container: true, direction: 'column', alignItems: 'center', justifyContent: 'center', bgcolor: backgroundColor, minHeight: '100vh' },
|
|
4
30
|
React.createElement(Grid, null, children)));
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
1
|
-
'use strict';var material=require('@mui/material'),React=require('react'),
|
|
1
|
+
'use strict';var material=require('@mui/material'),React=require('react'),reactRouter=require('react-router'),iconsMaterial=require('@mui/icons-material'),util=require('@pdg/util'),SimpleBar=require('simplebar-react');function styleInject(css, ref) {
|
|
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) {
|
|
2
28
|
var children = _a.children, _b = _a.backgroundColor, backgroundColor = _b === void 0 ? '#eff3f8' : _b;
|
|
3
29
|
return (React.createElement(material.Grid, { container: true, direction: 'column', alignItems: 'center', justifyContent: 'center', bgcolor: backgroundColor, minHeight: '100vh' },
|
|
4
30
|
React.createElement(material.Grid, null, children)));
|
|
@@ -44,8 +70,8 @@ var templateObject_1$4, templateObject_2$2;var SideMenuListItem = function (_a)
|
|
|
44
70
|
* Use
|
|
45
71
|
* ******************************************************************************************************************/
|
|
46
72
|
var info = _a.info, badgeVariant = _a.badgeVariant, expandedBackgroundColor = _a.expandedBackgroundColor;
|
|
47
|
-
var location =
|
|
48
|
-
var navigate =
|
|
73
|
+
var location = reactRouter.useLocation();
|
|
74
|
+
var navigate = reactRouter.useNavigate();
|
|
49
75
|
/********************************************************************************************************************
|
|
50
76
|
* State
|
|
51
77
|
* ******************************************************************************************************************/
|
|
@@ -209,7 +235,7 @@ var DefaultLayout = function (_a) {
|
|
|
209
235
|
* ******************************************************************************************************************/
|
|
210
236
|
var _b, _c, _d, _e, _f, _g;
|
|
211
237
|
var children = _a.children, logo = _a.logo, badgeVariant = _a.badgeVariant, menu = _a.menu, _h = _a.menuHideScreen, menuHideScreen = _h === void 0 ? 'sm' : _h, appBarControl = _a.appBarControl;
|
|
212
|
-
var location =
|
|
238
|
+
var location = reactRouter.useLocation();
|
|
213
239
|
/********************************************************************************************************************
|
|
214
240
|
* State
|
|
215
241
|
* ******************************************************************************************************************/
|
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.41",
|
|
5
5
|
"description": "Admin Layout for React",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -42,23 +42,24 @@
|
|
|
42
42
|
"javascript"
|
|
43
43
|
],
|
|
44
44
|
"peerDependencies": {
|
|
45
|
+
"react": ">=17.0.0",
|
|
46
|
+
"react-dom": ">=17.0.0"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
45
49
|
"@emotion/react": "^11.14.0",
|
|
46
50
|
"@emotion/styled": "^11.14.0",
|
|
47
|
-
"@mui/icons-material": "^7.0
|
|
48
|
-
"@mui/material": "^7.0
|
|
49
|
-
"@pdg/util": "^1.0.
|
|
50
|
-
"
|
|
51
|
-
"react": "
|
|
52
|
-
"react-dom": ">=17.0.0",
|
|
53
|
-
"react-router-dom": "^7.5.0",
|
|
54
|
-
"simplebar-react": "3.3.0"
|
|
51
|
+
"@mui/icons-material": "^7.1.0",
|
|
52
|
+
"@mui/material": "^7.1.0",
|
|
53
|
+
"@pdg/util": "^1.0.24",
|
|
54
|
+
"react-router": "^7.6.1",
|
|
55
|
+
"simplebar-react": "^3.3.1"
|
|
55
56
|
},
|
|
56
57
|
"devDependencies": {
|
|
57
|
-
"@eslint/js": "^9.24.0",
|
|
58
58
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
59
59
|
"@rollup/plugin-eslint": "^9.0.5",
|
|
60
60
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
61
61
|
"@types/node": "^22.14.0",
|
|
62
|
+
"@types/react": "^19.1.6",
|
|
62
63
|
"@typescript-eslint/eslint-plugin": "^8.29.1",
|
|
63
64
|
"@typescript-eslint/parser": "^8.29.1",
|
|
64
65
|
"eslint": "8.57.1",
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
"rollup": "^4.39.0",
|
|
72
73
|
"rollup-plugin-delete": "^2.2.0",
|
|
73
74
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
74
|
-
"rollup-plugin-
|
|
75
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
75
76
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
76
77
|
"sass": "^1.86.3",
|
|
77
78
|
"typescript": "^5.8.3"
|
|
@@ -1,137 +0,0 @@
|
|
|
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
|
-
}
|