rc-lib-ui 1.2.22 → 1.2.24

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.
@@ -7,6 +7,7 @@ import { RenderListProps } from './ui/RenderList';
7
7
  interface ItemListMenuCommonProps extends Pick<RenderIconProps, 'icon'>, Pick<ListTextProps, 'title'>, Pick<ListButtonProps, 'onClick'> {
8
8
  action?: ReactNode;
9
9
  sx?: SxProps<Theme>;
10
+ id?: string;
10
11
  }
11
12
  type OneVariantMenuList = {
12
13
  children?: Array<ItemListMenuCommonProps & {
package/dist/dashboard.js CHANGED
@@ -1,19 +1,19 @@
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 yi } from "./index-B7GqTJat.js";
8
- import { ExpandLess as Ii, 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")(() => ({
1
+ import { jsx as d, Fragment as G, jsxs as s } from "react/jsx-runtime";
2
+ import { styled as g, ListItemButton as hi, Typography as di, ListItemIcon as si, List as ai, ListItem as fi, Collapse as pi, Box as J, AppBar as gi, Container as ui, Toolbar as xi, Drawer as mi, Divider as Z, IconButton as wi } from "@mui/material";
3
+ import { useTheme as bi } from "@mui/material/styles";
4
+ import N, { useState as O, useCallback as P, useRef as K, useEffect as Q, forwardRef as V, useMemo as li, Fragment as vi, useImperativeHandle as Si } from "react";
5
+ import Ci from "@mui/icons-material/ChevronLeft";
6
+ import Li from "@mui/icons-material/ChevronRight";
7
+ import { U as yi, s as Ii } from "./index-B7GqTJat.js";
8
+ import { ExpandLess as Wi, ExpandMore as Hi } from "@mui/icons-material";
9
+ import { T as ki } from "./Tooltips-Q_C8jHNF.js";
10
+ import { NavLink as Di } from "react-router-dom";
11
+ import _ from "classnames";
12
+ const Mi = g("main")(() => ({
13
13
  display: "flex",
14
14
  flexDirection: "column",
15
15
  flexGrow: 1
16
- })), Mi = p("div")(({ theme: i }) => ({
16
+ })), Ti = g("div")(({ theme: i }) => ({
17
17
  display: "flex",
18
18
  alignItems: "center",
19
19
  justifyContent: "center",
@@ -30,7 +30,7 @@ const Di = p("main")(() => ({
30
30
  easing: i.transitions.easing.sharp,
31
31
  duration: i.transitions.duration.enteringScreen
32
32
  })
33
- })), ii = (i) => typeof i == "number" ? i + "px" : i, Ti = (i, a = {}) => {
33
+ })), ii = (i) => typeof i == "number" ? i + "px" : i, Ri = (i, a = {}) => {
34
34
  const { newProp: l = "marginLeft", positionCorrect: e = "- 0px" } = a;
35
35
  let n = {};
36
36
  for (const [t, o] of Object.entries(i))
@@ -43,13 +43,13 @@ const Di = p("main")(() => ({
43
43
  }
44
44
  return n;
45
45
  }, $i = ({ render: i, defaultStatus: a = !1 }) => {
46
- const [l, e] = B({ is: a, id: "" }), n = P(() => {
46
+ const [l, e] = O({ is: a, id: "" }), n = P(() => {
47
47
  e((o) => ({ ...o, is: !o.is }));
48
48
  }, []), t = P((o) => {
49
49
  e((r) => ({ ...r, id: o }));
50
50
  }, []);
51
51
  return i({ ...l, setID: t, handleToggle: n });
52
- }, Ri = p(ci, {
52
+ }, Bi = g(hi, {
53
53
  shouldForwardProp: (i) => !["minHeight"].includes(i)
54
54
  })(({ minHeight: i }) => ({
55
55
  minHeight: i,
@@ -58,15 +58,15 @@ const Di = p("main")(() => ({
58
58
  transition: "height .1s ease-in-out",
59
59
  overflow: "hidden"
60
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);
61
+ })), A = { minHeight: 48, height: 0 }, U = ({ sx: i = {}, isWrapText: a, isOpen: l, ...e }) => {
62
+ const n = K(null), [t, o] = O(A);
63
63
  return Q(() => {
64
64
  if (a && (n != null && n.current)) {
65
65
  const { scrollHeight: r, clientHeight: c } = n == null ? void 0 : n.current;
66
- l ? (!t.height && o((x) => ({ ...x, height: c })), r !== c && o({ ...j, height: r + c })) : o({ ...j, height: j.minHeight });
66
+ l ? (!t.height && o((u) => ({ ...u, height: c })), r !== c && o({ ...A, height: r + c })) : o({ ...A, height: A.minHeight });
67
67
  }
68
68
  }, [l]), /* @__PURE__ */ d(
69
- Ri,
69
+ Bi,
70
70
  {
71
71
  minHeight: t.minHeight,
72
72
  ref: n,
@@ -74,25 +74,25 @@ const Di = p("main")(() => ({
74
74
  ...e
75
75
  }
76
76
  );
77
- }, Bi = ({ unmount: i, isWrapText: a, title: l, sx: e = {} }) => {
78
- const [n, t] = B(""), o = K(null);
77
+ }, zi = ({ unmount: i, isWrapText: a, title: l, sx: e = {} }) => {
78
+ const [n, t] = O(""), o = K(null);
79
79
  return Q(() => {
80
80
  if (!i && o.current) {
81
81
  const r = o.current, c = setTimeout(() => {
82
82
  r != null && r.offsetWidth && (r == null ? void 0 : r.scrollWidth) > (r == null ? void 0 : r.offsetWidth) && typeof l == "string" && t(l), clearTimeout(c);
83
83
  }, 200);
84
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: "div", ref: e, children: a, noWrap: !0, sx: { ...l, width: "100%" } }) })), Ni = _(({ className: i = "", ...a }, l) => /* @__PURE__ */ d(
87
- ki,
85
+ }, [l, i]), a ? !i && /* @__PURE__ */ d(di, { children: l, sx: { textWrap: "wrap", overflowWrap: "break-word", ...e } }) : !i && /* @__PURE__ */ d(Ni, { ref: o, tooltipText: n, title: l, sx: e });
86
+ }, E = N.memo(zi), Ni = V(({ tooltipText: i, title: a, sx: l }, e) => /* @__PURE__ */ d(ki, { variant: "default", title: i, children: /* @__PURE__ */ d(di, { component: "div", ref: e, children: a, noWrap: !0, sx: { ...l, width: "100%" } }) })), Oi = V(({ className: i = "", ...a }, l) => /* @__PURE__ */ d(
87
+ Di,
88
88
  {
89
89
  ref: l,
90
90
  className: ({ isActive: e }) => e ? i + " Mui-selected" : i,
91
91
  end: !0,
92
92
  ...a
93
93
  }
94
- )), ni = R.memo(Ni), X = ({ icon: i, sx: a }) => /* @__PURE__ */ d(
95
- hi,
94
+ )), ni = N.memo(Oi), X = ({ icon: i, sx: a }) => /* @__PURE__ */ d(
95
+ si,
96
96
  {
97
97
  sx: {
98
98
  minWidth: 40,
@@ -102,7 +102,7 @@ const Di = p("main")(() => ({
102
102
  },
103
103
  children: i
104
104
  }
105
- ), Oi = p(ai, {
105
+ ), Fi = g(ai, {
106
106
  shouldForwardProp: (i) => !["styleList", "isScrollIndentation"].includes(i)
107
107
  })(({ theme: i, styleList: a = "variant1" }) => ({
108
108
  display: "flex",
@@ -152,15 +152,16 @@ const Di = p("main")(() => ({
152
152
  // }
153
153
  // },
154
154
  // }
155
- })), Y = p(si, {
155
+ })), Y = g(fi, {
156
156
  shouldForwardProp: (i) => !["visual"].includes(i)
157
157
  })(({ theme: i, visual: a }) => ({
158
+ display: "block",
158
159
  ...a === "variant2" && {
159
160
  "&": {
160
- padding: `0 ${i.spacing(1)}`
161
+ // padding: `0 ${theme.spacing(1)}`,
161
162
  },
162
163
  "& .MuiListItemIcon-root": {
163
- marginLeft: `-${i.spacing(1)}`
164
+ // marginLeft: `-${theme.spacing(1)}`,
164
165
  },
165
166
  "& .MuiButtonBase-root": {
166
167
  borderRadius: "5px",
@@ -169,112 +170,112 @@ const Di = p("main")(() => ({
169
170
  }
170
171
  }
171
172
  }
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, [y, v] = B(""), I = 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);
173
+ })), q = ({ isIcon: i }) => ({ paddingRight: 1.2, ...!i && { paddingLeft: 1.2 } }), ji = V(({ styleList: i = "variant1", isRight: a, columnMenu: l, isWrapText: e = !1, listMenu: n, isOpen: t, sx: o, className: r }, c) => {
174
+ const { minWidthColumn: u } = l, [I, S] = O(""), W = li(() => n.map(({ action: H, icon: x, title: F, sx: k = {}, onClick: C, children: w, to: D, id: h }, L) => {
175
+ const p = `${h || L}`, b = (m) => {
176
+ S(p), C && C(m);
176
177
  };
177
- return m && Array.isArray(m) ? /* @__PURE__ */ d(bi, { children: /* @__PURE__ */ d(
178
+ return w && Array.isArray(w) ? /* @__PURE__ */ d(vi, { children: /* @__PURE__ */ d(
178
179
  $i,
179
180
  {
180
181
  defaultStatus: t,
181
- render: (s) => /* @__PURE__ */ f(A, { children: [
182
- /* @__PURE__ */ d(Y, { disablePadding: !0, sx: H, visual: i, children: /* @__PURE__ */ f(
182
+ render: (m) => /* @__PURE__ */ d(G, { children: /* @__PURE__ */ s(Y, { disablePadding: !0, sx: k, visual: i, children: [
183
+ /* @__PURE__ */ s(
183
184
  U,
184
185
  {
185
- isOpen: s.is,
186
+ isOpen: m.is,
186
187
  isWrapText: e,
187
188
  onClick: (M) => {
188
- s.handleToggle(), typeof S == "function" && S(M);
189
+ m.handleToggle(), typeof C == "function" && C(M);
189
190
  },
190
- sx: { ...q({ isIcon: g }) },
191
+ sx: { ...q({ isIcon: x }) },
191
192
  children: [
192
- g && /* @__PURE__ */ d(
193
+ x && /* @__PURE__ */ d(
193
194
  X,
194
195
  {
195
- icon: g,
196
- sx: x
196
+ icon: x,
197
+ sx: u
197
198
  }
198
199
  ),
199
200
  /* @__PURE__ */ d(
200
201
  E,
201
202
  {
202
203
  unmount: !t,
203
- title: z,
204
+ title: F,
204
205
  sx: { flexGrow: 1 },
205
206
  isWrapText: e
206
207
  }
207
208
  ),
208
- t && /* @__PURE__ */ f(A, { children: [
209
- W,
210
- s.is ? /* @__PURE__ */ d(Ii, {}) : /* @__PURE__ */ d(Wi, {})
209
+ t && /* @__PURE__ */ s(G, { children: [
210
+ H,
211
+ m.is ? /* @__PURE__ */ d(Wi, {}) : /* @__PURE__ */ d(Hi, {})
211
212
  ] })
212
213
  ]
213
214
  }
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);
215
+ ),
216
+ /* @__PURE__ */ d(pi, { in: m.is && t, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ d(ai, { disablePadding: !0, children: w.map(({ action: M, icon: y, title: T, to: R, sx: j = {}, id: $, onClick: B }, v) => {
217
+ const f = `${L}-${$ || v}`, z = (ci) => {
218
+ S(f), B && B(ci);
218
219
  };
219
- return /* @__PURE__ */ d(Y, { disablePadding: !0, sx: O, visual: i, children: /* @__PURE__ */ f(
220
+ return /* @__PURE__ */ d(Y, { disablePadding: !0, sx: j, visual: i, children: /* @__PURE__ */ s(
220
221
  U,
221
222
  {
222
- sx: { paddingRight: 1.2, ...!T && { paddingLeft: 2.5 } },
223
+ sx: { paddingRight: 1.2, ...!y && { paddingLeft: 2.5 } },
223
224
  isOpen: !0,
224
- onClick: b,
225
+ onClick: z,
225
226
  isWrapText: e,
226
- ...C ? { to: C, component: ni } : { to: "", className: G({ "Mui-selected": y === L }) },
227
+ ...R ? { to: R, component: ni } : { to: "", className: _({ "Mui-selected": I === f }) },
227
228
  children: [
228
- T && /* @__PURE__ */ d(X, { icon: T, sx: { ...x, marginLeft: "8px !important" } }),
229
+ y && /* @__PURE__ */ d(X, { icon: y, sx: { ...u, marginLeft: "8px !important" } }),
229
230
  /* @__PURE__ */ d(
230
231
  E,
231
232
  {
232
233
  unmount: !t,
233
- title: N,
234
+ title: T,
234
235
  isWrapText: e
235
236
  }
236
237
  ),
237
238
  t && M
238
239
  ]
239
240
  }
240
- ) }, L);
241
+ ) }, f);
241
242
  }) }) })
242
- ] })
243
+ ] }) })
243
244
  }
244
- ) }, h) : /* @__PURE__ */ d(Y, { disablePadding: !0, sx: H, visual: i, children: /* @__PURE__ */ f(
245
+ ) }, h || L) : /* @__PURE__ */ d(Y, { disablePadding: !0, sx: k, visual: i, children: /* @__PURE__ */ s(
245
246
  U,
246
247
  {
247
248
  isOpen: t,
248
- onClick: w,
249
+ onClick: b,
249
250
  isWrapText: e,
250
- ...k ? { to: k, component: ni } : { to: "", className: G({ "Mui-selected": y === D }) },
251
- sx: { ...q({ isIcon: g }) },
251
+ ...D ? { to: D, component: ni } : { to: "", className: _({ "Mui-selected": I === p }) },
252
+ sx: { ...q({ isIcon: x }) },
252
253
  children: [
253
- g && /* @__PURE__ */ d(X, { icon: g, sx: x }),
254
+ x && /* @__PURE__ */ d(X, { icon: x, sx: u }),
254
255
  /* @__PURE__ */ d(
255
256
  E,
256
257
  {
257
258
  unmount: !t,
258
- title: z,
259
+ title: F,
259
260
  isWrapText: e
260
261
  }
261
262
  ),
262
- t && W
263
+ t && H
263
264
  ]
264
265
  }
265
- ) }, h);
266
- }), [n, t, y, a, q]);
266
+ ) }, p);
267
+ }), [n, t, I, a, q, u]);
267
268
  return /* @__PURE__ */ d(
268
- Oi,
269
+ Fi,
269
270
  {
270
271
  ref: c,
271
272
  styleList: i,
272
273
  sx: o,
273
274
  className: r,
274
- children: I
275
+ children: W
275
276
  }
276
277
  );
277
- }), ji = R.memo(Fi), Ai = p(J, {
278
+ }), Ai = N.memo(ji), Gi = g(J, {
278
279
  target: "MuiFooter-root",
279
280
  shouldForwardProp: (i) => ![""].includes(i)
280
281
  })(({}) => ({
@@ -283,7 +284,7 @@ const Di = p("main")(() => ({
283
284
  // bottom: 0,
284
285
  // right: 0,
285
286
  minHeight: 48
286
- })), Gi = ({
287
+ })), _i = ({
287
288
  initWidth: i,
288
289
  isOpen: a,
289
290
  children: l,
@@ -293,8 +294,8 @@ const Di = p("main")(() => ({
293
294
  className: o,
294
295
  AfterComponent: r,
295
296
  sx: c
296
- }) => /* @__PURE__ */ f(
297
- Vi,
297
+ }) => /* @__PURE__ */ s(
298
+ Ui,
298
299
  {
299
300
  className: o,
300
301
  bgColor: t,
@@ -305,14 +306,14 @@ const Di = p("main")(() => ({
305
306
  isHeaderResize: n,
306
307
  sx: c,
307
308
  children: [
308
- /* @__PURE__ */ d(gi, { maxWidth: "xl", children: /* @__PURE__ */ d(ui, { sx: { flexGrow: 1 }, disableGutters: !0, children: l }) }),
309
+ /* @__PURE__ */ d(ui, { maxWidth: "xl", children: /* @__PURE__ */ d(xi, { sx: { flexGrow: 1 }, disableGutters: !0, children: l }) }),
309
310
  r && r
310
311
  ]
311
312
  }
312
- ), _i = R.memo(Gi), Vi = p(pi, {
313
+ ), Vi = N.memo(_i), Ui = g(gi, {
313
314
  shouldForwardProp: (i) => !["isOpen", "isRight", "initWidth", "bgColor", "isHeaderResize"].includes(i)
314
315
  })(({ theme: i, isOpen: a, isRight: l, initWidth: e = 250, bgColor: n = "primary", isHeaderResize: t }) => ({
315
- backgroundColor: Li.colors.getColorPalette(i, n),
316
+ backgroundColor: yi.colors.getColorPalette(i, n),
316
317
  zIndex: i.zIndex.drawer + 1,
317
318
  color: "info.main",
318
319
  transition: i.transitions.create(["width", "margin"], {
@@ -350,7 +351,7 @@ const Di = p("main")(() => ({
350
351
  // [theme.breakpoints.up('sm')]: {
351
352
  // width: `calc(${theme.spacing(8)} + 1px)`,
352
353
  // },
353
- }), Ui = p(xi, {
354
+ }), Ei = g(mi, {
354
355
  shouldForwardProp: (i) => !["open", "isWrapText", "columnMenu", "isRight", "styleList"].includes(i)
355
356
  })(
356
357
  ({ theme: i, open: a, isRight: l, columnMenu: e }) => {
@@ -373,77 +374,77 @@ const Di = p("main")(() => ({
373
374
  }
374
375
  };
375
376
  }
376
- ), oi = p("div")(({ theme: i }) => ({
377
+ ), oi = g("div")(({ theme: i }) => ({
377
378
  display: "flex",
378
379
  padding: i.spacing(0, 1),
379
380
  ...i.mixins.toolbar
380
381
  })), ei = (i) => {
381
382
  const { clientWidth: a, offsetWidth: l } = i;
382
383
  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 }, y) => {
384
- var O, $, F, L;
385
- const v = wi(), I = (r == null ? void 0 : r.position) === "right", W = !1, g = !0;
384
+ }, Xi = V(({ Footer: i, listMenu: a, children: l, HeaderContent: e, statuses: n, itemsProps: t, classes: o, columnMenu: r, styleList: c, sx: u }, I) => {
385
+ var R, j, $, B;
386
+ const S = bi(), W = (r == null ? void 0 : r.position) === "right", H = !1, x = !0;
386
387
  //!!statuses?.isScrollIndentation
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)`
388
+ const F = (n == null ? void 0 : n.isHeaderDefault) === void 0 ? !0 : n == null ? void 0 : n.isHeaderDefault, k = (n == null ? void 0 : n.isHeader) === void 0 ? !0 : n == null ? void 0 : n.isHeader, C = (n == null ? void 0 : n.isMenu) === void 0 ? !0 : n == null ? void 0 : n.isMenu, w = (r == null ? void 0 : r.initWidth) || 250, D = li(() => r != null && r.minWidthColumn && Object.keys(r == null ? void 0 : r.minWidthColumn).length ? r == null ? void 0 : r.minWidthColumn : {
389
+ width: `calc(${S.spacing(7)} + 1px)`,
390
+ [S.breakpoints.up("sm")]: {
391
+ width: `calc(${S.spacing(8)} + 1px)`
391
392
  }
392
- }, [r == null ? void 0 : r.minWidthColumn]), [h, D] = B({
393
+ }, [r == null ? void 0 : r.minWidthColumn]), [h, L] = O({
393
394
  isOpen: !!(n != null && n.isDefaultOpen),
394
395
  widthCloseColumn: 0,
395
396
  widthScroll: 0
396
- }), w = yi(h, D), s = K(null);
397
+ }), p = Ii(h, L), b = K(null);
397
398
  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 }));
399
+ if (b.current) {
400
+ const v = ei(b.current);
401
+ let f = !1;
402
+ v > 0 && (f = !0), p({ widthScroll: f ? v + 1 : 0 }), window.onresize = function() {
403
+ if (b.current) {
404
+ const z = ei(b.current);
405
+ f && !z && (f = !1, p({ widthScroll: 0 })), !f && z && (f = !0, p({ widthScroll: z + 1 }));
405
406
  }
406
407
  };
407
408
  }
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 = {
409
+ }, [x]);
410
+ const m = () => {
411
+ p({ isOpen: !0 });
412
+ }, M = () => {
413
+ p({ isOpen: !1 });
414
+ }, y = () => {
415
+ L((v) => ({ ...v, isOpen: !v.isOpen }));
416
+ }, T = {
416
417
  isOpen: h.isOpen,
417
- handleMenuOpen: M,
418
- handleMenuClose: T,
419
- handleMenuToggle: N
418
+ handleMenuOpen: m,
419
+ handleMenuClose: M,
420
+ handleMenuToggle: y
420
421
  };
421
- return vi(y, () => 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,
422
+ return Si(I, () => T), /* @__PURE__ */ s(J, { className: _("Dashboard", o == null ? void 0 : o.dashboard), sx: { display: "flex", height: "inherit", ...u }, children: [
423
+ k ? F ? /* @__PURE__ */ d(
424
+ Vi,
424
425
  {
425
- initWidth: m,
426
+ initWidth: w,
426
427
  isOpen: h.isOpen,
427
- bgColor: (O = t == null ? void 0 : t.MuiHeader) == null ? void 0 : O.bgColor,
428
- isRight: I,
428
+ bgColor: (R = t == null ? void 0 : t.MuiHeader) == null ? void 0 : R.bgColor,
429
+ isRight: W,
429
430
  isHeaderResize: n == null ? void 0 : n.isHeaderResize,
430
- sx: ($ = t == null ? void 0 : t.MuiHeader) == null ? void 0 : $.sx,
431
+ sx: (j = t == null ? void 0 : t.MuiHeader) == null ? void 0 : j.sx,
431
432
  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
433
+ AfterComponent: ($ = t == null ? void 0 : t.MuiHeader) == null ? void 0 : $.AfterComponent,
434
+ children: typeof e == "function" ? e(T) : e
434
435
  }
435
- ) : typeof e == "function" ? e(C) : e : null,
436
- S && /* @__PURE__ */ f(
437
- Ui,
436
+ ) : typeof e == "function" ? e(T) : e : null,
437
+ C && /* @__PURE__ */ s(
438
+ Ei,
438
439
  {
439
440
  variant: "permanent",
440
441
  open: h.isOpen,
441
- isRight: I,
442
- isWrapText: W,
443
- columnMenu: { initWidth: m, minWidthColumn: k },
442
+ isRight: W,
443
+ isWrapText: H,
444
+ columnMenu: { initWidth: w, minWidthColumn: D },
444
445
  styleList: c,
445
446
  children: [
446
- (n == null ? void 0 : n.isMenuHeader) !== !1 && /* @__PURE__ */ f(A, { children: [
447
+ (n == null ? void 0 : n.isMenuHeader) !== !1 && /* @__PURE__ */ s(G, { children: [
447
448
  /* @__PURE__ */ d(oi, {}),
448
449
  /* @__PURE__ */ d(Z, {})
449
450
  ] }),
@@ -453,37 +454,37 @@ const Di = p("main")(() => ({
453
454
  flexGrow: 1,
454
455
  overflow: "hidden"
455
456
  }, children: /* @__PURE__ */ d(
456
- ji,
457
+ Ai,
457
458
  {
458
- ref: s,
459
- isRight: I,
459
+ ref: b,
460
+ isRight: W,
460
461
  columnMenu: {
461
- initWidth: m,
462
- minWidthColumn: Ti(k, { newProp: "width", positionCorrect: `- ${h.widthScroll}px` })
462
+ initWidth: w,
463
+ minWidthColumn: Ri(D, { newProp: "width", positionCorrect: `- ${h.widthScroll}px` })
463
464
  },
464
465
  listMenu: a,
465
466
  isOpen: h.isOpen,
466
- sx: (L = t == null ? void 0 : t.MuiListMenu) == null ? void 0 : L.sx,
467
+ sx: (B = t == null ? void 0 : t.MuiListMenu) == null ? void 0 : B.sx,
467
468
  className: o == null ? void 0 : o.listMenu,
468
- isWrapText: W,
469
+ isWrapText: H,
469
470
  styleList: c
470
471
  }
471
472
  ) }),
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: [
473
+ (n == null ? void 0 : n.isButtonCenterMenu) !== !1 && /* @__PURE__ */ d(Ti, { children: /* @__PURE__ */ d(wi, { onClick: y, sx: { pointerEvents: "auto" }, children: h.isOpen ? /* @__PURE__ */ d(Li, {}) : /* @__PURE__ */ d(Ci, {}) }) }),
474
+ i && /* @__PURE__ */ d(G, { children: /* @__PURE__ */ s(Gi, { children: [
474
475
  /* @__PURE__ */ d(Z, {}),
475
476
  i
476
477
  ] }) })
477
478
  ]
478
479
  }
479
480
  ),
480
- /* @__PURE__ */ f(Di, { className: G("Dashboard-main", o == null ? void 0 : o.main), children: [
481
- H && /* @__PURE__ */ d(oi, {}),
481
+ /* @__PURE__ */ s(Mi, { className: _("Dashboard-main", o == null ? void 0 : o.main), children: [
482
+ k && /* @__PURE__ */ d(oi, {}),
482
483
  l
483
484
  ] })
484
485
  ] });
485
- }), on = R.memo(Ei);
486
+ }), en = N.memo(Xi);
486
487
  export {
487
- on as Dashboard,
488
- _i as MuiHeader
488
+ en as Dashboard,
489
+ Vi as MuiHeader
489
490
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rc-lib-ui",
3
3
  "private": false,
4
- "version": "1.2.22",
4
+ "version": "1.2.24",
5
5
  "author": "SinGlEBW",
6
6
  "license": "MIT",
7
7
  "type": "module",