@atlaskit/popper 5.4.11 → 5.5.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 +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 +15 -28
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/__tests_external__/page-objects/base-popper.js +0 -1
- package/dist/es2019/popper.js +4 -5
- package/dist/es2019/version.json +1 -1
- package/dist/esm/__tests_external__/page-objects/base-popper.js +0 -8
- package/dist/esm/popper.js +16 -19
- package/dist/esm/version.json +1 -1
- package/dist/types-ts4.0/__tests_external__/index.d.ts +1 -0
- package/dist/types-ts4.0/__tests_external__/page-objects/base-popper.d.ts +5 -0
- package/dist/types-ts4.0/__tests_external__/test-cases/popper.d.ts +2 -0
- package/dist/types-ts4.0/in-product.d.ts +1 -0
- package/dist/types-ts4.0/index.d.ts +3 -0
- package/dist/types-ts4.0/popper.d.ts +39 -0
- package/package.json +17 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/popper
|
|
2
2
|
|
|
3
|
+
## 5.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f859e9ccda4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f859e9ccda4) - Migrates unit tests from enzyme to RTL.
|
|
8
|
+
|
|
9
|
+
## 5.5.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 5.4.11
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -392,7 +408,7 @@
|
|
|
392
408
|
|
|
393
409
|
- [major][ebfeb03eb7](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/ebfeb03eb7):
|
|
394
410
|
|
|
395
|
-
popper has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No API or
|
|
411
|
+
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.
|
|
396
412
|
|
|
397
413
|
## 2.0.1
|
|
398
414
|
|
|
@@ -548,8 +564,8 @@
|
|
|
548
564
|
|
|
549
565
|
## 0.1.2
|
|
550
566
|
|
|
551
|
-
- [patch] Replace @atlaskit/layer in date time picker with @atlaskit/popper, changed configuration of
|
|
552
|
-
- [patch] Updated datetime-picker to use @atlaskit/popper internally instead of @atlaskit/layer. Minor fix to @atlaskit/popper, boundariesElement for
|
|
567
|
+
- [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)
|
|
568
|
+
- [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)
|
|
553
569
|
- [none] Updated dependencies [4286672](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/4286672)
|
|
554
570
|
- [none] Updated dependencies [f2159f4](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/f2159f4)
|
|
555
571
|
|
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,20 +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
19
|
var _core = require("@popperjs/core");
|
|
27
|
-
|
|
28
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); }
|
|
29
|
-
|
|
30
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
|
|
31
23
|
|
|
32
24
|
var constantModifiers = [{
|
|
33
25
|
name: 'flip',
|
|
@@ -44,30 +36,25 @@ var constantModifiers = [{
|
|
|
44
36
|
rootBoundary: 'document'
|
|
45
37
|
}
|
|
46
38
|
}];
|
|
47
|
-
|
|
48
39
|
function defaultChildrenFn() {
|
|
49
40
|
return null;
|
|
50
41
|
}
|
|
51
|
-
|
|
52
42
|
var defaultOffset = [0, 8];
|
|
53
|
-
|
|
54
43
|
function Popper(_ref) {
|
|
55
44
|
var _ref$children = _ref.children,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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;
|
|
67
55
|
var _offset = (0, _slicedToArray2.default)(offset, 2),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
56
|
+
offsetX = _offset[0],
|
|
57
|
+
offsetY = _offset[1];
|
|
71
58
|
// Merge a new offset modifier only if new offset values passed in
|
|
72
59
|
var internalModifiers = (0, _react.useMemo)(function () {
|
|
73
60
|
var offsetModifier = {
|
|
@@ -77,13 +64,13 @@ function Popper(_ref) {
|
|
|
77
64
|
}
|
|
78
65
|
};
|
|
79
66
|
return [].concat(constantModifiers, [offsetModifier]);
|
|
80
|
-
}, [offsetX, offsetY]);
|
|
67
|
+
}, [offsetX, offsetY]);
|
|
81
68
|
|
|
69
|
+
// Merge custom props and memoize
|
|
82
70
|
var mergedModifiers = (0, _react.useMemo)(function () {
|
|
83
71
|
if (modifiers == null) {
|
|
84
72
|
return internalModifiers;
|
|
85
73
|
}
|
|
86
|
-
|
|
87
74
|
return [].concat((0, _toConsumableArray2.default)(internalModifiers), (0, _toConsumableArray2.default)(modifiers));
|
|
88
75
|
}, [internalModifiers, modifiers]);
|
|
89
76
|
return /*#__PURE__*/_react.default.createElement(_reactPopper.Popper, {
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/popper.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { Popper as ReactPopper } from 'react-popper';
|
|
3
|
-
export { placements } from '@popperjs/core';
|
|
3
|
+
export { placements } from '@popperjs/core';
|
|
4
|
+
// Export types from PopperJS / React Popper
|
|
4
5
|
|
|
5
6
|
const constantModifiers = [{
|
|
6
7
|
name: 'flip',
|
|
@@ -17,11 +18,9 @@ const constantModifiers = [{
|
|
|
17
18
|
rootBoundary: 'document'
|
|
18
19
|
}
|
|
19
20
|
}];
|
|
20
|
-
|
|
21
21
|
function defaultChildrenFn() {
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
24
|
const defaultOffset = [0, 8];
|
|
26
25
|
export function Popper({
|
|
27
26
|
children = defaultChildrenFn,
|
|
@@ -41,13 +40,13 @@ export function Popper({
|
|
|
41
40
|
}
|
|
42
41
|
};
|
|
43
42
|
return [...constantModifiers, offsetModifier];
|
|
44
|
-
}, [offsetX, offsetY]);
|
|
43
|
+
}, [offsetX, offsetY]);
|
|
45
44
|
|
|
45
|
+
// Merge custom props and memoize
|
|
46
46
|
const mergedModifiers = useMemo(() => {
|
|
47
47
|
if (modifiers == null) {
|
|
48
48
|
return internalModifiers;
|
|
49
49
|
}
|
|
50
|
-
|
|
51
50
|
return [...internalModifiers, ...modifiers];
|
|
52
51
|
}, [internalModifiers, modifiers]);
|
|
53
52
|
return /*#__PURE__*/React.createElement(ReactPopper, {
|
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
|
@@ -2,7 +2,8 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import { Popper as ReactPopper } from 'react-popper';
|
|
5
|
-
export { placements } from '@popperjs/core';
|
|
5
|
+
export { placements } from '@popperjs/core';
|
|
6
|
+
// Export types from PopperJS / React Popper
|
|
6
7
|
|
|
7
8
|
var constantModifiers = [{
|
|
8
9
|
name: 'flip',
|
|
@@ -19,29 +20,25 @@ var constantModifiers = [{
|
|
|
19
20
|
rootBoundary: 'document'
|
|
20
21
|
}
|
|
21
22
|
}];
|
|
22
|
-
|
|
23
23
|
function defaultChildrenFn() {
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
|
-
|
|
27
26
|
var defaultOffset = [0, 8];
|
|
28
27
|
export function Popper(_ref) {
|
|
29
28
|
var _ref$children = _ref.children,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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;
|
|
41
39
|
var _offset = _slicedToArray(offset, 2),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
offsetX = _offset[0],
|
|
41
|
+
offsetY = _offset[1];
|
|
45
42
|
// Merge a new offset modifier only if new offset values passed in
|
|
46
43
|
var internalModifiers = useMemo(function () {
|
|
47
44
|
var offsetModifier = {
|
|
@@ -51,13 +48,13 @@ export function Popper(_ref) {
|
|
|
51
48
|
}
|
|
52
49
|
};
|
|
53
50
|
return [].concat(constantModifiers, [offsetModifier]);
|
|
54
|
-
}, [offsetX, offsetY]);
|
|
51
|
+
}, [offsetX, offsetY]);
|
|
55
52
|
|
|
53
|
+
// Merge custom props and memoize
|
|
56
54
|
var mergedModifiers = useMemo(function () {
|
|
57
55
|
if (modifiers == null) {
|
|
58
56
|
return internalModifiers;
|
|
59
57
|
}
|
|
60
|
-
|
|
61
58
|
return [].concat(_toConsumableArray(internalModifiers), _toConsumableArray(modifiers));
|
|
62
59
|
}, [internalModifiers, modifiers]);
|
|
63
60
|
return /*#__PURE__*/React.createElement(ReactPopper, {
|
package/dist/esm/version.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { popperRendersTestCase } from './test-cases/popper';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
import { InProductTestPageObject } from '@atlaskit/in-product-testing';
|
|
3
|
+
export declare class BasePopperPageObject extends InProductTestPageObject {
|
|
4
|
+
assertPopperStyle(elementSelector: keyof HTMLElementTagNameMap | string): Cypress.Chainable<JQuery<HTMLElement>>;
|
|
5
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { popperRendersTestCase } from './__tests_external__';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Placement, VirtualElement } from '@popperjs/core';
|
|
3
|
+
import { PopperChildrenProps, PopperProps } from 'react-popper';
|
|
4
|
+
export { placements } from '@popperjs/core';
|
|
5
|
+
export type { Placement, VirtualElement } from '@popperjs/core';
|
|
6
|
+
export type { ManagerProps, ReferenceProps, PopperProps, PopperArrowProps, PopperChildrenProps, StrictModifier, Modifier, } from 'react-popper';
|
|
7
|
+
declare type Offset = [
|
|
8
|
+
number | null | undefined,
|
|
9
|
+
number | null | undefined
|
|
10
|
+
];
|
|
11
|
+
export interface CustomPopperProps<Modifiers> {
|
|
12
|
+
/**
|
|
13
|
+
* Returns the element to be positioned.
|
|
14
|
+
*/
|
|
15
|
+
children?: (childrenProps: PopperChildrenProps) => React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Distance the popup should be offset from the reference in the format of [along, away] (units in px).
|
|
18
|
+
* Defaults to [0, 8] - which means the popup will be 8px away from the edge of the reference specified
|
|
19
|
+
* by the `placement` prop.
|
|
20
|
+
*/
|
|
21
|
+
offset?: Offset;
|
|
22
|
+
/**
|
|
23
|
+
* Which side of the Reference to show on.
|
|
24
|
+
*/
|
|
25
|
+
placement?: Placement;
|
|
26
|
+
/**
|
|
27
|
+
* Replacement reference element to position popper relative to.
|
|
28
|
+
*/
|
|
29
|
+
referenceElement?: HTMLElement | VirtualElement;
|
|
30
|
+
/**
|
|
31
|
+
* Additional modifiers and modifier overwrites.
|
|
32
|
+
*/
|
|
33
|
+
modifiers?: PopperProps<Modifiers>['modifiers'];
|
|
34
|
+
/**
|
|
35
|
+
* Placement strategy used. Can be 'fixed' or 'absolute'
|
|
36
|
+
*/
|
|
37
|
+
strategy?: PopperProps<Modifiers>['strategy'];
|
|
38
|
+
}
|
|
39
|
+
export declare function Popper<CustomModifiers>({ children, offset, placement, referenceElement, modifiers, strategy, }: CustomPopperProps<CustomModifiers>): JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/popper",
|
|
3
|
-
"version": "5.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "5.5.1",
|
|
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
|
},
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
],
|
|
31
31
|
"website": {
|
|
32
32
|
"name": "Popper",
|
|
33
|
-
"category": "
|
|
33
|
+
"category": "Libraries"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"af:exports": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"./in-product": "./src/in-product.tsx"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@atlaskit/in-product-testing": "^0.
|
|
42
|
+
"@atlaskit/in-product-testing": "^0.2.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"@popperjs/core": "^2.9.1",
|
|
45
45
|
"react-popper": "^2.2.3"
|
|
@@ -48,17 +48,21 @@
|
|
|
48
48
|
"react": "^16.8.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@atlaskit/button": "^16.
|
|
51
|
+
"@atlaskit/button": "^16.7.0",
|
|
52
52
|
"@atlaskit/docs": "*",
|
|
53
|
-
"@atlaskit/ds-lib": "^2.
|
|
53
|
+
"@atlaskit/ds-lib": "^2.2.0",
|
|
54
|
+
"@atlaskit/section-message": "^6.4.0",
|
|
54
55
|
"@atlaskit/ssr": "*",
|
|
55
|
-
"@atlaskit/theme": "^12.
|
|
56
|
+
"@atlaskit/theme": "^12.5.0",
|
|
57
|
+
"@atlaskit/tokens": "^1.3.0",
|
|
56
58
|
"@atlaskit/visual-regression": "*",
|
|
57
59
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
60
|
+
"@emotion/react": "^11.7.1",
|
|
58
61
|
"@emotion/styled": "^11.0.0",
|
|
62
|
+
"@testing-library/react": "^12.1.5",
|
|
63
|
+
"@testing-library/user-event": "^14.4.3",
|
|
59
64
|
"@types/jscodeshift": "^0.11.0",
|
|
60
65
|
"ast-types": "^0.13.3",
|
|
61
|
-
"enzyme": "^3.10.0",
|
|
62
66
|
"jscodeshift": "^0.13.0",
|
|
63
67
|
"react-dom": "^16.8.0",
|
|
64
68
|
"react-lorem-component": "^0.13.0",
|
|
@@ -78,8 +82,10 @@
|
|
|
78
82
|
"design-system": "v1",
|
|
79
83
|
"ui-components": "lite-mode",
|
|
80
84
|
"analytics": "analytics-next",
|
|
81
|
-
"design-tokens":
|
|
82
|
-
|
|
85
|
+
"design-tokens": [
|
|
86
|
+
"color",
|
|
87
|
+
"spacing"
|
|
88
|
+
],
|
|
83
89
|
"deprecation": "no-deprecated-imports",
|
|
84
90
|
"styling": [
|
|
85
91
|
"static",
|
|
@@ -87,6 +93,6 @@
|
|
|
87
93
|
]
|
|
88
94
|
}
|
|
89
95
|
},
|
|
90
|
-
"homepage": "https://
|
|
96
|
+
"homepage": "https://atlassian.design/components/popper",
|
|
91
97
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
92
98
|
}
|