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

@yamada-ui/popover

Package Overview
Dependencies
Maintainers
1
Versions
1117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yamada-ui/popover - npm Package Compare versions

Comparing version 0.2.13 to 0.2.14

dist/chunk-7CXPXQPJ.mjs

29

dist/index.js

@@ -123,8 +123,8 @@ "use strict";

tabIndex: -1,
onKeyDown: (0, import_utils.handlerAll)(props2.onKeyDown, (event) => {
if (closeOnEsc && event.key === "Escape")
onKeyDown: (0, import_utils.handlerAll)(props2.onKeyDown, (ev) => {
if (closeOnEsc && ev.key === "Escape")
onClose();
}),
onBlur: (0, import_utils.handlerAll)(props2.onBlur, (event) => {
const relatedTarget = (0, import_utils.getEventRelatedTarget)(event);
onBlur: (0, import_utils.handlerAll)(props2.onBlur, (ev) => {
const relatedTarget = (0, import_utils.getEventRelatedTarget)(ev);
const targetIsPopover = (0, import_utils.isContains)(popoverRef.current, relatedTarget);

@@ -141,4 +141,4 @@ const targetIsTrigger = (0, import_utils.isContains)(triggerRef.current, relatedTarget);

});
popoverProps.onMouseLeave = (0, import_utils.handlerAll)(props2.onMouseLeave, (event) => {
if (event.nativeEvent.relatedTarget === null)
popoverProps.onMouseLeave = (0, import_utils.handlerAll)(props2.onMouseLeave, (ev) => {
if (ev.nativeEvent.relatedTarget === null)
return;

@@ -175,4 +175,11 @@ isHoveringRef.current = false;

};
if (trigger === "click")
if (trigger === "click") {
triggerProps.onClick = (0, import_utils.handlerAll)(props2.onClick, onToggle);
triggerProps.onBlur = (0, import_utils.handlerAll)(props2.onBlur, (ev) => {
const relatedTarget = (0, import_utils.getEventRelatedTarget)(ev);
const isValidBlur = !(0, import_utils.isContains)(popoverRef.current, relatedTarget);
if (isOpen && closeOnBlur && isValidBlur)
onClose();
});
}
if (trigger === "hover") {

@@ -183,4 +190,4 @@ triggerProps.onFocus = (0, import_utils.handlerAll)(props2.onFocus, () => {

});
triggerProps.onBlur = (0, import_utils.handlerAll)(props2.onBlur, (event) => {
const relatedTarget = (0, import_utils.getEventRelatedTarget)(event);
triggerProps.onBlur = (0, import_utils.handlerAll)(props2.onBlur, (ev) => {
const relatedTarget = (0, import_utils.getEventRelatedTarget)(ev);
const isValidBlur = !(0, import_utils.isContains)(popoverRef.current, relatedTarget);

@@ -190,4 +197,4 @@ if (isOpen && closeOnBlur && isValidBlur)

});
triggerProps.onKeyDown = (0, import_utils.handlerAll)(props2.onKeyDown, (event) => {
if (event.key === "Escape")
triggerProps.onKeyDown = (0, import_utils.handlerAll)(props2.onKeyDown, (ev) => {
if (ev.key === "Escape")
onClose();

@@ -194,0 +201,0 @@ });

@@ -115,8 +115,8 @@ "use strict";

tabIndex: -1,
onKeyDown: (0, import_utils.handlerAll)(props2.onKeyDown, (event) => {
if (closeOnEsc && event.key === "Escape")
onKeyDown: (0, import_utils.handlerAll)(props2.onKeyDown, (ev) => {
if (closeOnEsc && ev.key === "Escape")
onClose();
}),
onBlur: (0, import_utils.handlerAll)(props2.onBlur, (event) => {
const relatedTarget = (0, import_utils.getEventRelatedTarget)(event);
onBlur: (0, import_utils.handlerAll)(props2.onBlur, (ev) => {
const relatedTarget = (0, import_utils.getEventRelatedTarget)(ev);
const targetIsPopover = (0, import_utils.isContains)(popoverRef.current, relatedTarget);

@@ -133,4 +133,4 @@ const targetIsTrigger = (0, import_utils.isContains)(triggerRef.current, relatedTarget);

});
popoverProps.onMouseLeave = (0, import_utils.handlerAll)(props2.onMouseLeave, (event) => {
if (event.nativeEvent.relatedTarget === null)
popoverProps.onMouseLeave = (0, import_utils.handlerAll)(props2.onMouseLeave, (ev) => {
if (ev.nativeEvent.relatedTarget === null)
return;

@@ -167,4 +167,11 @@ isHoveringRef.current = false;

};
if (trigger === "click")
if (trigger === "click") {
triggerProps.onClick = (0, import_utils.handlerAll)(props2.onClick, onToggle);
triggerProps.onBlur = (0, import_utils.handlerAll)(props2.onBlur, (ev) => {
const relatedTarget = (0, import_utils.getEventRelatedTarget)(ev);
const isValidBlur = !(0, import_utils.isContains)(popoverRef.current, relatedTarget);
if (isOpen && closeOnBlur && isValidBlur)
onClose();
});
}
if (trigger === "hover") {

@@ -175,4 +182,4 @@ triggerProps.onFocus = (0, import_utils.handlerAll)(props2.onFocus, () => {

});
triggerProps.onBlur = (0, import_utils.handlerAll)(props2.onBlur, (event) => {
const relatedTarget = (0, import_utils.getEventRelatedTarget)(event);
triggerProps.onBlur = (0, import_utils.handlerAll)(props2.onBlur, (ev) => {
const relatedTarget = (0, import_utils.getEventRelatedTarget)(ev);
const isValidBlur = !(0, import_utils.isContains)(popoverRef.current, relatedTarget);

@@ -182,4 +189,4 @@ if (isOpen && closeOnBlur && isValidBlur)

});
triggerProps.onKeyDown = (0, import_utils.handlerAll)(props2.onKeyDown, (event) => {
if (event.key === "Escape")
triggerProps.onKeyDown = (0, import_utils.handlerAll)(props2.onKeyDown, (ev) => {
if (ev.key === "Escape")
onClose();

@@ -186,0 +193,0 @@ });

{
"name": "@yamada-ui/popover",
"version": "0.2.13",
"version": "0.2.14",
"description": "Yamada UI popover component",

@@ -43,3 +43,3 @@ "keywords": [

"@yamada-ui/motion": "0.3.8",
"@yamada-ui/use-popper": "0.2.10",
"@yamada-ui/use-popper": "0.3.0",
"@yamada-ui/use-disclosure": "0.2.5",

@@ -46,0 +46,0 @@ "@yamada-ui/use-focus": "0.1.4",

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

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

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