igniteui-webcomponents
Version:
Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.
42 lines (41 loc) • 1.74 kB
TypeScript
import { type TemplateResult } from 'lit';
export interface MaskedInputOptions {
/** Optional id for the native input element. */
id?: string;
/** Resolved part-name map applied to the input. */
partNames: Record<string, boolean>;
/** The form-associated name attribute. */
name?: string;
/** Current value to render through `live()`. */
value: string;
/** Pre-resolved placeholder text. Caller decides empty-string semantics. */
placeholder: string;
readOnly: boolean;
disabled: boolean;
autofocus?: boolean;
inputMode?: string;
/** When provided, sets the `tabindex` attribute. */
tabindex?: number;
/** When provided, sets the `aria-describedby` attribute. */
ariaDescribedBy?: string;
/** When provided, sets the `aria-labelledby` attribute using the provided elements. */
ariaLabelledByElements?: ReadonlyArray<Element> | null;
onInput: (event: InputEvent) => void;
onFocus: (event: FocusEvent) => void;
onBlur: (event: FocusEvent) => void;
onClick: () => void;
/** Wired to `keydown`, `cut`, and `dragstart` to capture the current selection. */
onSetMaskSelection: (event: Event) => void;
onCompositionStart: () => void;
onCompositionEnd: (event: CompositionEvent) => void;
onChange?: () => void;
onWheel?: (event: WheelEvent) => void;
onDragEnter?: () => void;
onDragLeave?: () => void;
}
/**
* Renders the native `<input>` element shared by mask-driven components
* (`igc-mask-input`, `igc-date-time-input`, `igc-date-range-input`).
* Centralizes mask event wiring so leaves only describe their extras.
*/
export declare function renderMaskedNativeInput(opts: MaskedInputOptions): TemplateResult;