Socket
Socket
Sign inDemoInstall

@hig/flyout

Package Overview
Dependencies
Maintainers
6
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hig/flyout - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

21

build/index.es.js

@@ -1248,2 +1248,5 @@ import React, { useState, useEffect, useRef } from 'react';

const [open, setOpen] = useState(props.defaultOpen);
const [actionRect, setActionRect] = useState(undefined);
const [panelRect, setPanelRect] = useState(undefined);
const [pointerRect, setPointerRect] = useState(undefined);
const actionRef = useRef();

@@ -1253,2 +1256,15 @@ const panelRef = useRef();

const wrapperRef = useRef();
useEffect(() => {
if (actionRef.current) {
setActionRect(actionRef.current.getBoundingClientRect());
}
if (panelRef.current) {
setPanelRect(panelRef.current.getBoundingClientRect());
}
if (pointerRef.current) {
setPointerRect(pointerRef.current.getBoundingClientRect());
}
}, [actionRef.current, panelRef.current, pointerRef.current]);
/**

@@ -1265,9 +1281,6 @@ * @returns {Coordinates}

if (!actionRef.current || !panelRef.current || !pointerRef.current || typeof window === "undefined") {
if (!actionRect || !panelRect || !pointerRect || typeof window === "undefined") {
return DEFAULT_COORDINATES;
}
const actionRect = actionRef.current.getBoundingClientRect();
const panelRect = panelRef.current.getBoundingClientRect();
const pointerRect = pointerRef.current.getBoundingClientRect();
const viewportRect = window.document.documentElement.getBoundingClientRect();

@@ -1274,0 +1287,0 @@ const coordinates = getCoordinates({

@@ -1258,2 +1258,5 @@ 'use strict';

const [open, setOpen] = React.useState(props.defaultOpen);
const [actionRect, setActionRect] = React.useState(undefined);
const [panelRect, setPanelRect] = React.useState(undefined);
const [pointerRect, setPointerRect] = React.useState(undefined);
const actionRef = React.useRef();

@@ -1263,2 +1266,15 @@ const panelRef = React.useRef();

const wrapperRef = React.useRef();
React.useEffect(() => {
if (actionRef.current) {
setActionRect(actionRef.current.getBoundingClientRect());
}
if (panelRef.current) {
setPanelRect(panelRef.current.getBoundingClientRect());
}
if (pointerRef.current) {
setPointerRect(pointerRef.current.getBoundingClientRect());
}
}, [actionRef.current, panelRef.current, pointerRef.current]);
/**

@@ -1275,9 +1291,6 @@ * @returns {Coordinates}

if (!actionRef.current || !panelRef.current || !pointerRef.current || typeof window === "undefined") {
if (!actionRect || !panelRect || !pointerRect || typeof window === "undefined") {
return DEFAULT_COORDINATES;
}
const actionRect = actionRef.current.getBoundingClientRect();
const panelRect = panelRef.current.getBoundingClientRect();
const pointerRect = pointerRef.current.getBoundingClientRect();
const viewportRect = window.document.documentElement.getBoundingClientRect();

@@ -1284,0 +1297,0 @@ const coordinates = getCoordinates({

@@ -0,1 +1,8 @@

# [@hig/flyout-v2.1.2](https://github.com/Autodesk/hig/compare/@hig/flyout@2.1.1...@hig/flyout@2.1.2) (2022-04-14)
### Bug Fixes
* Updating the Flyout refs after rendering to show tooltip ([0a54812](https://github.com/Autodesk/hig/commit/0a54812))
# [@hig/flyout-v2.1.1](https://github.com/Autodesk/hig/compare/@hig/flyout@2.1.0...@hig/flyout@2.1.1) (2022-04-13)

@@ -2,0 +9,0 @@

2

package.json
{
"name": "@hig/flyout",
"version": "2.1.1",
"version": "2.1.2",
"description": "HIG Flyout",

@@ -5,0 +5,0 @@ "author": "Autodesk Inc.",

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