UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

28 lines 1.21 kB
import React from 'react'; /** * Moves focus within the popup when the popup becomes visible. This is useful for keyboard and * screen reader users alike. This should be used with {@link useFocusRedirect} or * {@link useFocusTrap} for a complete focus management solution. * * This should be used for popups that have focusable elements inside, like Modals, non-modal * dialogs, menus, etc. */ export declare const useInitialFocus: import("@workday/canvas-kit-react/common").BehaviorHook<{ state: { stackRef: React.RefObject<HTMLDivElement>; targetRef: React.RefObject<HTMLButtonElement>; initialFocusRef: React.RefObject<any> | undefined; returnFocusRef: React.RefObject<any> | undefined; placement: import("@popperjs/core").Placement; id: string; visibility: "hidden" | "visible"; }; events: { updatePlacement(data: { placement: import("@popperjs/core").Placement; }): void; show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void; hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void; }; }, {}>; //# sourceMappingURL=useInitialFocus.d.ts.map