@radix-ui/react-separator 1.2.0-rc.1791763750187 → 1.2.1

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.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts", "../src/separator.tsx"],
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 | undefined;\n /**\n * Whether or not the component is purely decorative. When true, accessibility-related attributes\n * are updated so that the rendered element is removed from the accessibility tree.\n */\n decorative?: boolean | undefined;\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"],
4
+ "sourcesContent": ["'use client';\nexport {\n Separator,\n //\n Root,\n} from './separator.js';\nexport type { SeparatorProps } from './separator.js';\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 | undefined;\n /**\n * Whether or not the component is purely decorative. When true, accessibility-related attributes\n * are updated so that the rendered element is removed from the accessibility tree.\n */\n decorative?: boolean | undefined;\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
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ui/react-separator",
3
- "version": "1.2.0-rc.1791763750187",
3
+ "version": "1.2.1",
4
4
  "license": "MIT",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./dist/index.js",
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "sideEffects": false,
13
13
  "dependencies": {
14
- "@radix-ui/react-primitive": "2.2.0-rc.1791763750187"
14
+ "@radix-ui/react-primitive": "2.2.1"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@types/react": "^19.3.0",
@@ -19,8 +19,8 @@
19
19
  "react": "^19.3.0",
20
20
  "react-dom": "^19.3.0",
21
21
  "typescript": "^5.9.3",
22
- "@repo/typescript-config": "0.0.0",
23
- "@repo/builder": "0.0.0"
22
+ "@repo/builder": "0.0.0",
23
+ "@repo/typescript-config": "0.0.0"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@types/react": "*",
@@ -49,7 +49,8 @@
49
49
  "lint": "oxlint --max-warnings 0 src",
50
50
  "clean": "rm -rf dist",
51
51
  "reset": "rm -rf dist node_modules",
52
- "typecheck": "tsc --noEmit",
52
+ "types:check:pkg": "tsc --noEmit -p tsconfig.lib.json",
53
+ "types:check:test": "tsc --noEmit -p tsconfig.test.json",
53
54
  "build": "radix-build"
54
55
  },
55
56
  "types": "./dist/index.d.ts",