@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.
Files changed (45) hide show
  1. package/dist/index.d.ts +2 -4
  2. package/dist/index.js +666 -1559
  3. package/dist/index.js.map +1 -1
  4. package/package.json +16 -13
  5. package/src/components/channel-card.tsx +1 -1
  6. package/src/components/channel-create-dialog.tsx +4 -4
  7. package/src/components/channel-edit-dialog.tsx +4 -4
  8. package/src/components/channels-page.tsx +3 -3
  9. package/src/components/chat-dashboard.tsx +5 -5
  10. package/src/components/chat-input.tsx +1 -2
  11. package/src/components/chat-view.tsx +1 -8
  12. package/src/components/contact-avatar.tsx +1 -2
  13. package/src/components/contact-form-dialog.tsx +4 -4
  14. package/src/components/contact-info-panel.tsx +1 -4
  15. package/src/components/contacts-page.tsx +1 -1
  16. package/src/components/contacts-table.tsx +3 -5
  17. package/src/components/data-table.tsx +4 -4
  18. package/src/components/inbox-item.tsx +6 -4
  19. package/src/components/inbox-page.tsx +1 -8
  20. package/src/components/inbox-sidebar.tsx +1 -5
  21. package/src/components/message-bubble.tsx +4 -6
  22. package/src/components/new-conversation-dialog.tsx +2 -6
  23. package/src/components/whatsapp-qr-dialog.tsx +2 -2
  24. package/src/components/whatsapp-status-badge.tsx +1 -1
  25. package/src/index.ts +1 -1
  26. package/src/components/ui/alert-dialog.tsx +0 -167
  27. package/src/components/ui/avatar.tsx +0 -51
  28. package/src/components/ui/badge.tsx +0 -44
  29. package/src/components/ui/button.tsx +0 -62
  30. package/src/components/ui/card.tsx +0 -94
  31. package/src/components/ui/command.tsx +0 -106
  32. package/src/components/ui/dialog.tsx +0 -133
  33. package/src/components/ui/dropdown-menu.tsx +0 -173
  34. package/src/components/ui/input.tsx +0 -19
  35. package/src/components/ui/label.tsx +0 -24
  36. package/src/components/ui/progress.tsx +0 -31
  37. package/src/components/ui/scroll-area.tsx +0 -50
  38. package/src/components/ui/select.tsx +0 -156
  39. package/src/components/ui/separator.tsx +0 -26
  40. package/src/components/ui/skeleton.tsx +0 -16
  41. package/src/components/ui/table.tsx +0 -101
  42. package/src/components/ui/tabs.tsx +0 -64
  43. package/src/components/ui/textarea.tsx +0 -18
  44. package/src/components/ui/tooltip.tsx +0 -58
  45. package/src/lib/utils.ts +0 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greatapps/greatchat-ui",
3
- "version": "0.1.6",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -26,24 +26,27 @@
26
26
  "@tanstack/react-table": "^8",
27
27
  "lucide-react": "*",
28
28
  "date-fns": "*",
29
- "sonner": "*"
29
+ "sonner": "*",
30
+ "@greatapps/greatauth-ui": "^0.2.0",
31
+ "radix-ui": "^1.4",
32
+ "cmdk": "^1"
30
33
  },
31
34
  "dependencies": {
32
- "@greatapps/greatauth-ui": "^0.1.4",
33
- "class-variance-authority": "^0.7.1",
34
35
  "clsx": "^2",
35
- "cmdk": "^1.1.1",
36
- "radix-ui": "^1.4.3",
37
- "tailwind-merge": "^3"
36
+ "tailwind-merge": "^3",
37
+ "class-variance-authority": "^0.7"
38
38
  },
39
39
  "devDependencies": {
40
- "tsup": "latest",
41
- "typescript": "^5",
42
- "react": "^19",
43
- "react-dom": "^19",
40
+ "@greatapps/greatauth-ui": "latest",
41
+ "@tanstack/react-query": "latest",
42
+ "@tanstack/react-table": "latest",
44
43
  "@types/react": "latest",
45
44
  "@types/react-dom": "latest",
46
- "@tanstack/react-query": "latest",
47
- "@tanstack/react-table": "latest"
45
+ "cmdk": "^1",
46
+ "radix-ui": "^1.4",
47
+ "react": "^19",
48
+ "react-dom": "^19",
49
+ "tsup": "latest",
50
+ "typescript": "^5"
48
51
  }
49
52
  }
@@ -5,7 +5,7 @@ import type { Channel } from "../types";
5
5
  import type { GchatHookConfig } from "../hooks/types";
6
6
  import { useChannelWhatsappStatus } from "../hooks/use-channels";
7
7
  import { WhatsappStatusBadge } from "./whatsapp-status-badge";
8
- import { Button } from "./ui/button";
8
+ import { Button } from "@greatapps/greatauth-ui/ui";
9
9
 
10
10
  export interface ChannelCardProps {
11
11
  channel: Channel;
@@ -11,10 +11,10 @@ import {
11
11
  DialogHeader,
12
12
  DialogTitle,
13
13
  DialogFooter,
14
- } from "./ui/dialog";
15
- import { Button } from "./ui/button";
16
- import { Input } from "./ui/input";
17
- import { Label } from "./ui/label";
14
+ Button,
15
+ Input,
16
+ Label,
17
+ } from "@greatapps/greatauth-ui/ui";
18
18
  import { Loader2 } from "lucide-react";
19
19
  import { toast } from "sonner";
20
20
 
@@ -12,10 +12,10 @@ import {
12
12
  DialogHeader,
13
13
  DialogTitle,
14
14
  DialogFooter,
15
- } from "./ui/dialog";
16
- import { Button } from "./ui/button";
17
- import { Input } from "./ui/input";
18
- import { Label } from "./ui/label";
15
+ Button,
16
+ Input,
17
+ Label,
18
+ } from "@greatapps/greatauth-ui/ui";
19
19
  import { Loader2 } from "lucide-react";
20
20
  import { toast } from "sonner";
21
21
 
@@ -10,8 +10,8 @@ import { ChannelCreateDialog } from "./channel-create-dialog";
10
10
  import { ChannelEditDialog } from "./channel-edit-dialog";
11
11
  import { WhatsappQrDialog } from "./whatsapp-qr-dialog";
12
12
  import { WhatsappIcon } from "./whatsapp-icon";
13
- import { Button } from "./ui/button";
14
13
  import {
14
+ Button,
15
15
  AlertDialog,
16
16
  AlertDialogAction,
17
17
  AlertDialogCancel,
@@ -20,8 +20,8 @@ import {
20
20
  AlertDialogFooter,
21
21
  AlertDialogHeader,
22
22
  AlertDialogTitle,
23
- } from "./ui/alert-dialog";
24
- import { Skeleton } from "./ui/skeleton";
23
+ Skeleton,
24
+ } from "@greatapps/greatauth-ui/ui";
25
25
  import { Plus, QrCode, Unplug, LogOut } from "lucide-react";
26
26
  import { toast } from "sonner";
27
27
 
@@ -14,10 +14,11 @@ import {
14
14
  CardContent,
15
15
  CardHeader,
16
16
  CardTitle,
17
- } from "./ui/card";
18
- import { Badge } from "./ui/badge";
19
- import { Progress } from "./ui/progress";
20
- import { Skeleton } from "./ui/skeleton";
17
+ Badge,
18
+ Progress,
19
+ Skeleton,
20
+ cn,
21
+ } from "@greatapps/greatauth-ui/ui";
21
22
  import {
22
23
  Inbox as InboxIcon,
23
24
  MessageCircle,
@@ -27,7 +28,6 @@ import {
27
28
  } from "lucide-react";
28
29
  import { formatDistanceToNow } from "date-fns";
29
30
  import { ptBR } from "date-fns/locale";
30
- import { cn } from "../lib/utils";
31
31
 
32
32
  // --- Helpers ---
33
33
 
@@ -1,7 +1,6 @@
1
1
  import { useState, useRef } from "react";
2
2
  import { Send } from "lucide-react";
3
- import { Button } from "./ui/button";
4
- import { Textarea } from "./ui/textarea";
3
+ import { Button, Textarea } from "@greatapps/greatauth-ui/ui";
5
4
 
6
5
  export interface ChatInputProps {
7
6
  onSend: (content: string) => void;
@@ -4,14 +4,7 @@ import { groupMessagesByDate } from "../utils/group-messages";
4
4
  import { formatDateGroup } from "../utils/format-date";
5
5
  import { MessageBubble } from "./message-bubble";
6
6
  import { ChatInput } from "./chat-input";
7
- import { Skeleton } from "./ui/skeleton";
8
- import {
9
- Select,
10
- SelectContent,
11
- SelectItem,
12
- SelectTrigger,
13
- SelectValue,
14
- } from "./ui/select";
7
+ import { Skeleton, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@greatapps/greatauth-ui/ui";
15
8
 
16
9
  export interface ChatViewProps {
17
10
  messages: InboxMessage[];
@@ -1,5 +1,4 @@
1
- import { Avatar, AvatarFallback } from "./ui/avatar";
2
- import { cn } from "../lib/utils";
1
+ import { Avatar, AvatarFallback, cn } from "@greatapps/greatauth-ui/ui";
3
2
 
4
3
  const COLORS = [
5
4
  "bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-300",
@@ -10,10 +10,10 @@ import {
10
10
  DialogHeader,
11
11
  DialogTitle,
12
12
  DialogFooter,
13
- } from "./ui/dialog";
14
- import { Button } from "./ui/button";
15
- import { Input } from "./ui/input";
16
- import { Label } from "./ui/label";
13
+ Button,
14
+ Input,
15
+ Label,
16
+ } from "@greatapps/greatauth-ui/ui";
17
17
  import { Loader2 } from "lucide-react";
18
18
  import { toast } from "sonner";
19
19
 
@@ -1,8 +1,6 @@
1
1
  import type { Contact } from "../types";
2
2
  import { ContactAvatar } from "./contact-avatar";
3
- import { Button } from "./ui/button";
4
- import { Skeleton } from "./ui/skeleton";
5
- import { Separator } from "./ui/separator";
3
+ import { Button, Skeleton, Separator, cn } from "@greatapps/greatauth-ui/ui";
6
4
  import {
7
5
  X,
8
6
  Phone,
@@ -13,7 +11,6 @@ import {
13
11
  } from "lucide-react";
14
12
  import { format } from "date-fns";
15
13
  import { ptBR } from "date-fns/locale";
16
- import { cn } from "../lib/utils";
17
14
 
18
15
  function InfoRow({
19
16
  icon: Icon,
@@ -4,7 +4,7 @@ import { useState } from "react";
4
4
  import type { GchatHookConfig } from "../hooks/types";
5
5
  import { ContactsTable } from "./contacts-table";
6
6
  import { ContactFormDialog } from "./contact-form-dialog";
7
- import { Button } from "./ui/button";
7
+ import { Button } from "@greatapps/greatauth-ui/ui";
8
8
  import { Plus } from "lucide-react";
9
9
 
10
10
  export interface ContactsPageProps {
@@ -7,13 +7,11 @@ import type { GchatHookConfig } from "../hooks/types";
7
7
  import { useContacts, useDeleteContact } from "../hooks/use-contacts";
8
8
  import { ContactFormDialog } from "./contact-form-dialog";
9
9
  import { DataTable } from "./data-table";
10
- import { Input } from "./ui/input";
11
10
  import {
11
+ Input,
12
12
  Tooltip,
13
13
  TooltipTrigger,
14
14
  TooltipContent,
15
- } from "./ui/tooltip";
16
- import {
17
15
  AlertDialog,
18
16
  AlertDialogAction,
19
17
  AlertDialogCancel,
@@ -22,8 +20,8 @@ import {
22
20
  AlertDialogFooter,
23
21
  AlertDialogHeader,
24
22
  AlertDialogTitle,
25
- } from "./ui/alert-dialog";
26
- import { Button } from "./ui/button";
23
+ Button,
24
+ } from "@greatapps/greatauth-ui/ui";
27
25
  import { Pencil, Trash2, Search } from "lucide-react";
28
26
  import { format } from "date-fns";
29
27
  import { ptBR } from "date-fns/locale";
@@ -16,11 +16,11 @@ import {
16
16
  TableHead,
17
17
  TableHeader,
18
18
  TableRow,
19
- } from "./ui/table";
20
- import { Button } from "./ui/button";
21
- import { Skeleton } from "./ui/skeleton";
19
+ Button,
20
+ Skeleton,
21
+ cn,
22
+ } from "@greatapps/greatauth-ui/ui";
22
23
  import { ChevronLeft, ChevronRight, ArrowUp, ArrowDown, ArrowUpDown } from "lucide-react";
23
- import { cn } from "../lib/utils";
24
24
 
25
25
  export interface DataTableProps<TData, TValue> {
26
26
  columns: ColumnDef<TData, TValue>[];
@@ -1,9 +1,11 @@
1
1
  import { useState } from "react";
2
2
  import type { Inbox } from "../types";
3
3
  import { ContactAvatar } from "./contact-avatar";
4
- import { Badge } from "./ui/badge";
5
- import { Tooltip, TooltipTrigger, TooltipContent } from "./ui/tooltip";
6
4
  import {
5
+ Badge,
6
+ Tooltip,
7
+ TooltipTrigger,
8
+ TooltipContent,
7
9
  AlertDialog,
8
10
  AlertDialogAction,
9
11
  AlertDialogCancel,
@@ -12,11 +14,11 @@ import {
12
14
  AlertDialogFooter,
13
15
  AlertDialogHeader,
14
16
  AlertDialogTitle,
15
- } from "./ui/alert-dialog";
17
+ cn,
18
+ } from "@greatapps/greatauth-ui/ui";
16
19
  import { formatDistanceToNow } from "date-fns";
17
20
  import { ptBR } from "date-fns/locale";
18
21
  import { Trash2 } from "lucide-react";
19
- import { cn } from "../lib/utils";
20
22
 
21
23
  const statusColors: Record<string, string> = {
22
24
  open: "bg-green-500/10 text-green-600 border-green-200",
@@ -20,14 +20,7 @@ import { useGetContact } from "../hooks/use-contacts";
20
20
  import { InboxSidebar } from "./inbox-sidebar";
21
21
  import { ChatView } from "./chat-view";
22
22
  import { ContactInfoPanel } from "./contact-info-panel";
23
- import { Button } from "./ui/button";
24
- import {
25
- Select,
26
- SelectContent,
27
- SelectItem,
28
- SelectTrigger,
29
- SelectValue,
30
- } from "./ui/select";
23
+ import { Button, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@greatapps/greatauth-ui/ui";
31
24
  import { MessageCircle, User } from "lucide-react";
32
25
 
33
26
  export interface InboxPageProps {
@@ -1,11 +1,7 @@
1
1
  import { useState, useMemo } from "react";
2
2
  import type { Inbox } from "../types";
3
3
  import { InboxItem } from "./inbox-item";
4
- import { Input } from "./ui/input";
5
- import { Tabs, TabsList, TabsTrigger } from "./ui/tabs";
6
- import { Button } from "./ui/button";
7
- import { Skeleton } from "./ui/skeleton";
8
- import { ScrollArea } from "./ui/scroll-area";
4
+ import { Input, Tabs, TabsList, TabsTrigger, Button, Skeleton, ScrollArea } from "@greatapps/greatauth-ui/ui";
9
5
  import { Search, Plus, Inbox as InboxIcon } from "lucide-react";
10
6
 
11
7
  const STATUS_TABS = [
@@ -1,6 +1,5 @@
1
1
  import { useState } from "react";
2
2
  import type { InboxMessage } from "../types";
3
- import { cn } from "../lib/utils";
4
3
  import { formatMessageTime } from "../utils/format-date";
5
4
  import {
6
5
  Check,
@@ -18,12 +17,11 @@ import {
18
17
  Ban,
19
18
  } from "lucide-react";
20
19
  import {
20
+ cn,
21
21
  DropdownMenu,
22
22
  DropdownMenuContent,
23
23
  DropdownMenuItem,
24
24
  DropdownMenuTrigger,
25
- } from "./ui/dropdown-menu";
26
- import {
27
25
  AlertDialog,
28
26
  AlertDialogAction,
29
27
  AlertDialogCancel,
@@ -32,9 +30,9 @@ import {
32
30
  AlertDialogFooter,
33
31
  AlertDialogHeader,
34
32
  AlertDialogTitle,
35
- } from "./ui/alert-dialog";
36
- import { Button } from "./ui/button";
37
- import { Textarea } from "./ui/textarea";
33
+ Button,
34
+ Textarea,
35
+ } from "@greatapps/greatauth-ui/ui";
38
36
 
39
37
  const statusIcons: Record<string, React.ReactNode> = {
40
38
  pending: <Clock className="h-3 w-3 animate-pulse" />,
@@ -8,23 +8,19 @@ import {
8
8
  DialogTitle,
9
9
  DialogDescription,
10
10
  DialogFooter,
11
- } from "./ui/dialog";
12
- import {
13
11
  Command,
14
12
  CommandInput,
15
13
  CommandList,
16
14
  CommandEmpty,
17
15
  CommandGroup,
18
16
  CommandItem,
19
- } from "./ui/command";
20
- import {
21
17
  Select,
22
18
  SelectContent,
23
19
  SelectItem,
24
20
  SelectTrigger,
25
21
  SelectValue,
26
- } from "./ui/select";
27
- import { Button } from "./ui/button";
22
+ Button,
23
+ } from "@greatapps/greatauth-ui/ui";
28
24
  import { Loader2 } from "lucide-react";
29
25
 
30
26
  export interface NewConversationDialogProps {
@@ -9,8 +9,8 @@ import {
9
9
  DialogHeader,
10
10
  DialogTitle,
11
11
  DialogDescription,
12
- } from "./ui/dialog";
13
- import { Button } from "./ui/button";
12
+ Button,
13
+ } from "@greatapps/greatauth-ui/ui";
14
14
  import { Loader2, Check, AlertCircle, RefreshCw } from "lucide-react";
15
15
  import { toast } from "sonner";
16
16
 
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import type { WhatsappStatus } from "../types";
4
- import { Badge } from "./ui/badge";
4
+ import { Badge } from "@greatapps/greatauth-ui/ui";
5
5
 
6
6
  export interface WhatsappStatusBadgeProps {
7
7
  status: WhatsappStatus | undefined | null;
package/src/index.ts CHANGED
@@ -15,7 +15,7 @@ export { createGchatClient } from "./client";
15
15
  export type { GchatClientConfig } from "./client";
16
16
 
17
17
  // Utils
18
- export { cn } from "./lib/utils";
18
+ export { cn } from "@greatapps/greatauth-ui/ui";
19
19
  export { groupMessagesByDate, formatDateGroup, formatMessageTime } from "./utils";
20
20
 
21
21
  // Hooks
@@ -1,167 +0,0 @@
1
- import * as React from "react";
2
- import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
3
-
4
- import { cn } from "../../lib/utils";
5
- import { Button } from "./button";
6
-
7
- function AlertDialog({
8
- ...props
9
- }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
10
- return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
11
- }
12
-
13
- function AlertDialogTrigger({
14
- ...props
15
- }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
16
- return (
17
- <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
18
- );
19
- }
20
-
21
- function AlertDialogPortal({
22
- ...props
23
- }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
24
- return (
25
- <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
26
- );
27
- }
28
-
29
- function AlertDialogOverlay({
30
- className,
31
- ...props
32
- }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {
33
- return (
34
- <AlertDialogPrimitive.Overlay
35
- data-slot="alert-dialog-overlay"
36
- className={cn(
37
- "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50",
38
- className,
39
- )}
40
- {...props}
41
- />
42
- );
43
- }
44
-
45
- function AlertDialogContent({
46
- className,
47
- ...props
48
- }: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {
49
- return (
50
- <AlertDialogPortal>
51
- <AlertDialogOverlay />
52
- <AlertDialogPrimitive.Content
53
- data-slot="alert-dialog-content"
54
- className={cn(
55
- "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 bg-background ring-foreground/10 gap-6 rounded-xl p-6 ring-1 duration-100 sm:max-w-lg fixed top-1/2 left-1/2 z-50 grid w-full max-w-xs -translate-x-1/2 -translate-y-1/2 outline-none",
56
- className,
57
- )}
58
- {...props}
59
- />
60
- </AlertDialogPortal>
61
- );
62
- }
63
-
64
- function AlertDialogHeader({
65
- className,
66
- ...props
67
- }: React.ComponentProps<"div">) {
68
- return (
69
- <div
70
- data-slot="alert-dialog-header"
71
- className={cn("grid gap-1.5 text-center sm:text-left", className)}
72
- {...props}
73
- />
74
- );
75
- }
76
-
77
- function AlertDialogFooter({
78
- className,
79
- ...props
80
- }: React.ComponentProps<"div">) {
81
- return (
82
- <div
83
- data-slot="alert-dialog-footer"
84
- className={cn(
85
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
86
- className,
87
- )}
88
- {...props}
89
- />
90
- );
91
- }
92
-
93
- function AlertDialogTitle({
94
- className,
95
- ...props
96
- }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
97
- return (
98
- <AlertDialogPrimitive.Title
99
- data-slot="alert-dialog-title"
100
- className={cn("text-lg font-medium", className)}
101
- {...props}
102
- />
103
- );
104
- }
105
-
106
- function AlertDialogDescription({
107
- className,
108
- ...props
109
- }: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
110
- return (
111
- <AlertDialogPrimitive.Description
112
- data-slot="alert-dialog-description"
113
- className={cn("text-muted-foreground text-sm", className)}
114
- {...props}
115
- />
116
- );
117
- }
118
-
119
- function AlertDialogAction({
120
- className,
121
- variant = "default",
122
- size = "default",
123
- ...props
124
- }: React.ComponentProps<typeof AlertDialogPrimitive.Action> &
125
- Partial<Pick<React.ComponentProps<typeof Button>, "variant" | "size">>) {
126
- return (
127
- <Button variant={variant} size={size} asChild>
128
- <AlertDialogPrimitive.Action
129
- data-slot="alert-dialog-action"
130
- className={cn(className)}
131
- {...props}
132
- />
133
- </Button>
134
- );
135
- }
136
-
137
- function AlertDialogCancel({
138
- className,
139
- variant = "outline",
140
- size = "default",
141
- ...props
142
- }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> &
143
- Partial<Pick<React.ComponentProps<typeof Button>, "variant" | "size">>) {
144
- return (
145
- <Button variant={variant} size={size} asChild>
146
- <AlertDialogPrimitive.Cancel
147
- data-slot="alert-dialog-cancel"
148
- className={cn(className)}
149
- {...props}
150
- />
151
- </Button>
152
- );
153
- }
154
-
155
- export {
156
- AlertDialog,
157
- AlertDialogAction,
158
- AlertDialogCancel,
159
- AlertDialogContent,
160
- AlertDialogDescription,
161
- AlertDialogFooter,
162
- AlertDialogHeader,
163
- AlertDialogOverlay,
164
- AlertDialogPortal,
165
- AlertDialogTitle,
166
- AlertDialogTrigger,
167
- };
@@ -1,51 +0,0 @@
1
- import * as React from "react";
2
- import { Avatar as AvatarPrimitive } from "radix-ui";
3
-
4
- import { cn } from "../../lib/utils";
5
-
6
- function Avatar({
7
- className,
8
- ...props
9
- }: React.ComponentProps<typeof AvatarPrimitive.Root>) {
10
- return (
11
- <AvatarPrimitive.Root
12
- data-slot="avatar"
13
- className={cn(
14
- "relative flex size-8 shrink-0 overflow-hidden rounded-full",
15
- className,
16
- )}
17
- {...props}
18
- />
19
- );
20
- }
21
-
22
- function AvatarImage({
23
- className,
24
- ...props
25
- }: React.ComponentProps<typeof AvatarPrimitive.Image>) {
26
- return (
27
- <AvatarPrimitive.Image
28
- data-slot="avatar-image"
29
- className={cn("aspect-square size-full", className)}
30
- {...props}
31
- />
32
- );
33
- }
34
-
35
- function AvatarFallback({
36
- className,
37
- ...props
38
- }: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
39
- return (
40
- <AvatarPrimitive.Fallback
41
- data-slot="avatar-fallback"
42
- className={cn(
43
- "flex size-full items-center justify-center rounded-full bg-muted",
44
- className,
45
- )}
46
- {...props}
47
- />
48
- );
49
- }
50
-
51
- export { Avatar, AvatarImage, AvatarFallback };