@atlaskit/smart-card 34.1.0 → 34.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 +16 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/EmbedCard/components/IFrame.js +6 -3
- package/dist/cjs/view/EmbedModal/components/embed-content/index.compiled.css +2 -0
- package/dist/cjs/view/EmbedModal/components/embed-content/index.js +23 -14
- package/dist/cjs/view/EmbedModal/components/embed-content/indexOld.js +37 -0
- package/dist/cjs/view/EmbedModal/components/link-info/index.compiled.css +35 -0
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +58 -49
- package/dist/cjs/view/EmbedModal/components/link-info/indexOld.js +131 -0
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +9 -11
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/LoadingSkeletonOld.js +52 -0
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.compiled.css +15 -0
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +27 -38
- package/dist/cjs/view/FlexibleCard/components/container/index.compiled.css +38 -0
- package/dist/cjs/view/FlexibleCard/components/container/index.js +94 -87
- package/dist/cjs/view/FlexibleCard/components/container/indexOld.js +226 -0
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/LayeredLinkOld.js +75 -0
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.compiled.css +11 -0
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +20 -46
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/EmbedCard/components/IFrame.js +5 -2
- package/dist/es2019/view/EmbedModal/components/embed-content/index.compiled.css +2 -0
- package/dist/es2019/view/EmbedModal/components/embed-content/index.js +19 -13
- package/dist/es2019/view/EmbedModal/components/embed-content/indexOld.js +31 -0
- package/dist/es2019/view/EmbedModal/components/link-info/index.compiled.css +35 -0
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +59 -49
- package/dist/es2019/view/EmbedModal/components/link-info/indexOld.js +122 -0
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +6 -10
- package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/LoadingSkeletonOld.js +46 -0
- package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.compiled.css +15 -0
- package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +22 -37
- package/dist/es2019/view/FlexibleCard/components/container/index.compiled.css +38 -0
- package/dist/es2019/view/FlexibleCard/components/container/index.js +88 -105
- package/dist/es2019/view/FlexibleCard/components/container/indexOld.js +229 -0
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/LayeredLinkOld.js +69 -0
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.compiled.css +11 -0
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +16 -45
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/EmbedCard/components/IFrame.js +6 -3
- package/dist/esm/view/EmbedModal/components/embed-content/index.compiled.css +2 -0
- package/dist/esm/view/EmbedModal/components/embed-content/index.js +19 -13
- package/dist/esm/view/EmbedModal/components/embed-content/indexOld.js +30 -0
- package/dist/esm/view/EmbedModal/components/link-info/index.compiled.css +35 -0
- package/dist/esm/view/EmbedModal/components/link-info/index.js +59 -49
- package/dist/esm/view/EmbedModal/components/link-info/indexOld.js +120 -0
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +6 -10
- package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/LoadingSkeletonOld.js +45 -0
- package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.compiled.css +15 -0
- package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +23 -37
- package/dist/esm/view/FlexibleCard/components/container/index.compiled.css +38 -0
- package/dist/esm/view/FlexibleCard/components/container/index.js +88 -87
- package/dist/esm/view/FlexibleCard/components/container/indexOld.js +217 -0
- package/dist/esm/view/FlexibleCard/components/container/layered-link/LayeredLinkOld.js +68 -0
- package/dist/esm/view/FlexibleCard/components/container/layered-link/index.compiled.css +11 -0
- package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +16 -45
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/EmbedCard/components/IFrame.d.ts +2 -1
- package/dist/types/view/EmbedModal/components/embed-content/index.d.ts +3 -7
- package/dist/types/view/EmbedModal/components/embed-content/indexOld.d.ts +8 -0
- package/dist/types/view/EmbedModal/components/link-info/index.d.ts +3 -3
- package/dist/types/view/EmbedModal/components/link-info/indexOld.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/common/image-icon/index.d.ts +2 -6
- package/dist/types/view/FlexibleCard/components/common/loading-skeleton/LoadingSkeletonOld.d.ts +8 -0
- package/dist/types/view/FlexibleCard/components/common/loading-skeleton/index.d.ts +2 -6
- package/dist/types/view/FlexibleCard/components/container/index.d.ts +10 -10
- package/dist/types/view/FlexibleCard/components/container/indexOld.d.ts +24 -0
- package/dist/types/view/FlexibleCard/components/container/layered-link/LayeredLinkOld.d.ts +13 -0
- package/dist/types/view/FlexibleCard/components/container/layered-link/index.d.ts +2 -11
- package/dist/types/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedCard/components/IFrame.d.ts +2 -1
- package/dist/types-ts4.5/view/EmbedModal/components/embed-content/index.d.ts +3 -7
- package/dist/types-ts4.5/view/EmbedModal/components/embed-content/indexOld.d.ts +8 -0
- package/dist/types-ts4.5/view/EmbedModal/components/link-info/index.d.ts +3 -3
- package/dist/types-ts4.5/view/EmbedModal/components/link-info/indexOld.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/common/image-icon/index.d.ts +2 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/common/loading-skeleton/LoadingSkeletonOld.d.ts +8 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/common/loading-skeleton/index.d.ts +2 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/container/index.d.ts +10 -10
- package/dist/types-ts4.5/view/FlexibleCard/components/container/indexOld.d.ts +24 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/container/layered-link/LayeredLinkOld.d.ts +13 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/container/layered-link/index.d.ts +2 -11
- package/dist/types-ts4.5/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
- package/package.json +1 -1
- /package/dist/cjs/view/EmbedModal/components/link-info/{styled.js → styledOld.js} +0 -0
- /package/dist/es2019/view/EmbedModal/components/link-info/{styled.js → styledOld.js} +0 -0
- /package/dist/esm/view/EmbedModal/components/link-info/{styled.js → styledOld.js} +0 -0
- /package/dist/types/view/EmbedModal/components/link-info/{styled.d.ts → styledOld.d.ts} +0 -0
- /package/dist/types-ts4.5/view/EmbedModal/components/link-info/{styled.d.ts → styledOld.d.ts} +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _useLinkClicked = require("../../../../../state/analytics/useLinkClicked");
|
|
9
|
+
/**
|
|
10
|
+
* @jsxRuntime classic
|
|
11
|
+
* @jsx jsx
|
|
12
|
+
*/
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
|
+
|
|
15
|
+
var styles = (0, _react.css)({
|
|
16
|
+
// Stretch the invisible link over the whole of the post.
|
|
17
|
+
// Hide the link’s text.
|
|
18
|
+
top: 0,
|
|
19
|
+
right: 0,
|
|
20
|
+
bottom: 0,
|
|
21
|
+
left: 0,
|
|
22
|
+
overflow: 'hidden',
|
|
23
|
+
textIndent: '100%',
|
|
24
|
+
whiteSpace: 'nowrap',
|
|
25
|
+
// Needs a heightened specificity to trump other anchor.
|
|
26
|
+
// Stack it under all other links in the post text.
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
28
|
+
'a&.layered-link': {
|
|
29
|
+
position: 'absolute',
|
|
30
|
+
zIndex: 0
|
|
31
|
+
},
|
|
32
|
+
// When hovering over the layered link, any hidden action buttons inside
|
|
33
|
+
// the Container should become visible.
|
|
34
|
+
// As actions resides inside blocks and layered link is expected to be
|
|
35
|
+
// on the same level of blocks. That makes the blocks, e.g. TitleBlock,
|
|
36
|
+
// its sibling. Using general sibling combinator here to apply styling to
|
|
37
|
+
// all the siblings of layered link.
|
|
38
|
+
// The general sibling combinator (~) separates two selectors and matches all
|
|
39
|
+
// iterations of the second element, that are following the first element
|
|
40
|
+
// (though not necessarily immediately), and are children of the same parent
|
|
41
|
+
// element.
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
43
|
+
'&:hover ~ *': {
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
45
|
+
'.actions-button-group': {
|
|
46
|
+
opacity: 1
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* An anchor component to cover the entire container creating a clickable area.
|
|
53
|
+
* @internal
|
|
54
|
+
* @see `clickableContainer`
|
|
55
|
+
*/
|
|
56
|
+
var LayeredLinkOld = function LayeredLinkOld(_ref) {
|
|
57
|
+
var onClick = _ref.onClick,
|
|
58
|
+
target = _ref.target,
|
|
59
|
+
testId = _ref.testId,
|
|
60
|
+
text = _ref.text,
|
|
61
|
+
url = _ref.url;
|
|
62
|
+
var onMouseDown = (0, _useLinkClicked.useMouseDownEvent)();
|
|
63
|
+
return (0, _react.jsx)("a", {
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
65
|
+
className: "layered-link",
|
|
66
|
+
css: styles,
|
|
67
|
+
"data-testid": "".concat(testId, "-layered-link"),
|
|
68
|
+
href: url,
|
|
69
|
+
onClick: onClick,
|
|
70
|
+
onMouseDown: onMouseDown,
|
|
71
|
+
target: target,
|
|
72
|
+
tabIndex: -1 // Hide tab index and let the title link be the link.
|
|
73
|
+
}, text);
|
|
74
|
+
};
|
|
75
|
+
var _default = exports.default = LayeredLinkOld;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
._154iidpf{top:0}
|
|
2
|
+
._18m915vq{overflow-y:hidden}
|
|
3
|
+
._1ltvidpf{left:0}
|
|
4
|
+
._1reo15vq{overflow-x:hidden}
|
|
5
|
+
._1xi2idpf{right:0}
|
|
6
|
+
._94n5idpf{bottom:0}
|
|
7
|
+
._a52dkb7n:hover~* .actions-button-group{opacity:1}
|
|
8
|
+
._azhw1osq{text-indent:100%}
|
|
9
|
+
._o5721q9c{white-space:nowrap}
|
|
10
|
+
a._hboxstnw.layered-link{position:absolute}
|
|
11
|
+
a._obkmidpf.layered-link{z-index:0}
|
|
@@ -1,69 +1,37 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
3
6
|
Object.defineProperty(exports, "__esModule", {
|
|
4
7
|
value: true
|
|
5
8
|
});
|
|
6
9
|
exports.default = void 0;
|
|
7
|
-
|
|
10
|
+
require("./index.compiled.css");
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _runtime = require("@compiled/react/runtime");
|
|
13
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
14
|
var _useLinkClicked = require("../../../../../state/analytics/useLinkClicked");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
|
-
|
|
15
|
-
var styles = (0, _react.css)({
|
|
16
|
-
// Stretch the invisible link over the whole of the post.
|
|
17
|
-
// Hide the link’s text.
|
|
18
|
-
top: 0,
|
|
19
|
-
right: 0,
|
|
20
|
-
bottom: 0,
|
|
21
|
-
left: 0,
|
|
22
|
-
overflow: 'hidden',
|
|
23
|
-
textIndent: '100%',
|
|
24
|
-
whiteSpace: 'nowrap',
|
|
25
|
-
// Needs a heightened specificity to trump other anchor.
|
|
26
|
-
// Stack it under all other links in the post text.
|
|
27
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
28
|
-
'a&.layered-link': {
|
|
29
|
-
position: 'absolute',
|
|
30
|
-
zIndex: 0
|
|
31
|
-
},
|
|
32
|
-
// When hovering over the layered link, any hidden action buttons inside
|
|
33
|
-
// the Container should become visible.
|
|
34
|
-
// As actions resides inside blocks and layered link is expected to be
|
|
35
|
-
// on the same level of blocks. That makes the blocks, e.g. TitleBlock,
|
|
36
|
-
// its sibling. Using general sibling combinator here to apply styling to
|
|
37
|
-
// all the siblings of layered link.
|
|
38
|
-
// The general sibling combinator (~) separates two selectors and matches all
|
|
39
|
-
// iterations of the second element, that are following the first element
|
|
40
|
-
// (though not necessarily immediately), and are children of the same parent
|
|
41
|
-
// element.
|
|
42
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
43
|
-
'&:hover ~ *': {
|
|
44
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
45
|
-
'.actions-button-group': {
|
|
46
|
-
opacity: 1
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
});
|
|
15
|
+
var _LayeredLinkOld = _interopRequireDefault(require("./LayeredLinkOld"));
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
+
var styles = null;
|
|
50
19
|
|
|
51
20
|
/**
|
|
52
21
|
* An anchor component to cover the entire container creating a clickable area.
|
|
53
22
|
* @internal
|
|
54
23
|
* @see `clickableContainer`
|
|
55
24
|
*/
|
|
56
|
-
var
|
|
25
|
+
var LayeredLinkNew = function LayeredLinkNew(_ref) {
|
|
57
26
|
var onClick = _ref.onClick,
|
|
58
27
|
target = _ref.target,
|
|
59
28
|
testId = _ref.testId,
|
|
60
29
|
text = _ref.text,
|
|
61
30
|
url = _ref.url;
|
|
62
31
|
var onMouseDown = (0, _useLinkClicked.useMouseDownEvent)();
|
|
63
|
-
return
|
|
32
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
64
33
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
65
|
-
className: "layered-link",
|
|
66
|
-
css: styles,
|
|
34
|
+
className: (0, _runtime.ax)(["_1reo15vq _18m915vq _154iidpf _1xi2idpf _94n5idpf _1ltvidpf _azhw1osq _o5721q9c _hboxstnw _obkmidpf _a52dkb7n", "layered-link"]),
|
|
67
35
|
"data-testid": "".concat(testId, "-layered-link"),
|
|
68
36
|
href: url,
|
|
69
37
|
onClick: onClick,
|
|
@@ -72,4 +40,10 @@ var LayeredLink = function LayeredLink(_ref) {
|
|
|
72
40
|
tabIndex: -1 // Hide tab index and let the title link be the link.
|
|
73
41
|
}, text);
|
|
74
42
|
};
|
|
43
|
+
var LayeredLink = function LayeredLink(props) {
|
|
44
|
+
if ((0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard')) {
|
|
45
|
+
return /*#__PURE__*/React.createElement(LayeredLinkNew, props);
|
|
46
|
+
}
|
|
47
|
+
return /*#__PURE__*/React.createElement(_LayeredLinkOld.default, props);
|
|
48
|
+
};
|
|
75
49
|
var _default = exports.default = LayeredLink;
|
|
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
20
20
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
21
21
|
var PACKAGE_DATA = {
|
|
22
22
|
packageName: "@atlaskit/smart-card",
|
|
23
|
-
packageVersion: "34.
|
|
23
|
+
packageVersion: "34.2.0",
|
|
24
24
|
componentName: 'linkUrl'
|
|
25
25
|
};
|
|
26
26
|
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: "34.
|
|
5
|
+
packageVersion: "34.2.0"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -5,10 +5,13 @@ import React from 'react';
|
|
|
5
5
|
*/
|
|
6
6
|
export const IFrame = ({
|
|
7
7
|
childRef,
|
|
8
|
+
className,
|
|
8
9
|
...props
|
|
9
10
|
}) => {
|
|
10
|
-
// eslint-disable-next-line jsx-a11y/iframe-has-title
|
|
11
|
-
return /*#__PURE__*/React.createElement("iframe", _extends({
|
|
11
|
+
// eslint-disable-next-line jsx-a11y/iframe-has-title,@atlaskit/ui-styling-standard/no-classname-prop
|
|
12
|
+
return /*#__PURE__*/React.createElement("iframe", _extends({
|
|
13
|
+
className: className
|
|
14
|
+
}, props, {
|
|
12
15
|
ref: childRef
|
|
13
16
|
}));
|
|
14
17
|
};
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { css, jsx } from '@emotion/react';
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./index.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
7
6
|
import { di } from 'react-magnetic-di';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
import { getIframeSandboxAttribute } from '../../../../utils';
|
|
9
9
|
import { IFrame } from '../../../EmbedCard/components/IFrame';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
height: 'calc(100vh - 208px)'
|
|
13
|
-
});
|
|
10
|
+
import EmbedContentOld from './indexOld';
|
|
11
|
+
const iframeCss = null;
|
|
14
12
|
const EmbedContent = ({
|
|
15
13
|
isTrusted,
|
|
16
14
|
name,
|
|
@@ -19,13 +17,21 @@ const EmbedContent = ({
|
|
|
19
17
|
}) => {
|
|
20
18
|
const sandbox = getIframeSandboxAttribute(isTrusted);
|
|
21
19
|
const props = {
|
|
22
|
-
css: iframeCss,
|
|
23
20
|
frameBorder: 0,
|
|
24
21
|
name,
|
|
25
22
|
sandbox,
|
|
26
23
|
src,
|
|
27
24
|
'data-testid': `${testId}-embed`
|
|
28
25
|
};
|
|
29
|
-
return
|
|
26
|
+
return /*#__PURE__*/React.createElement(IFrame, _extends({}, props, {
|
|
27
|
+
className: ax(["_1bsb1osq _4t3i815d"])
|
|
28
|
+
}));
|
|
30
29
|
};
|
|
31
|
-
|
|
30
|
+
const Exported = props => {
|
|
31
|
+
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
32
|
+
return /*#__PURE__*/React.createElement(EmbedContent, props);
|
|
33
|
+
} else {
|
|
34
|
+
return /*#__PURE__*/React.createElement(EmbedContentOld, props);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
export default Exported;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
7
|
+
import { di } from 'react-magnetic-di';
|
|
8
|
+
import { getIframeSandboxAttribute } from '../../../../utils';
|
|
9
|
+
import { IFrame } from '../../../EmbedCard/components/IFrame';
|
|
10
|
+
const iframeCss = css({
|
|
11
|
+
width: '100%',
|
|
12
|
+
height: 'calc(100vh - 208px)'
|
|
13
|
+
});
|
|
14
|
+
const EmbedContent = ({
|
|
15
|
+
isTrusted,
|
|
16
|
+
name,
|
|
17
|
+
src,
|
|
18
|
+
testId
|
|
19
|
+
}) => {
|
|
20
|
+
const sandbox = getIframeSandboxAttribute(isTrusted);
|
|
21
|
+
const props = {
|
|
22
|
+
css: iframeCss,
|
|
23
|
+
frameBorder: 0,
|
|
24
|
+
name,
|
|
25
|
+
sandbox,
|
|
26
|
+
src,
|
|
27
|
+
'data-testid': `${testId}-embed`
|
|
28
|
+
};
|
|
29
|
+
return jsx(IFrame, props);
|
|
30
|
+
};
|
|
31
|
+
export default EmbedContent;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
._1umo1bk4 h3{font:var(--ds-font-heading-small,normal 600 1pc/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
3
|
+
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
4
|
+
._zulpu2gc{gap:var(--ds-space-100,8px)}._101p15vq h3{overflow-x:hidden}
|
|
5
|
+
._12bo15vq h3{overflow-y:hidden}
|
|
6
|
+
._16jlidpf{flex-grow:0}
|
|
7
|
+
._16jlkb7n{flex-grow:1}
|
|
8
|
+
._19bv1ejb{padding-left:var(--ds-space-300,24px)}
|
|
9
|
+
._1bah1yb4{justify-content:space-between}
|
|
10
|
+
._1bsb1tcg, ._1xyl1tcg [data-smart-element-icon] img, ._1h1b1tcg [data-smart-element-icon] span, ._prfw1tcg [data-smart-element-icon] svg, ._mezj1tcg img, ._e2oo1tcg span, ._w8l51tcg svg{width:24px}
|
|
11
|
+
._1e0c1txw{display:flex}
|
|
12
|
+
._1flvcj1k h3{display:-webkit-box}
|
|
13
|
+
._1o9zidpf{flex-shrink:0}
|
|
14
|
+
._1o9zkb7n{flex-shrink:1}
|
|
15
|
+
._1r7d1hna h3{word-break:break-word}
|
|
16
|
+
._1tke1tcg, ._x9xj1tcg [data-smart-element-icon] img, ._v5981tcg [data-smart-element-icon] span, ._z15s1tcg [data-smart-element-icon] svg, ._qci81tcg img, ._15iz1tcg span, ._erub1tcg svg{min-height:24px}
|
|
17
|
+
._1ul91tcg, ._1ekg1tcg [data-smart-element-icon] img, ._jbhf1tcg [data-smart-element-icon] span, ._11hh1tcg [data-smart-element-icon] svg, ._1rg21tcg img, ._q7cv1tcg span, ._xwbj1tcg svg{min-width:24px}
|
|
18
|
+
._1wkfkb7n h3{flex-shrink:1}
|
|
19
|
+
._4cvr1h6o{align-items:center}
|
|
20
|
+
._4t3i1tcg, ._gire1tcg [data-smart-element-icon] img, ._yrry1tcg [data-smart-element-icon] span, ._1bnm1tcg [data-smart-element-icon] svg, ._bna71tcg img, ._1xjx1tcg span, ._17521tcg svg{height:24px}
|
|
21
|
+
._4wztidpf h3{margin-bottom:0}
|
|
22
|
+
._923e1wug h3{flex-basis:auto}
|
|
23
|
+
._c71l1tcg, ._1q121tcg [data-smart-element-icon] img, ._2s1x1tcg [data-smart-element-icon] span, ._1rh41tcg [data-smart-element-icon] svg, ._19l31tcg img, ._1pr21tcg span, ._1u5t1tcg svg{max-height:24px}
|
|
24
|
+
._c7bk1l2s h3{text-overflow:ellipsis}
|
|
25
|
+
._ca0q1ejb{padding-top:var(--ds-space-300,24px)}
|
|
26
|
+
._i0dl1wug{flex-basis:auto}
|
|
27
|
+
._n3tddlk8{padding-bottom:14px}
|
|
28
|
+
._p12f1tcg, ._1mj01tcg [data-smart-element-icon] img, ._1r9c1tcg [data-smart-element-icon] span, ._1xch1tcg [data-smart-element-icon] svg, ._rtys1tcg img, ._b8nk1tcg span, ._4x201tcg svg{max-width:24px}
|
|
29
|
+
._r8nti7a9 h3{font-weight:var(--ds-font-weight-regular,400)}
|
|
30
|
+
._shpw1e54 h3{-webkit-box-orient:vertical}
|
|
31
|
+
._u5f31ejb{padding-right:var(--ds-space-300,24px)}
|
|
32
|
+
._uepwkb7n h3{-webkit-line-clamp:1}
|
|
33
|
+
._yrj2kb7n h3{flex-grow:1}
|
|
34
|
+
@media only screen and (max-width:980px){._3kllglyw .smart-link-resize-button{display:none}}
|
|
35
|
+
@supports not (-webkit-line-clamp:1){._130wgktf h3{max-height:20px}}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
4
|
import React, { useMemo } from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { jsx } from '@emotion/react';
|
|
9
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
10
6
|
import Heading from '@atlaskit/heading';
|
|
11
7
|
import DownloadIcon from '@atlaskit/icon/core/download';
|
|
@@ -16,11 +12,22 @@ import ShortcutIcon from '@atlaskit/icon/core/migration/link-external--shortcut'
|
|
|
16
12
|
import DownloadIconLegacy from '@atlaskit/icon/glyph/download';
|
|
17
13
|
import VidFullScreenOffIcon from '@atlaskit/icon/glyph/vid-full-screen-off';
|
|
18
14
|
import { useModal } from '@atlaskit/modal-dialog';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
16
|
import { messages } from '../../../../messages';
|
|
20
17
|
import { Icon } from '../../../common/Icon';
|
|
21
18
|
import { MAX_MODAL_SIZE } from '../../constants';
|
|
19
|
+
import LinkInfoOld from './indexOld';
|
|
22
20
|
import LinkInfoButton from './link-info-button';
|
|
23
|
-
|
|
21
|
+
const containerStyles = null;
|
|
22
|
+
const iconSize = '24px';
|
|
23
|
+
|
|
24
|
+
// EDM-7328: CSS Specificity
|
|
25
|
+
// An embed modal icon css for img, span, svg has specificity weight of 0-1-1.
|
|
26
|
+
// Specify flex ui icon selector to increase specificity weight to 0-2-1.
|
|
27
|
+
const iconCss = null;
|
|
28
|
+
const height = '20px';
|
|
29
|
+
const titleCss = null;
|
|
30
|
+
const actionCss = null;
|
|
24
31
|
const LinkInfo = ({
|
|
25
32
|
icon,
|
|
26
33
|
providerName,
|
|
@@ -36,9 +43,9 @@ const LinkInfo = ({
|
|
|
36
43
|
} = useModal();
|
|
37
44
|
const downloadButton = useMemo(() => {
|
|
38
45
|
if (onDownloadButtonClick) {
|
|
39
|
-
return
|
|
40
|
-
content:
|
|
41
|
-
icon:
|
|
46
|
+
return /*#__PURE__*/React.createElement(LinkInfoButton, {
|
|
47
|
+
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.download),
|
|
48
|
+
icon: /*#__PURE__*/React.createElement(DownloadIcon, {
|
|
42
49
|
label: messages.download.defaultMessage,
|
|
43
50
|
LEGACY_fallbackIcon: DownloadIconLegacy,
|
|
44
51
|
spacing: "spacious",
|
|
@@ -51,10 +58,10 @@ const LinkInfo = ({
|
|
|
51
58
|
}, [onDownloadButtonClick, testId]);
|
|
52
59
|
const urlButton = useMemo(() => {
|
|
53
60
|
if (onViewButtonClick) {
|
|
54
|
-
const content = providerName ?
|
|
55
|
-
return
|
|
61
|
+
const content = providerName ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.viewIn), " ", providerName) : /*#__PURE__*/React.createElement(FormattedMessage, messages.viewOriginal);
|
|
62
|
+
return /*#__PURE__*/React.createElement(LinkInfoButton, {
|
|
56
63
|
content: content,
|
|
57
|
-
icon:
|
|
64
|
+
icon: /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
58
65
|
label: messages.viewOriginal.defaultMessage,
|
|
59
66
|
spacing: "spacious",
|
|
60
67
|
color: "currentColor"
|
|
@@ -67,56 +74,59 @@ const LinkInfo = ({
|
|
|
67
74
|
const sizeButton = useMemo(() => {
|
|
68
75
|
const isFullScreen = size === MAX_MODAL_SIZE;
|
|
69
76
|
const message = isFullScreen ? messages.preview_min_size : messages.preview_max_size;
|
|
70
|
-
const icon = isFullScreen ?
|
|
77
|
+
const icon = isFullScreen ? /*#__PURE__*/React.createElement(FullscreenExitIcon, {
|
|
71
78
|
LEGACY_fallbackIcon: VidFullScreenOffIcon,
|
|
72
79
|
label: message.defaultMessage,
|
|
73
80
|
spacing: "spacious",
|
|
74
81
|
color: "currentColor"
|
|
75
|
-
}) :
|
|
82
|
+
}) : /*#__PURE__*/React.createElement(VidFullScreenOnIcon, {
|
|
76
83
|
label: message.defaultMessage,
|
|
77
84
|
spacing: "spacious",
|
|
78
85
|
color: "currentColor"
|
|
79
86
|
});
|
|
80
87
|
return (
|
|
88
|
+
/*#__PURE__*/
|
|
81
89
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
82
|
-
|
|
90
|
+
React.createElement("span", {
|
|
83
91
|
className: "smart-link-resize-button"
|
|
84
|
-
},
|
|
85
|
-
content:
|
|
92
|
+
}, /*#__PURE__*/React.createElement(LinkInfoButton, {
|
|
93
|
+
content: /*#__PURE__*/React.createElement(FormattedMessage, message),
|
|
86
94
|
icon: icon,
|
|
87
95
|
onClick: onResizeButtonClick,
|
|
88
96
|
testId: `${testId}-resize`
|
|
89
97
|
}))
|
|
90
98
|
);
|
|
91
99
|
}, [onResizeButtonClick, size, testId]);
|
|
92
|
-
return (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
100
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
101
|
+
className: ax(["_zulpu2gc _4cvr1h6o _1e0c1txw _1bah1yb4 _ca0q1ejb _u5f31ejb _n3tddlk8 _19bv1ejb"])
|
|
102
|
+
}, icon && /*#__PURE__*/React.createElement("div", {
|
|
103
|
+
"data-testid": `${testId}-icon`,
|
|
104
|
+
className: ax(["_4t3i1tcg _gire1tcg _yrry1tcg _1bnm1tcg _bna71tcg _1xjx1tcg _17521tcg _1tke1tcg _x9xj1tcg _v5981tcg _z15s1tcg _qci81tcg _15iz1tcg _erub1tcg _c71l1tcg _1q121tcg _2s1x1tcg _1rh41tcg _19l31tcg _1pr21tcg _1u5t1tcg _1bsb1tcg _1xyl1tcg _1h1b1tcg _prfw1tcg _mezj1tcg _e2oo1tcg _w8l51tcg _1ul91tcg _1ekg1tcg _jbhf1tcg _11hh1tcg _1rg21tcg _q7cv1tcg _xwbj1tcg _p12f1tcg _1mj01tcg _1r9c1tcg _1xch1tcg _rtys1tcg _b8nk1tcg _4x201tcg"])
|
|
105
|
+
}, /*#__PURE__*/React.createElement(Icon, icon)), /*#__PURE__*/React.createElement("div", {
|
|
106
|
+
className: ax(["_16jlkb7n _1o9zkb7n _i0dl1wug _yrj2kb7n _1wkfkb7n _923e1wug _1umo1bk4 _101p15vq _12bo15vq _r8nti7a9 _1flvcj1k _4wztidpf _c7bk1l2s _1r7d1hna _uepwkb7n _shpw1e54 _130wgktf"])
|
|
107
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
108
|
+
size: "medium",
|
|
109
|
+
testId: `${testId}-title`
|
|
110
|
+
}, title), /*#__PURE__*/React.createElement("span", {
|
|
111
|
+
tabIndex: 0
|
|
112
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
113
|
+
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug _zulp1b66 _1e0c1txw _3kllglyw"])
|
|
114
|
+
}, downloadButton, urlButton, sizeButton, /*#__PURE__*/React.createElement(LinkInfoButton, {
|
|
115
|
+
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.preview_close),
|
|
116
|
+
icon: /*#__PURE__*/React.createElement(CrossIcon, {
|
|
117
|
+
label: messages.preview_close.defaultMessage,
|
|
118
|
+
color: "currentColor",
|
|
119
|
+
spacing: "spacious"
|
|
120
|
+
}),
|
|
121
|
+
onClick: onClose,
|
|
122
|
+
testId: `${testId}-close`
|
|
123
|
+
})));
|
|
124
|
+
};
|
|
125
|
+
const Exported = props => {
|
|
126
|
+
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
127
|
+
return /*#__PURE__*/React.createElement(LinkInfo, props);
|
|
128
|
+
} else {
|
|
129
|
+
return /*#__PURE__*/React.createElement(LinkInfoOld, props);
|
|
130
|
+
}
|
|
121
131
|
};
|
|
122
|
-
export default
|
|
132
|
+
export default Exported;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React, { useMemo } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
+
import { jsx } from '@emotion/react';
|
|
9
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
10
|
+
import Heading from '@atlaskit/heading';
|
|
11
|
+
import DownloadIcon from '@atlaskit/icon/core/download';
|
|
12
|
+
import FullscreenExitIcon from '@atlaskit/icon/core/fullscreen-exit';
|
|
13
|
+
import CrossIcon from '@atlaskit/icon/core/migration/close--cross';
|
|
14
|
+
import VidFullScreenOnIcon from '@atlaskit/icon/core/migration/fullscreen-enter--vid-full-screen-on';
|
|
15
|
+
import ShortcutIcon from '@atlaskit/icon/core/migration/link-external--shortcut';
|
|
16
|
+
import DownloadIconLegacy from '@atlaskit/icon/glyph/download';
|
|
17
|
+
import VidFullScreenOffIcon from '@atlaskit/icon/glyph/vid-full-screen-off';
|
|
18
|
+
import { useModal } from '@atlaskit/modal-dialog';
|
|
19
|
+
import { messages } from '../../../../messages';
|
|
20
|
+
import { Icon } from '../../../common/Icon';
|
|
21
|
+
import { MAX_MODAL_SIZE } from '../../constants';
|
|
22
|
+
import LinkInfoButton from './link-info-button';
|
|
23
|
+
import { actionCss, containerStyles, iconCss, titleCss } from './styledOld';
|
|
24
|
+
const LinkInfo = ({
|
|
25
|
+
icon,
|
|
26
|
+
providerName,
|
|
27
|
+
onDownloadButtonClick,
|
|
28
|
+
onResizeButtonClick,
|
|
29
|
+
onViewButtonClick,
|
|
30
|
+
size,
|
|
31
|
+
testId,
|
|
32
|
+
title
|
|
33
|
+
}) => {
|
|
34
|
+
const {
|
|
35
|
+
onClose
|
|
36
|
+
} = useModal();
|
|
37
|
+
const downloadButton = useMemo(() => {
|
|
38
|
+
if (onDownloadButtonClick) {
|
|
39
|
+
return jsx(LinkInfoButton, {
|
|
40
|
+
content: jsx(FormattedMessage, messages.download),
|
|
41
|
+
icon: jsx(DownloadIcon, {
|
|
42
|
+
label: messages.download.defaultMessage,
|
|
43
|
+
LEGACY_fallbackIcon: DownloadIconLegacy,
|
|
44
|
+
spacing: "spacious",
|
|
45
|
+
color: "currentColor"
|
|
46
|
+
}),
|
|
47
|
+
onClick: onDownloadButtonClick,
|
|
48
|
+
testId: `${testId}-download`
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}, [onDownloadButtonClick, testId]);
|
|
52
|
+
const urlButton = useMemo(() => {
|
|
53
|
+
if (onViewButtonClick) {
|
|
54
|
+
const content = providerName ? jsx(React.Fragment, null, jsx(FormattedMessage, messages.viewIn), " ", providerName) : jsx(FormattedMessage, messages.viewOriginal);
|
|
55
|
+
return jsx(LinkInfoButton, {
|
|
56
|
+
content: content,
|
|
57
|
+
icon: jsx(ShortcutIcon, {
|
|
58
|
+
label: messages.viewOriginal.defaultMessage,
|
|
59
|
+
spacing: "spacious",
|
|
60
|
+
color: "currentColor"
|
|
61
|
+
}),
|
|
62
|
+
onClick: onViewButtonClick,
|
|
63
|
+
testId: `${testId}-url`
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}, [onViewButtonClick, providerName, testId]);
|
|
67
|
+
const sizeButton = useMemo(() => {
|
|
68
|
+
const isFullScreen = size === MAX_MODAL_SIZE;
|
|
69
|
+
const message = isFullScreen ? messages.preview_min_size : messages.preview_max_size;
|
|
70
|
+
const icon = isFullScreen ? jsx(FullscreenExitIcon, {
|
|
71
|
+
LEGACY_fallbackIcon: VidFullScreenOffIcon,
|
|
72
|
+
label: message.defaultMessage,
|
|
73
|
+
spacing: "spacious",
|
|
74
|
+
color: "currentColor"
|
|
75
|
+
}) : jsx(VidFullScreenOnIcon, {
|
|
76
|
+
label: message.defaultMessage,
|
|
77
|
+
spacing: "spacious",
|
|
78
|
+
color: "currentColor"
|
|
79
|
+
});
|
|
80
|
+
return (
|
|
81
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
82
|
+
jsx("span", {
|
|
83
|
+
className: "smart-link-resize-button"
|
|
84
|
+
}, jsx(LinkInfoButton, {
|
|
85
|
+
content: jsx(FormattedMessage, message),
|
|
86
|
+
icon: icon,
|
|
87
|
+
onClick: onResizeButtonClick,
|
|
88
|
+
testId: `${testId}-resize`
|
|
89
|
+
}))
|
|
90
|
+
);
|
|
91
|
+
}, [onResizeButtonClick, size, testId]);
|
|
92
|
+
return (
|
|
93
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
94
|
+
jsx("div", {
|
|
95
|
+
css: containerStyles
|
|
96
|
+
}, icon &&
|
|
97
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
98
|
+
jsx("div", {
|
|
99
|
+
css: iconCss,
|
|
100
|
+
"data-testid": `${testId}-icon`
|
|
101
|
+
}, jsx(Icon, icon)), jsx("div", {
|
|
102
|
+
css: titleCss
|
|
103
|
+
}, jsx(Heading, {
|
|
104
|
+
size: "medium",
|
|
105
|
+
testId: `${testId}-title`
|
|
106
|
+
}, title), jsx("span", {
|
|
107
|
+
tabIndex: 0
|
|
108
|
+
})), jsx("div", {
|
|
109
|
+
css: actionCss
|
|
110
|
+
}, downloadButton, urlButton, sizeButton, jsx(LinkInfoButton, {
|
|
111
|
+
content: jsx(FormattedMessage, messages.preview_close),
|
|
112
|
+
icon: jsx(CrossIcon, {
|
|
113
|
+
label: messages.preview_close.defaultMessage,
|
|
114
|
+
color: "currentColor",
|
|
115
|
+
spacing: "spacious"
|
|
116
|
+
}),
|
|
117
|
+
onClick: onClose,
|
|
118
|
+
testId: `${testId}-close`
|
|
119
|
+
})))
|
|
120
|
+
);
|
|
121
|
+
};
|
|
122
|
+
export default LinkInfo;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
4
|
import ImageLoader from 'react-render-image';
|
|
9
5
|
import LoadingSkeleton from '../loading-skeleton';
|
|
10
6
|
const ImageIcon = ({
|
|
@@ -13,14 +9,14 @@ const ImageIcon = ({
|
|
|
13
9
|
url,
|
|
14
10
|
onError,
|
|
15
11
|
onLoad
|
|
16
|
-
}) =>
|
|
12
|
+
}) => /*#__PURE__*/React.createElement(ImageLoader, {
|
|
17
13
|
src: url,
|
|
18
|
-
loading:
|
|
14
|
+
loading: /*#__PURE__*/React.createElement(LoadingSkeleton, {
|
|
19
15
|
testId: `${testId}-loading`
|
|
20
16
|
})
|
|
21
17
|
// eslint-disable-next-line jsx-a11y/alt-text
|
|
22
18
|
,
|
|
23
|
-
loaded:
|
|
19
|
+
loaded: /*#__PURE__*/React.createElement("img", {
|
|
24
20
|
src: url,
|
|
25
21
|
"data-testid": `${testId}-image`
|
|
26
22
|
}),
|