UNPKG

@universal-material/web

Version:
42 lines 1.47 kB
import { CSSResultGroup } from '@lit/reactive-element/css-tag'; import { HTMLTemplateResult } from 'lit'; import { UmTextFieldBase } from '../shared/text-field-base/text-field-base.js'; export declare class UmChipField extends UmTextFieldBase { #private; static styles: CSSResultGroup; input: HTMLInputElement; name: string; /** * If true, ignore enter key input */ manual: boolean; /** * A function return a string based on a item from the `value`. Useful when the items of value are objects. */ formatter: ((value: any) => string) | undefined; /** * A string representing an HTML to be rendered inside as leading icon of each chip. * * _Note:_ Subject to signature change */ leadingIconTemplate: ((value: any) => string) | undefined; /** * An array containing the value representation of each chip. * * _Note:_ Add or remove items directly from value array won't trigger a render on Chip Field. Use the methods `add` or `removeAt`. */ get value(): any[]; set value(value: any[]); private setFormValue; focus(): void; protected renderControl(): HTMLTemplateResult; add(value: any, triggerChange?: boolean): void; removeAt(index: number, triggerChange?: boolean): void; private getItemLabel; } declare global { interface HTMLElementTagNameMap { 'u-chip-field': UmChipField; } } //# sourceMappingURL=chip-field.d.ts.map