@atlaskit/portal 4.5.0 → 4.6.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 +463 -455
- package/__perf__/default.tsx +3 -3
- package/__perf__/examples.tsx +26 -19
- package/dist/types/internal/components/internal-portal.d.ts +1 -1
- package/dist/types/internal/hooks/use-is-subsequent-render.d.ts +1 -1
- package/dist/types/portal.d.ts +1 -1
- package/dist/types/types.d.ts +2 -2
- package/dist/types-ts4.5/internal/components/internal-portal.d.ts +1 -1
- package/dist/types-ts4.5/internal/hooks/use-is-subsequent-render.d.ts +1 -1
- package/dist/types-ts4.5/portal.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +2 -2
- package/package.json +91 -93
- package/report.api.md +14 -17
package/__perf__/default.tsx
CHANGED
package/__perf__/examples.tsx
CHANGED
|
@@ -5,25 +5,32 @@ import { token } from '@atlaskit/tokens';
|
|
|
5
5
|
import Portal from '../src';
|
|
6
6
|
|
|
7
7
|
const PortalPerformance = () => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
8
|
+
return (
|
|
9
|
+
<Portal zIndex={200}>
|
|
10
|
+
<div
|
|
11
|
+
style={{
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
13
|
+
position: 'absolute',
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
15
|
+
top: token('space.300', '24px'),
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
17
|
+
left: token('space.300', '24px'),
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
19
|
+
background: 'lightpink',
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
21
|
+
padding: token('space.300', '24px'),
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
23
|
+
borderRadius: '3px',
|
|
24
|
+
// this z-index is relative to the portal
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
26
|
+
zIndex: 1,
|
|
27
|
+
}}
|
|
28
|
+
>
|
|
29
|
+
<p>portal z-index: 200</p>
|
|
30
|
+
<p>element z-index: 1</p>
|
|
31
|
+
</div>
|
|
32
|
+
</Portal>
|
|
33
|
+
);
|
|
27
34
|
};
|
|
28
35
|
|
|
29
36
|
export default PortalPerformance;
|
package/dist/types/portal.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { PortalProps } from './types';
|
|
3
|
-
export default function Portal({ zIndex, children, mountStrategy
|
|
3
|
+
export default function Portal({ zIndex, children, mountStrategy }: PortalProps): JSX.Element | null;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MountStrategy, PortalEventDetail } from './internal/types';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type MountStrategy, type PortalEventDetail } from './internal/types';
|
|
3
3
|
/**
|
|
4
4
|
* Interface for props to be passed in Atlassian Portal component
|
|
5
5
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { PortalProps } from './types';
|
|
3
|
-
export default function Portal({ zIndex, children, mountStrategy
|
|
3
|
+
export default function Portal({ zIndex, children, mountStrategy }: PortalProps): JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MountStrategy, PortalEventDetail } from './internal/types';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type MountStrategy, type PortalEventDetail } from './internal/types';
|
|
3
3
|
/**
|
|
4
4
|
* Interface for props to be passed in Atlassian Portal component
|
|
5
5
|
*/
|
package/package.json
CHANGED
|
@@ -1,94 +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
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
94
|
-
}
|
|
2
|
+
"name": "@atlaskit/portal",
|
|
3
|
+
"version": "4.6.0",
|
|
4
|
+
"description": "A wrapper for rendering components in React portals.",
|
|
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
|
+
"typesVersions": {
|
|
16
|
+
">=4.5 <4.9": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.5/*",
|
|
19
|
+
"dist/types-ts4.5/index.d.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"atlaskit:src": "src/index.tsx",
|
|
25
|
+
"atlassian": {
|
|
26
|
+
"team": "Design System Team",
|
|
27
|
+
"releaseModel": "continuous",
|
|
28
|
+
"productPushConsumption": [
|
|
29
|
+
"jira"
|
|
30
|
+
],
|
|
31
|
+
"website": {
|
|
32
|
+
"name": "Portal",
|
|
33
|
+
"category": "Libraries"
|
|
34
|
+
},
|
|
35
|
+
"runReact18": true
|
|
36
|
+
},
|
|
37
|
+
"af:exports": {
|
|
38
|
+
"./types": "./src/entry-points/types.tsx",
|
|
39
|
+
".": "./src/index.tsx"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@atlaskit/theme": "^12.10.0",
|
|
43
|
+
"@babel/runtime": "^7.0.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"react": "^16.8.0 || ^17.0.0 || ~18.2.0",
|
|
47
|
+
"react-dom": "^16.8.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@af/accessibility-testing": "*",
|
|
51
|
+
"@af/integration-testing": "*",
|
|
52
|
+
"@atlaskit/ds-lib": "^2.3.0",
|
|
53
|
+
"@atlaskit/modal-dialog": "^12.14.0",
|
|
54
|
+
"@atlaskit/ssr": "*",
|
|
55
|
+
"@atlaskit/tokens": "^1.51.0",
|
|
56
|
+
"@atlaskit/tooltip": "^18.5.0",
|
|
57
|
+
"@atlaskit/visual-regression": "*",
|
|
58
|
+
"@emotion/react": "^11.7.1",
|
|
59
|
+
"@testing-library/react": "^12.1.5",
|
|
60
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
61
|
+
"bind-event-listener": "^3.0.0",
|
|
62
|
+
"raf-stub": "^2.0.1",
|
|
63
|
+
"storybook-addon-performance": "^0.16.0",
|
|
64
|
+
"typescript": "~5.4.2"
|
|
65
|
+
},
|
|
66
|
+
"keywords": [
|
|
67
|
+
"atlaskit",
|
|
68
|
+
"react",
|
|
69
|
+
"ui"
|
|
70
|
+
],
|
|
71
|
+
"techstack": {
|
|
72
|
+
"@atlassian/frontend": {
|
|
73
|
+
"import-structure": "atlassian-conventions"
|
|
74
|
+
},
|
|
75
|
+
"@repo/internal": {
|
|
76
|
+
"dom-events": "use-bind-event-listener",
|
|
77
|
+
"design-system": "v1",
|
|
78
|
+
"ui-components": "lite-mode",
|
|
79
|
+
"analytics": "analytics-next",
|
|
80
|
+
"design-tokens": [
|
|
81
|
+
"color",
|
|
82
|
+
"spacing"
|
|
83
|
+
],
|
|
84
|
+
"deprecation": "no-deprecated-imports",
|
|
85
|
+
"styling": [
|
|
86
|
+
"static",
|
|
87
|
+
"emotion"
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"homepage": "https://atlassian.design/components/portal/"
|
|
92
|
+
}
|
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/portal"
|
|
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
|
|
@@ -27,11 +28,7 @@ type LayerName = keyof Layers;
|
|
|
27
28
|
type MountStrategy = 'effect' | 'layoutEffect';
|
|
28
29
|
|
|
29
30
|
// @public (undocumented)
|
|
30
|
-
function Portal({
|
|
31
|
-
zIndex,
|
|
32
|
-
children,
|
|
33
|
-
mountStrategy,
|
|
34
|
-
}: PortalProps): JSX.Element | null;
|
|
31
|
+
function Portal({ zIndex, children, mountStrategy }: PortalProps): JSX.Element | null;
|
|
35
32
|
export default Portal;
|
|
36
33
|
|
|
37
34
|
// @public (undocumented)
|
|
@@ -45,19 +42,19 @@ export type PortalEvent = CustomEvent<PortalEventDetail>;
|
|
|
45
42
|
|
|
46
43
|
// @public
|
|
47
44
|
interface PortalEventDetail {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
// (undocumented)
|
|
46
|
+
layer: LayerName | null;
|
|
47
|
+
// (undocumented)
|
|
48
|
+
zIndex: number;
|
|
52
49
|
}
|
|
53
50
|
|
|
54
51
|
// @public
|
|
55
52
|
export interface PortalProps {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
// (undocumented)
|
|
54
|
+
children: React_2.ReactNode;
|
|
55
|
+
mountStrategy?: MountStrategy;
|
|
56
|
+
// (undocumented)
|
|
57
|
+
zIndex?: number | string;
|
|
61
58
|
}
|
|
62
59
|
|
|
63
60
|
// (No @packageDocumentation comment for this package)
|
|
@@ -71,8 +68,8 @@ export interface PortalProps {
|
|
|
71
68
|
|
|
72
69
|
```json
|
|
73
70
|
{
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
"react": "^16.8.0",
|
|
72
|
+
"react-dom": "^16.8.0"
|
|
76
73
|
}
|
|
77
74
|
```
|
|
78
75
|
|