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

@atlaskit/inline-dialog

Package Overview
Dependencies
Maintainers
1
Versions
199
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/inline-dialog - npm Package Compare versions

Comparing version 13.4.5 to 13.4.6

6

CHANGELOG.md
# @atlaskit/inline-dialog
## 13.4.6
### Patch Changes
- [`18aeca8c199`](https://bitbucket.org/atlassian/atlassian-frontend/commits/18aeca8c199) - Internal change to update token references. There is no expected behaviour or visual change.
## 13.4.5

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

2

dist/cjs/index.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -14,3 +13,2 @@ value: true

});
var _InlineDialog = _interopRequireDefault(require("./InlineDialog"));
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {

@@ -11,27 +9,16 @@ value: true

exports.default = exports.InlineDialogWithoutAnalytics = void 0;
var _react = _interopRequireWildcard(require("react"));
var _react2 = require("@emotion/react");
var _bindEventListener = require("bind-event-listener");
var _reactNodeResolver = _interopRequireDefault(require("react-node-resolver"));
var _analyticsNext = require("@atlaskit/analytics-next");
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
var _popper = require("@atlaskit/popper");
var _container = require("./styled/container");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/** @jsx jsx */
/** @jsx jsx */
var packageName = "@atlaskit/inline-dialog";
var packageVersion = "13.4.5";
var packageVersion = "13.4.6";
var checkIsChildOfPortal = function checkIsChildOfPortal(node) {

@@ -41,27 +28,25 @@ if (!node) {

}
return node.classList && node.classList.contains('atlaskit-portal-container') || checkIsChildOfPortal(node.parentElement);
};
var InlineDialog = /*#__PURE__*/(0, _react.memo)(function InlineDialog(_ref) {
var _ref$isOpen = _ref.isOpen,
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
_ref$onContentBlur = _ref.onContentBlur,
onContentBlur = _ref$onContentBlur === void 0 ? _noop.default : _ref$onContentBlur,
_ref$onContentClick = _ref.onContentClick,
onContentClick = _ref$onContentClick === void 0 ? _noop.default : _ref$onContentClick,
_ref$onContentFocus = _ref.onContentFocus,
onContentFocus = _ref$onContentFocus === void 0 ? _noop.default : _ref$onContentFocus,
_ref$onClose = _ref.onClose,
onClose = _ref$onClose === void 0 ? _noop.default : _ref$onClose,
_ref$placement = _ref.placement,
placement = _ref$placement === void 0 ? 'bottom-start' : _ref$placement,
_ref$strategy = _ref.strategy,
strategy = _ref$strategy === void 0 ? 'fixed' : _ref$strategy,
testId = _ref.testId,
content = _ref.content,
children = _ref.children;
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
_ref$onContentBlur = _ref.onContentBlur,
onContentBlur = _ref$onContentBlur === void 0 ? _noop.default : _ref$onContentBlur,
_ref$onContentClick = _ref.onContentClick,
onContentClick = _ref$onContentClick === void 0 ? _noop.default : _ref$onContentClick,
_ref$onContentFocus = _ref.onContentFocus,
onContentFocus = _ref$onContentFocus === void 0 ? _noop.default : _ref$onContentFocus,
_ref$onClose = _ref.onClose,
onClose = _ref$onClose === void 0 ? _noop.default : _ref$onClose,
_ref$placement = _ref.placement,
placement = _ref$placement === void 0 ? 'bottom-start' : _ref$placement,
_ref$strategy = _ref.strategy,
strategy = _ref$strategy === void 0 ? 'fixed' : _ref$strategy,
testId = _ref.testId,
content = _ref.content,
children = _ref.children;
var containerRef = (0, _react.useRef)(null);
var triggerRef = (0, _react.useRef)(null); // we put this into a ref to avoid handleClickOutside having this as a dependency
var triggerRef = (0, _react.useRef)(null);
// we put this into a ref to avoid handleClickOutside having this as a dependency
var onCloseRef = (0, _react.useRef)(onClose);

@@ -72,29 +57,29 @@ (0, _react.useEffect)(function () {

var handleClickOutside = (0, _react.useCallback)(function (event) {
var target = event.target; // checks for when target is not HTMLElement
var target = event.target;
// checks for when target is not HTMLElement
if (!(target instanceof HTMLElement)) {
return;
} // TODO: This is to handle the case where the target is no longer in the DOM.
}
// TODO: This is to handle the case where the target is no longer in the DOM.
// This happens with react-select in datetime picker. There might be other
// edge cases for this.
if (!document.body.contains(target)) {
return;
} // exit if we click outside but on the trigger — it can handle the clicks itself
}
// exit if we click outside but on the trigger — it can handle the clicks itself
if (triggerRef.current && triggerRef.current.contains(target)) {
return;
} // handles the case where inline dialog opens portalled elements such as modal
}
// handles the case where inline dialog opens portalled elements such as modal
if (checkIsChildOfPortal(target)) {
return;
} // call onClose if the click originated from outside the dialog
}
// call onClose if the click originated from outside the dialog
if (containerRef.current && !containerRef.current.contains(target)) {
var _onCloseRef$current;
(_onCloseRef$current = onCloseRef.current) === null || _onCloseRef$current === void 0 ? void 0 : _onCloseRef$current.call(onCloseRef, {

@@ -110,3 +95,2 @@ isOpen: false,

}
var unbind = (0, _bindEventListener.bind)(window, {

@@ -126,3 +110,3 @@ type: 'click',

var _ref3 = _ref2.ref,
style = _ref2.style;
style = _ref2.style;
return (0, _react2.jsx)(_container.Container, {

@@ -135,3 +119,2 @@ onBlur: onContentBlur,

containerRef.current = node;
if (typeof _ref3 === 'function') {

@@ -153,3 +136,2 @@ _ref3(node);

triggerRef.current = node;
if (typeof ref === 'function') {

@@ -167,3 +149,2 @@ ref(node);

var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
var _default = (0, _analyticsNext.withAnalyticsContext)({

@@ -184,3 +165,2 @@ componentName: 'inlineDialog',

})(InlineDialog));
exports.default = _default;
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {

@@ -11,23 +9,12 @@ value: true

exports.Container = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _react = _interopRequireWildcard(require("react"));
var _react2 = require("@emotion/react");
var _colors = require("@atlaskit/theme/colors");
var _components = require("@atlaskit/theme/components");
var _constants = require("@atlaskit/theme/constants");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
var themedBackground = (0, _components.themed)({

@@ -54,3 +41,3 @@ light: "var(--ds-surface-overlay, ".concat(_colors.N0, ")"),

maxHeight: "".concat(gridSize * 56, "px"),
padding: "var(--ds-scale-200, 16px)".concat(" ", "var(--ds-scale-300, 24px)"),
padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-300, 24px)"),
zIndex: _constants.layers.dialog(),

@@ -65,3 +52,2 @@ background: "var(".concat(CSS_THEME_BACKGROUND, ")"),

});
/**

@@ -76,9 +62,8 @@ * __Container__

var _objectSpread2;
var children = _ref.children,
onBlur = _ref.onBlur,
onClick = _ref.onClick,
onFocus = _ref.onFocus,
style = _ref.style,
testId = _ref.testId;
onBlur = _ref.onBlur,
onClick = _ref.onClick,
onFocus = _ref.onFocus,
style = _ref.style,
testId = _ref.testId;
var theme = (0, _components.useGlobalTheme)();

@@ -85,0 +70,0 @@ return (0, _react2.jsx)("div", {

{
"name": "@atlaskit/inline-dialog",
"version": "13.4.5",
"version": "13.4.6",
"sideEffects": false
}

@@ -11,4 +11,3 @@ /** @jsx jsx */

const packageName = "@atlaskit/inline-dialog";
const packageVersion = "13.4.5";
const packageVersion = "13.4.6";
const checkIsChildOfPortal = node => {

@@ -18,6 +17,4 @@ if (!node) {

}
return node.classList && node.classList.contains('atlaskit-portal-container') || checkIsChildOfPortal(node.parentElement);
};
const InlineDialog = /*#__PURE__*/memo(function InlineDialog({

@@ -36,4 +33,4 @@ isOpen = false,

const containerRef = useRef(null);
const triggerRef = useRef(null); // we put this into a ref to avoid handleClickOutside having this as a dependency
const triggerRef = useRef(null);
// we put this into a ref to avoid handleClickOutside having this as a dependency
const onCloseRef = useRef(onClose);

@@ -46,29 +43,29 @@ useEffect(() => {

target
} = event; // checks for when target is not HTMLElement
} = event;
// checks for when target is not HTMLElement
if (!(target instanceof HTMLElement)) {
return;
} // TODO: This is to handle the case where the target is no longer in the DOM.
}
// TODO: This is to handle the case where the target is no longer in the DOM.
// This happens with react-select in datetime picker. There might be other
// edge cases for this.
if (!document.body.contains(target)) {
return;
} // exit if we click outside but on the trigger — it can handle the clicks itself
}
// exit if we click outside but on the trigger — it can handle the clicks itself
if (triggerRef.current && triggerRef.current.contains(target)) {
return;
} // handles the case where inline dialog opens portalled elements such as modal
}
// handles the case where inline dialog opens portalled elements such as modal
if (checkIsChildOfPortal(target)) {
return;
} // call onClose if the click originated from outside the dialog
}
// call onClose if the click originated from outside the dialog
if (containerRef.current && !containerRef.current.contains(target)) {
var _onCloseRef$current;
(_onCloseRef$current = onCloseRef.current) === null || _onCloseRef$current === void 0 ? void 0 : _onCloseRef$current.call(onCloseRef, {

@@ -84,3 +81,2 @@ isOpen: false,

}
const unbind = bind(window, {

@@ -108,3 +104,2 @@ type: 'click',

containerRef.current = node;
if (typeof ref === 'function') {

@@ -125,3 +120,2 @@ ref(node);

triggerRef.current = node;
if (typeof ref === 'function') {

@@ -128,0 +122,0 @@ ref(node);

/* eslint-disable jsx-a11y/no-static-element-interactions */
/* eslint-disable jsx-a11y/click-events-have-key-events */
/** @jsx jsx */

@@ -32,3 +30,3 @@ import React, { forwardRef } from 'react';

maxHeight: `${gridSize * 56}px`,
padding: `${"var(--ds-scale-200, 16px)"} ${"var(--ds-scale-300, 24px)"}`,
padding: `${"var(--ds-space-200, 16px)"} ${"var(--ds-space-300, 24px)"}`,
zIndex: layers.dialog(),

@@ -43,3 +41,2 @@ background: `var(${CSS_THEME_BACKGROUND})`,

});
/**

@@ -46,0 +43,0 @@ * __Container__

{
"name": "@atlaskit/inline-dialog",
"version": "13.4.5",
"version": "13.4.6",
"sideEffects": false
}

@@ -11,4 +11,3 @@ /** @jsx jsx */

var packageName = "@atlaskit/inline-dialog";
var packageVersion = "13.4.5";
var packageVersion = "13.4.6";
var checkIsChildOfPortal = function checkIsChildOfPortal(node) {

@@ -18,27 +17,25 @@ if (!node) {

}
return node.classList && node.classList.contains('atlaskit-portal-container') || checkIsChildOfPortal(node.parentElement);
};
var InlineDialog = /*#__PURE__*/memo(function InlineDialog(_ref) {
var _ref$isOpen = _ref.isOpen,
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
_ref$onContentBlur = _ref.onContentBlur,
onContentBlur = _ref$onContentBlur === void 0 ? noop : _ref$onContentBlur,
_ref$onContentClick = _ref.onContentClick,
onContentClick = _ref$onContentClick === void 0 ? noop : _ref$onContentClick,
_ref$onContentFocus = _ref.onContentFocus,
onContentFocus = _ref$onContentFocus === void 0 ? noop : _ref$onContentFocus,
_ref$onClose = _ref.onClose,
onClose = _ref$onClose === void 0 ? noop : _ref$onClose,
_ref$placement = _ref.placement,
placement = _ref$placement === void 0 ? 'bottom-start' : _ref$placement,
_ref$strategy = _ref.strategy,
strategy = _ref$strategy === void 0 ? 'fixed' : _ref$strategy,
testId = _ref.testId,
content = _ref.content,
children = _ref.children;
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
_ref$onContentBlur = _ref.onContentBlur,
onContentBlur = _ref$onContentBlur === void 0 ? noop : _ref$onContentBlur,
_ref$onContentClick = _ref.onContentClick,
onContentClick = _ref$onContentClick === void 0 ? noop : _ref$onContentClick,
_ref$onContentFocus = _ref.onContentFocus,
onContentFocus = _ref$onContentFocus === void 0 ? noop : _ref$onContentFocus,
_ref$onClose = _ref.onClose,
onClose = _ref$onClose === void 0 ? noop : _ref$onClose,
_ref$placement = _ref.placement,
placement = _ref$placement === void 0 ? 'bottom-start' : _ref$placement,
_ref$strategy = _ref.strategy,
strategy = _ref$strategy === void 0 ? 'fixed' : _ref$strategy,
testId = _ref.testId,
content = _ref.content,
children = _ref.children;
var containerRef = useRef(null);
var triggerRef = useRef(null); // we put this into a ref to avoid handleClickOutside having this as a dependency
var triggerRef = useRef(null);
// we put this into a ref to avoid handleClickOutside having this as a dependency
var onCloseRef = useRef(onClose);

@@ -49,29 +46,29 @@ useEffect(function () {

var handleClickOutside = useCallback(function (event) {
var target = event.target; // checks for when target is not HTMLElement
var target = event.target;
// checks for when target is not HTMLElement
if (!(target instanceof HTMLElement)) {
return;
} // TODO: This is to handle the case where the target is no longer in the DOM.
}
// TODO: This is to handle the case where the target is no longer in the DOM.
// This happens with react-select in datetime picker. There might be other
// edge cases for this.
if (!document.body.contains(target)) {
return;
} // exit if we click outside but on the trigger — it can handle the clicks itself
}
// exit if we click outside but on the trigger — it can handle the clicks itself
if (triggerRef.current && triggerRef.current.contains(target)) {
return;
} // handles the case where inline dialog opens portalled elements such as modal
}
// handles the case where inline dialog opens portalled elements such as modal
if (checkIsChildOfPortal(target)) {
return;
} // call onClose if the click originated from outside the dialog
}
// call onClose if the click originated from outside the dialog
if (containerRef.current && !containerRef.current.contains(target)) {
var _onCloseRef$current;
(_onCloseRef$current = onCloseRef.current) === null || _onCloseRef$current === void 0 ? void 0 : _onCloseRef$current.call(onCloseRef, {

@@ -87,3 +84,2 @@ isOpen: false,

}
var unbind = bind(window, {

@@ -103,3 +99,3 @@ type: 'click',

var _ref3 = _ref2.ref,
style = _ref2.style;
style = _ref2.style;
return jsx(Container, {

@@ -112,3 +108,2 @@ onBlur: onContentBlur,

containerRef.current = node;
if (typeof _ref3 === 'function') {

@@ -130,3 +125,2 @@ _ref3(node);

triggerRef.current = node;
if (typeof ref === 'function') {

@@ -133,0 +127,0 @@ ref(node);

import _defineProperty from "@babel/runtime/helpers/defineProperty";
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
/* eslint-disable jsx-a11y/no-static-element-interactions */
/* eslint-disable jsx-a11y/click-events-have-key-events */
/** @jsx jsx */

@@ -38,3 +33,3 @@ import React, { forwardRef } from 'react';

maxHeight: "".concat(gridSize * 56, "px"),
padding: "var(--ds-scale-200, 16px)".concat(" ", "var(--ds-scale-300, 24px)"),
padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-300, 24px)"),
zIndex: layers.dialog(),

@@ -49,3 +44,2 @@ background: "var(".concat(CSS_THEME_BACKGROUND, ")"),

});
/**

@@ -60,9 +54,8 @@ * __Container__

var _objectSpread2;
var children = _ref.children,
onBlur = _ref.onBlur,
onClick = _ref.onClick,
onFocus = _ref.onFocus,
style = _ref.style,
testId = _ref.testId;
onBlur = _ref.onBlur,
onClick = _ref.onClick,
onFocus = _ref.onFocus,
style = _ref.style,
testId = _ref.testId;
var theme = useGlobalTheme();

@@ -69,0 +62,0 @@ return jsx("div", {

{
"name": "@atlaskit/inline-dialog",
"version": "13.4.5",
"version": "13.4.6",
"sideEffects": false
}
{
"name": "@atlaskit/inline-dialog",
"version": "13.4.5",
"version": "13.4.6",
"description": "An inline dialog is a pop-up container for small amounts of information. It can also contain controls.",

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

"@atlaskit/section-message": "^6.3.0",
"@atlaskit/select": "^16.0.0",
"@atlaskit/select": "^16.1.0",
"@atlaskit/ssr": "*",

@@ -61,0 +61,0 @@ "@atlaskit/visual-regression": "*",

@@ -1,2 +0,2 @@

<!-- API Report Version: 2.2 -->
<!-- API Report Version: 2.3 -->

@@ -3,0 +3,0 @@ ## API Report File for "@atlaskit/inline-dialog"

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