import { InputBase } from "./input.base.js"; import { PropertyValues, TemplateResult } from "lit"; type InputBehavior = (typeof InputBehavior)[keyof typeof InputBehavior]; declare const InputBehavior: { readonly INSTANT: "instant"; readonly SUBMIT: "submit"; }; type InputType = (typeof InputType)[keyof typeof InputType]; declare const InputType: { readonly TEXT: "text"; readonly EMAIL: "email"; readonly HIDDEN: "hidden"; readonly NUMBER: "number"; readonly PASSWORD: "password"; readonly SEARCH: "search"; readonly TEL: "tel"; readonly URL: "url"; readonly TIME: "time"; readonly COMBOBOX: "combobox"; }; declare class InputSearchEvent extends CustomEvent<{ rawValue?: string; value: string; }> { constructor(value: string, rawValue?: string); } declare global { interface HTMLElementTagNameMap { 'odx-input': OdxInput; } } /** * Single-line text input that wraps the native `` element with consistent * styling, prefix/suffix slots, and richer behaviors for clearing, loading, and * password reveal. * * Supports the standard HTML input types (`text`, `email`, `password`, `search`, * `tel`, `url`, `time`, `number`, `hidden`) plus a `combobox` mode used internally * by select and autocomplete components. * * Form-associated via `ElementInternals` — the current `value` is submitted as * part of the surrounding `
` under the element's `name`. * * @summary Single-line text input with clear, loading, password-reveal, and search behaviors. * * @event change - Fired when the value changes due to user input or after the value is cleared. * @event clear - Fired when the user requests clearing the value (via the clear button or Escape key). Cancelable: call `preventDefault()` to keep the current value. * @event search - Fired for `type="search"` inputs when the user submits a query (Enter, search icon) or, in `behavior="instant"`, on every value change. The `detail` contains `rawValue` (as typed) and `value` (trimmed). */ declare class OdxInput extends InputBase { #private; static tagName: string; static styles: import("lit").CSSResult[]; autocapitalize: string; /** * For `type="search"`, controls when the `search` event fires: * - `'submit'` (default): only when the user presses Enter or clicks the search icon. * - `'instant'`: on every value change (subject to `debounce`). */ behavior: InputBehavior; /** * When `true`, renders a clear button in the suffix slot while the input has a * non-empty value and is neither disabled nor readonly. */ clearable: boolean; /** * Number of milliseconds to debounce the underlying `input` event. Useful for * `behavior="instant"` search to avoid firing on every keystroke. */ debounce: number; /** * When `true`, replaces the suffix slot content with a loading spinner. Use this * to indicate that an async operation (e.g. a search request) is in progress. */ loading: boolean; /** * Minimum number of characters the value must contain to satisfy form validation. * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#minlength | `minlength`} attribute */ minLength?: number | null; /** * Maximum number of characters the value may contain. * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#maxlength | `maxlength`} attribute */ maxLength?: number | null; /** * Regular expression the value must match to satisfy form validation. * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#pattern | `pattern`} attribute */ pattern?: string | null; /** * For `type="password"`, controls whether the value is shown as plain text. * Toggled by the built-in reveal button rendered in the suffix slot. */ passwordRevealed: boolean; /** * The type of input to render. Mirrors the standard HTML `type` attribute with * an additional `combobox` mode used by composite components like `odx-select` * and `odx-autocomplete`. */ type: InputType; /** The current value of the input. Submitted as form data under the element's `name`. */ value: string; constructor(); protected firstUpdated(props: PropertyValues): void; protected willUpdate(props: PropertyValues): void; protected updated(props: PropertyValues): void; protected renderSlot(name: 'prefix' | 'suffix', defaultContent?: TemplateResult | string): TemplateResult; } export { InputBehavior, InputSearchEvent, InputType, OdxInput };