@atlaskit/menu 1.2.6 → 1.3.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 +10 -0
- package/dist/cjs/menu-section/menu-group.js +4 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/menu-section/menu-group.js +3 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/menu-section/menu-group.js +4 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/menu-section/menu-group.d.ts +1 -1
- package/dist/types/types.d.ts +4 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/menu
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`77c46ec96a7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/77c46ec96a7) - Adds a prop for `role` to the MenuGroup component that acts as you'd expect the HTML attribute to act. You are now able to override the accessibility role for the element.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 1.2.6
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -13,7 +13,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
13
13
|
|
|
14
14
|
var _core = require("@emotion/core");
|
|
15
15
|
|
|
16
|
-
var _excluded = ["maxWidth", "minWidth", "minHeight", "maxHeight", "testId"];
|
|
16
|
+
var _excluded = ["maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role"];
|
|
17
17
|
var groupStyles = (0, _core.css)({
|
|
18
18
|
display: 'flex',
|
|
19
19
|
flexDirection: 'column',
|
|
@@ -34,6 +34,7 @@ var MenuGroup = function MenuGroup(_ref) {
|
|
|
34
34
|
minHeight = _ref.minHeight,
|
|
35
35
|
maxHeight = _ref.maxHeight,
|
|
36
36
|
testId = _ref.testId,
|
|
37
|
+
role = _ref.role,
|
|
37
38
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
38
39
|
return (0, _core.jsx)("div", (0, _extends2.default)({
|
|
39
40
|
style: {
|
|
@@ -43,7 +44,8 @@ var MenuGroup = function MenuGroup(_ref) {
|
|
|
43
44
|
maxHeight: maxHeight
|
|
44
45
|
},
|
|
45
46
|
css: groupStyles,
|
|
46
|
-
"data-testid": testId
|
|
47
|
+
"data-testid": testId,
|
|
48
|
+
role: role // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
47
49
|
|
|
48
50
|
}, rest));
|
|
49
51
|
};
|
package/dist/cjs/version.json
CHANGED
|
@@ -22,6 +22,7 @@ const MenuGroup = ({
|
|
|
22
22
|
minHeight,
|
|
23
23
|
maxHeight,
|
|
24
24
|
testId,
|
|
25
|
+
role,
|
|
25
26
|
...rest
|
|
26
27
|
}) => jsx("div", _extends({
|
|
27
28
|
style: {
|
|
@@ -31,7 +32,8 @@ const MenuGroup = ({
|
|
|
31
32
|
maxHeight
|
|
32
33
|
},
|
|
33
34
|
css: groupStyles,
|
|
34
|
-
"data-testid": testId
|
|
35
|
+
"data-testid": testId,
|
|
36
|
+
role: role // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
35
37
|
|
|
36
38
|
}, rest));
|
|
37
39
|
|
package/dist/es2019/version.json
CHANGED
|
@@ -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"];
|
|
3
|
+
var _excluded = ["maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role"];
|
|
4
4
|
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import { css, jsx } from '@emotion/core';
|
|
@@ -24,6 +24,7 @@ var MenuGroup = function MenuGroup(_ref) {
|
|
|
24
24
|
minHeight = _ref.minHeight,
|
|
25
25
|
maxHeight = _ref.maxHeight,
|
|
26
26
|
testId = _ref.testId,
|
|
27
|
+
role = _ref.role,
|
|
27
28
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
29
|
|
|
29
30
|
return jsx("div", _extends({
|
|
@@ -34,7 +35,8 @@ var MenuGroup = function MenuGroup(_ref) {
|
|
|
34
35
|
maxHeight: maxHeight
|
|
35
36
|
},
|
|
36
37
|
css: groupStyles,
|
|
37
|
-
"data-testid": testId
|
|
38
|
+
"data-testid": testId,
|
|
39
|
+
role: role // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
38
40
|
|
|
39
41
|
}, rest));
|
|
40
42
|
};
|
package/dist/esm/version.json
CHANGED
|
@@ -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: ({ maxWidth, minWidth, minHeight, maxHeight, testId, ...rest }: MenuGroupProps) => JSX.Element;
|
|
11
|
+
declare const MenuGroup: ({ maxWidth, minWidth, minHeight, maxHeight, testId, role, ...rest }: MenuGroupProps) => JSX.Element;
|
|
12
12
|
export default MenuGroup;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -45,6 +45,10 @@ export interface MenuGroupProps extends MenuGroupSizing {
|
|
|
45
45
|
* should generally be `Section` components.
|
|
46
46
|
*/
|
|
47
47
|
children: React.ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Used to override the accessibility role for the element.
|
|
50
|
+
*/
|
|
51
|
+
role?: string;
|
|
48
52
|
/**
|
|
49
53
|
* A `testId` prop is provided for specified elements,
|
|
50
54
|
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/menu",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.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/"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/ds-lib": "^1.4.0",
|
|
39
39
|
"@atlaskit/focus-ring": "^1.0.0",
|
|
40
40
|
"@atlaskit/theme": "^12.1.0",
|
|
41
|
-
"@atlaskit/tokens": "^0.
|
|
41
|
+
"@atlaskit/tokens": "^0.7.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0",
|
|
43
43
|
"@emotion/core": "^10.0.9"
|
|
44
44
|
},
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@atlaskit/avatar": "^20.5.0",
|
|
51
|
-
"@atlaskit/button": "^16.
|
|
51
|
+
"@atlaskit/button": "^16.2.0",
|
|
52
52
|
"@atlaskit/docs": "*",
|
|
53
53
|
"@atlaskit/icon": "^21.10.0",
|
|
54
54
|
"@atlaskit/icon-file-type": "^6.0.0",
|