@atlaskit/popper 5.2.5 → 5.2.8
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 +18 -0
- package/Popper/package.json +5 -4
- package/__perf__/default.tsx +5 -1
- package/codemods/{5.0.0-lite-mode.ts → 5.0.0-lite-mode.tsx} +0 -0
- package/codemods/__tests__/{update-modifier.ts → update-modifier.tsx} +7 -6
- package/codemods/__tests__/{update-offset-prop.ts → update-offset-prop.tsx} +3 -3
- package/codemods/__tests__/{update-render-props.ts → update-render-props.tsx} +4 -4
- package/codemods/utils/{constants.ts → constants.tsx} +0 -0
- package/codemods/utils/{helpers.ts → helpers.tsx} +0 -0
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/{Popper.js → popper.js} +0 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/{Popper.js → popper.js} +0 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{Popper.js → popper.js} +0 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/{Popper.d.ts → popper.d.ts} +2 -2
- package/package.json +14 -6
- package/report.api.md +83 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/popper
|
|
2
2
|
|
|
3
|
+
## 5.2.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
|
|
8
|
+
|
|
9
|
+
## 5.2.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`ff5655480e6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ff5655480e6) - Internal code change turning on new linting rules.
|
|
14
|
+
|
|
15
|
+
## 5.2.6
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`45ebe7af434`](https://bitbucket.org/atlassian/atlassian-frontend/commits/45ebe7af434) - Moved to using declarative entrypoints internally. Public API is unchanged.
|
|
20
|
+
|
|
3
21
|
## 5.2.5
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/Popper/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/popper/Popper",
|
|
3
|
-
"main": "../dist/cjs/
|
|
4
|
-
"module": "../dist/esm/
|
|
5
|
-
"module:es2019": "../dist/es2019/
|
|
6
|
-
"
|
|
3
|
+
"main": "../dist/cjs/popper.js",
|
|
4
|
+
"module": "../dist/esm/popper.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/popper.js",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"types": "../dist/types/popper.d.ts"
|
|
7
8
|
}
|
package/__perf__/default.tsx
CHANGED
|
@@ -5,7 +5,11 @@ import { Manager, Popper, Reference } from '../src';
|
|
|
5
5
|
export default () => (
|
|
6
6
|
<Manager>
|
|
7
7
|
<Reference>
|
|
8
|
-
{({ ref }) =>
|
|
8
|
+
{({ ref }) => (
|
|
9
|
+
<button ref={ref} type="button">
|
|
10
|
+
Reference element
|
|
11
|
+
</button>
|
|
12
|
+
)}
|
|
9
13
|
</Reference>
|
|
10
14
|
<Popper placement="right">
|
|
11
15
|
{({ ref, style }) => (
|
|
File without changes
|
|
@@ -8,12 +8,13 @@ describe('Changing popper usage', () => {
|
|
|
8
8
|
// TODO this probably isn't worth including, as they still have to do some major work to
|
|
9
9
|
// re-work these modifiers.
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Modifiers:
|
|
13
|
+
* - format has been changed from object of objects, to array of objects, with the key for each
|
|
14
|
+
* modifier replaced with a name key:value pair inside the modifier object
|
|
15
|
+
* - modifier-specific options have been moved inside an options: key:value pair
|
|
16
|
+
* - modifier options have been changed significantly: check the popper.js docs for more info
|
|
17
|
+
*/
|
|
17
18
|
defineInlineTest(
|
|
18
19
|
{ default: transformer, parser: 'tsx' },
|
|
19
20
|
{},
|
|
@@ -265,9 +265,9 @@ describe('Update offset prop', () => {
|
|
|
265
265
|
);
|
|
266
266
|
|
|
267
267
|
/**
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
268
|
+
* If a user is passing in a variable for offset then we should leave a comment to
|
|
269
|
+
* update it themselves
|
|
270
|
+
*/
|
|
271
271
|
defineInlineTest(
|
|
272
272
|
{ default: transformer, parser: 'tsx' },
|
|
273
273
|
{},
|
|
@@ -8,10 +8,10 @@ describe('Update props', () => {
|
|
|
8
8
|
/**
|
|
9
9
|
* It should rename outOfBoundaries and scheduleUpdate props
|
|
10
10
|
* Render Props:
|
|
11
|
-
|
|
12
|
-
scroll container)
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
* - `outOfBoundaries` has been replaced with `isReferenceHidden`, and is now true when the popper is hidden (i.e. by a
|
|
12
|
+
* scroll container)
|
|
13
|
+
* - `scheduleUpdate`, for async updates, has been renamed to `update`, and now returns a Promise.
|
|
14
|
+
*/
|
|
15
15
|
defineInlineTest(
|
|
16
16
|
{ default: transformer, parser: 'tsx' },
|
|
17
17
|
{},
|
|
File without changes
|
|
File without changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "Manager", {
|
|
|
12
12
|
Object.defineProperty(exports, "Popper", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function get() {
|
|
15
|
-
return
|
|
15
|
+
return _popper.Popper;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "Reference", {
|
|
@@ -24,10 +24,10 @@ Object.defineProperty(exports, "Reference", {
|
|
|
24
24
|
Object.defineProperty(exports, "placements", {
|
|
25
25
|
enumerable: true,
|
|
26
26
|
get: function get() {
|
|
27
|
-
return
|
|
27
|
+
return _popper.placements;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _popper = require("./popper");
|
|
32
32
|
|
|
33
33
|
var _reactPopper = require("react-popper");
|
|
File without changes
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Popper, placements } from './
|
|
1
|
+
export { Popper, placements } from './popper';
|
|
2
2
|
export { Manager, Reference } from 'react-popper';
|
|
File without changes
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Popper, placements } from './
|
|
1
|
+
export { Popper, placements } from './popper';
|
|
2
2
|
export { Manager, Reference } from 'react-popper';
|
|
File without changes
|
package/dist/esm/version.json
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Popper, placements } from './
|
|
2
|
-
export type { ManagerProps, ReferenceProps, PopperProps, PopperArrowProps, PopperChildrenProps, StrictModifier, Modifier, Placement, } from './
|
|
1
|
+
export { Popper, placements } from './popper';
|
|
2
|
+
export type { ManagerProps, ReferenceProps, PopperProps, PopperArrowProps, PopperChildrenProps, StrictModifier, Modifier, Placement, } from './popper';
|
|
3
3
|
export { Manager, Reference } from 'react-popper';
|
|
@@ -5,7 +5,7 @@ export { placements } from '@popperjs/core';
|
|
|
5
5
|
export type { Placement, VirtualElement } from '@popperjs/core';
|
|
6
6
|
export type { ManagerProps, ReferenceProps, PopperProps, PopperArrowProps, PopperChildrenProps, StrictModifier, Modifier, } from 'react-popper';
|
|
7
7
|
declare type Offset = [number | null | undefined, number | null | undefined];
|
|
8
|
-
export interface
|
|
8
|
+
export interface CustomPopperProps<Modifiers> {
|
|
9
9
|
/**
|
|
10
10
|
* Returns the element to be positioned.
|
|
11
11
|
*/
|
|
@@ -33,4 +33,4 @@ export interface Props<Modifiers> {
|
|
|
33
33
|
*/
|
|
34
34
|
strategy?: PopperProps<Modifiers>['strategy'];
|
|
35
35
|
}
|
|
36
|
-
export declare function Popper<CustomModifiers>({ children, offset, placement, referenceElement, modifiers, strategy, }:
|
|
36
|
+
export declare function Popper<CustomModifiers>({ children, offset, placement, referenceElement, modifiers, strategy, }: CustomPopperProps<CustomModifiers>): JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/popper",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.8",
|
|
4
4
|
"description": "Wrapper for react-popper with common config and some helpers",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
7
7
|
},
|
|
8
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
9
|
"author": "Atlassian Pty Ltd",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "dist/cjs/index.js",
|
|
@@ -13,15 +13,19 @@
|
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
15
|
"sideEffects": false,
|
|
16
|
-
"atlaskit:src": "src/index.
|
|
16
|
+
"atlaskit:src": "src/index.tsx",
|
|
17
17
|
"atlassian": {
|
|
18
18
|
"team": "Design System Team",
|
|
19
|
-
"deprecatedAutoEntryPoints": true,
|
|
20
19
|
"releaseModel": "scheduled",
|
|
21
20
|
"website": {
|
|
22
|
-
"name": "Popper"
|
|
21
|
+
"name": "Popper",
|
|
22
|
+
"category": "Components"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
+
"af:exports": {
|
|
26
|
+
".": "./src/index.tsx",
|
|
27
|
+
"./Popper": "./src/popper.tsx"
|
|
28
|
+
},
|
|
25
29
|
"dependencies": {
|
|
26
30
|
"@babel/runtime": "^7.0.0",
|
|
27
31
|
"@popperjs/core": "^2.9.1",
|
|
@@ -33,6 +37,7 @@
|
|
|
33
37
|
"devDependencies": {
|
|
34
38
|
"@atlaskit/button": "^16.3.0",
|
|
35
39
|
"@atlaskit/docs": "*",
|
|
40
|
+
"@atlaskit/ds-lib": "^2.1.0",
|
|
36
41
|
"@atlaskit/ssr": "*",
|
|
37
42
|
"@atlaskit/theme": "^12.1.0",
|
|
38
43
|
"@atlaskit/visual-regression": "*",
|
|
@@ -44,7 +49,7 @@
|
|
|
44
49
|
"jscodeshift": "^0.13.0",
|
|
45
50
|
"react-dom": "^16.8.0",
|
|
46
51
|
"react-lorem-component": "^0.13.0",
|
|
47
|
-
"typescript": "4.
|
|
52
|
+
"typescript": "4.3.5",
|
|
48
53
|
"wait-for-expect": "^1.2.0"
|
|
49
54
|
},
|
|
50
55
|
"keywords": [
|
|
@@ -56,6 +61,8 @@
|
|
|
56
61
|
"import-structure": "atlassian-conventions"
|
|
57
62
|
},
|
|
58
63
|
"@repo/internal": {
|
|
64
|
+
"dom-events": "use-bind-event-listener",
|
|
65
|
+
"design-system": "v1",
|
|
59
66
|
"ui-components": "lite-mode",
|
|
60
67
|
"analytics": "analytics-next",
|
|
61
68
|
"theming": "tokens",
|
|
@@ -66,5 +73,6 @@
|
|
|
66
73
|
]
|
|
67
74
|
}
|
|
68
75
|
},
|
|
76
|
+
"homepage": "https://atlaskit.atlassian.com/packages/design-system/popper",
|
|
69
77
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
70
78
|
}
|
package/report.api.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
import { Manager } from 'react-popper';
|
|
7
|
+
import { ManagerProps } from 'react-popper';
|
|
8
|
+
import { Modifier } from 'react-popper';
|
|
9
|
+
import { Placement } from '@popperjs/core';
|
|
10
|
+
import { placements } from '@popperjs/core';
|
|
11
|
+
import { PopperArrowProps } from 'react-popper';
|
|
12
|
+
import { PopperChildrenProps } from 'react-popper';
|
|
13
|
+
import { PopperProps } from 'react-popper';
|
|
14
|
+
import { default as React_2 } from 'react';
|
|
15
|
+
import { Reference } from 'react-popper';
|
|
16
|
+
import { ReferenceProps } from 'react-popper';
|
|
17
|
+
import { StrictModifier } from 'react-popper';
|
|
18
|
+
import { VirtualElement } from '@popperjs/core';
|
|
19
|
+
|
|
20
|
+
export { Manager };
|
|
21
|
+
|
|
22
|
+
export { ManagerProps };
|
|
23
|
+
|
|
24
|
+
export { Modifier };
|
|
25
|
+
|
|
26
|
+
declare type Offset = [number | null | undefined, number | null | undefined];
|
|
27
|
+
|
|
28
|
+
export { Placement };
|
|
29
|
+
|
|
30
|
+
export { placements };
|
|
31
|
+
|
|
32
|
+
export declare function Popper<CustomModifiers>({
|
|
33
|
+
children,
|
|
34
|
+
offset,
|
|
35
|
+
placement,
|
|
36
|
+
referenceElement,
|
|
37
|
+
modifiers,
|
|
38
|
+
strategy,
|
|
39
|
+
}: Props<CustomModifiers>): JSX.Element;
|
|
40
|
+
|
|
41
|
+
export { PopperArrowProps };
|
|
42
|
+
|
|
43
|
+
export { PopperChildrenProps };
|
|
44
|
+
|
|
45
|
+
export { PopperProps };
|
|
46
|
+
|
|
47
|
+
declare interface Props<Modifiers> {
|
|
48
|
+
/**
|
|
49
|
+
* Returns the element to be positioned.
|
|
50
|
+
*/
|
|
51
|
+
children?: (childrenProps: PopperChildrenProps) => React_2.ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* Distance the popup should be offset from the reference in the format of [along, away] (units in px).
|
|
54
|
+
* Defaults to [0, 8] - which means the popup will be 8px away from the edge of the reference specified
|
|
55
|
+
* by the `placement` prop.
|
|
56
|
+
*/
|
|
57
|
+
offset?: Offset;
|
|
58
|
+
/**
|
|
59
|
+
* Which side of the Reference to show on.
|
|
60
|
+
*/
|
|
61
|
+
placement?: Placement;
|
|
62
|
+
/**
|
|
63
|
+
* Replacement reference element to position popper relative to.
|
|
64
|
+
*/
|
|
65
|
+
referenceElement?: HTMLElement | VirtualElement;
|
|
66
|
+
/**
|
|
67
|
+
* Additional modifiers and modifier overwrites.
|
|
68
|
+
*/
|
|
69
|
+
modifiers?: PopperProps<Modifiers>['modifiers'];
|
|
70
|
+
/**
|
|
71
|
+
* Placement strategy used. Can be 'fixed' or 'absolute'
|
|
72
|
+
*/
|
|
73
|
+
strategy?: PopperProps<Modifiers>['strategy'];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { Reference };
|
|
77
|
+
|
|
78
|
+
export { ReferenceProps };
|
|
79
|
+
|
|
80
|
+
export { StrictModifier };
|
|
81
|
+
|
|
82
|
+
export {};
|
|
83
|
+
```
|