@atlaskit/navigation-system 11.2.3 → 11.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/cjs/ui/fhs-rollout/is-custom-is-fhs-enabled-context.js +2 -2
- package/dist/cjs/ui/fhs-rollout/is-fhs-enabled-context.js +6 -6
- package/dist/cjs/ui/fhs-rollout/is-fhs-enabled-provider.js +14 -18
- package/dist/cjs/ui/fhs-rollout/use-is-fhs-enabled.js +5 -5
- package/dist/cjs/ui/page-layout/banner.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/banner.js +2 -5
- package/dist/cjs/ui/page-layout/constants.js +1 -13
- package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.js +2 -5
- package/dist/cjs/ui/page-layout/panel-splitter/side-nav-panel-splitter.js +0 -68
- package/dist/cjs/ui/page-layout/ribbon.js +0 -7
- package/dist/cjs/ui/page-layout/side-nav/side-nav-content.js +1 -9
- package/dist/cjs/ui/page-layout/side-nav/side-nav.compiled.css +3 -10
- package/dist/cjs/ui/page-layout/side-nav/side-nav.js +21 -54
- package/dist/cjs/ui/page-layout/top-nav/top-nav-end.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/top-nav/top-nav-end.js +2 -5
- package/dist/cjs/ui/page-layout/top-nav/top-nav-start.compiled.css +2 -12
- package/dist/cjs/ui/page-layout/top-nav/top-nav-start.js +9 -250
- package/dist/cjs/ui/page-layout/top-nav/top-nav.compiled.css +1 -15
- package/dist/cjs/ui/page-layout/top-nav/top-nav.js +5 -16
- package/dist/cjs/ui/top-nav-items/nav-logo/app-logo.compiled.css +0 -2
- package/dist/cjs/ui/top-nav-items/nav-logo/app-logo.js +6 -11
- package/dist/cjs/ui/top-nav-items/nav-logo/custom-logo.compiled.css +0 -2
- package/dist/cjs/ui/top-nav-items/nav-logo/custom-logo.js +3 -6
- package/dist/cjs/ui/top-nav-items/search.compiled.css +3 -2
- package/dist/cjs/ui/top-nav-items/search.js +3 -7
- package/dist/es2019/ui/fhs-rollout/is-custom-is-fhs-enabled-context.js +2 -2
- package/dist/es2019/ui/fhs-rollout/is-fhs-enabled-context.js +6 -4
- package/dist/es2019/ui/fhs-rollout/is-fhs-enabled-provider.js +12 -17
- package/dist/es2019/ui/fhs-rollout/use-is-fhs-enabled.js +5 -8
- package/dist/es2019/ui/page-layout/banner.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/banner.js +2 -5
- package/dist/es2019/ui/page-layout/constants.js +0 -12
- package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.js +2 -5
- package/dist/es2019/ui/page-layout/panel-splitter/side-nav-panel-splitter.js +2 -61
- package/dist/es2019/ui/page-layout/ribbon.js +0 -7
- package/dist/es2019/ui/page-layout/side-nav/side-nav-content.js +2 -8
- package/dist/es2019/ui/page-layout/side-nav/side-nav.compiled.css +3 -10
- package/dist/es2019/ui/page-layout/side-nav/side-nav.js +5 -44
- package/dist/es2019/ui/page-layout/top-nav/top-nav-end.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/top-nav/top-nav-end.js +2 -5
- package/dist/es2019/ui/page-layout/top-nav/top-nav-start.compiled.css +2 -12
- package/dist/es2019/ui/page-layout/top-nav/top-nav-start.js +6 -243
- package/dist/es2019/ui/page-layout/top-nav/top-nav.compiled.css +1 -15
- package/dist/es2019/ui/page-layout/top-nav/top-nav.js +5 -18
- package/dist/es2019/ui/top-nav-items/nav-logo/app-logo.compiled.css +0 -2
- package/dist/es2019/ui/top-nav-items/nav-logo/app-logo.js +6 -11
- package/dist/es2019/ui/top-nav-items/nav-logo/custom-logo.compiled.css +0 -2
- package/dist/es2019/ui/top-nav-items/nav-logo/custom-logo.js +3 -6
- package/dist/es2019/ui/top-nav-items/search.compiled.css +3 -2
- package/dist/es2019/ui/top-nav-items/search.js +3 -7
- package/dist/esm/ui/fhs-rollout/is-custom-is-fhs-enabled-context.js +2 -2
- package/dist/esm/ui/fhs-rollout/is-fhs-enabled-context.js +6 -6
- package/dist/esm/ui/fhs-rollout/is-fhs-enabled-provider.js +13 -16
- package/dist/esm/ui/fhs-rollout/use-is-fhs-enabled.js +5 -6
- package/dist/esm/ui/page-layout/banner.compiled.css +0 -1
- package/dist/esm/ui/page-layout/banner.js +2 -5
- package/dist/esm/ui/page-layout/constants.js +0 -12
- package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.compiled.css +0 -1
- package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.js +2 -5
- package/dist/esm/ui/page-layout/panel-splitter/side-nav-panel-splitter.js +2 -71
- package/dist/esm/ui/page-layout/ribbon.js +0 -7
- package/dist/esm/ui/page-layout/side-nav/side-nav-content.js +2 -10
- package/dist/esm/ui/page-layout/side-nav/side-nav.compiled.css +3 -10
- package/dist/esm/ui/page-layout/side-nav/side-nav.js +22 -55
- package/dist/esm/ui/page-layout/top-nav/top-nav-end.compiled.css +0 -1
- package/dist/esm/ui/page-layout/top-nav/top-nav-end.js +2 -5
- package/dist/esm/ui/page-layout/top-nav/top-nav-start.compiled.css +2 -12
- package/dist/esm/ui/page-layout/top-nav/top-nav-start.js +10 -250
- package/dist/esm/ui/page-layout/top-nav/top-nav.compiled.css +1 -15
- package/dist/esm/ui/page-layout/top-nav/top-nav.js +5 -16
- package/dist/esm/ui/top-nav-items/nav-logo/app-logo.compiled.css +0 -2
- package/dist/esm/ui/top-nav-items/nav-logo/app-logo.js +6 -11
- package/dist/esm/ui/top-nav-items/nav-logo/custom-logo.compiled.css +0 -2
- package/dist/esm/ui/top-nav-items/nav-logo/custom-logo.js +3 -6
- package/dist/esm/ui/top-nav-items/search.compiled.css +3 -2
- package/dist/esm/ui/top-nav-items/search.js +3 -7
- package/dist/types/ui/fhs-rollout/is-custom-is-fhs-enabled-context.d.ts +2 -2
- package/dist/types/ui/fhs-rollout/is-fhs-enabled-context.d.ts +5 -2
- package/dist/types/ui/fhs-rollout/is-fhs-enabled-provider.d.ts +9 -2
- package/dist/types/ui/fhs-rollout/use-is-fhs-enabled.d.ts +4 -1
- package/dist/types/ui/page-layout/constants.d.ts +0 -4
- package/dist/types/ui/page-layout/panel-splitter/panel-splitter.d.ts +0 -2
- package/dist/types/ui/page-layout/side-nav/side-nav.d.ts +0 -1
- package/package.json +6 -8
|
@@ -20,15 +20,13 @@ var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
|
20
20
|
var _popup = require("@atlaskit/popup/popup");
|
|
21
21
|
var _useMediaQuery = require("@atlaskit/primitives/compiled/use-media-query");
|
|
22
22
|
var _list = require("../../../components/list");
|
|
23
|
-
var _useIsFhsEnabled = require("../../fhs-rollout/use-is-fhs-enabled");
|
|
24
23
|
var _hasCustomThemeContext = require("../../top-nav-items/themed/has-custom-theme-context");
|
|
25
24
|
var _iconButton = require("../../top-nav-items/themed/icon-button");
|
|
26
25
|
var _constants = require("../constants");
|
|
27
26
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
28
27
|
var containerStyles = {
|
|
29
28
|
root: "_yyhy11wp _1e0c1txw _1bahh9n0 _1ul9zwfg _1d2y1ris _glte1ris _15rip2n4 _1gs5usvi _ndwch9n0",
|
|
30
|
-
withPersistentItems: "_zulp1b66 _4cvr1h6o"
|
|
31
|
-
fullHeightSidebar: "_y4tiutpp"
|
|
29
|
+
withPersistentItems: "_zulp1b66 _4cvr1h6o"
|
|
32
30
|
};
|
|
33
31
|
var listStyles = {
|
|
34
32
|
root: "_zulp1b66 _4cvr1h6o _1e0c1txw",
|
|
@@ -52,7 +50,6 @@ function TopNavEnd(_ref) {
|
|
|
52
50
|
_ref$showMoreButtonLa = _ref.showMoreButtonLabel,
|
|
53
51
|
showMoreButtonLabel = _ref$showMoreButtonLa === void 0 ? 'Show more' : _ref$showMoreButtonLa;
|
|
54
52
|
var hasPersistentItems = (0, _fg.fg)('platform-dst-chat-panel-layout') && persistentItems != null;
|
|
55
|
-
var isFhsEnabled = (0, _useIsFhsEnabled.useIsFhsEnabled)();
|
|
56
53
|
var _useState = (0, _react.useState)(false),
|
|
57
54
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
58
55
|
isOpen = _useState2[0],
|
|
@@ -83,7 +80,7 @@ function TopNavEnd(_ref) {
|
|
|
83
80
|
}, children);
|
|
84
81
|
var content = /*#__PURE__*/_react.default.createElement("nav", {
|
|
85
82
|
"aria-label": label,
|
|
86
|
-
className: (0, _runtime.ax)([containerStyles.root, hasPersistentItems && containerStyles.withPersistentItems
|
|
83
|
+
className: (0, _runtime.ax)([containerStyles.root, hasPersistentItems && containerStyles.withPersistentItems])
|
|
87
84
|
}, isMobile ? /*#__PURE__*/_react.default.createElement(_popup.Popup, {
|
|
88
85
|
isOpen: isOpen,
|
|
89
86
|
onClose: function onClose() {
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
2
|
-
.
|
|
3
|
-
._yyhykb7n{grid-column:1}._15yekb7n{--animation-direction:1}
|
|
4
|
-
._1e0c1kw7{display:inherit}
|
|
5
|
-
._1e0c1txw{display:flex}
|
|
6
|
-
._1ul9idpf{min-width:0}
|
|
2
|
+
._yyhykb7n{grid-column:1}._1e0c1txw{display:flex}
|
|
7
3
|
._4cvr1h6o{align-items:center}
|
|
8
4
|
._4t3i1osq{height:100%}
|
|
9
|
-
.
|
|
10
|
-
._bozgutpp{padding-inline-start:var(--ds-space-150,9pt)}
|
|
11
|
-
._vchhusvi{box-sizing:border-box}
|
|
12
|
-
[dir=rtl] ._65m41mrw{--animation-direction:-1}
|
|
13
|
-
@media (prefers-reduced-motion:no-preference){._10t81e03{transition-property:transform}._10t81rjc{transition-property:transform,opacity}._1xq51ytf{transition-timing-function:ease-in-out}._1xq55ucs{transition-timing-function:ease}._mjvc1efy{transform:translateX(calc(100%*var(--animation-direction)))}._bgpzidpf{opacity:0}._mjvc1p9u{transform:translateX(calc(-100%*var(--animation-direction)))}._mjvco0k7{transform:translateX(calc((-2rem + var(--ds-space-050, 4px)*-1)*var(--animation-direction)))}._mjvcyrjp{transform:translateX(calc((2rem + var(--ds-space-050, 4px))*var(--animation-direction)))}._mjvcz12g{transform:translateX(0)}._xrrpfnf5{transition-duration:.2s}._bgpzkb7n{opacity:1}}
|
|
14
|
-
@media (min-width:64rem){._13wnh2mm{position:relative}._1l3vb3bt:after{content:""}._juxdstnw:after{position:absolute}._1vinidpf:after{inset-block-start:0}._1719idpf:after{inset-block-end:0}._e6znidpf:after{inset-inline-end:0}._1kyhe4h9:after{border-inline-end-width:var(--ds-border-width,1px)}._4cwynqa1:after{border-inline-end-style:solid}._435s1l7x:after{border-inline-end-color:var(--ds-border,#0b120e24)}._m7c3idpf:after{opacity:0}._15rin7od{min-width:unset}._glte1osq{width:100%}._4ap319ly{background-color:revert}._1m5lglyw:after{display:none}._glte1ris{width:max-content}._15rip2n4{min-width:330px}._1gs5usvi{box-sizing:border-box}._glte93mn{width:var(--n_sNvlw,100%)}._exxmutpp{padding-inline-end:var(--ds-space-150,9pt)}._4ap3vuon{background-color:var(--ds-surface,#fff)}._m7c3kb7n:after{opacity:1}}
|
|
15
|
-
@media (prefers-reduced-motion:no-preference) and (min-width:64rem){._n8qabrmi:after{transition-property:opacity}._wc72fnf5:after{transition-duration:.2s}._j3mr1v42:after{transition-timing-function:ease-in}}
|
|
5
|
+
@media (min-width:64rem){._glte1ris{width:max-content}._15rip2n4{min-width:330px}._1gs5usvi{box-sizing:border-box}}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* top-nav-start.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
5
|
Object.defineProperty(exports, "__esModule", {
|
|
7
6
|
value: true
|
|
@@ -9,157 +8,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
8
|
exports.TopNavStart = TopNavStart;
|
|
10
9
|
require("./top-nav-start.compiled.css");
|
|
11
10
|
var _runtime = require("@compiled/react/runtime");
|
|
12
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
-
var _useStableRef = _interopRequireDefault(require("@atlaskit/ds-lib/use-stable-ref"));
|
|
15
|
-
var _openLayerObserverNamespaceProvider = require("@atlaskit/layering/open-layer-observer-namespace-provider");
|
|
16
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
17
|
-
var _useMediaQuery = require("@atlaskit/primitives/compiled/use-media-query");
|
|
18
12
|
var _topNavStartAttachRef = require("../../../context/top-nav-start/top-nav-start-attach-ref");
|
|
19
|
-
var _useIsFhsEnabled = require("../../fhs-rollout/use-is-fhs-enabled");
|
|
20
|
-
var _hasCustomThemeContext = require("../../top-nav-items/themed/has-custom-theme-context");
|
|
21
|
-
var _hasDefaultBackgroundColorContext = require("../../top-nav-items/themed/has-default-background-color-context");
|
|
22
|
-
var _constants = require("../constants");
|
|
23
|
-
var _sideNavVisibilityState = require("../side-nav/side-nav-visibility-state");
|
|
24
|
-
var _useSideNavVisibility3 = require("../side-nav/use-side-nav-visibility");
|
|
25
13
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
26
|
-
/**
|
|
27
|
-
* Firefox does support these reorder animations, but only partially enabling layout animations would look odd.
|
|
28
|
-
*
|
|
29
|
-
* We are using JS to detect Firefox and disable animations, instead of using CSS, as Compiled currently does not merge duplicate
|
|
30
|
-
* CSS at-rules when at-rules are nested: https://github.com/atlassian-labs/compiled/blob/e04a325915e1d13010205089e4915de0e53bc2d4/packages/css/src/plugins/merge-duplicate-at-rules.ts#L5
|
|
31
|
-
* Avoiding nesting the `@supports` at-rule inside of `@media` means Compiled can remove duplicate styles from the generated CSS.
|
|
32
|
-
*/
|
|
33
|
-
var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
34
|
-
|
|
35
|
-
// Placed in a variable, as the value is used in the translateX value for the children wrapper animation.
|
|
36
|
-
var flexGap = "var(--ds-space-050, 4px)";
|
|
37
|
-
|
|
38
14
|
/**
|
|
39
15
|
* Styles for the TopNavStart element.
|
|
40
|
-
*
|
|
41
|
-
* When `useIsFhsEnabled` is true this is the styling for the inner element,
|
|
42
|
-
* which re-enables pointer events.
|
|
43
16
|
*/
|
|
44
17
|
var innerStyles = {
|
|
45
|
-
root: "_zulp1b66 _yyhykb7n _4t3i1osq _4cvr1h6o _1e0c1txw _glte1ris _15rip2n4 _1gs5usvi"
|
|
46
|
-
fullHeightSidebarExpanded: "_15rin7od _glte1osq"
|
|
18
|
+
root: "_zulp1b66 _yyhykb7n _4t3i1osq _4cvr1h6o _1e0c1txw _glte1ris _15rip2n4 _1gs5usvi"
|
|
47
19
|
};
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Styles for the outer element, that does not have re-enabled pointer events and spans the entire
|
|
51
|
-
* width of the TopNavStart area.
|
|
52
|
-
*
|
|
53
|
-
* This wrapper element is only rendered when `useIsFhsEnabled` is true.
|
|
54
|
-
*/
|
|
55
|
-
var wrapperStyles = {
|
|
56
|
-
root: "_vchhusvi _bozgutpp _4t3i1osq _13wnh2mm _1l3vb3bt _juxdstnw _1vinidpf _1719idpf _e6znidpf _1kyhe4h9 _4cwynqa1 _435s1l7x _m7c3idpf",
|
|
57
|
-
fullHeightSidebarExpanded: "_glte93mn _exxmutpp _4ap3vuon _m7c3kb7n",
|
|
58
|
-
fullHeightSidebarBorderTransition: "_n8qabrmi _wc72fnf5 _j3mr1v42",
|
|
59
|
-
fullHeightSidebarCustomTheming: "_4ap319ly _1m5lglyw"
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* We use a fixed translateX offset for the slide animation (used when the TopNavStart children elements are reordered).
|
|
64
|
-
* This fixed offset makes the elements appear to animate smoothly from the old to the new position.
|
|
65
|
-
* This offset is calculated based on:
|
|
66
|
-
* - 32px (2rem) width of the side nav toggle button (IconButton)
|
|
67
|
-
* - 4px gap ('space.050' token) of the flex container
|
|
68
|
-
*
|
|
69
|
-
* The benefit of hardcoding this offset is that we don't need to calculate it using JS each time the sidebar is toggled.
|
|
70
|
-
* However, it could become out of sync if the width of IconButton changes.
|
|
71
|
-
*
|
|
72
|
-
* The alternative is using JS to store the previous position of the children wrapper element, and calculate the offset based on
|
|
73
|
-
* the new position, and then transforming using that offset. This would prevent the animation from going out of sync.
|
|
74
|
-
*/
|
|
75
|
-
var childrenWrapperAnimationOffset = "calc(2rem + ".concat(flexGap, ")");
|
|
76
|
-
var childrenWrapperStyles = {
|
|
77
|
-
root: "_zulp1kw7 _1e0c1kw7 _4cvr1h6o _1ul9idpf _15yekb7n _65m41mrw",
|
|
78
|
-
animationBaseStyles: "_10t81e03",
|
|
79
|
-
finalPosition: "_mjvcz12g _xrrpfnf5",
|
|
80
|
-
expandAnimationStartPosition: "_mjvcyrjp",
|
|
81
|
-
collapseAnimationStartPosition: "_mjvco0k7"
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* We use a fixed translateX offset for the toggle button slide animation (used when the TopNavStart children elements are reordered).
|
|
86
|
-
* The specific value doesn't matter too much for the toggle button animation, so we are using `100%`, which will match the toggle button width.
|
|
87
|
-
*
|
|
88
|
-
* By combining the `translateX` animation with an `opacity` fade, the feel and experience is actually quite similar to animating the
|
|
89
|
-
* element from the exact old position (offset), and it avoids the additional complexity of needing to track and calculate the exact offset.
|
|
90
|
-
*/
|
|
91
|
-
var toggleButtonWrapperStyles = {
|
|
92
|
-
root: "_15yekb7n _65m41mrw _10t81rjc",
|
|
93
|
-
finalPosition: "_mjvcz12g _xrrpfnf5 _bgpzkb7n",
|
|
94
|
-
expandAnimationStartPosition: "_mjvc1p9u _bgpzidpf",
|
|
95
|
-
collapseAnimationStartPosition: "_mjvc1efy _bgpzidpf",
|
|
96
|
-
expandAnimationTimingFunction: "_1xq51ytf",
|
|
97
|
-
collapseAnimationTimingFunction: "_1xq55ucs",
|
|
98
|
-
alignEnd: "_ahbq1wug"
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* The consistent key used for the side nav toggle button to ensure it does not get remounted
|
|
103
|
-
* when it is reordered.
|
|
104
|
-
*
|
|
105
|
-
* This ensures we get focus restoration for free.
|
|
106
|
-
*/
|
|
107
|
-
var sideNavToggleButtonKey = 'side-nav-toggle-button';
|
|
108
|
-
var TopNavStartInnerOld = /*#__PURE__*/(0, _react.forwardRef)(function TopNavStartInner(_ref, ref) {
|
|
109
|
-
var children = _ref.children,
|
|
110
|
-
testId = _ref.testId;
|
|
111
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
112
|
-
ref: ref,
|
|
113
|
-
"data-testid": testId,
|
|
114
|
-
className: (0, _runtime.ax)([innerStyles.root])
|
|
115
|
-
}, children);
|
|
116
|
-
});
|
|
117
|
-
var TopNavStartInnerFHS = /*#__PURE__*/(0, _react.forwardRef)(function TopNavStartInnerFHS(_ref2, ref) {
|
|
118
|
-
var children = _ref2.children,
|
|
119
|
-
testId = _ref2.testId;
|
|
120
|
-
// This needs the real `defaultCollapsed` state or will not SSR properly
|
|
121
|
-
// TODO: lift `defaultCollapsed` state to `Root` (DSP-23683)
|
|
122
|
-
// then context value will be correct in SSR / from initial render
|
|
123
|
-
var _useSideNavVisibility = (0, _useSideNavVisibility3.useSideNavVisibility)({
|
|
124
|
-
defaultCollapsed: true
|
|
125
|
-
}),
|
|
126
|
-
isExpandedOnDesktop = _useSideNavVisibility.isExpandedOnDesktop;
|
|
127
|
-
var sideNavState = (0, _react.useContext)(_sideNavVisibilityState.SideNavVisibilityState);
|
|
128
|
-
var isFirstRenderRef = (0, _react.useRef)(true);
|
|
129
|
-
(0, _react.useEffect)(function () {
|
|
130
|
-
// Ignore renders until the side nav state is initialized
|
|
131
|
-
// So that apps using the legacy API for setting side nav default state do not see
|
|
132
|
-
// animations when they shouldn't
|
|
133
|
-
if (sideNavState === null) {
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
if (isFirstRenderRef.current) {
|
|
137
|
-
isFirstRenderRef.current = false;
|
|
138
|
-
}
|
|
139
|
-
}, [sideNavState]);
|
|
140
|
-
var hasCustomTheme = (0, _hasCustomThemeContext.useHasCustomTheme)();
|
|
141
|
-
var hasDefaultBackgroundColor = (0, _react.useContext)(_hasDefaultBackgroundColorContext.HasDefaultBackgroundColorContext);
|
|
142
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
143
|
-
className: (0, _runtime.ax)([wrapperStyles.root, isExpandedOnDesktop && wrapperStyles.fullHeightSidebarExpanded, !isFirstRenderRef.current && isExpandedOnDesktop && wrapperStyles.fullHeightSidebarBorderTransition, hasCustomTheme && !hasDefaultBackgroundColor && (0, _fg.fg)('platform_dst_nav4_custom_theming_fhs_1') && wrapperStyles.fullHeightSidebarCustomTheming])
|
|
144
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
145
|
-
ref: ref,
|
|
146
|
-
"data-testid": testId,
|
|
147
|
-
className: (0, _runtime.ax)([innerStyles.root, isExpandedOnDesktop && innerStyles.fullHeightSidebarExpanded])
|
|
148
|
-
}, /*#__PURE__*/_react.default.createElement(_openLayerObserverNamespaceProvider.OpenLayerObserverNamespaceProvider, {
|
|
149
|
-
namespace: _constants.openLayerObserverTopNavStartNamespace
|
|
150
|
-
}, children)));
|
|
151
|
-
});
|
|
152
|
-
|
|
153
20
|
/**
|
|
154
21
|
* __TopNavStart__
|
|
155
22
|
*
|
|
156
23
|
* Wrapper for the top navigation actions on the inline-start (left) side of the top navigation.
|
|
157
24
|
*/
|
|
158
|
-
function TopNavStart(
|
|
159
|
-
var children =
|
|
160
|
-
testId =
|
|
161
|
-
sideNavToggleButton =
|
|
162
|
-
var isFhsEnabled = (0, _useIsFhsEnabled.useIsFhsEnabled)();
|
|
25
|
+
function TopNavStart(_ref) {
|
|
26
|
+
var children = _ref.children,
|
|
27
|
+
testId = _ref.testId,
|
|
28
|
+
sideNavToggleButton = _ref.sideNavToggleButton;
|
|
163
29
|
var ref = (0, _react.useContext)(_topNavStartAttachRef.TopNavStartAttachRef);
|
|
164
30
|
var elementRef = (0, _react.useRef)(null);
|
|
165
31
|
|
|
@@ -168,116 +34,9 @@ function TopNavStart(_ref3) {
|
|
|
168
34
|
(0, _react.useEffect)(function () {
|
|
169
35
|
ref(elementRef.current);
|
|
170
36
|
}, [elementRef, ref]);
|
|
171
|
-
|
|
172
|
-
// This needs the real `defaultCollapsed` state or will not SSR properly
|
|
173
|
-
// TODO: lift `defaultCollapsed` state to `Root` (DSP-23683)
|
|
174
|
-
// then context value will be correct in SSR / from initial render
|
|
175
|
-
var _useSideNavVisibility2 = (0, _useSideNavVisibility3.useSideNavVisibility)({
|
|
176
|
-
defaultCollapsed: true
|
|
177
|
-
}),
|
|
178
|
-
isExpandedOnDesktop = _useSideNavVisibility2.isExpandedOnDesktop;
|
|
179
|
-
|
|
180
|
-
// For SSR assume desktop
|
|
181
|
-
var _useState = (0, _react.useState)(true),
|
|
182
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
183
|
-
isDesktop = _useState2[0],
|
|
184
|
-
setIsDesktop = _useState2[1];
|
|
185
|
-
// Set state to real value on client
|
|
186
|
-
// This could result in some visible shift on mobile when hydrating SSR
|
|
187
|
-
// TODO: review and improve SSR behavior as necessary (DSP-23817)
|
|
188
|
-
(0, _react.useLayoutEffect)(function () {
|
|
189
|
-
// Checking this to avoid breaking tests when `matchMedia` is not mocked
|
|
190
|
-
// Ideally we wouldn't cater to test environments, but this avoids introducing unnecessary friction
|
|
191
|
-
if (typeof window !== 'undefined' && typeof window.matchMedia === 'function') {
|
|
192
|
-
setIsDesktop(window.matchMedia('(min-width: 64rem)').matches);
|
|
193
|
-
}
|
|
194
|
-
}, []);
|
|
195
|
-
(0, _useMediaQuery.UNSAFE_useMediaQuery)('above.md', function (event) {
|
|
196
|
-
setIsDesktop(event.matches);
|
|
197
|
-
});
|
|
198
|
-
var _useState3 = (0, _react.useState)({
|
|
199
|
-
type: 'idle'
|
|
200
|
-
}),
|
|
201
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
202
|
-
animationState = _useState4[0],
|
|
203
|
-
setAnimationState = _useState4[1];
|
|
204
|
-
|
|
205
|
-
// Used to prevent the reorder animations from running on the initial render.
|
|
206
|
-
var isFirstRenderRef = (0, _react.useRef)(true);
|
|
207
|
-
var sideNavState = (0, _react.useContext)(_sideNavVisibilityState.SideNavVisibilityState);
|
|
208
|
-
(0, _react.useEffect)(function () {
|
|
209
|
-
if (!isFhsEnabled) {
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// Ignore renders until the side nav state is initialized
|
|
214
|
-
// So that apps using the legacy API for setting side nav default state do not see
|
|
215
|
-
// animations when they shouldn't
|
|
216
|
-
if (sideNavState === null) {
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
if (isFirstRenderRef.current) {
|
|
220
|
-
isFirstRenderRef.current = false;
|
|
221
|
-
}
|
|
222
|
-
}, [isFhsEnabled, sideNavState]);
|
|
223
|
-
|
|
224
|
-
// Using a stable ref to avoid re-running the animation layout effect when the toggle button prop value changes, which
|
|
225
|
-
// can happen a lot (e.g. if the parent re-renders)
|
|
226
|
-
var sideNavToggleButtonStableRef = (0, _useStableRef.default)(sideNavToggleButton);
|
|
227
|
-
(0, _react.useLayoutEffect)(function () {
|
|
228
|
-
if (!isFhsEnabled) {
|
|
229
|
-
return;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* This layout effect is used to animate the TopNavStart children elements to their new position after being reordered.
|
|
234
|
-
* It is called when the sidebar's desktop expansion state changes.
|
|
235
|
-
*
|
|
236
|
-
* It works by first setting a translateX offset on the elements, used as the start position of the slide animation.
|
|
237
|
-
* - For the toggle button, it's a fixed offset. It's combined with an opacity, so the exact offset doesn't matter too much.
|
|
238
|
-
* - For the children wrapper (wrapping everything except the toggle button), an offset was chosen to make the animation
|
|
239
|
-
* start position the exact same as the element's old position. See comments for `childrenWrapperStyles` for more details.
|
|
240
|
-
*
|
|
241
|
-
* On the next frame, the translateX offset is cleared, triggering the animation to the new position.
|
|
242
|
-
*/
|
|
243
|
-
|
|
244
|
-
if (isFirstRenderRef.current) {
|
|
245
|
-
// No animations on initial render.
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
if (!sideNavToggleButtonStableRef.current) {
|
|
249
|
-
// If there is no toggle button, there should be no re-order animations.
|
|
250
|
-
return;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
// Set the translateX offsets so elements are ready to animate to their actual new position after being reordered
|
|
254
|
-
setAnimationState({
|
|
255
|
-
type: isExpandedOnDesktop ? 'expand' : 'collapse'
|
|
256
|
-
});
|
|
257
|
-
requestAnimationFrame(function () {
|
|
258
|
-
// Clear translateX offsets on next frame to trigger animation to new position in a re-render
|
|
259
|
-
setAnimationState({
|
|
260
|
-
type: 'idle'
|
|
261
|
-
});
|
|
262
|
-
});
|
|
263
|
-
|
|
264
|
-
// This layout effect is called when the sidebar's desktop expansion state changes.
|
|
265
|
-
}, [isExpandedOnDesktop, isFhsEnabled, sideNavToggleButtonStableRef]);
|
|
266
|
-
var TopNavStartInner = isFhsEnabled ? TopNavStartInnerFHS : TopNavStartInnerOld;
|
|
267
|
-
return /*#__PURE__*/_react.default.createElement(TopNavStartInner, {
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
268
38
|
ref: elementRef,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
className: (0, _runtime.ax)([!isFirefox && toggleButtonWrapperStyles.root, !isFirefox && animationState.type === 'idle' && toggleButtonWrapperStyles.finalPosition, !isFirefox &&
|
|
273
|
-
// Timing function is applied when the browser animates to the idle position.
|
|
274
|
-
animationState.type === 'idle' && toggleButtonWrapperStyles.collapseAnimationTimingFunction, !isFirefox && animationState.type === 'collapse' && toggleButtonWrapperStyles.collapseAnimationStartPosition])
|
|
275
|
-
}, sideNavToggleButton), isFhsEnabled ? /*#__PURE__*/_react.default.createElement("div", {
|
|
276
|
-
className: (0, _runtime.ax)([childrenWrapperStyles.root, !isFirefox && childrenWrapperStyles.animationBaseStyles, !isFirefox && animationState.type === 'idle' && childrenWrapperStyles.finalPosition, !isFirefox && animationState.type === 'expand' && childrenWrapperStyles.expandAnimationStartPosition, !isFirefox && animationState.type === 'collapse' && childrenWrapperStyles.collapseAnimationStartPosition])
|
|
277
|
-
}, children) : children, sideNavToggleButton && isDesktop && isExpandedOnDesktop && isFhsEnabled && /*#__PURE__*/_react.default.createElement("div", {
|
|
278
|
-
key: sideNavToggleButtonKey,
|
|
279
|
-
className: (0, _runtime.ax)([!isFirefox && toggleButtonWrapperStyles.root, toggleButtonWrapperStyles.alignEnd, !isFirefox && animationState.type === 'idle' && toggleButtonWrapperStyles.finalPosition, !isFirefox &&
|
|
280
|
-
// Timing function is applied when the browser animates to the idle position.
|
|
281
|
-
animationState.type === 'idle' && toggleButtonWrapperStyles.expandAnimationTimingFunction, !isFirefox && animationState.type === 'expand' && toggleButtonWrapperStyles.expandAnimationStartPosition])
|
|
282
|
-
}, sideNavToggleButton));
|
|
39
|
+
"data-testid": testId,
|
|
40
|
+
className: (0, _runtime.ax)([innerStyles.root])
|
|
41
|
+
}, sideNavToggleButton, children);
|
|
283
42
|
}
|
|
@@ -1,28 +1,14 @@
|
|
|
1
1
|
._nd5l8cbt{grid-area:top-bar}
|
|
2
2
|
._zulpu2gc{gap:var(--ds-space-100,8px)}
|
|
3
3
|
._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
|
|
4
|
-
._18zrze3t{padding-inline:var(--ds-space-0,0)}
|
|
5
|
-
._179rglyw{border-block-end:none}
|
|
6
4
|
._179ria51{border-block-end:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}._152t1nws{inset-block-start:var(--n_bnrM,0)}
|
|
7
|
-
._18postnw:after{position:absolute}
|
|
8
|
-
._1beue4h9:after{border-block-end-width:var(--ds-border-width,1px)}
|
|
9
|
-
._1cte1l7x:after{border-block-end-color:var(--ds-border,#0b120e24)}
|
|
10
|
-
._1czdidpf:after{inset-inline-end:0}
|
|
11
5
|
._1e0c11p5{display:grid}
|
|
12
|
-
._1gufidpf:after{inset-block-end:0}
|
|
13
|
-
._1pby11wp{z-index:3}
|
|
14
6
|
._1pbyegat{z-index:4}
|
|
15
7
|
._4cvr1h6o{align-items:center}
|
|
16
8
|
._4t3i1dgc{height:var(--n_tNvM)}
|
|
17
|
-
._aetrb3bt:after{content:""}
|
|
18
9
|
._bfhkvuon{background-color:var(--ds-surface,#fff)}
|
|
19
10
|
._d6vu1bgi >span[data-ep-placeholder-id=top_navigation_skeleton]{display:contents}
|
|
20
|
-
._g0nf3tht:after{inset-inline-start:var(--n_sNvlw,0)}
|
|
21
11
|
._kqsw1if8{position:sticky}
|
|
22
|
-
._lcxv1wug{pointer-events:auto}
|
|
23
|
-
._uaeunqa1:after{border-block-end-style:solid}
|
|
24
12
|
._vchhusvi{box-sizing:border-box}
|
|
25
13
|
._yv0e1mfv{grid-template-columns:auto 1fr auto}
|
|
26
|
-
@media (min-width:48rem){._1j8b18ax{grid-template-columns:1fr minmax(min-content,max-content) 1fr}}
|
|
27
|
-
@media (min-width:64rem){._1m5lglyw:after{display:none}._1rqt16a9{grid-template-columns:0fr minmax(min-content,max-content) 1fr}._pdlmutpp{gap:var(--ds-space-150,9pt)}}
|
|
28
|
-
@media (min-width:110.5rem){._jh1g18ax{grid-template-columns:1fr minmax(min-content,max-content) 1fr}}
|
|
14
|
+
@media (min-width:48rem){._1j8b18ax{grid-template-columns:1fr minmax(min-content,max-content) 1fr}}
|
|
@@ -13,7 +13,6 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
13
13
|
var _componentWithFg = require("@atlaskit/platform-feature-flags-react/component-with-fg");
|
|
14
14
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
15
15
|
var _useSkipLinkInternal = require("../../../context/skip-links/use-skip-link-internal");
|
|
16
|
-
var _useIsFhsEnabled = require("../../fhs-rollout/use-is-fhs-enabled");
|
|
17
16
|
var _hasCustomThemeContext = require("../../top-nav-items/themed/has-custom-theme-context");
|
|
18
17
|
var _hasDefaultBackgroundColorContext = require("../../top-nav-items/themed/has-default-background-color-context");
|
|
19
18
|
var _useCustomTheme = require("../../top-nav-items/themed/use-custom-theme");
|
|
@@ -22,7 +21,6 @@ var _constants = require("../constants");
|
|
|
22
21
|
var _dangerouslyHoistCssVarToDocumentRoot = require("../dangerously-hoist-css-var-to-document-root");
|
|
23
22
|
var _hoistCssVarToLocalGrid = require("../hoist-css-var-to-local-grid");
|
|
24
23
|
var _hoistSlotSizesContext = require("../hoist-slot-sizes-context");
|
|
25
|
-
var _useSideNavVisibility3 = require("../side-nav/use-side-nav-visibility");
|
|
26
24
|
var _useLayoutId = require("../use-layout-id");
|
|
27
25
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
28
26
|
/**
|
|
@@ -34,10 +32,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
34
32
|
* - The background sits below the expanded side nav
|
|
35
33
|
*/
|
|
36
34
|
var styles = {
|
|
37
|
-
root: "_nd5l8cbt _zulpu2gc _18zrutpp _179ria51 _1e0c11p5 _yv0e1mfv _4cvr1h6o _bfhkvuon _vchhusvi _4t3i1dgc _152t1nws _kqsw1if8 _1pbyegat _d6vu1bgi _1j8b18ax"
|
|
38
|
-
fullHeightSidebar: "_18zrze3t _179rglyw _lcxv1wug _bfhkvuon _1pby11wp _aetrb3bt _18postnw _1gufidpf _1czdidpf _g0nf3tht _1beue4h9 _uaeunqa1 _1cte1l7x _pdlmutpp",
|
|
39
|
-
fullHeightSidebarExpanded: "_1rqt16a9 _jh1g18ax",
|
|
40
|
-
fullHeightSidebarCustomTheming: "_1m5lglyw"
|
|
35
|
+
root: "_nd5l8cbt _zulpu2gc _18zrutpp _179ria51 _1e0c11p5 _yv0e1mfv _4cvr1h6o _bfhkvuon _vchhusvi _4t3i1dgc _152t1nws _kqsw1if8 _1pbyegat _d6vu1bgi _1j8b18ax"
|
|
41
36
|
};
|
|
42
37
|
/**
|
|
43
38
|
* The top nav layout area. It will display at the top of the screen, below the banner if one is present.
|
|
@@ -51,7 +46,6 @@ function TopNavOld(_ref) {
|
|
|
51
46
|
testId = _ref.testId,
|
|
52
47
|
providedId = _ref.id,
|
|
53
48
|
customThemeConfig = _ref.customTheme;
|
|
54
|
-
var isFhsEnabled = (0, _useIsFhsEnabled.useIsFhsEnabled)();
|
|
55
49
|
var dangerouslyHoistSlotSizes = (0, _react.useContext)(_hoistSlotSizesContext.DangerouslyHoistSlotSizes);
|
|
56
50
|
var id = (0, _useLayoutId.useLayoutId)({
|
|
57
51
|
providedId: providedId
|
|
@@ -61,16 +55,14 @@ function TopNavOld(_ref) {
|
|
|
61
55
|
label: skipLinkLabel,
|
|
62
56
|
isHidden: (0, _fg.fg)('platform_dst_nav4_skip_link_a11y_1')
|
|
63
57
|
});
|
|
64
|
-
var height = heightProp !== null && heightProp !== void 0 ? heightProp :
|
|
58
|
+
var height = heightProp !== null && heightProp !== void 0 ? heightProp : (0, _fg.fg)('platform_dst_ads_appswitcher_improvements') ? 56 : 48;
|
|
65
59
|
var customTheme = (0, _useCustomTheme.useCustomTheme)(customThemeConfig);
|
|
66
|
-
var _useSideNavVisibility = (0, _useSideNavVisibility3.useSideNavVisibility)(),
|
|
67
|
-
isExpandedOnDesktop = _useSideNavVisibility.isExpandedOnDesktop;
|
|
68
60
|
return /*#__PURE__*/React.createElement(_hasCustomThemeContext.HasCustomThemeContext.Provider, {
|
|
69
61
|
value: customTheme.isEnabled
|
|
70
62
|
}, /*#__PURE__*/React.createElement("header", {
|
|
71
63
|
id: id,
|
|
72
64
|
"data-layout-slot": true,
|
|
73
|
-
className: (0, _runtime.ax)([styles.root,
|
|
65
|
+
className: (0, _runtime.ax)([styles.root, xcss]),
|
|
74
66
|
"data-testid": testId
|
|
75
67
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
76
68
|
,
|
|
@@ -103,7 +95,6 @@ function TopNavNew(_ref2) {
|
|
|
103
95
|
testId = _ref2.testId,
|
|
104
96
|
providedId = _ref2.id,
|
|
105
97
|
customThemeConfig = _ref2.customTheme;
|
|
106
|
-
var isFhsEnabled = (0, _useIsFhsEnabled.useIsFhsEnabled)();
|
|
107
98
|
var dangerouslyHoistSlotSizes = (0, _react.useContext)(_hoistSlotSizesContext.DangerouslyHoistSlotSizes);
|
|
108
99
|
var id = (0, _useLayoutId.useLayoutId)({
|
|
109
100
|
providedId: providedId
|
|
@@ -113,11 +104,9 @@ function TopNavNew(_ref2) {
|
|
|
113
104
|
label: skipLinkLabel,
|
|
114
105
|
isHidden: (0, _fg.fg)('platform_dst_nav4_skip_link_a11y_1')
|
|
115
106
|
});
|
|
116
|
-
var height = heightProp !== null && heightProp !== void 0 ? heightProp :
|
|
107
|
+
var height = heightProp !== null && heightProp !== void 0 ? heightProp : (0, _fg.fg)('platform_dst_ads_appswitcher_improvements') ? 56 : 48;
|
|
117
108
|
var customTheme = (0, _useCustomThemeNew.useCustomThemeNew)(customThemeConfig);
|
|
118
109
|
var hasDefaultBackground = customTheme.isEnabled ? customTheme.hasDefaultBackground : true;
|
|
119
|
-
var _useSideNavVisibility2 = (0, _useSideNavVisibility3.useSideNavVisibility)(),
|
|
120
|
-
isExpandedOnDesktop = _useSideNavVisibility2.isExpandedOnDesktop;
|
|
121
110
|
return /*#__PURE__*/React.createElement(_hasCustomThemeContext.HasCustomThemeContext.Provider, {
|
|
122
111
|
value: customTheme.isEnabled
|
|
123
112
|
}, /*#__PURE__*/React.createElement(_hasDefaultBackgroundColorContext.HasDefaultBackgroundColorContext.Provider, {
|
|
@@ -125,7 +114,7 @@ function TopNavNew(_ref2) {
|
|
|
125
114
|
}, /*#__PURE__*/React.createElement("header", {
|
|
126
115
|
id: id,
|
|
127
116
|
"data-layout-slot": true,
|
|
128
|
-
className: (0, _runtime.ax)([styles.root,
|
|
117
|
+
className: (0, _runtime.ax)([styles.root, xcss]),
|
|
129
118
|
"data-testid": testId
|
|
130
119
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
131
120
|
,
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
._1e0c1txw{display:flex}
|
|
6
6
|
._1e0cglyw{display:none}
|
|
7
7
|
._1o9zidpf{flex-shrink:0}
|
|
8
|
-
._1o9zkb7n{flex-shrink:1}
|
|
9
8
|
._1pfh1i6y{margin-block-start:var(--ds-space-negative-025,-2px)}
|
|
10
9
|
._1reo15vq{overflow-x:hidden}
|
|
11
10
|
._1toh1r31._1toh1r31{text-decoration-color:currentColor}
|
|
@@ -17,7 +16,6 @@
|
|
|
17
16
|
._ahbq1b66{margin-inline-start:var(--ds-space-050,4px)}
|
|
18
17
|
._c71l1tcg{max-height:24px}
|
|
19
18
|
._mrqmnqa1._mrqmnqa1{text-decoration-style:solid}
|
|
20
|
-
._p12f1osq{max-width:100%}
|
|
21
19
|
._p12f1tcg{max-width:24px}
|
|
22
20
|
._p12fnklw{max-width:20pc}
|
|
23
21
|
._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
|
|
@@ -16,23 +16,19 @@ var _anchor = require("@atlaskit/primitives/compiled/anchor");
|
|
|
16
16
|
var _inline = require("@atlaskit/primitives/compiled/inline");
|
|
17
17
|
var _text = require("@atlaskit/primitives/compiled/text");
|
|
18
18
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
19
|
-
var _useIsFhsEnabled = require("../../fhs-rollout/use-is-fhs-enabled");
|
|
20
19
|
var _hasCustomThemeContext = require("../themed/has-custom-theme-context");
|
|
21
20
|
var _logoRenderer = require("./logo-renderer");
|
|
22
21
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
23
22
|
var anchorStyles = {
|
|
24
23
|
root: "_2rko1mok _1e0c1txw _4cvr1h6o _4t3izwfg _1o9zidpf _ahbq1b66 _1toh1r31 _5jyqglyw _mrqmnqa1 _1w901kw7",
|
|
25
24
|
interactionStates: "_irr31dpa _1di69yc7",
|
|
26
|
-
interactionStatesCustomTheming: "_irr31rps _1di6yhlj"
|
|
27
|
-
fullHeightSidebar: "_1reo15vq _18m915vq _1o9zkb7n"
|
|
25
|
+
interactionStatesCustomTheming: "_irr31rps _1di6yhlj"
|
|
28
26
|
};
|
|
29
27
|
var logoWrapperStyles = {
|
|
30
|
-
root: "_18zr1b66"
|
|
31
|
-
fullHeightSidebar: "_p12f1osq"
|
|
28
|
+
root: "_18zr1b66"
|
|
32
29
|
};
|
|
33
30
|
var iconContainerStyles = {
|
|
34
|
-
root: "_1reo15vq _18m915vq _1e0c1txw _p12f1tcg _c71l1tcg"
|
|
35
|
-
fullHeightSidebar: "_1o9zidpf"
|
|
31
|
+
root: "_1reo15vq _18m915vq _1e0c1txw _p12f1tcg _c71l1tcg"
|
|
36
32
|
};
|
|
37
33
|
var logoTextStyles = {
|
|
38
34
|
root: "_1bsb1ris _p12fnklw _uiztglyw _y4tiv77o _1e0cglyw _2lx21bp4 _1bah1h6o _10y41txw"
|
|
@@ -59,7 +55,6 @@ var AppLogo = exports.AppLogo = function AppLogo(_ref) {
|
|
|
59
55
|
href = _ref.href,
|
|
60
56
|
icon = _ref.icon,
|
|
61
57
|
onClick = _ref.onClick;
|
|
62
|
-
var isFhsEnabled = (0, _useIsFhsEnabled.useIsFhsEnabled)();
|
|
63
58
|
var ref = (0, _react.useRef)(null);
|
|
64
59
|
var nameRef = (0, _react.useRef)(null);
|
|
65
60
|
var hasCustomTheme = (0, _hasCustomThemeContext.useHasCustomTheme)();
|
|
@@ -79,14 +74,14 @@ var AppLogo = exports.AppLogo = function AppLogo(_ref) {
|
|
|
79
74
|
// @ts-expect-error - non-standard values for `borderRadius` and the custom theming interaction states
|
|
80
75
|
// eslint-disable-next-line @compiled/no-suppress-xcss
|
|
81
76
|
,
|
|
82
|
-
xcss: (0, _react2.cx)(anchorStyles.root, hasCustomTheme ? anchorStyles.interactionStatesCustomTheming : anchorStyles.interactionStates
|
|
77
|
+
xcss: (0, _react2.cx)(anchorStyles.root, hasCustomTheme ? anchorStyles.interactionStatesCustomTheming : anchorStyles.interactionStates),
|
|
83
78
|
onClick: onClick
|
|
84
79
|
}, /*#__PURE__*/_react.default.createElement(_inline.Inline, {
|
|
85
80
|
space: "space.075",
|
|
86
81
|
alignBlock: "center",
|
|
87
|
-
xcss:
|
|
82
|
+
xcss: logoWrapperStyles.root
|
|
88
83
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
89
|
-
className: (0, _runtime.ax)([iconContainerStyles.root
|
|
84
|
+
className: (0, _runtime.ax)([iconContainerStyles.root])
|
|
90
85
|
}, /*#__PURE__*/_react.default.createElement(_logoRenderer.LogoRenderer, {
|
|
91
86
|
logoOrIcon: icon
|
|
92
87
|
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -5,12 +5,10 @@
|
|
|
5
5
|
._1e0cglyw{display:none}
|
|
6
6
|
._1jpx1f51 img{object-fit:contain}
|
|
7
7
|
._1reo15vq{overflow-x:hidden}
|
|
8
|
-
._1ul91tcg{min-width:24px}
|
|
9
8
|
._4cvr1h6o{align-items:center}
|
|
10
9
|
._4t3izwfg{height:2pc}
|
|
11
10
|
._ahbq1b66{margin-inline-start:var(--ds-space-050,4px)}
|
|
12
11
|
._bna71tcg img{height:24px}
|
|
13
|
-
._p12f1osq{max-width:100%}
|
|
14
12
|
._p12f1tcg{max-width:24px}
|
|
15
13
|
._p12fnklw{max-width:20pc}
|
|
16
14
|
._rtys1kw7 img{max-width:inherit}
|
|
@@ -11,7 +11,6 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _react2 = require("@compiled/react");
|
|
13
13
|
var _anchor = require("@atlaskit/primitives/compiled/anchor");
|
|
14
|
-
var _useIsFhsEnabled = require("../../fhs-rollout/use-is-fhs-enabled");
|
|
15
14
|
var _hasCustomThemeContext = require("../themed/has-custom-theme-context");
|
|
16
15
|
var _logoRenderer = require("./logo-renderer");
|
|
17
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -23,8 +22,7 @@ var anchorStyles = {
|
|
|
23
22
|
newInteractionStatesCustomTheming: "_irr31rps _1di6yhlj"
|
|
24
23
|
};
|
|
25
24
|
var sharedIconOrLogoContainerStyles = {
|
|
26
|
-
root: "_1reo15vq _18m915vq _18zr1b66 _bna71tcg _rtys1kw7 _1jpx1f51"
|
|
27
|
-
withFullHeightSidebar: "_p12f1osq _1ul91tcg"
|
|
25
|
+
root: "_1reo15vq _18m915vq _18zr1b66 _bna71tcg _rtys1kw7 _1jpx1f51"
|
|
28
26
|
};
|
|
29
27
|
var iconContainerStyles = {
|
|
30
28
|
root: "_1e0c1txw _p12f1tcg _vchh1ntv _10y4glyw"
|
|
@@ -79,7 +77,6 @@ var CustomLogo = exports.CustomLogo = function CustomLogo(_ref) {
|
|
|
79
77
|
}
|
|
80
78
|
}, []);
|
|
81
79
|
var hasCustomTheme = (0, _hasCustomThemeContext.useHasCustomTheme)();
|
|
82
|
-
var isFhsEnabled = (0, _useIsFhsEnabled.useIsFhsEnabled)();
|
|
83
80
|
return /*#__PURE__*/_react.default.createElement(_anchor.Anchor, {
|
|
84
81
|
ref: ref,
|
|
85
82
|
"aria-label": label,
|
|
@@ -90,11 +87,11 @@ var CustomLogo = exports.CustomLogo = function CustomLogo(_ref) {
|
|
|
90
87
|
xcss: (0, _react2.cx)(anchorStyles.root, anchorStyles.customLogoBorderRadius, anchorStyles.newMargin, hasCustomTheme ? anchorStyles.newInteractionStatesCustomTheming : anchorStyles.newInteractionStates),
|
|
91
88
|
onClick: onClick
|
|
92
89
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
93
|
-
className: (0, _runtime.ax)([sharedIconOrLogoContainerStyles.root, iconContainerStyles.root
|
|
90
|
+
className: (0, _runtime.ax)([sharedIconOrLogoContainerStyles.root, iconContainerStyles.root])
|
|
94
91
|
}, /*#__PURE__*/_react.default.createElement(_logoRenderer.LogoRenderer, {
|
|
95
92
|
logoOrIcon: icon
|
|
96
93
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
97
|
-
className: (0, _runtime.ax)([sharedIconOrLogoContainerStyles.root, logoContainerStyles.root
|
|
94
|
+
className: (0, _runtime.ax)([sharedIconOrLogoContainerStyles.root, logoContainerStyles.root])
|
|
98
95
|
}, /*#__PURE__*/_react.default.createElement(_logoRenderer.LogoRenderer, {
|
|
99
96
|
logoOrIcon: logo
|
|
100
97
|
})));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
1
|
+
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
2
|
+
._v564k6bl{transition:var(--ds-button-hovered,background-color border-color .15s cubic-bezier(.4,1,.6,1))}._18zr12x7{padding-inline:var(--ds-space-075,6px)}
|
|
2
3
|
._1ii7kb7n{grid-row:1}
|
|
3
4
|
._1rjcze3t{padding-block:var(--ds-space-0,0)}
|
|
4
5
|
._yyhy11wp{grid-column:3}
|
|
@@ -12,9 +13,9 @@
|
|
|
12
13
|
._80om1kdv{cursor:text}
|
|
13
14
|
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
14
15
|
._p12f1kvu{max-width:680px}
|
|
15
|
-
._p12fktbq{max-width:780px}
|
|
16
16
|
._vchhusvi{box-sizing:border-box}
|
|
17
17
|
._yv0e1mfv{grid-template-columns:auto 1fr auto}
|
|
18
18
|
._irr3l4ek:hover{background-color:var(--ds-background-input-hovered,#f8f8f8)}
|
|
19
|
+
._1ggl5xtf:active{transition:var(--ds-button-pressed,background-color border-color .15s cubic-bezier(.4,1,.6,1))}
|
|
19
20
|
._1di6r01l:active{background-color:var(--ds-background-input-pressed,#fff)}
|
|
20
21
|
@media (min-width:30rem){._114b11p5{display:grid}}
|