material-ui-popup-state
Advanced tools
Comparing version 5.1.1 to 5.1.2
@@ -21,14 +21,23 @@ "use strict"; | ||
var HoverMenu = /*#__PURE__*/React.forwardRef(function HoverMenu(props, ref) { | ||
var _props$slotProps4, _props$PaperProps; | ||
var paperSlotProps = React.useCallback( | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
function (ownerProps) { | ||
var _props$slotProps, _props$slotProps2, _props$slotProps3; | ||
var base = ((_props$slotProps = props.slotProps) === null || _props$slotProps === void 0 ? void 0 : _props$slotProps.paper) instanceof Function ? (_props$slotProps2 = props.slotProps) === null || _props$slotProps2 === void 0 ? void 0 : _props$slotProps2.paper(ownerProps) : (_props$slotProps3 = props.slotProps) === null || _props$slotProps3 === void 0 ? void 0 : _props$slotProps3.paper; | ||
return _objectSpread(_objectSpread({}, base), {}, { | ||
var _props$slotProps2, _props$PaperProps; | ||
var paperSlotProps = React.useMemo(function () { | ||
var _props$slotProps; | ||
var wrapped = (_props$slotProps = props.slotProps) === null || _props$slotProps === void 0 ? void 0 : _props$slotProps.paper; | ||
if (wrapped instanceof Function) { | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
return function (ownerProps) { | ||
var base = wrapped(ownerProps); | ||
return _objectSpread(_objectSpread({}, base), {}, { | ||
style: _objectSpread({ | ||
pointerEvents: 'auto' | ||
}, base === null || base === void 0 ? void 0 : base.style) | ||
}); | ||
}; | ||
} | ||
return _objectSpread(_objectSpread({}, wrapped), {}, { | ||
style: _objectSpread({ | ||
pointerEvents: 'auto' | ||
}, base === null || base === void 0 ? void 0 : base.style) | ||
}, wrapped === null || wrapped === void 0 ? void 0 : wrapped.style) | ||
}); | ||
}, [(_props$slotProps4 = props.slotProps) === null || _props$slotProps4 === void 0 ? void 0 : _props$slotProps4.paper]); | ||
}, [(_props$slotProps2 = props.slotProps) === null || _props$slotProps2 === void 0 ? void 0 : _props$slotProps2.paper]); | ||
return /*#__PURE__*/React.createElement(Menu, (0, _extends2["default"])({}, props, { | ||
@@ -35,0 +44,0 @@ ref: ref, |
@@ -21,14 +21,23 @@ "use strict"; | ||
var HoverPopover = /*#__PURE__*/React.forwardRef(function HoverPopover(props, ref) { | ||
var _props$slotProps4, _props$PaperProps; | ||
var paperSlotProps = React.useCallback( | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
function (ownerProps) { | ||
var _props$slotProps, _props$slotProps2, _props$slotProps3; | ||
var base = ((_props$slotProps = props.slotProps) === null || _props$slotProps === void 0 ? void 0 : _props$slotProps.paper) instanceof Function ? (_props$slotProps2 = props.slotProps) === null || _props$slotProps2 === void 0 ? void 0 : _props$slotProps2.paper(ownerProps) : (_props$slotProps3 = props.slotProps) === null || _props$slotProps3 === void 0 ? void 0 : _props$slotProps3.paper; | ||
return _objectSpread(_objectSpread({}, base), {}, { | ||
var _props$slotProps2, _props$PaperProps; | ||
var paperSlotProps = React.useMemo(function () { | ||
var _props$slotProps; | ||
var wrapped = (_props$slotProps = props.slotProps) === null || _props$slotProps === void 0 ? void 0 : _props$slotProps.paper; | ||
if (wrapped instanceof Function) { | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
return function (ownerProps) { | ||
var base = wrapped(ownerProps); | ||
return _objectSpread(_objectSpread({}, base), {}, { | ||
style: _objectSpread({ | ||
pointerEvents: 'auto' | ||
}, base === null || base === void 0 ? void 0 : base.style) | ||
}); | ||
}; | ||
} | ||
return _objectSpread(_objectSpread({}, wrapped), {}, { | ||
style: _objectSpread({ | ||
pointerEvents: 'auto' | ||
}, base === null || base === void 0 ? void 0 : base.style) | ||
}, wrapped === null || wrapped === void 0 ? void 0 : wrapped.style) | ||
}); | ||
}, [(_props$slotProps4 = props.slotProps) === null || _props$slotProps4 === void 0 ? void 0 : _props$slotProps4.paper]); | ||
}, [(_props$slotProps2 = props.slotProps) === null || _props$slotProps2 === void 0 ? void 0 : _props$slotProps2.paper]); | ||
return /*#__PURE__*/React.createElement(Popover, (0, _extends2["default"])({}, props, { | ||
@@ -35,0 +44,0 @@ ref: ref, |
{ | ||
"name": "material-ui-popup-state", | ||
"version": "5.1.1", | ||
"version": "5.1.2", | ||
"description": "easiest way to create menus, popovers, and poppers with material-ui", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
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
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
100568
1674