import * as React from "react"; import { Slot } from "@radix-ui/react-slot"; import { cva, type VariantProps } from "class-variance-authority"; import { cn } from "@/lib/utils"; const buttonVariants = cva( // ADR 0007 (Opcion 2, "Atelier calido"): radio moderado en vez de // rounded-full, ring de foco tintado con el acento de marca en vez de // cyan generico. "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-extrabold transition-all focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ari-cobre/40 disabled:pointer-events-none disabled:opacity-50", { variants: { variant: { default: "bg-slate-950 text-white shadow-lg hover:-translate-y-0.5 hover:bg-slate-800", // Unico color reservado a accion (nunca decorativo) -- bloque // solido, no gradiente, sobre toda la superficie del sitio que // ya usaba esta variant (carrito, WhatsApp, checkout, "Agregar"). primary: "bg-ari-ciruela text-white shadow-lg shadow-ari-ciruela/25 hover:-translate-y-0.5 hover:brightness-110", yellow: "bg-yellow-300 text-slate-950 shadow-lg shadow-yellow-400/25 hover:-translate-y-0.5 hover:bg-yellow-200", outline: "border border-slate-200 bg-white text-slate-950 hover:border-ari-cobre hover:bg-ari-cobre/10", ghost: "text-slate-700 hover:bg-slate-100", }, size: { default: "h-11 px-5", sm: "h-9 px-4 text-xs", lg: "h-13 px-7 text-base", icon: "size-11 p-0", }, }, defaultVariants: { variant: "default", size: "default" }, }, ); export interface ButtonProps extends React.ButtonHTMLAttributes, VariantProps { asChild?: boolean; } export const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => { const Comp = asChild ? Slot : "button"; return ; }); Button.displayName = "Button";