@atlaskit/smart-card 43.20.1 → 43.20.3
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 +18 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/EmbedCard/views/unresolved-view/index.compiled.css +2 -3
- package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +4 -4
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +11 -1
- package/dist/cjs/view/InlineCard/UnauthorisedView/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/EmbedCard/views/unresolved-view/index.compiled.css +2 -3
- package/dist/es2019/view/EmbedCard/views/unresolved-view/index.js +4 -4
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +12 -1
- package/dist/es2019/view/InlineCard/UnauthorisedView/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/EmbedCard/views/unresolved-view/index.compiled.css +2 -3
- package/dist/esm/view/EmbedCard/views/unresolved-view/index.js +4 -4
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +11 -1
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +1 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/package.json +9 -9
- package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-unauthorised-view-with-no-auth--default--navx-2479-sl-fix-inilne-card-show-connect-button-false.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-unauthorised-view-with-no-auth--default--navx-2479-sl-fix-inilne-card-show-connect-button-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-unauthorised-view-with-no-auth--default--navx-2479-sl-fix-inilne-card-show-connect-button-false.png +0 -3
- /package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/{inline-card-unauthorised-view-with-no-auth--default--navx-2479-sl-fix-inilne-card-show-connect-button-true.png → inline-card-unauthorised-view-with-no-auth--default.png} +0 -0
- /package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/{inline-card-unauthorised-view-with-no-auth--default--navx-2479-sl-fix-inilne-card-show-connect-button-true.png → inline-card-unauthorised-view-with-no-auth--default.png} +0 -0
- /package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/{inline-card-unauthorised-view-with-no-auth--default--navx-2479-sl-fix-inilne-card-show-connect-button-true.png → inline-card-unauthorised-view-with-no-auth--default.png} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 43.20.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9067b62fb8190`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9067b62fb8190) -
|
|
8
|
+
FG cleanup navx-2479-sl-fix-inilne-card-show-connect-button
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 43.20.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`370c2ca23ca71`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/370c2ca23ca71) -
|
|
16
|
+
NAVX-2811 adding alt text to embed modal icon
|
|
17
|
+
- [`bdcd4b4374105`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bdcd4b4374105) -
|
|
18
|
+
Minor improvements to how styles are applied.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 43.20.1
|
|
4
22
|
|
|
5
23
|
### 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: "43.20.
|
|
14
|
+
packageVersion: "43.20.2"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
._zulpv47k{gap:var(--ds-space-250,20px)}
|
|
3
|
-
._18u01wug{margin-left:auto}
|
|
1
|
+
|
|
2
|
+
._zulpv47k{gap:var(--ds-space-250,20px)}._18u01wug{margin-left:auto}
|
|
4
3
|
._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
|
|
5
4
|
._19pk1wug{margin-top:auto}
|
|
6
5
|
._1bah1h6o{justify-content:center}
|
|
@@ -12,12 +12,12 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
14
14
|
var _link = _interopRequireDefault(require("@atlaskit/icon/core/link"));
|
|
15
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
15
16
|
var _ExpandedFrame = require("../../components/ExpandedFrame");
|
|
16
17
|
var _ImageIcon = require("../../components/ImageIcon");
|
|
17
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
18
19
|
var containerStyles = null;
|
|
19
20
|
var contentStyles = null;
|
|
20
|
-
var descriptionStyles = null;
|
|
21
21
|
var imageStyles = null;
|
|
22
22
|
var UnresolvedView = function UnresolvedView(_ref) {
|
|
23
23
|
var button = _ref.button,
|
|
@@ -91,9 +91,9 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
91
91
|
}, image, /*#__PURE__*/_react.default.createElement(_heading.default, {
|
|
92
92
|
size: "large",
|
|
93
93
|
testId: "".concat(testId, "-unresolved-title")
|
|
94
|
-
}, title), /*#__PURE__*/_react.default.createElement(
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
}, title), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
95
|
+
align: "center",
|
|
96
|
+
testId: "".concat(testId, "-unresolved-description")
|
|
97
97
|
}, description), button)));
|
|
98
98
|
};
|
|
99
99
|
var _default = exports.default = UnresolvedView;
|
|
@@ -12,12 +12,20 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var React = _react;
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
+
var _reactIntlNext = require("react-intl-next");
|
|
15
16
|
var _reactRenderImage = _interopRequireDefault(require("react-render-image"));
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
18
|
var _loadingSkeleton = require("../loading-skeleton");
|
|
17
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
18
20
|
var styles = {
|
|
19
21
|
roundImg: "_2rko1rr0"
|
|
20
22
|
};
|
|
23
|
+
var messages = (0, _reactIntlNext.defineMessages)({
|
|
24
|
+
imageAltText: {
|
|
25
|
+
id: 'smart-link.image-icon.altText',
|
|
26
|
+
defaultMessage: 'Link Icon'
|
|
27
|
+
}
|
|
28
|
+
});
|
|
21
29
|
var ImageIcon = function ImageIcon(_ref) {
|
|
22
30
|
var defaultIcon = _ref.defaultIcon,
|
|
23
31
|
testId = _ref.testId,
|
|
@@ -34,6 +42,8 @@ var ImageIcon = function ImageIcon(_ref) {
|
|
|
34
42
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
35
43
|
hasImageErrored = _useState2[0],
|
|
36
44
|
setHasImageErrored = _useState2[1];
|
|
45
|
+
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
46
|
+
formatMessage = _useIntl.formatMessage;
|
|
37
47
|
|
|
38
48
|
// If url changes, reset state
|
|
39
49
|
(0, _react.useEffect)(function () {
|
|
@@ -67,7 +77,7 @@ var ImageIcon = function ImageIcon(_ref) {
|
|
|
67
77
|
loaded: /*#__PURE__*/React.createElement("img", {
|
|
68
78
|
src: url,
|
|
69
79
|
"data-testid": "".concat(testId, "-image"),
|
|
70
|
-
alt: "",
|
|
80
|
+
alt: (0, _platformFeatureFlags.fg)('navx-2811-smart-link-a11y-image-alt') ? formatMessage(messages.imageAltText) : "",
|
|
71
81
|
style: {
|
|
72
82
|
width: width,
|
|
73
83
|
height: height
|
|
@@ -11,7 +11,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _reactIntlNext = require("react-intl-next");
|
|
13
13
|
var _lockLocked = _interopRequireDefault(require("@atlaskit/icon/core/lock-locked"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
16
15
|
var _useAnalyticsEvents2 = require("../../../common/analytics/generated/use-analytics-events");
|
|
17
16
|
var _messages = require("../../../messages");
|
|
@@ -72,7 +71,7 @@ var InlineCardUnauthorizedView = exports.InlineCardUnauthorizedView = function I
|
|
|
72
71
|
link: url,
|
|
73
72
|
onClick: onClick,
|
|
74
73
|
titleColor: "var(--ds-text-subtle, ".concat(_colors.N500, ")")
|
|
75
|
-
}),
|
|
74
|
+
}), onAuthorise && renderActionButton());
|
|
76
75
|
if (onAuthorise && showHoverPreview) {
|
|
77
76
|
return /*#__PURE__*/_react.default.createElement(_HoverCard.HoverCard, {
|
|
78
77
|
url: url,
|
|
@@ -22,7 +22,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
22
22
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
23
23
|
var PACKAGE_DATA = {
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "43.20.
|
|
25
|
+
packageVersion: "43.20.2",
|
|
26
26
|
componentName: 'linkUrl'
|
|
27
27
|
};
|
|
28
28
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -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: "43.20.
|
|
5
|
+
packageVersion: "43.20.2"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
._zulpv47k{gap:var(--ds-space-250,20px)}
|
|
3
|
-
._18u01wug{margin-left:auto}
|
|
1
|
+
|
|
2
|
+
._zulpv47k{gap:var(--ds-space-250,20px)}._18u01wug{margin-left:auto}
|
|
4
3
|
._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
|
|
5
4
|
._19pk1wug{margin-top:auto}
|
|
6
5
|
._1bah1h6o{justify-content:center}
|
|
@@ -4,11 +4,11 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
5
|
import Heading from '@atlaskit/heading';
|
|
6
6
|
import LinkGlyph from '@atlaskit/icon/core/link';
|
|
7
|
+
import { Text } from '@atlaskit/primitives/compiled';
|
|
7
8
|
import { ExpandedFrame } from '../../components/ExpandedFrame';
|
|
8
9
|
import { ImageIcon } from '../../components/ImageIcon';
|
|
9
10
|
const containerStyles = null;
|
|
10
11
|
const contentStyles = null;
|
|
11
|
-
const descriptionStyles = null;
|
|
12
12
|
const imageStyles = null;
|
|
13
13
|
const UnresolvedView = ({
|
|
14
14
|
button,
|
|
@@ -83,9 +83,9 @@ const UnresolvedView = ({
|
|
|
83
83
|
}, image, /*#__PURE__*/React.createElement(Heading, {
|
|
84
84
|
size: "large",
|
|
85
85
|
testId: `${testId}-unresolved-title`
|
|
86
|
-
}, title), /*#__PURE__*/React.createElement(
|
|
87
|
-
"
|
|
88
|
-
|
|
86
|
+
}, title), /*#__PURE__*/React.createElement(Text, {
|
|
87
|
+
align: "center",
|
|
88
|
+
testId: `${testId}-unresolved-description`
|
|
89
89
|
}, description), button)));
|
|
90
90
|
};
|
|
91
91
|
export default UnresolvedView;
|
|
@@ -3,11 +3,19 @@ import "./index.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useEffect, useState } from 'react';
|
|
6
|
+
import { defineMessages, useIntl } from 'react-intl-next';
|
|
6
7
|
import ImageLoader from 'react-render-image';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
9
|
import { LoadingSkeleton } from '../loading-skeleton';
|
|
8
10
|
const styles = {
|
|
9
11
|
roundImg: "_2rko1rr0"
|
|
10
12
|
};
|
|
13
|
+
const messages = defineMessages({
|
|
14
|
+
imageAltText: {
|
|
15
|
+
id: 'smart-link.image-icon.altText',
|
|
16
|
+
defaultMessage: 'Link Icon'
|
|
17
|
+
}
|
|
18
|
+
});
|
|
11
19
|
const ImageIcon = ({
|
|
12
20
|
defaultIcon,
|
|
13
21
|
testId,
|
|
@@ -20,6 +28,9 @@ const ImageIcon = ({
|
|
|
20
28
|
hideLoadingSkeleton = false
|
|
21
29
|
}) => {
|
|
22
30
|
const [hasImageErrored, setHasImageErrored] = useState(false);
|
|
31
|
+
const {
|
|
32
|
+
formatMessage
|
|
33
|
+
} = useIntl();
|
|
23
34
|
|
|
24
35
|
// If url changes, reset state
|
|
25
36
|
useEffect(() => {
|
|
@@ -51,7 +62,7 @@ const ImageIcon = ({
|
|
|
51
62
|
loaded: /*#__PURE__*/React.createElement("img", {
|
|
52
63
|
src: url,
|
|
53
64
|
"data-testid": `${testId}-image`,
|
|
54
|
-
alt: "",
|
|
65
|
+
alt: fg('navx-2811-smart-link-a11y-image-alt') ? formatMessage(messages.imageAltText) : "",
|
|
55
66
|
style: {
|
|
56
67
|
width,
|
|
57
68
|
height
|
|
@@ -4,7 +4,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
6
|
import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { N500 } from '@atlaskit/theme/colors';
|
|
9
8
|
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
10
9
|
import { messages } from '../../../messages';
|
|
@@ -65,7 +64,7 @@ export const InlineCardUnauthorizedView = ({
|
|
|
65
64
|
link: url,
|
|
66
65
|
onClick: onClick,
|
|
67
66
|
titleColor: `var(--ds-text-subtle, ${N500})`
|
|
68
|
-
}),
|
|
67
|
+
}), onAuthorise && renderActionButton());
|
|
69
68
|
if (onAuthorise && showHoverPreview) {
|
|
70
69
|
return /*#__PURE__*/React.createElement(HoverCard, {
|
|
71
70
|
url: url,
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
const PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "43.20.
|
|
15
|
+
packageVersion: "43.20.2",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -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: "43.20.
|
|
7
|
+
packageVersion: "43.20.2"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
._zulpv47k{gap:var(--ds-space-250,20px)}
|
|
3
|
-
._18u01wug{margin-left:auto}
|
|
1
|
+
|
|
2
|
+
._zulpv47k{gap:var(--ds-space-250,20px)}._18u01wug{margin-left:auto}
|
|
4
3
|
._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
|
|
5
4
|
._19pk1wug{margin-top:auto}
|
|
6
5
|
._1bah1h6o{justify-content:center}
|
|
@@ -4,11 +4,11 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
5
|
import Heading from '@atlaskit/heading';
|
|
6
6
|
import LinkGlyph from '@atlaskit/icon/core/link';
|
|
7
|
+
import { Text } from '@atlaskit/primitives/compiled';
|
|
7
8
|
import { ExpandedFrame } from '../../components/ExpandedFrame';
|
|
8
9
|
import { ImageIcon } from '../../components/ImageIcon';
|
|
9
10
|
var containerStyles = null;
|
|
10
11
|
var contentStyles = null;
|
|
11
|
-
var descriptionStyles = null;
|
|
12
12
|
var imageStyles = null;
|
|
13
13
|
var UnresolvedView = function UnresolvedView(_ref) {
|
|
14
14
|
var button = _ref.button,
|
|
@@ -82,9 +82,9 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
82
82
|
}, image, /*#__PURE__*/React.createElement(Heading, {
|
|
83
83
|
size: "large",
|
|
84
84
|
testId: "".concat(testId, "-unresolved-title")
|
|
85
|
-
}, title), /*#__PURE__*/React.createElement(
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
}, title), /*#__PURE__*/React.createElement(Text, {
|
|
86
|
+
align: "center",
|
|
87
|
+
testId: "".concat(testId, "-unresolved-description")
|
|
88
88
|
}, description), button)));
|
|
89
89
|
};
|
|
90
90
|
export default UnresolvedView;
|
|
@@ -4,11 +4,19 @@ import "./index.compiled.css";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useEffect, useState } from 'react';
|
|
7
|
+
import { defineMessages, useIntl } from 'react-intl-next';
|
|
7
8
|
import ImageLoader from 'react-render-image';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
10
|
import { LoadingSkeleton } from '../loading-skeleton';
|
|
9
11
|
var styles = {
|
|
10
12
|
roundImg: "_2rko1rr0"
|
|
11
13
|
};
|
|
14
|
+
var messages = defineMessages({
|
|
15
|
+
imageAltText: {
|
|
16
|
+
id: 'smart-link.image-icon.altText',
|
|
17
|
+
defaultMessage: 'Link Icon'
|
|
18
|
+
}
|
|
19
|
+
});
|
|
12
20
|
var ImageIcon = function ImageIcon(_ref) {
|
|
13
21
|
var defaultIcon = _ref.defaultIcon,
|
|
14
22
|
testId = _ref.testId,
|
|
@@ -25,6 +33,8 @@ var ImageIcon = function ImageIcon(_ref) {
|
|
|
25
33
|
_useState2 = _slicedToArray(_useState, 2),
|
|
26
34
|
hasImageErrored = _useState2[0],
|
|
27
35
|
setHasImageErrored = _useState2[1];
|
|
36
|
+
var _useIntl = useIntl(),
|
|
37
|
+
formatMessage = _useIntl.formatMessage;
|
|
28
38
|
|
|
29
39
|
// If url changes, reset state
|
|
30
40
|
useEffect(function () {
|
|
@@ -58,7 +68,7 @@ var ImageIcon = function ImageIcon(_ref) {
|
|
|
58
68
|
loaded: /*#__PURE__*/React.createElement("img", {
|
|
59
69
|
src: url,
|
|
60
70
|
"data-testid": "".concat(testId, "-image"),
|
|
61
|
-
alt: "",
|
|
71
|
+
alt: fg('navx-2811-smart-link-a11y-image-alt') ? formatMessage(messages.imageAltText) : "",
|
|
62
72
|
style: {
|
|
63
73
|
width: width,
|
|
64
74
|
height: height
|
|
@@ -4,7 +4,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
6
|
import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { N500 } from '@atlaskit/theme/colors';
|
|
9
8
|
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
10
9
|
import { messages } from '../../../messages';
|
|
@@ -65,7 +64,7 @@ export var InlineCardUnauthorizedView = function InlineCardUnauthorizedView(_ref
|
|
|
65
64
|
link: url,
|
|
66
65
|
onClick: onClick,
|
|
67
66
|
titleColor: "var(--ds-text-subtle, ".concat(N500, ")")
|
|
68
|
-
}),
|
|
67
|
+
}), onAuthorise && renderActionButton());
|
|
69
68
|
if (onAuthorise && showHoverPreview) {
|
|
70
69
|
return /*#__PURE__*/React.createElement(HoverCard, {
|
|
71
70
|
url: url,
|
|
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
15
15
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
16
16
|
var PACKAGE_DATA = {
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "43.20.
|
|
18
|
+
packageVersion: "43.20.2",
|
|
19
19
|
componentName: 'linkUrl'
|
|
20
20
|
};
|
|
21
21
|
var Anchor = withLinkClickedEvent('a');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "43.20.
|
|
3
|
+
"version": "43.20.3",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
"@atlaskit/link-test-helpers": "^9.0.0",
|
|
56
56
|
"@atlaskit/linking-common": "^9.9.0",
|
|
57
57
|
"@atlaskit/linking-types": "^14.2.0",
|
|
58
|
-
"@atlaskit/logo": "^19.
|
|
58
|
+
"@atlaskit/logo": "^19.10.0",
|
|
59
59
|
"@atlaskit/lozenge": "^13.3.0",
|
|
60
60
|
"@atlaskit/menu": "^8.4.0",
|
|
61
|
-
"@atlaskit/modal-dialog": "^14.
|
|
61
|
+
"@atlaskit/modal-dialog": "^14.10.0",
|
|
62
62
|
"@atlaskit/outbound-auth-flow-client": "^3.4.0",
|
|
63
63
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
64
64
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
@@ -71,9 +71,9 @@
|
|
|
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.
|
|
74
|
+
"@atlaskit/tmp-editor-statsig": "^16.19.0",
|
|
75
75
|
"@atlaskit/tokens": "^9.1.0",
|
|
76
|
-
"@atlaskit/tooltip": "^20.
|
|
76
|
+
"@atlaskit/tooltip": "^20.14.0",
|
|
77
77
|
"@atlaskit/ufo": "^0.4.0",
|
|
78
78
|
"@babel/runtime": "^7.0.0",
|
|
79
79
|
"@compiled/react": "^0.18.6",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"@atlaskit/analytics-listeners": "^9.2.0",
|
|
102
102
|
"@atlaskit/css-reset": "^7.3.0",
|
|
103
103
|
"@atlaskit/media-test-helpers": "^39.0.0",
|
|
104
|
-
"@atlaskit/react-ufo": "^4.
|
|
104
|
+
"@atlaskit/react-ufo": "^4.17.0",
|
|
105
105
|
"@atlaskit/ssr": "workspace:^",
|
|
106
106
|
"@atlassian/a11y-jest-testing": "^0.6.0",
|
|
107
107
|
"@atlassian/analytics-tooling": "workspace:^",
|
|
@@ -213,9 +213,6 @@
|
|
|
213
213
|
"expose-product-details-from-smart-card": {
|
|
214
214
|
"type": "boolean"
|
|
215
215
|
},
|
|
216
|
-
"navx-2479-sl-fix-inilne-card-show-connect-button": {
|
|
217
|
-
"type": "boolean"
|
|
218
|
-
},
|
|
219
216
|
"townsquare-same-tab-alignment-gcko-849": {
|
|
220
217
|
"type": "boolean"
|
|
221
218
|
},
|
|
@@ -240,6 +237,9 @@
|
|
|
240
237
|
"navx-2816-a11y-fix-smart-links-headings": {
|
|
241
238
|
"type": "boolean"
|
|
242
239
|
},
|
|
240
|
+
"navx-2811-smart-link-a11y-image-alt": {
|
|
241
|
+
"type": "boolean"
|
|
242
|
+
},
|
|
243
243
|
"navx-2185-smart-link-preview-modal-icon-role": {
|
|
244
244
|
"type": "boolean"
|
|
245
245
|
}
|
|
File without changes
|
|
File without changes
|