rc-lib-ui 1.2.23 → 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.
Files changed (2) hide show
  1. package/dist/dashboard.js +39 -38
  2. package/package.json +1 -1
package/dist/dashboard.js CHANGED
@@ -1,4 +1,4 @@
1
- import { jsx as d, jsxs as s, Fragment as G } from "react/jsx-runtime";
1
+ import { jsx as d, Fragment as G, jsxs as s } from "react/jsx-runtime";
2
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
3
  import { useTheme as bi } from "@mui/material/styles";
4
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";
@@ -30,7 +30,7 @@ const Mi = g("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, $i = (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))
@@ -42,7 +42,7 @@ const Mi = g("main")(() => ({
42
42
  n[l] = `calc(${r} ${e})`;
43
43
  }
44
44
  return n;
45
- }, Ri = ({ render: i, defaultStatus: a = !1 }) => {
45
+ }, $i = ({ render: i, defaultStatus: a = !1 }) => {
46
46
  const [l, e] = O({ is: a, id: "" }), n = P(() => {
47
47
  e((o) => ({ ...o, is: !o.is }));
48
48
  }, []), t = P((o) => {
@@ -63,7 +63,7 @@ const Mi = g("main")(() => ({
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((m) => ({ ...m, height: c })), r !== c && o({ ...A, height: r + c })) : o({ ...A, height: A.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
69
  Bi,
@@ -155,12 +155,13 @@ const Mi = g("main")(() => ({
155
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",
@@ -170,30 +171,30 @@ const Mi = g("main")(() => ({
170
171
  }
171
172
  }
172
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) => {
173
- const { minWidthColumn: m } = l, [I, S] = O(""), W = li(() => n.map(({ action: H, icon: u, title: F, sx: k = {}, onClick: C, children: w, to: D, id: h }, L) => {
174
- const p = `${h || L}`, b = (x) => {
175
- S(p), C && C(x);
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
178
  return w && Array.isArray(w) ? /* @__PURE__ */ d(vi, { children: /* @__PURE__ */ d(
178
- Ri,
179
+ $i,
179
180
  {
180
181
  defaultStatus: t,
181
- render: (x) => /* @__PURE__ */ s(G, { children: [
182
- /* @__PURE__ */ d(Y, { disablePadding: !0, sx: k, visual: i, children: /* @__PURE__ */ s(
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: x.is,
186
+ isOpen: m.is,
186
187
  isWrapText: e,
187
188
  onClick: (M) => {
188
- x.handleToggle(), typeof C == "function" && C(M);
189
+ m.handleToggle(), typeof C == "function" && C(M);
189
190
  },
190
- sx: { ...q({ isIcon: u }) },
191
+ sx: { ...q({ isIcon: x }) },
191
192
  children: [
192
- u && /* @__PURE__ */ d(
193
+ x && /* @__PURE__ */ d(
193
194
  X,
194
195
  {
195
- icon: u,
196
- sx: m
196
+ icon: x,
197
+ sx: u
197
198
  }
198
199
  ),
199
200
  /* @__PURE__ */ d(
@@ -207,13 +208,13 @@ const Mi = g("main")(() => ({
207
208
  ),
208
209
  t && /* @__PURE__ */ s(G, { children: [
209
210
  H,
210
- x.is ? /* @__PURE__ */ d(Wi, {}) : /* @__PURE__ */ d(Hi, {})
211
+ m.is ? /* @__PURE__ */ d(Wi, {}) : /* @__PURE__ */ d(Hi, {})
211
212
  ] })
212
213
  ]
213
214
  }
214
- ) }),
215
- /* @__PURE__ */ d(pi, { in: x.is && t, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ d(ai, { disablePadding: !0, children: w.map(({ action: M, icon: y, title: T, to: $, sx: j = {}, id: R, onClick: B }, v) => {
216
- const f = `${L}-${R || v}`, z = (ci) => {
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) => {
217
218
  S(f), B && B(ci);
218
219
  };
219
220
  return /* @__PURE__ */ d(Y, { disablePadding: !0, sx: j, visual: i, children: /* @__PURE__ */ s(
@@ -223,9 +224,9 @@ const Mi = g("main")(() => ({
223
224
  isOpen: !0,
224
225
  onClick: z,
225
226
  isWrapText: e,
226
- ...$ ? { to: $, component: ni } : { to: "", className: _({ "Mui-selected": I === f }) },
227
+ ...R ? { to: R, component: ni } : { to: "", className: _({ "Mui-selected": I === f }) },
227
228
  children: [
228
- y && /* @__PURE__ */ d(X, { icon: y, sx: { ...m, marginLeft: "8px !important" } }),
229
+ y && /* @__PURE__ */ d(X, { icon: y, sx: { ...u, marginLeft: "8px !important" } }),
229
230
  /* @__PURE__ */ d(
230
231
  E,
231
232
  {
@@ -239,7 +240,7 @@ const Mi = g("main")(() => ({
239
240
  }
240
241
  ) }, f);
241
242
  }) }) })
242
- ] })
243
+ ] }) })
243
244
  }
244
245
  ) }, h || L) : /* @__PURE__ */ d(Y, { disablePadding: !0, sx: k, visual: i, children: /* @__PURE__ */ s(
245
246
  U,
@@ -248,9 +249,9 @@ const Mi = g("main")(() => ({
248
249
  onClick: b,
249
250
  isWrapText: e,
250
251
  ...D ? { to: D, component: ni } : { to: "", className: _({ "Mui-selected": I === p }) },
251
- sx: { ...q({ isIcon: u }) },
252
+ sx: { ...q({ isIcon: x }) },
252
253
  children: [
253
- u && /* @__PURE__ */ d(X, { icon: u, sx: m }),
254
+ x && /* @__PURE__ */ d(X, { icon: x, sx: u }),
254
255
  /* @__PURE__ */ d(
255
256
  E,
256
257
  {
@@ -263,7 +264,7 @@ const Mi = g("main")(() => ({
263
264
  ]
264
265
  }
265
266
  ) }, p);
266
- }), [n, t, I, a, q]);
267
+ }), [n, t, I, a, q, u]);
267
268
  return /* @__PURE__ */ d(
268
269
  Fi,
269
270
  {
@@ -380,9 +381,9 @@ const Mi = g("main")(() => ({
380
381
  })), ei = (i) => {
381
382
  const { clientWidth: a, offsetWidth: l } = i;
382
383
  return l - a;
383
- }, Xi = V(({ Footer: i, listMenu: a, children: l, HeaderContent: e, statuses: n, itemsProps: t, classes: o, columnMenu: r, styleList: c, sx: m }, I) => {
384
- var $, j, R, B;
385
- const S = bi(), W = (r == null ? void 0 : r.position) === "right", H = !1, u = !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
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 : {
388
389
  width: `calc(${S.spacing(7)} + 1px)`,
@@ -405,8 +406,8 @@ const Mi = g("main")(() => ({
405
406
  }
406
407
  };
407
408
  }
408
- }, [u]);
409
- const x = () => {
409
+ }, [x]);
410
+ const m = () => {
410
411
  p({ isOpen: !0 });
411
412
  }, M = () => {
412
413
  p({ isOpen: !1 });
@@ -414,22 +415,22 @@ const Mi = g("main")(() => ({
414
415
  L((v) => ({ ...v, isOpen: !v.isOpen }));
415
416
  }, T = {
416
417
  isOpen: h.isOpen,
417
- handleMenuOpen: x,
418
+ handleMenuOpen: m,
418
419
  handleMenuClose: M,
419
420
  handleMenuToggle: y
420
421
  };
421
- return Si(I, () => T), /* @__PURE__ */ s(J, { className: _("Dashboard", o == null ? void 0 : o.dashboard), sx: { display: "flex", height: "inherit", ...m }, children: [
422
+ return Si(I, () => T), /* @__PURE__ */ s(J, { className: _("Dashboard", o == null ? void 0 : o.dashboard), sx: { display: "flex", height: "inherit", ...u }, children: [
422
423
  k ? F ? /* @__PURE__ */ d(
423
424
  Vi,
424
425
  {
425
426
  initWidth: w,
426
427
  isOpen: h.isOpen,
427
- bgColor: ($ = t == null ? void 0 : t.MuiHeader) == null ? void 0 : $.bgColor,
428
+ bgColor: (R = t == null ? void 0 : t.MuiHeader) == null ? void 0 : R.bgColor,
428
429
  isRight: W,
429
430
  isHeaderResize: n == null ? void 0 : n.isHeaderResize,
430
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: (R = t == null ? void 0 : t.MuiHeader) == null ? void 0 : R.AfterComponent,
433
+ AfterComponent: ($ = t == null ? void 0 : t.MuiHeader) == null ? void 0 : $.AfterComponent,
433
434
  children: typeof e == "function" ? e(T) : e
434
435
  }
435
436
  ) : typeof e == "function" ? e(T) : e : null,
@@ -459,7 +460,7 @@ const Mi = g("main")(() => ({
459
460
  isRight: W,
460
461
  columnMenu: {
461
462
  initWidth: w,
462
- minWidthColumn: $i(D, { newProp: "width", positionCorrect: `- ${h.widthScroll}px` })
463
+ minWidthColumn: Ri(D, { newProp: "width", positionCorrect: `- ${h.widthScroll}px` })
463
464
  },
464
465
  listMenu: a,
465
466
  isOpen: h.isOpen,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rc-lib-ui",
3
3
  "private": false,
4
- "version": "1.2.23",
4
+ "version": "1.2.24",
5
5
  "author": "SinGlEBW",
6
6
  "license": "MIT",
7
7
  "type": "module",