@atlaskit/navigation-system 2.11.1 → 2.13.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 +21 -0
- package/dist/cjs/ui/page-layout/side-nav/side-nav.compiled.css +1 -2
- package/dist/cjs/ui/page-layout/side-nav/side-nav.js +3 -6
- package/dist/cjs/ui/top-nav-items/nav-logo/app-logo.js +3 -8
- package/dist/cjs/ui/top-nav-items/themed/button.js +29 -25
- package/dist/es2019/ui/page-layout/side-nav/side-nav.compiled.css +1 -2
- package/dist/es2019/ui/page-layout/side-nav/side-nav.js +3 -6
- package/dist/es2019/ui/top-nav-items/nav-logo/app-logo.js +1 -8
- package/dist/es2019/ui/top-nav-items/themed/button.js +29 -25
- package/dist/esm/ui/page-layout/side-nav/side-nav.compiled.css +1 -2
- package/dist/esm/ui/page-layout/side-nav/side-nav.js +3 -6
- package/dist/esm/ui/top-nav-items/nav-logo/app-logo.js +1 -8
- package/dist/esm/ui/top-nav-items/themed/button.js +29 -25
- package/dist/types/ui/menu-item/link-menu-item.d.ts +1 -17
- package/dist/types/ui/menu-item/menu-item.d.ts +19 -14
- package/dist/types/ui/menu-item/menu-list-item.d.ts +6 -5
- package/dist/types-ts4.5/ui/menu-item/link-menu-item.d.ts +1 -17
- package/dist/types-ts4.5/ui/menu-item/menu-item.d.ts +19 -14
- package/dist/types-ts4.5/ui/menu-item/menu-list-item.d.ts +6 -5
- package/package.json +5 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlassian/navigation-system
|
|
2
2
|
|
|
3
|
+
## 2.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`9d65ef412f30c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9d65ef412f30c) -
|
|
8
|
+
Cleans up the `platform_design_system_nav4_sidenav_border` feature gate. The side nav border is
|
|
9
|
+
now only applied when it does not have a shadow.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`437668dfbdec9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/437668dfbdec9) -
|
|
14
|
+
Add explicit types to a number of DST components
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
17
|
+
## 2.12.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- [`d19446c7cb076`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d19446c7cb076) -
|
|
22
|
+
FG cleanup jfp-magma-hydration-harmonise-applogo-classname
|
|
23
|
+
|
|
3
24
|
## 2.11.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
._nd5l1b6c{grid-area:main/aside/aside/aside}
|
|
3
3
|
._191wglyw{border-inline-start:none}
|
|
4
|
-
._t51z7r9e{border-inline-end:var(--ds-border-width,1px) solid var(--ds-border,#091e4224)}
|
|
5
4
|
._t51zglyw{border-inline-end:none}._152timx3{inset-block-start:calc(var(--n_bnrM, 0px) + var(--n_tNvM, 0px))}
|
|
6
5
|
._16qs1cd0{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #091e4226,0 0 1px #091e424f)}
|
|
7
6
|
._1bah1yb4{justify-content:space-between}
|
|
@@ -16,5 +15,5 @@
|
|
|
16
15
|
._kqsw1if8{position:sticky}
|
|
17
16
|
._vchhusvi{box-sizing:border-box}
|
|
18
17
|
@media (min-width:48rem){._14b5hc79{width:var(--n_snvRsz,var(--n_sNvw))}}
|
|
19
|
-
@media (min-width:64rem){._165t56xv{height:calc(100vh - var(--n_bnrM, 0px))}._180k1wjm{inset-block-start:calc(var(--n_bnrM, 0px))}._26vxoned{padding-block-start:calc(var(--n_tNvM, 0px))}._1mt19dtb{margin-block-start:calc(var(--n_tNvM, 0px)*-1)}._dm2518uv{display:initial}._dm25glyw{display:none}.
|
|
18
|
+
@media (min-width:64rem){._165t56xv{height:calc(100vh - var(--n_bnrM, 0px))}._180k1wjm{inset-block-start:calc(var(--n_bnrM, 0px))}._26vxoned{padding-block-start:calc(var(--n_tNvM, 0px))}._1mt19dtb{margin-block-start:calc(var(--n_tNvM, 0px)*-1)}._dm2518uv{display:initial}._dm25glyw{display:none}._qiln1gzg{grid-area:main}._p5clglyw{border-inline-end:none}._4ap31bhr{background-color:var(--ds-surface-overlay,#fff)}._scbp1cd0{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #091e4226,0 0 1px #091e424f)}._qilnk0mc{grid-area:side-nav}._p5cl7r9e{border-inline-end:var(--ds-border-width,1px) solid var(--ds-border,#091e4224)}._4ap3vuon{background-color:var(--ds-surface,#fff)}._scbpglyw{box-shadow:none}}
|
|
20
19
|
@supports not (-moz-appearance:none){@media (prefers-reduced-motion:no-preference){._139f8iot{transition-property:transform,display}._1tpvfnf5{transition-duration:.2s}._sylc1a5r{transition-behavior:allow-discrete}._1uwsjq3t{transform:translateX(-100%)}}@media (prefers-reduced-motion:no-preference){@starting-style{._oyeijq3t{transform:translateX(-100%)}}._139f8iot{transition-property:transform,display}._1tpvfnf5{transition-duration:.2s}._sylc1a5r{transition-behavior:allow-discrete}}}
|
|
@@ -51,11 +51,8 @@ function getResizeBounds() {
|
|
|
51
51
|
}
|
|
52
52
|
var openLayerObserverSideNavNamespace = 'side-nav';
|
|
53
53
|
var styles = {
|
|
54
|
-
root: "_nd5l1b6c _bfhk1bhr _16qs1cd0 _vchhusvi _4t3ieqxy _152timx3 _kqsw1if8 _1bsb1ego _1pbycs5v _14b5hc79 _qilnk0mc _4ap3vuon _scbpglyw",
|
|
55
|
-
|
|
56
|
-
newBorder: "_191wglyw _t51zglyw _p5cl7r9e",
|
|
57
|
-
newBorderFlyoutOpen: "_p5clglyw",
|
|
58
|
-
flyoutOpen: "_qiln1gzg _4ap31bhr _scbp1cd0 _139f8iot _1tpvfnf5 _sylc1a5r _oyeijq3t",
|
|
54
|
+
root: "_nd5l1b6c _191wglyw _t51zglyw _bfhk1bhr _16qs1cd0 _vchhusvi _4t3ieqxy _152timx3 _kqsw1if8 _1bsb1ego _1pbycs5v _14b5hc79 _qilnk0mc _p5cl7r9e _4ap3vuon _scbpglyw",
|
|
55
|
+
flyoutOpen: "_qiln1gzg _p5clglyw _4ap31bhr _scbp1cd0 _139f8iot _1tpvfnf5 _sylc1a5r _oyeijq3t",
|
|
59
56
|
flyoutAnimateClosed: "_1e0cglyw _qiln1gzg _139f8iot _1tpvfnf5 _sylc1a5r _1uwsjq3t",
|
|
60
57
|
flexContainer: "_4t3i1osq _1e0c1txw _2lx21bp4 _1bah1yb4",
|
|
61
58
|
hiddenMobileAndDesktop: "_1e0cglyw",
|
|
@@ -583,7 +580,7 @@ function SideNavInternal(_ref) {
|
|
|
583
580
|
style: (0, _defineProperty2.default)({}, _constants.sideNavVar, clampedWidth),
|
|
584
581
|
ref: mergedRef,
|
|
585
582
|
"data-testid": testId,
|
|
586
|
-
className: (0, _runtime.ax)([styles.root,
|
|
583
|
+
className: (0, _runtime.ax)([styles.root, isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileOnly, !isExpandedOnDesktop && isExpandedOnMobile && !isFlyoutVisible && styles.hiddenDesktopOnly, !isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileAndDesktop, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && styles.flyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close' && styles.flyoutAnimateClosed, isFlyoutClosed && (0, _platformFeatureFlags.fg)('navx-full-height-sidebar') && styles.fullHeightSidebar])
|
|
587
584
|
}), /*#__PURE__*/React.createElement(_hoistUtils.DangerouslyHoistCssVarToDocumentRoot, {
|
|
588
585
|
variableName: _constants.sideNavLiveWidthVar,
|
|
589
586
|
value: "0px",
|
|
@@ -12,16 +12,11 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _react2 = require("@compiled/react");
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
|
-
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
16
|
-
var _primitives = require("@atlaskit/primitives");
|
|
17
15
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
16
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
19
17
|
var _hasCustomThemeContext = require("../themed/has-custom-theme-context");
|
|
20
18
|
var _logoRenderer = require("./logo-renderer");
|
|
21
19
|
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); }
|
|
22
|
-
var Anchor = (0, _platformFeatureFlagsReact.componentWithFG)('jfp-magma-hydration-harmonise-applogo-classname', _compiled.Anchor, _primitives.Anchor);
|
|
23
|
-
var Inline = (0, _platformFeatureFlagsReact.componentWithFG)('jfp-magma-hydration-harmonise-applogo-classname', _compiled.Inline, _primitives.Inline);
|
|
24
|
-
var Text = (0, _platformFeatureFlagsReact.componentWithFG)('jfp-magma-hydration-harmonise-applogo-classname', _compiled.Text, _primitives.Text);
|
|
25
20
|
var anchorStyles = {
|
|
26
21
|
root: "_2rko19bv _1e0c1txw _4cvr1h6o _4t3izwfg _1o9zidpf _ahbq1b66 _1toh1r31 _5jyqglyw _mrqmnqa1 _1w901kw7",
|
|
27
22
|
interactionStates: "_irr3166n _1di61wwy",
|
|
@@ -69,7 +64,7 @@ var AppLogo = exports.AppLogo = function AppLogo(_ref) {
|
|
|
69
64
|
var text = nameRef.current;
|
|
70
65
|
return Boolean(text && isTextClamped(text));
|
|
71
66
|
}, []);
|
|
72
|
-
return /*#__PURE__*/_react.default.createElement(Anchor, {
|
|
67
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Anchor, {
|
|
73
68
|
ref: ref,
|
|
74
69
|
"aria-label": label,
|
|
75
70
|
href: href
|
|
@@ -78,7 +73,7 @@ var AppLogo = exports.AppLogo = function AppLogo(_ref) {
|
|
|
78
73
|
,
|
|
79
74
|
xcss: (0, _react2.cx)(anchorStyles.root, hasCustomTheme ? anchorStyles.interactionStatesCustomTheming : anchorStyles.interactionStates, (0, _platformFeatureFlags.fg)('navx-full-height-sidebar') && anchorStyles.fullHeightSidebar),
|
|
80
75
|
onClick: onClick
|
|
81
|
-
}, /*#__PURE__*/_react.default.createElement(Inline, {
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
82
77
|
space: "space.075",
|
|
83
78
|
alignBlock: "center",
|
|
84
79
|
xcss: (0, _react2.cx)(logoWrapperStyles.root, (0, _platformFeatureFlags.fg)('navx-full-height-sidebar') && logoWrapperStyles.fullHeightSidebar)
|
|
@@ -102,7 +97,7 @@ var AppLogo = exports.AppLogo = function AppLogo(_ref) {
|
|
|
102
97
|
isScreenReaderAnnouncementDisabled: true,
|
|
103
98
|
canAppear: canTooltipAppear
|
|
104
99
|
}, function (tooltipProps) {
|
|
105
|
-
return /*#__PURE__*/_react.default.createElement("span", tooltipProps, /*#__PURE__*/_react.default.createElement(Text, {
|
|
100
|
+
return /*#__PURE__*/_react.default.createElement("span", tooltipProps, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
106
101
|
"aria-hidden": true,
|
|
107
102
|
color: "inherit",
|
|
108
103
|
weight: "semibold",
|
|
@@ -132,16 +132,7 @@ var ThemedPressable = /*#__PURE__*/(0, _react.forwardRef)(function ThemedPressab
|
|
|
132
132
|
isDisabled: isDisabled
|
|
133
133
|
}));
|
|
134
134
|
});
|
|
135
|
-
|
|
136
|
-
* Intentionally an almost-duplicate of `ThemedPressable` - make sure to update both.
|
|
137
|
-
*
|
|
138
|
-
* More 'clever' solutions were tried but I couldn't get them working in an acceptable state.
|
|
139
|
-
*
|
|
140
|
-
* Polymorphism had many typing issues and required sacrificing type safety.
|
|
141
|
-
*
|
|
142
|
-
* Render props had problems passing down styles through `xcss` to the `children` function.
|
|
143
|
-
*/
|
|
144
|
-
var ThemedAnchor = (0, _forwardRefWithGeneric.default)(function ThemedAnchor(_ref3, ref) {
|
|
135
|
+
function ThemedAnchorFn(_ref3, ref) {
|
|
145
136
|
var _ref3$appearance = _ref3.appearance,
|
|
146
137
|
appearance = _ref3$appearance === void 0 ? 'default' : _ref3$appearance,
|
|
147
138
|
_ref3$shape = _ref3.shape,
|
|
@@ -161,7 +152,17 @@ var ThemedAnchor = (0, _forwardRefWithGeneric.default)(function ThemedAnchor(_re
|
|
|
161
152
|
,
|
|
162
153
|
xcss: (0, _react2.cx)(styles.root, shapeStyles[shape], hasBorder && styles.border, appearanceStyles[appearance], isSelected && styles.selected, isDisabled && styles.disabled)
|
|
163
154
|
}));
|
|
164
|
-
}
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Intentionally an almost-duplicate of `ThemedPressable` - make sure to update both.
|
|
158
|
+
*
|
|
159
|
+
* More 'clever' solutions were tried but I couldn't get them working in an acceptable state.
|
|
160
|
+
*
|
|
161
|
+
* Polymorphism had many typing issues and required sacrificing type safety.
|
|
162
|
+
*
|
|
163
|
+
* Render props had problems passing down styles through `xcss` to the `children` function.
|
|
164
|
+
*/
|
|
165
|
+
var ThemedAnchor = (0, _forwardRefWithGeneric.default)(ThemedAnchorFn);
|
|
165
166
|
var textButtonStyles = {
|
|
166
167
|
iconBefore: "_vwz4idpf",
|
|
167
168
|
text: "_k48p1wq8"
|
|
@@ -191,12 +192,7 @@ var ThemedButton = exports.ThemedButton = /*#__PURE__*/(0, _react.forwardRef)(fu
|
|
|
191
192
|
className: (0, _runtime.ax)([textButtonStyles.text])
|
|
192
193
|
}, children));
|
|
193
194
|
});
|
|
194
|
-
|
|
195
|
-
* __Themed link button__
|
|
196
|
-
*
|
|
197
|
-
* A themed link button for the top bar.
|
|
198
|
-
*/
|
|
199
|
-
var ThemedLinkButton = exports.ThemedLinkButton = (0, _forwardRefWithGeneric.default)(function ThemedLinkButton(_ref5, ref) {
|
|
195
|
+
function ThemedLinkButtonFn(_ref5, ref) {
|
|
200
196
|
var IconBefore = _ref5.iconBefore,
|
|
201
197
|
children = _ref5.children,
|
|
202
198
|
props = (0, _objectWithoutProperties2.default)(_ref5, _excluded5);
|
|
@@ -210,7 +206,13 @@ var ThemedLinkButton = exports.ThemedLinkButton = (0, _forwardRefWithGeneric.def
|
|
|
210
206
|
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
211
207
|
className: (0, _runtime.ax)([textButtonStyles.text])
|
|
212
208
|
}, children));
|
|
213
|
-
}
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* __Themed link button__
|
|
212
|
+
*
|
|
213
|
+
* A themed link button for the top bar.
|
|
214
|
+
*/
|
|
215
|
+
var ThemedLinkButton = exports.ThemedLinkButton = (0, _forwardRefWithGeneric.default)(ThemedLinkButtonFn);
|
|
214
216
|
|
|
215
217
|
/**
|
|
216
218
|
* Props shared by `ThemedIconButtonProps` and `ThemedLinkIconButton`
|
|
@@ -283,12 +285,7 @@ var ThemedIconButton = exports.ThemedIconButton = /*#__PURE__*/(0, _react.forwar
|
|
|
283
285
|
);
|
|
284
286
|
});
|
|
285
287
|
});
|
|
286
|
-
|
|
287
|
-
* __Themed link icon button__
|
|
288
|
-
*
|
|
289
|
-
* A themed link icon button for the top bar.
|
|
290
|
-
*/
|
|
291
|
-
var ThemedLinkIconButton = exports.ThemedLinkIconButton = (0, _forwardRefWithGeneric.default)(function ThemedLinkIconButton(_ref7, ref) {
|
|
288
|
+
function ThemedLinkIconButtonFn(_ref7, ref) {
|
|
292
289
|
var _tooltip$content2;
|
|
293
290
|
var Icon = _ref7.icon,
|
|
294
291
|
label = _ref7.label,
|
|
@@ -349,4 +346,11 @@ var ThemedLinkIconButton = exports.ThemedLinkIconButton = (0, _forwardRefWithGen
|
|
|
349
346
|
}), /*#__PURE__*/_react.default.createElement(_visuallyHidden.default, null, label))
|
|
350
347
|
);
|
|
351
348
|
});
|
|
352
|
-
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* __Themed link icon button__
|
|
353
|
+
*
|
|
354
|
+
* A themed link icon button for the top bar.
|
|
355
|
+
*/
|
|
356
|
+
var ThemedLinkIconButton = exports.ThemedLinkIconButton = (0, _forwardRefWithGeneric.default)(ThemedLinkIconButtonFn);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
._nd5l1b6c{grid-area:main/aside/aside/aside}
|
|
3
3
|
._191wglyw{border-inline-start:none}
|
|
4
|
-
._t51z7r9e{border-inline-end:var(--ds-border-width,1px) solid var(--ds-border,#091e4224)}
|
|
5
4
|
._t51zglyw{border-inline-end:none}._152timx3{inset-block-start:calc(var(--n_bnrM, 0px) + var(--n_tNvM, 0px))}
|
|
6
5
|
._16qs1cd0{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #091e4226,0 0 1px #091e424f)}
|
|
7
6
|
._1bah1yb4{justify-content:space-between}
|
|
@@ -16,5 +15,5 @@
|
|
|
16
15
|
._kqsw1if8{position:sticky}
|
|
17
16
|
._vchhusvi{box-sizing:border-box}
|
|
18
17
|
@media (min-width:48rem){._14b5hc79{width:var(--n_snvRsz,var(--n_sNvw))}}
|
|
19
|
-
@media (min-width:64rem){._165t56xv{height:calc(100vh - var(--n_bnrM, 0px))}._180k1wjm{inset-block-start:calc(var(--n_bnrM, 0px))}._26vxoned{padding-block-start:calc(var(--n_tNvM, 0px))}._1mt19dtb{margin-block-start:calc(var(--n_tNvM, 0px)*-1)}._dm2518uv{display:initial}._dm25glyw{display:none}.
|
|
18
|
+
@media (min-width:64rem){._165t56xv{height:calc(100vh - var(--n_bnrM, 0px))}._180k1wjm{inset-block-start:calc(var(--n_bnrM, 0px))}._26vxoned{padding-block-start:calc(var(--n_tNvM, 0px))}._1mt19dtb{margin-block-start:calc(var(--n_tNvM, 0px)*-1)}._dm2518uv{display:initial}._dm25glyw{display:none}._qiln1gzg{grid-area:main}._p5clglyw{border-inline-end:none}._4ap31bhr{background-color:var(--ds-surface-overlay,#fff)}._scbp1cd0{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #091e4226,0 0 1px #091e424f)}._qilnk0mc{grid-area:side-nav}._p5cl7r9e{border-inline-end:var(--ds-border-width,1px) solid var(--ds-border,#091e4224)}._4ap3vuon{background-color:var(--ds-surface,#fff)}._scbpglyw{box-shadow:none}}
|
|
20
19
|
@supports not (-moz-appearance:none){@media (prefers-reduced-motion:no-preference){._139f8iot{transition-property:transform,display}._1tpvfnf5{transition-duration:.2s}._sylc1a5r{transition-behavior:allow-discrete}._1uwsjq3t{transform:translateX(-100%)}}@media (prefers-reduced-motion:no-preference){@starting-style{._oyeijq3t{transform:translateX(-100%)}}._139f8iot{transition-property:transform,display}._1tpvfnf5{transition-duration:.2s}._sylc1a5r{transition-behavior:allow-discrete}}}
|
|
@@ -38,11 +38,8 @@ function getResizeBounds() {
|
|
|
38
38
|
}
|
|
39
39
|
const openLayerObserverSideNavNamespace = 'side-nav';
|
|
40
40
|
const styles = {
|
|
41
|
-
root: "_nd5l1b6c _bfhk1bhr _16qs1cd0 _vchhusvi _4t3ieqxy _152timx3 _kqsw1if8 _1bsb1ego _1pbycs5v _14b5hc79 _qilnk0mc _4ap3vuon _scbpglyw",
|
|
42
|
-
|
|
43
|
-
newBorder: "_191wglyw _t51zglyw _p5cl7r9e",
|
|
44
|
-
newBorderFlyoutOpen: "_p5clglyw",
|
|
45
|
-
flyoutOpen: "_qiln1gzg _4ap31bhr _scbp1cd0 _139f8iot _1tpvfnf5 _sylc1a5r _oyeijq3t",
|
|
41
|
+
root: "_nd5l1b6c _191wglyw _t51zglyw _bfhk1bhr _16qs1cd0 _vchhusvi _4t3ieqxy _152timx3 _kqsw1if8 _1bsb1ego _1pbycs5v _14b5hc79 _qilnk0mc _p5cl7r9e _4ap3vuon _scbpglyw",
|
|
42
|
+
flyoutOpen: "_qiln1gzg _p5clglyw _4ap31bhr _scbp1cd0 _139f8iot _1tpvfnf5 _sylc1a5r _oyeijq3t",
|
|
46
43
|
flyoutAnimateClosed: "_1e0cglyw _qiln1gzg _139f8iot _1tpvfnf5 _sylc1a5r _1uwsjq3t",
|
|
47
44
|
flexContainer: "_4t3i1osq _1e0c1txw _2lx21bp4 _1bah1yb4",
|
|
48
45
|
hiddenMobileAndDesktop: "_1e0cglyw",
|
|
@@ -575,7 +572,7 @@ function SideNavInternal({
|
|
|
575
572
|
},
|
|
576
573
|
ref: mergedRef,
|
|
577
574
|
"data-testid": testId,
|
|
578
|
-
className: ax([styles.root,
|
|
575
|
+
className: ax([styles.root, isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileOnly, !isExpandedOnDesktop && isExpandedOnMobile && !isFlyoutVisible && styles.hiddenDesktopOnly, !isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileAndDesktop, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && styles.flyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close' && styles.flyoutAnimateClosed, isFlyoutClosed && fg('navx-full-height-sidebar') && styles.fullHeightSidebar])
|
|
579
576
|
}), /*#__PURE__*/React.createElement(DangerouslyHoistCssVarToDocumentRoot, {
|
|
580
577
|
variableName: sideNavLiveWidthVar,
|
|
581
578
|
value: "0px",
|
|
@@ -4,17 +4,10 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useCallback, useRef } from 'react';
|
|
5
5
|
import { cx } from '@compiled/react';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import {
|
|
8
|
-
import { Anchor as AnchorLegacy, Inline as InlineLegacy, Text as TextLegacy
|
|
9
|
-
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
10
|
-
} from '@atlaskit/primitives';
|
|
11
|
-
import { Anchor as AnchorCompiled, Inline as InlineCompiled, Text as TextCompiled } from '@atlaskit/primitives/compiled';
|
|
7
|
+
import { Anchor, Inline, Text } from '@atlaskit/primitives/compiled';
|
|
12
8
|
import Tooltip from '@atlaskit/tooltip';
|
|
13
9
|
import { useHasCustomTheme } from '../themed/has-custom-theme-context';
|
|
14
10
|
import { LogoRenderer } from './logo-renderer';
|
|
15
|
-
const Anchor = componentWithFG('jfp-magma-hydration-harmonise-applogo-classname', AnchorCompiled, AnchorLegacy);
|
|
16
|
-
const Inline = componentWithFG('jfp-magma-hydration-harmonise-applogo-classname', InlineCompiled, InlineLegacy);
|
|
17
|
-
const Text = componentWithFG('jfp-magma-hydration-harmonise-applogo-classname', TextCompiled, TextLegacy);
|
|
18
11
|
const anchorStyles = {
|
|
19
12
|
root: "_2rko19bv _1e0c1txw _4cvr1h6o _4t3izwfg _1o9zidpf _ahbq1b66 _1toh1r31 _5jyqglyw _mrqmnqa1 _1w901kw7",
|
|
20
13
|
interactionStates: "_irr3166n _1di61wwy",
|
|
@@ -116,16 +116,7 @@ const ThemedPressable = /*#__PURE__*/forwardRef(function ThemedPressable({
|
|
|
116
116
|
isDisabled: isDisabled
|
|
117
117
|
}));
|
|
118
118
|
});
|
|
119
|
-
|
|
120
|
-
* Intentionally an almost-duplicate of `ThemedPressable` - make sure to update both.
|
|
121
|
-
*
|
|
122
|
-
* More 'clever' solutions were tried but I couldn't get them working in an acceptable state.
|
|
123
|
-
*
|
|
124
|
-
* Polymorphism had many typing issues and required sacrificing type safety.
|
|
125
|
-
*
|
|
126
|
-
* Render props had problems passing down styles through `xcss` to the `children` function.
|
|
127
|
-
*/
|
|
128
|
-
const ThemedAnchor = forwardRefWithGeneric(function ThemedAnchor({
|
|
119
|
+
function ThemedAnchorFn({
|
|
129
120
|
appearance = 'default',
|
|
130
121
|
shape = 'default',
|
|
131
122
|
isSelected,
|
|
@@ -144,7 +135,17 @@ const ThemedAnchor = forwardRefWithGeneric(function ThemedAnchor({
|
|
|
144
135
|
,
|
|
145
136
|
xcss: cx(styles.root, shapeStyles[shape], hasBorder && styles.border, appearanceStyles[appearance], isSelected && styles.selected, isDisabled && styles.disabled)
|
|
146
137
|
}));
|
|
147
|
-
}
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Intentionally an almost-duplicate of `ThemedPressable` - make sure to update both.
|
|
141
|
+
*
|
|
142
|
+
* More 'clever' solutions were tried but I couldn't get them working in an acceptable state.
|
|
143
|
+
*
|
|
144
|
+
* Polymorphism had many typing issues and required sacrificing type safety.
|
|
145
|
+
*
|
|
146
|
+
* Render props had problems passing down styles through `xcss` to the `children` function.
|
|
147
|
+
*/
|
|
148
|
+
const ThemedAnchor = forwardRefWithGeneric(ThemedAnchorFn);
|
|
148
149
|
const textButtonStyles = {
|
|
149
150
|
iconBefore: "_vwz4idpf",
|
|
150
151
|
text: "_k48p1wq8"
|
|
@@ -175,12 +176,7 @@ export const ThemedButton = /*#__PURE__*/forwardRef(function ThemedButton({
|
|
|
175
176
|
className: ax([textButtonStyles.text])
|
|
176
177
|
}, children));
|
|
177
178
|
});
|
|
178
|
-
|
|
179
|
-
* __Themed link button__
|
|
180
|
-
*
|
|
181
|
-
* A themed link button for the top bar.
|
|
182
|
-
*/
|
|
183
|
-
export const ThemedLinkButton = forwardRefWithGeneric(function ThemedLinkButton({
|
|
179
|
+
function ThemedLinkButtonFn({
|
|
184
180
|
iconBefore: IconBefore,
|
|
185
181
|
children,
|
|
186
182
|
...props
|
|
@@ -195,7 +191,13 @@ export const ThemedLinkButton = forwardRefWithGeneric(function ThemedLinkButton(
|
|
|
195
191
|
})), /*#__PURE__*/React.createElement("span", {
|
|
196
192
|
className: ax([textButtonStyles.text])
|
|
197
193
|
}, children));
|
|
198
|
-
}
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* __Themed link button__
|
|
197
|
+
*
|
|
198
|
+
* A themed link button for the top bar.
|
|
199
|
+
*/
|
|
200
|
+
export const ThemedLinkButton = forwardRefWithGeneric(ThemedLinkButtonFn);
|
|
199
201
|
|
|
200
202
|
/**
|
|
201
203
|
* Props shared by `ThemedIconButtonProps` and `ThemedLinkIconButton`
|
|
@@ -266,12 +268,7 @@ export const ThemedIconButton = /*#__PURE__*/forwardRef(function ThemedIconButto
|
|
|
266
268
|
color: "currentColor"
|
|
267
269
|
}), /*#__PURE__*/React.createElement(VisuallyHidden, null, label)));
|
|
268
270
|
});
|
|
269
|
-
|
|
270
|
-
* __Themed link icon button__
|
|
271
|
-
*
|
|
272
|
-
* A themed link icon button for the top bar.
|
|
273
|
-
*/
|
|
274
|
-
export const ThemedLinkIconButton = forwardRefWithGeneric(function ThemedLinkIconButton({
|
|
271
|
+
function ThemedLinkIconButtonFn({
|
|
275
272
|
icon: Icon,
|
|
276
273
|
label,
|
|
277
274
|
tooltip,
|
|
@@ -330,4 +327,11 @@ export const ThemedLinkIconButton = forwardRefWithGeneric(function ThemedLinkIco
|
|
|
330
327
|
label: "",
|
|
331
328
|
color: "currentColor"
|
|
332
329
|
}), /*#__PURE__*/React.createElement(VisuallyHidden, null, label)));
|
|
333
|
-
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* __Themed link icon button__
|
|
334
|
+
*
|
|
335
|
+
* A themed link icon button for the top bar.
|
|
336
|
+
*/
|
|
337
|
+
export const ThemedLinkIconButton = forwardRefWithGeneric(ThemedLinkIconButtonFn);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
._nd5l1b6c{grid-area:main/aside/aside/aside}
|
|
3
3
|
._191wglyw{border-inline-start:none}
|
|
4
|
-
._t51z7r9e{border-inline-end:var(--ds-border-width,1px) solid var(--ds-border,#091e4224)}
|
|
5
4
|
._t51zglyw{border-inline-end:none}._152timx3{inset-block-start:calc(var(--n_bnrM, 0px) + var(--n_tNvM, 0px))}
|
|
6
5
|
._16qs1cd0{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #091e4226,0 0 1px #091e424f)}
|
|
7
6
|
._1bah1yb4{justify-content:space-between}
|
|
@@ -16,5 +15,5 @@
|
|
|
16
15
|
._kqsw1if8{position:sticky}
|
|
17
16
|
._vchhusvi{box-sizing:border-box}
|
|
18
17
|
@media (min-width:48rem){._14b5hc79{width:var(--n_snvRsz,var(--n_sNvw))}}
|
|
19
|
-
@media (min-width:64rem){._165t56xv{height:calc(100vh - var(--n_bnrM, 0px))}._180k1wjm{inset-block-start:calc(var(--n_bnrM, 0px))}._26vxoned{padding-block-start:calc(var(--n_tNvM, 0px))}._1mt19dtb{margin-block-start:calc(var(--n_tNvM, 0px)*-1)}._dm2518uv{display:initial}._dm25glyw{display:none}.
|
|
18
|
+
@media (min-width:64rem){._165t56xv{height:calc(100vh - var(--n_bnrM, 0px))}._180k1wjm{inset-block-start:calc(var(--n_bnrM, 0px))}._26vxoned{padding-block-start:calc(var(--n_tNvM, 0px))}._1mt19dtb{margin-block-start:calc(var(--n_tNvM, 0px)*-1)}._dm2518uv{display:initial}._dm25glyw{display:none}._qiln1gzg{grid-area:main}._p5clglyw{border-inline-end:none}._4ap31bhr{background-color:var(--ds-surface-overlay,#fff)}._scbp1cd0{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #091e4226,0 0 1px #091e424f)}._qilnk0mc{grid-area:side-nav}._p5cl7r9e{border-inline-end:var(--ds-border-width,1px) solid var(--ds-border,#091e4224)}._4ap3vuon{background-color:var(--ds-surface,#fff)}._scbpglyw{box-shadow:none}}
|
|
20
19
|
@supports not (-moz-appearance:none){@media (prefers-reduced-motion:no-preference){._139f8iot{transition-property:transform,display}._1tpvfnf5{transition-duration:.2s}._sylc1a5r{transition-behavior:allow-discrete}._1uwsjq3t{transform:translateX(-100%)}}@media (prefers-reduced-motion:no-preference){@starting-style{._oyeijq3t{transform:translateX(-100%)}}._139f8iot{transition-property:transform,display}._1tpvfnf5{transition-duration:.2s}._sylc1a5r{transition-behavior:allow-discrete}}}
|
|
@@ -42,11 +42,8 @@ function getResizeBounds() {
|
|
|
42
42
|
}
|
|
43
43
|
var openLayerObserverSideNavNamespace = 'side-nav';
|
|
44
44
|
var styles = {
|
|
45
|
-
root: "_nd5l1b6c _bfhk1bhr _16qs1cd0 _vchhusvi _4t3ieqxy _152timx3 _kqsw1if8 _1bsb1ego _1pbycs5v _14b5hc79 _qilnk0mc _4ap3vuon _scbpglyw",
|
|
46
|
-
|
|
47
|
-
newBorder: "_191wglyw _t51zglyw _p5cl7r9e",
|
|
48
|
-
newBorderFlyoutOpen: "_p5clglyw",
|
|
49
|
-
flyoutOpen: "_qiln1gzg _4ap31bhr _scbp1cd0 _139f8iot _1tpvfnf5 _sylc1a5r _oyeijq3t",
|
|
45
|
+
root: "_nd5l1b6c _191wglyw _t51zglyw _bfhk1bhr _16qs1cd0 _vchhusvi _4t3ieqxy _152timx3 _kqsw1if8 _1bsb1ego _1pbycs5v _14b5hc79 _qilnk0mc _p5cl7r9e _4ap3vuon _scbpglyw",
|
|
46
|
+
flyoutOpen: "_qiln1gzg _p5clglyw _4ap31bhr _scbp1cd0 _139f8iot _1tpvfnf5 _sylc1a5r _oyeijq3t",
|
|
50
47
|
flyoutAnimateClosed: "_1e0cglyw _qiln1gzg _139f8iot _1tpvfnf5 _sylc1a5r _1uwsjq3t",
|
|
51
48
|
flexContainer: "_4t3i1osq _1e0c1txw _2lx21bp4 _1bah1yb4",
|
|
52
49
|
hiddenMobileAndDesktop: "_1e0cglyw",
|
|
@@ -574,7 +571,7 @@ function SideNavInternal(_ref) {
|
|
|
574
571
|
style: _defineProperty({}, sideNavVar, clampedWidth),
|
|
575
572
|
ref: mergedRef,
|
|
576
573
|
"data-testid": testId,
|
|
577
|
-
className: ax([styles.root,
|
|
574
|
+
className: ax([styles.root, isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileOnly, !isExpandedOnDesktop && isExpandedOnMobile && !isFlyoutVisible && styles.hiddenDesktopOnly, !isExpandedOnDesktop && !isExpandedOnMobile && !isFlyoutVisible && styles.hiddenMobileAndDesktop, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'open' && styles.flyoutOpen, (sideNavState === null || sideNavState === void 0 ? void 0 : sideNavState.flyout) === 'triggered-animate-close' && styles.flyoutAnimateClosed, isFlyoutClosed && fg('navx-full-height-sidebar') && styles.fullHeightSidebar])
|
|
578
575
|
}), /*#__PURE__*/React.createElement(DangerouslyHoistCssVarToDocumentRoot, {
|
|
579
576
|
variableName: sideNavLiveWidthVar,
|
|
580
577
|
value: "0px",
|
|
@@ -4,17 +4,10 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useCallback, useRef } from 'react';
|
|
5
5
|
import { cx } from '@compiled/react';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import {
|
|
8
|
-
import { Anchor as AnchorLegacy, Inline as InlineLegacy, Text as TextLegacy
|
|
9
|
-
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
10
|
-
} from '@atlaskit/primitives';
|
|
11
|
-
import { Anchor as AnchorCompiled, Inline as InlineCompiled, Text as TextCompiled } from '@atlaskit/primitives/compiled';
|
|
7
|
+
import { Anchor, Inline, Text } from '@atlaskit/primitives/compiled';
|
|
12
8
|
import Tooltip from '@atlaskit/tooltip';
|
|
13
9
|
import { useHasCustomTheme } from '../themed/has-custom-theme-context';
|
|
14
10
|
import { LogoRenderer } from './logo-renderer';
|
|
15
|
-
var Anchor = componentWithFG('jfp-magma-hydration-harmonise-applogo-classname', AnchorCompiled, AnchorLegacy);
|
|
16
|
-
var Inline = componentWithFG('jfp-magma-hydration-harmonise-applogo-classname', InlineCompiled, InlineLegacy);
|
|
17
|
-
var Text = componentWithFG('jfp-magma-hydration-harmonise-applogo-classname', TextCompiled, TextLegacy);
|
|
18
11
|
var anchorStyles = {
|
|
19
12
|
root: "_2rko19bv _1e0c1txw _4cvr1h6o _4t3izwfg _1o9zidpf _ahbq1b66 _1toh1r31 _5jyqglyw _mrqmnqa1 _1w901kw7",
|
|
20
13
|
interactionStates: "_irr3166n _1di61wwy",
|
|
@@ -124,16 +124,7 @@ var ThemedPressable = /*#__PURE__*/forwardRef(function ThemedPressable(_ref2, re
|
|
|
124
124
|
isDisabled: isDisabled
|
|
125
125
|
}));
|
|
126
126
|
});
|
|
127
|
-
|
|
128
|
-
* Intentionally an almost-duplicate of `ThemedPressable` - make sure to update both.
|
|
129
|
-
*
|
|
130
|
-
* More 'clever' solutions were tried but I couldn't get them working in an acceptable state.
|
|
131
|
-
*
|
|
132
|
-
* Polymorphism had many typing issues and required sacrificing type safety.
|
|
133
|
-
*
|
|
134
|
-
* Render props had problems passing down styles through `xcss` to the `children` function.
|
|
135
|
-
*/
|
|
136
|
-
var ThemedAnchor = forwardRefWithGeneric(function ThemedAnchor(_ref3, ref) {
|
|
127
|
+
function ThemedAnchorFn(_ref3, ref) {
|
|
137
128
|
var _ref3$appearance = _ref3.appearance,
|
|
138
129
|
appearance = _ref3$appearance === void 0 ? 'default' : _ref3$appearance,
|
|
139
130
|
_ref3$shape = _ref3.shape,
|
|
@@ -153,7 +144,17 @@ var ThemedAnchor = forwardRefWithGeneric(function ThemedAnchor(_ref3, ref) {
|
|
|
153
144
|
,
|
|
154
145
|
xcss: cx(styles.root, shapeStyles[shape], hasBorder && styles.border, appearanceStyles[appearance], isSelected && styles.selected, isDisabled && styles.disabled)
|
|
155
146
|
}));
|
|
156
|
-
}
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Intentionally an almost-duplicate of `ThemedPressable` - make sure to update both.
|
|
150
|
+
*
|
|
151
|
+
* More 'clever' solutions were tried but I couldn't get them working in an acceptable state.
|
|
152
|
+
*
|
|
153
|
+
* Polymorphism had many typing issues and required sacrificing type safety.
|
|
154
|
+
*
|
|
155
|
+
* Render props had problems passing down styles through `xcss` to the `children` function.
|
|
156
|
+
*/
|
|
157
|
+
var ThemedAnchor = forwardRefWithGeneric(ThemedAnchorFn);
|
|
157
158
|
var textButtonStyles = {
|
|
158
159
|
iconBefore: "_vwz4idpf",
|
|
159
160
|
text: "_k48p1wq8"
|
|
@@ -183,12 +184,7 @@ export var ThemedButton = /*#__PURE__*/forwardRef(function ThemedButton(_ref4, r
|
|
|
183
184
|
className: ax([textButtonStyles.text])
|
|
184
185
|
}, children));
|
|
185
186
|
});
|
|
186
|
-
|
|
187
|
-
* __Themed link button__
|
|
188
|
-
*
|
|
189
|
-
* A themed link button for the top bar.
|
|
190
|
-
*/
|
|
191
|
-
export var ThemedLinkButton = forwardRefWithGeneric(function ThemedLinkButton(_ref5, ref) {
|
|
187
|
+
function ThemedLinkButtonFn(_ref5, ref) {
|
|
192
188
|
var IconBefore = _ref5.iconBefore,
|
|
193
189
|
children = _ref5.children,
|
|
194
190
|
props = _objectWithoutProperties(_ref5, _excluded5);
|
|
@@ -202,7 +198,13 @@ export var ThemedLinkButton = forwardRefWithGeneric(function ThemedLinkButton(_r
|
|
|
202
198
|
})), /*#__PURE__*/React.createElement("span", {
|
|
203
199
|
className: ax([textButtonStyles.text])
|
|
204
200
|
}, children));
|
|
205
|
-
}
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* __Themed link button__
|
|
204
|
+
*
|
|
205
|
+
* A themed link button for the top bar.
|
|
206
|
+
*/
|
|
207
|
+
export var ThemedLinkButton = forwardRefWithGeneric(ThemedLinkButtonFn);
|
|
206
208
|
|
|
207
209
|
/**
|
|
208
210
|
* Props shared by `ThemedIconButtonProps` and `ThemedLinkIconButton`
|
|
@@ -275,12 +277,7 @@ export var ThemedIconButton = /*#__PURE__*/forwardRef(function ThemedIconButton(
|
|
|
275
277
|
);
|
|
276
278
|
});
|
|
277
279
|
});
|
|
278
|
-
|
|
279
|
-
* __Themed link icon button__
|
|
280
|
-
*
|
|
281
|
-
* A themed link icon button for the top bar.
|
|
282
|
-
*/
|
|
283
|
-
export var ThemedLinkIconButton = forwardRefWithGeneric(function ThemedLinkIconButton(_ref7, ref) {
|
|
280
|
+
function ThemedLinkIconButtonFn(_ref7, ref) {
|
|
284
281
|
var _tooltip$content2;
|
|
285
282
|
var Icon = _ref7.icon,
|
|
286
283
|
label = _ref7.label,
|
|
@@ -341,4 +338,11 @@ export var ThemedLinkIconButton = forwardRefWithGeneric(function ThemedLinkIconB
|
|
|
341
338
|
}), /*#__PURE__*/React.createElement(VisuallyHidden, null, label))
|
|
342
339
|
);
|
|
343
340
|
});
|
|
344
|
-
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* __Themed link icon button__
|
|
345
|
+
*
|
|
346
|
+
* A themed link icon button for the top bar.
|
|
347
|
+
*/
|
|
348
|
+
export var ThemedLinkIconButton = forwardRefWithGeneric(ThemedLinkIconButtonFn);
|
|
@@ -19,20 +19,4 @@ export type LinkMenuItemProps<RouterLinkConfig extends Record<string, any> = nev
|
|
|
19
19
|
*
|
|
20
20
|
* A menu item link. It should be used within a `ul`.
|
|
21
21
|
*/
|
|
22
|
-
export declare const LinkMenuItem: <RouterLinkConfig extends Record<string, any> = never>(props:
|
|
23
|
-
description?: string;
|
|
24
|
-
listItemRef?: React.Ref<HTMLDivElement>;
|
|
25
|
-
} & RouterLinkComponentProps<RouterLinkConfig> & {
|
|
26
|
-
/**
|
|
27
|
-
* The native `target` attribute for the anchor element.
|
|
28
|
-
*/
|
|
29
|
-
target?: HTMLAnchorElement["target"];
|
|
30
|
-
/**
|
|
31
|
-
* Whether the menu item is selected.
|
|
32
|
-
*/
|
|
33
|
-
isSelected?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Called when the user has clicked on the trigger content.
|
|
36
|
-
*/
|
|
37
|
-
onClick?: MenuItemOnClick<HTMLAnchorElement>;
|
|
38
|
-
} & import("react").RefAttributes<HTMLAnchorElement>) => React.ReactElement | null;
|
|
22
|
+
export declare const LinkMenuItem: <RouterLinkConfig extends Record<string, any> = never>(props: LinkMenuItemProps<RouterLinkConfig> & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import type { MenuItemOnClick } from './types';
|
|
7
|
+
import type { MenuItemLinkOrButtonCommonProps, MenuItemOnClick } from './types';
|
|
8
8
|
/**
|
|
9
9
|
* This is being _internally_ exported so it can be used in other menu item wrapper components, like
|
|
10
10
|
* ExpandableMenuItemTrigger.
|
|
@@ -20,28 +20,33 @@ import type { MenuItemOnClick } from './types';
|
|
|
20
20
|
*/
|
|
21
21
|
export declare const nestedOpenPopupCSSSelector = "&:has([aria-expanded=\"true\"][aria-haspopup=\"true\"])";
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* The base menu item component used to compose ButtonMenuItem and LinkMenuItem.
|
|
23
|
+
* Includes all props that are used by any menu item, as MenuItembase is the base component for all menu item components.
|
|
26
24
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
25
|
+
* We also include additional `aria` props to support the menu item being a trigger for the FlyoutMenuItem popup and for the
|
|
26
|
+
* expanded content for ExpandableMenuItem.
|
|
29
27
|
*/
|
|
30
|
-
|
|
31
|
-
description?: string;
|
|
32
|
-
listItemRef?: React.Ref<HTMLDivElement>;
|
|
33
|
-
} & {
|
|
28
|
+
type MenuItemBaseProps<T extends HTMLAnchorElement | HTMLButtonElement> = MenuItemLinkOrButtonCommonProps & {
|
|
34
29
|
/**
|
|
35
30
|
* ID attribute, passed to the interactive element (anchor/button). This is not publicly exposed, and is currently only
|
|
36
31
|
* used internally by `ExpandableMenuItemTrigger` for the `aria-labelledby` attribute.
|
|
37
32
|
*/
|
|
38
33
|
id?: string;
|
|
39
34
|
href?: string | Record<string, any>;
|
|
40
|
-
target?: HTMLAnchorElement[
|
|
35
|
+
target?: HTMLAnchorElement['target'];
|
|
41
36
|
isDisabled?: boolean;
|
|
42
37
|
isSelected?: boolean;
|
|
43
38
|
ariaControls?: string;
|
|
44
39
|
ariaExpanded?: boolean;
|
|
45
|
-
ariaHasPopup?: boolean |
|
|
46
|
-
onClick?: MenuItemOnClick<T
|
|
47
|
-
}
|
|
40
|
+
ariaHasPopup?: boolean | 'dialog';
|
|
41
|
+
onClick?: MenuItemOnClick<T>;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* __MenuItemBase__
|
|
45
|
+
*
|
|
46
|
+
* The base menu item component used to compose ButtonMenuItem and LinkMenuItem.
|
|
47
|
+
*
|
|
48
|
+
* It contains a type argument `<T>`, to specify the type of the interactive element (`button` or `a`).
|
|
49
|
+
* This can be inferred from the type of the `onClick` prop.
|
|
50
|
+
*/
|
|
51
|
+
export declare const MenuItemBase: <T extends HTMLAnchorElement | HTMLButtonElement>(props: MenuItemBaseProps<T> & React.RefAttributes<T>) => React.ReactElement | null;
|
|
52
|
+
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { ListItem } from '../../components/list-item';
|
|
1
6
|
/**
|
|
2
7
|
* __Menu list item__
|
|
3
8
|
*
|
|
4
9
|
* A [list item](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li) with visual styles removed.
|
|
5
10
|
*/
|
|
6
|
-
export declare const MenuListItem:
|
|
7
|
-
children: import("react").ReactNode;
|
|
8
|
-
testId?: string;
|
|
9
|
-
xcss?: import("@atlaskit/css").StrictXCSSProp<"display" | "scrollMarginInline", never>;
|
|
10
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export declare const MenuListItem: typeof ListItem;
|
|
@@ -19,20 +19,4 @@ export type LinkMenuItemProps<RouterLinkConfig extends Record<string, any> = nev
|
|
|
19
19
|
*
|
|
20
20
|
* A menu item link. It should be used within a `ul`.
|
|
21
21
|
*/
|
|
22
|
-
export declare const LinkMenuItem: <RouterLinkConfig extends Record<string, any> = never>(props:
|
|
23
|
-
description?: string;
|
|
24
|
-
listItemRef?: React.Ref<HTMLDivElement>;
|
|
25
|
-
} & RouterLinkComponentProps<RouterLinkConfig> & {
|
|
26
|
-
/**
|
|
27
|
-
* The native `target` attribute for the anchor element.
|
|
28
|
-
*/
|
|
29
|
-
target?: HTMLAnchorElement["target"];
|
|
30
|
-
/**
|
|
31
|
-
* Whether the menu item is selected.
|
|
32
|
-
*/
|
|
33
|
-
isSelected?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Called when the user has clicked on the trigger content.
|
|
36
|
-
*/
|
|
37
|
-
onClick?: MenuItemOnClick<HTMLAnchorElement>;
|
|
38
|
-
} & import("react").RefAttributes<HTMLAnchorElement>) => React.ReactElement | null;
|
|
22
|
+
export declare const LinkMenuItem: <RouterLinkConfig extends Record<string, any> = never>(props: LinkMenuItemProps<RouterLinkConfig> & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import type { MenuItemOnClick } from './types';
|
|
7
|
+
import type { MenuItemLinkOrButtonCommonProps, MenuItemOnClick } from './types';
|
|
8
8
|
/**
|
|
9
9
|
* This is being _internally_ exported so it can be used in other menu item wrapper components, like
|
|
10
10
|
* ExpandableMenuItemTrigger.
|
|
@@ -20,28 +20,33 @@ import type { MenuItemOnClick } from './types';
|
|
|
20
20
|
*/
|
|
21
21
|
export declare const nestedOpenPopupCSSSelector = "&:has([aria-expanded=\"true\"][aria-haspopup=\"true\"])";
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* The base menu item component used to compose ButtonMenuItem and LinkMenuItem.
|
|
23
|
+
* Includes all props that are used by any menu item, as MenuItembase is the base component for all menu item components.
|
|
26
24
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
25
|
+
* We also include additional `aria` props to support the menu item being a trigger for the FlyoutMenuItem popup and for the
|
|
26
|
+
* expanded content for ExpandableMenuItem.
|
|
29
27
|
*/
|
|
30
|
-
|
|
31
|
-
description?: string;
|
|
32
|
-
listItemRef?: React.Ref<HTMLDivElement>;
|
|
33
|
-
} & {
|
|
28
|
+
type MenuItemBaseProps<T extends HTMLAnchorElement | HTMLButtonElement> = MenuItemLinkOrButtonCommonProps & {
|
|
34
29
|
/**
|
|
35
30
|
* ID attribute, passed to the interactive element (anchor/button). This is not publicly exposed, and is currently only
|
|
36
31
|
* used internally by `ExpandableMenuItemTrigger` for the `aria-labelledby` attribute.
|
|
37
32
|
*/
|
|
38
33
|
id?: string;
|
|
39
34
|
href?: string | Record<string, any>;
|
|
40
|
-
target?: HTMLAnchorElement[
|
|
35
|
+
target?: HTMLAnchorElement['target'];
|
|
41
36
|
isDisabled?: boolean;
|
|
42
37
|
isSelected?: boolean;
|
|
43
38
|
ariaControls?: string;
|
|
44
39
|
ariaExpanded?: boolean;
|
|
45
|
-
ariaHasPopup?: boolean |
|
|
46
|
-
onClick?: MenuItemOnClick<T
|
|
47
|
-
}
|
|
40
|
+
ariaHasPopup?: boolean | 'dialog';
|
|
41
|
+
onClick?: MenuItemOnClick<T>;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* __MenuItemBase__
|
|
45
|
+
*
|
|
46
|
+
* The base menu item component used to compose ButtonMenuItem and LinkMenuItem.
|
|
47
|
+
*
|
|
48
|
+
* It contains a type argument `<T>`, to specify the type of the interactive element (`button` or `a`).
|
|
49
|
+
* This can be inferred from the type of the `onClick` prop.
|
|
50
|
+
*/
|
|
51
|
+
export declare const MenuItemBase: <T extends HTMLAnchorElement | HTMLButtonElement>(props: MenuItemBaseProps<T> & React.RefAttributes<T>) => React.ReactElement | null;
|
|
52
|
+
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { ListItem } from '../../components/list-item';
|
|
1
6
|
/**
|
|
2
7
|
* __Menu list item__
|
|
3
8
|
*
|
|
4
9
|
* A [list item](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li) with visual styles removed.
|
|
5
10
|
*/
|
|
6
|
-
export declare const MenuListItem:
|
|
7
|
-
children: import("react").ReactNode;
|
|
8
|
-
testId?: string;
|
|
9
|
-
xcss?: import("@atlaskit/css").StrictXCSSProp<"display" | "scrollMarginInline", never>;
|
|
10
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export declare const MenuListItem: typeof ListItem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/navigation-system",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.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",
|
|
@@ -73,9 +73,8 @@
|
|
|
73
73
|
"@atlaskit/ds-lib": "^5.1.0",
|
|
74
74
|
"@atlaskit/icon": "^28.3.0",
|
|
75
75
|
"@atlaskit/layering": "^3.0.0",
|
|
76
|
-
"@atlaskit/logo": "^19.
|
|
76
|
+
"@atlaskit/logo": "^19.8.0",
|
|
77
77
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
78
|
-
"@atlaskit/platform-feature-flags-react": "^0.3.0",
|
|
79
78
|
"@atlaskit/popup": "^4.4.0",
|
|
80
79
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
81
80
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
@@ -99,7 +98,7 @@
|
|
|
99
98
|
"@af/integration-testing": "workspace:^",
|
|
100
99
|
"@af/visual-regression": "workspace:^",
|
|
101
100
|
"@atlaskit/app-provider": "^3.2.0",
|
|
102
|
-
"@atlaskit/badge": "^18.
|
|
101
|
+
"@atlaskit/badge": "^18.2.0",
|
|
103
102
|
"@atlaskit/banner": "^14.0.0",
|
|
104
103
|
"@atlaskit/breadcrumbs": "^15.3.0",
|
|
105
104
|
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
@@ -114,11 +113,11 @@
|
|
|
114
113
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
115
114
|
"@atlaskit/select": "^21.3.0",
|
|
116
115
|
"@atlaskit/skeleton": "^2.1.0",
|
|
117
|
-
"@atlaskit/temp-nav-app-icons": "^0.
|
|
116
|
+
"@atlaskit/temp-nav-app-icons": "^0.12.0",
|
|
118
117
|
"@atlaskit/textfield": "^8.0.0",
|
|
119
118
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
120
119
|
"@atlassian/gemini": "^1.20.0",
|
|
121
|
-
"@atlassian/search-dialog": "^9.
|
|
120
|
+
"@atlassian/search-dialog": "^9.7.0",
|
|
122
121
|
"@atlassian/ssr-tests": "^0.3.0",
|
|
123
122
|
"@axe-core/playwright": "^4.8.0",
|
|
124
123
|
"@testing-library/react": "^13.4.0",
|
|
@@ -147,16 +146,10 @@
|
|
|
147
146
|
}
|
|
148
147
|
},
|
|
149
148
|
"platform-feature-flags": {
|
|
150
|
-
"jfp-magma-hydration-harmonise-applogo-classname": {
|
|
151
|
-
"type": "boolean"
|
|
152
|
-
},
|
|
153
149
|
"platform-component-visual-refresh": {
|
|
154
150
|
"type": "boolean",
|
|
155
151
|
"referenceOnly": true
|
|
156
152
|
},
|
|
157
|
-
"platform_design_system_nav4_sidenav_border": {
|
|
158
|
-
"type": "boolean"
|
|
159
|
-
},
|
|
160
153
|
"platform-team25-app-icon-tiles": {
|
|
161
154
|
"type": "boolean"
|
|
162
155
|
},
|