{"version":3,"file":"VisuallyHidden.js","names":[],"sources":["esm/VisuallyHidden.js"],"sourcesContent":["import { isAndroid, isWeb } from \"@tamagui/constants\";\nimport {\n  createStyledHOC,\n  Text,\n  styled\n} from \"@tamagui/web\";\nimport { jsx } from \"react/jsx-runtime\";\nconst VisuallyHiddenFrame = styled(Text, {\n  displayName: \"VisuallyHidden\",\n  position: \"absolute\",\n  width: 1,\n  height: 1,\n  margin: -1,\n  padding: 0,\n  borderWidth: 0,\n  zIndex: -1e4,\n  overflow: \"hidden\",\n  pointerEvents: \"none\",\n  ...isWeb && {\n    // sr-only style block; clipPath is the modern replacement for clip\n    // and is what tailwind's sr-only uses.\n    clip: \"rect(0, 0, 0, 0)\",\n    clipPath: \"inset(50%)\",\n    whiteSpace: \"nowrap\",\n    wordWrap: \"normal\"\n  },\n  variants: {\n    preserveDimensions: {\n      true: {\n        position: \"relative\",\n        width: \"auto\",\n        height: \"auto\"\n      }\n    },\n    // Escape hatch to fully reveal the element (the old \"not-sr-only\").\n    visible: {\n      true: {\n        position: \"relative\",\n        width: \"auto\",\n        height: \"auto\",\n        margin: 0,\n        padding: 0,\n        zIndex: 1,\n        overflow: \"visible\",\n        opacity: 1,\n        pointerEvents: \"auto\",\n        ...isWeb && {\n          clip: \"auto\",\n          clipPath: \"none\",\n          whiteSpace: \"normal\"\n        }\n      }\n    }\n  }\n});\nconst VisuallyHidden = createStyledHOC(VisuallyHiddenFrame, function VisuallyHidden2(props, forwardedRef) {\n  const { visible, ...rest } = props;\n  if (visible) {\n    return /* @__PURE__ */ jsx(VisuallyHiddenFrame, { ref: forwardedRef, visible: true, ...rest });\n  }\n  const a11yProps = isWeb ? { \"aria-hidden\": false } : {\n    accessible: true,\n    ...isAndroid && { importantForAccessibility: \"yes\" }\n  };\n  return /* @__PURE__ */ jsx(VisuallyHiddenFrame, { ref: forwardedRef, ...a11yProps, ...rest });\n});\nexport {\n  VisuallyHidden\n};\n//# sourceMappingURL=VisuallyHidden.js.map\n"],"mappings":";;;;;AAOA,MAAM,sBAAsB,OAAO,MAAM;CACvC,aAAa;CACb,UAAU;CACV,OAAO;CACP,QAAQ;CACR,QAAQ,CAAC;CACT,SAAS;CACT,aAAa;CACb,QAAQ,CAAC;CACT,UAAU;CACV,eAAe;CACf,GAAG,SAAS;EAGV,MAAM;EACN,UAAU;EACV,YAAY;EACZ,UAAU;CACZ;CACA,UAAU;EACR,oBAAoB,EAClB,MAAM;GACJ,UAAU;GACV,OAAO;GACP,QAAQ;EACV,EACF;EAEA,SAAS,EACP,MAAM;GACJ,UAAU;GACV,OAAO;GACP,QAAQ;GACR,QAAQ;GACR,SAAS;GACT,QAAQ;GACR,UAAU;GACV,SAAS;GACT,eAAe;GACf,GAAG,SAAS;IACV,MAAM;IACN,UAAU;IACV,YAAY;GACd;EACF,EACF;CACF;AACF,CAAC;AACD,MAAM,iBAAiB,gBAAgB,qBAAqB,SAAS,gBAAgB,OAAO,cAAc;CACxG,MAAM,EAAE,SAAS,GAAG,SAAS;CAC7B,IAAI,SAAS;EACX,OAAuB,oBAAI,qBAAqB;GAAE,KAAK;GAAc,SAAS;GAAM,GAAG;EAAK,CAAC;CAC/F;CACA,MAAM,YAAY,QAAQ,EAAE,eAAe,MAAM,IAAI;EACnD,YAAY;EACZ,GAAG,aAAa,EAAE,2BAA2B,MAAM;CACrD;CACA,OAAuB,oBAAI,qBAAqB;EAAE,KAAK;EAAc,GAAG;EAAW,GAAG;CAAK,CAAC;AAC9F,CAAC"}