@muhgholy/next-drive 3.13.0 → 4.1.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 +2 -0
- package/dist/{chunk-XDAVDVO6.cjs → chunk-CFLH4TCQ.cjs} +12 -12
- package/dist/chunk-CFLH4TCQ.cjs.map +1 -0
- package/dist/{chunk-CN3AV3AN.js → chunk-T43C7MQ6.js} +12 -12
- package/dist/chunk-T43C7MQ6.js.map +1 -0
- package/dist/client/components/dialog.d.ts.map +1 -1
- package/dist/client/components/drive/header.d.ts.map +1 -1
- package/dist/client/components/ui/dialog-fullscreen.d.ts.map +1 -1
- package/dist/client/components/ui/progress.d.ts.map +1 -1
- package/dist/client/components/ui/sheet.d.ts.map +1 -1
- package/dist/client/index.cjs +531 -536
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.css +2 -1
- package/dist/client/index.css.map +1 -1
- package/dist/client/index.js +473 -478
- package/dist/client/index.js.map +1 -1
- package/dist/client/utils.d.ts.map +1 -1
- package/dist/server/express.cjs +1 -1
- package/dist/server/express.js +1 -1
- package/dist/server/index.cjs +3 -3
- package/dist/server/index.js +1 -1
- package/package.json +4 -3
- package/dist/chunk-CN3AV3AN.js.map +0 -1
- package/dist/chunk-XDAVDVO6.cjs.map +0 -1
package/dist/client/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './index.css';
|
|
2
|
-
import { cn, driveCreateUrl, driveCreateSrcSet, matchesMimeFilter, formatBytes, getFileIcon } from '../chunk-
|
|
2
|
+
import { cn, driveCreateUrl, driveCreateSrcSet, matchesMimeFilter, formatBytes, getFileIcon } from '../chunk-T43C7MQ6.js';
|
|
3
3
|
export { driveFileSchemaZod } from '../chunk-FJRGKB3U.js';
|
|
4
4
|
import * as React3 from 'react';
|
|
5
5
|
import React3__default, { createContext, useContext, useState, useCallback, useRef, useEffect, useMemo } from 'react';
|
|
@@ -7,7 +7,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
7
7
|
import { Slot } from '@radix-ui/react-slot';
|
|
8
8
|
import { cva } from 'class-variance-authority';
|
|
9
9
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
10
|
-
import { X, ChevronRight, Check, Circle, Loader2, Folder, FolderPlus, Menu, RotateCcw, Trash2, Group, ArrowUpDown, Calendar, ArrowDownAZ, ArrowUpAZ, ArrowDown01, ArrowUp01, LayoutGrid, List, RefreshCw, Upload, CheckCircle2, Cloud, AlertCircle, Pencil, FileText, HardDrive, Database, ChevronsUpDown, Plus, Settings2, Trash, FolderOpen, Clock } from 'lucide-react';
|
|
10
|
+
import { X, ChevronRight, Check, Circle, Loader2, Folder, FolderPlus, Menu, RotateCcw, Trash2, Group, Search, ArrowUpDown, Calendar, ArrowDownAZ, ArrowUpAZ, ArrowDown01, ArrowUp01, LayoutGrid, List, RefreshCw, Upload, CheckCircle2, Cloud, AlertCircle, Pencil, FileText, HardDrive, Database, ChevronsUpDown, Plus, Settings2, Trash, FolderOpen, Clock } from 'lucide-react';
|
|
11
11
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
12
12
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
13
13
|
import { useForm } from 'react-hook-form';
|
|
@@ -482,24 +482,24 @@ var useUpload = (apiEndpoint, activeAccountId, withCredentials = false, onUpload
|
|
|
482
482
|
return { uploads, uploadFiles, cancelUpload, cancelAllUploads };
|
|
483
483
|
};
|
|
484
484
|
var buttonVariants = cva(
|
|
485
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
485
|
+
"nd:inline-flex nd:items-center nd:justify-center nd:gap-2 nd:whitespace-nowrap nd:rounded-md nd:text-sm nd:font-medium nd:transition-all nd:disabled:pointer-events-none nd:disabled:opacity-50 [&_svg]:nd:pointer-events-none [&_svg:not([class*='size-'])]:nd:size-4 nd:shrink-0 [&_svg]:nd:shrink-0 nd:outline-none nd:focus-visible:border-ring nd:focus-visible:ring-ring/50 nd:focus-visible:ring-[3px] aria-invalid:nd:ring-destructive/20 dark:aria-invalid:nd:ring-destructive/40 aria-invalid:nd:border-destructive",
|
|
486
486
|
{
|
|
487
487
|
variants: {
|
|
488
488
|
variant: {
|
|
489
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
490
|
-
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
|
491
|
-
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
492
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
493
|
-
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
494
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
489
|
+
default: "nd:bg-primary nd:text-primary-foreground nd:hover:bg-primary/90",
|
|
490
|
+
destructive: "nd:bg-destructive nd:text-white nd:hover:bg-destructive/90 nd:focus-visible:ring-destructive/20 dark:nd:focus-visible:ring-destructive/40",
|
|
491
|
+
outline: "nd:border nd:bg-background nd:shadow-xs nd:hover:bg-accent nd:hover:text-accent-foreground nd:dark:bg-input/30 nd:dark:border-input nd:dark:hover:bg-input/50",
|
|
492
|
+
secondary: "nd:bg-secondary nd:text-secondary-foreground nd:hover:bg-secondary/80",
|
|
493
|
+
ghost: "nd:hover:bg-accent nd:hover:text-accent-foreground nd:dark:hover:bg-accent/50",
|
|
494
|
+
link: "nd:text-primary nd:underline-offset-4 nd:hover:underline"
|
|
495
495
|
},
|
|
496
496
|
size: {
|
|
497
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
498
|
-
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
499
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
500
|
-
icon: "size-9",
|
|
501
|
-
"icon-sm": "size-8",
|
|
502
|
-
"icon-lg": "size-10"
|
|
497
|
+
default: "nd:h-9 nd:px-4 nd:py-2 nd:has-[>svg]:px-3",
|
|
498
|
+
sm: "nd:h-8 nd:rounded-md nd:gap-1.5 nd:px-3 nd:has-[>svg]:px-2.5",
|
|
499
|
+
lg: "nd:h-10 nd:rounded-md nd:px-6 nd:has-[>svg]:px-4",
|
|
500
|
+
icon: "nd:size-9",
|
|
501
|
+
"icon-sm": "nd:size-8",
|
|
502
|
+
"icon-lg": "nd:size-10"
|
|
503
503
|
}
|
|
504
504
|
},
|
|
505
505
|
defaultVariants: {
|
|
@@ -540,9 +540,9 @@ function Dialog2Content({
|
|
|
540
540
|
{
|
|
541
541
|
"data-slot": "dialog2-overlay",
|
|
542
542
|
className: cn(
|
|
543
|
-
"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm",
|
|
544
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
545
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
|
543
|
+
"nd:fixed nd:inset-0 nd:z-50 nd:bg-black/60 nd:backdrop-blur-sm",
|
|
544
|
+
"nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out",
|
|
545
|
+
"nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0"
|
|
546
546
|
)
|
|
547
547
|
}
|
|
548
548
|
),
|
|
@@ -551,20 +551,21 @@ function Dialog2Content({
|
|
|
551
551
|
{
|
|
552
552
|
"data-slot": "dialog2-content",
|
|
553
553
|
className: cn(
|
|
554
|
+
"nd:overflow-hidden",
|
|
554
555
|
// Base styles
|
|
555
|
-
"fixed z-50 flex flex-col bg-background shadow-2xl outline-none",
|
|
556
|
+
"nd:fixed nd:z-50 nd:flex nd:flex-col nd:bg-background nd:shadow-2xl nd:outline-none",
|
|
556
557
|
// Mobile: Full screen
|
|
557
|
-
"inset-0 rounded-none",
|
|
558
|
+
"nd:inset-0 nd:rounded-none",
|
|
558
559
|
// Desktop: Centered modal with max dimensions
|
|
559
|
-
"md:inset-auto md:top-[50%] md:left-[50%] md:translate-x-[-50%] md:translate-y-[-50%]",
|
|
560
|
-
"md:max-w-5xl md:w-[95vw] md:max-h-[90vh] md:rounded-xl md:border",
|
|
560
|
+
"nd:md:inset-auto nd:md:top-[50%] nd:md:left-[50%] nd:md:translate-x-[-50%] nd:md:translate-y-[-50%]",
|
|
561
|
+
"nd:md:max-w-5xl nd:md:w-[95vw] nd:md:max-h-[90vh] nd:md:rounded-xl nd:md:border",
|
|
561
562
|
// Animations
|
|
562
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
563
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
564
|
-
"data-[state=closed]:slide-out-to-bottom-2 data-[state=open]:slide-in-from-bottom-2",
|
|
565
|
-
"md:data-[state=closed]:zoom-out-95 md:data-[state=open]:zoom-in-95",
|
|
566
|
-
"md:data-[state=closed]:slide-out-to-bottom-0 md:data-[state=open]:slide-in-from-bottom-0",
|
|
567
|
-
"duration-200",
|
|
563
|
+
"nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out",
|
|
564
|
+
"nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0",
|
|
565
|
+
"nd:data-[state=closed]:slide-out-to-bottom-2 nd:data-[state=open]:slide-in-from-bottom-2",
|
|
566
|
+
"nd:md:data-[state=closed]:zoom-out-95 nd:md:data-[state=open]:zoom-in-95",
|
|
567
|
+
"nd:md:data-[state=closed]:slide-out-to-bottom-0 nd:md:data-[state=open]:slide-in-from-bottom-0",
|
|
568
|
+
"nd:duration-200",
|
|
568
569
|
className
|
|
569
570
|
),
|
|
570
571
|
...props,
|
|
@@ -575,15 +576,15 @@ function Dialog2Content({
|
|
|
575
576
|
{
|
|
576
577
|
"data-slot": "dialog2-close",
|
|
577
578
|
className: cn(
|
|
578
|
-
"absolute top-3 right-3 z-10",
|
|
579
|
-
"flex items-center justify-center size-8 rounded-full",
|
|
580
|
-
"bg-muted/80 hover:bg-muted text-muted-foreground hover:text-foreground",
|
|
581
|
-
"transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
582
|
-
"md:top-4 md:right-4 md:size-7 md:rounded-md md:bg-transparent"
|
|
579
|
+
"nd:absolute nd:top-3 nd:right-3 nd:z-10",
|
|
580
|
+
"nd:flex nd:items-center nd:justify-center nd:size-8 nd:rounded-full",
|
|
581
|
+
"nd:bg-muted/80 nd:hover:bg-muted nd:text-muted-foreground nd:hover:text-foreground",
|
|
582
|
+
"nd:transition-colors nd:focus:outline-none nd:focus:ring-2 nd:focus:ring-ring nd:focus:ring-offset-2",
|
|
583
|
+
"nd:md:top-4 nd:md:right-4 nd:md:size-7 nd:md:rounded-md nd:md:bg-transparent"
|
|
583
584
|
),
|
|
584
585
|
children: [
|
|
585
|
-
/* @__PURE__ */ jsx(X, { className: "size-4" }),
|
|
586
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
586
|
+
/* @__PURE__ */ jsx(X, { className: "nd:size-4" }),
|
|
587
|
+
/* @__PURE__ */ jsx("span", { className: "nd:sr-only", children: "Close" })
|
|
587
588
|
]
|
|
588
589
|
}
|
|
589
590
|
)
|
|
@@ -598,7 +599,7 @@ function Dialog2Header({ className, ...props }) {
|
|
|
598
599
|
{
|
|
599
600
|
"data-slot": "dialog2-header",
|
|
600
601
|
className: cn(
|
|
601
|
-
"flex items-center justify-between shrink-0 px-4 h-14 border-b bg-background/95 backdrop-blur-sm",
|
|
602
|
+
"nd:flex nd:items-center nd:justify-between nd:shrink-0 nd:px-4 nd:h-14 nd:border-b nd:bg-background/95 nd:backdrop-blur-sm",
|
|
602
603
|
className
|
|
603
604
|
),
|
|
604
605
|
...props
|
|
@@ -610,7 +611,7 @@ function Dialog2Body({ className, ...props }) {
|
|
|
610
611
|
"div",
|
|
611
612
|
{
|
|
612
613
|
"data-slot": "dialog2-body",
|
|
613
|
-
className: cn("flex-1 min-h-0 overflow-hidden", className),
|
|
614
|
+
className: cn("nd:flex-1 nd:min-h-0 nd:overflow-hidden", className),
|
|
614
615
|
...props
|
|
615
616
|
}
|
|
616
617
|
);
|
|
@@ -621,7 +622,7 @@ function Dialog2Footer({ className, ...props }) {
|
|
|
621
622
|
{
|
|
622
623
|
"data-slot": "dialog2-footer",
|
|
623
624
|
className: cn(
|
|
624
|
-
"flex items-center justify-end gap-2 shrink-0 px-4 py-3 border-t bg-background/95 backdrop-blur-sm",
|
|
625
|
+
"nd:flex nd:items-center nd:justify-end nd:gap-2 nd:shrink-0 nd:px-4 nd:py-3 nd:border-t nd:bg-background/95 nd:backdrop-blur-sm",
|
|
625
626
|
className
|
|
626
627
|
),
|
|
627
628
|
...props
|
|
@@ -636,7 +637,7 @@ function Dialog2Title({
|
|
|
636
637
|
SheetPrimitive.Title,
|
|
637
638
|
{
|
|
638
639
|
"data-slot": "dialog2-title",
|
|
639
|
-
className: cn("text-base font-semibold", className),
|
|
640
|
+
className: cn("nd:text-base nd:font-semibold", className),
|
|
640
641
|
...props
|
|
641
642
|
}
|
|
642
643
|
);
|
|
@@ -648,7 +649,7 @@ var SheetOverlay = React3.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
648
649
|
SheetPrimitive.Overlay,
|
|
649
650
|
{
|
|
650
651
|
className: cn(
|
|
651
|
-
"fixed inset-0 z-50 bg-black/80
|
|
652
|
+
"nd:fixed nd:inset-0 nd:z-50 nd:bg-black/80 nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0",
|
|
652
653
|
className
|
|
653
654
|
),
|
|
654
655
|
...props,
|
|
@@ -657,14 +658,14 @@ var SheetOverlay = React3.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
657
658
|
));
|
|
658
659
|
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
659
660
|
var sheetVariants = cva(
|
|
660
|
-
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
661
|
+
"nd:fixed nd:z-50 nd:gap-4 nd:bg-background nd:p-6 nd:shadow-lg nd:transition nd:ease-in-out nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out nd:data-[state=closed]:duration-300 nd:data-[state=open]:duration-500",
|
|
661
662
|
{
|
|
662
663
|
variants: {
|
|
663
664
|
side: {
|
|
664
|
-
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
665
|
-
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
666
|
-
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
667
|
-
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
665
|
+
top: "nd:inset-x-0 nd:top-0 nd:border-b nd:data-[state=closed]:slide-out-to-top nd:data-[state=open]:slide-in-from-top",
|
|
666
|
+
bottom: "nd:inset-x-0 nd:bottom-0 nd:border-t nd:data-[state=closed]:slide-out-to-bottom nd:data-[state=open]:slide-in-from-bottom",
|
|
667
|
+
left: "nd:inset-y-0 nd:left-0 nd:h-full nd:w-3/4 nd:border-r nd:data-[state=closed]:slide-out-to-left nd:data-[state=open]:slide-in-from-left nd:sm:max-w-sm",
|
|
668
|
+
right: "nd:inset-y-0 nd:right-0 nd:h-full nd:w-3/4 nd:border-l nd:data-[state=closed]:slide-out-to-right nd:data-[state=open]:slide-in-from-right nd:sm:max-w-sm"
|
|
668
669
|
}
|
|
669
670
|
},
|
|
670
671
|
defaultVariants: {
|
|
@@ -682,9 +683,9 @@ var SheetContent = React3.forwardRef(({ side = "right", className, children, hid
|
|
|
682
683
|
...props,
|
|
683
684
|
children: [
|
|
684
685
|
children,
|
|
685
|
-
!hideCloseButton && /* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
686
|
-
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
687
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
686
|
+
!hideCloseButton && /* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "nd:absolute nd:right-4 nd:top-4 nd:rounded-sm nd:opacity-70 nd:ring-offset-background nd:transition-opacity nd:hover:opacity-100 nd:focus:outline-none nd:focus:ring-2 nd:focus:ring-ring nd:focus:ring-offset-2 nd:disabled:pointer-events-none nd:data-[state=open]:bg-secondary", children: [
|
|
687
|
+
/* @__PURE__ */ jsx(X, { className: "nd:h-4 nd:w-4" }),
|
|
688
|
+
/* @__PURE__ */ jsx("span", { className: "nd:sr-only", children: "Close" })
|
|
688
689
|
] })
|
|
689
690
|
]
|
|
690
691
|
}
|
|
@@ -695,7 +696,7 @@ var SheetTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
695
696
|
SheetPrimitive.Title,
|
|
696
697
|
{
|
|
697
698
|
ref,
|
|
698
|
-
className: cn("text-lg font-semibold text-foreground", className),
|
|
699
|
+
className: cn("nd:text-lg nd:font-semibold nd:text-foreground", className),
|
|
699
700
|
...props
|
|
700
701
|
}
|
|
701
702
|
));
|
|
@@ -704,7 +705,7 @@ var SheetDescription = React3.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
704
705
|
SheetPrimitive.Description,
|
|
705
706
|
{
|
|
706
707
|
ref,
|
|
707
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
708
|
+
className: cn("nd:text-sm nd:text-muted-foreground", className),
|
|
708
709
|
...props
|
|
709
710
|
}
|
|
710
711
|
));
|
|
@@ -728,7 +729,7 @@ function DialogOverlay({
|
|
|
728
729
|
{
|
|
729
730
|
"data-slot": "dialog-overlay",
|
|
730
731
|
className: cn(
|
|
731
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
732
|
+
"nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0 nd:fixed nd:inset-0 nd:z-50 nd:bg-black/50",
|
|
732
733
|
className
|
|
733
734
|
),
|
|
734
735
|
...props
|
|
@@ -748,7 +749,7 @@ function DialogContent({
|
|
|
748
749
|
{
|
|
749
750
|
"data-slot": "dialog-content",
|
|
750
751
|
className: cn(
|
|
751
|
-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
752
|
+
"nd:bg-background nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0 nd:data-[state=closed]:zoom-out-95 nd:data-[state=open]:zoom-in-95 nd:fixed nd:top-[50%] nd:left-[50%] nd:z-50 nd:grid nd:w-full nd:max-w-[calc(100%-2rem)] nd:translate-x-[-50%] nd:translate-y-[-50%] nd:gap-4 nd:rounded-lg nd:border nd:p-6 nd:shadow-lg nd:duration-200 nd:sm:max-w-lg",
|
|
752
753
|
className
|
|
753
754
|
),
|
|
754
755
|
...props,
|
|
@@ -758,10 +759,10 @@ function DialogContent({
|
|
|
758
759
|
SheetPrimitive.Close,
|
|
759
760
|
{
|
|
760
761
|
"data-slot": "dialog-close",
|
|
761
|
-
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
762
|
+
className: "nd:ring-offset-background nd:focus:ring-ring nd:data-[state=open]:bg-accent nd:data-[state=open]:text-muted-foreground nd:absolute nd:top-4 nd:right-4 nd:rounded-xs nd:opacity-70 nd:transition-opacity nd:hover:opacity-100 nd:focus:ring-2 nd:focus:ring-offset-2 nd:focus:outline-hidden nd:disabled:pointer-events-none [&_svg]:nd:pointer-events-none [&_svg]:nd:shrink-0 [&_svg:not([class*='size-'])]:nd:size-4",
|
|
762
763
|
children: [
|
|
763
|
-
/* @__PURE__ */ jsx(X, { className: "size-4" }),
|
|
764
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
764
|
+
/* @__PURE__ */ jsx(X, { className: "nd:size-4" }),
|
|
765
|
+
/* @__PURE__ */ jsx("span", { className: "nd:sr-only", children: "Close" })
|
|
765
766
|
]
|
|
766
767
|
}
|
|
767
768
|
)
|
|
@@ -775,7 +776,7 @@ function DialogHeader({ className, ...props }) {
|
|
|
775
776
|
"div",
|
|
776
777
|
{
|
|
777
778
|
"data-slot": "dialog-header",
|
|
778
|
-
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
779
|
+
className: cn("nd:flex nd:flex-col nd:gap-2 nd:text-center nd:sm:text-left", className),
|
|
779
780
|
...props
|
|
780
781
|
}
|
|
781
782
|
);
|
|
@@ -786,7 +787,7 @@ function DialogFooter({ className, ...props }) {
|
|
|
786
787
|
{
|
|
787
788
|
"data-slot": "dialog-footer",
|
|
788
789
|
className: cn(
|
|
789
|
-
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
790
|
+
"nd:flex nd:flex-col-reverse nd:gap-2 nd:sm:flex-row nd:sm:justify-end",
|
|
790
791
|
className
|
|
791
792
|
),
|
|
792
793
|
...props
|
|
@@ -801,7 +802,7 @@ function DialogTitle({
|
|
|
801
802
|
SheetPrimitive.Title,
|
|
802
803
|
{
|
|
803
804
|
"data-slot": "dialog-title",
|
|
804
|
-
className: cn("text-lg leading-none font-semibold", className),
|
|
805
|
+
className: cn("nd:text-lg nd:leading-none nd:font-semibold", className),
|
|
805
806
|
...props
|
|
806
807
|
}
|
|
807
808
|
);
|
|
@@ -814,7 +815,7 @@ function DialogDescription({
|
|
|
814
815
|
SheetPrimitive.Description,
|
|
815
816
|
{
|
|
816
817
|
"data-slot": "dialog-description",
|
|
817
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
818
|
+
className: cn("nd:text-muted-foreground nd:text-sm", className),
|
|
818
819
|
...props
|
|
819
820
|
}
|
|
820
821
|
);
|
|
@@ -827,14 +828,14 @@ var DropdownMenuSubTrigger = React3.forwardRef(({ className, inset, children, ..
|
|
|
827
828
|
{
|
|
828
829
|
ref,
|
|
829
830
|
className: cn(
|
|
830
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
831
|
-
inset && "pl-8",
|
|
831
|
+
"nd:flex nd:cursor-default nd:select-none nd:items-center nd:rounded-sm nd:px-2 nd:py-1.5 nd:text-sm nd:outline-none nd:focus:bg-accent nd:data-[state=open]:bg-accent",
|
|
832
|
+
inset && "nd:pl-8",
|
|
832
833
|
className
|
|
833
834
|
),
|
|
834
835
|
...props,
|
|
835
836
|
children: [
|
|
836
837
|
children,
|
|
837
|
-
/* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })
|
|
838
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "nd:ml-auto nd:h-4 nd:w-4" })
|
|
838
839
|
]
|
|
839
840
|
}
|
|
840
841
|
));
|
|
@@ -844,7 +845,7 @@ var DropdownMenuSubContent = React3.forwardRef(({ className, ...props }, ref) =>
|
|
|
844
845
|
{
|
|
845
846
|
ref,
|
|
846
847
|
className: cn(
|
|
847
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
848
|
+
"nd:z-50 nd:min-w-[8rem] nd:overflow-hidden nd:rounded-md nd:border nd:bg-popover nd:p-1 nd:text-popover-foreground nd:shadow-lg nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0 nd:data-[state=closed]:zoom-out-95 nd:data-[state=open]:zoom-in-95 nd:data-[side=bottom]:slide-in-from-top-2 nd:data-[side=left]:slide-in-from-right-2 nd:data-[side=right]:slide-in-from-left-2 nd:data-[side=top]:slide-in-from-bottom-2",
|
|
848
849
|
className
|
|
849
850
|
),
|
|
850
851
|
...props
|
|
@@ -857,7 +858,7 @@ var DropdownMenuContent = React3.forwardRef(({ className, sideOffset = 4, ...pro
|
|
|
857
858
|
ref,
|
|
858
859
|
sideOffset,
|
|
859
860
|
className: cn(
|
|
860
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
861
|
+
"nd:z-50 nd:min-w-[8rem] nd:overflow-hidden nd:rounded-md nd:border nd:bg-popover nd:p-1 nd:text-popover-foreground nd:shadow-md nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0 nd:data-[state=closed]:zoom-out-95 nd:data-[state=open]:zoom-in-95 nd:data-[side=bottom]:slide-in-from-top-2 nd:data-[side=left]:slide-in-from-right-2 nd:data-[side=right]:slide-in-from-left-2 nd:data-[side=top]:slide-in-from-bottom-2",
|
|
861
862
|
className
|
|
862
863
|
),
|
|
863
864
|
...props
|
|
@@ -869,8 +870,8 @@ var DropdownMenuItem = React3.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
869
870
|
{
|
|
870
871
|
ref,
|
|
871
872
|
className: cn(
|
|
872
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
873
|
-
inset && "pl-8",
|
|
873
|
+
"nd:relative nd:flex nd:cursor-default nd:select-none nd:items-center nd:rounded-sm nd:px-2 nd:py-1.5 nd:text-sm nd:outline-none nd:transition-colors nd:focus:bg-accent nd:focus:text-accent-foreground nd:data-[disabled]:pointer-events-none nd:data-[disabled]:opacity-50",
|
|
874
|
+
inset && "nd:pl-8",
|
|
874
875
|
className
|
|
875
876
|
),
|
|
876
877
|
...props
|
|
@@ -882,13 +883,13 @@ var DropdownMenuCheckboxItem = React3.forwardRef(({ className, children, checked
|
|
|
882
883
|
{
|
|
883
884
|
ref,
|
|
884
885
|
className: cn(
|
|
885
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
886
|
+
"nd:relative nd:flex nd:cursor-default nd:select-none nd:items-center nd:rounded-sm nd:px-2 nd:py-1.5 nd:text-sm nd:outline-none nd:transition-colors nd:focus:bg-accent nd:focus:text-accent-foreground nd:data-[disabled]:pointer-events-none nd:data-[disabled]:opacity-50",
|
|
886
887
|
className
|
|
887
888
|
),
|
|
888
889
|
checked,
|
|
889
890
|
...props,
|
|
890
891
|
children: [
|
|
891
|
-
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
892
|
+
/* @__PURE__ */ jsx("span", { className: "nd:absolute nd:left-2 nd:flex nd:h-3.5 nd:w-3.5 nd:items-center nd:justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "nd:h-4 nd:w-4" }) }) }),
|
|
892
893
|
children
|
|
893
894
|
]
|
|
894
895
|
}
|
|
@@ -899,12 +900,12 @@ var DropdownMenuRadioItem = React3.forwardRef(({ className, children, ...props }
|
|
|
899
900
|
{
|
|
900
901
|
ref,
|
|
901
902
|
className: cn(
|
|
902
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
903
|
+
"nd:relative nd:flex nd:cursor-default nd:select-none nd:items-center nd:rounded-sm nd:px-2 nd:py-1.5 nd:text-sm nd:outline-none nd:transition-colors nd:focus:bg-accent nd:focus:text-accent-foreground nd:data-[disabled]:pointer-events-none nd:data-[disabled]:opacity-50",
|
|
903
904
|
className
|
|
904
905
|
),
|
|
905
906
|
...props,
|
|
906
907
|
children: [
|
|
907
|
-
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
908
|
+
/* @__PURE__ */ jsx("span", { className: "nd:absolute nd:left-2 nd:flex nd:h-3.5 nd:w-3.5 nd:items-center nd:justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "nd:h-2 nd:w-2 nd:fill-current" }) }) }),
|
|
908
909
|
children
|
|
909
910
|
]
|
|
910
911
|
}
|
|
@@ -915,8 +916,8 @@ var DropdownMenuLabel = React3.forwardRef(({ className, inset, ...props }, ref)
|
|
|
915
916
|
{
|
|
916
917
|
ref,
|
|
917
918
|
className: cn(
|
|
918
|
-
"px-2 py-1.5 text-sm font-semibold",
|
|
919
|
-
inset && "pl-8",
|
|
919
|
+
"nd:px-2 nd:py-1.5 nd:text-sm nd:font-semibold",
|
|
920
|
+
inset && "nd:pl-8",
|
|
920
921
|
className
|
|
921
922
|
),
|
|
922
923
|
...props
|
|
@@ -927,18 +928,18 @@ var DropdownMenuSeparator = React3.forwardRef(({ className, ...props }, ref) =>
|
|
|
927
928
|
DropdownMenuPrimitive.Separator,
|
|
928
929
|
{
|
|
929
930
|
ref,
|
|
930
|
-
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
931
|
+
className: cn("-nd:mx-1 nd:my-1 nd:h-px nd:bg-muted", className),
|
|
931
932
|
...props
|
|
932
933
|
}
|
|
933
934
|
));
|
|
934
935
|
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
935
936
|
var alertVariants = cva(
|
|
936
|
-
"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
937
|
+
"nd:relative nd:w-full nd:rounded-lg nd:border nd:px-4 nd:py-3 nd:text-sm nd:grid nd:has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] nd:grid-cols-[0_1fr] nd:has-[>svg]:gap-x-3 nd:gap-y-0.5 nd:items-start nd:[&>svg]:size-4 nd:[&>svg]:translate-y-0.5 nd:[&>svg]:text-current",
|
|
937
938
|
{
|
|
938
939
|
variants: {
|
|
939
940
|
variant: {
|
|
940
|
-
default: "bg-card text-card-foreground",
|
|
941
|
-
destructive: "text-destructive bg-card [&>svg]:text-current
|
|
941
|
+
default: "nd:bg-card nd:text-card-foreground",
|
|
942
|
+
destructive: "nd:text-destructive nd:bg-card nd:[&>svg]:text-current nd:*:data-[slot=alert-description]:text-destructive/90"
|
|
942
943
|
}
|
|
943
944
|
},
|
|
944
945
|
defaultVariants: {
|
|
@@ -967,7 +968,7 @@ function AlertTitle({ className, ...props }) {
|
|
|
967
968
|
{
|
|
968
969
|
"data-slot": "alert-title",
|
|
969
970
|
className: cn(
|
|
970
|
-
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
|
|
971
|
+
"nd:col-start-2 nd:line-clamp-1 nd:min-h-4 nd:font-medium nd:tracking-tight",
|
|
971
972
|
className
|
|
972
973
|
),
|
|
973
974
|
...props
|
|
@@ -983,7 +984,7 @@ function AlertDescription({
|
|
|
983
984
|
{
|
|
984
985
|
"data-slot": "alert-description",
|
|
985
986
|
className: cn(
|
|
986
|
-
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
|
|
987
|
+
"nd:text-muted-foreground nd:col-start-2 nd:grid nd:justify-items-start nd:gap-1 nd:text-sm nd:[&_p]:leading-relaxed",
|
|
987
988
|
className
|
|
988
989
|
),
|
|
989
990
|
...props
|
|
@@ -997,9 +998,9 @@ function Input({ className, type, ...props }) {
|
|
|
997
998
|
type,
|
|
998
999
|
"data-slot": "input",
|
|
999
1000
|
className: cn(
|
|
1000
|
-
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1001
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
1002
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
1001
|
+
"file:nd:text-foreground placeholder:nd:text-muted-foreground selection:nd:bg-primary selection:nd:text-primary-foreground nd:dark:bg-input/30 nd:border-input nd:h-9 nd:w-full nd:min-w-0 nd:rounded-md nd:border nd:bg-transparent nd:px-3 nd:py-1 nd:text-base nd:shadow-xs nd:transition-[color,box-shadow] nd:outline-none file:nd:inline-flex file:nd:h-7 file:nd:border-0 file:nd:bg-transparent file:nd:text-sm file:nd:font-medium nd:disabled:pointer-events-none nd:disabled:cursor-not-allowed nd:disabled:opacity-50 nd:md:text-sm",
|
|
1002
|
+
"nd:focus-visible:border-ring nd:focus-visible:ring-ring/50 nd:focus-visible:ring-[3px]",
|
|
1003
|
+
"aria-invalid:nd:ring-destructive/20 dark:aria-invalid:nd:ring-destructive/40 aria-invalid:nd:border-destructive",
|
|
1003
1004
|
className
|
|
1004
1005
|
),
|
|
1005
1006
|
...props
|
|
@@ -1015,7 +1016,7 @@ function Label2({
|
|
|
1015
1016
|
{
|
|
1016
1017
|
"data-slot": "label",
|
|
1017
1018
|
className: cn(
|
|
1018
|
-
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
1019
|
+
"nd:flex nd:items-center nd:gap-2 nd:text-sm nd:leading-none nd:font-medium nd:select-none group-nd:data-[disabled=true]:pointer-events-none group-nd:data-[disabled=true]:opacity-50 peer-nd:disabled:cursor-not-allowed peer-nd:disabled:opacity-50",
|
|
1019
1020
|
className
|
|
1020
1021
|
),
|
|
1021
1022
|
...props
|
|
@@ -1100,11 +1101,11 @@ var DialogConfirmation = (props) => {
|
|
|
1100
1101
|
/* @__PURE__ */ jsx(DialogDescription, { children: description })
|
|
1101
1102
|
] }),
|
|
1102
1103
|
error && /* @__PURE__ */ jsxs(Alert, { variant: "destructive", children: [
|
|
1103
|
-
/* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4" }),
|
|
1104
|
+
/* @__PURE__ */ jsx(AlertCircle, { className: "nd:h-4 nd:w-4" }),
|
|
1104
1105
|
/* @__PURE__ */ jsx(AlertTitle, { children: "Error" }),
|
|
1105
1106
|
/* @__PURE__ */ jsx(AlertDescription, { children: error })
|
|
1106
1107
|
] }),
|
|
1107
|
-
inputs && inputs.length > 0 && /* @__PURE__ */ jsx("div", { className: "grid gap-4 py-4", children: inputs.map((input, index) => /* @__PURE__ */ jsxs("div", { className: "grid gap-2", children: [
|
|
1108
|
+
inputs && inputs.length > 0 && /* @__PURE__ */ jsx("div", { className: "nd:grid nd:gap-4 nd:py-4", children: inputs.map((input, index) => /* @__PURE__ */ jsxs("div", { className: "nd:grid nd:gap-2", children: [
|
|
1108
1109
|
/* @__PURE__ */ jsx(Label2, { htmlFor: input.id, children: input.name }),
|
|
1109
1110
|
/* @__PURE__ */ jsx(
|
|
1110
1111
|
Input,
|
|
@@ -1199,11 +1200,11 @@ var RenameAccountDialog = (props) => {
|
|
|
1199
1200
|
/* @__PURE__ */ jsx(DialogDescription, { children: "Enter a new display name for this storage account." })
|
|
1200
1201
|
] }),
|
|
1201
1202
|
errors.name && /* @__PURE__ */ jsxs(Alert, { variant: "destructive", children: [
|
|
1202
|
-
/* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4" }),
|
|
1203
|
+
/* @__PURE__ */ jsx(AlertCircle, { className: "nd:h-4 nd:w-4" }),
|
|
1203
1204
|
/* @__PURE__ */ jsx(AlertTitle, { children: "Error" }),
|
|
1204
1205
|
/* @__PURE__ */ jsx(AlertDescription, { children: errors.name.message })
|
|
1205
1206
|
] }),
|
|
1206
|
-
/* @__PURE__ */ jsx("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-2", children: [
|
|
1207
|
+
/* @__PURE__ */ jsx("div", { className: "nd:grid nd:gap-4 nd:py-4", children: /* @__PURE__ */ jsxs("div", { className: "nd:grid nd:gap-2", children: [
|
|
1207
1208
|
/* @__PURE__ */ jsx(Label2, { htmlFor: "rename-account-input", children: "Account name" }),
|
|
1208
1209
|
/* @__PURE__ */ jsx(
|
|
1209
1210
|
Input,
|
|
@@ -1328,7 +1329,7 @@ function Progress({
|
|
|
1328
1329
|
{
|
|
1329
1330
|
"data-slot": "progress",
|
|
1330
1331
|
className: cn(
|
|
1331
|
-
"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
|
|
1332
|
+
"nd:bg-primary/20 nd:relative nd:h-2 nd:w-full nd:overflow-hidden nd:rounded-full",
|
|
1332
1333
|
className
|
|
1333
1334
|
),
|
|
1334
1335
|
...props,
|
|
@@ -1337,9 +1338,9 @@ function Progress({
|
|
|
1337
1338
|
{
|
|
1338
1339
|
"data-slot": "progress-indicator",
|
|
1339
1340
|
className: cn(
|
|
1340
|
-
"bg-primary h-full flex-1 transition-all",
|
|
1341
|
-
isIndeterminate && "w-1/3 animate-[indeterminate_1.5s_ease-in-out_infinite]",
|
|
1342
|
-
!isIndeterminate && "w-full",
|
|
1341
|
+
"nd:bg-primary nd:h-full nd:flex-1 nd:transition-all",
|
|
1342
|
+
isIndeterminate && "nd:w-1/3 nd:animate-[indeterminate_1.5s_ease-in-out_infinite]",
|
|
1343
|
+
!isIndeterminate && "nd:w-full",
|
|
1343
1344
|
indicatorClassName
|
|
1344
1345
|
),
|
|
1345
1346
|
style: isIndeterminate ? void 0 : { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
@@ -1355,14 +1356,14 @@ var ContextMenuSubTrigger = React3.forwardRef(({ className, inset, children, ...
|
|
|
1355
1356
|
{
|
|
1356
1357
|
ref,
|
|
1357
1358
|
className: cn(
|
|
1358
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
1359
|
-
inset && "pl-8",
|
|
1359
|
+
"nd:flex nd:cursor-default nd:select-none nd:items-center nd:rounded-sm nd:px-2 nd:py-1.5 nd:text-sm nd:outline-none nd:focus:bg-accent nd:focus:text-accent-foreground nd:data-[state=open]:bg-accent nd:data-[state=open]:text-accent-foreground",
|
|
1360
|
+
inset && "nd:pl-8",
|
|
1360
1361
|
className
|
|
1361
1362
|
),
|
|
1362
1363
|
...props,
|
|
1363
1364
|
children: [
|
|
1364
1365
|
children,
|
|
1365
|
-
/* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })
|
|
1366
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "nd:ml-auto nd:h-4 nd:w-4" })
|
|
1366
1367
|
]
|
|
1367
1368
|
}
|
|
1368
1369
|
));
|
|
@@ -1372,7 +1373,7 @@ var ContextMenuSubContent = React3.forwardRef(({ className, ...props }, ref) =>
|
|
|
1372
1373
|
{
|
|
1373
1374
|
ref,
|
|
1374
1375
|
className: cn(
|
|
1375
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1376
|
+
"nd:z-50 nd:min-w-[8rem] nd:overflow-hidden nd:rounded-md nd:border nd:bg-popover nd:p-1 nd:text-popover-foreground nd:shadow-md nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0 nd:data-[state=closed]:zoom-out-95 nd:data-[state=open]:zoom-in-95 nd:data-[side=bottom]:slide-in-from-top-2 nd:data-[side=left]:slide-in-from-right-2 nd:data-[side=right]:slide-in-from-left-2 nd:data-[side=top]:slide-in-from-bottom-2",
|
|
1376
1377
|
className
|
|
1377
1378
|
),
|
|
1378
1379
|
...props
|
|
@@ -1384,7 +1385,7 @@ var ContextMenuContent = React3.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1384
1385
|
{
|
|
1385
1386
|
ref,
|
|
1386
1387
|
className: cn(
|
|
1387
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1388
|
+
"nd:z-50 nd:min-w-[8rem] nd:overflow-hidden nd:rounded-md nd:border nd:bg-popover nd:p-1 nd:text-popover-foreground nd:shadow-md nd:animate-in nd:fade-in-80 nd:data-[state=open]:animate-in nd:data-[state=closed]:animate-out nd:data-[state=closed]:fade-out-0 nd:data-[state=open]:fade-in-0 nd:data-[state=closed]:zoom-out-95 nd:data-[state=open]:zoom-in-95 nd:data-[side=bottom]:slide-in-from-top-2 nd:data-[side=left]:slide-in-from-right-2 nd:data-[side=right]:slide-in-from-left-2 nd:data-[side=top]:slide-in-from-bottom-2",
|
|
1388
1389
|
className
|
|
1389
1390
|
),
|
|
1390
1391
|
...props
|
|
@@ -1396,8 +1397,8 @@ var ContextMenuItem = React3.forwardRef(({ className, inset, ...props }, ref) =>
|
|
|
1396
1397
|
{
|
|
1397
1398
|
ref,
|
|
1398
1399
|
className: cn(
|
|
1399
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1400
|
-
inset && "pl-8",
|
|
1400
|
+
"nd:relative nd:flex nd:cursor-default nd:select-none nd:items-center nd:rounded-sm nd:px-2 nd:py-1.5 nd:text-sm nd:outline-none nd:focus:bg-accent nd:focus:text-accent-foreground nd:data-[disabled]:pointer-events-none nd:data-[disabled]:opacity-50",
|
|
1401
|
+
inset && "nd:pl-8",
|
|
1401
1402
|
className
|
|
1402
1403
|
),
|
|
1403
1404
|
...props
|
|
@@ -1409,13 +1410,13 @@ var ContextMenuCheckboxItem = React3.forwardRef(({ className, children, checked,
|
|
|
1409
1410
|
{
|
|
1410
1411
|
ref,
|
|
1411
1412
|
className: cn(
|
|
1412
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1413
|
+
"nd:relative nd:flex nd:cursor-default nd:select-none nd:items-center nd:rounded-sm nd:px-2 nd:py-1.5 nd:text-sm nd:outline-none nd:focus:bg-accent nd:focus:text-accent-foreground nd:data-[disabled]:pointer-events-none nd:data-[disabled]:opacity-50",
|
|
1413
1414
|
className
|
|
1414
1415
|
),
|
|
1415
1416
|
checked,
|
|
1416
1417
|
...props,
|
|
1417
1418
|
children: [
|
|
1418
|
-
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
1419
|
+
/* @__PURE__ */ jsx("span", { className: "nd:absolute nd:left-2 nd:flex nd:h-3.5 nd:w-3.5 nd:items-center nd:justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "nd:h-4 nd:w-4" }) }) }),
|
|
1419
1420
|
children
|
|
1420
1421
|
]
|
|
1421
1422
|
}
|
|
@@ -1426,12 +1427,12 @@ var ContextMenuRadioItem = React3.forwardRef(({ className, children, ...props },
|
|
|
1426
1427
|
{
|
|
1427
1428
|
ref,
|
|
1428
1429
|
className: cn(
|
|
1429
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1430
|
+
"nd:relative nd:flex nd:cursor-default nd:select-none nd:items-center nd:rounded-sm nd:px-2 nd:py-1.5 nd:text-sm nd:outline-none nd:focus:bg-accent nd:focus:text-accent-foreground nd:data-[disabled]:pointer-events-none nd:data-[disabled]:opacity-50",
|
|
1430
1431
|
className
|
|
1431
1432
|
),
|
|
1432
1433
|
...props,
|
|
1433
1434
|
children: [
|
|
1434
|
-
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
1435
|
+
/* @__PURE__ */ jsx("span", { className: "nd:absolute nd:left-2 nd:flex nd:h-3.5 nd:w-3.5 nd:items-center nd:justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "nd:h-2 nd:w-2 nd:fill-current" }) }) }),
|
|
1435
1436
|
children
|
|
1436
1437
|
]
|
|
1437
1438
|
}
|
|
@@ -1442,8 +1443,8 @@ var ContextMenuLabel = React3.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
1442
1443
|
{
|
|
1443
1444
|
ref,
|
|
1444
1445
|
className: cn(
|
|
1445
|
-
"px-2 py-1.5 text-sm font-semibold text-foreground",
|
|
1446
|
-
inset && "pl-8",
|
|
1446
|
+
"nd:px-2 nd:py-1.5 nd:text-sm nd:font-semibold nd:text-foreground",
|
|
1447
|
+
inset && "nd:pl-8",
|
|
1447
1448
|
className
|
|
1448
1449
|
),
|
|
1449
1450
|
...props
|
|
@@ -1454,7 +1455,7 @@ var ContextMenuSeparator = React3.forwardRef(({ className, ...props }, ref) => /
|
|
|
1454
1455
|
ContextMenuPrimitive.Separator,
|
|
1455
1456
|
{
|
|
1456
1457
|
ref,
|
|
1457
|
-
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
1458
|
+
className: cn("-nd:mx-1 nd:my-1 nd:h-px nd:bg-border", className),
|
|
1458
1459
|
...props
|
|
1459
1460
|
}
|
|
1460
1461
|
));
|
|
@@ -1517,11 +1518,11 @@ var CreateFolderDialog = (props) => {
|
|
|
1517
1518
|
/* @__PURE__ */ jsx(DialogDescription, { children: "Enter a name for the new folder" })
|
|
1518
1519
|
] }),
|
|
1519
1520
|
errors.name && /* @__PURE__ */ jsxs(Alert, { variant: "destructive", children: [
|
|
1520
|
-
/* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4" }),
|
|
1521
|
+
/* @__PURE__ */ jsx(AlertCircle, { className: "nd:h-4 nd:w-4" }),
|
|
1521
1522
|
/* @__PURE__ */ jsx(AlertTitle, { children: "Error" }),
|
|
1522
1523
|
/* @__PURE__ */ jsx(AlertDescription, { children: errors.name.message })
|
|
1523
1524
|
] }),
|
|
1524
|
-
/* @__PURE__ */ jsx("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-2", children: [
|
|
1525
|
+
/* @__PURE__ */ jsx("div", { className: "nd:grid nd:gap-4 nd:py-4", children: /* @__PURE__ */ jsxs("div", { className: "nd:grid nd:gap-2", children: [
|
|
1525
1526
|
/* @__PURE__ */ jsx(Label2, { htmlFor: "folder-name", children: "Folder name" }),
|
|
1526
1527
|
/* @__PURE__ */ jsx(
|
|
1527
1528
|
Input,
|
|
@@ -1632,11 +1633,11 @@ var RenameDialog = (props) => {
|
|
|
1632
1633
|
] })
|
|
1633
1634
|
] }),
|
|
1634
1635
|
errors.name && /* @__PURE__ */ jsxs(Alert, { variant: "destructive", children: [
|
|
1635
|
-
/* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4" }),
|
|
1636
|
+
/* @__PURE__ */ jsx(AlertCircle, { className: "nd:h-4 nd:w-4" }),
|
|
1636
1637
|
/* @__PURE__ */ jsx(AlertTitle, { children: "Error" }),
|
|
1637
1638
|
/* @__PURE__ */ jsx(AlertDescription, { children: errors.name.message })
|
|
1638
1639
|
] }),
|
|
1639
|
-
/* @__PURE__ */ jsx("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-2", children: [
|
|
1640
|
+
/* @__PURE__ */ jsx("div", { className: "nd:grid nd:gap-4 nd:py-4", children: /* @__PURE__ */ jsxs("div", { className: "nd:grid nd:gap-2", children: [
|
|
1640
1641
|
/* @__PURE__ */ jsx(Label2, { htmlFor: "rename-input", children: "Name" }),
|
|
1641
1642
|
/* @__PURE__ */ jsx(
|
|
1642
1643
|
Input,
|
|
@@ -1698,62 +1699,62 @@ var FileItem = (props) => {
|
|
|
1698
1699
|
"div",
|
|
1699
1700
|
{
|
|
1700
1701
|
className: cn(
|
|
1701
|
-
"group relative cursor-pointer transition-all select-none",
|
|
1702
|
-
"focus:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
1703
|
-
viewMode === "GRID" ? "flex flex-col rounded-lg sm:rounded-xl border bg-card dark:bg-card/50 hover:bg-accent/50 dark:hover:bg-accent/30 overflow-hidden" : "flex items-center gap-2 sm:gap-3 p-1.5 sm:p-2 rounded-lg border border-transparent hover:bg-accent/50 dark:hover:bg-accent/30 hover:border-border",
|
|
1704
|
-
isSelected && "ring-2 ring-primary border-primary/50 bg-primary/5 dark:bg-primary/10",
|
|
1705
|
-
isDragOver && "ring-2 ring-primary border-primary scale-[1.02] bg-primary/10 shadow-lg"
|
|
1702
|
+
"group nd:relative nd:cursor-pointer nd:transition-all nd:select-none",
|
|
1703
|
+
"nd:focus:outline-none nd:focus-visible:ring-2 nd:focus-visible:ring-primary",
|
|
1704
|
+
viewMode === "GRID" ? "nd:flex nd:flex-col nd:rounded-lg nd:sm:rounded-xl nd:border nd:bg-card nd:dark:bg-card/50 nd:hover:bg-accent/50 nd:dark:hover:bg-accent/30 nd:overflow-hidden" : "nd:flex nd:items-center nd:gap-2 nd:sm:gap-3 nd:p-1.5 nd:sm:p-2 nd:rounded-lg nd:border nd:border-transparent nd:hover:bg-accent/50 nd:dark:hover:bg-accent/30 nd:hover:border-border",
|
|
1705
|
+
isSelected && "nd:ring-2 nd:ring-primary nd:border-primary/50 nd:bg-primary/5 nd:dark:bg-primary/10",
|
|
1706
|
+
isDragOver && "nd:ring-2 nd:ring-primary nd:border-primary nd:scale-[1.02] nd:bg-primary/10 nd:shadow-lg"
|
|
1706
1707
|
),
|
|
1707
1708
|
onClick: onSelect,
|
|
1708
1709
|
onDoubleClick,
|
|
1709
1710
|
role: "button",
|
|
1710
1711
|
tabIndex: 0,
|
|
1711
1712
|
children: viewMode === "GRID" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1712
|
-
/* @__PURE__ */ jsxs("div", { className: "aspect-square w-full bg-muted/30 dark:bg-muted/20 flex items-center justify-center overflow-hidden relative", children: [
|
|
1713
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:aspect-square nd:w-full nd:bg-muted/30 nd:dark:bg-muted/20 nd:flex nd:items-center nd:justify-center nd:overflow-hidden nd:relative", children: [
|
|
1713
1714
|
isThumbnailable ? /* @__PURE__ */ jsx(
|
|
1714
1715
|
"img",
|
|
1715
1716
|
{
|
|
1716
1717
|
src: thumbnailUrl,
|
|
1717
1718
|
alt: item.name,
|
|
1718
|
-
className: "size-full object-cover transition-transform group-hover:scale-105 duration-300",
|
|
1719
|
+
className: "nd:size-full nd:object-cover nd:transition-transform group-nd:hover:scale-105 nd:duration-300",
|
|
1719
1720
|
loading: "lazy"
|
|
1720
1721
|
}
|
|
1721
|
-
) : /* @__PURE__ */ jsx("div", { className: "transition-transform group-hover:scale-110 duration-200", children: getFileIcon(item.information.type === "FILE" ? item.information.mime : "", isFolder, "size-8 sm:size-10 md:size-12 text-muted-foreground/60") }),
|
|
1722
|
-
isSelected && /* @__PURE__ */ jsx("div", { className: "absolute top-1.5 right-1.5 sm:top-2 sm:right-2 size-5 bg-primary rounded-full flex items-center justify-center shadow-md animate-in zoom-in-50", children: /* @__PURE__ */ jsx("div", { className: "size-2 bg-primary-foreground rounded-full" }) }),
|
|
1723
|
-
isFolder && currentView === "BROWSE" && /* @__PURE__ */ jsx("div", { className: "absolute bottom-1.5 right-1.5 sm:bottom-2 sm:right-2 lg:hidden size-5 sm:size-6 bg-primary/90 rounded-full flex items-center justify-center shadow-md", children: /* @__PURE__ */ jsx(ChevronRight, { className: "size-3 sm:size-3.5 text-primary-foreground" }) })
|
|
1722
|
+
) : /* @__PURE__ */ jsx("div", { className: "nd:transition-transform group-nd:hover:scale-110 nd:duration-200", children: getFileIcon(item.information.type === "FILE" ? item.information.mime : "", isFolder, "nd:size-8 nd:sm:size-10 nd:md:size-12 nd:text-muted-foreground/60") }),
|
|
1723
|
+
isSelected && /* @__PURE__ */ jsx("div", { className: "nd:absolute nd:top-1.5 nd:right-1.5 nd:sm:top-2 nd:sm:right-2 nd:size-5 nd:bg-primary nd:rounded-full nd:flex nd:items-center nd:justify-center nd:shadow-md nd:animate-in nd:zoom-in-50", children: /* @__PURE__ */ jsx("div", { className: "nd:size-2 nd:bg-primary-foreground nd:rounded-full" }) }),
|
|
1724
|
+
isFolder && currentView === "BROWSE" && /* @__PURE__ */ jsx("div", { className: "nd:absolute nd:bottom-1.5 nd:right-1.5 nd:sm:bottom-2 nd:sm:right-2 nd:lg:hidden nd:size-5 nd:sm:size-6 nd:bg-primary/90 nd:rounded-full nd:flex nd:items-center nd:justify-center nd:shadow-md", children: /* @__PURE__ */ jsx(ChevronRight, { className: "nd:size-3 nd:sm:size-3.5 nd:text-primary-foreground" }) })
|
|
1724
1725
|
] }),
|
|
1725
|
-
/* @__PURE__ */ jsxs("div", { className: "p-1.5 sm:p-2", children: [
|
|
1726
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium truncate leading-tight", title: item.name, children: item.name }),
|
|
1727
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-0.5", children: isFolder ? "Folder" : formatBytes(item.information.type === "FILE" ? item.information.sizeInBytes : 0) })
|
|
1726
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:p-1.5 nd:sm:p-2", children: [
|
|
1727
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-sm nd:font-medium nd:truncate nd:leading-tight", title: item.name, children: item.name }),
|
|
1728
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-xs nd:text-muted-foreground nd:mt-0.5", children: isFolder ? "Folder" : formatBytes(item.information.type === "FILE" ? item.information.sizeInBytes : 0) })
|
|
1728
1729
|
] })
|
|
1729
1730
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1730
|
-
/* @__PURE__ */ jsx("div", { className: "size-10 shrink-0 rounded-lg overflow-hidden bg-muted/50 dark:bg-muted/30 flex items-center justify-center", children: isThumbnailable ? /* @__PURE__ */ jsx("img", { src: thumbnailUrl, alt: item.name, className: "size-full object-cover", loading: "lazy" }) : getFileIcon(item.information.type === "FILE" ? item.information.mime : "", isFolder, "size-5 text-muted-foreground") }),
|
|
1731
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
1732
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium truncate", title: item.name, children: item.name }),
|
|
1733
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: isFolder ? "Folder" : formatBytes(item.information.type === "FILE" ? item.information.sizeInBytes : 0) })
|
|
1731
|
+
/* @__PURE__ */ jsx("div", { className: "nd:size-10 nd:shrink-0 nd:rounded-lg nd:overflow-hidden nd:bg-muted/50 nd:dark:bg-muted/30 nd:flex nd:items-center nd:justify-center", children: isThumbnailable ? /* @__PURE__ */ jsx("img", { src: thumbnailUrl, alt: item.name, className: "nd:size-full nd:object-cover", loading: "lazy" }) : getFileIcon(item.information.type === "FILE" ? item.information.mime : "", isFolder, "nd:size-5 nd:text-muted-foreground") }),
|
|
1732
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex-1 nd:min-w-0", children: [
|
|
1733
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-sm nd:font-medium nd:truncate", title: item.name, children: item.name }),
|
|
1734
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-xs nd:text-muted-foreground", children: isFolder ? "Folder" : formatBytes(item.information.type === "FILE" ? item.information.sizeInBytes : 0) })
|
|
1734
1735
|
] }),
|
|
1735
|
-
isFolder && currentView === "BROWSE" && /* @__PURE__ */ jsx(ChevronRight, { className: "size-4 text-muted-foreground lg:hidden shrink-0" })
|
|
1736
|
+
isFolder && currentView === "BROWSE" && /* @__PURE__ */ jsx(ChevronRight, { className: "nd:size-4 nd:text-muted-foreground nd:lg:hidden nd:shrink-0" })
|
|
1736
1737
|
] })
|
|
1737
1738
|
}
|
|
1738
1739
|
) }),
|
|
1739
1740
|
/* @__PURE__ */ jsx(ContextMenuContent, { children: currentView === "TRASH" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1740
1741
|
/* @__PURE__ */ jsxs(ContextMenuItem, { onClick: onRestore, children: [
|
|
1741
|
-
/* @__PURE__ */ jsx(RotateCcw, { className: "mr-2 size-4" }),
|
|
1742
|
+
/* @__PURE__ */ jsx(RotateCcw, { className: "nd:mr-2 nd:size-4" }),
|
|
1742
1743
|
" Restore"
|
|
1743
1744
|
] }),
|
|
1744
1745
|
/* @__PURE__ */ jsx(ContextMenuSeparator, {}),
|
|
1745
|
-
/* @__PURE__ */ jsxs(ContextMenuItem, { className: "text-destructive focus:text-destructive", onClick: onDelete, children: [
|
|
1746
|
-
/* @__PURE__ */ jsx(Trash2, { className: "mr-2 size-4" }),
|
|
1746
|
+
/* @__PURE__ */ jsxs(ContextMenuItem, { className: "nd:text-destructive nd:focus:text-destructive", onClick: onDelete, children: [
|
|
1747
|
+
/* @__PURE__ */ jsx(Trash2, { className: "nd:mr-2 nd:size-4" }),
|
|
1747
1748
|
" Delete Forever"
|
|
1748
1749
|
] })
|
|
1749
1750
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1750
1751
|
/* @__PURE__ */ jsxs(ContextMenuItem, { onClick: onRename, children: [
|
|
1751
|
-
/* @__PURE__ */ jsx(Pencil, { className: "mr-2 size-4" }),
|
|
1752
|
+
/* @__PURE__ */ jsx(Pencil, { className: "nd:mr-2 nd:size-4" }),
|
|
1752
1753
|
" Rename"
|
|
1753
1754
|
] }),
|
|
1754
1755
|
/* @__PURE__ */ jsx(ContextMenuSeparator, {}),
|
|
1755
|
-
/* @__PURE__ */ jsxs(ContextMenuItem, { className: "text-destructive focus:text-destructive", onClick: onDelete, children: [
|
|
1756
|
-
/* @__PURE__ */ jsx(Trash2, { className: "mr-2 size-4" }),
|
|
1756
|
+
/* @__PURE__ */ jsxs(ContextMenuItem, { className: "nd:text-destructive nd:focus:text-destructive", onClick: onDelete, children: [
|
|
1757
|
+
/* @__PURE__ */ jsx(Trash2, { className: "nd:mr-2 nd:size-4" }),
|
|
1757
1758
|
" Delete"
|
|
1758
1759
|
] })
|
|
1759
1760
|
] }) })
|
|
@@ -1876,49 +1877,49 @@ var DriveFileGrid = (props) => {
|
|
|
1876
1877
|
};
|
|
1877
1878
|
const enableDrag = currentView === "BROWSE";
|
|
1878
1879
|
if (isLoading && items.length === 0) {
|
|
1879
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("flex-1 flex flex-col", className), children: [
|
|
1880
|
-
/* @__PURE__ */ jsx("div", { className: "h-1 w-full shrink-0", children: /* @__PURE__ */ jsx(
|
|
1880
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("nd:flex-1 nd:flex nd:flex-col", className), children: [
|
|
1881
|
+
/* @__PURE__ */ jsx("div", { className: "nd:h-1 nd:w-full nd:shrink-0", children: /* @__PURE__ */ jsx(
|
|
1881
1882
|
Progress,
|
|
1882
1883
|
{
|
|
1883
1884
|
indeterminate: true,
|
|
1884
|
-
className: "h-full rounded-none bg-primary/10",
|
|
1885
|
-
indicatorClassName: "bg-primary"
|
|
1885
|
+
className: "nd:h-full nd:rounded-none nd:bg-primary/10",
|
|
1886
|
+
indicatorClassName: "nd:bg-primary"
|
|
1886
1887
|
}
|
|
1887
1888
|
) }),
|
|
1888
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ jsx(Loader2, { className: "size-8 animate-spin text-muted-foreground" }) })
|
|
1889
|
+
/* @__PURE__ */ jsx("div", { className: "nd:flex-1 nd:flex nd:items-center nd:justify-center", children: /* @__PURE__ */ jsx(Loader2, { className: "nd:size-8 nd:animate-spin nd:text-muted-foreground" }) })
|
|
1889
1890
|
] });
|
|
1890
1891
|
}
|
|
1891
1892
|
if (error) {
|
|
1892
|
-
return /* @__PURE__ */ jsx("div", { className: cn("flex-1 flex items-center justify-center p-8", className), children: /* @__PURE__ */ jsx("p", { className: "text-destructive font-medium text-center", children: error }) });
|
|
1893
|
+
return /* @__PURE__ */ jsx("div", { className: cn("nd:flex-1 nd:flex nd:items-center nd:justify-center nd:p-8", className), children: /* @__PURE__ */ jsx("p", { className: "nd:text-destructive nd:font-medium nd:text-center", children: error }) });
|
|
1893
1894
|
}
|
|
1894
1895
|
if (processedItems.length === 0) {
|
|
1895
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("flex-1 flex flex-col items-center justify-center p-8 text-center", className), children: [
|
|
1896
|
-
/* @__PURE__ */ jsx("div", { className: "size-16 rounded-2xl bg-muted/50 dark:bg-muted/30 flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx(Folder, { className: "size-8 text-muted-foreground/60" }) }),
|
|
1897
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-muted-foreground", children: currentView === "SEARCH" ? "No files match your search" : currentView === "TRASH" ? "Trash is empty" : "This folder is empty" })
|
|
1896
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("nd:flex-1 nd:flex nd:flex-col nd:items-center nd:justify-center nd:p-8 nd:text-center", className), children: [
|
|
1897
|
+
/* @__PURE__ */ jsx("div", { className: "nd:size-16 nd:rounded-2xl nd:bg-muted/50 nd:dark:bg-muted/30 nd:flex nd:items-center nd:justify-center nd:mb-4", children: /* @__PURE__ */ jsx(Folder, { className: "nd:size-8 nd:text-muted-foreground/60" }) }),
|
|
1898
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-sm nd:font-medium nd:text-muted-foreground", children: currentView === "SEARCH" ? "No files match your search" : currentView === "TRASH" ? "Trash is empty" : "This folder is empty" })
|
|
1898
1899
|
] });
|
|
1899
1900
|
}
|
|
1900
1901
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1901
|
-
isLoading && /* @__PURE__ */ jsx("div", { className: "h-1 w-full shrink-0", children: /* @__PURE__ */ jsx(
|
|
1902
|
+
isLoading && /* @__PURE__ */ jsx("div", { className: "nd:h-1 nd:w-full nd:shrink-0", children: /* @__PURE__ */ jsx(
|
|
1902
1903
|
Progress,
|
|
1903
1904
|
{
|
|
1904
1905
|
indeterminate: true,
|
|
1905
|
-
className: "h-full rounded-none bg-primary/10",
|
|
1906
|
-
indicatorClassName: "bg-primary"
|
|
1906
|
+
className: "nd:h-full nd:rounded-none nd:bg-primary/10",
|
|
1907
|
+
indicatorClassName: "nd:bg-primary"
|
|
1907
1908
|
}
|
|
1908
1909
|
) }),
|
|
1909
|
-
/* @__PURE__ */ jsxs("div", { className: cn("flex-1 overflow-y-auto min-h-0 p-2 sm:p-3 md:p-4", className), children: [
|
|
1910
|
-
/* @__PURE__ */ jsx("div", { className: "space-y-4 sm:space-y-6", children: Object.entries(groupedItems).map(([groupName, groupItems]) => /* @__PURE__ */ jsxs("div", { children: [
|
|
1911
|
-
groupBy !== "NONE" && /* @__PURE__ */ jsxs("h3", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-2 sm:mb-3 px-1", children: [
|
|
1910
|
+
/* @__PURE__ */ jsxs("div", { className: cn("nd:flex-1 nd:overflow-y-auto nd:min-h-0 nd:p-2 nd:sm:p-3 nd:md:p-4", className), children: [
|
|
1911
|
+
/* @__PURE__ */ jsx("div", { className: "nd:space-y-4 nd:sm:space-y-6", children: Object.entries(groupedItems).map(([groupName, groupItems]) => /* @__PURE__ */ jsxs("div", { children: [
|
|
1912
|
+
groupBy !== "NONE" && /* @__PURE__ */ jsxs("h3", { className: "nd:text-xs nd:font-semibold nd:text-muted-foreground nd:uppercase nd:tracking-wide nd:mb-2 nd:sm:mb-3 nd:px-1", children: [
|
|
1912
1913
|
groupName,
|
|
1913
1914
|
" ",
|
|
1914
|
-
/* @__PURE__ */ jsxs("span", { className: "opacity-50", children: [
|
|
1915
|
+
/* @__PURE__ */ jsxs("span", { className: "nd:opacity-50", children: [
|
|
1915
1916
|
"(",
|
|
1916
1917
|
groupItems.length,
|
|
1917
1918
|
")"
|
|
1918
1919
|
] })
|
|
1919
1920
|
] }),
|
|
1920
1921
|
/* @__PURE__ */ jsx(SortableContext, { items: groupItems.map((i) => i.id), strategy: rectSortingStrategy, disabled: !enableDrag, children: /* @__PURE__ */ jsx("div", { className: cn(
|
|
1921
|
-
viewMode === "GRID" ? "grid grid-cols-3 sm:grid-cols-4 md:grid-cols-5 lg:grid-cols-6 xl:grid-cols-7 gap-2 sm:gap-3" : "flex flex-col gap-1"
|
|
1922
|
+
viewMode === "GRID" ? "nd:grid nd:grid-cols-3 nd:sm:grid-cols-4 nd:md:grid-cols-5 nd:lg:grid-cols-6 nd:xl:grid-cols-7 nd:gap-2 nd:sm:gap-3" : "nd:flex nd:flex-col nd:gap-1"
|
|
1922
1923
|
), children: groupItems.map((item) => /* @__PURE__ */ jsx(
|
|
1923
1924
|
SortableItem,
|
|
1924
1925
|
{
|
|
@@ -1948,7 +1949,7 @@ var DriveFileGrid = (props) => {
|
|
|
1948
1949
|
item.id
|
|
1949
1950
|
)) }) })
|
|
1950
1951
|
] }, groupName)) }),
|
|
1951
|
-
hasMore && /* @__PURE__ */ jsx("div", { ref: observerTarget, className: "flex justify-center py-6", children: isLoadingMore && /* @__PURE__ */ jsx(Loader2, { className: "size-6 animate-spin text-muted-foreground" }) })
|
|
1952
|
+
hasMore && /* @__PURE__ */ jsx("div", { ref: observerTarget, className: "nd:flex nd:justify-center nd:py-6", children: isLoadingMore && /* @__PURE__ */ jsx(Loader2, { className: "nd:size-6 nd:animate-spin nd:text-muted-foreground" }) })
|
|
1952
1953
|
] }),
|
|
1953
1954
|
/* @__PURE__ */ jsx(
|
|
1954
1955
|
CreateFolderDialog,
|
|
@@ -2018,18 +2019,18 @@ var DriveHeader = ({ className }) => {
|
|
|
2018
2019
|
createFolder
|
|
2019
2020
|
} = useDrive();
|
|
2020
2021
|
const [dialogs, setDialogs] = useState({ delete: false, emptyTrash: false, newFolder: false });
|
|
2021
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-wrap items-center gap-2 bg-muted/30 dark:bg-muted/20 p-2", className), children: [
|
|
2022
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("nd:flex nd:flex-wrap nd:items-center nd:gap-2 nd:bg-muted/30 nd:dark:bg-muted/20 nd:p-2", className), children: [
|
|
2022
2023
|
currentView === "BROWSE" && /* @__PURE__ */ jsxs(
|
|
2023
2024
|
Button,
|
|
2024
2025
|
{
|
|
2025
2026
|
type: "button",
|
|
2026
2027
|
variant: "outline",
|
|
2027
2028
|
size: "sm",
|
|
2028
|
-
className: "gap-1.5",
|
|
2029
|
+
className: "nd:gap-1.5",
|
|
2029
2030
|
onClick: () => setDialogs((prev) => ({ ...prev, newFolder: true })),
|
|
2030
2031
|
children: [
|
|
2031
|
-
/* @__PURE__ */ jsx(FolderPlus, { className: "size-4" }),
|
|
2032
|
-
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: "New Folder" })
|
|
2032
|
+
/* @__PURE__ */ jsx(FolderPlus, { className: "nd:size-4" }),
|
|
2033
|
+
/* @__PURE__ */ jsx("span", { className: "nd:hidden nd:sm:inline", children: "New Folder" })
|
|
2033
2034
|
]
|
|
2034
2035
|
}
|
|
2035
2036
|
),
|
|
@@ -2040,8 +2041,8 @@ var DriveHeader = ({ className }) => {
|
|
|
2040
2041
|
type: "button",
|
|
2041
2042
|
variant: "outline",
|
|
2042
2043
|
size: "sm",
|
|
2043
|
-
className: "gap-1.5",
|
|
2044
|
-
children: /* @__PURE__ */ jsx(Menu, { className: "size-4" })
|
|
2044
|
+
className: "nd:gap-1.5",
|
|
2045
|
+
children: /* @__PURE__ */ jsx(Menu, { className: "nd:size-4" })
|
|
2045
2046
|
}
|
|
2046
2047
|
) }),
|
|
2047
2048
|
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "start", children: [
|
|
@@ -2055,7 +2056,7 @@ var DriveHeader = ({ className }) => {
|
|
|
2055
2056
|
setSelectedFileIds([]);
|
|
2056
2057
|
},
|
|
2057
2058
|
children: [
|
|
2058
|
-
/* @__PURE__ */ jsx(RotateCcw, { className: "size-3.5 mr-2" }),
|
|
2059
|
+
/* @__PURE__ */ jsx(RotateCcw, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2059
2060
|
"Restore (",
|
|
2060
2061
|
selectedFileIds.length,
|
|
2061
2062
|
")"
|
|
@@ -2066,9 +2067,9 @@ var DriveHeader = ({ className }) => {
|
|
|
2066
2067
|
DropdownMenuItem,
|
|
2067
2068
|
{
|
|
2068
2069
|
onClick: () => setDialogs((prev) => ({ ...prev, delete: true })),
|
|
2069
|
-
className: "text-destructive focus:text-destructive",
|
|
2070
|
+
className: "nd:text-destructive nd:focus:text-destructive",
|
|
2070
2071
|
children: [
|
|
2071
|
-
/* @__PURE__ */ jsx(Trash2, { className: "size-3.5 mr-2" }),
|
|
2072
|
+
/* @__PURE__ */ jsx(Trash2, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2072
2073
|
currentView === "TRASH" ? "Delete Forever" : "Delete",
|
|
2073
2074
|
" (",
|
|
2074
2075
|
selectedFileIds.length,
|
|
@@ -2080,9 +2081,9 @@ var DriveHeader = ({ className }) => {
|
|
|
2080
2081
|
DropdownMenuItem,
|
|
2081
2082
|
{
|
|
2082
2083
|
onClick: () => setDialogs((prev) => ({ ...prev, emptyTrash: true })),
|
|
2083
|
-
className: "text-destructive focus:text-destructive",
|
|
2084
|
+
className: "nd:text-destructive nd:focus:text-destructive",
|
|
2084
2085
|
children: [
|
|
2085
|
-
/* @__PURE__ */ jsx(Trash2, { className: "size-3.5 mr-2" }),
|
|
2086
|
+
/* @__PURE__ */ jsx(Trash2, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2086
2087
|
"Empty Trash"
|
|
2087
2088
|
]
|
|
2088
2089
|
}
|
|
@@ -2096,31 +2097,31 @@ var DriveHeader = ({ className }) => {
|
|
|
2096
2097
|
type: "button",
|
|
2097
2098
|
variant: groupBy !== "NONE" ? "secondary" : "ghost",
|
|
2098
2099
|
size: "sm",
|
|
2099
|
-
className: "gap-1.5",
|
|
2100
|
+
className: "nd:gap-1.5",
|
|
2100
2101
|
children: [
|
|
2101
|
-
/* @__PURE__ */ jsx(Group, { className: "size-3.5" }),
|
|
2102
|
-
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: groupBy === "NONE" ? "Group" : "Grouped" })
|
|
2102
|
+
/* @__PURE__ */ jsx(Group, { className: "nd:size-3.5" }),
|
|
2103
|
+
/* @__PURE__ */ jsx("span", { className: "nd:hidden nd:sm:inline", children: groupBy === "NONE" ? "Group" : "Grouped" })
|
|
2103
2104
|
]
|
|
2104
2105
|
}
|
|
2105
2106
|
) }),
|
|
2106
2107
|
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "start", children: [
|
|
2107
2108
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => setGroupBy("NONE"), children: [
|
|
2108
|
-
groupBy === "NONE" && /* @__PURE__ */ jsx(Check, { className: "size-3.5 mr-2" }),
|
|
2109
|
-
/* @__PURE__ */ jsx("span", { className: cn(groupBy !== "NONE" && "pl-5.5"), children: "No Grouping" })
|
|
2109
|
+
groupBy === "NONE" && /* @__PURE__ */ jsx(Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2110
|
+
/* @__PURE__ */ jsx("span", { className: cn(groupBy !== "NONE" && "nd:pl-5.5"), children: "No Grouping" })
|
|
2110
2111
|
] }),
|
|
2111
2112
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => setGroupBy("CREATED_AT"), children: [
|
|
2112
|
-
groupBy === "CREATED_AT" && /* @__PURE__ */ jsx(Check, { className: "size-3.5 mr-2" }),
|
|
2113
|
-
/* @__PURE__ */ jsx("span", { className: cn(groupBy !== "CREATED_AT" && "pl-5.5"), children: "Created Date" })
|
|
2113
|
+
groupBy === "CREATED_AT" && /* @__PURE__ */ jsx(Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2114
|
+
/* @__PURE__ */ jsx("span", { className: cn(groupBy !== "CREATED_AT" && "nd:pl-5.5"), children: "Created Date" })
|
|
2114
2115
|
] })
|
|
2115
2116
|
] })
|
|
2116
2117
|
] }),
|
|
2117
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0 sm:min-w-50 relative", children: [
|
|
2118
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex-1 nd:min-w-0 nd:sm:min-w-50 nd:relative", children: [
|
|
2118
2119
|
/* @__PURE__ */ jsx(
|
|
2119
2120
|
Input,
|
|
2120
2121
|
{
|
|
2121
2122
|
type: "text",
|
|
2122
2123
|
placeholder: "Search files...",
|
|
2123
|
-
className: "w-full pl-8 pr-7 h-9",
|
|
2124
|
+
className: "nd:w-full nd:pl-8 nd:pr-7 nd:h-9",
|
|
2124
2125
|
value: searchQuery,
|
|
2125
2126
|
onChange: (e) => {
|
|
2126
2127
|
const val = e.target.value;
|
|
@@ -2136,79 +2137,73 @@ var DriveHeader = ({ className }) => {
|
|
|
2136
2137
|
}
|
|
2137
2138
|
}
|
|
2138
2139
|
),
|
|
2139
|
-
/* @__PURE__ */ jsx("div", { className: "absolute left-2.5 top-1/2
|
|
2140
|
-
/* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "8" }),
|
|
2141
|
-
/* @__PURE__ */ jsx("path", { d: "m21 21-4.3-4.3" })
|
|
2142
|
-
] }) }),
|
|
2140
|
+
/* @__PURE__ */ jsx("div", { className: "nd:absolute nd:left-2.5 nd:top-1/2 nd:-translate-y-1/2 nd:text-muted-foreground nd:pointer-events-none", children: /* @__PURE__ */ jsx(Search, { className: "nd:size-3.5" }) }),
|
|
2143
2141
|
searchQuery && /* @__PURE__ */ jsx(
|
|
2144
2142
|
Button,
|
|
2145
2143
|
{
|
|
2146
2144
|
type: "button",
|
|
2147
2145
|
variant: "ghost",
|
|
2148
2146
|
size: "icon",
|
|
2149
|
-
className: "absolute right-0.5 top-1/2
|
|
2147
|
+
className: "nd:absolute nd:right-0.5 nd:top-1/2 nd:-translate-y-1/2 nd:h-7 nd:w-7 nd:text-muted-foreground",
|
|
2150
2148
|
onClick: () => {
|
|
2151
2149
|
setSearchQuery("");
|
|
2152
2150
|
setCurrentView(searchScope === "TRASH" ? "TRASH" : "BROWSE");
|
|
2153
2151
|
},
|
|
2154
|
-
children: /* @__PURE__ */
|
|
2155
|
-
/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }),
|
|
2156
|
-
/* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })
|
|
2157
|
-
] })
|
|
2152
|
+
children: /* @__PURE__ */ jsx(X, { className: "nd:size-3.5" })
|
|
2158
2153
|
}
|
|
2159
2154
|
)
|
|
2160
2155
|
] }),
|
|
2161
2156
|
/* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
2162
|
-
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "gap-1.5", children: [
|
|
2163
|
-
/* @__PURE__ */ jsx(ArrowUpDown, { className: "size-3.5" }),
|
|
2164
|
-
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline max-w-24 truncate", children: sortBy.field === "id" ? "Default" : sortBy.field === "order" ? "Custom" : sortBy.field === "createdAt" ? sortBy.order === -1 ? "Date: Newest" : "Date: Oldest" : sortBy.field === "name" ? sortBy.order === 1 ? "Name: A to Z" : "Name: Z to A" : sortBy.field === "size" ? sortBy.order === -1 ? "Size: Large" : "Size: Small" : "Sort" })
|
|
2157
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "nd:gap-1.5", children: [
|
|
2158
|
+
/* @__PURE__ */ jsx(ArrowUpDown, { className: "nd:size-3.5" }),
|
|
2159
|
+
/* @__PURE__ */ jsx("span", { className: "nd:hidden nd:sm:inline nd:max-w-24 nd:truncate", children: sortBy.field === "id" ? "Default" : sortBy.field === "order" ? "Custom" : sortBy.field === "createdAt" ? sortBy.order === -1 ? "Date: Newest" : "Date: Oldest" : sortBy.field === "name" ? sortBy.order === 1 ? "Name: A to Z" : "Name: Z to A" : sortBy.field === "size" ? sortBy.order === -1 ? "Size: Large" : "Size: Small" : "Sort" })
|
|
2165
2160
|
] }) }),
|
|
2166
2161
|
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", children: [
|
|
2167
2162
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => setSortBy({ field: "order", order: 1 }), children: [
|
|
2168
|
-
sortBy.field === "order" && /* @__PURE__ */ jsx(Check, { className: "size-3.5 mr-2" }),
|
|
2169
|
-
/* @__PURE__ */ jsx("span", { className: cn(sortBy.field !== "order" && "pl-5.5"), children: "Custom Order" })
|
|
2163
|
+
sortBy.field === "order" && /* @__PURE__ */ jsx(Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2164
|
+
/* @__PURE__ */ jsx("span", { className: cn(sortBy.field !== "order" && "nd:pl-5.5"), children: "Custom Order" })
|
|
2170
2165
|
] }),
|
|
2171
2166
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => setSortBy({ field: "id", order: 1 }), children: [
|
|
2172
|
-
sortBy.field === "id" && /* @__PURE__ */ jsx(Check, { className: "size-3.5 mr-2" }),
|
|
2173
|
-
/* @__PURE__ */ jsx("span", { className: cn(sortBy.field !== "id" && "pl-5.5"), children: "Default" })
|
|
2167
|
+
sortBy.field === "id" && /* @__PURE__ */ jsx(Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2168
|
+
/* @__PURE__ */ jsx("span", { className: cn(sortBy.field !== "id" && "nd:pl-5.5"), children: "Default" })
|
|
2174
2169
|
] }),
|
|
2175
2170
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
2176
2171
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => setSortBy({ field: "createdAt", order: -1 }), children: [
|
|
2177
|
-
sortBy.field === "createdAt" && sortBy.order === -1 && /* @__PURE__ */ jsx(Check, { className: "size-3.5 mr-2" }),
|
|
2178
|
-
/* @__PURE__ */ jsx(Calendar, { className: cn("size-3.5 mr-2", sortBy.field === "createdAt" && sortBy.order === -1 ? "" : "ml-5.5") }),
|
|
2172
|
+
sortBy.field === "createdAt" && sortBy.order === -1 && /* @__PURE__ */ jsx(Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2173
|
+
/* @__PURE__ */ jsx(Calendar, { className: cn("nd:size-3.5 nd:mr-2", sortBy.field === "createdAt" && sortBy.order === -1 ? "" : "nd:ml-5.5") }),
|
|
2179
2174
|
"Date: Newest"
|
|
2180
2175
|
] }),
|
|
2181
2176
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => setSortBy({ field: "createdAt", order: 1 }), children: [
|
|
2182
|
-
sortBy.field === "createdAt" && sortBy.order === 1 && /* @__PURE__ */ jsx(Check, { className: "size-3.5 mr-2" }),
|
|
2183
|
-
/* @__PURE__ */ jsx(Calendar, { className: cn("size-3.5 mr-2", sortBy.field === "createdAt" && sortBy.order === 1 ? "" : "ml-5.5") }),
|
|
2177
|
+
sortBy.field === "createdAt" && sortBy.order === 1 && /* @__PURE__ */ jsx(Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2178
|
+
/* @__PURE__ */ jsx(Calendar, { className: cn("nd:size-3.5 nd:mr-2", sortBy.field === "createdAt" && sortBy.order === 1 ? "" : "nd:ml-5.5") }),
|
|
2184
2179
|
"Date: Oldest"
|
|
2185
2180
|
] }),
|
|
2186
2181
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
2187
2182
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => setSortBy({ field: "name", order: 1 }), children: [
|
|
2188
|
-
sortBy.field === "name" && sortBy.order === 1 && /* @__PURE__ */ jsx(Check, { className: "size-3.5 mr-2" }),
|
|
2189
|
-
/* @__PURE__ */ jsx(ArrowDownAZ, { className: cn("size-3.5 mr-2", sortBy.field === "name" && sortBy.order === 1 ? "" : "ml-5.5") }),
|
|
2183
|
+
sortBy.field === "name" && sortBy.order === 1 && /* @__PURE__ */ jsx(Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2184
|
+
/* @__PURE__ */ jsx(ArrowDownAZ, { className: cn("nd:size-3.5 nd:mr-2", sortBy.field === "name" && sortBy.order === 1 ? "" : "nd:ml-5.5") }),
|
|
2190
2185
|
"Name: A to Z"
|
|
2191
2186
|
] }),
|
|
2192
2187
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => setSortBy({ field: "name", order: -1 }), children: [
|
|
2193
|
-
sortBy.field === "name" && sortBy.order === -1 && /* @__PURE__ */ jsx(Check, { className: "size-3.5 mr-2" }),
|
|
2194
|
-
/* @__PURE__ */ jsx(ArrowUpAZ, { className: cn("size-3.5 mr-2", sortBy.field === "name" && sortBy.order === -1 ? "" : "ml-5.5") }),
|
|
2188
|
+
sortBy.field === "name" && sortBy.order === -1 && /* @__PURE__ */ jsx(Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2189
|
+
/* @__PURE__ */ jsx(ArrowUpAZ, { className: cn("nd:size-3.5 nd:mr-2", sortBy.field === "name" && sortBy.order === -1 ? "" : "nd:ml-5.5") }),
|
|
2195
2190
|
"Name: Z to A"
|
|
2196
2191
|
] }),
|
|
2197
2192
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
2198
2193
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => setSortBy({ field: "size", order: -1 }), children: [
|
|
2199
|
-
sortBy.field === "size" && sortBy.order === -1 && /* @__PURE__ */ jsx(Check, { className: "size-3.5 mr-2" }),
|
|
2200
|
-
/* @__PURE__ */ jsx(ArrowDown01, { className: cn("size-3.5 mr-2", sortBy.field === "size" && sortBy.order === -1 ? "" : "ml-5.5") }),
|
|
2194
|
+
sortBy.field === "size" && sortBy.order === -1 && /* @__PURE__ */ jsx(Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2195
|
+
/* @__PURE__ */ jsx(ArrowDown01, { className: cn("nd:size-3.5 nd:mr-2", sortBy.field === "size" && sortBy.order === -1 ? "" : "nd:ml-5.5") }),
|
|
2201
2196
|
"Size: Large"
|
|
2202
2197
|
] }),
|
|
2203
2198
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => setSortBy({ field: "size", order: 1 }), children: [
|
|
2204
|
-
sortBy.field === "size" && sortBy.order === 1 && /* @__PURE__ */ jsx(Check, { className: "size-3.5 mr-2" }),
|
|
2205
|
-
/* @__PURE__ */ jsx(ArrowUp01, { className: cn("size-3.5 mr-2", sortBy.field === "size" && sortBy.order === 1 ? "" : "ml-5.5") }),
|
|
2199
|
+
sortBy.field === "size" && sortBy.order === 1 && /* @__PURE__ */ jsx(Check, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2200
|
+
/* @__PURE__ */ jsx(ArrowUp01, { className: cn("nd:size-3.5 nd:mr-2", sortBy.field === "size" && sortBy.order === 1 ? "" : "nd:ml-5.5") }),
|
|
2206
2201
|
"Size: Small"
|
|
2207
2202
|
] })
|
|
2208
2203
|
] })
|
|
2209
2204
|
] }),
|
|
2210
|
-
/* @__PURE__ */ jsx("div", { className: "w-px h-5 bg-border" }),
|
|
2211
|
-
/* @__PURE__ */ jsxs("div", { className: "flex bg-muted/50 dark:bg-muted/30 rounded-md p-0.5 gap-0.5", children: [
|
|
2205
|
+
/* @__PURE__ */ jsx("div", { className: "nd:w-px nd:h-5 nd:bg-border" }),
|
|
2206
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:bg-muted/50 nd:dark:bg-muted/30 nd:rounded-md nd:p-0.5 nd:gap-0.5", children: [
|
|
2212
2207
|
/* @__PURE__ */ jsx(
|
|
2213
2208
|
Button,
|
|
2214
2209
|
{
|
|
@@ -2216,13 +2211,13 @@ var DriveHeader = ({ className }) => {
|
|
|
2216
2211
|
variant: "ghost",
|
|
2217
2212
|
size: "icon",
|
|
2218
2213
|
className: cn(
|
|
2219
|
-
"h-8 w-8",
|
|
2220
|
-
viewMode === "GRID" && "bg-background shadow-sm hover:bg-background dark:bg-background/80"
|
|
2214
|
+
"nd:h-8 nd:w-8",
|
|
2215
|
+
viewMode === "GRID" && "nd:bg-background nd:shadow-sm nd:hover:bg-background nd:dark:bg-background/80"
|
|
2221
2216
|
),
|
|
2222
2217
|
onClick: () => setViewMode("GRID"),
|
|
2223
2218
|
"aria-label": "Grid View",
|
|
2224
2219
|
"aria-pressed": viewMode === "GRID",
|
|
2225
|
-
children: /* @__PURE__ */ jsx(LayoutGrid, { className: "size-4" })
|
|
2220
|
+
children: /* @__PURE__ */ jsx(LayoutGrid, { className: "nd:size-4" })
|
|
2226
2221
|
}
|
|
2227
2222
|
),
|
|
2228
2223
|
/* @__PURE__ */ jsx(
|
|
@@ -2232,13 +2227,13 @@ var DriveHeader = ({ className }) => {
|
|
|
2232
2227
|
variant: "ghost",
|
|
2233
2228
|
size: "icon",
|
|
2234
2229
|
className: cn(
|
|
2235
|
-
"h-8 w-8",
|
|
2236
|
-
viewMode === "LIST" && "bg-background shadow-sm hover:bg-background dark:bg-background/80"
|
|
2230
|
+
"nd:h-8 nd:w-8",
|
|
2231
|
+
viewMode === "LIST" && "nd:bg-background nd:shadow-sm nd:hover:bg-background nd:dark:bg-background/80"
|
|
2237
2232
|
),
|
|
2238
2233
|
onClick: () => setViewMode("LIST"),
|
|
2239
2234
|
"aria-label": "List View",
|
|
2240
2235
|
"aria-pressed": viewMode === "LIST",
|
|
2241
|
-
children: /* @__PURE__ */ jsx(List, { className: "size-4" })
|
|
2236
|
+
children: /* @__PURE__ */ jsx(List, { className: "nd:size-4" })
|
|
2242
2237
|
}
|
|
2243
2238
|
)
|
|
2244
2239
|
] }),
|
|
@@ -2287,12 +2282,12 @@ var DriveHeader = ({ className }) => {
|
|
|
2287
2282
|
var DriveContentProgress = () => {
|
|
2288
2283
|
const { isLoading } = useDrive();
|
|
2289
2284
|
if (!isLoading) return null;
|
|
2290
|
-
return /* @__PURE__ */ jsx("div", { className: "h-1 w-full shrink-0", children: /* @__PURE__ */ jsx(
|
|
2285
|
+
return /* @__PURE__ */ jsx("div", { className: "nd:h-1 nd:w-full nd:shrink-0", children: /* @__PURE__ */ jsx(
|
|
2291
2286
|
Progress,
|
|
2292
2287
|
{
|
|
2293
2288
|
indeterminate: true,
|
|
2294
|
-
className: "h-full rounded-none bg-primary/10",
|
|
2295
|
-
indicatorClassName: "bg-primary"
|
|
2289
|
+
className: "nd:h-full nd:rounded-none nd:bg-primary/10",
|
|
2290
|
+
indicatorClassName: "nd:bg-primary"
|
|
2296
2291
|
}
|
|
2297
2292
|
) });
|
|
2298
2293
|
};
|
|
@@ -2311,8 +2306,8 @@ var DroppablePathItem = (props) => {
|
|
|
2311
2306
|
{
|
|
2312
2307
|
ref: setNodeRef,
|
|
2313
2308
|
className: cn(
|
|
2314
|
-
"font-medium text-foreground px-1 text-xs sm:text-sm truncate max-w-30 sm:max-w-none",
|
|
2315
|
-
isOver && !isCurrentFolder && "bg-primary/20 rounded"
|
|
2309
|
+
"nd:font-medium nd:text-foreground nd:px-1 nd:text-xs nd:sm:text-sm nd:truncate nd:max-w-30 nd:sm:max-w-none",
|
|
2310
|
+
isOver && !isCurrentFolder && "nd:bg-primary/20 nd:rounded"
|
|
2316
2311
|
),
|
|
2317
2312
|
"aria-current": "page",
|
|
2318
2313
|
title: name,
|
|
@@ -2327,8 +2322,8 @@ var DroppablePathItem = (props) => {
|
|
|
2327
2322
|
variant: "ghost",
|
|
2328
2323
|
size: "sm",
|
|
2329
2324
|
className: cn(
|
|
2330
|
-
"h-6 font-normal text-xs sm:text-sm px-1.5 sm:px-2 truncate max-w-25 sm:max-w-37.5",
|
|
2331
|
-
isOver && !isCurrentFolder && "ring-2 ring-primary bg-primary/10 scale-105"
|
|
2325
|
+
"nd:h-6 nd:font-normal nd:text-xs nd:sm:text-sm nd:px-1.5 nd:sm:px-2 nd:truncate nd:max-w-25 nd:sm:max-w-37.5",
|
|
2326
|
+
isOver && !isCurrentFolder && "nd:ring-2 nd:ring-primary nd:bg-primary/10 nd:scale-105"
|
|
2332
2327
|
),
|
|
2333
2328
|
onClick,
|
|
2334
2329
|
type: "button",
|
|
@@ -2339,10 +2334,10 @@ var DroppablePathItem = (props) => {
|
|
|
2339
2334
|
};
|
|
2340
2335
|
var DrivePathBar = ({ className }) => {
|
|
2341
2336
|
const { path, navigateToFolder } = useDrive();
|
|
2342
|
-
return /* @__PURE__ */ jsx("ol", { className: cn("flex items-center gap-1 sm:gap-1.5 text-sm text-muted-foreground overflow-x-auto flex-nowrap min-w-0", className), "aria-label": "Breadcrumb", role: "navigation", children: path.map((item, index) => {
|
|
2337
|
+
return /* @__PURE__ */ jsx("ol", { className: cn("nd:flex nd:items-center nd:gap-1 nd:sm:gap-1.5 nd:text-sm nd:text-muted-foreground nd:overflow-x-auto nd:flex-nowrap nd:min-w-0", className), "aria-label": "Breadcrumb", role: "navigation", children: path.map((item, index) => {
|
|
2343
2338
|
const isLast = index === path.length - 1;
|
|
2344
|
-
return /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-1 sm:gap-1.5 shrink-0", children: [
|
|
2345
|
-
index > 0 && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/50 text-xs", "aria-hidden": "true", children: "/" }),
|
|
2339
|
+
return /* @__PURE__ */ jsxs("li", { className: "nd:flex nd:items-center nd:gap-1 nd:sm:gap-1.5 nd:shrink-0", children: [
|
|
2340
|
+
index > 0 && /* @__PURE__ */ jsx("span", { className: "nd:text-muted-foreground/50 nd:text-xs", "aria-hidden": "true", children: "/" }),
|
|
2346
2341
|
/* @__PURE__ */ jsx(
|
|
2347
2342
|
DroppablePathItem,
|
|
2348
2343
|
{
|
|
@@ -2359,15 +2354,15 @@ var UploadStatusIcon = (props) => {
|
|
|
2359
2354
|
const { status } = props;
|
|
2360
2355
|
switch (status) {
|
|
2361
2356
|
case "complete":
|
|
2362
|
-
return /* @__PURE__ */ jsx(CheckCircle2, { className: "size-4 text-emerald-500" });
|
|
2357
|
+
return /* @__PURE__ */ jsx(CheckCircle2, { className: "nd:size-4 nd:text-emerald-500" });
|
|
2363
2358
|
case "error":
|
|
2364
|
-
return /* @__PURE__ */ jsx(AlertCircle, { className: "size-4 text-destructive" });
|
|
2359
|
+
return /* @__PURE__ */ jsx(AlertCircle, { className: "nd:size-4 nd:text-destructive" });
|
|
2365
2360
|
case "cancelled":
|
|
2366
|
-
return /* @__PURE__ */ jsx(X, { className: "size-4 text-muted-foreground" });
|
|
2361
|
+
return /* @__PURE__ */ jsx(X, { className: "nd:size-4 nd:text-muted-foreground" });
|
|
2367
2362
|
case "uploading":
|
|
2368
|
-
return /* @__PURE__ */ jsx(Loader2, { className: "size-4 text-primary animate-spin" });
|
|
2363
|
+
return /* @__PURE__ */ jsx(Loader2, { className: "nd:size-4 nd:text-primary nd:animate-spin" });
|
|
2369
2364
|
default:
|
|
2370
|
-
return /* @__PURE__ */ jsx(Clock, { className: "size-4 text-muted-foreground" });
|
|
2365
|
+
return /* @__PURE__ */ jsx(Clock, { className: "nd:size-4 nd:text-muted-foreground" });
|
|
2371
2366
|
}
|
|
2372
2367
|
};
|
|
2373
2368
|
var LogViewerDialog = (props) => {
|
|
@@ -2387,9 +2382,9 @@ var LogViewerDialog = (props) => {
|
|
|
2387
2382
|
a.click();
|
|
2388
2383
|
URL.revokeObjectURL(url);
|
|
2389
2384
|
};
|
|
2390
|
-
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-lg p-0 gap-0 max-h-[85vh] flex flex-col", children: [
|
|
2391
|
-
/* @__PURE__ */ jsx(DialogHeader, { className: "px-4 py-3 border-b", children: /* @__PURE__ */ jsx(DialogTitle, { className: "text-base truncate", children: upload.name }) }),
|
|
2392
|
-
/* @__PURE__ */ jsxs("div", { className: "sticky top-0 z-10 bg-background px-4 py-2 border-b flex items-center gap-2", children: [
|
|
2385
|
+
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "nd:sm:max-w-lg nd:p-0 nd:gap-0 nd:max-h-[85vh] nd:flex nd:flex-col", children: [
|
|
2386
|
+
/* @__PURE__ */ jsx(DialogHeader, { className: "nd:px-4 nd:py-3 nd:border-b", children: /* @__PURE__ */ jsx(DialogTitle, { className: "nd:text-base nd:truncate", children: upload.name }) }),
|
|
2387
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:sticky nd:top-0 nd:z-10 nd:bg-background nd:px-4 nd:py-2 nd:border-b nd:flex nd:items-center nd:gap-2", children: [
|
|
2393
2388
|
/* @__PURE__ */ jsx(
|
|
2394
2389
|
Button,
|
|
2395
2390
|
{
|
|
@@ -2413,29 +2408,29 @@ var LogViewerDialog = (props) => {
|
|
|
2413
2408
|
}
|
|
2414
2409
|
)
|
|
2415
2410
|
] }),
|
|
2416
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto p-4 space-y-2", children: [
|
|
2417
|
-
logs.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground text-center py-8", children: "No logs available" }),
|
|
2411
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex-1 nd:overflow-y-auto nd:p-4 nd:space-y-2", children: [
|
|
2412
|
+
logs.length === 0 && /* @__PURE__ */ jsx("p", { className: "nd:text-sm nd:text-muted-foreground nd:text-center nd:py-8", children: "No logs available" }),
|
|
2418
2413
|
logs.map((log, index) => /* @__PURE__ */ jsxs(
|
|
2419
2414
|
"div",
|
|
2420
2415
|
{
|
|
2421
2416
|
className: cn(
|
|
2422
|
-
"flex items-start gap-2 p-2 rounded-md border text-sm",
|
|
2423
|
-
log.type === "error" && "bg-destructive/5 border-destructive/20",
|
|
2424
|
-
log.type === "warning" && "bg-yellow-500/5 border-yellow-500/20",
|
|
2425
|
-
log.type === "success" && "bg-emerald-500/5 border-emerald-500/20",
|
|
2426
|
-
log.type === "info" && "bg-muted/50 border-border"
|
|
2417
|
+
"nd:flex nd:items-start nd:gap-2 nd:p-2 nd:rounded-md nd:border nd:text-sm",
|
|
2418
|
+
log.type === "error" && "nd:bg-destructive/5 nd:border-destructive/20",
|
|
2419
|
+
log.type === "warning" && "nd:bg-yellow-500/5 nd:border-yellow-500/20",
|
|
2420
|
+
log.type === "success" && "nd:bg-emerald-500/5 nd:border-emerald-500/20",
|
|
2421
|
+
log.type === "info" && "nd:bg-muted/50 nd:border-border"
|
|
2427
2422
|
),
|
|
2428
2423
|
children: [
|
|
2429
2424
|
/* @__PURE__ */ jsx("div", { className: cn(
|
|
2430
|
-
"shrink-0 size-1.5 rounded-full mt-1.5",
|
|
2431
|
-
log.type === "error" && "bg-destructive",
|
|
2432
|
-
log.type === "warning" && "bg-yellow-500",
|
|
2433
|
-
log.type === "success" && "bg-emerald-500",
|
|
2434
|
-
log.type === "info" && "bg-muted-foreground"
|
|
2425
|
+
"nd:shrink-0 nd:size-1.5 nd:rounded-full nd:mt-1.5",
|
|
2426
|
+
log.type === "error" && "nd:bg-destructive",
|
|
2427
|
+
log.type === "warning" && "nd:bg-yellow-500",
|
|
2428
|
+
log.type === "success" && "nd:bg-emerald-500",
|
|
2429
|
+
log.type === "info" && "nd:bg-muted-foreground"
|
|
2435
2430
|
) }),
|
|
2436
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0 space-y-1", children: [
|
|
2437
|
-
/* @__PURE__ */ jsx("p", { className: "break-words whitespace-pre-wrap", children: log.message }),
|
|
2438
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: new Date(log.timestamp).toLocaleTimeString() })
|
|
2431
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex-1 nd:min-w-0 nd:space-y-1", children: [
|
|
2432
|
+
/* @__PURE__ */ jsx("p", { className: "nd:break-words nd:whitespace-pre-wrap", children: log.message }),
|
|
2433
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-xs nd:text-muted-foreground", children: new Date(log.timestamp).toLocaleTimeString() })
|
|
2439
2434
|
] })
|
|
2440
2435
|
]
|
|
2441
2436
|
},
|
|
@@ -2497,33 +2492,33 @@ var DriveUpload = (props) => {
|
|
|
2497
2492
|
}, [handleFiles]);
|
|
2498
2493
|
const hasUploadsInProgress = uploads.some((u) => ["uploading", "queued", "pending"].includes(u.status));
|
|
2499
2494
|
const activeUploads = uploads.filter((u) => ["uploading", "queued", "pending"].includes(u.status));
|
|
2500
|
-
const renderDialog = () => /* @__PURE__ */ jsx(Dialog, { open: showUploadsDialog, onOpenChange: setShowUploadsDialog, children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-md p-0 gap-0", showCloseButton: false, children: [
|
|
2501
|
-
/* @__PURE__ */ jsxs(DialogHeader, { className: "px-4 py-3 border-b flex-row items-center justify-between space-y-0", children: [
|
|
2502
|
-
/* @__PURE__ */ jsx(DialogTitle, { className: "text-base", children: "Upload Status" }),
|
|
2495
|
+
const renderDialog = () => /* @__PURE__ */ jsx(Dialog, { open: showUploadsDialog, onOpenChange: setShowUploadsDialog, children: /* @__PURE__ */ jsxs(DialogContent, { className: "nd:sm:max-w-md nd:p-0 nd:gap-0", showCloseButton: false, children: [
|
|
2496
|
+
/* @__PURE__ */ jsxs(DialogHeader, { className: "nd:px-4 nd:py-3 nd:border-b nd:flex-row nd:items-center nd:justify-between nd:space-y-0", children: [
|
|
2497
|
+
/* @__PURE__ */ jsx(DialogTitle, { className: "nd:text-base", children: "Upload Status" }),
|
|
2503
2498
|
hasUploadsInProgress && /* @__PURE__ */ jsx(
|
|
2504
2499
|
Button,
|
|
2505
2500
|
{
|
|
2506
2501
|
type: "button",
|
|
2507
2502
|
size: "sm",
|
|
2508
2503
|
variant: "ghost",
|
|
2509
|
-
className: "text-destructive hover:text-destructive",
|
|
2504
|
+
className: "nd:text-destructive nd:hover:text-destructive",
|
|
2510
2505
|
onClick: cancelAllUploads,
|
|
2511
2506
|
children: "Cancel All"
|
|
2512
2507
|
}
|
|
2513
2508
|
)
|
|
2514
2509
|
] }),
|
|
2515
|
-
/* @__PURE__ */ jsxs("div", { className: "divide-y max-h-80 overflow-y-auto", children: [
|
|
2516
|
-
uploads.length === 0 && /* @__PURE__ */ jsx("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "No uploads" }),
|
|
2510
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:divide-y nd:max-h-80 nd:overflow-y-auto", children: [
|
|
2511
|
+
uploads.length === 0 && /* @__PURE__ */ jsx("div", { className: "nd:p-4 nd:text-center nd:text-sm nd:text-muted-foreground", children: "No uploads" }),
|
|
2517
2512
|
uploads.map((upload) => {
|
|
2518
2513
|
const percent = upload.status === "complete" ? 100 : upload.status === "error" || !upload.totalChunks ? 0 : Math.round(upload.currentChunk / upload.totalChunks * 100);
|
|
2519
|
-
return /* @__PURE__ */ jsxs("div", { className: "px-4 py-2.5", children: [
|
|
2520
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 mb-1.5", children: [
|
|
2514
|
+
return /* @__PURE__ */ jsxs("div", { className: "nd:px-4 nd:py-2.5", children: [
|
|
2515
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:items-start nd:gap-2 nd:mb-1.5", children: [
|
|
2521
2516
|
/* @__PURE__ */ jsx(UploadStatusIcon, { status: upload.status }),
|
|
2522
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
2523
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium truncate", children: upload.name }),
|
|
2517
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex-1 nd:min-w-0", children: [
|
|
2518
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-sm nd:font-medium nd:truncate", children: upload.name }),
|
|
2524
2519
|
/* @__PURE__ */ jsxs("p", { className: cn(
|
|
2525
|
-
"text-xs break-words",
|
|
2526
|
-
upload.status === "error" ? "text-destructive" : "text-muted-foreground"
|
|
2520
|
+
"nd:text-xs nd:break-words",
|
|
2521
|
+
upload.status === "error" ? "nd:text-destructive" : "nd:text-muted-foreground"
|
|
2527
2522
|
), children: [
|
|
2528
2523
|
upload.status === "uploading" && "Uploading...",
|
|
2529
2524
|
upload.status === "queued" && "Waiting in queue",
|
|
@@ -2533,17 +2528,17 @@ var DriveUpload = (props) => {
|
|
|
2533
2528
|
upload.status === "cancelled" && "Upload cancelled"
|
|
2534
2529
|
] })
|
|
2535
2530
|
] }),
|
|
2536
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
2531
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:items-center nd:gap-1 nd:shrink-0", children: [
|
|
2537
2532
|
upload.logs && upload.logs.length > 0 && /* @__PURE__ */ jsx(
|
|
2538
2533
|
Button,
|
|
2539
2534
|
{
|
|
2540
2535
|
type: "button",
|
|
2541
2536
|
size: "icon",
|
|
2542
2537
|
variant: "ghost",
|
|
2543
|
-
className: "text-muted-foreground hover:text-foreground",
|
|
2538
|
+
className: "nd:text-muted-foreground nd:hover:text-foreground",
|
|
2544
2539
|
onClick: () => setLogViewerUpload(upload),
|
|
2545
2540
|
title: "View logs",
|
|
2546
|
-
children: /* @__PURE__ */ jsx(FileText, { className: "size-3.5" })
|
|
2541
|
+
children: /* @__PURE__ */ jsx(FileText, { className: "nd:size-3.5" })
|
|
2547
2542
|
}
|
|
2548
2543
|
),
|
|
2549
2544
|
["uploading", "queued", "pending"].includes(upload.status) && /* @__PURE__ */ jsx(
|
|
@@ -2552,17 +2547,17 @@ var DriveUpload = (props) => {
|
|
|
2552
2547
|
type: "button",
|
|
2553
2548
|
size: "icon",
|
|
2554
2549
|
variant: "ghost",
|
|
2555
|
-
className: "text-muted-foreground hover:text-destructive",
|
|
2550
|
+
className: "nd:text-muted-foreground nd:hover:text-destructive",
|
|
2556
2551
|
onClick: () => cancelUpload(upload.id),
|
|
2557
2552
|
title: "Cancel",
|
|
2558
|
-
children: /* @__PURE__ */ jsx(X, { className: "size-3.5" })
|
|
2553
|
+
children: /* @__PURE__ */ jsx(X, { className: "nd:size-3.5" })
|
|
2559
2554
|
}
|
|
2560
2555
|
)
|
|
2561
2556
|
] })
|
|
2562
2557
|
] }),
|
|
2563
|
-
upload.status === "uploading" && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 pl-6", children: [
|
|
2564
|
-
/* @__PURE__ */ jsx(Progress, { value: percent, className: "flex-1" }),
|
|
2565
|
-
/* @__PURE__ */ jsxs("span", { className: "text-xs tabular-nums text-muted-foreground w-8", children: [
|
|
2558
|
+
upload.status === "uploading" && /* @__PURE__ */ jsxs("div", { className: "nd:flex nd:items-center nd:gap-2 nd:pl-6", children: [
|
|
2559
|
+
/* @__PURE__ */ jsx(Progress, { value: percent, className: "nd:flex-1" }),
|
|
2560
|
+
/* @__PURE__ */ jsxs("span", { className: "nd:text-xs nd:tabular-nums nd:text-muted-foreground nd:w-8", children: [
|
|
2566
2561
|
percent,
|
|
2567
2562
|
"%"
|
|
2568
2563
|
] })
|
|
@@ -2581,7 +2576,7 @@ var DriveUpload = (props) => {
|
|
|
2581
2576
|
onOpenChange: (open) => !open && setLogViewerUpload(null)
|
|
2582
2577
|
}
|
|
2583
2578
|
),
|
|
2584
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2579
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:items-center nd:gap-2", children: [
|
|
2585
2580
|
/* @__PURE__ */ jsx(
|
|
2586
2581
|
"input",
|
|
2587
2582
|
{
|
|
@@ -2593,7 +2588,7 @@ var DriveUpload = (props) => {
|
|
|
2593
2588
|
handleFiles(e.target.files);
|
|
2594
2589
|
e.target.value = "";
|
|
2595
2590
|
},
|
|
2596
|
-
className: "hidden",
|
|
2591
|
+
className: "nd:hidden",
|
|
2597
2592
|
"aria-hidden": "true"
|
|
2598
2593
|
}
|
|
2599
2594
|
),
|
|
@@ -2606,7 +2601,7 @@ var DriveUpload = (props) => {
|
|
|
2606
2601
|
size: "sm",
|
|
2607
2602
|
disabled: isLoading,
|
|
2608
2603
|
title: "Refresh",
|
|
2609
|
-
children: /* @__PURE__ */ jsx(RefreshCw, { className: cn("
|
|
2604
|
+
children: /* @__PURE__ */ jsx(RefreshCw, { className: cn("nd:size-4 nd:shrink-0", isLoading && "nd:animate-spin") })
|
|
2610
2605
|
}
|
|
2611
2606
|
),
|
|
2612
2607
|
/* @__PURE__ */ jsxs(
|
|
@@ -2617,7 +2612,7 @@ var DriveUpload = (props) => {
|
|
|
2617
2612
|
size: "sm",
|
|
2618
2613
|
disabled: hasUploadsInProgress,
|
|
2619
2614
|
children: [
|
|
2620
|
-
/* @__PURE__ */ jsx(Upload, { className: "
|
|
2615
|
+
/* @__PURE__ */ jsx(Upload, { className: "nd:size-4 nd:shrink-0" }),
|
|
2621
2616
|
/* @__PURE__ */ jsx("span", { children: "Upload" })
|
|
2622
2617
|
]
|
|
2623
2618
|
}
|
|
@@ -2633,7 +2628,7 @@ var DriveUpload = (props) => {
|
|
|
2633
2628
|
setShowUploadsDialog(true);
|
|
2634
2629
|
},
|
|
2635
2630
|
children: [
|
|
2636
|
-
activeUploads.length > 0 ? /* @__PURE__ */ jsx(Loader2, { className: "
|
|
2631
|
+
activeUploads.length > 0 ? /* @__PURE__ */ jsx(Loader2, { className: "nd:size-4 nd:shrink-0 nd:animate-spin" }) : /* @__PURE__ */ jsx(CheckCircle2, { className: "nd:size-4 nd:shrink-0" }),
|
|
2637
2632
|
/* @__PURE__ */ jsx("span", { children: activeUploads.length > 0 ? `(${activeUploads.length})` : "Status" })
|
|
2638
2633
|
]
|
|
2639
2634
|
}
|
|
@@ -2642,13 +2637,13 @@ var DriveUpload = (props) => {
|
|
|
2642
2637
|
renderDialog()
|
|
2643
2638
|
] });
|
|
2644
2639
|
}
|
|
2645
|
-
return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
|
|
2640
|
+
return /* @__PURE__ */ jsxs("div", { className: "nd:w-full", children: [
|
|
2646
2641
|
/* @__PURE__ */ jsxs(
|
|
2647
2642
|
"div",
|
|
2648
2643
|
{
|
|
2649
2644
|
className: cn(
|
|
2650
|
-
"flex flex-col items-center justify-center p-8 border-2 border-dashed rounded-lg cursor-pointer transition-colors",
|
|
2651
|
-
isDragging ? "border-primary bg-primary/5" : "border-muted-foreground/25 hover:border-primary/50 hover:bg-muted/50"
|
|
2645
|
+
"nd:flex nd:flex-col nd:items-center nd:justify-center nd:p-8 nd:border-2 nd:border-dashed nd:rounded-lg nd:cursor-pointer nd:transition-colors",
|
|
2646
|
+
isDragging ? "nd:border-primary nd:bg-primary/5" : "nd:border-muted-foreground/25 nd:hover:border-primary/50 nd:hover:bg-muted/50"
|
|
2652
2647
|
),
|
|
2653
2648
|
onDragEnter: (e) => handleDrag(e, true),
|
|
2654
2649
|
onDragLeave: (e) => handleDrag(e, false),
|
|
@@ -2670,18 +2665,18 @@ var DriveUpload = (props) => {
|
|
|
2670
2665
|
handleFiles(e.target.files);
|
|
2671
2666
|
e.target.value = "";
|
|
2672
2667
|
},
|
|
2673
|
-
className: "hidden",
|
|
2668
|
+
className: "nd:hidden",
|
|
2674
2669
|
"aria-hidden": "true"
|
|
2675
2670
|
}
|
|
2676
2671
|
),
|
|
2677
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2 text-center", children: [
|
|
2678
|
-
/* @__PURE__ */ jsx("div", { className: "p-3 rounded-full bg-background border shadow-sm", children: /* @__PURE__ */ jsx(Upload, { className: "size-6 text-muted-foreground" }) }),
|
|
2679
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-foreground", children: isDragging ? "Drop files here" : "Click or drag files to upload" })
|
|
2672
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:flex-col nd:items-center nd:gap-2 nd:text-center", children: [
|
|
2673
|
+
/* @__PURE__ */ jsx("div", { className: "nd:p-3 nd:rounded-full nd:bg-background nd:border nd:shadow-sm", children: /* @__PURE__ */ jsx(Upload, { className: "nd:size-6 nd:text-muted-foreground" }) }),
|
|
2674
|
+
/* @__PURE__ */ jsx("div", { className: "nd:text-sm nd:font-medium nd:text-foreground", children: isDragging ? "Drop files here" : "Click or drag files to upload" })
|
|
2680
2675
|
] })
|
|
2681
2676
|
]
|
|
2682
2677
|
}
|
|
2683
2678
|
),
|
|
2684
|
-
hasUploadsInProgress && /* @__PURE__ */ jsx("div", { className: "mt-4 text-center", children: /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => {
|
|
2679
|
+
hasUploadsInProgress && /* @__PURE__ */ jsx("div", { className: "nd:mt-4 nd:text-center", children: /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => {
|
|
2685
2680
|
setManuallyOpened(true);
|
|
2686
2681
|
setShowUploadsDialog(true);
|
|
2687
2682
|
}, children: "View Upload Progress" }) }),
|
|
@@ -2706,15 +2701,15 @@ var DriveStorageIndicator = (props) => {
|
|
|
2706
2701
|
const { usedInBytes, totalInBytes, percentage } = quota;
|
|
2707
2702
|
const isNearFull = percentage >= 90;
|
|
2708
2703
|
const isFull = percentage >= 100;
|
|
2709
|
-
const stateColor = isFull ? "text-destructive" : isNearFull ? "text-yellow-600 dark:text-yellow-500" : "text-primary";
|
|
2704
|
+
const stateColor = isFull ? "nd:text-destructive" : isNearFull ? "nd:text-yellow-600 nd:dark:text-yellow-500" : "nd:text-primary";
|
|
2710
2705
|
if (compact) {
|
|
2711
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-3 text-xs font-medium text-muted-foreground", className), children: [
|
|
2712
|
-
/* @__PURE__ */ jsxs("span", { className: "shrink-0 flex items-center gap-1.5", children: [
|
|
2713
|
-
/* @__PURE__ */ jsx(Cloud, { className: "size-3.5" }),
|
|
2706
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("nd:flex nd:items-center nd:gap-3 nd:text-xs nd:font-medium nd:text-muted-foreground", className), children: [
|
|
2707
|
+
/* @__PURE__ */ jsxs("span", { className: "nd:shrink-0 nd:flex nd:items-center nd:gap-1.5", children: [
|
|
2708
|
+
/* @__PURE__ */ jsx(Cloud, { className: "nd:size-3.5" }),
|
|
2714
2709
|
"Storage"
|
|
2715
2710
|
] }),
|
|
2716
|
-
/* @__PURE__ */ jsx(Progress, { value: percentage, indicatorClassName: cn("bg-gradient-to-r from-blue-500 to-cyan-500", isNearFull && "from-yellow-500 to-orange-500", isFull && "bg-destructive"), className: "w-24 sm:w-32" }),
|
|
2717
|
-
/* @__PURE__ */ jsxs("span", { className: "shrink-0 whitespace-nowrap", children: [
|
|
2711
|
+
/* @__PURE__ */ jsx(Progress, { value: percentage, indicatorClassName: cn("nd:bg-gradient-to-r nd:from-blue-500 nd:to-cyan-500", isNearFull && "nd:from-yellow-500 nd:to-orange-500", isFull && "nd:bg-destructive"), className: "nd:w-24 nd:sm:w-32" }),
|
|
2712
|
+
/* @__PURE__ */ jsxs("span", { className: "nd:shrink-0 nd:whitespace-nowrap", children: [
|
|
2718
2713
|
formatBytes(usedInBytes),
|
|
2719
2714
|
" / ",
|
|
2720
2715
|
formatBytes(totalInBytes)
|
|
@@ -2722,12 +2717,12 @@ var DriveStorageIndicator = (props) => {
|
|
|
2722
2717
|
] });
|
|
2723
2718
|
}
|
|
2724
2719
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2725
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 mb-2", children: [
|
|
2726
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2727
|
-
/* @__PURE__ */ jsx(Cloud, { className: cn("size-4", stateColor) }),
|
|
2728
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "Storage" })
|
|
2720
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:items-center nd:justify-between nd:gap-2 nd:mb-2", children: [
|
|
2721
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:items-center nd:gap-2", children: [
|
|
2722
|
+
/* @__PURE__ */ jsx(Cloud, { className: cn("nd:size-4", stateColor) }),
|
|
2723
|
+
/* @__PURE__ */ jsx("span", { className: "nd:text-xs nd:font-medium nd:text-muted-foreground", children: "Storage" })
|
|
2729
2724
|
] }),
|
|
2730
|
-
/* @__PURE__ */ jsxs("span", { className: "text-xs font-semibold tabular-nums", children: [
|
|
2725
|
+
/* @__PURE__ */ jsxs("span", { className: "nd:text-xs nd:font-semibold nd:tabular-nums", children: [
|
|
2731
2726
|
percentage,
|
|
2732
2727
|
"%"
|
|
2733
2728
|
] })
|
|
@@ -2736,22 +2731,22 @@ var DriveStorageIndicator = (props) => {
|
|
|
2736
2731
|
Progress,
|
|
2737
2732
|
{
|
|
2738
2733
|
value: percentage,
|
|
2739
|
-
className: "h-1.5",
|
|
2734
|
+
className: "nd:h-1.5",
|
|
2740
2735
|
indicatorClassName: cn(
|
|
2741
|
-
"transition-all duration-500",
|
|
2742
|
-
isFull ? "bg-destructive" : isNearFull ? "bg-yellow-500" : "bg-gradient-to-r from-blue-500 to-purple-500"
|
|
2736
|
+
"nd:transition-all nd:duration-500",
|
|
2737
|
+
isFull ? "nd:bg-destructive" : isNearFull ? "nd:bg-yellow-500" : "nd:bg-gradient-to-r nd:from-blue-500 nd:to-purple-500"
|
|
2743
2738
|
)
|
|
2744
2739
|
}
|
|
2745
2740
|
),
|
|
2746
|
-
/* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center mt-1.5", children: [
|
|
2747
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground tabular-nums", children: formatBytes(usedInBytes) }),
|
|
2748
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground tabular-nums", children: formatBytes(totalInBytes) })
|
|
2741
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:justify-between nd:items-center nd:mt-1.5", children: [
|
|
2742
|
+
/* @__PURE__ */ jsx("span", { className: "nd:text-[10px] nd:text-muted-foreground nd:tabular-nums", children: formatBytes(usedInBytes) }),
|
|
2743
|
+
/* @__PURE__ */ jsx("span", { className: "nd:text-[10px] nd:text-muted-foreground nd:tabular-nums", children: formatBytes(totalInBytes) })
|
|
2749
2744
|
] }),
|
|
2750
2745
|
isNearFull && /* @__PURE__ */ jsxs("div", { className: cn(
|
|
2751
|
-
"flex items-center gap-1.5 text-[10px] font-medium px-2 py-1 rounded-md mt-2",
|
|
2752
|
-
isFull ? "bg-destructive/10 text-destructive" : "bg-yellow-500/10 text-yellow-600 dark:text-yellow-500"
|
|
2746
|
+
"nd:flex nd:items-center nd:gap-1.5 nd:text-[10px] nd:font-medium nd:px-2 nd:py-1 nd:rounded-md nd:mt-2",
|
|
2747
|
+
isFull ? "nd:bg-destructive/10 nd:text-destructive" : "nd:bg-yellow-500/10 nd:text-yellow-600 nd:dark:text-yellow-500"
|
|
2753
2748
|
), children: [
|
|
2754
|
-
/* @__PURE__ */ jsx(AlertCircle, { className: "size-3 shrink-0" }),
|
|
2749
|
+
/* @__PURE__ */ jsx(AlertCircle, { className: "nd:size-3 nd:shrink-0" }),
|
|
2755
2750
|
/* @__PURE__ */ jsx("span", { children: isFull ? "Storage full" : "Almost full" })
|
|
2756
2751
|
] })
|
|
2757
2752
|
] });
|
|
@@ -2860,40 +2855,40 @@ var ChooserSidebar = (props) => {
|
|
|
2860
2855
|
setOauthLoading(false);
|
|
2861
2856
|
setOauthAbort(null);
|
|
2862
2857
|
};
|
|
2863
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-full w-full bg-muted/5 dark:bg-muted/10", children: [
|
|
2864
|
-
/* @__PURE__ */ jsx("div", { className: "p-2 border-b border-border/50", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
2858
|
+
return /* @__PURE__ */ jsxs("div", { className: "nd:flex nd:flex-col nd:h-full nd:w-full nd:bg-muted/5 nd:dark:bg-muted/10", children: [
|
|
2859
|
+
/* @__PURE__ */ jsx("div", { className: "nd:p-2 nd:border-b nd:border-border/50", children: /* @__PURE__ */ jsxs("div", { className: "nd:flex nd:items-center nd:gap-1", children: [
|
|
2865
2860
|
isDropdownDisabled ? (
|
|
2866
2861
|
/* Static display when no accounts and no providers */
|
|
2867
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 flex items-center gap-2 px-2 h-11 min-w-0", children: [
|
|
2868
|
-
/* @__PURE__ */ jsx("div", { className: "size-7 rounded-md flex items-center justify-center shrink-0 bg-emerald-500/10 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-400", children: /* @__PURE__ */ jsx(HardDrive, { className: "size-3.5" }) }),
|
|
2869
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
|
|
2870
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium truncate", children: "Local Storage" }),
|
|
2871
|
-
/* @__PURE__ */ jsx("span", { className: "text-[11px] text-muted-foreground truncate", children: "On this device" })
|
|
2862
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex-1 nd:flex nd:items-center nd:gap-2 nd:px-2 nd:h-11 nd:min-w-0", children: [
|
|
2863
|
+
/* @__PURE__ */ jsx("div", { className: "nd:size-7 nd:rounded-md nd:flex nd:items-center nd:justify-center nd:shrink-0 nd:bg-emerald-500/10 nd:text-emerald-600 nd:dark:bg-emerald-500/20 nd:dark:text-emerald-400", children: /* @__PURE__ */ jsx(HardDrive, { className: "nd:size-3.5" }) }),
|
|
2864
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:flex-col nd:min-w-0", children: [
|
|
2865
|
+
/* @__PURE__ */ jsx("span", { className: "nd:text-sm nd:font-medium nd:truncate", children: "Local Storage" }),
|
|
2866
|
+
/* @__PURE__ */ jsx("span", { className: "nd:text-[11px] nd:text-muted-foreground nd:truncate", children: "On this device" })
|
|
2872
2867
|
] })
|
|
2873
2868
|
] })
|
|
2874
2869
|
) : /* @__PURE__ */ jsxs(DropdownMenu, { open: dropdownOpen, onOpenChange: setDropdownOpen, children: [
|
|
2875
|
-
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", className: "flex-1 min-w-0 justify-between px-2 h-11 hover:bg-muted/50 dark:hover:bg-muted/30", children: [
|
|
2876
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-left min-w-0 flex-1", children: [
|
|
2870
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", className: "nd:flex-1 nd:min-w-0 nd:justify-between nd:px-2 nd:h-11 nd:hover:bg-muted/50 nd:dark:hover:bg-muted/30", children: [
|
|
2871
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:items-center nd:gap-2 nd:text-left nd:min-w-0 nd:flex-1", children: [
|
|
2877
2872
|
/* @__PURE__ */ jsx("div", { className: cn(
|
|
2878
|
-
"size-7 rounded-md flex items-center justify-center shrink-0",
|
|
2879
|
-
activeAccountId ? "bg-blue-500/10 text-blue-600 dark:bg-blue-500/20 dark:text-blue-400" : "bg-emerald-500/10 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-400"
|
|
2880
|
-
), children: activeAccountId ? /* @__PURE__ */ jsx(Database, { className: "size-3.5" }) : /* @__PURE__ */ jsx(HardDrive, { className: "size-3.5" }) }),
|
|
2881
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
|
|
2882
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium truncate", children: currentAccountName }),
|
|
2883
|
-
/* @__PURE__ */ jsx("span", { className: "text-[11px] text-muted-foreground truncate", children: currentAccountEmail })
|
|
2873
|
+
"nd:size-7 nd:rounded-md nd:flex nd:items-center nd:justify-center nd:shrink-0",
|
|
2874
|
+
activeAccountId ? "nd:bg-blue-500/10 nd:text-blue-600 nd:dark:bg-blue-500/20 nd:dark:text-blue-400" : "nd:bg-emerald-500/10 nd:text-emerald-600 nd:dark:bg-emerald-500/20 nd:dark:text-emerald-400"
|
|
2875
|
+
), children: activeAccountId ? /* @__PURE__ */ jsx(Database, { className: "nd:size-3.5" }) : /* @__PURE__ */ jsx(HardDrive, { className: "nd:size-3.5" }) }),
|
|
2876
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:flex-col nd:min-w-0", children: [
|
|
2877
|
+
/* @__PURE__ */ jsx("span", { className: "nd:text-sm nd:font-medium nd:truncate", children: currentAccountName }),
|
|
2878
|
+
/* @__PURE__ */ jsx("span", { className: "nd:text-[11px] nd:text-muted-foreground nd:truncate", children: currentAccountEmail })
|
|
2884
2879
|
] })
|
|
2885
2880
|
] }),
|
|
2886
|
-
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "size-3.5 text-muted-foreground/60 shrink-0" })
|
|
2881
|
+
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "nd:size-3.5 nd:text-muted-foreground/60 nd:shrink-0" })
|
|
2887
2882
|
] }) }),
|
|
2888
|
-
/* @__PURE__ */ jsxs(DropdownMenuContent, { className: "w-56", align: "start", children: [
|
|
2889
|
-
/* @__PURE__ */ jsx(DropdownMenuLabel, { className: "text-[11px] font-medium text-muted-foreground uppercase tracking-wide", children: "Storage" }),
|
|
2883
|
+
/* @__PURE__ */ jsxs(DropdownMenuContent, { className: "nd:w-56", align: "start", children: [
|
|
2884
|
+
/* @__PURE__ */ jsx(DropdownMenuLabel, { className: "nd:text-[11px] nd:font-medium nd:text-muted-foreground nd:uppercase nd:tracking-wide", children: "Storage" }),
|
|
2890
2885
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => {
|
|
2891
2886
|
setActiveAccountId(null);
|
|
2892
2887
|
setCurrentView("BROWSE");
|
|
2893
2888
|
onNavigate?.();
|
|
2894
|
-
}, className: "gap-2 py-2", children: [
|
|
2895
|
-
/* @__PURE__ */ jsx("span", { className: "flex-1 text-sm", children: "Local Storage" }),
|
|
2896
|
-
activeAccountId === null && /* @__PURE__ */ jsx(Check, { className: "size-3.5 text-primary" })
|
|
2889
|
+
}, className: "nd:gap-2 nd:py-2", children: [
|
|
2890
|
+
/* @__PURE__ */ jsx("span", { className: "nd:flex-1 nd:text-sm", children: "Local Storage" }),
|
|
2891
|
+
activeAccountId === null && /* @__PURE__ */ jsx(Check, { className: "nd:size-3.5 nd:text-primary" })
|
|
2897
2892
|
] }),
|
|
2898
2893
|
accounts.length > 0 && /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
2899
2894
|
accounts.map((account) => /* @__PURE__ */ jsxs(
|
|
@@ -2904,13 +2899,13 @@ var ChooserSidebar = (props) => {
|
|
|
2904
2899
|
setCurrentView("BROWSE");
|
|
2905
2900
|
onNavigate?.();
|
|
2906
2901
|
},
|
|
2907
|
-
className: "gap-2 py-2",
|
|
2902
|
+
className: "nd:gap-2 nd:py-2",
|
|
2908
2903
|
children: [
|
|
2909
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
2910
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm truncate", children: account.name }),
|
|
2911
|
-
/* @__PURE__ */ jsx("p", { className: "text-[10px] text-muted-foreground truncate", children: account.email })
|
|
2904
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex-1 nd:min-w-0", children: [
|
|
2905
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-sm nd:truncate", children: account.name }),
|
|
2906
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-[10px] nd:text-muted-foreground nd:truncate", children: account.email })
|
|
2912
2907
|
] }),
|
|
2913
|
-
activeAccountId === account.id && /* @__PURE__ */ jsx(Check, { className: "size-3.5 text-primary" })
|
|
2908
|
+
activeAccountId === account.id && /* @__PURE__ */ jsx(Check, { className: "nd:size-3.5 nd:text-primary" })
|
|
2914
2909
|
]
|
|
2915
2910
|
},
|
|
2916
2911
|
account.id
|
|
@@ -2918,9 +2913,9 @@ var ChooserSidebar = (props) => {
|
|
|
2918
2913
|
hasAnyProvider && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2919
2914
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
2920
2915
|
/* @__PURE__ */ jsxs(DropdownMenuSub, { children: [
|
|
2921
|
-
/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { className: "gap-2", children: [
|
|
2922
|
-
/* @__PURE__ */ jsx(Plus, { className: "size-3.5" }),
|
|
2923
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm", children: "Add Account" })
|
|
2916
|
+
/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { className: "nd:gap-2", children: [
|
|
2917
|
+
/* @__PURE__ */ jsx(Plus, { className: "nd:size-3.5" }),
|
|
2918
|
+
/* @__PURE__ */ jsx("span", { className: "nd:text-sm", children: "Add Account" })
|
|
2924
2919
|
] }),
|
|
2925
2920
|
/* @__PURE__ */ jsx(DropdownMenuSubContent, { children: availableProviders.google && /* @__PURE__ */ jsx(DropdownMenuItem, { onClick: openOAuthPopup, children: "Google Drive" }) })
|
|
2926
2921
|
] })
|
|
@@ -2928,39 +2923,39 @@ var ChooserSidebar = (props) => {
|
|
|
2928
2923
|
] })
|
|
2929
2924
|
] }),
|
|
2930
2925
|
currentAccount && /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
2931
|
-
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", className: "size-9 shrink-0 hover:bg-muted/50 dark:hover:bg-muted/30", children: /* @__PURE__ */ jsx(Settings2, { className: "size-4 text-muted-foreground" }) }) }),
|
|
2932
|
-
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "w-40", children: [
|
|
2933
|
-
/* @__PURE__ */ jsx(DropdownMenuLabel, { className: "text-xs text-muted-foreground truncate", children: currentAccount.name }),
|
|
2926
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", className: "nd:size-9 nd:shrink-0 nd:hover:bg-muted/50 nd:dark:hover:bg-muted/30", children: /* @__PURE__ */ jsx(Settings2, { className: "nd:size-4 nd:text-muted-foreground" }) }) }),
|
|
2927
|
+
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "nd:w-40", children: [
|
|
2928
|
+
/* @__PURE__ */ jsx(DropdownMenuLabel, { className: "nd:text-xs nd:text-muted-foreground nd:truncate", children: currentAccount.name }),
|
|
2934
2929
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
2935
2930
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => {
|
|
2936
2931
|
setRenameDialog({ open: true, account: currentAccount });
|
|
2937
2932
|
}, children: [
|
|
2938
|
-
/* @__PURE__ */ jsx(Pencil, { className: "size-3.5 mr-2" }),
|
|
2933
|
+
/* @__PURE__ */ jsx(Pencil, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2939
2934
|
" Rename"
|
|
2940
2935
|
] }),
|
|
2941
2936
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: openOAuthPopup, children: [
|
|
2942
|
-
/* @__PURE__ */ jsx(RefreshCw, { className: "size-3.5 mr-2" }),
|
|
2937
|
+
/* @__PURE__ */ jsx(RefreshCw, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2943
2938
|
" Reconnect"
|
|
2944
2939
|
] }),
|
|
2945
|
-
/* @__PURE__ */ jsxs(DropdownMenuItem, { className: "text-destructive focus:text-destructive", onClick: () => setDeleteDialog({ open: true, account: currentAccount }), children: [
|
|
2946
|
-
/* @__PURE__ */ jsx(Trash, { className: "size-3.5 mr-2" }),
|
|
2940
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, { className: "nd:text-destructive nd:focus:text-destructive", onClick: () => setDeleteDialog({ open: true, account: currentAccount }), children: [
|
|
2941
|
+
/* @__PURE__ */ jsx(Trash, { className: "nd:size-3.5 nd:mr-2" }),
|
|
2947
2942
|
" Disconnect"
|
|
2948
2943
|
] })
|
|
2949
2944
|
] })
|
|
2950
2945
|
] })
|
|
2951
2946
|
] }) }),
|
|
2952
|
-
/* @__PURE__ */ jsxs("nav", { className: "flex-1 p-2 space-y-0.5", children: [
|
|
2947
|
+
/* @__PURE__ */ jsxs("nav", { className: "nd:flex-1 nd:p-2 nd:space-y-0.5", children: [
|
|
2953
2948
|
/* @__PURE__ */ jsxs(
|
|
2954
2949
|
Button,
|
|
2955
2950
|
{
|
|
2956
2951
|
variant: "ghost",
|
|
2957
|
-
className: cn("w-full justify-start gap-2.5 h-9 px-2.5 font-medium", currentView !== "TRASH" ? "bg-primary/10 text-primary hover:bg-primary/15" : "hover:bg-muted/50"),
|
|
2952
|
+
className: cn("nd:w-full nd:justify-start nd:gap-2.5 nd:h-9 nd:px-2.5 nd:font-medium", currentView !== "TRASH" ? "nd:bg-primary/10 nd:text-primary nd:hover:bg-primary/15" : "nd:hover:bg-muted/50"),
|
|
2958
2953
|
onClick: () => {
|
|
2959
2954
|
setCurrentView("BROWSE");
|
|
2960
2955
|
onNavigate?.();
|
|
2961
2956
|
},
|
|
2962
2957
|
children: [
|
|
2963
|
-
/* @__PURE__ */ jsx(FolderOpen, { className: "size-4" }),
|
|
2958
|
+
/* @__PURE__ */ jsx(FolderOpen, { className: "nd:size-4" }),
|
|
2964
2959
|
" My Files"
|
|
2965
2960
|
]
|
|
2966
2961
|
}
|
|
@@ -2969,19 +2964,19 @@ var ChooserSidebar = (props) => {
|
|
|
2969
2964
|
Button,
|
|
2970
2965
|
{
|
|
2971
2966
|
variant: "ghost",
|
|
2972
|
-
className: cn("w-full justify-start gap-2.5 h-9 px-2.5 font-medium", currentView === "TRASH" ? "bg-destructive/10 text-destructive hover:bg-destructive/15" : "hover:bg-muted/50"),
|
|
2967
|
+
className: cn("nd:w-full nd:justify-start nd:gap-2.5 nd:h-9 nd:px-2.5 nd:font-medium", currentView === "TRASH" ? "nd:bg-destructive/10 nd:text-destructive nd:hover:bg-destructive/15" : "nd:hover:bg-muted/50"),
|
|
2973
2968
|
onClick: () => {
|
|
2974
2969
|
setCurrentView("TRASH");
|
|
2975
2970
|
onNavigate?.();
|
|
2976
2971
|
},
|
|
2977
2972
|
children: [
|
|
2978
|
-
/* @__PURE__ */ jsx(Trash2, { className: "size-4" }),
|
|
2973
|
+
/* @__PURE__ */ jsx(Trash2, { className: "nd:size-4" }),
|
|
2979
2974
|
" Trash"
|
|
2980
2975
|
]
|
|
2981
2976
|
}
|
|
2982
2977
|
)
|
|
2983
2978
|
] }),
|
|
2984
|
-
/* @__PURE__ */ jsx("div", { className: "p-2.5 border-t border-border/50 bg-background/50 dark:bg-background/30", children: /* @__PURE__ */ jsx(DriveStorageIndicator, {}) }),
|
|
2979
|
+
/* @__PURE__ */ jsx("div", { className: "nd:p-2.5 nd:border-t nd:border-border/50 nd:bg-background/50 nd:dark:bg-background/30", children: /* @__PURE__ */ jsx(DriveStorageIndicator, {}) }),
|
|
2985
2980
|
/* @__PURE__ */ jsx(
|
|
2986
2981
|
RenameAccountDialog,
|
|
2987
2982
|
{
|
|
@@ -3001,11 +2996,11 @@ var ChooserSidebar = (props) => {
|
|
|
3001
2996
|
onConfirm: handleDelete
|
|
3002
2997
|
}
|
|
3003
2998
|
),
|
|
3004
|
-
/* @__PURE__ */ jsx(Dialog, { open: oauthLoading, onOpenChange: (open) => !open && cancelOAuth(), children: /* @__PURE__ */ jsx(DialogContent, { className: "sm:max-w-xs", showCloseButton: false, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4 py-4", children: [
|
|
3005
|
-
/* @__PURE__ */ jsx(Loader2, { className: "size-8 text-primary animate-spin" }),
|
|
3006
|
-
/* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
3007
|
-
/* @__PURE__ */ jsx(DialogTitle, { className: "text-base", children: "Connecting..." }),
|
|
3008
|
-
/* @__PURE__ */ jsx(DialogDescription, { className: "text-sm mt-1", children: "Preparing Google authentication" })
|
|
2999
|
+
/* @__PURE__ */ jsx(Dialog, { open: oauthLoading, onOpenChange: (open) => !open && cancelOAuth(), children: /* @__PURE__ */ jsx(DialogContent, { className: "nd:sm:max-w-xs", showCloseButton: false, children: /* @__PURE__ */ jsxs("div", { className: "nd:flex nd:flex-col nd:items-center nd:gap-4 nd:py-4", children: [
|
|
3000
|
+
/* @__PURE__ */ jsx(Loader2, { className: "nd:size-8 nd:text-primary nd:animate-spin" }),
|
|
3001
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:text-center", children: [
|
|
3002
|
+
/* @__PURE__ */ jsx(DialogTitle, { className: "nd:text-base", children: "Connecting..." }),
|
|
3003
|
+
/* @__PURE__ */ jsx(DialogDescription, { className: "nd:text-sm nd:mt-1", children: "Preparing Google authentication" })
|
|
3009
3004
|
] }),
|
|
3010
3005
|
/* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: cancelOAuth, children: "Cancel" })
|
|
3011
3006
|
] }) }) })
|
|
@@ -3014,10 +3009,10 @@ var ChooserSidebar = (props) => {
|
|
|
3014
3009
|
var MobileSidebarSheet = () => {
|
|
3015
3010
|
const [sheetOpen, setSheetOpen] = useState(false);
|
|
3016
3011
|
return /* @__PURE__ */ jsxs(Sheet, { open: sheetOpen, onOpenChange: setSheetOpen, children: [
|
|
3017
|
-
/* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", className: "size-9 md:hidden shrink-0", children: /* @__PURE__ */ jsx(Menu, { className: "size-5" }) }) }),
|
|
3018
|
-
/* @__PURE__ */ jsxs(SheetContent, { side: "left", className: "w-72 p-0", hideCloseButton: true, children: [
|
|
3019
|
-
/* @__PURE__ */ jsx(SheetTitle, { className: "sr-only", children: "Navigation" }),
|
|
3020
|
-
/* @__PURE__ */ jsx(SheetDescription, { className: "sr-only", children: "Storage and navigation" }),
|
|
3012
|
+
/* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", className: "nd:size-9 nd:md:hidden nd:shrink-0", children: /* @__PURE__ */ jsx(Menu, { className: "nd:size-5" }) }) }),
|
|
3013
|
+
/* @__PURE__ */ jsxs(SheetContent, { side: "left", className: "nd:w-72 nd:p-0", hideCloseButton: true, children: [
|
|
3014
|
+
/* @__PURE__ */ jsx(SheetTitle, { className: "nd:sr-only", children: "Navigation" }),
|
|
3015
|
+
/* @__PURE__ */ jsx(SheetDescription, { className: "nd:sr-only", children: "Storage and navigation" }),
|
|
3021
3016
|
/* @__PURE__ */ jsx(ChooserSidebar, { onNavigate: () => setSheetOpen(false) })
|
|
3022
3017
|
] })
|
|
3023
3018
|
] });
|
|
@@ -3063,7 +3058,7 @@ var DriveFileChooser = (props) => {
|
|
|
3063
3058
|
}, [multiple, value, onChange]);
|
|
3064
3059
|
const hasSelection = value && (Array.isArray(value) ? value.length > 0 : true);
|
|
3065
3060
|
const displayFiles = useMemo(() => !value ? [] : Array.isArray(value) ? value : [value], [value]);
|
|
3066
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("w-full", className), children: [
|
|
3061
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("nd:w-full", className), children: [
|
|
3067
3062
|
!hasSelection ? /* @__PURE__ */ jsxs(
|
|
3068
3063
|
Button,
|
|
3069
3064
|
{
|
|
@@ -3072,74 +3067,74 @@ var DriveFileChooser = (props) => {
|
|
|
3072
3067
|
onClick: () => setIsOpen(true),
|
|
3073
3068
|
disabled,
|
|
3074
3069
|
className: cn(
|
|
3075
|
-
"w-full h-auto justify-start gap-3 px-3 py-2.5 border-dashed",
|
|
3076
|
-
error && "border-destructive"
|
|
3070
|
+
"nd:w-full nd:h-auto nd:justify-start nd:gap-3 nd:px-3 nd:py-2.5 nd:border-dashed",
|
|
3071
|
+
error && "nd:border-destructive"
|
|
3077
3072
|
),
|
|
3078
3073
|
children: [
|
|
3079
3074
|
/* @__PURE__ */ jsx("div", { className: cn(
|
|
3080
|
-
"size-9 rounded-lg flex items-center justify-center shrink-0",
|
|
3081
|
-
error ? "bg-destructive/10 text-destructive" : "bg-muted/50 text-muted-foreground"
|
|
3082
|
-
), children: /* @__PURE__ */ jsx(Upload, { className: "size-4" }) }),
|
|
3083
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0 text-left", children: [
|
|
3084
|
-
/* @__PURE__ */ jsx("p", { className: cn("text-sm font-medium", error && "text-destructive"), children: multiple ? "Select files" : "Select a file" }),
|
|
3085
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground font-normal truncate", children: placeholder })
|
|
3075
|
+
"nd:size-9 nd:rounded-lg nd:flex nd:items-center nd:justify-center nd:shrink-0",
|
|
3076
|
+
error ? "nd:bg-destructive/10 nd:text-destructive" : "nd:bg-muted/50 nd:text-muted-foreground"
|
|
3077
|
+
), children: /* @__PURE__ */ jsx(Upload, { className: "nd:size-4" }) }),
|
|
3078
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex-1 nd:min-w-0 nd:text-left", children: [
|
|
3079
|
+
/* @__PURE__ */ jsx("p", { className: cn("nd:text-sm nd:font-medium", error && "nd:text-destructive"), children: multiple ? "Select files" : "Select a file" }),
|
|
3080
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-xs nd:text-muted-foreground nd:font-normal nd:truncate", children: placeholder })
|
|
3086
3081
|
] })
|
|
3087
3082
|
]
|
|
3088
3083
|
}
|
|
3089
3084
|
) : (
|
|
3090
3085
|
/* Selected Files Display */
|
|
3091
|
-
/* @__PURE__ */ jsxs("div", { className: cn("rounded-lg border", error ? "border-destructive" : "border-border", disabled && "opacity-50"), children: [
|
|
3092
|
-
!multiple && displayFiles[0] && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 p-2.5", children: [
|
|
3093
|
-
/* @__PURE__ */ jsx("div", { className: "size-12 rounded-lg overflow-hidden bg-muted/30 flex items-center justify-center shrink-0", children: displayFiles[0].file.mime.startsWith("image/") ? /* @__PURE__ */ jsx("img", { src: createUrl(displayFiles[0], { quality: "low", format: "webp" }), alt: displayFiles[0].file.name, className: "size-full object-cover" }) : getFileIcon(displayFiles[0].file.mime, false, "size-6 text-muted-foreground") }),
|
|
3094
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
3095
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium truncate", children: displayFiles[0].file.name }),
|
|
3096
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: displayFiles[0].file.mime || "File" })
|
|
3086
|
+
/* @__PURE__ */ jsxs("div", { className: cn("nd:rounded-lg nd:border", error ? "nd:border-destructive" : "nd:border-border", disabled && "nd:opacity-50"), children: [
|
|
3087
|
+
!multiple && displayFiles[0] && /* @__PURE__ */ jsxs("div", { className: "nd:flex nd:items-center nd:gap-3 nd:p-2.5", children: [
|
|
3088
|
+
/* @__PURE__ */ jsx("div", { className: "nd:size-12 nd:rounded-lg nd:overflow-hidden nd:bg-muted/30 nd:flex nd:items-center nd:justify-center nd:shrink-0", children: displayFiles[0].file.mime.startsWith("image/") ? /* @__PURE__ */ jsx("img", { src: createUrl(displayFiles[0], { quality: "low", format: "webp" }), alt: displayFiles[0].file.name, className: "nd:size-full nd:object-cover" }) : getFileIcon(displayFiles[0].file.mime, false, "nd:size-6 nd:text-muted-foreground") }),
|
|
3089
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex-1 nd:min-w-0", children: [
|
|
3090
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-sm nd:font-medium nd:truncate", children: displayFiles[0].file.name }),
|
|
3091
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-xs nd:text-muted-foreground", children: displayFiles[0].file.mime || "File" })
|
|
3097
3092
|
] }),
|
|
3098
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
3093
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:items-center nd:gap-1 nd:shrink-0", children: [
|
|
3099
3094
|
/* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => setIsOpen(true), disabled, children: "Change" }),
|
|
3100
|
-
!disabled && /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "size-8", onClick: () => handleRemove(displayFiles[0].id), children: /* @__PURE__ */ jsx(X, { className: "size-4" }) })
|
|
3095
|
+
!disabled && /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "nd:size-8", onClick: () => handleRemove(displayFiles[0].id), children: /* @__PURE__ */ jsx(X, { className: "nd:size-4" }) })
|
|
3101
3096
|
] })
|
|
3102
3097
|
] }),
|
|
3103
3098
|
multiple && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3104
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-3 py-2 border-b bg-muted/20", children: [
|
|
3105
|
-
/* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground font-medium", children: [
|
|
3099
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:items-center nd:justify-between nd:px-3 nd:py-2 nd:border-b nd:bg-muted/20", children: [
|
|
3100
|
+
/* @__PURE__ */ jsxs("span", { className: "nd:text-xs nd:text-muted-foreground nd:font-medium", children: [
|
|
3106
3101
|
displayFiles.length,
|
|
3107
3102
|
" file",
|
|
3108
3103
|
displayFiles.length !== 1 ? "s" : "",
|
|
3109
3104
|
" selected"
|
|
3110
3105
|
] }),
|
|
3111
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
3112
|
-
/* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "sm", className: "h-7 text-xs", onClick: () => setIsOpen(true), disabled, children: "Add more" }),
|
|
3113
|
-
!disabled && /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "sm", className: "h-7 text-xs text-muted-foreground", onClick: () => onChange([]), children: "Clear" })
|
|
3106
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:items-center nd:gap-1", children: [
|
|
3107
|
+
/* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "sm", className: "nd:h-7 nd:text-xs", onClick: () => setIsOpen(true), disabled, children: "Add more" }),
|
|
3108
|
+
!disabled && /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "sm", className: "nd:h-7 nd:text-xs nd:text-muted-foreground", onClick: () => onChange([]), children: "Clear" })
|
|
3114
3109
|
] })
|
|
3115
3110
|
] }),
|
|
3116
|
-
/* @__PURE__ */ jsx("div", { className: "max-h-40 overflow-y-auto divide-y divide-border/50", children: displayFiles.map((file) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 px-3 py-2 hover:bg-muted/20", children: [
|
|
3117
|
-
/* @__PURE__ */ jsx("div", { className: "size-8 rounded overflow-hidden bg-muted/30 flex items-center justify-center shrink-0", children: file.file.mime.startsWith("image/") ? /* @__PURE__ */ jsx("img", { src: createUrl(file, { quality: "ultralow", format: "webp" }), alt: file.file.name, className: "size-full object-cover" }) : getFileIcon(file.file.mime, false, "size-4 text-muted-foreground") }),
|
|
3118
|
-
/* @__PURE__ */ jsx("span", { className: "flex-1 text-sm truncate", children: file.file.name }),
|
|
3119
|
-
!disabled && /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "size-7 shrink-0", onClick: () => handleRemove(file.id), children: /* @__PURE__ */ jsx(X, { className: "size-3.5" }) })
|
|
3111
|
+
/* @__PURE__ */ jsx("div", { className: "nd:max-h-40 nd:overflow-y-auto nd:divide-y nd:divide-border/50", children: displayFiles.map((file) => /* @__PURE__ */ jsxs("div", { className: "nd:flex nd:items-center nd:gap-2.5 nd:px-3 nd:py-2 nd:hover:bg-muted/20", children: [
|
|
3112
|
+
/* @__PURE__ */ jsx("div", { className: "nd:size-8 nd:rounded nd:overflow-hidden nd:bg-muted/30 nd:flex nd:items-center nd:justify-center nd:shrink-0", children: file.file.mime.startsWith("image/") ? /* @__PURE__ */ jsx("img", { src: createUrl(file, { quality: "ultralow", format: "webp" }), alt: file.file.name, className: "nd:size-full nd:object-cover" }) : getFileIcon(file.file.mime, false, "nd:size-4 nd:text-muted-foreground") }),
|
|
3113
|
+
/* @__PURE__ */ jsx("span", { className: "nd:flex-1 nd:text-sm nd:truncate", children: file.file.name }),
|
|
3114
|
+
!disabled && /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "nd:size-7 nd:shrink-0", onClick: () => handleRemove(file.id), children: /* @__PURE__ */ jsx(X, { className: "nd:size-3.5" }) })
|
|
3120
3115
|
] }, file.id)) })
|
|
3121
3116
|
] })
|
|
3122
3117
|
] })
|
|
3123
3118
|
),
|
|
3124
|
-
error && helperText && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive mt-1.5", children: helperText }),
|
|
3125
|
-
/* @__PURE__ */ jsx(Dialog2, { open: isOpen, onOpenChange: setIsOpen, children: /* @__PURE__ */ jsxs(Dialog2Content, { showCloseButton: false, children: [
|
|
3126
|
-
/* @__PURE__ */ jsxs(Dialog2Header, { className: "gap-2", children: [
|
|
3119
|
+
error && helperText && /* @__PURE__ */ jsx("p", { className: "nd:text-xs nd:text-destructive nd:mt-1.5", children: helperText }),
|
|
3120
|
+
/* @__PURE__ */ jsx(Dialog2, { open: isOpen, onOpenChange: setIsOpen, children: /* @__PURE__ */ jsxs(Dialog2Content, { showCloseButton: false, className: "nd-drive-root", children: [
|
|
3121
|
+
/* @__PURE__ */ jsxs(Dialog2Header, { className: "nd:gap-2", children: [
|
|
3127
3122
|
/* @__PURE__ */ jsx(MobileSidebarSheet, {}),
|
|
3128
|
-
/* @__PURE__ */ jsxs(Dialog2Title, { className: "flex-1", children: [
|
|
3123
|
+
/* @__PURE__ */ jsxs(Dialog2Title, { className: "nd:flex-1", children: [
|
|
3129
3124
|
"Select ",
|
|
3130
3125
|
multiple ? "Files" : "File"
|
|
3131
3126
|
] }),
|
|
3132
|
-
/* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "size-8", onClick: () => setIsOpen(false), children: /* @__PURE__ */ jsx(X, { className: "size-4" }) })
|
|
3127
|
+
/* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "nd:size-8", onClick: () => setIsOpen(false), children: /* @__PURE__ */ jsx(X, { className: "nd:size-4" }) })
|
|
3133
3128
|
] }),
|
|
3134
|
-
/* @__PURE__ */ jsxs(Dialog2Body, { className: "flex flex-col md:flex-row", children: [
|
|
3135
|
-
/* @__PURE__ */ jsx("div", { className: "hidden md:flex w-52 lg:w-56 border-r shrink-0", children: /* @__PURE__ */ jsx(ChooserSidebar, {}) }),
|
|
3136
|
-
/* @__PURE__ */ jsx(DriveDndProvider, { children: /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col min-w-0 min-h-0", children: [
|
|
3137
|
-
/* @__PURE__ */ jsx(DriveHeader, { className: "border-b" }),
|
|
3138
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-2 border-b bg-muted/20 dark:bg-muted/10", children: [
|
|
3139
|
-
/* @__PURE__ */ jsx(DrivePathBar, { className: "flex-1" }),
|
|
3129
|
+
/* @__PURE__ */ jsxs(Dialog2Body, { className: "nd:flex nd:flex-col nd:md:flex-row", children: [
|
|
3130
|
+
/* @__PURE__ */ jsx("div", { className: "nd:hidden nd:md:flex nd:w-52 nd:lg:w-56 nd:border-r nd:shrink-0", children: /* @__PURE__ */ jsx(ChooserSidebar, {}) }),
|
|
3131
|
+
/* @__PURE__ */ jsx(DriveDndProvider, { children: /* @__PURE__ */ jsxs("div", { className: "nd:flex-1 nd:flex nd:flex-col nd:min-w-0 nd:min-h-0", children: [
|
|
3132
|
+
/* @__PURE__ */ jsx(DriveHeader, { className: "nd:border-b" }),
|
|
3133
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:items-center nd:gap-2 nd:px-3 nd:py-2 nd:border-b nd:bg-muted/20 nd:dark:bg-muted/10", children: [
|
|
3134
|
+
/* @__PURE__ */ jsx(DrivePathBar, { className: "nd:flex-1" }),
|
|
3140
3135
|
/* @__PURE__ */ jsx(DriveUpload, { compact: true, accept })
|
|
3141
3136
|
] }),
|
|
3142
|
-
/* @__PURE__ */ jsx(DriveFileGrid, { mimeFilter: accept, className: "flex-1" })
|
|
3137
|
+
/* @__PURE__ */ jsx(DriveFileGrid, { mimeFilter: accept, className: "nd:flex-1" })
|
|
3143
3138
|
] }) })
|
|
3144
3139
|
] }),
|
|
3145
3140
|
/* @__PURE__ */ jsxs(Dialog2Footer, { children: [
|
|
@@ -3266,40 +3261,40 @@ var SidebarContent = (props) => {
|
|
|
3266
3261
|
setOauthLoading(false);
|
|
3267
3262
|
setOauthAbort(null);
|
|
3268
3263
|
};
|
|
3269
|
-
return /* @__PURE__ */ jsxs("div", { className: "w-full h-full flex flex-col bg-muted/5 dark:bg-muted/10", children: [
|
|
3270
|
-
/* @__PURE__ */ jsx("div", { className: "p-2 border-b border-border/50", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
3264
|
+
return /* @__PURE__ */ jsxs("div", { className: "nd:w-full nd:h-full nd:flex nd:flex-col nd:bg-muted/5 nd:dark:bg-muted/10", children: [
|
|
3265
|
+
/* @__PURE__ */ jsx("div", { className: "nd:p-2 nd:border-b nd:border-border/50", children: /* @__PURE__ */ jsxs("div", { className: "nd:flex nd:items-center nd:gap-1", children: [
|
|
3271
3266
|
isDropdownDisabled ? (
|
|
3272
3267
|
/* Static display when no accounts and no providers */
|
|
3273
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 flex items-center gap-2.5 px-2 h-11 min-w-0", children: [
|
|
3274
|
-
/* @__PURE__ */ jsx("div", { className: "size-7 rounded-md flex items-center justify-center shrink-0 bg-emerald-500/10 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-400", children: /* @__PURE__ */ jsx(HardDrive, { className: "size-3.5" }) }),
|
|
3275
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
|
|
3276
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium truncate", children: "Local Storage" }),
|
|
3277
|
-
/* @__PURE__ */ jsx("span", { className: "text-[11px] text-muted-foreground truncate", children: "On this device" })
|
|
3268
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex-1 nd:flex nd:items-center nd:gap-2.5 nd:px-2 nd:h-11 nd:min-w-0", children: [
|
|
3269
|
+
/* @__PURE__ */ jsx("div", { className: "nd:size-7 nd:rounded-md nd:flex nd:items-center nd:justify-center nd:shrink-0 nd:bg-emerald-500/10 nd:text-emerald-600 nd:dark:bg-emerald-500/20 nd:dark:text-emerald-400", children: /* @__PURE__ */ jsx(HardDrive, { className: "nd:size-3.5" }) }),
|
|
3270
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:flex-col nd:min-w-0", children: [
|
|
3271
|
+
/* @__PURE__ */ jsx("span", { className: "nd:text-sm nd:font-medium nd:truncate", children: "Local Storage" }),
|
|
3272
|
+
/* @__PURE__ */ jsx("span", { className: "nd:text-[11px] nd:text-muted-foreground nd:truncate", children: "On this device" })
|
|
3278
3273
|
] })
|
|
3279
3274
|
] })
|
|
3280
3275
|
) : /* @__PURE__ */ jsxs(DropdownMenu, { open: dropdownOpen, onOpenChange: setDropdownOpen, children: [
|
|
3281
|
-
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", className: "flex-1 min-w-0 justify-between px-2 h-11 hover:bg-muted/50 dark:hover:bg-muted/30", children: [
|
|
3282
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 text-left min-w-0 flex-1", children: [
|
|
3276
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", className: "nd:flex-1 nd:min-w-0 nd:justify-between nd:px-2 nd:h-11 nd:hover:bg-muted/50 nd:dark:hover:bg-muted/30", children: [
|
|
3277
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:items-center nd:gap-2.5 nd:text-left nd:min-w-0 nd:flex-1", children: [
|
|
3283
3278
|
/* @__PURE__ */ jsx("div", { className: cn(
|
|
3284
|
-
"size-7 rounded-md flex items-center justify-center shrink-0",
|
|
3285
|
-
activeAccountId ? "bg-blue-500/10 text-blue-600 dark:bg-blue-500/20 dark:text-blue-400" : "bg-emerald-500/10 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-400"
|
|
3286
|
-
), children: activeAccountId ? /* @__PURE__ */ jsx(Database, { className: "size-3.5" }) : /* @__PURE__ */ jsx(HardDrive, { className: "size-3.5" }) }),
|
|
3287
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
|
|
3288
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium truncate", children: currentAccountName }),
|
|
3289
|
-
/* @__PURE__ */ jsx("span", { className: "text-[11px] text-muted-foreground truncate", children: currentAccountEmail })
|
|
3279
|
+
"nd:size-7 nd:rounded-md nd:flex nd:items-center nd:justify-center nd:shrink-0",
|
|
3280
|
+
activeAccountId ? "nd:bg-blue-500/10 nd:text-blue-600 nd:dark:bg-blue-500/20 nd:dark:text-blue-400" : "nd:bg-emerald-500/10 nd:text-emerald-600 nd:dark:bg-emerald-500/20 nd:dark:text-emerald-400"
|
|
3281
|
+
), children: activeAccountId ? /* @__PURE__ */ jsx(Database, { className: "nd:size-3.5" }) : /* @__PURE__ */ jsx(HardDrive, { className: "nd:size-3.5" }) }),
|
|
3282
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex nd:flex-col nd:min-w-0", children: [
|
|
3283
|
+
/* @__PURE__ */ jsx("span", { className: "nd:text-sm nd:font-medium nd:truncate", children: currentAccountName }),
|
|
3284
|
+
/* @__PURE__ */ jsx("span", { className: "nd:text-[11px] nd:text-muted-foreground nd:truncate", children: currentAccountEmail })
|
|
3290
3285
|
] })
|
|
3291
3286
|
] }),
|
|
3292
|
-
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "size-3.5 text-muted-foreground/60 shrink-0" })
|
|
3287
|
+
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "nd:size-3.5 nd:text-muted-foreground/60 nd:shrink-0" })
|
|
3293
3288
|
] }) }),
|
|
3294
|
-
/* @__PURE__ */ jsxs(DropdownMenuContent, { className: "w-56", align: "start", children: [
|
|
3295
|
-
/* @__PURE__ */ jsx(DropdownMenuLabel, { className: "text-[11px] font-medium text-muted-foreground uppercase tracking-wide", children: "Storage" }),
|
|
3289
|
+
/* @__PURE__ */ jsxs(DropdownMenuContent, { className: "nd:w-56", align: "start", children: [
|
|
3290
|
+
/* @__PURE__ */ jsx(DropdownMenuLabel, { className: "nd:text-[11px] nd:font-medium nd:text-muted-foreground nd:uppercase nd:tracking-wide", children: "Storage" }),
|
|
3296
3291
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => {
|
|
3297
3292
|
setActiveAccountId(null);
|
|
3298
3293
|
setCurrentView("BROWSE");
|
|
3299
3294
|
onNavigate?.();
|
|
3300
|
-
}, className: "gap-2 py-2", children: [
|
|
3301
|
-
/* @__PURE__ */ jsx("span", { className: "flex-1 text-sm", children: "Local Storage" }),
|
|
3302
|
-
activeAccountId === null && /* @__PURE__ */ jsx(Check, { className: "size-3.5 text-primary" })
|
|
3295
|
+
}, className: "nd:gap-2 nd:py-2", children: [
|
|
3296
|
+
/* @__PURE__ */ jsx("span", { className: "nd:flex-1 nd:text-sm", children: "Local Storage" }),
|
|
3297
|
+
activeAccountId === null && /* @__PURE__ */ jsx(Check, { className: "nd:size-3.5 nd:text-primary" })
|
|
3303
3298
|
] }),
|
|
3304
3299
|
accounts.length > 0 && /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
3305
3300
|
accounts.map((account) => /* @__PURE__ */ jsxs(
|
|
@@ -3310,13 +3305,13 @@ var SidebarContent = (props) => {
|
|
|
3310
3305
|
setCurrentView("BROWSE");
|
|
3311
3306
|
onNavigate?.();
|
|
3312
3307
|
},
|
|
3313
|
-
className: "gap-2 py-2",
|
|
3308
|
+
className: "nd:gap-2 nd:py-2",
|
|
3314
3309
|
children: [
|
|
3315
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
3316
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm truncate", children: account.name }),
|
|
3317
|
-
/* @__PURE__ */ jsx("p", { className: "text-[10px] text-muted-foreground truncate", children: account.email })
|
|
3310
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:flex-1 nd:min-w-0", children: [
|
|
3311
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-sm nd:truncate", children: account.name }),
|
|
3312
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-[10px] nd:text-muted-foreground nd:truncate", children: account.email })
|
|
3318
3313
|
] }),
|
|
3319
|
-
activeAccountId === account.id && /* @__PURE__ */ jsx(Check, { className: "size-3.5 text-primary" })
|
|
3314
|
+
activeAccountId === account.id && /* @__PURE__ */ jsx(Check, { className: "nd:size-3.5 nd:text-primary" })
|
|
3320
3315
|
]
|
|
3321
3316
|
},
|
|
3322
3317
|
account.id
|
|
@@ -3324,9 +3319,9 @@ var SidebarContent = (props) => {
|
|
|
3324
3319
|
hasAnyProvider && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3325
3320
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
3326
3321
|
/* @__PURE__ */ jsxs(DropdownMenuSub, { children: [
|
|
3327
|
-
/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { className: "gap-2", children: [
|
|
3328
|
-
/* @__PURE__ */ jsx(Plus, { className: "size-3.5" }),
|
|
3329
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm", children: "Add Account" })
|
|
3322
|
+
/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { className: "nd:gap-2", children: [
|
|
3323
|
+
/* @__PURE__ */ jsx(Plus, { className: "nd:size-3.5" }),
|
|
3324
|
+
/* @__PURE__ */ jsx("span", { className: "nd:text-sm", children: "Add Account" })
|
|
3330
3325
|
] }),
|
|
3331
3326
|
/* @__PURE__ */ jsx(DropdownMenuSubContent, { children: availableProviders.google && /* @__PURE__ */ jsx(DropdownMenuItem, { onClick: openOAuthPopup, children: "Google Drive" }) })
|
|
3332
3327
|
] })
|
|
@@ -3339,30 +3334,30 @@ var SidebarContent = (props) => {
|
|
|
3339
3334
|
{
|
|
3340
3335
|
variant: "ghost",
|
|
3341
3336
|
size: "icon",
|
|
3342
|
-
className: "size-9 shrink-0 hover:bg-muted/50 dark:hover:bg-muted/30",
|
|
3343
|
-
children: /* @__PURE__ */ jsx(Settings2, { className: "size-4 text-muted-foreground" })
|
|
3337
|
+
className: "nd:size-9 nd:shrink-0 nd:hover:bg-muted/50 nd:dark:hover:bg-muted/30",
|
|
3338
|
+
children: /* @__PURE__ */ jsx(Settings2, { className: "nd:size-4 nd:text-muted-foreground" })
|
|
3344
3339
|
}
|
|
3345
3340
|
) }),
|
|
3346
|
-
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "w-40", children: [
|
|
3347
|
-
/* @__PURE__ */ jsx(DropdownMenuLabel, { className: "text-xs text-muted-foreground truncate", children: currentAccount.name }),
|
|
3341
|
+
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "nd:w-40", children: [
|
|
3342
|
+
/* @__PURE__ */ jsx(DropdownMenuLabel, { className: "nd:text-xs nd:text-muted-foreground nd:truncate", children: currentAccount.name }),
|
|
3348
3343
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
3349
3344
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => {
|
|
3350
3345
|
setRenameDialog({ open: true, account: currentAccount });
|
|
3351
3346
|
}, children: [
|
|
3352
|
-
/* @__PURE__ */ jsx(Pencil, { className: "size-3.5 mr-2" }),
|
|
3347
|
+
/* @__PURE__ */ jsx(Pencil, { className: "nd:size-3.5 nd:mr-2" }),
|
|
3353
3348
|
"Rename"
|
|
3354
3349
|
] }),
|
|
3355
3350
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: openOAuthPopup, children: [
|
|
3356
|
-
/* @__PURE__ */ jsx(RefreshCw, { className: "size-3.5 mr-2" }),
|
|
3351
|
+
/* @__PURE__ */ jsx(RefreshCw, { className: "nd:size-3.5 nd:mr-2" }),
|
|
3357
3352
|
"Reconnect"
|
|
3358
3353
|
] }),
|
|
3359
3354
|
/* @__PURE__ */ jsxs(
|
|
3360
3355
|
DropdownMenuItem,
|
|
3361
3356
|
{
|
|
3362
|
-
className: "text-destructive focus:text-destructive",
|
|
3357
|
+
className: "nd:text-destructive nd:focus:text-destructive",
|
|
3363
3358
|
onClick: () => setDeleteDialog({ open: true, account: currentAccount }),
|
|
3364
3359
|
children: [
|
|
3365
|
-
/* @__PURE__ */ jsx(Trash, { className: "size-3.5 mr-2" }),
|
|
3360
|
+
/* @__PURE__ */ jsx(Trash, { className: "nd:size-3.5 nd:mr-2" }),
|
|
3366
3361
|
"Disconnect"
|
|
3367
3362
|
]
|
|
3368
3363
|
}
|
|
@@ -3370,21 +3365,21 @@ var SidebarContent = (props) => {
|
|
|
3370
3365
|
] })
|
|
3371
3366
|
] })
|
|
3372
3367
|
] }) }),
|
|
3373
|
-
/* @__PURE__ */ jsxs("nav", { className: "flex-1 p-2 space-y-0.5", children: [
|
|
3368
|
+
/* @__PURE__ */ jsxs("nav", { className: "nd:flex-1 nd:p-2 nd:space-y-0.5", children: [
|
|
3374
3369
|
/* @__PURE__ */ jsxs(
|
|
3375
3370
|
Button,
|
|
3376
3371
|
{
|
|
3377
3372
|
variant: "ghost",
|
|
3378
3373
|
className: cn(
|
|
3379
|
-
"w-full justify-start gap-2.5 h-9 px-2.5 font-medium",
|
|
3380
|
-
currentView !== "TRASH" ? "bg-primary/10 text-primary hover:bg-primary/15 dark:bg-primary/15 dark:hover:bg-primary/20" : "hover:bg-muted/50 dark:hover:bg-muted/30"
|
|
3374
|
+
"nd:w-full nd:justify-start nd:gap-2.5 nd:h-9 nd:px-2.5 nd:font-medium",
|
|
3375
|
+
currentView !== "TRASH" ? "nd:bg-primary/10 nd:text-primary nd:hover:bg-primary/15 nd:dark:bg-primary/15 nd:dark:hover:bg-primary/20" : "nd:hover:bg-muted/50 nd:dark:hover:bg-muted/30"
|
|
3381
3376
|
),
|
|
3382
3377
|
onClick: () => {
|
|
3383
3378
|
setCurrentView("BROWSE");
|
|
3384
3379
|
onNavigate?.();
|
|
3385
3380
|
},
|
|
3386
3381
|
children: [
|
|
3387
|
-
/* @__PURE__ */ jsx(FolderOpen, { className: "size-4" }),
|
|
3382
|
+
/* @__PURE__ */ jsx(FolderOpen, { className: "nd:size-4" }),
|
|
3388
3383
|
"My Files"
|
|
3389
3384
|
]
|
|
3390
3385
|
}
|
|
@@ -3394,21 +3389,21 @@ var SidebarContent = (props) => {
|
|
|
3394
3389
|
{
|
|
3395
3390
|
variant: "ghost",
|
|
3396
3391
|
className: cn(
|
|
3397
|
-
"w-full justify-start gap-2.5 h-9 px-2.5 font-medium",
|
|
3398
|
-
currentView === "TRASH" ? "bg-destructive/10 text-destructive hover:bg-destructive/15 dark:bg-destructive/15" : "hover:bg-muted/50 dark:hover:bg-muted/30"
|
|
3392
|
+
"nd:w-full nd:justify-start nd:gap-2.5 nd:h-9 nd:px-2.5 nd:font-medium",
|
|
3393
|
+
currentView === "TRASH" ? "nd:bg-destructive/10 nd:text-destructive nd:hover:bg-destructive/15 nd:dark:bg-destructive/15" : "nd:hover:bg-muted/50 nd:dark:hover:bg-muted/30"
|
|
3399
3394
|
),
|
|
3400
3395
|
onClick: () => {
|
|
3401
3396
|
setCurrentView("TRASH");
|
|
3402
3397
|
onNavigate?.();
|
|
3403
3398
|
},
|
|
3404
3399
|
children: [
|
|
3405
|
-
/* @__PURE__ */ jsx(Trash2, { className: "size-4" }),
|
|
3400
|
+
/* @__PURE__ */ jsx(Trash2, { className: "nd:size-4" }),
|
|
3406
3401
|
"Trash"
|
|
3407
3402
|
]
|
|
3408
3403
|
}
|
|
3409
3404
|
)
|
|
3410
3405
|
] }),
|
|
3411
|
-
/* @__PURE__ */ jsx("div", { className: "p-2.5 border-t border-border/50 bg-background/50 dark:bg-background/30", children: /* @__PURE__ */ jsx(DriveStorageIndicator, {}) }),
|
|
3406
|
+
/* @__PURE__ */ jsx("div", { className: "nd:p-2.5 nd:border-t nd:border-border/50 nd:bg-background/50 nd:dark:bg-background/30", children: /* @__PURE__ */ jsx(DriveStorageIndicator, {}) }),
|
|
3412
3407
|
/* @__PURE__ */ jsx(
|
|
3413
3408
|
RenameAccountDialog,
|
|
3414
3409
|
{
|
|
@@ -3428,11 +3423,11 @@ var SidebarContent = (props) => {
|
|
|
3428
3423
|
onConfirm: handleDelete
|
|
3429
3424
|
}
|
|
3430
3425
|
),
|
|
3431
|
-
/* @__PURE__ */ jsx(Dialog, { open: oauthLoading, onOpenChange: (open) => !open && cancelOAuth(), children: /* @__PURE__ */ jsx(DialogContent, { className: "sm:max-w-xs", showCloseButton: false, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4 py-4", children: [
|
|
3432
|
-
/* @__PURE__ */ jsx(Loader2, { className: "size-8 text-primary animate-spin" }),
|
|
3433
|
-
/* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
3434
|
-
/* @__PURE__ */ jsx(DialogTitle, { className: "text-base", children: "Connecting..." }),
|
|
3435
|
-
/* @__PURE__ */ jsx(DialogDescription, { className: "text-sm mt-1", children: "Preparing Google authentication" })
|
|
3426
|
+
/* @__PURE__ */ jsx(Dialog, { open: oauthLoading, onOpenChange: (open) => !open && cancelOAuth(), children: /* @__PURE__ */ jsx(DialogContent, { className: "nd:sm:max-w-xs", showCloseButton: false, children: /* @__PURE__ */ jsxs("div", { className: "nd:flex nd:flex-col nd:items-center nd:gap-4 nd:py-4", children: [
|
|
3427
|
+
/* @__PURE__ */ jsx(Loader2, { className: "nd:size-8 nd:text-primary nd:animate-spin" }),
|
|
3428
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:text-center", children: [
|
|
3429
|
+
/* @__PURE__ */ jsx(DialogTitle, { className: "nd:text-base", children: "Connecting..." }),
|
|
3430
|
+
/* @__PURE__ */ jsx(DialogDescription, { className: "nd:text-sm nd:mt-1", children: "Preparing Google authentication" })
|
|
3436
3431
|
] }),
|
|
3437
3432
|
/* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: cancelOAuth, children: "Cancel" })
|
|
3438
3433
|
] }) }) })
|
|
@@ -3441,10 +3436,10 @@ var SidebarContent = (props) => {
|
|
|
3441
3436
|
var DriveSidebar = ({ className }) => {
|
|
3442
3437
|
const [sheetOpen, setSheetOpen] = useState(false);
|
|
3443
3438
|
return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsxs(Sheet, { open: sheetOpen, onOpenChange: setSheetOpen, children: [
|
|
3444
|
-
/* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", className: "size-9", "aria-label": "Open menu", children: /* @__PURE__ */ jsx(Menu, { className: "size-5" }) }) }),
|
|
3445
|
-
/* @__PURE__ */ jsxs(SheetContent, { side: "left", className: "w-70 sm:w-80 p-0", hideCloseButton: true, children: [
|
|
3446
|
-
/* @__PURE__ */ jsx(SheetTitle, { className: "sr-only", children: "Navigation Menu" }),
|
|
3447
|
-
/* @__PURE__ */ jsx(SheetDescription, { className: "sr-only", children: "Storage accounts and navigation" }),
|
|
3439
|
+
/* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", className: "nd:size-9", "aria-label": "Open menu", children: /* @__PURE__ */ jsx(Menu, { className: "nd:size-5" }) }) }),
|
|
3440
|
+
/* @__PURE__ */ jsxs(SheetContent, { side: "left", className: "nd:w-70 nd:sm:w-80 nd:p-0", hideCloseButton: true, children: [
|
|
3441
|
+
/* @__PURE__ */ jsx(SheetTitle, { className: "nd:sr-only", children: "Navigation Menu" }),
|
|
3442
|
+
/* @__PURE__ */ jsx(SheetDescription, { className: "nd:sr-only", children: "Storage accounts and navigation" }),
|
|
3448
3443
|
/* @__PURE__ */ jsx(SidebarContent, { onNavigate: () => setSheetOpen(false) })
|
|
3449
3444
|
] })
|
|
3450
3445
|
] }) });
|
|
@@ -3649,47 +3644,47 @@ var DriveExplorer = (props) => {
|
|
|
3649
3644
|
const enableDrag = currentView === "BROWSE";
|
|
3650
3645
|
const stateContent = (() => {
|
|
3651
3646
|
if (isLoading && items.length === 0) {
|
|
3652
|
-
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12 flex-1", children: /* @__PURE__ */ jsx(Loader2, { className: "size-6 animate-spin text-muted-foreground" }) });
|
|
3647
|
+
return /* @__PURE__ */ jsx("div", { className: "nd:flex nd:items-center nd:justify-center nd:py-12 nd:flex-1", children: /* @__PURE__ */ jsx(Loader2, { className: "nd:size-6 nd:animate-spin nd:text-muted-foreground" }) });
|
|
3653
3648
|
}
|
|
3654
3649
|
if (error) {
|
|
3655
|
-
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center p-12 text-destructive bg-destructive/10 rounded-lg flex-1", children: error });
|
|
3650
|
+
return /* @__PURE__ */ jsx("div", { className: "nd:flex nd:items-center nd:justify-center nd:p-12 nd:text-destructive nd:bg-destructive/10 nd:rounded-lg nd:flex-1", children: error });
|
|
3656
3651
|
}
|
|
3657
3652
|
if (processedItems.length === 0) {
|
|
3658
3653
|
return /* @__PURE__ */ jsxs(ContextMenu, { children: [
|
|
3659
|
-
/* @__PURE__ */ jsx(ContextMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col items-center justify-center py-12 text-center flex-1", className), children: [
|
|
3660
|
-
/* @__PURE__ */ jsx("div", { className: "size-12 rounded-full bg-muted flex items-center justify-center mb-3", children: /* @__PURE__ */ jsx(Folder, { className: "size-6 text-muted-foreground" }) }),
|
|
3661
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: currentView === "SEARCH" ? "No files match your search" : currentView === "TRASH" ? "Trash is empty" : "No files found" })
|
|
3654
|
+
/* @__PURE__ */ jsx(ContextMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("div", { className: cn("nd:flex nd:flex-col nd:items-center nd:justify-center nd:py-12 nd:text-center nd:flex-1", className), children: [
|
|
3655
|
+
/* @__PURE__ */ jsx("div", { className: "nd:size-12 nd:rounded-full nd:bg-muted nd:flex nd:items-center nd:justify-center nd:mb-3", children: /* @__PURE__ */ jsx(Folder, { className: "nd:size-6 nd:text-muted-foreground" }) }),
|
|
3656
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-sm nd:text-muted-foreground", children: currentView === "SEARCH" ? "No files match your search" : currentView === "TRASH" ? "Trash is empty" : "No files found" })
|
|
3662
3657
|
] }) }),
|
|
3663
3658
|
/* @__PURE__ */ jsx(ContextMenuContent, { children: currentView === "BROWSE" ? /* @__PURE__ */ jsxs(ContextMenuItem, { onClick: () => setDialogs((prev) => ({ ...prev, newFolder: true })), children: [
|
|
3664
|
-
/* @__PURE__ */ jsx(FolderPlus, { className: "mr-2 size-4" }),
|
|
3659
|
+
/* @__PURE__ */ jsx(FolderPlus, { className: "nd:mr-2 nd:size-4" }),
|
|
3665
3660
|
" New Folder"
|
|
3666
|
-
] }) : /* @__PURE__ */ jsx("div", { className: "px-2 py-6 text-center", children: /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "No actions available" }) }) })
|
|
3661
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "nd:px-2 nd:py-6 nd:text-center", children: /* @__PURE__ */ jsx("p", { className: "nd:text-xs nd:text-muted-foreground", children: "No actions available" }) }) })
|
|
3667
3662
|
] });
|
|
3668
3663
|
}
|
|
3669
3664
|
return null;
|
|
3670
3665
|
})();
|
|
3671
|
-
return /* @__PURE__ */ jsx(DndContext, { sensors, collisionDetection: closestCenter, onDragStart: handleDragStart, onDragOver: handleDragOver, onDragEnd: handleDragEnd, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-full w-full overflow-hidden bg-background/50 dark:bg-background/30 relative", children: [
|
|
3666
|
+
return /* @__PURE__ */ jsx(DndContext, { sensors, collisionDetection: closestCenter, onDragStart: handleDragStart, onDragOver: handleDragOver, onDragEnd: handleDragEnd, children: /* @__PURE__ */ jsxs("div", { className: "nd-drive-root nd:flex nd:flex-col nd:h-full nd:w-full nd:overflow-hidden nd:bg-background/50 nd:dark:bg-background/30 nd:relative", children: [
|
|
3672
3667
|
/* @__PURE__ */ jsx(DriveContentProgress, {}),
|
|
3673
|
-
/* @__PURE__ */ jsxs("div", { className: "h-12 px-3 sm:px-4 border-b bg-background/95 dark:bg-background/80 backdrop-blur-sm flex items-center gap-3", children: [
|
|
3674
|
-
/* @__PURE__ */ jsx(DriveSidebar, { className: "lg:hidden" }),
|
|
3675
|
-
/* @__PURE__ */ jsx(DrivePathBar, { className: "hidden lg:flex flex-1" }),
|
|
3668
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:h-12 nd:px-3 nd:sm:px-4 nd:border-b nd:bg-background/95 nd:dark:bg-background/80 nd:backdrop-blur-sm nd:flex nd:items-center nd:gap-3", children: [
|
|
3669
|
+
/* @__PURE__ */ jsx(DriveSidebar, { className: "nd:lg:hidden" }),
|
|
3670
|
+
/* @__PURE__ */ jsx(DrivePathBar, { className: "nd:hidden nd:lg:flex nd:flex-1" }),
|
|
3676
3671
|
/* @__PURE__ */ jsx(DriveUpload, { compact: true, accept: mimeFilter })
|
|
3677
3672
|
] }),
|
|
3678
|
-
/* @__PURE__ */ jsx("div", { className: "lg:hidden px-3 py-2 border-b bg-background/95 dark:bg-background/80 backdrop-blur-sm", children: /* @__PURE__ */ jsx(DrivePathBar, {}) }),
|
|
3673
|
+
/* @__PURE__ */ jsx("div", { className: "nd:lg:hidden nd:px-3 nd:py-2 nd:border-b nd:bg-background/95 nd:dark:bg-background/80 nd:backdrop-blur-sm", children: /* @__PURE__ */ jsx(DrivePathBar, {}) }),
|
|
3679
3674
|
stateContent || /* @__PURE__ */ jsxs(ContextMenu, { children: [
|
|
3680
|
-
/* @__PURE__ */ jsx(ContextMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("div", { className: cn("flex-1 overflow-y-auto min-h-0 container mx-auto p-2 sm:p-3 md:p-4", className), children: [
|
|
3681
|
-
/* @__PURE__ */ jsx("div", { className: "space-y-4 sm:space-y-6 pb-8 sm:pb-12", children: Object.entries(groupedItems).map(([groupName, groupItems]) => /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
3682
|
-
groupBy !== "NONE" && /* @__PURE__ */ jsxs("h3", { className: "text-sm font-medium text-muted-foreground flex items-center gap-2", children: [
|
|
3675
|
+
/* @__PURE__ */ jsx(ContextMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("div", { className: cn("nd:flex-1 nd:overflow-y-auto nd:min-h-0 nd:container nd:mx-auto nd:p-2 nd:sm:p-3 nd:md:p-4", className), children: [
|
|
3676
|
+
/* @__PURE__ */ jsx("div", { className: "nd:space-y-4 nd:sm:space-y-6 nd:pb-8 nd:sm:pb-12", children: Object.entries(groupedItems).map(([groupName, groupItems]) => /* @__PURE__ */ jsxs("div", { className: "nd:space-y-3", children: [
|
|
3677
|
+
groupBy !== "NONE" && /* @__PURE__ */ jsxs("h3", { className: "nd:text-sm nd:font-medium nd:text-muted-foreground nd:flex nd:items-center nd:gap-2", children: [
|
|
3683
3678
|
groupName,
|
|
3684
3679
|
" ",
|
|
3685
|
-
/* @__PURE__ */ jsxs("span", { className: "text-xs opacity-50", children: [
|
|
3680
|
+
/* @__PURE__ */ jsxs("span", { className: "nd:text-xs nd:opacity-50", children: [
|
|
3686
3681
|
"(",
|
|
3687
3682
|
groupItems.length,
|
|
3688
3683
|
")"
|
|
3689
3684
|
] })
|
|
3690
3685
|
] }),
|
|
3691
3686
|
/* @__PURE__ */ jsx(SortableContext, { items: groupItems.map((i) => i.id), strategy: rectSortingStrategy, disabled: !enableDrag, children: /* @__PURE__ */ jsx("div", { className: cn(
|
|
3692
|
-
viewMode === "GRID" ? "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6
|
|
3687
|
+
viewMode === "GRID" ? "nd:grid nd:grid-cols-2 nd:sm:grid-cols-3 nd:md:grid-cols-4 nd:lg:grid-cols-5 nd:xl:grid-cols-6 2nd:xl:grid-cols-7 nd:gap-2 nd:sm:gap-3 nd:md:gap-4" : "nd:flex nd:flex-col nd:gap-1"
|
|
3693
3688
|
), children: groupItems.map((item) => {
|
|
3694
3689
|
const isSelected = selectedFileIds.includes(item.id);
|
|
3695
3690
|
const isFolder = item.information.type === "FOLDER";
|
|
@@ -3703,10 +3698,10 @@ var DriveExplorer = (props) => {
|
|
|
3703
3698
|
"div",
|
|
3704
3699
|
{
|
|
3705
3700
|
className: cn(
|
|
3706
|
-
"group relative cursor-pointer transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",
|
|
3707
|
-
viewMode === "GRID" ? "flex flex-col rounded-xl border bg-card dark:bg-card/50 hover:bg-accent/50 dark:hover:bg-accent/30 hover:shadow-sm overflow-hidden" : "flex items-center p-2 rounded-lg hover:bg-accent/50 dark:hover:bg-accent/30 gap-3 border border-transparent hover:border-border",
|
|
3708
|
-
isSelected && "ring-2 ring-primary border-primary/50 bg-accent/30 dark:bg-accent/20",
|
|
3709
|
-
isDragOver && "ring-2 ring-primary border-primary scale-[1.02] bg-primary/10 shadow-lg transition-transform"
|
|
3701
|
+
"group nd:relative nd:cursor-pointer nd:transition-all nd:focus:outline-none nd:focus:ring-2 nd:focus:ring-primary nd:focus:ring-offset-2",
|
|
3702
|
+
viewMode === "GRID" ? "nd:flex nd:flex-col nd:rounded-xl nd:border nd:bg-card nd:dark:bg-card/50 nd:hover:bg-accent/50 nd:dark:hover:bg-accent/30 nd:hover:shadow-sm nd:overflow-hidden" : "nd:flex nd:items-center nd:p-2 nd:rounded-lg nd:hover:bg-accent/50 nd:dark:hover:bg-accent/30 nd:gap-3 nd:border nd:border-transparent nd:hover:border-border",
|
|
3703
|
+
isSelected && "nd:ring-2 nd:ring-primary nd:border-primary/50 nd:bg-accent/30 nd:dark:bg-accent/20",
|
|
3704
|
+
isDragOver && "nd:ring-2 nd:ring-primary nd:border-primary nd:scale-[1.02] nd:bg-primary/10 nd:shadow-lg nd:transition-transform"
|
|
3710
3705
|
),
|
|
3711
3706
|
onClick: (e) => handleItemClick(e, item),
|
|
3712
3707
|
onTouchEnd: (e) => {
|
|
@@ -3717,34 +3712,34 @@ var DriveExplorer = (props) => {
|
|
|
3717
3712
|
role: "button",
|
|
3718
3713
|
tabIndex: 0,
|
|
3719
3714
|
children: viewMode === "GRID" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3720
|
-
/* @__PURE__ */ jsxs("div", { className: "aspect-square w-full bg-muted/20 dark:bg-muted/10 flex items-center justify-center overflow-hidden relative", children: [
|
|
3721
|
-
isThumbnailable ? /* @__PURE__ */ jsx("img", { src: thumbnailUrl, alt: item.name, className: "size-full object-contain transition-transform group-hover:scale-105 duration-300", loading: "lazy" }) : /* @__PURE__ */ jsx("div", { className: "transition-transform group-hover:scale-110 duration-200", children: getFileIcon(item.information.type === "FILE" ? item.information.mime : "", isFolder, "size-10 text-muted-foreground/70") }),
|
|
3722
|
-
isSelected && /* @__PURE__ */ jsx("div", { className: "absolute top-2 right-2 size-5 bg-primary rounded-full flex items-center justify-center shadow-sm animate-in zoom-in-50", children: /* @__PURE__ */ jsx("div", { className: "size-2 bg-primary-foreground rounded-full" }) }),
|
|
3723
|
-
isFolder && currentView === "BROWSE" && /* @__PURE__ */ jsx("div", { className: "absolute bottom-2 right-2 lg:hidden size-6 bg-primary/90 rounded-full flex items-center justify-center shadow-md", children: /* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5 text-primary-foreground" }) })
|
|
3715
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:aspect-square nd:w-full nd:bg-muted/20 nd:dark:bg-muted/10 nd:flex nd:items-center nd:justify-center nd:overflow-hidden nd:relative", children: [
|
|
3716
|
+
isThumbnailable ? /* @__PURE__ */ jsx("img", { src: thumbnailUrl, alt: item.name, className: "nd:size-full nd:object-contain nd:transition-transform group-nd:hover:scale-105 nd:duration-300", loading: "lazy" }) : /* @__PURE__ */ jsx("div", { className: "nd:transition-transform group-nd:hover:scale-110 nd:duration-200", children: getFileIcon(item.information.type === "FILE" ? item.information.mime : "", isFolder, "nd:size-10 nd:text-muted-foreground/70") }),
|
|
3717
|
+
isSelected && /* @__PURE__ */ jsx("div", { className: "nd:absolute nd:top-2 nd:right-2 nd:size-5 nd:bg-primary nd:rounded-full nd:flex nd:items-center nd:justify-center nd:shadow-sm nd:animate-in nd:zoom-in-50", children: /* @__PURE__ */ jsx("div", { className: "nd:size-2 nd:bg-primary-foreground nd:rounded-full" }) }),
|
|
3718
|
+
isFolder && currentView === "BROWSE" && /* @__PURE__ */ jsx("div", { className: "nd:absolute nd:bottom-2 nd:right-2 nd:lg:hidden nd:size-6 nd:bg-primary/90 nd:rounded-full nd:flex nd:items-center nd:justify-center nd:shadow-md", children: /* @__PURE__ */ jsx(ChevronRight, { className: "nd:size-3.5 nd:text-primary-foreground" }) })
|
|
3724
3719
|
] }),
|
|
3725
|
-
/* @__PURE__ */ jsxs("div", { className: "p-2.5", children: [
|
|
3726
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium truncate", title: item.name, children: item.name }),
|
|
3727
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-0.5", children: isFolder ? "Folder" : formatBytes(item.information.type === "FILE" ? item.information.sizeInBytes : 0) })
|
|
3720
|
+
/* @__PURE__ */ jsxs("div", { className: "nd:p-2.5", children: [
|
|
3721
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-sm nd:font-medium nd:truncate", title: item.name, children: item.name }),
|
|
3722
|
+
/* @__PURE__ */ jsx("p", { className: "nd:text-xs nd:text-muted-foreground nd:mt-0.5", children: isFolder ? "Folder" : formatBytes(item.information.type === "FILE" ? item.information.sizeInBytes : 0) })
|
|
3728
3723
|
] })
|
|
3729
3724
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3730
|
-
/* @__PURE__ */ jsx("div", { className: "size-9 shrink-0 rounded-md overflow-hidden bg-muted/40 dark:bg-muted/20 flex items-center justify-center border", children: isThumbnailable ? /* @__PURE__ */ jsx("img", { src: thumbnailUrl, alt: item.name, className: "size-full object-contain", loading: "lazy" }) : getFileIcon(item.information.type === "FILE" ? item.information.mime : "", isFolder, "size-4 text-muted-foreground") }),
|
|
3731
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium truncate flex-1", title: item.name, children: item.name }),
|
|
3732
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground w-20 text-right shrink-0", children: isFolder ? "-" : formatBytes(item.information.type === "FILE" ? item.information.sizeInBytes : 0) }),
|
|
3733
|
-
isFolder && currentView === "BROWSE" && /* @__PURE__ */ jsx(ChevronRight, { className: "size-4 text-muted-foreground lg:hidden shrink-0" })
|
|
3725
|
+
/* @__PURE__ */ jsx("div", { className: "nd:size-9 nd:shrink-0 nd:rounded-md nd:overflow-hidden nd:bg-muted/40 nd:dark:bg-muted/20 nd:flex nd:items-center nd:justify-center nd:border", children: isThumbnailable ? /* @__PURE__ */ jsx("img", { src: thumbnailUrl, alt: item.name, className: "nd:size-full nd:object-contain", loading: "lazy" }) : getFileIcon(item.information.type === "FILE" ? item.information.mime : "", isFolder, "nd:size-4 nd:text-muted-foreground") }),
|
|
3726
|
+
/* @__PURE__ */ jsx("span", { className: "nd:text-sm nd:font-medium nd:truncate nd:flex-1", title: item.name, children: item.name }),
|
|
3727
|
+
/* @__PURE__ */ jsx("span", { className: "nd:text-xs nd:text-muted-foreground nd:w-20 nd:text-right nd:shrink-0", children: isFolder ? "-" : formatBytes(item.information.type === "FILE" ? item.information.sizeInBytes : 0) }),
|
|
3728
|
+
isFolder && currentView === "BROWSE" && /* @__PURE__ */ jsx(ChevronRight, { className: "nd:size-4 nd:text-muted-foreground nd:lg:hidden nd:shrink-0" })
|
|
3734
3729
|
] })
|
|
3735
3730
|
}
|
|
3736
3731
|
) }),
|
|
3737
3732
|
/* @__PURE__ */ jsx(ContextMenuContent, { children: currentView === "TRASH" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3738
3733
|
/* @__PURE__ */ jsxs(ContextMenuItem, { onClick: () => restoreItem(item.id), children: [
|
|
3739
|
-
/* @__PURE__ */ jsx(RotateCcw, { className: "mr-2 size-4" }),
|
|
3734
|
+
/* @__PURE__ */ jsx(RotateCcw, { className: "nd:mr-2 nd:size-4" }),
|
|
3740
3735
|
" Restore"
|
|
3741
3736
|
] }),
|
|
3742
3737
|
/* @__PURE__ */ jsx(ContextMenuSeparator, {}),
|
|
3743
|
-
/* @__PURE__ */ jsxs(ContextMenuItem, { className: "text-destructive focus:text-destructive", onClick: () => {
|
|
3738
|
+
/* @__PURE__ */ jsxs(ContextMenuItem, { className: "nd:text-destructive nd:focus:text-destructive", onClick: () => {
|
|
3744
3739
|
setItemToDelete(item);
|
|
3745
3740
|
setDialogs((prev) => ({ ...prev, delete: true }));
|
|
3746
3741
|
}, children: [
|
|
3747
|
-
/* @__PURE__ */ jsx(Trash2, { className: "mr-2 size-4" }),
|
|
3742
|
+
/* @__PURE__ */ jsx(Trash2, { className: "nd:mr-2 nd:size-4" }),
|
|
3748
3743
|
" Delete Forever"
|
|
3749
3744
|
] })
|
|
3750
3745
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -3752,30 +3747,30 @@ var DriveExplorer = (props) => {
|
|
|
3752
3747
|
setItemToRename(item);
|
|
3753
3748
|
setDialogs((prev) => ({ ...prev, rename: true }));
|
|
3754
3749
|
}, children: [
|
|
3755
|
-
/* @__PURE__ */ jsx(Pencil, { className: "mr-2 size-4" }),
|
|
3750
|
+
/* @__PURE__ */ jsx(Pencil, { className: "nd:mr-2 nd:size-4" }),
|
|
3756
3751
|
" Rename"
|
|
3757
3752
|
] }),
|
|
3758
3753
|
/* @__PURE__ */ jsx(ContextMenuSeparator, {}),
|
|
3759
|
-
/* @__PURE__ */ jsxs(ContextMenuItem, { className: "text-destructive focus:text-destructive", onClick: () => {
|
|
3754
|
+
/* @__PURE__ */ jsxs(ContextMenuItem, { className: "nd:text-destructive nd:focus:text-destructive", onClick: () => {
|
|
3760
3755
|
setItemToDelete(item);
|
|
3761
3756
|
setDialogs((prev) => ({ ...prev, delete: true }));
|
|
3762
3757
|
}, children: [
|
|
3763
|
-
/* @__PURE__ */ jsx(Trash2, { className: "mr-2 size-4" }),
|
|
3758
|
+
/* @__PURE__ */ jsx(Trash2, { className: "nd:mr-2 nd:size-4" }),
|
|
3764
3759
|
" Delete"
|
|
3765
3760
|
] })
|
|
3766
3761
|
] }) })
|
|
3767
3762
|
] }) }, item.id);
|
|
3768
3763
|
}) }) })
|
|
3769
3764
|
] }, groupName)) }),
|
|
3770
|
-
hasMore && /* @__PURE__ */ jsxs("div", { ref: observerTarget, className: "flex justify-center py-4", children: [
|
|
3771
|
-
isLoadingMore && /* @__PURE__ */ jsx(Loader2, { className: "size-6 animate-spin text-muted-foreground" }),
|
|
3772
|
-
!isLoadingMore && /* @__PURE__ */ jsx("div", { className: "h-4 w-full" })
|
|
3765
|
+
hasMore && /* @__PURE__ */ jsxs("div", { ref: observerTarget, className: "nd:flex nd:justify-center nd:py-4", children: [
|
|
3766
|
+
isLoadingMore && /* @__PURE__ */ jsx(Loader2, { className: "nd:size-6 nd:animate-spin nd:text-muted-foreground" }),
|
|
3767
|
+
!isLoadingMore && /* @__PURE__ */ jsx("div", { className: "nd:h-4 nd:w-full" })
|
|
3773
3768
|
] })
|
|
3774
3769
|
] }) }),
|
|
3775
3770
|
/* @__PURE__ */ jsx(ContextMenuContent, { children: currentView === "BROWSE" ? /* @__PURE__ */ jsxs(ContextMenuItem, { onClick: () => setDialogs((prev) => ({ ...prev, newFolder: true })), children: [
|
|
3776
|
-
/* @__PURE__ */ jsx(FolderPlus, { className: "mr-2 size-4" }),
|
|
3771
|
+
/* @__PURE__ */ jsx(FolderPlus, { className: "nd:mr-2 nd:size-4" }),
|
|
3777
3772
|
" New Folder"
|
|
3778
|
-
] }) : /* @__PURE__ */ jsx("div", { className: "px-2 py-6 text-center", children: /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "No actions available" }) }) })
|
|
3773
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "nd:px-2 nd:py-6 nd:text-center", children: /* @__PURE__ */ jsx("p", { className: "nd:text-xs nd:text-muted-foreground", children: "No actions available" }) }) })
|
|
3779
3774
|
] }),
|
|
3780
3775
|
/* @__PURE__ */ jsx(
|
|
3781
3776
|
CreateFolderDialog,
|