@atlaskit/popup 4.23.3 → 4.23.4
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 +9 -0
- package/dist/cjs/compositional/popup-content-top-layer.js +7 -2
- package/dist/cjs/popup-top-layer.js +4 -2
- package/dist/es2019/compositional/popup-content-top-layer.js +7 -2
- package/dist/es2019/popup-top-layer.js +4 -2
- package/dist/esm/compositional/popup-content-top-layer.js +7 -2
- package/dist/esm/popup-top-layer.js +4 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/popup
|
|
2
2
|
|
|
3
|
+
## 4.23.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6d0485dce81c4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6d0485dce81c4) -
|
|
8
|
+
Internal: updated to the new `@atlaskit/top-layer` `Popover`/`Dialog` behaviour where the host
|
|
9
|
+
element unmounts after the exit animation completes. No consumer action required.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 4.23.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -109,15 +109,20 @@ function PopupContentTopLayer(_ref) {
|
|
|
109
109
|
});
|
|
110
110
|
var popoverRef = (0, _react.useRef)(null);
|
|
111
111
|
var anchorRef = (0, _react.useContext)(_triggerRefObjectContext.TriggerRefObjectContext);
|
|
112
|
+
|
|
113
|
+
// `isOpen` is included so the anchor positioning effect re-runs when
|
|
114
|
+
// the Popover host element is unmounted/remounted across open cycles.
|
|
112
115
|
(0, _useAnchorPosition.useAnchorPosition)({
|
|
113
116
|
anchorRef: anchorRef,
|
|
114
117
|
popoverRef: popoverRef,
|
|
115
|
-
placement: topLayerPlacement
|
|
118
|
+
placement: topLayerPlacement,
|
|
119
|
+
isOpen: isOpen
|
|
116
120
|
});
|
|
117
121
|
(0, _useWidthFromAnchor.useWidthFromAnchor)({
|
|
118
122
|
mode: shouldFitContainer ? 'match-anchor' : 'none',
|
|
119
123
|
popoverRef: popoverRef,
|
|
120
|
-
anchorRef: anchorRef
|
|
124
|
+
anchorRef: anchorRef,
|
|
125
|
+
isOpen: isOpen
|
|
121
126
|
});
|
|
122
127
|
|
|
123
128
|
// Narrow to ForwardRefExoticComponent so JSX accepts the ref prop.
|
|
@@ -97,12 +97,14 @@ var PopupTopLayer = exports.PopupTopLayer = /*#__PURE__*/(0, _react.memo)(functi
|
|
|
97
97
|
(0, _useAnchorPosition.useAnchorPosition)({
|
|
98
98
|
anchorRef: triggerRef,
|
|
99
99
|
popoverRef: popoverRef,
|
|
100
|
-
placement: topLayerPlacement
|
|
100
|
+
placement: topLayerPlacement,
|
|
101
|
+
isOpen: isOpen
|
|
101
102
|
});
|
|
102
103
|
(0, _useWidthFromAnchor.useWidthFromAnchor)({
|
|
103
104
|
mode: shouldFitContainer ? 'match-anchor' : 'none',
|
|
104
105
|
popoverRef: popoverRef,
|
|
105
|
-
anchorRef: triggerRef
|
|
106
|
+
anchorRef: triggerRef,
|
|
107
|
+
isOpen: isOpen
|
|
106
108
|
});
|
|
107
109
|
|
|
108
110
|
// onClose bridge.
|
|
@@ -114,15 +114,20 @@ export function PopupContentTopLayer({
|
|
|
114
114
|
});
|
|
115
115
|
const popoverRef = useRef(null);
|
|
116
116
|
const anchorRef = useContext(TriggerRefObjectContext);
|
|
117
|
+
|
|
118
|
+
// `isOpen` is included so the anchor positioning effect re-runs when
|
|
119
|
+
// the Popover host element is unmounted/remounted across open cycles.
|
|
117
120
|
useAnchorPosition({
|
|
118
121
|
anchorRef,
|
|
119
122
|
popoverRef,
|
|
120
|
-
placement: topLayerPlacement
|
|
123
|
+
placement: topLayerPlacement,
|
|
124
|
+
isOpen
|
|
121
125
|
});
|
|
122
126
|
useWidthFromAnchor({
|
|
123
127
|
mode: shouldFitContainer ? 'match-anchor' : 'none',
|
|
124
128
|
popoverRef,
|
|
125
|
-
anchorRef
|
|
129
|
+
anchorRef,
|
|
130
|
+
isOpen
|
|
126
131
|
});
|
|
127
132
|
|
|
128
133
|
// Narrow to ForwardRefExoticComponent so JSX accepts the ref prop.
|
|
@@ -105,12 +105,14 @@ export const PopupTopLayer = /*#__PURE__*/memo(function PopupTopLayer({
|
|
|
105
105
|
useAnchorPosition({
|
|
106
106
|
anchorRef: triggerRef,
|
|
107
107
|
popoverRef,
|
|
108
|
-
placement: topLayerPlacement
|
|
108
|
+
placement: topLayerPlacement,
|
|
109
|
+
isOpen
|
|
109
110
|
});
|
|
110
111
|
useWidthFromAnchor({
|
|
111
112
|
mode: shouldFitContainer ? 'match-anchor' : 'none',
|
|
112
113
|
popoverRef,
|
|
113
|
-
anchorRef: triggerRef
|
|
114
|
+
anchorRef: triggerRef,
|
|
115
|
+
isOpen
|
|
114
116
|
});
|
|
115
117
|
|
|
116
118
|
// onClose bridge.
|
|
@@ -100,15 +100,20 @@ export function PopupContentTopLayer(_ref) {
|
|
|
100
100
|
});
|
|
101
101
|
var popoverRef = useRef(null);
|
|
102
102
|
var anchorRef = useContext(TriggerRefObjectContext);
|
|
103
|
+
|
|
104
|
+
// `isOpen` is included so the anchor positioning effect re-runs when
|
|
105
|
+
// the Popover host element is unmounted/remounted across open cycles.
|
|
103
106
|
useAnchorPosition({
|
|
104
107
|
anchorRef: anchorRef,
|
|
105
108
|
popoverRef: popoverRef,
|
|
106
|
-
placement: topLayerPlacement
|
|
109
|
+
placement: topLayerPlacement,
|
|
110
|
+
isOpen: isOpen
|
|
107
111
|
});
|
|
108
112
|
useWidthFromAnchor({
|
|
109
113
|
mode: shouldFitContainer ? 'match-anchor' : 'none',
|
|
110
114
|
popoverRef: popoverRef,
|
|
111
|
-
anchorRef: anchorRef
|
|
115
|
+
anchorRef: anchorRef,
|
|
116
|
+
isOpen: isOpen
|
|
112
117
|
});
|
|
113
118
|
|
|
114
119
|
// Narrow to ForwardRefExoticComponent so JSX accepts the ref prop.
|
|
@@ -88,12 +88,14 @@ export var PopupTopLayer = /*#__PURE__*/memo(function PopupTopLayer(_ref) {
|
|
|
88
88
|
useAnchorPosition({
|
|
89
89
|
anchorRef: triggerRef,
|
|
90
90
|
popoverRef: popoverRef,
|
|
91
|
-
placement: topLayerPlacement
|
|
91
|
+
placement: topLayerPlacement,
|
|
92
|
+
isOpen: isOpen
|
|
92
93
|
});
|
|
93
94
|
useWidthFromAnchor({
|
|
94
95
|
mode: shouldFitContainer ? 'match-anchor' : 'none',
|
|
95
96
|
popoverRef: popoverRef,
|
|
96
|
-
anchorRef: triggerRef
|
|
97
|
+
anchorRef: triggerRef,
|
|
98
|
+
isOpen: isOpen
|
|
97
99
|
});
|
|
98
100
|
|
|
99
101
|
// onClose bridge.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/popup",
|
|
3
|
-
"version": "4.23.
|
|
3
|
+
"version": "4.23.4",
|
|
4
4
|
"description": "A popup displays brief content in an overlay.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/portal": "^5.5.0",
|
|
49
49
|
"@atlaskit/primitives": "^19.0.0",
|
|
50
50
|
"@atlaskit/tokens": "^13.3.0",
|
|
51
|
-
"@atlaskit/top-layer": "^0.
|
|
51
|
+
"@atlaskit/top-layer": "^0.16.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@compiled/react": "^0.20.0",
|
|
54
54
|
"bind-event-listener": "^3.0.0",
|