@geekapps/silo-elements-nextjs 0.2.36 → 0.2.38

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.
@@ -89,9 +89,9 @@ function DropZone({
89
89
  ...style
90
90
  };
91
91
  const cls = [
92
- "silo-dropzone",
93
- dragging ? "silo-dropzone--dragging" : "",
94
- disabled ? "silo-dropzone--disabled" : "",
92
+ "silo-border-2 silo-border-dashed silo-border-slate-200 silo-rounded-xl silo-bg-slate-50 silo-text-slate-900 silo-cursor-pointer silo-outline-none silo-transition-colors silo-duration-150",
93
+ dragging ? "silo-border-indigo-500 silo-bg-slate-100" : "hover:silo-border-indigo-500 hover:silo-bg-slate-100",
94
+ disabled ? "silo-opacity-50 silo-cursor-not-allowed" : "",
95
95
  className
96
96
  ].filter(Boolean).join(" ");
97
97
  return /* @__PURE__ */ jsxs(
@@ -120,7 +120,7 @@ function DropZone({
120
120
  type: "file",
121
121
  accept,
122
122
  multiple,
123
- style: { display: "none" },
123
+ className: "hidden",
124
124
  onChange: handleChange,
125
125
  disabled
126
126
  }
@@ -134,13 +134,19 @@ function ProgressBar({ progress, className = "", style }) {
134
134
  return /* @__PURE__ */ jsx(
135
135
  "div",
136
136
  {
137
- className: `silo-progress-track${className ? ` ${className}` : ""}`,
137
+ className: `h-1 rounded-full bg-slate-200 overflow-hidden${className ? ` ${className}` : ""}`,
138
138
  style,
139
139
  role: "progressbar",
140
140
  "aria-valuenow": progress,
141
141
  "aria-valuemin": 0,
142
142
  "aria-valuemax": 100,
143
- children: /* @__PURE__ */ jsx("div", { className: "silo-progress-fill", style: { width: `${progress}%` } })
143
+ children: /* @__PURE__ */ jsx(
144
+ "div",
145
+ {
146
+ className: "h-full rounded-full bg-indigo-500 transition-[width] duration-200 ease-linear",
147
+ style: { width: `${progress}%` }
148
+ }
149
+ )
144
150
  }
145
151
  );
146
152
  }
@@ -153,60 +159,38 @@ var FORMATS = [
153
159
  function ImageOptions({ value, onChange, style }) {
154
160
  const fmt = value.format ?? "webp";
155
161
  const optimize = value.optimize ?? true;
156
- return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 10, ...style }, children: [
162
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2.5", style, children: [
157
163
  /* @__PURE__ */ jsxs("div", { children: [
158
- /* @__PURE__ */ jsx("div", { style: { fontSize: 11, fontWeight: 700, color: "var(--silo-text-muted, #64748b)", letterSpacing: "0.05em", textTransform: "uppercase", marginBottom: 6 }, children: "Formato de sa\xEDda" }),
159
- /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: FORMATS.map((f) => /* @__PURE__ */ jsx(
164
+ /* @__PURE__ */ jsx("div", { className: "text-[11px] font-bold text-slate-500 uppercase tracking-[0.05em] mb-1.5", children: "Formato de sa\xEDda" }),
165
+ /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap", children: FORMATS.map((f) => /* @__PURE__ */ jsx(
160
166
  "button",
161
167
  {
162
168
  type: "button",
163
169
  onClick: () => onChange({ ...value, format: f.value }),
164
170
  title: f.hint,
165
- style: {
166
- padding: "4px 12px",
167
- borderRadius: 6,
168
- border: `1px solid ${fmt === f.value ? "var(--silo-accent, #6366f1)" : "var(--silo-border, #e2e8f0)"}`,
169
- background: fmt === f.value ? "var(--silo-accent, #6366f1)" : "transparent",
170
- color: fmt === f.value ? "#fff" : "var(--silo-text, #0f172a)",
171
- fontSize: 12,
172
- fontWeight: 600,
173
- cursor: "pointer"
174
- },
171
+ className: `py-1 px-3 rounded-md text-xs font-semibold cursor-pointer transition-colors border${fmt === f.value ? "border-indigo-500 bg-indigo-500 text-white" : "border-slate-200 bg-transparent text-slate-900 hover:bg-slate-100"}`,
175
172
  children: f.label
176
173
  },
177
174
  f.value
178
175
  )) })
179
176
  ] }),
180
- /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "center", gap: 8, cursor: "pointer", userSelect: "none" }, children: [
177
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 cursor-pointer select-none", children: [
181
178
  /* @__PURE__ */ jsx(
182
179
  "span",
183
180
  {
184
181
  onClick: () => onChange({ ...value, optimize: !optimize }),
185
- style: {
186
- width: 36,
187
- height: 20,
188
- borderRadius: 10,
189
- background: optimize ? "var(--silo-accent, #6366f1)" : "var(--silo-border, #e2e8f0)",
190
- position: "relative",
191
- flexShrink: 0,
192
- transition: "background 0.15s",
193
- cursor: "pointer"
194
- },
195
- children: /* @__PURE__ */ jsx("span", { style: {
196
- position: "absolute",
197
- top: 2,
198
- left: optimize ? 18 : 2,
199
- width: 16,
200
- height: 16,
201
- borderRadius: "50%",
202
- background: "#fff",
203
- transition: "left 0.15s",
204
- boxShadow: "0 1px 3px rgba(0,0,0,0.2)"
205
- } })
182
+ className: `relative w-9 h-5 rounded-full shrink-0 cursor-pointer transition-colors duration-150${optimize ? "bg-indigo-500" : "bg-slate-200"}`,
183
+ children: /* @__PURE__ */ jsx(
184
+ "span",
185
+ {
186
+ className: "absolute top-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-[left] duration-150",
187
+ style: { left: optimize ? "18px" : "2px" }
188
+ }
189
+ )
206
190
  }
207
191
  ),
208
- /* @__PURE__ */ jsx("span", { style: { fontSize: 12, color: "var(--silo-text, #0f172a)", fontWeight: 500 }, children: "Otimizar tamanho" }),
209
- /* @__PURE__ */ jsx("span", { style: { fontSize: 11, color: "var(--silo-text-muted, #94a3b8)" }, children: optimize ? "Qualidade 85 \u2014 menor tamanho" : "Qualidade m\xE1xima" })
192
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-slate-900 font-medium", children: "Otimizar tamanho" }),
193
+ /* @__PURE__ */ jsx("span", { className: "text-[11px] text-slate-400", children: optimize ? "Qualidade 85 \u2014 menor tamanho" : "Qualidade m\xE1xima" })
210
194
  ] })
211
195
  ] });
212
196
  }
@@ -225,6 +209,27 @@ var RESOLUTION_LABELS = {
225
209
  "1440": "1440p",
226
210
  "2160": "4K"
227
211
  };
212
+ function optionBtnCls(active) {
213
+ return `py-1 px-2.5 rounded-md text-xs font-semibold cursor-pointer transition-colors border ${active ? "border-indigo-500 bg-indigo-500 text-white" : "border-slate-200 bg-transparent text-slate-900 hover:bg-slate-100"}`;
214
+ }
215
+ function Toggle({ checked, onToggle, label }) {
216
+ return /* @__PURE__ */ jsxs("label", { className: "inline-flex items-center gap-1.5 cursor-pointer select-none text-xs text-slate-900 font-medium", onClick: onToggle, children: [
217
+ /* @__PURE__ */ jsx(
218
+ "span",
219
+ {
220
+ className: `relative inline-block w-8 h-[18px] rounded-full shrink-0 cursor-pointer transition-colors duration-150${checked ? "bg-indigo-500" : "bg-slate-200"}`,
221
+ children: /* @__PURE__ */ jsx(
222
+ "span",
223
+ {
224
+ className: "absolute top-0.5 w-3.5 h-3.5 rounded-full bg-white shadow-sm transition-[left] duration-150",
225
+ style: { left: checked ? "16px" : "2px" }
226
+ }
227
+ )
228
+ }
229
+ ),
230
+ label
231
+ ] });
232
+ }
228
233
  function VideoOptions({ value, onChange, style }) {
229
234
  const codec = value.codec ?? "h264";
230
235
  const transcoding = value.transcoding ?? "auto";
@@ -241,76 +246,31 @@ function VideoOptions({ value, onChange, style }) {
241
246
  function toggleFeature(key) {
242
247
  onChange({ ...value, [key]: !value[key] });
243
248
  }
244
- const btn = (active) => ({
245
- padding: "4px 10px",
246
- borderRadius: 6,
247
- border: `1px solid ${active ? "var(--silo-accent, #6366f1)" : "var(--silo-border, #e2e8f0)"}`,
248
- background: active ? "var(--silo-accent, #6366f1)" : "transparent",
249
- color: active ? "#fff" : "var(--silo-text, #0f172a)",
250
- fontSize: 12,
251
- fontWeight: 600,
252
- cursor: "pointer"
253
- });
254
- const toggle = (on) => ({
255
- display: "inline-flex",
256
- alignItems: "center",
257
- gap: 6,
258
- cursor: "pointer",
259
- userSelect: "none",
260
- fontSize: 12,
261
- color: "var(--silo-text, #0f172a)",
262
- fontWeight: 500
263
- });
264
- function Toggle({ checked, onToggle, label }) {
265
- return /* @__PURE__ */ jsxs("label", { style: toggle(), onClick: onToggle, children: [
266
- /* @__PURE__ */ jsx("span", { style: {
267
- width: 32,
268
- height: 18,
269
- borderRadius: 9,
270
- flexShrink: 0,
271
- background: checked ? "var(--silo-accent, #6366f1)" : "var(--silo-border, #e2e8f0)",
272
- position: "relative",
273
- transition: "background 0.15s",
274
- cursor: "pointer"
275
- }, children: /* @__PURE__ */ jsx("span", { style: {
276
- position: "absolute",
277
- top: 2,
278
- left: checked ? 16 : 2,
279
- width: 14,
280
- height: 14,
281
- borderRadius: "50%",
282
- background: "#fff",
283
- transition: "left 0.15s",
284
- boxShadow: "0 1px 3px rgba(0,0,0,0.2)"
285
- } }) }),
286
- label
287
- ] });
288
- }
289
- return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 12, ...style }, children: [
249
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", style, children: [
290
250
  /* @__PURE__ */ jsxs("div", { children: [
291
- /* @__PURE__ */ jsx("div", { style: { fontSize: 11, fontWeight: 700, color: "var(--silo-text-muted, #64748b)", letterSpacing: "0.05em", textTransform: "uppercase", marginBottom: 6 }, children: "Codec" }),
292
- /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: CODECS.map((c) => /* @__PURE__ */ jsx(
251
+ /* @__PURE__ */ jsx("div", { className: "text-[11px] font-bold text-slate-500 uppercase tracking-[0.05em] mb-1.5", children: "Codec" }),
252
+ /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap", children: CODECS.map((c) => /* @__PURE__ */ jsx(
293
253
  "button",
294
254
  {
295
255
  type: "button",
296
256
  title: c.hint,
297
257
  onClick: () => onChange({ ...value, codec: c.value }),
298
- style: btn(codec === c.value),
258
+ className: optionBtnCls(codec === c.value),
299
259
  children: c.label
300
260
  },
301
261
  c.value
302
262
  )) })
303
263
  ] }),
304
264
  /* @__PURE__ */ jsxs("div", { children: [
305
- /* @__PURE__ */ jsx("div", { style: { fontSize: 11, fontWeight: 700, color: "var(--silo-text-muted, #64748b)", letterSpacing: "0.05em", textTransform: "uppercase", marginBottom: 6 }, children: "Resolu\xE7\xF5es" }),
306
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: [
307
- /* @__PURE__ */ jsx("button", { type: "button", onClick: () => onChange({ ...value, transcoding: "auto" }), style: btn(isAuto), children: "Auto" }),
265
+ /* @__PURE__ */ jsx("div", { className: "text-[11px] font-bold text-slate-500 uppercase tracking-[0.05em] mb-1.5", children: "Resolu\xE7\xF5es" }),
266
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-1.5 flex-wrap", children: [
267
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: () => onChange({ ...value, transcoding: "auto" }), className: optionBtnCls(isAuto), children: "Auto" }),
308
268
  RESOLUTIONS.map((r) => /* @__PURE__ */ jsx(
309
269
  "button",
310
270
  {
311
271
  type: "button",
312
272
  onClick: () => toggleRes(r),
313
- style: btn(!isAuto && selectedRes.includes(r)),
273
+ className: optionBtnCls(!isAuto && selectedRes.includes(r)),
314
274
  children: RESOLUTION_LABELS[r]
315
275
  },
316
276
  r
@@ -318,8 +278,8 @@ function VideoOptions({ value, onChange, style }) {
318
278
  ] })
319
279
  ] }),
320
280
  /* @__PURE__ */ jsxs("div", { children: [
321
- /* @__PURE__ */ jsx("div", { style: { fontSize: 11, fontWeight: 700, color: "var(--silo-text-muted, #64748b)", letterSpacing: "0.05em", textTransform: "uppercase", marginBottom: 8 }, children: "Recursos" }),
322
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
281
+ /* @__PURE__ */ jsx("div", { className: "text-[11px] font-bold text-slate-500 uppercase tracking-[0.05em] mb-2", children: "Recursos" }),
282
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
323
283
  /* @__PURE__ */ jsx(Toggle, { checked: value.thumbnails ?? true, onToggle: () => toggleFeature("thumbnails"), label: "Gerar thumbnails" }),
324
284
  /* @__PURE__ */ jsx(Toggle, { checked: value.storyboard ?? false, onToggle: () => toggleFeature("storyboard"), label: "Gerar storyboard" }),
325
285
  /* @__PURE__ */ jsx(Toggle, { checked: value.autoCaptions ?? false, onToggle: () => toggleFeature("autoCaptions"), label: "Legendas autom\xE1ticas (IA)" }),
@@ -396,11 +356,6 @@ function FileUploader({
396
356
  const vars = themeToVars(t);
397
357
  const containerStyle = {
398
358
  ...vars,
399
- display: "flex",
400
- flexDirection: "column",
401
- gap: "12px",
402
- width: "100%",
403
- fontFamily: "var(--silo-font)",
404
359
  ...style
405
360
  };
406
361
  const single = useMultipartUpload(bucket);
@@ -477,9 +432,9 @@ function FileUploader({
477
432
  const isBatchUploading = batch.state.status === "uploading" || batch.state.status === "preparing";
478
433
  const isUploading = isSingleUploading || isBatchUploading;
479
434
  const singleProgress = single.state.status === "uploading" ? single.state.progress : single.state.status === "completing" ? 99 : 0;
480
- if (single.state.status === "error" && renderError) return /* @__PURE__ */ jsx("div", { style: containerStyle, children: renderError(single.state.error, single.reset) });
481
- if (single.state.status === "done" && renderSuccess) return /* @__PURE__ */ jsx("div", { style: containerStyle, children: renderSuccess(single.state.result) });
482
- return /* @__PURE__ */ jsxs("div", { className: `silo-file-uploader${className ? ` ${className}` : ""}`, style: containerStyle, children: [
435
+ if (single.state.status === "error" && renderError) return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3 w-full", style: containerStyle, children: renderError(single.state.error, single.reset) });
436
+ if (single.state.status === "done" && renderSuccess) return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3 w-full", style: containerStyle, children: renderSuccess(single.state.result) });
437
+ return /* @__PURE__ */ jsxs("div", { className: `flex flex-col gap-3 w-full${className ? ` ${className}` : ""}`, style: containerStyle, children: [
483
438
  !isBatch && !staged && /* @__PURE__ */ jsx(
484
439
  DropZone,
485
440
  {
@@ -491,12 +446,12 @@ function FileUploader({
491
446
  disabled: disabled || isUploading,
492
447
  onFiles: handleFiles,
493
448
  style: { padding: "28px 24px", textAlign: "center" },
494
- children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "8px" }, children: [
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" }) }),
449
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
450
+ renderIcon ? renderIcon() : /* @__PURE__ */ jsx("svg", { width: "40", height: "40", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", className: "text-slate-400 opacity-50", 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" }) }),
496
451
  children ?? /* @__PURE__ */ jsxs(Fragment, { 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: [
452
+ /* @__PURE__ */ jsx("span", { className: "text-slate-900 font-bold text-[15px]", children: multiple ? "Arraste seus arquivos aqui" : "Arraste seu arquivo aqui" }),
453
+ /* @__PURE__ */ jsx("span", { className: "text-slate-500 text-[13px]", children: "ou clique para escolher do seu dispositivo" }),
454
+ maxSize && /* @__PURE__ */ jsxs("span", { className: "text-slate-400 text-[12px]", children: [
500
455
  "Tamanho m\xE1ximo: ",
501
456
  formatBytes(maxSize)
502
457
  ] })
@@ -504,11 +459,11 @@ function FileUploader({
504
459
  ] })
505
460
  }
506
461
  ),
507
- staged && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, 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: [
510
- /* @__PURE__ */ jsx("span", { style: { fontSize: 20, flexShrink: 0 }, children: getFileIcon(f.type) }),
511
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
462
+ staged && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
463
+ /* @__PURE__ */ jsx("div", { className: "text-slate-500 text-[13px] font-semibold mb-0.5", children: staged.length === 1 ? "1 arquivo selecionado" : `${staged.length} arquivos selecionados` }),
464
+ staged.map((f, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 px-3 py-2.5 bg-slate-50 rounded-xl border border-slate-200", children: [
465
+ /* @__PURE__ */ jsx("span", { className: "text-xl shrink-0", children: getFileIcon(f.type) }),
466
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
512
467
  editingIndex === i ? /* @__PURE__ */ jsx(
513
468
  "input",
514
469
  {
@@ -526,30 +481,28 @@ function FileUploader({
526
481
  }
527
482
  if (e.key === "Escape") setEditingIndex(null);
528
483
  },
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)" }
484
+ className: "w-full text-[13px] font-medium border border-indigo-500 rounded-md py-0.5 px-2 outline-none bg-slate-50 text-slate-900"
530
485
  }
531
486
  ) : /* @__PURE__ */ jsxs(
532
487
  "div",
533
488
  {
534
- className: "silo-text",
535
- style: { fontSize: 13, fontWeight: 600, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", cursor: allowRename ? "text" : "default" },
489
+ className: `text-[13px] font-semibold text-slate-900 overflow-hidden text-ellipsis whitespace-nowrap${allowRename ? "cursor-text" : "cursor-default"}`,
536
490
  onClick: () => allowRename && setEditingIndex(i),
537
491
  title: allowRename ? "Clique para renomear" : void 0,
538
492
  children: [
539
493
  effectiveName(i, staged),
540
- renames.has(i) && /* @__PURE__ */ jsx("span", { className: "silo-text-accent", style: { marginLeft: 6, fontSize: 10, fontWeight: 700 }, children: "renomeado" })
494
+ renames.has(i) && /* @__PURE__ */ jsx("span", { className: "text-indigo-500 ml-1.5 text-[10px] font-bold", children: "renomeado" })
541
495
  ]
542
496
  }
543
497
  ),
544
- /* @__PURE__ */ jsx("div", { className: "silo-text-muted", style: { fontSize: 11, marginTop: 1 }, children: formatBytes(f.size) })
498
+ /* @__PURE__ */ jsx("div", { className: "text-[11px] text-slate-400 mt-0.5", children: formatBytes(f.size) })
545
499
  ] }),
546
500
  allowRename && /* @__PURE__ */ jsx(
547
501
  "button",
548
502
  {
549
503
  onClick: () => setEditingIndex(i),
550
504
  title: "Renomear",
551
- className: "silo-text-muted",
552
- style: { background: "none", border: "none", cursor: "pointer", fontSize: 14, padding: "0 4px", flexShrink: 0 },
505
+ className: "text-slate-400 bg-none border-none cursor-pointer text-sm px-1 shrink-0 hover:text-slate-600",
553
506
  children: "\u270F\uFE0F"
554
507
  }
555
508
  ),
@@ -561,63 +514,75 @@ function FileUploader({
561
514
  if (next.length === 0) clearStaging();
562
515
  else setStaged(next);
563
516
  },
564
- className: "silo-text-muted",
565
- style: { background: "none", border: "none", cursor: "pointer", fontSize: 18, padding: "0 4px", lineHeight: 1, flexShrink: 0 },
517
+ className: "text-slate-400 bg-none border-none cursor-pointer text-lg px-1 leading-none shrink-0 hover:text-slate-600",
566
518
  children: "\xD7"
567
519
  }
568
520
  )
569
521
  ] }, i)),
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" }),
522
+ showImageOptions && staged.some((f) => f.type.startsWith("image/")) && /* @__PURE__ */ jsxs("div", { className: "border border-slate-200 rounded-xl overflow-hidden", children: [
523
+ /* @__PURE__ */ jsx("div", { className: "px-3.5 py-2 bg-slate-100 text-[12px] font-bold text-slate-500 tracking-[0.04em]", children: "\u{1F5BC}\uFE0F Configura\xE7\xF5es de imagem" }),
572
524
  /* @__PURE__ */ jsx(ImageOptions, { value: imageOpts, onChange: setImageOpts, style: { padding: "12px 14px" } })
573
525
  ] }),
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" }),
526
+ showVideoOptions && staged.some((f) => f.type.startsWith("video/")) && /* @__PURE__ */ jsxs("div", { className: "border border-slate-200 rounded-xl overflow-hidden", children: [
527
+ /* @__PURE__ */ jsx("div", { className: "px-3.5 py-2 bg-slate-100 text-[12px] font-bold text-slate-500 tracking-[0.04em]", children: "\u{1F3AC} Configura\xE7\xF5es de v\xEDdeo" }),
576
528
  /* @__PURE__ */ jsx(VideoOptions, { value: videoOpts, onChange: setVideoOpts, style: { padding: "12px 14px" } })
577
529
  ] }),
578
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 8, marginTop: 4 }, children: [
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" })
530
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2 mt-1", children: [
531
+ /* @__PURE__ */ jsx(
532
+ "button",
533
+ {
534
+ className: "inline-flex items-center justify-center gap-1.5 text-sm font-bold py-2.5 px-4 rounded-xl border border-slate-200 bg-transparent text-slate-900 cursor-pointer transition-colors hover:bg-slate-100",
535
+ onClick: clearStaging,
536
+ children: "Cancelar"
537
+ }
538
+ ),
539
+ /* @__PURE__ */ jsx(
540
+ "button",
541
+ {
542
+ className: "flex-1 inline-flex items-center justify-center gap-1.5 text-sm font-bold py-2.5 px-4 rounded-xl border-transparent bg-indigo-500 text-white cursor-pointer transition-opacity hover:opacity-90",
543
+ onClick: handleConfirmUpload,
544
+ children: staged.length > 1 ? `Enviar ${staged.length} arquivos` : "Enviar arquivo"
545
+ }
546
+ )
581
547
  ] })
582
548
  ] }),
583
- isSingleUploading && !isBatch && (renderProgress ? renderProgress(singleProgress) : /* @__PURE__ */ jsxs("div", { className: "silo-card", style: { flexDirection: "column", gap: 8, padding: 16 }, children: [
584
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, 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: [
549
+ isSingleUploading && !isBatch && (renderProgress ? renderProgress(singleProgress) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 px-3 py-4 bg-slate-50 rounded-xl border border-slate-200", children: [
550
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
551
+ /* @__PURE__ */ jsx("span", { className: "text-[13px] font-semibold text-slate-900", children: uploadLabel(single.state.status, singleProgress) }),
552
+ /* @__PURE__ */ jsxs("span", { className: "text-[13px] font-bold text-indigo-500", children: [
587
553
  singleProgress,
588
554
  "%"
589
555
  ] })
590
556
  ] }),
591
557
  /* @__PURE__ */ jsx(ProgressBar, { progress: singleProgress })
592
558
  ] })),
593
- isBatch && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
559
+ isBatch && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
594
560
  batch.state.files.map((f, i) => {
595
561
  const st = f.status;
596
562
  const p = st.status === "uploading" ? st.progress : st.status === "paused" ? st.progress : st.status === "done" ? 100 : st.status === "completing" ? 99 : 0;
597
563
  const isPaused = st.status === "paused";
598
564
  const isDone = st.status === "done";
599
565
  const isErr = st.status === "error";
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: [
602
- /* @__PURE__ */ jsx("span", { style: { fontSize: 18, flexShrink: 0 }, children: getFileIcon(f.file.type) }),
603
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
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) })
566
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-stretch gap-2 px-3.5 py-3 bg-slate-50 rounded-xl border border-slate-200", children: [
567
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5", children: [
568
+ /* @__PURE__ */ jsx("span", { className: "text-lg shrink-0", children: getFileIcon(f.file.type) }),
569
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
570
+ /* @__PURE__ */ jsx("div", { className: "text-[13px] font-semibold text-slate-900 overflow-hidden text-ellipsis whitespace-nowrap", children: f.file.name }),
571
+ /* @__PURE__ */ jsx("div", { className: "text-[11px] text-slate-400", children: formatBytes(f.file.size) })
606
572
  ] }),
607
- isDone && /* @__PURE__ */ jsx("span", { style: { fontSize: 18, flexShrink: 0 }, children: "\u2705" }),
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)
573
+ isDone && /* @__PURE__ */ jsx("span", { className: "text-lg shrink-0", children: "\u2705" }),
574
+ isErr && /* @__PURE__ */ jsx("span", { className: "text-[12px] font-semibold text-red-500 shrink-0", children: "Erro no envio" }),
575
+ !isDone && !isErr && /* @__PURE__ */ jsx("span", { className: `text-[12px] font-bold shrink-0${isPaused ? "text-slate-400" : "text-indigo-500"}`, children: isPaused ? "Pausado" : `${p}%` }),
576
+ !isDone && !isErr && f.fileId && (isPaused ? /* @__PURE__ */ jsx("button", { className: "inline-flex items-center justify-center gap-1.5 text-[11px] font-semibold py-0.5 px-2.5 rounded-lg border-transparent bg-emerald-500 text-white cursor-pointer hover:opacity-90", onClick: () => batch.resumeFile(f.fileId), children: "Retomar" }) : st.status === "uploading" ? /* @__PURE__ */ jsx("button", { className: "inline-flex items-center justify-center gap-1.5 text-[11px] font-semibold py-0.5 px-2.5 rounded-lg border border-slate-200 bg-transparent text-slate-900 cursor-pointer hover:bg-slate-100", onClick: () => batch.pauseFile(f.fileId), children: "Pausar" }) : null)
611
577
  ] }),
612
578
  !isDone && !isErr && /* @__PURE__ */ jsx(ProgressBar, { progress: p })
613
579
  ] }, i);
614
580
  }),
615
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 8 }, children: [
581
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
616
582
  batch.state.status !== "done" && /* @__PURE__ */ jsx(
617
583
  "button",
618
584
  {
619
- className: `silo-btn silo-btn--lg${isBatchUploading ? " silo-btn--warning" : " silo-btn--success"}`,
620
- style: { flex: 1 },
585
+ className: `flex-1 inline-flex items-center justify-center gap-1.5 text-sm font-bold py-2.5 px-4 rounded-xl border-transparent text-white cursor-pointer hover:opacity-90${isBatchUploading ? "bg-amber-500" : "bg-emerald-500"}`,
621
586
  onClick: isBatchUploading ? batch.pauseAll : batch.resumeAll,
622
587
  children: isBatchUploading ? "\u23F8 Pausar tudo" : "\u25B6 Retomar tudo"
623
588
  }
@@ -625,32 +590,46 @@ function FileUploader({
625
590
  /* @__PURE__ */ jsx(
626
591
  "button",
627
592
  {
628
- className: `silo-btn silo-btn--lg${batch.state.status === "done" ? " silo-btn--primary" : " silo-btn--danger"}`,
593
+ className: `inline-flex items-center justify-center gap-1.5 text-sm font-bold py-2.5 px-4 rounded-xl border-transparent text-white cursor-pointer hover:opacity-90${batch.state.status === "done" ? "bg-indigo-500" : "bg-red-500/90"}`,
629
594
  onClick: batch.state.status === "done" ? batch.reset : batch.abortAll,
630
595
  children: batch.state.status === "done" ? "Enviar mais arquivos" : "Cancelar"
631
596
  }
632
597
  )
633
598
  ] }),
634
- batch.state.status === "done" && /* @__PURE__ */ jsxs("div", { className: "silo-card silo-card--success", style: { gap: 10 }, children: [
635
- /* @__PURE__ */ jsx("span", { style: { fontSize: 20 }, children: "\u{1F389}" }),
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!` })
599
+ batch.state.status === "done" && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 px-3 py-2.5 bg-green-500/[0.08] rounded-xl border border-green-500/20", children: [
600
+ /* @__PURE__ */ jsx("span", { className: "text-xl", children: "\u{1F389}" }),
601
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-green-700", children: batch.state.files.length === 1 ? "Arquivo enviado com sucesso!" : `${batch.state.files.length} arquivos enviados com sucesso!` })
637
602
  ] })
638
603
  ] }),
639
- single.state.status === "done" && !renderSuccess && /* @__PURE__ */ jsxs("div", { className: "silo-card silo-card--success", style: { gap: 12, padding: "14px 16px" }, children: [
640
- /* @__PURE__ */ jsx("span", { style: { fontSize: 24 }, children: "\u2705" }),
641
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
642
- /* @__PURE__ */ jsx("div", { style: { fontWeight: 700, fontSize: 14, color: "#16a34a" }, children: "Arquivo enviado com sucesso!" }),
643
- /* @__PURE__ */ jsx("div", { className: "silo-text-muted", style: { fontSize: 12, marginTop: 2 }, children: formatBytes(single.state.result.size) })
604
+ single.state.status === "done" && !renderSuccess && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 px-4 py-3.5 bg-green-500/[0.08] rounded-xl border border-green-500/20", children: [
605
+ /* @__PURE__ */ jsx("span", { className: "text-2xl", children: "\u2705" }),
606
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
607
+ /* @__PURE__ */ jsx("div", { className: "font-bold text-sm text-green-700", children: "Arquivo enviado com sucesso!" }),
608
+ /* @__PURE__ */ jsx("div", { className: "text-[12px] text-slate-400 mt-0.5", children: formatBytes(single.state.result.size) })
644
609
  ] }),
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" })
610
+ /* @__PURE__ */ jsx(
611
+ "button",
612
+ {
613
+ className: "inline-flex items-center justify-center text-xs font-semibold py-1 px-2.5 rounded-lg border border-green-500/30 text-green-700 bg-transparent cursor-pointer hover:bg-green-500/10 shrink-0",
614
+ onClick: single.reset,
615
+ children: "Enviar outro"
616
+ }
617
+ )
646
618
  ] }),
647
- single.state.status === "error" && !renderError && /* @__PURE__ */ jsxs("div", { className: "silo-card silo-card--error", style: { gap: 12, padding: "14px 16px" }, children: [
648
- /* @__PURE__ */ jsx("span", { style: { fontSize: 22 }, children: "\u26A0\uFE0F" }),
649
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
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 })
619
+ single.state.status === "error" && !renderError && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 px-4 py-3.5 bg-red-500/[0.07] rounded-xl border border-red-500/20", children: [
620
+ /* @__PURE__ */ jsx("span", { className: "text-[22px]", children: "\u26A0\uFE0F" }),
621
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
622
+ /* @__PURE__ */ jsx("div", { className: "font-bold text-[13px] text-red-500", children: "N\xE3o foi poss\xEDvel enviar o arquivo" }),
623
+ /* @__PURE__ */ jsx("div", { className: "text-[12px] text-slate-400 mt-0.5", children: single.state.error.message })
652
624
  ] }),
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" })
625
+ /* @__PURE__ */ jsx(
626
+ "button",
627
+ {
628
+ className: "inline-flex items-center justify-center text-xs font-semibold py-1 px-2.5 rounded-lg border border-red-500/30 text-red-500 bg-transparent cursor-pointer hover:bg-red-500/10 shrink-0",
629
+ onClick: single.reset,
630
+ children: "Tentar novamente"
631
+ }
632
+ )
654
633
  ] })
655
634
  ] });
656
635
  }