import { EventEmitter } from '../../stencil-public-runtime'; import type { InputChipAddDetail, InputChipChangeDetail, InputChipErrorDetail, InputChipRemoveDetail, InputChipSize, InputChipVariant } from './mud-input-chip.types'; /** * Input Chip — multi-value text-entry control where each confirmed value * renders as a removable pill (chip / tag). * * Pattern B (molecule, internal DOM, form-associated). The host owns: * - the chip-list state (`chips` prop, two-way bound), * - the inline `` for the next value, * - regex / duplicate / max validation, * - the keyboard contract that lets the citizen navigate between input * and chips with arrow keys + delete chips with Backspace / Enter, * - a `role="status"` live region that announces add / remove / reject. * * The form value submitted to the surrounding `
` is a JSON-encoded * array of strings (e.g. `["a@b.md","c@d.md"]`) when a `name` is set. * * @element mud-input-chip * * @slot label - Rich label content, replaces the `label` prop when present. * @slot helper - Rich helper / hint content, replaces the `helper-text` prop. */ export declare class MudInputChip { /** * Color treatment. `destructive` is forced when `invalid` is set. * @default 'default' */ variant: InputChipVariant; /** * Visual size rung. Drives container min-height + chip pill scale. * @default 'md' */ size: InputChipSize; /** Disables interactivity. Both chip remove-buttons and the text input become inert. */ disabled: boolean; /** Marks the field as mandatory. Adds the red asterisk + `aria-required`. */ required: boolean; /** Renders the field read-only. The control remains focusable. */ readonly: boolean; /** Forces destructive visuals regardless of `variant`. */ invalid: boolean; /** * Confirmed chip values. Two-way bound: assigning a new array rerenders * the list. Consumer mutations through events should set this prop. * @default [] */ chips: string[]; /** * The not-yet-confirmed text currently typed into the inline input. * @default '' */ value: string; /** Form-control `name`. Used during form submission (value: JSON-encoded array). */ name?: string; /** Placeholder shown when the inline input is empty and no chips exist. */ placeholder?: string; /** Plain-text label. Use the `label` slot for richer content. */ label?: string; /** Plain-text helper / hint shown below the control. */ helperText?: string; /** Plain-text error message shown below the control when `invalid` is set. */ errorText?: string; /** Maximum number of chips accepted. Further additions emit `mudError` with `code: 'max'`. */ maxChips?: number; /** Optional regex (string form). Values that don't match are rejected with `code: 'pattern'`. */ validatePattern?: string; /** * Characters that confirm a chip in addition to Enter. Default is a comma. * @default ',' */ separators: string; /** Accessible name; mirrors to the group's `aria-label` when no visible label. */ ariaLabel?: string; private hasLabelSlot; private hasHelperSlot; private isFocused; private fieldsetDisabled; private announcement; private resolvedAriaLabel?; host: HTMLMudInputChipElement; internals: ElementInternals; /** Fires whenever the chip array changes (add or remove). */ mudChange: EventEmitter; /** Fires when a chip is successfully added. */ mudChipAdd: EventEmitter; /** Fires when a chip is removed from the list. */ mudChipRemove: EventEmitter; /** Fires for every rejected chip (pattern / duplicate / max). */ mudError: EventEmitter; /** Fires when the inline input gains focus. */ mudFocus: EventEmitter; /** Fires when the inline input loses focus. */ mudBlur: EventEmitter; private readonly instanceId; private readonly labelId; private readonly helperId; private readonly errorId; private readonly inputId; private readonly liveId; private nativeInput?; private initialChips; componentWillLoad(): void; private captureAriaLabel; syncAriaLabelProp(next?: string): void; onRequiredChange(): void; validateVariant(next: InputChipVariant): void; validateSize(next: InputChipSize): void; handleChipsChange(next: string[]): void; formDisabledCallback(disabled: boolean): void; formResetCallback(): void; formStateRestoreCallback(state: string | File | FormData | null): void; private syncFormValue; private syncValidity; private onLabelSlotChange; private onHelperSlotChange; private slotHasContent; private isInert; private resolvedVariant; private hasVisibleLabel; private hasErrorMessage; private hasHelperMessage; private describedBy; private isMaxReached; private reasonMessage; private validateChip; private addChip; private removeChip; private focusInput; private focusChipAt; private splitOnSeparators; private handleInputInput; private handleInputKeyDown; private handleInputPaste; private handleInputFocus; private handleInputBlur; private handleControlClick; private handleChipKeyDown; private handleChipRemoveClick; render(): any; }