@atlaskit/editor-plugin-text-color 7.0.0 → 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,21 @@
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
+
11
+ ## 7.0.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [`b429c01ce6af9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b429c01ce6af9) -
16
+ icon migration entry point update
17
+ - Updated dependencies
18
+
3
19
  ## 7.0.0
4
20
 
5
21
  ### 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,
@@ -23,7 +23,7 @@ var _uiColor = require("@atlaskit/editor-common/ui-color");
23
23
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
24
24
  var _editorPalette = require("@atlaskit/editor-palette");
25
25
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
26
- var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-down"));
26
+ var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
27
27
  var _textStyle = _interopRequireDefault(require("@atlaskit/icon/core/text-style"));
28
28
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
29
29
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
@@ -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,
@@ -16,7 +16,7 @@ import { ColorPalette, getSelectedRowAndColumnFromPalette, textPaletteTooltipMes
16
16
  import { ArrowKeyNavigationType, DropdownContainer as Dropdown, TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
17
17
  import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
18
18
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
19
- import ChevronDownIcon from '@atlaskit/icon/core/migration/chevron-down';
19
+ import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
20
20
  import TextStyleIcon from '@atlaskit/icon/core/text-style';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
@@ -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,
@@ -26,7 +26,7 @@ import { ColorPalette, getSelectedRowAndColumnFromPalette, textPaletteTooltipMes
26
26
  import { ArrowKeyNavigationType, DropdownContainer as Dropdown, TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
27
27
  import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
28
28
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
29
- import ChevronDownIcon from '@atlaskit/icon/core/migration/chevron-down';
29
+ import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
30
30
  import TextStyleIcon from '@atlaskit/icon/core/text-style';
31
31
  import { fg } from '@atlaskit/platform-feature-flags';
32
32
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-color",
3
- "version": "7.0.0",
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
  }