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.16 kB
import type { AttrClass, AttrString } from "marko/tags-html"; import type { MenuEvent } from "../ebay-menu/component"; import type { WithNormalizedProps } from "../../global"; interface BreadcrumbsInput extends Omit<Marko.HTML.Nav, `on${string}`> { "a11y-heading-tag"?: keyof Marko.NativeTags; "a11y-heading-text"?: AttrString; "a11y-menu-button-text"?: AttrString; class?: AttrClass; item?: Marko.AttrTag<Marko.HTML.A | (Marko.HTML.Button & { href: never; })>; "on-select"?: (event: { originalEvent: Event; el: HTMLElement; }) => void; } export interface Input extends WithNormalizedProps<BreadcrumbsInput> { } interface State { hiddenIndex: number[]; } declare class Breadcrumbs extends Marko.Component<Input, State> { cachedWidths: number[]; newInput: boolean; handleClick(originalEvent: KeyboardEvent): void; handleMenuBreadcrumb(originalEvent: MenuEvent): void; onCreate(): void; onMount(): void; onInput(input: Input): void; onUpdate(): void; _getItemWidths(itemContainer: HTMLElement): number[]; _calculateMaxItems(): void; } export default Breadcrumbs;