@atlaskit/smart-card 34.5.0 → 34.5.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 +16 -0
- package/dist/cjs/common/ui/icons/angle-brackets-icon.js +2 -11
- package/dist/cjs/common/ui/icons/audio-icon.js +2 -11
- package/dist/cjs/common/ui/icons/blog-icon.js +13 -0
- package/dist/cjs/common/ui/icons/chart-bar-icon.js +2 -11
- package/dist/cjs/common/ui/icons/file-icon.js +2 -11
- package/dist/cjs/common/ui/icons/folder-icon.js +2 -11
- package/dist/cjs/common/ui/icons/image-icon.js +2 -11
- package/dist/cjs/common/ui/icons/list-bullet-icon.js +2 -11
- package/dist/cjs/common/ui/icons/page-icon.js +2 -12
- package/dist/cjs/common/ui/icons/types.js +5 -0
- package/dist/cjs/common/ui/icons/utils.js +47 -0
- package/dist/cjs/common/ui/icons/video-icon.js +2 -11
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/index.js +395 -180
- package/dist/cjs/view/BlockCard/views/ErroredView.js +12 -2
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +12 -1
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +12 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.compiled.css +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +16 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +2 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +38 -20
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +2 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -2
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +43 -17
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +28 -8
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.compiled.css +0 -2
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +13 -12
- package/dist/cjs/view/FlexibleCard/components/container/index.compiled.css +5 -2
- package/dist/cjs/view/FlexibleCard/components/container/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +35 -8
- package/dist/cjs/view/FlexibleCard/components/utils.js +23 -2
- package/dist/cjs/view/HoverCard/components/views/resolving/index.js +29 -14
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/common/ui/icons/angle-brackets-icon.js +2 -11
- package/dist/es2019/common/ui/icons/audio-icon.js +2 -11
- package/dist/es2019/common/ui/icons/blog-icon.js +6 -0
- package/dist/es2019/common/ui/icons/chart-bar-icon.js +2 -11
- package/dist/es2019/common/ui/icons/file-icon.js +2 -11
- package/dist/es2019/common/ui/icons/folder-icon.js +2 -11
- package/dist/es2019/common/ui/icons/image-icon.js +2 -11
- package/dist/es2019/common/ui/icons/list-bullet-icon.js +2 -11
- package/dist/es2019/common/ui/icons/page-icon.js +2 -12
- package/dist/es2019/common/ui/icons/types.js +1 -0
- package/dist/es2019/common/ui/icons/utils.js +39 -0
- package/dist/es2019/common/ui/icons/video-icon.js +2 -11
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/index.js +166 -53
- package/dist/es2019/view/BlockCard/views/ErroredView.js +12 -2
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +13 -2
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +13 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.compiled.css +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +8 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +2 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +24 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +2 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -2
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +46 -21
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +28 -8
- package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.compiled.css +0 -2
- package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +14 -12
- package/dist/es2019/view/FlexibleCard/components/container/index.compiled.css +5 -2
- package/dist/es2019/view/FlexibleCard/components/container/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +35 -10
- package/dist/es2019/view/FlexibleCard/components/utils.js +22 -1
- package/dist/es2019/view/HoverCard/components/views/resolving/index.js +21 -6
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/common/ui/icons/angle-brackets-icon.js +2 -11
- package/dist/esm/common/ui/icons/audio-icon.js +2 -11
- package/dist/esm/common/ui/icons/blog-icon.js +6 -0
- package/dist/esm/common/ui/icons/chart-bar-icon.js +2 -11
- package/dist/esm/common/ui/icons/file-icon.js +2 -11
- package/dist/esm/common/ui/icons/folder-icon.js +2 -11
- package/dist/esm/common/ui/icons/image-icon.js +2 -11
- package/dist/esm/common/ui/icons/list-bullet-icon.js +2 -11
- package/dist/esm/common/ui/icons/page-icon.js +2 -12
- package/dist/esm/common/ui/icons/types.js +1 -0
- package/dist/esm/common/ui/icons/utils.js +40 -0
- package/dist/esm/common/ui/icons/video-icon.js +2 -11
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/index.js +261 -96
- package/dist/esm/view/BlockCard/views/ErroredView.js +12 -2
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +13 -2
- package/dist/esm/view/BlockCard/views/NotFoundView.js +13 -2
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.compiled.css +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +8 -3
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +2 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +37 -19
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +2 -2
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +2 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -2
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +47 -21
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +28 -8
- package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.compiled.css +0 -2
- package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +13 -11
- package/dist/esm/view/FlexibleCard/components/container/index.compiled.css +5 -2
- package/dist/esm/view/FlexibleCard/components/container/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +35 -8
- package/dist/esm/view/FlexibleCard/components/utils.js +22 -1
- package/dist/esm/view/HoverCard/components/views/resolving/index.js +21 -6
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/common/ui/icons/angle-brackets-icon.d.ts +2 -6
- package/dist/types/common/ui/icons/audio-icon.d.ts +2 -6
- package/dist/types/common/ui/icons/blog-icon.d.ts +8 -0
- package/dist/types/common/ui/icons/chart-bar-icon.d.ts +2 -6
- package/dist/types/common/ui/icons/file-icon.d.ts +2 -6
- package/dist/types/common/ui/icons/folder-icon.d.ts +2 -6
- package/dist/types/common/ui/icons/image-icon.d.ts +2 -6
- package/dist/types/common/ui/icons/list-bullet-icon.d.ts +2 -6
- package/dist/types/common/ui/icons/page-icon.d.ts +2 -6
- package/dist/types/common/ui/icons/types.d.ts +6 -0
- package/dist/types/common/ui/icons/utils.d.ts +15 -0
- package/dist/types/common/ui/icons/video-icon.d.ts +2 -6
- package/dist/types/utils/index.d.ts +6 -2
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +3 -1
- package/dist/types/view/FlexibleCard/components/common/atlaskit-icon/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/common/atlaskit-icon/types.d.ts +2 -1
- package/dist/types/view/FlexibleCard/components/common/image-icon/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/common/image-icon/types.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/common/loading-skeleton/LoadingSkeletonOld.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/common/loading-skeleton/index.d.ts +4 -3
- package/dist/types/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +17 -1
- package/dist/types/view/FlexibleCard/components/utils.d.ts +2 -0
- package/dist/types/view/HoverCard/components/views/resolving/index.d.ts +0 -4
- package/dist/types-ts4.5/common/ui/icons/angle-brackets-icon.d.ts +2 -6
- package/dist/types-ts4.5/common/ui/icons/audio-icon.d.ts +2 -6
- package/dist/types-ts4.5/common/ui/icons/blog-icon.d.ts +8 -0
- package/dist/types-ts4.5/common/ui/icons/chart-bar-icon.d.ts +2 -6
- package/dist/types-ts4.5/common/ui/icons/file-icon.d.ts +2 -6
- package/dist/types-ts4.5/common/ui/icons/folder-icon.d.ts +2 -6
- package/dist/types-ts4.5/common/ui/icons/image-icon.d.ts +2 -6
- package/dist/types-ts4.5/common/ui/icons/list-bullet-icon.d.ts +2 -6
- package/dist/types-ts4.5/common/ui/icons/page-icon.d.ts +2 -6
- package/dist/types-ts4.5/common/ui/icons/types.d.ts +6 -0
- package/dist/types-ts4.5/common/ui/icons/utils.d.ts +15 -0
- package/dist/types-ts4.5/common/ui/icons/video-icon.d.ts +2 -6
- package/dist/types-ts4.5/utils/index.d.ts +6 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +3 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/common/atlaskit-icon/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/common/atlaskit-icon/types.d.ts +2 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/common/image-icon/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/common/image-icon/types.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/common/loading-skeleton/LoadingSkeletonOld.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/common/loading-skeleton/index.d.ts +4 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +17 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +2 -0
- package/dist/types-ts4.5/view/HoverCard/components/views/resolving/index.d.ts +0 -4
- package/package.json +14 -2
|
@@ -1,25 +1,45 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import ImageLoader from 'react-render-image';
|
|
3
|
-
import
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
+
import { LoadingSkeletonNew, LoadingSkeletonOld } from '../loading-skeleton';
|
|
4
6
|
const ImageIcon = ({
|
|
5
7
|
defaultIcon,
|
|
6
8
|
testId,
|
|
7
9
|
url,
|
|
10
|
+
width,
|
|
11
|
+
height,
|
|
8
12
|
onError,
|
|
9
13
|
onLoad
|
|
10
|
-
}) => /*#__PURE__*/React.createElement(ImageLoader, {
|
|
11
|
-
src: url
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
}) => /*#__PURE__*/React.createElement(ImageLoader, _extends({
|
|
15
|
+
src: url
|
|
16
|
+
}, fg('platform-smart-card-icon-migration') ? {
|
|
17
|
+
loading: /*#__PURE__*/React.createElement(LoadingSkeletonNew, {
|
|
18
|
+
testId: `${testId}-loading`,
|
|
19
|
+
width: width,
|
|
20
|
+
height: height
|
|
21
|
+
}),
|
|
22
|
+
loaded: /*#__PURE__*/React.createElement("img", {
|
|
23
|
+
src: url,
|
|
24
|
+
"data-testid": `${testId}-image`,
|
|
25
|
+
alt: "",
|
|
26
|
+
style: {
|
|
27
|
+
width,
|
|
28
|
+
height
|
|
29
|
+
}
|
|
14
30
|
})
|
|
31
|
+
} : {
|
|
32
|
+
loading: /*#__PURE__*/React.createElement(LoadingSkeletonOld, {
|
|
33
|
+
testId: `${testId}-loading`
|
|
34
|
+
}),
|
|
15
35
|
// eslint-disable-next-line jsx-a11y/alt-text
|
|
16
|
-
,
|
|
17
36
|
loaded: /*#__PURE__*/React.createElement("img", {
|
|
18
37
|
src: url,
|
|
19
38
|
"data-testid": `${testId}-image`
|
|
20
|
-
})
|
|
39
|
+
})
|
|
40
|
+
}, {
|
|
21
41
|
errored: defaultIcon,
|
|
22
42
|
onError: onError,
|
|
23
43
|
onLoad: onLoad
|
|
24
|
-
});
|
|
44
|
+
}));
|
|
25
45
|
export default ImageIcon;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
._2rkoyh40{border-radius:2px}._12vemgnk{background-repeat:no-repeat}
|
|
3
|
-
._1bsb9tg7{width:var(--_1ea5ebz)}
|
|
4
3
|
._1e0c1o8l{display:inline-block}
|
|
5
4
|
._1itkvl7m{background-image:linear-gradient(to right,transparent 0,var(--ds-skeleton,#edeef1) 20%,transparent 40%,transparent 100%)}
|
|
6
5
|
._1lrw6rms{background-size:280% 100%}
|
|
7
6
|
._1o51q7pw{animation-fill-mode:forwards}
|
|
8
7
|
._1pglp3kn{animation-timing-function:linear}
|
|
9
|
-
._4t3imry4{height:var(--_roksyz)}
|
|
10
8
|
._5sag9cwz{animation-duration:1s}
|
|
11
9
|
._bfhk178v{background-color:var(--ds-skeleton-subtle,#f6f7f8)}
|
|
12
10
|
._j7hqqkar{animation-name:kc09ee}
|
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import "./index.compiled.css";
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import
|
|
7
|
+
import LoadingSkeletonEmotionOld from './LoadingSkeletonOld';
|
|
7
8
|
const animationNameStyles = null;
|
|
9
|
+
const loadingSkeletonStyle = null;
|
|
8
10
|
const LoadingSkeletonNew = ({
|
|
9
11
|
testId,
|
|
10
12
|
width,
|
|
11
13
|
height
|
|
12
14
|
}) => {
|
|
13
|
-
const styles = null;
|
|
14
|
-
|
|
15
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- needs dynamic css
|
|
16
15
|
return /*#__PURE__*/React.createElement("span", {
|
|
17
16
|
"data-testid": testId,
|
|
18
|
-
className: ax(["_2rkoyh40 _1bsb9tg7 _4t3imry4 _uiztglyw _bfhk178v _1itkvl7m _12vemgnk _1lrw6rms _1e0c1o8l _5sag9cwz _1o51q7pw _tip812c5 _j7hqqkar _1pglp3kn"]),
|
|
19
17
|
style: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
18
|
+
width,
|
|
19
|
+
height
|
|
20
|
+
},
|
|
21
|
+
className: ax(["_2rkoyh40 _uiztglyw _bfhk178v _1itkvl7m _12vemgnk _1lrw6rms _1e0c1o8l _5sag9cwz _1o51q7pw _tip812c5 _j7hqqkar _1pglp3kn"])
|
|
23
22
|
});
|
|
24
23
|
};
|
|
25
|
-
const
|
|
24
|
+
const LoadingSkeletonOld = props => {
|
|
26
25
|
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
27
|
-
return /*#__PURE__*/React.createElement(LoadingSkeletonNew, props
|
|
26
|
+
return /*#__PURE__*/React.createElement(LoadingSkeletonNew, _extends({}, props, {
|
|
27
|
+
width: `${props.width}rem`,
|
|
28
|
+
height: `${props.height}rem`
|
|
29
|
+
}));
|
|
28
30
|
}
|
|
29
|
-
return /*#__PURE__*/React.createElement(
|
|
31
|
+
return /*#__PURE__*/React.createElement(LoadingSkeletonEmotionOld, props);
|
|
30
32
|
};
|
|
31
|
-
export
|
|
33
|
+
export { LoadingSkeletonOld, LoadingSkeletonNew };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
._19ith6cr{border:1px solid var(--ds-border,#dfe1e6)}
|
|
3
3
|
._1yt418y6{padding:var(--_1xumd0e)}
|
|
4
4
|
._2rkopd34{border-radius:var(--ds-border-radius-200,8px)}
|
|
5
5
|
._zulp1jvo{gap:1.25rem 0}
|
|
6
6
|
._zulp1qos{gap:.5rem 0}
|
|
7
7
|
._zulpfzsm{gap:.25rem 0}
|
|
8
|
-
._zulph3jc{gap:1rem 0}
|
|
8
|
+
._zulph3jc{gap:1rem 0}._18u0v77o{margin-left:var(--ds-space-025,2px)}
|
|
9
9
|
._19bv15sf{padding-left:calc(var(--preview-block-width) + 1.25rem)}
|
|
10
10
|
._19bv1ltm{padding-left:calc(var(--preview-block-width) + .25rem)}
|
|
11
11
|
._19bvf557{padding-left:calc(var(--preview-block-width) + 1rem)}
|
|
12
12
|
._19bvqox2{padding-left:calc(var(--preview-block-width) + .5rem)}
|
|
13
|
+
._19pkv77o{margin-top:var(--ds-space-025,2px)}
|
|
13
14
|
._1e0c1txw{display:flex}
|
|
14
15
|
._1pcmkb7n:hover~.actions-button-group{opacity:1}
|
|
15
16
|
._1reo15vq{overflow-x:hidden}
|
|
@@ -20,11 +21,13 @@
|
|
|
20
21
|
._1yob1kwk{--container-gap-right:.5rem}
|
|
21
22
|
._1yob1wow{--container-gap-right:var(--_12k13bg)}
|
|
22
23
|
._1yob6mu8{--container-gap-right:.25rem}
|
|
24
|
+
._2hwxv77o{margin-right:var(--ds-space-025,2px)}
|
|
23
25
|
._2lx21bp4{flex-direction:column}
|
|
24
26
|
._bfhkhp5a{background-color:var(--ds-surface-raised,#fff)}
|
|
25
27
|
._jb7v18y6{--container-padding:var(--_1xumd0e)}
|
|
26
28
|
._kqswh2mm{position:relative}
|
|
27
29
|
._nqwih2mm .has-action, ._18ywh2mm a, ._1nq3h2mm button{position:relative}
|
|
30
|
+
._otyrv77o{margin-bottom:var(--ds-space-025,2px)}
|
|
28
31
|
._r37x1r5k{--preview-block-width:30%}
|
|
29
32
|
._u5f315sf{padding-right:calc(var(--preview-block-width) + 1.25rem)}
|
|
30
33
|
._u5f31ltm{padding-right:calc(var(--preview-block-width) + .25rem)}
|
|
@@ -180,7 +180,7 @@ const ContainerNew = ({
|
|
|
180
180
|
const container = /*#__PURE__*/React.createElement("div", {
|
|
181
181
|
"data-smart-link-container": true,
|
|
182
182
|
"data-testid": testId,
|
|
183
|
-
className: ax(["_1e0c1txw _2lx21bp4 _1ul9idpf _1reo15vq _kqswh2mm _1pcmkb7n _1v7y1i6y _ufn21i6y", gapStyleMap[size], !hideBackground && "_bfhkhp5a", "_1yt418y6 _jb7v18y6 _y5vk167t _1yob1wow _r37x1r5k", previewOnLeft && previewOnLeftStyleMap[size], previewOnRight && previewOnRightStyleMap[size], !hideElevation && "_19ith6cr _2rkopd34
|
|
183
|
+
className: ax(["_1e0c1txw _2lx21bp4 _1ul9idpf _1reo15vq _kqswh2mm _1pcmkb7n _1v7y1i6y _ufn21i6y", gapStyleMap[size], !hideBackground && "_bfhkhp5a", "_1yt418y6 _jb7v18y6 _y5vk167t _1yob1wow _r37x1r5k", previewOnLeft && previewOnLeftStyleMap[size], previewOnRight && previewOnRightStyleMap[size], !hideElevation && "_19ith6cr _2rkopd34 _19pkv77o _2hwxv77o _otyrv77o _18u0v77o", clickableContainer && "_nqwih2mm _18ywh2mm _1nq3h2mm _1t4ckb7n _1nxdkb7n _xnbykb7n"]),
|
|
184
184
|
style: {
|
|
185
185
|
"--_1xumd0e": ix(padding),
|
|
186
186
|
"--_73mooq": ix(previewOnLeft ? gap : padding),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
/**
|
|
2
3
|
* @jsxRuntime classic
|
|
3
4
|
* @jsx jsx
|
|
@@ -7,6 +8,8 @@ import React, { useMemo } from 'react';
|
|
|
7
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
9
|
import { css, jsx } from '@emotion/react';
|
|
9
10
|
import LinkIcon from '@atlaskit/icon/core/migration/link';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
10
13
|
import { SmartLinkPosition, SmartLinkSize } from '../../../../../constants';
|
|
11
14
|
import AtlaskitIcon from '../../common/atlaskit-icon';
|
|
12
15
|
import ImageIcon from '../../common/image-icon';
|
|
@@ -45,12 +48,14 @@ css(getTruncateStyles(1, value), {
|
|
|
45
48
|
verticalAlign: 'baseline'
|
|
46
49
|
}
|
|
47
50
|
});
|
|
48
|
-
const renderAtlaskitIcon = (icon, testId) => {
|
|
51
|
+
const renderAtlaskitIcon = (icon, testId, size = SmartLinkSize.Medium) => {
|
|
49
52
|
if (icon) {
|
|
50
|
-
return jsx(AtlaskitIcon, {
|
|
53
|
+
return jsx(AtlaskitIcon, _extends({
|
|
51
54
|
icon: icon,
|
|
52
55
|
testId: `${testId}-icon`
|
|
53
|
-
})
|
|
56
|
+
}, fg('platform-smart-card-icon-migration') && {
|
|
57
|
+
size
|
|
58
|
+
}));
|
|
54
59
|
}
|
|
55
60
|
};
|
|
56
61
|
const renderDefaultIcon = (label, testId) => jsx(LinkIcon, {
|
|
@@ -58,13 +63,17 @@ const renderDefaultIcon = (label, testId) => jsx(LinkIcon, {
|
|
|
58
63
|
testId: `${testId}-default`,
|
|
59
64
|
color: "currentColor"
|
|
60
65
|
});
|
|
61
|
-
const renderImageIcon = (defaultIcon, url, testId) => {
|
|
66
|
+
const renderImageIcon = (defaultIcon, url, testId, size = SmartLinkSize.Medium) => {
|
|
67
|
+
const width = size === SmartLinkSize.Large ? "var(--ds-space-300, 24px)" : "var(--ds-space-200, 16px)";
|
|
62
68
|
if (url) {
|
|
63
|
-
return jsx(ImageIcon, {
|
|
69
|
+
return jsx(ImageIcon, _extends({
|
|
64
70
|
defaultIcon: defaultIcon,
|
|
65
71
|
testId: testId,
|
|
66
72
|
url: url
|
|
67
|
-
})
|
|
73
|
+
}, fg('platform-smart-card-icon-migration') && {
|
|
74
|
+
width,
|
|
75
|
+
height: width
|
|
76
|
+
}));
|
|
68
77
|
}
|
|
69
78
|
};
|
|
70
79
|
|
|
@@ -88,18 +97,34 @@ const Icon = ({
|
|
|
88
97
|
}) => {
|
|
89
98
|
const element = useMemo(() => {
|
|
90
99
|
const defaultIcon = renderDefaultIcon(label, testId);
|
|
91
|
-
return overrideIcon || (render === null || render === void 0 ? void 0 : render()) || renderImageIcon(defaultIcon, url, testId) || renderAtlaskitIcon(icon, testId) || defaultIcon;
|
|
92
|
-
}, [overrideIcon, icon, label, render, testId, url]);
|
|
100
|
+
return overrideIcon || (render === null || render === void 0 ? void 0 : render()) || renderImageIcon(defaultIcon, url, testId, fg('platform-smart-card-icon-migration') ? size : undefined) || renderAtlaskitIcon(icon, testId, fg('platform-smart-card-icon-migration') ? size : undefined) || defaultIcon;
|
|
101
|
+
}, [overrideIcon, icon, label, render, testId, url, size]);
|
|
93
102
|
const width = getIconWidth(size);
|
|
94
103
|
const styles = getIconStyles(position, width);
|
|
95
104
|
const renderStyles = render ? getCustomRenderStyles(width) : undefined;
|
|
96
105
|
return jsx("div", {
|
|
106
|
+
css: [
|
|
97
107
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- needs dynamic css
|
|
98
|
-
|
|
108
|
+
!fg('platform-smart-card-icon-migration') && styles,
|
|
109
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- needs dynamic css
|
|
110
|
+
renderStyles,
|
|
111
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- needs dynamic css
|
|
112
|
+
overrideCss],
|
|
99
113
|
"data-fit-to-content": true,
|
|
100
114
|
"data-smart-element": name,
|
|
101
115
|
"data-smart-element-icon": true,
|
|
102
116
|
"data-testid": testId
|
|
103
|
-
},
|
|
117
|
+
}, fg('platform-smart-card-icon-migration') ? jsx(Box, {
|
|
118
|
+
xcss: iconWrapperStyle,
|
|
119
|
+
style: {
|
|
120
|
+
width,
|
|
121
|
+
height: width
|
|
122
|
+
}
|
|
123
|
+
}, element) : element);
|
|
104
124
|
};
|
|
125
|
+
const iconWrapperStyle = xcss({
|
|
126
|
+
display: 'flex',
|
|
127
|
+
alignItems: 'center',
|
|
128
|
+
justifyContent: 'center'
|
|
129
|
+
});
|
|
105
130
|
export default Icon;
|
|
@@ -5,6 +5,7 @@ import React from 'react';
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { FormattedMessage } from 'react-intl-next';
|
|
7
7
|
import Loadable from 'react-loadable';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { SmartLinkSize } from '../../../constants';
|
|
9
10
|
export const sizeToButtonSpacing = {
|
|
10
11
|
[SmartLinkSize.Small]: 'none',
|
|
@@ -69,7 +70,9 @@ export const getIconSizeStyles = width => {
|
|
|
69
70
|
}
|
|
70
71
|
`;
|
|
71
72
|
};
|
|
72
|
-
|
|
73
|
+
|
|
74
|
+
// TODO Delete when cleaning platform-smart-card-icon-migration
|
|
75
|
+
export const getIconWidthOld = size => {
|
|
73
76
|
switch (size) {
|
|
74
77
|
case SmartLinkSize.XLarge:
|
|
75
78
|
return '2rem';
|
|
@@ -82,6 +85,24 @@ export const getIconWidth = size => {
|
|
|
82
85
|
return '.75rem';
|
|
83
86
|
}
|
|
84
87
|
};
|
|
88
|
+
|
|
89
|
+
// TODO Rename to getIconWidth when cleaning platform-smart-card-icon-migration
|
|
90
|
+
export const getIconWidthNew = size => {
|
|
91
|
+
switch (size) {
|
|
92
|
+
case SmartLinkSize.XLarge:
|
|
93
|
+
case SmartLinkSize.Large:
|
|
94
|
+
return "var(--ds-space-300, 24px)";
|
|
95
|
+
case SmartLinkSize.Medium:
|
|
96
|
+
case SmartLinkSize.Small:
|
|
97
|
+
default:
|
|
98
|
+
return "var(--ds-space-200, 16px)";
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// TODO Delete when cleaning platform-smart-card-icon-migration
|
|
103
|
+
export const getIconWidth = size => {
|
|
104
|
+
return fg('platform-smart-card-icon-migration') ? getIconWidthNew(size) : getIconWidthOld(size);
|
|
105
|
+
};
|
|
85
106
|
export const importIcon = importFn => {
|
|
86
107
|
return Loadable({
|
|
87
108
|
loader: () => importFn().then(module => module.default),
|
|
@@ -3,11 +3,14 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
* @jsxRuntime classic
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
6
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
9
|
import { jsx } from '@emotion/react';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
11
|
import { CustomBlock } from '../../../../FlexibleCard/components/blocks';
|
|
9
12
|
import ActionGroup from '../../../../FlexibleCard/components/blocks/action-group';
|
|
10
|
-
import
|
|
13
|
+
import { LoadingSkeletonNew, LoadingSkeletonOld } from '../../../../FlexibleCard/components/common/loading-skeleton';
|
|
11
14
|
import Icon from '../../../../FlexibleCard/components/elements/icon';
|
|
12
15
|
import { CARD_WIDTH_REM } from '../../../styled';
|
|
13
16
|
import { getTitleStyles, loadingViewContainer, skeletonContainer, titleBlockStyles } from './styled';
|
|
@@ -25,6 +28,7 @@ const HoverCardLoadingView = ({
|
|
|
25
28
|
items: actions,
|
|
26
29
|
visibleButtonsNum: 2
|
|
27
30
|
});
|
|
31
|
+
const LoadingSkeleton = fg('platform-smart-card-icon-migration') ? LoadingSkeletonNew : LoadingSkeletonOld;
|
|
28
32
|
return (
|
|
29
33
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
30
34
|
jsx("div", {
|
|
@@ -41,18 +45,29 @@ const HoverCardLoadingView = ({
|
|
|
41
45
|
}), jsx("span", {
|
|
42
46
|
css: getTitleStyles(lineHeightRem),
|
|
43
47
|
"data-testid": `${testId}-title`
|
|
44
|
-
}, jsx(
|
|
48
|
+
}, fg('platform-smart-card-icon-migration') ? jsx(LoadingSkeletonNew, {
|
|
49
|
+
height: `${lineHeightRem}rem`
|
|
50
|
+
}) : jsx(LoadingSkeletonOld, {
|
|
45
51
|
height: lineHeightRem
|
|
46
|
-
})), actionGroup), jsx(
|
|
52
|
+
})), actionGroup), fg('platform-smart-card-icon-migration') ? jsx(React.Fragment, null, jsx(LoadingSkeletonNew, {
|
|
53
|
+
width: `${skeletonWidth}rem`,
|
|
54
|
+
height: `${lineHeightRem}rem`
|
|
55
|
+
}), jsx(LoadingSkeletonNew, {
|
|
56
|
+
width: `${skeletonWidth}rem`,
|
|
57
|
+
height: `${lineHeightRem * 3}rem`
|
|
58
|
+
}), jsx(LoadingSkeletonNew, {
|
|
59
|
+
width: `${skeletonWidth}rem`,
|
|
60
|
+
height: `${lineHeightRem}rem`
|
|
61
|
+
})) : jsx(React.Fragment, null, jsx(LoadingSkeletonOld, {
|
|
47
62
|
width: skeletonWidth,
|
|
48
63
|
height: lineHeightRem
|
|
49
|
-
}), jsx(
|
|
64
|
+
}), jsx(LoadingSkeletonOld, {
|
|
50
65
|
width: skeletonWidth,
|
|
51
66
|
height: lineHeightRem * 3
|
|
52
|
-
}), jsx(
|
|
67
|
+
}), jsx(LoadingSkeletonOld, {
|
|
53
68
|
width: skeletonWidth,
|
|
54
69
|
height: lineHeightRem
|
|
55
|
-
})))
|
|
70
|
+
}))))
|
|
56
71
|
);
|
|
57
72
|
};
|
|
58
73
|
export default HoverCardLoadingView;
|
|
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
10
10
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
11
11
|
const PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "34.5.
|
|
13
|
+
packageVersion: "34.5.2",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { IconTile } from '@atlaskit/icon';
|
|
4
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/source-code/16';
|
|
5
2
|
import AngleBracketsIcon from '@atlaskit/icon/core/angle-brackets';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
appearance: "blueBold",
|
|
9
|
-
icon: AngleBracketsIcon,
|
|
10
|
-
size: "16",
|
|
11
|
-
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
12
|
-
}));
|
|
13
|
-
};
|
|
3
|
+
import { renderIconTile } from './utils';
|
|
4
|
+
var AngleBracketsIconWithColor = renderIconTile(AngleBracketsIcon, 'blueBold', LegacyIcon);
|
|
14
5
|
AngleBracketsIconWithColor.displayName = 'AngleBracketsIconWithColor';
|
|
15
6
|
export default AngleBracketsIconWithColor;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { IconTile } from '@atlaskit/icon';
|
|
4
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/audio/16';
|
|
5
2
|
import AudioIcon from '@atlaskit/icon/core/audio';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
appearance: "redBold",
|
|
9
|
-
icon: AudioIcon,
|
|
10
|
-
size: "16",
|
|
11
|
-
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
12
|
-
}));
|
|
13
|
-
};
|
|
3
|
+
import { renderIconTile } from './utils';
|
|
4
|
+
var AudioIconWithColor = renderIconTile(AudioIcon, 'redBold', LegacyIcon);
|
|
14
5
|
AudioIconWithColor.displayName = 'AudioIconWithColor';
|
|
15
6
|
export default AudioIconWithColor;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import BlogIconSmall from '@atlaskit/icon-object/glyph/blog/16';
|
|
2
|
+
import BlogIconLarge from '@atlaskit/icon-object/glyph/blog/24';
|
|
3
|
+
import { renderIconPerSize } from './utils';
|
|
4
|
+
var BlogIconWithColor = renderIconPerSize(BlogIconSmall, BlogIconLarge);
|
|
5
|
+
BlogIconWithColor.displayName = 'BlogIconWithColor';
|
|
6
|
+
export default BlogIconWithColor;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { IconTile } from '@atlaskit/icon';
|
|
4
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/presentation/16';
|
|
5
2
|
import ChartBarIcon from '@atlaskit/icon/core/chart-bar';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
appearance: "purpleBold",
|
|
9
|
-
icon: ChartBarIcon,
|
|
10
|
-
size: "16",
|
|
11
|
-
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
12
|
-
}));
|
|
13
|
-
};
|
|
3
|
+
import { renderIconTile } from './utils';
|
|
4
|
+
var ChartBarIconWithColor = renderIconTile(ChartBarIcon, 'purpleBold', LegacyIcon);
|
|
14
5
|
ChartBarIconWithColor.displayName = 'ChartBarIconWithColor';
|
|
15
6
|
export default ChartBarIconWithColor;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { IconTile } from '@atlaskit/icon';
|
|
4
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/generic/16';
|
|
5
2
|
import FileIcon from '@atlaskit/icon/core/file';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
appearance: "grayBold",
|
|
9
|
-
icon: FileIcon,
|
|
10
|
-
size: "16",
|
|
11
|
-
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
12
|
-
}));
|
|
13
|
-
};
|
|
3
|
+
import { renderIconTile } from './utils';
|
|
4
|
+
var FileIconWithColor = renderIconTile(FileIcon, 'grayBold', LegacyIcon);
|
|
14
5
|
FileIconWithColor.displayName = 'FileIconWithColor';
|
|
15
6
|
export default FileIconWithColor;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { IconTile } from '@atlaskit/icon';
|
|
4
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/folder/16';
|
|
5
2
|
import FolderClosedIcon from '@atlaskit/icon/core/folder-closed';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
appearance: "blueBold",
|
|
9
|
-
icon: FolderClosedIcon,
|
|
10
|
-
size: "16",
|
|
11
|
-
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
12
|
-
}));
|
|
13
|
-
};
|
|
3
|
+
import { renderIconTile } from './utils';
|
|
4
|
+
var FolderClosedIconWithColor = renderIconTile(FolderClosedIcon, 'blueBold', LegacyIcon);
|
|
14
5
|
FolderClosedIconWithColor.displayName = 'FolderClosedIconWithColor';
|
|
15
6
|
export default FolderClosedIconWithColor;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { IconTile } from '@atlaskit/icon';
|
|
4
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/image/16';
|
|
5
2
|
import ImageIcon from '@atlaskit/icon/core/image';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
appearance: "yellowBold",
|
|
9
|
-
icon: ImageIcon,
|
|
10
|
-
size: "16",
|
|
11
|
-
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
12
|
-
}));
|
|
13
|
-
};
|
|
3
|
+
import { renderIconTile } from './utils';
|
|
4
|
+
var ImageIconWithColor = renderIconTile(ImageIcon, 'yellowBold', LegacyIcon);
|
|
14
5
|
ImageIconWithColor.displayName = 'ImageIconWithColor';
|
|
15
6
|
export default ImageIconWithColor;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { IconTile } from '@atlaskit/icon';
|
|
4
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/spreadsheet/16';
|
|
5
2
|
import ListBulletedIcon from '@atlaskit/icon/core/list-bulleted';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
appearance: "greenBold",
|
|
9
|
-
icon: ListBulletedIcon,
|
|
10
|
-
size: "16",
|
|
11
|
-
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
12
|
-
}));
|
|
13
|
-
};
|
|
3
|
+
import { renderIconTile } from './utils';
|
|
4
|
+
var ListBulletedIconWithColor = renderIconTile(ListBulletedIcon, 'greenBold', LegacyIcon);
|
|
14
5
|
ListBulletedIconWithColor.displayName = 'ListBulletedIconWithColor';
|
|
15
6
|
export default ListBulletedIconWithColor;
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { IconTile } from '@atlaskit/icon';
|
|
4
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/document/16';
|
|
5
2
|
import PageIcon from '@atlaskit/icon/core/page';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
appearance: "blueBold",
|
|
9
|
-
icon: PageIcon,
|
|
10
|
-
size: "16"
|
|
11
|
-
}, props, {
|
|
12
|
-
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
13
|
-
}));
|
|
14
|
-
};
|
|
3
|
+
import { renderIconTile } from './utils';
|
|
4
|
+
var PageIconWithColor = renderIconTile(PageIcon, 'blueBold', LegacyIcon);
|
|
15
5
|
PageIconWithColor.displayName = 'PageIconWithColor';
|
|
16
6
|
export default PageIconWithColor;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["size"],
|
|
4
|
+
_excluded2 = ["size"];
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { IconTile } from '@atlaskit/icon';
|
|
7
|
+
import { SmartLinkSize } from '../../../constants';
|
|
8
|
+
import { isIconSizeLarge } from '../../../utils';
|
|
9
|
+
export var transformSmartLinkSizeToIconTileSize = function transformSmartLinkSizeToIconTileSize(size) {
|
|
10
|
+
switch (size) {
|
|
11
|
+
case SmartLinkSize.XLarge:
|
|
12
|
+
case SmartLinkSize.Large:
|
|
13
|
+
return '24';
|
|
14
|
+
default:
|
|
15
|
+
return '16';
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export var renderIconPerSize = function renderIconPerSize(IconSmall, IconLarge) {
|
|
19
|
+
return function (_ref) {
|
|
20
|
+
var size = _ref.size,
|
|
21
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
if (isIconSizeLarge(size)) {
|
|
23
|
+
return /*#__PURE__*/React.createElement(IconLarge, props);
|
|
24
|
+
}
|
|
25
|
+
return /*#__PURE__*/React.createElement(IconSmall, props);
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export var renderIconTile = function renderIconTile(Icon, appearance, LegacyIcon) {
|
|
29
|
+
return function (_ref2) {
|
|
30
|
+
var size = _ref2.size,
|
|
31
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
32
|
+
return /*#__PURE__*/React.createElement(IconTile, _extends({
|
|
33
|
+
appearance: appearance,
|
|
34
|
+
icon: Icon,
|
|
35
|
+
size: transformSmartLinkSizeToIconTileSize(size)
|
|
36
|
+
}, props, {
|
|
37
|
+
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
38
|
+
}));
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { IconTile } from '@atlaskit/icon';
|
|
4
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/video/16';
|
|
5
2
|
import VideoIcon from '@atlaskit/icon/core/video';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
appearance: "redBold",
|
|
9
|
-
icon: VideoIcon,
|
|
10
|
-
size: "16",
|
|
11
|
-
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
12
|
-
}));
|
|
13
|
-
};
|
|
3
|
+
import { renderIconTile } from './utils';
|
|
4
|
+
var VideoIconWithColor = renderIconTile(VideoIcon, 'redBold', LegacyIcon);
|
|
14
5
|
VideoIconWithColor.displayName = 'VideoIconWithColor';
|
|
15
6
|
export default VideoIconWithColor;
|
|
@@ -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: "34.5.
|
|
7
|
+
packageVersion: "34.5.2"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|