'use client' import * as React from 'react' import * as DialogPrimitive from '@radix-ui/react-dialog' import { XIcon } from 'lucide-react' import { cva } from 'class-variance-authority' import type { VariantProps } from 'class-variance-authority' import { cn } from '~/lib/utils' const dialogVariants = cva( 'z-50 grid w-full gap-4 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 sm:rounded-lg border border-neutral-500 bg-white dark:border-neutral-900 dark:bg-neutral-950 dark:text-white', { variants: { variant: { default: 'fixed ', inline: '', }, position: { default: 'left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] 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%]', bl: 'left-6 bottom-6 data-[state=closed]:slide-out-to-bottom-16 data-[state=open]:slide-in-from-bottom-16', bc: 'left-[50%] top-[50%] translate-x-[-50%] bottom-6 data-[state=closed]:slide-out-to-bottom-16 data-[state=open]:slide-in-from-bottom-16', br: 'right-6 bottom-6 data-[state=closed]:slide-out-to-bottom-16 data-[state=open]:slide-in-from-bottom-16', }, size: { default: 'max-w-lg', sm: 'max-w-md', md: 'max-w-lg', lg: 'max-w-xl', xl: 'max-w-2xl', fullscreen: 'w-screen h-screen', }, }, defaultVariants: { variant: 'default', position: 'default', size: 'default', }, }, ) function Dialog({ ...props }: React.ComponentProps) { return } function DialogTrigger({ ...props }: React.ComponentProps) { return } function DialogPortal({ ...props }: React.ComponentProps) { return } function DialogClose({ ...props }: React.ComponentProps) { return } function DialogOverlay({ className, ...props }: React.ComponentProps) { return ( ) } export interface DialogContentProps extends React.ComponentPropsWithoutRef, VariantProps {} function DialogContent({ className, variant = 'default', size, position, children, ...props }: DialogContentProps) { return ( {children} { Close } ) } function DialogHeader({ className, ...props }: React.ComponentProps<'div'>) { return (
) } function DialogFooter({ className, ...props }: React.ComponentProps<'div'>) { return (
) } function DialogTitle({ className, ...props }: React.ComponentProps) { return ( ) } function DialogDescription({ className, ...props }: React.ComponentProps) { return ( ) } export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, }