@atlaskit/menu 1.10.0 → 1.11.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 +12 -0
- package/dist/cjs/menu-section/menu-group.js +15 -10
- package/dist/es2019/menu-section/menu-group.js +14 -9
- package/dist/esm/menu-section/menu-group.js +16 -11
- package/dist/types/menu-section/menu-group.d.ts +1 -1
- package/dist/types/types.d.ts +4 -0
- package/dist/types-ts4.5/menu-section/menu-group.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +4 -0
- package/package.json +4 -5
- package/report.api.md +2 -0
- package/tmp/api-report-tmp.d.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/menu
|
|
2
2
|
|
|
3
|
+
## 1.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`5545e5a6ab2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5545e5a6ab2) - [ux] Adds `isLoading` prop to menu group for better context for assistive technology users.
|
|
8
|
+
|
|
9
|
+
## 1.10.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`a962b1b24eb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a962b1b24eb) - The internal composition of this component has changed. There is no expected change in behavior.
|
|
14
|
+
|
|
3
15
|
## 1.10.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -8,11 +8,17 @@ exports.default = void 0;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _react = require("@emotion/react");
|
|
11
|
-
var _dsExplorations = require("@atlaskit/ds-explorations");
|
|
12
11
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
var _menuContext = require("../internal/components/menu-context");
|
|
14
|
-
var _excluded = ["maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role", "spacing", "className"];
|
|
13
|
+
var _excluded = ["isLoading", "maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role", "spacing", "className"];
|
|
15
14
|
/** @jsx jsx */
|
|
15
|
+
var baseStyles = (0, _react.css)({
|
|
16
|
+
display: 'flex',
|
|
17
|
+
position: 'static',
|
|
18
|
+
flexDirection: 'column',
|
|
19
|
+
overflow: 'auto'
|
|
20
|
+
});
|
|
21
|
+
|
|
16
22
|
/**
|
|
17
23
|
* __Menu group__
|
|
18
24
|
*
|
|
@@ -22,7 +28,8 @@ var _excluded = ["maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "ro
|
|
|
22
28
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
23
29
|
*/
|
|
24
30
|
var MenuGroup = function MenuGroup(_ref) {
|
|
25
|
-
var
|
|
31
|
+
var isLoading = _ref.isLoading,
|
|
32
|
+
maxWidth = _ref.maxWidth,
|
|
26
33
|
minWidth = _ref.minWidth,
|
|
27
34
|
minHeight = _ref.minHeight,
|
|
28
35
|
maxHeight = _ref.maxHeight,
|
|
@@ -36,19 +43,17 @@ var MenuGroup = function MenuGroup(_ref) {
|
|
|
36
43
|
value: spacing
|
|
37
44
|
}, (0, _react.jsx)(_menuContext.SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
38
45
|
value: "border"
|
|
39
|
-
}, (0, _react.jsx)(
|
|
40
|
-
|
|
46
|
+
}, (0, _react.jsx)("div", (0, _extends2.default)({
|
|
47
|
+
"aria-busy": isLoading,
|
|
48
|
+
style: {
|
|
41
49
|
minWidth: minWidth,
|
|
42
50
|
maxWidth: maxWidth,
|
|
43
51
|
minHeight: minHeight,
|
|
44
52
|
maxHeight: maxHeight
|
|
45
53
|
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
overflow: "auto",
|
|
49
|
-
testId: testId,
|
|
54
|
+
css: baseStyles,
|
|
55
|
+
"data-testid": testId,
|
|
50
56
|
role: role,
|
|
51
|
-
position: "static",
|
|
52
57
|
className: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : UNSAFE_className
|
|
53
58
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
54
59
|
}, rest))));
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
|
-
import { UNSAFE_Box as Box } from '@atlaskit/ds-explorations';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
5
4
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE, SpacingContext } from '../internal/components/menu-context';
|
|
6
|
+
const baseStyles = css({
|
|
7
|
+
display: 'flex',
|
|
8
|
+
position: 'static',
|
|
9
|
+
flexDirection: 'column',
|
|
10
|
+
overflow: 'auto'
|
|
11
|
+
});
|
|
12
|
+
|
|
7
13
|
/**
|
|
8
14
|
* __Menu group__
|
|
9
15
|
*
|
|
@@ -13,6 +19,7 @@ import { SELECTION_STYLE_CONTEXT_DO_NOT_USE, SpacingContext } from '../internal/
|
|
|
13
19
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
14
20
|
*/
|
|
15
21
|
const MenuGroup = ({
|
|
22
|
+
isLoading,
|
|
16
23
|
maxWidth,
|
|
17
24
|
minWidth,
|
|
18
25
|
minHeight,
|
|
@@ -30,19 +37,17 @@ const MenuGroup = ({
|
|
|
30
37
|
value: spacing
|
|
31
38
|
}, jsx(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
32
39
|
value: "border"
|
|
33
|
-
}, jsx(
|
|
34
|
-
|
|
40
|
+
}, jsx("div", _extends({
|
|
41
|
+
"aria-busy": isLoading,
|
|
42
|
+
style: {
|
|
35
43
|
minWidth,
|
|
36
44
|
maxWidth,
|
|
37
45
|
minHeight,
|
|
38
46
|
maxHeight
|
|
39
47
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
overflow: "auto",
|
|
43
|
-
testId: testId,
|
|
48
|
+
css: baseStyles,
|
|
49
|
+
"data-testid": testId,
|
|
44
50
|
role: role,
|
|
45
|
-
position: "static",
|
|
46
51
|
className: getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : UNSAFE_className
|
|
47
52
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
48
53
|
}, rest))));
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role", "spacing", "className"];
|
|
3
|
+
var _excluded = ["isLoading", "maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role", "spacing", "className"];
|
|
4
4
|
/** @jsx jsx */
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
|
-
import { UNSAFE_Box as Box } from '@atlaskit/ds-explorations';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
7
6
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE, SpacingContext } from '../internal/components/menu-context';
|
|
8
|
+
var baseStyles = css({
|
|
9
|
+
display: 'flex',
|
|
10
|
+
position: 'static',
|
|
11
|
+
flexDirection: 'column',
|
|
12
|
+
overflow: 'auto'
|
|
13
|
+
});
|
|
14
|
+
|
|
9
15
|
/**
|
|
10
16
|
* __Menu group__
|
|
11
17
|
*
|
|
@@ -15,7 +21,8 @@ import { SELECTION_STYLE_CONTEXT_DO_NOT_USE, SpacingContext } from '../internal/
|
|
|
15
21
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
16
22
|
*/
|
|
17
23
|
var MenuGroup = function MenuGroup(_ref) {
|
|
18
|
-
var
|
|
24
|
+
var isLoading = _ref.isLoading,
|
|
25
|
+
maxWidth = _ref.maxWidth,
|
|
19
26
|
minWidth = _ref.minWidth,
|
|
20
27
|
minHeight = _ref.minHeight,
|
|
21
28
|
maxHeight = _ref.maxHeight,
|
|
@@ -29,19 +36,17 @@ var MenuGroup = function MenuGroup(_ref) {
|
|
|
29
36
|
value: spacing
|
|
30
37
|
}, jsx(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
31
38
|
value: "border"
|
|
32
|
-
}, jsx(
|
|
33
|
-
|
|
39
|
+
}, jsx("div", _extends({
|
|
40
|
+
"aria-busy": isLoading,
|
|
41
|
+
style: {
|
|
34
42
|
minWidth: minWidth,
|
|
35
43
|
maxWidth: maxWidth,
|
|
36
44
|
minHeight: minHeight,
|
|
37
45
|
maxHeight: maxHeight
|
|
38
46
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
overflow: "auto",
|
|
42
|
-
testId: testId,
|
|
47
|
+
css: baseStyles,
|
|
48
|
+
"data-testid": testId,
|
|
43
49
|
role: role,
|
|
44
|
-
position: "static",
|
|
45
50
|
className: getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : UNSAFE_className
|
|
46
51
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
47
52
|
}, rest))));
|
|
@@ -9,5 +9,5 @@ import type { MenuGroupProps } from '../types';
|
|
|
9
9
|
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/menu-group)
|
|
10
10
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
11
11
|
*/
|
|
12
|
-
declare const MenuGroup: ({ maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, className: UNSAFE_className, ...rest }: MenuGroupProps) => jsx.JSX.Element;
|
|
12
|
+
declare const MenuGroup: ({ isLoading, maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, className: UNSAFE_className, ...rest }: MenuGroupProps) => jsx.JSX.Element;
|
|
13
13
|
export default MenuGroup;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -46,6 +46,10 @@ export interface MenuGroupProps extends MenuGroupSizing {
|
|
|
46
46
|
* should generally be `Section` components.
|
|
47
47
|
*/
|
|
48
48
|
children: React.ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* Used for telling assistive technologies that the menu group is loading.
|
|
51
|
+
*/
|
|
52
|
+
isLoading?: boolean;
|
|
49
53
|
/**
|
|
50
54
|
* Configure the density of the MenuGroup content.
|
|
51
55
|
*/
|
|
@@ -9,5 +9,5 @@ import type { MenuGroupProps } from '../types';
|
|
|
9
9
|
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/menu-group)
|
|
10
10
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
11
11
|
*/
|
|
12
|
-
declare const MenuGroup: ({ maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, className: UNSAFE_className, ...rest }: MenuGroupProps) => jsx.JSX.Element;
|
|
12
|
+
declare const MenuGroup: ({ isLoading, maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, className: UNSAFE_className, ...rest }: MenuGroupProps) => jsx.JSX.Element;
|
|
13
13
|
export default MenuGroup;
|
|
@@ -46,6 +46,10 @@ export interface MenuGroupProps extends MenuGroupSizing {
|
|
|
46
46
|
* should generally be `Section` components.
|
|
47
47
|
*/
|
|
48
48
|
children: React.ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* Used for telling assistive technologies that the menu group is loading.
|
|
51
|
+
*/
|
|
52
|
+
isLoading?: boolean;
|
|
49
53
|
/**
|
|
50
54
|
* Configure the density of the MenuGroup content.
|
|
51
55
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/menu",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "A collection of composable menu components that can be used anywhere.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,13 +26,12 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@atlaskit/ds-explorations": "^2.2.0",
|
|
30
29
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
31
30
|
"@atlaskit/focus-ring": "^1.3.0",
|
|
32
31
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
33
|
-
"@atlaskit/primitives": "^1.
|
|
34
|
-
"@atlaskit/theme": "^12.
|
|
35
|
-
"@atlaskit/tokens": "^1.
|
|
32
|
+
"@atlaskit/primitives": "^1.6.0",
|
|
33
|
+
"@atlaskit/theme": "^12.6.0",
|
|
34
|
+
"@atlaskit/tokens": "^1.25.0",
|
|
36
35
|
"@babel/runtime": "^7.0.0",
|
|
37
36
|
"@emotion/react": "^11.7.1"
|
|
38
37
|
},
|
package/report.api.md
CHANGED
|
@@ -142,6 +142,7 @@ export interface LinkItemProps extends BaseItemProps {
|
|
|
142
142
|
|
|
143
143
|
// @public
|
|
144
144
|
export const MenuGroup: ({
|
|
145
|
+
isLoading,
|
|
145
146
|
maxWidth,
|
|
146
147
|
minWidth,
|
|
147
148
|
minHeight,
|
|
@@ -156,6 +157,7 @@ export const MenuGroup: ({
|
|
|
156
157
|
// @public (undocumented)
|
|
157
158
|
export interface MenuGroupProps extends MenuGroupSizing {
|
|
158
159
|
children: React.ReactNode;
|
|
160
|
+
isLoading?: boolean;
|
|
159
161
|
onClick?: (event: React.KeyboardEvent | React.MouseEvent) => void;
|
|
160
162
|
role?: string;
|
|
161
163
|
spacing?: SpacingMode;
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -113,11 +113,12 @@ export interface LinkItemProps extends BaseItemProps {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
// @public
|
|
116
|
-
export const MenuGroup: ({ maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, className: UNSAFE_className, ...rest }: MenuGroupProps) => jsx.JSX.Element;
|
|
116
|
+
export const MenuGroup: ({ isLoading, maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, className: UNSAFE_className, ...rest }: MenuGroupProps) => jsx.JSX.Element;
|
|
117
117
|
|
|
118
118
|
// @public (undocumented)
|
|
119
119
|
export interface MenuGroupProps extends MenuGroupSizing {
|
|
120
120
|
children: React.ReactNode;
|
|
121
|
+
isLoading?: boolean;
|
|
121
122
|
onClick?: (event: React.KeyboardEvent | React.MouseEvent) => void;
|
|
122
123
|
role?: string;
|
|
123
124
|
spacing?: SpacingMode;
|