@atlaskit/editor-plugin-alignment 8.0.5 → 8.0.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,20 @@
1
1
  # @atlaskit/editor-plugin-alignment
2
2
 
3
+ ## 8.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`38dee2c85c456`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/38dee2c85c456) -
8
+ [ux] [EDITOR-4486] render tooltips for ToolbarDropdownMenu using new TooltipComponent prop behind
9
+ platform_editor_hide_toolbar_tooltips_fix
10
+ - Updated dependencies
11
+
12
+ ## 8.0.6
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 8.0.5
4
19
 
5
20
  ### Patch Changes
@@ -10,6 +10,7 @@ var _reactIntlNext = require("react-intl-next");
10
10
  var _hooks = require("@atlaskit/editor-common/hooks");
11
11
  var _messages = require("@atlaskit/editor-common/messages");
12
12
  var _editorToolbar = require("@atlaskit/editor-toolbar");
13
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
14
  var _options = require("./options");
14
15
  var AlignmentMenu = exports.AlignmentMenu = function AlignmentMenu(_ref) {
15
16
  var children = _ref.children,
@@ -28,6 +29,21 @@ var AlignmentMenu = exports.AlignmentMenu = function AlignmentMenu(_ref) {
28
29
  var _useIntl = (0, _reactIntlNext.useIntl)(),
29
30
  formatMessage = _useIntl.formatMessage;
30
31
  var title = formatMessage(_messages.alignmentMessages.alignment);
32
+ if ((0, _expValEquals.expValEquals)('platform_editor_hide_toolbar_tooltips_fix', 'isEnabled', true)) {
33
+ return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownMenu, {
34
+ iconBefore: /*#__PURE__*/_react.default.createElement(Icon, {
35
+ label: "",
36
+ size: "small"
37
+ }),
38
+ isDisabled: !isEnabled,
39
+ testId: "text-alignment-menu",
40
+ label: title,
41
+ tooltipComponent: /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
42
+ content: title
43
+ })
44
+ }, children);
45
+ }
46
+ ;
31
47
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
32
48
  content: title
33
49
  }, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownMenu, {
@@ -3,6 +3,7 @@ import { useIntl } from 'react-intl-next';
3
3
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
4
  import { alignmentMessages as messages } from '@atlaskit/editor-common/messages';
5
5
  import { ToolbarDropdownMenu, ToolbarTooltip } from '@atlaskit/editor-toolbar';
6
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
7
  import { alignmentOptions } from './options';
7
8
  export const AlignmentMenu = ({
8
9
  children,
@@ -25,6 +26,21 @@ export const AlignmentMenu = ({
25
26
  formatMessage
26
27
  } = useIntl();
27
28
  const title = formatMessage(messages.alignment);
29
+ if (expValEquals('platform_editor_hide_toolbar_tooltips_fix', 'isEnabled', true)) {
30
+ return /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
31
+ iconBefore: /*#__PURE__*/React.createElement(Icon, {
32
+ label: "",
33
+ size: "small"
34
+ }),
35
+ isDisabled: !isEnabled,
36
+ testId: "text-alignment-menu",
37
+ label: title,
38
+ tooltipComponent: /*#__PURE__*/React.createElement(ToolbarTooltip, {
39
+ content: title
40
+ })
41
+ }, children);
42
+ }
43
+ ;
28
44
  return /*#__PURE__*/React.createElement(ToolbarTooltip, {
29
45
  content: title
30
46
  }, /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
@@ -3,6 +3,7 @@ import { useIntl } from 'react-intl-next';
3
3
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
4
  import { alignmentMessages as messages } from '@atlaskit/editor-common/messages';
5
5
  import { ToolbarDropdownMenu, ToolbarTooltip } from '@atlaskit/editor-toolbar';
6
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
7
  import { alignmentOptions } from './options';
7
8
  export var AlignmentMenu = function AlignmentMenu(_ref) {
8
9
  var children = _ref.children,
@@ -21,6 +22,21 @@ export var AlignmentMenu = function AlignmentMenu(_ref) {
21
22
  var _useIntl = useIntl(),
22
23
  formatMessage = _useIntl.formatMessage;
23
24
  var title = formatMessage(messages.alignment);
25
+ if (expValEquals('platform_editor_hide_toolbar_tooltips_fix', 'isEnabled', true)) {
26
+ return /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
27
+ iconBefore: /*#__PURE__*/React.createElement(Icon, {
28
+ label: "",
29
+ size: "small"
30
+ }),
31
+ isDisabled: !isEnabled,
32
+ testId: "text-alignment-menu",
33
+ label: title,
34
+ tooltipComponent: /*#__PURE__*/React.createElement(ToolbarTooltip, {
35
+ content: title
36
+ })
37
+ }, children);
38
+ }
39
+ ;
24
40
  return /*#__PURE__*/React.createElement(ToolbarTooltip, {
25
41
  content: title
26
42
  }, /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-alignment",
3
- "version": "8.0.5",
3
+ "version": "8.0.7",
4
4
  "description": "Alignment plugin for @atlaskit/editor-core",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,18 +36,18 @@
36
36
  "@atlaskit/editor-plugin-primary-toolbar": "^8.0.0",
37
37
  "@atlaskit/editor-plugin-selection-toolbar": "^8.1.0",
38
38
  "@atlaskit/editor-plugin-toolbar": "^4.1.0",
39
- "@atlaskit/editor-prosemirror": "^7.2.0",
39
+ "@atlaskit/editor-prosemirror": "^7.3.0",
40
40
  "@atlaskit/editor-tables": "^2.9.0",
41
41
  "@atlaskit/editor-toolbar": "^0.19.0",
42
42
  "@atlaskit/icon": "^30.0.0",
43
43
  "@atlaskit/platform-feature-flags": "^1.1.0",
44
- "@atlaskit/tmp-editor-statsig": "^17.0.0",
45
- "@atlaskit/tokens": "^10.1.0",
44
+ "@atlaskit/tmp-editor-statsig": "^17.13.0",
45
+ "@atlaskit/tokens": "^11.0.0",
46
46
  "@babel/runtime": "^7.0.0",
47
47
  "@compiled/react": "^0.18.6"
48
48
  },
49
49
  "peerDependencies": {
50
- "@atlaskit/editor-common": "^111.9.0",
50
+ "@atlaskit/editor-common": "^111.11.0",
51
51
  "react": "^18.2.0",
52
52
  "react-dom": "^18.2.0",
53
53
  "react-intl-next": "npm:react-intl@^5.18.1"