@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
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vendure/dashboard",
3
3
  "private": false,
4
- "version": "3.3.6-master-202507030835",
4
+ "version": "3.3.6-master-202507031258",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
@@ -54,32 +54,23 @@
54
54
  "@lingui/core": "^5.2.0",
55
55
  "@lingui/react": "^5.2.0",
56
56
  "@lingui/vite-plugin": "^5.2.0",
57
- "@radix-ui/react-accordion": "^1.2.11",
58
- "@radix-ui/react-alert-dialog": "^1.1.14",
59
- "@radix-ui/react-aspect-ratio": "^1.1.7",
60
- "@radix-ui/react-avatar": "^1.1.10",
61
- "@radix-ui/react-checkbox": "^1.3.2",
62
- "@radix-ui/react-collapsible": "^1.1.11",
63
- "@radix-ui/react-context-menu": "^2.2.15",
64
- "@radix-ui/react-dialog": "^1.1.14",
65
- "@radix-ui/react-dropdown-menu": "^2.1.15",
66
- "@radix-ui/react-hover-card": "^1.1.14",
67
- "@radix-ui/react-label": "^2.1.7",
68
- "@radix-ui/react-menubar": "^1.1.15",
69
- "@radix-ui/react-navigation-menu": "^1.2.13",
70
- "@radix-ui/react-popover": "^1.1.14",
71
- "@radix-ui/react-progress": "^1.1.7",
72
- "@radix-ui/react-radio-group": "^1.3.7",
73
- "@radix-ui/react-scroll-area": "^1.2.9",
57
+ "@radix-ui/react-accordion": "^1.2.3",
58
+ "@radix-ui/react-alert-dialog": "^1.1.6",
59
+ "@radix-ui/react-avatar": "^1.1.3",
60
+ "@radix-ui/react-checkbox": "^1.1.4",
61
+ "@radix-ui/react-collapsible": "^1.1.3",
62
+ "@radix-ui/react-dialog": "^1.1.6",
63
+ "@radix-ui/react-dropdown-menu": "^2.1.6",
64
+ "@radix-ui/react-hover-card": "^1.1.6",
65
+ "@radix-ui/react-label": "^2.1.2",
66
+ "@radix-ui/react-popover": "^1.1.6",
67
+ "@radix-ui/react-scroll-area": "^1.2.3",
74
68
  "@radix-ui/react-select": "^2.2.5",
75
- "@radix-ui/react-separator": "^1.1.7",
76
- "@radix-ui/react-slider": "^1.3.5",
77
- "@radix-ui/react-slot": "^1.2.3",
78
- "@radix-ui/react-switch": "^1.2.5",
79
- "@radix-ui/react-tabs": "^1.1.12",
80
- "@radix-ui/react-toggle": "^1.1.9",
81
- "@radix-ui/react-toggle-group": "^1.1.10",
82
- "@radix-ui/react-tooltip": "^1.2.7",
69
+ "@radix-ui/react-separator": "^1.1.2",
70
+ "@radix-ui/react-slot": "^1.1.2",
71
+ "@radix-ui/react-switch": "^1.1.3",
72
+ "@radix-ui/react-tabs": "^1.1.3",
73
+ "@radix-ui/react-tooltip": "^1.1.8",
83
74
  "@tailwindcss/vite": "^4.1.5",
84
75
  "@tanstack/eslint-plugin-query": "^5.66.1",
85
76
  "@tanstack/react-query": "^5.66.7",
@@ -95,39 +86,35 @@
95
86
  "@types/react-dom": "^19.0.4",
96
87
  "@types/react-grid-layout": "^1.3.5",
97
88
  "@uidotdev/usehooks": "^2.4.1",
98
- "@vendure/common": "^3.3.6-master-202507030835",
99
- "@vendure/core": "^3.3.6-master-202507030835",
89
+ "@vendure/common": "^3.3.6-master-202507031258",
90
+ "@vendure/core": "^3.3.6-master-202507031258",
100
91
  "@vitejs/plugin-react": "^4.3.4",
101
92
  "awesome-graphql-client": "^2.1.0",
102
93
  "class-variance-authority": "^0.7.1",
103
94
  "clsx": "^2.1.1",
104
- "cmdk": "^1.1.1",
95
+ "cmdk": "^1.0.0",
105
96
  "date-fns": "^3.6.0",
106
- "embla-carousel-react": "^8.6.0",
107
97
  "gql.tada": "^1.8.10",
108
98
  "graphql": "^16.10.0",
109
- "input-otp": "^1.4.2",
110
99
  "json-edit-react": "^1.23.1",
111
100
  "lucide-react": "^0.475.0",
112
101
  "motion": "^12.6.2",
113
102
  "next-themes": "^0.4.6",
114
103
  "react": "^19.0.0",
115
- "react-day-picker": "^9.7.0",
104
+ "react-day-picker": "^9.6.7",
116
105
  "react-dom": "^19.0.0",
117
106
  "react-dropzone": "^14.3.8",
118
107
  "react-grid-layout": "^1.5.1",
119
- "react-hook-form": "^7.59.0",
120
- "react-resizable-panels": "^3.0.3",
121
- "recharts": "^2.15.4",
122
- "sonner": "^2.0.5",
108
+ "react-hook-form": "^7.54.2",
109
+ "recharts": "^2.15.1",
110
+ "sonner": "^2.0.1",
123
111
  "tailwind-merge": "^3.2.0",
124
112
  "tailwindcss": "^4.1.5",
125
113
  "tailwindcss-animate": "^1.0.7",
126
114
  "tsconfig-paths": "^4.2.0",
127
115
  "tw-animate-css": "^1.2.9",
128
- "vaul": "^1.1.2",
129
116
  "vite": "^6.3.5",
130
- "zod": "^3.25.71"
117
+ "zod": "^3.24.2"
131
118
  },
132
119
  "devDependencies": {
133
120
  "@eslint/js": "^9.19.0",
@@ -143,5 +130,5 @@
143
130
  "lightningcss-linux-arm64-musl": "^1.29.3",
144
131
  "lightningcss-linux-x64-musl": "^1.29.1"
145
132
  },
146
- "gitHead": "d79942fa16b812acfb665834088b0416dfde4670"
133
+ "gitHead": "6033754f1547a7a1f9c49b1b97c645eda8405973"
147
134
  }
@@ -3,8 +3,8 @@ import { useDebounce } from '@uidotdev/usehooks';
3
3
  import { useRef, useState } from 'react';
4
4
  import { toast } from 'sonner';
5
5
 
6
- import { Alert, AlertDescription } from '@/components/ui/alert.js';
7
- import { Button } from '@/components/ui/button.js';
6
+ import { Alert, AlertDescription } from '@/vdb/components/ui/alert.js';
7
+ import { Button } from '@/vdb/components/ui/button.js';
8
8
  import {
9
9
  Dialog,
10
10
  DialogContent,
@@ -12,11 +12,11 @@ import {
12
12
  DialogFooter,
13
13
  DialogHeader,
14
14
  DialogTitle,
15
- } from '@/components/ui/dialog.js';
16
- import { Input } from '@/components/ui/input.js';
17
- import { ScrollArea } from '@/components/ui/scroll-area.js';
18
- import { api } from '@/graphql/api.js';
19
- import { Trans, useLingui } from '@/lib/trans.js';
15
+ } from '@/vdb/components/ui/dialog.js';
16
+ import { Input } from '@/vdb/components/ui/input.js';
17
+ import { ScrollArea } from '@/vdb/components/ui/scroll-area.js';
18
+ import { api } from '@/vdb/graphql/api.js';
19
+ import { Trans, useLingui } from '@/vdb/lib/trans.js';
20
20
  import { ChevronRight, Folder, FolderOpen, Search } from 'lucide-react';
21
21
 
22
22
  import { collectionListForMoveDocument, moveCollectionDocument } from '../collections.graphql.js';
@@ -11,7 +11,6 @@ import {
11
11
  DialogTrigger,
12
12
  } from '@/vdb/components/ui/dialog.js';
13
13
  import { api } from '@/vdb/graphql/api.js';
14
- import { Button } from '@/vdb/index.js';
15
14
  import { Trans, useLingui } from '@/vdb/lib/trans.js';
16
15
  import { useMutation } from '@tanstack/react-query';
17
16
  import { EditIcon, TrashIcon } from 'lucide-react';
@@ -121,10 +120,8 @@ export function CustomerAddressCard({
121
120
  <div className="flex gap-4 mt-3 pt-3 border-t border-border">
122
121
  {editable && (
123
122
  <Dialog open={open} onOpenChange={setOpen}>
124
- <DialogTrigger asChild>
125
- <Button size="icon" variant="secondary">
126
- <EditIcon />
127
- </Button>
123
+ <DialogTrigger>
124
+ <EditIcon className="w-4 h-4" />
128
125
  </DialogTrigger>
129
126
  <DialogContent>
130
127
  <DialogHeader>
@@ -148,9 +145,7 @@ export function CustomerAddressCard({
148
145
  onDelete?.();
149
146
  }}
150
147
  >
151
- <Button size="icon" variant="destructive">
152
- <TrashIcon />
153
- </Button>
148
+ <TrashIcon className="w-4 h-4 text-destructive" />
154
149
  </ConfirmationDialog>
155
150
  )}
156
151
  </div>
@@ -21,7 +21,10 @@ interface DataTableBulkActionsProps<TData> {
21
21
  bulkActions: BulkAction[];
22
22
  }
23
23
 
24
- export function DataTableBulkActions<TData>({ table, bulkActions }: DataTableBulkActionsProps<TData>) {
24
+ export function DataTableBulkActions<TData>({
25
+ table,
26
+ bulkActions,
27
+ }: Readonly<DataTableBulkActionsProps<TData>>) {
25
28
  const { pageId } = usePage();
26
29
  const { blockId } = usePageBlock();
27
30
 
@@ -57,13 +60,16 @@ export function DataTableBulkActions<TData>({ table, bulkActions }: DataTableBul
57
60
  allBulkActions.sort((a, b) => (a.order ?? 10_000) - (b.order ?? 10_000));
58
61
 
59
62
  return (
60
- <div className="flex items-center gap-2 px-2 py-1 bg-muted/50 rounded-md border">
63
+ <div
64
+ className="flex items-center gap-4 px-8 py-2 animate-in fade-in duration-200 absolute bottom-10 left-1/2 transform -translate-x-1/2 bg-white shadow-2xl rounded-md border"
65
+ style={{ height: 'auto', maxHeight: '60px' }}
66
+ >
61
67
  <span className="text-sm text-muted-foreground">
62
68
  <Trans>{selection.length} selected</Trans>
63
69
  </span>
64
70
  <DropdownMenu>
65
71
  <DropdownMenuTrigger asChild>
66
- <Button variant="outline" size="sm" className="h-8">
72
+ <Button variant="outline" size="sm" className="h-8 shadow-none">
67
73
  <Trans>With selected...</Trans>
68
74
  <ChevronDown className="ml-2 h-4 w-4" />
69
75
  </Button>
@@ -207,8 +207,8 @@ export function DataTable<TData>({
207
207
  {onRefresh && <RefreshButton onRefresh={onRefresh} isLoading={isLoading ?? false} />}
208
208
  </div>
209
209
  </div>
210
- <DataTableBulkActions bulkActions={bulkActions ?? []} table={table} />
211
- <div className="rounded-md border my-2">
210
+
211
+ <div className="rounded-md border my-2 relative">
212
212
  <Table>
213
213
  <TableHeader>
214
214
  {table.getHeaderGroups().map(headerGroup => (
@@ -268,6 +268,7 @@ export function DataTable<TData>({
268
268
  )}
269
269
  </TableBody>
270
270
  </Table>
271
+ <DataTableBulkActions bulkActions={bulkActions ?? []} table={table} />
271
272
  </div>
272
273
  <DataTablePagination table={table} />
273
274
  </>
@@ -49,6 +49,7 @@ export const TranslatableFormFieldWrapper = <
49
49
  label,
50
50
  description,
51
51
  render,
52
+ renderFormControl,
52
53
  ...props
53
54
  }: TranslatableFormFieldWrapperProps<TFieldValues>) => {
54
55
  return (
@@ -58,7 +59,7 @@ export const TranslatableFormFieldWrapper = <
58
59
  render={renderArgs => (
59
60
  <FormItem>
60
61
  {label && <FormLabel>{label}</FormLabel>}
61
- <FormControl>{render(renderArgs)}</FormControl>
62
+ {renderFormControl ? <FormControl>{render(renderArgs)}</FormControl> : render(renderArgs)}
62
63
  {description && <FormDescription>{description}</FormDescription>}
63
64
  <FormMessage />
64
65
  </FormItem>
@@ -1,64 +1,59 @@
1
- import * as React from "react"
2
- import * as AccordionPrimitive from "@radix-ui/react-accordion"
3
- import { ChevronDownIcon } from "lucide-react"
1
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
2
+ import { ChevronDownIcon } 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 Accordion({
8
- ...props
9
- }: React.ComponentProps<typeof AccordionPrimitive.Root>) {
10
- return <AccordionPrimitive.Root data-slot="accordion" {...props} />
7
+ function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>) {
8
+ return <AccordionPrimitive.Root data-slot="accordion" {...props} />;
11
9
  }
12
10
 
13
- function AccordionItem({
14
- className,
15
- ...props
16
- }: React.ComponentProps<typeof AccordionPrimitive.Item>) {
17
- return (
18
- <AccordionPrimitive.Item
19
- data-slot="accordion-item"
20
- className={cn("border-b last:border-b-0", className)}
21
- {...props}
22
- />
23
- )
11
+ function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>) {
12
+ return (
13
+ <AccordionPrimitive.Item
14
+ data-slot="accordion-item"
15
+ className={cn('border-b last:border-b-0', className)}
16
+ {...props}
17
+ />
18
+ );
24
19
  }
25
20
 
26
21
  function AccordionTrigger({
27
- className,
28
- children,
29
- ...props
22
+ className,
23
+ children,
24
+ ...props
30
25
  }: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
31
- return (
32
- <AccordionPrimitive.Header className="flex">
33
- <AccordionPrimitive.Trigger
34
- data-slot="accordion-trigger"
35
- className={cn(
36
- "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
37
- className
38
- )}
39
- {...props}
40
- >
41
- {children}
42
- <ChevronDownIcon className="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" />
43
- </AccordionPrimitive.Trigger>
44
- </AccordionPrimitive.Header>
45
- )
26
+ return (
27
+ <AccordionPrimitive.Header className="flex">
28
+ <AccordionPrimitive.Trigger
29
+ data-slot="accordion-trigger"
30
+ className={cn(
31
+ 'focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180',
32
+ className,
33
+ )}
34
+ {...props}
35
+ >
36
+ {children}
37
+ <ChevronDownIcon className="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" />
38
+ </AccordionPrimitive.Trigger>
39
+ </AccordionPrimitive.Header>
40
+ );
46
41
  }
47
42
 
48
43
  function AccordionContent({
49
- className,
50
- children,
51
- ...props
44
+ className,
45
+ children,
46
+ ...props
52
47
  }: React.ComponentProps<typeof AccordionPrimitive.Content>) {
53
- return (
54
- <AccordionPrimitive.Content
55
- data-slot="accordion-content"
56
- className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
57
- {...props}
58
- >
59
- <div className={cn("pt-0 pb-4", className)}>{children}</div>
60
- </AccordionPrimitive.Content>
61
- )
48
+ return (
49
+ <AccordionPrimitive.Content
50
+ data-slot="accordion-content"
51
+ className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
52
+ {...props}
53
+ >
54
+ <div className={cn('pt-0 pb-4', className)}>{children}</div>
55
+ </AccordionPrimitive.Content>
56
+ );
62
57
  }
63
58
 
64
- export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
59
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
@@ -1,157 +1,128 @@
1
- "use client"
1
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
2
+ import * as React from 'react';
2
3
 
3
- import * as React from "react"
4
- import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
4
+ import { buttonVariants } from '@/vdb/components/ui/button.js';
5
+ import { cn } from '@/vdb/lib/utils.js';
5
6
 
6
- import { cn } from "@/vdb/lib/utils"
7
- import { buttonVariants } from "@/vdb/components/ui/button"
8
-
9
- function AlertDialog({
10
- ...props
11
- }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
12
- return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
7
+ function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
8
+ return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
13
9
  }
14
10
 
15
- function AlertDialogTrigger({
16
- ...props
17
- }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
18
- return (
19
- <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
20
- )
11
+ function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
12
+ return <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />;
21
13
  }
22
14
 
23
- function AlertDialogPortal({
24
- ...props
25
- }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
26
- return (
27
- <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
28
- )
15
+ function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
16
+ return <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />;
29
17
  }
30
18
 
31
19
  function AlertDialogOverlay({
32
- className,
33
- ...props
20
+ className,
21
+ ...props
34
22
  }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {
35
- return (
36
- <AlertDialogPrimitive.Overlay
37
- data-slot="alert-dialog-overlay"
38
- className={cn(
39
- "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",
40
- className
41
- )}
42
- {...props}
43
- />
44
- )
23
+ return (
24
+ <AlertDialogPrimitive.Overlay
25
+ data-slot="alert-dialog-overlay"
26
+ className={cn(
27
+ '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',
28
+ className,
29
+ )}
30
+ {...props}
31
+ />
32
+ );
45
33
  }
46
34
 
47
35
  function AlertDialogContent({
48
- className,
49
- ...props
36
+ className,
37
+ ...props
50
38
  }: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {
51
- return (
52
- <AlertDialogPortal>
53
- <AlertDialogOverlay />
54
- <AlertDialogPrimitive.Content
55
- data-slot="alert-dialog-content"
56
- className={cn(
57
- "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",
58
- className
59
- )}
60
- {...props}
61
- />
62
- </AlertDialogPortal>
63
- )
39
+ return (
40
+ <AlertDialogPortal>
41
+ <AlertDialogOverlay />
42
+ <AlertDialogPrimitive.Content
43
+ data-slot="alert-dialog-content"
44
+ className={cn(
45
+ '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',
46
+ className,
47
+ )}
48
+ {...props}
49
+ />
50
+ </AlertDialogPortal>
51
+ );
64
52
  }
65
53
 
66
- function AlertDialogHeader({
67
- className,
68
- ...props
69
- }: React.ComponentProps<"div">) {
70
- return (
71
- <div
72
- data-slot="alert-dialog-header"
73
- className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
74
- {...props}
75
- />
76
- )
54
+ function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {
55
+ return (
56
+ <div
57
+ data-slot="alert-dialog-header"
58
+ className={cn('flex flex-col gap-2 text-center sm:text-left', className)}
59
+ {...props}
60
+ />
61
+ );
77
62
  }
78
63
 
79
- function AlertDialogFooter({
80
- className,
81
- ...props
82
- }: React.ComponentProps<"div">) {
83
- return (
84
- <div
85
- data-slot="alert-dialog-footer"
86
- className={cn(
87
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
88
- className
89
- )}
90
- {...props}
91
- />
92
- )
64
+ function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) {
65
+ return (
66
+ <div
67
+ data-slot="alert-dialog-footer"
68
+ className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)}
69
+ {...props}
70
+ />
71
+ );
93
72
  }
94
73
 
95
- function AlertDialogTitle({
96
- className,
97
- ...props
98
- }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
99
- return (
100
- <AlertDialogPrimitive.Title
101
- data-slot="alert-dialog-title"
102
- className={cn("text-lg font-semibold", className)}
103
- {...props}
104
- />
105
- )
74
+ function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
75
+ return (
76
+ <AlertDialogPrimitive.Title
77
+ data-slot="alert-dialog-title"
78
+ className={cn('text-lg font-semibold', className)}
79
+ {...props}
80
+ />
81
+ );
106
82
  }
107
83
 
108
84
  function AlertDialogDescription({
109
- className,
110
- ...props
85
+ className,
86
+ ...props
111
87
  }: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
112
- return (
113
- <AlertDialogPrimitive.Description
114
- data-slot="alert-dialog-description"
115
- className={cn("text-muted-foreground text-sm", className)}
116
- {...props}
117
- />
118
- )
88
+ return (
89
+ <AlertDialogPrimitive.Description
90
+ data-slot="alert-dialog-description"
91
+ className={cn('text-muted-foreground text-sm', className)}
92
+ {...props}
93
+ />
94
+ );
119
95
  }
120
96
 
121
97
  function AlertDialogAction({
122
- className,
123
- ...props
98
+ className,
99
+ ...props
124
100
  }: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {
125
- return (
126
- <AlertDialogPrimitive.Action
127
- className={cn(buttonVariants(), className)}
128
- {...props}
129
- />
130
- )
101
+ return <AlertDialogPrimitive.Action className={cn(buttonVariants(), className)} {...props} />;
131
102
  }
132
103
 
133
104
  function AlertDialogCancel({
134
- className,
135
- ...props
105
+ className,
106
+ ...props
136
107
  }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {
137
- return (
138
- <AlertDialogPrimitive.Cancel
139
- className={cn(buttonVariants({ variant: "outline" }), className)}
140
- {...props}
141
- />
142
- )
108
+ return (
109
+ <AlertDialogPrimitive.Cancel
110
+ className={cn(buttonVariants({ variant: 'outline' }), className)}
111
+ {...props}
112
+ />
113
+ );
143
114
  }
144
115
 
145
116
  export {
146
- AlertDialog,
147
- AlertDialogPortal,
148
- AlertDialogOverlay,
149
- AlertDialogTrigger,
150
- AlertDialogContent,
151
- AlertDialogHeader,
152
- AlertDialogFooter,
153
- AlertDialogTitle,
154
- AlertDialogDescription,
155
- AlertDialogAction,
156
- AlertDialogCancel,
157
- }
117
+ AlertDialog,
118
+ AlertDialogAction,
119
+ AlertDialogCancel,
120
+ AlertDialogContent,
121
+ AlertDialogDescription,
122
+ AlertDialogFooter,
123
+ AlertDialogHeader,
124
+ AlertDialogOverlay,
125
+ AlertDialogPortal,
126
+ AlertDialogTitle,
127
+ AlertDialogTrigger,
128
+ };