@radix-ui/react-portal 1.0.3 → 1.0.4-rc.2
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.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -3,6 +3,9 @@ import * as Radix from "@radix-ui/react-primitive";
|
|
|
3
3
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
4
|
type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
5
5
|
export interface PortalProps extends PrimitiveDivProps {
|
|
6
|
+
/**
|
|
7
|
+
* An optional container where the portaled content should be appended.
|
|
8
|
+
*/
|
|
6
9
|
container?: HTMLElement | null;
|
|
7
10
|
}
|
|
8
11
|
export const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ import * as Radix from "@radix-ui/react-primitive";
|
|
|
3
3
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
4
|
type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
5
5
|
export interface PortalProps extends PrimitiveDivProps {
|
|
6
|
+
/**
|
|
7
|
+
* An optional container where the portaled content should be appended.
|
|
8
|
+
*/
|
|
6
9
|
container?: HTMLElement | null;
|
|
7
10
|
}
|
|
8
11
|
export const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;AAaA,yBAAyB,MAAM,wBAAwB,CAAC,OAAO,UAAU,GAAG,CAAC,CAAC;AAC9E,4BAAsB,SAAQ,iBAAiB;IAC7C,SAAS,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CAChC;AAED,OAAA,MAAM,0FAKJ,CAAC;AAMH,OAAA,MAAM,wFAAa,CAAC","sources":["packages/react/portal/src/packages/react/portal/src/Portal.tsx","packages/react/portal/src/packages/react/portal/src/index.ts","packages/react/portal/src/index.ts"],"sourcesContent":[null,null,"export {\n Portal,\n //\n Root,\n} from './Portal';\nexport type { PortalProps } from './Portal';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
|
|
1
|
+
{"mappings":";;;AAaA,yBAAyB,MAAM,wBAAwB,CAAC,OAAO,UAAU,GAAG,CAAC,CAAC;AAC9E,4BAAsB,SAAQ,iBAAiB;IAC7C;;OAEG;IACH,SAAS,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CAChC;AAED,OAAA,MAAM,0FAKJ,CAAC;AAMH,OAAA,MAAM,wFAAa,CAAC","sources":["packages/react/portal/src/packages/react/portal/src/Portal.tsx","packages/react/portal/src/packages/react/portal/src/index.ts","packages/react/portal/src/index.ts"],"sourcesContent":[null,null,"export {\n Portal,\n //\n Root,\n} from './Portal';\nexport type { PortalProps } from './Portal';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;A;;;;ACMA;;oGAEA,CAEA,MAAMK,iCAAW,GAAG,QAApB,AAAA;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;A;;;;ACMA;;oGAEA,CAEA,MAAMK,iCAAW,GAAG,QAApB,AAAA;AAWA,MAAML,yCAAM,GAAA,aAAGE,CAAAA,uBAAA,CAA6C,CAACK,KAAD,EAAQC,YAAR,GAAyB;IAAA,IAAA,oBAAA,AAAA;IACnF,MAAM,aAAEC,SAAS,GAAGC,UAAH,KAAA,IAAA,IAAGA,UAAH,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,AAAA,CAAA,oBAAA,GAAGA,UAAU,CAAEC,QAAf,CAAA,KAAA,IAAA,IAAA,oBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAG,oBAAA,CAAsBC,IAApC,GAA0C,GAAGC,WAAH,EAA1C,GAA6DN,KAAnE,AAAM;IACN,OAAOE,SAAS,GAAA,aACZN,CAAAA,yCAAQ,CAACW,YAAT,CAAA,aAAsB,CAAA,0BAAA,CAAC,sCAAD,CAAW,GAAX,EAAA,2DAAA,CAAA,EAAA,EAAmBD,WAAnB,EAD1B;QAC0D,GAAG,EAAEL,YAAL;KAAhC,CAAA,CAAtB,EAA6EC,SAA7E,CADY,GAEZ,IAFJ,CAC0B;CAHb,CAAf,AAKC;AAED,aAAA,CAAA,MAAA,CAAA,MAAA,CAAA,yCAAA,EAAA;IAAA,WAAA,EAAA,iCAAA;CAAA,CAAA,CAAA;AAEA,oGAAA,CAEA,MAAMR,yCAAI,GAAGD,yCAAb,AAAA;;ADhCA","sources":["packages/react/portal/src/index.ts","packages/react/portal/src/Portal.tsx"],"sourcesContent":["export {\n Portal,\n //\n Root,\n} from './Portal';\nexport type { PortalProps } from './Portal';\n","import * as React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type * as Radix from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Portal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'Portal';\n\ntype PortalElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface PortalProps extends PrimitiveDivProps {\n /**\n * An optional container where the portaled content should be appended.\n */\n container?: HTMLElement | null;\n}\n\nconst Portal = React.forwardRef<PortalElement, PortalProps>((props, forwardedRef) => {\n const { container = globalThis?.document?.body, ...portalProps } = props;\n return container\n ? ReactDOM.createPortal(<Primitive.div {...portalProps} ref={forwardedRef} />, container)\n : null;\n});\n\nPortal.displayName = PORTAL_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Portal;\n\nexport {\n Portal,\n //\n Root,\n};\nexport type { PortalProps };\n"],"names":["Portal","Root","React","ReactDOM","Primitive","PORTAL_NAME","forwardRef","props","forwardedRef","container","globalThis","document","body","portalProps","createPortal"],"version":3,"file":"index.js.map"}
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;A;;;;ACMA;;oGAEA,CAEA,MAAMK,iCAAW,GAAG,QAApB,AAAA;
|
|
1
|
+
{"mappings":";;;;;A;;;;ACMA;;oGAEA,CAEA,MAAMK,iCAAW,GAAG,QAApB,AAAA;AAWA,MAAML,yCAAM,GAAA,aAAGE,CAAAA,iBAAA,CAA6C,CAACK,KAAD,EAAQC,YAAR,GAAyB;IAAA,IAAA,oBAAA,AAAA;IACnF,MAAM,aAAEC,SAAS,GAAGC,UAAH,KAAA,IAAA,IAAGA,UAAH,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,AAAA,CAAA,oBAAA,GAAGA,UAAU,CAAEC,QAAf,CAAA,KAAA,IAAA,IAAA,oBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAG,oBAAA,CAAsBC,IAApC,GAA0C,GAAGC,WAAH,EAA1C,GAA6DN,KAAnE,AAAM;IACN,OAAOE,SAAS,GAAA,aACZN,CAAAA,eAAQ,CAACW,YAAT,CAAA,aAAsB,CAAA,oBAAA,CAAC,gBAAD,CAAW,GAAX,EAAA,oCAAA,CAAA,EAAA,EAAmBD,WAAnB,EAD1B;QAC0D,GAAG,EAAEL,YAAL;KAAhC,CAAA,CAAtB,EAA6EC,SAA7E,CADY,GAEZ,IAFJ,CAC0B;CAHb,CAAf,AAKC;AAED,aAAA,CAAA,MAAA,CAAA,MAAA,CAAA,yCAAA,EAAA;IAAA,WAAA,EAAA,iCAAA;CAAA,CAAA,CAAA;AAEA,oGAAA,CAEA,MAAMR,yCAAI,GAAGD,yCAAb,AAAA;;ADhCA","sources":["packages/react/portal/src/index.ts","packages/react/portal/src/Portal.tsx"],"sourcesContent":["export {\n Portal,\n //\n Root,\n} from './Portal';\nexport type { PortalProps } from './Portal';\n","import * as React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type * as Radix from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Portal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'Portal';\n\ntype PortalElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface PortalProps extends PrimitiveDivProps {\n /**\n * An optional container where the portaled content should be appended.\n */\n container?: HTMLElement | null;\n}\n\nconst Portal = React.forwardRef<PortalElement, PortalProps>((props, forwardedRef) => {\n const { container = globalThis?.document?.body, ...portalProps } = props;\n return container\n ? ReactDOM.createPortal(<Primitive.div {...portalProps} ref={forwardedRef} />, container)\n : null;\n});\n\nPortal.displayName = PORTAL_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Portal;\n\nexport {\n Portal,\n //\n Root,\n};\nexport type { PortalProps };\n"],"names":["Portal","Root","React","ReactDOM","Primitive","PORTAL_NAME","forwardRef","props","forwardedRef","container","globalThis","document","body","portalProps","createPortal"],"version":3,"file":"index.mjs.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radix-ui/react-portal",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4-rc.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -52,5 +52,6 @@
|
|
|
52
52
|
},
|
|
53
53
|
"bugs": {
|
|
54
54
|
"url": "https://github.com/radix-ui/primitives/issues"
|
|
55
|
-
}
|
|
55
|
+
},
|
|
56
|
+
"stableVersion": "1.0.3"
|
|
56
57
|
}
|