UNPKG

@instawork/design-system

Version:

The design system for Instawork's web apps

37 lines (36 loc) 1.76 kB
import { CustomComponent, JQueryPluginExtras, JQueryPluginFn, JQueryPluginPreInitFn } from '../common'; /** * A base class that handles shared functionality for custom input components */ export declare abstract class CustomInputComponent<TElement extends HTMLElement = HTMLElement> extends CustomComponent<TElement> { static readonly CUSTOM_INPUT_ATTR = "iw-custom-input"; /** * Returns a selector string that can be used to find elements bound to a {@link CustomInputComponent} instance. * * The iw-custom-input attribute is automatically added to any component using {@link CustomInputComponent} so they * can be easily identified. */ static readonly CUSTOM_INPUT_SELECTOR: string; /** * Overridden to return a CSS selector for the host element of the component. * * @abstract */ static COMPONENT_SELECTOR: string; static jQueryPlugin<TExtras extends JQueryPluginExtras, TElement extends HTMLElement = HTMLElement>(controllerName: string, extras?: TExtras, preInit?: JQueryPluginPreInitFn<TElement>): JQueryPluginFn<TElement> & TExtras; get hasFocus(): boolean; get required(): boolean; set required(value: boolean); protected constructor($el: JQuery<TElement>); /** * Returns a string representing the component host element. * * The string returned contains in order of preference: * - A CSS selector style string with the tag name, "name" attribute and ID, if a "name" is present * (e.g. iw-custom-input#some-id--1[name=the_input]) * - A CSS selector style string with the tag name ID * (e.g. iw-custom-input#some-id--1 */ getDebugIdentifier(): string; protected getDebugIdentifierByName(): string; }