@atlaskit/dropdown-menu 12.1.0 → 12.1.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,11 @@
|
|
|
1
1
|
# @atlaskit/dropdown-menu
|
|
2
2
|
|
|
3
|
+
## 12.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#41611](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41611) [`876d7943287`](https://bitbucket.org/atlassian/atlassian-frontend/commits/876d7943287) - Fix keyboard arrow controls for dropdown item custom component.
|
|
8
|
+
|
|
3
9
|
## 12.1.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -53,7 +53,8 @@ var DropdownMenuItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
53
53
|
ref: (0, _mergeRefs.default)([ref, itemRef]),
|
|
54
54
|
shouldDescriptionWrap: shouldDescriptionWrap,
|
|
55
55
|
shouldTitleWrap: shouldTitleWrap,
|
|
56
|
-
testId: testId
|
|
56
|
+
testId: testId,
|
|
57
|
+
href: href
|
|
57
58
|
}, children);
|
|
58
59
|
} else if (href) {
|
|
59
60
|
return /*#__PURE__*/_react.default.createElement(_linkItem.default, {
|
|
@@ -42,7 +42,8 @@ const DropdownMenuItem = /*#__PURE__*/forwardRef(({
|
|
|
42
42
|
ref: mergeRefs([ref, itemRef]),
|
|
43
43
|
shouldDescriptionWrap: shouldDescriptionWrap,
|
|
44
44
|
shouldTitleWrap: shouldTitleWrap,
|
|
45
|
-
testId: testId
|
|
45
|
+
testId: testId,
|
|
46
|
+
href: href
|
|
46
47
|
}, children);
|
|
47
48
|
} else if (href) {
|
|
48
49
|
return /*#__PURE__*/React.createElement(LinkItem, {
|
|
@@ -43,7 +43,8 @@ var DropdownMenuItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
43
43
|
ref: mergeRefs([ref, itemRef]),
|
|
44
44
|
shouldDescriptionWrap: shouldDescriptionWrap,
|
|
45
45
|
shouldTitleWrap: shouldTitleWrap,
|
|
46
|
-
testId: testId
|
|
46
|
+
testId: testId,
|
|
47
|
+
href: href
|
|
47
48
|
}, children);
|
|
48
49
|
} else if (href) {
|
|
49
50
|
return /*#__PURE__*/React.createElement(LinkItem, {
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KeyboardEvent, MouseEvent, ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
-
import type { CustomItemProps, MenuGroupProps, SectionProps } from '@atlaskit/menu/types';
|
|
2
|
+
import type { CustomItemComponentProps, CustomItemProps, MenuGroupProps, SectionProps } from '@atlaskit/menu/types';
|
|
3
3
|
import type { ContentProps, TriggerProps } from '@atlaskit/popup/types';
|
|
4
4
|
export type FocusableElement = HTMLAnchorElement | HTMLButtonElement;
|
|
5
5
|
export type Action = 'next' | 'prev' | 'first' | 'last';
|
|
@@ -301,3 +301,9 @@ export interface DropdownItemRadioProps {
|
|
|
301
301
|
*/
|
|
302
302
|
testId?: string;
|
|
303
303
|
}
|
|
304
|
+
export interface CustomItemHtmlProps extends CustomItemComponentProps {
|
|
305
|
+
/**
|
|
306
|
+
* Link to another page.
|
|
307
|
+
*/
|
|
308
|
+
href?: string;
|
|
309
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KeyboardEvent, MouseEvent, ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
-
import type { CustomItemProps, MenuGroupProps, SectionProps } from '@atlaskit/menu/types';
|
|
2
|
+
import type { CustomItemComponentProps, CustomItemProps, MenuGroupProps, SectionProps } from '@atlaskit/menu/types';
|
|
3
3
|
import type { ContentProps, TriggerProps } from '@atlaskit/popup/types';
|
|
4
4
|
export type FocusableElement = HTMLAnchorElement | HTMLButtonElement;
|
|
5
5
|
export type Action = 'next' | 'prev' | 'first' | 'last';
|
|
@@ -301,3 +301,9 @@ export interface DropdownItemRadioProps {
|
|
|
301
301
|
*/
|
|
302
302
|
testId?: string;
|
|
303
303
|
}
|
|
304
|
+
export interface CustomItemHtmlProps extends CustomItemComponentProps {
|
|
305
|
+
/**
|
|
306
|
+
* Link to another page.
|
|
307
|
+
*/
|
|
308
|
+
href?: string;
|
|
309
|
+
}
|