UNPKG

@ebay/ebayui-core

Version:

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

44 lines (43 loc) 1.6 kB
import type { AttrString } from "marko/tags-html"; import type { Input as TextboxInput, TextboxEvent } from "../ebay-textbox/component-browser"; import type { WithNormalizedProps } from "../../global"; export interface State { value: number; min: number; max: number; } interface NumberInputInput extends Omit<TextboxInput, `on${string}`> { label?: Marko.AttrTag<{ renderBody: Marko.Body; }>; "a11y-delete-text"?: AttrString; "on-keydown"?: (event: TextboxEvent) => void; "on-keypress"?: (event: TextboxEvent) => void; "on-keyup"?: (event: TextboxEvent) => void; "on-change"?: (event: TextboxEvent) => void; "on-input-change"?: (event: TextboxEvent) => void; "on-focus"?: (event: TextboxEvent) => void; "on-blur"?: (event: TextboxEvent) => void; "on-delete-click"?: (event: TextboxEvent) => void; "on-increment"?: (event: TextboxEvent) => void; "on-decrement"?: (event: TextboxEvent) => void; } export interface Input extends WithNormalizedProps<NumberInputInput> { } declare class NumberInput extends Marko.Component<Input, State> { textbox: HTMLInputElement; onCreate(): void; onMount(): void; onInput(input: Input): void; checkBoundary(value: any, inc?: number): number; updateInputValue(event: TextboxEvent): void; updateInputValueChange(event: TextboxEvent): void; handleAnimation(action: string): void; handleIncrement(event: { originalEvent: MouseEvent; }): void; handleDecrement(event: { originalEvent: MouseEvent; }): void; } export default NumberInput;