import React from 'react'; import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'; import type { OtherHTMLAttributes, TrayTheme, LiveRegion, UIElement } from '@instructure/shared-types'; import type { TextDirectionContextConsumerProps } from '@instructure/ui-i18n'; import type { TransitionType, BaseTransitionStatesType } from '@instructure/ui-motion'; type TrayOwnProps = { label: string; /** * The size (width) of the `` when placement is `start` or `end` */ size?: 'x-small' | 'small' | 'regular' | 'medium' | 'large'; /** * Placement to determine where the `` should display in the viewport */ placement?: 'top' | 'bottom' | 'start' | 'end' | 'center'; /** * Whether or not the `` is open */ open?: boolean; /** * An element or a function returning an element to focus by default */ defaultFocusElement?: UIElement; /** * * A function that returns a reference to the content element */ contentRef?: (el: HTMLSpanElement | null) => void; /** * Whether focus should be contained within the `` when it is open */ shouldContainFocus?: boolean; /** * Whether focus should be restored when the `` is closed */ shouldReturnFocus?: boolean; /** * Should the `` hide when clicks occur outside the content */ shouldCloseOnDocumentClick?: boolean; /** * Callback fired when `` content has been mounted in the DOM */ onOpen?: (type?: TransitionType) => void; /** * Callback fired when `` has been unmounted from the DOM */ onClose?: (type?: TransitionType) => void; /** * Callback fired when the `` is requesting to be closed */ onDismiss?: (event: React.UIEvent | React.FocusEvent, documentClick?: boolean) => void; /** * An element or a function returning an element to use as the mount node * for the `` (defaults to `document.body`) */ mountNode?: Element | (() => Element | null) | null; /** * Insert the element at the 'top' of the mountNode or at the 'bottom' */ insertAt?: 'bottom' | 'top'; /** * An element, function returning an element, or array of elements that will not be hidden from * the screen reader when the `` is open */ liveRegion?: LiveRegion; /** * Callback fired when the transitions in/out */ onTransition?: (toState: BaseTransitionStatesType, fromState: BaseTransitionStatesType) => void; /** * Callback fired before the transitions in */ onEnter?: () => void; /** * Callback fired as the begins to transition in */ onEntering?: () => void; /** * Callback fired after the finishes transitioning in */ onEntered?: (type?: TransitionType) => void; /** * Callback fired right before the transitions out */ onExit?: () => void; /** * Callback fired as the begins to transition out */ onExiting?: () => void; /** * Callback fired after the finishes transitioning out */ onExited?: (type?: TransitionType) => void; /** * 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; /** * Should the `` have a border */ border?: boolean; /** * Should the `` have a box shadow */ shadow?: boolean; children?: React.ReactNode; /** * Add Mask overlay to the `` */ enableMask?: boolean; }; type PropKeys = keyof TrayOwnProps; type AllowedPropKeys = Readonly>; type TrayProps = TrayOwnProps & TextDirectionContextConsumerProps & WithStyleProps & OtherHTMLAttributes; type TrayStyle = ComponentStyle<'tray' | 'content'>; declare const allowedProps: AllowedPropKeys; type TrayState = { transitioning: boolean; open: boolean; }; export type { TrayProps, TrayStyle, TrayState }; export { allowedProps }; //# sourceMappingURL=props.d.ts.map