@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
- /* 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 _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
@@ -23,7 +23,7 @@ import { disableNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/elem
23
23
  import { preventUnhandled } from '@atlaskit/pragmatic-drag-and-drop/prevent-unhandled';
24
24
  import Tooltip from '@atlaskit/tooltip';
25
25
  import TooltipContainer from '@atlaskit/tooltip/TooltipContainer';
26
- import VisuallyHidden from '@atlaskit/visually-hidden';
26
+ import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
27
27
  import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
28
28
  import { contentInsetBlockStart } from '../constants';
29
29
  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,10 +1,13 @@
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 _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./panel.compiled.css";
5
5
  import * as React from 'react';
6
6
  import { ax, ix } from "@compiled/react/runtime";
7
- import { useCallback, useContext, useEffect, useRef, useState } from 'react';
7
+ import { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
8
+ import { cx } from '@compiled/react';
9
+ import mergeRefs from '@atlaskit/ds-lib/merge-refs';
10
+ import { useMotion, Reanimate } from '@atlaskit/motion/use-motion';
8
11
  import { fg } from '@atlaskit/platform-feature-flags';
9
12
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- TODO: migrate to @atlaskit/primitives/compiled
10
13
  import { media } from '@atlaskit/primitives/responsive';
@@ -31,7 +34,9 @@ var styles = {
31
34
  root: "_nd5l1b6c _10fph9n0 _vchhusvi _1pbykb7n _4t3ieqxy _kqsw1if8 _152timx3 _bfhk1bhr _1bsb1dxx _14b54rrg _4ap3vuon _1dhy1c6w _9sns1wug",
32
35
  border: "_191wglyw _16qs130s _1w6eia51 _scbpglyw",
33
36
  scrollContainer: "_1reo1wug _18m91wug _4t3i1osq",
34
- hidden: "_1e0cglyw"
37
+ hidden: "_1e0cglyw",
38
+ entering: "_y44v1s3l _1o51eoah",
39
+ exiting: "_y44vqhwn _1o51q7pw"
35
40
  };
36
41
 
37
42
  /**
@@ -58,6 +63,20 @@ export function Panel(_ref) {
58
63
  var id = useLayoutId({
59
64
  providedId: providedId
60
65
  });
66
+
67
+ // useMotion is applied only when the `platform-dst-motion-uplift-panel` gate is enabled.
68
+ var _useMotion = useMotion({
69
+ onFinish: function onFinish(state) {
70
+ if (state === 'exiting' && defaultWidthRef.current === 0) {
71
+ // Set width to 0 as animation is complete
72
+ setWidth(0);
73
+ }
74
+ }
75
+ }),
76
+ state = _useMotion.state,
77
+ motionRef = _useMotion.ref,
78
+ reanimate = _useMotion.reanimate;
79
+ var isMotionUpliftEnabled = fg('platform-dst-motion-uplift-panel');
61
80
  var defaultWidth = useSafeDefaultWidth({
62
81
  defaultWidthProp: defaultWidthProp,
63
82
  fallbackDefaultWidth: fallbackDefaultWidth,
@@ -84,6 +103,15 @@ export function Panel(_ref) {
84
103
  // Used to track the previous value of the `defaultWidth` prop, for logging dev warnings when it changes.
85
104
  var defaultWidthRef = useRef(defaultWidth);
86
105
 
106
+ // `mergeRefs` returns a new callback ref on every call, and combined with a new array literal
107
+ // this would cause React to detach/re-attach the ref on every render. Memoise it so the merged
108
+ // ref is stable across renders.
109
+ var mergedRef = useMemo(function () {
110
+ return isMotionUpliftEnabled ? mergeRefs([ref, motionRef]) : ref;
111
+ },
112
+ // eslint-disable-next-line react-hooks/exhaustive-deps
113
+ [isMotionUpliftEnabled, motionRef]);
114
+
87
115
  /**
88
116
  * TODO: Remove this useEffect once the `width: 0` usage is removed from Jira.
89
117
  * It updates the width state based on changes to `defaultWidth`, as a temporary stopgap to support Jira's current usage.
@@ -93,13 +121,23 @@ export function Panel(_ref) {
93
121
  if (defaultWidthRef.current === defaultWidth) {
94
122
  return;
95
123
  }
124
+ if (isMotionUpliftEnabled) {
125
+ if (defaultWidth === 0) {
126
+ reanimate(Reanimate.exit);
127
+ defaultWidthRef.current = defaultWidth;
128
+ // Set width to 0 once the exit animation is complete
129
+ return;
130
+ } else if (defaultWidthRef.current === 0) {
131
+ reanimate(Reanimate.enter);
132
+ }
133
+ }
96
134
  defaultWidthRef.current = defaultWidth;
97
135
  setWidth(defaultWidth);
98
136
  if (process.env.NODE_ENV !== 'production') {
99
137
  // eslint-disable-next-line no-console
100
138
  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');
101
139
  }
102
- }, [defaultWidth]);
140
+ }, [defaultWidth, isMotionUpliftEnabled, reanimate]);
103
141
  var sideNavRef = useSideNavRef();
104
142
 
105
143
  /**
@@ -143,11 +181,15 @@ export function Panel(_ref) {
143
181
  return /*#__PURE__*/React.createElement("section", {
144
182
  id: id,
145
183
  "data-layout-slot": true,
146
- "aria-label": label,
147
- className: ax([styles.root, defaultWidth === 0 && styles.hidden, hasBorder && styles.border, xcss]),
184
+ "aria-label": label
185
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
186
+ ,
187
+ className: ax([styles.root, !isMotionUpliftEnabled && defaultWidth === 0 && styles.hidden, hasBorder && styles.border, isMotionUpliftEnabled ?
188
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
189
+ cx(xcss, state === 'entering' && styles.entering, state === 'exiting' && styles.exiting) : xcss]),
148
190
  style: _defineProperty(_defineProperty({}, panelVar, panelVariableWidth), '--minWidth', "".concat(minWidth, "px")),
149
191
  "data-testid": testId,
150
- ref: ref
192
+ ref: mergedRef
151
193
  }, dangerouslyHoistSlotSizes &&
152
194
  /*#__PURE__*/
153
195
  // ------ 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 _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
@@ -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 _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./toggle-button.compiled.css";
@@ -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 _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./top-nav-end.compiled.css";
@@ -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 _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./top-nav-start.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -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
  var 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,19 +15,22 @@ var toggleButtonTooltipOptions = {
14
15
  */
15
16
  export var AppSwitcher = /*#__PURE__*/forwardRef(function (_ref, ref) {
16
17
  var label = _ref.label,
18
+ icon = _ref.icon,
17
19
  onClick = _ref.onClick,
18
20
  onMouseEnter = _ref.onMouseEnter,
19
21
  interactionName = _ref.interactionName,
20
22
  isSelected = _ref.isSelected,
23
+ testId = _ref.testId,
21
24
  ariaControls = _ref['aria-controls'],
22
25
  ariaExpanded = _ref['aria-expanded'],
23
26
  ariaHasPopup = _ref['aria-haspopup'];
27
+ var pickedAppSwitcherIcon = fg('platform_dst_ads_appswitcher_improvements') ? icon !== null && icon !== void 0 ? icon : AppSwitcherIcon : AppSwitcherIcon;
24
28
  return /*#__PURE__*/React.createElement(IconButton, {
25
29
  ref: ref,
26
30
  "aria-controls": ariaControls,
27
31
  "aria-expanded": ariaExpanded,
28
32
  "aria-haspopup": ariaHasPopup,
29
- icon: AppSwitcherIcon,
33
+ icon: pickedAppSwitcherIcon,
30
34
  label: label,
31
35
  appearance: "subtle",
32
36
  onClick: onClick,
@@ -34,6 +38,7 @@ export var AppSwitcher = /*#__PURE__*/forwardRef(function (_ref, ref) {
34
38
  interactionName: interactionName,
35
39
  isTooltipDisabled: false,
36
40
  tooltip: toggleButtonTooltipOptions,
37
- isSelected: isSelected
41
+ isSelected: isSelected,
42
+ testId: testId
38
43
  });
39
44
  });
@@ -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 _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["appearance", "shape", "isSelected", "isDisabled"];
@@ -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 _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["iconBefore", "children"];
@@ -1,4 +1,4 @@
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 _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["icon", "label", "tooltip"];
@@ -6,7 +6,7 @@ import { ax, ix } from "@compiled/react/runtime";
6
6
  import React, { forwardRef } from 'react';
7
7
  import mergeRefs from '@atlaskit/ds-lib/merge-refs';
8
8
  import Tooltip from '@atlaskit/tooltip';
9
- import VisuallyHidden from '@atlaskit/visually-hidden';
9
+ import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
10
10
  import IconRenderer from '../icon-renderer';
11
11
  import { ThemedPressable } from './themed-pressable';
12
12
  export var ThemedIconButton = /*#__PURE__*/forwardRef(function ThemedIconButton(_ref, ref) {
@@ -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 _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["iconBefore", "children"];
@@ -5,7 +5,7 @@ import React from 'react';
5
5
  import forwardRefWithGeneric from '@atlaskit/ds-lib/forward-ref-with-generic';
6
6
  import mergeRefs from '@atlaskit/ds-lib/merge-refs';
7
7
  import Tooltip from '@atlaskit/tooltip';
8
- import VisuallyHidden from '@atlaskit/visually-hidden';
8
+ import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
9
9
  import { ThemedAnchor } from './themed-anchor';
10
10
 
11
11
  /**
@@ -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 _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["appearance", "shape", "isSelected", "isDisabled"];
@@ -1,10 +1,16 @@
1
1
  import React from 'react';
2
+ import { type IconButtonProps } from '@atlaskit/button/new';
2
3
  import type { TriggerProps } from '@atlaskit/popup/types';
3
4
  interface AppSwitcherProps extends Partial<Omit<TriggerProps, 'ref' | 'data-ds--level'>> {
4
5
  /**
5
6
  * Provide an accessible label, often used by screen readers.
6
7
  */
7
8
  label: React.ReactNode;
9
+ /**
10
+ * Allows a custom visual to be used instead of the Atlassian AppSwitcher icon.
11
+ * Defaults to the Atlassian app switcher icon.
12
+ */
13
+ icon?: IconButtonProps['icon'];
8
14
  /**
9
15
  * Handler called on click.
10
16
  */
@@ -22,6 +28,10 @@ interface AppSwitcherProps extends Partial<Omit<TriggerProps, 'ref' | 'data-ds--
22
28
  * Indicates that the button is selected.
23
29
  */
24
30
  isSelected?: boolean;
31
+ /**
32
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
33
+ */
34
+ testId?: string;
25
35
  }
26
36
  /**
27
37
  * __App switcher__
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/navigation-system",
3
- "version": "10.5.7",
3
+ "version": "10.7.0",
4
4
  "description": "The latest navigation system for Atlassian apps.",
5
5
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
6
6
  "author": "Atlassian Pty Ltd",
@@ -59,21 +59,22 @@
59
59
  "@atlaskit/button": "^24.3.0",
60
60
  "@atlaskit/css": "^1.0.0",
61
61
  "@atlaskit/ds-lib": "^8.0.0",
62
- "@atlaskit/icon": "^37.0.0",
62
+ "@atlaskit/icon": "^37.1.0",
63
63
  "@atlaskit/layering": "^4.1.0",
64
64
  "@atlaskit/logo": "^21.4.0",
65
+ "@atlaskit/motion": "^7.5.0",
65
66
  "@atlaskit/platform-feature-flags": "^2.0.0",
66
67
  "@atlaskit/platform-feature-flags-react": "^1.1.0",
67
68
  "@atlaskit/popup": "^5.1.0",
68
69
  "@atlaskit/pragmatic-drag-and-drop": "^2.0.0",
69
70
  "@atlaskit/primitives": "^22.0.0",
70
71
  "@atlaskit/react-compiler-gating": "^0.2.0",
71
- "@atlaskit/side-nav-items": "^2.2.0",
72
- "@atlaskit/tokens": "^16.0.0",
72
+ "@atlaskit/side-nav-items": "^2.3.0",
73
+ "@atlaskit/tokens": "^16.1.0",
73
74
  "@atlaskit/tooltip": "^23.1.0",
74
75
  "@atlaskit/visually-hidden": "^4.2.0",
75
76
  "@babel/runtime": "^7.0.0",
76
- "@compiled/react": "^0.20.0",
77
+ "@compiled/react": "^0.22.2",
77
78
  "bind-event-listener": "^3.0.0",
78
79
  "raf-schd": "^4.0.3",
79
80
  "tiny-invariant": "^1.2.0"
@@ -109,7 +110,7 @@
109
110
  "@atlaskit/textfield": "^9.1.0",
110
111
  "@atlaskit/top-layer": "^1.8.0",
111
112
  "@atlassian/feature-flags-test-utils": "^1.2.0",
112
- "@atlassian/gemini": "^1.49.0",
113
+ "@atlassian/gemini": "^1.51.0",
113
114
  "@atlassian/search-dialog": "^10.5.0",
114
115
  "@atlassian/ssr-tests": "workspace:^",
115
116
  "@atlassian/test-utils": "^1.1.0",
@@ -129,7 +130,8 @@
129
130
  "dom-events": "use-bind-event-listener",
130
131
  "design-tokens": [
131
132
  "color",
132
- "spacing"
133
+ "spacing",
134
+ "motion"
133
135
  ],
134
136
  "deprecation": "no-deprecated-imports",
135
137
  "imports": [
@@ -171,6 +173,14 @@
171
173
  "type": "boolean",
172
174
  "referenceOnly": true
173
175
  },
176
+ "platform-dst-motion-uplift-panel": {
177
+ "type": "boolean",
178
+ "referenceOnly": true
179
+ },
180
+ "platform_dst_ads_appswitcher_improvements": {
181
+ "type": "boolean",
182
+ "referenceOnly": true
183
+ },
174
184
  "platform-ads-nav-fixed-height": {
175
185
  "type": "boolean"
176
186
  }