import * as lit_html from 'lit-html'; import * as lit from 'lit'; import { LitElement } from 'lit'; import { a as TypeRoundedSizes, T as TypeStatus, K as KemetField, c as KemetCombo } from '../constants-CcB9aXsT.js'; import '../form-controller-BR0gZhrG.js'; interface InterfaceSelections { element: HTMLUListElement; text: string; id: string; } /** * @since 3.1.0 * @status stable * * @tagname kemet-multi-input * @summary An input element that accepts multiple items from a combo. * * @prop {string} slug - Used for the id of the input. Should match the slug used in a control if applicable. * @prop {string} name - The name of the input * @prop {string} placeholder - The placeholder attribute * @prop {boolean} disabled - The disable attribute * @prop {boolean} required - The required attribute * @prop {string} value - The input's value * @prop {boolean} invalid - States whether the input is invalid * @prop {string} status - The status of the input * @prop {boolean} validateOnBlur - Activates validation on blur * @prop {TypeRoundedSizes} rounded - Displays rounded corners * @prop {boolean} filled - Displays a filled input box * @prop {ValidityState} validity - The HTML5 validity object. * * @csspart input * * @cssproperty --kemet-input-height - The height of the input. * @cssproperty --kemet-input-padding - The padding on the input. * @cssproperty --kemet-input-border - The border of the input. * @cssproperty --kemet-input-border-color-error - The border of the error state. * @cssproperty --kemet-input-border-color-success - The border of the success state. * @cssproperty --kemet-input-border-color-warning - The border of the warning state. * @cssproperty --kemet-input-icon-left-padding - The icon-left padding. * @cssproperty --kemet-input-icon-right-padding - The icon-right padding. * @cssproperty --kemet-input-border-radius-rounded - The border radius on rounded. * @cssproperty --kemet-input-border-filled - The border on filled. * @cssproperty --kemet-input-color-filled - The color on filled. * @cssproperty --kemet-input-background-color-filled - The background-color on filled. * @cssproperty --kemet-input-background-color-error - The error state background color. * @cssproperty --kemet-input-background-color-success - The success state background color. * @cssproperty --kemet-input-background-color-warning - The warning state background color. * * @event kemet-focus - Fires when the input receives focus * @event kemet-blur - Fires when the input loses focus * @event kemet-input - Fires when the input receives input * @event kemet-change - Fires when the input changes * @event kemet-invalid - Fires when the input is invalid * */ declare class KemetMultiInput extends LitElement { static styles: lit.CSSResult[]; slug: string; placeholder: string; disabled: boolean; filled: boolean; rounded: TypeRoundedSizes; name: string; status: TypeStatus; required: boolean; invalid: boolean; validateOnBlur: boolean; value: string; selections: InterfaceSelections[]; paddingLeft: number; field: KemetField; combo: KemetCombo; chips: { offsetWidth: number; }; input: HTMLInputElement; firstUpdated(): void; updated(): void; render(): lit_html.TemplateResult<1>; /** * Handles when a selection is made from a combo * @private * @param event */ addComboItem(event: CustomEvent): void; /** * Handles when the input receives input * @private */ handleInput(event: Event): void; /** * Handles when the input is focused */ handleFocus(): void; handleBlur(): void; handleChange(event: Event): void; handleInvalid(event: Event): void; /** * Renders the chips from the selections of the combo * @private */ makeSelections(): lit_html.TemplateResult<1>; /** * calculates padding to properly place the cursor of the input * @private */ calculatePadding(): void; /** * handle removing a chip from the selections * @private */ handleRemoveChip(event: any): void; handleComboClose(event: MouseEvent): void; handleKeydown(event: KeyboardEvent): void; } declare global { interface HTMLElementTagNameMap { 'kemet-multi-input': KemetMultiInput; } } export { type InterfaceSelections, KemetMultiInput as default };