@powerhousedao/design-system 3.3.0-dev.18 → 3.3.0-dev.19
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/src/connect/components/breadcrumbs/useBreadcrumbs.d.ts +5 -9
- package/dist/src/connect/components/breadcrumbs/useBreadcrumbs.d.ts.map +1 -1
- package/dist/src/connect/components/breadcrumbs/useBreadcrumbs.js +5 -15
- package/dist/src/connect/components/breadcrumbs/useBreadcrumbs.js.map +1 -1
- package/dist/src/connect/components/file-item/file-item.d.ts +9 -8
- package/dist/src/connect/components/file-item/file-item.d.ts.map +1 -1
- package/dist/src/connect/components/file-item/file-item.js +11 -10
- package/dist/src/connect/components/file-item/file-item.js.map +1 -1
- package/dist/src/connect/components/folder-item/folder-item.d.ts +9 -11
- package/dist/src/connect/components/folder-item/folder-item.d.ts.map +1 -1
- package/dist/src/connect/components/folder-item/folder-item.js +11 -10
- package/dist/src/connect/components/folder-item/folder-item.js.map +1 -1
- package/dist/src/connect/components/form/drive-settings-form.d.ts +8 -5
- package/dist/src/connect/components/form/drive-settings-form.d.ts.map +1 -1
- package/dist/src/connect/components/form/drive-settings-form.js +3 -3
- package/dist/src/connect/components/form/drive-settings-form.js.map +1 -1
- package/dist/src/connect/components/form/inputs/delete-drive.d.ts +4 -4
- package/dist/src/connect/components/form/inputs/delete-drive.d.ts.map +1 -1
- package/dist/src/connect/components/form/inputs/delete-drive.js +2 -2
- package/dist/src/connect/components/form/inputs/delete-drive.js.map +1 -1
- package/dist/src/connect/components/index.d.ts +0 -2
- package/dist/src/connect/components/index.d.ts.map +1 -1
- package/dist/src/connect/components/index.js +0 -2
- package/dist/src/connect/components/index.js.map +1 -1
- package/dist/src/connect/components/modal/drive-settings-modal.d.ts +13 -10
- package/dist/src/connect/components/modal/drive-settings-modal.d.ts.map +1 -1
- package/dist/src/connect/components/modal/drive-settings-modal.js +9 -9
- package/dist/src/connect/components/modal/drive-settings-modal.js.map +1 -1
- package/dist/src/connect/components/modal/settings-modal-v2/danger-zone.d.ts +3 -3
- package/dist/src/connect/components/modal/settings-modal-v2/danger-zone.d.ts.map +1 -1
- package/dist/src/connect/components/modal/settings-modal-v2/danger-zone.js +16 -5
- package/dist/src/connect/components/modal/settings-modal-v2/danger-zone.js.map +1 -1
- package/dist/src/connect/hooks/drag-and-drop/use-drag.d.ts +2 -6
- package/dist/src/connect/hooks/drag-and-drop/use-drag.d.ts.map +1 -1
- package/dist/src/connect/hooks/drag-and-drop/use-drag.js +9 -17
- package/dist/src/connect/hooks/drag-and-drop/use-drag.js.map +1 -1
- package/dist/src/connect/hooks/drag-and-drop/use-drop.d.ts +5 -9
- package/dist/src/connect/hooks/drag-and-drop/use-drop.d.ts.map +1 -1
- package/dist/src/connect/hooks/drag-and-drop/use-drop.js +15 -24
- package/dist/src/connect/hooks/drag-and-drop/use-drop.js.map +1 -1
- package/dist/src/connect/types/drives.d.ts +1 -16
- package/dist/src/connect/types/drives.d.ts.map +1 -1
- package/dist/src/connect/types/index.d.ts +0 -1
- package/dist/src/connect/types/index.d.ts.map +1 -1
- package/dist/src/connect/types/index.js +0 -1
- package/dist/src/connect/types/index.js.map +1 -1
- package/dist/src/connect/types/nodes.d.ts +9 -61
- package/dist/src/connect/types/nodes.d.ts.map +1 -1
- package/dist/src/connect/types/options.d.ts +3 -2
- package/dist/src/connect/types/options.d.ts.map +1 -1
- package/dist/src/connect/utils/index.d.ts +0 -1
- package/dist/src/connect/utils/index.d.ts.map +1 -1
- package/dist/src/connect/utils/index.js +0 -1
- package/dist/src/connect/utils/index.js.map +1 -1
- package/dist/style.css +0 -52
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +6 -5
- package/dist/src/connect/components/drive-view/drive-view.d.ts +0 -17
- package/dist/src/connect/components/drive-view/drive-view.d.ts.map +0 -1
- package/dist/src/connect/components/drive-view/drive-view.js +0 -17
- package/dist/src/connect/components/drive-view/drive-view.js.map +0 -1
- package/dist/src/connect/components/drive-view/index.d.ts +0 -2
- package/dist/src/connect/components/drive-view/index.d.ts.map +0 -1
- package/dist/src/connect/components/drive-view/index.js +0 -2
- package/dist/src/connect/components/drive-view/index.js.map +0 -1
- package/dist/src/connect/components/drive-view/mocks.d.ts +0 -2
- package/dist/src/connect/components/drive-view/mocks.d.ts.map +0 -1
- package/dist/src/connect/components/drive-view/mocks.js +0 -2
- package/dist/src/connect/components/drive-view/mocks.js.map +0 -1
- package/dist/src/connect/components/tree-view/drop-indicator.d.ts +0 -13
- package/dist/src/connect/components/tree-view/drop-indicator.d.ts.map +0 -1
- package/dist/src/connect/components/tree-view/drop-indicator.js +0 -16
- package/dist/src/connect/components/tree-view/drop-indicator.js.map +0 -1
- package/dist/src/connect/components/tree-view/index.d.ts +0 -2
- package/dist/src/connect/components/tree-view/index.d.ts.map +0 -1
- package/dist/src/connect/components/tree-view/index.js +0 -2
- package/dist/src/connect/components/tree-view/index.js.map +0 -1
- package/dist/src/connect/components/tree-view/tree-view.d.ts +0 -16
- package/dist/src/connect/components/tree-view/tree-view.d.ts.map +0 -1
- package/dist/src/connect/components/tree-view/tree-view.js +0 -142
- package/dist/src/connect/components/tree-view/tree-view.js.map +0 -1
- package/dist/src/connect/types/shared-props.d.ts +0 -13
- package/dist/src/connect/types/shared-props.d.ts.map +0 -1
- package/dist/src/connect/types/shared-props.js +0 -2
- package/dist/src/connect/types/shared-props.js.map +0 -1
- package/dist/src/connect/utils/mocks/index.d.ts +0 -2
- package/dist/src/connect/utils/mocks/index.d.ts.map +0 -1
- package/dist/src/connect/utils/mocks/index.js +0 -2
- package/dist/src/connect/utils/mocks/index.js.map +0 -1
- package/dist/src/connect/utils/mocks/ui-drive-node.d.ts +0 -33
- package/dist/src/connect/utils/mocks/ui-drive-node.d.ts.map +0 -1
- package/dist/src/connect/utils/mocks/ui-drive-node.js +0 -234
- package/dist/src/connect/utils/mocks/ui-drive-node.js.map +0 -1
|
@@ -15,25 +15,36 @@ function ModifyDrives(props) {
|
|
|
15
15
|
}
|
|
16
16
|
function DriveList(props) {
|
|
17
17
|
const { className, ...rest } = props;
|
|
18
|
-
return (_jsx("div", { className: className, children: props.drives.map((drive) => (_jsx(Drive, { drive: drive, ...rest }, drive.id))) }));
|
|
18
|
+
return (_jsx("div", { className: className, children: props.drives.map((drive) => (_jsx(Drive, { drive: drive, ...rest }, drive.header.id))) }));
|
|
19
19
|
}
|
|
20
20
|
function Drive(props) {
|
|
21
21
|
const { drive, className, onDeleteDrive } = props;
|
|
22
22
|
const [isDropdownMenuOpen, setIsDropdownMenuOpen] = useState(false);
|
|
23
23
|
const localDriveIcon = _jsx(Icon, { name: "Hdd", size: 16, className: "flex-none" });
|
|
24
24
|
const cloudDriveIcon = _jsx(Icon, { name: "Server", size: 16, className: "flex-none" });
|
|
25
|
-
const publicDriveIcon =
|
|
25
|
+
const publicDriveIcon = drive.state.global.icon ? (_jsx("img", { alt: "drive icon", className: "size-4 flex-none object-contain", src: drive.state.global.icon })) : (_jsx(Icon, { name: "M", size: 16, className: "flex-none" }));
|
|
26
|
+
function getDriveSharingType(drive) {
|
|
27
|
+
if (!drive)
|
|
28
|
+
return "PUBLIC";
|
|
29
|
+
const isReadDrive = "readContext" in drive;
|
|
30
|
+
const { sharingType: _sharingType } = !isReadDrive
|
|
31
|
+
? drive.state.local
|
|
32
|
+
: { sharingType: "PUBLIC" };
|
|
33
|
+
const __sharingType = _sharingType?.toUpperCase();
|
|
34
|
+
return (__sharingType === "PRIVATE" ? "LOCAL" : __sharingType);
|
|
35
|
+
}
|
|
26
36
|
function getNodeIcon() {
|
|
27
|
-
|
|
37
|
+
const sharingType = getDriveSharingType(drive);
|
|
38
|
+
if (sharingType === PUBLIC) {
|
|
28
39
|
return publicDriveIcon;
|
|
29
40
|
}
|
|
30
|
-
if (
|
|
41
|
+
if (sharingType === CLOUD) {
|
|
31
42
|
return cloudDriveIcon;
|
|
32
43
|
}
|
|
33
44
|
return localDriveIcon;
|
|
34
45
|
}
|
|
35
46
|
const icon = getNodeIcon();
|
|
36
|
-
return (_jsxs("div", { className: cn("mb-4 flex w-96 items-center gap-2 rounded-md border border-gray-200 bg-gray-50 px-3 py-2 shadow-sm last-of-type:mb-0", className), children: [icon, _jsxs("div", { children: [_jsx("span", { className: "block text-sm font-medium leading-[18px]", children: capitalCase(drive.name) }), _jsxs("div", { className: "flex items-baseline gap-x-2 leading-[18px]", children: [_jsxs("span", { className: "text-sm text-gray-600", children: [capitalCase(drive
|
|
47
|
+
return (_jsxs("div", { className: cn("mb-4 flex w-96 items-center gap-2 rounded-md border border-gray-200 bg-gray-50 px-3 py-2 shadow-sm last-of-type:mb-0", className), children: [icon, _jsxs("div", { children: [_jsx("span", { className: "block text-sm font-medium leading-[18px]", children: capitalCase(drive.header.name) }), _jsxs("div", { className: "flex items-baseline gap-x-2 leading-[18px]", children: [_jsxs("span", { className: "text-sm text-gray-600", children: [capitalCase(getDriveSharingType(drive)), " App"] }), _jsxs("a", { className: "group flex items-center gap-x-2 text-sm text-slate-500 transition-colors hover:text-[#9896FF]", children: ["By Powerhouse", _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 12", className: "size-4 text-gray-400 transition-colors group-hover:text-inherit", children: _jsx("path", { d: "M7.99365 11.9939C9.46632 11.9939 10.6603 10.7999 10.6603 9.32722V7.32722C10.6603 6.95922 10.3617 6.66056 9.99365 6.66056C9.62565 6.66056 9.32699 6.95922 9.32699 7.32722V9.32722C9.32699 10.0639 8.73032 10.6606 7.99365 10.6606H2.66032C1.92365 10.6606 1.32699 10.0639 1.32699 9.32722V3.99389C1.32699 3.25723 1.92365 2.66056 2.66032 2.66056H4.66032C5.02832 2.66056 5.32699 2.36189 5.32699 1.99389C5.32699 1.6259 5.02832 1.32723 4.66032 1.32723H2.66032C1.18765 1.32723 -0.00634766 2.52123 -0.00634766 3.99389V9.32722C-0.00634766 10.7999 1.18765 11.9939 2.66032 11.9939H7.99365ZM5.32699 7.32722C5.49765 7.32722 5.67565 7.26989 5.80632 7.13989L10.1396 2.80656L11.9937 4.66056V-0.00610352H7.32699L9.18099 1.8479L4.84766 6.18123C4.58766 6.4419 4.58766 6.87922 4.84766 7.13989C4.97832 7.26989 5.15632 7.32722 5.32699 7.32722Z", fill: "currentColor" }) })] })] })] }), _jsx(ConnectDropdownMenu, { items: [
|
|
37
48
|
{
|
|
38
49
|
id: "delete-drive",
|
|
39
50
|
label: "Delete",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"danger-zone.js","sourceRoot":"","sources":["../../../../../../src/connect/components/modal/settings-modal-v2/danger-zone.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAoB,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,EAAE,EAAE,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"danger-zone.js","sourceRoot":"","sources":["../../../../../../src/connect/components/modal/settings-modal-v2/danger-zone.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAoB,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,EAAE,EAAE,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAe3E,MAAM,UAAU,UAAU,CAAC,KAAY;IACrC,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACrC,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,gCAAgC,EAAE,SAAS,CAAC,aAC7D,aAAI,SAAS,EAAC,oBAAoB,8BAAmB,EACrD,KA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+1,7 @@
|
|
|
1
|
-
import { type UiNode } from "#connect";
|
|
2
1
|
import { type DragEvent } from "react";
|
|
2
|
+
import { type Node } from "document-drive";
|
|
3
3
|
type Props = {
|
|
4
|
-
|
|
4
|
+
node: Node;
|
|
5
5
|
};
|
|
6
6
|
export declare function useDrag(props: Props): {
|
|
7
7
|
isDragging: boolean;
|
|
@@ -9,10 +9,6 @@ export declare function useDrag(props: Props): {
|
|
|
9
9
|
draggable: boolean;
|
|
10
10
|
onDragStart: (event: DragEvent<HTMLDivElement>) => void;
|
|
11
11
|
onDragEnd: () => void;
|
|
12
|
-
} | {
|
|
13
|
-
draggable: boolean;
|
|
14
|
-
onDragStart: undefined;
|
|
15
|
-
onDragEnd: undefined;
|
|
16
12
|
};
|
|
17
13
|
};
|
|
18
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-drag.d.ts","sourceRoot":"","sources":["../../../../../src/connect/hooks/drag-and-drop/use-drag.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-drag.d.ts","sourceRoot":"","sources":["../../../../../src/connect/hooks/drag-and-drop/use-drag.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAE3C,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AACF,wBAAgB,OAAO,CAAC,KAAK,EAAE,KAAK;;;;6BAKxB,SAAS,CAAC,cAAc,CAAC;;;EAoBpC"}
|
|
@@ -1,31 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UI_NODE } from "#connect";
|
|
2
2
|
import { useCallback, useMemo, useState } from "react";
|
|
3
3
|
export function useDrag(props) {
|
|
4
|
-
const {
|
|
4
|
+
const { node } = props;
|
|
5
5
|
const [isDragging, setIsDragging] = useState(false);
|
|
6
6
|
const onDragStart = useCallback((event) => {
|
|
7
|
-
event.dataTransfer.setData(UI_NODE, JSON.stringify(
|
|
8
|
-
}, [
|
|
7
|
+
event.dataTransfer.setData(UI_NODE, JSON.stringify(node));
|
|
8
|
+
}, [node]);
|
|
9
9
|
const onDragEnd = useCallback(() => {
|
|
10
10
|
setIsDragging(false);
|
|
11
11
|
}, []);
|
|
12
|
-
const allowedToDragNode = !!uiNode && uiNode.kind !== DRIVE;
|
|
13
12
|
return useMemo(() => {
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
return {
|
|
14
|
+
isDragging,
|
|
15
|
+
dragProps: {
|
|
16
16
|
draggable: true,
|
|
17
17
|
onDragStart,
|
|
18
18
|
onDragEnd,
|
|
19
|
-
}
|
|
20
|
-
: {
|
|
21
|
-
draggable: false,
|
|
22
|
-
onDragStart: undefined,
|
|
23
|
-
onDragEnd: undefined,
|
|
24
|
-
};
|
|
25
|
-
return {
|
|
26
|
-
isDragging,
|
|
27
|
-
dragProps,
|
|
19
|
+
},
|
|
28
20
|
};
|
|
29
|
-
}, [
|
|
21
|
+
}, [isDragging, onDragEnd, onDragStart]);
|
|
30
22
|
}
|
|
31
23
|
//# sourceMappingURL=use-drag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-drag.js","sourceRoot":"","sources":["../../../../../src/connect/hooks/drag-and-drop/use-drag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"use-drag.js","sourceRoot":"","sources":["../../../../../src/connect/hooks/drag-and-drop/use-drag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAkB,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMvE,MAAM,UAAU,OAAO,CAAC,KAAY;IAClC,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACvB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpD,MAAM,WAAW,GAAG,WAAW,CAC7B,CAAC,KAAgC,EAAE,EAAE;QACnC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5D,CAAC,EACD,CAAC,IAAI,CAAC,CACP,CAAC;IAEF,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE;QACjC,aAAa,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,OAAO;YACL,UAAU;YACV,SAAS,EAAE;gBACT,SAAS,EAAE,IAAI;gBACf,WAAW;gBACX,SAAS;aACV;SACF,CAAC;IACJ,CAAC,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Node } from "document-drive";
|
|
2
2
|
import { type DragEvent } from "react";
|
|
3
3
|
type Props = {
|
|
4
|
-
|
|
5
|
-
onAddFile: (file: File,
|
|
6
|
-
onMoveNode: (
|
|
7
|
-
onCopyNode: (
|
|
4
|
+
node: Node | undefined;
|
|
5
|
+
onAddFile: (file: File, parent: Node | undefined) => Promise<void> | void;
|
|
6
|
+
onMoveNode: (src: Node, target: Node | undefined) => Promise<void> | void;
|
|
7
|
+
onCopyNode: (src: Node, target: Node | undefined) => Promise<void> | void;
|
|
8
8
|
};
|
|
9
9
|
export declare function useDrop(props: Props): {
|
|
10
10
|
isDropTarget: boolean;
|
|
@@ -12,10 +12,6 @@ export declare function useDrop(props: Props): {
|
|
|
12
12
|
onDragOver: (event: DragEvent<HTMLDivElement>) => void;
|
|
13
13
|
onDragLeave: () => void;
|
|
14
14
|
onDrop: (event: DragEvent<HTMLDivElement>) => Promise<void>;
|
|
15
|
-
} | {
|
|
16
|
-
onDragOver: undefined;
|
|
17
|
-
onDragLeave: undefined;
|
|
18
|
-
onDrop: undefined;
|
|
19
15
|
};
|
|
20
16
|
};
|
|
21
17
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-drop.d.ts","sourceRoot":"","sources":["../../../../../src/connect/hooks/drag-and-drop/use-drop.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-drop.d.ts","sourceRoot":"","sources":["../../../../../src/connect/hooks/drag-and-drop/use-drop.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAC;AAEvE,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC;IACvB,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1E,UAAU,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1E,UAAU,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC3E,CAAC;AACF,wBAAgB,OAAO,CAAC,KAAK,EAAE,KAAK;;;4BAIK,SAAS,CAAC,cAAc,CAAC;;wBAUhD,SAAS,CAAC,cAAc,CAAC;;EAwC1C"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UI_NODE } from "#connect";
|
|
2
2
|
import { useCallback, useMemo, useState } from "react";
|
|
3
3
|
export function useDrop(props) {
|
|
4
|
-
const {
|
|
4
|
+
const { node, onAddFile, onCopyNode, onMoveNode } = props;
|
|
5
5
|
const [isDropTarget, setIsDropTarget] = useState(false);
|
|
6
|
-
const allowedToBeDropTarget = !uiNode || uiNode.kind !== FILE;
|
|
7
6
|
const onDragOver = useCallback((event) => {
|
|
8
7
|
event.preventDefault();
|
|
9
8
|
setIsDropTarget(true);
|
|
@@ -19,20 +18,19 @@ export function useDrop(props) {
|
|
|
19
18
|
if (droppedFiles.length) {
|
|
20
19
|
for (const file of droppedFiles) {
|
|
21
20
|
if (file) {
|
|
22
|
-
await onAddFile(file,
|
|
21
|
+
await onAddFile(file, node);
|
|
23
22
|
}
|
|
24
23
|
}
|
|
24
|
+
return;
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
await onMoveNode(droppedNode, uiNode);
|
|
35
|
-
}
|
|
26
|
+
const altOrOptionKeyPressed = event.getModifierState("Alt");
|
|
27
|
+
const data = event.dataTransfer.getData(UI_NODE);
|
|
28
|
+
const droppedNode = JSON.parse(data);
|
|
29
|
+
if (altOrOptionKeyPressed) {
|
|
30
|
+
await onCopyNode(droppedNode, node);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
await onMoveNode(droppedNode, node);
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
36
|
catch (error) {
|
|
@@ -41,20 +39,13 @@ export function useDrop(props) {
|
|
|
41
39
|
finally {
|
|
42
40
|
setIsDropTarget(false);
|
|
43
41
|
}
|
|
44
|
-
}, [onAddFile, onCopyNode, onMoveNode,
|
|
42
|
+
}, [onAddFile, onCopyNode, onMoveNode, parent]);
|
|
45
43
|
return useMemo(() => {
|
|
46
|
-
const dropProps = allowedToBeDropTarget
|
|
47
|
-
? { onDragOver, onDragLeave, onDrop }
|
|
48
|
-
: {
|
|
49
|
-
onDragOver: undefined,
|
|
50
|
-
onDragLeave: undefined,
|
|
51
|
-
onDrop: undefined,
|
|
52
|
-
};
|
|
53
44
|
return {
|
|
54
45
|
isDropTarget,
|
|
55
|
-
dropProps,
|
|
46
|
+
dropProps: { onDragOver, onDragLeave, onDrop },
|
|
56
47
|
};
|
|
57
|
-
}, [
|
|
48
|
+
}, [isDropTarget, onDragLeave, onDragOver, onDrop]);
|
|
58
49
|
}
|
|
59
50
|
function getDroppedFiles(items) {
|
|
60
51
|
const droppedFiles = Array.from(items)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-drop.js","sourceRoot":"","sources":["../../../../../src/connect/hooks/drag-and-drop/use-drop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"use-drop.js","sourceRoot":"","sources":["../../../../../src/connect/hooks/drag-and-drop/use-drop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAkB,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQvE,MAAM,UAAU,OAAO,CAAC,KAAY;IAClC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAC1D,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAExD,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,KAAgC,EAAE,EAAE;QAClE,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE;QACnC,eAAe,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,MAAM,GAAG,WAAW,CACxB,KAAK,EAAE,KAAgC,EAAE,EAAE;QACzC,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,KAAK,CAAC,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AC;AAED,SAAS,eAAe,CAAC,KAA2B;IAClD,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;SACnC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;SAC/D,MAAM,CAAC,OAAO,CAAC,CAAC;IAEnB,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
import { type driveLocations, type
|
|
1
|
+
import { type driveLocations, type sharingTypes } from "#connect";
|
|
2
2
|
export type SharingTypes = typeof sharingTypes;
|
|
3
3
|
export type SharingType = SharingTypes[number];
|
|
4
4
|
export type DriveLocations = typeof driveLocations;
|
|
5
5
|
export type DriveLocation = DriveLocations[number];
|
|
6
|
-
export type DocumentDriveDocument = {
|
|
7
|
-
state: {
|
|
8
|
-
global: {
|
|
9
|
-
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
slug: string | null | undefined;
|
|
12
|
-
icon: string;
|
|
13
|
-
nodes: (FileNode | FolderNode)[];
|
|
14
|
-
};
|
|
15
|
-
local: {
|
|
16
|
-
sharingType: SharingType;
|
|
17
|
-
availableOffline: boolean;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
6
|
//# sourceMappingURL=drives.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drives.d.ts","sourceRoot":"","sources":["../../../../src/connect/types/drives.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"drives.d.ts","sourceRoot":"","sources":["../../../../src/connect/types/drives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAElE,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC;AAC/C,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;AAC/C,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AACnD,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/connect/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/connect/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/connect/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/connect/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
|
|
@@ -1,63 +1,11 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
export type BaseUiDriveNode = {
|
|
12
|
-
id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
driveId: string;
|
|
15
|
-
kind: typeof DRIVE;
|
|
16
|
-
parentFolder: null;
|
|
17
|
-
syncStatus: SyncStatus | undefined;
|
|
18
|
-
};
|
|
19
|
-
export type BaseUiFileNode = {
|
|
20
|
-
id: string;
|
|
21
|
-
name: string;
|
|
22
|
-
driveId: string;
|
|
23
|
-
kind: typeof FILE;
|
|
24
|
-
parentFolder: string;
|
|
25
|
-
documentType: string;
|
|
26
|
-
syncStatus: SyncStatus | undefined;
|
|
27
|
-
};
|
|
28
|
-
export type BaseUiNode = BaseUiFolderNode | BaseUiFileNode | BaseUiDriveNode;
|
|
29
|
-
export type UiFileNode = BaseUiFileNode & {
|
|
30
|
-
slug?: string | null;
|
|
31
|
-
documentType: TDocumentType;
|
|
32
|
-
synchronizationUnits: SynchronizationUnitInput[];
|
|
33
|
-
sharingType: SharingType;
|
|
34
|
-
};
|
|
35
|
-
export type UiFolderNode = BaseUiFolderNode & {
|
|
36
|
-
slug?: string | null;
|
|
37
|
-
children: UiNode[];
|
|
38
|
-
sharingType: SharingType;
|
|
39
|
-
};
|
|
40
|
-
export type UiDriveNode = BaseUiDriveNode & {
|
|
41
|
-
slug: string | null;
|
|
42
|
-
children: UiNode[];
|
|
43
|
-
nodeMap: Record<string, UiNode>;
|
|
44
|
-
sharingType: SharingType;
|
|
45
|
-
availableOffline: boolean;
|
|
46
|
-
icon: string | null;
|
|
47
|
-
};
|
|
48
|
-
export type UiNode = UiDriveNode | UiFileNode | UiFolderNode;
|
|
49
|
-
export type FileNode = {
|
|
50
|
-
documentType: string;
|
|
51
|
-
id: string;
|
|
52
|
-
kind: string;
|
|
53
|
-
name: string;
|
|
54
|
-
parentFolder: Maybe<string>;
|
|
55
|
-
synchronizationUnits: SynchronizationUnitInput[];
|
|
56
|
-
};
|
|
57
|
-
export type FolderNode = {
|
|
58
|
-
id: string;
|
|
59
|
-
kind: string;
|
|
60
|
-
name: string;
|
|
61
|
-
parentFolder: Maybe<string>;
|
|
1
|
+
import { type FolderNode, type Node } from "document-drive";
|
|
2
|
+
export type TNodeActions = {
|
|
3
|
+
onAddFile: (file: File, parent: Node | undefined) => Promise<void>;
|
|
4
|
+
onAddFolder: (name: string, parent: Node | undefined) => Promise<FolderNode | undefined>;
|
|
5
|
+
onRenameNode: (newName: string, node: Node) => Promise<Node | undefined>;
|
|
6
|
+
onCopyNode: (src: Node, target: Node | undefined) => Promise<void>;
|
|
7
|
+
onMoveNode: (src: Node, target: Node | undefined) => Promise<void>;
|
|
8
|
+
onDuplicateNode: (src: Node) => Promise<void>;
|
|
9
|
+
onAddAndSelectNewFolder: (name: string) => Promise<void>;
|
|
62
10
|
};
|
|
63
11
|
//# sourceMappingURL=nodes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../../src/connect/types/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../../src/connect/types/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAE5D,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,WAAW,EAAE,CACX,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,IAAI,GAAG,SAAS,KACrB,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;IACrC,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC;IACzE,UAAU,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,UAAU,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,eAAe,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,uBAAuB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1D,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type debugNodeOptions, type DRIVE, type FILE, type FOLDER, type nodeOptions, type normalNodeOptions, type SharingType
|
|
1
|
+
import { type debugNodeOptions, type DRIVE, type FILE, type FOLDER, type nodeOptions, type normalNodeOptions, type SharingType } from "#connect";
|
|
2
|
+
import { type Node } from "document-drive";
|
|
2
3
|
import { type ReactNode } from "react";
|
|
3
4
|
export type OptionMetadata = {
|
|
4
5
|
label: ReactNode;
|
|
@@ -16,5 +17,5 @@ export type TNodeOptions = Record<SharingType, {
|
|
|
16
17
|
[FOLDER]: NodeOption[];
|
|
17
18
|
[FILE]: NodeOption[];
|
|
18
19
|
}>;
|
|
19
|
-
export type DropdownMenuHandlers = Partial<Record<NodeOption, (
|
|
20
|
+
export type DropdownMenuHandlers = Partial<Record<NodeOption, (node?: Node | null) => void>>;
|
|
20
21
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/connect/types/options.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,KAAK,EACV,KAAK,IAAI,EACT,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/connect/types/options.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB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,CAAC;AAC7B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/connect/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/connect/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/connect/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC"}
|
package/dist/style.css
CHANGED
|
@@ -1478,9 +1478,6 @@
|
|
|
1478
1478
|
.w-4\/5 {
|
|
1479
1479
|
width: calc(4/5 * 100%);
|
|
1480
1480
|
}
|
|
1481
|
-
.w-5 {
|
|
1482
|
-
width: calc(var(--spacing) * 5);
|
|
1483
|
-
}
|
|
1484
1481
|
.w-6 {
|
|
1485
1482
|
width: calc(var(--spacing) * 6);
|
|
1486
1483
|
}
|
|
@@ -1526,9 +1523,6 @@
|
|
|
1526
1523
|
.w-\[408px\] {
|
|
1527
1524
|
width: 408px;
|
|
1528
1525
|
}
|
|
1529
|
-
.w-\[420px\] {
|
|
1530
|
-
width: 420px;
|
|
1531
|
-
}
|
|
1532
1526
|
.w-\[432px\] {
|
|
1533
1527
|
width: 432px;
|
|
1534
1528
|
}
|
|
@@ -1667,9 +1661,6 @@
|
|
|
1667
1661
|
.grid-cols-\[1fr\,auto\,1fr\] {
|
|
1668
1662
|
grid-template-columns: 1fr,auto,1fr;
|
|
1669
1663
|
}
|
|
1670
|
-
.grid-cols-\[1fr\,auto\] {
|
|
1671
|
-
grid-template-columns: 1fr,auto;
|
|
1672
|
-
}
|
|
1673
1664
|
.grid-cols-\[208px\,380px\] {
|
|
1674
1665
|
grid-template-columns: 208px,380px;
|
|
1675
1666
|
}
|
|
@@ -1883,10 +1874,6 @@
|
|
|
1883
1874
|
border-style: var(--tw-border-style);
|
|
1884
1875
|
border-width: 2px;
|
|
1885
1876
|
}
|
|
1886
|
-
.border-y {
|
|
1887
|
-
border-block-style: var(--tw-border-style);
|
|
1888
|
-
border-block-width: 1px;
|
|
1889
|
-
}
|
|
1890
1877
|
.border-y-0 {
|
|
1891
1878
|
border-block-style: var(--tw-border-style);
|
|
1892
1879
|
border-block-width: 0px;
|
|
@@ -1985,9 +1972,6 @@
|
|
|
1985
1972
|
.bg-blue-500 {
|
|
1986
1973
|
background-color: var(--color-blue-500);
|
|
1987
1974
|
}
|
|
1988
|
-
.bg-blue-800 {
|
|
1989
|
-
background-color: var(--color-blue-800);
|
|
1990
|
-
}
|
|
1991
1975
|
.bg-blue-900 {
|
|
1992
1976
|
background-color: var(--color-blue-900);
|
|
1993
1977
|
}
|
|
@@ -2512,9 +2496,6 @@
|
|
|
2512
2496
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
2513
2497
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
2514
2498
|
}
|
|
2515
|
-
.delay-75 {
|
|
2516
|
-
transition-delay: 75ms;
|
|
2517
|
-
}
|
|
2518
2499
|
.duration-150 {
|
|
2519
2500
|
--tw-duration: 150ms;
|
|
2520
2501
|
transition-duration: 150ms;
|
|
@@ -2631,20 +2612,6 @@
|
|
|
2631
2612
|
}
|
|
2632
2613
|
}
|
|
2633
2614
|
}
|
|
2634
|
-
.group-hover\/node\:block {
|
|
2635
|
-
&:is(:where(.group\/node):hover *) {
|
|
2636
|
-
@media (hover: hover) {
|
|
2637
|
-
display: block;
|
|
2638
|
-
}
|
|
2639
|
-
}
|
|
2640
|
-
}
|
|
2641
|
-
.group-hover\/node\:text-gray-900 {
|
|
2642
|
-
&:is(:where(.group\/node):hover *) {
|
|
2643
|
-
@media (hover: hover) {
|
|
2644
|
-
color: var(--color-gray-900);
|
|
2645
|
-
}
|
|
2646
|
-
}
|
|
2647
|
-
}
|
|
2648
2615
|
.group-hover\/sidebar-footer\:block {
|
|
2649
2616
|
&:is(:where(.group\/sidebar-footer):hover *) {
|
|
2650
2617
|
@media (hover: hover) {
|
|
@@ -2920,12 +2887,6 @@
|
|
|
2920
2887
|
border-top-right-radius: var(--radius-2xl);
|
|
2921
2888
|
}
|
|
2922
2889
|
}
|
|
2923
|
-
.first-of-type\:border-b-0 {
|
|
2924
|
-
&:first-of-type {
|
|
2925
|
-
border-bottom-style: var(--tw-border-style);
|
|
2926
|
-
border-bottom-width: 0px;
|
|
2927
|
-
}
|
|
2928
|
-
}
|
|
2929
2890
|
.first-of-type\:pt-3 {
|
|
2930
2891
|
&:first-of-type {
|
|
2931
2892
|
padding-top: calc(var(--spacing) * 3);
|
|
@@ -2942,12 +2903,6 @@
|
|
|
2942
2903
|
border-bottom-left-radius: var(--radius-2xl);
|
|
2943
2904
|
}
|
|
2944
2905
|
}
|
|
2945
|
-
.last-of-type\:border-t-0 {
|
|
2946
|
-
&:last-of-type {
|
|
2947
|
-
border-top-style: var(--tw-border-style);
|
|
2948
|
-
border-top-width: 0px;
|
|
2949
|
-
}
|
|
2950
|
-
}
|
|
2951
2906
|
.last-of-type\:pb-3 {
|
|
2952
2907
|
&:last-of-type {
|
|
2953
2908
|
padding-bottom: calc(var(--spacing) * 3);
|
|
@@ -3058,13 +3013,6 @@
|
|
|
3058
3013
|
}
|
|
3059
3014
|
}
|
|
3060
3015
|
}
|
|
3061
|
-
.hover\:bg-gray-300 {
|
|
3062
|
-
&:hover {
|
|
3063
|
-
@media (hover: hover) {
|
|
3064
|
-
background-color: var(--color-gray-300);
|
|
3065
|
-
}
|
|
3066
|
-
}
|
|
3067
|
-
}
|
|
3068
3016
|
.hover\:bg-gray-900 {
|
|
3069
3017
|
&:hover {
|
|
3070
3018
|
@media (hover: hover) {
|