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

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 (53) hide show
  1. package/package.json +26 -39
  2. package/src/app/routes/_authenticated/_collections/components/move-collections-dialog.tsx +7 -7
  3. package/src/app/routes/_authenticated/_customers/components/customer-address-card.tsx +3 -8
  4. package/src/lib/components/data-table/data-table-bulk-actions.tsx +9 -3
  5. package/src/lib/components/data-table/data-table.tsx +3 -2
  6. package/src/lib/components/shared/translatable-form-field.tsx +2 -1
  7. package/src/lib/components/ui/accordion.tsx +45 -50
  8. package/src/lib/components/ui/alert-dialog.tsx +93 -122
  9. package/src/lib/components/ui/alert.tsx +48 -54
  10. package/src/lib/components/ui/badge.tsx +29 -37
  11. package/src/lib/components/ui/breadcrumb.tsx +82 -89
  12. package/src/lib/components/ui/button.tsx +51 -52
  13. package/src/lib/components/ui/calendar.tsx +435 -196
  14. package/src/lib/components/ui/card.tsx +33 -78
  15. package/src/lib/components/ui/checkbox.tsx +23 -28
  16. package/src/lib/components/ui/collapsible.tsx +2 -0
  17. package/src/lib/components/ui/command.tsx +114 -159
  18. package/src/lib/components/ui/dialog.tsx +90 -115
  19. package/src/lib/components/ui/dropdown-menu.tsx +170 -207
  20. package/src/lib/components/ui/form.tsx +114 -138
  21. package/src/lib/components/ui/hover-card.tsx +26 -32
  22. package/src/lib/components/ui/input.tsx +15 -17
  23. package/src/lib/components/ui/label.tsx +16 -19
  24. package/src/lib/components/ui/pagination.tsx +87 -108
  25. package/src/lib/components/ui/popover.tsx +28 -36
  26. package/src/lib/components/ui/scroll-area.tsx +40 -48
  27. package/src/lib/components/ui/separator.tsx +20 -22
  28. package/src/lib/components/ui/sheet.tsx +91 -110
  29. package/src/lib/components/ui/sidebar.tsx +622 -652
  30. package/src/lib/components/ui/skeleton.tsx +10 -10
  31. package/src/lib/components/ui/sonner.tsx +11 -7
  32. package/src/lib/components/ui/switch.tsx +22 -27
  33. package/src/lib/components/ui/table.tsx +64 -96
  34. package/src/lib/components/ui/tabs.tsx +38 -56
  35. package/src/lib/components/ui/textarea.tsx +14 -14
  36. package/src/lib/components/ui/tooltip.tsx +37 -45
  37. package/src/lib/framework/page/detail-page.tsx +26 -20
  38. package/src/lib/graphql/graphql-env.d.ts +1 -1
  39. package/src/lib/components/ui/aspect-ratio.tsx +0 -9
  40. package/src/lib/components/ui/avatar.tsx +0 -53
  41. package/src/lib/components/ui/carousel.tsx +0 -241
  42. package/src/lib/components/ui/chart.tsx +0 -351
  43. package/src/lib/components/ui/context-menu.tsx +0 -252
  44. package/src/lib/components/ui/drawer.tsx +0 -133
  45. package/src/lib/components/ui/input-otp.tsx +0 -77
  46. package/src/lib/components/ui/menubar.tsx +0 -274
  47. package/src/lib/components/ui/navigation-menu.tsx +0 -168
  48. package/src/lib/components/ui/progress.tsx +0 -29
  49. package/src/lib/components/ui/radio-group.tsx +0 -45
  50. package/src/lib/components/ui/resizable.tsx +0 -54
  51. package/src/lib/components/ui/slider.tsx +0 -63
  52. package/src/lib/components/ui/toggle-group.tsx +0 -73
  53. package/src/lib/components/ui/toggle.tsx +0 -45
@@ -1,66 +1,60 @@
1
- import * as React from "react"
2
- import { cva, type VariantProps } from "class-variance-authority"
1
+ import { cva, type VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
3
 
4
- import { cn } from "@/vdb/lib/utils"
4
+ import { cn } from '@/vdb/lib/utils.js';
5
5
 
6
6
  const alertVariants = cva(
7
- "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",
8
- {
9
- variants: {
10
- variant: {
11
- default: "bg-card text-card-foreground",
12
- destructive:
13
- "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
14
- },
7
+ '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',
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: 'bg-background text-foreground',
12
+ destructive:
13
+ 'border-destructive/50 text-destructive dark:text-destructive-foreground/80 dark:border-destructive [&>svg]:text-current dark:bg-destructive/50',
14
+ },
15
+ },
16
+ defaultVariants: {
17
+ variant: 'default',
18
+ },
15
19
  },
16
- defaultVariants: {
17
- variant: "default",
18
- },
19
- }
20
- )
20
+ );
21
21
 
22
22
  function Alert({
23
- className,
24
- variant,
25
- ...props
26
- }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
27
- return (
28
- <div
29
- data-slot="alert"
30
- role="alert"
31
- className={cn(alertVariants({ variant }), className)}
32
- {...props}
33
- />
34
- )
23
+ className,
24
+ variant,
25
+ ...props
26
+ }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {
27
+ return (
28
+ <div
29
+ data-slot="alert"
30
+ role="alert"
31
+ className={cn(alertVariants({ variant }), className)}
32
+ {...props}
33
+ />
34
+ );
35
35
  }
36
36
 
37
- function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
38
- return (
39
- <div
40
- data-slot="alert-title"
41
- className={cn(
42
- "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
43
- className
44
- )}
45
- {...props}
46
- />
47
- )
37
+ function AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {
38
+ return (
39
+ <div
40
+ data-slot="alert-title"
41
+ className={cn('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', className)}
42
+ {...props}
43
+ />
44
+ );
48
45
  }
49
46
 
50
- function AlertDescription({
51
- className,
52
- ...props
53
- }: React.ComponentProps<"div">) {
54
- return (
55
- <div
56
- data-slot="alert-description"
57
- className={cn(
58
- "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
59
- className
60
- )}
61
- {...props}
62
- />
63
- )
47
+ function AlertDescription({ className, ...props }: React.ComponentProps<'div'>) {
48
+ return (
49
+ <div
50
+ data-slot="alert-description"
51
+ className={cn(
52
+ 'col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed',
53
+ className,
54
+ )}
55
+ {...props}
56
+ />
57
+ );
64
58
  }
65
59
 
66
- export { Alert, AlertTitle, AlertDescription }
60
+ export { Alert, AlertDescription, AlertTitle };
@@ -1,46 +1,38 @@
1
- import * as React from "react"
2
- import { Slot } from "@radix-ui/react-slot"
3
- import { cva, type VariantProps } from "class-variance-authority"
1
+ import { Slot } from '@radix-ui/react-slot';
2
+ import { cva, type VariantProps } from 'class-variance-authority';
3
+ import * as React from 'react';
4
4
 
5
- import { cn } from "@/vdb/lib/utils"
5
+ import { cn } from '@/vdb/lib/utils.js';
6
6
 
7
7
  const badgeVariants = cva(
8
- "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-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 transition-[color,box-shadow] overflow-hidden",
9
- {
10
- variants: {
11
- variant: {
12
- default:
13
- "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
14
- secondary:
15
- "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
16
- destructive:
17
- "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
18
- outline:
19
- "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
20
- },
8
+ 'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-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 transition-[color,box-shadow] overflow-auto',
9
+ {
10
+ variants: {
11
+ variant: {
12
+ default: 'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90',
13
+ secondary:
14
+ 'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',
15
+ destructive:
16
+ 'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40',
17
+ outline: 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',
18
+ success: 'border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90',
19
+ },
20
+ },
21
+ defaultVariants: {
22
+ variant: 'default',
23
+ },
21
24
  },
22
- defaultVariants: {
23
- variant: "default",
24
- },
25
- }
26
- )
25
+ );
27
26
 
28
27
  function Badge({
29
- className,
30
- variant,
31
- asChild = false,
32
- ...props
33
- }: React.ComponentProps<"span"> &
34
- VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
35
- const Comp = asChild ? Slot : "span"
28
+ className,
29
+ variant,
30
+ asChild = false,
31
+ ...props
32
+ }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
33
+ const Comp = asChild ? Slot : 'span';
36
34
 
37
- return (
38
- <Comp
39
- data-slot="badge"
40
- className={cn(badgeVariants({ variant }), className)}
41
- {...props}
42
- />
43
- )
35
+ return <Comp data-slot="badge" className={cn(badgeVariants({ variant }), className)} {...props} />;
44
36
  }
45
37
 
46
- export { Badge, badgeVariants }
38
+ export { Badge, badgeVariants };
@@ -1,109 +1,102 @@
1
- import * as React from "react"
2
- import { Slot } from "@radix-ui/react-slot"
3
- import { ChevronRight, MoreHorizontal } from "lucide-react"
1
+ import { Slot } from '@radix-ui/react-slot';
2
+ import { ChevronRight, MoreHorizontal } from 'lucide-react';
3
+ import * as React from 'react';
4
4
 
5
- import { cn } from "@/vdb/lib/utils"
5
+ import { cn } from '@/vdb/lib/utils.js';
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({
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
- )
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
+ );
81
77
  }
82
78
 
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
- )
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
+ );
99
92
  }
100
93
 
101
94
  export {
102
- Breadcrumb,
103
- BreadcrumbList,
104
- BreadcrumbItem,
105
- BreadcrumbLink,
106
- BreadcrumbPage,
107
- BreadcrumbSeparator,
108
- BreadcrumbEllipsis,
109
- }
95
+ Breadcrumb,
96
+ BreadcrumbEllipsis,
97
+ BreadcrumbItem,
98
+ BreadcrumbLink,
99
+ BreadcrumbList,
100
+ BreadcrumbPage,
101
+ BreadcrumbSeparator,
102
+ };
@@ -1,59 +1,58 @@
1
- import * as React from "react"
2
- import { Slot } from "@radix-ui/react-slot"
3
- import { cva, type VariantProps } from "class-variance-authority"
1
+ import { Slot } from '@radix-ui/react-slot';
2
+ import { cva, type VariantProps } from 'class-variance-authority';
3
+ import * as React from 'react';
4
4
 
5
- import { cn } from "@/vdb/lib/utils"
5
+ import { cn } from '@/vdb/lib/utils.js';
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-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
- },
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
+ },
30
34
  },
31
- defaultVariants: {
32
- variant: "default",
33
- size: "default",
34
- },
35
- }
36
- )
37
-
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"
35
+ );
49
36
 
50
- return (
51
- <Comp
52
- data-slot="button"
53
- className={cn(buttonVariants({ variant, size, className }))}
54
- {...props}
55
- />
56
- )
37
+ export interface ButtonProps
38
+ extends React.ButtonHTMLAttributes<HTMLButtonElement>,
39
+ VariantProps<typeof buttonVariants> {
40
+ asChild?: boolean;
57
41
  }
58
42
 
59
- export { Button, buttonVariants }
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';
57
+
58
+ export { Button, buttonVariants };