@atlaskit/navigation-system 6.1.0 → 6.2.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 +23 -0
- package/dist/cjs/ui/page-layout/banner.js +2 -3
- package/dist/cjs/ui/page-layout/constants.js +2 -2
- package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.js +2 -3
- package/dist/cjs/ui/page-layout/panel-splitter/provider.js +2 -3
- package/dist/cjs/ui/page-layout/panel-splitter/side-nav-panel-splitter.js +2 -3
- package/dist/cjs/ui/page-layout/root.js +1 -1
- package/dist/cjs/ui/page-layout/side-nav/side-nav-content.compiled.css +1 -5
- package/dist/cjs/ui/page-layout/side-nav/side-nav-content.js +2 -4
- package/dist/cjs/ui/page-layout/side-nav/side-nav-header.js +1 -1
- 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 +5 -10
- package/dist/cjs/ui/page-layout/top-nav/top-nav-end.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/top-nav/top-nav-end.js +14 -18
- package/dist/cjs/ui/page-layout/top-nav/top-nav-middle.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/top-nav/top-nav-middle.js +4 -8
- package/dist/cjs/ui/page-layout/top-nav/top-nav-start.compiled.css +1 -2
- package/dist/cjs/ui/page-layout/top-nav/top-nav-start.js +10 -14
- package/dist/cjs/ui/page-layout/top-nav/top-nav.compiled.css +1 -5
- package/dist/cjs/ui/page-layout/top-nav/top-nav.js +5 -57
- package/dist/es2019/ui/page-layout/banner.js +2 -3
- package/dist/es2019/ui/page-layout/constants.js +2 -2
- package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.js +2 -3
- package/dist/es2019/ui/page-layout/panel-splitter/provider.js +2 -3
- package/dist/es2019/ui/page-layout/panel-splitter/side-nav-panel-splitter.js +2 -3
- package/dist/es2019/ui/page-layout/root.js +1 -1
- package/dist/es2019/ui/page-layout/side-nav/side-nav-content.compiled.css +1 -5
- package/dist/es2019/ui/page-layout/side-nav/side-nav-content.js +2 -4
- package/dist/es2019/ui/page-layout/side-nav/side-nav-header.js +1 -1
- 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 +6 -11
- package/dist/es2019/ui/page-layout/top-nav/top-nav-end.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/top-nav/top-nav-end.js +8 -13
- package/dist/es2019/ui/page-layout/top-nav/top-nav-middle.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/top-nav/top-nav-middle.js +4 -8
- package/dist/es2019/ui/page-layout/top-nav/top-nav-start.compiled.css +1 -2
- package/dist/es2019/ui/page-layout/top-nav/top-nav-start.js +11 -15
- package/dist/es2019/ui/page-layout/top-nav/top-nav.compiled.css +1 -5
- package/dist/es2019/ui/page-layout/top-nav/top-nav.js +6 -57
- package/dist/esm/ui/page-layout/banner.js +2 -3
- package/dist/esm/ui/page-layout/constants.js +2 -2
- package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.js +2 -3
- package/dist/esm/ui/page-layout/panel-splitter/provider.js +2 -3
- package/dist/esm/ui/page-layout/panel-splitter/side-nav-panel-splitter.js +2 -3
- package/dist/esm/ui/page-layout/root.js +1 -1
- package/dist/esm/ui/page-layout/side-nav/side-nav-content.compiled.css +1 -5
- package/dist/esm/ui/page-layout/side-nav/side-nav-content.js +2 -4
- package/dist/esm/ui/page-layout/side-nav/side-nav-header.js +1 -1
- 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 +6 -11
- package/dist/esm/ui/page-layout/top-nav/top-nav-end.compiled.css +0 -1
- package/dist/esm/ui/page-layout/top-nav/top-nav-end.js +14 -18
- package/dist/esm/ui/page-layout/top-nav/top-nav-middle.compiled.css +0 -1
- package/dist/esm/ui/page-layout/top-nav/top-nav-middle.js +4 -8
- package/dist/esm/ui/page-layout/top-nav/top-nav-start.compiled.css +1 -2
- package/dist/esm/ui/page-layout/top-nav/top-nav-start.js +10 -14
- package/dist/esm/ui/page-layout/top-nav/top-nav.compiled.css +1 -5
- package/dist/esm/ui/page-layout/top-nav/top-nav.js +6 -57
- package/dist/types/ui/page-layout/constants.d.ts +3 -3
- package/dist/types/ui/page-layout/panel-splitter/context.d.ts +0 -2
- package/dist/types/ui/page-layout/panel-splitter/provider.d.ts +0 -2
- package/dist/types/ui/page-layout/ribbon.d.ts +1 -1
- package/dist/types/ui/top-nav-items/themed/search.d.ts +2 -2
- package/dist/types-ts4.5/ui/page-layout/constants.d.ts +3 -3
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/context.d.ts +0 -2
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/provider.d.ts +0 -2
- package/dist/types-ts4.5/ui/page-layout/ribbon.d.ts +1 -1
- package/dist/types-ts4.5/ui/top-nav-items/themed/search.d.ts +2 -2
- package/package.json +11 -11
|
@@ -3,7 +3,6 @@ import "./banner.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useContext } from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { useSkipLinkInternal } from '../../context/skip-links/skip-links-context';
|
|
8
7
|
import { useIsFhsEnabled } from '../fhs-rollout/use-is-fhs-enabled';
|
|
9
8
|
import { bannerMountedVar, localSlotLayers, UNSAFE_bannerVar } from './constants';
|
|
@@ -12,7 +11,7 @@ import { DangerouslyHoistCssVarToDocumentRoot, HoistCssVarToLocalGrid } from './
|
|
|
12
11
|
import { useLayoutId } from './id-utils';
|
|
13
12
|
const styles = {
|
|
14
13
|
root: "_nd5ldkfm _1reo15vq _18m915vq _4t3iutvi _152tidpf _kqsw1if8 _1pbyegat",
|
|
15
|
-
|
|
14
|
+
fullHeightSidebar: "_1pby11wp"
|
|
16
15
|
};
|
|
17
16
|
|
|
18
17
|
/**
|
|
@@ -46,7 +45,7 @@ export function Banner({
|
|
|
46
45
|
return /*#__PURE__*/React.createElement("div", {
|
|
47
46
|
id: id,
|
|
48
47
|
"data-layout-slot": true,
|
|
49
|
-
className: ax([styles.root, isFhsEnabled &&
|
|
48
|
+
className: ax([styles.root, isFhsEnabled && styles.fullHeightSidebar, xcss]),
|
|
50
49
|
"data-testid": testId
|
|
51
50
|
}, /*#__PURE__*/React.createElement(HoistCssVarToLocalGrid, {
|
|
52
51
|
variableName: bannerMountedVar,
|
|
@@ -51,12 +51,12 @@ export const UNSAFE_MAIN_INLINE_END_FOR_LEGACY_PAGES_ONLY = `calc(var(${UNSAFE_a
|
|
|
51
51
|
*/
|
|
52
52
|
export const localSlotLayers = {
|
|
53
53
|
ribbon: 4,
|
|
54
|
-
// The side nav panel splitter is layered above the top nav when FHS
|
|
54
|
+
// The side nav panel splitter is layered above the top nav when FHS is enabled.
|
|
55
55
|
// It has the same z-index value, but is rendered after the top nav in the DOM so is stacked above.
|
|
56
56
|
sideNavPanelSplitterFHS: 4,
|
|
57
57
|
topBar: 4,
|
|
58
58
|
banner: 4,
|
|
59
|
-
// When FHS
|
|
59
|
+
// When FHS is enabled, the side nav is layered below the top nav,
|
|
60
60
|
// but above the panel
|
|
61
61
|
bannerFHS: 3,
|
|
62
62
|
topNavFHS: 3,
|
|
@@ -41,8 +41,7 @@ const lineStyles = {
|
|
|
41
41
|
root: "_kqswstnw _1e0c1ule _1bsb1l7b _4t3i1osq _syaz1kw7 _bfhk1r31 _1e021v6z"
|
|
42
42
|
};
|
|
43
43
|
const tooltipStyles = {
|
|
44
|
-
root: "_ahbq196n"
|
|
45
|
-
fullHeightSidebarWithLayeringFixes: "_1bsb1ris"
|
|
44
|
+
root: "_ahbq196n _1bsb1ris"
|
|
46
45
|
};
|
|
47
46
|
const panelSplitterDragDataSymbol = Symbol('panel-splitter-drag-data');
|
|
48
47
|
function signPanelSplitterDragData(data) {
|
|
@@ -86,7 +85,7 @@ const PanelSplitterTooltip = /*#__PURE__*/forwardRef(({
|
|
|
86
85
|
// Must be statically passed
|
|
87
86
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides
|
|
88
87
|
,
|
|
89
|
-
className: ax([tooltipStyles.root,
|
|
88
|
+
className: ax([tooltipStyles.root, className])
|
|
90
89
|
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
|
|
91
90
|
,
|
|
92
91
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { Fragment, useMemo, useRef } from 'react';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import { PanelSplitterContext } from './context';
|
|
4
3
|
/**
|
|
5
4
|
* Provides the context required for the panel splitter to work within a page layout slot.
|
|
@@ -29,12 +28,12 @@ export const PanelSplitterProvider = ({
|
|
|
29
28
|
position,
|
|
30
29
|
panelRef,
|
|
31
30
|
isEnabled,
|
|
32
|
-
portalRef: typeof providedPortalRef !== 'undefined'
|
|
31
|
+
portalRef: typeof providedPortalRef !== 'undefined' ? providedPortalRef : portalRef,
|
|
33
32
|
shortcut
|
|
34
33
|
}), [panelId, panelWidth, onCompleteResize, getResizeBounds, resizingCssVar, position, panelRef, isEnabled, providedPortalRef, shortcut]);
|
|
35
34
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(PanelSplitterContext.Provider, {
|
|
36
35
|
value: context
|
|
37
|
-
}, children), typeof providedPortalRef !== 'undefined'
|
|
36
|
+
}, children), typeof providedPortalRef !== 'undefined' ? null : /*#__PURE__*/React.createElement("div", {
|
|
38
37
|
ref: portalRef
|
|
39
38
|
}));
|
|
40
39
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { useContext, useEffect, useState } from 'react';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { useOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
6
5
|
import { openLayerObserverSideNavNamespace, openLayerObserverTopNavEndNamespace, openLayerObserverTopNavMiddleNamespace, openLayerObserverTopNavStartNamespace, sideNavPanelSplitterId } from '../constants';
|
|
7
6
|
import { useToggleSideNav } from '../side-nav/use-toggle-side-nav';
|
|
@@ -28,7 +27,7 @@ function useHasOpenPopupsInSideNavOrTopNav() {
|
|
|
28
27
|
// Setting the initial state to false, as it is unlikely that there would be any open popups when the app starts.
|
|
29
28
|
const [hasOpenPopups, setHasOpenPopups] = useState(false);
|
|
30
29
|
useEffect(() => {
|
|
31
|
-
if (!openLayerObserver || !isFhsEnabled
|
|
30
|
+
if (!openLayerObserver || !isFhsEnabled) {
|
|
32
31
|
return;
|
|
33
32
|
}
|
|
34
33
|
function updateState() {
|
|
@@ -87,7 +86,7 @@ export const SideNavPanelSplitter = ({
|
|
|
87
86
|
// in the side nav or top nav is being placed here, instead of in `SideNav`, to prevent
|
|
88
87
|
// re-rendering the side nav anytime the number of open popups changes.
|
|
89
88
|
const hasOpenLayersInSideNavOrTopNav = useHasOpenPopupsInSideNavOrTopNav();
|
|
90
|
-
if (hasOpenLayersInSideNavOrTopNav && isFhsEnabled
|
|
89
|
+
if (hasOpenLayersInSideNavOrTopNav && isFhsEnabled) {
|
|
91
90
|
return null;
|
|
92
91
|
}
|
|
93
92
|
return /*#__PURE__*/React.createElement(OnDoubleClickContext.Provider, {
|
|
@@ -70,7 +70,7 @@ This message will not be displayed in production.
|
|
|
70
70
|
testId: testId
|
|
71
71
|
}, /*#__PURE__*/React.createElement("div", {
|
|
72
72
|
ref: ref,
|
|
73
|
-
className: ax([styles.root, isFhsEnabled &&
|
|
73
|
+
className: ax([styles.root, isFhsEnabled && !fg('platform_dst_nav4_fhs_feedback_1') && styles.sideNavScrollTimeline, fg('platform_dst_nav4_ribbon_slot') && styles.ribbon, xcss]),
|
|
74
74
|
id: gridRootId,
|
|
75
75
|
"data-testid": testId
|
|
76
76
|
}, children)))))))));
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
._1un9baqb{scroll-timeline:--sNcst block}._16jlkb7n{flex-grow:1}
|
|
1
|
+
._16jlkb7n{flex-grow:1}
|
|
3
2
|
._18m91wug{overflow-y:auto}
|
|
4
3
|
._1o9zkb7n{flex-shrink:1}
|
|
5
4
|
._1q51utpp{padding-block-start:var(--ds-space-150,9pt)}
|
|
6
5
|
._1reo1wug{overflow-x:auto}
|
|
7
|
-
._21o1gc9s{animation-timeline:--sNcst}
|
|
8
6
|
._85i5utpp{padding-block-end:var(--ds-space-150,9pt)}
|
|
9
7
|
._bozgutpp{padding-inline-start:var(--ds-space-150,9pt)}
|
|
10
8
|
._i0dlf1ug{flex-basis:0%}
|
|
11
|
-
._j7hq13ly{animation-name:k1ywrstg}
|
|
12
9
|
._y4tiutpp{padding-inline-end:var(--ds-space-150,9pt)}
|
|
13
|
-
@keyframes k1ywrstg{0%{box-shadow:none}0.1%{box-shadow:0 -1px var(--ds-border,#0b120e24)}to{box-shadow:0 -1px var(--ds-border,#0b120e24)}}
|
|
14
10
|
@media (min-width:64rem){@supports (scroll-timeline-axis:block){._1sfqgc9s{scroll-timeline-name:--sNcst}._1q1x1ule{scroll-timeline-axis:block}html:has([data-private-side-nav-header]) ._8pm2gc9s{animation-timeline:--sNcst}html:has([data-private-side-nav-header]) ._1gd913ly{animation-name:k1ywrstg}}@supports (scroll-timeline-axis:block){@keyframes k1ywrstg{0%{box-shadow:none}0.1%{box-shadow:0 -1px var(--ds-border,#0b120e24)}to{box-shadow:0 -1px var(--ds-border,#0b120e24)}}}}
|
|
@@ -32,10 +32,8 @@ const styles = {
|
|
|
32
32
|
* whereas this CSS approach should show even before hydration.
|
|
33
33
|
*/
|
|
34
34
|
const scrolledBorder = null;
|
|
35
|
-
const scrollTimelineVar = '--sNcst';
|
|
36
35
|
const fullHeightSidebarStyles = {
|
|
37
|
-
scrollContainer: "
|
|
38
|
-
scrollContainerWithLayeringFixes: "_1sfqgc9s _1q1x1ule _8pm2gc9s _1gd913ly"
|
|
36
|
+
scrollContainer: "_1sfqgc9s _1q1x1ule _8pm2gc9s _1gd913ly"
|
|
39
37
|
};
|
|
40
38
|
function _SideNavContent({
|
|
41
39
|
children,
|
|
@@ -50,7 +48,7 @@ function _SideNavContent({
|
|
|
50
48
|
return /*#__PURE__*/React.createElement("div", {
|
|
51
49
|
ref: isFhsEnabled ? mergedRef : forwardedRef,
|
|
52
50
|
"data-testid": testId,
|
|
53
|
-
className: ax([styles.scrollContainer, isFhsEnabled &&
|
|
51
|
+
className: ax([styles.scrollContainer, isFhsEnabled && isExpandedOnDesktop && !fg('platform_dst_nav4_fhs_feedback_1') && fullHeightSidebarStyles.scrollContainer])
|
|
54
52
|
}, /*#__PURE__*/React.createElement("div", {
|
|
55
53
|
className: ax([styles.paddingContainer])
|
|
56
54
|
}, children));
|
|
@@ -29,7 +29,7 @@ export const SideNavHeader = ({
|
|
|
29
29
|
* - If SideNavHeader does not exist, the scroll indicator line is applied to TopNavStart. This ensures
|
|
30
30
|
* the scroll indicator line is visible even when the top nav has a z-index higher than the side nav.
|
|
31
31
|
*/
|
|
32
|
-
"data-private-side-nav-header": fg('
|
|
32
|
+
"data-private-side-nav-header": fg('platform_dst_nav4_fhs_feedback_1') ? undefined : 'true',
|
|
33
33
|
className: ax([styles.root])
|
|
34
34
|
}, children);
|
|
35
35
|
};
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
[dir=rtl] ._65m41mrw{--animation-direction:-1}
|
|
23
23
|
@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)}}
|
|
24
24
|
@media (min-width:48rem){._14b5hc79{width:var(--n_snvRsz,var(--n_sNvw))}}
|
|
25
|
-
@media (min-width:64rem){._165t56xv{height:calc(100vh - var(--n_bnrM, 0px))}.
|
|
25
|
+
@media (min-width:64rem){._165t56xv{height:calc(100vh - var(--n_bnrM, 0px))}._p0az1elq{transform:translateX(calc(var(--n_snvRsz, var(--n_snvW, 0px)) - var(--ds-border-width, 1px)))}._dm2518uv{display:initial}._dm25glyw{display:none}._qiln1gzg{grid-area:main}._p5clglyw{border-inline-end:none}._4ap31bhr{background-color:var(--ds-surface-overlay,#fff)}._scbp130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}._qilnk0mc{grid-area:side-nav}._p5clia51{border-inline-end:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}._4ap3vuon{background-color:var(--ds-surface,#fff)}._scbpglyw{box-shadow:none}}
|
|
26
26
|
@media (prefers-reduced-motion:no-preference) and (min-width:64rem){._17ly8iot{transition-property:transform,display}._177m1a5r{transition-behavior:allow-discrete}._1sg81gzg{grid-area:main}._vgub1mm8{transition-timing-function:cubic-bezier(0,.4,0,1)}._hh1u1p9u{transform:translateX(calc(-100%*var(--animation-direction)))}@starting-style{._s2eg1p9u{transform:translateX(calc(-100%*var(--animation-direction)))}}._1sg8k0mc{grid-area:side-nav}._vgub1ku9{transition-timing-function:cubic-bezier(.6,0,0,1)}._hjoifnf5{transition-duration:.2s}}
|
|
27
27
|
@media (prefers-reduced-motion:no-preference) and (not (min-width:64rem)){._aadi1p9u{transform:translateX(calc(-100%*var(--animation-direction)))}}
|
|
28
28
|
@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}}}
|
|
@@ -15,7 +15,7 @@ import { media } from '@atlaskit/primitives/responsive';
|
|
|
15
15
|
import { useSkipLinkInternal } from '../../../context/skip-links/skip-links-context';
|
|
16
16
|
import { TopNavStartElement } from '../../../context/top-nav-start/top-nav-start-context';
|
|
17
17
|
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
18
|
-
import { bannerMountedVar, contentHeightWhenFixed, contentInsetBlockStart, localSlotLayers, openLayerObserverSideNavNamespace, openLayerObserverTopNavStartNamespace, sideNavLiveWidthVar, sideNavPanelSplitterId, sideNavVar,
|
|
18
|
+
import { bannerMountedVar, contentHeightWhenFixed, contentInsetBlockStart, localSlotLayers, openLayerObserverSideNavNamespace, openLayerObserverTopNavStartNamespace, sideNavLiveWidthVar, sideNavPanelSplitterId, sideNavVar, UNSAFE_sideNavLayoutVar } from '../constants';
|
|
19
19
|
import { DangerouslyHoistSlotSizes } from '../hoist-slot-sizes-context';
|
|
20
20
|
import { DangerouslyHoistCssVarToDocumentRoot } from '../hoist-utils';
|
|
21
21
|
import { useLayoutId } from '../id-utils';
|
|
@@ -70,8 +70,7 @@ const styles = {
|
|
|
70
70
|
expandAnimationMobile: "_1xq51ku9 _1nu51p9u",
|
|
71
71
|
collapseAnimationMobile: "_1lh81gzg _1xq51mm8 _aadi1p9u",
|
|
72
72
|
expandAnimationDesktop: "_1sg8k0mc _vgub1ku9 _s2eg1p9u",
|
|
73
|
-
collapseAnimationDesktop: "_1sg81gzg _vgub1mm8 _hh1u1p9u"
|
|
74
|
-
fullHeightSidebar: "_165t56xv _180k1wjm _26vxoned _1mt19dtb"
|
|
73
|
+
collapseAnimationDesktop: "_1sg81gzg _vgub1mm8 _hh1u1p9u"
|
|
75
74
|
};
|
|
76
75
|
const fallbackDefaultWidth = 320;
|
|
77
76
|
export const onPeekStartDelayMs = 500;
|
|
@@ -678,7 +677,6 @@ function SideNavInternal({
|
|
|
678
677
|
cssVar: panelSplitterResizingVar,
|
|
679
678
|
panelId: sideNavPanelSplitterId
|
|
680
679
|
});
|
|
681
|
-
const isFlyoutClosed = (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'closed' || (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === undefined;
|
|
682
680
|
const isExpandedStateDifferentFromInitial = isExpandedOnMobile || isExpandedOnDesktop !== initialIsExpandedOnDesktop;
|
|
683
681
|
|
|
684
682
|
/**
|
|
@@ -739,7 +737,7 @@ function SideNavInternal({
|
|
|
739
737
|
},
|
|
740
738
|
ref: mergedRef,
|
|
741
739
|
"data-testid": testId,
|
|
742
|
-
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
|
|
740
|
+
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])
|
|
743
741
|
}), /*#__PURE__*/React.createElement(DangerouslyHoistCssVarToDocumentRoot, {
|
|
744
742
|
variableName: sideNavLiveWidthVar,
|
|
745
743
|
value: "0px",
|
|
@@ -758,21 +756,18 @@ function SideNavInternal({
|
|
|
758
756
|
, /*#__PURE__*/React.createElement(PanelSplitterProvider, {
|
|
759
757
|
panelId: sideNavPanelSplitterId,
|
|
760
758
|
panelRef: navRef,
|
|
761
|
-
portalRef: isFhsEnabled
|
|
759
|
+
portalRef: isFhsEnabled ? panelSplitterPortalTargetRef : undefined,
|
|
762
760
|
panelWidth: width,
|
|
763
761
|
onCompleteResize: setWidth,
|
|
764
762
|
getResizeBounds: getResizeBounds,
|
|
765
763
|
resizingCssVar: panelSplitterResizingVar
|
|
766
764
|
// Not resizable when in peek (flyout) mode.
|
|
767
765
|
,
|
|
768
|
-
isEnabled:
|
|
769
|
-
// Old behaviour has a bug: the panel splitter would only be visible on sm screens (between 48rem and 64rem)
|
|
770
|
-
// if the side nav was expanded on desktop.
|
|
771
|
-
isExpandedOnDesktop && !isFlyoutVisible,
|
|
766
|
+
isEnabled: !isFlyoutVisible,
|
|
772
767
|
shortcut: isShortcutEnabled ? sideNavToggleTooltipKeyboardShortcut : undefined
|
|
773
768
|
}, /*#__PURE__*/React.createElement("div", {
|
|
774
769
|
className: ax([styles.flexContainer])
|
|
775
|
-
}, children))), isFhsEnabled &&
|
|
770
|
+
}, children))), isFhsEnabled && /*#__PURE__*/React.createElement("div", {
|
|
776
771
|
ref: panelSplitterPortalTargetRef,
|
|
777
772
|
"data-layout-slot": true,
|
|
778
773
|
style: {
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
._1e0cglyw{display:none}
|
|
7
7
|
._1ul9zwfg{min-width:2pc}
|
|
8
8
|
._4cvr1h6o{align-items:center}
|
|
9
|
-
._lcxv1wug{pointer-events:auto}
|
|
10
9
|
._y4tiutpp{padding-inline-end:var(--ds-space-150,9pt)}
|
|
11
10
|
@media (min-width:48rem){._181n1txw{display:flex}._1d2y1ris{min-width:max-content}}
|
|
12
11
|
@media (min-width:64rem){._glte1ris{width:max-content}._15rip2n4{min-width:330px}._1gs5usvi{box-sizing:border-box}._ndwch9n0{justify-self:end}}
|
|
@@ -7,7 +7,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
9
|
import { OpenLayerObserverNamespaceProvider } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
import Popup from '@atlaskit/popup';
|
|
12
11
|
import { UNSAFE_useMediaQuery as useMediaQuery } from '@atlaskit/primitives/compiled';
|
|
13
12
|
import { List } from '../../../components/list';
|
|
@@ -17,21 +16,13 @@ import { IconButton } from '../../top-nav-items/themed/migration';
|
|
|
17
16
|
import { openLayerObserverTopNavEndNamespace } from '../constants';
|
|
18
17
|
const containerStyles = {
|
|
19
18
|
root: "_yyhy11wp _1e0c1txw _1bahh9n0 _1ul9zwfg _1d2y1ris _glte1ris _15rip2n4 _1gs5usvi _ndwch9n0",
|
|
20
|
-
fullHeightSidebar: "_y4tiutpp
|
|
21
|
-
fullHeightSidebarWithLayeringFixes: "_y4tiutpp"
|
|
19
|
+
fullHeightSidebar: "_y4tiutpp"
|
|
22
20
|
};
|
|
23
21
|
const listStyles = {
|
|
24
22
|
root: "_zulp1b66 _4cvr1h6o _1e0c1txw",
|
|
25
23
|
hideOnSmallViewport: "_1e0cglyw _181n1txw",
|
|
26
24
|
popupContainer: "_1yt4u2gc"
|
|
27
25
|
};
|
|
28
|
-
function OpenLayerObserverNamespaceProviderBehindFG({
|
|
29
|
-
children
|
|
30
|
-
}) {
|
|
31
|
-
return fg('platform-dst-side-nav-layering-fixes') ? /*#__PURE__*/React.createElement(OpenLayerObserverNamespaceProvider, {
|
|
32
|
-
namespace: openLayerObserverTopNavEndNamespace
|
|
33
|
-
}, children) : children;
|
|
34
|
-
}
|
|
35
26
|
|
|
36
27
|
/**
|
|
37
28
|
* __TopNavEnd__
|
|
@@ -65,7 +56,7 @@ export function TopNavEnd({
|
|
|
65
56
|
}, [query]);
|
|
66
57
|
return /*#__PURE__*/React.createElement("nav", {
|
|
67
58
|
"aria-label": label,
|
|
68
|
-
className: ax([containerStyles.root, isFhsEnabled &&
|
|
59
|
+
className: ax([containerStyles.root, isFhsEnabled && containerStyles.fullHeightSidebar])
|
|
69
60
|
}, isMobile ? /*#__PURE__*/React.createElement(Popup, {
|
|
70
61
|
isOpen: isOpen,
|
|
71
62
|
onClose: () => setIsOpen(false),
|
|
@@ -75,7 +66,9 @@ export function TopNavEnd({
|
|
|
75
66
|
value: false
|
|
76
67
|
}, /*#__PURE__*/React.createElement(List, {
|
|
77
68
|
xcss: cx(listStyles.root, listStyles.popupContainer)
|
|
78
|
-
}, /*#__PURE__*/React.createElement(
|
|
69
|
+
}, /*#__PURE__*/React.createElement(OpenLayerObserverNamespaceProvider, {
|
|
70
|
+
namespace: openLayerObserverTopNavEndNamespace
|
|
71
|
+
}, children))),
|
|
79
72
|
trigger: triggerProps => /*#__PURE__*/React.createElement(IconButton, _extends({}, triggerProps, {
|
|
80
73
|
label: showMoreButtonLabel,
|
|
81
74
|
isSelected: isOpen,
|
|
@@ -85,5 +78,7 @@ export function TopNavEnd({
|
|
|
85
78
|
}))
|
|
86
79
|
}) : /*#__PURE__*/React.createElement(List, {
|
|
87
80
|
xcss: cx(listStyles.root, listStyles.hideOnSmallViewport)
|
|
88
|
-
}, /*#__PURE__*/React.createElement(
|
|
81
|
+
}, /*#__PURE__*/React.createElement(OpenLayerObserverNamespaceProvider, {
|
|
82
|
+
namespace: openLayerObserverTopNavEndNamespace
|
|
83
|
+
}, children)));
|
|
89
84
|
}
|
|
@@ -4,5 +4,4 @@
|
|
|
4
4
|
._1bsb1osq{width:100%}
|
|
5
5
|
._1e0c1txw{display:flex}
|
|
6
6
|
._4cvr1h6o{align-items:center}
|
|
7
|
-
._lcxv1wug{pointer-events:auto}
|
|
8
7
|
@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}}
|
|
@@ -3,12 +3,9 @@ import "./top-nav-middle.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { OpenLayerObserverNamespaceProvider } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
8
6
|
import { openLayerObserverTopNavMiddleNamespace } from '../constants';
|
|
9
7
|
const styles = {
|
|
10
|
-
root: "_zulpu2gc _yyhycs5v _1bsb1osq _4cvr1h6o _1e0c1txw _1bahh9n0 _181n11p5 _1j8b15b0 _lagd1bp4 _1t4c1ris _12e8h9n0"
|
|
11
|
-
fullHeightSidebar: "_lcxv1wug"
|
|
8
|
+
root: "_zulpu2gc _yyhycs5v _1bsb1osq _4cvr1h6o _1e0c1txw _1bahh9n0 _181n11p5 _1j8b15b0 _lagd1bp4 _1t4c1ris _12e8h9n0"
|
|
12
9
|
};
|
|
13
10
|
|
|
14
11
|
/**
|
|
@@ -22,10 +19,9 @@ const styles = {
|
|
|
22
19
|
export function TopNavMiddle({
|
|
23
20
|
children
|
|
24
21
|
}) {
|
|
25
|
-
const isFhsEnabled = useIsFhsEnabled();
|
|
26
22
|
return /*#__PURE__*/React.createElement("div", {
|
|
27
|
-
className: ax([styles.root
|
|
28
|
-
},
|
|
23
|
+
className: ax([styles.root])
|
|
24
|
+
}, /*#__PURE__*/React.createElement(OpenLayerObserverNamespaceProvider, {
|
|
29
25
|
namespace: openLayerObserverTopNavMiddleNamespace
|
|
30
|
-
}, children)
|
|
26
|
+
}, children));
|
|
31
27
|
}
|
|
@@ -9,10 +9,9 @@
|
|
|
9
9
|
._4t3i1osq{height:100%}
|
|
10
10
|
._ahbq1wug{margin-inline-start:auto}
|
|
11
11
|
._bozgutpp{padding-inline-start:var(--ds-space-150,9pt)}
|
|
12
|
-
._lcxv1wug{pointer-events:auto}
|
|
13
12
|
._vchhusvi{box-sizing:border-box}
|
|
14
13
|
[dir=rtl] ._65m41mrw{--animation-direction:-1}
|
|
15
14
|
@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){._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%}.
|
|
15
|
+
@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%}._exxmutpp{padding-inline-end:var(--ds-space-150,9pt)}._glte1ris{width:max-content}._15rip2n4{min-width:330px}._1gs5usvi{box-sizing:border-box}._glte93mn{width:var(--n_sNvlw,100%)}._exxmpxbi{padding-inline-end:var(--ds-space-200,1pc)}._4ap3vuon{background-color:var(--ds-surface,#fff)}._m7c3kb7n:after{opacity:1}}
|
|
17
16
|
@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}}
|
|
18
17
|
@supports (scroll-timeline-axis:block){@keyframes k1rswljm{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)}}html:not(:has([data-private-side-nav-header])) ._5gdsgc9s{animation-timeline:--sNcst}html:not(:has([data-private-side-nav-header])) ._53frsjnm{animation-name:k1rswljm}html:not(:has([data-private-side-nav-header])) ._bt1c1hrf{animation-fill-mode:both}}
|
|
@@ -19,7 +19,7 @@ import { SideNavVisibilityState } from '../side-nav/visibility-context';
|
|
|
19
19
|
* CSS at-rules when at-rules are nested: https://github.com/atlassian-labs/compiled/blob/e04a325915e1d13010205089e4915de0e53bc2d4/packages/css/src/plugins/merge-duplicate-at-rules.ts#L5
|
|
20
20
|
* Avoiding nesting the `@supports` at-rule inside of `@media` means Compiled can remove duplicate styles from the generated CSS.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
let isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
23
23
|
|
|
24
24
|
// Placed in a variable, as the value is used in the translateX value for the children wrapper animation.
|
|
25
25
|
const flexGap = "var(--ds-space-050, 4px)";
|
|
@@ -32,7 +32,6 @@ const flexGap = "var(--ds-space-050, 4px)";
|
|
|
32
32
|
*/
|
|
33
33
|
const innerStyles = {
|
|
34
34
|
root: "_zulp1b66 _yyhykb7n _4t3i1osq _4cvr1h6o _1e0c1txw _glte1ris _15rip2n4 _1gs5usvi",
|
|
35
|
-
fullHeightSidebar: "_lcxv1wug",
|
|
36
35
|
fullHeightSidebarExpanded: "_15rin7od _glte1osq"
|
|
37
36
|
};
|
|
38
37
|
|
|
@@ -49,11 +48,9 @@ const scrolledShadow = null;
|
|
|
49
48
|
* This wrapper element is only rendered when `useIsFhsEnabled` is true.
|
|
50
49
|
*/
|
|
51
50
|
const wrapperStyles = {
|
|
52
|
-
root: "_vchhusvi _bozgutpp _4t3i1osq",
|
|
53
|
-
fullHeightSidebarExpanded: "_glte93mn _exxmpxbi",
|
|
54
|
-
|
|
55
|
-
fullHeightSidebarExpandedWithLayeringFixes: "_4ap3vuon _m7c3kb7n",
|
|
56
|
-
fullHeightSidebarExpandedWithLayeringFixesScrollTimeline: "_5gdsgc9s _53frsjnm _bt1c1hrf",
|
|
51
|
+
root: "_vchhusvi _bozgutpp _4t3i1osq _13wnh2mm _1l3vb3bt _juxdstnw _1vinidpf _1719idpf _e6znidpf _1kyhe4h9 _4cwynqa1 _435s1l7x _m7c3idpf",
|
|
52
|
+
fullHeightSidebarExpanded: "_glte93mn _exxmpxbi _4ap3vuon _m7c3kb7n",
|
|
53
|
+
fullHeightSidebarExpandedScrollTimeline: "_5gdsgc9s _53frsjnm _bt1c1hrf",
|
|
57
54
|
fullHeightSidebarBorderTransition: "_n8qabrmi _wc72fnf5 _j3mr1v42",
|
|
58
55
|
fullHeightSidebarExpandedWithFeedback: "_exxmutpp"
|
|
59
56
|
};
|
|
@@ -129,10 +126,6 @@ const TopNavStartInnerFHS = /*#__PURE__*/forwardRef(function TopNavStartInnerFHS
|
|
|
129
126
|
const sideNavState = useContext(SideNavVisibilityState);
|
|
130
127
|
const isFirstRenderRef = useRef(true);
|
|
131
128
|
useEffect(() => {
|
|
132
|
-
if (!fg('platform-dst-side-nav-layering-fixes')) {
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
129
|
// Ignore renders until the side nav state is initialized
|
|
137
130
|
// So that apps using the legacy API for setting side nav default state do not see
|
|
138
131
|
// animations when they shouldn't
|
|
@@ -144,14 +137,14 @@ const TopNavStartInnerFHS = /*#__PURE__*/forwardRef(function TopNavStartInnerFHS
|
|
|
144
137
|
}
|
|
145
138
|
}, [sideNavState]);
|
|
146
139
|
return /*#__PURE__*/React.createElement("div", {
|
|
147
|
-
className: ax([wrapperStyles.root, isExpandedOnDesktop && wrapperStyles.fullHeightSidebarExpanded, isExpandedOnDesktop && fg('platform_dst_nav4_fhs_feedback_1') && wrapperStyles.fullHeightSidebarExpandedWithFeedback,
|
|
140
|
+
className: ax([wrapperStyles.root, isExpandedOnDesktop && wrapperStyles.fullHeightSidebarExpanded, isExpandedOnDesktop && fg('platform_dst_nav4_fhs_feedback_1') && wrapperStyles.fullHeightSidebarExpandedWithFeedback, !isFirstRenderRef.current && isExpandedOnDesktop && wrapperStyles.fullHeightSidebarBorderTransition, isExpandedOnDesktop && !fg('platform_dst_nav4_fhs_feedback_1') && wrapperStyles.fullHeightSidebarExpandedScrollTimeline])
|
|
148
141
|
}, /*#__PURE__*/React.createElement("div", {
|
|
149
142
|
ref: ref,
|
|
150
143
|
"data-testid": testId,
|
|
151
|
-
className: ax([innerStyles.root,
|
|
152
|
-
},
|
|
144
|
+
className: ax([innerStyles.root, isExpandedOnDesktop && innerStyles.fullHeightSidebarExpanded])
|
|
145
|
+
}, /*#__PURE__*/React.createElement(OpenLayerObserverNamespaceProvider, {
|
|
153
146
|
namespace: openLayerObserverTopNavStartNamespace
|
|
154
|
-
}, children)
|
|
147
|
+
}, children)));
|
|
155
148
|
});
|
|
156
149
|
|
|
157
150
|
/**
|
|
@@ -164,6 +157,9 @@ export function TopNavStart({
|
|
|
164
157
|
testId,
|
|
165
158
|
sideNavToggleButton
|
|
166
159
|
}) {
|
|
160
|
+
if (fg('platform_editor_topnavstart_delay_browser_check')) {
|
|
161
|
+
isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
162
|
+
}
|
|
167
163
|
const isFhsEnabled = useIsFhsEnabled();
|
|
168
164
|
const ref = useContext(TopNavStartAttachRef);
|
|
169
165
|
const elementRef = useRef(null);
|
|
@@ -7,7 +7,6 @@
|
|
|
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
8
|
._18postnw:after{position:absolute}
|
|
9
9
|
._1beue4h9:after{border-block-end-width:var(--ds-border-width,1px)}
|
|
10
|
-
._1bsb1osq{width:100%}
|
|
11
10
|
._1cte1l7x:after{border-block-end-color:var(--ds-border,#0b120e24)}
|
|
12
11
|
._1czdidpf:after{inset-inline-end:0}
|
|
13
12
|
._1e0c11p5{display:grid}
|
|
@@ -16,18 +15,15 @@
|
|
|
16
15
|
._1pbyegat{z-index:4}
|
|
17
16
|
._4cvr1h6o{align-items:center}
|
|
18
17
|
._4t3i1dgc{height:var(--n_tNvM)}
|
|
19
|
-
._4t3i1osq{height:100%}
|
|
20
18
|
._aetrb3bt:after{content:""}
|
|
21
|
-
._bfhkglyw{background-color:none}
|
|
22
19
|
._bfhkvuon{background-color:var(--ds-surface,#fff)}
|
|
23
20
|
._d6vu1bgi >span[data-ep-placeholder-id=top_navigation_skeleton]{display:contents}
|
|
24
21
|
._g0nf3tht:after{inset-inline-start:var(--n_sNvlw,0)}
|
|
25
22
|
._kqsw1if8{position:sticky}
|
|
26
23
|
._lcxv1wug{pointer-events:auto}
|
|
27
|
-
._lcxvglyw{pointer-events:none}
|
|
28
24
|
._uaeunqa1:after{border-block-end-style:solid}
|
|
29
25
|
._vchhusvi{box-sizing:border-box}
|
|
30
26
|
._yv0e1mfv{grid-template-columns:auto 1fr auto}
|
|
31
27
|
@media (min-width:48rem){._1j8b18ax{grid-template-columns:1fr minmax(min-content,max-content) 1fr}}
|
|
32
|
-
@media (min-width:64rem){._1rqt16a9{grid-template-columns:0fr minmax(min-content,max-content) 1fr}.
|
|
28
|
+
@media (min-width:64rem){._1rqt16a9{grid-template-columns:0fr minmax(min-content,max-content) 1fr}._pdlmutpp{gap:var(--ds-space-150,9pt)}}
|
|
33
29
|
@media (min-width:110.5rem){._jh1g18ax{grid-template-columns:1fr minmax(min-content,max-content) 1fr}}
|
|
@@ -2,7 +2,7 @@
|
|
|
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
|
|
5
|
+
import { useContext } from 'react';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import { useSkipLink } from '../../../context/skip-links/skip-links-context';
|
|
8
8
|
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
@@ -23,19 +23,8 @@ import { useSideNavVisibility } from '../side-nav/use-side-nav-visibility';
|
|
|
23
23
|
*/
|
|
24
24
|
const styles = {
|
|
25
25
|
root: "_nd5l8cbt _zulpu2gc _18zrutpp _179ria51 _1e0c11p5 _yv0e1mfv _4cvr1h6o _bfhkvuon _vchhusvi _4t3i1dgc _152t1nws _kqsw1if8 _1pbyegat _d6vu1bgi _1j8b18ax",
|
|
26
|
-
fullHeightSidebar: "_18zrze3t _179rglyw
|
|
27
|
-
fullHeightSidebarExpanded: "_1rqt16a9 _jh1g18ax"
|
|
28
|
-
fullHeightSidebarWithLayeringFixes: "_1pby11wp _lcxv1wug _bfhkvuon _aetrb3bt _18postnw _1gufidpf _1czdidpf _g0nf3tht _1beue4h9 _uaeunqa1 _1cte1l7x"
|
|
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
|
-
const backgroundStyles = {
|
|
37
|
-
root: "_nd5l8cbt _179ria51 _1bsb1osq _4t3i1osq _bfhkvuon _vchhusvi _152t1nws _kqsw1if8 _lcxvglyw _1pbyegat",
|
|
38
|
-
sideNavExpanded: "_hyzqcs5v"
|
|
26
|
+
fullHeightSidebar: "_18zrze3t _179rglyw _lcxv1wug _bfhkvuon _1pby11wp _aetrb3bt _18postnw _1gufidpf _1czdidpf _g0nf3tht _1beue4h9 _uaeunqa1 _1cte1l7x _pdlmutpp",
|
|
27
|
+
fullHeightSidebarExpanded: "_1rqt16a9 _jh1g18ax"
|
|
39
28
|
};
|
|
40
29
|
|
|
41
30
|
/**
|
|
@@ -59,59 +48,19 @@ export function TopNav({
|
|
|
59
48
|
const hasIncreasedDefaultHeight = isFhsEnabled && fg('platform_dst_nav4_top_nav_increase_height');
|
|
60
49
|
const height = heightProp !== null && heightProp !== void 0 ? heightProp : hasIncreasedDefaultHeight ? 56 : 48;
|
|
61
50
|
const customTheme = useCustomTheme(UNSAFE_theme);
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Note: this is no longer the case when fg('platform-dst-side-nav-layering-fixes') is enabled.
|
|
65
|
-
*
|
|
66
|
-
* With the full height sidebar we have a foreground and background element,
|
|
67
|
-
* so we need to apply the custom theme styles to the correct element.
|
|
68
|
-
*
|
|
69
|
-
* The foreground element should not have a background color,
|
|
70
|
-
* and the background element doesn't need any of the other styles.
|
|
71
|
-
*/
|
|
72
|
-
const {
|
|
73
|
-
backgroundStyle,
|
|
74
|
-
foregroundStyle
|
|
75
|
-
} = useMemo(() => {
|
|
76
|
-
if (!customTheme.isEnabled) {
|
|
77
|
-
return {
|
|
78
|
-
backgroundStyle: undefined,
|
|
79
|
-
foregroundStyle: undefined
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
const {
|
|
83
|
-
backgroundColor,
|
|
84
|
-
...foregroundStyle
|
|
85
|
-
} = customTheme.style;
|
|
86
|
-
return {
|
|
87
|
-
backgroundStyle: {
|
|
88
|
-
backgroundColor
|
|
89
|
-
},
|
|
90
|
-
foregroundStyle
|
|
91
|
-
};
|
|
92
|
-
}, [customTheme]);
|
|
93
51
|
const {
|
|
94
52
|
isExpandedOnDesktop
|
|
95
53
|
} = useSideNavVisibility();
|
|
96
54
|
return /*#__PURE__*/React.createElement(HasCustomThemeContext.Provider, {
|
|
97
55
|
value: customTheme.isEnabled
|
|
98
|
-
},
|
|
99
|
-
"data-layout-slot": true,
|
|
100
|
-
"aria-hidden": true
|
|
101
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
102
|
-
,
|
|
103
|
-
style: isFhsEnabled ? backgroundStyle : undefined,
|
|
104
|
-
className: ax([backgroundStyles.root, isExpandedOnDesktop && backgroundStyles.sideNavExpanded])
|
|
105
|
-
}), /*#__PURE__*/React.createElement("header", {
|
|
56
|
+
}, /*#__PURE__*/React.createElement("header", {
|
|
106
57
|
id: id,
|
|
107
58
|
"data-layout-slot": true,
|
|
108
|
-
className: ax([styles.root, isFhsEnabled && styles.fullHeightSidebar,
|
|
59
|
+
className: ax([styles.root, isFhsEnabled && styles.fullHeightSidebar, isExpandedOnDesktop && isFhsEnabled && styles.fullHeightSidebarExpanded, xcss]),
|
|
109
60
|
"data-testid": testId
|
|
110
61
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
111
62
|
,
|
|
112
|
-
style:
|
|
113
|
-
// When the layering fixes are enabled, we no longer have separate elements for the foreground and background.
|
|
114
|
-
isFhsEnabled && !fg('platform-dst-side-nav-layering-fixes') ? foregroundStyle : customTheme.isEnabled ? customTheme.style : undefined
|
|
63
|
+
style: customTheme.isEnabled ? customTheme.style : undefined
|
|
115
64
|
}, /*#__PURE__*/React.createElement(HoistCssVarToLocalGrid, {
|
|
116
65
|
variableName: topNavMountedVar,
|
|
117
66
|
value: height
|
|
@@ -3,7 +3,6 @@ import "./banner.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useContext } from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { useSkipLinkInternal } from '../../context/skip-links/skip-links-context';
|
|
8
7
|
import { useIsFhsEnabled } from '../fhs-rollout/use-is-fhs-enabled';
|
|
9
8
|
import { bannerMountedVar, localSlotLayers, UNSAFE_bannerVar } from './constants';
|
|
@@ -12,7 +11,7 @@ import { DangerouslyHoistCssVarToDocumentRoot, HoistCssVarToLocalGrid } from './
|
|
|
12
11
|
import { useLayoutId } from './id-utils';
|
|
13
12
|
var styles = {
|
|
14
13
|
root: "_nd5ldkfm _1reo15vq _18m915vq _4t3iutvi _152tidpf _kqsw1if8 _1pbyegat",
|
|
15
|
-
|
|
14
|
+
fullHeightSidebar: "_1pby11wp"
|
|
16
15
|
};
|
|
17
16
|
|
|
18
17
|
/**
|
|
@@ -46,7 +45,7 @@ export function Banner(_ref) {
|
|
|
46
45
|
return /*#__PURE__*/React.createElement("div", {
|
|
47
46
|
id: id,
|
|
48
47
|
"data-layout-slot": true,
|
|
49
|
-
className: ax([styles.root, isFhsEnabled &&
|
|
48
|
+
className: ax([styles.root, isFhsEnabled && styles.fullHeightSidebar, xcss]),
|
|
50
49
|
"data-testid": testId
|
|
51
50
|
}, /*#__PURE__*/React.createElement(HoistCssVarToLocalGrid, {
|
|
52
51
|
variableName: bannerMountedVar,
|
|
@@ -51,12 +51,12 @@ export var UNSAFE_MAIN_INLINE_END_FOR_LEGACY_PAGES_ONLY = "calc(var(".concat(UNS
|
|
|
51
51
|
*/
|
|
52
52
|
export var localSlotLayers = {
|
|
53
53
|
ribbon: 4,
|
|
54
|
-
// The side nav panel splitter is layered above the top nav when FHS
|
|
54
|
+
// The side nav panel splitter is layered above the top nav when FHS is enabled.
|
|
55
55
|
// It has the same z-index value, but is rendered after the top nav in the DOM so is stacked above.
|
|
56
56
|
sideNavPanelSplitterFHS: 4,
|
|
57
57
|
topBar: 4,
|
|
58
58
|
banner: 4,
|
|
59
|
-
// When FHS
|
|
59
|
+
// When FHS is enabled, the side nav is layered below the top nav,
|
|
60
60
|
// but above the panel
|
|
61
61
|
bannerFHS: 3,
|
|
62
62
|
topNavFHS: 3,
|