@atlaskit/navigation-system 2.3.4 → 2.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 +19 -0
- package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.compiled.css +6 -5
- package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.js +5 -3
- package/dist/cjs/ui/page-layout/side-nav/side-nav.compiled.css +1 -1
- package/dist/cjs/ui/page-layout/side-nav/side-nav.js +4 -2
- package/dist/cjs/ui/page-layout/top-nav/top-nav-end.compiled.css +1 -0
- package/dist/cjs/ui/page-layout/top-nav/top-nav-end.js +4 -2
- package/dist/cjs/ui/page-layout/top-nav/top-nav-middle.compiled.css +1 -0
- package/dist/cjs/ui/page-layout/top-nav/top-nav-middle.js +4 -2
- package/dist/cjs/ui/page-layout/top-nav/top-nav-start.compiled.css +4 -1
- package/dist/cjs/ui/page-layout/top-nav/top-nav-start.js +11 -2
- package/dist/cjs/ui/page-layout/top-nav/top-nav.compiled.css +9 -1
- package/dist/cjs/ui/page-layout/top-nav/top-nav.js +65 -4
- package/dist/cjs/ui/top-nav-items/search.compiled.css +1 -0
- package/dist/cjs/ui/top-nav-items/search.js +5 -2
- package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.compiled.css +6 -5
- package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.js +5 -3
- package/dist/es2019/ui/page-layout/side-nav/side-nav.compiled.css +1 -1
- package/dist/es2019/ui/page-layout/side-nav/side-nav.js +5 -3
- package/dist/es2019/ui/page-layout/top-nav/top-nav-end.compiled.css +1 -0
- package/dist/es2019/ui/page-layout/top-nav/top-nav-end.js +4 -2
- package/dist/es2019/ui/page-layout/top-nav/top-nav-middle.compiled.css +1 -0
- package/dist/es2019/ui/page-layout/top-nav/top-nav-middle.js +4 -2
- package/dist/es2019/ui/page-layout/top-nav/top-nav-start.compiled.css +4 -1
- package/dist/es2019/ui/page-layout/top-nav/top-nav-start.js +12 -2
- package/dist/es2019/ui/page-layout/top-nav/top-nav.compiled.css +9 -1
- package/dist/es2019/ui/page-layout/top-nav/top-nav.js +66 -5
- package/dist/es2019/ui/top-nav-items/search.compiled.css +1 -0
- package/dist/es2019/ui/top-nav-items/search.js +5 -2
- package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.compiled.css +6 -5
- package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.js +5 -3
- package/dist/esm/ui/page-layout/side-nav/side-nav.compiled.css +1 -1
- package/dist/esm/ui/page-layout/side-nav/side-nav.js +5 -3
- package/dist/esm/ui/page-layout/top-nav/top-nav-end.compiled.css +1 -0
- package/dist/esm/ui/page-layout/top-nav/top-nav-end.js +4 -2
- package/dist/esm/ui/page-layout/top-nav/top-nav-middle.compiled.css +1 -0
- package/dist/esm/ui/page-layout/top-nav/top-nav-middle.js +4 -2
- package/dist/esm/ui/page-layout/top-nav/top-nav-start.compiled.css +4 -1
- package/dist/esm/ui/page-layout/top-nav/top-nav-start.js +11 -2
- package/dist/esm/ui/page-layout/top-nav/top-nav.compiled.css +9 -1
- package/dist/esm/ui/page-layout/top-nav/top-nav.js +65 -5
- package/dist/esm/ui/top-nav-items/search.compiled.css +1 -0
- package/dist/esm/ui/top-nav-items/search.js +5 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlassian/navigation-system
|
|
2
2
|
|
|
3
|
+
## 2.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f0662cd7a143e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f0662cd7a143e) -
|
|
8
|
+
Internal changes to how borders are applied.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 2.4.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`6743796745b3d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6743796745b3d) -
|
|
16
|
+
Changes PanelSplitter to use a `col-resize` cursor instead of `ew-resize`, when the
|
|
17
|
+
`navx-full-height-sidebar` feature gate is enabled.
|
|
18
|
+
- [`ad74a7aedf419`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ad74a7aedf419) -
|
|
19
|
+
Adds layout changes to support a full height sidebar behind the `navx-full-height-sidebar` feature
|
|
20
|
+
gate.
|
|
21
|
+
|
|
3
22
|
## 2.3.4
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
._12ji1r31{outline-color:currentColor}
|
|
2
2
|
._12y31o36{outline-width:medium}
|
|
3
3
|
._152tidpf{inset-block-start:0}
|
|
4
|
-
.
|
|
5
|
-
._1bsbjfq9{width:var(--ds-border-width-indicator,3px)}
|
|
4
|
+
._1bsb1l7b{width:3px}
|
|
6
5
|
._1bsbl52n{width:17px}
|
|
7
6
|
._1e021v6z{inset-inline-start:7px}
|
|
8
7
|
._1e02zeo2{inset-inline-start:-9px}
|
|
@@ -11,23 +10,25 @@
|
|
|
11
10
|
._1lww5cps{transition-delay:0ms}
|
|
12
11
|
._1oec1yx9{transition-duration:.1s}
|
|
13
12
|
._1pbykb7n{z-index:1}
|
|
13
|
+
._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
|
|
14
14
|
._1qu2glyw{outline-style:none}
|
|
15
15
|
._4t3i1osq{height:100%}
|
|
16
|
+
._85i5ze3t{padding-block-end:var(--ds-space-0,0)}
|
|
16
17
|
._bfhk1j28{background-color:transparent}
|
|
17
18
|
._bfhk1r31{background-color:currentColor}
|
|
18
|
-
.
|
|
19
|
+
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
19
20
|
._k8m01ylx{transition-property:color}
|
|
20
21
|
._kqswstnw{position:absolute}
|
|
21
|
-
._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
|
|
22
22
|
._rjxpftgi{inset-inline-end:8px}
|
|
23
23
|
._syaz1j28{color:transparent}
|
|
24
24
|
._syaz1kw7{color:inherit}
|
|
25
|
-
._u5f3ze3t{padding-right:var(--ds-space-0,0)}
|
|
26
25
|
._u7coidpf{inset-block-end:0}
|
|
26
|
+
._y4tize3t{padding-inline-end:var(--ds-space-0,0)}
|
|
27
27
|
._1cg4fnf5:focus-within, ._le1bfnf5:hover{transition-duration:.2s}
|
|
28
28
|
._1dr21ylx:focus-within, ._1s5z1ylx:hover{transition-property:color}
|
|
29
29
|
._vp7gaqb7:focus-within, ._30l3aqb7:hover{color:var(--ds-text-selected,#0c66e4)}
|
|
30
30
|
._1gavfnf5:hover{transition-delay:.2s}
|
|
31
|
+
._d0al11mm:hover{cursor:col-resize}
|
|
31
32
|
._d0aluf7j:hover{cursor:ew-resize}
|
|
32
33
|
._1gglglyw:active{transition:none}
|
|
33
34
|
._9h8h16c2:active{color:var(--ds-link-pressed,#05c)}
|
|
@@ -20,6 +20,7 @@ var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
|
|
|
20
20
|
var _useId = require("@atlaskit/ds-lib/use-id");
|
|
21
21
|
var _useStableRef = _interopRequireDefault(require("@atlaskit/ds-lib/use-stable-ref"));
|
|
22
22
|
var _openLayerObserver = require("@atlaskit/layering/experimental/open-layer-observer");
|
|
23
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
24
|
var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
|
|
24
25
|
var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
25
26
|
var _blockDraggingToIframes = require("@atlaskit/pragmatic-drag-and-drop/element/block-dragging-to-iframes");
|
|
@@ -40,10 +41,11 @@ var containerStyles = {
|
|
|
40
41
|
positionStart: "_1e02zeo2"
|
|
41
42
|
};
|
|
42
43
|
var grabAreaStyles = {
|
|
43
|
-
root: "_1bsbl52n _4t3i1osq _kqswstnw
|
|
44
|
+
root: "_1bsbl52n _4t3i1osq _kqswstnw _1q51ze3t _y4tize3t _85i5ze3t _bozgze3t _syaz1j28 _bfhk1j28 _k8m01ylx _1oec1yx9 _1lww5cps _d0aluf7j _1gavfnf5 _vp7gaqb7 _30l3aqb7 _1dr21ylx _1s5z1ylx _1cg4fnf5 _le1bfnf5 _1gglglyw _9h8h16c2",
|
|
45
|
+
fullHeightSidebar: "_d0al11mm"
|
|
44
46
|
};
|
|
45
47
|
var lineStyles = {
|
|
46
|
-
root: "_kqswstnw _1e0c1ule
|
|
48
|
+
root: "_kqswstnw _1e0c1ule _1bsb1l7b _4t3i1osq _syaz1kw7 _bfhk1r31 _1e021v6z"
|
|
47
49
|
};
|
|
48
50
|
var panelSplitterDragDataSymbol = Symbol('panel-splitter-drag-data');
|
|
49
51
|
function signPanelSplitterDragData(data) {
|
|
@@ -283,7 +285,7 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref) {
|
|
|
283
285
|
ref: splitterRef,
|
|
284
286
|
"data-testid": testId,
|
|
285
287
|
onDoubleClick: onDoubleClick,
|
|
286
|
-
className: (0, _runtime.ax)([grabAreaStyles.root])
|
|
288
|
+
className: (0, _runtime.ax)([grabAreaStyles.root, (0, _platformFeatureFlags.fg)('navx-full-height-sidebar') && grabAreaStyles.fullHeightSidebar])
|
|
287
289
|
}, /*#__PURE__*/React.createElement(_visuallyHidden.default, null, /*#__PURE__*/React.createElement("input", {
|
|
288
290
|
type: "range",
|
|
289
291
|
value: rangeInputValue,
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
._kqsw1if8{position:sticky}
|
|
17
17
|
._vchhusvi{box-sizing:border-box}
|
|
18
18
|
@media (min-width:48rem){._14b5hc79{width:var(--n_snvRsz,var(--n_sNvw))}}
|
|
19
|
-
@media (min-width:64rem){._dm2518uv{display:initial}._dm25glyw{display:none}._p5clglyw{border-inline-end:none}._p5clzgxb{border-inline-end:1px solid var(--ds-border,#091e4224)}._qiln1gzg{grid-area:main}._4ap31bhr{background-color:var(--ds-surface-overlay,#fff)}._scbp1cd0{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #091e4226,0 0 1px #091e424f)}._qilnk0mc{grid-area:side-nav}._4ap3vuon{background-color:var(--ds-surface,#fff)}._scbpglyw{box-shadow:none}}
|
|
19
|
+
@media (min-width:64rem){._165t56xv{height:calc(100vh - var(--n_bnrM, 0px))}._180k1wjm{inset-block-start:calc(var(--n_bnrM, 0px))}._26vxoned{padding-block-start:calc(var(--n_tNvM, 0px))}._1mt19dtb{margin-block-start:calc(var(--n_tNvM, 0px)*-1)}._dm2518uv{display:initial}._dm25glyw{display:none}._p5clglyw{border-inline-end:none}._p5clzgxb{border-inline-end:1px solid var(--ds-border,#091e4224)}._qiln1gzg{grid-area:main}._4ap31bhr{background-color:var(--ds-surface-overlay,#fff)}._scbp1cd0{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #091e4226,0 0 1px #091e424f)}._qilnk0mc{grid-area:side-nav}._4ap3vuon{background-color:var(--ds-surface,#fff)}._scbpglyw{box-shadow:none}}
|
|
20
20
|
@supports not (-moz-appearance:none){@media (prefers-reduced-motion:no-preference){._139f8iot{transition-property:transform,display}._1tpvfnf5{transition-duration:.2s}._sylc1a5r{transition-behavior:allow-discrete}._1uwsjq3t{transform:translateX(-100%)}}@media (prefers-reduced-motion:no-preference){@starting-style{._oyeijq3t{transform:translateX(-100%)}}._139f8iot{transition-property:transform,display}._1tpvfnf5{transition-duration:.2s}._sylc1a5r{transition-behavior:allow-discrete}}}
|
|
@@ -60,7 +60,8 @@ var styles = {
|
|
|
60
60
|
flexContainer: "_4t3i1osq _1e0c1txw _2lx21bp4 _1bah1yb4",
|
|
61
61
|
hiddenMobileAndDesktop: "_1e0cglyw",
|
|
62
62
|
hiddenMobileOnly: "_1e0cglyw _dm2518uv",
|
|
63
|
-
hiddenDesktopOnly: "_dm25glyw"
|
|
63
|
+
hiddenDesktopOnly: "_dm25glyw",
|
|
64
|
+
fullHeightSidebar: "_165t56xv _180k1wjm _26vxoned _1mt19dtb"
|
|
64
65
|
};
|
|
65
66
|
var fallbackDefaultWidth = 320;
|
|
66
67
|
|
|
@@ -559,6 +560,7 @@ function SideNavInternal(_ref) {
|
|
|
559
560
|
cssVar: panelSplitterResizingVar,
|
|
560
561
|
panelId: _constants.sideNavPanelSplitterId
|
|
561
562
|
});
|
|
563
|
+
var isFlyoutClosed = (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'closed' || (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === undefined;
|
|
562
564
|
return /*#__PURE__*/React.createElement("nav", (0, _extends2.default)({
|
|
563
565
|
id: id
|
|
564
566
|
}, devTimeOnlyAttributes, {
|
|
@@ -567,7 +569,7 @@ function SideNavInternal(_ref) {
|
|
|
567
569
|
style: (0, _defineProperty2.default)({}, _constants.sideNavVar, clampedWidth),
|
|
568
570
|
ref: mergedRef,
|
|
569
571
|
"data-testid": testId,
|
|
570
|
-
className: (0, _runtime.ax)([styles.root, (0, _platformFeatureFlags.fg)('platform_design_system_nav4_sidenav_border') ? styles.newBorder : styles.oldBorder, isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileOnly, !isExpandedOnDesktop && isExpandedOnMobile && !isFlyoutVisible && styles.hiddenDesktopOnly, !isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileAndDesktop, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && styles.flyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && (0, _platformFeatureFlags.fg)('platform_design_system_nav4_sidenav_border') && styles.newBorderFlyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close' && styles.flyoutAnimateClosed])
|
|
572
|
+
className: (0, _runtime.ax)([styles.root, (0, _platformFeatureFlags.fg)('platform_design_system_nav4_sidenav_border') ? styles.newBorder : styles.oldBorder, isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileOnly, !isExpandedOnDesktop && isExpandedOnMobile && !isFlyoutVisible && styles.hiddenDesktopOnly, !isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileAndDesktop, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && styles.flyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && (0, _platformFeatureFlags.fg)('platform_design_system_nav4_sidenav_border') && styles.newBorderFlyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close' && styles.flyoutAnimateClosed, isFlyoutClosed && (0, _platformFeatureFlags.fg)('navx-full-height-sidebar') && styles.fullHeightSidebar])
|
|
571
573
|
}), /*#__PURE__*/React.createElement(_hoistUtils.DangerouslyHoistCssVarToDocumentRoot, {
|
|
572
574
|
variableName: _constants.sideNavLiveWidthVar,
|
|
573
575
|
value: "0px",
|
|
@@ -6,5 +6,6 @@
|
|
|
6
6
|
._1e0cglyw{display:none}
|
|
7
7
|
._1ul9zwfg{min-width:2pc}
|
|
8
8
|
._4cvr1h6o{align-items:center}
|
|
9
|
+
._lcxv1wug{pointer-events:auto}
|
|
9
10
|
@media (min-width:48rem){._181n1txw{display:flex}._1d2y1ris{min-width:max-content}}
|
|
10
11
|
@media (min-width:64rem){._glte1ris{width:max-content}._15ri1mjv{min-width:300px}._1gs5usvi{box-sizing:border-box}._ndwch9n0{justify-self:end}}
|
|
@@ -15,6 +15,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
15
15
|
var _react2 = require("@compiled/react");
|
|
16
16
|
var _useLayoutEffect = require("@atlaskit/ds-lib/use-layout-effect");
|
|
17
17
|
var _showMoreHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/show-more-horizontal"));
|
|
18
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
19
|
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
19
20
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
20
21
|
var _list = require("../../../components/list");
|
|
@@ -22,7 +23,8 @@ var _hasCustomThemeContext = require("../../top-nav-items/themed/has-custom-them
|
|
|
22
23
|
var _migration = require("../../top-nav-items/themed/migration");
|
|
23
24
|
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); }
|
|
24
25
|
var containerStyles = {
|
|
25
|
-
root: "_yyhy11wp _1e0c1txw _1bahh9n0 _1ul9zwfg _1d2y1ris _glte1ris _15ri1mjv _1gs5usvi _ndwch9n0"
|
|
26
|
+
root: "_yyhy11wp _1e0c1txw _1bahh9n0 _1ul9zwfg _1d2y1ris _glte1ris _15ri1mjv _1gs5usvi _ndwch9n0",
|
|
27
|
+
fullHeightSidebar: "_lcxv1wug"
|
|
26
28
|
};
|
|
27
29
|
var listStyles = {
|
|
28
30
|
root: "_zulp1b66 _4cvr1h6o _1e0c1txw",
|
|
@@ -68,7 +70,7 @@ function TopNavEnd(_ref) {
|
|
|
68
70
|
}, [query]);
|
|
69
71
|
return /*#__PURE__*/_react.default.createElement("nav", {
|
|
70
72
|
"aria-label": label,
|
|
71
|
-
className: (0, _runtime.ax)([containerStyles.root])
|
|
73
|
+
className: (0, _runtime.ax)([containerStyles.root, (0, _platformFeatureFlags.fg)('navx-full-height-sidebar') && containerStyles.fullHeightSidebar])
|
|
72
74
|
}, isMobile ? /*#__PURE__*/_react.default.createElement(_popup.default, {
|
|
73
75
|
isOpen: isOpen,
|
|
74
76
|
onClose: function onClose() {
|
|
@@ -4,4 +4,5 @@
|
|
|
4
4
|
._1bsb1osq{width:100%}
|
|
5
5
|
._1e0c1txw{display:flex}
|
|
6
6
|
._4cvr1h6o{align-items:center}
|
|
7
|
+
._lcxv1wug{pointer-events:auto}
|
|
7
8
|
@media (min-width:48rem){._181n11p5{display:grid}._1j8b15b0{grid-template-columns:minmax(min-content,780px)}._lagd1bp4{grid-auto-flow:column}._1t4c1ris{grid-auto-columns:max-content}._12e8h9n0{justify-items:end}}
|
|
@@ -9,8 +9,10 @@ exports.TopNavMiddle = TopNavMiddle;
|
|
|
9
9
|
require("./top-nav-middle.compiled.css");
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
13
|
var styles = {
|
|
13
|
-
root: "_zulpu2gc _yyhycs5v _1bsb1osq _4cvr1h6o _1e0c1txw _1bahh9n0 _181n11p5 _1j8b15b0 _lagd1bp4 _1t4c1ris _12e8h9n0"
|
|
14
|
+
root: "_zulpu2gc _yyhycs5v _1bsb1osq _4cvr1h6o _1e0c1txw _1bahh9n0 _181n11p5 _1j8b15b0 _lagd1bp4 _1t4c1ris _12e8h9n0",
|
|
15
|
+
fullHeightSidebar: "_lcxv1wug"
|
|
14
16
|
};
|
|
15
17
|
|
|
16
18
|
/**
|
|
@@ -24,6 +26,6 @@ var styles = {
|
|
|
24
26
|
function TopNavMiddle(_ref) {
|
|
25
27
|
var children = _ref.children;
|
|
26
28
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
27
|
-
className: (0, _runtime.ax)([styles.root])
|
|
29
|
+
className: (0, _runtime.ax)([styles.root, (0, _platformFeatureFlags.fg)('navx-full-height-sidebar') && styles.fullHeightSidebar])
|
|
28
30
|
}, children);
|
|
29
31
|
}
|
|
@@ -3,4 +3,7 @@
|
|
|
3
3
|
._yyhykb7n{grid-column:1}._1e0c1txw{display:flex}
|
|
4
4
|
._4cvr1h6o{align-items:center}
|
|
5
5
|
._4t3i1osq{height:100%}
|
|
6
|
-
|
|
6
|
+
._bozgutpp{padding-inline-start:var(--ds-space-150,9pt)}
|
|
7
|
+
._lcxv1wug{pointer-events:auto}
|
|
8
|
+
._p12fnau3{max-width:calc(100% - var(--ds-space-200, 1pc))}
|
|
9
|
+
@media (min-width:64rem){._15rin7od{min-width:unset}._glte1ris{width:max-content}._15ri1mjv{min-width:300px}._1gs5usvi{box-sizing:border-box}}
|
|
@@ -11,9 +11,12 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
13
|
var _topNavStartContext = require("../../../context/top-nav-start/top-nav-start-context");
|
|
14
|
+
var _useSideNavVisibility2 = require("../side-nav/use-side-nav-visibility");
|
|
14
15
|
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); }
|
|
15
16
|
var styles = {
|
|
16
|
-
root: "_zulp1b66 _yyhykb7n _4t3i1osq _4cvr1h6o _1e0c1txw _glte1ris _15ri1mjv _1gs5usvi"
|
|
17
|
+
root: "_zulp1b66 _yyhykb7n _4t3i1osq _4cvr1h6o _1e0c1txw _glte1ris _15ri1mjv _1gs5usvi",
|
|
18
|
+
fullHeightSidebar: "_p12fnau3 _bozgutpp _lcxv1wug",
|
|
19
|
+
fullHeightSidebarExpanded: "_15rin7od"
|
|
17
20
|
};
|
|
18
21
|
|
|
19
22
|
/**
|
|
@@ -31,9 +34,15 @@ function TopNavStart(_ref) {
|
|
|
31
34
|
ref(elementRef.current);
|
|
32
35
|
}
|
|
33
36
|
}, [elementRef, ref]);
|
|
37
|
+
|
|
38
|
+
// Need to use `{ defaultCollapsed: true }` otherwise when there is no side nav mounted this never becomes false
|
|
39
|
+
var _useSideNavVisibility = (0, _useSideNavVisibility2.useSideNavVisibility)({
|
|
40
|
+
defaultCollapsed: true
|
|
41
|
+
}),
|
|
42
|
+
isExpandedOnDesktop = _useSideNavVisibility.isExpandedOnDesktop;
|
|
34
43
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
35
44
|
ref: (0, _platformFeatureFlags.fg)('platform_fix_component_state_update_for_suspense') ? elementRef : ref,
|
|
36
45
|
"data-testid": testId,
|
|
37
|
-
className: (0, _runtime.ax)([styles.root])
|
|
46
|
+
className: (0, _runtime.ax)([styles.root, (0, _platformFeatureFlags.fg)('navx-full-height-sidebar') && styles.fullHeightSidebar, isExpandedOnDesktop && (0, _platformFeatureFlags.fg)('navx-full-height-sidebar') && styles.fullHeightSidebarExpanded])
|
|
38
47
|
}, children);
|
|
39
48
|
}
|
|
@@ -2,14 +2,22 @@
|
|
|
2
2
|
._nd5l8cbt{grid-area:top-bar}
|
|
3
3
|
._zulpu2gc{gap:var(--ds-space-100,8px)}
|
|
4
4
|
._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
|
|
5
|
+
._179rglyw{border-block-end:none}
|
|
5
6
|
._179rzgxb{border-block-end:1px solid var(--ds-border,#091e4224)}._152t1nws{inset-block-start:var(--n_bnrM,0)}
|
|
7
|
+
._1bsb1osq{width:100%}
|
|
6
8
|
._1e0c11p5{display:grid}
|
|
7
9
|
._1pbyegat{z-index:4}
|
|
8
10
|
._4cvr1h6o{align-items:center}
|
|
9
11
|
._4t3i1dgc{height:var(--n_tNvM)}
|
|
12
|
+
._4t3i1osq{height:100%}
|
|
13
|
+
._bfhkglyw{background-color:none}
|
|
10
14
|
._bfhkvuon{background-color:var(--ds-surface,#fff)}
|
|
15
|
+
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
11
16
|
._d6vu1bgi >span[data-ep-placeholder-id=top_navigation_skeleton]{display:contents}
|
|
12
17
|
._kqsw1if8{position:sticky}
|
|
18
|
+
._lcxvglyw{pointer-events:none}
|
|
13
19
|
._vchhusvi{box-sizing:border-box}
|
|
20
|
+
._y4tiutpp{padding-inline-end:var(--ds-space-150,9pt)}
|
|
14
21
|
._yv0e1mfv{grid-template-columns:auto 1fr auto}
|
|
15
|
-
@media (min-width:48rem){._1j8b18ax{grid-template-columns:1fr minmax(min-content,max-content) 1fr}}
|
|
22
|
+
@media (min-width:48rem){._1j8b18ax{grid-template-columns:1fr minmax(min-content,max-content) 1fr}}
|
|
23
|
+
@media (min-width:64rem){._1rqt15p1{grid-template-columns:var(--n_sNvlw,1fr) minmax(min-content,max-content) 1fr}._hyzqcs5v{z-index:2}._pdlmutpp{gap:var(--ds-space-150,9pt)}}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* top-nav.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
5
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
6
|
Object.defineProperty(exports, "__esModule", {
|
|
6
7
|
value: true
|
|
@@ -10,6 +11,8 @@ require("./top-nav.compiled.css");
|
|
|
10
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
var React = _react;
|
|
12
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
16
|
var _skipLinksContext = require("../../../context/skip-links/skip-links-context");
|
|
14
17
|
var _hasCustomThemeContext = require("../../top-nav-items/themed/has-custom-theme-context");
|
|
15
18
|
var _useCustomTheme = require("../../top-nav-items/themed/use-custom-theme");
|
|
@@ -17,9 +20,31 @@ var _constants = require("../constants");
|
|
|
17
20
|
var _hoistSlotSizesContext = require("../hoist-slot-sizes-context");
|
|
18
21
|
var _hoistUtils = require("../hoist-utils");
|
|
19
22
|
var _idUtils = require("../id-utils");
|
|
23
|
+
var _useSideNavVisibility2 = require("../side-nav/use-side-nav-visibility");
|
|
24
|
+
var _excluded = ["backgroundColor"];
|
|
20
25
|
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); }
|
|
26
|
+
/**
|
|
27
|
+
* Styles for the container for the top nav items.
|
|
28
|
+
*
|
|
29
|
+
* The background and border are applied to a different element for z-indexing reasons:
|
|
30
|
+
*
|
|
31
|
+
* - The items sit above the expanded side nav
|
|
32
|
+
* - The background sits below the expanded side nav
|
|
33
|
+
*/
|
|
21
34
|
var styles = {
|
|
22
|
-
root: "_nd5l8cbt _zulpu2gc _18zrutpp _179rzgxb _1e0c11p5 _yv0e1mfv _4cvr1h6o _bfhkvuon _vchhusvi _4t3i1dgc _152t1nws _kqsw1if8 _1pbyegat _d6vu1bgi _1j8b18ax"
|
|
35
|
+
root: "_nd5l8cbt _zulpu2gc _18zrutpp _179rzgxb _1e0c11p5 _yv0e1mfv _4cvr1h6o _bfhkvuon _vchhusvi _4t3i1dgc _152t1nws _kqsw1if8 _1pbyegat _d6vu1bgi _1j8b18ax",
|
|
36
|
+
fullHeightSidebar: "_179rglyw _bozgze3t _y4tiutpp _bfhkglyw _lcxvglyw _pdlmutpp",
|
|
37
|
+
fullHeightSidebarExpanded: "_1rqt15p1"
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Styles for the visible 'bar' of the top nav, including background and border.
|
|
42
|
+
*
|
|
43
|
+
* This is on a lower z-index than the expanded side nav, and is separate to the top nav items which are above the expanded side nav.
|
|
44
|
+
*/
|
|
45
|
+
var backgroundStyles = {
|
|
46
|
+
root: "_nd5l8cbt _179rzgxb _1bsb1osq _4t3i1osq _bfhkvuon _vchhusvi _152t1nws _kqsw1if8 _lcxvglyw _1pbyegat",
|
|
47
|
+
sideNavExpanded: "_hyzqcs5v"
|
|
23
48
|
};
|
|
24
49
|
|
|
25
50
|
/**
|
|
@@ -41,16 +66,52 @@ function TopNav(_ref) {
|
|
|
41
66
|
});
|
|
42
67
|
(0, _skipLinksContext.useSkipLink)(id, skipLinkLabel);
|
|
43
68
|
var customTheme = (0, _useCustomTheme.useCustomTheme)(UNSAFE_theme);
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* With the full height sidebar we have a foreground and background element,
|
|
72
|
+
* so we need to apply the custom theme styles to the correct element.
|
|
73
|
+
*
|
|
74
|
+
* The foreground element should not have a background color,
|
|
75
|
+
* and the background element doesn't need any of the other styles.
|
|
76
|
+
*/
|
|
77
|
+
var _useMemo = (0, _react.useMemo)(function () {
|
|
78
|
+
if (!customTheme.isEnabled) {
|
|
79
|
+
return {
|
|
80
|
+
backgroundStyle: undefined,
|
|
81
|
+
foregroundStyle: undefined
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
var _customTheme$style = customTheme.style,
|
|
85
|
+
backgroundColor = _customTheme$style.backgroundColor,
|
|
86
|
+
foregroundStyle = (0, _objectWithoutProperties2.default)(_customTheme$style, _excluded);
|
|
87
|
+
return {
|
|
88
|
+
backgroundStyle: {
|
|
89
|
+
backgroundColor: backgroundColor
|
|
90
|
+
},
|
|
91
|
+
foregroundStyle: foregroundStyle
|
|
92
|
+
};
|
|
93
|
+
}, [customTheme]),
|
|
94
|
+
backgroundStyle = _useMemo.backgroundStyle,
|
|
95
|
+
foregroundStyle = _useMemo.foregroundStyle;
|
|
96
|
+
var _useSideNavVisibility = (0, _useSideNavVisibility2.useSideNavVisibility)(),
|
|
97
|
+
isExpandedOnDesktop = _useSideNavVisibility.isExpandedOnDesktop;
|
|
44
98
|
return /*#__PURE__*/React.createElement(_hasCustomThemeContext.HasCustomThemeContext.Provider, {
|
|
45
99
|
value: customTheme.isEnabled
|
|
46
|
-
}, /*#__PURE__*/React.createElement("
|
|
100
|
+
}, (0, _platformFeatureFlags.fg)('navx-full-height-sidebar') && /*#__PURE__*/React.createElement("div", {
|
|
101
|
+
"data-layout-slot": true,
|
|
102
|
+
"aria-hidden": true
|
|
103
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
104
|
+
,
|
|
105
|
+
style: (0, _platformFeatureFlags.fg)('navx-full-height-sidebar') ? backgroundStyle : undefined,
|
|
106
|
+
className: (0, _runtime.ax)([backgroundStyles.root, isExpandedOnDesktop && backgroundStyles.sideNavExpanded])
|
|
107
|
+
}), /*#__PURE__*/React.createElement("header", {
|
|
47
108
|
id: id,
|
|
48
109
|
"data-layout-slot": true,
|
|
49
|
-
className: (0, _runtime.ax)([styles.root, xcss]),
|
|
110
|
+
className: (0, _runtime.ax)([styles.root, (0, _platformFeatureFlags.fg)('navx-full-height-sidebar') && styles.fullHeightSidebar, isExpandedOnDesktop && (0, _platformFeatureFlags.fg)('navx-full-height-sidebar') && styles.fullHeightSidebarExpanded, xcss]),
|
|
50
111
|
"data-testid": testId
|
|
51
112
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
52
113
|
,
|
|
53
|
-
style: customTheme.isEnabled ? customTheme.style : undefined
|
|
114
|
+
style: (0, _platformFeatureFlags.fg)('navx-full-height-sidebar') ? foregroundStyle : customTheme.isEnabled ? customTheme.style : undefined
|
|
54
115
|
}, /*#__PURE__*/React.createElement(_hoistUtils.HoistCssVarToLocalGrid, {
|
|
55
116
|
variableName: _constants.topNavMountedVar,
|
|
56
117
|
value: height
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
._80om1kdv{cursor:text}
|
|
14
14
|
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
15
15
|
._p12f1kvu{max-width:680px}
|
|
16
|
+
._p12fktbq{max-width:780px}
|
|
16
17
|
._vchhusvi{box-sizing:border-box}
|
|
17
18
|
._yv0e1mfv{grid-template-columns:auto 1fr auto}
|
|
18
19
|
._irr31d5g:hover{background-color:var(--ds-background-input-hovered,#f7f8f9)}
|
|
@@ -10,7 +10,9 @@ exports.Search = void 0;
|
|
|
10
10
|
require("./search.compiled.css");
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _css = require("@atlaskit/css");
|
|
13
14
|
var _search = _interopRequireDefault(require("@atlaskit/icon/core/search"));
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
16
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
15
17
|
var _migration = require("./themed/migration");
|
|
16
18
|
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); }
|
|
@@ -18,7 +20,8 @@ var styles = {
|
|
|
18
20
|
root: "_2rko12b0 _1rjcze3t _18zr12x7 _yv0e1mfv _4cvr1h6o _bfhk1j9a _vchhusvi _80om1kdv _1e0cglyw _4t3izwfg _p12f1kvu _1bsb1osq _irr31d5g _1di6r01l _114b11p5",
|
|
19
21
|
buttonText: "_yyhyjvu9 _1ii7kb7n",
|
|
20
22
|
iconBefore: "_yyhykb7n _1ii7kb7n _1e0c1txw",
|
|
21
|
-
elemAfter: "_yyhy11wp _1ii7kb7n _1e0c1txw"
|
|
23
|
+
elemAfter: "_yyhy11wp _1ii7kb7n _1e0c1txw",
|
|
24
|
+
fullHeightSidebar: "_p12fktbq"
|
|
22
25
|
};
|
|
23
26
|
|
|
24
27
|
/**
|
|
@@ -43,7 +46,7 @@ var Search = exports.Search = function Search(_ref) {
|
|
|
43
46
|
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-input, #8590A2)")
|
|
44
47
|
},
|
|
45
48
|
onClick: onClick,
|
|
46
|
-
xcss: styles.root,
|
|
49
|
+
xcss: (0, _css.cx)(styles.root, (0, _platformFeatureFlags.fg)('navx-full-height-sidebar') && styles.fullHeightSidebar),
|
|
47
50
|
interactionName: interactionName,
|
|
48
51
|
"aria-haspopup": ariaHaspopup
|
|
49
52
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
._12ji1r31{outline-color:currentColor}
|
|
2
2
|
._12y31o36{outline-width:medium}
|
|
3
3
|
._152tidpf{inset-block-start:0}
|
|
4
|
-
.
|
|
5
|
-
._1bsbjfq9{width:var(--ds-border-width-indicator,3px)}
|
|
4
|
+
._1bsb1l7b{width:3px}
|
|
6
5
|
._1bsbl52n{width:17px}
|
|
7
6
|
._1e021v6z{inset-inline-start:7px}
|
|
8
7
|
._1e02zeo2{inset-inline-start:-9px}
|
|
@@ -11,23 +10,25 @@
|
|
|
11
10
|
._1lww5cps{transition-delay:0ms}
|
|
12
11
|
._1oec1yx9{transition-duration:.1s}
|
|
13
12
|
._1pbykb7n{z-index:1}
|
|
13
|
+
._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
|
|
14
14
|
._1qu2glyw{outline-style:none}
|
|
15
15
|
._4t3i1osq{height:100%}
|
|
16
|
+
._85i5ze3t{padding-block-end:var(--ds-space-0,0)}
|
|
16
17
|
._bfhk1j28{background-color:transparent}
|
|
17
18
|
._bfhk1r31{background-color:currentColor}
|
|
18
|
-
.
|
|
19
|
+
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
19
20
|
._k8m01ylx{transition-property:color}
|
|
20
21
|
._kqswstnw{position:absolute}
|
|
21
|
-
._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
|
|
22
22
|
._rjxpftgi{inset-inline-end:8px}
|
|
23
23
|
._syaz1j28{color:transparent}
|
|
24
24
|
._syaz1kw7{color:inherit}
|
|
25
|
-
._u5f3ze3t{padding-right:var(--ds-space-0,0)}
|
|
26
25
|
._u7coidpf{inset-block-end:0}
|
|
26
|
+
._y4tize3t{padding-inline-end:var(--ds-space-0,0)}
|
|
27
27
|
._1cg4fnf5:focus-within, ._le1bfnf5:hover{transition-duration:.2s}
|
|
28
28
|
._1dr21ylx:focus-within, ._1s5z1ylx:hover{transition-property:color}
|
|
29
29
|
._vp7gaqb7:focus-within, ._30l3aqb7:hover{color:var(--ds-text-selected,#0c66e4)}
|
|
30
30
|
._1gavfnf5:hover{transition-delay:.2s}
|
|
31
|
+
._d0al11mm:hover{cursor:col-resize}
|
|
31
32
|
._d0aluf7j:hover{cursor:ew-resize}
|
|
32
33
|
._1gglglyw:active{transition:none}
|
|
33
34
|
._9h8h16c2:active{color:var(--ds-link-pressed,#05c)}
|
|
@@ -9,6 +9,7 @@ import invariant from 'tiny-invariant';
|
|
|
9
9
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
10
10
|
import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
|
|
11
11
|
import { useOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
13
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
13
14
|
import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
14
15
|
import { blockDraggingToIFrames } from '@atlaskit/pragmatic-drag-and-drop/element/block-dragging-to-iframes';
|
|
@@ -26,10 +27,11 @@ const containerStyles = {
|
|
|
26
27
|
positionStart: "_1e02zeo2"
|
|
27
28
|
};
|
|
28
29
|
const grabAreaStyles = {
|
|
29
|
-
root: "_1bsbl52n _4t3i1osq _kqswstnw
|
|
30
|
+
root: "_1bsbl52n _4t3i1osq _kqswstnw _1q51ze3t _y4tize3t _85i5ze3t _bozgze3t _syaz1j28 _bfhk1j28 _k8m01ylx _1oec1yx9 _1lww5cps _d0aluf7j _1gavfnf5 _vp7gaqb7 _30l3aqb7 _1dr21ylx _1s5z1ylx _1cg4fnf5 _le1bfnf5 _1gglglyw _9h8h16c2",
|
|
31
|
+
fullHeightSidebar: "_d0al11mm"
|
|
30
32
|
};
|
|
31
33
|
const lineStyles = {
|
|
32
|
-
root: "_kqswstnw _1e0c1ule
|
|
34
|
+
root: "_kqswstnw _1e0c1ule _1bsb1l7b _4t3i1osq _syaz1kw7 _bfhk1r31 _1e021v6z"
|
|
33
35
|
};
|
|
34
36
|
const panelSplitterDragDataSymbol = Symbol('panel-splitter-drag-data');
|
|
35
37
|
function signPanelSplitterDragData(data) {
|
|
@@ -261,7 +263,7 @@ const PortaledPanelSplitter = ({
|
|
|
261
263
|
ref: splitterRef,
|
|
262
264
|
"data-testid": testId,
|
|
263
265
|
onDoubleClick: onDoubleClick,
|
|
264
|
-
className: ax([grabAreaStyles.root])
|
|
266
|
+
className: ax([grabAreaStyles.root, fg('navx-full-height-sidebar') && grabAreaStyles.fullHeightSidebar])
|
|
265
267
|
}, /*#__PURE__*/React.createElement(VisuallyHidden, null, /*#__PURE__*/React.createElement("input", {
|
|
266
268
|
type: "range",
|
|
267
269
|
value: rangeInputValue,
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
._kqsw1if8{position:sticky}
|
|
17
17
|
._vchhusvi{box-sizing:border-box}
|
|
18
18
|
@media (min-width:48rem){._14b5hc79{width:var(--n_snvRsz,var(--n_sNvw))}}
|
|
19
|
-
@media (min-width:64rem){._dm2518uv{display:initial}._dm25glyw{display:none}._p5clglyw{border-inline-end:none}._p5clzgxb{border-inline-end:1px solid var(--ds-border,#091e4224)}._qiln1gzg{grid-area:main}._4ap31bhr{background-color:var(--ds-surface-overlay,#fff)}._scbp1cd0{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #091e4226,0 0 1px #091e424f)}._qilnk0mc{grid-area:side-nav}._4ap3vuon{background-color:var(--ds-surface,#fff)}._scbpglyw{box-shadow:none}}
|
|
19
|
+
@media (min-width:64rem){._165t56xv{height:calc(100vh - var(--n_bnrM, 0px))}._180k1wjm{inset-block-start:calc(var(--n_bnrM, 0px))}._26vxoned{padding-block-start:calc(var(--n_tNvM, 0px))}._1mt19dtb{margin-block-start:calc(var(--n_tNvM, 0px)*-1)}._dm2518uv{display:initial}._dm25glyw{display:none}._p5clglyw{border-inline-end:none}._p5clzgxb{border-inline-end:1px solid var(--ds-border,#091e4224)}._qiln1gzg{grid-area:main}._4ap31bhr{background-color:var(--ds-surface-overlay,#fff)}._scbp1cd0{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #091e4226,0 0 1px #091e424f)}._qilnk0mc{grid-area:side-nav}._4ap3vuon{background-color:var(--ds-surface,#fff)}._scbpglyw{box-shadow:none}}
|
|
20
20
|
@supports not (-moz-appearance:none){@media (prefers-reduced-motion:no-preference){._139f8iot{transition-property:transform,display}._1tpvfnf5{transition-duration:.2s}._sylc1a5r{transition-behavior:allow-discrete}._1uwsjq3t{transform:translateX(-100%)}}@media (prefers-reduced-motion:no-preference){@starting-style{._oyeijq3t{transform:translateX(-100%)}}._139f8iot{transition-property:transform,display}._1tpvfnf5{transition-duration:.2s}._sylc1a5r{transition-behavior:allow-discrete}}}
|
|
@@ -13,7 +13,7 @@ import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/ad
|
|
|
13
13
|
import { media } from '@atlaskit/primitives/responsive';
|
|
14
14
|
import { useSkipLinkInternal } from '../../../context/skip-links/skip-links-context';
|
|
15
15
|
import { TopNavStartElement } from '../../../context/top-nav-start/top-nav-start-context';
|
|
16
|
-
import { contentHeightWhenFixed, contentInsetBlockStart, localSlotLayers, sideNavLiveWidthVar, sideNavPanelSplitterId, sideNavVar, UNSAFE_sideNavLayoutVar } from '../constants';
|
|
16
|
+
import { bannerMountedVar, contentHeightWhenFixed, contentInsetBlockStart, localSlotLayers, sideNavLiveWidthVar, sideNavPanelSplitterId, sideNavVar, topNavMountedVar, UNSAFE_sideNavLayoutVar } from '../constants';
|
|
17
17
|
import { DangerouslyHoistSlotSizes } from '../hoist-slot-sizes-context';
|
|
18
18
|
import { DangerouslyHoistCssVarToDocumentRoot } from '../hoist-utils';
|
|
19
19
|
import { useLayoutId } from '../id-utils';
|
|
@@ -47,7 +47,8 @@ const styles = {
|
|
|
47
47
|
flexContainer: "_4t3i1osq _1e0c1txw _2lx21bp4 _1bah1yb4",
|
|
48
48
|
hiddenMobileAndDesktop: "_1e0cglyw",
|
|
49
49
|
hiddenMobileOnly: "_1e0cglyw _dm2518uv",
|
|
50
|
-
hiddenDesktopOnly: "_dm25glyw"
|
|
50
|
+
hiddenDesktopOnly: "_dm25glyw",
|
|
51
|
+
fullHeightSidebar: "_165t56xv _180k1wjm _26vxoned _1mt19dtb"
|
|
51
52
|
};
|
|
52
53
|
const fallbackDefaultWidth = 320;
|
|
53
54
|
|
|
@@ -548,6 +549,7 @@ function SideNavInternal({
|
|
|
548
549
|
cssVar: panelSplitterResizingVar,
|
|
549
550
|
panelId: sideNavPanelSplitterId
|
|
550
551
|
});
|
|
552
|
+
const isFlyoutClosed = (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'closed' || (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === undefined;
|
|
551
553
|
return /*#__PURE__*/React.createElement("nav", _extends({
|
|
552
554
|
id: id
|
|
553
555
|
}, devTimeOnlyAttributes, {
|
|
@@ -559,7 +561,7 @@ function SideNavInternal({
|
|
|
559
561
|
},
|
|
560
562
|
ref: mergedRef,
|
|
561
563
|
"data-testid": testId,
|
|
562
|
-
className: ax([styles.root, fg('platform_design_system_nav4_sidenav_border') ? styles.newBorder : styles.oldBorder, isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileOnly, !isExpandedOnDesktop && isExpandedOnMobile && !isFlyoutVisible && styles.hiddenDesktopOnly, !isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileAndDesktop, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && styles.flyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && fg('platform_design_system_nav4_sidenav_border') && styles.newBorderFlyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close' && styles.flyoutAnimateClosed])
|
|
564
|
+
className: ax([styles.root, fg('platform_design_system_nav4_sidenav_border') ? styles.newBorder : styles.oldBorder, isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileOnly, !isExpandedOnDesktop && isExpandedOnMobile && !isFlyoutVisible && styles.hiddenDesktopOnly, !isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileAndDesktop, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && styles.flyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && fg('platform_design_system_nav4_sidenav_border') && styles.newBorderFlyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close' && styles.flyoutAnimateClosed, isFlyoutClosed && fg('navx-full-height-sidebar') && styles.fullHeightSidebar])
|
|
563
565
|
}), /*#__PURE__*/React.createElement(DangerouslyHoistCssVarToDocumentRoot, {
|
|
564
566
|
variableName: sideNavLiveWidthVar,
|
|
565
567
|
value: "0px",
|
|
@@ -6,5 +6,6 @@
|
|
|
6
6
|
._1e0cglyw{display:none}
|
|
7
7
|
._1ul9zwfg{min-width:2pc}
|
|
8
8
|
._4cvr1h6o{align-items:center}
|
|
9
|
+
._lcxv1wug{pointer-events:auto}
|
|
9
10
|
@media (min-width:48rem){._181n1txw{display:flex}._1d2y1ris{min-width:max-content}}
|
|
10
11
|
@media (min-width:64rem){._glte1ris{width:max-content}._15ri1mjv{min-width:300px}._1gs5usvi{box-sizing:border-box}._ndwch9n0{justify-self:end}}
|
|
@@ -6,13 +6,15 @@ import React, { useState } from 'react';
|
|
|
6
6
|
import { cx } from '@compiled/react';
|
|
7
7
|
import { useLayoutEffect } from '@atlaskit/ds-lib/use-layout-effect';
|
|
8
8
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import Popup from '@atlaskit/popup';
|
|
10
11
|
import { UNSAFE_useMediaQuery as useMediaQuery } from '@atlaskit/primitives/compiled';
|
|
11
12
|
import { List } from '../../../components/list';
|
|
12
13
|
import { HasCustomThemeContext } from '../../top-nav-items/themed/has-custom-theme-context';
|
|
13
14
|
import { IconButton } from '../../top-nav-items/themed/migration';
|
|
14
15
|
const containerStyles = {
|
|
15
|
-
root: "_yyhy11wp _1e0c1txw _1bahh9n0 _1ul9zwfg _1d2y1ris _glte1ris _15ri1mjv _1gs5usvi _ndwch9n0"
|
|
16
|
+
root: "_yyhy11wp _1e0c1txw _1bahh9n0 _1ul9zwfg _1d2y1ris _glte1ris _15ri1mjv _1gs5usvi _ndwch9n0",
|
|
17
|
+
fullHeightSidebar: "_lcxv1wug"
|
|
16
18
|
};
|
|
17
19
|
const listStyles = {
|
|
18
20
|
root: "_zulp1b66 _4cvr1h6o _1e0c1txw",
|
|
@@ -51,7 +53,7 @@ export function TopNavEnd({
|
|
|
51
53
|
}, [query]);
|
|
52
54
|
return /*#__PURE__*/React.createElement("nav", {
|
|
53
55
|
"aria-label": label,
|
|
54
|
-
className: ax([containerStyles.root])
|
|
56
|
+
className: ax([containerStyles.root, fg('navx-full-height-sidebar') && containerStyles.fullHeightSidebar])
|
|
55
57
|
}, isMobile ? /*#__PURE__*/React.createElement(Popup, {
|
|
56
58
|
isOpen: isOpen,
|
|
57
59
|
onClose: () => setIsOpen(false),
|
|
@@ -4,4 +4,5 @@
|
|
|
4
4
|
._1bsb1osq{width:100%}
|
|
5
5
|
._1e0c1txw{display:flex}
|
|
6
6
|
._4cvr1h6o{align-items:center}
|
|
7
|
+
._lcxv1wug{pointer-events:auto}
|
|
7
8
|
@media (min-width:48rem){._181n11p5{display:grid}._1j8b15b0{grid-template-columns:minmax(min-content,780px)}._lagd1bp4{grid-auto-flow:column}._1t4c1ris{grid-auto-columns:max-content}._12e8h9n0{justify-items:end}}
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
import "./top-nav-middle.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
const styles = {
|
|
6
|
-
root: "_zulpu2gc _yyhycs5v _1bsb1osq _4cvr1h6o _1e0c1txw _1bahh9n0 _181n11p5 _1j8b15b0 _lagd1bp4 _1t4c1ris _12e8h9n0"
|
|
7
|
+
root: "_zulpu2gc _yyhycs5v _1bsb1osq _4cvr1h6o _1e0c1txw _1bahh9n0 _181n11p5 _1j8b15b0 _lagd1bp4 _1t4c1ris _12e8h9n0",
|
|
8
|
+
fullHeightSidebar: "_lcxv1wug"
|
|
7
9
|
};
|
|
8
10
|
|
|
9
11
|
/**
|
|
@@ -18,6 +20,6 @@ export function TopNavMiddle({
|
|
|
18
20
|
children
|
|
19
21
|
}) {
|
|
20
22
|
return /*#__PURE__*/React.createElement("div", {
|
|
21
|
-
className: ax([styles.root])
|
|
23
|
+
className: ax([styles.root, fg('navx-full-height-sidebar') && styles.fullHeightSidebar])
|
|
22
24
|
}, children);
|
|
23
25
|
}
|
|
@@ -3,4 +3,7 @@
|
|
|
3
3
|
._yyhykb7n{grid-column:1}._1e0c1txw{display:flex}
|
|
4
4
|
._4cvr1h6o{align-items:center}
|
|
5
5
|
._4t3i1osq{height:100%}
|
|
6
|
-
|
|
6
|
+
._bozgutpp{padding-inline-start:var(--ds-space-150,9pt)}
|
|
7
|
+
._lcxv1wug{pointer-events:auto}
|
|
8
|
+
._p12fnau3{max-width:calc(100% - var(--ds-space-200, 1pc))}
|
|
9
|
+
@media (min-width:64rem){._15rin7od{min-width:unset}._glte1ris{width:max-content}._15ri1mjv{min-width:300px}._1gs5usvi{box-sizing:border-box}}
|
|
@@ -4,8 +4,11 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useContext, useEffect, useRef } from 'react';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { TopNavStartAttachRef } from '../../../context/top-nav-start/top-nav-start-context';
|
|
7
|
+
import { useSideNavVisibility } from '../side-nav/use-side-nav-visibility';
|
|
7
8
|
const styles = {
|
|
8
|
-
root: "_zulp1b66 _yyhykb7n _4t3i1osq _4cvr1h6o _1e0c1txw _glte1ris _15ri1mjv _1gs5usvi"
|
|
9
|
+
root: "_zulp1b66 _yyhykb7n _4t3i1osq _4cvr1h6o _1e0c1txw _glte1ris _15ri1mjv _1gs5usvi",
|
|
10
|
+
fullHeightSidebar: "_p12fnau3 _bozgutpp _lcxv1wug",
|
|
11
|
+
fullHeightSidebarExpanded: "_15rin7od"
|
|
9
12
|
};
|
|
10
13
|
|
|
11
14
|
/**
|
|
@@ -24,9 +27,16 @@ export function TopNavStart({
|
|
|
24
27
|
ref(elementRef.current);
|
|
25
28
|
}
|
|
26
29
|
}, [elementRef, ref]);
|
|
30
|
+
|
|
31
|
+
// Need to use `{ defaultCollapsed: true }` otherwise when there is no side nav mounted this never becomes false
|
|
32
|
+
const {
|
|
33
|
+
isExpandedOnDesktop
|
|
34
|
+
} = useSideNavVisibility({
|
|
35
|
+
defaultCollapsed: true
|
|
36
|
+
});
|
|
27
37
|
return /*#__PURE__*/React.createElement("div", {
|
|
28
38
|
ref: fg('platform_fix_component_state_update_for_suspense') ? elementRef : ref,
|
|
29
39
|
"data-testid": testId,
|
|
30
|
-
className: ax([styles.root])
|
|
40
|
+
className: ax([styles.root, fg('navx-full-height-sidebar') && styles.fullHeightSidebar, isExpandedOnDesktop && fg('navx-full-height-sidebar') && styles.fullHeightSidebarExpanded])
|
|
31
41
|
}, children);
|
|
32
42
|
}
|
|
@@ -2,14 +2,22 @@
|
|
|
2
2
|
._nd5l8cbt{grid-area:top-bar}
|
|
3
3
|
._zulpu2gc{gap:var(--ds-space-100,8px)}
|
|
4
4
|
._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
|
|
5
|
+
._179rglyw{border-block-end:none}
|
|
5
6
|
._179rzgxb{border-block-end:1px solid var(--ds-border,#091e4224)}._152t1nws{inset-block-start:var(--n_bnrM,0)}
|
|
7
|
+
._1bsb1osq{width:100%}
|
|
6
8
|
._1e0c11p5{display:grid}
|
|
7
9
|
._1pbyegat{z-index:4}
|
|
8
10
|
._4cvr1h6o{align-items:center}
|
|
9
11
|
._4t3i1dgc{height:var(--n_tNvM)}
|
|
12
|
+
._4t3i1osq{height:100%}
|
|
13
|
+
._bfhkglyw{background-color:none}
|
|
10
14
|
._bfhkvuon{background-color:var(--ds-surface,#fff)}
|
|
15
|
+
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
11
16
|
._d6vu1bgi >span[data-ep-placeholder-id=top_navigation_skeleton]{display:contents}
|
|
12
17
|
._kqsw1if8{position:sticky}
|
|
18
|
+
._lcxvglyw{pointer-events:none}
|
|
13
19
|
._vchhusvi{box-sizing:border-box}
|
|
20
|
+
._y4tiutpp{padding-inline-end:var(--ds-space-150,9pt)}
|
|
14
21
|
._yv0e1mfv{grid-template-columns:auto 1fr auto}
|
|
15
|
-
@media (min-width:48rem){._1j8b18ax{grid-template-columns:1fr minmax(min-content,max-content) 1fr}}
|
|
22
|
+
@media (min-width:48rem){._1j8b18ax{grid-template-columns:1fr minmax(min-content,max-content) 1fr}}
|
|
23
|
+
@media (min-width:64rem){._1rqt15p1{grid-template-columns:var(--n_sNvlw,1fr) minmax(min-content,max-content) 1fr}._hyzqcs5v{z-index:2}._pdlmutpp{gap:var(--ds-space-150,9pt)}}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import "./top-nav.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { useContext } from 'react';
|
|
5
|
+
import { useContext, useMemo } from 'react';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { useSkipLink } from '../../../context/skip-links/skip-links-context';
|
|
7
8
|
import { HasCustomThemeContext } from '../../top-nav-items/themed/has-custom-theme-context';
|
|
8
9
|
import { useCustomTheme } from '../../top-nav-items/themed/use-custom-theme';
|
|
@@ -10,8 +11,29 @@ import { bannerMountedVar, localSlotLayers, topNavMountedVar, UNSAFE_topNavVar }
|
|
|
10
11
|
import { DangerouslyHoistSlotSizes } from '../hoist-slot-sizes-context';
|
|
11
12
|
import { DangerouslyHoistCssVarToDocumentRoot, HoistCssVarToLocalGrid } from '../hoist-utils';
|
|
12
13
|
import { useLayoutId } from '../id-utils';
|
|
14
|
+
import { useSideNavVisibility } from '../side-nav/use-side-nav-visibility';
|
|
15
|
+
/**
|
|
16
|
+
* Styles for the container for the top nav items.
|
|
17
|
+
*
|
|
18
|
+
* The background and border are applied to a different element for z-indexing reasons:
|
|
19
|
+
*
|
|
20
|
+
* - The items sit above the expanded side nav
|
|
21
|
+
* - The background sits below the expanded side nav
|
|
22
|
+
*/
|
|
13
23
|
const styles = {
|
|
14
|
-
root: "_nd5l8cbt _zulpu2gc _18zrutpp _179rzgxb _1e0c11p5 _yv0e1mfv _4cvr1h6o _bfhkvuon _vchhusvi _4t3i1dgc _152t1nws _kqsw1if8 _1pbyegat _d6vu1bgi _1j8b18ax"
|
|
24
|
+
root: "_nd5l8cbt _zulpu2gc _18zrutpp _179rzgxb _1e0c11p5 _yv0e1mfv _4cvr1h6o _bfhkvuon _vchhusvi _4t3i1dgc _152t1nws _kqsw1if8 _1pbyegat _d6vu1bgi _1j8b18ax",
|
|
25
|
+
fullHeightSidebar: "_179rglyw _bozgze3t _y4tiutpp _bfhkglyw _lcxvglyw _pdlmutpp",
|
|
26
|
+
fullHeightSidebarExpanded: "_1rqt15p1"
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Styles for the visible 'bar' of the top nav, including background and border.
|
|
31
|
+
*
|
|
32
|
+
* This is on a lower z-index than the expanded side nav, and is separate to the top nav items which are above the expanded side nav.
|
|
33
|
+
*/
|
|
34
|
+
const backgroundStyles = {
|
|
35
|
+
root: "_nd5l8cbt _179rzgxb _1bsb1osq _4t3i1osq _bfhkvuon _vchhusvi _152t1nws _kqsw1if8 _lcxvglyw _1pbyegat",
|
|
36
|
+
sideNavExpanded: "_hyzqcs5v"
|
|
15
37
|
};
|
|
16
38
|
|
|
17
39
|
/**
|
|
@@ -32,16 +54,55 @@ export function TopNav({
|
|
|
32
54
|
});
|
|
33
55
|
useSkipLink(id, skipLinkLabel);
|
|
34
56
|
const customTheme = useCustomTheme(UNSAFE_theme);
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* With the full height sidebar we have a foreground and background element,
|
|
60
|
+
* so we need to apply the custom theme styles to the correct element.
|
|
61
|
+
*
|
|
62
|
+
* The foreground element should not have a background color,
|
|
63
|
+
* and the background element doesn't need any of the other styles.
|
|
64
|
+
*/
|
|
65
|
+
const {
|
|
66
|
+
backgroundStyle,
|
|
67
|
+
foregroundStyle
|
|
68
|
+
} = useMemo(() => {
|
|
69
|
+
if (!customTheme.isEnabled) {
|
|
70
|
+
return {
|
|
71
|
+
backgroundStyle: undefined,
|
|
72
|
+
foregroundStyle: undefined
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
const {
|
|
76
|
+
backgroundColor,
|
|
77
|
+
...foregroundStyle
|
|
78
|
+
} = customTheme.style;
|
|
79
|
+
return {
|
|
80
|
+
backgroundStyle: {
|
|
81
|
+
backgroundColor
|
|
82
|
+
},
|
|
83
|
+
foregroundStyle
|
|
84
|
+
};
|
|
85
|
+
}, [customTheme]);
|
|
86
|
+
const {
|
|
87
|
+
isExpandedOnDesktop
|
|
88
|
+
} = useSideNavVisibility();
|
|
35
89
|
return /*#__PURE__*/React.createElement(HasCustomThemeContext.Provider, {
|
|
36
90
|
value: customTheme.isEnabled
|
|
37
|
-
}, /*#__PURE__*/React.createElement("
|
|
91
|
+
}, fg('navx-full-height-sidebar') && /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
"data-layout-slot": true,
|
|
93
|
+
"aria-hidden": true
|
|
94
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
95
|
+
,
|
|
96
|
+
style: fg('navx-full-height-sidebar') ? backgroundStyle : undefined,
|
|
97
|
+
className: ax([backgroundStyles.root, isExpandedOnDesktop && backgroundStyles.sideNavExpanded])
|
|
98
|
+
}), /*#__PURE__*/React.createElement("header", {
|
|
38
99
|
id: id,
|
|
39
100
|
"data-layout-slot": true,
|
|
40
|
-
className: ax([styles.root, xcss]),
|
|
101
|
+
className: ax([styles.root, fg('navx-full-height-sidebar') && styles.fullHeightSidebar, isExpandedOnDesktop && fg('navx-full-height-sidebar') && styles.fullHeightSidebarExpanded, xcss]),
|
|
41
102
|
"data-testid": testId
|
|
42
103
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
43
104
|
,
|
|
44
|
-
style: customTheme.isEnabled ? customTheme.style : undefined
|
|
105
|
+
style: fg('navx-full-height-sidebar') ? foregroundStyle : customTheme.isEnabled ? customTheme.style : undefined
|
|
45
106
|
}, /*#__PURE__*/React.createElement(HoistCssVarToLocalGrid, {
|
|
46
107
|
variableName: topNavMountedVar,
|
|
47
108
|
value: height
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
._80om1kdv{cursor:text}
|
|
14
14
|
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
15
15
|
._p12f1kvu{max-width:680px}
|
|
16
|
+
._p12fktbq{max-width:780px}
|
|
16
17
|
._vchhusvi{box-sizing:border-box}
|
|
17
18
|
._yv0e1mfv{grid-template-columns:auto 1fr auto}
|
|
18
19
|
._irr31d5g:hover{background-color:var(--ds-background-input-hovered,#f7f8f9)}
|
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
import "./search.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { Fragment } from 'react';
|
|
5
|
+
import { cx } from '@atlaskit/css';
|
|
5
6
|
import SearchIcon from '@atlaskit/icon/core/search';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
8
|
import { Pressable, Show, Text } from '@atlaskit/primitives/compiled';
|
|
7
9
|
import { IconButton } from './themed/migration';
|
|
8
10
|
const styles = {
|
|
9
11
|
root: "_2rko12b0 _1rjcze3t _18zr12x7 _yv0e1mfv _4cvr1h6o _bfhk1j9a _vchhusvi _80om1kdv _1e0cglyw _4t3izwfg _p12f1kvu _1bsb1osq _irr31d5g _1di6r01l _114b11p5",
|
|
10
12
|
buttonText: "_yyhyjvu9 _1ii7kb7n",
|
|
11
13
|
iconBefore: "_yyhykb7n _1ii7kb7n _1e0c1txw",
|
|
12
|
-
elemAfter: "_yyhy11wp _1ii7kb7n _1e0c1txw"
|
|
14
|
+
elemAfter: "_yyhy11wp _1ii7kb7n _1e0c1txw",
|
|
15
|
+
fullHeightSidebar: "_p12fktbq"
|
|
13
16
|
};
|
|
14
17
|
|
|
15
18
|
/**
|
|
@@ -33,7 +36,7 @@ export const Search = ({
|
|
|
33
36
|
border: `${"var(--ds-border-width, 1px)"} solid ${"var(--ds-border-input, #8590A2)"}`
|
|
34
37
|
},
|
|
35
38
|
onClick: onClick,
|
|
36
|
-
xcss: styles.root,
|
|
39
|
+
xcss: cx(styles.root, fg('navx-full-height-sidebar') && styles.fullHeightSidebar),
|
|
37
40
|
interactionName: interactionName,
|
|
38
41
|
"aria-haspopup": ariaHaspopup
|
|
39
42
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
._12ji1r31{outline-color:currentColor}
|
|
2
2
|
._12y31o36{outline-width:medium}
|
|
3
3
|
._152tidpf{inset-block-start:0}
|
|
4
|
-
.
|
|
5
|
-
._1bsbjfq9{width:var(--ds-border-width-indicator,3px)}
|
|
4
|
+
._1bsb1l7b{width:3px}
|
|
6
5
|
._1bsbl52n{width:17px}
|
|
7
6
|
._1e021v6z{inset-inline-start:7px}
|
|
8
7
|
._1e02zeo2{inset-inline-start:-9px}
|
|
@@ -11,23 +10,25 @@
|
|
|
11
10
|
._1lww5cps{transition-delay:0ms}
|
|
12
11
|
._1oec1yx9{transition-duration:.1s}
|
|
13
12
|
._1pbykb7n{z-index:1}
|
|
13
|
+
._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
|
|
14
14
|
._1qu2glyw{outline-style:none}
|
|
15
15
|
._4t3i1osq{height:100%}
|
|
16
|
+
._85i5ze3t{padding-block-end:var(--ds-space-0,0)}
|
|
16
17
|
._bfhk1j28{background-color:transparent}
|
|
17
18
|
._bfhk1r31{background-color:currentColor}
|
|
18
|
-
.
|
|
19
|
+
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
19
20
|
._k8m01ylx{transition-property:color}
|
|
20
21
|
._kqswstnw{position:absolute}
|
|
21
|
-
._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
|
|
22
22
|
._rjxpftgi{inset-inline-end:8px}
|
|
23
23
|
._syaz1j28{color:transparent}
|
|
24
24
|
._syaz1kw7{color:inherit}
|
|
25
|
-
._u5f3ze3t{padding-right:var(--ds-space-0,0)}
|
|
26
25
|
._u7coidpf{inset-block-end:0}
|
|
26
|
+
._y4tize3t{padding-inline-end:var(--ds-space-0,0)}
|
|
27
27
|
._1cg4fnf5:focus-within, ._le1bfnf5:hover{transition-duration:.2s}
|
|
28
28
|
._1dr21ylx:focus-within, ._1s5z1ylx:hover{transition-property:color}
|
|
29
29
|
._vp7gaqb7:focus-within, ._30l3aqb7:hover{color:var(--ds-text-selected,#0c66e4)}
|
|
30
30
|
._1gavfnf5:hover{transition-delay:.2s}
|
|
31
|
+
._d0al11mm:hover{cursor:col-resize}
|
|
31
32
|
._d0aluf7j:hover{cursor:ew-resize}
|
|
32
33
|
._1gglglyw:active{transition:none}
|
|
33
34
|
._9h8h16c2:active{color:var(--ds-link-pressed,#05c)}
|
|
@@ -13,6 +13,7 @@ import invariant from 'tiny-invariant';
|
|
|
13
13
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
14
14
|
import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
|
|
15
15
|
import { useOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
17
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
17
18
|
import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
18
19
|
import { blockDraggingToIFrames } from '@atlaskit/pragmatic-drag-and-drop/element/block-dragging-to-iframes';
|
|
@@ -30,10 +31,11 @@ var containerStyles = {
|
|
|
30
31
|
positionStart: "_1e02zeo2"
|
|
31
32
|
};
|
|
32
33
|
var grabAreaStyles = {
|
|
33
|
-
root: "_1bsbl52n _4t3i1osq _kqswstnw
|
|
34
|
+
root: "_1bsbl52n _4t3i1osq _kqswstnw _1q51ze3t _y4tize3t _85i5ze3t _bozgze3t _syaz1j28 _bfhk1j28 _k8m01ylx _1oec1yx9 _1lww5cps _d0aluf7j _1gavfnf5 _vp7gaqb7 _30l3aqb7 _1dr21ylx _1s5z1ylx _1cg4fnf5 _le1bfnf5 _1gglglyw _9h8h16c2",
|
|
35
|
+
fullHeightSidebar: "_d0al11mm"
|
|
34
36
|
};
|
|
35
37
|
var lineStyles = {
|
|
36
|
-
root: "_kqswstnw _1e0c1ule
|
|
38
|
+
root: "_kqswstnw _1e0c1ule _1bsb1l7b _4t3i1osq _syaz1kw7 _bfhk1r31 _1e021v6z"
|
|
37
39
|
};
|
|
38
40
|
var panelSplitterDragDataSymbol = Symbol('panel-splitter-drag-data');
|
|
39
41
|
function signPanelSplitterDragData(data) {
|
|
@@ -273,7 +275,7 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref) {
|
|
|
273
275
|
ref: splitterRef,
|
|
274
276
|
"data-testid": testId,
|
|
275
277
|
onDoubleClick: onDoubleClick,
|
|
276
|
-
className: ax([grabAreaStyles.root])
|
|
278
|
+
className: ax([grabAreaStyles.root, fg('navx-full-height-sidebar') && grabAreaStyles.fullHeightSidebar])
|
|
277
279
|
}, /*#__PURE__*/React.createElement(VisuallyHidden, null, /*#__PURE__*/React.createElement("input", {
|
|
278
280
|
type: "range",
|
|
279
281
|
value: rangeInputValue,
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
._kqsw1if8{position:sticky}
|
|
17
17
|
._vchhusvi{box-sizing:border-box}
|
|
18
18
|
@media (min-width:48rem){._14b5hc79{width:var(--n_snvRsz,var(--n_sNvw))}}
|
|
19
|
-
@media (min-width:64rem){._dm2518uv{display:initial}._dm25glyw{display:none}._p5clglyw{border-inline-end:none}._p5clzgxb{border-inline-end:1px solid var(--ds-border,#091e4224)}._qiln1gzg{grid-area:main}._4ap31bhr{background-color:var(--ds-surface-overlay,#fff)}._scbp1cd0{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #091e4226,0 0 1px #091e424f)}._qilnk0mc{grid-area:side-nav}._4ap3vuon{background-color:var(--ds-surface,#fff)}._scbpglyw{box-shadow:none}}
|
|
19
|
+
@media (min-width:64rem){._165t56xv{height:calc(100vh - var(--n_bnrM, 0px))}._180k1wjm{inset-block-start:calc(var(--n_bnrM, 0px))}._26vxoned{padding-block-start:calc(var(--n_tNvM, 0px))}._1mt19dtb{margin-block-start:calc(var(--n_tNvM, 0px)*-1)}._dm2518uv{display:initial}._dm25glyw{display:none}._p5clglyw{border-inline-end:none}._p5clzgxb{border-inline-end:1px solid var(--ds-border,#091e4224)}._qiln1gzg{grid-area:main}._4ap31bhr{background-color:var(--ds-surface-overlay,#fff)}._scbp1cd0{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #091e4226,0 0 1px #091e424f)}._qilnk0mc{grid-area:side-nav}._4ap3vuon{background-color:var(--ds-surface,#fff)}._scbpglyw{box-shadow:none}}
|
|
20
20
|
@supports not (-moz-appearance:none){@media (prefers-reduced-motion:no-preference){._139f8iot{transition-property:transform,display}._1tpvfnf5{transition-duration:.2s}._sylc1a5r{transition-behavior:allow-discrete}._1uwsjq3t{transform:translateX(-100%)}}@media (prefers-reduced-motion:no-preference){@starting-style{._oyeijq3t{transform:translateX(-100%)}}._139f8iot{transition-property:transform,display}._1tpvfnf5{transition-duration:.2s}._sylc1a5r{transition-behavior:allow-discrete}}}
|
|
@@ -17,7 +17,7 @@ import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/ad
|
|
|
17
17
|
import { media } from '@atlaskit/primitives/responsive';
|
|
18
18
|
import { useSkipLinkInternal } from '../../../context/skip-links/skip-links-context';
|
|
19
19
|
import { TopNavStartElement } from '../../../context/top-nav-start/top-nav-start-context';
|
|
20
|
-
import { contentHeightWhenFixed, contentInsetBlockStart, localSlotLayers, sideNavLiveWidthVar, sideNavPanelSplitterId, sideNavVar, UNSAFE_sideNavLayoutVar } from '../constants';
|
|
20
|
+
import { bannerMountedVar, contentHeightWhenFixed, contentInsetBlockStart, localSlotLayers, sideNavLiveWidthVar, sideNavPanelSplitterId, sideNavVar, topNavMountedVar, UNSAFE_sideNavLayoutVar } from '../constants';
|
|
21
21
|
import { DangerouslyHoistSlotSizes } from '../hoist-slot-sizes-context';
|
|
22
22
|
import { DangerouslyHoistCssVarToDocumentRoot } from '../hoist-utils';
|
|
23
23
|
import { useLayoutId } from '../id-utils';
|
|
@@ -51,7 +51,8 @@ var styles = {
|
|
|
51
51
|
flexContainer: "_4t3i1osq _1e0c1txw _2lx21bp4 _1bah1yb4",
|
|
52
52
|
hiddenMobileAndDesktop: "_1e0cglyw",
|
|
53
53
|
hiddenMobileOnly: "_1e0cglyw _dm2518uv",
|
|
54
|
-
hiddenDesktopOnly: "_dm25glyw"
|
|
54
|
+
hiddenDesktopOnly: "_dm25glyw",
|
|
55
|
+
fullHeightSidebar: "_165t56xv _180k1wjm _26vxoned _1mt19dtb"
|
|
55
56
|
};
|
|
56
57
|
var fallbackDefaultWidth = 320;
|
|
57
58
|
|
|
@@ -550,6 +551,7 @@ function SideNavInternal(_ref) {
|
|
|
550
551
|
cssVar: panelSplitterResizingVar,
|
|
551
552
|
panelId: sideNavPanelSplitterId
|
|
552
553
|
});
|
|
554
|
+
var isFlyoutClosed = (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'closed' || (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === undefined;
|
|
553
555
|
return /*#__PURE__*/React.createElement("nav", _extends({
|
|
554
556
|
id: id
|
|
555
557
|
}, devTimeOnlyAttributes, {
|
|
@@ -558,7 +560,7 @@ function SideNavInternal(_ref) {
|
|
|
558
560
|
style: _defineProperty({}, sideNavVar, clampedWidth),
|
|
559
561
|
ref: mergedRef,
|
|
560
562
|
"data-testid": testId,
|
|
561
|
-
className: ax([styles.root, fg('platform_design_system_nav4_sidenav_border') ? styles.newBorder : styles.oldBorder, isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileOnly, !isExpandedOnDesktop && isExpandedOnMobile && !isFlyoutVisible && styles.hiddenDesktopOnly, !isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileAndDesktop, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && styles.flyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && fg('platform_design_system_nav4_sidenav_border') && styles.newBorderFlyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close' && styles.flyoutAnimateClosed])
|
|
563
|
+
className: ax([styles.root, fg('platform_design_system_nav4_sidenav_border') ? styles.newBorder : styles.oldBorder, isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileOnly, !isExpandedOnDesktop && isExpandedOnMobile && !isFlyoutVisible && styles.hiddenDesktopOnly, !isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileAndDesktop, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && styles.flyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && fg('platform_design_system_nav4_sidenav_border') && styles.newBorderFlyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close' && styles.flyoutAnimateClosed, isFlyoutClosed && fg('navx-full-height-sidebar') && styles.fullHeightSidebar])
|
|
562
564
|
}), /*#__PURE__*/React.createElement(DangerouslyHoistCssVarToDocumentRoot, {
|
|
563
565
|
variableName: sideNavLiveWidthVar,
|
|
564
566
|
value: "0px",
|
|
@@ -6,5 +6,6 @@
|
|
|
6
6
|
._1e0cglyw{display:none}
|
|
7
7
|
._1ul9zwfg{min-width:2pc}
|
|
8
8
|
._4cvr1h6o{align-items:center}
|
|
9
|
+
._lcxv1wug{pointer-events:auto}
|
|
9
10
|
@media (min-width:48rem){._181n1txw{display:flex}._1d2y1ris{min-width:max-content}}
|
|
10
11
|
@media (min-width:64rem){._glte1ris{width:max-content}._15ri1mjv{min-width:300px}._1gs5usvi{box-sizing:border-box}._ndwch9n0{justify-self:end}}
|
|
@@ -7,13 +7,15 @@ import React, { useState } from 'react';
|
|
|
7
7
|
import { cx } from '@compiled/react';
|
|
8
8
|
import { useLayoutEffect } from '@atlaskit/ds-lib/use-layout-effect';
|
|
9
9
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import Popup from '@atlaskit/popup';
|
|
11
12
|
import { UNSAFE_useMediaQuery as useMediaQuery } from '@atlaskit/primitives/compiled';
|
|
12
13
|
import { List } from '../../../components/list';
|
|
13
14
|
import { HasCustomThemeContext } from '../../top-nav-items/themed/has-custom-theme-context';
|
|
14
15
|
import { IconButton } from '../../top-nav-items/themed/migration';
|
|
15
16
|
var containerStyles = {
|
|
16
|
-
root: "_yyhy11wp _1e0c1txw _1bahh9n0 _1ul9zwfg _1d2y1ris _glte1ris _15ri1mjv _1gs5usvi _ndwch9n0"
|
|
17
|
+
root: "_yyhy11wp _1e0c1txw _1bahh9n0 _1ul9zwfg _1d2y1ris _glte1ris _15ri1mjv _1gs5usvi _ndwch9n0",
|
|
18
|
+
fullHeightSidebar: "_lcxv1wug"
|
|
17
19
|
};
|
|
18
20
|
var listStyles = {
|
|
19
21
|
root: "_zulp1b66 _4cvr1h6o _1e0c1txw",
|
|
@@ -59,7 +61,7 @@ export function TopNavEnd(_ref) {
|
|
|
59
61
|
}, [query]);
|
|
60
62
|
return /*#__PURE__*/React.createElement("nav", {
|
|
61
63
|
"aria-label": label,
|
|
62
|
-
className: ax([containerStyles.root])
|
|
64
|
+
className: ax([containerStyles.root, fg('navx-full-height-sidebar') && containerStyles.fullHeightSidebar])
|
|
63
65
|
}, isMobile ? /*#__PURE__*/React.createElement(Popup, {
|
|
64
66
|
isOpen: isOpen,
|
|
65
67
|
onClose: function onClose() {
|
|
@@ -4,4 +4,5 @@
|
|
|
4
4
|
._1bsb1osq{width:100%}
|
|
5
5
|
._1e0c1txw{display:flex}
|
|
6
6
|
._4cvr1h6o{align-items:center}
|
|
7
|
+
._lcxv1wug{pointer-events:auto}
|
|
7
8
|
@media (min-width:48rem){._181n11p5{display:grid}._1j8b15b0{grid-template-columns:minmax(min-content,780px)}._lagd1bp4{grid-auto-flow:column}._1t4c1ris{grid-auto-columns:max-content}._12e8h9n0{justify-items:end}}
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
import "./top-nav-middle.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
var styles = {
|
|
6
|
-
root: "_zulpu2gc _yyhycs5v _1bsb1osq _4cvr1h6o _1e0c1txw _1bahh9n0 _181n11p5 _1j8b15b0 _lagd1bp4 _1t4c1ris _12e8h9n0"
|
|
7
|
+
root: "_zulpu2gc _yyhycs5v _1bsb1osq _4cvr1h6o _1e0c1txw _1bahh9n0 _181n11p5 _1j8b15b0 _lagd1bp4 _1t4c1ris _12e8h9n0",
|
|
8
|
+
fullHeightSidebar: "_lcxv1wug"
|
|
7
9
|
};
|
|
8
10
|
|
|
9
11
|
/**
|
|
@@ -17,6 +19,6 @@ var styles = {
|
|
|
17
19
|
export function TopNavMiddle(_ref) {
|
|
18
20
|
var children = _ref.children;
|
|
19
21
|
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
-
className: ax([styles.root])
|
|
22
|
+
className: ax([styles.root, fg('navx-full-height-sidebar') && styles.fullHeightSidebar])
|
|
21
23
|
}, children);
|
|
22
24
|
}
|
|
@@ -3,4 +3,7 @@
|
|
|
3
3
|
._yyhykb7n{grid-column:1}._1e0c1txw{display:flex}
|
|
4
4
|
._4cvr1h6o{align-items:center}
|
|
5
5
|
._4t3i1osq{height:100%}
|
|
6
|
-
|
|
6
|
+
._bozgutpp{padding-inline-start:var(--ds-space-150,9pt)}
|
|
7
|
+
._lcxv1wug{pointer-events:auto}
|
|
8
|
+
._p12fnau3{max-width:calc(100% - var(--ds-space-200, 1pc))}
|
|
9
|
+
@media (min-width:64rem){._15rin7od{min-width:unset}._glte1ris{width:max-content}._15ri1mjv{min-width:300px}._1gs5usvi{box-sizing:border-box}}
|
|
@@ -4,8 +4,11 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useContext, useEffect, useRef } from 'react';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { TopNavStartAttachRef } from '../../../context/top-nav-start/top-nav-start-context';
|
|
7
|
+
import { useSideNavVisibility } from '../side-nav/use-side-nav-visibility';
|
|
7
8
|
var styles = {
|
|
8
|
-
root: "_zulp1b66 _yyhykb7n _4t3i1osq _4cvr1h6o _1e0c1txw _glte1ris _15ri1mjv _1gs5usvi"
|
|
9
|
+
root: "_zulp1b66 _yyhykb7n _4t3i1osq _4cvr1h6o _1e0c1txw _glte1ris _15ri1mjv _1gs5usvi",
|
|
10
|
+
fullHeightSidebar: "_p12fnau3 _bozgutpp _lcxv1wug",
|
|
11
|
+
fullHeightSidebarExpanded: "_15rin7od"
|
|
9
12
|
};
|
|
10
13
|
|
|
11
14
|
/**
|
|
@@ -23,9 +26,15 @@ export function TopNavStart(_ref) {
|
|
|
23
26
|
ref(elementRef.current);
|
|
24
27
|
}
|
|
25
28
|
}, [elementRef, ref]);
|
|
29
|
+
|
|
30
|
+
// Need to use `{ defaultCollapsed: true }` otherwise when there is no side nav mounted this never becomes false
|
|
31
|
+
var _useSideNavVisibility = useSideNavVisibility({
|
|
32
|
+
defaultCollapsed: true
|
|
33
|
+
}),
|
|
34
|
+
isExpandedOnDesktop = _useSideNavVisibility.isExpandedOnDesktop;
|
|
26
35
|
return /*#__PURE__*/React.createElement("div", {
|
|
27
36
|
ref: fg('platform_fix_component_state_update_for_suspense') ? elementRef : ref,
|
|
28
37
|
"data-testid": testId,
|
|
29
|
-
className: ax([styles.root])
|
|
38
|
+
className: ax([styles.root, fg('navx-full-height-sidebar') && styles.fullHeightSidebar, isExpandedOnDesktop && fg('navx-full-height-sidebar') && styles.fullHeightSidebarExpanded])
|
|
30
39
|
}, children);
|
|
31
40
|
}
|
|
@@ -2,14 +2,22 @@
|
|
|
2
2
|
._nd5l8cbt{grid-area:top-bar}
|
|
3
3
|
._zulpu2gc{gap:var(--ds-space-100,8px)}
|
|
4
4
|
._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
|
|
5
|
+
._179rglyw{border-block-end:none}
|
|
5
6
|
._179rzgxb{border-block-end:1px solid var(--ds-border,#091e4224)}._152t1nws{inset-block-start:var(--n_bnrM,0)}
|
|
7
|
+
._1bsb1osq{width:100%}
|
|
6
8
|
._1e0c11p5{display:grid}
|
|
7
9
|
._1pbyegat{z-index:4}
|
|
8
10
|
._4cvr1h6o{align-items:center}
|
|
9
11
|
._4t3i1dgc{height:var(--n_tNvM)}
|
|
12
|
+
._4t3i1osq{height:100%}
|
|
13
|
+
._bfhkglyw{background-color:none}
|
|
10
14
|
._bfhkvuon{background-color:var(--ds-surface,#fff)}
|
|
15
|
+
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
11
16
|
._d6vu1bgi >span[data-ep-placeholder-id=top_navigation_skeleton]{display:contents}
|
|
12
17
|
._kqsw1if8{position:sticky}
|
|
18
|
+
._lcxvglyw{pointer-events:none}
|
|
13
19
|
._vchhusvi{box-sizing:border-box}
|
|
20
|
+
._y4tiutpp{padding-inline-end:var(--ds-space-150,9pt)}
|
|
14
21
|
._yv0e1mfv{grid-template-columns:auto 1fr auto}
|
|
15
|
-
@media (min-width:48rem){._1j8b18ax{grid-template-columns:1fr minmax(min-content,max-content) 1fr}}
|
|
22
|
+
@media (min-width:48rem){._1j8b18ax{grid-template-columns:1fr minmax(min-content,max-content) 1fr}}
|
|
23
|
+
@media (min-width:64rem){._1rqt15p1{grid-template-columns:var(--n_sNvlw,1fr) minmax(min-content,max-content) 1fr}._hyzqcs5v{z-index:2}._pdlmutpp{gap:var(--ds-space-150,9pt)}}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/* top-nav.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["backgroundColor"];
|
|
2
4
|
import "./top-nav.compiled.css";
|
|
3
5
|
import * as React from 'react';
|
|
4
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { useContext } from 'react';
|
|
7
|
+
import { useContext, useMemo } from 'react';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
9
|
import { useSkipLink } from '../../../context/skip-links/skip-links-context';
|
|
7
10
|
import { HasCustomThemeContext } from '../../top-nav-items/themed/has-custom-theme-context';
|
|
8
11
|
import { useCustomTheme } from '../../top-nav-items/themed/use-custom-theme';
|
|
@@ -10,8 +13,29 @@ import { bannerMountedVar, localSlotLayers, topNavMountedVar, UNSAFE_topNavVar }
|
|
|
10
13
|
import { DangerouslyHoistSlotSizes } from '../hoist-slot-sizes-context';
|
|
11
14
|
import { DangerouslyHoistCssVarToDocumentRoot, HoistCssVarToLocalGrid } from '../hoist-utils';
|
|
12
15
|
import { useLayoutId } from '../id-utils';
|
|
16
|
+
import { useSideNavVisibility } from '../side-nav/use-side-nav-visibility';
|
|
17
|
+
/**
|
|
18
|
+
* Styles for the container for the top nav items.
|
|
19
|
+
*
|
|
20
|
+
* The background and border are applied to a different element for z-indexing reasons:
|
|
21
|
+
*
|
|
22
|
+
* - The items sit above the expanded side nav
|
|
23
|
+
* - The background sits below the expanded side nav
|
|
24
|
+
*/
|
|
13
25
|
var styles = {
|
|
14
|
-
root: "_nd5l8cbt _zulpu2gc _18zrutpp _179rzgxb _1e0c11p5 _yv0e1mfv _4cvr1h6o _bfhkvuon _vchhusvi _4t3i1dgc _152t1nws _kqsw1if8 _1pbyegat _d6vu1bgi _1j8b18ax"
|
|
26
|
+
root: "_nd5l8cbt _zulpu2gc _18zrutpp _179rzgxb _1e0c11p5 _yv0e1mfv _4cvr1h6o _bfhkvuon _vchhusvi _4t3i1dgc _152t1nws _kqsw1if8 _1pbyegat _d6vu1bgi _1j8b18ax",
|
|
27
|
+
fullHeightSidebar: "_179rglyw _bozgze3t _y4tiutpp _bfhkglyw _lcxvglyw _pdlmutpp",
|
|
28
|
+
fullHeightSidebarExpanded: "_1rqt15p1"
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Styles for the visible 'bar' of the top nav, including background and border.
|
|
33
|
+
*
|
|
34
|
+
* This is on a lower z-index than the expanded side nav, and is separate to the top nav items which are above the expanded side nav.
|
|
35
|
+
*/
|
|
36
|
+
var backgroundStyles = {
|
|
37
|
+
root: "_nd5l8cbt _179rzgxb _1bsb1osq _4t3i1osq _bfhkvuon _vchhusvi _152t1nws _kqsw1if8 _lcxvglyw _1pbyegat",
|
|
38
|
+
sideNavExpanded: "_hyzqcs5v"
|
|
15
39
|
};
|
|
16
40
|
|
|
17
41
|
/**
|
|
@@ -33,16 +57,52 @@ export function TopNav(_ref) {
|
|
|
33
57
|
});
|
|
34
58
|
useSkipLink(id, skipLinkLabel);
|
|
35
59
|
var customTheme = useCustomTheme(UNSAFE_theme);
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* With the full height sidebar we have a foreground and background element,
|
|
63
|
+
* so we need to apply the custom theme styles to the correct element.
|
|
64
|
+
*
|
|
65
|
+
* The foreground element should not have a background color,
|
|
66
|
+
* and the background element doesn't need any of the other styles.
|
|
67
|
+
*/
|
|
68
|
+
var _useMemo = useMemo(function () {
|
|
69
|
+
if (!customTheme.isEnabled) {
|
|
70
|
+
return {
|
|
71
|
+
backgroundStyle: undefined,
|
|
72
|
+
foregroundStyle: undefined
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
var _customTheme$style = customTheme.style,
|
|
76
|
+
backgroundColor = _customTheme$style.backgroundColor,
|
|
77
|
+
foregroundStyle = _objectWithoutProperties(_customTheme$style, _excluded);
|
|
78
|
+
return {
|
|
79
|
+
backgroundStyle: {
|
|
80
|
+
backgroundColor: backgroundColor
|
|
81
|
+
},
|
|
82
|
+
foregroundStyle: foregroundStyle
|
|
83
|
+
};
|
|
84
|
+
}, [customTheme]),
|
|
85
|
+
backgroundStyle = _useMemo.backgroundStyle,
|
|
86
|
+
foregroundStyle = _useMemo.foregroundStyle;
|
|
87
|
+
var _useSideNavVisibility = useSideNavVisibility(),
|
|
88
|
+
isExpandedOnDesktop = _useSideNavVisibility.isExpandedOnDesktop;
|
|
36
89
|
return /*#__PURE__*/React.createElement(HasCustomThemeContext.Provider, {
|
|
37
90
|
value: customTheme.isEnabled
|
|
38
|
-
}, /*#__PURE__*/React.createElement("
|
|
91
|
+
}, fg('navx-full-height-sidebar') && /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
"data-layout-slot": true,
|
|
93
|
+
"aria-hidden": true
|
|
94
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
95
|
+
,
|
|
96
|
+
style: fg('navx-full-height-sidebar') ? backgroundStyle : undefined,
|
|
97
|
+
className: ax([backgroundStyles.root, isExpandedOnDesktop && backgroundStyles.sideNavExpanded])
|
|
98
|
+
}), /*#__PURE__*/React.createElement("header", {
|
|
39
99
|
id: id,
|
|
40
100
|
"data-layout-slot": true,
|
|
41
|
-
className: ax([styles.root, xcss]),
|
|
101
|
+
className: ax([styles.root, fg('navx-full-height-sidebar') && styles.fullHeightSidebar, isExpandedOnDesktop && fg('navx-full-height-sidebar') && styles.fullHeightSidebarExpanded, xcss]),
|
|
42
102
|
"data-testid": testId
|
|
43
103
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
44
104
|
,
|
|
45
|
-
style: customTheme.isEnabled ? customTheme.style : undefined
|
|
105
|
+
style: fg('navx-full-height-sidebar') ? foregroundStyle : customTheme.isEnabled ? customTheme.style : undefined
|
|
46
106
|
}, /*#__PURE__*/React.createElement(HoistCssVarToLocalGrid, {
|
|
47
107
|
variableName: topNavMountedVar,
|
|
48
108
|
value: height
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
._80om1kdv{cursor:text}
|
|
14
14
|
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
15
15
|
._p12f1kvu{max-width:680px}
|
|
16
|
+
._p12fktbq{max-width:780px}
|
|
16
17
|
._vchhusvi{box-sizing:border-box}
|
|
17
18
|
._yv0e1mfv{grid-template-columns:auto 1fr auto}
|
|
18
19
|
._irr31d5g:hover{background-color:var(--ds-background-input-hovered,#f7f8f9)}
|
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
import "./search.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { Fragment } from 'react';
|
|
5
|
+
import { cx } from '@atlaskit/css';
|
|
5
6
|
import SearchIcon from '@atlaskit/icon/core/search';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
8
|
import { Pressable, Show, Text } from '@atlaskit/primitives/compiled';
|
|
7
9
|
import { IconButton } from './themed/migration';
|
|
8
10
|
var styles = {
|
|
9
11
|
root: "_2rko12b0 _1rjcze3t _18zr12x7 _yv0e1mfv _4cvr1h6o _bfhk1j9a _vchhusvi _80om1kdv _1e0cglyw _4t3izwfg _p12f1kvu _1bsb1osq _irr31d5g _1di6r01l _114b11p5",
|
|
10
12
|
buttonText: "_yyhyjvu9 _1ii7kb7n",
|
|
11
13
|
iconBefore: "_yyhykb7n _1ii7kb7n _1e0c1txw",
|
|
12
|
-
elemAfter: "_yyhy11wp _1ii7kb7n _1e0c1txw"
|
|
14
|
+
elemAfter: "_yyhy11wp _1ii7kb7n _1e0c1txw",
|
|
15
|
+
fullHeightSidebar: "_p12fktbq"
|
|
13
16
|
};
|
|
14
17
|
|
|
15
18
|
/**
|
|
@@ -34,7 +37,7 @@ export var Search = function Search(_ref) {
|
|
|
34
37
|
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-input, #8590A2)")
|
|
35
38
|
},
|
|
36
39
|
onClick: onClick,
|
|
37
|
-
xcss: styles.root,
|
|
40
|
+
xcss: cx(styles.root, fg('navx-full-height-sidebar') && styles.fullHeightSidebar),
|
|
38
41
|
interactionName: interactionName,
|
|
39
42
|
"aria-haspopup": ariaHaspopup
|
|
40
43
|
}, /*#__PURE__*/React.createElement("span", {
|
package/package.json
CHANGED