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