@radix-ui/react-visually-hidden
Advanced tools
Comparing version
import * as React from 'react'; | ||
import { Primitive } from '@radix-ui/react-primitive'; | ||
declare const VISUALLY_HIDDEN_STYLES: Readonly<{ | ||
position: "absolute"; | ||
border: 0; | ||
width: 1; | ||
height: 1; | ||
padding: 0; | ||
margin: -1; | ||
overflow: "hidden"; | ||
clip: "rect(0, 0, 0, 0)"; | ||
whiteSpace: "nowrap"; | ||
wordWrap: "normal"; | ||
}>; | ||
type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>; | ||
@@ -22,2 +10,2 @@ interface VisuallyHiddenProps extends PrimitiveSpanProps { | ||
export { Root, VISUALLY_HIDDEN_STYLES, VisuallyHidden, type VisuallyHiddenProps }; | ||
export { Root, VisuallyHidden, type VisuallyHiddenProps }; |
@@ -34,3 +34,2 @@ "use strict"; | ||
Root: () => Root, | ||
VISUALLY_HIDDEN_STYLES: () => VISUALLY_HIDDEN_STYLES, | ||
VisuallyHidden: () => VisuallyHidden | ||
@@ -44,15 +43,2 @@ }); | ||
var import_jsx_runtime = require("react/jsx-runtime"); | ||
var VISUALLY_HIDDEN_STYLES = Object.freeze({ | ||
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss | ||
position: "absolute", | ||
border: 0, | ||
width: 1, | ||
height: 1, | ||
padding: 0, | ||
margin: -1, | ||
overflow: "hidden", | ||
clip: "rect(0, 0, 0, 0)", | ||
whiteSpace: "nowrap", | ||
wordWrap: "normal" | ||
}); | ||
var NAME = "VisuallyHidden"; | ||
@@ -66,3 +52,16 @@ var VisuallyHidden = React.forwardRef( | ||
ref: forwardedRef, | ||
style: { ...VISUALLY_HIDDEN_STYLES, ...props.style } | ||
style: { | ||
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss | ||
position: "absolute", | ||
border: 0, | ||
width: 1, | ||
height: 1, | ||
padding: 0, | ||
margin: -1, | ||
overflow: "hidden", | ||
clip: "rect(0, 0, 0, 0)", | ||
whiteSpace: "nowrap", | ||
wordWrap: "normal", | ||
...props.style | ||
} | ||
} | ||
@@ -69,0 +68,0 @@ ); |
{ | ||
"name": "@radix-ui/react-visually-hidden", | ||
"version": "1.2.0-rc.1744574857111", | ||
"version": "1.2.0-rc.1744660991666", | ||
"license": "MIT", | ||
@@ -14,3 +14,3 @@ "source": "./src/index.ts", | ||
"dependencies": { | ||
"@radix-ui/react-primitive": "2.1.0-rc.1744574857111" | ||
"@radix-ui/react-primitive": "2.1.0-rc.1744660991666" | ||
}, | ||
@@ -39,4 +39,4 @@ "peerDependencies": { | ||
"@repo/builder": "0.0.0", | ||
"@repo/typescript-config": "0.0.0", | ||
"@repo/eslint-config": "0.0.0" | ||
"@repo/eslint-config": "0.0.0", | ||
"@repo/typescript-config": "0.0.0" | ||
}, | ||
@@ -43,0 +43,0 @@ "homepage": "https://radix-ui.com/primitives", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
11640
-6.3%113
-11.02%+ Added
- Removed