@create-lft-app/cli 1.0.14 → 1.1.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/bin/cli.js +13 -146
- package/dist/bin/cli.js.map +1 -1
- package/dist/src/index.js +11 -144
- package/dist/src/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/app/auth/login/page.tsx +0 -153
- package/templates/app/dashboard/page.tsx +0 -102
- package/templates/app/globals.css +0 -249
- package/templates/app/layout.tsx +0 -40
- package/templates/app/page.tsx +0 -5
- package/templates/components/dashboard/widget.tsx +0 -113
- package/templates/components/layout/admin-midday-sidebar.tsx +0 -247
- package/templates/components/layout/admin-sidebar.tsx +0 -146
- package/templates/components/layout/header.tsx +0 -71
- package/templates/components/layout/main-content.tsx +0 -28
- package/templates/components/layout/midday-sidebar.tsx +0 -381
- package/templates/components/layout/nav-user.tsx +0 -108
- package/templates/components/layout/page-header.tsx +0 -95
- package/templates/components/layout/sidebar-context.tsx +0 -33
- package/templates/components/layout/sidebar.tsx +0 -194
- package/templates/components/layout/suspension-banner.tsx +0 -21
- package/templates/components/ui/accordion.tsx +0 -58
- package/templates/components/ui/alert-dialog.tsx +0 -165
- package/templates/components/ui/alert.tsx +0 -66
- package/templates/components/ui/avatar.tsx +0 -55
- package/templates/components/ui/badge.tsx +0 -50
- package/templates/components/ui/button.tsx +0 -89
- package/templates/components/ui/calendar.tsx +0 -220
- package/templates/components/ui/card.tsx +0 -89
- package/templates/components/ui/checkbox.tsx +0 -38
- package/templates/components/ui/collapsible.tsx +0 -33
- package/templates/components/ui/command.tsx +0 -196
- package/templates/components/ui/dialog.tsx +0 -153
- package/templates/components/ui/dropdown-menu.tsx +0 -280
- package/templates/components/ui/form.tsx +0 -171
- package/templates/components/ui/icons.tsx +0 -167
- package/templates/components/ui/input.tsx +0 -28
- package/templates/components/ui/label.tsx +0 -25
- package/templates/components/ui/popover.tsx +0 -59
- package/templates/components/ui/progress.tsx +0 -32
- package/templates/components/ui/radio-group.tsx +0 -45
- package/templates/components/ui/scroll-area.tsx +0 -63
- package/templates/components/ui/select.tsx +0 -208
- package/templates/components/ui/separator.tsx +0 -28
- package/templates/components/ui/sheet.tsx +0 -146
- package/templates/components/ui/sidebar.tsx +0 -726
- package/templates/components/ui/skeleton.tsx +0 -15
- package/templates/components/ui/slider.tsx +0 -58
- package/templates/components/ui/sonner.tsx +0 -47
- package/templates/components/ui/spinner.tsx +0 -27
- package/templates/components/ui/submit-button.tsx +0 -47
- package/templates/components/ui/switch.tsx +0 -31
- package/templates/components/ui/table.tsx +0 -120
- package/templates/components/ui/tabs.tsx +0 -75
- package/templates/components/ui/textarea.tsx +0 -26
- package/templates/components/ui/tooltip.tsx +0 -70
- package/templates/hooks/use-mobile.ts +0 -21
- package/templates/lib/supabase/client.ts +0 -8
- package/templates/lib/supabase/server.ts +0 -29
- package/templates/lib/utils.ts +0 -6
- package/templates/modules/auth/actions/auth-actions.ts +0 -12
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import Link from 'next/link'
|
|
4
|
-
import { usePathname } from 'next/navigation'
|
|
5
|
-
import {
|
|
6
|
-
LayoutDashboard,
|
|
7
|
-
Users,
|
|
8
|
-
FileText,
|
|
9
|
-
AlertTriangle,
|
|
10
|
-
BarChart3,
|
|
11
|
-
Calendar,
|
|
12
|
-
Settings,
|
|
13
|
-
Building2,
|
|
14
|
-
Shield,
|
|
15
|
-
UserPlus,
|
|
16
|
-
} from 'lucide-react'
|
|
17
|
-
import { cn } from '@/lib/utils'
|
|
18
|
-
import {
|
|
19
|
-
Sidebar,
|
|
20
|
-
SidebarContent,
|
|
21
|
-
SidebarGroup,
|
|
22
|
-
SidebarGroupContent,
|
|
23
|
-
SidebarGroupLabel,
|
|
24
|
-
SidebarMenu,
|
|
25
|
-
SidebarMenuButton,
|
|
26
|
-
SidebarMenuItem,
|
|
27
|
-
SidebarHeader,
|
|
28
|
-
SidebarFooter,
|
|
29
|
-
} from '@/components/ui/sidebar'
|
|
30
|
-
import { NavUser } from './nav-user'
|
|
31
|
-
|
|
32
|
-
const mainNavItems = [
|
|
33
|
-
{
|
|
34
|
-
title: 'Dashboard',
|
|
35
|
-
url: '/',
|
|
36
|
-
icon: LayoutDashboard,
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
title: 'Clientes',
|
|
40
|
-
url: '/clientes',
|
|
41
|
-
icon: Users,
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
title: 'Onboarding',
|
|
45
|
-
url: '/onboarding',
|
|
46
|
-
icon: UserPlus,
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
title: 'Documentos',
|
|
50
|
-
url: '/documents',
|
|
51
|
-
icon: FileText,
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
title: 'Alertas',
|
|
55
|
-
url: '/alerts',
|
|
56
|
-
icon: AlertTriangle,
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
title: 'Operaciones',
|
|
60
|
-
url: '/operations',
|
|
61
|
-
icon: BarChart3,
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
title: 'Reportes',
|
|
65
|
-
url: '/reports',
|
|
66
|
-
icon: FileText,
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
title: 'Calendario',
|
|
70
|
-
url: '/calendar',
|
|
71
|
-
icon: Calendar,
|
|
72
|
-
},
|
|
73
|
-
]
|
|
74
|
-
|
|
75
|
-
const configNavItems = [
|
|
76
|
-
{
|
|
77
|
-
title: 'Configuración',
|
|
78
|
-
url: '/settings',
|
|
79
|
-
icon: Settings,
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
title: 'Organización',
|
|
83
|
-
url: '/settings/organization',
|
|
84
|
-
icon: Building2,
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
title: 'Onboarding',
|
|
88
|
-
url: '/settings/onboarding',
|
|
89
|
-
icon: UserPlus,
|
|
90
|
-
},
|
|
91
|
-
]
|
|
92
|
-
|
|
93
|
-
interface AppSidebarProps {
|
|
94
|
-
user: {
|
|
95
|
-
email: string
|
|
96
|
-
full_name: string | null
|
|
97
|
-
role: string
|
|
98
|
-
organization?: {
|
|
99
|
-
name: string
|
|
100
|
-
} | null
|
|
101
|
-
} | null
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export function AppSidebar({ user }: AppSidebarProps) {
|
|
105
|
-
const pathname = usePathname()
|
|
106
|
-
|
|
107
|
-
return (
|
|
108
|
-
<Sidebar>
|
|
109
|
-
<SidebarHeader className="border-b border-sidebar-border">
|
|
110
|
-
<div className="flex items-center gap-2 px-4 py-3">
|
|
111
|
-
<div className="flex h-8 w-8 items-center justify-center rounded-lg bg-primary text-primary-foreground font-bold">
|
|
112
|
-
R
|
|
113
|
-
</div>
|
|
114
|
-
<div className="flex flex-col">
|
|
115
|
-
<span className="text-sm font-semibold">Radiant Compliance</span>
|
|
116
|
-
{user?.organization && (
|
|
117
|
-
<span className="text-xs text-muted-foreground">
|
|
118
|
-
{user.organization.name}
|
|
119
|
-
</span>
|
|
120
|
-
)}
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
</SidebarHeader>
|
|
124
|
-
|
|
125
|
-
<SidebarContent>
|
|
126
|
-
<SidebarGroup>
|
|
127
|
-
<SidebarGroupLabel>Principal</SidebarGroupLabel>
|
|
128
|
-
<SidebarGroupContent>
|
|
129
|
-
<SidebarMenu>
|
|
130
|
-
{mainNavItems.map((item) => (
|
|
131
|
-
<SidebarMenuItem key={item.title}>
|
|
132
|
-
<SidebarMenuButton
|
|
133
|
-
asChild
|
|
134
|
-
isActive={pathname === item.url}
|
|
135
|
-
>
|
|
136
|
-
<Link href={item.url}>
|
|
137
|
-
<item.icon className="h-4 w-4" />
|
|
138
|
-
<span>{item.title}</span>
|
|
139
|
-
</Link>
|
|
140
|
-
</SidebarMenuButton>
|
|
141
|
-
</SidebarMenuItem>
|
|
142
|
-
))}
|
|
143
|
-
</SidebarMenu>
|
|
144
|
-
</SidebarGroupContent>
|
|
145
|
-
</SidebarGroup>
|
|
146
|
-
|
|
147
|
-
{user?.role && ['admin', 'super_admin'].includes(user.role) && (
|
|
148
|
-
<SidebarGroup>
|
|
149
|
-
<SidebarGroupLabel>Administración</SidebarGroupLabel>
|
|
150
|
-
<SidebarGroupContent>
|
|
151
|
-
<SidebarMenu>
|
|
152
|
-
{configNavItems.map((item) => (
|
|
153
|
-
<SidebarMenuItem key={item.title}>
|
|
154
|
-
<SidebarMenuButton
|
|
155
|
-
asChild
|
|
156
|
-
isActive={pathname === item.url || pathname.startsWith(item.url + '/')}
|
|
157
|
-
>
|
|
158
|
-
<Link href={item.url}>
|
|
159
|
-
<item.icon className="h-4 w-4" />
|
|
160
|
-
<span>{item.title}</span>
|
|
161
|
-
</Link>
|
|
162
|
-
</SidebarMenuButton>
|
|
163
|
-
</SidebarMenuItem>
|
|
164
|
-
))}
|
|
165
|
-
</SidebarMenu>
|
|
166
|
-
</SidebarGroupContent>
|
|
167
|
-
</SidebarGroup>
|
|
168
|
-
)}
|
|
169
|
-
|
|
170
|
-
{user?.role === 'super_admin' && (
|
|
171
|
-
<SidebarGroup>
|
|
172
|
-
<SidebarGroupLabel>Super Admin</SidebarGroupLabel>
|
|
173
|
-
<SidebarGroupContent>
|
|
174
|
-
<SidebarMenu>
|
|
175
|
-
<SidebarMenuItem>
|
|
176
|
-
<SidebarMenuButton asChild>
|
|
177
|
-
<Link href="/admin">
|
|
178
|
-
<Shield className="h-4 w-4" />
|
|
179
|
-
<span>Panel de Admin</span>
|
|
180
|
-
</Link>
|
|
181
|
-
</SidebarMenuButton>
|
|
182
|
-
</SidebarMenuItem>
|
|
183
|
-
</SidebarMenu>
|
|
184
|
-
</SidebarGroupContent>
|
|
185
|
-
</SidebarGroup>
|
|
186
|
-
)}
|
|
187
|
-
</SidebarContent>
|
|
188
|
-
|
|
189
|
-
<SidebarFooter className="border-t border-sidebar-border">
|
|
190
|
-
<NavUser user={user} />
|
|
191
|
-
</SidebarFooter>
|
|
192
|
-
</Sidebar>
|
|
193
|
-
)
|
|
194
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { AlertTriangle } from 'lucide-react'
|
|
4
|
-
|
|
5
|
-
interface SuspensionBannerProps {
|
|
6
|
-
organizationName: string
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function SuspensionBanner({ organizationName }: SuspensionBannerProps) {
|
|
10
|
-
return (
|
|
11
|
-
<div className="bg-red-500 text-white px-4 py-3">
|
|
12
|
-
<div className="flex items-center justify-center gap-2 text-sm font-medium">
|
|
13
|
-
<AlertTriangle className="h-4 w-4" />
|
|
14
|
-
<span>
|
|
15
|
-
La organización <strong>{organizationName}</strong> se encuentra suspendida.
|
|
16
|
-
Contacte al administrador para más información.
|
|
17
|
-
</span>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
)
|
|
21
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as AccordionPrimitive from "@radix-ui/react-accordion"
|
|
5
|
-
import { ChevronDown } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils"
|
|
8
|
-
|
|
9
|
-
const Accordion = AccordionPrimitive.Root
|
|
10
|
-
|
|
11
|
-
const AccordionItem = React.forwardRef<
|
|
12
|
-
React.ElementRef<typeof AccordionPrimitive.Item>,
|
|
13
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
|
|
14
|
-
>(({ className, ...props }, ref) => (
|
|
15
|
-
<AccordionPrimitive.Item
|
|
16
|
-
ref={ref}
|
|
17
|
-
className={cn("", className)}
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
20
|
-
))
|
|
21
|
-
AccordionItem.displayName = "AccordionItem"
|
|
22
|
-
|
|
23
|
-
const AccordionTrigger = React.forwardRef<
|
|
24
|
-
React.ElementRef<typeof AccordionPrimitive.Trigger>,
|
|
25
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
|
|
26
|
-
>(({ className, children, ...props }, ref) => (
|
|
27
|
-
<AccordionPrimitive.Header className="flex">
|
|
28
|
-
<AccordionPrimitive.Trigger
|
|
29
|
-
ref={ref}
|
|
30
|
-
className={cn(
|
|
31
|
-
"flex flex-1 items-center justify-between py-4 font-medium transition-all [&[data-state=open]>svg]:rotate-180",
|
|
32
|
-
className
|
|
33
|
-
)}
|
|
34
|
-
{...props}
|
|
35
|
-
>
|
|
36
|
-
{children}
|
|
37
|
-
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
|
|
38
|
-
</AccordionPrimitive.Trigger>
|
|
39
|
-
</AccordionPrimitive.Header>
|
|
40
|
-
))
|
|
41
|
-
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName
|
|
42
|
-
|
|
43
|
-
const AccordionContent = React.forwardRef<
|
|
44
|
-
React.ElementRef<typeof AccordionPrimitive.Content>,
|
|
45
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
|
|
46
|
-
>(({ className, children, ...props }, ref) => (
|
|
47
|
-
<AccordionPrimitive.Content
|
|
48
|
-
ref={ref}
|
|
49
|
-
className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
50
|
-
{...props}
|
|
51
|
-
>
|
|
52
|
-
<div className={cn("pb-4 pt-0", className)}>{children}</div>
|
|
53
|
-
</AccordionPrimitive.Content>
|
|
54
|
-
))
|
|
55
|
-
|
|
56
|
-
AccordionContent.displayName = AccordionPrimitive.Content.displayName
|
|
57
|
-
|
|
58
|
-
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
import { buttonVariants } from "@/components/ui/button"
|
|
8
|
-
|
|
9
|
-
function AlertDialog({
|
|
10
|
-
...props
|
|
11
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
|
|
12
|
-
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function AlertDialogTrigger({
|
|
16
|
-
...props
|
|
17
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
|
|
18
|
-
return (
|
|
19
|
-
<AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function AlertDialogPortal({
|
|
24
|
-
...props
|
|
25
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
|
|
26
|
-
return (
|
|
27
|
-
<AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function AlertDialogOverlay({
|
|
32
|
-
className,
|
|
33
|
-
...props
|
|
34
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {
|
|
35
|
-
return (
|
|
36
|
-
<AlertDialogPrimitive.Overlay
|
|
37
|
-
data-slot="alert-dialog-overlay"
|
|
38
|
-
className={cn(
|
|
39
|
-
"fixed inset-0 z-50",
|
|
40
|
-
"bg-[#f6f6f3]/60 dark:bg-[#0C0C0C]/80",
|
|
41
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
42
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
43
|
-
className
|
|
44
|
-
)}
|
|
45
|
-
{...props}
|
|
46
|
-
/>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function AlertDialogContent({
|
|
51
|
-
className,
|
|
52
|
-
...props
|
|
53
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {
|
|
54
|
-
return (
|
|
55
|
-
<AlertDialogPortal>
|
|
56
|
-
<AlertDialogOverlay />
|
|
57
|
-
<AlertDialogPrimitive.Content
|
|
58
|
-
data-slot="alert-dialog-content"
|
|
59
|
-
className={cn(
|
|
60
|
-
"fixed left-[50%] top-[50%] z-50",
|
|
61
|
-
"translate-x-[-50%] translate-y-[-50%]",
|
|
62
|
-
"grid w-full max-w-lg gap-4 border bg-background p-6",
|
|
63
|
-
"duration-200",
|
|
64
|
-
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
65
|
-
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
66
|
-
className
|
|
67
|
-
)}
|
|
68
|
-
{...props}
|
|
69
|
-
/>
|
|
70
|
-
</AlertDialogPortal>
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function AlertDialogHeader({
|
|
75
|
-
className,
|
|
76
|
-
...props
|
|
77
|
-
}: React.ComponentProps<"div">) {
|
|
78
|
-
return (
|
|
79
|
-
<div
|
|
80
|
-
data-slot="alert-dialog-header"
|
|
81
|
-
className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
|
|
82
|
-
{...props}
|
|
83
|
-
/>
|
|
84
|
-
)
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function AlertDialogFooter({
|
|
88
|
-
className,
|
|
89
|
-
...props
|
|
90
|
-
}: React.ComponentProps<"div">) {
|
|
91
|
-
return (
|
|
92
|
-
<div
|
|
93
|
-
data-slot="alert-dialog-footer"
|
|
94
|
-
className={cn(
|
|
95
|
-
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
96
|
-
className
|
|
97
|
-
)}
|
|
98
|
-
{...props}
|
|
99
|
-
/>
|
|
100
|
-
)
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function AlertDialogTitle({
|
|
104
|
-
className,
|
|
105
|
-
...props
|
|
106
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
|
|
107
|
-
return (
|
|
108
|
-
<AlertDialogPrimitive.Title
|
|
109
|
-
data-slot="alert-dialog-title"
|
|
110
|
-
className={cn("text-lg font-semibold", className)}
|
|
111
|
-
{...props}
|
|
112
|
-
/>
|
|
113
|
-
)
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function AlertDialogDescription({
|
|
117
|
-
className,
|
|
118
|
-
...props
|
|
119
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
|
|
120
|
-
return (
|
|
121
|
-
<AlertDialogPrimitive.Description
|
|
122
|
-
data-slot="alert-dialog-description"
|
|
123
|
-
className={cn("text-muted-foreground text-sm", className)}
|
|
124
|
-
{...props}
|
|
125
|
-
/>
|
|
126
|
-
)
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function AlertDialogAction({
|
|
130
|
-
className,
|
|
131
|
-
...props
|
|
132
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {
|
|
133
|
-
return (
|
|
134
|
-
<AlertDialogPrimitive.Action
|
|
135
|
-
className={cn(buttonVariants(), className)}
|
|
136
|
-
{...props}
|
|
137
|
-
/>
|
|
138
|
-
)
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
function AlertDialogCancel({
|
|
142
|
-
className,
|
|
143
|
-
...props
|
|
144
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {
|
|
145
|
-
return (
|
|
146
|
-
<AlertDialogPrimitive.Cancel
|
|
147
|
-
className={cn(buttonVariants({ variant: "outline" }), className)}
|
|
148
|
-
{...props}
|
|
149
|
-
/>
|
|
150
|
-
)
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export {
|
|
154
|
-
AlertDialog,
|
|
155
|
-
AlertDialogPortal,
|
|
156
|
-
AlertDialogOverlay,
|
|
157
|
-
AlertDialogTrigger,
|
|
158
|
-
AlertDialogContent,
|
|
159
|
-
AlertDialogHeader,
|
|
160
|
-
AlertDialogFooter,
|
|
161
|
-
AlertDialogTitle,
|
|
162
|
-
AlertDialogDescription,
|
|
163
|
-
AlertDialogAction,
|
|
164
|
-
AlertDialogCancel,
|
|
165
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
3
|
-
|
|
4
|
-
import { cn } from "@/lib/utils"
|
|
5
|
-
|
|
6
|
-
const alertVariants = cva(
|
|
7
|
-
"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: "bg-card text-card-foreground",
|
|
12
|
-
destructive:
|
|
13
|
-
"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
defaultVariants: {
|
|
17
|
-
variant: "default",
|
|
18
|
-
},
|
|
19
|
-
}
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
function Alert({
|
|
23
|
-
className,
|
|
24
|
-
variant,
|
|
25
|
-
...props
|
|
26
|
-
}: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
|
|
27
|
-
return (
|
|
28
|
-
<div
|
|
29
|
-
data-slot="alert"
|
|
30
|
-
role="alert"
|
|
31
|
-
className={cn(alertVariants({ variant }), className)}
|
|
32
|
-
{...props}
|
|
33
|
-
/>
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
38
|
-
return (
|
|
39
|
-
<div
|
|
40
|
-
data-slot="alert-title"
|
|
41
|
-
className={cn(
|
|
42
|
-
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
|
|
43
|
-
className
|
|
44
|
-
)}
|
|
45
|
-
{...props}
|
|
46
|
-
/>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function AlertDescription({
|
|
51
|
-
className,
|
|
52
|
-
...props
|
|
53
|
-
}: React.ComponentProps<"div">) {
|
|
54
|
-
return (
|
|
55
|
-
<div
|
|
56
|
-
data-slot="alert-description"
|
|
57
|
-
className={cn(
|
|
58
|
-
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
|
|
59
|
-
className
|
|
60
|
-
)}
|
|
61
|
-
{...props}
|
|
62
|
-
/>
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { Alert, AlertTitle, AlertDescription }
|
|
@@ -1,55 +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 "@/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 h-10 w-10 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
|
-
"flex h-full w-full items-center justify-center rounded-full",
|
|
46
|
-
"bg-[#F2F1EF] dark:bg-[#1D1D1D]",
|
|
47
|
-
"text-sm font-medium text-[#606060]",
|
|
48
|
-
className
|
|
49
|
-
)}
|
|
50
|
-
{...props}
|
|
51
|
-
/>
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export { Avatar, AvatarImage, AvatarFallback }
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Slot } from "@radix-ui/react-slot"
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
|
|
7
|
-
const badgeVariants = cva(
|
|
8
|
-
"inline-flex items-center justify-center border px-2.5 py-0.5 text-xs font-medium transition-colors",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default:
|
|
13
|
-
"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
14
|
-
secondary:
|
|
15
|
-
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
16
|
-
destructive:
|
|
17
|
-
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
18
|
-
outline:
|
|
19
|
-
"text-foreground border-border",
|
|
20
|
-
tag:
|
|
21
|
-
"rounded-none border-0 bg-[#F2F1EF] dark:bg-[#1D1D1D] text-[#878787] text-[10px] px-2 py-1",
|
|
22
|
-
"tag-rounded":
|
|
23
|
-
"rounded-full border-0 bg-[#F2F1EF] dark:bg-[#1D1D1D] text-[#878787] text-[12px] px-3 py-1",
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
defaultVariants: {
|
|
27
|
-
variant: "default",
|
|
28
|
-
},
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
function Badge({
|
|
33
|
-
className,
|
|
34
|
-
variant,
|
|
35
|
-
asChild = false,
|
|
36
|
-
...props
|
|
37
|
-
}: React.ComponentProps<"span"> &
|
|
38
|
-
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
|
|
39
|
-
const Comp = asChild ? Slot : "span"
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<Comp
|
|
43
|
-
data-slot="badge"
|
|
44
|
-
className={cn(badgeVariants({ variant }), className)}
|
|
45
|
-
{...props}
|
|
46
|
-
/>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { Badge, badgeVariants }
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Slot } from "@radix-ui/react-slot"
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
|
|
7
|
-
const buttonVariants = cva(
|
|
8
|
-
[
|
|
9
|
-
"inline-flex items-center justify-center gap-2",
|
|
10
|
-
"whitespace-nowrap text-sm font-medium",
|
|
11
|
-
"transition-colors duration-150",
|
|
12
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
13
|
-
"[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
14
|
-
"outline-none focus-visible:outline-none",
|
|
15
|
-
].join(" "),
|
|
16
|
-
{
|
|
17
|
-
variants: {
|
|
18
|
-
variant: {
|
|
19
|
-
default: [
|
|
20
|
-
"bg-primary text-primary-foreground",
|
|
21
|
-
"hover:bg-primary/90",
|
|
22
|
-
"active:scale-[0.98]",
|
|
23
|
-
].join(" "),
|
|
24
|
-
destructive: [
|
|
25
|
-
"bg-destructive text-destructive-foreground",
|
|
26
|
-
"hover:bg-destructive/90",
|
|
27
|
-
].join(" "),
|
|
28
|
-
outline: [
|
|
29
|
-
"border border-border bg-transparent",
|
|
30
|
-
"hover:bg-accent hover:text-accent-foreground",
|
|
31
|
-
].join(" "),
|
|
32
|
-
secondary: [
|
|
33
|
-
"bg-secondary text-secondary-foreground",
|
|
34
|
-
"hover:bg-secondary/80",
|
|
35
|
-
].join(" "),
|
|
36
|
-
ghost: [
|
|
37
|
-
"hover:bg-accent hover:text-accent-foreground",
|
|
38
|
-
].join(" "),
|
|
39
|
-
link: [
|
|
40
|
-
"text-primary underline-offset-4",
|
|
41
|
-
"hover:underline",
|
|
42
|
-
].join(" "),
|
|
43
|
-
icon: [
|
|
44
|
-
"text-[#878787]",
|
|
45
|
-
"hover:bg-accent hover:text-accent-foreground",
|
|
46
|
-
"rounded-full",
|
|
47
|
-
].join(" "),
|
|
48
|
-
},
|
|
49
|
-
size: {
|
|
50
|
-
default: "h-10 px-4 py-2 rounded-md",
|
|
51
|
-
sm: "h-8 px-3 text-xs rounded-md",
|
|
52
|
-
lg: "h-11 px-8 rounded-md",
|
|
53
|
-
xl: "h-12 px-10 rounded-md",
|
|
54
|
-
icon: "h-8 w-8",
|
|
55
|
-
"icon-sm": "h-6 w-6",
|
|
56
|
-
"icon-lg": "h-10 w-10",
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
defaultVariants: {
|
|
60
|
-
variant: "default",
|
|
61
|
-
size: "default",
|
|
62
|
-
},
|
|
63
|
-
}
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
function Button({
|
|
67
|
-
className,
|
|
68
|
-
variant = "default",
|
|
69
|
-
size = "default",
|
|
70
|
-
asChild = false,
|
|
71
|
-
...props
|
|
72
|
-
}: React.ComponentProps<"button"> &
|
|
73
|
-
VariantProps<typeof buttonVariants> & {
|
|
74
|
-
asChild?: boolean
|
|
75
|
-
}) {
|
|
76
|
-
const Comp = asChild ? Slot : "button"
|
|
77
|
-
|
|
78
|
-
return (
|
|
79
|
-
<Comp
|
|
80
|
-
data-slot="button"
|
|
81
|
-
data-variant={variant}
|
|
82
|
-
data-size={size}
|
|
83
|
-
className={cn(buttonVariants({ variant, size, className }))}
|
|
84
|
-
{...props}
|
|
85
|
-
/>
|
|
86
|
-
)
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export { Button, buttonVariants }
|