@atlaskit/dropdown-menu 16.2.1 → 16.3.1
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,24 @@
|
|
|
1
1
|
# @atlaskit/dropdown-menu
|
|
2
2
|
|
|
3
|
+
## 16.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 16.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#187451](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/187451)
|
|
14
|
+
[`c40feaf938dc1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c40feaf938dc1) -
|
|
15
|
+
This cleans up the feature flag references for focus improvements when interactive elements are
|
|
16
|
+
clicked outside of the menu, making them fully available to all people.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 16.2.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -19,7 +19,6 @@ var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
|
19
19
|
var _useControlled = _interopRequireDefault(require("@atlaskit/ds-lib/use-controlled"));
|
|
20
20
|
var _useFocusEvent = _interopRequireDefault(require("@atlaskit/ds-lib/use-focus-event"));
|
|
21
21
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-down"));
|
|
22
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
22
|
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
24
23
|
var _constants = require("@atlaskit/theme/constants");
|
|
25
24
|
var _focusManager = _interopRequireDefault(require("./internal/components/focus-manager"));
|
|
@@ -188,9 +187,7 @@ var DropdownMenu = function DropdownMenu(_ref) {
|
|
|
188
187
|
var _event$target$closest2, _event$target2;
|
|
189
188
|
// Don't focus the trigger if the click was outside of the menu
|
|
190
189
|
var isClickOutsideMenu = (event === null || event === void 0 ? void 0 : event.target) instanceof HTMLElement && ((_event$target$closest2 = (_event$target2 = event.target).closest) === null || _event$target$closest2 === void 0 ? void 0 : _event$target$closest2.call(_event$target2, '[role="menu"]')) === null;
|
|
191
|
-
var shouldPreventFocus = isClickOutsideMenu && document.activeElement !== document.body
|
|
192
|
-
// except if clicking on the body
|
|
193
|
-
(0, _platformFeatureFlags.fg)('platform_design_system_team_dropdown_return_focus');
|
|
190
|
+
var shouldPreventFocus = isClickOutsideMenu && document.activeElement !== document.body; // except if clicking on the body
|
|
194
191
|
if (!shouldPreventFocus) {
|
|
195
192
|
requestAnimationFrame(function () {
|
|
196
193
|
var _triggerRef$current;
|
|
@@ -8,7 +8,6 @@ import noop from '@atlaskit/ds-lib/noop';
|
|
|
8
8
|
import useControlledState from '@atlaskit/ds-lib/use-controlled';
|
|
9
9
|
import useFocus from '@atlaskit/ds-lib/use-focus-event';
|
|
10
10
|
import ExpandIcon from '@atlaskit/icon/core/migration/chevron-down';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
11
|
import Popup from '@atlaskit/popup';
|
|
13
12
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
14
13
|
import { gridSize as gridSizeFn, layers } from '@atlaskit/theme/constants';
|
|
@@ -158,9 +157,7 @@ const DropdownMenu = ({
|
|
|
158
157
|
var _event$target$closest2, _event$target2;
|
|
159
158
|
// Don't focus the trigger if the click was outside of the menu
|
|
160
159
|
const isClickOutsideMenu = (event === null || event === void 0 ? void 0 : event.target) instanceof HTMLElement && ((_event$target$closest2 = (_event$target2 = event.target).closest) === null || _event$target$closest2 === void 0 ? void 0 : _event$target$closest2.call(_event$target2, '[role="menu"]')) === null;
|
|
161
|
-
const shouldPreventFocus = isClickOutsideMenu && document.activeElement !== document.body
|
|
162
|
-
// except if clicking on the body
|
|
163
|
-
fg('platform_design_system_team_dropdown_return_focus');
|
|
160
|
+
const shouldPreventFocus = isClickOutsideMenu && document.activeElement !== document.body; // except if clicking on the body
|
|
164
161
|
if (!shouldPreventFocus) {
|
|
165
162
|
requestAnimationFrame(() => {
|
|
166
163
|
var _triggerRef$current;
|
|
@@ -14,7 +14,6 @@ import noop from '@atlaskit/ds-lib/noop';
|
|
|
14
14
|
import useControlledState from '@atlaskit/ds-lib/use-controlled';
|
|
15
15
|
import useFocus from '@atlaskit/ds-lib/use-focus-event';
|
|
16
16
|
import ExpandIcon from '@atlaskit/icon/core/migration/chevron-down';
|
|
17
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
17
|
import Popup from '@atlaskit/popup';
|
|
19
18
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
20
19
|
import { gridSize as gridSizeFn, layers } from '@atlaskit/theme/constants';
|
|
@@ -180,9 +179,7 @@ var DropdownMenu = function DropdownMenu(_ref) {
|
|
|
180
179
|
var _event$target$closest2, _event$target2;
|
|
181
180
|
// Don't focus the trigger if the click was outside of the menu
|
|
182
181
|
var isClickOutsideMenu = (event === null || event === void 0 ? void 0 : event.target) instanceof HTMLElement && ((_event$target$closest2 = (_event$target2 = event.target).closest) === null || _event$target$closest2 === void 0 ? void 0 : _event$target$closest2.call(_event$target2, '[role="menu"]')) === null;
|
|
183
|
-
var shouldPreventFocus = isClickOutsideMenu && document.activeElement !== document.body
|
|
184
|
-
// except if clicking on the body
|
|
185
|
-
fg('platform_design_system_team_dropdown_return_focus');
|
|
182
|
+
var shouldPreventFocus = isClickOutsideMenu && document.activeElement !== document.body; // except if clicking on the body
|
|
186
183
|
if (!shouldPreventFocus) {
|
|
187
184
|
requestAnimationFrame(function () {
|
|
188
185
|
var _triggerRef$current;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dropdown-menu",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.3.1",
|
|
4
4
|
"description": "A dropdown menu displays a list of actions or options to a user.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@atlaskit/button": "^23.2.0",
|
|
28
28
|
"@atlaskit/css": "^0.12.0",
|
|
29
|
-
"@atlaskit/ds-lib": "^
|
|
30
|
-
"@atlaskit/icon": "^27.
|
|
29
|
+
"@atlaskit/ds-lib": "^5.0.0",
|
|
30
|
+
"@atlaskit/icon": "^27.6.0",
|
|
31
31
|
"@atlaskit/layering": "^3.0.0",
|
|
32
32
|
"@atlaskit/menu": "^8.0.0",
|
|
33
33
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@atlaskit/link": "^3.2.0",
|
|
59
59
|
"@atlaskit/lozenge": "^13.0.0",
|
|
60
60
|
"@atlaskit/modal-dialog": "^14.3.0",
|
|
61
|
-
"@atlaskit/section-message": "^8.
|
|
61
|
+
"@atlaskit/section-message": "^8.3.0",
|
|
62
62
|
"@atlaskit/textfield": "^8.0.0",
|
|
63
63
|
"@atlaskit/toggle": "^15.0.0",
|
|
64
64
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"type": "boolean",
|
|
90
90
|
"referenceOnly": true
|
|
91
91
|
},
|
|
92
|
-
"
|
|
92
|
+
"platform_dst_dropdown_radio_default_selected_fix": {
|
|
93
93
|
"type": "boolean"
|
|
94
94
|
}
|
|
95
95
|
},
|