@atlaskit/dropdown-menu 12.18.4 → 12.18.5
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 +8 -0
- package/dist/cjs/checkbox/dropdown-item-checkbox.js +5 -2
- package/dist/cjs/dropdown-menu-item.js +9 -4
- package/dist/cjs/dropdown-menu.js +6 -2
- package/dist/cjs/radio/dropdown-item-radio.js +5 -2
- package/dist/es2019/checkbox/dropdown-item-checkbox.js +4 -1
- package/dist/es2019/dropdown-menu-item.js +8 -3
- package/dist/es2019/dropdown-menu.js +6 -2
- package/dist/es2019/radio/dropdown-item-radio.js +4 -1
- package/dist/esm/checkbox/dropdown-item-checkbox.js +5 -2
- package/dist/esm/dropdown-menu-item.js +9 -4
- package/dist/esm/dropdown-menu.js +6 -2
- package/dist/esm/radio/dropdown-item-radio.js +5 -2
- package/dist/types/checkbox/dropdown-item-checkbox.d.ts +1 -1
- package/dist/types/dropdown-menu.d.ts +1 -1
- package/dist/types/radio/dropdown-item-radio.d.ts +1 -1
- package/dist/types/types.d.ts +16 -0
- package/dist/types-ts4.5/checkbox/dropdown-item-checkbox.d.ts +1 -1
- package/dist/types-ts4.5/dropdown-menu.d.ts +1 -1
- package/dist/types-ts4.5/radio/dropdown-item-radio.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +16 -0
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/dropdown-menu
|
|
2
2
|
|
|
3
|
+
## 12.18.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#148720](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/148720)
|
|
8
|
+
[`fcf151627c8de`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fcf151627c8de) -
|
|
9
|
+
Added interactionName to components in menu and dropdownmenu
|
|
10
|
+
|
|
3
11
|
## 12.18.4
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -13,10 +13,11 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
14
14
|
var _menu = require("@atlaskit/menu");
|
|
15
15
|
var _buttonItem = _interopRequireDefault(require("@atlaskit/menu/button-item"));
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _checkboxIcon = _interopRequireDefault(require("../internal/components/checkbox-icon"));
|
|
17
18
|
var _useCheckboxState3 = _interopRequireDefault(require("../internal/hooks/use-checkbox-state"));
|
|
18
19
|
var _useRegisterItemWithFocusManager = _interopRequireDefault(require("../internal/hooks/use-register-item-with-focus-manager"));
|
|
19
|
-
var _excluded = ["children", "defaultSelected", "description", "id", "isDisabled", "isSelected", "onClick", "shouldDescriptionWrap", "shouldTitleWrap", "testId"];
|
|
20
|
+
var _excluded = ["children", "defaultSelected", "description", "id", "isDisabled", "isSelected", "onClick", "shouldDescriptionWrap", "shouldTitleWrap", "testId", "interactionName"];
|
|
20
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
23
|
/**
|
|
@@ -42,6 +43,7 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(_ref) {
|
|
|
42
43
|
_ref$shouldTitleWrap = _ref.shouldTitleWrap,
|
|
43
44
|
shouldTitleWrap = _ref$shouldTitleWrap === void 0 ? true : _ref$shouldTitleWrap,
|
|
44
45
|
testId = _ref.testId,
|
|
46
|
+
interactionName = _ref.interactionName,
|
|
45
47
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
46
48
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
47
49
|
// eslint-disable-next-line no-console
|
|
@@ -79,7 +81,8 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(_ref) {
|
|
|
79
81
|
shouldDescriptionWrap: shouldDescriptionWrap,
|
|
80
82
|
shouldTitleWrap: shouldTitleWrap,
|
|
81
83
|
testId: testId
|
|
82
|
-
|
|
84
|
+
}, (0, _platformFeatureFlags.fg)('platform_button_item-add-ufo-metrics') && {
|
|
85
|
+
interactionName: interactionName
|
|
83
86
|
}, rest), children));
|
|
84
87
|
};
|
|
85
88
|
var _default = exports.default = DropdownItemCheckbox;
|
|
@@ -13,8 +13,9 @@ var _mergeRefs = _interopRequireDefault(require("@atlaskit/ds-lib/merge-refs"));
|
|
|
13
13
|
var _buttonItem = _interopRequireDefault(require("@atlaskit/menu/button-item"));
|
|
14
14
|
var _customItem = _interopRequireDefault(require("@atlaskit/menu/custom-item"));
|
|
15
15
|
var _linkItem = _interopRequireDefault(require("@atlaskit/menu/link-item"));
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _useRegisterItemWithFocusManager = _interopRequireDefault(require("./internal/hooks/use-register-item-with-focus-manager"));
|
|
17
|
-
var _excluded = ["children", "component", "description", "elemAfter", "elemBefore", "href", "isDisabled", "isSelected", "onClick", "rel", "shouldDescriptionWrap", "shouldTitleWrap", "target", "testId", "UNSAFE_shouldDisableRouterLink", "returnFocusRef"];
|
|
18
|
+
var _excluded = ["children", "component", "description", "elemAfter", "elemBefore", "href", "isDisabled", "isSelected", "onClick", "rel", "shouldDescriptionWrap", "shouldTitleWrap", "target", "testId", "UNSAFE_shouldDisableRouterLink", "returnFocusRef", "interactionName"];
|
|
18
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
21
|
/**
|
|
@@ -45,6 +46,7 @@ var DropdownMenuItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
45
46
|
testId = _ref.testId,
|
|
46
47
|
UNSAFE_shouldDisableRouterLink = _ref.UNSAFE_shouldDisableRouterLink,
|
|
47
48
|
returnFocusRef = _ref.returnFocusRef,
|
|
49
|
+
interactionName = _ref.interactionName,
|
|
48
50
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
49
51
|
var itemRef = (0, _useRegisterItemWithFocusManager.default)();
|
|
50
52
|
var handleItemClick = (0, _react.useCallback)(function (event) {
|
|
@@ -75,7 +77,8 @@ var DropdownMenuItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
75
77
|
,
|
|
76
78
|
target: target,
|
|
77
79
|
rel: rel
|
|
78
|
-
|
|
80
|
+
}, (0, _platformFeatureFlags.fg)('platform_button_item-add-ufo-metrics') && {
|
|
81
|
+
interactionName: interactionName
|
|
79
82
|
}, rest), children);
|
|
80
83
|
} else if (href) {
|
|
81
84
|
return /*#__PURE__*/_react.default.createElement(_linkItem.default, (0, _extends2.default)({
|
|
@@ -94,7 +97,8 @@ var DropdownMenuItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
94
97
|
target: target,
|
|
95
98
|
testId: testId,
|
|
96
99
|
UNSAFE_shouldDisableRouterLink: UNSAFE_shouldDisableRouterLink
|
|
97
|
-
|
|
100
|
+
}, (0, _platformFeatureFlags.fg)('platform_button_item-add-ufo-metrics') && {
|
|
101
|
+
interactionName: interactionName
|
|
98
102
|
}, rest), children);
|
|
99
103
|
} else {
|
|
100
104
|
return /*#__PURE__*/_react.default.createElement(_buttonItem.default, (0, _extends2.default)({
|
|
@@ -115,7 +119,8 @@ var DropdownMenuItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
115
119
|
,
|
|
116
120
|
target: target,
|
|
117
121
|
rel: rel
|
|
118
|
-
|
|
122
|
+
}, (0, _platformFeatureFlags.fg)('platform_button_item-add-ufo-metrics') && {
|
|
123
|
+
interactionName: interactionName
|
|
119
124
|
}, rest), children);
|
|
120
125
|
}
|
|
121
126
|
});
|
|
@@ -19,6 +19,7 @@ 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/glyph/chevron-down"));
|
|
22
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
23
|
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
23
24
|
var _constants = require("@atlaskit/theme/constants");
|
|
24
25
|
var _focusManager = _interopRequireDefault(require("./internal/components/focus-manager"));
|
|
@@ -97,7 +98,8 @@ var DropdownMenu = function DropdownMenu(_ref) {
|
|
|
97
98
|
_trigger = _ref.trigger,
|
|
98
99
|
_ref$zIndex = _ref.zIndex,
|
|
99
100
|
zIndex = _ref$zIndex === void 0 ? _constants.layers.modal() : _ref$zIndex,
|
|
100
|
-
label = _ref.label
|
|
101
|
+
label = _ref.label,
|
|
102
|
+
interactionName = _ref.interactionName;
|
|
101
103
|
var _useControlledState = (0, _useControlled.default)(isOpen, function () {
|
|
102
104
|
return defaultOpen;
|
|
103
105
|
}),
|
|
@@ -146,7 +148,7 @@ var DropdownMenu = function DropdownMenu(_ref) {
|
|
|
146
148
|
isOpen: newValue,
|
|
147
149
|
event: event
|
|
148
150
|
});
|
|
149
|
-
}, [
|
|
151
|
+
}, [isLocalOpen, setLocalIsOpen, onOpenChange, itemRef]);
|
|
150
152
|
var handleOnClose = (0, _react.useCallback)(function (event, currentLevel) {
|
|
151
153
|
var _event$target, _event$target$closest;
|
|
152
154
|
if (event.key !== 'Escape' && event.key !== 'Tab' && (_event$target = event.target) !== null && _event$target !== void 0 && (_event$target$closest = _event$target.closest) !== null && _event$target$closest !== void 0 && _event$target$closest.call(_event$target, "[id^=".concat(_useGeneratedId.PREFIX, "] [aria-haspopup]"))) {
|
|
@@ -291,6 +293,8 @@ var DropdownMenu = function DropdownMenu(_ref) {
|
|
|
291
293
|
onClick: handleTriggerClicked,
|
|
292
294
|
testId: testId && "".concat(testId, "--trigger"),
|
|
293
295
|
"aria-label": label
|
|
296
|
+
}, (0, _platformFeatureFlags.fg)('platform_button_item-add-ufo-metrics') && {
|
|
297
|
+
interactionName: interactionName
|
|
294
298
|
}), _trigger);
|
|
295
299
|
},
|
|
296
300
|
content: function content(_ref3) {
|
|
@@ -13,11 +13,12 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
14
14
|
var _menu = require("@atlaskit/menu");
|
|
15
15
|
var _buttonItem = _interopRequireDefault(require("@atlaskit/menu/button-item"));
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _radioIcon = _interopRequireDefault(require("../internal/components/radio-icon"));
|
|
17
18
|
var _useRadioState3 = _interopRequireDefault(require("../internal/hooks/use-radio-state"));
|
|
18
19
|
var _useRegisterItemWithFocusManager = _interopRequireDefault(require("../internal/hooks/use-register-item-with-focus-manager"));
|
|
19
20
|
var _isVoiceOverSupported = _interopRequireDefault(require("../internal/utils/is-voice-over-supported"));
|
|
20
|
-
var _excluded = ["children", "defaultSelected", "testId", "id", "title", "description", "isDisabled", "isSelected", "onClick", "shouldDescriptionWrap", "shouldTitleWrap"];
|
|
21
|
+
var _excluded = ["children", "defaultSelected", "testId", "id", "title", "description", "isDisabled", "isSelected", "onClick", "shouldDescriptionWrap", "shouldTitleWrap", "interactionName"];
|
|
21
22
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
23
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
24
|
/**
|
|
@@ -44,6 +45,7 @@ var DropdownItemRadio = function DropdownItemRadio(_ref) {
|
|
|
44
45
|
shouldDescriptionWrap = _ref$shouldDescriptio === void 0 ? true : _ref$shouldDescriptio,
|
|
45
46
|
_ref$shouldTitleWrap = _ref.shouldTitleWrap,
|
|
46
47
|
shouldTitleWrap = _ref$shouldTitleWrap === void 0 ? true : _ref$shouldTitleWrap,
|
|
48
|
+
interactionName = _ref.interactionName,
|
|
47
49
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
48
50
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
49
51
|
// eslint-disable-next-line no-console
|
|
@@ -86,7 +88,8 @@ var DropdownItemRadio = function DropdownItemRadio(_ref) {
|
|
|
86
88
|
// @ts-expect-error
|
|
87
89
|
,
|
|
88
90
|
title: title
|
|
89
|
-
|
|
91
|
+
}, (0, _platformFeatureFlags.fg)('platform_button_item-add-ufo-metrics') && {
|
|
92
|
+
interactionName: interactionName
|
|
90
93
|
}, rest), children));
|
|
91
94
|
};
|
|
92
95
|
var _default = exports.default = DropdownItemRadio;
|
|
@@ -3,6 +3,7 @@ import React, { useCallback } from 'react';
|
|
|
3
3
|
import noop from '@atlaskit/ds-lib/noop';
|
|
4
4
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu';
|
|
5
5
|
import ButtonItem from '@atlaskit/menu/button-item';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import CheckboxIcon from '../internal/components/checkbox-icon';
|
|
7
8
|
import useCheckboxState from '../internal/hooks/use-checkbox-state';
|
|
8
9
|
import useRegisterItemWithFocusManager from '../internal/hooks/use-register-item-with-focus-manager';
|
|
@@ -26,6 +27,7 @@ const DropdownItemCheckbox = ({
|
|
|
26
27
|
shouldDescriptionWrap = true,
|
|
27
28
|
shouldTitleWrap = true,
|
|
28
29
|
testId,
|
|
30
|
+
interactionName,
|
|
29
31
|
// DSP-13312 TODO: remove spread props in future major release
|
|
30
32
|
...rest
|
|
31
33
|
}) => {
|
|
@@ -60,7 +62,8 @@ const DropdownItemCheckbox = ({
|
|
|
60
62
|
shouldDescriptionWrap: shouldDescriptionWrap,
|
|
61
63
|
shouldTitleWrap: shouldTitleWrap,
|
|
62
64
|
testId: testId
|
|
63
|
-
|
|
65
|
+
}, fg('platform_button_item-add-ufo-metrics') && {
|
|
66
|
+
interactionName
|
|
64
67
|
}, rest), children));
|
|
65
68
|
};
|
|
66
69
|
export default DropdownItemCheckbox;
|
|
@@ -4,6 +4,7 @@ import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
|
4
4
|
import ButtonItem from '@atlaskit/menu/button-item';
|
|
5
5
|
import CustomItem from '@atlaskit/menu/custom-item';
|
|
6
6
|
import LinkItem from '@atlaskit/menu/link-item';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import useRegisterItemWithFocusManager from './internal/hooks/use-register-item-with-focus-manager';
|
|
8
9
|
/**
|
|
9
10
|
* __Dropdown menu item__
|
|
@@ -31,6 +32,7 @@ const DropdownMenuItem = /*#__PURE__*/forwardRef(({
|
|
|
31
32
|
testId,
|
|
32
33
|
UNSAFE_shouldDisableRouterLink,
|
|
33
34
|
returnFocusRef,
|
|
35
|
+
interactionName,
|
|
34
36
|
...rest
|
|
35
37
|
}, ref) => {
|
|
36
38
|
const itemRef = useRegisterItemWithFocusManager();
|
|
@@ -62,7 +64,8 @@ const DropdownMenuItem = /*#__PURE__*/forwardRef(({
|
|
|
62
64
|
,
|
|
63
65
|
target: target,
|
|
64
66
|
rel: rel
|
|
65
|
-
|
|
67
|
+
}, fg('platform_button_item-add-ufo-metrics') && {
|
|
68
|
+
interactionName
|
|
66
69
|
}, rest), children);
|
|
67
70
|
} else if (href) {
|
|
68
71
|
return /*#__PURE__*/React.createElement(LinkItem, _extends({
|
|
@@ -81,7 +84,8 @@ const DropdownMenuItem = /*#__PURE__*/forwardRef(({
|
|
|
81
84
|
target: target,
|
|
82
85
|
testId: testId,
|
|
83
86
|
UNSAFE_shouldDisableRouterLink: UNSAFE_shouldDisableRouterLink
|
|
84
|
-
|
|
87
|
+
}, fg('platform_button_item-add-ufo-metrics') && {
|
|
88
|
+
interactionName
|
|
85
89
|
}, rest), children);
|
|
86
90
|
} else {
|
|
87
91
|
return /*#__PURE__*/React.createElement(ButtonItem, _extends({
|
|
@@ -102,7 +106,8 @@ const DropdownMenuItem = /*#__PURE__*/forwardRef(({
|
|
|
102
106
|
,
|
|
103
107
|
target: target,
|
|
104
108
|
rel: rel
|
|
105
|
-
|
|
109
|
+
}, fg('platform_button_item-add-ufo-metrics') && {
|
|
110
|
+
interactionName
|
|
106
111
|
}, rest), children);
|
|
107
112
|
}
|
|
108
113
|
});
|
|
@@ -8,6 +8,7 @@ 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/glyph/chevron-down';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
12
|
import Popup from '@atlaskit/popup';
|
|
12
13
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
13
14
|
import { gridSize as gridSizeFn, layers } from '@atlaskit/theme/constants';
|
|
@@ -73,7 +74,8 @@ const DropdownMenu = ({
|
|
|
73
74
|
testId,
|
|
74
75
|
trigger,
|
|
75
76
|
zIndex = layers.modal(),
|
|
76
|
-
label
|
|
77
|
+
label,
|
|
78
|
+
interactionName
|
|
77
79
|
}) => {
|
|
78
80
|
const [isLocalOpen, setLocalIsOpen] = useControlledState(isOpen, () => defaultOpen);
|
|
79
81
|
const triggerRef = useRef(null);
|
|
@@ -115,7 +117,7 @@ const DropdownMenu = ({
|
|
|
115
117
|
isOpen: newValue,
|
|
116
118
|
event
|
|
117
119
|
});
|
|
118
|
-
}, [
|
|
120
|
+
}, [isLocalOpen, setLocalIsOpen, onOpenChange, itemRef]);
|
|
119
121
|
const handleOnClose = useCallback((event, currentLevel) => {
|
|
120
122
|
var _event$target, _event$target$closest;
|
|
121
123
|
if (event.key !== 'Escape' && event.key !== 'Tab' && (_event$target = event.target) !== null && _event$target !== void 0 && (_event$target$closest = _event$target.closest) !== null && _event$target$closest !== void 0 && _event$target$closest.call(_event$target, `[id^=${PREFIX}] [aria-haspopup]`)) {
|
|
@@ -264,6 +266,8 @@ const DropdownMenu = ({
|
|
|
264
266
|
onClick: handleTriggerClicked,
|
|
265
267
|
testId: testId && `${testId}--trigger`,
|
|
266
268
|
"aria-label": label
|
|
269
|
+
}, fg('platform_button_item-add-ufo-metrics') && {
|
|
270
|
+
interactionName
|
|
267
271
|
}), trigger);
|
|
268
272
|
},
|
|
269
273
|
content: ({
|
|
@@ -3,6 +3,7 @@ import React, { useCallback } from 'react';
|
|
|
3
3
|
import noop from '@atlaskit/ds-lib/noop';
|
|
4
4
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu';
|
|
5
5
|
import ButtonItem from '@atlaskit/menu/button-item';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import RadioIcon from '../internal/components/radio-icon';
|
|
7
8
|
import useRadioState from '../internal/hooks/use-radio-state';
|
|
8
9
|
import useRegisterItemWithFocusManager from '../internal/hooks/use-register-item-with-focus-manager';
|
|
@@ -28,6 +29,7 @@ const DropdownItemRadio = ({
|
|
|
28
29
|
onClick: providedOnClick = noop,
|
|
29
30
|
shouldDescriptionWrap = true,
|
|
30
31
|
shouldTitleWrap = true,
|
|
32
|
+
interactionName,
|
|
31
33
|
// DSP-13312 TODO: remove spread props in future major release
|
|
32
34
|
...rest
|
|
33
35
|
}) => {
|
|
@@ -67,7 +69,8 @@ const DropdownItemRadio = ({
|
|
|
67
69
|
// @ts-expect-error
|
|
68
70
|
,
|
|
69
71
|
title: title
|
|
70
|
-
|
|
72
|
+
}, fg('platform_button_item-add-ufo-metrics') && {
|
|
73
|
+
interactionName
|
|
71
74
|
}, rest), children));
|
|
72
75
|
};
|
|
73
76
|
export default DropdownItemRadio;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "defaultSelected", "description", "id", "isDisabled", "isSelected", "onClick", "shouldDescriptionWrap", "shouldTitleWrap", "testId"];
|
|
4
|
+
var _excluded = ["children", "defaultSelected", "description", "id", "isDisabled", "isSelected", "onClick", "shouldDescriptionWrap", "shouldTitleWrap", "testId", "interactionName"];
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
import noop from '@atlaskit/ds-lib/noop';
|
|
7
7
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu';
|
|
8
8
|
import ButtonItem from '@atlaskit/menu/button-item';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import CheckboxIcon from '../internal/components/checkbox-icon';
|
|
10
11
|
import useCheckboxState from '../internal/hooks/use-checkbox-state';
|
|
11
12
|
import useRegisterItemWithFocusManager from '../internal/hooks/use-register-item-with-focus-manager';
|
|
@@ -32,6 +33,7 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(_ref) {
|
|
|
32
33
|
_ref$shouldTitleWrap = _ref.shouldTitleWrap,
|
|
33
34
|
shouldTitleWrap = _ref$shouldTitleWrap === void 0 ? true : _ref$shouldTitleWrap,
|
|
34
35
|
testId = _ref.testId,
|
|
36
|
+
interactionName = _ref.interactionName,
|
|
35
37
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
36
38
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
37
39
|
// eslint-disable-next-line no-console
|
|
@@ -69,7 +71,8 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(_ref) {
|
|
|
69
71
|
shouldDescriptionWrap: shouldDescriptionWrap,
|
|
70
72
|
shouldTitleWrap: shouldTitleWrap,
|
|
71
73
|
testId: testId
|
|
72
|
-
|
|
74
|
+
}, fg('platform_button_item-add-ufo-metrics') && {
|
|
75
|
+
interactionName: interactionName
|
|
73
76
|
}, rest), children));
|
|
74
77
|
};
|
|
75
78
|
export default DropdownItemCheckbox;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "component", "description", "elemAfter", "elemBefore", "href", "isDisabled", "isSelected", "onClick", "rel", "shouldDescriptionWrap", "shouldTitleWrap", "target", "testId", "UNSAFE_shouldDisableRouterLink", "returnFocusRef"];
|
|
3
|
+
var _excluded = ["children", "component", "description", "elemAfter", "elemBefore", "href", "isDisabled", "isSelected", "onClick", "rel", "shouldDescriptionWrap", "shouldTitleWrap", "target", "testId", "UNSAFE_shouldDisableRouterLink", "returnFocusRef", "interactionName"];
|
|
4
4
|
import React, { forwardRef, useCallback } from 'react';
|
|
5
5
|
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
6
6
|
import ButtonItem from '@atlaskit/menu/button-item';
|
|
7
7
|
import CustomItem from '@atlaskit/menu/custom-item';
|
|
8
8
|
import LinkItem from '@atlaskit/menu/link-item';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import useRegisterItemWithFocusManager from './internal/hooks/use-register-item-with-focus-manager';
|
|
10
11
|
/**
|
|
11
12
|
* __Dropdown menu item__
|
|
@@ -35,6 +36,7 @@ var DropdownMenuItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
35
36
|
testId = _ref.testId,
|
|
36
37
|
UNSAFE_shouldDisableRouterLink = _ref.UNSAFE_shouldDisableRouterLink,
|
|
37
38
|
returnFocusRef = _ref.returnFocusRef,
|
|
39
|
+
interactionName = _ref.interactionName,
|
|
38
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
39
41
|
var itemRef = useRegisterItemWithFocusManager();
|
|
40
42
|
var handleItemClick = useCallback(function (event) {
|
|
@@ -65,7 +67,8 @@ var DropdownMenuItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
65
67
|
,
|
|
66
68
|
target: target,
|
|
67
69
|
rel: rel
|
|
68
|
-
|
|
70
|
+
}, fg('platform_button_item-add-ufo-metrics') && {
|
|
71
|
+
interactionName: interactionName
|
|
69
72
|
}, rest), children);
|
|
70
73
|
} else if (href) {
|
|
71
74
|
return /*#__PURE__*/React.createElement(LinkItem, _extends({
|
|
@@ -84,7 +87,8 @@ var DropdownMenuItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
84
87
|
target: target,
|
|
85
88
|
testId: testId,
|
|
86
89
|
UNSAFE_shouldDisableRouterLink: UNSAFE_shouldDisableRouterLink
|
|
87
|
-
|
|
90
|
+
}, fg('platform_button_item-add-ufo-metrics') && {
|
|
91
|
+
interactionName: interactionName
|
|
88
92
|
}, rest), children);
|
|
89
93
|
} else {
|
|
90
94
|
return /*#__PURE__*/React.createElement(ButtonItem, _extends({
|
|
@@ -105,7 +109,8 @@ var DropdownMenuItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
105
109
|
,
|
|
106
110
|
target: target,
|
|
107
111
|
rel: rel
|
|
108
|
-
|
|
112
|
+
}, fg('platform_button_item-add-ufo-metrics') && {
|
|
113
|
+
interactionName: interactionName
|
|
109
114
|
}, rest), children);
|
|
110
115
|
}
|
|
111
116
|
});
|
|
@@ -14,6 +14,7 @@ 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/glyph/chevron-down';
|
|
17
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
18
|
import Popup from '@atlaskit/popup';
|
|
18
19
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
19
20
|
import { gridSize as gridSizeFn, layers } from '@atlaskit/theme/constants';
|
|
@@ -88,7 +89,8 @@ var DropdownMenu = function DropdownMenu(_ref) {
|
|
|
88
89
|
_trigger = _ref.trigger,
|
|
89
90
|
_ref$zIndex = _ref.zIndex,
|
|
90
91
|
zIndex = _ref$zIndex === void 0 ? layers.modal() : _ref$zIndex,
|
|
91
|
-
label = _ref.label
|
|
92
|
+
label = _ref.label,
|
|
93
|
+
interactionName = _ref.interactionName;
|
|
92
94
|
var _useControlledState = useControlledState(isOpen, function () {
|
|
93
95
|
return defaultOpen;
|
|
94
96
|
}),
|
|
@@ -137,7 +139,7 @@ var DropdownMenu = function DropdownMenu(_ref) {
|
|
|
137
139
|
isOpen: newValue,
|
|
138
140
|
event: event
|
|
139
141
|
});
|
|
140
|
-
}, [
|
|
142
|
+
}, [isLocalOpen, setLocalIsOpen, onOpenChange, itemRef]);
|
|
141
143
|
var handleOnClose = useCallback(function (event, currentLevel) {
|
|
142
144
|
var _event$target, _event$target$closest;
|
|
143
145
|
if (event.key !== 'Escape' && event.key !== 'Tab' && (_event$target = event.target) !== null && _event$target !== void 0 && (_event$target$closest = _event$target.closest) !== null && _event$target$closest !== void 0 && _event$target$closest.call(_event$target, "[id^=".concat(PREFIX, "] [aria-haspopup]"))) {
|
|
@@ -282,6 +284,8 @@ var DropdownMenu = function DropdownMenu(_ref) {
|
|
|
282
284
|
onClick: handleTriggerClicked,
|
|
283
285
|
testId: testId && "".concat(testId, "--trigger"),
|
|
284
286
|
"aria-label": label
|
|
287
|
+
}, fg('platform_button_item-add-ufo-metrics') && {
|
|
288
|
+
interactionName: interactionName
|
|
285
289
|
}), _trigger);
|
|
286
290
|
},
|
|
287
291
|
content: function content(_ref3) {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "defaultSelected", "testId", "id", "title", "description", "isDisabled", "isSelected", "onClick", "shouldDescriptionWrap", "shouldTitleWrap"];
|
|
4
|
+
var _excluded = ["children", "defaultSelected", "testId", "id", "title", "description", "isDisabled", "isSelected", "onClick", "shouldDescriptionWrap", "shouldTitleWrap", "interactionName"];
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
import noop from '@atlaskit/ds-lib/noop';
|
|
7
7
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu';
|
|
8
8
|
import ButtonItem from '@atlaskit/menu/button-item';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import RadioIcon from '../internal/components/radio-icon';
|
|
10
11
|
import useRadioState from '../internal/hooks/use-radio-state';
|
|
11
12
|
import useRegisterItemWithFocusManager from '../internal/hooks/use-register-item-with-focus-manager';
|
|
@@ -34,6 +35,7 @@ var DropdownItemRadio = function DropdownItemRadio(_ref) {
|
|
|
34
35
|
shouldDescriptionWrap = _ref$shouldDescriptio === void 0 ? true : _ref$shouldDescriptio,
|
|
35
36
|
_ref$shouldTitleWrap = _ref.shouldTitleWrap,
|
|
36
37
|
shouldTitleWrap = _ref$shouldTitleWrap === void 0 ? true : _ref$shouldTitleWrap,
|
|
38
|
+
interactionName = _ref.interactionName,
|
|
37
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
38
40
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
39
41
|
// eslint-disable-next-line no-console
|
|
@@ -76,7 +78,8 @@ var DropdownItemRadio = function DropdownItemRadio(_ref) {
|
|
|
76
78
|
// @ts-expect-error
|
|
77
79
|
,
|
|
78
80
|
title: title
|
|
79
|
-
|
|
81
|
+
}, fg('platform_button_item-add-ufo-metrics') && {
|
|
82
|
+
interactionName: interactionName
|
|
80
83
|
}, rest), children));
|
|
81
84
|
};
|
|
82
85
|
export default DropdownItemRadio;
|
|
@@ -9,5 +9,5 @@ import { type DropdownItemCheckboxProps } from '../types';
|
|
|
9
9
|
* - [Code](https://atlassian.design/components/dropdown-menu/dropdown-item-checkbox/code)
|
|
10
10
|
* - [Usage](https://atlassian.design/components/dropdown-menu/dropdown-item-checkbox/usage)
|
|
11
11
|
*/
|
|
12
|
-
declare const DropdownItemCheckbox: ({ children, defaultSelected, description, id, isDisabled, isSelected, onClick: providedOnClick, shouldDescriptionWrap, shouldTitleWrap, testId, ...rest }: DropdownItemCheckboxProps) => JSX.Element;
|
|
12
|
+
declare const DropdownItemCheckbox: ({ children, defaultSelected, description, id, isDisabled, isSelected, onClick: providedOnClick, shouldDescriptionWrap, shouldTitleWrap, testId, interactionName, ...rest }: DropdownItemCheckboxProps) => JSX.Element;
|
|
13
13
|
export default DropdownItemCheckbox;
|
|
@@ -9,5 +9,5 @@ import type { DropdownMenuProps } from './types';
|
|
|
9
9
|
* - [Code](https://atlassian.design/components/dropdown-menu/code)
|
|
10
10
|
* - [Usage](https://atlassian.design/components/dropdown-menu/usage)
|
|
11
11
|
*/
|
|
12
|
-
declare const DropdownMenu: <T extends HTMLElement = any>({ autoFocus, children, defaultOpen, isLoading, isOpen, onOpenChange, placement, shouldFitContainer, shouldFlip, shouldRenderToParent, returnFocusRef, spacing, statusLabel, testId, trigger, zIndex, label, }: DropdownMenuProps<T>) => JSX.Element;
|
|
12
|
+
declare const DropdownMenu: <T extends HTMLElement = any>({ autoFocus, children, defaultOpen, isLoading, isOpen, onOpenChange, placement, shouldFitContainer, shouldFlip, shouldRenderToParent, returnFocusRef, spacing, statusLabel, testId, trigger, zIndex, label, interactionName, }: DropdownMenuProps<T>) => JSX.Element;
|
|
13
13
|
export default DropdownMenu;
|
|
@@ -9,5 +9,5 @@ import { type DropdownItemRadioProps } from '../types';
|
|
|
9
9
|
* - [Code](https://atlassian.design/components/dropdown-menu/dropdown-item-radio/code)
|
|
10
10
|
* - [Usage](https://atlassian.design/components/dropdown-menu/dropdown-item-radio/usage)
|
|
11
11
|
*/
|
|
12
|
-
declare const DropdownItemRadio: ({ children, defaultSelected, testId, id, title, description, isDisabled, isSelected, onClick: providedOnClick, shouldDescriptionWrap, shouldTitleWrap, ...rest }: DropdownItemRadioProps) => JSX.Element;
|
|
12
|
+
declare const DropdownItemRadio: ({ children, defaultSelected, testId, id, title, description, isDisabled, isSelected, onClick: providedOnClick, shouldDescriptionWrap, shouldTitleWrap, interactionName, ...rest }: DropdownItemRadioProps) => JSX.Element;
|
|
13
13
|
export default DropdownItemRadio;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -154,6 +154,10 @@ interface InternalDropdownMenuProps<TriggerElement extends HTMLElement = any> {
|
|
|
154
154
|
* If ref is passed, focus returns to that specific ref element after dropdown dismissed.
|
|
155
155
|
*/
|
|
156
156
|
returnFocusRef?: RefObject<HTMLElement>;
|
|
157
|
+
/**
|
|
158
|
+
* An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
|
|
159
|
+
*/
|
|
160
|
+
interactionName?: string;
|
|
157
161
|
}
|
|
158
162
|
type StandardDropdownMenuProps<TriggerElement extends HTMLElement = any> = InternalDropdownMenuProps<TriggerElement> & {
|
|
159
163
|
shouldFitContainer?: false;
|
|
@@ -242,6 +246,10 @@ export interface DropdownItemProps {
|
|
|
242
246
|
* If ref is passed, focus returns to that specific ref element after dropdown item clicked.
|
|
243
247
|
*/
|
|
244
248
|
returnFocusRef?: RefObject<HTMLElement>;
|
|
249
|
+
/**
|
|
250
|
+
* An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
|
|
251
|
+
*/
|
|
252
|
+
interactionName?: string;
|
|
245
253
|
}
|
|
246
254
|
export interface DropdownItemCheckboxProps {
|
|
247
255
|
/**
|
|
@@ -291,6 +299,10 @@ export interface DropdownItemCheckboxProps {
|
|
|
291
299
|
* serving as a hook for automated tests.
|
|
292
300
|
*/
|
|
293
301
|
testId?: string;
|
|
302
|
+
/**
|
|
303
|
+
* An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
|
|
304
|
+
*/
|
|
305
|
+
interactionName?: string;
|
|
294
306
|
}
|
|
295
307
|
export interface DropdownItemRadioProps {
|
|
296
308
|
/**
|
|
@@ -340,6 +352,10 @@ export interface DropdownItemRadioProps {
|
|
|
340
352
|
* serving as a hook for automated tests.
|
|
341
353
|
*/
|
|
342
354
|
testId?: string;
|
|
355
|
+
/**
|
|
356
|
+
* An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
|
|
357
|
+
*/
|
|
358
|
+
interactionName?: string;
|
|
343
359
|
}
|
|
344
360
|
export interface CustomItemHtmlProps extends CustomItemComponentProps {
|
|
345
361
|
/**
|
|
@@ -9,5 +9,5 @@ import { type DropdownItemCheckboxProps } from '../types';
|
|
|
9
9
|
* - [Code](https://atlassian.design/components/dropdown-menu/dropdown-item-checkbox/code)
|
|
10
10
|
* - [Usage](https://atlassian.design/components/dropdown-menu/dropdown-item-checkbox/usage)
|
|
11
11
|
*/
|
|
12
|
-
declare const DropdownItemCheckbox: ({ children, defaultSelected, description, id, isDisabled, isSelected, onClick: providedOnClick, shouldDescriptionWrap, shouldTitleWrap, testId, ...rest }: DropdownItemCheckboxProps) => JSX.Element;
|
|
12
|
+
declare const DropdownItemCheckbox: ({ children, defaultSelected, description, id, isDisabled, isSelected, onClick: providedOnClick, shouldDescriptionWrap, shouldTitleWrap, testId, interactionName, ...rest }: DropdownItemCheckboxProps) => JSX.Element;
|
|
13
13
|
export default DropdownItemCheckbox;
|
|
@@ -9,5 +9,5 @@ import type { DropdownMenuProps } from './types';
|
|
|
9
9
|
* - [Code](https://atlassian.design/components/dropdown-menu/code)
|
|
10
10
|
* - [Usage](https://atlassian.design/components/dropdown-menu/usage)
|
|
11
11
|
*/
|
|
12
|
-
declare const DropdownMenu: <T extends HTMLElement = any>({ autoFocus, children, defaultOpen, isLoading, isOpen, onOpenChange, placement, shouldFitContainer, shouldFlip, shouldRenderToParent, returnFocusRef, spacing, statusLabel, testId, trigger, zIndex, label, }: DropdownMenuProps<T>) => JSX.Element;
|
|
12
|
+
declare const DropdownMenu: <T extends HTMLElement = any>({ autoFocus, children, defaultOpen, isLoading, isOpen, onOpenChange, placement, shouldFitContainer, shouldFlip, shouldRenderToParent, returnFocusRef, spacing, statusLabel, testId, trigger, zIndex, label, interactionName, }: DropdownMenuProps<T>) => JSX.Element;
|
|
13
13
|
export default DropdownMenu;
|
|
@@ -9,5 +9,5 @@ import { type DropdownItemRadioProps } from '../types';
|
|
|
9
9
|
* - [Code](https://atlassian.design/components/dropdown-menu/dropdown-item-radio/code)
|
|
10
10
|
* - [Usage](https://atlassian.design/components/dropdown-menu/dropdown-item-radio/usage)
|
|
11
11
|
*/
|
|
12
|
-
declare const DropdownItemRadio: ({ children, defaultSelected, testId, id, title, description, isDisabled, isSelected, onClick: providedOnClick, shouldDescriptionWrap, shouldTitleWrap, ...rest }: DropdownItemRadioProps) => JSX.Element;
|
|
12
|
+
declare const DropdownItemRadio: ({ children, defaultSelected, testId, id, title, description, isDisabled, isSelected, onClick: providedOnClick, shouldDescriptionWrap, shouldTitleWrap, interactionName, ...rest }: DropdownItemRadioProps) => JSX.Element;
|
|
13
13
|
export default DropdownItemRadio;
|
|
@@ -154,6 +154,10 @@ interface InternalDropdownMenuProps<TriggerElement extends HTMLElement = any> {
|
|
|
154
154
|
* If ref is passed, focus returns to that specific ref element after dropdown dismissed.
|
|
155
155
|
*/
|
|
156
156
|
returnFocusRef?: RefObject<HTMLElement>;
|
|
157
|
+
/**
|
|
158
|
+
* An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
|
|
159
|
+
*/
|
|
160
|
+
interactionName?: string;
|
|
157
161
|
}
|
|
158
162
|
type StandardDropdownMenuProps<TriggerElement extends HTMLElement = any> = InternalDropdownMenuProps<TriggerElement> & {
|
|
159
163
|
shouldFitContainer?: false;
|
|
@@ -242,6 +246,10 @@ export interface DropdownItemProps {
|
|
|
242
246
|
* If ref is passed, focus returns to that specific ref element after dropdown item clicked.
|
|
243
247
|
*/
|
|
244
248
|
returnFocusRef?: RefObject<HTMLElement>;
|
|
249
|
+
/**
|
|
250
|
+
* An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
|
|
251
|
+
*/
|
|
252
|
+
interactionName?: string;
|
|
245
253
|
}
|
|
246
254
|
export interface DropdownItemCheckboxProps {
|
|
247
255
|
/**
|
|
@@ -291,6 +299,10 @@ export interface DropdownItemCheckboxProps {
|
|
|
291
299
|
* serving as a hook for automated tests.
|
|
292
300
|
*/
|
|
293
301
|
testId?: string;
|
|
302
|
+
/**
|
|
303
|
+
* An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
|
|
304
|
+
*/
|
|
305
|
+
interactionName?: string;
|
|
294
306
|
}
|
|
295
307
|
export interface DropdownItemRadioProps {
|
|
296
308
|
/**
|
|
@@ -340,6 +352,10 @@ export interface DropdownItemRadioProps {
|
|
|
340
352
|
* serving as a hook for automated tests.
|
|
341
353
|
*/
|
|
342
354
|
testId?: string;
|
|
355
|
+
/**
|
|
356
|
+
* An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
|
|
357
|
+
*/
|
|
358
|
+
interactionName?: string;
|
|
343
359
|
}
|
|
344
360
|
export interface CustomItemHtmlProps extends CustomItemComponentProps {
|
|
345
361
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dropdown-menu",
|
|
3
|
-
"version": "12.18.
|
|
3
|
+
"version": "12.18.5",
|
|
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/"
|
|
@@ -72,6 +72,9 @@
|
|
|
72
72
|
"platform-feature-flags": {
|
|
73
73
|
"platform_dst_popup-disable-focuslock": {
|
|
74
74
|
"type": "boolean"
|
|
75
|
+
},
|
|
76
|
+
"platform_button_item-add-ufo-metrics": {
|
|
77
|
+
"type": "boolean"
|
|
75
78
|
}
|
|
76
79
|
},
|
|
77
80
|
"techstack": {
|