@atlaskit/side-navigation 1.6.1 → 1.6.3
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 +12 -0
- package/dist/cjs/components/LoadingItems/index.js +4 -7
- package/dist/cjs/components/NavigationContent/index.js +0 -1
- package/dist/cjs/components/NestableNavigationContent/index.js +26 -32
- package/dist/cjs/components/SideNavigation/index.js +0 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/Header/index.js +0 -1
- package/dist/es2019/components/LoadingItems/index.js +1 -3
- package/dist/es2019/components/NavigationContent/index.js +0 -1
- package/dist/es2019/components/NestableNavigationContent/index.js +24 -29
- package/dist/es2019/components/SideNavigation/index.js +0 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/Header/index.js +0 -1
- package/dist/esm/components/LoadingItems/index.js +4 -7
- package/dist/esm/components/NavigationContent/index.js +0 -1
- package/dist/esm/components/NestableNavigationContent/index.js +26 -32
- package/dist/esm/components/SideNavigation/index.js +0 -1
- package/dist/esm/version.json +1 -1
- package/docs/00-intro.tsx +0 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
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';
|
package/dist/cjs/version.json
CHANGED
|
@@ -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)));
|
|
@@ -129,34 +129,29 @@ const NestableNavigationContent = props => {
|
|
|
129
129
|
containerRef.current && containerRef.current.focus();
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
|
-
return (
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
//
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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;
|
package/dist/es2019/version.json
CHANGED
|
@@ -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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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;
|
|
@@ -137,37 +137,31 @@ var NestableNavigationContent = function NestableNavigationContent(props) {
|
|
|
137
137
|
containerRef.current && containerRef.current.focus();
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
|
-
return (
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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;
|
package/dist/esm/version.json
CHANGED
package/docs/00-intro.tsx
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/side-navigation",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
4
4
|
"description": "A highly composable side navigation component that supports nested views.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@atlaskit/icon": "^21.11.0",
|
|
30
30
|
"@atlaskit/menu": "^1.5.0",
|
|
31
31
|
"@atlaskit/motion": "^1.3.0",
|
|
32
|
-
"@atlaskit/primitives": "^0.
|
|
32
|
+
"@atlaskit/primitives": "^0.6.0",
|
|
33
33
|
"@atlaskit/theme": "^12.3.0",
|
|
34
34
|
"@atlaskit/tokens": "^1.2.0",
|
|
35
35
|
"@babel/runtime": "^7.0.0",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"react": "^16.8.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@atlaskit/atlassian-navigation": "^2.
|
|
43
|
-
"@atlaskit/button": "^16.
|
|
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.
|
|
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": "*",
|