// ───────────────────────────────────────────────────────────── // UI Components — Reusable UI primitives // ───────────────────────────────────────────────────────────── 'use client'; import { forwardRef, type ButtonHTMLAttributes, type InputHTMLAttributes } from 'react'; import { cn } from '../../lib/utils'; // ─── Button ────────────────────────────────────────────────── interface ButtonProps extends ButtonHTMLAttributes { variant?: 'primary' | 'secondary' | 'ghost' | 'danger'; size?: 'sm' | 'md' | 'lg'; } export const Button = forwardRef( ({ className, variant = 'primary', size = 'md', ...props }, ref) => { const variants = { primary: 'bg-editor-accent hover:bg-editor-accent-hover text-white', secondary: 'bg-editor-surface hover:bg-editor-hover text-editor-text border border-editor-border', ghost: 'hover:bg-editor-hover text-editor-text-muted hover:text-editor-text', danger: 'bg-editor-error hover:bg-red-600 text-white', }; const sizes = { sm: 'px-2.5 py-1 text-xs', md: 'px-4 py-2 text-sm', lg: 'px-6 py-2.5 text-base', }; return (