@atlaskit/editor-plugin-card 17.1.0 → 17.2.0

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,23 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 17.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`aa0f628e5ad3c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aa0f628e5ad3c) -
8
+ Adds tooltips to the paste menu "Display link as" buttons (URL, Inline, Card, Embed) and renames
9
+ the section title from "Display as" to "Display link as".
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 17.1.1
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 17.1.0
4
22
 
5
23
  ### Minor Changes
@@ -26,6 +26,7 @@ var _smartLinkEmbed = _interopRequireDefault(require("@atlaskit/icon/core/smart-
26
26
  var _smartLinkInline = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-inline"));
27
27
  var _linkProvider = require("@atlaskit/link-provider");
28
28
  var _compiled = require("@atlaskit/primitives/compiled");
29
+ var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
29
30
  var _doc = require("../pm-plugins/doc");
30
31
  var _currentPastedSmartLink = require("./currentPastedSmartLink");
31
32
  var _pasteDisplayAsUtils = require("./pasteDisplayAsUtils");
@@ -57,6 +58,9 @@ var AppearanceOptionIconButton = function AppearanceOptionIconButton(_ref) {
57
58
  onClick = _ref.onClick;
58
59
  return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
59
60
  xcss: styles.iconWrapper
61
+ }, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
62
+ content: label,
63
+ position: "bottom"
60
64
  }, /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
61
65
  xcss: (0, _css.cx)(styles.iconButton, isDisabled && styles.iconButtonDisabled, !isDisabled && currentAppearance === appearance && styles.iconButtonSelected),
62
66
  "aria-label": label,
@@ -65,7 +69,7 @@ var AppearanceOptionIconButton = function AppearanceOptionIconButton(_ref) {
65
69
  onClick: onClick
66
70
  }, /*#__PURE__*/_react.default.createElement(Icon, {
67
71
  label: label
68
- })));
72
+ }))));
69
73
  };
70
74
  var InlineAppearanceIconButton = function InlineAppearanceIconButton(_ref2) {
71
75
  var currentAppearance = _ref2.currentAppearance,
@@ -319,9 +323,9 @@ var PasteDisplayAsMenuSection = function PasteDisplayAsMenuSection(_ref9) {
319
323
  var intl = (0, _reactIntl.useIntl)();
320
324
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItemSection, {
321
325
  title: intl.formatMessage({
322
- defaultMessage: 'Display as',
323
- description: 'Section title for Smart Link display options in the paste actions menu.',
324
- id: 'fabric.editor.pasteDisplayAsMenu.displayAs'
326
+ defaultMessage: 'Display link as',
327
+ description: 'Section title in the paste actions menu for choosing how a pasted link is displayed (URL, Inline, Card, or Embed).',
328
+ id: 'fabric.editor.pasteDisplayAsMenu.displayLinkAs'
325
329
  })
326
330
  }, /*#__PURE__*/_react.default.createElement(PasteDisplayAsMenuHorizontalView, {
327
331
  api: api,
@@ -18,6 +18,7 @@ import SmartLinkEmbedIcon from '@atlaskit/icon/core/smart-link-embed';
18
18
  import SmartLinkInlineIcon from '@atlaskit/icon/core/smart-link-inline';
19
19
  import { useSmartCardContext } from '@atlaskit/link-provider';
20
20
  import { Box, Flex, Pressable } from '@atlaskit/primitives/compiled';
21
+ import Tooltip from '@atlaskit/tooltip';
21
22
  import { changeSelectedCardToLink, setSelectedCardAppearance } from '../pm-plugins/doc';
22
23
  import { getSingleSmartLinkUrlFromSlice } from './currentPastedSmartLink';
23
24
  import { getCardAtPasteRange } from './pasteDisplayAsUtils';
@@ -49,6 +50,9 @@ const AppearanceOptionIconButton = ({
49
50
  }) => {
50
51
  return /*#__PURE__*/React.createElement(Box, {
51
52
  xcss: styles.iconWrapper
53
+ }, /*#__PURE__*/React.createElement(Tooltip, {
54
+ content: label,
55
+ position: "bottom"
52
56
  }, /*#__PURE__*/React.createElement(Pressable, {
53
57
  xcss: cx(styles.iconButton, isDisabled && styles.iconButtonDisabled, !isDisabled && currentAppearance === appearance && styles.iconButtonSelected),
54
58
  "aria-label": label,
@@ -57,7 +61,7 @@ const AppearanceOptionIconButton = ({
57
61
  onClick: onClick
58
62
  }, /*#__PURE__*/React.createElement(Icon, {
59
63
  label: label
60
- })));
64
+ }))));
61
65
  };
62
66
  const InlineAppearanceIconButton = ({
63
67
  currentAppearance,
@@ -320,9 +324,9 @@ const PasteDisplayAsMenuSection = ({
320
324
  const intl = useIntl();
321
325
  return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
322
326
  title: intl.formatMessage({
323
- defaultMessage: 'Display as',
324
- description: 'Section title for Smart Link display options in the paste actions menu.',
325
- id: 'fabric.editor.pasteDisplayAsMenu.displayAs'
327
+ defaultMessage: 'Display link as',
328
+ description: 'Section title in the paste actions menu for choosing how a pasted link is displayed (URL, Inline, Card, or Embed).',
329
+ id: 'fabric.editor.pasteDisplayAsMenu.displayLinkAs'
326
330
  })
327
331
  }, /*#__PURE__*/React.createElement(PasteDisplayAsMenuHorizontalView, {
328
332
  api: api,
@@ -18,6 +18,7 @@ import SmartLinkEmbedIcon from '@atlaskit/icon/core/smart-link-embed';
18
18
  import SmartLinkInlineIcon from '@atlaskit/icon/core/smart-link-inline';
19
19
  import { useSmartCardContext } from '@atlaskit/link-provider';
20
20
  import { Box, Flex, Pressable } from '@atlaskit/primitives/compiled';
21
+ import Tooltip from '@atlaskit/tooltip';
21
22
  import { changeSelectedCardToLink, setSelectedCardAppearance } from '../pm-plugins/doc';
22
23
  import { getSingleSmartLinkUrlFromSlice } from './currentPastedSmartLink';
23
24
  import { getCardAtPasteRange } from './pasteDisplayAsUtils';
@@ -48,6 +49,9 @@ var AppearanceOptionIconButton = function AppearanceOptionIconButton(_ref) {
48
49
  onClick = _ref.onClick;
49
50
  return /*#__PURE__*/React.createElement(Box, {
50
51
  xcss: styles.iconWrapper
52
+ }, /*#__PURE__*/React.createElement(Tooltip, {
53
+ content: label,
54
+ position: "bottom"
51
55
  }, /*#__PURE__*/React.createElement(Pressable, {
52
56
  xcss: cx(styles.iconButton, isDisabled && styles.iconButtonDisabled, !isDisabled && currentAppearance === appearance && styles.iconButtonSelected),
53
57
  "aria-label": label,
@@ -56,7 +60,7 @@ var AppearanceOptionIconButton = function AppearanceOptionIconButton(_ref) {
56
60
  onClick: onClick
57
61
  }, /*#__PURE__*/React.createElement(Icon, {
58
62
  label: label
59
- })));
63
+ }))));
60
64
  };
61
65
  var InlineAppearanceIconButton = function InlineAppearanceIconButton(_ref2) {
62
66
  var currentAppearance = _ref2.currentAppearance,
@@ -310,9 +314,9 @@ var PasteDisplayAsMenuSection = function PasteDisplayAsMenuSection(_ref9) {
310
314
  var intl = useIntl();
311
315
  return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
312
316
  title: intl.formatMessage({
313
- defaultMessage: 'Display as',
314
- description: 'Section title for Smart Link display options in the paste actions menu.',
315
- id: 'fabric.editor.pasteDisplayAsMenu.displayAs'
317
+ defaultMessage: 'Display link as',
318
+ description: 'Section title in the paste actions menu for choosing how a pasted link is displayed (URL, Inline, Card, or Embed).',
319
+ id: 'fabric.editor.pasteDisplayAsMenu.displayLinkAs'
316
320
  })
317
321
  }, /*#__PURE__*/React.createElement(PasteDisplayAsMenuHorizontalView, {
318
322
  api: api,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "17.1.0",
3
+ "version": "17.2.0",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -65,9 +65,10 @@
65
65
  "@atlaskit/platform-feature-flags-react": "^0.5.0",
66
66
  "@atlaskit/primitives": "^19.0.0",
67
67
  "@atlaskit/prosemirror-history": "^0.2.0",
68
- "@atlaskit/smart-card": "^44.21.0",
69
- "@atlaskit/tmp-editor-statsig": "^88.4.0",
68
+ "@atlaskit/smart-card": "^44.23.0",
69
+ "@atlaskit/tmp-editor-statsig": "^89.0.0",
70
70
  "@atlaskit/tokens": "^13.1.0",
71
+ "@atlaskit/tooltip": "^22.6.0",
71
72
  "@babel/runtime": "^7.0.0",
72
73
  "@emotion/react": "^11.7.1",
73
74
  "lodash": "^4.17.21",
@@ -76,8 +77,8 @@
76
77
  "uuid": "^3.1.0"
77
78
  },
78
79
  "peerDependencies": {
79
- "@atlaskit/editor-common": "^115.1.0",
80
- "@atlaskit/link-provider": "^4.5.0",
80
+ "@atlaskit/editor-common": "^115.4.0",
81
+ "@atlaskit/link-provider": "^4.6.0",
81
82
  "react": "^18.2.0",
82
83
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
83
84
  },