@atlaskit/navigation-system 0.178.0 → 0.179.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-volt/tsconfig.json +7 -4
- package/dist/cjs/ui/page-layout/aside.js +2 -5
- package/dist/cjs/ui/page-layout/main/main-sticky-header.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/main/main-sticky-header.js +4 -10
- package/dist/cjs/ui/page-layout/main/main.compiled.css +1 -1
- package/dist/cjs/ui/page-layout/main/main.js +3 -9
- package/dist/es2019/ui/page-layout/aside.js +2 -5
- package/dist/es2019/ui/page-layout/main/main-sticky-header.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/main/main-sticky-header.js +3 -8
- package/dist/es2019/ui/page-layout/main/main.compiled.css +1 -1
- package/dist/es2019/ui/page-layout/main/main.js +3 -9
- package/dist/esm/ui/page-layout/aside.js +2 -5
- package/dist/esm/ui/page-layout/main/main-sticky-header.compiled.css +0 -1
- package/dist/esm/ui/page-layout/main/main-sticky-header.js +3 -8
- package/dist/esm/ui/page-layout/main/main.compiled.css +1 -1
- package/dist/esm/ui/page-layout/main/main.js +3 -9
- package/dist/types/ui/page-layout/aside.d.ts +1 -22
- package/dist/types/ui/page-layout/main/main.d.ts +1 -22
- package/dist/types-ts4.5/ui/page-layout/aside.d.ts +1 -22
- package/dist/types-ts4.5/ui/page-layout/main/main.d.ts +1 -22
- package/examples/advanced-layout.tsx +1 -1
- package/examples/company-hub-mock.tsx +1 -1
- package/examples/composition.tsx +4 -80
- package/examples/confluence-mock.tsx +1 -1
- package/examples/drag-and-drop-in-the-sidebar-flyout.tsx +1 -1
- package/examples/interactive-layout.tsx +3 -4
- package/examples/layers-in-main.tsx +2 -3
- package/examples/legacy-var-testing.tsx +1 -1
- package/examples/page-layout-panel-aside-default-widths.tsx +1 -1
- package/examples/page-layout.tsx +2 -127
- package/examples/resizable-slots.tsx +1 -1
- package/package.json +4 -7
- package/src/__tests__/playwright/page-layout.spec.tsx +1 -25
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-no-panel-vr--desktop-large.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-no-panel-vr--desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-scrolled-vr--desktop-large.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-scrolled-vr--desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-scrolled-vr--mobile.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-vr--desktop-large-splitter.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-vr--desktop-large.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-vr--desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-no-panel-vr--desktop-large.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-no-panel-vr--desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-vr--desktop-large.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-vr--desktop.png +0 -0
- package/src/__tests__/vr-tests/layering.vr.tsx +8 -87
- package/src/ui/page-layout/__tests__/unit/sticky-header.test.tsx +2 -16
- package/src/ui/page-layout/__tests__/vr-tests/page-layout.vr.tsx +2 -14
- package/src/ui/page-layout/aside.tsx +5 -35
- package/src/ui/page-layout/main/main-sticky-header.tsx +2 -21
- package/src/ui/page-layout/main/main.tsx +2 -34
- package/dist/cjs/ui/page-layout/main/main-sticky-context.js +0 -11
- package/dist/es2019/ui/page-layout/main/main-sticky-context.js +0 -6
- package/dist/esm/ui/page-layout/main/main-sticky-context.js +0 -6
- package/dist/types/ui/page-layout/main/main-sticky-context.d.ts +0 -4
- package/dist/types-ts4.5/ui/page-layout/main/main-sticky-context.d.ts +0 -4
- package/examples/page-layout-all-slots-scrollable-fixed.tsx +0 -3
- package/examples/page-layout-main-aside-scrollable-fixed.tsx +0 -3
- package/examples/page-layout-side-nav-main-aside-scrollable-fixed.tsx +0 -3
- package/examples/page-layout-top-bar-side-nav-main-aside-scrollable-fixed.tsx +0 -3
- package/examples/page-layout-top-bar-side-nav-main-scrollable-fixed.tsx +0 -3
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-fixed-no-panel-vr--desktop-large.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-fixed-no-panel-vr--desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-fixed-no-panel-vr--mobile.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-fixed-vr--desktop-large-splitter.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-fixed-vr--desktop-large.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-fixed-vr--desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-fixed-vr--mobile.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-no-panel-with-forced-isfixed-temp---desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-scrolled-fixed-vr--desktop-large.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-scrolled-fixed-vr--desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-scrolled-fixed-vr--mobile.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-scrolled-with-forced-isfixed-temp---desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-with-forced-isfixed-temp---desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-fixed-vr--desktop-large.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-fixed-vr--desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-fixed-vr--mobile.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-no-panel-fixed-vr--desktop-large.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-no-panel-fixed-vr--desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-no-panel-fixed-vr--mobile.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-no-panel-with-forced-isfixed-temp---desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-with-forced-isfixed-temp---desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/all-slots-scrollable-fixed--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/all-slots-scrollable-fixed--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/main-aside-scrollable-fixed--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/main-aside-scrollable-fixed--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/side-nav-main-aside-scrollable-fixed--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/side-nav-main-aside-scrollable-fixed--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/top-bar-side-nav-main-aside-scrollable-fixed--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/top-bar-side-nav-main-aside-scrollable-fixed--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/top-bar-side-nav-main-scrollable-fixed--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/top-bar-side-nav-main-scrollable-fixed--mobile.png +0 -0
- package/src/ui/page-layout/main/main-sticky-context.tsx +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlassian/navigation-system
|
|
2
2
|
|
|
3
|
+
## 0.179.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#199851](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/199851)
|
|
8
|
+
[`625ab3de43de0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/625ab3de43de0) -
|
|
9
|
+
Cleans up the `platform_dst_nav4_disable_is_fixed_prop` feature gate. The `isFixed` prop has now
|
|
10
|
+
been removed from `Main` and `Aside` and these slots will now always be fixed, acting as separate
|
|
11
|
+
scroll containers.
|
|
12
|
+
|
|
3
13
|
## 0.178.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/afm-volt/tsconfig.json
CHANGED
|
@@ -14,7 +14,13 @@
|
|
|
14
14
|
"exclude": [
|
|
15
15
|
"../src/**/__tests__/*",
|
|
16
16
|
"../src/**/*.test.*",
|
|
17
|
-
"../src/**/test.*"
|
|
17
|
+
"../src/**/test.*",
|
|
18
|
+
"../src/**/examples.*",
|
|
19
|
+
"../src/**/examples/*",
|
|
20
|
+
"../src/**/examples/**/*",
|
|
21
|
+
"../src/**/*.stories.*",
|
|
22
|
+
"../src/**/stories/*",
|
|
23
|
+
"../src/**/stories/**/*"
|
|
18
24
|
],
|
|
19
25
|
"references": [
|
|
20
26
|
{
|
|
@@ -59,9 +65,6 @@
|
|
|
59
65
|
{
|
|
60
66
|
"path": "../../primitives/afm-volt/tsconfig.json"
|
|
61
67
|
},
|
|
62
|
-
{
|
|
63
|
-
"path": "../../../navigation/temp-nav-app-icons/afm-volt/tsconfig.json"
|
|
64
|
-
},
|
|
65
68
|
{
|
|
66
69
|
"path": "../../tokens/afm-volt/tsconfig.json"
|
|
67
70
|
},
|
|
@@ -53,8 +53,7 @@ function getResizeBounds() {
|
|
|
53
53
|
}
|
|
54
54
|
var styles = {
|
|
55
55
|
root: "_nd5lns35 _vchhusvi _kqswh2mm _glte1kzp _ndwch9n0",
|
|
56
|
-
|
|
57
|
-
fullHeight: "_4t3i1osq"
|
|
56
|
+
inner: "_1reo1wug _18m91wug _152timx3 _4t3i1osq _165teqxy _13wn1if8"
|
|
58
57
|
};
|
|
59
58
|
|
|
60
59
|
/**
|
|
@@ -65,7 +64,6 @@ var styles = {
|
|
|
65
64
|
function Aside(_ref) {
|
|
66
65
|
var children = _ref.children,
|
|
67
66
|
xcss = _ref.xcss,
|
|
68
|
-
isFixedProp = _ref.isFixed,
|
|
69
67
|
_ref$defaultWidth = _ref.defaultWidth,
|
|
70
68
|
defaultWidth = _ref$defaultWidth === void 0 ? 330 : _ref$defaultWidth,
|
|
71
69
|
_ref$label = _ref.label,
|
|
@@ -78,7 +76,6 @@ function Aside(_ref) {
|
|
|
78
76
|
var id = (0, _idUtils.useLayoutId)({
|
|
79
77
|
providedId: providedId
|
|
80
78
|
});
|
|
81
|
-
var isFixed = (0, _platformFeatureFlags.fg)('platform_dst_nav4_disable_is_fixed_prop') ? true : isFixedProp;
|
|
82
79
|
|
|
83
80
|
/**
|
|
84
81
|
* Don't show the skip link if the slot has 0 width.
|
|
@@ -154,6 +151,6 @@ function Aside(_ref) {
|
|
|
154
151
|
position: "start"
|
|
155
152
|
}, /*#__PURE__*/React.createElement("div", {
|
|
156
153
|
"data-testid": testId ? "".concat(testId, "--inner") : undefined,
|
|
157
|
-
className: (0, _runtime.ax)([styles.
|
|
154
|
+
className: (0, _runtime.ax)([styles.inner])
|
|
158
155
|
}, children)));
|
|
159
156
|
}
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
/* main-sticky-header.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.MainStickyHeader = MainStickyHeader;
|
|
9
9
|
require("./main-sticky-header.compiled.css");
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
|
-
var _react =
|
|
12
|
-
var _mainStickyContext = require("./main-sticky-context");
|
|
13
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
|
-
var contentInsetBlockStart = "calc(var(--n_bnrM, 0px) + var(--n_tNvM, 0px))";
|
|
11
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
12
|
var stickyHeaderStyles = {
|
|
16
|
-
root: "_kqsw1if8 _1pbykb7n"
|
|
17
|
-
stickyInMain: "_152tidpf",
|
|
18
|
-
stickyInBody: "_152timx3"
|
|
13
|
+
root: "_kqsw1if8 _1pbykb7n _152tidpf"
|
|
19
14
|
};
|
|
20
15
|
|
|
21
16
|
/**
|
|
@@ -25,9 +20,8 @@ function MainStickyHeader(_ref) {
|
|
|
25
20
|
var children = _ref.children,
|
|
26
21
|
xcss = _ref.xcss,
|
|
27
22
|
testId = _ref.testId;
|
|
28
|
-
var isMainFixed = (0, _react.useContext)(_mainStickyContext.MainStickyContext);
|
|
29
23
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
30
24
|
"data-testid": testId,
|
|
31
|
-
className: (0, _runtime.ax)([stickyHeaderStyles.root,
|
|
25
|
+
className: (0, _runtime.ax)([stickyHeaderStyles.root, xcss])
|
|
32
26
|
}, children);
|
|
33
27
|
}
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
._19121cl4{isolation:isolate}
|
|
5
5
|
._1reo1wug{overflow-x:auto}
|
|
6
6
|
._njlp1t7j{contain:paint}
|
|
7
|
-
@media (min-width:64rem){._165teqxy{height:calc(100vh - var(--n_bnrM, 0px) - var(--n_tNvM, 0px))}._13wn1if8{position:sticky}
|
|
7
|
+
@media (min-width:64rem){._qwfh1wug{isolation:auto}._165teqxy{height:calc(100vh - var(--n_bnrM, 0px) - var(--n_tNvM, 0px))}._13wn1if8{position:sticky}}
|
|
@@ -14,11 +14,9 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
14
14
|
var _skipLinksContext = require("../../../context/skip-links/skip-links-context");
|
|
15
15
|
var _constants = require("../constants");
|
|
16
16
|
var _idUtils = require("../id-utils");
|
|
17
|
-
var _mainStickyContext = require("./main-sticky-context");
|
|
18
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
19
18
|
var mainElementStyles = {
|
|
20
|
-
root: "_nd5l1gzg _19121cl4 _qwfh1wug",
|
|
21
|
-
fixedContentArea: "_1reo1wug _18m91wug _152timx3 _165teqxy _13wn1if8",
|
|
19
|
+
root: "_nd5l1gzg _1reo1wug _18m91wug _19121cl4 _152timx3 _qwfh1wug _165teqxy _13wn1if8",
|
|
22
20
|
containPaint: "_njlp1t7j"
|
|
23
21
|
};
|
|
24
22
|
|
|
@@ -27,7 +25,6 @@ var mainElementStyles = {
|
|
|
27
25
|
*/
|
|
28
26
|
function Main(_ref) {
|
|
29
27
|
var children = _ref.children,
|
|
30
|
-
isFixedProp = _ref.isFixed,
|
|
31
28
|
xcss = _ref.xcss,
|
|
32
29
|
_ref$skipLinkLabel = _ref.skipLinkLabel,
|
|
33
30
|
skipLinkLabel = _ref$skipLinkLabel === void 0 ? 'Main Content' : _ref$skipLinkLabel,
|
|
@@ -36,15 +33,12 @@ function Main(_ref) {
|
|
|
36
33
|
var id = (0, _idUtils.useLayoutId)({
|
|
37
34
|
providedId: providedId
|
|
38
35
|
});
|
|
39
|
-
var isFixed = (0, _platformFeatureFlags.fg)('platform_dst_nav4_disable_is_fixed_prop') ? true : isFixedProp;
|
|
40
36
|
(0, _skipLinksContext.useSkipLink)(id, skipLinkLabel);
|
|
41
37
|
return /*#__PURE__*/React.createElement(_react.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
42
38
|
id: id,
|
|
43
39
|
"data-layout-slot": true,
|
|
44
|
-
className: (0, _runtime.ax)([mainElementStyles.root,
|
|
40
|
+
className: (0, _runtime.ax)([mainElementStyles.root, (0, _platformFeatureFlags.fg)('platform_dst_nav4_layering_in_main_slot_fixes') && mainElementStyles.containPaint, xcss]),
|
|
45
41
|
role: "main",
|
|
46
42
|
"data-testid": testId
|
|
47
|
-
},
|
|
48
|
-
value: Boolean(isFixed)
|
|
49
|
-
}, children)));
|
|
43
|
+
}, children));
|
|
50
44
|
}
|
|
@@ -42,8 +42,7 @@ function getResizeBounds() {
|
|
|
42
42
|
}
|
|
43
43
|
const styles = {
|
|
44
44
|
root: "_nd5lns35 _vchhusvi _kqswh2mm _glte1kzp _ndwch9n0",
|
|
45
|
-
|
|
46
|
-
fullHeight: "_4t3i1osq"
|
|
45
|
+
inner: "_1reo1wug _18m91wug _152timx3 _4t3i1osq _165teqxy _13wn1if8"
|
|
47
46
|
};
|
|
48
47
|
|
|
49
48
|
/**
|
|
@@ -54,7 +53,6 @@ const styles = {
|
|
|
54
53
|
export function Aside({
|
|
55
54
|
children,
|
|
56
55
|
xcss,
|
|
57
|
-
isFixed: isFixedProp,
|
|
58
56
|
defaultWidth = 330,
|
|
59
57
|
label = 'Aside',
|
|
60
58
|
skipLinkLabel = label,
|
|
@@ -65,7 +63,6 @@ export function Aside({
|
|
|
65
63
|
const id = useLayoutId({
|
|
66
64
|
providedId
|
|
67
65
|
});
|
|
68
|
-
const isFixed = fg('platform_dst_nav4_disable_is_fixed_prop') ? true : isFixedProp;
|
|
69
66
|
|
|
70
67
|
/**
|
|
71
68
|
* Don't show the skip link if the slot has 0 width.
|
|
@@ -140,6 +137,6 @@ export function Aside({
|
|
|
140
137
|
position: "start"
|
|
141
138
|
}, /*#__PURE__*/React.createElement("div", {
|
|
142
139
|
"data-testid": testId ? `${testId}--inner` : undefined,
|
|
143
|
-
className: ax([styles.
|
|
140
|
+
className: ax([styles.inner])
|
|
144
141
|
}, children)));
|
|
145
142
|
}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
/* main-sticky-header.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
import "./main-sticky-header.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
-
import React
|
|
5
|
-
import { MainStickyContext } from './main-sticky-context';
|
|
6
|
-
const contentInsetBlockStart = `calc(var(--n_bnrM, 0px) + var(--n_tNvM, 0px))`;
|
|
4
|
+
import React from 'react';
|
|
7
5
|
const stickyHeaderStyles = {
|
|
8
|
-
root: "_kqsw1if8 _1pbykb7n"
|
|
9
|
-
stickyInMain: "_152tidpf",
|
|
10
|
-
stickyInBody: "_152timx3"
|
|
6
|
+
root: "_kqsw1if8 _1pbykb7n _152tidpf"
|
|
11
7
|
};
|
|
12
8
|
|
|
13
9
|
/**
|
|
@@ -18,9 +14,8 @@ export function MainStickyHeader({
|
|
|
18
14
|
xcss,
|
|
19
15
|
testId
|
|
20
16
|
}) {
|
|
21
|
-
const isMainFixed = useContext(MainStickyContext);
|
|
22
17
|
return /*#__PURE__*/React.createElement("div", {
|
|
23
18
|
"data-testid": testId,
|
|
24
|
-
className: ax([stickyHeaderStyles.root,
|
|
19
|
+
className: ax([stickyHeaderStyles.root, xcss])
|
|
25
20
|
}, children);
|
|
26
21
|
}
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
._19121cl4{isolation:isolate}
|
|
5
5
|
._1reo1wug{overflow-x:auto}
|
|
6
6
|
._njlp1t7j{contain:paint}
|
|
7
|
-
@media (min-width:64rem){._165teqxy{height:calc(100vh - var(--n_bnrM, 0px) - var(--n_tNvM, 0px))}._13wn1if8{position:sticky}
|
|
7
|
+
@media (min-width:64rem){._qwfh1wug{isolation:auto}._165teqxy{height:calc(100vh - var(--n_bnrM, 0px) - var(--n_tNvM, 0px))}._13wn1if8{position:sticky}}
|
|
@@ -7,10 +7,8 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
7
7
|
import { useSkipLink } from '../../../context/skip-links/skip-links-context';
|
|
8
8
|
import { contentHeightWhenFixed, contentInsetBlockStart } from '../constants';
|
|
9
9
|
import { useLayoutId } from '../id-utils';
|
|
10
|
-
import { MainStickyContext } from './main-sticky-context';
|
|
11
10
|
const mainElementStyles = {
|
|
12
|
-
root: "_nd5l1gzg _19121cl4 _qwfh1wug",
|
|
13
|
-
fixedContentArea: "_1reo1wug _18m91wug _152timx3 _165teqxy _13wn1if8",
|
|
11
|
+
root: "_nd5l1gzg _1reo1wug _18m91wug _19121cl4 _152timx3 _qwfh1wug _165teqxy _13wn1if8",
|
|
14
12
|
containPaint: "_njlp1t7j"
|
|
15
13
|
};
|
|
16
14
|
|
|
@@ -19,7 +17,6 @@ const mainElementStyles = {
|
|
|
19
17
|
*/
|
|
20
18
|
export function Main({
|
|
21
19
|
children,
|
|
22
|
-
isFixed: isFixedProp,
|
|
23
20
|
xcss,
|
|
24
21
|
skipLinkLabel = 'Main Content',
|
|
25
22
|
testId,
|
|
@@ -28,15 +25,12 @@ export function Main({
|
|
|
28
25
|
const id = useLayoutId({
|
|
29
26
|
providedId
|
|
30
27
|
});
|
|
31
|
-
const isFixed = fg('platform_dst_nav4_disable_is_fixed_prop') ? true : isFixedProp;
|
|
32
28
|
useSkipLink(id, skipLinkLabel);
|
|
33
29
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
34
30
|
id: id,
|
|
35
31
|
"data-layout-slot": true,
|
|
36
|
-
className: ax([mainElementStyles.root,
|
|
32
|
+
className: ax([mainElementStyles.root, fg('platform_dst_nav4_layering_in_main_slot_fixes') && mainElementStyles.containPaint, xcss]),
|
|
37
33
|
role: "main",
|
|
38
34
|
"data-testid": testId
|
|
39
|
-
},
|
|
40
|
-
value: Boolean(isFixed)
|
|
41
|
-
}, children)));
|
|
35
|
+
}, children));
|
|
42
36
|
}
|
|
@@ -44,8 +44,7 @@ function getResizeBounds() {
|
|
|
44
44
|
}
|
|
45
45
|
var styles = {
|
|
46
46
|
root: "_nd5lns35 _vchhusvi _kqswh2mm _glte1kzp _ndwch9n0",
|
|
47
|
-
|
|
48
|
-
fullHeight: "_4t3i1osq"
|
|
47
|
+
inner: "_1reo1wug _18m91wug _152timx3 _4t3i1osq _165teqxy _13wn1if8"
|
|
49
48
|
};
|
|
50
49
|
|
|
51
50
|
/**
|
|
@@ -56,7 +55,6 @@ var styles = {
|
|
|
56
55
|
export function Aside(_ref) {
|
|
57
56
|
var children = _ref.children,
|
|
58
57
|
xcss = _ref.xcss,
|
|
59
|
-
isFixedProp = _ref.isFixed,
|
|
60
58
|
_ref$defaultWidth = _ref.defaultWidth,
|
|
61
59
|
defaultWidth = _ref$defaultWidth === void 0 ? 330 : _ref$defaultWidth,
|
|
62
60
|
_ref$label = _ref.label,
|
|
@@ -69,7 +67,6 @@ export function Aside(_ref) {
|
|
|
69
67
|
var id = useLayoutId({
|
|
70
68
|
providedId: providedId
|
|
71
69
|
});
|
|
72
|
-
var isFixed = fg('platform_dst_nav4_disable_is_fixed_prop') ? true : isFixedProp;
|
|
73
70
|
|
|
74
71
|
/**
|
|
75
72
|
* Don't show the skip link if the slot has 0 width.
|
|
@@ -145,6 +142,6 @@ export function Aside(_ref) {
|
|
|
145
142
|
position: "start"
|
|
146
143
|
}, /*#__PURE__*/React.createElement("div", {
|
|
147
144
|
"data-testid": testId ? "".concat(testId, "--inner") : undefined,
|
|
148
|
-
className: ax([styles.
|
|
145
|
+
className: ax([styles.inner])
|
|
149
146
|
}, children)));
|
|
150
147
|
}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
/* main-sticky-header.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
import "./main-sticky-header.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
-
import React
|
|
5
|
-
import { MainStickyContext } from './main-sticky-context';
|
|
6
|
-
var contentInsetBlockStart = "calc(var(--n_bnrM, 0px) + var(--n_tNvM, 0px))";
|
|
4
|
+
import React from 'react';
|
|
7
5
|
var stickyHeaderStyles = {
|
|
8
|
-
root: "_kqsw1if8 _1pbykb7n"
|
|
9
|
-
stickyInMain: "_152tidpf",
|
|
10
|
-
stickyInBody: "_152timx3"
|
|
6
|
+
root: "_kqsw1if8 _1pbykb7n _152tidpf"
|
|
11
7
|
};
|
|
12
8
|
|
|
13
9
|
/**
|
|
@@ -17,9 +13,8 @@ export function MainStickyHeader(_ref) {
|
|
|
17
13
|
var children = _ref.children,
|
|
18
14
|
xcss = _ref.xcss,
|
|
19
15
|
testId = _ref.testId;
|
|
20
|
-
var isMainFixed = useContext(MainStickyContext);
|
|
21
16
|
return /*#__PURE__*/React.createElement("div", {
|
|
22
17
|
"data-testid": testId,
|
|
23
|
-
className: ax([stickyHeaderStyles.root,
|
|
18
|
+
className: ax([stickyHeaderStyles.root, xcss])
|
|
24
19
|
}, children);
|
|
25
20
|
}
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
._19121cl4{isolation:isolate}
|
|
5
5
|
._1reo1wug{overflow-x:auto}
|
|
6
6
|
._njlp1t7j{contain:paint}
|
|
7
|
-
@media (min-width:64rem){._165teqxy{height:calc(100vh - var(--n_bnrM, 0px) - var(--n_tNvM, 0px))}._13wn1if8{position:sticky}
|
|
7
|
+
@media (min-width:64rem){._qwfh1wug{isolation:auto}._165teqxy{height:calc(100vh - var(--n_bnrM, 0px) - var(--n_tNvM, 0px))}._13wn1if8{position:sticky}}
|
|
@@ -7,10 +7,8 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
7
7
|
import { useSkipLink } from '../../../context/skip-links/skip-links-context';
|
|
8
8
|
import { contentHeightWhenFixed, contentInsetBlockStart } from '../constants';
|
|
9
9
|
import { useLayoutId } from '../id-utils';
|
|
10
|
-
import { MainStickyContext } from './main-sticky-context';
|
|
11
10
|
var mainElementStyles = {
|
|
12
|
-
root: "_nd5l1gzg _19121cl4 _qwfh1wug",
|
|
13
|
-
fixedContentArea: "_1reo1wug _18m91wug _152timx3 _165teqxy _13wn1if8",
|
|
11
|
+
root: "_nd5l1gzg _1reo1wug _18m91wug _19121cl4 _152timx3 _qwfh1wug _165teqxy _13wn1if8",
|
|
14
12
|
containPaint: "_njlp1t7j"
|
|
15
13
|
};
|
|
16
14
|
|
|
@@ -19,7 +17,6 @@ var mainElementStyles = {
|
|
|
19
17
|
*/
|
|
20
18
|
export function Main(_ref) {
|
|
21
19
|
var children = _ref.children,
|
|
22
|
-
isFixedProp = _ref.isFixed,
|
|
23
20
|
xcss = _ref.xcss,
|
|
24
21
|
_ref$skipLinkLabel = _ref.skipLinkLabel,
|
|
25
22
|
skipLinkLabel = _ref$skipLinkLabel === void 0 ? 'Main Content' : _ref$skipLinkLabel,
|
|
@@ -28,15 +25,12 @@ export function Main(_ref) {
|
|
|
28
25
|
var id = useLayoutId({
|
|
29
26
|
providedId: providedId
|
|
30
27
|
});
|
|
31
|
-
var isFixed = fg('platform_dst_nav4_disable_is_fixed_prop') ? true : isFixedProp;
|
|
32
28
|
useSkipLink(id, skipLinkLabel);
|
|
33
29
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
34
30
|
id: id,
|
|
35
31
|
"data-layout-slot": true,
|
|
36
|
-
className: ax([mainElementStyles.root,
|
|
32
|
+
className: ax([mainElementStyles.root, fg('platform_dst_nav4_layering_in_main_slot_fixes') && mainElementStyles.containPaint, xcss]),
|
|
37
33
|
role: "main",
|
|
38
34
|
"data-testid": testId
|
|
39
|
-
},
|
|
40
|
-
value: Boolean(isFixed)
|
|
41
|
-
}, children)));
|
|
35
|
+
}, children));
|
|
42
36
|
}
|
|
@@ -5,7 +5,7 @@ import type { CommonSlotProps } from './types';
|
|
|
5
5
|
*
|
|
6
6
|
* You can optionally render a `PanelSplitter` as a child to make the aside area resizable.
|
|
7
7
|
*/
|
|
8
|
-
export declare function Aside({ children, xcss,
|
|
8
|
+
export declare function Aside({ children, xcss, defaultWidth, label, skipLinkLabel, testId, id: providedId, }: CommonSlotProps & {
|
|
9
9
|
/**
|
|
10
10
|
* The content of the layout area.
|
|
11
11
|
*/
|
|
@@ -14,27 +14,6 @@ export declare function Aside({ children, xcss, isFixed: isFixedProp, defaultWid
|
|
|
14
14
|
* The accessible name of the slot, announced by screen readers.
|
|
15
15
|
*/
|
|
16
16
|
label?: string;
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated
|
|
19
|
-
*
|
|
20
|
-
* Support for `isFixed={false}` is being removed and `isFixed={true}` will be the only supported behavior.
|
|
21
|
-
*
|
|
22
|
-
* This change is being rolled out behind the `platform_dst_nav4_disable_is_fixed_prop` feature gate. After rollout this prop will be removed.
|
|
23
|
-
*
|
|
24
|
-
* Reach out to #help-design-system if you are relying on the `isFixed={false}` behavior.
|
|
25
|
-
*
|
|
26
|
-
* ---
|
|
27
|
-
*
|
|
28
|
-
* Whether the layout area should be fixed _on large viewports_.
|
|
29
|
-
*
|
|
30
|
-
* When fixed, the element will have its own scroll container - it will not use the body scroll.
|
|
31
|
-
*
|
|
32
|
-
* **Important:** On small viewports, the element will always use body scroll, to make it easier to scroll the page when
|
|
33
|
-
* the content is tall.
|
|
34
|
-
*
|
|
35
|
-
* When not fixed, the element will use the body scroll.
|
|
36
|
-
*/
|
|
37
|
-
isFixed?: boolean;
|
|
38
17
|
/**
|
|
39
18
|
* Bounded style overrides.
|
|
40
19
|
*/
|
|
@@ -3,7 +3,7 @@ import type { CommonSlotProps } from '../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Use the Main area for the main page content. It has a fluid width and will expand to fill available space.
|
|
5
5
|
*/
|
|
6
|
-
export declare function Main({ children,
|
|
6
|
+
export declare function Main({ children, xcss, skipLinkLabel, testId, id: providedId, }: CommonSlotProps & {
|
|
7
7
|
/**
|
|
8
8
|
* The content of the layout area.
|
|
9
9
|
* This is where you should put the main content of your page.
|
|
@@ -13,25 +13,4 @@ export declare function Main({ children, isFixed: isFixedProp, xcss, skipLinkLab
|
|
|
13
13
|
* Bounded style overrides.
|
|
14
14
|
*/
|
|
15
15
|
xcss?: StrictXCSSProp<'backgroundColor', never>;
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated
|
|
18
|
-
*
|
|
19
|
-
* Support for `isFixed={false}` is being removed and `isFixed={true}` will be the only supported behavior.
|
|
20
|
-
*
|
|
21
|
-
* This change is being rolled out behind the `platform_dst_nav4_disable_is_fixed_prop` feature gate. After rollout this prop will be removed.
|
|
22
|
-
*
|
|
23
|
-
* Reach out to #help-design-system if you are relying on the `isFixed={false}` behavior.
|
|
24
|
-
*
|
|
25
|
-
* ---
|
|
26
|
-
*
|
|
27
|
-
* Whether the layout area should be fixed _on large viewports_.
|
|
28
|
-
*
|
|
29
|
-
* When fixed, the element will have its own scroll container - it will not use the body scroll.
|
|
30
|
-
*
|
|
31
|
-
* **Important:** On small viewports, the element will always use body scroll, to make it easier to scroll the page when
|
|
32
|
-
* the content is tall.
|
|
33
|
-
*
|
|
34
|
-
* When not fixed, the element will use the body scroll.
|
|
35
|
-
*/
|
|
36
|
-
isFixed?: boolean;
|
|
37
16
|
}): JSX.Element;
|
|
@@ -5,7 +5,7 @@ import type { CommonSlotProps } from './types';
|
|
|
5
5
|
*
|
|
6
6
|
* You can optionally render a `PanelSplitter` as a child to make the aside area resizable.
|
|
7
7
|
*/
|
|
8
|
-
export declare function Aside({ children, xcss,
|
|
8
|
+
export declare function Aside({ children, xcss, defaultWidth, label, skipLinkLabel, testId, id: providedId, }: CommonSlotProps & {
|
|
9
9
|
/**
|
|
10
10
|
* The content of the layout area.
|
|
11
11
|
*/
|
|
@@ -14,27 +14,6 @@ export declare function Aside({ children, xcss, isFixed: isFixedProp, defaultWid
|
|
|
14
14
|
* The accessible name of the slot, announced by screen readers.
|
|
15
15
|
*/
|
|
16
16
|
label?: string;
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated
|
|
19
|
-
*
|
|
20
|
-
* Support for `isFixed={false}` is being removed and `isFixed={true}` will be the only supported behavior.
|
|
21
|
-
*
|
|
22
|
-
* This change is being rolled out behind the `platform_dst_nav4_disable_is_fixed_prop` feature gate. After rollout this prop will be removed.
|
|
23
|
-
*
|
|
24
|
-
* Reach out to #help-design-system if you are relying on the `isFixed={false}` behavior.
|
|
25
|
-
*
|
|
26
|
-
* ---
|
|
27
|
-
*
|
|
28
|
-
* Whether the layout area should be fixed _on large viewports_.
|
|
29
|
-
*
|
|
30
|
-
* When fixed, the element will have its own scroll container - it will not use the body scroll.
|
|
31
|
-
*
|
|
32
|
-
* **Important:** On small viewports, the element will always use body scroll, to make it easier to scroll the page when
|
|
33
|
-
* the content is tall.
|
|
34
|
-
*
|
|
35
|
-
* When not fixed, the element will use the body scroll.
|
|
36
|
-
*/
|
|
37
|
-
isFixed?: boolean;
|
|
38
17
|
/**
|
|
39
18
|
* Bounded style overrides.
|
|
40
19
|
*/
|
|
@@ -3,7 +3,7 @@ import type { CommonSlotProps } from '../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Use the Main area for the main page content. It has a fluid width and will expand to fill available space.
|
|
5
5
|
*/
|
|
6
|
-
export declare function Main({ children,
|
|
6
|
+
export declare function Main({ children, xcss, skipLinkLabel, testId, id: providedId, }: CommonSlotProps & {
|
|
7
7
|
/**
|
|
8
8
|
* The content of the layout area.
|
|
9
9
|
* This is where you should put the main content of your page.
|
|
@@ -13,25 +13,4 @@ export declare function Main({ children, isFixed: isFixedProp, xcss, skipLinkLab
|
|
|
13
13
|
* Bounded style overrides.
|
|
14
14
|
*/
|
|
15
15
|
xcss?: StrictXCSSProp<'backgroundColor', never>;
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated
|
|
18
|
-
*
|
|
19
|
-
* Support for `isFixed={false}` is being removed and `isFixed={true}` will be the only supported behavior.
|
|
20
|
-
*
|
|
21
|
-
* This change is being rolled out behind the `platform_dst_nav4_disable_is_fixed_prop` feature gate. After rollout this prop will be removed.
|
|
22
|
-
*
|
|
23
|
-
* Reach out to #help-design-system if you are relying on the `isFixed={false}` behavior.
|
|
24
|
-
*
|
|
25
|
-
* ---
|
|
26
|
-
*
|
|
27
|
-
* Whether the layout area should be fixed _on large viewports_.
|
|
28
|
-
*
|
|
29
|
-
* When fixed, the element will have its own scroll container - it will not use the body scroll.
|
|
30
|
-
*
|
|
31
|
-
* **Important:** On small viewports, the element will always use body scroll, to make it easier to scroll the page when
|
|
32
|
-
* the content is tall.
|
|
33
|
-
*
|
|
34
|
-
* When not fixed, the element will use the body scroll.
|
|
35
|
-
*/
|
|
36
|
-
isFixed?: boolean;
|
|
37
16
|
}): JSX.Element;
|
|
@@ -99,7 +99,7 @@ export const AdvancedLayoutExample = () => (
|
|
|
99
99
|
<AppLogo href="" icon={HomeIcon} name="Home" label="Home page" />
|
|
100
100
|
</TopNavStart>
|
|
101
101
|
</TopNav>
|
|
102
|
-
<Main
|
|
102
|
+
<Main>
|
|
103
103
|
<div css={advancedLayoutStyles.root}>
|
|
104
104
|
<div css={advancedLayoutStyles.header}>
|
|
105
105
|
<PageHeader
|
|
@@ -148,7 +148,7 @@ export function CompanyHubMockExample({ defaultPanelWidth = 440 }: { defaultPane
|
|
|
148
148
|
</MenuListItem>
|
|
149
149
|
</TopNavEnd>
|
|
150
150
|
</TopNav>
|
|
151
|
-
<Main id="main-container"
|
|
151
|
+
<Main id="main-container">
|
|
152
152
|
<Stack xcss={contentStyles.root}>
|
|
153
153
|
<div css={contentStyles.header}>
|
|
154
154
|
<div css={contentStyles.logo}>
|