Socket
Socket
Sign inDemoInstall

@reach/popover

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reach/popover - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

8

es/index.js

@@ -56,4 +56,4 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

return {
left: directionRight ? targetRect.right - popupRect.width + window.scrollX + "px" : targetRect.left + window.scrollX + "px",
top: directionUp ? targetRect.top - popupRect.height + window.scrollY + "px" : targetRect.top + targetRect.height + window.scrollY + "px"
left: directionRight ? targetRect.right - popupRect.width + window.pageXOffset + "px" : targetRect.left + window.pageXOffset + "px",
top: directionUp ? targetRect.top - popupRect.height + window.pageYOffset + "px" : targetRect.top + targetRect.height + window.pageYOffset + "px"
};

@@ -69,3 +69,3 @@ }

left: targetRect.left,
top: directionUp ? targetRect.top - popupRect.height + window.scrollY + "px" : targetRect.top + targetRect.height + window.scrollY + "px"
top: directionUp ? targetRect.top - popupRect.height + window.pageYOffset + "px" : targetRect.top + targetRect.height + window.pageYOffset + "px"
};

@@ -88,3 +88,3 @@ }

// left: collisions.right
// ? `${targetRect.right - popupRect.width + window.scrollX}px`
// ? `${targetRect.right - popupRect.width + window.pageXOffset}px`
// : collisions.left ? `` : ``

@@ -91,0 +91,0 @@ // };

@@ -73,4 +73,4 @@ "use strict";

return {
left: directionRight ? targetRect.right - popupRect.width + window.scrollX + "px" : targetRect.left + window.scrollX + "px",
top: directionUp ? targetRect.top - popupRect.height + window.scrollY + "px" : targetRect.top + targetRect.height + window.scrollY + "px"
left: directionRight ? targetRect.right - popupRect.width + window.pageXOffset + "px" : targetRect.left + window.pageXOffset + "px",
top: directionUp ? targetRect.top - popupRect.height + window.pageYOffset + "px" : targetRect.top + targetRect.height + window.pageYOffset + "px"
};

@@ -86,3 +86,3 @@ }

left: targetRect.left,
top: directionUp ? targetRect.top - popupRect.height + window.scrollY + "px" : targetRect.top + targetRect.height + window.scrollY + "px"
top: directionUp ? targetRect.top - popupRect.height + window.pageYOffset + "px" : targetRect.top + targetRect.height + window.pageYOffset + "px"
};

@@ -105,3 +105,3 @@ }

// left: collisions.right
// ? `${targetRect.right - popupRect.width + window.scrollX}px`
// ? `${targetRect.right - popupRect.width + window.pageXOffset}px`
// : collisions.left ? `` : ``

@@ -108,0 +108,0 @@ // };

{
"name": "@reach/popover",
"version": "0.0.0",
"version": "0.0.1",
"description": "Render a portal positioned relative to another element.",

@@ -15,3 +15,3 @@ "main": "index.js",

"@reach/rect": "^0.2.1",
"@reach/utils": "^0.2.2"
"@reach/utils": "^0.2.3"
},

@@ -18,0 +18,0 @@ "peerDependencies": {

@@ -52,7 +52,7 @@ import React, { useRef, forwardRef } from "react";

left: directionRight
? `${targetRect.right - popupRect.width + window.scrollX}px`
: `${targetRect.left + window.scrollX}px`,
? `${targetRect.right - popupRect.width + window.pageXOffset}px`
: `${targetRect.left + window.pageXOffset}px`,
top: directionUp
? `${targetRect.top - popupRect.height + window.scrollY}px`
: `${targetRect.top + targetRect.height + window.scrollY}px`
? `${targetRect.top - popupRect.height + window.pageYOffset}px`
: `${targetRect.top + targetRect.height + window.pageYOffset}px`
};

@@ -67,4 +67,4 @@ }

top: directionUp
? `${targetRect.top - popupRect.height + window.scrollY}px`
: `${targetRect.top + targetRect.height + window.scrollY}px`
? `${targetRect.top - popupRect.height + window.pageYOffset}px`
: `${targetRect.top + targetRect.height + window.pageYOffset}px`
};

@@ -87,3 +87,3 @@ }

// left: collisions.right
// ? `${targetRect.right - popupRect.width + window.scrollX}px`
// ? `${targetRect.right - popupRect.width + window.pageXOffset}px`
// : collisions.left ? `` : ``

@@ -90,0 +90,0 @@ // };

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