@atlaskit/navigation-system 11.2.3 → 11.3.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 +34 -0
- 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 +2 -5
- 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 +6 -11
- 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 +3 -6
- package/dist/cjs/ui/top-nav-items/search.compiled.css +3 -2
- package/dist/cjs/ui/top-nav-items/search.js +3 -7
- 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/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 +2 -5
- 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 +6 -11
- 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 +3 -6
- package/dist/es2019/ui/top-nav-items/search.compiled.css +3 -2
- package/dist/es2019/ui/top-nav-items/search.js +3 -7
- 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/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 +2 -5
- 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 +6 -11
- 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 +3 -6
- package/dist/esm/ui/top-nav-items/search.compiled.css +3 -2
- package/dist/esm/ui/top-nav-items/search.js +3 -7
- 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/panel-splitter/panel-splitter.d.ts +0 -2
- package/dist/types/ui/page-layout/side-nav/side-nav.d.ts +0 -1
- package/package.json +10 -11
|
@@ -1,157 +1,24 @@
|
|
|
1
1
|
/* top-nav-start.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
2
|
import "./top-nav-start.compiled.css";
|
|
4
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import React, {
|
|
6
|
-
import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
|
|
7
|
-
import { OpenLayerObserverNamespaceProvider } from '@atlaskit/layering/open-layer-observer-namespace-provider';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
|
-
import { UNSAFE_useMediaQuery } from '@atlaskit/primitives/compiled/use-media-query';
|
|
4
|
+
import React, { useContext, useEffect, useRef } from 'react';
|
|
10
5
|
import { TopNavStartAttachRef } from '../../../context/top-nav-start/top-nav-start-attach-ref';
|
|
11
|
-
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
12
|
-
import { useHasCustomTheme } from '../../top-nav-items/themed/has-custom-theme-context';
|
|
13
|
-
import { HasDefaultBackgroundColorContext } from '../../top-nav-items/themed/has-default-background-color-context';
|
|
14
|
-
import { openLayerObserverTopNavStartNamespace } from '../constants';
|
|
15
|
-
import { SideNavVisibilityState } from '../side-nav/side-nav-visibility-state';
|
|
16
|
-
import { useSideNavVisibility } from '../side-nav/use-side-nav-visibility';
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Firefox does support these reorder animations, but only partially enabling layout animations would look odd.
|
|
20
|
-
*
|
|
21
|
-
* We are using JS to detect Firefox and disable animations, instead of using CSS, as Compiled currently does not merge duplicate
|
|
22
|
-
* 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
|
|
23
|
-
* Avoiding nesting the `@supports` at-rule inside of `@media` means Compiled can remove duplicate styles from the generated CSS.
|
|
24
|
-
*/
|
|
25
|
-
var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
26
|
-
|
|
27
|
-
// Placed in a variable, as the value is used in the translateX value for the children wrapper animation.
|
|
28
|
-
var flexGap = "var(--ds-space-050, 4px)";
|
|
29
6
|
|
|
30
7
|
/**
|
|
31
8
|
* Styles for the TopNavStart element.
|
|
32
|
-
*
|
|
33
|
-
* When `useIsFhsEnabled` is true this is the styling for the inner element,
|
|
34
|
-
* which re-enables pointer events.
|
|
35
9
|
*/
|
|
36
10
|
var innerStyles = {
|
|
37
|
-
root: "_zulp1b66 _yyhykb7n _4t3i1osq _4cvr1h6o _1e0c1txw _glte1ris _15rip2n4 _1gs5usvi"
|
|
38
|
-
fullHeightSidebarExpanded: "_15rin7od _glte1osq"
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Styles for the outer element, that does not have re-enabled pointer events and spans the entire
|
|
43
|
-
* width of the TopNavStart area.
|
|
44
|
-
*
|
|
45
|
-
* This wrapper element is only rendered when `useIsFhsEnabled` is true.
|
|
46
|
-
*/
|
|
47
|
-
var wrapperStyles = {
|
|
48
|
-
root: "_vchhusvi _bozgutpp _4t3i1osq _13wnh2mm _1l3vb3bt _juxdstnw _1vinidpf _1719idpf _e6znidpf _1kyhe4h9 _4cwynqa1 _435s1l7x _m7c3idpf",
|
|
49
|
-
fullHeightSidebarExpanded: "_glte93mn _exxmutpp _4ap3vuon _m7c3kb7n",
|
|
50
|
-
fullHeightSidebarBorderTransition: "_n8qabrmi _wc72fnf5 _j3mr1v42",
|
|
51
|
-
fullHeightSidebarCustomTheming: "_4ap319ly _1m5lglyw"
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* We use a fixed translateX offset for the slide animation (used when the TopNavStart children elements are reordered).
|
|
56
|
-
* This fixed offset makes the elements appear to animate smoothly from the old to the new position.
|
|
57
|
-
* This offset is calculated based on:
|
|
58
|
-
* - 32px (2rem) width of the side nav toggle button (IconButton)
|
|
59
|
-
* - 4px gap ('space.050' token) of the flex container
|
|
60
|
-
*
|
|
61
|
-
* The benefit of hardcoding this offset is that we don't need to calculate it using JS each time the sidebar is toggled.
|
|
62
|
-
* However, it could become out of sync if the width of IconButton changes.
|
|
63
|
-
*
|
|
64
|
-
* The alternative is using JS to store the previous position of the children wrapper element, and calculate the offset based on
|
|
65
|
-
* the new position, and then transforming using that offset. This would prevent the animation from going out of sync.
|
|
66
|
-
*/
|
|
67
|
-
var childrenWrapperAnimationOffset = "calc(2rem + ".concat(flexGap, ")");
|
|
68
|
-
var childrenWrapperStyles = {
|
|
69
|
-
root: "_zulp1kw7 _1e0c1kw7 _4cvr1h6o _1ul9idpf _15yekb7n _65m41mrw",
|
|
70
|
-
animationBaseStyles: "_10t81e03",
|
|
71
|
-
finalPosition: "_mjvcz12g _xrrpfnf5",
|
|
72
|
-
expandAnimationStartPosition: "_mjvcyrjp",
|
|
73
|
-
collapseAnimationStartPosition: "_mjvco0k7"
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* We use a fixed translateX offset for the toggle button slide animation (used when the TopNavStart children elements are reordered).
|
|
78
|
-
* The specific value doesn't matter too much for the toggle button animation, so we are using `100%`, which will match the toggle button width.
|
|
79
|
-
*
|
|
80
|
-
* By combining the `translateX` animation with an `opacity` fade, the feel and experience is actually quite similar to animating the
|
|
81
|
-
* element from the exact old position (offset), and it avoids the additional complexity of needing to track and calculate the exact offset.
|
|
82
|
-
*/
|
|
83
|
-
var toggleButtonWrapperStyles = {
|
|
84
|
-
root: "_15yekb7n _65m41mrw _10t81rjc",
|
|
85
|
-
finalPosition: "_mjvcz12g _xrrpfnf5 _bgpzkb7n",
|
|
86
|
-
expandAnimationStartPosition: "_mjvc1p9u _bgpzidpf",
|
|
87
|
-
collapseAnimationStartPosition: "_mjvc1efy _bgpzidpf",
|
|
88
|
-
expandAnimationTimingFunction: "_1xq51ytf",
|
|
89
|
-
collapseAnimationTimingFunction: "_1xq55ucs",
|
|
90
|
-
alignEnd: "_ahbq1wug"
|
|
11
|
+
root: "_zulp1b66 _yyhykb7n _4t3i1osq _4cvr1h6o _1e0c1txw _glte1ris _15rip2n4 _1gs5usvi"
|
|
91
12
|
};
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* The consistent key used for the side nav toggle button to ensure it does not get remounted
|
|
95
|
-
* when it is reordered.
|
|
96
|
-
*
|
|
97
|
-
* This ensures we get focus restoration for free.
|
|
98
|
-
*/
|
|
99
|
-
var sideNavToggleButtonKey = 'side-nav-toggle-button';
|
|
100
|
-
var TopNavStartInnerOld = /*#__PURE__*/forwardRef(function TopNavStartInner(_ref, ref) {
|
|
101
|
-
var children = _ref.children,
|
|
102
|
-
testId = _ref.testId;
|
|
103
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
104
|
-
ref: ref,
|
|
105
|
-
"data-testid": testId,
|
|
106
|
-
className: ax([innerStyles.root])
|
|
107
|
-
}, children);
|
|
108
|
-
});
|
|
109
|
-
var TopNavStartInnerFHS = /*#__PURE__*/forwardRef(function TopNavStartInnerFHS(_ref2, ref) {
|
|
110
|
-
var children = _ref2.children,
|
|
111
|
-
testId = _ref2.testId;
|
|
112
|
-
// This needs the real `defaultCollapsed` state or will not SSR properly
|
|
113
|
-
// TODO: lift `defaultCollapsed` state to `Root` (DSP-23683)
|
|
114
|
-
// then context value will be correct in SSR / from initial render
|
|
115
|
-
var _useSideNavVisibility = useSideNavVisibility({
|
|
116
|
-
defaultCollapsed: true
|
|
117
|
-
}),
|
|
118
|
-
isExpandedOnDesktop = _useSideNavVisibility.isExpandedOnDesktop;
|
|
119
|
-
var sideNavState = useContext(SideNavVisibilityState);
|
|
120
|
-
var isFirstRenderRef = useRef(true);
|
|
121
|
-
useEffect(function () {
|
|
122
|
-
// Ignore renders until the side nav state is initialized
|
|
123
|
-
// So that apps using the legacy API for setting side nav default state do not see
|
|
124
|
-
// animations when they shouldn't
|
|
125
|
-
if (sideNavState === null) {
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
if (isFirstRenderRef.current) {
|
|
129
|
-
isFirstRenderRef.current = false;
|
|
130
|
-
}
|
|
131
|
-
}, [sideNavState]);
|
|
132
|
-
var hasCustomTheme = useHasCustomTheme();
|
|
133
|
-
var hasDefaultBackgroundColor = useContext(HasDefaultBackgroundColorContext);
|
|
134
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
135
|
-
className: ax([wrapperStyles.root, isExpandedOnDesktop && wrapperStyles.fullHeightSidebarExpanded, !isFirstRenderRef.current && isExpandedOnDesktop && wrapperStyles.fullHeightSidebarBorderTransition, hasCustomTheme && !hasDefaultBackgroundColor && fg('platform_dst_nav4_custom_theming_fhs_1') && wrapperStyles.fullHeightSidebarCustomTheming])
|
|
136
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
137
|
-
ref: ref,
|
|
138
|
-
"data-testid": testId,
|
|
139
|
-
className: ax([innerStyles.root, isExpandedOnDesktop && innerStyles.fullHeightSidebarExpanded])
|
|
140
|
-
}, /*#__PURE__*/React.createElement(OpenLayerObserverNamespaceProvider, {
|
|
141
|
-
namespace: openLayerObserverTopNavStartNamespace
|
|
142
|
-
}, children)));
|
|
143
|
-
});
|
|
144
|
-
|
|
145
13
|
/**
|
|
146
14
|
* __TopNavStart__
|
|
147
15
|
*
|
|
148
16
|
* Wrapper for the top navigation actions on the inline-start (left) side of the top navigation.
|
|
149
17
|
*/
|
|
150
|
-
export function TopNavStart(
|
|
151
|
-
var children =
|
|
152
|
-
testId =
|
|
153
|
-
sideNavToggleButton =
|
|
154
|
-
var isFhsEnabled = useIsFhsEnabled();
|
|
18
|
+
export function TopNavStart(_ref) {
|
|
19
|
+
var children = _ref.children,
|
|
20
|
+
testId = _ref.testId,
|
|
21
|
+
sideNavToggleButton = _ref.sideNavToggleButton;
|
|
155
22
|
var ref = useContext(TopNavStartAttachRef);
|
|
156
23
|
var elementRef = useRef(null);
|
|
157
24
|
|
|
@@ -160,116 +27,9 @@ export function TopNavStart(_ref3) {
|
|
|
160
27
|
useEffect(function () {
|
|
161
28
|
ref(elementRef.current);
|
|
162
29
|
}, [elementRef, ref]);
|
|
163
|
-
|
|
164
|
-
// This needs the real `defaultCollapsed` state or will not SSR properly
|
|
165
|
-
// TODO: lift `defaultCollapsed` state to `Root` (DSP-23683)
|
|
166
|
-
// then context value will be correct in SSR / from initial render
|
|
167
|
-
var _useSideNavVisibility2 = useSideNavVisibility({
|
|
168
|
-
defaultCollapsed: true
|
|
169
|
-
}),
|
|
170
|
-
isExpandedOnDesktop = _useSideNavVisibility2.isExpandedOnDesktop;
|
|
171
|
-
|
|
172
|
-
// For SSR assume desktop
|
|
173
|
-
var _useState = useState(true),
|
|
174
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
175
|
-
isDesktop = _useState2[0],
|
|
176
|
-
setIsDesktop = _useState2[1];
|
|
177
|
-
// Set state to real value on client
|
|
178
|
-
// This could result in some visible shift on mobile when hydrating SSR
|
|
179
|
-
// TODO: review and improve SSR behavior as necessary (DSP-23817)
|
|
180
|
-
useLayoutEffect(function () {
|
|
181
|
-
// Checking this to avoid breaking tests when `matchMedia` is not mocked
|
|
182
|
-
// Ideally we wouldn't cater to test environments, but this avoids introducing unnecessary friction
|
|
183
|
-
if (typeof window !== 'undefined' && typeof window.matchMedia === 'function') {
|
|
184
|
-
setIsDesktop(window.matchMedia('(min-width: 64rem)').matches);
|
|
185
|
-
}
|
|
186
|
-
}, []);
|
|
187
|
-
UNSAFE_useMediaQuery('above.md', function (event) {
|
|
188
|
-
setIsDesktop(event.matches);
|
|
189
|
-
});
|
|
190
|
-
var _useState3 = useState({
|
|
191
|
-
type: 'idle'
|
|
192
|
-
}),
|
|
193
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
194
|
-
animationState = _useState4[0],
|
|
195
|
-
setAnimationState = _useState4[1];
|
|
196
|
-
|
|
197
|
-
// Used to prevent the reorder animations from running on the initial render.
|
|
198
|
-
var isFirstRenderRef = useRef(true);
|
|
199
|
-
var sideNavState = useContext(SideNavVisibilityState);
|
|
200
|
-
useEffect(function () {
|
|
201
|
-
if (!isFhsEnabled) {
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
// Ignore renders until the side nav state is initialized
|
|
206
|
-
// So that apps using the legacy API for setting side nav default state do not see
|
|
207
|
-
// animations when they shouldn't
|
|
208
|
-
if (sideNavState === null) {
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
if (isFirstRenderRef.current) {
|
|
212
|
-
isFirstRenderRef.current = false;
|
|
213
|
-
}
|
|
214
|
-
}, [isFhsEnabled, sideNavState]);
|
|
215
|
-
|
|
216
|
-
// Using a stable ref to avoid re-running the animation layout effect when the toggle button prop value changes, which
|
|
217
|
-
// can happen a lot (e.g. if the parent re-renders)
|
|
218
|
-
var sideNavToggleButtonStableRef = useStableRef(sideNavToggleButton);
|
|
219
|
-
useLayoutEffect(function () {
|
|
220
|
-
if (!isFhsEnabled) {
|
|
221
|
-
return;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* This layout effect is used to animate the TopNavStart children elements to their new position after being reordered.
|
|
226
|
-
* It is called when the sidebar's desktop expansion state changes.
|
|
227
|
-
*
|
|
228
|
-
* It works by first setting a translateX offset on the elements, used as the start position of the slide animation.
|
|
229
|
-
* - For the toggle button, it's a fixed offset. It's combined with an opacity, so the exact offset doesn't matter too much.
|
|
230
|
-
* - For the children wrapper (wrapping everything except the toggle button), an offset was chosen to make the animation
|
|
231
|
-
* start position the exact same as the element's old position. See comments for `childrenWrapperStyles` for more details.
|
|
232
|
-
*
|
|
233
|
-
* On the next frame, the translateX offset is cleared, triggering the animation to the new position.
|
|
234
|
-
*/
|
|
235
|
-
|
|
236
|
-
if (isFirstRenderRef.current) {
|
|
237
|
-
// No animations on initial render.
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
240
|
-
if (!sideNavToggleButtonStableRef.current) {
|
|
241
|
-
// If there is no toggle button, there should be no re-order animations.
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
// Set the translateX offsets so elements are ready to animate to their actual new position after being reordered
|
|
246
|
-
setAnimationState({
|
|
247
|
-
type: isExpandedOnDesktop ? 'expand' : 'collapse'
|
|
248
|
-
});
|
|
249
|
-
requestAnimationFrame(function () {
|
|
250
|
-
// Clear translateX offsets on next frame to trigger animation to new position in a re-render
|
|
251
|
-
setAnimationState({
|
|
252
|
-
type: 'idle'
|
|
253
|
-
});
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
// This layout effect is called when the sidebar's desktop expansion state changes.
|
|
257
|
-
}, [isExpandedOnDesktop, isFhsEnabled, sideNavToggleButtonStableRef]);
|
|
258
|
-
var TopNavStartInner = isFhsEnabled ? TopNavStartInnerFHS : TopNavStartInnerOld;
|
|
259
|
-
return /*#__PURE__*/React.createElement(TopNavStartInner, {
|
|
30
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
260
31
|
ref: elementRef,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
className: ax([!isFirefox && toggleButtonWrapperStyles.root, !isFirefox && animationState.type === 'idle' && toggleButtonWrapperStyles.finalPosition, !isFirefox &&
|
|
265
|
-
// Timing function is applied when the browser animates to the idle position.
|
|
266
|
-
animationState.type === 'idle' && toggleButtonWrapperStyles.collapseAnimationTimingFunction, !isFirefox && animationState.type === 'collapse' && toggleButtonWrapperStyles.collapseAnimationStartPosition])
|
|
267
|
-
}, sideNavToggleButton), isFhsEnabled ? /*#__PURE__*/React.createElement("div", {
|
|
268
|
-
className: ax([childrenWrapperStyles.root, !isFirefox && childrenWrapperStyles.animationBaseStyles, !isFirefox && animationState.type === 'idle' && childrenWrapperStyles.finalPosition, !isFirefox && animationState.type === 'expand' && childrenWrapperStyles.expandAnimationStartPosition, !isFirefox && animationState.type === 'collapse' && childrenWrapperStyles.collapseAnimationStartPosition])
|
|
269
|
-
}, children) : children, sideNavToggleButton && isDesktop && isExpandedOnDesktop && isFhsEnabled && /*#__PURE__*/React.createElement("div", {
|
|
270
|
-
key: sideNavToggleButtonKey,
|
|
271
|
-
className: ax([!isFirefox && toggleButtonWrapperStyles.root, toggleButtonWrapperStyles.alignEnd, !isFirefox && animationState.type === 'idle' && toggleButtonWrapperStyles.finalPosition, !isFirefox &&
|
|
272
|
-
// Timing function is applied when the browser animates to the idle position.
|
|
273
|
-
animationState.type === 'idle' && toggleButtonWrapperStyles.expandAnimationTimingFunction, !isFirefox && animationState.type === 'expand' && toggleButtonWrapperStyles.expandAnimationStartPosition])
|
|
274
|
-
}, sideNavToggleButton));
|
|
32
|
+
"data-testid": testId,
|
|
33
|
+
className: ax([innerStyles.root])
|
|
34
|
+
}, sideNavToggleButton, children);
|
|
275
35
|
}
|
|
@@ -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
|
var 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(_ref) {
|
|
|
44
39
|
testId = _ref.testId,
|
|
45
40
|
providedId = _ref.id,
|
|
46
41
|
customThemeConfig = _ref.customTheme;
|
|
47
|
-
var isFhsEnabled = useIsFhsEnabled();
|
|
48
42
|
var dangerouslyHoistSlotSizes = useContext(DangerouslyHoistSlotSizes);
|
|
49
43
|
var id = useLayoutId({
|
|
50
44
|
providedId: providedId
|
|
@@ -54,16 +48,14 @@ function TopNavOld(_ref) {
|
|
|
54
48
|
label: skipLinkLabel,
|
|
55
49
|
isHidden: fg('platform_dst_nav4_skip_link_a11y_1')
|
|
56
50
|
});
|
|
57
|
-
var height = heightProp !== null && heightProp !== void 0 ? heightProp :
|
|
51
|
+
var height = heightProp !== null && heightProp !== void 0 ? heightProp : fg('platform_dst_ads_appswitcher_improvements') ? 56 : 48;
|
|
58
52
|
var customTheme = useCustomTheme(customThemeConfig);
|
|
59
|
-
var _useSideNavVisibility = useSideNavVisibility(),
|
|
60
|
-
isExpandedOnDesktop = _useSideNavVisibility.isExpandedOnDesktop;
|
|
61
53
|
return /*#__PURE__*/React.createElement(HasCustomThemeContext.Provider, {
|
|
62
54
|
value: customTheme.isEnabled
|
|
63
55
|
}, /*#__PURE__*/React.createElement("header", {
|
|
64
56
|
id: id,
|
|
65
57
|
"data-layout-slot": true,
|
|
66
|
-
className: ax([styles.root,
|
|
58
|
+
className: ax([styles.root, xcss]),
|
|
67
59
|
"data-testid": testId
|
|
68
60
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
69
61
|
,
|
|
@@ -96,7 +88,6 @@ function TopNavNew(_ref2) {
|
|
|
96
88
|
testId = _ref2.testId,
|
|
97
89
|
providedId = _ref2.id,
|
|
98
90
|
customThemeConfig = _ref2.customTheme;
|
|
99
|
-
var isFhsEnabled = useIsFhsEnabled();
|
|
100
91
|
var dangerouslyHoistSlotSizes = useContext(DangerouslyHoistSlotSizes);
|
|
101
92
|
var id = useLayoutId({
|
|
102
93
|
providedId: providedId
|
|
@@ -106,11 +97,9 @@ function TopNavNew(_ref2) {
|
|
|
106
97
|
label: skipLinkLabel,
|
|
107
98
|
isHidden: fg('platform_dst_nav4_skip_link_a11y_1')
|
|
108
99
|
});
|
|
109
|
-
var height = heightProp !== null && heightProp !== void 0 ? heightProp :
|
|
100
|
+
var height = heightProp !== null && heightProp !== void 0 ? heightProp : fg('platform_dst_ads_appswitcher_improvements') ? 56 : 48;
|
|
110
101
|
var customTheme = useCustomThemeNew(customThemeConfig);
|
|
111
102
|
var hasDefaultBackground = customTheme.isEnabled ? customTheme.hasDefaultBackground : true;
|
|
112
|
-
var _useSideNavVisibility2 = useSideNavVisibility(),
|
|
113
|
-
isExpandedOnDesktop = _useSideNavVisibility2.isExpandedOnDesktop;
|
|
114
103
|
return /*#__PURE__*/React.createElement(HasCustomThemeContext.Provider, {
|
|
115
104
|
value: customTheme.isEnabled
|
|
116
105
|
}, /*#__PURE__*/React.createElement(HasDefaultBackgroundColorContext.Provider, {
|
|
@@ -118,7 +107,7 @@ function TopNavNew(_ref2) {
|
|
|
118
107
|
}, /*#__PURE__*/React.createElement("header", {
|
|
119
108
|
id: id,
|
|
120
109
|
"data-layout-slot": true,
|
|
121
|
-
className: ax([styles.root,
|
|
110
|
+
className: ax([styles.root, xcss]),
|
|
122
111
|
"data-testid": testId
|
|
123
112
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
124
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}
|
|
@@ -8,22 +8,18 @@ import { Anchor } from '@atlaskit/primitives/compiled/anchor';
|
|
|
8
8
|
import { Inline } from '@atlaskit/primitives/compiled/inline';
|
|
9
9
|
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
10
10
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
11
|
-
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
12
11
|
import { useHasCustomTheme } from '../themed/has-custom-theme-context';
|
|
13
12
|
import { LogoRenderer } from './logo-renderer';
|
|
14
13
|
var anchorStyles = {
|
|
15
14
|
root: "_2rko1mok _1e0c1txw _4cvr1h6o _4t3izwfg _1o9zidpf _ahbq1b66 _1toh1r31 _5jyqglyw _mrqmnqa1 _1w901kw7",
|
|
16
15
|
interactionStates: "_irr31dpa _1di69yc7",
|
|
17
|
-
interactionStatesCustomTheming: "_irr31rps _1di6yhlj"
|
|
18
|
-
fullHeightSidebar: "_1reo15vq _18m915vq _1o9zkb7n"
|
|
16
|
+
interactionStatesCustomTheming: "_irr31rps _1di6yhlj"
|
|
19
17
|
};
|
|
20
18
|
var logoWrapperStyles = {
|
|
21
|
-
root: "_18zr1b66"
|
|
22
|
-
fullHeightSidebar: "_p12f1osq"
|
|
19
|
+
root: "_18zr1b66"
|
|
23
20
|
};
|
|
24
21
|
var iconContainerStyles = {
|
|
25
|
-
root: "_1reo15vq _18m915vq _1e0c1txw _p12f1tcg _c71l1tcg"
|
|
26
|
-
fullHeightSidebar: "_1o9zidpf"
|
|
22
|
+
root: "_1reo15vq _18m915vq _1e0c1txw _p12f1tcg _c71l1tcg"
|
|
27
23
|
};
|
|
28
24
|
var logoTextStyles = {
|
|
29
25
|
root: "_1bsb1ris _p12fnklw _uiztglyw _y4tiv77o _1e0cglyw _2lx21bp4 _1bah1h6o _10y41txw"
|
|
@@ -50,7 +46,6 @@ export var AppLogo = function AppLogo(_ref) {
|
|
|
50
46
|
href = _ref.href,
|
|
51
47
|
icon = _ref.icon,
|
|
52
48
|
onClick = _ref.onClick;
|
|
53
|
-
var isFhsEnabled = useIsFhsEnabled();
|
|
54
49
|
var ref = useRef(null);
|
|
55
50
|
var nameRef = useRef(null);
|
|
56
51
|
var hasCustomTheme = useHasCustomTheme();
|
|
@@ -70,14 +65,14 @@ export var AppLogo = function AppLogo(_ref) {
|
|
|
70
65
|
// @ts-expect-error - non-standard values for `borderRadius` and the custom theming interaction states
|
|
71
66
|
// eslint-disable-next-line @compiled/no-suppress-xcss
|
|
72
67
|
,
|
|
73
|
-
xcss: cx(anchorStyles.root, hasCustomTheme ? anchorStyles.interactionStatesCustomTheming : anchorStyles.interactionStates
|
|
68
|
+
xcss: cx(anchorStyles.root, hasCustomTheme ? anchorStyles.interactionStatesCustomTheming : anchorStyles.interactionStates),
|
|
74
69
|
onClick: onClick
|
|
75
70
|
}, /*#__PURE__*/React.createElement(Inline, {
|
|
76
71
|
space: "space.075",
|
|
77
72
|
alignBlock: "center",
|
|
78
|
-
xcss:
|
|
73
|
+
xcss: logoWrapperStyles.root
|
|
79
74
|
}, /*#__PURE__*/React.createElement("div", {
|
|
80
|
-
className: ax([iconContainerStyles.root
|
|
75
|
+
className: ax([iconContainerStyles.root])
|
|
81
76
|
}, /*#__PURE__*/React.createElement(LogoRenderer, {
|
|
82
77
|
logoOrIcon: icon
|
|
83
78
|
})), /*#__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}
|
|
@@ -4,7 +4,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useEffect, useRef } from 'react';
|
|
5
5
|
import { cx } from '@compiled/react';
|
|
6
6
|
import { Anchor } from '@atlaskit/primitives/compiled/anchor';
|
|
7
|
-
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
8
7
|
import { useHasCustomTheme } from '../themed/has-custom-theme-context';
|
|
9
8
|
import { LogoRenderer } from './logo-renderer';
|
|
10
9
|
var anchorStyles = {
|
|
@@ -15,8 +14,7 @@ var anchorStyles = {
|
|
|
15
14
|
newInteractionStatesCustomTheming: "_irr31rps _1di6yhlj"
|
|
16
15
|
};
|
|
17
16
|
var 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
|
var iconContainerStyles = {
|
|
22
20
|
root: "_1e0c1txw _p12f1tcg _vchh1ntv _10y4glyw"
|
|
@@ -71,7 +69,6 @@ export var CustomLogo = function CustomLogo(_ref) {
|
|
|
71
69
|
}
|
|
72
70
|
}, []);
|
|
73
71
|
var hasCustomTheme = useHasCustomTheme();
|
|
74
|
-
var isFhsEnabled = useIsFhsEnabled();
|
|
75
72
|
return /*#__PURE__*/React.createElement(Anchor, {
|
|
76
73
|
ref: ref,
|
|
77
74
|
"aria-label": label,
|
|
@@ -82,11 +79,11 @@ export var CustomLogo = function CustomLogo(_ref) {
|
|
|
82
79
|
xcss: cx(anchorStyles.root, anchorStyles.customLogoBorderRadius, anchorStyles.newMargin, hasCustomTheme ? anchorStyles.newInteractionStatesCustomTheming : anchorStyles.newInteractionStates),
|
|
83
80
|
onClick: onClick
|
|
84
81
|
}, /*#__PURE__*/React.createElement("div", {
|
|
85
|
-
className: ax([sharedIconOrLogoContainerStyles.root, iconContainerStyles.root
|
|
82
|
+
className: ax([sharedIconOrLogoContainerStyles.root, iconContainerStyles.root])
|
|
86
83
|
}, /*#__PURE__*/React.createElement(LogoRenderer, {
|
|
87
84
|
logoOrIcon: icon
|
|
88
85
|
})), /*#__PURE__*/React.createElement("div", {
|
|
89
|
-
className: ax([sharedIconOrLogoContainerStyles.root, logoContainerStyles.root
|
|
86
|
+
className: ax([sharedIconOrLogoContainerStyles.root, logoContainerStyles.root])
|
|
90
87
|
}, /*#__PURE__*/React.createElement(LogoRenderer, {
|
|
91
88
|
logoOrIcon: logo
|
|
92
89
|
})));
|
|
@@ -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,20 +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
7
|
import { Pressable } from '@atlaskit/primitives/compiled/pressable';
|
|
9
8
|
import { Show } from '@atlaskit/primitives/compiled/show';
|
|
10
9
|
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
11
|
-
import { useIsFhsEnabled } from '../fhs-rollout/use-is-fhs-enabled';
|
|
12
10
|
import { IconButton } from './themed/icon-button';
|
|
13
11
|
var styles = {
|
|
14
|
-
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",
|
|
15
13
|
buttonText: "_yyhyjvu9 _1ii7kb7n",
|
|
16
14
|
iconBefore: "_yyhykb7n _1ii7kb7n _1e0c1txw",
|
|
17
|
-
elemAfter: "_yyhy11wp _1ii7kb7n _1e0c1txw"
|
|
18
|
-
fullHeightSidebar: "_p12fktbq"
|
|
15
|
+
elemAfter: "_yyhy11wp _1ii7kb7n _1e0c1txw"
|
|
19
16
|
};
|
|
20
17
|
/**
|
|
21
18
|
* __Search__
|
|
@@ -30,7 +27,6 @@ export var Search = function Search(_ref) {
|
|
|
30
27
|
elemAfter = _ref.elemAfter,
|
|
31
28
|
interactionName = _ref.interactionName,
|
|
32
29
|
ariaHaspopup = _ref['aria-haspopup'];
|
|
33
|
-
var isFhsEnabled = useIsFhsEnabled();
|
|
34
30
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Pressable, {
|
|
35
31
|
style: {
|
|
36
32
|
// To win the specificity war against Emotion we move this into inline styles
|
|
@@ -40,7 +36,7 @@ export var Search = function Search(_ref) {
|
|
|
40
36
|
border: "var(--ds-border-width, 1px)".concat(" solid ", fg('platform-dst-tokens-finesse') ? "var(--ds-border-input-search, #0B120E24)" : "var(--ds-border-input, #8C8F97)")
|
|
41
37
|
},
|
|
42
38
|
onClick: onClick,
|
|
43
|
-
xcss:
|
|
39
|
+
xcss: styles.root,
|
|
44
40
|
interactionName: interactionName,
|
|
45
41
|
"aria-haspopup": ariaHaspopup
|
|
46
42
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* __Is custom is fhs enabled context__
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* @deprecated Full height sidebar (FHS) has been rolled back. This context is no longer used and
|
|
5
|
+
* will be deleted in a future major release.
|
|
6
6
|
*/
|
|
7
7
|
export declare const IsCustomIsFhsEnabledContext: import('react').Context<boolean>;
|
|
@@ -2,7 +2,10 @@ import type { Get } from './types';
|
|
|
2
2
|
/**
|
|
3
3
|
* __Is fhs enabled context__
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
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
|
|
7
10
|
*/
|
|
8
11
|
export declare const IsFhsEnabledContext: import('react').Context<boolean | Get<boolean>>;
|
|
@@ -2,9 +2,16 @@ import React, { type PropsWithChildren } from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* __Is fhs enabled provider__
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* @deprecated Full height sidebar (FHS) has been rolled back. This provider is now a passthrough:
|
|
6
|
+
* it renders its children and ignores `value`. Remove it from your app; it will be deleted in a
|
|
7
|
+
* future major release.
|
|
8
|
+
*
|
|
9
|
+
* See https://hello.atlassian.net/wiki/spaces/navx/pages/7189669176/Full+Height+Sidebar+FHS+Rollback+Plan
|
|
10
|
+
*/
|
|
11
|
+
export declare const IsFhsEnabledProvider: ({ children, }: IsFhsEnabledProviderProps) => React.JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Full height sidebar (FHS) has been rolled back. `value` is ignored.
|
|
6
14
|
*/
|
|
7
|
-
export declare const IsFhsEnabledProvider: ({ children, value, }: IsFhsEnabledProviderProps) => React.JSX.Element;
|
|
8
15
|
export type IsFhsEnabledProviderProps = PropsWithChildren<{
|
|
9
16
|
value: boolean;
|
|
10
17
|
}>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* __Use is fhs enabled__
|
|
3
3
|
*
|
|
4
|
-
*
|
|
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
|
|
5
8
|
*/
|
|
6
9
|
export declare const useIsFhsEnabled: () => boolean;
|
|
@@ -40,15 +40,11 @@ export declare const UNSAFE_MAIN_INLINE_END_FOR_LEGACY_PAGES_ONLY: 'calc(var(--r
|
|
|
40
40
|
export declare const localSlotLayers: {
|
|
41
41
|
chatPanelOverlay: number;
|
|
42
42
|
ribbon: number;
|
|
43
|
-
sideNavPanelSplitterFHS: number;
|
|
44
43
|
topBar: number;
|
|
45
44
|
banner: number;
|
|
46
|
-
bannerFHS: number;
|
|
47
|
-
topNavFHS: number;
|
|
48
45
|
sideNav: number;
|
|
49
46
|
panelSmallViewports: number;
|
|
50
47
|
};
|
|
51
48
|
export declare const openLayerObserverSideNavNamespace = "side-nav";
|
|
52
|
-
export declare const openLayerObserverTopNavStartNamespace = "top-nav-start";
|
|
53
49
|
export declare const openLayerObserverTopNavMiddleNamespace = "top-nav-middle";
|
|
54
50
|
export declare const openLayerObserverTopNavEndNamespace = "top-nav-end";
|