// Generated by dts-bundle-generator v7.2.0 import React from 'react'; import { HTMLAttributes, ReactNode } from 'react'; export interface Conditions { xs?: T; md?: T; lg?: T; xl?: T; xxl?: T; } declare const propertiesModal: { padding: { base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; small: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; none: string; }; }; export type PaddingProperties = keyof typeof propertiesModal.padding; export interface ModalSprinkle { /** * The maxWidth property specifies the maxWidth of a modal's content area. The width of the modal will be defined by the width of the content in this prop. * @default { xs: "100%", md: "500px" } */ maxWidth?: string | Conditions; /** * The padding properties are used to generate space around an modal's content area. * @default base */ padding?: PaddingProperties | Conditions; } declare const modal: { classnames: { overlay: string; overlayZIndex: Record<"base" | "top", string>; overlayScoped: string; overlayScopedZIndex: Record<"base" | "top", string>; container: string; containerZIndex: Record<"base" | "top", string>; container__close: string; container__footer: string; }; subComponents: { header: { sprinkle: ((props: { padding?: "small" | "none" | "base" | undefined; }) => string) & { properties: Set<"padding">; }; properties: { padding: { base: string; small: string; none: string; }; }; content: string; }; body: { sprinkle: ((props: { padding?: "small" | "none" | "base" | undefined; }) => string) & { properties: Set<"padding">; }; properties: { padding: { base: string; small: string; none: string; }; }; }; footer: { sprinkle: ((props: { padding?: "small" | "none" | "base" | undefined; }) => string) & { properties: Set<"padding">; }; properties: { padding: { base: string; small: string; none: string; }; }; }; }; sprinkle: import("rainbow-sprinkles/dist/declarations/src/createRuntimeFn").SprinklesFn<[ { config: { maxWidth: { dynamic: { default: string; conditions: Record<"xs" | "md" | "lg" | "xl", string>; }; dynamicScale: true; name: "maxWidth"; vars: { default: string; conditions: Record<"xs" | "md" | "lg" | "xl", string>; }; }; padding: { dynamic: { default: string; conditions: Record<"xs" | "md" | "lg" | "xl", string>; }; dynamicScale: { base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; small: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; none: string; }; name: "padding"; vars: { default: string; conditions: Record<"xs" | "md" | "lg" | "xl", string>; }; }; }; } & { config: { [x: string]: { mappings: ("maxWidth" | "padding")[]; }; }; } ]>; properties: { padding: { base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; small: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; none: string; }; }; }; export type CloseOnOutsidePress = (event: PointerEvent | MouseEvent) => boolean; export interface ModalBodyProperties { /** * The content of the modal body. * @TJS-type React.ReactNode */ children: ReactNode; /** * The padding properties are used to generate space around an modal's body content area. * @default none */ padding?: keyof typeof modal.subComponents.body.properties.padding; } export type ModalBodyProps = ModalBodyProperties & HTMLAttributes; export declare const ModalBody: React.FC; export interface ModalFooterProperties { /** * The content of the modal footer. * @TJS-type React.ReactNode */ children: ReactNode; /** * The padding properties are used to generate space around an modal's footer content area. * @default none */ padding?: keyof typeof modal.subComponents.footer.properties.padding; } export type ModalFooterProps = ModalFooterProperties & HTMLAttributes; export declare const ModalFooter: React.FC; export interface ModalHeaderProperties { /** * The content of the modal header. * @TJS-type React.ReactNode */ children?: ReactNode; /** * The title to display in the modal header. */ title?: string; /** * The tag to display next to the title. * @TJS-type React.ReactNode */ tag?: ReactNode; /** * The padding properties are used to generate space around an modal's header content area. * @default none */ padding?: keyof typeof modal.subComponents.header.properties.padding; } export type ModalHeaderProps = ModalHeaderProperties & HTMLAttributes; export declare const ModalHeader: React.FC; export interface ModalComponents { Body: typeof ModalBody; Footer: typeof ModalFooter; Header: typeof ModalHeader; } export interface ModalProperties extends ModalSprinkle { /** * The content of the modal. * @TJS-type React.ReactNode */ children: ReactNode; /** * Whether the modal is open or not. */ open: boolean; /** * Callback fired when the component requests to be closed. * @TJS-type (open: boolean) => void; */ onDismiss?: (open: boolean) => void; /** * Id to be embedded in the portal element */ portalId?: string; /** * Controls whether clicking/pressing outside should close the modal. * - boolean: enable/disable dismissal on outside press * - function: receive the DOM event and return true to allow closing, false to ignore * * Defaults to true. */ closeOnOutsidePress?: boolean | CloseOnOutsidePress; /** * The attribute name to ignore when checking for outside clicks. Useful to * mark regions (e.g., a chat) that should not close the modal when clicked. * @default "data-nimbus-outside-press-ignore" */ ignoreAttributeName?: string; /** * The padding properties are used to generate space around an modal's content area. * @default base */ padding?: keyof typeof modal.properties.padding; /** * Controls whether the built-in close (X) button renders. * Only takes effect when `onDismiss` is provided. * @default true */ renderDismissButton?: boolean; /** * Stacking layer for the modal. * - "base": standard modal layer (above the page, below floating components like tooltip/toast/popover). * - "top": renders above all other floating components. Reserved exclusively for Modal. * Only effective on the default portaled path; has no effect when `root` is provided. * @default "base" */ zIndex?: "base" | "top"; } export type ModalProps = ModalProperties & { /** * Root element where the portal should be mounted. When provided and not null, * the portal renders inside this element; when null/undefined, the default root is used. */ root?: HTMLElement | null; } & HTMLAttributes; export declare const Modal: React.FC & ModalComponents; export {};