@radix-ui/react-portal
Advanced tools
Comparing version 0.1.2-rc.15 to 0.1.2-rc.16
@@ -9,8 +9,8 @@ import * as React from "react"; | ||
export const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>; | ||
export interface UnstablePortalProps { | ||
export interface UnstablePortalProps extends PrimitiveDivProps { | ||
container?: HTMLElement | null; | ||
} | ||
export const UnstablePortal: React.FC<UnstablePortalProps>; | ||
export const UnstablePortal: React.ForwardRefExoticComponent<UnstablePortalProps & React.RefAttributes<HTMLDivElement>>; | ||
export const Root: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,2 @@ | ||
var e,t,r=require("@radix-ui/react-primitive").Primitive,o=require("@radix-ui/react-use-layout-effect").useLayoutEffect,l=a(require("react-dom")),n=(e={},t=require("react"),Object.keys(t).forEach((function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})})),e),i=a(require("@babel/runtime/helpers/extends"));function a(e){return e&&e.__esModule?e.default:e}const u=/*#__PURE__*/n.forwardRef(((e,t)=>{var a,u;const{containerRef:d,style:c,...s}=e,b=null!==(a=null==d?void 0:d.current)&&void 0!==a?a:null===globalThis||void 0===globalThis||null===(u=globalThis.document)||void 0===u?void 0:u.body,[,f]=n.useState({});return o((()=>{f({})}),[]),b?/*#__PURE__*/l.createPortal(/*#__PURE__*/n.createElement(r.div,i({"data-radix-portal":""},s,{ref:t,style:b===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...c}:void 0})),b):null}));exports.Portal=u;const d=e=>{var t;const{container:r=(null===globalThis||void 0===globalThis||null===(t=globalThis.document)||void 0===t?void 0:t.body),children:o}=e;return r?/*#__PURE__*/l.createPortal(/*#__PURE__*/n.createElement(n.Fragment,null,o),r):null};exports.UnstablePortal=d;const c=u;exports.Root=c; | ||
var e,t,r=require("@radix-ui/react-primitive").Primitive,o=require("@radix-ui/react-use-layout-effect").useLayoutEffect,l=n(require("react-dom")),i=(e={},t=require("react"),Object.keys(t).forEach((function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})})),e),a=n(require("@babel/runtime/helpers/extends"));function n(e){return e&&e.__esModule?e.default:e}const u=/*#__PURE__*/i.forwardRef(((e,t)=>{var n,u;const{containerRef:d,style:c,...s}=e,f=null!==(n=null==d?void 0:d.current)&&void 0!==n?n:null===globalThis||void 0===globalThis||null===(u=globalThis.document)||void 0===u?void 0:u.body,[,b]=i.useState({});return o((()=>{b({})}),[]),f?/*#__PURE__*/l.createPortal(/*#__PURE__*/i.createElement(r.div,a({"data-radix-portal":""},s,{ref:t,style:f===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...c}:void 0})),f):null}));exports.Portal=u;const d=/*#__PURE__*/i.forwardRef(((e,t)=>{var o;const{container:n=(null===globalThis||void 0===globalThis||null===(o=globalThis.document)||void 0===o?void 0:o.body),...u}=e;return n?/*#__PURE__*/l.createPortal(/*#__PURE__*/i.createElement(r.div,a({},u,{ref:t})),n):null}));exports.UnstablePortal=d;const c=u;exports.Root=c; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import{Primitive as o}from"@radix-ui/react-primitive";import{useLayoutEffect as t}from"@radix-ui/react-use-layout-effect";import e from"react-dom";import*as r from"react";import l from"@babel/runtime/helpers/esm/extends";export const Portal=/*#__PURE__*/r.forwardRef(((a,i)=>{var n,d;const{containerRef:s,style:u,...c}=a,m=null!==(n=null==s?void 0:s.current)&&void 0!==n?n:null===globalThis||void 0===globalThis||null===(d=globalThis.document)||void 0===d?void 0:d.body,[,b]=r.useState({});return t((()=>{b({})}),[]),m?/*#__PURE__*/e.createPortal(/*#__PURE__*/r.createElement(o.div,l({"data-radix-portal":""},c,{ref:i,style:m===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...u}:void 0})),m):null}));/*#__PURE__*/export const UnstablePortal=o=>{var t;const{container:l=(null===globalThis||void 0===globalThis||null===(t=globalThis.document)||void 0===t?void 0:t.body),children:a}=o;return l?/*#__PURE__*/e.createPortal(/*#__PURE__*/r.createElement(r.Fragment,null,a),l):null};/*#__PURE__*/export const Root=Portal; | ||
import{Primitive as o}from"@radix-ui/react-primitive";import{useLayoutEffect as t}from"@radix-ui/react-use-layout-effect";import e from"react-dom";import*as r from"react";import l from"@babel/runtime/helpers/esm/extends";export const Portal=/*#__PURE__*/r.forwardRef(((a,i)=>{var n,d;const{containerRef:s,style:u,...c}=a,m=null!==(n=null==s?void 0:s.current)&&void 0!==n?n:null===globalThis||void 0===globalThis||null===(d=globalThis.document)||void 0===d?void 0:d.body,[,f]=r.useState({});return t((()=>{f({})}),[]),m?/*#__PURE__*/e.createPortal(/*#__PURE__*/r.createElement(o.div,l({"data-radix-portal":""},c,{ref:i,style:m===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...u}:void 0})),m):null}));/*#__PURE__*/export const UnstablePortal=/*#__PURE__*/r.forwardRef(((t,a)=>{var i;const{container:n=(null===globalThis||void 0===globalThis||null===(i=globalThis.document)||void 0===i?void 0:i.body),...d}=t;return n?/*#__PURE__*/e.createPortal(/*#__PURE__*/r.createElement(o.div,l({},d,{ref:a})),n):null}));/*#__PURE__*/export const Root=Portal; | ||
//# sourceMappingURL=index.module.js.map |
{ | ||
"name": "@radix-ui/react-portal", | ||
"version": "0.1.2-rc.15", | ||
"version": "0.1.2-rc.16", | ||
"license": "MIT", | ||
@@ -20,3 +20,3 @@ "source": "src/index.ts", | ||
"@babel/runtime": "^7.13.10", | ||
"@radix-ui/react-primitive": "0.1.2-rc.2", | ||
"@radix-ui/react-primitive": "0.1.2-rc.3", | ||
"@radix-ui/react-use-layout-effect": "0.1.0" | ||
@@ -23,0 +23,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15672
26
+ Added@radix-ui/react-primitive@0.1.2-rc.3(transitive)
+ Added@radix-ui/react-slot@0.1.2-rc.3(transitive)
- Removed@radix-ui/react-primitive@0.1.2-rc.2(transitive)
- Removed@radix-ui/react-slot@0.1.2-rc.2(transitive)