@atlaskit/portal 5.5.6 → 6.0.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 +35 -0
- package/constants/package.json +1 -8
- package/package.json +19 -27
- package/portal/package.json +1 -8
- package/types/package.json +1 -8
- package/dist/types-ts4.5/constants.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/constants.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/portal.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -3
- package/dist/types-ts4.5/internal/components/internal-portal-new.d.ts +0 -8
- package/dist/types-ts4.5/internal/components/internal-portal.d.ts +0 -8
- package/dist/types-ts4.5/internal/constants.d.ts +0 -3
- package/dist/types-ts4.5/internal/hooks/use-is-subsequent-render.d.ts +0 -3
- package/dist/types-ts4.5/internal/hooks/use-isomorphic-layout-effect.d.ts +0 -5
- package/dist/types-ts4.5/internal/hooks/use-portal-event.d.ts +0 -2
- package/dist/types-ts4.5/internal/types.d.ts +0 -25
- package/dist/types-ts4.5/internal/utils/append-portal-container-if-not-appended.d.ts +0 -1
- package/dist/types-ts4.5/internal/utils/create-atlaskit-portal.d.ts +0 -1
- package/dist/types-ts4.5/internal/utils/create-container.d.ts +0 -1
- package/dist/types-ts4.5/internal/utils/create-portal-parent.d.ts +0 -1
- package/dist/types-ts4.5/internal/utils/get-body.d.ts +0 -5
- package/dist/types-ts4.5/internal/utils/portal-custom-event.d.ts +0 -6
- package/dist/types-ts4.5/internal/utils/remove-portal-container.d.ts +0 -1
- package/dist/types-ts4.5/internal/utils/remove-portal-parent.d.ts +0 -1
- package/dist/types-ts4.5/portal.d.ts +0 -3
- package/dist/types-ts4.5/types.d.ts +0 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @atlaskit/portal
|
|
2
2
|
|
|
3
|
+
## 6.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ee28cf33718b0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ee28cf33718b0) -
|
|
8
|
+
Add @atlassian/react-compiler-gating as a runtime dependency to enable React Compiler platform
|
|
9
|
+
gating.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 6.0.0
|
|
13
|
+
|
|
14
|
+
### Major Changes
|
|
15
|
+
|
|
16
|
+
- [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
|
|
17
|
+
Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
|
|
18
|
+
|
|
19
|
+
Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
|
|
20
|
+
|
|
21
|
+
Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
|
|
22
|
+
|
|
23
|
+
```diff
|
|
24
|
+
- "typesVersions": {
|
|
25
|
+
- ">=4.5 <4.9": {
|
|
26
|
+
- "*": [
|
|
27
|
+
- "dist/types-ts4.5/*",
|
|
28
|
+
- "dist/types-ts4.5/index.d.ts"
|
|
29
|
+
- ]
|
|
30
|
+
- }
|
|
31
|
+
- },
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- Updated dependencies
|
|
37
|
+
|
|
3
38
|
## 5.5.6
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
package/constants/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/constants.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/constants.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/constants.d.ts"
|
|
17
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/portal",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"description": "A wrapper for rendering components in React portals.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,14 +12,6 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
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
15
|
"sideEffects": [
|
|
24
16
|
"**/*.compiled.css"
|
|
25
17
|
],
|
|
@@ -39,9 +31,10 @@
|
|
|
39
31
|
}
|
|
40
32
|
},
|
|
41
33
|
"dependencies": {
|
|
42
|
-
"@atlaskit/app-provider": "^
|
|
43
|
-
"@atlaskit/platform-feature-flags": "^
|
|
44
|
-
"@atlaskit/theme": "^
|
|
34
|
+
"@atlaskit/app-provider": "^5.0.0",
|
|
35
|
+
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
36
|
+
"@atlaskit/theme": "^26.0.0",
|
|
37
|
+
"@atlassian/react-compiler-gating": "^0.2.0",
|
|
45
38
|
"@babel/runtime": "^7.0.0"
|
|
46
39
|
},
|
|
47
40
|
"peerDependencies": {
|
|
@@ -52,22 +45,21 @@
|
|
|
52
45
|
"@af/accessibility-testing": "workspace:^",
|
|
53
46
|
"@af/integration-testing": "workspace:^",
|
|
54
47
|
"@af/visual-regression": "workspace:^",
|
|
55
|
-
"@atlaskit/button": "^
|
|
56
|
-
"@atlaskit/code": "^
|
|
57
|
-
"@atlaskit/css": "^0.
|
|
58
|
-
"@atlaskit/docs": "^
|
|
59
|
-
"@atlaskit/flag": "^
|
|
60
|
-
"@atlaskit/icon": "^
|
|
61
|
-
"@atlaskit/inline-dialog": "^
|
|
62
|
-
"@atlaskit/link": "^
|
|
63
|
-
"@atlaskit/modal-dialog": "^
|
|
64
|
-
"@atlaskit/onboarding": "^
|
|
65
|
-
"@atlaskit/primitives": "^
|
|
66
|
-
"@atlaskit/section-message": "^
|
|
67
|
-
"@atlaskit/tokens": "^
|
|
68
|
-
"@atlaskit/tooltip": "^
|
|
48
|
+
"@atlaskit/button": "^24.1.0",
|
|
49
|
+
"@atlaskit/code": "^18.0.0",
|
|
50
|
+
"@atlaskit/css": "^1.0.0",
|
|
51
|
+
"@atlaskit/docs": "^12.0.0",
|
|
52
|
+
"@atlaskit/flag": "^18.0.0",
|
|
53
|
+
"@atlaskit/icon": "^36.0.0",
|
|
54
|
+
"@atlaskit/inline-dialog": "^19.0.0",
|
|
55
|
+
"@atlaskit/link": "^4.0.0",
|
|
56
|
+
"@atlaskit/modal-dialog": "^16.0.0",
|
|
57
|
+
"@atlaskit/onboarding": "^15.0.0",
|
|
58
|
+
"@atlaskit/primitives": "^20.0.0",
|
|
59
|
+
"@atlaskit/section-message": "^9.1.0",
|
|
60
|
+
"@atlaskit/tokens": "^15.0.0",
|
|
61
|
+
"@atlaskit/tooltip": "^23.0.0",
|
|
69
62
|
"@atlassian/feature-flags-test-utils": "^1.1.0",
|
|
70
|
-
"@atlassian/react-compiler-gating": "workspace:^",
|
|
71
63
|
"@atlassian/ssr-tests": "workspace:^",
|
|
72
64
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
73
65
|
"@compiled/react": "^0.20.0",
|
package/portal/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/portal.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/portal.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/portal.d.ts"
|
|
17
10
|
}
|
package/types/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/types.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/types.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/types.d.ts"
|
|
17
10
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { PORTAL_MOUNT_EVENT, PORTAL_UNMOUNT_EVENT } from '../constants';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../portal';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { PortalEvent, PortalProps } from '../types';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Layers } from '@atlaskit/theme/types';
|
|
2
|
-
/**
|
|
3
|
-
* Named layers of all z-index used in the Atlassian Design System.
|
|
4
|
-
*/
|
|
5
|
-
export type LayerName = keyof Layers;
|
|
6
|
-
/**
|
|
7
|
-
* Creates a new type by reversing the key and values of the passed type
|
|
8
|
-
* @param {T} T - the generic type to be reversed. Each members of it should be a Record in key-value form
|
|
9
|
-
* @returns - The reversed type
|
|
10
|
-
*/
|
|
11
|
-
type ReverseMap<T extends Record<keyof T, T[keyof T]>> = {
|
|
12
|
-
[P in T[keyof T]]: {
|
|
13
|
-
[K in keyof T]: T[K] extends P ? K : never;
|
|
14
|
-
}[keyof T];
|
|
15
|
-
};
|
|
16
|
-
export type ReversedLayers = ReverseMap<Layers>;
|
|
17
|
-
/**
|
|
18
|
-
* Interface for event to be fired on Atlassian Portal component mount and unmount
|
|
19
|
-
*/
|
|
20
|
-
export interface PortalEventDetail {
|
|
21
|
-
layer: LayerName | null;
|
|
22
|
-
zIndex: number;
|
|
23
|
-
}
|
|
24
|
-
export type MountStrategy = 'effect' | 'layoutEffect';
|
|
25
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const appendPortalContainerIfNotAppended: (container: HTMLDivElement) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const createAtlaskitPortal: (zIndex: number | string) => HTMLDivElement | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const createContainer: (zIndex: number | string) => HTMLDivElement;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const createPortalParent: () => Element | undefined;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Dispatches a custom event on window with given eventName, given zIndex and corresponding layer
|
|
3
|
-
* @param {string} eventName - either of Mount or Unmount event name
|
|
4
|
-
* @param {number} zIndex - z-index value which will be included in the event to be dispatched
|
|
5
|
-
*/
|
|
6
|
-
export default function firePortalEvent(eventName: string, zIndex: number): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const removePortalContainer: (container: HTMLDivElement) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const removePortalParent: (parentElement: Element) => void;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import { type MountStrategy, type PortalEventDetail } from './internal/types';
|
|
3
|
-
/**
|
|
4
|
-
* Interface for props to be passed in Atlassian Portal component
|
|
5
|
-
*/
|
|
6
|
-
export interface PortalProps {
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
zIndex?: number | string;
|
|
9
|
-
/**
|
|
10
|
-
* Specify the mount strategy: useEffect or useLayoutEffect.
|
|
11
|
-
* Note: UseLayoutEffect can lead to performance issues and is discouraged.
|
|
12
|
-
*/
|
|
13
|
-
mountStrategy?: MountStrategy;
|
|
14
|
-
/**
|
|
15
|
-
* Whether the portal is closed.
|
|
16
|
-
*/
|
|
17
|
-
isClosed?: boolean;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Custom event object that will be fired when Atlassian Portal component is mounted and unmounted
|
|
21
|
-
*/
|
|
22
|
-
export type PortalEvent = CustomEvent<PortalEventDetail>;
|