@atlaskit/popup 4.23.4 → 4.25.0
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 +18 -0
- package/dist/cjs/compositional/popup-content-top-layer.js +1 -1
- package/dist/cjs/popper-wrapper.js +4 -3
- package/dist/cjs/popup-top-layer.js +1 -1
- package/dist/cjs/popup.js +3 -1
- package/dist/es2019/compositional/popup-content-top-layer.js +2 -2
- package/dist/es2019/popper-wrapper.js +4 -3
- package/dist/es2019/popup-top-layer.js +2 -2
- package/dist/es2019/popup.js +3 -1
- package/dist/esm/compositional/popup-content-top-layer.js +2 -2
- package/dist/esm/popper-wrapper.js +4 -3
- package/dist/esm/popup-top-layer.js +2 -2
- package/dist/esm/popup.js +3 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/popup
|
|
2
2
|
|
|
3
|
+
## 4.25.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`2fd74328732bf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2fd74328732bf) -
|
|
8
|
+
Updated to use new motion in top layer dialog
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 4.24.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- [`4df99aae5125e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4df99aae5125e) -
|
|
19
|
+
Fixed remounting of auto placed popups with new motion
|
|
20
|
+
|
|
3
21
|
## 4.23.4
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -24,7 +24,7 @@ var _topLayerBridge = require("../internal/top-layer-bridge");
|
|
|
24
24
|
var _triggerRefObjectContext = require("./trigger-ref-object-context");
|
|
25
25
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
26
26
|
var overflowAutoStyles = null;
|
|
27
|
-
var animation = (0, _animations.
|
|
27
|
+
var animation = (0, _animations.popupMotion)();
|
|
28
28
|
|
|
29
29
|
// Top-layer positioning is handled by CSS Anchor Positioning, not inline styles.
|
|
30
30
|
var EMPTY_STYLE = {};
|
|
@@ -242,6 +242,7 @@ function PopperWrapper(_ref) {
|
|
|
242
242
|
onClose: onClose,
|
|
243
243
|
setInitialFocusRef: setInitialFocusRef
|
|
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
|
|
247
248
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
@@ -261,9 +262,9 @@ function PopperWrapper(_ref) {
|
|
|
261
262
|
},
|
|
262
263
|
"data-testid": "".concat(testId, "--container"),
|
|
263
264
|
className: (0, _runtime.ax)([shouldFitContainer && wrapperStyles.fullWidth])
|
|
264
|
-
},
|
|
265
|
-
enteringAnimation: placementMap[placement].enter,
|
|
266
|
-
exitingAnimation: placementMap[placement].exit,
|
|
265
|
+
}, /*#__PURE__*/React.createElement(_motion.Motion, {
|
|
266
|
+
enteringAnimation: !isAutoPlacement ? placementMap[placement].enter : undefined,
|
|
267
|
+
exitingAnimation: !isAutoPlacement ? placementMap[placement].exit : undefined,
|
|
267
268
|
xcss: wrapperStyles.motion
|
|
268
269
|
}, popupContainer));
|
|
269
270
|
return /*#__PURE__*/React.createElement(_react.Fragment, null, (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift-popup') ? container : popupContainer, appearance === 'UNSAFE_modal-below-sm' && /*#__PURE__*/React.createElement("div", {
|
|
@@ -28,7 +28,7 @@ var contentOverflowStyles = {
|
|
|
28
28
|
fitViewport: "_1reo1wug _18m91wug",
|
|
29
29
|
default: ""
|
|
30
30
|
};
|
|
31
|
-
var animation = (0, _animations.
|
|
31
|
+
var animation = (0, _animations.popupMotion)();
|
|
32
32
|
|
|
33
33
|
// Top-layer positioning is handled by CSS Anchor Positioning, not inline styles.
|
|
34
34
|
var EMPTY_STYLE = {};
|
package/dist/cjs/popup.js
CHANGED
|
@@ -160,7 +160,9 @@ var Popup = exports.Popup = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
160
160
|
});
|
|
161
161
|
}), !(0, _platformFeatureFlags.fg)('platform-dst-motion-uplift-popup') && isOpen && (shouldRenderToParent || shouldFitContainer ? renderPopperWrapper : /*#__PURE__*/React.createElement(_portal.default, {
|
|
162
162
|
zIndex: zIndex
|
|
163
|
-
}, renderPopperWrapper)), (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift-popup') && /*#__PURE__*/React.createElement(_exitingPersistence.default,
|
|
163
|
+
}, renderPopperWrapper)), (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift-popup') && /*#__PURE__*/React.createElement(_exitingPersistence.default, {
|
|
164
|
+
appear: true
|
|
165
|
+
}, isOpen && (shouldRenderToParent || shouldFitContainer ? renderPopperWrapper : /*#__PURE__*/React.createElement(_portal.default, {
|
|
164
166
|
zIndex: zIndex
|
|
165
167
|
}, renderPopperWrapper))));
|
|
166
168
|
if (shouldFitContainer) {
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { useCallback, useContext, useMemo, useRef, useState } from 'react';
|
|
6
6
|
import { ax, ix } from '@compiled/react/runtime';
|
|
7
7
|
import noop from '@atlaskit/ds-lib/noop';
|
|
8
|
-
import {
|
|
8
|
+
import { popupMotion } from '@atlaskit/top-layer/animations';
|
|
9
9
|
import { fromLegacyPlacement } from '@atlaskit/top-layer/placement-map';
|
|
10
10
|
import { createPopoverCloseEvent, Popover } from '@atlaskit/top-layer/popover';
|
|
11
11
|
import { PopoverSurface } from '@atlaskit/top-layer/popover-surface';
|
|
@@ -14,7 +14,7 @@ import { useWidthFromAnchor } from '@atlaskit/top-layer/use-width-from-anchor';
|
|
|
14
14
|
import { useRoleProps } from '../internal/top-layer-bridge';
|
|
15
15
|
import { TriggerRefObjectContext } from './trigger-ref-object-context';
|
|
16
16
|
const overflowAutoStyles = null;
|
|
17
|
-
const animation =
|
|
17
|
+
const animation = popupMotion();
|
|
18
18
|
|
|
19
19
|
// Top-layer positioning is handled by CSS Anchor Positioning, not inline styles.
|
|
20
20
|
const EMPTY_STYLE = {};
|
|
@@ -219,6 +219,7 @@ function PopperWrapper({
|
|
|
219
219
|
onClose,
|
|
220
220
|
setInitialFocusRef
|
|
221
221
|
})));
|
|
222
|
+
const isAutoPlacement = placement === 'auto' || placement === 'auto-start' || placement === 'auto-end';
|
|
222
223
|
const container = /*#__PURE__*/React.createElement("div", {
|
|
223
224
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
224
225
|
style: {
|
|
@@ -239,9 +240,9 @@ function PopperWrapper({
|
|
|
239
240
|
},
|
|
240
241
|
"data-testid": `${testId}--container`,
|
|
241
242
|
className: ax([shouldFitContainer && wrapperStyles.fullWidth])
|
|
242
|
-
},
|
|
243
|
-
enteringAnimation: placementMap[placement].enter,
|
|
244
|
-
exitingAnimation: placementMap[placement].exit,
|
|
243
|
+
}, /*#__PURE__*/React.createElement(Motion, {
|
|
244
|
+
enteringAnimation: !isAutoPlacement ? placementMap[placement].enter : undefined,
|
|
245
|
+
exitingAnimation: !isAutoPlacement ? placementMap[placement].exit : undefined,
|
|
245
246
|
xcss: wrapperStyles.motion
|
|
246
247
|
}, popupContainer));
|
|
247
248
|
return /*#__PURE__*/React.createElement(Fragment, null, fg('platform-dst-motion-uplift-popup') ? container : popupContainer, appearance === 'UNSAFE_modal-below-sm' && /*#__PURE__*/React.createElement("div", {
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { Fragment, memo, useCallback, useMemo, useRef, useState } from 'react';
|
|
7
7
|
import noop from '@atlaskit/ds-lib/noop';
|
|
8
|
-
import {
|
|
8
|
+
import { popupMotion } from '@atlaskit/top-layer/animations';
|
|
9
9
|
import { getAriaForTrigger } from '@atlaskit/top-layer/get-aria-for-trigger';
|
|
10
10
|
import { fromLegacyPlacement } from '@atlaskit/top-layer/placement-map';
|
|
11
11
|
import { createPopoverCloseEvent, Popover } from '@atlaskit/top-layer/popover';
|
|
@@ -18,7 +18,7 @@ const contentOverflowStyles = {
|
|
|
18
18
|
fitViewport: "_1reo1wug _18m91wug",
|
|
19
19
|
default: ""
|
|
20
20
|
};
|
|
21
|
-
const animation =
|
|
21
|
+
const animation = popupMotion();
|
|
22
22
|
|
|
23
23
|
// Top-layer positioning is handled by CSS Anchor Positioning, not inline styles.
|
|
24
24
|
const EMPTY_STYLE = {};
|
package/dist/es2019/popup.js
CHANGED
|
@@ -140,7 +140,9 @@ export const Popup = /*#__PURE__*/memo(props => {
|
|
|
140
140
|
});
|
|
141
141
|
}), !fg('platform-dst-motion-uplift-popup') && isOpen && (shouldRenderToParent || shouldFitContainer ? renderPopperWrapper : /*#__PURE__*/React.createElement(Portal, {
|
|
142
142
|
zIndex: zIndex
|
|
143
|
-
}, renderPopperWrapper)), fg('platform-dst-motion-uplift-popup') && /*#__PURE__*/React.createElement(ExitingPersistence,
|
|
143
|
+
}, renderPopperWrapper)), fg('platform-dst-motion-uplift-popup') && /*#__PURE__*/React.createElement(ExitingPersistence, {
|
|
144
|
+
appear: true
|
|
145
|
+
}, isOpen && (shouldRenderToParent || shouldFitContainer ? renderPopperWrapper : /*#__PURE__*/React.createElement(Portal, {
|
|
144
146
|
zIndex: zIndex
|
|
145
147
|
}, renderPopperWrapper))));
|
|
146
148
|
if (shouldFitContainer) {
|
|
@@ -6,7 +6,7 @@ import * as React from 'react';
|
|
|
6
6
|
import { useCallback, useContext, useMemo, useRef, useState } from 'react';
|
|
7
7
|
import { ax, ix } from '@compiled/react/runtime';
|
|
8
8
|
import noop from '@atlaskit/ds-lib/noop';
|
|
9
|
-
import {
|
|
9
|
+
import { popupMotion } from '@atlaskit/top-layer/animations';
|
|
10
10
|
import { fromLegacyPlacement } from '@atlaskit/top-layer/placement-map';
|
|
11
11
|
import { createPopoverCloseEvent, Popover } from '@atlaskit/top-layer/popover';
|
|
12
12
|
import { PopoverSurface } from '@atlaskit/top-layer/popover-surface';
|
|
@@ -15,7 +15,7 @@ import { useWidthFromAnchor } from '@atlaskit/top-layer/use-width-from-anchor';
|
|
|
15
15
|
import { useRoleProps } from '../internal/top-layer-bridge';
|
|
16
16
|
import { TriggerRefObjectContext } from './trigger-ref-object-context';
|
|
17
17
|
var overflowAutoStyles = null;
|
|
18
|
-
var animation =
|
|
18
|
+
var animation = popupMotion();
|
|
19
19
|
|
|
20
20
|
// Top-layer positioning is handled by CSS Anchor Positioning, not inline styles.
|
|
21
21
|
var EMPTY_STYLE = {};
|
|
@@ -233,6 +233,7 @@ function PopperWrapper(_ref) {
|
|
|
233
233
|
onClose: onClose,
|
|
234
234
|
setInitialFocusRef: setInitialFocusRef
|
|
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
|
|
238
239
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
@@ -252,9 +253,9 @@ function PopperWrapper(_ref) {
|
|
|
252
253
|
},
|
|
253
254
|
"data-testid": "".concat(testId, "--container"),
|
|
254
255
|
className: ax([shouldFitContainer && wrapperStyles.fullWidth])
|
|
255
|
-
},
|
|
256
|
-
enteringAnimation: placementMap[placement].enter,
|
|
257
|
-
exitingAnimation: placementMap[placement].exit,
|
|
256
|
+
}, /*#__PURE__*/React.createElement(Motion, {
|
|
257
|
+
enteringAnimation: !isAutoPlacement ? placementMap[placement].enter : undefined,
|
|
258
|
+
exitingAnimation: !isAutoPlacement ? placementMap[placement].exit : undefined,
|
|
258
259
|
xcss: wrapperStyles.motion
|
|
259
260
|
}, popupContainer));
|
|
260
261
|
return /*#__PURE__*/React.createElement(Fragment, null, fg('platform-dst-motion-uplift-popup') ? container : popupContainer, appearance === 'UNSAFE_modal-below-sm' && /*#__PURE__*/React.createElement("div", {
|
|
@@ -6,7 +6,7 @@ import * as React from 'react';
|
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
7
|
import { Fragment, memo, useCallback, useMemo, useRef, useState } from 'react';
|
|
8
8
|
import noop from '@atlaskit/ds-lib/noop';
|
|
9
|
-
import {
|
|
9
|
+
import { popupMotion } from '@atlaskit/top-layer/animations';
|
|
10
10
|
import { getAriaForTrigger } from '@atlaskit/top-layer/get-aria-for-trigger';
|
|
11
11
|
import { fromLegacyPlacement } from '@atlaskit/top-layer/placement-map';
|
|
12
12
|
import { createPopoverCloseEvent, Popover } from '@atlaskit/top-layer/popover';
|
|
@@ -19,7 +19,7 @@ var contentOverflowStyles = {
|
|
|
19
19
|
fitViewport: "_1reo1wug _18m91wug",
|
|
20
20
|
default: ""
|
|
21
21
|
};
|
|
22
|
-
var animation =
|
|
22
|
+
var animation = popupMotion();
|
|
23
23
|
|
|
24
24
|
// Top-layer positioning is handled by CSS Anchor Positioning, not inline styles.
|
|
25
25
|
var EMPTY_STYLE = {};
|
package/dist/esm/popup.js
CHANGED
|
@@ -152,7 +152,9 @@ export var Popup = /*#__PURE__*/memo(function (props) {
|
|
|
152
152
|
});
|
|
153
153
|
}), !fg('platform-dst-motion-uplift-popup') && isOpen && (shouldRenderToParent || shouldFitContainer ? renderPopperWrapper : /*#__PURE__*/React.createElement(Portal, {
|
|
154
154
|
zIndex: zIndex
|
|
155
|
-
}, renderPopperWrapper)), fg('platform-dst-motion-uplift-popup') && /*#__PURE__*/React.createElement(ExitingPersistence,
|
|
155
|
+
}, renderPopperWrapper)), fg('platform-dst-motion-uplift-popup') && /*#__PURE__*/React.createElement(ExitingPersistence, {
|
|
156
|
+
appear: true
|
|
157
|
+
}, isOpen && (shouldRenderToParent || shouldFitContainer ? renderPopperWrapper : /*#__PURE__*/React.createElement(Portal, {
|
|
156
158
|
zIndex: zIndex
|
|
157
159
|
}, renderPopperWrapper))));
|
|
158
160
|
if (shouldFitContainer) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/popup",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.25.0",
|
|
4
4
|
"description": "A popup displays brief content in an overlay.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"@atlaskit/popper": "^7.2.0",
|
|
48
48
|
"@atlaskit/portal": "^5.5.0",
|
|
49
49
|
"@atlaskit/primitives": "^19.0.0",
|
|
50
|
-
"@atlaskit/tokens": "^13.
|
|
51
|
-
"@atlaskit/top-layer": "^0.
|
|
50
|
+
"@atlaskit/tokens": "^13.4.0",
|
|
51
|
+
"@atlaskit/top-layer": "^0.17.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@compiled/react": "^0.20.0",
|
|
54
54
|
"bind-event-listener": "^3.0.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@atlaskit/heading": "^5.4.0",
|
|
72
72
|
"@atlaskit/icon": "^35.4.0",
|
|
73
73
|
"@atlaskit/link": "^3.4.0",
|
|
74
|
-
"@atlaskit/modal-dialog": "^15.
|
|
74
|
+
"@atlaskit/modal-dialog": "^15.3.0",
|
|
75
75
|
"@atlaskit/section-message": "^8.13.0",
|
|
76
76
|
"@atlaskit/textfield": "^8.3.0",
|
|
77
77
|
"@atlaskit/toggle": "^16.1.0",
|