@atlaskit/menu 8.4.16 → 8.4.17
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
|
@@ -14,7 +14,7 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
14
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
15
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
16
16
|
var _headingItem = _interopRequireDefault(require("../menu-item/heading-item"));
|
|
17
|
-
var _excluded = ["children", "title", "titleId", "testId", "isScrollable", "hasSeparator", "id", "isList", "isSideNavSection", "className"];
|
|
17
|
+
var _excluded = ["children", "title", "titleId", "testId", "isScrollable", "hasSeparator", "id", "isList", "isSideNavSection", "label", "className"];
|
|
18
18
|
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); }
|
|
19
19
|
var itemHeadingTopMargin = 20;
|
|
20
20
|
var itemHeadingBottomMargin = 6;
|
|
@@ -55,6 +55,7 @@ var Section = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
55
55
|
isList = _ref$isList === void 0 ? false : _ref$isList,
|
|
56
56
|
_ref$isSideNavSection = _ref.isSideNavSection,
|
|
57
57
|
isSideNavSection = _ref$isSideNavSection === void 0 ? false : _ref$isSideNavSection,
|
|
58
|
+
label = _ref.label,
|
|
58
59
|
UNSAFE_className = _ref.className,
|
|
59
60
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
60
61
|
var content = isList ? /*#__PURE__*/React.createElement("ul", {
|
|
@@ -91,7 +92,7 @@ var Section = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
91
92
|
// We have made a deliberate choice to leave this behaviour as is.
|
|
92
93
|
,
|
|
93
94
|
|
|
94
|
-
"aria-label": title,
|
|
95
|
+
"aria-label": title || label,
|
|
95
96
|
"aria-labelledby": titleId,
|
|
96
97
|
"data-testid": testId,
|
|
97
98
|
role: "group",
|
|
@@ -42,6 +42,7 @@ const Section = /*#__PURE__*/forwardRef(({
|
|
|
42
42
|
id,
|
|
43
43
|
isList = false,
|
|
44
44
|
isSideNavSection = false,
|
|
45
|
+
label,
|
|
45
46
|
// Although this isn't defined on props it is available because we've used
|
|
46
47
|
// Spread props below and on the jsx element. To forcibly block usage I've
|
|
47
48
|
// picked it out and supressed the expected type error.
|
|
@@ -81,7 +82,7 @@ const Section = /*#__PURE__*/forwardRef(({
|
|
|
81
82
|
// We have made a deliberate choice to leave this behaviour as is.
|
|
82
83
|
,
|
|
83
84
|
|
|
84
|
-
"aria-label": title,
|
|
85
|
+
"aria-label": title || label,
|
|
85
86
|
"aria-labelledby": titleId,
|
|
86
87
|
"data-testid": testId,
|
|
87
88
|
role: "group",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* section.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "title", "titleId", "testId", "isScrollable", "hasSeparator", "id", "isList", "isSideNavSection", "className"];
|
|
4
|
+
var _excluded = ["children", "title", "titleId", "testId", "isScrollable", "hasSeparator", "id", "isList", "isSideNavSection", "label", "className"];
|
|
5
5
|
import "./section.compiled.css";
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -46,6 +46,7 @@ var Section = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
46
46
|
isList = _ref$isList === void 0 ? false : _ref$isList,
|
|
47
47
|
_ref$isSideNavSection = _ref.isSideNavSection,
|
|
48
48
|
isSideNavSection = _ref$isSideNavSection === void 0 ? false : _ref$isSideNavSection,
|
|
49
|
+
label = _ref.label,
|
|
49
50
|
UNSAFE_className = _ref.className,
|
|
50
51
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
51
52
|
var content = isList ? /*#__PURE__*/React.createElement("ul", {
|
|
@@ -82,7 +83,7 @@ var Section = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
82
83
|
// We have made a deliberate choice to leave this behaviour as is.
|
|
83
84
|
,
|
|
84
85
|
|
|
85
|
-
"aria-label": title,
|
|
86
|
+
"aria-label": title || label,
|
|
86
87
|
"aria-labelledby": titleId,
|
|
87
88
|
"data-testid": testId,
|
|
88
89
|
role: "group",
|
package/dist/types/types.d.ts
CHANGED
|
@@ -104,6 +104,10 @@ export interface SectionProps {
|
|
|
104
104
|
* @deprecated This API exists to support functionality in `@atlaskit/side-navigation` and should not be used. Once the new navigation is fully rolled out, this prop will be removed.
|
|
105
105
|
*/
|
|
106
106
|
isSideNavSection?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Provide an accessible label for the section via `aria-label` for assistive technology.
|
|
109
|
+
*/
|
|
110
|
+
label?: string;
|
|
107
111
|
}
|
|
108
112
|
export interface MenuItemPrimitiveProps {
|
|
109
113
|
children: (props: {
|
|
@@ -104,6 +104,10 @@ export interface SectionProps {
|
|
|
104
104
|
* @deprecated This API exists to support functionality in `@atlaskit/side-navigation` and should not be used. Once the new navigation is fully rolled out, this prop will be removed.
|
|
105
105
|
*/
|
|
106
106
|
isSideNavSection?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Provide an accessible label for the section via `aria-label` for assistive technology.
|
|
109
|
+
*/
|
|
110
|
+
label?: string;
|
|
107
111
|
}
|
|
108
112
|
export interface MenuItemPrimitiveProps {
|
|
109
113
|
children: (props: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/menu",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.17",
|
|
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,13 +40,13 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@atlaskit/app-provider": "^
|
|
43
|
+
"@atlaskit/app-provider": "^4.0.0",
|
|
44
44
|
"@atlaskit/css": "^0.19.0",
|
|
45
45
|
"@atlaskit/interaction-context": "^3.1.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
47
|
-
"@atlaskit/primitives": "^
|
|
47
|
+
"@atlaskit/primitives": "^18.0.0",
|
|
48
48
|
"@atlaskit/theme": "^21.0.0",
|
|
49
|
-
"@atlaskit/tokens": "^
|
|
49
|
+
"@atlaskit/tokens": "^11.0.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@compiled/react": "^0.18.6"
|
|
52
52
|
},
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@atlaskit/button": "^23.9.0",
|
|
62
62
|
"@atlaskit/docs": "^11.3.0",
|
|
63
63
|
"@atlaskit/ds-lib": "^5.3.0",
|
|
64
|
-
"@atlaskit/icon": "^
|
|
64
|
+
"@atlaskit/icon": "^30.0.0",
|
|
65
65
|
"@atlaskit/icon-file-type": "^7.0.0",
|
|
66
66
|
"@atlaskit/icon-object": "^7.4.0",
|
|
67
67
|
"@atlaskit/link": "^3.3.0",
|