@vendure/dashboard 3.3.6-master-202507030648 → 3.3.6-master-202507030835

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.
Files changed (67) hide show
  1. package/dist/plugin/vite-plugin-vendure-dashboard.js +1 -1
  2. package/package.json +40 -27
  3. package/src/app/routes/_authenticated/_collections/collections.graphql.ts +32 -0
  4. package/src/app/routes/_authenticated/_collections/collections.tsx +153 -133
  5. package/src/app/routes/_authenticated/_collections/collections_.$id.tsx +1 -1
  6. package/src/app/routes/_authenticated/_collections/components/collection-bulk-actions.tsx +34 -1
  7. package/src/app/routes/_authenticated/_collections/components/move-collections-dialog.tsx +430 -0
  8. package/src/app/routes/_authenticated/_collections/components/move-single-collection.tsx +33 -0
  9. package/src/app/routes/_authenticated/_customers/components/customer-address-card.tsx +8 -3
  10. package/src/app/routes/_authenticated/_payment-methods/payment-methods_.$id.tsx +1 -1
  11. package/src/app/routes/_authenticated/_products/products_.$id.tsx +1 -1
  12. package/src/app/routes/_authenticated/_promotions/promotions_.$id.tsx +1 -1
  13. package/src/lib/components/data-input/money-input.tsx +2 -9
  14. package/src/lib/components/data-table/data-table.tsx +1 -1
  15. package/src/lib/components/shared/form-field-wrapper.tsx +22 -13
  16. package/src/lib/components/shared/paginated-list-data-table.tsx +1 -1
  17. package/src/lib/components/ui/accordion.tsx +50 -45
  18. package/src/lib/components/ui/alert-dialog.tsx +122 -93
  19. package/src/lib/components/ui/alert.tsx +54 -48
  20. package/src/lib/components/ui/aspect-ratio.tsx +9 -0
  21. package/src/lib/components/ui/avatar.tsx +53 -0
  22. package/src/lib/components/ui/badge.tsx +37 -29
  23. package/src/lib/components/ui/breadcrumb.tsx +89 -82
  24. package/src/lib/components/ui/button.tsx +52 -51
  25. package/src/lib/components/ui/calendar.tsx +196 -435
  26. package/src/lib/components/ui/card.tsx +78 -33
  27. package/src/lib/components/ui/carousel.tsx +241 -0
  28. package/src/lib/components/ui/chart.tsx +351 -0
  29. package/src/lib/components/ui/checkbox.tsx +28 -23
  30. package/src/lib/components/ui/collapsible.tsx +0 -2
  31. package/src/lib/components/ui/command.tsx +159 -114
  32. package/src/lib/components/ui/context-menu.tsx +252 -0
  33. package/src/lib/components/ui/dialog.tsx +115 -90
  34. package/src/lib/components/ui/drawer.tsx +133 -0
  35. package/src/lib/components/ui/dropdown-menu.tsx +207 -170
  36. package/src/lib/components/ui/form.tsx +138 -114
  37. package/src/lib/components/ui/hover-card.tsx +32 -26
  38. package/src/lib/components/ui/input-otp.tsx +77 -0
  39. package/src/lib/components/ui/input.tsx +17 -15
  40. package/src/lib/components/ui/label.tsx +19 -16
  41. package/src/lib/components/ui/menubar.tsx +274 -0
  42. package/src/lib/components/ui/navigation-menu.tsx +168 -0
  43. package/src/lib/components/ui/pagination.tsx +108 -87
  44. package/src/lib/components/ui/popover.tsx +36 -28
  45. package/src/lib/components/ui/progress.tsx +29 -0
  46. package/src/lib/components/ui/radio-group.tsx +45 -0
  47. package/src/lib/components/ui/resizable.tsx +54 -0
  48. package/src/lib/components/ui/scroll-area.tsx +48 -40
  49. package/src/lib/components/ui/select.tsx +151 -129
  50. package/src/lib/components/ui/separator.tsx +22 -20
  51. package/src/lib/components/ui/sheet.tsx +110 -91
  52. package/src/lib/components/ui/sidebar.tsx +652 -622
  53. package/src/lib/components/ui/skeleton.tsx +10 -10
  54. package/src/lib/components/ui/slider.tsx +63 -0
  55. package/src/lib/components/ui/sonner.tsx +7 -11
  56. package/src/lib/components/ui/switch.tsx +27 -22
  57. package/src/lib/components/ui/table.tsx +96 -64
  58. package/src/lib/components/ui/tabs.tsx +56 -38
  59. package/src/lib/components/ui/textarea.tsx +14 -14
  60. package/src/lib/components/ui/toggle-group.tsx +73 -0
  61. package/src/lib/components/ui/toggle.tsx +45 -0
  62. package/src/lib/components/ui/tooltip.tsx +45 -37
  63. package/src/lib/framework/component-registry/component-registry.tsx +5 -3
  64. package/src/lib/framework/page/detail-page.tsx +28 -17
  65. package/src/lib/framework/page/list-page.tsx +1 -1
  66. package/src/lib/index.ts +5 -6
  67. package/vite/vite-plugin-vendure-dashboard.ts +1 -1
@@ -1,26 +1,28 @@
1
- import * as SeparatorPrimitive from '@radix-ui/react-separator';
2
- import * as React from 'react';
1
+ "use client"
3
2
 
4
- import { cn } from '@/vdb/lib/utils.js';
3
+ import * as React from "react"
4
+ import * as SeparatorPrimitive from "@radix-ui/react-separator"
5
+
6
+ import { cn } from "@/vdb/lib/utils"
5
7
 
6
8
  function Separator({
7
- className,
8
- orientation = 'horizontal',
9
- decorative = true,
10
- ...props
9
+ className,
10
+ orientation = "horizontal",
11
+ decorative = true,
12
+ ...props
11
13
  }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
12
- return (
13
- <SeparatorPrimitive.Root
14
- data-slot="separator-root"
15
- decorative={decorative}
16
- orientation={orientation}
17
- className={cn(
18
- 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',
19
- className,
20
- )}
21
- {...props}
22
- />
23
- );
14
+ return (
15
+ <SeparatorPrimitive.Root
16
+ data-slot="separator"
17
+ decorative={decorative}
18
+ orientation={orientation}
19
+ className={cn(
20
+ "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
21
+ className
22
+ )}
23
+ {...props}
24
+ />
25
+ )
24
26
  }
25
27
 
26
- export { Separator };
28
+ export { Separator }
@@ -1,118 +1,137 @@
1
- 'use client';
1
+ import * as React from "react"
2
+ import * as SheetPrimitive from "@radix-ui/react-dialog"
3
+ import { XIcon } from "lucide-react"
2
4
 
3
- import * as SheetPrimitive from '@radix-ui/react-dialog';
4
- import { XIcon } from 'lucide-react';
5
- import * as React from 'react';
6
-
7
- import { cn } from '@/vdb/lib/utils.js';
5
+ import { cn } from "@/vdb/lib/utils"
8
6
 
9
7
  function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
10
- return <SheetPrimitive.Root data-slot="sheet" {...props} />;
8
+ return <SheetPrimitive.Root data-slot="sheet" {...props} />
11
9
  }
12
10
 
13
- function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
14
- return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />;
11
+ function SheetTrigger({
12
+ ...props
13
+ }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
14
+ return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />
15
15
  }
16
16
 
17
- function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>) {
18
- return <SheetPrimitive.Close data-slot="sheet-close" {...props} />;
17
+ function SheetClose({
18
+ ...props
19
+ }: React.ComponentProps<typeof SheetPrimitive.Close>) {
20
+ return <SheetPrimitive.Close data-slot="sheet-close" {...props} />
19
21
  }
20
22
 
21
- function SheetPortal({ ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>) {
22
- return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />;
23
+ function SheetPortal({
24
+ ...props
25
+ }: React.ComponentProps<typeof SheetPrimitive.Portal>) {
26
+ return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />
23
27
  }
24
28
 
25
- function SheetOverlay({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {
26
- return (
27
- <SheetPrimitive.Overlay
28
- data-slot="sheet-overlay"
29
- className={cn(
30
- '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/80',
31
- className,
32
- )}
33
- {...props}
34
- />
35
- );
29
+ function SheetOverlay({
30
+ className,
31
+ ...props
32
+ }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {
33
+ return (
34
+ <SheetPrimitive.Overlay
35
+ data-slot="sheet-overlay"
36
+ className={cn(
37
+ "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",
38
+ className
39
+ )}
40
+ {...props}
41
+ />
42
+ )
36
43
  }
37
44
 
38
45
  function SheetContent({
39
- className,
40
- children,
41
- side = 'right',
42
- ...props
46
+ className,
47
+ children,
48
+ side = "right",
49
+ ...props
43
50
  }: React.ComponentProps<typeof SheetPrimitive.Content> & {
44
- side?: 'top' | 'right' | 'bottom' | 'left';
51
+ side?: "top" | "right" | "bottom" | "left"
45
52
  }) {
46
- return (
47
- <SheetPortal>
48
- <SheetOverlay />
49
- <SheetPrimitive.Content
50
- data-slot="sheet-content"
51
- className={cn(
52
- 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',
53
- side === 'right' &&
54
- 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',
55
- side === 'left' &&
56
- 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',
57
- side === 'top' &&
58
- 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b',
59
- side === 'bottom' &&
60
- 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t',
61
- className,
62
- )}
63
- {...props}
64
- >
65
- {children}
66
- <SheetPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary 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">
67
- <XIcon className="size-4" />
68
- <span className="sr-only">Close</span>
69
- </SheetPrimitive.Close>
70
- </SheetPrimitive.Content>
71
- </SheetPortal>
72
- );
53
+ return (
54
+ <SheetPortal>
55
+ <SheetOverlay />
56
+ <SheetPrimitive.Content
57
+ data-slot="sheet-content"
58
+ className={cn(
59
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
60
+ side === "right" &&
61
+ "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
62
+ side === "left" &&
63
+ "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
64
+ side === "top" &&
65
+ "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
66
+ side === "bottom" &&
67
+ "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
68
+ className
69
+ )}
70
+ {...props}
71
+ >
72
+ {children}
73
+ <SheetPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary 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">
74
+ <XIcon className="size-4" />
75
+ <span className="sr-only">Close</span>
76
+ </SheetPrimitive.Close>
77
+ </SheetPrimitive.Content>
78
+ </SheetPortal>
79
+ )
73
80
  }
74
81
 
75
- function SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {
76
- return <div data-slot="sheet-header" className={cn('flex flex-col gap-1.5 p-4', className)} {...props} />;
82
+ function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
83
+ return (
84
+ <div
85
+ data-slot="sheet-header"
86
+ className={cn("flex flex-col gap-1.5 p-4", className)}
87
+ {...props}
88
+ />
89
+ )
77
90
  }
78
91
 
79
- function SheetFooter({ className, ...props }: React.ComponentProps<'div'>) {
80
- return (
81
- <div
82
- data-slot="sheet-footer"
83
- className={cn('mt-auto flex flex-col gap-2 p-4', className)}
84
- {...props}
85
- />
86
- );
92
+ function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
93
+ return (
94
+ <div
95
+ data-slot="sheet-footer"
96
+ className={cn("mt-auto flex flex-col gap-2 p-4", className)}
97
+ {...props}
98
+ />
99
+ )
87
100
  }
88
101
 
89
- function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>) {
90
- return (
91
- <SheetPrimitive.Title
92
- data-slot="sheet-title"
93
- className={cn('text-foreground font-semibold tracking-tight', className)}
94
- {...props}
95
- />
96
- );
102
+ function SheetTitle({
103
+ className,
104
+ ...props
105
+ }: React.ComponentProps<typeof SheetPrimitive.Title>) {
106
+ return (
107
+ <SheetPrimitive.Title
108
+ data-slot="sheet-title"
109
+ className={cn("text-foreground font-semibold", className)}
110
+ {...props}
111
+ />
112
+ )
97
113
  }
98
114
 
99
- function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>) {
100
- return (
101
- <SheetPrimitive.Description
102
- data-slot="sheet-description"
103
- className={cn('text-muted-foreground text-sm', className)}
104
- {...props}
105
- />
106
- );
115
+ function SheetDescription({
116
+ className,
117
+ ...props
118
+ }: React.ComponentProps<typeof SheetPrimitive.Description>) {
119
+ return (
120
+ <SheetPrimitive.Description
121
+ data-slot="sheet-description"
122
+ className={cn("text-muted-foreground text-sm", className)}
123
+ {...props}
124
+ />
125
+ )
107
126
  }
108
127
 
109
128
  export {
110
- Sheet,
111
- SheetClose,
112
- SheetContent,
113
- SheetDescription,
114
- SheetFooter,
115
- SheetHeader,
116
- SheetTitle,
117
- SheetTrigger,
118
- };
129
+ Sheet,
130
+ SheetTrigger,
131
+ SheetClose,
132
+ SheetContent,
133
+ SheetHeader,
134
+ SheetFooter,
135
+ SheetTitle,
136
+ SheetDescription,
137
+ }