@atlaskit/smart-card 45.2.1 → 45.2.2
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 +10 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +10 -7
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +1 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +4 -2
- package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +12 -9
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +1 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +4 -2
- package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +12 -9
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +1 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 45.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`89227a0cf30c4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/89227a0cf30c4) -
|
|
8
|
+
Cleanup feature gate `navx-3698-flexible-card-a11y-fix`. Decorative icons in FlexibleCard actions
|
|
9
|
+
(copy link, preview) are now permanently hidden from screen readers via `aria-hidden="true"`.
|
|
10
|
+
Action buttons now have explicit `aria-label` attributes for accessible names, fixing a
|
|
11
|
+
`button-name` a11y violation that was previously masked by the gate.
|
|
12
|
+
|
|
3
13
|
## 45.2.1
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card" || '',
|
|
14
|
-
packageVersion: "45.2.
|
|
14
|
+
packageVersion: "45.2.1" || ''
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -30,6 +30,7 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
|
|
|
30
30
|
var _context$actions;
|
|
31
31
|
var onClickCallback = _ref.onClick,
|
|
32
32
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
33
|
+
var intl = (0, _reactIntl.useIntl)();
|
|
33
34
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
34
35
|
var invoke = (0, _useInvokeClientAction.default)({});
|
|
35
36
|
var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.ActionName.CopyLinkAction];
|
|
@@ -67,10 +68,11 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
|
|
|
67
68
|
}
|
|
68
69
|
}, [data, invoke, onClickCallback]);
|
|
69
70
|
return data ? /*#__PURE__*/_react.default.createElement(_action.default, (0, _extends2.default)({
|
|
71
|
+
ariaLabel: intl.formatMessage(_messages.messages.copy_url_to_clipboard),
|
|
70
72
|
content: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _messages.messages.copy_url_to_clipboard),
|
|
71
73
|
icon: /*#__PURE__*/_react.default.createElement(_link.default, (0, _extends2.default)({
|
|
72
74
|
color: "currentColor",
|
|
73
|
-
label:
|
|
75
|
+
label: "",
|
|
74
76
|
spacing: "spacious"
|
|
75
77
|
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
76
78
|
size: props.iconSize
|
|
@@ -26,6 +26,7 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
26
26
|
var _context$actions;
|
|
27
27
|
var onClickCallback = _ref.onClick,
|
|
28
28
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
29
|
+
var intl = (0, _reactIntl.useIntl)();
|
|
29
30
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
30
31
|
var invoke = (0, _useInvokeClientAction.default)({});
|
|
31
32
|
var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.ActionName.PreviewAction];
|
|
@@ -45,7 +46,7 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
45
46
|
return /*#__PURE__*/_react.default.createElement(_panelRight.default, (0, _extends2.default)({
|
|
46
47
|
color: "currentColor",
|
|
47
48
|
spacing: "spacious",
|
|
48
|
-
label:
|
|
49
|
+
label: ""
|
|
49
50
|
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
50
51
|
size: props.iconSize
|
|
51
52
|
} : {}));
|
|
@@ -53,24 +54,26 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
53
54
|
return /*#__PURE__*/_react.default.createElement(_growDiagonal.default, (0, _extends2.default)({
|
|
54
55
|
color: "currentColor",
|
|
55
56
|
spacing: "spacious",
|
|
56
|
-
label:
|
|
57
|
+
label: ""
|
|
57
58
|
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
58
59
|
size: props.iconSize
|
|
59
60
|
} : {}));
|
|
60
61
|
}, [hasPreviewPanel, props.iconSize, isRovoBlockCardExperimentEnabled]);
|
|
61
|
-
var actionLabel = (0, _react.
|
|
62
|
+
var actionLabel = (0, _react.useMemo)(function () {
|
|
62
63
|
// Only use panel message if experiment is enabled and hasPreviewPanel is true
|
|
63
64
|
if ((0, _expValEquals.expValEquals)('platform_hover_card_preview_panel', 'cohort', 'test') && hasPreviewPanel) {
|
|
64
|
-
return
|
|
65
|
+
return _messages.messages.preview_panel;
|
|
65
66
|
}
|
|
66
67
|
// Fall back to modal message if experiment is enabled, otherwise use original preview message
|
|
67
68
|
if ((0, _expValEquals.expValEquals)('platform_hover_card_preview_panel', 'cohort', 'test')) {
|
|
68
|
-
return
|
|
69
|
+
return _messages.messages.preview_modal;
|
|
69
70
|
}
|
|
70
|
-
return
|
|
71
|
+
return _messages.messages.preview_improved;
|
|
71
72
|
}, [hasPreviewPanel]);
|
|
73
|
+
var actionMessage = intl.formatMessage(actionLabel);
|
|
72
74
|
return data ? /*#__PURE__*/_react.default.createElement(_action.default, (0, _extends2.default)({
|
|
73
|
-
|
|
75
|
+
ariaLabel: actionMessage,
|
|
76
|
+
content: actionMessage,
|
|
74
77
|
icon: actionIcon(),
|
|
75
78
|
onClick: onClick,
|
|
76
79
|
testId: "smart-action-preview-action",
|
|
@@ -7,13 +7,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _clock = _interopRequireDefault(require("@atlaskit/icon/core/clock"));
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var RelatedLinksActionIcon = function RelatedLinksActionIcon(_ref) {
|
|
12
11
|
var iconSize = _ref.iconSize;
|
|
13
12
|
return /*#__PURE__*/_react.default.createElement(_clock.default, {
|
|
14
13
|
color: "currentColor",
|
|
15
14
|
spacing: "spacious",
|
|
16
|
-
label:
|
|
15
|
+
label: '',
|
|
17
16
|
size: iconSize
|
|
18
17
|
});
|
|
19
18
|
};
|
|
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
19
19
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
20
20
|
var PACKAGE_DATA = {
|
|
21
21
|
packageName: "@atlaskit/smart-card",
|
|
22
|
-
packageVersion: "45.2.
|
|
22
|
+
packageVersion: "45.2.1",
|
|
23
23
|
componentName: 'linkUrl'
|
|
24
24
|
};
|
|
25
25
|
var LinkUrl = function LinkUrl(_ref) {
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card" || '',
|
|
5
|
-
packageVersion: "45.2.
|
|
5
|
+
packageVersion: "45.2.1" || ''
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback, useState } from 'react';
|
|
3
|
-
import { FormattedMessage } from 'react-intl';
|
|
3
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
4
4
|
import LinkIcon from '@atlaskit/icon/core/link';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { ActionName } from '../../../../../constants';
|
|
@@ -14,6 +14,7 @@ const CopyLinkAction = ({
|
|
|
14
14
|
...props
|
|
15
15
|
}) => {
|
|
16
16
|
var _context$actions;
|
|
17
|
+
const intl = useIntl();
|
|
17
18
|
const context = useFlexibleUiContext();
|
|
18
19
|
const invoke = useInvokeClientAction({});
|
|
19
20
|
const data = context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.CopyLinkAction];
|
|
@@ -33,10 +34,11 @@ const CopyLinkAction = ({
|
|
|
33
34
|
}
|
|
34
35
|
}, [data, invoke, onClickCallback]);
|
|
35
36
|
return data ? /*#__PURE__*/React.createElement(Action, _extends({
|
|
37
|
+
ariaLabel: intl.formatMessage(messages.copy_url_to_clipboard),
|
|
36
38
|
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.copy_url_to_clipboard),
|
|
37
39
|
icon: /*#__PURE__*/React.createElement(LinkIcon, _extends({
|
|
38
40
|
color: "currentColor",
|
|
39
|
-
label:
|
|
41
|
+
label: "",
|
|
40
42
|
spacing: "spacious"
|
|
41
43
|
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
42
44
|
size: props.iconSize
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React, { useCallback } from 'react';
|
|
3
|
-
import { FormattedMessage } from 'react-intl';
|
|
2
|
+
import React, { useCallback, useMemo } from 'react';
|
|
3
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
4
4
|
import MediaServicesActualSizeIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
5
5
|
import PanelRightIcon from '@atlaskit/icon/core/panel-right';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -16,6 +16,7 @@ const PreviewAction = ({
|
|
|
16
16
|
...props
|
|
17
17
|
}) => {
|
|
18
18
|
var _context$actions;
|
|
19
|
+
const intl = useIntl();
|
|
19
20
|
const context = useFlexibleUiContext();
|
|
20
21
|
const invoke = useInvokeClientAction({});
|
|
21
22
|
const data = context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.PreviewAction];
|
|
@@ -35,7 +36,7 @@ const PreviewAction = ({
|
|
|
35
36
|
return /*#__PURE__*/React.createElement(PanelRightIcon, _extends({
|
|
36
37
|
color: "currentColor",
|
|
37
38
|
spacing: "spacious",
|
|
38
|
-
label:
|
|
39
|
+
label: ""
|
|
39
40
|
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
40
41
|
size: props.iconSize
|
|
41
42
|
} : {}));
|
|
@@ -43,24 +44,26 @@ const PreviewAction = ({
|
|
|
43
44
|
return /*#__PURE__*/React.createElement(MediaServicesActualSizeIcon, _extends({
|
|
44
45
|
color: "currentColor",
|
|
45
46
|
spacing: "spacious",
|
|
46
|
-
label:
|
|
47
|
+
label: ""
|
|
47
48
|
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
48
49
|
size: props.iconSize
|
|
49
50
|
} : {}));
|
|
50
51
|
}, [hasPreviewPanel, props.iconSize, isRovoBlockCardExperimentEnabled]);
|
|
51
|
-
const actionLabel =
|
|
52
|
+
const actionLabel = useMemo(() => {
|
|
52
53
|
// Only use panel message if experiment is enabled and hasPreviewPanel is true
|
|
53
54
|
if (expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') && hasPreviewPanel) {
|
|
54
|
-
return
|
|
55
|
+
return messages.preview_panel;
|
|
55
56
|
}
|
|
56
57
|
// Fall back to modal message if experiment is enabled, otherwise use original preview message
|
|
57
58
|
if (expValEquals('platform_hover_card_preview_panel', 'cohort', 'test')) {
|
|
58
|
-
return
|
|
59
|
+
return messages.preview_modal;
|
|
59
60
|
}
|
|
60
|
-
return
|
|
61
|
+
return messages.preview_improved;
|
|
61
62
|
}, [hasPreviewPanel]);
|
|
63
|
+
const actionMessage = intl.formatMessage(actionLabel);
|
|
62
64
|
return data ? /*#__PURE__*/React.createElement(Action, _extends({
|
|
63
|
-
|
|
65
|
+
ariaLabel: actionMessage,
|
|
66
|
+
content: actionMessage,
|
|
64
67
|
icon: actionIcon(),
|
|
65
68
|
onClick: onClick,
|
|
66
69
|
testId: "smart-action-preview-action",
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import ClockIcon from '@atlaskit/icon/core/clock';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
const RelatedLinksActionIcon = ({
|
|
5
4
|
iconSize
|
|
6
5
|
}) => /*#__PURE__*/React.createElement(ClockIcon, {
|
|
7
6
|
color: "currentColor",
|
|
8
7
|
spacing: "spacious",
|
|
9
|
-
label:
|
|
8
|
+
label: '',
|
|
10
9
|
size: iconSize
|
|
11
10
|
});
|
|
12
11
|
export default RelatedLinksActionIcon;
|
|
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
9
9
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
10
10
|
const PACKAGE_DATA = {
|
|
11
11
|
packageName: "@atlaskit/smart-card",
|
|
12
|
-
packageVersion: "45.2.
|
|
12
|
+
packageVersion: "45.2.1",
|
|
13
13
|
componentName: 'linkUrl'
|
|
14
14
|
};
|
|
15
15
|
const LinkUrl = ({
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card" || '',
|
|
7
|
-
packageVersion: "45.2.
|
|
7
|
+
packageVersion: "45.2.1" || ''
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -8,7 +8,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
8
8
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
10
|
import React, { useCallback, useState } from 'react';
|
|
11
|
-
import { FormattedMessage } from 'react-intl';
|
|
11
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
12
12
|
import LinkIcon from '@atlaskit/icon/core/link';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
14
|
import { ActionName } from '../../../../../constants';
|
|
@@ -21,6 +21,7 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
|
|
|
21
21
|
var _context$actions;
|
|
22
22
|
var onClickCallback = _ref.onClick,
|
|
23
23
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
24
|
+
var intl = useIntl();
|
|
24
25
|
var context = useFlexibleUiContext();
|
|
25
26
|
var invoke = useInvokeClientAction({});
|
|
26
27
|
var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.CopyLinkAction];
|
|
@@ -58,10 +59,11 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
|
|
|
58
59
|
}
|
|
59
60
|
}, [data, invoke, onClickCallback]);
|
|
60
61
|
return data ? /*#__PURE__*/React.createElement(Action, _extends({
|
|
62
|
+
ariaLabel: intl.formatMessage(messages.copy_url_to_clipboard),
|
|
61
63
|
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.copy_url_to_clipboard),
|
|
62
64
|
icon: /*#__PURE__*/React.createElement(LinkIcon, _extends({
|
|
63
65
|
color: "currentColor",
|
|
64
|
-
label:
|
|
66
|
+
label: "",
|
|
65
67
|
spacing: "spacious"
|
|
66
68
|
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
67
69
|
size: props.iconSize
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["onClick"];
|
|
4
|
-
import React, { useCallback } from 'react';
|
|
5
|
-
import { FormattedMessage } from 'react-intl';
|
|
4
|
+
import React, { useCallback, useMemo } from 'react';
|
|
5
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
6
6
|
import MediaServicesActualSizeIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
7
7
|
import PanelRightIcon from '@atlaskit/icon/core/panel-right';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -17,6 +17,7 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
17
17
|
var _context$actions;
|
|
18
18
|
var onClickCallback = _ref.onClick,
|
|
19
19
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
var intl = useIntl();
|
|
20
21
|
var context = useFlexibleUiContext();
|
|
21
22
|
var invoke = useInvokeClientAction({});
|
|
22
23
|
var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.PreviewAction];
|
|
@@ -36,7 +37,7 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
36
37
|
return /*#__PURE__*/React.createElement(PanelRightIcon, _extends({
|
|
37
38
|
color: "currentColor",
|
|
38
39
|
spacing: "spacious",
|
|
39
|
-
label:
|
|
40
|
+
label: ""
|
|
40
41
|
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
41
42
|
size: props.iconSize
|
|
42
43
|
} : {}));
|
|
@@ -44,24 +45,26 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
44
45
|
return /*#__PURE__*/React.createElement(MediaServicesActualSizeIcon, _extends({
|
|
45
46
|
color: "currentColor",
|
|
46
47
|
spacing: "spacious",
|
|
47
|
-
label:
|
|
48
|
+
label: ""
|
|
48
49
|
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
49
50
|
size: props.iconSize
|
|
50
51
|
} : {}));
|
|
51
52
|
}, [hasPreviewPanel, props.iconSize, isRovoBlockCardExperimentEnabled]);
|
|
52
|
-
var actionLabel =
|
|
53
|
+
var actionLabel = useMemo(function () {
|
|
53
54
|
// Only use panel message if experiment is enabled and hasPreviewPanel is true
|
|
54
55
|
if (expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') && hasPreviewPanel) {
|
|
55
|
-
return
|
|
56
|
+
return messages.preview_panel;
|
|
56
57
|
}
|
|
57
58
|
// Fall back to modal message if experiment is enabled, otherwise use original preview message
|
|
58
59
|
if (expValEquals('platform_hover_card_preview_panel', 'cohort', 'test')) {
|
|
59
|
-
return
|
|
60
|
+
return messages.preview_modal;
|
|
60
61
|
}
|
|
61
|
-
return
|
|
62
|
+
return messages.preview_improved;
|
|
62
63
|
}, [hasPreviewPanel]);
|
|
64
|
+
var actionMessage = intl.formatMessage(actionLabel);
|
|
63
65
|
return data ? /*#__PURE__*/React.createElement(Action, _extends({
|
|
64
|
-
|
|
66
|
+
ariaLabel: actionMessage,
|
|
67
|
+
content: actionMessage,
|
|
65
68
|
icon: actionIcon(),
|
|
66
69
|
onClick: onClick,
|
|
67
70
|
testId: "smart-action-preview-action",
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import ClockIcon from '@atlaskit/icon/core/clock';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
var RelatedLinksActionIcon = function RelatedLinksActionIcon(_ref) {
|
|
5
4
|
var iconSize = _ref.iconSize;
|
|
6
5
|
return /*#__PURE__*/React.createElement(ClockIcon, {
|
|
7
6
|
color: "currentColor",
|
|
8
7
|
spacing: "spacious",
|
|
9
|
-
label:
|
|
8
|
+
label: '',
|
|
10
9
|
size: iconSize
|
|
11
10
|
});
|
|
12
11
|
};
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
var PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "45.2.
|
|
15
|
+
packageVersion: "45.2.1",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
var LinkUrl = function LinkUrl(_ref) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "45.2.
|
|
3
|
+
"version": "45.2.2",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@atlaskit/popup": "^5.0.0",
|
|
79
79
|
"@atlaskit/primitives": "^20.0.0",
|
|
80
80
|
"@atlaskit/react-ufo": "^7.1.0",
|
|
81
|
-
"@atlaskit/rovo-triggers": "^9.
|
|
81
|
+
"@atlaskit/rovo-triggers": "^9.2.0",
|
|
82
82
|
"@atlaskit/section-message": "^9.0.0",
|
|
83
83
|
"@atlaskit/select": "^22.0.0",
|
|
84
84
|
"@atlaskit/spinner": "^20.0.0",
|
|
@@ -206,9 +206,6 @@
|
|
|
206
206
|
"navx-1895-new-logo-design": {
|
|
207
207
|
"type": "boolean"
|
|
208
208
|
},
|
|
209
|
-
"navx-3698-flexible-card-a11y-fix": {
|
|
210
|
-
"type": "boolean"
|
|
211
|
-
},
|
|
212
209
|
"jfp-magma-platform-lozenge-jump-fix": {
|
|
213
210
|
"type": "boolean"
|
|
214
211
|
},
|