@atlaskit/side-navigation 1.6.0 → 1.6.2

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,18 @@
1
1
  # @atlaskit/side-navigation
2
2
 
3
+ ## 1.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 1.6.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`3ca97be0c06`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3ca97be0c06) - Internal change only. Replace usages of Inline/Stack with stable version from `@atlaskit/primitives`.
14
+ - Updated dependencies
15
+
3
16
  ## 1.6.0
4
17
 
5
18
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  import SideNavigationProps from '!!extract-react-types-loader!../../src/components/SideNavigation'
2
2
  import HeaderProps from '!!extract-react-types-loader!../../src/components/Header'
3
- import FooterProps from '!!extract-react-types-loader!../../src/components/Footer'
3
+ import FooterProps from '!!extract-react-types-loader!../../docs/ert/footer'
4
4
  import NavigationContentProps from '!!extract-react-types-loader!../../src/components/NavigationContent'
5
5
  import NestableNavigationContentProps from '!!extract-react-types-loader!../../src/components/NestableNavigationContent'
6
6
  import SectionProps from '!!extract-react-types-loader!../../src/components/Section'
@@ -8,9 +8,9 @@ exports.default = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _box = _interopRequireDefault(require("@atlaskit/ds-explorations/box"));
11
- var _stack = _interopRequireDefault(require("@atlaskit/ds-explorations/stack"));
12
11
  var _text = _interopRequireDefault(require("@atlaskit/ds-explorations/text"));
13
12
  var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
13
+ var _stack = _interopRequireDefault(require("@atlaskit/primitives/stack"));
14
14
  var _colors = require("@atlaskit/theme/colors");
15
15
  var _styles = require("../../common/styles");
16
16
  var _Header = require("../Header");
@@ -97,14 +97,14 @@ var Footer = function Footer(_ref2) {
97
97
  padding: "space.100",
98
98
  testId: testId
99
99
  }, /*#__PURE__*/_react.default.createElement(_stack.default, {
100
- gap: "space.100",
101
- alignItems: "center"
100
+ space: "100",
101
+ alignInline: "center"
102
102
  }, /*#__PURE__*/_react.default.createElement(_box.default, {
103
103
  display: "inlineBlock",
104
104
  width: "size.200",
105
105
  height: "size.200"
106
106
  }, iconBefore), /*#__PURE__*/_react.default.createElement(_stack.default, {
107
- gap: "space.075"
107
+ space: "075"
108
108
  }, /*#__PURE__*/_react.default.createElement(_text.default, {
109
109
  fontSize: "size.075",
110
110
  textAlign: "center",
@@ -42,13 +42,10 @@ var LoadingItems = function LoadingItems(_ref) {
42
42
  key: "loading-section-".concat(isLoading),
43
43
  duration: _motion.mediumDurationMs
44
44
  }, function (motion, state) {
45
- return (
46
- // eslint-disable-next-line @repo/internal/react/use-primitives
47
- (0, _react.jsx)("span", (0, _extends2.default)({}, motion, {
48
- "data-testid": testId && "".concat(testId, "--").concat(state),
49
- css: [baseMotionStyles, state === 'entering' && enteringStyles]
50
- }), isLoading ? fallback : children)
51
- );
45
+ return (0, _react.jsx)("span", (0, _extends2.default)({}, motion, {
46
+ "data-testid": testId && "".concat(testId, "--").concat(state),
47
+ css: [baseMotionStyles, state === 'entering' && enteringStyles]
48
+ }), isLoading ? fallback : children);
52
49
  }));
53
50
  };
54
51
  var _default = LoadingItems;
@@ -10,7 +10,6 @@ var _react2 = require("@emotion/react");
10
10
  var _useScrollbarWidth = _interopRequireDefault(require("@atlaskit/ds-lib/use-scrollbar-width"));
11
11
  var _context = require("../NestableNavigationContent/context");
12
12
  var _styles = require("./styles");
13
- /* eslint-disable @repo/internal/react/use-primitives */
14
13
  /** @jsx jsx */
15
14
 
16
15
  /**
@@ -146,38 +146,32 @@ var NestableNavigationContent = function NestableNavigationContent(props) {
146
146
  containerRef.current && containerRef.current.focus();
147
147
  }
148
148
  };
149
- return (
150
- // eslint-disable-next-line @repo/internal/react/use-primitives
151
- (0, _react2.jsx)("div", {
152
- "data-testid": testId,
153
- css: nestableNavigationContentStyles,
154
- ref: containerRef,
155
- tabIndex: -1,
156
- onClick: manageFocus
157
- }, (0, _react2.jsx)(_motion.ExitingPersistence, null, (0, _react2.jsx)(_nestingMotion.NestingMotion
158
- // Key is needed to have a unique react instance per stack name.
159
- // This enables us to easily animate it in & out with exiting persistence.
160
- , {
161
- key: currentStackId,
162
- enterFrom: transition === 'nesting' ? 'right' : 'left',
163
- exitTo: transition === 'nesting' ? 'left' : 'right',
164
- testId: testId && "".concat(testId, "-anim")
165
- }, function (motion) {
166
- return (
167
- // eslint-disable-next-line @repo/internal/react/use-primitives
168
- (0, _react2.jsx)("div", (0, _extends2.default)({
169
- css: nestingRootStyles
170
- }, motion), (0, _react2.jsx)(_context.NestedContext.Provider, {
171
- // This provider is inside the NestingMotion to ensure it keeps a stale
172
- // reference to the previous value.
173
- value: context
174
- }, (0, _react2.jsx)(_NestingItem.default, {
175
- title: "",
176
- id: ROOT_ID
177
- }, children)))
178
- );
179
- })))
180
- );
149
+ return (0, _react2.jsx)("div", {
150
+ "data-testid": testId,
151
+ css: nestableNavigationContentStyles,
152
+ ref: containerRef,
153
+ tabIndex: -1,
154
+ onClick: manageFocus
155
+ }, (0, _react2.jsx)(_motion.ExitingPersistence, null, (0, _react2.jsx)(_nestingMotion.NestingMotion
156
+ // Key is needed to have a unique react instance per stack name.
157
+ // This enables us to easily animate it in & out with exiting persistence.
158
+ , {
159
+ key: currentStackId,
160
+ enterFrom: transition === 'nesting' ? 'right' : 'left',
161
+ exitTo: transition === 'nesting' ? 'left' : 'right',
162
+ testId: testId && "".concat(testId, "-anim")
163
+ }, function (motion) {
164
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
165
+ css: nestingRootStyles
166
+ }, motion), (0, _react2.jsx)(_context.NestedContext.Provider, {
167
+ // This provider is inside the NestingMotion to ensure it keeps a stale
168
+ // reference to the previous value.
169
+ value: context
170
+ }, (0, _react2.jsx)(_NestingItem.default, {
171
+ title: "",
172
+ id: ROOT_ID
173
+ }, children)));
174
+ })));
181
175
  };
182
176
  var _default = NestableNavigationContent;
183
177
  exports.default = _default;
@@ -7,7 +7,6 @@ exports.default = void 0;
7
7
  var _react = require("react");
8
8
  var _react2 = require("@emotion/react");
9
9
  var _colors = require("@atlaskit/theme/colors");
10
- /* eslint-disable @repo/internal/react/use-primitives */
11
10
  /** @jsx jsx */
12
11
 
13
12
  var sidebarMinWidth = '240px';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "sideEffects": false
5
5
  }
@@ -2,9 +2,9 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  /* eslint-disable @repo/internal/react/consistent-props-definitions */
3
3
  import React from 'react';
4
4
  import Box from '@atlaskit/ds-explorations/box';
5
- import Stack from '@atlaskit/ds-explorations/stack';
6
5
  import Text from '@atlaskit/ds-explorations/text';
7
6
  import warnOnce from '@atlaskit/ds-lib/warn-once';
7
+ import Stack from '@atlaskit/primitives/stack';
8
8
  import { N500 } from '@atlaskit/theme/colors';
9
9
  import { overrideStyleFunction } from '../../common/styles';
10
10
  import { Container } from '../Header';
@@ -87,14 +87,14 @@ const Footer = ({
87
87
  padding: "space.100",
88
88
  testId: testId
89
89
  }, /*#__PURE__*/React.createElement(Stack, {
90
- gap: "space.100",
91
- alignItems: "center"
90
+ space: "100",
91
+ alignInline: "center"
92
92
  }, /*#__PURE__*/React.createElement(Box, {
93
93
  display: "inlineBlock",
94
94
  width: "size.200",
95
95
  height: "size.200"
96
96
  }, iconBefore), /*#__PURE__*/React.createElement(Stack, {
97
- gap: "space.075"
97
+ space: "075"
98
98
  }, /*#__PURE__*/React.createElement(Text, {
99
99
  fontSize: "size.075",
100
100
  textAlign: "center",
@@ -1,5 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- /* eslint-disable @repo/internal/react/use-primitives */
3
2
  import React, { forwardRef } from 'react';
4
3
  import Box from '@atlaskit/ds-explorations/box';
5
4
  import { N500 } from '@atlaskit/theme/colors';
@@ -35,9 +35,7 @@ const LoadingItems = ({
35
35
  return jsx(ExitingPersistence, null, jsx(FadeIn, {
36
36
  key: `loading-section-${isLoading}`,
37
37
  duration: mediumDurationMs
38
- }, (motion, state) =>
39
- // eslint-disable-next-line @repo/internal/react/use-primitives
40
- jsx("span", _extends({}, motion, {
38
+ }, (motion, state) => jsx("span", _extends({}, motion, {
41
39
  "data-testid": testId && `${testId}--${state}`,
42
40
  css: [baseMotionStyles, state === 'entering' && enteringStyles]
43
41
  }), isLoading ? fallback : children)));
@@ -1,4 +1,3 @@
1
- /* eslint-disable @repo/internal/react/use-primitives */
2
1
  /** @jsx jsx */
3
2
  import { forwardRef } from 'react';
4
3
  import { jsx } from '@emotion/react';
@@ -129,34 +129,29 @@ const NestableNavigationContent = props => {
129
129
  containerRef.current && containerRef.current.focus();
130
130
  }
131
131
  };
132
- return (
133
- // eslint-disable-next-line @repo/internal/react/use-primitives
134
- jsx("div", {
135
- "data-testid": testId,
136
- css: nestableNavigationContentStyles,
137
- ref: containerRef,
138
- tabIndex: -1,
139
- onClick: manageFocus
140
- }, jsx(ExitingPersistence, null, jsx(NestingMotion
141
- // Key is needed to have a unique react instance per stack name.
142
- // This enables us to easily animate it in & out with exiting persistence.
143
- , {
144
- key: currentStackId,
145
- enterFrom: transition === 'nesting' ? 'right' : 'left',
146
- exitTo: transition === 'nesting' ? 'left' : 'right',
147
- testId: testId && `${testId}-anim`
148
- }, motion =>
149
- // eslint-disable-next-line @repo/internal/react/use-primitives
150
- jsx("div", _extends({
151
- css: nestingRootStyles
152
- }, motion), jsx(NestedContext.Provider, {
153
- // This provider is inside the NestingMotion to ensure it keeps a stale
154
- // reference to the previous value.
155
- value: context
156
- }, jsx(NestingItem, {
157
- title: "",
158
- id: ROOT_ID
159
- }, children))))))
160
- );
132
+ return jsx("div", {
133
+ "data-testid": testId,
134
+ css: nestableNavigationContentStyles,
135
+ ref: containerRef,
136
+ tabIndex: -1,
137
+ onClick: manageFocus
138
+ }, jsx(ExitingPersistence, null, jsx(NestingMotion
139
+ // Key is needed to have a unique react instance per stack name.
140
+ // This enables us to easily animate it in & out with exiting persistence.
141
+ , {
142
+ key: currentStackId,
143
+ enterFrom: transition === 'nesting' ? 'right' : 'left',
144
+ exitTo: transition === 'nesting' ? 'left' : 'right',
145
+ testId: testId && `${testId}-anim`
146
+ }, motion => jsx("div", _extends({
147
+ css: nestingRootStyles
148
+ }, motion), jsx(NestedContext.Provider, {
149
+ // This provider is inside the NestingMotion to ensure it keeps a stale
150
+ // reference to the previous value.
151
+ value: context
152
+ }, jsx(NestingItem, {
153
+ title: "",
154
+ id: ROOT_ID
155
+ }, children))))));
161
156
  };
162
157
  export default NestableNavigationContent;
@@ -1,4 +1,3 @@
1
- /* eslint-disable @repo/internal/react/use-primitives */
2
1
  /** @jsx jsx */
3
2
  import { forwardRef } from 'react';
4
3
  import { css, jsx } from '@emotion/react';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "sideEffects": false
5
5
  }
@@ -2,9 +2,9 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  /* eslint-disable @repo/internal/react/consistent-props-definitions */
3
3
  import React from 'react';
4
4
  import Box from '@atlaskit/ds-explorations/box';
5
- import Stack from '@atlaskit/ds-explorations/stack';
6
5
  import Text from '@atlaskit/ds-explorations/text';
7
6
  import warnOnce from '@atlaskit/ds-lib/warn-once';
7
+ import Stack from '@atlaskit/primitives/stack';
8
8
  import { N500 } from '@atlaskit/theme/colors';
9
9
  import { overrideStyleFunction } from '../../common/styles';
10
10
  import { Container } from '../Header';
@@ -89,14 +89,14 @@ var Footer = function Footer(_ref2) {
89
89
  padding: "space.100",
90
90
  testId: testId
91
91
  }, /*#__PURE__*/React.createElement(Stack, {
92
- gap: "space.100",
93
- alignItems: "center"
92
+ space: "100",
93
+ alignInline: "center"
94
94
  }, /*#__PURE__*/React.createElement(Box, {
95
95
  display: "inlineBlock",
96
96
  width: "size.200",
97
97
  height: "size.200"
98
98
  }, iconBefore), /*#__PURE__*/React.createElement(Stack, {
99
- gap: "space.075"
99
+ space: "075"
100
100
  }, /*#__PURE__*/React.createElement(Text, {
101
101
  fontSize: "size.075",
102
102
  textAlign: "center",
@@ -3,7 +3,6 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["children"],
5
5
  _excluded2 = ["children"];
6
- /* eslint-disable @repo/internal/react/use-primitives */
7
6
  import React, { forwardRef } from 'react';
8
7
  import Box from '@atlaskit/ds-explorations/box';
9
8
  import { N500 } from '@atlaskit/theme/colors';
@@ -34,13 +34,10 @@ var LoadingItems = function LoadingItems(_ref) {
34
34
  key: "loading-section-".concat(isLoading),
35
35
  duration: mediumDurationMs
36
36
  }, function (motion, state) {
37
- return (
38
- // eslint-disable-next-line @repo/internal/react/use-primitives
39
- jsx("span", _extends({}, motion, {
40
- "data-testid": testId && "".concat(testId, "--").concat(state),
41
- css: [baseMotionStyles, state === 'entering' && enteringStyles]
42
- }), isLoading ? fallback : children)
43
- );
37
+ return jsx("span", _extends({}, motion, {
38
+ "data-testid": testId && "".concat(testId, "--").concat(state),
39
+ css: [baseMotionStyles, state === 'entering' && enteringStyles]
40
+ }), isLoading ? fallback : children);
44
41
  }));
45
42
  };
46
43
  export default LoadingItems;
@@ -1,4 +1,3 @@
1
- /* eslint-disable @repo/internal/react/use-primitives */
2
1
  /** @jsx jsx */
3
2
  import { forwardRef } from 'react';
4
3
  import { jsx } from '@emotion/react';
@@ -137,37 +137,31 @@ var NestableNavigationContent = function NestableNavigationContent(props) {
137
137
  containerRef.current && containerRef.current.focus();
138
138
  }
139
139
  };
140
- return (
141
- // eslint-disable-next-line @repo/internal/react/use-primitives
142
- jsx("div", {
143
- "data-testid": testId,
144
- css: nestableNavigationContentStyles,
145
- ref: containerRef,
146
- tabIndex: -1,
147
- onClick: manageFocus
148
- }, jsx(ExitingPersistence, null, jsx(NestingMotion
149
- // Key is needed to have a unique react instance per stack name.
150
- // This enables us to easily animate it in & out with exiting persistence.
151
- , {
152
- key: currentStackId,
153
- enterFrom: transition === 'nesting' ? 'right' : 'left',
154
- exitTo: transition === 'nesting' ? 'left' : 'right',
155
- testId: testId && "".concat(testId, "-anim")
156
- }, function (motion) {
157
- return (
158
- // eslint-disable-next-line @repo/internal/react/use-primitives
159
- jsx("div", _extends({
160
- css: nestingRootStyles
161
- }, motion), jsx(NestedContext.Provider, {
162
- // This provider is inside the NestingMotion to ensure it keeps a stale
163
- // reference to the previous value.
164
- value: context
165
- }, jsx(NestingItem, {
166
- title: "",
167
- id: ROOT_ID
168
- }, children)))
169
- );
170
- })))
171
- );
140
+ return jsx("div", {
141
+ "data-testid": testId,
142
+ css: nestableNavigationContentStyles,
143
+ ref: containerRef,
144
+ tabIndex: -1,
145
+ onClick: manageFocus
146
+ }, jsx(ExitingPersistence, null, jsx(NestingMotion
147
+ // Key is needed to have a unique react instance per stack name.
148
+ // This enables us to easily animate it in & out with exiting persistence.
149
+ , {
150
+ key: currentStackId,
151
+ enterFrom: transition === 'nesting' ? 'right' : 'left',
152
+ exitTo: transition === 'nesting' ? 'left' : 'right',
153
+ testId: testId && "".concat(testId, "-anim")
154
+ }, function (motion) {
155
+ return jsx("div", _extends({
156
+ css: nestingRootStyles
157
+ }, motion), jsx(NestedContext.Provider, {
158
+ // This provider is inside the NestingMotion to ensure it keeps a stale
159
+ // reference to the previous value.
160
+ value: context
161
+ }, jsx(NestingItem, {
162
+ title: "",
163
+ id: ROOT_ID
164
+ }, children)));
165
+ })));
172
166
  };
173
167
  export default NestableNavigationContent;
@@ -1,4 +1,3 @@
1
- /* eslint-disable @repo/internal/react/use-primitives */
2
1
  /** @jsx jsx */
3
2
  import { forwardRef } from 'react';
4
3
  import { css, jsx } from '@emotion/react';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "sideEffects": false
5
5
  }
@@ -41,7 +41,6 @@ export declare type HeaderProps = {
41
41
  * Custom component to render as an item.
42
42
  * This can be both a functional component or a class component.
43
43
  * __Will return `null` if no component is defined.__
44
- *
45
44
  * __NOTE:__ Make sure the reference for this component does not change between renders else undefined behavior may happen.
46
45
  */
47
46
  component?: React.ComponentType<CustomItemComponentProps>;
package/docs/00-intro.tsx CHANGED
@@ -1,4 +1,3 @@
1
- /* eslint-disable @repo/internal/react/use-primitives */
2
1
  import React from 'react';
3
2
 
4
3
  import { md } from '@atlaskit/docs';
@@ -0,0 +1,16 @@
1
+ /* eslint-disable @repo/internal/deprecations/deprecation-ticket-required */
2
+ /* eslint-disable @repo/internal/react/boolean-prop-naming-convention */
3
+ /* eslint-disable @repo/internal/react/consistent-props-definitions */
4
+
5
+ import { HeaderProps } from '../../src/components/Header';
6
+
7
+ interface FooterProps extends HeaderProps {
8
+ /**
9
+ * @deprecated
10
+ * Enables use of deprecated `cssFn`, `onClick` and `component` props.
11
+ * If this prop is not set to true, you will see a deprecation warning.
12
+ */
13
+ useDeprecatedApi?: boolean;
14
+ }
15
+
16
+ export default (props: FooterProps) => null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "A highly composable side navigation component that supports nested views.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -15,7 +15,6 @@
15
15
  "sideEffects": false,
16
16
  "atlaskit:src": "src/index.tsx",
17
17
  "atlassian": {
18
- "disableProductCI": true,
19
18
  "team": "Design System Team",
20
19
  "deprecatedAutoEntryPoints": true,
21
20
  "releaseModel": "scheduled",
@@ -30,7 +29,8 @@
30
29
  "@atlaskit/icon": "^21.11.0",
31
30
  "@atlaskit/menu": "^1.5.0",
32
31
  "@atlaskit/motion": "^1.3.0",
33
- "@atlaskit/theme": "^12.2.0",
32
+ "@atlaskit/primitives": "^0.5.0",
33
+ "@atlaskit/theme": "^12.3.0",
34
34
  "@atlaskit/tokens": "^1.2.0",
35
35
  "@babel/runtime": "^7.0.0",
36
36
  "@emotion/react": "^11.7.1"
@@ -39,11 +39,11 @@
39
39
  "react": "^16.8.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@atlaskit/atlassian-navigation": "^2.3.0",
43
- "@atlaskit/button": "^16.5.0",
42
+ "@atlaskit/atlassian-navigation": "^2.4.0",
43
+ "@atlaskit/button": "^16.6.0",
44
44
  "@atlaskit/docs": "*",
45
45
  "@atlaskit/logo": "^13.11.0",
46
- "@atlaskit/onboarding": "^10.6.0",
46
+ "@atlaskit/onboarding": "^10.7.0",
47
47
  "@atlaskit/section-message": "^6.3.0",
48
48
  "@atlaskit/select": "^16.1.0",
49
49
  "@atlaskit/visual-regression": "*",