@ebay/ebayui-core
Version:
Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.
29 lines (28 loc) • 1.16 kB
TypeScript
import type { WithNormalizedProps } from "../../global";
export interface TriStateCheckboxEvent {
originalEvent: Event;
value: string;
checked: Marko.HTMLAttributes["aria-checked"];
}
interface TriStateCheckboxInput extends Omit<Marko.HTML.Input, `on${string}` | "checked" | "type"> {
checked?: Marko.HTMLAttributes["aria-checked"];
"skip-mixed"?: boolean;
size?: "regular" | "large";
"on-change"?: (event: TriStateCheckboxEvent) => void;
"on-keydown"?: (event: TriStateCheckboxEvent) => void;
"on-focus"?: (event: TriStateCheckboxEvent) => void;
}
export interface Input extends WithNormalizedProps<TriStateCheckboxInput> {
}
interface State {
checked: Marko.HTMLAttributes["aria-checked"];
}
declare class TriStateCheckbox extends Marko.Component<Input, State> {
onInput(input: Input): void;
triggerChange(): void;
handleChange(ev: Event, el: HTMLInputElement): void;
handleKeydown(ev: Event, el: HTMLInputElement): void;
handleFocus(ev: Event, el: HTMLInputElement): void;
forwardEvent(eventName: string, originalEvent: Event, el: HTMLInputElement): void;
}
export default TriStateCheckbox;