componentes-sinco 1.1.1 → 1.1.3

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.d.cts CHANGED
@@ -658,14 +658,13 @@ interface AttachmentMobileProps<T> {
658
658
  maxSize?: number;
659
659
  sx?: SxProps;
660
660
  files?: T[];
661
- setAttachedFiles?: any;
662
661
  initialFiles?: UploadedFile[];
663
662
  fileAccepted?: string;
664
663
  onChange?: (archivos: File[]) => void;
665
664
  deleteAction?: (name: string) => Promise<void> | void;
666
665
  }
667
666
 
668
- declare const AttachmentMobile: ({ buttonAttachment, maxSize, fileAccepted, initialFiles, setAttachedFiles, deleteAction, children, onChange, sx }: AttachmentMobileProps<any>) => React__default.JSX.Element;
667
+ declare const AttachmentMobile: ({ buttonAttachment, maxSize, fileAccepted, initialFiles, deleteAction, children, onChange, sx }: AttachmentMobileProps<any>) => React__default.JSX.Element;
669
668
 
670
669
  interface SCSnackBarProps {
671
670
  type?: 'success' | 'error' | 'warning' | 'info';
package/dist/index.d.ts CHANGED
@@ -658,14 +658,13 @@ interface AttachmentMobileProps<T> {
658
658
  maxSize?: number;
659
659
  sx?: SxProps;
660
660
  files?: T[];
661
- setAttachedFiles?: any;
662
661
  initialFiles?: UploadedFile[];
663
662
  fileAccepted?: string;
664
663
  onChange?: (archivos: File[]) => void;
665
664
  deleteAction?: (name: string) => Promise<void> | void;
666
665
  }
667
666
 
668
- declare const AttachmentMobile: ({ buttonAttachment, maxSize, fileAccepted, initialFiles, setAttachedFiles, deleteAction, children, onChange, sx }: AttachmentMobileProps<any>) => React__default.JSX.Element;
667
+ declare const AttachmentMobile: ({ buttonAttachment, maxSize, fileAccepted, initialFiles, deleteAction, children, onChange, sx }: AttachmentMobileProps<any>) => React__default.JSX.Element;
669
668
 
670
669
  interface SCSnackBarProps {
671
670
  type?: 'success' | 'error' | 'warning' | 'info';
package/dist/index.js CHANGED
@@ -4916,7 +4916,6 @@ var AttachmentMobile = ({
4916
4916
  maxSize = 400,
4917
4917
  fileAccepted = "",
4918
4918
  initialFiles,
4919
- setAttachedFiles,
4920
4919
  deleteAction,
4921
4920
  children,
4922
4921
  onChange,
@@ -5034,7 +5033,6 @@ var AttachmentMobile = ({
5034
5033
  if (nuevosArchivos.length > 0) {
5035
5034
  setFiles((prevFiles) => {
5036
5035
  const updatedFiles = [...prevFiles, ...nuevosArchivos];
5037
- setAttachedFiles(updatedFiles);
5038
5036
  if (archivosValidos.length > 0) {
5039
5037
  onChange == null ? void 0 : onChange([
5040
5038
  ...archivosValidos,
@@ -5056,7 +5054,6 @@ var AttachmentMobile = ({
5056
5054
  (file) => !(file.name === fileToRemove.name && file.size === fileToRemove.size)
5057
5055
  );
5058
5056
  setFiles(updatedFiles);
5059
- setAttachedFiles(updatedFiles);
5060
5057
  if (onChange) {
5061
5058
  const remainingValidFiles = updatedFiles.filter((f) => !f.uploadError).map((f) => new File([], f.name, { type: f.type }));
5062
5059
  onChange(remainingValidFiles);
@@ -5092,7 +5089,6 @@ var AttachmentMobile = ({
5092
5089
  useEffect21(() => {
5093
5090
  if (initialFiles && initialFiles.length > 0) {
5094
5091
  setFiles(initialFiles);
5095
- setAttachedFiles(initialFiles);
5096
5092
  }
5097
5093
  }, []);
5098
5094
  return /* @__PURE__ */ React44.createElement(Box28, { display: "flex", flexDirection: "column", gap: 1 }, /* @__PURE__ */ React44.createElement(Box28, { display: "flex", width: "100%", justifyContent: "space-between", alignItems: "center", sx }, children, /* @__PURE__ */ React44.createElement(
@@ -5273,7 +5269,7 @@ var AttachmentMobile = ({
5273
5269
  ));
5274
5270
  };
5275
5271
 
5276
- // src/Components/SCSnackbar.tsx
5272
+ // src/Components/SCSnackBar.tsx
5277
5273
  import React45 from "react";
5278
5274
  import MuiAlert from "@mui/material/Alert";
5279
5275
  import "dayjs/locale/es";