@atlaskit/side-navigation 4.1.0 → 4.2.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 +10 -0
- package/afm-cc/tsconfig.json +0 -3
- package/afm-jira/tsconfig.json +0 -3
- package/afm-post-office/tsconfig.json +0 -3
- package/dist/cjs/components/Footer/index.js +18 -21
- package/dist/cjs/components/Header/index.js +18 -16
- package/dist/cjs/components/LoadingItems/index.js +24 -9
- package/dist/cjs/components/NavigationContent/index.js +26 -27
- package/dist/cjs/components/NavigationFooter/index.js +9 -13
- package/dist/cjs/components/NavigationHeader/index.js +18 -13
- package/dist/cjs/components/NestableNavigationContent/index.js +29 -14
- package/dist/cjs/components/NestableNavigationContent/nesting-motion.js +6 -3
- package/dist/cjs/components/NestingItem/index.js +20 -17
- package/dist/cjs/components/SideNavigation/index.js +23 -17
- package/dist/es2019/components/Footer/index.js +8 -10
- package/dist/es2019/components/Header/index.js +18 -13
- package/dist/es2019/components/LoadingItems/index.js +23 -9
- package/dist/es2019/components/NavigationContent/index.js +26 -22
- package/dist/es2019/components/NavigationFooter/index.js +7 -9
- package/dist/es2019/components/NavigationHeader/index.js +17 -10
- package/dist/es2019/components/NestableNavigationContent/index.js +28 -14
- package/dist/es2019/components/NestableNavigationContent/nesting-motion.js +8 -2
- package/dist/es2019/components/NestingItem/index.js +21 -17
- package/dist/es2019/components/SideNavigation/index.js +21 -9
- package/dist/esm/components/Footer/index.js +8 -10
- package/dist/esm/components/Header/index.js +18 -13
- package/dist/esm/components/LoadingItems/index.js +23 -9
- package/dist/esm/components/NavigationContent/index.js +26 -25
- package/dist/esm/components/NavigationFooter/index.js +7 -9
- package/dist/esm/components/NavigationHeader/index.js +17 -10
- package/dist/esm/components/NestableNavigationContent/index.js +28 -14
- package/dist/esm/components/NestableNavigationContent/nesting-motion.js +8 -2
- package/dist/esm/components/NestingItem/index.js +21 -17
- package/dist/esm/components/SideNavigation/index.js +21 -13
- package/dist/types/components/Header/index.d.ts +4 -3
- package/dist/types/components/LoadingItems/index.d.ts +1 -5
- package/dist/types/components/NavigationContent/index.d.ts +2 -2
- package/dist/types/components/NavigationFooter/index.d.ts +0 -4
- package/dist/types/components/NavigationHeader/index.d.ts +6 -1
- package/dist/types/components/NestableNavigationContent/index.d.ts +2 -1
- package/dist/types/components/NestableNavigationContent/nesting-motion.d.ts +7 -2
- package/dist/types-ts4.5/components/Header/index.d.ts +4 -3
- package/dist/types-ts4.5/components/LoadingItems/index.d.ts +1 -5
- package/dist/types-ts4.5/components/NavigationContent/index.d.ts +2 -2
- package/dist/types-ts4.5/components/NavigationFooter/index.d.ts +0 -4
- package/dist/types-ts4.5/components/NavigationHeader/index.d.ts +6 -1
- package/dist/types-ts4.5/components/NestableNavigationContent/index.d.ts +2 -1
- package/dist/types-ts4.5/components/NestableNavigationContent/nesting-motion.d.ts +7 -2
- package/package.json +2 -3
- package/dist/cjs/components/Footer/index.compiled.css +0 -3
- package/dist/cjs/components/LoadingItems/index.compiled.css +0 -7
- package/dist/cjs/components/NavigationContent/index.compiled.css +0 -46
- package/dist/cjs/components/NavigationFooter/index.compiled.css +0 -1
- package/dist/cjs/components/NavigationHeader/index.compiled.css +0 -3
- package/dist/cjs/components/NestableNavigationContent/index.compiled.css +0 -9
- package/dist/cjs/components/NestingItem/index.compiled.css +0 -1
- package/dist/cjs/components/SideNavigation/index.compiled.css +0 -10
- package/dist/es2019/components/Footer/index.compiled.css +0 -3
- package/dist/es2019/components/LoadingItems/index.compiled.css +0 -7
- package/dist/es2019/components/NavigationContent/index.compiled.css +0 -46
- package/dist/es2019/components/NavigationFooter/index.compiled.css +0 -1
- package/dist/es2019/components/NavigationHeader/index.compiled.css +0 -3
- package/dist/es2019/components/NestableNavigationContent/index.compiled.css +0 -9
- package/dist/es2019/components/NestingItem/index.compiled.css +0 -1
- package/dist/es2019/components/SideNavigation/index.compiled.css +0 -10
- package/dist/esm/components/Footer/index.compiled.css +0 -3
- package/dist/esm/components/LoadingItems/index.compiled.css +0 -7
- package/dist/esm/components/NavigationContent/index.compiled.css +0 -46
- package/dist/esm/components/NavigationFooter/index.compiled.css +0 -1
- package/dist/esm/components/NavigationHeader/index.compiled.css +0 -3
- package/dist/esm/components/NestableNavigationContent/index.compiled.css +0 -9
- package/dist/esm/components/NestingItem/index.compiled.css +0 -1
- package/dist/esm/components/SideNavigation/index.compiled.css +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/side-navigation
|
|
2
2
|
|
|
3
|
+
## 4.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#95255](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/95255)
|
|
8
|
+
[`55f6cfd027e9e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/55f6cfd027e9e) -
|
|
9
|
+
Revert the Compiled migration introduced in `v4.0.0`, as it caused laggy animations in nested
|
|
10
|
+
navigation. The migration will be reintroduced once `@atlaskit/motion` has been updated to use
|
|
11
|
+
Compiled.
|
|
12
|
+
|
|
3
13
|
## 4.1.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/afm-cc/tsconfig.json
CHANGED
package/afm-jira/tsconfig.json
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
2
1
|
"use strict";
|
|
3
2
|
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
4
|
Object.defineProperty(exports, "__esModule", {
|
|
7
5
|
value: true
|
|
8
6
|
});
|
|
9
7
|
exports.default = void 0;
|
|
10
|
-
require("./index.compiled.css");
|
|
11
|
-
var React = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _runtime = require("@compiled/react/runtime");
|
|
13
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
14
10
|
var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
|
|
15
|
-
var
|
|
11
|
+
var _primitives = require("@atlaskit/primitives");
|
|
16
12
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
13
|
var _styles = require("../../common/styles");
|
|
18
14
|
var _Header = require("../Header");
|
|
19
15
|
var _Item = require("../Item");
|
|
20
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
16
|
/* eslint-disable @repo/internal/react/consistent-props-definitions */
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
|
|
18
|
+
var iconContainerStyles = (0, _primitives.xcss)({
|
|
19
|
+
display: 'inline-block',
|
|
20
|
+
width: '1.5rem',
|
|
21
|
+
height: '1.5rem'
|
|
22
|
+
});
|
|
26
23
|
/**
|
|
27
24
|
* __Footer__
|
|
28
25
|
*
|
|
@@ -79,7 +76,7 @@ var OldFooter = function OldFooter(props) {
|
|
|
79
76
|
testId: testId
|
|
80
77
|
};
|
|
81
78
|
}(props);
|
|
82
|
-
return /*#__PURE__*/
|
|
79
|
+
return /*#__PURE__*/_react.default.createElement(_Item.CustomItem, (0, _extends2.default)({}, safeProps, {
|
|
83
80
|
component: props.component || _Header.Container
|
|
84
81
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
85
82
|
,
|
|
@@ -98,21 +95,21 @@ var Footer = function Footer(_ref2) {
|
|
|
98
95
|
children = _ref2.children,
|
|
99
96
|
iconBefore = _ref2.iconBefore,
|
|
100
97
|
testId = _ref2.testId;
|
|
101
|
-
return /*#__PURE__*/
|
|
98
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
102
99
|
padding: "space.100",
|
|
103
100
|
testId: testId
|
|
104
|
-
}, /*#__PURE__*/
|
|
101
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Stack, {
|
|
105
102
|
space: "space.100",
|
|
106
103
|
alignInline: "center"
|
|
107
|
-
}, /*#__PURE__*/
|
|
108
|
-
xcss:
|
|
109
|
-
}, iconBefore), /*#__PURE__*/
|
|
104
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
105
|
+
xcss: iconContainerStyles
|
|
106
|
+
}, iconBefore), /*#__PURE__*/_react.default.createElement(_primitives.Stack, {
|
|
110
107
|
space: "space.075"
|
|
111
|
-
}, /*#__PURE__*/
|
|
108
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Text, {
|
|
112
109
|
size: "UNSAFE_small",
|
|
113
110
|
align: "center",
|
|
114
111
|
color: "inherit"
|
|
115
|
-
}, children), description && /*#__PURE__*/
|
|
112
|
+
}, children), description && /*#__PURE__*/_react.default.createElement(_primitives.Text, {
|
|
116
113
|
size: "UNSAFE_small",
|
|
117
114
|
as: "p",
|
|
118
115
|
align: "center",
|
|
@@ -137,7 +134,7 @@ var FooterFacade = function FooterFacade(_ref3) {
|
|
|
137
134
|
cssFn = _ref3.cssFn,
|
|
138
135
|
onClick = _ref3.onClick;
|
|
139
136
|
if (!useDeprecatedApi) {
|
|
140
|
-
return /*#__PURE__*/
|
|
137
|
+
return /*#__PURE__*/_react.default.createElement(Footer, {
|
|
141
138
|
iconBefore: iconBefore,
|
|
142
139
|
description: description,
|
|
143
140
|
testId: testId
|
|
@@ -146,7 +143,7 @@ var FooterFacade = function FooterFacade(_ref3) {
|
|
|
146
143
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'CI') {
|
|
147
144
|
(0, _warnOnce.default)('The `@atlaskit/side-navigation` Footer has simplified its API, removing support for the `component`, `cssFn` and `onClick` props.\n\nThese props will stop working in a future major release. Reach out to #help-design-system on slack for help.');
|
|
148
145
|
}
|
|
149
|
-
return /*#__PURE__*/
|
|
146
|
+
return /*#__PURE__*/_react.default.createElement(OldFooter, {
|
|
150
147
|
onClick: onClick,
|
|
151
148
|
component: component
|
|
152
149
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -9,14 +8,23 @@ exports.default = exports.Container = void 0;
|
|
|
9
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
|
-
var _react =
|
|
11
|
+
var _react = require("react");
|
|
12
|
+
var _react2 = require("@emotion/react");
|
|
13
13
|
var _colors = require("@atlaskit/theme/colors");
|
|
14
14
|
var _styles = require("../../common/styles");
|
|
15
15
|
var _Item = require("../Item");
|
|
16
16
|
var _excluded = ["children", "data-testid"],
|
|
17
17
|
_excluded2 = ["children"];
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* @jsxRuntime classic
|
|
20
|
+
* @jsx jsx
|
|
21
|
+
*/
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
23
|
+
var containerStyles = (0, _react2.css)({
|
|
24
|
+
display: 'block',
|
|
25
|
+
position: 'relative'
|
|
26
|
+
});
|
|
27
|
+
|
|
20
28
|
/**
|
|
21
29
|
* __Container__
|
|
22
30
|
*
|
|
@@ -47,16 +55,10 @@ var Container = exports.Container = function Container(_ref) {
|
|
|
47
55
|
disabled: disabled
|
|
48
56
|
};
|
|
49
57
|
}(props);
|
|
50
|
-
return (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"data-testid": testId,
|
|
55
|
-
style: {
|
|
56
|
-
position: 'relative'
|
|
57
|
-
}
|
|
58
|
-
}, safeProps), children)
|
|
59
|
-
);
|
|
58
|
+
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
59
|
+
"data-testid": testId,
|
|
60
|
+
css: containerStyles
|
|
61
|
+
}, safeProps), children);
|
|
60
62
|
};
|
|
61
63
|
/**
|
|
62
64
|
* __Header__
|
|
@@ -79,7 +81,7 @@ var Header = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
79
81
|
color: "var(--ds-text, ".concat(_colors.N500, ")")
|
|
80
82
|
});
|
|
81
83
|
}, props.cssFn);
|
|
82
|
-
return
|
|
84
|
+
return (0, _react2.jsx)(_Item.CustomItem, (0, _extends2.default)({}, props, {
|
|
83
85
|
ref: ref,
|
|
84
86
|
component: props.component || Container
|
|
85
87
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
@@ -93,7 +95,7 @@ var Header = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
93
95
|
render: function render(_, _ref4) {
|
|
94
96
|
var children = _ref4.children,
|
|
95
97
|
props = (0, _objectWithoutProperties2.default)(_ref4, _excluded2);
|
|
96
|
-
return
|
|
98
|
+
return (0, _react2.jsx)("h2", props, children);
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
2
1
|
"use strict";
|
|
3
2
|
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -6,14 +5,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
require("./index.compiled.css");
|
|
10
|
-
var _runtime = require("@compiled/react/runtime");
|
|
11
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
|
-
var _react =
|
|
9
|
+
var _react = require("@emotion/react");
|
|
13
10
|
var _motion = require("@atlaskit/motion");
|
|
14
11
|
var _context = require("../NestableNavigationContent/context");
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
/**
|
|
13
|
+
* @jsxRuntime classic
|
|
14
|
+
* @jsx jsx
|
|
15
|
+
*/
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
|
+
|
|
18
|
+
var baseMotionStyles = (0, _react.css)({
|
|
19
|
+
position: 'absolute',
|
|
20
|
+
zIndex: 1,
|
|
21
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/no-physical-properties
|
|
22
|
+
top: 0,
|
|
23
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/no-physical-properties
|
|
24
|
+
right: 0,
|
|
25
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/no-physical-properties
|
|
26
|
+
left: 0
|
|
27
|
+
});
|
|
28
|
+
var enteringStyles = (0, _react.css)({
|
|
29
|
+
position: 'static',
|
|
30
|
+
zIndex: 2
|
|
31
|
+
});
|
|
17
32
|
|
|
18
33
|
/**
|
|
19
34
|
* __Loading items__
|
|
@@ -30,13 +45,13 @@ var LoadingItems = function LoadingItems(_ref) {
|
|
|
30
45
|
if (!shouldRender) {
|
|
31
46
|
return children;
|
|
32
47
|
}
|
|
33
|
-
return
|
|
48
|
+
return (0, _react.jsx)(_motion.ExitingPersistence, null, (0, _react.jsx)(_motion.FadeIn, {
|
|
34
49
|
key: "loading-section-".concat(isLoading),
|
|
35
50
|
duration: _motion.mediumDurationMs
|
|
36
51
|
}, function (motion, state) {
|
|
37
|
-
return
|
|
52
|
+
return (0, _react.jsx)("span", (0, _extends2.default)({}, motion, {
|
|
38
53
|
"data-testid": testId && "".concat(testId, "--").concat(state),
|
|
39
|
-
|
|
54
|
+
css: [baseMotionStyles, state === 'entering' && enteringStyles]
|
|
40
55
|
}), isLoading ? fallback : children);
|
|
41
56
|
}));
|
|
42
57
|
};
|
|
@@ -1,28 +1,21 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
2
1
|
"use strict";
|
|
3
2
|
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
4
|
Object.defineProperty(exports, "__esModule", {
|
|
7
5
|
value: true
|
|
8
6
|
});
|
|
9
7
|
exports.default = void 0;
|
|
10
|
-
require("
|
|
11
|
-
var
|
|
12
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _react2 = require("@emotion/react");
|
|
13
10
|
var _useScrollbarWidth = _interopRequireDefault(require("@atlaskit/ds-lib/use-scrollbar-width"));
|
|
14
11
|
var _context = require("../NestableNavigationContent/context");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var containerCSS = {
|
|
23
|
-
basic: "_kqswh2mm _12l2u2gc _ahbqu2gc _1pfhidpf _1p3h12x7 _1l6bpxbi _auo4rdoj _hp2110yn",
|
|
24
|
-
marginBlockStart: "_1pfhv77o"
|
|
25
|
-
};
|
|
12
|
+
var _styles = require("./styles");
|
|
13
|
+
/**
|
|
14
|
+
* @jsxRuntime classic
|
|
15
|
+
* @jsx jsx
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
19
|
|
|
27
20
|
/**
|
|
28
21
|
* __Navigation content__
|
|
@@ -43,18 +36,24 @@ var NavigationContent = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref
|
|
|
43
36
|
return children;
|
|
44
37
|
}
|
|
45
38
|
var typedRef = ref;
|
|
46
|
-
return
|
|
47
|
-
ref: typedRef
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
return (0, _react2.jsx)("div", {
|
|
40
|
+
ref: typedRef
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
42
|
+
,
|
|
43
|
+
css: (0, _styles.outerContainerCSS)({
|
|
44
|
+
showTopScrollIndicator: showTopScrollIndicator,
|
|
45
|
+
scrollbarWidth: scrollbar.width
|
|
46
|
+
}),
|
|
47
|
+
"data-testid": testId
|
|
48
|
+
}, (0, _react2.jsx)("div", {
|
|
54
49
|
ref: scrollbar.ref,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
css: (0, _styles.innerContainerCSS)({
|
|
51
|
+
showTopScrollIndicator: showTopScrollIndicator
|
|
52
|
+
})
|
|
53
|
+
}, (0, _react2.jsx)("div", {
|
|
54
|
+
css: (0, _styles.containerCSS)({
|
|
55
|
+
showTopScrollIndicator: showTopScrollIndicator
|
|
56
|
+
})
|
|
58
57
|
}, children)));
|
|
59
58
|
});
|
|
60
59
|
var _default = exports.default = NavigationContent;
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
2
1
|
"use strict";
|
|
3
2
|
|
|
4
|
-
var
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
require("
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var styles = {
|
|
16
|
-
navigationFooter: "_kqswh2mm"
|
|
17
|
-
};
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _primitives = require("@atlaskit/primitives");
|
|
10
|
+
var navigationFooterStyles = (0, _primitives.xcss)({
|
|
11
|
+
position: 'relative'
|
|
12
|
+
});
|
|
13
|
+
|
|
18
14
|
/**
|
|
19
15
|
* __Navigation footer__
|
|
20
16
|
*
|
|
@@ -25,10 +21,10 @@ var styles = {
|
|
|
25
21
|
*/
|
|
26
22
|
var NavigationFooter = function NavigationFooter(_ref) {
|
|
27
23
|
var children = _ref.children;
|
|
28
|
-
return /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
29
25
|
padding: "space.100",
|
|
30
26
|
paddingBlockEnd: "space.200",
|
|
31
|
-
xcss:
|
|
27
|
+
xcss: navigationFooterStyles
|
|
32
28
|
}, children);
|
|
33
29
|
};
|
|
34
30
|
var _default = exports.default = NavigationFooter;
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
2
1
|
"use strict";
|
|
3
2
|
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
|
-
require("
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _primitives = require("@atlaskit/primitives");
|
|
9
|
+
/**
|
|
10
|
+
* @jsxRuntime classic
|
|
11
|
+
* @jsx jsx
|
|
12
|
+
*/
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
|
+
|
|
15
|
+
var navigationFooterStyles = (0, _primitives.xcss)({
|
|
16
|
+
display: 'block',
|
|
17
|
+
paddingTop: 'space.100',
|
|
18
|
+
paddingRight: 'space.100',
|
|
19
|
+
paddingBottom: 'space.100',
|
|
20
|
+
paddingLeft: 'space.100',
|
|
21
|
+
paddingBlockStart: 'space.300'
|
|
22
|
+
});
|
|
18
23
|
/**
|
|
19
24
|
* __Navigation header__
|
|
20
25
|
*
|
|
@@ -25,8 +30,8 @@ var styles = {
|
|
|
25
30
|
*/
|
|
26
31
|
var NavigationHeader = function NavigationHeader(props) {
|
|
27
32
|
var children = props.children;
|
|
28
|
-
return
|
|
29
|
-
xcss:
|
|
33
|
+
return (0, _react.jsx)(_primitives.Box, {
|
|
34
|
+
xcss: navigationFooterStyles,
|
|
30
35
|
"data-navheader": true
|
|
31
36
|
}, children);
|
|
32
37
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
2
1
|
"use strict";
|
|
3
2
|
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -7,11 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
6
|
value: true
|
|
8
7
|
});
|
|
9
8
|
exports.default = exports.ROOT_ID = void 0;
|
|
10
|
-
require("./index.compiled.css");
|
|
11
|
-
var _runtime = require("@compiled/react/runtime");
|
|
12
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
14
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _react2 = require("@emotion/react");
|
|
15
13
|
var _motion = require("@atlaskit/motion");
|
|
16
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
15
|
var _Item = require("../Item");
|
|
@@ -21,11 +19,28 @@ var _context = require("./context");
|
|
|
21
19
|
var _nestingMotion = require("./nesting-motion");
|
|
22
20
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
21
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
+
/**
|
|
23
|
+
* @jsxRuntime classic
|
|
24
|
+
* @jsx jsx
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
28
|
+
|
|
24
29
|
// Named so ERT doesn't pick up the override name as a type.
|
|
25
30
|
|
|
26
31
|
var ROOT_ID = exports.ROOT_ID = 'ATLASKIT_NESTED_ROOT';
|
|
27
|
-
var nestableNavigationContentStyles =
|
|
28
|
-
|
|
32
|
+
var nestableNavigationContentStyles = (0, _react2.css)({
|
|
33
|
+
height: '100%',
|
|
34
|
+
position: 'relative',
|
|
35
|
+
outline: 'none'
|
|
36
|
+
});
|
|
37
|
+
var nestingRootStyles = (0, _react2.css)({
|
|
38
|
+
display: 'flex',
|
|
39
|
+
width: '100%',
|
|
40
|
+
height: '100%',
|
|
41
|
+
position: 'absolute',
|
|
42
|
+
flexDirection: 'column'
|
|
43
|
+
});
|
|
29
44
|
|
|
30
45
|
/**
|
|
31
46
|
* __Nestable navigation content__
|
|
@@ -69,7 +84,7 @@ var NestableNavigationContent = function NestableNavigationContent(props) {
|
|
|
69
84
|
setFocusGoBackButton = _useState8[1];
|
|
70
85
|
var shouldFocus = isDefaultFocusControl && (0, _platformFeatureFlags.fg)('platform-side-navigation-keyboard-focus');
|
|
71
86
|
var renderGoBackItem = overrides && overrides.GoBackItem && overrides.GoBackItem.render ? overrides.GoBackItem.render : function (props) {
|
|
72
|
-
return
|
|
87
|
+
return (0, _react2.jsx)(_Item.GoBackItem, props, "Go back");
|
|
73
88
|
};
|
|
74
89
|
var _useChildIds = (0, _hooks.useChildIds)(currentStackId, committedStack, onUnknownNest),
|
|
75
90
|
childIdsRef = _useChildIds.childIdsRef;
|
|
@@ -160,13 +175,13 @@ var NestableNavigationContent = function NestableNavigationContent(props) {
|
|
|
160
175
|
containerRef.current && containerRef.current.focus();
|
|
161
176
|
}
|
|
162
177
|
};
|
|
163
|
-
return
|
|
178
|
+
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", {
|
|
164
179
|
"data-testid": testId,
|
|
180
|
+
css: nestableNavigationContentStyles,
|
|
165
181
|
ref: containerRef,
|
|
166
182
|
tabIndex: -1,
|
|
167
|
-
onClick: manageFocus
|
|
168
|
-
|
|
169
|
-
}, /*#__PURE__*/_react.default.createElement(_motion.ExitingPersistence, null, /*#__PURE__*/_react.default.createElement(_nestingMotion.NestingMotion
|
|
183
|
+
onClick: manageFocus
|
|
184
|
+
}, (0, _react2.jsx)(_motion.ExitingPersistence, null, (0, _react2.jsx)(_nestingMotion.NestingMotion
|
|
170
185
|
// Key is needed to have a unique react instance per stack name.
|
|
171
186
|
// This enables us to easily animate it in & out with exiting persistence.
|
|
172
187
|
, {
|
|
@@ -175,13 +190,13 @@ var NestableNavigationContent = function NestableNavigationContent(props) {
|
|
|
175
190
|
exitTo: transition === 'nesting' ? 'left' : 'right',
|
|
176
191
|
testId: testId && "".concat(testId, "-anim")
|
|
177
192
|
}, function (motion) {
|
|
178
|
-
return
|
|
179
|
-
|
|
180
|
-
}),
|
|
193
|
+
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
194
|
+
css: nestingRootStyles
|
|
195
|
+
}, motion), (0, _react2.jsx)(_context.NestedContext.Provider, {
|
|
181
196
|
// This provider is inside the NestingMotion to ensure it keeps a stale
|
|
182
197
|
// reference to the previous value.
|
|
183
198
|
value: context
|
|
184
|
-
},
|
|
199
|
+
}, (0, _react2.jsx)(_NestingItem.default, {
|
|
185
200
|
title: "",
|
|
186
201
|
id: ROOT_ID
|
|
187
202
|
}, children)));
|
|
@@ -6,10 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.NestingMotion = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _react =
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
10
|
var _motion = require("@atlaskit/motion");
|
|
11
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
|
|
13
|
+
* @jsxRuntime classic
|
|
14
|
+
* @jsx jsx
|
|
15
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
16
|
/**
|
|
14
17
|
* @internal
|
|
15
18
|
*/
|
|
@@ -18,7 +21,7 @@ var NestingMotion = exports.NestingMotion = function NestingMotion(props) {
|
|
|
18
21
|
enterFrom = props.enterFrom,
|
|
19
22
|
exitTo = props.exitTo,
|
|
20
23
|
testId = props.testId;
|
|
21
|
-
return
|
|
24
|
+
return (0, _react.jsx)(_motion.SlideIn, {
|
|
22
25
|
exitTo: exitTo,
|
|
23
26
|
enterFrom: enterFrom,
|
|
24
27
|
animationTimingFunction: function animationTimingFunction(_) {
|