@atlaskit/menu 8.0.7 → 8.0.9
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/menu-section/menu-group.js +4 -2
- package/dist/es2019/menu-section/menu-group.js +3 -1
- package/dist/esm/menu-section/menu-group.js +4 -2
- 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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/menu
|
|
2
2
|
|
|
3
|
+
## 8.0.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#188621](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/188621)
|
|
8
|
+
[`94981059e9ba8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/94981059e9ba8) -
|
|
9
|
+
Added accessible label for MenuGroup in DropdownMenu
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 8.0.8
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#184403](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/184403)
|
|
17
|
+
[`aa0e4e09ed566`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aa0e4e09ed566) -
|
|
18
|
+
Internal refactoring of visual regression tests.
|
|
19
|
+
|
|
3
20
|
## 8.0.7
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -13,7 +13,7 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
13
13
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
15
|
var _menuContext = require("../internal/components/menu-context");
|
|
16
|
-
var _excluded = ["isLoading", "maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role", "spacing", "className"];
|
|
16
|
+
var _excluded = ["isLoading", "maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role", "spacing", "menuLabel", "className"];
|
|
17
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
18
18
|
var baseStyles = null;
|
|
19
19
|
|
|
@@ -35,6 +35,7 @@ var MenuGroup = function MenuGroup(_ref) {
|
|
|
35
35
|
role = _ref.role,
|
|
36
36
|
_ref$spacing = _ref.spacing,
|
|
37
37
|
spacing = _ref$spacing === void 0 ? 'cozy' : _ref$spacing,
|
|
38
|
+
menuLabel = _ref.menuLabel,
|
|
38
39
|
UNSAFE_className = _ref.className,
|
|
39
40
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
40
41
|
return /*#__PURE__*/React.createElement(_menuContext.SpacingContext.Provider, {
|
|
@@ -53,7 +54,8 @@ var MenuGroup = function MenuGroup(_ref) {
|
|
|
53
54
|
role: role
|
|
54
55
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
55
56
|
,
|
|
56
|
-
className: (0, _runtime.ax)(["_1reo1wug _18m91wug _1e0c1txw _kqswpfqs _2lx21bp4", UNSAFE_className])
|
|
57
|
+
className: (0, _runtime.ax)(["_1reo1wug _18m91wug _1e0c1txw _kqswpfqs _2lx21bp4", UNSAFE_className]),
|
|
58
|
+
"aria-label": menuLabel
|
|
57
59
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
58
60
|
}, rest))));
|
|
59
61
|
};
|
|
@@ -23,6 +23,7 @@ const MenuGroup = ({
|
|
|
23
23
|
testId,
|
|
24
24
|
role,
|
|
25
25
|
spacing = 'cozy',
|
|
26
|
+
menuLabel,
|
|
26
27
|
// Although this isn't defined on props it is available because we've used
|
|
27
28
|
// Spread props below and on the jsx element. To forcibly block usage I've
|
|
28
29
|
// picked it out and supressed the expected type error.
|
|
@@ -45,7 +46,8 @@ const MenuGroup = ({
|
|
|
45
46
|
role: role
|
|
46
47
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
47
48
|
,
|
|
48
|
-
className: ax(["_1reo1wug _18m91wug _1e0c1txw _kqswpfqs _2lx21bp4", UNSAFE_className])
|
|
49
|
+
className: ax(["_1reo1wug _18m91wug _1e0c1txw _kqswpfqs _2lx21bp4", UNSAFE_className]),
|
|
50
|
+
"aria-label": menuLabel
|
|
49
51
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
50
52
|
}, rest))));
|
|
51
53
|
export default MenuGroup;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* menu-group.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["isLoading", "maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role", "spacing", "className"];
|
|
4
|
+
var _excluded = ["isLoading", "maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role", "spacing", "menuLabel", "className"];
|
|
5
5
|
import "./menu-group.compiled.css";
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -26,6 +26,7 @@ var MenuGroup = function MenuGroup(_ref) {
|
|
|
26
26
|
role = _ref.role,
|
|
27
27
|
_ref$spacing = _ref.spacing,
|
|
28
28
|
spacing = _ref$spacing === void 0 ? 'cozy' : _ref$spacing,
|
|
29
|
+
menuLabel = _ref.menuLabel,
|
|
29
30
|
UNSAFE_className = _ref.className,
|
|
30
31
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
31
32
|
return /*#__PURE__*/React.createElement(SpacingContext.Provider, {
|
|
@@ -44,7 +45,8 @@ var MenuGroup = function MenuGroup(_ref) {
|
|
|
44
45
|
role: role
|
|
45
46
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
46
47
|
,
|
|
47
|
-
className: ax(["_1reo1wug _18m91wug _1e0c1txw _kqswpfqs _2lx21bp4", UNSAFE_className])
|
|
48
|
+
className: ax(["_1reo1wug _18m91wug _1e0c1txw _kqswpfqs _2lx21bp4", UNSAFE_className]),
|
|
49
|
+
"aria-label": menuLabel
|
|
48
50
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
49
51
|
}, rest))));
|
|
50
52
|
};
|
|
@@ -8,5 +8,5 @@ import type { MenuGroupProps } from '../types';
|
|
|
8
8
|
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/menu-group)
|
|
9
9
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
10
10
|
*/
|
|
11
|
-
declare const MenuGroup: ({ isLoading, maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, className: UNSAFE_className, ...rest }: MenuGroupProps) => JSX.Element;
|
|
11
|
+
declare const MenuGroup: ({ isLoading, maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, menuLabel, className: UNSAFE_className, ...rest }: MenuGroupProps) => JSX.Element;
|
|
12
12
|
export default MenuGroup;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -54,6 +54,10 @@ export interface MenuGroupProps extends MenuGroupSizing {
|
|
|
54
54
|
* Useful when needing to stop propagation of child events.
|
|
55
55
|
*/
|
|
56
56
|
onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Provide an accessible label via `aria-label` for the menu element for assistive technology.
|
|
59
|
+
*/
|
|
60
|
+
menuLabel?: string;
|
|
57
61
|
}
|
|
58
62
|
export interface SectionProps {
|
|
59
63
|
/**
|
|
@@ -8,5 +8,5 @@ import type { MenuGroupProps } from '../types';
|
|
|
8
8
|
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/menu-group)
|
|
9
9
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
|
|
10
10
|
*/
|
|
11
|
-
declare const MenuGroup: ({ isLoading, maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, className: UNSAFE_className, ...rest }: MenuGroupProps) => JSX.Element;
|
|
11
|
+
declare const MenuGroup: ({ isLoading, maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, menuLabel, className: UNSAFE_className, ...rest }: MenuGroupProps) => JSX.Element;
|
|
12
12
|
export default MenuGroup;
|
|
@@ -54,6 +54,10 @@ export interface MenuGroupProps extends MenuGroupSizing {
|
|
|
54
54
|
* Useful when needing to stop propagation of child events.
|
|
55
55
|
*/
|
|
56
56
|
onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Provide an accessible label via `aria-label` for the menu element for assistive technology.
|
|
59
|
+
*/
|
|
60
|
+
menuLabel?: string;
|
|
57
61
|
}
|
|
58
62
|
export interface SectionProps {
|
|
59
63
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/menu",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.9",
|
|
4
4
|
"description": "A list of options to help users navigate, or perform actions.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
47
47
|
"@atlaskit/primitives": "^14.10.0",
|
|
48
48
|
"@atlaskit/theme": "^19.0.0",
|
|
49
|
-
"@atlaskit/tokens": "^5.
|
|
49
|
+
"@atlaskit/tokens": "^5.6.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@compiled/react": "^0.18.3"
|
|
52
52
|
},
|
|
@@ -60,13 +60,12 @@
|
|
|
60
60
|
"@af/visual-regression": "workspace:^",
|
|
61
61
|
"@atlaskit/button": "^23.2.0",
|
|
62
62
|
"@atlaskit/docs": "^11.0.0",
|
|
63
|
-
"@atlaskit/ds-lib": "^4.
|
|
64
|
-
"@atlaskit/icon": "^27.
|
|
63
|
+
"@atlaskit/ds-lib": "^4.1.0",
|
|
64
|
+
"@atlaskit/icon": "^27.5.0",
|
|
65
65
|
"@atlaskit/icon-file-type": "^7.0.0",
|
|
66
66
|
"@atlaskit/icon-object": "^7.1.0",
|
|
67
67
|
"@atlaskit/link": "^3.2.0",
|
|
68
68
|
"@atlaskit/section-message": "^8.2.0",
|
|
69
|
-
"@atlaskit/visual-regression": "workspace:^",
|
|
70
69
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
71
70
|
"@testing-library/react": "^13.4.0",
|
|
72
71
|
"ast-types": "^0.13.3",
|