"use client" import * as React from "react" import { Tooltip as TooltipPrimitive } from "radix-ui" import { cn } from "../../lib/utils" import { floatingWindowOverlayZClass, useInsideFloatingWindowOverlay, } from "./floating-window-overlay-context" /** * Whether a {@link TooltipProvider} is already above us. * * Radix's own provider context has no default value and throws when a `Tooltip` * renders without one. A tooltip is decoration on a control that works fine * without it, so a missing provider must not be able to take the page down: * `Tip` reads this and supplies a provider for itself when the answer is no. */ const TooltipProvidedContext = React.createContext(false) function useTooltipProvided() { return React.useContext(TooltipProvidedContext) } function TooltipProvider({ delayDuration = 0, ...props }: React.ComponentProps) { return ( ) } function Tooltip({ ...props }: React.ComponentProps) { return } function TooltipTrigger({ asChild, className, ...props }: React.ComponentProps) { return ( ) } function TooltipContent({ className, sideOffset = 0, children, hideWhenDetached = false, ...props }: React.ComponentProps) { const insideFloatingWindow = useInsideFloatingWindowOverlay() return ( {children} ) } export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, useTooltipProvided, }