import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime'; import { InputType, UserInputInterceptor } from '../types'; /** * An input component with styles. It functions as a wrapper around the material [textfield](https://github.com/material-components/material-components-web/tree/master/packages/mdc-textfield) component. * * Use this element for **simple types** like `text`, `password`, `number` or `email`. For more complex types, there are elements like a [Radio Button](../ino-radio), a [Checkbox](../ino-checkbox), a [Datepicker](../ino-datepicker) and many more. * * @slot icon-leading - For the icon to be prepended * @slot icon-trailing - For the icon to be appended */ export declare class Input implements ComponentInterface { el: HTMLInoInputElement; private nativeInputEl?; private inoLabelElement?; private cursorPosition; /** * A function called to intercept the user input. */ private userInputInterceptorFn; /** * An internal auto generated id for the helper field. */ private uniqueHelperId; /** * An internal instance of the material design textfield. */ private mdcTextfield; /** * An internal instance of a textfield helper text instance (if necessary). */ private mdcHelperText; /** * An internal instance of a textfield icon instance (if necessary). */ private mdcTextfieldIcon; /** * Simple static construct to generate unique helper text ids. */ private static HELPER_COUNTER; private static generateHelperTextId; /** * The autocomplete property of this element. */ autocomplete?: string; /** * The autofocus of this element. */ autoFocus?: boolean; /** * The id of the datalist child */ dataList?: string; /** * Disables this element. */ disabled?: boolean; /** * Displays the input field as invalid if set to true. * If the property is not set or set to false, the validation is handled by the `pattern` property. * This functionality might be useful if the input validation is (additionally) handled by the backend. */ error?: boolean; errorHandler(invalid?: boolean): void; /** * The optional helper text. */ helper?: string; /** * Displays the number of characters. The maxlength-property must be set. * This helper text will be displayed persistently. */ helperCharacterCounter?: boolean; /** * Displays the helper permanently. */ helperPersistent?: boolean; /** * Styles the helper text as a validation message. */ helperValidation?: boolean; /** * The optional floating label of this input field. */ label?: string; /** * The min value of this element. */ min?: string; /** * The max value of this element. */ max?: string; /** * Limits the number of possible characters to the given number */ maxlength?: number; /** * The name of this element. */ name?: string; /** * Styles the input field as outlined element. * * This property is immutable which means that it should not be changed after its first initialization. * Changing this property at runtime causes problems in combination with the floating label. * You can read more about this issue [here](https://github.com/inovex/elements/issues/1216). */ outline?: boolean; handleOutlineChange(oldVal: boolean, newVal: boolean): void; /** * The validation pattern of this element. */ pattern?: string; /** * The placeholder of this element. */ placeholder?: string; /** * Marks this element as required. */ required?: boolean; /** * If true, an *optional* message is displayed if not required, * otherwise a * marker is displayed if required */ showLabelHint?: boolean; /** * The step value of this element. Use `any` for decimal numbers */ step?: number | 'any'; /** * The type of this element (default = text). */ type?: InputType; /** * Displays the given unit at the end of the input field. */ unit: string; /** * The value of this element. (**unmanaged**) */ value: string; valueChanged(newValue: string): void; /** * Emits when the input field is blurred and validates email input */ inoBlur: EventEmitter; /** * Emits when the input field is focused */ inoFocus: EventEmitter; /** * Emits when the user types something in. * Contains typed input in `event.detail` */ valueChange: EventEmitter; handleChange(e: Event): void; focusListener(): void; handleInput(e: Event): void; componentDidLoad(): Promise; componentDidRender(): void; disconnectedCallback(): void; /** * Returns the native input element used under the hood. */ getInputElement(): Promise; /** * Sets focus on the native `input`. * Use this method instead of the global `input.focus()`. */ setFocus(): Promise; /** * Sets blur on the native `input`. * Use this method instead of the global `input.blur()`. */ setBlur(): Promise; /** * Sets an interceptor to manipulate user input before emitting a * `valueChange` event. * * @internal */ setUserInputInterceptor(fn: UserInputInterceptor): Promise; /** * If set, resets the value after the user typed in the native input element (default). * Disabling might be useful to prevent the input from resetting (e.g. ``) * and in turn making it uncontrolled. * * @internal */ resetOnChange: boolean; private inputID; componentWillLoad(): void; private handleNativeInputChange; private handleBlur; private handleFocus; private handleInputNumberArrowClick; private set textfieldValue(value); private helperTextTemplate; private characterCounterTemplate; render(): any; }