@vryzel/file-next-ui 0.5.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +46 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +47 -27
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext, createElement, useContext, useRef, useState, useLayoutEffect, useEffect, useCallback, useMemo } from 'react';
|
|
2
2
|
import { useFileExplorer } from '@vryzel/file-next-headless';
|
|
3
|
-
import { Music, FileCode, FileVideo, FileAudio, FileImage, Archive, FileText, ChevronRight, File, Folder, Link2, MoreHorizontal, ChevronUp, ChevronDown, List, LayoutGrid, Search, Upload, FolderPlus, Trash, Copy, RotateCcw, X, Eye, Download, Pencil, ListChecks, Inbox, AlertCircleIcon, Minus, Plus } from 'lucide-react';
|
|
3
|
+
import { Music, FileCode, FileVideo, FileAudio, FileImage, Archive, FileText, ChevronRight, File, Folder, Link2, MoreHorizontal, ChevronUp, ChevronDown, List, LayoutGrid, Search, Upload, FolderPlus, Trash, Copy, RotateCcw, X, Eye, Download, Pencil, ListChecks, ListX, Inbox, AlertCircleIcon, Minus, Plus } from 'lucide-react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1446,33 +1446,51 @@ function SelectionActions({
|
|
|
1446
1446
|
}
|
|
1447
1447
|
)
|
|
1448
1448
|
] }),
|
|
1449
|
-
/* @__PURE__ */
|
|
1450
|
-
/* @__PURE__ */ jsxs(
|
|
1451
|
-
/* @__PURE__ */
|
|
1452
|
-
|
|
1449
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-1.5", children: [
|
|
1450
|
+
trashOpen ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1451
|
+
/* @__PURE__ */ jsxs("button", { type: "button", className: btn2, onClick: onRestore, children: [
|
|
1452
|
+
/* @__PURE__ */ jsx(RotateCcw, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1453
|
+
labels.restore
|
|
1454
|
+
] }),
|
|
1455
|
+
onPurge ? /* @__PURE__ */ jsxs("button", { type: "button", className: cn(btn2, "text-destructive"), onClick: onPurge, children: [
|
|
1456
|
+
/* @__PURE__ */ jsx(X, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1457
|
+
labels.deleteForever
|
|
1458
|
+
] }) : null
|
|
1459
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1460
|
+
onDownload && downloadable.length > 0 ? /* @__PURE__ */ jsxs("button", { type: "button", className: btn2, onClick: () => downloadable.forEach(onDownload), children: [
|
|
1461
|
+
/* @__PURE__ */ jsx(Download, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1462
|
+
labels.download
|
|
1463
|
+
] }) : null,
|
|
1464
|
+
onCopy ? /* @__PURE__ */ jsxs("button", { type: "button", className: btn2, onClick: onCopy, children: [
|
|
1465
|
+
/* @__PURE__ */ jsx(Copy, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1466
|
+
labels.copy
|
|
1467
|
+
] }) : null,
|
|
1468
|
+
onShare && downloadable.length > 0 ? /* @__PURE__ */ jsxs("button", { type: "button", className: btn2, onClick: onShare, children: [
|
|
1469
|
+
/* @__PURE__ */ jsx(Link2, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1470
|
+
labels.share
|
|
1471
|
+
] }) : null,
|
|
1472
|
+
/* @__PURE__ */ jsxs("button", { type: "button", disabled: hasProtected, className: cn(btn2, "text-destructive"), onClick: onDelete, children: [
|
|
1473
|
+
/* @__PURE__ */ jsx(X, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1474
|
+
labels.moveToTrash
|
|
1475
|
+
] })
|
|
1453
1476
|
] }),
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
/* @__PURE__ */ jsxs("button", { type: "button", disabled: hasProtected, className: cn(btn2, "text-destructive"), onClick: onDelete, children: [
|
|
1472
|
-
/* @__PURE__ */ jsx(X, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1473
|
-
labels.moveToTrash
|
|
1474
|
-
] })
|
|
1475
|
-
] }) })
|
|
1477
|
+
/* @__PURE__ */ jsxs(
|
|
1478
|
+
"button",
|
|
1479
|
+
{
|
|
1480
|
+
type: "button",
|
|
1481
|
+
className: btn2,
|
|
1482
|
+
onClick: (event) => {
|
|
1483
|
+
event.stopPropagation();
|
|
1484
|
+
swallowClickThrough();
|
|
1485
|
+
onClear();
|
|
1486
|
+
},
|
|
1487
|
+
children: [
|
|
1488
|
+
/* @__PURE__ */ jsx(ListX, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1489
|
+
labels.clearSelection
|
|
1490
|
+
]
|
|
1491
|
+
}
|
|
1492
|
+
)
|
|
1493
|
+
] })
|
|
1476
1494
|
] });
|
|
1477
1495
|
}
|
|
1478
1496
|
function ExplorerClipboardToast({
|
|
@@ -2871,6 +2889,8 @@ function FilePreviewDialog({
|
|
|
2871
2889
|
{
|
|
2872
2890
|
src,
|
|
2873
2891
|
title: file.name,
|
|
2892
|
+
sandbox: "",
|
|
2893
|
+
referrerPolicy: "no-referrer",
|
|
2874
2894
|
className: "h-full w-full max-w-5xl bg-white",
|
|
2875
2895
|
onClick: stop
|
|
2876
2896
|
}
|