@atlaskit/editor-common 78.3.2 → 78.4.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 78.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#75400](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/75400) [`6b582c433397`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6b582c433397) - Fixed the margin for the action item inside the panel
8
+ Moved the panel test-cases from editor-plugin-context-panel-tests to editor-plugin-panel-tests
9
+
10
+ ## 78.4.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [#70153](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70153) [`3a34e7545f18`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3a34e7545f18) - ECA11Y-36: Flaoting toolbar group buttons into radiogroup buttons structure
15
+
3
16
  ## 78.3.2
4
17
 
5
18
  ### Patch Changes
@@ -60,5 +60,10 @@ var linkToolbarMessages = exports.linkToolbarMessages = (0, _reactIntlNext.defin
60
60
  id: 'fabric.editor.edit.datasource',
61
61
  defaultMessage: 'Edit search query',
62
62
  description: 'Datasource toolbar edit button'
63
+ },
64
+ searchInput: {
65
+ id: 'fabric.editor.edit.searchInput',
66
+ defaultMessage: 'Add a link',
67
+ description: 'Label for the search media input'
63
68
  }
64
69
  });
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "78.3.2";
19
+ var packageVersion = "78.4.1";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // TODO: Sanitise the URL instead of just removing it
@@ -9,9 +9,10 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
9
9
  var _react = require("@emotion/react");
10
10
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
11
11
  var _templateObject;
12
+ /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression */
12
13
  var TaskDecisionSharedCssClassName = exports.TaskDecisionSharedCssClassName = {
13
14
  DECISION_CONTAINER: 'decisionItemView-content-wrap',
14
15
  TASK_CONTAINER: 'taskItemView-content-wrap',
15
16
  TASK_ITEM: 'task-item'
16
17
  };
17
- var tasksAndDecisionsStyles = exports.tasksAndDecisionsStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n .taskItemView-content-wrap,\n .", " {\n position: relative;\n min-width: ", "px;\n }\n\n .", " {\n margin-top: 0;\n }\n\n .", " {\n span[contenteditable='false'] {\n height: ", "em;\n }\n }\n\n .", " {\n line-height: ", ";\n }\n }\n\n div[data-task-local-id] {\n span[contenteditable='false'] {\n height: ", "em;\n }\n span[contenteditable='false'] + div {\n line-height: ", "em;\n }\n }\n\n div[data-task-list-local-id] {\n margin: ", " 0 0 0;\n }\n\n div[data-task-list-local-id] {\n // If task item is not first in the list then set margin top to 4px.\n div + div {\n margin-top: ", ";\n }\n }\n\n // If task list is not first in the document then set margin top to 4px.\n div[data-task-list-local-id] div[data-task-list-local-id] {\n margin-top: ", ";\n margin-left: ", ";\n }\n"])), TaskDecisionSharedCssClassName.DECISION_CONTAINER, _editorSharedStyles.akEditorTableCellMinWidth, TaskDecisionSharedCssClassName.DECISION_CONTAINER, TaskDecisionSharedCssClassName.TASK_CONTAINER, _editorSharedStyles.akEditorLineHeight, TaskDecisionSharedCssClassName.TASK_ITEM, _editorSharedStyles.akEditorLineHeight, _editorSharedStyles.akEditorLineHeight, _editorSharedStyles.akEditorLineHeight, "var(--ds-space-150, 12px)", "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)", "var(--ds-space-300, 24px)");
18
+ var tasksAndDecisionsStyles = exports.tasksAndDecisionsStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n .taskItemView-content-wrap,\n .", " {\n position: relative;\n min-width: ", "px;\n }\n\n .", " {\n margin-top: 0;\n }\n\n .", " {\n span[contenteditable='false'] {\n height: ", "em;\n }\n }\n\n .", " {\n line-height: ", ";\n }\n }\n\n div[data-task-local-id] {\n span[contenteditable='false'] {\n height: ", "em;\n }\n span[contenteditable='false'] + div {\n line-height: ", "em;\n }\n }\n\n div[data-task-list-local-id] {\n margin: ", " 0 0 0;\n }\n\n div[data-task-list-local-id] {\n // If task item is not first in the list then set margin top to 4px.\n div + div {\n margin-top: ", ";\n }\n }\n\n // If task list is not first in the document then set margin top to 4px.\n div[data-task-list-local-id] div[data-task-list-local-id] {\n margin-top: ", ";\n margin-left: ", ";\n }\n\n /* When action list is inside panel */\n .ak-editor-panel__content {\n > div[data-task-list-local-id]:first-child {\n margin: 0 0 0 0 !important;\n }\n }\n"])), TaskDecisionSharedCssClassName.DECISION_CONTAINER, _editorSharedStyles.akEditorTableCellMinWidth, TaskDecisionSharedCssClassName.DECISION_CONTAINER, TaskDecisionSharedCssClassName.TASK_CONTAINER, _editorSharedStyles.akEditorLineHeight, TaskDecisionSharedCssClassName.TASK_ITEM, _editorSharedStyles.akEditorLineHeight, _editorSharedStyles.akEditorLineHeight, _editorSharedStyles.akEditorLineHeight, "var(--ds-space-150, 12px)", "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)", "var(--ds-space-300, 24px)");
@@ -22,7 +22,7 @@ var _templateObject, _templateObject2, _templateObject3;
22
22
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
23
23
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
24
24
  var packageName = "@atlaskit/editor-common";
25
- var packageVersion = "78.3.2";
25
+ var packageVersion = "78.4.1";
26
26
  var halfFocusRing = 1;
27
27
  var dropOffset = '0, 8';
28
28
  var DropList = /*#__PURE__*/function (_Component) {
@@ -9,6 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
13
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
13
14
  var _styles = require("./styles");
14
15
  var _excluded = ["buttonStyles"];
@@ -39,10 +40,16 @@ var _default = exports.default = function _default(_ref) {
39
40
  ariaHasPopup = _ref.ariaHasPopup,
40
41
  tabIndex = _ref.tabIndex,
41
42
  areaControls = _ref.areaControls,
42
- ariaLabel = _ref.ariaLabel;
43
+ ariaLabel = _ref.ariaLabel,
44
+ isRadioButton = _ref.isRadioButton;
43
45
  // Check if there's only an icon and add additional styles
44
46
  var iconOnly = (icon || iconAfter) && !children;
45
47
  var customSpacing = iconOnly ? _styles.iconOnlySpacing : {};
48
+ var isButtonPressed = ariaHasPopup ? undefined : selected;
49
+ var ariaChecked = isRadioButton ? isButtonPressed : undefined;
50
+ var ariaCheckedWithFF = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-floating-toolbar-markup_vexmo') ? ariaChecked : undefined;
51
+ var ariaPressed = isRadioButton ? undefined : isButtonPressed;
52
+ var ariaPressedWithFF = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-floating-toolbar-markup_vexmo') ? ariaPressed : isButtonPressed;
46
53
  return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
47
54
  content: tooltipContent || title,
48
55
  hideTooltipOnClick: hideTooltipOnClick,
@@ -65,7 +72,9 @@ var _default = exports.default = function _default(_ref) {
65
72
  }, rest);
66
73
  },
67
74
  "aria-label": ariaLabel || title,
68
- "aria-pressed": !ariaHasPopup ? selected : undefined,
75
+ "aria-pressed": ariaPressedWithFF,
76
+ "aria-checked": ariaCheckedWithFF,
77
+ role: isRadioButton ? 'radio' : undefined,
69
78
  "aria-expanded": ariaHasPopup ? selected : undefined,
70
79
  "aria-controls": ariaHasPopup ? areaControls : undefined,
71
80
  spacing: 'compact',
@@ -54,5 +54,10 @@ export const linkToolbarMessages = defineMessages({
54
54
  id: 'fabric.editor.edit.datasource',
55
55
  defaultMessage: 'Edit search query',
56
56
  description: 'Datasource toolbar edit button'
57
+ },
58
+ searchInput: {
59
+ id: 'fabric.editor.edit.searchInput',
60
+ defaultMessage: 'Add a link',
61
+ description: 'Label for the search media input'
57
62
  }
58
63
  });
@@ -1,6 +1,6 @@
1
1
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
2
2
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
3
- const packageVersion = "78.3.2";
3
+ const packageVersion = "78.4.1";
4
4
  const sanitiseSentryEvents = (data, _hint) => {
5
5
  // Remove URL as it has UGC
6
6
  // TODO: Sanitise the URL instead of just removing it
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression */
1
2
  import { css } from '@emotion/react';
2
3
  import { akEditorLineHeight, akEditorTableCellMinWidth } from '@atlaskit/editor-shared-styles';
3
4
  export const TaskDecisionSharedCssClassName = {
@@ -53,4 +54,11 @@ export const tasksAndDecisionsStyles = css`
53
54
  margin-top: ${"var(--ds-space-050, 4px)"};
54
55
  margin-left: ${"var(--ds-space-300, 24px)"};
55
56
  }
57
+
58
+ /* When action list is inside panel */
59
+ .ak-editor-panel__content {
60
+ > div[data-task-list-local-id]:first-child {
61
+ margin: 0 0 0 0 !important;
62
+ }
63
+ }
56
64
  `;
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
7
7
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
8
8
  import Layer from '../Layer';
9
9
  const packageName = "@atlaskit/editor-common";
10
- const packageVersion = "78.3.2";
10
+ const packageVersion = "78.4.1";
11
11
  const halfFocusRing = 1;
12
12
  const dropOffset = '0, 8';
13
13
  class DropList extends Component {
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import Button from '@atlaskit/button/custom-theme-button';
3
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
4
  import Tooltip from '@atlaskit/tooltip';
4
5
  import { getButtonStyles, iconOnlySpacing } from './styles';
5
6
  export default (({
@@ -25,11 +26,17 @@ export default (({
25
26
  ariaHasPopup,
26
27
  tabIndex,
27
28
  areaControls,
28
- ariaLabel
29
+ ariaLabel,
30
+ isRadioButton
29
31
  }) => {
30
32
  // Check if there's only an icon and add additional styles
31
33
  const iconOnly = (icon || iconAfter) && !children;
32
34
  const customSpacing = iconOnly ? iconOnlySpacing : {};
35
+ const isButtonPressed = ariaHasPopup ? undefined : selected;
36
+ const ariaChecked = isRadioButton ? isButtonPressed : undefined;
37
+ const ariaCheckedWithFF = getBooleanFF('platform.editor.a11y-floating-toolbar-markup_vexmo') ? ariaChecked : undefined;
38
+ const ariaPressed = isRadioButton ? undefined : isButtonPressed;
39
+ const ariaPressedWithFF = getBooleanFF('platform.editor.a11y-floating-toolbar-markup_vexmo') ? ariaPressed : isButtonPressed;
33
40
  return /*#__PURE__*/React.createElement(Tooltip, {
34
41
  content: tooltipContent || title,
35
42
  hideTooltipOnClick: hideTooltipOnClick,
@@ -58,7 +65,9 @@ export default (({
58
65
  };
59
66
  },
60
67
  "aria-label": ariaLabel || title,
61
- "aria-pressed": !ariaHasPopup ? selected : undefined,
68
+ "aria-pressed": ariaPressedWithFF,
69
+ "aria-checked": ariaCheckedWithFF,
70
+ role: isRadioButton ? 'radio' : undefined,
62
71
  "aria-expanded": ariaHasPopup ? selected : undefined,
63
72
  "aria-controls": ariaHasPopup ? areaControls : undefined,
64
73
  spacing: 'compact',
@@ -54,5 +54,10 @@ export var linkToolbarMessages = defineMessages({
54
54
  id: 'fabric.editor.edit.datasource',
55
55
  defaultMessage: 'Edit search query',
56
56
  description: 'Datasource toolbar edit button'
57
+ },
58
+ searchInput: {
59
+ id: 'fabric.editor.edit.searchInput',
60
+ defaultMessage: 'Add a link',
61
+ description: 'Label for the search media input'
57
62
  }
58
63
  });
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
6
6
  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; }
7
7
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
8
8
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
9
- var packageVersion = "78.3.2";
9
+ var packageVersion = "78.4.1";
10
10
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
11
11
  // Remove URL as it has UGC
12
12
  // TODO: Sanitise the URL instead of just removing it
@@ -1,5 +1,6 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  var _templateObject;
3
+ /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression */
3
4
  import { css } from '@emotion/react';
4
5
  import { akEditorLineHeight, akEditorTableCellMinWidth } from '@atlaskit/editor-shared-styles';
5
6
  export var TaskDecisionSharedCssClassName = {
@@ -7,4 +8,4 @@ export var TaskDecisionSharedCssClassName = {
7
8
  TASK_CONTAINER: 'taskItemView-content-wrap',
8
9
  TASK_ITEM: 'task-item'
9
10
  };
10
- export var tasksAndDecisionsStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n .taskItemView-content-wrap,\n .", " {\n position: relative;\n min-width: ", "px;\n }\n\n .", " {\n margin-top: 0;\n }\n\n .", " {\n span[contenteditable='false'] {\n height: ", "em;\n }\n }\n\n .", " {\n line-height: ", ";\n }\n }\n\n div[data-task-local-id] {\n span[contenteditable='false'] {\n height: ", "em;\n }\n span[contenteditable='false'] + div {\n line-height: ", "em;\n }\n }\n\n div[data-task-list-local-id] {\n margin: ", " 0 0 0;\n }\n\n div[data-task-list-local-id] {\n // If task item is not first in the list then set margin top to 4px.\n div + div {\n margin-top: ", ";\n }\n }\n\n // If task list is not first in the document then set margin top to 4px.\n div[data-task-list-local-id] div[data-task-list-local-id] {\n margin-top: ", ";\n margin-left: ", ";\n }\n"])), TaskDecisionSharedCssClassName.DECISION_CONTAINER, akEditorTableCellMinWidth, TaskDecisionSharedCssClassName.DECISION_CONTAINER, TaskDecisionSharedCssClassName.TASK_CONTAINER, akEditorLineHeight, TaskDecisionSharedCssClassName.TASK_ITEM, akEditorLineHeight, akEditorLineHeight, akEditorLineHeight, "var(--ds-space-150, 12px)", "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)", "var(--ds-space-300, 24px)");
11
+ export var tasksAndDecisionsStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n .taskItemView-content-wrap,\n .", " {\n position: relative;\n min-width: ", "px;\n }\n\n .", " {\n margin-top: 0;\n }\n\n .", " {\n span[contenteditable='false'] {\n height: ", "em;\n }\n }\n\n .", " {\n line-height: ", ";\n }\n }\n\n div[data-task-local-id] {\n span[contenteditable='false'] {\n height: ", "em;\n }\n span[contenteditable='false'] + div {\n line-height: ", "em;\n }\n }\n\n div[data-task-list-local-id] {\n margin: ", " 0 0 0;\n }\n\n div[data-task-list-local-id] {\n // If task item is not first in the list then set margin top to 4px.\n div + div {\n margin-top: ", ";\n }\n }\n\n // If task list is not first in the document then set margin top to 4px.\n div[data-task-list-local-id] div[data-task-list-local-id] {\n margin-top: ", ";\n margin-left: ", ";\n }\n\n /* When action list is inside panel */\n .ak-editor-panel__content {\n > div[data-task-list-local-id]:first-child {\n margin: 0 0 0 0 !important;\n }\n }\n"])), TaskDecisionSharedCssClassName.DECISION_CONTAINER, akEditorTableCellMinWidth, TaskDecisionSharedCssClassName.DECISION_CONTAINER, TaskDecisionSharedCssClassName.TASK_CONTAINER, akEditorLineHeight, TaskDecisionSharedCssClassName.TASK_ITEM, akEditorLineHeight, akEditorLineHeight, akEditorLineHeight, "var(--ds-space-150, 12px)", "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)", "var(--ds-space-300, 24px)");
@@ -17,7 +17,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
17
17
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
18
18
  import Layer from '../Layer';
19
19
  var packageName = "@atlaskit/editor-common";
20
- var packageVersion = "78.3.2";
20
+ var packageVersion = "78.4.1";
21
21
  var halfFocusRing = 1;
22
22
  var dropOffset = '0, 8';
23
23
  var DropList = /*#__PURE__*/function (_Component) {
@@ -5,6 +5,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
5
5
  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; }
6
6
  import React from 'react';
7
7
  import Button from '@atlaskit/button/custom-theme-button';
8
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
9
  import Tooltip from '@atlaskit/tooltip';
9
10
  import { getButtonStyles, iconOnlySpacing } from './styles';
10
11
  export default (function (_ref) {
@@ -32,10 +33,16 @@ export default (function (_ref) {
32
33
  ariaHasPopup = _ref.ariaHasPopup,
33
34
  tabIndex = _ref.tabIndex,
34
35
  areaControls = _ref.areaControls,
35
- ariaLabel = _ref.ariaLabel;
36
+ ariaLabel = _ref.ariaLabel,
37
+ isRadioButton = _ref.isRadioButton;
36
38
  // Check if there's only an icon and add additional styles
37
39
  var iconOnly = (icon || iconAfter) && !children;
38
40
  var customSpacing = iconOnly ? iconOnlySpacing : {};
41
+ var isButtonPressed = ariaHasPopup ? undefined : selected;
42
+ var ariaChecked = isRadioButton ? isButtonPressed : undefined;
43
+ var ariaCheckedWithFF = getBooleanFF('platform.editor.a11y-floating-toolbar-markup_vexmo') ? ariaChecked : undefined;
44
+ var ariaPressed = isRadioButton ? undefined : isButtonPressed;
45
+ var ariaPressedWithFF = getBooleanFF('platform.editor.a11y-floating-toolbar-markup_vexmo') ? ariaPressed : isButtonPressed;
39
46
  return /*#__PURE__*/React.createElement(Tooltip, {
40
47
  content: tooltipContent || title,
41
48
  hideTooltipOnClick: hideTooltipOnClick,
@@ -58,7 +65,9 @@ export default (function (_ref) {
58
65
  }, rest);
59
66
  },
60
67
  "aria-label": ariaLabel || title,
61
- "aria-pressed": !ariaHasPopup ? selected : undefined,
68
+ "aria-pressed": ariaPressedWithFF,
69
+ "aria-checked": ariaCheckedWithFF,
70
+ role: isRadioButton ? 'radio' : undefined,
62
71
  "aria-expanded": ariaHasPopup ? selected : undefined,
63
72
  "aria-controls": ariaHasPopup ? areaControls : undefined,
64
73
  spacing: 'compact',
@@ -54,4 +54,9 @@ export declare const linkToolbarMessages: {
54
54
  defaultMessage: string;
55
55
  description: string;
56
56
  };
57
+ searchInput: {
58
+ id: string;
59
+ defaultMessage: string;
60
+ description: string;
61
+ };
57
62
  };
@@ -92,6 +92,7 @@ export type FloatingToolbarCopyButton = {
92
92
  export type FloatingToolbarButton<T extends {}> = {
93
93
  id?: string;
94
94
  type: 'button';
95
+ isRadioButton?: boolean;
95
96
  title: string;
96
97
  onClick: T;
97
98
  showTitle?: boolean;
@@ -25,6 +25,7 @@ export interface Props {
25
25
  hideTooltipOnClick?: boolean;
26
26
  tabIndex?: number | null | undefined;
27
27
  areaControls?: string;
28
+ isRadioButton?: boolean;
28
29
  }
29
- declare const _default: ({ title, icon, iconAfter, onClick, onKeyDown, onMouseEnter, onMouseLeave, onFocus, onBlur, selected, disabled, href, target, appearance, children, className, tooltipContent, testId, hideTooltipOnClick, ariaHasPopup, tabIndex, areaControls, ariaLabel, }: Props) => JSX.Element;
30
+ declare const _default: ({ title, icon, iconAfter, onClick, onKeyDown, onMouseEnter, onMouseLeave, onFocus, onBlur, selected, disabled, href, target, appearance, children, className, tooltipContent, testId, hideTooltipOnClick, ariaHasPopup, tabIndex, areaControls, ariaLabel, isRadioButton, }: Props) => JSX.Element;
30
31
  export default _default;
@@ -54,4 +54,9 @@ export declare const linkToolbarMessages: {
54
54
  defaultMessage: string;
55
55
  description: string;
56
56
  };
57
+ searchInput: {
58
+ id: string;
59
+ defaultMessage: string;
60
+ description: string;
61
+ };
57
62
  };
@@ -92,6 +92,7 @@ export type FloatingToolbarCopyButton = {
92
92
  export type FloatingToolbarButton<T extends {}> = {
93
93
  id?: string;
94
94
  type: 'button';
95
+ isRadioButton?: boolean;
95
96
  title: string;
96
97
  onClick: T;
97
98
  showTitle?: boolean;
@@ -25,6 +25,7 @@ export interface Props {
25
25
  hideTooltipOnClick?: boolean;
26
26
  tabIndex?: number | null | undefined;
27
27
  areaControls?: string;
28
+ isRadioButton?: boolean;
28
29
  }
29
- declare const _default: ({ title, icon, iconAfter, onClick, onKeyDown, onMouseEnter, onMouseLeave, onFocus, onBlur, selected, disabled, href, target, appearance, children, className, tooltipContent, testId, hideTooltipOnClick, ariaHasPopup, tabIndex, areaControls, ariaLabel, }: Props) => JSX.Element;
30
+ declare const _default: ({ title, icon, iconAfter, onClick, onKeyDown, onMouseEnter, onMouseLeave, onFocus, onBlur, selected, disabled, href, target, appearance, children, className, tooltipContent, testId, hideTooltipOnClick, ariaHasPopup, tabIndex, areaControls, ariaLabel, isRadioButton, }: Props) => JSX.Element;
30
31
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "78.3.2",
3
+ "version": "78.4.1",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -108,7 +108,7 @@
108
108
  "@atlaskit/editor-shared-styles": "^2.9.0",
109
109
  "@atlaskit/editor-tables": "^2.5.0",
110
110
  "@atlaskit/emoji": "^67.6.0",
111
- "@atlaskit/icon": "^22.0.0",
111
+ "@atlaskit/icon": "^22.1.0",
112
112
  "@atlaskit/icon-object": "^6.3.0",
113
113
  "@atlaskit/in-product-testing": "^0.2.0",
114
114
  "@atlaskit/link-datasource": "^1.22.0",
@@ -225,6 +225,9 @@
225
225
  },
226
226
  "platform.editor.ordered-list-auto-join-improvements_mrlv5": {
227
227
  "type": "boolean"
228
+ },
229
+ "platform.editor.a11y-floating-toolbar-markup_vexmo": {
230
+ "type": "boolean"
228
231
  }
229
232
  }
230
233
  }