Socket
Socket
Sign inDemoInstall

@atlaskit/blanket

Package Overview
Dependencies
91
Maintainers
1
Versions
132
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 12.3.5 to 12.3.6

6

CHANGELOG.md
# @atlaskit/blanket
## 12.3.6
### Patch Changes
- [`a7e8a6c3ace`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a7e8a6c3ace) - Prevent onBlanketClick function firing on Blanket when mousedown event begins on Blanket children
## 12.3.5

@@ -4,0 +10,0 @@

9

dist/cjs/blanket.js

@@ -19,3 +19,3 @@ "use strict";

var packageName = "@atlaskit/blanket";
var packageVersion = "12.3.5";
var packageVersion = "12.3.6";
var analyticsAttributes = {

@@ -72,2 +72,3 @@ componentName: 'blanket',

mode = _useGlobalTheme.mode;
var mouseDownTarget = (0, _react.useRef)(null);
var onBlanketClickedWithAnalytics = (0, _usePlatformLeafEventHandler.usePlatformLeafEventHandler)(_objectSpread({

@@ -79,5 +80,8 @@ fn: onBlanketClicked,

var blanketClickOutsideChildren = (0, _react.useCallback)(function (e) {
return e.currentTarget === e.target ? onBlanketClickedWithAnalytics(e) : undefined;
return e.currentTarget === e.target && mouseDownTarget.current === e.target ? onBlanketClickedWithAnalytics(e) : undefined;
}, [onBlanketClickedWithAnalytics]);
var onClick = shouldAllowClickThrough ? undefined : blanketClickOutsideChildren;
var onMouseDown = (0, _react.useCallback)(function (e) {
mouseDownTarget.current = e.target;
}, []);
return (0, _react2.jsx)("div", {

@@ -87,2 +91,3 @@ role: "presentation",

onClick: onClick,
onMouseDown: onMouseDown,
"data-testid": testId,

@@ -89,0 +94,0 @@ ref: ref

{
"name": "@atlaskit/blanket",
"version": "12.3.5",
"version": "12.3.6",
"sideEffects": false
}
/** @jsx jsx */
import { forwardRef, memo, useCallback } from 'react';
import { forwardRef, memo, useCallback, useRef } from 'react';
import { css, jsx } from '@emotion/react';

@@ -10,3 +10,3 @@ import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';

const packageName = "@atlaskit/blanket";
const packageVersion = "12.3.5";
const packageVersion = "12.3.6";
const analyticsAttributes = {

@@ -62,2 +62,3 @@ componentName: 'blanket',

} = useGlobalTheme();
const mouseDownTarget = useRef(null);
const onBlanketClickedWithAnalytics = usePlatformLeafEventHandler({

@@ -69,4 +70,7 @@ fn: onBlanketClicked,

});
const blanketClickOutsideChildren = useCallback(e => e.currentTarget === e.target ? onBlanketClickedWithAnalytics(e) : undefined, [onBlanketClickedWithAnalytics]);
const blanketClickOutsideChildren = useCallback(e => e.currentTarget === e.target && mouseDownTarget.current === e.target ? onBlanketClickedWithAnalytics(e) : undefined, [onBlanketClickedWithAnalytics]);
const onClick = shouldAllowClickThrough ? undefined : blanketClickOutsideChildren;
const onMouseDown = useCallback(e => {
mouseDownTarget.current = e.target;
}, []);
return jsx("div", {

@@ -76,2 +80,3 @@ role: "presentation",

onClick: onClick,
onMouseDown: onMouseDown,
"data-testid": testId,

@@ -78,0 +83,0 @@ ref: ref

{
"name": "@atlaskit/blanket",
"version": "12.3.5",
"version": "12.3.6",
"sideEffects": false
}

@@ -5,3 +5,3 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";

/** @jsx jsx */
import { forwardRef, memo, useCallback } from 'react';
import { forwardRef, memo, useCallback, useRef } from 'react';
import { css, jsx } from '@emotion/react';

@@ -14,3 +14,3 @@ import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';

var packageName = "@atlaskit/blanket";
var packageVersion = "12.3.5";
var packageVersion = "12.3.6";
var analyticsAttributes = {

@@ -67,2 +67,3 @@ componentName: 'blanket',

mode = _useGlobalTheme.mode;
var mouseDownTarget = useRef(null);
var onBlanketClickedWithAnalytics = usePlatformLeafEventHandler(_objectSpread({

@@ -74,5 +75,8 @@ fn: onBlanketClicked,

var blanketClickOutsideChildren = useCallback(function (e) {
return e.currentTarget === e.target ? onBlanketClickedWithAnalytics(e) : undefined;
return e.currentTarget === e.target && mouseDownTarget.current === e.target ? onBlanketClickedWithAnalytics(e) : undefined;
}, [onBlanketClickedWithAnalytics]);
var onClick = shouldAllowClickThrough ? undefined : blanketClickOutsideChildren;
var onMouseDown = useCallback(function (e) {
mouseDownTarget.current = e.target;
}, []);
return jsx("div", {

@@ -82,2 +86,3 @@ role: "presentation",

onClick: onClick,
onMouseDown: onMouseDown,
"data-testid": testId,

@@ -84,0 +89,0 @@ ref: ref

{
"name": "@atlaskit/blanket",
"version": "12.3.5",
"version": "12.3.6",
"sideEffects": false
}
{
"name": "@atlaskit/blanket",
"version": "12.3.5",
"version": "12.3.6",
"description": "A blanket covers the underlying UI for a layered component, such as a modal dialog or a tooltip.",

@@ -36,3 +36,3 @@ "publishConfig": {

"@atlaskit/theme": "^12.2.0",
"@atlaskit/tokens": "^1.0.0",
"@atlaskit/tokens": "^1.1.0",
"@babel/runtime": "^7.0.0",

@@ -55,2 +55,3 @@ "@emotion/react": "^11.7.1"

"@testing-library/react": "^12.1.5",
"@testing-library/user-event": "^14.4.3",
"jscodeshift": "^0.13.0",

@@ -81,4 +82,6 @@ "react-dom": "^16.8.0",

"analytics": "analytics-next",
"design-tokens": "spacing",
"theming": "tokens",
"design-tokens": [
"color",
"spacing"
],
"deprecation": "no-deprecated-imports"

@@ -85,0 +88,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc