@hive-ui/separator 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.
@@ -0,0 +1,56 @@
1
+ import { BoxProps } from "@hive-ui/box";
2
+ import * as _$react from "react";
3
+ import { Space } from "@hive-ui/style-props";
4
+
5
+ //#region src/Separator.d.ts
6
+ type Orientation = "horizontal" | "vertical";
7
+ type SeparatorProps = Pick<BoxProps<"hr">, "element"> & {
8
+ id?: never;
9
+ /**
10
+ * Separator direction
11
+ *
12
+ * @type {Orientation}
13
+ * @memberof SeparatorProps
14
+ */
15
+ orientation: Orientation;
16
+ /**
17
+ * Space left and right of the separator when orientation is vertical
18
+ *
19
+ * @type {Space}
20
+ * @memberof SeparatorProps
21
+ */
22
+ horizontalSpacing?: Space;
23
+ /**
24
+ * Space top and bottom of the separator when orientation is horizontal
25
+ *
26
+ * @type {Space}
27
+ * @memberof SeparatorProps
28
+ */
29
+ verticalSpacing?: Space;
30
+ };
31
+ declare const Separator: _$react.ForwardRefExoticComponent<Pick<BoxProps<"hr">, "element"> & {
32
+ id?: never;
33
+ /**
34
+ * Separator direction
35
+ *
36
+ * @type {Orientation}
37
+ * @memberof SeparatorProps
38
+ */
39
+ orientation: Orientation;
40
+ /**
41
+ * Space left and right of the separator when orientation is vertical
42
+ *
43
+ * @type {Space}
44
+ * @memberof SeparatorProps
45
+ */
46
+ horizontalSpacing?: Space;
47
+ /**
48
+ * Space top and bottom of the separator when orientation is horizontal
49
+ *
50
+ * @type {Space}
51
+ * @memberof SeparatorProps
52
+ */
53
+ verticalSpacing?: Space;
54
+ } & _$react.RefAttributes<HTMLElement>>;
55
+ //#endregion
56
+ export { Separator, type SeparatorProps };
package/dist/index.mjs ADDED
@@ -0,0 +1,27 @@
1
+ import { Box } from "@hive-ui/box";
2
+ import { forwardRef } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/Separator.tsx
5
+ const Separator = forwardRef(({ element = "SEPARATOR", orientation, horizontalSpacing, verticalSpacing, ...props }, ref) => {
6
+ return /* @__PURE__ */ jsx(Box, {
7
+ ...props,
8
+ "aria-orientation": orientation,
9
+ element,
10
+ margin: "space0",
11
+ marginBottom: verticalSpacing,
12
+ marginLeft: horizontalSpacing,
13
+ marginRight: horizontalSpacing,
14
+ marginTop: verticalSpacing,
15
+ as: "hr",
16
+ borderWidth: "borderWidth0",
17
+ borderColor: "colorBorderWeaker",
18
+ borderStyle: "solid",
19
+ borderBottomWidth: orientation === "horizontal" ? "borderWidth10" : void 0,
20
+ borderLeftWidth: orientation === "vertical" ? "borderWidth10" : void 0,
21
+ width: orientation === "horizontal" ? "auto" : void 0,
22
+ height: orientation === "vertical" ? "auto" : void 0,
23
+ ref
24
+ });
25
+ });
26
+ //#endregion
27
+ export { Separator };
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@hive-ui/separator",
3
+ "version": "0.1.0",
4
+ "description": "Hive UI Separator 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
+ "@hive-ui/style-props": "^0.1.0"
26
+ },
27
+ "devDependencies": {
28
+ "@types/node": "^25.6.2",
29
+ "@typescript/native-preview": "7.0.0-dev.20260509.2",
30
+ "bumpp": "^11.1.0",
31
+ "typescript": "^6.0.3",
32
+ "vite-plus": "^0.1.20",
33
+ "vitest": "npm:@voidzero-dev/vite-plus-test@^0.1.20"
34
+ },
35
+ "peerDependencies": {
36
+ "react": "19.2.6"
37
+ }
38
+ }