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

@interop-ui/react-portal

Package Overview
Dependencies
Maintainers
4
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.0.1-14 to 0.0.1-15

2

dist/index.js

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

var r,t,e,n=require("@interop-ui/react-utils").useLayoutEffect,o=(r=require("react-dom"))&&r.__esModule?r.default:r,u=(t={},e=require("react"),Object.keys(e).forEach((function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})})),t);function a(r,t){return function(r){if(Array.isArray(r))return r}(r)||function(r,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(r)))return;var e=[],n=!0,o=!1,u=void 0;try{for(var a,i=r[Symbol.iterator]();!(n=(a=i.next()).done)&&(e.push(a.value),!t||e.length!==t);n=!0);}catch(r){o=!0,u=r}finally{try{n||null==i.return||i.return()}finally{if(o)throw u}}return e}(r,t)||function(r,t){if(!r)return;if("string"==typeof r)return i(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);"Object"===e&&r.constructor&&(e=r.constructor.name);if("Map"===e||"Set"===e)return Array.from(r);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(r,t)}(r,t)||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 i(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}var l=function(r){var t,e=r.children,i=r.containerRef,l=null!==(t=null==i?void 0:i.current)&&void 0!==t?t:document?document.body:void 0,c=a(u.useState({}),2)[1];if(n((function(){c({})}),[]),l){return o.createPortal(u.createElement("radix-portal",null,e),l)}return null};exports.Portal=l;var c=l;exports.Root=c;
var r,e,t,n=require("@interop-ui/react-utils").useLayoutEffect,o=(r=require("react-dom"))&&r.__esModule?r.default:r,u=(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);function a(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(r)))return;var t=[],n=!0,o=!1,u=void 0;try{for(var a,i=r[Symbol.iterator]();!(n=(a=i.next()).done)&&(t.push(a.value),!e||t.length!==e);n=!0);}catch(r){o=!0,u=r}finally{try{n||null==i.return||i.return()}finally{if(o)throw u}}return t}(r,e)||function(r,e){if(!r)return;if("string"==typeof r)return i(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(r,e)}(r,e)||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 i(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}var l=function(r){var e,t=r.children,i=r.containerRef,l=null!==(e=null==i?void 0:i.current)&&void 0!==e?e:"undefined"!=typeof document?document.body:void 0,c=a(u.useState({}),2)[1];if(n((function(){c({})}),[]),l){return o.createPortal(u.createElement("radix-portal",null,t),l)}return null};exports.Portal=l;var c=l;exports.Root=c;
//# sourceMappingURL=index.js.map

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

import{useLayoutEffect as t}from"@interop-ui/react-utils";import r from"react-dom";import*as o from"react";export const Portal=({children:e,containerRef:n})=>{var l;const a=null!==(l=null==n?void 0:n.current)&&void 0!==l?l:document?document.body:void 0,[,c]=o.useState({});if(t((()=>{c({})}),[]),a){const t="radix-portal";return r.createPortal(o.createElement(t,null,e),a)}return null};export const Root=Portal;
import{useLayoutEffect as t}from"@interop-ui/react-utils";import o from"react-dom";import*as r from"react";export const Portal=({children:e,containerRef:n})=>{var l;const a=null!==(l=null==n?void 0:n.current)&&void 0!==l?l:"undefined"!=typeof document?document.body:void 0,[,c]=r.useState({});if(t((()=>{c({})}),[]),a){const t="radix-portal";return o.createPortal(r.createElement(t,null,e),a)}return null};export const Root=Portal;
//# sourceMappingURL=index.module.js.map
{
"name": "@interop-ui/react-portal",
"version": "0.0.1-14",
"version": "0.0.1-15",
"license": "MIT",

@@ -20,3 +20,3 @@ "source": "src/index.ts",

"dependencies": {
"@interop-ui/react-utils": "0.0.1-14"
"@interop-ui/react-utils": "0.0.1-15"
},

@@ -23,0 +23,0 @@ "devDependencies": {

@@ -13,20 +13,2 @@ # `react-portal`

```js
import * as React from 'react';
import { Portal } from '@interop-ui/react-portal';
function MyComponent(props) {
return (
<div>
<h1>This content is rendered in the main DOM tree</h1>
<Portal>
<h1>This content is rendered in a portal (another DOM tree)</h1>
<p>
Because of the portal, it can appear in a different DOM tree from the content above (by
default, a new element inside the body), even though it is part of the same React tree.
</p>
</Portal>
</div>
);
}
```
View docs [here](https://radix-ui.com/primitives/docs/components/portal).

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

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