rc-lib-ui 1.2.24 → 1.2.25

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.
@@ -4,6 +4,7 @@ import { ListButtonProps } from './ui/ListButton';
4
4
  import { ListTextProps } from './ui/ListText';
5
5
  import { RenderIconProps } from './ui/RenderIcon';
6
6
  import { RenderListProps } from './ui/RenderList';
7
+ import { StyledListItemProps } from './ui/styled';
7
8
  interface ItemListMenuCommonProps extends Pick<RenderIconProps, 'icon'>, Pick<ListTextProps, 'title'>, Pick<ListButtonProps, 'onClick'> {
8
9
  action?: ReactNode;
9
10
  sx?: SxProps<Theme>;
@@ -23,7 +24,7 @@ type VariantsMenuListProps = OneVariantMenuList | TwoVariantMenuList;
23
24
  export interface ListMenuProps extends RenderListProps {
24
25
  listMenu: Array<VariantsMenuListProps & ItemListMenuCommonProps>;
25
26
  isOpen: boolean;
26
- sx?: SxProps<Theme>;
27
+ sx?: StyledListItemProps['sx'];
27
28
  className?: string;
28
29
  isWrapText?: boolean;
29
30
  size?: 'normal' | 'small';
@@ -1,4 +1,5 @@
1
- interface StyledListItemProps {
1
+ import { ListItemProps } from '@mui/material';
2
+ export interface StyledListItemProps extends ListItemProps {
2
3
  visual: "variant1" | "variant2";
3
4
  }
4
5
  export declare const StyledListItem: import('@emotion/styled').StyledComponent<{
@@ -6,4 +7,3 @@ export declare const StyledListItem: import('@emotion/styled').StyledComponent<{
6
7
  } & import('@mui/material').ListItemOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
7
8
  ref?: ((instance: HTMLLIElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLLIElement> | null | undefined;
8
9
  }, "className" | "style" | "classes" | "alignItems" | "children" | "sx" | "button" | "autoFocus" | "dense" | "components" | "componentsProps" | "slotProps" | "slots" | "disabled" | "selected" | "disableGutters" | "divider" | "disablePadding" | "ContainerComponent" | "ContainerProps" | "secondaryAction"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & StyledListItemProps, {}, {}>;
9
- export {};
package/dist/dashboard.js CHANGED
@@ -1,8 +1,8 @@
1
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
- 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";
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 Ci } from "react";
5
+ import Si from "@mui/icons-material/ChevronLeft";
6
6
  import Li from "@mui/icons-material/ChevronRight";
7
7
  import { U as yi, s as Ii } from "./index-B7GqTJat.js";
8
8
  import { ExpandLess as Wi, ExpandMore as Hi } from "@mui/icons-material";
@@ -171,9 +171,9 @@ const Mi = g("main")(() => ({
171
171
  }
172
172
  }
173
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) => {
174
+ const { minWidthColumn: u } = l, [I, C] = O(""), W = li(() => n.map(({ action: H, icon: x, title: F, sx: k = {}, onClick: S, children: w, to: D, id: h }, L) => {
175
175
  const p = `${h || L}`, b = (m) => {
176
- S(p), C && C(m);
176
+ C(p), S && S(m);
177
177
  };
178
178
  return w && Array.isArray(w) ? /* @__PURE__ */ d(vi, { children: /* @__PURE__ */ d(
179
179
  $i,
@@ -186,9 +186,10 @@ const Mi = g("main")(() => ({
186
186
  isOpen: m.is,
187
187
  isWrapText: e,
188
188
  onClick: (M) => {
189
- m.handleToggle(), typeof C == "function" && C(M);
189
+ m.handleToggle(), typeof S == "function" && S(M);
190
190
  },
191
191
  sx: { ...q({ isIcon: x }) },
192
+ className: "MuiButtonControlCollapse",
192
193
  children: [
193
194
  x && /* @__PURE__ */ d(
194
195
  X,
@@ -213,9 +214,9 @@ const Mi = g("main")(() => ({
213
214
  ]
214
215
  }
215
216
  ),
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
+ /* @__PURE__ */ d(pi, { in: m.is && t, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ d(ai, { disablePadding: !0, className: r, children: w.map(({ action: M, icon: y, title: T, to: R, sx: j = {}, id: $, onClick: B }, v) => {
217
218
  const f = `${L}-${$ || v}`, z = (ci) => {
218
- S(f), B && B(ci);
219
+ C(f), B && B(ci);
219
220
  };
220
221
  return /* @__PURE__ */ d(Y, { disablePadding: !0, sx: j, visual: i, children: /* @__PURE__ */ s(
221
222
  U,
@@ -383,12 +384,12 @@ const Mi = g("main")(() => ({
383
384
  return l - a;
384
385
  }, Xi = V(({ Footer: i, listMenu: a, children: l, HeaderContent: e, statuses: n, itemsProps: t, classes: o, columnMenu: r, styleList: c, sx: u }, I) => {
385
386
  var R, j, $, B;
386
- const S = bi(), W = (r == null ? void 0 : r.position) === "right", H = !1, x = !0;
387
+ const C = bi(), W = (r == null ? void 0 : r.position) === "right", H = !1, x = !0;
387
388
  //!!statuses?.isScrollIndentation
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)`
389
+ 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, S = (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 : {
390
+ width: `calc(${C.spacing(7)} + 1px)`,
391
+ [C.breakpoints.up("sm")]: {
392
+ width: `calc(${C.spacing(8)} + 1px)`
392
393
  }
393
394
  }, [r == null ? void 0 : r.minWidthColumn]), [h, L] = O({
394
395
  isOpen: !!(n != null && n.isDefaultOpen),
@@ -419,7 +420,7 @@ const Mi = g("main")(() => ({
419
420
  handleMenuClose: M,
420
421
  handleMenuToggle: y
421
422
  };
422
- return Si(I, () => T), /* @__PURE__ */ s(J, { className: _("Dashboard", o == null ? void 0 : o.dashboard), sx: { display: "flex", height: "inherit", ...u }, children: [
423
+ return Ci(I, () => T), /* @__PURE__ */ s(J, { className: _("Dashboard", o == null ? void 0 : o.dashboard), sx: { display: "flex", height: "inherit", ...u }, children: [
423
424
  k ? F ? /* @__PURE__ */ d(
424
425
  Vi,
425
426
  {
@@ -434,7 +435,7 @@ const Mi = g("main")(() => ({
434
435
  children: typeof e == "function" ? e(T) : e
435
436
  }
436
437
  ) : typeof e == "function" ? e(T) : e : null,
437
- C && /* @__PURE__ */ s(
438
+ S && /* @__PURE__ */ s(
438
439
  Ei,
439
440
  {
440
441
  variant: "permanent",
@@ -470,7 +471,7 @@ const Mi = g("main")(() => ({
470
471
  styleList: c
471
472
  }
472
473
  ) }),
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
+ (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(Si, {}) }) }),
474
475
  i && /* @__PURE__ */ d(G, { children: /* @__PURE__ */ s(Gi, { children: [
475
476
  /* @__PURE__ */ d(Z, {}),
476
477
  i
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rc-lib-ui",
3
3
  "private": false,
4
- "version": "1.2.24",
4
+ "version": "1.2.25",
5
5
  "author": "SinGlEBW",
6
6
  "license": "MIT",
7
7
  "type": "module",