{
  "mappings": "AACA,cAEO,gBACA,uBACA,yBAEA,wBACA,0BAEA;AA+DP,OAAO,cAAM,gBAAgB,iBAC3B,WACA,oBACA,mBACA,oBACA;CACE;CACA",
  "names": [],
  "sources": [
    "src/VisuallyHidden.tsx"
  ],
  "version": 3,
  "sourcesContent": [
    "import { isAndroid, isWeb } from '@tamagui/constants'\nimport {\n  createStyledHOC,\n  type TamaDefer,\n  type TamaguiComponent,\n  type TamaguiTextElement,\n  Text,\n  type TextNonStyleProps,\n  type TextStylePropsBase,\n  styled,\n} from '@tamagui/web'\n\n// Standard \"sr-only\" visually-hidden style block:\n// - position: absolute + 1x1 clipped box so it consumes no layout\n// - overflow: hidden + clip so the content isn't painted\n// - margin: -1 + border: 0 to neutralize the 1x1 box visually\n// - whiteSpace: nowrap so wrapped text doesn't fight the 1x1 width\n//\n// We intentionally do NOT use display: none, visibility: hidden, or opacity: 0,\n// because each of those also hides the content from assistive tech on web.\nconst VisuallyHiddenFrame = styled(Text, {\n  displayName: 'VisuallyHidden',\n\n  position: 'absolute',\n  width: 1,\n  height: 1,\n  margin: -1,\n  padding: 0,\n  borderWidth: 0,\n  zIndex: -10000,\n  overflow: 'hidden',\n  pointerEvents: 'none',\n\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)' as any,\n    clipPath: 'inset(50%)' as any,\n    whiteSpace: 'nowrap' as any,\n    wordWrap: 'normal' as any,\n  }),\n\n  variants: {\n    preserveDimensions: {\n      true: {\n        position: 'relative',\n        width: 'auto',\n        height: 'auto',\n      },\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' as any,\n          clipPath: 'none' as any,\n          whiteSpace: 'normal' as any,\n        }),\n      },\n    },\n  } as const,\n})\n\nexport const VisuallyHidden: TamaguiComponent<\n  TamaDefer,\n  TamaguiTextElement,\n  TextNonStyleProps,\n  TextStylePropsBase,\n  {\n    visible?: boolean | undefined\n    preserveDimensions?: boolean | undefined\n  }\n> = createStyledHOC(VisuallyHiddenFrame, function VisuallyHidden(props, forwardedRef) {\n  const { visible, ...rest } = props as any\n\n  // When `visible` is true the user opted out of hiding entirely — pass through.\n  if (visible) {\n    return <VisuallyHiddenFrame ref={forwardedRef} visible {...rest} />\n  }\n\n  // a11y semantics: visually hidden but still announced.\n  // - web: aria-hidden=false so the SR reads the content\n  // - native: accessible=true to ensure the SR focuses the node\n  // - android: importantForAccessibility=\"yes\" to override any ancestor \"no-hide-descendants\"\n  const a11yProps = isWeb\n    ? ({ 'aria-hidden': false } as any)\n    : ({\n        accessible: true,\n        ...(isAndroid && { importantForAccessibility: 'yes' as const }),\n      } as any)\n\n  return <VisuallyHiddenFrame ref={forwardedRef} {...a11yProps} {...rest} />\n}) as any\n"
  ]
}