UNPKG

@ebay/ebayui-core

Version:

Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.

32 lines (31 loc) 1.01 kB
import type { WithNormalizedProps } from "../../global"; import type { Input as ComboboxInput } from "../ebay-combobox/component"; export interface ChipsComboboxEvent { selected: string[]; } interface ChipsComboboxInput extends Omit<ComboboxInput, `on${string}`> { fluid?: boolean; error?: boolean; option?: Marko.AttrTag<{ text: string; }>; selected?: string[]; "a11y-delete-button-text"?: Marko.HTMLAttributes["aria-label"]; "on-expand"?: () => void; "on-collapse"?: () => void; "on-change"?: (event: ChipsComboboxEvent) => void; } export interface Input extends WithNormalizedProps<ChipsComboboxInput> { } interface State { selected: string[]; } export default class Combobox extends Marko.Component<Input, State> { onCreate(input: Input): void; onInput(input: Input): void; handleKeydown(e: KeyboardEvent): void; selectChip(text: string): void; handleDelete(index: number): void; getDropdownEl(): () => HTMLElement; } export {};