solid-js
Version:
A declarative JavaScript library for building user interfaces.
1,081 lines (1,052 loc) • 179 kB
TypeScript
import * as csstype from "csstype";
/**
* Based on JSX types for Surplus and Inferno and adapted for `dom-expressions`.
*
* https://github.com/adamhaile/surplus/blob/master/index.d.ts
* https://github.com/infernojs/inferno/blob/master/packages/inferno/src/core/types.ts
*
* MathML typings coming mostly from Preact
* https://github.com/preactjs/preact/blob/07dc9f324e58569ce66634aa03fe8949b4190358/src/jsx.d.ts#L2575
*
* Checked against other frameworks via the following table:
* https://potahtml.github.io/namespace-jsx-project/index.html
*/
type DOMElement = Element;
export namespace JSX {
// START - difference between `jsx.d.ts` and `jsx-h.d.ts`
type FunctionMaybe<T = unknown> = { (): T } | T;
interface FunctionElement {
(): Element;
}
type Element =
| Node
| ArrayElement
| FunctionElement
| (string & {})
| number
| boolean
| null
| undefined;
// END - difference between `jsx.d.ts` and `jsx-h.d.ts`
interface ArrayElement extends Array<Element> {}
interface ElementClass {
// empty, libs can define requirements downstream
}
interface ElementAttributesProperty {
// empty, libs can define requirements downstream
}
interface ElementChildrenAttribute {
children: {};
}
// Event handlers
interface EventHandler<T, E extends Event> {
(
e: E & {
currentTarget: T;
target: DOMElement;
}
): void;
}
interface BoundEventHandler<
T,
E extends Event,
EHandler extends EventHandler<T, any> = EventHandler<T, E>
> {
0: (data: any, ...e: Parameters<EHandler>) => void;
1: any;
}
type EventHandlerUnion<
T,
E extends Event,
EHandler extends EventHandler<T, any> = EventHandler<T, E>
> = EHandler | BoundEventHandler<T, E, EHandler>;
interface EventHandlerWithOptions<T, E extends Event, EHandler = EventHandler<T, E>>
extends AddEventListenerOptions,
EventListenerOptions {
handleEvent: EHandler;
}
type EventHandlerWithOptionsUnion<
T,
E extends Event,
EHandler extends EventHandler<T, any> = EventHandler<T, E>
> = EHandler | EventHandlerWithOptions<T, E, EHandler>;
interface InputEventHandler<T, E extends InputEvent> {
(
e: E & {
currentTarget: T;
target: T extends HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement
? T
: DOMElement;
}
): void;
}
type InputEventHandlerUnion<T, E extends InputEvent> = EventHandlerUnion<
T,
E,
InputEventHandler<T, E>
>;
interface ChangeEventHandler<T, E extends Event> {
(
e: E & {
currentTarget: T;
target: T extends HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement
? T
: DOMElement;
}
): void;
}
type ChangeEventHandlerUnion<T, E extends Event> = EventHandlerUnion<
T,
E,
ChangeEventHandler<T, E>
>;
interface FocusEventHandler<T, E extends FocusEvent> {
(
e: E & {
currentTarget: T;
target: T extends HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement
? T
: DOMElement;
}
): void;
}
type FocusEventHandlerUnion<T, E extends FocusEvent> = EventHandlerUnion<
T,
E,
FocusEventHandler<T, E>
>;
// end event handlers
const SERIALIZABLE: unique symbol;
interface SerializableAttributeValue {
toString(): string;
[SERIALIZABLE]: never;
}
interface IntrinsicAttributes {
ref?: unknown | ((e: unknown) => void) | undefined;
}
interface CustomAttributes<T> {
ref?: T | ((el: T) => void) | undefined;
children?: FunctionMaybe<Element | undefined>;
classList?:
| {
[k: string]: boolean | undefined;
}
| undefined;
$ServerOnly?: boolean | undefined;
}
type Accessor<T> = () => T;
interface Directives {}
interface DirectiveFunctions {
[x: string]: (el: DOMElement, accessor: Accessor<any>) => void;
}
interface ExplicitProperties {}
interface ExplicitAttributes {}
interface ExplicitBoolAttributes {}
interface CustomEvents {}
/** @deprecated Replaced by CustomEvents */
interface CustomCaptureEvents {}
type DirectiveAttributes = {
[Key in keyof Directives as `use:${Key}`]?: Directives[Key];
};
type DirectiveFunctionAttributes<T> = {
[K in keyof DirectiveFunctions as string extends K
? never
: `use:${K}`]?: DirectiveFunctions[K] extends (
el: infer E, // will be unknown if not provided
...rest: infer R // use rest so that we can check whether it's provided or not
) => void
? T extends E // everything extends unknown if E is unknown
? R extends [infer A] // check if has accessor provided
? A extends Accessor<infer V>
? V // it's an accessor
: never // it isn't, type error
: true // no accessor provided
: never // T is the wrong element
: never; // it isn't a function
};
type PropAttributes = {
[Key in keyof ExplicitProperties as `prop:${Key}`]?: ExplicitProperties[Key];
};
type AttrAttributes = {
[Key in keyof ExplicitAttributes as `attr:${Key}`]?: ExplicitAttributes[Key];
};
type BoolAttributes = {
[Key in keyof ExplicitBoolAttributes as `bool:${Key}`]?: ExplicitBoolAttributes[Key];
};
type OnAttributes<T> = {
[Key in keyof CustomEvents as `on:${Key}`]?: EventHandlerWithOptionsUnion<T, CustomEvents[Key]>;
};
type OnCaptureAttributes<T> = {
[Key in keyof CustomCaptureEvents as `oncapture:${Key}`]?: EventHandler<
T,
CustomCaptureEvents[Key]
>;
};
// events
/**
* `Window` events, defined for `<body>`, `<svg>`, `<frameset>` tags.
*
* Excluding `Elements events` already defined as globals that all tags share, such as `onblur`.
*/
interface WindowEventMap<T> {
onAfterPrint?: EventHandlerUnion<T, Event> | undefined;
onBeforePrint?: EventHandlerUnion<T, Event> | undefined;
onBeforeUnload?: EventHandlerUnion<T, BeforeUnloadEvent> | undefined;
onGamepadConnected?: EventHandlerUnion<T, GamepadEvent> | undefined;
onGamepadDisconnected?: EventHandlerUnion<T, GamepadEvent> | undefined;
onHashchange?: EventHandlerUnion<T, HashChangeEvent> | undefined;
onLanguageChange?: EventHandlerUnion<T, Event> | undefined;
onMessage?: EventHandlerUnion<T, MessageEvent> | undefined;
onMessageError?: EventHandlerUnion<T, MessageEvent> | undefined;
onOffline?: EventHandlerUnion<T, Event> | undefined;
onOnline?: EventHandlerUnion<T, Event> | undefined;
onPageHide?: EventHandlerUnion<T, PageTransitionEvent> | undefined;
// TODO `PageRevealEvent` is currently undefined on TS
onPageReveal?: EventHandlerUnion<T, Event> | undefined;
onPageShow?: EventHandlerUnion<T, PageTransitionEvent> | undefined;
// TODO `PageSwapEvent` is currently undefined on TS
onPageSwap?: EventHandlerUnion<T, Event> | undefined;
onPopstate?: EventHandlerUnion<T, PopStateEvent> | undefined;
onRejectionHandled?: EventHandlerUnion<T, PromiseRejectionEvent> | undefined;
onStorage?: EventHandlerUnion<T, StorageEvent> | undefined;
onUnhandledRejection?: EventHandlerUnion<T, PromiseRejectionEvent> | undefined;
onUnload?: EventHandlerUnion<T, Event> | undefined;
onafterprint?: EventHandlerUnion<T, Event> | undefined;
onbeforeprint?: EventHandlerUnion<T, Event> | undefined;
onbeforeunload?: EventHandlerUnion<T, BeforeUnloadEvent> | undefined;
ongamepadconnected?: EventHandlerUnion<T, GamepadEvent> | undefined;
ongamepaddisconnected?: EventHandlerUnion<T, GamepadEvent> | undefined;
onhashchange?: EventHandlerUnion<T, HashChangeEvent> | undefined;
onlanguagechange?: EventHandlerUnion<T, Event> | undefined;
onmessage?: EventHandlerUnion<T, MessageEvent> | undefined;
onmessageerror?: EventHandlerUnion<T, MessageEvent> | undefined;
onoffline?: EventHandlerUnion<T, Event> | undefined;
ononline?: EventHandlerUnion<T, Event> | undefined;
onpagehide?: EventHandlerUnion<T, PageTransitionEvent> | undefined;
// TODO `PageRevealEvent` is currently undefined in TS
onpagereveal?: EventHandlerUnion<T, Event> | undefined;
onpageshow?: EventHandlerUnion<T, PageTransitionEvent> | undefined;
// TODO `PageSwapEvent` is currently undefined in TS
onpageswap?: EventHandlerUnion<T, Event> | undefined;
onpopstate?: EventHandlerUnion<T, PopStateEvent> | undefined;
onrejectionhandled?: EventHandlerUnion<T, PromiseRejectionEvent> | undefined;
onstorage?: EventHandlerUnion<T, StorageEvent> | undefined;
onunhandledrejection?: EventHandlerUnion<T, PromiseRejectionEvent> | undefined;
onunload?: EventHandlerUnion<T, Event> | undefined;
"on:afterprint"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:beforeprint"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:beforeunload"?: EventHandlerWithOptionsUnion<T, BeforeUnloadEvent> | undefined;
"on:gamepadconnected"?: EventHandlerWithOptionsUnion<T, GamepadEvent> | undefined;
"on:gamepaddisconnected"?: EventHandlerWithOptionsUnion<T, GamepadEvent> | undefined;
"on:hashchange"?: EventHandlerWithOptionsUnion<T, HashChangeEvent> | undefined;
"on:languagechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:message"?: EventHandlerWithOptionsUnion<T, MessageEvent> | undefined;
"on:messageerror"?: EventHandlerWithOptionsUnion<T, MessageEvent> | undefined;
"on:offline"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:online"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:pagehide"?: EventHandlerWithOptionsUnion<T, PageTransitionEvent> | undefined;
// TODO `PageRevealEvent` is currently undefined in TS
"on:pagereveal"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:pageshow"?: EventHandlerWithOptionsUnion<T, PageTransitionEvent> | undefined;
// TODO `PageSwapEvent` is currently undefined in TS
"on:pageswap"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:popstate"?: EventHandlerWithOptionsUnion<T, PopStateEvent> | undefined;
"on:rejectionhandled"?: EventHandlerWithOptionsUnion<T, PromiseRejectionEvent> | undefined;
"on:storage"?: EventHandlerWithOptionsUnion<T, StorageEvent> | undefined;
"on:unhandledrejection"?: EventHandlerWithOptionsUnion<T, PromiseRejectionEvent> | undefined;
"on:unload"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
}
/**
* Global `Elements events`, defined for all tags.
*
* That's events defined and shared by all of the `HTMLElement/SVGElement/MathMLElement`
* interfaces.
*
* Includes events defined for the `Element` interface.
*/
interface CustomEventHandlersCamelCase<T> {
onAbort?: EventHandlerUnion<T, UIEvent> | undefined;
onAnimationCancel?: EventHandlerUnion<T, AnimationEvent> | undefined;
onAnimationEnd?: EventHandlerUnion<T, AnimationEvent> | undefined;
onAnimationIteration?: EventHandlerUnion<T, AnimationEvent> | undefined;
onAnimationStart?: EventHandlerUnion<T, AnimationEvent> | undefined;
onAuxClick?: EventHandlerUnion<T, PointerEvent> | undefined;
onBeforeCopy?: EventHandlerUnion<T, ClipboardEvent> | undefined;
onBeforeCut?: EventHandlerUnion<T, ClipboardEvent> | undefined;
onBeforeInput?: InputEventHandlerUnion<T, InputEvent> | undefined;
onBeforeMatch?: EventHandlerUnion<T, Event> | undefined;
onBeforePaste?: EventHandlerUnion<T, ClipboardEvent> | undefined;
onBeforeToggle?: EventHandlerUnion<T, ToggleEvent> | undefined;
onBeforeXRSelect?: EventHandlerUnion<T, Event> | undefined;
onBlur?: FocusEventHandlerUnion<T, FocusEvent> | undefined;
onCancel?: EventHandlerUnion<T, Event> | undefined;
onCanPlay?: EventHandlerUnion<T, Event> | undefined;
onCanPlayThrough?: EventHandlerUnion<T, Event> | undefined;
onChange?: ChangeEventHandlerUnion<T, Event> | undefined;
onClick?: EventHandlerUnion<T, MouseEvent> | undefined;
onClose?: EventHandlerUnion<T, Event> | undefined;
// TODO `CommandEvent` is currently undefined in TS
onCommand?: EventHandlerUnion<T, Event> | undefined;
onCompositionEnd?: EventHandlerUnion<T, CompositionEvent> | undefined;
onCompositionStart?: EventHandlerUnion<T, CompositionEvent> | undefined;
onCompositionUpdate?: EventHandlerUnion<T, CompositionEvent> | undefined;
onContentVisibilityAutoStateChange?:
| EventHandlerUnion<T, ContentVisibilityAutoStateChangeEvent>
| undefined;
onContextLost?: EventHandlerUnion<T, Event> | undefined;
onContextMenu?: EventHandlerUnion<T, PointerEvent> | undefined;
onContextRestored?: EventHandlerUnion<T, Event> | undefined;
onCopy?: EventHandlerUnion<T, ClipboardEvent> | undefined;
onCueChange?: EventHandlerUnion<T, Event> | undefined;
onCut?: EventHandlerUnion<T, ClipboardEvent> | undefined;
onDblClick?: EventHandlerUnion<T, MouseEvent> | undefined;
onDrag?: EventHandlerUnion<T, DragEvent> | undefined;
onDragEnd?: EventHandlerUnion<T, DragEvent> | undefined;
onDragEnter?: EventHandlerUnion<T, DragEvent> | undefined;
onDragExit?: EventHandlerUnion<T, DragEvent> | undefined;
onDragLeave?: EventHandlerUnion<T, DragEvent> | undefined;
onDragOver?: EventHandlerUnion<T, DragEvent> | undefined;
onDragStart?: EventHandlerUnion<T, DragEvent> | undefined;
onDrop?: EventHandlerUnion<T, DragEvent> | undefined;
onDurationChange?: EventHandlerUnion<T, Event> | undefined;
onEmptied?: EventHandlerUnion<T, Event> | undefined;
onEnded?: EventHandlerUnion<T, Event> | undefined;
onError?: EventHandlerUnion<T, ErrorEvent> | undefined;
onFocus?: FocusEventHandlerUnion<T, FocusEvent> | undefined;
onFocusIn?: FocusEventHandlerUnion<T, FocusEvent> | undefined;
onFocusOut?: FocusEventHandlerUnion<T, FocusEvent> | undefined;
onFormData?: EventHandlerUnion<T, FormDataEvent> | undefined;
onFullscreenChange?: EventHandlerUnion<T, Event> | undefined;
onFullscreenError?: EventHandlerUnion<T, Event> | undefined;
onGotPointerCapture?: EventHandlerUnion<T, PointerEvent> | undefined;
onInput?: InputEventHandlerUnion<T, InputEvent> | undefined;
onInvalid?: EventHandlerUnion<T, Event> | undefined;
onKeyDown?: EventHandlerUnion<T, KeyboardEvent> | undefined;
onKeyPress?: EventHandlerUnion<T, KeyboardEvent> | undefined;
onKeyUp?: EventHandlerUnion<T, KeyboardEvent> | undefined;
onLoad?: EventHandlerUnion<T, Event> | undefined;
onLoadedData?: EventHandlerUnion<T, Event> | undefined;
onLoadedMetadata?: EventHandlerUnion<T, Event> | undefined;
onLoadStart?: EventHandlerUnion<T, Event> | undefined;
onLostPointerCapture?: EventHandlerUnion<T, PointerEvent> | undefined;
onMouseDown?: EventHandlerUnion<T, MouseEvent> | undefined;
onMouseEnter?: EventHandlerUnion<T, MouseEvent> | undefined;
onMouseLeave?: EventHandlerUnion<T, MouseEvent> | undefined;
onMouseMove?: EventHandlerUnion<T, MouseEvent> | undefined;
onMouseOut?: EventHandlerUnion<T, MouseEvent> | undefined;
onMouseOver?: EventHandlerUnion<T, MouseEvent> | undefined;
onMouseUp?: EventHandlerUnion<T, MouseEvent> | undefined;
onPaste?: EventHandlerUnion<T, ClipboardEvent> | undefined;
onPause?: EventHandlerUnion<T, Event> | undefined;
onPlay?: EventHandlerUnion<T, Event> | undefined;
onPlaying?: EventHandlerUnion<T, Event> | undefined;
onPointerCancel?: EventHandlerUnion<T, PointerEvent> | undefined;
onPointerDown?: EventHandlerUnion<T, PointerEvent> | undefined;
onPointerEnter?: EventHandlerUnion<T, PointerEvent> | undefined;
onPointerLeave?: EventHandlerUnion<T, PointerEvent> | undefined;
onPointerMove?: EventHandlerUnion<T, PointerEvent> | undefined;
onPointerOut?: EventHandlerUnion<T, PointerEvent> | undefined;
onPointerOver?: EventHandlerUnion<T, PointerEvent> | undefined;
onPointerRawUpdate?: EventHandlerUnion<T, PointerEvent> | undefined;
onPointerUp?: EventHandlerUnion<T, PointerEvent> | undefined;
onProgress?: EventHandlerUnion<T, ProgressEvent> | undefined;
onRateChange?: EventHandlerUnion<T, Event> | undefined;
onReset?: EventHandlerUnion<T, Event> | undefined;
onResize?: EventHandlerUnion<T, UIEvent> | undefined;
onScroll?: EventHandlerUnion<T, Event> | undefined;
onScrollEnd?: EventHandlerUnion<T, Event> | undefined;
// todo `SnapEvent` is currently undefined in TS
onScrollSnapChange?: EventHandlerUnion<T, Event> | undefined;
// todo `SnapEvent` is currently undefined in TS
onScrollSnapChanging?: EventHandlerUnion<T, Event> | undefined;
onSecurityPolicyViolation?: EventHandlerUnion<T, SecurityPolicyViolationEvent> | undefined;
onSeeked?: EventHandlerUnion<T, Event> | undefined;
onSeeking?: EventHandlerUnion<T, Event> | undefined;
onSelect?: EventHandlerUnion<T, Event> | undefined;
onSelectionChange?: EventHandlerUnion<T, Event> | undefined;
onSelectStart?: EventHandlerUnion<T, Event> | undefined;
onSlotChange?: EventHandlerUnion<T, Event> | undefined;
onStalled?: EventHandlerUnion<T, Event> | undefined;
onSubmit?: EventHandlerUnion<T, SubmitEvent> | undefined;
onSuspend?: EventHandlerUnion<T, Event> | undefined;
onTimeUpdate?: EventHandlerUnion<T, Event> | undefined;
onToggle?: EventHandlerUnion<T, ToggleEvent> | undefined;
onTouchCancel?: EventHandlerUnion<T, TouchEvent> | undefined;
onTouchEnd?: EventHandlerUnion<T, TouchEvent> | undefined;
onTouchMove?: EventHandlerUnion<T, TouchEvent> | undefined;
onTouchStart?: EventHandlerUnion<T, TouchEvent> | undefined;
onTransitionCancel?: EventHandlerUnion<T, TransitionEvent> | undefined;
onTransitionEnd?: EventHandlerUnion<T, TransitionEvent> | undefined;
onTransitionRun?: EventHandlerUnion<T, TransitionEvent> | undefined;
onTransitionStart?: EventHandlerUnion<T, TransitionEvent> | undefined;
onVolumeChange?: EventHandlerUnion<T, Event> | undefined;
onWaiting?: EventHandlerUnion<T, Event> | undefined;
onWheel?: EventHandlerUnion<T, WheelEvent> | undefined;
}
/** @type {GlobalEventHandlers} */
interface CustomEventHandlersLowerCase<T> {
onabort?: EventHandlerUnion<T, UIEvent> | undefined;
onanimationcancel?: EventHandlerUnion<T, AnimationEvent> | undefined;
onanimationend?: EventHandlerUnion<T, AnimationEvent> | undefined;
onanimationiteration?: EventHandlerUnion<T, AnimationEvent> | undefined;
onanimationstart?: EventHandlerUnion<T, AnimationEvent> | undefined;
onauxclick?: EventHandlerUnion<T, PointerEvent> | undefined;
onbeforecopy?: EventHandlerUnion<T, ClipboardEvent> | undefined;
onbeforecut?: EventHandlerUnion<T, ClipboardEvent> | undefined;
onbeforeinput?: InputEventHandlerUnion<T, InputEvent> | undefined;
onbeforematch?: EventHandlerUnion<T, Event> | undefined;
onbeforepaste?: EventHandlerUnion<T, ClipboardEvent> | undefined;
onbeforetoggle?: EventHandlerUnion<T, ToggleEvent> | undefined;
onbeforexrselect?: EventHandlerUnion<T, Event> | undefined;
onblur?: FocusEventHandlerUnion<T, FocusEvent> | undefined;
oncancel?: EventHandlerUnion<T, Event> | undefined;
oncanplay?: EventHandlerUnion<T, Event> | undefined;
oncanplaythrough?: EventHandlerUnion<T, Event> | undefined;
onchange?: ChangeEventHandlerUnion<T, Event> | undefined;
onclick?: EventHandlerUnion<T, MouseEvent> | undefined;
onclose?: EventHandlerUnion<T, Event> | undefined;
// TODO `CommandEvent` is currently undefined in TS
oncommand?: EventHandlerUnion<T, Event> | undefined;
oncompositionend?: EventHandlerUnion<T, CompositionEvent> | undefined;
oncompositionstart?: EventHandlerUnion<T, CompositionEvent> | undefined;
oncompositionupdate?: EventHandlerUnion<T, CompositionEvent> | undefined;
oncontentvisibilityautostatechange?:
| EventHandlerUnion<T, ContentVisibilityAutoStateChangeEvent>
| undefined;
oncontextlost?: EventHandlerUnion<T, Event> | undefined;
oncontextmenu?: EventHandlerUnion<T, PointerEvent> | undefined;
oncontextrestored?: EventHandlerUnion<T, Event> | undefined;
oncopy?: EventHandlerUnion<T, ClipboardEvent> | undefined;
oncuechange?: EventHandlerUnion<T, Event> | undefined;
oncut?: EventHandlerUnion<T, ClipboardEvent> | undefined;
ondblclick?: EventHandlerUnion<T, MouseEvent> | undefined;
ondrag?: EventHandlerUnion<T, DragEvent> | undefined;
ondragend?: EventHandlerUnion<T, DragEvent> | undefined;
ondragenter?: EventHandlerUnion<T, DragEvent> | undefined;
ondragexit?: EventHandlerUnion<T, DragEvent> | undefined;
ondragleave?: EventHandlerUnion<T, DragEvent> | undefined;
ondragover?: EventHandlerUnion<T, DragEvent> | undefined;
ondragstart?: EventHandlerUnion<T, DragEvent> | undefined;
ondrop?: EventHandlerUnion<T, DragEvent> | undefined;
ondurationchange?: EventHandlerUnion<T, Event> | undefined;
onemptied?: EventHandlerUnion<T, Event> | undefined;
onended?: EventHandlerUnion<T, Event> | undefined;
onerror?: EventHandlerUnion<T, ErrorEvent> | undefined;
onfocus?: FocusEventHandlerUnion<T, FocusEvent> | undefined;
onfocusin?: FocusEventHandlerUnion<T, FocusEvent> | undefined;
onfocusout?: FocusEventHandlerUnion<T, FocusEvent> | undefined;
onformdata?: EventHandlerUnion<T, FormDataEvent> | undefined;
onfullscreenchange?: EventHandlerUnion<T, Event> | undefined;
onfullscreenerror?: EventHandlerUnion<T, Event> | undefined;
ongotpointercapture?: EventHandlerUnion<T, PointerEvent> | undefined;
oninput?: InputEventHandlerUnion<T, InputEvent> | undefined;
oninvalid?: EventHandlerUnion<T, Event> | undefined;
onkeydown?: EventHandlerUnion<T, KeyboardEvent> | undefined;
onkeypress?: EventHandlerUnion<T, KeyboardEvent> | undefined;
onkeyup?: EventHandlerUnion<T, KeyboardEvent> | undefined;
onload?: EventHandlerUnion<T, Event> | undefined;
onloadeddata?: EventHandlerUnion<T, Event> | undefined;
onloadedmetadata?: EventHandlerUnion<T, Event> | undefined;
onloadstart?: EventHandlerUnion<T, Event> | undefined;
onlostpointercapture?: EventHandlerUnion<T, PointerEvent> | undefined;
onmousedown?: EventHandlerUnion<T, MouseEvent> | undefined;
onmouseenter?: EventHandlerUnion<T, MouseEvent> | undefined;
onmouseleave?: EventHandlerUnion<T, MouseEvent> | undefined;
onmousemove?: EventHandlerUnion<T, MouseEvent> | undefined;
onmouseout?: EventHandlerUnion<T, MouseEvent> | undefined;
onmouseover?: EventHandlerUnion<T, MouseEvent> | undefined;
onmouseup?: EventHandlerUnion<T, MouseEvent> | undefined;
onpaste?: EventHandlerUnion<T, ClipboardEvent> | undefined;
onpause?: EventHandlerUnion<T, Event> | undefined;
onplay?: EventHandlerUnion<T, Event> | undefined;
onplaying?: EventHandlerUnion<T, Event> | undefined;
onpointercancel?: EventHandlerUnion<T, PointerEvent> | undefined;
onpointerdown?: EventHandlerUnion<T, PointerEvent> | undefined;
onpointerenter?: EventHandlerUnion<T, PointerEvent> | undefined;
onpointerleave?: EventHandlerUnion<T, PointerEvent> | undefined;
onpointermove?: EventHandlerUnion<T, PointerEvent> | undefined;
onpointerout?: EventHandlerUnion<T, PointerEvent> | undefined;
onpointerover?: EventHandlerUnion<T, PointerEvent> | undefined;
onpointerrawupdate?: EventHandlerUnion<T, PointerEvent> | undefined;
onpointerup?: EventHandlerUnion<T, PointerEvent> | undefined;
onprogress?: EventHandlerUnion<T, ProgressEvent> | undefined;
onratechange?: EventHandlerUnion<T, Event> | undefined;
onreset?: EventHandlerUnion<T, Event> | undefined;
onresize?: EventHandlerUnion<T, UIEvent> | undefined;
onscroll?: EventHandlerUnion<T, Event> | undefined;
onscrollend?: EventHandlerUnion<T, Event> | undefined;
// todo `SnapEvent` is currently undefined in TS
onscrollsnapchange?: EventHandlerUnion<T, Event> | undefined;
// todo `SnapEvent` is currently undefined in TS
onscrollsnapchanging?: EventHandlerUnion<T, Event> | undefined;
onsecuritypolicyviolation?: EventHandlerUnion<T, SecurityPolicyViolationEvent> | undefined;
onseeked?: EventHandlerUnion<T, Event> | undefined;
onseeking?: EventHandlerUnion<T, Event> | undefined;
onselect?: EventHandlerUnion<T, Event> | undefined;
onselectionchange?: EventHandlerUnion<T, Event> | undefined;
onselectstart?: EventHandlerUnion<T, Event> | undefined;
onslotchange?: EventHandlerUnion<T, Event> | undefined;
onstalled?: EventHandlerUnion<T, Event> | undefined;
onsubmit?: EventHandlerUnion<T, SubmitEvent> | undefined;
onsuspend?: EventHandlerUnion<T, Event> | undefined;
ontimeupdate?: EventHandlerUnion<T, Event> | undefined;
ontoggle?: EventHandlerUnion<T, ToggleEvent> | undefined;
ontouchcancel?: EventHandlerUnion<T, TouchEvent> | undefined;
ontouchend?: EventHandlerUnion<T, TouchEvent> | undefined;
ontouchmove?: EventHandlerUnion<T, TouchEvent> | undefined;
ontouchstart?: EventHandlerUnion<T, TouchEvent> | undefined;
ontransitioncancel?: EventHandlerUnion<T, TransitionEvent> | undefined;
ontransitionend?: EventHandlerUnion<T, TransitionEvent> | undefined;
ontransitionrun?: EventHandlerUnion<T, TransitionEvent> | undefined;
ontransitionstart?: EventHandlerUnion<T, TransitionEvent> | undefined;
onvolumechange?: EventHandlerUnion<T, Event> | undefined;
onwaiting?: EventHandlerUnion<T, Event> | undefined;
onwheel?: EventHandlerUnion<T, WheelEvent> | undefined;
}
interface CustomEventHandlersNamespaced<T> {
"on:abort"?: EventHandlerWithOptionsUnion<T, UIEvent> | undefined;
"on:animationcancel"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
"on:animationend"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
"on:animationiteration"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
"on:animationstart"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
"on:auxclick"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:beforecopy"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
"on:beforecut"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
"on:beforeinput"?:
| EventHandlerWithOptionsUnion<T, InputEvent, InputEventHandler<T, InputEvent>>
| undefined;
"on:beforematch"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:beforepaste"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
"on:beforetoggle"?: EventHandlerWithOptionsUnion<T, ToggleEvent> | undefined;
"on:beforexrselect"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:blur"?:
| EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
| undefined;
"on:cancel"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:canplay"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:canplaythrough"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:change"?: EventHandlerWithOptionsUnion<T, Event, ChangeEventHandler<T, Event>> | undefined;
"on:click"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:close"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
// TODO `CommandEvent` is currently undefined in TS
"on:command"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:compositionend"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
"on:compositionstart"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
"on:compositionupdate"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
"on:contentvisibilityautostatechange"?:
| EventHandlerWithOptionsUnion<T, ContentVisibilityAutoStateChangeEvent>
| undefined;
"on:contextlost"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:contextmenu"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:contextrestored"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:copy"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
"on:cuechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:cut"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
"on:dblclick"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:drag"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
"on:dragend"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
"on:dragenter"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
"on:dragexit"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
"on:dragleave"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
"on:dragover"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
"on:dragstart"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
"on:drop"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
"on:durationchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:emptied"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:ended"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:error"?: EventHandlerWithOptionsUnion<T, ErrorEvent> | undefined;
"on:focus"?:
| EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
| undefined;
"on:focusin"?:
| EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
| undefined;
"on:focusout"?:
| EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
| undefined;
"on:formdata"?: EventHandlerWithOptionsUnion<T, FormDataEvent> | undefined;
"on:fullscreenchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:fullscreenerror"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:gotpointercapture"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:input"?:
| EventHandlerWithOptionsUnion<T, InputEvent, InputEventHandler<T, InputEvent>>
| undefined;
"on:invalid"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:keydown"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
"on:keypress"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
"on:keyup"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
"on:load"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:loadeddata"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:loadedmetadata"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:loadstart"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:lostpointercapture"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:mousedown"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:mouseenter"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:mouseleave"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:mousemove"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:mouseout"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:mouseover"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:mouseup"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:paste"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
"on:pause"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:play"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:playing"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:pointercancel"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:pointerdown"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:pointerenter"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:pointerleave"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:pointermove"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:pointerout"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:pointerover"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:pointerrawupdate"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:pointerup"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:progress"?: EventHandlerWithOptionsUnion<T, ProgressEvent> | undefined;
"on:ratechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:reset"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:resize"?: EventHandlerWithOptionsUnion<T, UIEvent> | undefined;
"on:scroll"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:scrollend"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
// todo `SnapEvent` is currently undefined in TS
"on:scrollsnapchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
// todo `SnapEvent` is currently undefined in TS
"on:scrollsnapchanging"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:securitypolicyviolation"?:
| EventHandlerWithOptionsUnion<T, SecurityPolicyViolationEvent>
| undefined;
"on:seeked"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:seeking"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:select"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:selectionchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:selectstart"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:slotchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:stalled"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:submit"?: EventHandlerWithOptionsUnion<T, SubmitEvent> | undefined;
"on:suspend"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:timeupdate"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:toggle"?: EventHandlerWithOptionsUnion<T, ToggleEvent> | undefined;
"on:touchcancel"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
"on:touchend"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
"on:touchmove"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
"on:touchstart"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
"on:transitioncancel"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
"on:transitionend"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
"on:transitionrun"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
"on:transitionstart"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
"on:volumechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:waiting"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:wheel"?: EventHandlerWithOptionsUnion<T, WheelEvent> | undefined;
}
/**
* Global `Element` keys, defined for all tags regardless of their namespace.
*
* That's `keys` that are defined BY ALL `HTMLElement/SVGElement/MathMLElement` interfaces.
*
* Includes `keys` defined for the `Element` and `Node` interfaces.
*/
interface DOMAttributes<T>
extends CustomAttributes<T>,
DirectiveAttributes,
DirectiveFunctionAttributes<T>,
PropAttributes,
AttrAttributes,
BoolAttributes,
OnAttributes<T>,
OnCaptureAttributes<T>,
CustomEventHandlersCamelCase<T>,
CustomEventHandlersLowerCase<T>,
CustomEventHandlersNamespaced<T>,
AriaAttributes {
// [key: ClassKeys]: boolean;
// properties
innerHTML?: FunctionMaybe<string>;
textContent?: FunctionMaybe<string | number>;
// attributes
autofocus?: FunctionMaybe<boolean | undefined>;
class?: FunctionMaybe<string | undefined>;
elementtiming?: FunctionMaybe<string | undefined>;
id?: FunctionMaybe<string | undefined>;
nonce?: FunctionMaybe<string | undefined>;
slot?: FunctionMaybe<string | undefined>;
style?: FunctionMaybe<CSSProperties | string | undefined>;
tabindex?: FunctionMaybe<number | string | undefined>;
tabIndex?: FunctionMaybe<number | string | undefined>;
}
interface CSSProperties extends csstype.PropertiesHyphen {
// Override
[key: `-${string}`]: string | number | undefined;
}
type HTMLAutocapitalize = "off" | "none" | "on" | "sentences" | "words" | "characters";
type HTMLAutocomplete =
| "additional-name"
| "address-level1"
| "address-level2"
| "address-level3"
| "address-level4"
| "address-line1"
| "address-line2"
| "address-line3"
| "bday"
| "bday-day"
| "bday-month"
| "bday-year"
| "billing"
| "cc-additional-name"
| "cc-csc"
| "cc-exp"
| "cc-exp-month"
| "cc-exp-year"
| "cc-family-name"
| "cc-given-name"
| "cc-name"
| "cc-number"
| "cc-type"
| "country"
| "country-name"
| "current-password"
| "email"
| "family-name"
| "fax"
| "given-name"
| "home"
| "honorific-prefix"
| "honorific-suffix"
| "impp"
| "language"
| "mobile"
| "name"
| "new-password"
| "nickname"
| "off"
| "on"
| "organization"
| "organization-title"
| "pager"
| "photo"
| "postal-code"
| "sex"
| "shipping"
| "street-address"
| "tel"
| "tel-area-code"
| "tel-country-code"
| "tel-extension"
| "tel-local"
| "tel-local-prefix"
| "tel-local-suffix"
| "tel-national"
| "transaction-amount"
| "transaction-currency"
| "url"
| "username"
| "work"
| (string & {});
type HTMLDir = "ltr" | "rtl" | "auto";
type HTMLFormEncType = "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
type HTMLFormMethod = "post" | "get" | "dialog";
type HTMLCrossorigin = "anonymous" | "use-credentials" | "";
type HTMLReferrerPolicy =
| "no-referrer"
| "no-referrer-when-downgrade"
| "origin"
| "origin-when-cross-origin"
| "same-origin"
| "strict-origin"
| "strict-origin-when-cross-origin"
| "unsafe-url";
type HTMLIframeSandbox =
| "allow-downloads-without-user-activation"
| "allow-downloads"
| "allow-forms"
| "allow-modals"
| "allow-orientation-lock"
| "allow-pointer-lock"
| "allow-popups"
| "allow-popups-to-escape-sandbox"
| "allow-presentation"
| "allow-same-origin"
| "allow-scripts"
| "allow-storage-access-by-user-activation"
| "allow-top-navigation"
| "allow-top-navigation-by-user-activation"
| "allow-top-navigation-to-custom-protocols";
type HTMLLinkAs =
| "audio"
| "document"
| "embed"
| "fetch"
| "font"
| "image"
| "object"
| "script"
| "style"
| "track"
| "video"
| "worker";
// All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/
interface AriaAttributes {
/**
* Identifies the currently active element when DOM focus is on a composite widget, textbox,
* group, or application.
*/
"aria-activedescendant"?: FunctionMaybe<string | undefined>;
/**
* Indicates whether assistive technologies will present all, or only parts of, the changed
* region based on the change notifications defined by the aria-relevant attribute.
*/
"aria-atomic"?: FunctionMaybe<boolean | "false" | "true" | undefined>;
/**
* Similar to the global aria-label. Defines a string value that labels the current element,
* which is intended to be converted into Braille.
*
* @see aria-label.
*/
"aria-braillelabel"?: FunctionMaybe<string | undefined>;
/**
* Defines a human-readable, author-localized abbreviated description for the role of an element
* intended to be converted into Braille. Braille is not a one-to-one transliteration of letters
* and numbers, but rather it includes various abbreviations, contractions, and characters that
* represent words (known as logograms).
*
* Instead of converting long role descriptions to Braille, the aria-brailleroledescription
* attribute allows for providing an abbreviated version of the aria-roledescription value,
* which is a human-readable, author-localized description for the role of an element, for
* improved user experience with braille interfaces.
*
* @see aria-roledescription.
*/
"aria-brailleroledescription"?: FunctionMaybe<string | undefined>;
/**
* Indicates whether inputting text could trigger display of one or more predictions of the
* user's intended value for an input and specifies how predictions would be presented if they
* are made.
*/
"aria-autocomplete"?: FunctionMaybe<"none" | "inline" | "list" | "both" | undefined>;
/**
* Indicates an element is being modified and that assistive technologies MAY want to wait until
* the modifications are complete before exposing them to the user.
*/
"aria-busy"?: FunctionMaybe<boolean | "false" | "true" | undefined>;
/**
* Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
*
* @see aria-pressed @see aria-selected.
*/
"aria-checked"?: FunctionMaybe<boolean | "false" | "mixed" | "true" | undefined>;
/**
* Defines the total number of columns in a table, grid, or treegrid.
*
* @see aria-colindex.
*/
"aria-colcount"?: FunctionMaybe<number | string | undefined>;
/**
* Defines an element's column index or position with respect to the total number of columns
* within a table, grid, or treegrid.
*
* @see aria-colcount @see aria-colspan.
*/
"aria-colindex"?: FunctionMaybe<number | string | undefined>;
/** Defines a human-readable text alternative of the numeric aria-colindex. */
"aria-colindextext"?: FunctionMaybe<number | string | undefined>;
/**
* Defines the number of columns spanned by a cell or gridcell within a table, grid, or
* treegrid.
*
* @see aria-colindex @see aria-rowspan.
*/
"aria-colspan"?: FunctionMaybe<number | string | undefined>;
/**
* Identifies the element (or elements) whose contents or presence are controlled by the current
* element.
*
* @see aria-owns.
*/
"aria-controls"?: FunctionMaybe<string | undefined>;
/**
* Indicates the element that represents the current item within a container or set of related
* elements.
*/
"aria-current"?: FunctionMaybe<
boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined
>;
/**
* Identifies the element (or elements) that describes the object.
*
* @see aria-labelledby
*/
"aria-describedby"?: FunctionMaybe<string | undefined>;
/**
* Defines a string value that describes or annotates the current element.
*
* @see aria-describedby
*/
"aria-description"?: FunctionMaybe<string | undefined>;
/**
* Identifies the element that provides a detailed, extended description for the object.
*
* @see aria-describedby.
*/
"aria-details"?: FunctionMaybe<string | undefined>;
/**
* Indicates that the element is perceivable but disabled, so it is not editable or otherwise
* operable.
*
* @see aria-hidden @see aria-readonly.
*/
"aria-disabled"?: FunctionMaybe<boolean | "false" | "true" | undefined>;
/**
* Indicates what functions can be performed when a dragged object is released on the drop
* target.
*
* @deprecated In ARIA 1.1
*/
"aria-dropeffect"?: FunctionMaybe<
"none" | "copy" | "execute" | "link" | "move" | "popup" | undefined
>;
/**
* Identifies the element that provides an error message for the object.
*
* @see aria-invalid @see aria-describedby.
*/
"aria-errormessage"?: FunctionMaybe<string | undefined>;
/**
* Indicates whether the element, or another grouping element it controls, is currently expanded
* or collapsed.
*/
"aria-expanded"?: FunctionMaybe<boolean | "false" | "true" | undefined>;
/**
* Identifies the next element (or elements) in an alternate reading order of content which, at
* the user's discretion, allows assistive technology to override the general default of reading
* in document source order.
*/
"aria-flowto"?: FunctionMaybe<string | undefined>;
/**
* Indicates an element's "grabbed" state in a drag-and-drop operation.
*
* @deprecated In ARIA 1.1
*/
"aria-grabbed"?: FunctionMaybe<boolean | "false" | "true" | undefined>;
/**
* Indicates the availability and type of interactive popup element, such as menu or dialog,
* that can be triggered by an element.
*/
"aria-haspopup"?: FunctionMaybe<
boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined
>;
/**
* Indicates whether the element is exposed to an accessibility API.
*
* @see aria-disabled.
*/
"aria-hidden"?: FunctionMaybe<boolean | "false" | "true" | undefined>;
/**
* Indicates the entered value does not conform to the format expected by the application.
*
* @see aria-errormessage.
*/
"aria-invalid"?: FunctionMaybe<boolean | "false" | "true" | "grammar" | "spelling" | undefined>;
/**
* Indicates keyboard shortcuts that an author has implemented to activate or give focus to an
* element.
*/
"aria-keyshortcuts"?: FunctionMaybe<string | undefined>;
/**
* Defines a string value that labels the current element.
*
* @see aria-labelledby.
*/
"aria-label"?: FunctionMaybe<string | undefined>;
/**
* Identifies the element (or elements) that labels the current element.
*
* @see aria-describedby.
*/
"aria-labelledby"?: FunctionMaybe<string | undefined>;
/** Defines the hierarchical level of an element within a structure. */
"aria-level"?: FunctionMaybe<number | string | undefined>;
/**
* Indicates that an element will be updated, and describes the types of updates the user
* agents, assistive technologies, and user can expect from the live region.
*/
"aria-live"?: FunctionMaybe<"off" | "assertive" | "polite" | undefined>;
/** Indicates whether an element is modal when displayed. */
"aria-modal"?: FunctionMaybe<boolean | "false" | "true" | undefined>;
/** Indicates whether a text box accepts multiple lines of input or only a single line. */
"aria-multiline"?: FunctionMaybe<boolean | "false" | "true" | undefined>;
/**
* Indicates that the user may select more than one item from the current selectable
* descendants.
*/
"aria-multiselectable"?: FunctionMaybe<boolean | "false" | "true" | undefined>;
/** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
"aria-orientation"?: FunctionMaybe<"horizontal" | "vertical" | undefined>;
/**
* Identifies an element (or elements) in order to define a visual, functional, or contextual
* parent/child relationship between DOM elements where the DOM hierarchy cannot be used to
* represent the relationship.
*
* @see aria-controls.
*/
"aria-owns"?: FunctionMaybe<string | undefined>;
/**
* Defines a short hint (a word or short phrase) intended to aid the user with data entry when
* the control has no value. A hint could be a sample value or a brief description of the
* expected format.
*/
"aria-placeholder"?: FunctionMaybe<string | undefined>;
/**
* Defines an element's number or position in the current set of listitems or treeitems. Not
* required if all elements in the set are present in the DOM.
*
* @see aria-setsize.
*/
"aria-posinset"?: FunctionMaybe<number | string | undefined>;
/**
* Indicates the current "pressed" state of toggle buttons.
*
* @see aria-checked @see aria-selected.
*/
"aria-pressed"?: FunctionMaybe<boolean | "false" | "mixed" | "true" | undefined>;
/**
* Indicates that the element is not editable, but is otherwise operable.
*
* @see aria-disabled.
*/
"aria-readonly"?: FunctionMaybe<boolean | "false" | "true" | undefined>;
/**
* Indicates what notifications the user agent will trigger when the accessibility tree within a
* live region is modified.
*
* @see aria-atomic.
*/
"aria-relevant"?: FunctionMaybe<
| "additions"
| "additions removals"
| "additions text"
| "all"
| "removals"
| "removals additions"
| "removals text"
| "text"
| "text additions"
| "text removals"
| undefined
>;
/** Indicates that user input is required on the element before a form may be submitted. */
"aria-required"?: FunctionMaybe<boolean | "false" | "true" | undefined>;
/** Defines a human-readable, author-localized description for the role of an element. */
"aria-roledescription"?: FunctionMaybe<string | undefined>;
/**
* Defines the total number of rows in a table, grid, or treegrid.
*
* @see aria-rowindex.
*/
"aria-rowcount"?: FunctionMaybe<number | string | undefined>;
/**
* Defines an element's row index or position with respect to the total number of rows within a
* table, grid, or treegrid.
*
* @see aria-rowcount @see aria-rowspan.
*/
"aria-rowindex"?: FunctionMaybe<number | string | undefined>;
/** Defines a human-readable text alternative of aria-rowindex. */
"aria-rowindextext"?: FunctionMaybe