@atlaskit/editor-plugin-text-color 12.3.23 → 12.3.24

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,17 @@
1
1
  # @atlaskit/editor-plugin-text-color
2
2
 
3
+ ## 12.3.24
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d778b282fb391`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d778b282fb391) -
8
+ Tighten color picker spacing and footer dimensions.
9
+
10
+ The `@atlaskit/editor-toolbar/color-palette` entry point now supports a `gap` prop to customise
11
+ spacing between color tile wrappers, for example: `<ColorPalette gap="space.0" {...props} />`.
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 12.3.23
4
16
 
5
17
  ### Patch Changes
@@ -1,9 +1,14 @@
1
1
 
2
2
  ._19itglyw{border:none}._19bvu2gc{padding-left:var(--ds-space-100,8px)}
3
+ ._19bvze3t{padding-left:var(--ds-space-0,0)}
3
4
  ._19pku2gc{margin-top:var(--ds-space-100,8px)}
5
+ ._19pkze3t{margin-top:var(--ds-space-0,0)}
4
6
  ._1bah1yb4{justify-content:space-between}
5
7
  ._1e0c1txw{display:flex}
6
8
  ._4cvr1h6o{align-items:center}
7
9
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
10
+ ._ca0qze3t{padding-top:var(--ds-space-0,0)}
8
11
  ._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
9
- ._u5f31b66{padding-right:var(--ds-space-050,4px)}
12
+ ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
13
+ ._u5f31b66{padding-right:var(--ds-space-050,4px)}
14
+ ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
@@ -11,6 +11,7 @@ var _runtime = require("@compiled/react/runtime");
11
11
  var _react = _interopRequireDefault(require("react"));
12
12
  var _reactIntl = require("react-intl");
13
13
  var _new = require("@atlaskit/button/new");
14
+ var _css = require("@atlaskit/css");
14
15
  var _hooks = require("@atlaskit/editor-common/hooks");
15
16
  var _messages = require("@atlaskit/editor-common/messages");
16
17
  var _uiColor = require("@atlaskit/editor-common/ui-color");
@@ -204,7 +205,8 @@ var AccessibilityStatus = function AccessibilityStatus(_ref2) {
204
205
  }
205
206
  };
206
207
  var styles = {
207
- container: "_19itglyw _19pku2gc _ca0q1b66 _n3td1b66 _19bvu2gc _u5f31b66 _1e0c1txw _4cvr1h6o _1bah1yb4"
208
+ container: "_19itglyw _19pku2gc _ca0q1b66 _n3td1b66 _19bvu2gc _u5f31b66 _1e0c1txw _4cvr1h6o _1bah1yb4",
209
+ containerPatch: "_19pkze3t _ca0qze3t _n3tdze3t _19bvze3t _u5f3ze3t"
208
210
  };
209
211
  var ColorAccessibilityMenuItem = exports.ColorAccessibilityMenuItem = function ColorAccessibilityMenuItem(_ref3) {
210
212
  var api = _ref3.api;
@@ -275,7 +277,7 @@ var ColorAccessibilityMenuItem = exports.ColorAccessibilityMenuItem = function C
275
277
  }
276
278
  };
277
279
  return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
278
- xcss: styles.container
280
+ xcss: (0, _css.cx)(styles.container, (0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1') && styles.containerPatch)
279
281
  }, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
280
282
  alignBlock: "center",
281
283
  space: "space.050"
@@ -2,9 +2,11 @@
2
2
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
3
3
  ._zulp12x7{gap:var(--ds-space-075,6px)}._189ee4h9{border-width:var(--ds-border-width,1px)}
4
4
  ._195gv77o{margin-inline:var(--ds-space-025,2px)}
5
+ ._195gze3t{margin-inline:var(--ds-space-0,0)}
5
6
  ._1dqonqa1{border-style:solid}
6
7
  ._1h6d1l7x{border-color:var(--ds-border,#0b120e24)}
7
8
  ._19pk12x7{margin-top:var(--ds-space-075,6px)}
9
+ ._19pkze3t{margin-top:var(--ds-space-0,0)}
8
10
  ._1bah1h6o{justify-content:center}
9
11
  ._1e0c1txw{display:flex}
10
12
  ._4cvr1h6o{align-items:center}
@@ -23,6 +23,7 @@ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
23
23
  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); }
24
24
  var styles = {
25
25
  removeColorButton: "_2rko12b0 _195gv77o _189ee4h9 _1dqonqa1 _1h6d1l7x _19pk12x7",
26
+ removeColorButtonPatch: "_195gze3t _19pkze3t",
26
27
  iconContainer: "_zulp12x7 _1e0c1txw _4cvr1h6o _1bah1h6o"
27
28
  };
28
29
  var RemoveColorMenuItem = exports.RemoveColorMenuItem = function RemoveColorMenuItem(_ref) {
@@ -62,7 +63,7 @@ var RemoveColorMenuItem = exports.RemoveColorMenuItem = function RemoveColorMenu
62
63
  if ((0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
63
64
  if ((0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1')) {
64
65
  return /*#__PURE__*/React.createElement("div", {
65
- className: (0, _runtime.ax)([styles.removeColorButton])
66
+ className: (0, _runtime.ax)([styles.removeColorButton, styles.removeColorButtonPatch])
66
67
  }, /*#__PURE__*/React.createElement(_new.default, {
67
68
  shouldFitContainer: true,
68
69
  appearance: "subtle",
@@ -18,6 +18,7 @@ var _uiColor = require("@atlaskit/editor-common/ui-color");
18
18
  var _editorPalette = require("@atlaskit/editor-palette");
19
19
  var _editorToolbar = require("@atlaskit/editor-toolbar");
20
20
  var _heading = _interopRequireDefault(require("@atlaskit/heading"));
21
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
21
22
  var _compiled = require("@atlaskit/primitives/compiled");
22
23
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
23
24
  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); }
@@ -58,13 +59,9 @@ function TextColorMenuItem(_ref) {
58
59
  }
59
60
  }
60
61
  }, [editorView === null || editorView === void 0 ? void 0 : editorView.state, editorView === null || editorView === void 0 ? void 0 : editorView.dispatch, api === null || api === void 0 ? void 0 : api.textColor.actions, parents, closeMenu, isNewColorPaletteEnabled]);
61
- return /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
62
- xcss: styles.container,
63
- testId: "text-color-menu-item"
64
- }, /*#__PURE__*/_react.default.createElement(_heading.default, {
65
- size: "xxsmall"
66
- }, formatMessage(_messages.textColorMessages.textColorTooltip)), /*#__PURE__*/_react.default.createElement(_editorToolbar.ColorPalette, {
67
- cols: isNewColorPaletteEnabled ? TEXT_COLOR_PICKER_COLUMNS : undefined
62
+ var colorPalette = /*#__PURE__*/_react.default.createElement(_editorToolbar.ColorPalette, {
63
+ cols: isNewColorPaletteEnabled ? TEXT_COLOR_PICKER_COLUMNS : undefined,
64
+ gap: isNewColorPaletteEnabled && (0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1') ? 'space.0' : undefined
68
65
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
69
66
  ,
70
67
  onClick: function onClick(color, _, event) {
@@ -78,5 +75,13 @@ function TextColorMenuItem(_ref) {
78
75
  hexToPaletteColor: _editorPalette.hexToEditorTextPaletteColor,
79
76
  paletteColorTooltipMessages: _uiColor.textPaletteTooltipMessages
80
77
  }
81
- }));
78
+ });
79
+ return /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
80
+ xcss: styles.container,
81
+ testId: "text-color-menu-item"
82
+ }, /*#__PURE__*/_react.default.createElement(_heading.default, {
83
+ size: "xxsmall"
84
+ }, formatMessage(_messages.textColorMessages.textColorTooltip)), isNewColorPaletteEnabled && (0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1') ? /*#__PURE__*/_react.default.createElement(_compiled.Bleed, {
85
+ inline: "space.025"
86
+ }, colorPalette) : colorPalette);
82
87
  }
@@ -1,2 +1,7 @@
1
- ._18zru2gc{padding-inline:var(--ds-space-100,8px)}
2
- ._1rjcv77o{padding-block:var(--ds-space-025,2px)}
1
+
2
+ ._zulpu2gc{gap:var(--ds-space-100,8px)}._18zru2gc{padding-inline:var(--ds-space-100,8px)}
3
+ ._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
4
+ ._1rjc12x7{padding-block:var(--ds-space-075,6px)}
5
+ ._1rjcv77o{padding-block:var(--ds-space-025,2px)}
6
+ ._1e0c1txw{display:flex}
7
+ ._2lx21bp4{flex-direction:column}
@@ -15,7 +15,8 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
15
  var _compiled = require("@atlaskit/primitives/compiled");
16
16
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
17
17
  var styles = {
18
- menu: "_1rjcv77o _18zru2gc"
18
+ menuOld: "_1rjcv77o _18zru2gc",
19
+ menu: "_zulpu2gc _1rjc12x7 _18zrutpp _1e0c1txw _2lx21bp4"
19
20
  };
20
21
  var TextMenuSection = exports.TextMenuSection = function TextMenuSection(_ref) {
21
22
  var children = _ref.children,
@@ -31,7 +32,7 @@ var TextMenuSection = exports.TextMenuSection = function TextMenuSection(_ref) {
31
32
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItemSection, {
32
33
  hasSeparator: hasSeparator
33
34
  }, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
34
- xcss: styles.menu,
35
+ xcss: (0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1') ? styles.menu : styles.menuOld,
35
36
  onMouseDown: onMouseDown
36
37
  }, children));
37
38
  };
@@ -1,9 +1,14 @@
1
1
 
2
2
  ._19itglyw{border:none}._19bvu2gc{padding-left:var(--ds-space-100,8px)}
3
+ ._19bvze3t{padding-left:var(--ds-space-0,0)}
3
4
  ._19pku2gc{margin-top:var(--ds-space-100,8px)}
5
+ ._19pkze3t{margin-top:var(--ds-space-0,0)}
4
6
  ._1bah1yb4{justify-content:space-between}
5
7
  ._1e0c1txw{display:flex}
6
8
  ._4cvr1h6o{align-items:center}
7
9
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
10
+ ._ca0qze3t{padding-top:var(--ds-space-0,0)}
8
11
  ._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
9
- ._u5f31b66{padding-right:var(--ds-space-050,4px)}
12
+ ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
13
+ ._u5f31b66{padding-right:var(--ds-space-050,4px)}
14
+ ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
@@ -4,6 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
5
5
  import { useIntl } from 'react-intl';
6
6
  import { IconButton } from '@atlaskit/button/new';
7
+ import { cx } from '@atlaskit/css';
7
8
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
8
9
  import { colorAccessibilityMessages as messages } from '@atlaskit/editor-common/messages';
9
10
  import { getHighlightColorInNonActiveTheme, getTextColorInNonActiveTheme, getTokenCSSVariableValue } from '@atlaskit/editor-common/ui-color';
@@ -189,7 +190,8 @@ const AccessibilityStatus = ({
189
190
  }
190
191
  };
191
192
  const styles = {
192
- container: "_19itglyw _19pku2gc _ca0q1b66 _n3td1b66 _19bvu2gc _u5f31b66 _1e0c1txw _4cvr1h6o _1bah1yb4"
193
+ container: "_19itglyw _19pku2gc _ca0q1b66 _n3td1b66 _19bvu2gc _u5f31b66 _1e0c1txw _4cvr1h6o _1bah1yb4",
194
+ containerPatch: "_19pkze3t _ca0qze3t _n3tdze3t _19bvze3t _u5f3ze3t"
193
195
  };
194
196
  export const ColorAccessibilityMenuItem = ({
195
197
  api
@@ -261,7 +263,7 @@ export const ColorAccessibilityMenuItem = ({
261
263
  }
262
264
  };
263
265
  return /*#__PURE__*/React.createElement(Box, {
264
- xcss: styles.container
266
+ xcss: cx(styles.container, fg('platform_editor_lovability_text_bg_color_patch_1') && styles.containerPatch)
265
267
  }, /*#__PURE__*/React.createElement(Inline, {
266
268
  alignBlock: "center",
267
269
  space: "space.050"
@@ -2,9 +2,11 @@
2
2
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
3
3
  ._zulp12x7{gap:var(--ds-space-075,6px)}._189ee4h9{border-width:var(--ds-border-width,1px)}
4
4
  ._195gv77o{margin-inline:var(--ds-space-025,2px)}
5
+ ._195gze3t{margin-inline:var(--ds-space-0,0)}
5
6
  ._1dqonqa1{border-style:solid}
6
7
  ._1h6d1l7x{border-color:var(--ds-border,#0b120e24)}
7
8
  ._19pk12x7{margin-top:var(--ds-space-075,6px)}
9
+ ._19pkze3t{margin-top:var(--ds-space-0,0)}
8
10
  ._1bah1h6o{justify-content:center}
9
11
  ._1e0c1txw{display:flex}
10
12
  ._4cvr1h6o{align-items:center}
@@ -14,6 +14,7 @@ import { Text } from '@atlaskit/primitives/compiled';
14
14
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
15
15
  const styles = {
16
16
  removeColorButton: "_2rko12b0 _195gv77o _189ee4h9 _1dqonqa1 _1h6d1l7x _19pk12x7",
17
+ removeColorButtonPatch: "_195gze3t _19pkze3t",
17
18
  iconContainer: "_zulp12x7 _1e0c1txw _4cvr1h6o _1bah1h6o"
18
19
  };
19
20
  export const RemoveColorMenuItem = ({
@@ -56,7 +57,7 @@ export const RemoveColorMenuItem = ({
56
57
  if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
57
58
  if (fg('platform_editor_lovability_text_bg_color_patch_1')) {
58
59
  return /*#__PURE__*/React.createElement("div", {
59
- className: ax([styles.removeColorButton])
60
+ className: ax([styles.removeColorButton, styles.removeColorButtonPatch])
60
61
  }, /*#__PURE__*/React.createElement(Button, {
61
62
  shouldFitContainer: true,
62
63
  appearance: "subtle",
@@ -10,7 +10,8 @@ import { textPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color';
10
10
  import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
11
11
  import { ColorPalette, useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
12
12
  import Heading from '@atlaskit/heading';
13
- import { Stack } from '@atlaskit/primitives/compiled';
13
+ import { fg } from '@atlaskit/platform-feature-flags';
14
+ import { Bleed, Stack } from '@atlaskit/primitives/compiled';
14
15
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
15
16
  const TEXT_COLOR_PICKER_COLUMNS = 10;
16
17
  const styles = {
@@ -53,13 +54,9 @@ export function TextColorMenuItem({
53
54
  }
54
55
  }
55
56
  }, [editorView === null || editorView === void 0 ? void 0 : editorView.state, editorView === null || editorView === void 0 ? void 0 : editorView.dispatch, api === null || api === void 0 ? void 0 : api.textColor.actions, parents, closeMenu, isNewColorPaletteEnabled]);
56
- return /*#__PURE__*/React.createElement(Stack, {
57
- xcss: styles.container,
58
- testId: "text-color-menu-item"
59
- }, /*#__PURE__*/React.createElement(Heading, {
60
- size: "xxsmall"
61
- }, formatMessage(messages.textColorTooltip)), /*#__PURE__*/React.createElement(ColorPalette, {
62
- cols: isNewColorPaletteEnabled ? TEXT_COLOR_PICKER_COLUMNS : undefined
57
+ const colorPalette = /*#__PURE__*/React.createElement(ColorPalette, {
58
+ cols: isNewColorPaletteEnabled ? TEXT_COLOR_PICKER_COLUMNS : undefined,
59
+ gap: isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') ? 'space.0' : undefined
63
60
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
64
61
  ,
65
62
  onClick: (color, _, event) => {
@@ -73,5 +70,13 @@ export function TextColorMenuItem({
73
70
  hexToPaletteColor: hexToEditorTextPaletteColor,
74
71
  paletteColorTooltipMessages: textPaletteTooltipMessages
75
72
  }
76
- }));
73
+ });
74
+ return /*#__PURE__*/React.createElement(Stack, {
75
+ xcss: styles.container,
76
+ testId: "text-color-menu-item"
77
+ }, /*#__PURE__*/React.createElement(Heading, {
78
+ size: "xxsmall"
79
+ }, formatMessage(messages.textColorTooltip)), isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') ? /*#__PURE__*/React.createElement(Bleed, {
80
+ inline: "space.025"
81
+ }, colorPalette) : colorPalette);
77
82
  }
@@ -1,2 +1,7 @@
1
- ._18zru2gc{padding-inline:var(--ds-space-100,8px)}
2
- ._1rjcv77o{padding-block:var(--ds-space-025,2px)}
1
+
2
+ ._zulpu2gc{gap:var(--ds-space-100,8px)}._18zru2gc{padding-inline:var(--ds-space-100,8px)}
3
+ ._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
4
+ ._1rjc12x7{padding-block:var(--ds-space-075,6px)}
5
+ ._1rjcv77o{padding-block:var(--ds-space-025,2px)}
6
+ ._1e0c1txw{display:flex}
7
+ ._2lx21bp4{flex-direction:column}
@@ -8,7 +8,8 @@ import { fg } from '@atlaskit/platform-feature-flags';
8
8
  import { Box } from '@atlaskit/primitives/compiled';
9
9
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
10
  const styles = {
11
- menu: "_1rjcv77o _18zru2gc"
11
+ menuOld: "_1rjcv77o _18zru2gc",
12
+ menu: "_zulpu2gc _1rjc12x7 _18zrutpp _1e0c1txw _2lx21bp4"
12
13
  };
13
14
  export const TextMenuSection = ({
14
15
  children,
@@ -23,7 +24,7 @@ export const TextMenuSection = ({
23
24
  return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
24
25
  hasSeparator: hasSeparator
25
26
  }, /*#__PURE__*/React.createElement(Box, {
26
- xcss: styles.menu,
27
+ xcss: expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && fg('platform_editor_lovability_text_bg_color_patch_1') ? styles.menu : styles.menuOld,
27
28
  onMouseDown: onMouseDown
28
29
  }, children));
29
30
  };
@@ -1,9 +1,14 @@
1
1
 
2
2
  ._19itglyw{border:none}._19bvu2gc{padding-left:var(--ds-space-100,8px)}
3
+ ._19bvze3t{padding-left:var(--ds-space-0,0)}
3
4
  ._19pku2gc{margin-top:var(--ds-space-100,8px)}
5
+ ._19pkze3t{margin-top:var(--ds-space-0,0)}
4
6
  ._1bah1yb4{justify-content:space-between}
5
7
  ._1e0c1txw{display:flex}
6
8
  ._4cvr1h6o{align-items:center}
7
9
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
10
+ ._ca0qze3t{padding-top:var(--ds-space-0,0)}
8
11
  ._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
9
- ._u5f31b66{padding-right:var(--ds-space-050,4px)}
12
+ ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
13
+ ._u5f31b66{padding-right:var(--ds-space-050,4px)}
14
+ ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
@@ -7,6 +7,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
7
7
  import React from 'react';
8
8
  import { useIntl } from 'react-intl';
9
9
  import { IconButton } from '@atlaskit/button/new';
10
+ import { cx } from '@atlaskit/css';
10
11
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
11
12
  import { colorAccessibilityMessages as messages } from '@atlaskit/editor-common/messages';
12
13
  import { getHighlightColorInNonActiveTheme, getTextColorInNonActiveTheme, getTokenCSSVariableValue } from '@atlaskit/editor-common/ui-color';
@@ -197,7 +198,8 @@ var AccessibilityStatus = function AccessibilityStatus(_ref2) {
197
198
  }
198
199
  };
199
200
  var styles = {
200
- container: "_19itglyw _19pku2gc _ca0q1b66 _n3td1b66 _19bvu2gc _u5f31b66 _1e0c1txw _4cvr1h6o _1bah1yb4"
201
+ container: "_19itglyw _19pku2gc _ca0q1b66 _n3td1b66 _19bvu2gc _u5f31b66 _1e0c1txw _4cvr1h6o _1bah1yb4",
202
+ containerPatch: "_19pkze3t _ca0qze3t _n3tdze3t _19bvze3t _u5f3ze3t"
201
203
  };
202
204
  export var ColorAccessibilityMenuItem = function ColorAccessibilityMenuItem(_ref3) {
203
205
  var api = _ref3.api;
@@ -268,7 +270,7 @@ export var ColorAccessibilityMenuItem = function ColorAccessibilityMenuItem(_ref
268
270
  }
269
271
  };
270
272
  return /*#__PURE__*/React.createElement(Box, {
271
- xcss: styles.container
273
+ xcss: cx(styles.container, fg('platform_editor_lovability_text_bg_color_patch_1') && styles.containerPatch)
272
274
  }, /*#__PURE__*/React.createElement(Inline, {
273
275
  alignBlock: "center",
274
276
  space: "space.050"
@@ -2,9 +2,11 @@
2
2
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
3
3
  ._zulp12x7{gap:var(--ds-space-075,6px)}._189ee4h9{border-width:var(--ds-border-width,1px)}
4
4
  ._195gv77o{margin-inline:var(--ds-space-025,2px)}
5
+ ._195gze3t{margin-inline:var(--ds-space-0,0)}
5
6
  ._1dqonqa1{border-style:solid}
6
7
  ._1h6d1l7x{border-color:var(--ds-border,#0b120e24)}
7
8
  ._19pk12x7{margin-top:var(--ds-space-075,6px)}
9
+ ._19pkze3t{margin-top:var(--ds-space-0,0)}
8
10
  ._1bah1h6o{justify-content:center}
9
11
  ._1e0c1txw{display:flex}
10
12
  ._4cvr1h6o{align-items:center}
@@ -14,6 +14,7 @@ import { Text } from '@atlaskit/primitives/compiled';
14
14
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
15
15
  var styles = {
16
16
  removeColorButton: "_2rko12b0 _195gv77o _189ee4h9 _1dqonqa1 _1h6d1l7x _19pk12x7",
17
+ removeColorButtonPatch: "_195gze3t _19pkze3t",
17
18
  iconContainer: "_zulp12x7 _1e0c1txw _4cvr1h6o _1bah1h6o"
18
19
  };
19
20
  export var RemoveColorMenuItem = function RemoveColorMenuItem(_ref) {
@@ -53,7 +54,7 @@ export var RemoveColorMenuItem = function RemoveColorMenuItem(_ref) {
53
54
  if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
54
55
  if (fg('platform_editor_lovability_text_bg_color_patch_1')) {
55
56
  return /*#__PURE__*/React.createElement("div", {
56
- className: ax([styles.removeColorButton])
57
+ className: ax([styles.removeColorButton, styles.removeColorButtonPatch])
57
58
  }, /*#__PURE__*/React.createElement(Button, {
58
59
  shouldFitContainer: true,
59
60
  appearance: "subtle",
@@ -10,7 +10,8 @@ import { textPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color';
10
10
  import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
11
11
  import { ColorPalette, useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
12
12
  import Heading from '@atlaskit/heading';
13
- import { Stack } from '@atlaskit/primitives/compiled';
13
+ import { fg } from '@atlaskit/platform-feature-flags';
14
+ import { Bleed, Stack } from '@atlaskit/primitives/compiled';
14
15
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
15
16
  var TEXT_COLOR_PICKER_COLUMNS = 10;
16
17
  var styles = {
@@ -49,13 +50,9 @@ export function TextColorMenuItem(_ref) {
49
50
  }
50
51
  }
51
52
  }, [editorView === null || editorView === void 0 ? void 0 : editorView.state, editorView === null || editorView === void 0 ? void 0 : editorView.dispatch, api === null || api === void 0 ? void 0 : api.textColor.actions, parents, closeMenu, isNewColorPaletteEnabled]);
52
- return /*#__PURE__*/React.createElement(Stack, {
53
- xcss: styles.container,
54
- testId: "text-color-menu-item"
55
- }, /*#__PURE__*/React.createElement(Heading, {
56
- size: "xxsmall"
57
- }, formatMessage(messages.textColorTooltip)), /*#__PURE__*/React.createElement(ColorPalette, {
58
- cols: isNewColorPaletteEnabled ? TEXT_COLOR_PICKER_COLUMNS : undefined
53
+ var colorPalette = /*#__PURE__*/React.createElement(ColorPalette, {
54
+ cols: isNewColorPaletteEnabled ? TEXT_COLOR_PICKER_COLUMNS : undefined,
55
+ gap: isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') ? 'space.0' : undefined
59
56
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
60
57
  ,
61
58
  onClick: function onClick(color, _, event) {
@@ -69,5 +66,13 @@ export function TextColorMenuItem(_ref) {
69
66
  hexToPaletteColor: hexToEditorTextPaletteColor,
70
67
  paletteColorTooltipMessages: textPaletteTooltipMessages
71
68
  }
72
- }));
69
+ });
70
+ return /*#__PURE__*/React.createElement(Stack, {
71
+ xcss: styles.container,
72
+ testId: "text-color-menu-item"
73
+ }, /*#__PURE__*/React.createElement(Heading, {
74
+ size: "xxsmall"
75
+ }, formatMessage(messages.textColorTooltip)), isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') ? /*#__PURE__*/React.createElement(Bleed, {
76
+ inline: "space.025"
77
+ }, colorPalette) : colorPalette);
73
78
  }
@@ -1,2 +1,7 @@
1
- ._18zru2gc{padding-inline:var(--ds-space-100,8px)}
2
- ._1rjcv77o{padding-block:var(--ds-space-025,2px)}
1
+
2
+ ._zulpu2gc{gap:var(--ds-space-100,8px)}._18zru2gc{padding-inline:var(--ds-space-100,8px)}
3
+ ._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
4
+ ._1rjc12x7{padding-block:var(--ds-space-075,6px)}
5
+ ._1rjcv77o{padding-block:var(--ds-space-025,2px)}
6
+ ._1e0c1txw{display:flex}
7
+ ._2lx21bp4{flex-direction:column}
@@ -8,7 +8,8 @@ import { fg } from '@atlaskit/platform-feature-flags';
8
8
  import { Box } from '@atlaskit/primitives/compiled';
9
9
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
10
  var styles = {
11
- menu: "_1rjcv77o _18zru2gc"
11
+ menuOld: "_1rjcv77o _18zru2gc",
12
+ menu: "_zulpu2gc _1rjc12x7 _18zrutpp _1e0c1txw _2lx21bp4"
12
13
  };
13
14
  export var TextMenuSection = function TextMenuSection(_ref) {
14
15
  var children = _ref.children,
@@ -24,7 +25,7 @@ export var TextMenuSection = function TextMenuSection(_ref) {
24
25
  return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
25
26
  hasSeparator: hasSeparator
26
27
  }, /*#__PURE__*/React.createElement(Box, {
27
- xcss: styles.menu,
28
+ xcss: expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && fg('platform_editor_lovability_text_bg_color_patch_1') ? styles.menu : styles.menuOld,
28
29
  onMouseDown: onMouseDown
29
30
  }, children));
30
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-color",
3
- "version": "12.3.23",
3
+ "version": "12.3.24",
4
4
  "description": "Text color plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,7 +33,7 @@
33
33
  "@atlaskit/editor-plugin-toolbar": "^9.0.0",
34
34
  "@atlaskit/editor-prosemirror": "^8.0.0",
35
35
  "@atlaskit/editor-shared-styles": "^4.0.0",
36
- "@atlaskit/editor-toolbar": "^2.2.0",
36
+ "@atlaskit/editor-toolbar": "^2.3.0",
37
37
  "@atlaskit/editor-toolbar-model": "^1.1.0",
38
38
  "@atlaskit/heading": "^6.2.0",
39
39
  "@atlaskit/icon": "^37.0.0",
@@ -41,13 +41,13 @@
41
41
  "@atlaskit/platform-feature-flags": "^2.0.0",
42
42
  "@atlaskit/platform-feature-flags-react": "^1.1.0",
43
43
  "@atlaskit/primitives": "^21.0.0",
44
- "@atlaskit/tmp-editor-statsig": "^126.0.0",
44
+ "@atlaskit/tmp-editor-statsig": "^126.1.0",
45
45
  "@atlaskit/tokens": "^15.8.0",
46
46
  "@babel/runtime": "^7.0.0",
47
47
  "@emotion/react": "^11.7.1"
48
48
  },
49
49
  "peerDependencies": {
50
- "@atlaskit/editor-common": "^116.30.0",
50
+ "@atlaskit/editor-common": "^116.32.0",
51
51
  "react": "^18.2.0",
52
52
  "react-dom": "^18.2.0",
53
53
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"