rc-lib-ui 1.2.19 → 1.2.21

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.
@@ -2,7 +2,7 @@ import { Theme, SxProps } from '@mui/material';
2
2
  import { default as React } from 'react';
3
3
  export interface ListTextProps {
4
4
  isWrapText: boolean;
5
- title: string;
5
+ title: React.ReactNode;
6
6
  sx?: SxProps<Theme>;
7
7
  unmount: boolean;
8
8
  }
package/dist/dashboard.js CHANGED
@@ -4,8 +4,8 @@ import { useTheme as wi } from "@mui/material/styles";
4
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
5
  import Si from "@mui/icons-material/ChevronLeft";
6
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";
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
9
  import { T as Hi } from "./Tooltips-Q_C8jHNF.js";
10
10
  import { NavLink as ki } from "react-router-dom";
11
11
  import G from "classnames";
@@ -79,11 +79,11 @@ const Di = p("main")(() => ({
79
79
  return Q(() => {
80
80
  if (!i && o.current) {
81
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);
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
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(
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
87
  ki,
88
88
  {
89
89
  ref: l,
@@ -170,7 +170,7 @@ const Di = p("main")(() => ({
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, [I, v] = B(""), y = li(() => n.map(({ action: W, icon: g, title: z, sx: H = {}, onClick: S, children: m, to: k }, h) => {
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
174
  const D = `${h}`, w = (s) => {
175
175
  v(D), S && S(s);
176
176
  };
@@ -207,7 +207,7 @@ const Di = p("main")(() => ({
207
207
  ),
208
208
  t && /* @__PURE__ */ f(A, { children: [
209
209
  W,
210
- s.is ? /* @__PURE__ */ d(yi, {}) : /* @__PURE__ */ d(Wi, {})
210
+ s.is ? /* @__PURE__ */ d(Ii, {}) : /* @__PURE__ */ d(Wi, {})
211
211
  ] })
212
212
  ]
213
213
  }
@@ -223,7 +223,7 @@ const Di = p("main")(() => ({
223
223
  isOpen: !0,
224
224
  onClick: b,
225
225
  isWrapText: e,
226
- ...C ? { to: C, component: ni } : { to: "", className: G({ "Mui-selected": I === L }) },
226
+ ...C ? { to: C, component: ni } : { to: "", className: G({ "Mui-selected": y === L }) },
227
227
  children: [
228
228
  T && /* @__PURE__ */ d(X, { icon: T, sx: { ...x, marginLeft: "8px !important" } }),
229
229
  /* @__PURE__ */ d(
@@ -247,7 +247,7 @@ const Di = p("main")(() => ({
247
247
  isOpen: t,
248
248
  onClick: w,
249
249
  isWrapText: e,
250
- ...k ? { to: k, component: ni } : { to: "", className: G({ "Mui-selected": I === D }) },
250
+ ...k ? { to: k, component: ni } : { to: "", className: G({ "Mui-selected": y === D }) },
251
251
  sx: { ...q({ isIcon: g }) },
252
252
  children: [
253
253
  g && /* @__PURE__ */ d(X, { icon: g, sx: x }),
@@ -263,7 +263,7 @@ const Di = p("main")(() => ({
263
263
  ]
264
264
  }
265
265
  ) }, h);
266
- }), [n, t, I, a, q]);
266
+ }), [n, t, y, a, q]);
267
267
  return /* @__PURE__ */ d(
268
268
  Oi,
269
269
  {
@@ -271,7 +271,7 @@ const Di = p("main")(() => ({
271
271
  styleList: i,
272
272
  sx: o,
273
273
  className: r,
274
- children: y
274
+ children: I
275
275
  }
276
276
  );
277
277
  }), ji = R.memo(Fi), Ai = p(J, {
@@ -380,9 +380,9 @@ const Di = p("main")(() => ({
380
380
  })), ei = (i) => {
381
381
  const { clientWidth: a, offsetWidth: l } = i;
382
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) => {
383
+ }, Ei = _(({ Footer: i, listMenu: a, children: l, HeaderContent: e, statuses: n, itemsProps: t, classes: o, columnMenu: r, styleList: c, sx: x }, y) => {
384
384
  var O, $, F, L;
385
- const v = wi(), y = (r == null ? void 0 : r.position) === "right", W = !1, g = !0;
385
+ const v = wi(), I = (r == null ? void 0 : r.position) === "right", W = !1, g = !0;
386
386
  //!!statuses?.isScrollIndentation
387
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
388
  width: `calc(${v.spacing(7)} + 1px)`,
@@ -393,7 +393,7 @@ const Di = p("main")(() => ({
393
393
  isOpen: !!(n != null && n.isDefaultOpen),
394
394
  widthCloseColumn: 0,
395
395
  widthScroll: 0
396
- }), w = Ii(h, D), s = K(null);
396
+ }), w = yi(h, D), s = K(null);
397
397
  Q(() => {
398
398
  if (s.current) {
399
399
  const b = ei(s.current);
@@ -418,14 +418,14 @@ const Di = p("main")(() => ({
418
418
  handleMenuClose: T,
419
419
  handleMenuToggle: N
420
420
  };
421
- return vi(I, () => C), /* @__PURE__ */ f(J, { className: G("Dashboard", o == null ? void 0 : o.dashboard), sx: { display: "flex", height: "inherit", ...x }, children: [
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
422
  H ? z ? /* @__PURE__ */ d(
423
423
  _i,
424
424
  {
425
425
  initWidth: m,
426
426
  isOpen: h.isOpen,
427
427
  bgColor: (O = t == null ? void 0 : t.MuiHeader) == null ? void 0 : O.bgColor,
428
- isRight: y,
428
+ isRight: I,
429
429
  isHeaderResize: n == null ? void 0 : n.isHeaderResize,
430
430
  sx: ($ = t == null ? void 0 : t.MuiHeader) == null ? void 0 : $.sx,
431
431
  className: o == null ? void 0 : o.header,
@@ -438,7 +438,7 @@ const Di = p("main")(() => ({
438
438
  {
439
439
  variant: "permanent",
440
440
  open: h.isOpen,
441
- isRight: y,
441
+ isRight: I,
442
442
  isWrapText: W,
443
443
  columnMenu: { initWidth: m, minWidthColumn: k },
444
444
  styleList: c,
@@ -456,7 +456,7 @@ const Di = p("main")(() => ({
456
456
  ji,
457
457
  {
458
458
  ref: s,
459
- isRight: y,
459
+ isRight: I,
460
460
  columnMenu: {
461
461
  initWidth: m,
462
462
  minWidthColumn: Ti(k, { newProp: "width", positionCorrect: `- ${h.widthScroll}px` })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rc-lib-ui",
3
3
  "private": false,
4
- "version": "1.2.19",
4
+ "version": "1.2.21",
5
5
  "author": "SinGlEBW",
6
6
  "license": "MIT",
7
7
  "type": "module",