@atlaskit/side-nav-items 1.4.1 → 1.5.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 +16 -0
- package/dist/cjs/ui/menu-item/button-menu-item.js +4 -5
- package/dist/cjs/ui/menu-item/drag-and-drop/use-menu-item-drag-and-drop.js +12 -3
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-menu-item-content.js +16 -5
- package/dist/es2019/ui/menu-item/button-menu-item.js +4 -5
- package/dist/es2019/ui/menu-item/drag-and-drop/use-menu-item-drag-and-drop.js +12 -3
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-menu-item-content.js +15 -8
- package/dist/esm/ui/menu-item/button-menu-item.js +4 -5
- package/dist/esm/ui/menu-item/drag-and-drop/use-menu-item-drag-and-drop.js +12 -3
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-menu-item-content.js +16 -5
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/side-nav-items
|
|
2
2
|
|
|
3
|
+
## 1.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`57838cec99f29`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/57838cec99f29) -
|
|
8
|
+
The `FlyoutMenuItemContent` popup's max height now factors in the top nav and banner, when the
|
|
9
|
+
`platform-dst-side-nav-layering-fixes` feature flag is enabled. This ensures it does not get
|
|
10
|
+
clipped below the top nav and banner.
|
|
11
|
+
|
|
12
|
+
## 1.4.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`20e1df968ddc7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/20e1df968ddc7) -
|
|
17
|
+
Clean up feature gate platform-dst-buttonmenuitem-selected-state-support
|
|
18
|
+
|
|
3
19
|
## 1.4.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.ButtonMenuItem = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
9
|
var _menuItem = require("./menu-item");
|
|
11
10
|
var _menuListItem = require("./menu-list-item");
|
|
12
11
|
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); }
|
|
@@ -51,10 +50,10 @@ var ButtonMenuItem = exports.ButtonMenuItem = /*#__PURE__*/(0, _react.forwardRef
|
|
|
51
50
|
actions: isDisabled ? undefined : actions,
|
|
52
51
|
actionsOnHover: isDisabled ? undefined : actionsOnHover,
|
|
53
52
|
onClick: onClick,
|
|
54
|
-
ariaControls:
|
|
55
|
-
ariaExpanded:
|
|
56
|
-
ariaHasPopup:
|
|
57
|
-
isSelected:
|
|
53
|
+
ariaControls: ariaControls,
|
|
54
|
+
ariaExpanded: ariaExpanded,
|
|
55
|
+
ariaHasPopup: ariaHasPopup,
|
|
56
|
+
isSelected: isSelected,
|
|
58
57
|
ref: forwardedRef,
|
|
59
58
|
visualContentRef: visualContentRef,
|
|
60
59
|
interactionName: interactionName,
|
|
@@ -13,7 +13,6 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
15
|
var _reactDom = require("react-dom");
|
|
16
|
-
var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
|
|
17
16
|
var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
18
17
|
var _pointerOutsideOfPreview = require("@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview");
|
|
19
18
|
var _setCustomNativeDragPreview = require("@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview");
|
|
@@ -54,7 +53,12 @@ function useMenuItemDragAndDrop(_ref) {
|
|
|
54
53
|
return;
|
|
55
54
|
}
|
|
56
55
|
var element = getDraggableElement();
|
|
57
|
-
|
|
56
|
+
|
|
57
|
+
// Some elements may initially want to use DnD, then decide not to render.
|
|
58
|
+
// In that case, we don't want to throw an error.
|
|
59
|
+
if (!element) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
58
62
|
return (0, _adapter.draggable)({
|
|
59
63
|
element: element,
|
|
60
64
|
getInitialData: draggableArgs.getInitialData,
|
|
@@ -105,7 +109,12 @@ function useMenuItemDragAndDrop(_ref) {
|
|
|
105
109
|
// Using this element in our `canDrop` check
|
|
106
110
|
var draggableElement = getDraggableElement();
|
|
107
111
|
var dropTarget = dropTargetRef.current;
|
|
108
|
-
|
|
112
|
+
|
|
113
|
+
// Some elements may initially want to use DnD, then decide not to render.
|
|
114
|
+
// In that case, we don't want to throw an error
|
|
115
|
+
if (!dropTarget) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
109
118
|
return (0, _adapter.dropTargetForElements)({
|
|
110
119
|
element: dropTarget,
|
|
111
120
|
// cannot drop on self
|
|
@@ -63,7 +63,7 @@ var FlyoutMenuItemContent = exports.FlyoutMenuItemContent = /*#__PURE__*/(0, _re
|
|
|
63
63
|
// handleClose function, or passed in as a parameter in FlyoutMenuItemTrigger (outside-click),
|
|
64
64
|
// or FlyoutHeader (close-button).
|
|
65
65
|
var handleClose = (0, _react.useCallback)(function (event, source) {
|
|
66
|
-
if ((0, _platformFeatureFlags.fg)(
|
|
66
|
+
if ((0, _platformFeatureFlags.fg)('platform_dst_nav4_flyout_menu_slots_close_button')) {
|
|
67
67
|
// Use the passed source if provided, otherwise determine from event
|
|
68
68
|
var determinedSource = source || 'other';
|
|
69
69
|
if (!source) {
|
|
@@ -100,7 +100,18 @@ var FlyoutMenuItemContent = exports.FlyoutMenuItemContent = /*#__PURE__*/(0, _re
|
|
|
100
100
|
}, [handleClose, onCloseRef]);
|
|
101
101
|
var titleId = (0, _react.useId)();
|
|
102
102
|
var computedMaxHeight = (0, _react.useMemo)(function () {
|
|
103
|
-
return
|
|
103
|
+
return (
|
|
104
|
+
/**
|
|
105
|
+
* The max height of the flyout menu needs to factor in the top nav and banner, as it will be layered
|
|
106
|
+
* beneath them and would otherwise be clipped.
|
|
107
|
+
*
|
|
108
|
+
* We can remove these navigation variables once layering has been addressed holistically (e.g. using Top Layer).
|
|
109
|
+
*
|
|
110
|
+
* Not using the UNSAFE_MAIN_BLOCK_START_FOR_LEGACY_PAGES_ONLY variable from `@atlaskit/navigation-system`
|
|
111
|
+
* to avoid a circular dependency, as that package imports this one for re-exporting components.
|
|
112
|
+
*/
|
|
113
|
+
(0, _platformFeatureFlags.fg)('platform-dst-side-nav-layering-fixes') ? "min(calc(100vh - ".concat(FLYOUT_MENU_VERTICAL_OFFSET_PX, "px - var(--n_tNvM, 0px) - var(--n_bnrM, 0px)), ").concat(maxHeight, "px)") : "min(calc(100vh - ".concat(FLYOUT_MENU_VERTICAL_OFFSET_PX, "px), ").concat(maxHeight, "px)")
|
|
114
|
+
);
|
|
104
115
|
}, [maxHeight]);
|
|
105
116
|
return /*#__PURE__*/_react.default.createElement(_experimental.PopupContent, {
|
|
106
117
|
appearance: "UNSAFE_modal-below-sm",
|
|
@@ -115,8 +126,8 @@ var FlyoutMenuItemContent = exports.FlyoutMenuItemContent = /*#__PURE__*/(0, _re
|
|
|
115
126
|
testId: containerTestId,
|
|
116
127
|
xcss: flyoutMenuItemContentStyles.root,
|
|
117
128
|
autoFocus: autoFocus,
|
|
118
|
-
role: (0, _platformFeatureFlags.fg)(
|
|
119
|
-
titleId: (0, _platformFeatureFlags.fg)(
|
|
129
|
+
role: (0, _platformFeatureFlags.fg)('platform_dst_nav4_flyout_menu_slots_close_button') ? 'dialog' : undefined,
|
|
130
|
+
titleId: (0, _platformFeatureFlags.fg)('platform_dst_nav4_flyout_menu_slots_close_button') ? titleId : undefined
|
|
120
131
|
/**
|
|
121
132
|
* Disabling GPU acceleration removes the use of `transform` by popper.js for this popup.
|
|
122
133
|
*
|
|
@@ -137,7 +148,7 @@ var FlyoutMenuItemContent = exports.FlyoutMenuItemContent = /*#__PURE__*/(0, _re
|
|
|
137
148
|
return /*#__PURE__*/_react.default.createElement(UpdatePopperOnContentResize, {
|
|
138
149
|
ref: forwardedRef,
|
|
139
150
|
update: update
|
|
140
|
-
}, (0, _platformFeatureFlags.fg)(
|
|
151
|
+
}, (0, _platformFeatureFlags.fg)('platform_dst_nav4_flyout_menu_slots_close_button') ? /*#__PURE__*/_react.default.createElement(_flyoutMenuItemContext.TitleIdContextProvider, {
|
|
141
152
|
value: titleId
|
|
142
153
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
143
154
|
style: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import { MenuItemBase } from './menu-item';
|
|
4
3
|
import { MenuListItem } from './menu-list-item';
|
|
5
4
|
/**
|
|
@@ -44,10 +43,10 @@ export const ButtonMenuItem = /*#__PURE__*/forwardRef(({
|
|
|
44
43
|
actions: isDisabled ? undefined : actions,
|
|
45
44
|
actionsOnHover: isDisabled ? undefined : actionsOnHover,
|
|
46
45
|
onClick: onClick,
|
|
47
|
-
ariaControls:
|
|
48
|
-
ariaExpanded:
|
|
49
|
-
ariaHasPopup:
|
|
50
|
-
isSelected:
|
|
46
|
+
ariaControls: ariaControls,
|
|
47
|
+
ariaExpanded: ariaExpanded,
|
|
48
|
+
ariaHasPopup: ariaHasPopup,
|
|
49
|
+
isSelected: isSelected,
|
|
51
50
|
ref: forwardedRef,
|
|
52
51
|
visualContentRef: visualContentRef,
|
|
53
52
|
interactionName: interactionName,
|
|
@@ -3,7 +3,6 @@ import * as React from 'react';
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
|
-
import invariant from 'tiny-invariant';
|
|
7
6
|
import { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
8
7
|
import { pointerOutsideOfPreview } from '@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview';
|
|
9
8
|
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
|
|
@@ -39,7 +38,12 @@ export function useMenuItemDragAndDrop({
|
|
|
39
38
|
return;
|
|
40
39
|
}
|
|
41
40
|
const element = getDraggableElement();
|
|
42
|
-
|
|
41
|
+
|
|
42
|
+
// Some elements may initially want to use DnD, then decide not to render.
|
|
43
|
+
// In that case, we don't want to throw an error.
|
|
44
|
+
if (!element) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
43
47
|
return draggable({
|
|
44
48
|
element,
|
|
45
49
|
getInitialData: draggableArgs.getInitialData,
|
|
@@ -92,7 +96,12 @@ export function useMenuItemDragAndDrop({
|
|
|
92
96
|
// Using this element in our `canDrop` check
|
|
93
97
|
const draggableElement = getDraggableElement();
|
|
94
98
|
const dropTarget = dropTargetRef.current;
|
|
95
|
-
|
|
99
|
+
|
|
100
|
+
// Some elements may initially want to use DnD, then decide not to render.
|
|
101
|
+
// In that case, we don't want to throw an error
|
|
102
|
+
if (!dropTarget) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
96
105
|
return dropTargetForElements({
|
|
97
106
|
element: dropTarget,
|
|
98
107
|
// cannot drop on self
|
|
@@ -54,7 +54,7 @@ export const FlyoutMenuItemContent = /*#__PURE__*/forwardRef(({
|
|
|
54
54
|
// handleClose function, or passed in as a parameter in FlyoutMenuItemTrigger (outside-click),
|
|
55
55
|
// or FlyoutHeader (close-button).
|
|
56
56
|
const handleClose = useCallback((event, source) => {
|
|
57
|
-
if (fg(
|
|
57
|
+
if (fg('platform_dst_nav4_flyout_menu_slots_close_button')) {
|
|
58
58
|
// Use the passed source if provided, otherwise determine from event
|
|
59
59
|
let determinedSource = source || 'other';
|
|
60
60
|
if (!source) {
|
|
@@ -90,10 +90,17 @@ export const FlyoutMenuItemContent = /*#__PURE__*/forwardRef(({
|
|
|
90
90
|
onCloseRef.current = handleClose;
|
|
91
91
|
}, [handleClose, onCloseRef]);
|
|
92
92
|
const titleId = useId();
|
|
93
|
-
const computedMaxHeight = useMemo(() =>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
const computedMaxHeight = useMemo(() =>
|
|
94
|
+
/**
|
|
95
|
+
* The max height of the flyout menu needs to factor in the top nav and banner, as it will be layered
|
|
96
|
+
* beneath them and would otherwise be clipped.
|
|
97
|
+
*
|
|
98
|
+
* We can remove these navigation variables once layering has been addressed holistically (e.g. using Top Layer).
|
|
99
|
+
*
|
|
100
|
+
* Not using the UNSAFE_MAIN_BLOCK_START_FOR_LEGACY_PAGES_ONLY variable from `@atlaskit/navigation-system`
|
|
101
|
+
* to avoid a circular dependency, as that package imports this one for re-exporting components.
|
|
102
|
+
*/
|
|
103
|
+
fg('platform-dst-side-nav-layering-fixes') ? `min(calc(100vh - ${FLYOUT_MENU_VERTICAL_OFFSET_PX}px - var(--n_tNvM, 0px) - var(--n_bnrM, 0px)), ${maxHeight}px)` : `min(calc(100vh - ${FLYOUT_MENU_VERTICAL_OFFSET_PX}px), ${maxHeight}px)`, [maxHeight]);
|
|
97
104
|
return /*#__PURE__*/React.createElement(PopupContent, {
|
|
98
105
|
appearance: "UNSAFE_modal-below-sm",
|
|
99
106
|
onClose: handleClose,
|
|
@@ -107,8 +114,8 @@ export const FlyoutMenuItemContent = /*#__PURE__*/forwardRef(({
|
|
|
107
114
|
testId: containerTestId,
|
|
108
115
|
xcss: flyoutMenuItemContentStyles.root,
|
|
109
116
|
autoFocus: autoFocus,
|
|
110
|
-
role: fg(
|
|
111
|
-
titleId: fg(
|
|
117
|
+
role: fg('platform_dst_nav4_flyout_menu_slots_close_button') ? 'dialog' : undefined,
|
|
118
|
+
titleId: fg('platform_dst_nav4_flyout_menu_slots_close_button') ? titleId : undefined
|
|
112
119
|
/**
|
|
113
120
|
* Disabling GPU acceleration removes the use of `transform` by popper.js for this popup.
|
|
114
121
|
*
|
|
@@ -129,7 +136,7 @@ export const FlyoutMenuItemContent = /*#__PURE__*/forwardRef(({
|
|
|
129
136
|
}) => /*#__PURE__*/React.createElement(UpdatePopperOnContentResize, {
|
|
130
137
|
ref: forwardedRef,
|
|
131
138
|
update: update
|
|
132
|
-
}, fg(
|
|
139
|
+
}, fg('platform_dst_nav4_flyout_menu_slots_close_button') ? /*#__PURE__*/React.createElement(TitleIdContextProvider, {
|
|
133
140
|
value: titleId
|
|
134
141
|
}, /*#__PURE__*/React.createElement("div", {
|
|
135
142
|
style: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import { MenuItemBase } from './menu-item';
|
|
4
3
|
import { MenuListItem } from './menu-list-item';
|
|
5
4
|
/**
|
|
@@ -43,10 +42,10 @@ export var ButtonMenuItem = /*#__PURE__*/forwardRef(function (_ref, forwardedRef
|
|
|
43
42
|
actions: isDisabled ? undefined : actions,
|
|
44
43
|
actionsOnHover: isDisabled ? undefined : actionsOnHover,
|
|
45
44
|
onClick: onClick,
|
|
46
|
-
ariaControls:
|
|
47
|
-
ariaExpanded:
|
|
48
|
-
ariaHasPopup:
|
|
49
|
-
isSelected:
|
|
45
|
+
ariaControls: ariaControls,
|
|
46
|
+
ariaExpanded: ariaExpanded,
|
|
47
|
+
ariaHasPopup: ariaHasPopup,
|
|
48
|
+
isSelected: isSelected,
|
|
50
49
|
ref: forwardedRef,
|
|
51
50
|
visualContentRef: visualContentRef,
|
|
52
51
|
interactionName: interactionName,
|
|
@@ -7,7 +7,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
9
9
|
import { createPortal } from 'react-dom';
|
|
10
|
-
import invariant from 'tiny-invariant';
|
|
11
10
|
import { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
12
11
|
import { pointerOutsideOfPreview } from '@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview';
|
|
13
12
|
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
|
|
@@ -45,7 +44,12 @@ export function useMenuItemDragAndDrop(_ref) {
|
|
|
45
44
|
return;
|
|
46
45
|
}
|
|
47
46
|
var element = getDraggableElement();
|
|
48
|
-
|
|
47
|
+
|
|
48
|
+
// Some elements may initially want to use DnD, then decide not to render.
|
|
49
|
+
// In that case, we don't want to throw an error.
|
|
50
|
+
if (!element) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
49
53
|
return draggable({
|
|
50
54
|
element: element,
|
|
51
55
|
getInitialData: draggableArgs.getInitialData,
|
|
@@ -96,7 +100,12 @@ export function useMenuItemDragAndDrop(_ref) {
|
|
|
96
100
|
// Using this element in our `canDrop` check
|
|
97
101
|
var draggableElement = getDraggableElement();
|
|
98
102
|
var dropTarget = dropTargetRef.current;
|
|
99
|
-
|
|
103
|
+
|
|
104
|
+
// Some elements may initially want to use DnD, then decide not to render.
|
|
105
|
+
// In that case, we don't want to throw an error
|
|
106
|
+
if (!dropTarget) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
100
109
|
return dropTargetForElements({
|
|
101
110
|
element: dropTarget,
|
|
102
111
|
// cannot drop on self
|
|
@@ -54,7 +54,7 @@ export var FlyoutMenuItemContent = /*#__PURE__*/forwardRef(function (_ref, forwa
|
|
|
54
54
|
// handleClose function, or passed in as a parameter in FlyoutMenuItemTrigger (outside-click),
|
|
55
55
|
// or FlyoutHeader (close-button).
|
|
56
56
|
var handleClose = useCallback(function (event, source) {
|
|
57
|
-
if (fg(
|
|
57
|
+
if (fg('platform_dst_nav4_flyout_menu_slots_close_button')) {
|
|
58
58
|
// Use the passed source if provided, otherwise determine from event
|
|
59
59
|
var determinedSource = source || 'other';
|
|
60
60
|
if (!source) {
|
|
@@ -91,7 +91,18 @@ export var FlyoutMenuItemContent = /*#__PURE__*/forwardRef(function (_ref, forwa
|
|
|
91
91
|
}, [handleClose, onCloseRef]);
|
|
92
92
|
var titleId = useId();
|
|
93
93
|
var computedMaxHeight = useMemo(function () {
|
|
94
|
-
return
|
|
94
|
+
return (
|
|
95
|
+
/**
|
|
96
|
+
* The max height of the flyout menu needs to factor in the top nav and banner, as it will be layered
|
|
97
|
+
* beneath them and would otherwise be clipped.
|
|
98
|
+
*
|
|
99
|
+
* We can remove these navigation variables once layering has been addressed holistically (e.g. using Top Layer).
|
|
100
|
+
*
|
|
101
|
+
* Not using the UNSAFE_MAIN_BLOCK_START_FOR_LEGACY_PAGES_ONLY variable from `@atlaskit/navigation-system`
|
|
102
|
+
* to avoid a circular dependency, as that package imports this one for re-exporting components.
|
|
103
|
+
*/
|
|
104
|
+
fg('platform-dst-side-nav-layering-fixes') ? "min(calc(100vh - ".concat(FLYOUT_MENU_VERTICAL_OFFSET_PX, "px - var(--n_tNvM, 0px) - var(--n_bnrM, 0px)), ").concat(maxHeight, "px)") : "min(calc(100vh - ".concat(FLYOUT_MENU_VERTICAL_OFFSET_PX, "px), ").concat(maxHeight, "px)")
|
|
105
|
+
);
|
|
95
106
|
}, [maxHeight]);
|
|
96
107
|
return /*#__PURE__*/React.createElement(PopupContent, {
|
|
97
108
|
appearance: "UNSAFE_modal-below-sm",
|
|
@@ -106,8 +117,8 @@ export var FlyoutMenuItemContent = /*#__PURE__*/forwardRef(function (_ref, forwa
|
|
|
106
117
|
testId: containerTestId,
|
|
107
118
|
xcss: flyoutMenuItemContentStyles.root,
|
|
108
119
|
autoFocus: autoFocus,
|
|
109
|
-
role: fg(
|
|
110
|
-
titleId: fg(
|
|
120
|
+
role: fg('platform_dst_nav4_flyout_menu_slots_close_button') ? 'dialog' : undefined,
|
|
121
|
+
titleId: fg('platform_dst_nav4_flyout_menu_slots_close_button') ? titleId : undefined
|
|
111
122
|
/**
|
|
112
123
|
* Disabling GPU acceleration removes the use of `transform` by popper.js for this popup.
|
|
113
124
|
*
|
|
@@ -128,7 +139,7 @@ export var FlyoutMenuItemContent = /*#__PURE__*/forwardRef(function (_ref, forwa
|
|
|
128
139
|
return /*#__PURE__*/React.createElement(UpdatePopperOnContentResize, {
|
|
129
140
|
ref: forwardedRef,
|
|
130
141
|
update: update
|
|
131
|
-
}, fg(
|
|
142
|
+
}, fg('platform_dst_nav4_flyout_menu_slots_close_button') ? /*#__PURE__*/React.createElement(TitleIdContextProvider, {
|
|
132
143
|
value: titleId
|
|
133
144
|
}, /*#__PURE__*/React.createElement("div", {
|
|
134
145
|
style: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/side-nav-items",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Menu items and elements for the navigation side nav area.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"registry": "https://registry.npmjs.org/"
|
|
9
9
|
},
|
|
10
10
|
"atlassian": {
|
|
11
|
-
"team": "Navigation Experiences",
|
|
11
|
+
"team": "Navigation Experiences - Global Side Nav",
|
|
12
12
|
"docsPageStructure": "tabs"
|
|
13
13
|
},
|
|
14
14
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-monorepo",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/button": "^23.9.0",
|
|
35
35
|
"@atlaskit/css": "^0.19.0",
|
|
36
36
|
"@atlaskit/ds-lib": "^5.3.0",
|
|
37
|
-
"@atlaskit/heading": "^5.
|
|
37
|
+
"@atlaskit/heading": "^5.3.0",
|
|
38
38
|
"@atlaskit/icon": "^30.0.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
40
|
"@atlaskit/popup": "^4.13.0",
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"@af/integration-testing": "workspace:^",
|
|
58
58
|
"@af/visual-regression": "workspace:^",
|
|
59
59
|
"@atlaskit/app-provider": "^4.0.0",
|
|
60
|
-
"@atlaskit/lozenge": "^13.
|
|
61
|
-
"@atlaskit/navigation-system": "^5.
|
|
60
|
+
"@atlaskit/lozenge": "^13.4.0",
|
|
61
|
+
"@atlaskit/navigation-system": "^5.33.0",
|
|
62
62
|
"@atlaskit/ssr": "workspace:^",
|
|
63
|
-
"@atlassian/a11y-jest-testing": "^0.
|
|
63
|
+
"@atlassian/a11y-jest-testing": "^0.9.0",
|
|
64
64
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
65
65
|
"@atlassian/testing-library": "^0.4.0",
|
|
66
66
|
"@testing-library/react": "^16.3.0",
|
|
@@ -103,15 +103,15 @@
|
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
105
|
"platform-feature-flags": {
|
|
106
|
-
"platform-dst-buttonmenuitem-selected-state-support": {
|
|
107
|
-
"type": "boolean"
|
|
108
|
-
},
|
|
109
106
|
"platform-dst-shape-theme-default": {
|
|
110
107
|
"type": "boolean"
|
|
111
108
|
},
|
|
112
109
|
"platform_dst_nav4_flyout_menu_slots_close_button": {
|
|
113
110
|
"type": "boolean"
|
|
114
111
|
},
|
|
112
|
+
"platform-dst-side-nav-layering-fixes": {
|
|
113
|
+
"type": "boolean"
|
|
114
|
+
},
|
|
115
115
|
"platform_dst_nav4_flyoutmenuitem_render_to_parent": {
|
|
116
116
|
"type": "boolean"
|
|
117
117
|
}
|