@atlaskit/navigation-system 10.5.7 → 10.7.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.
Files changed (159) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/dist/cjs/components/badge-container.js +1 -1
  3. package/dist/cjs/components/list-item.js +1 -1
  4. package/dist/cjs/components/list.js +1 -1
  5. package/dist/cjs/components/skip-links/skip-link.compiled.css +0 -1
  6. package/dist/cjs/components/skip-links/skip-link.js +1 -1
  7. package/dist/cjs/components/skip-links/skip-links-container.compiled.css +0 -1
  8. package/dist/cjs/components/skip-links/skip-links-container.js +1 -1
  9. package/dist/cjs/components/skip-links/skip-links-popup.js +1 -1
  10. package/dist/cjs/ui/page-layout/aside.compiled.css +0 -1
  11. package/dist/cjs/ui/page-layout/aside.js +1 -1
  12. package/dist/cjs/ui/page-layout/banner.compiled.css +0 -1
  13. package/dist/cjs/ui/page-layout/banner.js +1 -1
  14. package/dist/cjs/ui/page-layout/main/main-sticky-header.js +1 -1
  15. package/dist/cjs/ui/page-layout/main/main.compiled.css +0 -1
  16. package/dist/cjs/ui/page-layout/main/main.js +1 -1
  17. package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.js +2 -2
  18. package/dist/cjs/ui/page-layout/panel.compiled.css +4 -1
  19. package/dist/cjs/ui/page-layout/panel.js +48 -6
  20. package/dist/cjs/ui/page-layout/ribbon.compiled.css +0 -1
  21. package/dist/cjs/ui/page-layout/ribbon.js +1 -1
  22. package/dist/cjs/ui/page-layout/root.js +1 -1
  23. package/dist/cjs/ui/page-layout/side-nav/side-nav-content.js +1 -1
  24. package/dist/cjs/ui/page-layout/side-nav/side-nav-footer.js +1 -1
  25. package/dist/cjs/ui/page-layout/side-nav/side-nav-header.js +1 -1
  26. package/dist/cjs/ui/page-layout/side-nav/side-nav.compiled.css +0 -1
  27. package/dist/cjs/ui/page-layout/side-nav/side-nav.js +1 -1
  28. package/dist/cjs/ui/page-layout/side-nav/toggle-button.js +1 -1
  29. package/dist/cjs/ui/page-layout/top-nav/top-nav-end.compiled.css +0 -1
  30. package/dist/cjs/ui/page-layout/top-nav/top-nav-end.js +1 -1
  31. package/dist/cjs/ui/page-layout/top-nav/top-nav-middle.compiled.css +0 -1
  32. package/dist/cjs/ui/page-layout/top-nav/top-nav-middle.js +1 -1
  33. package/dist/cjs/ui/page-layout/top-nav/top-nav-start.compiled.css +0 -1
  34. package/dist/cjs/ui/page-layout/top-nav/top-nav-start.js +1 -1
  35. package/dist/cjs/ui/page-layout/top-nav/top-nav.compiled.css +0 -1
  36. package/dist/cjs/ui/page-layout/top-nav/top-nav.js +1 -1
  37. package/dist/cjs/ui/top-nav-items/app-switcher.js +7 -2
  38. package/dist/cjs/ui/top-nav-items/custom-title.js +1 -1
  39. package/dist/cjs/ui/top-nav-items/nav-logo/app-logo.compiled.css +0 -1
  40. package/dist/cjs/ui/top-nav-items/nav-logo/app-logo.js +1 -1
  41. package/dist/cjs/ui/top-nav-items/nav-logo/custom-logo.compiled.css +0 -1
  42. package/dist/cjs/ui/top-nav-items/nav-logo/custom-logo.js +1 -1
  43. package/dist/cjs/ui/top-nav-items/nav-logo/logo-renderer.js +1 -1
  44. package/dist/cjs/ui/top-nav-items/search.compiled.css +0 -1
  45. package/dist/cjs/ui/top-nav-items/search.js +1 -1
  46. package/dist/cjs/ui/top-nav-items/themed/themed-anchor.compiled.css +0 -1
  47. package/dist/cjs/ui/top-nav-items/themed/themed-anchor.js +1 -1
  48. package/dist/cjs/ui/top-nav-items/themed/themed-button.js +1 -1
  49. package/dist/cjs/ui/top-nav-items/themed/themed-icon-button.js +2 -2
  50. package/dist/cjs/ui/top-nav-items/themed/themed-link-button.js +1 -1
  51. package/dist/cjs/ui/top-nav-items/themed/themed-link-icon-button.js +1 -1
  52. package/dist/cjs/ui/top-nav-items/themed/themed-pressable.compiled.css +0 -1
  53. package/dist/cjs/ui/top-nav-items/themed/themed-pressable.js +1 -1
  54. package/dist/es2019/components/badge-container.js +1 -1
  55. package/dist/es2019/components/list-item.js +1 -1
  56. package/dist/es2019/components/list.js +1 -1
  57. package/dist/es2019/components/skip-links/skip-link.compiled.css +0 -1
  58. package/dist/es2019/components/skip-links/skip-link.js +1 -1
  59. package/dist/es2019/components/skip-links/skip-links-container.compiled.css +0 -1
  60. package/dist/es2019/components/skip-links/skip-links-container.js +1 -1
  61. package/dist/es2019/components/skip-links/skip-links-popup.js +1 -1
  62. package/dist/es2019/ui/page-layout/aside.compiled.css +0 -1
  63. package/dist/es2019/ui/page-layout/aside.js +1 -1
  64. package/dist/es2019/ui/page-layout/banner.compiled.css +0 -1
  65. package/dist/es2019/ui/page-layout/banner.js +1 -1
  66. package/dist/es2019/ui/page-layout/main/main-sticky-header.js +1 -1
  67. package/dist/es2019/ui/page-layout/main/main.compiled.css +0 -1
  68. package/dist/es2019/ui/page-layout/main/main.js +1 -1
  69. package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.js +2 -2
  70. package/dist/es2019/ui/page-layout/panel.compiled.css +4 -1
  71. package/dist/es2019/ui/page-layout/panel.js +48 -7
  72. package/dist/es2019/ui/page-layout/ribbon.compiled.css +0 -1
  73. package/dist/es2019/ui/page-layout/ribbon.js +1 -1
  74. package/dist/es2019/ui/page-layout/root.js +1 -1
  75. package/dist/es2019/ui/page-layout/side-nav/side-nav-content.js +1 -1
  76. package/dist/es2019/ui/page-layout/side-nav/side-nav-footer.js +1 -1
  77. package/dist/es2019/ui/page-layout/side-nav/side-nav-header.js +1 -1
  78. package/dist/es2019/ui/page-layout/side-nav/side-nav.compiled.css +0 -1
  79. package/dist/es2019/ui/page-layout/side-nav/side-nav.js +1 -1
  80. package/dist/es2019/ui/page-layout/side-nav/toggle-button.js +1 -1
  81. package/dist/es2019/ui/page-layout/top-nav/top-nav-end.compiled.css +0 -1
  82. package/dist/es2019/ui/page-layout/top-nav/top-nav-end.js +1 -1
  83. package/dist/es2019/ui/page-layout/top-nav/top-nav-middle.compiled.css +0 -1
  84. package/dist/es2019/ui/page-layout/top-nav/top-nav-middle.js +1 -1
  85. package/dist/es2019/ui/page-layout/top-nav/top-nav-start.compiled.css +0 -1
  86. package/dist/es2019/ui/page-layout/top-nav/top-nav-start.js +1 -1
  87. package/dist/es2019/ui/page-layout/top-nav/top-nav.compiled.css +0 -1
  88. package/dist/es2019/ui/page-layout/top-nav/top-nav.js +1 -1
  89. package/dist/es2019/ui/top-nav-items/app-switcher.js +22 -15
  90. package/dist/es2019/ui/top-nav-items/custom-title.js +1 -1
  91. package/dist/es2019/ui/top-nav-items/nav-logo/app-logo.compiled.css +0 -1
  92. package/dist/es2019/ui/top-nav-items/nav-logo/app-logo.js +1 -1
  93. package/dist/es2019/ui/top-nav-items/nav-logo/custom-logo.compiled.css +0 -1
  94. package/dist/es2019/ui/top-nav-items/nav-logo/custom-logo.js +1 -1
  95. package/dist/es2019/ui/top-nav-items/nav-logo/logo-renderer.js +1 -1
  96. package/dist/es2019/ui/top-nav-items/search.compiled.css +0 -1
  97. package/dist/es2019/ui/top-nav-items/search.js +1 -1
  98. package/dist/es2019/ui/top-nav-items/themed/themed-anchor.compiled.css +0 -1
  99. package/dist/es2019/ui/top-nav-items/themed/themed-anchor.js +1 -1
  100. package/dist/es2019/ui/top-nav-items/themed/themed-button.js +1 -1
  101. package/dist/es2019/ui/top-nav-items/themed/themed-icon-button.js +2 -2
  102. package/dist/es2019/ui/top-nav-items/themed/themed-link-button.js +1 -1
  103. package/dist/es2019/ui/top-nav-items/themed/themed-link-icon-button.js +1 -1
  104. package/dist/es2019/ui/top-nav-items/themed/themed-pressable.compiled.css +0 -1
  105. package/dist/es2019/ui/top-nav-items/themed/themed-pressable.js +1 -1
  106. package/dist/esm/components/badge-container.js +1 -1
  107. package/dist/esm/components/list-item.js +1 -1
  108. package/dist/esm/components/list.js +1 -1
  109. package/dist/esm/components/skip-links/skip-link.compiled.css +0 -1
  110. package/dist/esm/components/skip-links/skip-link.js +1 -1
  111. package/dist/esm/components/skip-links/skip-links-container.compiled.css +0 -1
  112. package/dist/esm/components/skip-links/skip-links-container.js +1 -1
  113. package/dist/esm/components/skip-links/skip-links-popup.js +1 -1
  114. package/dist/esm/ui/page-layout/aside.compiled.css +0 -1
  115. package/dist/esm/ui/page-layout/aside.js +1 -1
  116. package/dist/esm/ui/page-layout/banner.compiled.css +0 -1
  117. package/dist/esm/ui/page-layout/banner.js +1 -1
  118. package/dist/esm/ui/page-layout/main/main-sticky-header.js +1 -1
  119. package/dist/esm/ui/page-layout/main/main.compiled.css +0 -1
  120. package/dist/esm/ui/page-layout/main/main.js +1 -1
  121. package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.js +2 -2
  122. package/dist/esm/ui/page-layout/panel.compiled.css +4 -1
  123. package/dist/esm/ui/page-layout/panel.js +49 -7
  124. package/dist/esm/ui/page-layout/ribbon.compiled.css +0 -1
  125. package/dist/esm/ui/page-layout/ribbon.js +1 -1
  126. package/dist/esm/ui/page-layout/root.js +1 -1
  127. package/dist/esm/ui/page-layout/side-nav/side-nav-content.js +1 -1
  128. package/dist/esm/ui/page-layout/side-nav/side-nav-footer.js +1 -1
  129. package/dist/esm/ui/page-layout/side-nav/side-nav-header.js +1 -1
  130. package/dist/esm/ui/page-layout/side-nav/side-nav.compiled.css +0 -1
  131. package/dist/esm/ui/page-layout/side-nav/side-nav.js +1 -1
  132. package/dist/esm/ui/page-layout/side-nav/toggle-button.js +1 -1
  133. package/dist/esm/ui/page-layout/top-nav/top-nav-end.compiled.css +0 -1
  134. package/dist/esm/ui/page-layout/top-nav/top-nav-end.js +1 -1
  135. package/dist/esm/ui/page-layout/top-nav/top-nav-middle.compiled.css +0 -1
  136. package/dist/esm/ui/page-layout/top-nav/top-nav-middle.js +1 -1
  137. package/dist/esm/ui/page-layout/top-nav/top-nav-start.compiled.css +0 -1
  138. package/dist/esm/ui/page-layout/top-nav/top-nav-start.js +1 -1
  139. package/dist/esm/ui/page-layout/top-nav/top-nav.compiled.css +0 -1
  140. package/dist/esm/ui/page-layout/top-nav/top-nav.js +1 -1
  141. package/dist/esm/ui/top-nav-items/app-switcher.js +7 -2
  142. package/dist/esm/ui/top-nav-items/custom-title.js +1 -1
  143. package/dist/esm/ui/top-nav-items/nav-logo/app-logo.compiled.css +0 -1
  144. package/dist/esm/ui/top-nav-items/nav-logo/app-logo.js +1 -1
  145. package/dist/esm/ui/top-nav-items/nav-logo/custom-logo.compiled.css +0 -1
  146. package/dist/esm/ui/top-nav-items/nav-logo/custom-logo.js +1 -1
  147. package/dist/esm/ui/top-nav-items/nav-logo/logo-renderer.js +1 -1
  148. package/dist/esm/ui/top-nav-items/search.compiled.css +0 -1
  149. package/dist/esm/ui/top-nav-items/search.js +1 -1
  150. package/dist/esm/ui/top-nav-items/themed/themed-anchor.compiled.css +0 -1
  151. package/dist/esm/ui/top-nav-items/themed/themed-anchor.js +1 -1
  152. package/dist/esm/ui/top-nav-items/themed/themed-button.js +1 -1
  153. package/dist/esm/ui/top-nav-items/themed/themed-icon-button.js +2 -2
  154. package/dist/esm/ui/top-nav-items/themed/themed-link-button.js +1 -1
  155. package/dist/esm/ui/top-nav-items/themed/themed-link-icon-button.js +1 -1
  156. package/dist/esm/ui/top-nav-items/themed/themed-pressable.compiled.css +0 -1
  157. package/dist/esm/ui/top-nav-items/themed/themed-pressable.js +1 -1
  158. package/dist/types/ui/top-nav-items/app-switcher.d.ts +10 -0
  159. package/package.json +17 -7
@@ -1,4 +1,4 @@
1
- /* skip-link.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* skip-link.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./skip-link.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback } from 'react';
@@ -1,4 +1,3 @@
1
-
2
1
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
3
2
  ._zulp1b66{gap:var(--ds-space-050,4px)}
4
3
  ._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
@@ -1,4 +1,4 @@
1
- /* skip-links-container.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* skip-links-container.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./skip-links-container.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* skip-links-popup.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* skip-links-popup.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./skip-links-popup.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,3 @@
1
-
2
1
  ._nd5lns35{grid-area:aside}._152timx3{inset-block-start:calc(var(--n_bnrM, 0px) + var(--n_tNvM, 0px))}
3
2
  ._18m91wug{overflow-y:auto}
4
3
  ._1reo1wug{overflow-x:auto}
@@ -1,4 +1,4 @@
1
- /* aside.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* aside.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./aside.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,3 @@
1
-
2
1
  ._nd5ldkfm{grid-area:banner}._152tidpf{inset-block-start:0}
3
2
  ._18m915vq{overflow-y:hidden}
4
3
  ._1pby11wp{z-index:3}
@@ -1,4 +1,4 @@
1
- /* banner.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* banner.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./banner.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* main-sticky-header.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* main-sticky-header.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./main-sticky-header.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,3 @@
1
-
2
1
  ._nd5l1gzg{grid-area:main}._152timx3{inset-block-start:calc(var(--n_bnrM, 0px) + var(--n_tNvM, 0px))}
3
2
  ._18m91wug{overflow-y:auto}
4
3
  ._19121cl4{isolation:isolate}
@@ -1,4 +1,4 @@
1
- /* main.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* main.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./main.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* panel-splitter.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* panel-splitter.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./panel-splitter.compiled.css";
4
4
  import * as React from 'react';
@@ -17,7 +17,7 @@ import { disableNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/elem
17
17
  import { preventUnhandled } from '@atlaskit/pragmatic-drag-and-drop/prevent-unhandled';
18
18
  import Tooltip from '@atlaskit/tooltip';
19
19
  import TooltipContainer from '@atlaskit/tooltip/TooltipContainer';
20
- import VisuallyHidden from '@atlaskit/visually-hidden';
20
+ import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
21
21
  import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
22
22
  import { contentInsetBlockStart } from '../constants';
23
23
  import { convertResizeBoundToPixels } from './convert-resize-bound-to-pixels';
@@ -1,11 +1,14 @@
1
-
2
1
  ._nd5l1b6c{grid-area:main/aside/aside/aside}
2
+ ._y44v1s3l{animation:var(--ds-panel-enter,.25s cubic-bezier(0,.4,0,1) SlideIn100PercentRight)}
3
+ ._y44vqhwn{animation:var(--ds-panel-exit,.2s cubic-bezier(.6,0,.8,.6) SlideOut100PercentRight)}
3
4
  ._191wglyw{border-inline-start:none}._10fph9n0{justify-self:end}
4
5
  ._152timx3{inset-block-start:calc(var(--n_bnrM, 0px) + var(--n_tNvM, 0px))}
5
6
  ._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
6
7
  ._18m91wug{overflow-y:auto}
7
8
  ._1bsb1dxx{width:min(90%,var(--minWidth))}
8
9
  ._1e0cglyw{display:none}
10
+ ._1o51eoah{animation-fill-mode:backwards}
11
+ ._1o51q7pw{animation-fill-mode:forwards}
9
12
  ._1pbykb7n{z-index:1}
10
13
  ._1reo1wug{overflow-x:auto}
11
14
  ._4t3i1osq{height:100%}
@@ -1,8 +1,11 @@
1
- /* panel.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* panel.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./panel.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
- import { useCallback, useContext, useEffect, useRef, useState } from 'react';
5
+ import { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
6
+ import { cx } from '@compiled/react';
7
+ import mergeRefs from '@atlaskit/ds-lib/merge-refs';
8
+ import { useMotion, Reanimate } from '@atlaskit/motion/use-motion';
6
9
  import { fg } from '@atlaskit/platform-feature-flags';
7
10
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- TODO: migrate to @atlaskit/primitives/compiled
8
11
  import { media } from '@atlaskit/primitives/responsive';
@@ -29,7 +32,9 @@ const styles = {
29
32
  root: "_nd5l1b6c _10fph9n0 _vchhusvi _1pbykb7n _4t3ieqxy _kqsw1if8 _152timx3 _bfhk1bhr _1bsb1dxx _14b54rrg _4ap3vuon _1dhy1c6w _9sns1wug",
30
33
  border: "_191wglyw _16qs130s _1w6eia51 _scbpglyw",
31
34
  scrollContainer: "_1reo1wug _18m91wug _4t3i1osq",
32
- hidden: "_1e0cglyw"
35
+ hidden: "_1e0cglyw",
36
+ entering: "_y44v1s3l _1o51eoah",
37
+ exiting: "_y44vqhwn _1o51q7pw"
33
38
  };
34
39
 
35
40
  /**
@@ -53,6 +58,21 @@ export function Panel({
53
58
  const id = useLayoutId({
54
59
  providedId
55
60
  });
61
+
62
+ // useMotion is applied only when the `platform-dst-motion-uplift-panel` gate is enabled.
63
+ const {
64
+ state,
65
+ ref: motionRef,
66
+ reanimate
67
+ } = useMotion({
68
+ onFinish: state => {
69
+ if (state === 'exiting' && defaultWidthRef.current === 0) {
70
+ // Set width to 0 as animation is complete
71
+ setWidth(0);
72
+ }
73
+ }
74
+ });
75
+ const isMotionUpliftEnabled = fg('platform-dst-motion-uplift-panel');
56
76
  const defaultWidth = useSafeDefaultWidth({
57
77
  defaultWidthProp,
58
78
  fallbackDefaultWidth,
@@ -76,6 +96,13 @@ export function Panel({
76
96
  // Used to track the previous value of the `defaultWidth` prop, for logging dev warnings when it changes.
77
97
  const defaultWidthRef = useRef(defaultWidth);
78
98
 
99
+ // `mergeRefs` returns a new callback ref on every call, and combined with a new array literal
100
+ // this would cause React to detach/re-attach the ref on every render. Memoise it so the merged
101
+ // ref is stable across renders.
102
+ const mergedRef = useMemo(() => isMotionUpliftEnabled ? mergeRefs([ref, motionRef]) : ref,
103
+ // eslint-disable-next-line react-hooks/exhaustive-deps
104
+ [isMotionUpliftEnabled, motionRef]);
105
+
79
106
  /**
80
107
  * TODO: Remove this useEffect once the `width: 0` usage is removed from Jira.
81
108
  * It updates the width state based on changes to `defaultWidth`, as a temporary stopgap to support Jira's current usage.
@@ -85,13 +112,23 @@ export function Panel({
85
112
  if (defaultWidthRef.current === defaultWidth) {
86
113
  return;
87
114
  }
115
+ if (isMotionUpliftEnabled) {
116
+ if (defaultWidth === 0) {
117
+ reanimate(Reanimate.exit);
118
+ defaultWidthRef.current = defaultWidth;
119
+ // Set width to 0 once the exit animation is complete
120
+ return;
121
+ } else if (defaultWidthRef.current === 0) {
122
+ reanimate(Reanimate.enter);
123
+ }
124
+ }
88
125
  defaultWidthRef.current = defaultWidth;
89
126
  setWidth(defaultWidth);
90
127
  if (process.env.NODE_ENV !== 'production') {
91
128
  // eslint-disable-next-line no-console
92
129
  console.warn('Page Layout warning\n\n', 'The value of the `defaultWidth` prop on the `Panel` layout slot component has changed. This should not be changed after the component has been mounted.\n\n', 'In the future, changes to the `defaultWidth` prop will not be respected. It is only supported as a stopgap to enable migration from Nav3 to Nav4.\n\n');
93
130
  }
94
- }, [defaultWidth]);
131
+ }, [defaultWidth, isMotionUpliftEnabled, reanimate]);
95
132
  const sideNavRef = useSideNavRef();
96
133
 
97
134
  /**
@@ -135,15 +172,19 @@ export function Panel({
135
172
  return /*#__PURE__*/React.createElement("section", {
136
173
  id: id,
137
174
  "data-layout-slot": true,
138
- "aria-label": label,
139
- className: ax([styles.root, defaultWidth === 0 && styles.hidden, hasBorder && styles.border, xcss]),
175
+ "aria-label": label
176
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
177
+ ,
178
+ className: ax([styles.root, !isMotionUpliftEnabled && defaultWidth === 0 && styles.hidden, hasBorder && styles.border, isMotionUpliftEnabled ?
179
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
180
+ cx(xcss, state === 'entering' && styles.entering, state === 'exiting' && styles.exiting) : xcss]),
140
181
  style: {
141
182
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values
142
183
  [panelVar]: panelVariableWidth,
143
184
  '--minWidth': `${minWidth}px`
144
185
  },
145
186
  "data-testid": testId,
146
- ref: ref
187
+ ref: mergedRef
147
188
  }, dangerouslyHoistSlotSizes &&
148
189
  /*#__PURE__*/
149
190
  // ------ START UNSAFE STYLES ------
@@ -1,4 +1,3 @@
1
-
2
1
  ._nd5l1c99{grid-area:ribbon}._152tidpf{inset-block-start:0}
3
2
  ._18m915vq{overflow-y:hidden}
4
3
  ._1e0cglyw{display:none}
@@ -1,4 +1,4 @@
1
- /* ribbon.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* ribbon.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./ribbon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* root.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* root.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./root.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useEffect, useRef } from 'react';
@@ -1,4 +1,4 @@
1
- /* side-nav-content.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* side-nav-content.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./side-nav-content.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { forwardRef, useMemo, useRef } from 'react';
@@ -1,4 +1,4 @@
1
- /* side-nav-footer.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* side-nav-footer.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./side-nav-footer.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* side-nav-header.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* side-nav-header.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./side-nav-header.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,3 @@
1
-
2
1
  ._nd5l1b6c{grid-area:main/aside/aside/aside}
3
2
  ._191wglyw{border-inline-start:none}
4
3
  ._t51zglyw{border-inline-end:none}._152timx3{inset-block-start:calc(var(--n_bnrM, 0px) + var(--n_tNvM, 0px))}
@@ -1,4 +1,4 @@
1
- /* side-nav.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* side-nav.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./side-nav.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* toggle-button.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* toggle-button.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./toggle-button.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';
@@ -1,4 +1,3 @@
1
-
2
1
  ._1yt4u2gc{padding:var(--ds-space-100,8px)}
3
2
  ._zulp1b66{gap:var(--ds-space-050,4px)}
4
3
  ._yyhy11wp{grid-column:3}._1bahh9n0{justify-content:end}
@@ -1,4 +1,4 @@
1
- /* top-nav-end.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* top-nav-end.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./top-nav-end.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,3 @@
1
-
2
1
  ._zulpu2gc{gap:var(--ds-space-100,8px)}
3
2
  ._yyhycs5v{grid-column:2}._1bahh9n0{justify-content:end}
4
3
  ._1bsb1osq{width:100%}
@@ -1,4 +1,4 @@
1
- /* top-nav-middle.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* top-nav-middle.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./top-nav-middle.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,3 @@
1
-
2
1
  ._zulp1b66{gap:var(--ds-space-050,4px)}
3
2
  ._zulp1kw7{gap:inherit}
4
3
  ._yyhykb7n{grid-column:1}._15yekb7n{--animation-direction:1}
@@ -1,4 +1,4 @@
1
- /* top-nav-start.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* top-nav-start.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./top-nav-start.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { forwardRef, useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';
@@ -1,4 +1,3 @@
1
-
2
1
  ._nd5l8cbt{grid-area:top-bar}
3
2
  ._zulpu2gc{gap:var(--ds-space-100,8px)}
4
3
  ._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
@@ -1,4 +1,4 @@
1
- /* top-nav.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* top-nav.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./top-nav.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,5 +1,6 @@
1
1
  import React, { forwardRef } from 'react';
2
2
  import AppSwitcherIcon from '@atlaskit/icon/core/app-switcher';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import { IconButton } from './themed/icon-button';
4
5
  const toggleButtonTooltipOptions = {
5
6
  // We're disabling pointer events on the tooltip to prevent it from blocking mouse events, so that the side nav flyout stays open
@@ -14,25 +15,31 @@ const toggleButtonTooltipOptions = {
14
15
  */
15
16
  export const AppSwitcher = /*#__PURE__*/forwardRef(({
16
17
  label,
18
+ icon,
17
19
  onClick,
18
20
  onMouseEnter,
19
21
  interactionName,
20
22
  isSelected,
23
+ testId,
21
24
  'aria-controls': ariaControls,
22
25
  'aria-expanded': ariaExpanded,
23
26
  'aria-haspopup': ariaHasPopup
24
- }, ref) => /*#__PURE__*/React.createElement(IconButton, {
25
- ref: ref,
26
- "aria-controls": ariaControls,
27
- "aria-expanded": ariaExpanded,
28
- "aria-haspopup": ariaHasPopup,
29
- icon: AppSwitcherIcon,
30
- label: label,
31
- appearance: "subtle",
32
- onClick: onClick,
33
- onMouseEnter: onMouseEnter,
34
- interactionName: interactionName,
35
- isTooltipDisabled: false,
36
- tooltip: toggleButtonTooltipOptions,
37
- isSelected: isSelected
38
- }));
27
+ }, ref) => {
28
+ const pickedAppSwitcherIcon = fg('platform_dst_ads_appswitcher_improvements') ? icon !== null && icon !== void 0 ? icon : AppSwitcherIcon : AppSwitcherIcon;
29
+ return /*#__PURE__*/React.createElement(IconButton, {
30
+ ref: ref,
31
+ "aria-controls": ariaControls,
32
+ "aria-expanded": ariaExpanded,
33
+ "aria-haspopup": ariaHasPopup,
34
+ icon: pickedAppSwitcherIcon,
35
+ label: label,
36
+ appearance: "subtle",
37
+ onClick: onClick,
38
+ onMouseEnter: onMouseEnter,
39
+ interactionName: interactionName,
40
+ isTooltipDisabled: false,
41
+ tooltip: toggleButtonTooltipOptions,
42
+ isSelected: isSelected,
43
+ testId: testId
44
+ });
45
+ });
@@ -1,4 +1,4 @@
1
- /* custom-title.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* custom-title.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./custom-title.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,3 @@
1
-
2
1
  ._2rko19bv{border-radius:10px}
3
2
  ._2rko1mok{border-radius:var(--ds-radius-large,8px)}
4
3
  ._18zr1b66{padding-inline:var(--ds-space-050,4px)}._18m915vq{overflow-y:hidden}
@@ -1,4 +1,4 @@
1
- /* app-logo.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* app-logo.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./app-logo.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback, useRef } from 'react';
@@ -1,4 +1,3 @@
1
-
2
1
  ._2rko1mok{border-radius:var(--ds-radius-large,8px)}
3
2
  ._2rkofajl{border-radius:var(--ds-radius-small,3px)}
4
3
  ._18zr1b66{padding-inline:var(--ds-space-050,4px)}._18m915vq{overflow-y:hidden}
@@ -1,4 +1,4 @@
1
- /* custom-logo.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* custom-logo.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./custom-logo.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useEffect, useRef } from 'react';
@@ -1,4 +1,4 @@
1
- /* logo-renderer.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* logo-renderer.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import * as React from 'react';
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import { useHasCustomTheme } from '../themed/has-custom-theme-context';
@@ -1,4 +1,3 @@
1
-
2
1
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
3
2
  ._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}._18zr12x7{padding-inline:var(--ds-space-075,6px)}
4
3
  ._1ii7kb7n{grid-row:1}
@@ -1,4 +1,4 @@
1
- /* search.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* search.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./search.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { Fragment } from 'react';
@@ -1,4 +1,3 @@
1
-
2
1
  ._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
3
2
  ._11q71c9b{background:var(--ds-top-bar-button-disabled-background)}
4
3
  ._11q71qds{background:var(--ds-top-bar-button-selected-background)}
@@ -1,4 +1,4 @@
1
- /* themed-anchor.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* themed-anchor.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./themed-anchor.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* themed-button.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* themed-button.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./themed-button.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,10 +1,10 @@
1
- /* themed-icon-button.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* themed-icon-button.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { forwardRef } from 'react';
5
5
  import mergeRefs from '@atlaskit/ds-lib/merge-refs';
6
6
  import Tooltip from '@atlaskit/tooltip';
7
- import VisuallyHidden from '@atlaskit/visually-hidden';
7
+ import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
8
8
  import IconRenderer from '../icon-renderer';
9
9
  import { ThemedPressable } from './themed-pressable';
10
10
  export const ThemedIconButton = /*#__PURE__*/forwardRef(function ThemedIconButton({
@@ -1,4 +1,4 @@
1
- /* themed-link-button.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* themed-link-button.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./themed-link-button.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import forwardRefWithGeneric from '@atlaskit/ds-lib/forward-ref-with-generic';
4
4
  import mergeRefs from '@atlaskit/ds-lib/merge-refs';
5
5
  import Tooltip from '@atlaskit/tooltip';
6
- import VisuallyHidden from '@atlaskit/visually-hidden';
6
+ import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
7
7
  import { ThemedAnchor } from './themed-anchor';
8
8
 
9
9
  /**
@@ -1,4 +1,3 @@
1
-
2
1
  ._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
3
2
  ._11q71c9b{background:var(--ds-top-bar-button-disabled-background)}
4
3
  ._11q71qds{background:var(--ds-top-bar-button-selected-background)}
@@ -1,4 +1,4 @@
1
- /* themed-pressable.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* themed-pressable.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./themed-pressable.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* badge-container.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* badge-container.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./badge-container.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* list-item.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* list-item.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import * as React from 'react';
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import { forwardRef } from 'react';
@@ -1,4 +1,4 @@
1
- /* list.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* list.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import * as React from 'react';
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import { forwardRef } from 'react';
@@ -1,2 +1 @@
1
-
2
1
  ._1rjcu2gc{padding-block:var(--ds-space-100,8px)}._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
@@ -1,4 +1,4 @@
1
- /* skip-link.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* skip-link.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./skip-link.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback } from 'react';
@@ -1,4 +1,3 @@
1
-
2
1
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
3
2
  ._zulp1b66{gap:var(--ds-space-050,4px)}
4
3
  ._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
@@ -1,4 +1,4 @@
1
- /* skip-links-container.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* skip-links-container.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import "./skip-links-container.compiled.css";
@@ -1,4 +1,4 @@
1
- /* skip-links-popup.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* skip-links-popup.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./skip-links-popup.compiled.css";
@@ -1,4 +1,3 @@
1
-
2
1
  ._nd5lns35{grid-area:aside}._152timx3{inset-block-start:calc(var(--n_bnrM, 0px) + var(--n_tNvM, 0px))}
3
2
  ._18m91wug{overflow-y:auto}
4
3
  ._1reo1wug{overflow-x:auto}
@@ -1,4 +1,4 @@
1
- /* aside.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* aside.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./aside.compiled.css";
@@ -1,4 +1,3 @@
1
-
2
1
  ._nd5ldkfm{grid-area:banner}._152tidpf{inset-block-start:0}
3
2
  ._18m915vq{overflow-y:hidden}
4
3
  ._1pby11wp{z-index:3}
@@ -1,4 +1,4 @@
1
- /* banner.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* banner.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./banner.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* main-sticky-header.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* main-sticky-header.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./main-sticky-header.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,3 @@
1
-
2
1
  ._nd5l1gzg{grid-area:main}._152timx3{inset-block-start:calc(var(--n_bnrM, 0px) + var(--n_tNvM, 0px))}
3
2
  ._18m91wug{overflow-y:auto}
4
3
  ._19121cl4{isolation:isolate}
@@ -1,4 +1,4 @@
1
- /* main.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* main.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./main.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";