import "./index.css"; import React, { type InputHTMLAttributes } from "react"; export type InputSize = "lg" | "md"; export type InputType = "email" | "number" | "password" | "search" | "tel" | "text" | "url"; interface InputBaseProps { /** If true, the input width grows to fit content. */ autoWidth?: boolean; /** Helper text displayed below the input. Styled as an error when `invalid`. */ description?: string; /** Whether the input is in an invalid state. */ invalid?: boolean; /** If true, all text is selected when the input receives focus. */ selectTextOnFocus?: boolean; /** The size of the input. */ size?: InputSize; /** Supported input types — defaults to 'text' */ type?: InputType; } interface InputWithVisibleLabel extends InputBaseProps { /** If true, the label is visually hidden and set as aria-label. */ hideLabel?: false; /** The label text for the input. */ label: React.ReactNode; } interface InputWithHiddenLabel extends InputBaseProps { /** If true, the label is visually hidden and set as aria-label. */ hideLabel: true; /** The label text for the input. Must be a string when hidden. */ label: string; } interface InputWithAriaLabelledBy extends InputBaseProps { "aria-labelledby": string; hideLabel?: never; label?: never; } export type InputProps = InputWithAriaLabelledBy | InputWithHiddenLabel | InputWithVisibleLabel; /** * Combines standard HTML input attributes with custom Input props. * Omits 'size' and 'type' from HTML attributes to avoid conflict with our strict types. */ export type InputElementProps = Omit, keyof InputProps | "size" | "type"> & InputProps; export declare const Input: React.ForwardRefExoticComponent>; export {}; //# sourceMappingURL=Input.d.ts.map