@atlaskit/side-navigation 3.6.7 → 4.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 +24 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-jira/tsconfig.json +3 -0
- package/afm-post-office/tsconfig.json +3 -0
- package/dist/cjs/components/Footer/index.compiled.css +3 -0
- package/dist/cjs/components/Footer/index.js +21 -18
- package/dist/cjs/components/Header/index.js +17 -18
- package/dist/cjs/components/LoadingItems/index.compiled.css +7 -0
- package/dist/cjs/components/LoadingItems/index.js +9 -24
- package/dist/cjs/components/NavigationContent/index.compiled.css +46 -0
- package/dist/cjs/components/NavigationContent/index.js +27 -26
- package/dist/cjs/components/NavigationFooter/index.compiled.css +1 -0
- package/dist/cjs/components/NavigationFooter/index.js +13 -9
- package/dist/cjs/components/NavigationHeader/index.compiled.css +3 -0
- package/dist/cjs/components/NavigationHeader/index.js +13 -15
- package/dist/cjs/components/NestableNavigationContent/index.compiled.css +9 -0
- package/dist/cjs/components/NestableNavigationContent/index.js +14 -29
- package/dist/cjs/components/NestableNavigationContent/nesting-motion.js +3 -6
- package/dist/cjs/components/NestingItem/index.compiled.css +1 -0
- package/dist/cjs/components/NestingItem/index.js +17 -20
- package/dist/cjs/components/SideNavigation/index.compiled.css +10 -0
- package/dist/cjs/components/SideNavigation/index.js +17 -23
- package/dist/es2019/components/Footer/index.compiled.css +3 -0
- package/dist/es2019/components/Footer/index.js +10 -8
- package/dist/es2019/components/Header/index.js +14 -18
- package/dist/es2019/components/LoadingItems/index.compiled.css +7 -0
- package/dist/es2019/components/LoadingItems/index.js +9 -23
- package/dist/es2019/components/NavigationContent/index.compiled.css +46 -0
- package/dist/es2019/components/NavigationContent/index.js +22 -26
- package/dist/es2019/components/NavigationFooter/index.compiled.css +1 -0
- package/dist/es2019/components/NavigationFooter/index.js +9 -7
- package/dist/es2019/components/NavigationHeader/index.compiled.css +3 -0
- package/dist/es2019/components/NavigationHeader/index.js +10 -14
- package/dist/es2019/components/NestableNavigationContent/index.compiled.css +9 -0
- package/dist/es2019/components/NestableNavigationContent/index.js +14 -28
- package/dist/es2019/components/NestableNavigationContent/nesting-motion.js +2 -8
- package/dist/es2019/components/NestingItem/index.compiled.css +1 -0
- package/dist/es2019/components/NestingItem/index.js +17 -21
- package/dist/es2019/components/SideNavigation/index.compiled.css +10 -0
- package/dist/es2019/components/SideNavigation/index.js +9 -21
- package/dist/esm/components/Footer/index.compiled.css +3 -0
- package/dist/esm/components/Footer/index.js +10 -8
- package/dist/esm/components/Header/index.js +14 -18
- package/dist/esm/components/LoadingItems/index.compiled.css +7 -0
- package/dist/esm/components/LoadingItems/index.js +9 -23
- package/dist/esm/components/NavigationContent/index.compiled.css +46 -0
- package/dist/esm/components/NavigationContent/index.js +25 -26
- package/dist/esm/components/NavigationFooter/index.compiled.css +1 -0
- package/dist/esm/components/NavigationFooter/index.js +9 -7
- package/dist/esm/components/NavigationHeader/index.compiled.css +3 -0
- package/dist/esm/components/NavigationHeader/index.js +10 -14
- package/dist/esm/components/NestableNavigationContent/index.compiled.css +9 -0
- package/dist/esm/components/NestableNavigationContent/index.js +14 -28
- package/dist/esm/components/NestableNavigationContent/nesting-motion.js +2 -8
- package/dist/esm/components/NestingItem/index.compiled.css +1 -0
- package/dist/esm/components/NestingItem/index.js +17 -21
- package/dist/esm/components/SideNavigation/index.compiled.css +10 -0
- package/dist/esm/components/SideNavigation/index.js +13 -21
- package/dist/types/components/Header/index.d.ts +3 -4
- package/dist/types/components/LoadingItems/index.d.ts +5 -1
- package/dist/types/components/NavigationContent/index.d.ts +2 -2
- package/dist/types/components/NavigationFooter/index.d.ts +4 -0
- package/dist/types/components/NavigationHeader/index.d.ts +1 -6
- package/dist/types/components/NestableNavigationContent/index.d.ts +1 -2
- package/dist/types/components/NestableNavigationContent/nesting-motion.d.ts +2 -7
- package/dist/types-ts4.5/components/Header/index.d.ts +3 -4
- package/dist/types-ts4.5/components/LoadingItems/index.d.ts +5 -1
- package/dist/types-ts4.5/components/NavigationContent/index.d.ts +2 -2
- package/dist/types-ts4.5/components/NavigationFooter/index.d.ts +4 -0
- package/dist/types-ts4.5/components/NavigationHeader/index.d.ts +1 -6
- package/dist/types-ts4.5/components/NestableNavigationContent/index.d.ts +1 -2
- package/dist/types-ts4.5/components/NestableNavigationContent/nesting-motion.d.ts +2 -7
- package/package.json +5 -4
- package/tsconfig.json +0 -1
|
@@ -6,13 +6,10 @@ 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 = require("
|
|
9
|
+
var _react = _interopRequireDefault(require("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; }
|
|
13
|
-
* @jsxRuntime classic
|
|
14
|
-
* @jsx jsx
|
|
15
|
-
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
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; }
|
|
16
13
|
/**
|
|
17
14
|
* @internal
|
|
18
15
|
*/
|
|
@@ -21,7 +18,7 @@ var NestingMotion = exports.NestingMotion = function NestingMotion(props) {
|
|
|
21
18
|
enterFrom = props.enterFrom,
|
|
22
19
|
exitTo = props.exitTo,
|
|
23
20
|
testId = props.testId;
|
|
24
|
-
return
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement(_motion.SlideIn, {
|
|
25
22
|
exitTo: exitTo,
|
|
26
23
|
enterFrom: enterFrom,
|
|
27
24
|
animationTimingFunction: function animationTimingFunction(_) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._1e0c1nu9{display:inline}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -6,16 +7,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
7
|
value: true
|
|
7
8
|
});
|
|
8
9
|
exports.default = void 0;
|
|
10
|
+
require("./index.compiled.css");
|
|
11
|
+
var _runtime = require("@compiled/react/runtime");
|
|
9
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
14
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
12
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
16
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
17
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
var _react2 = require("@emotion/react");
|
|
16
18
|
var _arrowRightArrowRightCircle = _interopRequireDefault(require("@atlaskit/icon/core/migration/arrow-right--arrow-right-circle"));
|
|
17
19
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
|
-
var
|
|
20
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
19
21
|
var _colors = require("@atlaskit/theme/colors");
|
|
20
22
|
var _styles = require("../../common/styles");
|
|
21
23
|
var _index = require("../index");
|
|
@@ -24,18 +26,13 @@ var _context = require("../NestableNavigationContent/context");
|
|
|
24
26
|
var _hooks = require("../utils/hooks");
|
|
25
27
|
var _styles2 = require("./styles");
|
|
26
28
|
var _excluded = ["children", "iconAfter", "title", "onClick", "cssFn", "isSelected", "id", "component", "testId"];
|
|
27
|
-
/**
|
|
28
|
-
* @jsxRuntime classic
|
|
29
|
-
* @jsx jsx
|
|
30
|
-
*/
|
|
31
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
32
29
|
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); }
|
|
33
30
|
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; }
|
|
34
31
|
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; }
|
|
35
32
|
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; }
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
}
|
|
33
|
+
var styles = {
|
|
34
|
+
iconContainer: "_1e0c1nu9"
|
|
35
|
+
};
|
|
39
36
|
|
|
40
37
|
// Doesn't extend from ButtonItemProps because it blows ERT up.
|
|
41
38
|
|
|
@@ -143,12 +140,12 @@ var NestingItem = function NestingItem(props) {
|
|
|
143
140
|
onClick && onClick(e);
|
|
144
141
|
}, [isInteracted, onClick, onNest, id]);
|
|
145
142
|
if (currentStackId === id) {
|
|
146
|
-
return
|
|
143
|
+
return /*#__PURE__*/_react.default.createElement(_context.NestedContext.Provider, {
|
|
147
144
|
value: context
|
|
148
|
-
}, stack.length >= 1 &&
|
|
145
|
+
}, stack.length >= 1 && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
149
146
|
paddingBlock: "space.075",
|
|
150
147
|
paddingInline: "space.100"
|
|
151
|
-
}, backButton),
|
|
148
|
+
}, backButton), /*#__PURE__*/_react.default.createElement(_index.NavigationContent, {
|
|
152
149
|
testId: testId,
|
|
153
150
|
showTopScrollIndicator: forceShowTopScrollIndicator || stack.length >= 1
|
|
154
151
|
}, children));
|
|
@@ -157,15 +154,15 @@ var NestingItem = function NestingItem(props) {
|
|
|
157
154
|
return children;
|
|
158
155
|
}
|
|
159
156
|
var componentProps = _objectSpread(_objectSpread({
|
|
160
|
-
iconAfter:
|
|
161
|
-
xcss:
|
|
157
|
+
iconAfter: /*#__PURE__*/_react.default.createElement(_react.Fragment, null, iconAfter ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
158
|
+
xcss: styles.iconContainer,
|
|
162
159
|
"data-custom-icon": true,
|
|
163
160
|
as: "span"
|
|
164
|
-
}, iconAfter) : null,
|
|
161
|
+
}, iconAfter) : null, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
165
162
|
"data-right-arrow": true,
|
|
166
|
-
xcss:
|
|
163
|
+
xcss: styles.iconContainer,
|
|
167
164
|
as: "span"
|
|
168
|
-
},
|
|
165
|
+
}, /*#__PURE__*/_react.default.createElement(_arrowRightArrowRightCircle.default, {
|
|
169
166
|
testId: testId && "".concat(testId, "--item--right-arrow"),
|
|
170
167
|
color: "currentColor",
|
|
171
168
|
LEGACY_secondaryColor: "var(--ds-surface, ".concat(_colors.N10, ")"),
|
|
@@ -179,14 +176,14 @@ var NestingItem = function NestingItem(props) {
|
|
|
179
176
|
cssFn: mergedStyles
|
|
180
177
|
});
|
|
181
178
|
if (component) {
|
|
182
|
-
return
|
|
179
|
+
return /*#__PURE__*/_react.default.createElement(_index.CustomItem, (0, _extends2.default)({
|
|
183
180
|
ref: isForwardRefCheck(component) ? parentItemRef : null
|
|
184
181
|
}, componentProps, {
|
|
185
182
|
//@ts-expect-error TODO Fix legit TypeScript 3.9.6 improved inference error
|
|
186
183
|
component: component
|
|
187
184
|
}));
|
|
188
185
|
}
|
|
189
|
-
return
|
|
186
|
+
return /*#__PURE__*/_react.default.createElement(_index.ButtonItem, (0, _extends2.default)({
|
|
190
187
|
ref: activeParentRef
|
|
191
188
|
}, componentProps));
|
|
192
189
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
._18m915vq{overflow-y:hidden}
|
|
2
|
+
._1bsb1osq{width:100%}
|
|
3
|
+
._1e0c1txw{display:flex}
|
|
4
|
+
._1reo15vq{overflow-x:hidden}
|
|
5
|
+
._1ul9p3fh{min-width:15pc}
|
|
6
|
+
._2lx21bp4{flex-direction:column}
|
|
7
|
+
._4t3i1osq{height:100%}
|
|
8
|
+
._bfhkxkvu{background-color:var(--_4p0s90)}
|
|
9
|
+
._kqswh2mm{position:relative}
|
|
10
|
+
._syaz1425{color:var(--_13a5t4u)}
|
|
@@ -1,34 +1,23 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
6
|
Object.defineProperty(exports, "__esModule", {
|
|
5
7
|
value: true
|
|
6
8
|
});
|
|
7
9
|
exports.default = void 0;
|
|
10
|
+
require("./index.compiled.css");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var React = _react;
|
|
13
|
+
var _runtime = require("@compiled/react/runtime");
|
|
8
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _react = require("react");
|
|
10
|
-
var _react2 = require("@emotion/react");
|
|
11
15
|
var _menu = require("@atlaskit/menu");
|
|
12
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* @jsx jsx
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
|
-
|
|
17
|
+
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); }
|
|
18
|
+
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; }
|
|
20
19
|
var sidebarMinWidth = '240px';
|
|
21
|
-
var sideNavStyles =
|
|
22
|
-
display: 'flex',
|
|
23
|
-
width: '100%',
|
|
24
|
-
minWidth: sidebarMinWidth,
|
|
25
|
-
height: '100%',
|
|
26
|
-
position: 'relative',
|
|
27
|
-
flexDirection: 'column',
|
|
28
|
-
backgroundColor: "var(--ds-surface, ".concat(_colors.N10, ")"),
|
|
29
|
-
color: "var(--ds-text-subtle, ".concat(_colors.N500, ")"),
|
|
30
|
-
overflow: 'hidden'
|
|
31
|
-
});
|
|
20
|
+
var sideNavStyles = null;
|
|
32
21
|
|
|
33
22
|
/**
|
|
34
23
|
* __Side navigation__
|
|
@@ -47,17 +36,22 @@ var SideNavigation = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
47
36
|
isServer = _props$isServer === void 0 ? false : _props$isServer,
|
|
48
37
|
_props$isSSRPlacehold = props.isSSRPlaceholderEnabled,
|
|
49
38
|
isSSRPlaceholderEnabled = _props$isSSRPlacehold === void 0 ? false : _props$isSSRPlacehold;
|
|
50
|
-
return
|
|
39
|
+
return /*#__PURE__*/React.createElement("nav", (0, _extends2.default)({
|
|
51
40
|
ref: ref,
|
|
52
41
|
"data-testid": testId,
|
|
53
42
|
"aria-label": label,
|
|
54
|
-
css: sideNavStyles,
|
|
55
43
|
"data-vc": "side-navigation".concat(isServer ? '-ssr' : '')
|
|
56
44
|
}, isServer && isSSRPlaceholderEnabled && {
|
|
57
45
|
'data-ssr-placeholder': 'side-navigation-placeholder'
|
|
58
46
|
}, !isServer && isSSRPlaceholderEnabled && {
|
|
59
47
|
'data-ssr-placeholder-replace': 'side-navigation-placeholder'
|
|
60
|
-
}
|
|
48
|
+
}, {
|
|
49
|
+
className: (0, _runtime.ax)(["_1reo15vq _18m915vq _1e0c1txw _1bsb1osq _1ul9p3fh _4t3i1osq _kqswh2mm _2lx21bp4 _bfhkxkvu _syaz1425"]),
|
|
50
|
+
style: {
|
|
51
|
+
"--_4p0s90": (0, _runtime.ix)("var(--ds-surface, ".concat(_colors.N10, ")")),
|
|
52
|
+
"--_13a5t4u": (0, _runtime.ix)("var(--ds-text-subtle, ".concat(_colors.N500, ")"))
|
|
53
|
+
}
|
|
54
|
+
}), /*#__PURE__*/React.createElement(_menu.SELECTION_STYLE_CONTEXT_DO_NOT_USE.Provider, {
|
|
61
55
|
value: "notch"
|
|
62
56
|
}, children));
|
|
63
57
|
});
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./index.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
2
6
|
/* eslint-disable @repo/internal/react/consistent-props-definitions */
|
|
3
|
-
|
|
7
|
+
|
|
4
8
|
import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
5
|
-
import { Box, Stack, Text
|
|
9
|
+
import { Box, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
6
10
|
import { N500 } from '@atlaskit/theme/colors';
|
|
7
11
|
import { overrideStyleFunction } from '../../common/styles';
|
|
8
12
|
import { Container } from '../Header';
|
|
9
13
|
import { CustomItem } from '../Item';
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
height: '1.5rem'
|
|
14
|
-
});
|
|
14
|
+
const styles = {
|
|
15
|
+
iconContainer: "_1e0c1o8l _1bsb1k8s _4t3i1k8s"
|
|
16
|
+
};
|
|
15
17
|
/**
|
|
16
18
|
* __Footer__
|
|
17
19
|
*
|
|
@@ -92,7 +94,7 @@ const Footer = ({
|
|
|
92
94
|
space: "space.100",
|
|
93
95
|
alignInline: "center"
|
|
94
96
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
95
|
-
xcss:
|
|
97
|
+
xcss: styles.iconContainer
|
|
96
98
|
}, iconBefore), /*#__PURE__*/React.createElement(Stack, {
|
|
97
99
|
space: "space.075"
|
|
98
100
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
import { forwardRef } from 'react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { css, jsx } from '@emotion/react';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
10
3
|
import { N500 } from '@atlaskit/theme/colors';
|
|
11
4
|
import { overrideStyleFunction } from '../../common/styles';
|
|
12
5
|
import { CustomItem } from '../Item';
|
|
13
|
-
const containerStyles = css({
|
|
14
|
-
display: 'block',
|
|
15
|
-
position: 'relative'
|
|
16
|
-
});
|
|
17
6
|
|
|
18
7
|
/**
|
|
19
8
|
* __Container__
|
|
@@ -45,10 +34,16 @@ export const Container = ({
|
|
|
45
34
|
tabIndex,
|
|
46
35
|
disabled
|
|
47
36
|
}))(props);
|
|
48
|
-
return
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
37
|
+
return (
|
|
38
|
+
/*#__PURE__*/
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
40
|
+
React.createElement("div", _extends({
|
|
41
|
+
"data-testid": testId,
|
|
42
|
+
style: {
|
|
43
|
+
position: 'relative'
|
|
44
|
+
}
|
|
45
|
+
}, safeProps), children)
|
|
46
|
+
);
|
|
52
47
|
};
|
|
53
48
|
/**
|
|
54
49
|
* __Header__
|
|
@@ -73,7 +68,7 @@ const Header = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
73
68
|
color: `var(--ds-text, ${N500})`
|
|
74
69
|
}
|
|
75
70
|
}), props.cssFn);
|
|
76
|
-
return
|
|
71
|
+
return /*#__PURE__*/React.createElement(CustomItem, _extends({}, props, {
|
|
77
72
|
ref: ref,
|
|
78
73
|
component: props.component || Container
|
|
79
74
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
@@ -83,10 +78,11 @@ const Header = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
83
78
|
,
|
|
84
79
|
overrides: {
|
|
85
80
|
Title: {
|
|
81
|
+
// eslint-disable-next-line @atlaskit/design-system/use-heading
|
|
86
82
|
render: (_, {
|
|
87
83
|
children,
|
|
88
84
|
...props
|
|
89
|
-
}) =>
|
|
85
|
+
}) => /*#__PURE__*/React.createElement("h2", props, children)
|
|
90
86
|
}
|
|
91
87
|
}
|
|
92
88
|
}));
|
|
@@ -1,26 +1,12 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import { css, jsx } from '@emotion/react';
|
|
3
|
+
import "./index.compiled.css";
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import React from 'react';
|
|
8
6
|
import { ExitingPersistence, FadeIn, mediumDurationMs } from '@atlaskit/motion';
|
|
9
7
|
import { useShouldNestedElementRender } from '../NestableNavigationContent/context';
|
|
10
|
-
const baseMotionStyles =
|
|
11
|
-
|
|
12
|
-
zIndex: 1,
|
|
13
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/no-physical-properties
|
|
14
|
-
top: 0,
|
|
15
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/no-physical-properties
|
|
16
|
-
right: 0,
|
|
17
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/no-physical-properties
|
|
18
|
-
left: 0
|
|
19
|
-
});
|
|
20
|
-
const enteringStyles = css({
|
|
21
|
-
position: 'static',
|
|
22
|
-
zIndex: 2
|
|
23
|
-
});
|
|
8
|
+
const baseMotionStyles = null;
|
|
9
|
+
const enteringStyles = null;
|
|
24
10
|
|
|
25
11
|
/**
|
|
26
12
|
* __Loading items__
|
|
@@ -39,12 +25,12 @@ const LoadingItems = ({
|
|
|
39
25
|
if (!shouldRender) {
|
|
40
26
|
return children;
|
|
41
27
|
}
|
|
42
|
-
return
|
|
28
|
+
return /*#__PURE__*/React.createElement(ExitingPersistence, null, /*#__PURE__*/React.createElement(FadeIn, {
|
|
43
29
|
key: `loading-section-${isLoading}`,
|
|
44
30
|
duration: mediumDurationMs
|
|
45
|
-
}, (motion, state) =>
|
|
31
|
+
}, (motion, state) => /*#__PURE__*/React.createElement("span", _extends({}, motion, {
|
|
46
32
|
"data-testid": testId && `${testId}--${state}`,
|
|
47
|
-
|
|
33
|
+
className: ax(["_kqswstnw _1pbykb7n _154iidpf _1xi2idpf _1ltvidpf", state === 'entering' && "_kqswpfqs _1pbycs5v"])
|
|
48
34
|
}), isLoading ? fallback : children)));
|
|
49
35
|
};
|
|
50
36
|
export default LoadingItems;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
._14mjgqwt:after{border-radius:var(--ds-border-radius-050,2px)}
|
|
3
|
+
._rfx3gqwt:before{border-radius:var(--ds-border-radius-050,2px)}._12l2u2gc{margin-inline-end:var(--ds-space-100,8px)}
|
|
4
|
+
._18m915vq{overflow-y:hidden}
|
|
5
|
+
._18m91wug{overflow-y:auto}
|
|
6
|
+
._18poh2mm:after{position:relative}
|
|
7
|
+
._18postnw:after{position:absolute}
|
|
8
|
+
._1bqqcs5v:after{z-index:2}
|
|
9
|
+
._1bqqkb7n:after{z-index:1}
|
|
10
|
+
._1bsb1osq{width:100%}
|
|
11
|
+
._1cs8stnw:before{position:absolute}
|
|
12
|
+
._1czdftgi:after{inset-inline-end:8px}
|
|
13
|
+
._1e0c1txw{display:flex}
|
|
14
|
+
._1enwftgi:before{inset-inline-end:8px}
|
|
15
|
+
._1enwidpf:before{inset-inline-end:0}
|
|
16
|
+
._1g0vcs5v:before{z-index:2}
|
|
17
|
+
._1g0vkb7n:before{z-index:1}
|
|
18
|
+
._1gufidpf:after{inset-block-end:0}
|
|
19
|
+
._1hfk1p09:after{background-color:var(--ds-menu-seperator-color,var(--ds-border,#091e4224))}
|
|
20
|
+
._1hfk1q2g:after{background-color:var(--ds-menu-scroll-indicator-color,var(--ds-surface,#fff))}
|
|
21
|
+
._1kt9b3bt:before{content:""}
|
|
22
|
+
._1l6bpxbi [data-ds--menu--heading-item]{margin-block-start:var(--ds-space-200,1pc)}
|
|
23
|
+
._1p3h12x7 [data-ds--menu--heading-item]{margin-block-end:var(--ds-space-075,6px)}
|
|
24
|
+
._1pfhidpf{margin-block-start:0}
|
|
25
|
+
._1pfhv77o{margin-block-start:var(--ds-space-025,2px)}
|
|
26
|
+
._1qdgyh40:after{height:2px}
|
|
27
|
+
._1reo15vq{overflow-x:hidden}
|
|
28
|
+
._1reo1wug{overflow-x:auto}
|
|
29
|
+
._1rus1p09:before{background-color:var(--ds-menu-seperator-color,var(--ds-border,#091e4224))}
|
|
30
|
+
._1rus1q2g:before{background-color:var(--ds-menu-scroll-indicator-color,var(--ds-surface,#fff))}
|
|
31
|
+
._1ywu1ule:after{display:block}
|
|
32
|
+
._2lx21bp4{flex-direction:column}
|
|
33
|
+
._3mxo1wug:after{margin-block-start:auto}
|
|
34
|
+
._4t3i1osq{height:100%}
|
|
35
|
+
._aetrb3bt:after{content:""}
|
|
36
|
+
._ahbqu2gc{margin-inline-start:var(--ds-space-100,8px)}
|
|
37
|
+
._auo4rdoj [data-ds--menu--skeleton-heading-item]{margin-block-end:9px}
|
|
38
|
+
._cfu11ule:before{display:block}
|
|
39
|
+
._g0nfu2gc:after{inset-inline-start:var(--ds-space-100,8px)}
|
|
40
|
+
._hp2110yn [data-ds--menu--skeleton-heading-item]{margin-block-start:25px}
|
|
41
|
+
._kfgtyh40:before{height:2px}
|
|
42
|
+
._kqswh2mm{position:relative}
|
|
43
|
+
._tua5idpf:after{flex-shrink:0}
|
|
44
|
+
._vchhusvi{box-sizing:border-box}
|
|
45
|
+
._z5wtidpf:before{inset-inline-start:0}
|
|
46
|
+
._z5wtu2gc:before{inset-inline-start:var(--ds-space-100,8px)}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { forwardRef } from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React, { forwardRef } from 'react';
|
|
9
5
|
import useScrollbarWidth from '@atlaskit/ds-lib/use-scrollbar-width';
|
|
10
6
|
import { useShouldNestedElementRender } from '../NestableNavigationContent/context';
|
|
11
|
-
|
|
7
|
+
const outerContainerCSS = null;
|
|
8
|
+
const innerContainerCSS = {
|
|
9
|
+
basic: "_1reo1wug _18m91wug _1e0c1txw _vchhusvi _1bsb1osq _kqswh2mm _2lx21bp4 _14mjgqwt _1ywu1ule _1qdgyh40 _18poh2mm _1bqqcs5v _tua5idpf _1hfk1q2g _aetrb3bt _3mxo1wug",
|
|
10
|
+
topScrollIndicator: "_rfx3gqwt _cfu11ule _kfgtyh40 _1cs8stnw _1g0vcs5v _1rus1q2g _1kt9b3bt _1enwidpf _z5wtidpf"
|
|
11
|
+
};
|
|
12
|
+
const containerCSS = {
|
|
13
|
+
basic: "_kqswh2mm _12l2u2gc _ahbqu2gc _1pfhidpf _1p3h12x7 _1l6bpxbi _auo4rdoj _hp2110yn",
|
|
14
|
+
marginBlockStart: "_1pfhv77o"
|
|
15
|
+
};
|
|
16
|
+
|
|
12
17
|
/**
|
|
13
18
|
* __Navigation content__
|
|
14
19
|
*
|
|
@@ -31,24 +36,15 @@ const NavigationContent = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
31
36
|
return children;
|
|
32
37
|
}
|
|
33
38
|
const typedRef = ref;
|
|
34
|
-
return
|
|
35
|
-
ref: typedRef
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
showTopScrollIndicator,
|
|
40
|
-
scrollbarWidth: scrollbar.width
|
|
41
|
-
}),
|
|
42
|
-
"data-testid": testId
|
|
43
|
-
}, jsx("div", {
|
|
39
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
ref: typedRef,
|
|
41
|
+
"data-testid": testId,
|
|
42
|
+
className: ax(["_1reo15vq _18m915vq _1e0c1txw _4t3i1osq _kqswh2mm _rfx3gqwt _cfu11ule _kfgtyh40 _1cs8stnw _1g0vkb7n _1rus1p09 _1kt9b3bt _1enwftgi _z5wtu2gc _14mjgqwt _1ywu1ule _1qdgyh40 _18postnw _1bqqkb7n _tua5idpf _1hfk1p09 _aetrb3bt _1gufidpf _1czdftgi _g0nfu2gc"])
|
|
43
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
44
44
|
ref: scrollbar.ref,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}, jsx("div", {
|
|
49
|
-
css: containerCSS({
|
|
50
|
-
showTopScrollIndicator
|
|
51
|
-
})
|
|
45
|
+
className: ax([innerContainerCSS.basic, !showTopScrollIndicator && innerContainerCSS.topScrollIndicator])
|
|
46
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
className: ax([containerCSS.basic, showTopScrollIndicator && containerCSS.marginBlockStart])
|
|
52
48
|
}, children)));
|
|
53
49
|
});
|
|
54
50
|
export default NavigationContent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._kqswh2mm{position:relative}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
|
+
const styles = {
|
|
7
|
+
navigationFooter: "_kqswh2mm"
|
|
8
|
+
};
|
|
7
9
|
/**
|
|
8
10
|
* __Navigation footer__
|
|
9
11
|
*
|
|
@@ -18,7 +20,7 @@ const NavigationFooter = ({
|
|
|
18
20
|
return /*#__PURE__*/React.createElement(Box, {
|
|
19
21
|
padding: "space.100",
|
|
20
22
|
paddingBlockEnd: "space.200",
|
|
21
|
-
xcss:
|
|
23
|
+
xcss: styles.navigationFooter
|
|
22
24
|
}, children);
|
|
23
25
|
};
|
|
24
26
|
export default NavigationFooter;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
display: 'block',
|
|
10
|
-
padding: 'space.100',
|
|
11
|
-
paddingBlockStart: 'space.300'
|
|
12
|
-
});
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
|
+
const styles = {
|
|
7
|
+
navigationFooter: "_1yt4u2gc _1e0c1ule _1q511ejb"
|
|
8
|
+
};
|
|
13
9
|
/**
|
|
14
10
|
* __Navigation header__
|
|
15
11
|
*
|
|
@@ -22,8 +18,8 @@ const NavigationHeader = props => {
|
|
|
22
18
|
const {
|
|
23
19
|
children
|
|
24
20
|
} = props;
|
|
25
|
-
return
|
|
26
|
-
xcss:
|
|
21
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
22
|
+
xcss: styles.navigationFooter,
|
|
27
23
|
"data-navheader": true
|
|
28
24
|
}, children);
|
|
29
25
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
._12ji1r31{outline-color:currentColor}
|
|
2
|
+
._12y31o36{outline-width:medium}
|
|
3
|
+
._1bsb1osq{width:100%}
|
|
4
|
+
._1e0c1txw{display:flex}
|
|
5
|
+
._1qu2glyw{outline-style:none}
|
|
6
|
+
._2lx21bp4{flex-direction:column}
|
|
7
|
+
._4t3i1osq{height:100%}
|
|
8
|
+
._kqswh2mm{position:relative}
|
|
9
|
+
._kqswstnw{position:absolute}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
3
|
+
import "./index.compiled.css";
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
5
|
import React, { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { css, jsx } from '@emotion/react';
|
|
10
6
|
import { ExitingPersistence } from '@atlaskit/motion';
|
|
11
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
8
|
import { GoBackItem as GoBackButton } from '../Item';
|
|
@@ -17,18 +13,8 @@ import { NestingMotion } from './nesting-motion';
|
|
|
17
13
|
// Named so ERT doesn't pick up the override name as a type.
|
|
18
14
|
|
|
19
15
|
export const ROOT_ID = 'ATLASKIT_NESTED_ROOT';
|
|
20
|
-
const nestableNavigationContentStyles =
|
|
21
|
-
|
|
22
|
-
position: 'relative',
|
|
23
|
-
outline: 'none'
|
|
24
|
-
});
|
|
25
|
-
const nestingRootStyles = css({
|
|
26
|
-
display: 'flex',
|
|
27
|
-
width: '100%',
|
|
28
|
-
height: '100%',
|
|
29
|
-
position: 'absolute',
|
|
30
|
-
flexDirection: 'column'
|
|
31
|
-
});
|
|
16
|
+
const nestableNavigationContentStyles = null;
|
|
17
|
+
const nestingRootStyles = null;
|
|
32
18
|
|
|
33
19
|
/**
|
|
34
20
|
* __Nestable navigation content__
|
|
@@ -60,7 +46,7 @@ const NestableNavigationContent = props => {
|
|
|
60
46
|
const [activeParentId, setActiveParentId] = useState('');
|
|
61
47
|
const [focusGoBackButton, setFocusGoBackButton] = useState(false);
|
|
62
48
|
const shouldFocus = isDefaultFocusControl && fg('platform-side-navigation-keyboard-focus');
|
|
63
|
-
const renderGoBackItem = overrides && overrides.GoBackItem && overrides.GoBackItem.render ? overrides.GoBackItem.render : props =>
|
|
49
|
+
const renderGoBackItem = overrides && overrides.GoBackItem && overrides.GoBackItem.render ? overrides.GoBackItem.render : props => /*#__PURE__*/React.createElement(GoBackButton, props, "Go back");
|
|
64
50
|
const {
|
|
65
51
|
childIdsRef
|
|
66
52
|
} = useChildIds(currentStackId, committedStack, onUnknownNest);
|
|
@@ -149,13 +135,13 @@ const NestableNavigationContent = props => {
|
|
|
149
135
|
containerRef.current && containerRef.current.focus();
|
|
150
136
|
}
|
|
151
137
|
};
|
|
152
|
-
return
|
|
138
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
153
139
|
"data-testid": testId,
|
|
154
|
-
css: nestableNavigationContentStyles,
|
|
155
140
|
ref: containerRef,
|
|
156
141
|
tabIndex: -1,
|
|
157
|
-
onClick: manageFocus
|
|
158
|
-
|
|
142
|
+
onClick: manageFocus,
|
|
143
|
+
className: ax(["_12ji1r31 _1qu2glyw _12y31o36 _4t3i1osq _kqswh2mm"])
|
|
144
|
+
}, /*#__PURE__*/React.createElement(ExitingPersistence, null, /*#__PURE__*/React.createElement(NestingMotion
|
|
159
145
|
// Key is needed to have a unique react instance per stack name.
|
|
160
146
|
// This enables us to easily animate it in & out with exiting persistence.
|
|
161
147
|
, {
|
|
@@ -163,13 +149,13 @@ const NestableNavigationContent = props => {
|
|
|
163
149
|
enterFrom: transition === 'nesting' ? 'right' : 'left',
|
|
164
150
|
exitTo: transition === 'nesting' ? 'left' : 'right',
|
|
165
151
|
testId: testId && `${testId}-anim`
|
|
166
|
-
}, motion =>
|
|
167
|
-
|
|
168
|
-
}
|
|
152
|
+
}, motion => /*#__PURE__*/React.createElement("div", _extends({}, motion, {
|
|
153
|
+
className: ax(["_1e0c1txw _1bsb1osq _4t3i1osq _kqswstnw _2lx21bp4"])
|
|
154
|
+
}), /*#__PURE__*/React.createElement(NestedContext.Provider, {
|
|
169
155
|
// This provider is inside the NestingMotion to ensure it keeps a stale
|
|
170
156
|
// reference to the previous value.
|
|
171
157
|
value: context
|
|
172
|
-
},
|
|
158
|
+
}, /*#__PURE__*/React.createElement(NestingItem, {
|
|
173
159
|
title: "",
|
|
174
160
|
id: ROOT_ID
|
|
175
161
|
}, children)))))));
|