@atlaskit/editor-plugin-text-color 8.0.3 → 8.1.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
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-color
|
|
2
2
|
|
|
3
|
+
## 8.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`5a8d797e50210`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5a8d797e50210) -
|
|
8
|
+
[FFCLEANUP-91669] clean up platform_editor_hide_toolbar_tooltips_fix experiment to hide dropdown
|
|
9
|
+
menu item tooltips on hover of the dropdown menu button
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 8.0.4
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 8.0.3
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -12,7 +12,6 @@ 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");
|
|
16
15
|
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); }
|
|
17
16
|
var getIconColor = function getIconColor(textColor, defaultColor, highlightColor) {
|
|
18
17
|
if (highlightColor || !textColor || textColor === defaultColor && defaultColor) {
|
|
@@ -61,38 +60,7 @@ var TextColorHighlightMenu = exports.TextColorHighlightMenu = function TextColor
|
|
|
61
60
|
};
|
|
62
61
|
}, [setIsPaletteOpen, isPaletteOpen]);
|
|
63
62
|
var iconColor = getIconColor(textColor, defaultColor, highlightColor);
|
|
64
|
-
|
|
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
|
-
}
|
|
90
|
-
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
|
|
91
|
-
content: /*#__PURE__*/_react.default.createElement(_keymaps.ToolTipContent, {
|
|
92
|
-
description: formatMessage(isHighlightPluginExisted ? _messages.textColorMessages.textColorHighlightTooltip : _messages.textColorMessages.textColorTooltip),
|
|
93
|
-
keymap: _keymaps.toggleHighlightPalette
|
|
94
|
-
})
|
|
95
|
-
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownMenuProvider, {
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownMenuProvider, {
|
|
96
64
|
isOpen: isPaletteOpen,
|
|
97
65
|
setIsOpen: setIsPaletteOpen
|
|
98
66
|
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownMenu, {
|
|
@@ -108,6 +76,12 @@ var TextColorHighlightMenu = exports.TextColorHighlightMenu = function TextColor
|
|
|
108
76
|
})),
|
|
109
77
|
isDisabled: isDisabled,
|
|
110
78
|
testId: "text-color-highlight-menu",
|
|
111
|
-
hasSectionMargin: false
|
|
112
|
-
|
|
79
|
+
hasSectionMargin: false,
|
|
80
|
+
tooltipComponent: /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
|
|
81
|
+
content: /*#__PURE__*/_react.default.createElement(_keymaps.ToolTipContent, {
|
|
82
|
+
description: formatMessage(isHighlightPluginExisted ? _messages.textColorMessages.textColorHighlightTooltip : _messages.textColorMessages.textColorTooltip),
|
|
83
|
+
keymap: _keymaps.toggleHighlightPalette
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
}, children));
|
|
113
87
|
};
|
|
@@ -5,7 +5,6 @@ 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';
|
|
9
8
|
const getIconColor = (textColor, defaultColor, highlightColor) => {
|
|
10
9
|
if (highlightColor || !textColor || textColor === defaultColor && defaultColor) {
|
|
11
10
|
return "var(--ds-text, #292A2E)";
|
|
@@ -57,38 +56,7 @@ export const TextColorHighlightMenu = ({
|
|
|
57
56
|
};
|
|
58
57
|
}, [setIsPaletteOpen, isPaletteOpen]);
|
|
59
58
|
const iconColor = getIconColor(textColor, defaultColor, highlightColor);
|
|
60
|
-
|
|
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
|
-
}
|
|
86
|
-
return /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
87
|
-
content: /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
88
|
-
description: formatMessage(isHighlightPluginExisted ? messages.textColorHighlightTooltip : messages.textColorTooltip),
|
|
89
|
-
keymap: toggleHighlightPalette
|
|
90
|
-
})
|
|
91
|
-
}, /*#__PURE__*/React.createElement(ToolbarDropdownMenuProvider, {
|
|
59
|
+
return /*#__PURE__*/React.createElement(ToolbarDropdownMenuProvider, {
|
|
92
60
|
isOpen: isPaletteOpen,
|
|
93
61
|
setIsOpen: setIsPaletteOpen
|
|
94
62
|
}, /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
|
|
@@ -104,6 +72,12 @@ export const TextColorHighlightMenu = ({
|
|
|
104
72
|
})),
|
|
105
73
|
isDisabled: isDisabled,
|
|
106
74
|
testId: "text-color-highlight-menu",
|
|
107
|
-
hasSectionMargin: false
|
|
108
|
-
|
|
75
|
+
hasSectionMargin: false,
|
|
76
|
+
tooltipComponent: /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
77
|
+
content: /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
78
|
+
description: formatMessage(isHighlightPluginExisted ? messages.textColorHighlightTooltip : messages.textColorTooltip),
|
|
79
|
+
keymap: toggleHighlightPalette
|
|
80
|
+
})
|
|
81
|
+
})
|
|
82
|
+
}, children));
|
|
109
83
|
};
|
|
@@ -5,7 +5,6 @@ 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';
|
|
9
8
|
var getIconColor = function getIconColor(textColor, defaultColor, highlightColor) {
|
|
10
9
|
if (highlightColor || !textColor || textColor === defaultColor && defaultColor) {
|
|
11
10
|
return "var(--ds-text, #292A2E)";
|
|
@@ -53,38 +52,7 @@ export var TextColorHighlightMenu = function TextColorHighlightMenu(_ref) {
|
|
|
53
52
|
};
|
|
54
53
|
}, [setIsPaletteOpen, isPaletteOpen]);
|
|
55
54
|
var iconColor = getIconColor(textColor, defaultColor, highlightColor);
|
|
56
|
-
|
|
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
|
-
}
|
|
82
|
-
return /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
83
|
-
content: /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
84
|
-
description: formatMessage(isHighlightPluginExisted ? messages.textColorHighlightTooltip : messages.textColorTooltip),
|
|
85
|
-
keymap: toggleHighlightPalette
|
|
86
|
-
})
|
|
87
|
-
}, /*#__PURE__*/React.createElement(ToolbarDropdownMenuProvider, {
|
|
55
|
+
return /*#__PURE__*/React.createElement(ToolbarDropdownMenuProvider, {
|
|
88
56
|
isOpen: isPaletteOpen,
|
|
89
57
|
setIsOpen: setIsPaletteOpen
|
|
90
58
|
}, /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
|
|
@@ -100,6 +68,12 @@ export var TextColorHighlightMenu = function TextColorHighlightMenu(_ref) {
|
|
|
100
68
|
})),
|
|
101
69
|
isDisabled: isDisabled,
|
|
102
70
|
testId: "text-color-highlight-menu",
|
|
103
|
-
hasSectionMargin: false
|
|
104
|
-
|
|
71
|
+
hasSectionMargin: false,
|
|
72
|
+
tooltipComponent: /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
73
|
+
content: /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
74
|
+
description: formatMessage(isHighlightPluginExisted ? messages.textColorHighlightTooltip : messages.textColorTooltip),
|
|
75
|
+
keymap: toggleHighlightPalette
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
}, children));
|
|
105
79
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
-
"version": "8.0
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/adf-schema": "^52.
|
|
32
|
+
"@atlaskit/adf-schema": "^52.3.0",
|
|
33
33
|
"@atlaskit/button": "^23.10.0",
|
|
34
34
|
"@atlaskit/css": "^0.19.0",
|
|
35
35
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
@@ -37,23 +37,23 @@
|
|
|
37
37
|
"@atlaskit/editor-plugin-highlight": "^8.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-primary-toolbar": "^9.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-selection-toolbar": "^9.0.0",
|
|
40
|
-
"@atlaskit/editor-plugin-toolbar": "^5.
|
|
40
|
+
"@atlaskit/editor-plugin-toolbar": "^5.1.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
42
42
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
43
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
43
|
+
"@atlaskit/editor-toolbar": "^0.20.0",
|
|
44
44
|
"@atlaskit/editor-toolbar-model": "^0.4.0",
|
|
45
45
|
"@atlaskit/heading": "^5.3.0",
|
|
46
|
-
"@atlaskit/icon": "^32.
|
|
46
|
+
"@atlaskit/icon": "^32.1.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
48
|
"@atlaskit/primitives": "^18.0.0",
|
|
49
49
|
"@atlaskit/theme": "^22.0.0",
|
|
50
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
50
|
+
"@atlaskit/tmp-editor-statsig": "^40.0.0",
|
|
51
51
|
"@atlaskit/tokens": "^11.1.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@emotion/react": "^11.7.1"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@atlaskit/editor-common": "^112.
|
|
56
|
+
"@atlaskit/editor-common": "^112.4.0",
|
|
57
57
|
"react": "^18.2.0",
|
|
58
58
|
"react-dom": "^18.2.0",
|
|
59
59
|
"react-intl-next": "npm:react-intl@^5.18.1"
|