@atlaskit/menu 8.4.15 → 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 +14 -0
- package/dist/cjs/internal/components/menu-item-primitive.compiled.css +1 -1
- package/dist/cjs/internal/components/menu-item-primitive.js +1 -1
- package/dist/cjs/menu-section/section.js +3 -2
- package/dist/es2019/internal/components/menu-item-primitive.compiled.css +1 -1
- package/dist/es2019/internal/components/menu-item-primitive.js +1 -1
- package/dist/es2019/menu-section/section.js +2 -1
- package/dist/esm/internal/components/menu-item-primitive.compiled.css +1 -1
- package/dist/esm/internal/components/menu-item-primitive.js +1 -1
- package/dist/esm/menu-section/section.js +3 -2
- package/dist/types/types.d.ts +4 -0
- package/dist/types-ts4.5/types.d.ts +4 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/menu
|
|
2
2
|
|
|
3
|
+
## 8.4.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 8.4.16
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`a48fdadce2137`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a48fdadce2137) -
|
|
14
|
+
Minor internal typography changes.
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 8.4.15
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
|
-
.
|
|
3
|
+
._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
4
4
|
._19itidpf{border:0}
|
|
5
5
|
._rfx3bx74:before{border-radius:0 var(--ds-radius-small,4px) var(--ds-radius-small,4px) 0}
|
|
6
6
|
._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
|
|
@@ -27,7 +27,7 @@ var styles = {
|
|
|
27
27
|
truncate: "_1reo15vq _18m915vq _1e0c1ule _1bto1l2s _o5721q9c",
|
|
28
28
|
title: "_11c8fhey",
|
|
29
29
|
wordBreak: "_1nmz1hna",
|
|
30
|
-
description: "
|
|
30
|
+
description: "_11c8wadc _syaz1wmz",
|
|
31
31
|
disabledDescription: "_syaz2oi6",
|
|
32
32
|
unselected: "_bfhkqtfy _syaz1r31 _10531r31 _irr31dko _30l31r31 _1di61dko _9h8h1r31",
|
|
33
33
|
disabled: "_80om13gf _bfhkqtfy _syaz2oi6 _irr3qtfy _30l32oi6 _1di6qtfy _9h8h2oi6",
|
|
@@ -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",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
|
-
.
|
|
3
|
+
._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
4
4
|
._19itidpf{border:0}
|
|
5
5
|
._rfx3bx74:before{border-radius:0 var(--ds-radius-small,4px) var(--ds-radius-small,4px) 0}
|
|
6
6
|
._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
|
|
@@ -16,7 +16,7 @@ const styles = {
|
|
|
16
16
|
truncate: "_1reo15vq _18m915vq _1e0c1ule _1bto1l2s _o5721q9c",
|
|
17
17
|
title: "_11c8fhey",
|
|
18
18
|
wordBreak: "_1nmz1hna",
|
|
19
|
-
description: "
|
|
19
|
+
description: "_11c8wadc _syaz1wmz",
|
|
20
20
|
disabledDescription: "_syaz2oi6",
|
|
21
21
|
unselected: "_bfhkqtfy _syaz1r31 _10531r31 _irr31dko _30l31r31 _1di61dko _9h8h1r31",
|
|
22
22
|
disabled: "_80om13gf _bfhkqtfy _syaz2oi6 _irr3qtfy _30l32oi6 _1di6qtfy _9h8h2oi6",
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
|
-
.
|
|
3
|
+
._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
4
4
|
._19itidpf{border:0}
|
|
5
5
|
._rfx3bx74:before{border-radius:0 var(--ds-radius-small,4px) var(--ds-radius-small,4px) 0}
|
|
6
6
|
._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
|
|
@@ -19,7 +19,7 @@ var styles = {
|
|
|
19
19
|
truncate: "_1reo15vq _18m915vq _1e0c1ule _1bto1l2s _o5721q9c",
|
|
20
20
|
title: "_11c8fhey",
|
|
21
21
|
wordBreak: "_1nmz1hna",
|
|
22
|
-
description: "
|
|
22
|
+
description: "_11c8wadc _syaz1wmz",
|
|
23
23
|
disabledDescription: "_syaz2oi6",
|
|
24
24
|
unselected: "_bfhkqtfy _syaz1r31 _10531r31 _irr31dko _30l31r31 _1di61dko _9h8h1r31",
|
|
25
25
|
disabled: "_80om13gf _bfhkqtfy _syaz2oi6 _irr3qtfy _30l32oi6 _1di6qtfy _9h8h2oi6",
|
|
@@ -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",
|