@radix-ui/react-arrow 1.0.3-rc.5 → 1.0.3-rc.6

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,10 @@
1
+ import * as React from "react";
2
+ import * as Radix from "@radix-ui/react-primitive";
3
+ import { Primitive } from "@radix-ui/react-primitive";
4
+ type PrimitiveSvgProps = Radix.ComponentPropsWithoutRef<typeof Primitive.svg>;
5
+ export interface ArrowProps extends PrimitiveSvgProps {
6
+ }
7
+ export const Arrow: React.ForwardRefExoticComponent<ArrowProps & React.RefAttributes<SVGSVGElement>>;
8
+ export const Root: React.ForwardRefExoticComponent<ArrowProps & React.RefAttributes<SVGSVGElement>>;
9
+
10
+ //# sourceMappingURL=index.d.ts.map
@@ -29,4 +29,4 @@ const $7e8f5cd07187803e$export$21b07c8f274aebd5 = /*#__PURE__*/ $jbnEx$forwardRe
29
29
 
30
30
 
31
31
  export {$7e8f5cd07187803e$export$21b07c8f274aebd5 as Arrow, $7e8f5cd07187803e$export$be92b6f5f03c0fe9 as Root};
32
- //# sourceMappingURL=index.module.js.map
32
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"mappings":";;;;A;;;ACKA;;oGAEA,CAEA,MAAMI,0BAAI,GAAG,OAAb,AAAA;AAMA,MAAMJ,yCAAK,GAAA,aAAGE,CAAAA,iBAAA,CAA2C,CAACI,KAAD,EAAQC,YAAR,GAAyB;IAChF,MAAM,E,UAAEC,QAAF,CAAA,SAAYC,KAAK,GAAG,EAApB,WAAwBC,MAAM,GAAG,CAAjC,GAAoC,GAAGC,UAAH,EAApC,GAAsDL,KAA5D,AAAM;IACN,OAAA,aACE,CAAA,oBAAA,CAAC,gBAAD,CAAW,GAAX,EAAA,oCAAA,CAAA,EAAA,EACMK,UADN,EADF;QAGI,GAAG,EAAEJ,YAFP;QAGE,KAAK,EAAEE,KAHT;QAIE,MAAM,EAAEC,MAJV;QAKE,OAAO,EAAC,WALV;QAME,mBAAmB,EAAC,MAApB;KANF,CAAA,EASGJ,KAAK,CAACM,OAAN,GAAgBJ,QAAhB,GAAA,aAA2B,CAAA,oBAT9B,CAAA,SAAA,EAAA;QASuC,MAAM,EAAC,gBAAP;KAAT,CAT9B,CADF,CAUgC;CAZpB,CAAd,AAeC;AAED,aAAA,CAAA,MAAA,CAAA,MAAA,CAAA,yCAAA,EAAA;IAAA,WAAA,EAAA,0BAAA;CAAA,CAAA,CAAA;AAEA,oGAAA,CAEA,MAAMP,yCAAI,GAAGD,yCAAb,AAAA;;ADpCA","sources":["packages/react/arrow/src/index.ts","packages/react/arrow/src/Arrow.tsx"],"sourcesContent":["export {\n Arrow,\n //\n Root,\n} from './Arrow';\nexport type { ArrowProps } from './Arrow';\n","import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type * as Radix from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Arrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Arrow';\n\ntype ArrowElement = React.ElementRef<typeof Primitive.svg>;\ntype PrimitiveSvgProps = Radix.ComponentPropsWithoutRef<typeof Primitive.svg>;\ninterface ArrowProps extends PrimitiveSvgProps {}\n\nconst Arrow = React.forwardRef<ArrowElement, ArrowProps>((props, forwardedRef) => {\n const { children, width = 10, height = 5, ...arrowProps } = props;\n return (\n <Primitive.svg\n {...arrowProps}\n ref={forwardedRef}\n width={width}\n height={height}\n viewBox=\"0 0 30 10\"\n preserveAspectRatio=\"none\"\n >\n {/* We use their children if they're slotting to replace the whole svg */}\n {props.asChild ? children : <polygon points=\"0,0 30,0 15,10\" />}\n </Primitive.svg>\n );\n});\n\nArrow.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Arrow;\n\nexport {\n Arrow,\n //\n Root,\n};\nexport type { ArrowProps };\n"],"names":["Arrow","Root","React","Primitive","NAME","forwardRef","props","forwardedRef","children","width","height","arrowProps","asChild"],"version":3,"file":"index.module.js.map"}
1
+ {"mappings":";;;;A;;;ACKA;;oGAEA,CAEA,MAAMI,0BAAI,GAAG,OAAb,AAAA;AAMA,MAAMJ,yCAAK,GAAA,aAAGE,CAAAA,iBAAA,CAA2C,CAACI,KAAD,EAAQC,YAAR,GAAyB;IAChF,MAAM,E,UAAEC,QAAF,CAAA,SAAYC,KAAK,GAAG,EAApB,WAAwBC,MAAM,GAAG,CAAjC,GAAoC,GAAGC,UAAH,EAApC,GAAsDL,KAA5D,AAAM;IACN,OAAA,aACE,CAAA,oBAAA,CAAC,gBAAD,CAAW,GAAX,EAAA,oCAAA,CAAA,EAAA,EACMK,UADN,EADF;QAGI,GAAG,EAAEJ,YAFP;QAGE,KAAK,EAAEE,KAHT;QAIE,MAAM,EAAEC,MAJV;QAKE,OAAO,EAAC,WALV;QAME,mBAAmB,EAAC,MAApB;KANF,CAAA,EASGJ,KAAK,CAACM,OAAN,GAAgBJ,QAAhB,GAAA,aAA2B,CAAA,oBAT9B,CAAA,SAAA,EAAA;QASuC,MAAM,EAAC,gBAAP;KAAT,CAT9B,CADF,CAUgC;CAZpB,CAAd,AAeC;AAED,aAAA,CAAA,MAAA,CAAA,MAAA,CAAA,yCAAA,EAAA;IAAA,WAAA,EAAA,0BAAA;CAAA,CAAA,CAAA;AAEA,oGAAA,CAEA,MAAMP,yCAAI,GAAGD,yCAAb,AAAA;;ADpCA","sources":["packages/react/arrow/src/index.ts","packages/react/arrow/src/Arrow.tsx"],"sourcesContent":["export {\n Arrow,\n //\n Root,\n} from './Arrow';\nexport type { ArrowProps } from './Arrow';\n","import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type * as Radix from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Arrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Arrow';\n\ntype ArrowElement = React.ElementRef<typeof Primitive.svg>;\ntype PrimitiveSvgProps = Radix.ComponentPropsWithoutRef<typeof Primitive.svg>;\ninterface ArrowProps extends PrimitiveSvgProps {}\n\nconst Arrow = React.forwardRef<ArrowElement, ArrowProps>((props, forwardedRef) => {\n const { children, width = 10, height = 5, ...arrowProps } = props;\n return (\n <Primitive.svg\n {...arrowProps}\n ref={forwardedRef}\n width={width}\n height={height}\n viewBox=\"0 0 30 10\"\n preserveAspectRatio=\"none\"\n >\n {/* We use their children if they're slotting to replace the whole svg */}\n {props.asChild ? children : <polygon points=\"0,0 30,0 15,10\" />}\n </Primitive.svg>\n );\n});\n\nArrow.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Arrow;\n\nexport {\n Arrow,\n //\n Root,\n};\nexport type { ArrowProps };\n"],"names":["Arrow","Root","React","Primitive","NAME","forwardRef","props","forwardedRef","children","width","height","arrowProps","asChild"],"version":3,"file":"index.mjs.map"}
package/package.json CHANGED
@@ -1,11 +1,23 @@
1
1
  {
2
2
  "name": "@radix-ui/react-arrow",
3
- "version": "1.0.3-rc.5",
3
+ "version": "1.0.3-rc.6",
4
4
  "license": "MIT",
5
- "source": "src/index.ts",
6
- "main": "dist/index.js",
7
- "module": "dist/index.module.js",
8
- "types": "dist/index.d.ts",
5
+ "exports": {
6
+ ".": {
7
+ "import": {
8
+ "types": "./dist/index.d.mts",
9
+ "default": "./dist/index.mjs"
10
+ },
11
+ "require": {
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ }
15
+ }
16
+ },
17
+ "source": "./src/index.ts",
18
+ "main": "./dist/index.js",
19
+ "module": "./dist/index.mjs",
20
+ "types": "./dist/index.d.ts",
9
21
  "files": [
10
22
  "dist",
11
23
  "README.md"
@@ -17,7 +29,7 @@
17
29
  },
18
30
  "dependencies": {
19
31
  "@babel/runtime": "^7.13.10",
20
- "@radix-ui/react-primitive": "1.0.3-rc.5"
32
+ "@radix-ui/react-primitive": "1.0.3-rc.6"
21
33
  },
22
34
  "peerDependencies": {
23
35
  "react": "^16.8 || ^17.0 || ^18.0",