@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.
- package/CHANGELOG.md +63 -0
- package/dist/cjs/components/badge-container.js +1 -1
- package/dist/cjs/components/list-item.js +1 -1
- package/dist/cjs/components/list.js +1 -1
- package/dist/cjs/components/skip-links/skip-link.compiled.css +0 -1
- package/dist/cjs/components/skip-links/skip-link.js +1 -1
- package/dist/cjs/components/skip-links/skip-links-container.compiled.css +0 -1
- package/dist/cjs/components/skip-links/skip-links-container.js +1 -1
- package/dist/cjs/components/skip-links/skip-links-popup.js +1 -1
- package/dist/cjs/ui/page-layout/aside.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/aside.js +1 -1
- package/dist/cjs/ui/page-layout/banner.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/banner.js +1 -1
- package/dist/cjs/ui/page-layout/main/main-sticky-header.js +1 -1
- package/dist/cjs/ui/page-layout/main/main.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/main/main.js +1 -1
- package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.js +2 -2
- package/dist/cjs/ui/page-layout/panel.compiled.css +4 -1
- package/dist/cjs/ui/page-layout/panel.js +48 -6
- package/dist/cjs/ui/page-layout/ribbon.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/ribbon.js +1 -1
- package/dist/cjs/ui/page-layout/root.js +1 -1
- package/dist/cjs/ui/page-layout/side-nav/side-nav-content.js +1 -1
- package/dist/cjs/ui/page-layout/side-nav/side-nav-footer.js +1 -1
- package/dist/cjs/ui/page-layout/side-nav/side-nav-header.js +1 -1
- package/dist/cjs/ui/page-layout/side-nav/side-nav.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/side-nav/side-nav.js +1 -1
- package/dist/cjs/ui/page-layout/side-nav/toggle-button.js +1 -1
- 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 +1 -1
- package/dist/cjs/ui/page-layout/top-nav/top-nav-middle.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/top-nav/top-nav-middle.js +1 -1
- package/dist/cjs/ui/page-layout/top-nav/top-nav-start.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/top-nav/top-nav-start.js +1 -1
- package/dist/cjs/ui/page-layout/top-nav/top-nav.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/top-nav/top-nav.js +1 -1
- package/dist/cjs/ui/top-nav-items/app-switcher.js +7 -2
- package/dist/cjs/ui/top-nav-items/custom-title.js +1 -1
- package/dist/cjs/ui/top-nav-items/nav-logo/app-logo.compiled.css +0 -1
- package/dist/cjs/ui/top-nav-items/nav-logo/app-logo.js +1 -1
- package/dist/cjs/ui/top-nav-items/nav-logo/custom-logo.compiled.css +0 -1
- package/dist/cjs/ui/top-nav-items/nav-logo/custom-logo.js +1 -1
- package/dist/cjs/ui/top-nav-items/nav-logo/logo-renderer.js +1 -1
- package/dist/cjs/ui/top-nav-items/search.compiled.css +0 -1
- package/dist/cjs/ui/top-nav-items/search.js +1 -1
- package/dist/cjs/ui/top-nav-items/themed/themed-anchor.compiled.css +0 -1
- package/dist/cjs/ui/top-nav-items/themed/themed-anchor.js +1 -1
- package/dist/cjs/ui/top-nav-items/themed/themed-button.js +1 -1
- package/dist/cjs/ui/top-nav-items/themed/themed-icon-button.js +2 -2
- package/dist/cjs/ui/top-nav-items/themed/themed-link-button.js +1 -1
- package/dist/cjs/ui/top-nav-items/themed/themed-link-icon-button.js +1 -1
- package/dist/cjs/ui/top-nav-items/themed/themed-pressable.compiled.css +0 -1
- package/dist/cjs/ui/top-nav-items/themed/themed-pressable.js +1 -1
- package/dist/es2019/components/badge-container.js +1 -1
- package/dist/es2019/components/list-item.js +1 -1
- package/dist/es2019/components/list.js +1 -1
- package/dist/es2019/components/skip-links/skip-link.compiled.css +0 -1
- package/dist/es2019/components/skip-links/skip-link.js +1 -1
- package/dist/es2019/components/skip-links/skip-links-container.compiled.css +0 -1
- package/dist/es2019/components/skip-links/skip-links-container.js +1 -1
- package/dist/es2019/components/skip-links/skip-links-popup.js +1 -1
- package/dist/es2019/ui/page-layout/aside.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/aside.js +1 -1
- package/dist/es2019/ui/page-layout/banner.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/banner.js +1 -1
- package/dist/es2019/ui/page-layout/main/main-sticky-header.js +1 -1
- package/dist/es2019/ui/page-layout/main/main.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/main/main.js +1 -1
- package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.js +2 -2
- package/dist/es2019/ui/page-layout/panel.compiled.css +4 -1
- package/dist/es2019/ui/page-layout/panel.js +48 -7
- package/dist/es2019/ui/page-layout/ribbon.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/ribbon.js +1 -1
- package/dist/es2019/ui/page-layout/root.js +1 -1
- package/dist/es2019/ui/page-layout/side-nav/side-nav-content.js +1 -1
- package/dist/es2019/ui/page-layout/side-nav/side-nav-footer.js +1 -1
- package/dist/es2019/ui/page-layout/side-nav/side-nav-header.js +1 -1
- package/dist/es2019/ui/page-layout/side-nav/side-nav.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/side-nav/side-nav.js +1 -1
- package/dist/es2019/ui/page-layout/side-nav/toggle-button.js +1 -1
- 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 +1 -1
- package/dist/es2019/ui/page-layout/top-nav/top-nav-middle.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/top-nav/top-nav-middle.js +1 -1
- package/dist/es2019/ui/page-layout/top-nav/top-nav-start.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/top-nav/top-nav-start.js +1 -1
- package/dist/es2019/ui/page-layout/top-nav/top-nav.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/top-nav/top-nav.js +1 -1
- package/dist/es2019/ui/top-nav-items/app-switcher.js +22 -15
- package/dist/es2019/ui/top-nav-items/custom-title.js +1 -1
- package/dist/es2019/ui/top-nav-items/nav-logo/app-logo.compiled.css +0 -1
- package/dist/es2019/ui/top-nav-items/nav-logo/app-logo.js +1 -1
- package/dist/es2019/ui/top-nav-items/nav-logo/custom-logo.compiled.css +0 -1
- package/dist/es2019/ui/top-nav-items/nav-logo/custom-logo.js +1 -1
- package/dist/es2019/ui/top-nav-items/nav-logo/logo-renderer.js +1 -1
- package/dist/es2019/ui/top-nav-items/search.compiled.css +0 -1
- package/dist/es2019/ui/top-nav-items/search.js +1 -1
- package/dist/es2019/ui/top-nav-items/themed/themed-anchor.compiled.css +0 -1
- package/dist/es2019/ui/top-nav-items/themed/themed-anchor.js +1 -1
- package/dist/es2019/ui/top-nav-items/themed/themed-button.js +1 -1
- package/dist/es2019/ui/top-nav-items/themed/themed-icon-button.js +2 -2
- package/dist/es2019/ui/top-nav-items/themed/themed-link-button.js +1 -1
- package/dist/es2019/ui/top-nav-items/themed/themed-link-icon-button.js +1 -1
- package/dist/es2019/ui/top-nav-items/themed/themed-pressable.compiled.css +0 -1
- package/dist/es2019/ui/top-nav-items/themed/themed-pressable.js +1 -1
- package/dist/esm/components/badge-container.js +1 -1
- package/dist/esm/components/list-item.js +1 -1
- package/dist/esm/components/list.js +1 -1
- package/dist/esm/components/skip-links/skip-link.compiled.css +0 -1
- package/dist/esm/components/skip-links/skip-link.js +1 -1
- package/dist/esm/components/skip-links/skip-links-container.compiled.css +0 -1
- package/dist/esm/components/skip-links/skip-links-container.js +1 -1
- package/dist/esm/components/skip-links/skip-links-popup.js +1 -1
- package/dist/esm/ui/page-layout/aside.compiled.css +0 -1
- package/dist/esm/ui/page-layout/aside.js +1 -1
- package/dist/esm/ui/page-layout/banner.compiled.css +0 -1
- package/dist/esm/ui/page-layout/banner.js +1 -1
- package/dist/esm/ui/page-layout/main/main-sticky-header.js +1 -1
- package/dist/esm/ui/page-layout/main/main.compiled.css +0 -1
- package/dist/esm/ui/page-layout/main/main.js +1 -1
- package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.js +2 -2
- package/dist/esm/ui/page-layout/panel.compiled.css +4 -1
- package/dist/esm/ui/page-layout/panel.js +49 -7
- package/dist/esm/ui/page-layout/ribbon.compiled.css +0 -1
- package/dist/esm/ui/page-layout/ribbon.js +1 -1
- package/dist/esm/ui/page-layout/root.js +1 -1
- package/dist/esm/ui/page-layout/side-nav/side-nav-content.js +1 -1
- package/dist/esm/ui/page-layout/side-nav/side-nav-footer.js +1 -1
- package/dist/esm/ui/page-layout/side-nav/side-nav-header.js +1 -1
- package/dist/esm/ui/page-layout/side-nav/side-nav.compiled.css +0 -1
- package/dist/esm/ui/page-layout/side-nav/side-nav.js +1 -1
- package/dist/esm/ui/page-layout/side-nav/toggle-button.js +1 -1
- 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 +1 -1
- package/dist/esm/ui/page-layout/top-nav/top-nav-middle.compiled.css +0 -1
- package/dist/esm/ui/page-layout/top-nav/top-nav-middle.js +1 -1
- package/dist/esm/ui/page-layout/top-nav/top-nav-start.compiled.css +0 -1
- package/dist/esm/ui/page-layout/top-nav/top-nav-start.js +1 -1
- package/dist/esm/ui/page-layout/top-nav/top-nav.compiled.css +0 -1
- package/dist/esm/ui/page-layout/top-nav/top-nav.js +1 -1
- package/dist/esm/ui/top-nav-items/app-switcher.js +7 -2
- package/dist/esm/ui/top-nav-items/custom-title.js +1 -1
- package/dist/esm/ui/top-nav-items/nav-logo/app-logo.compiled.css +0 -1
- package/dist/esm/ui/top-nav-items/nav-logo/app-logo.js +1 -1
- package/dist/esm/ui/top-nav-items/nav-logo/custom-logo.compiled.css +0 -1
- package/dist/esm/ui/top-nav-items/nav-logo/custom-logo.js +1 -1
- package/dist/esm/ui/top-nav-items/nav-logo/logo-renderer.js +1 -1
- package/dist/esm/ui/top-nav-items/search.compiled.css +0 -1
- package/dist/esm/ui/top-nav-items/search.js +1 -1
- package/dist/esm/ui/top-nav-items/themed/themed-anchor.compiled.css +0 -1
- package/dist/esm/ui/top-nav-items/themed/themed-anchor.js +1 -1
- package/dist/esm/ui/top-nav-items/themed/themed-button.js +1 -1
- package/dist/esm/ui/top-nav-items/themed/themed-icon-button.js +2 -2
- package/dist/esm/ui/top-nav-items/themed/themed-link-button.js +1 -1
- package/dist/esm/ui/top-nav-items/themed/themed-link-icon-button.js +1 -1
- package/dist/esm/ui/top-nav-items/themed/themed-pressable.compiled.css +0 -1
- package/dist/esm/ui/top-nav-items/themed/themed-pressable.js +1 -1
- package/dist/types/ui/top-nav-items/app-switcher.d.ts +10 -0
- package/package.json +17 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* skip-links-container.tsx generated by @compiled/babel-plugin v0.
|
|
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.
|
|
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,4 @@
|
|
|
1
|
-
/* main-sticky-header.tsx generated by @compiled/babel-plugin v0.
|
|
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,4 @@
|
|
|
1
|
-
/* panel-splitter.tsx generated by @compiled/babel-plugin v0.
|
|
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.
|
|
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
|
-
|
|
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:
|
|
187
|
+
ref: mergedRef
|
|
147
188
|
}, dangerouslyHoistSlotSizes &&
|
|
148
189
|
/*#__PURE__*/
|
|
149
190
|
// ------ START UNSAFE STYLES ------
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* side-nav-content.tsx generated by @compiled/babel-plugin v0.
|
|
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.tsx generated by @compiled/babel-plugin v0.
|
|
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.
|
|
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,4 @@
|
|
|
1
|
-
/* top-nav-end.tsx generated by @compiled/babel-plugin v0.
|
|
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,4 @@
|
|
|
1
|
-
/* top-nav-start.tsx generated by @compiled/babel-plugin v0.
|
|
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,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) =>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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-logo.tsx generated by @compiled/babel-plugin v0.
|
|
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.
|
|
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
|
._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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
-
/* skip-links-container.tsx generated by @compiled/babel-plugin v0.
|
|
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.
|
|
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,4 @@
|
|
|
1
|
-
/* aside.tsx generated by @compiled/babel-plugin v0.
|
|
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,4 @@
|
|
|
1
|
-
/* main-sticky-header.tsx generated by @compiled/babel-plugin v0.
|
|
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';
|