@atlaskit/dropdown-menu 12.4.0 → 12.5.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,18 @@
|
|
|
1
1
|
# @atlaskit/dropdown-menu
|
|
2
2
|
|
|
3
|
+
## 12.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#72130](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72130) [`b037e5451037`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b037e5451037) - Update new button text color fallback for default theme (non-token) to match that of old button current text color
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 12.5.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [#65862](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/65862) [`7e4f1a341224`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7e4f1a341224) - [ux] Updated dropdown-menu trigger to consume the new button. The new default button trigger (text + arrow icon) would be narrower than before. The fallback color on button trigger is now darker when no theme is applied.
|
|
15
|
+
|
|
3
16
|
## 12.4.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -12,7 +12,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _bindEventListener = require("bind-event-listener");
|
|
15
|
-
var
|
|
15
|
+
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
16
16
|
var _keycodes = require("@atlaskit/ds-lib/keycodes");
|
|
17
17
|
var _mergeRefs = _interopRequireDefault(require("@atlaskit/ds-lib/merge-refs"));
|
|
18
18
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
@@ -64,11 +64,13 @@ var getFallbackPlacements = function getFallbackPlacements(placement) {
|
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
+
* __Dropdown menu__
|
|
68
|
+
*
|
|
67
69
|
* A dropdown menu displays a list of actions or options to a user.
|
|
68
70
|
*
|
|
69
71
|
* - [Examples](https://atlassian.design/components/dropdown-menu/examples)
|
|
70
72
|
* - [Code](https://atlassian.design/components/dropdown-menu/code)
|
|
71
|
-
* - [Usage](https://atlassian.design/components/dropdown-menu/usage)
|
|
73
|
+
* - [Usage](https://atlassian.design/components/dropdown-menu/usage)
|
|
72
74
|
*/
|
|
73
75
|
var DropdownMenu = function DropdownMenu(_ref) {
|
|
74
76
|
var _ref$autoFocus = _ref.autoFocus,
|
|
@@ -214,16 +216,13 @@ var DropdownMenu = function DropdownMenu(_ref) {
|
|
|
214
216
|
testId: testId && "".concat(testId, "--trigger")
|
|
215
217
|
}));
|
|
216
218
|
}
|
|
217
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
219
|
+
return /*#__PURE__*/_react.default.createElement(_new.default, (0, _extends2.default)({}, bindFocus, {
|
|
218
220
|
ref: (0, _mergeRefs.default)([ref, itemRef]),
|
|
219
221
|
"aria-controls": ariaControls,
|
|
220
222
|
"aria-expanded": ariaExpanded,
|
|
221
223
|
"aria-haspopup": ariaHasPopup,
|
|
222
224
|
isSelected: isLocalOpen,
|
|
223
|
-
iconAfter:
|
|
224
|
-
size: "medium",
|
|
225
|
-
label: ""
|
|
226
|
-
}),
|
|
225
|
+
iconAfter: _chevronDown.default,
|
|
227
226
|
onClick: handleTriggerClicked,
|
|
228
227
|
testId: testId && "".concat(testId, "--trigger"),
|
|
229
228
|
"aria-label": label
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import { bind } from 'bind-event-listener';
|
|
4
|
-
import Button from '@atlaskit/button/
|
|
4
|
+
import Button from '@atlaskit/button/new';
|
|
5
5
|
import { KEY_DOWN } from '@atlaskit/ds-lib/keycodes';
|
|
6
6
|
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
7
7
|
import noop from '@atlaskit/ds-lib/noop';
|
|
@@ -49,11 +49,13 @@ const getFallbackPlacements = placement => {
|
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
+
* __Dropdown menu__
|
|
53
|
+
*
|
|
52
54
|
* A dropdown menu displays a list of actions or options to a user.
|
|
53
55
|
*
|
|
54
56
|
* - [Examples](https://atlassian.design/components/dropdown-menu/examples)
|
|
55
57
|
* - [Code](https://atlassian.design/components/dropdown-menu/code)
|
|
56
|
-
* - [Usage](https://atlassian.design/components/dropdown-menu/usage)
|
|
58
|
+
* - [Usage](https://atlassian.design/components/dropdown-menu/usage)
|
|
57
59
|
*/
|
|
58
60
|
const DropdownMenu = ({
|
|
59
61
|
autoFocus = false,
|
|
@@ -194,10 +196,7 @@ const DropdownMenu = ({
|
|
|
194
196
|
"aria-expanded": ariaExpanded,
|
|
195
197
|
"aria-haspopup": ariaHasPopup,
|
|
196
198
|
isSelected: isLocalOpen,
|
|
197
|
-
iconAfter:
|
|
198
|
-
size: "medium",
|
|
199
|
-
label: ""
|
|
200
|
-
}),
|
|
199
|
+
iconAfter: ExpandIcon,
|
|
201
200
|
onClick: handleTriggerClicked,
|
|
202
201
|
testId: testId && `${testId}--trigger`,
|
|
203
202
|
"aria-label": label
|
|
@@ -7,7 +7,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
9
9
|
import { bind } from 'bind-event-listener';
|
|
10
|
-
import Button from '@atlaskit/button/
|
|
10
|
+
import Button from '@atlaskit/button/new';
|
|
11
11
|
import { KEY_DOWN } from '@atlaskit/ds-lib/keycodes';
|
|
12
12
|
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
13
13
|
import noop from '@atlaskit/ds-lib/noop';
|
|
@@ -55,11 +55,13 @@ var getFallbackPlacements = function getFallbackPlacements(placement) {
|
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
|
+
* __Dropdown menu__
|
|
59
|
+
*
|
|
58
60
|
* A dropdown menu displays a list of actions or options to a user.
|
|
59
61
|
*
|
|
60
62
|
* - [Examples](https://atlassian.design/components/dropdown-menu/examples)
|
|
61
63
|
* - [Code](https://atlassian.design/components/dropdown-menu/code)
|
|
62
|
-
* - [Usage](https://atlassian.design/components/dropdown-menu/usage)
|
|
64
|
+
* - [Usage](https://atlassian.design/components/dropdown-menu/usage)
|
|
63
65
|
*/
|
|
64
66
|
var DropdownMenu = function DropdownMenu(_ref) {
|
|
65
67
|
var _ref$autoFocus = _ref.autoFocus,
|
|
@@ -211,10 +213,7 @@ var DropdownMenu = function DropdownMenu(_ref) {
|
|
|
211
213
|
"aria-expanded": ariaExpanded,
|
|
212
214
|
"aria-haspopup": ariaHasPopup,
|
|
213
215
|
isSelected: isLocalOpen,
|
|
214
|
-
iconAfter:
|
|
215
|
-
size: "medium",
|
|
216
|
-
label: ""
|
|
217
|
-
}),
|
|
216
|
+
iconAfter: ExpandIcon,
|
|
218
217
|
onClick: handleTriggerClicked,
|
|
219
218
|
testId: testId && "".concat(testId, "--trigger"),
|
|
220
219
|
"aria-label": label
|
|
@@ -3,11 +3,13 @@ import type { DropdownMenuProps } from './types';
|
|
|
3
3
|
export declare const KEY_SPACE = " ";
|
|
4
4
|
export declare const KEY_ENTER = "Enter";
|
|
5
5
|
/**
|
|
6
|
+
* __Dropdown menu__
|
|
7
|
+
*
|
|
6
8
|
* A dropdown menu displays a list of actions or options to a user.
|
|
7
9
|
*
|
|
8
10
|
* - [Examples](https://atlassian.design/components/dropdown-menu/examples)
|
|
9
11
|
* - [Code](https://atlassian.design/components/dropdown-menu/code)
|
|
10
|
-
* - [Usage](https://atlassian.design/components/dropdown-menu/usage)
|
|
12
|
+
* - [Usage](https://atlassian.design/components/dropdown-menu/usage)
|
|
11
13
|
*/
|
|
12
14
|
declare const DropdownMenu: <T extends HTMLElement = HTMLElement>({ autoFocus, children, defaultOpen, isLoading, isOpen, onOpenChange, placement, shouldFlip, shouldRenderToParent, spacing, statusLabel, testId, trigger, zIndex, label, }: DropdownMenuProps<T>) => JSX.Element;
|
|
13
15
|
export default DropdownMenu;
|
|
@@ -3,11 +3,13 @@ import type { DropdownMenuProps } from './types';
|
|
|
3
3
|
export declare const KEY_SPACE = " ";
|
|
4
4
|
export declare const KEY_ENTER = "Enter";
|
|
5
5
|
/**
|
|
6
|
+
* __Dropdown menu__
|
|
7
|
+
*
|
|
6
8
|
* A dropdown menu displays a list of actions or options to a user.
|
|
7
9
|
*
|
|
8
10
|
* - [Examples](https://atlassian.design/components/dropdown-menu/examples)
|
|
9
11
|
* - [Code](https://atlassian.design/components/dropdown-menu/code)
|
|
10
|
-
* - [Usage](https://atlassian.design/components/dropdown-menu/usage)
|
|
12
|
+
* - [Usage](https://atlassian.design/components/dropdown-menu/usage)
|
|
11
13
|
*/
|
|
12
14
|
declare const DropdownMenu: <T extends HTMLElement = HTMLElement>({ autoFocus, children, defaultOpen, isLoading, isOpen, onOpenChange, placement, shouldFlip, shouldRenderToParent, spacing, statusLabel, testId, trigger, zIndex, label, }: DropdownMenuProps<T>) => JSX.Element;
|
|
13
15
|
export default DropdownMenu;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dropdown-menu",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.5.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,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@atlaskit/button": "^17.
|
|
29
|
+
"@atlaskit/button": "^17.4.0",
|
|
30
30
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
31
31
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
32
32
|
"@atlaskit/icon": "^22.0.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/primitives": "^2.0.0",
|
|
38
38
|
"@atlaskit/spinner": "^16.0.0",
|
|
39
39
|
"@atlaskit/theme": "^12.6.0",
|
|
40
|
-
"@atlaskit/tokens": "^1.
|
|
40
|
+
"@atlaskit/tokens": "^1.37.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0",
|
|
42
42
|
"@emotion/react": "^11.7.1",
|
|
43
43
|
"bind-event-listener": "^2.1.1"
|