@atlaskit/menu 5.0.0 → 6.0.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 CHANGED
@@ -1,5 +1,30 @@
1
1
  # @atlaskit/menu
2
2
 
3
+ ## 6.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#148607](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/148607)
8
+ [`474e66c7b2f54`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/474e66c7b2f54) -
9
+ Removed deprecated `overrides` prop from Section. Introduced `isSideNavSection` prop on Section
10
+ which when true renders headings with reduced padding. This prop was added exclusively to support
11
+ existing functionality in `@atlaskit/side-navigation` and will be removed once the new navigation
12
+ system fully rolls out. It should not be used outside of the Side Navigation component. Removed
13
+ deprecated `Overrides` and `TitleOverrides` types.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
19
+ ## 5.0.1
20
+
21
+ ### Patch Changes
22
+
23
+ - [#150647](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/150647)
24
+ [`a0fe499b55985`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a0fe499b55985) -
25
+ Adds a `:focus` style reset to menu items to prevent :focus styles with lower specificity from
26
+ leaking through.
27
+
3
28
  ## 5.0.0
4
29
 
5
30
  ### Major Changes
@@ -56,12 +56,15 @@
56
56
  ._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
57
57
  ._vchhusvi{box-sizing:border-box}
58
58
  ._y3gn1e5h{text-align:left}
59
- ._z5wtze3t:before{inset-inline-start:var(--ds-space-0,0)}._10531r31:visited{color:currentColor}
59
+ ._ymio1r31:focus:not(:focus-visible){outline-color:currentColor}
60
+ ._ypr0glyw:focus:not(:focus-visible){outline-style:none}
61
+ ._z5wtze3t:before{inset-inline-start:var(--ds-space-0,0)}
62
+ ._zcxs1o36:focus:not(:focus-visible){outline-width:medium}._10531r31:visited{color:currentColor}
60
63
  ._1053hu5v:visited{color:var(--ds-text-selected,currentColor)}
61
- ._128m1bk5:focus-visible{outline-width:var(--ds-border-width-outline,2px)}
62
- ._1ah311pw:focus-visible{outline-offset:calc(0px - var(--ds-border-width-outline, 2px))}
63
- ._mizu194a:focus-visible{outline-color:var(--ds-border-focused,#2684ff)}
64
- ._ra3xnqa1:focus-visible{outline-style:solid}
64
+ ._1bg411pw:focus, ._1ah311pw:focus-visible{outline-offset:calc(0px - var(--ds-border-width-outline, 2px))}
65
+ ._1hvw1bk5:focus, ._128m1bk5:focus-visible{outline-width:var(--ds-border-width-outline,2px)}
66
+ ._49pcnqa1:focus, ._ra3xnqa1:focus-visible{outline-style:solid}
67
+ ._nt75194a:focus, ._mizu194a:focus-visible{outline-color:var(--ds-border-focused,#2684ff)}
65
68
  ._1bnxglyw:hover{text-decoration-line:none}
66
69
  ._30l316ov:hover{color:var(--ds-text-accent-blue,currentColor)}
67
70
  ._30l31r31:hover{color:currentColor}
@@ -23,7 +23,7 @@ var renderTitle = function renderTitle(Component, props) {
23
23
  );
24
24
  };
25
25
  var styles = {
26
- root: "_19itidpf _12ji1r31 _1qu2glyw _12y3idpf _4bfu1r31 _1hmsglyw _ajmmnqa1 _kqswh2mm _1e0c1txw _vchhusvi _1bsb1osq _1tke1ylp _19pkze3t _2hwxze3t _otyrze3t _18u0ze3t _4cvr1h6o _uiztglyw _80omtlke _mizu194a _1ah311pw _ra3xnqa1 _128m1bk5 _9oik1r31 _1bnxglyw _jf4cnqa1 _1cvmnqa1 _4davt94y",
26
+ root: "_19itidpf _12ji1r31 _1qu2glyw _12y3idpf _4bfu1r31 _1hmsglyw _ajmmnqa1 _kqswh2mm _1e0c1txw _vchhusvi _1bsb1osq _1tke1ylp _19pkze3t _2hwxze3t _otyrze3t _18u0ze3t _4cvr1h6o _uiztglyw _80omtlke _ymio1r31 _ypr0glyw _zcxs1o36 _nt75194a _mizu194a _1bg411pw _1ah311pw _49pcnqa1 _ra3xnqa1 _1hvw1bk5 _128m1bk5 _9oik1r31 _1bnxglyw _jf4cnqa1 _1cvmnqa1 _4davt94y",
27
27
  beforeAfterElementOld: "_1e0c1txw _4cvr1h6o _1bah1h6o _1o9zidpf",
28
28
  beforeAfterElement: "_1e0c1txw _1ul91tcg _1tke1tcg _4cvr1h6o _1bah1h6o _1o9zidpf",
29
29
  content: "_12ji1r31 _1qu2glyw _12y31o36 _1reo15vq _18m915vq _1e0c1txw _2lx21bp4 _1bah1h6o _16jlkb7n _y3gn1e5h",
@@ -9,10 +9,9 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
10
  var _react = require("react");
11
11
  var _react2 = require("@emotion/react");
12
- var _deprecationWarning = require("@atlaskit/ds-lib/deprecation-warning");
13
12
  var _colors = require("@atlaskit/theme/colors");
14
13
  var _headingItem = _interopRequireDefault(require("../menu-item/heading-item"));
15
- var _excluded = ["children", "overrides", "title", "titleId", "testId", "isScrollable", "hasSeparator", "id", "isList", "className"];
14
+ var _excluded = ["children", "title", "titleId", "testId", "isScrollable", "hasSeparator", "id", "isList", "isSideNavSection", "className"];
16
15
  /**
17
16
  * @jsxRuntime classic
18
17
  * @jsx jsx
@@ -88,6 +87,11 @@ var noSeparatorStyles = (0, _react2.css)({
88
87
  marginBlockStart: -6
89
88
  }
90
89
  });
90
+ var sideNavSectionHeadingStyles = function sideNavSectionHeadingStyles() {
91
+ return {
92
+ paddingInline: "var(--ds-space-100, 8px)"
93
+ };
94
+ };
91
95
 
92
96
  /**
93
97
  * __Section__
@@ -99,7 +103,6 @@ var noSeparatorStyles = (0, _react2.css)({
99
103
  */
100
104
  var Section = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
101
105
  var children = _ref.children,
102
- overrides = _ref.overrides,
103
106
  title = _ref.title,
104
107
  titleId = _ref.titleId,
105
108
  testId = _ref.testId,
@@ -108,11 +111,10 @@ var Section = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
108
111
  id = _ref.id,
109
112
  _ref$isList = _ref.isList,
110
113
  isList = _ref$isList === void 0 ? false : _ref$isList,
114
+ _ref$isSideNavSection = _ref.isSideNavSection,
115
+ isSideNavSection = _ref$isSideNavSection === void 0 ? false : _ref$isSideNavSection,
111
116
  UNSAFE_className = _ref.className,
112
117
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
113
- (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu" || '', 'overrides', overrides !== undefined, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
114
- );
115
- var UNSAFE_headingOverrides = overrides && overrides.HeadingItem && overrides.HeadingItem.cssFn;
116
118
  var content = isList ? (0, _react2.jsx)("ul", {
117
119
  style: {
118
120
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
@@ -134,7 +136,7 @@ var Section = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
134
136
  var childrenMarkup = title !== undefined ? (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_headingItem.default
135
137
  // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
136
138
  , {
137
- cssFn: UNSAFE_headingOverrides,
139
+ cssFn: isSideNavSection ? sideNavSectionHeadingStyles : undefined,
138
140
  testId: testId && "".concat(testId, "--heading"),
139
141
  "aria-hidden": true
140
142
  }, title), content) : (0, _react2.jsx)(_react.Fragment, null, content);
@@ -56,12 +56,15 @@
56
56
  ._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
57
57
  ._vchhusvi{box-sizing:border-box}
58
58
  ._y3gn1e5h{text-align:left}
59
- ._z5wtze3t:before{inset-inline-start:var(--ds-space-0,0)}._10531r31:visited{color:currentColor}
59
+ ._ymio1r31:focus:not(:focus-visible){outline-color:currentColor}
60
+ ._ypr0glyw:focus:not(:focus-visible){outline-style:none}
61
+ ._z5wtze3t:before{inset-inline-start:var(--ds-space-0,0)}
62
+ ._zcxs1o36:focus:not(:focus-visible){outline-width:medium}._10531r31:visited{color:currentColor}
60
63
  ._1053hu5v:visited{color:var(--ds-text-selected,currentColor)}
61
- ._128m1bk5:focus-visible{outline-width:var(--ds-border-width-outline,2px)}
62
- ._1ah311pw:focus-visible{outline-offset:calc(0px - var(--ds-border-width-outline, 2px))}
63
- ._mizu194a:focus-visible{outline-color:var(--ds-border-focused,#2684ff)}
64
- ._ra3xnqa1:focus-visible{outline-style:solid}
64
+ ._1bg411pw:focus, ._1ah311pw:focus-visible{outline-offset:calc(0px - var(--ds-border-width-outline, 2px))}
65
+ ._1hvw1bk5:focus, ._128m1bk5:focus-visible{outline-width:var(--ds-border-width-outline,2px)}
66
+ ._49pcnqa1:focus, ._ra3xnqa1:focus-visible{outline-style:solid}
67
+ ._nt75194a:focus, ._mizu194a:focus-visible{outline-color:var(--ds-border-focused,#2684ff)}
65
68
  ._1bnxglyw:hover{text-decoration-line:none}
66
69
  ._30l316ov:hover{color:var(--ds-text-accent-blue,currentColor)}
67
70
  ._30l31r31:hover{color:currentColor}
@@ -11,7 +11,7 @@ const renderTitle = (Component, props) =>
11
11
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
12
12
  React.createElement(Component, props);
13
13
  const styles = {
14
- root: "_19itidpf _12ji1r31 _1qu2glyw _12y3idpf _4bfu1r31 _1hmsglyw _ajmmnqa1 _kqswh2mm _1e0c1txw _vchhusvi _1bsb1osq _1tke1ylp _19pkze3t _2hwxze3t _otyrze3t _18u0ze3t _4cvr1h6o _uiztglyw _80omtlke _mizu194a _1ah311pw _ra3xnqa1 _128m1bk5 _9oik1r31 _1bnxglyw _jf4cnqa1 _1cvmnqa1 _4davt94y",
14
+ root: "_19itidpf _12ji1r31 _1qu2glyw _12y3idpf _4bfu1r31 _1hmsglyw _ajmmnqa1 _kqswh2mm _1e0c1txw _vchhusvi _1bsb1osq _1tke1ylp _19pkze3t _2hwxze3t _otyrze3t _18u0ze3t _4cvr1h6o _uiztglyw _80omtlke _ymio1r31 _ypr0glyw _zcxs1o36 _nt75194a _mizu194a _1bg411pw _1ah311pw _49pcnqa1 _ra3xnqa1 _1hvw1bk5 _128m1bk5 _9oik1r31 _1bnxglyw _jf4cnqa1 _1cvmnqa1 _4davt94y",
15
15
  beforeAfterElementOld: "_1e0c1txw _4cvr1h6o _1bah1h6o _1o9zidpf",
16
16
  beforeAfterElement: "_1e0c1txw _1ul91tcg _1tke1tcg _4cvr1h6o _1bah1h6o _1o9zidpf",
17
17
  content: "_12ji1r31 _1qu2glyw _12y31o36 _1reo15vq _18m915vq _1e0c1txw _2lx21bp4 _1bah1h6o _16jlkb7n _y3gn1e5h",
@@ -7,7 +7,6 @@ import { Children, forwardRef, Fragment } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
- import { propDeprecationWarning } from '@atlaskit/ds-lib/deprecation-warning';
11
10
  import { N30A } from '@atlaskit/theme/colors';
12
11
  import HeadingItem from '../menu-item/heading-item';
13
12
  const gridSize = 8;
@@ -80,6 +79,11 @@ const noSeparatorStyles = css({
80
79
  marginBlockStart: -6
81
80
  }
82
81
  });
82
+ const sideNavSectionHeadingStyles = () => {
83
+ return {
84
+ paddingInline: "var(--ds-space-100, 8px)"
85
+ };
86
+ };
83
87
 
84
88
  /**
85
89
  * __Section__
@@ -91,7 +95,6 @@ const noSeparatorStyles = css({
91
95
  */
92
96
  const Section = /*#__PURE__*/forwardRef(({
93
97
  children,
94
- overrides,
95
98
  title,
96
99
  titleId,
97
100
  testId,
@@ -99,6 +102,7 @@ const Section = /*#__PURE__*/forwardRef(({
99
102
  hasSeparator,
100
103
  id,
101
104
  isList = false,
105
+ isSideNavSection = false,
102
106
  // Although this isn't defined on props it is available because we've used
103
107
  // Spread props below and on the jsx element. To forcibly block usage I've
104
108
  // picked it out and supressed the expected type error.
@@ -106,9 +110,6 @@ const Section = /*#__PURE__*/forwardRef(({
106
110
  className: UNSAFE_className,
107
111
  ...rest
108
112
  }, ref) => {
109
- propDeprecationWarning("@atlaskit/menu" || '', 'overrides', overrides !== undefined, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
110
- );
111
- const UNSAFE_headingOverrides = overrides && overrides.HeadingItem && overrides.HeadingItem.cssFn;
112
113
  const content = isList ? jsx("ul", {
113
114
  style: {
114
115
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
@@ -128,7 +129,7 @@ const Section = /*#__PURE__*/forwardRef(({
128
129
  const childrenMarkup = title !== undefined ? jsx(Fragment, null, jsx(HeadingItem
129
130
  // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
130
131
  , {
131
- cssFn: UNSAFE_headingOverrides,
132
+ cssFn: isSideNavSection ? sideNavSectionHeadingStyles : undefined,
132
133
  testId: testId && `${testId}--heading`,
133
134
  "aria-hidden": true
134
135
  }, title), content) : jsx(Fragment, null, content);
@@ -56,12 +56,15 @@
56
56
  ._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
57
57
  ._vchhusvi{box-sizing:border-box}
58
58
  ._y3gn1e5h{text-align:left}
59
- ._z5wtze3t:before{inset-inline-start:var(--ds-space-0,0)}._10531r31:visited{color:currentColor}
59
+ ._ymio1r31:focus:not(:focus-visible){outline-color:currentColor}
60
+ ._ypr0glyw:focus:not(:focus-visible){outline-style:none}
61
+ ._z5wtze3t:before{inset-inline-start:var(--ds-space-0,0)}
62
+ ._zcxs1o36:focus:not(:focus-visible){outline-width:medium}._10531r31:visited{color:currentColor}
60
63
  ._1053hu5v:visited{color:var(--ds-text-selected,currentColor)}
61
- ._128m1bk5:focus-visible{outline-width:var(--ds-border-width-outline,2px)}
62
- ._1ah311pw:focus-visible{outline-offset:calc(0px - var(--ds-border-width-outline, 2px))}
63
- ._mizu194a:focus-visible{outline-color:var(--ds-border-focused,#2684ff)}
64
- ._ra3xnqa1:focus-visible{outline-style:solid}
64
+ ._1bg411pw:focus, ._1ah311pw:focus-visible{outline-offset:calc(0px - var(--ds-border-width-outline, 2px))}
65
+ ._1hvw1bk5:focus, ._128m1bk5:focus-visible{outline-width:var(--ds-border-width-outline,2px)}
66
+ ._49pcnqa1:focus, ._ra3xnqa1:focus-visible{outline-style:solid}
67
+ ._nt75194a:focus, ._mizu194a:focus-visible{outline-color:var(--ds-border-focused,#2684ff)}
65
68
  ._1bnxglyw:hover{text-decoration-line:none}
66
69
  ._30l316ov:hover{color:var(--ds-text-accent-blue,currentColor)}
67
70
  ._30l31r31:hover{color:currentColor}
@@ -14,7 +14,7 @@ var renderTitle = function renderTitle(Component, props) {
14
14
  );
15
15
  };
16
16
  var styles = {
17
- root: "_19itidpf _12ji1r31 _1qu2glyw _12y3idpf _4bfu1r31 _1hmsglyw _ajmmnqa1 _kqswh2mm _1e0c1txw _vchhusvi _1bsb1osq _1tke1ylp _19pkze3t _2hwxze3t _otyrze3t _18u0ze3t _4cvr1h6o _uiztglyw _80omtlke _mizu194a _1ah311pw _ra3xnqa1 _128m1bk5 _9oik1r31 _1bnxglyw _jf4cnqa1 _1cvmnqa1 _4davt94y",
17
+ root: "_19itidpf _12ji1r31 _1qu2glyw _12y3idpf _4bfu1r31 _1hmsglyw _ajmmnqa1 _kqswh2mm _1e0c1txw _vchhusvi _1bsb1osq _1tke1ylp _19pkze3t _2hwxze3t _otyrze3t _18u0ze3t _4cvr1h6o _uiztglyw _80omtlke _ymio1r31 _ypr0glyw _zcxs1o36 _nt75194a _mizu194a _1bg411pw _1ah311pw _49pcnqa1 _ra3xnqa1 _1hvw1bk5 _128m1bk5 _9oik1r31 _1bnxglyw _jf4cnqa1 _1cvmnqa1 _4davt94y",
18
18
  beforeAfterElementOld: "_1e0c1txw _4cvr1h6o _1bah1h6o _1o9zidpf",
19
19
  beforeAfterElement: "_1e0c1txw _1ul91tcg _1tke1tcg _4cvr1h6o _1bah1h6o _1o9zidpf",
20
20
  content: "_12ji1r31 _1qu2glyw _12y31o36 _1reo15vq _18m915vq _1e0c1txw _2lx21bp4 _1bah1h6o _16jlkb7n _y3gn1e5h",
@@ -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 = ["children", "overrides", "title", "titleId", "testId", "isScrollable", "hasSeparator", "id", "isList", "className"];
3
+ var _excluded = ["children", "title", "titleId", "testId", "isScrollable", "hasSeparator", "id", "isList", "isSideNavSection", "className"];
4
4
  /**
5
5
  * @jsxRuntime classic
6
6
  * @jsx jsx
@@ -9,7 +9,6 @@ import { Children, forwardRef, Fragment } from 'react';
9
9
 
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
11
11
  import { css, jsx } from '@emotion/react';
12
- import { propDeprecationWarning } from '@atlaskit/ds-lib/deprecation-warning';
13
12
  import { N30A } from '@atlaskit/theme/colors';
14
13
  import HeadingItem from '../menu-item/heading-item';
15
14
  var gridSize = 8;
@@ -82,6 +81,11 @@ var noSeparatorStyles = css({
82
81
  marginBlockStart: -6
83
82
  }
84
83
  });
84
+ var sideNavSectionHeadingStyles = function sideNavSectionHeadingStyles() {
85
+ return {
86
+ paddingInline: "var(--ds-space-100, 8px)"
87
+ };
88
+ };
85
89
 
86
90
  /**
87
91
  * __Section__
@@ -93,7 +97,6 @@ var noSeparatorStyles = css({
93
97
  */
94
98
  var Section = /*#__PURE__*/forwardRef(function (_ref, ref) {
95
99
  var children = _ref.children,
96
- overrides = _ref.overrides,
97
100
  title = _ref.title,
98
101
  titleId = _ref.titleId,
99
102
  testId = _ref.testId,
@@ -102,11 +105,10 @@ var Section = /*#__PURE__*/forwardRef(function (_ref, ref) {
102
105
  id = _ref.id,
103
106
  _ref$isList = _ref.isList,
104
107
  isList = _ref$isList === void 0 ? false : _ref$isList,
108
+ _ref$isSideNavSection = _ref.isSideNavSection,
109
+ isSideNavSection = _ref$isSideNavSection === void 0 ? false : _ref$isSideNavSection,
105
110
  UNSAFE_className = _ref.className,
106
111
  rest = _objectWithoutProperties(_ref, _excluded);
107
- propDeprecationWarning("@atlaskit/menu" || '', 'overrides', overrides !== undefined, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
108
- );
109
- var UNSAFE_headingOverrides = overrides && overrides.HeadingItem && overrides.HeadingItem.cssFn;
110
112
  var content = isList ? jsx("ul", {
111
113
  style: {
112
114
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
@@ -128,7 +130,7 @@ var Section = /*#__PURE__*/forwardRef(function (_ref, ref) {
128
130
  var childrenMarkup = title !== undefined ? jsx(Fragment, null, jsx(HeadingItem
129
131
  // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
130
132
  , {
131
- cssFn: UNSAFE_headingOverrides,
133
+ cssFn: isSideNavSection ? sideNavSectionHeadingStyles : undefined,
132
134
  testId: testId && "".concat(testId, "--heading"),
133
135
  "aria-hidden": true
134
136
  }, title), content) : jsx(Fragment, null, content);
@@ -8,4 +8,4 @@ export { default as SkeletonHeadingItem } from './menu-item/skeleton-heading-ite
8
8
  export { default as Section } from './menu-section/section';
9
9
  export { default as MenuGroup } from './menu-section/menu-group';
10
10
  export { default as PopupMenuGroup } from './menu-section/popup-menu-group';
11
- export type { ButtonItemProps, CSSFn, StatelessCSSFn, CustomItemComponentProps, CustomItemProps, HeadingItemProps, ItemState, LinkItemProps, MenuGroupProps, SectionProps, SkeletonHeadingItemProps, SkeletonItemProps, Dimension, MenuItemProps as BaseItemProps, Overrides, MenuGroupSizing, RenderFunction, SectionProps as SectionBaseProps, TitleOverrides, } from './types';
11
+ export type { ButtonItemProps, CSSFn, StatelessCSSFn, CustomItemComponentProps, CustomItemProps, HeadingItemProps, ItemState, LinkItemProps, MenuGroupProps, SectionProps, SkeletonHeadingItemProps, SkeletonItemProps, Dimension, MenuItemProps as BaseItemProps, MenuGroupSizing, RenderFunction, SectionProps as SectionBaseProps, } from './types';
@@ -1,25 +1,9 @@
1
- import { type ComponentType, type PropsWithChildren, type ReactNode, type Ref } from 'react';
1
+ import { type ComponentType, type PropsWithChildren, type Ref } from 'react';
2
2
  import { type CSSObject } from '@emotion/react';
3
3
  import type { SpacingMode } from './internal/components/menu-context';
4
4
  export interface RenderFunction<TProps = {}> {
5
5
  (Component: ComponentType | string, props: TProps): React.ReactNode;
6
6
  }
7
- /**
8
- * @deprecated This type is deprecated and will be removed in a future release. See DSP-2676 for more information.
9
- */
10
- export interface TitleOverrides {
11
- render?: RenderFunction<{
12
- className?: string;
13
- children: ReactNode;
14
- 'data-item-title': boolean;
15
- }>;
16
- }
17
- /**
18
- * @deprecated This type is deprecated and will be removed in a future release. See DSP-2676 for more information.
19
- */
20
- export interface Overrides {
21
- Title?: TitleOverrides;
22
- }
23
7
  export type Dimension = string | number;
24
8
  export interface MenuGroupSizing {
25
9
  /**
@@ -97,18 +81,6 @@ export interface SectionProps {
97
81
  * serving as a hook for automated tests.
98
82
  */
99
83
  testId?: string;
100
- /**
101
- * @deprecated This API is deprecated and will be removed in a future release. See DSP-2676 for more information.
102
- */
103
- overrides?: {
104
- HeadingItem?: {
105
- /**
106
- * A function that overrides the styles of the component.
107
- * It receives the current styles and state and expects a styles object.
108
- */
109
- cssFn?: StatelessCSSFn;
110
- };
111
- };
112
84
  /**
113
85
  * The text passed into the internal `HeadingItem`. If a title isn't provided,
114
86
  * the `HeadingItem` won't be rendered, and this component will act as a regular `Section`.
@@ -123,6 +95,11 @@ export interface SectionProps {
123
95
  * If your menu contains a list, use this to add `<ul>` and `<li>` tags around the items. This is essential for offering better, accessible semantic markup in a list of items.
124
96
  */
125
97
  isList?: boolean;
98
+ /**
99
+ * When `true`, section header inline padding is reduced.
100
+ * @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.
101
+ */
102
+ isSideNavSection?: boolean;
126
103
  }
127
104
  export interface MenuItemPrimitiveProps {
128
105
  children: (props: {
@@ -8,4 +8,4 @@ export { default as SkeletonHeadingItem } from './menu-item/skeleton-heading-ite
8
8
  export { default as Section } from './menu-section/section';
9
9
  export { default as MenuGroup } from './menu-section/menu-group';
10
10
  export { default as PopupMenuGroup } from './menu-section/popup-menu-group';
11
- export type { ButtonItemProps, CSSFn, StatelessCSSFn, CustomItemComponentProps, CustomItemProps, HeadingItemProps, ItemState, LinkItemProps, MenuGroupProps, SectionProps, SkeletonHeadingItemProps, SkeletonItemProps, Dimension, MenuItemProps as BaseItemProps, Overrides, MenuGroupSizing, RenderFunction, SectionProps as SectionBaseProps, TitleOverrides, } from './types';
11
+ export type { ButtonItemProps, CSSFn, StatelessCSSFn, CustomItemComponentProps, CustomItemProps, HeadingItemProps, ItemState, LinkItemProps, MenuGroupProps, SectionProps, SkeletonHeadingItemProps, SkeletonItemProps, Dimension, MenuItemProps as BaseItemProps, MenuGroupSizing, RenderFunction, SectionProps as SectionBaseProps, } from './types';
@@ -1,25 +1,9 @@
1
- import { type ComponentType, type PropsWithChildren, type ReactNode, type Ref } from 'react';
1
+ import { type ComponentType, type PropsWithChildren, type Ref } from 'react';
2
2
  import { type CSSObject } from '@emotion/react';
3
3
  import type { SpacingMode } from './internal/components/menu-context';
4
4
  export interface RenderFunction<TProps = {}> {
5
5
  (Component: ComponentType | string, props: TProps): React.ReactNode;
6
6
  }
7
- /**
8
- * @deprecated This type is deprecated and will be removed in a future release. See DSP-2676 for more information.
9
- */
10
- export interface TitleOverrides {
11
- render?: RenderFunction<{
12
- className?: string;
13
- children: ReactNode;
14
- 'data-item-title': boolean;
15
- }>;
16
- }
17
- /**
18
- * @deprecated This type is deprecated and will be removed in a future release. See DSP-2676 for more information.
19
- */
20
- export interface Overrides {
21
- Title?: TitleOverrides;
22
- }
23
7
  export type Dimension = string | number;
24
8
  export interface MenuGroupSizing {
25
9
  /**
@@ -97,18 +81,6 @@ export interface SectionProps {
97
81
  * serving as a hook for automated tests.
98
82
  */
99
83
  testId?: string;
100
- /**
101
- * @deprecated This API is deprecated and will be removed in a future release. See DSP-2676 for more information.
102
- */
103
- overrides?: {
104
- HeadingItem?: {
105
- /**
106
- * A function that overrides the styles of the component.
107
- * It receives the current styles and state and expects a styles object.
108
- */
109
- cssFn?: StatelessCSSFn;
110
- };
111
- };
112
84
  /**
113
85
  * The text passed into the internal `HeadingItem`. If a title isn't provided,
114
86
  * the `HeadingItem` won't be rendered, and this component will act as a regular `Section`.
@@ -123,6 +95,11 @@ export interface SectionProps {
123
95
  * If your menu contains a list, use this to add `<ul>` and `<li>` tags around the items. This is essential for offering better, accessible semantic markup in a list of items.
124
96
  */
125
97
  isList?: boolean;
98
+ /**
99
+ * When `true`, section header inline padding is reduced.
100
+ * @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.
101
+ */
102
+ isSideNavSection?: boolean;
126
103
  }
127
104
  export interface MenuItemPrimitiveProps {
128
105
  children: (props: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/menu",
3
- "version": "5.0.0",
3
+ "version": "6.0.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/"
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/focus-ring": "^3.0.0",
47
47
  "@atlaskit/interaction-context": "^3.0.0",
48
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
- "@atlaskit/primitives": "^14.4.0",
49
+ "@atlaskit/primitives": "^14.7.0",
50
50
  "@atlaskit/theme": "^18.0.0",
51
51
  "@atlaskit/tokens": "^4.8.0",
52
52
  "@babel/runtime": "^7.0.0",
@@ -63,7 +63,7 @@
63
63
  "@af/visual-regression": "workspace:^",
64
64
  "@atlaskit/button": "^23.0.0",
65
65
  "@atlaskit/docs": "^10.0.0",
66
- "@atlaskit/icon": "^25.6.0",
66
+ "@atlaskit/icon": "^26.0.0",
67
67
  "@atlaskit/icon-file-type": "^7.0.0",
68
68
  "@atlaskit/icon-object": "^7.1.0",
69
69
  "@atlaskit/link": "^3.1.0",