@atlaskit/navigation-system 11.3.4 → 11.4.1
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 +25 -0
- package/README.md +20 -0
- package/constellation/layout/code.mdx +1 -1
- package/constellation/layout/examples.mdx +4 -16
- package/constellation/layout/images/layout-anatomy-dark.png +0 -0
- package/constellation/layout/images/layout-anatomy-light.png +0 -0
- package/constellation/layout/images/layout-do-dark.png +0 -0
- package/constellation/layout/images/layout-do-light.png +0 -0
- package/constellation/layout/images/layout-dont-dark.png +0 -0
- package/constellation/layout/images/layout-dont-light.png +0 -0
- package/constellation/layout/images/layout-example-dark.png +0 -0
- package/constellation/layout/images/layout-example-light.png +0 -0
- package/constellation/layout/images/layout-example-sideNav-dark.png +0 -0
- package/constellation/layout/images/layout-example-sideNav-light.png +0 -0
- package/constellation/layout/images/layout-example-topNav-1-dark.png +0 -0
- package/constellation/layout/images/layout-example-topNav-1-light.png +0 -0
- package/constellation/layout/usage.mdx +1 -2
- package/constellation/top-nav-items/examples.mdx +7 -13
- package/dist/cjs/entry-points/layout/panel-layout.js +19 -0
- package/dist/cjs/ui/page-layout/calculate-layout-area-states.js +4 -4
- package/dist/cjs/ui/page-layout/chat-panel.js +1 -1
- package/dist/cjs/ui/page-layout/constants.js +15 -1
- package/dist/cjs/ui/page-layout/get-panel-layout-defaults.js +22 -0
- package/dist/cjs/ui/page-layout/layout-area-sizing-provider.js +52 -28
- package/dist/cjs/ui/page-layout/layout-area-sizing-runtime.js +5 -4
- package/dist/cjs/ui/page-layout/local-panel-surface.compiled.css +26 -0
- package/dist/cjs/ui/page-layout/local-panel-surface.js +206 -0
- package/dist/cjs/ui/page-layout/main/main.js +5 -2
- package/dist/cjs/ui/page-layout/main-min-width-context.js +10 -0
- package/dist/cjs/ui/page-layout/panel-layout-shell.compiled.css +27 -0
- package/dist/cjs/ui/page-layout/panel-layout-shell.js +67 -0
- package/dist/cjs/ui/page-layout/panel-layout.js +162 -0
- package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.js +15 -6
- package/dist/cjs/ui/page-layout/side-nav/side-nav.js +1 -1
- package/dist/cjs/ui/top-nav-items/icon-renderer.js +1 -1
- package/dist/es2019/entry-points/layout/panel-layout.js +2 -0
- package/dist/es2019/ui/page-layout/calculate-layout-area-states.js +4 -4
- package/dist/es2019/ui/page-layout/chat-panel.js +2 -2
- package/dist/es2019/ui/page-layout/constants.js +14 -0
- package/dist/es2019/ui/page-layout/get-panel-layout-defaults.js +16 -0
- package/dist/es2019/ui/page-layout/layout-area-sizing-provider.js +19 -4
- package/dist/es2019/ui/page-layout/layout-area-sizing-runtime.js +4 -3
- package/dist/es2019/ui/page-layout/local-panel-surface.compiled.css +26 -0
- package/dist/es2019/ui/page-layout/local-panel-surface.js +193 -0
- package/dist/es2019/ui/page-layout/main/main.js +6 -3
- package/dist/es2019/ui/page-layout/main-min-width-context.js +5 -0
- package/dist/es2019/ui/page-layout/panel-layout-shell.compiled.css +27 -0
- package/dist/es2019/ui/page-layout/panel-layout-shell.js +74 -0
- package/dist/es2019/ui/page-layout/panel-layout.js +147 -0
- package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.js +15 -6
- package/dist/es2019/ui/page-layout/side-nav/side-nav.js +2 -2
- package/dist/es2019/ui/top-nav-items/icon-renderer.js +1 -1
- package/dist/esm/entry-points/layout/panel-layout.js +2 -0
- package/dist/esm/ui/page-layout/calculate-layout-area-states.js +4 -4
- package/dist/esm/ui/page-layout/chat-panel.js +2 -2
- package/dist/esm/ui/page-layout/constants.js +14 -0
- package/dist/esm/ui/page-layout/get-panel-layout-defaults.js +16 -0
- package/dist/esm/ui/page-layout/layout-area-sizing-provider.js +52 -28
- package/dist/esm/ui/page-layout/layout-area-sizing-runtime.js +4 -3
- package/dist/esm/ui/page-layout/local-panel-surface.compiled.css +26 -0
- package/dist/esm/ui/page-layout/local-panel-surface.js +197 -0
- package/dist/esm/ui/page-layout/main/main.js +6 -3
- package/dist/esm/ui/page-layout/main-min-width-context.js +5 -0
- package/dist/esm/ui/page-layout/panel-layout-shell.compiled.css +27 -0
- package/dist/esm/ui/page-layout/panel-layout-shell.js +59 -0
- package/dist/esm/ui/page-layout/panel-layout.js +154 -0
- package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.js +15 -6
- package/dist/esm/ui/page-layout/side-nav/side-nav.js +2 -2
- package/dist/esm/ui/top-nav-items/icon-renderer.js +1 -1
- package/dist/types/entry-points/layout/panel-layout.d.ts +3 -0
- package/dist/types/ui/page-layout/constants.d.ts +12 -0
- package/dist/types/ui/page-layout/get-panel-layout-defaults.d.ts +10 -0
- package/dist/types/ui/page-layout/layout-area-sizing-context.d.ts +9 -1
- package/dist/types/ui/page-layout/local-panel-surface.d.ts +32 -0
- package/dist/types/ui/page-layout/main-min-width-context.d.ts +2 -0
- package/dist/types/ui/page-layout/panel-layout-shell.d.ts +47 -0
- package/dist/types/ui/page-layout/panel-layout.d.ts +74 -0
- package/layout/panel-layout/package.json +10 -0
- package/package.json +7 -7
- package/constellation/layout/images/layout-example-topNav-2-dark.png +0 -3
- package/constellation/layout/images/layout-example-topNav-2-light.png +0 -3
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
._nd5l1gzg{grid-area:main}._129o1uuk{--p_lclPnlSsrPreferredW:var(--p_lclPnlCompactW)}
|
|
2
|
+
._18m915vq{overflow-y:hidden}
|
|
3
|
+
._18m91wug{overflow-y:auto}
|
|
4
|
+
._19121cl4{isolation:isolate}
|
|
5
|
+
._1bsb1osq{width:100%}
|
|
6
|
+
._1e0c11p5{display:grid}
|
|
7
|
+
._1e0c1txw{display:flex}
|
|
8
|
+
._1f38177r{container-name:local-panel-layout}
|
|
9
|
+
._1l7c1wug._1l7c1wug{grid-template-rows:auto}
|
|
10
|
+
._1l7chkll._1l7chkll{grid-template-rows:1fr}
|
|
11
|
+
._1lmc1m6a{grid-template-areas:"main"}
|
|
12
|
+
._1lmcc53r{grid-template-areas:var(--p_lclPnlSsrAreas,"main")}
|
|
13
|
+
._1reo15vq{overflow-x:hidden}
|
|
14
|
+
._1reo1wug{overflow-x:auto}
|
|
15
|
+
._1uwq15vq._1uwq15vq{overflow-x:hidden}
|
|
16
|
+
._2z05hkll{grid-template-rows:1fr}
|
|
17
|
+
._4t3i1osq{height:100%}
|
|
18
|
+
._7cca15wb{container-type:inline-size}
|
|
19
|
+
._82e815vq._82e815vq{overflow-y:hidden}
|
|
20
|
+
._evra4a59{--p_lclPnlSsrInlineAreas:"main panel"}
|
|
21
|
+
._f8371m6a._f8371m6a{grid-template-areas:"main"}
|
|
22
|
+
._f8374a59._f8374a59{grid-template-areas:"main panel"}
|
|
23
|
+
._vleg1orf._vleg1orf{grid-template-columns:minmax(var(--n_mainMinW,20pc),1fr) clamp(var(--p_lclPnlMinW),var(--p_lclPnlRsz,var(--p_lclPnlTrackW)),calc(100% - var(--n_mainMinW, 20pc)))}
|
|
24
|
+
._vlegi47z._vlegi47z{grid-template-columns:minmax(0,1fr)}
|
|
25
|
+
._yv0eggl6{grid-template-columns:var(--p_lclPnlSsrColumns,minmax(0,1fr))}
|
|
26
|
+
._yv0ei47z{grid-template-columns:minmax(0,1fr)}
|
|
27
|
+
@media (min-width:64rem){._peezi77x{--p_lclPnlSsrPreferredW:var(--p_lclPnlTrackW)}}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* panel-layout-shell.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import "./panel-layout-shell.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { useContext, useId } from 'react';
|
|
7
|
+
import { MainMinWidthContext } from './main-min-width-context';
|
|
8
|
+
|
|
9
|
+
// The grid uses runtime CSS variables and container sizing outside @atlaskit/css's bounded values.
|
|
10
|
+
var localPanelTrackWidthVar = '--p_lclPnlTrackW';
|
|
11
|
+
var localPanelResizingVar = '--p_lclPnlRsz';
|
|
12
|
+
var localPanelMinWidthVar = '--p_lclPnlMinW';
|
|
13
|
+
var styles = {
|
|
14
|
+
container: "_1f38177r _7cca15wb _4t3i1osq _1bsb1osq",
|
|
15
|
+
layout: "_1reo1wug _18m91wug _1e0c11p5 _7cca15wb _1lmc1m6a _yv0ei47z _2z05hkll _4t3i1osq _1bsb1osq",
|
|
16
|
+
mainContent: "_nd5l1gzg _1reo1wug _18m91wug _1e0c1txw _4t3i1osq _19121cl4",
|
|
17
|
+
panelUplift: "_1reo15vq _18m915vq",
|
|
18
|
+
unmeasured: "_evra4a59 _1lmcc53r _yv0eggl6 _129o1uuk _peezi77x",
|
|
19
|
+
managedInline: "_1uwq15vq _82e815vq _f8374a59 _1l7c1wug _vleg1orf",
|
|
20
|
+
managedOverlay: "_1uwq15vq _82e815vq _f8371m6a _vlegi47z _1l7chkll",
|
|
21
|
+
panelClosed: "_f8371m6a _vlegi47z _1l7chkll"
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Grid and scrolling for Main and its local panel. Use inside navigation's Root and Main.
|
|
25
|
+
*/
|
|
26
|
+
export function PanelLayoutShell(_ref) {
|
|
27
|
+
var children = _ref.children,
|
|
28
|
+
panel = _ref.panel,
|
|
29
|
+
isPanelOpen = _ref.isPanelOpen,
|
|
30
|
+
panelWidth = _ref.panelWidth,
|
|
31
|
+
compactPanelWidth = _ref.compactPanelWidth,
|
|
32
|
+
_ref$panelMinWidth = _ref.panelMinWidth,
|
|
33
|
+
panelMinWidth = _ref$panelMinWidth === void 0 ? 320 : _ref$panelMinWidth,
|
|
34
|
+
mode = _ref.mode,
|
|
35
|
+
layoutRef = _ref.layoutRef,
|
|
36
|
+
_ref$shouldClipOverfl = _ref.shouldClipOverflow,
|
|
37
|
+
shouldClipOverflow = _ref$shouldClipOverfl === void 0 ? false : _ref$shouldClipOverfl,
|
|
38
|
+
testId = _ref.testId;
|
|
39
|
+
var mainMinWidth = useContext(MainMinWidthContext);
|
|
40
|
+
var id = "local-panel-".concat(useId().replace(/[^a-zA-Z0-9_-]/g, '_'));
|
|
41
|
+
// CSS query conditions cannot read custom properties. Only the numeric minimums and
|
|
42
|
+
// instance selector are generated here; this rule is removed after the first measurement,
|
|
43
|
+
// so live resizing never rewrites stylesheet text. The named container is local to this shell.
|
|
44
|
+
var inlineQuery = "@container local-panel-layout (min-width: ".concat(mainMinWidth + panelMinWidth, "px)");
|
|
45
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: ax([styles.container])
|
|
47
|
+
}, mode === undefined && isPanelOpen &&
|
|
48
|
+
/*#__PURE__*/
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles -- Instance-scoped SSR query supports caller-defined minimums; CSS variables are not allowed in query conditions.
|
|
50
|
+
React.createElement("style", null, "".concat(inlineQuery, " {\n\t\t\t\t\t#").concat(id, " {\n\t\t\t\t\t\t--p_lclPnlSsrAreas: var(--p_lclPnlSsrInlineAreas);\n\t\t\t\t\t\t--p_lclPnlSsrColumns: minmax(0, 1fr) min(var(--p_lclPnlSsrPreferredW), calc(100% - ").concat(mainMinWidth, "px));\n\t\t\t\t\t\t--p_lclPnlSsrArea: panel;\n\t\t\t\t\t\t--p_lclPnlSsrWidth: 100%;\n\t\t\t\t\t\t--p_lclPnlSsrBackground: ", "var(--ds-surface, #FFFFFF)", ";\n\t\t\t\t\t\t--p_lclPnlSsrShadow: none;\n\t\t\t\t\t\t--p_lclPnlSsrBorder: ", "var(--ds-border-width, 1px)", " solid ", "var(--ds-border, #0B120E24)", ";\n\t\t\t\t\t}\n\t\t\t\t}")), /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
id: id,
|
|
52
|
+
"data-testid": testId,
|
|
53
|
+
ref: layoutRef,
|
|
54
|
+
style: _defineProperty(_defineProperty(_defineProperty({}, localPanelTrackWidthVar, "".concat(panelWidth, "px")), localPanelMinWidthVar, "".concat(panelMinWidth, "px")), '--p_lclPnlCompactW', "".concat(compactPanelWidth, "px")),
|
|
55
|
+
className: ax([styles.layout, mode === undefined && isPanelOpen && styles.unmeasured, shouldClipOverflow && styles.panelUplift, mode === 'inline' && styles.managedInline, mode === 'overlay' && styles.managedOverlay, !isPanelOpen && styles.panelClosed])
|
|
56
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
57
|
+
className: ax([styles.mainContent])
|
|
58
|
+
}, children), panel));
|
|
59
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import invariant from 'tiny-invariant';
|
|
4
|
+
import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
|
|
5
|
+
import ExitingPersistence from '@atlaskit/motion/exiting-persistence';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
|
+
import { getPanelLayoutDefaults } from './get-panel-layout-defaults';
|
|
8
|
+
import { LayoutAreaSizingContext } from './layout-area-sizing-context';
|
|
9
|
+
import { LayoutAreaSizingProvider } from './layout-area-sizing-provider';
|
|
10
|
+
import { LocalPanelSurface } from './local-panel-surface';
|
|
11
|
+
import { PanelLayoutShell } from './panel-layout-shell';
|
|
12
|
+
import { useLayoutAreaSizing } from './use-layout-area-sizing';
|
|
13
|
+
|
|
14
|
+
// Development-only ownership checks are scoped to each coordinator, not the whole page.
|
|
15
|
+
var mountedPanelLayouts = new WeakSet();
|
|
16
|
+
function CoordinatedPanelLayout(_ref) {
|
|
17
|
+
var _ref2, _ref3, _ref4, _state$width;
|
|
18
|
+
var children = _ref.children,
|
|
19
|
+
panel = _ref.panel,
|
|
20
|
+
isPanelOpen = _ref.isPanelOpen,
|
|
21
|
+
panelKey = _ref.panelKey,
|
|
22
|
+
panelWidth = _ref.panelWidth,
|
|
23
|
+
defaultPanelWidth = _ref.defaultPanelWidth,
|
|
24
|
+
compactDefaultPanelWidth = _ref.compactDefaultPanelWidth,
|
|
25
|
+
suppliedMinWidth = _ref.panelMinWidth,
|
|
26
|
+
panelMaxWidth = _ref.panelMaxWidth,
|
|
27
|
+
onPanelWidthChange = _ref.onPanelWidthChange,
|
|
28
|
+
onResizeEnd = _ref.onResizeEnd,
|
|
29
|
+
_ref$panelLabel = _ref.panelLabel,
|
|
30
|
+
panelLabel = _ref$panelLabel === void 0 ? 'Panel' : _ref$panelLabel,
|
|
31
|
+
_ref$resizeLabel = _ref.resizeLabel,
|
|
32
|
+
resizeLabel = _ref$resizeLabel === void 0 ? 'Resize panel' : _ref$resizeLabel,
|
|
33
|
+
testId = _ref.testId,
|
|
34
|
+
layoutRef = _ref.layoutRef;
|
|
35
|
+
var _useState = useState(getPanelLayoutDefaults),
|
|
36
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
37
|
+
defaults = _useState2[0];
|
|
38
|
+
var panelMinWidth = suppliedMinWidth !== null && suppliedMinWidth !== void 0 ? suppliedMinWidth : defaults.panelMinWidth;
|
|
39
|
+
var coordinator = useContext(LayoutAreaSizingContext);
|
|
40
|
+
useEffect(function () {
|
|
41
|
+
if (process.env.NODE_ENV !== 'production' && coordinator) {
|
|
42
|
+
invariant(!mountedPanelLayouts.has(coordinator), 'Only one PanelLayout may be mounted per navigation Root/sizing coordinator, including closed hosts and LayoutWithPanel. Reuse the host to switch panel content.');
|
|
43
|
+
mountedPanelLayouts.add(coordinator);
|
|
44
|
+
return function () {
|
|
45
|
+
mountedPanelLayouts.delete(coordinator);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}, [coordinator]);
|
|
49
|
+
var _useState3 = useState((_ref2 = defaultPanelWidth !== null && defaultPanelWidth !== void 0 ? defaultPanelWidth : panelWidth) !== null && _ref2 !== void 0 ? _ref2 : defaults.panelWidth),
|
|
50
|
+
_useState4 = _slicedToArray(_useState3, 1),
|
|
51
|
+
defaultWidth = _useState4[0];
|
|
52
|
+
var _useState5 = useState((_ref3 = (_ref4 = compactDefaultPanelWidth !== null && compactDefaultPanelWidth !== void 0 ? compactDefaultPanelWidth : defaultPanelWidth) !== null && _ref4 !== void 0 ? _ref4 : panelWidth) !== null && _ref3 !== void 0 ? _ref3 : defaults.compactPanelWidth),
|
|
53
|
+
_useState6 = _slicedToArray(_useState5, 1),
|
|
54
|
+
compactWidth = _useState6[0];
|
|
55
|
+
// Use the controlled request before measurement too, without changing the mount-time default.
|
|
56
|
+
var fallbackWidth = Math.max(panelMinWidth, Math.min(panelWidth !== null && panelWidth !== void 0 ? panelWidth : defaultWidth, panelMaxWidth !== null && panelMaxWidth !== void 0 ? panelMaxWidth : Infinity));
|
|
57
|
+
var _useLayoutAreaSizing = useLayoutAreaSizing({
|
|
58
|
+
area: 'panel',
|
|
59
|
+
config: {
|
|
60
|
+
isOpen: isPanelOpen,
|
|
61
|
+
requestedWidth: panelWidth,
|
|
62
|
+
defaultWidth: defaultWidth,
|
|
63
|
+
compactDefaultWidth: compactWidth,
|
|
64
|
+
minWidth: panelMinWidth,
|
|
65
|
+
maxWidth: panelMaxWidth
|
|
66
|
+
}
|
|
67
|
+
}),
|
|
68
|
+
state = _useLayoutAreaSizing.state,
|
|
69
|
+
prepareResize = _useLayoutAreaSizing.prepareResize,
|
|
70
|
+
getResizeBounds = _useLayoutAreaSizing.getResizeBounds,
|
|
71
|
+
startResize = _useLayoutAreaSizing.startResize,
|
|
72
|
+
resize = _useLayoutAreaSizing.resize,
|
|
73
|
+
completeResize = _useLayoutAreaSizing.completeResize;
|
|
74
|
+
// Host callback identity is unrelated to sizing. Keep drag bindings stable while
|
|
75
|
+
// still delivering completions to the latest product-owned state and analytics.
|
|
76
|
+
var onWidthChangeRef = useStableRef(onPanelWidthChange);
|
|
77
|
+
var onResizeEndRef = useStableRef(onResizeEnd);
|
|
78
|
+
var handleWidthChange = useCallback(function (width) {
|
|
79
|
+
var _onWidthChangeRef$cur;
|
|
80
|
+
return (_onWidthChangeRef$cur = onWidthChangeRef.current) === null || _onWidthChangeRef$cur === void 0 ? void 0 : _onWidthChangeRef$cur.call(onWidthChangeRef, width);
|
|
81
|
+
}, [onWidthChangeRef]);
|
|
82
|
+
var handleResizeEnd = useCallback(function (event) {
|
|
83
|
+
var _onResizeEndRef$curre;
|
|
84
|
+
return (_onResizeEndRef$curre = onResizeEndRef.current) === null || _onResizeEndRef$curre === void 0 ? void 0 : _onResizeEndRef$curre.call(onResizeEndRef, event);
|
|
85
|
+
}, [onResizeEndRef]);
|
|
86
|
+
var isMotionEnabled = fg('platform-dst-motion-uplift-panel');
|
|
87
|
+
var surface = isPanelOpen && /*#__PURE__*/React.createElement(LocalPanelSurface, {
|
|
88
|
+
key: "local-panel",
|
|
89
|
+
contentKey: panelKey,
|
|
90
|
+
defaultWidth: fallbackWidth,
|
|
91
|
+
minWidth: panelMinWidth,
|
|
92
|
+
maxWidth: panelMaxWidth,
|
|
93
|
+
layoutRef: layoutRef,
|
|
94
|
+
managedSizing: state,
|
|
95
|
+
getManagedResizeBounds: getResizeBounds,
|
|
96
|
+
prepareResize: prepareResize,
|
|
97
|
+
onManagedResizeStart: startResize,
|
|
98
|
+
onManagedResize: resize,
|
|
99
|
+
onManagedResizeEnd: completeResize,
|
|
100
|
+
onWidthChange: handleWidthChange,
|
|
101
|
+
onResizeEnd: handleResizeEnd,
|
|
102
|
+
label: panelLabel,
|
|
103
|
+
resizeLabel: resizeLabel,
|
|
104
|
+
testId: testId && "".concat(testId, "--panel-slot")
|
|
105
|
+
}, panel);
|
|
106
|
+
return /*#__PURE__*/React.createElement(PanelLayoutShell, {
|
|
107
|
+
isPanelOpen: isPanelOpen,
|
|
108
|
+
panelWidth: (_state$width = state === null || state === void 0 ? void 0 : state.width) !== null && _state$width !== void 0 ? _state$width : fallbackWidth,
|
|
109
|
+
compactPanelWidth: Math.max(panelMinWidth, Math.min(panelWidth !== null && panelWidth !== void 0 ? panelWidth : compactWidth, panelMaxWidth !== null && panelMaxWidth !== void 0 ? panelMaxWidth : Infinity)),
|
|
110
|
+
panelMinWidth: panelMinWidth,
|
|
111
|
+
mode: state === null || state === void 0 ? void 0 : state.mode,
|
|
112
|
+
layoutRef: layoutRef,
|
|
113
|
+
shouldClipOverflow: isMotionEnabled,
|
|
114
|
+
testId: testId,
|
|
115
|
+
panel: isMotionEnabled ? /*#__PURE__*/React.createElement(ExitingPersistence, null, surface) : surface
|
|
116
|
+
}, children);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* A coordinated local panel with caller-owned content and state. Keep this host mounted
|
|
121
|
+
* while closed to retain resized widths. Unmount it to reset its width preferences.
|
|
122
|
+
*
|
|
123
|
+
* Mount only one local-panel host per navigation Root/sizing coordinator, including
|
|
124
|
+
* closed hosts and panel-system's LayoutWithPanel. Switch content through the same host;
|
|
125
|
+
* separate Roots may each own a local panel.
|
|
126
|
+
*
|
|
127
|
+
* With chat layout enabled it shares Root's sizing coordinator. Otherwise it measures
|
|
128
|
+
* its own Main region, leaving existing navigation/chat behavior unchanged.
|
|
129
|
+
* Local-panel placement and resize constraints use this layout in both cases; disabling
|
|
130
|
+
* the chat-layout gate does not restore the previous panel-system layout engine.
|
|
131
|
+
*/
|
|
132
|
+
export function PanelLayout(props) {
|
|
133
|
+
var parentSizing = useContext(LayoutAreaSizingContext);
|
|
134
|
+
var layoutRef = useRef(null);
|
|
135
|
+
var content = /*#__PURE__*/React.createElement(CoordinatedPanelLayout, {
|
|
136
|
+
layoutRef: layoutRef,
|
|
137
|
+
panel: props.panel,
|
|
138
|
+
isPanelOpen: props.isPanelOpen,
|
|
139
|
+
panelKey: props.panelKey,
|
|
140
|
+
panelWidth: props.panelWidth,
|
|
141
|
+
defaultPanelWidth: props.defaultPanelWidth,
|
|
142
|
+
compactDefaultPanelWidth: props.compactDefaultPanelWidth,
|
|
143
|
+
panelMinWidth: props.panelMinWidth,
|
|
144
|
+
panelMaxWidth: props.panelMaxWidth,
|
|
145
|
+
onPanelWidthChange: props.onPanelWidthChange,
|
|
146
|
+
onResizeEnd: props.onResizeEnd,
|
|
147
|
+
panelLabel: props.panelLabel,
|
|
148
|
+
resizeLabel: props.resizeLabel,
|
|
149
|
+
testId: props.testId
|
|
150
|
+
}, props.children);
|
|
151
|
+
return parentSizing ? content : /*#__PURE__*/React.createElement(LayoutAreaSizingProvider, {
|
|
152
|
+
layoutRef: layoutRef
|
|
153
|
+
}, content);
|
|
154
|
+
}
|
|
@@ -29,6 +29,7 @@ import TooltipContainer from '@atlaskit/tooltip/TooltipContainer';
|
|
|
29
29
|
import { requestClosePopovers } from '@atlaskit/top-layer/page-surface/request-close-popovers';
|
|
30
30
|
import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
|
|
31
31
|
import { contentInsetBlockStart } from '../constants';
|
|
32
|
+
import { LayoutAreaSizingContext } from '../layout-area-sizing-context';
|
|
32
33
|
import { convertResizeBoundToPixels } from './convert-resize-bound-to-pixels';
|
|
33
34
|
import { getPercentageWithinPixelBounds } from './get-percentage-within-pixel-bounds';
|
|
34
35
|
import { getPixelWidth } from './get-pixel-width';
|
|
@@ -130,6 +131,7 @@ function getTextDirection(element) {
|
|
|
130
131
|
return direction === 'rtl' ? 'rtl' : 'ltr';
|
|
131
132
|
}
|
|
132
133
|
var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
|
|
134
|
+
var _useContext;
|
|
133
135
|
var label = _ref3.label,
|
|
134
136
|
onResizeStart = _ref3.onResizeStart,
|
|
135
137
|
onResizeEnd = _ref3.onResizeEnd,
|
|
@@ -149,6 +151,14 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
|
|
|
149
151
|
tooltipContent = _ref3.tooltipContent,
|
|
150
152
|
shortcut = _ref3.shortcut;
|
|
151
153
|
var splitterRef = useRef(null);
|
|
154
|
+
var registerSplitter = (_useContext = useContext(LayoutAreaSizingContext)) === null || _useContext === void 0 ? void 0 : _useContext.registerSplitter;
|
|
155
|
+
var unregisterSplitter = useRef(undefined);
|
|
156
|
+
var setSplitterRef = useCallback(function (element) {
|
|
157
|
+
var _unregisterSplitter$c;
|
|
158
|
+
(_unregisterSplitter$c = unregisterSplitter.current) === null || _unregisterSplitter$c === void 0 || _unregisterSplitter$c.call(unregisterSplitter);
|
|
159
|
+
splitterRef.current = element;
|
|
160
|
+
unregisterSplitter.current = element && prepareResize ? registerSplitter === null || registerSplitter === void 0 ? void 0 : registerSplitter(element) : undefined;
|
|
161
|
+
}, [prepareResize, registerSplitter]);
|
|
152
162
|
var labelId = useId();
|
|
153
163
|
// Separate state used for the input range width to remove the UI's dependency on the "persisted" layout state value being updated
|
|
154
164
|
var _useState = useState(panelWidth),
|
|
@@ -185,7 +195,7 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
|
|
|
185
195
|
var initialClientXRef = useRef(null);
|
|
186
196
|
// Live allocation changes panelWidth on every frame. Only the legacy path should
|
|
187
197
|
// rebind the drag listeners when this value changes.
|
|
188
|
-
var legacyPanelWidth = fg('platform-dst-chat-panel-layout') ? undefined : panelWidth;
|
|
198
|
+
var legacyPanelWidth = fg('platform-dst-chat-panel-layout') || onResizeInternal ? undefined : panelWidth;
|
|
189
199
|
useEffect(function () {
|
|
190
200
|
var splitter = splitterRef.current;
|
|
191
201
|
invariant(splitter, 'Splitter ref must be set');
|
|
@@ -294,7 +304,7 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
|
|
|
294
304
|
position: position
|
|
295
305
|
});
|
|
296
306
|
var resizingWidth = "clamp(".concat(resizeBounds.min, ", ").concat(targetWidth, "px, ").concat(resizeBounds.max, ")");
|
|
297
|
-
if (
|
|
307
|
+
if (onResizeInternal) {
|
|
298
308
|
// The allocator needs below-minimum requests for the local-to-chat cascade.
|
|
299
309
|
var currentBounds = getResizeBounds();
|
|
300
310
|
var width = Math.max(0, Math.min(targetWidth, prepareResize ? window.innerWidth : convertResizeBoundToPixels(currentBounds.max)));
|
|
@@ -350,7 +360,7 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
|
|
|
350
360
|
}
|
|
351
361
|
finalWidth = getPixelWidth(panel); // Persist the final preferred width before removing the imperative drag
|
|
352
362
|
// variable, so the rendered width is continuous across pointer release.
|
|
353
|
-
if (fg('platform-dst-chat-panel-layout')) {
|
|
363
|
+
if (fg('platform-dst-chat-panel-layout') || onResizeInternal) {
|
|
354
364
|
flushSync(function () {
|
|
355
365
|
return onCompleteResize(finalWidth);
|
|
356
366
|
});
|
|
@@ -407,7 +417,7 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
|
|
|
407
417
|
return _regeneratorRuntime.wrap(function (_context2) {
|
|
408
418
|
while (1) switch (_context2.prev = _context2.next) {
|
|
409
419
|
case 0:
|
|
410
|
-
isManagedResize =
|
|
420
|
+
isManagedResize = onResizeInternal;
|
|
411
421
|
sequence = focusSequence.current;
|
|
412
422
|
value = isManagedResize ? parseFloat(event.currentTarget.value) : parseInt(event.currentTarget.value);
|
|
413
423
|
if (!prepareResize) {
|
|
@@ -593,9 +603,8 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
|
|
|
593
603
|
shortcut: shortcut,
|
|
594
604
|
testId: testId ? "".concat(testId, "-tooltip") : undefined
|
|
595
605
|
}, /*#__PURE__*/React.createElement("div", {
|
|
596
|
-
ref:
|
|
606
|
+
ref: setSplitterRef,
|
|
597
607
|
"data-testid": testId,
|
|
598
|
-
"data-panel-splitter": prepareResize ? '' : undefined,
|
|
599
608
|
onDoubleClick: onDoubleClick,
|
|
600
609
|
className: ax([grabAreaStyles.root, fg('platform-dst-tokens-finesse') && grabAreaStyles.rootFinesse])
|
|
601
610
|
}, /*#__PURE__*/React.createElement(VisuallyHidden, null, /*#__PURE__*/React.createElement("input", {
|
|
@@ -21,7 +21,7 @@ import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/el
|
|
|
21
21
|
import { hasOpenDialogOrPopover } from '@atlaskit/top-layer/page-surface/has-open-dialog-or-popover';
|
|
22
22
|
import { useSkipLinkInternal } from '../../../context/skip-links/use-skip-link-internal';
|
|
23
23
|
import { TopNavStartElement } from '../../../context/top-nav-start/top-nav-start-element';
|
|
24
|
-
import { UNSAFE_sideNavLayoutVar, mainMinimumWidthVar, openLayerObserverSideNavNamespace, sideNavLiveWidthVar, sideNavPanelSplitterId, sideNavVar } from '../constants';
|
|
24
|
+
import { UNSAFE_sideNavLayoutVar, defaultMainMinWidth, mainMinimumWidthVar, openLayerObserverSideNavNamespace, sideNavLiveWidthVar, sideNavPanelSplitterId, sideNavVar } from '../constants';
|
|
25
25
|
import { DangerouslyHoistCssVarToDocumentRoot } from '../dangerously-hoist-css-var-to-document-root';
|
|
26
26
|
import { DangerouslyHoistSlotSizes } from '../hoist-slot-sizes-context';
|
|
27
27
|
import { convertResizeBoundToPixels } from '../panel-splitter/convert-resize-bound-to-pixels';
|
|
@@ -354,7 +354,7 @@ function SideNavInternal(_ref4) {
|
|
|
354
354
|
var isLocalPanelInline = localPanel && getComputedStyle(localPanel).gridArea === 'panel';
|
|
355
355
|
var localPanelWidth = isLocalPanelInline ? localPanel.getBoundingClientRect().width : 0;
|
|
356
356
|
var mainContentWidth = mainWidth - localPanelWidth;
|
|
357
|
-
var mainMinimumWidth = getPixelCustomProperty(main, mainMinimumWidthVar,
|
|
357
|
+
var mainMinimumWidth = getPixelCustomProperty(main, mainMinimumWidthVar, defaultMainMinWidth);
|
|
358
358
|
var availableWidth = Math.max(0, mainContentWidth - mainMinimumWidth);
|
|
359
359
|
var availableInlineWidth = Math.floor(sideNavWidth + availableWidth);
|
|
360
360
|
var constrainedMaxWidth = maxWidth ? Math.min(convertResizeBoundToPixels(maxWidth), availableInlineWidth) : availableInlineWidth;
|
|
@@ -34,7 +34,7 @@ var IconRenderer = function IconRenderer(_ref) {
|
|
|
34
34
|
} : undefined
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
// @ts-
|
|
37
|
+
// @ts-expect-error -- The render-prop guard returns IconProp (a component type), which is not a ReactNode.
|
|
38
38
|
return /*#__PURE__*/React.createElement(React.Fragment, null, isRenderProp ? Icon(iconProps) : /*#__PURE__*/React.createElement(Icon, iconProps));
|
|
39
39
|
};
|
|
40
40
|
export default IconRenderer;
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
* This violates the [UI styling standard](https://atlassian.design/components/eslint-plugin-ui-styling-standard/no-imported-style-values/usage).
|
|
4
4
|
* We have chosen to ignore this rule to prevent duplicating them across the different slots, and to provide a high level view of them and how they relate.
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* Default minimum width of Main, in pixels, before a custom minimum is registered.
|
|
8
|
+
*/
|
|
9
|
+
export declare const defaultMainMinWidth = 320;
|
|
6
10
|
export declare const sideNavVar = "--n_sNvw";
|
|
7
11
|
export declare const asideVar = "--n_asDw";
|
|
8
12
|
export declare const panelVar = "--n_pnlW";
|
|
@@ -12,6 +16,14 @@ export declare const mainMinimumWidthVar = "--n_mainMinW";
|
|
|
12
16
|
export declare const bannerMountedVar = "--n_bnrM";
|
|
13
17
|
export declare const topNavMountedVar = "--n_tNvM";
|
|
14
18
|
export declare const ribbonVar = "--n_rbnW";
|
|
19
|
+
/**
|
|
20
|
+
* Rendered border-box width of the local PanelLayout surface, in both inline and overlay modes.
|
|
21
|
+
* Published on document.documentElement after mounting when Root opts into
|
|
22
|
+
* UNSAFE_dangerouslyHoistSlotSizes. Only the primary Root should opt in.
|
|
23
|
+
* Use `var(${localPanelWidthVar}, 0px)` for external controls, not for width persistence
|
|
24
|
+
* or sizing the panel itself. The property is removed when the surface unmounts.
|
|
25
|
+
*/
|
|
26
|
+
export declare const localPanelWidthVar = "--n_localPanelWidth";
|
|
15
27
|
/**
|
|
16
28
|
* Captures the current width of the side navigation, at all times, including during resizing.
|
|
17
29
|
*
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local-panel defaults in pixels, used only when no explicit preference exists.
|
|
3
|
+
* Keep the existing desktop width until chat layout rolls out. Compact sizing is independent.
|
|
4
|
+
* These are requested defaults, not measurements of an open panel.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getPanelLayoutDefaults(): {
|
|
7
|
+
panelWidth: number;
|
|
8
|
+
compactPanelWidth: number;
|
|
9
|
+
panelMinWidth: number;
|
|
10
|
+
};
|
|
@@ -16,7 +16,11 @@ export type LayoutAreaConfig = {
|
|
|
16
16
|
onRequestClose?: () => void;
|
|
17
17
|
};
|
|
18
18
|
export type StoredLayoutArea = LayoutAreaConfig & {
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Local panels share this preference across inline and overlay modes.
|
|
21
|
+
* SideNav and ChatPanel retain separate overlay preferences.
|
|
22
|
+
*/
|
|
23
|
+
preferredWidth?: number;
|
|
20
24
|
preferredOverlayWidth?: number;
|
|
21
25
|
liveResize?: {
|
|
22
26
|
mode: LayoutAreaMode;
|
|
@@ -50,6 +54,10 @@ export type LayoutAreaAllocation = LayoutAreaState & {
|
|
|
50
54
|
};
|
|
51
55
|
};
|
|
52
56
|
export type LayoutAreaSizingContextValue = {
|
|
57
|
+
/**
|
|
58
|
+
* Registers a lazy-loading trigger without requesting the sizing runtime.
|
|
59
|
+
*/
|
|
60
|
+
registerSplitter?: (element: HTMLElement) => () => void;
|
|
53
61
|
prepareResize?: () => Promise<boolean>;
|
|
54
62
|
getResizeBounds: (area: LayoutArea) => ResizeBounds | undefined;
|
|
55
63
|
registerArea: (area: LayoutArea, config: LayoutAreaConfig) => void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type Key, type MutableRefObject, type ReactNode } from 'react';
|
|
6
|
+
import type { LayoutAreaMode, LayoutAreaState } from './layout-area-sizing-context';
|
|
7
|
+
import type { PanelResizeEnd } from './panel-layout';
|
|
8
|
+
import type { ResizeBounds } from './panel-splitter/types';
|
|
9
|
+
type LocalPanelSurfaceProps = {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
contentKey?: Key;
|
|
12
|
+
label: string;
|
|
13
|
+
resizeLabel: string;
|
|
14
|
+
defaultWidth: number;
|
|
15
|
+
minWidth: number;
|
|
16
|
+
maxWidth?: number;
|
|
17
|
+
testId?: string;
|
|
18
|
+
layoutRef: MutableRefObject<HTMLDivElement | null>;
|
|
19
|
+
managedSizing?: LayoutAreaState;
|
|
20
|
+
getManagedResizeBounds: () => ResizeBounds | undefined;
|
|
21
|
+
prepareResize?: () => Promise<boolean>;
|
|
22
|
+
onManagedResizeStart: (mode: LayoutAreaMode) => void;
|
|
23
|
+
onManagedResize: (mode: LayoutAreaMode, width: number) => void;
|
|
24
|
+
onManagedResizeEnd: (mode: LayoutAreaMode, width: number) => void;
|
|
25
|
+
onWidthChange: (width: number) => void;
|
|
26
|
+
onResizeEnd: (event: PanelResizeEnd) => void;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Internal surface for PanelLayout. The host supplies content; navigation owns its geometry.
|
|
30
|
+
*/
|
|
31
|
+
export declare function LocalPanelSurface({ children, contentKey, label, resizeLabel, defaultWidth, minWidth, maxWidth, testId, layoutRef, managedSizing, getManagedResizeBounds, prepareResize, onManagedResizeStart, onManagedResize, onManagedResizeEnd, onWidthChange, onResizeEnd, }: LocalPanelSurfaceProps): JSX.Element;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type MutableRefObject, type ReactNode } from 'react';
|
|
6
|
+
import type { LayoutAreaMode } from './layout-area-sizing-context';
|
|
7
|
+
type PanelLayoutShellProps = {
|
|
8
|
+
/**
|
|
9
|
+
* Main content rendered alongside the local panel.
|
|
10
|
+
*/
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Panel content or surface supplied by the caller.
|
|
14
|
+
*/
|
|
15
|
+
panel: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the local panel is open.
|
|
18
|
+
*/
|
|
19
|
+
isPanelOpen: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Effective panel track width in pixels.
|
|
22
|
+
*/
|
|
23
|
+
panelWidth: number;
|
|
24
|
+
compactPanelWidth: number;
|
|
25
|
+
/**
|
|
26
|
+
* Minimum panel width in pixels.
|
|
27
|
+
*/
|
|
28
|
+
panelMinWidth?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Allocated placement. Before measurement, CSS reserves a track when both minimums fit the host.
|
|
31
|
+
*/
|
|
32
|
+
mode?: LayoutAreaMode;
|
|
33
|
+
/**
|
|
34
|
+
* Shared with the panel's resize controls so imperative resizing also updates the grid track.
|
|
35
|
+
*/
|
|
36
|
+
layoutRef?: MutableRefObject<HTMLDivElement | null>;
|
|
37
|
+
/**
|
|
38
|
+
* Clips the layout during panel motion.
|
|
39
|
+
*/
|
|
40
|
+
shouldClipOverflow?: boolean;
|
|
41
|
+
testId?: string;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Grid and scrolling for Main and its local panel. Use inside navigation's Root and Main.
|
|
45
|
+
*/
|
|
46
|
+
export declare function PanelLayoutShell({ children, panel, isPanelOpen, panelWidth, compactPanelWidth, panelMinWidth, mode, layoutRef, shouldClipOverflow, testId, }: PanelLayoutShellProps): JSX.Element;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { type Key, type ReactNode } from 'react';
|
|
2
|
+
import { type LayoutAreaMode } from './layout-area-sizing-context';
|
|
3
|
+
export type PanelResizeEnd = {
|
|
4
|
+
initialWidth: number;
|
|
5
|
+
finalWidth: number;
|
|
6
|
+
mode: LayoutAreaMode;
|
|
7
|
+
};
|
|
8
|
+
export type PanelLayoutProps = {
|
|
9
|
+
/**
|
|
10
|
+
* Main content. Mount PanelLayout inside navigation's Main, alongside ChatPanel in Root.
|
|
11
|
+
*/
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Caller-owned panel content; no Panel System provider or renderer is required.
|
|
15
|
+
*/
|
|
16
|
+
panel: ReactNode;
|
|
17
|
+
isPanelOpen: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Optional content identity, used to reset scrolling and animate content replacement.
|
|
20
|
+
*/
|
|
21
|
+
panelKey?: Key;
|
|
22
|
+
/**
|
|
23
|
+
* Controlled preferred width in pixels. Allocation may constrain it without changing the request.
|
|
24
|
+
*/
|
|
25
|
+
panelWidth?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Initial preferred width in pixels; subsequent changes are ignored.
|
|
28
|
+
* Defaults to 365, or 400 with chat layout enabled.
|
|
29
|
+
* After a user resize, one preferred width is retained across inline and overlay modes.
|
|
30
|
+
* Available space can constrain the rendered width without overwriting that preference.
|
|
31
|
+
*/
|
|
32
|
+
defaultPanelWidth?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Default at compact viewport sizes. Defaults to 320, or an explicitly supplied defaultPanelWidth.
|
|
35
|
+
* Used only until a controlled width or user resize supplies a preference.
|
|
36
|
+
*/
|
|
37
|
+
compactDefaultPanelWidth?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Minimum width in pixels. Defaults to 320; overlays can be smaller in a narrower container.
|
|
40
|
+
*/
|
|
41
|
+
panelMinWidth?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Optional maximum width in pixels.
|
|
44
|
+
*/
|
|
45
|
+
panelMaxWidth?: number;
|
|
46
|
+
/**
|
|
47
|
+
* Called after user resizing, with the effective width. Accept this value to control panelWidth.
|
|
48
|
+
*/
|
|
49
|
+
onPanelWidthChange?: (width: number) => void;
|
|
50
|
+
/**
|
|
51
|
+
* One callback per completed pointer/keyboard resize, for persistence and analytics.
|
|
52
|
+
*/
|
|
53
|
+
onResizeEnd?: (event: PanelResizeEnd) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Accessible region and splitter labels; pass localized values in products.
|
|
56
|
+
*/
|
|
57
|
+
panelLabel?: string;
|
|
58
|
+
resizeLabel?: string;
|
|
59
|
+
testId?: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* A coordinated local panel with caller-owned content and state. Keep this host mounted
|
|
63
|
+
* while closed to retain resized widths. Unmount it to reset its width preferences.
|
|
64
|
+
*
|
|
65
|
+
* Mount only one local-panel host per navigation Root/sizing coordinator, including
|
|
66
|
+
* closed hosts and panel-system's LayoutWithPanel. Switch content through the same host;
|
|
67
|
+
* separate Roots may each own a local panel.
|
|
68
|
+
*
|
|
69
|
+
* With chat layout enabled it shares Root's sizing coordinator. Otherwise it measures
|
|
70
|
+
* its own Main region, leaving existing navigation/chat behavior unchanged.
|
|
71
|
+
* Local-panel placement and resize constraints use this layout in both cases; disabling
|
|
72
|
+
* the chat-layout gate does not restore the previous panel-system layout engine.
|
|
73
|
+
*/
|
|
74
|
+
export declare function PanelLayout(props: PanelLayoutProps): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/navigation-system/layout/panel-layout",
|
|
3
|
+
"main": "../../dist/cjs/entry-points/layout/panel-layout.js",
|
|
4
|
+
"module": "../../dist/esm/entry-points/layout/panel-layout.js",
|
|
5
|
+
"module:es2019": "../../dist/es2019/entry-points/layout/panel-layout.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../dist/types/entry-points/layout/panel-layout.d.ts"
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/navigation-system",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.4.1",
|
|
4
4
|
"description": "The latest navigation system for Atlassian apps.",
|
|
5
5
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@atlaskit/icon": "^38.0.0",
|
|
67
67
|
"@atlaskit/layering": "^6.1.0",
|
|
68
68
|
"@atlaskit/logo": "^23.3.0",
|
|
69
|
-
"@atlaskit/motion": "^9.
|
|
69
|
+
"@atlaskit/motion": "^9.5.0",
|
|
70
70
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
71
71
|
"@atlaskit/platform-feature-flags-react": "^1.2.0",
|
|
72
72
|
"@atlaskit/popup": "^10.0.0",
|
|
@@ -74,9 +74,9 @@
|
|
|
74
74
|
"@atlaskit/primitives": "^22.6.0",
|
|
75
75
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
76
76
|
"@atlaskit/side-nav-items": "^2.6.0",
|
|
77
|
-
"@atlaskit/tokens": "^20.
|
|
77
|
+
"@atlaskit/tokens": "^20.8.0",
|
|
78
78
|
"@atlaskit/tooltip": "^24.4.0",
|
|
79
|
-
"@atlaskit/top-layer": "^6.
|
|
79
|
+
"@atlaskit/top-layer": "^6.7.0",
|
|
80
80
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
81
81
|
"@babel/runtime": "^7.0.0",
|
|
82
82
|
"@compiled/react": "^1.0.2",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"@atlaskit/docs": "^12.3.0",
|
|
100
100
|
"@atlaskit/dropdown-menu": "^21.0.0",
|
|
101
101
|
"@atlaskit/flag": "^19.0.0",
|
|
102
|
-
"@atlaskit/form": "^18.
|
|
102
|
+
"@atlaskit/form": "^18.3.0",
|
|
103
103
|
"@atlaskit/heading": "^8.0.0",
|
|
104
104
|
"@atlaskit/icon-lab": "^7.11.0",
|
|
105
105
|
"@atlaskit/image": "^5.2.0",
|
|
@@ -126,10 +126,10 @@
|
|
|
126
126
|
"@atlaskit/textfield": "^10.2.0",
|
|
127
127
|
"@atlassian/feature-flags-test-utils": "^1.3.0",
|
|
128
128
|
"@atlassian/gemini": "^1.54.0",
|
|
129
|
-
"@atlassian/panel-system": "^
|
|
129
|
+
"@atlassian/panel-system": "^2.0.0",
|
|
130
130
|
"@atlassian/react-async": "^0.23.0",
|
|
131
131
|
"@atlassian/react-entrypoint": "^1.1.0",
|
|
132
|
-
"@atlassian/search-dialog": "^10.
|
|
132
|
+
"@atlassian/search-dialog": "^10.25.0",
|
|
133
133
|
"@atlassian/ssr-tests": "workspace:^",
|
|
134
134
|
"@atlassian/test-utils": "^1.1.0",
|
|
135
135
|
"@atlassian/testing-library": "^0.12.0",
|