@atlaskit/editor-plugin-text-color 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-text-color
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 text color palette's radio group with its visible "Text 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
@@ -46,6 +46,7 @@ function TextColorMenuItem(_ref) {
46
46
  var closeMenu = context === null || context === void 0 ? void 0 : context.closeMenu;
47
47
  var _useIntl = (0, _reactIntl.useIntl)(),
48
48
  formatMessage = _useIntl.formatMessage;
49
+ var labelId = (0, _react.useId)();
49
50
  var isNewColorPaletteEnabled = (0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true);
50
51
  var handleTextColorChange = (0, _react.useCallback)(function (color, event) {
51
52
  var _api$textColor;
@@ -60,6 +61,7 @@ function TextColorMenuItem(_ref) {
60
61
  }
61
62
  }, [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]);
62
63
  var colorPalette = /*#__PURE__*/_react.default.createElement(_editorToolbar.ColorPalette, {
64
+ ariaLabelledBy: labelId,
63
65
  cols: isNewColorPaletteEnabled ? TEXT_COLOR_PICKER_COLUMNS : undefined,
64
66
  gap: isNewColorPaletteEnabled && (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') ? 'space.0' : undefined
65
67
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
@@ -80,6 +82,7 @@ function TextColorMenuItem(_ref) {
80
82
  xcss: styles.container,
81
83
  testId: "text-color-menu-item"
82
84
  }, /*#__PURE__*/_react.default.createElement(_heading.default, {
85
+ id: labelId,
83
86
  size: "xxsmall"
84
87
  }, formatMessage(_messages.textColorMessages.textColorTooltip)), isNewColorPaletteEnabled && (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') ? /*#__PURE__*/_react.default.createElement(_compiled.Bleed, {
85
88
  inline: "space.025"
@@ -1,7 +1,7 @@
1
1
  /* TextColorMenuItem.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./TextColorMenuItem.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
- import React, { useCallback } from 'react';
4
+ import React, { useCallback, useId } from 'react';
5
5
  import { useIntl } from 'react-intl';
6
6
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
7
7
  import { textColorMessages as messages } from '@atlaskit/editor-common/messages';
@@ -41,6 +41,7 @@ export function TextColorMenuItem({
41
41
  const {
42
42
  formatMessage
43
43
  } = useIntl();
44
+ const labelId = useId();
44
45
  const isNewColorPaletteEnabled = expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true);
45
46
  const handleTextColorChange = useCallback((color, event) => {
46
47
  var _api$textColor, _api$textColor$action;
@@ -55,6 +56,7 @@ export function TextColorMenuItem({
55
56
  }
56
57
  }, [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]);
57
58
  const colorPalette = /*#__PURE__*/React.createElement(ColorPalette, {
59
+ ariaLabelledBy: labelId,
58
60
  cols: isNewColorPaletteEnabled ? TEXT_COLOR_PICKER_COLUMNS : undefined,
59
61
  gap: isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') ? 'space.0' : undefined
60
62
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
@@ -75,6 +77,7 @@ export function TextColorMenuItem({
75
77
  xcss: styles.container,
76
78
  testId: "text-color-menu-item"
77
79
  }, /*#__PURE__*/React.createElement(Heading, {
80
+ id: labelId,
78
81
  size: "xxsmall"
79
82
  }, formatMessage(messages.textColorTooltip)), isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') ? /*#__PURE__*/React.createElement(Bleed, {
80
83
  inline: "space.025"
@@ -1,7 +1,7 @@
1
1
  /* TextColorMenuItem.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./TextColorMenuItem.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
- import React, { useCallback } from 'react';
4
+ import React, { useCallback, useId } from 'react';
5
5
  import { useIntl } from 'react-intl';
6
6
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
7
7
  import { textColorMessages as messages } from '@atlaskit/editor-common/messages';
@@ -37,6 +37,7 @@ export function TextColorMenuItem(_ref) {
37
37
  var closeMenu = context === null || context === void 0 ? void 0 : context.closeMenu;
38
38
  var _useIntl = useIntl(),
39
39
  formatMessage = _useIntl.formatMessage;
40
+ var labelId = useId();
40
41
  var isNewColorPaletteEnabled = expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true);
41
42
  var handleTextColorChange = useCallback(function (color, event) {
42
43
  var _api$textColor;
@@ -51,6 +52,7 @@ export function TextColorMenuItem(_ref) {
51
52
  }
52
53
  }, [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]);
53
54
  var colorPalette = /*#__PURE__*/React.createElement(ColorPalette, {
55
+ ariaLabelledBy: labelId,
54
56
  cols: isNewColorPaletteEnabled ? TEXT_COLOR_PICKER_COLUMNS : undefined,
55
57
  gap: isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') ? 'space.0' : undefined
56
58
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
@@ -71,6 +73,7 @@ export function TextColorMenuItem(_ref) {
71
73
  xcss: styles.container,
72
74
  testId: "text-color-menu-item"
73
75
  }, /*#__PURE__*/React.createElement(Heading, {
76
+ id: labelId,
74
77
  size: "xxsmall"
75
78
  }, formatMessage(messages.textColorTooltip)), isNewColorPaletteEnabled && fg('platform_editor_lovability_text_bg_color_patch_1') ? /*#__PURE__*/React.createElement(Bleed, {
76
79
  inline: "space.025"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-color",
3
- "version": "19.0.0",
3
+ "version": "19.0.2",
4
4
  "description": "Text color plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  "@atlaskit/editor-plugin-toolbar": "^16.0.0",
39
39
  "@atlaskit/editor-prosemirror": "^9.0.0",
40
40
  "@atlaskit/editor-shared-styles": "^4.3.0",
41
- "@atlaskit/editor-toolbar": "^2.6.0",
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",
@@ -47,13 +47,13 @@
47
47
  "@atlaskit/platform-feature-flags": "^2.2.0",
48
48
  "@atlaskit/platform-feature-flags-react": "^1.2.0",
49
49
  "@atlaskit/primitives": "^22.5.0",
50
- "@atlaskit/tmp-editor-statsig": "^199.0.0",
50
+ "@atlaskit/tmp-editor-statsig": "^200.0.0",
51
51
  "@atlaskit/tokens": "^18.2.0",
52
52
  "@babel/runtime": "^7.0.0",
53
53
  "@emotion/react": "^11.7.1"
54
54
  },
55
55
  "peerDependencies": {
56
- "@atlaskit/editor-common": "^123.0.0",
56
+ "@atlaskit/editor-common": "^123.1.0",
57
57
  "react": "^18.2.0 || ^19.2.0",
58
58
  "react-dom": "^18.2.0 || ^19.2.0",
59
59
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"