@atlaskit/popup 9.0.0 → 9.0.2
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 +19 -0
- package/dist/cjs/compositional/popup-content-top-layer.js +3 -2
- package/dist/cjs/popup-top-layer.js +3 -2
- package/dist/cjs/use-focus-manager.js +1 -1
- package/dist/es2019/compositional/popup-content-top-layer.js +3 -2
- package/dist/es2019/popup-top-layer.js +3 -2
- package/dist/es2019/use-focus-manager.js +1 -1
- package/dist/esm/compositional/popup-content-top-layer.js +3 -2
- package/dist/esm/popup-top-layer.js +3 -2
- package/dist/esm/use-focus-manager.js +1 -1
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/popup
|
|
2
2
|
|
|
3
|
+
## 9.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c0d0247b0e650`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c0d0247b0e650) -
|
|
8
|
+
With `platform-dst-top-layer` enabled, restore the raw `testId` on the default popup content
|
|
9
|
+
wrapper. Custom `popupComponent` implementations continue receiving the raw ID. The popover host
|
|
10
|
+
uses `${testId}--container` instead of `${testId}--content`, matching legacy Popup test ID naming
|
|
11
|
+
in both APIs.
|
|
12
|
+
|
|
13
|
+
## 9.0.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`edd874d160803`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/edd874d160803) -
|
|
18
|
+
Updated popup's focus trap fix made behind "platform_dst-popup-trigger-initial-focus-ref" to be
|
|
19
|
+
behind a second "platform-dst-popup-trigger-focus-fix" feature gate to coordinate rollout to all
|
|
20
|
+
consumers.
|
|
21
|
+
|
|
3
22
|
## 9.0.0
|
|
4
23
|
|
|
5
24
|
### Major Changes
|
|
@@ -190,7 +190,7 @@ function PopupContentTopLayer(_ref) {
|
|
|
190
190
|
shouldAnimate: true,
|
|
191
191
|
placement: topLayerPlacement,
|
|
192
192
|
onClose: handleOnClose,
|
|
193
|
-
testId: testId && "".concat(testId, "--
|
|
193
|
+
testId: testId && "".concat(testId, "--container")
|
|
194
194
|
}), Container ? /*#__PURE__*/React.createElement(Container, {
|
|
195
195
|
style: EMPTY_STYLE,
|
|
196
196
|
id: providedId,
|
|
@@ -212,6 +212,7 @@ function PopupContentTopLayer(_ref) {
|
|
|
212
212
|
// level in. Same shape as `../popup-top-layer.tsx`.
|
|
213
213
|
React.createElement(_popoverSurface.PopoverSurface, null, /*#__PURE__*/React.createElement("div", {
|
|
214
214
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
215
|
-
className: xcss
|
|
215
|
+
className: xcss,
|
|
216
|
+
"data-testid": testId
|
|
216
217
|
}, children(contentProps))));
|
|
217
218
|
}
|
|
@@ -221,7 +221,7 @@ var PopupTopLayer = exports.PopupTopLayer = /*#__PURE__*/(0, _react.memo)(functi
|
|
|
221
221
|
onClose: handleOnClose,
|
|
222
222
|
shouldAnimate: true,
|
|
223
223
|
placement: topLayerPlacement,
|
|
224
|
-
testId: testId && "".concat(testId, "--
|
|
224
|
+
testId: testId && "".concat(testId, "--container")
|
|
225
225
|
}), Container ? /*#__PURE__*/React.createElement(Container, {
|
|
226
226
|
style: EMPTY_STYLE,
|
|
227
227
|
id: providedId,
|
|
@@ -243,6 +243,7 @@ var PopupTopLayer = exports.PopupTopLayer = /*#__PURE__*/(0, _react.memo)(functi
|
|
|
243
243
|
// level in. Same shape as `compositional/popup-content-top-layer.tsx`.
|
|
244
244
|
React.createElement(_popoverSurface.PopoverSurface, null, /*#__PURE__*/React.createElement("div", {
|
|
245
245
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
246
|
-
className: xcss
|
|
246
|
+
className: xcss,
|
|
247
|
+
"data-testid": testId
|
|
247
248
|
}, content(contentProps)))));
|
|
248
249
|
});
|
|
@@ -61,7 +61,7 @@ var useFocusManager = exports.useFocusManager = function useFocusManager(_ref) {
|
|
|
61
61
|
return function () {
|
|
62
62
|
cancelAllFrames();
|
|
63
63
|
focusTrap.deactivate();
|
|
64
|
-
if ((0, _fg.fg)('platform_dst-popup-trigger-initial-focus-ref') && shouldReturnFocus) {
|
|
64
|
+
if (((0, _fg.fg)('platform-dst-popup-trigger-focus-fix') || (0, _fg.fg)('platform_dst-popup-trigger-initial-focus-ref')) && shouldReturnFocus) {
|
|
65
65
|
requestFrame(function () {
|
|
66
66
|
if (triggerRef !== null && triggerRef !== void 0 && triggerRef.isConnected && (document.activeElement === document.body || document.activeElement === document.documentElement || !document.activeElement)) {
|
|
67
67
|
triggerRef.focus();
|
|
@@ -196,7 +196,7 @@ export function PopupContentTopLayer({
|
|
|
196
196
|
shouldAnimate: true,
|
|
197
197
|
placement: topLayerPlacement,
|
|
198
198
|
onClose: handleOnClose,
|
|
199
|
-
testId: testId && `${testId}--
|
|
199
|
+
testId: testId && `${testId}--container`
|
|
200
200
|
}), Container ? /*#__PURE__*/React.createElement(Container, {
|
|
201
201
|
style: EMPTY_STYLE,
|
|
202
202
|
id: providedId,
|
|
@@ -218,6 +218,7 @@ export function PopupContentTopLayer({
|
|
|
218
218
|
// level in. Same shape as `../popup-top-layer.tsx`.
|
|
219
219
|
React.createElement(PopoverSurface, null, /*#__PURE__*/React.createElement("div", {
|
|
220
220
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
221
|
-
className: xcss
|
|
221
|
+
className: xcss,
|
|
222
|
+
"data-testid": testId
|
|
222
223
|
}, children(contentProps))));
|
|
223
224
|
}
|
|
@@ -233,7 +233,7 @@ export const PopupTopLayer = /*#__PURE__*/memo(function PopupTopLayer({
|
|
|
233
233
|
onClose: handleOnClose,
|
|
234
234
|
shouldAnimate: true,
|
|
235
235
|
placement: topLayerPlacement,
|
|
236
|
-
testId: testId && `${testId}--
|
|
236
|
+
testId: testId && `${testId}--container`
|
|
237
237
|
}), Container ? /*#__PURE__*/React.createElement(Container, {
|
|
238
238
|
style: EMPTY_STYLE,
|
|
239
239
|
id: providedId,
|
|
@@ -255,6 +255,7 @@ export const PopupTopLayer = /*#__PURE__*/memo(function PopupTopLayer({
|
|
|
255
255
|
// level in. Same shape as `compositional/popup-content-top-layer.tsx`.
|
|
256
256
|
React.createElement(PopoverSurface, null, /*#__PURE__*/React.createElement("div", {
|
|
257
257
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
258
|
-
className: xcss
|
|
258
|
+
className: xcss,
|
|
259
|
+
"data-testid": testId
|
|
259
260
|
}, content(contentProps)))));
|
|
260
261
|
});
|
|
@@ -57,7 +57,7 @@ export const useFocusManager = ({
|
|
|
57
57
|
return () => {
|
|
58
58
|
cancelAllFrames();
|
|
59
59
|
focusTrap.deactivate();
|
|
60
|
-
if (fg('platform_dst-popup-trigger-initial-focus-ref') && shouldReturnFocus) {
|
|
60
|
+
if ((fg('platform-dst-popup-trigger-focus-fix') || fg('platform_dst-popup-trigger-initial-focus-ref')) && shouldReturnFocus) {
|
|
61
61
|
requestFrame(() => {
|
|
62
62
|
if (triggerRef !== null && triggerRef !== void 0 && triggerRef.isConnected && (document.activeElement === document.body || document.activeElement === document.documentElement || !document.activeElement)) {
|
|
63
63
|
triggerRef.focus();
|
|
@@ -182,7 +182,7 @@ export function PopupContentTopLayer(_ref) {
|
|
|
182
182
|
shouldAnimate: true,
|
|
183
183
|
placement: topLayerPlacement,
|
|
184
184
|
onClose: handleOnClose,
|
|
185
|
-
testId: testId && "".concat(testId, "--
|
|
185
|
+
testId: testId && "".concat(testId, "--container")
|
|
186
186
|
}), Container ? /*#__PURE__*/React.createElement(Container, {
|
|
187
187
|
style: EMPTY_STYLE,
|
|
188
188
|
id: providedId,
|
|
@@ -204,6 +204,7 @@ export function PopupContentTopLayer(_ref) {
|
|
|
204
204
|
// level in. Same shape as `../popup-top-layer.tsx`.
|
|
205
205
|
React.createElement(PopoverSurface, null, /*#__PURE__*/React.createElement("div", {
|
|
206
206
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
207
|
-
className: xcss
|
|
207
|
+
className: xcss,
|
|
208
|
+
"data-testid": testId
|
|
208
209
|
}, children(contentProps))));
|
|
209
210
|
}
|
|
@@ -212,7 +212,7 @@ export var PopupTopLayer = /*#__PURE__*/memo(function PopupTopLayer(_ref) {
|
|
|
212
212
|
onClose: handleOnClose,
|
|
213
213
|
shouldAnimate: true,
|
|
214
214
|
placement: topLayerPlacement,
|
|
215
|
-
testId: testId && "".concat(testId, "--
|
|
215
|
+
testId: testId && "".concat(testId, "--container")
|
|
216
216
|
}), Container ? /*#__PURE__*/React.createElement(Container, {
|
|
217
217
|
style: EMPTY_STYLE,
|
|
218
218
|
id: providedId,
|
|
@@ -234,6 +234,7 @@ export var PopupTopLayer = /*#__PURE__*/memo(function PopupTopLayer(_ref) {
|
|
|
234
234
|
// level in. Same shape as `compositional/popup-content-top-layer.tsx`.
|
|
235
235
|
React.createElement(PopoverSurface, null, /*#__PURE__*/React.createElement("div", {
|
|
236
236
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
237
|
-
className: xcss
|
|
237
|
+
className: xcss,
|
|
238
|
+
"data-testid": testId
|
|
238
239
|
}, content(contentProps)))));
|
|
239
240
|
});
|
|
@@ -54,7 +54,7 @@ export var useFocusManager = function useFocusManager(_ref) {
|
|
|
54
54
|
return function () {
|
|
55
55
|
cancelAllFrames();
|
|
56
56
|
focusTrap.deactivate();
|
|
57
|
-
if (fg('platform_dst-popup-trigger-initial-focus-ref') && shouldReturnFocus) {
|
|
57
|
+
if ((fg('platform-dst-popup-trigger-focus-fix') || fg('platform_dst-popup-trigger-initial-focus-ref')) && shouldReturnFocus) {
|
|
58
58
|
requestFrame(function () {
|
|
59
59
|
if (triggerRef !== null && triggerRef !== void 0 && triggerRef.isConnected && (document.activeElement === document.body || document.activeElement === document.documentElement || !document.activeElement)) {
|
|
60
60
|
triggerRef.focus();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/popup",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.2",
|
|
4
4
|
"description": "A popup displays brief content in an overlay.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"@atlaskit/css": "^1.1.0",
|
|
38
38
|
"@atlaskit/ds-lib": "^8.0.0",
|
|
39
39
|
"@atlaskit/layering": "^6.0.0",
|
|
40
|
-
"@atlaskit/motion": "^9.
|
|
40
|
+
"@atlaskit/motion": "^9.3.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
42
42
|
"@atlaskit/popper": "^9.4.0",
|
|
43
43
|
"@atlaskit/portal": "^7.0.0",
|
|
44
44
|
"@atlaskit/primitives": "^22.5.0",
|
|
45
45
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
46
|
-
"@atlaskit/tokens": "^20.
|
|
47
|
-
"@atlaskit/top-layer": "^6.
|
|
46
|
+
"@atlaskit/tokens": "^20.4.0",
|
|
47
|
+
"@atlaskit/top-layer": "^6.2.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"@compiled/react": "^1.0.2",
|
|
50
50
|
"bind-event-listener": "^3.0.0",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"@atlaskit/banner": "^15.3.0",
|
|
64
64
|
"@atlaskit/button": "^25.4.0",
|
|
65
65
|
"@atlaskit/code": "^20.0.0",
|
|
66
|
-
"@atlaskit/datetime-picker": "^19.
|
|
66
|
+
"@atlaskit/datetime-picker": "^19.3.0",
|
|
67
67
|
"@atlaskit/docs": "^12.3.0",
|
|
68
68
|
"@atlaskit/dropdown-menu": "^21.0.0",
|
|
69
|
-
"@atlaskit/form": "^18.
|
|
69
|
+
"@atlaskit/form": "^18.2.0",
|
|
70
70
|
"@atlaskit/heading": "^8.0.0",
|
|
71
71
|
"@atlaskit/icon": "^38.0.0",
|
|
72
72
|
"@atlaskit/link": "^5.1.0",
|
|
@@ -122,6 +122,9 @@
|
|
|
122
122
|
"platform_dst-popup-trigger-initial-focus-ref": {
|
|
123
123
|
"type": "boolean"
|
|
124
124
|
},
|
|
125
|
+
"platform-dst-popup-trigger-focus-fix": {
|
|
126
|
+
"type": "boolean"
|
|
127
|
+
},
|
|
125
128
|
"platform_dst_popup_media_query_perf_fix": {
|
|
126
129
|
"type": "boolean"
|
|
127
130
|
}
|