react-crud-mui 0.2.94 → 0.2.95

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.
@@ -5,6 +5,7 @@ export type SidePanelItem = {
5
5
  name: React.ReactNode;
6
6
  icon?: React.ReactNode;
7
7
  endIcon?: React.ReactNode;
8
+ danger?: boolean;
8
9
  };
9
10
  export interface SidePanelProps extends BoxProps {
10
11
  items: SidePanelItem[];
@@ -2,4 +2,5 @@ export declare const StyledButton: import('@emotion/styled').StyledComponent<imp
2
2
  ref?: ((instance: HTMLButtonElement | 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<HTMLButtonElement> | null | undefined;
3
3
  }, "className" | "style" | "classes" | "color" | "children" | "sx" | "tabIndex" | "href" | "disabled" | "action" | "size" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "variant" | "fullWidth" | "disableElevation" | "endIcon" | "startIcon"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
4
4
  active: boolean;
5
+ danger?: boolean;
5
6
  }, {}, {}>;
package/dist/coreui.js CHANGED
@@ -12155,19 +12155,20 @@ function Ew({
12155
12155
  return o === "tag" ? /* @__PURE__ */ c(E9, { ellipsis: a, type: i, ...s, children: n }) : o === "percentage" ? /* @__PURE__ */ c(R9, { ellipsis: a, type: i, ...s, children: n }) : /* @__PURE__ */ c(F9, { ellipsis: a, type: i, ...s, children: n });
12156
12156
  }
12157
12157
  const D9 = Sn(Xr, {
12158
- shouldForwardProp: (n) => n !== "active"
12158
+ shouldForwardProp: (n) => n !== "active" && n !== "danger"
12159
12159
  })(({
12160
12160
  theme: n,
12161
- active: o
12161
+ active: o,
12162
+ danger: i
12162
12163
  }) => ({
12163
12164
  borderRadius: 0,
12164
12165
  fontWeight: 500,
12165
12166
  position: "relative",
12166
12167
  padding: "0.6rem 1.5rem",
12167
12168
  justifyContent: "flex-start",
12168
- color: n.palette.grey[500],
12169
+ color: i ? n.palette.error.main : n.palette.grey[500],
12169
12170
  ...o && {
12170
- color: n.palette.primary.main,
12171
+ color: i ? n.palette.error.main : n.palette.primary.main,
12171
12172
  backgroundColor: n.palette.action.selected,
12172
12173
  "&:hover": {
12173
12174
  backgroundColor: n.palette.action.hover
@@ -12180,11 +12181,11 @@ const D9 = Sn(Xr, {
12180
12181
  borderRadius: 4,
12181
12182
  position: "absolute",
12182
12183
  transition: "all 0.3s",
12183
- backgroundColor: n.palette.primary.main
12184
+ backgroundColor: i ? n.palette.error.main : n.palette.primary.main
12184
12185
  }
12185
12186
  },
12186
12187
  "&:hover": {
12187
- color: n.palette.primary.main,
12188
+ color: i ? n.palette.error.main : n.palette.primary.main,
12188
12189
  backgroundColor: n.palette.action.selected,
12189
12190
  "&:hover": {
12190
12191
  backgroundColor: n.palette.action.hover
@@ -12197,7 +12198,7 @@ const D9 = Sn(Xr, {
12197
12198
  borderRadius: 4,
12198
12199
  position: "absolute",
12199
12200
  transition: "all 0.3s",
12200
- backgroundColor: n.palette.primary.main
12201
+ backgroundColor: i ? n.palette.error.main : n.palette.primary.main
12201
12202
  }
12202
12203
  }
12203
12204
  }));
@@ -12212,7 +12213,7 @@ function Fw({
12212
12213
  t: f
12213
12214
  } = Ye(), [d, m] = Ge(!1), g = vx((w) => w.breakpoints.down("md")), x = (w) => () => {
12214
12215
  i == null || i(w), m(!1);
12215
- }, y = () => /* @__PURE__ */ c(It, { flexDirection: "column", children: n == null ? void 0 : n.map((w) => /* @__PURE__ */ c(D9, { variant: "text", startIcon: w.icon, endIcon: w.endIcon, active: o === w.key, onClick: x(w), children: /* @__PURE__ */ c("span", { style: {
12216
+ }, y = () => /* @__PURE__ */ c(It, { flexDirection: "column", children: n == null ? void 0 : n.map((w) => /* @__PURE__ */ c(D9, { variant: "text", startIcon: w.icon, endIcon: w.endIcon, danger: w.danger, active: o === w.key, onClick: x(w), children: /* @__PURE__ */ c("span", { style: {
12216
12217
  flexGrow: "1",
12217
12218
  textAlign: "left"
12218
12219
  }, children: w.name }) }, w.key)) });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-crud-mui",
3
3
  "private": false,
4
- "version": "0.2.94",
4
+ "version": "0.2.95",
5
5
  "type": "module",
6
6
  "main": "./dist/coreui.js",
7
7
  "module": "./dist/coreui.js",