@workday/canvas-kit-react
Version:
The parent module that contains all Workday Canvas Kit React components
31 lines • 1.97 kB
TypeScript
export declare const useModalCard: import("@workday/canvas-kit-react/common").BehaviorHook<{
state: {
stackRef: import("react").RefObject<HTMLDivElement>;
targetRef: import("react").RefObject<HTMLButtonElement>;
initialFocusRef: import("react").RefObject<any> | undefined;
returnFocusRef: import("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 | import("react").SyntheticEvent<Element, Event> | undefined): void;
hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
};
}, import("@workday/canvas-kit-react/common").RemoveNulls<import("@workday/canvas-kit-react/common").MergeProps<{
readonly role: "dialog";
readonly 'aria-labelledby': string;
}, import("@workday/canvas-kit-react/common").MergeProps<{
/**
* `aria-modal` was added with the intent that screen readers would add support to properly define content within a modal,
* including popups like a Select. However, when aria-modal is true, it will hide other elements from screen readers,
* including popups owned by the modal because these popups are siblings to the modal and not ancestors. There is no defined time when Apple/VoiceOver
* might change this behavior and better support aria-owns, so for the time being we'll explicitly set this to false to provide a better
* VoiceOver experience.
*/
readonly 'aria-modal': false;
}, import("@workday/canvas-kit-react/common").MergeProps<{}, import("@workday/canvas-kit-react/common").MergeProps<{}, import("@workday/canvas-kit-react/common").MergeProps<{}, import("@workday/canvas-kit-react/common").MergeProps<{}, {}>>>>>>>>;
//# sourceMappingURL=useModalCard.d.ts.map