@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
56 lines (55 loc) • 2.03 kB
TypeScript
import { EventEmitter } from '../../stencil-public-runtime';
import { IInputFeedbackProp, ModusSize } from '../types';
export interface ISelectOption {
/** Whether the option is disabled and cannot be selected. */
disabled?: boolean;
/** The text to render in the option. */
label: string;
/** The value of the option. */
value: string;
}
/**
* A customizable select component used to pick a value from a list of options
*/
export declare class ModusWcSelect {
private inheritedAttributes;
private generatedId;
/** Reference to the host element */
el: HTMLElement;
/** Indicates that the input should have a border. */
bordered?: boolean;
/** Custom CSS class to apply to the inner div. */
customClass?: string;
/** Whether the form control is disabled. */
disabled?: boolean;
/** Feedback to render below the input. */
feedback?: IInputFeedbackProp;
/** 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;
/** Name of the form control. Submitted with the form as part of a name/value pair. */
name?: string;
/** The options to display in the select dropdown. */
options: ISelectOption[];
/** A value is required for the form to be submittable. */
required?: boolean;
/** The size of the input. */
size?: ModusSize;
/** The value of the control. */
value: string;
/** 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 handleFocus;
private handleInput;
render(): any;
}