@atlaskit/editor-plugin-text-color 6.3.8 → 6.3.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 +14 -0
- package/dist/cjs/ui/RemoveColorMenuItem.compiled.css +1 -1
- package/dist/cjs/ui/RemoveColorMenuItem.js +1 -1
- package/dist/cjs/ui/TextColorHighlightMenu.js +9 -3
- package/dist/es2019/ui/RemoveColorMenuItem.compiled.css +1 -1
- package/dist/es2019/ui/RemoveColorMenuItem.js +1 -1
- package/dist/es2019/ui/TextColorHighlightMenu.js +10 -4
- package/dist/esm/ui/RemoveColorMenuItem.compiled.css +1 -1
- package/dist/esm/ui/RemoveColorMenuItem.js +1 -1
- package/dist/esm/ui/TextColorHighlightMenu.js +10 -4
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-color
|
|
2
2
|
|
|
3
|
+
## 6.3.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e584fc1d47ba6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e584fc1d47ba6) -
|
|
8
|
+
[ux] ED-29650 Fix Text Highlight colour toolbar button to use ads colour token
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 6.3.9
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 6.3.8
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
3
3
|
._195gv77o{margin-inline:var(--ds-space-025,2px)}
|
|
4
4
|
._1dqonqa1{border-style:solid}
|
|
5
|
-
.
|
|
5
|
+
._1h6d1l7x{border-color:var(--ds-border,#0b120e24)}
|
|
6
6
|
._19pk12x7{margin-top:var(--ds-space-075,6px)}
|
|
@@ -19,7 +19,7 @@ var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
|
19
19
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
20
20
|
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); }
|
|
21
21
|
var styles = {
|
|
22
|
-
removeColorButton: "_2rko12b0 _195gv77o _189ee4h9 _1dqonqa1
|
|
22
|
+
removeColorButton: "_2rko12b0 _195gv77o _189ee4h9 _1dqonqa1 _1h6d1l7x _19pk12x7"
|
|
23
23
|
};
|
|
24
24
|
var RemoveColorMenuItem = exports.RemoveColorMenuItem = function RemoveColorMenuItem(_ref) {
|
|
25
25
|
var api = _ref.api,
|
|
@@ -24,9 +24,15 @@ var styles = {
|
|
|
24
24
|
};
|
|
25
25
|
var getIconColor = function getIconColor(textColor, defaultColor, highlightColor) {
|
|
26
26
|
if (highlightColor || !textColor || textColor === defaultColor && defaultColor) {
|
|
27
|
-
return "var(--ds-text, #
|
|
27
|
+
return "var(--ds-text, #292A2E)";
|
|
28
28
|
}
|
|
29
|
-
return (0, _editorPalette.hexToEditorTextPaletteColor)(textColor) || "var(--ds-text, #
|
|
29
|
+
return (0, _editorPalette.hexToEditorTextPaletteColor)(textColor) || "var(--ds-text, #292A2E)";
|
|
30
|
+
};
|
|
31
|
+
var getHighlightColorIcon = function getHighlightColorIcon(highlightColor) {
|
|
32
|
+
if (highlightColor) {
|
|
33
|
+
return (0, _editorPalette.hexToEditorTextBackgroundPaletteColor)(highlightColor);
|
|
34
|
+
}
|
|
35
|
+
return undefined;
|
|
30
36
|
};
|
|
31
37
|
var TextColorHighlightMenu = exports.TextColorHighlightMenu = function TextColorHighlightMenu(_ref) {
|
|
32
38
|
var _api$textColor2;
|
|
@@ -76,7 +82,7 @@ var TextColorHighlightMenu = exports.TextColorHighlightMenu = function TextColor
|
|
|
76
82
|
setIsOpen: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? setIsPaletteOpen : undefined
|
|
77
83
|
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownMenu, {
|
|
78
84
|
iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarColorSwatch, {
|
|
79
|
-
highlightColor: highlightColorIcon
|
|
85
|
+
highlightColor: (0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_patch_8') ? getHighlightColorIcon(highlightColor) : highlightColorIcon
|
|
80
86
|
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.TextColorIcon, {
|
|
81
87
|
label: formatMessage(_messages.textColorMessages.textColorTooltip),
|
|
82
88
|
iconColor: iconColor,
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
3
3
|
._195gv77o{margin-inline:var(--ds-space-025,2px)}
|
|
4
4
|
._1dqonqa1{border-style:solid}
|
|
5
|
-
.
|
|
5
|
+
._1h6d1l7x{border-color:var(--ds-border,#0b120e24)}
|
|
6
6
|
._19pk12x7{margin-top:var(--ds-space-075,6px)}
|
|
@@ -10,7 +10,7 @@ import { REMOVE_HIGHLIGHT_COLOR } from '@atlaskit/editor-common/ui-color';
|
|
|
10
10
|
import { useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
11
11
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
12
12
|
const styles = {
|
|
13
|
-
removeColorButton: "_2rko12b0 _195gv77o _189ee4h9 _1dqonqa1
|
|
13
|
+
removeColorButton: "_2rko12b0 _195gv77o _189ee4h9 _1dqonqa1 _1h6d1l7x _19pk12x7"
|
|
14
14
|
};
|
|
15
15
|
export const RemoveColorMenuItem = ({
|
|
16
16
|
api,
|
|
@@ -6,7 +6,7 @@ import { useIntl } from 'react-intl-next';
|
|
|
6
6
|
import { toggleHighlightPalette, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
7
7
|
import { textColorMessages as messages } from '@atlaskit/editor-common/messages';
|
|
8
8
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
9
|
-
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
|
|
9
|
+
import { hexToEditorTextPaletteColor, hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
10
10
|
import { TextColorIcon, ToolbarColorSwatch, ToolbarDropdownMenu, ToolbarDropdownMenuProvider, ToolbarTooltip, getContrastingBackgroundColor, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
@@ -16,9 +16,15 @@ const styles = {
|
|
|
16
16
|
};
|
|
17
17
|
const getIconColor = (textColor, defaultColor, highlightColor) => {
|
|
18
18
|
if (highlightColor || !textColor || textColor === defaultColor && defaultColor) {
|
|
19
|
-
return "var(--ds-text, #
|
|
19
|
+
return "var(--ds-text, #292A2E)";
|
|
20
20
|
}
|
|
21
|
-
return hexToEditorTextPaletteColor(textColor) || "var(--ds-text, #
|
|
21
|
+
return hexToEditorTextPaletteColor(textColor) || "var(--ds-text, #292A2E)";
|
|
22
|
+
};
|
|
23
|
+
const getHighlightColorIcon = highlightColor => {
|
|
24
|
+
if (highlightColor) {
|
|
25
|
+
return hexToEditorTextBackgroundPaletteColor(highlightColor);
|
|
26
|
+
}
|
|
27
|
+
return undefined;
|
|
22
28
|
};
|
|
23
29
|
export const TextColorHighlightMenu = ({
|
|
24
30
|
children,
|
|
@@ -72,7 +78,7 @@ export const TextColorHighlightMenu = ({
|
|
|
72
78
|
setIsOpen: expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? setIsPaletteOpen : undefined
|
|
73
79
|
}, /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
|
|
74
80
|
iconBefore: /*#__PURE__*/React.createElement(ToolbarColorSwatch, {
|
|
75
|
-
highlightColor: highlightColorIcon
|
|
81
|
+
highlightColor: fg('platform_editor_toolbar_aifc_patch_8') ? getHighlightColorIcon(highlightColor) : highlightColorIcon
|
|
76
82
|
}, /*#__PURE__*/React.createElement(TextColorIcon, {
|
|
77
83
|
label: formatMessage(messages.textColorTooltip),
|
|
78
84
|
iconColor: iconColor,
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
3
3
|
._195gv77o{margin-inline:var(--ds-space-025,2px)}
|
|
4
4
|
._1dqonqa1{border-style:solid}
|
|
5
|
-
.
|
|
5
|
+
._1h6d1l7x{border-color:var(--ds-border,#0b120e24)}
|
|
6
6
|
._19pk12x7{margin-top:var(--ds-space-075,6px)}
|
|
@@ -10,7 +10,7 @@ import { REMOVE_HIGHLIGHT_COLOR } from '@atlaskit/editor-common/ui-color';
|
|
|
10
10
|
import { useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
11
11
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
12
12
|
var styles = {
|
|
13
|
-
removeColorButton: "_2rko12b0 _195gv77o _189ee4h9 _1dqonqa1
|
|
13
|
+
removeColorButton: "_2rko12b0 _195gv77o _189ee4h9 _1dqonqa1 _1h6d1l7x _19pk12x7"
|
|
14
14
|
};
|
|
15
15
|
export var RemoveColorMenuItem = function RemoveColorMenuItem(_ref) {
|
|
16
16
|
var api = _ref.api,
|
|
@@ -6,7 +6,7 @@ import { useIntl } from 'react-intl-next';
|
|
|
6
6
|
import { toggleHighlightPalette, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
7
7
|
import { textColorMessages as messages } from '@atlaskit/editor-common/messages';
|
|
8
8
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
9
|
-
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
|
|
9
|
+
import { hexToEditorTextPaletteColor, hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
10
10
|
import { TextColorIcon, ToolbarColorSwatch, ToolbarDropdownMenu, ToolbarDropdownMenuProvider, ToolbarTooltip, getContrastingBackgroundColor, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
@@ -16,9 +16,15 @@ var styles = {
|
|
|
16
16
|
};
|
|
17
17
|
var getIconColor = function getIconColor(textColor, defaultColor, highlightColor) {
|
|
18
18
|
if (highlightColor || !textColor || textColor === defaultColor && defaultColor) {
|
|
19
|
-
return "var(--ds-text, #
|
|
19
|
+
return "var(--ds-text, #292A2E)";
|
|
20
20
|
}
|
|
21
|
-
return hexToEditorTextPaletteColor(textColor) || "var(--ds-text, #
|
|
21
|
+
return hexToEditorTextPaletteColor(textColor) || "var(--ds-text, #292A2E)";
|
|
22
|
+
};
|
|
23
|
+
var getHighlightColorIcon = function getHighlightColorIcon(highlightColor) {
|
|
24
|
+
if (highlightColor) {
|
|
25
|
+
return hexToEditorTextBackgroundPaletteColor(highlightColor);
|
|
26
|
+
}
|
|
27
|
+
return undefined;
|
|
22
28
|
};
|
|
23
29
|
export var TextColorHighlightMenu = function TextColorHighlightMenu(_ref) {
|
|
24
30
|
var _api$textColor2;
|
|
@@ -68,7 +74,7 @@ export var TextColorHighlightMenu = function TextColorHighlightMenu(_ref) {
|
|
|
68
74
|
setIsOpen: expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? setIsPaletteOpen : undefined
|
|
69
75
|
}, /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
|
|
70
76
|
iconBefore: /*#__PURE__*/React.createElement(ToolbarColorSwatch, {
|
|
71
|
-
highlightColor: highlightColorIcon
|
|
77
|
+
highlightColor: fg('platform_editor_toolbar_aifc_patch_8') ? getHighlightColorIcon(highlightColor) : highlightColorIcon
|
|
72
78
|
}, /*#__PURE__*/React.createElement(TextColorIcon, {
|
|
73
79
|
label: formatMessage(messages.textColorTooltip),
|
|
74
80
|
iconColor: iconColor,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.10",
|
|
4
4
|
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,22 +39,22 @@
|
|
|
39
39
|
"@atlaskit/editor-plugin-selection-toolbar": "^7.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-toolbar": "^3.4.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
42
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
42
|
+
"@atlaskit/editor-shared-styles": "^3.9.0",
|
|
43
43
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
44
44
|
"@atlaskit/editor-toolbar": "^0.17.0",
|
|
45
45
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
46
46
|
"@atlaskit/heading": "^5.2.0",
|
|
47
|
-
"@atlaskit/icon": "^
|
|
47
|
+
"@atlaskit/icon": "^29.0.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
49
|
"@atlaskit/primitives": "^16.1.0",
|
|
50
50
|
"@atlaskit/theme": "^21.0.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^13.35.0",
|
|
52
52
|
"@atlaskit/tokens": "^8.0.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"@emotion/react": "^11.7.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@atlaskit/editor-common": "^110.
|
|
57
|
+
"@atlaskit/editor-common": "^110.27.0",
|
|
58
58
|
"react": "^18.2.0",
|
|
59
59
|
"react-dom": "^18.2.0",
|
|
60
60
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -110,6 +110,9 @@
|
|
|
110
110
|
},
|
|
111
111
|
"platform_editor_toolbar_aifc_patch_7": {
|
|
112
112
|
"type": "boolean"
|
|
113
|
+
},
|
|
114
|
+
"platform_editor_toolbar_aifc_patch_8": {
|
|
115
|
+
"type": "boolean"
|
|
113
116
|
}
|
|
114
117
|
}
|
|
115
118
|
}
|