welcome-ui 0.0.0-dev.1763389246174 → 0.0.0-dev.1763736449682
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/2W3RN7C5-DMC82gDP.js +61 -0
- package/dist/{4I4MLMKD-z3Xm3qCo.js → 4I4MLMKD-BO6Lcy7s.js} +17 -17
- package/dist/Accordion.js +11 -10
- package/dist/Alert.js +39 -31
- package/dist/Avatar.js +12 -11
- package/dist/{B7UTNDHN-BDa2-8JK.js → B7UTNDHN-BghjolIs.js} +30 -30
- package/dist/Breadcrumb.js +75 -71
- package/dist/Button.css +1 -1
- package/dist/Button.js +42 -41
- package/dist/ButtonGroup.js +5 -4
- package/dist/Card.css +1 -1
- package/dist/Card.js +67 -15
- package/dist/Checkbox.js +29 -29
- package/dist/CloseButton.js +6 -5
- package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
- package/dist/{DSAASPLT-C-2xDjIv.js → DSAASPLT-Fx1kuAsk.js} +3 -3
- package/dist/DatePicker.js +81 -78
- package/dist/DateTimePicker.js +22 -21
- package/dist/Drawer.js +100 -80
- package/dist/DropdownMenu.css +1 -1
- package/dist/DropdownMenu.js +898 -462
- package/dist/FieldGroup.js +8 -7
- package/dist/FileDrop.js +183 -176
- package/dist/FileUpload.js +42 -40
- package/dist/{GVVKDT6A-C66-lr0B.js → GVVKDT6A-CF9ejW_c.js} +103 -103
- package/dist/Hint.js +8 -7
- package/dist/Icon.js +20 -15
- package/dist/InputText.css +1 -1
- package/dist/InputText.js +63 -62
- package/dist/{KPUWHTQJ-Byij2al4.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
- package/dist/Label.js +8 -7
- package/dist/Link.css +1 -1
- package/dist/Link.js +51 -48
- package/dist/Loader.js +11 -10
- package/dist/Logo.js +20 -13
- package/dist/Modal.js +144 -114
- package/dist/{NI3IVY7K-DpF3td-7.js → NI3IVY7K-Dy240mkD.js} +160 -160
- package/dist/{NMGNQVTG-BgAqqGOq.js → NMGNQVTG-DRO2uXZT.js} +6 -6
- package/dist/{OE2EFRVA-DkdhQLJL.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
- package/dist/{OLVWQA7U-wHytlFYu.js → OLVWQA7U-Dia3UUnG.js} +36 -36
- package/dist/Pagination.js +38 -37
- package/dist/PasswordInput.js +20 -17
- package/dist/Popover.js +88 -72
- package/dist/{RTNCFSKZ-LcIdBwa8.js → RTNCFSKZ-BywELldk.js} +42 -42
- package/dist/Radio.js +19 -19
- package/dist/RadioGroup.js +28 -27
- package/dist/RadioTab.js +1 -1
- package/dist/{SBSPVDDI-BoxPz2JY.js → SBSPVDDI-CmtnvvUX.js} +46 -46
- package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
- package/dist/Search.css +1 -1
- package/dist/Search.js +107 -101
- package/dist/Select.css +1 -1
- package/dist/Select.js +203 -202
- package/dist/Slider.js +65 -61
- package/dist/Stepper.js +33 -27
- package/dist/StickyNote.js +29 -23
- package/dist/Swiper.js +51 -50
- package/dist/{T22PY7TE-CzEDuEn1.js → T22PY7TE-gLuJpoOm.js} +46 -46
- package/dist/Table.js +33 -21
- package/dist/Tabs.js +160 -152
- package/dist/Tag.css +1 -1
- package/dist/Tag.js +69 -65
- package/dist/Text.js +3 -2
- package/dist/Textarea.css +1 -1
- package/dist/Textarea.js +25 -18
- package/dist/TimePicker.js +22 -21
- package/dist/Toast.js +226 -201
- package/dist/Toggle.js +15 -14
- package/dist/Tooltip.js +28 -27
- package/dist/VariantIcon.js +6 -5
- package/dist/VisuallyHidden.js +7 -6
- package/dist/WelcomeLoader.js +3 -2
- package/dist/XCKGTAUF-CJwwVibW.js +25 -0
- package/dist/{Y67KZUMI-BDyUNSJw.js → Y67KZUMI-BwLWwpNF.js} +2 -2
- package/dist/{ZTXFEM5L-CjFLRObi.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
- package/dist/types/components/Alert/components/Title.d.ts +4 -1
- package/dist/types/components/Alert/index.d.ts +4 -1
- package/dist/types/components/Card/Body.d.ts +2 -3
- package/dist/types/components/Card/Footer.d.ts +6 -0
- package/dist/types/components/Card/Header.d.ts +5 -0
- package/dist/types/components/Card/index.d.ts +7 -8
- package/dist/types/components/Card/types.d.ts +16 -3
- package/dist/types/components/Checkbox/index.d.ts +1 -2
- package/dist/types/components/Checkbox/types.d.ts +3 -1
- package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
- package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
- package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
- package/dist/types/components/Drawer/components/Close.d.ts +4 -1
- package/dist/types/components/Drawer/components/Title.d.ts +4 -1
- package/dist/types/components/Drawer/index.d.ts +12 -3
- package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
- package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
- package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
- package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
- package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
- package/dist/types/components/DropdownMenu/index.d.ts +11 -0
- package/dist/types/components/DropdownMenu/types.d.ts +26 -5
- package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
- package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
- package/dist/types/components/Icon/icons.d.ts +4 -3
- package/dist/types/components/Loader/index.d.ts +4 -1
- package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
- package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
- package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
- package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
- package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
- package/dist/types/components/Modal/Assets/index.d.ts +16 -4
- package/dist/types/components/Modal/components/Close.d.ts +4 -1
- package/dist/types/components/Modal/index.d.ts +16 -4
- package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
- package/dist/types/components/Popover/Arrow.d.ts +4 -1
- package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
- package/dist/types/components/RadioGroup/index.d.ts +4 -1
- package/dist/types/components/Stepper/index.d.ts +8 -2
- package/dist/types/components/StickyNote/components/Button.d.ts +4 -1
- package/dist/types/components/StickyNote/components/Title.d.ts +4 -1
- package/dist/types/components/StickyNote/index.d.ts +8 -2
- package/dist/types/components/Swiper/index.d.ts +4 -1
- package/dist/types/components/Table/index.d.ts +20 -5
- package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
- package/dist/types/components/Tag/types.d.ts +4 -2
- package/dist/types/components/Textarea/types.d.ts +1 -0
- package/dist/types/components/Toast/index.d.ts +4 -1
- package/package.json +1 -1
- package/dist/2W3RN7C5-uG7eBeTQ.js +0 -61
- package/dist/SQZLCNLX-CUlXoT69.js +0 -82
- package/dist/XCKGTAUF-CahZE721.js +0 -25
package/dist/FileDrop.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './FileDrop.css';
|
|
3
3
|
import { jsxs as V, Fragment as vi, jsx as f } from "react/jsx-runtime";
|
|
4
|
-
import
|
|
5
|
-
import { _ as
|
|
6
|
-
import { g as
|
|
4
|
+
import Si, { useMemo as Y, useRef as fa, useReducer as qi, useEffect as ta, useCallback as j, forwardRef as fi, useImperativeHandle as Ti, Fragment as Li, useState as Qa } from "react";
|
|
5
|
+
import { _ as $, P as s } from "./tslib.es6-C80jYMbM.js";
|
|
6
|
+
import { g as Ci, c as Da } from "./index-PAaZGbyz.js";
|
|
7
7
|
import { Button as ha } from "./Button.js";
|
|
8
8
|
import { Icon as G } from "./Icon.js";
|
|
9
|
-
import { c as
|
|
10
|
-
import { g as
|
|
9
|
+
import { c as ai } from "./create-event-rXDe5aCQ.js";
|
|
10
|
+
import { g as Mi, a as Ni, b as xi } from "./index-DmEMuVTM.js";
|
|
11
11
|
import { Text as ya } from "./Text.js";
|
|
12
|
-
const
|
|
12
|
+
const $i = /* @__PURE__ */ new Map([
|
|
13
13
|
// https://github.com/guzzle/psr7/blob/2d9260799e713f1c475d3c5fdc3d6561ff7441b2/src/MimeType.php
|
|
14
14
|
["1km", "application/vnd.1000minds.decision-model+xml"],
|
|
15
15
|
["3dml", "text/vnd.in3d.3dml"],
|
|
@@ -1213,13 +1213,13 @@ const Mi = /* @__PURE__ */ new Map([
|
|
|
1213
1213
|
["zsh", "text/x-scriptzsh"]
|
|
1214
1214
|
]);
|
|
1215
1215
|
function Z(a, i, t) {
|
|
1216
|
-
const e =
|
|
1217
|
-
return typeof e.path != "string" &&
|
|
1216
|
+
const e = Ki(a), { webkitRelativePath: n } = a, o = typeof i == "string" ? i : typeof n == "string" && n.length > 0 ? n : `./${a.name}`;
|
|
1217
|
+
return typeof e.path != "string" && ii(e, "path", o), ii(e, "relativePath", o), e;
|
|
1218
1218
|
}
|
|
1219
|
-
function
|
|
1219
|
+
function Ki(a) {
|
|
1220
1220
|
const { name: i } = a;
|
|
1221
1221
|
if (i && i.lastIndexOf(".") !== -1 && !a.type) {
|
|
1222
|
-
const e = i.split(".").pop().toLowerCase(), n =
|
|
1222
|
+
const e = i.split(".").pop().toLowerCase(), n = $i.get(e);
|
|
1223
1223
|
n && Object.defineProperty(a, "type", {
|
|
1224
1224
|
value: n,
|
|
1225
1225
|
writable: !1,
|
|
@@ -1229,7 +1229,7 @@ function $i(a) {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
return a;
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1232
|
+
function ii(a, i, t) {
|
|
1233
1233
|
Object.defineProperty(a, i, {
|
|
1234
1234
|
value: t,
|
|
1235
1235
|
writable: !1,
|
|
@@ -1237,49 +1237,49 @@ function ai(a, i, t) {
|
|
|
1237
1237
|
enumerable: !0
|
|
1238
1238
|
});
|
|
1239
1239
|
}
|
|
1240
|
-
const
|
|
1240
|
+
const Hi = [
|
|
1241
1241
|
// Thumbnail cache files for macOS and Windows
|
|
1242
1242
|
".DS_Store",
|
|
1243
1243
|
// macOs
|
|
1244
1244
|
"Thumbs.db"
|
|
1245
1245
|
// Windows
|
|
1246
1246
|
];
|
|
1247
|
-
function
|
|
1248
|
-
return
|
|
1249
|
-
return wa(a) &&
|
|
1247
|
+
function Wi(a) {
|
|
1248
|
+
return $(this, void 0, void 0, function* () {
|
|
1249
|
+
return wa(a) && Ui(a.dataTransfer) ? Gi(a.dataTransfer, a.type) : Bi(a) ? Yi(a) : Array.isArray(a) && a.every((i) => "getFile" in i && typeof i.getFile == "function") ? Vi(a) : [];
|
|
1250
1250
|
});
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1252
|
+
function Ui(a) {
|
|
1253
1253
|
return wa(a);
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1255
|
+
function Bi(a) {
|
|
1256
1256
|
return wa(a) && wa(a.target);
|
|
1257
1257
|
}
|
|
1258
1258
|
function wa(a) {
|
|
1259
1259
|
return typeof a == "object" && a !== null;
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1261
|
+
function Yi(a) {
|
|
1262
1262
|
return Ca(a.target.files).map((i) => Z(i));
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1265
|
-
return
|
|
1264
|
+
function Vi(a) {
|
|
1265
|
+
return $(this, void 0, void 0, function* () {
|
|
1266
1266
|
return (yield Promise.all(a.map((t) => t.getFile()))).map((t) => Z(t));
|
|
1267
1267
|
});
|
|
1268
1268
|
}
|
|
1269
|
-
function
|
|
1270
|
-
return
|
|
1269
|
+
function Gi(a, i) {
|
|
1270
|
+
return $(this, void 0, void 0, function* () {
|
|
1271
1271
|
if (a.items) {
|
|
1272
1272
|
const t = Ca(a.items).filter((n) => n.kind === "file");
|
|
1273
1273
|
if (i !== "drop")
|
|
1274
1274
|
return t;
|
|
1275
|
-
const e = yield Promise.all(t.map(
|
|
1276
|
-
return
|
|
1275
|
+
const e = yield Promise.all(t.map(Zi));
|
|
1276
|
+
return ti(gi(e));
|
|
1277
1277
|
}
|
|
1278
|
-
return
|
|
1278
|
+
return ti(Ca(a.files).map((t) => Z(t)));
|
|
1279
1279
|
});
|
|
1280
1280
|
}
|
|
1281
|
-
function
|
|
1282
|
-
return a.filter((i) =>
|
|
1281
|
+
function ti(a) {
|
|
1282
|
+
return a.filter((i) => Hi.indexOf(i.name) === -1);
|
|
1283
1283
|
}
|
|
1284
1284
|
function Ca(a) {
|
|
1285
1285
|
if (a === null)
|
|
@@ -1291,11 +1291,11 @@ function Ca(a) {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
return i;
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function Zi(a) {
|
|
1295
1295
|
if (typeof a.webkitGetAsEntry != "function")
|
|
1296
|
-
return
|
|
1296
|
+
return ei(a);
|
|
1297
1297
|
const i = a.webkitGetAsEntry();
|
|
1298
|
-
return i && i.isDirectory ? bi(i) :
|
|
1298
|
+
return i && i.isDirectory ? bi(i) : ei(a, i);
|
|
1299
1299
|
}
|
|
1300
1300
|
function gi(a) {
|
|
1301
1301
|
return a.reduce((i, t) => [
|
|
@@ -1303,10 +1303,10 @@ function gi(a) {
|
|
|
1303
1303
|
...Array.isArray(t) ? gi(t) : [t]
|
|
1304
1304
|
], []);
|
|
1305
1305
|
}
|
|
1306
|
-
function
|
|
1306
|
+
function ei(a, i) {
|
|
1307
1307
|
var t;
|
|
1308
1308
|
if (typeof a.getAsFileSystemHandle == "function")
|
|
1309
|
-
return a.getAsFileSystemHandle().then((o) =>
|
|
1309
|
+
return a.getAsFileSystemHandle().then((o) => $(this, void 0, void 0, function* () {
|
|
1310
1310
|
const l = yield o.getFile();
|
|
1311
1311
|
return l.handle = o, Z(l);
|
|
1312
1312
|
}));
|
|
@@ -1316,9 +1316,9 @@ function ti(a, i) {
|
|
|
1316
1316
|
const n = Z(e, (t = i == null ? void 0 : i.fullPath) !== null && t !== void 0 ? t : void 0);
|
|
1317
1317
|
return Promise.resolve(n);
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1320
|
-
return
|
|
1321
|
-
return a.isDirectory ? bi(a) :
|
|
1319
|
+
function Ji(a) {
|
|
1320
|
+
return $(this, void 0, void 0, function* () {
|
|
1321
|
+
return a.isDirectory ? bi(a) : Xi(a);
|
|
1322
1322
|
});
|
|
1323
1323
|
}
|
|
1324
1324
|
function bi(a) {
|
|
@@ -1326,9 +1326,9 @@ function bi(a) {
|
|
|
1326
1326
|
return new Promise((t, e) => {
|
|
1327
1327
|
const n = [];
|
|
1328
1328
|
function o() {
|
|
1329
|
-
i.readEntries((l) =>
|
|
1329
|
+
i.readEntries((l) => $(this, void 0, void 0, function* () {
|
|
1330
1330
|
if (l.length) {
|
|
1331
|
-
const r = Promise.all(l.map(
|
|
1331
|
+
const r = Promise.all(l.map(Ji));
|
|
1332
1332
|
n.push(r), o();
|
|
1333
1333
|
} else
|
|
1334
1334
|
try {
|
|
@@ -1344,8 +1344,8 @@ function bi(a) {
|
|
|
1344
1344
|
o();
|
|
1345
1345
|
});
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1348
|
-
return
|
|
1347
|
+
function Xi(a) {
|
|
1348
|
+
return $(this, void 0, void 0, function* () {
|
|
1349
1349
|
return new Promise((i, t) => {
|
|
1350
1350
|
a.file((e) => {
|
|
1351
1351
|
const n = Z(e, a.fullPath);
|
|
@@ -1356,9 +1356,9 @@ function Zi(a) {
|
|
|
1356
1356
|
});
|
|
1357
1357
|
});
|
|
1358
1358
|
}
|
|
1359
|
-
var xa = {},
|
|
1360
|
-
function
|
|
1361
|
-
return
|
|
1359
|
+
var xa = {}, ni;
|
|
1360
|
+
function Qi() {
|
|
1361
|
+
return ni || (ni = 1, xa.__esModule = !0, xa.default = function(a, i) {
|
|
1362
1362
|
if (a && i) {
|
|
1363
1363
|
var t = Array.isArray(i) ? i : i.split(",");
|
|
1364
1364
|
if (t.length === 0)
|
|
@@ -1372,22 +1372,22 @@ function Ji() {
|
|
|
1372
1372
|
return !0;
|
|
1373
1373
|
}), xa;
|
|
1374
1374
|
}
|
|
1375
|
-
var
|
|
1376
|
-
const Sa = /* @__PURE__ */
|
|
1377
|
-
function
|
|
1378
|
-
return
|
|
1375
|
+
var at = Qi();
|
|
1376
|
+
const Sa = /* @__PURE__ */ Ci(at);
|
|
1377
|
+
function pi(a) {
|
|
1378
|
+
return et(a) || tt(a) || yi(a) || it();
|
|
1379
1379
|
}
|
|
1380
|
-
function
|
|
1380
|
+
function it() {
|
|
1381
1381
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1382
1382
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1384
|
+
function tt(a) {
|
|
1385
1385
|
if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
|
|
1386
1386
|
}
|
|
1387
|
-
function
|
|
1387
|
+
function et(a) {
|
|
1388
1388
|
if (Array.isArray(a)) return Ma(a);
|
|
1389
1389
|
}
|
|
1390
|
-
function
|
|
1390
|
+
function oi(a, i) {
|
|
1391
1391
|
var t = Object.keys(a);
|
|
1392
1392
|
if (Object.getOwnPropertySymbols) {
|
|
1393
1393
|
var e = Object.getOwnPropertySymbols(a);
|
|
@@ -1397,12 +1397,12 @@ function pi(a, i) {
|
|
|
1397
1397
|
}
|
|
1398
1398
|
return t;
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function ci(a) {
|
|
1401
1401
|
for (var i = 1; i < arguments.length; i++) {
|
|
1402
1402
|
var t = arguments[i] != null ? arguments[i] : {};
|
|
1403
|
-
i % 2 ?
|
|
1403
|
+
i % 2 ? oi(Object(t), !0).forEach(function(e) {
|
|
1404
1404
|
hi(a, e, t[e]);
|
|
1405
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) :
|
|
1405
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : oi(Object(t)).forEach(function(e) {
|
|
1406
1406
|
Object.defineProperty(a, e, Object.getOwnPropertyDescriptor(t, e));
|
|
1407
1407
|
});
|
|
1408
1408
|
}
|
|
@@ -1412,9 +1412,9 @@ function hi(a, i, t) {
|
|
|
1412
1412
|
return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
|
|
1413
1413
|
}
|
|
1414
1414
|
function ea(a, i) {
|
|
1415
|
-
return
|
|
1415
|
+
return ot(a) || pt(a, i) || yi(a, i) || nt();
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1417
|
+
function nt() {
|
|
1418
1418
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1419
1419
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1420
1420
|
}
|
|
@@ -1432,7 +1432,7 @@ function Ma(a, i) {
|
|
|
1432
1432
|
e[t] = a[t];
|
|
1433
1433
|
return e;
|
|
1434
1434
|
}
|
|
1435
|
-
function
|
|
1435
|
+
function pt(a, i) {
|
|
1436
1436
|
var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
|
|
1437
1437
|
if (t != null) {
|
|
1438
1438
|
var e = [], n = !0, o = !1, l, r;
|
|
@@ -1451,48 +1451,48 @@ function et(a, i) {
|
|
|
1451
1451
|
return e;
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
1454
|
-
function
|
|
1454
|
+
function ot(a) {
|
|
1455
1455
|
if (Array.isArray(a)) return a;
|
|
1456
1456
|
}
|
|
1457
|
-
var
|
|
1457
|
+
var ct = typeof Sa == "function" ? Sa : Sa.default, lt = "file-invalid-type", rt = "file-too-large", st = "file-too-small", dt = "too-many-files", mt = function() {
|
|
1458
1458
|
var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", t = i.split(","), e = t.length > 1 ? "one of ".concat(t.join(", ")) : t[0];
|
|
1459
1459
|
return {
|
|
1460
|
-
code:
|
|
1460
|
+
code: lt,
|
|
1461
1461
|
message: "File type must be ".concat(e)
|
|
1462
1462
|
};
|
|
1463
|
-
},
|
|
1463
|
+
}, li = function(i) {
|
|
1464
1464
|
return {
|
|
1465
|
-
code:
|
|
1465
|
+
code: rt,
|
|
1466
1466
|
message: "File is larger than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
|
|
1467
1467
|
};
|
|
1468
|
-
},
|
|
1468
|
+
}, ri = function(i) {
|
|
1469
1469
|
return {
|
|
1470
|
-
code:
|
|
1470
|
+
code: st,
|
|
1471
1471
|
message: "File is smaller than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
|
|
1472
1472
|
};
|
|
1473
|
-
},
|
|
1474
|
-
code:
|
|
1473
|
+
}, ut = {
|
|
1474
|
+
code: dt,
|
|
1475
1475
|
message: "Too many files"
|
|
1476
1476
|
};
|
|
1477
1477
|
function wi(a, i) {
|
|
1478
|
-
var t = a.type === "application/x-moz-file" ||
|
|
1479
|
-
return [t, t ? null :
|
|
1478
|
+
var t = a.type === "application/x-moz-file" || ct(a, i);
|
|
1479
|
+
return [t, t ? null : mt(i)];
|
|
1480
1480
|
}
|
|
1481
1481
|
function ki(a, i, t) {
|
|
1482
|
-
if (
|
|
1483
|
-
if (
|
|
1484
|
-
if (a.size > t) return [!1,
|
|
1485
|
-
if (a.size < i) return [!1,
|
|
1482
|
+
if (N(a.size))
|
|
1483
|
+
if (N(i) && N(t)) {
|
|
1484
|
+
if (a.size > t) return [!1, li(t)];
|
|
1485
|
+
if (a.size < i) return [!1, ri(i)];
|
|
1486
1486
|
} else {
|
|
1487
|
-
if (
|
|
1488
|
-
if (
|
|
1487
|
+
if (N(i) && a.size < i) return [!1, ri(i)];
|
|
1488
|
+
if (N(t) && a.size > t) return [!1, li(t)];
|
|
1489
1489
|
}
|
|
1490
1490
|
return [!0, null];
|
|
1491
1491
|
}
|
|
1492
|
-
function
|
|
1492
|
+
function N(a) {
|
|
1493
1493
|
return a != null;
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function vt(a) {
|
|
1496
1496
|
var i = a.files, t = a.accept, e = a.minSize, n = a.maxSize, o = a.multiple, l = a.maxFiles, r = a.validator;
|
|
1497
1497
|
return !o && i.length > 1 || o && l >= 1 && i.length > l ? !1 : i.every(function(v) {
|
|
1498
1498
|
var w = wi(v, t), D = ea(w, 1), I = D[0], F = ki(v, e, n), P = ea(F, 1), h = P[0], E = r ? r(v) : null;
|
|
@@ -1507,18 +1507,18 @@ function ga(a) {
|
|
|
1507
1507
|
return i === "Files" || i === "application/x-moz-file";
|
|
1508
1508
|
}) : !!a.target && !!a.target.files;
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1510
|
+
function si(a) {
|
|
1511
1511
|
a.preventDefault();
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1513
|
+
function ft(a) {
|
|
1514
1514
|
return a.indexOf("MSIE") !== -1 || a.indexOf("Trident/") !== -1;
|
|
1515
1515
|
}
|
|
1516
|
-
function
|
|
1516
|
+
function xt(a) {
|
|
1517
1517
|
return a.indexOf("Edge/") !== -1;
|
|
1518
1518
|
}
|
|
1519
|
-
function
|
|
1519
|
+
function gt() {
|
|
1520
1520
|
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
|
|
1521
|
-
return
|
|
1521
|
+
return ft(a) || xt(a);
|
|
1522
1522
|
}
|
|
1523
1523
|
function O() {
|
|
1524
1524
|
for (var a = arguments.length, i = new Array(a), t = 0; t < a; t++)
|
|
@@ -1531,17 +1531,17 @@ function O() {
|
|
|
1531
1531
|
});
|
|
1532
1532
|
};
|
|
1533
1533
|
}
|
|
1534
|
-
function
|
|
1534
|
+
function bt() {
|
|
1535
1535
|
return "showOpenFilePicker" in window;
|
|
1536
1536
|
}
|
|
1537
|
-
function
|
|
1538
|
-
if (
|
|
1537
|
+
function ht(a) {
|
|
1538
|
+
if (N(a)) {
|
|
1539
1539
|
var i = Object.entries(a).filter(function(t) {
|
|
1540
1540
|
var e = ea(t, 2), n = e[0], o = e[1], l = !0;
|
|
1541
1541
|
return ji(n) || (console.warn('Skipped "'.concat(n, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), l = !1), (!Array.isArray(o) || !o.every(Di)) && (console.warn('Skipped "'.concat(n, '" because an invalid file extension was provided.')), l = !1), l;
|
|
1542
1542
|
}).reduce(function(t, e) {
|
|
1543
1543
|
var n = ea(e, 2), o = n[0], l = n[1];
|
|
1544
|
-
return
|
|
1544
|
+
return ci(ci({}, t), {}, hi({}, o, l));
|
|
1545
1545
|
}, {});
|
|
1546
1546
|
return [{
|
|
1547
1547
|
// description is required due to https://crbug.com/1264708
|
|
@@ -1551,19 +1551,19 @@ function gt(a) {
|
|
|
1551
1551
|
}
|
|
1552
1552
|
return a;
|
|
1553
1553
|
}
|
|
1554
|
-
function
|
|
1555
|
-
if (
|
|
1554
|
+
function yt(a) {
|
|
1555
|
+
if (N(a))
|
|
1556
1556
|
return Object.entries(a).reduce(function(i, t) {
|
|
1557
1557
|
var e = ea(t, 2), n = e[0], o = e[1];
|
|
1558
|
-
return [].concat(
|
|
1558
|
+
return [].concat(pi(i), [n], pi(o));
|
|
1559
1559
|
}, []).filter(function(i) {
|
|
1560
1560
|
return ji(i) || Di(i);
|
|
1561
1561
|
}).join(",");
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function wt(a) {
|
|
1564
1564
|
return a instanceof DOMException && (a.name === "AbortError" || a.code === a.ABORT_ERR);
|
|
1565
1565
|
}
|
|
1566
|
-
function
|
|
1566
|
+
function kt(a) {
|
|
1567
1567
|
return a instanceof DOMException && (a.name === "SecurityError" || a.code === a.SECURITY_ERR);
|
|
1568
1568
|
}
|
|
1569
1569
|
function ji(a) {
|
|
@@ -1572,42 +1572,42 @@ function ji(a) {
|
|
|
1572
1572
|
function Di(a) {
|
|
1573
1573
|
return /^.*\.[\w]+$/.test(a);
|
|
1574
1574
|
}
|
|
1575
|
-
var
|
|
1576
|
-
function
|
|
1577
|
-
return
|
|
1575
|
+
var jt = ["children"], Dt = ["open"], zt = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], _t = ["refKey", "onChange", "onClick"];
|
|
1576
|
+
function Et(a) {
|
|
1577
|
+
return Ft(a) || Ot(a) || zi(a) || At();
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1579
|
+
function At() {
|
|
1580
1580
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1581
1581
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1582
1582
|
}
|
|
1583
|
-
function
|
|
1583
|
+
function Ot(a) {
|
|
1584
1584
|
if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1587
|
-
if (Array.isArray(a)) return
|
|
1586
|
+
function Ft(a) {
|
|
1587
|
+
if (Array.isArray(a)) return Na(a);
|
|
1588
1588
|
}
|
|
1589
1589
|
function qa(a, i) {
|
|
1590
|
-
return
|
|
1590
|
+
return Rt(a) || It(a, i) || zi(a, i) || Pt();
|
|
1591
1591
|
}
|
|
1592
|
-
function
|
|
1592
|
+
function Pt() {
|
|
1593
1593
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1594
1594
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1595
1595
|
}
|
|
1596
1596
|
function zi(a, i) {
|
|
1597
1597
|
if (a) {
|
|
1598
|
-
if (typeof a == "string") return
|
|
1598
|
+
if (typeof a == "string") return Na(a, i);
|
|
1599
1599
|
var t = Object.prototype.toString.call(a).slice(8, -1);
|
|
1600
1600
|
if (t === "Object" && a.constructor && (t = a.constructor.name), t === "Map" || t === "Set") return Array.from(a);
|
|
1601
|
-
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return
|
|
1601
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Na(a, i);
|
|
1602
1602
|
}
|
|
1603
1603
|
}
|
|
1604
|
-
function
|
|
1604
|
+
function Na(a, i) {
|
|
1605
1605
|
(i == null || i > a.length) && (i = a.length);
|
|
1606
1606
|
for (var t = 0, e = new Array(i); t < i; t++)
|
|
1607
1607
|
e[t] = a[t];
|
|
1608
1608
|
return e;
|
|
1609
1609
|
}
|
|
1610
|
-
function
|
|
1610
|
+
function It(a, i) {
|
|
1611
1611
|
var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
|
|
1612
1612
|
if (t != null) {
|
|
1613
1613
|
var e = [], n = !0, o = !1, l, r;
|
|
@@ -1626,10 +1626,10 @@ function Ft(a, i) {
|
|
|
1626
1626
|
return e;
|
|
1627
1627
|
}
|
|
1628
1628
|
}
|
|
1629
|
-
function
|
|
1629
|
+
function Rt(a) {
|
|
1630
1630
|
if (Array.isArray(a)) return a;
|
|
1631
1631
|
}
|
|
1632
|
-
function
|
|
1632
|
+
function di(a, i) {
|
|
1633
1633
|
var t = Object.keys(a);
|
|
1634
1634
|
if (Object.getOwnPropertySymbols) {
|
|
1635
1635
|
var e = Object.getOwnPropertySymbols(a);
|
|
@@ -1642,20 +1642,20 @@ function si(a, i) {
|
|
|
1642
1642
|
function m(a) {
|
|
1643
1643
|
for (var i = 1; i < arguments.length; i++) {
|
|
1644
1644
|
var t = arguments[i] != null ? arguments[i] : {};
|
|
1645
|
-
i % 2 ?
|
|
1646
|
-
|
|
1647
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) :
|
|
1645
|
+
i % 2 ? di(Object(t), !0).forEach(function(e) {
|
|
1646
|
+
$a(a, e, t[e]);
|
|
1647
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : di(Object(t)).forEach(function(e) {
|
|
1648
1648
|
Object.defineProperty(a, e, Object.getOwnPropertyDescriptor(t, e));
|
|
1649
1649
|
});
|
|
1650
1650
|
}
|
|
1651
1651
|
return a;
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1653
|
+
function $a(a, i, t) {
|
|
1654
1654
|
return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
|
|
1655
1655
|
}
|
|
1656
1656
|
function ja(a, i) {
|
|
1657
1657
|
if (a == null) return {};
|
|
1658
|
-
var t =
|
|
1658
|
+
var t = St(a, i), e, n;
|
|
1659
1659
|
if (Object.getOwnPropertySymbols) {
|
|
1660
1660
|
var o = Object.getOwnPropertySymbols(a);
|
|
1661
1661
|
for (n = 0; n < o.length; n++)
|
|
@@ -1663,27 +1663,27 @@ function ja(a, i) {
|
|
|
1663
1663
|
}
|
|
1664
1664
|
return t;
|
|
1665
1665
|
}
|
|
1666
|
-
function
|
|
1666
|
+
function St(a, i) {
|
|
1667
1667
|
if (a == null) return {};
|
|
1668
1668
|
var t = {}, e = Object.keys(a), n, o;
|
|
1669
1669
|
for (o = 0; o < e.length; o++)
|
|
1670
1670
|
n = e[o], !(i.indexOf(n) >= 0) && (t[n] = a[n]);
|
|
1671
1671
|
return t;
|
|
1672
1672
|
}
|
|
1673
|
-
var
|
|
1674
|
-
var t = a.children, e = ja(a,
|
|
1675
|
-
return
|
|
1673
|
+
var Wa = /* @__PURE__ */ fi(function(a, i) {
|
|
1674
|
+
var t = a.children, e = ja(a, jt), n = Ei(e), o = n.open, l = ja(n, Dt);
|
|
1675
|
+
return Ti(i, function() {
|
|
1676
1676
|
return {
|
|
1677
1677
|
open: o
|
|
1678
1678
|
};
|
|
1679
|
-
}, [o]), /* @__PURE__ */
|
|
1679
|
+
}, [o]), /* @__PURE__ */ Si.createElement(Li, null, t(m(m({}, l), {}, {
|
|
1680
1680
|
open: o
|
|
1681
1681
|
})));
|
|
1682
1682
|
});
|
|
1683
|
-
|
|
1683
|
+
Wa.displayName = "Dropzone";
|
|
1684
1684
|
var _i = {
|
|
1685
1685
|
disabled: !1,
|
|
1686
|
-
getFilesFromEvent:
|
|
1686
|
+
getFilesFromEvent: Wi,
|
|
1687
1687
|
maxSize: 1 / 0,
|
|
1688
1688
|
minSize: 0,
|
|
1689
1689
|
multiple: !0,
|
|
@@ -1697,8 +1697,8 @@ var _i = {
|
|
|
1697
1697
|
useFsAccessApi: !1,
|
|
1698
1698
|
autoFocus: !1
|
|
1699
1699
|
};
|
|
1700
|
-
|
|
1701
|
-
|
|
1700
|
+
Wa.defaultProps = _i;
|
|
1701
|
+
Wa.propTypes = {
|
|
1702
1702
|
/**
|
|
1703
1703
|
* Render function that exposes the dropzone state and prop getter fns
|
|
1704
1704
|
*
|
|
@@ -1877,14 +1877,14 @@ var Ka = {
|
|
|
1877
1877
|
};
|
|
1878
1878
|
function Ei() {
|
|
1879
1879
|
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = m(m({}, _i), a), t = i.accept, e = i.disabled, n = i.getFilesFromEvent, o = i.maxSize, l = i.minSize, r = i.multiple, v = i.maxFiles, w = i.onDragEnter, D = i.onDragLeave, I = i.onDragOver, F = i.onDrop, P = i.onDropAccepted, h = i.onDropRejected, E = i.onFileDialogCancel, q = i.onFileDialogOpen, na = i.useFsAccessApi, pa = i.autoFocus, J = i.preventDropOnDocument, k = i.noClick, R = i.noKeyboard, K = i.noDrag, z = i.noDragEventsBubbling, X = i.onError, T = i.validator, L = Y(function() {
|
|
1880
|
-
return
|
|
1880
|
+
return yt(t);
|
|
1881
1881
|
}, [t]), oa = Y(function() {
|
|
1882
|
-
return
|
|
1882
|
+
return ht(t);
|
|
1883
1883
|
}, [t]), Q = Y(function() {
|
|
1884
|
-
return typeof q == "function" ? q :
|
|
1884
|
+
return typeof q == "function" ? q : mi;
|
|
1885
1885
|
}, [q]), C = Y(function() {
|
|
1886
|
-
return typeof E == "function" ? E :
|
|
1887
|
-
}, [E]), g = fa(null), b = fa(null), ca =
|
|
1886
|
+
return typeof E == "function" ? E : mi;
|
|
1887
|
+
}, [E]), g = fa(null), b = fa(null), ca = qi(qt, Ka), la = qa(ca, 2), _ = la[0], d = la[1], A = _.isFocused, ra = _.isFileDialogActive, H = fa(typeof window < "u" && window.isSecureContext && na && bt()), aa = function() {
|
|
1888
1888
|
!H.current && ra && setTimeout(function() {
|
|
1889
1889
|
if (b.current) {
|
|
1890
1890
|
var c = b.current.files;
|
|
@@ -1899,12 +1899,12 @@ function Ei() {
|
|
|
1899
1899
|
window.removeEventListener("focus", aa, !1);
|
|
1900
1900
|
};
|
|
1901
1901
|
}, [b, ra, C, H]);
|
|
1902
|
-
var S = fa([]),
|
|
1902
|
+
var S = fa([]), Ua = function(c) {
|
|
1903
1903
|
g.current && g.current.contains(c.target) || (c.preventDefault(), S.current = []);
|
|
1904
1904
|
};
|
|
1905
1905
|
ta(function() {
|
|
1906
|
-
return J && (document.addEventListener("dragover",
|
|
1907
|
-
J && (document.removeEventListener("dragover",
|
|
1906
|
+
return J && (document.addEventListener("dragover", si, !1), document.addEventListener("drop", Ua, !1)), function() {
|
|
1907
|
+
J && (document.removeEventListener("dragover", si), document.removeEventListener("drop", Ua));
|
|
1908
1908
|
};
|
|
1909
1909
|
}, [g, J]), ta(function() {
|
|
1910
1910
|
return !e && pa && g.current && g.current.focus(), function() {
|
|
@@ -1912,10 +1912,10 @@ function Ei() {
|
|
|
1912
1912
|
}, [g, pa, e]);
|
|
1913
1913
|
var M = j(function(p) {
|
|
1914
1914
|
X ? X(p) : console.error(p);
|
|
1915
|
-
}, [X]),
|
|
1916
|
-
p.preventDefault(), p.persist(), ua(p), S.current = [].concat(
|
|
1915
|
+
}, [X]), Ba = j(function(p) {
|
|
1916
|
+
p.preventDefault(), p.persist(), ua(p), S.current = [].concat(Et(S.current), [p.target]), ga(p) && Promise.resolve(n(p)).then(function(c) {
|
|
1917
1917
|
if (!(ka(p) && !z)) {
|
|
1918
|
-
var u = c.length, x = u > 0 &&
|
|
1918
|
+
var u = c.length, x = u > 0 && vt({
|
|
1919
1919
|
files: c,
|
|
1920
1920
|
accept: L,
|
|
1921
1921
|
minSize: l,
|
|
@@ -1934,7 +1934,7 @@ function Ei() {
|
|
|
1934
1934
|
}).catch(function(c) {
|
|
1935
1935
|
return M(c);
|
|
1936
1936
|
});
|
|
1937
|
-
}, [n, w, M, z, L, l, o, r, v, T]),
|
|
1937
|
+
}, [n, w, M, z, L, l, o, r, v, T]), Ya = j(function(p) {
|
|
1938
1938
|
p.preventDefault(), p.persist(), ua(p);
|
|
1939
1939
|
var c = ga(p);
|
|
1940
1940
|
if (c && p.dataTransfer)
|
|
@@ -1943,7 +1943,7 @@ function Ei() {
|
|
|
1943
1943
|
} catch {
|
|
1944
1944
|
}
|
|
1945
1945
|
return c && I && I(p), !1;
|
|
1946
|
-
}, [I, z]),
|
|
1946
|
+
}, [I, z]), Va = j(function(p) {
|
|
1947
1947
|
p.preventDefault(), p.persist(), ua(p);
|
|
1948
1948
|
var c = S.current.filter(function(x) {
|
|
1949
1949
|
return g.current && g.current.contains(x);
|
|
@@ -1964,15 +1964,15 @@ function Ei() {
|
|
|
1964
1964
|
var Ra = [Aa, Pa];
|
|
1965
1965
|
Ia && (Ra = Ra.concat(Ia)), x.push({
|
|
1966
1966
|
file: y,
|
|
1967
|
-
errors: Ra.filter(function(
|
|
1968
|
-
return
|
|
1967
|
+
errors: Ra.filter(function(Ri) {
|
|
1968
|
+
return Ri;
|
|
1969
1969
|
})
|
|
1970
1970
|
});
|
|
1971
1971
|
}
|
|
1972
1972
|
}), (!r && u.length > 1 || r && v >= 1 && u.length > v) && (u.forEach(function(y) {
|
|
1973
1973
|
x.push({
|
|
1974
1974
|
file: y,
|
|
1975
|
-
errors: [
|
|
1975
|
+
errors: [ut]
|
|
1976
1976
|
});
|
|
1977
1977
|
}), u.splice(0)), d({
|
|
1978
1978
|
acceptedFiles: u,
|
|
@@ -2004,27 +2004,27 @@ function Ei() {
|
|
|
2004
2004
|
type: "closeDialog"
|
|
2005
2005
|
});
|
|
2006
2006
|
}).catch(function(c) {
|
|
2007
|
-
|
|
2007
|
+
wt(c) ? (C(c), d({
|
|
2008
2008
|
type: "closeDialog"
|
|
2009
|
-
})) :
|
|
2009
|
+
})) : kt(c) ? (H.current = !1, b.current ? (b.current.value = null, b.current.click()) : M(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : M(c);
|
|
2010
2010
|
});
|
|
2011
2011
|
return;
|
|
2012
2012
|
}
|
|
2013
2013
|
b.current && (d({
|
|
2014
2014
|
type: "openDialog"
|
|
2015
2015
|
}), Q(), b.current.value = null, b.current.click());
|
|
2016
|
-
}, [d, Q, C, na, sa, M, oa, r]),
|
|
2016
|
+
}, [d, Q, C, na, sa, M, oa, r]), Ga = j(function(p) {
|
|
2017
2017
|
!g.current || !g.current.isEqualNode(p.target) || (p.key === " " || p.key === "Enter" || p.keyCode === 32 || p.keyCode === 13) && (p.preventDefault(), W());
|
|
2018
|
-
}, [g, W]),
|
|
2018
|
+
}, [g, W]), Za = j(function() {
|
|
2019
2019
|
d({
|
|
2020
2020
|
type: "focus"
|
|
2021
2021
|
});
|
|
2022
|
-
}, []),
|
|
2022
|
+
}, []), Ja = j(function() {
|
|
2023
2023
|
d({
|
|
2024
2024
|
type: "blur"
|
|
2025
2025
|
});
|
|
2026
|
-
}, []),
|
|
2027
|
-
k || (
|
|
2026
|
+
}, []), Xa = j(function() {
|
|
2027
|
+
k || (gt() ? setTimeout(W, 0) : W());
|
|
2028
2028
|
}, [k, W]), U = function(c) {
|
|
2029
2029
|
return e ? null : c;
|
|
2030
2030
|
}, _a = function(c) {
|
|
@@ -2033,28 +2033,28 @@ function Ei() {
|
|
|
2033
2033
|
return K ? null : U(c);
|
|
2034
2034
|
}, ua = function(c) {
|
|
2035
2035
|
z && c.stopPropagation();
|
|
2036
|
-
},
|
|
2036
|
+
}, Fi = Y(function() {
|
|
2037
2037
|
return function() {
|
|
2038
|
-
var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = p.refKey, u = c === void 0 ? "ref" : c, x = p.role, y = p.onKeyDown, ia = p.onFocus, B = p.onBlur, Ea = p.onClick, Aa = p.onDragEnter, Oa = p.onDragOver, va = p.onDragLeave, Fa = p.onDrop, Pa = ja(p,
|
|
2039
|
-
return m(m(
|
|
2040
|
-
onKeyDown: _a(O(y,
|
|
2041
|
-
onFocus: _a(O(ia,
|
|
2042
|
-
onBlur: _a(O(B,
|
|
2043
|
-
onClick: U(O(Ea,
|
|
2044
|
-
onDragEnter: ma(O(Aa,
|
|
2045
|
-
onDragOver: ma(O(Oa,
|
|
2046
|
-
onDragLeave: ma(O(va,
|
|
2038
|
+
var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = p.refKey, u = c === void 0 ? "ref" : c, x = p.role, y = p.onKeyDown, ia = p.onFocus, B = p.onBlur, Ea = p.onClick, Aa = p.onDragEnter, Oa = p.onDragOver, va = p.onDragLeave, Fa = p.onDrop, Pa = ja(p, zt);
|
|
2039
|
+
return m(m($a({
|
|
2040
|
+
onKeyDown: _a(O(y, Ga)),
|
|
2041
|
+
onFocus: _a(O(ia, Za)),
|
|
2042
|
+
onBlur: _a(O(B, Ja)),
|
|
2043
|
+
onClick: U(O(Ea, Xa)),
|
|
2044
|
+
onDragEnter: ma(O(Aa, Ba)),
|
|
2045
|
+
onDragOver: ma(O(Oa, Ya)),
|
|
2046
|
+
onDragLeave: ma(O(va, Va)),
|
|
2047
2047
|
onDrop: ma(O(Fa, da)),
|
|
2048
2048
|
role: typeof x == "string" && x !== "" ? x : "presentation"
|
|
2049
2049
|
}, u, g), !e && !R ? {
|
|
2050
2050
|
tabIndex: 0
|
|
2051
2051
|
} : {}), Pa);
|
|
2052
2052
|
};
|
|
2053
|
-
}, [g,
|
|
2053
|
+
}, [g, Ga, Za, Ja, Xa, Ba, Ya, Va, da, R, K, e]), Pi = j(function(p) {
|
|
2054
2054
|
p.stopPropagation();
|
|
2055
|
-
}, []),
|
|
2055
|
+
}, []), Ii = Y(function() {
|
|
2056
2056
|
return function() {
|
|
2057
|
-
var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = p.refKey, u = c === void 0 ? "ref" : c, x = p.onChange, y = p.onClick, ia = ja(p,
|
|
2057
|
+
var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = p.refKey, u = c === void 0 ? "ref" : c, x = p.onChange, y = p.onClick, ia = ja(p, _t), B = $a({
|
|
2058
2058
|
accept: L,
|
|
2059
2059
|
multiple: r,
|
|
2060
2060
|
type: "file",
|
|
@@ -2071,7 +2071,7 @@ function Ei() {
|
|
|
2071
2071
|
whiteSpace: "nowrap"
|
|
2072
2072
|
},
|
|
2073
2073
|
onChange: U(O(x, da)),
|
|
2074
|
-
onClick: U(O(y,
|
|
2074
|
+
onClick: U(O(y, Pi)),
|
|
2075
2075
|
tabIndex: -1
|
|
2076
2076
|
}, u, b);
|
|
2077
2077
|
return m(m({}, B), ia);
|
|
@@ -2079,14 +2079,14 @@ function Ei() {
|
|
|
2079
2079
|
}, [b, t, r, da, e]);
|
|
2080
2080
|
return m(m({}, _), {}, {
|
|
2081
2081
|
isFocused: A && !e,
|
|
2082
|
-
getRootProps:
|
|
2083
|
-
getInputProps:
|
|
2082
|
+
getRootProps: Fi,
|
|
2083
|
+
getInputProps: Ii,
|
|
2084
2084
|
rootRef: g,
|
|
2085
2085
|
inputRef: b,
|
|
2086
2086
|
open: U(W)
|
|
2087
2087
|
});
|
|
2088
2088
|
}
|
|
2089
|
-
function
|
|
2089
|
+
function qt(a, i) {
|
|
2090
2090
|
switch (i.type) {
|
|
2091
2091
|
case "focus":
|
|
2092
2092
|
return m(m({}, a), {}, {
|
|
@@ -2122,11 +2122,11 @@ function Rt(a, i) {
|
|
|
2122
2122
|
return a;
|
|
2123
2123
|
}
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2125
|
+
function mi() {
|
|
2126
2126
|
}
|
|
2127
|
-
const
|
|
2128
|
-
root:
|
|
2129
|
-
disabled:
|
|
2127
|
+
const Tt = "_root_tju30_2", Lt = "_disabled_tju30_26", Ct = "_actions_tju30_65", za = {
|
|
2128
|
+
root: Tt,
|
|
2129
|
+
disabled: Lt,
|
|
2130
2130
|
"drag-reject": "_drag-reject_tju30_32",
|
|
2131
2131
|
"file-input": "_file-input_tju30_35",
|
|
2132
2132
|
"file-preview": "_file-preview_tju30_40",
|
|
@@ -2134,17 +2134,17 @@ const St = "_root_tju30_2", qt = "_disabled_tju30_26", Tt = "_actions_tju30_65",
|
|
|
2134
2134
|
"file-preview-name": "_file-preview-name_tju30_51",
|
|
2135
2135
|
"file-preview-size": "_file-preview-size_tju30_55",
|
|
2136
2136
|
"image-preview": "_image-preview_tju30_60",
|
|
2137
|
-
actions:
|
|
2137
|
+
actions: Ct,
|
|
2138
2138
|
"message-title": "_message-title_tju30_72",
|
|
2139
2139
|
"message-hint": "_message-hint_tju30_75",
|
|
2140
2140
|
"message-file-button-text": "_message-file-button-text_tju30_80"
|
|
2141
|
-
}, Ta = Da(za),
|
|
2141
|
+
}, Ta = Da(za), Ai = ({
|
|
2142
2142
|
file: a,
|
|
2143
2143
|
fileName: i,
|
|
2144
2144
|
forceFileType: t,
|
|
2145
2145
|
previewButtonText: e = "Preview"
|
|
2146
2146
|
}) => {
|
|
2147
|
-
const n = typeof a == "string", o =
|
|
2147
|
+
const n = typeof a == "string", o = Mi(a, t), l = a instanceof File ? Ni(a) : null, r = n && i ? i : xi(a);
|
|
2148
2148
|
return /* @__PURE__ */ V(vi, { children: [
|
|
2149
2149
|
/* @__PURE__ */ f(G, { className: Ta("file-preview-icon"), name: o, size: "xxl" }),
|
|
2150
2150
|
/* @__PURE__ */ f(ya, { as: "h4", className: Ta("file-preview-name"), lines: 1, variant: "heading-md-strong", children: r }),
|
|
@@ -2165,7 +2165,9 @@ const St = "_root_tju30_2", qt = "_disabled_tju30_26", Tt = "_actions_tju30_65",
|
|
|
2165
2165
|
}
|
|
2166
2166
|
) : null
|
|
2167
2167
|
] });
|
|
2168
|
-
}
|
|
2168
|
+
};
|
|
2169
|
+
Ai.displayName = "FileDrop.FilePreview";
|
|
2170
|
+
const La = Da(za), Ha = ({
|
|
2169
2171
|
disabled: a,
|
|
2170
2172
|
fileButtonText: i = "Browse file",
|
|
2171
2173
|
hint: t = "Drag & drop a file here or",
|
|
@@ -2184,7 +2186,9 @@ const St = "_root_tju30_2", qt = "_disabled_tju30_26", Tt = "_actions_tju30_65",
|
|
|
2184
2186
|
children: i
|
|
2185
2187
|
}
|
|
2186
2188
|
)
|
|
2187
|
-
] })
|
|
2189
|
+
] });
|
|
2190
|
+
Ha.displayName = "FileDrop.Message";
|
|
2191
|
+
const Mt = Da(za), Oi = ({
|
|
2188
2192
|
disabled: a,
|
|
2189
2193
|
error: i,
|
|
2190
2194
|
file: t,
|
|
@@ -2196,7 +2200,9 @@ const St = "_root_tju30_2", qt = "_disabled_tju30_26", Tt = "_actions_tju30_65",
|
|
|
2196
2200
|
isHoverReject: v,
|
|
2197
2201
|
openFile: w,
|
|
2198
2202
|
wordings: D
|
|
2199
|
-
}) => r ? /* @__PURE__ */ f(G, { name: "smile-beam-solid" }) : v ? /* @__PURE__ */ f(G, { name: "sad-solid" }) : i ? /* @__PURE__ */ f(
|
|
2203
|
+
}) => r ? /* @__PURE__ */ f(G, { name: "smile-beam-solid" }) : v ? /* @__PURE__ */ f(G, { name: "sad-solid" }) : i ? /* @__PURE__ */ f(Ha, { openFile: w, ...D }) : n ? l ? /* @__PURE__ */ f("img", { className: Mt("image-preview"), src: n }) : /* @__PURE__ */ f(Ai, { file: t, fileName: e, forceFileType: o, ...D }) : /* @__PURE__ */ f(Ha, { disabled: a, openFile: w, ...D });
|
|
2204
|
+
Oi.displayName = "FileDrop.Preview";
|
|
2205
|
+
const ui = /\.(jpeg|jpg|gif|png|webp)$/, Nt = (a) => a ? typeof a == "string" ? !!xi(a).match(ui) : a.name ? !!a.name.match(ui) : !1 : !1, $t = (a) => {
|
|
2200
2206
|
let i;
|
|
2201
2207
|
if (a instanceof File ? i = a.preview : i = a, typeof i != "string" || i.startsWith("blob:"))
|
|
2202
2208
|
return i;
|
|
@@ -2206,12 +2212,12 @@ const St = "_root_tju30_2", qt = "_disabled_tju30_26", Tt = "_actions_tju30_65",
|
|
|
2206
2212
|
} catch {
|
|
2207
2213
|
return;
|
|
2208
2214
|
}
|
|
2209
|
-
}, Kt = 2e6, Ht = "ERROR_INVALID_TYPE", Wt = "ERROR_INVALID_SIZE", ba = Da(za),
|
|
2215
|
+
}, Kt = 2e6, Ht = "ERROR_INVALID_TYPE", Wt = "ERROR_INVALID_SIZE", ba = Da(za), Ut = fi(
|
|
2210
2216
|
({
|
|
2211
2217
|
accept: a = {
|
|
2212
2218
|
"image/*": []
|
|
2213
2219
|
},
|
|
2214
|
-
children: i =
|
|
2220
|
+
children: i = Oi,
|
|
2215
2221
|
className: t,
|
|
2216
2222
|
disabled: e,
|
|
2217
2223
|
fileName: n,
|
|
@@ -2230,14 +2236,14 @@ const St = "_root_tju30_2", qt = "_disabled_tju30_26", Tt = "_actions_tju30_65",
|
|
|
2230
2236
|
wordings: na,
|
|
2231
2237
|
...pa
|
|
2232
2238
|
}, J) => {
|
|
2233
|
-
const [k, R] =
|
|
2239
|
+
const [k, R] = Qa(q), [K, z] = Qa(void 0);
|
|
2234
2240
|
ta(() => {
|
|
2235
2241
|
R(q);
|
|
2236
2242
|
}, [q]), ta(() => () => k && k instanceof File && URL.revokeObjectURL(k.preview), [k]);
|
|
2237
2243
|
const X = (_) => {
|
|
2238
2244
|
const [d] = _;
|
|
2239
2245
|
d instanceof File && (d.preview = URL.createObjectURL(d)), R(d), z(null);
|
|
2240
|
-
const A =
|
|
2246
|
+
const A = ai({ name: F, value: d });
|
|
2241
2247
|
h == null || h(A), l == null || l(A);
|
|
2242
2248
|
}, T = (_, d) => {
|
|
2243
2249
|
let A;
|
|
@@ -2249,7 +2255,7 @@ const St = "_root_tju30_2", qt = "_disabled_tju30_26", Tt = "_actions_tju30_65",
|
|
|
2249
2255
|
}), R(null), z(A), E == null || E(A), h == null || h(d), P == null || P();
|
|
2250
2256
|
}, L = (_) => {
|
|
2251
2257
|
_.preventDefault(), R(null), z(null);
|
|
2252
|
-
const d =
|
|
2258
|
+
const d = ai({ name: F, value: null });
|
|
2253
2259
|
h == null || h(d), r == null || r(d);
|
|
2254
2260
|
}, { getInputProps: oa, getRootProps: Q, isDragAccept: C, isDragActive: g, isDragReject: b, open: ca } = Ei({
|
|
2255
2261
|
accept: a,
|
|
@@ -2289,9 +2295,9 @@ const St = "_root_tju30_2", qt = "_disabled_tju30_26", Tt = "_actions_tju30_65",
|
|
|
2289
2295
|
error: K,
|
|
2290
2296
|
file: k,
|
|
2291
2297
|
fileName: n,
|
|
2292
|
-
fileUrl: k &&
|
|
2298
|
+
fileUrl: k && $t(k),
|
|
2293
2299
|
forceFileType: o,
|
|
2294
|
-
isAnImage: o === "image" ||
|
|
2300
|
+
isAnImage: o === "image" || Nt(k),
|
|
2295
2301
|
isHoverAccept: C,
|
|
2296
2302
|
isHoverReject: b,
|
|
2297
2303
|
openFile: ca,
|
|
@@ -2316,6 +2322,7 @@ const St = "_root_tju30_2", qt = "_disabled_tju30_26", Tt = "_actions_tju30_65",
|
|
|
2316
2322
|
);
|
|
2317
2323
|
}
|
|
2318
2324
|
);
|
|
2325
|
+
Ut.displayName = "FileDrop";
|
|
2319
2326
|
export {
|
|
2320
|
-
|
|
2327
|
+
Ut as FileDrop
|
|
2321
2328
|
};
|