import * as React from "react"; import { cva, type VariantProps } from "class-variance-authority"; import { cn } from "@/lib/utils"; const inputVariants = cva( "flex w-full bg-background font-sans text-foreground transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50", { variants: { variant: { default: "border border-border focus:border-foreground", filled: "border-0 bg-foreground/5 focus:bg-foreground/10", flushed: "border-0 border-b border-border rounded-none px-0 focus:border-foreground", }, inputSize: { sm: "h-8 px-3 text-xs", md: "h-10 px-4 text-sm", lg: "h-12 px-4 text-base", }, }, defaultVariants: { variant: "default", inputSize: "md", }, } ); export interface InputProps extends Omit, "size">, VariantProps { error?: boolean; /** * ID of the element (typically a `

`) that describes the error * state. When provided together with `error={true}`, the input gets * `aria-invalid="true"` and `aria-errormessage={errorMessageId}` so * screen readers announce the validation message on focus. */ errorMessageId?: string; } const Input = React.forwardRef( ( { className, variant, inputSize, error, errorMessageId, type, ...props }, ref ) => { return ( ); } ); Input.displayName = "Input"; export { Input, inputVariants };