Socket
Socket
Sign inDemoInstall

@reach/utils

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reach/utils - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

29

es/index.js

@@ -19,7 +19,7 @@ var checkedPkgs = {};

export var wrapEvent = function wrapEvent(handler, cb) {
export var wrapEvent = function wrapEvent(theirHandler, ourHandler) {
return function (event) {
handler && handler(event);
theirHandler && theirHandler(event);
if (!event.defaultPrevented) {
return cb(event);
return ourHandler(event);
}

@@ -40,23 +40,2 @@ };

}
};
// This suuuuuuuuuuuucks but I can't think of anything better rn, we could use
// a default React Context, but I don't see how that's any different.
//
// If a Tooltip wraps a MenuButton and the menu returns focus to the button it
// triggers the tooltip focus event and pops up the tooltip and that's gross
// and this is a run-on sentence. So, we've got this kind of global context
// for tooltip to know if it should respond to focus or not.
var ignoreTooltips = false;
export function disableTooltips() {
ignoreTooltips = true;
}
export function enableTooltips() {
ignoreTooltips = false;
}
export function shouldIgnoreTooltips() {
return ignoreTooltips;
}
};
"use strict";
exports.__esModule = true;
exports.disableTooltips = disableTooltips;
exports.enableTooltips = enableTooltips;
exports.shouldIgnoreTooltips = shouldIgnoreTooltips;
var checkedPkgs = {};

@@ -24,7 +21,7 @@

exports.checkStyles = checkStyles;
var wrapEvent = exports.wrapEvent = function wrapEvent(handler, cb) {
var wrapEvent = exports.wrapEvent = function wrapEvent(theirHandler, ourHandler) {
return function (event) {
handler && handler(event);
theirHandler && theirHandler(event);
if (!event.defaultPrevented) {
return cb(event);
return ourHandler(event);
}

@@ -45,23 +42,2 @@ };

}
};
// This suuuuuuuuuuuucks but I can't think of anything better rn, we could use
// a default React Context, but I don't see how that's any different.
//
// If a Tooltip wraps a MenuButton and the menu returns focus to the button it
// triggers the tooltip focus event and pops up the tooltip and that's gross
// and this is a run-on sentence. So, we've got this kind of global context
// for tooltip to know if it should respond to focus or not.
var ignoreTooltips = false;
function disableTooltips() {
ignoreTooltips = true;
}
function enableTooltips() {
ignoreTooltips = false;
}
function shouldIgnoreTooltips() {
return ignoreTooltips;
}
};

2

package.json
{
"name": "@reach/utils",
"version": "0.2.2",
"version": "0.2.3",
"description": "Internal, shared utilities for Reach UI.",

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

@@ -37,6 +37,6 @@ let checkedPkgs = {};

export let wrapEvent = (handler, cb) => event => {
handler && handler(event);
export let wrapEvent = (theirHandler, ourHandler) => event => {
theirHandler && theirHandler(event);
if (!event.defaultPrevented) {
return cb(event);
return ourHandler(event);
}

@@ -57,22 +57,1 @@ };

};
// This suuuuuuuuuuuucks but I can't think of anything better rn, we could use
// a default React Context, but I don't see how that's any different.
//
// If a Tooltip wraps a MenuButton and the menu returns focus to the button it
// triggers the tooltip focus event and pops up the tooltip and that's gross
// and this is a run-on sentence. So, we've got this kind of global context
// for tooltip to know if it should respond to focus or not.
let ignoreTooltips = false;
export function disableTooltips() {
ignoreTooltips = true;
}
export function enableTooltips() {
ignoreTooltips = false;
}
export function shouldIgnoreTooltips() {
return ignoreTooltips;
}
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