@atlaskit/smart-card 36.13.2 → 36.14.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 +12 -0
- package/dist/cjs/common/ui/icons/angle-brackets-icon.js +2 -1
- package/dist/cjs/common/ui/icons/audio-icon.js +2 -1
- package/dist/cjs/common/ui/icons/chart-bar-icon.js +2 -1
- package/dist/cjs/common/ui/icons/file-icon.js +2 -1
- package/dist/cjs/common/ui/icons/folder-icon.js +2 -1
- package/dist/cjs/common/ui/icons/image-icon.js +2 -1
- package/dist/cjs/common/ui/icons/list-bullet-icon.js +2 -1
- package/dist/cjs/common/ui/icons/page-icon.js +2 -1
- package/dist/cjs/common/ui/icons/utils.js +3 -1
- package/dist/cjs/common/ui/icons/video-icon.js +2 -1
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +35 -315
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.compiled.css +3 -64
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +13 -26
- package/dist/cjs/view/FlexibleCard/components/utils.js +2 -25
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/common/ui/icons/angle-brackets-icon.js +3 -2
- package/dist/es2019/common/ui/icons/audio-icon.js +3 -2
- package/dist/es2019/common/ui/icons/chart-bar-icon.js +3 -2
- package/dist/es2019/common/ui/icons/file-icon.js +3 -2
- package/dist/es2019/common/ui/icons/folder-icon.js +3 -2
- package/dist/es2019/common/ui/icons/image-icon.js +3 -2
- package/dist/es2019/common/ui/icons/list-bullet-icon.js +3 -2
- package/dist/es2019/common/ui/icons/page-icon.js +3 -2
- package/dist/es2019/common/ui/icons/utils.js +3 -1
- package/dist/es2019/common/ui/icons/video-icon.js +3 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +35 -131
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.compiled.css +3 -64
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +15 -28
- package/dist/es2019/view/FlexibleCard/components/utils.js +1 -24
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/common/ui/icons/angle-brackets-icon.js +3 -2
- package/dist/esm/common/ui/icons/audio-icon.js +3 -2
- package/dist/esm/common/ui/icons/chart-bar-icon.js +3 -2
- package/dist/esm/common/ui/icons/file-icon.js +3 -2
- package/dist/esm/common/ui/icons/folder-icon.js +3 -2
- package/dist/esm/common/ui/icons/image-icon.js +3 -2
- package/dist/esm/common/ui/icons/list-bullet-icon.js +3 -2
- package/dist/esm/common/ui/icons/page-icon.js +3 -2
- package/dist/esm/common/ui/icons/utils.js +3 -1
- package/dist/esm/common/ui/icons/video-icon.js +3 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +37 -192
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.compiled.css +3 -64
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +13 -26
- package/dist/esm/view/FlexibleCard/components/utils.js +1 -24
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/common/ui/icons/utils.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/utils.d.ts +0 -2
- package/dist/types-ts4.5/common/ui/icons/utils.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +0 -2
- package/package.json +2 -5
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
._11c8nbxd{font:var(--ds-font-heading-small,normal 600 1pc/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
2
|
._11c8nf1z{font:var(--ds-font-heading-large,normal 500 24px/28px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
|
-
._16jlidpf{flex-grow:0}
|
|
4
3
|
._18m915vq{overflow-y:hidden}
|
|
5
4
|
._18u0idpf{margin-left:0}
|
|
6
|
-
._19l31j6v img, ._1pr21j6v span, ._1u5t1j6v svg{max-height:1rem}
|
|
7
|
-
._19l31k8s img, ._1pr21k8s span, ._1u5t1k8s svg{max-height:1.5rem}
|
|
8
|
-
._19l3oqnp img, ._1pr2oqnp span, ._1u5toqnp svg{max-height:.75rem}
|
|
9
|
-
._19l3viql img, ._1pr2viql span, ._1u5tviql svg{max-height:2rem}
|
|
10
5
|
._19pkidpf{margin-top:0}
|
|
11
6
|
._1bah1h6o{justify-content:center}
|
|
12
|
-
._1bsb1j6v{width:1rem}
|
|
13
|
-
._1bsb1k8s{width:1.5rem}
|
|
14
|
-
._1bsboqnp{width:.75rem}
|
|
15
|
-
._1bsbviql{width:2rem}
|
|
16
7
|
._1btozryt{text-overflow:clip}
|
|
17
8
|
._1e0c1txw{display:flex}
|
|
18
9
|
._1e0ccj1k{display:-webkit-box}
|
|
@@ -20,74 +11,22 @@
|
|
|
20
11
|
._1kdcidpf span{margin-right:0}
|
|
21
12
|
._1m2uidpf span{padding-bottom:0}
|
|
22
13
|
._1nmz1hna{word-break:break-word}
|
|
23
|
-
._1o9zidpf{flex-shrink:0}
|
|
24
14
|
._1oh2idpf span{padding-top:0}
|
|
25
15
|
._1reo15vq{overflow-x:hidden}
|
|
26
|
-
._1rg21j6v img, ._q7cv1j6v span, ._xwbj1j6v svg{min-width:1rem}
|
|
27
|
-
._1rg21k8s img, ._q7cv1k8s span, ._xwbj1k8s svg{min-width:1.5rem}
|
|
28
|
-
._1rg2oqnp img, ._q7cvoqnp span, ._xwbjoqnp svg{min-width:.75rem}
|
|
29
|
-
._1rg2viql img, ._q7cvviql span, ._xwbjviql svg{min-width:2rem}
|
|
30
|
-
._1tke1j6v{min-height:1rem}
|
|
31
|
-
._1tke1k8s{min-height:1.5rem}
|
|
32
|
-
._1tkeoqnp{min-height:.75rem}
|
|
33
|
-
._1tkeviql{min-height:2rem}
|
|
34
|
-
._1ul91j6v{min-width:1rem}
|
|
35
|
-
._1ul91k8s{min-width:1.5rem}
|
|
36
16
|
._1ul91ns9{min-width:-moz-fit-content;min-width:fit-content}
|
|
37
|
-
._1ul9oqnp{min-width:.75rem}
|
|
38
|
-
._1ul9viql{min-width:2rem}
|
|
39
17
|
._1w2uidpf span{margin-left:0}
|
|
40
18
|
._1wpz1h6o{align-self:center}
|
|
41
19
|
._1wpz1y6m{align-self:flex-start}
|
|
42
|
-
.
|
|
43
|
-
._1wyb1k8s{font-size:1.5rem}
|
|
44
|
-
._1wyboqnp{font-size:.75rem}
|
|
45
|
-
._1wybviql{font-size:2rem}
|
|
20
|
+
._1xjx1osq span{height:100%}
|
|
46
21
|
._1yyjkb7n{-webkit-line-clamp:1}
|
|
47
22
|
._2hwxidpf{margin-right:0}
|
|
48
23
|
._3glyidpf span{margin-bottom:0}
|
|
49
24
|
._4cvr1h6o{align-items:center}
|
|
50
|
-
._4t3i1j6v{height:1rem}
|
|
51
|
-
._4t3i1k8s{height:1.5rem}
|
|
52
|
-
._4t3ioqnp{height:.75rem}
|
|
53
|
-
._4t3iviql{height:2rem}
|
|
54
|
-
._5jw9idpf svg{padding-bottom:0}
|
|
55
|
-
._7wy9idpf svg{padding-left:0}
|
|
56
25
|
._99ztidpf span{padding-right:0}
|
|
57
26
|
._9n9oidpf span{padding-left:0}
|
|
58
|
-
.
|
|
59
|
-
._bna71k8s img, ._1xjx1k8s span, ._17521k8s svg{height:1.5rem}
|
|
60
|
-
._bna7oqnp img, ._1xjxoqnp span, ._1752oqnp svg{height:.75rem}
|
|
61
|
-
._bna7viql img, ._1xjxviql span, ._1752viql svg{height:2rem}
|
|
62
|
-
._c71l1j6v{max-height:1rem}
|
|
63
|
-
._c71l1k8s{max-height:1.5rem}
|
|
64
|
-
._c71loqnp{max-height:.75rem}
|
|
65
|
-
._c71lviql{max-height:2rem}
|
|
27
|
+
._e2oo1osq span{width:100%}
|
|
66
28
|
._e4km1q9y span{vertical-align:baseline}
|
|
67
|
-
._i0dl1wug{flex-basis:auto}
|
|
68
|
-
._i2i3idpf svg{padding-top:0}
|
|
69
|
-
._mezj1j6v img, ._e2oo1j6v span, ._w8l51j6v svg{width:1rem}
|
|
70
|
-
._mezj1k8s img, ._e2oo1k8s span, ._w8l51k8s svg{width:1.5rem}
|
|
71
|
-
._mezjoqnp img, ._e2oooqnp span, ._w8l5oqnp svg{width:.75rem}
|
|
72
|
-
._mezjviql img, ._e2ooviql span, ._w8l5viql svg{width:2rem}
|
|
73
29
|
._otyridpf{margin-bottom:0}
|
|
74
|
-
._p12f1j6v{max-width:1rem}
|
|
75
|
-
._p12f1k8s{max-width:1.5rem}
|
|
76
|
-
._p12foqnp{max-width:.75rem}
|
|
77
|
-
._p12fviql{max-width:2rem}
|
|
78
|
-
._qci81j6v img, ._15iz1j6v span, ._erub1j6v svg{min-height:1rem}
|
|
79
|
-
._qci81k8s img, ._15iz1k8s span, ._erub1k8s svg{min-height:1.5rem}
|
|
80
|
-
._qci8oqnp img, ._15izoqnp span, ._eruboqnp svg{min-height:.75rem}
|
|
81
|
-
._qci8viql img, ._15izviql span, ._erubviql svg{min-height:2rem}
|
|
82
|
-
._rtys1j6v img, ._b8nk1j6v span, ._4x201j6v svg{max-width:1rem}
|
|
83
|
-
._rtys1k8s img, ._b8nk1k8s span, ._4x201k8s svg{max-width:1.5rem}
|
|
84
|
-
._rtysoqnp img, ._b8nkoqnp span, ._4x20oqnp svg{max-width:.75rem}
|
|
85
|
-
._rtysviql img, ._b8nkviql span, ._4x20viql svg{max-width:2rem}
|
|
86
30
|
._sudpn7od{-webkit-box-orient:unset}
|
|
87
|
-
._uhasidpf svg{padding-right:0}
|
|
88
|
-
._vwz41j6v{line-height:1rem}
|
|
89
|
-
._vwz41k8s{line-height:1.5rem}
|
|
90
|
-
._vwz4oqnp{line-height:.75rem}
|
|
91
|
-
._vwz4viql{line-height:2rem}
|
|
92
31
|
._y3gn1h6o{text-align:center}
|
|
93
|
-
@supports not (-webkit-line-clamp:1){.
|
|
32
|
+
@supports not (-webkit-line-clamp:1){._102kptym{max-height:calc(var(--ds-space-200, 1pc)*1)}._102kz42d{max-height:calc(var(--ds-space-300, 24px)*1)}}
|
|
@@ -33,35 +33,23 @@ var positionStyleMap = {
|
|
|
33
33
|
center: "_1wpz1h6o",
|
|
34
34
|
top: "_19pkidpf _2hwxidpf _otyridpf _18u0idpf _1wpz1y6m"
|
|
35
35
|
};
|
|
36
|
-
var
|
|
37
|
-
xlarge: "
|
|
38
|
-
large: "
|
|
39
|
-
medium: "
|
|
40
|
-
small: "
|
|
41
|
-
};
|
|
42
|
-
var customRenderStyleMapOld = {
|
|
43
|
-
xlarge: "_1reo15vq _18m915vq _1e0ccj1k _1nmz1hna _1yyjkb7n _vwz4viql _1wybviql _y3gn1h6o _1btozryt _sudpn7od _1ipkidpf _1kdcidpf _3glyidpf _1w2uidpf _1oh2idpf _99ztidpf _1m2uidpf _9n9oidpf _e4km1q9y _102kviql",
|
|
44
|
-
large: "_1reo15vq _18m915vq _1e0ccj1k _1nmz1hna _1yyjkb7n _vwz41k8s _1wyb1k8s _y3gn1h6o _1btozryt _sudpn7od _1ipkidpf _1kdcidpf _3glyidpf _1w2uidpf _1oh2idpf _99ztidpf _1m2uidpf _9n9oidpf _e4km1q9y _102k1k8s",
|
|
45
|
-
medium: "_1reo15vq _18m915vq _1e0ccj1k _1nmz1hna _1yyjkb7n _vwz41j6v _1wyb1j6v _y3gn1h6o _1btozryt _sudpn7od _1ipkidpf _1kdcidpf _3glyidpf _1w2uidpf _1oh2idpf _99ztidpf _1m2uidpf _9n9oidpf _e4km1q9y _102k1j6v",
|
|
46
|
-
small: "_1reo15vq _18m915vq _1e0ccj1k _1nmz1hna _1yyjkb7n _vwz4oqnp _1wyboqnp _y3gn1h6o _1btozryt _sudpn7od _1ipkidpf _1kdcidpf _3glyidpf _1w2uidpf _1oh2idpf _99ztidpf _1m2uidpf _9n9oidpf _e4km1q9y _102koqnp"
|
|
47
|
-
};
|
|
48
|
-
var customRenderStyleMapNew = {
|
|
49
|
-
xlarge: "_1reo15vq _18m915vq _11c8nf1z _1e0ccj1k _1nmz1hna _1yyjkb7n _y3gn1h6o _1btozryt _sudpn7od _1ipkidpf _1kdcidpf _3glyidpf _1w2uidpf _1oh2idpf _99ztidpf _1m2uidpf _9n9oidpf _e4km1q9y _102kz42d",
|
|
50
|
-
large: "_1reo15vq _18m915vq _11c8nf1z _1e0ccj1k _1nmz1hna _1yyjkb7n _y3gn1h6o _1btozryt _sudpn7od _1ipkidpf _1kdcidpf _3glyidpf _1w2uidpf _1oh2idpf _99ztidpf _1m2uidpf _9n9oidpf _e4km1q9y _102kz42d",
|
|
51
|
-
medium: "_1reo15vq _18m915vq _11c8nbxd _1e0ccj1k _1nmz1hna _1yyjkb7n _y3gn1h6o _1btozryt _sudpn7od _1ipkidpf _1kdcidpf _3glyidpf _1w2uidpf _1oh2idpf _99ztidpf _1m2uidpf _9n9oidpf _e4km1q9y _102kptym",
|
|
52
|
-
small: "_1reo15vq _18m915vq _11c8nbxd _1e0ccj1k _1nmz1hna _1yyjkb7n _y3gn1h6o _1btozryt _sudpn7od _1ipkidpf _1kdcidpf _3glyidpf _1w2uidpf _1oh2idpf _99ztidpf _1m2uidpf _9n9oidpf _e4km1q9y _102kptym"
|
|
36
|
+
var customRenderStyleMap = {
|
|
37
|
+
xlarge: "_1reo15vq _18m915vq _11c8nf1z _1e0ccj1k _1nmz1hna _1yyjkb7n _y3gn1h6o _1btozryt _sudpn7od _1ipkidpf _1kdcidpf _3glyidpf _1w2uidpf _1oh2idpf _99ztidpf _1m2uidpf _9n9oidpf _e4km1q9y _1xjx1osq _e2oo1osq _102kz42d",
|
|
38
|
+
large: "_1reo15vq _18m915vq _11c8nf1z _1e0ccj1k _1nmz1hna _1yyjkb7n _y3gn1h6o _1btozryt _sudpn7od _1ipkidpf _1kdcidpf _3glyidpf _1w2uidpf _1oh2idpf _99ztidpf _1m2uidpf _9n9oidpf _e4km1q9y _1xjx1osq _e2oo1osq _102kz42d",
|
|
39
|
+
medium: "_1reo15vq _18m915vq _11c8nbxd _1e0ccj1k _1nmz1hna _1yyjkb7n _y3gn1h6o _1btozryt _sudpn7od _1ipkidpf _1kdcidpf _3glyidpf _1w2uidpf _1oh2idpf _99ztidpf _1m2uidpf _9n9oidpf _e4km1q9y _1xjx1osq _e2oo1osq _102kptym",
|
|
40
|
+
small: "_1reo15vq _18m915vq _11c8nbxd _1e0ccj1k _1nmz1hna _1yyjkb7n _y3gn1h6o _1btozryt _sudpn7od _1ipkidpf _1kdcidpf _3glyidpf _1w2uidpf _1oh2idpf _99ztidpf _1m2uidpf _9n9oidpf _e4km1q9y _1xjx1osq _e2oo1osq _102kptym"
|
|
53
41
|
};
|
|
54
42
|
var renderAtlaskitIcon = function renderAtlaskitIcon(icon, testId) {
|
|
55
43
|
var size = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _constants.SmartLinkSize.Medium;
|
|
56
44
|
if (icon) {
|
|
57
|
-
return /*#__PURE__*/React.createElement(_atlaskitIcon.default,
|
|
45
|
+
return /*#__PURE__*/React.createElement(_atlaskitIcon.default, {
|
|
58
46
|
icon: icon,
|
|
59
47
|
testId: "".concat(testId, "-icon"),
|
|
60
48
|
"aria-hidden": "true",
|
|
61
49
|
label: "" // Since we already set aria-hidden="true", the label should be given an empty string
|
|
62
|
-
|
|
50
|
+
,
|
|
63
51
|
size: size
|
|
64
|
-
})
|
|
52
|
+
});
|
|
65
53
|
}
|
|
66
54
|
};
|
|
67
55
|
var renderDefaultIcon = function renderDefaultIcon(label, testId) {
|
|
@@ -79,8 +67,7 @@ var renderImageIcon = function renderImageIcon(defaultIcon, url, testId) {
|
|
|
79
67
|
return /*#__PURE__*/React.createElement(_imageIcon.default, (0, _extends2.default)({
|
|
80
68
|
defaultIcon: defaultIcon,
|
|
81
69
|
testId: testId,
|
|
82
|
-
url: url
|
|
83
|
-
}, (0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration') && {
|
|
70
|
+
url: url,
|
|
84
71
|
width: width,
|
|
85
72
|
height: width
|
|
86
73
|
}, (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v2') && {
|
|
@@ -114,7 +101,7 @@ var Icon = function Icon(_ref) {
|
|
|
114
101
|
appearance = _ref$appearance === void 0 ? 'square' : _ref$appearance;
|
|
115
102
|
var element = (0, _react.useMemo)(function () {
|
|
116
103
|
var defaultIcon = renderDefaultIcon(label, testId);
|
|
117
|
-
return overrideIcon || (render === null || render === void 0 ? void 0 : render()) || renderImageIcon(defaultIcon, url, testId,
|
|
104
|
+
return overrideIcon || (render === null || render === void 0 ? void 0 : render()) || renderImageIcon(defaultIcon, url, testId, size, (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v2') ? appearance : undefined) || renderAtlaskitIcon(icon, testId, size) || defaultIcon;
|
|
118
105
|
}, [label, testId, overrideIcon, render, url, size, appearance, icon]);
|
|
119
106
|
var width = (0, _utils.getIconWidth)(size);
|
|
120
107
|
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({}, (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? {} : (0, _defineProperty2.default)({}, 'data-fit-to-content', true), {
|
|
@@ -123,13 +110,13 @@ var Icon = function Icon(_ref) {
|
|
|
123
110
|
"data-testid": testId
|
|
124
111
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
125
112
|
,
|
|
126
|
-
className: (0, _runtime.ax)([
|
|
127
|
-
}),
|
|
113
|
+
className: (0, _runtime.ax)([styles.container, positionStyleMap[position], render && customRenderStyleMap[size], className])
|
|
114
|
+
}), /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
128
115
|
xcss: styles.iconWrapperStyle,
|
|
129
116
|
style: {
|
|
130
117
|
width: width,
|
|
131
118
|
height: width
|
|
132
119
|
}
|
|
133
|
-
}, element)
|
|
120
|
+
}, element));
|
|
134
121
|
};
|
|
135
122
|
var _default = exports.default = Icon;
|
|
@@ -4,13 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.sizeToButtonSpacing = exports.importIcon = exports.hasWhiteSpace = exports.getPrimitivesInlineSpaceBySize = exports.getMaxLines = exports.getMaxLineHeight = exports.
|
|
7
|
+
exports.sizeToButtonSpacing = exports.importIcon = exports.hasWhiteSpace = exports.getPrimitivesInlineSpaceBySize = exports.getMaxLines = exports.getMaxLineHeight = exports.getIconWidth = exports.getFormattedMessageAsString = exports.getFormattedMessage = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _reactIntlNext = require("react-intl-next");
|
|
12
12
|
var _reactLoadable = _interopRequireDefault(require("react-loadable"));
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _constants = require("../../../constants");
|
|
15
14
|
var sizeToButtonSpacing = exports.sizeToButtonSpacing = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants.SmartLinkSize.Small, 'none'), _constants.SmartLinkSize.Medium, 'compact'), _constants.SmartLinkSize.Large, 'compact'), _constants.SmartLinkSize.XLarge, 'default');
|
|
16
15
|
var getFormattedMessage = exports.getFormattedMessage = function getFormattedMessage(message) {
|
|
@@ -28,24 +27,7 @@ var getFormattedMessageAsString = exports.getFormattedMessageAsString = function
|
|
|
28
27
|
context: context
|
|
29
28
|
}) : '';
|
|
30
29
|
};
|
|
31
|
-
|
|
32
|
-
// TODO Delete when cleaning platform-smart-card-icon-migration
|
|
33
|
-
var getIconWidthOld = exports.getIconWidthOld = function getIconWidthOld(size) {
|
|
34
|
-
switch (size) {
|
|
35
|
-
case _constants.SmartLinkSize.XLarge:
|
|
36
|
-
return '2rem';
|
|
37
|
-
case _constants.SmartLinkSize.Large:
|
|
38
|
-
return '1.5rem';
|
|
39
|
-
case _constants.SmartLinkSize.Medium:
|
|
40
|
-
return '1rem';
|
|
41
|
-
case _constants.SmartLinkSize.Small:
|
|
42
|
-
default:
|
|
43
|
-
return '.75rem';
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
// TODO Rename to getIconWidth when cleaning platform-smart-card-icon-migration
|
|
48
|
-
var getIconWidthNew = exports.getIconWidthNew = function getIconWidthNew(size) {
|
|
30
|
+
var getIconWidth = exports.getIconWidth = function getIconWidth(size) {
|
|
49
31
|
switch (size) {
|
|
50
32
|
case _constants.SmartLinkSize.XLarge:
|
|
51
33
|
case _constants.SmartLinkSize.Large:
|
|
@@ -56,11 +38,6 @@ var getIconWidthNew = exports.getIconWidthNew = function getIconWidthNew(size) {
|
|
|
56
38
|
return "var(--ds-space-200, 16px)";
|
|
57
39
|
}
|
|
58
40
|
};
|
|
59
|
-
|
|
60
|
-
// TODO Delete when cleaning platform-smart-card-icon-migration
|
|
61
|
-
var getIconWidth = exports.getIconWidth = function getIconWidth(size) {
|
|
62
|
-
return (0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration') ? getIconWidthNew(size) : getIconWidthOld(size);
|
|
63
|
-
};
|
|
64
41
|
var importIcon = exports.importIcon = function importIcon(importFn) {
|
|
65
42
|
return (0, _reactLoadable.default)({
|
|
66
43
|
loader: function loader() {
|
|
@@ -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: "36.
|
|
23
|
+
packageVersion: "36.14.0",
|
|
24
24
|
componentName: 'linkUrl'
|
|
25
25
|
};
|
|
26
26
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/source-code/16';
|
|
2
|
+
import LegacyIconLarge from '@atlaskit/icon-file-type/glyph/source-code/24';
|
|
2
3
|
import AngleBracketsIcon from '@atlaskit/icon/core/angle-brackets';
|
|
3
|
-
import { renderIconTile } from './utils';
|
|
4
|
-
const AngleBracketsIconWithColor = renderIconTile(AngleBracketsIcon, 'blueBold', LegacyIcon);
|
|
4
|
+
import { renderIconPerSize, renderIconTile } from './utils';
|
|
5
|
+
const AngleBracketsIconWithColor = renderIconTile(AngleBracketsIcon, 'blueBold', renderIconPerSize(LegacyIcon, LegacyIconLarge));
|
|
5
6
|
AngleBracketsIconWithColor.displayName = 'AngleBracketsIconWithColor';
|
|
6
7
|
export default AngleBracketsIconWithColor;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/audio/16';
|
|
2
|
+
import LegacyIconLarge from '@atlaskit/icon-file-type/glyph/audio/24';
|
|
2
3
|
import AudioIcon from '@atlaskit/icon/core/audio';
|
|
3
|
-
import { renderIconTile } from './utils';
|
|
4
|
-
const AudioIconWithColor = renderIconTile(AudioIcon, 'redBold', LegacyIcon);
|
|
4
|
+
import { renderIconPerSize, renderIconTile } from './utils';
|
|
5
|
+
const AudioIconWithColor = renderIconTile(AudioIcon, 'redBold', renderIconPerSize(LegacyIcon, LegacyIconLarge));
|
|
5
6
|
AudioIconWithColor.displayName = 'AudioIconWithColor';
|
|
6
7
|
export default AudioIconWithColor;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/presentation/16';
|
|
2
|
+
import LegacyIconLarge from '@atlaskit/icon-file-type/glyph/presentation/24';
|
|
2
3
|
import ChartBarIcon from '@atlaskit/icon/core/chart-bar';
|
|
3
|
-
import { renderIconTile } from './utils';
|
|
4
|
-
const ChartBarIconWithColor = renderIconTile(ChartBarIcon, 'purpleBold', LegacyIcon);
|
|
4
|
+
import { renderIconPerSize, renderIconTile } from './utils';
|
|
5
|
+
const ChartBarIconWithColor = renderIconTile(ChartBarIcon, 'purpleBold', renderIconPerSize(LegacyIcon, LegacyIconLarge));
|
|
5
6
|
ChartBarIconWithColor.displayName = 'ChartBarIconWithColor';
|
|
6
7
|
export default ChartBarIconWithColor;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/generic/16';
|
|
2
|
+
import LegacyIconLarge from '@atlaskit/icon-file-type/glyph/generic/24';
|
|
2
3
|
import FileIcon from '@atlaskit/icon/core/file';
|
|
3
|
-
import { renderIconTile } from './utils';
|
|
4
|
-
const FileIconWithColor = renderIconTile(FileIcon, 'grayBold', LegacyIcon);
|
|
4
|
+
import { renderIconPerSize, renderIconTile } from './utils';
|
|
5
|
+
const FileIconWithColor = renderIconTile(FileIcon, 'grayBold', renderIconPerSize(LegacyIcon, LegacyIconLarge));
|
|
5
6
|
FileIconWithColor.displayName = 'FileIconWithColor';
|
|
6
7
|
export default FileIconWithColor;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/folder/16';
|
|
2
|
+
import LegacyIconLarge from '@atlaskit/icon-file-type/glyph/folder/24';
|
|
2
3
|
import FolderClosedIcon from '@atlaskit/icon/core/folder-closed';
|
|
3
|
-
import { renderIconTile } from './utils';
|
|
4
|
-
const FolderClosedIconWithColor = renderIconTile(FolderClosedIcon, 'blueBold', LegacyIcon);
|
|
4
|
+
import { renderIconPerSize, renderIconTile } from './utils';
|
|
5
|
+
const FolderClosedIconWithColor = renderIconTile(FolderClosedIcon, 'blueBold', renderIconPerSize(LegacyIcon, LegacyIconLarge));
|
|
5
6
|
FolderClosedIconWithColor.displayName = 'FolderClosedIconWithColor';
|
|
6
7
|
export default FolderClosedIconWithColor;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/image/16';
|
|
2
|
+
import LegacyIconLarge from '@atlaskit/icon-file-type/glyph/image/24';
|
|
2
3
|
import ImageIcon from '@atlaskit/icon/core/image';
|
|
3
|
-
import { renderIconTile } from './utils';
|
|
4
|
-
const ImageIconWithColor = renderIconTile(ImageIcon, 'yellowBold', LegacyIcon);
|
|
4
|
+
import { renderIconPerSize, renderIconTile } from './utils';
|
|
5
|
+
const ImageIconWithColor = renderIconTile(ImageIcon, 'yellowBold', renderIconPerSize(LegacyIcon, LegacyIconLarge));
|
|
5
6
|
ImageIconWithColor.displayName = 'ImageIconWithColor';
|
|
6
7
|
export default ImageIconWithColor;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/spreadsheet/16';
|
|
2
|
+
import LegacyIconLarge from '@atlaskit/icon-file-type/glyph/spreadsheet/24';
|
|
2
3
|
import ListBulletedIcon from '@atlaskit/icon/core/list-bulleted';
|
|
3
|
-
import { renderIconTile } from './utils';
|
|
4
|
-
const ListBulletedIconWithColor = renderIconTile(ListBulletedIcon, 'greenBold', LegacyIcon);
|
|
4
|
+
import { renderIconPerSize, renderIconTile } from './utils';
|
|
5
|
+
const ListBulletedIconWithColor = renderIconTile(ListBulletedIcon, 'greenBold', renderIconPerSize(LegacyIcon, LegacyIconLarge));
|
|
5
6
|
ListBulletedIconWithColor.displayName = 'ListBulletedIconWithColor';
|
|
6
7
|
export default ListBulletedIconWithColor;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/document/16';
|
|
2
|
+
import LegacyIconLarge from '@atlaskit/icon-file-type/glyph/document/24';
|
|
2
3
|
import PageIcon from '@atlaskit/icon/core/page';
|
|
3
|
-
import { renderIconTile } from './utils';
|
|
4
|
-
const PageIconWithColor = renderIconTile(PageIcon, 'blueBold', LegacyIcon);
|
|
4
|
+
import { renderIconPerSize, renderIconTile } from './utils';
|
|
5
|
+
const PageIconWithColor = renderIconTile(PageIcon, 'blueBold', renderIconPerSize(LegacyIcon, LegacyIconLarge));
|
|
5
6
|
PageIconWithColor.displayName = 'PageIconWithColor';
|
|
6
7
|
export default PageIconWithColor;
|
|
@@ -33,7 +33,9 @@ export const renderIconTile = (Icon, appearance, LegacyIcon) => {
|
|
|
33
33
|
icon: Icon,
|
|
34
34
|
size: transformSmartLinkSizeToIconTileSize(size)
|
|
35
35
|
}, props, {
|
|
36
|
-
LEGACY_fallbackComponent: LegacyIcon && /*#__PURE__*/React.createElement(LegacyIcon, props
|
|
36
|
+
LEGACY_fallbackComponent: LegacyIcon && /*#__PURE__*/React.createElement(LegacyIcon, _extends({}, props, {
|
|
37
|
+
size: size
|
|
38
|
+
}))
|
|
37
39
|
}));
|
|
38
40
|
};
|
|
39
41
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import LegacyIcon from '@atlaskit/icon-file-type/glyph/video/16';
|
|
2
|
+
import LegacyIconLarge from '@atlaskit/icon-file-type/glyph/video/24';
|
|
2
3
|
import VideoIcon from '@atlaskit/icon/core/video';
|
|
3
|
-
import { renderIconTile } from './utils';
|
|
4
|
-
const VideoIconWithColor = renderIconTile(VideoIcon, 'redBold', LegacyIcon);
|
|
4
|
+
import { renderIconPerSize, renderIconTile } from './utils';
|
|
5
|
+
const VideoIconWithColor = renderIconTile(VideoIcon, 'redBold', renderIconPerSize(LegacyIcon, LegacyIconLarge));
|
|
5
6
|
VideoIconWithColor.displayName = 'VideoIconWithColor';
|
|
6
7
|
export default VideoIconWithColor;
|
|
@@ -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: "36.
|
|
5
|
+
packageVersion: "36.14.0"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { SmartLinkSize } from '../../../../../../constants';
|
|
5
5
|
import { LoadingSkeleton } from '../../../common/loading-skeleton';
|
|
6
|
-
import {
|
|
6
|
+
import { getIconWidth } from '../../../utils';
|
|
7
7
|
import Block from '../../block';
|
|
8
8
|
/**
|
|
9
9
|
* This represents a TitleBlock for a Smart Link that is currently waiting
|
|
@@ -21,7 +21,7 @@ const TitleBlockResolvingView = ({
|
|
|
21
21
|
const {
|
|
22
22
|
size = SmartLinkSize.Medium
|
|
23
23
|
} = blockProps;
|
|
24
|
-
const iconWidth =
|
|
24
|
+
const iconWidth = getIconWidth(size);
|
|
25
25
|
return /*#__PURE__*/React.createElement(Block, _extends({}, blockProps, {
|
|
26
26
|
testId: `${testId}-resolving-view`
|
|
27
27
|
}), !hideIcon && /*#__PURE__*/React.createElement("span", {
|
|
@@ -1,102 +1,17 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import Loadable from 'react-loadable';
|
|
4
|
-
import DocumentIconOld from '@atlaskit/icon-file-type/glyph/document/16';
|
|
5
|
-
import BlogIconOld from '@atlaskit/icon-object/glyph/blog/16';
|
|
6
3
|
import { ConfluenceIcon, JiraIcon } from '@atlaskit/logo';
|
|
7
|
-
import
|
|
8
|
-
import { R400 } from '@atlaskit/theme/colors';
|
|
9
|
-
import BlogIconNew from '../../../../../common/ui/icons/blog-icon';
|
|
4
|
+
import BlogIcon from '../../../../../common/ui/icons/blog-icon';
|
|
10
5
|
import LiveDocumentIcon from '../../../../../common/ui/icons/live-document-icon';
|
|
11
|
-
import
|
|
6
|
+
import DocumentIcon from '../../../../../common/ui/icons/page-icon';
|
|
12
7
|
import { IconType, SmartLinkSize } from '../../../../../constants';
|
|
13
8
|
import { getLazyIcons, isIconSizeLarge } from '../../../../../utils';
|
|
14
|
-
// prettier-ignore
|
|
15
|
-
const importIconMapperOld = {
|
|
16
|
-
[IconType.Archive]: () => import( /* webpackChunkName: "glyphArchive" */'@atlaskit/icon-file-type/glyph/archive/16'),
|
|
17
|
-
[IconType.Audio]: () => import( /* webpackChunkName: "glyphAudio" */'@atlaskit/icon-file-type/glyph/audio/16'),
|
|
18
|
-
[IconType.Code]: () => import( /* webpackChunkName: "glyphCode" */'@atlaskit/icon-file-type/glyph/source-code/16'),
|
|
19
|
-
[IconType.Executable]: () => import( /* webpackChunkName: "glyphExecutable" */'@atlaskit/icon-file-type/glyph/executable/16'),
|
|
20
|
-
[IconType.File]: () => import( /* webpackChunkName: "glyphFile" */'@atlaskit/icon-file-type/glyph/generic/16'),
|
|
21
|
-
[IconType.Folder]: () => import( /* webpackChunkName: "glyphFolder" */'@atlaskit/icon-file-type/glyph/folder/16'),
|
|
22
|
-
[IconType.Generic]: () => import( /* webpackChunkName: "glyphGeneric" */'@atlaskit/icon-file-type/glyph/generic/16'),
|
|
23
|
-
[IconType.GIF]: () => import( /* webpackChunkName: "glyphGIF" */'@atlaskit/icon-file-type/glyph/gif/16'),
|
|
24
|
-
[IconType.GoogleDocs]: () => import( /* webpackChunkName: "glyphGoogleDocs" */'@atlaskit/icon-file-type/glyph/google-doc/16'),
|
|
25
|
-
[IconType.GoogleForms]: () => import( /* webpackChunkName: "glyphGoogleForms" */'@atlaskit/icon-file-type/glyph/google-form/16'),
|
|
26
|
-
[IconType.GoogleSheets]: () => import( /* webpackChunkName: "glyphGoogleSheets" */'@atlaskit/icon-file-type/glyph/google-sheet/16'),
|
|
27
|
-
[IconType.GoogleSlides]: () => import( /* webpackChunkName: "glyphGoogleSlides" */'@atlaskit/icon-file-type/glyph/google-slide/16'),
|
|
28
|
-
[IconType.Image]: () => import( /* webpackChunkName: "glyphImage" */'@atlaskit/icon-file-type/glyph/image/16'),
|
|
29
|
-
[IconType.MSExcel]: () => import( /* webpackChunkName: "glyphMSExcel" */'@atlaskit/icon-file-type/glyph/excel-spreadsheet/16'),
|
|
30
|
-
[IconType.MSPowerpoint]: () => import( /* webpackChunkName: "glyphMSPowerpoint" */'@atlaskit/icon-file-type/glyph/powerpoint-presentation/16'),
|
|
31
|
-
[IconType.MSWord]: () => import( /* webpackChunkName: "glyphMSWord" */'@atlaskit/icon-file-type/glyph/word-document/16'),
|
|
32
|
-
[IconType.PDF]: () => import( /* webpackChunkName: "glyphPDF" */'@atlaskit/icon-file-type/glyph/pdf-document/16'),
|
|
33
|
-
[IconType.Presentation]: () => import( /* webpackChunkName: "glyphPresentation" */'@atlaskit/icon-file-type/glyph/presentation/16'),
|
|
34
|
-
[IconType.Sketch]: () => import( /* webpackChunkName: "glyphSketch" */'@atlaskit/icon-file-type/glyph/sketch/16'),
|
|
35
|
-
[IconType.Spreadsheet]: () => import( /* webpackChunkName: "glyphSpreadsheet" */'@atlaskit/icon-file-type/glyph/spreadsheet/16'),
|
|
36
|
-
[IconType.Template]: () => import( /* webpackChunkName: "glyphTemplate" */'@atlaskit/icon/glyph/document-filled'),
|
|
37
|
-
[IconType.Video]: () => import( /* webpackChunkName: "glyphVideo" */'@atlaskit/icon-file-type/glyph/video/16'),
|
|
38
|
-
// Bitbucket icons
|
|
39
|
-
[IconType.Branch]: () => import( /* webpackChunkName: "glyphBranch" */'@atlaskit/icon-object/glyph/branch/16'),
|
|
40
|
-
[IconType.Commit]: () => import( /* webpackChunkName: "glyphCommit" */'@atlaskit/icon-object/glyph/commit/16'),
|
|
41
|
-
[IconType.Project]: () => import( /* webpackChunkName: "glyphProject" */'@atlaskit/icon/glyph/people-group'),
|
|
42
|
-
[IconType.PullRequest]: () => import( /* webpackChunkName: "glyphPullRequest" */'@atlaskit/icon-object/glyph/pull-request/16'),
|
|
43
|
-
[IconType.Repo]: () => import( /* webpackChunkName: "glyphRepo" */'@atlaskit/icon-object/glyph/code/16'),
|
|
44
|
-
// Jira icons
|
|
45
|
-
[IconType.Bug]: () => import( /* webpackChunkName: "glyphBug" */'@atlaskit/icon-object/glyph/bug/16'),
|
|
46
|
-
[IconType.Change]: () => import( /* webpackChunkName: "glyphChange" */'@atlaskit/icon-object/glyph/changes/16'),
|
|
47
|
-
[IconType.Epic]: () => import( /* webpackChunkName: "glyphEpic" */'@atlaskit/icon-object/glyph/epic/16'),
|
|
48
|
-
[IconType.Incident]: () => import( /* webpackChunkName: "glyphIncident" */'@atlaskit/icon-object/glyph/incident/16'),
|
|
49
|
-
[IconType.Problem]: () => import( /* webpackChunkName: "glyphProblem" */'@atlaskit/icon-object/glyph/problem/16'),
|
|
50
|
-
[IconType.ServiceRequest]: () => import( /* webpackChunkName: "glyphServiceRequest" */'@atlaskit/icon-object/glyph/issue/16'),
|
|
51
|
-
[IconType.Story]: () => import( /* webpackChunkName: "glyphStory" */'@atlaskit/icon-object/glyph/story/16'),
|
|
52
|
-
[IconType.SubTask]: () => import( /* webpackChunkName: "glyphSubTask" */'@atlaskit/icon-object/glyph/subtask/16'),
|
|
53
|
-
[IconType.Task]: () => import( /* webpackChunkName: "glyphTask" */'@atlaskit/icon-object/glyph/task/16'),
|
|
54
|
-
// Provider icons
|
|
55
|
-
[IconType.Confluence]: () => import( /* webpackChunkName: "glyphConfluence" */'@atlaskit/logo/confluence-icon').then(({
|
|
56
|
-
ConfluenceIcon
|
|
57
|
-
}) => ({
|
|
58
|
-
default: ConfluenceIcon
|
|
59
|
-
})),
|
|
60
|
-
[IconType.Jira]: () => import( /* webpackChunkName: "glyphJira" */'@atlaskit/logo/jira-icon').then(({
|
|
61
|
-
JiraIcon
|
|
62
|
-
}) => ({
|
|
63
|
-
default: JiraIcon
|
|
64
|
-
})),
|
|
65
|
-
// Fallback icons
|
|
66
|
-
[IconType.Default]: () => import( /* webpackChunkName: "glyphDefault" */'@atlaskit/icon/glyph/link'),
|
|
67
|
-
[IconType.Error]: () => import( /* webpackChunkName: "glyphError" */'@atlaskit/icon/glyph/error'),
|
|
68
|
-
[IconType.Forbidden]: () => import( /* webpackChunkName: "glyphForbidden" */'@atlaskit/icon/glyph/lock-filled'),
|
|
69
|
-
// Badge
|
|
70
|
-
[IconType.Attachment]: () => import( /* webpackChunkName: "glyphAttachment" */'@atlaskit/icon/glyph/attachment'),
|
|
71
|
-
[IconType.CheckItem]: () => import( /* webpackChunkName: "glyphAttachment" */'@atlaskit/icon/glyph/task'),
|
|
72
|
-
[IconType.Comment]: () => import( /* webpackChunkName: "glyphComment" */'@atlaskit/icon/glyph/comment'),
|
|
73
|
-
[IconType.View]: () => import( /* webpackChunkName: "glyphComment" */'@atlaskit/icon/glyph/watch'),
|
|
74
|
-
[IconType.React]: () => import( /* webpackChunkName: "glyphComment" */'@atlaskit/icon/glyph/like'),
|
|
75
|
-
[IconType.Vote]: () => import( /* webpackChunkName: "glyphComment" */'@atlaskit/icon/glyph/arrow-up'),
|
|
76
|
-
[IconType.PriorityBlocker]: () => import( /* webpackChunkName: "glyphBlocker" */'@atlaskit/icon-priority/glyph/priority-blocker'),
|
|
77
|
-
[IconType.PriorityCritical]: () => import( /* webpackChunkName: "glyphCritical" */'@atlaskit/icon-priority/glyph/priority-critical'),
|
|
78
|
-
[IconType.PriorityHigh]: () => import( /* webpackChunkName: "glyphHigh" */'@atlaskit/icon-priority/glyph/priority-high'),
|
|
79
|
-
[IconType.PriorityHighest]: () => import( /* webpackChunkName: "glyphHighest" */'@atlaskit/icon-priority/glyph/priority-highest'),
|
|
80
|
-
[IconType.PriorityLow]: () => import( /* webpackChunkName: "glyphLow" */'@atlaskit/icon-priority/glyph/priority-low'),
|
|
81
|
-
[IconType.PriorityLowest]: () => import( /* webpackChunkName: "glyphLowest" */'@atlaskit/icon-priority/glyph/priority-lowest'),
|
|
82
|
-
[IconType.PriorityMajor]: () => import( /* webpackChunkName: "glyphMajor" */'@atlaskit/icon-priority/glyph/priority-major'),
|
|
83
|
-
[IconType.PriorityMedium]: () => import( /* webpackChunkName: "glyphMedium" */'@atlaskit/icon-priority/glyph/priority-medium'),
|
|
84
|
-
[IconType.PriorityMinor]: () => import( /* webpackChunkName: "glyphMinor" */'@atlaskit/icon-priority/glyph/priority-minor'),
|
|
85
|
-
[IconType.PriorityTrivial]: () => import( /* webpackChunkName: "glyphTrivial" */'@atlaskit/icon-priority/glyph/priority-trivial'),
|
|
86
|
-
[IconType.PriorityUndefined]: () => import( /* webpackChunkName: "glyphUndefined" */'@atlaskit/icon/glyph/question'),
|
|
87
|
-
[IconType.ProgrammingLanguage]: () => import( /* webpackChunkName: "glyphProgrammingLanguage" */'@atlaskit/icon/glyph/code'),
|
|
88
|
-
[IconType.Subscriber]: () => import( /* webpackChunkName: "glyphSubscriber" */'@atlaskit/icon/glyph/people'),
|
|
89
|
-
[IconType.SubTasksProgress]: () => import( /* webpackChunkName: "glyphSubtaskProgress" */'@atlaskit/icon/glyph/subtask')
|
|
90
|
-
};
|
|
91
9
|
const getIconImportFn = (icon, size) => {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return item.large;
|
|
96
|
-
}
|
|
97
|
-
return item === null || item === void 0 ? void 0 : item.default;
|
|
10
|
+
const item = getLazyIcons()[icon];
|
|
11
|
+
if (isIconSizeLarge(size) && item !== null && item !== void 0 && item.large) {
|
|
12
|
+
return item.large;
|
|
98
13
|
}
|
|
99
|
-
return
|
|
14
|
+
return item === null || item === void 0 ? void 0 : item.default;
|
|
100
15
|
};
|
|
101
16
|
const importIcon = importFn => {
|
|
102
17
|
return Loadable({
|
|
@@ -110,32 +25,26 @@ const AtlaskitIcon = ({
|
|
|
110
25
|
testId,
|
|
111
26
|
size = SmartLinkSize.Medium
|
|
112
27
|
}) => {
|
|
113
|
-
const DocumentIcon = fg('platform-smart-card-icon-migration') ? DocumentIconNew : DocumentIconOld;
|
|
114
|
-
const BlogIcon = fg('platform-smart-card-icon-migration') ? BlogIconNew : BlogIconOld;
|
|
115
|
-
|
|
116
28
|
// Check for synchonously loaded icons first for SSR purposes
|
|
117
29
|
switch (icon) {
|
|
118
30
|
case IconType.Document:
|
|
119
|
-
return /*#__PURE__*/React.createElement(DocumentIcon,
|
|
31
|
+
return /*#__PURE__*/React.createElement(DocumentIcon, {
|
|
120
32
|
label: label !== null && label !== void 0 ? label : 'document',
|
|
121
|
-
testId: testId
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}));
|
|
33
|
+
testId: testId,
|
|
34
|
+
size: size
|
|
35
|
+
});
|
|
125
36
|
case IconType.Blog:
|
|
126
|
-
return /*#__PURE__*/React.createElement(BlogIcon,
|
|
37
|
+
return /*#__PURE__*/React.createElement(BlogIcon, {
|
|
127
38
|
label: label !== null && label !== void 0 ? label : 'blog',
|
|
128
|
-
testId: testId
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}));
|
|
39
|
+
testId: testId,
|
|
40
|
+
size: size
|
|
41
|
+
});
|
|
132
42
|
case IconType.LiveDocument:
|
|
133
|
-
return /*#__PURE__*/React.createElement(LiveDocumentIcon,
|
|
43
|
+
return /*#__PURE__*/React.createElement(LiveDocumentIcon, {
|
|
134
44
|
label: label !== null && label !== void 0 ? label : 'live-doc',
|
|
135
|
-
testId: testId
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}));
|
|
45
|
+
testId: testId,
|
|
46
|
+
size: size
|
|
47
|
+
});
|
|
139
48
|
}
|
|
140
49
|
const importFn = getIconImportFn(icon, size);
|
|
141
50
|
if (!importFn) {
|
|
@@ -144,37 +53,32 @@ const AtlaskitIcon = ({
|
|
|
144
53
|
const ImportedIcon = importIcon(importFn);
|
|
145
54
|
switch (icon) {
|
|
146
55
|
case IconType.Confluence:
|
|
147
|
-
return /*#__PURE__*/React.createElement(ConfluenceIcon,
|
|
56
|
+
return /*#__PURE__*/React.createElement(ConfluenceIcon, {
|
|
148
57
|
appearance: "brand",
|
|
149
|
-
testId: testId
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}));
|
|
58
|
+
testId: testId,
|
|
59
|
+
size: size === SmartLinkSize.Large || size === SmartLinkSize.XLarge ? 'small' : 'xsmall'
|
|
60
|
+
});
|
|
153
61
|
case IconType.Jira:
|
|
154
|
-
return /*#__PURE__*/React.createElement(JiraIcon,
|
|
62
|
+
return /*#__PURE__*/React.createElement(JiraIcon, {
|
|
155
63
|
appearance: "brand",
|
|
156
|
-
testId: testId
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}));
|
|
64
|
+
testId: testId,
|
|
65
|
+
size: size === SmartLinkSize.Large || size === SmartLinkSize.XLarge ? 'small' : 'xsmall'
|
|
66
|
+
});
|
|
160
67
|
case IconType.Error:
|
|
161
68
|
case IconType.Forbidden:
|
|
162
|
-
return /*#__PURE__*/React.createElement(ImportedIcon,
|
|
69
|
+
return /*#__PURE__*/React.createElement(ImportedIcon, {
|
|
163
70
|
label: label,
|
|
164
|
-
testId: testId
|
|
165
|
-
|
|
166
|
-
size,
|
|
71
|
+
testId: testId,
|
|
72
|
+
LEGACY_size: size === SmartLinkSize.Large || size === SmartLinkSize.XLarge ? 'medium' : 'small',
|
|
167
73
|
color: "var(--ds-icon-danger, #C9372C)"
|
|
168
|
-
}
|
|
169
|
-
primaryColor: `var(--ds-icon-danger, ${R400})`
|
|
170
|
-
}));
|
|
74
|
+
});
|
|
171
75
|
default:
|
|
172
|
-
return /*#__PURE__*/React.createElement(ImportedIcon,
|
|
76
|
+
return /*#__PURE__*/React.createElement(ImportedIcon, {
|
|
173
77
|
label: label,
|
|
174
|
-
testId: testId
|
|
175
|
-
|
|
176
|
-
size
|
|
177
|
-
})
|
|
78
|
+
testId: testId,
|
|
79
|
+
LEGACY_size: size === SmartLinkSize.Large || size === SmartLinkSize.XLarge ? 'medium' : 'small',
|
|
80
|
+
size: size
|
|
81
|
+
});
|
|
178
82
|
}
|
|
179
83
|
};
|
|
180
84
|
export default AtlaskitIcon;
|