@atlaskit/smart-card 43.20.0 → 43.20.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/extractors/common/icon/extractIcon.js +0 -1
  3. package/dist/cjs/view/BlockCard/views/ErroredView.js +0 -1
  4. package/dist/cjs/view/EmbedCard/views/ErroredView.js +0 -1
  5. package/dist/cjs/view/EmbedCard/views/ResolvedView.js +0 -2
  6. package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +0 -1
  7. package/dist/cjs/view/EmbedModal/components/link-info/index.js +6 -2
  8. package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/index.js +8 -3
  9. package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +0 -1
  10. package/dist/cjs/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +0 -1
  11. package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +0 -2
  12. package/dist/cjs/view/InlineCard/ErroredView/index.js +0 -1
  13. package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +0 -1
  14. package/dist/cjs/view/common/Icon.js +0 -1
  15. package/dist/es2019/extractors/common/icon/extractIcon.js +0 -1
  16. package/dist/es2019/view/BlockCard/views/ErroredView.js +0 -1
  17. package/dist/es2019/view/EmbedCard/views/ErroredView.js +0 -1
  18. package/dist/es2019/view/EmbedCard/views/ResolvedView.js +0 -2
  19. package/dist/es2019/view/EmbedCard/views/unresolved-view/index.js +0 -1
  20. package/dist/es2019/view/EmbedModal/components/link-info/index.js +6 -2
  21. package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/index.js +8 -3
  22. package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +0 -1
  23. package/dist/es2019/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +0 -1
  24. package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +0 -2
  25. package/dist/es2019/view/InlineCard/ErroredView/index.js +0 -1
  26. package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +0 -1
  27. package/dist/es2019/view/common/Icon.js +0 -1
  28. package/dist/esm/extractors/common/icon/extractIcon.js +0 -1
  29. package/dist/esm/view/BlockCard/views/ErroredView.js +0 -1
  30. package/dist/esm/view/EmbedCard/views/ErroredView.js +0 -1
  31. package/dist/esm/view/EmbedCard/views/ResolvedView.js +0 -2
  32. package/dist/esm/view/EmbedCard/views/unresolved-view/index.js +0 -1
  33. package/dist/esm/view/EmbedModal/components/link-info/index.js +6 -2
  34. package/dist/esm/view/EmbedModal/components/link-info/link-info-button/index.js +8 -3
  35. package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +0 -1
  36. package/dist/esm/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +0 -1
  37. package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +0 -2
  38. package/dist/esm/view/InlineCard/ErroredView/index.js +0 -1
  39. package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +0 -1
  40. package/dist/esm/view/common/Icon.js +0 -1
  41. package/dist/types/view/EmbedModal/components/link-info/link-info-button/index.d.ts +2 -1
  42. package/dist/types-ts4.5/view/EmbedModal/components/link-info/link-info-button/index.d.ts +2 -1
  43. package/package.json +6 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 43.20.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`aac6485a45d73`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aac6485a45d73) -
8
+ NAVX-2815 adding correct role for icon button in preview modal
9
+
3
10
  ## 43.20.0
4
11
 
5
12
  ### Minor Changes
@@ -52,7 +52,6 @@ function typeToIcon(type, opts) {
52
52
  case 'atlassian:Project':
53
53
  return /*#__PURE__*/_react.default.createElement(_peopleGroup.default, {
54
54
  label: opts.title || 'project',
55
- LEGACY_size: "small",
56
55
  testId: "project-icon",
57
56
  color: "currentColor"
58
57
  });
@@ -36,7 +36,6 @@ var ErroredView = function ErroredView(_ref) {
36
36
  }), /*#__PURE__*/_react.default.createElement(_statusWarning.default, {
37
37
  label: "errored-warning-icon",
38
38
  color: "var(--ds-icon-warning, #E06C00)",
39
- LEGACY_size: "small",
40
39
  testId: "".concat(testId, "-warning-icon")
41
40
  }), /*#__PURE__*/_react.default.createElement(_baseTextElement.default, {
42
41
  maxLines: 3,
@@ -34,7 +34,6 @@ var EmbedCardErroredView = exports.EmbedCardErroredView = function EmbedCardErro
34
34
  isSelected: isSelected,
35
35
  testId: testId
36
36
  }, /*#__PURE__*/React.createElement(_statusError.default, {
37
- LEGACY_size: "small",
38
37
  color: "var(--ds-icon-danger, ".concat(_colors.R300, ")"),
39
38
  label: "error-icon"
40
39
  }), /*#__PURE__*/React.createElement(_compiled.Box, {
@@ -41,7 +41,6 @@ var EmbedCardResolvedViewOld = /*#__PURE__*/_react.default.forwardRef(function (
41
41
  var linkGlyph = _react.default.useMemo(function () {
42
42
  return /*#__PURE__*/_react.default.createElement(_link.default, {
43
43
  label: "icon",
44
- LEGACY_size: "small",
45
44
  testId: "embed-card-fallback-icon",
46
45
  color: "currentColor"
47
46
  });
@@ -115,7 +114,6 @@ var EmbedCardResolvedViewUpdated = /*#__PURE__*/_react.default.forwardRef(functi
115
114
  var linkGlyph = _react.default.useMemo(function () {
116
115
  return /*#__PURE__*/_react.default.createElement(_link.default, {
117
116
  label: "icon",
118
- LEGACY_size: "small",
119
117
  testId: "embed-card-fallback-icon",
120
118
  color: "currentColor"
121
119
  });
@@ -40,7 +40,6 @@ var UnresolvedView = function UnresolvedView(_ref) {
40
40
  src: typeof iconUrlOrElement === 'string' ? iconUrlOrElement : undefined,
41
41
  default: /*#__PURE__*/_react.default.createElement(_link.default, {
42
42
  label: "icon",
43
- LEGACY_size: "small",
44
43
  testId: "embed-card-fallback-icon",
45
44
  color: "currentColor"
46
45
  })
@@ -81,7 +81,9 @@ var LinkInfo = function LinkInfo(_ref) {
81
81
  },
82
82
  label: _messages.messages.viewOriginal,
83
83
  onClick: onViewButtonClick,
84
- testId: "".concat(testId, "-url")
84
+ testId: "".concat(testId, "-url"),
85
+ role: (0, _platformFeatureFlags.fg)('navx-2185-smart-link-preview-modal-icon-role') ? 'link' : '',
86
+ "aria-label": (0, _platformFeatureFlags.fg)('navx-2185-smart-link-preview-modal-icon-role') ? _messages.messages.viewOriginal : ''
85
87
  });
86
88
  }
87
89
  }, [onViewButtonClick, providerName, testId]);
@@ -188,7 +190,9 @@ var LinkInfoNew = function LinkInfoNew(_ref2) {
188
190
  },
189
191
  label: _messages.messages.viewOriginal,
190
192
  onClick: onViewButtonClick,
191
- testId: "".concat(testId, "-url")
193
+ testId: "".concat(testId, "-url"),
194
+ role: (0, _platformFeatureFlags.fg)('navx-2185-smart-link-preview-modal-icon-role') ? 'link' : '',
195
+ "aria-label": (0, _platformFeatureFlags.fg)('navx-2185-smart-link-preview-modal-icon-role') ? _messages.messages.viewOriginal : ''
192
196
  });
193
197
  }
194
198
  }, [onViewButtonClick, providerName, testId]);
@@ -5,9 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
8
9
  var _react = _interopRequireDefault(require("react"));
9
10
  var _reactIntlNext = require("react-intl-next");
10
11
  var _new = require("@atlaskit/button/new");
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
13
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
12
14
  var _useLinkClicked = require("../../../../../state/analytics/useLinkClicked");
13
15
  var LinkInfoButton = function LinkInfoButton(_ref) {
@@ -15,7 +17,8 @@ var LinkInfoButton = function LinkInfoButton(_ref) {
15
17
  icon = _ref.icon,
16
18
  label = _ref.label,
17
19
  onClick = _ref.onClick,
18
- testId = _ref.testId;
20
+ testId = _ref.testId,
21
+ role = _ref.role;
19
22
  var onMouseDown = (0, _useLinkClicked.useMouseDownEvent)();
20
23
  var _useIntl = (0, _reactIntlNext.useIntl)(),
21
24
  formatMessage = _useIntl.formatMessage;
@@ -24,13 +27,15 @@ var LinkInfoButton = function LinkInfoButton(_ref) {
24
27
  hideTooltipOnClick: true,
25
28
  tag: "span",
26
29
  testId: "".concat(testId, "-tooltip")
27
- }, /*#__PURE__*/_react.default.createElement(_new.IconButton, {
30
+ }, /*#__PURE__*/_react.default.createElement(_new.IconButton, (0, _extends2.default)({
28
31
  appearance: "subtle",
29
32
  icon: icon,
30
33
  label: formatMessage(label),
31
34
  onClick: onClick,
32
35
  onMouseDown: onMouseDown,
33
36
  testId: "".concat(testId, "-button")
34
- }));
37
+ }, (0, _platformFeatureFlags.fg)('navx-2185-smart-link-preview-modal-icon-role') ? {
38
+ role: role
39
+ } : {})));
35
40
  };
36
41
  var _default = exports.default = LinkInfoButton;
@@ -68,7 +68,6 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
68
68
  icon: /*#__PURE__*/_react.default.createElement(_link.default, {
69
69
  color: "currentColor",
70
70
  label: "copy url",
71
- LEGACY_size: "medium",
72
71
  spacing: "spacious"
73
72
  }),
74
73
  onClick: onClick,
@@ -33,7 +33,6 @@ var AIFooterMetadata = exports.AIFooterMetadata = function AIFooterMetadata(_ref
33
33
  }, function (tooltipProps) {
34
34
  return /*#__PURE__*/_react.default.createElement(_compiled.Box, tooltipProps, /*#__PURE__*/_react.default.createElement(_info.InfoIcon, {
35
35
  label: "Information",
36
- LEGACY_size: "small",
37
36
  color: "var(--ds-icon-subtle, #505258)"
38
37
  }));
39
38
  }), /*#__PURE__*/_react.default.createElement(_atlassianIntelligence.default, {
@@ -88,14 +88,12 @@ var AtlaskitIcon = function AtlaskitIcon(_ref) {
88
88
  return /*#__PURE__*/_react.default.createElement(ImportedIcon, {
89
89
  label: label,
90
90
  testId: testId,
91
- LEGACY_size: size === _constants.SmartLinkSize.Large || size === _constants.SmartLinkSize.XLarge ? 'medium' : 'small',
92
91
  color: "var(--ds-icon-danger, #C9372C)"
93
92
  });
94
93
  default:
95
94
  return /*#__PURE__*/_react.default.createElement(ImportedIcon, {
96
95
  label: label,
97
96
  testId: testId,
98
- LEGACY_size: size === _constants.SmartLinkSize.Large || size === _constants.SmartLinkSize.XLarge ? 'medium' : 'small',
99
97
  size: size
100
98
  });
101
99
  }
@@ -19,7 +19,6 @@ var fallbackIcon = function fallbackIcon() {
19
19
  return /*#__PURE__*/_react.default.createElement(_statusError.default, {
20
20
  color: "var(--ds-icon-danger, #C9372C)",
21
21
  label: "error",
22
- LEGACY_size: "small",
23
22
  testId: "errored-view-default-icon"
24
23
  });
25
24
  };
@@ -111,7 +111,6 @@ var IconAndTitleLayout = exports.IconAndTitleLayout = function IconAndTitleLayou
111
111
  var renderIconPlaceholder = _react.default.useCallback(function (testId) {
112
112
  return defaultIcon || /*#__PURE__*/_react.default.createElement(_link.default, {
113
113
  label: "link",
114
- LEGACY_size: "small",
115
114
  testId: "".concat(testId, "-default"),
116
115
  color: "currentColor"
117
116
  });
@@ -30,7 +30,6 @@ var Icon = exports.Icon = function Icon(_ref) {
30
30
  isFlexibleUi = _ref$isFlexibleUi === void 0 ? false : _ref$isFlexibleUi;
31
31
  var placeholder = defaultIcon || /*#__PURE__*/_react.default.createElement(_link.default, {
32
32
  label: "link",
33
- LEGACY_size: "small",
34
33
  testId: "".concat(testId, "-default"),
35
34
  color: "currentColor"
36
35
  });
@@ -41,7 +41,6 @@ function typeToIcon(type, opts) {
41
41
  case 'atlassian:Project':
42
42
  return /*#__PURE__*/React.createElement(PeopleGroupIcon, {
43
43
  label: opts.title || 'project',
44
- LEGACY_size: "small",
45
44
  testId: "project-icon",
46
45
  color: "currentColor"
47
46
  });
@@ -24,7 +24,6 @@ const ErroredView = ({
24
24
  }), /*#__PURE__*/React.createElement(WarningIcon, {
25
25
  label: "errored-warning-icon",
26
26
  color: "var(--ds-icon-warning, #E06C00)",
27
- LEGACY_size: "small",
28
27
  testId: `${testId}-warning-icon`
29
28
  }), /*#__PURE__*/React.createElement(Text, {
30
29
  maxLines: 3,
@@ -23,7 +23,6 @@ export const EmbedCardErroredView = ({
23
23
  isSelected: isSelected,
24
24
  testId: testId
25
25
  }, /*#__PURE__*/React.createElement(ErrorIcon, {
26
- LEGACY_size: "small",
27
26
  color: `var(--ds-icon-danger, ${R300})`,
28
27
  label: "error-icon"
29
28
  }), /*#__PURE__*/React.createElement(Box, {
@@ -32,7 +32,6 @@ const EmbedCardResolvedViewOld = /*#__PURE__*/React.forwardRef(({
32
32
  const text = title || (context === null || context === void 0 ? void 0 : context.text);
33
33
  const linkGlyph = React.useMemo(() => /*#__PURE__*/React.createElement(LinkGlyph, {
34
34
  label: "icon",
35
- LEGACY_size: "small",
36
35
  testId: "embed-card-fallback-icon",
37
36
  color: "currentColor"
38
37
  }), []);
@@ -104,7 +103,6 @@ const EmbedCardResolvedViewUpdated = /*#__PURE__*/React.forwardRef(({
104
103
  const text = title || (context === null || context === void 0 ? void 0 : context.text);
105
104
  const linkGlyph = React.useMemo(() => /*#__PURE__*/React.createElement(LinkGlyph, {
106
105
  label: "icon",
107
- LEGACY_size: "small",
108
106
  testId: "embed-card-fallback-icon",
109
107
  color: "currentColor"
110
108
  }), []);
@@ -32,7 +32,6 @@ const UnresolvedView = ({
32
32
  src: typeof iconUrlOrElement === 'string' ? iconUrlOrElement : undefined,
33
33
  default: /*#__PURE__*/React.createElement(LinkGlyph, {
34
34
  label: "icon",
35
- LEGACY_size: "small",
36
35
  testId: "embed-card-fallback-icon",
37
36
  color: "currentColor"
38
37
  })
@@ -71,7 +71,9 @@ const LinkInfo = ({
71
71
  }),
72
72
  label: messages.viewOriginal,
73
73
  onClick: onViewButtonClick,
74
- testId: `${testId}-url`
74
+ testId: `${testId}-url`,
75
+ role: fg('navx-2185-smart-link-preview-modal-icon-role') ? 'link' : '',
76
+ "aria-label": fg('navx-2185-smart-link-preview-modal-icon-role') ? messages.viewOriginal : ''
75
77
  });
76
78
  }
77
79
  }, [onViewButtonClick, providerName, testId]);
@@ -173,7 +175,9 @@ const LinkInfoNew = ({
173
175
  }),
174
176
  label: messages.viewOriginal,
175
177
  onClick: onViewButtonClick,
176
- testId: `${testId}-url`
178
+ testId: `${testId}-url`,
179
+ role: fg('navx-2185-smart-link-preview-modal-icon-role') ? 'link' : '',
180
+ "aria-label": fg('navx-2185-smart-link-preview-modal-icon-role') ? messages.viewOriginal : ''
177
181
  });
178
182
  }
179
183
  }, [onViewButtonClick, providerName, testId]);
@@ -1,6 +1,8 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import React from 'react';
2
3
  import { useIntl } from 'react-intl-next';
3
4
  import { IconButton } from '@atlaskit/button/new';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
4
6
  import Tooltip from '@atlaskit/tooltip';
5
7
  import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
6
8
  const LinkInfoButton = ({
@@ -8,7 +10,8 @@ const LinkInfoButton = ({
8
10
  icon,
9
11
  label,
10
12
  onClick,
11
- testId
13
+ testId,
14
+ role
12
15
  }) => {
13
16
  const onMouseDown = useMouseDownEvent();
14
17
  const {
@@ -19,13 +22,15 @@ const LinkInfoButton = ({
19
22
  hideTooltipOnClick: true,
20
23
  tag: "span",
21
24
  testId: `${testId}-tooltip`
22
- }, /*#__PURE__*/React.createElement(IconButton, {
25
+ }, /*#__PURE__*/React.createElement(IconButton, _extends({
23
26
  appearance: "subtle",
24
27
  icon: icon,
25
28
  label: formatMessage(label),
26
29
  onClick: onClick,
27
30
  onMouseDown: onMouseDown,
28
31
  testId: `${testId}-button`
29
- }));
32
+ }, fg('navx-2185-smart-link-preview-modal-icon-role') ? {
33
+ role
34
+ } : {})));
30
35
  };
31
36
  export default LinkInfoButton;
@@ -34,7 +34,6 @@ const CopyLinkAction = ({
34
34
  icon: /*#__PURE__*/React.createElement(LinkIcon, {
35
35
  color: "currentColor",
36
36
  label: "copy url",
37
- LEGACY_size: "medium",
38
37
  spacing: "spacious"
39
38
  }),
40
39
  onClick: onClick,
@@ -29,7 +29,6 @@ export const AIFooterMetadata = ({
29
29
  position: "bottom"
30
30
  }, tooltipProps => /*#__PURE__*/React.createElement(Box, tooltipProps, /*#__PURE__*/React.createElement(InfoIcon, {
31
31
  label: "Information",
32
- LEGACY_size: "small",
33
32
  color: "var(--ds-icon-subtle, #505258)"
34
33
  }))), /*#__PURE__*/React.createElement(AIIcon, {
35
34
  label: "AI",
@@ -75,14 +75,12 @@ const AtlaskitIcon = ({
75
75
  return /*#__PURE__*/React.createElement(ImportedIcon, {
76
76
  label: label,
77
77
  testId: testId,
78
- LEGACY_size: size === SmartLinkSize.Large || size === SmartLinkSize.XLarge ? 'medium' : 'small',
79
78
  color: "var(--ds-icon-danger, #C9372C)"
80
79
  });
81
80
  default:
82
81
  return /*#__PURE__*/React.createElement(ImportedIcon, {
83
82
  label: label,
84
83
  testId: testId,
85
- LEGACY_size: size === SmartLinkSize.Large || size === SmartLinkSize.XLarge ? 'medium' : 'small',
86
84
  size: size
87
85
  });
88
86
  }
@@ -12,7 +12,6 @@ const fallbackIcon = () => {
12
12
  return /*#__PURE__*/React.createElement(ErrorIcon, {
13
13
  color: "var(--ds-icon-danger, #C9372C)",
14
14
  label: "error",
15
- LEGACY_size: "small",
16
15
  testId: "errored-view-default-icon"
17
16
  });
18
17
  };
@@ -95,7 +95,6 @@ export const IconAndTitleLayout = ({
95
95
  const renderIconPlaceholder = React.useCallback(testId => {
96
96
  return defaultIcon || /*#__PURE__*/React.createElement(LinkIcon, {
97
97
  label: "link",
98
- LEGACY_size: "small",
99
98
  testId: `${testId}-default`,
100
99
  color: "currentColor"
101
100
  });
@@ -22,7 +22,6 @@ export const Icon = ({
22
22
  }) => {
23
23
  const placeholder = defaultIcon || /*#__PURE__*/React.createElement(LinkIcon, {
24
24
  label: "link",
25
- LEGACY_size: "small",
26
25
  testId: `${testId}-default`,
27
26
  color: "currentColor"
28
27
  });
@@ -45,7 +45,6 @@ function typeToIcon(type, opts) {
45
45
  case 'atlassian:Project':
46
46
  return /*#__PURE__*/React.createElement(PeopleGroupIcon, {
47
47
  label: opts.title || 'project',
48
- LEGACY_size: "small",
49
48
  testId: "project-icon",
50
49
  color: "currentColor"
51
50
  });
@@ -28,7 +28,6 @@ var ErroredView = function ErroredView(_ref) {
28
28
  }), /*#__PURE__*/React.createElement(WarningIcon, {
29
29
  label: "errored-warning-icon",
30
30
  color: "var(--ds-icon-warning, #E06C00)",
31
- LEGACY_size: "small",
32
31
  testId: "".concat(testId, "-warning-icon")
33
32
  }), /*#__PURE__*/React.createElement(Text, {
34
33
  maxLines: 3,
@@ -25,7 +25,6 @@ export var EmbedCardErroredView = function EmbedCardErroredView(_ref) {
25
25
  isSelected: isSelected,
26
26
  testId: testId
27
27
  }, /*#__PURE__*/React.createElement(ErrorIcon, {
28
- LEGACY_size: "small",
29
28
  color: "var(--ds-icon-danger, ".concat(R300, ")"),
30
29
  label: "error-icon"
31
30
  }), /*#__PURE__*/React.createElement(Box, {
@@ -34,7 +34,6 @@ var EmbedCardResolvedViewOld = /*#__PURE__*/React.forwardRef(function (_ref, emb
34
34
  var linkGlyph = React.useMemo(function () {
35
35
  return /*#__PURE__*/React.createElement(LinkGlyph, {
36
36
  label: "icon",
37
- LEGACY_size: "small",
38
37
  testId: "embed-card-fallback-icon",
39
38
  color: "currentColor"
40
39
  });
@@ -108,7 +107,6 @@ var EmbedCardResolvedViewUpdated = /*#__PURE__*/React.forwardRef(function (_ref2
108
107
  var linkGlyph = React.useMemo(function () {
109
108
  return /*#__PURE__*/React.createElement(LinkGlyph, {
110
109
  label: "icon",
111
- LEGACY_size: "small",
112
110
  testId: "embed-card-fallback-icon",
113
111
  color: "currentColor"
114
112
  });
@@ -31,7 +31,6 @@ var UnresolvedView = function UnresolvedView(_ref) {
31
31
  src: typeof iconUrlOrElement === 'string' ? iconUrlOrElement : undefined,
32
32
  default: /*#__PURE__*/React.createElement(LinkGlyph, {
33
33
  label: "icon",
34
- LEGACY_size: "small",
35
34
  testId: "embed-card-fallback-icon",
36
35
  color: "currentColor"
37
36
  })
@@ -72,7 +72,9 @@ var LinkInfo = function LinkInfo(_ref) {
72
72
  },
73
73
  label: messages.viewOriginal,
74
74
  onClick: onViewButtonClick,
75
- testId: "".concat(testId, "-url")
75
+ testId: "".concat(testId, "-url"),
76
+ role: fg('navx-2185-smart-link-preview-modal-icon-role') ? 'link' : '',
77
+ "aria-label": fg('navx-2185-smart-link-preview-modal-icon-role') ? messages.viewOriginal : ''
76
78
  });
77
79
  }
78
80
  }, [onViewButtonClick, providerName, testId]);
@@ -179,7 +181,9 @@ var LinkInfoNew = function LinkInfoNew(_ref2) {
179
181
  },
180
182
  label: messages.viewOriginal,
181
183
  onClick: onViewButtonClick,
182
- testId: "".concat(testId, "-url")
184
+ testId: "".concat(testId, "-url"),
185
+ role: fg('navx-2185-smart-link-preview-modal-icon-role') ? 'link' : '',
186
+ "aria-label": fg('navx-2185-smart-link-preview-modal-icon-role') ? messages.viewOriginal : ''
183
187
  });
184
188
  }
185
189
  }, [onViewButtonClick, providerName, testId]);
@@ -1,6 +1,8 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import React from 'react';
2
3
  import { useIntl } from 'react-intl-next';
3
4
  import { IconButton } from '@atlaskit/button/new';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
4
6
  import Tooltip from '@atlaskit/tooltip';
5
7
  import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
6
8
  var LinkInfoButton = function LinkInfoButton(_ref) {
@@ -8,7 +10,8 @@ var LinkInfoButton = function LinkInfoButton(_ref) {
8
10
  icon = _ref.icon,
9
11
  label = _ref.label,
10
12
  onClick = _ref.onClick,
11
- testId = _ref.testId;
13
+ testId = _ref.testId,
14
+ role = _ref.role;
12
15
  var onMouseDown = useMouseDownEvent();
13
16
  var _useIntl = useIntl(),
14
17
  formatMessage = _useIntl.formatMessage;
@@ -17,13 +20,15 @@ var LinkInfoButton = function LinkInfoButton(_ref) {
17
20
  hideTooltipOnClick: true,
18
21
  tag: "span",
19
22
  testId: "".concat(testId, "-tooltip")
20
- }, /*#__PURE__*/React.createElement(IconButton, {
23
+ }, /*#__PURE__*/React.createElement(IconButton, _extends({
21
24
  appearance: "subtle",
22
25
  icon: icon,
23
26
  label: formatMessage(label),
24
27
  onClick: onClick,
25
28
  onMouseDown: onMouseDown,
26
29
  testId: "".concat(testId, "-button")
27
- }));
30
+ }, fg('navx-2185-smart-link-preview-modal-icon-role') ? {
31
+ role: role
32
+ } : {})));
28
33
  };
29
34
  export default LinkInfoButton;
@@ -59,7 +59,6 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
59
59
  icon: /*#__PURE__*/React.createElement(LinkIcon, {
60
60
  color: "currentColor",
61
61
  label: "copy url",
62
- LEGACY_size: "medium",
63
62
  spacing: "spacious"
64
63
  }),
65
64
  onClick: onClick,
@@ -26,7 +26,6 @@ export var AIFooterMetadata = function AIFooterMetadata(_ref) {
26
26
  }, function (tooltipProps) {
27
27
  return /*#__PURE__*/React.createElement(Box, tooltipProps, /*#__PURE__*/React.createElement(InfoIcon, {
28
28
  label: "Information",
29
- LEGACY_size: "small",
30
29
  color: "var(--ds-icon-subtle, #505258)"
31
30
  }));
32
31
  }), /*#__PURE__*/React.createElement(AIIcon, {
@@ -81,14 +81,12 @@ var AtlaskitIcon = function AtlaskitIcon(_ref) {
81
81
  return /*#__PURE__*/React.createElement(ImportedIcon, {
82
82
  label: label,
83
83
  testId: testId,
84
- LEGACY_size: size === SmartLinkSize.Large || size === SmartLinkSize.XLarge ? 'medium' : 'small',
85
84
  color: "var(--ds-icon-danger, #C9372C)"
86
85
  });
87
86
  default:
88
87
  return /*#__PURE__*/React.createElement(ImportedIcon, {
89
88
  label: label,
90
89
  testId: testId,
91
- LEGACY_size: size === SmartLinkSize.Large || size === SmartLinkSize.XLarge ? 'medium' : 'small',
92
90
  size: size
93
91
  });
94
92
  }
@@ -12,7 +12,6 @@ var fallbackIcon = function fallbackIcon() {
12
12
  return /*#__PURE__*/React.createElement(ErrorIcon, {
13
13
  color: "var(--ds-icon-danger, #C9372C)",
14
14
  label: "error",
15
- LEGACY_size: "small",
16
15
  testId: "errored-view-default-icon"
17
16
  });
18
17
  };
@@ -103,7 +103,6 @@ export var IconAndTitleLayout = function IconAndTitleLayout(_ref2) {
103
103
  var renderIconPlaceholder = React.useCallback(function (testId) {
104
104
  return defaultIcon || /*#__PURE__*/React.createElement(LinkIcon, {
105
105
  label: "link",
106
- LEGACY_size: "small",
107
106
  testId: "".concat(testId, "-default"),
108
107
  color: "currentColor"
109
108
  });
@@ -23,7 +23,6 @@ export var Icon = function Icon(_ref) {
23
23
  isFlexibleUi = _ref$isFlexibleUi === void 0 ? false : _ref$isFlexibleUi;
24
24
  var placeholder = defaultIcon || /*#__PURE__*/React.createElement(LinkIcon, {
25
25
  label: "link",
26
- LEGACY_size: "small",
27
26
  testId: "".concat(testId, "-default"),
28
27
  color: "currentColor"
29
28
  });
@@ -6,7 +6,8 @@ export type LinkInfoButtonProps = {
6
6
  icon: IconProp;
7
7
  label: MessageDescriptor;
8
8
  onClick?: () => void;
9
+ role?: string;
9
10
  testId?: string;
10
11
  };
11
- declare const LinkInfoButton: ({ content, icon, label, onClick, testId, }: LinkInfoButtonProps) => React.JSX.Element;
12
+ declare const LinkInfoButton: ({ content, icon, label, onClick, testId, role, }: LinkInfoButtonProps) => React.JSX.Element;
12
13
  export default LinkInfoButton;
@@ -6,7 +6,8 @@ export type LinkInfoButtonProps = {
6
6
  icon: IconProp;
7
7
  label: MessageDescriptor;
8
8
  onClick?: () => void;
9
+ role?: string;
9
10
  testId?: string;
10
11
  };
11
- declare const LinkInfoButton: ({ content, icon, label, onClick, testId, }: LinkInfoButtonProps) => React.JSX.Element;
12
+ declare const LinkInfoButton: ({ content, icon, label, onClick, testId, role, }: LinkInfoButtonProps) => React.JSX.Element;
12
13
  export default LinkInfoButton;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "43.20.0",
3
+ "version": "43.20.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -71,7 +71,7 @@
71
71
  "@atlaskit/textfield": "^8.2.0",
72
72
  "@atlaskit/theme": "^21.0.0",
73
73
  "@atlaskit/tile": "^1.0.0",
74
- "@atlaskit/tmp-editor-statsig": "^16.11.0",
74
+ "@atlaskit/tmp-editor-statsig": "^16.12.0",
75
75
  "@atlaskit/tokens": "^9.1.0",
76
76
  "@atlaskit/tooltip": "^20.12.0",
77
77
  "@atlaskit/ufo": "^0.4.0",
@@ -103,6 +103,7 @@
103
103
  "@atlaskit/media-test-helpers": "^39.0.0",
104
104
  "@atlaskit/react-ufo": "^4.16.0",
105
105
  "@atlaskit/ssr": "workspace:^",
106
+ "@atlassian/a11y-jest-testing": "^0.6.0",
106
107
  "@atlassian/analytics-tooling": "workspace:^",
107
108
  "@atlassian/feature-flags-test-utils": "^1.0.0",
108
109
  "@atlassian/gemini": "^1.28.0",
@@ -238,6 +239,9 @@
238
239
  },
239
240
  "navx-2816-a11y-fix-smart-links-headings": {
240
241
  "type": "boolean"
242
+ },
243
+ "navx-2185-smart-link-preview-modal-icon-role": {
244
+ "type": "boolean"
241
245
  }
242
246
  },
243
247
  "compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/f74ef1bc-7240-4aac-9dc8-9dc43b502089"