import { IEventEmitter } from '@breadstone/mosaik-elements'; import { ISlottable } from '../../Behaviors/Slottable'; import type { IFormResetEventDetail, IFormSubmitEventDetail } from '../../events'; import { CustomElement } from '../Abstracts/CustomElement'; import type { IFormElementProps } from './IFormElementProps'; declare const FormElement_base: (abstract new (...args: Array) => import("../../../Controls/Behaviors/Themeable").IThemeableProps) & (abstract new (...args: Array) => import("../../Behaviors/Slottable").ISlottableProps & ISlottable) & typeof CustomElement & import("../../../Controls/Behaviors/Themeable").IThemeableCtor; /** * Form - A structured container for collecting and validating user input data. * * @description * The Form component is a fundamental container for user data entry that provides comprehensive * form submission handling, validation coordination, and data collection across multiple form * controls. It supports custom form data serialization, automatic validation workflows, and * standard HTML form behaviors including submit and reset actions. The component acts as a * central coordinator for form fields, managing validation state, collecting form data, and * emitting events for form lifecycle actions. Essential for user registration, settings panels, * data entry interfaces, and any scenario requiring structured user input collection with * validation support. * * @name Form * @element mosaik-form * @category Forms * * @slot - Default content area for form controls, form fields, and layout elements * * @csspart form - The main form container element * * @cssprop {String} --form-background-color - The background color of the form container * * @dependency {FormFieldElement} - Structured form field layout with label and validation support * * @fires submitted {FormSubmitEvent} - Fired when the form is submitted with collected form data * @fires formReset {FormResetEvent} - Fired when the form is reset to initial values * * @example * Basic user registration form: * ```html * * * * * * * * * * ``` * * @example * Form with validation disabled: * ```html * * * * * * * * ``` * * @public */ export declare class FormElement extends FormElement_base implements IFormElementProps, ISlottable { private readonly _submitted; private readonly _reseted; private _submitSubscription; private _resetSubscription; private _formElement?; private _novalidate; private _autocomplete; private _name; /** * @public */ constructor(); /** * Returns the `is` property. * The `is` property represents natural name of this element. * * @public * @static * @readonly */ static get is(): string; /** * Gets or sets the `novalidate` property. * * @public * @attr */ get novalidate(): boolean; set novalidate(value: boolean); /** * Gets or sets the `autocomplete` property. * * @public * @attr */ get autocomplete(): boolean; set autocomplete(value: boolean); /** * Gets or sets the `name` property. * * @public * @attr */ get name(): string; set name(value: string); /** * Called when the form is submitted. * Provides reference to `IEventDetail` as event detail. * * @public * @readonly * @eventProperty */ get submitted(): IEventEmitter; /** * Called when the form is reseted. * Provides reference to `IEventDetail` as event detail. * * @public * @readonly * @eventProperty */ get reseted(): IEventEmitter; /** * @public * @override */ disconnectedCallback(): void; /** * Submits the form. It returns `true` if the form is valid, otherwise it returns `false`. * * @public */ submit(): boolean; /** * Resets the form. * * @public */ reset(): void; /** * Reports the validity of the form. * It returns `true` if the form is valid, otherwise it returns `false`. * * @public */ reportValidity(): boolean; /** * Checks the validity of the form. * It returns `true` if the form is valid, otherwise it returns `false`. * * @public */ checkValidity(): boolean; /** * @protected * @override */ protected onApplyTemplate(): void; /** * Emits the `reseted` event. * * @protected */ protected onReseted(args: IFormResetEventDetail): void; /** * Emits the `submitted` event. * * @protected */ protected onSubmitted(args: IFormSubmitEventDetail): void; /** * @private */ private getFormData; /** * @private */ private getFormFields; /** * @private */ private onClick; } /** * @public */ export declare namespace FormElement { type Props = IFormElementProps; } /** * @public */ declare global { interface HTMLElementTagNameMap { 'mosaik-form': FormElement; } } export {}; //# sourceMappingURL=FormElement.d.ts.map