@radix-ui/react-separator 1.1.11 → 1.1.12-rc.1784059564143

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.js CHANGED
@@ -5,6 +5,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
8
9
  var __export = (target, all) => {
9
10
  for (var name in all)
10
11
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -39,27 +40,30 @@ 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");
42
- var NAME = "Separator";
43
43
  var DEFAULT_ORIENTATION = "horizontal";
44
44
  var ORIENTATIONS = ["horizontal", "vertical"];
45
- var Separator = React.forwardRef((props, forwardedRef) => {
46
- const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
47
- const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
48
- const ariaOrientation = orientation === "vertical" ? orientation : void 0;
49
- const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
50
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
51
- import_react_primitive.Primitive.div,
52
- {
53
- "data-orientation": orientation,
54
- ...semanticProps,
55
- ...domProps,
56
- ref: forwardedRef
57
- }
58
- );
59
- });
60
- Separator.displayName = NAME;
45
+ var Separator = /* @__PURE__ */ React.forwardRef(
46
+ // ignore prettier to reduce diff noise
47
+ // prettier-ignore
48
+ /* @__PURE__ */ __name(function Separator2(props, forwardedRef) {
49
+ const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
50
+ const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
51
+ const ariaOrientation = orientation === "vertical" ? orientation : void 0;
52
+ const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
53
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
+ import_react_primitive.Primitive.div,
55
+ {
56
+ "data-orientation": orientation,
57
+ ...semanticProps,
58
+ ...domProps,
59
+ ref: forwardedRef
60
+ }
61
+ );
62
+ }, "Separator")
63
+ );
61
64
  function isValidOrientation(orientation) {
62
65
  return ORIENTATIONS.includes(orientation);
63
66
  }
67
+ __name(isValidOrientation, "isValidOrientation");
64
68
  var Root = Separator;
65
69
  //# 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 * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Separator';\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 = React.forwardRef<SeparatorElement, SeparatorProps>((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\nSeparator.displayName = NAME;\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;AAmCtB;AA7BJ,IAAM,OAAO;AACb,IAAM,sBAAsB;AAC5B,IAAM,eAAe,CAAC,cAAc,UAAU;AAiB9C,IAAM,YAAkB,iBAA6C,CAAC,OAAO,iBAAiB;AAC5F,QAAM,EAAE,YAAY,aAAa,kBAAkB,qBAAqB,GAAG,SAAS,IAAI;AACxF,QAAM,cAAc,mBAAmB,eAAe,IAAI,kBAAkB;AAE5E,QAAM,kBAAkB,gBAAgB,aAAa,cAAc;AACnE,QAAM,gBAAgB,aAClB,EAAE,MAAM,OAAO,IACf,EAAE,oBAAoB,iBAAiB,MAAM,YAAY;AAE7D,SACE;AAAA,IAAC,iCAAU;AAAA,IAAV;AAAA,MACC,oBAAkB;AAAA,MACjB,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,KAAK;AAAA;AAAA,EACP;AAEJ,CAAC;AAED,UAAU,cAAc;AAIxB,SAAS,mBAAmB,aAA8C;AACxE,SAAO,aAAa,SAAS,WAAW;AAC1C;AAEA,IAAM,OAAO;",
6
- "names": []
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 // ignore prettier to reduce diff noise\n // prettier-ignore\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;AAoCtB;AA/BJ,IAAM,sBAAsB;AAC5B,IAAM,eAAe,CAAC,cAAc,UAAU;AAiB9C,IAAM,YAA4B,gBAAM;AAAA;AAAA;AAAA,EAGtC,gCAASA,WAAU,OAAO,cAAc;AACxC,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,GAjBE;AAkBF;AAIA,SAAS,mBAAmB,aAA8C;AACxE,SAAO,aAAa,SAAS,WAAW;AAC1C;AAFS;AAIT,IAAM,OAAO;",
6
+ "names": ["Separator"]
7
7
  }
package/dist/index.mjs CHANGED
@@ -1,29 +1,35 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
1
4
  // src/separator.tsx
2
5
  import * as React from "react";
3
6
  import { Primitive } from "@radix-ui/react-primitive";
4
7
  import { jsx } from "react/jsx-runtime";
5
- var NAME = "Separator";
6
8
  var DEFAULT_ORIENTATION = "horizontal";
7
9
  var ORIENTATIONS = ["horizontal", "vertical"];
8
- var Separator = React.forwardRef((props, forwardedRef) => {
9
- const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
10
- const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
11
- const ariaOrientation = orientation === "vertical" ? orientation : void 0;
12
- const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
13
- return /* @__PURE__ */ jsx(
14
- Primitive.div,
15
- {
16
- "data-orientation": orientation,
17
- ...semanticProps,
18
- ...domProps,
19
- ref: forwardedRef
20
- }
21
- );
22
- });
23
- Separator.displayName = NAME;
10
+ var Separator = /* @__PURE__ */ React.forwardRef(
11
+ // ignore prettier to reduce diff noise
12
+ // prettier-ignore
13
+ /* @__PURE__ */ __name(function Separator2(props, forwardedRef) {
14
+ const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
15
+ const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
16
+ const ariaOrientation = orientation === "vertical" ? orientation : void 0;
17
+ const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
18
+ return /* @__PURE__ */ jsx(
19
+ Primitive.div,
20
+ {
21
+ "data-orientation": orientation,
22
+ ...semanticProps,
23
+ ...domProps,
24
+ ref: forwardedRef
25
+ }
26
+ );
27
+ }, "Separator")
28
+ );
24
29
  function isValidOrientation(orientation) {
25
30
  return ORIENTATIONS.includes(orientation);
26
31
  }
32
+ __name(isValidOrientation, "isValidOrientation");
27
33
  var Root = Separator;
28
34
  export {
29
35
  Root,
@@ -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 * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Separator';\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 = React.forwardRef<SeparatorElement, SeparatorProps>((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\nSeparator.displayName = NAME;\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;AAmCtB;AA7BJ,IAAM,OAAO;AACb,IAAM,sBAAsB;AAC5B,IAAM,eAAe,CAAC,cAAc,UAAU;AAiB9C,IAAM,YAAkB,iBAA6C,CAAC,OAAO,iBAAiB;AAC5F,QAAM,EAAE,YAAY,aAAa,kBAAkB,qBAAqB,GAAG,SAAS,IAAI;AACxF,QAAM,cAAc,mBAAmB,eAAe,IAAI,kBAAkB;AAE5E,QAAM,kBAAkB,gBAAgB,aAAa,cAAc;AACnE,QAAM,gBAAgB,aAClB,EAAE,MAAM,OAAO,IACf,EAAE,oBAAoB,iBAAiB,MAAM,YAAY;AAE7D,SACE;AAAA,IAAC,UAAU;AAAA,IAAV;AAAA,MACC,oBAAkB;AAAA,MACjB,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,KAAK;AAAA;AAAA,EACP;AAEJ,CAAC;AAED,UAAU,cAAc;AAIxB,SAAS,mBAAmB,aAA8C;AACxE,SAAO,aAAa,SAAS,WAAW;AAC1C;AAEA,IAAM,OAAO;",
6
- "names": []
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 // ignore prettier to reduce diff noise\n // prettier-ignore\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;AAoCtB;AA/BJ,IAAM,sBAAsB;AAC5B,IAAM,eAAe,CAAC,cAAc,UAAU;AAiB9C,IAAM,YAA4B,gBAAM;AAAA;AAAA;AAAA,EAGtC,gCAASA,WAAU,OAAO,cAAc;AACxC,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,GAjBE;AAkBF;AAIA,SAAS,mBAAmB,aAA8C;AACxE,SAAO,aAAa,SAAS,WAAW;AAC1C;AAFS;AAIT,IAAM,OAAO;",
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.11",
3
+ "version": "1.1.12-rc.1784059564143",
4
4
  "license": "MIT",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./dist/index.js",
@@ -19,8 +19,8 @@
19
19
  "react": "^19.2.0",
20
20
  "react-dom": "^19.2.0",
21
21
  "typescript": "^5.9.3",
22
- "@repo/builder": "0.0.0",
23
- "@repo/typescript-config": "0.0.0"
22
+ "@repo/typescript-config": "0.0.0",
23
+ "@repo/builder": "0.0.0"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@types/react": "*",