import { LitElement } from 'lit'; export interface ValidationRule { type: 'required' | 'email' | 'url' | 'pattern' | 'minlength' | 'maxlength' | 'min' | 'max' | 'custom'; message: string; value?: string | number; pattern?: string; minlength?: number; maxlength?: number; min?: number; max?: number; validator?: (value: string) => boolean; } export interface ValidationResult { isValid: boolean; errors: string[]; warnings: string[]; } /** * USA Validation Web Component * * A simple, accessible USWDS validation implementation as a custom element. * Provides real-time validation feedback with customizable rules and messages. * Uses official USWDS classes and styling with minimal custom code. * * @element usa-validation * @fires validation-change - Dispatched when validation status changes * * @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-validation/src/styles/_usa-validation.scss * @uswds-docs https://designsystem.digital.gov/components/validation/ * @uswds-guidance https://designsystem.digital.gov/components/validation/#guidance * @uswds-accessibility https://designsystem.digital.gov/components/validation/#accessibility */ export declare class USAValidation extends LitElement { static styles: import('lit').CSSResult; value: string; label: string; hint: string; name: string; inputType: 'input' | 'textarea' | 'select'; type: string; options: { value: string; text: string; }[]; rows: number; placeholder: string; disabled: boolean; readonly: boolean; rules: ValidationRule[]; errors: string[]; validateOnInput: boolean; validateOnBlur: boolean; showSuccessState: boolean; message: string; valid: boolean; private _validationResult; private _hasBeenValidated; private _showValidation; protected createRenderRoot(): HTMLElement; private validateValue; private handleInput; private handleBlur; private performValidation; private getFormGroupClasses; private getInputClasses; private renderSelectOption; private renderInput; private getAriaDescribedBy; validate(): ValidationResult; clearValidation(): void; addRule(rule: ValidationRule): void; removeRule(ruleType: string): void; isValid(): boolean; getErrors(): string[]; focus(): void; reset(): void; connectedCallback(): void; disconnectedCallback(): void; private renderRequiredIndicator; private renderHint; private renderErrorMessage; private renderSuccessState; private renderLiveRegion; render(): import('lit-html').TemplateResult<1>; } //# sourceMappingURL=usa-validation.d.ts.map