"use client"; import { forwardRef, type ButtonHTMLAttributes, type InputHTMLAttributes, type SelectHTMLAttributes, type TextareaHTMLAttributes, type ReactNode } from "react"; function cx(...parts: Array): string { return parts.filter(Boolean).join(" "); } // -------- Button --------------------------------------------------------- type ButtonVariant = "primary" | "secondary" | "danger" | "ghost"; type ButtonSize = "sm" | "md"; interface ButtonProps extends ButtonHTMLAttributes { variant?: ButtonVariant; size?: ButtonSize; } const variantClasses: Record = { primary: "bg-slate-900 text-white hover:bg-slate-800 border-slate-900", secondary: "bg-white text-slate-900 border-slate-300 hover:bg-slate-50", danger: "bg-red-600 text-white border-red-600 hover:bg-red-500", ghost: "bg-transparent text-slate-700 border-transparent hover:bg-slate-100", }; const sizeClasses: Record = { sm: "px-2.5 py-1.5 text-sm rounded-md", md: "px-4 py-2 text-sm rounded-lg", }; export const Button = forwardRef(function Button( { variant = "primary", size = "md", className, ...props }, ref, ) { return (