import { Placement } from '@floating-ui/react'; import { CSSProperties, ReactElement, ReactNode } from 'react'; interface TooltipSlotProps { tooltip?: { sx?: unknown; className?: string; style?: CSSProperties; }; popper?: unknown; transition?: unknown; arrow?: unknown; } /** * @figmaNode wXrXt5uKNNzV2DnQCgyYZH#14680-25248 * Figma "Tooltip" (Theme=Day): delta-800 #363e4a body, px8/py4, radius 3, Helper 14px/lh20 white, * max-width 320, optional arrow (9 placements). Float drop-shadow. */ export interface TooltipProps { title: ReactNode; children: ReactElement; /** @figmaProp Arrow placement (Top/Bottom/Left/Right × start/middle/end) */ placement?: Placement; /** @figmaProp Arrow = true→"Arrow" | false→"None" */ arrow?: boolean; enterDelay?: number; leaveDelay?: number; open?: boolean; onOpen?: () => void; onClose?: () => void; disableHoverListener?: boolean; disableFocusListener?: boolean; disableTouchListener?: boolean; /** * A tap on a touch screen toggles the tooltip; it stays until the next tap, a tap outside, * scroll or Escape — never a timer (disabled-states DIS-2, §5). Hover stays mouse-only so the * emulated mouse events after a tap cannot toggle it a second time. */ openOnTap?: boolean; /** * The text stays in the DOM and the trigger references it through `aria-describedby` while the * tooltip is closed, so a screen reader announces it on focus (disabled-states DIS-2, 4.1.2). */ persistentDescription?: boolean; /** Share the persistent description with every focusable item in a composite control. */ persistentDescriptionId?: string; /** * Whether the trigger gets `aria-describedby` pointing at the tooltip while it is open. It does by default. * Pass `false` for a tooltip that only repeats text the trigger's accessible name already holds, such as a truncated * label shown in full (a table header): the tooltip is then visual only, and a screen reader does not hear the text * twice. It ignores `persistentDescription`, which exists to describe the trigger. */ describesTrigger?: boolean; offsetDistance?: number; className?: string; slotProps?: TooltipSlotProps; } /** * Tooltip built on `@floating-ui/react` (replaces MUI `Tooltip`) — hover(+`enterDelay`)/focus open, * dismiss on blur/esc, `flip`/`shift` collision handling, optional arrow, portalled. Empty `title` * renders the child alone (MUI parity); a Fragment child keeps its `display: contents` wrapper so * it does not remount when a title appears. Preserves the `#363E4A` design and the `title`/`placement`/ * `arrow`/`enterDelay`/`open`/`slotProps` surface (DEC-003). TASK-301. */ export declare const StyledTooltip: ({ children, ...props }: TooltipProps) => JSX.Element; export {};