@atlaskit/editor-plugin-text-color 11.0.12 → 11.1.1
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 +17 -0
- package/dist/cjs/ui/RemoveColorMenuItem.compiled.css +6 -2
- package/dist/cjs/ui/RemoveColorMenuItem.js +19 -1
- package/dist/es2019/ui/RemoveColorMenuItem.compiled.css +6 -2
- package/dist/es2019/ui/RemoveColorMenuItem.js +19 -1
- package/dist/esm/ui/RemoveColorMenuItem.compiled.css +6 -2
- package/dist/esm/ui/RemoveColorMenuItem.js +19 -1
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-color
|
|
2
2
|
|
|
3
|
+
## 11.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 11.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`b7790a8e32b47`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b7790a8e32b47) -
|
|
14
|
+
Update the clear color button UI
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 11.0.12
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
2
|
+
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
3
|
+
._zulp12x7{gap:var(--ds-space-075,6px)}._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
3
4
|
._195gv77o{margin-inline:var(--ds-space-025,2px)}
|
|
4
5
|
._1dqonqa1{border-style:solid}
|
|
5
6
|
._1h6d1l7x{border-color:var(--ds-border,#0b120e24)}
|
|
6
|
-
._19pk12x7{margin-top:var(--ds-space-075,6px)}
|
|
7
|
+
._19pk12x7{margin-top:var(--ds-space-075,6px)}
|
|
8
|
+
._1bah1h6o{justify-content:center}
|
|
9
|
+
._1e0c1txw{display:flex}
|
|
10
|
+
._4cvr1h6o{align-items:center}
|
|
@@ -16,11 +16,13 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
16
16
|
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
|
+
var _colourNone = _interopRequireDefault(require("@atlaskit/icon-lab/core/colour-none"));
|
|
19
20
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
20
21
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
21
22
|
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); }
|
|
22
23
|
var styles = {
|
|
23
|
-
removeColorButton: "_2rko12b0 _195gv77o _189ee4h9 _1dqonqa1 _1h6d1l7x _19pk12x7"
|
|
24
|
+
removeColorButton: "_2rko12b0 _195gv77o _189ee4h9 _1dqonqa1 _1h6d1l7x _19pk12x7",
|
|
25
|
+
iconContainer: "_zulp12x7 _1e0c1txw _4cvr1h6o _1bah1h6o"
|
|
24
26
|
};
|
|
25
27
|
var RemoveColorMenuItem = exports.RemoveColorMenuItem = function RemoveColorMenuItem(_ref) {
|
|
26
28
|
var api = _ref.api,
|
|
@@ -56,6 +58,22 @@ var RemoveColorMenuItem = exports.RemoveColorMenuItem = function RemoveColorMenu
|
|
|
56
58
|
closeMenu === null || closeMenu === void 0 || closeMenu(event);
|
|
57
59
|
}
|
|
58
60
|
};
|
|
61
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
|
|
62
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
63
|
+
className: (0, _runtime.ax)([styles.removeColorButton])
|
|
64
|
+
}, /*#__PURE__*/React.createElement(_new.default, {
|
|
65
|
+
shouldFitContainer: true,
|
|
66
|
+
appearance: "subtle",
|
|
67
|
+
onClick: onClick
|
|
68
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
69
|
+
className: (0, _runtime.ax)([styles.iconContainer])
|
|
70
|
+
}, /*#__PURE__*/React.createElement(_colourNone.default, {
|
|
71
|
+
size: "medium",
|
|
72
|
+
label: ""
|
|
73
|
+
}), /*#__PURE__*/React.createElement(_compiled.Text, {
|
|
74
|
+
weight: "medium"
|
|
75
|
+
}, formatMessage(_messages.highlightMessages.clearColors)))));
|
|
76
|
+
}
|
|
59
77
|
return /*#__PURE__*/React.createElement("div", {
|
|
60
78
|
className: (0, _runtime.ax)([styles.removeColorButton])
|
|
61
79
|
}, /*#__PURE__*/React.createElement(_new.default, {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
2
|
+
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
3
|
+
._zulp12x7{gap:var(--ds-space-075,6px)}._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
3
4
|
._195gv77o{margin-inline:var(--ds-space-025,2px)}
|
|
4
5
|
._1dqonqa1{border-style:solid}
|
|
5
6
|
._1h6d1l7x{border-color:var(--ds-border,#0b120e24)}
|
|
6
|
-
._19pk12x7{margin-top:var(--ds-space-075,6px)}
|
|
7
|
+
._19pk12x7{margin-top:var(--ds-space-075,6px)}
|
|
8
|
+
._1bah1h6o{justify-content:center}
|
|
9
|
+
._1e0c1txw{display:flex}
|
|
10
|
+
._4cvr1h6o{align-items:center}
|
|
@@ -8,10 +8,12 @@ import { highlightMessages as messages } from '@atlaskit/editor-common/messages'
|
|
|
8
8
|
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
|
+
import ColourNoneIcon from '@atlaskit/icon-lab/core/colour-none';
|
|
11
12
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
12
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
14
|
const styles = {
|
|
14
|
-
removeColorButton: "_2rko12b0 _195gv77o _189ee4h9 _1dqonqa1 _1h6d1l7x _19pk12x7"
|
|
15
|
+
removeColorButton: "_2rko12b0 _195gv77o _189ee4h9 _1dqonqa1 _1h6d1l7x _19pk12x7",
|
|
16
|
+
iconContainer: "_zulp12x7 _1e0c1txw _4cvr1h6o _1bah1h6o"
|
|
15
17
|
};
|
|
16
18
|
export const RemoveColorMenuItem = ({
|
|
17
19
|
api,
|
|
@@ -50,6 +52,22 @@ export const RemoveColorMenuItem = ({
|
|
|
50
52
|
closeMenu === null || closeMenu === void 0 ? void 0 : closeMenu(event);
|
|
51
53
|
}
|
|
52
54
|
};
|
|
55
|
+
if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
|
|
56
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
57
|
+
className: ax([styles.removeColorButton])
|
|
58
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
59
|
+
shouldFitContainer: true,
|
|
60
|
+
appearance: "subtle",
|
|
61
|
+
onClick: onClick
|
|
62
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
63
|
+
className: ax([styles.iconContainer])
|
|
64
|
+
}, /*#__PURE__*/React.createElement(ColourNoneIcon, {
|
|
65
|
+
size: "medium",
|
|
66
|
+
label: ""
|
|
67
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
68
|
+
weight: "medium"
|
|
69
|
+
}, formatMessage(messages.clearColors)))));
|
|
70
|
+
}
|
|
53
71
|
return /*#__PURE__*/React.createElement("div", {
|
|
54
72
|
className: ax([styles.removeColorButton])
|
|
55
73
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
2
|
+
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
3
|
+
._zulp12x7{gap:var(--ds-space-075,6px)}._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
3
4
|
._195gv77o{margin-inline:var(--ds-space-025,2px)}
|
|
4
5
|
._1dqonqa1{border-style:solid}
|
|
5
6
|
._1h6d1l7x{border-color:var(--ds-border,#0b120e24)}
|
|
6
|
-
._19pk12x7{margin-top:var(--ds-space-075,6px)}
|
|
7
|
+
._19pk12x7{margin-top:var(--ds-space-075,6px)}
|
|
8
|
+
._1bah1h6o{justify-content:center}
|
|
9
|
+
._1e0c1txw{display:flex}
|
|
10
|
+
._4cvr1h6o{align-items:center}
|
|
@@ -8,10 +8,12 @@ import { highlightMessages as messages } from '@atlaskit/editor-common/messages'
|
|
|
8
8
|
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
|
+
import ColourNoneIcon from '@atlaskit/icon-lab/core/colour-none';
|
|
11
12
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
12
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
14
|
var styles = {
|
|
14
|
-
removeColorButton: "_2rko12b0 _195gv77o _189ee4h9 _1dqonqa1 _1h6d1l7x _19pk12x7"
|
|
15
|
+
removeColorButton: "_2rko12b0 _195gv77o _189ee4h9 _1dqonqa1 _1h6d1l7x _19pk12x7",
|
|
16
|
+
iconContainer: "_zulp12x7 _1e0c1txw _4cvr1h6o _1bah1h6o"
|
|
15
17
|
};
|
|
16
18
|
export var RemoveColorMenuItem = function RemoveColorMenuItem(_ref) {
|
|
17
19
|
var api = _ref.api,
|
|
@@ -47,6 +49,22 @@ export var RemoveColorMenuItem = function RemoveColorMenuItem(_ref) {
|
|
|
47
49
|
closeMenu === null || closeMenu === void 0 || closeMenu(event);
|
|
48
50
|
}
|
|
49
51
|
};
|
|
52
|
+
if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
|
|
53
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: ax([styles.removeColorButton])
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
56
|
+
shouldFitContainer: true,
|
|
57
|
+
appearance: "subtle",
|
|
58
|
+
onClick: onClick
|
|
59
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
60
|
+
className: ax([styles.iconContainer])
|
|
61
|
+
}, /*#__PURE__*/React.createElement(ColourNoneIcon, {
|
|
62
|
+
size: "medium",
|
|
63
|
+
label: ""
|
|
64
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
65
|
+
weight: "medium"
|
|
66
|
+
}, formatMessage(messages.clearColors)))));
|
|
67
|
+
}
|
|
50
68
|
return /*#__PURE__*/React.createElement("div", {
|
|
51
69
|
className: ax([styles.removeColorButton])
|
|
52
70
|
}, /*#__PURE__*/React.createElement(Button, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.1.1",
|
|
4
4
|
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -45,16 +45,17 @@
|
|
|
45
45
|
"@atlaskit/editor-toolbar-model": "^0.5.0",
|
|
46
46
|
"@atlaskit/heading": "^5.4.0",
|
|
47
47
|
"@atlaskit/icon": "^35.4.0",
|
|
48
|
+
"@atlaskit/icon-lab": "^6.13.0",
|
|
48
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
50
|
"@atlaskit/platform-feature-flags-react": "^0.5.0",
|
|
50
51
|
"@atlaskit/primitives": "^19.0.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
52
|
-
"@atlaskit/tokens": "^13.
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^100.0.0",
|
|
53
|
+
"@atlaskit/tokens": "^13.4.0",
|
|
53
54
|
"@babel/runtime": "^7.0.0",
|
|
54
55
|
"@emotion/react": "^11.7.1"
|
|
55
56
|
},
|
|
56
57
|
"peerDependencies": {
|
|
57
|
-
"@atlaskit/editor-common": "^115.
|
|
58
|
+
"@atlaskit/editor-common": "^115.15.0",
|
|
58
59
|
"react": "^18.2.0",
|
|
59
60
|
"react-dom": "^18.2.0",
|
|
60
61
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|