@tamagui/visually-hidden 3.0.0-beta.1432.1 → 3.0.0-beta.1444.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/VisuallyHidden.cjs +0 -1
- package/dist/cjs/VisuallyHidden.native.cjs +0 -1
- package/dist/cjs/VisuallyHidden.native.js +0 -1
- package/dist/cjs/VisuallyHidden.native.js.map +1 -1
- package/dist/esm/VisuallyHidden.mjs +0 -1
- package/dist/esm/VisuallyHidden.mjs.map +1 -1
- package/dist/esm/VisuallyHidden.native.js +0 -1
- package/dist/esm/VisuallyHidden.native.js.map +1 -1
- package/package.json +4 -4
- package/src/VisuallyHidden.tsx +0 -3
- package/types/VisuallyHidden.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisuallyHidden.native.js","names":[],"sources":["cjs/VisuallyHidden.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar VisuallyHidden_exports = {};\n__export(VisuallyHidden_exports, {\n VisuallyHidden: () => VisuallyHidden\n});\nmodule.exports = __toCommonJS(VisuallyHidden_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_web = require(\"@tamagui/web\");\nvar VisuallyHiddenFrame = (0, import_web.styled)(import_web.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 ...import_constants.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 ...import_constants.isWeb && {\n clip: \"auto\",\n clipPath: \"none\",\n whiteSpace: \"normal\"\n }\n }\n }\n }\n});\nvar VisuallyHidden = (0, import_web.createStyledHOC)(VisuallyHiddenFrame, function VisuallyHidden2(props, forwardedRef) {\n var { visible, ...rest } = props;\n if (visible) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(VisuallyHiddenFrame, {\n ref: forwardedRef,\n visible: true,\n ...rest\n });\n }\n var a11yProps = import_constants.isWeb ? {\n \"aria-hidden\": false\n } : {\n accessible: true,\n ...import_constants.isAndroid && {\n importantForAccessibility: \"yes\"\n }\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(VisuallyHiddenFrame, {\n ref: forwardedRef,\n ...a11yProps,\n ...rest\n });\n});\
|
|
1
|
+
{"version":3,"file":"VisuallyHidden.native.js","names":[],"sources":["cjs/VisuallyHidden.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar VisuallyHidden_exports = {};\n__export(VisuallyHidden_exports, {\n VisuallyHidden: () => VisuallyHidden\n});\nmodule.exports = __toCommonJS(VisuallyHidden_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_web = require(\"@tamagui/web\");\nvar VisuallyHiddenFrame = (0, import_web.styled)(import_web.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 ...import_constants.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 ...import_constants.isWeb && {\n clip: \"auto\",\n clipPath: \"none\",\n whiteSpace: \"normal\"\n }\n }\n }\n }\n});\nvar VisuallyHidden = (0, import_web.createStyledHOC)(VisuallyHiddenFrame, function VisuallyHidden2(props, forwardedRef) {\n var { visible, ...rest } = props;\n if (visible) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(VisuallyHiddenFrame, {\n ref: forwardedRef,\n visible: true,\n ...rest\n });\n }\n var a11yProps = import_constants.isWeb ? {\n \"aria-hidden\": false\n } : {\n accessible: true,\n ...import_constants.isAndroid && {\n importantForAccessibility: \"yes\"\n }\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(VisuallyHiddenFrame, {\n ref: forwardedRef,\n ...a11yProps,\n ...rest\n });\n});\n//# sourceMappingURL=VisuallyHidden.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,yBAAyB,CAAC;AAC9B,SAAS,wBAAwB,EAC/B,sBAAsB,eACxB,CAAC;AACD,OAAO,UAAU,aAAa,sBAAsB;AACpD,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,mBAAmB,QAAQ,oBAAoB;AACnD,IAAI,aAAa,QAAQ,cAAc;AACvC,IAAI,uBAAuB,GAAG,WAAW,OAAM,CAAE,WAAW,MAAM;CAChE,aAAa;CACb,UAAU;CACV,OAAO;CACP,QAAQ;CACR,QAAQ,CAAC;CACT,SAAS;CACT,aAAa;CACb,QAAQ,CAAC;CACT,UAAU;CACV,eAAe;CACf,GAAG,iBAAiB,SAAS;EAG3B,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,iBAAiB,SAAS;IAC3B,MAAM;IACN,UAAU;IACV,YAAY;GACd;EACF,EACF;CACF;AACF,CAAC;AACD,IAAI,kBAAkB,GAAG,WAAW,gBAAe,CAAE,qBAAqB,SAAS,gBAAgB,OAAO,cAAc;CACtH,IAAI,EAAE,SAAS,GAAG,SAAS;CAC3B,IAAI,SAAS;EACX,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,qBAAqB;GACtE,KAAK;GACL,SAAS;GACT,GAAG;EACL,CAAC;CACH;CACA,IAAI,YAAY,iBAAiB,QAAQ,EACvC,eAAe,MACjB,IAAI;EACF,YAAY;EACZ,GAAG,iBAAiB,aAAa,EAC/B,2BAA2B,MAC7B;CACF;CACA,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,qBAAqB;EACtE,KAAK;EACL,GAAG;EACH,GAAG;CACL,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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});\
|
|
1
|
+
{"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisuallyHidden.native.js","names":[],"sources":["esm/VisuallyHidden.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { isAndroid, isWeb } from \"@tamagui/constants\";\nimport { createStyledHOC, Text, styled } from \"@tamagui/web\";\nvar 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});\nvar VisuallyHidden = createStyledHOC(VisuallyHiddenFrame, function VisuallyHidden2(props, forwardedRef) {\n var { visible, ...rest } = props;\n if (visible) {\n return /* @__PURE__ */ _jsx(VisuallyHiddenFrame, {\n ref: forwardedRef,\n visible: true,\n ...rest\n });\n }\n var a11yProps = isWeb ? {\n \"aria-hidden\": false\n } : {\n accessible: true,\n ...isAndroid && {\n importantForAccessibility: \"yes\"\n }\n };\n return /* @__PURE__ */ _jsx(VisuallyHiddenFrame, {\n ref: forwardedRef,\n ...a11yProps,\n ...rest\n });\n});\
|
|
1
|
+
{"version":3,"file":"VisuallyHidden.native.js","names":[],"sources":["esm/VisuallyHidden.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { isAndroid, isWeb } from \"@tamagui/constants\";\nimport { createStyledHOC, Text, styled } from \"@tamagui/web\";\nvar 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});\nvar VisuallyHidden = createStyledHOC(VisuallyHiddenFrame, function VisuallyHidden2(props, forwardedRef) {\n var { visible, ...rest } = props;\n if (visible) {\n return /* @__PURE__ */ _jsx(VisuallyHiddenFrame, {\n ref: forwardedRef,\n visible: true,\n ...rest\n });\n }\n var a11yProps = isWeb ? {\n \"aria-hidden\": false\n } : {\n accessible: true,\n ...isAndroid && {\n importantForAccessibility: \"yes\"\n }\n };\n return /* @__PURE__ */ _jsx(VisuallyHiddenFrame, {\n ref: forwardedRef,\n ...a11yProps,\n ...rest\n });\n});\nexport {\n VisuallyHidden\n};\n//# sourceMappingURL=VisuallyHidden.js.map\n"],"mappings":";;;;;AAGA,IAAI,sBAAsB,OAAO,MAAM;CACrC,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,IAAI,iBAAiB,gBAAgB,qBAAqB,SAAS,gBAAgB,OAAO,cAAc;CACtG,IAAI,EAAE,SAAS,GAAG,SAAS;CAC3B,IAAI,SAAS;EACX,OAAuB,oBAAK,qBAAqB;GAC/C,KAAK;GACL,SAAS;GACT,GAAG;EACL,CAAC;CACH;CACA,IAAI,YAAY,QAAQ,EACtB,eAAe,MACjB,IAAI;EACF,YAAY;EACZ,GAAG,aAAa,EACd,2BAA2B,MAC7B;CACF;CACA,OAAuB,oBAAK,qBAAqB;EAC/C,KAAK;EACL,GAAG;EACH,GAAG;CACL,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/visually-hidden",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.1444.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"files": [
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"clean:build": "tamagui-build clean:build"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@tamagui/constants": "3.0.0-beta.
|
|
39
|
-
"@tamagui/web": "3.0.0-beta.
|
|
38
|
+
"@tamagui/constants": "3.0.0-beta.1444.1",
|
|
39
|
+
"@tamagui/web": "3.0.0-beta.1444.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@tamagui/build": "3.0.0-beta.
|
|
42
|
+
"@tamagui/build": "3.0.0-beta.1444.1",
|
|
43
43
|
"react": "19.2.3"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
package/src/VisuallyHidden.tsx
CHANGED
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
],
|
|
7
7
|
"version": 3,
|
|
8
8
|
"sourcesContent": [
|
|
9
|
-
"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
|
|
9
|
+
"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"
|
|
10
10
|
]
|
|
11
11
|
}
|