@atlaskit/editor-plugin-text-color 7.2.8 → 7.2.10
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,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-color
|
|
2
2
|
|
|
3
|
+
## 7.2.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 7.2.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`38dee2c85c456`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/38dee2c85c456) -
|
|
14
|
+
[ux] [EDITOR-4486] render tooltips for ToolbarDropdownMenu using new TooltipComponent prop behind
|
|
15
|
+
platform_editor_hide_toolbar_tooltips_fix
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 7.2.8
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -12,6 +12,7 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
12
12
|
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
13
13
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
14
14
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
15
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
15
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
17
|
var getIconColor = function getIconColor(textColor, defaultColor, highlightColor) {
|
|
17
18
|
if (highlightColor || !textColor || textColor === defaultColor && defaultColor) {
|
|
@@ -60,6 +61,32 @@ var TextColorHighlightMenu = exports.TextColorHighlightMenu = function TextColor
|
|
|
60
61
|
};
|
|
61
62
|
}, [setIsPaletteOpen, isPaletteOpen]);
|
|
62
63
|
var iconColor = getIconColor(textColor, defaultColor, highlightColor);
|
|
64
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_hide_toolbar_tooltips_fix', 'isEnabled', true)) {
|
|
65
|
+
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownMenuProvider, {
|
|
66
|
+
isOpen: isPaletteOpen,
|
|
67
|
+
setIsOpen: setIsPaletteOpen
|
|
68
|
+
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownMenu, {
|
|
69
|
+
iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarColorSwatch, {
|
|
70
|
+
highlightColor: getHighlightColorIcon(highlightColor)
|
|
71
|
+
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.TextColorIcon, {
|
|
72
|
+
label: formatMessage(_messages.textColorMessages.textColorTooltip),
|
|
73
|
+
iconColor: iconColor,
|
|
74
|
+
shouldRecommendSmallIcon: true,
|
|
75
|
+
size: 'small',
|
|
76
|
+
isDisabled: isDisabled,
|
|
77
|
+
spacing: 'compact'
|
|
78
|
+
})),
|
|
79
|
+
isDisabled: isDisabled,
|
|
80
|
+
testId: "text-color-highlight-menu",
|
|
81
|
+
hasSectionMargin: false,
|
|
82
|
+
tooltipComponent: /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
|
|
83
|
+
content: /*#__PURE__*/_react.default.createElement(_keymaps.ToolTipContent, {
|
|
84
|
+
description: formatMessage(isHighlightPluginExisted ? _messages.textColorMessages.textColorHighlightTooltip : _messages.textColorMessages.textColorTooltip),
|
|
85
|
+
keymap: _keymaps.toggleHighlightPalette
|
|
86
|
+
})
|
|
87
|
+
})
|
|
88
|
+
}, children));
|
|
89
|
+
}
|
|
63
90
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
|
|
64
91
|
content: /*#__PURE__*/_react.default.createElement(_keymaps.ToolTipContent, {
|
|
65
92
|
description: formatMessage(isHighlightPluginExisted ? _messages.textColorMessages.textColorHighlightTooltip : _messages.textColorMessages.textColorTooltip),
|
|
@@ -5,6 +5,7 @@ import { textColorMessages as messages } from '@atlaskit/editor-common/messages'
|
|
|
5
5
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
6
6
|
import { hexToEditorTextPaletteColor, hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
7
7
|
import { TextColorIcon, ToolbarColorSwatch, ToolbarDropdownMenu, ToolbarDropdownMenuProvider, ToolbarTooltip, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
9
|
const getIconColor = (textColor, defaultColor, highlightColor) => {
|
|
9
10
|
if (highlightColor || !textColor || textColor === defaultColor && defaultColor) {
|
|
10
11
|
return "var(--ds-text, #292A2E)";
|
|
@@ -56,6 +57,32 @@ export const TextColorHighlightMenu = ({
|
|
|
56
57
|
};
|
|
57
58
|
}, [setIsPaletteOpen, isPaletteOpen]);
|
|
58
59
|
const iconColor = getIconColor(textColor, defaultColor, highlightColor);
|
|
60
|
+
if (expValEquals('platform_editor_hide_toolbar_tooltips_fix', 'isEnabled', true)) {
|
|
61
|
+
return /*#__PURE__*/React.createElement(ToolbarDropdownMenuProvider, {
|
|
62
|
+
isOpen: isPaletteOpen,
|
|
63
|
+
setIsOpen: setIsPaletteOpen
|
|
64
|
+
}, /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
|
|
65
|
+
iconBefore: /*#__PURE__*/React.createElement(ToolbarColorSwatch, {
|
|
66
|
+
highlightColor: getHighlightColorIcon(highlightColor)
|
|
67
|
+
}, /*#__PURE__*/React.createElement(TextColorIcon, {
|
|
68
|
+
label: formatMessage(messages.textColorTooltip),
|
|
69
|
+
iconColor: iconColor,
|
|
70
|
+
shouldRecommendSmallIcon: true,
|
|
71
|
+
size: 'small',
|
|
72
|
+
isDisabled: isDisabled,
|
|
73
|
+
spacing: 'compact'
|
|
74
|
+
})),
|
|
75
|
+
isDisabled: isDisabled,
|
|
76
|
+
testId: "text-color-highlight-menu",
|
|
77
|
+
hasSectionMargin: false,
|
|
78
|
+
tooltipComponent: /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
79
|
+
content: /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
80
|
+
description: formatMessage(isHighlightPluginExisted ? messages.textColorHighlightTooltip : messages.textColorTooltip),
|
|
81
|
+
keymap: toggleHighlightPalette
|
|
82
|
+
})
|
|
83
|
+
})
|
|
84
|
+
}, children));
|
|
85
|
+
}
|
|
59
86
|
return /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
60
87
|
content: /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
61
88
|
description: formatMessage(isHighlightPluginExisted ? messages.textColorHighlightTooltip : messages.textColorTooltip),
|
|
@@ -5,6 +5,7 @@ import { textColorMessages as messages } from '@atlaskit/editor-common/messages'
|
|
|
5
5
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
6
6
|
import { hexToEditorTextPaletteColor, hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
7
7
|
import { TextColorIcon, ToolbarColorSwatch, ToolbarDropdownMenu, ToolbarDropdownMenuProvider, ToolbarTooltip, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
9
|
var getIconColor = function getIconColor(textColor, defaultColor, highlightColor) {
|
|
9
10
|
if (highlightColor || !textColor || textColor === defaultColor && defaultColor) {
|
|
10
11
|
return "var(--ds-text, #292A2E)";
|
|
@@ -52,6 +53,32 @@ export var TextColorHighlightMenu = function TextColorHighlightMenu(_ref) {
|
|
|
52
53
|
};
|
|
53
54
|
}, [setIsPaletteOpen, isPaletteOpen]);
|
|
54
55
|
var iconColor = getIconColor(textColor, defaultColor, highlightColor);
|
|
56
|
+
if (expValEquals('platform_editor_hide_toolbar_tooltips_fix', 'isEnabled', true)) {
|
|
57
|
+
return /*#__PURE__*/React.createElement(ToolbarDropdownMenuProvider, {
|
|
58
|
+
isOpen: isPaletteOpen,
|
|
59
|
+
setIsOpen: setIsPaletteOpen
|
|
60
|
+
}, /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
|
|
61
|
+
iconBefore: /*#__PURE__*/React.createElement(ToolbarColorSwatch, {
|
|
62
|
+
highlightColor: getHighlightColorIcon(highlightColor)
|
|
63
|
+
}, /*#__PURE__*/React.createElement(TextColorIcon, {
|
|
64
|
+
label: formatMessage(messages.textColorTooltip),
|
|
65
|
+
iconColor: iconColor,
|
|
66
|
+
shouldRecommendSmallIcon: true,
|
|
67
|
+
size: 'small',
|
|
68
|
+
isDisabled: isDisabled,
|
|
69
|
+
spacing: 'compact'
|
|
70
|
+
})),
|
|
71
|
+
isDisabled: isDisabled,
|
|
72
|
+
testId: "text-color-highlight-menu",
|
|
73
|
+
hasSectionMargin: false,
|
|
74
|
+
tooltipComponent: /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
75
|
+
content: /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
76
|
+
description: formatMessage(isHighlightPluginExisted ? messages.textColorHighlightTooltip : messages.textColorTooltip),
|
|
77
|
+
keymap: toggleHighlightPalette
|
|
78
|
+
})
|
|
79
|
+
})
|
|
80
|
+
}, children));
|
|
81
|
+
}
|
|
55
82
|
return /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
56
83
|
content: /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
57
84
|
description: formatMessage(isHighlightPluginExisted ? messages.textColorHighlightTooltip : messages.textColorTooltip),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.10",
|
|
4
4
|
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/editor-plugin-primary-toolbar": "^8.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-selection-toolbar": "^8.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-toolbar": "^4.1.0",
|
|
41
|
-
"@atlaskit/editor-prosemirror": "^7.
|
|
41
|
+
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
42
42
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
43
43
|
"@atlaskit/editor-toolbar": "^0.19.0",
|
|
44
44
|
"@atlaskit/editor-toolbar-model": "^0.3.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
48
|
"@atlaskit/primitives": "^18.0.0",
|
|
49
49
|
"@atlaskit/theme": "^21.0.0",
|
|
50
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
50
|
+
"@atlaskit/tmp-editor-statsig": "^18.0.0",
|
|
51
51
|
"@atlaskit/tokens": "^11.0.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@emotion/react": "^11.7.1"
|