/** * Drawer — WealthX DS overrides (vaul/shadcn base) * * Changes from shadcn default: * - DrawerOverlay: `bg-black/50` → `bg-foreground/50` — uses DS foreground token (matches Figma overlay) * - DrawerContent: removed `rounded-b-lg` / `rounded-t-lg` — sharp corners per Figma (no radius) * - DrawerContent: handle bar also shown for `direction=top` (not just bottom) * - DrawerHeader: removed `text-center` for top/bottom — always left-aligned per DS rule * - DrawerTitle: added `text-lg` — matches Figma Text-lg/Semibold */ import { type ReactElement } from "react"; import * as React from "react"; import { Drawer as DrawerPrimitive } from "vaul"; import { cn } from "@/lib/utils"; import { useThemeVars } from "@/lib/theme-provider"; export type DrawerProps = React.ComponentProps; function Drawer({ ...props }: DrawerProps): ReactElement { return ; } export type DrawerTriggerProps = React.ComponentProps< typeof DrawerPrimitive.Trigger >; function DrawerTrigger({ ...props }: DrawerTriggerProps): ReactElement { return ; } export type DrawerPortalProps = React.ComponentProps< typeof DrawerPrimitive.Portal >; function DrawerPortal({ ...props }: DrawerPortalProps): ReactElement { return ; } export type DrawerCloseProps = React.ComponentProps< typeof DrawerPrimitive.Close >; function DrawerClose({ ...props }: DrawerCloseProps): ReactElement { return ; } export type DrawerOverlayProps = React.ComponentProps< typeof DrawerPrimitive.Overlay >; function DrawerOverlay({ className, ...props }: DrawerOverlayProps): ReactElement { return ( ); } export type DrawerContentProps = React.ComponentProps< typeof DrawerPrimitive.Content >; function DrawerContent({ className, children, style, ...props }: DrawerContentProps): ReactElement { const themeVars = useThemeVars(); return ( {/* WealthX: handle shown for both top and bottom directions */}
{children} ); } export type DrawerHeaderProps = React.ComponentProps<"div">; function DrawerHeader({ className, ...props }: DrawerHeaderProps): ReactElement { return (
); } export type DrawerFooterProps = React.ComponentProps<"div">; function DrawerFooter({ className, ...props }: DrawerFooterProps): ReactElement { return (
); } export type DrawerTitleProps = React.ComponentProps< typeof DrawerPrimitive.Title >; function DrawerTitle({ className, ...props }: DrawerTitleProps): ReactElement { return ( ); } export type DrawerDescriptionProps = React.ComponentProps< typeof DrawerPrimitive.Description >; function DrawerDescription({ className, ...props }: DrawerDescriptionProps): ReactElement { return ( ); } export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };