@radix-ui/react-primitive 0.1.3-rc.1 → 0.1.4-rc.3
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.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 -2
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"A;AAGA,QAAA,MAAM,gGAaI,CAAC;AAKX,qBAAqB,CAAC,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,KAAK,SAAS,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC7G,qCAA8B,CAAC,SAAS,MAAM,WAAW,IAAI,gBAC3D,MAAM,cAAc,CAAC,CAAC,CAAC,CACxB,CAAC;AAEF,kBAAkB;KAAG,CAAC,IAAI,YAAY,CAAC,MAAM,CAAC,GAAG,6BAA6B,CAAC,CAAC;CAAE,CAAC;AACnF,kCAA2B,CAAC,SAAS,MAAM,WAAW,IAAI,MAAM,qBAAqB,CAAC,CAAC,CAAC,GAAG;IACzF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,uCAAuC,CAAC,SAAS,MAAM,WAAW,CAChE,SAAQ,KAAK,CAAC,yBAAyB,CAAC,sBAAsB,CAAC,CAAC,CAAC;CAAG;AAMtE,OAAA,MAAM,
|
|
1
|
+
{"mappings":"A;AAGA,QAAA,MAAM,gGAaI,CAAC;AAKX,qBAAqB,CAAC,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,KAAK,SAAS,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC7G,qCAA8B,CAAC,SAAS,MAAM,WAAW,IAAI,gBAC3D,MAAM,cAAc,CAAC,CAAC,CAAC,CACxB,CAAC;AAEF,kBAAkB;KAAG,CAAC,IAAI,YAAY,CAAC,MAAM,CAAC,GAAG,6BAA6B,CAAC,CAAC;CAAE,CAAC;AACnF,kCAA2B,CAAC,SAAS,MAAM,WAAW,IAAI,MAAM,qBAAqB,CAAC,CAAC,CAAC,GAAG;IACzF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,uCAAuC,CAAC,SAAS,MAAM,WAAW,CAChE,SAAQ,KAAK,CAAC,yBAAyB,CAAC,sBAAsB,CAAC,CAAC,CAAC;CAAG;AAMtE,OAAA,MAAM,qBAoBL,CAAC;AAMF,OAAA,MAAM,gBAAgB,CAAC","sources":["./packages/react/primitive/src/packages/react/primitive/src/Primitive.tsx","./packages/react/primitive/src/packages/react/primitive/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,o=require("@radix-ui/react-slot").Slot,i=(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),u=(t=require("@babel/runtime/helpers/extends"))&&t.__esModule?t.default:t;const n=["a","button","div","h2","h3","img","li","nav","p","span","svg","ul"].reduce(((e,r)=>({...e,[r]:/*#__PURE__*/i.forwardRef(((e,t)=>{const{asChild:n,...a}=e,s=n?o:r;return i.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),/*#__PURE__*/i.createElement(s,u({},a,{ref:t}))}))})),{});exports.Primitive=n;const a=n;exports.Root=a;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"IAYgCA,EAAMC,EAZNC,4CAYAF,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,ECEzC,MAmCMU,EAnCQ,CACZ,IACA,SACA,MACA,KACA,KACA,MACA,KACA,MACA,IACA,OACA,MACA,MAuBsBC,QACtB,CAACC,EAAWC,KAAZ,IACKD,EACHC,CAACA,gBAAOC,EAAMC,YAAW,CAACC,EAA2CC,KACnE,MAAMC,QAAEA,KAAYC,GAAmBH,EACjCI,EAAYF,EAAUG,EAAOR,
|
|
1
|
+
{"mappings":"IAYgCA,EAAMC,EAZNC,4CAYAF,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,ECEzC,MAmCMU,EAnCQ,CACZ,IACA,SACA,MACA,KACA,KACA,MACA,KACA,MACA,IACA,OACA,MACA,MAuBsBC,QACtB,CAACC,EAAWC,KAAZ,IACKD,EACHC,CAACA,gBAAOC,EAAMC,YAAW,CAACC,EAA2CC,KACnE,MAAMC,QAAEA,KAAYC,GAAmBH,EACjCI,EAAYF,EAAUG,EAAOR,EAWnC,OATAC,EAAMQ,WAAU,KACbC,OAAeC,OAAOC,IAAI,cAAe,IACzC,iBAOIC,EAAAC,cAACP,EAADQ,EAAA,GAAUT,EAAV,CAA0BU,IAAKZ,WAG1C,wBAKF,MAEMa,EAAOpB","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./packages/react/primitive/src/Primitive.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 { Slot } from '@radix-ui/react-slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'h2',\n 'h3',\n 'img',\n 'li',\n 'nav',\n 'p',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\n// Temporary while we await merge of this fix:\n// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396\n// prettier-ignore\ntype PropsWithoutRef<P> = P extends any ? ('ref' extends keyof P ? Pick<P, Exclude<keyof P, 'ref'>> : P) : P;\ntype ComponentPropsWithoutRef<T extends React.ElementType> = PropsWithoutRef<\n React.ComponentProps<T>\n>;\n\ntype Primitives = { [E in typeof NODES[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce(\n (primitive, node) => ({\n ...primitive,\n [node]: React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n React.useEffect(() => {\n (window as any)[Symbol.for('radix-ui')] = true;\n }, []);\n\n // DEPRECATED\n if (process.env.NODE_ENV === 'development' && (props as any).as) {\n console.warn(AS_ERROR);\n }\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n }),\n }),\n {} as Primitives\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst AS_ERROR = `Warning: The \\`as\\` prop has been removed in favour of \\`asChild\\`. For details, see https://radix-ui.com/docs/primitives/overview/styling#changing-the-rendered-element`;\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n};\nexport type { ComponentPropsWithoutRef, PrimitivePropsWithRef };\n"],"names":["dest","source","a","Object","keys","forEach","key","defineProperty","enumerable","get","__esModule","default","Primitive","reduce","primitive","node","React","forwardRef","props","forwardedRef","asChild","primitiveProps","Comp","Slot","useEffect","window","Symbol","for","_react","createElement","_babelRuntimeHelpersExtends","ref","Root"],"version":3,"file":"index.js.map"}
|
package/dist/index.module.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Slot as e}from"@radix-ui/react-slot";import*as r from"react";import
|
|
1
|
+
import{Slot as e}from"@radix-ui/react-slot";import*as r from"react";import t from"@babel/runtime/helpers/esm/extends";export const Primitive=["a","button","div","h2","h3","img","li","nav","p","span","svg","ul"].reduce(((i,o)=>({...i,[o]:/*#__PURE__*/r.forwardRef(((i,m)=>{const{asChild:a,...s}=i,n=a?e:o;return r.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),/*#__PURE__*/r.createElement(n,t({},s,{ref:m}))}))})),{});export const Root=Primitive;
|
|
2
2
|
//# sourceMappingURL=index.module.js.map
|
package/dist/index.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"6HAsCA,MAAMA,UAnCQ,CACZ,IACA,SACA,MACA,KACA,KACA,MACA,KACA,MACA,IACA,OACA,MACA,MAuBsBC,QACtB,CAACC,EAAWC,KAAZ,IACKD,EACHC,CAACA,gBAAOC,EAAMC,YAAW,CAACC,EAA2CC,KACnE,MAAMC,QAAEA,KAAYC,GAAmBH,EACjCI,EAAYF,EAAUG,EAAOR,
|
|
1
|
+
{"mappings":"6HAsCA,MAAMA,UAnCQ,CACZ,IACA,SACA,MACA,KACA,KACA,MACA,KACA,MACA,IACA,OACA,MACA,MAuBsBC,QACtB,CAACC,EAAWC,KAAZ,IACKD,EACHC,CAACA,gBAAOC,EAAMC,YAAW,CAACC,EAA2CC,KACnE,MAAMC,QAAEA,KAAYC,GAAmBH,EACjCI,EAAYF,EAAUG,EAAOR,EAWnC,OATAC,EAAMQ,WAAU,KACbC,OAAeC,OAAOC,IAAI,cAAe,IACzC,iBAOIC,EAAAC,cAACP,EAADQ,EAAA,GAAUT,EAAV,CAA0BU,IAAKZ,WAG1C,WAOF,MAAMa,KAAOpB","sources":["./packages/react/primitive/src/Primitive.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'h2',\n 'h3',\n 'img',\n 'li',\n 'nav',\n 'p',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\n// Temporary while we await merge of this fix:\n// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396\n// prettier-ignore\ntype PropsWithoutRef<P> = P extends any ? ('ref' extends keyof P ? Pick<P, Exclude<keyof P, 'ref'>> : P) : P;\ntype ComponentPropsWithoutRef<T extends React.ElementType> = PropsWithoutRef<\n React.ComponentProps<T>\n>;\n\ntype Primitives = { [E in typeof NODES[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce(\n (primitive, node) => ({\n ...primitive,\n [node]: React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n React.useEffect(() => {\n (window as any)[Symbol.for('radix-ui')] = true;\n }, []);\n\n // DEPRECATED\n if (process.env.NODE_ENV === 'development' && (props as any).as) {\n console.warn(AS_ERROR);\n }\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n }),\n }),\n {} as Primitives\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst AS_ERROR = `Warning: The \\`as\\` prop has been removed in favour of \\`asChild\\`. For details, see https://radix-ui.com/docs/primitives/overview/styling#changing-the-rendered-element`;\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n};\nexport type { ComponentPropsWithoutRef, PrimitivePropsWithRef };\n"],"names":["Primitive","reduce","primitive","node","React","forwardRef","props","forwardedRef","asChild","primitiveProps","Comp","Slot","useEffect","window","Symbol","for","_react","createElement","_babelRuntimeHelpersEsmExtends","ref","Root"],"version":3,"file":"index.module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radix-ui/react-primitive",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4-rc.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"bugs": {
|
|
34
34
|
"url": "https://github.com/radix-ui/primitives/issues"
|
|
35
35
|
},
|
|
36
|
-
"stableVersion": "0.1.
|
|
36
|
+
"stableVersion": "0.1.3"
|
|
37
37
|
}
|