@atlaskit/editor-plugin-text-color 12.3.2 → 12.3.4
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 +15 -0
- package/dist/cjs/ui/ColorAccessibilityMenuItem.js +3 -1
- package/dist/cjs/ui/RemoveColorMenuItem.js +17 -0
- package/dist/es2019/ui/ColorAccessibilityMenuItem.js +3 -1
- package/dist/es2019/ui/RemoveColorMenuItem.js +17 -0
- package/dist/esm/ui/ColorAccessibilityMenuItem.js +3 -1
- package/dist/esm/ui/RemoveColorMenuItem.js +17 -0
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-color
|
|
2
2
|
|
|
3
|
+
## 12.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`262d8099a9e63`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/262d8099a9e63) -
|
|
8
|
+
[ux] [EDITOR-7851] address minor UI fixes for platform_editor_lovability_text_bg_color experiment
|
|
9
|
+
behind platform_editor_lovability_text_bg_color_patch_1
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 12.3.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 12.3.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -17,6 +17,7 @@ var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
|
17
17
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
18
18
|
var _accessibility = _interopRequireDefault(require("@atlaskit/icon/core/accessibility"));
|
|
19
19
|
var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/core/question-circle"));
|
|
20
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
21
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
21
22
|
var _tokens = require("@atlaskit/tokens");
|
|
22
23
|
var _colorContrast = require("../pm-plugins/utils/color-contrast");
|
|
@@ -121,7 +122,8 @@ var ColorAccessibilityMenuItem = exports.ColorAccessibilityMenuItem = function C
|
|
|
121
122
|
space: "space.050"
|
|
122
123
|
}, /*#__PURE__*/_react.default.createElement(_accessibility.default, {
|
|
123
124
|
label: "",
|
|
124
|
-
size: "medium"
|
|
125
|
+
size: "medium",
|
|
126
|
+
color: (0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1') ? "var(--ds-icon-subtle, #505258)" : undefined
|
|
125
127
|
}), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
126
128
|
as: "span",
|
|
127
129
|
size: "small",
|
|
@@ -17,6 +17,7 @@ var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
|
17
17
|
var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
18
18
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
19
19
|
var _colourNone = _interopRequireDefault(require("@atlaskit/icon-lab/core/colour-none"));
|
|
20
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
21
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
21
22
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
22
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); }
|
|
@@ -59,6 +60,22 @@ var RemoveColorMenuItem = exports.RemoveColorMenuItem = function RemoveColorMenu
|
|
|
59
60
|
}
|
|
60
61
|
};
|
|
61
62
|
if ((0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
|
|
63
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1')) {
|
|
64
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
65
|
+
className: (0, _runtime.ax)([styles.removeColorButton])
|
|
66
|
+
}, /*#__PURE__*/React.createElement(_new.default, {
|
|
67
|
+
shouldFitContainer: true,
|
|
68
|
+
appearance: "subtle",
|
|
69
|
+
onClick: onClick
|
|
70
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
71
|
+
className: (0, _runtime.ax)([styles.iconContainer])
|
|
72
|
+
}, /*#__PURE__*/React.createElement(_colourNone.default, {
|
|
73
|
+
size: "medium",
|
|
74
|
+
label: ""
|
|
75
|
+
}), /*#__PURE__*/React.createElement(_compiled.Text, {
|
|
76
|
+
color: "color.text.subtle"
|
|
77
|
+
}, formatMessage(_messages.highlightMessages.clearColors)))));
|
|
78
|
+
}
|
|
62
79
|
return /*#__PURE__*/React.createElement("div", {
|
|
63
80
|
className: (0, _runtime.ax)([styles.removeColorButton])
|
|
64
81
|
}, /*#__PURE__*/React.createElement(_new.default, {
|
|
@@ -10,6 +10,7 @@ import { getTokenCSSVariableValue } from '@atlaskit/editor-common/ui-color';
|
|
|
10
10
|
import { hexToEditorTextBackgroundPaletteColor, hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
|
|
11
11
|
import AccessibilityIcon from '@atlaskit/icon/core/accessibility';
|
|
12
12
|
import QuestionCircleIcon from '@atlaskit/icon/core/question-circle';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
14
|
import { Box, Inline, Text } from '@atlaskit/primitives/compiled';
|
|
14
15
|
import { getTokenValue } from '@atlaskit/tokens';
|
|
15
16
|
import { getContrastRatio as calcContrastRatio } from '../pm-plugins/utils/color-contrast';
|
|
@@ -118,7 +119,8 @@ export const ColorAccessibilityMenuItem = ({
|
|
|
118
119
|
space: "space.050"
|
|
119
120
|
}, /*#__PURE__*/React.createElement(AccessibilityIcon, {
|
|
120
121
|
label: "",
|
|
121
|
-
size: "medium"
|
|
122
|
+
size: "medium",
|
|
123
|
+
color: fg('platform_editor_lovability_text_bg_color_patch_1') ? "var(--ds-icon-subtle, #505258)" : undefined
|
|
122
124
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
123
125
|
as: "span",
|
|
124
126
|
size: "small",
|
|
@@ -9,6 +9,7 @@ import { getInputMethodFromParentKeys } from '@atlaskit/editor-common/toolbar';
|
|
|
9
9
|
import { REMOVE_HIGHLIGHT_COLOR } from '@atlaskit/editor-common/ui-color';
|
|
10
10
|
import { useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
11
11
|
import ColourNoneIcon from '@atlaskit/icon-lab/core/colour-none';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
13
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
13
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
15
|
const styles = {
|
|
@@ -53,6 +54,22 @@ export const RemoveColorMenuItem = ({
|
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
56
|
if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
|
|
57
|
+
if (fg('platform_editor_lovability_text_bg_color_patch_1')) {
|
|
58
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
59
|
+
className: ax([styles.removeColorButton])
|
|
60
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
61
|
+
shouldFitContainer: true,
|
|
62
|
+
appearance: "subtle",
|
|
63
|
+
onClick: onClick
|
|
64
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
65
|
+
className: ax([styles.iconContainer])
|
|
66
|
+
}, /*#__PURE__*/React.createElement(ColourNoneIcon, {
|
|
67
|
+
size: "medium",
|
|
68
|
+
label: ""
|
|
69
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
70
|
+
color: "color.text.subtle"
|
|
71
|
+
}, formatMessage(messages.clearColors)))));
|
|
72
|
+
}
|
|
56
73
|
return /*#__PURE__*/React.createElement("div", {
|
|
57
74
|
className: ax([styles.removeColorButton])
|
|
58
75
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -10,6 +10,7 @@ import { getTokenCSSVariableValue } from '@atlaskit/editor-common/ui-color';
|
|
|
10
10
|
import { hexToEditorTextBackgroundPaletteColor, hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
|
|
11
11
|
import AccessibilityIcon from '@atlaskit/icon/core/accessibility';
|
|
12
12
|
import QuestionCircleIcon from '@atlaskit/icon/core/question-circle';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
14
|
import { Box, Inline, Text } from '@atlaskit/primitives/compiled';
|
|
14
15
|
import { getTokenValue } from '@atlaskit/tokens';
|
|
15
16
|
import { getContrastRatio as calcContrastRatio } from '../pm-plugins/utils/color-contrast';
|
|
@@ -114,7 +115,8 @@ export var ColorAccessibilityMenuItem = function ColorAccessibilityMenuItem(_ref
|
|
|
114
115
|
space: "space.050"
|
|
115
116
|
}, /*#__PURE__*/React.createElement(AccessibilityIcon, {
|
|
116
117
|
label: "",
|
|
117
|
-
size: "medium"
|
|
118
|
+
size: "medium",
|
|
119
|
+
color: fg('platform_editor_lovability_text_bg_color_patch_1') ? "var(--ds-icon-subtle, #505258)" : undefined
|
|
118
120
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
119
121
|
as: "span",
|
|
120
122
|
size: "small",
|
|
@@ -9,6 +9,7 @@ import { getInputMethodFromParentKeys } from '@atlaskit/editor-common/toolbar';
|
|
|
9
9
|
import { REMOVE_HIGHLIGHT_COLOR } from '@atlaskit/editor-common/ui-color';
|
|
10
10
|
import { useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
11
11
|
import ColourNoneIcon from '@atlaskit/icon-lab/core/colour-none';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
13
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
13
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
15
|
var styles = {
|
|
@@ -50,6 +51,22 @@ export var RemoveColorMenuItem = function RemoveColorMenuItem(_ref) {
|
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
53
|
if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
|
|
54
|
+
if (fg('platform_editor_lovability_text_bg_color_patch_1')) {
|
|
55
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
className: ax([styles.removeColorButton])
|
|
57
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
58
|
+
shouldFitContainer: true,
|
|
59
|
+
appearance: "subtle",
|
|
60
|
+
onClick: onClick
|
|
61
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
62
|
+
className: ax([styles.iconContainer])
|
|
63
|
+
}, /*#__PURE__*/React.createElement(ColourNoneIcon, {
|
|
64
|
+
size: "medium",
|
|
65
|
+
label: ""
|
|
66
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
67
|
+
color: "color.text.subtle"
|
|
68
|
+
}, formatMessage(messages.clearColors)))));
|
|
69
|
+
}
|
|
53
70
|
return /*#__PURE__*/React.createElement("div", {
|
|
54
71
|
className: ax([styles.removeColorButton])
|
|
55
72
|
}, /*#__PURE__*/React.createElement(Button, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
-
"version": "12.3.
|
|
3
|
+
"version": "12.3.4",
|
|
4
4
|
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags-react": "^1.0.0",
|
|
43
43
|
"@atlaskit/primitives": "^20.0.0",
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
44
|
+
"@atlaskit/tmp-editor-statsig": "^114.0.0",
|
|
45
45
|
"@atlaskit/tokens": "^15.0.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.
|
|
50
|
+
"@atlaskit/editor-common": "^116.14.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"
|
|
@@ -99,6 +99,9 @@
|
|
|
99
99
|
"platform-feature-flags": {
|
|
100
100
|
"platform_editor_use_preferences_plugin": {
|
|
101
101
|
"type": "boolean"
|
|
102
|
+
},
|
|
103
|
+
"platform_editor_lovability_text_bg_color_patch_1": {
|
|
104
|
+
"type": "boolean"
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
107
|
}
|