@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,102 +1,109 @@
1
- import { Slot } from '@radix-ui/react-slot';
2
- import { ChevronRight, MoreHorizontal } from 'lucide-react';
3
- import * as React from 'react';
1
+ import * as React from "react"
2
+ import { Slot } from "@radix-ui/react-slot"
3
+ import { ChevronRight, MoreHorizontal } from "lucide-react"
4
4
 
5
- import { cn } from '@/vdb/lib/utils.js';
5
+ import { cn } from "@/vdb/lib/utils"
6
6
 
7
- function Breadcrumb({ ...props }: React.ComponentProps<'nav'>) {
8
- return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />;
7
+ function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
8
+ return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />
9
9
  }
10
10
 
11
- function BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>) {
12
- return (
13
- <ol
14
- data-slot="breadcrumb-list"
15
- className={cn(
16
- 'text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5',
17
- className,
18
- )}
19
- {...props}
20
- />
21
- );
11
+ function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
12
+ return (
13
+ <ol
14
+ data-slot="breadcrumb-list"
15
+ className={cn(
16
+ "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
17
+ className
18
+ )}
19
+ {...props}
20
+ />
21
+ )
22
22
  }
23
23
 
24
- function BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>) {
25
- return (
26
- <li
27
- data-slot="breadcrumb-item"
28
- className={cn('inline-flex items-center gap-1.5', className)}
29
- {...props}
30
- />
31
- );
24
+ function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
25
+ return (
26
+ <li
27
+ data-slot="breadcrumb-item"
28
+ className={cn("inline-flex items-center gap-1.5", className)}
29
+ {...props}
30
+ />
31
+ )
32
32
  }
33
33
 
34
34
  function BreadcrumbLink({
35
- asChild,
36
- className,
37
- ...props
38
- }: React.ComponentProps<'a'> & {
39
- asChild?: boolean;
35
+ asChild,
36
+ className,
37
+ ...props
38
+ }: React.ComponentProps<"a"> & {
39
+ asChild?: boolean
40
40
  }) {
41
- const Comp = asChild ? Slot : 'a';
41
+ const Comp = asChild ? Slot : "a"
42
42
 
43
- return (
44
- <Comp
45
- data-slot="breadcrumb-link"
46
- className={cn('hover:text-foreground transition-colors', className)}
47
- {...props}
48
- />
49
- );
43
+ return (
44
+ <Comp
45
+ data-slot="breadcrumb-link"
46
+ className={cn("hover:text-foreground transition-colors", className)}
47
+ {...props}
48
+ />
49
+ )
50
50
  }
51
51
 
52
- function BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>) {
53
- return (
54
- <span
55
- data-slot="breadcrumb-page"
56
- role="link"
57
- aria-disabled="true"
58
- aria-current="page"
59
- className={cn('text-foreground font-normal', className)}
60
- {...props}
61
- />
62
- );
52
+ function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
53
+ return (
54
+ <span
55
+ data-slot="breadcrumb-page"
56
+ role="link"
57
+ aria-disabled="true"
58
+ aria-current="page"
59
+ className={cn("text-foreground font-normal", className)}
60
+ {...props}
61
+ />
62
+ )
63
63
  }
64
64
 
65
- function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<'li'>) {
66
- return (
67
- <li
68
- data-slot="breadcrumb-separator"
69
- role="presentation"
70
- aria-hidden="true"
71
- className={cn('[&>svg]:size-3.5', className)}
72
- {...props}
73
- >
74
- {children ?? <ChevronRight />}
75
- </li>
76
- );
65
+ function BreadcrumbSeparator({
66
+ children,
67
+ className,
68
+ ...props
69
+ }: React.ComponentProps<"li">) {
70
+ return (
71
+ <li
72
+ data-slot="breadcrumb-separator"
73
+ role="presentation"
74
+ aria-hidden="true"
75
+ className={cn("[&>svg]:size-3.5", className)}
76
+ {...props}
77
+ >
78
+ {children ?? <ChevronRight />}
79
+ </li>
80
+ )
77
81
  }
78
82
 
79
- function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'>) {
80
- return (
81
- <span
82
- data-slot="breadcrumb-ellipsis"
83
- role="presentation"
84
- aria-hidden="true"
85
- className={cn('flex size-9 items-center justify-center', className)}
86
- {...props}
87
- >
88
- <MoreHorizontal className="size-4" />
89
- <span className="sr-only">More</span>
90
- </span>
91
- );
83
+ function BreadcrumbEllipsis({
84
+ className,
85
+ ...props
86
+ }: React.ComponentProps<"span">) {
87
+ return (
88
+ <span
89
+ data-slot="breadcrumb-ellipsis"
90
+ role="presentation"
91
+ aria-hidden="true"
92
+ className={cn("flex size-9 items-center justify-center", className)}
93
+ {...props}
94
+ >
95
+ <MoreHorizontal className="size-4" />
96
+ <span className="sr-only">More</span>
97
+ </span>
98
+ )
92
99
  }
93
100
 
94
101
  export {
95
- Breadcrumb,
96
- BreadcrumbEllipsis,
97
- BreadcrumbItem,
98
- BreadcrumbLink,
99
- BreadcrumbList,
100
- BreadcrumbPage,
101
- BreadcrumbSeparator,
102
- };
102
+ Breadcrumb,
103
+ BreadcrumbList,
104
+ BreadcrumbItem,
105
+ BreadcrumbLink,
106
+ BreadcrumbPage,
107
+ BreadcrumbSeparator,
108
+ BreadcrumbEllipsis,
109
+ }
@@ -1,58 +1,59 @@
1
- import { Slot } from '@radix-ui/react-slot';
2
- import { cva, type VariantProps } from 'class-variance-authority';
3
- import * as React from 'react';
1
+ import * as React from "react"
2
+ import { Slot } from "@radix-ui/react-slot"
3
+ import { cva, type VariantProps } from "class-variance-authority"
4
4
 
5
- import { cn } from '@/vdb/lib/utils.js';
5
+ import { cn } from "@/vdb/lib/utils"
6
6
 
7
7
  const buttonVariants = cva(
8
- 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
9
- {
10
- variants: {
11
- variant: {
12
- default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',
13
- destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
14
- outline:
15
- 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',
16
- secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
17
- ghost: 'hover:bg-accent hover:text-accent-foreground',
18
- link: 'text-primary underline-offset-4 hover:underline',
19
- },
20
- size: {
21
- default: 'h-9 px-4 py-2',
22
- sm: 'h-8 rounded-md px-3 text-xs',
23
- lg: 'h-10 rounded-md px-8',
24
- icon: 'h-9 w-9',
25
- xs: 'h-5 rounded-md px-2 text-xs',
26
- 'icon-sm': 'h-7 w-7 text-xs',
27
- 'icon-xs': 'h-5 w-5 text-xs',
28
- },
29
- },
30
- defaultVariants: {
31
- variant: 'default',
32
- size: 'default',
33
- },
8
+ "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",
9
+ {
10
+ variants: {
11
+ variant: {
12
+ default:
13
+ "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
14
+ destructive:
15
+ "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
16
+ outline:
17
+ "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
18
+ secondary:
19
+ "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
20
+ ghost:
21
+ "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
22
+ link: "text-primary underline-offset-4 hover:underline",
23
+ },
24
+ size: {
25
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
26
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
27
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
28
+ icon: "size-9",
29
+ },
34
30
  },
35
- );
31
+ defaultVariants: {
32
+ variant: "default",
33
+ size: "default",
34
+ },
35
+ }
36
+ )
36
37
 
37
- export interface ButtonProps
38
- extends React.ButtonHTMLAttributes<HTMLButtonElement>,
39
- VariantProps<typeof buttonVariants> {
40
- asChild?: boolean;
41
- }
38
+ function Button({
39
+ className,
40
+ variant,
41
+ size,
42
+ asChild = false,
43
+ ...props
44
+ }: React.ComponentProps<"button"> &
45
+ VariantProps<typeof buttonVariants> & {
46
+ asChild?: boolean
47
+ }) {
48
+ const Comp = asChild ? Slot : "button"
42
49
 
43
- const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
44
- ({ className, variant, size, asChild = false, ...props }, ref) => {
45
- const Comp = asChild ? Slot : 'button';
46
- return (
47
- <Comp
48
- className={cn(buttonVariants({ variant, size, className }))}
49
- type={props.type ?? 'button'}
50
- ref={ref}
51
- {...props}
52
- />
53
- );
54
- },
55
- );
56
- Button.displayName = 'Button';
50
+ return (
51
+ <Comp
52
+ data-slot="button"
53
+ className={cn(buttonVariants({ variant, size, className }))}
54
+ {...props}
55
+ />
56
+ )
57
+ }
57
58
 
58
- export { Button, buttonVariants };
59
+ export { Button, buttonVariants }