rc-lib-ui 1.2.17 → 1.2.19
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/Dashboard/components/ListMemu/ListMenu.d.ts +1 -0
- package/dist/Dashboard/components/ListMemu/ui/styled.d.ts +9 -0
- package/dist/{Tooltips-D4gQprYO.js → Tooltips-Q_C8jHNF.js} +18 -18
- package/dist/common/ControlStatusItem.d.ts +5 -3
- package/dist/dashboard.js +286 -248
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/Dashboard/components/ListMemu/ui/ListButtonInner.d.ts +0 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface StyledListItemProps {
|
|
2
|
+
visual: "variant1" | "variant2";
|
|
3
|
+
}
|
|
4
|
+
export declare const StyledListItem: import('@emotion/styled').StyledComponent<{
|
|
5
|
+
button?: false;
|
|
6
|
+
} & import('@mui/material').ListItemOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
7
|
+
ref?: ((instance: HTMLLIElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLLIElement> | null | undefined;
|
|
8
|
+
}, "className" | "style" | "classes" | "alignItems" | "children" | "sx" | "button" | "autoFocus" | "dense" | "components" | "componentsProps" | "slotProps" | "slots" | "disabled" | "selected" | "disableGutters" | "divider" | "disablePadding" | "ContainerComponent" | "ContainerProps" | "secondaryAction"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & StyledListItemProps, {}, {}>;
|
|
9
|
+
export {};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { styled as a, Tooltip as p, tooltipClasses as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
[`& .${
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { styled as a, Tooltip as p, tooltipClasses as l } from "@mui/material";
|
|
3
|
+
import c from "react";
|
|
4
|
+
const i = a(({ className: o, ...t }) => /* @__PURE__ */ r(p, { ...t, classes: { popper: o } }))(({ theme: o }) => ({
|
|
5
|
+
[`& .${l.tooltip}`]: {
|
|
6
6
|
backgroundColor: "#f5f5f9",
|
|
7
7
|
color: "rgba(0, 0, 0, 0.87)",
|
|
8
8
|
maxWidth: 220,
|
|
9
9
|
fontSize: o.typography.pxToRem(12),
|
|
10
10
|
border: "1px solid #dadde9"
|
|
11
11
|
}
|
|
12
|
-
})),
|
|
13
|
-
[`& .${
|
|
12
|
+
})), n = a(({ className: o, ...t }) => /* @__PURE__ */ r(p, { ...t, classes: { popper: o } }))(({ theme: o }) => ({
|
|
13
|
+
[`& .${l.tooltip}`]: {
|
|
14
14
|
backgroundColor: o.palette.common.white,
|
|
15
15
|
color: "rgba(0, 0, 0, 0.87)",
|
|
16
16
|
boxShadow: o.shadows[1],
|
|
17
17
|
fontSize: 11
|
|
18
18
|
}
|
|
19
|
-
})),
|
|
20
|
-
[`& .${
|
|
19
|
+
})), m = a(({ className: o, ...t }) => /* @__PURE__ */ r(p, { ...t, arrow: !0, classes: { popper: o } }))(({ theme: o }) => ({
|
|
20
|
+
[`& .${l.arrow}`]: {
|
|
21
21
|
color: o.palette.common.black
|
|
22
22
|
},
|
|
23
|
-
[`& .${
|
|
23
|
+
[`& .${l.tooltip}`]: {
|
|
24
24
|
backgroundColor: o.palette.common.black
|
|
25
25
|
}
|
|
26
|
-
})),
|
|
27
|
-
html:
|
|
28
|
-
light:
|
|
29
|
-
bootstrap:
|
|
26
|
+
})), s = {
|
|
27
|
+
html: i,
|
|
28
|
+
light: n,
|
|
29
|
+
bootstrap: m,
|
|
30
30
|
default: p
|
|
31
31
|
}, d = ({ variant: o = "default", ...t }) => {
|
|
32
|
-
const
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
},
|
|
32
|
+
const e = s[o] || s.default;
|
|
33
|
+
return /* @__PURE__ */ r(e, { ...t });
|
|
34
|
+
}, g = c.memo(d);
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
g as T
|
|
37
37
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
export interface ControlStatusItemProps {
|
|
3
|
+
defaultStatus?: boolean;
|
|
3
4
|
render(p: {
|
|
4
5
|
is: boolean;
|
|
5
|
-
|
|
6
|
+
id: string;
|
|
6
7
|
handleToggle: () => void;
|
|
8
|
+
setID: (id: string) => void;
|
|
7
9
|
}): ReactNode;
|
|
8
10
|
}
|
|
9
|
-
export declare const ControlStatusItem: ({ render }: ControlStatusItemProps) => ReactNode;
|
|
11
|
+
export declare const ControlStatusItem: ({ render, defaultStatus }: ControlStatusItemProps) => ReactNode;
|
package/dist/dashboard.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { U as
|
|
8
|
-
import { ExpandLess as
|
|
9
|
-
import { T as
|
|
10
|
-
import { NavLink as
|
|
11
|
-
import
|
|
12
|
-
const
|
|
1
|
+
import { jsx as d, jsxs as f, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import { styled as p, ListItemButton as ci, Typography as di, ListItemIcon as hi, List as ai, ListItem as si, Collapse as fi, Box as J, AppBar as pi, Container as gi, Toolbar as ui, Drawer as xi, Divider as Z, IconButton as mi } from "@mui/material";
|
|
3
|
+
import { useTheme as wi } from "@mui/material/styles";
|
|
4
|
+
import R, { useState as B, useCallback as P, useRef as K, useEffect as Q, forwardRef as _, useMemo as li, Fragment as bi, useImperativeHandle as vi } from "react";
|
|
5
|
+
import Si from "@mui/icons-material/ChevronLeft";
|
|
6
|
+
import Ci from "@mui/icons-material/ChevronRight";
|
|
7
|
+
import { U as Li, s as Ii } from "./index-B7GqTJat.js";
|
|
8
|
+
import { ExpandLess as yi, ExpandMore as Wi } from "@mui/icons-material";
|
|
9
|
+
import { T as Hi } from "./Tooltips-Q_C8jHNF.js";
|
|
10
|
+
import { NavLink as ki } from "react-router-dom";
|
|
11
|
+
import G from "classnames";
|
|
12
|
+
const Di = p("main")(() => ({
|
|
13
13
|
display: "flex",
|
|
14
14
|
flexDirection: "column",
|
|
15
15
|
flexGrow: 1
|
|
16
|
-
})),
|
|
16
|
+
})), Mi = p("div")(({ theme: i }) => ({
|
|
17
17
|
display: "flex",
|
|
18
18
|
alignItems: "center",
|
|
19
19
|
justifyContent: "center",
|
|
@@ -30,82 +30,81 @@ const Ii = g("main")(() => ({
|
|
|
30
30
|
easing: i.transitions.easing.sharp,
|
|
31
31
|
duration: i.transitions.duration.enteringScreen
|
|
32
32
|
})
|
|
33
|
-
})),
|
|
34
|
-
const { newProp:
|
|
33
|
+
})), ii = (i) => typeof i == "number" ? i + "px" : i, Ti = (i, a = {}) => {
|
|
34
|
+
const { newProp: l = "marginLeft", positionCorrect: e = "- 0px" } = a;
|
|
35
35
|
let n = {};
|
|
36
|
-
for (const [
|
|
37
|
-
if (typeof
|
|
38
|
-
const r =
|
|
39
|
-
n[
|
|
36
|
+
for (const [t, o] of Object.entries(i))
|
|
37
|
+
if (typeof o == "object" && "width" in o) {
|
|
38
|
+
const r = ii(o == null ? void 0 : o.width);
|
|
39
|
+
n[t] = { [l]: `calc(${r} ${e})` };
|
|
40
40
|
} else {
|
|
41
|
-
const r =
|
|
42
|
-
n[
|
|
41
|
+
const r = ii(o);
|
|
42
|
+
n[l] = `calc(${r} ${e})`;
|
|
43
43
|
}
|
|
44
44
|
return n;
|
|
45
|
-
},
|
|
46
|
-
const [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
},
|
|
45
|
+
}, $i = ({ render: i, defaultStatus: a = !1 }) => {
|
|
46
|
+
const [l, e] = B({ is: a, id: "" }), n = P(() => {
|
|
47
|
+
e((o) => ({ ...o, is: !o.is }));
|
|
48
|
+
}, []), t = P((o) => {
|
|
49
|
+
e((r) => ({ ...r, id: o }));
|
|
50
|
+
}, []);
|
|
51
|
+
return i({ ...l, setID: t, handleToggle: n });
|
|
52
|
+
}, Ri = p(ci, {
|
|
51
53
|
shouldForwardProp: (i) => !["minHeight"].includes(i)
|
|
52
54
|
})(({ minHeight: i }) => ({
|
|
53
55
|
minHeight: i,
|
|
54
|
-
padding: "
|
|
56
|
+
padding: "0px",
|
|
55
57
|
paddingLeft: 0,
|
|
56
58
|
transition: "height .1s ease-in-out",
|
|
57
59
|
overflow: "hidden"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
// ':hover': { backgroundColor: 'transparent' },
|
|
61
|
+
})), j = { minHeight: 48, height: 0 }, U = ({ sx: i = {}, isWrapText: a, isOpen: l, ...e }) => {
|
|
62
|
+
const n = K(null), [t, o] = B(j);
|
|
63
|
+
return Q(() => {
|
|
64
|
+
if (a && (n != null && n.current)) {
|
|
62
65
|
const { scrollHeight: r, clientHeight: c } = n == null ? void 0 : n.current;
|
|
63
|
-
|
|
66
|
+
l ? (!t.height && o((x) => ({ ...x, height: c })), r !== c && o({ ...j, height: r + c })) : o({ ...j, height: j.minHeight });
|
|
64
67
|
}
|
|
65
|
-
}, [
|
|
66
|
-
|
|
68
|
+
}, [l]), /* @__PURE__ */ d(
|
|
69
|
+
Ri,
|
|
67
70
|
{
|
|
68
|
-
minHeight:
|
|
71
|
+
minHeight: t.minHeight,
|
|
69
72
|
ref: n,
|
|
70
73
|
sx: i,
|
|
71
|
-
...
|
|
74
|
+
...e
|
|
72
75
|
}
|
|
73
76
|
);
|
|
74
|
-
},
|
|
75
|
-
const [n,
|
|
76
|
-
return
|
|
77
|
-
if (!i &&
|
|
78
|
-
const r =
|
|
79
|
-
r != null && r.offsetWidth && (r == null ? void 0 : r.scrollWidth) > (r == null ? void 0 : r.offsetWidth) && l
|
|
77
|
+
}, Bi = ({ unmount: i, isWrapText: a, title: l, sx: e = {} }) => {
|
|
78
|
+
const [n, t] = B(""), o = K(null);
|
|
79
|
+
return Q(() => {
|
|
80
|
+
if (!i && o.current) {
|
|
81
|
+
const r = o.current, c = setTimeout(() => {
|
|
82
|
+
r != null && r.offsetWidth && (r == null ? void 0 : r.scrollWidth) > (r == null ? void 0 : r.offsetWidth) && t(l), clearTimeout(c);
|
|
80
83
|
}, 200);
|
|
81
84
|
}
|
|
82
|
-
}, [
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
+
}, [l, i]), a ? !i && /* @__PURE__ */ d(di, { children: l, sx: { textWrap: "wrap", overflowWrap: "break-word", ...e } }) : !i && /* @__PURE__ */ d(zi, { ref: o, tooltipText: n, title: l, sx: e });
|
|
86
|
+
}, E = R.memo(Bi), zi = _(({ tooltipText: i, title: a, sx: l }, e) => /* @__PURE__ */ d(Hi, { variant: "default", title: i, children: /* @__PURE__ */ d(di, { component: "span", ref: e, children: a, noWrap: !0, sx: l }) })), Ni = _(({ className: i = "", ...a }, l) => /* @__PURE__ */ d(
|
|
87
|
+
ki,
|
|
85
88
|
{
|
|
86
|
-
ref:
|
|
87
|
-
className: ({ isActive:
|
|
89
|
+
ref: l,
|
|
90
|
+
className: ({ isActive: e }) => e ? i + " Mui-selected" : i,
|
|
88
91
|
end: !0,
|
|
89
|
-
...
|
|
92
|
+
...a
|
|
90
93
|
}
|
|
91
|
-
)),
|
|
92
|
-
|
|
94
|
+
)), ni = R.memo(Ni), X = ({ icon: i, sx: a }) => /* @__PURE__ */ d(
|
|
95
|
+
hi,
|
|
93
96
|
{
|
|
94
97
|
sx: {
|
|
95
98
|
minWidth: 40,
|
|
96
|
-
position: "absolute",
|
|
97
|
-
left: 0,
|
|
98
|
-
top: 0,
|
|
99
|
-
bottom: 0,
|
|
100
99
|
alignItems: "center",
|
|
101
100
|
justifyContent: "center",
|
|
102
|
-
...
|
|
101
|
+
...a
|
|
103
102
|
},
|
|
104
103
|
children: i
|
|
105
104
|
}
|
|
106
|
-
),
|
|
105
|
+
), Oi = p(ai, {
|
|
107
106
|
shouldForwardProp: (i) => !["styleList", "isScrollIndentation"].includes(i)
|
|
108
|
-
})(({ theme: i, styleList:
|
|
107
|
+
})(({ theme: i, styleList: a = "variant1" }) => ({
|
|
109
108
|
display: "flex",
|
|
110
109
|
flexDirection: "column",
|
|
111
110
|
overflowX: "hidden",
|
|
@@ -133,15 +132,36 @@ const Ii = g("main")(() => ({
|
|
|
133
132
|
// scrollbarWidth: 'thin !important'
|
|
134
133
|
}
|
|
135
134
|
},
|
|
136
|
-
minWidth:
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
},
|
|
140
|
-
...
|
|
141
|
-
|
|
142
|
-
|
|
135
|
+
minWidth: a === "variant1" ? "40px" : "53px"
|
|
136
|
+
// '& .MuiCollapse-root .MuiButtonBase-root': {
|
|
137
|
+
// // marginLeft: theme.spacing(1.5),
|
|
138
|
+
// },
|
|
139
|
+
// ...(styleList === 'variant1') && {
|
|
140
|
+
// '& .MuiCollapse-root .MuiButtonBase-root': {
|
|
141
|
+
// paddingLeft: theme.spacing(1.5),
|
|
142
|
+
// },
|
|
143
|
+
// },
|
|
144
|
+
// ...(styleList === 'variant2') && {
|
|
145
|
+
// '& .MuiListItem-root': {
|
|
146
|
+
// padding: `0 ${theme.spacing(1)}`,
|
|
147
|
+
// },
|
|
148
|
+
// '& .MuiButtonBase-root': {
|
|
149
|
+
// borderRadius: '5px',
|
|
150
|
+
// '&.Mui-selected': {
|
|
151
|
+
// backgroundColor: 'rgba(33,150,243, 0.16)'
|
|
152
|
+
// }
|
|
153
|
+
// },
|
|
154
|
+
// }
|
|
155
|
+
})), Y = p(si, {
|
|
156
|
+
shouldForwardProp: (i) => !["visual"].includes(i)
|
|
157
|
+
})(({ theme: i, visual: a }) => ({
|
|
158
|
+
...a === "variant2" && {
|
|
159
|
+
"&": {
|
|
143
160
|
padding: `0 ${i.spacing(1)}`
|
|
144
161
|
},
|
|
162
|
+
"& .MuiListItemIcon-root": {
|
|
163
|
+
marginLeft: `-${i.spacing(1)}`
|
|
164
|
+
},
|
|
145
165
|
"& .MuiButtonBase-root": {
|
|
146
166
|
borderRadius: "5px",
|
|
147
167
|
"&.Mui-selected": {
|
|
@@ -149,95 +169,112 @@ const Ii = g("main")(() => ({
|
|
|
149
169
|
}
|
|
150
170
|
}
|
|
151
171
|
}
|
|
152
|
-
})),
|
|
153
|
-
const { minWidthColumn:
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
),
|
|
165
|
-
/* @__PURE__ */ h(
|
|
166
|
-
A,
|
|
172
|
+
})), q = ({ isIcon: i }) => ({ paddingRight: 1.2, ...!i && { paddingLeft: 1.2 } }), Fi = _(({ styleList: i = "variant1", isRight: a, columnMenu: l, isWrapText: e = !1, listMenu: n, isOpen: t, sx: o, className: r }, c) => {
|
|
173
|
+
const { minWidthColumn: x } = l, [I, v] = B(""), y = li(() => n.map(({ action: W, icon: g, title: z, sx: H = {}, onClick: S, children: m, to: k }, h) => {
|
|
174
|
+
const D = `${h}`, w = (s) => {
|
|
175
|
+
v(D), S && S(s);
|
|
176
|
+
};
|
|
177
|
+
return m && Array.isArray(m) ? /* @__PURE__ */ d(bi, { children: /* @__PURE__ */ d(
|
|
178
|
+
$i,
|
|
179
|
+
{
|
|
180
|
+
defaultStatus: t,
|
|
181
|
+
render: (s) => /* @__PURE__ */ f(A, { children: [
|
|
182
|
+
/* @__PURE__ */ d(Y, { disablePadding: !0, sx: H, visual: i, children: /* @__PURE__ */ f(
|
|
183
|
+
U,
|
|
167
184
|
{
|
|
168
|
-
isOpen:
|
|
169
|
-
isWrapText:
|
|
170
|
-
onClick: (
|
|
171
|
-
|
|
185
|
+
isOpen: s.is,
|
|
186
|
+
isWrapText: e,
|
|
187
|
+
onClick: (M) => {
|
|
188
|
+
s.handleToggle(), typeof S == "function" && S(M);
|
|
172
189
|
},
|
|
190
|
+
sx: { ...q({ isIcon: g }) },
|
|
173
191
|
children: [
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
|
|
192
|
+
g && /* @__PURE__ */ d(
|
|
193
|
+
X,
|
|
194
|
+
{
|
|
195
|
+
icon: g,
|
|
196
|
+
sx: x
|
|
197
|
+
}
|
|
198
|
+
),
|
|
199
|
+
/* @__PURE__ */ d(
|
|
200
|
+
E,
|
|
176
201
|
{
|
|
177
|
-
unmount: !
|
|
178
|
-
title:
|
|
179
|
-
sx: { flexGrow: 1
|
|
180
|
-
isWrapText:
|
|
202
|
+
unmount: !t,
|
|
203
|
+
title: z,
|
|
204
|
+
sx: { flexGrow: 1 },
|
|
205
|
+
isWrapText: e
|
|
181
206
|
}
|
|
182
207
|
),
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
208
|
+
t && /* @__PURE__ */ f(A, { children: [
|
|
209
|
+
W,
|
|
210
|
+
s.is ? /* @__PURE__ */ d(yi, {}) : /* @__PURE__ */ d(Wi, {})
|
|
186
211
|
] })
|
|
187
212
|
]
|
|
188
213
|
}
|
|
189
|
-
)
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
214
|
+
) }),
|
|
215
|
+
/* @__PURE__ */ d(fi, { in: s.is && t, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ d(ai, { disablePadding: !0, children: m.map(({ action: M, icon: T, title: N, to: C, sx: O = {}, onClick: $ }, F) => {
|
|
216
|
+
const L = `${h}-${F}`, b = (u) => {
|
|
217
|
+
v(L), $ && $(u);
|
|
218
|
+
};
|
|
219
|
+
return /* @__PURE__ */ d(Y, { disablePadding: !0, sx: O, visual: i, children: /* @__PURE__ */ f(
|
|
220
|
+
U,
|
|
221
|
+
{
|
|
222
|
+
sx: { paddingRight: 1.2, ...!T && { paddingLeft: 2.5 } },
|
|
223
|
+
isOpen: !0,
|
|
224
|
+
onClick: b,
|
|
225
|
+
isWrapText: e,
|
|
226
|
+
...C ? { to: C, component: ni } : { to: "", className: G({ "Mui-selected": I === L }) },
|
|
227
|
+
children: [
|
|
228
|
+
T && /* @__PURE__ */ d(X, { icon: T, sx: { ...x, marginLeft: "8px !important" } }),
|
|
229
|
+
/* @__PURE__ */ d(
|
|
230
|
+
E,
|
|
231
|
+
{
|
|
232
|
+
unmount: !t,
|
|
233
|
+
title: N,
|
|
234
|
+
isWrapText: e
|
|
235
|
+
}
|
|
236
|
+
),
|
|
237
|
+
t && M
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
) }, L);
|
|
241
|
+
}) }) })
|
|
242
|
+
] })
|
|
243
|
+
}
|
|
244
|
+
) }, h) : /* @__PURE__ */ d(Y, { disablePadding: !0, sx: H, visual: i, children: /* @__PURE__ */ f(
|
|
245
|
+
U,
|
|
246
|
+
{
|
|
247
|
+
isOpen: t,
|
|
248
|
+
onClick: w,
|
|
249
|
+
isWrapText: e,
|
|
250
|
+
...k ? { to: k, component: ni } : { to: "", className: G({ "Mui-selected": I === D }) },
|
|
251
|
+
sx: { ...q({ isIcon: g }) },
|
|
252
|
+
children: [
|
|
253
|
+
g && /* @__PURE__ */ d(X, { icon: g, sx: x }),
|
|
254
|
+
/* @__PURE__ */ d(
|
|
255
|
+
E,
|
|
256
|
+
{
|
|
257
|
+
unmount: !t,
|
|
258
|
+
title: z,
|
|
259
|
+
isWrapText: e
|
|
260
|
+
}
|
|
261
|
+
),
|
|
262
|
+
t && W
|
|
263
|
+
]
|
|
264
|
+
}
|
|
265
|
+
) }, h);
|
|
266
|
+
}), [n, t, I, a, q]);
|
|
267
|
+
return /* @__PURE__ */ d(
|
|
268
|
+
Oi,
|
|
232
269
|
{
|
|
233
|
-
ref:
|
|
270
|
+
ref: c,
|
|
234
271
|
styleList: i,
|
|
235
|
-
sx:
|
|
236
|
-
className:
|
|
237
|
-
children:
|
|
272
|
+
sx: o,
|
|
273
|
+
className: r,
|
|
274
|
+
children: y
|
|
238
275
|
}
|
|
239
276
|
);
|
|
240
|
-
}),
|
|
277
|
+
}), ji = R.memo(Fi), Ai = p(J, {
|
|
241
278
|
target: "MuiFooter-root",
|
|
242
279
|
shouldForwardProp: (i) => ![""].includes(i)
|
|
243
280
|
})(({}) => ({
|
|
@@ -246,206 +283,207 @@ const Ii = g("main")(() => ({
|
|
|
246
283
|
// bottom: 0,
|
|
247
284
|
// right: 0,
|
|
248
285
|
minHeight: 48
|
|
249
|
-
})),
|
|
286
|
+
})), Gi = ({
|
|
250
287
|
initWidth: i,
|
|
251
|
-
isOpen:
|
|
252
|
-
children:
|
|
253
|
-
isRight:
|
|
288
|
+
isOpen: a,
|
|
289
|
+
children: l,
|
|
290
|
+
isRight: e,
|
|
254
291
|
isHeaderResize: n = !0,
|
|
255
|
-
bgColor:
|
|
256
|
-
className:
|
|
292
|
+
bgColor: t,
|
|
293
|
+
className: o,
|
|
257
294
|
AfterComponent: r,
|
|
258
295
|
sx: c
|
|
259
|
-
}) => /* @__PURE__ */
|
|
260
|
-
|
|
296
|
+
}) => /* @__PURE__ */ f(
|
|
297
|
+
Vi,
|
|
261
298
|
{
|
|
262
|
-
className:
|
|
263
|
-
bgColor:
|
|
264
|
-
isRight:
|
|
299
|
+
className: o,
|
|
300
|
+
bgColor: t,
|
|
301
|
+
isRight: e,
|
|
265
302
|
position: "fixed",
|
|
266
303
|
initWidth: i,
|
|
267
|
-
isOpen:
|
|
304
|
+
isOpen: a,
|
|
268
305
|
isHeaderResize: n,
|
|
269
306
|
sx: c,
|
|
270
307
|
children: [
|
|
271
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ d(gi, { maxWidth: "xl", children: /* @__PURE__ */ d(ui, { sx: { flexGrow: 1 }, disableGutters: !0, children: l }) }),
|
|
272
309
|
r && r
|
|
273
310
|
]
|
|
274
311
|
}
|
|
275
|
-
),
|
|
312
|
+
), _i = R.memo(Gi), Vi = p(pi, {
|
|
276
313
|
shouldForwardProp: (i) => !["isOpen", "isRight", "initWidth", "bgColor", "isHeaderResize"].includes(i)
|
|
277
|
-
})(({ theme: i, isOpen:
|
|
278
|
-
backgroundColor:
|
|
314
|
+
})(({ theme: i, isOpen: a, isRight: l, initWidth: e = 250, bgColor: n = "primary", isHeaderResize: t }) => ({
|
|
315
|
+
backgroundColor: Li.colors.getColorPalette(i, n),
|
|
279
316
|
zIndex: i.zIndex.drawer + 1,
|
|
280
317
|
color: "info.main",
|
|
281
318
|
transition: i.transitions.create(["width", "margin"], {
|
|
282
319
|
easing: i.transitions.easing.sharp,
|
|
283
320
|
duration: i.transitions.duration.leavingScreen
|
|
284
321
|
}),
|
|
285
|
-
...
|
|
286
|
-
...
|
|
287
|
-
width: `calc(100% - ${
|
|
288
|
-
...!
|
|
322
|
+
...a && {
|
|
323
|
+
...l ? { marginRight: e } : { marginLeft: e },
|
|
324
|
+
width: `calc(100% - ${e}px)`,
|
|
325
|
+
...!t && { width: "100%", zIndex: 3, margin: 0 },
|
|
289
326
|
transition: i.transitions.create(["width", "margin"], {
|
|
290
327
|
easing: i.transitions.easing.sharp,
|
|
291
328
|
duration: i.transitions.duration.enteringScreen
|
|
292
329
|
})
|
|
293
330
|
}
|
|
294
|
-
})),
|
|
295
|
-
width:
|
|
296
|
-
...
|
|
331
|
+
})), ri = (i, a, l = !0) => ({
|
|
332
|
+
width: a,
|
|
333
|
+
...l && {
|
|
297
334
|
transition: i.transitions.create("width", {
|
|
298
335
|
easing: i.transitions.easing.sharp,
|
|
299
336
|
duration: i.transitions.duration.enteringScreen
|
|
300
337
|
})
|
|
301
338
|
},
|
|
302
339
|
overflow: "hidden"
|
|
303
|
-
}),
|
|
304
|
-
...
|
|
340
|
+
}), ti = (i, a, l = !0) => ({
|
|
341
|
+
...l && {
|
|
305
342
|
transition: i.transitions.create("width", {
|
|
306
343
|
easing: i.transitions.easing.sharp,
|
|
307
344
|
duration: i.transitions.duration.leavingScreen
|
|
308
345
|
})
|
|
309
346
|
},
|
|
310
347
|
overflow: "hidden",
|
|
311
|
-
...
|
|
348
|
+
...a
|
|
312
349
|
// width: `calc(${theme.spacing(7)} + 1px)`,
|
|
313
350
|
// [theme.breakpoints.up('sm')]: {
|
|
314
351
|
// width: `calc(${theme.spacing(8)} + 1px)`,
|
|
315
352
|
// },
|
|
316
|
-
}),
|
|
353
|
+
}), Ui = p(xi, {
|
|
317
354
|
shouldForwardProp: (i) => !["open", "isWrapText", "columnMenu", "isRight", "styleList"].includes(i)
|
|
318
355
|
})(
|
|
319
|
-
({ theme: i, open:
|
|
320
|
-
const n =
|
|
356
|
+
({ theme: i, open: a, isRight: l, columnMenu: e }) => {
|
|
357
|
+
const n = l ? "Left" : "Right", t = e.initWidth, o = e.minWidthColumn;
|
|
321
358
|
return {
|
|
322
|
-
width:
|
|
359
|
+
width: t,
|
|
323
360
|
position: "relative",
|
|
324
361
|
zIndex: 0,
|
|
325
362
|
flexShrink: 0,
|
|
326
363
|
whiteSpace: "nowrap",
|
|
327
364
|
boxSizing: "border-box",
|
|
328
365
|
[`border${n}`]: `1px solid ${i.palette.divider}`,
|
|
329
|
-
...
|
|
330
|
-
...
|
|
366
|
+
...l ? { order: 1 } : { order: 0 },
|
|
367
|
+
...a ? ri(i, t) : ti(i, o),
|
|
331
368
|
"& .MuiDrawer-paper": {
|
|
332
369
|
position: "static",
|
|
333
370
|
// при isWrapText - при открытии меню текст сжатый и значки смешаются поэтому ставим условие
|
|
334
|
-
...
|
|
371
|
+
...a ? ri(i, t) : ti(i, o)
|
|
335
372
|
// ...(open ? openedMixin(theme, initWidth) : closedMixin(theme, isWrapText ? { width: initWidth } : minWidth))
|
|
336
373
|
}
|
|
337
374
|
};
|
|
338
375
|
}
|
|
339
|
-
), oi =
|
|
376
|
+
), oi = p("div")(({ theme: i }) => ({
|
|
340
377
|
display: "flex",
|
|
341
378
|
padding: i.spacing(0, 1),
|
|
342
379
|
...i.mixins.toolbar
|
|
343
|
-
})),
|
|
344
|
-
const { clientWidth:
|
|
345
|
-
return
|
|
346
|
-
},
|
|
347
|
-
var
|
|
348
|
-
const
|
|
380
|
+
})), ei = (i) => {
|
|
381
|
+
const { clientWidth: a, offsetWidth: l } = i;
|
|
382
|
+
return l - a;
|
|
383
|
+
}, Ei = _(({ Footer: i, listMenu: a, children: l, HeaderContent: e, statuses: n, itemsProps: t, classes: o, columnMenu: r, styleList: c, sx: x }, I) => {
|
|
384
|
+
var O, $, F, L;
|
|
385
|
+
const v = wi(), y = (r == null ? void 0 : r.position) === "right", W = !1, g = !0;
|
|
349
386
|
//!!statuses?.isScrollIndentation
|
|
350
|
-
const
|
|
351
|
-
width: `calc(${
|
|
352
|
-
[
|
|
353
|
-
width: `calc(${
|
|
387
|
+
const z = (n == null ? void 0 : n.isHeaderDefault) === void 0 ? !0 : n == null ? void 0 : n.isHeaderDefault, H = (n == null ? void 0 : n.isHeader) === void 0 ? !0 : n == null ? void 0 : n.isHeader, S = (n == null ? void 0 : n.isMenu) === void 0 ? !0 : n == null ? void 0 : n.isMenu, m = (r == null ? void 0 : r.initWidth) || 250, k = li(() => r != null && r.minWidthColumn && Object.keys(r == null ? void 0 : r.minWidthColumn).length ? r == null ? void 0 : r.minWidthColumn : {
|
|
388
|
+
width: `calc(${v.spacing(7)} + 1px)`,
|
|
389
|
+
[v.breakpoints.up("sm")]: {
|
|
390
|
+
width: `calc(${v.spacing(8)} + 1px)`
|
|
354
391
|
}
|
|
355
|
-
}, [r == null ? void 0 : r.minWidthColumn]), [
|
|
392
|
+
}, [r == null ? void 0 : r.minWidthColumn]), [h, D] = B({
|
|
356
393
|
isOpen: !!(n != null && n.isDefaultOpen),
|
|
357
394
|
widthCloseColumn: 0,
|
|
358
395
|
widthScroll: 0
|
|
359
|
-
}),
|
|
360
|
-
|
|
361
|
-
if (
|
|
362
|
-
const
|
|
363
|
-
let
|
|
364
|
-
|
|
365
|
-
if (
|
|
366
|
-
const
|
|
367
|
-
|
|
396
|
+
}), w = Ii(h, D), s = K(null);
|
|
397
|
+
Q(() => {
|
|
398
|
+
if (s.current) {
|
|
399
|
+
const b = ei(s.current);
|
|
400
|
+
let u = !1;
|
|
401
|
+
b > 0 && (u = !0), w({ widthScroll: u ? b + 1 : 0 }), window.onresize = function() {
|
|
402
|
+
if (s.current) {
|
|
403
|
+
const V = ei(s.current);
|
|
404
|
+
u && !V && (u = !1, w({ widthScroll: 0 })), !u && V && (u = !0, w({ widthScroll: V + 1 }));
|
|
368
405
|
}
|
|
369
406
|
};
|
|
370
407
|
}
|
|
371
|
-
}, [
|
|
372
|
-
const
|
|
373
|
-
|
|
374
|
-
},
|
|
375
|
-
|
|
376
|
-
},
|
|
377
|
-
|
|
378
|
-
},
|
|
379
|
-
isOpen:
|
|
380
|
-
handleMenuOpen:
|
|
381
|
-
handleMenuClose:
|
|
382
|
-
handleMenuToggle:
|
|
408
|
+
}, [g]);
|
|
409
|
+
const M = () => {
|
|
410
|
+
w({ isOpen: !0 });
|
|
411
|
+
}, T = () => {
|
|
412
|
+
w({ isOpen: !1 });
|
|
413
|
+
}, N = () => {
|
|
414
|
+
D((b) => ({ ...b, isOpen: !b.isOpen }));
|
|
415
|
+
}, C = {
|
|
416
|
+
isOpen: h.isOpen,
|
|
417
|
+
handleMenuOpen: M,
|
|
418
|
+
handleMenuClose: T,
|
|
419
|
+
handleMenuToggle: N
|
|
383
420
|
};
|
|
384
|
-
return
|
|
385
|
-
|
|
386
|
-
|
|
421
|
+
return vi(I, () => C), /* @__PURE__ */ f(J, { className: G("Dashboard", o == null ? void 0 : o.dashboard), sx: { display: "flex", height: "inherit", ...x }, children: [
|
|
422
|
+
H ? z ? /* @__PURE__ */ d(
|
|
423
|
+
_i,
|
|
387
424
|
{
|
|
388
|
-
initWidth:
|
|
389
|
-
isOpen:
|
|
390
|
-
bgColor: (
|
|
391
|
-
isRight:
|
|
425
|
+
initWidth: m,
|
|
426
|
+
isOpen: h.isOpen,
|
|
427
|
+
bgColor: (O = t == null ? void 0 : t.MuiHeader) == null ? void 0 : O.bgColor,
|
|
428
|
+
isRight: y,
|
|
392
429
|
isHeaderResize: n == null ? void 0 : n.isHeaderResize,
|
|
393
|
-
sx: (
|
|
394
|
-
className:
|
|
395
|
-
AfterComponent: (
|
|
396
|
-
children: typeof
|
|
430
|
+
sx: ($ = t == null ? void 0 : t.MuiHeader) == null ? void 0 : $.sx,
|
|
431
|
+
className: o == null ? void 0 : o.header,
|
|
432
|
+
AfterComponent: (F = t == null ? void 0 : t.MuiHeader) == null ? void 0 : F.AfterComponent,
|
|
433
|
+
children: typeof e == "function" ? e(C) : e
|
|
397
434
|
}
|
|
398
|
-
) : typeof
|
|
399
|
-
|
|
400
|
-
|
|
435
|
+
) : typeof e == "function" ? e(C) : e : null,
|
|
436
|
+
S && /* @__PURE__ */ f(
|
|
437
|
+
Ui,
|
|
401
438
|
{
|
|
402
439
|
variant: "permanent",
|
|
403
|
-
open:
|
|
404
|
-
isRight:
|
|
405
|
-
isWrapText:
|
|
406
|
-
columnMenu: { initWidth:
|
|
440
|
+
open: h.isOpen,
|
|
441
|
+
isRight: y,
|
|
442
|
+
isWrapText: W,
|
|
443
|
+
columnMenu: { initWidth: m, minWidthColumn: k },
|
|
407
444
|
styleList: c,
|
|
408
445
|
children: [
|
|
409
|
-
(n == null ? void 0 : n.isMenuHeader) !== !1 && /* @__PURE__ */
|
|
410
|
-
/* @__PURE__ */
|
|
411
|
-
/* @__PURE__ */
|
|
446
|
+
(n == null ? void 0 : n.isMenuHeader) !== !1 && /* @__PURE__ */ f(A, { children: [
|
|
447
|
+
/* @__PURE__ */ d(oi, {}),
|
|
448
|
+
/* @__PURE__ */ d(Z, {})
|
|
412
449
|
] }),
|
|
413
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ d(J, { className: "MuiListWrap", sx: {
|
|
414
451
|
display: "flex",
|
|
415
452
|
flexDirection: "column",
|
|
416
453
|
flexGrow: 1,
|
|
417
454
|
overflow: "hidden"
|
|
418
|
-
}, children: /* @__PURE__ */
|
|
419
|
-
|
|
455
|
+
}, children: /* @__PURE__ */ d(
|
|
456
|
+
ji,
|
|
420
457
|
{
|
|
421
|
-
ref:
|
|
458
|
+
ref: s,
|
|
459
|
+
isRight: y,
|
|
422
460
|
columnMenu: {
|
|
423
|
-
initWidth:
|
|
424
|
-
minWidthColumn:
|
|
461
|
+
initWidth: m,
|
|
462
|
+
minWidthColumn: Ti(k, { newProp: "width", positionCorrect: `- ${h.widthScroll}px` })
|
|
425
463
|
},
|
|
426
|
-
listMenu:
|
|
427
|
-
isOpen:
|
|
428
|
-
sx: (
|
|
429
|
-
className:
|
|
430
|
-
isWrapText:
|
|
464
|
+
listMenu: a,
|
|
465
|
+
isOpen: h.isOpen,
|
|
466
|
+
sx: (L = t == null ? void 0 : t.MuiListMenu) == null ? void 0 : L.sx,
|
|
467
|
+
className: o == null ? void 0 : o.listMenu,
|
|
468
|
+
isWrapText: W,
|
|
431
469
|
styleList: c
|
|
432
470
|
}
|
|
433
471
|
) }),
|
|
434
|
-
(n == null ? void 0 : n.isButtonCenterMenu) !== !1 && /* @__PURE__ */
|
|
435
|
-
i && /* @__PURE__ */
|
|
436
|
-
/* @__PURE__ */
|
|
472
|
+
(n == null ? void 0 : n.isButtonCenterMenu) !== !1 && /* @__PURE__ */ d(Mi, { children: /* @__PURE__ */ d(mi, { onClick: N, sx: { pointerEvents: "auto" }, children: h.isOpen ? /* @__PURE__ */ d(Ci, {}) : /* @__PURE__ */ d(Si, {}) }) }),
|
|
473
|
+
i && /* @__PURE__ */ d(A, { children: /* @__PURE__ */ f(Ai, { children: [
|
|
474
|
+
/* @__PURE__ */ d(Z, {}),
|
|
437
475
|
i
|
|
438
476
|
] }) })
|
|
439
477
|
]
|
|
440
478
|
}
|
|
441
479
|
),
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
|
|
444
|
-
|
|
480
|
+
/* @__PURE__ */ f(Di, { className: G("Dashboard-main", o == null ? void 0 : o.main), children: [
|
|
481
|
+
H && /* @__PURE__ */ d(oi, {}),
|
|
482
|
+
l
|
|
445
483
|
] })
|
|
446
484
|
] });
|
|
447
|
-
}),
|
|
485
|
+
}), on = R.memo(Ei);
|
|
448
486
|
export {
|
|
449
|
-
|
|
450
|
-
|
|
487
|
+
on as Dashboard,
|
|
488
|
+
_i as MuiHeader
|
|
451
489
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as g, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { styled as n, Typography as o } from "@mui/material";
|
|
3
3
|
import h from "react";
|
|
4
|
-
import { T as H } from "./Tooltips-
|
|
4
|
+
import { T as H } from "./Tooltips-Q_C8jHNF.js";
|
|
5
5
|
const u = n(o)({
|
|
6
6
|
display: "flex",
|
|
7
7
|
alignItems: "center",
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export interface ListButtonInnerProps {
|
|
2
|
-
}
|
|
3
|
-
export declare const ListButtonInner: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & ListButtonInnerProps, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|