@atlaskit/editor-plugin-card 12.3.11 → 12.3.13

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-card
2
2
 
3
+ ## 12.3.13
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 12.3.12
10
+
11
+ ### Patch Changes
12
+
13
+ - [`d2f1426fe5b85`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d2f1426fe5b85) -
14
+ [ux] ENGHEALTH-46817 Add feature gated a11y eslint fixes across editor packages
15
+ - Updated dependencies
16
+
3
17
  ## 12.3.11
4
18
 
5
19
  ### Patch Changes
@@ -9,6 +9,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
9
9
  var _react = require("react");
10
10
  var _react2 = require("@emotion/react");
11
11
  var _link = require("@atlaskit/editor-common/link");
12
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
13
  /**
13
14
  * @jsxRuntime classic
14
15
  * @jsx jsx
@@ -42,19 +43,26 @@ var OverlayWrapper = function OverlayWrapper(_ref) {
42
43
  }
43
44
  }, []);
44
45
  return (0, _react2.jsx)("span", {
45
- // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
46
46
  onMouseEnter: function onMouseEnter() {
47
47
  setShowConfigureButton(true);
48
48
  hoverCallback(true);
49
- }
50
- // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
51
- ,
49
+ },
52
50
  onMouseLeave: function onMouseLeave() {
53
51
  if (!dropdownOpen) {
54
52
  setShowConfigureButton(false);
55
53
  hoverCallback(false);
56
54
  }
57
55
  },
56
+ onFocus: (0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? function () {
57
+ setShowConfigureButton(true);
58
+ hoverCallback(true);
59
+ } : undefined,
60
+ onBlur: (0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? function () {
61
+ if (!dropdownOpen) {
62
+ setShowConfigureButton(false);
63
+ hoverCallback(false);
64
+ }
65
+ } : undefined,
58
66
  "data-testid": "inline-card-overlay-wrapper"
59
67
  }, (0, _react2.jsx)("span", {
60
68
  css: ConfigureOverlayWrapperStyles
@@ -122,13 +122,13 @@ var LinkAppearanceMenu = exports.LinkAppearanceMenu = function LinkAppearanceMen
122
122
  selected: Boolean(isDatasourceView),
123
123
  inputMethod: _analytics.INPUT_METHOD.FLOATING_TB,
124
124
  dispatchCommand: dispatchCommand
125
- })), /*#__PURE__*/_react.default.createElement(_menu.Section, {
125
+ })), 'href' in settingsConfig && settingsConfig.href && /*#__PURE__*/_react.default.createElement(_menu.Section, {
126
126
  hasSeparator: true
127
127
  }, /*#__PURE__*/_react.default.createElement(_menu.LinkItem, {
128
128
  iconBefore: Icon && /*#__PURE__*/_react.default.createElement(Icon, {
129
129
  label: "Settings"
130
130
  }),
131
- href: 'href' in settingsConfig ? settingsConfig.href : undefined,
131
+ href: settingsConfig.href,
132
132
  target: 'target' in settingsConfig ? settingsConfig.target : undefined
133
133
  }, intl.formatMessage(_messages.linkToolbarMessages.preferencesLink))));
134
134
  };
@@ -8,6 +8,7 @@ import { useCallback, useState } from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { OverlayButton } from '@atlaskit/editor-common/link';
11
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
12
  const ConfigureOverlayWrapperStyles = css({
12
13
  position: 'relative',
13
14
  left: "var(--ds-space-025, 2px)"
@@ -28,19 +29,26 @@ const OverlayWrapper = ({
28
29
  }
29
30
  }, []);
30
31
  return jsx("span", {
31
- // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
32
32
  onMouseEnter: () => {
33
33
  setShowConfigureButton(true);
34
34
  hoverCallback(true);
35
- }
36
- // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
37
- ,
35
+ },
38
36
  onMouseLeave: () => {
39
37
  if (!dropdownOpen) {
40
38
  setShowConfigureButton(false);
41
39
  hoverCallback(false);
42
40
  }
43
41
  },
42
+ onFocus: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? () => {
43
+ setShowConfigureButton(true);
44
+ hoverCallback(true);
45
+ } : undefined,
46
+ onBlur: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? () => {
47
+ if (!dropdownOpen) {
48
+ setShowConfigureButton(false);
49
+ hoverCallback(false);
50
+ }
51
+ } : undefined,
44
52
  "data-testid": "inline-card-overlay-wrapper"
45
53
  }, jsx("span", {
46
54
  css: ConfigureOverlayWrapperStyles
@@ -107,13 +107,13 @@ export const LinkAppearanceMenu = ({
107
107
  selected: Boolean(isDatasourceView),
108
108
  inputMethod: INPUT_METHOD.FLOATING_TB,
109
109
  dispatchCommand: dispatchCommand
110
- })), /*#__PURE__*/React.createElement(Section, {
110
+ })), 'href' in settingsConfig && settingsConfig.href && /*#__PURE__*/React.createElement(Section, {
111
111
  hasSeparator: true
112
112
  }, /*#__PURE__*/React.createElement(LinkItem, {
113
113
  iconBefore: Icon && /*#__PURE__*/React.createElement(Icon, {
114
114
  label: "Settings"
115
115
  }),
116
- href: 'href' in settingsConfig ? settingsConfig.href : undefined,
116
+ href: settingsConfig.href,
117
117
  target: 'target' in settingsConfig ? settingsConfig.target : undefined
118
118
  }, intl.formatMessage(linkToolbarMessages.preferencesLink))));
119
119
  };
@@ -9,6 +9,7 @@ import { useCallback, useState } from 'react';
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
10
10
  import { css, jsx } from '@emotion/react';
11
11
  import { OverlayButton } from '@atlaskit/editor-common/link';
12
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
12
13
  var ConfigureOverlayWrapperStyles = css({
13
14
  position: 'relative',
14
15
  left: "var(--ds-space-025, 2px)"
@@ -34,19 +35,26 @@ var OverlayWrapper = function OverlayWrapper(_ref) {
34
35
  }
35
36
  }, []);
36
37
  return jsx("span", {
37
- // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
38
38
  onMouseEnter: function onMouseEnter() {
39
39
  setShowConfigureButton(true);
40
40
  hoverCallback(true);
41
- }
42
- // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
43
- ,
41
+ },
44
42
  onMouseLeave: function onMouseLeave() {
45
43
  if (!dropdownOpen) {
46
44
  setShowConfigureButton(false);
47
45
  hoverCallback(false);
48
46
  }
49
47
  },
48
+ onFocus: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? function () {
49
+ setShowConfigureButton(true);
50
+ hoverCallback(true);
51
+ } : undefined,
52
+ onBlur: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? function () {
53
+ if (!dropdownOpen) {
54
+ setShowConfigureButton(false);
55
+ hoverCallback(false);
56
+ }
57
+ } : undefined,
50
58
  "data-testid": "inline-card-overlay-wrapper"
51
59
  }, jsx("span", {
52
60
  css: ConfigureOverlayWrapperStyles
@@ -115,13 +115,13 @@ export var LinkAppearanceMenu = function LinkAppearanceMenu(_ref) {
115
115
  selected: Boolean(isDatasourceView),
116
116
  inputMethod: INPUT_METHOD.FLOATING_TB,
117
117
  dispatchCommand: dispatchCommand
118
- })), /*#__PURE__*/React.createElement(Section, {
118
+ })), 'href' in settingsConfig && settingsConfig.href && /*#__PURE__*/React.createElement(Section, {
119
119
  hasSeparator: true
120
120
  }, /*#__PURE__*/React.createElement(LinkItem, {
121
121
  iconBefore: Icon && /*#__PURE__*/React.createElement(Icon, {
122
122
  label: "Settings"
123
123
  }),
124
- href: 'href' in settingsConfig ? settingsConfig.href : undefined,
124
+ href: settingsConfig.href,
125
125
  target: 'target' in settingsConfig ? settingsConfig.target : undefined
126
126
  }, intl.formatMessage(linkToolbarMessages.preferencesLink))));
127
127
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "12.3.11",
3
+ "version": "12.3.13",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/editor-prosemirror": "^7.3.0",
47
47
  "@atlaskit/editor-shared-styles": "^3.10.0",
48
48
  "@atlaskit/frontend-utilities": "^3.2.0",
49
- "@atlaskit/icon": "^31.0.0",
49
+ "@atlaskit/icon": "^32.0.0",
50
50
  "@atlaskit/link": "^3.3.0",
51
51
  "@atlaskit/link-analytics": "^11.0.0",
52
52
  "@atlaskit/link-client-extension": "^6.0.0",
@@ -61,7 +61,7 @@
61
61
  "@atlaskit/prosemirror-history": "^0.2.0",
62
62
  "@atlaskit/smart-card": "^43.25.0",
63
63
  "@atlaskit/theme": "^21.0.0",
64
- "@atlaskit/tmp-editor-statsig": "^29.0.0",
64
+ "@atlaskit/tmp-editor-statsig": "^29.6.0",
65
65
  "@atlaskit/tokens": "^11.0.0",
66
66
  "@babel/runtime": "^7.0.0",
67
67
  "@emotion/react": "^11.7.1",
@@ -71,7 +71,7 @@
71
71
  "uuid": "^3.1.0"
72
72
  },
73
73
  "peerDependencies": {
74
- "@atlaskit/editor-common": "^111.16.0",
74
+ "@atlaskit/editor-common": "^111.20.0",
75
75
  "@atlaskit/link-provider": "^4.2.0",
76
76
  "react": "^18.2.0",
77
77
  "react-intl-next": "npm:react-intl@^5.18.1"