@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
274 lines (273 loc) • 13.8 kB
TypeScript
import React from 'react';
import { AriaLiveAllProps } from './types';
export default function useAriaLive(props: AriaLiveAllProps): {
element?: React.ElementType<any>;
defaultChecked?: boolean;
defaultValue?: string | number | readonly string[];
suppressContentEditableWarning?: boolean;
suppressHydrationWarning?: boolean;
accessKey?: string;
autoFocus?: boolean;
contentEditable?: "inherit" | (boolean | "true" | "false");
contextMenu?: string;
dir?: string;
draggable?: boolean | "true" | "false";
hidden?: boolean;
id?: string;
lang?: string;
nonce?: string;
placeholder?: string;
slot?: string;
spellCheck?: boolean | "true" | "false";
style?: React.CSSProperties;
tabIndex?: number;
title?: string;
translate?: "yes" | "no";
radioGroup?: string;
role?: React.AriaRole;
about?: string;
content?: string;
datatype?: string;
inlist?: any;
prefix?: string;
property?: string;
rel?: string;
resource?: string;
rev?: string;
typeof?: string;
vocab?: string;
autoCapitalize?: string;
autoCorrect?: string;
autoSave?: string;
color?: string;
itemProp?: string;
itemScope?: boolean;
itemType?: string;
itemID?: string;
itemRef?: string;
results?: number;
security?: string;
unselectable?: "off" | "on";
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal";
is?: string;
'aria-activedescendant'?: string;
'aria-atomic': boolean | "true" | "false";
'aria-autocomplete'?: "none" | "list" | "inline" | "both";
'aria-braillelabel'?: string;
'aria-brailleroledescription'?: string;
'aria-busy'?: boolean | "true" | "false";
'aria-checked'?: boolean | "true" | "false" | "mixed";
'aria-colcount'?: number;
'aria-colindex'?: number;
'aria-colindextext'?: string;
'aria-colspan'?: number;
'aria-controls'?: string;
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date";
'aria-describedby'?: string;
'aria-description'?: string;
'aria-details'?: string;
'aria-disabled'?: boolean | "true" | "false";
'aria-dropeffect'?: "copy" | "link" | "none" | "execute" | "move" | "popup";
'aria-errormessage'?: string;
'aria-expanded'?: boolean | "true" | "false";
'aria-flowto'?: string;
'aria-grabbed'?: boolean | "true" | "false";
'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree";
'aria-hidden'?: boolean | "true" | "false";
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling";
'aria-keyshortcuts'?: string;
'aria-label'?: string;
'aria-labelledby'?: string;
'aria-level'?: number;
'aria-live': "off" | "assertive" | "polite";
'aria-modal'?: boolean | "true" | "false";
'aria-multiline'?: boolean | "true" | "false";
'aria-multiselectable'?: boolean | "true" | "false";
'aria-orientation'?: "horizontal" | "vertical";
'aria-owns'?: string;
'aria-placeholder'?: string;
'aria-posinset'?: number;
'aria-pressed'?: boolean | "true" | "false" | "mixed";
'aria-readonly'?: boolean | "true" | "false";
'aria-relevant': "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
'aria-required'?: boolean | "true" | "false";
'aria-roledescription'?: string;
'aria-rowcount'?: number;
'aria-rowindex'?: number;
'aria-rowindextext'?: string;
'aria-rowspan'?: number;
'aria-selected'?: boolean | "true" | "false";
'aria-setsize'?: number;
'aria-sort'?: "other" | "none" | "ascending" | "descending";
'aria-valuemax'?: number;
'aria-valuemin'?: number;
'aria-valuenow'?: number;
'aria-valuetext'?: string;
dangerouslySetInnerHTML?: {
__html: string | TrustedHTML;
};
onCopy?: React.ClipboardEventHandler<HTMLElement>;
onCopyCapture?: React.ClipboardEventHandler<HTMLElement>;
onCut?: React.ClipboardEventHandler<HTMLElement>;
onCutCapture?: React.ClipboardEventHandler<HTMLElement>;
onPaste?: React.ClipboardEventHandler<HTMLElement>;
onPasteCapture?: React.ClipboardEventHandler<HTMLElement>;
onCompositionEnd?: React.CompositionEventHandler<HTMLElement>;
onCompositionEndCapture?: React.CompositionEventHandler<HTMLElement>;
onCompositionStart?: React.CompositionEventHandler<HTMLElement>;
onCompositionStartCapture?: React.CompositionEventHandler<HTMLElement>;
onCompositionUpdate?: React.CompositionEventHandler<HTMLElement>;
onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLElement>;
onFocus?: React.FocusEventHandler<HTMLElement>;
onFocusCapture?: React.FocusEventHandler<HTMLElement>;
onBlur?: React.FocusEventHandler<HTMLElement>;
onBlurCapture?: React.FocusEventHandler<HTMLElement>;
onChange?: React.FormEventHandler<HTMLElement>;
onChangeCapture?: React.FormEventHandler<HTMLElement>;
onBeforeInput?: React.FormEventHandler<HTMLElement>;
onBeforeInputCapture?: React.FormEventHandler<HTMLElement>;
onInput?: React.FormEventHandler<HTMLElement>;
onInputCapture?: React.FormEventHandler<HTMLElement>;
onReset?: React.FormEventHandler<HTMLElement>;
onResetCapture?: React.FormEventHandler<HTMLElement>;
onSubmit?: React.FormEventHandler<HTMLElement>;
onSubmitCapture?: React.FormEventHandler<HTMLElement>;
onInvalid?: React.FormEventHandler<HTMLElement>;
onInvalidCapture?: React.FormEventHandler<HTMLElement>;
onLoad?: React.ReactEventHandler<HTMLElement>;
onLoadCapture?: React.ReactEventHandler<HTMLElement>;
onError?: React.ReactEventHandler<HTMLElement>;
onErrorCapture?: React.ReactEventHandler<HTMLElement>;
onKeyDown?: React.KeyboardEventHandler<HTMLElement>;
onKeyDownCapture?: React.KeyboardEventHandler<HTMLElement>;
onKeyPress?: React.KeyboardEventHandler<HTMLElement>;
onKeyPressCapture?: React.KeyboardEventHandler<HTMLElement>;
onKeyUp?: React.KeyboardEventHandler<HTMLElement>;
onKeyUpCapture?: React.KeyboardEventHandler<HTMLElement>;
onAbort?: React.ReactEventHandler<HTMLElement>;
onAbortCapture?: React.ReactEventHandler<HTMLElement>;
onCanPlay?: React.ReactEventHandler<HTMLElement>;
onCanPlayCapture?: React.ReactEventHandler<HTMLElement>;
onCanPlayThrough?: React.ReactEventHandler<HTMLElement>;
onCanPlayThroughCapture?: React.ReactEventHandler<HTMLElement>;
onDurationChange?: React.ReactEventHandler<HTMLElement>;
onDurationChangeCapture?: React.ReactEventHandler<HTMLElement>;
onEmptied?: React.ReactEventHandler<HTMLElement>;
onEmptiedCapture?: React.ReactEventHandler<HTMLElement>;
onEncrypted?: React.ReactEventHandler<HTMLElement>;
onEncryptedCapture?: React.ReactEventHandler<HTMLElement>;
onEnded?: React.ReactEventHandler<HTMLElement>;
onEndedCapture?: React.ReactEventHandler<HTMLElement>;
onLoadedData?: React.ReactEventHandler<HTMLElement>;
onLoadedDataCapture?: React.ReactEventHandler<HTMLElement>;
onLoadedMetadata?: React.ReactEventHandler<HTMLElement>;
onLoadedMetadataCapture?: React.ReactEventHandler<HTMLElement>;
onLoadStart?: React.ReactEventHandler<HTMLElement>;
onLoadStartCapture?: React.ReactEventHandler<HTMLElement>;
onPause?: React.ReactEventHandler<HTMLElement>;
onPauseCapture?: React.ReactEventHandler<HTMLElement>;
onPlay?: React.ReactEventHandler<HTMLElement>;
onPlayCapture?: React.ReactEventHandler<HTMLElement>;
onPlaying?: React.ReactEventHandler<HTMLElement>;
onPlayingCapture?: React.ReactEventHandler<HTMLElement>;
onProgress?: React.ReactEventHandler<HTMLElement>;
onProgressCapture?: React.ReactEventHandler<HTMLElement>;
onRateChange?: React.ReactEventHandler<HTMLElement>;
onRateChangeCapture?: React.ReactEventHandler<HTMLElement>;
onResize?: React.ReactEventHandler<HTMLElement>;
onResizeCapture?: React.ReactEventHandler<HTMLElement>;
onSeeked?: React.ReactEventHandler<HTMLElement>;
onSeekedCapture?: React.ReactEventHandler<HTMLElement>;
onSeeking?: React.ReactEventHandler<HTMLElement>;
onSeekingCapture?: React.ReactEventHandler<HTMLElement>;
onStalled?: React.ReactEventHandler<HTMLElement>;
onStalledCapture?: React.ReactEventHandler<HTMLElement>;
onSuspend?: React.ReactEventHandler<HTMLElement>;
onSuspendCapture?: React.ReactEventHandler<HTMLElement>;
onTimeUpdate?: React.ReactEventHandler<HTMLElement>;
onTimeUpdateCapture?: React.ReactEventHandler<HTMLElement>;
onVolumeChange?: React.ReactEventHandler<HTMLElement>;
onVolumeChangeCapture?: React.ReactEventHandler<HTMLElement>;
onWaiting?: React.ReactEventHandler<HTMLElement>;
onWaitingCapture?: React.ReactEventHandler<HTMLElement>;
onAuxClick?: React.MouseEventHandler<HTMLElement>;
onAuxClickCapture?: React.MouseEventHandler<HTMLElement>;
onClick?: React.MouseEventHandler<HTMLElement>;
onClickCapture?: React.MouseEventHandler<HTMLElement>;
onContextMenu?: React.MouseEventHandler<HTMLElement>;
onContextMenuCapture?: React.MouseEventHandler<HTMLElement>;
onDoubleClick?: React.MouseEventHandler<HTMLElement>;
onDoubleClickCapture?: React.MouseEventHandler<HTMLElement>;
onDrag?: React.DragEventHandler<HTMLElement>;
onDragCapture?: React.DragEventHandler<HTMLElement>;
onDragEnd?: React.DragEventHandler<HTMLElement>;
onDragEndCapture?: React.DragEventHandler<HTMLElement>;
onDragEnter?: React.DragEventHandler<HTMLElement>;
onDragEnterCapture?: React.DragEventHandler<HTMLElement>;
onDragExit?: React.DragEventHandler<HTMLElement>;
onDragExitCapture?: React.DragEventHandler<HTMLElement>;
onDragLeave?: React.DragEventHandler<HTMLElement>;
onDragLeaveCapture?: React.DragEventHandler<HTMLElement>;
onDragOver?: React.DragEventHandler<HTMLElement>;
onDragOverCapture?: React.DragEventHandler<HTMLElement>;
onDragStart?: React.DragEventHandler<HTMLElement>;
onDragStartCapture?: React.DragEventHandler<HTMLElement>;
onDrop?: React.DragEventHandler<HTMLElement>;
onDropCapture?: React.DragEventHandler<HTMLElement>;
onMouseDown?: React.MouseEventHandler<HTMLElement>;
onMouseDownCapture?: React.MouseEventHandler<HTMLElement>;
onMouseEnter?: React.MouseEventHandler<HTMLElement>;
onMouseLeave?: React.MouseEventHandler<HTMLElement>;
onMouseMove?: React.MouseEventHandler<HTMLElement>;
onMouseMoveCapture?: React.MouseEventHandler<HTMLElement>;
onMouseOut?: React.MouseEventHandler<HTMLElement>;
onMouseOutCapture?: React.MouseEventHandler<HTMLElement>;
onMouseOver?: React.MouseEventHandler<HTMLElement>;
onMouseOverCapture?: React.MouseEventHandler<HTMLElement>;
onMouseUp?: React.MouseEventHandler<HTMLElement>;
onMouseUpCapture?: React.MouseEventHandler<HTMLElement>;
onSelect?: React.ReactEventHandler<HTMLElement>;
onSelectCapture?: React.ReactEventHandler<HTMLElement>;
onTouchCancel?: React.TouchEventHandler<HTMLElement>;
onTouchCancelCapture?: React.TouchEventHandler<HTMLElement>;
onTouchEnd?: React.TouchEventHandler<HTMLElement>;
onTouchEndCapture?: React.TouchEventHandler<HTMLElement>;
onTouchMove?: React.TouchEventHandler<HTMLElement>;
onTouchMoveCapture?: React.TouchEventHandler<HTMLElement>;
onTouchStart?: React.TouchEventHandler<HTMLElement>;
onTouchStartCapture?: React.TouchEventHandler<HTMLElement>;
onPointerDown?: React.PointerEventHandler<HTMLElement>;
onPointerDownCapture?: React.PointerEventHandler<HTMLElement>;
onPointerMove?: React.PointerEventHandler<HTMLElement>;
onPointerMoveCapture?: React.PointerEventHandler<HTMLElement>;
onPointerUp?: React.PointerEventHandler<HTMLElement>;
onPointerUpCapture?: React.PointerEventHandler<HTMLElement>;
onPointerCancel?: React.PointerEventHandler<HTMLElement>;
onPointerCancelCapture?: React.PointerEventHandler<HTMLElement>;
onPointerEnter?: React.PointerEventHandler<HTMLElement>;
onPointerEnterCapture?: React.PointerEventHandler<HTMLElement>;
onPointerLeave?: React.PointerEventHandler<HTMLElement>;
onPointerLeaveCapture?: React.PointerEventHandler<HTMLElement>;
onPointerOver?: React.PointerEventHandler<HTMLElement>;
onPointerOverCapture?: React.PointerEventHandler<HTMLElement>;
onPointerOut?: React.PointerEventHandler<HTMLElement>;
onPointerOutCapture?: React.PointerEventHandler<HTMLElement>;
onGotPointerCapture?: React.PointerEventHandler<HTMLElement>;
onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLElement>;
onLostPointerCapture?: React.PointerEventHandler<HTMLElement>;
onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLElement>;
onScroll?: React.UIEventHandler<HTMLElement>;
onScrollCapture?: React.UIEventHandler<HTMLElement>;
onWheel?: React.WheelEventHandler<HTMLElement>;
onWheelCapture?: React.WheelEventHandler<HTMLElement>;
onAnimationStart?: React.AnimationEventHandler<HTMLElement>;
onAnimationStartCapture?: React.AnimationEventHandler<HTMLElement>;
onAnimationEnd?: React.AnimationEventHandler<HTMLElement>;
onAnimationEndCapture?: React.AnimationEventHandler<HTMLElement>;
onAnimationIteration?: React.AnimationEventHandler<HTMLElement>;
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLElement>;
onTransitionEnd?: React.TransitionEventHandler<HTMLElement>;
onTransitionEndCapture?: React.TransitionEventHandler<HTMLElement>;
className: string;
children: React.ReactNode;
};