@ebay/ebayui-core
Version:
Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.
55 lines (54 loc) • 1.76 kB
TypeScript
import { DropdownUtil } from "../../common/dropdown";
import type { Input as ListboxInput } from "../ebay-listbox/component";
import type { ChangeEvent } from "../ebay-listbox/component";
import type { WithNormalizedProps } from "../../global";
interface ListboxButtonInput extends Omit<Marko.HTML.Div, `on${string}`> {
option?: ListboxInput["option"];
name?: ListboxInput["name"];
"list-selection"?: ListboxInput["listSelection"];
"prefix-id"?: string;
"unselected-text"?: string;
variant?: "standard" | "form";
truncate?: boolean;
fluid?: boolean;
strategy?: "fixed" | "absolute";
flip?: boolean;
borderless?: boolean;
"floating-label"?: string;
disabled?: boolean;
"button-name"?: string;
"a11y-icon-text"?: string;
split?: string;
invalid?: boolean;
hasError?: boolean;
"a11y-icon-prefix-text"?: Marko.HTMLAttributes["aria-label"];
"a11y-selected-text"?: string;
"prefix-label"?: string;
"postfix-label"?: string;
"collapse-on-select"?: boolean;
"on-expand"?: () => void;
"on-collapse"?: () => void;
"on-change"?: (event: ChangeEvent) => void;
}
export interface Input extends WithNormalizedProps<ListboxButtonInput> {
}
interface State {
selectedIndex: number;
}
declare class ListboxButton extends Marko.Component<Input, State> {
_expander: any;
dropdownUtil: DropdownUtil;
handleExpand(): void;
handleCollapse(): void;
handleListboxChange(event: ChangeEvent): void;
handleListboxEscape(): void;
onCreate(): void;
onInput(input: Input): void;
onMount(): void;
onUpdate(): void;
onRender(): void;
onDestroy(): void;
_setupMakeup(): void;
_cleanupMakeup(): void;
}
export default ListboxButton;