import { BoxProps, ElementProps, Factory, MantineColor, StylesApiProps } from '../../../core'; import { type PortalProps } from '../../Portal'; import type { TransitionOverride } from '../../Transition'; import type { TourStylesNames, TourCssVariables } from '../Tour'; import { TourLabels } from '../Tour.context'; export interface TourRootProps extends BoxProps, StylesApiProps, ElementProps<'div'> { /** Whether the tour is active @default false */ active?: boolean; /** Total number of steps, used by `Tour.Navigation` and keyboard navigation to detect the last step */ stepsCount: number; /** Called when the tour is closed */ onClose?: () => void; /** Controlled current step index */ step?: number; /** Uncontrolled default step index @default 0 */ defaultStep?: number; /** Called when step changes */ onStepChange?: (step: number) => void; /** Called when a step opens */ onStepOpen?: (step: number) => void; /** Called when a step closes */ onStepClose?: (step: number) => void; /** Whether `Tour.Overlay` is rendered @default true */ withOverlay?: boolean; /** Whether pointer events pass through the spotlight cutout to the target element, the rest of the overlay keeps blocking clicks @default false */ withOverlayInteraction?: boolean; /** Whether `Tour.CloseButton` is rendered @default true */ withCloseButton?: boolean; /** Whether arrow keys navigate between steps @default true */ withKeyboardNavigation?: boolean; /** Padding around the spotlight cutout in px @default 8 */ spotlightPadding?: number; /** Border radius of the spotlight cutout in px @default 4 */ spotlightRadius?: number; /** Whether pressing Escape closes the tour @default true */ closeOnEscape?: boolean; /** Whether clicking the overlay closes the tour, with `withOverlayInteraction` only clicks outside the spotlight cutout close it @default false */ closeOnOverlayClick?: boolean; /** Labels for tour UI elements */ labels?: Partial; /** Whether to render inside a portal @default true */ withinPortal?: boolean; /** Props passed to the Portal component */ portalProps?: Omit; /** z-index of the tour @default 10000 */ zIndex?: string | number; /** Default transition props of `Tour.Tooltip` @default { duration: 200, transition: 'fade' } */ transitionProps?: TransitionOverride; /** Tour step overlay color @default "rgba(0, 0, 0, 0.5)" */ overlayColor?: string; /** Key of `theme.colors` or any valid CSS color, controls `Tour.Beacon` color and `Tour.Navigation` next button color @default theme.primaryColor */ color?: MantineColor; /** Key of `theme.shadows` or any valid CSS box-shadow value, controls the tooltip shadow @default 'md' */ tooltipShadow?: string; /** Tour content: `Tour.Overlay`, `Tour.Tooltip`, `Tour.Beacon` and other compound components */ children?: React.ReactNode; } export type TourRootFactory = Factory<{ props: TourRootProps; ref: HTMLDivElement; stylesNames: TourStylesNames; vars: TourCssVariables; }>; export declare const TourRoot: import("../../..").MantineComponent<{ props: TourRootProps; ref: HTMLDivElement; stylesNames: TourStylesNames; vars: TourCssVariables; }>; export declare namespace TourRoot { type Props = TourRootProps; }