componentes-sinco 1.1.42 → 1.1.43

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
@@ -27,9 +27,10 @@ interface AttachmentProps<T> {
27
27
  deleteAction?: (name: string) => Promise<void> | void;
28
28
  initialFiles?: UploadedFile$1[];
29
29
  iconFileItem?: any | React.ReactNode | React.ReactElement | React.ElementType | null;
30
+ view?: 'file' | 'button';
30
31
  }
31
32
 
32
- declare const Attachment: ({ sx, compact, error, maxSize, fileAccepted, onLoading, onChange, downloadAction, deleteAction, initialFiles, iconFileItem, }: AttachmentProps<any>) => React__default.JSX.Element;
33
+ declare const Attachment: ({ sx, compact, error, maxSize, fileAccepted, onLoading, onChange, downloadAction, deleteAction, initialFiles, iconFileItem, view, }: AttachmentProps<any>) => React__default.JSX.Element;
33
34
 
34
35
  type ReplyPalette$1 = "primary" | "secondary" | "warning" | "info" | "success" | "error" | any;
35
36
  type ReplyTextPalette = "primary" | "secondary" | "disabled";
package/dist/index.d.ts CHANGED
@@ -27,9 +27,10 @@ interface AttachmentProps<T> {
27
27
  deleteAction?: (name: string) => Promise<void> | void;
28
28
  initialFiles?: UploadedFile$1[];
29
29
  iconFileItem?: any | React.ReactNode | React.ReactElement | React.ElementType | null;
30
+ view?: 'file' | 'button';
30
31
  }
31
32
 
32
- declare const Attachment: ({ sx, compact, error, maxSize, fileAccepted, onLoading, onChange, downloadAction, deleteAction, initialFiles, iconFileItem, }: AttachmentProps<any>) => React__default.JSX.Element;
33
+ declare const Attachment: ({ sx, compact, error, maxSize, fileAccepted, onLoading, onChange, downloadAction, deleteAction, initialFiles, iconFileItem, view, }: AttachmentProps<any>) => React__default.JSX.Element;
33
34
 
34
35
  type ReplyPalette$1 = "primary" | "secondary" | "warning" | "info" | "success" | "error" | any;
35
36
  type ReplyTextPalette = "primary" | "secondary" | "disabled";
package/dist/index.js CHANGED
@@ -400,7 +400,8 @@ var Attachment = ({
400
400
  downloadAction,
401
401
  deleteAction,
402
402
  initialFiles = [],
403
- iconFileItem
403
+ iconFileItem,
404
+ view = "button"
404
405
  }) => {
405
406
  const [files, setFiles] = useState4([]);
406
407
  const [fileToDelete, setFileToDelete] = useState4(null);
@@ -524,7 +525,7 @@ var Attachment = ({
524
525
  return filteredFiles;
525
526
  });
526
527
  };
527
- return /* @__PURE__ */ React4.createElement(Stack3, { spacing: 2 }, toast && /* @__PURE__ */ React4.createElement(SCToastNotification, __spreadValues({}, toast)), /* @__PURE__ */ React4.createElement(
528
+ return /* @__PURE__ */ React4.createElement(Stack3, { spacing: 2, display: "flex", flexDirection: "column", gap: 1 }, toast && /* @__PURE__ */ React4.createElement(SCToastNotification, __spreadValues({}, toast)), /* @__PURE__ */ React4.createElement(
528
529
  "input",
529
530
  {
530
531
  type: "file",
@@ -533,7 +534,7 @@ var Attachment = ({
533
534
  ref: inputRef,
534
535
  onChange: handleUpload
535
536
  }
536
- ), /* @__PURE__ */ React4.createElement(
537
+ ), view === "button" && /* @__PURE__ */ React4.createElement(
537
538
  Stack3,
538
539
  {
539
540
  "data-testid": "ZonaAdjuntos",
@@ -642,6 +643,7 @@ var Attachment = ({
642
643
  id: "ContenedorArchivosAdjuntos",
643
644
  width: "100%",
644
645
  sx: __spreadValues({
646
+ marginTop: "0px !important",
645
647
  overflowY: "auto"
646
648
  }, files.length > 5 && {
647
649
  maxHeight: 250
@@ -701,7 +703,7 @@ var Attachment = ({
701
703
  },
702
704
  /* @__PURE__ */ React4.createElement(FileDownload, { fontSize: "small", color: "action" })
703
705
  )),
704
- /* @__PURE__ */ React4.createElement(Tooltip, { title: "Eliminar" }, /* @__PURE__ */ React4.createElement(
706
+ view === "button" && /* @__PURE__ */ React4.createElement(Tooltip, { title: "Eliminar" }, /* @__PURE__ */ React4.createElement(
705
707
  IconButton3,
706
708
  {
707
709
  size: "small",
@@ -2826,7 +2828,7 @@ function SCAutocomplete({
2826
2828
  __spreadValues({
2827
2829
  size: "small",
2828
2830
  label: getItemValue(option).text
2829
- }, chipOutside.type === "avatar" ? { avatar: /* @__PURE__ */ React15.createElement(Avatar, null, avatarText) } : {})
2831
+ }, chipOutside.type === "avatar" ? { avatar: /* @__PURE__ */ React15.createElement(Avatar, { sx: { height: "15px !important", width: "15px !important" } }, avatarText) } : {})
2830
2832
  ));
2831
2833
  })
2832
2834
  ), /* @__PURE__ */ React15.createElement(Box11, { sx: { display: "flex", flexWrap: "wrap", gap: 0.5, maxHeight: 36, overflow: "hidden" } }, selectedOptions.slice(0, displayCount).map((option) => {
@@ -2840,7 +2842,7 @@ function SCAutocomplete({
2840
2842
  variant: "filled",
2841
2843
  label: getItemValue(option).text,
2842
2844
  onDelete: () => handleDeleteChip(option)
2843
- }, chipOutside.type === "avatar" ? { avatar: /* @__PURE__ */ React15.createElement(Avatar, null, avatarText) } : {})
2845
+ }, chipOutside.type === "avatar" ? { avatar: /* @__PURE__ */ React15.createElement(Avatar, { sx: { height: "15px !important", width: "15px !important" } }, avatarText) } : {})
2844
2846
  );
2845
2847
  }), hiddenCount > 0 && /* @__PURE__ */ React15.createElement(
2846
2848
  Box11,
@@ -4412,7 +4414,7 @@ var PageHeader = ({
4412
4414
  fixed,
4413
4415
  shadow = true
4414
4416
  }) => {
4415
- return /* @__PURE__ */ React35.createElement(
4417
+ return /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(
4416
4418
  Stack13,
4417
4419
  {
4418
4420
  "data-testid": "main-container",
@@ -4425,7 +4427,7 @@ var PageHeader = ({
4425
4427
  sx: { boxShadow: shadow ? (theme) => theme.shadows[1] : "none" }
4426
4428
  },
4427
4429
  /* @__PURE__ */ React35.createElement(Stack13, { "data-testid": "page-header-content", height: 40, px: 3, pl: buttonBack ? 1 : 3, direction: "row", alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React35.createElement(Stack13, { id: "left-section", direction: "row", alignItems: "center", gap: 1 }, buttonBack, /* @__PURE__ */ React35.createElement(Stack13, { id: "text-section", gap: 0.5 }, /* @__PURE__ */ React35.createElement(Typography18, { "data-testid": "page-header-title", variant: "h6", color: "text.primary" }, title), subtitle && /* @__PURE__ */ React35.createElement(Typography18, { "data-testid": "page-header-subtitle", variant: "caption", color: "text.secondary" }, subtitle))), actions && /* @__PURE__ */ React35.createElement(Stack13, { id: "right-actions", direction: "row", alignItems: "center", gap: 1 }, actions))
4428
- );
4430
+ ), fixed && /* @__PURE__ */ React35.createElement(Stack13, { sx: { height: 48 } }));
4429
4431
  };
4430
4432
 
4431
4433
  // src/Components/SCActivityCalendar.tsx