Socket
Socket
Sign inDemoInstall

@chakra-ui/popper

Package Overview
Dependencies
Maintainers
4
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/popper - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

11

CHANGELOG.md
# Change Log
## 2.2.1
### Patch Changes
- [`5afa7ef49`](https://github.com/chakra-ui/chakra-ui/commit/5afa7ef49c7e3b01bce932e252865226b9511b39)
[#4180](https://github.com/chakra-ui/chakra-ui/pull/4180) Thanks
[@segunadebayo](https://github.com/segunadebayo)! - - Wrap force update within
a function to prevent null scenarios
- Add default `inset` value to prevent overflow in scenarios where `enabled`
is `false` (i.e. when the popper is not visible)
## 2.2.0

@@ -4,0 +15,0 @@

17

dist/cjs/use-popper.js

@@ -25,4 +25,2 @@ "use strict";

function usePopper(props) {
var _instance$current2, _instance$current3;
if (props === void 0) {

@@ -146,3 +144,4 @@ props = {};

position: strategy,
minWidth: "max-content"
minWidth: "max-content",
inset: "0 auto auto 0"
})

@@ -188,4 +187,12 @@ });

return {
update: (_instance$current2 = instance.current) == null ? void 0 : _instance$current2.update,
forceUpdate: (_instance$current3 = instance.current) == null ? void 0 : _instance$current3.forceUpdate,
update: function update() {
var _instance$current2;
(_instance$current2 = instance.current) == null ? void 0 : _instance$current2.update();
},
forceUpdate: function forceUpdate() {
var _instance$current3;
(_instance$current3 = instance.current) == null ? void 0 : _instance$current3.forceUpdate();
},
transformOrigin: _utils.cssVars.transformOrigin.varRef,

@@ -192,0 +199,0 @@ referenceRef: referenceRef,

@@ -11,4 +11,2 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

export function usePopper(props) {
var _instance$current2, _instance$current3;
if (props === void 0) {

@@ -124,3 +122,4 @@ props = {};

position: strategy,
minWidth: "max-content"
minWidth: "max-content",
inset: "0 auto auto 0"
})

@@ -161,4 +160,14 @@ });

return {
update: (_instance$current2 = instance.current) == null ? void 0 : _instance$current2.update,
forceUpdate: (_instance$current3 = instance.current) == null ? void 0 : _instance$current3.forceUpdate,
update() {
var _instance$current2;
(_instance$current2 = instance.current) == null ? void 0 : _instance$current2.update();
},
forceUpdate() {
var _instance$current3;
(_instance$current3 = instance.current) == null ? void 0 : _instance$current3.forceUpdate();
},
transformOrigin: cssVars.transformOrigin.varRef,

@@ -165,0 +174,0 @@ referenceRef,

@@ -5,2 +5,5 @@ import { PropGetterV2 } from "@chakra-ui/react-utils";

export interface UsePopperProps {
/**
* Whether the popper.js should be enabled
*/
enabled?: boolean;

@@ -92,4 +95,4 @@ /**

export declare function usePopper(props?: UsePopperProps): {
update: (() => Promise<Partial<import("@popperjs/core").State>>) | undefined;
forceUpdate: (() => void) | undefined;
update(): void;
forceUpdate(): void;
transformOrigin: string;

@@ -96,0 +99,0 @@ referenceRef: <T extends Element | VirtualElement>(node: T | null) => void;

{
"name": "@chakra-ui/popper",
"version": "2.2.0",
"version": "2.2.1",
"description": "A React component and hooks wrapper for popper.js",

@@ -5,0 +5,0 @@ "keywords": [

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