` with styling.
* This slot expects a `
` element which will replace the default backdrop.
* The backdrop should have `aria-hidden="true"`.
*
*/
backdrop?: Slot<'div'>;
root: Slot<'div'>;
backdropMotion: Slot
;
};
/**
* State used in rendering DialogSurface
*/
export declare type DialogSurfaceState = ComponentState & Pick & Pick & {
open?: boolean;
/**
* Transition status for animation.
* In test environment, this is always `undefined`.
*
* @deprecated Will be always `undefined`.
*/
transitionStatus?: 'entering' | 'entered' | 'idle' | 'exiting' | 'exited' | 'unmounted';
};
/**
* The `DialogTitle` component expects to have a title/header
* and when `Dialog` is `non-modal` a close (X icon) button is provided through `action` slot by default.
*/
export declare const DialogTitle: ForwardRefComponent;
export declare const dialogTitleClassNames: SlotClassNames;
/**
* DialogTitle Props
*/
export declare type DialogTitleProps = ComponentProps;
export declare type DialogTitleSlots = {
/**
* By default this is a h2, but can be any heading or div,
* if `div` is provided do not forget to also provide proper `role="heading"` and `aria-level` attributes
*/
root: Slot<'h2', 'h1' | 'h3' | 'h4' | 'h5' | 'h6' | 'div'>;
/**
* By default a Dialog with modalType='non-modal' will have a close button action
*/
action?: Slot<'div'>;
};
/**
* State used in rendering DialogTitle
*/
export declare type DialogTitleState = ComponentState;
/**
* A non-visual component that wraps its child
* and configures them to be the trigger that will open or close a `Dialog`.
* This component should only accept one child.
*
* This component sole purpose is to avoid opting out of the internal controlled open state of a `Dialog`
* Besides being a trigger that opens/close a dialog through context this component doesn't do much,
* making it basically unnecessary in cases where the trigger is outside of the `Dialog` component.
*/
export declare const DialogTrigger: React_2.FC;
export declare type DialogTriggerAction = 'open' | 'close';
/**
* Props that are passed to the child of the DialogTrigger when cloned to ensure correct behaviour for the Dialog
*/
export declare type DialogTriggerChildProps = ARIAButtonResultProps;
export declare type DialogTriggerProps = TriggerProps & {
/**
* Explicitly declare if the trigger is responsible for opening or
* closing a Dialog visibility state.
*
* If `DialogTrigger` is outside `DialogSurface` then it'll be `open` by default
*
* If `DialogTrigger` is inside `DialogSurface` then it'll be `close` by default
*/
action?: DialogTriggerAction;
/**
* Disables internal trigger mechanism that ensures a child provided will be a compliant ARIA button.
* @default false
*/
disableButtonEnhancement?: boolean;
};
export declare type DialogTriggerState = {
children: React_2.ReactElement | null;
};
/**
* Render the final JSX of Dialog
*/
export declare const renderDialog_unstable: (state: DialogState, contextValues: DialogContextValues) => JSX.Element;
/**
* Render the final JSX of DialogActions
*/
export declare const renderDialogActions_unstable: (state: DialogActionsState) => JSX.Element;
/**
* Render the final JSX of DialogBody
*/
export declare const renderDialogBody_unstable: (state: DialogBodyState) => JSX.Element;
/**
* Render the final JSX of DialogContent
*/
export declare const renderDialogContent_unstable: (state: DialogContentState) => JSX.Element;
/**
* Render the final JSX of DialogSurface
*/
export declare const renderDialogSurface_unstable: (state: DialogSurfaceState, contextValues: DialogSurfaceContextValues) => JSX.Element;
/**
* Render the final JSX of DialogTitle
*/
export declare const renderDialogTitle_unstable: (state: DialogTitleState) => JSX.Element;
/**
* Render the final JSX of MenuTrigger
*
* Only renders children
*/
export declare const renderDialogTrigger_unstable: (state: DialogTriggerState) => ReactElement> | null;
/**
* Create the state required to render Dialog.
*
* The returned state can be modified with hooks such as useDialogStyles_unstable,
* before being passed to renderDialog_unstable.
*
* @param props - props from this instance of Dialog
*/
export declare const useDialog_unstable: (props: DialogProps) => DialogState;
/**
* Create the state required to render DialogActions.
*
* The returned state can be modified with hooks such as useDialogActionsStyles_unstable,
* before being passed to renderDialogActions_unstable.
*
* @param props - props from this instance of DialogActions
* @param ref - reference to root HTMLElement of DialogActions
*/
export declare const useDialogActions_unstable: (props: DialogActionsProps, ref: React_2.Ref) => DialogActionsState;
/**
* Apply styling to the DialogActions slots based on the state
*/
export declare const useDialogActionsStyles_unstable: (state: DialogActionsState) => DialogActionsState;
/**
* Create the state required to render DialogBody.
*
* The returned state can be modified with hooks such as useDialogBodyStyles_unstable,
* before being passed to renderDialogBody_unstable.
*
* @param props - props from this instance of DialogBody
* @param ref - reference to root HTMLElement of DialogBody
*/
export declare const useDialogBody_unstable: (props: DialogBodyProps, ref: React_2.Ref) => DialogBodyState;
/**
* Apply styling to the DialogBody slots based on the state
*/
export declare const useDialogBodyStyles_unstable: (state: DialogBodyState) => DialogBodyState;
/**
* Create the state required to render DialogBody.
*
* The returned state can be modified with hooks such as useDialogBodyStyles_unstable,
* before being passed to renderDialogBody_unstable.
*
* @param props - props from this instance of DialogBody
* @param ref - reference to root HTMLElement of DialogBody
*/
export declare const useDialogContent_unstable: (props: DialogContentProps, ref: React_2.Ref) => DialogContentState;
/**
* Apply styling to the DialogContent slots based on the state
*/
export declare const useDialogContentStyles_unstable: (state: DialogContentState) => DialogContentState;
export declare const useDialogContext_unstable: (selector: ContextSelector) => T;
export declare function useDialogContextValues_unstable(state: DialogState): DialogContextValues;
/**
* Create the state required to render DialogSurface.
*
* The returned state can be modified with hooks such as useDialogSurfaceStyles_unstable,
* before being passed to renderDialogSurface_unstable.
*
* @param props - props from this instance of DialogSurface
* @param ref - reference to root HTMLElement of DialogSurface
*/
export declare const useDialogSurface_unstable: (props: DialogSurfaceProps, ref: React_2.Ref) => DialogSurfaceState;
export declare const useDialogSurfaceContext_unstable: () => boolean;
export declare function useDialogSurfaceContextValues_unstable(state: DialogSurfaceState): DialogSurfaceContextValues;
/**
* Apply styling to the DialogSurface slots based on the state
*/
export declare const useDialogSurfaceStyles_unstable: (state: DialogSurfaceState) => DialogSurfaceState;
/**
* Create the state required to render DialogTitle.
*
* The returned state can be modified with hooks such as useDialogTitleStyles_unstable,
* before being passed to renderDialogTitle_unstable.
*
* @param props - props from this instance of DialogTitle
* @param ref - reference to root HTMLElement of DialogTitle
*/
export declare const useDialogTitle_unstable: (props: DialogTitleProps, ref: React_2.Ref) => DialogTitleState;
/**
* Apply styling to the DialogTitle slots based on the state
*/
export declare const useDialogTitleStyles_unstable: (state: DialogTitleState) => DialogTitleState;
/**
* Create the state required to render DialogTrigger.
* Clones the only child component and adds necessary event handling behaviours to open a popup Dialog
*
* @param props - props from this instance of DialogTrigger
*/
export declare const useDialogTrigger_unstable: (props: DialogTriggerProps) => DialogTriggerState;
export { }