import type { ComponentPropsWithRef, ReactElement, ReactNode } from 'react'; export interface TooltipProviderProps { /** Before the first tooltip in the group opens. Default 300ms (D23). */ delay?: number; /** Before one closes. Default: immediately, as it always has. */ closeDelay?: number; /** How long after one closes its neighbours still open instantly. */ timeout?: number; children: ReactNode; } /** * Mount once at the top of an app: it makes every tooltip below it share one * delay, so the second and third open instantly while the group is warm. * * Without it each tooltip still waits its own 300ms — nothing breaks, the row * simply pauses on every button instead of once. */ export declare function TooltipProvider({ delay, closeDelay, timeout, children }: TooltipProviderProps): import("react").JSX.Element; /** `ComponentPropsWithRef` because the pill is what `Tooltip.Popup` renders — * Base UI merges its own props and ref into this element, so both must land. */ export interface TooltipProps extends Omit, 'children'> { label: string; /** The key that does the same thing, drawn as the `Kbd` chip after the label. * Pass it already formatted for the platform — this renders, it does not * decide whether the modifier is a glyph or a word. */ shortcut?: string; } /** * One line at 30px, as it has always been; a label longer than 320px wraps * onto more lines rather than running off the screen (Katerina, 19 September: * a reference's full address drew a pill 950px wide). `py-1` only shows once * it wraps: a single line is centred in the 30px. */ export declare function Tooltip({ label, shortcut, className, ...props }: TooltipProps): import("react").JSX.Element; export interface WithTooltipProps { label: string; /** Passed straight to the surface — see `TooltipProps.shortcut`. */ shortcut?: string; placement?: 'top' | 'bottom'; /** Extra classes on the wrapper — e.g. `min-w-0 shrink` so a truncating label keeps truncating inside it. */ wrapperClassName?: string; /** * For a trigger inside a line of text — a reference, a name in a sentence: * the wrapper is a ``, because a `
` is not allowed inside a * paragraph (UIG-14, Katerina, 19 September). */ inline?: boolean; children: ReactNode; } /** A tooltip on something that cannot be its own trigger — a span, a `Chip`, * an icon. It wraps what it is given in an element that carries the handlers. * A control that can be the trigger does it itself: `IconButton` takes a * `tooltip` prop, and `Button` shows a `disabledReason` the same way. */ export declare function WithTooltip({ label, shortcut, placement, wrapperClassName, inline, children }: WithTooltipProps): import("react").JSX.Element; /** * The tooltip a control wears itself, rather than through a wrapper. * * `Button` and `IconButton` call this: the Base UI button element becomes the * `Tooltip.Trigger`, so the component's root stays the `