@atlaskit/dropdown-menu 12.22.0 → 12.22.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 +14 -0
- package/dist/cjs/internal/components/focus-manager.js +2 -3
- package/dist/es2019/internal/components/focus-manager.js +2 -3
- package/dist/esm/internal/components/focus-manager.js +3 -4
- package/dist/types/types.d.ts +2 -0
- package/dist/types-ts4.5/types.d.ts +2 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/dropdown-menu
|
|
2
2
|
|
|
3
|
+
## 12.22.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 12.22.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#161638](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/161638)
|
|
14
|
+
[`d2e5e5ce0053d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d2e5e5ce0053d) -
|
|
15
|
+
Use new API of layering without UNSAFE prefix
|
|
16
|
+
|
|
3
17
|
## 12.22.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -64,9 +64,8 @@ var FocusManager = function FocusManager(_ref) {
|
|
|
64
64
|
},
|
|
65
65
|
// Updating register ref on force reload will cause `useRegisterItemWithFocusManager` to re-register
|
|
66
66
|
[refresh]);
|
|
67
|
-
var
|
|
68
|
-
isLayerDisabled =
|
|
69
|
-
|
|
67
|
+
var _useLayering = (0, _layering.useLayering)(),
|
|
68
|
+
isLayerDisabled = _useLayering.isLayerDisabled;
|
|
70
69
|
// Intentionally rebinding on each render
|
|
71
70
|
(0, _react.useEffect)(function () {
|
|
72
71
|
if (registerMode.current === 'ordered') {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { createContext, useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { bind } from 'bind-event-listener';
|
|
3
3
|
import __noop from '@atlaskit/ds-lib/noop';
|
|
4
|
-
import {
|
|
4
|
+
import { useLayering } from '@atlaskit/layering';
|
|
5
5
|
import handleFocus from '../utils/handle-focus';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -54,8 +54,7 @@ const FocusManager = ({
|
|
|
54
54
|
[refresh]);
|
|
55
55
|
const {
|
|
56
56
|
isLayerDisabled
|
|
57
|
-
} =
|
|
58
|
-
|
|
57
|
+
} = useLayering();
|
|
59
58
|
// Intentionally rebinding on each render
|
|
60
59
|
useEffect(() => {
|
|
61
60
|
if (registerMode.current === 'ordered') {
|
|
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import React, { createContext, useCallback, useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { bind } from 'bind-event-listener';
|
|
4
4
|
import __noop from '@atlaskit/ds-lib/noop';
|
|
5
|
-
import {
|
|
5
|
+
import { useLayering } from '@atlaskit/layering';
|
|
6
6
|
import handleFocus from '../utils/handle-focus';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -55,9 +55,8 @@ var FocusManager = function FocusManager(_ref) {
|
|
|
55
55
|
},
|
|
56
56
|
// Updating register ref on force reload will cause `useRegisterItemWithFocusManager` to re-register
|
|
57
57
|
[refresh]);
|
|
58
|
-
var
|
|
59
|
-
isLayerDisabled =
|
|
60
|
-
|
|
58
|
+
var _useLayering = useLayering(),
|
|
59
|
+
isLayerDisabled = _useLayering.isLayerDisabled;
|
|
61
60
|
// Intentionally rebinding on each render
|
|
62
61
|
useEffect(function () {
|
|
63
62
|
if (registerMode.current === 'ordered') {
|
package/dist/types/types.d.ts
CHANGED
|
@@ -134,6 +134,8 @@ interface InternalDropdownMenuProps<TriggerElement extends HTMLElement = any> {
|
|
|
134
134
|
/**
|
|
135
135
|
* Controls the initial open state of the dropdown. If provided, the component is considered to be controlled
|
|
136
136
|
* which means that the user is responsible for managing the open and close state of the menu.
|
|
137
|
+
* Using `defaultOpen` may cause accessiblity issues because it will automatically shift focus to the first menu item; which can be disorienting.
|
|
138
|
+
* Only use this if action on the menu is required to proceed.
|
|
137
139
|
*/
|
|
138
140
|
defaultOpen?: boolean;
|
|
139
141
|
/**
|
|
@@ -134,6 +134,8 @@ interface InternalDropdownMenuProps<TriggerElement extends HTMLElement = any> {
|
|
|
134
134
|
/**
|
|
135
135
|
* Controls the initial open state of the dropdown. If provided, the component is considered to be controlled
|
|
136
136
|
* which means that the user is responsible for managing the open and close state of the menu.
|
|
137
|
+
* Using `defaultOpen` may cause accessiblity issues because it will automatically shift focus to the first menu item; which can be disorienting.
|
|
138
|
+
* Only use this if action on the menu is required to proceed.
|
|
137
139
|
*/
|
|
138
140
|
defaultOpen?: boolean;
|
|
139
141
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dropdown-menu",
|
|
3
|
-
"version": "12.22.
|
|
3
|
+
"version": "12.22.2",
|
|
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/"
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@atlaskit/button": "^20.3.0",
|
|
27
27
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
28
|
-
"@atlaskit/ds-lib": "^3.
|
|
28
|
+
"@atlaskit/ds-lib": "^3.2.0",
|
|
29
29
|
"@atlaskit/icon": "^22.24.0",
|
|
30
|
-
"@atlaskit/layering": "^0.
|
|
30
|
+
"@atlaskit/layering": "^0.8.0",
|
|
31
31
|
"@atlaskit/menu": "^2.13.0",
|
|
32
32
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
33
33
|
"@atlaskit/popup": "^1.29.0",
|
|
34
|
-
"@atlaskit/primitives": "^13.
|
|
34
|
+
"@atlaskit/primitives": "^13.2.0",
|
|
35
35
|
"@atlaskit/spinner": "^16.3.0",
|
|
36
36
|
"@atlaskit/theme": "^14.0.0",
|
|
37
|
-
"@atlaskit/tokens": "^2.
|
|
37
|
+
"@atlaskit/tokens": "^2.2.0",
|
|
38
38
|
"@babel/runtime": "^7.0.0",
|
|
39
39
|
"@emotion/react": "^11.7.1",
|
|
40
40
|
"bind-event-listener": "^3.0.0"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"jscodeshift": "^0.13.0",
|
|
61
61
|
"raf-stub": "^2.0.1",
|
|
62
62
|
"react-dom": "^16.8.0",
|
|
63
|
-
"storybook-addon-performance": "^0.
|
|
63
|
+
"storybook-addon-performance": "^0.17.3",
|
|
64
64
|
"tiny-invariant": "^1.2.0",
|
|
65
65
|
"typescript": "~5.4.2"
|
|
66
66
|
},
|