/** * @usevyre/react — Input + Field * * AI CONTEXT: * ┌─────────────────────────────────────────────────────────┐ * │ Components: Field + Input + Textarea │ * │ Import: import { Field, Input, Textarea } from "@usevyre/react" │ * │ │ * │ Field props (props-based, simplest): │ * │ label = string │ * │ hint = string (helper text below input) │ * │ state = "idle"|"error"|"success"|"warning" │ * │ required = boolean │ * │ Field composable parts (richer layouts): │ * │ FieldLabel · FieldDescription · FieldError · │ * │ FieldGroup · FieldSet (props-based API still works) │ * │ │ * │ Input props: │ * │ size = "sm"|"md"(default)|"lg" │ * │ leftElement = ReactNode (icon inside input, left) │ * │ rightElement = ReactNode (icon inside input, right) │ * │ + all native props │ * └─────────────────────────────────────────────────────────┘ * * @example * // Basic field with validation * * * * * // Input with icon * * } placeholder="Search..." /> * */ import React from "react"; import type { FieldState, Size, BaseProps } from "../../types"; export interface FieldProps extends React.HTMLAttributes, BaseProps { label?: string; hint?: string; state?: FieldState; required?: boolean; htmlFor?: string; } export declare const Field: React.ForwardRefExoticComponent>; export interface FieldLabelProps extends React.LabelHTMLAttributes, BaseProps { required?: boolean; } export declare const FieldLabel: React.ForwardRefExoticComponent>; export interface FieldDescriptionProps extends React.HTMLAttributes, BaseProps { } export declare const FieldDescription: React.ForwardRefExoticComponent>; export interface FieldErrorProps extends React.HTMLAttributes, BaseProps { } export declare const FieldError: React.ForwardRefExoticComponent>; export interface FieldGroupProps extends React.HTMLAttributes, BaseProps { orientation?: "vertical" | "horizontal"; } export declare const FieldGroup: React.ForwardRefExoticComponent>; export interface FieldSetProps extends React.FieldsetHTMLAttributes, BaseProps { legend?: string; } export declare const FieldSet: React.ForwardRefExoticComponent>; export interface InputProps extends Omit, "size">, BaseProps { size?: Exclude; leftElement?: React.ReactNode; rightElement?: React.ReactNode; } export declare const Input: React.ForwardRefExoticComponent>; export interface TextareaProps extends React.TextareaHTMLAttributes, BaseProps { size?: Exclude; resize?: "none" | "vertical" | "horizontal" | "both"; } export declare const Textarea: React.ForwardRefExoticComponent>;