componentes-sinco 1.2.7 → 1.2.8

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.
package/dist/index.cjs CHANGED
@@ -917,7 +917,8 @@ var AttachmentMobile = ({
917
917
  children,
918
918
  sx,
919
919
  view = "button",
920
- iconFileItem
920
+ iconFileItem,
921
+ onFileClick
921
922
  }) => {
922
923
  const webcamRef = (0, import_react7.useRef)(null);
923
924
  const [abrirCamara, setAbrirCamara] = (0, import_react7.useState)(false);
@@ -1244,31 +1245,43 @@ var AttachmentMobile = ({
1244
1245
  }
1245
1246
  }
1246
1247
  },
1247
- /* @__PURE__ */ import_react7.default.createElement(import_material5.Stack, { direction: "row", alignItems: "center", gap: 1, width: "100%" }, iconFileItem ? /* @__PURE__ */ import_react7.default.createElement(import_material5.SvgIcon, { color: file.uploadError ? "error" : "primary", fontSize: "small", component: IconFileItem }) : /* @__PURE__ */ import_react7.default.createElement(
1248
- import_icons_material7.UploadFileOutlined,
1249
- {
1250
- color: file.uploadError ? "error" : "primary",
1251
- fontSize: "small"
1252
- }
1253
- ), /* @__PURE__ */ import_react7.default.createElement(import_material5.Stack, { width: "100%" }, /* @__PURE__ */ import_react7.default.createElement(
1254
- import_material5.Typography,
1255
- {
1256
- variant: "body2",
1257
- color: "text.primary",
1258
- whiteSpace: "nowrap",
1259
- overflow: "hidden",
1260
- textOverflow: "ellipsis",
1261
- maxWidth: "310px"
1262
- },
1263
- file.name
1264
- ), /* @__PURE__ */ import_react7.default.createElement(
1265
- import_material5.Typography,
1248
+ /* @__PURE__ */ import_react7.default.createElement(
1249
+ import_material5.Stack,
1266
1250
  {
1267
- variant: "caption",
1268
- color: file.uploadError ? "error" : "text.secondary"
1251
+ direction: "row",
1252
+ alignItems: "center",
1253
+ gap: 1,
1254
+ width: "100%",
1255
+ onClick: () => onFileClick == null ? void 0 : onFileClick(file),
1256
+ sx: { cursor: onFileClick ? "pointer" : "default" }
1269
1257
  },
1270
- file.uploadError && file.size / (1024 * 1024) > maxSize ? "Archivo super\xF3 el l\xEDmite \u2022 Carga fallida" : file.uploadError ? "Archivo duplicado o inv\xE1lido \u2022 Carga fallida" : `${(file.size / (1024 * 1024)).toFixed(2)}MB \u2022 ${file.type}`
1271
- ))),
1258
+ iconFileItem ? /* @__PURE__ */ import_react7.default.createElement(import_material5.SvgIcon, { color: file.uploadError ? "error" : "primary", fontSize: "small", component: IconFileItem }) : /* @__PURE__ */ import_react7.default.createElement(
1259
+ import_icons_material7.UploadFileOutlined,
1260
+ {
1261
+ color: file.uploadError ? "error" : "primary",
1262
+ fontSize: "small"
1263
+ }
1264
+ ),
1265
+ /* @__PURE__ */ import_react7.default.createElement(import_material5.Stack, { width: "100%" }, /* @__PURE__ */ import_react7.default.createElement(
1266
+ import_material5.Typography,
1267
+ {
1268
+ variant: "body2",
1269
+ color: "text.primary",
1270
+ whiteSpace: "nowrap",
1271
+ overflow: "hidden",
1272
+ textOverflow: "ellipsis",
1273
+ maxWidth: "310px"
1274
+ },
1275
+ file.name
1276
+ ), /* @__PURE__ */ import_react7.default.createElement(
1277
+ import_material5.Typography,
1278
+ {
1279
+ variant: "caption",
1280
+ color: file.uploadError ? "error" : "text.secondary"
1281
+ },
1282
+ file.uploadError && file.size / (1024 * 1024) > maxSize ? "Archivo super\xF3 el l\xEDmite \u2022 Carga fallida" : file.uploadError ? "Archivo duplicado o inv\xE1lido \u2022 Carga fallida" : `${(file.size / (1024 * 1024)).toFixed(2)}MB \u2022 ${file.type}`
1283
+ ))
1284
+ ),
1272
1285
  view == "file" ? /* @__PURE__ */ import_react7.default.createElement(import_material5.Tooltip, { title: "Descargar" }, /* @__PURE__ */ import_react7.default.createElement(
1273
1286
  import_material5.IconButton,
1274
1287
  {
@@ -5066,7 +5079,7 @@ var import_CardActions = __toESM(require("@mui/material/CardActions"), 1);
5066
5079
  var import_Collapse = __toESM(require("@mui/material/Collapse"), 1);
5067
5080
  var import_ExpandMore2 = __toESM(require("@mui/icons-material/ExpandMore"), 1);
5068
5081
  var Muicon8 = __toESM(require("@mui/icons-material"), 1);
5069
- var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }) => {
5082
+ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, dividerHeader, content, actions, dividerActions, contentExpand }) => {
5070
5083
  let iconTitleValidation = "";
5071
5084
  let IconTitle;
5072
5085
  const [expanded, setExpanded] = import_react49.default.useState(false);
@@ -5091,7 +5104,7 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
5091
5104
  import_CardHeader.default,
5092
5105
  {
5093
5106
  avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */ import_react49.default.createElement(import_material35.Box, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ import_react49.default.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ import_react49.default.createElement(import_material35.SvgIcon, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : void 0,
5094
- action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ import_react49.default.createElement(import_material35.Button, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ import_react49.default.createElement(import_IconButton.default, { onClick: handleExpandClick, sx: { marginRight: "auto" }, size: "small" }, /* @__PURE__ */ import_react49.default.createElement(import_ExpandMore2.default, { fontSize: "small" })) : actionsTitle,
5107
+ action: actionsTitle == "expand" ? /* @__PURE__ */ import_react49.default.createElement(import_IconButton.default, { onClick: handleExpandClick, sx: { marginRight: "auto" }, size: "small" }, /* @__PURE__ */ import_react49.default.createElement(import_ExpandMore2.default, { fontSize: "small" })) : actionsTitle,
5095
5108
  title,
5096
5109
  subheader: subtitle,
5097
5110
  sx: {
@@ -5110,25 +5123,14 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
5110
5123
  }
5111
5124
  }
5112
5125
  }
5113
- ), image && /* @__PURE__ */ import_react49.default.createElement(
5126
+ ), dividerHeader && title && /* @__PURE__ */ import_react49.default.createElement(import_material35.Divider, { variant: "fullWidth" }), image && /* @__PURE__ */ import_react49.default.createElement(
5114
5127
  import_CardMedia.default,
5115
5128
  {
5116
5129
  component: "img",
5117
5130
  height: "194",
5118
5131
  image
5119
5132
  }
5120
- ), content && /* @__PURE__ */ import_react49.default.createElement(import_CardContent.default, { sx: { padding: "8px 16px !important" } }, content), ((expand == null ? void 0 : expand.position) == "bottom" || actions != void 0) && /* @__PURE__ */ import_react49.default.createElement(import_CardActions.default, { disableSpacing: true, sx: { justifyContent: "flex-end" } }, (expand == null ? void 0 : expand.position) === "bottom" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ import_react49.default.createElement(import_material35.Button, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ import_react49.default.createElement(import_IconButton.default, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, /* @__PURE__ */ import_react49.default.createElement(import_ExpandMore2.default, null)) : null, actions && actions.length > 0 ? actions.map((action, index) => /* @__PURE__ */ import_react49.default.createElement(
5121
- import_material35.Button,
5122
- {
5123
- key: index,
5124
- size: "small",
5125
- color: action.color || "primary",
5126
- variant: action.variant || "text",
5127
- onClick: action.fn,
5128
- disabled: action.disabled || false
5129
- },
5130
- action.text
5131
- )) : ""), expand && /* @__PURE__ */ import_react49.default.createElement(import_Collapse.default, { in: expanded, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ import_react49.default.createElement(import_CardContent.default, { sx: { padding: "8px 16px !important" } }, expand.content)));
5133
+ ), content && /* @__PURE__ */ import_react49.default.createElement(import_CardContent.default, { sx: { padding: "8px 16px !important" } }, content), dividerActions && /* @__PURE__ */ import_react49.default.createElement(import_material35.Divider, { variant: "fullWidth" }), actions && /* @__PURE__ */ import_react49.default.createElement(import_CardActions.default, null, actions), contentExpand && /* @__PURE__ */ import_react49.default.createElement(import_Collapse.default, { in: expanded, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ import_react49.default.createElement(import_CardContent.default, { sx: { padding: "8px 16px !important" } }, contentExpand)));
5132
5134
  };
5133
5135
 
5134
5136
  // src/Components/SCDataGrid.tsx