{"version":3,"names":["Show","FloatingPortal","useTooltipRootContext","TooltipPortalContext","TooltipPortal","props","root","keepMounted","shouldRender","mounted","container","children"],"sources":["tooltip-portal.tsx"],"sourcesContent":["import type { JSX } from \"@solidjs/web\";\n/**\n * `<Tooltip.Portal>` — Solid 2 port of Base UI React's `TooltipPortal`\n * (`packages/react/src/tooltip/portal/TooltipPortal.tsx`). See\n * `<Popover.Portal>` for the shared rationale; the tooltip port differs\n * only in which root context it reads.\n */\n\nimport { Show } from \"solid-js\";\nimport type { FloatingPortalTarget } from \"../../internals/floating-ui/components/floating-portal\";\nimport { FloatingPortal } from \"../../internals/floating-ui/components/floating-portal\";\nimport { useTooltipRootContext } from \"../tooltip-root-context\";\nimport { TooltipPortalContext } from \"./tooltip-portal-context\";\n\nexport interface TooltipPortalProps {\n\t/** Portal children. */\n\tchildren?: JSX.Element;\n\t/**\n\t * Whether to keep the portal mounted in the DOM while the popup is\n\t * hidden. @default false\n\t */\n\tkeepMounted?: boolean | undefined;\n\t/**\n\t * Optional mount target for the portal. Defaults to `document.body`.\n\t */\n\tcontainer?: FloatingPortalTarget;\n}\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n */\nexport function TooltipPortal(props: TooltipPortalProps): JSX.Element {\n\tconst root = useTooltipRootContext();\n\tconst keepMounted = (): boolean => props.keepMounted ?? false;\n\tconst shouldRender = (): boolean => root.mounted() || keepMounted();\n\n\treturn (\n\t\t<Show when={shouldRender()}>\n\t\t\t<TooltipPortalContext value={keepMounted}>\n\t\t\t\t<FloatingPortal container={props.container}>\n\t\t\t\t\t{props.children}\n\t\t\t\t</FloatingPortal>\n\t\t\t</TooltipPortalContext>\n\t\t</Show>\n\t);\n}\n"],"mappings":"AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,UAAU;AAE/B,SAASC,cAAc,QAAQ,wDAAwD;AACvF,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,oBAAoB,QAAQ,0BAA0B;AAgB/D;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAACC,KAAyB,EAAe;EACrE,MAAMC,IAAI,GAAGJ,qBAAqB,CAAC,CAAC;EACpC,MAAMK,WAAW,GAAGA,CAAA,KAAeF,KAAK,CAACE,WAAW,IAAI,KAAK;EAC7D,MAAMC,YAAY,GAAGA,CAAA,KAAeF,IAAI,CAACG,OAAO,CAAC,CAAC,IAAIF,WAAW,CAAC,CAAC;EAEnE,OACC,CAAC,IAAI,CAAC,IAAI,CAAC,CAACC,YAAY,CAAC,CAAC,CAAC;AAC7B,GAAG,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAACD,WAAW,CAAC;AAC5C,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAACF,KAAK,CAACK,SAAS,CAAC;AAC/C,KAAK,CAACL,KAAK,CAACM,QAAQ;AACpB,IAAI,EAAE,cAAc;AACpB,GAAG,EAAE,oBAAoB;AACzB,EAAE,EAAE,IAAI,CAAC;AAET","ignoreList":[]}