rc-lib-ui 1.1.19 → 1.1.20

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.
@@ -19,7 +19,7 @@ export interface DashboardProps extends Pick<ListMenuProps, 'listMenu' | 'styleL
19
19
  itemsProps?: {
20
20
  MuiHeader?: Pick<MuiHeaderProps, 'sx' | 'bgColor' | 'AfterComponent'>;
21
21
  };
22
- classes?: Partial<Record<'listMenu' | 'header', string>>;
22
+ classes?: Partial<Record<'listMenu' | 'header' | 'dashboard' | 'main', string>>;
23
23
  }
24
24
  export declare const Dashboard: React.MemoExoticComponent<React.ForwardRefExoticComponent<DashboardProps & React.RefAttributes<DashboardControlProps>>>;
25
25
  export {};
package/dist/dashboard.js CHANGED
@@ -1,36 +1,37 @@
1
- var li = Object.defineProperty;
2
- var ci = (i, o, n) => o in i ? li(i, o, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[o] = n;
3
- var N = (i, o, n) => ci(i, typeof o != "symbol" ? o + "" : o, n);
4
- import { jsx as d, jsxs as s, Fragment as $ } from "react/jsx-runtime";
5
- import { styled as f, ListItemButton as si, Typography as ti, ListItemIcon as hi, List as ei, ListItem as A, Collapse as pi, Box as _, AppBar as fi, Container as gi, Toolbar as xi, Drawer as ui, Divider as Q, IconButton as wi } from "@mui/material";
6
- import { useTheme as mi } from "@mui/material/styles";
7
- import I, { useState as B, useRef as X, useEffect as Y, forwardRef as D, useMemo as E, Fragment as bi, useImperativeHandle as Ci } from "react";
8
- import vi from "@mui/icons-material/ChevronLeft";
9
- import Si from "@mui/icons-material/ChevronRight";
10
- import { ExpandLess as Li, ExpandMore as Wi } from "@mui/icons-material";
11
- import { T as yi } from "./Tooltips-BD7KqgrA.js";
12
- import { NavLink as Hi } from "react-router-dom";
13
- class Ii {
1
+ var ci = Object.defineProperty;
2
+ var hi = (i, o, n) => o in i ? ci(i, o, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[o] = n;
3
+ var j = (i, o, n) => hi(i, typeof o != "symbol" ? o + "" : o, n);
4
+ import { jsx as a, jsxs as h, Fragment as M } from "react/jsx-runtime";
5
+ import { styled as s, ListItemButton as pi, Typography as ei, ListItemIcon as fi, List as di, ListItem as A, Collapse as si, Box as _, AppBar as gi, Container as xi, Toolbar as ui, Drawer as mi, Divider as Q, IconButton as wi } from "@mui/material";
6
+ import { useTheme as bi } from "@mui/material/styles";
7
+ import I, { useState as $, useRef as X, useEffect as Y, forwardRef as B, useMemo as E, Fragment as Ci, useImperativeHandle as vi } from "react";
8
+ import Si from "@mui/icons-material/ChevronLeft";
9
+ import Li from "@mui/icons-material/ChevronRight";
10
+ import { ExpandLess as Wi, ExpandMore as yi } from "@mui/icons-material";
11
+ import { T as Hi } from "./Tooltips-BD7KqgrA.js";
12
+ import { NavLink as Ii } from "react-router-dom";
13
+ import U from "classnames";
14
+ class Ti {
14
15
  constructor() {
15
- N(this, "getColorPalette", (o, n) => {
16
+ j(this, "getColorPalette", (o, n) => {
16
17
  if (n.startsWith("#"))
17
18
  return n;
18
- const { palette: e } = o, { mode: r } = e, a = e[n];
19
- return a ? a[r] : "primary";
19
+ const { palette: e } = o, { mode: r } = e, l = e[n];
20
+ return l ? l[r] : "primary";
20
21
  });
21
22
  }
22
23
  }
23
- class di {
24
+ class ai {
24
25
  }
25
- N(di, "colors", new Ii());
26
- function Ti(i, o) {
26
+ j(ai, "colors", new Ti());
27
+ function Di(i, o) {
27
28
  return (n) => o((e) => ({ ...e, ...n }));
28
29
  }
29
- const ki = f("main")(() => ({
30
+ const ki = s("main")(() => ({
30
31
  display: "flex",
31
32
  flexDirection: "column",
32
33
  flexGrow: 1
33
- })), Mi = f("div")(({ theme: i }) => ({
34
+ })), Mi = s("div")(({ theme: i }) => ({
34
35
  display: "flex",
35
36
  alignItems: "center",
36
37
  justifyContent: "center",
@@ -47,24 +48,24 @@ const ki = f("main")(() => ({
47
48
  easing: i.transitions.easing.sharp,
48
49
  duration: i.transitions.duration.enteringScreen
49
50
  })
50
- })), U = (i) => typeof i == "number" ? i + "px" : i, ai = (i, o = {}) => {
51
+ })), Z = (i) => typeof i == "number" ? i + "px" : i, li = (i, o = {}) => {
51
52
  const { newProp: n = "marginLeft", positionCorrect: e = "- 0px" } = o;
52
53
  let r = {};
53
- for (const [a, l] of Object.entries(i))
54
- if (typeof l == "object" && "width" in l) {
55
- const t = U(l == null ? void 0 : l.width);
56
- r[a] = { [n]: `calc(${t} ${e})` };
54
+ for (const [l, d] of Object.entries(i))
55
+ if (typeof d == "object" && "width" in d) {
56
+ const t = Z(d == null ? void 0 : d.width);
57
+ r[l] = { [n]: `calc(${t} ${e})` };
57
58
  } else {
58
- const t = U(l);
59
+ const t = Z(d);
59
60
  r[n] = `calc(${t} ${e})`;
60
61
  }
61
62
  return r;
62
63
  }, $i = ({ render: i }) => {
63
- const [o, n] = B(!1);
64
+ const [o, n] = $(!1);
64
65
  return i({ is: o, setStatus: n, handleToggle: () => {
65
66
  n((r) => !r);
66
67
  } });
67
- }, Bi = f(si, {
68
+ }, Bi = s(pi, {
68
69
  shouldForwardProp: (i) => !["minHeight"].includes(i)
69
70
  })(({ minHeight: i }) => ({
70
71
  minHeight: i,
@@ -72,41 +73,41 @@ const ki = f("main")(() => ({
72
73
  paddingLeft: 0,
73
74
  transition: "height .1s ease-in-out",
74
75
  overflow: "hidden"
75
- })), M = { minHeight: 48, height: 0 }, G = ({ sx: i = {}, isWrapText: o, isOpen: n, ...e }) => {
76
- const r = X(null), [a, l] = B(M);
76
+ })), k = { minHeight: 48, height: 0 }, G = ({ sx: i = {}, isWrapText: o, isOpen: n, ...e }) => {
77
+ const r = X(null), [l, d] = $(k);
77
78
  return Y(() => {
78
79
  if (o && (r != null && r.current)) {
79
80
  const { scrollHeight: t, clientHeight: c } = r == null ? void 0 : r.current;
80
- n ? (!a.height && l((p) => ({ ...p, height: c })), t !== c && l({ ...M, height: t + c })) : l({ ...M, height: M.minHeight });
81
+ n ? (!l.height && d((f) => ({ ...f, height: c })), t !== c && d({ ...k, height: t + c })) : d({ ...k, height: k.minHeight });
81
82
  }
82
- }, [n]), /* @__PURE__ */ d(
83
+ }, [n]), /* @__PURE__ */ a(
83
84
  Bi,
84
85
  {
85
- minHeight: a.minHeight,
86
+ minHeight: l.minHeight,
86
87
  ref: r,
87
88
  sx: i,
88
89
  ...e
89
90
  }
90
91
  );
91
- }, Di = ({ unmount: i, isWrapText: o, title: n, sx: e = {} }) => {
92
- const [r, a] = B(""), l = X(null);
92
+ }, Ri = ({ unmount: i, isWrapText: o, title: n, sx: e = {} }) => {
93
+ const [r, l] = $(""), d = X(null);
93
94
  return Y(() => {
94
- if (!i && l.current) {
95
- const t = l.current, c = setTimeout(() => {
96
- t != null && t.offsetWidth && (t == null ? void 0 : t.scrollWidth) > (t == null ? void 0 : t.offsetWidth) && a(n), clearTimeout(c);
95
+ if (!i && d.current) {
96
+ const t = d.current, c = setTimeout(() => {
97
+ t != null && t.offsetWidth && (t == null ? void 0 : t.scrollWidth) > (t == null ? void 0 : t.offsetWidth) && l(n), clearTimeout(c);
97
98
  }, 200);
98
99
  }
99
- }, [n, i]), o ? !i && /* @__PURE__ */ d(ti, { children: n, sx: { textWrap: "wrap", overflowWrap: "break-word", ...e } }) : !i && /* @__PURE__ */ d(Ri, { ref: l, tooltipText: r, title: n, sx: e });
100
- }, V = I.memo(Di), Ri = D(({ tooltipText: i, title: o, sx: n }, e) => /* @__PURE__ */ d(yi, { variant: "default", title: i, children: /* @__PURE__ */ d(ti, { ref: e, children: o, noWrap: !0, sx: n }) })), zi = D(({ className: i = "", ...o }, n) => /* @__PURE__ */ d(
101
- Hi,
100
+ }, [n, i]), o ? !i && /* @__PURE__ */ a(ei, { children: n, sx: { textWrap: "wrap", overflowWrap: "break-word", ...e } }) : !i && /* @__PURE__ */ a(zi, { ref: d, tooltipText: r, title: n, sx: e });
101
+ }, V = I.memo(Ri), zi = B(({ tooltipText: i, title: o, sx: n }, e) => /* @__PURE__ */ a(Hi, { variant: "default", title: i, children: /* @__PURE__ */ a(ei, { ref: e, children: o, noWrap: !0, sx: n }) })), Oi = B(({ className: i = "", ...o }, n) => /* @__PURE__ */ a(
102
+ Ii,
102
103
  {
103
104
  ref: n,
104
105
  className: ({ isActive: e }) => e ? i + " Mui-selected" : i,
105
106
  end: !0,
106
107
  ...o
107
108
  }
108
- )), Z = I.memo(zi), P = ({ icon: i, sx: o }) => /* @__PURE__ */ d(
109
- hi,
109
+ )), ii = I.memo(Oi), P = ({ icon: i, sx: o }) => /* @__PURE__ */ a(
110
+ fi,
110
111
  {
111
112
  sx: {
112
113
  minWidth: 40,
@@ -120,7 +121,7 @@ const ki = f("main")(() => ({
120
121
  },
121
122
  children: i
122
123
  }
123
- ), Oi = f(ei, {
124
+ ), Fi = s(di, {
124
125
  shouldForwardProp: (i) => !["styleList", "isScrollIndentation"].includes(i)
125
126
  })(({ theme: i, styleList: o = "variant1" }) => ({
126
127
  display: "flex",
@@ -166,95 +167,95 @@ const ki = f("main")(() => ({
166
167
  }
167
168
  }
168
169
  }
169
- })), Fi = D(({ styleList: i = "variant1", columnMenu: o, isWrapText: n = !1, listMenu: e, isOpen: r, sx: a, className: l }, t) => {
170
- const { minWidthColumn: c } = o, p = E(() => ai(c, { newProp: "marginLeft" }), [c]), R = E(() => e.map(({ action: w, icon: S, title: L, sx: T = {}, onClick: W, children: m, to: z }, g) => m && Array.isArray(m) ? /* @__PURE__ */ d(bi, { children: /* @__PURE__ */ d(
170
+ })), Ni = B(({ styleList: i = "variant1", columnMenu: o, isWrapText: n = !1, listMenu: e, isOpen: r, sx: l, className: d }, t) => {
171
+ const { minWidthColumn: c } = o, f = E(() => li(c, { newProp: "marginLeft" }), [c]), R = E(() => e.map(({ action: m, icon: S, title: L, sx: T = {}, onClick: W, children: w, to: z }, g) => w && Array.isArray(w) ? /* @__PURE__ */ a(Ci, { children: /* @__PURE__ */ a(
171
172
  $i,
172
173
  {
173
- render: (b) => /* @__PURE__ */ s($, { children: [
174
- /* @__PURE__ */ s(A, { disablePadding: !0, sx: T, children: [
175
- /* @__PURE__ */ d(
174
+ render: (b) => /* @__PURE__ */ h(M, { children: [
175
+ /* @__PURE__ */ h(A, { disablePadding: !0, sx: T, children: [
176
+ /* @__PURE__ */ a(
176
177
  P,
177
178
  {
178
179
  icon: S,
179
180
  sx: c
180
181
  }
181
182
  ),
182
- /* @__PURE__ */ s(
183
+ /* @__PURE__ */ h(
183
184
  G,
184
185
  {
185
186
  isOpen: r,
186
187
  isWrapText: n,
187
- onClick: (h) => {
188
- b.handleToggle(), typeof W == "function" && W(h);
188
+ onClick: (p) => {
189
+ b.handleToggle(), typeof W == "function" && W(p);
189
190
  },
190
191
  children: [
191
- /* @__PURE__ */ d(
192
+ /* @__PURE__ */ a(
192
193
  V,
193
194
  {
194
195
  unmount: !r,
195
196
  title: L,
196
- sx: { flexGrow: 1, ...p },
197
+ sx: { flexGrow: 1, ...f },
197
198
  isWrapText: n
198
199
  }
199
200
  ),
200
- r && /* @__PURE__ */ s($, { children: [
201
- w,
202
- b.is ? /* @__PURE__ */ d(Li, {}) : /* @__PURE__ */ d(Wi, {})
201
+ r && /* @__PURE__ */ h(M, { children: [
202
+ m,
203
+ b.is ? /* @__PURE__ */ a(Wi, {}) : /* @__PURE__ */ a(yi, {})
203
204
  ] })
204
205
  ]
205
206
  }
206
207
  )
207
208
  ] }),
208
- /* @__PURE__ */ d(pi, { in: b.is && r, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ d(ei, { disablePadding: !0, children: m.map(({ action: h, icon: C, title: x, to: u, sx: O = {}, onClick: F }, k) => /* @__PURE__ */ d(A, { disablePadding: !0, sx: O, children: /* @__PURE__ */ s(
209
+ /* @__PURE__ */ a(si, { in: b.is && r, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ a(di, { disablePadding: !0, children: w.map(({ action: p, icon: C, title: x, to: u, sx: O = {}, onClick: F }, D) => /* @__PURE__ */ a(A, { disablePadding: !0, sx: O, children: /* @__PURE__ */ h(
209
210
  G,
210
211
  {
211
212
  to: u,
212
- component: Z,
213
+ component: ii,
213
214
  sx: ({ spacing: y }) => ({ ...!C && { paddingLeft: y(2) } }),
214
215
  isOpen: !0,
215
216
  onClick: F,
216
217
  isWrapText: n,
217
218
  children: [
218
- /* @__PURE__ */ d(
219
+ /* @__PURE__ */ a(
219
220
  P,
220
221
  {
221
222
  icon: C,
222
223
  sx: c
223
224
  }
224
225
  ),
225
- /* @__PURE__ */ d(
226
+ /* @__PURE__ */ a(
226
227
  V,
227
228
  {
228
- sx: () => ({ ...C && p }),
229
+ sx: () => ({ ...C && f }),
229
230
  unmount: !r,
230
231
  title: x,
231
232
  isWrapText: n
232
233
  }
233
234
  ),
234
- r && h
235
+ r && p
235
236
  ]
236
237
  }
237
- ) }, `${g}-${k}`)) }) })
238
+ ) }, `${g}-${D}`)) }) })
238
239
  ] })
239
240
  }
240
- ) }, g) : /* @__PURE__ */ s(A, { disablePadding: !0, sx: T, children: [
241
- /* @__PURE__ */ d(P, { icon: S, sx: c }),
242
- /* @__PURE__ */ s(G, { component: Z, to: z, isOpen: r, onClick: W, isWrapText: n, children: [
243
- /* @__PURE__ */ d(V, { sx: p, unmount: !r, title: L, isWrapText: n }),
244
- r && w
241
+ ) }, g) : /* @__PURE__ */ h(A, { disablePadding: !0, sx: T, children: [
242
+ /* @__PURE__ */ a(P, { icon: S, sx: c }),
243
+ /* @__PURE__ */ h(G, { component: ii, to: z, isOpen: r, onClick: W, isWrapText: n, children: [
244
+ /* @__PURE__ */ a(V, { sx: f, unmount: !r, title: L, isWrapText: n }),
245
+ r && m
245
246
  ] })
246
- ] }, g)), [e, r, p]);
247
- return /* @__PURE__ */ d(
248
- Oi,
247
+ ] }, g)), [e, r, f]);
248
+ return /* @__PURE__ */ a(
249
+ Fi,
249
250
  {
250
251
  ref: t,
251
252
  styleList: i,
252
- sx: a,
253
- className: l,
253
+ sx: l,
254
+ className: d,
254
255
  children: R
255
256
  }
256
257
  );
257
- }), ji = I.memo(Fi), Ni = f(_, {
258
+ }), ji = I.memo(Ni), Ai = s(_, {
258
259
  target: "MuiFooter-root",
259
260
  shouldForwardProp: (i) => ![""].includes(i)
260
261
  })(({}) => ({
@@ -263,21 +264,21 @@ const ki = f("main")(() => ({
263
264
  // bottom: 0,
264
265
  // right: 0,
265
266
  minHeight: 48
266
- })), Ai = ({
267
+ })), Gi = ({
267
268
  initWidth: i,
268
269
  isOpen: o,
269
270
  children: n,
270
271
  isRight: e,
271
272
  isHeaderResize: r = !0,
272
- bgColor: a,
273
- className: l,
273
+ bgColor: l,
274
+ className: d,
274
275
  AfterComponent: t,
275
276
  sx: c
276
- }) => /* @__PURE__ */ s(
277
- Vi,
277
+ }) => /* @__PURE__ */ h(
278
+ Pi,
278
279
  {
279
- className: l,
280
- bgColor: a,
280
+ className: d,
281
+ bgColor: l,
281
282
  isRight: e,
282
283
  position: "fixed",
283
284
  initWidth: i,
@@ -285,14 +286,14 @@ const ki = f("main")(() => ({
285
286
  isHeaderResize: r,
286
287
  sx: c,
287
288
  children: [
288
- /* @__PURE__ */ d(gi, { maxWidth: "xl", children: /* @__PURE__ */ d(xi, { sx: { flexGrow: 1 }, disableGutters: !0, children: n }) }),
289
+ /* @__PURE__ */ a(xi, { maxWidth: "xl", children: /* @__PURE__ */ a(ui, { sx: { flexGrow: 1 }, disableGutters: !0, children: n }) }),
289
290
  t && t
290
291
  ]
291
292
  }
292
- ), Gi = I.memo(Ai), Vi = f(fi, {
293
+ ), Vi = I.memo(Gi), Pi = s(gi, {
293
294
  shouldForwardProp: (i) => !["isOpen", "isRight", "initWidth", "bgColor", "isHeaderResize"].includes(i)
294
- })(({ theme: i, isOpen: o, isRight: n, initWidth: e = 250, bgColor: r = "primary", isHeaderResize: a }) => ({
295
- backgroundColor: di.colors.getColorPalette(i, r),
295
+ })(({ theme: i, isOpen: o, isRight: n, initWidth: e = 250, bgColor: r = "primary", isHeaderResize: l }) => ({
296
+ backgroundColor: ai.colors.getColorPalette(i, r),
296
297
  zIndex: i.zIndex.drawer + 1,
297
298
  color: "info.main",
298
299
  transition: i.transitions.create(["width", "margin"], {
@@ -302,13 +303,13 @@ const ki = f("main")(() => ({
302
303
  ...o && {
303
304
  ...n ? { marginRight: e } : { marginLeft: e },
304
305
  width: `calc(100% - ${e}px)`,
305
- ...!a && { width: "100%", zIndex: 3, margin: 0 },
306
+ ...!l && { width: "100%", zIndex: 3, margin: 0 },
306
307
  transition: i.transitions.create(["width", "margin"], {
307
308
  easing: i.transitions.easing.sharp,
308
309
  duration: i.transitions.duration.enteringScreen
309
310
  })
310
311
  }
311
- })), ii = (i, o, n = !0) => ({
312
+ })), ri = (i, o, n = !0) => ({
312
313
  width: o,
313
314
  ...n && {
314
315
  transition: i.transitions.create("width", {
@@ -317,7 +318,7 @@ const ki = f("main")(() => ({
317
318
  })
318
319
  },
319
320
  overflow: "hidden"
320
- }), ri = (i, o, n = !0) => ({
321
+ }), ni = (i, o, n = !0) => ({
321
322
  ...n && {
322
323
  transition: i.transitions.create("width", {
323
324
  easing: i.transitions.easing.sharp,
@@ -330,13 +331,13 @@ const ki = f("main")(() => ({
330
331
  // [theme.breakpoints.up('sm')]: {
331
332
  // width: `calc(${theme.spacing(8)} + 1px)`,
332
333
  // },
333
- }), Pi = f(ui, {
334
+ }), _i = s(mi, {
334
335
  shouldForwardProp: (i) => !["open", "isWrapText", "columnMenu", "isRight", "styleList"].includes(i)
335
336
  })(
336
337
  ({ theme: i, open: o, isRight: n, columnMenu: e }) => {
337
- const r = n ? "Left" : "Right", a = e.initWidth, l = e.minWidthColumn;
338
+ const r = n ? "Left" : "Right", l = e.initWidth, d = e.minWidthColumn;
338
339
  return {
339
- width: a,
340
+ width: l,
340
341
  position: "relative",
341
342
  zIndex: 0,
342
343
  flexShrink: 0,
@@ -344,44 +345,44 @@ const ki = f("main")(() => ({
344
345
  boxSizing: "border-box",
345
346
  [`border${r}`]: `1px solid ${i.palette.divider}`,
346
347
  ...n ? { order: 1 } : { order: 0 },
347
- ...o ? ii(i, a) : ri(i, l),
348
+ ...o ? ri(i, l) : ni(i, d),
348
349
  "& .MuiDrawer-paper": {
349
350
  position: "static",
350
351
  // при isWrapText - при открытии меню текст сжатый и значки смешаются поэтому ставим условие
351
- ...o ? ii(i, a) : ri(i, l)
352
+ ...o ? ri(i, l) : ni(i, d)
352
353
  // ...(open ? openedMixin(theme, initWidth) : closedMixin(theme, isWrapText ? { width: initWidth } : minWidth))
353
354
  }
354
355
  };
355
356
  }
356
- ), ni = f("div")(({ theme: i }) => ({
357
+ ), oi = s("div")(({ theme: i }) => ({
357
358
  display: "flex",
358
359
  padding: i.spacing(0, 1),
359
360
  ...i.mixins.toolbar
360
- })), oi = (i) => {
361
+ })), ti = (i) => {
361
362
  const { clientWidth: o, offsetWidth: n } = i;
362
363
  return n - o;
363
- }, _i = D(({ Footer: i, listMenu: o, children: n, HeaderContent: e, statuses: r, itemsProps: a, classes: l, columnMenu: t, styleList: c, sx: p }, R) => {
364
+ }, Ei = B(({ Footer: i, listMenu: o, children: n, HeaderContent: e, statuses: r, itemsProps: l, classes: d, columnMenu: t, styleList: c, sx: f }, R) => {
364
365
  var q, J, K;
365
- const w = mi(), S = (t == null ? void 0 : t.position) === "right", L = !1, T = !0;
366
+ const m = bi(), S = (t == null ? void 0 : t.position) === "right", L = !1, T = !0;
366
367
  //!!statuses?.isScrollIndentation
367
- const W = (r == null ? void 0 : r.isHeaderDefault) === void 0 ? !0 : r == null ? void 0 : r.isHeaderDefault, m = (r == null ? void 0 : r.isHeader) === void 0 ? !0 : r == null ? void 0 : r.isHeader, z = (r == null ? void 0 : r.isMenu) === void 0 ? !0 : r == null ? void 0 : r.isMenu, g = (t == null ? void 0 : t.initWidth) || 250, b = E(() => t != null && t.minWidthColumn && Object.keys(t == null ? void 0 : t.minWidthColumn).length ? t == null ? void 0 : t.minWidthColumn : {
368
- width: `calc(${w.spacing(7)} + 1px)`,
369
- [w.breakpoints.up("sm")]: {
370
- width: `calc(${w.spacing(8)} + 1px)`
368
+ const W = (r == null ? void 0 : r.isHeaderDefault) === void 0 ? !0 : r == null ? void 0 : r.isHeaderDefault, w = (r == null ? void 0 : r.isHeader) === void 0 ? !0 : r == null ? void 0 : r.isHeader, z = (r == null ? void 0 : r.isMenu) === void 0 ? !0 : r == null ? void 0 : r.isMenu, g = (t == null ? void 0 : t.initWidth) || 250, b = E(() => t != null && t.minWidthColumn && Object.keys(t == null ? void 0 : t.minWidthColumn).length ? t == null ? void 0 : t.minWidthColumn : {
369
+ width: `calc(${m.spacing(7)} + 1px)`,
370
+ [m.breakpoints.up("sm")]: {
371
+ width: `calc(${m.spacing(8)} + 1px)`
371
372
  }
372
- }, [t == null ? void 0 : t.minWidthColumn]), [h, C] = B({
373
+ }, [t == null ? void 0 : t.minWidthColumn]), [p, C] = $({
373
374
  isOpen: !!(r != null && r.isDefaultOpen),
374
375
  widthCloseColumn: 0,
375
376
  widthScroll: 0
376
- }), x = Ti(h, C), u = X(null);
377
+ }), x = Di(p, C), u = X(null);
377
378
  Y(() => {
378
379
  if (u.current) {
379
- const H = oi(u.current);
380
+ const H = ti(u.current);
380
381
  let v = !1;
381
382
  H > 0 && (v = !0), x({ widthScroll: v ? H + 1 : 0 }), window.onresize = function() {
382
383
  if (u.current) {
383
- const j = oi(u.current);
384
- v && !j && (v = !1, x({ widthScroll: 0 })), !v && j && (v = !0, x({ widthScroll: j + 1 }));
384
+ const N = ti(u.current);
385
+ v && !N && (v = !1, x({ widthScroll: 0 })), !v && N && (v = !0, x({ widthScroll: N + 1 }));
385
386
  }
386
387
  };
387
388
  }
@@ -390,80 +391,80 @@ const ki = f("main")(() => ({
390
391
  x({ isOpen: !0 });
391
392
  }, F = () => {
392
393
  x({ isOpen: !1 });
393
- }, k = () => {
394
+ }, D = () => {
394
395
  C((H) => ({ ...H, isOpen: !H.isOpen }));
395
396
  }, y = {
396
- isOpen: h.isOpen,
397
+ isOpen: p.isOpen,
397
398
  handleMenuOpen: O,
398
399
  handleMenuClose: F,
399
- handleMenuToggle: k
400
+ handleMenuToggle: D
400
401
  };
401
- return Ci(R, () => y), /* @__PURE__ */ s(_, { sx: { display: "flex", height: "inherit" }, children: [
402
- m ? W ? /* @__PURE__ */ d(
403
- Gi,
402
+ return vi(R, () => y), /* @__PURE__ */ h(_, { className: U("Dashboard", d == null ? void 0 : d.dashboard), sx: { display: "flex", height: "inherit" }, children: [
403
+ w ? W ? /* @__PURE__ */ a(
404
+ Vi,
404
405
  {
405
406
  initWidth: g,
406
- isOpen: h.isOpen,
407
- bgColor: (q = a == null ? void 0 : a.MuiHeader) == null ? void 0 : q.bgColor,
407
+ isOpen: p.isOpen,
408
+ bgColor: (q = l == null ? void 0 : l.MuiHeader) == null ? void 0 : q.bgColor,
408
409
  isRight: S,
409
410
  isHeaderResize: r == null ? void 0 : r.isHeaderResize,
410
- sx: (J = a == null ? void 0 : a.MuiHeader) == null ? void 0 : J.sx,
411
- className: l == null ? void 0 : l.header,
412
- AfterComponent: (K = a == null ? void 0 : a.MuiHeader) == null ? void 0 : K.AfterComponent,
411
+ sx: (J = l == null ? void 0 : l.MuiHeader) == null ? void 0 : J.sx,
412
+ className: d == null ? void 0 : d.header,
413
+ AfterComponent: (K = l == null ? void 0 : l.MuiHeader) == null ? void 0 : K.AfterComponent,
413
414
  children: typeof e == "function" ? e(y) : e
414
415
  }
415
416
  ) : typeof e == "function" ? e(y) : e : null,
416
- z && /* @__PURE__ */ s(
417
- Pi,
417
+ z && /* @__PURE__ */ h(
418
+ _i,
418
419
  {
419
420
  variant: "permanent",
420
- open: h.isOpen,
421
+ open: p.isOpen,
421
422
  isRight: S,
422
423
  isWrapText: L,
423
424
  columnMenu: { initWidth: g, minWidthColumn: b },
424
425
  styleList: c,
425
426
  children: [
426
- (r == null ? void 0 : r.isMenuHeader) !== !1 && /* @__PURE__ */ s($, { children: [
427
- /* @__PURE__ */ d(ni, {}),
428
- /* @__PURE__ */ d(Q, {})
427
+ (r == null ? void 0 : r.isMenuHeader) !== !1 && /* @__PURE__ */ h(M, { children: [
428
+ /* @__PURE__ */ a(oi, {}),
429
+ /* @__PURE__ */ a(Q, {})
429
430
  ] }),
430
- /* @__PURE__ */ d(_, { className: "MuiListWrap", sx: {
431
+ /* @__PURE__ */ a(_, { className: "MuiListWrap", sx: {
431
432
  display: "flex",
432
433
  flexDirection: "column",
433
434
  flexGrow: 1,
434
435
  overflow: "hidden"
435
- }, children: /* @__PURE__ */ d(
436
+ }, children: /* @__PURE__ */ a(
436
437
  ji,
437
438
  {
438
439
  ref: u,
439
440
  columnMenu: {
440
441
  initWidth: g,
441
- minWidthColumn: ai(b, { newProp: "width", positionCorrect: `- ${h.widthScroll}px` })
442
+ minWidthColumn: li(b, { newProp: "width", positionCorrect: `- ${p.widthScroll}px` })
442
443
  },
443
444
  listMenu: o,
444
- isOpen: h.isOpen,
445
+ isOpen: p.isOpen,
445
446
  sx: {
446
- ...p
447
+ ...f
447
448
  },
448
- className: l == null ? void 0 : l.listMenu,
449
+ className: d == null ? void 0 : d.listMenu,
449
450
  isWrapText: L,
450
451
  styleList: c
451
452
  }
452
453
  ) }),
453
- (r == null ? void 0 : r.isButtonCenterMenu) !== !1 && /* @__PURE__ */ d(Mi, { children: /* @__PURE__ */ d(wi, { onClick: k, sx: { pointerEvents: "auto" }, children: h.isOpen ? /* @__PURE__ */ d(Si, {}) : /* @__PURE__ */ d(vi, {}) }) }),
454
- i && /* @__PURE__ */ d($, { children: /* @__PURE__ */ s(Ni, { children: [
455
- /* @__PURE__ */ d(Q, {}),
454
+ (r == null ? void 0 : r.isButtonCenterMenu) !== !1 && /* @__PURE__ */ a(Mi, { children: /* @__PURE__ */ a(wi, { onClick: D, sx: { pointerEvents: "auto" }, children: p.isOpen ? /* @__PURE__ */ a(Li, {}) : /* @__PURE__ */ a(Si, {}) }) }),
455
+ i && /* @__PURE__ */ a(M, { children: /* @__PURE__ */ h(Ai, { children: [
456
+ /* @__PURE__ */ a(Q, {}),
456
457
  i
457
458
  ] }) })
458
459
  ]
459
460
  }
460
461
  ),
461
- /* @__PURE__ */ s(ki, { children: [
462
- m && /* @__PURE__ */ d(ni, {}),
462
+ /* @__PURE__ */ h(ki, { className: U("Dashboard-main", d == null ? void 0 : d.main), children: [
463
+ w && /* @__PURE__ */ a(oi, {}),
463
464
  n
464
465
  ] })
465
466
  ] });
466
- }), rr = I.memo(_i);
467
+ }), or = I.memo(Ei);
467
468
  export {
468
- rr as Dashboard
469
+ or as Dashboard
469
470
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rc-lib-ui",
3
3
  "private": false,
4
- "version": "1.1.19",
4
+ "version": "1.1.20",
5
5
  "author": "SinGlEBW",
6
6
  "license": "MIT",
7
7
  "type": "module",