@atlaskit/menu 8.1.2 → 8.2.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 +11 -0
- package/dist/cjs/menu-item/button-item.js +2 -0
- package/dist/es2019/menu-item/button-item.js +2 -0
- package/dist/esm/menu-item/button-item.js +2 -0
- package/dist/types/internal/components/menu-context.d.ts +0 -1
- package/dist/types/internal/components/menu-item-primitive.d.ts +0 -1
- package/dist/types/menu-item/button-item.d.ts +0 -1
- package/dist/types/menu-item/custom-item.d.ts +0 -1
- package/dist/types/menu-item/heading-item.d.ts +0 -1
- package/dist/types/menu-item/link-item.d.ts +0 -1
- package/dist/types/menu-item/skeleton-heading-item.d.ts +0 -1
- package/dist/types/menu-item/skeleton-item.d.ts +0 -1
- package/dist/types/menu-section/menu-group.d.ts +0 -1
- package/dist/types/menu-section/popup-menu-group.d.ts +0 -1
- package/dist/types/menu-section/section.d.ts +0 -1
- package/dist/types-ts4.5/internal/components/menu-context.d.ts +0 -1
- package/dist/types-ts4.5/internal/components/menu-item-primitive.d.ts +0 -1
- package/dist/types-ts4.5/menu-item/button-item.d.ts +0 -1
- package/dist/types-ts4.5/menu-item/custom-item.d.ts +0 -1
- package/dist/types-ts4.5/menu-item/heading-item.d.ts +0 -1
- package/dist/types-ts4.5/menu-item/link-item.d.ts +0 -1
- package/dist/types-ts4.5/menu-item/skeleton-heading-item.d.ts +0 -1
- package/dist/types-ts4.5/menu-item/skeleton-item.d.ts +0 -1
- package/dist/types-ts4.5/menu-section/menu-group.d.ts +0 -1
- package/dist/types-ts4.5/menu-section/popup-menu-group.d.ts +0 -1
- package/dist/types-ts4.5/menu-section/section.d.ts +0 -1
- package/package.json +8 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/menu
|
|
2
2
|
|
|
3
|
+
## 8.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#200012](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/200012)
|
|
8
|
+
[`3b577f51b24b1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3b577f51b24b1) -
|
|
9
|
+
ButtonItem will convey its selected state to screen readers when `isSelected`. This is done
|
|
10
|
+
through the `aria-current` attribute.
|
|
11
|
+
|
|
12
|
+
This change is behind a feature flag, which will be removed in a future release.
|
|
13
|
+
|
|
3
14
|
## 8.1.2
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -13,6 +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 _interactionContext = _interopRequireDefault(require("@atlaskit/interaction-context"));
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _menuItemPrimitive = _interopRequireDefault(require("../internal/components/menu-item-primitive"));
|
|
17
18
|
var _excluded = ["children", "description", "iconAfter", "iconBefore", "isDisabled", "isSelected", "onClick", "testId", "onMouseDown", "shouldTitleWrap", "shouldDescriptionWrap", "className", "interactionName"];
|
|
18
19
|
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); }
|
|
@@ -77,6 +78,7 @@ var ButtonItem = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardR
|
|
|
77
78
|
disabled: isDisabled,
|
|
78
79
|
onClick: handleClick,
|
|
79
80
|
onMouseDown: onMouseDownHandler,
|
|
81
|
+
"aria-current": isSelected && (0, _platformFeatureFlags.fg)('platform_dst_menu_item_button_aria_current') ? 'true' : undefined,
|
|
80
82
|
type: "button"
|
|
81
83
|
}), children);
|
|
82
84
|
});
|
|
@@ -4,6 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { forwardRef, memo, useCallback, useContext } from 'react';
|
|
6
6
|
import InteractionContext from '@atlaskit/interaction-context';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import MenuItemPrimitive from '../internal/components/menu-item-primitive';
|
|
8
9
|
/**
|
|
9
10
|
* __Button item__
|
|
@@ -66,6 +67,7 @@ const ButtonItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
66
67
|
disabled: isDisabled,
|
|
67
68
|
onClick: handleClick,
|
|
68
69
|
onMouseDown: onMouseDownHandler,
|
|
70
|
+
"aria-current": isSelected && fg('platform_dst_menu_item_button_aria_current') ? 'true' : undefined,
|
|
69
71
|
type: "button"
|
|
70
72
|
}), children));
|
|
71
73
|
}));
|
|
@@ -6,6 +6,7 @@ import * as React from 'react';
|
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
7
|
import { forwardRef, memo, useCallback, useContext } from 'react';
|
|
8
8
|
import InteractionContext from '@atlaskit/interaction-context';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import MenuItemPrimitive from '../internal/components/menu-item-primitive';
|
|
10
11
|
/**
|
|
11
12
|
* __Button item__
|
|
@@ -68,6 +69,7 @@ var ButtonItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref
|
|
|
68
69
|
disabled: isDisabled,
|
|
69
70
|
onClick: handleClick,
|
|
70
71
|
onMouseDown: onMouseDownHandler,
|
|
72
|
+
"aria-current": isSelected && fg('platform_dst_menu_item_button_aria_current') ? 'true' : undefined,
|
|
71
73
|
type: "button"
|
|
72
74
|
}), children);
|
|
73
75
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/menu",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"description": "A list of options to help users navigate, or perform actions.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@atlaskit/app-provider": "^3.
|
|
43
|
+
"@atlaskit/app-provider": "^3.1.0",
|
|
44
44
|
"@atlaskit/css": "^0.12.0",
|
|
45
45
|
"@atlaskit/interaction-context": "^3.0.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
@@ -61,16 +61,15 @@
|
|
|
61
61
|
"@atlaskit/button": "^23.3.0",
|
|
62
62
|
"@atlaskit/docs": "^11.0.0",
|
|
63
63
|
"@atlaskit/ds-lib": "^5.0.0",
|
|
64
|
-
"@atlaskit/icon": "^27.
|
|
64
|
+
"@atlaskit/icon": "^27.11.0",
|
|
65
65
|
"@atlaskit/icon-file-type": "^7.0.0",
|
|
66
|
-
"@atlaskit/icon-object": "^7.
|
|
66
|
+
"@atlaskit/icon-object": "^7.2.0",
|
|
67
67
|
"@atlaskit/link": "^3.2.0",
|
|
68
68
|
"@atlaskit/section-message": "^8.5.0",
|
|
69
69
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
70
70
|
"@testing-library/react": "^13.4.0",
|
|
71
71
|
"ast-types": "^0.13.3",
|
|
72
|
-
"jscodeshift": "^17.0.0"
|
|
73
|
-
"typescript": "~5.4.2"
|
|
72
|
+
"jscodeshift": "^17.0.0"
|
|
74
73
|
},
|
|
75
74
|
"keywords": [
|
|
76
75
|
"atlaskit",
|
|
@@ -120,6 +119,9 @@
|
|
|
120
119
|
"platform-feature-flags": {
|
|
121
120
|
"platform_fix_a11y_selected_and_hovered_state_color": {
|
|
122
121
|
"type": "boolean"
|
|
122
|
+
},
|
|
123
|
+
"platform_dst_menu_item_button_aria_current": {
|
|
124
|
+
"type": "boolean"
|
|
123
125
|
}
|
|
124
126
|
},
|
|
125
127
|
"homepage": "https://atlassian.design/components/menu/"
|