@atlaskit/dropdown-menu 12.1.1 → 12.1.3
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 +21 -0
- package/dist/cjs/checkbox/dropdown-item-checkbox-group.js +8 -3
- package/dist/cjs/checkbox/dropdown-item-checkbox.js +8 -3
- package/dist/cjs/dropdown-menu-item.js +26 -7
- package/dist/cjs/dropdown-menu.js +7 -4
- package/dist/cjs/radio/dropdown-item-radio-group.js +8 -3
- package/dist/cjs/radio/dropdown-item-radio.js +13 -4
- package/dist/es2019/checkbox/dropdown-item-checkbox-group.js +7 -3
- package/dist/es2019/checkbox/dropdown-item-checkbox.js +7 -3
- package/dist/es2019/dropdown-menu-item.js +24 -7
- package/dist/es2019/dropdown-menu.js +4 -1
- package/dist/es2019/radio/dropdown-item-radio-group.js +7 -3
- package/dist/es2019/radio/dropdown-item-radio.js +12 -4
- package/dist/esm/checkbox/dropdown-item-checkbox-group.js +8 -3
- package/dist/esm/checkbox/dropdown-item-checkbox.js +8 -3
- package/dist/esm/dropdown-menu-item.js +26 -7
- package/dist/esm/dropdown-menu.js +6 -3
- package/dist/esm/radio/dropdown-item-radio-group.js +8 -3
- package/dist/esm/radio/dropdown-item-radio.js +13 -4
- package/dist/types/checkbox/dropdown-item-checkbox-group.d.ts +1 -1
- package/dist/types/checkbox/dropdown-item-checkbox.d.ts +1 -1
- package/dist/types/radio/dropdown-item-radio-group.d.ts +1 -1
- package/dist/types/radio/dropdown-item-radio.d.ts +1 -1
- package/dist/types-ts4.5/checkbox/dropdown-item-checkbox-group.d.ts +1 -1
- package/dist/types-ts4.5/checkbox/dropdown-item-checkbox.d.ts +1 -1
- package/dist/types-ts4.5/radio/dropdown-item-radio-group.d.ts +1 -1
- package/dist/types-ts4.5/radio/dropdown-item-radio.d.ts +1 -1
- package/package.json +4 -4
- package/report.api.md +4 -0
- package/tmp/api-report-tmp.d.ts +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,40 @@
|
|
|
1
1
|
# @atlaskit/dropdown-menu
|
|
2
2
|
|
|
3
|
+
## 12.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#41628](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41628) [`b05664f7aba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b05664f7aba) - Use feature flag to toggle if we enable UNSAFE_LAYERING
|
|
8
|
+
|
|
9
|
+
## 12.1.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#41673](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41673) [`e0bc1e5b8bb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e0bc1e5b8bb) - fix: adds spread prop support back to DropdownMenu and sub-components after their removal in version `11.14.5`.
|
|
14
|
+
These spread props will be removed instead in a future major version.
|
|
15
|
+
|
|
3
16
|
## 12.1.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
6
19
|
|
|
20
|
+
- Warning: This version is deprecated due to breaking behavioural change from removal of spread props in 11.14.5. Please upgrade to version 12.1.2 or later
|
|
21
|
+
|
|
7
22
|
- [#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
23
|
|
|
9
24
|
## 12.1.0
|
|
10
25
|
|
|
11
26
|
### Minor Changes
|
|
12
27
|
|
|
28
|
+
- Warning: This version is deprecated due to breaking behavioural change from removal of spread props in 11.14.5. Please upgrade to version 12.1.2 or later
|
|
29
|
+
|
|
13
30
|
- [#41586](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41586) [`ef0466f92d9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ef0466f92d9) - We are removing previously added feature flag and unsafe entry point usage of the new Button inside DropdownMenu.
|
|
14
31
|
|
|
15
32
|
## 12.0.0
|
|
16
33
|
|
|
17
34
|
### Major Changes
|
|
18
35
|
|
|
36
|
+
- Warning: This version is deprecated due to breaking behavioural change from removal of spread props in 11.14.5. Please upgrade to version 12.1.2 or later
|
|
37
|
+
|
|
19
38
|
- [#41355](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41355) [`cd1c813da18`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cd1c813da18) - Menu items now have a secondary selected state (border or notch), this was previously feature flagged for Atlassian experiences and is now available for everyone.
|
|
20
39
|
|
|
21
40
|
This change makes all menu items are now relatively positioned, if you had any child elements that leaned on this behaviour your experiences will now be broken!
|
|
@@ -40,6 +59,8 @@
|
|
|
40
59
|
|
|
41
60
|
### Patch Changes
|
|
42
61
|
|
|
62
|
+
- Warning: This version is deprecated due to breaking behavioural change from the removal of spread props. Please downgrade to 11.14.4, or upgrade to 12.1.2 or later
|
|
63
|
+
|
|
43
64
|
- [#41067](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41067) [`5a9ed67f8f5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5a9ed67f8f5) - Expand rest props for more explicit function data flow.
|
|
44
65
|
|
|
45
66
|
## 11.14.4
|
|
@@ -5,9 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
|
9
11
|
var _section = _interopRequireDefault(require("@atlaskit/menu/section"));
|
|
10
12
|
var _checkboxGroupContext = require("../internal/context/checkbox-group-context");
|
|
13
|
+
var _excluded = ["children", "hasSeparator", "id", "isList", "isScrollable", "overrides", "testId", "title"];
|
|
11
14
|
/**
|
|
12
15
|
* __Dropdown item checkbox group__
|
|
13
16
|
*
|
|
@@ -22,10 +25,11 @@ var DropdownItemCheckboxGroup = function DropdownItemCheckboxGroup(_ref) {
|
|
|
22
25
|
isScrollable = _ref.isScrollable,
|
|
23
26
|
overrides = _ref.overrides,
|
|
24
27
|
testId = _ref.testId,
|
|
25
|
-
title = _ref.title
|
|
28
|
+
title = _ref.title,
|
|
29
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
26
30
|
return /*#__PURE__*/_react.default.createElement(_checkboxGroupContext.CheckboxGroupContext.Provider, {
|
|
27
31
|
value: id
|
|
28
|
-
}, /*#__PURE__*/_react.default.createElement(_section.default, {
|
|
32
|
+
}, /*#__PURE__*/_react.default.createElement(_section.default, (0, _extends2.default)({
|
|
29
33
|
hasSeparator: hasSeparator,
|
|
30
34
|
id: id,
|
|
31
35
|
isList: isList,
|
|
@@ -35,6 +39,7 @@ var DropdownItemCheckboxGroup = function DropdownItemCheckboxGroup(_ref) {
|
|
|
35
39
|
overrides: overrides,
|
|
36
40
|
testId: testId,
|
|
37
41
|
title: title
|
|
38
|
-
|
|
42
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
43
|
+
}, rest), children));
|
|
39
44
|
};
|
|
40
45
|
var _default = exports.default = DropdownItemCheckboxGroup;
|
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
13
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
12
14
|
var _menu = require("@atlaskit/menu");
|
|
@@ -14,6 +16,7 @@ var _buttonItem = _interopRequireDefault(require("@atlaskit/menu/button-item"));
|
|
|
14
16
|
var _checkboxIcon = _interopRequireDefault(require("../internal/components/checkbox-icon"));
|
|
15
17
|
var _useCheckboxState3 = _interopRequireDefault(require("../internal/hooks/use-checkbox-state"));
|
|
16
18
|
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"];
|
|
17
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
21
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
22
|
/**
|
|
@@ -38,7 +41,8 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(_ref) {
|
|
|
38
41
|
shouldDescriptionWrap = _ref$shouldDescriptio === void 0 ? true : _ref$shouldDescriptio,
|
|
39
42
|
_ref$shouldTitleWrap = _ref.shouldTitleWrap,
|
|
40
43
|
shouldTitleWrap = _ref$shouldTitleWrap === void 0 ? true : _ref$shouldTitleWrap,
|
|
41
|
-
testId = _ref.testId
|
|
44
|
+
testId = _ref.testId,
|
|
45
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
42
46
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
43
47
|
// eslint-disable-next-line no-console
|
|
44
48
|
console.warn("[DropdownItemCheckbox] You've used both `defaultSelected` and `isSelected` props. This is dangerous and can lead to unexpected results. Use one or the other depending if you want to control the components state yourself.");
|
|
@@ -60,7 +64,7 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(_ref) {
|
|
|
60
64
|
var itemRef = (0, _useRegisterItemWithFocusManager.default)();
|
|
61
65
|
return /*#__PURE__*/_react.default.createElement(_menu.SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
62
66
|
value: "none"
|
|
63
|
-
}, /*#__PURE__*/_react.default.createElement(_buttonItem.default, {
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonItem.default, (0, _extends2.default)({
|
|
64
68
|
"aria-checked": selected,
|
|
65
69
|
description: description,
|
|
66
70
|
iconBefore: /*#__PURE__*/_react.default.createElement(_checkboxIcon.default, {
|
|
@@ -75,6 +79,7 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(_ref) {
|
|
|
75
79
|
shouldDescriptionWrap: shouldDescriptionWrap,
|
|
76
80
|
shouldTitleWrap: shouldTitleWrap,
|
|
77
81
|
testId: testId
|
|
78
|
-
|
|
82
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
83
|
+
}, rest), children));
|
|
79
84
|
};
|
|
80
85
|
var _default = exports.default = DropdownItemCheckbox;
|
|
@@ -6,12 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
12
|
var _mergeRefs = _interopRequireDefault(require("@atlaskit/ds-lib/merge-refs"));
|
|
11
13
|
var _buttonItem = _interopRequireDefault(require("@atlaskit/menu/button-item"));
|
|
12
14
|
var _customItem = _interopRequireDefault(require("@atlaskit/menu/custom-item"));
|
|
13
15
|
var _linkItem = _interopRequireDefault(require("@atlaskit/menu/link-item"));
|
|
14
16
|
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"];
|
|
15
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
19
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
20
|
/**
|
|
@@ -39,10 +42,11 @@ var DropdownMenuItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
39
42
|
_ref$shouldTitleWrap = _ref.shouldTitleWrap,
|
|
40
43
|
shouldTitleWrap = _ref$shouldTitleWrap === void 0 ? true : _ref$shouldTitleWrap,
|
|
41
44
|
target = _ref.target,
|
|
42
|
-
testId = _ref.testId
|
|
45
|
+
testId = _ref.testId,
|
|
46
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
43
47
|
var itemRef = (0, _useRegisterItemWithFocusManager.default)();
|
|
44
48
|
if (component) {
|
|
45
|
-
return /*#__PURE__*/_react.default.createElement(_customItem.default, {
|
|
49
|
+
return /*#__PURE__*/_react.default.createElement(_customItem.default, (0, _extends2.default)({
|
|
46
50
|
component: component,
|
|
47
51
|
description: description,
|
|
48
52
|
iconAfter: elemAfter,
|
|
@@ -55,9 +59,16 @@ var DropdownMenuItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
55
59
|
shouldTitleWrap: shouldTitleWrap,
|
|
56
60
|
testId: testId,
|
|
57
61
|
href: href
|
|
58
|
-
|
|
62
|
+
// Thanks to spread props, these attributes are passed to CustomItem, even though
|
|
63
|
+
// it's not in the component's prop types.
|
|
64
|
+
// @ts-expect-error
|
|
65
|
+
,
|
|
66
|
+
target: target,
|
|
67
|
+
rel: rel
|
|
68
|
+
// DSP-13312 TODO: remove spread props in future major release
|
|
69
|
+
}, rest), children);
|
|
59
70
|
} else if (href) {
|
|
60
|
-
return /*#__PURE__*/_react.default.createElement(_linkItem.default, {
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement(_linkItem.default, (0, _extends2.default)({
|
|
61
72
|
description: description,
|
|
62
73
|
href: href,
|
|
63
74
|
iconAfter: elemAfter,
|
|
@@ -72,9 +83,10 @@ var DropdownMenuItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
72
83
|
shouldTitleWrap: shouldTitleWrap,
|
|
73
84
|
target: target,
|
|
74
85
|
testId: testId
|
|
75
|
-
|
|
86
|
+
// DSP-13312 TODO: remove spread props in future major release
|
|
87
|
+
}, rest), children);
|
|
76
88
|
} else {
|
|
77
|
-
return /*#__PURE__*/_react.default.createElement(_buttonItem.default, {
|
|
89
|
+
return /*#__PURE__*/_react.default.createElement(_buttonItem.default, (0, _extends2.default)({
|
|
78
90
|
description: description,
|
|
79
91
|
iconAfter: elemAfter,
|
|
80
92
|
iconBefore: elemBefore,
|
|
@@ -86,7 +98,14 @@ var DropdownMenuItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
86
98
|
shouldDescriptionWrap: shouldDescriptionWrap,
|
|
87
99
|
shouldTitleWrap: shouldTitleWrap,
|
|
88
100
|
testId: testId
|
|
89
|
-
|
|
101
|
+
// Thanks to spread props, these attributes are passed to CustomItem, even though
|
|
102
|
+
// it's not in the component's prop types.
|
|
103
|
+
// @ts-expect-error
|
|
104
|
+
,
|
|
105
|
+
target: target,
|
|
106
|
+
rel: rel
|
|
107
|
+
// DSP-13312 TODO: remove spread props in future major release
|
|
108
|
+
}, rest), children);
|
|
90
109
|
}
|
|
91
110
|
});
|
|
92
111
|
var _default = exports.default = DropdownMenuItem;
|
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
14
|
var _bindEventListener = require("bind-event-listener");
|
|
@@ -25,10 +26,11 @@ var _menuWrapper = _interopRequireDefault(require("./internal/components/menu-wr
|
|
|
25
26
|
var _selectionStore = _interopRequireDefault(require("./internal/context/selection-store"));
|
|
26
27
|
var _useRegisterItemWithFocusManager = _interopRequireDefault(require("./internal/hooks/use-register-item-with-focus-manager"));
|
|
27
28
|
var _useGeneratedId = _interopRequireWildcard(require("./internal/utils/use-generated-id"));
|
|
29
|
+
var _excluded = ["ref", "aria-controls", "aria-expanded", "aria-haspopup"]; // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
28
30
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
31
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
30
32
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
31
|
-
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) { (0, _defineProperty2.default)(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; }
|
|
33
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
32
34
|
var gridSize = (0, _constants.gridSize)();
|
|
33
35
|
var MAX_HEIGHT = "calc(100vh - ".concat(gridSize * 2, "px)");
|
|
34
36
|
var opposites = {
|
|
@@ -186,13 +188,14 @@ var DropdownMenu = function DropdownMenu(_ref) {
|
|
|
186
188
|
var ref = _ref2.ref,
|
|
187
189
|
ariaControls = _ref2['aria-controls'],
|
|
188
190
|
ariaExpanded = _ref2['aria-expanded'],
|
|
189
|
-
ariaHasPopup = _ref2['aria-haspopup']
|
|
191
|
+
ariaHasPopup = _ref2['aria-haspopup'],
|
|
192
|
+
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
190
193
|
if (typeof _trigger === 'function') {
|
|
191
|
-
return _trigger(_objectSpread(_objectSpread({
|
|
194
|
+
return _trigger(_objectSpread(_objectSpread(_objectSpread({
|
|
192
195
|
'aria-controls': ariaControls,
|
|
193
196
|
'aria-expanded': ariaExpanded,
|
|
194
197
|
'aria-haspopup': ariaHasPopup
|
|
195
|
-
}, bindFocus), {}, {
|
|
198
|
+
}, rest), bindFocus), {}, {
|
|
196
199
|
triggerRef: (0, _mergeRefs.default)([ref, itemRef]),
|
|
197
200
|
isSelected: isLocalOpen,
|
|
198
201
|
onClick: handleTriggerClicked,
|
|
@@ -6,13 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = exports.RadioGroupContext = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
14
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
13
15
|
var _section = _interopRequireDefault(require("@atlaskit/menu/section"));
|
|
14
16
|
var _selectionStore = require("../internal/context/selection-store");
|
|
15
17
|
var _resetOptionsInGroup = _interopRequireDefault(require("../internal/utils/reset-options-in-group"));
|
|
18
|
+
var _excluded = ["children", "hasSeparator", "id", "isList", "isScrollable", "overrides", "testId", "title"];
|
|
16
19
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
21
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -41,7 +44,8 @@ var DropdownItemRadioGroup = function DropdownItemRadioGroup(_ref) {
|
|
|
41
44
|
isScrollable = _ref.isScrollable,
|
|
42
45
|
overrides = _ref.overrides,
|
|
43
46
|
testId = _ref.testId,
|
|
44
|
-
title = _ref.title
|
|
47
|
+
title = _ref.title,
|
|
48
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
45
49
|
var _useContext = (0, _react.useContext)(_selectionStore.SelectionStoreContext),
|
|
46
50
|
setGroupState = _useContext.setGroupState,
|
|
47
51
|
getGroupState = _useContext.getGroupState;
|
|
@@ -67,7 +71,7 @@ var DropdownItemRadioGroup = function DropdownItemRadioGroup(_ref) {
|
|
|
67
71
|
radioGroupState: radioGroupState,
|
|
68
72
|
selectRadioItem: selectRadioItem
|
|
69
73
|
}
|
|
70
|
-
}, /*#__PURE__*/_react.default.createElement(_section.default, {
|
|
74
|
+
}, /*#__PURE__*/_react.default.createElement(_section.default, (0, _extends2.default)({
|
|
71
75
|
hasSeparator: hasSeparator,
|
|
72
76
|
id: id,
|
|
73
77
|
isList: isList,
|
|
@@ -77,6 +81,7 @@ var DropdownItemRadioGroup = function DropdownItemRadioGroup(_ref) {
|
|
|
77
81
|
overrides: overrides,
|
|
78
82
|
testId: testId,
|
|
79
83
|
title: title
|
|
80
|
-
|
|
84
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
85
|
+
}, rest), children));
|
|
81
86
|
};
|
|
82
87
|
var _default = exports.default = DropdownItemRadioGroup;
|
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
13
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
12
14
|
var _menu = require("@atlaskit/menu");
|
|
@@ -15,6 +17,7 @@ var _radioIcon = _interopRequireDefault(require("../internal/components/radio-ic
|
|
|
15
17
|
var _useRadioState3 = _interopRequireDefault(require("../internal/hooks/use-radio-state"));
|
|
16
18
|
var _useRegisterItemWithFocusManager = _interopRequireDefault(require("../internal/hooks/use-register-item-with-focus-manager"));
|
|
17
19
|
var _isVoiceOverSupported = _interopRequireDefault(require("../internal/utils/is-voice-over-supported"));
|
|
20
|
+
var _excluded = ["children", "defaultSelected", "testId", "id", "title", "description", "isDisabled", "isSelected", "onClick", "shouldDescriptionWrap", "shouldTitleWrap"];
|
|
18
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20
23
|
/**
|
|
@@ -40,7 +43,8 @@ var DropdownItemRadio = function DropdownItemRadio(_ref) {
|
|
|
40
43
|
_ref$shouldDescriptio = _ref.shouldDescriptionWrap,
|
|
41
44
|
shouldDescriptionWrap = _ref$shouldDescriptio === void 0 ? true : _ref$shouldDescriptio,
|
|
42
45
|
_ref$shouldTitleWrap = _ref.shouldTitleWrap,
|
|
43
|
-
shouldTitleWrap = _ref$shouldTitleWrap === void 0 ? true : _ref$shouldTitleWrap
|
|
46
|
+
shouldTitleWrap = _ref$shouldTitleWrap === void 0 ? true : _ref$shouldTitleWrap,
|
|
47
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
44
48
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
45
49
|
// eslint-disable-next-line no-console
|
|
46
50
|
console.warn("[DropdownItemRadio] You've used both `defaultSelected` and `isSelected` props. This is dangerous and can lead to unexpected results. Use one or the other depending if you want to control the components state yourself.");
|
|
@@ -62,9 +66,8 @@ var DropdownItemRadio = function DropdownItemRadio(_ref) {
|
|
|
62
66
|
var itemRef = (0, _useRegisterItemWithFocusManager.default)();
|
|
63
67
|
return /*#__PURE__*/_react.default.createElement(_menu.SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
64
68
|
value: "none"
|
|
65
|
-
}, /*#__PURE__*/_react.default.createElement(_buttonItem.default, {
|
|
69
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonItem.default, (0, _extends2.default)({
|
|
66
70
|
"aria-checked": selected,
|
|
67
|
-
children: children,
|
|
68
71
|
description: description,
|
|
69
72
|
iconBefore: /*#__PURE__*/_react.default.createElement(_radioIcon.default, {
|
|
70
73
|
checked: selected
|
|
@@ -78,6 +81,12 @@ var DropdownItemRadio = function DropdownItemRadio(_ref) {
|
|
|
78
81
|
shouldDescriptionWrap: shouldDescriptionWrap,
|
|
79
82
|
shouldTitleWrap: shouldTitleWrap,
|
|
80
83
|
testId: testId
|
|
81
|
-
|
|
84
|
+
// Thanks to spread props, this attribute are passed to ButtonItem, even though
|
|
85
|
+
// it's not in the component's prop types.
|
|
86
|
+
// @ts-expect-error
|
|
87
|
+
,
|
|
88
|
+
title: title
|
|
89
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
90
|
+
}, rest), children));
|
|
82
91
|
};
|
|
83
92
|
var _default = exports.default = DropdownItemRadio;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import Section from '@atlaskit/menu/section';
|
|
3
4
|
import { CheckboxGroupContext } from '../internal/context/checkbox-group-context';
|
|
@@ -15,11 +16,13 @@ const DropdownItemCheckboxGroup = ({
|
|
|
15
16
|
isScrollable,
|
|
16
17
|
overrides,
|
|
17
18
|
testId,
|
|
18
|
-
title
|
|
19
|
+
title,
|
|
20
|
+
// DSP-13312 TODO: remove spread props in future major release
|
|
21
|
+
...rest
|
|
19
22
|
}) => {
|
|
20
23
|
return /*#__PURE__*/React.createElement(CheckboxGroupContext.Provider, {
|
|
21
24
|
value: id
|
|
22
|
-
}, /*#__PURE__*/React.createElement(Section, {
|
|
25
|
+
}, /*#__PURE__*/React.createElement(Section, _extends({
|
|
23
26
|
hasSeparator: hasSeparator,
|
|
24
27
|
id: id,
|
|
25
28
|
isList: isList,
|
|
@@ -29,6 +32,7 @@ const DropdownItemCheckboxGroup = ({
|
|
|
29
32
|
overrides: overrides,
|
|
30
33
|
testId: testId,
|
|
31
34
|
title: title
|
|
32
|
-
|
|
35
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
36
|
+
}, rest), children));
|
|
33
37
|
};
|
|
34
38
|
export default DropdownItemCheckboxGroup;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React, { useCallback } from 'react';
|
|
2
3
|
import noop from '@atlaskit/ds-lib/noop';
|
|
3
4
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu';
|
|
@@ -24,7 +25,9 @@ const DropdownItemCheckbox = ({
|
|
|
24
25
|
onClick: providedOnClick = noop,
|
|
25
26
|
shouldDescriptionWrap = true,
|
|
26
27
|
shouldTitleWrap = true,
|
|
27
|
-
testId
|
|
28
|
+
testId,
|
|
29
|
+
// DSP-13312 TODO: remove spread props in future major release
|
|
30
|
+
...rest
|
|
28
31
|
}) => {
|
|
29
32
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
30
33
|
// eslint-disable-next-line no-console
|
|
@@ -42,7 +45,7 @@ const DropdownItemCheckbox = ({
|
|
|
42
45
|
const itemRef = useRegisterItemWithFocusManager();
|
|
43
46
|
return /*#__PURE__*/React.createElement(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
44
47
|
value: "none"
|
|
45
|
-
}, /*#__PURE__*/React.createElement(ButtonItem, {
|
|
48
|
+
}, /*#__PURE__*/React.createElement(ButtonItem, _extends({
|
|
46
49
|
"aria-checked": selected,
|
|
47
50
|
description: description,
|
|
48
51
|
iconBefore: /*#__PURE__*/React.createElement(CheckboxIcon, {
|
|
@@ -57,6 +60,7 @@ const DropdownItemCheckbox = ({
|
|
|
57
60
|
shouldDescriptionWrap: shouldDescriptionWrap,
|
|
58
61
|
shouldTitleWrap: shouldTitleWrap,
|
|
59
62
|
testId: testId
|
|
60
|
-
|
|
63
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
64
|
+
}, rest), children));
|
|
61
65
|
};
|
|
62
66
|
export default DropdownItemCheckbox;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React, { forwardRef } from 'react';
|
|
2
3
|
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
3
4
|
import ButtonItem from '@atlaskit/menu/button-item';
|
|
@@ -27,11 +28,12 @@ const DropdownMenuItem = /*#__PURE__*/forwardRef(({
|
|
|
27
28
|
shouldDescriptionWrap = true,
|
|
28
29
|
shouldTitleWrap = true,
|
|
29
30
|
target,
|
|
30
|
-
testId
|
|
31
|
+
testId,
|
|
32
|
+
...rest
|
|
31
33
|
}, ref) => {
|
|
32
34
|
const itemRef = useRegisterItemWithFocusManager();
|
|
33
35
|
if (component) {
|
|
34
|
-
return /*#__PURE__*/React.createElement(CustomItem, {
|
|
36
|
+
return /*#__PURE__*/React.createElement(CustomItem, _extends({
|
|
35
37
|
component: component,
|
|
36
38
|
description: description,
|
|
37
39
|
iconAfter: elemAfter,
|
|
@@ -44,9 +46,16 @@ const DropdownMenuItem = /*#__PURE__*/forwardRef(({
|
|
|
44
46
|
shouldTitleWrap: shouldTitleWrap,
|
|
45
47
|
testId: testId,
|
|
46
48
|
href: href
|
|
47
|
-
|
|
49
|
+
// Thanks to spread props, these attributes are passed to CustomItem, even though
|
|
50
|
+
// it's not in the component's prop types.
|
|
51
|
+
// @ts-expect-error
|
|
52
|
+
,
|
|
53
|
+
target: target,
|
|
54
|
+
rel: rel
|
|
55
|
+
// DSP-13312 TODO: remove spread props in future major release
|
|
56
|
+
}, rest), children);
|
|
48
57
|
} else if (href) {
|
|
49
|
-
return /*#__PURE__*/React.createElement(LinkItem, {
|
|
58
|
+
return /*#__PURE__*/React.createElement(LinkItem, _extends({
|
|
50
59
|
description: description,
|
|
51
60
|
href: href,
|
|
52
61
|
iconAfter: elemAfter,
|
|
@@ -61,9 +70,10 @@ const DropdownMenuItem = /*#__PURE__*/forwardRef(({
|
|
|
61
70
|
shouldTitleWrap: shouldTitleWrap,
|
|
62
71
|
target: target,
|
|
63
72
|
testId: testId
|
|
64
|
-
|
|
73
|
+
// DSP-13312 TODO: remove spread props in future major release
|
|
74
|
+
}, rest), children);
|
|
65
75
|
} else {
|
|
66
|
-
return /*#__PURE__*/React.createElement(ButtonItem, {
|
|
76
|
+
return /*#__PURE__*/React.createElement(ButtonItem, _extends({
|
|
67
77
|
description: description,
|
|
68
78
|
iconAfter: elemAfter,
|
|
69
79
|
iconBefore: elemBefore,
|
|
@@ -75,7 +85,14 @@ const DropdownMenuItem = /*#__PURE__*/forwardRef(({
|
|
|
75
85
|
shouldDescriptionWrap: shouldDescriptionWrap,
|
|
76
86
|
shouldTitleWrap: shouldTitleWrap,
|
|
77
87
|
testId: testId
|
|
78
|
-
|
|
88
|
+
// Thanks to spread props, these attributes are passed to CustomItem, even though
|
|
89
|
+
// it's not in the component's prop types.
|
|
90
|
+
// @ts-expect-error
|
|
91
|
+
,
|
|
92
|
+
target: target,
|
|
93
|
+
rel: rel
|
|
94
|
+
// DSP-13312 TODO: remove spread props in future major release
|
|
95
|
+
}, rest), children);
|
|
79
96
|
}
|
|
80
97
|
});
|
|
81
98
|
export default DropdownMenuItem;
|
|
@@ -159,13 +159,16 @@ const DropdownMenu = ({
|
|
|
159
159
|
ref,
|
|
160
160
|
'aria-controls': ariaControls,
|
|
161
161
|
'aria-expanded': ariaExpanded,
|
|
162
|
-
'aria-haspopup': ariaHasPopup
|
|
162
|
+
'aria-haspopup': ariaHasPopup,
|
|
163
|
+
// DSP-13312 TODO: remove spread props in future major release
|
|
164
|
+
...rest
|
|
163
165
|
}) => {
|
|
164
166
|
if (typeof trigger === 'function') {
|
|
165
167
|
return trigger({
|
|
166
168
|
'aria-controls': ariaControls,
|
|
167
169
|
'aria-expanded': ariaExpanded,
|
|
168
170
|
'aria-haspopup': ariaHasPopup,
|
|
171
|
+
...rest,
|
|
169
172
|
...bindFocus,
|
|
170
173
|
triggerRef: mergeRefs([ref, itemRef]),
|
|
171
174
|
isSelected: isLocalOpen,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React, { createContext, useContext, useState } from 'react';
|
|
2
3
|
import noop from '@atlaskit/ds-lib/noop';
|
|
3
4
|
import Section from '@atlaskit/menu/section';
|
|
@@ -27,7 +28,9 @@ const DropdownItemRadioGroup = ({
|
|
|
27
28
|
isScrollable,
|
|
28
29
|
overrides,
|
|
29
30
|
testId,
|
|
30
|
-
title
|
|
31
|
+
title,
|
|
32
|
+
// DSP-13312 TODO: remove spread props in future major release
|
|
33
|
+
...rest
|
|
31
34
|
}) => {
|
|
32
35
|
const {
|
|
33
36
|
setGroupState,
|
|
@@ -53,7 +56,7 @@ const DropdownItemRadioGroup = ({
|
|
|
53
56
|
radioGroupState,
|
|
54
57
|
selectRadioItem
|
|
55
58
|
}
|
|
56
|
-
}, /*#__PURE__*/React.createElement(Section, {
|
|
59
|
+
}, /*#__PURE__*/React.createElement(Section, _extends({
|
|
57
60
|
hasSeparator: hasSeparator,
|
|
58
61
|
id: id,
|
|
59
62
|
isList: isList,
|
|
@@ -63,6 +66,7 @@ const DropdownItemRadioGroup = ({
|
|
|
63
66
|
overrides: overrides,
|
|
64
67
|
testId: testId,
|
|
65
68
|
title: title
|
|
66
|
-
|
|
69
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
70
|
+
}, rest), children));
|
|
67
71
|
};
|
|
68
72
|
export default DropdownItemRadioGroup;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React, { useCallback } from 'react';
|
|
2
3
|
import noop from '@atlaskit/ds-lib/noop';
|
|
3
4
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu';
|
|
@@ -26,7 +27,9 @@ const DropdownItemRadio = ({
|
|
|
26
27
|
isSelected,
|
|
27
28
|
onClick: providedOnClick = noop,
|
|
28
29
|
shouldDescriptionWrap = true,
|
|
29
|
-
shouldTitleWrap = true
|
|
30
|
+
shouldTitleWrap = true,
|
|
31
|
+
// DSP-13312 TODO: remove spread props in future major release
|
|
32
|
+
...rest
|
|
30
33
|
}) => {
|
|
31
34
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
32
35
|
// eslint-disable-next-line no-console
|
|
@@ -44,9 +47,8 @@ const DropdownItemRadio = ({
|
|
|
44
47
|
const itemRef = useRegisterItemWithFocusManager();
|
|
45
48
|
return /*#__PURE__*/React.createElement(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
46
49
|
value: "none"
|
|
47
|
-
}, /*#__PURE__*/React.createElement(ButtonItem, {
|
|
50
|
+
}, /*#__PURE__*/React.createElement(ButtonItem, _extends({
|
|
48
51
|
"aria-checked": selected,
|
|
49
|
-
children: children,
|
|
50
52
|
description: description,
|
|
51
53
|
iconBefore: /*#__PURE__*/React.createElement(RadioIcon, {
|
|
52
54
|
checked: selected
|
|
@@ -60,6 +62,12 @@ const DropdownItemRadio = ({
|
|
|
60
62
|
shouldDescriptionWrap: shouldDescriptionWrap,
|
|
61
63
|
shouldTitleWrap: shouldTitleWrap,
|
|
62
64
|
testId: testId
|
|
63
|
-
|
|
65
|
+
// Thanks to spread props, this attribute are passed to ButtonItem, even though
|
|
66
|
+
// it's not in the component's prop types.
|
|
67
|
+
// @ts-expect-error
|
|
68
|
+
,
|
|
69
|
+
title: title
|
|
70
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
71
|
+
}, rest), children));
|
|
64
72
|
};
|
|
65
73
|
export default DropdownItemRadio;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["children", "hasSeparator", "id", "isList", "isScrollable", "overrides", "testId", "title"];
|
|
1
4
|
import React from 'react';
|
|
2
5
|
import Section from '@atlaskit/menu/section';
|
|
3
6
|
import { CheckboxGroupContext } from '../internal/context/checkbox-group-context';
|
|
@@ -15,10 +18,11 @@ var DropdownItemCheckboxGroup = function DropdownItemCheckboxGroup(_ref) {
|
|
|
15
18
|
isScrollable = _ref.isScrollable,
|
|
16
19
|
overrides = _ref.overrides,
|
|
17
20
|
testId = _ref.testId,
|
|
18
|
-
title = _ref.title
|
|
21
|
+
title = _ref.title,
|
|
22
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
23
|
return /*#__PURE__*/React.createElement(CheckboxGroupContext.Provider, {
|
|
20
24
|
value: id
|
|
21
|
-
}, /*#__PURE__*/React.createElement(Section, {
|
|
25
|
+
}, /*#__PURE__*/React.createElement(Section, _extends({
|
|
22
26
|
hasSeparator: hasSeparator,
|
|
23
27
|
id: id,
|
|
24
28
|
isList: isList,
|
|
@@ -28,6 +32,7 @@ var DropdownItemCheckboxGroup = function DropdownItemCheckboxGroup(_ref) {
|
|
|
28
32
|
overrides: overrides,
|
|
29
33
|
testId: testId,
|
|
30
34
|
title: title
|
|
31
|
-
|
|
35
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
36
|
+
}, rest), children));
|
|
32
37
|
};
|
|
33
38
|
export default DropdownItemCheckboxGroup;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["children", "defaultSelected", "description", "id", "isDisabled", "isSelected", "onClick", "shouldDescriptionWrap", "shouldTitleWrap", "testId"];
|
|
2
5
|
import React, { useCallback } from 'react';
|
|
3
6
|
import noop from '@atlaskit/ds-lib/noop';
|
|
4
7
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu';
|
|
@@ -28,7 +31,8 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(_ref) {
|
|
|
28
31
|
shouldDescriptionWrap = _ref$shouldDescriptio === void 0 ? true : _ref$shouldDescriptio,
|
|
29
32
|
_ref$shouldTitleWrap = _ref.shouldTitleWrap,
|
|
30
33
|
shouldTitleWrap = _ref$shouldTitleWrap === void 0 ? true : _ref$shouldTitleWrap,
|
|
31
|
-
testId = _ref.testId
|
|
34
|
+
testId = _ref.testId,
|
|
35
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
36
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
33
37
|
// eslint-disable-next-line no-console
|
|
34
38
|
console.warn("[DropdownItemCheckbox] You've used both `defaultSelected` and `isSelected` props. This is dangerous and can lead to unexpected results. Use one or the other depending if you want to control the components state yourself.");
|
|
@@ -50,7 +54,7 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(_ref) {
|
|
|
50
54
|
var itemRef = useRegisterItemWithFocusManager();
|
|
51
55
|
return /*#__PURE__*/React.createElement(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
52
56
|
value: "none"
|
|
53
|
-
}, /*#__PURE__*/React.createElement(ButtonItem, {
|
|
57
|
+
}, /*#__PURE__*/React.createElement(ButtonItem, _extends({
|
|
54
58
|
"aria-checked": selected,
|
|
55
59
|
description: description,
|
|
56
60
|
iconBefore: /*#__PURE__*/React.createElement(CheckboxIcon, {
|
|
@@ -65,6 +69,7 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(_ref) {
|
|
|
65
69
|
shouldDescriptionWrap: shouldDescriptionWrap,
|
|
66
70
|
shouldTitleWrap: shouldTitleWrap,
|
|
67
71
|
testId: testId
|
|
68
|
-
|
|
72
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
73
|
+
}, rest), children));
|
|
69
74
|
};
|
|
70
75
|
export default DropdownItemCheckbox;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
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"];
|
|
1
4
|
import React, { forwardRef } from 'react';
|
|
2
5
|
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
3
6
|
import ButtonItem from '@atlaskit/menu/button-item';
|
|
@@ -29,10 +32,11 @@ var DropdownMenuItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
29
32
|
_ref$shouldTitleWrap = _ref.shouldTitleWrap,
|
|
30
33
|
shouldTitleWrap = _ref$shouldTitleWrap === void 0 ? true : _ref$shouldTitleWrap,
|
|
31
34
|
target = _ref.target,
|
|
32
|
-
testId = _ref.testId
|
|
35
|
+
testId = _ref.testId,
|
|
36
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
37
|
var itemRef = useRegisterItemWithFocusManager();
|
|
34
38
|
if (component) {
|
|
35
|
-
return /*#__PURE__*/React.createElement(CustomItem, {
|
|
39
|
+
return /*#__PURE__*/React.createElement(CustomItem, _extends({
|
|
36
40
|
component: component,
|
|
37
41
|
description: description,
|
|
38
42
|
iconAfter: elemAfter,
|
|
@@ -45,9 +49,16 @@ var DropdownMenuItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
45
49
|
shouldTitleWrap: shouldTitleWrap,
|
|
46
50
|
testId: testId,
|
|
47
51
|
href: href
|
|
48
|
-
|
|
52
|
+
// Thanks to spread props, these attributes are passed to CustomItem, even though
|
|
53
|
+
// it's not in the component's prop types.
|
|
54
|
+
// @ts-expect-error
|
|
55
|
+
,
|
|
56
|
+
target: target,
|
|
57
|
+
rel: rel
|
|
58
|
+
// DSP-13312 TODO: remove spread props in future major release
|
|
59
|
+
}, rest), children);
|
|
49
60
|
} else if (href) {
|
|
50
|
-
return /*#__PURE__*/React.createElement(LinkItem, {
|
|
61
|
+
return /*#__PURE__*/React.createElement(LinkItem, _extends({
|
|
51
62
|
description: description,
|
|
52
63
|
href: href,
|
|
53
64
|
iconAfter: elemAfter,
|
|
@@ -62,9 +73,10 @@ var DropdownMenuItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
62
73
|
shouldTitleWrap: shouldTitleWrap,
|
|
63
74
|
target: target,
|
|
64
75
|
testId: testId
|
|
65
|
-
|
|
76
|
+
// DSP-13312 TODO: remove spread props in future major release
|
|
77
|
+
}, rest), children);
|
|
66
78
|
} else {
|
|
67
|
-
return /*#__PURE__*/React.createElement(ButtonItem, {
|
|
79
|
+
return /*#__PURE__*/React.createElement(ButtonItem, _extends({
|
|
68
80
|
description: description,
|
|
69
81
|
iconAfter: elemAfter,
|
|
70
82
|
iconBefore: elemBefore,
|
|
@@ -76,7 +88,14 @@ var DropdownMenuItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
76
88
|
shouldDescriptionWrap: shouldDescriptionWrap,
|
|
77
89
|
shouldTitleWrap: shouldTitleWrap,
|
|
78
90
|
testId: testId
|
|
79
|
-
|
|
91
|
+
// Thanks to spread props, these attributes are passed to CustomItem, even though
|
|
92
|
+
// it's not in the component's prop types.
|
|
93
|
+
// @ts-expect-error
|
|
94
|
+
,
|
|
95
|
+
target: target,
|
|
96
|
+
rel: rel
|
|
97
|
+
// DSP-13312 TODO: remove spread props in future major release
|
|
98
|
+
}, rest), children);
|
|
80
99
|
}
|
|
81
100
|
});
|
|
82
101
|
export default DropdownMenuItem;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
|
+
var _excluded = ["ref", "aria-controls", "aria-expanded", "aria-haspopup"];
|
|
4
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
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; }
|
|
6
8
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
@@ -177,13 +179,14 @@ var DropdownMenu = function DropdownMenu(_ref) {
|
|
|
177
179
|
var ref = _ref2.ref,
|
|
178
180
|
ariaControls = _ref2['aria-controls'],
|
|
179
181
|
ariaExpanded = _ref2['aria-expanded'],
|
|
180
|
-
ariaHasPopup = _ref2['aria-haspopup']
|
|
182
|
+
ariaHasPopup = _ref2['aria-haspopup'],
|
|
183
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
181
184
|
if (typeof _trigger === 'function') {
|
|
182
|
-
return _trigger(_objectSpread(_objectSpread({
|
|
185
|
+
return _trigger(_objectSpread(_objectSpread(_objectSpread({
|
|
183
186
|
'aria-controls': ariaControls,
|
|
184
187
|
'aria-expanded': ariaExpanded,
|
|
185
188
|
'aria-haspopup': ariaHasPopup
|
|
186
|
-
}, bindFocus), {}, {
|
|
189
|
+
}, rest), bindFocus), {}, {
|
|
187
190
|
triggerRef: mergeRefs([ref, itemRef]),
|
|
188
191
|
isSelected: isLocalOpen,
|
|
189
192
|
onClick: handleTriggerClicked,
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
+
var _excluded = ["children", "hasSeparator", "id", "isList", "isScrollable", "overrides", "testId", "title"];
|
|
3
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
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; }
|
|
5
8
|
import React, { createContext, useContext, useState } from 'react';
|
|
@@ -31,7 +34,8 @@ var DropdownItemRadioGroup = function DropdownItemRadioGroup(_ref) {
|
|
|
31
34
|
isScrollable = _ref.isScrollable,
|
|
32
35
|
overrides = _ref.overrides,
|
|
33
36
|
testId = _ref.testId,
|
|
34
|
-
title = _ref.title
|
|
37
|
+
title = _ref.title,
|
|
38
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
35
39
|
var _useContext = useContext(SelectionStoreContext),
|
|
36
40
|
setGroupState = _useContext.setGroupState,
|
|
37
41
|
getGroupState = _useContext.getGroupState;
|
|
@@ -57,7 +61,7 @@ var DropdownItemRadioGroup = function DropdownItemRadioGroup(_ref) {
|
|
|
57
61
|
radioGroupState: radioGroupState,
|
|
58
62
|
selectRadioItem: selectRadioItem
|
|
59
63
|
}
|
|
60
|
-
}, /*#__PURE__*/React.createElement(Section, {
|
|
64
|
+
}, /*#__PURE__*/React.createElement(Section, _extends({
|
|
61
65
|
hasSeparator: hasSeparator,
|
|
62
66
|
id: id,
|
|
63
67
|
isList: isList,
|
|
@@ -67,6 +71,7 @@ var DropdownItemRadioGroup = function DropdownItemRadioGroup(_ref) {
|
|
|
67
71
|
overrides: overrides,
|
|
68
72
|
testId: testId,
|
|
69
73
|
title: title
|
|
70
|
-
|
|
74
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
75
|
+
}, rest), children));
|
|
71
76
|
};
|
|
72
77
|
export default DropdownItemRadioGroup;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["children", "defaultSelected", "testId", "id", "title", "description", "isDisabled", "isSelected", "onClick", "shouldDescriptionWrap", "shouldTitleWrap"];
|
|
2
5
|
import React, { useCallback } from 'react';
|
|
3
6
|
import noop from '@atlaskit/ds-lib/noop';
|
|
4
7
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE } from '@atlaskit/menu';
|
|
@@ -30,7 +33,8 @@ var DropdownItemRadio = function DropdownItemRadio(_ref) {
|
|
|
30
33
|
_ref$shouldDescriptio = _ref.shouldDescriptionWrap,
|
|
31
34
|
shouldDescriptionWrap = _ref$shouldDescriptio === void 0 ? true : _ref$shouldDescriptio,
|
|
32
35
|
_ref$shouldTitleWrap = _ref.shouldTitleWrap,
|
|
33
|
-
shouldTitleWrap = _ref$shouldTitleWrap === void 0 ? true : _ref$shouldTitleWrap
|
|
36
|
+
shouldTitleWrap = _ref$shouldTitleWrap === void 0 ? true : _ref$shouldTitleWrap,
|
|
37
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
34
38
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
35
39
|
// eslint-disable-next-line no-console
|
|
36
40
|
console.warn("[DropdownItemRadio] You've used both `defaultSelected` and `isSelected` props. This is dangerous and can lead to unexpected results. Use one or the other depending if you want to control the components state yourself.");
|
|
@@ -52,9 +56,8 @@ var DropdownItemRadio = function DropdownItemRadio(_ref) {
|
|
|
52
56
|
var itemRef = useRegisterItemWithFocusManager();
|
|
53
57
|
return /*#__PURE__*/React.createElement(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
54
58
|
value: "none"
|
|
55
|
-
}, /*#__PURE__*/React.createElement(ButtonItem, {
|
|
59
|
+
}, /*#__PURE__*/React.createElement(ButtonItem, _extends({
|
|
56
60
|
"aria-checked": selected,
|
|
57
|
-
children: children,
|
|
58
61
|
description: description,
|
|
59
62
|
iconBefore: /*#__PURE__*/React.createElement(RadioIcon, {
|
|
60
63
|
checked: selected
|
|
@@ -68,6 +71,12 @@ var DropdownItemRadio = function DropdownItemRadio(_ref) {
|
|
|
68
71
|
shouldDescriptionWrap: shouldDescriptionWrap,
|
|
69
72
|
shouldTitleWrap: shouldTitleWrap,
|
|
70
73
|
testId: testId
|
|
71
|
-
|
|
74
|
+
// Thanks to spread props, this attribute are passed to ButtonItem, even though
|
|
75
|
+
// it's not in the component's prop types.
|
|
76
|
+
// @ts-expect-error
|
|
77
|
+
,
|
|
78
|
+
title: title
|
|
79
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
80
|
+
}, rest), children));
|
|
72
81
|
};
|
|
73
82
|
export default DropdownItemRadio;
|
|
@@ -12,5 +12,5 @@ interface DropdownItemCheckboxGroupProps extends SectionProps {
|
|
|
12
12
|
* A wrapping element for dropdown menu checkbox items.
|
|
13
13
|
*
|
|
14
14
|
*/
|
|
15
|
-
declare const DropdownItemCheckboxGroup: ({ children, hasSeparator, id, isList, isScrollable, overrides, testId, title, }: DropdownItemCheckboxGroupProps) => JSX.Element;
|
|
15
|
+
declare const DropdownItemCheckboxGroup: ({ children, hasSeparator, id, isList, isScrollable, overrides, testId, title, ...rest }: DropdownItemCheckboxGroupProps) => JSX.Element;
|
|
16
16
|
export default DropdownItemCheckboxGroup;
|
|
@@ -9,5 +9,5 @@ import { 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, }: DropdownItemCheckboxProps) => JSX.Element;
|
|
12
|
+
declare const DropdownItemCheckbox: ({ children, defaultSelected, description, id, isDisabled, isSelected, onClick: providedOnClick, shouldDescriptionWrap, shouldTitleWrap, testId, ...rest }: DropdownItemCheckboxProps) => JSX.Element;
|
|
13
13
|
export default DropdownItemCheckbox;
|
|
@@ -21,5 +21,5 @@ export declare const RadioGroupContext: React.Context<RadioGroupContextProps>;
|
|
|
21
21
|
* across mount and unmounts.
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
|
-
declare const DropdownItemRadioGroup: ({ children, hasSeparator, id, isList, isScrollable, overrides, testId, title, }: DropdownItemRadioGroupProps) => JSX.Element;
|
|
24
|
+
declare const DropdownItemRadioGroup: ({ children, hasSeparator, id, isList, isScrollable, overrides, testId, title, ...rest }: DropdownItemRadioGroupProps) => JSX.Element;
|
|
25
25
|
export default DropdownItemRadioGroup;
|
|
@@ -9,5 +9,5 @@ import { 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, }: DropdownItemRadioProps) => JSX.Element;
|
|
12
|
+
declare const DropdownItemRadio: ({ children, defaultSelected, testId, id, title, description, isDisabled, isSelected, onClick: providedOnClick, shouldDescriptionWrap, shouldTitleWrap, ...rest }: DropdownItemRadioProps) => JSX.Element;
|
|
13
13
|
export default DropdownItemRadio;
|
|
@@ -12,5 +12,5 @@ interface DropdownItemCheckboxGroupProps extends SectionProps {
|
|
|
12
12
|
* A wrapping element for dropdown menu checkbox items.
|
|
13
13
|
*
|
|
14
14
|
*/
|
|
15
|
-
declare const DropdownItemCheckboxGroup: ({ children, hasSeparator, id, isList, isScrollable, overrides, testId, title, }: DropdownItemCheckboxGroupProps) => JSX.Element;
|
|
15
|
+
declare const DropdownItemCheckboxGroup: ({ children, hasSeparator, id, isList, isScrollable, overrides, testId, title, ...rest }: DropdownItemCheckboxGroupProps) => JSX.Element;
|
|
16
16
|
export default DropdownItemCheckboxGroup;
|
|
@@ -9,5 +9,5 @@ import { 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, }: DropdownItemCheckboxProps) => JSX.Element;
|
|
12
|
+
declare const DropdownItemCheckbox: ({ children, defaultSelected, description, id, isDisabled, isSelected, onClick: providedOnClick, shouldDescriptionWrap, shouldTitleWrap, testId, ...rest }: DropdownItemCheckboxProps) => JSX.Element;
|
|
13
13
|
export default DropdownItemCheckbox;
|
|
@@ -21,5 +21,5 @@ export declare const RadioGroupContext: React.Context<RadioGroupContextProps>;
|
|
|
21
21
|
* across mount and unmounts.
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
|
-
declare const DropdownItemRadioGroup: ({ children, hasSeparator, id, isList, isScrollable, overrides, testId, title, }: DropdownItemRadioGroupProps) => JSX.Element;
|
|
24
|
+
declare const DropdownItemRadioGroup: ({ children, hasSeparator, id, isList, isScrollable, overrides, testId, title, ...rest }: DropdownItemRadioGroupProps) => JSX.Element;
|
|
25
25
|
export default DropdownItemRadioGroup;
|
|
@@ -9,5 +9,5 @@ import { 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, }: DropdownItemRadioProps) => JSX.Element;
|
|
12
|
+
declare const DropdownItemRadio: ({ children, defaultSelected, testId, id, title, description, isDisabled, isSelected, onClick: providedOnClick, shouldDescriptionWrap, shouldTitleWrap, ...rest }: DropdownItemRadioProps) => JSX.Element;
|
|
13
13
|
export default DropdownItemRadio;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dropdown-menu",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.3",
|
|
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/"
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
29
29
|
"@atlaskit/icon": "^21.12.0",
|
|
30
30
|
"@atlaskit/layering": "^0.2.0",
|
|
31
|
-
"@atlaskit/menu": "^2.
|
|
31
|
+
"@atlaskit/menu": "^2.1.0",
|
|
32
32
|
"@atlaskit/platform-feature-flags": "^0.2.2",
|
|
33
33
|
"@atlaskit/popup": "^1.11.0",
|
|
34
34
|
"@atlaskit/primitives": "^1.6.0",
|
|
35
35
|
"@atlaskit/spinner": "^15.6.0",
|
|
36
36
|
"@atlaskit/theme": "^12.6.0",
|
|
37
|
-
"@atlaskit/tokens": "^1.
|
|
37
|
+
"@atlaskit/tokens": "^1.27.0",
|
|
38
38
|
"@babel/runtime": "^7.0.0",
|
|
39
39
|
"@emotion/react": "^11.7.1",
|
|
40
40
|
"bind-event-listener": "^2.1.1"
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"type": "boolean",
|
|
110
110
|
"referenceOnly": "true"
|
|
111
111
|
},
|
|
112
|
-
"platform.design-system-team.
|
|
112
|
+
"platform.design-system-team.layering_popup_1cnzt": {
|
|
113
113
|
"type": "boolean"
|
|
114
114
|
}
|
|
115
115
|
},
|
package/report.api.md
CHANGED
|
@@ -57,6 +57,7 @@ export const DropdownItemCheckbox: ({
|
|
|
57
57
|
shouldDescriptionWrap,
|
|
58
58
|
shouldTitleWrap,
|
|
59
59
|
testId,
|
|
60
|
+
...rest
|
|
60
61
|
}: DropdownItemCheckboxProps) => JSX.Element;
|
|
61
62
|
|
|
62
63
|
// @public
|
|
@@ -69,6 +70,7 @@ export const DropdownItemCheckboxGroup: ({
|
|
|
69
70
|
overrides,
|
|
70
71
|
testId,
|
|
71
72
|
title,
|
|
73
|
+
...rest
|
|
72
74
|
}: DropdownItemCheckboxGroupProps) => JSX.Element;
|
|
73
75
|
|
|
74
76
|
// @public (undocumented)
|
|
@@ -125,6 +127,7 @@ export const DropdownItemRadio: ({
|
|
|
125
127
|
onClick: providedOnClick,
|
|
126
128
|
shouldDescriptionWrap,
|
|
127
129
|
shouldTitleWrap,
|
|
130
|
+
...rest
|
|
128
131
|
}: DropdownItemRadioProps) => JSX.Element;
|
|
129
132
|
|
|
130
133
|
// @public
|
|
@@ -137,6 +140,7 @@ export const DropdownItemRadioGroup: ({
|
|
|
137
140
|
overrides,
|
|
138
141
|
testId,
|
|
139
142
|
title,
|
|
143
|
+
...rest
|
|
140
144
|
}: DropdownItemRadioGroupProps) => JSX.Element;
|
|
141
145
|
|
|
142
146
|
// @public (undocumented)
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -31,10 +31,10 @@ export interface CustomTriggerProps<TriggerElement extends HTMLElement = HTMLEle
|
|
|
31
31
|
export const DropdownItem: React_2.ForwardRefExoticComponent<DropdownItemProps & React_2.RefAttributes<HTMLElement>>;
|
|
32
32
|
|
|
33
33
|
// @public
|
|
34
|
-
export const DropdownItemCheckbox: ({ children, defaultSelected, description, id, isDisabled, isSelected, onClick: providedOnClick, shouldDescriptionWrap, shouldTitleWrap, testId, }: DropdownItemCheckboxProps) => JSX.Element;
|
|
34
|
+
export const DropdownItemCheckbox: ({ children, defaultSelected, description, id, isDisabled, isSelected, onClick: providedOnClick, shouldDescriptionWrap, shouldTitleWrap, testId, ...rest }: DropdownItemCheckboxProps) => JSX.Element;
|
|
35
35
|
|
|
36
36
|
// @public
|
|
37
|
-
export const DropdownItemCheckboxGroup: ({ children, hasSeparator, id, isList, isScrollable, overrides, testId, title, }: DropdownItemCheckboxGroupProps) => JSX.Element;
|
|
37
|
+
export const DropdownItemCheckboxGroup: ({ children, hasSeparator, id, isList, isScrollable, overrides, testId, title, ...rest }: DropdownItemCheckboxGroupProps) => JSX.Element;
|
|
38
38
|
|
|
39
39
|
// @public (undocumented)
|
|
40
40
|
interface DropdownItemCheckboxGroupProps extends SectionProps {
|
|
@@ -78,10 +78,10 @@ export interface DropdownItemProps {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
// @public
|
|
81
|
-
export const DropdownItemRadio: ({ children, defaultSelected, testId, id, title, description, isDisabled, isSelected, onClick: providedOnClick, shouldDescriptionWrap, shouldTitleWrap, }: DropdownItemRadioProps) => JSX.Element;
|
|
81
|
+
export const DropdownItemRadio: ({ children, defaultSelected, testId, id, title, description, isDisabled, isSelected, onClick: providedOnClick, shouldDescriptionWrap, shouldTitleWrap, ...rest }: DropdownItemRadioProps) => JSX.Element;
|
|
82
82
|
|
|
83
83
|
// @public
|
|
84
|
-
export const DropdownItemRadioGroup: ({ children, hasSeparator, id, isList, isScrollable, overrides, testId, title, }: DropdownItemRadioGroupProps) => JSX.Element;
|
|
84
|
+
export const DropdownItemRadioGroup: ({ children, hasSeparator, id, isList, isScrollable, overrides, testId, title, ...rest }: DropdownItemRadioGroupProps) => JSX.Element;
|
|
85
85
|
|
|
86
86
|
// @public (undocumented)
|
|
87
87
|
interface DropdownItemRadioGroupProps extends SectionProps {
|