@greatapps/greatchat-ui 0.1.6 → 0.2.1
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 +667 -1560
- 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 +5 -5
- 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,50 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
|
|
6
|
-
function ScrollArea({
|
|
7
|
-
className,
|
|
8
|
-
children,
|
|
9
|
-
...props
|
|
10
|
-
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
|
|
11
|
-
return (
|
|
12
|
-
<ScrollAreaPrimitive.Root
|
|
13
|
-
data-slot="scroll-area"
|
|
14
|
-
className={cn("relative", className)}
|
|
15
|
-
{...props}
|
|
16
|
-
>
|
|
17
|
-
<ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit] [&>div]:!block">
|
|
18
|
-
{children}
|
|
19
|
-
</ScrollAreaPrimitive.Viewport>
|
|
20
|
-
<ScrollBar />
|
|
21
|
-
<ScrollAreaPrimitive.Corner />
|
|
22
|
-
</ScrollAreaPrimitive.Root>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function ScrollBar({
|
|
27
|
-
className,
|
|
28
|
-
orientation = "vertical",
|
|
29
|
-
...props
|
|
30
|
-
}: React.ComponentProps<typeof ScrollAreaPrimitive.Scrollbar>) {
|
|
31
|
-
return (
|
|
32
|
-
<ScrollAreaPrimitive.Scrollbar
|
|
33
|
-
data-slot="scroll-bar"
|
|
34
|
-
orientation={orientation}
|
|
35
|
-
className={cn(
|
|
36
|
-
"flex touch-none p-px transition-colors select-none",
|
|
37
|
-
orientation === "vertical" &&
|
|
38
|
-
"h-full w-2.5 border-l border-l-transparent",
|
|
39
|
-
orientation === "horizontal" &&
|
|
40
|
-
"h-2.5 flex-col border-t border-t-transparent",
|
|
41
|
-
className,
|
|
42
|
-
)}
|
|
43
|
-
{...props}
|
|
44
|
-
>
|
|
45
|
-
<ScrollAreaPrimitive.Thumb className="relative flex-1 rounded-full bg-border" />
|
|
46
|
-
</ScrollAreaPrimitive.Scrollbar>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { ScrollArea, ScrollBar };
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Select as SelectPrimitive } from "radix-ui";
|
|
3
|
-
import { Check, ChevronDown, ChevronUp, ChevronsUpDown } from "lucide-react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
|
|
7
|
-
function Select({
|
|
8
|
-
...props
|
|
9
|
-
}: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
|
10
|
-
return <SelectPrimitive.Root data-slot="select" {...props} />;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function SelectGroup({
|
|
14
|
-
className,
|
|
15
|
-
...props
|
|
16
|
-
}: React.ComponentProps<typeof SelectPrimitive.Group>) {
|
|
17
|
-
return (
|
|
18
|
-
<SelectPrimitive.Group
|
|
19
|
-
data-slot="select-group"
|
|
20
|
-
className={cn("scroll-my-1 p-1", className)}
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function SelectValue({
|
|
27
|
-
...props
|
|
28
|
-
}: React.ComponentProps<typeof SelectPrimitive.Value>) {
|
|
29
|
-
return <SelectPrimitive.Value data-slot="select-value" {...props} />;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function SelectTrigger({
|
|
33
|
-
className,
|
|
34
|
-
size = "default",
|
|
35
|
-
children,
|
|
36
|
-
...props
|
|
37
|
-
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
38
|
-
size?: "sm" | "default";
|
|
39
|
-
}) {
|
|
40
|
-
return (
|
|
41
|
-
<SelectPrimitive.Trigger
|
|
42
|
-
data-slot="select-trigger"
|
|
43
|
-
data-size={size}
|
|
44
|
-
className={cn(
|
|
45
|
-
"border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm shadow-xs transition-[color,box-shadow] focus-visible:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
46
|
-
className,
|
|
47
|
-
)}
|
|
48
|
-
{...props}
|
|
49
|
-
>
|
|
50
|
-
{children}
|
|
51
|
-
<SelectPrimitive.Icon asChild>
|
|
52
|
-
<ChevronsUpDown className="text-muted-foreground size-4 pointer-events-none" />
|
|
53
|
-
</SelectPrimitive.Icon>
|
|
54
|
-
</SelectPrimitive.Trigger>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function SelectContent({
|
|
59
|
-
className,
|
|
60
|
-
children,
|
|
61
|
-
position = "item-aligned",
|
|
62
|
-
align = "center",
|
|
63
|
-
...props
|
|
64
|
-
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
|
|
65
|
-
return (
|
|
66
|
-
<SelectPrimitive.Portal>
|
|
67
|
-
<SelectPrimitive.Content
|
|
68
|
-
data-slot="select-content"
|
|
69
|
-
className={cn(
|
|
70
|
-
"bg-popover text-popover-foreground 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 min-w-36 rounded-md shadow-md ring-1 duration-100 relative z-50 max-h-(--radix-select-content-available-height) overflow-x-hidden overflow-y-auto",
|
|
71
|
-
position === "popper" &&
|
|
72
|
-
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
73
|
-
className,
|
|
74
|
-
)}
|
|
75
|
-
position={position}
|
|
76
|
-
align={align}
|
|
77
|
-
{...props}
|
|
78
|
-
>
|
|
79
|
-
<SelectScrollUpButton />
|
|
80
|
-
<SelectPrimitive.Viewport>{children}</SelectPrimitive.Viewport>
|
|
81
|
-
<SelectScrollDownButton />
|
|
82
|
-
</SelectPrimitive.Content>
|
|
83
|
-
</SelectPrimitive.Portal>
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function SelectItem({
|
|
88
|
-
className,
|
|
89
|
-
children,
|
|
90
|
-
...props
|
|
91
|
-
}: React.ComponentProps<typeof SelectPrimitive.Item>) {
|
|
92
|
-
return (
|
|
93
|
-
<SelectPrimitive.Item
|
|
94
|
-
data-slot="select-item"
|
|
95
|
-
className={cn(
|
|
96
|
-
"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 w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
97
|
-
className,
|
|
98
|
-
)}
|
|
99
|
-
{...props}
|
|
100
|
-
>
|
|
101
|
-
<span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center">
|
|
102
|
-
<SelectPrimitive.ItemIndicator>
|
|
103
|
-
<Check className="pointer-events-none" />
|
|
104
|
-
</SelectPrimitive.ItemIndicator>
|
|
105
|
-
</span>
|
|
106
|
-
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
107
|
-
</SelectPrimitive.Item>
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function SelectScrollUpButton({
|
|
112
|
-
className,
|
|
113
|
-
...props
|
|
114
|
-
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
|
|
115
|
-
return (
|
|
116
|
-
<SelectPrimitive.ScrollUpButton
|
|
117
|
-
data-slot="select-scroll-up-button"
|
|
118
|
-
className={cn(
|
|
119
|
-
"bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
120
|
-
className,
|
|
121
|
-
)}
|
|
122
|
-
{...props}
|
|
123
|
-
>
|
|
124
|
-
<ChevronUp />
|
|
125
|
-
</SelectPrimitive.ScrollUpButton>
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function SelectScrollDownButton({
|
|
130
|
-
className,
|
|
131
|
-
...props
|
|
132
|
-
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
|
|
133
|
-
return (
|
|
134
|
-
<SelectPrimitive.ScrollDownButton
|
|
135
|
-
data-slot="select-scroll-down-button"
|
|
136
|
-
className={cn(
|
|
137
|
-
"bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
138
|
-
className,
|
|
139
|
-
)}
|
|
140
|
-
{...props}
|
|
141
|
-
>
|
|
142
|
-
<ChevronDown />
|
|
143
|
-
</SelectPrimitive.ScrollDownButton>
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export {
|
|
148
|
-
Select,
|
|
149
|
-
SelectContent,
|
|
150
|
-
SelectGroup,
|
|
151
|
-
SelectItem,
|
|
152
|
-
SelectScrollDownButton,
|
|
153
|
-
SelectScrollUpButton,
|
|
154
|
-
SelectTrigger,
|
|
155
|
-
SelectValue,
|
|
156
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
|
|
6
|
-
function Separator({
|
|
7
|
-
className,
|
|
8
|
-
orientation = "horizontal",
|
|
9
|
-
decorative = true,
|
|
10
|
-
...props
|
|
11
|
-
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
|
|
12
|
-
return (
|
|
13
|
-
<SeparatorPrimitive.Root
|
|
14
|
-
data-slot="separator"
|
|
15
|
-
decorative={decorative}
|
|
16
|
-
orientation={orientation}
|
|
17
|
-
className={cn(
|
|
18
|
-
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
19
|
-
className,
|
|
20
|
-
)}
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { Separator };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { cn } from "../../lib/utils";
|
|
2
|
-
|
|
3
|
-
function Skeleton({
|
|
4
|
-
className,
|
|
5
|
-
...props
|
|
6
|
-
}: React.ComponentProps<"div">) {
|
|
7
|
-
return (
|
|
8
|
-
<div
|
|
9
|
-
data-slot="skeleton"
|
|
10
|
-
className={cn("bg-muted rounded-md animate-pulse", className)}
|
|
11
|
-
{...props}
|
|
12
|
-
/>
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { Skeleton };
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
|
|
5
|
-
import { cn } from "../../lib/utils"
|
|
6
|
-
|
|
7
|
-
function Table({ className, ...props }: React.ComponentProps<"table">) {
|
|
8
|
-
return (
|
|
9
|
-
<div data-slot="table-container" className="relative w-full overflow-x-auto">
|
|
10
|
-
<table
|
|
11
|
-
data-slot="table"
|
|
12
|
-
className={cn("w-full caption-bottom text-sm", className)}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
</div>
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
|
|
20
|
-
return (
|
|
21
|
-
<thead
|
|
22
|
-
data-slot="table-header"
|
|
23
|
-
className={cn("[&_tr]:border-b", className)}
|
|
24
|
-
{...props}
|
|
25
|
-
/>
|
|
26
|
-
)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
|
|
30
|
-
return (
|
|
31
|
-
<tbody
|
|
32
|
-
data-slot="table-body"
|
|
33
|
-
className={cn("[&_tr:last-child]:border-0", className)}
|
|
34
|
-
{...props}
|
|
35
|
-
/>
|
|
36
|
-
)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
|
|
40
|
-
return (
|
|
41
|
-
<tfoot
|
|
42
|
-
data-slot="table-footer"
|
|
43
|
-
className={cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className)}
|
|
44
|
-
{...props}
|
|
45
|
-
/>
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
|
|
50
|
-
return (
|
|
51
|
-
<tr
|
|
52
|
-
data-slot="table-row"
|
|
53
|
-
className={cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", className)}
|
|
54
|
-
{...props}
|
|
55
|
-
/>
|
|
56
|
-
)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function TableHead({ className, ...props }: React.ComponentProps<"th">) {
|
|
60
|
-
return (
|
|
61
|
-
<th
|
|
62
|
-
data-slot="table-head"
|
|
63
|
-
className={cn("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0", className)}
|
|
64
|
-
{...props}
|
|
65
|
-
/>
|
|
66
|
-
)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function TableCell({ className, ...props }: React.ComponentProps<"td">) {
|
|
70
|
-
return (
|
|
71
|
-
<td
|
|
72
|
-
data-slot="table-cell"
|
|
73
|
-
className={cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className)}
|
|
74
|
-
{...props}
|
|
75
|
-
/>
|
|
76
|
-
)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function TableCaption({
|
|
80
|
-
className,
|
|
81
|
-
...props
|
|
82
|
-
}: React.ComponentProps<"caption">) {
|
|
83
|
-
return (
|
|
84
|
-
<caption
|
|
85
|
-
data-slot="table-caption"
|
|
86
|
-
className={cn("text-muted-foreground mt-4 text-sm", className)}
|
|
87
|
-
{...props}
|
|
88
|
-
/>
|
|
89
|
-
)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export {
|
|
93
|
-
Table,
|
|
94
|
-
TableHeader,
|
|
95
|
-
TableBody,
|
|
96
|
-
TableFooter,
|
|
97
|
-
TableHead,
|
|
98
|
-
TableRow,
|
|
99
|
-
TableCell,
|
|
100
|
-
TableCaption,
|
|
101
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
|
|
6
|
-
function Tabs({
|
|
7
|
-
className,
|
|
8
|
-
...props
|
|
9
|
-
}: React.ComponentProps<typeof TabsPrimitive.Root>) {
|
|
10
|
-
return (
|
|
11
|
-
<TabsPrimitive.Root
|
|
12
|
-
data-slot="tabs"
|
|
13
|
-
className={cn("flex flex-col gap-2", className)}
|
|
14
|
-
{...props}
|
|
15
|
-
/>
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function TabsList({
|
|
20
|
-
className,
|
|
21
|
-
...props
|
|
22
|
-
}: React.ComponentProps<typeof TabsPrimitive.List>) {
|
|
23
|
-
return (
|
|
24
|
-
<TabsPrimitive.List
|
|
25
|
-
data-slot="tabs-list"
|
|
26
|
-
className={cn(
|
|
27
|
-
"inline-flex h-9 w-fit items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
28
|
-
className,
|
|
29
|
-
)}
|
|
30
|
-
{...props}
|
|
31
|
-
/>
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function TabsTrigger({
|
|
36
|
-
className,
|
|
37
|
-
...props
|
|
38
|
-
}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
|
|
39
|
-
return (
|
|
40
|
-
<TabsPrimitive.Trigger
|
|
41
|
-
data-slot="tabs-trigger"
|
|
42
|
-
className={cn(
|
|
43
|
-
"inline-flex items-center justify-center gap-1.5 rounded-md px-2.5 py-1 text-sm font-medium whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4",
|
|
44
|
-
className,
|
|
45
|
-
)}
|
|
46
|
-
{...props}
|
|
47
|
-
/>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function TabsContent({
|
|
52
|
-
className,
|
|
53
|
-
...props
|
|
54
|
-
}: React.ComponentProps<typeof TabsPrimitive.Content>) {
|
|
55
|
-
return (
|
|
56
|
-
<TabsPrimitive.Content
|
|
57
|
-
data-slot="tabs-content"
|
|
58
|
-
className={cn("flex-1 outline-none", className)}
|
|
59
|
-
{...props}
|
|
60
|
-
/>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "../../lib/utils";
|
|
4
|
-
|
|
5
|
-
function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
|
|
6
|
-
return (
|
|
7
|
-
<textarea
|
|
8
|
-
data-slot="textarea"
|
|
9
|
-
className={cn(
|
|
10
|
-
"border-input dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 rounded-md border bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] focus-visible:ring-3 md:text-sm placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
11
|
-
className,
|
|
12
|
-
)}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { Textarea };
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Tooltip as TooltipPrimitive } from "radix-ui";
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
|
|
6
|
-
function TooltipProvider({
|
|
7
|
-
delayDuration = 0,
|
|
8
|
-
...props
|
|
9
|
-
}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
|
|
10
|
-
return (
|
|
11
|
-
<TooltipPrimitive.Provider
|
|
12
|
-
data-slot="tooltip-provider"
|
|
13
|
-
delayDuration={delayDuration}
|
|
14
|
-
{...props}
|
|
15
|
-
/>
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function Tooltip({
|
|
20
|
-
...props
|
|
21
|
-
}: React.ComponentProps<typeof TooltipPrimitive.Root>) {
|
|
22
|
-
return (
|
|
23
|
-
<TooltipProvider>
|
|
24
|
-
<TooltipPrimitive.Root data-slot="tooltip" {...props} />
|
|
25
|
-
</TooltipProvider>
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function TooltipTrigger({
|
|
30
|
-
...props
|
|
31
|
-
}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
|
|
32
|
-
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function TooltipContent({
|
|
36
|
-
className,
|
|
37
|
-
sideOffset = 4,
|
|
38
|
-
children,
|
|
39
|
-
...props
|
|
40
|
-
}: React.ComponentProps<typeof TooltipPrimitive.Content>) {
|
|
41
|
-
return (
|
|
42
|
-
<TooltipPrimitive.Portal>
|
|
43
|
-
<TooltipPrimitive.Content
|
|
44
|
-
data-slot="tooltip-content"
|
|
45
|
-
sideOffset={sideOffset}
|
|
46
|
-
className={cn(
|
|
47
|
-
"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs 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",
|
|
48
|
-
className,
|
|
49
|
-
)}
|
|
50
|
-
{...props}
|
|
51
|
-
>
|
|
52
|
-
{children}
|
|
53
|
-
</TooltipPrimitive.Content>
|
|
54
|
-
</TooltipPrimitive.Portal>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|