@geekapps/silo-elements-nextjs 0.2.34 → 0.2.36

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.
@@ -2,6 +2,6 @@ import * as react from 'react';
2
2
  import { FileUploaderProps } from './types.js';
3
3
  import '@geekapps/silo-nextjs';
4
4
 
5
- declare function FileUploader({ bucket, visibility, onUpload, onBatchUpload, onError, className, style, disabled, maxSize, accept, multiple, allowRename, showImageOptions, showVideoOptions, image, video, theme, renderIcon, renderProgress, renderSuccess, renderError, children, }: FileUploaderProps): react.JSX.Element;
5
+ declare function FileUploader({ bucket, onUpload, onBatchUpload, onError, className, style, disabled, maxSize, accept, multiple, allowRename, showImageOptions, showVideoOptions, image, video, theme, renderIcon, renderProgress, renderSuccess, renderError, children, }: FileUploaderProps): react.JSX.Element;
6
6
 
7
7
  export { FileUploader };
@@ -86,20 +86,18 @@ function DropZone({
86
86
  );
87
87
  const rootStyle = {
88
88
  ...vars,
89
- fontFamily: "var(--silo-font)",
90
- border: `2px dashed ${dragging ? "var(--silo-border-active)" : "var(--silo-border)"}`,
91
- borderRadius: "var(--silo-radius)",
92
- backgroundColor: dragging ? "var(--silo-bg-hover)" : "var(--silo-bg)",
93
- color: "var(--silo-text)",
94
- cursor: disabled ? "not-allowed" : "pointer",
95
- transition: "border-color 0.15s, background-color 0.15s",
96
- opacity: disabled ? 0.5 : 1,
97
89
  ...style
98
90
  };
91
+ const cls = [
92
+ "silo-dropzone",
93
+ dragging ? "silo-dropzone--dragging" : "",
94
+ disabled ? "silo-dropzone--disabled" : "",
95
+ className
96
+ ].filter(Boolean).join(" ");
99
97
  return /* @__PURE__ */ jsxs(
100
98
  "div",
101
99
  {
102
- className: `silo-dropzone${className ? ` ${className}` : ""}`,
100
+ className: cls,
103
101
  style: rootStyle,
104
102
  onDragOver: (e) => {
105
103
  e.preventDefault();
@@ -137,30 +135,12 @@ function ProgressBar({ progress, className = "", style }) {
137
135
  "div",
138
136
  {
139
137
  className: `silo-progress-track${className ? ` ${className}` : ""}`,
140
- style: {
141
- height: "6px",
142
- borderRadius: "3px",
143
- backgroundColor: "rgba(99,102,241,0.15)",
144
- overflow: "hidden",
145
- ...style
146
- },
138
+ style,
147
139
  role: "progressbar",
148
140
  "aria-valuenow": progress,
149
141
  "aria-valuemin": 0,
150
142
  "aria-valuemax": 100,
151
- children: /* @__PURE__ */ jsx(
152
- "div",
153
- {
154
- className: "silo-progress-fill",
155
- style: {
156
- height: "100%",
157
- width: `${progress}%`,
158
- backgroundColor: "var(--silo-accent, #6366f1)",
159
- borderRadius: "3px",
160
- transition: "width 0.2s ease"
161
- }
162
- }
163
- )
143
+ children: /* @__PURE__ */ jsx("div", { className: "silo-progress-fill", style: { width: `${progress}%` } })
164
144
  }
165
145
  );
166
146
  }
@@ -391,7 +371,6 @@ function uploadLabel(status, progress) {
391
371
  }
392
372
  function FileUploader({
393
373
  bucket,
394
- visibility = "private",
395
374
  onUpload,
396
375
  onBatchUpload,
397
376
  onError,
@@ -456,7 +435,7 @@ function FileUploader({
456
435
  const effectiveVideo = showVideoOptions ? resolvedVideo : video ?? resolvedVideo;
457
436
  if (multiple && files.length > 1) {
458
437
  try {
459
- const results = await batch.upload(files, { ...bucket !== void 0 && { bucket }, visibility, image: effectiveImage, video: effectiveVideo });
438
+ const results = await batch.upload(files, { ...bucket !== void 0 && { bucket }, image: effectiveImage, video: effectiveVideo });
460
439
  onBatchUpload?.(results);
461
440
  results.forEach((r) => onUpload?.(r));
462
441
  } catch (err) {
@@ -466,13 +445,13 @@ function FileUploader({
466
445
  const file = files[0];
467
446
  if (!file) return;
468
447
  try {
469
- const result = await single.upload(file, { ...bucket !== void 0 && { bucket }, visibility, image: effectiveImage, video: effectiveVideo });
448
+ const result = await single.upload(file, { ...bucket !== void 0 && { bucket }, image: effectiveImage, video: effectiveVideo });
470
449
  if (result) onUpload?.(result);
471
450
  } catch (err) {
472
451
  onError?.(err instanceof Error ? err : new Error(String(err)));
473
452
  }
474
453
  }
475
- }, [single, batch, multiple, bucket, visibility, image, video, imageOpts, videoOpts, showImageOptions, showVideoOptions, onUpload, onBatchUpload, onError]);
454
+ }, [single, batch, multiple, bucket, image, video, imageOpts, videoOpts, showImageOptions, showVideoOptions, onUpload, onBatchUpload, onError]);
476
455
  const handleFiles = useCallback(async (files) => {
477
456
  const needsStaging = allowRename || showImageOptions && files.some((f) => f.type.startsWith("image/")) || showVideoOptions && files.some((f) => f.type.startsWith("video/"));
478
457
  if (needsStaging) {
@@ -513,11 +492,11 @@ function FileUploader({
513
492
  onFiles: handleFiles,
514
493
  style: { padding: "28px 24px", textAlign: "center" },
515
494
  children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "8px" }, children: [
516
- renderIcon ? renderIcon() : /* @__PURE__ */ jsx("svg", { width: "40", height: "40", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", style: { color: "var(--silo-text-muted)", opacity: 0.5 }, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5" }) }),
495
+ renderIcon ? renderIcon() : /* @__PURE__ */ jsx("svg", { width: "40", height: "40", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", className: "silo-text-muted", style: { opacity: 0.5 }, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5" }) }),
517
496
  children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
518
- /* @__PURE__ */ jsx("span", { style: { fontWeight: 700, fontSize: 15, color: "var(--silo-text)" }, children: multiple ? "Arraste seus arquivos aqui" : "Arraste seu arquivo aqui" }),
519
- /* @__PURE__ */ jsx("span", { style: { fontSize: 13, color: "var(--silo-text-muted)" }, children: "ou clique para escolher do seu dispositivo" }),
520
- maxSize && /* @__PURE__ */ jsxs("span", { style: { fontSize: 12, color: "var(--silo-text-muted)" }, children: [
497
+ /* @__PURE__ */ jsx("span", { className: "silo-text", style: { fontWeight: 700, fontSize: 15 }, children: multiple ? "Arraste seus arquivos aqui" : "Arraste seu arquivo aqui" }),
498
+ /* @__PURE__ */ jsx("span", { className: "silo-text-muted", style: { fontSize: 13 }, children: "ou clique para escolher do seu dispositivo" }),
499
+ maxSize && /* @__PURE__ */ jsxs("span", { className: "silo-text-muted", style: { fontSize: 12 }, children: [
521
500
  "Tamanho m\xE1ximo: ",
522
501
  formatBytes(maxSize)
523
502
  ] })
@@ -526,8 +505,8 @@ function FileUploader({
526
505
  }
527
506
  ),
528
507
  staged && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
529
- /* @__PURE__ */ jsx("div", { style: { fontSize: 13, fontWeight: 600, color: "var(--silo-text-muted)", marginBottom: 2 }, children: staged.length === 1 ? "1 arquivo selecionado" : `${staged.length} arquivos selecionados` }),
530
- staged.map((f, i) => /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10, padding: "10px 12px", backgroundColor: "var(--silo-bg)", borderRadius: 10, border: "1px solid var(--silo-border)" }, children: [
508
+ /* @__PURE__ */ jsx("div", { className: "silo-text-muted", style: { fontSize: 13, fontWeight: 600, marginBottom: 2 }, children: staged.length === 1 ? "1 arquivo selecionado" : `${staged.length} arquivos selecionados` }),
509
+ staged.map((f, i) => /* @__PURE__ */ jsxs("div", { className: "silo-card", children: [
531
510
  /* @__PURE__ */ jsx("span", { style: { fontSize: 20, flexShrink: 0 }, children: getFileIcon(f.type) }),
532
511
  /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
533
512
  editingIndex === i ? /* @__PURE__ */ jsx(
@@ -547,28 +526,30 @@ function FileUploader({
547
526
  }
548
527
  if (e.key === "Escape") setEditingIndex(null);
549
528
  },
550
- style: { width: "100%", fontSize: 13, fontWeight: 500, border: "1px solid var(--silo-accent, #6366f1)", borderRadius: 5, padding: "2px 8px", outline: "none", background: "var(--silo-bg)", color: "var(--silo-text)", fontFamily: "var(--silo-font)" }
529
+ style: { width: "100%", fontSize: 13, fontWeight: 500, border: "1px solid var(--silo-accent, #6366f1)", borderRadius: 5, padding: "2px 8px", outline: "none", background: "var(--silo-bg, #f8fafc)", color: "var(--silo-text, #0f172a)", fontFamily: "var(--silo-font, inherit)" }
551
530
  }
552
531
  ) : /* @__PURE__ */ jsxs(
553
532
  "div",
554
533
  {
555
- style: { fontSize: 13, fontWeight: 600, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", color: "var(--silo-text)", cursor: allowRename ? "text" : "default" },
534
+ className: "silo-text",
535
+ style: { fontSize: 13, fontWeight: 600, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", cursor: allowRename ? "text" : "default" },
556
536
  onClick: () => allowRename && setEditingIndex(i),
557
537
  title: allowRename ? "Clique para renomear" : void 0,
558
538
  children: [
559
539
  effectiveName(i, staged),
560
- renames.has(i) && /* @__PURE__ */ jsx("span", { style: { marginLeft: 6, fontSize: 10, color: "var(--silo-accent)", fontWeight: 700 }, children: "renomeado" })
540
+ renames.has(i) && /* @__PURE__ */ jsx("span", { className: "silo-text-accent", style: { marginLeft: 6, fontSize: 10, fontWeight: 700 }, children: "renomeado" })
561
541
  ]
562
542
  }
563
543
  ),
564
- /* @__PURE__ */ jsx("div", { style: { fontSize: 11, color: "var(--silo-text-muted)", marginTop: 1 }, children: formatBytes(f.size) })
544
+ /* @__PURE__ */ jsx("div", { className: "silo-text-muted", style: { fontSize: 11, marginTop: 1 }, children: formatBytes(f.size) })
565
545
  ] }),
566
546
  allowRename && /* @__PURE__ */ jsx(
567
547
  "button",
568
548
  {
569
549
  onClick: () => setEditingIndex(i),
570
550
  title: "Renomear",
571
- style: { background: "none", border: "none", cursor: "pointer", fontSize: 14, color: "var(--silo-text-muted)", padding: "0 4px", flexShrink: 0 },
551
+ className: "silo-text-muted",
552
+ style: { background: "none", border: "none", cursor: "pointer", fontSize: 14, padding: "0 4px", flexShrink: 0 },
572
553
  children: "\u270F\uFE0F"
573
554
  }
574
555
  ),
@@ -580,42 +561,29 @@ function FileUploader({
580
561
  if (next.length === 0) clearStaging();
581
562
  else setStaged(next);
582
563
  },
583
- style: { background: "none", border: "none", cursor: "pointer", fontSize: 18, color: "var(--silo-text-muted)", padding: "0 4px", lineHeight: 1, flexShrink: 0 },
564
+ className: "silo-text-muted",
565
+ style: { background: "none", border: "none", cursor: "pointer", fontSize: 18, padding: "0 4px", lineHeight: 1, flexShrink: 0 },
584
566
  children: "\xD7"
585
567
  }
586
568
  )
587
569
  ] }, i)),
588
- showImageOptions && staged.some((f) => f.type.startsWith("image/")) && /* @__PURE__ */ jsxs("div", { style: { borderRadius: 10, border: "1px solid var(--silo-border)", overflow: "hidden" }, children: [
589
- /* @__PURE__ */ jsx("div", { style: { padding: "8px 14px", background: "var(--silo-bg-hover, #f1f5f9)", fontSize: 12, fontWeight: 700, color: "var(--silo-text-muted)", letterSpacing: "0.04em" }, children: "\u{1F5BC}\uFE0F Configura\xE7\xF5es de imagem" }),
570
+ showImageOptions && staged.some((f) => f.type.startsWith("image/")) && /* @__PURE__ */ jsxs("div", { className: "silo-section-body", children: [
571
+ /* @__PURE__ */ jsx("div", { className: "silo-section-header", children: "\u{1F5BC}\uFE0F Configura\xE7\xF5es de imagem" }),
590
572
  /* @__PURE__ */ jsx(ImageOptions, { value: imageOpts, onChange: setImageOpts, style: { padding: "12px 14px" } })
591
573
  ] }),
592
- showVideoOptions && staged.some((f) => f.type.startsWith("video/")) && /* @__PURE__ */ jsxs("div", { style: { borderRadius: 10, border: "1px solid var(--silo-border)", overflow: "hidden" }, children: [
593
- /* @__PURE__ */ jsx("div", { style: { padding: "8px 14px", background: "var(--silo-bg-hover, #f1f5f9)", fontSize: 12, fontWeight: 700, color: "var(--silo-text-muted)", letterSpacing: "0.04em" }, children: "\u{1F3AC} Configura\xE7\xF5es de v\xEDdeo" }),
574
+ showVideoOptions && staged.some((f) => f.type.startsWith("video/")) && /* @__PURE__ */ jsxs("div", { className: "silo-section-body", children: [
575
+ /* @__PURE__ */ jsx("div", { className: "silo-section-header", children: "\u{1F3AC} Configura\xE7\xF5es de v\xEDdeo" }),
594
576
  /* @__PURE__ */ jsx(VideoOptions, { value: videoOpts, onChange: setVideoOpts, style: { padding: "12px 14px" } })
595
577
  ] }),
596
578
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 8, marginTop: 4 }, children: [
597
- /* @__PURE__ */ jsx(
598
- "button",
599
- {
600
- onClick: clearStaging,
601
- style: { padding: "10px 16px", borderRadius: 8, border: "1px solid var(--silo-border)", background: "transparent", color: "var(--silo-text-muted)", fontSize: 13, fontWeight: 600, cursor: "pointer" },
602
- children: "Cancelar"
603
- }
604
- ),
605
- /* @__PURE__ */ jsx(
606
- "button",
607
- {
608
- onClick: handleConfirmUpload,
609
- style: { flex: 1, padding: "10px", borderRadius: 8, border: "none", background: "var(--silo-accent, #6366f1)", color: "#fff", fontSize: 14, fontWeight: 700, cursor: "pointer" },
610
- children: staged.length > 1 ? `Enviar ${staged.length} arquivos` : "Enviar arquivo"
611
- }
612
- )
579
+ /* @__PURE__ */ jsx("button", { className: "silo-btn silo-btn--lg", onClick: clearStaging, children: "Cancelar" }),
580
+ /* @__PURE__ */ jsx("button", { className: "silo-btn silo-btn--lg silo-btn--primary", style: { flex: 1 }, onClick: handleConfirmUpload, children: staged.length > 1 ? `Enviar ${staged.length} arquivos` : "Enviar arquivo" })
613
581
  ] })
614
582
  ] }),
615
- isSingleUploading && !isBatch && (renderProgress ? renderProgress(singleProgress) : /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8, padding: "16px", borderRadius: 10, border: "1px solid var(--silo-border)", background: "var(--silo-bg)" }, children: [
583
+ isSingleUploading && !isBatch && (renderProgress ? renderProgress(singleProgress) : /* @__PURE__ */ jsxs("div", { className: "silo-card", style: { flexDirection: "column", gap: 8, padding: 16 }, children: [
616
584
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
617
- /* @__PURE__ */ jsx("span", { style: { fontSize: 13, fontWeight: 600, color: "var(--silo-text)" }, children: uploadLabel(single.state.status, singleProgress) }),
618
- /* @__PURE__ */ jsxs("span", { style: { fontSize: 13, fontWeight: 700, color: "var(--silo-accent, #6366f1)" }, children: [
585
+ /* @__PURE__ */ jsx("span", { className: "silo-text", style: { fontSize: 13, fontWeight: 600 }, children: uploadLabel(single.state.status, singleProgress) }),
586
+ /* @__PURE__ */ jsxs("span", { className: "silo-text-accent", style: { fontSize: 13, fontWeight: 700 }, children: [
619
587
  singleProgress,
620
588
  "%"
621
589
  ] })
@@ -629,17 +597,17 @@ function FileUploader({
629
597
  const isPaused = st.status === "paused";
630
598
  const isDone = st.status === "done";
631
599
  const isErr = st.status === "error";
632
- return /* @__PURE__ */ jsxs("div", { style: { padding: "12px 14px", backgroundColor: "var(--silo-bg)", borderRadius: 10, border: "1px solid var(--silo-border)" }, children: [
633
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10, marginBottom: isDone || isErr ? 0 : 8 }, children: [
600
+ return /* @__PURE__ */ jsxs("div", { className: "silo-card", style: { flexDirection: "column", alignItems: "stretch", gap: 8, padding: "12px 14px" }, children: [
601
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [
634
602
  /* @__PURE__ */ jsx("span", { style: { fontSize: 18, flexShrink: 0 }, children: getFileIcon(f.file.type) }),
635
603
  /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
636
- /* @__PURE__ */ jsx("div", { style: { fontSize: 13, fontWeight: 600, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", color: "var(--silo-text)" }, children: f.file.name }),
637
- /* @__PURE__ */ jsx("div", { style: { fontSize: 11, color: "var(--silo-text-muted)" }, children: formatBytes(f.file.size) })
604
+ /* @__PURE__ */ jsx("div", { className: "silo-text", style: { fontSize: 13, fontWeight: 600, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: f.file.name }),
605
+ /* @__PURE__ */ jsx("div", { className: "silo-text-muted", style: { fontSize: 11 }, children: formatBytes(f.file.size) })
638
606
  ] }),
639
607
  isDone && /* @__PURE__ */ jsx("span", { style: { fontSize: 18, flexShrink: 0 }, children: "\u2705" }),
640
- isErr && /* @__PURE__ */ jsx("span", { style: { fontSize: 12, color: "#ef4444", fontWeight: 600, flexShrink: 0 }, children: "Erro no envio" }),
641
- !isDone && !isErr && /* @__PURE__ */ jsx("span", { style: { fontSize: 12, fontWeight: 700, color: isPaused ? "#f59e0b" : "var(--silo-accent, #6366f1)", flexShrink: 0 }, children: isPaused ? "Pausado" : `${p}%` }),
642
- !isDone && !isErr && f.fileId && (isPaused ? /* @__PURE__ */ jsx("button", { onClick: () => batch.resumeFile(f.fileId), style: { fontSize: 11, padding: "3px 10px", borderRadius: 6, border: "none", background: "#10b981", color: "#fff", cursor: "pointer", fontWeight: 600 }, children: "Retomar" }) : st.status === "uploading" ? /* @__PURE__ */ jsx("button", { onClick: () => batch.pauseFile(f.fileId), style: { fontSize: 11, padding: "3px 10px", borderRadius: 6, border: "1px solid var(--silo-border)", background: "transparent", color: "var(--silo-text-muted)", cursor: "pointer" }, children: "Pausar" }) : null)
608
+ isErr && /* @__PURE__ */ jsx("span", { className: "silo-text-error", style: { fontSize: 12, fontWeight: 600, flexShrink: 0 }, children: "Erro no envio" }),
609
+ !isDone && !isErr && /* @__PURE__ */ jsx("span", { className: isPaused ? "silo-text-muted" : "silo-text-accent", style: { fontSize: 12, fontWeight: 700, flexShrink: 0 }, children: isPaused ? "Pausado" : `${p}%` }),
610
+ !isDone && !isErr && f.fileId && (isPaused ? /* @__PURE__ */ jsx("button", { className: "silo-btn silo-btn--success", style: { fontSize: 11, padding: "3px 10px" }, onClick: () => batch.resumeFile(f.fileId), children: "Retomar" }) : st.status === "uploading" ? /* @__PURE__ */ jsx("button", { className: "silo-btn", style: { fontSize: 11, padding: "3px 10px" }, onClick: () => batch.pauseFile(f.fileId), children: "Pausar" }) : null)
643
611
  ] }),
644
612
  !isDone && !isErr && /* @__PURE__ */ jsx(ProgressBar, { progress: p })
645
613
  ] }, i);
@@ -648,40 +616,41 @@ function FileUploader({
648
616
  batch.state.status !== "done" && /* @__PURE__ */ jsx(
649
617
  "button",
650
618
  {
619
+ className: `silo-btn silo-btn--lg${isBatchUploading ? " silo-btn--warning" : " silo-btn--success"}`,
620
+ style: { flex: 1 },
651
621
  onClick: isBatchUploading ? batch.pauseAll : batch.resumeAll,
652
- style: { flex: 1, padding: "10px", borderRadius: 8, border: "none", background: isBatchUploading ? "#f59e0b" : "#10b981", color: "#fff", fontSize: 13, fontWeight: 700, cursor: "pointer" },
653
622
  children: isBatchUploading ? "\u23F8 Pausar tudo" : "\u25B6 Retomar tudo"
654
623
  }
655
624
  ),
656
625
  /* @__PURE__ */ jsx(
657
626
  "button",
658
627
  {
628
+ className: `silo-btn silo-btn--lg${batch.state.status === "done" ? " silo-btn--primary" : " silo-btn--danger"}`,
659
629
  onClick: batch.state.status === "done" ? batch.reset : batch.abortAll,
660
- style: { padding: "10px 16px", borderRadius: 8, border: "none", background: batch.state.status === "done" ? "var(--silo-accent, #6366f1)" : "rgba(239,68,68,0.1)", color: batch.state.status === "done" ? "#fff" : "#ef4444", fontSize: 13, fontWeight: 700, cursor: "pointer" },
661
630
  children: batch.state.status === "done" ? "Enviar mais arquivos" : "Cancelar"
662
631
  }
663
632
  )
664
633
  ] }),
665
- batch.state.status === "done" && /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10, padding: "12px 14px", borderRadius: 10, background: "rgba(34,197,94,0.08)", border: "1px solid rgba(34,197,94,0.2)" }, children: [
634
+ batch.state.status === "done" && /* @__PURE__ */ jsxs("div", { className: "silo-card silo-card--success", style: { gap: 10 }, children: [
666
635
  /* @__PURE__ */ jsx("span", { style: { fontSize: 20 }, children: "\u{1F389}" }),
667
636
  /* @__PURE__ */ jsx("span", { style: { fontSize: 14, fontWeight: 600, color: "#16a34a" }, children: batch.state.files.length === 1 ? "Arquivo enviado com sucesso!" : `${batch.state.files.length} arquivos enviados com sucesso!` })
668
637
  ] })
669
638
  ] }),
670
- single.state.status === "done" && !renderSuccess && /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12, padding: "14px 16px", borderRadius: 10, background: "rgba(34,197,94,0.08)", border: "1px solid rgba(34,197,94,0.2)" }, children: [
639
+ single.state.status === "done" && !renderSuccess && /* @__PURE__ */ jsxs("div", { className: "silo-card silo-card--success", style: { gap: 12, padding: "14px 16px" }, children: [
671
640
  /* @__PURE__ */ jsx("span", { style: { fontSize: 24 }, children: "\u2705" }),
672
641
  /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
673
642
  /* @__PURE__ */ jsx("div", { style: { fontWeight: 700, fontSize: 14, color: "#16a34a" }, children: "Arquivo enviado com sucesso!" }),
674
- /* @__PURE__ */ jsx("div", { style: { fontSize: 12, color: "var(--silo-text-muted)", marginTop: 2 }, children: formatBytes(single.state.result.size) })
643
+ /* @__PURE__ */ jsx("div", { className: "silo-text-muted", style: { fontSize: 12, marginTop: 2 }, children: formatBytes(single.state.result.size) })
675
644
  ] }),
676
- /* @__PURE__ */ jsx("button", { onClick: single.reset, style: { background: "none", border: "1px solid rgba(34,197,94,0.3)", borderRadius: 6, cursor: "pointer", fontSize: 12, fontWeight: 600, color: "#16a34a", padding: "4px 10px", flexShrink: 0 }, children: "Enviar outro" })
645
+ /* @__PURE__ */ jsx("button", { className: "silo-btn", style: { borderColor: "rgba(34,197,94,0.3)", color: "#16a34a", padding: "4px 10px", flexShrink: 0 }, onClick: single.reset, children: "Enviar outro" })
677
646
  ] }),
678
- single.state.status === "error" && !renderError && /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12, padding: "14px 16px", borderRadius: 10, background: "rgba(239,68,68,0.07)", border: "1px solid rgba(239,68,68,0.2)" }, children: [
647
+ single.state.status === "error" && !renderError && /* @__PURE__ */ jsxs("div", { className: "silo-card silo-card--error", style: { gap: 12, padding: "14px 16px" }, children: [
679
648
  /* @__PURE__ */ jsx("span", { style: { fontSize: 22 }, children: "\u26A0\uFE0F" }),
680
649
  /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
681
- /* @__PURE__ */ jsx("div", { style: { fontWeight: 700, fontSize: 13, color: "#ef4444" }, children: "N\xE3o foi poss\xEDvel enviar o arquivo" }),
682
- /* @__PURE__ */ jsx("div", { style: { fontSize: 12, color: "var(--silo-text-muted)", marginTop: 2 }, children: single.state.error.message })
650
+ /* @__PURE__ */ jsx("div", { className: "silo-text-error", style: { fontWeight: 700, fontSize: 13 }, children: "N\xE3o foi poss\xEDvel enviar o arquivo" }),
651
+ /* @__PURE__ */ jsx("div", { className: "silo-text-muted", style: { fontSize: 12, marginTop: 2 }, children: single.state.error.message })
683
652
  ] }),
684
- /* @__PURE__ */ jsx("button", { onClick: single.reset, style: { background: "none", border: "1px solid rgba(239,68,68,0.3)", borderRadius: 6, cursor: "pointer", fontSize: 12, fontWeight: 600, color: "#ef4444", padding: "4px 10px", flexShrink: 0 }, children: "Tentar novamente" })
653
+ /* @__PURE__ */ jsx("button", { className: "silo-btn", style: { borderColor: "rgba(239,68,68,0.3)", color: "#ef4444", padding: "4px 10px", flexShrink: 0 }, onClick: single.reset, children: "Tentar novamente" })
685
654
  ] })
686
655
  ] });
687
656
  }