@atlaskit/navigation-system 11.2.2 → 11.3.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 +36 -0
- package/dist/cjs/components/skip-links/skip-link.js +2 -2
- package/dist/cjs/components/skip-links/skip-links-container.js +2 -2
- package/dist/cjs/ui/fhs-rollout/is-custom-is-fhs-enabled-context.js +2 -2
- package/dist/cjs/ui/fhs-rollout/is-fhs-enabled-context.js +6 -6
- package/dist/cjs/ui/fhs-rollout/is-fhs-enabled-provider.js +14 -18
- package/dist/cjs/ui/fhs-rollout/use-is-fhs-enabled.js +5 -5
- package/dist/cjs/ui/page-layout/banner.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/banner.js +2 -5
- package/dist/cjs/ui/page-layout/constants.js +1 -13
- package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.js +2 -5
- package/dist/cjs/ui/page-layout/panel-splitter/side-nav-panel-splitter.js +0 -68
- package/dist/cjs/ui/page-layout/ribbon.js +0 -7
- package/dist/cjs/ui/page-layout/side-nav/side-nav-content.js +1 -9
- package/dist/cjs/ui/page-layout/side-nav/side-nav.compiled.css +3 -10
- package/dist/cjs/ui/page-layout/side-nav/side-nav.js +21 -54
- 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 +4 -7
- package/dist/cjs/ui/page-layout/top-nav/top-nav-start.compiled.css +2 -12
- package/dist/cjs/ui/page-layout/top-nav/top-nav-start.js +9 -250
- package/dist/cjs/ui/page-layout/top-nav/top-nav.compiled.css +1 -15
- package/dist/cjs/ui/page-layout/top-nav/top-nav.js +5 -16
- package/dist/cjs/ui/top-nav-items/nav-logo/app-logo.compiled.css +0 -2
- package/dist/cjs/ui/top-nav-items/nav-logo/app-logo.js +13 -16
- package/dist/cjs/ui/top-nav-items/nav-logo/custom-logo.compiled.css +0 -2
- package/dist/cjs/ui/top-nav-items/nav-logo/custom-logo.js +5 -8
- package/dist/cjs/ui/top-nav-items/search.compiled.css +3 -2
- package/dist/cjs/ui/top-nav-items/search.js +9 -11
- package/dist/cjs/ui/top-nav-items/themed/themed-anchor.js +2 -2
- package/dist/cjs/ui/top-nav-items/themed/themed-pressable.js +2 -2
- package/dist/es2019/components/skip-links/skip-link.js +1 -1
- package/dist/es2019/components/skip-links/skip-links-container.js +1 -1
- package/dist/es2019/ui/fhs-rollout/is-custom-is-fhs-enabled-context.js +2 -2
- package/dist/es2019/ui/fhs-rollout/is-fhs-enabled-context.js +6 -4
- package/dist/es2019/ui/fhs-rollout/is-fhs-enabled-provider.js +12 -17
- package/dist/es2019/ui/fhs-rollout/use-is-fhs-enabled.js +5 -8
- package/dist/es2019/ui/page-layout/banner.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/banner.js +2 -5
- package/dist/es2019/ui/page-layout/chat-panel.js +1 -1
- package/dist/es2019/ui/page-layout/constants.js +0 -12
- package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.js +2 -5
- package/dist/es2019/ui/page-layout/panel-splitter/side-nav-panel-splitter.js +2 -61
- package/dist/es2019/ui/page-layout/ribbon.js +0 -7
- package/dist/es2019/ui/page-layout/side-nav/side-nav-content.js +2 -8
- package/dist/es2019/ui/page-layout/side-nav/side-nav.compiled.css +3 -10
- package/dist/es2019/ui/page-layout/side-nav/side-nav.js +5 -44
- 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 +3 -6
- package/dist/es2019/ui/page-layout/top-nav/top-nav-start.compiled.css +2 -12
- package/dist/es2019/ui/page-layout/top-nav/top-nav-start.js +6 -243
- package/dist/es2019/ui/page-layout/top-nav/top-nav.compiled.css +1 -15
- package/dist/es2019/ui/page-layout/top-nav/top-nav.js +5 -18
- package/dist/es2019/ui/top-nav-items/nav-logo/app-logo.compiled.css +0 -2
- package/dist/es2019/ui/top-nav-items/nav-logo/app-logo.js +9 -12
- package/dist/es2019/ui/top-nav-items/nav-logo/custom-logo.compiled.css +0 -2
- package/dist/es2019/ui/top-nav-items/nav-logo/custom-logo.js +4 -7
- package/dist/es2019/ui/top-nav-items/search.compiled.css +3 -2
- package/dist/es2019/ui/top-nav-items/search.js +6 -8
- package/dist/es2019/ui/top-nav-items/themed/themed-anchor.js +1 -1
- package/dist/es2019/ui/top-nav-items/themed/themed-pressable.js +1 -1
- package/dist/esm/components/skip-links/skip-link.js +1 -1
- package/dist/esm/components/skip-links/skip-links-container.js +1 -1
- package/dist/esm/ui/fhs-rollout/is-custom-is-fhs-enabled-context.js +2 -2
- package/dist/esm/ui/fhs-rollout/is-fhs-enabled-context.js +6 -6
- package/dist/esm/ui/fhs-rollout/is-fhs-enabled-provider.js +13 -16
- package/dist/esm/ui/fhs-rollout/use-is-fhs-enabled.js +5 -6
- package/dist/esm/ui/page-layout/banner.compiled.css +0 -1
- package/dist/esm/ui/page-layout/banner.js +2 -5
- package/dist/esm/ui/page-layout/chat-panel.js +1 -1
- package/dist/esm/ui/page-layout/constants.js +0 -12
- package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.compiled.css +0 -1
- package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.js +2 -5
- package/dist/esm/ui/page-layout/panel-splitter/side-nav-panel-splitter.js +2 -71
- package/dist/esm/ui/page-layout/ribbon.js +0 -7
- package/dist/esm/ui/page-layout/side-nav/side-nav-content.js +2 -10
- package/dist/esm/ui/page-layout/side-nav/side-nav.compiled.css +3 -10
- package/dist/esm/ui/page-layout/side-nav/side-nav.js +22 -55
- 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 +3 -6
- package/dist/esm/ui/page-layout/top-nav/top-nav-start.compiled.css +2 -12
- package/dist/esm/ui/page-layout/top-nav/top-nav-start.js +10 -250
- package/dist/esm/ui/page-layout/top-nav/top-nav.compiled.css +1 -15
- package/dist/esm/ui/page-layout/top-nav/top-nav.js +5 -16
- package/dist/esm/ui/top-nav-items/nav-logo/app-logo.compiled.css +0 -2
- package/dist/esm/ui/top-nav-items/nav-logo/app-logo.js +9 -12
- package/dist/esm/ui/top-nav-items/nav-logo/custom-logo.compiled.css +0 -2
- package/dist/esm/ui/top-nav-items/nav-logo/custom-logo.js +4 -7
- package/dist/esm/ui/top-nav-items/search.compiled.css +3 -2
- package/dist/esm/ui/top-nav-items/search.js +6 -8
- package/dist/esm/ui/top-nav-items/themed/themed-anchor.js +1 -1
- package/dist/esm/ui/top-nav-items/themed/themed-pressable.js +1 -1
- package/dist/types/ui/fhs-rollout/is-custom-is-fhs-enabled-context.d.ts +2 -2
- package/dist/types/ui/fhs-rollout/is-fhs-enabled-context.d.ts +5 -2
- package/dist/types/ui/fhs-rollout/is-fhs-enabled-provider.d.ts +9 -2
- package/dist/types/ui/fhs-rollout/use-is-fhs-enabled.d.ts +4 -1
- package/dist/types/ui/page-layout/constants.d.ts +0 -4
- package/dist/types/ui/page-layout/dangerously-hoist-css-var-to-document-root.d.ts +1 -1
- package/dist/types/ui/page-layout/panel-splitter/get-width-from-drag-location.d.ts +1 -1
- package/dist/types/ui/page-layout/panel-splitter/panel-splitter.d.ts +0 -2
- package/dist/types/ui/page-layout/side-nav/side-nav.d.ts +0 -1
- package/dist/types/ui/top-nav-items/themed/themed-anchor.d.ts +1 -1
- package/dist/types/ui/top-nav-items/themed/themed-button.d.ts +1 -1
- package/dist/types/ui/top-nav-items/themed/themed-icon-button.d.ts +1 -1
- package/dist/types/ui/top-nav-items/themed/themed-link-button.d.ts +1 -1
- package/dist/types/ui/top-nav-items/themed/themed-link-icon-button.d.ts +1 -1
- package/dist/types/ui/top-nav-items/themed/themed-pressable.d.ts +1 -1
- package/package.json +8 -10
|
@@ -1,28 +1,14 @@
|
|
|
1
1
|
._nd5l8cbt{grid-area:top-bar}
|
|
2
2
|
._zulpu2gc{gap:var(--ds-space-100,8px)}
|
|
3
3
|
._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
|
|
4
|
-
._18zrze3t{padding-inline:var(--ds-space-0,0)}
|
|
5
|
-
._179rglyw{border-block-end:none}
|
|
6
4
|
._179ria51{border-block-end:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}._152t1nws{inset-block-start:var(--n_bnrM,0)}
|
|
7
|
-
._18postnw:after{position:absolute}
|
|
8
|
-
._1beue4h9:after{border-block-end-width:var(--ds-border-width,1px)}
|
|
9
|
-
._1cte1l7x:after{border-block-end-color:var(--ds-border,#0b120e24)}
|
|
10
|
-
._1czdidpf:after{inset-inline-end:0}
|
|
11
5
|
._1e0c11p5{display:grid}
|
|
12
|
-
._1gufidpf:after{inset-block-end:0}
|
|
13
|
-
._1pby11wp{z-index:3}
|
|
14
6
|
._1pbyegat{z-index:4}
|
|
15
7
|
._4cvr1h6o{align-items:center}
|
|
16
8
|
._4t3i1dgc{height:var(--n_tNvM)}
|
|
17
|
-
._aetrb3bt:after{content:""}
|
|
18
9
|
._bfhkvuon{background-color:var(--ds-surface,#fff)}
|
|
19
10
|
._d6vu1bgi >span[data-ep-placeholder-id=top_navigation_skeleton]{display:contents}
|
|
20
|
-
._g0nf3tht:after{inset-inline-start:var(--n_sNvlw,0)}
|
|
21
11
|
._kqsw1if8{position:sticky}
|
|
22
|
-
._lcxv1wug{pointer-events:auto}
|
|
23
|
-
._uaeunqa1:after{border-block-end-style:solid}
|
|
24
12
|
._vchhusvi{box-sizing:border-box}
|
|
25
13
|
._yv0e1mfv{grid-template-columns:auto 1fr auto}
|
|
26
|
-
@media (min-width:48rem){._1j8b18ax{grid-template-columns:1fr minmax(min-content,max-content) 1fr}}
|
|
27
|
-
@media (min-width:64rem){._1m5lglyw:after{display:none}._1rqt16a9{grid-template-columns:0fr minmax(min-content,max-content) 1fr}._pdlmutpp{gap:var(--ds-space-150,9pt)}}
|
|
28
|
-
@media (min-width:110.5rem){._jh1g18ax{grid-template-columns:1fr minmax(min-content,max-content) 1fr}}
|
|
14
|
+
@media (min-width:48rem){._1j8b18ax{grid-template-columns:1fr minmax(min-content,max-content) 1fr}}
|
|
@@ -6,7 +6,6 @@ import { useContext } from 'react';
|
|
|
6
6
|
import { componentWithFG } from '@atlaskit/platform-feature-flags-react/component-with-fg';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
8
|
import { useSkipLinkInternal } from '../../../context/skip-links/use-skip-link-internal';
|
|
9
|
-
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
10
9
|
import { HasCustomThemeContext } from '../../top-nav-items/themed/has-custom-theme-context';
|
|
11
10
|
import { HasDefaultBackgroundColorContext } from '../../top-nav-items/themed/has-default-background-color-context';
|
|
12
11
|
import { useCustomTheme } from '../../top-nav-items/themed/use-custom-theme';
|
|
@@ -15,7 +14,6 @@ import { UNSAFE_topNavVar, topNavMountedVar } from '../constants';
|
|
|
15
14
|
import { DangerouslyHoistCssVarToDocumentRoot } from '../dangerously-hoist-css-var-to-document-root';
|
|
16
15
|
import { HoistCssVarToLocalGrid } from '../hoist-css-var-to-local-grid';
|
|
17
16
|
import { DangerouslyHoistSlotSizes } from '../hoist-slot-sizes-context';
|
|
18
|
-
import { useSideNavVisibility } from '../side-nav/use-side-nav-visibility';
|
|
19
17
|
import { useLayoutId } from '../use-layout-id';
|
|
20
18
|
|
|
21
19
|
/**
|
|
@@ -27,10 +25,7 @@ import { useLayoutId } from '../use-layout-id';
|
|
|
27
25
|
* - The background sits below the expanded side nav
|
|
28
26
|
*/
|
|
29
27
|
const styles = {
|
|
30
|
-
root: "_nd5l8cbt _zulpu2gc _18zrutpp _179ria51 _1e0c11p5 _yv0e1mfv _4cvr1h6o _bfhkvuon _vchhusvi _4t3i1dgc _152t1nws _kqsw1if8 _1pbyegat _d6vu1bgi _1j8b18ax"
|
|
31
|
-
fullHeightSidebar: "_18zrze3t _179rglyw _lcxv1wug _bfhkvuon _1pby11wp _aetrb3bt _18postnw _1gufidpf _1czdidpf _g0nf3tht _1beue4h9 _uaeunqa1 _1cte1l7x _pdlmutpp",
|
|
32
|
-
fullHeightSidebarExpanded: "_1rqt16a9 _jh1g18ax",
|
|
33
|
-
fullHeightSidebarCustomTheming: "_1m5lglyw"
|
|
28
|
+
root: "_nd5l8cbt _zulpu2gc _18zrutpp _179ria51 _1e0c11p5 _yv0e1mfv _4cvr1h6o _bfhkvuon _vchhusvi _4t3i1dgc _152t1nws _kqsw1if8 _1pbyegat _d6vu1bgi _1j8b18ax"
|
|
34
29
|
};
|
|
35
30
|
/**
|
|
36
31
|
* The top nav layout area. It will display at the top of the screen, below the banner if one is present.
|
|
@@ -44,7 +39,6 @@ function TopNavOld({
|
|
|
44
39
|
id: providedId,
|
|
45
40
|
customTheme: customThemeConfig
|
|
46
41
|
}) {
|
|
47
|
-
const isFhsEnabled = useIsFhsEnabled();
|
|
48
42
|
const dangerouslyHoistSlotSizes = useContext(DangerouslyHoistSlotSizes);
|
|
49
43
|
const id = useLayoutId({
|
|
50
44
|
providedId
|
|
@@ -54,17 +48,14 @@ function TopNavOld({
|
|
|
54
48
|
label: skipLinkLabel,
|
|
55
49
|
isHidden: fg('platform_dst_nav4_skip_link_a11y_1')
|
|
56
50
|
});
|
|
57
|
-
const height = heightProp !== null && heightProp !== void 0 ? heightProp :
|
|
51
|
+
const height = heightProp !== null && heightProp !== void 0 ? heightProp : fg('platform_dst_ads_appswitcher_improvements') ? 56 : 48;
|
|
58
52
|
const customTheme = useCustomTheme(customThemeConfig);
|
|
59
|
-
const {
|
|
60
|
-
isExpandedOnDesktop
|
|
61
|
-
} = useSideNavVisibility();
|
|
62
53
|
return /*#__PURE__*/React.createElement(HasCustomThemeContext.Provider, {
|
|
63
54
|
value: customTheme.isEnabled
|
|
64
55
|
}, /*#__PURE__*/React.createElement("header", {
|
|
65
56
|
id: id,
|
|
66
57
|
"data-layout-slot": true,
|
|
67
|
-
className: ax([styles.root,
|
|
58
|
+
className: ax([styles.root, xcss]),
|
|
68
59
|
"data-testid": testId
|
|
69
60
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
70
61
|
,
|
|
@@ -97,7 +88,6 @@ function TopNavNew({
|
|
|
97
88
|
id: providedId,
|
|
98
89
|
customTheme: customThemeConfig
|
|
99
90
|
}) {
|
|
100
|
-
const isFhsEnabled = useIsFhsEnabled();
|
|
101
91
|
const dangerouslyHoistSlotSizes = useContext(DangerouslyHoistSlotSizes);
|
|
102
92
|
const id = useLayoutId({
|
|
103
93
|
providedId
|
|
@@ -107,12 +97,9 @@ function TopNavNew({
|
|
|
107
97
|
label: skipLinkLabel,
|
|
108
98
|
isHidden: fg('platform_dst_nav4_skip_link_a11y_1')
|
|
109
99
|
});
|
|
110
|
-
const height = heightProp !== null && heightProp !== void 0 ? heightProp :
|
|
100
|
+
const height = heightProp !== null && heightProp !== void 0 ? heightProp : fg('platform_dst_ads_appswitcher_improvements') ? 56 : 48;
|
|
111
101
|
const customTheme = useCustomThemeNew(customThemeConfig);
|
|
112
102
|
const hasDefaultBackground = customTheme.isEnabled ? customTheme.hasDefaultBackground : true;
|
|
113
|
-
const {
|
|
114
|
-
isExpandedOnDesktop
|
|
115
|
-
} = useSideNavVisibility();
|
|
116
103
|
return /*#__PURE__*/React.createElement(HasCustomThemeContext.Provider, {
|
|
117
104
|
value: customTheme.isEnabled
|
|
118
105
|
}, /*#__PURE__*/React.createElement(HasDefaultBackgroundColorContext.Provider, {
|
|
@@ -120,7 +107,7 @@ function TopNavNew({
|
|
|
120
107
|
}, /*#__PURE__*/React.createElement("header", {
|
|
121
108
|
id: id,
|
|
122
109
|
"data-layout-slot": true,
|
|
123
|
-
className: ax([styles.root,
|
|
110
|
+
className: ax([styles.root, xcss]),
|
|
124
111
|
"data-testid": testId
|
|
125
112
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
126
113
|
,
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
._1e0c1txw{display:flex}
|
|
6
6
|
._1e0cglyw{display:none}
|
|
7
7
|
._1o9zidpf{flex-shrink:0}
|
|
8
|
-
._1o9zkb7n{flex-shrink:1}
|
|
9
8
|
._1pfh1i6y{margin-block-start:var(--ds-space-negative-025,-2px)}
|
|
10
9
|
._1reo15vq{overflow-x:hidden}
|
|
11
10
|
._1toh1r31._1toh1r31{text-decoration-color:currentColor}
|
|
@@ -17,7 +16,6 @@
|
|
|
17
16
|
._ahbq1b66{margin-inline-start:var(--ds-space-050,4px)}
|
|
18
17
|
._c71l1tcg{max-height:24px}
|
|
19
18
|
._mrqmnqa1._mrqmnqa1{text-decoration-style:solid}
|
|
20
|
-
._p12f1osq{max-width:100%}
|
|
21
19
|
._p12f1tcg{max-width:24px}
|
|
22
20
|
._p12fnklw{max-width:20pc}
|
|
23
21
|
._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
|
|
@@ -4,24 +4,22 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useCallback, useRef } from 'react';
|
|
5
5
|
import { cx } from '@compiled/react';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
|
-
import { Anchor
|
|
7
|
+
import { Anchor } from '@atlaskit/primitives/compiled/anchor';
|
|
8
|
+
import { Inline } from '@atlaskit/primitives/compiled/inline';
|
|
9
|
+
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
8
10
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
9
|
-
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
10
11
|
import { useHasCustomTheme } from '../themed/has-custom-theme-context';
|
|
11
12
|
import { LogoRenderer } from './logo-renderer';
|
|
12
13
|
const anchorStyles = {
|
|
13
14
|
root: "_2rko1mok _1e0c1txw _4cvr1h6o _4t3izwfg _1o9zidpf _ahbq1b66 _1toh1r31 _5jyqglyw _mrqmnqa1 _1w901kw7",
|
|
14
15
|
interactionStates: "_irr31dpa _1di69yc7",
|
|
15
|
-
interactionStatesCustomTheming: "_irr31rps _1di6yhlj"
|
|
16
|
-
fullHeightSidebar: "_1reo15vq _18m915vq _1o9zkb7n"
|
|
16
|
+
interactionStatesCustomTheming: "_irr31rps _1di6yhlj"
|
|
17
17
|
};
|
|
18
18
|
const logoWrapperStyles = {
|
|
19
|
-
root: "_18zr1b66"
|
|
20
|
-
fullHeightSidebar: "_p12f1osq"
|
|
19
|
+
root: "_18zr1b66"
|
|
21
20
|
};
|
|
22
21
|
const iconContainerStyles = {
|
|
23
|
-
root: "_1reo15vq _18m915vq _1e0c1txw _p12f1tcg _c71l1tcg"
|
|
24
|
-
fullHeightSidebar: "_1o9zidpf"
|
|
22
|
+
root: "_1reo15vq _18m915vq _1e0c1txw _p12f1tcg _c71l1tcg"
|
|
25
23
|
};
|
|
26
24
|
const logoTextStyles = {
|
|
27
25
|
root: "_1bsb1ris _p12fnklw _uiztglyw _y4tiv77o _1e0cglyw _2lx21bp4 _1bah1h6o _10y41txw"
|
|
@@ -49,7 +47,6 @@ export const AppLogo = ({
|
|
|
49
47
|
icon,
|
|
50
48
|
onClick
|
|
51
49
|
}) => {
|
|
52
|
-
const isFhsEnabled = useIsFhsEnabled();
|
|
53
50
|
const ref = useRef(null);
|
|
54
51
|
const nameRef = useRef(null);
|
|
55
52
|
const hasCustomTheme = useHasCustomTheme();
|
|
@@ -69,14 +66,14 @@ export const AppLogo = ({
|
|
|
69
66
|
// @ts-expect-error - non-standard values for `borderRadius` and the custom theming interaction states
|
|
70
67
|
// eslint-disable-next-line @compiled/no-suppress-xcss
|
|
71
68
|
,
|
|
72
|
-
xcss: cx(anchorStyles.root, hasCustomTheme ? anchorStyles.interactionStatesCustomTheming : anchorStyles.interactionStates
|
|
69
|
+
xcss: cx(anchorStyles.root, hasCustomTheme ? anchorStyles.interactionStatesCustomTheming : anchorStyles.interactionStates),
|
|
73
70
|
onClick: onClick
|
|
74
71
|
}, /*#__PURE__*/React.createElement(Inline, {
|
|
75
72
|
space: "space.075",
|
|
76
73
|
alignBlock: "center",
|
|
77
|
-
xcss:
|
|
74
|
+
xcss: logoWrapperStyles.root
|
|
78
75
|
}, /*#__PURE__*/React.createElement("div", {
|
|
79
|
-
className: ax([iconContainerStyles.root
|
|
76
|
+
className: ax([iconContainerStyles.root])
|
|
80
77
|
}, /*#__PURE__*/React.createElement(LogoRenderer, {
|
|
81
78
|
logoOrIcon: icon
|
|
82
79
|
})), /*#__PURE__*/React.createElement("span", {
|
|
@@ -5,12 +5,10 @@
|
|
|
5
5
|
._1e0cglyw{display:none}
|
|
6
6
|
._1jpx1f51 img{object-fit:contain}
|
|
7
7
|
._1reo15vq{overflow-x:hidden}
|
|
8
|
-
._1ul91tcg{min-width:24px}
|
|
9
8
|
._4cvr1h6o{align-items:center}
|
|
10
9
|
._4t3izwfg{height:2pc}
|
|
11
10
|
._ahbq1b66{margin-inline-start:var(--ds-space-050,4px)}
|
|
12
11
|
._bna71tcg img{height:24px}
|
|
13
|
-
._p12f1osq{max-width:100%}
|
|
14
12
|
._p12f1tcg{max-width:24px}
|
|
15
13
|
._p12fnklw{max-width:20pc}
|
|
16
14
|
._rtys1kw7 img{max-width:inherit}
|
|
@@ -3,8 +3,7 @@ import "./custom-logo.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useEffect, useRef } from 'react';
|
|
5
5
|
import { cx } from '@compiled/react';
|
|
6
|
-
import { Anchor } from '@atlaskit/primitives/compiled';
|
|
7
|
-
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
6
|
+
import { Anchor } from '@atlaskit/primitives/compiled/anchor';
|
|
8
7
|
import { useHasCustomTheme } from '../themed/has-custom-theme-context';
|
|
9
8
|
import { LogoRenderer } from './logo-renderer';
|
|
10
9
|
const anchorStyles = {
|
|
@@ -15,8 +14,7 @@ const anchorStyles = {
|
|
|
15
14
|
newInteractionStatesCustomTheming: "_irr31rps _1di6yhlj"
|
|
16
15
|
};
|
|
17
16
|
const sharedIconOrLogoContainerStyles = {
|
|
18
|
-
root: "_1reo15vq _18m915vq _18zr1b66 _bna71tcg _rtys1kw7 _1jpx1f51"
|
|
19
|
-
withFullHeightSidebar: "_p12f1osq _1ul91tcg"
|
|
17
|
+
root: "_1reo15vq _18m915vq _18zr1b66 _bna71tcg _rtys1kw7 _1jpx1f51"
|
|
20
18
|
};
|
|
21
19
|
const iconContainerStyles = {
|
|
22
20
|
root: "_1e0c1txw _p12f1tcg _vchh1ntv _10y4glyw"
|
|
@@ -72,7 +70,6 @@ export const CustomLogo = ({
|
|
|
72
70
|
}
|
|
73
71
|
}, []);
|
|
74
72
|
const hasCustomTheme = useHasCustomTheme();
|
|
75
|
-
const isFhsEnabled = useIsFhsEnabled();
|
|
76
73
|
return /*#__PURE__*/React.createElement(Anchor, {
|
|
77
74
|
ref: ref,
|
|
78
75
|
"aria-label": label,
|
|
@@ -83,11 +80,11 @@ export const CustomLogo = ({
|
|
|
83
80
|
xcss: cx(anchorStyles.root, anchorStyles.customLogoBorderRadius, anchorStyles.newMargin, hasCustomTheme ? anchorStyles.newInteractionStatesCustomTheming : anchorStyles.newInteractionStates),
|
|
84
81
|
onClick: onClick
|
|
85
82
|
}, /*#__PURE__*/React.createElement("div", {
|
|
86
|
-
className: ax([sharedIconOrLogoContainerStyles.root, iconContainerStyles.root
|
|
83
|
+
className: ax([sharedIconOrLogoContainerStyles.root, iconContainerStyles.root])
|
|
87
84
|
}, /*#__PURE__*/React.createElement(LogoRenderer, {
|
|
88
85
|
logoOrIcon: icon
|
|
89
86
|
})), /*#__PURE__*/React.createElement("div", {
|
|
90
|
-
className: ax([sharedIconOrLogoContainerStyles.root, logoContainerStyles.root
|
|
87
|
+
className: ax([sharedIconOrLogoContainerStyles.root, logoContainerStyles.root])
|
|
91
88
|
}, /*#__PURE__*/React.createElement(LogoRenderer, {
|
|
92
89
|
logoOrIcon: logo
|
|
93
90
|
})));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
1
|
+
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
2
|
+
._v564k6bl{transition:var(--ds-button-hovered,background-color border-color .15s cubic-bezier(.4,1,.6,1))}._18zr12x7{padding-inline:var(--ds-space-075,6px)}
|
|
2
3
|
._1ii7kb7n{grid-row:1}
|
|
3
4
|
._1rjcze3t{padding-block:var(--ds-space-0,0)}
|
|
4
5
|
._yyhy11wp{grid-column:3}
|
|
@@ -12,9 +13,9 @@
|
|
|
12
13
|
._80om1kdv{cursor:text}
|
|
13
14
|
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
14
15
|
._p12f1kvu{max-width:680px}
|
|
15
|
-
._p12fktbq{max-width:780px}
|
|
16
16
|
._vchhusvi{box-sizing:border-box}
|
|
17
17
|
._yv0e1mfv{grid-template-columns:auto 1fr auto}
|
|
18
18
|
._irr3l4ek:hover{background-color:var(--ds-background-input-hovered,#f8f8f8)}
|
|
19
|
+
._1ggl5xtf:active{transition:var(--ds-button-pressed,background-color border-color .15s cubic-bezier(.4,1,.6,1))}
|
|
19
20
|
._1di6r01l:active{background-color:var(--ds-background-input-pressed,#fff)}
|
|
20
21
|
@media (min-width:30rem){._114b11p5{display:grid}}
|
|
@@ -2,18 +2,17 @@
|
|
|
2
2
|
import "./search.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { Fragment } from 'react';
|
|
5
|
-
import { cx } from '@atlaskit/css';
|
|
6
5
|
import SearchIcon from '@atlaskit/icon/core/search';
|
|
7
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
|
-
import { Pressable
|
|
9
|
-
import {
|
|
7
|
+
import { Pressable } from '@atlaskit/primitives/compiled/pressable';
|
|
8
|
+
import { Show } from '@atlaskit/primitives/compiled/show';
|
|
9
|
+
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
10
10
|
import { IconButton } from './themed/icon-button';
|
|
11
11
|
const styles = {
|
|
12
|
-
root: "_2rko1qi0 _1rjcze3t _18zr12x7 _yv0e1mfv _4cvr1h6o _bfhk1j9a _vchhusvi _80om1kdv _1e0cglyw _4t3izwfg _p12f1kvu _1bsb1osq _irr3l4ek _1di6r01l _114b11p5",
|
|
12
|
+
root: "_2rko1qi0 _v564k6bl _1rjcze3t _18zr12x7 _yv0e1mfv _4cvr1h6o _bfhk1j9a _vchhusvi _80om1kdv _1e0cglyw _4t3izwfg _p12f1kvu _1bsb1osq _irr3l4ek _1ggl5xtf _1di6r01l _114b11p5",
|
|
13
13
|
buttonText: "_yyhyjvu9 _1ii7kb7n",
|
|
14
14
|
iconBefore: "_yyhykb7n _1ii7kb7n _1e0c1txw",
|
|
15
|
-
elemAfter: "_yyhy11wp _1ii7kb7n _1e0c1txw"
|
|
16
|
-
fullHeightSidebar: "_p12fktbq"
|
|
15
|
+
elemAfter: "_yyhy11wp _1ii7kb7n _1e0c1txw"
|
|
17
16
|
};
|
|
18
17
|
/**
|
|
19
18
|
* __Search__
|
|
@@ -28,7 +27,6 @@ export const Search = ({
|
|
|
28
27
|
interactionName,
|
|
29
28
|
'aria-haspopup': ariaHaspopup
|
|
30
29
|
}) => {
|
|
31
|
-
const isFhsEnabled = useIsFhsEnabled();
|
|
32
30
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Pressable, {
|
|
33
31
|
style: {
|
|
34
32
|
// To win the specificity war against Emotion we move this into inline styles
|
|
@@ -38,7 +36,7 @@ export const Search = ({
|
|
|
38
36
|
border: `${"var(--ds-border-width, 1px)"} solid ${fg('platform-dst-tokens-finesse') ? "var(--ds-border-input-search, #0B120E24)" : "var(--ds-border-input, #8C8F97)"}`
|
|
39
37
|
},
|
|
40
38
|
onClick: onClick,
|
|
41
|
-
xcss:
|
|
39
|
+
xcss: styles.root,
|
|
42
40
|
interactionName: interactionName,
|
|
43
41
|
"aria-haspopup": ariaHaspopup
|
|
44
42
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -5,7 +5,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { cx } from '@compiled/react';
|
|
7
7
|
import forwardRefWithGeneric from '@atlaskit/ds-lib/forward-ref-with-generic';
|
|
8
|
-
import { Anchor } from '@atlaskit/primitives/compiled';
|
|
8
|
+
import { Anchor } from '@atlaskit/primitives/compiled/anchor';
|
|
9
9
|
import { getPrimitiveSpreadProps } from './get-primitives-spread-props';
|
|
10
10
|
const styles = {
|
|
11
11
|
root: "_zulp12x7 _11c8fhey _2rko1qi0 _v564k6bl _4bfu1r31 _1hmsglyw _ajmmnqa1 _1rjcze3t _1e0c1txw _4cvr1h6o _1bah1h6o _4t3i5r7u _kqswh2mm _1nrm1r31 _1a3b1r31 _9oik1r31 _c2waglyw _4fprglyw _1bnxglyw _1iohnqa1 _5goinqa1 _jf4cnqa1 _1ggl5xtf",
|
|
@@ -4,7 +4,7 @@ import "./themed-pressable.compiled.css";
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { forwardRef } from 'react';
|
|
6
6
|
import { cx } from '@compiled/react';
|
|
7
|
-
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
7
|
+
import { Pressable } from '@atlaskit/primitives/compiled/pressable';
|
|
8
8
|
import { getPrimitiveSpreadProps } from './get-primitives-spread-props';
|
|
9
9
|
const styles = {
|
|
10
10
|
root: "_zulp12x7 _11c8fhey _2rko1qi0 _v564k6bl _4bfu1r31 _1hmsglyw _ajmmnqa1 _1rjcze3t _1e0c1txw _4cvr1h6o _1bah1h6o _4t3i5r7u _kqswh2mm _1nrm1r31 _1a3b1r31 _9oik1r31 _c2waglyw _4fprglyw _1bnxglyw _1iohnqa1 _5goinqa1 _jf4cnqa1 _1ggl5xtf",
|
|
@@ -3,7 +3,7 @@ import "./skip-link.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
|
-
import { Anchor } from '@atlaskit/primitives/compiled';
|
|
6
|
+
import { Anchor } from '@atlaskit/primitives/compiled/anchor';
|
|
7
7
|
import { focusElement } from './focus-element';
|
|
8
8
|
var styles = {
|
|
9
9
|
skipLinkListItem: "_1pfhze3t",
|
|
@@ -8,7 +8,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
8
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; }
|
|
9
9
|
import { useMemo } from 'react';
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
|
-
import { Text } from '@atlaskit/primitives/compiled';
|
|
11
|
+
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
12
12
|
import { SkipLink } from './skip-link';
|
|
13
13
|
import { SkipLinksPopup } from './skip-links-popup';
|
|
14
14
|
var styles = {
|
|
@@ -3,7 +3,7 @@ import { createContext } from 'react';
|
|
|
3
3
|
/**
|
|
4
4
|
* __Is custom is fhs enabled context__
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* @deprecated Full height sidebar (FHS) has been rolled back. This context is no longer used and
|
|
7
|
+
* will be deleted in a future major release.
|
|
8
8
|
*/
|
|
9
9
|
export var IsCustomIsFhsEnabledContext = /*#__PURE__*/createContext(false);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createContext } from 'react';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
3
2
|
/**
|
|
4
3
|
* __Is fhs enabled context__
|
|
5
4
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* @deprecated Full height sidebar (FHS) has been rolled back and this context is no longer read by
|
|
6
|
+
* any platform component. Its value is ignored. Remove usages of it; it will be deleted in a future
|
|
7
|
+
* major release.
|
|
8
|
+
*
|
|
9
|
+
* See https://hello.atlassian.net/wiki/spaces/navx/pages/7189669176/Full+Height+Sidebar+FHS+Rollback+Plan
|
|
8
10
|
*/
|
|
9
|
-
export var IsFhsEnabledContext = /*#__PURE__*/createContext(
|
|
10
|
-
return fg('navx-full-height-sidebar');
|
|
11
|
-
});
|
|
11
|
+
export var IsFhsEnabledContext = /*#__PURE__*/createContext(false);
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { IsCustomIsFhsEnabledContext } from './is-custom-is-fhs-enabled-context';
|
|
3
|
-
import { IsFhsEnabledContext } from './is-fhs-enabled-context';
|
|
1
|
+
import React from 'react';
|
|
4
2
|
|
|
5
3
|
/**
|
|
6
4
|
* __Is fhs enabled provider__
|
|
7
5
|
*
|
|
8
|
-
*
|
|
6
|
+
* @deprecated Full height sidebar (FHS) has been rolled back. This provider is now a passthrough:
|
|
7
|
+
* it renders its children and ignores `value`. Remove it from your app; it will be deleted in a
|
|
8
|
+
* future major release.
|
|
9
|
+
*
|
|
10
|
+
* See https://hello.atlassian.net/wiki/spaces/navx/pages/7189669176/Full+Height+Sidebar+FHS+Rollback+Plan
|
|
9
11
|
*/
|
|
10
12
|
export var IsFhsEnabledProvider = function IsFhsEnabledProvider(_ref) {
|
|
11
|
-
var children = _ref.children
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
value: true
|
|
19
|
-
}, /*#__PURE__*/React.createElement(IsFhsEnabledContext.Provider, {
|
|
20
|
-
value: value
|
|
21
|
-
}, children));
|
|
22
|
-
};
|
|
13
|
+
var children = _ref.children;
|
|
14
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Full height sidebar (FHS) has been rolled back. `value` is ignored.
|
|
19
|
+
*/
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { useContext } from 'react';
|
|
2
|
-
import { IsFhsEnabledContext } from './is-fhs-enabled-context';
|
|
3
|
-
|
|
4
1
|
/**
|
|
5
2
|
* __Use is fhs enabled__
|
|
6
3
|
*
|
|
7
|
-
*
|
|
4
|
+
* @deprecated Full height sidebar (FHS) has been rolled back. This hook always returns `false`.
|
|
5
|
+
* Remove usages of it (treat it as `false`); it will be deleted in a future major release.
|
|
6
|
+
*
|
|
7
|
+
* See https://hello.atlassian.net/wiki/spaces/navx/pages/7189669176/Full+Height+Sidebar+FHS+Rollback+Plan
|
|
8
8
|
*/
|
|
9
9
|
export var useIsFhsEnabled = function useIsFhsEnabled() {
|
|
10
|
-
|
|
11
|
-
return typeof isFhsEnabled === 'boolean' ? isFhsEnabled : isFhsEnabled();
|
|
10
|
+
return false;
|
|
12
11
|
};
|
|
@@ -5,15 +5,13 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import { useContext } from 'react';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
7
|
import { useSkipLinkInternal } from '../../context/skip-links/use-skip-link-internal';
|
|
8
|
-
import { useIsFhsEnabled } from '../fhs-rollout/use-is-fhs-enabled';
|
|
9
8
|
import { bannerMountedVar, UNSAFE_bannerVar } from './constants';
|
|
10
9
|
import { DangerouslyHoistCssVarToDocumentRoot } from './dangerously-hoist-css-var-to-document-root';
|
|
11
10
|
import { HoistCssVarToLocalGrid } from './hoist-css-var-to-local-grid';
|
|
12
11
|
import { DangerouslyHoistSlotSizes } from './hoist-slot-sizes-context';
|
|
13
12
|
import { useLayoutId } from './use-layout-id';
|
|
14
13
|
var styles = {
|
|
15
|
-
root: "_nd5ldkfm _1reo15vq _18m915vq _4t3iutvi _152tidpf _kqsw1if8 _1pbyegat"
|
|
16
|
-
fullHeightSidebar: "_1pby11wp"
|
|
14
|
+
root: "_nd5ldkfm _1reo15vq _18m915vq _4t3iutvi _152tidpf _kqsw1if8 _1pbyegat"
|
|
17
15
|
};
|
|
18
16
|
|
|
19
17
|
/**
|
|
@@ -34,7 +32,6 @@ export function Banner(_ref) {
|
|
|
34
32
|
var id = useLayoutId({
|
|
35
33
|
providedId: providedId
|
|
36
34
|
});
|
|
37
|
-
var isFhsEnabled = useIsFhsEnabled();
|
|
38
35
|
|
|
39
36
|
/**
|
|
40
37
|
* Don't show the skip link if the slot has 0 height.
|
|
@@ -49,7 +46,7 @@ export function Banner(_ref) {
|
|
|
49
46
|
return /*#__PURE__*/React.createElement("div", {
|
|
50
47
|
id: id,
|
|
51
48
|
"data-layout-slot": true,
|
|
52
|
-
className: ax([styles.root,
|
|
49
|
+
className: ax([styles.root, xcss]),
|
|
53
50
|
"data-testid": testId
|
|
54
51
|
}, /*#__PURE__*/React.createElement(HoistCssVarToLocalGrid, {
|
|
55
52
|
variableName: bannerMountedVar,
|
|
@@ -8,7 +8,7 @@ import { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
8
8
|
import { bind } from 'bind-event-listener';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
10
|
import { useSkipLinkInternal } from '../../context/skip-links/use-skip-link-internal';
|
|
11
|
-
import { chatPanelLiveWidthVar, chatPanelVar,
|
|
11
|
+
import { chatPanelLiveWidthVar, chatPanelVar, mainMinimumWidthVar } from './constants';
|
|
12
12
|
import { convertResizeBoundToPixels } from './panel-splitter/convert-resize-bound-to-pixels';
|
|
13
13
|
import { PanelSplitterProvider } from './panel-splitter/provider';
|
|
14
14
|
import { resolveLayoutWidth } from './resolve-layout-width';
|
|
@@ -59,23 +59,11 @@ export var localSlotLayers = {
|
|
|
59
59
|
// Chat overlays the app, including TopNav and SideNav, below the banner.
|
|
60
60
|
chatPanelOverlay: 5,
|
|
61
61
|
ribbon: 4,
|
|
62
|
-
// The side nav panel splitter is layered above the top nav when FHS is enabled.
|
|
63
|
-
// It has the same z-index value, but is rendered after the top nav in the DOM so is stacked above.
|
|
64
|
-
sideNavPanelSplitterFHS: 4,
|
|
65
62
|
topBar: 4,
|
|
66
63
|
banner: 4,
|
|
67
|
-
// When FHS is enabled, the side nav is layered below the top nav,
|
|
68
|
-
// but above the panel
|
|
69
|
-
bannerFHS: 3,
|
|
70
|
-
topNavFHS: 3,
|
|
71
64
|
sideNav: 2,
|
|
72
65
|
panelSmallViewports: 1
|
|
73
66
|
};
|
|
74
67
|
export var openLayerObserverSideNavNamespace = 'side-nav';
|
|
75
|
-
// We have separate OpenLayerObserver namespaces for each top nav layout area, instead of a single namespace for the entire top nav,
|
|
76
|
-
// as we need to know if there are open layers in TopNavStart specifically to prevent the side nav from peeking.
|
|
77
|
-
// The OpenLayerObserver doesn't support nested namespaces. We could update it, but for now it's simple enough to just have separate
|
|
78
|
-
// namespaces.
|
|
79
|
-
export var openLayerObserverTopNavStartNamespace = 'top-nav-start';
|
|
80
68
|
export var openLayerObserverTopNavMiddleNamespace = 'top-nav-middle';
|
|
81
69
|
export var openLayerObserverTopNavEndNamespace = 'top-nav-end';
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
._vp7g6x5g:focus-within{color:var(--ds-text-selected,#1868db)}
|
|
32
32
|
._30l31ihb:hover{color:var(--ds-border-bold,#7d818a)}
|
|
33
33
|
._30l36x5g:hover{color:var(--ds-text-selected,#1868db)}
|
|
34
|
-
._d0al11mm:hover{cursor:col-resize}
|
|
35
34
|
._d0aluf7j:hover{cursor:ew-resize}
|
|
36
35
|
._1gglglyw:active{transition:none}
|
|
37
36
|
._9h8h12zz:active{color:var(--ds-link-pressed,#1558bc)}
|
|
@@ -25,7 +25,6 @@ import { preventUnhandled } from '@atlaskit/pragmatic-drag-and-drop/utils/preven
|
|
|
25
25
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
26
26
|
import TooltipContainer from '@atlaskit/tooltip/TooltipContainer';
|
|
27
27
|
import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
|
|
28
|
-
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
29
28
|
import { contentInsetBlockStart } from '../constants';
|
|
30
29
|
import { convertResizeBoundToPixels } from './convert-resize-bound-to-pixels';
|
|
31
30
|
import { getPercentageWithinPixelBounds } from './get-percentage-within-pixel-bounds';
|
|
@@ -46,8 +45,7 @@ var containerStyles = {
|
|
|
46
45
|
};
|
|
47
46
|
var grabAreaStyles = {
|
|
48
47
|
root: "_1bsbl52n _4t3i1osq _kqswstnw _1q51ze3t _y4tize3t _85i5ze3t _bozgze3t _syaz1j28 _bfhk1j28 _1oec6ebc _1lww188d _6fl41ytf _k8m01ylx _d0aluf7j _vp7g6x5g _30l36x5g _1gglglyw _9h8h12zz",
|
|
49
|
-
rootFinesse: "_vp7g1ihb _30l31ihb _9h8hq98m"
|
|
50
|
-
fullHeightSidebar: "_d0al11mm"
|
|
48
|
+
rootFinesse: "_vp7g1ihb _30l31ihb _9h8hq98m"
|
|
51
49
|
};
|
|
52
50
|
var lineStyles = {
|
|
53
51
|
root: "_kqswstnw _1e0c1ule _1bsb1l7b _4t3i1osq _syaz1kw7 _bfhk1r31 _1e021v6z"
|
|
@@ -146,7 +144,6 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
|
|
|
146
144
|
position = _ref3.position,
|
|
147
145
|
tooltipContent = _ref3.tooltipContent,
|
|
148
146
|
shortcut = _ref3.shortcut;
|
|
149
|
-
var isFhsEnabled = useIsFhsEnabled();
|
|
150
147
|
var splitterRef = useRef(null);
|
|
151
148
|
var labelId = useId();
|
|
152
149
|
// Separate state used for the input range width to remove the UI's dependency on the "persisted" layout state value being updated
|
|
@@ -456,7 +453,7 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
|
|
|
456
453
|
ref: splitterRef,
|
|
457
454
|
"data-testid": testId,
|
|
458
455
|
onDoubleClick: onDoubleClick,
|
|
459
|
-
className: ax([grabAreaStyles.root, fg('platform-dst-tokens-finesse') && grabAreaStyles.rootFinesse
|
|
456
|
+
className: ax([grabAreaStyles.root, fg('platform-dst-tokens-finesse') && grabAreaStyles.rootFinesse])
|
|
460
457
|
}, /*#__PURE__*/React.createElement(VisuallyHidden, null, /*#__PURE__*/React.createElement("input", {
|
|
461
458
|
type: "range",
|
|
462
459
|
value: rangeInputValue,
|
|
@@ -1,70 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React, { useContext, useEffect, useState } from 'react';
|
|
1
|
+
import React, { useContext } from 'react';
|
|
3
2
|
import invariant from 'tiny-invariant';
|
|
4
|
-
import {
|
|
5
|
-
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
6
|
-
import { openLayerObserverSideNavNamespace, openLayerObserverTopNavEndNamespace, openLayerObserverTopNavMiddleNamespace, openLayerObserverTopNavStartNamespace, sideNavPanelSplitterId } from '../constants';
|
|
3
|
+
import { sideNavPanelSplitterId } from '../constants';
|
|
7
4
|
import { useToggleSideNav } from '../side-nav/use-toggle-side-nav';
|
|
8
5
|
import { OnDoubleClickContext } from './on-double-click-context';
|
|
9
6
|
import { PanelSplitter } from './panel-splitter';
|
|
10
7
|
import { PanelSplitterContext } from './panel-splitter-context';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Namespaces to check for open layers that would interfere with the panel splitter.
|
|
14
|
-
*
|
|
15
|
-
* Placed outside the component for stability, as the list is used as an effect dependency.
|
|
16
|
-
*/
|
|
17
|
-
var openLayerNamespacesToCheck = [
|
|
18
|
-
// The side nav panel splitter is layered above the side nav, so needs to be disabled when there are open popups in the side nav.
|
|
19
|
-
openLayerObserverSideNavNamespace,
|
|
20
|
-
// The side nav panel splitter is layered above the top nav, so needs to be disabled when there are open popups in the top nav.
|
|
21
|
-
openLayerObserverTopNavStartNamespace, openLayerObserverTopNavMiddleNamespace, openLayerObserverTopNavEndNamespace];
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Returns whether there are any open popups in the side nav or top nav
|
|
25
|
-
*/
|
|
26
|
-
function useHasOpenPopupsInSideNavOrTopNav() {
|
|
27
|
-
var isFhsEnabled = useIsFhsEnabled();
|
|
28
|
-
var openLayerObserver = useOpenLayerObserver();
|
|
29
|
-
// Setting the initial state to false, as it is unlikely that there would be any open popups when the app starts.
|
|
30
|
-
var _useState = useState(false),
|
|
31
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
-
hasOpenPopups = _useState2[0],
|
|
33
|
-
setHasOpenPopups = _useState2[1];
|
|
34
|
-
useEffect(function () {
|
|
35
|
-
if (!openLayerObserver || !isFhsEnabled) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
function updateState() {
|
|
39
|
-
if (!openLayerObserver) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
var hasAnyOpenLayers = openLayerNamespacesToCheck.some(function (namespace) {
|
|
43
|
-
return openLayerObserver.getCount({
|
|
44
|
-
namespace: namespace,
|
|
45
|
-
type: 'popup'
|
|
46
|
-
}) > 0;
|
|
47
|
-
});
|
|
48
|
-
setHasOpenPopups(hasAnyOpenLayers);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Initial check. We do this _in case_ a popup is already open when the component mounts.
|
|
52
|
-
updateState();
|
|
53
|
-
|
|
54
|
-
// Subscribe to each namespace
|
|
55
|
-
var cleanups = openLayerNamespacesToCheck.map(function (namespace) {
|
|
56
|
-
return openLayerObserver.onChange(updateState, {
|
|
57
|
-
namespace: namespace
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
return function cleanupHook() {
|
|
61
|
-
cleanups.forEach(function (cleanup) {
|
|
62
|
-
return cleanup();
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
}, [isFhsEnabled, openLayerObserver]);
|
|
66
|
-
return hasOpenPopups;
|
|
67
|
-
}
|
|
68
8
|
/**
|
|
69
9
|
* _SideNavPanelSplitter_
|
|
70
10
|
*
|
|
@@ -91,15 +31,6 @@ export var SideNavPanelSplitter = function SideNavPanelSplitter(_ref) {
|
|
|
91
31
|
var toggleSideNav = useToggleSideNav({
|
|
92
32
|
trigger: 'double-click'
|
|
93
33
|
});
|
|
94
|
-
var isFhsEnabled = useIsFhsEnabled();
|
|
95
|
-
|
|
96
|
-
// The logic and state for disabling the panel splitter when there are open popups
|
|
97
|
-
// in the side nav or top nav is being placed here, instead of in `SideNav`, to prevent
|
|
98
|
-
// re-rendering the side nav anytime the number of open popups changes.
|
|
99
|
-
var hasOpenLayersInSideNavOrTopNav = useHasOpenPopupsInSideNavOrTopNav();
|
|
100
|
-
if (hasOpenLayersInSideNavOrTopNav && isFhsEnabled) {
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
34
|
return /*#__PURE__*/React.createElement(OnDoubleClickContext.Provider, {
|
|
104
35
|
value: shouldCollapseOnDoubleClick ? toggleSideNav : undefined
|
|
105
36
|
}, /*#__PURE__*/React.createElement(PanelSplitter, {
|