Socket
Socket
Sign inDemoInstall

material-ui-popup-state

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

material-ui-popup-state - npm Package Compare versions

Comparing version 1.9.1 to 1.9.2

25

core.js

@@ -47,2 +47,3 @@ "use strict";

hovered: false,
focused: false,
_childPopupState: null,

@@ -65,2 +66,3 @@ _deferNextOpen: false,

hovered = state.hovered,
focused = state.focused,
_childPopupState = state._childPopupState,

@@ -114,3 +116,4 @@ _deferNextOpen = state._deferNextOpen,

isOpen: true,
hovered: eventType === 'mouseover'
hovered: eventType === 'mouseover',
focused: eventType === 'focus'
};

@@ -142,7 +145,12 @@

if (eventType === 'touchstart') {
setState({
_deferNextClose: true
});
return;
switch (eventType) {
case 'touchstart':
setState({
_deferNextClose: true
});
return;
case 'blur':
if (isElementInPopup(arg === null || arg === void 0 ? void 0 : arg.relatedTarget, popupState)) return;
break;
}

@@ -155,3 +163,4 @@

isOpen: false,
hovered: false
hovered: false,
focused: false
});

@@ -202,3 +211,3 @@ };

onMouseLeave: onMouseLeave,
disableAutoFocus: Boolean(disableAutoFocus),
disableAutoFocus: disableAutoFocus !== null && disableAutoFocus !== void 0 ? disableAutoFocus : Boolean(hovered || focused),
_childPopupState: _childPopupState,

@@ -205,0 +214,0 @@ _setChildPopupState: _setChildPopupState

@@ -38,2 +38,3 @@ "use strict";

hovered: false,
focused: false,
_childPopupState: null,

@@ -58,2 +59,3 @@ _deferNextOpen: false,

hovered,
focused,
_childPopupState,

@@ -110,3 +112,4 @@ _deferNextOpen,

isOpen: true,
hovered: eventType === 'mouseover'
hovered: eventType === 'mouseover',
focused: eventType === 'focus'
};

@@ -138,7 +141,12 @@

if (eventType === 'touchstart') {
setState({
_deferNextClose: true
});
return;
switch (eventType) {
case 'touchstart':
setState({
_deferNextClose: true
});
return;
case 'blur':
if (isElementInPopup(arg === null || arg === void 0 ? void 0 : arg.relatedTarget, popupState)) return;
break;
}

@@ -151,3 +159,4 @@

isOpen: false,
hovered: false
hovered: false,
focused: false
});

@@ -196,3 +205,3 @@ };

onMouseLeave,
disableAutoFocus: Boolean(disableAutoFocus),
disableAutoFocus: disableAutoFocus !== null && disableAutoFocus !== void 0 ? disableAutoFocus : Boolean(hovered || focused),
_childPopupState,

@@ -199,0 +208,0 @@ _setChildPopupState

{
"name": "material-ui-popup-state",
"version": "1.9.1",
"version": "1.9.2",
"description": "easiest way to create menus, popovers, and poppers with material-ui",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -277,4 +277,3 @@ # material-ui-popup-state

You should use this option if you are doing `bindHover`. Otherwise the document may scroll back to the previous focused
element when you move the pointer out of the hovered menu or popover.
Defaults to `true` when the popup is opened by the `bindHover` or `bindFocus` element.

@@ -398,3 +397,3 @@ ## `usePopupState` return value

const HoverPopoverPopupState = ({ classes }) => (
<PopupState variant="popover" popupId="demoPopover" disableAutoFocus>
<PopupState variant="popover" popupId="demoPopover">
{(popupState) => (

@@ -552,3 +551,3 @@ <div>

You should use this option if you are doing `bindHover`. Otherwise the document may scroll back to the previous focused
Defaults to `true` when the popup is opened by the `bindHover` or `bindFocus` element.

@@ -555,0 +554,0 @@ ### `children` (`(popupState: InjectedProps) => ?React.Node`, **required**)

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