@atlaskit/dropdown-menu 11.5.11 → 11.6.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 +1 -1
- package/dist/cjs/dropdown-menu.js +2 -0
- package/dist/cjs/internal/utils/get-icon-colors.js +1 -1
- package/dist/cjs/radio/dropdown-item-radio.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/checkbox/dropdown-item-checkbox.js +1 -1
- package/dist/es2019/dropdown-menu.js +2 -0
- package/dist/es2019/internal/utils/get-icon-colors.js +1 -1
- package/dist/es2019/radio/dropdown-item-radio.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/checkbox/dropdown-item-checkbox.js +1 -1
- package/dist/esm/dropdown-menu.js +2 -0
- package/dist/esm/internal/utils/get-icon-colors.js +1 -1
- package/dist/esm/radio/dropdown-item-radio.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/internal/utils/get-icon-colors.d.ts +1 -1
- package/dist/types/types.d.ts +4 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/dropdown-menu
|
|
2
2
|
|
|
3
|
+
## 11.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`814e6ed4e14`](https://bitbucket.org/atlassian/atlassian-frontend/commits/814e6ed4e14) - [ux] Adds a new spacing prop on the `DropdownMenu` component to support information density.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 11.5.12
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`22b754d311f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/22b754d311f) - Updates usage of removed design token `utilities.UNSAFE_util.transparent` in favour of its replacement `utilities.UNSAFE.transparent`
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 11.5.11
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -40,7 +40,7 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(props) {
|
|
|
40
40
|
_props$shouldDescript = props.shouldDescriptionWrap,
|
|
41
41
|
shouldDescriptionWrap = _props$shouldDescript === void 0 ? true : _props$shouldDescript,
|
|
42
42
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
43
|
-
if (process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
43
|
+
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
44
44
|
// eslint-disable-next-line no-console
|
|
45
45
|
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.");
|
|
46
46
|
}
|
|
@@ -78,6 +78,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
78
78
|
_props$placement = props.placement,
|
|
79
79
|
placement = _props$placement === void 0 ? 'bottom-start' : _props$placement,
|
|
80
80
|
_trigger = props.trigger,
|
|
81
|
+
spacing = props.spacing,
|
|
81
82
|
_props$shouldFlip = props.shouldFlip,
|
|
82
83
|
shouldFlip = _props$shouldFlip === void 0 ? true : _props$shouldFlip,
|
|
83
84
|
_props$isLoading = props.isLoading,
|
|
@@ -201,6 +202,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
201
202
|
var setInitialFocusRef = _ref.setInitialFocusRef,
|
|
202
203
|
update = _ref.update;
|
|
203
204
|
return /*#__PURE__*/_react.default.createElement(_focusManager.default, null, /*#__PURE__*/_react.default.createElement(_menuWrapper.default, {
|
|
205
|
+
spacing: spacing,
|
|
204
206
|
maxHeight: MAX_HEIGHT,
|
|
205
207
|
maxWidth: 800,
|
|
206
208
|
onClose: handleOnClose,
|
|
@@ -14,7 +14,7 @@ var getIconColors = function getIconColors(isSelected) {
|
|
|
14
14
|
}
|
|
15
15
|
return {
|
|
16
16
|
primary: "var(--ds-background-neutral, ".concat(_colors.N40, ")"),
|
|
17
|
-
secondary: "var(--ds-
|
|
17
|
+
secondary: "var(--ds-UNSAFE-transparent, ".concat(_colors.N40, ")")
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
var _default = getIconColors;
|
|
@@ -40,7 +40,7 @@ var DropdownItemRadio = function DropdownItemRadio(props) {
|
|
|
40
40
|
_props$shouldDescript = props.shouldDescriptionWrap,
|
|
41
41
|
shouldDescriptionWrap = _props$shouldDescript === void 0 ? true : _props$shouldDescript,
|
|
42
42
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
43
|
-
if (process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
43
|
+
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
44
44
|
// eslint-disable-next-line no-console
|
|
45
45
|
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.");
|
|
46
46
|
}
|
package/dist/cjs/version.json
CHANGED
|
@@ -26,7 +26,7 @@ const DropdownItemCheckbox = props => {
|
|
|
26
26
|
shouldDescriptionWrap = true,
|
|
27
27
|
...rest
|
|
28
28
|
} = props;
|
|
29
|
-
if (process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
29
|
+
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
30
30
|
// eslint-disable-next-line no-console
|
|
31
31
|
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.");
|
|
32
32
|
}
|
|
@@ -60,6 +60,7 @@ const DropdownMenu = props => {
|
|
|
60
60
|
children,
|
|
61
61
|
placement = 'bottom-start',
|
|
62
62
|
trigger,
|
|
63
|
+
spacing,
|
|
63
64
|
shouldFlip = true,
|
|
64
65
|
isLoading = false,
|
|
65
66
|
autoFocus = false,
|
|
@@ -177,6 +178,7 @@ const DropdownMenu = props => {
|
|
|
177
178
|
setInitialFocusRef,
|
|
178
179
|
update
|
|
179
180
|
}) => /*#__PURE__*/React.createElement(FocusManager, null, /*#__PURE__*/React.createElement(MenuWrapper, {
|
|
181
|
+
spacing: spacing,
|
|
180
182
|
maxHeight: MAX_HEIGHT,
|
|
181
183
|
maxWidth: 800,
|
|
182
184
|
onClose: handleOnClose,
|
|
@@ -26,7 +26,7 @@ const DropdownItemRadio = props => {
|
|
|
26
26
|
shouldDescriptionWrap = true,
|
|
27
27
|
...rest
|
|
28
28
|
} = props;
|
|
29
|
-
if (process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
29
|
+
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
30
30
|
// eslint-disable-next-line no-console
|
|
31
31
|
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.");
|
|
32
32
|
}
|
package/dist/es2019/version.json
CHANGED
|
@@ -30,7 +30,7 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(props) {
|
|
|
30
30
|
_props$shouldDescript = props.shouldDescriptionWrap,
|
|
31
31
|
shouldDescriptionWrap = _props$shouldDescript === void 0 ? true : _props$shouldDescript,
|
|
32
32
|
rest = _objectWithoutProperties(props, _excluded);
|
|
33
|
-
if (process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
33
|
+
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
34
34
|
// eslint-disable-next-line no-console
|
|
35
35
|
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.");
|
|
36
36
|
}
|
|
@@ -68,6 +68,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
68
68
|
_props$placement = props.placement,
|
|
69
69
|
placement = _props$placement === void 0 ? 'bottom-start' : _props$placement,
|
|
70
70
|
_trigger = props.trigger,
|
|
71
|
+
spacing = props.spacing,
|
|
71
72
|
_props$shouldFlip = props.shouldFlip,
|
|
72
73
|
shouldFlip = _props$shouldFlip === void 0 ? true : _props$shouldFlip,
|
|
73
74
|
_props$isLoading = props.isLoading,
|
|
@@ -191,6 +192,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
191
192
|
var setInitialFocusRef = _ref.setInitialFocusRef,
|
|
192
193
|
update = _ref.update;
|
|
193
194
|
return /*#__PURE__*/React.createElement(FocusManager, null, /*#__PURE__*/React.createElement(MenuWrapper, {
|
|
195
|
+
spacing: spacing,
|
|
194
196
|
maxHeight: MAX_HEIGHT,
|
|
195
197
|
maxWidth: 800,
|
|
196
198
|
onClose: handleOnClose,
|
|
@@ -8,7 +8,7 @@ var getIconColors = function getIconColors(isSelected) {
|
|
|
8
8
|
}
|
|
9
9
|
return {
|
|
10
10
|
primary: "var(--ds-background-neutral, ".concat(N40, ")"),
|
|
11
|
-
secondary: "var(--ds-
|
|
11
|
+
secondary: "var(--ds-UNSAFE-transparent, ".concat(N40, ")")
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
export default getIconColors;
|
|
@@ -30,7 +30,7 @@ var DropdownItemRadio = function DropdownItemRadio(props) {
|
|
|
30
30
|
_props$shouldDescript = props.shouldDescriptionWrap,
|
|
31
31
|
shouldDescriptionWrap = _props$shouldDescript === void 0 ? true : _props$shouldDescript,
|
|
32
32
|
rest = _objectWithoutProperties(props, _excluded);
|
|
33
|
-
if (process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
33
|
+
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
|
|
34
34
|
// eslint-disable-next-line no-console
|
|
35
35
|
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.");
|
|
36
36
|
}
|
package/dist/esm/version.json
CHANGED
|
@@ -3,6 +3,6 @@ declare const getIconColors: (isSelected: boolean | undefined) => {
|
|
|
3
3
|
secondary: "var(--ds-icon-inverse)";
|
|
4
4
|
} | {
|
|
5
5
|
primary: "var(--ds-background-neutral)";
|
|
6
|
-
secondary: "var(--ds-
|
|
6
|
+
secondary: "var(--ds-UNSAFE-transparent)";
|
|
7
7
|
};
|
|
8
8
|
export default getIconColors;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -92,6 +92,10 @@ export interface DropdownMenuProps<TriggerElement extends HTMLElement = HTMLElem
|
|
|
92
92
|
* fit in the viewport.
|
|
93
93
|
*/
|
|
94
94
|
shouldFlip?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Controls the spacing density of the menu.
|
|
97
|
+
*/
|
|
98
|
+
spacing?: Extract<MenuGroupProps['spacing'], 'cozy' | 'compact'>;
|
|
95
99
|
/**
|
|
96
100
|
* Content which will trigger the dropdown menu to open and close. Use with `triggerType`
|
|
97
101
|
* to easily get a button trigger.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dropdown-menu",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.6.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/"
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"@atlaskit/codemod-utils": "^4.1.0",
|
|
29
29
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
30
30
|
"@atlaskit/icon": "^21.11.0",
|
|
31
|
-
"@atlaskit/menu": "^1.
|
|
31
|
+
"@atlaskit/menu": "^1.5.0",
|
|
32
32
|
"@atlaskit/popup": "^1.5.0",
|
|
33
33
|
"@atlaskit/spinner": "^15.3.0",
|
|
34
34
|
"@atlaskit/theme": "^12.2.0",
|
|
35
|
-
"@atlaskit/tokens": "^
|
|
35
|
+
"@atlaskit/tokens": "^1.2.0",
|
|
36
36
|
"@atlaskit/visually-hidden": "^1.1.0",
|
|
37
37
|
"@babel/runtime": "^7.0.0",
|
|
38
38
|
"@emotion/react": "^11.7.1",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/docs": "*",
|
|
48
48
|
"@atlaskit/ds-explorations": "^2.0.0",
|
|
49
49
|
"@atlaskit/heading": "^1.1.0",
|
|
50
|
-
"@atlaskit/lozenge": "11.3.
|
|
50
|
+
"@atlaskit/lozenge": "11.3.7",
|
|
51
51
|
"@atlaskit/modal-dialog": "^12.4.0",
|
|
52
52
|
"@atlaskit/section-message": "^6.3.0",
|
|
53
53
|
"@atlaskit/ssr": "*",
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
],
|
|
83
83
|
"design-system": "v1",
|
|
84
84
|
"design-tokens": [
|
|
85
|
+
"color",
|
|
85
86
|
"spacing"
|
|
86
87
|
],
|
|
87
88
|
"styling": [
|
|
@@ -89,8 +90,7 @@
|
|
|
89
90
|
"emotion"
|
|
90
91
|
],
|
|
91
92
|
"analytics": "analytics-next",
|
|
92
|
-
"deprecation": "no-deprecated-imports"
|
|
93
|
-
"theming": "tokens"
|
|
93
|
+
"deprecation": "no-deprecated-imports"
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
"af:exports": {
|