Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@clayui/shared

Package Overview
Dependencies
Maintainers
0
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clayui/shared - npm Package Compare versions

Comparing version 3.116.0 to 3.119.0

3

lib/Overlay.d.ts

@@ -8,2 +8,3 @@ /**

children: React.ReactElement;
inert?: boolean;
isCloseOnInteractOutside?: boolean;

@@ -25,3 +26,3 @@ isKeyboardDismiss?: boolean;

*/
export declare function Overlay({ children, isCloseOnInteractOutside, isKeyboardDismiss, isModal, isOpen, menuClassName, menuRef, onClose, portalRef, suppress, triggerRef, }: Props): JSX.Element;
export declare function Overlay({ children, inert, isCloseOnInteractOutside, isKeyboardDismiss, isModal, isOpen, menuClassName, menuRef, onClose, portalRef, suppress, triggerRef, }: Props): JSX.Element;
export {};

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

var children = _ref.children,
inert = _ref.inert,
_ref$isCloseOnInterac = _ref.isCloseOnInteractOutside,

@@ -91,2 +92,7 @@ isCloseOnInteractOutside = _ref$isCloseOnInterac === void 0 ? false : _ref$isCloseOnInterac,

onInteractStart: function onInteractStart(event) {
if (unsuppressCallbackRef.current) {
unsuppressCallbackRef.current();
unsuppressCallbackRef.current = null;
}
if (overlayStack[overlayStack.length - 1] === menuRef && isModal) {

@@ -121,16 +127,17 @@ event.stopPropagation();

if (isModal && (0, _ariaHidden.supportsInert)()) {
if ((isModal || inert) && (0, _ariaHidden.supportsInert)()) {
unsuppressCallbackRef.current = (0, _ariaHidden.suppressOthers)(elements);
return function () {
if (unsuppressCallbackRef.current) {
unsuppressCallbackRef.current();
}
unsuppressCallbackRef.current = null;
};
} else {
return (0, _ariaHidden.hideOthers)(elements);
unsuppressCallbackRef.current = (0, _ariaHidden.hideOthers)(elements);
}
return function () {
if (unsuppressCallbackRef.current) {
unsuppressCallbackRef.current();
}
unsuppressCallbackRef.current = null;
};
}
}, [isModal, isOpen]);
}, [isModal, inert, isOpen]);
return /*#__PURE__*/_react.default.createElement(_Portal.ClayPortal, {

@@ -140,7 +147,5 @@ className: menuClassName,

}, isModal && /*#__PURE__*/_react.default.createElement("span", {
"aria-hidden": "true",
"data-focus-scope-start": "true",
tabIndex: 0
}), children, isModal && /*#__PURE__*/_react.default.createElement("span", {
"aria-hidden": "true",
"data-focus-scope-end": "true",

@@ -147,0 +152,0 @@ tabIndex: 0

{
"name": "@clayui/shared",
"version": "3.116.0",
"version": "3.119.0",
"description": "ClayShared component",

@@ -43,3 +43,3 @@ "license": "BSD-3-Clause",

],
"gitHead": "235780a282ba87864ce556f8004571af102ff165"
"gitHead": "d7bffea85cd618678d0481131fb20d09c70b725e"
}
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