@atlaskit/menu 8.4.16 → 8.4.18

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
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/menu
2
2
 
3
+ ## 8.4.18
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 8.4.17
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 8.4.16
4
16
 
5
17
  ### Patch Changes
@@ -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",
@@ -6,7 +6,7 @@ export type SpacingMode = 'compact' | 'cozy';
6
6
  *
7
7
  * @internal Do not use directly.
8
8
  */
9
- export declare const SpacingContext: import("react").Context<SpacingMode>;
9
+ export declare const SpacingContext: import('react').Context<SpacingMode>;
10
10
  /**
11
11
  * __Selection context__
12
12
  *
@@ -14,4 +14,4 @@ export declare const SpacingContext: import("react").Context<SpacingMode>;
14
14
  *
15
15
  * @internal Do not use directly.
16
16
  */
17
- export declare const SELECTION_STYLE_CONTEXT_DO_NOT_USE: import("react").Context<"notch" | "border" | "none">;
17
+ export declare const SELECTION_STYLE_CONTEXT_DO_NOT_USE: import('react').Context<'notch' | 'border' | 'none'>;
@@ -13,5 +13,5 @@ import type { MenuItemPrimitiveProps } from '../../types';
13
13
  * </MenuItemPrimitive>
14
14
  * ```
15
15
  */
16
- declare const MenuItemPrimitive: ({ children, title, description, iconAfter, iconBefore, className: UNSAFE_externalClassName, shouldTitleWrap, shouldDescriptionWrap, isDisabled, isSelected, isTitleHeading, testId, }: MenuItemPrimitiveProps) => JSX.Element;
16
+ declare const MenuItemPrimitive: (props: MenuItemPrimitiveProps) => JSX.Element;
17
17
  export default MenuItemPrimitive;
@@ -7,5 +7,5 @@ import type { ButtonItemProps } from '../types';
7
7
  * - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/button-item)
8
8
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
9
9
  */
10
- declare const ButtonItem: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<ButtonItemProps & import("react").RefAttributes<HTMLElement>>>;
10
+ declare const ButtonItem: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<ButtonItemProps & import('react').RefAttributes<HTMLElement>>>;
11
11
  export default ButtonItem;
@@ -7,5 +7,5 @@ import type { HeadingItemProps } from '../types';
7
7
  * - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/heading-item)
8
8
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
9
9
  */
10
- declare const HeadingItem: import("react").MemoExoticComponent<({ children, testId, headingLevel, id, className: UNSAFE_className, ...rest }: HeadingItemProps) => JSX.Element>;
10
+ declare const HeadingItem: import('react').MemoExoticComponent<({ children, testId, headingLevel, id, className: UNSAFE_className, ...rest }: HeadingItemProps) => JSX.Element>;
11
11
  export default HeadingItem;
@@ -7,5 +7,5 @@ import type { LinkItemProps } from '../types';
7
7
  * - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/link-item)
8
8
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
9
9
  */
10
- declare const LinkItem: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<LinkItemProps & import("react").RefAttributes<HTMLElement>>>;
10
+ declare const LinkItem: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<LinkItemProps & import('react').RefAttributes<HTMLElement>>>;
11
11
  export default LinkItem;
@@ -7,5 +7,5 @@ import type { MenuGroupProps } from '../types';
7
7
  * - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/menu-group)
8
8
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
9
9
  */
10
- declare const MenuGroup: ({ isLoading, maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, menuLabel, className: UNSAFE_className, ...rest }: MenuGroupProps) => JSX.Element;
10
+ declare const MenuGroup: (props: MenuGroupProps) => JSX.Element;
11
11
  export default MenuGroup;
@@ -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: {
@@ -6,7 +6,7 @@ export type SpacingMode = 'compact' | 'cozy';
6
6
  *
7
7
  * @internal Do not use directly.
8
8
  */
9
- export declare const SpacingContext: import("react").Context<SpacingMode>;
9
+ export declare const SpacingContext: import('react').Context<SpacingMode>;
10
10
  /**
11
11
  * __Selection context__
12
12
  *
@@ -14,4 +14,4 @@ export declare const SpacingContext: import("react").Context<SpacingMode>;
14
14
  *
15
15
  * @internal Do not use directly.
16
16
  */
17
- export declare const SELECTION_STYLE_CONTEXT_DO_NOT_USE: import("react").Context<"notch" | "border" | "none">;
17
+ export declare const SELECTION_STYLE_CONTEXT_DO_NOT_USE: import('react').Context<'notch' | 'border' | 'none'>;
@@ -13,5 +13,5 @@ import type { MenuItemPrimitiveProps } from '../../types';
13
13
  * </MenuItemPrimitive>
14
14
  * ```
15
15
  */
16
- declare const MenuItemPrimitive: ({ children, title, description, iconAfter, iconBefore, className: UNSAFE_externalClassName, shouldTitleWrap, shouldDescriptionWrap, isDisabled, isSelected, isTitleHeading, testId, }: MenuItemPrimitiveProps) => JSX.Element;
16
+ declare const MenuItemPrimitive: (props: MenuItemPrimitiveProps) => JSX.Element;
17
17
  export default MenuItemPrimitive;
@@ -7,5 +7,5 @@ import type { ButtonItemProps } from '../types';
7
7
  * - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/button-item)
8
8
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
9
9
  */
10
- declare const ButtonItem: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<ButtonItemProps & import("react").RefAttributes<HTMLElement>>>;
10
+ declare const ButtonItem: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<ButtonItemProps & import('react').RefAttributes<HTMLElement>>>;
11
11
  export default ButtonItem;
@@ -7,5 +7,5 @@ import type { HeadingItemProps } from '../types';
7
7
  * - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/heading-item)
8
8
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
9
9
  */
10
- declare const HeadingItem: import("react").MemoExoticComponent<({ children, testId, headingLevel, id, className: UNSAFE_className, ...rest }: HeadingItemProps) => JSX.Element>;
10
+ declare const HeadingItem: import('react').MemoExoticComponent<({ children, testId, headingLevel, id, className: UNSAFE_className, ...rest }: HeadingItemProps) => JSX.Element>;
11
11
  export default HeadingItem;
@@ -7,5 +7,5 @@ import type { LinkItemProps } from '../types';
7
7
  * - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/link-item)
8
8
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
9
9
  */
10
- declare const LinkItem: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<LinkItemProps & import("react").RefAttributes<HTMLElement>>>;
10
+ declare const LinkItem: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<LinkItemProps & import('react').RefAttributes<HTMLElement>>>;
11
11
  export default LinkItem;
@@ -7,5 +7,5 @@ import type { MenuGroupProps } from '../types';
7
7
  * - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/menu-group)
8
8
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
9
9
  */
10
- declare const MenuGroup: ({ isLoading, maxWidth, minWidth, minHeight, maxHeight, testId, role, spacing, menuLabel, className: UNSAFE_className, ...rest }: MenuGroupProps) => JSX.Element;
10
+ declare const MenuGroup: (props: MenuGroupProps) => JSX.Element;
11
11
  export default MenuGroup;
@@ -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.16",
3
+ "version": "8.4.18",
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": "^3.3.0",
43
+ "@atlaskit/app-provider": "^4.1.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": "^17.1.0",
48
- "@atlaskit/theme": "^21.0.0",
49
- "@atlaskit/tokens": "^10.0.0",
47
+ "@atlaskit/primitives": "^18.0.0",
48
+ "@atlaskit/theme": "^22.0.0",
49
+ "@atlaskit/tokens": "^11.0.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@compiled/react": "^0.18.6"
52
52
  },
@@ -58,10 +58,10 @@
58
58
  "@af/accessibility-testing": "workspace:^",
59
59
  "@af/integration-testing": "workspace:^",
60
60
  "@af/visual-regression": "workspace:^",
61
- "@atlaskit/button": "^23.9.0",
62
- "@atlaskit/docs": "^11.3.0",
61
+ "@atlaskit/button": "^23.10.0",
62
+ "@atlaskit/docs": "^11.5.0",
63
63
  "@atlaskit/ds-lib": "^5.3.0",
64
- "@atlaskit/icon": "^29.4.0",
64
+ "@atlaskit/icon": "^32.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",
package/report.api.md CHANGED
@@ -82,8 +82,9 @@ export interface CustomItemComponentProps {
82
82
  }
83
83
 
84
84
  // @public (undocumented)
85
- export interface CustomItemProps<TCustomComponentProps = CustomItemComponentProps>
86
- extends BaseItemProps {
85
+ export interface CustomItemProps<
86
+ TCustomComponentProps = CustomItemComponentProps,
87
+ > extends BaseItemProps {
87
88
  component?: React.ComponentType<TCustomComponentProps>;
88
89
  }
89
90