New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

terra-popup

Package Overview
Dependencies
Maintainers
7
Versions
159
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terra-popup - npm Package Compare versions

Comparing version

to
6.81.0

5

CHANGELOG.md

@@ -5,2 +5,7 @@ # Changelog

## 6.81.0 - (May 1, 2024)
* Changed
* Added event handlers to call `stopPropagation()` on key and focus events on PopupContent in other components.
## 6.80.0 - (April 4, 2024)

@@ -7,0 +12,0 @@

13

lib/_PopupContent.js

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

var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _react = _interopRequireDefault(require("react"));

@@ -117,3 +118,11 @@ var _reactIntl = require("react-intl");

_this = _callSuper(this, PopupContent, [props]);
/**
* This method stopps key and focus events from bubbling for Popup support in terra-compact-interactive-list.
* The key and focus events still work inside the popup as expected.
*/
(0, _defineProperty2.default)(_this, "handlePropagation", function (event) {
event.stopPropagation();
});
_this.handleOnResize = _this.handleOnResize.bind(_this);
_this.handlePropagation = _this.handlePropagation.bind(_this);
return _this;

@@ -192,3 +201,5 @@ }

refCallback: refCallback,
role: popupContentRole || null
role: popupContentRole || null,
onKeyDown: this.handlePropagation,
onFocus: this.handlePropagation
}), arrowContent, /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, heightData, widthData, {

@@ -195,0 +206,0 @@ className: innerClassNames,

4

package.json
{
"name": "terra-popup",
"version": "6.80.0",
"version": "6.81.0",
"description": "The Terra Popup is higher order component that launches terra-hookshot positioned content with the ability to display a dynamic arrow.",

@@ -67,3 +67,3 @@ "author": "Cerner Corporation",

},
"gitHead": "8ebcd02fcb899d6b62056bc130bb8c59721eff00"
"gitHead": "ab53c8fa80e8d5fe920e06b790a55e0da7726531"
}

@@ -140,2 +140,3 @@ import React from 'react';

this.handleOnResize = this.handleOnResize.bind(this);
this.handlePropagation = this.handlePropagation.bind(this);
}

@@ -172,2 +173,10 @@

/**
* This method stopps key and focus events from bubbling for Popup support in terra-compact-interactive-list.
* The key and focus events still work inside the popup as expected.
*/
handlePropagation = (event) => {
event.stopPropagation();
};
handleOnResize(event) {

@@ -242,2 +251,4 @@ if (this.props.onResize) {

role={popupContentRole || null}
onKeyDown={this.handlePropagation}
onFocus={this.handlePropagation}
>

@@ -244,0 +255,0 @@ {arrowContent}