UNPKG

@ebay/ebayui-core

Version:

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

27 lines (26 loc) 1.07 kB
import type { WithNormalizedProps } from "../../global"; export interface StarRatingEvent<T extends Event> { originalEvent: T; value: number; } interface StarRatingSelectInput extends Omit<Marko.HTML.Div, `on${string}`> { value?: string | number; "a11y-star-text"?: [string, string, string, string, string]; "a11y-text"?: Marko.HTMLAttributes["aria-label"]; disabled?: boolean; "on-change"?: (event: StarRatingEvent<PointerEvent>) => void; "on-focus"?: (event: StarRatingEvent<FocusEvent>) => void; "on-keydown"?: (event: StarRatingEvent<KeyboardEvent>) => void; } export interface Input extends WithNormalizedProps<StarRatingSelectInput> { } export interface State { value: number; } declare class StarRating extends Marko.Component<Input, State> { onCreate(): void; onInput(input: Input): void; handleClick(value: number, originalEvent: PointerEvent, el: HTMLInputElement): void; emitEvent<T extends Event>(name: string, value: number, originalEvent: T, el: HTMLInputElement): void; } export default StarRating;