UNPKG

@trimble-oss/moduswebcomponents

Version:

Modus Web Components is a modern, accessible UI library built with Stencil JS that provides reusable web components following Trimble's Modus design system. This updated version focuses on improved flexibility, enhanced theming options, comprehensive cust

76 lines (75 loc) 3.1 kB
import { EventEmitter } from '../../stencil-public-runtime'; import { AutocompleteTypes, IInputFeedbackProp, ModusSize, TextFieldTypes } from '../types'; /** * A customizable input component used to create text inputs with types. */ export declare class ModusWcTextInput { private inheritedAttributes; private generatedId; /** Reference to the host element */ el: HTMLElement; /** Controls automatic capitalization in inputted text. */ autoCapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters'; /** Hint for form autofill feature. */ autoComplete?: AutocompleteTypes; /** Controls automatic correction in inputted text. Support by browser varies. */ autoCorrect?: 'on' | 'off'; /** Indicates that the input should have a border. */ bordered?: boolean; /** Aria label for the clear icon button. */ clearAriaLabel?: string; /** Custom CSS class to apply to the input. */ customClass?: string; /** Whether the form control is disabled. */ disabled?: boolean; /** A hint to the browser for which enter key to display. */ enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'; /** Feedback to render below the input. */ feedback?: IInputFeedbackProp; /** Show the clear button within the input field. */ includeClear?: boolean; /** Show the search icon within the input field. */ includeSearch?: boolean; /** The ID of the input element. */ inputId?: string; /** Determine the control's relative ordering for sequential focus navigation (typically with the Tab key). */ inputTabIndex?: number; /** The text to display within the label. */ label?: string; /** Maximum length (number of characters) of value. */ maxLength?: number; /** Minimum length (number of characters) of value. */ minLength?: number; /** Name of the form control. Submitted with the form as part of a name/value pair. */ name?: string; /** Pattern the value must match to be valid */ pattern?: string; /** Text that appears in the form control when it has no value set. */ placeholder?: string; /** Whether the value is editable. */ readOnly?: boolean; /** A value is required for the form to be submittable. */ required?: boolean; /** The size of the input. */ size?: ModusSize; /** Type of form control. */ type?: TextFieldTypes; /** The value of the control. */ value: string; /** Event emitted when the clear button is clicked. */ clearClick: EventEmitter<void>; /** Event emitted when the input loses focus. */ inputBlur: EventEmitter<FocusEvent>; /** Event emitted when the input value changes. */ inputChange: EventEmitter<InputEvent>; /** Event emitted when the input gains focus. */ inputFocus: EventEmitter<FocusEvent>; componentWillLoad(): void; private getClasses; private handleBlur; private handleClearText; private handleFocus; private handleInput; private shouldIncludeClear; render(): any; }