@atlaskit/popper 5.4.10 → 5.5.0
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 +19 -3
- package/README.md +1 -1
- package/dist/cjs/__tests_external__/index.js +0 -1
- package/dist/cjs/__tests_external__/page-objects/base-popper.js +0 -14
- package/dist/cjs/__tests_external__/test-cases/popper.js +0 -4
- package/dist/cjs/in-product.js +0 -1
- package/dist/cjs/index.js +0 -2
- package/dist/cjs/popper.js +16 -42
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/__tests_external__/page-objects/base-popper.js +0 -1
- package/dist/es2019/popper.js +6 -20
- package/dist/es2019/version.json +1 -1
- package/dist/esm/__tests_external__/page-objects/base-popper.js +0 -8
- package/dist/esm/popper.js +18 -34
- package/dist/esm/version.json +1 -1
- package/package.json +17 -18
- package/tmp/api-report-tmp.d.ts +0 -61
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/popper
|
|
2
2
|
|
|
3
|
+
## 5.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 5.4.11
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`d84f56e6e50`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d84f56e6e50) - Remove the unused feature flag
|
|
18
|
+
|
|
3
19
|
## 5.4.10
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -386,7 +402,7 @@
|
|
|
386
402
|
|
|
387
403
|
- [major][ebfeb03eb7](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/ebfeb03eb7):
|
|
388
404
|
|
|
389
|
-
popper has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No API or
|
|
405
|
+
popper has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No API or behavioral changes.
|
|
390
406
|
|
|
391
407
|
## 2.0.1
|
|
392
408
|
|
|
@@ -542,8 +558,8 @@
|
|
|
542
558
|
|
|
543
559
|
## 0.1.2
|
|
544
560
|
|
|
545
|
-
- [patch] Replace @atlaskit/layer in date time picker with @atlaskit/popper, changed configuration of
|
|
546
|
-
- [patch] Updated datetime-picker to use @atlaskit/popper internally instead of @atlaskit/layer. Minor fix to @atlaskit/popper, boundariesElement for
|
|
561
|
+
- [patch] Replace @atlaskit/layer in date time picker with @atlaskit/popper, changed configuration of flipbehavior modifier to use viewport as the element boundary rather than the window. [4286672](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/4286672)
|
|
562
|
+
- [patch] Updated datetime-picker to use @atlaskit/popper internally instead of @atlaskit/layer. Minor fix to @atlaskit/popper, boundariesElement for flipbehavior is now viewport and not window. [f2159f4](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/f2159f4)
|
|
547
563
|
- [none] Updated dependencies [4286672](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/4286672)
|
|
548
564
|
- [none] Updated dependencies [f2159f4](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/f2159f4)
|
|
549
565
|
|
package/README.md
CHANGED
|
@@ -1,38 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.BasePopperPageObject = void 0;
|
|
9
|
-
|
|
10
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
10
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
-
|
|
16
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
17
|
-
|
|
18
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
19
|
-
|
|
20
13
|
var _inProductTesting = require("@atlaskit/in-product-testing");
|
|
21
|
-
|
|
22
14
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
23
|
-
|
|
24
15
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
25
|
-
|
|
26
16
|
var BasePopperPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
|
|
27
17
|
(0, _inherits2.default)(BasePopperPageObject, _InProductTestPageObj);
|
|
28
|
-
|
|
29
18
|
var _super = _createSuper(BasePopperPageObject);
|
|
30
|
-
|
|
31
19
|
function BasePopperPageObject() {
|
|
32
20
|
(0, _classCallCheck2.default)(this, BasePopperPageObject);
|
|
33
21
|
return _super.apply(this, arguments);
|
|
34
22
|
}
|
|
35
|
-
|
|
36
23
|
(0, _createClass2.default)(BasePopperPageObject, [{
|
|
37
24
|
key: "assertPopperStyle",
|
|
38
25
|
value: function assertPopperStyle(elementSelector) {
|
|
@@ -41,5 +28,4 @@ var BasePopperPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
|
|
|
41
28
|
}]);
|
|
42
29
|
return BasePopperPageObject;
|
|
43
30
|
}(_inProductTesting.InProductTestPageObject);
|
|
44
|
-
|
|
45
31
|
exports.BasePopperPageObject = BasePopperPageObject;
|
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.popperRendersTestCase = void 0;
|
|
7
|
-
|
|
8
7
|
var _inProductTesting = require("@atlaskit/in-product-testing");
|
|
9
|
-
|
|
10
8
|
var _basePopper = require("../page-objects/base-popper");
|
|
11
|
-
|
|
12
9
|
var popperRendersTestCase = function popperRendersTestCase(elementSelector) {
|
|
13
10
|
return new _inProductTesting.InProductTestCase({
|
|
14
11
|
title: 'Popped container renders with position fixed',
|
|
@@ -19,5 +16,4 @@ var popperRendersTestCase = function popperRendersTestCase(elementSelector) {
|
|
|
19
16
|
}
|
|
20
17
|
});
|
|
21
18
|
};
|
|
22
|
-
|
|
23
19
|
exports.popperRendersTestCase = popperRendersTestCase;
|
package/dist/cjs/in-product.js
CHANGED
package/dist/cjs/index.js
CHANGED
package/dist/cjs/popper.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
@@ -14,22 +12,14 @@ Object.defineProperty(exports, "placements", {
|
|
|
14
12
|
return _core.placements;
|
|
15
13
|
}
|
|
16
14
|
});
|
|
17
|
-
|
|
18
15
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
19
|
-
|
|
20
16
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
21
|
-
|
|
22
17
|
var _react = _interopRequireWildcard(require("react"));
|
|
23
|
-
|
|
24
18
|
var _reactPopper = require("react-popper");
|
|
25
|
-
|
|
26
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
27
|
-
|
|
28
19
|
var _core = require("@popperjs/core");
|
|
29
|
-
|
|
30
20
|
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); }
|
|
31
|
-
|
|
32
21
|
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; }
|
|
22
|
+
// Export types from PopperJS / React Popper
|
|
33
23
|
|
|
34
24
|
var constantModifiers = [{
|
|
35
25
|
name: 'flip',
|
|
@@ -46,38 +36,25 @@ var constantModifiers = [{
|
|
|
46
36
|
rootBoundary: 'document'
|
|
47
37
|
}
|
|
48
38
|
}];
|
|
49
|
-
|
|
50
39
|
function defaultChildrenFn() {
|
|
51
40
|
return null;
|
|
52
41
|
}
|
|
53
|
-
|
|
54
42
|
var defaultOffset = [0, 8];
|
|
55
|
-
var siblingElement = null;
|
|
56
|
-
|
|
57
|
-
if ((0, _platformFeatureFlags.getBooleanFF)('uip.popper.flex-team')) {
|
|
58
|
-
siblingElement = /*#__PURE__*/_react.default.createElement("em", {
|
|
59
|
-
hidden: true,
|
|
60
|
-
"data-flex": "Hello from UIP"
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
43
|
function Popper(_ref) {
|
|
65
44
|
var _ref$children = _ref.children,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
45
|
+
children = _ref$children === void 0 ? defaultChildrenFn : _ref$children,
|
|
46
|
+
_ref$offset = _ref.offset,
|
|
47
|
+
offset = _ref$offset === void 0 ? defaultOffset : _ref$offset,
|
|
48
|
+
_ref$placement = _ref.placement,
|
|
49
|
+
placement = _ref$placement === void 0 ? 'bottom-start' : _ref$placement,
|
|
50
|
+
_ref$referenceElement = _ref.referenceElement,
|
|
51
|
+
referenceElement = _ref$referenceElement === void 0 ? undefined : _ref$referenceElement,
|
|
52
|
+
modifiers = _ref.modifiers,
|
|
53
|
+
_ref$strategy = _ref.strategy,
|
|
54
|
+
strategy = _ref$strategy === void 0 ? 'fixed' : _ref$strategy;
|
|
77
55
|
var _offset = (0, _slicedToArray2.default)(offset, 2),
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
56
|
+
offsetX = _offset[0],
|
|
57
|
+
offsetY = _offset[1];
|
|
81
58
|
// Merge a new offset modifier only if new offset values passed in
|
|
82
59
|
var internalModifiers = (0, _react.useMemo)(function () {
|
|
83
60
|
var offsetModifier = {
|
|
@@ -87,22 +64,19 @@ function Popper(_ref) {
|
|
|
87
64
|
}
|
|
88
65
|
};
|
|
89
66
|
return [].concat(constantModifiers, [offsetModifier]);
|
|
90
|
-
}, [offsetX, offsetY]);
|
|
67
|
+
}, [offsetX, offsetY]);
|
|
91
68
|
|
|
69
|
+
// Merge custom props and memoize
|
|
92
70
|
var mergedModifiers = (0, _react.useMemo)(function () {
|
|
93
71
|
if (modifiers == null) {
|
|
94
72
|
return internalModifiers;
|
|
95
73
|
}
|
|
96
|
-
|
|
97
74
|
return [].concat((0, _toConsumableArray2.default)(internalModifiers), (0, _toConsumableArray2.default)(modifiers));
|
|
98
75
|
}, [internalModifiers, modifiers]);
|
|
99
|
-
var wrappedChildren = (0, _react.useCallback)(function (childrenProps) {
|
|
100
|
-
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, siblingElement, children(childrenProps));
|
|
101
|
-
}, [children]);
|
|
102
76
|
return /*#__PURE__*/_react.default.createElement(_reactPopper.Popper, {
|
|
103
77
|
modifiers: mergedModifiers,
|
|
104
78
|
placement: placement,
|
|
105
79
|
strategy: strategy,
|
|
106
80
|
referenceElement: referenceElement
|
|
107
|
-
},
|
|
81
|
+
}, children);
|
|
108
82
|
}
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/popper.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import { Popper as ReactPopper } from 'react-popper';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
export { placements } from '@popperjs/core';
|
|
4
|
+
// Export types from PopperJS / React Popper
|
|
5
5
|
|
|
6
6
|
const constantModifiers = [{
|
|
7
7
|
name: 'flip',
|
|
@@ -18,21 +18,10 @@ const constantModifiers = [{
|
|
|
18
18
|
rootBoundary: 'document'
|
|
19
19
|
}
|
|
20
20
|
}];
|
|
21
|
-
|
|
22
21
|
function defaultChildrenFn() {
|
|
23
22
|
return null;
|
|
24
23
|
}
|
|
25
|
-
|
|
26
24
|
const defaultOffset = [0, 8];
|
|
27
|
-
let siblingElement = null;
|
|
28
|
-
|
|
29
|
-
if (getBooleanFF('uip.popper.flex-team')) {
|
|
30
|
-
siblingElement = /*#__PURE__*/React.createElement("em", {
|
|
31
|
-
hidden: true,
|
|
32
|
-
"data-flex": "Hello from UIP"
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
25
|
export function Popper({
|
|
37
26
|
children = defaultChildrenFn,
|
|
38
27
|
offset = defaultOffset,
|
|
@@ -51,22 +40,19 @@ export function Popper({
|
|
|
51
40
|
}
|
|
52
41
|
};
|
|
53
42
|
return [...constantModifiers, offsetModifier];
|
|
54
|
-
}, [offsetX, offsetY]);
|
|
43
|
+
}, [offsetX, offsetY]);
|
|
55
44
|
|
|
45
|
+
// Merge custom props and memoize
|
|
56
46
|
const mergedModifiers = useMemo(() => {
|
|
57
47
|
if (modifiers == null) {
|
|
58
48
|
return internalModifiers;
|
|
59
49
|
}
|
|
60
|
-
|
|
61
50
|
return [...internalModifiers, ...modifiers];
|
|
62
51
|
}, [internalModifiers, modifiers]);
|
|
63
|
-
const wrappedChildren = useCallback(childrenProps => {
|
|
64
|
-
return /*#__PURE__*/React.createElement(Fragment, null, siblingElement, children(childrenProps));
|
|
65
|
-
}, [children]);
|
|
66
52
|
return /*#__PURE__*/React.createElement(ReactPopper, {
|
|
67
53
|
modifiers: mergedModifiers,
|
|
68
54
|
placement: placement,
|
|
69
55
|
strategy: strategy,
|
|
70
56
|
referenceElement: referenceElement
|
|
71
|
-
},
|
|
57
|
+
}, children);
|
|
72
58
|
}
|
package/dist/es2019/version.json
CHANGED
|
@@ -3,29 +3,21 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
7
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
8
|
-
|
|
9
7
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
|
-
|
|
11
8
|
import { InProductTestPageObject } from '@atlaskit/in-product-testing';
|
|
12
9
|
export var BasePopperPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
|
|
13
10
|
_inherits(BasePopperPageObject, _InProductTestPageObj);
|
|
14
|
-
|
|
15
11
|
var _super = _createSuper(BasePopperPageObject);
|
|
16
|
-
|
|
17
12
|
function BasePopperPageObject() {
|
|
18
13
|
_classCallCheck(this, BasePopperPageObject);
|
|
19
|
-
|
|
20
14
|
return _super.apply(this, arguments);
|
|
21
15
|
}
|
|
22
|
-
|
|
23
16
|
_createClass(BasePopperPageObject, [{
|
|
24
17
|
key: "assertPopperStyle",
|
|
25
18
|
value: function assertPopperStyle(elementSelector) {
|
|
26
19
|
return this.cy.get(elementSelector).should('be.visible');
|
|
27
20
|
}
|
|
28
21
|
}]);
|
|
29
|
-
|
|
30
22
|
return BasePopperPageObject;
|
|
31
23
|
}(InProductTestPageObject);
|
package/dist/esm/popper.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import React, {
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
4
4
|
import { Popper as ReactPopper } from 'react-popper';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
export { placements } from '@popperjs/core';
|
|
6
|
+
// Export types from PopperJS / React Popper
|
|
7
7
|
|
|
8
8
|
var constantModifiers = [{
|
|
9
9
|
name: 'flip',
|
|
@@ -20,38 +20,25 @@ var constantModifiers = [{
|
|
|
20
20
|
rootBoundary: 'document'
|
|
21
21
|
}
|
|
22
22
|
}];
|
|
23
|
-
|
|
24
23
|
function defaultChildrenFn() {
|
|
25
24
|
return null;
|
|
26
25
|
}
|
|
27
|
-
|
|
28
26
|
var defaultOffset = [0, 8];
|
|
29
|
-
var siblingElement = null;
|
|
30
|
-
|
|
31
|
-
if (getBooleanFF('uip.popper.flex-team')) {
|
|
32
|
-
siblingElement = /*#__PURE__*/React.createElement("em", {
|
|
33
|
-
hidden: true,
|
|
34
|
-
"data-flex": "Hello from UIP"
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
27
|
export function Popper(_ref) {
|
|
39
28
|
var _ref$children = _ref.children,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
29
|
+
children = _ref$children === void 0 ? defaultChildrenFn : _ref$children,
|
|
30
|
+
_ref$offset = _ref.offset,
|
|
31
|
+
offset = _ref$offset === void 0 ? defaultOffset : _ref$offset,
|
|
32
|
+
_ref$placement = _ref.placement,
|
|
33
|
+
placement = _ref$placement === void 0 ? 'bottom-start' : _ref$placement,
|
|
34
|
+
_ref$referenceElement = _ref.referenceElement,
|
|
35
|
+
referenceElement = _ref$referenceElement === void 0 ? undefined : _ref$referenceElement,
|
|
36
|
+
modifiers = _ref.modifiers,
|
|
37
|
+
_ref$strategy = _ref.strategy,
|
|
38
|
+
strategy = _ref$strategy === void 0 ? 'fixed' : _ref$strategy;
|
|
51
39
|
var _offset = _slicedToArray(offset, 2),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
40
|
+
offsetX = _offset[0],
|
|
41
|
+
offsetY = _offset[1];
|
|
55
42
|
// Merge a new offset modifier only if new offset values passed in
|
|
56
43
|
var internalModifiers = useMemo(function () {
|
|
57
44
|
var offsetModifier = {
|
|
@@ -61,22 +48,19 @@ export function Popper(_ref) {
|
|
|
61
48
|
}
|
|
62
49
|
};
|
|
63
50
|
return [].concat(constantModifiers, [offsetModifier]);
|
|
64
|
-
}, [offsetX, offsetY]);
|
|
51
|
+
}, [offsetX, offsetY]);
|
|
65
52
|
|
|
53
|
+
// Merge custom props and memoize
|
|
66
54
|
var mergedModifiers = useMemo(function () {
|
|
67
55
|
if (modifiers == null) {
|
|
68
56
|
return internalModifiers;
|
|
69
57
|
}
|
|
70
|
-
|
|
71
58
|
return [].concat(_toConsumableArray(internalModifiers), _toConsumableArray(modifiers));
|
|
72
59
|
}, [internalModifiers, modifiers]);
|
|
73
|
-
var wrappedChildren = useCallback(function (childrenProps) {
|
|
74
|
-
return /*#__PURE__*/React.createElement(Fragment, null, siblingElement, children(childrenProps));
|
|
75
|
-
}, [children]);
|
|
76
60
|
return /*#__PURE__*/React.createElement(ReactPopper, {
|
|
77
61
|
modifiers: mergedModifiers,
|
|
78
62
|
placement: placement,
|
|
79
63
|
strategy: strategy,
|
|
80
64
|
referenceElement: referenceElement
|
|
81
|
-
},
|
|
65
|
+
}, children);
|
|
82
66
|
}
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/popper",
|
|
3
|
-
"version": "5.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "5.5.0",
|
|
4
|
+
"description": "A wrapper for React Popper for situations which require a bespoke popup where other ADS components are deemed unsuitable",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
7
7
|
},
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"atlaskit:src": "src/index.tsx",
|
|
25
25
|
"atlassian": {
|
|
26
|
-
"team": "
|
|
26
|
+
"team": "Design System Team",
|
|
27
27
|
"releaseModel": "continuous",
|
|
28
28
|
"productPushConsumption": [
|
|
29
29
|
"jira"
|
|
30
30
|
],
|
|
31
31
|
"website": {
|
|
32
32
|
"name": "Popper",
|
|
33
|
-
"category": "
|
|
33
|
+
"category": "Libraries"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"af:exports": {
|
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
"./in-product": "./src/in-product.tsx"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@atlaskit/in-product-testing": "^0.
|
|
43
|
-
"@atlaskit/platform-feature-flags": "^0.0.12",
|
|
42
|
+
"@atlaskit/in-product-testing": "^0.2.0",
|
|
44
43
|
"@babel/runtime": "^7.0.0",
|
|
45
44
|
"@popperjs/core": "^2.9.1",
|
|
46
45
|
"react-popper": "^2.2.3"
|
|
@@ -49,13 +48,16 @@
|
|
|
49
48
|
"react": "^16.8.0"
|
|
50
49
|
},
|
|
51
50
|
"devDependencies": {
|
|
52
|
-
"@atlaskit/button": "^16.
|
|
51
|
+
"@atlaskit/button": "^16.7.0",
|
|
53
52
|
"@atlaskit/docs": "*",
|
|
54
|
-
"@atlaskit/ds-lib": "^2.
|
|
53
|
+
"@atlaskit/ds-lib": "^2.2.0",
|
|
54
|
+
"@atlaskit/section-message": "^6.4.0",
|
|
55
55
|
"@atlaskit/ssr": "*",
|
|
56
|
-
"@atlaskit/theme": "^12.
|
|
56
|
+
"@atlaskit/theme": "^12.5.0",
|
|
57
|
+
"@atlaskit/tokens": "^1.3.0",
|
|
57
58
|
"@atlaskit/visual-regression": "*",
|
|
58
59
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
60
|
+
"@emotion/react": "^11.7.1",
|
|
59
61
|
"@emotion/styled": "^11.0.0",
|
|
60
62
|
"@types/jscodeshift": "^0.11.0",
|
|
61
63
|
"ast-types": "^0.13.3",
|
|
@@ -79,8 +81,10 @@
|
|
|
79
81
|
"design-system": "v1",
|
|
80
82
|
"ui-components": "lite-mode",
|
|
81
83
|
"analytics": "analytics-next",
|
|
82
|
-
"design-tokens":
|
|
83
|
-
|
|
84
|
+
"design-tokens": [
|
|
85
|
+
"color",
|
|
86
|
+
"spacing"
|
|
87
|
+
],
|
|
84
88
|
"deprecation": "no-deprecated-imports",
|
|
85
89
|
"styling": [
|
|
86
90
|
"static",
|
|
@@ -88,11 +92,6 @@
|
|
|
88
92
|
]
|
|
89
93
|
}
|
|
90
94
|
},
|
|
91
|
-
"homepage": "https://
|
|
92
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
93
|
-
"platform-feature-flags": {
|
|
94
|
-
"uip.popper.flex-team": {
|
|
95
|
-
"type": "boolean"
|
|
96
|
-
}
|
|
97
|
-
}
|
|
95
|
+
"homepage": "https://atlassian.design/components/popper",
|
|
96
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
98
97
|
}
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/popper"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import { Manager } from 'react-popper';
|
|
8
|
-
import { ManagerProps } from 'react-popper';
|
|
9
|
-
import { Modifier } from 'react-popper';
|
|
10
|
-
import { Placement } from '@popperjs/core';
|
|
11
|
-
import { placements } from '@popperjs/core';
|
|
12
|
-
import { PopperArrowProps } from 'react-popper';
|
|
13
|
-
import { PopperChildrenProps } from 'react-popper';
|
|
14
|
-
import { PopperProps } from 'react-popper';
|
|
15
|
-
import { default as React_2 } from 'react';
|
|
16
|
-
import { Reference } from 'react-popper';
|
|
17
|
-
import { ReferenceProps } from 'react-popper';
|
|
18
|
-
import { StrictModifier } from 'react-popper';
|
|
19
|
-
import { VirtualElement } from '@popperjs/core';
|
|
20
|
-
|
|
21
|
-
// @public (undocumented)
|
|
22
|
-
interface CustomPopperProps<Modifiers> {
|
|
23
|
-
children?: (childrenProps: PopperChildrenProps) => React_2.ReactNode;
|
|
24
|
-
modifiers?: PopperProps<Modifiers>['modifiers'];
|
|
25
|
-
offset?: Offset;
|
|
26
|
-
placement?: Placement;
|
|
27
|
-
referenceElement?: HTMLElement | VirtualElement;
|
|
28
|
-
strategy?: PopperProps<Modifiers>['strategy'];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export { Manager }
|
|
32
|
-
|
|
33
|
-
export { ManagerProps }
|
|
34
|
-
|
|
35
|
-
export { Modifier }
|
|
36
|
-
|
|
37
|
-
// @public (undocumented)
|
|
38
|
-
type Offset = [null | number | undefined, null | number | undefined];
|
|
39
|
-
|
|
40
|
-
export { Placement }
|
|
41
|
-
|
|
42
|
-
export { placements }
|
|
43
|
-
|
|
44
|
-
// @public (undocumented)
|
|
45
|
-
export function Popper<CustomModifiers>({ children, offset, placement, referenceElement, modifiers, strategy, }: CustomPopperProps<CustomModifiers>): JSX.Element;
|
|
46
|
-
|
|
47
|
-
export { PopperArrowProps }
|
|
48
|
-
|
|
49
|
-
export { PopperChildrenProps }
|
|
50
|
-
|
|
51
|
-
export { PopperProps }
|
|
52
|
-
|
|
53
|
-
export { Reference }
|
|
54
|
-
|
|
55
|
-
export { ReferenceProps }
|
|
56
|
-
|
|
57
|
-
export { StrictModifier }
|
|
58
|
-
|
|
59
|
-
// (No @packageDocumentation comment for this package)
|
|
60
|
-
|
|
61
|
-
```
|