@radix-ui/react-separator 1.1.15 → 1.1.16-rc.1785253136758
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 +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +9 -5
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +9 -5
- package/dist/index.mjs.map +2 -2
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
3
3
|
|
|
4
|
-
declare const
|
|
5
|
-
|
|
4
|
+
declare const Orientation: {
|
|
5
|
+
readonly Horizontal: "horizontal";
|
|
6
|
+
readonly Vertical: "vertical";
|
|
7
|
+
};
|
|
8
|
+
type Orientation = (typeof Orientation)[keyof typeof Orientation];
|
|
6
9
|
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
7
10
|
interface SeparatorProps extends PrimitiveDivProps {
|
|
8
11
|
/**
|
|
@@ -16,6 +19,5 @@ interface SeparatorProps extends PrimitiveDivProps {
|
|
|
16
19
|
decorative?: boolean;
|
|
17
20
|
}
|
|
18
21
|
declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
declare const Root: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
22
|
|
|
21
|
-
export { Root, Separator, type SeparatorProps };
|
|
23
|
+
export { Separator as Root, Separator, type SeparatorProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
3
3
|
|
|
4
|
-
declare const
|
|
5
|
-
|
|
4
|
+
declare const Orientation: {
|
|
5
|
+
readonly Horizontal: "horizontal";
|
|
6
|
+
readonly Vertical: "vertical";
|
|
7
|
+
};
|
|
8
|
+
type Orientation = (typeof Orientation)[keyof typeof Orientation];
|
|
6
9
|
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
7
10
|
interface SeparatorProps extends PrimitiveDivProps {
|
|
8
11
|
/**
|
|
@@ -16,6 +19,5 @@ interface SeparatorProps extends PrimitiveDivProps {
|
|
|
16
19
|
decorative?: boolean;
|
|
17
20
|
}
|
|
18
21
|
declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
declare const Root: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
22
|
|
|
21
|
-
export { Root, Separator, type SeparatorProps };
|
|
23
|
+
export { Separator as Root, Separator, type SeparatorProps };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
"use client";
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -31,7 +32,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
32
|
// src/index.ts
|
|
32
33
|
var index_exports = {};
|
|
33
34
|
__export(index_exports, {
|
|
34
|
-
Root: () =>
|
|
35
|
+
Root: () => Separator,
|
|
35
36
|
Separator: () => Separator
|
|
36
37
|
});
|
|
37
38
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -40,13 +41,17 @@ module.exports = __toCommonJS(index_exports);
|
|
|
40
41
|
var React = __toESM(require("react"));
|
|
41
42
|
var import_react_primitive = require("@radix-ui/react-primitive");
|
|
42
43
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
|
-
var
|
|
44
|
-
|
|
44
|
+
var Orientation = {
|
|
45
|
+
Horizontal: "horizontal",
|
|
46
|
+
Vertical: "vertical"
|
|
47
|
+
};
|
|
48
|
+
var DEFAULT_ORIENTATION = Orientation.Horizontal;
|
|
49
|
+
var ORIENTATIONS = Object.values(Orientation);
|
|
45
50
|
var Separator = /* @__PURE__ */ React.forwardRef(
|
|
46
51
|
/* @__PURE__ */ __name(function Separator2(props, forwardedRef) {
|
|
47
52
|
const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
|
|
48
53
|
const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
|
|
49
|
-
const ariaOrientation = orientation ===
|
|
54
|
+
const ariaOrientation = orientation === Orientation.Vertical ? orientation : void 0;
|
|
50
55
|
const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
|
|
51
56
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
52
57
|
import_react_primitive.Primitive.div,
|
|
@@ -63,5 +68,4 @@ function isValidOrientation(orientation) {
|
|
|
63
68
|
return ORIENTATIONS.includes(orientation);
|
|
64
69
|
}
|
|
65
70
|
__name(isValidOrientation, "isValidOrientation");
|
|
66
|
-
var Root = Separator;
|
|
67
71
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts", "../src/separator.tsx"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["'use client';\nexport {\n Separator,\n //\n Root,\n} from './separator';\nexport type { SeparatorProps } from './separator';\n", "import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Separator\n * -----------------------------------------------------------------------------------------------*/\nconst Orientation = {\n Horizontal: 'horizontal',\n Vertical: 'vertical',\n} as const;\n\nconst DEFAULT_ORIENTATION = Orientation.Horizontal;\nconst ORIENTATIONS = Object.values(Orientation);\n\ntype Orientation = (typeof Orientation)[keyof typeof Orientation];\n\ntype SeparatorElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface SeparatorProps extends PrimitiveDivProps {\n /**\n * Either `vertical` or `horizontal`. Defaults to `horizontal`.\n */\n orientation?: Orientation;\n /**\n * Whether or not the component is purely decorative. When true, accessibility-related attributes\n * are updated so that that the rendered element is removed from the accessibility tree.\n */\n decorative?: boolean;\n}\n\nconst Separator = /* @__PURE__ */ React.forwardRef<SeparatorElement, SeparatorProps>(\n function Separator(props, forwardedRef) {\n const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;\n const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;\n // `aria-orientation` defaults to `horizontal` so we only need it if `orientation` is vertical\n const ariaOrientation = orientation === Orientation.Vertical ? orientation : undefined;\n const semanticProps = decorative\n ? { role: 'none' }\n : { 'aria-orientation': ariaOrientation, role: 'separator' };\n\n return (\n <Primitive.div\n data-orientation={orientation}\n {...semanticProps}\n {...domProps}\n ref={forwardedRef}\n />\n );\n },\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction isValidOrientation(orientation: any): orientation is Orientation {\n return ORIENTATIONS.includes(orientation);\n}\n\nexport {\n Separator,\n //\n Separator as Root,\n};\nexport type { SeparatorProps };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,6BAA0B;AAwCpB;AAnCN,IAAM,cAAc;AAAA,EAClB,YAAY;AAAA,EACZ,UAAU;AACZ;AAEA,IAAM,sBAAsB,YAAY;AACxC,IAAM,eAAe,OAAO,OAAO,WAAW;AAkB9C,IAAM,YAA4B,gBAAM;AAAA,EACtC,gCAASA,WAAU,OAAO,cAAc;AACtC,UAAM,EAAE,YAAY,aAAa,kBAAkB,qBAAqB,GAAG,SAAS,IAAI;AACxF,UAAM,cAAc,mBAAmB,eAAe,IAAI,kBAAkB;AAE5E,UAAM,kBAAkB,gBAAgB,YAAY,WAAW,cAAc;AAC7E,UAAM,gBAAgB,aAClB,EAAE,MAAM,OAAO,IACf,EAAE,oBAAoB,iBAAiB,MAAM,YAAY;AAE7D,WACE;AAAA,MAAC,iCAAU;AAAA,MAAV;AAAA,QACC,oBAAkB;AAAA,QACjB,GAAG;AAAA,QACH,GAAG;AAAA,QACJ,KAAK;AAAA;AAAA,IACP;AAAA,EAEJ,GAjBA;AAkBF;AAIA,SAAS,mBAAmB,aAA8C;AACxE,SAAO,aAAa,SAAS,WAAW;AAC1C;AAFS;",
|
|
6
6
|
"names": ["Separator"]
|
|
7
7
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
4
|
|
|
@@ -5,13 +6,17 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5
6
|
import * as React from "react";
|
|
6
7
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
7
8
|
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
var
|
|
9
|
-
|
|
9
|
+
var Orientation = {
|
|
10
|
+
Horizontal: "horizontal",
|
|
11
|
+
Vertical: "vertical"
|
|
12
|
+
};
|
|
13
|
+
var DEFAULT_ORIENTATION = Orientation.Horizontal;
|
|
14
|
+
var ORIENTATIONS = Object.values(Orientation);
|
|
10
15
|
var Separator = /* @__PURE__ */ React.forwardRef(
|
|
11
16
|
/* @__PURE__ */ __name(function Separator2(props, forwardedRef) {
|
|
12
17
|
const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
|
|
13
18
|
const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
|
|
14
|
-
const ariaOrientation = orientation ===
|
|
19
|
+
const ariaOrientation = orientation === Orientation.Vertical ? orientation : void 0;
|
|
15
20
|
const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
|
|
16
21
|
return /* @__PURE__ */ jsx(
|
|
17
22
|
Primitive.div,
|
|
@@ -28,9 +33,8 @@ function isValidOrientation(orientation) {
|
|
|
28
33
|
return ORIENTATIONS.includes(orientation);
|
|
29
34
|
}
|
|
30
35
|
__name(isValidOrientation, "isValidOrientation");
|
|
31
|
-
var Root = Separator;
|
|
32
36
|
export {
|
|
33
|
-
Root,
|
|
37
|
+
Separator as Root,
|
|
34
38
|
Separator
|
|
35
39
|
};
|
|
36
40
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/separator.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Separator\n * -----------------------------------------------------------------------------------------------*/\nconst
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Separator\n * -----------------------------------------------------------------------------------------------*/\nconst Orientation = {\n Horizontal: 'horizontal',\n Vertical: 'vertical',\n} as const;\n\nconst DEFAULT_ORIENTATION = Orientation.Horizontal;\nconst ORIENTATIONS = Object.values(Orientation);\n\ntype Orientation = (typeof Orientation)[keyof typeof Orientation];\n\ntype SeparatorElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface SeparatorProps extends PrimitiveDivProps {\n /**\n * Either `vertical` or `horizontal`. Defaults to `horizontal`.\n */\n orientation?: Orientation;\n /**\n * Whether or not the component is purely decorative. When true, accessibility-related attributes\n * are updated so that that the rendered element is removed from the accessibility tree.\n */\n decorative?: boolean;\n}\n\nconst Separator = /* @__PURE__ */ React.forwardRef<SeparatorElement, SeparatorProps>(\n function Separator(props, forwardedRef) {\n const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;\n const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;\n // `aria-orientation` defaults to `horizontal` so we only need it if `orientation` is vertical\n const ariaOrientation = orientation === Orientation.Vertical ? orientation : undefined;\n const semanticProps = decorative\n ? { role: 'none' }\n : { 'aria-orientation': ariaOrientation, role: 'separator' };\n\n return (\n <Primitive.div\n data-orientation={orientation}\n {...semanticProps}\n {...domProps}\n ref={forwardedRef}\n />\n );\n },\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction isValidOrientation(orientation: any): orientation is Orientation {\n return ORIENTATIONS.includes(orientation);\n}\n\nexport {\n Separator,\n //\n Separator as Root,\n};\nexport type { SeparatorProps };\n"],
|
|
5
|
+
"mappings": ";;;;;AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAwCpB;AAnCN,IAAM,cAAc;AAAA,EAClB,YAAY;AAAA,EACZ,UAAU;AACZ;AAEA,IAAM,sBAAsB,YAAY;AACxC,IAAM,eAAe,OAAO,OAAO,WAAW;AAkB9C,IAAM,YAA4B,gBAAM;AAAA,EACtC,gCAASA,WAAU,OAAO,cAAc;AACtC,UAAM,EAAE,YAAY,aAAa,kBAAkB,qBAAqB,GAAG,SAAS,IAAI;AACxF,UAAM,cAAc,mBAAmB,eAAe,IAAI,kBAAkB;AAE5E,UAAM,kBAAkB,gBAAgB,YAAY,WAAW,cAAc;AAC7E,UAAM,gBAAgB,aAClB,EAAE,MAAM,OAAO,IACf,EAAE,oBAAoB,iBAAiB,MAAM,YAAY;AAE7D,WACE;AAAA,MAAC,UAAU;AAAA,MAAV;AAAA,QACC,oBAAkB;AAAA,QACjB,GAAG;AAAA,QACH,GAAG;AAAA,QACJ,KAAK;AAAA;AAAA,IACP;AAAA,EAEJ,GAjBA;AAkBF;AAIA,SAAS,mBAAmB,aAA8C;AACxE,SAAO,aAAa,SAAS,WAAW;AAC1C;AAFS;",
|
|
6
6
|
"names": ["Separator"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radix-ui/react-separator",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.16-rc.1785253136758",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
],
|
|
12
12
|
"sideEffects": false,
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@radix-ui/react-primitive": "2.1.
|
|
14
|
+
"@radix-ui/react-primitive": "2.1.11-rc.1785253136758"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@types/react": "^19.2.
|
|
18
|
-
"@types/react-dom": "^19.2.
|
|
19
|
-
"react": "^19.2.
|
|
20
|
-
"react-dom": "^19.2.
|
|
17
|
+
"@types/react": "^19.2.17",
|
|
18
|
+
"@types/react-dom": "^19.2.3",
|
|
19
|
+
"react": "^19.2.8",
|
|
20
|
+
"react-dom": "^19.2.8",
|
|
21
21
|
"typescript": "^5.9.3",
|
|
22
22
|
"@repo/builder": "0.0.0",
|
|
23
23
|
"@repo/typescript-config": "0.0.0"
|