{"version":3,"file":"hybrid-tooltip.CixUqRRM.js","sources":["../../../src/components/context/use-touch.tsx","../../../src/components/ui/hybrid-tooltip.tsx"],"sourcesContent":["import { useContext } from 'react'\nimport { TouchContext } from './touch-provider'\n\n// Hook to retrieve touch device status from context\nexport const useTouch = () => useContext(TouchContext)\n","import { Tooltip, TooltipTrigger, TooltipContent } from '@components/ui/tooltip'\nimport { Popover, PopoverTrigger, PopoverContent } from '@components/ui/popover'\nimport {\n type TooltipContentProps,\n type TooltipProps,\n type TooltipTriggerProps\n} from '@radix-ui/react-tooltip'\nimport {\n type PopoverContentProps,\n type PopoverProps,\n type PopoverTriggerProps\n} from '@radix-ui/react-popover'\nimport { useTouch } from '@components/context/use-touch'\n\n/**\n * HybridTooltip Components\n *\n * These components provide a hybrid approach to tooltips and popovers,\n * dynamically switching based on whether the device is touch-enabled.\n *\n * Important:\n * - Must wrap the components in a TouchProvider to ensure proper functionality\n *\n * Reference:\n * - For more details on the touch device adaptation, see the provided GitHub issues -\n * https://github.com/shadcn-ui/ui/issues/86\n * https://github.com/shadcn-ui/ui/issues/2402#issuecomment-1930895113\n */\n\n// Hybrid component that switches between Tooltip and Popover based on device type\nexport const HybridTooltip = (props: TooltipProps & PopoverProps) => {\n const isTouch = useTouch()\n return isTouch ? : \n}\n\n// Hybrid component for tooltip trigger, adapting to touch with PopoverTrigger\nexport const HybridTooltipTrigger = (props: TooltipTriggerProps & PopoverTriggerProps) => {\n const isTouch = useTouch()\n\n return isTouch ? : \n}\n\n// Hybrid component for tooltip content, adapting to touch with PopoverContent\nexport const HybridTooltipContent = (props: TooltipContentProps & PopoverContentProps) => {\n const isTouch = useTouch()\n\n return isTouch ? (\n \n ) : (\n \n )\n}\n"],"names":["useTouch","useContext","TouchContext","HybridTooltip","props","Popover","jsx","Tooltip","HybridTooltipTrigger","PopoverTrigger","TooltipTrigger","HybridTooltipContent","PopoverContent","TooltipContent"],"mappings":"2lBAIa,MAAAA,EAAW,IAAMC,EAAA,WAAWC,CAAY,EC0BxCC,EAAiBC,GACZJ,UACEK,EAAS,CAAA,GAAGD,EAAO,EAAKE,EAAAA,IAACC,EAAS,CAAA,GAAGH,CAAO,CAAA,EAInDI,EAAwBJ,GACnBJ,UAEES,EAAgB,CAAA,GAAGL,EAAO,EAAKE,EAAAA,IAACI,EAAgB,CAAA,GAAGN,CAAO,CAAA,EAIjEO,EAAwBP,GACnBJ,IAGbM,EAAA,IAAAM,EAAA,CAAe,UAAU,oBAAqB,GAAGR,CAAO,CAAA,EAEzDE,EAAAA,IAACO,EAAgB,CAAA,GAAGT,CAAO,CAAA"}