import React from 'react'; import type { PortalNode, PortalProps } from '@instructure/ui-portal'; import type { PositionMountNode } from '@instructure/ui-position'; import type { TransitionProps, TransitionType } from '@instructure/ui-motion'; import type { DialogProps } from '@instructure/ui-dialog'; import type { OtherHTMLAttributes, PickPropsWithExceptions, PropValidators, UIElement } from '@instructure/shared-types'; type OverlayOwnProps = { /** * Whether or not the `` is open */ open?: boolean; /** * The type of `` to use for animating in/out */ transition?: TransitionType; /** * __Deprecated__: An element or a function returning an element to apply `aria-hidden` to */ applicationElement?: React.ReactElement[] | React.ReactElement | (() => React.ReactElement[] | React.ReactElement); } & PropsForPortal & PropsForDialog & PropsForTransition; type PropsForPortal = { /** * Callback fired when `` content has been mounted in the DOM */ onOpen?: (DOMNode: PortalNode) => void; /** * Callback fired when `` has been unmounted from the DOM */ onClose?: () => void; /** * An element or a function returning an element to use as the mount node * for the `` (defaults to `document.body`) */ mountNode?: PositionMountNode; /** * Insert the element at the 'top' of the mountNode or at the 'bottom' */ insertAt?: 'bottom' | 'top'; }; type PropsForDialog = { children?: React.ReactNode; /** * An accessible label for the `` content */ label: string; /** * An element or a function returning an element to focus by default */ defaultFocusElement?: UIElement; /** * An element or a function returning an element that wraps the content of the `` */ contentElement?: UIElement; shouldContainFocus?: boolean; shouldReturnFocus?: boolean; shouldCloseOnDocumentClick?: boolean; shouldCloseOnEscape?: boolean; /** * Callback fired when the `` is requesting to be closed */ onDismiss?: (event: React.UIEvent | React.FocusEvent, documentClick?: boolean) => void; }; type PropsForTransition = { /** * Show the component; triggers the enter or exit animation */ in?: boolean; /** * Unmount the component (remove it from the DOM) when it is not shown */ unmountOnExit?: boolean; /** * Run the enter animation when the component mounts, if it is initially * shown */ transitionOnMount?: boolean; /** * Run the enter animation */ transitionEnter?: boolean; /** * Run the exit animation */ transitionExit?: boolean; /** * Callback fired before the "entering" classes are applied */ onEnter?: () => void; /** * Callback fired after the "entering" classes are applied */ onEntering?: () => void; /** * Callback fired after the "enter" classes are applied */ onEntered?: (type?: TransitionType) => void; /** * Callback fired before the "exiting" classes are applied */ onExit?: () => void; /** * Callback fired after the "exiting" classes are applied */ onExiting?: () => void; /** * Callback fired after the "exited" classes are applied */ onExited?: (type?: TransitionType) => void; }; type PropKeys = keyof OverlayOwnProps; type AllowedPropKeys = Readonly>; type OverlayProps = PickPropsWithExceptions & PickPropsWithExceptions & PickPropsWithExceptions & OverlayOwnProps & OtherHTMLAttributes; type OverlayState = { open: boolean; transitioning: boolean; }; declare const propTypes: PropValidators; declare const allowedProps: AllowedPropKeys; export type { OverlayProps, OverlayState }; export { propTypes, allowedProps }; //# sourceMappingURL=props.d.ts.map