@greatapps/greatchat-ui 0.1.6 → 0.2.0
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/dist/index.d.ts +2 -4
- package/dist/index.js +666 -1559
- package/dist/index.js.map +1 -1
- package/package.json +16 -13
- package/src/components/channel-card.tsx +1 -1
- package/src/components/channel-create-dialog.tsx +4 -4
- package/src/components/channel-edit-dialog.tsx +4 -4
- package/src/components/channels-page.tsx +3 -3
- package/src/components/chat-dashboard.tsx +5 -5
- package/src/components/chat-input.tsx +1 -2
- package/src/components/chat-view.tsx +1 -8
- package/src/components/contact-avatar.tsx +1 -2
- package/src/components/contact-form-dialog.tsx +4 -4
- package/src/components/contact-info-panel.tsx +1 -4
- package/src/components/contacts-page.tsx +1 -1
- package/src/components/contacts-table.tsx +3 -5
- package/src/components/data-table.tsx +4 -4
- package/src/components/inbox-item.tsx +6 -4
- package/src/components/inbox-page.tsx +1 -8
- package/src/components/inbox-sidebar.tsx +1 -5
- package/src/components/message-bubble.tsx +4 -6
- package/src/components/new-conversation-dialog.tsx +2 -6
- package/src/components/whatsapp-qr-dialog.tsx +2 -2
- package/src/components/whatsapp-status-badge.tsx +1 -1
- package/src/index.ts +1 -1
- package/src/components/ui/alert-dialog.tsx +0 -167
- package/src/components/ui/avatar.tsx +0 -51
- package/src/components/ui/badge.tsx +0 -44
- package/src/components/ui/button.tsx +0 -62
- package/src/components/ui/card.tsx +0 -94
- package/src/components/ui/command.tsx +0 -106
- package/src/components/ui/dialog.tsx +0 -133
- package/src/components/ui/dropdown-menu.tsx +0 -173
- package/src/components/ui/input.tsx +0 -19
- package/src/components/ui/label.tsx +0 -24
- package/src/components/ui/progress.tsx +0 -31
- package/src/components/ui/scroll-area.tsx +0 -50
- package/src/components/ui/select.tsx +0 -156
- package/src/components/ui/separator.tsx +0 -26
- package/src/components/ui/skeleton.tsx +0 -16
- package/src/components/ui/table.tsx +0 -101
- package/src/components/ui/tabs.tsx +0 -64
- package/src/components/ui/textarea.tsx +0 -18
- package/src/components/ui/tooltip.tsx +0 -58
- package/src/lib/utils.ts +0 -6
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
-
import { Slot } from "radix-ui";
|
|
4
|
-
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
|
|
7
|
-
const badgeVariants = cva(
|
|
8
|
-
"h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all [&>svg]:size-3! inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&>svg]:pointer-events-none overflow-hidden",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default: "bg-primary text-primary-foreground",
|
|
13
|
-
secondary: "bg-secondary text-secondary-foreground",
|
|
14
|
-
destructive:
|
|
15
|
-
"bg-destructive/10 text-destructive dark:bg-destructive/20",
|
|
16
|
-
outline: "border-border text-foreground",
|
|
17
|
-
ghost: "hover:bg-muted hover:text-muted-foreground",
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
defaultVariants: {
|
|
21
|
-
variant: "default",
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
function Badge({
|
|
27
|
-
className,
|
|
28
|
-
variant = "default",
|
|
29
|
-
asChild = false,
|
|
30
|
-
...props
|
|
31
|
-
}: React.ComponentProps<"span"> &
|
|
32
|
-
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
|
|
33
|
-
const Comp = asChild ? Slot.Root : "span";
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<Comp
|
|
37
|
-
data-slot="badge"
|
|
38
|
-
className={cn(badgeVariants({ variant }), className)}
|
|
39
|
-
{...props}
|
|
40
|
-
/>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export { Badge, badgeVariants };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
-
import { Slot } from "radix-ui";
|
|
4
|
-
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
|
|
7
|
-
const buttonVariants = cva(
|
|
8
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 rounded-md border border-transparent text-sm font-medium focus-visible:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none select-none",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
13
|
-
outline:
|
|
14
|
-
"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 shadow-xs",
|
|
15
|
-
secondary:
|
|
16
|
-
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
17
|
-
ghost:
|
|
18
|
-
"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50",
|
|
19
|
-
destructive:
|
|
20
|
-
"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:bg-destructive/20 text-destructive",
|
|
21
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
22
|
-
},
|
|
23
|
-
size: {
|
|
24
|
-
default: "h-9 gap-1.5 px-2.5",
|
|
25
|
-
xs: "h-6 gap-1 px-2 text-xs [&_svg:not([class*='size-'])]:size-3",
|
|
26
|
-
sm: "h-8 gap-1 px-2.5",
|
|
27
|
-
lg: "h-10 gap-1.5 px-2.5",
|
|
28
|
-
icon: "size-9",
|
|
29
|
-
"icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
30
|
-
"icon-sm": "size-8",
|
|
31
|
-
"icon-lg": "size-10",
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
defaultVariants: {
|
|
35
|
-
variant: "default",
|
|
36
|
-
size: "default",
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
function Button({
|
|
42
|
-
className,
|
|
43
|
-
variant = "default",
|
|
44
|
-
size = "default",
|
|
45
|
-
asChild = false,
|
|
46
|
-
...props
|
|
47
|
-
}: React.ComponentProps<"button"> &
|
|
48
|
-
VariantProps<typeof buttonVariants> & {
|
|
49
|
-
asChild?: boolean;
|
|
50
|
-
}) {
|
|
51
|
-
const Comp = asChild ? Slot.Root : "button";
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<Comp
|
|
55
|
-
data-slot="button"
|
|
56
|
-
className={cn(buttonVariants({ variant, size, className }))}
|
|
57
|
-
{...props}
|
|
58
|
-
/>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export { Button, buttonVariants };
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
|
|
3
|
-
import { cn } from "../../lib/utils"
|
|
4
|
-
|
|
5
|
-
function Card({
|
|
6
|
-
className,
|
|
7
|
-
size = "default",
|
|
8
|
-
...props
|
|
9
|
-
}: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {
|
|
10
|
-
return (
|
|
11
|
-
<div
|
|
12
|
-
data-slot="card"
|
|
13
|
-
data-size={size}
|
|
14
|
-
className={cn("ring-foreground/10 bg-card text-card-foreground gap-6 overflow-hidden rounded-xl py-6 text-sm shadow-xs ring-1 has-[>img:first-child]:pt-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col", className)}
|
|
15
|
-
{...props}
|
|
16
|
-
/>
|
|
17
|
-
)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
21
|
-
return (
|
|
22
|
-
<div
|
|
23
|
-
data-slot="card-header"
|
|
24
|
-
className={cn(
|
|
25
|
-
"gap-1 rounded-t-xl px-6 group-data-[size=sm]/card:px-4 [.border-b]:pb-6 group-data-[size=sm]/card:[.border-b]:pb-4 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",
|
|
26
|
-
className
|
|
27
|
-
)}
|
|
28
|
-
{...props}
|
|
29
|
-
/>
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
34
|
-
return (
|
|
35
|
-
<div
|
|
36
|
-
data-slot="card-title"
|
|
37
|
-
className={cn("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm", className)}
|
|
38
|
-
{...props}
|
|
39
|
-
/>
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
|
44
|
-
return (
|
|
45
|
-
<div
|
|
46
|
-
data-slot="card-description"
|
|
47
|
-
className={cn("text-muted-foreground text-sm", className)}
|
|
48
|
-
{...props}
|
|
49
|
-
/>
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
54
|
-
return (
|
|
55
|
-
<div
|
|
56
|
-
data-slot="card-action"
|
|
57
|
-
className={cn(
|
|
58
|
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
59
|
-
className
|
|
60
|
-
)}
|
|
61
|
-
{...props}
|
|
62
|
-
/>
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
67
|
-
return (
|
|
68
|
-
<div
|
|
69
|
-
data-slot="card-content"
|
|
70
|
-
className={cn("px-6 group-data-[size=sm]/card:px-4", className)}
|
|
71
|
-
{...props}
|
|
72
|
-
/>
|
|
73
|
-
)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
77
|
-
return (
|
|
78
|
-
<div
|
|
79
|
-
data-slot="card-footer"
|
|
80
|
-
className={cn("rounded-b-xl px-6 group-data-[size=sm]/card:px-4 [.border-t]:pt-6 group-data-[size=sm]/card:[.border-t]:pt-4 flex items-center", className)}
|
|
81
|
-
{...props}
|
|
82
|
-
/>
|
|
83
|
-
)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export {
|
|
87
|
-
Card,
|
|
88
|
-
CardHeader,
|
|
89
|
-
CardFooter,
|
|
90
|
-
CardTitle,
|
|
91
|
-
CardAction,
|
|
92
|
-
CardDescription,
|
|
93
|
-
CardContent,
|
|
94
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Command as CommandPrimitive } from "cmdk";
|
|
3
|
-
import { Search } from "lucide-react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
|
|
7
|
-
function Command({
|
|
8
|
-
className,
|
|
9
|
-
...props
|
|
10
|
-
}: React.ComponentProps<typeof CommandPrimitive>) {
|
|
11
|
-
return (
|
|
12
|
-
<CommandPrimitive
|
|
13
|
-
data-slot="command"
|
|
14
|
-
className={cn(
|
|
15
|
-
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
16
|
-
className,
|
|
17
|
-
)}
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function CommandInput({
|
|
24
|
-
className,
|
|
25
|
-
...props
|
|
26
|
-
}: React.ComponentProps<typeof CommandPrimitive.Input>) {
|
|
27
|
-
return (
|
|
28
|
-
<div className="flex h-9 items-center gap-2 border-b px-3" data-slot="command-input-wrapper">
|
|
29
|
-
<Search className="size-4 shrink-0 opacity-50" />
|
|
30
|
-
<CommandPrimitive.Input
|
|
31
|
-
data-slot="command-input"
|
|
32
|
-
className={cn(
|
|
33
|
-
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
34
|
-
className,
|
|
35
|
-
)}
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
</div>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function CommandList({
|
|
43
|
-
className,
|
|
44
|
-
...props
|
|
45
|
-
}: React.ComponentProps<typeof CommandPrimitive.List>) {
|
|
46
|
-
return (
|
|
47
|
-
<CommandPrimitive.List
|
|
48
|
-
data-slot="command-list"
|
|
49
|
-
className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}
|
|
50
|
-
{...props}
|
|
51
|
-
/>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function CommandEmpty({
|
|
56
|
-
...props
|
|
57
|
-
}: React.ComponentProps<typeof CommandPrimitive.Empty>) {
|
|
58
|
-
return (
|
|
59
|
-
<CommandPrimitive.Empty
|
|
60
|
-
data-slot="command-empty"
|
|
61
|
-
className="py-6 text-center text-sm"
|
|
62
|
-
{...props}
|
|
63
|
-
/>
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function CommandGroup({
|
|
68
|
-
className,
|
|
69
|
-
...props
|
|
70
|
-
}: React.ComponentProps<typeof CommandPrimitive.Group>) {
|
|
71
|
-
return (
|
|
72
|
-
<CommandPrimitive.Group
|
|
73
|
-
data-slot="command-group"
|
|
74
|
-
className={cn(
|
|
75
|
-
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
76
|
-
className,
|
|
77
|
-
)}
|
|
78
|
-
{...props}
|
|
79
|
-
/>
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function CommandItem({
|
|
84
|
-
className,
|
|
85
|
-
...props
|
|
86
|
-
}: React.ComponentProps<typeof CommandPrimitive.Item>) {
|
|
87
|
-
return (
|
|
88
|
-
<CommandPrimitive.Item
|
|
89
|
-
data-slot="command-item"
|
|
90
|
-
className={cn(
|
|
91
|
-
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
92
|
-
className,
|
|
93
|
-
)}
|
|
94
|
-
{...props}
|
|
95
|
-
/>
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export {
|
|
100
|
-
Command,
|
|
101
|
-
CommandInput,
|
|
102
|
-
CommandList,
|
|
103
|
-
CommandEmpty,
|
|
104
|
-
CommandGroup,
|
|
105
|
-
CommandItem,
|
|
106
|
-
};
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
3
|
-
import { X } from "lucide-react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
|
|
7
|
-
function Dialog({
|
|
8
|
-
...props
|
|
9
|
-
}: React.ComponentProps<typeof DialogPrimitive.Root>) {
|
|
10
|
-
return <DialogPrimitive.Root data-slot="dialog" {...props} />;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function DialogTrigger({
|
|
14
|
-
...props
|
|
15
|
-
}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
|
|
16
|
-
return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function DialogPortal({
|
|
20
|
-
...props
|
|
21
|
-
}: React.ComponentProps<typeof DialogPrimitive.Portal>) {
|
|
22
|
-
return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function DialogClose({
|
|
26
|
-
...props
|
|
27
|
-
}: React.ComponentProps<typeof DialogPrimitive.Close>) {
|
|
28
|
-
return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function DialogOverlay({
|
|
32
|
-
className,
|
|
33
|
-
...props
|
|
34
|
-
}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
|
|
35
|
-
return (
|
|
36
|
-
<DialogPrimitive.Overlay
|
|
37
|
-
data-slot="dialog-overlay"
|
|
38
|
-
className={cn(
|
|
39
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
40
|
-
className,
|
|
41
|
-
)}
|
|
42
|
-
{...props}
|
|
43
|
-
/>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function DialogContent({
|
|
48
|
-
className,
|
|
49
|
-
children,
|
|
50
|
-
...props
|
|
51
|
-
}: React.ComponentProps<typeof DialogPrimitive.Content>) {
|
|
52
|
-
return (
|
|
53
|
-
<DialogPortal>
|
|
54
|
-
<DialogOverlay />
|
|
55
|
-
<DialogPrimitive.Content
|
|
56
|
-
data-slot="dialog-content"
|
|
57
|
-
className={cn(
|
|
58
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
59
|
-
className,
|
|
60
|
-
)}
|
|
61
|
-
{...props}
|
|
62
|
-
>
|
|
63
|
-
{children}
|
|
64
|
-
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
|
|
65
|
-
<X className="h-4 w-4" />
|
|
66
|
-
<span className="sr-only">Close</span>
|
|
67
|
-
</DialogPrimitive.Close>
|
|
68
|
-
</DialogPrimitive.Content>
|
|
69
|
-
</DialogPortal>
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
74
|
-
return (
|
|
75
|
-
<div
|
|
76
|
-
data-slot="dialog-header"
|
|
77
|
-
className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
|
|
78
|
-
{...props}
|
|
79
|
-
/>
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function DialogFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
84
|
-
return (
|
|
85
|
-
<div
|
|
86
|
-
data-slot="dialog-footer"
|
|
87
|
-
className={cn(
|
|
88
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-2",
|
|
89
|
-
className,
|
|
90
|
-
)}
|
|
91
|
-
{...props}
|
|
92
|
-
/>
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function DialogTitle({
|
|
97
|
-
className,
|
|
98
|
-
...props
|
|
99
|
-
}: React.ComponentProps<typeof DialogPrimitive.Title>) {
|
|
100
|
-
return (
|
|
101
|
-
<DialogPrimitive.Title
|
|
102
|
-
data-slot="dialog-title"
|
|
103
|
-
className={cn("text-lg font-semibold leading-none tracking-tight", className)}
|
|
104
|
-
{...props}
|
|
105
|
-
/>
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function DialogDescription({
|
|
110
|
-
className,
|
|
111
|
-
...props
|
|
112
|
-
}: React.ComponentProps<typeof DialogPrimitive.Description>) {
|
|
113
|
-
return (
|
|
114
|
-
<DialogPrimitive.Description
|
|
115
|
-
data-slot="dialog-description"
|
|
116
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
117
|
-
{...props}
|
|
118
|
-
/>
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export {
|
|
123
|
-
Dialog,
|
|
124
|
-
DialogPortal,
|
|
125
|
-
DialogOverlay,
|
|
126
|
-
DialogClose,
|
|
127
|
-
DialogTrigger,
|
|
128
|
-
DialogContent,
|
|
129
|
-
DialogHeader,
|
|
130
|
-
DialogFooter,
|
|
131
|
-
DialogTitle,
|
|
132
|
-
DialogDescription,
|
|
133
|
-
};
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
3
|
-
import { Check, ChevronRight } from "lucide-react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
|
|
7
|
-
function DropdownMenu({
|
|
8
|
-
...props
|
|
9
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
10
|
-
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function DropdownMenuTrigger({
|
|
14
|
-
...props
|
|
15
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
|
|
16
|
-
return (
|
|
17
|
-
<DropdownMenuPrimitive.Trigger
|
|
18
|
-
data-slot="dropdown-menu-trigger"
|
|
19
|
-
{...props}
|
|
20
|
-
/>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function DropdownMenuContent({
|
|
25
|
-
className,
|
|
26
|
-
align = "start",
|
|
27
|
-
sideOffset = 4,
|
|
28
|
-
...props
|
|
29
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
|
|
30
|
-
return (
|
|
31
|
-
<DropdownMenuPrimitive.Portal>
|
|
32
|
-
<DropdownMenuPrimitive.Content
|
|
33
|
-
data-slot="dropdown-menu-content"
|
|
34
|
-
sideOffset={sideOffset}
|
|
35
|
-
align={align}
|
|
36
|
-
className={cn(
|
|
37
|
-
"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-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 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-md p-1 shadow-md ring-1 duration-100 z-50 overflow-x-hidden overflow-y-auto",
|
|
38
|
-
className,
|
|
39
|
-
)}
|
|
40
|
-
{...props}
|
|
41
|
-
/>
|
|
42
|
-
</DropdownMenuPrimitive.Portal>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function DropdownMenuGroup({
|
|
47
|
-
...props
|
|
48
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
|
|
49
|
-
return (
|
|
50
|
-
<DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function DropdownMenuItem({
|
|
55
|
-
className,
|
|
56
|
-
inset,
|
|
57
|
-
variant = "default",
|
|
58
|
-
...props
|
|
59
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
60
|
-
inset?: boolean;
|
|
61
|
-
variant?: "default" | "destructive";
|
|
62
|
-
}) {
|
|
63
|
-
return (
|
|
64
|
-
<DropdownMenuPrimitive.Item
|
|
65
|
-
data-slot="dropdown-menu-item"
|
|
66
|
-
data-inset={inset}
|
|
67
|
-
data-variant={variant}
|
|
68
|
-
className={cn(
|
|
69
|
-
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive gap-2 rounded-sm px-2 py-1.5 text-sm data-inset:pl-8 [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
70
|
-
className,
|
|
71
|
-
)}
|
|
72
|
-
{...props}
|
|
73
|
-
/>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function DropdownMenuCheckboxItem({
|
|
78
|
-
className,
|
|
79
|
-
children,
|
|
80
|
-
checked,
|
|
81
|
-
...props
|
|
82
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {
|
|
83
|
-
return (
|
|
84
|
-
<DropdownMenuPrimitive.CheckboxItem
|
|
85
|
-
data-slot="dropdown-menu-checkbox-item"
|
|
86
|
-
className={cn(
|
|
87
|
-
"focus:bg-accent focus:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
88
|
-
className,
|
|
89
|
-
)}
|
|
90
|
-
checked={checked}
|
|
91
|
-
{...props}
|
|
92
|
-
>
|
|
93
|
-
<span className="absolute right-2 flex items-center justify-center pointer-events-none">
|
|
94
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
95
|
-
<Check />
|
|
96
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
97
|
-
</span>
|
|
98
|
-
{children}
|
|
99
|
-
</DropdownMenuPrimitive.CheckboxItem>
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function DropdownMenuSeparator({
|
|
104
|
-
className,
|
|
105
|
-
...props
|
|
106
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
|
|
107
|
-
return (
|
|
108
|
-
<DropdownMenuPrimitive.Separator
|
|
109
|
-
data-slot="dropdown-menu-separator"
|
|
110
|
-
className={cn("bg-border -mx-1 my-1 h-px", className)}
|
|
111
|
-
{...props}
|
|
112
|
-
/>
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function DropdownMenuSub({
|
|
117
|
-
...props
|
|
118
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
|
|
119
|
-
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function DropdownMenuSubTrigger({
|
|
123
|
-
className,
|
|
124
|
-
inset,
|
|
125
|
-
children,
|
|
126
|
-
...props
|
|
127
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
128
|
-
inset?: boolean;
|
|
129
|
-
}) {
|
|
130
|
-
return (
|
|
131
|
-
<DropdownMenuPrimitive.SubTrigger
|
|
132
|
-
data-slot="dropdown-menu-sub-trigger"
|
|
133
|
-
data-inset={inset}
|
|
134
|
-
className={cn(
|
|
135
|
-
"focus:bg-accent focus:text-accent-foreground data-open:bg-accent gap-2 rounded-sm px-2 py-1.5 text-sm data-inset:pl-8 [&_svg:not([class*='size-'])]:size-4 flex cursor-default items-center outline-hidden select-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
136
|
-
className,
|
|
137
|
-
)}
|
|
138
|
-
{...props}
|
|
139
|
-
>
|
|
140
|
-
{children}
|
|
141
|
-
<ChevronRight className="ml-auto" />
|
|
142
|
-
</DropdownMenuPrimitive.SubTrigger>
|
|
143
|
-
);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
function DropdownMenuSubContent({
|
|
147
|
-
className,
|
|
148
|
-
...props
|
|
149
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
|
|
150
|
-
return (
|
|
151
|
-
<DropdownMenuPrimitive.SubContent
|
|
152
|
-
data-slot="dropdown-menu-sub-content"
|
|
153
|
-
className={cn(
|
|
154
|
-
"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 bg-popover text-popover-foreground min-w-[96px] rounded-md p-1 shadow-lg ring-1 duration-100 z-50 overflow-hidden",
|
|
155
|
-
className,
|
|
156
|
-
)}
|
|
157
|
-
{...props}
|
|
158
|
-
/>
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export {
|
|
163
|
-
DropdownMenu,
|
|
164
|
-
DropdownMenuTrigger,
|
|
165
|
-
DropdownMenuContent,
|
|
166
|
-
DropdownMenuGroup,
|
|
167
|
-
DropdownMenuItem,
|
|
168
|
-
DropdownMenuCheckboxItem,
|
|
169
|
-
DropdownMenuSeparator,
|
|
170
|
-
DropdownMenuSub,
|
|
171
|
-
DropdownMenuSubTrigger,
|
|
172
|
-
DropdownMenuSubContent,
|
|
173
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "../../lib/utils";
|
|
4
|
-
|
|
5
|
-
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
6
|
-
return (
|
|
7
|
-
<input
|
|
8
|
-
type={type}
|
|
9
|
-
data-slot="input"
|
|
10
|
-
className={cn(
|
|
11
|
-
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
12
|
-
className,
|
|
13
|
-
)}
|
|
14
|
-
{...props}
|
|
15
|
-
/>
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { Input };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { Label as LabelPrimitive } from "radix-ui"
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../lib/utils"
|
|
7
|
-
|
|
8
|
-
function Label({
|
|
9
|
-
className,
|
|
10
|
-
...props
|
|
11
|
-
}: React.ComponentProps<typeof LabelPrimitive.Root>) {
|
|
12
|
-
return (
|
|
13
|
-
<LabelPrimitive.Root
|
|
14
|
-
data-slot="label"
|
|
15
|
-
className={cn(
|
|
16
|
-
"gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",
|
|
17
|
-
className
|
|
18
|
-
)}
|
|
19
|
-
{...props}
|
|
20
|
-
/>
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { Label }
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { Progress as ProgressPrimitive } from "radix-ui"
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../lib/utils"
|
|
7
|
-
|
|
8
|
-
function Progress({
|
|
9
|
-
className,
|
|
10
|
-
value,
|
|
11
|
-
...props
|
|
12
|
-
}: React.ComponentProps<typeof ProgressPrimitive.Root>) {
|
|
13
|
-
return (
|
|
14
|
-
<ProgressPrimitive.Root
|
|
15
|
-
data-slot="progress"
|
|
16
|
-
className={cn(
|
|
17
|
-
"bg-muted h-1.5 rounded-full relative flex w-full items-center overflow-x-hidden",
|
|
18
|
-
className
|
|
19
|
-
)}
|
|
20
|
-
{...props}
|
|
21
|
-
>
|
|
22
|
-
<ProgressPrimitive.Indicator
|
|
23
|
-
data-slot="progress-indicator"
|
|
24
|
-
className="bg-primary size-full flex-1 transition-all"
|
|
25
|
-
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
26
|
-
/>
|
|
27
|
-
</ProgressPrimitive.Root>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export { Progress }
|