@atlaskit/popper 5.6.0 → 6.1.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 +370 -357
- package/__perf__/default.tsx +17 -16
- package/codemods/5.0.0-lite-mode.tsx +128 -157
- package/codemods/__tests__/update-modifier.tsx +15 -15
- package/codemods/__tests__/update-offset-prop.tsx +71 -71
- package/codemods/__tests__/update-render-props.tsx +13 -13
- package/codemods/utils/helpers.tsx +253 -263
- package/dist/types/popper.d.ts +2 -2
- package/dist/types-ts4.5/popper.d.ts +2 -2
- package/package.json +91 -95
- package/report.api.md +15 -14
- package/dist/cjs/__tests_external__/index.js +0 -12
- package/dist/cjs/__tests_external__/page-objects/base-popper.js +0 -30
- package/dist/cjs/__tests_external__/test-cases/popper.js +0 -18
- package/dist/cjs/in-product.js +0 -12
- package/dist/es2019/__tests_external__/index.js +0 -1
- package/dist/es2019/__tests_external__/page-objects/base-popper.js +0 -6
- package/dist/es2019/__tests_external__/test-cases/popper.js +0 -10
- package/dist/es2019/in-product.js +0 -1
- package/dist/esm/__tests_external__/index.js +0 -1
- package/dist/esm/__tests_external__/page-objects/base-popper.js +0 -23
- package/dist/esm/__tests_external__/test-cases/popper.js +0 -12
- package/dist/esm/in-product.js +0 -1
- package/dist/types/__tests_external__/index.d.ts +0 -1
- package/dist/types/__tests_external__/page-objects/base-popper.d.ts +0 -7
- package/dist/types/__tests_external__/test-cases/popper.d.ts +0 -2
- package/dist/types/in-product.d.ts +0 -1
- package/dist/types-ts4.5/__tests_external__/index.d.ts +0 -1
- package/dist/types-ts4.5/__tests_external__/page-objects/base-popper.d.ts +0 -5
- package/dist/types-ts4.5/__tests_external__/test-cases/popper.d.ts +0 -2
- package/dist/types-ts4.5/in-product.d.ts +0 -1
- package/in-product/package.json +0 -15
package/package.json
CHANGED
|
@@ -1,96 +1,92 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
"homepage": "https://atlassian.design/components/popper",
|
|
95
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
96
|
-
}
|
|
2
|
+
"name": "@atlaskit/popper",
|
|
3
|
+
"version": "6.1.0",
|
|
4
|
+
"description": "A wrapper for React Popper for situations which require a bespoke popup where other ADS components are deemed unsuitable",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"registry": "https://registry.npmjs.org/"
|
|
7
|
+
},
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
|
+
"author": "Atlassian Pty Ltd",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"main": "dist/cjs/index.js",
|
|
12
|
+
"module": "dist/esm/index.js",
|
|
13
|
+
"module:es2019": "dist/es2019/index.js",
|
|
14
|
+
"types": "dist/types/index.d.ts",
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"atlaskit:src": "src/index.tsx",
|
|
17
|
+
"atlassian": {
|
|
18
|
+
"team": "Design System Team",
|
|
19
|
+
"productPushConsumption": [
|
|
20
|
+
"jira"
|
|
21
|
+
],
|
|
22
|
+
"releaseModel": "continuous",
|
|
23
|
+
"website": {
|
|
24
|
+
"name": "Popper",
|
|
25
|
+
"category": "Libraries"
|
|
26
|
+
},
|
|
27
|
+
"runReact18": true
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@babel/runtime": "^7.0.0",
|
|
31
|
+
"@popperjs/core": "^2.11.8",
|
|
32
|
+
"react-popper": "^2.3.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"react": "^16.8.0 || ^17.0.0 || ~18.2.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@af/accessibility-testing": "*",
|
|
39
|
+
"@af/visual-regression": "*",
|
|
40
|
+
"@atlaskit/ds-lib": "^2.3.0",
|
|
41
|
+
"@atlaskit/ssr": "*",
|
|
42
|
+
"@atlaskit/visual-regression": "*",
|
|
43
|
+
"@emotion/react": "^11.7.1",
|
|
44
|
+
"@emotion/styled": "^11.0.0",
|
|
45
|
+
"@testing-library/react": "^12.1.5",
|
|
46
|
+
"@testing-library/user-event": "^14.4.3",
|
|
47
|
+
"@types/jscodeshift": "^0.11.0",
|
|
48
|
+
"ast-types": "^0.13.3",
|
|
49
|
+
"jscodeshift": "^0.13.0",
|
|
50
|
+
"react-dom": "^16.8.0",
|
|
51
|
+
"react-lorem-component": "^0.13.0",
|
|
52
|
+
"typescript": "~5.4.2",
|
|
53
|
+
"wait-for-expect": "^1.2.0"
|
|
54
|
+
},
|
|
55
|
+
"keywords": [
|
|
56
|
+
"atlaskit",
|
|
57
|
+
"ui"
|
|
58
|
+
],
|
|
59
|
+
"techstack": {
|
|
60
|
+
"@atlassian/frontend": {
|
|
61
|
+
"import-structure": "atlassian-conventions"
|
|
62
|
+
},
|
|
63
|
+
"@repo/internal": {
|
|
64
|
+
"dom-events": "use-bind-event-listener",
|
|
65
|
+
"design-system": "v1",
|
|
66
|
+
"ui-components": "lite-mode",
|
|
67
|
+
"analytics": "analytics-next",
|
|
68
|
+
"design-tokens": [
|
|
69
|
+
"color",
|
|
70
|
+
"spacing"
|
|
71
|
+
],
|
|
72
|
+
"deprecation": "no-deprecated-imports",
|
|
73
|
+
"styling": [
|
|
74
|
+
"static",
|
|
75
|
+
"emotion"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"typesVersions": {
|
|
80
|
+
">=4.5 <4.9": {
|
|
81
|
+
"*": [
|
|
82
|
+
"dist/types-ts4.5/*",
|
|
83
|
+
"dist/types-ts4.5/index.d.ts"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"af:exports": {
|
|
88
|
+
".": "./src/index.tsx",
|
|
89
|
+
"./Popper": "./src/popper.tsx"
|
|
90
|
+
},
|
|
91
|
+
"homepage": "https://atlassian.design/components/popper"
|
|
92
|
+
}
|
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/popper"
|
|
4
4
|
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
5
|
+
> Do not edit this file. This report is auto-generated using
|
|
6
|
+
> [API Extractor](https://api-extractor.com/).
|
|
6
7
|
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
8
|
|
|
8
9
|
### Table of contents
|
|
@@ -31,12 +32,12 @@ import { VirtualElement } from '@popperjs/core';
|
|
|
31
32
|
|
|
32
33
|
// @public (undocumented)
|
|
33
34
|
interface CustomPopperProps<Modifiers> {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
children?: (childrenProps: PopperChildrenProps) => React_2.ReactNode;
|
|
36
|
+
modifiers?: PopperProps<Modifiers>['modifiers'];
|
|
37
|
+
offset?: Offset;
|
|
38
|
+
placement?: Placement;
|
|
39
|
+
referenceElement?: HTMLElement | VirtualElement;
|
|
40
|
+
strategy?: PopperProps<Modifiers>['strategy'];
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
export { Manager };
|
|
@@ -54,12 +55,12 @@ export { placements };
|
|
|
54
55
|
|
|
55
56
|
// @public (undocumented)
|
|
56
57
|
export function Popper<CustomModifiers>({
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
children,
|
|
59
|
+
offset,
|
|
60
|
+
placement,
|
|
61
|
+
referenceElement,
|
|
62
|
+
modifiers,
|
|
63
|
+
strategy,
|
|
63
64
|
}: CustomPopperProps<CustomModifiers>): JSX.Element;
|
|
64
65
|
|
|
65
66
|
export { PopperArrowProps };
|
|
@@ -85,7 +86,7 @@ export { StrictModifier };
|
|
|
85
86
|
|
|
86
87
|
```json
|
|
87
88
|
{
|
|
88
|
-
|
|
89
|
+
"react": "^16.8.0"
|
|
89
90
|
}
|
|
90
91
|
```
|
|
91
92
|
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "popperRendersTestCase", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _popper.popperRendersTestCase;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _popper = require("./test-cases/popper");
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.BasePopperPageObject = void 0;
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
11
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
-
var _inProductTesting = require("@atlaskit/in-product-testing");
|
|
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); }; }
|
|
15
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
16
|
-
var BasePopperPageObject = exports.BasePopperPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
|
|
17
|
-
(0, _inherits2.default)(BasePopperPageObject, _InProductTestPageObj);
|
|
18
|
-
var _super = _createSuper(BasePopperPageObject);
|
|
19
|
-
function BasePopperPageObject() {
|
|
20
|
-
(0, _classCallCheck2.default)(this, BasePopperPageObject);
|
|
21
|
-
return _super.apply(this, arguments);
|
|
22
|
-
}
|
|
23
|
-
(0, _createClass2.default)(BasePopperPageObject, [{
|
|
24
|
-
key: "assertPopperStyle",
|
|
25
|
-
value: function assertPopperStyle(elementSelector) {
|
|
26
|
-
return this.cy.get(elementSelector).should('be.visible');
|
|
27
|
-
}
|
|
28
|
-
}]);
|
|
29
|
-
return BasePopperPageObject;
|
|
30
|
-
}(_inProductTesting.InProductTestPageObject);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.popperRendersTestCase = void 0;
|
|
7
|
-
var _inProductTesting = require("@atlaskit/in-product-testing");
|
|
8
|
-
var _basePopper = require("../page-objects/base-popper");
|
|
9
|
-
var popperRendersTestCase = exports.popperRendersTestCase = function popperRendersTestCase(elementSelector) {
|
|
10
|
-
return new _inProductTesting.InProductTestCase({
|
|
11
|
-
title: 'Popped container renders with position fixed',
|
|
12
|
-
id: 'popped-container-fixed-position',
|
|
13
|
-
assertions: function assertions(cy) {
|
|
14
|
-
var popperElement = new _basePopper.BasePopperPageObject(cy);
|
|
15
|
-
popperElement.assertPopperStyle(elementSelector);
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
};
|
package/dist/cjs/in-product.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "popperRendersTestCase", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _tests_external__.popperRendersTestCase;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _tests_external__ = require("./__tests_external__");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { popperRendersTestCase } from './test-cases/popper';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { InProductTestCase } from '@atlaskit/in-product-testing';
|
|
2
|
-
import { BasePopperPageObject } from '../page-objects/base-popper';
|
|
3
|
-
export const popperRendersTestCase = elementSelector => new InProductTestCase({
|
|
4
|
-
title: 'Popped container renders with position fixed',
|
|
5
|
-
id: 'popped-container-fixed-position',
|
|
6
|
-
assertions: cy => {
|
|
7
|
-
const popperElement = new BasePopperPageObject(cy);
|
|
8
|
-
popperElement.assertPopperStyle(elementSelector);
|
|
9
|
-
}
|
|
10
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { popperRendersTestCase } from './__tests_external__';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { popperRendersTestCase } from './test-cases/popper';
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
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); }; }
|
|
7
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
|
-
import { InProductTestPageObject } from '@atlaskit/in-product-testing';
|
|
9
|
-
export var BasePopperPageObject = /*#__PURE__*/function (_InProductTestPageObj) {
|
|
10
|
-
_inherits(BasePopperPageObject, _InProductTestPageObj);
|
|
11
|
-
var _super = _createSuper(BasePopperPageObject);
|
|
12
|
-
function BasePopperPageObject() {
|
|
13
|
-
_classCallCheck(this, BasePopperPageObject);
|
|
14
|
-
return _super.apply(this, arguments);
|
|
15
|
-
}
|
|
16
|
-
_createClass(BasePopperPageObject, [{
|
|
17
|
-
key: "assertPopperStyle",
|
|
18
|
-
value: function assertPopperStyle(elementSelector) {
|
|
19
|
-
return this.cy.get(elementSelector).should('be.visible');
|
|
20
|
-
}
|
|
21
|
-
}]);
|
|
22
|
-
return BasePopperPageObject;
|
|
23
|
-
}(InProductTestPageObject);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { InProductTestCase } from '@atlaskit/in-product-testing';
|
|
2
|
-
import { BasePopperPageObject } from '../page-objects/base-popper';
|
|
3
|
-
export var popperRendersTestCase = function popperRendersTestCase(elementSelector) {
|
|
4
|
-
return new InProductTestCase({
|
|
5
|
-
title: 'Popped container renders with position fixed',
|
|
6
|
-
id: 'popped-container-fixed-position',
|
|
7
|
-
assertions: function assertions(cy) {
|
|
8
|
-
var popperElement = new BasePopperPageObject(cy);
|
|
9
|
-
popperElement.assertPopperStyle(elementSelector);
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
};
|
package/dist/esm/in-product.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { popperRendersTestCase } from './__tests_external__';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { popperRendersTestCase } from './test-cases/popper';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
/// <reference types="cypress" />
|
|
3
|
-
/// <reference types="cypress" />
|
|
4
|
-
import { InProductTestPageObject } from '@atlaskit/in-product-testing';
|
|
5
|
-
export declare class BasePopperPageObject extends InProductTestPageObject {
|
|
6
|
-
assertPopperStyle(elementSelector: keyof HTMLElementTagNameMap | string): Cypress.Chainable<JQuery<HTMLElement>>;
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { popperRendersTestCase } from './__tests_external__';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { popperRendersTestCase } from './test-cases/popper';
|
|
@@ -1,5 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { popperRendersTestCase } from './__tests_external__';
|
package/in-product/package.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@atlaskit/popper/in-product",
|
|
3
|
-
"main": "../dist/cjs/in-product.js",
|
|
4
|
-
"module": "../dist/esm/in-product.js",
|
|
5
|
-
"module:es2019": "../dist/es2019/in-product.js",
|
|
6
|
-
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/in-product.d.ts",
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.4": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/in-product.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|