@atlaskit/side-navigation 2.0.5 → 3.0.1

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,35 @@
1
1
  # @atlaskit/side-navigation
2
2
 
3
+ ## 3.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#42240](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42240) [`e5f784d7889`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e5f784d7889) - Add explicit `href` to link item.
8
+
9
+ ## 3.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - [#41355](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41355) [`cd1c813da18`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cd1c813da18) - Menu items now have a secondary selected state (border or notch), this was previously feature flagged for Atlassian experiences and is now available for everyone.
14
+
15
+ This change makes all menu items are now relatively positioned, if you had any child elements that leaned on this behaviour your experiences will now be broken!
16
+
17
+ For example the below code code previously the `div` would be positioned relatively to the menu group element. Now, it is positioned relatively to the button item element.
18
+
19
+ ```jsx
20
+ <MenuGroup>
21
+ <ButtonItem>
22
+ <div style={{ position: 'absolute', top: '100%' }} />
23
+ </ButtonItem>
24
+ </MenuGroup>
25
+ ```
26
+
27
+ As a path forward you should not be leaning on this behaviour. If you need a popup experience use `@atlaskit/dropdown-menu` or `@atlaskit/popup`.
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies
32
+
3
33
  ## 2.0.5
4
34
 
5
35
  ### Patch Changes
@@ -12,7 +12,7 @@ var _react = _interopRequireWildcard(require("react"));
12
12
  var _menu = require("@atlaskit/menu");
13
13
  var _styles = require("../../common/styles");
14
14
  var _context = require("../NestableNavigationContent/context");
15
- var _excluded = ["cssFn"];
15
+ var _excluded = ["cssFn", "href"];
16
16
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
17
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
18
  /**
@@ -30,6 +30,7 @@ var LinkItem = /*#__PURE__*/(0, _react.forwardRef)(
30
30
  // Type needed on props to extract types with extract react types.
31
31
  function (_ref, ref) {
32
32
  var cssFn = _ref.cssFn,
33
+ href = _ref.href,
33
34
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
34
35
  var _useShouldNestedEleme = (0, _context.useShouldNestedElementRender)(),
35
36
  shouldRender = _useShouldNestedEleme.shouldRender;
@@ -40,7 +41,8 @@ function (_ref, ref) {
40
41
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-apis, @repo/internal/react/no-unsafe-overrides
41
42
  return /*#__PURE__*/_react.default.createElement(_menu.LinkItem, (0, _extends2.default)({
42
43
  ref: ref,
43
- cssFn: cssOverride
44
+ cssFn: cssOverride,
45
+ href: href
44
46
  }, rest));
45
47
  });
46
48
  var _default = exports.default = LinkItem;
@@ -18,6 +18,7 @@ const LinkItem = /*#__PURE__*/forwardRef(
18
18
  // Type needed on props to extract types with extract react types.
19
19
  ({
20
20
  cssFn,
21
+ href,
21
22
  ...rest
22
23
  }, ref) => {
23
24
  const {
@@ -30,7 +31,8 @@ const LinkItem = /*#__PURE__*/forwardRef(
30
31
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-apis, @repo/internal/react/no-unsafe-overrides
31
32
  return /*#__PURE__*/React.createElement(Link, _extends({
32
33
  ref: ref,
33
- cssFn: cssOverride
34
+ cssFn: cssOverride,
35
+ href: href
34
36
  }, rest));
35
37
  });
36
38
  export default LinkItem;
@@ -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 = ["cssFn"];
3
+ var _excluded = ["cssFn", "href"];
4
4
  import React, { forwardRef } from 'react';
5
5
  import { LinkItem as Link } from '@atlaskit/menu';
6
6
  import { baseSideNavItemStyle, overrideStyleFunction } from '../../common/styles';
@@ -20,6 +20,7 @@ var LinkItem = /*#__PURE__*/forwardRef(
20
20
  // Type needed on props to extract types with extract react types.
21
21
  function (_ref, ref) {
22
22
  var cssFn = _ref.cssFn,
23
+ href = _ref.href,
23
24
  rest = _objectWithoutProperties(_ref, _excluded);
24
25
  var _useShouldNestedEleme = useShouldNestedElementRender(),
25
26
  shouldRender = _useShouldNestedEleme.shouldRender;
@@ -30,7 +31,8 @@ function (_ref, ref) {
30
31
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-apis, @repo/internal/react/no-unsafe-overrides
31
32
  return /*#__PURE__*/React.createElement(Link, _extends({
32
33
  ref: ref,
33
- cssFn: cssOverride
34
+ cssFn: cssOverride,
35
+ href: href
34
36
  }, rest));
35
37
  });
36
38
  export default LinkItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "2.0.5",
3
+ "version": "3.0.1",
4
4
  "description": "A highly composable side navigation component that supports nested views.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,14 +12,6 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.5 <4.9": {
17
- "*": [
18
- "dist/types-ts4.5/*",
19
- "dist/types-ts4.5/index.d.ts"
20
- ]
21
- }
22
- },
23
15
  "sideEffects": false,
24
16
  "atlaskit:src": "src/index.tsx",
25
17
  "atlassian": {
@@ -35,11 +27,11 @@
35
27
  "@atlaskit/ds-explorations": "^3.0.0",
36
28
  "@atlaskit/ds-lib": "^2.2.0",
37
29
  "@atlaskit/icon": "^21.12.0",
38
- "@atlaskit/menu": "^1.11.0",
30
+ "@atlaskit/menu": "^2.1.0",
39
31
  "@atlaskit/motion": "^1.5.0",
40
- "@atlaskit/primitives": "^1.6.0",
32
+ "@atlaskit/primitives": "^1.8.0",
41
33
  "@atlaskit/theme": "^12.6.0",
42
- "@atlaskit/tokens": "^1.25.0",
34
+ "@atlaskit/tokens": "^1.28.0",
43
35
  "@babel/runtime": "^7.0.0",
44
36
  "@emotion/react": "^11.7.1"
45
37
  },
@@ -81,9 +73,12 @@
81
73
  "deprecation": "no-deprecated-imports"
82
74
  }
83
75
  },
84
- "platform-feature-flags": {
85
- "platform.design-system-team.menu-selected-state-change_0see9": {
86
- "type": "boolean"
76
+ "typesVersions": {
77
+ ">=4.5 <4.9": {
78
+ "*": [
79
+ "dist/types-ts4.5/*",
80
+ "dist/types-ts4.5/index.d.ts"
81
+ ]
87
82
  }
88
83
  },
89
84
  "homepage": "https://atlassian.design/components/side-navigation/",