@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
  }
@@ -284,19 +268,14 @@ function ImageUploader({
284
268
  }, [showImageOptions, image, imageOpts, doUpload, showPreview]);
285
269
  const containerStyle = {
286
270
  ...vars,
287
- display: "flex",
288
- flexDirection: "column",
289
- gap: "12px",
290
- width: "100%",
291
- fontFamily: "var(--silo-font)",
292
271
  ...style
293
272
  };
294
273
  const isUploading = state.status === "uploading" || state.status === "preparing" || state.status === "completing";
295
274
  const progress = state.status === "uploading" ? state.progress : state.status === "completing" ? 99 : 0;
296
275
  const isPaused = state.status === "idle" && preview !== null && !stagedFile;
297
- if (state.status === "error" && renderError) return /* @__PURE__ */ jsx("div", { style: containerStyle, children: renderError(state.error, reset) });
298
- if (state.status === "done" && renderSuccess) return /* @__PURE__ */ jsx("div", { style: containerStyle, children: renderSuccess(state.result) });
299
- return /* @__PURE__ */ jsxs("div", { className: `silo-image-uploader${className ? ` ${className}` : ""}`, style: containerStyle, children: [
276
+ if (state.status === "error" && renderError) return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3 w-full", style: containerStyle, children: renderError(state.error, reset) });
277
+ if (state.status === "done" && renderSuccess) return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3 w-full", style: containerStyle, children: renderSuccess(state.result) });
278
+ return /* @__PURE__ */ jsxs("div", { className: `flex flex-col gap-3 w-full${className ? ` ${className}` : ""}`, style: containerStyle, children: [
300
279
  /* @__PURE__ */ jsx(
301
280
  DropZone,
302
281
  {
@@ -307,15 +286,15 @@ function ImageUploader({
307
286
  disabled: disabled || isUploading,
308
287
  onFiles: handleFiles,
309
288
  style: { padding: "32px 24px", textAlign: "center" },
310
- children: preview && !isUploading && !stagedFile ? /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 8 }, children: [
311
- /* @__PURE__ */ jsx("img", { src: preview, alt: "Pr\xE9-visualiza\xE7\xE3o", style: { maxWidth: "100%", maxHeight: 200, borderRadius: 8, objectFit: "contain" } }),
312
- /* @__PURE__ */ jsx("span", { className: "silo-text-muted", style: { fontSize: 12 }, children: "Clique ou arraste para trocar a imagem" })
313
- ] }) : /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 8 }, children: [
314
- 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: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }),
289
+ children: preview && !isUploading && !stagedFile ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
290
+ /* @__PURE__ */ jsx("img", { src: preview, alt: "Pr\xE9-visualiza\xE7\xE3o", className: "max-w-full max-h-[200px] rounded-lg object-contain" }),
291
+ /* @__PURE__ */ jsx("span", { className: "text-[12px] text-slate-400", children: "Clique ou arraste para trocar a imagem" })
292
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
293
+ 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: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }),
315
294
  children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
316
- /* @__PURE__ */ jsx("span", { className: "silo-text", style: { fontWeight: 700, fontSize: 15 }, children: "Arraste sua imagem aqui" }),
317
- /* @__PURE__ */ jsx("span", { className: "silo-text-muted", style: { fontSize: 13 }, children: "ou clique para escolher do seu dispositivo" }),
318
- maxSize && /* @__PURE__ */ jsxs("span", { className: "silo-text-muted", style: { fontSize: 12 }, children: [
295
+ /* @__PURE__ */ jsx("span", { className: "text-slate-900 font-bold text-[15px]", children: "Arraste sua imagem aqui" }),
296
+ /* @__PURE__ */ jsx("span", { className: "text-slate-500 text-[13px]", children: "ou clique para escolher do seu dispositivo" }),
297
+ maxSize && /* @__PURE__ */ jsxs("span", { className: "text-slate-400 text-[12px]", children: [
319
298
  "Tamanho m\xE1ximo: ",
320
299
  formatBytes(maxSize)
321
300
  ] })
@@ -324,61 +303,103 @@ function ImageUploader({
324
303
  }
325
304
  ),
326
305
  showImageOptions && stagedFile && !isUploading && state.status !== "done" && /* @__PURE__ */ jsxs(Fragment, { children: [
327
- preview && /* @__PURE__ */ jsx("div", { className: "silo-section-body", style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx("img", { src: preview, alt: "Pr\xE9-visualiza\xE7\xE3o", style: { width: "100%", maxHeight: 200, objectFit: "contain", display: "block", background: "var(--silo-bg-hover, #f8fafc)" } }) }),
328
- /* @__PURE__ */ jsxs("div", { className: "silo-section-body", children: [
329
- /* @__PURE__ */ jsx("div", { className: "silo-section-header", children: "\u{1F5BC}\uFE0F Configura\xE7\xF5es de imagem" }),
306
+ preview && /* @__PURE__ */ jsx("div", { className: "border border-slate-200 rounded-xl overflow-hidden", children: /* @__PURE__ */ jsx("img", { src: preview, alt: "Pr\xE9-visualiza\xE7\xE3o", className: "w-full max-h-[200px] object-contain block bg-slate-50" }) }),
307
+ /* @__PURE__ */ jsxs("div", { className: "border border-slate-200 rounded-xl overflow-hidden", children: [
308
+ /* @__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" }),
330
309
  /* @__PURE__ */ jsx(ImageOptions, { value: imageOpts, onChange: setImageOpts, style: { padding: "12px 14px" } })
331
310
  ] }),
332
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 8 }, children: [
333
- /* @__PURE__ */ jsx("button", { className: "silo-btn silo-btn--lg", onClick: () => {
334
- setStagedFile(null);
335
- setPreview(null);
336
- }, children: "Cancelar" }),
337
- /* @__PURE__ */ jsx("button", { className: "silo-btn silo-btn--lg silo-btn--primary", style: { flex: 1 }, onClick: () => {
338
- const f = stagedFile;
339
- setStagedFile(null);
340
- void doUpload(f, imageOpts);
341
- }, children: "Enviar imagem" })
311
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
312
+ /* @__PURE__ */ jsx(
313
+ "button",
314
+ {
315
+ 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",
316
+ onClick: () => {
317
+ setStagedFile(null);
318
+ setPreview(null);
319
+ },
320
+ children: "Cancelar"
321
+ }
322
+ ),
323
+ /* @__PURE__ */ jsx(
324
+ "button",
325
+ {
326
+ 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",
327
+ onClick: () => {
328
+ const f = stagedFile;
329
+ setStagedFile(null);
330
+ void doUpload(f, imageOpts);
331
+ },
332
+ children: "Enviar imagem"
333
+ }
334
+ )
342
335
  ] })
343
336
  ] }),
344
- isUploading && (renderProgress ? renderProgress(progress) : /* @__PURE__ */ jsxs("div", { className: "silo-card", style: { flexDirection: "column", gap: 8, padding: 16 }, children: [
345
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
346
- /* @__PURE__ */ jsx("span", { className: "silo-text", style: { fontSize: 13, fontWeight: 600 }, children: uploadLabel(state.status, progress) }),
347
- /* @__PURE__ */ jsxs("span", { className: "silo-text-accent", style: { fontSize: 13, fontWeight: 700 }, children: [
337
+ isUploading && (renderProgress ? renderProgress(progress) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 px-3 py-4 bg-slate-50 rounded-xl border border-slate-200", children: [
338
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
339
+ /* @__PURE__ */ jsx("span", { className: "text-[13px] font-semibold text-slate-900", children: uploadLabel(state.status, progress) }),
340
+ /* @__PURE__ */ jsxs("span", { className: "text-[13px] font-bold text-indigo-500", children: [
348
341
  progress,
349
342
  "%"
350
343
  ] })
351
344
  ] }),
352
345
  /* @__PURE__ */ jsx(ProgressBar, { progress })
353
346
  ] })),
354
- isPaused && /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 8 }, children: [
355
- /* @__PURE__ */ jsx("button", { className: "silo-btn silo-btn--lg silo-btn--success", style: { flex: 1 }, onClick: () => resume({ ...bucket !== void 0 && { bucket }, image: imageOpts }), children: "\u25B6 Retomar envio" }),
356
- /* @__PURE__ */ jsx("button", { className: "silo-btn silo-btn--lg", onClick: () => {
357
- abort();
358
- setPreview(null);
359
- }, children: "Cancelar" })
347
+ isPaused && /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
348
+ /* @__PURE__ */ jsx(
349
+ "button",
350
+ {
351
+ 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-emerald-500 text-white cursor-pointer hover:opacity-90",
352
+ onClick: () => resume({ ...bucket !== void 0 && { bucket }, image: imageOpts }),
353
+ children: "\u25B6 Retomar envio"
354
+ }
355
+ ),
356
+ /* @__PURE__ */ jsx(
357
+ "button",
358
+ {
359
+ 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 hover:bg-slate-100",
360
+ onClick: () => {
361
+ abort();
362
+ setPreview(null);
363
+ },
364
+ children: "Cancelar"
365
+ }
366
+ )
360
367
  ] }),
361
- state.status === "done" && !renderSuccess && /* @__PURE__ */ jsxs("div", { className: "silo-card silo-card--success", style: { gap: 12, padding: "14px 16px" }, children: [
362
- /* @__PURE__ */ jsx("span", { style: { fontSize: 24 }, children: "\u2705" }),
363
- /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
364
- /* @__PURE__ */ jsx("div", { style: { fontWeight: 700, fontSize: 14, color: "#16a34a" }, children: "Imagem enviada com sucesso!" }),
365
- /* @__PURE__ */ jsx("div", { className: "silo-text-muted", style: { fontSize: 12, marginTop: 2 }, children: formatBytes(state.result.size) })
368
+ 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: [
369
+ /* @__PURE__ */ jsx("span", { className: "text-2xl", children: "\u2705" }),
370
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
371
+ /* @__PURE__ */ jsx("div", { className: "font-bold text-sm text-green-700", children: "Imagem enviada com sucesso!" }),
372
+ /* @__PURE__ */ jsx("div", { className: "text-[12px] text-slate-400 mt-0.5", children: formatBytes(state.result.size) })
366
373
  ] }),
367
- /* @__PURE__ */ jsx("button", { className: "silo-btn", style: { borderColor: "rgba(34,197,94,0.3)", color: "#16a34a", padding: "4px 10px", flexShrink: 0 }, onClick: () => {
368
- reset();
369
- setPreview(null);
370
- }, children: "Enviar outra" })
374
+ /* @__PURE__ */ jsx(
375
+ "button",
376
+ {
377
+ 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",
378
+ onClick: () => {
379
+ reset();
380
+ setPreview(null);
381
+ },
382
+ children: "Enviar outra"
383
+ }
384
+ )
371
385
  ] }),
372
- state.status === "error" && !renderError && /* @__PURE__ */ jsxs("div", { className: "silo-card silo-card--error", style: { gap: 12, padding: "14px 16px" }, children: [
373
- /* @__PURE__ */ jsx("span", { style: { fontSize: 22 }, children: "\u26A0\uFE0F" }),
374
- /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
375
- /* @__PURE__ */ jsx("div", { className: "silo-text-error", style: { fontWeight: 700, fontSize: 13 }, children: "N\xE3o foi poss\xEDvel enviar a imagem" }),
376
- /* @__PURE__ */ jsx("div", { className: "silo-text-muted", style: { fontSize: 12, marginTop: 2 }, children: state.error.message })
386
+ 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: [
387
+ /* @__PURE__ */ jsx("span", { className: "text-[22px]", children: "\u26A0\uFE0F" }),
388
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
389
+ /* @__PURE__ */ jsx("div", { className: "font-bold text-[13px] text-red-500", children: "N\xE3o foi poss\xEDvel enviar a imagem" }),
390
+ /* @__PURE__ */ jsx("div", { className: "text-[12px] text-slate-400 mt-0.5", children: state.error.message })
377
391
  ] }),
378
- /* @__PURE__ */ jsx("button", { className: "silo-btn", style: { borderColor: "rgba(239,68,68,0.3)", color: "#ef4444", padding: "4px 10px", flexShrink: 0 }, onClick: () => {
379
- reset();
380
- setPreview(null);
381
- }, children: "Tentar novamente" })
392
+ /* @__PURE__ */ jsx(
393
+ "button",
394
+ {
395
+ 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",
396
+ onClick: () => {
397
+ reset();
398
+ setPreview(null);
399
+ },
400
+ children: "Tentar novamente"
401
+ }
402
+ )
382
403
  ] })
383
404
  ] });
384
405
  }
@@ -397,6 +418,27 @@ var RESOLUTION_LABELS = {
397
418
  "1440": "1440p",
398
419
  "2160": "4K"
399
420
  };
421
+ function optionBtnCls(active) {
422
+ 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"}`;
423
+ }
424
+ function Toggle({ checked, onToggle, label }) {
425
+ 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: [
426
+ /* @__PURE__ */ jsx(
427
+ "span",
428
+ {
429
+ 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"}`,
430
+ children: /* @__PURE__ */ jsx(
431
+ "span",
432
+ {
433
+ className: "absolute top-0.5 w-3.5 h-3.5 rounded-full bg-white shadow-sm transition-[left] duration-150",
434
+ style: { left: checked ? "16px" : "2px" }
435
+ }
436
+ )
437
+ }
438
+ ),
439
+ label
440
+ ] });
441
+ }
400
442
  function VideoOptions({ value, onChange, style }) {
401
443
  const codec = value.codec ?? "h264";
402
444
  const transcoding = value.transcoding ?? "auto";
@@ -413,76 +455,31 @@ function VideoOptions({ value, onChange, style }) {
413
455
  function toggleFeature(key) {
414
456
  onChange({ ...value, [key]: !value[key] });
415
457
  }
416
- const btn = (active) => ({
417
- padding: "4px 10px",
418
- borderRadius: 6,
419
- border: `1px solid ${active ? "var(--silo-accent, #6366f1)" : "var(--silo-border, #e2e8f0)"}`,
420
- background: active ? "var(--silo-accent, #6366f1)" : "transparent",
421
- color: active ? "#fff" : "var(--silo-text, #0f172a)",
422
- fontSize: 12,
423
- fontWeight: 600,
424
- cursor: "pointer"
425
- });
426
- const toggle = (on) => ({
427
- display: "inline-flex",
428
- alignItems: "center",
429
- gap: 6,
430
- cursor: "pointer",
431
- userSelect: "none",
432
- fontSize: 12,
433
- color: "var(--silo-text, #0f172a)",
434
- fontWeight: 500
435
- });
436
- function Toggle({ checked, onToggle, label }) {
437
- return /* @__PURE__ */ jsxs("label", { style: toggle(), onClick: onToggle, children: [
438
- /* @__PURE__ */ jsx("span", { style: {
439
- width: 32,
440
- height: 18,
441
- borderRadius: 9,
442
- flexShrink: 0,
443
- background: checked ? "var(--silo-accent, #6366f1)" : "var(--silo-border, #e2e8f0)",
444
- position: "relative",
445
- transition: "background 0.15s",
446
- cursor: "pointer"
447
- }, children: /* @__PURE__ */ jsx("span", { style: {
448
- position: "absolute",
449
- top: 2,
450
- left: checked ? 16 : 2,
451
- width: 14,
452
- height: 14,
453
- borderRadius: "50%",
454
- background: "#fff",
455
- transition: "left 0.15s",
456
- boxShadow: "0 1px 3px rgba(0,0,0,0.2)"
457
- } }) }),
458
- label
459
- ] });
460
- }
461
- return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 12, ...style }, children: [
458
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", style, children: [
462
459
  /* @__PURE__ */ jsxs("div", { children: [
463
- /* @__PURE__ */ jsx("div", { style: { fontSize: 11, fontWeight: 700, color: "var(--silo-text-muted, #64748b)", letterSpacing: "0.05em", textTransform: "uppercase", marginBottom: 6 }, children: "Codec" }),
464
- /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: CODECS.map((c) => /* @__PURE__ */ jsx(
460
+ /* @__PURE__ */ jsx("div", { className: "text-[11px] font-bold text-slate-500 uppercase tracking-[0.05em] mb-1.5", children: "Codec" }),
461
+ /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap", children: CODECS.map((c) => /* @__PURE__ */ jsx(
465
462
  "button",
466
463
  {
467
464
  type: "button",
468
465
  title: c.hint,
469
466
  onClick: () => onChange({ ...value, codec: c.value }),
470
- style: btn(codec === c.value),
467
+ className: optionBtnCls(codec === c.value),
471
468
  children: c.label
472
469
  },
473
470
  c.value
474
471
  )) })
475
472
  ] }),
476
473
  /* @__PURE__ */ jsxs("div", { children: [
477
- /* @__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" }),
478
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: [
479
- /* @__PURE__ */ jsx("button", { type: "button", onClick: () => onChange({ ...value, transcoding: "auto" }), style: btn(isAuto), children: "Auto" }),
474
+ /* @__PURE__ */ jsx("div", { className: "text-[11px] font-bold text-slate-500 uppercase tracking-[0.05em] mb-1.5", children: "Resolu\xE7\xF5es" }),
475
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-1.5 flex-wrap", children: [
476
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: () => onChange({ ...value, transcoding: "auto" }), className: optionBtnCls(isAuto), children: "Auto" }),
480
477
  RESOLUTIONS.map((r) => /* @__PURE__ */ jsx(
481
478
  "button",
482
479
  {
483
480
  type: "button",
484
481
  onClick: () => toggleRes(r),
485
- style: btn(!isAuto && selectedRes.includes(r)),
482
+ className: optionBtnCls(!isAuto && selectedRes.includes(r)),
486
483
  children: RESOLUTION_LABELS[r]
487
484
  },
488
485
  r
@@ -490,8 +487,8 @@ function VideoOptions({ value, onChange, style }) {
490
487
  ] })
491
488
  ] }),
492
489
  /* @__PURE__ */ jsxs("div", { children: [
493
- /* @__PURE__ */ jsx("div", { style: { fontSize: 11, fontWeight: 700, color: "var(--silo-text-muted, #64748b)", letterSpacing: "0.05em", textTransform: "uppercase", marginBottom: 8 }, children: "Recursos" }),
494
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
490
+ /* @__PURE__ */ jsx("div", { className: "text-[11px] font-bold text-slate-500 uppercase tracking-[0.05em] mb-2", children: "Recursos" }),
491
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
495
492
  /* @__PURE__ */ jsx(Toggle, { checked: value.thumbnails ?? true, onToggle: () => toggleFeature("thumbnails"), label: "Gerar thumbnails" }),
496
493
  /* @__PURE__ */ jsx(Toggle, { checked: value.storyboard ?? false, onToggle: () => toggleFeature("storyboard"), label: "Gerar storyboard" }),
497
494
  /* @__PURE__ */ jsx(Toggle, { checked: value.autoCaptions ?? false, onToggle: () => toggleFeature("autoCaptions"), label: "Legendas autom\xE1ticas (IA)" }),
@@ -568,19 +565,14 @@ function VideoUploader({
568
565
  }, [showVideoOptions, video, videoOpts, doUpload, showPreview]);
569
566
  const containerStyle = {
570
567
  ...vars,
571
- display: "flex",
572
- flexDirection: "column",
573
- gap: "12px",
574
- width: "100%",
575
- fontFamily: "var(--silo-font)",
576
568
  ...style
577
569
  };
578
570
  const isUploading = state.status === "uploading" || state.status === "preparing" || state.status === "completing";
579
571
  const progress = state.status === "uploading" ? state.progress : state.status === "completing" ? 99 : 0;
580
572
  const isPaused = state.status === "idle" && preview !== null && !stagedFile;
581
- if (state.status === "error" && renderError) return /* @__PURE__ */ jsx("div", { style: containerStyle, children: renderError(state.error, reset) });
582
- if (state.status === "done" && renderSuccess) return /* @__PURE__ */ jsx("div", { style: containerStyle, children: renderSuccess(state.result) });
583
- return /* @__PURE__ */ jsxs("div", { className: `silo-video-uploader${className ? ` ${className}` : ""}`, style: containerStyle, children: [
573
+ if (state.status === "error" && renderError) return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3 w-full", style: containerStyle, children: renderError(state.error, reset) });
574
+ if (state.status === "done" && renderSuccess) return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3 w-full", style: containerStyle, children: renderSuccess(state.result) });
575
+ return /* @__PURE__ */ jsxs("div", { className: `flex flex-col gap-3 w-full${className ? ` ${className}` : ""}`, style: containerStyle, children: [
584
576
  /* @__PURE__ */ jsx(
585
577
  DropZone,
586
578
  {
@@ -591,15 +583,15 @@ function VideoUploader({
591
583
  disabled: disabled || isUploading,
592
584
  onFiles: handleFiles,
593
585
  style: { padding: "32px 24px", textAlign: "center" },
594
- children: preview && !isUploading && !stagedFile ? /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 8 }, children: [
595
- /* @__PURE__ */ jsx("video", { src: preview, style: { maxWidth: "100%", maxHeight: 180, borderRadius: 8 }, muted: true, playsInline: true }),
596
- /* @__PURE__ */ jsx("span", { className: "silo-text-muted", style: { fontSize: 12 }, children: "Clique ou arraste para trocar o v\xEDdeo" })
597
- ] }) : /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 8 }, children: [
598
- 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: "M15 10l4.553-2.069A1 1 0 0121 8.878v6.244a1 1 0 01-1.447.894L15 14M3 8a2 2 0 012-2h8a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2V8z" }) }),
586
+ children: preview && !isUploading && !stagedFile ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
587
+ /* @__PURE__ */ jsx("video", { src: preview, className: "max-w-full max-h-[180px] rounded-lg", muted: true, playsInline: true }),
588
+ /* @__PURE__ */ jsx("span", { className: "text-[12px] text-slate-400", children: "Clique ou arraste para trocar o v\xEDdeo" })
589
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
590
+ 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: "M15 10l4.553-2.069A1 1 0 0121 8.878v6.244a1 1 0 01-1.447.894L15 14M3 8a2 2 0 012-2h8a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2V8z" }) }),
599
591
  children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
600
- /* @__PURE__ */ jsx("span", { className: "silo-text", style: { fontWeight: 700, fontSize: 15 }, children: "Arraste seu v\xEDdeo aqui" }),
601
- /* @__PURE__ */ jsx("span", { className: "silo-text-muted", style: { fontSize: 13 }, children: "ou clique para escolher do seu dispositivo" }),
602
- /* @__PURE__ */ jsxs("span", { className: "silo-text-muted", style: { fontSize: 12 }, children: [
592
+ /* @__PURE__ */ jsx("span", { className: "text-slate-900 font-bold text-[15px]", children: "Arraste seu v\xEDdeo aqui" }),
593
+ /* @__PURE__ */ jsx("span", { className: "text-slate-500 text-[13px]", children: "ou clique para escolher do seu dispositivo" }),
594
+ /* @__PURE__ */ jsxs("span", { className: "text-slate-400 text-[12px]", children: [
603
595
  "MP4, MOV, MKV, WebM",
604
596
  maxSize ? ` \xB7 M\xE1x ${formatBytes(maxSize)}` : ""
605
597
  ] })
@@ -608,70 +600,119 @@ function VideoUploader({
608
600
  }
609
601
  ),
610
602
  showVideoOptions && stagedFile && !isUploading && state.status !== "done" && /* @__PURE__ */ jsxs(Fragment, { children: [
611
- preview && /* @__PURE__ */ jsx("div", { className: "silo-section-body", style: { background: "#000", overflow: "hidden" }, children: /* @__PURE__ */ jsx("video", { src: preview, style: { width: "100%", maxHeight: 200, display: "block" }, muted: true, playsInline: true, controls: true }) }),
612
- /* @__PURE__ */ jsxs("div", { className: "silo-section-body", children: [
613
- /* @__PURE__ */ jsx("div", { className: "silo-section-header", children: "\u{1F3AC} Configura\xE7\xF5es de v\xEDdeo" }),
603
+ preview && /* @__PURE__ */ jsx("div", { className: "border border-slate-200 rounded-xl overflow-hidden bg-black", children: /* @__PURE__ */ jsx("video", { src: preview, className: "w-full max-h-[200px] block", muted: true, playsInline: true, controls: true }) }),
604
+ /* @__PURE__ */ jsxs("div", { className: "border border-slate-200 rounded-xl overflow-hidden", children: [
605
+ /* @__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" }),
614
606
  /* @__PURE__ */ jsx(VideoOptions, { value: videoOpts, onChange: setVideoOpts, style: { padding: "12px 14px" } })
615
607
  ] }),
616
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 8 }, children: [
617
- /* @__PURE__ */ jsx("button", { className: "silo-btn silo-btn--lg", onClick: () => {
618
- setStagedFile(null);
619
- setPreview(null);
620
- setVideoOpts(createInitialVideoOpts(video));
621
- }, children: "Cancelar" }),
622
- /* @__PURE__ */ jsx("button", { className: "silo-btn silo-btn--lg silo-btn--primary", style: { flex: 1 }, onClick: () => {
623
- const f = stagedFile;
624
- setStagedFile(null);
625
- void doUpload(f, videoOpts);
626
- setVideoOpts(createInitialVideoOpts(video));
627
- }, children: "Enviar v\xEDdeo" })
608
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
609
+ /* @__PURE__ */ jsx(
610
+ "button",
611
+ {
612
+ 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 hover:bg-slate-100",
613
+ onClick: () => {
614
+ setStagedFile(null);
615
+ setPreview(null);
616
+ setVideoOpts(createInitialVideoOpts(video));
617
+ },
618
+ children: "Cancelar"
619
+ }
620
+ ),
621
+ /* @__PURE__ */ jsx(
622
+ "button",
623
+ {
624
+ 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 hover:opacity-90",
625
+ onClick: () => {
626
+ const f = stagedFile;
627
+ setStagedFile(null);
628
+ void doUpload(f, videoOpts);
629
+ setVideoOpts(createInitialVideoOpts(video));
630
+ },
631
+ children: "Enviar v\xEDdeo"
632
+ }
633
+ )
628
634
  ] })
629
635
  ] }),
630
- isUploading && (renderProgress ? renderProgress(progress) : /* @__PURE__ */ jsxs("div", { className: "silo-card", style: { flexDirection: "column", gap: 8, padding: 16 }, children: [
631
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
632
- /* @__PURE__ */ jsx("span", { className: "silo-text", style: { fontSize: 13, fontWeight: 600 }, children: uploadLabel2(state.status, progress) }),
633
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
634
- /* @__PURE__ */ jsxs("span", { className: "silo-text-accent", style: { fontSize: 13, fontWeight: 700 }, children: [
636
+ isUploading && (renderProgress ? renderProgress(progress) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 px-3 py-4 bg-slate-50 rounded-xl border border-slate-200", children: [
637
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
638
+ /* @__PURE__ */ jsx("span", { className: "text-[13px] font-semibold text-slate-900", children: uploadLabel2(state.status, progress) }),
639
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2 items-center", children: [
640
+ /* @__PURE__ */ jsxs("span", { className: "text-[13px] font-bold text-indigo-500", children: [
635
641
  progress,
636
642
  "%"
637
643
  ] }),
638
- /* @__PURE__ */ jsx("button", { className: "silo-btn", style: { fontSize: 11, padding: "2px 8px" }, onClick: pause, children: "Pausar" })
644
+ /* @__PURE__ */ jsx(
645
+ "button",
646
+ {
647
+ className: "inline-flex items-center justify-center text-[11px] font-semibold py-0.5 px-2 rounded-lg border border-slate-200 bg-transparent text-slate-900 cursor-pointer hover:bg-slate-100",
648
+ onClick: pause,
649
+ children: "Pausar"
650
+ }
651
+ )
639
652
  ] })
640
653
  ] }),
641
654
  /* @__PURE__ */ jsx(ProgressBar, { progress }),
642
- /* @__PURE__ */ jsx("span", { className: "silo-text-muted", style: { fontSize: 11 }, children: "O processamento do v\xEDdeo come\xE7a automaticamente ap\xF3s o envio" })
655
+ /* @__PURE__ */ jsx("span", { className: "text-[11px] text-slate-400", children: "O processamento do v\xEDdeo come\xE7a automaticamente ap\xF3s o envio" })
643
656
  ] })),
644
- isPaused && /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 8 }, children: [
645
- /* @__PURE__ */ jsx("button", { className: "silo-btn silo-btn--lg silo-btn--success", style: { flex: 1 }, onClick: () => resume({ ...bucket !== void 0 && { bucket }, video: videoOpts }), children: "\u25B6 Retomar envio" }),
646
- /* @__PURE__ */ jsx("button", { className: "silo-btn silo-btn--lg", onClick: () => {
647
- abort();
648
- setPreview(null);
649
- }, children: "Cancelar" })
657
+ isPaused && /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
658
+ /* @__PURE__ */ jsx(
659
+ "button",
660
+ {
661
+ 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-emerald-500 text-white cursor-pointer hover:opacity-90",
662
+ onClick: () => resume({ ...bucket !== void 0 && { bucket }, video: videoOpts }),
663
+ children: "\u25B6 Retomar envio"
664
+ }
665
+ ),
666
+ /* @__PURE__ */ jsx(
667
+ "button",
668
+ {
669
+ 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 hover:bg-slate-100",
670
+ onClick: () => {
671
+ abort();
672
+ setPreview(null);
673
+ },
674
+ children: "Cancelar"
675
+ }
676
+ )
650
677
  ] }),
651
- state.status === "done" && !renderSuccess && /* @__PURE__ */ jsxs("div", { className: "silo-card silo-card--success", style: { flexDirection: "column", gap: 8, padding: "14px 16px" }, children: [
652
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
653
- /* @__PURE__ */ jsx("span", { style: { fontSize: 24 }, children: "\u2705" }),
654
- /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
655
- /* @__PURE__ */ jsx("div", { style: { fontWeight: 700, fontSize: 14, color: "#16a34a" }, children: "V\xEDdeo enviado com sucesso!" }),
656
- /* @__PURE__ */ jsx("div", { className: "silo-text-muted", style: { fontSize: 12, marginTop: 2 }, children: formatBytes(state.result.size) })
678
+ state.status === "done" && !renderSuccess && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 px-4 py-3.5 bg-green-500/[0.08] rounded-xl border border-green-500/20", children: [
679
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
680
+ /* @__PURE__ */ jsx("span", { className: "text-2xl", children: "\u2705" }),
681
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
682
+ /* @__PURE__ */ jsx("div", { className: "font-bold text-sm text-green-700", children: "V\xEDdeo enviado com sucesso!" }),
683
+ /* @__PURE__ */ jsx("div", { className: "text-[12px] text-slate-400 mt-0.5", children: formatBytes(state.result.size) })
657
684
  ] }),
658
- /* @__PURE__ */ jsx("button", { className: "silo-btn", style: { borderColor: "rgba(34,197,94,0.3)", color: "#16a34a", padding: "4px 10px", flexShrink: 0 }, onClick: () => {
659
- reset();
660
- setPreview(null);
661
- }, children: "Enviar outro" })
685
+ /* @__PURE__ */ jsx(
686
+ "button",
687
+ {
688
+ 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",
689
+ onClick: () => {
690
+ reset();
691
+ setPreview(null);
692
+ },
693
+ children: "Enviar outro"
694
+ }
695
+ )
662
696
  ] }),
663
- /* @__PURE__ */ jsx("div", { className: "silo-text-muted", style: { fontSize: 12, padding: "8px 12px", borderRadius: 8, background: "rgba(34,197,94,0.06)", border: "1px solid rgba(34,197,94,0.15)" }, children: "\u{1F3AC} Seu v\xEDdeo est\xE1 sendo processado em segundo plano. Isso pode levar alguns minutos dependendo do tamanho." })
697
+ /* @__PURE__ */ jsx("div", { className: "text-[12px] text-slate-500 px-3 py-2 rounded-lg bg-green-500/[0.06] border border-green-500/15", children: "\u{1F3AC} Seu v\xEDdeo est\xE1 sendo processado em segundo plano. Isso pode levar alguns minutos dependendo do tamanho." })
664
698
  ] }),
665
- state.status === "error" && !renderError && /* @__PURE__ */ jsxs("div", { className: "silo-card silo-card--error", style: { gap: 12, padding: "14px 16px" }, children: [
666
- /* @__PURE__ */ jsx("span", { style: { fontSize: 22 }, children: "\u26A0\uFE0F" }),
667
- /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
668
- /* @__PURE__ */ jsx("div", { className: "silo-text-error", style: { fontWeight: 700, fontSize: 13 }, children: "N\xE3o foi poss\xEDvel enviar o v\xEDdeo" }),
669
- /* @__PURE__ */ jsx("div", { className: "silo-text-muted", style: { fontSize: 12, marginTop: 2 }, children: state.error.message })
699
+ 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: [
700
+ /* @__PURE__ */ jsx("span", { className: "text-[22px]", children: "\u26A0\uFE0F" }),
701
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
702
+ /* @__PURE__ */ jsx("div", { className: "font-bold text-[13px] text-red-500", children: "N\xE3o foi poss\xEDvel enviar o v\xEDdeo" }),
703
+ /* @__PURE__ */ jsx("div", { className: "text-[12px] text-slate-400 mt-0.5", children: state.error.message })
670
704
  ] }),
671
- /* @__PURE__ */ jsx("button", { className: "silo-btn", style: { borderColor: "rgba(239,68,68,0.3)", color: "#ef4444", padding: "4px 10px", flexShrink: 0 }, onClick: () => {
672
- reset();
673
- setPreview(null);
674
- }, children: "Tentar novamente" })
705
+ /* @__PURE__ */ jsx(
706
+ "button",
707
+ {
708
+ 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",
709
+ onClick: () => {
710
+ reset();
711
+ setPreview(null);
712
+ },
713
+ children: "Tentar novamente"
714
+ }
715
+ )
675
716
  ] })
676
717
  ] });
677
718
  }
@@ -724,11 +765,6 @@ function FileUploader({
724
765
  const vars = themeToVars(t);
725
766
  const containerStyle = {
726
767
  ...vars,
727
- display: "flex",
728
- flexDirection: "column",
729
- gap: "12px",
730
- width: "100%",
731
- fontFamily: "var(--silo-font)",
732
768
  ...style
733
769
  };
734
770
  const single = useMultipartUpload(bucket);
@@ -805,9 +841,9 @@ function FileUploader({
805
841
  const isBatchUploading = batch.state.status === "uploading" || batch.state.status === "preparing";
806
842
  const isUploading = isSingleUploading || isBatchUploading;
807
843
  const singleProgress = single.state.status === "uploading" ? single.state.progress : single.state.status === "completing" ? 99 : 0;
808
- if (single.state.status === "error" && renderError) return /* @__PURE__ */ jsx("div", { style: containerStyle, children: renderError(single.state.error, single.reset) });
809
- if (single.state.status === "done" && renderSuccess) return /* @__PURE__ */ jsx("div", { style: containerStyle, children: renderSuccess(single.state.result) });
810
- return /* @__PURE__ */ jsxs("div", { className: `silo-file-uploader${className ? ` ${className}` : ""}`, style: containerStyle, children: [
844
+ 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) });
845
+ 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) });
846
+ return /* @__PURE__ */ jsxs("div", { className: `flex flex-col gap-3 w-full${className ? ` ${className}` : ""}`, style: containerStyle, children: [
811
847
  !isBatch && !staged && /* @__PURE__ */ jsx(
812
848
  DropZone,
813
849
  {
@@ -819,12 +855,12 @@ function FileUploader({
819
855
  disabled: disabled || isUploading,
820
856
  onFiles: handleFiles,
821
857
  style: { padding: "28px 24px", textAlign: "center" },
822
- children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "8px" }, children: [
823
- 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" }) }),
858
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
859
+ 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" }) }),
824
860
  children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
825
- /* @__PURE__ */ jsx("span", { className: "silo-text", style: { fontWeight: 700, fontSize: 15 }, children: multiple ? "Arraste seus arquivos aqui" : "Arraste seu arquivo aqui" }),
826
- /* @__PURE__ */ jsx("span", { className: "silo-text-muted", style: { fontSize: 13 }, children: "ou clique para escolher do seu dispositivo" }),
827
- maxSize && /* @__PURE__ */ jsxs("span", { className: "silo-text-muted", style: { fontSize: 12 }, children: [
861
+ /* @__PURE__ */ jsx("span", { className: "text-slate-900 font-bold text-[15px]", children: multiple ? "Arraste seus arquivos aqui" : "Arraste seu arquivo aqui" }),
862
+ /* @__PURE__ */ jsx("span", { className: "text-slate-500 text-[13px]", children: "ou clique para escolher do seu dispositivo" }),
863
+ maxSize && /* @__PURE__ */ jsxs("span", { className: "text-slate-400 text-[12px]", children: [
828
864
  "Tamanho m\xE1ximo: ",
829
865
  formatBytes(maxSize)
830
866
  ] })
@@ -832,11 +868,11 @@ function FileUploader({
832
868
  ] })
833
869
  }
834
870
  ),
835
- staged && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
836
- /* @__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` }),
837
- staged.map((f, i) => /* @__PURE__ */ jsxs("div", { className: "silo-card", children: [
838
- /* @__PURE__ */ jsx("span", { style: { fontSize: 20, flexShrink: 0 }, children: getFileIcon(f.type) }),
839
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
871
+ staged && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
872
+ /* @__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` }),
873
+ 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: [
874
+ /* @__PURE__ */ jsx("span", { className: "text-xl shrink-0", children: getFileIcon(f.type) }),
875
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
840
876
  editingIndex === i ? /* @__PURE__ */ jsx(
841
877
  "input",
842
878
  {
@@ -854,30 +890,28 @@ function FileUploader({
854
890
  }
855
891
  if (e.key === "Escape") setEditingIndex(null);
856
892
  },
857
- 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)" }
893
+ 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"
858
894
  }
859
895
  ) : /* @__PURE__ */ jsxs(
860
896
  "div",
861
897
  {
862
- className: "silo-text",
863
- style: { fontSize: 13, fontWeight: 600, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", cursor: allowRename ? "text" : "default" },
898
+ className: `text-[13px] font-semibold text-slate-900 overflow-hidden text-ellipsis whitespace-nowrap${allowRename ? "cursor-text" : "cursor-default"}`,
864
899
  onClick: () => allowRename && setEditingIndex(i),
865
900
  title: allowRename ? "Clique para renomear" : void 0,
866
901
  children: [
867
902
  effectiveName(i, staged),
868
- renames.has(i) && /* @__PURE__ */ jsx("span", { className: "silo-text-accent", style: { marginLeft: 6, fontSize: 10, fontWeight: 700 }, children: "renomeado" })
903
+ renames.has(i) && /* @__PURE__ */ jsx("span", { className: "text-indigo-500 ml-1.5 text-[10px] font-bold", children: "renomeado" })
869
904
  ]
870
905
  }
871
906
  ),
872
- /* @__PURE__ */ jsx("div", { className: "silo-text-muted", style: { fontSize: 11, marginTop: 1 }, children: formatBytes(f.size) })
907
+ /* @__PURE__ */ jsx("div", { className: "text-[11px] text-slate-400 mt-0.5", children: formatBytes(f.size) })
873
908
  ] }),
874
909
  allowRename && /* @__PURE__ */ jsx(
875
910
  "button",
876
911
  {
877
912
  onClick: () => setEditingIndex(i),
878
913
  title: "Renomear",
879
- className: "silo-text-muted",
880
- style: { background: "none", border: "none", cursor: "pointer", fontSize: 14, padding: "0 4px", flexShrink: 0 },
914
+ className: "text-slate-400 bg-none border-none cursor-pointer text-sm px-1 shrink-0 hover:text-slate-600",
881
915
  children: "\u270F\uFE0F"
882
916
  }
883
917
  ),
@@ -889,63 +923,75 @@ function FileUploader({
889
923
  if (next.length === 0) clearStaging();
890
924
  else setStaged(next);
891
925
  },
892
- className: "silo-text-muted",
893
- style: { background: "none", border: "none", cursor: "pointer", fontSize: 18, padding: "0 4px", lineHeight: 1, flexShrink: 0 },
926
+ className: "text-slate-400 bg-none border-none cursor-pointer text-lg px-1 leading-none shrink-0 hover:text-slate-600",
894
927
  children: "\xD7"
895
928
  }
896
929
  )
897
930
  ] }, i)),
898
- showImageOptions && staged.some((f) => f.type.startsWith("image/")) && /* @__PURE__ */ jsxs("div", { className: "silo-section-body", children: [
899
- /* @__PURE__ */ jsx("div", { className: "silo-section-header", children: "\u{1F5BC}\uFE0F Configura\xE7\xF5es de imagem" }),
931
+ showImageOptions && staged.some((f) => f.type.startsWith("image/")) && /* @__PURE__ */ jsxs("div", { className: "border border-slate-200 rounded-xl overflow-hidden", children: [
932
+ /* @__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" }),
900
933
  /* @__PURE__ */ jsx(ImageOptions, { value: imageOpts, onChange: setImageOpts, style: { padding: "12px 14px" } })
901
934
  ] }),
902
- showVideoOptions && staged.some((f) => f.type.startsWith("video/")) && /* @__PURE__ */ jsxs("div", { className: "silo-section-body", children: [
903
- /* @__PURE__ */ jsx("div", { className: "silo-section-header", children: "\u{1F3AC} Configura\xE7\xF5es de v\xEDdeo" }),
935
+ showVideoOptions && staged.some((f) => f.type.startsWith("video/")) && /* @__PURE__ */ jsxs("div", { className: "border border-slate-200 rounded-xl overflow-hidden", children: [
936
+ /* @__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" }),
904
937
  /* @__PURE__ */ jsx(VideoOptions, { value: videoOpts, onChange: setVideoOpts, style: { padding: "12px 14px" } })
905
938
  ] }),
906
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 8, marginTop: 4 }, children: [
907
- /* @__PURE__ */ jsx("button", { className: "silo-btn silo-btn--lg", onClick: clearStaging, children: "Cancelar" }),
908
- /* @__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" })
939
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2 mt-1", children: [
940
+ /* @__PURE__ */ jsx(
941
+ "button",
942
+ {
943
+ 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",
944
+ onClick: clearStaging,
945
+ children: "Cancelar"
946
+ }
947
+ ),
948
+ /* @__PURE__ */ jsx(
949
+ "button",
950
+ {
951
+ 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",
952
+ onClick: handleConfirmUpload,
953
+ children: staged.length > 1 ? `Enviar ${staged.length} arquivos` : "Enviar arquivo"
954
+ }
955
+ )
909
956
  ] })
910
957
  ] }),
911
- isSingleUploading && !isBatch && (renderProgress ? renderProgress(singleProgress) : /* @__PURE__ */ jsxs("div", { className: "silo-card", style: { flexDirection: "column", gap: 8, padding: 16 }, children: [
912
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
913
- /* @__PURE__ */ jsx("span", { className: "silo-text", style: { fontSize: 13, fontWeight: 600 }, children: uploadLabel3(single.state.status, singleProgress) }),
914
- /* @__PURE__ */ jsxs("span", { className: "silo-text-accent", style: { fontSize: 13, fontWeight: 700 }, children: [
958
+ 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: [
959
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
960
+ /* @__PURE__ */ jsx("span", { className: "text-[13px] font-semibold text-slate-900", children: uploadLabel3(single.state.status, singleProgress) }),
961
+ /* @__PURE__ */ jsxs("span", { className: "text-[13px] font-bold text-indigo-500", children: [
915
962
  singleProgress,
916
963
  "%"
917
964
  ] })
918
965
  ] }),
919
966
  /* @__PURE__ */ jsx(ProgressBar, { progress: singleProgress })
920
967
  ] })),
921
- isBatch && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
968
+ isBatch && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
922
969
  batch.state.files.map((f, i) => {
923
970
  const st = f.status;
924
971
  const p = st.status === "uploading" ? st.progress : st.status === "paused" ? st.progress : st.status === "done" ? 100 : st.status === "completing" ? 99 : 0;
925
972
  const isPaused = st.status === "paused";
926
973
  const isDone = st.status === "done";
927
974
  const isErr = st.status === "error";
928
- return /* @__PURE__ */ jsxs("div", { className: "silo-card", style: { flexDirection: "column", alignItems: "stretch", gap: 8, padding: "12px 14px" }, children: [
929
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [
930
- /* @__PURE__ */ jsx("span", { style: { fontSize: 18, flexShrink: 0 }, children: getFileIcon(f.file.type) }),
931
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
932
- /* @__PURE__ */ jsx("div", { className: "silo-text", style: { fontSize: 13, fontWeight: 600, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: f.file.name }),
933
- /* @__PURE__ */ jsx("div", { className: "silo-text-muted", style: { fontSize: 11 }, children: formatBytes(f.file.size) })
975
+ 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: [
976
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5", children: [
977
+ /* @__PURE__ */ jsx("span", { className: "text-lg shrink-0", children: getFileIcon(f.file.type) }),
978
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
979
+ /* @__PURE__ */ jsx("div", { className: "text-[13px] font-semibold text-slate-900 overflow-hidden text-ellipsis whitespace-nowrap", children: f.file.name }),
980
+ /* @__PURE__ */ jsx("div", { className: "text-[11px] text-slate-400", children: formatBytes(f.file.size) })
934
981
  ] }),
935
- isDone && /* @__PURE__ */ jsx("span", { style: { fontSize: 18, flexShrink: 0 }, children: "\u2705" }),
936
- isErr && /* @__PURE__ */ jsx("span", { className: "silo-text-error", style: { fontSize: 12, fontWeight: 600, flexShrink: 0 }, children: "Erro no envio" }),
937
- !isDone && !isErr && /* @__PURE__ */ jsx("span", { className: isPaused ? "silo-text-muted" : "silo-text-accent", style: { fontSize: 12, fontWeight: 700, flexShrink: 0 }, children: isPaused ? "Pausado" : `${p}%` }),
938
- !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)
982
+ isDone && /* @__PURE__ */ jsx("span", { className: "text-lg shrink-0", children: "\u2705" }),
983
+ isErr && /* @__PURE__ */ jsx("span", { className: "text-[12px] font-semibold text-red-500 shrink-0", children: "Erro no envio" }),
984
+ !isDone && !isErr && /* @__PURE__ */ jsx("span", { className: `text-[12px] font-bold shrink-0${isPaused ? "text-slate-400" : "text-indigo-500"}`, children: isPaused ? "Pausado" : `${p}%` }),
985
+ !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)
939
986
  ] }),
940
987
  !isDone && !isErr && /* @__PURE__ */ jsx(ProgressBar, { progress: p })
941
988
  ] }, i);
942
989
  }),
943
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 8 }, children: [
990
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
944
991
  batch.state.status !== "done" && /* @__PURE__ */ jsx(
945
992
  "button",
946
993
  {
947
- className: `silo-btn silo-btn--lg${isBatchUploading ? " silo-btn--warning" : " silo-btn--success"}`,
948
- style: { flex: 1 },
994
+ 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"}`,
949
995
  onClick: isBatchUploading ? batch.pauseAll : batch.resumeAll,
950
996
  children: isBatchUploading ? "\u23F8 Pausar tudo" : "\u25B6 Retomar tudo"
951
997
  }
@@ -953,32 +999,46 @@ function FileUploader({
953
999
  /* @__PURE__ */ jsx(
954
1000
  "button",
955
1001
  {
956
- className: `silo-btn silo-btn--lg${batch.state.status === "done" ? " silo-btn--primary" : " silo-btn--danger"}`,
1002
+ 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"}`,
957
1003
  onClick: batch.state.status === "done" ? batch.reset : batch.abortAll,
958
1004
  children: batch.state.status === "done" ? "Enviar mais arquivos" : "Cancelar"
959
1005
  }
960
1006
  )
961
1007
  ] }),
962
- batch.state.status === "done" && /* @__PURE__ */ jsxs("div", { className: "silo-card silo-card--success", style: { gap: 10 }, children: [
963
- /* @__PURE__ */ jsx("span", { style: { fontSize: 20 }, children: "\u{1F389}" }),
964
- /* @__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!` })
1008
+ 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: [
1009
+ /* @__PURE__ */ jsx("span", { className: "text-xl", children: "\u{1F389}" }),
1010
+ /* @__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!` })
965
1011
  ] })
966
1012
  ] }),
967
- single.state.status === "done" && !renderSuccess && /* @__PURE__ */ jsxs("div", { className: "silo-card silo-card--success", style: { gap: 12, padding: "14px 16px" }, children: [
968
- /* @__PURE__ */ jsx("span", { style: { fontSize: 24 }, children: "\u2705" }),
969
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
970
- /* @__PURE__ */ jsx("div", { style: { fontWeight: 700, fontSize: 14, color: "#16a34a" }, children: "Arquivo enviado com sucesso!" }),
971
- /* @__PURE__ */ jsx("div", { className: "silo-text-muted", style: { fontSize: 12, marginTop: 2 }, children: formatBytes(single.state.result.size) })
1013
+ 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: [
1014
+ /* @__PURE__ */ jsx("span", { className: "text-2xl", children: "\u2705" }),
1015
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
1016
+ /* @__PURE__ */ jsx("div", { className: "font-bold text-sm text-green-700", children: "Arquivo enviado com sucesso!" }),
1017
+ /* @__PURE__ */ jsx("div", { className: "text-[12px] text-slate-400 mt-0.5", children: formatBytes(single.state.result.size) })
972
1018
  ] }),
973
- /* @__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" })
1019
+ /* @__PURE__ */ jsx(
1020
+ "button",
1021
+ {
1022
+ 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",
1023
+ onClick: single.reset,
1024
+ children: "Enviar outro"
1025
+ }
1026
+ )
974
1027
  ] }),
975
- single.state.status === "error" && !renderError && /* @__PURE__ */ jsxs("div", { className: "silo-card silo-card--error", style: { gap: 12, padding: "14px 16px" }, children: [
976
- /* @__PURE__ */ jsx("span", { style: { fontSize: 22 }, children: "\u26A0\uFE0F" }),
977
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
978
- /* @__PURE__ */ jsx("div", { className: "silo-text-error", style: { fontWeight: 700, fontSize: 13 }, children: "N\xE3o foi poss\xEDvel enviar o arquivo" }),
979
- /* @__PURE__ */ jsx("div", { className: "silo-text-muted", style: { fontSize: 12, marginTop: 2 }, children: single.state.error.message })
1028
+ 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: [
1029
+ /* @__PURE__ */ jsx("span", { className: "text-[22px]", children: "\u26A0\uFE0F" }),
1030
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
1031
+ /* @__PURE__ */ jsx("div", { className: "font-bold text-[13px] text-red-500", children: "N\xE3o foi poss\xEDvel enviar o arquivo" }),
1032
+ /* @__PURE__ */ jsx("div", { className: "text-[12px] text-slate-400 mt-0.5", children: single.state.error.message })
980
1033
  ] }),
981
- /* @__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" })
1034
+ /* @__PURE__ */ jsx(
1035
+ "button",
1036
+ {
1037
+ 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",
1038
+ onClick: single.reset,
1039
+ children: "Tentar novamente"
1040
+ }
1041
+ )
982
1042
  ] })
983
1043
  ] });
984
1044
  }
@@ -1006,80 +1066,64 @@ function MediaUploader({
1006
1066
  const vars = themeToVars(t);
1007
1067
  const containerStyle = {
1008
1068
  ...vars,
1009
- display: "flex",
1010
- flexDirection: "column",
1011
- gap: "0",
1012
- width: "100%",
1013
- fontFamily: "var(--silo-font)",
1014
- border: "1px solid var(--silo-border)",
1015
- borderRadius: "var(--silo-radius)",
1016
- overflow: "hidden",
1017
- backgroundColor: "var(--silo-bg)",
1018
1069
  ...style
1019
1070
  };
1020
- return /* @__PURE__ */ jsxs("div", { className: `silo-media-uploader${className ? ` ${className}` : ""}`, style: containerStyle, children: [
1021
- /* @__PURE__ */ jsx("div", { style: { display: "flex", borderBottom: "1px solid var(--silo-border)" }, children: tabs.map((tab) => /* @__PURE__ */ jsxs(
1022
- "button",
1023
- {
1024
- onClick: () => setActiveTab(tab),
1025
- style: {
1026
- flex: 1,
1027
- padding: "10px 8px",
1028
- background: "none",
1029
- border: "none",
1030
- borderBottom: `2px solid ${activeTab === tab ? "var(--silo-accent)" : "transparent"}`,
1031
- cursor: "pointer",
1032
- fontSize: "13px",
1033
- fontWeight: activeTab === tab ? 600 : 400,
1034
- color: activeTab === tab ? "var(--silo-accent)" : "var(--silo-text-muted)",
1035
- transition: "color 0.15s, border-color 0.15s",
1036
- display: "flex",
1037
- alignItems: "center",
1038
- justifyContent: "center",
1039
- gap: "6px"
1040
- },
1041
- children: [
1042
- /* @__PURE__ */ jsx("span", { children: TAB_LABELS[tab].icon }),
1043
- /* @__PURE__ */ jsx("span", { children: TAB_LABELS[tab].label })
1044
- ]
1045
- },
1046
- tab
1047
- )) }),
1048
- /* @__PURE__ */ jsxs("div", { style: { padding: "16px" }, children: [
1049
- activeTab === "image" && /* @__PURE__ */ jsx(
1050
- ImageUploader,
1051
- {
1052
- ...shared,
1053
- ...imageProps,
1054
- ...theme !== void 0 && { theme },
1055
- ...onUpload !== void 0 && { onUpload },
1056
- ...onError !== void 0 && { onError }
1057
- }
1058
- ),
1059
- activeTab === "video" && /* @__PURE__ */ jsx(
1060
- VideoUploader,
1061
- {
1062
- ...shared,
1063
- ...videoProps,
1064
- ...theme !== void 0 && { theme },
1065
- ...onUpload !== void 0 && { onUpload },
1066
- ...onError !== void 0 && { onError }
1067
- }
1068
- ),
1069
- activeTab === "file" && /* @__PURE__ */ jsx(
1070
- FileUploader,
1071
- {
1072
- ...shared,
1073
- ...fileProps,
1074
- multiple: true,
1075
- ...theme !== void 0 && { theme },
1076
- ...onUpload !== void 0 && { onUpload },
1077
- ...onBatchUpload !== void 0 && { onBatchUpload },
1078
- ...onError !== void 0 && { onError }
1079
- }
1080
- )
1081
- ] })
1082
- ] });
1071
+ return /* @__PURE__ */ jsxs(
1072
+ "div",
1073
+ {
1074
+ className: `flex flex-col w-full border border-slate-200 rounded-xl overflow-hidden bg-slate-50${className ? ` ${className}` : ""}`,
1075
+ style: containerStyle,
1076
+ children: [
1077
+ /* @__PURE__ */ jsx("div", { className: "flex border-b border-slate-200", children: tabs.map((tab) => /* @__PURE__ */ jsxs(
1078
+ "button",
1079
+ {
1080
+ onClick: () => setActiveTab(tab),
1081
+ className: `flex-1 flex items-center justify-center gap-1.5 py-2.5 px-2 bg-transparent border-none border-b-2 cursor-pointer text-[13px] transition-colors duration-150${activeTab === tab ? "border-b-indigo-500 font-semibold text-indigo-500" : "border-b-transparent font-normal text-slate-400 hover:text-slate-600"}`,
1082
+ style: { borderBottom: `2px solid ${activeTab === tab ? "#6366f1" : "transparent"}` },
1083
+ children: [
1084
+ /* @__PURE__ */ jsx("span", { children: TAB_LABELS[tab].icon }),
1085
+ /* @__PURE__ */ jsx("span", { children: TAB_LABELS[tab].label })
1086
+ ]
1087
+ },
1088
+ tab
1089
+ )) }),
1090
+ /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
1091
+ activeTab === "image" && /* @__PURE__ */ jsx(
1092
+ ImageUploader,
1093
+ {
1094
+ ...shared,
1095
+ ...imageProps,
1096
+ ...theme !== void 0 && { theme },
1097
+ ...onUpload !== void 0 && { onUpload },
1098
+ ...onError !== void 0 && { onError }
1099
+ }
1100
+ ),
1101
+ activeTab === "video" && /* @__PURE__ */ jsx(
1102
+ VideoUploader,
1103
+ {
1104
+ ...shared,
1105
+ ...videoProps,
1106
+ ...theme !== void 0 && { theme },
1107
+ ...onUpload !== void 0 && { onUpload },
1108
+ ...onError !== void 0 && { onError }
1109
+ }
1110
+ ),
1111
+ activeTab === "file" && /* @__PURE__ */ jsx(
1112
+ FileUploader,
1113
+ {
1114
+ ...shared,
1115
+ ...fileProps,
1116
+ multiple: true,
1117
+ ...theme !== void 0 && { theme },
1118
+ ...onUpload !== void 0 && { onUpload },
1119
+ ...onBatchUpload !== void 0 && { onBatchUpload },
1120
+ ...onError !== void 0 && { onError }
1121
+ }
1122
+ )
1123
+ ] })
1124
+ ]
1125
+ }
1126
+ );
1083
1127
  }
1084
1128
 
1085
1129
  export { MediaUploader };