UNPKG

@ebay/ebayui-core

Version:

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

35 lines (34 loc) 1.06 kB
import { AttrString } from "marko/tags-html"; import type { WithNormalizedProps } from "../../global"; export interface ChipsComboboxEvent { selected: string[]; } interface ChipsComboboxInput extends Omit<Marko.HTML.Input, `on${string}`> { expanded?: boolean; fluid?: boolean; error?: boolean; "list-selection"?: "manual" | "automatic"; option?: Marko.AttrTag<{ text: string; }>; selected?: string[]; roledescription?: AttrString; "a11y-delete-button-text"?: AttrString; "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 {};