@interop-ui/react-portal
Advanced tools
Comparing version 0.0.1-17 to 0.2.0-rc.1
import * as React from "react"; | ||
type PortalProps = { | ||
children: React.ReactNode; | ||
import * as Radix from "@interop-ui/react-primitive"; | ||
import { Primitive } from "@interop-ui/react-primitive"; | ||
type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>; | ||
export interface PortalProps extends PrimitiveDivProps { | ||
containerRef?: React.RefObject<HTMLElement>; | ||
}; | ||
export const Portal: React.FC<PortalProps>; | ||
export const Root: React.FC<PortalProps>; | ||
} | ||
export const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>; | ||
export const Root: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,2 @@ | ||
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; | ||
var e,t,r=require("@interop-ui/react-primitive").Primitive,o=require("@interop-ui/react-use-layout-effect").useLayoutEffect,i=n(require("react-dom")),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),l=n(require("@babel/runtime/helpers/extends"));function n(e){return e&&e.__esModule?e.default:e}const a=/*#__PURE__*/u.forwardRef(((e,t)=>{var n,a;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===(a=globalThis.document)||void 0===a?void 0:a.body,[,b]=u.useState({});return o((()=>{b({})}),[]),f?/*#__PURE__*/i.createPortal(/*#__PURE__*/u.createElement(r.div,l({"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=a;const d=a;exports.Root=d; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
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; | ||
import{Primitive as o}from"@interop-ui/react-primitive";import{useLayoutEffect as t}from"@interop-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(((i,a)=>{var n,d;const{containerRef:m,style:s,...u}=i,c=null!==(n=null==m?void 0:m.current)&&void 0!==n?n:null===globalThis||void 0===globalThis||null===(d=globalThis.document)||void 0===d?void 0:d.body,[,p]=r.useState({});return t((()=>{p({})}),[]),c?/*#__PURE__*/e.createPortal(/*#__PURE__*/r.createElement(o.div,l({"data-radix-portal":""},u,{ref:a,style:c===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...s}:void 0})),c):null}));/*#__PURE__*/export const Root=Portal; | ||
//# sourceMappingURL=index.module.js.map |
{ | ||
"name": "@interop-ui/react-portal", | ||
"version": "0.0.1-17", | ||
"version": "0.2.0-rc.1", | ||
"license": "MIT", | ||
@@ -15,17 +15,23 @@ "source": "src/index.ts", | ||
"scripts": { | ||
"build": "parcel build src/index.ts --no-cache", | ||
"clean": "rm -rf dist", | ||
"version": "yarn version", | ||
"prepublish": "yarn clean && yarn build" | ||
"version": "yarn version" | ||
}, | ||
"dependencies": { | ||
"@interop-ui/react-utils": "0.0.1-16" | ||
"@babel/runtime": "^7.13.10", | ||
"@interop-ui/react-primitive": "0.2.0-rc.1", | ||
"@interop-ui/react-use-layout-effect": "0.2.0-rc.1" | ||
}, | ||
"devDependencies": { | ||
"parcel": "^2.0.0-beta.1" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.8 || ^17.0", | ||
"react-dom": "^16.8 || ^17.0" | ||
} | ||
}, | ||
"homepage": "https://radix-ui.com/primitives", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/radix-ui/primitives.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/radix-ui/primitives/issues" | ||
}, | ||
"stableVersion": "0.1.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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
12391
0
1
2
0
5
+ Added@babel/runtime@^7.13.10
+ Added@babel/runtime@7.26.0(transitive)
+ Added@interop-ui/react-compose-refs@0.2.0-rc.1(transitive)
+ Added@interop-ui/react-primitive@0.2.0-rc.1(transitive)
+ Added@interop-ui/react-slot@0.2.0-rc.1(transitive)
+ Added@interop-ui/react-use-layout-effect@0.2.0-rc.1(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
- Removed@interop-ui/react-utils@0.0.1-16
- Removed@interop-ui/react-polymorphic@0.0.1-3(transitive)
- Removed@interop-ui/react-utils@0.0.1-16(transitive)
- Removed@interop-ui/utils@0.0.1-8(transitive)