@geekapps/silo-elements-nextjs 0.2.37 → 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.
- package/dist/FileUploader.js +10 -10
- package/dist/FileUploader.js.map +1 -1
- package/dist/ImageUploader.js +5 -5
- package/dist/ImageUploader.js.map +1 -1
- package/dist/MediaUploader.js +11 -11
- package/dist/MediaUploader.js.map +1 -1
- package/dist/VideoPlayer.js +12 -12
- package/dist/VideoPlayer.js.map +1 -1
- package/dist/VideoUploader.js +4 -4
- package/dist/VideoUploader.js.map +1 -1
- package/dist/components/DropZone.js +3 -3
- package/dist/components/DropZone.js.map +1 -1
- package/dist/index.js +30 -30
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/styles.css +1 -1
package/dist/MediaUploader.js
CHANGED
|
@@ -89,9 +89,9 @@ function DropZone({
|
|
|
89
89
|
...style
|
|
90
90
|
};
|
|
91
91
|
const cls = [
|
|
92
|
-
"border-2 border-dashed border-slate-200 rounded-xl bg-slate-50 text-slate-900 cursor-pointer outline-none transition-colors duration-150",
|
|
93
|
-
dragging ? "border-indigo-500 bg-slate-100" : "hover:border-indigo-500 hover:bg-slate-100",
|
|
94
|
-
disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
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(
|
|
@@ -168,7 +168,7 @@ function ImageOptions({ value, onChange, style }) {
|
|
|
168
168
|
type: "button",
|
|
169
169
|
onClick: () => onChange({ ...value, format: f.value }),
|
|
170
170
|
title: f.hint,
|
|
171
|
-
className: `py-1 px-3 rounded-md text-xs font-semibold cursor-pointer transition-colors border
|
|
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"}`,
|
|
172
172
|
children: f.label
|
|
173
173
|
},
|
|
174
174
|
f.value
|
|
@@ -179,7 +179,7 @@ function ImageOptions({ value, onChange, style }) {
|
|
|
179
179
|
"span",
|
|
180
180
|
{
|
|
181
181
|
onClick: () => onChange({ ...value, optimize: !optimize }),
|
|
182
|
-
className: `relative w-9 h-5 rounded-full shrink-0 cursor-pointer transition-colors duration-150
|
|
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
183
|
children: /* @__PURE__ */ jsx(
|
|
184
184
|
"span",
|
|
185
185
|
{
|
|
@@ -426,7 +426,7 @@ function Toggle({ checked, onToggle, label }) {
|
|
|
426
426
|
/* @__PURE__ */ jsx(
|
|
427
427
|
"span",
|
|
428
428
|
{
|
|
429
|
-
className: `relative inline-block w-8 h-[18px] rounded-full shrink-0 cursor-pointer transition-colors duration-150
|
|
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
430
|
children: /* @__PURE__ */ jsx(
|
|
431
431
|
"span",
|
|
432
432
|
{
|
|
@@ -895,7 +895,7 @@ function FileUploader({
|
|
|
895
895
|
) : /* @__PURE__ */ jsxs(
|
|
896
896
|
"div",
|
|
897
897
|
{
|
|
898
|
-
className: `text-[13px] font-semibold text-slate-900 overflow-hidden text-ellipsis whitespace-nowrap
|
|
898
|
+
className: `text-[13px] font-semibold text-slate-900 overflow-hidden text-ellipsis whitespace-nowrap${allowRename ? "cursor-text" : "cursor-default"}`,
|
|
899
899
|
onClick: () => allowRename && setEditingIndex(i),
|
|
900
900
|
title: allowRename ? "Clique para renomear" : void 0,
|
|
901
901
|
children: [
|
|
@@ -981,7 +981,7 @@ function FileUploader({
|
|
|
981
981
|
] }),
|
|
982
982
|
isDone && /* @__PURE__ */ jsx("span", { className: "text-lg shrink-0", children: "\u2705" }),
|
|
983
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
|
|
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
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)
|
|
986
986
|
] }),
|
|
987
987
|
!isDone && !isErr && /* @__PURE__ */ jsx(ProgressBar, { progress: p })
|
|
@@ -991,7 +991,7 @@ function FileUploader({
|
|
|
991
991
|
batch.state.status !== "done" && /* @__PURE__ */ jsx(
|
|
992
992
|
"button",
|
|
993
993
|
{
|
|
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
|
|
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"}`,
|
|
995
995
|
onClick: isBatchUploading ? batch.pauseAll : batch.resumeAll,
|
|
996
996
|
children: isBatchUploading ? "\u23F8 Pausar tudo" : "\u25B6 Retomar tudo"
|
|
997
997
|
}
|
|
@@ -999,7 +999,7 @@ function FileUploader({
|
|
|
999
999
|
/* @__PURE__ */ jsx(
|
|
1000
1000
|
"button",
|
|
1001
1001
|
{
|
|
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
|
|
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"}`,
|
|
1003
1003
|
onClick: batch.state.status === "done" ? batch.reset : batch.abortAll,
|
|
1004
1004
|
children: batch.state.status === "done" ? "Enviar mais arquivos" : "Cancelar"
|
|
1005
1005
|
}
|
|
@@ -1078,7 +1078,7 @@ function MediaUploader({
|
|
|
1078
1078
|
"button",
|
|
1079
1079
|
{
|
|
1080
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
|
|
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
1082
|
style: { borderBottom: `2px solid ${activeTab === tab ? "#6366f1" : "transparent"}` },
|
|
1083
1083
|
children: [
|
|
1084
1084
|
/* @__PURE__ */ jsx("span", { children: TAB_LABELS[tab].icon }),
|