@atlaskit/popup 1.29.1 → 1.29.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 +8 -0
- package/dist/cjs/compositional/popup.js +1 -1
- package/dist/cjs/popper-wrapper.js +2 -2
- package/dist/cjs/popup.js +1 -1
- package/dist/cjs/use-close-manager.js +3 -3
- package/dist/cjs/use-focus-manager.js +2 -2
- package/dist/es2019/compositional/popup.js +2 -2
- package/dist/es2019/popper-wrapper.js +2 -2
- package/dist/es2019/popup.js +2 -2
- package/dist/es2019/use-close-manager.js +2 -2
- package/dist/es2019/use-focus-manager.js +2 -2
- package/dist/esm/compositional/popup.js +2 -2
- package/dist/esm/popper-wrapper.js +3 -3
- package/dist/esm/popup.js +2 -2
- package/dist/esm/use-close-manager.js +4 -4
- package/dist/esm/use-focus-manager.js +3 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/popup
|
|
2
2
|
|
|
3
|
+
## 1.29.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#161638](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/161638)
|
|
8
|
+
[`d2e5e5ce0053d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d2e5e5ce0053d) -
|
|
9
|
+
Use new API of layering without UNSAFE prefix
|
|
10
|
+
|
|
3
11
|
## 1.29.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -152,7 +152,7 @@ var PopupContent = exports.PopupContent = function PopupContent(_ref4) {
|
|
|
152
152
|
if (!isOpen) {
|
|
153
153
|
return null;
|
|
154
154
|
}
|
|
155
|
-
var popperWrapper = /*#__PURE__*/_react.default.createElement(_layering.
|
|
155
|
+
var popperWrapper = /*#__PURE__*/_react.default.createElement(_layering.Layering, {
|
|
156
156
|
isDisabled: false
|
|
157
157
|
}, /*#__PURE__*/_react.default.createElement(_popperWrapper.default
|
|
158
158
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -139,8 +139,8 @@ function PopperWrapper(_ref) {
|
|
|
139
139
|
shouldDisableFocusTrap: shouldDisableFocusTrap,
|
|
140
140
|
shouldRenderToParent: shouldRenderToParent
|
|
141
141
|
});
|
|
142
|
-
var
|
|
143
|
-
currentLevel =
|
|
142
|
+
var _useLayering = (0, _layering.useLayering)(),
|
|
143
|
+
currentLevel = _useLayering.currentLevel;
|
|
144
144
|
var mergedModifiers = (0, _react.useMemo)(function () {
|
|
145
145
|
return [{
|
|
146
146
|
name: 'flip',
|
package/dist/cjs/popup.js
CHANGED
|
@@ -89,7 +89,7 @@ var Popup = exports.Popup = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
89
89
|
(0, _openLayerObserver.useNotifyOpenLayerObserver)({
|
|
90
90
|
isOpen: isOpen
|
|
91
91
|
});
|
|
92
|
-
var renderPopperWrapper = (0, _react2.jsx)(_layering.
|
|
92
|
+
var renderPopperWrapper = (0, _react2.jsx)(_layering.Layering, {
|
|
93
93
|
isDisabled: false
|
|
94
94
|
}, (0, _react2.jsx)(_popperWrapper.default
|
|
95
95
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -24,9 +24,9 @@ var useCloseManager = exports.useCloseManager = function useCloseManager(_ref) {
|
|
|
24
24
|
capture = _ref.shouldUseCaptureOnOutsideClick,
|
|
25
25
|
shouldCloseOnTab = _ref.shouldCloseOnTab,
|
|
26
26
|
shouldRenderToParent = _ref.shouldRenderToParent;
|
|
27
|
-
var
|
|
28
|
-
isLayerDisabled =
|
|
29
|
-
currentLevel =
|
|
27
|
+
var _useLayering = (0, _layering.useLayering)(),
|
|
28
|
+
isLayerDisabled = _useLayering.isLayerDisabled,
|
|
29
|
+
currentLevel = _useLayering.currentLevel;
|
|
30
30
|
var _useAnimationFrame = (0, _useAnimationFrame2.useAnimationFrame)(),
|
|
31
31
|
requestFrame = _useAnimationFrame.requestFrame,
|
|
32
32
|
cancelAllFrames = _useAnimationFrame.cancelAllFrames;
|
|
@@ -23,8 +23,8 @@ var useFocusManager = exports.useFocusManager = function useFocusManager(_ref) {
|
|
|
23
23
|
var _useAnimationFrame = (0, _useAnimationFrame2.useAnimationFrame)(),
|
|
24
24
|
requestFrame = _useAnimationFrame.requestFrame,
|
|
25
25
|
cancelAllFrames = _useAnimationFrame.cancelAllFrames;
|
|
26
|
-
var
|
|
27
|
-
currentLevel =
|
|
26
|
+
var _useLayering = (0, _layering.useLayering)(),
|
|
27
|
+
currentLevel = _useLayering.currentLevel;
|
|
28
28
|
(0, _react.useEffect)(function () {
|
|
29
29
|
if (!popupRef || shouldCloseOnTab) {
|
|
30
30
|
return _noop.default;
|
|
@@ -2,7 +2,7 @@ import React, { createContext, useContext, useState } from 'react';
|
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import noop from '@atlaskit/ds-lib/noop';
|
|
4
4
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
5
|
-
import {
|
|
5
|
+
import { Layering } from '@atlaskit/layering';
|
|
6
6
|
import { useNotifyOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
7
7
|
import { Manager, Reference } from '@atlaskit/popper';
|
|
8
8
|
import Portal from '@atlaskit/portal';
|
|
@@ -132,7 +132,7 @@ export const PopupContent = ({
|
|
|
132
132
|
if (!isOpen) {
|
|
133
133
|
return null;
|
|
134
134
|
}
|
|
135
|
-
const popperWrapper = /*#__PURE__*/React.createElement(
|
|
135
|
+
const popperWrapper = /*#__PURE__*/React.createElement(Layering, {
|
|
136
136
|
isDisabled: false
|
|
137
137
|
}, /*#__PURE__*/React.createElement(PopperWrapper
|
|
138
138
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -6,7 +6,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
6
6
|
import { forwardRef, Fragment, useMemo, useState } from 'react';
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import FocusRing from '@atlaskit/focus-ring';
|
|
9
|
-
import {
|
|
9
|
+
import { useLayering } from '@atlaskit/layering';
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
11
|
import { Popper } from '@atlaskit/popper';
|
|
12
12
|
import { N0, N50A, N60A } from '@atlaskit/theme/colors';
|
|
@@ -123,7 +123,7 @@ function PopperWrapper({
|
|
|
123
123
|
});
|
|
124
124
|
const {
|
|
125
125
|
currentLevel
|
|
126
|
-
} =
|
|
126
|
+
} = useLayering();
|
|
127
127
|
const mergedModifiers = useMemo(() => [{
|
|
128
128
|
name: 'flip',
|
|
129
129
|
enabled: shouldFlip,
|
package/dist/es2019/popup.js
CHANGED
|
@@ -8,7 +8,7 @@ import { memo, useState } from 'react';
|
|
|
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
10
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
11
|
-
import {
|
|
11
|
+
import { Layering } from '@atlaskit/layering';
|
|
12
12
|
import { useNotifyOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
14
|
import { Manager, Reference } from '@atlaskit/popper';
|
|
@@ -68,7 +68,7 @@ export const Popup = /*#__PURE__*/memo(({
|
|
|
68
68
|
useNotifyOpenLayerObserver({
|
|
69
69
|
isOpen
|
|
70
70
|
});
|
|
71
|
-
const renderPopperWrapper = jsx(
|
|
71
|
+
const renderPopperWrapper = jsx(Layering, {
|
|
72
72
|
isDisabled: false
|
|
73
73
|
}, jsx(PopperWrapper
|
|
74
74
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
3
|
import { bind, bindAll } from 'bind-event-listener';
|
|
4
4
|
import noop from '@atlaskit/ds-lib/noop';
|
|
5
|
-
import {
|
|
5
|
+
import { useLayering } from '@atlaskit/layering';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import { isInteractiveElement } from './utils/is-element-interactive';
|
|
8
8
|
import { useAnimationFrame } from './utils/use-animation-frame';
|
|
@@ -20,7 +20,7 @@ export const useCloseManager = ({
|
|
|
20
20
|
const {
|
|
21
21
|
isLayerDisabled,
|
|
22
22
|
currentLevel
|
|
23
|
-
} =
|
|
23
|
+
} = useLayering();
|
|
24
24
|
const {
|
|
25
25
|
requestFrame,
|
|
26
26
|
cancelAllFrames
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
2
|
import createFocusTrap from 'focus-trap';
|
|
3
3
|
import noop from '@atlaskit/ds-lib/noop';
|
|
4
|
-
import {
|
|
4
|
+
import { useLayering } from '@atlaskit/layering';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { useAnimationFrame } from './utils/use-animation-frame';
|
|
7
7
|
export const useFocusManager = ({
|
|
@@ -20,7 +20,7 @@ export const useFocusManager = ({
|
|
|
20
20
|
} = useAnimationFrame();
|
|
21
21
|
const {
|
|
22
22
|
currentLevel
|
|
23
|
-
} =
|
|
23
|
+
} = useLayering();
|
|
24
24
|
useEffect(() => {
|
|
25
25
|
if (!popupRef || shouldCloseOnTab) {
|
|
26
26
|
return noop;
|
|
@@ -3,7 +3,7 @@ import React, { createContext, useContext, useState } from 'react';
|
|
|
3
3
|
import invariant from 'tiny-invariant';
|
|
4
4
|
import noop from '@atlaskit/ds-lib/noop';
|
|
5
5
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
6
|
-
import {
|
|
6
|
+
import { Layering } from '@atlaskit/layering';
|
|
7
7
|
import { useNotifyOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
8
8
|
import { Manager, Reference } from '@atlaskit/popper';
|
|
9
9
|
import Portal from '@atlaskit/portal';
|
|
@@ -142,7 +142,7 @@ export var PopupContent = function PopupContent(_ref4) {
|
|
|
142
142
|
if (!isOpen) {
|
|
143
143
|
return null;
|
|
144
144
|
}
|
|
145
|
-
var popperWrapper = /*#__PURE__*/React.createElement(
|
|
145
|
+
var popperWrapper = /*#__PURE__*/React.createElement(Layering, {
|
|
146
146
|
isDisabled: false
|
|
147
147
|
}, /*#__PURE__*/React.createElement(PopperWrapper
|
|
148
148
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -12,7 +12,7 @@ var _css;
|
|
|
12
12
|
import { forwardRef, Fragment, useMemo, useState } from 'react';
|
|
13
13
|
import { css, jsx } from '@emotion/react';
|
|
14
14
|
import FocusRing from '@atlaskit/focus-ring';
|
|
15
|
-
import {
|
|
15
|
+
import { useLayering } from '@atlaskit/layering';
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
17
|
import { Popper } from '@atlaskit/popper';
|
|
18
18
|
import { N0, N50A, N60A } from '@atlaskit/theme/colors';
|
|
@@ -132,8 +132,8 @@ function PopperWrapper(_ref) {
|
|
|
132
132
|
shouldDisableFocusTrap: shouldDisableFocusTrap,
|
|
133
133
|
shouldRenderToParent: shouldRenderToParent
|
|
134
134
|
});
|
|
135
|
-
var
|
|
136
|
-
currentLevel =
|
|
135
|
+
var _useLayering = useLayering(),
|
|
136
|
+
currentLevel = _useLayering.currentLevel;
|
|
137
137
|
var mergedModifiers = useMemo(function () {
|
|
138
138
|
return [{
|
|
139
139
|
name: 'flip',
|
package/dist/esm/popup.js
CHANGED
|
@@ -9,7 +9,7 @@ import { memo, useState } from 'react';
|
|
|
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
11
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
12
|
-
import {
|
|
12
|
+
import { Layering } from '@atlaskit/layering';
|
|
13
13
|
import { useNotifyOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import { Manager, Reference } from '@atlaskit/popper';
|
|
@@ -81,7 +81,7 @@ export var Popup = /*#__PURE__*/memo(function (_ref) {
|
|
|
81
81
|
useNotifyOpenLayerObserver({
|
|
82
82
|
isOpen: isOpen
|
|
83
83
|
});
|
|
84
|
-
var renderPopperWrapper = jsx(
|
|
84
|
+
var renderPopperWrapper = jsx(Layering, {
|
|
85
85
|
isDisabled: false
|
|
86
86
|
}, jsx(PopperWrapper
|
|
87
87
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
3
|
import { bind, bindAll } from 'bind-event-listener';
|
|
4
4
|
import noop from '@atlaskit/ds-lib/noop';
|
|
5
|
-
import {
|
|
5
|
+
import { useLayering } from '@atlaskit/layering';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import { isInteractiveElement } from './utils/is-element-interactive';
|
|
8
8
|
import { useAnimationFrame } from './utils/use-animation-frame';
|
|
@@ -16,9 +16,9 @@ export var useCloseManager = function useCloseManager(_ref) {
|
|
|
16
16
|
capture = _ref.shouldUseCaptureOnOutsideClick,
|
|
17
17
|
shouldCloseOnTab = _ref.shouldCloseOnTab,
|
|
18
18
|
shouldRenderToParent = _ref.shouldRenderToParent;
|
|
19
|
-
var
|
|
20
|
-
isLayerDisabled =
|
|
21
|
-
currentLevel =
|
|
19
|
+
var _useLayering = useLayering(),
|
|
20
|
+
isLayerDisabled = _useLayering.isLayerDisabled,
|
|
21
|
+
currentLevel = _useLayering.currentLevel;
|
|
22
22
|
var _useAnimationFrame = useAnimationFrame(),
|
|
23
23
|
requestFrame = _useAnimationFrame.requestFrame,
|
|
24
24
|
cancelAllFrames = _useAnimationFrame.cancelAllFrames;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
2
|
import createFocusTrap from 'focus-trap';
|
|
3
3
|
import noop from '@atlaskit/ds-lib/noop';
|
|
4
|
-
import {
|
|
4
|
+
import { useLayering } from '@atlaskit/layering';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { useAnimationFrame } from './utils/use-animation-frame';
|
|
7
7
|
export var useFocusManager = function useFocusManager(_ref) {
|
|
@@ -16,8 +16,8 @@ export var useFocusManager = function useFocusManager(_ref) {
|
|
|
16
16
|
var _useAnimationFrame = useAnimationFrame(),
|
|
17
17
|
requestFrame = _useAnimationFrame.requestFrame,
|
|
18
18
|
cancelAllFrames = _useAnimationFrame.cancelAllFrames;
|
|
19
|
-
var
|
|
20
|
-
currentLevel =
|
|
19
|
+
var _useLayering = useLayering(),
|
|
20
|
+
currentLevel = _useLayering.currentLevel;
|
|
21
21
|
useEffect(function () {
|
|
22
22
|
if (!popupRef || shouldCloseOnTab) {
|
|
23
23
|
return noop;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/popup",
|
|
3
|
-
"version": "1.29.
|
|
3
|
+
"version": "1.29.2",
|
|
4
4
|
"description": "A popup displays brief content in an overlay.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@atlaskit/css": "^0.6.0",
|
|
40
40
|
"@atlaskit/ds-lib": "^3.1.0",
|
|
41
|
-
"@atlaskit/focus-ring": "^1.
|
|
41
|
+
"@atlaskit/focus-ring": "^1.7.0",
|
|
42
42
|
"@atlaskit/layering": "^0.7.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
44
44
|
"@atlaskit/popper": "^6.3.0",
|
|
45
45
|
"@atlaskit/portal": "^4.9.0",
|
|
46
|
-
"@atlaskit/primitives": "^13.
|
|
46
|
+
"@atlaskit/primitives": "^13.1.0",
|
|
47
47
|
"@atlaskit/theme": "^14.0.0",
|
|
48
|
-
"@atlaskit/tokens": "^2.
|
|
48
|
+
"@atlaskit/tokens": "^2.2.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
50
50
|
"@emotion/react": "^11.7.1",
|
|
51
51
|
"bind-event-listener": "^3.0.0",
|