import { ReactNode, Ref } from 'react'; import { Color } from '../types.js'; import { SurfaceProps } from './Surface.js'; type OffsetValue = number | string; export type TooltipPosition = 'top' | 'bottom'; interface TooltipPrimitiveOwnProps { /** Controlled open state. Default `false`. Pair with `onOpenChange`. */ open?: boolean; /** Fires whenever the open state should change. */ onOpenChange?: (open: boolean) => void; /** Tailwind z-index utility for the tooltip surface. Default `'z-50'`. */ zIndex?: string; /** Extra classes applied to the tooltip root `Surface`. */ className?: string; /** Extra classes applied to the inner content area. Default includes `px-2 py-1`. */ contentClassName?: string; /** Ref to the element the tooltip should anchor against (CSS anchor positioning). */ anchorRef?: React.RefObject; /** Portal target selector. Default `'#app, #__next, #root'`. */ root?: string; /** Anchor side. Default `'top'`. */ position?: TooltipPosition; /** * Forwarded to the underlying `Surface` as `level`. * * Default depends on theme: `1` for light theme, `5` for dark theme - so the tooltip pops on top of any surface. */ surfaceLevel?: number | string; /** Distance from anchor in pixels (number) or any CSS length (`'8px'`, `'50%'`). Default `4`. */ offset?: OffsetValue; /** Accent color token. Sets the tooltip's `cladd-color-{name}` class. */ color?: Color; /** Tooltip content. */ children?: ReactNode; /** Fires when the open transition begins. */ onOpen?: () => void; /** Fires after the open transition completes. */ onOpened?: () => void; /** Fires when the close transition begins. */ onClose?: () => void; /** Fires after the close transition completes. */ onClosed?: () => void; /** Forwarded to the tooltip surface root. */ ref?: Ref; } export type TooltipPrimitiveProps = TooltipPrimitiveOwnProps & Omit; /** Shape of `TooltipPrimitive` defaults that can be supplied via `CladdProvider`'s `defaults` prop. */ export type TooltipPrimitiveDefaultProps = Partial>; export declare const TooltipPrimitive: (props: TooltipPrimitiveProps) => import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=TooltipPrimitive.d.ts.map