@atlaskit/editor-toolbar 0.19.0 → 0.19.2
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/ToolbarDropdownItem.js +2 -3
- package/dist/cjs/ui/ToolbarDropdownMenu.js +1 -2
- package/dist/cjs/ui/ToolbarKeyboardShortcutHint.js +1 -2
- package/dist/es2019/ui/ToolbarDropdownItem.js +2 -3
- package/dist/es2019/ui/ToolbarDropdownMenu.js +1 -2
- package/dist/es2019/ui/ToolbarKeyboardShortcutHint.js +1 -2
- package/dist/esm/ui/ToolbarDropdownItem.js +2 -3
- package/dist/esm/ui/ToolbarDropdownMenu.js +1 -2
- package/dist/esm/ui/ToolbarKeyboardShortcutHint.js +1 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar
|
|
2
2
|
|
|
3
|
+
## 0.19.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`20d29306fb10e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/20d29306fb10e) -
|
|
8
|
+
[ED-29451] clean up platform_editor_toolbar_aifc_patch_5
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 0.19.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`1265c260f9bad`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1265c260f9bad) -
|
|
16
|
+
[ED-29455] clean up experiment platform_editor_toolbar_migrate_loom
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 0.19.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -14,7 +14,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
14
14
|
var _css = require("@atlaskit/css");
|
|
15
15
|
var _dropdownMenu = require("@atlaskit/dropdown-menu");
|
|
16
16
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
17
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
19
18
|
var _ToolbarDropdownMenuContext = require("./ToolbarDropdownMenuContext");
|
|
20
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); }
|
|
@@ -86,7 +85,7 @@ var ToolbarDropdownItem = exports.ToolbarDropdownItem = function ToolbarDropdown
|
|
|
86
85
|
_onClick === null || _onClick === void 0 || _onClick(e);
|
|
87
86
|
},
|
|
88
87
|
elemBefore: elemBefore,
|
|
89
|
-
elemAfter:
|
|
88
|
+
elemAfter: injectedElemAfter,
|
|
90
89
|
isSelected: isSelected,
|
|
91
90
|
isDisabled: isDisabled,
|
|
92
91
|
"aria-haspopup": hasNestedDropdownMenu,
|
|
@@ -98,7 +97,7 @@ var ToolbarDropdownItem = exports.ToolbarDropdownItem = function ToolbarDropdown
|
|
|
98
97
|
rel: rel
|
|
99
98
|
// @ts-ignore -- This `CustomDropdownMenuItemButton` has type conflicts with the `DropdownItem` component in a way that cannot be reconciled (ignored as it fails types in Jira and should in Platform)
|
|
100
99
|
,
|
|
101
|
-
component: href
|
|
100
|
+
component: href ? undefined : CustomDropdownMenuItemButton,
|
|
102
101
|
testId: testId,
|
|
103
102
|
"data-toolbar-component": "menu-item",
|
|
104
103
|
shouldTitleWrap: shouldTitleWrap
|
|
@@ -13,7 +13,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _react2 = require("@compiled/react");
|
|
14
14
|
var _dropdownMenu = _interopRequireDefault(require("@atlaskit/dropdown-menu"));
|
|
15
15
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
16
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
16
|
var _uiContext = require("../hooks/ui-context");
|
|
18
17
|
var _ToolbarButton = require("./ToolbarButton");
|
|
19
18
|
var _ToolbarDropdownMenuContext = require("./ToolbarDropdownMenuContext");
|
|
@@ -89,7 +88,7 @@ var ToolbarDropdownMenu = exports.ToolbarDropdownMenu = function ToolbarDropdown
|
|
|
89
88
|
label: label,
|
|
90
89
|
onClick: onClick
|
|
91
90
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
92
|
-
xcss: (0, _react2.cx)(hasSectionMargin && styles.sectionMargin, enableMaxHeight && styles.scrollContainer,
|
|
91
|
+
xcss: (0, _react2.cx)(hasSectionMargin && styles.sectionMargin, enableMaxHeight && styles.scrollContainer, styles.firstSectionSeparator),
|
|
93
92
|
"data-toolbar-component": "menu"
|
|
94
93
|
}, children));
|
|
95
94
|
};
|
|
@@ -8,11 +8,10 @@ exports.ToolbarKeyboardShortcutHint = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _badge = _interopRequireDefault(require("@atlaskit/badge"));
|
|
10
10
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
11
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
12
11
|
var ToolbarKeyboardShortcutHint = exports.ToolbarKeyboardShortcutHint = function ToolbarKeyboardShortcutHint(_ref) {
|
|
13
12
|
var shortcut = _ref.shortcut,
|
|
14
13
|
isDisabled = _ref.isDisabled;
|
|
15
|
-
if (isDisabled
|
|
14
|
+
if (isDisabled) {
|
|
16
15
|
return /*#__PURE__*/_react.default.createElement(_badge.default, {
|
|
17
16
|
appearance: "primaryInverted"
|
|
18
17
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
@@ -5,7 +5,6 @@ import React, { forwardRef, isValidElement, cloneElement } from 'react';
|
|
|
5
5
|
import { cx } from '@atlaskit/css';
|
|
6
6
|
import { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
7
7
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
8
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
9
|
import { useToolbarDropdownMenu } from './ToolbarDropdownMenuContext';
|
|
11
10
|
const styles = {
|
|
@@ -74,7 +73,7 @@ export const ToolbarDropdownItem = ({
|
|
|
74
73
|
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
75
74
|
},
|
|
76
75
|
elemBefore: elemBefore,
|
|
77
|
-
elemAfter:
|
|
76
|
+
elemAfter: injectedElemAfter,
|
|
78
77
|
isSelected: isSelected,
|
|
79
78
|
isDisabled: isDisabled,
|
|
80
79
|
"aria-haspopup": hasNestedDropdownMenu,
|
|
@@ -86,7 +85,7 @@ export const ToolbarDropdownItem = ({
|
|
|
86
85
|
rel: rel
|
|
87
86
|
// @ts-ignore -- This `CustomDropdownMenuItemButton` has type conflicts with the `DropdownItem` component in a way that cannot be reconciled (ignored as it fails types in Jira and should in Platform)
|
|
88
87
|
,
|
|
89
|
-
component: href
|
|
88
|
+
component: href ? undefined : CustomDropdownMenuItemButton,
|
|
90
89
|
testId: testId,
|
|
91
90
|
"data-toolbar-component": "menu-item",
|
|
92
91
|
shouldTitleWrap: shouldTitleWrap
|
|
@@ -5,7 +5,6 @@ import React, { useCallback } from 'react';
|
|
|
5
5
|
import { cx } from '@compiled/react';
|
|
6
6
|
import DropdownMenu from '@atlaskit/dropdown-menu';
|
|
7
7
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
8
|
import { useToolbarUI } from '../hooks/ui-context';
|
|
10
9
|
import { ToolbarButton } from './ToolbarButton';
|
|
11
10
|
import { useToolbarDropdownMenu } from './ToolbarDropdownMenuContext';
|
|
@@ -79,7 +78,7 @@ export const ToolbarDropdownMenu = ({
|
|
|
79
78
|
label: label,
|
|
80
79
|
onClick: onClick
|
|
81
80
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
82
|
-
xcss: cx(hasSectionMargin && styles.sectionMargin, enableMaxHeight && styles.scrollContainer,
|
|
81
|
+
xcss: cx(hasSectionMargin && styles.sectionMargin, enableMaxHeight && styles.scrollContainer, styles.firstSectionSeparator),
|
|
83
82
|
"data-toolbar-component": "menu"
|
|
84
83
|
}, children));
|
|
85
84
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Badge from '@atlaskit/badge';
|
|
3
3
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
4
|
export const ToolbarKeyboardShortcutHint = ({
|
|
6
5
|
shortcut,
|
|
7
6
|
isDisabled
|
|
8
7
|
}) => {
|
|
9
|
-
if (isDisabled
|
|
8
|
+
if (isDisabled) {
|
|
10
9
|
return /*#__PURE__*/React.createElement(Badge, {
|
|
11
10
|
appearance: "primaryInverted"
|
|
12
11
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
@@ -8,7 +8,6 @@ import React, { forwardRef, isValidElement, cloneElement } from 'react';
|
|
|
8
8
|
import { cx } from '@atlaskit/css';
|
|
9
9
|
import { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
10
10
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
11
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
11
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
13
12
|
import { useToolbarDropdownMenu } from './ToolbarDropdownMenuContext';
|
|
14
13
|
var styles = {
|
|
@@ -77,7 +76,7 @@ export var ToolbarDropdownItem = function ToolbarDropdownItem(_ref2) {
|
|
|
77
76
|
_onClick === null || _onClick === void 0 || _onClick(e);
|
|
78
77
|
},
|
|
79
78
|
elemBefore: elemBefore,
|
|
80
|
-
elemAfter:
|
|
79
|
+
elemAfter: injectedElemAfter,
|
|
81
80
|
isSelected: isSelected,
|
|
82
81
|
isDisabled: isDisabled,
|
|
83
82
|
"aria-haspopup": hasNestedDropdownMenu,
|
|
@@ -89,7 +88,7 @@ export var ToolbarDropdownItem = function ToolbarDropdownItem(_ref2) {
|
|
|
89
88
|
rel: rel
|
|
90
89
|
// @ts-ignore -- This `CustomDropdownMenuItemButton` has type conflicts with the `DropdownItem` component in a way that cannot be reconciled (ignored as it fails types in Jira and should in Platform)
|
|
91
90
|
,
|
|
92
|
-
component: href
|
|
91
|
+
component: href ? undefined : CustomDropdownMenuItemButton,
|
|
93
92
|
testId: testId,
|
|
94
93
|
"data-toolbar-component": "menu-item",
|
|
95
94
|
shouldTitleWrap: shouldTitleWrap
|
|
@@ -5,7 +5,6 @@ import React, { useCallback } from 'react';
|
|
|
5
5
|
import { cx } from '@compiled/react';
|
|
6
6
|
import DropdownMenu from '@atlaskit/dropdown-menu';
|
|
7
7
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
8
|
import { useToolbarUI } from '../hooks/ui-context';
|
|
10
9
|
import { ToolbarButton } from './ToolbarButton';
|
|
11
10
|
import { useToolbarDropdownMenu } from './ToolbarDropdownMenuContext';
|
|
@@ -80,7 +79,7 @@ export var ToolbarDropdownMenu = function ToolbarDropdownMenu(_ref2) {
|
|
|
80
79
|
label: label,
|
|
81
80
|
onClick: onClick
|
|
82
81
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
83
|
-
xcss: cx(hasSectionMargin && styles.sectionMargin, enableMaxHeight && styles.scrollContainer,
|
|
82
|
+
xcss: cx(hasSectionMargin && styles.sectionMargin, enableMaxHeight && styles.scrollContainer, styles.firstSectionSeparator),
|
|
84
83
|
"data-toolbar-component": "menu"
|
|
85
84
|
}, children));
|
|
86
85
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Badge from '@atlaskit/badge';
|
|
3
3
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
4
|
export var ToolbarKeyboardShortcutHint = function ToolbarKeyboardShortcutHint(_ref) {
|
|
6
5
|
var shortcut = _ref.shortcut,
|
|
7
6
|
isDisabled = _ref.isDisabled;
|
|
8
|
-
if (isDisabled
|
|
7
|
+
if (isDisabled) {
|
|
9
8
|
return /*#__PURE__*/React.createElement(Badge, {
|
|
10
9
|
appearance: "primaryInverted"
|
|
11
10
|
}, /*#__PURE__*/React.createElement(Text, {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"registry": "https://registry.npmjs.org/"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.19.
|
|
6
|
+
"version": "0.19.2",
|
|
7
7
|
"description": "Common UI for Toolbars across the platform",
|
|
8
8
|
"atlassian": {
|
|
9
9
|
"team": "Editor: Jenga",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
31
31
|
"@atlaskit/popup": "^4.13.0",
|
|
32
32
|
"@atlaskit/primitives": "^17.0.0",
|
|
33
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
33
|
+
"@atlaskit/tmp-editor-statsig": "^16.19.0",
|
|
34
34
|
"@atlaskit/tokens": "^9.1.0",
|
|
35
|
-
"@atlaskit/tooltip": "^20.
|
|
35
|
+
"@atlaskit/tooltip": "^20.14.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
37
37
|
"@compiled/react": "^0.18.6",
|
|
38
38
|
"chromatism": "^2.6.0"
|