@atlaskit/editor-plugin-text-color 7.0.1 → 7.0.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-text-color
2
2
 
3
+ ## 7.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`676d45e408322`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/676d45e408322) -
8
+ [ED-29726] clean up platform_editor_toolbar_aifc_patch_8
9
+ - Updated dependencies
10
+
3
11
  ## 7.0.1
4
12
 
5
13
  ### Patch Changes
@@ -71,7 +71,6 @@ var TextColorHighlightMenu = exports.TextColorHighlightMenu = function TextColor
71
71
  };
72
72
  }, [setIsPaletteOpen, isPaletteOpen]);
73
73
  var iconColor = getIconColor(textColor, defaultColor, highlightColor);
74
- var highlightColorIcon = highlightColor ? highlightColor : (0, _editorToolbar.getContrastingBackgroundColor)(iconColor);
75
74
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
76
75
  content: /*#__PURE__*/_react.default.createElement(_keymaps.ToolTipContent, {
77
76
  description: formatMessage(isHighlightPluginExisted ? _messages.textColorMessages.textColorHighlightTooltip : _messages.textColorMessages.textColorTooltip),
@@ -82,7 +81,7 @@ var TextColorHighlightMenu = exports.TextColorHighlightMenu = function TextColor
82
81
  setIsOpen: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? setIsPaletteOpen : undefined
83
82
  }, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownMenu, {
84
83
  iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarColorSwatch, {
85
- highlightColor: (0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_patch_8') ? getHighlightColorIcon(highlightColor) : highlightColorIcon
84
+ highlightColor: getHighlightColorIcon(highlightColor)
86
85
  }, /*#__PURE__*/_react.default.createElement(_editorToolbar.TextColorIcon, {
87
86
  label: formatMessage(_messages.textColorMessages.textColorTooltip),
88
87
  iconColor: iconColor,
@@ -7,7 +7,7 @@ import { toggleHighlightPalette, ToolTipContent } from '@atlaskit/editor-common/
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
9
  import { hexToEditorTextPaletteColor, hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
10
- import { TextColorIcon, ToolbarColorSwatch, ToolbarDropdownMenu, ToolbarDropdownMenuProvider, ToolbarTooltip, getContrastingBackgroundColor, useToolbarUI } from '@atlaskit/editor-toolbar';
10
+ import { TextColorIcon, ToolbarColorSwatch, ToolbarDropdownMenu, ToolbarDropdownMenuProvider, ToolbarTooltip, useToolbarUI } from '@atlaskit/editor-toolbar';
11
11
  import { fg } from '@atlaskit/platform-feature-flags';
12
12
  import { Box } from '@atlaskit/primitives/compiled';
13
13
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -67,7 +67,6 @@ export const TextColorHighlightMenu = ({
67
67
  };
68
68
  }, [setIsPaletteOpen, isPaletteOpen]);
69
69
  const iconColor = getIconColor(textColor, defaultColor, highlightColor);
70
- const highlightColorIcon = highlightColor ? highlightColor : getContrastingBackgroundColor(iconColor);
71
70
  return /*#__PURE__*/React.createElement(ToolbarTooltip, {
72
71
  content: /*#__PURE__*/React.createElement(ToolTipContent, {
73
72
  description: formatMessage(isHighlightPluginExisted ? messages.textColorHighlightTooltip : messages.textColorTooltip),
@@ -78,7 +77,7 @@ export const TextColorHighlightMenu = ({
78
77
  setIsOpen: expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? setIsPaletteOpen : undefined
79
78
  }, /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
80
79
  iconBefore: /*#__PURE__*/React.createElement(ToolbarColorSwatch, {
81
- highlightColor: fg('platform_editor_toolbar_aifc_patch_8') ? getHighlightColorIcon(highlightColor) : highlightColorIcon
80
+ highlightColor: getHighlightColorIcon(highlightColor)
82
81
  }, /*#__PURE__*/React.createElement(TextColorIcon, {
83
82
  label: formatMessage(messages.textColorTooltip),
84
83
  iconColor: iconColor,
@@ -7,7 +7,7 @@ import { toggleHighlightPalette, ToolTipContent } from '@atlaskit/editor-common/
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
9
  import { hexToEditorTextPaletteColor, hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
10
- import { TextColorIcon, ToolbarColorSwatch, ToolbarDropdownMenu, ToolbarDropdownMenuProvider, ToolbarTooltip, getContrastingBackgroundColor, useToolbarUI } from '@atlaskit/editor-toolbar';
10
+ import { TextColorIcon, ToolbarColorSwatch, ToolbarDropdownMenu, ToolbarDropdownMenuProvider, ToolbarTooltip, useToolbarUI } from '@atlaskit/editor-toolbar';
11
11
  import { fg } from '@atlaskit/platform-feature-flags';
12
12
  import { Box } from '@atlaskit/primitives/compiled';
13
13
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -63,7 +63,6 @@ export var TextColorHighlightMenu = function TextColorHighlightMenu(_ref) {
63
63
  };
64
64
  }, [setIsPaletteOpen, isPaletteOpen]);
65
65
  var iconColor = getIconColor(textColor, defaultColor, highlightColor);
66
- var highlightColorIcon = highlightColor ? highlightColor : getContrastingBackgroundColor(iconColor);
67
66
  return /*#__PURE__*/React.createElement(ToolbarTooltip, {
68
67
  content: /*#__PURE__*/React.createElement(ToolTipContent, {
69
68
  description: formatMessage(isHighlightPluginExisted ? messages.textColorHighlightTooltip : messages.textColorTooltip),
@@ -74,7 +73,7 @@ export var TextColorHighlightMenu = function TextColorHighlightMenu(_ref) {
74
73
  setIsOpen: expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? setIsPaletteOpen : undefined
75
74
  }, /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
76
75
  iconBefore: /*#__PURE__*/React.createElement(ToolbarColorSwatch, {
77
- highlightColor: fg('platform_editor_toolbar_aifc_patch_8') ? getHighlightColorIcon(highlightColor) : highlightColorIcon
76
+ highlightColor: getHighlightColorIcon(highlightColor)
78
77
  }, /*#__PURE__*/React.createElement(TextColorIcon, {
79
78
  label: formatMessage(messages.textColorTooltip),
80
79
  iconColor: iconColor,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-color",
3
- "version": "7.0.1",
3
+ "version": "7.0.2",
4
4
  "description": "Text color plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -107,9 +107,6 @@
107
107
  },
108
108
  "platform_editor_toolbar_aifc_patch_7": {
109
109
  "type": "boolean"
110
- },
111
- "platform_editor_toolbar_aifc_patch_8": {
112
- "type": "boolean"
113
110
  }
114
111
  }
115
112
  }