Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@radix-ui/react-portal

Package Overview
Dependencies
Maintainers
5
Versions
193
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radix-ui/react-portal - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

2

dist/index.js

@@ -1,2 +0,2 @@

var e,r,t,n=require("@radix-ui/react-primitive").Primitive,o=require("@radix-ui/react-use-layout-effect").useLayoutEffect,i=(e=require("react-dom"))&&e.__esModule?e.default:e,a=(r={},t=require("react"),Object.keys(t).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return t[e]}})})),r);function u(){return(u=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?l(Object(t),!0).forEach((function(r){f(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function f(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function y(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],n=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(n=(a=u.next()).done)&&(t.push(a.value),!r||t.length!==r);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return t}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return s(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function b(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var p=a.forwardRef((function(e,r){var t,l,f=e.containerRef,s=e.style,p=b(e,["containerRef","style"]),d=null!==(t=null==f?void 0:f.current)&&void 0!==t?t:null===globalThis||void 0===globalThis||null===(l=globalThis.document)||void 0===l?void 0:l.body,O=y(a.useState({}),2)[1];return o((function(){O({})}),[]),d?i.createPortal(a.createElement(n,u({"data-radix-portal":""},p,{ref:r,style:d===document.body?c({position:"absolute",top:0,left:0,zIndex:2147483647},s):void 0})),d):null}));exports.Portal=p,p.displayName="Portal";var d=p;exports.Root=d;
function e(e){return e&&e.__esModule?e.default:e}function r(e,r,t){Object.defineProperty(e,r,{get:t,enumerable:!0})}var t=require("@radix-ui/react-primitive").Primitive,o=require("@radix-ui/react-use-layout-effect").useLayoutEffect,i=e(require("react-dom")),l=require("react"),n=l.forwardRef,u=l.useState,a=l.createElement,s=e(require("@babel/runtime-corejs3/helpers/objectWithoutProperties")),c=e(require("@babel/runtime-corejs3/helpers/slicedToArray")),b=e(require("@babel/runtime-corejs3/helpers/defineProperty")),f=e(require("@babel/runtime-corejs3/helpers/extends"));require("core-js/modules/esnext.global-this.js");var j=e(require("@babel/runtime-corejs3/core-js-stable/object/define-property")),d=e(require("@babel/runtime-corejs3/core-js-stable/object/define-properties")),p=e(require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors")),m=e(require("@babel/runtime-corejs3/core-js-stable/instance/for-each")),v=e(require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor")),y=e(require("@babel/runtime-corejs3/core-js-stable/instance/filter")),q=e(require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols")),h=e(require("@babel/runtime-corejs3/core-js-stable/object/keys")),g={};function x(e,r){var t=h(e);if(q){var o=q(e);r&&(o=y(o).call(o,(function(r){return v(e,r).enumerable}))),t.push.apply(t,o)}return t}function P(e){for(var r=1;r<arguments.length;r++){var t,o=null!=arguments[r]?arguments[r]:{};if(r%2)m(t=x(Object(o),!0)).call(t,(function(r){b(e,r,o[r])}));else if(p)d(e,p(o));else{var i;m(i=x(Object(o))).call(i,(function(r){j(e,r,v(o,r))}))}}return e}var R=n((function(e,r){var l,n,b=e.containerRef,j=e.style,d=s(e,["containerRef","style"]),p=null!==(l=null==b?void 0:b.current)&&void 0!==l?l:null===globalThis||void 0===globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body,m=u({}),v=c(m,2)[1];return o((function(){v({})}),[]),p?i.createPortal(a(t,f({"data-radix-portal":""},d,{ref:r,style:p===document.body?P({position:"absolute",top:0,left:0,zIndex:2147483647},j):void 0})),p):null}));exports.Portal=R,R.displayName="Portal";var w=R;exports.Root=w,r(g,"Root",(function(){return w})),r(g,"Portal",(function(){return R}));
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import{Primitive as t}from"@radix-ui/react-primitive";import{useLayoutEffect as o}from"@radix-ui/react-use-layout-effect";import r from"react-dom";import*as e from"react";function a(){return(a=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t}).apply(this,arguments)}export const Portal=e.forwardRef(((l,i)=>{var n,c;const{containerRef:u,style:d,...s}=l,p=null!==(n=null==u?void 0:u.current)&&void 0!==n?n:null===globalThis||void 0===globalThis||null===(c=globalThis.document)||void 0===c?void 0:c.body,[,f]=e.useState({});return o((()=>{f({})}),[]),p?r.createPortal(e.createElement(t,a({"data-radix-portal":""},s,{ref:i,style:p===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...d}:void 0})),p):null}));Portal.displayName="Portal";export const Root=Portal;
function e(e,r,o){Object.defineProperty(e,r,{get:o,enumerable:!0})}import{Primitive as r}from"@radix-ui/react-primitive";import{useLayoutEffect as o}from"@radix-ui/react-use-layout-effect";import t from"react-dom";import{forwardRef as i,useState as l,createElement as n}from"react";import a from"@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";import s from"@babel/runtime-corejs3/helpers/esm/slicedToArray";import c from"@babel/runtime-corejs3/helpers/esm/defineProperty";import m from"@babel/runtime-corejs3/helpers/esm/extends";import"core-js/modules/esnext.global-this.js";import b from"@babel/runtime-corejs3/core-js-stable/object/define-property";import u from"@babel/runtime-corejs3/core-js-stable/object/define-properties";import p from"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";import f from"@babel/runtime-corejs3/core-js-stable/instance/for-each";import j from"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";import d from"@babel/runtime-corejs3/core-js-stable/instance/filter";import y from"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";import v from"@babel/runtime-corejs3/core-js-stable/object/keys";var h={};function P(e,r){var o=v(e);if(y){var t=y(e);r&&(t=d(t).call(t,(function(r){return j(e,r).enumerable}))),o.push.apply(o,t)}return o}function g(e){for(var r=1;r<arguments.length;r++){var o,t=null!=arguments[r]?arguments[r]:{};if(r%2)f(o=P(Object(t),!0)).call(o,(function(r){c(e,r,t[r])}));else if(p)u(e,p(t));else{var i;f(i=P(Object(t))).call(i,(function(r){b(e,r,j(t,r))}))}}return e}export var Portal=i((function(e,i){var c,b,u=e.containerRef,p=e.style,f=a(e,["containerRef","style"]),j=null!==(c=null==u?void 0:u.current)&&void 0!==c?c:null===globalThis||void 0===globalThis||null===(b=globalThis.document)||void 0===b?void 0:b.body,d=l({}),y=s(d,2)[1];return o((function(){y({})}),[]),j?t.createPortal(n(r,m({"data-radix-portal":""},f,{ref:i,style:j===document.body?g({position:"absolute",top:0,left:0,zIndex:2147483647},p):void 0})),j):null}));Portal.displayName="Portal";export var Root=Portal;e(h,"Root",(function(){return Root})),e(h,"Portal",(function(){return Portal}));
//# sourceMappingURL=index.module.js.map
{
"name": "@radix-ui/react-portal",
"version": "0.0.6",
"version": "0.0.7",
"license": "MIT",

@@ -16,8 +16,10 @@ "source": "src/index.ts",

"clean": "rm -rf dist",
"prepublish": "yarn clean"
"prepublish": "yarn clean",
"version": "yarn version"
},
"dependencies": {
"@radix-ui/react-polymorphic": "0.0.6",
"@radix-ui/react-primitive": "0.0.5",
"@radix-ui/react-use-layout-effect": "0.0.1"
"@babel/runtime-corejs3": "^7.13.10",
"@radix-ui/react-polymorphic": "0.0.7",
"@radix-ui/react-primitive": "0.0.7",
"@radix-ui/react-use-layout-effect": "0.0.2"
},

@@ -24,0 +26,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc