@atlaskit/popup 1.24.0 → 1.24.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 +16 -0
- package/dist/cjs/compositional/popup.js +2 -2
- package/dist/cjs/popper-wrapper.js +1 -14
- package/dist/cjs/popup.js +2 -2
- package/dist/es2019/compositional/popup.js +2 -2
- package/dist/es2019/popper-wrapper.js +2 -16
- package/dist/es2019/popup.js +2 -2
- package/dist/esm/compositional/popup.js +2 -2
- package/dist/esm/popper-wrapper.js +2 -16
- package/dist/esm/popup.js +2 -2
- package/package.json +1 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/popup
|
|
2
2
|
|
|
3
|
+
## 1.24.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#136611](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136611)
|
|
8
|
+
[`9755fb019113f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9755fb019113f) -
|
|
9
|
+
Clean up emotion Globals usage
|
|
10
|
+
|
|
11
|
+
## 1.24.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#135608](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/135608)
|
|
16
|
+
[`7498a45496f8a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7498a45496f8a) -
|
|
17
|
+
Update to remove react-uid
|
|
18
|
+
|
|
3
19
|
## 1.24.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.PopupTrigger = exports.PopupContent = exports.Popup = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _reactUid = require("react-uid");
|
|
12
11
|
var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
|
|
13
12
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
13
|
+
var _reactUid = require("@atlaskit/ds-lib/react-uid");
|
|
14
14
|
var _layering = require("@atlaskit/layering");
|
|
15
15
|
var _popper = require("@atlaskit/popper");
|
|
16
16
|
var _portal = _interopRequireDefault(require("@atlaskit/portal"));
|
|
@@ -59,7 +59,7 @@ var Popup = exports.Popup = function Popup(_ref) {
|
|
|
59
59
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
60
60
|
triggerRef = _useState2[0],
|
|
61
61
|
setTriggerRef = _useState2[1];
|
|
62
|
-
var generatedId = (0, _reactUid.
|
|
62
|
+
var generatedId = (0, _reactUid.useId)();
|
|
63
63
|
var id = providedId || generatedId;
|
|
64
64
|
return /*#__PURE__*/_react.default.createElement(EnsureIsInsidePopupContext.Provider, {
|
|
65
65
|
value: true
|
|
@@ -13,7 +13,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
13
13
|
var _react = require("react");
|
|
14
14
|
var _react2 = require("@emotion/react");
|
|
15
15
|
var _layering = require("@atlaskit/layering");
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _popper = require("@atlaskit/popper");
|
|
18
17
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
18
|
var _constants = require("@atlaskit/theme/constants");
|
|
@@ -27,7 +26,6 @@ var _css;
|
|
|
27
26
|
* @jsxRuntime classic
|
|
28
27
|
* @jsx jsx
|
|
29
28
|
*/
|
|
30
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
31
29
|
var popupFullWidthStyles = (0, _react2.css)({
|
|
32
30
|
width: '100%'
|
|
33
31
|
});
|
|
@@ -49,15 +47,6 @@ var popupStyles = (0, _react2.css)((_css = {
|
|
|
49
47
|
var popupOverflowStyles = (0, _react2.css)({
|
|
50
48
|
overflow: 'auto'
|
|
51
49
|
});
|
|
52
|
-
|
|
53
|
-
// disables iframe pointer events while popup is open, except if iframe is nested inside popup
|
|
54
|
-
// solves an issue of popup not being closed on iframe click
|
|
55
|
-
var blockPointerEventsOnExternalIframeStyles = (0, _react2.css)({
|
|
56
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
57
|
-
'iframe:not([data-ds--level] iframe)': {
|
|
58
|
-
pointerEvents: 'none'
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
50
|
var DefaultPopupComponent = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
62
51
|
var shouldRenderToParent = props.shouldRenderToParent,
|
|
63
52
|
shouldFitContainer = props.shouldFitContainer,
|
|
@@ -181,9 +170,7 @@ function PopperWrapper(_ref) {
|
|
|
181
170
|
tabIndex: autoFocus ? 0 : undefined,
|
|
182
171
|
shouldRenderToParent: shouldRenderToParent,
|
|
183
172
|
shouldFitContainer: shouldFitContainer
|
|
184
|
-
}, (0,
|
|
185
|
-
styles: blockPointerEventsOnExternalIframeStyles
|
|
186
|
-
}), (0, _react2.jsx)(_repositionOnUpdate.RepositionOnUpdate, {
|
|
173
|
+
}, (0, _react2.jsx)(_repositionOnUpdate.RepositionOnUpdate, {
|
|
187
174
|
update: update
|
|
188
175
|
}, content({
|
|
189
176
|
update: update,
|
package/dist/cjs/popup.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.default = exports.Popup = void 0;
|
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
|
-
var _reactUid = require("react-uid");
|
|
11
|
+
var _reactUid = require("@atlaskit/ds-lib/react-uid");
|
|
12
12
|
var _layering = require("@atlaskit/layering");
|
|
13
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
14
|
var _popper = require("@atlaskit/popper");
|
|
@@ -72,7 +72,7 @@ var Popup = exports.Popup = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
72
72
|
setTriggerRef = _useState2[1];
|
|
73
73
|
var getMergedTriggerRef = (0, _useGetMemoizedMergedTriggerRef.useGetMemoizedMergedTriggerRef)();
|
|
74
74
|
var getMergedTriggerRefNew = (0, _useGetMemoizedMergedTriggerRefNew.useGetMemoizedMergedTriggerRefNew)();
|
|
75
|
-
var generatedId = (0, _reactUid.
|
|
75
|
+
var generatedId = (0, _reactUid.useId)();
|
|
76
76
|
var id = providedId || generatedId;
|
|
77
77
|
var renderPopperWrapper = (0, _react2.jsx)(_layering.UNSAFE_LAYERING, {
|
|
78
78
|
isDisabled: false
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { createContext, useContext, useState } from 'react';
|
|
2
|
-
import { useUID } from 'react-uid';
|
|
3
2
|
import invariant from 'tiny-invariant';
|
|
4
3
|
import noop from '@atlaskit/ds-lib/noop';
|
|
4
|
+
import { useId } from '@atlaskit/ds-lib/react-uid';
|
|
5
5
|
import { UNSAFE_LAYERING } from '@atlaskit/layering';
|
|
6
6
|
import { Manager, Reference } from '@atlaskit/popper';
|
|
7
7
|
import Portal from '@atlaskit/portal';
|
|
@@ -45,7 +45,7 @@ export const Popup = ({
|
|
|
45
45
|
isOpen = false
|
|
46
46
|
}) => {
|
|
47
47
|
const [triggerRef, setTriggerRef] = useState(null);
|
|
48
|
-
const generatedId =
|
|
48
|
+
const generatedId = useId();
|
|
49
49
|
const id = providedId || generatedId;
|
|
50
50
|
return /*#__PURE__*/React.createElement(EnsureIsInsidePopupContext.Provider, {
|
|
51
51
|
value: true
|
|
@@ -4,11 +4,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
6
|
import { forwardRef, useMemo, useState } from 'react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { css, Global, jsx } from '@emotion/react';
|
|
7
|
+
import { css, jsx } from '@emotion/react';
|
|
10
8
|
import { UNSAFE_useLayering } from '@atlaskit/layering';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
9
|
import { Popper } from '@atlaskit/popper';
|
|
13
10
|
import { N0, N50A, N60A } from '@atlaskit/theme/colors';
|
|
14
11
|
import { layers } from '@atlaskit/theme/constants';
|
|
@@ -39,15 +36,6 @@ const popupStyles = css({
|
|
|
39
36
|
const popupOverflowStyles = css({
|
|
40
37
|
overflow: 'auto'
|
|
41
38
|
});
|
|
42
|
-
|
|
43
|
-
// disables iframe pointer events while popup is open, except if iframe is nested inside popup
|
|
44
|
-
// solves an issue of popup not being closed on iframe click
|
|
45
|
-
const blockPointerEventsOnExternalIframeStyles = css({
|
|
46
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
47
|
-
'iframe:not([data-ds--level] iframe)': {
|
|
48
|
-
pointerEvents: 'none'
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
39
|
const DefaultPopupComponent = /*#__PURE__*/forwardRef((props, ref) => {
|
|
52
40
|
const {
|
|
53
41
|
shouldRenderToParent,
|
|
@@ -165,9 +153,7 @@ function PopperWrapper({
|
|
|
165
153
|
tabIndex: autoFocus ? 0 : undefined,
|
|
166
154
|
shouldRenderToParent: shouldRenderToParent,
|
|
167
155
|
shouldFitContainer: shouldFitContainer
|
|
168
|
-
},
|
|
169
|
-
styles: blockPointerEventsOnExternalIframeStyles
|
|
170
|
-
}), jsx(RepositionOnUpdate, {
|
|
156
|
+
}, jsx(RepositionOnUpdate, {
|
|
171
157
|
update: update
|
|
172
158
|
}, content({
|
|
173
159
|
update,
|
package/dist/es2019/popup.js
CHANGED
|
@@ -7,7 +7,7 @@ import { memo, useState } from 'react';
|
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
|
-
import {
|
|
10
|
+
import { useId } from '@atlaskit/ds-lib/react-uid';
|
|
11
11
|
import { UNSAFE_LAYERING } from '@atlaskit/layering';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
13
|
import { Manager, Reference } from '@atlaskit/popper';
|
|
@@ -51,7 +51,7 @@ export const Popup = /*#__PURE__*/memo(({
|
|
|
51
51
|
const [triggerRef, setTriggerRef] = useState(null);
|
|
52
52
|
const getMergedTriggerRef = useGetMemoizedMergedTriggerRef();
|
|
53
53
|
const getMergedTriggerRefNew = useGetMemoizedMergedTriggerRefNew();
|
|
54
|
-
const generatedId =
|
|
54
|
+
const generatedId = useId();
|
|
55
55
|
const id = providedId || generatedId;
|
|
56
56
|
const renderPopperWrapper = jsx(UNSAFE_LAYERING, {
|
|
57
57
|
isDisabled: false
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import React, { createContext, useContext, useState } from 'react';
|
|
3
|
-
import { useUID } from 'react-uid';
|
|
4
3
|
import invariant from 'tiny-invariant';
|
|
5
4
|
import noop from '@atlaskit/ds-lib/noop';
|
|
5
|
+
import { useId } from '@atlaskit/ds-lib/react-uid';
|
|
6
6
|
import { UNSAFE_LAYERING } from '@atlaskit/layering';
|
|
7
7
|
import { Manager, Reference } from '@atlaskit/popper';
|
|
8
8
|
import Portal from '@atlaskit/portal';
|
|
@@ -49,7 +49,7 @@ export var Popup = function Popup(_ref) {
|
|
|
49
49
|
_useState2 = _slicedToArray(_useState, 2),
|
|
50
50
|
triggerRef = _useState2[0],
|
|
51
51
|
setTriggerRef = _useState2[1];
|
|
52
|
-
var generatedId =
|
|
52
|
+
var generatedId = useId();
|
|
53
53
|
var id = providedId || generatedId;
|
|
54
54
|
return /*#__PURE__*/React.createElement(EnsureIsInsidePopupContext.Provider, {
|
|
55
55
|
value: true
|
|
@@ -10,11 +10,8 @@ var _css;
|
|
|
10
10
|
* @jsx jsx
|
|
11
11
|
*/
|
|
12
12
|
import { forwardRef, useMemo, useState } from 'react';
|
|
13
|
-
|
|
14
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
|
-
import { css, Global, jsx } from '@emotion/react';
|
|
13
|
+
import { css, jsx } from '@emotion/react';
|
|
16
14
|
import { UNSAFE_useLayering } from '@atlaskit/layering';
|
|
17
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
15
|
import { Popper } from '@atlaskit/popper';
|
|
19
16
|
import { N0, N50A, N60A } from '@atlaskit/theme/colors';
|
|
20
17
|
import { layers } from '@atlaskit/theme/constants';
|
|
@@ -43,15 +40,6 @@ var popupStyles = css((_css = {
|
|
|
43
40
|
var popupOverflowStyles = css({
|
|
44
41
|
overflow: 'auto'
|
|
45
42
|
});
|
|
46
|
-
|
|
47
|
-
// disables iframe pointer events while popup is open, except if iframe is nested inside popup
|
|
48
|
-
// solves an issue of popup not being closed on iframe click
|
|
49
|
-
var blockPointerEventsOnExternalIframeStyles = css({
|
|
50
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
51
|
-
'iframe:not([data-ds--level] iframe)': {
|
|
52
|
-
pointerEvents: 'none'
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
43
|
var DefaultPopupComponent = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
56
44
|
var shouldRenderToParent = props.shouldRenderToParent,
|
|
57
45
|
shouldFitContainer = props.shouldFitContainer,
|
|
@@ -175,9 +163,7 @@ function PopperWrapper(_ref) {
|
|
|
175
163
|
tabIndex: autoFocus ? 0 : undefined,
|
|
176
164
|
shouldRenderToParent: shouldRenderToParent,
|
|
177
165
|
shouldFitContainer: shouldFitContainer
|
|
178
|
-
},
|
|
179
|
-
styles: blockPointerEventsOnExternalIframeStyles
|
|
180
|
-
}), jsx(RepositionOnUpdate, {
|
|
166
|
+
}, jsx(RepositionOnUpdate, {
|
|
181
167
|
update: update
|
|
182
168
|
}, content({
|
|
183
169
|
update: update,
|
package/dist/esm/popup.js
CHANGED
|
@@ -8,7 +8,7 @@ import { memo, useState } from 'react';
|
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { jsx } from '@emotion/react';
|
|
11
|
-
import {
|
|
11
|
+
import { useId } from '@atlaskit/ds-lib/react-uid';
|
|
12
12
|
import { UNSAFE_LAYERING } from '@atlaskit/layering';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
14
|
import { Manager, Reference } from '@atlaskit/popper';
|
|
@@ -64,7 +64,7 @@ export var Popup = /*#__PURE__*/memo(function (_ref) {
|
|
|
64
64
|
setTriggerRef = _useState2[1];
|
|
65
65
|
var getMergedTriggerRef = useGetMemoizedMergedTriggerRef();
|
|
66
66
|
var getMergedTriggerRefNew = useGetMemoizedMergedTriggerRefNew();
|
|
67
|
-
var generatedId =
|
|
67
|
+
var generatedId = useId();
|
|
68
68
|
var id = providedId || generatedId;
|
|
69
69
|
var renderPopperWrapper = jsx(UNSAFE_LAYERING, {
|
|
70
70
|
isDisabled: false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/popup",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.2",
|
|
4
4
|
"description": "A popup displays brief content in an overlay.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"bind-event-listener": "^3.0.0",
|
|
50
50
|
"focus-trap": "^2.4.5",
|
|
51
51
|
"memoize-one": "^6.0.0",
|
|
52
|
-
"react-uid": "^2.2.0",
|
|
53
52
|
"tiny-invariant": "^1.2.0"
|
|
54
53
|
},
|
|
55
54
|
"peerDependencies": {
|
|
@@ -104,9 +103,6 @@
|
|
|
104
103
|
}
|
|
105
104
|
},
|
|
106
105
|
"platform-feature-flags": {
|
|
107
|
-
"platform.design-system-team.iframe_gojiv": {
|
|
108
|
-
"type": "boolean"
|
|
109
|
-
},
|
|
110
106
|
"platform_dst_popup-disable-focuslock": {
|
|
111
107
|
"type": "boolean"
|
|
112
108
|
},
|