@atlaskit/smart-card 31.0.1 → 31.0.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 +6 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/components/Provider.js +3 -1
- package/dist/cjs/view/EmbedCard/components/IFrame.js +1 -0
- package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-item/index.js +12 -8
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +1 -0
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/Metadata.js +1 -0
- package/dist/cjs/view/common/stop-propagation/index.js +7 -4
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/components/Provider.js +3 -1
- package/dist/es2019/view/EmbedCard/components/IFrame.js +1 -0
- package/dist/es2019/view/EmbedCard/views/unresolved-view/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-item/index.js +12 -8
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +1 -0
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/Metadata.js +1 -0
- package/dist/es2019/view/common/stop-propagation/index.js +7 -4
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/components/Provider.js +3 -1
- package/dist/esm/view/EmbedCard/components/IFrame.js +1 -0
- package/dist/esm/view/EmbedCard/views/unresolved-view/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-item/index.js +12 -8
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +1 -0
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/Metadata.js +1 -0
- package/dist/esm/view/common/stop-propagation/index.js +7 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -17,7 +17,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
17
17
|
var context = exports.context = {
|
|
18
18
|
componentName: 'smart-cards',
|
|
19
19
|
packageName: "@atlaskit/smart-card",
|
|
20
|
-
packageVersion: "31.0.
|
|
20
|
+
packageVersion: "31.0.2"
|
|
21
21
|
};
|
|
22
22
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
23
23
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -40,7 +40,9 @@ var Provider = exports.Provider = function Provider(_ref) {
|
|
|
40
40
|
icon = _ref.icon;
|
|
41
41
|
var iconToRender = icon || null;
|
|
42
42
|
if (typeof icon === 'string') {
|
|
43
|
-
iconToRender =
|
|
43
|
+
iconToRender =
|
|
44
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
45
|
+
(0, _react.jsx)("img", {
|
|
44
46
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
45
47
|
className: "smart-link-icon",
|
|
46
48
|
css: imgStyles,
|
|
@@ -15,6 +15,7 @@ var _excluded = ["childRef"];
|
|
|
15
15
|
var IFrame = exports.IFrame = function IFrame(_ref) {
|
|
16
16
|
var childRef = _ref.childRef,
|
|
17
17
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
18
|
+
// eslint-disable-next-line jsx-a11y/iframe-has-title
|
|
18
19
|
return /*#__PURE__*/_react.default.createElement("iframe", (0, _extends2.default)({}, props, {
|
|
19
20
|
ref: childRef
|
|
20
21
|
}));
|
|
@@ -81,6 +81,7 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
81
81
|
}
|
|
82
82
|
var imageTestId = "".concat(testId, "-unresolved-image");
|
|
83
83
|
if (typeof imageUrlOrElement === 'string') {
|
|
84
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
84
85
|
return (0, _react2.jsx)("img", {
|
|
85
86
|
css: imageStyles,
|
|
86
87
|
"data-testid": imageTestId,
|
|
@@ -25,7 +25,9 @@ var ImageIcon = function ImageIcon(_ref) {
|
|
|
25
25
|
src: url,
|
|
26
26
|
loading: (0, _react.jsx)(_loadingSkeleton.default, {
|
|
27
27
|
testId: "".concat(testId, "-loading")
|
|
28
|
-
})
|
|
28
|
+
})
|
|
29
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
30
|
+
,
|
|
29
31
|
loaded: (0, _react.jsx)("img", {
|
|
30
32
|
src: url,
|
|
31
33
|
"data-testid": "".concat(testId, "-image")
|
|
@@ -29,13 +29,17 @@ var LozengeActionItem = function LozengeActionItem(_ref) {
|
|
|
29
29
|
var _e$currentTarget;
|
|
30
30
|
(_e$currentTarget = e.currentTarget) === null || _e$currentTarget === void 0 || (_e$currentTarget = _e$currentTarget.firstElementChild) === null || _e$currentTarget === void 0 || _e$currentTarget.focus();
|
|
31
31
|
}, []);
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
return (
|
|
33
|
+
/*#__PURE__*/
|
|
34
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
35
|
+
_react.default.createElement("span", {
|
|
36
|
+
onMouseEnter: handleMouseEnter
|
|
37
|
+
}, /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItem, {
|
|
38
|
+
onClick: handleClick,
|
|
39
|
+
testId: testId
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_lozenge.default, {
|
|
41
|
+
appearance: appearance
|
|
42
|
+
}, text)))
|
|
43
|
+
);
|
|
40
44
|
};
|
|
41
45
|
var _default = exports.default = LozengeActionItem;
|
|
@@ -212,6 +212,7 @@ var HoverCardComponent = exports.HoverCardComponent = function HoverCardComponen
|
|
|
212
212
|
return (0, _react2.jsx)("span", {
|
|
213
213
|
ref: parentSpan
|
|
214
214
|
}, (0, _react2.jsx)("span", (0, _extends2.default)({}, triggerProps, {
|
|
215
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
215
216
|
onMouseOver: initShowCard,
|
|
216
217
|
onMouseLeave: initHideCard,
|
|
217
218
|
onMouseMove: setMousePosition,
|
|
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
|
17
17
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
18
18
|
var PACKAGE_DATA = {
|
|
19
19
|
packageName: "@atlaskit/smart-card",
|
|
20
|
-
packageVersion: "31.0.
|
|
20
|
+
packageVersion: "31.0.2",
|
|
21
21
|
componentName: 'linkUrl'
|
|
22
22
|
};
|
|
23
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -36,6 +36,7 @@ var Metadata = exports.Metadata = function Metadata(_ref) {
|
|
|
36
36
|
tooltip = _ref.tooltip;
|
|
37
37
|
var metadataIcon = icon || null;
|
|
38
38
|
if (!metadataIcon && iconUrl) {
|
|
39
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
39
40
|
metadataIcon = (0, _react.jsx)("img", {
|
|
40
41
|
src: iconUrl,
|
|
41
42
|
css: imgStyles
|
|
@@ -27,8 +27,11 @@ var StopPropagation = exports.StopPropagation = function StopPropagation(_ref) {
|
|
|
27
27
|
// Prevent click event inside modal from bubble up
|
|
28
28
|
e.stopPropagation();
|
|
29
29
|
}, []);
|
|
30
|
-
return (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
return (
|
|
31
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
32
|
+
(0, _react2.jsx)("span", {
|
|
33
|
+
css: styles,
|
|
34
|
+
onClick: onClick
|
|
35
|
+
}, children)
|
|
36
|
+
);
|
|
34
37
|
};
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "31.0.
|
|
7
|
+
packageVersion: "31.0.2"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -34,7 +34,9 @@ export const Provider = ({
|
|
|
34
34
|
}) => {
|
|
35
35
|
let iconToRender = icon || null;
|
|
36
36
|
if (typeof icon === 'string') {
|
|
37
|
-
iconToRender =
|
|
37
|
+
iconToRender =
|
|
38
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
39
|
+
jsx("img", {
|
|
38
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
39
41
|
className: "smart-link-icon",
|
|
40
42
|
css: imgStyles,
|
|
@@ -20,13 +20,17 @@ const LozengeActionItem = ({
|
|
|
20
20
|
var _e$currentTarget, _e$currentTarget$firs;
|
|
21
21
|
(_e$currentTarget = e.currentTarget) === null || _e$currentTarget === void 0 ? void 0 : (_e$currentTarget$firs = _e$currentTarget.firstElementChild) === null || _e$currentTarget$firs === void 0 ? void 0 : _e$currentTarget$firs.focus();
|
|
22
22
|
}, []);
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
return (
|
|
24
|
+
/*#__PURE__*/
|
|
25
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
26
|
+
React.createElement("span", {
|
|
27
|
+
onMouseEnter: handleMouseEnter
|
|
28
|
+
}, /*#__PURE__*/React.createElement(DropdownItem, {
|
|
29
|
+
onClick: handleClick,
|
|
30
|
+
testId: testId
|
|
31
|
+
}, /*#__PURE__*/React.createElement(Lozenge, {
|
|
32
|
+
appearance: appearance
|
|
33
|
+
}, text)))
|
|
34
|
+
);
|
|
31
35
|
};
|
|
32
36
|
export default LozengeActionItem;
|
|
@@ -189,6 +189,7 @@ export const HoverCardComponent = ({
|
|
|
189
189
|
}) => jsx("span", {
|
|
190
190
|
ref: parentSpan
|
|
191
191
|
}, jsx("span", _extends({}, triggerProps, {
|
|
192
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
192
193
|
onMouseOver: initShowCard,
|
|
193
194
|
onMouseLeave: initHideCard,
|
|
194
195
|
onMouseMove: setMousePosition,
|
|
@@ -7,7 +7,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
7
7
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
8
8
|
const PACKAGE_DATA = {
|
|
9
9
|
packageName: "@atlaskit/smart-card",
|
|
10
|
-
packageVersion: "31.0.
|
|
10
|
+
packageVersion: "31.0.2",
|
|
11
11
|
componentName: 'linkUrl'
|
|
12
12
|
};
|
|
13
13
|
const Link = withLinkClickedEvent('a');
|
|
@@ -18,8 +18,11 @@ export const StopPropagation = ({
|
|
|
18
18
|
// Prevent click event inside modal from bubble up
|
|
19
19
|
e.stopPropagation();
|
|
20
20
|
}, []);
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
return (
|
|
22
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
23
|
+
jsx("span", {
|
|
24
|
+
css: styles,
|
|
25
|
+
onClick: onClick
|
|
26
|
+
}, children)
|
|
27
|
+
);
|
|
25
28
|
};
|
|
@@ -10,7 +10,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
10
10
|
export var context = {
|
|
11
11
|
componentName: 'smart-cards',
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "31.0.
|
|
13
|
+
packageVersion: "31.0.2"
|
|
14
14
|
};
|
|
15
15
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
16
16
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -33,7 +33,9 @@ export var Provider = function Provider(_ref) {
|
|
|
33
33
|
icon = _ref.icon;
|
|
34
34
|
var iconToRender = icon || null;
|
|
35
35
|
if (typeof icon === 'string') {
|
|
36
|
-
iconToRender =
|
|
36
|
+
iconToRender =
|
|
37
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
38
|
+
jsx("img", {
|
|
37
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
38
40
|
className: "smart-link-icon",
|
|
39
41
|
css: imgStyles,
|
|
@@ -8,6 +8,7 @@ import React from 'react';
|
|
|
8
8
|
export var IFrame = function IFrame(_ref) {
|
|
9
9
|
var childRef = _ref.childRef,
|
|
10
10
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
+
// eslint-disable-next-line jsx-a11y/iframe-has-title
|
|
11
12
|
return /*#__PURE__*/React.createElement("iframe", _extends({}, props, {
|
|
12
13
|
ref: childRef
|
|
13
14
|
}));
|
|
@@ -70,6 +70,7 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
70
70
|
}
|
|
71
71
|
var imageTestId = "".concat(testId, "-unresolved-image");
|
|
72
72
|
if (typeof imageUrlOrElement === 'string') {
|
|
73
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
73
74
|
return jsx("img", {
|
|
74
75
|
css: imageStyles,
|
|
75
76
|
"data-testid": imageTestId,
|
|
@@ -17,7 +17,9 @@ var ImageIcon = function ImageIcon(_ref) {
|
|
|
17
17
|
src: url,
|
|
18
18
|
loading: jsx(LoadingSkeleton, {
|
|
19
19
|
testId: "".concat(testId, "-loading")
|
|
20
|
-
})
|
|
20
|
+
})
|
|
21
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
22
|
+
,
|
|
21
23
|
loaded: jsx("img", {
|
|
22
24
|
src: url,
|
|
23
25
|
"data-testid": "".concat(testId, "-image")
|
|
@@ -19,13 +19,17 @@ var LozengeActionItem = function LozengeActionItem(_ref) {
|
|
|
19
19
|
var _e$currentTarget;
|
|
20
20
|
(_e$currentTarget = e.currentTarget) === null || _e$currentTarget === void 0 || (_e$currentTarget = _e$currentTarget.firstElementChild) === null || _e$currentTarget === void 0 || _e$currentTarget.focus();
|
|
21
21
|
}, []);
|
|
22
|
-
return
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
return (
|
|
23
|
+
/*#__PURE__*/
|
|
24
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
25
|
+
React.createElement("span", {
|
|
26
|
+
onMouseEnter: handleMouseEnter
|
|
27
|
+
}, /*#__PURE__*/React.createElement(DropdownItem, {
|
|
28
|
+
onClick: handleClick,
|
|
29
|
+
testId: testId
|
|
30
|
+
}, /*#__PURE__*/React.createElement(Lozenge, {
|
|
31
|
+
appearance: appearance
|
|
32
|
+
}, text)))
|
|
33
|
+
);
|
|
30
34
|
};
|
|
31
35
|
export default LozengeActionItem;
|
|
@@ -203,6 +203,7 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
203
203
|
return jsx("span", {
|
|
204
204
|
ref: parentSpan
|
|
205
205
|
}, jsx("span", _extends({}, triggerProps, {
|
|
206
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
206
207
|
onMouseOver: initShowCard,
|
|
207
208
|
onMouseLeave: initHideCard,
|
|
208
209
|
onMouseMove: setMousePosition,
|
|
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
10
10
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
11
11
|
var PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "31.0.
|
|
13
|
+
packageVersion: "31.0.2",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -17,8 +17,11 @@ export var StopPropagation = function StopPropagation(_ref) {
|
|
|
17
17
|
// Prevent click event inside modal from bubble up
|
|
18
18
|
e.stopPropagation();
|
|
19
19
|
}, []);
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
return (
|
|
21
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
22
|
+
jsx("span", {
|
|
23
|
+
css: styles,
|
|
24
|
+
onClick: onClick
|
|
25
|
+
}, children)
|
|
26
|
+
);
|
|
24
27
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "31.0.
|
|
3
|
+
"version": "31.0.2",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@atlaskit/icon-file-type": "^6.7.0",
|
|
41
41
|
"@atlaskit/icon-object": "^6.7.0",
|
|
42
42
|
"@atlaskit/icon-priority": "^6.3.0",
|
|
43
|
-
"@atlaskit/legacy-custom-icons": "^0.
|
|
43
|
+
"@atlaskit/legacy-custom-icons": "^0.20.0",
|
|
44
44
|
"@atlaskit/link-analytics": "^8.5.0",
|
|
45
45
|
"@atlaskit/link-client-extension": "^3.0.0",
|
|
46
46
|
"@atlaskit/link-extractors": "^1.9.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@atlaskit/select": "^18.6.0",
|
|
59
59
|
"@atlaskit/spinner": "^16.3.0",
|
|
60
60
|
"@atlaskit/textarea": "^5.6.0",
|
|
61
|
-
"@atlaskit/textfield": "^6.
|
|
61
|
+
"@atlaskit/textfield": "^6.6.0",
|
|
62
62
|
"@atlaskit/theme": "^14.0.0",
|
|
63
63
|
"@atlaskit/tokens": "^2.3.0",
|
|
64
64
|
"@atlaskit/tooltip": "^18.9.0",
|