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