import { LitElement } from 'lit'; import { FormController, ValidatorFn, AsyncValidatorFn, type FormState } from '../../utils/validators.js'; export { FormController } from '../../utils/validators.js'; export type { FormState, FieldState, ValidationResult, ValidatorFn, AsyncValidatorFn } from '../../utils/validators.js'; /** * Form component that wraps form fields and provides validation * * @fires form-submit - Dispatched when form is submitted and valid, detail: { values, state } * @fires form-invalid - Dispatched when form is submitted but invalid, detail: { errors, state } * @fires form-change - Dispatched when any field value changes, detail: { field, value, state } * @fires form-reset - Dispatched when form is reset * * @slot - Form content (inputs, selects, etc.) * @slot actions - Form actions (submit/reset buttons) * * @example * ```html * * * *
* Submit * Reset *
*
* ``` */ export declare class UIForm extends LitElement { static styles: import("lit").CSSResult; /** Form layout: vertical (default), horizontal, or inline */ layout: 'vertical' | 'horizontal' | 'inline'; /** Whether to validate on input (vs only on submit) */ validateOnInput: boolean; /** Whether to validate on blur */ validateOnBlur: boolean; /** Whether to show inline validation errors on form fields */ showErrors: boolean; /** Whether to prevent submission when form is invalid */ noValidate: boolean; /** Success message to display */ successMessage: string; /** Error message to display at form level */ errorMessage: string; /** Whether the form is currently submitting */ submitting: boolean; private _formState; private _controller; private _fieldConfigs; private _unsubscribe?; /** Get the form controller for programmatic access */ get controller(): FormController; /** Get current form state */ get formState(): FormState | null; /** * Register a field with validators programmatically */ registerField(name: string, validators?: ValidatorFn[], asyncValidators?: AsyncValidatorFn[]): void; connectedCallback(): void; disconnectedCallback(): void; firstUpdated(): void; private _discoverFields; private _registerElements; private _handleSlotChange; private _handleInput; private _handleBlur; private _updateFieldErrors; private _handleSubmit; private _showAllFieldErrors; private _applyErrorsToElements; private _handleReset; private _clearErrorsFromElements; render(): import("lit-html").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'ui-form': UIForm; } } //# sourceMappingURL=form.d.ts.map