UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

274 lines (273 loc) 15 kB
import React from 'react'; import { AriaLiveAllProps } from './types'; export default function useAriaLive(props: AriaLiveAllProps): { element?: React.ElementType; defaultChecked?: boolean | undefined; defaultValue?: string | number | ReadonlyArray<string> | undefined; suppressContentEditableWarning?: boolean | undefined; suppressHydrationWarning?: boolean | undefined; accessKey?: string | undefined; autoFocus?: boolean | undefined; contentEditable?: (boolean | "true" | "false") | "inherit" | undefined; contextMenu?: string | undefined; dir?: string | undefined; draggable?: (boolean | "true" | "false") | undefined; hidden?: boolean | undefined; id?: string | undefined; lang?: string | undefined; nonce?: string | undefined; placeholder?: string | undefined; slot?: string | undefined; spellCheck?: (boolean | "true" | "false") | undefined; style?: React.CSSProperties | undefined; tabIndex?: number | undefined; title?: string | undefined; translate?: "yes" | "no" | undefined; radioGroup?: string | undefined; role?: React.AriaRole | undefined; about?: string | undefined; content?: string | undefined; datatype?: string | undefined; inlist?: any; prefix?: string | undefined; property?: string | undefined; rel?: string | undefined; resource?: string | undefined; rev?: string | undefined; typeof?: string | undefined; vocab?: string | undefined; autoCapitalize?: string | undefined; autoCorrect?: string | undefined; autoSave?: string | undefined; color?: string | undefined; itemProp?: string | undefined; itemScope?: boolean | undefined; itemType?: string | undefined; itemID?: string | undefined; itemRef?: string | undefined; results?: number | undefined; security?: string | undefined; unselectable?: "on" | "off" | undefined; inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined; is?: string | undefined; 'aria-activedescendant'?: string | undefined; 'aria-atomic': (boolean | "true" | "false") | undefined; 'aria-autocomplete'?: "none" | "inline" | "list" | "both" | undefined; 'aria-braillelabel'?: string | undefined; 'aria-brailleroledescription'?: string | undefined; 'aria-busy'?: (boolean | "true" | "false") | undefined; 'aria-checked'?: boolean | "false" | "mixed" | "true" | undefined; 'aria-colcount'?: number | undefined; 'aria-colindex'?: number | undefined; 'aria-colindextext'?: string | undefined; 'aria-colspan'?: number | undefined; 'aria-controls'?: string | undefined; 'aria-current'?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined; 'aria-describedby'?: string | undefined; 'aria-description'?: string | undefined; 'aria-details'?: string | undefined; 'aria-disabled'?: (boolean | "true" | "false") | undefined; 'aria-dropeffect'?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined; 'aria-errormessage'?: string | undefined; 'aria-expanded'?: (boolean | "true" | "false") | undefined; 'aria-flowto'?: string | undefined; 'aria-grabbed'?: (boolean | "true" | "false") | undefined; 'aria-haspopup'?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined; 'aria-hidden'?: (boolean | "true" | "false") | undefined; 'aria-invalid'?: boolean | "false" | "true" | "grammar" | "spelling" | undefined; 'aria-keyshortcuts'?: string | undefined; 'aria-label'?: string | undefined; 'aria-labelledby'?: string | undefined; 'aria-level'?: number | undefined; 'aria-live': "off" | "assertive" | "polite" | undefined; 'aria-modal'?: (boolean | "true" | "false") | undefined; 'aria-multiline'?: (boolean | "true" | "false") | undefined; 'aria-multiselectable'?: (boolean | "true" | "false") | undefined; 'aria-orientation'?: "horizontal" | "vertical" | undefined; 'aria-owns'?: string | undefined; 'aria-placeholder'?: string | undefined; 'aria-posinset'?: number | undefined; 'aria-pressed'?: boolean | "false" | "mixed" | "true" | undefined; 'aria-readonly'?: (boolean | "true" | "false") | undefined; 'aria-relevant': "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined; 'aria-required'?: (boolean | "true" | "false") | undefined; 'aria-roledescription'?: string | undefined; 'aria-rowcount'?: number | undefined; 'aria-rowindex'?: number | undefined; 'aria-rowindextext'?: string | undefined; 'aria-rowspan'?: number | undefined; 'aria-selected'?: (boolean | "true" | "false") | undefined; 'aria-setsize'?: number | undefined; 'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined; 'aria-valuemax'?: number | undefined; 'aria-valuemin'?: number | undefined; 'aria-valuenow'?: number | undefined; 'aria-valuetext'?: string | undefined; dangerouslySetInnerHTML?: { __html: string | TrustedHTML; } | undefined; 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; };