@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
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { cn } from
|
|
1
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
2
2
|
|
|
3
|
-
function Skeleton({ className, ...props }: React.ComponentProps<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
function Skeleton({ className, ...props }: React.ComponentProps<'div'>) {
|
|
4
|
+
return (
|
|
5
|
+
<div
|
|
6
|
+
data-slot="skeleton"
|
|
7
|
+
className={cn('bg-primary/10 animate-pulse rounded-md', className)}
|
|
8
|
+
{...props}
|
|
9
|
+
/>
|
|
10
|
+
);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export { Skeleton }
|
|
13
|
+
export { Skeleton };
|
|
@@ -8,13 +8,17 @@ const Toaster = ({ ...props }: ToasterProps) => {
|
|
|
8
8
|
<Sonner
|
|
9
9
|
theme={theme as ToasterProps["theme"]}
|
|
10
10
|
className="toaster group"
|
|
11
|
-
|
|
12
|
-
{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
toastOptions={{
|
|
12
|
+
classNames: {
|
|
13
|
+
toast:
|
|
14
|
+
"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
15
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
16
|
+
actionButton:
|
|
17
|
+
"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground font-medium",
|
|
18
|
+
cancelButton:
|
|
19
|
+
"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground font-medium",
|
|
20
|
+
},
|
|
21
|
+
}}
|
|
18
22
|
{...props}
|
|
19
23
|
/>
|
|
20
24
|
)
|
|
@@ -1,31 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
2
|
+
import * as React from 'react';
|
|
2
3
|
|
|
3
|
-
import
|
|
4
|
-
import * as SwitchPrimitive from "@radix-ui/react-switch"
|
|
4
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
25
|
-
)}
|
|
26
|
-
/>
|
|
27
|
-
</SwitchPrimitive.Root>
|
|
28
|
-
)
|
|
6
|
+
function Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>) {
|
|
7
|
+
return (
|
|
8
|
+
<SwitchPrimitive.Root
|
|
9
|
+
data-slot="switch"
|
|
10
|
+
className={cn(
|
|
11
|
+
'peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-5 w-9 shrink-0 items-center rounded-full border-2 border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
|
|
12
|
+
className,
|
|
13
|
+
)}
|
|
14
|
+
{...props}
|
|
15
|
+
>
|
|
16
|
+
<SwitchPrimitive.Thumb
|
|
17
|
+
data-slot="switch-thumb"
|
|
18
|
+
className={cn(
|
|
19
|
+
'bg-background pointer-events-none block size-4 rounded-full ring-0 shadow-lg transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0',
|
|
20
|
+
)}
|
|
21
|
+
/>
|
|
22
|
+
</SwitchPrimitive.Root>
|
|
23
|
+
);
|
|
29
24
|
}
|
|
30
25
|
|
|
31
|
-
export { Switch }
|
|
26
|
+
export { Switch };
|
|
@@ -1,114 +1,82 @@
|
|
|
1
|
-
import * as React from
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import { cn } from
|
|
3
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
4
4
|
|
|
5
|
-
function Table({ className, ...props }: React.ComponentProps<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<table
|
|
12
|
-
data-slot="table"
|
|
13
|
-
className={cn("w-full caption-bottom text-sm", className)}
|
|
14
|
-
{...props}
|
|
15
|
-
/>
|
|
16
|
-
</div>
|
|
17
|
-
)
|
|
5
|
+
function Table({ className, ...props }: React.ComponentProps<'table'>) {
|
|
6
|
+
return (
|
|
7
|
+
<div className="relative w-full overflow-auto">
|
|
8
|
+
<table data-slot="table" className={cn('w-full caption-bottom text-sm', className)} {...props} />
|
|
9
|
+
</div>
|
|
10
|
+
);
|
|
18
11
|
}
|
|
19
12
|
|
|
20
|
-
function TableHeader({ className, ...props }: React.ComponentProps<
|
|
21
|
-
|
|
22
|
-
<thead
|
|
23
|
-
data-slot="table-header"
|
|
24
|
-
className={cn("[&_tr]:border-b", className)}
|
|
25
|
-
{...props}
|
|
26
|
-
/>
|
|
27
|
-
)
|
|
13
|
+
function TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {
|
|
14
|
+
return <thead data-slot="table-header" className={cn('[&_tr]:border-b', className)} {...props} />;
|
|
28
15
|
}
|
|
29
16
|
|
|
30
|
-
function TableBody({ className, ...props }: React.ComponentProps<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
className={cn("[&_tr:last-child]:border-0", className)}
|
|
35
|
-
{...props}
|
|
36
|
-
/>
|
|
37
|
-
)
|
|
17
|
+
function TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {
|
|
18
|
+
return (
|
|
19
|
+
<tbody data-slot="table-body" className={cn('[&_tr:last-child]:border-0', className)} {...props} />
|
|
20
|
+
);
|
|
38
21
|
}
|
|
39
22
|
|
|
40
|
-
function TableFooter({ className, ...props }: React.ComponentProps<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
{...props}
|
|
49
|
-
/>
|
|
50
|
-
)
|
|
23
|
+
function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {
|
|
24
|
+
return (
|
|
25
|
+
<tfoot
|
|
26
|
+
data-slot="table-footer"
|
|
27
|
+
className={cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', className)}
|
|
28
|
+
{...props}
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
51
31
|
}
|
|
52
32
|
|
|
53
|
-
function TableRow({ className, ...props }: React.ComponentProps<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
33
|
+
function TableRow({ className, ...props }: React.ComponentProps<'tr'>) {
|
|
34
|
+
return (
|
|
35
|
+
<tr
|
|
36
|
+
data-slot="table-row"
|
|
37
|
+
className={cn(
|
|
38
|
+
'hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors',
|
|
39
|
+
className,
|
|
40
|
+
)}
|
|
41
|
+
{...props}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
64
44
|
}
|
|
65
45
|
|
|
66
|
-
function TableHead({ className, ...props }: React.ComponentProps<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
46
|
+
function TableHead({ className, ...props }: React.ComponentProps<'th'>) {
|
|
47
|
+
return (
|
|
48
|
+
<th
|
|
49
|
+
data-slot="table-head"
|
|
50
|
+
className={cn(
|
|
51
|
+
'text-muted-foreground h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',
|
|
52
|
+
className,
|
|
53
|
+
)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
77
57
|
}
|
|
78
58
|
|
|
79
|
-
function TableCell({ className, ...props }: React.ComponentProps<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
59
|
+
function TableCell({ className, ...props }: React.ComponentProps<'td'>) {
|
|
60
|
+
return (
|
|
61
|
+
<td
|
|
62
|
+
data-slot="table-cell"
|
|
63
|
+
className={cn(
|
|
64
|
+
'p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',
|
|
65
|
+
className,
|
|
66
|
+
)}
|
|
67
|
+
{...props}
|
|
68
|
+
/>
|
|
69
|
+
);
|
|
90
70
|
}
|
|
91
71
|
|
|
92
|
-
function TableCaption({
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
{...props}
|
|
101
|
-
/>
|
|
102
|
-
)
|
|
72
|
+
function TableCaption({ className, ...props }: React.ComponentProps<'caption'>) {
|
|
73
|
+
return (
|
|
74
|
+
<caption
|
|
75
|
+
data-slot="table-caption"
|
|
76
|
+
className={cn('text-muted-foreground mt-4 text-sm', className)}
|
|
77
|
+
{...props}
|
|
78
|
+
/>
|
|
79
|
+
);
|
|
103
80
|
}
|
|
104
81
|
|
|
105
|
-
export {
|
|
106
|
-
Table,
|
|
107
|
-
TableHeader,
|
|
108
|
-
TableBody,
|
|
109
|
-
TableFooter,
|
|
110
|
-
TableHead,
|
|
111
|
-
TableRow,
|
|
112
|
-
TableCell,
|
|
113
|
-
TableCaption,
|
|
114
|
-
}
|
|
82
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -1,66 +1,48 @@
|
|
|
1
|
-
|
|
1
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
2
|
+
import * as React from 'react';
|
|
2
3
|
|
|
3
|
-
import
|
|
4
|
-
import * as TabsPrimitive from "@radix-ui/react-tabs"
|
|
4
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
...props
|
|
11
|
-
}: React.ComponentProps<typeof TabsPrimitive.Root>) {
|
|
12
|
-
return (
|
|
13
|
-
<TabsPrimitive.Root
|
|
14
|
-
data-slot="tabs"
|
|
15
|
-
className={cn("flex flex-col gap-2", className)}
|
|
16
|
-
{...props}
|
|
17
|
-
/>
|
|
18
|
-
)
|
|
6
|
+
function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {
|
|
7
|
+
return (
|
|
8
|
+
<TabsPrimitive.Root data-slot="tabs" className={cn('flex flex-col gap-2', className)} {...props} />
|
|
9
|
+
);
|
|
19
10
|
}
|
|
20
11
|
|
|
21
|
-
function TabsList({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{...props}
|
|
33
|
-
/>
|
|
34
|
-
)
|
|
12
|
+
function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {
|
|
13
|
+
return (
|
|
14
|
+
<TabsPrimitive.List
|
|
15
|
+
data-slot="tabs-list"
|
|
16
|
+
className={cn(
|
|
17
|
+
'bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]',
|
|
18
|
+
className,
|
|
19
|
+
)}
|
|
20
|
+
{...props}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
35
23
|
}
|
|
36
24
|
|
|
37
|
-
function TabsTrigger({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
{...props}
|
|
49
|
-
/>
|
|
50
|
-
)
|
|
25
|
+
function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
|
|
26
|
+
return (
|
|
27
|
+
<TabsPrimitive.Trigger
|
|
28
|
+
data-slot="tabs-trigger"
|
|
29
|
+
className={cn(
|
|
30
|
+
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
31
|
+
className,
|
|
32
|
+
)}
|
|
33
|
+
{...props}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
51
36
|
}
|
|
52
37
|
|
|
53
|
-
function TabsContent({
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
{...props}
|
|
62
|
-
/>
|
|
63
|
-
)
|
|
38
|
+
function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {
|
|
39
|
+
return (
|
|
40
|
+
<TabsPrimitive.Content
|
|
41
|
+
data-slot="tabs-content"
|
|
42
|
+
className={cn('flex-1 outline-none', className)}
|
|
43
|
+
{...props}
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
64
46
|
}
|
|
65
47
|
|
|
66
|
-
export { Tabs, TabsList, TabsTrigger
|
|
48
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import * as React from
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import { cn } from
|
|
3
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
4
4
|
|
|
5
|
-
function Textarea({ className, ...props }: React.ComponentProps<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
function Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {
|
|
6
|
+
return (
|
|
7
|
+
<textarea
|
|
8
|
+
data-slot="textarea"
|
|
9
|
+
className={cn(
|
|
10
|
+
'border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
|
11
|
+
className,
|
|
12
|
+
)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export { Textarea }
|
|
18
|
+
export { Textarea };
|
|
@@ -1,59 +1,51 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
|
|
4
|
-
import { cn } from
|
|
4
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
5
5
|
|
|
6
6
|
function TooltipProvider({
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
delayDuration = 0,
|
|
8
|
+
...props
|
|
9
9
|
}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
delayDuration={delayDuration}
|
|
14
|
-
{...props}
|
|
15
|
-
/>
|
|
16
|
-
)
|
|
10
|
+
return (
|
|
11
|
+
<TooltipPrimitive.Provider data-slot="tooltip-provider" delayDuration={delayDuration} {...props} />
|
|
12
|
+
);
|
|
17
13
|
}
|
|
18
14
|
|
|
19
|
-
function Tooltip({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</TooltipProvider>
|
|
26
|
-
)
|
|
15
|
+
function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) {
|
|
16
|
+
return (
|
|
17
|
+
<TooltipProvider>
|
|
18
|
+
<TooltipPrimitive.Root data-slot="tooltip" {...props} />
|
|
19
|
+
</TooltipProvider>
|
|
20
|
+
);
|
|
27
21
|
}
|
|
28
22
|
|
|
29
|
-
function TooltipTrigger({
|
|
30
|
-
|
|
31
|
-
}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
|
|
32
|
-
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
|
|
23
|
+
function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
|
|
24
|
+
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />;
|
|
33
25
|
}
|
|
34
26
|
|
|
35
27
|
function TooltipContent({
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
className,
|
|
29
|
+
sideOffset = 4,
|
|
30
|
+
children,
|
|
31
|
+
...props
|
|
40
32
|
}: React.ComponentProps<typeof TooltipPrimitive.Content>) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
33
|
+
return (
|
|
34
|
+
<TooltipPrimitive.Portal>
|
|
35
|
+
<TooltipPrimitive.Content
|
|
36
|
+
data-slot="tooltip-content"
|
|
37
|
+
sideOffset={sideOffset}
|
|
38
|
+
className={cn(
|
|
39
|
+
'bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-w-sm rounded-md px-3 py-1.5 text-xs',
|
|
40
|
+
className,
|
|
41
|
+
)}
|
|
42
|
+
{...props}
|
|
43
|
+
>
|
|
44
|
+
{children}
|
|
45
|
+
<TooltipPrimitive.Arrow className="bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
|
|
46
|
+
</TooltipPrimitive.Content>
|
|
47
|
+
</TooltipPrimitive.Portal>
|
|
48
|
+
);
|
|
57
49
|
}
|
|
58
50
|
|
|
59
|
-
export { Tooltip,
|
|
51
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"
|
|
2
|
-
|
|
3
|
-
function AspectRatio({
|
|
4
|
-
...props
|
|
5
|
-
}: React.ComponentProps<typeof AspectRatioPrimitive.Root>) {
|
|
6
|
-
return <AspectRatioPrimitive.Root data-slot="aspect-ratio" {...props} />
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { AspectRatio }
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as AvatarPrimitive from "@radix-ui/react-avatar"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/vdb/lib/utils"
|
|
7
|
-
|
|
8
|
-
function Avatar({
|
|
9
|
-
className,
|
|
10
|
-
...props
|
|
11
|
-
}: React.ComponentProps<typeof AvatarPrimitive.Root>) {
|
|
12
|
-
return (
|
|
13
|
-
<AvatarPrimitive.Root
|
|
14
|
-
data-slot="avatar"
|
|
15
|
-
className={cn(
|
|
16
|
-
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
|
|
17
|
-
className
|
|
18
|
-
)}
|
|
19
|
-
{...props}
|
|
20
|
-
/>
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function AvatarImage({
|
|
25
|
-
className,
|
|
26
|
-
...props
|
|
27
|
-
}: React.ComponentProps<typeof AvatarPrimitive.Image>) {
|
|
28
|
-
return (
|
|
29
|
-
<AvatarPrimitive.Image
|
|
30
|
-
data-slot="avatar-image"
|
|
31
|
-
className={cn("aspect-square size-full", className)}
|
|
32
|
-
{...props}
|
|
33
|
-
/>
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function AvatarFallback({
|
|
38
|
-
className,
|
|
39
|
-
...props
|
|
40
|
-
}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
|
|
41
|
-
return (
|
|
42
|
-
<AvatarPrimitive.Fallback
|
|
43
|
-
data-slot="avatar-fallback"
|
|
44
|
-
className={cn(
|
|
45
|
-
"bg-muted flex size-full items-center justify-center rounded-full",
|
|
46
|
-
className
|
|
47
|
-
)}
|
|
48
|
-
{...props}
|
|
49
|
-
/>
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export { Avatar, AvatarImage, AvatarFallback }
|