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

@tabula/ui-menu

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tabula/ui-menu - npm Package Compare versions

Comparing version 1.0.0-next.1 to 1.0.0-next.2

34

lib/index.js

@@ -24,2 +24,3 @@ // src/UiMenu/UiMenu.tsx

import clsx from "clsx";
import { stopEvent } from "@tabula/dom-utils";

@@ -30,29 +31,2 @@ // src/Divider/Divider.css.ts

// src/helpers.ts
function stopEvent(event) {
const options = event.currentTarget.dataset;
if (options.stopPropagation) {
event.stopPropagation();
}
if (options.preventDefault) {
event.preventDefault();
}
}
function isClickByButton(event) {
if (!(event.target instanceof Element)) {
throw new TypeError("Target must be an Element");
}
let current = event.target;
while (current !== event.currentTarget) {
if (current == null) {
return false;
}
if (current.tagName === "BUTTON") {
return true;
}
current = current.parentElement;
}
return false;
}
// src/Divider/Divider.tsx

@@ -71,2 +45,3 @@ import { jsx as jsx2 } from "react/jsx-runtime";

import clsx3 from "clsx";
import { stopEvent as stopEvent2 } from "@tabula/dom-utils";

@@ -127,3 +102,3 @@ // src/Item/Item.css.ts

(event) => {
stopEvent(event);
stopEvent2(event);
if (onSelect != null) {

@@ -195,2 +170,3 @@ onSelect(id);

} from "@floating-ui/react";
import { isButtonTarget } from "@tabula/dom-utils";
import { useFlag } from "@tabula/use-flag";

@@ -239,3 +215,3 @@ import { Fragment, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";

(event) => {
if (isClickByButton(event)) {
if (isButtonTarget(event)) {
onClose();

@@ -242,0 +218,0 @@ }

3

package.json
{
"name": "@tabula/ui-menu",
"version": "1.0.0-next.1",
"version": "1.0.0-next.2",
"description": "Menus display a list of actions or options that a user can choose",

@@ -49,2 +49,3 @@ "type": "module",

"clsx": "^2.1.0",
"@tabula/dom-utils": "^0.1.0-next.0",
"@tabula/use-flag": "^0.1.0-next.0"

@@ -51,0 +52,0 @@ },

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