import { USWDSBaseComponent } from '@uswds-wc/core';
/**
* USA Text Input Web Component
*
* Simple, accessible USWDS text input implementation as a custom element.
* Uses official USWDS classes and styling. Text input is a presentational
* component that requires no JavaScript enhancement.
*
* @element usa-text-input
*
* @attr {string} type - Input type: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url'. Defaults to 'text'.
* @attr {string} name - Input name for form submission.
* @attr {string} value - Current input value.
* @attr {string} placeholder - Placeholder text.
* @attr {string} label - Label text displayed above the input.
* @attr {string} hint - Helper text displayed below the label.
* @attr {string} error - Error message displayed in red below the input.
* @attr {string} width - Input width: '' | '2xs' | 'xs' | 'sm' | 'small' | 'md' | 'medium' | 'lg' | 'xl' | '2xl'.
* @attr {boolean} disabled - Whether the input is disabled.
* @attr {boolean} required - Whether the input is required.
* @attr {boolean} readonly - Whether the input is read-only.
* @attr {string} autocomplete - Autocomplete hint for browsers.
* @attr {string} pattern - Validation pattern (regex).
* @attr {number} maxlength - Maximum character length.
* @attr {number} minlength - Minimum character length.
* @attr {boolean} compact - Render without form-group wrapper for use in patterns.
*
* @fires input - Dispatched when the input value changes
* @fires change - Dispatched when the input loses focus after value change
*
* @example
* ```html
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* ```
*
* @see README.mdx - Complete API documentation, usage examples, and implementation notes
* @see CHANGELOG.mdx - Component version history and breaking changes
* @see TESTING.mdx - Testing documentation and coverage reports
*
* @uswds-css-reference https://github.com/uswds/uswds/tree/develop/packages/usa-input/src/styles/_usa-input.scss
* @uswds-docs https://designsystem.digital.gov/components/text-input/
* @uswds-guidance https://designsystem.digital.gov/components/text-input/#guidance
* @uswds-accessibility https://designsystem.digital.gov/components/text-input/#accessibility
*/
export declare class USATextInput extends USWDSBaseComponent {
static styles: import('lit').CSSResult;
type: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
name: string;
value: string;
placeholder: string;
label: string;
hint: string;
error: string;
width: '' | '2xs' | 'xs' | 'sm' | 'small' | 'md' | 'medium' | 'lg' | 'xl' | '2xl';
disabled: boolean;
required: boolean;
readonly: boolean;
autocomplete: string;
pattern: string;
maxlength: number | null;
minlength: number | null;
/**
* Whether to render in compact mode (no form-group wrapper)
* Use this when the input is inside a fieldset or pattern where
* the parent handles spacing and grouping
*/
compact: boolean;
private _inputId?;
connectedCallback(): void;
disconnectedCallback(): void;
private handleInput;
private handleChange;
/**
* Public API: Reset input to empty value
* Allows patterns to clear the input without DOM manipulation
*/
reset(): void;
private get inputId();
private getInputClasses;
private getFormGroupClasses;
private getLabelClasses;
private renderRequiredIndicator;
private renderLabel;
private renderHint;
private renderError;
render(): import('lit-html').TemplateResult<1>;
}
//# sourceMappingURL=usa-text-input.d.ts.map