import { FocusableOption } from '@angular/cdk/a11y'; import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy } from '@angular/core'; import * as i0 from "@angular/core"; /** Event fired on an individual `granite-chip` element. */ export interface GraniteChipEvent { /** The chip the event was fired on. */ chip: GraniteChipComponent; } /** Event object emitted by GraniteChip when selected or deselected. */ export declare class GraniteChipSelectionChangeEvent { /** Reference to the chip that emitted the event. */ source: GraniteChipComponent; /** Whether the chip that emitted the event is selected. */ selected: boolean; /** Whether the selection change was a result of a user interaction. */ isUserInput: boolean; } export declare class GraniteChipComponent implements FocusableOption, OnDestroy { _elementRef: ElementRef; private _ngZone; private _changeDetectorRef; /** ARIA role that should be applied to the chip. */ role: string; ariaLabel: string | null; ariaLabelledby: string | null; /** Emitted when the chip is selected or deselected. */ readonly selectionChange: EventEmitter; /** Emitted when a chip is to be removed. */ readonly removed: EventEmitter; /** Emitted when the chip is destroyed. */ readonly destroyed: EventEmitter; /** Emits when the chip is focused. */ readonly chipFocus: EventEmitter; /** Emits when the chip is blurred. */ readonly chipBlur: EventEmitter; /** Whether the chip has focus. */ _hasFocus: boolean; /** Whether the chip list is selectable */ _chipListSelectable: boolean; /** Whether the chip list is in multi-selection mode. */ _chipListMultiple: boolean; /** Whether the chip list as a whole is disabled. */ _chipListDisabled: boolean; tabIndex: number; inputChip: boolean; protected _selected: boolean; protected _selectable: boolean; protected _disabled: boolean; protected _removable: boolean; protected _invalid: boolean; /** Whether the chip is selected. */ get selected(): boolean; set selected(value: boolean); /** The value of the chip. Defaults to the text content inside `` tags. */ get value(): any; set value(val: any); private _value; /** * Whether or not the chip is selectable. When a chip is not selectable, * changes to its selected state are always ignored. By default a chip is * selectable, and it becomes non-selectable if its parent chip list is * not selectable. */ get selectable(): boolean; set selectable(value: boolean); /** Whether the chip is disabled. Also the individual chips are disabled when chip list is disabled */ get disabled(): boolean; set disabled(value: boolean); /** * Whether the chip can be removed from the list */ get removable(): boolean; set removable(value: boolean); /** Whether the chip is in an invalid state. */ get invalid(): boolean; set invalid(value: boolean); constructor(_elementRef: ElementRef, _ngZone: NgZone, _changeDetectorRef: ChangeDetectorRef, tabIndex?: string); ngOnDestroy(): void; /** Selects the chip. */ select(isUserInput?: boolean): void; /** Deselects the chip. */ deselect(): void; /** Toggles the current selected state of this chip. */ toggleSelected(isUserInput?: boolean): boolean; /** Allows for programmatic focusing of the chip unless it's disabled. */ focus(): void; /** * Allows for programmatic removal of the chip. * Called by the GraniteChipList when the DELETE or BACKSPACE keys are pressed. * Informs any listeners of the removal request. Does not remove the chip from the DOM. */ remove(): void; /** Handles click events on the chip. */ _handleClick(event: Event): void; /** Handle custom key presses. */ _handleKeydown(event: KeyboardEvent): void; _handleRemoveClick(event: Event): void; _blur(): void; private _dispatchSelectionChange; /** The ARIA selected applied to the chip. */ get ariaSelected(): string | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }