/** * `` — a thin wrapper around a native `
`. * * Wraps its children in a real light-DOM `` so they participate in * native form submission, validation, and FormData / `` autofill * out of the box. Hoists submit into a single cancellable `bs-submit` * event whose `detail.formData` is a fresh snapshot. * * **Why a light-DOM ``?** Browser autofill heuristics and password * managers (Chrome, Safari, Firefox, 1Password, Bitwarden, …) walk the * light-DOM tree looking for `` inside * a ``. They also anchor their autofill UI to the focused * light-DOM control. Our `bs-input` / `bs-textarea` / `bs-select` / * `bs-range` / `bs-form-check` therefore render their native control * into light DOM (Ionic, Adobe Spectrum, Lion, Carbon all do the same) * — `bs-form` simply provides the `` ancestor. * * Implementation detail: extends `HTMLElement` directly (not * `LitElement`). When `createRenderRoot()` returns the host (light DOM), * Lit's render pipeline replaces the host's contents on every render — * which would blow away the `` we just created. The component's * DOM is trivial enough that hand-rolling on `HTMLElement` with * `attributeChangedCallback` is both simpler and correct. * * Attributes: * - `action`, `method`, `target`, `enctype` — passed through to the * inner ``. * - `novalidate` — disable native constraint validation before submit. * - `validated` — applies Bootstrap's `.was-validated` state for * validation styling. Set automatically after the first submit unless * `novalidate` is present. * * Events: * - `bs-submit` — fires on submit with `{ detail: { formData, form, * originalEvent } }`. Cancellable — `preventDefault()` stops the * underlying form submission. */ export declare class BsForm extends HTMLElement { static observedAttributes: string[]; private _form?; private _observer?; private _upgraded; connectedCallback(): void; disconnectedCallback(): void; attributeChangedCallback(): void; get action(): string | null; set action(v: string | null); get method(): string | null; set method(v: string | null); get target(): string | null; set target(v: string | null); get enctype(): string | null; set enctype(v: string | null); get novalidate(): boolean; set novalidate(v: boolean); get validated(): boolean; set validated(v: boolean); /** Resets the inner form and clears the `validated` state. */ reset(): void; checkValidity(): boolean; reportValidity(): boolean; /** Returns a fresh FormData snapshot. */ get formData(): FormData; /** The native `` instance (read-only after first connect). */ get nativeForm(): HTMLFormElement | null; private _ensureForm; private _syncFormAttrs; private _onMutate; private _onSubmit; } declare global { interface HTMLElementTagNameMap { 'bs-form': BsForm; } } //# sourceMappingURL=form.d.ts.map