/** * Tooltip โ€” headless primitive wrapping Radix Tooltip. * * Radix's Tooltip owns the hard parts: hover + focus triggers with * configurable delay, `aria-describedby` wiring, keyboard reachability, * pointer-vs-touch heuristics (ARCHITECTURE ยง6). We wrap thinly: * - `Tooltip.Provider` surfaces the default delay contract * - Permission gating on (canView=false โ†’ primitive returns null) * - `data-oshon-primitive="tooltip-*"` styling hooks * * Deliberately no audit events. Tooltips open/close on every hover and * an audit stream would be noise, not signal โ€” principle #3 ("RBAC + * audit by default") covers actions, not purely informational surfaces. * See `docs/adr/primitives/003-tooltip-radix-wrap.md`. */ import * as RadixTooltip from '@radix-ui/react-tooltip'; import type { ComponentPropsWithoutRef, ReactNode } from 'react'; import { type PermissionContext } from '../context.js'; export type TooltipProviderProps = ComponentPropsWithoutRef; /** * Configures default delay + skip-delay behavior for every descendant * Tooltip. Mount once near the app root. */ declare function Provider(props: TooltipProviderProps): import("react/jsx-runtime").JSX.Element; declare namespace Provider { var displayName: string; } export interface TooltipRootProps extends RadixTooltip.TooltipProps { /** * Per-instance permission override. Merges over the ambient * `PermissionContext`. A tooltip has no useful non-interactive visible * state, so any denied permission (regardless of `mode`) hides both * trigger and content and emits a `permission:denied` audit event. */ permissions?: Partial; /** * Resource name passed to `permissions.can('view', resource, attrs)`. * Default `'tooltip'`. Override for specific semantics like * `resource="field:ssn-help"`. */ resource?: string; /** Attribute bag for attribute-based access control. */ permissionAttrs?: Record; children: ReactNode; } declare function Root({ children, permissions, resource, permissionAttrs, ...rest }: TooltipRootProps): import("react/jsx-runtime").JSX.Element | null; declare namespace Root { var displayName: string; } export type TooltipTriggerProps = ComponentPropsWithoutRef; export type TooltipPortalProps = RadixTooltip.TooltipPortalProps; declare function Portal(props: TooltipPortalProps): import("react/jsx-runtime").JSX.Element; declare namespace Portal { var displayName: string; } export type TooltipContentProps = ComponentPropsWithoutRef; export type TooltipArrowProps = ComponentPropsWithoutRef; /** * Compound Tooltip primitive. Use as: * * * * * * * * Inline documentation. * * * */ export declare const Tooltip: { Provider: typeof Provider; Root: typeof Root; Trigger: import("react").ForwardRefExoticComponent, "ref"> & import("react").RefAttributes>; Portal: typeof Portal; Content: import("react").ForwardRefExoticComponent, "ref"> & import("react").RefAttributes>; Arrow: import("react").ForwardRefExoticComponent, "ref"> & import("react").RefAttributes>; }; export type TooltipProps = TooltipRootProps; export {}; //# sourceMappingURL=tooltip.d.ts.map