@atlaskit/popup 9.0.2 → 9.0.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 +9 -0
- package/dist/cjs/popper-wrapper.js +3 -2
- package/dist/cjs/popup-top-layer.js +3 -2
- package/dist/cjs/popup.js +2 -2
- package/dist/cjs/use-appearance.js +2 -2
- package/dist/es2019/popper-wrapper.js +3 -2
- package/dist/es2019/popup-top-layer.js +3 -2
- package/dist/es2019/popup.js +1 -1
- package/dist/es2019/use-appearance.js +1 -1
- package/dist/esm/popper-wrapper.js +3 -2
- package/dist/esm/popup-top-layer.js +3 -2
- package/dist/esm/popup.js +1 -1
- package/dist/esm/use-appearance.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/popup
|
|
2
2
|
|
|
3
|
+
## 9.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`cf31b7db11afe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cf31b7db11afe) -
|
|
8
|
+
Isolate container content from parent entry and exit motion behind
|
|
9
|
+
platform-dst-motion-isolate-presence, so nested tags animate only for their own changes.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 9.0.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -18,6 +18,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
18
18
|
var _runtime = require("@compiled/react/runtime");
|
|
19
19
|
var _useLayering2 = require("@atlaskit/layering/use-layering");
|
|
20
20
|
var _motion = _interopRequireDefault(require("@atlaskit/motion/entering/motion"));
|
|
21
|
+
var _motionPresenceBoundary = _interopRequireDefault(require("@atlaskit/motion/motion-presence-boundary"));
|
|
21
22
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
22
23
|
var _main = require("@atlaskit/popper/main");
|
|
23
24
|
var _repositionOnUpdate = require("./reposition-on-update");
|
|
@@ -235,12 +236,12 @@ function PopperWrapper(_ref) {
|
|
|
235
236
|
isReferenceHidden: isReferenceHidden
|
|
236
237
|
}, /*#__PURE__*/React.createElement(_repositionOnUpdate.RepositionOnUpdate, {
|
|
237
238
|
update: update
|
|
238
|
-
}, content({
|
|
239
|
+
}, /*#__PURE__*/React.createElement(_motionPresenceBoundary.default, null, content({
|
|
239
240
|
update: update,
|
|
240
241
|
isOpen: isOpen,
|
|
241
242
|
onClose: onClose,
|
|
242
243
|
setInitialFocusRef: setInitialFocusRef
|
|
243
|
-
})));
|
|
244
|
+
}))));
|
|
244
245
|
var isAutoPlacement = placement === 'auto' || placement === 'auto-start' || placement === 'auto-end';
|
|
245
246
|
var container = /*#__PURE__*/React.createElement("div", {
|
|
246
247
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
@@ -13,6 +13,7 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
13
13
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
16
|
+
var _motionPresenceBoundary = _interopRequireDefault(require("@atlaskit/motion/motion-presence-boundary"));
|
|
16
17
|
var _getAriaForTrigger = require("@atlaskit/top-layer/get-aria-for-trigger");
|
|
17
18
|
var _index = require("@atlaskit/top-layer/placement-map/index");
|
|
18
19
|
var _popoverSurface = require("@atlaskit/top-layer/popover-surface");
|
|
@@ -233,7 +234,7 @@ var PopupTopLayer = exports.PopupTopLayer = /*#__PURE__*/(0, _react.memo)(functi
|
|
|
233
234
|
// `overflow: auto` branch off it.
|
|
234
235
|
,
|
|
235
236
|
shouldFitViewport: shouldFitViewport
|
|
236
|
-
}, content(contentProps)) :
|
|
237
|
+
}, /*#__PURE__*/React.createElement(_motionPresenceBoundary.default, null, content(contentProps))) :
|
|
237
238
|
/*#__PURE__*/
|
|
238
239
|
// `PopoverSurface` owns `overflow: auto` and the `box-shadow` on the
|
|
239
240
|
// same element, so it is the scroll container. The wrapper exists only
|
|
@@ -245,5 +246,5 @@ var PopupTopLayer = exports.PopupTopLayer = /*#__PURE__*/(0, _react.memo)(functi
|
|
|
245
246
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
246
247
|
className: xcss,
|
|
247
248
|
"data-testid": testId
|
|
248
|
-
}, content(contentProps)))));
|
|
249
|
+
}, /*#__PURE__*/React.createElement(_motionPresenceBoundary.default, null, content(contentProps))))));
|
|
249
250
|
});
|
package/dist/cjs/popup.js
CHANGED
|
@@ -20,7 +20,7 @@ var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
|
20
20
|
var _manager = require("@atlaskit/popper/manager");
|
|
21
21
|
var _reference = require("@atlaskit/popper/reference");
|
|
22
22
|
var _portal = _interopRequireDefault(require("@atlaskit/portal/portal"));
|
|
23
|
-
var
|
|
23
|
+
var _box = require("@atlaskit/primitives/compiled/box");
|
|
24
24
|
var _popperWrapper = _interopRequireDefault(require("./popper-wrapper"));
|
|
25
25
|
var _popupTopLayer = require("./popup-top-layer");
|
|
26
26
|
var _useAppearance = require("./use-appearance");
|
|
@@ -153,7 +153,7 @@ var PopupLegacy = function PopupLegacy(props) {
|
|
|
153
153
|
zIndex: zIndex
|
|
154
154
|
}, renderPopperWrapper))));
|
|
155
155
|
if (shouldFitContainer) {
|
|
156
|
-
return /*#__PURE__*/React.createElement(
|
|
156
|
+
return /*#__PURE__*/React.createElement(_box.Box, {
|
|
157
157
|
xcss: wrapperStyles.root
|
|
158
158
|
}, popupContent);
|
|
159
159
|
}
|
|
@@ -8,7 +8,7 @@ exports.usePopupAppearance = usePopupAppearance;
|
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
11
|
-
var
|
|
11
|
+
var _useMediaQuery = require("@atlaskit/primitives/compiled/use-media-query");
|
|
12
12
|
/**
|
|
13
13
|
* **usePopupAppearance()**
|
|
14
14
|
*
|
|
@@ -27,7 +27,7 @@ function usePopupAppearance(_ref) {
|
|
|
27
27
|
* The state change is only needed if the popup can become a modal - and this is maintained
|
|
28
28
|
*/
|
|
29
29
|
var shouldUseMediaQuery = !(0, _fg.fg)('platform_dst_popup_media_query_perf_fix') || canBecomeModal;
|
|
30
|
-
var mq = (0,
|
|
30
|
+
var mq = (0, _useMediaQuery.UNSAFE_useMediaQuery)('below.sm', shouldUseMediaQuery ? function (e) {
|
|
31
31
|
setIsSmallViewport(!!e.matches);
|
|
32
32
|
} : undefined);
|
|
33
33
|
var _useState = (0, _react.useState)(!!(mq !== null && mq !== void 0 && mq.matches)),
|
|
@@ -6,6 +6,7 @@ import { forwardRef, Fragment, useMemo, useState } from 'react';
|
|
|
6
6
|
import { ax, ix } from '@compiled/react/runtime';
|
|
7
7
|
import { useLayering } from '@atlaskit/layering/use-layering';
|
|
8
8
|
import Motion from '@atlaskit/motion/entering/motion';
|
|
9
|
+
import MotionPresenceBoundary from '@atlaskit/motion/motion-presence-boundary';
|
|
9
10
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
11
|
import { Popper } from '@atlaskit/popper/main';
|
|
11
12
|
import { RepositionOnUpdate } from './reposition-on-update';
|
|
@@ -211,12 +212,12 @@ function PopperWrapper({
|
|
|
211
212
|
isReferenceHidden: isReferenceHidden
|
|
212
213
|
}, /*#__PURE__*/React.createElement(RepositionOnUpdate, {
|
|
213
214
|
update: update
|
|
214
|
-
}, content({
|
|
215
|
+
}, /*#__PURE__*/React.createElement(MotionPresenceBoundary, null, content({
|
|
215
216
|
update,
|
|
216
217
|
isOpen,
|
|
217
218
|
onClose,
|
|
218
219
|
setInitialFocusRef
|
|
219
|
-
})));
|
|
220
|
+
}))));
|
|
220
221
|
const isAutoPlacement = placement === 'auto' || placement === 'auto-start' || placement === 'auto-end';
|
|
221
222
|
const container = /*#__PURE__*/React.createElement("div", {
|
|
222
223
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
@@ -4,6 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { Fragment, memo, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
6
6
|
import noop from '@atlaskit/ds-lib/noop';
|
|
7
|
+
import MotionPresenceBoundary from '@atlaskit/motion/motion-presence-boundary';
|
|
7
8
|
import { getAriaForTrigger } from '@atlaskit/top-layer/get-aria-for-trigger';
|
|
8
9
|
import { fromLegacyPlacement } from '@atlaskit/top-layer/placement-map/index';
|
|
9
10
|
import { PopoverSurface } from '@atlaskit/top-layer/popover-surface';
|
|
@@ -245,7 +246,7 @@ export const PopupTopLayer = /*#__PURE__*/memo(function PopupTopLayer({
|
|
|
245
246
|
// `overflow: auto` branch off it.
|
|
246
247
|
,
|
|
247
248
|
shouldFitViewport: shouldFitViewport
|
|
248
|
-
}, content(contentProps)) :
|
|
249
|
+
}, /*#__PURE__*/React.createElement(MotionPresenceBoundary, null, content(contentProps))) :
|
|
249
250
|
/*#__PURE__*/
|
|
250
251
|
// `PopoverSurface` owns `overflow: auto` and the `box-shadow` on the
|
|
251
252
|
// same element, so it is the scroll container. The wrapper exists only
|
|
@@ -257,5 +258,5 @@ export const PopupTopLayer = /*#__PURE__*/memo(function PopupTopLayer({
|
|
|
257
258
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
258
259
|
className: xcss,
|
|
259
260
|
"data-testid": testId
|
|
260
|
-
}, content(contentProps)))));
|
|
261
|
+
}, /*#__PURE__*/React.createElement(MotionPresenceBoundary, null, content(contentProps))))));
|
|
261
262
|
});
|
package/dist/es2019/popup.js
CHANGED
|
@@ -12,7 +12,7 @@ import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
|
12
12
|
import { Manager } from '@atlaskit/popper/manager';
|
|
13
13
|
import { Reference } from '@atlaskit/popper/reference';
|
|
14
14
|
import Portal from '@atlaskit/portal/portal';
|
|
15
|
-
import { Box } from '@atlaskit/primitives/compiled';
|
|
15
|
+
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
16
16
|
import PopperWrapper from './popper-wrapper';
|
|
17
17
|
import { PopupTopLayer } from './popup-top-layer';
|
|
18
18
|
import { usePopupAppearance } from './use-appearance';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
3
|
-
import { UNSAFE_useMediaQuery as useMediaQuery } from '@atlaskit/primitives/compiled';
|
|
3
|
+
import { UNSAFE_useMediaQuery as useMediaQuery } from '@atlaskit/primitives/compiled/use-media-query';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* **usePopupAppearance()**
|
|
@@ -13,6 +13,7 @@ import { forwardRef, Fragment, useMemo, useState } from 'react';
|
|
|
13
13
|
import { ax, ix } from '@compiled/react/runtime';
|
|
14
14
|
import { useLayering } from '@atlaskit/layering/use-layering';
|
|
15
15
|
import Motion from '@atlaskit/motion/entering/motion';
|
|
16
|
+
import MotionPresenceBoundary from '@atlaskit/motion/motion-presence-boundary';
|
|
16
17
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
17
18
|
import { Popper } from '@atlaskit/popper/main';
|
|
18
19
|
import { RepositionOnUpdate } from './reposition-on-update';
|
|
@@ -226,12 +227,12 @@ function PopperWrapper(_ref) {
|
|
|
226
227
|
isReferenceHidden: isReferenceHidden
|
|
227
228
|
}, /*#__PURE__*/React.createElement(RepositionOnUpdate, {
|
|
228
229
|
update: update
|
|
229
|
-
}, content({
|
|
230
|
+
}, /*#__PURE__*/React.createElement(MotionPresenceBoundary, null, content({
|
|
230
231
|
update: update,
|
|
231
232
|
isOpen: isOpen,
|
|
232
233
|
onClose: onClose,
|
|
233
234
|
setInitialFocusRef: setInitialFocusRef
|
|
234
|
-
})));
|
|
235
|
+
}))));
|
|
235
236
|
var isAutoPlacement = placement === 'auto' || placement === 'auto-start' || placement === 'auto-end';
|
|
236
237
|
var container = /*#__PURE__*/React.createElement("div", {
|
|
237
238
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
@@ -7,6 +7,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import { Fragment, memo, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
9
9
|
import noop from '@atlaskit/ds-lib/noop';
|
|
10
|
+
import MotionPresenceBoundary from '@atlaskit/motion/motion-presence-boundary';
|
|
10
11
|
import { getAriaForTrigger } from '@atlaskit/top-layer/get-aria-for-trigger';
|
|
11
12
|
import { fromLegacyPlacement } from '@atlaskit/top-layer/placement-map/index';
|
|
12
13
|
import { PopoverSurface } from '@atlaskit/top-layer/popover-surface';
|
|
@@ -224,7 +225,7 @@ export var PopupTopLayer = /*#__PURE__*/memo(function PopupTopLayer(_ref) {
|
|
|
224
225
|
// `overflow: auto` branch off it.
|
|
225
226
|
,
|
|
226
227
|
shouldFitViewport: shouldFitViewport
|
|
227
|
-
}, content(contentProps)) :
|
|
228
|
+
}, /*#__PURE__*/React.createElement(MotionPresenceBoundary, null, content(contentProps))) :
|
|
228
229
|
/*#__PURE__*/
|
|
229
230
|
// `PopoverSurface` owns `overflow: auto` and the `box-shadow` on the
|
|
230
231
|
// same element, so it is the scroll container. The wrapper exists only
|
|
@@ -236,5 +237,5 @@ export var PopupTopLayer = /*#__PURE__*/memo(function PopupTopLayer(_ref) {
|
|
|
236
237
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
237
238
|
className: xcss,
|
|
238
239
|
"data-testid": testId
|
|
239
|
-
}, content(contentProps)))));
|
|
240
|
+
}, /*#__PURE__*/React.createElement(MotionPresenceBoundary, null, content(contentProps))))));
|
|
240
241
|
});
|
package/dist/esm/popup.js
CHANGED
|
@@ -14,7 +14,7 @@ import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
|
14
14
|
import { Manager } from '@atlaskit/popper/manager';
|
|
15
15
|
import { Reference } from '@atlaskit/popper/reference';
|
|
16
16
|
import Portal from '@atlaskit/portal/portal';
|
|
17
|
-
import { Box } from '@atlaskit/primitives/compiled';
|
|
17
|
+
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
18
18
|
import PopperWrapper from './popper-wrapper';
|
|
19
19
|
import { PopupTopLayer } from './popup-top-layer';
|
|
20
20
|
import { usePopupAppearance } from './use-appearance';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
|
-
import { UNSAFE_useMediaQuery as useMediaQuery } from '@atlaskit/primitives/compiled';
|
|
4
|
+
import { UNSAFE_useMediaQuery as useMediaQuery } from '@atlaskit/primitives/compiled/use-media-query';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* **usePopupAppearance()**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/popup",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.3",
|
|
4
4
|
"description": "A popup displays brief content in an overlay.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,7 +37,7 @@
|
|
|
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.4.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
42
42
|
"@atlaskit/popper": "^9.4.0",
|
|
43
43
|
"@atlaskit/portal": "^7.0.0",
|