@hive-ui/screen-reader-only 0.1.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.
- package/dist/index.d.mts +8 -0
- package/dist/index.mjs +25 -0
- package/package.json +37 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BoxProps } from "@hive-ui/box";
|
|
2
|
+
import * as _$react from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/ScreenReaderOnly.d.ts
|
|
5
|
+
type ScreenReaderOnlyProps = Pick<BoxProps<"span">, "element" | "children">;
|
|
6
|
+
declare const ScreenReaderOnly: _$react.ForwardRefExoticComponent<ScreenReaderOnlyProps & _$react.RefAttributes<HTMLElement>>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ScreenReaderOnly, type ScreenReaderOnlyProps };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Box } from "@hive-ui/box";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/ScreenReaderOnly.tsx
|
|
5
|
+
const ScreenReaderOnly = forwardRef(({ element = "SCREEN_READER_ONLY", children, ...props }, ref) => {
|
|
6
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
7
|
+
...props,
|
|
8
|
+
as: "span",
|
|
9
|
+
border: "none",
|
|
10
|
+
clip: "rect(0 0 0 0)",
|
|
11
|
+
height: "1px",
|
|
12
|
+
margin: "spaceNegative10",
|
|
13
|
+
overflow: "hidden",
|
|
14
|
+
padding: "space0",
|
|
15
|
+
position: "absolute",
|
|
16
|
+
element,
|
|
17
|
+
ref,
|
|
18
|
+
textTransform: "none",
|
|
19
|
+
whiteSpace: "nowrap",
|
|
20
|
+
width: "1px",
|
|
21
|
+
children
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
//#endregion
|
|
25
|
+
export { ScreenReaderOnly };
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hive-ui/screen-reader-only",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Hive UI Screen Reader Only Component",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist"
|
|
7
|
+
],
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./dist/index.mjs",
|
|
11
|
+
"./package.json": "./package.json"
|
|
12
|
+
},
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "vp pack",
|
|
18
|
+
"dev": "vp pack --watch",
|
|
19
|
+
"test": "vp test",
|
|
20
|
+
"check": "vp check",
|
|
21
|
+
"prepublishOnly": "vp run build"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@hive-ui/box": "^0.1.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/node": "^25.6.2",
|
|
28
|
+
"@typescript/native-preview": "7.0.0-dev.20260509.2",
|
|
29
|
+
"bumpp": "^11.1.0",
|
|
30
|
+
"typescript": "^6.0.3",
|
|
31
|
+
"vite-plus": "^0.1.20",
|
|
32
|
+
"vitest": "npm:@voidzero-dev/vite-plus-test@^0.1.20"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"react": "19.2.6"
|
|
36
|
+
}
|
|
37
|
+
}
|