'use client'; import * as React from 'react'; import { Drawer as DrawerPrimitive } from 'vaul'; import { cn } from '../../shared/utils'; /** * Mobile-first bottom sheet drawer (accessible pull-up panel). * * @description * Replaces modals on mobile devices by sliding a panel up from the bottom. * Built on Vaul. Supports direction: `top`, `bottom` (default), `left`, `right`. * * @ai-rules * 1. Compose with `DrawerTrigger > DrawerContent > DrawerHeader + DrawerFooter`. * 2. On mobile corporate screens, prefer `` for detail actions and `` for side navigation panels. * 3. For desktop-first side panels, use `` instead. */ function Drawer({ ...props }: React.ComponentProps) { return ; } function DrawerTrigger({ ...props }: React.ComponentProps) { return ; } function DrawerPortal({ ...props }: React.ComponentProps) { return ; } function DrawerClose({ ...props }: React.ComponentProps) { return ; } const DrawerOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => { return ( ); }); DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName; function DrawerContent({ className, children, ...props }: React.ComponentProps) { return (
{children} ); } function DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) { return (
); } function DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) { return (
); } function DrawerTitle({ className, ...props }: React.ComponentProps) { return ( ); } function DrawerDescription({ className, ...props }: React.ComponentProps) { return ( ); } function DrawerHandle({ className, ...props }: React.ComponentProps<'div'>) { return (
); } export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, DrawerHandle, };