UNPKG

@ebay/ebayui-core

Version:

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

26 lines (25 loc) 832 B
import type { AttrString } from "marko/tags-html"; import type { WithNormalizedProps } from "../../global"; export interface CharacterCountEvent { count: number; inputAriaLive: Marko.AriaAttributes["aria-live"]; } interface CharacterCountInput extends Omit<Marko.HTML.Span, `on${string}`> { renderBody?: Marko.Body; value?: string | number; max: number; "clipped-text"?: AttrString; "on-change"?: (event?: CharacterCountEvent) => void; } export interface Input extends WithNormalizedProps<CharacterCountInput> { } interface State { count: number; } declare class CharacterCount extends Marko.Component<Input, State> { timeout: NodeJS.Timeout; onCreate(input: Input): void; onInput(input: Input): void; countFromValue(value?: string | number): number; } export default CharacterCount;