@atlaskit/editor-toolbar 2.7.11 → 2.8.1
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
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar
|
|
2
2
|
|
|
3
|
+
## 2.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 2.8.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`981dd11bb4ed2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/981dd11bb4ed2) -
|
|
14
|
+
Add opt-in target visibility handling to editor popups, and use it to hide the Jira description
|
|
15
|
+
block menu while its originating node is outside the visible viewport. The popup reappears when
|
|
16
|
+
its target returns, preserving an open nested menu, behind the
|
|
17
|
+
`platform_editor_popup_target_visibility` experiment.
|
|
18
|
+
|
|
3
19
|
## 2.7.11
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* ToolbarNestedDropdownMenu.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
2
|
"use strict";
|
|
4
3
|
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -9,36 +8,64 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
8
|
});
|
|
10
9
|
exports.ToolbarNestedDropdownMenu = void 0;
|
|
11
10
|
require("./ToolbarNestedDropdownMenu.compiled.css");
|
|
12
|
-
var
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var React = _react;
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _react2 = require("@compiled/react");
|
|
15
|
+
var _useCallbackRef = require("use-callback-ref");
|
|
15
16
|
var _dropdownMenu = _interopRequireDefault(require("@atlaskit/dropdown-menu/dropdown-menu"));
|
|
16
17
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
17
18
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
19
|
var _ToolbarDropdownItem = require("./ToolbarDropdownItem");
|
|
19
20
|
var _ToolbarTooltip = require("./ToolbarTooltip");
|
|
20
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); }
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
23
|
var styles = {
|
|
22
24
|
scrollContainer: "_c71lnklw _18m91wug"
|
|
23
25
|
};
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
26
|
+
var PopupVisibilityController = function PopupVisibilityController(_ref) {
|
|
27
|
+
var isVisible = _ref.isVisible,
|
|
28
|
+
popupContentIdRef = _ref.popupContentIdRef,
|
|
29
|
+
triggerElementRef = _ref.triggerElementRef;
|
|
30
|
+
(0, _react.useLayoutEffect)(function () {
|
|
31
|
+
var _triggerElementRef$cu;
|
|
32
|
+
if (isVisible) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
var popupContentId = popupContentIdRef.current;
|
|
36
|
+
var popupElement = popupContentId ? (_triggerElementRef$cu = triggerElementRef.current) === null || _triggerElementRef$cu === void 0 ? void 0 : _triggerElementRef$cu.ownerDocument.getElementById(popupContentId) : null;
|
|
37
|
+
if (!popupElement) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
var previousVisibility = popupElement.style.visibility;
|
|
41
|
+
popupElement.style.visibility = 'hidden';
|
|
42
|
+
return function () {
|
|
43
|
+
popupElement.style.visibility = previousVisibility;
|
|
44
|
+
};
|
|
45
|
+
}, [isVisible, popupContentIdRef, triggerElementRef]);
|
|
46
|
+
return null;
|
|
47
|
+
};
|
|
48
|
+
var ToolbarNestedDropdownMenu = exports.ToolbarNestedDropdownMenu = function ToolbarNestedDropdownMenu(_ref2) {
|
|
49
|
+
var elemBefore = _ref2.elemBefore,
|
|
50
|
+
text = _ref2.text,
|
|
51
|
+
elemAfterText = _ref2.elemAfterText,
|
|
52
|
+
elemAfter = _ref2.elemAfter,
|
|
53
|
+
children = _ref2.children,
|
|
54
|
+
isDisabled = _ref2.isDisabled,
|
|
55
|
+
testId = _ref2.testId,
|
|
56
|
+
dropdownTestId = _ref2.dropdownTestId,
|
|
57
|
+
_ref2$enableMaxHeight = _ref2.enableMaxHeight,
|
|
58
|
+
enableMaxHeight = _ref2$enableMaxHeight === void 0 ? false : _ref2$enableMaxHeight,
|
|
59
|
+
isPopupVisible = _ref2.isPopupVisible,
|
|
60
|
+
_onClick = _ref2.onClick,
|
|
61
|
+
_ref2$shouldFitContai = _ref2.shouldFitContainer,
|
|
62
|
+
shouldFitContainer = _ref2$shouldFitContai === void 0 ? false : _ref2$shouldFitContai,
|
|
63
|
+
shouldIgnoreCloseEvent = _ref2.shouldIgnoreCloseEvent,
|
|
64
|
+
shouldTitleWrap = _ref2.shouldTitleWrap,
|
|
65
|
+
tooltipContent = _ref2.tooltipContent,
|
|
66
|
+
dataExtensionItemKey = _ref2['data-extension-item-key'];
|
|
67
|
+
var popupContentIdRef = (0, _react.useRef)(undefined);
|
|
68
|
+
var triggerElementRef = (0, _react.useRef)(null);
|
|
42
69
|
return /*#__PURE__*/React.createElement(_dropdownMenu.default, {
|
|
43
70
|
shouldFitContainer: shouldFitContainer,
|
|
44
71
|
shouldIgnoreCloseEvent: (0, _fg.fg)('cc_blocks_changeboarding') ? shouldIgnoreCloseEvent : undefined,
|
|
@@ -47,6 +74,10 @@ var ToolbarNestedDropdownMenu = exports.ToolbarNestedDropdownMenu = function Too
|
|
|
47
74
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
48
75
|
,
|
|
49
76
|
trigger: function trigger(triggerProps) {
|
|
77
|
+
var captureTriggerRef = function captureTriggerRef(element) {
|
|
78
|
+
triggerElementRef.current = element;
|
|
79
|
+
popupContentIdRef.current = element ? triggerProps['aria-controls'] : undefined;
|
|
80
|
+
};
|
|
50
81
|
var item = /*#__PURE__*/React.createElement(_ToolbarDropdownItem.ToolbarDropdownItem, {
|
|
51
82
|
elemBefore: elemBefore,
|
|
52
83
|
elemAfter: elemAfter,
|
|
@@ -58,7 +89,7 @@ var ToolbarNestedDropdownMenu = exports.ToolbarNestedDropdownMenu = function Too
|
|
|
58
89
|
triggerProps.onClick && triggerProps.onClick(e);
|
|
59
90
|
},
|
|
60
91
|
testId: testId,
|
|
61
|
-
triggerRef: triggerProps.triggerRef,
|
|
92
|
+
triggerRef: isPopupVisible === undefined ? triggerProps.triggerRef : (0, _useCallbackRef.mergeRefs)([triggerProps.triggerRef, captureTriggerRef]),
|
|
62
93
|
hasNestedDropdownMenu: true,
|
|
63
94
|
isDisabled: isDisabled,
|
|
64
95
|
shouldTitleWrap: shouldTitleWrap,
|
|
@@ -75,5 +106,9 @@ var ToolbarNestedDropdownMenu = exports.ToolbarNestedDropdownMenu = function Too
|
|
|
75
106
|
}, /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
76
107
|
xcss: (0, _react2.cx)(enableMaxHeight && styles.scrollContainer),
|
|
77
108
|
"data-toolbar-nested-dropdown-menu": true
|
|
78
|
-
},
|
|
109
|
+
}, isPopupVisible !== undefined && /*#__PURE__*/React.createElement(PopupVisibilityController, {
|
|
110
|
+
isVisible: isPopupVisible,
|
|
111
|
+
popupContentIdRef: popupContentIdRef,
|
|
112
|
+
triggerElementRef: triggerElementRef
|
|
113
|
+
}), children));
|
|
79
114
|
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/* ToolbarNestedDropdownMenu.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
2
|
import "./ToolbarNestedDropdownMenu.compiled.css";
|
|
4
3
|
import * as React from 'react';
|
|
5
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import { useLayoutEffect, useRef } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
8
|
import { cx } from '@compiled/react';
|
|
9
|
+
import { mergeRefs } from 'use-callback-ref';
|
|
7
10
|
import DropdownMenu from '@atlaskit/dropdown-menu/dropdown-menu';
|
|
8
11
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
12
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
@@ -12,6 +15,29 @@ import { ToolbarTooltip } from './ToolbarTooltip';
|
|
|
12
15
|
const styles = {
|
|
13
16
|
scrollContainer: "_c71lnklw _18m91wug"
|
|
14
17
|
};
|
|
18
|
+
const PopupVisibilityController = ({
|
|
19
|
+
isVisible,
|
|
20
|
+
popupContentIdRef,
|
|
21
|
+
triggerElementRef
|
|
22
|
+
}) => {
|
|
23
|
+
useLayoutEffect(() => {
|
|
24
|
+
var _triggerElementRef$cu;
|
|
25
|
+
if (isVisible) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const popupContentId = popupContentIdRef.current;
|
|
29
|
+
const popupElement = popupContentId ? (_triggerElementRef$cu = triggerElementRef.current) === null || _triggerElementRef$cu === void 0 ? void 0 : _triggerElementRef$cu.ownerDocument.getElementById(popupContentId) : null;
|
|
30
|
+
if (!popupElement) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const previousVisibility = popupElement.style.visibility;
|
|
34
|
+
popupElement.style.visibility = 'hidden';
|
|
35
|
+
return () => {
|
|
36
|
+
popupElement.style.visibility = previousVisibility;
|
|
37
|
+
};
|
|
38
|
+
}, [isVisible, popupContentIdRef, triggerElementRef]);
|
|
39
|
+
return null;
|
|
40
|
+
};
|
|
15
41
|
export const ToolbarNestedDropdownMenu = ({
|
|
16
42
|
elemBefore,
|
|
17
43
|
text,
|
|
@@ -22,6 +48,7 @@ export const ToolbarNestedDropdownMenu = ({
|
|
|
22
48
|
testId,
|
|
23
49
|
dropdownTestId,
|
|
24
50
|
enableMaxHeight = false,
|
|
51
|
+
isPopupVisible,
|
|
25
52
|
onClick,
|
|
26
53
|
shouldFitContainer = false,
|
|
27
54
|
shouldIgnoreCloseEvent,
|
|
@@ -29,6 +56,8 @@ export const ToolbarNestedDropdownMenu = ({
|
|
|
29
56
|
tooltipContent,
|
|
30
57
|
'data-extension-item-key': dataExtensionItemKey
|
|
31
58
|
}) => {
|
|
59
|
+
const popupContentIdRef = useRef(undefined);
|
|
60
|
+
const triggerElementRef = useRef(null);
|
|
32
61
|
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
33
62
|
shouldFitContainer: shouldFitContainer,
|
|
34
63
|
shouldIgnoreCloseEvent: fg('cc_blocks_changeboarding') ? shouldIgnoreCloseEvent : undefined,
|
|
@@ -37,6 +66,10 @@ export const ToolbarNestedDropdownMenu = ({
|
|
|
37
66
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
38
67
|
,
|
|
39
68
|
trigger: triggerProps => {
|
|
69
|
+
const captureTriggerRef = element => {
|
|
70
|
+
triggerElementRef.current = element;
|
|
71
|
+
popupContentIdRef.current = element ? triggerProps['aria-controls'] : undefined;
|
|
72
|
+
};
|
|
40
73
|
const item = /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
41
74
|
elemBefore: elemBefore,
|
|
42
75
|
elemAfter: elemAfter,
|
|
@@ -48,7 +81,7 @@ export const ToolbarNestedDropdownMenu = ({
|
|
|
48
81
|
triggerProps.onClick && triggerProps.onClick(e);
|
|
49
82
|
},
|
|
50
83
|
testId: testId,
|
|
51
|
-
triggerRef: triggerProps.triggerRef,
|
|
84
|
+
triggerRef: isPopupVisible === undefined ? triggerProps.triggerRef : mergeRefs([triggerProps.triggerRef, captureTriggerRef]),
|
|
52
85
|
hasNestedDropdownMenu: true,
|
|
53
86
|
isDisabled: isDisabled,
|
|
54
87
|
shouldTitleWrap: shouldTitleWrap,
|
|
@@ -65,5 +98,9 @@ export const ToolbarNestedDropdownMenu = ({
|
|
|
65
98
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
66
99
|
xcss: cx(enableMaxHeight && styles.scrollContainer),
|
|
67
100
|
"data-toolbar-nested-dropdown-menu": true
|
|
68
|
-
},
|
|
101
|
+
}, isPopupVisible !== undefined && /*#__PURE__*/React.createElement(PopupVisibilityController, {
|
|
102
|
+
isVisible: isPopupVisible,
|
|
103
|
+
popupContentIdRef: popupContentIdRef,
|
|
104
|
+
triggerElementRef: triggerElementRef
|
|
105
|
+
}), children));
|
|
69
106
|
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/* ToolbarNestedDropdownMenu.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
2
|
import "./ToolbarNestedDropdownMenu.compiled.css";
|
|
4
3
|
import * as React from 'react';
|
|
5
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import { useLayoutEffect, useRef } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
8
|
import { cx } from '@compiled/react';
|
|
9
|
+
import { mergeRefs } from 'use-callback-ref';
|
|
7
10
|
import DropdownMenu from '@atlaskit/dropdown-menu/dropdown-menu';
|
|
8
11
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
12
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
@@ -12,24 +15,49 @@ import { ToolbarTooltip } from './ToolbarTooltip';
|
|
|
12
15
|
var styles = {
|
|
13
16
|
scrollContainer: "_c71lnklw _18m91wug"
|
|
14
17
|
};
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
var PopupVisibilityController = function PopupVisibilityController(_ref) {
|
|
19
|
+
var isVisible = _ref.isVisible,
|
|
20
|
+
popupContentIdRef = _ref.popupContentIdRef,
|
|
21
|
+
triggerElementRef = _ref.triggerElementRef;
|
|
22
|
+
useLayoutEffect(function () {
|
|
23
|
+
var _triggerElementRef$cu;
|
|
24
|
+
if (isVisible) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
var popupContentId = popupContentIdRef.current;
|
|
28
|
+
var popupElement = popupContentId ? (_triggerElementRef$cu = triggerElementRef.current) === null || _triggerElementRef$cu === void 0 ? void 0 : _triggerElementRef$cu.ownerDocument.getElementById(popupContentId) : null;
|
|
29
|
+
if (!popupElement) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
var previousVisibility = popupElement.style.visibility;
|
|
33
|
+
popupElement.style.visibility = 'hidden';
|
|
34
|
+
return function () {
|
|
35
|
+
popupElement.style.visibility = previousVisibility;
|
|
36
|
+
};
|
|
37
|
+
}, [isVisible, popupContentIdRef, triggerElementRef]);
|
|
38
|
+
return null;
|
|
39
|
+
};
|
|
40
|
+
export var ToolbarNestedDropdownMenu = function ToolbarNestedDropdownMenu(_ref2) {
|
|
41
|
+
var elemBefore = _ref2.elemBefore,
|
|
42
|
+
text = _ref2.text,
|
|
43
|
+
elemAfterText = _ref2.elemAfterText,
|
|
44
|
+
elemAfter = _ref2.elemAfter,
|
|
45
|
+
children = _ref2.children,
|
|
46
|
+
isDisabled = _ref2.isDisabled,
|
|
47
|
+
testId = _ref2.testId,
|
|
48
|
+
dropdownTestId = _ref2.dropdownTestId,
|
|
49
|
+
_ref2$enableMaxHeight = _ref2.enableMaxHeight,
|
|
50
|
+
enableMaxHeight = _ref2$enableMaxHeight === void 0 ? false : _ref2$enableMaxHeight,
|
|
51
|
+
isPopupVisible = _ref2.isPopupVisible,
|
|
52
|
+
_onClick = _ref2.onClick,
|
|
53
|
+
_ref2$shouldFitContai = _ref2.shouldFitContainer,
|
|
54
|
+
shouldFitContainer = _ref2$shouldFitContai === void 0 ? false : _ref2$shouldFitContai,
|
|
55
|
+
shouldIgnoreCloseEvent = _ref2.shouldIgnoreCloseEvent,
|
|
56
|
+
shouldTitleWrap = _ref2.shouldTitleWrap,
|
|
57
|
+
tooltipContent = _ref2.tooltipContent,
|
|
58
|
+
dataExtensionItemKey = _ref2['data-extension-item-key'];
|
|
59
|
+
var popupContentIdRef = useRef(undefined);
|
|
60
|
+
var triggerElementRef = useRef(null);
|
|
33
61
|
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
34
62
|
shouldFitContainer: shouldFitContainer,
|
|
35
63
|
shouldIgnoreCloseEvent: fg('cc_blocks_changeboarding') ? shouldIgnoreCloseEvent : undefined,
|
|
@@ -38,6 +66,10 @@ export var ToolbarNestedDropdownMenu = function ToolbarNestedDropdownMenu(_ref)
|
|
|
38
66
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
39
67
|
,
|
|
40
68
|
trigger: function trigger(triggerProps) {
|
|
69
|
+
var captureTriggerRef = function captureTriggerRef(element) {
|
|
70
|
+
triggerElementRef.current = element;
|
|
71
|
+
popupContentIdRef.current = element ? triggerProps['aria-controls'] : undefined;
|
|
72
|
+
};
|
|
41
73
|
var item = /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
42
74
|
elemBefore: elemBefore,
|
|
43
75
|
elemAfter: elemAfter,
|
|
@@ -49,7 +81,7 @@ export var ToolbarNestedDropdownMenu = function ToolbarNestedDropdownMenu(_ref)
|
|
|
49
81
|
triggerProps.onClick && triggerProps.onClick(e);
|
|
50
82
|
},
|
|
51
83
|
testId: testId,
|
|
52
|
-
triggerRef: triggerProps.triggerRef,
|
|
84
|
+
triggerRef: isPopupVisible === undefined ? triggerProps.triggerRef : mergeRefs([triggerProps.triggerRef, captureTriggerRef]),
|
|
53
85
|
hasNestedDropdownMenu: true,
|
|
54
86
|
isDisabled: isDisabled,
|
|
55
87
|
shouldTitleWrap: shouldTitleWrap,
|
|
@@ -66,5 +98,9 @@ export var ToolbarNestedDropdownMenu = function ToolbarNestedDropdownMenu(_ref)
|
|
|
66
98
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
67
99
|
xcss: cx(enableMaxHeight && styles.scrollContainer),
|
|
68
100
|
"data-toolbar-nested-dropdown-menu": true
|
|
69
|
-
},
|
|
101
|
+
}, isPopupVisible !== undefined && /*#__PURE__*/React.createElement(PopupVisibilityController, {
|
|
102
|
+
isVisible: isPopupVisible,
|
|
103
|
+
popupContentIdRef: popupContentIdRef,
|
|
104
|
+
triggerElementRef: triggerElementRef
|
|
105
|
+
}), children));
|
|
70
106
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import type
|
|
5
|
+
import { type KeyboardEvent, type MouseEvent, type ReactNode } from 'react';
|
|
6
6
|
type ToolbarNestedDropdownMenuProps = {
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
'data-extension-item-key'?: string;
|
|
@@ -15,6 +15,7 @@ type ToolbarNestedDropdownMenuProps = {
|
|
|
15
15
|
*/
|
|
16
16
|
enableMaxHeight?: boolean;
|
|
17
17
|
isDisabled?: boolean;
|
|
18
|
+
isPopupVisible?: boolean;
|
|
18
19
|
onClick?: (e: MouseEvent | KeyboardEvent) => void;
|
|
19
20
|
shouldFitContainer?: boolean;
|
|
20
21
|
shouldIgnoreCloseEvent?: (event: Event | MouseEvent | KeyboardEvent) => boolean;
|
|
@@ -23,5 +24,5 @@ type ToolbarNestedDropdownMenuProps = {
|
|
|
23
24
|
text?: string;
|
|
24
25
|
tooltipContent?: ReactNode;
|
|
25
26
|
};
|
|
26
|
-
export declare const ToolbarNestedDropdownMenu: ({ elemBefore, text, elemAfterText, elemAfter, children, isDisabled, testId, dropdownTestId, enableMaxHeight, onClick, shouldFitContainer, shouldIgnoreCloseEvent, shouldTitleWrap, tooltipContent, 'data-extension-item-key': dataExtensionItemKey, }: ToolbarNestedDropdownMenuProps) => JSX.Element;
|
|
27
|
+
export declare const ToolbarNestedDropdownMenu: ({ elemBefore, text, elemAfterText, elemAfter, children, isDisabled, testId, dropdownTestId, enableMaxHeight, isPopupVisible, onClick, shouldFitContainer, shouldIgnoreCloseEvent, shouldTitleWrap, tooltipContent, 'data-extension-item-key': dataExtensionItemKey, }: ToolbarNestedDropdownMenuProps) => JSX.Element;
|
|
27
28
|
export {};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"registry": "https://registry.npmjs.org/"
|
|
5
5
|
},
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.8.1",
|
|
7
7
|
"description": "Common UI for Toolbars across the platform",
|
|
8
8
|
"atlassian": {
|
|
9
9
|
"website": {
|
|
@@ -38,19 +38,20 @@
|
|
|
38
38
|
"@atlaskit/css": "^1.1.0",
|
|
39
39
|
"@atlaskit/dropdown-menu": "^18.3.0",
|
|
40
40
|
"@atlaskit/icon": "^38.0.0",
|
|
41
|
-
"@atlaskit/icon-lab": "^7.
|
|
41
|
+
"@atlaskit/icon-lab": "^7.10.0",
|
|
42
42
|
"@atlaskit/menu": "^11.0.0",
|
|
43
43
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
45
45
|
"@atlaskit/popup": "^6.3.0",
|
|
46
46
|
"@atlaskit/primitives": "^22.5.0",
|
|
47
47
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^209.0.0",
|
|
49
49
|
"@atlaskit/tokens": "^20.0.0",
|
|
50
50
|
"@atlaskit/tooltip": "^24.3.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"@compiled/react": "^1.0.2",
|
|
53
|
-
"chromatism": "^2.6.0"
|
|
53
|
+
"chromatism": "^2.6.0",
|
|
54
|
+
"use-callback-ref": "^1.2.3"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|
|
56
57
|
"react": "^18.2.0 || ^19.2.0",
|