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