@atlaskit/editor-plugin-highlight 19.0.0 → 19.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,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-highlight
|
|
2
2
|
|
|
3
|
+
## 19.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6c8c928766851`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6c8c928766851) -
|
|
8
|
+
Associate the highlight color palette's radio group with its visible "Highlight color" label
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 19.0.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 19.0.0
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -95,6 +95,7 @@ function HighlightColorMenuItem(_ref3) {
|
|
|
95
95
|
parents = _ref3.parents;
|
|
96
96
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
97
97
|
formatMessage = _useIntl.formatMessage;
|
|
98
|
+
var labelId = (0, _react.useId)();
|
|
98
99
|
var activeColor = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'highlight.activeColor');
|
|
99
100
|
var context = (0, _editorToolbar.useToolbarDropdownMenu)();
|
|
100
101
|
var _useSelectedTextColor = (0, _uiColor.useSelectedTextColor)(),
|
|
@@ -140,6 +141,7 @@ function HighlightColorMenuItem(_ref3) {
|
|
|
140
141
|
});
|
|
141
142
|
}, [defaultColor, textColor, isNewColorPaletteEnabled, selectedColor]);
|
|
142
143
|
var colorPaletteElement = /*#__PURE__*/React.createElement(_editorToolbar.ColorPalette, {
|
|
144
|
+
ariaLabelledBy: labelId,
|
|
143
145
|
cols: isNewColorPaletteEnabled ? HIGHLIGHT_COLOR_PICKER_COLUMNS : undefined,
|
|
144
146
|
gap: isNewColorPaletteEnabled && (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') ? 'space.0' : undefined
|
|
145
147
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
@@ -159,6 +161,7 @@ function HighlightColorMenuItem(_ref3) {
|
|
|
159
161
|
xcss: (0, _css.cx)(styles.container, isNewColorPaletteEnabled && (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') && styles.containerPatch),
|
|
160
162
|
testId: "highlight-color-menu-item"
|
|
161
163
|
}, /*#__PURE__*/React.createElement(_heading.default, {
|
|
164
|
+
id: labelId,
|
|
162
165
|
size: "xxsmall"
|
|
163
166
|
}, formatMessage(_messages.highlightMessages.highlight)), isNewColorPaletteEnabled && (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') ? /*#__PURE__*/React.createElement(_compiled.Bleed, {
|
|
164
167
|
inline: "space.025"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./HighlightColorMenuItem.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { useCallback, useMemo } from 'react';
|
|
5
|
+
import { useCallback, useId, useMemo } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
7
|
import { cx } from '@atlaskit/css';
|
|
8
8
|
import { highlightMessages as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -85,6 +85,7 @@ export function HighlightColorMenuItem({
|
|
|
85
85
|
const {
|
|
86
86
|
formatMessage
|
|
87
87
|
} = useIntl();
|
|
88
|
+
const labelId = useId();
|
|
88
89
|
const activeColor = useSharedPluginStateSelector(api, 'highlight.activeColor');
|
|
89
90
|
const context = useToolbarDropdownMenu();
|
|
90
91
|
const {
|
|
@@ -128,6 +129,7 @@ export function HighlightColorMenuItem({
|
|
|
128
129
|
}));
|
|
129
130
|
}, [defaultColor, textColor, isNewColorPaletteEnabled, selectedColor]);
|
|
130
131
|
const colorPaletteElement = /*#__PURE__*/React.createElement(ColorPalette, {
|
|
132
|
+
ariaLabelledBy: labelId,
|
|
131
133
|
cols: isNewColorPaletteEnabled ? HIGHLIGHT_COLOR_PICKER_COLUMNS : undefined,
|
|
132
134
|
gap: isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') ? 'space.0' : undefined
|
|
133
135
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
@@ -147,6 +149,7 @@ export function HighlightColorMenuItem({
|
|
|
147
149
|
xcss: cx(styles.container, isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') && styles.containerPatch),
|
|
148
150
|
testId: "highlight-color-menu-item"
|
|
149
151
|
}, /*#__PURE__*/React.createElement(Heading, {
|
|
152
|
+
id: labelId,
|
|
150
153
|
size: "xxsmall"
|
|
151
154
|
}, formatMessage(messages.highlight)), isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') ? /*#__PURE__*/React.createElement(Bleed, {
|
|
152
155
|
inline: "space.025"
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
-
import { useCallback, useMemo } from 'react';
|
|
8
|
+
import { useCallback, useId, useMemo } from 'react';
|
|
9
9
|
import { useIntl } from 'react-intl';
|
|
10
10
|
import { cx } from '@atlaskit/css';
|
|
11
11
|
import { highlightMessages as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -86,6 +86,7 @@ export function HighlightColorMenuItem(_ref3) {
|
|
|
86
86
|
parents = _ref3.parents;
|
|
87
87
|
var _useIntl = useIntl(),
|
|
88
88
|
formatMessage = _useIntl.formatMessage;
|
|
89
|
+
var labelId = useId();
|
|
89
90
|
var activeColor = useSharedPluginStateSelector(api, 'highlight.activeColor');
|
|
90
91
|
var context = useToolbarDropdownMenu();
|
|
91
92
|
var _useSelectedTextColor = useSelectedTextColor(),
|
|
@@ -131,6 +132,7 @@ export function HighlightColorMenuItem(_ref3) {
|
|
|
131
132
|
});
|
|
132
133
|
}, [defaultColor, textColor, isNewColorPaletteEnabled, selectedColor]);
|
|
133
134
|
var colorPaletteElement = /*#__PURE__*/React.createElement(ColorPalette, {
|
|
135
|
+
ariaLabelledBy: labelId,
|
|
134
136
|
cols: isNewColorPaletteEnabled ? HIGHLIGHT_COLOR_PICKER_COLUMNS : undefined,
|
|
135
137
|
gap: isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') ? 'space.0' : undefined
|
|
136
138
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
@@ -150,6 +152,7 @@ export function HighlightColorMenuItem(_ref3) {
|
|
|
150
152
|
xcss: cx(styles.container, isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') && styles.containerPatch),
|
|
151
153
|
testId: "highlight-color-menu-item"
|
|
152
154
|
}, /*#__PURE__*/React.createElement(Heading, {
|
|
155
|
+
id: labelId,
|
|
153
156
|
size: "xxsmall"
|
|
154
157
|
}, formatMessage(messages.highlight)), isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') ? /*#__PURE__*/React.createElement(Bleed, {
|
|
155
158
|
inline: "space.025"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-highlight",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.2",
|
|
4
4
|
"description": "Highlight plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,20 +38,20 @@
|
|
|
38
38
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
39
39
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
40
40
|
"@atlaskit/editor-tables": "^3.2.0",
|
|
41
|
-
"@atlaskit/editor-toolbar": "^2.
|
|
41
|
+
"@atlaskit/editor-toolbar": "^2.7.0",
|
|
42
42
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
43
43
|
"@atlaskit/heading": "^7.2.0",
|
|
44
44
|
"@atlaskit/icon": "^37.7.0",
|
|
45
45
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
47
47
|
"@atlaskit/primitives": "^22.5.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^200.0.0",
|
|
49
49
|
"@atlaskit/tokens": "^18.2.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@emotion/react": "^11.7.1"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@atlaskit/editor-common": "^123.
|
|
54
|
+
"@atlaskit/editor-common": "^123.1.0",
|
|
55
55
|
"react": "^18.2.0 || ^19.2.0",
|
|
56
56
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
57
57
|
},
|