@vendure/dashboard 3.3.6-master-202507030835 → 3.3.6-master-202507031127
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/package.json +27 -40
- package/src/app/routes/_authenticated/_collections/components/move-collections-dialog.tsx +7 -7
- package/src/app/routes/_authenticated/_customers/components/customer-address-card.tsx +3 -8
- package/src/lib/components/data-table/data-table-bulk-actions.tsx +9 -3
- package/src/lib/components/data-table/data-table.tsx +3 -2
- package/src/lib/components/ui/accordion.tsx +45 -50
- package/src/lib/components/ui/alert-dialog.tsx +93 -122
- package/src/lib/components/ui/alert.tsx +48 -54
- package/src/lib/components/ui/badge.tsx +29 -37
- package/src/lib/components/ui/breadcrumb.tsx +82 -89
- package/src/lib/components/ui/button.tsx +51 -52
- package/src/lib/components/ui/calendar.tsx +435 -196
- package/src/lib/components/ui/card.tsx +33 -78
- package/src/lib/components/ui/checkbox.tsx +23 -28
- package/src/lib/components/ui/collapsible.tsx +2 -0
- package/src/lib/components/ui/command.tsx +114 -159
- package/src/lib/components/ui/dialog.tsx +90 -115
- package/src/lib/components/ui/dropdown-menu.tsx +170 -207
- package/src/lib/components/ui/form.tsx +114 -138
- package/src/lib/components/ui/hover-card.tsx +26 -32
- package/src/lib/components/ui/input.tsx +15 -17
- package/src/lib/components/ui/label.tsx +16 -19
- package/src/lib/components/ui/pagination.tsx +87 -108
- package/src/lib/components/ui/popover.tsx +28 -36
- package/src/lib/components/ui/scroll-area.tsx +40 -48
- package/src/lib/components/ui/select.tsx +129 -151
- package/src/lib/components/ui/separator.tsx +20 -22
- package/src/lib/components/ui/sheet.tsx +91 -110
- package/src/lib/components/ui/sidebar.tsx +622 -652
- package/src/lib/components/ui/skeleton.tsx +10 -10
- package/src/lib/components/ui/sonner.tsx +11 -7
- package/src/lib/components/ui/switch.tsx +22 -27
- package/src/lib/components/ui/table.tsx +64 -96
- package/src/lib/components/ui/tabs.tsx +38 -56
- package/src/lib/components/ui/textarea.tsx +14 -14
- package/src/lib/components/ui/tooltip.tsx +37 -45
- package/src/lib/components/ui/aspect-ratio.tsx +0 -9
- package/src/lib/components/ui/avatar.tsx +0 -53
- package/src/lib/components/ui/carousel.tsx +0 -241
- package/src/lib/components/ui/chart.tsx +0 -351
- package/src/lib/components/ui/context-menu.tsx +0 -252
- package/src/lib/components/ui/drawer.tsx +0 -133
- package/src/lib/components/ui/input-otp.tsx +0 -77
- package/src/lib/components/ui/menubar.tsx +0 -274
- package/src/lib/components/ui/navigation-menu.tsx +0 -168
- package/src/lib/components/ui/progress.tsx +0 -29
- package/src/lib/components/ui/radio-group.tsx +0 -45
- package/src/lib/components/ui/resizable.tsx +0 -54
- package/src/lib/components/ui/slider.tsx +0 -63
- package/src/lib/components/ui/toggle-group.tsx +0 -73
- 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-
|
|
4
|
+
"version": "3.3.6-master-202507031127",
|
|
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.
|
|
58
|
-
"@radix-ui/react-alert-dialog": "^1.1.
|
|
59
|
-
"@radix-ui/react-
|
|
60
|
-
"@radix-ui/react-
|
|
61
|
-
"@radix-ui/react-
|
|
62
|
-
"@radix-ui/react-
|
|
63
|
-
"@radix-ui/react-
|
|
64
|
-
"@radix-ui/react-
|
|
65
|
-
"@radix-ui/react-
|
|
66
|
-
"@radix-ui/react-
|
|
67
|
-
"@radix-ui/react-
|
|
68
|
-
"@radix-ui/react-
|
|
69
|
-
"@radix-ui/react-
|
|
70
|
-
"@radix-ui/react-
|
|
71
|
-
"@radix-ui/react-
|
|
72
|
-
"@radix-ui/react-
|
|
73
|
-
"@radix-ui/react-
|
|
74
|
-
"@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",
|
|
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",
|
|
68
|
+
"@radix-ui/react-select": "^2.1.6",
|
|
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-
|
|
99
|
-
"@vendure/core": "^3.3.6-master-
|
|
89
|
+
"@vendure/common": "^3.3.6-master-202507031127",
|
|
90
|
+
"@vendure/core": "^3.3.6-master-202507031127",
|
|
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.
|
|
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
|
|
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.
|
|
120
|
-
"
|
|
121
|
-
"
|
|
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.
|
|
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": "
|
|
133
|
+
"gitHead": "82c67a6665c77f59b6bb2e652e73d4580ca4f291"
|
|
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
|
|
125
|
-
<
|
|
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
|
-
<
|
|
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>({
|
|
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
|
|
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
|
-
|
|
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
|
</>
|
|
@@ -1,64 +1,59 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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
|
|
5
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
6
6
|
|
|
7
|
-
function Accordion({
|
|
8
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
className,
|
|
23
|
+
children,
|
|
24
|
+
...props
|
|
30
25
|
}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
className,
|
|
45
|
+
children,
|
|
46
|
+
...props
|
|
52
47
|
}: React.ComponentProps<typeof AccordionPrimitive.Content>) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
|
59
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -1,157 +1,128 @@
|
|
|
1
|
-
|
|
1
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
2
|
+
import * as React from 'react';
|
|
2
3
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
4
|
+
import { buttonVariants } from '@/vdb/components/ui/button.js';
|
|
5
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
33
|
-
|
|
20
|
+
className,
|
|
21
|
+
...props
|
|
34
22
|
}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
49
|
-
|
|
36
|
+
className,
|
|
37
|
+
...props
|
|
50
38
|
}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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
|
-
|
|
110
|
-
|
|
85
|
+
className,
|
|
86
|
+
...props
|
|
111
87
|
}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
-
|
|
123
|
-
|
|
98
|
+
className,
|
|
99
|
+
...props
|
|
124
100
|
}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {
|
|
125
|
-
|
|
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
|
-
|
|
135
|
-
|
|
105
|
+
className,
|
|
106
|
+
...props
|
|
136
107
|
}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
117
|
+
AlertDialog,
|
|
118
|
+
AlertDialogAction,
|
|
119
|
+
AlertDialogCancel,
|
|
120
|
+
AlertDialogContent,
|
|
121
|
+
AlertDialogDescription,
|
|
122
|
+
AlertDialogFooter,
|
|
123
|
+
AlertDialogHeader,
|
|
124
|
+
AlertDialogOverlay,
|
|
125
|
+
AlertDialogPortal,
|
|
126
|
+
AlertDialogTitle,
|
|
127
|
+
AlertDialogTrigger,
|
|
128
|
+
};
|