@radix-ui/react-separator 1.1.14 → 1.1.15

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 CHANGED
@@ -1,11 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { Primitive } from '@radix-ui/react-primitive';
3
3
 
4
- declare const Orientation: {
5
- readonly Horizontal: "horizontal";
6
- readonly Vertical: "vertical";
7
- };
8
- type Orientation = (typeof Orientation)[keyof typeof Orientation];
4
+ declare const ORIENTATIONS: readonly ["horizontal", "vertical"];
5
+ type Orientation = (typeof ORIENTATIONS)[number];
9
6
  type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
10
7
  interface SeparatorProps extends PrimitiveDivProps {
11
8
  /**
@@ -19,5 +16,6 @@ interface SeparatorProps extends PrimitiveDivProps {
19
16
  decorative?: boolean;
20
17
  }
21
18
  declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
19
+ declare const Root: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
22
20
 
23
- export { Separator as Root, Separator, type SeparatorProps };
21
+ export { Root, Separator, type SeparatorProps };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { Primitive } from '@radix-ui/react-primitive';
3
3
 
4
- declare const Orientation: {
5
- readonly Horizontal: "horizontal";
6
- readonly Vertical: "vertical";
7
- };
8
- type Orientation = (typeof Orientation)[keyof typeof Orientation];
4
+ declare const ORIENTATIONS: readonly ["horizontal", "vertical"];
5
+ type Orientation = (typeof ORIENTATIONS)[number];
9
6
  type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
10
7
  interface SeparatorProps extends PrimitiveDivProps {
11
8
  /**
@@ -19,5 +16,6 @@ interface SeparatorProps extends PrimitiveDivProps {
19
16
  decorative?: boolean;
20
17
  }
21
18
  declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
19
+ declare const Root: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
22
20
 
23
- export { Separator as Root, Separator, type SeparatorProps };
21
+ export { Root, Separator, type SeparatorProps };
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  // src/index.ts
32
32
  var index_exports = {};
33
33
  __export(index_exports, {
34
- Root: () => Separator,
34
+ Root: () => Root,
35
35
  Separator: () => Separator
36
36
  });
37
37
  module.exports = __toCommonJS(index_exports);
@@ -40,17 +40,13 @@ module.exports = __toCommonJS(index_exports);
40
40
  var React = __toESM(require("react"));
41
41
  var import_react_primitive = require("@radix-ui/react-primitive");
42
42
  var import_jsx_runtime = require("react/jsx-runtime");
43
- var Orientation = {
44
- Horizontal: "horizontal",
45
- Vertical: "vertical"
46
- };
47
- var DEFAULT_ORIENTATION = Orientation.Horizontal;
48
- var ORIENTATIONS = Object.values(Orientation);
43
+ var DEFAULT_ORIENTATION = "horizontal";
44
+ var ORIENTATIONS = ["horizontal", "vertical"];
49
45
  var Separator = /* @__PURE__ */ React.forwardRef(
50
46
  /* @__PURE__ */ __name(function Separator2(props, forwardedRef) {
51
47
  const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
52
48
  const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
53
- const ariaOrientation = orientation === Orientation.Vertical ? orientation : void 0;
49
+ const ariaOrientation = orientation === "vertical" ? orientation : void 0;
54
50
  const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
55
51
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
56
52
  import_react_primitive.Primitive.div,
@@ -67,4 +63,5 @@ function isValidOrientation(orientation) {
67
63
  return ORIENTATIONS.includes(orientation);
68
64
  }
69
65
  __name(isValidOrientation, "isValidOrientation");
66
+ var Root = Separator;
70
67
  //# 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": ["export {\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;",
4
+ "sourcesContent": ["export {\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 DEFAULT_ORIENTATION = 'horizontal';\nconst ORIENTATIONS = ['horizontal', 'vertical'] as const;\n\ntype Orientation = (typeof ORIENTATIONS)[number];\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 === '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\nconst Root = Separator;\n\nexport {\n Separator,\n //\n Root,\n};\nexport type { SeparatorProps };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,6BAA0B;AAkCpB;AA7BN,IAAM,sBAAsB;AAC5B,IAAM,eAAe,CAAC,cAAc,UAAU;AAiB9C,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,aAAa,cAAc;AACnE,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;AAIT,IAAM,OAAO;",
6
6
  "names": ["Separator"]
7
7
  }
package/dist/index.mjs CHANGED
@@ -5,17 +5,13 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
5
5
  import * as React from "react";
6
6
  import { Primitive } from "@radix-ui/react-primitive";
7
7
  import { jsx } from "react/jsx-runtime";
8
- var Orientation = {
9
- Horizontal: "horizontal",
10
- Vertical: "vertical"
11
- };
12
- var DEFAULT_ORIENTATION = Orientation.Horizontal;
13
- var ORIENTATIONS = Object.values(Orientation);
8
+ var DEFAULT_ORIENTATION = "horizontal";
9
+ var ORIENTATIONS = ["horizontal", "vertical"];
14
10
  var Separator = /* @__PURE__ */ React.forwardRef(
15
11
  /* @__PURE__ */ __name(function Separator2(props, forwardedRef) {
16
12
  const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
17
13
  const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
18
- const ariaOrientation = orientation === Orientation.Vertical ? orientation : void 0;
14
+ const ariaOrientation = orientation === "vertical" ? orientation : void 0;
19
15
  const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
20
16
  return /* @__PURE__ */ jsx(
21
17
  Primitive.div,
@@ -32,8 +28,9 @@ function isValidOrientation(orientation) {
32
28
  return ORIENTATIONS.includes(orientation);
33
29
  }
34
30
  __name(isValidOrientation, "isValidOrientation");
31
+ var Root = Separator;
35
32
  export {
36
- Separator as Root,
33
+ Root,
37
34
  Separator
38
35
  };
39
36
  //# sourceMappingURL=index.mjs.map
@@ -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 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;",
4
+ "sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Separator\n * -----------------------------------------------------------------------------------------------*/\nconst DEFAULT_ORIENTATION = 'horizontal';\nconst ORIENTATIONS = ['horizontal', 'vertical'] as const;\n\ntype Orientation = (typeof ORIENTATIONS)[number];\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 === '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\nconst Root = Separator;\n\nexport {\n Separator,\n //\n Root,\n};\nexport type { SeparatorProps };\n"],
5
+ "mappings": ";;;;AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAkCpB;AA7BN,IAAM,sBAAsB;AAC5B,IAAM,eAAe,CAAC,cAAc,UAAU;AAiB9C,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,aAAa,cAAc;AACnE,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;AAIT,IAAM,OAAO;",
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.14",
3
+ "version": "1.1.15",
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.9"
14
+ "@radix-ui/react-primitive": "2.1.10"
15
15
  },
16
16
  "devDependencies": {
17
- "@types/react": "^19.2.17",
18
- "@types/react-dom": "^19.2.3",
19
- "react": "^19.2.7",
20
- "react-dom": "^19.2.7",
17
+ "@types/react": "^19.2.2",
18
+ "@types/react-dom": "^19.2.2",
19
+ "react": "^19.2.0",
20
+ "react-dom": "^19.2.0",
21
21
  "typescript": "^5.9.3",
22
22
  "@repo/builder": "0.0.0",
23
23
  "@repo/typescript-config": "0.0.0"