@atlaskit/editor-toolbar 2.8.5 → 2.8.7

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,27 @@
1
1
  # @atlaskit/editor-toolbar
2
2
 
3
+ ## 2.8.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6728bb1f412c2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6728bb1f412c2) -
8
+ Remove the unused `platform_editor_toolbar_aifc` experiment registration and temporary-only
9
+ runtime branches, preserve toolbar treatments owned by `platform_editor_ai_aifc_streaming` or
10
+ `aifc_create_enabled`, retain the control experience when those checks are disabled, and correctly
11
+ hide decorative Rovo toolbar icons from assistive technology.
12
+ - Updated dependencies
13
+
14
+ ## 2.8.6
15
+
16
+ ### Patch Changes
17
+
18
+ - [`a4fe8636fa0ec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a4fe8636fa0ec) -
19
+ Clean up the fully rolled out `platform_editor_layout_column_menu` experiment and the
20
+ `platform_editor_layout_column_menu_kill_switch_1` feature gate, retaining their shipped behavior.
21
+ Consumers must remove any direct `@atlaskit/tmp-editor-statsig` experiment override for
22
+ `platform_editor_layout_column_menu`.
23
+ - Updated dependencies
24
+
3
25
  ## 2.8.5
4
26
 
5
27
  ### Patch Changes
@@ -17,7 +17,6 @@ var _css = require("@atlaskit/css");
17
17
  var _dropdownMenuItem = _interopRequireDefault(require("@atlaskit/dropdown-menu/dropdown-menu-item"));
18
18
  var _fg = require("@atlaskit/platform-feature-flags/fg");
19
19
  var _compiled = require("@atlaskit/primitives/compiled");
20
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
21
20
  var _ToolbarDropdownMenuContext = require("./ToolbarDropdownMenuContext");
22
21
  var _excluded = ["children", "data-testid", "aria-haspopup", "aria-disabled", "aria-pressed", "aria-keyshortcuts", "onClick", "onBlur", "onFocus", "onMouseEnter", "onMouseLeave", "tabIndex", "href", "target", "rel", "title", "itemRole"],
23
22
  _excluded2 = ["onClick", "onBlur", "onFocus", "onMouseEnter", "onMouseLeave", "elemBefore", "elemAfter", "elemAfterText", "isSelected", "children", "isDisabled", "hasNestedDropdownMenu", "triggerRef", "title", "shouldTitleWrap", "testId", "ariaKeyshortcuts", "href", "target", "rel", "role"];
@@ -49,7 +48,7 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/(0, _react.forwardRef)(function
49
48
  dataExtensionItemKey = _ref['data-extension-item-key'],
50
49
  itemRole = _ref.itemRole;
51
50
  return /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
52
- role: (0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' : 'menuitem',
51
+ role: itemRole || 'menuitem',
53
52
  testId: testId,
54
53
  xcss: (0, _css.cx)(styles.toolbarDropdownItem, ariaDisabled ? styles.disabled : ariaPressed ? styles.selected : styles.enabled),
55
54
  onClick: onClick,
@@ -60,7 +59,7 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/(0, _react.forwardRef)(function
60
59
  tabIndex: tabIndex,
61
60
  "aria-haspopup": ariaHasPopup,
62
61
  "aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined,
63
- "aria-checked": (0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined,
62
+ "aria-checked": itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox' ? ariaPressed : undefined,
64
63
  "aria-disabled": ariaDisabled,
65
64
  "aria-keyshortcuts": ariaKeyshortcuts,
66
65
  "data-toolbar-component": "menu-item",
@@ -89,7 +88,7 @@ var CustomDropdownMenuItemAnchor = /*#__PURE__*/(0, _react.forwardRef)(function
89
88
  itemRole = _ref2.itemRole,
90
89
  dataAttributes = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
91
90
  return /*#__PURE__*/_react.default.createElement(_compiled.Anchor, (0, _extends2.default)({
92
- role: (0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' : 'menuitem',
91
+ role: itemRole || 'menuitem',
93
92
  testId: testId,
94
93
  xcss: (0, _css.cx)(styles.toolbarDropdownItem, styles.anchor, ariaDisabled ? styles.disabled : ariaPressed ? styles.selected : styles.enabled),
95
94
  onClick: onClick,
@@ -100,7 +99,7 @@ var CustomDropdownMenuItemAnchor = /*#__PURE__*/(0, _react.forwardRef)(function
100
99
  tabIndex: tabIndex,
101
100
  "aria-haspopup": ariaHasPopup,
102
101
  "aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined,
103
- "aria-checked": (0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined,
102
+ "aria-checked": itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox' ? ariaPressed : undefined,
104
103
  "aria-disabled": ariaDisabled,
105
104
  "aria-keyshortcuts": ariaKeyshortcuts,
106
105
  "data-toolbar-component": "menu-item",
@@ -17,9 +17,11 @@ var ROVO_SVG_PATH = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=
17
17
  var RovoLogoSVG = function RovoLogoSVG(_ref) {
18
18
  var label = _ref.label,
19
19
  testId = _ref.testId;
20
+ var isDecorative = label === '';
20
21
  return /*#__PURE__*/React.createElement("span", {
21
- role: "img",
22
- "aria-label": label,
22
+ role: isDecorative ? undefined : 'img',
23
+ "aria-label": isDecorative ? undefined : label,
24
+ "aria-hidden": isDecorative ? true : undefined,
23
25
  "data-testid": testId
24
26
  // eslint-disable-next-line react/no-danger
25
27
  ,
@@ -7,7 +7,6 @@ import { cx } from '@atlaskit/css';
7
7
  import DropdownItem from '@atlaskit/dropdown-menu/dropdown-menu-item';
8
8
  import { fg } from '@atlaskit/platform-feature-flags/fg';
9
9
  import { Anchor, Box, Pressable } from '@atlaskit/primitives/compiled';
10
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
10
  import { useToolbarDropdownMenu } from './ToolbarDropdownMenuContext';
12
11
  const styles = {
13
12
  toolbarDropdownItem: "_11c8fhey _18zrutpp _1rjc1b66 _1e0c1txw _kqswh2mm _bfhksm61 _1bsb1osq _1tkezwfg _1ul9eoa3 _syazazsu _1bas12b0 _1ah31i6y",
@@ -34,7 +33,7 @@ const CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(({
34
33
  'data-extension-item-key': dataExtensionItemKey,
35
34
  itemRole
36
35
  }, ref) => /*#__PURE__*/React.createElement(Pressable, {
37
- role: expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' : 'menuitem',
36
+ role: itemRole || 'menuitem',
38
37
  testId: testId,
39
38
  xcss: cx(styles.toolbarDropdownItem, ariaDisabled ? styles.disabled : ariaPressed ? styles.selected : styles.enabled),
40
39
  onClick: onClick,
@@ -45,7 +44,7 @@ const CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(({
45
44
  tabIndex: tabIndex,
46
45
  "aria-haspopup": ariaHasPopup,
47
46
  "aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined,
48
- "aria-checked": expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined,
47
+ "aria-checked": itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox' ? ariaPressed : undefined,
49
48
  "aria-disabled": ariaDisabled,
50
49
  "aria-keyshortcuts": ariaKeyshortcuts,
51
50
  "data-toolbar-component": "menu-item",
@@ -73,7 +72,7 @@ const CustomDropdownMenuItemAnchor = /*#__PURE__*/forwardRef(({
73
72
  itemRole,
74
73
  ...dataAttributes
75
74
  }, ref) => /*#__PURE__*/React.createElement(Anchor, _extends({
76
- role: expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' : 'menuitem',
75
+ role: itemRole || 'menuitem',
77
76
  testId: testId,
78
77
  xcss: cx(styles.toolbarDropdownItem, styles.anchor, ariaDisabled ? styles.disabled : ariaPressed ? styles.selected : styles.enabled),
79
78
  onClick: onClick,
@@ -84,7 +83,7 @@ const CustomDropdownMenuItemAnchor = /*#__PURE__*/forwardRef(({
84
83
  tabIndex: tabIndex,
85
84
  "aria-haspopup": ariaHasPopup,
86
85
  "aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined,
87
- "aria-checked": expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined,
86
+ "aria-checked": itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox' ? ariaPressed : undefined,
88
87
  "aria-disabled": ariaDisabled,
89
88
  "aria-keyshortcuts": ariaKeyshortcuts,
90
89
  "data-toolbar-component": "menu-item",
@@ -16,17 +16,21 @@ const ROVO_SVG_PATH = `<svg width="12" height="12" viewBox="0 0 12 12" fill="non
16
16
  const RovoLogoSVG = ({
17
17
  label,
18
18
  testId
19
- }) => /*#__PURE__*/React.createElement("span", {
20
- role: "img",
21
- "aria-label": label,
22
- "data-testid": testId
23
- // eslint-disable-next-line react/no-danger
24
- ,
25
- dangerouslySetInnerHTML: {
26
- __html: ROVO_SVG_PATH
27
- },
28
- className: ax([styles.container])
29
- });
19
+ }) => {
20
+ const isDecorative = label === '';
21
+ return /*#__PURE__*/React.createElement("span", {
22
+ role: isDecorative ? undefined : 'img',
23
+ "aria-label": isDecorative ? undefined : label,
24
+ "aria-hidden": isDecorative ? true : undefined,
25
+ "data-testid": testId
26
+ // eslint-disable-next-line react/no-danger
27
+ ,
28
+ dangerouslySetInnerHTML: {
29
+ __html: ROVO_SVG_PATH
30
+ },
31
+ className: ax([styles.container])
32
+ });
33
+ };
30
34
  export const AIChatIcon = ({
31
35
  label,
32
36
  testId
@@ -13,7 +13,6 @@ import { cx } from '@atlaskit/css';
13
13
  import DropdownItem from '@atlaskit/dropdown-menu/dropdown-menu-item';
14
14
  import { fg } from '@atlaskit/platform-feature-flags/fg';
15
15
  import { Anchor, Box, Pressable } from '@atlaskit/primitives/compiled';
16
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
17
16
  import { useToolbarDropdownMenu } from './ToolbarDropdownMenuContext';
18
17
  var styles = {
19
18
  toolbarDropdownItem: "_11c8fhey _18zrutpp _1rjc1b66 _1e0c1txw _kqswh2mm _bfhksm61 _1bsb1osq _1tkezwfg _1ul9eoa3 _syazazsu _1bas12b0 _1ah31i6y",
@@ -40,7 +39,7 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(function (_ref, ref)
40
39
  dataExtensionItemKey = _ref['data-extension-item-key'],
41
40
  itemRole = _ref.itemRole;
42
41
  return /*#__PURE__*/React.createElement(Pressable, {
43
- role: expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' : 'menuitem',
42
+ role: itemRole || 'menuitem',
44
43
  testId: testId,
45
44
  xcss: cx(styles.toolbarDropdownItem, ariaDisabled ? styles.disabled : ariaPressed ? styles.selected : styles.enabled),
46
45
  onClick: onClick,
@@ -51,7 +50,7 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(function (_ref, ref)
51
50
  tabIndex: tabIndex,
52
51
  "aria-haspopup": ariaHasPopup,
53
52
  "aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined,
54
- "aria-checked": expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined,
53
+ "aria-checked": itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox' ? ariaPressed : undefined,
55
54
  "aria-disabled": ariaDisabled,
56
55
  "aria-keyshortcuts": ariaKeyshortcuts,
57
56
  "data-toolbar-component": "menu-item",
@@ -80,7 +79,7 @@ var CustomDropdownMenuItemAnchor = /*#__PURE__*/forwardRef(function (_ref2, ref)
80
79
  itemRole = _ref2.itemRole,
81
80
  dataAttributes = _objectWithoutProperties(_ref2, _excluded);
82
81
  return /*#__PURE__*/React.createElement(Anchor, _extends({
83
- role: expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' : 'menuitem',
82
+ role: itemRole || 'menuitem',
84
83
  testId: testId,
85
84
  xcss: cx(styles.toolbarDropdownItem, styles.anchor, ariaDisabled ? styles.disabled : ariaPressed ? styles.selected : styles.enabled),
86
85
  onClick: onClick,
@@ -91,7 +90,7 @@ var CustomDropdownMenuItemAnchor = /*#__PURE__*/forwardRef(function (_ref2, ref)
91
90
  tabIndex: tabIndex,
92
91
  "aria-haspopup": ariaHasPopup,
93
92
  "aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined,
94
- "aria-checked": expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined,
93
+ "aria-checked": itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox' ? ariaPressed : undefined,
95
94
  "aria-disabled": ariaDisabled,
96
95
  "aria-keyshortcuts": ariaKeyshortcuts,
97
96
  "data-toolbar-component": "menu-item",
@@ -9,9 +9,11 @@ var ROVO_SVG_PATH = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=
9
9
  var RovoLogoSVG = function RovoLogoSVG(_ref) {
10
10
  var label = _ref.label,
11
11
  testId = _ref.testId;
12
+ var isDecorative = label === '';
12
13
  return /*#__PURE__*/React.createElement("span", {
13
- role: "img",
14
- "aria-label": label,
14
+ role: isDecorative ? undefined : 'img',
15
+ "aria-label": isDecorative ? undefined : label,
16
+ "aria-hidden": isDecorative ? true : undefined,
15
17
  "data-testid": testId
16
18
  // eslint-disable-next-line react/no-danger
17
19
  ,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "registry": "https://registry.npmjs.org/"
5
5
  },
6
- "version": "2.8.5",
6
+ "version": "2.8.7",
7
7
  "description": "Common UI for Toolbars across the platform",
8
8
  "atlassian": {
9
9
  "website": {
@@ -38,14 +38,14 @@
38
38
  "@atlaskit/css": "^1.1.0",
39
39
  "@atlaskit/dropdown-menu": "^18.3.0",
40
40
  "@atlaskit/icon": "^38.0.0",
41
- "@atlaskit/icon-lab": "^7.10.0",
41
+ "@atlaskit/icon-lab": "^7.11.0",
42
42
  "@atlaskit/menu": "^11.0.0",
43
43
  "@atlaskit/platform-feature-experiments": "^0.3.0",
44
44
  "@atlaskit/platform-feature-flags": "^2.2.0",
45
45
  "@atlaskit/popup": "^6.3.0",
46
46
  "@atlaskit/primitives": "^22.5.0",
47
47
  "@atlaskit/react-compiler-gating": "^0.2.0",
48
- "@atlaskit/tmp-editor-statsig": "^212.0.0",
48
+ "@atlaskit/tmp-editor-statsig": "^214.0.0",
49
49
  "@atlaskit/tokens": "^20.1.0",
50
50
  "@atlaskit/tooltip": "^24.3.0",
51
51
  "@babel/runtime": "^7.0.0",