SPB Git

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%
3.6 KB · 135 lines tsx
Raw Blame History
1/*2 * =============================================================================3 *  VibeQuant (vquant) — AI-Powered Financial Intelligence Platform4 * -----------------------------------------------------------------------------5 *  File:      client/src/components/ui/drawer.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 { Drawer as DrawerPrimitive } from "vaul"2122import { cn } from "@/lib/utils"2324const Drawer = ({25  shouldScaleBackground = true,26  ...props27}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (28  <DrawerPrimitive.Root29    shouldScaleBackground={shouldScaleBackground}30    {...props}31  />32)33Drawer.displayName = "Drawer"3435const DrawerTrigger = DrawerPrimitive.Trigger3637const DrawerPortal = DrawerPrimitive.Portal3839const DrawerClose = DrawerPrimitive.Close4041const DrawerOverlay = React.forwardRef<42  React.ElementRef<typeof DrawerPrimitive.Overlay>,43  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>44>(({ className, ...props }, ref) => (45  <DrawerPrimitive.Overlay46    ref={ref}47    className={cn("fixed inset-0 z-50 bg-black/80", className)}48    {...props}49  />50))51DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName5253const DrawerContent = React.forwardRef<54  React.ElementRef<typeof DrawerPrimitive.Content>,55  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>56>(({ className, children, ...props }, ref) => (57  <DrawerPortal>58    <DrawerOverlay />59    <DrawerPrimitive.Content60      ref={ref}61      className={cn(62        "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",63        className64      )}65      {...props}66    >67      <div className="mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" />68      {children}69    </DrawerPrimitive.Content>70  </DrawerPortal>71))72DrawerContent.displayName = "DrawerContent"7374const DrawerHeader = ({75  className,76  ...props77}: React.HTMLAttributes<HTMLDivElement>) => (78  <div79    className={cn("grid gap-1.5 p-4 text-center sm:text-left", className)}80    {...props}81  />82)83DrawerHeader.displayName = "DrawerHeader"8485const DrawerFooter = ({86  className,87  ...props88}: React.HTMLAttributes<HTMLDivElement>) => (89  <div90    className={cn("mt-auto flex flex-col gap-2 p-4", className)}91    {...props}92  />93)94DrawerFooter.displayName = "DrawerFooter"9596const DrawerTitle = React.forwardRef<97  React.ElementRef<typeof DrawerPrimitive.Title>,98  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>99>(({ className, ...props }, ref) => (100  <DrawerPrimitive.Title101    ref={ref}102    className={cn(103      "text-lg font-semibold leading-none tracking-tight",104      className105    )}106    {...props}107  />108))109DrawerTitle.displayName = DrawerPrimitive.Title.displayName110111const DrawerDescription = React.forwardRef<112  React.ElementRef<typeof DrawerPrimitive.Description>,113  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>114>(({ className, ...props }, ref) => (115  <DrawerPrimitive.Description116    ref={ref}117    className={cn("text-sm text-muted-foreground", className)}118    {...props}119  />120))121DrawerDescription.displayName = DrawerPrimitive.Description.displayName122123export {124  Drawer,125  DrawerPortal,126  DrawerOverlay,127  DrawerTrigger,128  DrawerClose,129  DrawerContent,130  DrawerHeader,131  DrawerFooter,132  DrawerTitle,133  DrawerDescription,134}135