@lanaco/lnc-react-ui 4.0.2 → 4.0.5
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/Accordion.cjs +1 -1
- package/dist/Accordion.js +55 -50
- package/dist/AccordionDetails.cjs +1 -1
- package/dist/AccordionDetails.js +15 -15
- package/dist/AccordionSummary.cjs +1 -1
- package/dist/AccordionSummary.js +11 -11
- package/dist/ActionsToolbar.cjs +2 -2
- package/dist/ActionsToolbar.js +16 -16
- package/dist/Alert.cjs +1 -1
- package/dist/Alert.js +23 -23
- package/dist/Avatar.cjs +2 -2
- package/dist/Avatar.js +18 -21
- package/dist/Badge.cjs +1 -1
- package/dist/Badge.js +21 -14
- package/dist/Breadcrumbs.cjs +1 -1
- package/dist/Breadcrumbs.js +28 -28
- package/dist/Button.cjs +2 -2
- package/dist/Button.js +21 -22
- package/dist/ButtonGroup.cjs +1 -1
- package/dist/ButtonGroup.js +10 -6
- package/dist/CheckBoxInput.cjs +1 -1
- package/dist/CheckBoxInput.js +6 -6
- package/dist/Chip.cjs +1 -1
- package/dist/Chip.js +9 -9
- package/dist/ColorInput.cjs +1 -1
- package/dist/ColorInput.js +20 -20
- package/dist/ConfirmationForm.cjs +1 -1
- package/dist/ConfirmationForm.js +58 -58
- package/dist/Content.cjs +1 -1
- package/dist/Content.js +8 -8
- package/dist/{CustomStyles-nfD3J1mi.js → CustomStyles-BUSJ8bZt.js} +5 -5
- package/dist/{CustomStyles-CqlCjTgU.cjs → CustomStyles-Dlqxic2X.cjs} +1 -1
- package/dist/DataView.cjs +1 -1
- package/dist/DataView.js +35 -35
- package/dist/DateInput.cjs +4 -4
- package/dist/DateInput.js +491 -491
- package/dist/DecimalInput.cjs +1 -1
- package/dist/DecimalInput.js +43 -43
- package/dist/DetailsView.cjs +4 -4
- package/dist/DetailsView.js +40 -40
- package/dist/DoubleRangeSlider.cjs +1 -1
- package/dist/DoubleRangeSlider.js +33 -33
- package/dist/DragAndDropFile.cjs +1 -1
- package/dist/DragAndDropFile.js +165 -165
- package/dist/DragDropFiles.cjs +1 -1
- package/dist/DragDropFiles.js +31 -31
- package/dist/Drawer.cjs +1 -1
- package/dist/Drawer.js +47 -47
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +39 -39
- package/dist/DropdownItem.cjs +1 -1
- package/dist/DropdownItem.js +23 -23
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +36 -36
- package/dist/DropdownMenu.cjs +7 -1
- package/dist/DropdownMenu.js +192 -10
- package/dist/EditableTable.cjs +1 -1
- package/dist/EditableTable.js +4 -4
- package/dist/FileInput.cjs +1 -1
- package/dist/FileInput.js +24 -24
- package/dist/FlexBox.cjs +1 -1
- package/dist/FlexBox.js +14 -14
- package/dist/FlexGrid.cjs +1 -1
- package/dist/FlexGrid.js +30 -30
- package/dist/FlexGridItem.cjs +1 -1
- package/dist/FlexGridItem.js +16 -16
- package/dist/Footer.cjs +1 -1
- package/dist/Footer.js +5 -5
- package/dist/FormField.cjs +1 -1
- package/dist/FormField.js +8 -9
- package/dist/FormView.cjs +1 -1
- package/dist/FormView.js +31 -31
- package/dist/Grid.cjs +2 -3
- package/dist/Grid.js +38 -10
- package/dist/GridItem.cjs +2 -2
- package/dist/GridItem.js +29 -9
- package/dist/Header.cjs +1 -1
- package/dist/Header.js +7 -7
- package/dist/Icon.cjs +2 -2
- package/dist/Icon.js +35 -13
- package/dist/IconButton.cjs +1 -1
- package/dist/IconButton.js +51 -52
- package/dist/Kanban.cjs +12 -12
- package/dist/Kanban.js +891 -879
- package/dist/KanbanActionsToolbar.cjs +2 -2
- package/dist/KanbanActionsToolbar.js +28 -28
- package/dist/{KanbanCard-D9OhU8C6.js → KanbanCard-CHZ_C9kk.js} +50 -50
- package/dist/KanbanCard-DV3VnSUi.cjs +30 -0
- package/dist/KanbanCard.cjs +1 -1
- package/dist/KanbanCard.js +5 -5
- package/dist/KanbanFooter.cjs +1 -1
- package/dist/KanbanFooter.js +40 -40
- package/dist/KanbanHeader.cjs +2 -2
- package/dist/KanbanHeader.js +46 -46
- package/dist/KanbanView.cjs +1 -1
- package/dist/KanbanView.js +27 -27
- package/dist/Link.cjs +1 -1
- package/dist/Link.js +9 -9
- package/dist/MenuItem.cjs +1 -1
- package/dist/MenuItem.js +39 -39
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.js +42 -42
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +6 -6
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +6 -6
- package/dist/NestedDropdownItem.cjs +1 -1
- package/dist/NestedDropdownItem.js +40 -40
- package/dist/NestedMenuItem.cjs +1 -1
- package/dist/NestedMenuItem.js +45 -45
- package/dist/Notification.cjs +1 -83
- package/dist/Notification.js +3 -1077
- package/dist/NotificationContainer.cjs +37 -0
- package/dist/NotificationContainer.js +162 -0
- package/dist/NotificationMessage.cjs +47 -0
- package/dist/NotificationMessage.js +133 -0
- package/dist/NumberInput.cjs +1 -1
- package/dist/NumberInput.js +17 -17
- package/dist/PageLayout.cjs +1 -1
- package/dist/PageLayout.js +32 -32
- package/dist/Pagination.cjs +12 -0
- package/dist/Pagination.js +248 -0
- package/dist/PasswordInput.cjs +1 -1
- package/dist/PasswordInput.js +33 -33
- package/dist/Popover.cjs +1 -0
- package/dist/Popover.js +36 -0
- package/dist/PopoverClose.cjs +1 -0
- package/dist/PopoverClose.js +15 -0
- package/dist/PopoverContent.cjs +10 -0
- package/dist/PopoverContent.js +68 -0
- package/dist/PopoverContext.cjs +1 -0
- package/dist/PopoverContext.js +5 -0
- package/dist/PopoverDescription.cjs +1 -0
- package/dist/PopoverDescription.js +16 -0
- package/dist/PopoverHeading.cjs +1 -0
- package/dist/PopoverHeading.js +16 -0
- package/dist/PopoverTrigger.cjs +1 -0
- package/dist/PopoverTrigger.js +38 -0
- package/dist/ProgressBar.cjs +1 -1
- package/dist/ProgressBar.js +35 -24
- package/dist/RadioGroup.cjs +1 -1
- package/dist/RadioGroup.js +13 -13
- package/dist/RadioInput.cjs +1 -1
- package/dist/RadioInput.js +10 -10
- package/dist/RangeSlider.cjs +1 -1
- package/dist/RangeSlider.js +27 -27
- package/dist/SearchBar.cjs +1 -1
- package/dist/SearchBar.js +77 -77
- package/dist/Separator.cjs +1 -1
- package/dist/Separator.js +9 -9
- package/dist/Sidebar.cjs +1 -1
- package/dist/Sidebar.js +13 -13
- package/dist/Spinner.cjs +1 -1
- package/dist/Spinner.js +25 -20
- package/dist/Surface.cjs +2 -2
- package/dist/Surface.js +14 -15
- package/dist/SwipeableDrawer.cjs +1 -1
- package/dist/SwipeableDrawer.js +18 -18
- package/dist/TabItem.cjs +26 -0
- package/dist/TabItem.js +210 -0
- package/dist/Table.cjs +20 -20
- package/dist/Table.js +13 -12
- package/dist/TableView.cjs +8 -1
- package/dist/TableView.js +238 -9
- package/dist/Tabs.cjs +1 -1
- package/dist/Tabs.js +33 -27
- package/dist/TextAreaInput.cjs +1 -1
- package/dist/TextAreaInput.js +35 -35
- package/dist/TextInput.cjs +1 -1
- package/dist/TextInput.js +24 -24
- package/dist/ThemeProvider.cjs +1 -1
- package/dist/ThemeProvider.js +85 -85
- package/dist/TimeInput.cjs +1 -1
- package/dist/TimeInput.js +13 -13
- package/dist/Toggle.cjs +1 -1
- package/dist/Toggle.js +4 -5
- package/dist/TreeMenu.cjs +1 -1
- package/dist/TreeMenu.js +57 -57
- package/dist/TreeMenuSeparator.cjs +3 -3
- package/dist/TreeMenuSeparator.js +11 -11
- package/dist/UploadedFile.cjs +1 -1
- package/dist/UploadedFile.js +29 -29
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +1 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/{defineProperty-BHpTtkhC.js → defineProperty-B5pLF6px.js} +8 -8
- package/dist/{emotion-element-5486c51c.browser.esm-CSejtOeT.js → emotion-element-5486c51c.browser.esm-Bb4VkP8U.js} +4 -4
- package/dist/{emotion-is-prop-valid.esm-BzFBwmJz.js → emotion-is-prop-valid.esm-DkbeH1Xy.js} +1 -1
- package/dist/{emotion-react.browser.esm-OWM-uG8Q.js → emotion-react.browser.esm-CN-s34fZ.js} +6 -6
- package/dist/{emotion-react.browser.esm-DQBL7Wls.cjs → emotion-react.browser.esm-D7h2t2Bz.cjs} +1 -1
- package/dist/{emotion-styled.browser.esm-BZSYYThs.js → emotion-styled.browser.esm-BiK8DcgW.js} +12 -12
- package/dist/floating-ui.react.esm-72DKnou_.js +1198 -0
- package/dist/floating-ui.react.esm-C4vrBVJU.cjs +4 -0
- package/dist/{hoist-non-react-statics.cjs-Drf1aBlk.js → hoist-non-react-statics.cjs-CAHiRNzQ.js} +1 -1
- package/dist/{hoist-non-react-statics.cjs-B8r9S_ak.cjs → hoist-non-react-statics.cjs-Dr-ytKVG.cjs} +3 -3
- package/dist/{index-CZJEA84h.js → index--Kmch3aI.js} +1 -1
- package/dist/index-BIlhCoy2.cjs +20 -0
- package/dist/{index-BLQWNy78.js → index-BUChtubz.js} +4 -4
- package/dist/{index-Ds9PUTwb.js → index-BYnWp42a.js} +208 -213
- package/dist/{index-D5vEbKUT.js → index-CNBqQrtK.js} +1 -1
- package/dist/{index-IO9v6o0I.cjs → index-CSXL784P.cjs} +2 -2
- package/dist/{index-C29T0m2a.cjs → index-Ct1N7fF4.cjs} +1 -1
- package/dist/{index-BklgDeu4.js → index-Cu0xwYjD.js} +1 -1
- package/dist/{index-Cdkz-XH-.js → index-CvebWhtp.js} +1 -1
- package/dist/index-DAOBjHnD.cjs +1 -0
- package/dist/index-DBXXH_TD.cjs +1 -0
- package/dist/{index-B_da1uvD.js → index-DLVVKJXD.js} +1 -1
- package/dist/index-DaiUAQVF.cjs +1 -0
- package/dist/index.cjs +1 -26
- package/dist/index.js +180 -376
- package/dist/{motion-CtkUpWEn.js → motion-ecIGZGwI.js} +1 -1
- package/dist/react-toastify.esm-CkXGwKXL.js +798 -0
- package/dist/react-toastify.esm-Dqcb4SQT.cjs +1 -0
- package/dist/{setPrototypeOf-a891FLQJ.js → setPrototypeOf-CttqfWo1.js} +2 -2
- package/dist/style.css +1 -5
- package/dist/{tslib.es6-ZNVz5r_T.js → tslib.es6-DQ-SzcmG.js} +5 -5
- package/dist/usePopover.cjs +1 -0
- package/dist/usePopover.js +44 -0
- package/dist/{utils-DEke8iwo.js → utils-C52T57HO.js} +73 -73
- package/dist/{utils-hdRGTsQ7.cjs → utils-DTAPpJXU.cjs} +1 -1
- package/package.json +17 -5
- package/vite.config.js +16 -0
- package/custom-addons/ThemeSelector.js +0 -111
- package/custom-addons/register.js +0 -16
- package/custom-addons/theme-selector.css +0 -17
- package/dist/DropdownMenu-B6qr13ik.cjs +0 -19
- package/dist/DropdownMenu-DZi3TJ8Q.js +0 -1547
- package/dist/KanbanCard-ConTmu3w.cjs +0 -30
- package/dist/TableView-Cj5_fbSR.js +0 -481
- package/dist/TableView-D8ex512p.cjs +0 -19
- package/dist/index-BjdOz5Ok.cjs +0 -1
- package/dist/index-DXnSjbfJ.cjs +0 -20
- package/dist/index-Dzkd2i4n.cjs +0 -1
- package/dist/index-P-naJISQ.cjs +0 -1
package/dist/DragAndDropFile.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { P as o } from "./index-
|
|
4
|
-
import { n as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import { u as
|
|
10
|
-
const
|
|
1
|
+
import { jsxs as Ha, jsx as ia, Fragment as yi } from "react/jsx-runtime";
|
|
2
|
+
import wi, { useMemo as Y, useRef as ta, useReducer as ki, useEffect as xa, useCallback as h, forwardRef as ei, useImperativeHandle as ji, Fragment as Di, useState as Wa, cloneElement as zi } from "react";
|
|
3
|
+
import { P as o } from "./index-BYnWp42a.js";
|
|
4
|
+
import { n as Ia } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
5
|
+
import Na from "./Icon.js";
|
|
6
|
+
import { b as R } from "./tslib.es6-DQ-SzcmG.js";
|
|
7
|
+
import Ai from "./Button.js";
|
|
8
|
+
import { a as Ua } from "./utils-C52T57HO.js";
|
|
9
|
+
import { u as Ei } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
10
|
+
const Fi = /* @__PURE__ */ new Map([
|
|
11
11
|
// https://github.com/guzzle/psr7/blob/2d9260799e713f1c475d3c5fdc3d6561ff7441b2/src/MimeType.php
|
|
12
12
|
["1km", "application/vnd.1000minds.decision-model+xml"],
|
|
13
13
|
["3dml", "text/vnd.in3d.3dml"],
|
|
@@ -1211,13 +1211,13 @@ const Ei = /* @__PURE__ */ new Map([
|
|
|
1211
1211
|
["zsh", "text/x-scriptzsh"]
|
|
1212
1212
|
]);
|
|
1213
1213
|
function G(a, i, t) {
|
|
1214
|
-
const n =
|
|
1215
|
-
return typeof n.path != "string" &&
|
|
1214
|
+
const n = Oi(a), { webkitRelativePath: e } = a, l = typeof i == "string" ? i : typeof e == "string" && e.length > 0 ? e : `./${a.name}`;
|
|
1215
|
+
return typeof n.path != "string" && Ya(n, "path", l), Ya(n, "relativePath", l), n;
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function Oi(a) {
|
|
1218
1218
|
const { name: i } = a;
|
|
1219
1219
|
if (i && i.lastIndexOf(".") !== -1 && !a.type) {
|
|
1220
|
-
const n = i.split(".").pop().toLowerCase(), e =
|
|
1220
|
+
const n = i.split(".").pop().toLowerCase(), e = Fi.get(n);
|
|
1221
1221
|
e && Object.defineProperty(a, "type", {
|
|
1222
1222
|
value: e,
|
|
1223
1223
|
writable: !1,
|
|
@@ -1227,7 +1227,7 @@ function Fi(a) {
|
|
|
1227
1227
|
}
|
|
1228
1228
|
return a;
|
|
1229
1229
|
}
|
|
1230
|
-
function
|
|
1230
|
+
function Ya(a, i, t) {
|
|
1231
1231
|
Object.defineProperty(a, i, {
|
|
1232
1232
|
value: t,
|
|
1233
1233
|
writable: !1,
|
|
@@ -1235,51 +1235,51 @@ function Ga(a, i, t) {
|
|
|
1235
1235
|
enumerable: !0
|
|
1236
1236
|
});
|
|
1237
1237
|
}
|
|
1238
|
-
const
|
|
1238
|
+
const _i = [
|
|
1239
1239
|
// Thumbnail cache files for macOS and Windows
|
|
1240
1240
|
".DS_Store",
|
|
1241
1241
|
// macOs
|
|
1242
1242
|
"Thumbs.db"
|
|
1243
1243
|
// Windows
|
|
1244
1244
|
];
|
|
1245
|
-
function
|
|
1245
|
+
function Pi(a) {
|
|
1246
1246
|
return R(this, void 0, void 0, function* () {
|
|
1247
|
-
return ga(a) &&
|
|
1247
|
+
return ga(a) && Si(a.dataTransfer) ? Ii(a.dataTransfer, a.type) : Ci(a) ? Ti(a) : Array.isArray(a) && a.every((i) => "getFile" in i && typeof i.getFile == "function") ? qi(a) : [];
|
|
1248
1248
|
});
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function Si(a) {
|
|
1251
1251
|
return ga(a);
|
|
1252
1252
|
}
|
|
1253
|
-
function
|
|
1253
|
+
function Ci(a) {
|
|
1254
1254
|
return ga(a) && ga(a.target);
|
|
1255
1255
|
}
|
|
1256
1256
|
function ga(a) {
|
|
1257
1257
|
return typeof a == "object" && a !== null;
|
|
1258
1258
|
}
|
|
1259
|
-
function Ci(a) {
|
|
1260
|
-
return Sa(a.target.files).map((i) => G(i));
|
|
1261
|
-
}
|
|
1262
1259
|
function Ti(a) {
|
|
1260
|
+
return Pa(a.target.files).map((i) => G(i));
|
|
1261
|
+
}
|
|
1262
|
+
function qi(a) {
|
|
1263
1263
|
return R(this, void 0, void 0, function* () {
|
|
1264
1264
|
return (yield Promise.all(a.map((t) => t.getFile()))).map((t) => G(t));
|
|
1265
1265
|
});
|
|
1266
1266
|
}
|
|
1267
|
-
function
|
|
1267
|
+
function Ii(a, i) {
|
|
1268
1268
|
return R(this, void 0, void 0, function* () {
|
|
1269
1269
|
if (a.items) {
|
|
1270
|
-
const t =
|
|
1270
|
+
const t = Pa(a.items).filter((e) => e.kind === "file");
|
|
1271
1271
|
if (i !== "drop")
|
|
1272
1272
|
return t;
|
|
1273
|
-
const n = yield Promise.all(t.map(
|
|
1274
|
-
return
|
|
1273
|
+
const n = yield Promise.all(t.map(Ri));
|
|
1274
|
+
return Ga(pi(n));
|
|
1275
1275
|
}
|
|
1276
|
-
return
|
|
1276
|
+
return Ga(Pa(a.files).map((t) => G(t)));
|
|
1277
1277
|
});
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1280
|
-
return a.filter((i) =>
|
|
1279
|
+
function Ga(a) {
|
|
1280
|
+
return a.filter((i) => _i.indexOf(i.name) === -1);
|
|
1281
1281
|
}
|
|
1282
|
-
function
|
|
1282
|
+
function Pa(a) {
|
|
1283
1283
|
if (a === null)
|
|
1284
1284
|
return [];
|
|
1285
1285
|
const i = [];
|
|
@@ -1289,11 +1289,11 @@ function Sa(a) {
|
|
|
1289
1289
|
}
|
|
1290
1290
|
return i;
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1292
|
+
function Ri(a) {
|
|
1293
1293
|
if (typeof a.webkitGetAsEntry != "function")
|
|
1294
|
-
return
|
|
1294
|
+
return Va(a);
|
|
1295
1295
|
const i = a.webkitGetAsEntry();
|
|
1296
|
-
return i && i.isDirectory ? oi(i) :
|
|
1296
|
+
return i && i.isDirectory ? oi(i) : Va(a, i);
|
|
1297
1297
|
}
|
|
1298
1298
|
function pi(a) {
|
|
1299
1299
|
return a.reduce((i, t) => [
|
|
@@ -1301,9 +1301,9 @@ function pi(a) {
|
|
|
1301
1301
|
...Array.isArray(t) ? pi(t) : [t]
|
|
1302
1302
|
], []);
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function Va(a, i) {
|
|
1305
1305
|
var t;
|
|
1306
|
-
if (typeof a.getAsFileSystemHandle == "function")
|
|
1306
|
+
if (globalThis.isSecureContext && typeof a.getAsFileSystemHandle == "function")
|
|
1307
1307
|
return a.getAsFileSystemHandle().then((l) => R(this, void 0, void 0, function* () {
|
|
1308
1308
|
const r = yield l.getFile();
|
|
1309
1309
|
return r.handle = l, G(r);
|
|
@@ -1314,9 +1314,9 @@ function Ja(a, i) {
|
|
|
1314
1314
|
const e = G(n, (t = i == null ? void 0 : i.fullPath) !== null && t !== void 0 ? t : void 0);
|
|
1315
1315
|
return Promise.resolve(e);
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1317
|
+
function Li(a) {
|
|
1318
1318
|
return R(this, void 0, void 0, function* () {
|
|
1319
|
-
return a.isDirectory ? oi(a) :
|
|
1319
|
+
return a.isDirectory ? oi(a) : Mi(a);
|
|
1320
1320
|
});
|
|
1321
1321
|
}
|
|
1322
1322
|
function oi(a) {
|
|
@@ -1326,7 +1326,7 @@ function oi(a) {
|
|
|
1326
1326
|
function l() {
|
|
1327
1327
|
i.readEntries((r) => R(this, void 0, void 0, function* () {
|
|
1328
1328
|
if (r.length) {
|
|
1329
|
-
const s = Promise.all(r.map(
|
|
1329
|
+
const s = Promise.all(r.map(Li));
|
|
1330
1330
|
e.push(s), l();
|
|
1331
1331
|
} else
|
|
1332
1332
|
try {
|
|
@@ -1342,7 +1342,7 @@ function oi(a) {
|
|
|
1342
1342
|
l();
|
|
1343
1343
|
});
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1345
|
+
function Mi(a) {
|
|
1346
1346
|
return R(this, void 0, void 0, function* () {
|
|
1347
1347
|
return new Promise((i, t) => {
|
|
1348
1348
|
a.file((n) => {
|
|
@@ -1367,20 +1367,20 @@ var Oa = function(a, i) {
|
|
|
1367
1367
|
}
|
|
1368
1368
|
return !0;
|
|
1369
1369
|
};
|
|
1370
|
-
function
|
|
1371
|
-
return
|
|
1370
|
+
function Ja(a) {
|
|
1371
|
+
return Bi(a) || Ki(a) || li(a) || $i();
|
|
1372
1372
|
}
|
|
1373
|
-
function
|
|
1373
|
+
function $i() {
|
|
1374
1374
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1375
1375
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1376
1376
|
}
|
|
1377
|
-
function
|
|
1377
|
+
function Ki(a) {
|
|
1378
1378
|
if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
|
|
1379
1379
|
}
|
|
1380
|
-
function
|
|
1381
|
-
if (Array.isArray(a)) return
|
|
1380
|
+
function Bi(a) {
|
|
1381
|
+
if (Array.isArray(a)) return Sa(a);
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1383
|
+
function Qa(a, i) {
|
|
1384
1384
|
var t = Object.keys(a);
|
|
1385
1385
|
if (Object.getOwnPropertySymbols) {
|
|
1386
1386
|
var n = Object.getOwnPropertySymbols(a);
|
|
@@ -1390,12 +1390,12 @@ function Xa(a, i) {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
return t;
|
|
1392
1392
|
}
|
|
1393
|
-
function
|
|
1393
|
+
function Xa(a) {
|
|
1394
1394
|
for (var i = 1; i < arguments.length; i++) {
|
|
1395
1395
|
var t = arguments[i] != null ? arguments[i] : {};
|
|
1396
|
-
i % 2 ?
|
|
1396
|
+
i % 2 ? Qa(Object(t), !0).forEach(function(n) {
|
|
1397
1397
|
ci(a, n, t[n]);
|
|
1398
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) :
|
|
1398
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : Qa(Object(t)).forEach(function(n) {
|
|
1399
1399
|
Object.defineProperty(a, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1400
1400
|
});
|
|
1401
1401
|
}
|
|
@@ -1405,27 +1405,27 @@ function ci(a, i, t) {
|
|
|
1405
1405
|
return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
|
|
1406
1406
|
}
|
|
1407
1407
|
function na(a, i) {
|
|
1408
|
-
return
|
|
1408
|
+
return Ni(a) || Wi(a, i) || li(a, i) || Hi();
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1410
|
+
function Hi() {
|
|
1411
1411
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1412
1412
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1413
1413
|
}
|
|
1414
1414
|
function li(a, i) {
|
|
1415
1415
|
if (a) {
|
|
1416
|
-
if (typeof a == "string") return
|
|
1416
|
+
if (typeof a == "string") return Sa(a, i);
|
|
1417
1417
|
var t = Object.prototype.toString.call(a).slice(8, -1);
|
|
1418
1418
|
if (t === "Object" && a.constructor && (t = a.constructor.name), t === "Map" || t === "Set") return Array.from(a);
|
|
1419
|
-
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return
|
|
1419
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Sa(a, i);
|
|
1420
1420
|
}
|
|
1421
1421
|
}
|
|
1422
|
-
function
|
|
1422
|
+
function Sa(a, i) {
|
|
1423
1423
|
(i == null || i > a.length) && (i = a.length);
|
|
1424
1424
|
for (var t = 0, n = new Array(i); t < i; t++)
|
|
1425
1425
|
n[t] = a[t];
|
|
1426
1426
|
return n;
|
|
1427
1427
|
}
|
|
1428
|
-
function
|
|
1428
|
+
function Wi(a, i) {
|
|
1429
1429
|
var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
|
|
1430
1430
|
if (t != null) {
|
|
1431
1431
|
var n = [], e = !0, l = !1, r, s;
|
|
@@ -1444,48 +1444,48 @@ function Hi(a, i) {
|
|
|
1444
1444
|
return n;
|
|
1445
1445
|
}
|
|
1446
1446
|
}
|
|
1447
|
-
function
|
|
1447
|
+
function Ni(a) {
|
|
1448
1448
|
if (Array.isArray(a)) return a;
|
|
1449
1449
|
}
|
|
1450
|
-
var
|
|
1450
|
+
var Ui = typeof Oa == "function" ? Oa : Oa.default, Yi = "file-invalid-type", Gi = "file-too-large", Vi = "file-too-small", Ji = "too-many-files", Qi = function() {
|
|
1451
1451
|
var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", t = i.split(","), n = t.length > 1 ? "one of ".concat(t.join(", ")) : t[0];
|
|
1452
1452
|
return {
|
|
1453
|
-
code:
|
|
1453
|
+
code: Yi,
|
|
1454
1454
|
message: "File type must be ".concat(n)
|
|
1455
1455
|
};
|
|
1456
|
-
},
|
|
1456
|
+
}, Za = function(i) {
|
|
1457
1457
|
return {
|
|
1458
|
-
code:
|
|
1458
|
+
code: Gi,
|
|
1459
1459
|
message: "File is larger than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
|
|
1460
1460
|
};
|
|
1461
|
-
},
|
|
1461
|
+
}, ai = function(i) {
|
|
1462
1462
|
return {
|
|
1463
|
-
code:
|
|
1463
|
+
code: Vi,
|
|
1464
1464
|
message: "File is smaller than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
|
|
1465
1465
|
};
|
|
1466
|
-
},
|
|
1467
|
-
code:
|
|
1466
|
+
}, Xi = {
|
|
1467
|
+
code: Ji,
|
|
1468
1468
|
message: "Too many files"
|
|
1469
1469
|
};
|
|
1470
1470
|
function ri(a, i) {
|
|
1471
|
-
var t = a.type === "application/x-moz-file" ||
|
|
1472
|
-
return [t, t ? null :
|
|
1471
|
+
var t = a.type === "application/x-moz-file" || Ui(a, i);
|
|
1472
|
+
return [t, t ? null : Qi(i)];
|
|
1473
1473
|
}
|
|
1474
1474
|
function si(a, i, t) {
|
|
1475
1475
|
if (I(a.size))
|
|
1476
1476
|
if (I(i) && I(t)) {
|
|
1477
|
-
if (a.size > t) return [!1,
|
|
1478
|
-
if (a.size < i) return [!1,
|
|
1477
|
+
if (a.size > t) return [!1, Za(t)];
|
|
1478
|
+
if (a.size < i) return [!1, ai(i)];
|
|
1479
1479
|
} else {
|
|
1480
|
-
if (I(i) && a.size < i) return [!1,
|
|
1481
|
-
if (I(t) && a.size > t) return [!1,
|
|
1480
|
+
if (I(i) && a.size < i) return [!1, ai(i)];
|
|
1481
|
+
if (I(t) && a.size > t) return [!1, Za(t)];
|
|
1482
1482
|
}
|
|
1483
1483
|
return [!0, null];
|
|
1484
1484
|
}
|
|
1485
1485
|
function I(a) {
|
|
1486
1486
|
return a != null;
|
|
1487
1487
|
}
|
|
1488
|
-
function
|
|
1488
|
+
function Zi(a) {
|
|
1489
1489
|
var i = a.files, t = a.accept, n = a.minSize, e = a.maxSize, l = a.multiple, r = a.maxFiles, s = a.validator;
|
|
1490
1490
|
return !l && i.length > 1 || l && r >= 1 && i.length > r ? !1 : i.every(function(g) {
|
|
1491
1491
|
var E = ri(g, t), w = na(E, 1), F = w[0], L = si(g, n, e), j = na(L, 1), O = j[0], _ = s ? s(g) : null;
|
|
@@ -1500,18 +1500,18 @@ function fa(a) {
|
|
|
1500
1500
|
return i === "Files" || i === "application/x-moz-file";
|
|
1501
1501
|
}) : !!a.target && !!a.target.files;
|
|
1502
1502
|
}
|
|
1503
|
-
function
|
|
1503
|
+
function ii(a) {
|
|
1504
1504
|
a.preventDefault();
|
|
1505
1505
|
}
|
|
1506
|
-
function
|
|
1506
|
+
function at(a) {
|
|
1507
1507
|
return a.indexOf("MSIE") !== -1 || a.indexOf("Trident/") !== -1;
|
|
1508
1508
|
}
|
|
1509
|
-
function
|
|
1509
|
+
function it(a) {
|
|
1510
1510
|
return a.indexOf("Edge/") !== -1;
|
|
1511
1511
|
}
|
|
1512
|
-
function
|
|
1512
|
+
function tt() {
|
|
1513
1513
|
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
|
|
1514
|
-
return
|
|
1514
|
+
return at(a) || it(a);
|
|
1515
1515
|
}
|
|
1516
1516
|
function k() {
|
|
1517
1517
|
for (var a = arguments.length, i = new Array(a), t = 0; t < a; t++)
|
|
@@ -1524,17 +1524,17 @@ function k() {
|
|
|
1524
1524
|
});
|
|
1525
1525
|
};
|
|
1526
1526
|
}
|
|
1527
|
-
function
|
|
1527
|
+
function nt() {
|
|
1528
1528
|
return "showOpenFilePicker" in window;
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1530
|
+
function et(a) {
|
|
1531
1531
|
if (I(a)) {
|
|
1532
1532
|
var i = Object.entries(a).filter(function(t) {
|
|
1533
1533
|
var n = na(t, 2), e = n[0], l = n[1], r = !0;
|
|
1534
1534
|
return di(e) || (console.warn('Skipped "'.concat(e, '" 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.')), r = !1), (!Array.isArray(l) || !l.every(mi)) && (console.warn('Skipped "'.concat(e, '" because an invalid file extension was provided.')), r = !1), r;
|
|
1535
1535
|
}).reduce(function(t, n) {
|
|
1536
1536
|
var e = na(n, 2), l = e[0], r = e[1];
|
|
1537
|
-
return
|
|
1537
|
+
return Xa(Xa({}, t), {}, ci({}, l, r));
|
|
1538
1538
|
}, {});
|
|
1539
1539
|
return [{
|
|
1540
1540
|
// description is required due to https://crbug.com/1264708
|
|
@@ -1544,19 +1544,19 @@ function nt(a) {
|
|
|
1544
1544
|
}
|
|
1545
1545
|
return a;
|
|
1546
1546
|
}
|
|
1547
|
-
function
|
|
1547
|
+
function pt(a) {
|
|
1548
1548
|
if (I(a))
|
|
1549
1549
|
return Object.entries(a).reduce(function(i, t) {
|
|
1550
1550
|
var n = na(t, 2), e = n[0], l = n[1];
|
|
1551
|
-
return [].concat(
|
|
1551
|
+
return [].concat(Ja(i), [e], Ja(l));
|
|
1552
1552
|
}, []).filter(function(i) {
|
|
1553
1553
|
return di(i) || mi(i);
|
|
1554
1554
|
}).join(",");
|
|
1555
1555
|
}
|
|
1556
|
-
function
|
|
1556
|
+
function ot(a) {
|
|
1557
1557
|
return a instanceof DOMException && (a.name === "AbortError" || a.code === a.ABORT_ERR);
|
|
1558
1558
|
}
|
|
1559
|
-
function
|
|
1559
|
+
function ct(a) {
|
|
1560
1560
|
return a instanceof DOMException && (a.name === "SecurityError" || a.code === a.SECURITY_ERR);
|
|
1561
1561
|
}
|
|
1562
1562
|
function di(a) {
|
|
@@ -1565,42 +1565,42 @@ function di(a) {
|
|
|
1565
1565
|
function mi(a) {
|
|
1566
1566
|
return /^.*\.[\w]+$/.test(a);
|
|
1567
1567
|
}
|
|
1568
|
-
var
|
|
1569
|
-
function
|
|
1570
|
-
return
|
|
1568
|
+
var lt = ["children"], rt = ["open"], st = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], dt = ["refKey", "onChange", "onClick"];
|
|
1569
|
+
function mt(a) {
|
|
1570
|
+
return ft(a) || vt(a) || ui(a) || ut();
|
|
1571
1571
|
}
|
|
1572
|
-
function
|
|
1572
|
+
function ut() {
|
|
1573
1573
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1574
1574
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1575
1575
|
}
|
|
1576
|
-
function
|
|
1576
|
+
function vt(a) {
|
|
1577
1577
|
if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1580
|
-
if (Array.isArray(a)) return
|
|
1579
|
+
function ft(a) {
|
|
1580
|
+
if (Array.isArray(a)) return Ca(a);
|
|
1581
1581
|
}
|
|
1582
1582
|
function _a(a, i) {
|
|
1583
|
-
return
|
|
1583
|
+
return bt(a) || gt(a, i) || ui(a, i) || xt();
|
|
1584
1584
|
}
|
|
1585
|
-
function
|
|
1585
|
+
function xt() {
|
|
1586
1586
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1587
1587
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1588
1588
|
}
|
|
1589
1589
|
function ui(a, i) {
|
|
1590
1590
|
if (a) {
|
|
1591
|
-
if (typeof a == "string") return
|
|
1591
|
+
if (typeof a == "string") return Ca(a, i);
|
|
1592
1592
|
var t = Object.prototype.toString.call(a).slice(8, -1);
|
|
1593
1593
|
if (t === "Object" && a.constructor && (t = a.constructor.name), t === "Map" || t === "Set") return Array.from(a);
|
|
1594
|
-
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return
|
|
1594
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Ca(a, i);
|
|
1595
1595
|
}
|
|
1596
1596
|
}
|
|
1597
|
-
function
|
|
1597
|
+
function Ca(a, i) {
|
|
1598
1598
|
(i == null || i > a.length) && (i = a.length);
|
|
1599
1599
|
for (var t = 0, n = new Array(i); t < i; t++)
|
|
1600
1600
|
n[t] = a[t];
|
|
1601
1601
|
return n;
|
|
1602
1602
|
}
|
|
1603
|
-
function
|
|
1603
|
+
function gt(a, i) {
|
|
1604
1604
|
var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
|
|
1605
1605
|
if (t != null) {
|
|
1606
1606
|
var n = [], e = !0, l = !1, r, s;
|
|
@@ -1619,10 +1619,10 @@ function xt(a, i) {
|
|
|
1619
1619
|
return n;
|
|
1620
1620
|
}
|
|
1621
1621
|
}
|
|
1622
|
-
function
|
|
1622
|
+
function bt(a) {
|
|
1623
1623
|
if (Array.isArray(a)) return a;
|
|
1624
1624
|
}
|
|
1625
|
-
function
|
|
1625
|
+
function ti(a, i) {
|
|
1626
1626
|
var t = Object.keys(a);
|
|
1627
1627
|
if (Object.getOwnPropertySymbols) {
|
|
1628
1628
|
var n = Object.getOwnPropertySymbols(a);
|
|
@@ -1635,20 +1635,20 @@ function ni(a, i) {
|
|
|
1635
1635
|
function m(a) {
|
|
1636
1636
|
for (var i = 1; i < arguments.length; i++) {
|
|
1637
1637
|
var t = arguments[i] != null ? arguments[i] : {};
|
|
1638
|
-
i % 2 ?
|
|
1639
|
-
|
|
1640
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) :
|
|
1638
|
+
i % 2 ? ti(Object(t), !0).forEach(function(n) {
|
|
1639
|
+
Ta(a, n, t[n]);
|
|
1640
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : ti(Object(t)).forEach(function(n) {
|
|
1641
1641
|
Object.defineProperty(a, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1642
1642
|
});
|
|
1643
1643
|
}
|
|
1644
1644
|
return a;
|
|
1645
1645
|
}
|
|
1646
|
-
function
|
|
1646
|
+
function Ta(a, i, t) {
|
|
1647
1647
|
return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
|
|
1648
1648
|
}
|
|
1649
1649
|
function ha(a, i) {
|
|
1650
1650
|
if (a == null) return {};
|
|
1651
|
-
var t =
|
|
1651
|
+
var t = ht(a, i), n, e;
|
|
1652
1652
|
if (Object.getOwnPropertySymbols) {
|
|
1653
1653
|
var l = Object.getOwnPropertySymbols(a);
|
|
1654
1654
|
for (e = 0; e < l.length; e++)
|
|
@@ -1656,27 +1656,27 @@ function ha(a, i) {
|
|
|
1656
1656
|
}
|
|
1657
1657
|
return t;
|
|
1658
1658
|
}
|
|
1659
|
-
function
|
|
1659
|
+
function ht(a, i) {
|
|
1660
1660
|
if (a == null) return {};
|
|
1661
1661
|
var t = {}, n = Object.keys(a), e, l;
|
|
1662
1662
|
for (l = 0; l < n.length; l++)
|
|
1663
1663
|
e = n[l], !(i.indexOf(e) >= 0) && (t[e] = a[e]);
|
|
1664
1664
|
return t;
|
|
1665
1665
|
}
|
|
1666
|
-
var
|
|
1667
|
-
var t = a.children, n = ha(a,
|
|
1666
|
+
var Ra = /* @__PURE__ */ ei(function(a, i) {
|
|
1667
|
+
var t = a.children, n = ha(a, lt), e = fi(n), l = e.open, r = ha(e, rt);
|
|
1668
1668
|
return ji(i, function() {
|
|
1669
1669
|
return {
|
|
1670
1670
|
open: l
|
|
1671
1671
|
};
|
|
1672
|
-
}, [l]), /* @__PURE__ */
|
|
1672
|
+
}, [l]), /* @__PURE__ */ wi.createElement(Di, null, t(m(m({}, r), {}, {
|
|
1673
1673
|
open: l
|
|
1674
1674
|
})));
|
|
1675
1675
|
});
|
|
1676
|
-
|
|
1676
|
+
Ra.displayName = "Dropzone";
|
|
1677
1677
|
var vi = {
|
|
1678
1678
|
disabled: !1,
|
|
1679
|
-
getFilesFromEvent:
|
|
1679
|
+
getFilesFromEvent: Pi,
|
|
1680
1680
|
maxSize: 1 / 0,
|
|
1681
1681
|
minSize: 0,
|
|
1682
1682
|
multiple: !0,
|
|
@@ -1690,8 +1690,8 @@ var vi = {
|
|
|
1690
1690
|
useFsAccessApi: !1,
|
|
1691
1691
|
autoFocus: !1
|
|
1692
1692
|
};
|
|
1693
|
-
|
|
1694
|
-
|
|
1693
|
+
Ra.defaultProps = vi;
|
|
1694
|
+
Ra.propTypes = {
|
|
1695
1695
|
/**
|
|
1696
1696
|
* Render function that exposes the dropzone state and prop getter fns
|
|
1697
1697
|
*
|
|
@@ -1859,7 +1859,7 @@ La.propTypes = {
|
|
|
1859
1859
|
*/
|
|
1860
1860
|
validator: o.func
|
|
1861
1861
|
};
|
|
1862
|
-
var
|
|
1862
|
+
var qa = {
|
|
1863
1863
|
isFocused: !1,
|
|
1864
1864
|
isFileDialogActive: !1,
|
|
1865
1865
|
isDragActive: !1,
|
|
@@ -1870,14 +1870,14 @@ var Ia = {
|
|
|
1870
1870
|
};
|
|
1871
1871
|
function fi() {
|
|
1872
1872
|
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = m(m({}, vi), a), t = i.accept, n = i.disabled, e = i.getFilesFromEvent, l = i.maxSize, r = i.minSize, s = i.multiple, g = i.maxFiles, E = i.onDragEnter, w = i.onDragLeave, F = i.onDragOver, L = i.onDrop, j = i.onDropAccepted, O = i.onDropRejected, _ = i.onFileDialogCancel, A = i.onFileDialogOpen, V = i.useFsAccessApi, J = i.autoFocus, M = i.preventDropOnDocument, Q = i.noClick, $ = i.noKeyboard, P = i.noDrag, D = i.noDragEventsBubbling, K = i.onError, S = i.validator, C = Y(function() {
|
|
1873
|
-
return
|
|
1873
|
+
return pt(t);
|
|
1874
1874
|
}, [t]), ea = Y(function() {
|
|
1875
|
-
return
|
|
1875
|
+
return et(t);
|
|
1876
1876
|
}, [t]), B = Y(function() {
|
|
1877
|
-
return typeof A == "function" ? A :
|
|
1877
|
+
return typeof A == "function" ? A : ni;
|
|
1878
1878
|
}, [A]), T = Y(function() {
|
|
1879
|
-
return typeof _ == "function" ? _ :
|
|
1880
|
-
}, [_]), u = ta(null), x = ta(null), pa =
|
|
1879
|
+
return typeof _ == "function" ? _ : ni;
|
|
1880
|
+
}, [_]), u = ta(null), x = ta(null), pa = ki(yt, qa), oa = _a(pa, 2), X = oa[0], b = oa[1], ca = X.isFocused, la = X.isFileDialogActive, H = ta(typeof window < "u" && window.isSecureContext && V && nt()), ra = function() {
|
|
1881
1881
|
!H.current && la && setTimeout(function() {
|
|
1882
1882
|
if (x.current) {
|
|
1883
1883
|
var c = x.current.files;
|
|
@@ -1896,8 +1896,8 @@ function fi() {
|
|
|
1896
1896
|
u.current && u.current.contains(c.target) || (c.preventDefault(), z.current = []);
|
|
1897
1897
|
};
|
|
1898
1898
|
xa(function() {
|
|
1899
|
-
return M && (document.addEventListener("dragover",
|
|
1900
|
-
M && (document.removeEventListener("dragover",
|
|
1899
|
+
return M && (document.addEventListener("dragover", ii, !1), document.addEventListener("drop", ya, !1)), function() {
|
|
1900
|
+
M && (document.removeEventListener("dragover", ii), document.removeEventListener("drop", ya));
|
|
1901
1901
|
};
|
|
1902
1902
|
}, [u, M]), xa(function() {
|
|
1903
1903
|
return !n && J && u.current && u.current.focus(), function() {
|
|
@@ -1906,9 +1906,9 @@ function fi() {
|
|
|
1906
1906
|
var d = h(function(p) {
|
|
1907
1907
|
K ? K(p) : console.error(p);
|
|
1908
1908
|
}, [K]), q = h(function(p) {
|
|
1909
|
-
p.preventDefault(), p.persist(), ua(p), z.current = [].concat(
|
|
1909
|
+
p.preventDefault(), p.persist(), ua(p), z.current = [].concat(mt(z.current), [p.target]), fa(p) && Promise.resolve(e(p)).then(function(c) {
|
|
1910
1910
|
if (!(ba(p) && !D)) {
|
|
1911
|
-
var v = c.length, f = v > 0 &&
|
|
1911
|
+
var v = c.length, f = v > 0 && Zi({
|
|
1912
1912
|
files: c,
|
|
1913
1913
|
accept: C,
|
|
1914
1914
|
minSize: r,
|
|
@@ -1936,7 +1936,7 @@ function fi() {
|
|
|
1936
1936
|
} catch {
|
|
1937
1937
|
}
|
|
1938
1938
|
return c && F && F(p), !1;
|
|
1939
|
-
}, [F, D]),
|
|
1939
|
+
}, [F, D]), La = h(function(p) {
|
|
1940
1940
|
p.preventDefault(), p.persist(), ua(p);
|
|
1941
1941
|
var c = z.current.filter(function(f) {
|
|
1942
1942
|
return u.current && u.current.contains(f);
|
|
@@ -1965,7 +1965,7 @@ function fi() {
|
|
|
1965
1965
|
}), (!s && v.length > 1 || s && g >= 1 && v.length > g) && (v.forEach(function(y) {
|
|
1966
1966
|
f.push({
|
|
1967
1967
|
file: y,
|
|
1968
|
-
errors: [
|
|
1968
|
+
errors: [Xi]
|
|
1969
1969
|
});
|
|
1970
1970
|
}), v.splice(0)), b({
|
|
1971
1971
|
acceptedFiles: v,
|
|
@@ -1997,27 +1997,27 @@ function fi() {
|
|
|
1997
1997
|
type: "closeDialog"
|
|
1998
1998
|
});
|
|
1999
1999
|
}).catch(function(c) {
|
|
2000
|
-
|
|
2000
|
+
ot(c) ? (T(c), b({
|
|
2001
2001
|
type: "closeDialog"
|
|
2002
|
-
})) :
|
|
2002
|
+
})) : ct(c) ? (H.current = !1, x.current ? (x.current.value = null, x.current.click()) : d(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."))) : d(c);
|
|
2003
2003
|
});
|
|
2004
2004
|
return;
|
|
2005
2005
|
}
|
|
2006
2006
|
x.current && (b({
|
|
2007
2007
|
type: "openDialog"
|
|
2008
2008
|
}), B(), x.current.value = null, x.current.click());
|
|
2009
|
-
}, [b, B, T, V, sa, d, ea, s]),
|
|
2009
|
+
}, [b, B, T, V, sa, d, ea, s]), Ma = h(function(p) {
|
|
2010
2010
|
!u.current || !u.current.isEqualNode(p.target) || (p.key === " " || p.key === "Enter" || p.keyCode === 32 || p.keyCode === 13) && (p.preventDefault(), W());
|
|
2011
|
-
}, [u, W]),
|
|
2011
|
+
}, [u, W]), $a = h(function() {
|
|
2012
2012
|
b({
|
|
2013
2013
|
type: "focus"
|
|
2014
2014
|
});
|
|
2015
|
-
}, []),
|
|
2015
|
+
}, []), Ka = h(function() {
|
|
2016
2016
|
b({
|
|
2017
2017
|
type: "blur"
|
|
2018
2018
|
});
|
|
2019
|
-
}, []),
|
|
2020
|
-
Q || (
|
|
2019
|
+
}, []), Ba = h(function() {
|
|
2020
|
+
Q || (tt() ? setTimeout(W, 0) : W());
|
|
2021
2021
|
}, [Q, W]), N = function(c) {
|
|
2022
2022
|
return n ? null : c;
|
|
2023
2023
|
}, wa = function(c) {
|
|
@@ -2028,26 +2028,26 @@ function fi() {
|
|
|
2028
2028
|
D && c.stopPropagation();
|
|
2029
2029
|
}, xi = Y(function() {
|
|
2030
2030
|
return function() {
|
|
2031
|
-
var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = p.refKey, v = c === void 0 ? "ref" : c, f = p.role, y = p.onKeyDown, aa = p.onFocus, U = p.onBlur, ka = p.onClick, ja = p.onDragEnter, Da = p.onDragOver, va = p.onDragLeave, za = p.onDrop, Aa = ha(p,
|
|
2032
|
-
return m(m(
|
|
2033
|
-
onKeyDown: wa(k(y,
|
|
2034
|
-
onFocus: wa(k(aa,
|
|
2035
|
-
onBlur: wa(k(U,
|
|
2036
|
-
onClick: N(k(ka,
|
|
2031
|
+
var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = p.refKey, v = c === void 0 ? "ref" : c, f = p.role, y = p.onKeyDown, aa = p.onFocus, U = p.onBlur, ka = p.onClick, ja = p.onDragEnter, Da = p.onDragOver, va = p.onDragLeave, za = p.onDrop, Aa = ha(p, st);
|
|
2032
|
+
return m(m(Ta({
|
|
2033
|
+
onKeyDown: wa(k(y, Ma)),
|
|
2034
|
+
onFocus: wa(k(aa, $a)),
|
|
2035
|
+
onBlur: wa(k(U, Ka)),
|
|
2036
|
+
onClick: N(k(ka, Ba)),
|
|
2037
2037
|
onDragEnter: ma(k(ja, q)),
|
|
2038
2038
|
onDragOver: ma(k(Da, Z)),
|
|
2039
|
-
onDragLeave: ma(k(va,
|
|
2039
|
+
onDragLeave: ma(k(va, La)),
|
|
2040
2040
|
onDrop: ma(k(za, da)),
|
|
2041
2041
|
role: typeof f == "string" && f !== "" ? f : "presentation"
|
|
2042
2042
|
}, v, u), !n && !$ ? {
|
|
2043
2043
|
tabIndex: 0
|
|
2044
2044
|
} : {}), Aa);
|
|
2045
2045
|
};
|
|
2046
|
-
}, [u, $a, Ka, Ba,
|
|
2046
|
+
}, [u, Ma, $a, Ka, Ba, q, Z, La, da, $, P, n]), gi = h(function(p) {
|
|
2047
2047
|
p.stopPropagation();
|
|
2048
2048
|
}, []), bi = Y(function() {
|
|
2049
2049
|
return function() {
|
|
2050
|
-
var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = p.refKey, v = c === void 0 ? "ref" : c, f = p.onChange, y = p.onClick, aa = ha(p,
|
|
2050
|
+
var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = p.refKey, v = c === void 0 ? "ref" : c, f = p.onChange, y = p.onClick, aa = ha(p, dt), U = Ta({
|
|
2051
2051
|
accept: C,
|
|
2052
2052
|
multiple: s,
|
|
2053
2053
|
type: "file",
|
|
@@ -2079,7 +2079,7 @@ function fi() {
|
|
|
2079
2079
|
open: N(W)
|
|
2080
2080
|
});
|
|
2081
2081
|
}
|
|
2082
|
-
function
|
|
2082
|
+
function yt(a, i) {
|
|
2083
2083
|
switch (i.type) {
|
|
2084
2084
|
case "focus":
|
|
2085
2085
|
return m(m({}, a), {}, {
|
|
@@ -2090,7 +2090,7 @@ function ht(a, i) {
|
|
|
2090
2090
|
isFocused: !1
|
|
2091
2091
|
});
|
|
2092
2092
|
case "openDialog":
|
|
2093
|
-
return m(m({},
|
|
2093
|
+
return m(m({}, qa), {}, {
|
|
2094
2094
|
isFileDialogActive: !0
|
|
2095
2095
|
});
|
|
2096
2096
|
case "closeDialog":
|
|
@@ -2110,22 +2110,22 @@ function ht(a, i) {
|
|
|
2110
2110
|
isDragReject: i.isDragReject
|
|
2111
2111
|
});
|
|
2112
2112
|
case "reset":
|
|
2113
|
-
return m({},
|
|
2113
|
+
return m({}, qa);
|
|
2114
2114
|
default:
|
|
2115
2115
|
return a;
|
|
2116
2116
|
}
|
|
2117
2117
|
}
|
|
2118
|
-
function
|
|
2118
|
+
function ni() {
|
|
2119
2119
|
}
|
|
2120
|
-
const
|
|
2120
|
+
const wt = {
|
|
2121
2121
|
small: "0.5rem 0.813rem",
|
|
2122
2122
|
medium: "0.75rem 1.063rem",
|
|
2123
2123
|
large: "1rem 1.313rem"
|
|
2124
|
-
},
|
|
2124
|
+
}, kt = {
|
|
2125
2125
|
small: "1.25rem",
|
|
2126
2126
|
medium: "1.5rem",
|
|
2127
2127
|
large: "1.75rem"
|
|
2128
|
-
},
|
|
2128
|
+
}, jt = Ia.label`
|
|
2129
2129
|
display: flex;
|
|
2130
2130
|
flex-direction: column;
|
|
2131
2131
|
justify-content: center;
|
|
@@ -2133,9 +2133,9 @@ const yt = {
|
|
|
2133
2133
|
gap: 0.5rem;
|
|
2134
2134
|
cursor: pointer;
|
|
2135
2135
|
font-size: ${(a) => a.theme.typography.component[a.size].subTxtFontSize};
|
|
2136
|
-
padding: ${(a) =>
|
|
2136
|
+
padding: ${(a) => wt[a.size]};
|
|
2137
2137
|
|
|
2138
|
-
color: ${(a) =>
|
|
2138
|
+
color: ${(a) => Ua(
|
|
2139
2139
|
a.theme,
|
|
2140
2140
|
"DragDropFiles",
|
|
2141
2141
|
a.color,
|
|
@@ -2144,8 +2144,8 @@ const yt = {
|
|
|
2144
2144
|
)};
|
|
2145
2145
|
|
|
2146
2146
|
& .dnd-icon-lnc {
|
|
2147
|
-
font-size: ${(a) =>
|
|
2148
|
-
color: ${(a) =>
|
|
2147
|
+
font-size: ${(a) => kt[a.size]};
|
|
2148
|
+
color: ${(a) => Ua(
|
|
2149
2149
|
a.theme,
|
|
2150
2150
|
"DragDropFiles",
|
|
2151
2151
|
a.color,
|
|
@@ -2153,17 +2153,17 @@ const yt = {
|
|
|
2153
2153
|
"text"
|
|
2154
2154
|
)};
|
|
2155
2155
|
}
|
|
2156
|
-
`,
|
|
2156
|
+
`, Dt = Ia.input`
|
|
2157
2157
|
width: 0.1px;
|
|
2158
2158
|
height: 0.1px;
|
|
2159
2159
|
opacity: 0;
|
|
2160
2160
|
overflow: hidden;
|
|
2161
2161
|
position: absolute;
|
|
2162
2162
|
z-index: -1;
|
|
2163
|
-
`,
|
|
2163
|
+
`, zt = Ia.span`
|
|
2164
2164
|
align-self: self-end;
|
|
2165
2165
|
cursor: pointer;
|
|
2166
|
-
`,
|
|
2166
|
+
`, At = ei((a, i) => {
|
|
2167
2167
|
const {
|
|
2168
2168
|
inputRef: t,
|
|
2169
2169
|
id: n = "",
|
|
@@ -2194,7 +2194,7 @@ const yt = {
|
|
|
2194
2194
|
inputProps: D,
|
|
2195
2195
|
alwaysShowDropzone: K = !1,
|
|
2196
2196
|
...S
|
|
2197
|
-
} = a, C =
|
|
2197
|
+
} = a, C = Ei(), [ea, B] = Wa(!1), [T, u] = Wa(j), x = ta();
|
|
2198
2198
|
xa(() => {
|
|
2199
2199
|
u(j);
|
|
2200
2200
|
}, [j]);
|
|
@@ -2208,13 +2208,13 @@ const yt = {
|
|
|
2208
2208
|
}, ca = (d) => {
|
|
2209
2209
|
var q, Z;
|
|
2210
2210
|
i != null && i.current ? (q = i.current) == null || q.click() : (Z = x == null ? void 0 : x.current) == null || Z.click();
|
|
2211
|
-
}, la = () => w ?
|
|
2211
|
+
}, la = () => w ? zi(w, {
|
|
2212
2212
|
onClick: (d) => {
|
|
2213
2213
|
ca(), w.onClick && w.onClick(d);
|
|
2214
2214
|
},
|
|
2215
2215
|
disabled: e
|
|
2216
2216
|
}) : /* @__PURE__ */ ia(
|
|
2217
|
-
|
|
2217
|
+
Ai,
|
|
2218
2218
|
{
|
|
2219
2219
|
color: $,
|
|
2220
2220
|
size: P,
|
|
@@ -2232,8 +2232,8 @@ const yt = {
|
|
|
2232
2232
|
disabled: e,
|
|
2233
2233
|
noClick: !0
|
|
2234
2234
|
});
|
|
2235
|
-
return /* @__PURE__ */
|
|
2236
|
-
|
|
2235
|
+
return /* @__PURE__ */ Ha(
|
|
2236
|
+
jt,
|
|
2237
2237
|
{
|
|
2238
2238
|
...pa,
|
|
2239
2239
|
className: O,
|
|
@@ -2243,7 +2243,7 @@ const yt = {
|
|
|
2243
2243
|
ref: i || x,
|
|
2244
2244
|
children: [
|
|
2245
2245
|
/* @__PURE__ */ ia(
|
|
2246
|
-
|
|
2246
|
+
Dt,
|
|
2247
2247
|
{
|
|
2248
2248
|
...ra(),
|
|
2249
2249
|
...pa,
|
|
@@ -2263,9 +2263,9 @@ const yt = {
|
|
|
2263
2263
|
...D
|
|
2264
2264
|
}
|
|
2265
2265
|
),
|
|
2266
|
-
!z && !T && !K && /* @__PURE__ */ ia(
|
|
2267
|
-
(z || T || K) && /* @__PURE__ */
|
|
2268
|
-
/* @__PURE__ */ ia(
|
|
2266
|
+
!z && !T && !K && /* @__PURE__ */ ia(zt, { children: /* @__PURE__ */ ia(Na, { icon: "plus", size: P }) }),
|
|
2267
|
+
(z || T || K) && /* @__PURE__ */ Ha(yi, { children: [
|
|
2268
|
+
/* @__PURE__ */ ia(Na, { icon: "upload", size: P, className: "dnd-icon-lnc" }),
|
|
2269
2269
|
F,
|
|
2270
2270
|
la()
|
|
2271
2271
|
] })
|
|
@@ -2273,7 +2273,7 @@ const yt = {
|
|
|
2273
2273
|
}
|
|
2274
2274
|
);
|
|
2275
2275
|
});
|
|
2276
|
-
|
|
2276
|
+
At.propTypes = {
|
|
2277
2277
|
inputRef: o.any,
|
|
2278
2278
|
id: o.string,
|
|
2279
2279
|
disabled: o.bool,
|
|
@@ -2327,5 +2327,5 @@ zt.propTypes = {
|
|
|
2327
2327
|
inputProps: o.any
|
|
2328
2328
|
};
|
|
2329
2329
|
export {
|
|
2330
|
-
|
|
2330
|
+
At as default
|
|
2331
2331
|
};
|