@atlaskit/menu 1.10.1 → 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 CHANGED
@@ -1,5 +1,11 @@
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
+
3
9
  ## 1.10.1
4
10
 
5
11
  ### Patch Changes
@@ -10,7 +10,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
10
10
  var _react = require("@emotion/react");
11
11
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
12
  var _menuContext = require("../internal/components/menu-context");
13
- var _excluded = ["maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role", "spacing", "className"];
13
+ var _excluded = ["isLoading", "maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role", "spacing", "className"];
14
14
  /** @jsx jsx */
15
15
  var baseStyles = (0, _react.css)({
16
16
  display: 'flex',
@@ -28,7 +28,8 @@ var baseStyles = (0, _react.css)({
28
28
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
29
29
  */
30
30
  var MenuGroup = function MenuGroup(_ref) {
31
- var maxWidth = _ref.maxWidth,
31
+ var isLoading = _ref.isLoading,
32
+ maxWidth = _ref.maxWidth,
32
33
  minWidth = _ref.minWidth,
33
34
  minHeight = _ref.minHeight,
34
35
  maxHeight = _ref.maxHeight,
@@ -43,6 +44,7 @@ var MenuGroup = function MenuGroup(_ref) {
43
44
  }, (0, _react.jsx)(_menuContext.SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
44
45
  value: "border"
45
46
  }, (0, _react.jsx)("div", (0, _extends2.default)({
47
+ "aria-busy": isLoading,
46
48
  style: {
47
49
  minWidth: minWidth,
48
50
  maxWidth: maxWidth,
@@ -19,6 +19,7 @@ const baseStyles = css({
19
19
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
20
20
  */
21
21
  const MenuGroup = ({
22
+ isLoading,
22
23
  maxWidth,
23
24
  minWidth,
24
25
  minHeight,
@@ -37,6 +38,7 @@ const MenuGroup = ({
37
38
  }, jsx(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
38
39
  value: "border"
39
40
  }, jsx("div", _extends({
41
+ "aria-busy": isLoading,
40
42
  style: {
41
43
  minWidth,
42
44
  maxWidth,
@@ -1,6 +1,6 @@
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
5
  import { css, jsx } from '@emotion/react';
6
6
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
@@ -21,7 +21,8 @@ var baseStyles = css({
21
21
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
22
22
  */
23
23
  var MenuGroup = function MenuGroup(_ref) {
24
- var maxWidth = _ref.maxWidth,
24
+ var isLoading = _ref.isLoading,
25
+ maxWidth = _ref.maxWidth,
25
26
  minWidth = _ref.minWidth,
26
27
  minHeight = _ref.minHeight,
27
28
  maxHeight = _ref.maxHeight,
@@ -36,6 +37,7 @@ var MenuGroup = function MenuGroup(_ref) {
36
37
  }, jsx(SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
37
38
  value: "border"
38
39
  }, jsx("div", _extends({
40
+ "aria-busy": isLoading,
39
41
  style: {
40
42
  minWidth: minWidth,
41
43
  maxWidth: maxWidth,
@@ -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
  */
@@ -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.10.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/"
@@ -29,9 +29,9 @@
29
29
  "@atlaskit/ds-lib": "^2.2.0",
30
30
  "@atlaskit/focus-ring": "^1.3.0",
31
31
  "@atlaskit/platform-feature-flags": "^0.2.0",
32
- "@atlaskit/primitives": "^1.2.0",
33
- "@atlaskit/theme": "^12.5.0",
34
- "@atlaskit/tokens": "^1.18.0",
32
+ "@atlaskit/primitives": "^1.6.0",
33
+ "@atlaskit/theme": "^12.6.0",
34
+ "@atlaskit/tokens": "^1.25.0",
35
35
  "@babel/runtime": "^7.0.0",
36
36
  "@emotion/react": "^11.7.1"
37
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;
@@ -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;