@atlaskit/navigation-system 5.14.0 → 5.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/dist/cjs/ui/menu-item/flyout-menu-item/close-button.js +1 -1
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-body.compiled.css +5 -1
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-body.js +1 -1
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-footer.compiled.css +4 -0
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-footer.js +6 -1
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-header.compiled.css +2 -1
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-header.js +2 -2
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-menu-item-context.js +1 -1
- package/dist/cjs/ui/page-layout/banner.compiled.css +1 -0
- package/dist/cjs/ui/page-layout/banner.js +6 -2
- package/dist/cjs/ui/page-layout/constants.js +16 -2
- package/dist/cjs/ui/page-layout/panel-splitter/provider.js +5 -3
- package/dist/cjs/ui/page-layout/panel-splitter/side-nav-panel-splitter.js +59 -0
- package/dist/cjs/ui/page-layout/root.compiled.css +1 -0
- package/dist/cjs/ui/page-layout/root.js +7 -2
- package/dist/cjs/ui/page-layout/side-nav/side-nav-content.compiled.css +2 -1
- package/dist/cjs/ui/page-layout/side-nav/side-nav-content.js +8 -2
- package/dist/cjs/ui/page-layout/side-nav/side-nav-header.js +17 -0
- package/dist/cjs/ui/page-layout/side-nav/side-nav.compiled.css +3 -0
- package/dist/cjs/ui/page-layout/side-nav/side-nav.js +28 -17
- package/dist/cjs/ui/page-layout/top-nav/top-nav-end.js +3 -2
- package/dist/cjs/ui/page-layout/top-nav/top-nav-middle.js +2 -1
- package/dist/cjs/ui/page-layout/top-nav/top-nav-start.compiled.css +2 -1
- package/dist/cjs/ui/page-layout/top-nav/top-nav-start.js +30 -3
- package/dist/cjs/ui/page-layout/top-nav/top-nav.compiled.css +11 -0
- package/dist/cjs/ui/page-layout/top-nav/top-nav.js +44 -5
- package/dist/es2019/ui/menu-item/flyout-menu-item/close-button.js +1 -1
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-body.compiled.css +5 -1
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-body.js +1 -1
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-footer.compiled.css +4 -0
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-footer.js +6 -1
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-header.compiled.css +2 -1
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-header.js +2 -2
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-menu-item-context.js +1 -1
- package/dist/es2019/ui/page-layout/banner.compiled.css +1 -0
- package/dist/es2019/ui/page-layout/banner.js +6 -2
- package/dist/es2019/ui/page-layout/constants.js +15 -1
- package/dist/es2019/ui/page-layout/panel-splitter/provider.js +5 -3
- package/dist/es2019/ui/page-layout/panel-splitter/side-nav-panel-splitter.js +57 -2
- package/dist/es2019/ui/page-layout/root.compiled.css +1 -0
- package/dist/es2019/ui/page-layout/root.js +7 -2
- package/dist/es2019/ui/page-layout/side-nav/side-nav-content.compiled.css +2 -1
- package/dist/es2019/ui/page-layout/side-nav/side-nav-content.js +9 -2
- package/dist/es2019/ui/page-layout/side-nav/side-nav-header.js +17 -0
- package/dist/es2019/ui/page-layout/side-nav/side-nav.compiled.css +3 -0
- package/dist/es2019/ui/page-layout/side-nav/side-nav.js +19 -8
- package/dist/es2019/ui/page-layout/top-nav/top-nav-end.js +3 -2
- package/dist/es2019/ui/page-layout/top-nav/top-nav-middle.js +2 -1
- package/dist/es2019/ui/page-layout/top-nav/top-nav-start.compiled.css +2 -1
- package/dist/es2019/ui/page-layout/top-nav/top-nav-start.js +30 -3
- package/dist/es2019/ui/page-layout/top-nav/top-nav.compiled.css +11 -0
- package/dist/es2019/ui/page-layout/top-nav/top-nav.js +42 -7
- package/dist/esm/ui/menu-item/flyout-menu-item/close-button.js +1 -1
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-body.compiled.css +5 -1
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-body.js +1 -1
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-footer.compiled.css +4 -0
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-footer.js +6 -1
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-header.compiled.css +2 -1
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-header.js +2 -2
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-menu-item-context.js +1 -1
- package/dist/esm/ui/page-layout/banner.compiled.css +1 -0
- package/dist/esm/ui/page-layout/banner.js +6 -2
- package/dist/esm/ui/page-layout/constants.js +15 -1
- package/dist/esm/ui/page-layout/panel-splitter/provider.js +5 -3
- package/dist/esm/ui/page-layout/panel-splitter/side-nav-panel-splitter.js +61 -2
- package/dist/esm/ui/page-layout/root.compiled.css +1 -0
- package/dist/esm/ui/page-layout/root.js +7 -2
- package/dist/esm/ui/page-layout/side-nav/side-nav-content.compiled.css +2 -1
- package/dist/esm/ui/page-layout/side-nav/side-nav-content.js +8 -2
- package/dist/esm/ui/page-layout/side-nav/side-nav-header.js +17 -0
- package/dist/esm/ui/page-layout/side-nav/side-nav.compiled.css +3 -0
- package/dist/esm/ui/page-layout/side-nav/side-nav.js +19 -8
- package/dist/esm/ui/page-layout/top-nav/top-nav-end.js +3 -2
- package/dist/esm/ui/page-layout/top-nav/top-nav-middle.js +2 -1
- package/dist/esm/ui/page-layout/top-nav/top-nav-start.compiled.css +2 -1
- package/dist/esm/ui/page-layout/top-nav/top-nav-start.js +30 -3
- package/dist/esm/ui/page-layout/top-nav/top-nav.compiled.css +11 -0
- package/dist/esm/ui/page-layout/top-nav/top-nav.js +46 -7
- package/dist/types/ui/menu-item/flyout-menu-item/flyout-menu-item-context.d.ts +1 -1
- package/dist/types/ui/page-layout/constants.d.ts +10 -0
- package/dist/types/ui/page-layout/panel-splitter/context.d.ts +7 -2
- package/dist/types/ui/page-layout/panel-splitter/provider.d.ts +20 -2
- package/dist/types/ui/page-layout/side-nav/side-nav.d.ts +6 -0
- package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/flyout-menu-item-context.d.ts +1 -1
- package/dist/types-ts4.5/ui/page-layout/constants.d.ts +10 -0
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/context.d.ts +7 -2
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/provider.d.ts +20 -2
- package/dist/types-ts4.5/ui/page-layout/side-nav/side-nav.d.ts +6 -0
- package/package.json +8 -5
|
@@ -3,7 +3,10 @@ import "./side-nav-content.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { forwardRef, useMemo, useRef } from 'react';
|
|
5
5
|
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
8
|
+
import { sideNavContentScrollTimelineVar } from '../constants';
|
|
9
|
+
import { useSideNavVisibility } from './use-side-nav-visibility';
|
|
7
10
|
|
|
8
11
|
/**
|
|
9
12
|
* The main content of the side nav, filling up the middle section. It acts as a scroll container.
|
|
@@ -31,7 +34,8 @@ var styles = {
|
|
|
31
34
|
var scrolledBorder = null;
|
|
32
35
|
var scrollTimelineVar = '--sNcst';
|
|
33
36
|
var fullHeightSidebarStyles = {
|
|
34
|
-
scrollContainer: "_1un9baqb _21o1gc9s _j7hq4n8p"
|
|
37
|
+
scrollContainer: "_1un9baqb _21o1gc9s _j7hq4n8p",
|
|
38
|
+
scrollContainerWithLayeringFixes: "_1sfqgc9s _1q1x1ule _8pm2gc9s _1gd94n8p"
|
|
35
39
|
};
|
|
36
40
|
function _SideNavContent(_ref, forwardedRef) {
|
|
37
41
|
var children = _ref.children,
|
|
@@ -41,10 +45,12 @@ function _SideNavContent(_ref, forwardedRef) {
|
|
|
41
45
|
var mergedRef = useMemo(function () {
|
|
42
46
|
return mergeRefs([internalRef, forwardedRef]);
|
|
43
47
|
}, [forwardedRef]);
|
|
48
|
+
var _useSideNavVisibility = useSideNavVisibility(),
|
|
49
|
+
isExpandedOnDesktop = _useSideNavVisibility.isExpandedOnDesktop;
|
|
44
50
|
return /*#__PURE__*/React.createElement("div", {
|
|
45
51
|
ref: isFhsEnabled ? mergedRef : forwardedRef,
|
|
46
52
|
"data-testid": testId,
|
|
47
|
-
className: ax([styles.scrollContainer, isFhsEnabled && fullHeightSidebarStyles.scrollContainer])
|
|
53
|
+
className: ax([styles.scrollContainer, isFhsEnabled && !fg('platform-dst-side-nav-layering-fixes') && fullHeightSidebarStyles.scrollContainer, isFhsEnabled && isExpandedOnDesktop && fg('platform-dst-side-nav-layering-fixes') && fullHeightSidebarStyles.scrollContainerWithLayeringFixes])
|
|
48
54
|
}, /*#__PURE__*/React.createElement("div", {
|
|
49
55
|
className: ax([styles.paddingContainer])
|
|
50
56
|
}, children));
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import "./side-nav-header.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
var styles = {
|
|
6
7
|
root: "_18zrutpp _1q51utpp _85i51b66"
|
|
7
8
|
};
|
|
@@ -12,6 +13,22 @@ var styles = {
|
|
|
12
13
|
export var SideNavHeader = function SideNavHeader(_ref) {
|
|
13
14
|
var children = _ref.children;
|
|
14
15
|
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
/**
|
|
17
|
+
* This attribute is used to identify whether the SideNavHeader is mounted, to determine where the
|
|
18
|
+
* SideNavContent's scroll indicator line should be applied. This is for layering reasons -
|
|
19
|
+
* if the scroll indicator line intersects with the top nav, it could incorrectly be hidden beneath
|
|
20
|
+
* the top nav (depending on if a layer is open, which raises the top nav'z z-index).
|
|
21
|
+
*
|
|
22
|
+
* We are using a data attribute and CSS for this logic to ensure it is SSR safe.
|
|
23
|
+
*
|
|
24
|
+
* - If SideNavHeader exists, the scroll indicator line is applied to the SideNavContent. This is safe
|
|
25
|
+
* because the SideNavHeader is between the SideNavContent and TopNavStart, so the scroll indicator line
|
|
26
|
+
* will not intersect with the top nav.
|
|
27
|
+
*
|
|
28
|
+
* - If SideNavHeader does not exist, the scroll indicator line is applied to TopNavStart. This ensures
|
|
29
|
+
* the scroll indicator line is visible even when the top nav has a z-index higher than the side nav.
|
|
30
|
+
*/
|
|
31
|
+
"data-private-side-nav-header": fg('platform-dst-side-nav-layering-fixes') ? 'true' : undefined,
|
|
15
32
|
className: ax([styles.root])
|
|
16
33
|
}, children);
|
|
17
34
|
};
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
._4t3ieqxy{height:calc(100vh - var(--n_bnrM, 0px) - var(--n_tNvM, 0px))}
|
|
15
15
|
._bfhk1bhr{background-color:var(--ds-surface-overlay,#fff)}
|
|
16
16
|
._kqsw1if8{position:sticky}
|
|
17
|
+
._kqswstnw{position:absolute}
|
|
18
|
+
._rjxpidpf{inset-inline-end:0}
|
|
19
|
+
._u7coidpf{inset-block-end:0}
|
|
17
20
|
._vchhusvi{box-sizing:border-box}
|
|
18
21
|
[dir=rtl] ._65m41mrw{--animation-direction:-1}
|
|
19
22
|
@media (prefers-reduced-motion:no-preference){._10t88iot{transition-property:transform,display}._1vrh1a5r{transition-behavior:allow-discrete}._xrrpfnf5{transition-duration:.2s}._1lh81gzg{grid-area:main}._1xq51mm8{transition-timing-function:cubic-bezier(0,.4,0,1)}@starting-style{._1nu51p9u{transform:translateX(calc(-100%*var(--animation-direction)))}}._1xq51ku9{transition-timing-function:cubic-bezier(.6,0,0,1)}}
|
|
@@ -3,11 +3,10 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
5
|
import "./side-nav.compiled.css";
|
|
6
|
-
import * as React from 'react';
|
|
7
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
8
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
-
import { useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
9
|
+
import React, { useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
11
10
|
import { bind } from 'bind-event-listener';
|
|
12
11
|
import { flushSync } from 'react-dom';
|
|
13
12
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -20,7 +19,7 @@ import { media } from '@atlaskit/primitives/responsive';
|
|
|
20
19
|
import { useSkipLinkInternal } from '../../../context/skip-links/skip-links-context';
|
|
21
20
|
import { TopNavStartElement } from '../../../context/top-nav-start/top-nav-start-context';
|
|
22
21
|
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
23
|
-
import { bannerMountedVar, contentHeightWhenFixed, contentInsetBlockStart, localSlotLayers, sideNavLiveWidthVar, sideNavPanelSplitterId, sideNavVar, topNavMountedVar, UNSAFE_sideNavLayoutVar } from '../constants';
|
|
22
|
+
import { bannerMountedVar, contentHeightWhenFixed, contentInsetBlockStart, localSlotLayers, openLayerObserverSideNavNamespace, sideNavLiveWidthVar, sideNavPanelSplitterId, sideNavVar, topNavMountedVar, UNSAFE_sideNavLayoutVar } from '../constants';
|
|
24
23
|
import { DangerouslyHoistSlotSizes } from '../hoist-slot-sizes-context';
|
|
25
24
|
import { DangerouslyHoistCssVarToDocumentRoot } from '../hoist-utils';
|
|
26
25
|
import { useLayoutId } from '../id-utils';
|
|
@@ -53,7 +52,9 @@ function getResizeBounds() {
|
|
|
53
52
|
* Avoiding nesting the `@supports` at-rule inside of `@media` means Compiled can remove duplicate styles from the generated CSS.
|
|
54
53
|
*/
|
|
55
54
|
var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
56
|
-
var
|
|
55
|
+
var panelSplitterPortalTargetStyles = {
|
|
56
|
+
root: "_kqswstnw _rjxpidpf _u7coidpf _4t3i1osq _165t56xv"
|
|
57
|
+
};
|
|
57
58
|
var styles = {
|
|
58
59
|
root: "_nd5l1b6c _191wglyw _t51zglyw _bfhk1bhr _16qs130s _vchhusvi _4t3ieqxy _152timx3 _kqsw1if8 _1bsb1ego _1pbycs5v _14b5hc79 _qilnk0mc _p5clia51 _4ap3vuon _scbpglyw",
|
|
59
60
|
flyoutOpen: "_qiln1gzg _p5clglyw _4ap31bhr _scbp130s _139f8iot _1tpvfnf5 _sylc1a5r _oyeijq3t",
|
|
@@ -177,6 +178,7 @@ function SideNavInternal(_ref) {
|
|
|
177
178
|
var clampedWidth = "clamp(".concat(widthResizeBounds.min, ", ").concat(width, "px, ").concat(widthResizeBounds.max, ")");
|
|
178
179
|
var dangerouslyHoistSlotSizes = useContext(DangerouslyHoistSlotSizes);
|
|
179
180
|
var navRef = useRef(null);
|
|
181
|
+
var panelSplitterPortalTargetRef = useRef(null);
|
|
180
182
|
/**
|
|
181
183
|
* Used to share the side nav element with the `Panel`,
|
|
182
184
|
* which observes the side nav to determine its maximum width.
|
|
@@ -758,7 +760,7 @@ function SideNavInternal(_ref) {
|
|
|
758
760
|
style: _defineProperty({}, sideNavVar, clampedWidth),
|
|
759
761
|
ref: mergedRef,
|
|
760
762
|
"data-testid": testId,
|
|
761
|
-
className: ax([styles.root, isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileOnly, !isExpandedOnDesktop && isExpandedOnMobile && !isFlyoutVisible && styles.hiddenDesktopOnly, !isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileAndDesktop, isFhsEnabled && styles.animationRTLSupport, shouldShowSidebarToggleAnimation && styles.animationBaseStyles, isExpandedOnMobile && shouldShowSidebarToggleAnimation && styles.expandAnimationMobile, !isExpandedOnMobile && shouldShowSidebarToggleAnimation && styles.collapseAnimationMobile, isExpandedOnDesktop && shouldShowSidebarToggleAnimation && styles.expandAnimationDesktop, !isExpandedOnDesktop && shouldShowSidebarToggleAnimation && styles.collapseAnimationDesktop, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && !isFhsEnabled && styles.flyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close' && !isFhsEnabled && styles.flyoutAnimateClosed, ((sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' || (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close') && !isFirefox && isFhsEnabled && styles.flyoutBaseStylesFullHeightSidebar, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close' && !isFirefox && isFhsEnabled && styles.flyoutAnimateClosedFullHeightSidebar, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && !isFirefox && isFhsEnabled && styles.flyoutOpenFullHeightSidebar, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close' && !isFirefox && isFhsEnabled && styles.flyoutAnimateClosedFullHeightSidebar, isFlyoutClosed && isFhsEnabled && styles.fullHeightSidebar])
|
|
763
|
+
className: ax([styles.root, isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileOnly, !isExpandedOnDesktop && isExpandedOnMobile && !isFlyoutVisible && styles.hiddenDesktopOnly, !isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileAndDesktop, isFhsEnabled && styles.animationRTLSupport, shouldShowSidebarToggleAnimation && styles.animationBaseStyles, isExpandedOnMobile && shouldShowSidebarToggleAnimation && styles.expandAnimationMobile, !isExpandedOnMobile && shouldShowSidebarToggleAnimation && styles.collapseAnimationMobile, isExpandedOnDesktop && shouldShowSidebarToggleAnimation && styles.expandAnimationDesktop, !isExpandedOnDesktop && shouldShowSidebarToggleAnimation && styles.collapseAnimationDesktop, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && !isFhsEnabled && styles.flyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close' && !isFhsEnabled && styles.flyoutAnimateClosed, ((sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' || (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close') && !isFirefox && isFhsEnabled && styles.flyoutBaseStylesFullHeightSidebar, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close' && !isFirefox && isFhsEnabled && styles.flyoutAnimateClosedFullHeightSidebar, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && !isFirefox && isFhsEnabled && styles.flyoutOpenFullHeightSidebar, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close' && !isFirefox && isFhsEnabled && styles.flyoutAnimateClosedFullHeightSidebar, isFlyoutClosed && isFhsEnabled && !fg('platform-dst-side-nav-layering-fixes') && styles.fullHeightSidebar])
|
|
762
764
|
}), /*#__PURE__*/React.createElement(DangerouslyHoistCssVarToDocumentRoot, {
|
|
763
765
|
variableName: sideNavLiveWidthVar,
|
|
764
766
|
value: "0px",
|
|
@@ -777,15 +779,24 @@ function SideNavInternal(_ref) {
|
|
|
777
779
|
, /*#__PURE__*/React.createElement(PanelSplitterProvider, {
|
|
778
780
|
panelId: sideNavPanelSplitterId,
|
|
779
781
|
panelRef: navRef,
|
|
782
|
+
portalRef: isFhsEnabled && fg('platform-dst-side-nav-layering-fixes') ? panelSplitterPortalTargetRef : undefined,
|
|
780
783
|
panelWidth: width,
|
|
781
784
|
onCompleteResize: setWidth,
|
|
782
785
|
getResizeBounds: getResizeBounds,
|
|
783
|
-
resizingCssVar: panelSplitterResizingVar
|
|
784
|
-
|
|
786
|
+
resizingCssVar: panelSplitterResizingVar
|
|
787
|
+
// Not resizable when in peek (flyout) mode.
|
|
788
|
+
,
|
|
789
|
+
isEnabled: fg('platform-dst-side-nav-layering-fixes') ? !isFlyoutVisible :
|
|
790
|
+
// Old behaviour has a bug: the panel splitter would only be visible on sm screens (between 48rem and 64rem)
|
|
791
|
+
// if the side nav was expanded on desktop.
|
|
792
|
+
isExpandedOnDesktop && !isFlyoutVisible,
|
|
785
793
|
shortcut: isShortcutEnabled ? sideNavToggleTooltipKeyboardShortcut : undefined
|
|
786
794
|
}, /*#__PURE__*/React.createElement("div", {
|
|
787
795
|
className: ax([styles.flexContainer])
|
|
788
|
-
}, children)))
|
|
796
|
+
}, children)), isFhsEnabled && fg('platform-dst-side-nav-layering-fixes') && /*#__PURE__*/React.createElement("div", {
|
|
797
|
+
ref: panelSplitterPortalTargetRef,
|
|
798
|
+
className: ax([panelSplitterPortalTargetStyles.root])
|
|
799
|
+
}));
|
|
789
800
|
}
|
|
790
801
|
|
|
791
802
|
/**
|
|
@@ -17,7 +17,8 @@ import { IconButton } from '../../top-nav-items/themed/migration';
|
|
|
17
17
|
var containerStyles = {
|
|
18
18
|
root: "_yyhy11wp _1e0c1txw _1bahh9n0 _1ul9zwfg _1d2y1ris _glte1ris _15ri1mjv _1gs5usvi _ndwch9n0",
|
|
19
19
|
jiraProductLogoUpdate: "_15rip2n4",
|
|
20
|
-
fullHeightSidebar: "_lcxv1wug
|
|
20
|
+
fullHeightSidebar: "_y4tiutpp _lcxv1wug",
|
|
21
|
+
fullHeightSidebarWithLayeringFixes: "_y4tiutpp"
|
|
21
22
|
};
|
|
22
23
|
var listStyles = {
|
|
23
24
|
root: "_zulp1b66 _4cvr1h6o _1e0c1txw",
|
|
@@ -64,7 +65,7 @@ export function TopNavEnd(_ref) {
|
|
|
64
65
|
}, [query]);
|
|
65
66
|
return /*#__PURE__*/React.createElement("nav", {
|
|
66
67
|
"aria-label": label,
|
|
67
|
-
className: ax([containerStyles.root, isFhsEnabled && containerStyles.fullHeightSidebar, fg('team25-eu-jira-logo-updates-csm-jsm') && containerStyles.jiraProductLogoUpdate])
|
|
68
|
+
className: ax([containerStyles.root, isFhsEnabled && !fg('platform-dst-side-nav-layering-fixes') && containerStyles.fullHeightSidebar, isFhsEnabled && fg('platform-dst-side-nav-layering-fixes') && containerStyles.fullHeightSidebarWithLayeringFixes, fg('team25-eu-jira-logo-updates-csm-jsm') && containerStyles.jiraProductLogoUpdate])
|
|
68
69
|
}, isMobile ? /*#__PURE__*/React.createElement(Popup, {
|
|
69
70
|
isOpen: isOpen,
|
|
70
71
|
onClose: function onClose() {
|
|
@@ -2,6 +2,7 @@
|
|
|
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
|
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
6
7
|
var styles = {
|
|
7
8
|
root: "_zulpu2gc _yyhycs5v _1bsb1osq _4cvr1h6o _1e0c1txw _1bahh9n0 _181n11p5 _1j8b15b0 _lagd1bp4 _1t4c1ris _12e8h9n0",
|
|
@@ -20,6 +21,6 @@ export function TopNavMiddle(_ref) {
|
|
|
20
21
|
var children = _ref.children;
|
|
21
22
|
var isFhsEnabled = useIsFhsEnabled();
|
|
22
23
|
return /*#__PURE__*/React.createElement("div", {
|
|
23
|
-
className: ax([styles.root, isFhsEnabled && styles.fullHeightSidebar])
|
|
24
|
+
className: ax([styles.root, isFhsEnabled && !fg('platform-dst-side-nav-layering-fixes') && styles.fullHeightSidebar])
|
|
24
25
|
}, children);
|
|
25
26
|
}
|
|
@@ -13,4 +13,5 @@
|
|
|
13
13
|
._vchhusvi{box-sizing:border-box}
|
|
14
14
|
[dir=rtl] ._65m41mrw{--animation-direction:-1}
|
|
15
15
|
@media (prefers-reduced-motion:no-preference){._10t81e03{transition-property:transform}._10t81rjc{transition-property:transform,opacity}._1xq51ytf{transition-timing-function:ease-in-out}._1xq55ucs{transition-timing-function:ease}._mjvc1efy{transform:translateX(calc(100%*var(--animation-direction)))}._bgpzidpf{opacity:0}._mjvc1p9u{transform:translateX(calc(-100%*var(--animation-direction)))}._mjvco0k7{transform:translateX(calc((-2rem + var(--ds-space-050, 4px)*-1)*var(--animation-direction)))}._mjvcyrjp{transform:translateX(calc((2rem + var(--ds-space-050, 4px))*var(--animation-direction)))}._mjvcz12g{transform:translateX(0)}._xrrpfnf5{transition-duration:.2s}._bgpzkb7n{opacity:1}}
|
|
16
|
-
@media (min-width:64rem){._15rin7od{min-width:unset}._glte1osq{width:100%}._15rip2n4{min-width:330px}._glte1ris{width:max-content}._15ri1mjv{min-width:300px}._1gs5usvi{box-sizing:border-box}._glte93mn{width:var(--n_sNvlw,100%)}._exxmpxbi{padding-inline-end:var(--ds-space-200,1pc)}}
|
|
16
|
+
@media (min-width:64rem){._13wnh2mm{position:relative}._1l3vb3bt:after{content:""}._juxdstnw:after{position:absolute}._1vinidpf:after{inset-block-start:0}._1719idpf:after{inset-block-end:0}._e6znidpf:after{inset-inline-end:0}._1kyhe4h9:after{border-inline-end-width:var(--ds-border-width,1px)}._4cwynqa1:after{border-inline-end-style:solid}._435s1l7x:after{border-inline-end-color:var(--ds-border,#0b120e24)}._m7c3idpf:after{opacity:0}._15rin7od{min-width:unset}._glte1osq{width:100%}._15rip2n4{min-width:330px}@supports (scroll-timeline-axis:block){html:not(:has([data-private-side-nav-header])) ._1kilgc9s{animation-timeline:--sNcst}html:not(:has([data-private-side-nav-header])) ._1m3l1ybg{animation-name:khj1qz3}html:not(:has([data-private-side-nav-header])) ._12g81hrf{animation-fill-mode:both}}._4ap3vuon{background-color:var(--ds-surface,#fff)}._m7c3kb7n:after{opacity:1}._glte1ris{width:max-content}._15ri1mjv{min-width:300px}._1gs5usvi{box-sizing:border-box}._glte93mn{width:var(--n_sNvlw,100%)}._exxmpxbi{padding-inline-end:var(--ds-space-200,1pc)}@supports (scroll-timeline-axis:block){@keyframes khj1qz3{0%{box-shadow:inset 0 -1px 0 0 transparent}0.1%{box-shadow:inset 0 -1px 0 0 var(--ds-border,#0b120e24)}to{box-shadow:inset 0 -1px 0 0 var(--ds-border,#0b120e24)}}}}
|
|
17
|
+
@media (prefers-reduced-motion:no-preference) and (min-width:64rem){._n8qabrmi:after{transition-property:opacity}._wc72fnf5:after{transition-duration:.2s}._j3mr1v42:after{transition-timing-function:ease-in}}
|
|
@@ -8,6 +8,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
8
8
|
import { UNSAFE_useMediaQuery } from '@atlaskit/primitives/compiled';
|
|
9
9
|
import { TopNavStartAttachRef } from '../../../context/top-nav-start/top-nav-start-context';
|
|
10
10
|
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
11
|
+
import { sideNavContentScrollTimelineVar } from '../constants';
|
|
11
12
|
import { useSideNavVisibility } from '../side-nav/use-side-nav-visibility';
|
|
12
13
|
import { SideNavVisibilityState } from '../side-nav/visibility-context';
|
|
13
14
|
|
|
@@ -36,6 +37,12 @@ var innerStyles = {
|
|
|
36
37
|
fullHeightSidebarExpanded: "_15rin7od _glte1osq"
|
|
37
38
|
};
|
|
38
39
|
|
|
40
|
+
/**
|
|
41
|
+
* The scroll indicator is usually applied in SideNavContent, but if there is no SideNavHeader it is
|
|
42
|
+
* applied in TopNavStart instead for layering reasons. See the comment in SideNavHeader for more details.
|
|
43
|
+
*/
|
|
44
|
+
var scrolledShadow = null;
|
|
45
|
+
|
|
39
46
|
/**
|
|
40
47
|
* Styles for the outer element, that does not have re-enabled pointer events and spans the entire
|
|
41
48
|
* width of the TopNavStart area.
|
|
@@ -44,7 +51,10 @@ var innerStyles = {
|
|
|
44
51
|
*/
|
|
45
52
|
var wrapperStyles = {
|
|
46
53
|
root: "_vchhusvi _bozgutpp _4t3i1osq",
|
|
47
|
-
fullHeightSidebarExpanded: "_glte93mn _exxmpxbi"
|
|
54
|
+
fullHeightSidebarExpanded: "_glte93mn _exxmpxbi",
|
|
55
|
+
fullHeightSidebarWithLayeringFixes: "_13wnh2mm _1l3vb3bt _juxdstnw _1vinidpf _1719idpf _e6znidpf _1kyhe4h9 _4cwynqa1 _435s1l7x _m7c3idpf",
|
|
56
|
+
fullHeightSidebarExpandedWithLayeringFixes: "_4ap3vuon _1kilgc9s _1m3l1ybg _12g81hrf _m7c3kb7n",
|
|
57
|
+
fullHeightSidebarBorderTransition: "_n8qabrmi _wc72fnf5 _j3mr1v42"
|
|
48
58
|
};
|
|
49
59
|
|
|
50
60
|
/**
|
|
@@ -112,12 +122,29 @@ var TopNavStartInnerFHS = /*#__PURE__*/forwardRef(function TopNavStartInnerFHS(_
|
|
|
112
122
|
defaultCollapsed: true
|
|
113
123
|
}),
|
|
114
124
|
isExpandedOnDesktop = _useSideNavVisibility.isExpandedOnDesktop;
|
|
125
|
+
var sideNavState = useContext(SideNavVisibilityState);
|
|
126
|
+
var isFirstRenderRef = useRef(true);
|
|
127
|
+
useEffect(function () {
|
|
128
|
+
if (!fg('platform-dst-side-nav-layering-fixes')) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Ignore renders until the side nav state is initialized
|
|
133
|
+
// So that apps using the legacy API for setting side nav default state do not see
|
|
134
|
+
// animations when they shouldn't
|
|
135
|
+
if (sideNavState === null) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (isFirstRenderRef.current) {
|
|
139
|
+
isFirstRenderRef.current = false;
|
|
140
|
+
}
|
|
141
|
+
}, [sideNavState]);
|
|
115
142
|
return /*#__PURE__*/React.createElement("div", {
|
|
116
|
-
className: ax([wrapperStyles.root, isExpandedOnDesktop && wrapperStyles.fullHeightSidebarExpanded])
|
|
143
|
+
className: ax([wrapperStyles.root, isExpandedOnDesktop && wrapperStyles.fullHeightSidebarExpanded, fg('platform-dst-side-nav-layering-fixes') && wrapperStyles.fullHeightSidebarWithLayeringFixes, !isFirstRenderRef.current && isExpandedOnDesktop && fg('platform-dst-side-nav-layering-fixes') && wrapperStyles.fullHeightSidebarBorderTransition, isExpandedOnDesktop && fg('platform-dst-side-nav-layering-fixes') && wrapperStyles.fullHeightSidebarExpandedWithLayeringFixes])
|
|
117
144
|
}, /*#__PURE__*/React.createElement("div", {
|
|
118
145
|
ref: ref,
|
|
119
146
|
"data-testid": testId,
|
|
120
|
-
className: ax([innerStyles.root, innerStyles.fullHeightSidebar, fg('team25-eu-jira-logo-updates-csm-jsm') && innerStyles.jiraProductLogoUpdate, isExpandedOnDesktop && innerStyles.fullHeightSidebarExpanded])
|
|
147
|
+
className: ax([innerStyles.root, !fg('platform-dst-side-nav-layering-fixes') && innerStyles.fullHeightSidebar, fg('team25-eu-jira-logo-updates-csm-jsm') && innerStyles.jiraProductLogoUpdate, isExpandedOnDesktop && innerStyles.fullHeightSidebarExpanded])
|
|
121
148
|
}, children));
|
|
122
149
|
});
|
|
123
150
|
|
|
@@ -5,17 +5,28 @@
|
|
|
5
5
|
._18zrze3t{padding-inline:var(--ds-space-0,0)}
|
|
6
6
|
._179rglyw{border-block-end:none}
|
|
7
7
|
._179ria51{border-block-end:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}._152t1nws{inset-block-start:var(--n_bnrM,0)}
|
|
8
|
+
._18postnw:after{position:absolute}
|
|
9
|
+
._1beue4h9:after{border-block-end-width:var(--ds-border-width,1px)}
|
|
8
10
|
._1bsb1osq{width:100%}
|
|
11
|
+
._1cte1l7x:after{border-block-end-color:var(--ds-border,#0b120e24)}
|
|
12
|
+
._1czdidpf:after{inset-inline-end:0}
|
|
9
13
|
._1e0c11p5{display:grid}
|
|
14
|
+
._1gufidpf:after{inset-block-end:0}
|
|
15
|
+
._1pby11wp{z-index:3}
|
|
16
|
+
._1pbycs5v{z-index:2}
|
|
10
17
|
._1pbyegat{z-index:4}
|
|
11
18
|
._4cvr1h6o{align-items:center}
|
|
12
19
|
._4t3i1dgc{height:var(--n_tNvM)}
|
|
13
20
|
._4t3i1osq{height:100%}
|
|
21
|
+
._aetrb3bt:after{content:""}
|
|
14
22
|
._bfhkglyw{background-color:none}
|
|
15
23
|
._bfhkvuon{background-color:var(--ds-surface,#fff)}
|
|
16
24
|
._d6vu1bgi >span[data-ep-placeholder-id=top_navigation_skeleton]{display:contents}
|
|
25
|
+
._g0nf3tht:after{inset-inline-start:var(--n_sNvlw,0)}
|
|
17
26
|
._kqsw1if8{position:sticky}
|
|
27
|
+
._lcxv1wug{pointer-events:auto}
|
|
18
28
|
._lcxvglyw{pointer-events:none}
|
|
29
|
+
._uaeunqa1:after{border-block-end-style:solid}
|
|
19
30
|
._vchhusvi{box-sizing:border-box}
|
|
20
31
|
._yv0e1mfv{grid-template-columns:auto 1fr auto}
|
|
21
32
|
@media (min-width:48rem){._1j8b18ax{grid-template-columns:1fr minmax(min-content,max-content) 1fr}}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
/* top-nav.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
var _excluded = ["backgroundColor"];
|
|
4
5
|
import "./top-nav.compiled.css";
|
|
5
6
|
import * as React from 'react';
|
|
6
7
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
|
-
import { useContext, useMemo } from 'react';
|
|
8
|
+
import { useContext, useLayoutEffect, useMemo, useState } from 'react';
|
|
9
|
+
import { OpenLayerObserverNamespaceProvider, useOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
11
|
import { useSkipLink } from '../../../context/skip-links/skip-links-context';
|
|
9
12
|
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
10
13
|
import { HasCustomThemeContext } from '../../top-nav-items/themed/has-custom-theme-context';
|
|
11
14
|
import { useCustomTheme } from '../../top-nav-items/themed/use-custom-theme';
|
|
12
|
-
import { bannerMountedVar, localSlotLayers, topNavMountedVar, UNSAFE_topNavVar } from '../constants';
|
|
15
|
+
import { bannerMountedVar, localSlotLayers, openLayerObserverTopNavNamespace, sideNavLiveWidthVar, topNavMountedVar, UNSAFE_topNavVar } from '../constants';
|
|
13
16
|
import { DangerouslyHoistSlotSizes } from '../hoist-slot-sizes-context';
|
|
14
17
|
import { DangerouslyHoistCssVarToDocumentRoot, HoistCssVarToLocalGrid } from '../hoist-utils';
|
|
15
18
|
import { useLayoutId } from '../id-utils';
|
|
@@ -25,7 +28,9 @@ import { useSideNavVisibility } from '../side-nav/use-side-nav-visibility';
|
|
|
25
28
|
var styles = {
|
|
26
29
|
root: "_nd5l8cbt _zulpu2gc _18zrutpp _179ria51 _1e0c11p5 _yv0e1mfv _4cvr1h6o _bfhkvuon _vchhusvi _4t3i1dgc _152t1nws _kqsw1if8 _1pbyegat _d6vu1bgi _1j8b18ax",
|
|
27
30
|
fullHeightSidebar: "_18zrze3t _179rglyw _bfhkglyw _lcxvglyw _pdlmutpp",
|
|
28
|
-
fullHeightSidebarExpanded: "_1rqt16a9 _jh1g18ax"
|
|
31
|
+
fullHeightSidebarExpanded: "_1rqt16a9 _jh1g18ax",
|
|
32
|
+
fullHeightSidebarWithLayeringFixes: "_1pbycs5v _lcxv1wug _bfhkvuon _aetrb3bt _18postnw _1gufidpf _1czdidpf _g0nf3tht _1beue4h9 _uaeunqa1 _1cte1l7x",
|
|
33
|
+
fullHeightSidebarWithLayeringFixesAndOpenLayer: "_1pby11wp"
|
|
29
34
|
};
|
|
30
35
|
|
|
31
36
|
/**
|
|
@@ -60,6 +65,8 @@ export function TopNav(_ref) {
|
|
|
60
65
|
var customTheme = useCustomTheme(UNSAFE_theme);
|
|
61
66
|
|
|
62
67
|
/**
|
|
68
|
+
* Note: this is no longer the case when fg('platform-dst-side-nav-layering-fixes') is enabled.
|
|
69
|
+
*
|
|
63
70
|
* With the full height sidebar we have a foreground and background element,
|
|
64
71
|
* so we need to apply the custom theme styles to the correct element.
|
|
65
72
|
*
|
|
@@ -87,9 +94,37 @@ export function TopNav(_ref) {
|
|
|
87
94
|
foregroundStyle = _useMemo.foregroundStyle;
|
|
88
95
|
var _useSideNavVisibility = useSideNavVisibility(),
|
|
89
96
|
isExpandedOnDesktop = _useSideNavVisibility.isExpandedOnDesktop;
|
|
97
|
+
var openLayerObserver = useOpenLayerObserver();
|
|
98
|
+
// Setting the initial state to false, as it is unlikely that the top nav would have an open popup when the app starts.
|
|
99
|
+
var _useState = useState(false),
|
|
100
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
101
|
+
hasOpenPopup = _useState2[0],
|
|
102
|
+
setHasOpenPopup = _useState2[1];
|
|
103
|
+
useLayoutEffect(function () {
|
|
104
|
+
if (!openLayerObserver || !isFhsEnabled || !fg('platform-dst-side-nav-layering-fixes')) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
function checkAndSetState() {
|
|
108
|
+
if (!openLayerObserver) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
setHasOpenPopup(openLayerObserver.getCount({
|
|
112
|
+
namespace: openLayerObserverTopNavNamespace,
|
|
113
|
+
type: 'popup'
|
|
114
|
+
}) > 0);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Initial check
|
|
118
|
+
checkAndSetState();
|
|
119
|
+
|
|
120
|
+
// Check again whenever number of layers in the top nav change
|
|
121
|
+
return openLayerObserver.onChange(checkAndSetState, {
|
|
122
|
+
namespace: openLayerObserverTopNavNamespace
|
|
123
|
+
});
|
|
124
|
+
}, [isFhsEnabled, openLayerObserver]);
|
|
90
125
|
return /*#__PURE__*/React.createElement(HasCustomThemeContext.Provider, {
|
|
91
126
|
value: customTheme.isEnabled
|
|
92
|
-
}, isFhsEnabled && /*#__PURE__*/React.createElement("div", {
|
|
127
|
+
}, isFhsEnabled && !fg('platform-dst-side-nav-layering-fixes') && /*#__PURE__*/React.createElement("div", {
|
|
93
128
|
"data-layout-slot": true,
|
|
94
129
|
"aria-hidden": true
|
|
95
130
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
@@ -99,11 +134,13 @@ export function TopNav(_ref) {
|
|
|
99
134
|
}), /*#__PURE__*/React.createElement("header", {
|
|
100
135
|
id: id,
|
|
101
136
|
"data-layout-slot": true,
|
|
102
|
-
className: ax([styles.root, isFhsEnabled && styles.fullHeightSidebar, isExpandedOnDesktop && isFhsEnabled && styles.fullHeightSidebarExpanded, xcss]),
|
|
137
|
+
className: ax([styles.root, isFhsEnabled && styles.fullHeightSidebar, isFhsEnabled && fg('platform-dst-side-nav-layering-fixes') && styles.fullHeightSidebarWithLayeringFixes, hasOpenPopup && isFhsEnabled && fg('platform-dst-side-nav-layering-fixes') && styles.fullHeightSidebarWithLayeringFixesAndOpenLayer, isExpandedOnDesktop && isFhsEnabled && styles.fullHeightSidebarExpanded, xcss]),
|
|
103
138
|
"data-testid": testId
|
|
104
139
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
105
140
|
,
|
|
106
|
-
style:
|
|
141
|
+
style:
|
|
142
|
+
// When the layering fixes are enabled, we no longer have separate elements for the foreground and background.
|
|
143
|
+
isFhsEnabled && !fg('platform-dst-side-nav-layering-fixes') ? foregroundStyle : customTheme.isEnabled ? customTheme.style : undefined
|
|
107
144
|
}, /*#__PURE__*/React.createElement(HoistCssVarToLocalGrid, {
|
|
108
145
|
variableName: topNavMountedVar,
|
|
109
146
|
value: height
|
|
@@ -117,5 +154,7 @@ export function TopNav(_ref) {
|
|
|
117
154
|
value: height
|
|
118
155
|
})
|
|
119
156
|
// ------ END UNSAFE STYLES ------
|
|
120
|
-
,
|
|
157
|
+
, fg('platform-dst-side-nav-layering-fixes') ? /*#__PURE__*/React.createElement(OpenLayerObserverNamespaceProvider, {
|
|
158
|
+
namespace: openLayerObserverTopNavNamespace
|
|
159
|
+
}, children) : children));
|
|
121
160
|
}
|
|
@@ -21,6 +21,6 @@ export declare const OnCloseContext: import("react").Context<(() => void) | null
|
|
|
21
21
|
/**
|
|
22
22
|
* __On close provider__
|
|
23
23
|
*
|
|
24
|
-
* A context provider for supplying the
|
|
24
|
+
* A context provider for supplying the onClose function to the FlyoutHeader.
|
|
25
25
|
*/
|
|
26
26
|
export declare const OnCloseProvider: import("react").Provider<(() => void) | null | undefined>;
|
|
@@ -35,6 +35,16 @@ export declare const UNSAFE_MAIN_INLINE_END_FOR_LEGACY_PAGES_ONLY = "calc(var(--
|
|
|
35
35
|
export declare const localSlotLayers: {
|
|
36
36
|
topBar: number;
|
|
37
37
|
banner: number;
|
|
38
|
+
topNavFHSWithOpenLayer: number;
|
|
39
|
+
bannerFHS: number;
|
|
40
|
+
topNavFHS: number;
|
|
38
41
|
sideNav: number;
|
|
39
42
|
panelSmallViewports: number;
|
|
40
43
|
};
|
|
44
|
+
export declare const openLayerObserverSideNavNamespace = "side-nav";
|
|
45
|
+
export declare const openLayerObserverTopNavNamespace = "top-nav";
|
|
46
|
+
/**
|
|
47
|
+
* CSS scroll timeline variable for the side nav content scroll indicator.
|
|
48
|
+
* The scroll timeline is created in SideNavContent, and then used by TopNavStart to apply the scroll indicator line.
|
|
49
|
+
*/
|
|
50
|
+
export declare const sideNavContentScrollTimelineVar = "--sNcst";
|
|
@@ -25,8 +25,13 @@ export type PanelSplitterContextType = {
|
|
|
25
25
|
getResizeBounds: () => ResizeBounds;
|
|
26
26
|
/**
|
|
27
27
|
* A ref to the portal element where the panel splitter will be rendered.
|
|
28
|
-
*
|
|
29
|
-
*
|
|
28
|
+
* It can optionally be provided by consumers of <PanelSplitterProvider> (when the feature gate
|
|
29
|
+
* `platform-dst-side-nav-layering-fixes` is enabled).
|
|
30
|
+
* If not provided, it will be internally set by the PanelSplitterProvider.
|
|
31
|
+
*
|
|
32
|
+
* This prop is useful for:
|
|
33
|
+
* - Rendering the panel splitter outside of an overflow container.
|
|
34
|
+
* - Positioning the panel splitter outside the resizing panel.
|
|
30
35
|
*/
|
|
31
36
|
portalRef: MutableRefObject<HTMLDivElement | null>;
|
|
32
37
|
/**
|
|
@@ -1,12 +1,30 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { type MutableRefObject } from 'react';
|
|
2
2
|
import { type PanelSplitterContextType } from './context';
|
|
3
3
|
export type PanelSplitterProviderProps = Omit<PanelSplitterContextType, 'portalRef' | 'position'> & {
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* The side of the panel/element that the splitter element is positioned on. Uses logical values to support right-to-left languages.
|
|
7
|
+
*
|
|
8
|
+
* Defaults to `start`.
|
|
9
|
+
*
|
|
10
|
+
* For left-to-right languages, `start` is the left side and `end` is the right side.
|
|
11
|
+
*/
|
|
5
12
|
position?: 'start' | 'end';
|
|
13
|
+
/**
|
|
14
|
+
* A ref to the portal element where the panel splitter will be rendered.
|
|
15
|
+
* It can optionally be provided by consumers of <PanelSplitterProvider> (when the feature gate
|
|
16
|
+
* `platform-dst-side-nav-layering-fixes` is enabled).
|
|
17
|
+
* If not provided, it will be internally set by the PanelSplitterProvider.
|
|
18
|
+
*
|
|
19
|
+
* This prop is useful for:
|
|
20
|
+
* - Rendering the panel splitter outside of an overflow container.
|
|
21
|
+
* - Positioning the panel splitter outside the resizing panel.
|
|
22
|
+
*/
|
|
23
|
+
portalRef?: MutableRefObject<HTMLDivElement | null>;
|
|
6
24
|
};
|
|
7
25
|
/**
|
|
8
26
|
* Provides the context required for the panel splitter to work within a page layout slot.
|
|
9
27
|
*
|
|
10
28
|
* Should be used in the layout area components, e.g. SideNav, Aside etc, as opposed to products.
|
|
11
29
|
*/
|
|
12
|
-
export declare const PanelSplitterProvider: ({ panelId, panelWidth, onCompleteResize, getResizeBounds, resizingCssVar, panelRef, position, isEnabled, shortcut, children, }: PanelSplitterProviderProps) => React.JSX.Element;
|
|
30
|
+
export declare const PanelSplitterProvider: ({ panelId, panelWidth, onCompleteResize, getResizeBounds, resizingCssVar, panelRef, portalRef: providedPortalRef, position, isEnabled, shortcut, children, }: PanelSplitterProviderProps) => React.JSX.Element;
|
|
@@ -21,6 +21,6 @@ export declare const OnCloseContext: import("react").Context<(() => void) | null
|
|
|
21
21
|
/**
|
|
22
22
|
* __On close provider__
|
|
23
23
|
*
|
|
24
|
-
* A context provider for supplying the
|
|
24
|
+
* A context provider for supplying the onClose function to the FlyoutHeader.
|
|
25
25
|
*/
|
|
26
26
|
export declare const OnCloseProvider: import("react").Provider<(() => void) | null | undefined>;
|
|
@@ -35,6 +35,16 @@ export declare const UNSAFE_MAIN_INLINE_END_FOR_LEGACY_PAGES_ONLY = "calc(var(--
|
|
|
35
35
|
export declare const localSlotLayers: {
|
|
36
36
|
topBar: number;
|
|
37
37
|
banner: number;
|
|
38
|
+
topNavFHSWithOpenLayer: number;
|
|
39
|
+
bannerFHS: number;
|
|
40
|
+
topNavFHS: number;
|
|
38
41
|
sideNav: number;
|
|
39
42
|
panelSmallViewports: number;
|
|
40
43
|
};
|
|
44
|
+
export declare const openLayerObserverSideNavNamespace = "side-nav";
|
|
45
|
+
export declare const openLayerObserverTopNavNamespace = "top-nav";
|
|
46
|
+
/**
|
|
47
|
+
* CSS scroll timeline variable for the side nav content scroll indicator.
|
|
48
|
+
* The scroll timeline is created in SideNavContent, and then used by TopNavStart to apply the scroll indicator line.
|
|
49
|
+
*/
|
|
50
|
+
export declare const sideNavContentScrollTimelineVar = "--sNcst";
|
|
@@ -25,8 +25,13 @@ export type PanelSplitterContextType = {
|
|
|
25
25
|
getResizeBounds: () => ResizeBounds;
|
|
26
26
|
/**
|
|
27
27
|
* A ref to the portal element where the panel splitter will be rendered.
|
|
28
|
-
*
|
|
29
|
-
*
|
|
28
|
+
* It can optionally be provided by consumers of <PanelSplitterProvider> (when the feature gate
|
|
29
|
+
* `platform-dst-side-nav-layering-fixes` is enabled).
|
|
30
|
+
* If not provided, it will be internally set by the PanelSplitterProvider.
|
|
31
|
+
*
|
|
32
|
+
* This prop is useful for:
|
|
33
|
+
* - Rendering the panel splitter outside of an overflow container.
|
|
34
|
+
* - Positioning the panel splitter outside the resizing panel.
|
|
30
35
|
*/
|
|
31
36
|
portalRef: MutableRefObject<HTMLDivElement | null>;
|
|
32
37
|
/**
|
|
@@ -1,12 +1,30 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { type MutableRefObject } from 'react';
|
|
2
2
|
import { type PanelSplitterContextType } from './context';
|
|
3
3
|
export type PanelSplitterProviderProps = Omit<PanelSplitterContextType, 'portalRef' | 'position'> & {
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* The side of the panel/element that the splitter element is positioned on. Uses logical values to support right-to-left languages.
|
|
7
|
+
*
|
|
8
|
+
* Defaults to `start`.
|
|
9
|
+
*
|
|
10
|
+
* For left-to-right languages, `start` is the left side and `end` is the right side.
|
|
11
|
+
*/
|
|
5
12
|
position?: 'start' | 'end';
|
|
13
|
+
/**
|
|
14
|
+
* A ref to the portal element where the panel splitter will be rendered.
|
|
15
|
+
* It can optionally be provided by consumers of <PanelSplitterProvider> (when the feature gate
|
|
16
|
+
* `platform-dst-side-nav-layering-fixes` is enabled).
|
|
17
|
+
* If not provided, it will be internally set by the PanelSplitterProvider.
|
|
18
|
+
*
|
|
19
|
+
* This prop is useful for:
|
|
20
|
+
* - Rendering the panel splitter outside of an overflow container.
|
|
21
|
+
* - Positioning the panel splitter outside the resizing panel.
|
|
22
|
+
*/
|
|
23
|
+
portalRef?: MutableRefObject<HTMLDivElement | null>;
|
|
6
24
|
};
|
|
7
25
|
/**
|
|
8
26
|
* Provides the context required for the panel splitter to work within a page layout slot.
|
|
9
27
|
*
|
|
10
28
|
* Should be used in the layout area components, e.g. SideNav, Aside etc, as opposed to products.
|
|
11
29
|
*/
|
|
12
|
-
export declare const PanelSplitterProvider: ({ panelId, panelWidth, onCompleteResize, getResizeBounds, resizingCssVar, panelRef, position, isEnabled, shortcut, children, }: PanelSplitterProviderProps) => React.JSX.Element;
|
|
30
|
+
export declare const PanelSplitterProvider: ({ panelId, panelWidth, onCompleteResize, getResizeBounds, resizingCssVar, panelRef, portalRef: providedPortalRef, position, isEnabled, shortcut, children, }: PanelSplitterProviderProps) => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/navigation-system",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.16.0",
|
|
4
4
|
"description": "The latest navigation system for Atlassian apps.",
|
|
5
5
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
6
6
|
"author": "Atlassian Pty Ltd",
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
"@atlaskit/ds-lib": "^5.3.0",
|
|
74
74
|
"@atlaskit/heading": "^5.2.0",
|
|
75
75
|
"@atlaskit/icon": "^29.3.0",
|
|
76
|
-
"@atlaskit/layering": "^3.
|
|
76
|
+
"@atlaskit/layering": "^3.5.0",
|
|
77
77
|
"@atlaskit/logo": "^19.9.0",
|
|
78
78
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
79
|
-
"@atlaskit/popup": "^4.
|
|
79
|
+
"@atlaskit/popup": "^4.10.0",
|
|
80
80
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
81
81
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
82
82
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@atlaskit/lozenge": "^13.3.0",
|
|
109
109
|
"@atlaskit/menu": "^8.4.0",
|
|
110
110
|
"@atlaskit/modal-dialog": "^14.9.0",
|
|
111
|
-
"@atlaskit/onboarding": "^14.
|
|
111
|
+
"@atlaskit/onboarding": "^14.5.0",
|
|
112
112
|
"@atlaskit/page-header": "^12.1.0",
|
|
113
113
|
"@atlaskit/page-layout": "^4.2.0",
|
|
114
114
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"@atlaskit/skeleton": "^2.1.0",
|
|
117
117
|
"@atlaskit/textfield": "^8.2.0",
|
|
118
118
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
119
|
-
"@atlassian/gemini": "^1.
|
|
119
|
+
"@atlassian/gemini": "^1.27.0",
|
|
120
120
|
"@atlassian/search-dialog": "^9.10.0",
|
|
121
121
|
"@atlassian/ssr-tests": "workspace:^",
|
|
122
122
|
"@atlassian/test-utils": "^1.0.0",
|
|
@@ -188,6 +188,9 @@
|
|
|
188
188
|
"platform-dst-nav-app-icon-height-fix": {
|
|
189
189
|
"type": "boolean"
|
|
190
190
|
},
|
|
191
|
+
"platform-dst-side-nav-layering-fixes": {
|
|
192
|
+
"type": "boolean"
|
|
193
|
+
},
|
|
191
194
|
"platform-dst-shape-theme-default": {
|
|
192
195
|
"type": "boolean"
|
|
193
196
|
},
|