@atlaskit/drawer 9.0.6 → 9.1.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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/drawer
|
|
2
2
|
|
|
3
|
+
## 9.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#157176](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/157176)
|
|
8
|
+
[`3d03c4f1002ab`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3d03c4f1002ab) -
|
|
9
|
+
Integrate layering and use CloseManager instead
|
|
10
|
+
|
|
3
11
|
## 9.0.6
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -10,7 +10,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _exenv = require("exenv");
|
|
11
11
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
12
12
|
var _layering = require("@atlaskit/layering");
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _portal = _interopRequireDefault(require("@atlaskit/portal"));
|
|
15
14
|
var _blanket = _interopRequireDefault(require("./blanket"));
|
|
16
15
|
var _primitives = _interopRequireDefault(require("./primitives"));
|
|
@@ -73,20 +72,14 @@ var Drawer = exports.Drawer = function Drawer(_ref2) {
|
|
|
73
72
|
action: 'dismissed',
|
|
74
73
|
componentName: 'drawer',
|
|
75
74
|
packageName: "@atlaskit/drawer",
|
|
76
|
-
packageVersion: "9.0
|
|
75
|
+
packageVersion: "9.1.0",
|
|
77
76
|
analyticsData: {
|
|
78
77
|
trigger: 'escKey'
|
|
79
78
|
}
|
|
80
79
|
});
|
|
81
80
|
var handleKeyDown = (0, _react.useCallback)(function (evt) {
|
|
82
81
|
onKeyDown && onKeyDown(evt);
|
|
83
|
-
|
|
84
|
-
// when feature flag on, we will use the EscapeCloseManager instead
|
|
85
|
-
if (evt.key === 'Escape' && isOpen && onClose) {
|
|
86
|
-
handleClose(evt);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}, [handleClose, isOpen, onClose, onKeyDown]);
|
|
82
|
+
}, [onKeyDown]);
|
|
90
83
|
(0, _react.useEffect)(function () {
|
|
91
84
|
if (isOpen) {
|
|
92
85
|
window.addEventListener('keydown', handleKeyDown);
|
|
@@ -102,7 +95,7 @@ var Drawer = exports.Drawer = function Drawer(_ref2) {
|
|
|
102
95
|
action: 'dismissed',
|
|
103
96
|
componentName: 'drawer',
|
|
104
97
|
packageName: "@atlaskit/drawer",
|
|
105
|
-
packageVersion: "9.0
|
|
98
|
+
packageVersion: "9.1.0",
|
|
106
99
|
analyticsData: {
|
|
107
100
|
trigger: 'blanket'
|
|
108
101
|
}
|
|
@@ -114,7 +107,7 @@ var Drawer = exports.Drawer = function Drawer(_ref2) {
|
|
|
114
107
|
action: 'dismissed',
|
|
115
108
|
componentName: 'drawer',
|
|
116
109
|
packageName: "@atlaskit/drawer",
|
|
117
|
-
packageVersion: "9.0
|
|
110
|
+
packageVersion: "9.1.0",
|
|
118
111
|
analyticsData: {
|
|
119
112
|
trigger: 'backButton'
|
|
120
113
|
}
|
|
@@ -147,7 +140,7 @@ var Drawer = exports.Drawer = function Drawer(_ref2) {
|
|
|
147
140
|
isFocusLockEnabled: isFocusLockEnabled,
|
|
148
141
|
shouldReturnFocus: shouldReturnFocus,
|
|
149
142
|
scrollContentLabel: scrollContentLabel
|
|
150
|
-
}, isOpen
|
|
143
|
+
}, isOpen ? /*#__PURE__*/_react.default.createElement(_layering.UNSAFE_LAYERING, {
|
|
151
144
|
isDisabled: false
|
|
152
145
|
}, children, /*#__PURE__*/_react.default.createElement(EscapeCloseManager, {
|
|
153
146
|
onClose: handleClose
|
|
@@ -3,7 +3,6 @@ import React, { useCallback, useEffect } from 'react';
|
|
|
3
3
|
import { canUseDOM } from 'exenv';
|
|
4
4
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
5
5
|
import { UNSAFE_LAYERING, useCloseOnEscapePress } from '@atlaskit/layering';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import Portal from '@atlaskit/portal';
|
|
8
7
|
import Blanket from './blanket';
|
|
9
8
|
import DrawerPrimitive from './primitives';
|
|
@@ -58,20 +57,14 @@ export const Drawer = ({
|
|
|
58
57
|
action: 'dismissed',
|
|
59
58
|
componentName: 'drawer',
|
|
60
59
|
packageName: "@atlaskit/drawer",
|
|
61
|
-
packageVersion: "9.0
|
|
60
|
+
packageVersion: "9.1.0",
|
|
62
61
|
analyticsData: {
|
|
63
62
|
trigger: 'escKey'
|
|
64
63
|
}
|
|
65
64
|
});
|
|
66
65
|
const handleKeyDown = useCallback(evt => {
|
|
67
66
|
onKeyDown && onKeyDown(evt);
|
|
68
|
-
|
|
69
|
-
// when feature flag on, we will use the EscapeCloseManager instead
|
|
70
|
-
if (evt.key === 'Escape' && isOpen && onClose) {
|
|
71
|
-
handleClose(evt);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}, [handleClose, isOpen, onClose, onKeyDown]);
|
|
67
|
+
}, [onKeyDown]);
|
|
75
68
|
useEffect(() => {
|
|
76
69
|
if (isOpen) {
|
|
77
70
|
window.addEventListener('keydown', handleKeyDown);
|
|
@@ -85,7 +78,7 @@ export const Drawer = ({
|
|
|
85
78
|
action: 'dismissed',
|
|
86
79
|
componentName: 'drawer',
|
|
87
80
|
packageName: "@atlaskit/drawer",
|
|
88
|
-
packageVersion: "9.0
|
|
81
|
+
packageVersion: "9.1.0",
|
|
89
82
|
analyticsData: {
|
|
90
83
|
trigger: 'blanket'
|
|
91
84
|
}
|
|
@@ -95,7 +88,7 @@ export const Drawer = ({
|
|
|
95
88
|
action: 'dismissed',
|
|
96
89
|
componentName: 'drawer',
|
|
97
90
|
packageName: "@atlaskit/drawer",
|
|
98
|
-
packageVersion: "9.0
|
|
91
|
+
packageVersion: "9.1.0",
|
|
99
92
|
analyticsData: {
|
|
100
93
|
trigger: 'backButton'
|
|
101
94
|
}
|
|
@@ -128,7 +121,7 @@ export const Drawer = ({
|
|
|
128
121
|
isFocusLockEnabled: isFocusLockEnabled,
|
|
129
122
|
shouldReturnFocus: shouldReturnFocus,
|
|
130
123
|
scrollContentLabel: scrollContentLabel
|
|
131
|
-
}, isOpen
|
|
124
|
+
}, isOpen ? /*#__PURE__*/React.createElement(UNSAFE_LAYERING, {
|
|
132
125
|
isDisabled: false
|
|
133
126
|
}, children, /*#__PURE__*/React.createElement(EscapeCloseManager, {
|
|
134
127
|
onClose: handleClose
|
|
@@ -3,7 +3,6 @@ import React, { useCallback, useEffect } from 'react';
|
|
|
3
3
|
import { canUseDOM } from 'exenv';
|
|
4
4
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
5
5
|
import { UNSAFE_LAYERING, useCloseOnEscapePress } from '@atlaskit/layering';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import Portal from '@atlaskit/portal';
|
|
8
7
|
import Blanket from './blanket';
|
|
9
8
|
import DrawerPrimitive from './primitives';
|
|
@@ -62,20 +61,14 @@ export var Drawer = function Drawer(_ref2) {
|
|
|
62
61
|
action: 'dismissed',
|
|
63
62
|
componentName: 'drawer',
|
|
64
63
|
packageName: "@atlaskit/drawer",
|
|
65
|
-
packageVersion: "9.0
|
|
64
|
+
packageVersion: "9.1.0",
|
|
66
65
|
analyticsData: {
|
|
67
66
|
trigger: 'escKey'
|
|
68
67
|
}
|
|
69
68
|
});
|
|
70
69
|
var handleKeyDown = useCallback(function (evt) {
|
|
71
70
|
onKeyDown && onKeyDown(evt);
|
|
72
|
-
|
|
73
|
-
// when feature flag on, we will use the EscapeCloseManager instead
|
|
74
|
-
if (evt.key === 'Escape' && isOpen && onClose) {
|
|
75
|
-
handleClose(evt);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}, [handleClose, isOpen, onClose, onKeyDown]);
|
|
71
|
+
}, [onKeyDown]);
|
|
79
72
|
useEffect(function () {
|
|
80
73
|
if (isOpen) {
|
|
81
74
|
window.addEventListener('keydown', handleKeyDown);
|
|
@@ -91,7 +84,7 @@ export var Drawer = function Drawer(_ref2) {
|
|
|
91
84
|
action: 'dismissed',
|
|
92
85
|
componentName: 'drawer',
|
|
93
86
|
packageName: "@atlaskit/drawer",
|
|
94
|
-
packageVersion: "9.0
|
|
87
|
+
packageVersion: "9.1.0",
|
|
95
88
|
analyticsData: {
|
|
96
89
|
trigger: 'blanket'
|
|
97
90
|
}
|
|
@@ -103,7 +96,7 @@ export var Drawer = function Drawer(_ref2) {
|
|
|
103
96
|
action: 'dismissed',
|
|
104
97
|
componentName: 'drawer',
|
|
105
98
|
packageName: "@atlaskit/drawer",
|
|
106
|
-
packageVersion: "9.0
|
|
99
|
+
packageVersion: "9.1.0",
|
|
107
100
|
analyticsData: {
|
|
108
101
|
trigger: 'backButton'
|
|
109
102
|
}
|
|
@@ -136,7 +129,7 @@ export var Drawer = function Drawer(_ref2) {
|
|
|
136
129
|
isFocusLockEnabled: isFocusLockEnabled,
|
|
137
130
|
shouldReturnFocus: shouldReturnFocus,
|
|
138
131
|
scrollContentLabel: scrollContentLabel
|
|
139
|
-
}, isOpen
|
|
132
|
+
}, isOpen ? /*#__PURE__*/React.createElement(UNSAFE_LAYERING, {
|
|
140
133
|
isDisabled: false
|
|
141
134
|
}, children, /*#__PURE__*/React.createElement(EscapeCloseManager, {
|
|
142
135
|
onClose: handleClose
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/drawer",
|
|
3
|
-
"version": "9.0
|
|
3
|
+
"version": "9.1.0",
|
|
4
4
|
"description": "A drawer is a panel that slides in from the left side of the screen.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
40
40
|
"@atlaskit/blanket": "^13.3.0",
|
|
41
|
-
"@atlaskit/button": "^20.
|
|
42
|
-
"@atlaskit/icon": "^22.
|
|
41
|
+
"@atlaskit/button": "^20.3.0",
|
|
42
|
+
"@atlaskit/icon": "^22.24.0",
|
|
43
43
|
"@atlaskit/layering": "^0.7.0",
|
|
44
44
|
"@atlaskit/motion": "^1.9.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
@@ -76,9 +76,6 @@
|
|
|
76
76
|
"wait-for-expect": "^1.2.0"
|
|
77
77
|
},
|
|
78
78
|
"platform-feature-flags": {
|
|
79
|
-
"platform.design-system-team.inline-message-layering_wfp1p": {
|
|
80
|
-
"type": "boolean"
|
|
81
|
-
},
|
|
82
79
|
"platform_dst_drawer-bump-react-focus-lock": {
|
|
83
80
|
"type": "boolean"
|
|
84
81
|
}
|