@radix-ui/react-arrow 0.0.14 → 0.1.0
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.ts +7 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.module.js +1 -1
- package/dist/index.module.js.map +1 -1
- package/package.json +2 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as Radix from "@radix-ui/react-primitive";
|
|
1
3
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
* We pass `ArrowImpl` in the `as` prop so that the whole svg
|
|
8
|
-
* is replaced when consumer passes an `as` prop
|
|
9
|
-
*/
|
|
10
|
-
export const Arrow: ArrowPrimitive;
|
|
11
|
-
export const Root: ArrowPrimitive;
|
|
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>>;
|
|
12
9
|
|
|
13
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"A;A;
|
|
1
|
+
{"mappings":"A;A;A;AAYA,yBAAyB,MAAM,wBAAwB,CAAC,OAAO,UAAU,GAAG,CAAC,CAAC;AAC9E,2BAAqB,SAAQ,iBAAiB;CAAG;AAEjD,OAAA,MAAM,uFAeJ,CAAC;AAMH,OAAA,MAAM,sFAAY,CAAC","sources":["./packages/react/arrow/src/packages/react/arrow/src/Arrow.tsx","./packages/react/arrow/src/packages/react/arrow/src/index.ts"],"sourcesContent":[null,null],"names":[],"version":3,"file":"index.d.ts.map"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e,r,t,
|
|
1
|
+
var e,r,t,i=require("@radix-ui/react-primitive").Primitive,o=(e={},r=require("react"),Object.keys(r).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}})})),e),n=(t=require("@babel/runtime/helpers/extends"))&&t.__esModule?t.default:t;const s=/*#__PURE__*/o.forwardRef(((e,r)=>{const{children:t,width:s=10,height:a=5,...c}=e;/*#__PURE__*/return o.createElement(i.svg,n({},c,{ref:r,width:s,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?t:/*#__PURE__*/o.createElement("polygon",{points:"0,0 30,0 15,10"}))}));exports.Arrow=s;const a=s;exports.Root=a;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"IAYgCA,EAAMC,EAZNC,sDAYAF,KAAMC,mBACpCE,OAAOC,KAAKH,GAAQI,SAAQ,SAASC,GACvB,YAARA,GAA6B,eAARA,GAIzBH,OAAOI,eAAeP,EAAMM,EAAK,CAC/BE,YAAY,EACZC,IAAK,WACH,OAAOR,EAAOK,SAKbN,MA1BuBE,8CAClBA,EAAEQ,WAAaR,EAAES,QAAUT,
|
|
1
|
+
{"mappings":"IAYgCA,EAAMC,EAZNC,sDAYAF,KAAMC,mBACpCE,OAAOC,KAAKH,GAAQI,SAAQ,SAASC,GACvB,YAARA,GAA6B,eAARA,GAIzBH,OAAOI,eAAeP,EAAMM,EAAK,CAC/BE,YAAY,EACZC,IAAK,WACH,OAAOR,EAAOK,SAKbN,MA1BuBE,8CAClBA,EAAEQ,WAAaR,EAAES,QAAUT,ECQzC,MAMMU,eAAQC,EAAMC,YAAqC,CAACC,EAAOC,KAC/D,MAAMC,SAAEA,EAAFC,MAAYA,EAAQ,GAApBC,OAAwBA,EAAS,KAAMC,GAAeL,eAC5D,OACEM,EAAAC,cAACC,EAAUC,IAAXC,EAAA,GACML,EADN,CAEEM,IAAKV,EACLE,MAAOA,EACPC,OAAQA,EACRQ,QAAQ,YACRC,oBAAoB,SAGnBb,EAAMc,QAAUZ,eAAWI,EAAAC,cAAA,UAAA,CAASQ,OAAO,uCASlD,MAAMC,EAAOnB","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./packages/react/arrow/src/Arrow.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$reexport(e, n, v) {\n Object.defineProperty(e, n, {get: v, enumerable: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\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":["dest","source","a","Object","keys","forEach","key","defineProperty","enumerable","get","__esModule","default","Arrow","React","forwardRef","props","forwardedRef","children","width","height","arrowProps","_react","createElement","Primitive","svg","_babelRuntimeHelpersExtends","ref","viewBox","preserveAspectRatio","asChild","points","Root"],"version":3,"file":"index.js.map"}
|
package/dist/index.module.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Primitive as e}from"@radix-ui/react-primitive";import*as r from"react";import t from"@babel/runtime/helpers/esm/extends";export const Arrow=/*#__PURE__*/r.forwardRef(((i
|
|
1
|
+
import{Primitive as e}from"@radix-ui/react-primitive";import*as r from"react";import t from"@babel/runtime/helpers/esm/extends";export const Arrow=/*#__PURE__*/r.forwardRef(((o,i)=>{const{children:n,width:s=10,height:m=5,...p}=o;/*#__PURE__*/return r.createElement(e.svg,t({},p,{ref:i,width:s,height:m,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),o.asChild?n:/*#__PURE__*/r.createElement("polygon",{points:"0,0 30,0 15,10"}))}));/*#__PURE__*/export const Root=Arrow;
|
|
2
2
|
//# sourceMappingURL=index.module.js.map
|
package/dist/index.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"uIAeA,MAAMA,mBAAQC,EAAMC,
|
|
1
|
+
{"mappings":"uIAeA,MAAMA,mBAAQC,EAAMC,YAAqC,CAACC,EAAOC,KAC/D,MAAMC,SAAEA,EAAFC,MAAYA,EAAQ,GAApBC,OAAwBA,EAAS,KAAMC,GAAeL,eAC5D,OACEM,EAAAC,cAACC,EAAUC,IAAXC,EAAA,GACML,EADN,CAEEM,IAAKV,EACLE,MAAOA,EACPC,OAAQA,EACRQ,QAAQ,YACRC,oBAAoB,SAGnBb,EAAMc,QAAUZ,eAAWI,EAAAC,cAAA,UAAA,CAASQ,OAAO,2CASlD,MAAMC,KAAOnB","sources":["./packages/react/arrow/src/Arrow.tsx"],"sourcesContent":["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","React","forwardRef","props","forwardedRef","children","width","height","arrowProps","_react","createElement","Primitive","svg","_babelRuntimeHelpersEsmExtends","ref","viewBox","preserveAspectRatio","asChild","points","Root"],"version":3,"file":"index.module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radix-ui/react-arrow",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,13 +13,11 @@
|
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"scripts": {
|
|
15
15
|
"clean": "rm -rf dist",
|
|
16
|
-
"prepublish": "yarn clean",
|
|
17
16
|
"version": "yarn version"
|
|
18
17
|
},
|
|
19
18
|
"dependencies": {
|
|
20
19
|
"@babel/runtime": "^7.13.10",
|
|
21
|
-
"@radix-ui/react-
|
|
22
|
-
"@radix-ui/react-primitive": "0.0.14"
|
|
20
|
+
"@radix-ui/react-primitive": "0.1.0"
|
|
23
21
|
},
|
|
24
22
|
"peerDependencies": {
|
|
25
23
|
"react": "^16.8 || ^17.0"
|