react-upload-pro 0.1.0
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/LICENSE +21 -0
- package/README.md +736 -0
- package/dist/UploadProgress-8cEls1YP.d.cts +145 -0
- package/dist/UploadProgress-uRdhENqW.d.ts +145 -0
- package/dist/chunk-JI2V5ITY.js +2985 -0
- package/dist/chunk-JI2V5ITY.js.map +1 -0
- package/dist/chunk-VVMPVTIX.cjs +3030 -0
- package/dist/chunk-VVMPVTIX.cjs.map +1 -0
- package/dist/cloud/index.cjs +287 -0
- package/dist/cloud/index.cjs.map +1 -0
- package/dist/cloud/index.d.cts +125 -0
- package/dist/cloud/index.d.ts +125 -0
- package/dist/cloud/index.js +279 -0
- package/dist/cloud/index.js.map +1 -0
- package/dist/index.cjs +534 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +377 -0
- package/dist/index.d.ts +377 -0
- package/dist/index.js +351 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +81 -0
- package/dist/types-BDyFUrlv.d.cts +218 -0
- package/dist/types-BDyFUrlv.d.ts +218 -0
- package/dist/variants/index.cjs +1028 -0
- package/dist/variants/index.cjs.map +1 -0
- package/dist/variants/index.d.cts +106 -0
- package/dist/variants/index.d.ts +106 -0
- package/dist/variants/index.js +1005 -0
- package/dist/variants/index.js.map +1 -0
- package/package.json +122 -0
- package/tailwind.preset.cjs +37 -0
|
@@ -0,0 +1,1028 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkVVMPVTIX_cjs = require('../chunk-VVMPVTIX.cjs');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var react = require('react');
|
|
7
|
+
|
|
8
|
+
// src/variants/types.ts
|
|
9
|
+
function containerStyleFromProps(props) {
|
|
10
|
+
const hasOverride = props.width !== void 0 || props.style !== void 0;
|
|
11
|
+
if (!hasOverride) return void 0;
|
|
12
|
+
return {
|
|
13
|
+
width: props.width,
|
|
14
|
+
...props.style
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function surfaceStyleFromProps(props) {
|
|
18
|
+
if (props.height === void 0) return void 0;
|
|
19
|
+
return { height: props.height };
|
|
20
|
+
}
|
|
21
|
+
function pickGalleryProps(props, api) {
|
|
22
|
+
const onRename = props.onRename ?? (api ? (f, name) => api.rename(f.id, name) : void 0);
|
|
23
|
+
const onMetadataChange = props.onMetadataChange ?? (api ? (f, m) => api.setMetadata(f.id, m) : void 0);
|
|
24
|
+
return {
|
|
25
|
+
progressVariant: props.progressVariant,
|
|
26
|
+
progressSize: props.progressSize,
|
|
27
|
+
previewable: props.previewable,
|
|
28
|
+
editable: props.editable,
|
|
29
|
+
scrollAfter: props.scrollAfter,
|
|
30
|
+
maxHeight: props.maxHeight,
|
|
31
|
+
onRename,
|
|
32
|
+
onMetadataChange
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function MinimalModern({ className, label, hint, ...opts }) {
|
|
36
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
37
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
38
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkVVMPVTIX_cjs.cn("flex flex-col gap-3", className), style: containerStyleFromProps(opts), children: [
|
|
39
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
...api.getRootProps(),
|
|
43
|
+
style: surfaceStyleFromProps(opts),
|
|
44
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
45
|
+
"group flex flex-col items-center justify-center gap-2 rounded-xl border-2 border-dashed border-rup-border bg-rup-bg p-8 text-center transition-all hover:border-rup-accent/60 hover:bg-rup-accent/5",
|
|
46
|
+
api.isDragAccept && "border-rup-accent bg-rup-accent/10 scale-[1.01]"
|
|
47
|
+
),
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
50
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-rup-accent/10 text-rup-accent", children: /* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 22, height: 22 }) }),
|
|
51
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-rup-fg", children: label ?? t.dragOrClick }),
|
|
52
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-rup-muted", children: hint })
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
57
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
58
|
+
{
|
|
59
|
+
...pickGalleryProps(opts, api),
|
|
60
|
+
files: api.files,
|
|
61
|
+
onRemove: (f) => api.remove(f.id),
|
|
62
|
+
onRetry: (f) => api.retry(f.id)
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] });
|
|
66
|
+
}
|
|
67
|
+
function MinimalGlass({ className, label, hint, ...opts }) {
|
|
68
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
69
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
70
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkVVMPVTIX_cjs.cn("flex flex-col gap-3", className), style: containerStyleFromProps(opts), children: [
|
|
71
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
72
|
+
"div",
|
|
73
|
+
{
|
|
74
|
+
...api.getRootProps(),
|
|
75
|
+
style: surfaceStyleFromProps(opts),
|
|
76
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
77
|
+
"relative overflow-hidden rounded-2xl border border-white/20 bg-white/10 p-10 text-center backdrop-blur-xl shadow-lg transition-all hover:bg-white/20",
|
|
78
|
+
api.isDragAccept && "bg-white/25 scale-[1.01]"
|
|
79
|
+
),
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
82
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0 bg-gradient-to-br from-rup-accent/20 via-transparent to-pink-500/20" }),
|
|
83
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-col items-center gap-3", children: [
|
|
84
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-14 w-14 items-center justify-center rounded-full bg-white/30 text-white backdrop-blur", children: /* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 26, height: 26 }) }),
|
|
85
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-semibold text-white", children: label ?? t.dragOrClick }),
|
|
86
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-white/70", children: hint })
|
|
87
|
+
] })
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
92
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
93
|
+
{
|
|
94
|
+
...pickGalleryProps(opts, api),
|
|
95
|
+
files: api.files,
|
|
96
|
+
onRemove: (f) => api.remove(f.id)
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
] });
|
|
100
|
+
}
|
|
101
|
+
function MinimalNeumorphic({ className, label, hint, ...opts }) {
|
|
102
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
103
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
104
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkVVMPVTIX_cjs.cn("flex flex-col gap-3", className), style: containerStyleFromProps(opts), children: [
|
|
105
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
...api.getRootProps(),
|
|
109
|
+
style: surfaceStyleFromProps(opts),
|
|
110
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
111
|
+
"rounded-3xl bg-slate-100 p-10 text-center transition-all dark:bg-slate-800",
|
|
112
|
+
"[box-shadow:inset_8px_8px_16px_rgb(0_0_0_/_0.08),inset_-8px_-8px_16px_rgb(255_255_255_/_0.7)]",
|
|
113
|
+
"dark:[box-shadow:inset_8px_8px_16px_rgb(0_0_0_/_0.4),inset_-8px_-8px_16px_rgb(255_255_255_/_0.05)]",
|
|
114
|
+
api.isDragAccept && "ring-2 ring-rup-accent/40"
|
|
115
|
+
),
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
118
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 text-rup-accent shadow-[8px_8px_16px_rgb(0_0_0_/_0.08),-8px_-8px_16px_rgb(255_255_255_/_0.7)] dark:bg-slate-800 dark:shadow-[8px_8px_16px_rgb(0_0_0_/_0.4),-8px_-8px_16px_rgb(255_255_255_/_0.05)]", children: /* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 28, height: 28 }) }),
|
|
119
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-4 text-sm font-medium text-slate-700 dark:text-slate-200", children: label ?? t.dragOrClick }),
|
|
120
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: hint })
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
125
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
126
|
+
{
|
|
127
|
+
...pickGalleryProps(opts, api),
|
|
128
|
+
files: api.files,
|
|
129
|
+
onRemove: (f) => api.remove(f.id)
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
] });
|
|
133
|
+
}
|
|
134
|
+
function MinimalMaterial({ className, label, hint, ...opts }) {
|
|
135
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
136
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
137
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkVVMPVTIX_cjs.cn("flex flex-col gap-3", className), style: containerStyleFromProps(opts), children: [
|
|
138
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
139
|
+
"div",
|
|
140
|
+
{
|
|
141
|
+
...api.getRootProps(),
|
|
142
|
+
style: surfaceStyleFromProps(opts),
|
|
143
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
144
|
+
"flex items-center gap-4 rounded-2xl border border-rup-border bg-rup-bg p-5 shadow-rup transition-all hover:shadow-lg",
|
|
145
|
+
api.isDragAccept && "border-rup-accent ring-2 ring-rup-accent/30"
|
|
146
|
+
),
|
|
147
|
+
children: [
|
|
148
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
149
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-rup-accent/15 text-rup-accent", children: /* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.FolderIcon, { width: 26, height: 26 }) }),
|
|
150
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 text-left", children: [
|
|
151
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-semibold text-rup-fg", children: label ?? t.dragOrClick }),
|
|
152
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-rup-muted", children: hint })
|
|
153
|
+
] }),
|
|
154
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
155
|
+
"button",
|
|
156
|
+
{
|
|
157
|
+
type: "button",
|
|
158
|
+
onClick: (e) => {
|
|
159
|
+
e.stopPropagation();
|
|
160
|
+
api.open();
|
|
161
|
+
},
|
|
162
|
+
className: "rounded-full bg-rup-accent px-4 py-2 text-sm font-medium text-rup-accent-fg shadow-sm hover:opacity-90",
|
|
163
|
+
children: t.browse
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
),
|
|
169
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
170
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
171
|
+
{
|
|
172
|
+
...pickGalleryProps(opts, api),
|
|
173
|
+
files: api.files,
|
|
174
|
+
onRemove: (f) => api.remove(f.id)
|
|
175
|
+
}
|
|
176
|
+
)
|
|
177
|
+
] });
|
|
178
|
+
}
|
|
179
|
+
function MinimalInline({ className, label, hint, ...opts }) {
|
|
180
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
181
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
182
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkVVMPVTIX_cjs.cn("flex flex-col gap-2", className), style: containerStyleFromProps(opts), children: [
|
|
183
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
184
|
+
"div",
|
|
185
|
+
{
|
|
186
|
+
...api.getRootProps(),
|
|
187
|
+
style: surfaceStyleFromProps(opts),
|
|
188
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
189
|
+
"flex items-center justify-between gap-3 rounded-rup border border-rup-border bg-rup-bg px-4 py-3 text-sm transition hover:border-rup-accent",
|
|
190
|
+
api.isDragAccept && "border-rup-accent bg-rup-accent/10"
|
|
191
|
+
),
|
|
192
|
+
children: [
|
|
193
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
194
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-rup-muted", children: [
|
|
195
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.ImageIcon, { width: 16, height: 16 }),
|
|
196
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label ?? t.dragOrClick })
|
|
197
|
+
] }),
|
|
198
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-rup-accent", children: t.browse })
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
),
|
|
202
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-rup-muted", children: hint }),
|
|
203
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
204
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
205
|
+
{
|
|
206
|
+
...pickGalleryProps(opts, api),
|
|
207
|
+
files: api.files,
|
|
208
|
+
layout: "compact",
|
|
209
|
+
onRemove: (f) => api.remove(f.id)
|
|
210
|
+
}
|
|
211
|
+
)
|
|
212
|
+
] });
|
|
213
|
+
}
|
|
214
|
+
function BusinessCRM({ className, label, hint, ...opts }) {
|
|
215
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
216
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
217
|
+
const aggregate = chunkVVMPVTIX_cjs.useUploadProgress(api.files);
|
|
218
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkVVMPVTIX_cjs.cn("grid gap-4 rounded-rup border border-rup-border bg-rup-bg p-4 md:grid-cols-[1fr_280px]", className), style: containerStyleFromProps(opts), children: [
|
|
219
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
220
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
221
|
+
"div",
|
|
222
|
+
{
|
|
223
|
+
...api.getRootProps(),
|
|
224
|
+
style: surfaceStyleFromProps(opts),
|
|
225
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
226
|
+
"flex flex-col items-center justify-center gap-2 rounded-rup border-2 border-dashed border-rup-border bg-rup-border/10 p-8 text-center transition-all hover:border-rup-accent",
|
|
227
|
+
api.isDragAccept && "border-rup-accent bg-rup-accent/10"
|
|
228
|
+
),
|
|
229
|
+
children: [
|
|
230
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
231
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 28, height: 28, className: "text-rup-accent" }),
|
|
232
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold text-rup-fg", children: label ?? t.dragOrClick }),
|
|
233
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-rup-muted", children: hint })
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
),
|
|
237
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
238
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
239
|
+
{
|
|
240
|
+
...pickGalleryProps(opts, api),
|
|
241
|
+
files: api.files,
|
|
242
|
+
searchable: true,
|
|
243
|
+
filterable: true,
|
|
244
|
+
onRemove: (f) => api.remove(f.id),
|
|
245
|
+
onRetry: (f) => api.retry(f.id),
|
|
246
|
+
onPause: (f) => api.pause(f.id),
|
|
247
|
+
onResume: (f) => api.resume(f.id)
|
|
248
|
+
}
|
|
249
|
+
)
|
|
250
|
+
] }),
|
|
251
|
+
/* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "rounded-rup border border-rup-border bg-rup-bg p-4 text-sm", children: [
|
|
252
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-semibold uppercase tracking-wide text-rup-muted", children: "Upload summary" }),
|
|
253
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-3 space-y-2", children: [
|
|
254
|
+
/* @__PURE__ */ jsxRuntime.jsx(Stat, { label: t.filesText, value: `${api.files.length}` }),
|
|
255
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
256
|
+
Stat,
|
|
257
|
+
{
|
|
258
|
+
label: "Uploaded",
|
|
259
|
+
value: `${chunkVVMPVTIX_cjs.formatBytes(aggregate.uploaded)} ${t.ofText} ${chunkVVMPVTIX_cjs.formatBytes(aggregate.total)}`
|
|
260
|
+
}
|
|
261
|
+
),
|
|
262
|
+
/* @__PURE__ */ jsxRuntime.jsx(Stat, { label: t.speed, value: chunkVVMPVTIX_cjs.formatSpeed(aggregate.speed) }),
|
|
263
|
+
/* @__PURE__ */ jsxRuntime.jsx(Stat, { label: t.eta, value: chunkVVMPVTIX_cjs.formatEta(aggregate.eta) })
|
|
264
|
+
] }),
|
|
265
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadProgress, { value: aggregate.progress, showLabel: true, className: "mt-4" }),
|
|
266
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 flex flex-col gap-2", children: [
|
|
267
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
268
|
+
"button",
|
|
269
|
+
{
|
|
270
|
+
type: "button",
|
|
271
|
+
onClick: () => void api.start(),
|
|
272
|
+
disabled: aggregate.pending === 0,
|
|
273
|
+
className: "rounded-md bg-rup-accent px-3 py-2 text-sm font-medium text-rup-accent-fg disabled:opacity-50",
|
|
274
|
+
children: "Start upload"
|
|
275
|
+
}
|
|
276
|
+
),
|
|
277
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
278
|
+
"button",
|
|
279
|
+
{
|
|
280
|
+
type: "button",
|
|
281
|
+
onClick: api.removeAll,
|
|
282
|
+
disabled: api.files.length === 0,
|
|
283
|
+
className: "rounded-md border border-rup-border px-3 py-2 text-sm hover:bg-rup-border/30 disabled:opacity-50",
|
|
284
|
+
children: t.removeAll
|
|
285
|
+
}
|
|
286
|
+
)
|
|
287
|
+
] })
|
|
288
|
+
] })
|
|
289
|
+
] });
|
|
290
|
+
}
|
|
291
|
+
function BusinessDashboard({ className, label, hint, ...opts }) {
|
|
292
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
293
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
294
|
+
const aggregate = chunkVVMPVTIX_cjs.useUploadProgress(api.files);
|
|
295
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
296
|
+
"div",
|
|
297
|
+
{
|
|
298
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
299
|
+
"overflow-hidden rounded-rup border border-rup-border bg-rup-bg",
|
|
300
|
+
className
|
|
301
|
+
),
|
|
302
|
+
style: containerStyleFromProps(opts),
|
|
303
|
+
children: [
|
|
304
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex items-center justify-between gap-4 border-b border-rup-border p-4", children: [
|
|
305
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
306
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-rup-fg", children: label ?? "Asset uploads" }),
|
|
307
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-rup-muted", children: hint })
|
|
308
|
+
] }),
|
|
309
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 text-xs text-rup-muted", children: [
|
|
310
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
311
|
+
aggregate.completed,
|
|
312
|
+
"/",
|
|
313
|
+
api.files.length,
|
|
314
|
+
" ",
|
|
315
|
+
t.success.toLowerCase()
|
|
316
|
+
] }),
|
|
317
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadProgress, { value: aggregate.progress, size: 48, variant: "circle", showLabel: true })
|
|
318
|
+
] })
|
|
319
|
+
] }),
|
|
320
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
321
|
+
"div",
|
|
322
|
+
{
|
|
323
|
+
...api.getRootProps(),
|
|
324
|
+
style: surfaceStyleFromProps(opts),
|
|
325
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
326
|
+
"flex min-h-[120px] cursor-pointer items-center justify-center gap-3 bg-rup-border/10 p-6 text-sm text-rup-muted transition hover:bg-rup-border/20",
|
|
327
|
+
api.isDragAccept && "bg-rup-accent/10 text-rup-fg"
|
|
328
|
+
),
|
|
329
|
+
children: [
|
|
330
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
331
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 18, height: 18 }),
|
|
332
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t.dragOrClick })
|
|
333
|
+
]
|
|
334
|
+
}
|
|
335
|
+
),
|
|
336
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
337
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
338
|
+
{
|
|
339
|
+
...pickGalleryProps(opts, api),
|
|
340
|
+
files: api.files,
|
|
341
|
+
layout: "table",
|
|
342
|
+
onRemove: (f) => api.remove(f.id),
|
|
343
|
+
onRetry: (f) => api.retry(f.id),
|
|
344
|
+
onPause: (f) => api.pause(f.id),
|
|
345
|
+
onResume: (f) => api.resume(f.id)
|
|
346
|
+
}
|
|
347
|
+
)
|
|
348
|
+
]
|
|
349
|
+
}
|
|
350
|
+
);
|
|
351
|
+
}
|
|
352
|
+
function BusinessSaaS({ className, label, hint, ...opts }) {
|
|
353
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
354
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
355
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
356
|
+
"div",
|
|
357
|
+
{
|
|
358
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
359
|
+
"overflow-hidden rounded-2xl bg-gradient-to-br from-indigo-600 via-purple-600 to-pink-600 p-1",
|
|
360
|
+
className
|
|
361
|
+
),
|
|
362
|
+
style: containerStyleFromProps(opts),
|
|
363
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl bg-rup-bg p-6", children: [
|
|
364
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
365
|
+
"div",
|
|
366
|
+
{
|
|
367
|
+
...api.getRootProps(),
|
|
368
|
+
style: surfaceStyleFromProps(opts),
|
|
369
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
370
|
+
"flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed border-rup-border p-10 text-center transition-all hover:border-indigo-500",
|
|
371
|
+
api.isDragAccept && "border-indigo-500 bg-indigo-500/5"
|
|
372
|
+
),
|
|
373
|
+
children: [
|
|
374
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
375
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-full bg-gradient-to-br from-indigo-500 to-purple-600 p-3 text-white shadow-lg", children: /* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 26, height: 26 }) }),
|
|
376
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-bold text-rup-fg", children: label ?? "Upload your assets" }),
|
|
377
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-sm text-sm text-rup-muted", children: hint ?? t.dragOrClick }),
|
|
378
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
379
|
+
"button",
|
|
380
|
+
{
|
|
381
|
+
type: "button",
|
|
382
|
+
onClick: (e) => {
|
|
383
|
+
e.stopPropagation();
|
|
384
|
+
api.open();
|
|
385
|
+
},
|
|
386
|
+
className: "mt-2 rounded-full bg-gradient-to-r from-indigo-600 to-purple-600 px-6 py-2 text-sm font-semibold text-white shadow-md hover:opacity-95",
|
|
387
|
+
children: t.browse
|
|
388
|
+
}
|
|
389
|
+
)
|
|
390
|
+
]
|
|
391
|
+
}
|
|
392
|
+
),
|
|
393
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
394
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
395
|
+
{
|
|
396
|
+
...pickGalleryProps(opts, api),
|
|
397
|
+
className: "mt-4",
|
|
398
|
+
files: api.files,
|
|
399
|
+
onRemove: (f) => api.remove(f.id),
|
|
400
|
+
onRetry: (f) => api.retry(f.id)
|
|
401
|
+
}
|
|
402
|
+
)
|
|
403
|
+
] })
|
|
404
|
+
}
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
function Stat({ label, value }) {
|
|
408
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
409
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-xs text-rup-muted", children: label }),
|
|
410
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-xs font-medium tabular-nums text-rup-fg", children: value })
|
|
411
|
+
] });
|
|
412
|
+
}
|
|
413
|
+
function CreativeGradient({ className, label, hint, ...opts }) {
|
|
414
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
415
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
416
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkVVMPVTIX_cjs.cn("flex flex-col gap-3", className), style: containerStyleFromProps(opts), children: [
|
|
417
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
418
|
+
"div",
|
|
419
|
+
{
|
|
420
|
+
...api.getRootProps(),
|
|
421
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
422
|
+
"group relative overflow-hidden rounded-3xl p-1 transition-transform",
|
|
423
|
+
"bg-[conic-gradient(from_var(--rup-angle,0deg),#6366f1,#ec4899,#f59e0b,#6366f1)]",
|
|
424
|
+
api.isDragAccept && "animate-[rup-pulse_1.5s_ease-in-out_infinite]"
|
|
425
|
+
),
|
|
426
|
+
style: {
|
|
427
|
+
["--rup-angle"]: api.isDragAccept ? "180deg" : "0deg",
|
|
428
|
+
...surfaceStyleFromProps(opts)
|
|
429
|
+
},
|
|
430
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
431
|
+
"div",
|
|
432
|
+
{
|
|
433
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
434
|
+
"rounded-[calc(theme(borderRadius.3xl)-4px)] bg-rup-bg p-10 text-center transition-colors",
|
|
435
|
+
api.isDragAccept && "bg-rup-bg/95"
|
|
436
|
+
),
|
|
437
|
+
children: [
|
|
438
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
439
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-gradient-to-br from-indigo-500 via-pink-500 to-amber-500 text-white shadow-lg", children: /* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 26, height: 26 }) }),
|
|
440
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-4 bg-gradient-to-r from-indigo-500 via-pink-500 to-amber-500 bg-clip-text text-lg font-bold text-transparent", children: label ?? t.dragOrClick }),
|
|
441
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-rup-muted", children: hint })
|
|
442
|
+
]
|
|
443
|
+
}
|
|
444
|
+
)
|
|
445
|
+
}
|
|
446
|
+
),
|
|
447
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
448
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
449
|
+
{
|
|
450
|
+
...pickGalleryProps(opts, api),
|
|
451
|
+
files: api.files,
|
|
452
|
+
layout: "grid",
|
|
453
|
+
onRemove: (f) => api.remove(f.id)
|
|
454
|
+
}
|
|
455
|
+
)
|
|
456
|
+
] });
|
|
457
|
+
}
|
|
458
|
+
function CreativeAnimated({ className, label, hint, ...opts }) {
|
|
459
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
460
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
461
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkVVMPVTIX_cjs.cn("flex flex-col gap-3", className), style: containerStyleFromProps(opts), children: [
|
|
462
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
463
|
+
"div",
|
|
464
|
+
{
|
|
465
|
+
...api.getRootProps(),
|
|
466
|
+
style: surfaceStyleFromProps(opts),
|
|
467
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
468
|
+
"relative overflow-hidden rounded-2xl border-2 border-dashed border-rup-border bg-rup-bg p-10 text-center transition-all duration-300",
|
|
469
|
+
"hover:border-rup-accent hover:shadow-xl hover:scale-[1.02]",
|
|
470
|
+
api.isDragAccept && "border-rup-accent bg-rup-accent/5 scale-[1.04] shadow-2xl"
|
|
471
|
+
),
|
|
472
|
+
children: [
|
|
473
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
474
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
475
|
+
"div",
|
|
476
|
+
{
|
|
477
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
478
|
+
"mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-full bg-rup-accent/15 text-rup-accent transition-all duration-300",
|
|
479
|
+
api.isDragAccept && "scale-125 rotate-12"
|
|
480
|
+
),
|
|
481
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 30, height: 30 })
|
|
482
|
+
}
|
|
483
|
+
),
|
|
484
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-semibold text-rup-fg", children: label ?? t.dragOrClick }),
|
|
485
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-rup-muted", children: hint })
|
|
486
|
+
]
|
|
487
|
+
}
|
|
488
|
+
),
|
|
489
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
490
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
491
|
+
{
|
|
492
|
+
...pickGalleryProps(opts, api),
|
|
493
|
+
files: api.files,
|
|
494
|
+
layout: "grid",
|
|
495
|
+
onRemove: (f) => api.remove(f.id)
|
|
496
|
+
}
|
|
497
|
+
)
|
|
498
|
+
] });
|
|
499
|
+
}
|
|
500
|
+
function CreativePremium({ className, label, hint, ...opts }) {
|
|
501
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
502
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
503
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
504
|
+
"div",
|
|
505
|
+
{
|
|
506
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
507
|
+
"overflow-hidden rounded-3xl border border-rup-border bg-gradient-to-b from-rup-bg to-rup-border/20 shadow-rup",
|
|
508
|
+
className
|
|
509
|
+
),
|
|
510
|
+
style: containerStyleFromProps(opts),
|
|
511
|
+
children: [
|
|
512
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
513
|
+
"div",
|
|
514
|
+
{
|
|
515
|
+
...api.getRootProps(),
|
|
516
|
+
style: surfaceStyleFromProps(opts),
|
|
517
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
518
|
+
"relative flex flex-col items-center justify-center gap-3 p-12 text-center transition-all",
|
|
519
|
+
api.isDragAccept && "bg-rup-accent/5"
|
|
520
|
+
),
|
|
521
|
+
children: [
|
|
522
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
523
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 -z-10 bg-[radial-gradient(circle_at_50%_0%,rgba(99,102,241,0.18),transparent_60%)]" }),
|
|
524
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-20 w-20 items-center justify-center rounded-2xl bg-gradient-to-br from-rup-accent to-purple-500 text-white shadow-2xl", children: /* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.ImageIcon, { width: 36, height: 36 }) }),
|
|
525
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl font-bold text-rup-fg", children: label ?? "Drop something beautiful" }),
|
|
526
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-md text-sm text-rup-muted", children: hint ?? t.dragOrClick }),
|
|
527
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
528
|
+
"button",
|
|
529
|
+
{
|
|
530
|
+
type: "button",
|
|
531
|
+
onClick: (e) => {
|
|
532
|
+
e.stopPropagation();
|
|
533
|
+
api.open();
|
|
534
|
+
},
|
|
535
|
+
className: "mt-2 rounded-full border border-rup-border bg-rup-bg px-5 py-2 text-sm font-medium text-rup-fg shadow-sm hover:bg-rup-border/30",
|
|
536
|
+
children: t.browse
|
|
537
|
+
}
|
|
538
|
+
)
|
|
539
|
+
]
|
|
540
|
+
}
|
|
541
|
+
),
|
|
542
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-rup-border p-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
543
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
544
|
+
{
|
|
545
|
+
...pickGalleryProps(opts, api),
|
|
546
|
+
files: api.files,
|
|
547
|
+
layout: "grid",
|
|
548
|
+
onRemove: (f) => api.remove(f.id)
|
|
549
|
+
}
|
|
550
|
+
) })
|
|
551
|
+
]
|
|
552
|
+
}
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
function CreativeAvatar({ className, label, ...opts }) {
|
|
556
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
557
|
+
const api = chunkVVMPVTIX_cjs.useDropzone({ multiple: false, accept: "image/*", ...opts });
|
|
558
|
+
const preview = api.files[0]?.previewUrl;
|
|
559
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkVVMPVTIX_cjs.cn("flex flex-col items-center gap-2", className), style: containerStyleFromProps(opts), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
560
|
+
"div",
|
|
561
|
+
{
|
|
562
|
+
...api.getRootProps(),
|
|
563
|
+
style: surfaceStyleFromProps(opts),
|
|
564
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
565
|
+
"group relative flex h-32 w-32 items-center justify-center overflow-hidden rounded-full border-2 border-dashed border-rup-border bg-rup-border/10 transition-all hover:border-rup-accent",
|
|
566
|
+
api.isDragAccept && "border-rup-accent bg-rup-accent/10"
|
|
567
|
+
),
|
|
568
|
+
children: [
|
|
569
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
570
|
+
preview ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: preview, alt: "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.ImageIcon, { width: 32, height: 32, className: "text-rup-muted" }),
|
|
571
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-0 flex items-center justify-center bg-black/40 text-xs font-medium text-white opacity-0 transition-opacity group-hover:opacity-100", children: label ?? t.browse })
|
|
572
|
+
]
|
|
573
|
+
}
|
|
574
|
+
) });
|
|
575
|
+
}
|
|
576
|
+
function EnterpriseDocs({ className, label, hint, ...opts }) {
|
|
577
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
578
|
+
const api = chunkVVMPVTIX_cjs.useDropzone({ multiple: true, ...opts });
|
|
579
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
580
|
+
"div",
|
|
581
|
+
{
|
|
582
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
583
|
+
"overflow-hidden rounded-rup border border-rup-border bg-rup-bg shadow-rup",
|
|
584
|
+
className
|
|
585
|
+
),
|
|
586
|
+
style: containerStyleFromProps(opts),
|
|
587
|
+
children: [
|
|
588
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "border-b border-rup-border bg-rup-border/10 px-5 py-3", children: [
|
|
589
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-rup-fg", children: label ?? "Document upload" }),
|
|
590
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-xs text-rup-muted", children: hint })
|
|
591
|
+
] }),
|
|
592
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
593
|
+
"div",
|
|
594
|
+
{
|
|
595
|
+
...api.getRootProps(),
|
|
596
|
+
style: surfaceStyleFromProps(opts),
|
|
597
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
598
|
+
"flex items-center gap-3 border-b border-rup-border bg-rup-border/5 px-5 py-4 text-sm transition hover:bg-rup-border/15",
|
|
599
|
+
api.isDragAccept && "bg-rup-accent/10"
|
|
600
|
+
),
|
|
601
|
+
children: [
|
|
602
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
603
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 18, height: 18, className: "text-rup-accent" }),
|
|
604
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-rup-fg", children: t.dragOrClick }),
|
|
605
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
606
|
+
"button",
|
|
607
|
+
{
|
|
608
|
+
type: "button",
|
|
609
|
+
onClick: (e) => {
|
|
610
|
+
e.stopPropagation();
|
|
611
|
+
api.open();
|
|
612
|
+
},
|
|
613
|
+
className: "rounded-md border border-rup-border bg-rup-bg px-3 py-1.5 text-xs hover:bg-rup-border/30",
|
|
614
|
+
children: t.browse
|
|
615
|
+
}
|
|
616
|
+
)
|
|
617
|
+
]
|
|
618
|
+
}
|
|
619
|
+
),
|
|
620
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
621
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
622
|
+
{
|
|
623
|
+
...pickGalleryProps(opts, api),
|
|
624
|
+
files: api.files,
|
|
625
|
+
layout: "table",
|
|
626
|
+
searchable: true,
|
|
627
|
+
filterable: true,
|
|
628
|
+
onRemove: (f) => api.remove(f.id),
|
|
629
|
+
onRetry: (f) => api.retry(f.id),
|
|
630
|
+
onPause: (f) => api.pause(f.id),
|
|
631
|
+
onResume: (f) => api.resume(f.id)
|
|
632
|
+
}
|
|
633
|
+
)
|
|
634
|
+
]
|
|
635
|
+
}
|
|
636
|
+
);
|
|
637
|
+
}
|
|
638
|
+
function EnterpriseTeam({ className, label, hint, ...opts }) {
|
|
639
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
640
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
641
|
+
const aggregate = chunkVVMPVTIX_cjs.useUploadProgress(api.files);
|
|
642
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
643
|
+
"div",
|
|
644
|
+
{
|
|
645
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
646
|
+
"rounded-rup border border-rup-border bg-rup-bg p-5 shadow-rup",
|
|
647
|
+
className
|
|
648
|
+
),
|
|
649
|
+
style: containerStyleFromProps(opts),
|
|
650
|
+
children: [
|
|
651
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
652
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
653
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-rup-fg", children: label ?? "Team upload" }),
|
|
654
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-rup-muted", children: hint })
|
|
655
|
+
] }),
|
|
656
|
+
aggregate.uploading > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadProgress, { value: aggregate.progress, size: 36, variant: "circle" })
|
|
657
|
+
] }),
|
|
658
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
659
|
+
"div",
|
|
660
|
+
{
|
|
661
|
+
...api.getRootProps(),
|
|
662
|
+
style: surfaceStyleFromProps(opts),
|
|
663
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
664
|
+
"mt-4 flex items-center justify-between gap-3 rounded-rup border-2 border-dashed border-rup-border px-4 py-6 transition hover:border-rup-accent/60",
|
|
665
|
+
api.isDragAccept && "border-rup-accent bg-rup-accent/5"
|
|
666
|
+
),
|
|
667
|
+
children: [
|
|
668
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
669
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 text-sm text-rup-muted", children: [
|
|
670
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.FolderIcon, { width: 20, height: 20 }),
|
|
671
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t.dragOrClick })
|
|
672
|
+
] }),
|
|
673
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-rup-accent", children: t.browse })
|
|
674
|
+
]
|
|
675
|
+
}
|
|
676
|
+
),
|
|
677
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
678
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
679
|
+
{
|
|
680
|
+
...pickGalleryProps(opts, api),
|
|
681
|
+
className: "mt-4",
|
|
682
|
+
files: api.files,
|
|
683
|
+
onRemove: (f) => api.remove(f.id),
|
|
684
|
+
onRetry: (f) => api.retry(f.id)
|
|
685
|
+
}
|
|
686
|
+
),
|
|
687
|
+
aggregate.uploading > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex items-center justify-between text-xs text-rup-muted", children: [
|
|
688
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
689
|
+
aggregate.uploading,
|
|
690
|
+
" ",
|
|
691
|
+
t.uploading.toLowerCase(),
|
|
692
|
+
" \xB7",
|
|
693
|
+
" ",
|
|
694
|
+
chunkVVMPVTIX_cjs.formatBytes(aggregate.uploaded),
|
|
695
|
+
" ",
|
|
696
|
+
t.ofText,
|
|
697
|
+
" ",
|
|
698
|
+
chunkVVMPVTIX_cjs.formatBytes(aggregate.total)
|
|
699
|
+
] }),
|
|
700
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: chunkVVMPVTIX_cjs.formatEta(aggregate.eta) })
|
|
701
|
+
] })
|
|
702
|
+
]
|
|
703
|
+
}
|
|
704
|
+
);
|
|
705
|
+
}
|
|
706
|
+
function EnterpriseMediaLibrary({ className, label, hint, ...opts }) {
|
|
707
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
708
|
+
const api = chunkVVMPVTIX_cjs.useDropzone({ accept: "image/*,video/*", ...opts });
|
|
709
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkVVMPVTIX_cjs.cn("flex flex-col gap-3", className), style: containerStyleFromProps(opts), children: [
|
|
710
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
711
|
+
"div",
|
|
712
|
+
{
|
|
713
|
+
...api.getRootProps(),
|
|
714
|
+
style: surfaceStyleFromProps(opts),
|
|
715
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
716
|
+
"flex flex-col items-center justify-center gap-2 rounded-rup border-2 border-dashed border-rup-border bg-rup-bg p-8 text-center transition hover:border-rup-accent",
|
|
717
|
+
api.isDragAccept && "border-rup-accent bg-rup-accent/5"
|
|
718
|
+
),
|
|
719
|
+
children: [
|
|
720
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
721
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 22, height: 22, className: "text-rup-accent" }),
|
|
722
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium text-rup-fg", children: label ?? "Add media" }),
|
|
723
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-rup-muted", children: hint })
|
|
724
|
+
]
|
|
725
|
+
}
|
|
726
|
+
),
|
|
727
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
728
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
729
|
+
{
|
|
730
|
+
...pickGalleryProps(opts, api),
|
|
731
|
+
files: api.files,
|
|
732
|
+
layout: "grid",
|
|
733
|
+
reorderable: true,
|
|
734
|
+
onReorder: api.reorder,
|
|
735
|
+
searchable: true,
|
|
736
|
+
onRemove: (f) => api.remove(f.id),
|
|
737
|
+
onRetry: (f) => api.retry(f.id)
|
|
738
|
+
}
|
|
739
|
+
)
|
|
740
|
+
] });
|
|
741
|
+
}
|
|
742
|
+
function EnterpriseFullscreen({
|
|
743
|
+
className,
|
|
744
|
+
label,
|
|
745
|
+
hint,
|
|
746
|
+
...opts
|
|
747
|
+
}) {
|
|
748
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
749
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
750
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkVVMPVTIX_cjs.cn("flex flex-col gap-3", className), style: containerStyleFromProps(opts), children: [
|
|
751
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
752
|
+
"div",
|
|
753
|
+
{
|
|
754
|
+
...api.getRootProps(),
|
|
755
|
+
style: surfaceStyleFromProps(opts),
|
|
756
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
757
|
+
"flex min-h-[60vh] flex-col items-center justify-center gap-4 rounded-2xl border-2 border-dashed border-rup-border bg-rup-bg p-10 text-center transition",
|
|
758
|
+
api.isDragAccept && "border-rup-accent bg-rup-accent/5"
|
|
759
|
+
),
|
|
760
|
+
children: [
|
|
761
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
762
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-20 w-20 items-center justify-center rounded-full bg-rup-accent/15 text-rup-accent", children: /* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 36, height: 36 }) }),
|
|
763
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-bold text-rup-fg", children: label ?? t.dropHere }),
|
|
764
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-md text-sm text-rup-muted", children: hint }),
|
|
765
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
766
|
+
"button",
|
|
767
|
+
{
|
|
768
|
+
type: "button",
|
|
769
|
+
onClick: (e) => {
|
|
770
|
+
e.stopPropagation();
|
|
771
|
+
api.open();
|
|
772
|
+
},
|
|
773
|
+
className: "rounded-full bg-rup-accent px-6 py-3 text-sm font-semibold text-rup-accent-fg hover:opacity-90",
|
|
774
|
+
children: t.browse
|
|
775
|
+
}
|
|
776
|
+
)
|
|
777
|
+
]
|
|
778
|
+
}
|
|
779
|
+
),
|
|
780
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
781
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
782
|
+
{
|
|
783
|
+
...pickGalleryProps(opts, api),
|
|
784
|
+
files: api.files,
|
|
785
|
+
onRemove: (f) => api.remove(f.id)
|
|
786
|
+
}
|
|
787
|
+
)
|
|
788
|
+
] });
|
|
789
|
+
}
|
|
790
|
+
function LayoutBox({ className, label, hint, ...opts }) {
|
|
791
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
792
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
793
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkVVMPVTIX_cjs.cn("flex flex-col gap-3", className), style: containerStyleFromProps(opts), children: [
|
|
794
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
795
|
+
"div",
|
|
796
|
+
{
|
|
797
|
+
...api.getRootProps(),
|
|
798
|
+
style: surfaceStyleFromProps(opts),
|
|
799
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
800
|
+
"flex aspect-square w-full flex-col items-center justify-center gap-2 rounded-2xl border-2 border-rup-border bg-rup-bg p-6 text-center transition hover:border-rup-accent",
|
|
801
|
+
api.isDragAccept && "border-rup-accent bg-rup-accent/5"
|
|
802
|
+
),
|
|
803
|
+
children: [
|
|
804
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
805
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 28, height: 28, className: "text-rup-accent" }),
|
|
806
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-rup-fg", children: label ?? t.dragOrClick }),
|
|
807
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-rup-muted", children: hint })
|
|
808
|
+
]
|
|
809
|
+
}
|
|
810
|
+
),
|
|
811
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
812
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
813
|
+
{
|
|
814
|
+
...pickGalleryProps(opts, api),
|
|
815
|
+
files: api.files,
|
|
816
|
+
onRemove: (f) => api.remove(f.id)
|
|
817
|
+
}
|
|
818
|
+
)
|
|
819
|
+
] });
|
|
820
|
+
}
|
|
821
|
+
function LayoutCard({ className, label, hint, ...opts }) {
|
|
822
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
823
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
824
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
825
|
+
"div",
|
|
826
|
+
{
|
|
827
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
828
|
+
"rounded-2xl border border-rup-border bg-rup-bg p-6 shadow-rup",
|
|
829
|
+
className
|
|
830
|
+
),
|
|
831
|
+
style: containerStyleFromProps(opts),
|
|
832
|
+
children: [
|
|
833
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
834
|
+
"div",
|
|
835
|
+
{
|
|
836
|
+
...api.getRootProps(),
|
|
837
|
+
style: surfaceStyleFromProps(opts),
|
|
838
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
839
|
+
"flex flex-col items-center justify-center gap-2 rounded-xl border-2 border-dashed border-rup-border p-10 text-center transition hover:border-rup-accent",
|
|
840
|
+
api.isDragAccept && "border-rup-accent bg-rup-accent/5"
|
|
841
|
+
),
|
|
842
|
+
children: [
|
|
843
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
844
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 28, height: 28, className: "text-rup-accent" }),
|
|
845
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-semibold text-rup-fg", children: label ?? t.dragOrClick }),
|
|
846
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-rup-muted", children: hint })
|
|
847
|
+
]
|
|
848
|
+
}
|
|
849
|
+
),
|
|
850
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
851
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
852
|
+
{
|
|
853
|
+
...pickGalleryProps(opts, api),
|
|
854
|
+
className: "mt-4",
|
|
855
|
+
files: api.files,
|
|
856
|
+
onRemove: (f) => api.remove(f.id)
|
|
857
|
+
}
|
|
858
|
+
)
|
|
859
|
+
]
|
|
860
|
+
}
|
|
861
|
+
);
|
|
862
|
+
}
|
|
863
|
+
function LayoutSidebar({ className, label, hint, ...opts }) {
|
|
864
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
865
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
866
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkVVMPVTIX_cjs.cn("grid gap-3 md:grid-cols-[240px_1fr]", className), style: containerStyleFromProps(opts), children: [
|
|
867
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
868
|
+
"div",
|
|
869
|
+
{
|
|
870
|
+
...api.getRootProps(),
|
|
871
|
+
style: surfaceStyleFromProps(opts),
|
|
872
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
873
|
+
"flex h-full min-h-[200px] flex-col items-center justify-center gap-2 rounded-rup border-2 border-dashed border-rup-border bg-rup-bg p-4 text-center transition hover:border-rup-accent",
|
|
874
|
+
api.isDragAccept && "border-rup-accent bg-rup-accent/5"
|
|
875
|
+
),
|
|
876
|
+
children: [
|
|
877
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
878
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 22, height: 22, className: "text-rup-accent" }),
|
|
879
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-rup-fg", children: label ?? t.dragOrClick }),
|
|
880
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-rup-muted", children: hint })
|
|
881
|
+
]
|
|
882
|
+
}
|
|
883
|
+
),
|
|
884
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
885
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
886
|
+
{
|
|
887
|
+
...pickGalleryProps(opts, api),
|
|
888
|
+
files: api.files,
|
|
889
|
+
emptyState: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-rup-muted", children: "No files yet." }),
|
|
890
|
+
onRemove: (f) => api.remove(f.id),
|
|
891
|
+
onRetry: (f) => api.retry(f.id)
|
|
892
|
+
}
|
|
893
|
+
)
|
|
894
|
+
] });
|
|
895
|
+
}
|
|
896
|
+
function LayoutModal({ className, label, hint, ...opts }) {
|
|
897
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
898
|
+
const [open, setOpen] = react.useState(false);
|
|
899
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
900
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, style: containerStyleFromProps(opts), children: [
|
|
901
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
902
|
+
"button",
|
|
903
|
+
{
|
|
904
|
+
type: "button",
|
|
905
|
+
onClick: () => setOpen(true),
|
|
906
|
+
className: "inline-flex items-center gap-2 rounded-rup bg-rup-accent px-4 py-2 text-sm font-medium text-rup-accent-fg hover:opacity-90",
|
|
907
|
+
children: [
|
|
908
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 14, height: 14 }),
|
|
909
|
+
label ?? t.browse
|
|
910
|
+
]
|
|
911
|
+
}
|
|
912
|
+
),
|
|
913
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkVVMPVTIX_cjs.UploadModal, { open, onClose: () => setOpen(false), title: t.browse, children: [
|
|
914
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
915
|
+
"div",
|
|
916
|
+
{
|
|
917
|
+
...api.getRootProps(),
|
|
918
|
+
style: surfaceStyleFromProps(opts),
|
|
919
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
920
|
+
"flex min-h-[180px] flex-col items-center justify-center gap-2 rounded-rup border-2 border-dashed border-rup-border bg-rup-bg p-8 text-center transition hover:border-rup-accent",
|
|
921
|
+
api.isDragAccept && "border-rup-accent bg-rup-accent/5"
|
|
922
|
+
),
|
|
923
|
+
children: [
|
|
924
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
925
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 24, height: 24, className: "text-rup-accent" }),
|
|
926
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-rup-fg", children: t.dragOrClick }),
|
|
927
|
+
hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-rup-muted", children: hint })
|
|
928
|
+
]
|
|
929
|
+
}
|
|
930
|
+
),
|
|
931
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
932
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
933
|
+
{
|
|
934
|
+
...pickGalleryProps(opts, api),
|
|
935
|
+
className: "mt-4",
|
|
936
|
+
files: api.files,
|
|
937
|
+
onRemove: (f) => api.remove(f.id)
|
|
938
|
+
}
|
|
939
|
+
)
|
|
940
|
+
] })
|
|
941
|
+
] });
|
|
942
|
+
}
|
|
943
|
+
function LayoutFloating({ className, label, hint, ...opts }) {
|
|
944
|
+
const { t } = chunkVVMPVTIX_cjs.useI18n();
|
|
945
|
+
const [expanded, setExpanded] = react.useState(false);
|
|
946
|
+
const api = chunkVVMPVTIX_cjs.useDropzone(opts);
|
|
947
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
948
|
+
"div",
|
|
949
|
+
{
|
|
950
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
951
|
+
"fixed bottom-4 right-4 z-50 w-80 max-w-[calc(100vw-2rem)] overflow-hidden rounded-rup border border-rup-border bg-rup-bg shadow-rup transition-all",
|
|
952
|
+
expanded ? "h-auto" : "h-12",
|
|
953
|
+
className
|
|
954
|
+
),
|
|
955
|
+
style: containerStyleFromProps(opts),
|
|
956
|
+
children: [
|
|
957
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
958
|
+
"button",
|
|
959
|
+
{
|
|
960
|
+
type: "button",
|
|
961
|
+
onClick: () => setExpanded((e) => !e),
|
|
962
|
+
className: "flex w-full items-center justify-between gap-2 border-b border-rup-border px-4 py-3 text-sm font-medium text-rup-fg hover:bg-rup-border/30",
|
|
963
|
+
children: [
|
|
964
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
|
|
965
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 14, height: 14 }),
|
|
966
|
+
label ?? t.browse
|
|
967
|
+
] }),
|
|
968
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-rup-muted", children: expanded ? "\u25BE" : "\u25B4" })
|
|
969
|
+
]
|
|
970
|
+
}
|
|
971
|
+
),
|
|
972
|
+
expanded && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3", children: [
|
|
973
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
974
|
+
"div",
|
|
975
|
+
{
|
|
976
|
+
...api.getRootProps(),
|
|
977
|
+
style: surfaceStyleFromProps(opts),
|
|
978
|
+
className: chunkVVMPVTIX_cjs.cn(
|
|
979
|
+
"flex min-h-[100px] flex-col items-center justify-center gap-1 rounded-rup border-2 border-dashed border-rup-border text-center text-xs text-rup-muted transition hover:border-rup-accent",
|
|
980
|
+
api.isDragAccept && "border-rup-accent bg-rup-accent/5"
|
|
981
|
+
),
|
|
982
|
+
children: [
|
|
983
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getInputProps() }),
|
|
984
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVVMPVTIX_cjs.UploadIcon, { width: 16, height: 16 }),
|
|
985
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: hint ?? t.dragOrClick })
|
|
986
|
+
]
|
|
987
|
+
}
|
|
988
|
+
),
|
|
989
|
+
api.files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
990
|
+
chunkVVMPVTIX_cjs.UploadGallery,
|
|
991
|
+
{
|
|
992
|
+
...pickGalleryProps(opts, api),
|
|
993
|
+
className: "mt-2 max-h-48 overflow-y-auto",
|
|
994
|
+
files: api.files,
|
|
995
|
+
layout: "compact",
|
|
996
|
+
onRemove: (f) => api.remove(f.id)
|
|
997
|
+
}
|
|
998
|
+
)
|
|
999
|
+
] })
|
|
1000
|
+
]
|
|
1001
|
+
}
|
|
1002
|
+
);
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
exports.BusinessCRM = BusinessCRM;
|
|
1006
|
+
exports.BusinessDashboard = BusinessDashboard;
|
|
1007
|
+
exports.BusinessSaaS = BusinessSaaS;
|
|
1008
|
+
exports.CreativeAnimated = CreativeAnimated;
|
|
1009
|
+
exports.CreativeAvatar = CreativeAvatar;
|
|
1010
|
+
exports.CreativeGradient = CreativeGradient;
|
|
1011
|
+
exports.CreativePremium = CreativePremium;
|
|
1012
|
+
exports.EnterpriseDocs = EnterpriseDocs;
|
|
1013
|
+
exports.EnterpriseFullscreen = EnterpriseFullscreen;
|
|
1014
|
+
exports.EnterpriseMediaLibrary = EnterpriseMediaLibrary;
|
|
1015
|
+
exports.EnterpriseTeam = EnterpriseTeam;
|
|
1016
|
+
exports.LayoutBox = LayoutBox;
|
|
1017
|
+
exports.LayoutCard = LayoutCard;
|
|
1018
|
+
exports.LayoutFloating = LayoutFloating;
|
|
1019
|
+
exports.LayoutModal = LayoutModal;
|
|
1020
|
+
exports.LayoutSidebar = LayoutSidebar;
|
|
1021
|
+
exports.MinimalGlass = MinimalGlass;
|
|
1022
|
+
exports.MinimalInline = MinimalInline;
|
|
1023
|
+
exports.MinimalMaterial = MinimalMaterial;
|
|
1024
|
+
exports.MinimalModern = MinimalModern;
|
|
1025
|
+
exports.MinimalNeumorphic = MinimalNeumorphic;
|
|
1026
|
+
exports.pickGalleryProps = pickGalleryProps;
|
|
1027
|
+
//# sourceMappingURL=index.cjs.map
|
|
1028
|
+
//# sourceMappingURL=index.cjs.map
|