@atlaskit/portal 5.5.3 → 5.5.5
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 +14 -0
- package/dist/cjs/internal/components/internal-portal-new.js +1 -1
- package/dist/cjs/internal/components/internal-portal.js +1 -1
- package/dist/es2019/internal/components/internal-portal-new.js +1 -1
- package/dist/es2019/internal/components/internal-portal.js +1 -1
- package/dist/esm/internal/components/internal-portal-new.js +1 -1
- package/dist/esm/internal/components/internal-portal.js +1 -1
- package/package.json +5 -8
- package/portal.docs.tsx +40 -38
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/portal
|
|
2
2
|
|
|
3
|
+
## 5.5.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`66215bbc9a383`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/66215bbc9a383) -
|
|
8
|
+
Cleanup feature gate `platform-dst-portal-conditial-theme-provider`. ThemeProvider wrapping
|
|
9
|
+
behaviour (wrapping portal children when inside a ThemeProvider) is now permanently enabled.
|
|
10
|
+
|
|
11
|
+
## 5.5.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 5.5.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -69,7 +69,7 @@ function InternalPortalNew(props) {
|
|
|
69
69
|
*/
|
|
70
70
|
var suspendedChildren = /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
71
71
|
fallback: null
|
|
72
|
-
},
|
|
72
|
+
}, isInsideThemeProvider ? /*#__PURE__*/_react.default.createElement(_appProvider.ThemeProvider, {
|
|
73
73
|
defaultColorMode: colorMode
|
|
74
74
|
}, children) : children);
|
|
75
75
|
return atlaskitPortal ? /*#__PURE__*/(0, _reactDom.createPortal)(suspendedChildren, atlaskitPortal) : null;
|
|
@@ -42,7 +42,7 @@ function InternalPortal(props) {
|
|
|
42
42
|
(0, _removePortalContainer.removePortalContainer)(container);
|
|
43
43
|
};
|
|
44
44
|
}, [container]);
|
|
45
|
-
return /*#__PURE__*/(0, _reactDom.createPortal)(
|
|
45
|
+
return /*#__PURE__*/(0, _reactDom.createPortal)(isInsideThemeProvider ? /*#__PURE__*/_react.default.createElement(_appProvider.ThemeProvider, {
|
|
46
46
|
defaultColorMode: colorMode
|
|
47
47
|
}, children) : children, container);
|
|
48
48
|
}
|
|
@@ -58,7 +58,7 @@ export default function InternalPortalNew(props) {
|
|
|
58
58
|
*/
|
|
59
59
|
const suspendedChildren = /*#__PURE__*/React.createElement(Suspense, {
|
|
60
60
|
fallback: null
|
|
61
|
-
},
|
|
61
|
+
}, isInsideThemeProvider ? /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
62
62
|
defaultColorMode: colorMode
|
|
63
63
|
}, children) : children);
|
|
64
64
|
return atlaskitPortal ? /*#__PURE__*/createPortal(suspendedChildren, atlaskitPortal) : null;
|
|
@@ -33,7 +33,7 @@ export default function InternalPortal(props) {
|
|
|
33
33
|
removePortalContainer(container);
|
|
34
34
|
};
|
|
35
35
|
}, [container]);
|
|
36
|
-
return /*#__PURE__*/createPortal(
|
|
36
|
+
return /*#__PURE__*/createPortal(isInsideThemeProvider ? /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
37
37
|
defaultColorMode: colorMode
|
|
38
38
|
}, children) : children, container);
|
|
39
39
|
}
|
|
@@ -60,7 +60,7 @@ export default function InternalPortalNew(props) {
|
|
|
60
60
|
*/
|
|
61
61
|
var suspendedChildren = /*#__PURE__*/React.createElement(Suspense, {
|
|
62
62
|
fallback: null
|
|
63
|
-
},
|
|
63
|
+
}, isInsideThemeProvider ? /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
64
64
|
defaultColorMode: colorMode
|
|
65
65
|
}, children) : children);
|
|
66
66
|
return atlaskitPortal ? /*#__PURE__*/createPortal(suspendedChildren, atlaskitPortal) : null;
|
|
@@ -34,7 +34,7 @@ export default function InternalPortal(props) {
|
|
|
34
34
|
removePortalContainer(container);
|
|
35
35
|
};
|
|
36
36
|
}, [container]);
|
|
37
|
-
return /*#__PURE__*/createPortal(
|
|
37
|
+
return /*#__PURE__*/createPortal(isInsideThemeProvider ? /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
38
38
|
defaultColorMode: colorMode
|
|
39
39
|
}, children) : children, container);
|
|
40
40
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/portal",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.5",
|
|
4
4
|
"description": "A wrapper for rendering components in React portals.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@atlaskit/app-provider": "^4.3.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
|
-
"@atlaskit/theme": "^
|
|
44
|
+
"@atlaskit/theme": "^25.0.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
@@ -57,15 +57,15 @@
|
|
|
57
57
|
"@atlaskit/css": "^0.19.0",
|
|
58
58
|
"@atlaskit/docs": "^11.8.0",
|
|
59
59
|
"@atlaskit/flag": "^17.12.0",
|
|
60
|
-
"@atlaskit/icon": "^35.
|
|
60
|
+
"@atlaskit/icon": "^35.3.0",
|
|
61
61
|
"@atlaskit/inline-dialog": "^18.1.0",
|
|
62
62
|
"@atlaskit/link": "^3.4.0",
|
|
63
|
-
"@atlaskit/modal-dialog": "^15.
|
|
63
|
+
"@atlaskit/modal-dialog": "^15.2.0",
|
|
64
64
|
"@atlaskit/onboarding": "^14.6.0",
|
|
65
65
|
"@atlaskit/primitives": "^19.0.0",
|
|
66
66
|
"@atlaskit/section-message": "^8.13.0",
|
|
67
67
|
"@atlaskit/tokens": "^13.0.0",
|
|
68
|
-
"@atlaskit/tooltip": "^22.
|
|
68
|
+
"@atlaskit/tooltip": "^22.3.0",
|
|
69
69
|
"@atlassian/feature-flags-test-utils": "^1.1.0",
|
|
70
70
|
"@atlassian/react-compiler-gating": "workspace:^",
|
|
71
71
|
"@atlassian/ssr-tests": "workspace:^",
|
|
@@ -109,9 +109,6 @@
|
|
|
109
109
|
},
|
|
110
110
|
"import_into_jsm_in_template_gallery_killswitch": {
|
|
111
111
|
"type": "boolean"
|
|
112
|
-
},
|
|
113
|
-
"platform-dst-portal-conditial-theme-provider": {
|
|
114
|
-
"type": "boolean"
|
|
115
112
|
}
|
|
116
113
|
}
|
|
117
114
|
}
|
package/portal.docs.tsx
CHANGED
|
@@ -1,46 +1,48 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
|
|
4
4
|
|
|
5
|
-
const documentation:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
description: 'A component for rendering content outside the normal DOM hierarchy.',
|
|
9
|
-
status: 'general-availability',
|
|
10
|
-
import: {
|
|
5
|
+
const documentation: StructuredContentSource = {
|
|
6
|
+
components: [
|
|
7
|
+
{
|
|
11
8
|
name: 'Portal',
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
packageJson: require('./package.json'),
|
|
16
|
-
},
|
|
17
|
-
usageGuidelines: [
|
|
18
|
-
'Use for rendering content outside normal DOM',
|
|
19
|
-
'Consider z-index and positioning',
|
|
20
|
-
'Handle focus management appropriately',
|
|
21
|
-
'Use for modals and overlays',
|
|
22
|
-
],
|
|
23
|
-
contentGuidelines: [
|
|
24
|
-
'Ensure portaled content is accessible',
|
|
25
|
-
'Consider content context and purpose',
|
|
26
|
-
'Use appropriate portal placement',
|
|
27
|
-
],
|
|
28
|
-
accessibilityGuidelines: [
|
|
29
|
-
'Ensure proper focus management',
|
|
30
|
-
'Consider screen reader accessibility',
|
|
31
|
-
'Use appropriate ARIA attributes',
|
|
32
|
-
'Handle keyboard navigation',
|
|
33
|
-
],
|
|
34
|
-
examples: [
|
|
35
|
-
{
|
|
9
|
+
description: 'A component for rendering content outside the normal DOM hierarchy.',
|
|
10
|
+
status: 'general-availability',
|
|
11
|
+
import: {
|
|
36
12
|
name: 'Portal',
|
|
37
|
-
|
|
38
|
-
|
|
13
|
+
package: '@atlaskit/portal',
|
|
14
|
+
type: 'default',
|
|
15
|
+
packagePath: path.resolve(__dirname),
|
|
16
|
+
packageJson: require('./package.json'),
|
|
39
17
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
18
|
+
usageGuidelines: [
|
|
19
|
+
'Use for rendering content outside normal DOM',
|
|
20
|
+
'Consider z-index and positioning',
|
|
21
|
+
'Handle focus management appropriately',
|
|
22
|
+
'Use for modals and overlays',
|
|
23
|
+
],
|
|
24
|
+
contentGuidelines: [
|
|
25
|
+
'Ensure portaled content is accessible',
|
|
26
|
+
'Consider content context and purpose',
|
|
27
|
+
'Use appropriate portal placement',
|
|
28
|
+
],
|
|
29
|
+
accessibilityGuidelines: [
|
|
30
|
+
'Ensure proper focus management',
|
|
31
|
+
'Consider screen reader accessibility',
|
|
32
|
+
'Use appropriate ARIA attributes',
|
|
33
|
+
'Handle keyboard navigation',
|
|
34
|
+
],
|
|
35
|
+
examples: [
|
|
36
|
+
{
|
|
37
|
+
name: 'Portal',
|
|
38
|
+
description: 'Portal example',
|
|
39
|
+
source: path.resolve(__dirname, './examples/ai/portal.tsx'),
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
keywords: ['portal', 'render', 'dom', 'mount', 'teleport'],
|
|
43
|
+
categories: ['utility'],
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
45
47
|
|
|
46
48
|
export default documentation;
|