Back to Fluentui

React Aria.Api

packages/react-components/react-aria/library/etc/react-aria.api.md

4.40.2-hotfix25.7 KB
Original Source

API Report File for "@fluentui/react-aria"

Do not edit this file. It is a report generated by API Extractor.

ts

import type { AnnounceContextValue } from '@fluentui/react-shared-contexts';
import type { DistributiveOmit } from '@fluentui/react-utilities';
import type { ExtractSlotProps } from '@fluentui/react-utilities';
import type { JSXElement } from '@fluentui/react-utilities';
import type { JSXIntrinsicElement } from '@fluentui/react-utilities';
import * as React_2 from 'react';
import type { ResolveShorthandFunction } from '@fluentui/react-utilities';
import type { Slot } from '@fluentui/react-utilities';
import type { UnionToIntersection } from '@fluentui/react-utilities';

// @public
export const ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE = "data-activedescendant-focusvisible";

// @public (undocumented)
export type ActiveDescendantChangeEvent = CustomEvent<ActiveDescendantChangeEventDetail>;

// @public (undocumented)
export const ActiveDescendantContextProvider: React_2.Provider<ActiveDescendantContextValue | undefined>;

// @public (undocumented)
export type ActiveDescendantContextValue = {
    controller: ActiveDescendantImperativeRef;
};

// @public (undocumented)
export interface ActiveDescendantImperativeRef {
    // (undocumented)
    active: () => string | undefined;
    // (undocumented)
    blur: () => void;
    // (undocumented)
    find: (predicate: (id: string) => boolean, options?: IteratorOptions & FindOptions) => string | undefined;
    // (undocumented)
    first: (options?: IteratorOptions) => string | undefined;
    // (undocumented)
    focus: (id: string) => void;
    // @deprecated (undocumented)
    focusLastActive: () => void;
    // (undocumented)
    hideAttributes: () => void;
    // (undocumented)
    hideFocusVisibleAttributes: () => void;
    // (undocumented)
    last: (options?: IteratorOptions) => string | undefined;
    // (undocumented)
    next: (options?: IteratorOptions) => string | undefined;
    // (undocumented)
    prev: (options?: IteratorOptions) => string | undefined;
    scrollActiveIntoView: () => void;
    // (undocumented)
    showAttributes: () => void;
    // (undocumented)
    showFocusVisibleAttributes: () => void;
}

// @public (undocumented)
export interface ActiveDescendantOptions {
    imperativeRef?: React_2.RefObject<ActiveDescendantImperativeRef | null>;
    // (undocumented)
    matchOption: (el: HTMLElement) => boolean;
}

// @public
export type ARIAButtonAlteredProps<Type extends ARIAButtonType> = (Type extends 'button' ? Pick<JSXIntrinsicElement<'button'>, 'onClick' | 'onKeyDown' | 'onKeyUp' | 'disabled' | 'aria-disabled' | 'tabIndex'> : never) | (Type extends 'a' ? Pick<JSXIntrinsicElement<'a'>, 'onClick' | 'onKeyDown' | 'onKeyUp' | 'aria-disabled' | 'tabIndex' | 'role' | 'href'> : never) | (Type extends 'div' ? Pick<JSXIntrinsicElement<'div'>, 'onClick' | 'onKeyDown' | 'onKeyUp' | 'aria-disabled' | 'tabIndex' | 'role'> : never);

// @public (undocumented)
export type ARIAButtonElement<AlternateAs extends 'a' | 'div' = 'a' | 'div'> = HTMLButtonElement | (AlternateAs extends 'a' ? HTMLAnchorElement : never) | (AlternateAs extends 'div' ? HTMLDivElement : never);

// @internal (undocumented)
export type ARIAButtonElementIntersection<AlternateAs extends 'a' | 'div' = 'a' | 'div'> = UnionToIntersection<ARIAButtonElement<AlternateAs>>;

// @public
export type ARIAButtonProps<Type extends ARIAButtonType = ARIAButtonType> = DistributiveOmit<React_2.PropsWithRef<JSXIntrinsicElement<Type>>, 'children'> & {
    disabled?: boolean;
    disabledFocusable?: boolean;
};

// @public
export type ARIAButtonResultProps<Type extends ARIAButtonType, Props> = Props & UnionToIntersection<ARIAButtonAlteredProps<Type>>;

// @public (undocumented)
export type ARIAButtonSlotProps<AlternateAs extends 'a' | 'div' = 'a' | 'div'> = ExtractSlotProps<Slot<'button', AlternateAs>> & Pick<ARIAButtonProps<ARIAButtonType>, 'disabled' | 'disabledFocusable'>;

// @public (undocumented)
export type ARIAButtonType = 'button' | 'a' | 'div';

// @public
export const AriaLiveAnnouncer: React_2.FC<AriaLiveAnnouncerProps>;

// @public (undocumented)
export type AriaLiveAnnouncerProps = {
    children?: React_2.ReactNode;
};

// @public (undocumented)
export type AriaLiveAnnouncerState = {
    announce: AriaLiveAnnounceFn;
    children?: React_2.ReactNode;
};

// @public (undocumented)
export const renderAriaLiveAnnouncer_unstable: (state: AriaLiveAnnouncerState, contextValues: AriaLiveAnnouncerContextValues) => JSXElement;

// @public (undocumented)
export function useActiveDescendant<TActiveParentElement extends HTMLElement, TListboxElement extends HTMLElement>(options: ActiveDescendantOptions): UseActiveDescendantReturn<TActiveParentElement, TListboxElement>;

// @public (undocumented)
export const useActiveDescendantContext: () => ActiveDescendantContextValue;

// @internal
export function useARIAButtonProps<Type extends ARIAButtonType, Props extends ARIAButtonProps<Type>>(type?: Type, props?: Props): ARIAButtonResultProps<Type, Props>;

// @internal @deprecated (undocumented)
export const useARIAButtonShorthand: ResolveShorthandFunction<ARIAButtonSlotProps>;

// @public (undocumented)
export const useAriaLiveAnnouncer_unstable: (props: AriaLiveAnnouncerProps) => AriaLiveAnnouncerState;

// @public (undocumented)
export function useAriaLiveAnnouncerContextValues_unstable(state: AriaLiveAnnouncerState): AriaLiveAnnouncerContextValues;

// @public (undocumented)
export const useHasParentActiveDescendantContext: () => boolean;

// @public (undocumented)
export function useTypingAnnounce<TInputElement extends HTMLElement = HTMLElement>(): TypingAnnounceReturn<TInputElement>;

// (No @packageDocumentation comment for this package)