@purpurds/visually-hidden 8.8.1 → 8.10.0
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),g=require("react");require("react-dom");function b(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),g=require("react");require("react-dom");function b(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const l=b(g);function d(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function h(...e){return t=>{let n=!1;const i=e.map(r=>{const o=d(r,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let r=0;r<i.length;r++){const o=i[r];typeof o=="function"?o():d(e[r],null)}}}}function v(e){const t=S(e),n=l.forwardRef((i,r)=>{const{children:o,...a}=i,s=l.Children.toArray(o),c=s.find(R);if(c){const u=c.props.children,m=s.map(p=>p===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...a,ref:r,children:l.isValidElement(u)?l.cloneElement(u,void 0,m):null})}return f.jsx(t,{...a,ref:r,children:o})});return n.displayName=`${e}.Slot`,n}function S(e){const t=l.forwardRef((n,i)=>{const{children:r,...o}=n;if(l.isValidElement(r)){const a=C(r),s=j(o,r.props);return r.type!==l.Fragment&&(s.ref=i?h(i,a):a),l.cloneElement(r,s)}return l.Children.count(r)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var w=Symbol("radix.slottable");function R(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===w}function j(e,t){const n={...t};for(const i in t){const r=e[i],o=t[i];/^on[A-Z]/.test(i)?r&&o?n[i]=(...s)=>{o(...s),r(...s)}:r&&(n[i]=r):i==="style"?n[i]={...r,...o}:i==="className"&&(n[i]=[r,o].filter(Boolean).join(" "))}return{...e,...n}}function C(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var E=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],O=E.reduce((e,t)=>{const n=v(`Primitive.${t}`),i=l.forwardRef((r,o)=>{const{asChild:a,...s}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...s,ref:o})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{}),P="VisuallyHidden",y=l.forwardRef((e,t)=>f.jsx(O.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));y.displayName=P;var x=y;const N=({asChild:e,children:t,...n})=>f.jsx(x,{asChild:e,...n,children:t});exports.VisuallyHidden=N;
|
|
2
2
|
//# sourceMappingURL=visually-hidden.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visually-hidden.cjs.js","sources":["../../../common/temp/node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.3_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-slot@1.2.0_@types+react@19.2.3_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-primitive@2.0.3_@types+react-dom@19.2.3_@types+react@19.2.3_react-dom@19.2.0_react@19.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.1.3_@types+react-dom@19.2.3_@types+react@19.2.3_react-dom@19.2.0_react@19.2.0/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs","../src/visually-hidden.tsx"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/slot/src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/primitive/src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/visually-hidden/src/visually-hidden.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"VisuallyHidden\";\nvar VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...props,\n ref: forwardedRef,\n style: {\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: \"absolute\",\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\",\n ...props.style\n }\n }\n );\n }\n);\nVisuallyHidden.displayName = NAME;\nvar Root = VisuallyHidden;\nexport {\n Root,\n VisuallyHidden\n};\n//# sourceMappingURL=index.mjs.map\n","import React, { type ReactNode } from \"react\";\nimport * as RadixVisuallyHidden from \"@radix-ui/react-visually-hidden\";\n\nexport type VisuallyHiddenProps = React.ComponentPropsWithoutRef<\n typeof RadixVisuallyHidden.Root\n> & {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * */\n asChild?: boolean;\n children: ReactNode;\n [\"data-testid\"]?: string;\n};\n\nexport const VisuallyHidden = ({ asChild, children, ...props }: VisuallyHiddenProps) => (\n <RadixVisuallyHidden.Root asChild={asChild} {...props}>\n {children}\n </RadixVisuallyHidden.Root>\n);\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","element","getter","_a","mayWarn","_b","NODES","Primitive","primitive","Slot","Node","asChild","primitiveProps","Comp","NAME","VisuallyHidden","Root","RadixVisuallyHidden.Root"],"mappings":"ubAE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EACR,QAAS,EACT,OAAQ,GACR,SAAU,SACV,KAAM,mBACN,WAAY,SACZ,SAAU,SACV,GAAGD,EAAM,KACnB,CACA,CACA,CAEA,EACAoC,EAAe,YAAcD,EAC7B,IAAIE,EAAOD,ECjBJ,MAAMA,EAAiB,CAAC,CAAE,QAAAJ,EAAS,SAAA9B,EAAU,GAAGF,CAAA,IACrDU,EAAAA,IAAC4B,EAAA,CAAyB,QAAAN,EAAmB,GAAGhC,EAC7C,SAAAE,CAAA,CACH","x_google_ignoreList":[0,1,2,3]}
|
|
1
|
+
{"version":3,"file":"visually-hidden.cjs.js","sources":["../../../common/temp/node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-slot@1.2.0_@types+react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-primitive@2.0.3_@types+react-dom@19.2.3_@types+react@19.2.6_react-dom@19.2.0_react@19.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.1.3_@types+react-dom@19.2.3_@types+react@19.2.6_react-dom@19.2.0_react@19.2.0/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs","../src/visually-hidden.tsx"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/slot/src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/primitive/src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/visually-hidden/src/visually-hidden.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"VisuallyHidden\";\nvar VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...props,\n ref: forwardedRef,\n style: {\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: \"absolute\",\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\",\n ...props.style\n }\n }\n );\n }\n);\nVisuallyHidden.displayName = NAME;\nvar Root = VisuallyHidden;\nexport {\n Root,\n VisuallyHidden\n};\n//# sourceMappingURL=index.mjs.map\n","import React, { type ReactNode } from \"react\";\nimport * as RadixVisuallyHidden from \"@radix-ui/react-visually-hidden\";\n\nexport type VisuallyHiddenProps = React.ComponentPropsWithoutRef<\n typeof RadixVisuallyHidden.Root\n> & {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * */\n asChild?: boolean;\n children: ReactNode;\n [\"data-testid\"]?: string;\n};\n\nexport const VisuallyHidden = ({ asChild, children, ...props }: VisuallyHiddenProps) => (\n <RadixVisuallyHidden.Root asChild={asChild} {...props}>\n {children}\n </RadixVisuallyHidden.Root>\n);\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","element","getter","mayWarn","NODES","Primitive","primitive","Slot","Node","asChild","primitiveProps","Comp","NAME","VisuallyHidden","Root","RadixVisuallyHidden.Root"],"mappings":"ubAEA,SAASA,EAAOC,EAAKC,EAAO,CAC1B,GAAI,OAAOD,GAAQ,WACjB,OAAOA,EAAIC,CAAK,EACPD,GAAQ,OACjBA,EAAI,QAAUC,EAElB,CACA,SAASC,KAAeC,EAAM,CAC5B,OAAQC,GAAS,CACf,IAAIC,EAAa,GACjB,MAAMC,EAAWH,EAAK,IAAKH,GAAQ,CACjC,MAAMO,EAAUR,EAAOC,EAAKI,CAAI,EAChC,MAAI,CAACC,GAAc,OAAOE,GAAW,aACnCF,EAAa,IAERE,CACT,CAAC,EACD,GAAIF,EACF,MAAO,IAAM,CACX,QAASG,EAAI,EAAGA,EAAIF,EAAS,OAAQE,IAAK,CACxC,MAAMD,EAAUD,EAASE,CAAC,EACtB,OAAOD,GAAW,WACpBA,EAAO,EAEPR,EAAOI,EAAKK,CAAC,EAAG,IAAI,CAExB,CACF,CAEJ,CACF,CC3BA,SAASC,EAAWC,EAAW,CAC7B,MAAMC,EAA4BC,EAAgBF,CAAS,EACr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,CAAI,EAAE,EACrCwC,EAAO9B,EAAM,WAAW,CAACC,EAAOC,IAAiB,CACrD,KAAM,CAAE,QAAA6B,EAAS,GAAGC,CAAc,EAAK/B,EACjCgC,EAAOF,EAAUF,EAAOvC,EAC9B,OAAI,OAAO,OAAW,MACpB,OAAO,OAAO,IAAI,UAAU,CAAC,EAAI,IAEZqB,EAAAA,IAAIsB,EAAM,CAAE,GAAGD,EAAgB,IAAK9B,EAAc,CAC3E,CAAC,EACD,OAAA4B,EAAK,YAAc,aAAaxC,CAAI,GAC7B,CAAE,GAAGsC,EAAW,CAACtC,CAAI,EAAGwC,CAAI,CACrC,EAAG,EAAE,EC/BDI,EAAO,iBACPC,EAAiBnC,EAAM,WACzB,CAACC,EAAOC,IACiBS,EAAAA,IACrBgB,EAAU,KACV,CACE,GAAG1B,EACH,IAAKC,EACL,MAAO,CAEL,SAAU,WACV,OAAQ,EACR,MAAO,EACP,OAAQ,EACR,QAAS,EACT,OAAQ,GACR,SAAU,SACV,KAAM,mBACN,WAAY,SACZ,SAAU,SACV,GAAGD,EAAM,KACnB,CACA,CACA,CAEA,EACAkC,EAAe,YAAcD,EAC7B,IAAIE,EAAOD,ECjBJ,MAAMA,EAAiB,CAAC,CAAE,QAAAJ,EAAS,SAAA5B,EAAU,GAAGF,CAAA,IACrDU,EAAAA,IAAC0B,EAAA,CAAyB,QAAAN,EAAmB,GAAG9B,EAC7C,SAAAE,CAAA,CACH","x_google_ignoreList":[0,1,2,3]}
|
|
@@ -8,15 +8,15 @@ function d(e, n) {
|
|
|
8
8
|
}
|
|
9
9
|
function h(...e) {
|
|
10
10
|
return (n) => {
|
|
11
|
-
let
|
|
12
|
-
const
|
|
11
|
+
let r = !1;
|
|
12
|
+
const i = e.map((t) => {
|
|
13
13
|
const o = d(t, n);
|
|
14
|
-
return !
|
|
14
|
+
return !r && typeof o == "function" && (r = !0), o;
|
|
15
15
|
});
|
|
16
|
-
if (
|
|
16
|
+
if (r)
|
|
17
17
|
return () => {
|
|
18
|
-
for (let t = 0; t <
|
|
19
|
-
const o =
|
|
18
|
+
for (let t = 0; t < i.length; t++) {
|
|
19
|
+
const o = i[t];
|
|
20
20
|
typeof o == "function" ? o() : d(e[t], null);
|
|
21
21
|
}
|
|
22
22
|
};
|
|
@@ -24,23 +24,23 @@ function h(...e) {
|
|
|
24
24
|
}
|
|
25
25
|
// @__NO_SIDE_EFFECTS__
|
|
26
26
|
function g(e) {
|
|
27
|
-
const n = /* @__PURE__ */ v(e),
|
|
28
|
-
const { children: o, ...a } =
|
|
27
|
+
const n = /* @__PURE__ */ v(e), r = l.forwardRef((i, t) => {
|
|
28
|
+
const { children: o, ...a } = i, s = l.Children.toArray(o), c = s.find(S);
|
|
29
29
|
if (c) {
|
|
30
30
|
const f = c.props.children, y = s.map((p) => p === c ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : p);
|
|
31
31
|
return /* @__PURE__ */ u(n, { ...a, ref: t, children: l.isValidElement(f) ? l.cloneElement(f, void 0, y) : null });
|
|
32
32
|
}
|
|
33
33
|
return /* @__PURE__ */ u(n, { ...a, ref: t, children: o });
|
|
34
34
|
});
|
|
35
|
-
return
|
|
35
|
+
return r.displayName = `${e}.Slot`, r;
|
|
36
36
|
}
|
|
37
37
|
// @__NO_SIDE_EFFECTS__
|
|
38
38
|
function v(e) {
|
|
39
|
-
const n = l.forwardRef((
|
|
40
|
-
const { children: t, ...o } =
|
|
39
|
+
const n = l.forwardRef((r, i) => {
|
|
40
|
+
const { children: t, ...o } = r;
|
|
41
41
|
if (l.isValidElement(t)) {
|
|
42
42
|
const a = E(t), s = C(o, t.props);
|
|
43
|
-
return t.type !== l.Fragment && (s.ref =
|
|
43
|
+
return t.type !== l.Fragment && (s.ref = i ? h(i, a) : a), l.cloneElement(t, s);
|
|
44
44
|
}
|
|
45
45
|
return l.Children.count(t) > 1 ? l.Children.only(null) : null;
|
|
46
46
|
});
|
|
@@ -51,19 +51,18 @@ function S(e) {
|
|
|
51
51
|
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === w;
|
|
52
52
|
}
|
|
53
53
|
function C(e, n) {
|
|
54
|
-
const
|
|
55
|
-
for (const
|
|
56
|
-
const t = e[
|
|
57
|
-
/^on[A-Z]/.test(
|
|
54
|
+
const r = { ...n };
|
|
55
|
+
for (const i in n) {
|
|
56
|
+
const t = e[i], o = n[i];
|
|
57
|
+
/^on[A-Z]/.test(i) ? t && o ? r[i] = (...s) => {
|
|
58
58
|
o(...s), t(...s);
|
|
59
|
-
} : t && (i
|
|
59
|
+
} : t && (r[i] = t) : i === "style" ? r[i] = { ...t, ...o } : i === "className" && (r[i] = [t, o].filter(Boolean).join(" "));
|
|
60
60
|
}
|
|
61
|
-
return { ...e, ...
|
|
61
|
+
return { ...e, ...r };
|
|
62
62
|
}
|
|
63
63
|
function E(e) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return i ? e.ref : (n = (t = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : t.get, i = n && "isReactWarning" in n && n.isReactWarning, i ? e.props.ref : e.props.ref || e.ref);
|
|
64
|
+
let n = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = n && "isReactWarning" in n && n.isReactWarning;
|
|
65
|
+
return r ? e.ref : (n = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
67
66
|
}
|
|
68
67
|
var R = [
|
|
69
68
|
"a",
|
|
@@ -83,11 +82,11 @@ var R = [
|
|
|
83
82
|
"svg",
|
|
84
83
|
"ul"
|
|
85
84
|
], b = R.reduce((e, n) => {
|
|
86
|
-
const
|
|
87
|
-
const { asChild: a, ...s } = t, c = a ?
|
|
85
|
+
const r = /* @__PURE__ */ g(`Primitive.${n}`), i = l.forwardRef((t, o) => {
|
|
86
|
+
const { asChild: a, ...s } = t, c = a ? r : n;
|
|
88
87
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(c, { ...s, ref: o });
|
|
89
88
|
});
|
|
90
|
-
return
|
|
89
|
+
return i.displayName = `Primitive.${n}`, { ...e, [n]: i };
|
|
91
90
|
}, {}), N = "VisuallyHidden", m = l.forwardRef(
|
|
92
91
|
(e, n) => /* @__PURE__ */ u(
|
|
93
92
|
b.span,
|
|
@@ -113,7 +112,7 @@ var R = [
|
|
|
113
112
|
);
|
|
114
113
|
m.displayName = N;
|
|
115
114
|
var P = m;
|
|
116
|
-
const O = ({ asChild: e, children: n, ...
|
|
115
|
+
const O = ({ asChild: e, children: n, ...r }) => /* @__PURE__ */ u(P, { asChild: e, ...r, children: n });
|
|
117
116
|
export {
|
|
118
117
|
O as VisuallyHidden
|
|
119
118
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visually-hidden.es.js","sources":["../../../common/temp/node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.3_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-slot@1.2.0_@types+react@19.2.3_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-primitive@2.0.3_@types+react-dom@19.2.3_@types+react@19.2.3_react-dom@19.2.0_react@19.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.1.3_@types+react-dom@19.2.3_@types+react@19.2.3_react-dom@19.2.0_react@19.2.0/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs","../src/visually-hidden.tsx"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/slot/src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/primitive/src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/visually-hidden/src/visually-hidden.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"VisuallyHidden\";\nvar VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...props,\n ref: forwardedRef,\n style: {\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: \"absolute\",\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\",\n ...props.style\n }\n }\n );\n }\n);\nVisuallyHidden.displayName = NAME;\nvar Root = VisuallyHidden;\nexport {\n Root,\n VisuallyHidden\n};\n//# sourceMappingURL=index.mjs.map\n","import React, { type ReactNode } from \"react\";\nimport * as RadixVisuallyHidden from \"@radix-ui/react-visually-hidden\";\n\nexport type VisuallyHiddenProps = React.ComponentPropsWithoutRef<\n typeof RadixVisuallyHidden.Root\n> & {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * */\n asChild?: boolean;\n children: ReactNode;\n [\"data-testid\"]?: string;\n};\n\nexport const VisuallyHidden = ({ asChild, children, ...props }: VisuallyHiddenProps) => (\n <RadixVisuallyHidden.Root asChild={asChild} {...props}>\n {children}\n </RadixVisuallyHidden.Root>\n);\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","element","getter","_a","mayWarn","_b","NODES","Primitive","primitive","Slot","Node","asChild","primitiveProps","Comp","NAME","VisuallyHidden","Root","RadixVisuallyHidden.Root"],"mappings":";;;AAEA,SAASA,EAAOC,GAAKC,GAAO;AAC1B,MAAI,OAAOD,KAAQ;AACjB,WAAOA,EAAIC,CAAK;AACX,EAAID,KAAQ,SACjBA,EAAI,UAAUC;AAElB;AACA,SAASC,KAAeC,GAAM;AAC5B,SAAO,CAACC,MAAS;AACf,QAAIC,IAAa;AACjB,UAAMC,IAAWH,EAAK,IAAI,CAACH,MAAQ;AACjC,YAAMO,IAAUR,EAAOC,GAAKI,CAAI;AAChC,aAAI,CAACC,KAAc,OAAOE,KAAW,eACnCF,IAAa,KAERE;AAAA,IACT,CAAC;AACD,QAAIF;AACF,aAAO,MAAM;AACX,iBAASG,IAAI,GAAGA,IAAIF,EAAS,QAAQE,KAA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AA,MACnB;AAAA,IACA;AAAA,EACA;AAEA;AACAoC,EAAe,cAAcD;AAC7B,IAAIE,IAAOD;ACjBJ,MAAMA,IAAiB,CAAC,EAAE,SAAAJ,GAAS,UAAA9B,GAAU,GAAGF,EAAA,MACrD,gBAAAU,EAAC4B,GAAA,EAAyB,SAAAN,GAAmB,GAAGhC,GAC7C,UAAAE,EAAA,CACH;","x_google_ignoreList":[0,1,2,3]}
|
|
1
|
+
{"version":3,"file":"visually-hidden.es.js","sources":["../../../common/temp/node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-slot@1.2.0_@types+react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-primitive@2.0.3_@types+react-dom@19.2.3_@types+react@19.2.6_react-dom@19.2.0_react@19.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.1.3_@types+react-dom@19.2.3_@types+react@19.2.6_react-dom@19.2.0_react@19.2.0/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs","../src/visually-hidden.tsx"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/slot/src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/primitive/src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/visually-hidden/src/visually-hidden.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"VisuallyHidden\";\nvar VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...props,\n ref: forwardedRef,\n style: {\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: \"absolute\",\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\",\n ...props.style\n }\n }\n );\n }\n);\nVisuallyHidden.displayName = NAME;\nvar Root = VisuallyHidden;\nexport {\n Root,\n VisuallyHidden\n};\n//# sourceMappingURL=index.mjs.map\n","import React, { type ReactNode } from \"react\";\nimport * as RadixVisuallyHidden from \"@radix-ui/react-visually-hidden\";\n\nexport type VisuallyHiddenProps = React.ComponentPropsWithoutRef<\n typeof RadixVisuallyHidden.Root\n> & {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * */\n asChild?: boolean;\n children: ReactNode;\n [\"data-testid\"]?: string;\n};\n\nexport const VisuallyHidden = ({ asChild, children, ...props }: VisuallyHiddenProps) => (\n <RadixVisuallyHidden.Root asChild={asChild} {...props}>\n {children}\n </RadixVisuallyHidden.Root>\n);\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","element","getter","mayWarn","NODES","Primitive","primitive","Slot","Node","asChild","primitiveProps","Comp","NAME","VisuallyHidden","Root","RadixVisuallyHidden.Root"],"mappings":";;;AAEA,SAASA,EAAOC,GAAKC,GAAO;AAC1B,MAAI,OAAOD,KAAQ;AACjB,WAAOA,EAAIC,CAAK;AACX,EAAID,KAAQ,SACjBA,EAAI,UAAUC;AAElB;AACA,SAASC,KAAeC,GAAM;AAC5B,SAAO,CAACC,MAAS;AACf,QAAIC,IAAa;AACjB,UAAMC,IAAWH,EAAK,IAAI,CAACH,MAAQ;AACjC,YAAMO,IAAUR,EAAOC,GAAKI,CAAI;AAChC,aAAI,CAACC,KAAc,OAAOE,KAAW,eACnCF,IAAa,KAERE;AAAA,IACT,CAAC;AACD,QAAIF;AACF,aAAO,MAAM;AACX,iBAASG,IAAI,GAAGA,IAAIF,EAAS,QAAQE,KAAK;AACxC,gBAAMD,IAAUD,EAASE,CAAC;AAC1B,UAAI,OAAOD,KAAW,aACpBA,EAAO,IAEPR,EAAOI,EAAKK,CAAC,GAAG,IAAI;AAAA,QAExB;AAAA,MACF;AAAA,EAEJ;AACF;AAAA;AC3BA,SAASC,EAAWC,GAAW;AAC7B,QAAMC,IAA4B,gBAAAC,EAAgBF,CAAS,GACrDG,IAAQC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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpurds/visually-hidden",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.10.0",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"main": "./dist/visually-hidden.cjs.js",
|
|
6
6
|
"types": "./dist/visually-hidden.d.ts",
|
|
@@ -16,23 +16,23 @@
|
|
|
16
16
|
"@radix-ui/react-visually-hidden": "~1.1.2"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@storybook/react-vite": "^10.0.
|
|
20
|
-
"@testing-library/dom": "~10.4.
|
|
21
|
-
"@testing-library/jest-dom": "~6.
|
|
22
|
-
"@testing-library/react": "~16.
|
|
19
|
+
"@storybook/react-vite": "^10.0.8",
|
|
20
|
+
"@testing-library/dom": "~10.4.1",
|
|
21
|
+
"@testing-library/jest-dom": "~6.9.1",
|
|
22
|
+
"@testing-library/react": "~16.3.0",
|
|
23
23
|
"@types/node": "22.17",
|
|
24
|
-
"@types/react-dom": "^19.
|
|
25
|
-
"@types/react": "^19.
|
|
26
|
-
"eslint": "9.
|
|
27
|
-
"jsdom": "~
|
|
28
|
-
"lint-staged": "
|
|
24
|
+
"@types/react-dom": "^19.2.3",
|
|
25
|
+
"@types/react": "^19.2.6",
|
|
26
|
+
"eslint": "9.39.1",
|
|
27
|
+
"jsdom": "~27.2.0",
|
|
28
|
+
"lint-staged": "16.2.6",
|
|
29
29
|
"prettier": "~2.8.8",
|
|
30
|
-
"react-dom": "^19.
|
|
31
|
-
"react": "^19.
|
|
32
|
-
"storybook": "^10.0.
|
|
33
|
-
"typescript": "^5.
|
|
34
|
-
"vite": "^
|
|
35
|
-
"vitest": "^
|
|
30
|
+
"react-dom": "^19.2.0",
|
|
31
|
+
"react": "^19.2.0",
|
|
32
|
+
"storybook": "^10.0.8",
|
|
33
|
+
"typescript": "^5.9.3",
|
|
34
|
+
"vite": "^7.2.2",
|
|
35
|
+
"vitest": "^4.0.10",
|
|
36
36
|
"@purpurds/component-rig": "1.0.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|