@atlaskit/popup 1.30.1 → 1.30.3
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 +16 -0
- package/dist/cjs/popper-wrapper.js +3 -4
- package/dist/cjs/popup.js +1 -1
- package/dist/cjs/use-close-manager.js +27 -14
- package/dist/cjs/use-get-memoized-merged-trigger-ref-new.js +1 -1
- package/dist/es2019/popup.js +1 -1
- package/dist/es2019/use-close-manager.js +27 -14
- package/dist/es2019/use-get-memoized-merged-trigger-ref-new.js +1 -1
- package/dist/esm/popper-wrapper.js +3 -4
- package/dist/esm/popup.js +1 -1
- package/dist/esm/use-close-manager.js +27 -14
- package/dist/esm/use-get-memoized-merged-trigger-ref-new.js +1 -1
- package/dist/types/use-get-memoized-merged-trigger-ref-new.d.ts +1 -1
- package/dist/types-ts4.5/use-get-memoized-merged-trigger-ref-new.d.ts +1 -1
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/popup
|
|
2
2
|
|
|
3
|
+
## 1.30.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#181817](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/181817)
|
|
8
|
+
[`6876e5688ed14`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6876e5688ed14) -
|
|
9
|
+
Dropdown open in iframe should be closed when clicking outside of the iframe
|
|
10
|
+
|
|
11
|
+
## 1.30.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#180699](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/180699)
|
|
16
|
+
[`ba9603c950de1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ba9603c950de1) -
|
|
17
|
+
Clicking outside should close all popups
|
|
18
|
+
|
|
3
19
|
## 1.30.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -23,7 +23,6 @@ var _repositionOnUpdate = require("./reposition-on-update");
|
|
|
23
23
|
var _useCloseManager = require("./use-close-manager");
|
|
24
24
|
var _useFocusManager = require("./use-focus-manager");
|
|
25
25
|
var _excluded = ["shouldRenderToParent", "shouldFitContainer", "children", "appearance", "xcss"];
|
|
26
|
-
var _css;
|
|
27
26
|
/**
|
|
28
27
|
* @jsxRuntime classic
|
|
29
28
|
* @jsx jsx
|
|
@@ -31,7 +30,7 @@ var _css;
|
|
|
31
30
|
var fullWidthStyles = (0, _react2.css)({
|
|
32
31
|
width: '100%'
|
|
33
32
|
});
|
|
34
|
-
var rootStyles = (0, _react2.css)((
|
|
33
|
+
var rootStyles = (0, _react2.css)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
35
34
|
display: 'block',
|
|
36
35
|
boxSizing: 'border-box',
|
|
37
36
|
zIndex: _constants.layers.layer(),
|
|
@@ -42,9 +41,9 @@ var rootStyles = (0, _react2.css)((_css = {
|
|
|
42
41
|
// Otherwise, when rendering into the parent (not using a portal),
|
|
43
42
|
// the text color can be inherited from the parent.
|
|
44
43
|
color: "var(--ds-text, #172B4D)"
|
|
45
|
-
},
|
|
44
|
+
}, _tokens.CURRENT_SURFACE_CSS_VAR, "var(--ds-surface-overlay, ".concat(_colors.N0, ")")), '&:focus', {
|
|
46
45
|
outline: 'none'
|
|
47
|
-
})
|
|
46
|
+
}));
|
|
48
47
|
var scrollableStyles = (0, _react2.css)({
|
|
49
48
|
overflow: 'auto'
|
|
50
49
|
});
|
package/dist/cjs/popup.js
CHANGED
|
@@ -125,7 +125,7 @@ var Popup = exports.Popup = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
125
125
|
var popupContent = (0, _react2.jsx)(_popper.Manager, null, (0, _react2.jsx)(_popper.Reference, null, function (_ref2) {
|
|
126
126
|
var ref = _ref2.ref;
|
|
127
127
|
return trigger({
|
|
128
|
-
ref: !(0, _platformFeatureFlags.fg)('platform-design-system-
|
|
128
|
+
ref: !(0, _platformFeatureFlags.fg)('platform-design-system-popup-ref') ? getMergedTriggerRef(ref, setTriggerRef, isOpen) : getMergedTriggerRefNew(ref, setTriggerRef),
|
|
129
129
|
'aria-controls': isOpen ? id : undefined,
|
|
130
130
|
'aria-expanded': isOpen,
|
|
131
131
|
'aria-haspopup': role === 'dialog' && (0, _platformFeatureFlags.fg)('platform_dst_popup-disable-focuslock') ? 'dialog' : true
|
|
@@ -34,6 +34,7 @@ var useCloseManager = exports.useCloseManager = function useCloseManager(_ref) {
|
|
|
34
34
|
if (!isOpen || !popupRef) {
|
|
35
35
|
return _noop.default;
|
|
36
36
|
}
|
|
37
|
+
var inIframe = window && window.self !== window.top && (0, _platformFeatureFlags.fg)('fix-dropdown-close-outside-iframe');
|
|
37
38
|
var closePopup = function closePopup(event) {
|
|
38
39
|
if (onClose) {
|
|
39
40
|
if ((0, _platformFeatureFlags.fg)('sibling-dropdown-close-issue')) {
|
|
@@ -68,7 +69,7 @@ var useCloseManager = exports.useCloseManager = function useCloseManager(_ref) {
|
|
|
68
69
|
var onClick = function onClick(event) {
|
|
69
70
|
var target = event.target;
|
|
70
71
|
var doesDomNodeExist = document.body.contains(target);
|
|
71
|
-
if (!doesDomNodeExist) {
|
|
72
|
+
if (!doesDomNodeExist && !inIframe) {
|
|
72
73
|
return;
|
|
73
74
|
}
|
|
74
75
|
if (isLayerDisabled()) {
|
|
@@ -76,19 +77,17 @@ var useCloseManager = exports.useCloseManager = function useCloseManager(_ref) {
|
|
|
76
77
|
if (target instanceof HTMLElement) {
|
|
77
78
|
var _target$closest;
|
|
78
79
|
var layeredElement = (_target$closest = target.closest) === null || _target$closest === void 0 ? void 0 : _target$closest.call(target, "[data-ds--level]");
|
|
79
|
-
if (
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
// won't trigger onClick event when we click in a higher layer.
|
|
91
|
-
return;
|
|
80
|
+
if (layeredElement) {
|
|
81
|
+
var closeType = layeredElement.getAttribute('[data-ds--close--type]');
|
|
82
|
+
if (closeType === 'single') {
|
|
83
|
+
// if the close type is single, we won't close other disabled layers when clicking outside
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
var levelOfClickedLayer = layeredElement.getAttribute('data-ds--level');
|
|
87
|
+
if (levelOfClickedLayer && Number(levelOfClickedLayer) > currentLevel) {
|
|
88
|
+
// won't trigger onClick event when we click in a higher layer.
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
93
|
} else {
|
|
@@ -177,6 +176,18 @@ var useCloseManager = exports.useCloseManager = function useCloseManager(_ref) {
|
|
|
177
176
|
}
|
|
178
177
|
}
|
|
179
178
|
};
|
|
179
|
+
var parentUnbind;
|
|
180
|
+
// if the popup is inside iframe, we want to listen to click events outside iframe,
|
|
181
|
+
// to close the popup correctly in the iframe.
|
|
182
|
+
if (inIframe && isOpen) {
|
|
183
|
+
parentUnbind = (0, _bindEventListener.bind)(window.parent.window, {
|
|
184
|
+
type: 'click',
|
|
185
|
+
listener: onClick,
|
|
186
|
+
options: {
|
|
187
|
+
capture: capture
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
}
|
|
180
191
|
var unbind = (0, _bindEventListener.bindAll)(window, [{
|
|
181
192
|
type: 'click',
|
|
182
193
|
listener: onClick,
|
|
@@ -200,8 +211,10 @@ var useCloseManager = exports.useCloseManager = function useCloseManager(_ref) {
|
|
|
200
211
|
}
|
|
201
212
|
});
|
|
202
213
|
return function () {
|
|
214
|
+
var _parentUnbind;
|
|
203
215
|
cancelAllFrames();
|
|
204
216
|
unbind();
|
|
217
|
+
(_parentUnbind = parentUnbind) === null || _parentUnbind === void 0 || _parentUnbind();
|
|
205
218
|
unbindBlur();
|
|
206
219
|
};
|
|
207
220
|
}, [isOpen, onClose, popupRef, triggerRef, autoFocus, shouldDisableFocusTrap, capture, isLayerDisabled, shouldCloseOnTab, currentLevel, shouldRenderToParent, requestFrame, cancelAllFrames]);
|
|
@@ -10,7 +10,7 @@ var _react = require("react");
|
|
|
10
10
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
11
11
|
/**
|
|
12
12
|
* Here setting ref is not dependent on isOpen flag which is failing in React 18 strict mode
|
|
13
|
-
* Implemented behind ff `platform-design-system-
|
|
13
|
+
* Implemented behind ff `platform-design-system-popup-ref`
|
|
14
14
|
* @returns Function to set trigger ref
|
|
15
15
|
*/
|
|
16
16
|
var useGetMemoizedMergedTriggerRefNew = exports.useGetMemoizedMergedTriggerRefNew = function useGetMemoizedMergedTriggerRefNew() {
|
package/dist/es2019/popup.js
CHANGED
|
@@ -105,7 +105,7 @@ export const Popup = /*#__PURE__*/memo(({
|
|
|
105
105
|
ref
|
|
106
106
|
}) => {
|
|
107
107
|
return trigger({
|
|
108
|
-
ref: !fg('platform-design-system-
|
|
108
|
+
ref: !fg('platform-design-system-popup-ref') ? getMergedTriggerRef(ref, setTriggerRef, isOpen) : getMergedTriggerRefNew(ref, setTriggerRef),
|
|
109
109
|
'aria-controls': isOpen ? id : undefined,
|
|
110
110
|
'aria-expanded': isOpen,
|
|
111
111
|
'aria-haspopup': role === 'dialog' && fg('platform_dst_popup-disable-focuslock') ? 'dialog' : true
|
|
@@ -29,6 +29,7 @@ export const useCloseManager = ({
|
|
|
29
29
|
if (!isOpen || !popupRef) {
|
|
30
30
|
return noop;
|
|
31
31
|
}
|
|
32
|
+
const inIframe = window && window.self !== window.top && fg('fix-dropdown-close-outside-iframe');
|
|
32
33
|
const closePopup = event => {
|
|
33
34
|
if (onClose) {
|
|
34
35
|
if (fg('sibling-dropdown-close-issue')) {
|
|
@@ -65,7 +66,7 @@ export const useCloseManager = ({
|
|
|
65
66
|
target
|
|
66
67
|
} = event;
|
|
67
68
|
const doesDomNodeExist = document.body.contains(target);
|
|
68
|
-
if (!doesDomNodeExist) {
|
|
69
|
+
if (!doesDomNodeExist && !inIframe) {
|
|
69
70
|
return;
|
|
70
71
|
}
|
|
71
72
|
if (isLayerDisabled()) {
|
|
@@ -73,19 +74,17 @@ export const useCloseManager = ({
|
|
|
73
74
|
if (target instanceof HTMLElement) {
|
|
74
75
|
var _target$closest;
|
|
75
76
|
const layeredElement = (_target$closest = target.closest) === null || _target$closest === void 0 ? void 0 : _target$closest.call(target, `[data-ds--level]`);
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
// won't trigger onClick event when we click in a higher layer.
|
|
88
|
-
return;
|
|
77
|
+
if (layeredElement) {
|
|
78
|
+
const closeType = layeredElement.getAttribute('[data-ds--close--type]');
|
|
79
|
+
if (closeType === 'single') {
|
|
80
|
+
// if the close type is single, we won't close other disabled layers when clicking outside
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const levelOfClickedLayer = layeredElement.getAttribute('data-ds--level');
|
|
84
|
+
if (levelOfClickedLayer && Number(levelOfClickedLayer) > currentLevel) {
|
|
85
|
+
// won't trigger onClick event when we click in a higher layer.
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
89
88
|
}
|
|
90
89
|
}
|
|
91
90
|
} else {
|
|
@@ -178,6 +177,18 @@ export const useCloseManager = ({
|
|
|
178
177
|
}
|
|
179
178
|
}
|
|
180
179
|
};
|
|
180
|
+
let parentUnbind;
|
|
181
|
+
// if the popup is inside iframe, we want to listen to click events outside iframe,
|
|
182
|
+
// to close the popup correctly in the iframe.
|
|
183
|
+
if (inIframe && isOpen) {
|
|
184
|
+
parentUnbind = bind(window.parent.window, {
|
|
185
|
+
type: 'click',
|
|
186
|
+
listener: onClick,
|
|
187
|
+
options: {
|
|
188
|
+
capture
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
}
|
|
181
192
|
const unbind = bindAll(window, [{
|
|
182
193
|
type: 'click',
|
|
183
194
|
listener: onClick,
|
|
@@ -201,8 +212,10 @@ export const useCloseManager = ({
|
|
|
201
212
|
}
|
|
202
213
|
});
|
|
203
214
|
return () => {
|
|
215
|
+
var _parentUnbind;
|
|
204
216
|
cancelAllFrames();
|
|
205
217
|
unbind();
|
|
218
|
+
(_parentUnbind = parentUnbind) === null || _parentUnbind === void 0 ? void 0 : _parentUnbind();
|
|
206
219
|
unbindBlur();
|
|
207
220
|
};
|
|
208
221
|
}, [isOpen, onClose, popupRef, triggerRef, autoFocus, shouldDisableFocusTrap, capture, isLayerDisabled, shouldCloseOnTab, currentLevel, shouldRenderToParent, requestFrame, cancelAllFrames]);
|
|
@@ -3,7 +3,7 @@ import memoizeOne from 'memoize-one';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Here setting ref is not dependent on isOpen flag which is failing in React 18 strict mode
|
|
6
|
-
* Implemented behind ff `platform-design-system-
|
|
6
|
+
* Implemented behind ff `platform-design-system-popup-ref`
|
|
7
7
|
* @returns Function to set trigger ref
|
|
8
8
|
*/
|
|
9
9
|
export const useGetMemoizedMergedTriggerRefNew = () => {
|
|
@@ -4,7 +4,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
5
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
6
6
|
var _excluded = ["shouldRenderToParent", "shouldFitContainer", "children", "appearance", "xcss"];
|
|
7
|
-
var _css;
|
|
8
7
|
/**
|
|
9
8
|
* @jsxRuntime classic
|
|
10
9
|
* @jsx jsx
|
|
@@ -24,7 +23,7 @@ import { useFocusManager } from './use-focus-manager';
|
|
|
24
23
|
var fullWidthStyles = css({
|
|
25
24
|
width: '100%'
|
|
26
25
|
});
|
|
27
|
-
var rootStyles = css((
|
|
26
|
+
var rootStyles = css(_defineProperty(_defineProperty({
|
|
28
27
|
display: 'block',
|
|
29
28
|
boxSizing: 'border-box',
|
|
30
29
|
zIndex: layers.layer(),
|
|
@@ -35,9 +34,9 @@ var rootStyles = css((_css = {
|
|
|
35
34
|
// Otherwise, when rendering into the parent (not using a portal),
|
|
36
35
|
// the text color can be inherited from the parent.
|
|
37
36
|
color: "var(--ds-text, #172B4D)"
|
|
38
|
-
},
|
|
37
|
+
}, CURRENT_SURFACE_CSS_VAR, "var(--ds-surface-overlay, ".concat(N0, ")")), '&:focus', {
|
|
39
38
|
outline: 'none'
|
|
40
|
-
})
|
|
39
|
+
}));
|
|
41
40
|
var scrollableStyles = css({
|
|
42
41
|
overflow: 'auto'
|
|
43
42
|
});
|
package/dist/esm/popup.js
CHANGED
|
@@ -117,7 +117,7 @@ export var Popup = /*#__PURE__*/memo(function (_ref) {
|
|
|
117
117
|
var popupContent = jsx(Manager, null, jsx(Reference, null, function (_ref2) {
|
|
118
118
|
var ref = _ref2.ref;
|
|
119
119
|
return trigger({
|
|
120
|
-
ref: !fg('platform-design-system-
|
|
120
|
+
ref: !fg('platform-design-system-popup-ref') ? getMergedTriggerRef(ref, setTriggerRef, isOpen) : getMergedTriggerRefNew(ref, setTriggerRef),
|
|
121
121
|
'aria-controls': isOpen ? id : undefined,
|
|
122
122
|
'aria-expanded': isOpen,
|
|
123
123
|
'aria-haspopup': role === 'dialog' && fg('platform_dst_popup-disable-focuslock') ? 'dialog' : true
|
|
@@ -26,6 +26,7 @@ export var useCloseManager = function useCloseManager(_ref) {
|
|
|
26
26
|
if (!isOpen || !popupRef) {
|
|
27
27
|
return noop;
|
|
28
28
|
}
|
|
29
|
+
var inIframe = window && window.self !== window.top && fg('fix-dropdown-close-outside-iframe');
|
|
29
30
|
var closePopup = function closePopup(event) {
|
|
30
31
|
if (onClose) {
|
|
31
32
|
if (fg('sibling-dropdown-close-issue')) {
|
|
@@ -60,7 +61,7 @@ export var useCloseManager = function useCloseManager(_ref) {
|
|
|
60
61
|
var onClick = function onClick(event) {
|
|
61
62
|
var target = event.target;
|
|
62
63
|
var doesDomNodeExist = document.body.contains(target);
|
|
63
|
-
if (!doesDomNodeExist) {
|
|
64
|
+
if (!doesDomNodeExist && !inIframe) {
|
|
64
65
|
return;
|
|
65
66
|
}
|
|
66
67
|
if (isLayerDisabled()) {
|
|
@@ -68,19 +69,17 @@ export var useCloseManager = function useCloseManager(_ref) {
|
|
|
68
69
|
if (target instanceof HTMLElement) {
|
|
69
70
|
var _target$closest;
|
|
70
71
|
var layeredElement = (_target$closest = target.closest) === null || _target$closest === void 0 ? void 0 : _target$closest.call(target, "[data-ds--level]");
|
|
71
|
-
if (
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
// won't trigger onClick event when we click in a higher layer.
|
|
83
|
-
return;
|
|
72
|
+
if (layeredElement) {
|
|
73
|
+
var closeType = layeredElement.getAttribute('[data-ds--close--type]');
|
|
74
|
+
if (closeType === 'single') {
|
|
75
|
+
// if the close type is single, we won't close other disabled layers when clicking outside
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
var levelOfClickedLayer = layeredElement.getAttribute('data-ds--level');
|
|
79
|
+
if (levelOfClickedLayer && Number(levelOfClickedLayer) > currentLevel) {
|
|
80
|
+
// won't trigger onClick event when we click in a higher layer.
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
84
83
|
}
|
|
85
84
|
}
|
|
86
85
|
} else {
|
|
@@ -169,6 +168,18 @@ export var useCloseManager = function useCloseManager(_ref) {
|
|
|
169
168
|
}
|
|
170
169
|
}
|
|
171
170
|
};
|
|
171
|
+
var parentUnbind;
|
|
172
|
+
// if the popup is inside iframe, we want to listen to click events outside iframe,
|
|
173
|
+
// to close the popup correctly in the iframe.
|
|
174
|
+
if (inIframe && isOpen) {
|
|
175
|
+
parentUnbind = bind(window.parent.window, {
|
|
176
|
+
type: 'click',
|
|
177
|
+
listener: onClick,
|
|
178
|
+
options: {
|
|
179
|
+
capture: capture
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
}
|
|
172
183
|
var unbind = bindAll(window, [{
|
|
173
184
|
type: 'click',
|
|
174
185
|
listener: onClick,
|
|
@@ -192,8 +203,10 @@ export var useCloseManager = function useCloseManager(_ref) {
|
|
|
192
203
|
}
|
|
193
204
|
});
|
|
194
205
|
return function () {
|
|
206
|
+
var _parentUnbind;
|
|
195
207
|
cancelAllFrames();
|
|
196
208
|
unbind();
|
|
209
|
+
(_parentUnbind = parentUnbind) === null || _parentUnbind === void 0 || _parentUnbind();
|
|
197
210
|
unbindBlur();
|
|
198
211
|
};
|
|
199
212
|
}, [isOpen, onClose, popupRef, triggerRef, autoFocus, shouldDisableFocusTrap, capture, isLayerDisabled, shouldCloseOnTab, currentLevel, shouldRenderToParent, requestFrame, cancelAllFrames]);
|
|
@@ -4,7 +4,7 @@ import memoizeOne from 'memoize-one';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Here setting ref is not dependent on isOpen flag which is failing in React 18 strict mode
|
|
7
|
-
* Implemented behind ff `platform-design-system-
|
|
7
|
+
* Implemented behind ff `platform-design-system-popup-ref`
|
|
8
8
|
* @returns Function to set trigger ref
|
|
9
9
|
*/
|
|
10
10
|
export var useGetMemoizedMergedTriggerRefNew = function useGetMemoizedMergedTriggerRefNew() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Dispatch, type SetStateAction } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Here setting ref is not dependent on isOpen flag which is failing in React 18 strict mode
|
|
4
|
-
* Implemented behind ff `platform-design-system-
|
|
4
|
+
* Implemented behind ff `platform-design-system-popup-ref`
|
|
5
5
|
* @returns Function to set trigger ref
|
|
6
6
|
*/
|
|
7
7
|
export declare const useGetMemoizedMergedTriggerRefNew: () => import("memoize-one").MemoizedFn<(ref: React.RefCallback<HTMLElement> | React.MutableRefObject<HTMLElement> | null, setTriggerRef: Dispatch<SetStateAction<HTMLElement | null>>) => (node: HTMLElement | null) => void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Dispatch, type SetStateAction } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Here setting ref is not dependent on isOpen flag which is failing in React 18 strict mode
|
|
4
|
-
* Implemented behind ff `platform-design-system-
|
|
4
|
+
* Implemented behind ff `platform-design-system-popup-ref`
|
|
5
5
|
* @returns Function to set trigger ref
|
|
6
6
|
*/
|
|
7
7
|
export declare const useGetMemoizedMergedTriggerRefNew: () => import("memoize-one").MemoizedFn<(ref: React.RefCallback<HTMLElement> | React.MutableRefObject<HTMLElement> | null, setTriggerRef: Dispatch<SetStateAction<HTMLElement | null>>) => (node: HTMLElement | null) => void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/popup",
|
|
3
|
-
"version": "1.30.
|
|
3
|
+
"version": "1.30.3",
|
|
4
4
|
"description": "A popup displays brief content in an overlay.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"@atlaskit/layering": "^1.0.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
46
46
|
"@atlaskit/popper": "^6.3.0",
|
|
47
|
-
"@atlaskit/portal": "^4.
|
|
47
|
+
"@atlaskit/portal": "^4.10.0",
|
|
48
48
|
"@atlaskit/primitives": "^13.3.0",
|
|
49
49
|
"@atlaskit/theme": "^14.0.0",
|
|
50
|
-
"@atlaskit/tokens": "^2.
|
|
50
|
+
"@atlaskit/tokens": "^2.5.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"@emotion/react": "^11.7.1",
|
|
53
53
|
"bind-event-listener": "^3.0.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@atlaskit/icon": "^23.1.0",
|
|
68
68
|
"@atlaskit/ssr": "*",
|
|
69
69
|
"@atlaskit/textfield": "^6.7.0",
|
|
70
|
-
"@atlaskit/toggle": "^
|
|
70
|
+
"@atlaskit/toggle": "^14.0.0",
|
|
71
71
|
"@atlaskit/visual-regression": "*",
|
|
72
72
|
"@atlassian/feature-flags-test-utils": "*",
|
|
73
73
|
"@compiled/react": "^0.18.1",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"platform_dst_popup-disable-focuslock": {
|
|
113
113
|
"type": "boolean"
|
|
114
114
|
},
|
|
115
|
-
"platform-design-system-
|
|
115
|
+
"platform-design-system-popup-ref": {
|
|
116
116
|
"type": "boolean"
|
|
117
117
|
},
|
|
118
118
|
"design-system-closed-all-when-click-outside": {
|
|
@@ -123,6 +123,9 @@
|
|
|
123
123
|
},
|
|
124
124
|
"platform-design-system-apply-popup-wrapper-focus": {
|
|
125
125
|
"type": "boolean"
|
|
126
|
+
},
|
|
127
|
+
"fix-dropdown-close-outside-iframe": {
|
|
128
|
+
"type": "boolean"
|
|
126
129
|
}
|
|
127
130
|
},
|
|
128
131
|
"homepage": "https://atlassian.design/components/popup/"
|