import { ComponentPropsWithoutRef } from 'react'; import { Placement, UseFloatingOptions } from '@floating-ui/react'; /** * Props for the Tooltip component * @extends ComponentPropsWithoutRef<"div"> */ export type TooltipProps = { /** * The content to be wrapped by the tooltip */ children?: ComponentPropsWithoutRef<"div">["children"]; /** * Unique identifier for the tooltip */ id?: ComponentPropsWithoutRef<"div">["id"]; /** * Disables the shift of floating element * @internal */ disableShift?: boolean; /** * Disables the flip of floating element * @internal */ disableFlip?: boolean; /** * Disables the flip cross-axis fallback of floating element * @internal */ disableFlipFallback?: boolean; /** * Changes interaction to use hover */ openOnHover?: boolean; /** * Changes height and positioning for select/combobox * @default top */ placement?: Placement; /** * Controls the open state of the tooltip */ open?: boolean; /** * Default open state of the tooltip * @default false */ defaultOpen?: boolean; /** * Callback when open state changes */ onOpenChange?: UseFloatingOptions["onOpenChange"]; /** * Delay before showing the tooltip * @default 100 */ delay?: number; /** * Offset distance from the trigger element * @default 5 */ offset?: number; /** * Fallback placement options */ fallbackPlacements?: Placement[]; }; /** * Tooltip component for displaying contextual information on hover or focus. * * Features: * - Displays contextual information when hovering over or focusing on elements * - Supports multiple placement options (top, bottom, left, right) * - Automatic positioning with fallback placements * - Accessible with proper ARIA roles and keyboard navigation * - Supports controlled and uncontrolled open states * - Configurable delay and offset settings * - Automatic arrow positioning and rotation * - Real-time position updates during scroll and resize * * @example * * * * * This is helpful information * */ export declare const Tooltip: ((props: TooltipProps) => import("react/jsx-runtime").JSX.Element) & { /** * TooltipTrigger component that wraps the element that triggers the tooltip. * * Features: * - Wraps any React element to make it a tooltip trigger * - Handles mouse and keyboard interactions * - Provides proper ARIA attributes for accessibility * - Supports all standard HTML element props * - Automatically clones child elements with proper refs * - Handles both focusable and non-focusable children * - Manages mouse enter/leave events for hover behavior * * @example * * * */ Trigger: import('react').ForwardRefExoticComponent & import('react').RefAttributes>; /** * TooltipContent component that displays the tooltip content. * * Features: * - Displays the tooltip content with proper positioning * - Includes an arrow pointing to the trigger element * - Supports keyboard navigation and escape key to close * - Handles mouse interactions for hover behavior * - Accessible with proper ARIA roles * - Supports all standard div element props * - Automatic focus management for keyboard navigation * - Real-time position updates * - Handles both string and complex content * * @example * * This tooltip provides helpful context * */ Content: import('react').ForwardRefExoticComponent>; };