@aivex/ui 1.1.0-dev.27 → 1.1.0-dev.28
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/components/UploadArea/UploadArea.d.ts +7 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +28 -20
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15807,7 +15807,7 @@ function Sb({ groups: e, value: t, placeholder: n = "", disabled: r = !1, size:
|
|
|
15807
15807
|
className: U("aivex:flex aivex:flex-col aivex:gap-xs aivex:w-full", s),
|
|
15808
15808
|
children: [
|
|
15809
15809
|
c && /* @__PURE__ */ m("span", {
|
|
15810
|
-
className: U("aivex:text-label-md aivex:text-text-secondary", r && "aivex:opacity-disable"),
|
|
15810
|
+
className: U("aivex:text-label-md aivex:text-text-secondary", !r && u && "aivex:text-text-danger", r && "aivex:opacity-disable"),
|
|
15811
15811
|
children: c
|
|
15812
15812
|
}),
|
|
15813
15813
|
/* @__PURE__ */ h(vb, {
|
|
@@ -17204,24 +17204,24 @@ function LS({ className: e, formats: t = [
|
|
|
17204
17204
|
"bmp",
|
|
17205
17205
|
"png",
|
|
17206
17206
|
"json"
|
|
17207
|
-
], maxSize: n = "800MB", accept: r,
|
|
17208
|
-
let [
|
|
17207
|
+
], maxSize: n = "800MB", accept: r, title: i = "Drag and drop here", formatsLabel: a = "Formats", maxSizeLabel: o = "Max size", fileButtonLabel: s = "File", folderButtonLabel: c = "Folder", showFolder: l = !0, onFileSelect: u, onFolderSelect: p, ref: g, ..._ }) {
|
|
17208
|
+
let [v, y] = f(!1), b = d(null), x = d(null), S = d(0);
|
|
17209
17209
|
return /* @__PURE__ */ h("div", {
|
|
17210
|
-
ref:
|
|
17211
|
-
className: U("aivex:flex aivex:flex-col aivex:items-center aivex:justify-center aivex:p-[48px] aivex:rounded-[8px] aivex:border-2 aivex:border-dashed aivex:transition-colors",
|
|
17210
|
+
ref: g,
|
|
17211
|
+
className: U("aivex:flex aivex:flex-col aivex:items-center aivex:justify-center aivex:p-[48px] aivex:rounded-[8px] aivex:border-2 aivex:border-dashed aivex:transition-colors", v ? "aivex:bg-[rgba(0,86,216,0.08)] aivex:border-[#99bef6]" : "aivex:border-[#c1c3d2]", e),
|
|
17212
17212
|
onDragEnter: (e) => {
|
|
17213
|
-
e.preventDefault(),
|
|
17213
|
+
e.preventDefault(), S.current++, y(!0);
|
|
17214
17214
|
},
|
|
17215
17215
|
onDragLeave: (e) => {
|
|
17216
|
-
e.preventDefault(),
|
|
17216
|
+
e.preventDefault(), S.current--, S.current === 0 && y(!1);
|
|
17217
17217
|
},
|
|
17218
17218
|
onDragOver: (e) => {
|
|
17219
17219
|
e.preventDefault();
|
|
17220
17220
|
},
|
|
17221
17221
|
onDrop: (e) => {
|
|
17222
|
-
e.preventDefault(),
|
|
17222
|
+
e.preventDefault(), S.current = 0, y(!1), e.dataTransfer.files.length > 0 && u?.(e.dataTransfer.files);
|
|
17223
17223
|
},
|
|
17224
|
-
...
|
|
17224
|
+
..._,
|
|
17225
17225
|
children: [
|
|
17226
17226
|
/* @__PURE__ */ h("div", {
|
|
17227
17227
|
className: "aivex:flex aivex:flex-col aivex:items-center aivex:gap-6",
|
|
@@ -17234,50 +17234,58 @@ function LS({ className: e, formats: t = [
|
|
|
17234
17234
|
className: "aivex:flex aivex:flex-col aivex:items-center aivex:gap-1",
|
|
17235
17235
|
children: [/* @__PURE__ */ m("p", {
|
|
17236
17236
|
className: "aivex:text-[18px] aivex:font-medium aivex:text-text-primary aivex:leading-[26px] aivex:tracking-[-0.1px]",
|
|
17237
|
-
children:
|
|
17237
|
+
children: i
|
|
17238
17238
|
}), /* @__PURE__ */ h("div", {
|
|
17239
17239
|
className: "aivex:flex aivex:items-center aivex:gap-3 aivex:px-4 aivex:text-sm aivex:font-normal aivex:text-text-brand",
|
|
17240
|
-
children: [/* @__PURE__ */ h("span", { children: [
|
|
17240
|
+
children: [/* @__PURE__ */ h("span", { children: [
|
|
17241
|
+
a,
|
|
17242
|
+
" : ",
|
|
17243
|
+
t.join(", ")
|
|
17244
|
+
] }), /* @__PURE__ */ h("span", { children: [
|
|
17245
|
+
o,
|
|
17246
|
+
" : ",
|
|
17247
|
+
n
|
|
17248
|
+
] })]
|
|
17241
17249
|
})]
|
|
17242
17250
|
})]
|
|
17243
17251
|
}), /* @__PURE__ */ h("div", {
|
|
17244
17252
|
className: "aivex:flex aivex:gap-2",
|
|
17245
17253
|
children: [/* @__PURE__ */ h("button", {
|
|
17246
17254
|
type: "button",
|
|
17247
|
-
onClick: () =>
|
|
17255
|
+
onClick: () => b.current?.click(),
|
|
17248
17256
|
className: "aivex:relative aivex:overflow-hidden aivex:group aivex:flex aivex:items-center aivex:gap-xs aivex:h-8 aivex:px-md aivex:rounded-md aivex:bg-bg-tertiary aivex:text-text-primary aivex:text-sm aivex:font-medium aivex:tracking-[0.1px]",
|
|
17249
17257
|
children: [
|
|
17250
17258
|
/* @__PURE__ */ m(W, {}),
|
|
17251
17259
|
/* @__PURE__ */ m(Cu, { size: 16 }),
|
|
17252
|
-
|
|
17260
|
+
s
|
|
17253
17261
|
]
|
|
17254
|
-
}), /* @__PURE__ */ h("button", {
|
|
17262
|
+
}), l && /* @__PURE__ */ h("button", {
|
|
17255
17263
|
type: "button",
|
|
17256
|
-
onClick: () =>
|
|
17264
|
+
onClick: () => x.current?.click(),
|
|
17257
17265
|
className: "aivex:relative aivex:overflow-hidden aivex:group aivex:flex aivex:items-center aivex:gap-xs aivex:h-8 aivex:px-md aivex:rounded-md aivex:bg-bg-tertiary aivex:text-text-primary aivex:text-sm aivex:font-medium aivex:tracking-[0.1px]",
|
|
17258
17266
|
children: [
|
|
17259
17267
|
/* @__PURE__ */ m(W, {}),
|
|
17260
17268
|
/* @__PURE__ */ m(Du, { size: 16 }),
|
|
17261
|
-
|
|
17269
|
+
c
|
|
17262
17270
|
]
|
|
17263
17271
|
})]
|
|
17264
17272
|
})]
|
|
17265
17273
|
}),
|
|
17266
17274
|
/* @__PURE__ */ m("input", {
|
|
17267
|
-
ref:
|
|
17275
|
+
ref: b,
|
|
17268
17276
|
type: "file",
|
|
17269
17277
|
multiple: !0,
|
|
17270
17278
|
accept: r,
|
|
17271
17279
|
className: "aivex:hidden",
|
|
17272
|
-
onChange: (e) => e.target.files &&
|
|
17280
|
+
onChange: (e) => e.target.files && u?.(e.target.files)
|
|
17273
17281
|
}),
|
|
17274
17282
|
/* @__PURE__ */ m("input", {
|
|
17275
|
-
ref:
|
|
17283
|
+
ref: x,
|
|
17276
17284
|
type: "file",
|
|
17277
17285
|
multiple: !0,
|
|
17278
17286
|
webkitdirectory: "",
|
|
17279
17287
|
className: "aivex:hidden",
|
|
17280
|
-
onChange: (e) => e.target.files &&
|
|
17288
|
+
onChange: (e) => e.target.files && p?.(e.target.files)
|
|
17281
17289
|
})
|
|
17282
17290
|
]
|
|
17283
17291
|
});
|