@atlaskit/popup 1.11.0 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/popup
|
|
2
2
|
|
|
3
|
+
## 1.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#41322](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41322) [`f54519b315c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f54519b315c) - This removes the error in console when passing `shouldRenderToParent` prop.
|
|
8
|
+
|
|
3
9
|
## 1.11.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
12
|
var _react = require("react");
|
|
12
13
|
var _react2 = require("@emotion/react");
|
|
@@ -17,6 +18,7 @@ var _tokens = require("@atlaskit/tokens");
|
|
|
17
18
|
var _repositionOnUpdate = require("./reposition-on-update");
|
|
18
19
|
var _useCloseManager = require("./use-close-manager");
|
|
19
20
|
var _useFocusManager = require("./use-focus-manager");
|
|
21
|
+
var _excluded = ["shouldRenderToParent", "children"];
|
|
20
22
|
var _css;
|
|
21
23
|
/** @jsx jsx */
|
|
22
24
|
var popupStyles = (0, _react2.css)((_css = {
|
|
@@ -34,12 +36,14 @@ var popupOverflowStyles = (0, _react2.css)({
|
|
|
34
36
|
overflow: 'auto'
|
|
35
37
|
});
|
|
36
38
|
var DefaultPopupComponent = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
37
|
-
var shouldRenderToParent = props.shouldRenderToParent
|
|
39
|
+
var shouldRenderToParent = props.shouldRenderToParent,
|
|
40
|
+
children = props.children,
|
|
41
|
+
htmlAttributes = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
38
42
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
39
43
|
css: [popupStyles, !shouldRenderToParent && popupOverflowStyles]
|
|
40
|
-
},
|
|
44
|
+
}, htmlAttributes, {
|
|
41
45
|
ref: ref
|
|
42
|
-
}));
|
|
46
|
+
}), children);
|
|
43
47
|
});
|
|
44
48
|
function PopperWrapper(_ref) {
|
|
45
49
|
var isOpen = _ref.isOpen,
|
|
@@ -27,13 +27,15 @@ const popupOverflowStyles = css({
|
|
|
27
27
|
});
|
|
28
28
|
const DefaultPopupComponent = /*#__PURE__*/forwardRef((props, ref) => {
|
|
29
29
|
const {
|
|
30
|
-
shouldRenderToParent
|
|
30
|
+
shouldRenderToParent,
|
|
31
|
+
children,
|
|
32
|
+
...htmlAttributes
|
|
31
33
|
} = props;
|
|
32
34
|
return jsx("div", _extends({
|
|
33
35
|
css: [popupStyles, !shouldRenderToParent && popupOverflowStyles]
|
|
34
|
-
},
|
|
36
|
+
}, htmlAttributes, {
|
|
35
37
|
ref: ref
|
|
36
|
-
}));
|
|
38
|
+
}), children);
|
|
37
39
|
});
|
|
38
40
|
function PopperWrapper({
|
|
39
41
|
isOpen,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
+
var _excluded = ["shouldRenderToParent", "children"];
|
|
4
6
|
var _css;
|
|
5
7
|
/** @jsx jsx */
|
|
6
8
|
import { forwardRef, useMemo, useState } from 'react';
|
|
@@ -27,12 +29,14 @@ var popupOverflowStyles = css({
|
|
|
27
29
|
overflow: 'auto'
|
|
28
30
|
});
|
|
29
31
|
var DefaultPopupComponent = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
30
|
-
var shouldRenderToParent = props.shouldRenderToParent
|
|
32
|
+
var shouldRenderToParent = props.shouldRenderToParent,
|
|
33
|
+
children = props.children,
|
|
34
|
+
htmlAttributes = _objectWithoutProperties(props, _excluded);
|
|
31
35
|
return jsx("div", _extends({
|
|
32
36
|
css: [popupStyles, !shouldRenderToParent && popupOverflowStyles]
|
|
33
|
-
},
|
|
37
|
+
}, htmlAttributes, {
|
|
34
38
|
ref: ref
|
|
35
|
-
}));
|
|
39
|
+
}), children);
|
|
36
40
|
});
|
|
37
41
|
function PopperWrapper(_ref) {
|
|
38
42
|
var isOpen = _ref.isOpen,
|