@radix-ui/react-visually-hidden 1.2.0-rc.1744660991666 → 1.2.0-rc.1744830756566
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/index.d.mts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +15 -14
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +15 -14
- package/dist/index.mjs.map +2 -2
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
3
3
|
|
|
4
|
+
declare const VISUALLY_HIDDEN_STYLES: Readonly<{
|
|
5
|
+
position: "absolute";
|
|
6
|
+
border: 0;
|
|
7
|
+
width: 1;
|
|
8
|
+
height: 1;
|
|
9
|
+
padding: 0;
|
|
10
|
+
margin: -1;
|
|
11
|
+
overflow: "hidden";
|
|
12
|
+
clip: "rect(0, 0, 0, 0)";
|
|
13
|
+
whiteSpace: "nowrap";
|
|
14
|
+
wordWrap: "normal";
|
|
15
|
+
}>;
|
|
4
16
|
type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
|
|
5
17
|
interface VisuallyHiddenProps extends PrimitiveSpanProps {
|
|
6
18
|
}
|
|
7
19
|
declare const VisuallyHidden: React.ForwardRefExoticComponent<VisuallyHiddenProps & React.RefAttributes<HTMLSpanElement>>;
|
|
8
20
|
declare const Root: React.ForwardRefExoticComponent<VisuallyHiddenProps & React.RefAttributes<HTMLSpanElement>>;
|
|
9
21
|
|
|
10
|
-
export { Root, VisuallyHidden, type VisuallyHiddenProps };
|
|
22
|
+
export { Root, VISUALLY_HIDDEN_STYLES, VisuallyHidden, type VisuallyHiddenProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
3
3
|
|
|
4
|
+
declare const VISUALLY_HIDDEN_STYLES: Readonly<{
|
|
5
|
+
position: "absolute";
|
|
6
|
+
border: 0;
|
|
7
|
+
width: 1;
|
|
8
|
+
height: 1;
|
|
9
|
+
padding: 0;
|
|
10
|
+
margin: -1;
|
|
11
|
+
overflow: "hidden";
|
|
12
|
+
clip: "rect(0, 0, 0, 0)";
|
|
13
|
+
whiteSpace: "nowrap";
|
|
14
|
+
wordWrap: "normal";
|
|
15
|
+
}>;
|
|
4
16
|
type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
|
|
5
17
|
interface VisuallyHiddenProps extends PrimitiveSpanProps {
|
|
6
18
|
}
|
|
7
19
|
declare const VisuallyHidden: React.ForwardRefExoticComponent<VisuallyHiddenProps & React.RefAttributes<HTMLSpanElement>>;
|
|
8
20
|
declare const Root: React.ForwardRefExoticComponent<VisuallyHiddenProps & React.RefAttributes<HTMLSpanElement>>;
|
|
9
21
|
|
|
10
|
-
export { Root, VisuallyHidden, type VisuallyHiddenProps };
|
|
22
|
+
export { Root, VISUALLY_HIDDEN_STYLES, VisuallyHidden, type VisuallyHiddenProps };
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
Root: () => Root,
|
|
34
|
+
VISUALLY_HIDDEN_STYLES: () => VISUALLY_HIDDEN_STYLES,
|
|
34
35
|
VisuallyHidden: () => VisuallyHidden
|
|
35
36
|
});
|
|
36
37
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -39,6 +40,19 @@ module.exports = __toCommonJS(index_exports);
|
|
|
39
40
|
var React = __toESM(require("react"));
|
|
40
41
|
var import_react_primitive = require("@radix-ui/react-primitive");
|
|
41
42
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
|
+
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
44
|
+
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
45
|
+
position: "absolute",
|
|
46
|
+
border: 0,
|
|
47
|
+
width: 1,
|
|
48
|
+
height: 1,
|
|
49
|
+
padding: 0,
|
|
50
|
+
margin: -1,
|
|
51
|
+
overflow: "hidden",
|
|
52
|
+
clip: "rect(0, 0, 0, 0)",
|
|
53
|
+
whiteSpace: "nowrap",
|
|
54
|
+
wordWrap: "normal"
|
|
55
|
+
});
|
|
42
56
|
var NAME = "VisuallyHidden";
|
|
43
57
|
var VisuallyHidden = React.forwardRef(
|
|
44
58
|
(props, forwardedRef) => {
|
|
@@ -47,20 +61,7 @@ var VisuallyHidden = React.forwardRef(
|
|
|
47
61
|
{
|
|
48
62
|
...props,
|
|
49
63
|
ref: forwardedRef,
|
|
50
|
-
style: {
|
|
51
|
-
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
52
|
-
position: "absolute",
|
|
53
|
-
border: 0,
|
|
54
|
-
width: 1,
|
|
55
|
-
height: 1,
|
|
56
|
-
padding: 0,
|
|
57
|
-
margin: -1,
|
|
58
|
-
overflow: "hidden",
|
|
59
|
-
clip: "rect(0, 0, 0, 0)",
|
|
60
|
-
whiteSpace: "nowrap",
|
|
61
|
-
wordWrap: "normal",
|
|
62
|
-
...props.style
|
|
63
|
-
}
|
|
64
|
+
style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }
|
|
64
65
|
}
|
|
65
66
|
);
|
|
66
67
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts", "../src/visually-hidden.tsx"],
|
|
4
|
-
"sourcesContent": ["export {\n VisuallyHidden,\n //\n Root,\n} from './visually-hidden';\nexport type { VisuallyHiddenProps } from './visually-hidden';\n", "import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * VisuallyHidden\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'VisuallyHidden';\n\ntype VisuallyHiddenElement = React.ElementRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface VisuallyHiddenProps extends PrimitiveSpanProps {}\n\nconst VisuallyHidden = React.forwardRef<VisuallyHiddenElement, VisuallyHiddenProps>(\n (props, forwardedRef) => {\n return (\n <Primitive.span\n {...props}\n ref={forwardedRef}\n style={{
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,6BAA0B;
|
|
4
|
+
"sourcesContent": ["export {\n VisuallyHidden,\n //\n Root,\n //\n VISUALLY_HIDDEN_STYLES,\n} from './visually-hidden';\nexport type { VisuallyHiddenProps } from './visually-hidden';\n", "import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * VisuallyHidden\n * -----------------------------------------------------------------------------------------------*/\n\nconst VISUALLY_HIDDEN_STYLES = Object.freeze({\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}) satisfies React.CSSProperties;\n\nconst NAME = 'VisuallyHidden';\n\ntype VisuallyHiddenElement = React.ElementRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface VisuallyHiddenProps extends PrimitiveSpanProps {}\n\nconst VisuallyHidden = React.forwardRef<VisuallyHiddenElement, VisuallyHiddenProps>(\n (props, forwardedRef) => {\n return (\n <Primitive.span\n {...props}\n ref={forwardedRef}\n style={{ ...VISUALLY_HIDDEN_STYLES, ...props.style }}\n />\n );\n }\n);\n\nVisuallyHidden.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = VisuallyHidden;\n\nexport {\n VisuallyHidden,\n //\n Root,\n //\n VISUALLY_HIDDEN_STYLES,\n};\nexport type { VisuallyHiddenProps };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,6BAA0B;AA6BpB;AAvBN,IAAM,yBAAyB,OAAO,OAAO;AAAA;AAAA,EAE3C,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,UAAU;AACZ,CAAC;AAED,IAAM,OAAO;AAMb,IAAM,iBAAuB;AAAA,EAC3B,CAAC,OAAO,iBAAiB;AACvB,WACE;AAAA,MAAC,iCAAU;AAAA,MAAV;AAAA,QACE,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,OAAO,EAAE,GAAG,wBAAwB,GAAG,MAAM,MAAM;AAAA;AAAA,IACrD;AAAA,EAEJ;AACF;AAEA,eAAe,cAAc;AAI7B,IAAM,OAAO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
6
|
+
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
7
|
+
position: "absolute",
|
|
8
|
+
border: 0,
|
|
9
|
+
width: 1,
|
|
10
|
+
height: 1,
|
|
11
|
+
padding: 0,
|
|
12
|
+
margin: -1,
|
|
13
|
+
overflow: "hidden",
|
|
14
|
+
clip: "rect(0, 0, 0, 0)",
|
|
15
|
+
whiteSpace: "nowrap",
|
|
16
|
+
wordWrap: "normal"
|
|
17
|
+
});
|
|
5
18
|
var NAME = "VisuallyHidden";
|
|
6
19
|
var VisuallyHidden = React.forwardRef(
|
|
7
20
|
(props, forwardedRef) => {
|
|
@@ -10,20 +23,7 @@ var VisuallyHidden = React.forwardRef(
|
|
|
10
23
|
{
|
|
11
24
|
...props,
|
|
12
25
|
ref: forwardedRef,
|
|
13
|
-
style: {
|
|
14
|
-
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
15
|
-
position: "absolute",
|
|
16
|
-
border: 0,
|
|
17
|
-
width: 1,
|
|
18
|
-
height: 1,
|
|
19
|
-
padding: 0,
|
|
20
|
-
margin: -1,
|
|
21
|
-
overflow: "hidden",
|
|
22
|
-
clip: "rect(0, 0, 0, 0)",
|
|
23
|
-
whiteSpace: "nowrap",
|
|
24
|
-
wordWrap: "normal",
|
|
25
|
-
...props.style
|
|
26
|
-
}
|
|
26
|
+
style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
29
|
}
|
|
@@ -32,6 +32,7 @@ VisuallyHidden.displayName = NAME;
|
|
|
32
32
|
var Root = VisuallyHidden;
|
|
33
33
|
export {
|
|
34
34
|
Root,
|
|
35
|
+
VISUALLY_HIDDEN_STYLES,
|
|
35
36
|
VisuallyHidden
|
|
36
37
|
};
|
|
37
38
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/visually-hidden.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * VisuallyHidden\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'VisuallyHidden';\n\ntype VisuallyHiddenElement = React.ElementRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface VisuallyHiddenProps extends PrimitiveSpanProps {}\n\nconst VisuallyHidden = React.forwardRef<VisuallyHiddenElement, VisuallyHiddenProps>(\n (props, forwardedRef) => {\n return (\n <Primitive.span\n {...props}\n ref={forwardedRef}\n style={{
|
|
5
|
-
"mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * VisuallyHidden\n * -----------------------------------------------------------------------------------------------*/\n\nconst VISUALLY_HIDDEN_STYLES = Object.freeze({\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}) satisfies React.CSSProperties;\n\nconst NAME = 'VisuallyHidden';\n\ntype VisuallyHiddenElement = React.ElementRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface VisuallyHiddenProps extends PrimitiveSpanProps {}\n\nconst VisuallyHidden = React.forwardRef<VisuallyHiddenElement, VisuallyHiddenProps>(\n (props, forwardedRef) => {\n return (\n <Primitive.span\n {...props}\n ref={forwardedRef}\n style={{ ...VISUALLY_HIDDEN_STYLES, ...props.style }}\n />\n );\n }\n);\n\nVisuallyHidden.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = VisuallyHidden;\n\nexport {\n VisuallyHidden,\n //\n Root,\n //\n VISUALLY_HIDDEN_STYLES,\n};\nexport type { VisuallyHiddenProps };\n"],
|
|
5
|
+
"mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AA6BpB;AAvBN,IAAM,yBAAyB,OAAO,OAAO;AAAA;AAAA,EAE3C,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,UAAU;AACZ,CAAC;AAED,IAAM,OAAO;AAMb,IAAM,iBAAuB;AAAA,EAC3B,CAAC,OAAO,iBAAiB;AACvB,WACE;AAAA,MAAC,UAAU;AAAA,MAAV;AAAA,QACE,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,OAAO,EAAE,GAAG,wBAAwB,GAAG,MAAM,MAAM;AAAA;AAAA,IACrD;AAAA,EAEJ;AACF;AAEA,eAAe,cAAc;AAI7B,IAAM,OAAO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radix-ui/react-visually-hidden",
|
|
3
|
-
"version": "1.2.0-rc.
|
|
3
|
+
"version": "1.2.0-rc.1744830756566",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"sideEffects": false,
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@radix-ui/react-primitive": "2.1.0-rc.
|
|
14
|
+
"@radix-ui/react-primitive": "2.1.0-rc.1744830756566"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@types/react": "*",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"react": "^19.0.0",
|
|
35
35
|
"react-dom": "^19.0.0",
|
|
36
36
|
"typescript": "^5.7.3",
|
|
37
|
-
"@repo/builder": "0.0.0",
|
|
38
37
|
"@repo/eslint-config": "0.0.0",
|
|
38
|
+
"@repo/builder": "0.0.0",
|
|
39
39
|
"@repo/typescript-config": "0.0.0"
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://radix-ui.com/primitives",
|