spb/vquant Public MIT
VibeQuant — AI-powered institutional-grade financial intelligence platform.
TypeScript 84.3%
Python 11.7%
JavaScript 1.6%
CSS 1.5%
HTML 0.7%
1/*2 * =============================================================================3 * VibeQuant (vquant) — AI-Powered Financial Intelligence Platform4 * -----------------------------------------------------------------------------5 * File: client/src/components/ui/sheet.tsx6 *7 * Author: Simon-Pierre Boucher8 * Contact: contact@spboucher.ai9 * Website: https://www.spboucher.ai10 * Demo: https://www.vquant.ai11 * License: MIT (see LICENSE)12 *13 * Copyright © 2026 Simon-Pierre Boucher. All rights reserved.14 * =============================================================================15 */1617"use client"1819import * as React from "react"20import * as SheetPrimitive from "@radix-ui/react-dialog"21import { cva, type VariantProps } from "class-variance-authority"22import { X } from "lucide-react"2324import { cn } from "@/lib/utils"2526const Sheet = SheetPrimitive.Root2728const SheetTrigger = SheetPrimitive.Trigger2930const SheetClose = SheetPrimitive.Close3132const SheetPortal = SheetPrimitive.Portal3334const SheetOverlay = React.forwardRef<35 React.ElementRef<typeof SheetPrimitive.Overlay>,36 React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>37>(({ className, ...props }, ref) => (38 <SheetPrimitive.Overlay39 className={cn(40 "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",41 className42 )}43 {...props}44 ref={ref}45 />46))47SheetOverlay.displayName = SheetPrimitive.Overlay.displayName4849const sheetVariants = cva(50 "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",51 {52 variants: {53 side: {54 top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",55 bottom:56 "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",57 left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",58 right:59 "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",60 },61 },62 defaultVariants: {63 side: "right",64 },65 }66)6768interface SheetContentProps69 extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,70 VariantProps<typeof sheetVariants> {}7172const SheetContent = React.forwardRef<73 React.ElementRef<typeof SheetPrimitive.Content>,74 SheetContentProps75>(({ side = "right", className, children, ...props }, ref) => (76 <SheetPortal>77 <SheetOverlay />78 <SheetPrimitive.Content79 ref={ref}80 className={cn(sheetVariants({ side }), className)}81 {...props}82 >83 {children}84 <SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">85 <X className="h-4 w-4" />86 <span className="sr-only">Close</span>87 </SheetPrimitive.Close>88 </SheetPrimitive.Content>89 </SheetPortal>90))91SheetContent.displayName = SheetPrimitive.Content.displayName9293const SheetHeader = ({94 className,95 ...props96}: React.HTMLAttributes<HTMLDivElement>) => (97 <div98 className={cn(99 "flex flex-col space-y-2 text-center sm:text-left",100 className101 )}102 {...props}103 />104)105SheetHeader.displayName = "SheetHeader"106107const SheetFooter = ({108 className,109 ...props110}: React.HTMLAttributes<HTMLDivElement>) => (111 <div112 className={cn(113 "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",114 className115 )}116 {...props}117 />118)119SheetFooter.displayName = "SheetFooter"120121const SheetTitle = React.forwardRef<122 React.ElementRef<typeof SheetPrimitive.Title>,123 React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>124>(({ className, ...props }, ref) => (125 <SheetPrimitive.Title126 ref={ref}127 className={cn("text-lg font-semibold text-foreground", className)}128 {...props}129 />130))131SheetTitle.displayName = SheetPrimitive.Title.displayName132133const SheetDescription = React.forwardRef<134 React.ElementRef<typeof SheetPrimitive.Description>,135 React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>136>(({ className, ...props }, ref) => (137 <SheetPrimitive.Description138 ref={ref}139 className={cn("text-sm text-muted-foreground", className)}140 {...props}141 />142))143SheetDescription.displayName = SheetPrimitive.Description.displayName144145export {146 Sheet,147 SheetPortal,148 SheetOverlay,149 SheetTrigger,150 SheetClose,151 SheetContent,152 SheetHeader,153 SheetFooter,154 SheetTitle,155 SheetDescription,156}157