@atlaskit/dropdown-menu 11.9.4 → 11.10.0
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 +17 -0
- package/dist/cjs/checkbox/dropdown-item-checkbox.js +7 -2
- package/dist/cjs/dropdown-menu.js +2 -0
- package/dist/cjs/radio/dropdown-item-radio.js +7 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/checkbox/dropdown-item-checkbox.js +7 -2
- package/dist/es2019/dropdown-menu.js +2 -0
- package/dist/es2019/radio/dropdown-item-radio.js +7 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/checkbox/dropdown-item-checkbox.js +7 -2
- package/dist/esm/dropdown-menu.js +2 -0
- package/dist/esm/radio/dropdown-item-radio.js +7 -2
- package/dist/esm/version.json +1 -1
- package/package.json +11 -9
- package/tmp/api-report-tmp.d.ts +146 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/dropdown-menu
|
|
2
2
|
|
|
3
|
+
## 11.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`6794b446742`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6794b446742) - [ux] We are testing a new selected state for radio and checkbox items under a feature flag. If successful this will be released in a later version.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 11.9.5
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`6a13926a3d4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6a13926a3d4) - Internal code changes.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 11.9.4
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -11,7 +11,9 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
14
|
+
var _menu = require("@atlaskit/menu");
|
|
14
15
|
var _buttonItem = _interopRequireDefault(require("@atlaskit/menu/button-item"));
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
17
|
var _checkboxIcon = _interopRequireDefault(require("../internal/components/checkbox-icon"));
|
|
16
18
|
var _useCheckboxState3 = _interopRequireDefault(require("../internal/hooks/use-checkbox-state"));
|
|
17
19
|
var _useRegisterItemWithFocusManager = _interopRequireDefault(require("../internal/hooks/use-register-item-with-focus-manager"));
|
|
@@ -57,7 +59,9 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(props) {
|
|
|
57
59
|
providedOnClick(event);
|
|
58
60
|
}, [providedOnClick, setSelected]);
|
|
59
61
|
var itemRef = (0, _useRegisterItemWithFocusManager.default)();
|
|
60
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
62
|
+
return /*#__PURE__*/_react.default.createElement(_menu.SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
63
|
+
value: "none"
|
|
64
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonItem.default, (0, _extends2.default)({
|
|
61
65
|
id: id,
|
|
62
66
|
onClick: onClickHandler,
|
|
63
67
|
role: "menuitemcheckbox",
|
|
@@ -67,9 +71,10 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(props) {
|
|
|
67
71
|
iconBefore: /*#__PURE__*/_react.default.createElement(_checkboxIcon.default, {
|
|
68
72
|
checked: selected
|
|
69
73
|
}),
|
|
74
|
+
isSelected: selected && (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.menu-selected-state-change_0see9'),
|
|
70
75
|
ref: itemRef
|
|
71
76
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
72
|
-
}, rest));
|
|
77
|
+
}, rest)));
|
|
73
78
|
};
|
|
74
79
|
var _default = DropdownItemCheckbox;
|
|
75
80
|
exports.default = _default;
|
|
@@ -18,6 +18,7 @@ var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
|
18
18
|
var _useControlled = _interopRequireDefault(require("@atlaskit/ds-lib/use-controlled"));
|
|
19
19
|
var _useFocusEvent = _interopRequireDefault(require("@atlaskit/ds-lib/use-focus-event"));
|
|
20
20
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
|
|
21
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
22
|
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
22
23
|
var _constants = require("@atlaskit/theme/constants");
|
|
23
24
|
var _focusManager = _interopRequireDefault(require("./internal/components/focus-manager"));
|
|
@@ -173,6 +174,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
173
174
|
fallbackPlacements: fallbackPlacements,
|
|
174
175
|
testId: testId && "".concat(testId, "--content"),
|
|
175
176
|
shouldUseCaptureOnOutsideClick: true,
|
|
177
|
+
shouldRenderToParent: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.render-popup-in-parent_f73ij') ? true : undefined,
|
|
176
178
|
trigger: function trigger(triggerProps) {
|
|
177
179
|
if (typeof _trigger === 'function') {
|
|
178
180
|
var ref = triggerProps.ref,
|
|
@@ -11,7 +11,9 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
14
|
+
var _menu = require("@atlaskit/menu");
|
|
14
15
|
var _buttonItem = _interopRequireDefault(require("@atlaskit/menu/button-item"));
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
17
|
var _radioIcon = _interopRequireDefault(require("../internal/components/radio-icon"));
|
|
16
18
|
var _useRadioState3 = _interopRequireDefault(require("../internal/hooks/use-radio-state"));
|
|
17
19
|
var _useRegisterItemWithFocusManager = _interopRequireDefault(require("../internal/hooks/use-register-item-with-focus-manager"));
|
|
@@ -58,7 +60,9 @@ var DropdownItemRadio = function DropdownItemRadio(props) {
|
|
|
58
60
|
providedOnClick(event);
|
|
59
61
|
}, [providedOnClick, setSelected]);
|
|
60
62
|
var itemRef = (0, _useRegisterItemWithFocusManager.default)();
|
|
61
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement(_menu.SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
64
|
+
value: "none"
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonItem.default, (0, _extends2.default)({
|
|
62
66
|
id: id,
|
|
63
67
|
onClick: onClickHandler,
|
|
64
68
|
role: (0, _isVoiceOverSupported.default)() ? 'radio' : 'menuitemradio',
|
|
@@ -68,9 +72,10 @@ var DropdownItemRadio = function DropdownItemRadio(props) {
|
|
|
68
72
|
iconBefore: /*#__PURE__*/_react.default.createElement(_radioIcon.default, {
|
|
69
73
|
checked: selected
|
|
70
74
|
}),
|
|
75
|
+
isSelected: selected && (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.menu-selected-state-change_0see9'),
|
|
71
76
|
ref: itemRef
|
|
72
77
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
73
|
-
}, rest));
|
|
78
|
+
}, rest)));
|
|
74
79
|
};
|
|
75
80
|
var _default = DropdownItemRadio;
|
|
76
81
|
exports.default = _default;
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import noop from '@atlaskit/ds-lib/noop';
|
|
4
|
+
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu';
|
|
4
5
|
import ButtonItem from '@atlaskit/menu/button-item';
|
|
6
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
5
7
|
import CheckboxIcon from '../internal/components/checkbox-icon';
|
|
6
8
|
import useCheckboxState from '../internal/hooks/use-checkbox-state';
|
|
7
9
|
import useRegisterItemWithFocusManager from '../internal/hooks/use-register-item-with-focus-manager';
|
|
@@ -38,7 +40,9 @@ const DropdownItemCheckbox = props => {
|
|
|
38
40
|
providedOnClick(event);
|
|
39
41
|
}, [providedOnClick, setSelected]);
|
|
40
42
|
const itemRef = useRegisterItemWithFocusManager();
|
|
41
|
-
return /*#__PURE__*/React.createElement(
|
|
43
|
+
return /*#__PURE__*/React.createElement(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
44
|
+
value: "none"
|
|
45
|
+
}, /*#__PURE__*/React.createElement(ButtonItem, _extends({
|
|
42
46
|
id: id,
|
|
43
47
|
onClick: onClickHandler,
|
|
44
48
|
role: "menuitemcheckbox",
|
|
@@ -48,8 +52,9 @@ const DropdownItemCheckbox = props => {
|
|
|
48
52
|
iconBefore: /*#__PURE__*/React.createElement(CheckboxIcon, {
|
|
49
53
|
checked: selected
|
|
50
54
|
}),
|
|
55
|
+
isSelected: selected && getBooleanFF('platform.design-system-team.menu-selected-state-change_0see9'),
|
|
51
56
|
ref: itemRef
|
|
52
57
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
53
|
-
}, rest));
|
|
58
|
+
}, rest)));
|
|
54
59
|
};
|
|
55
60
|
export default DropdownItemCheckbox;
|
|
@@ -7,6 +7,7 @@ import noop from '@atlaskit/ds-lib/noop';
|
|
|
7
7
|
import useControlledState from '@atlaskit/ds-lib/use-controlled';
|
|
8
8
|
import useFocus from '@atlaskit/ds-lib/use-focus-event';
|
|
9
9
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
10
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import Popup from '@atlaskit/popup';
|
|
11
12
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
12
13
|
import { gridSize as gridSizeFn, layers } from '@atlaskit/theme/constants';
|
|
@@ -146,6 +147,7 @@ const DropdownMenu = props => {
|
|
|
146
147
|
fallbackPlacements: fallbackPlacements,
|
|
147
148
|
testId: testId && `${testId}--content`,
|
|
148
149
|
shouldUseCaptureOnOutsideClick: true,
|
|
150
|
+
shouldRenderToParent: getBooleanFF('platform.design-system-team.render-popup-in-parent_f73ij') ? true : undefined,
|
|
149
151
|
trigger: triggerProps => {
|
|
150
152
|
if (typeof trigger === 'function') {
|
|
151
153
|
const {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import noop from '@atlaskit/ds-lib/noop';
|
|
4
|
+
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu';
|
|
4
5
|
import ButtonItem from '@atlaskit/menu/button-item';
|
|
6
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
5
7
|
import RadioIcon from '../internal/components/radio-icon';
|
|
6
8
|
import useRadioState from '../internal/hooks/use-radio-state';
|
|
7
9
|
import useRegisterItemWithFocusManager from '../internal/hooks/use-register-item-with-focus-manager';
|
|
@@ -39,7 +41,9 @@ const DropdownItemRadio = props => {
|
|
|
39
41
|
providedOnClick(event);
|
|
40
42
|
}, [providedOnClick, setSelected]);
|
|
41
43
|
const itemRef = useRegisterItemWithFocusManager();
|
|
42
|
-
return /*#__PURE__*/React.createElement(
|
|
44
|
+
return /*#__PURE__*/React.createElement(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
45
|
+
value: "none"
|
|
46
|
+
}, /*#__PURE__*/React.createElement(ButtonItem, _extends({
|
|
43
47
|
id: id,
|
|
44
48
|
onClick: onClickHandler,
|
|
45
49
|
role: isVoiceOverSupported() ? 'radio' : 'menuitemradio',
|
|
@@ -49,8 +53,9 @@ const DropdownItemRadio = props => {
|
|
|
49
53
|
iconBefore: /*#__PURE__*/React.createElement(RadioIcon, {
|
|
50
54
|
checked: selected
|
|
51
55
|
}),
|
|
56
|
+
isSelected: selected && getBooleanFF('platform.design-system-team.menu-selected-state-change_0see9'),
|
|
52
57
|
ref: itemRef
|
|
53
58
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
54
|
-
}, rest));
|
|
59
|
+
}, rest)));
|
|
55
60
|
};
|
|
56
61
|
export default DropdownItemRadio;
|
package/dist/es2019/version.json
CHANGED
|
@@ -4,7 +4,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
4
4
|
var _excluded = ["id", "isSelected", "defaultSelected", "onClick", "shouldTitleWrap", "shouldDescriptionWrap"];
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
import noop from '@atlaskit/ds-lib/noop';
|
|
7
|
+
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu';
|
|
7
8
|
import ButtonItem from '@atlaskit/menu/button-item';
|
|
9
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
10
|
import CheckboxIcon from '../internal/components/checkbox-icon';
|
|
9
11
|
import useCheckboxState from '../internal/hooks/use-checkbox-state';
|
|
10
12
|
import useRegisterItemWithFocusManager from '../internal/hooks/use-register-item-with-focus-manager';
|
|
@@ -47,7 +49,9 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(props) {
|
|
|
47
49
|
providedOnClick(event);
|
|
48
50
|
}, [providedOnClick, setSelected]);
|
|
49
51
|
var itemRef = useRegisterItemWithFocusManager();
|
|
50
|
-
return /*#__PURE__*/React.createElement(
|
|
52
|
+
return /*#__PURE__*/React.createElement(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
53
|
+
value: "none"
|
|
54
|
+
}, /*#__PURE__*/React.createElement(ButtonItem, _extends({
|
|
51
55
|
id: id,
|
|
52
56
|
onClick: onClickHandler,
|
|
53
57
|
role: "menuitemcheckbox",
|
|
@@ -57,8 +61,9 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(props) {
|
|
|
57
61
|
iconBefore: /*#__PURE__*/React.createElement(CheckboxIcon, {
|
|
58
62
|
checked: selected
|
|
59
63
|
}),
|
|
64
|
+
isSelected: selected && getBooleanFF('platform.design-system-team.menu-selected-state-change_0see9'),
|
|
60
65
|
ref: itemRef
|
|
61
66
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
62
|
-
}, rest));
|
|
67
|
+
}, rest)));
|
|
63
68
|
};
|
|
64
69
|
export default DropdownItemCheckbox;
|
|
@@ -13,6 +13,7 @@ import noop from '@atlaskit/ds-lib/noop';
|
|
|
13
13
|
import useControlledState from '@atlaskit/ds-lib/use-controlled';
|
|
14
14
|
import useFocus from '@atlaskit/ds-lib/use-focus-event';
|
|
15
15
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
16
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
16
17
|
import Popup from '@atlaskit/popup';
|
|
17
18
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
18
19
|
import { gridSize as gridSizeFn, layers } from '@atlaskit/theme/constants';
|
|
@@ -164,6 +165,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
164
165
|
fallbackPlacements: fallbackPlacements,
|
|
165
166
|
testId: testId && "".concat(testId, "--content"),
|
|
166
167
|
shouldUseCaptureOnOutsideClick: true,
|
|
168
|
+
shouldRenderToParent: getBooleanFF('platform.design-system-team.render-popup-in-parent_f73ij') ? true : undefined,
|
|
167
169
|
trigger: function trigger(triggerProps) {
|
|
168
170
|
if (typeof _trigger === 'function') {
|
|
169
171
|
var ref = triggerProps.ref,
|
|
@@ -4,7 +4,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
4
4
|
var _excluded = ["id", "isSelected", "defaultSelected", "onClick", "shouldTitleWrap", "shouldDescriptionWrap"];
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
import noop from '@atlaskit/ds-lib/noop';
|
|
7
|
+
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu';
|
|
7
8
|
import ButtonItem from '@atlaskit/menu/button-item';
|
|
9
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
10
|
import RadioIcon from '../internal/components/radio-icon';
|
|
9
11
|
import useRadioState from '../internal/hooks/use-radio-state';
|
|
10
12
|
import useRegisterItemWithFocusManager from '../internal/hooks/use-register-item-with-focus-manager';
|
|
@@ -48,7 +50,9 @@ var DropdownItemRadio = function DropdownItemRadio(props) {
|
|
|
48
50
|
providedOnClick(event);
|
|
49
51
|
}, [providedOnClick, setSelected]);
|
|
50
52
|
var itemRef = useRegisterItemWithFocusManager();
|
|
51
|
-
return /*#__PURE__*/React.createElement(
|
|
53
|
+
return /*#__PURE__*/React.createElement(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
54
|
+
value: "none"
|
|
55
|
+
}, /*#__PURE__*/React.createElement(ButtonItem, _extends({
|
|
52
56
|
id: id,
|
|
53
57
|
onClick: onClickHandler,
|
|
54
58
|
role: isVoiceOverSupported() ? 'radio' : 'menuitemradio',
|
|
@@ -58,8 +62,9 @@ var DropdownItemRadio = function DropdownItemRadio(props) {
|
|
|
58
62
|
iconBefore: /*#__PURE__*/React.createElement(RadioIcon, {
|
|
59
63
|
checked: selected
|
|
60
64
|
}),
|
|
65
|
+
isSelected: selected && getBooleanFF('platform.design-system-team.menu-selected-state-change_0see9'),
|
|
61
66
|
ref: itemRef
|
|
62
67
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
63
|
-
}, rest));
|
|
68
|
+
}, rest)));
|
|
64
69
|
};
|
|
65
70
|
export default DropdownItemRadio;
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dropdown-menu",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.10.0",
|
|
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/"
|
|
@@ -24,22 +24,23 @@
|
|
|
24
24
|
"atlaskit:src": "src/index.tsx",
|
|
25
25
|
"atlassian": {
|
|
26
26
|
"team": "Design System Team",
|
|
27
|
-
"releaseModel": "
|
|
27
|
+
"releaseModel": "continuous",
|
|
28
28
|
"website": {
|
|
29
29
|
"name": "Dropdown menu",
|
|
30
30
|
"category": "Components"
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/button": "^16.
|
|
34
|
+
"@atlaskit/button": "^16.8.0",
|
|
35
35
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
36
36
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
37
37
|
"@atlaskit/icon": "^21.12.0",
|
|
38
|
-
"@atlaskit/menu": "^1.
|
|
39
|
-
"@atlaskit/
|
|
38
|
+
"@atlaskit/menu": "^1.8.0",
|
|
39
|
+
"@atlaskit/platform-feature-flags": "^0.2.2",
|
|
40
|
+
"@atlaskit/popup": "^1.7.0",
|
|
40
41
|
"@atlaskit/spinner": "^15.5.0",
|
|
41
42
|
"@atlaskit/theme": "^12.5.0",
|
|
42
|
-
"@atlaskit/tokens": "^1.
|
|
43
|
+
"@atlaskit/tokens": "^1.9.0",
|
|
43
44
|
"@atlaskit/visually-hidden": "^1.2.0",
|
|
44
45
|
"@babel/runtime": "^7.0.0",
|
|
45
46
|
"@emotion/react": "^11.7.1",
|
|
@@ -56,10 +57,8 @@
|
|
|
56
57
|
"@atlaskit/heading": "^1.3.0",
|
|
57
58
|
"@atlaskit/lozenge": "11.4.2",
|
|
58
59
|
"@atlaskit/modal-dialog": "^12.6.0",
|
|
59
|
-
"@atlaskit/primitives": "^0.
|
|
60
|
+
"@atlaskit/primitives": "^0.13.0",
|
|
60
61
|
"@atlaskit/section-message": "^6.4.0",
|
|
61
|
-
"@atlaskit/ssr": "*",
|
|
62
|
-
"@atlaskit/tooltip": "^17.8.0",
|
|
63
62
|
"@atlaskit/visual-regression": "*",
|
|
64
63
|
"@atlaskit/webdriver-runner": "*",
|
|
65
64
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
@@ -110,6 +109,9 @@
|
|
|
110
109
|
"platform-feature-flags": {
|
|
111
110
|
"platform.design-system-team.menu-selected-state-change_0see9": {
|
|
112
111
|
"type": "boolean"
|
|
112
|
+
},
|
|
113
|
+
"platform.design-system-team.render-popup-in-parent_f73ij": {
|
|
114
|
+
"type": "boolean"
|
|
113
115
|
}
|
|
114
116
|
},
|
|
115
117
|
"homepage": "https://atlassian.design/components/dropdown-menu/",
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/dropdown-menu"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
|
|
9
|
+
import type { CustomItemProps } from '@atlaskit/menu/types';
|
|
10
|
+
import { default as DropdownItemGroup } from '@atlaskit/menu/section';
|
|
11
|
+
import { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
|
12
|
+
import type { MenuGroupProps } from '@atlaskit/menu/types';
|
|
13
|
+
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
14
|
+
import { default as React_2 } from 'react';
|
|
15
|
+
import { ReactElement } from 'react';
|
|
16
|
+
import { ReactNode } from 'react';
|
|
17
|
+
import { Ref } from 'react';
|
|
18
|
+
import type { SectionProps } from '@atlaskit/menu';
|
|
19
|
+
import type { SectionProps as SectionProps_2 } from '@atlaskit/menu/types';
|
|
20
|
+
import type { TriggerProps } from '@atlaskit/popup/types';
|
|
21
|
+
|
|
22
|
+
// @public (undocumented)
|
|
23
|
+
export interface CustomTriggerProps<TriggerElement extends HTMLElement = HTMLElement> extends Omit<TriggerProps, 'ref'> {
|
|
24
|
+
isSelected?: boolean;
|
|
25
|
+
onClick?: (e: KeyboardEvent_2 | MouseEvent_2) => void;
|
|
26
|
+
testId?: string;
|
|
27
|
+
triggerRef: Ref<TriggerElement>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// @public
|
|
31
|
+
export const DropdownItem: React_2.ForwardRefExoticComponent<DropdownItemProps & React_2.RefAttributes<HTMLElement>>;
|
|
32
|
+
|
|
33
|
+
// @public
|
|
34
|
+
export const DropdownItemCheckbox: (props: DropdownItemCheckboxProps) => JSX.Element;
|
|
35
|
+
|
|
36
|
+
// @public
|
|
37
|
+
export const DropdownItemCheckboxGroup: (props: DropdownItemCheckboxGroupProps) => JSX.Element;
|
|
38
|
+
|
|
39
|
+
// @public (undocumented)
|
|
40
|
+
interface DropdownItemCheckboxGroupProps extends SectionProps {
|
|
41
|
+
id: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// @public (undocumented)
|
|
45
|
+
interface DropdownItemCheckboxProps {
|
|
46
|
+
children: React.ReactNode;
|
|
47
|
+
defaultSelected?: boolean;
|
|
48
|
+
description?: JSX.Element | string;
|
|
49
|
+
id: string;
|
|
50
|
+
isDisabled?: boolean;
|
|
51
|
+
isSelected?: boolean;
|
|
52
|
+
onClick?: (e: KeyboardEvent_2 | MouseEvent_2) => void;
|
|
53
|
+
shouldDescriptionWrap?: boolean;
|
|
54
|
+
shouldTitleWrap?: boolean;
|
|
55
|
+
testId?: string;
|
|
56
|
+
title?: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { DropdownItemGroup }
|
|
60
|
+
|
|
61
|
+
// @public (undocumented)
|
|
62
|
+
export interface DropdownItemProps {
|
|
63
|
+
children: React.ReactNode;
|
|
64
|
+
component?: CustomItemProps['component'];
|
|
65
|
+
description?: JSX.Element | string;
|
|
66
|
+
elemAfter?: React.ReactNode;
|
|
67
|
+
elemBefore?: React.ReactNode;
|
|
68
|
+
href?: string;
|
|
69
|
+
isDisabled?: boolean;
|
|
70
|
+
isSelected?: boolean;
|
|
71
|
+
onClick?: (e: KeyboardEvent_2 | MouseEvent_2) => void;
|
|
72
|
+
rel?: string;
|
|
73
|
+
shouldDescriptionWrap?: boolean;
|
|
74
|
+
shouldTitleWrap?: boolean;
|
|
75
|
+
target?: string;
|
|
76
|
+
testId?: string;
|
|
77
|
+
title?: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// @public
|
|
81
|
+
export const DropdownItemRadio: (props: DropdownItemRadioProps) => JSX.Element;
|
|
82
|
+
|
|
83
|
+
// @public
|
|
84
|
+
export const DropdownItemRadioGroup: (props: DropdownItemRadioGroupProps) => JSX.Element;
|
|
85
|
+
|
|
86
|
+
// @public (undocumented)
|
|
87
|
+
interface DropdownItemRadioGroupProps extends SectionProps {
|
|
88
|
+
// (undocumented)
|
|
89
|
+
id: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// @public (undocumented)
|
|
93
|
+
interface DropdownItemRadioProps {
|
|
94
|
+
children: React.ReactNode;
|
|
95
|
+
defaultSelected?: boolean;
|
|
96
|
+
description?: JSX.Element | string;
|
|
97
|
+
id: string;
|
|
98
|
+
isDisabled?: boolean;
|
|
99
|
+
isSelected?: boolean;
|
|
100
|
+
onClick?: (e: KeyboardEvent_2 | MouseEvent_2) => void;
|
|
101
|
+
shouldDescriptionWrap?: boolean;
|
|
102
|
+
shouldTitleWrap?: boolean;
|
|
103
|
+
testId?: string;
|
|
104
|
+
title?: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// @public
|
|
108
|
+
const DropdownMenu: <T extends HTMLElement = HTMLElement>(props: DropdownMenuProps<T>) => JSX.Element;
|
|
109
|
+
export default DropdownMenu;
|
|
110
|
+
|
|
111
|
+
// @public (undocumented)
|
|
112
|
+
export interface DropdownMenuGroupProps extends SectionProps_2 {
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// @public (undocumented)
|
|
116
|
+
export interface DropdownMenuProps<TriggerElement extends HTMLElement = HTMLElement> {
|
|
117
|
+
appearance?: 'default' | 'tall';
|
|
118
|
+
autoFocus?: boolean;
|
|
119
|
+
children?: ReactNode;
|
|
120
|
+
defaultOpen?: boolean;
|
|
121
|
+
isLoading?: boolean;
|
|
122
|
+
isOpen?: boolean;
|
|
123
|
+
onOpenChange?: (args: OnOpenChangeArgs) => void;
|
|
124
|
+
placement?: Placement;
|
|
125
|
+
shouldFlip?: boolean;
|
|
126
|
+
spacing?: Extract<MenuGroupProps['spacing'], 'compact' | 'cozy'>;
|
|
127
|
+
statusLabel?: string;
|
|
128
|
+
testId?: string;
|
|
129
|
+
trigger?: ((triggerButtonProps: CustomTriggerProps<TriggerElement>) => ReactElement) | string;
|
|
130
|
+
zIndex?: number;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// @public (undocumented)
|
|
134
|
+
export interface OnOpenChangeArgs {
|
|
135
|
+
// (undocumented)
|
|
136
|
+
event: KeyboardEvent_2 | MouseEvent_2;
|
|
137
|
+
// (undocumented)
|
|
138
|
+
isOpen: boolean;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// @public (undocumented)
|
|
142
|
+
type Placement = 'auto' | 'auto-end' | 'auto-start' | 'bottom' | 'bottom-end' | 'bottom-start' | 'left' | 'left-end' | 'left-start' | 'right' | 'right-end' | 'right-start' | 'top' | 'top-end' | 'top-start';
|
|
143
|
+
|
|
144
|
+
// (No @packageDocumentation comment for this package)
|
|
145
|
+
|
|
146
|
+
```
|