@atlaskit/media-card 76.0.4 → 76.0.6
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/compass.yml +49 -0
- package/dist/cjs/card/card.js +5 -3
- package/dist/cjs/card/cardView.js +3 -2
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/ui/actionsBar/styles.js +1 -1
- package/dist/cjs/card/ui/tickBox/styles.js +2 -0
- package/dist/cjs/card/ui/titleBox/styles.js +2 -2
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/card/card.js +5 -3
- package/dist/es2019/card/cardView.js +3 -2
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/ui/actionsBar/styles.js +2 -2
- package/dist/es2019/card/ui/tickBox/styles.js +2 -0
- package/dist/es2019/card/ui/titleBox/styles.js +3 -3
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/card/card.js +5 -3
- package/dist/esm/card/cardView.js +3 -2
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/ui/actionsBar/styles.js +1 -1
- package/dist/esm/card/ui/tickBox/styles.js +2 -0
- package/dist/esm/card/ui/titleBox/styles.js +2 -2
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/card/cardView.d.ts +1 -0
- package/dist/types/types.d.ts +1 -0
- package/dist/types-ts4.5/card/cardView.d.ts +1 -0
- package/dist/types-ts4.5/types.d.ts +1 -0
- package/example-helpers/cardViewWrapper.tsx +9 -6
- package/example-helpers/styles.ts +16 -7
- package/package.json +9 -8
- package/report.api.md +2 -0
- package/tmp/api-report-tmp.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/media-card
|
|
2
2
|
|
|
3
|
+
## 76.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4807883cf8e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4807883cf8e) - [MEX-2468] Disable Tooltip in Media Card in Hybrid Renderer
|
|
8
|
+
|
|
9
|
+
## 76.0.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`48e4a655534`](https://bitbucket.org/atlassian/atlassian-frontend/commits/48e4a655534) - Internal change to enforce token usage for spacing properties. There is no expected visual or behaviour change.
|
|
14
|
+
|
|
3
15
|
## 76.0.4
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/compass.yml
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Media Card
|
|
2
|
+
id: 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/6d687ccf-d7c3-4faf-90a7-7397622c140f'
|
|
3
|
+
description: This package provides the capability to display a preview of a file that has been already uploaded. It leverages the returned id opon a successful file upload and does all the work required to show the preview. Additionaly it also takes care of displaying the upload status of the file.
|
|
4
|
+
configVersion: 1
|
|
5
|
+
typeId: UI_ELEMENT
|
|
6
|
+
ownerId: 'ari:cloud:teams::team/ef910622-ce0a-44a0-b441-ba89efe7891b'
|
|
7
|
+
fields:
|
|
8
|
+
lifecycle: Active
|
|
9
|
+
tier: 2
|
|
10
|
+
labels:
|
|
11
|
+
- atlassian-platform
|
|
12
|
+
customFields:
|
|
13
|
+
- name: Dev Owner
|
|
14
|
+
type: user
|
|
15
|
+
value: null
|
|
16
|
+
- name: Product
|
|
17
|
+
type: text
|
|
18
|
+
value: null
|
|
19
|
+
- name: Test
|
|
20
|
+
type: text
|
|
21
|
+
value: null
|
|
22
|
+
links:
|
|
23
|
+
- name: ''
|
|
24
|
+
type: REPOSITORY
|
|
25
|
+
url: 'https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/media/media-card/'
|
|
26
|
+
- name: ''
|
|
27
|
+
type: DOCUMENT
|
|
28
|
+
url: 'https://atlaskit.atlassian.com/packages/media/media-card'
|
|
29
|
+
- name: '' # Tome Capability
|
|
30
|
+
type: OTHER_LINK
|
|
31
|
+
url: 'https://tome.prod.atl-paas.net/capability/b7288340-829a-4e42-a694-6cd257dfe552'
|
|
32
|
+
- name: Media By Product
|
|
33
|
+
type: DASHBOARD
|
|
34
|
+
url: 'https://atlassian.signalfx.com/#/dashboard/E-vk3wqAwAA?groupId=E-vkzo1AwAA&configId=E-vk5fsAwAA&startTime=-7d&endTime=Now'
|
|
35
|
+
- name: ''
|
|
36
|
+
type: CHAT_CHANNEL
|
|
37
|
+
url: 'https://atlassian.slack.com/archives/C020CGJDJ3A'
|
|
38
|
+
- name: ''
|
|
39
|
+
type: ON_CALL
|
|
40
|
+
url: 'https://atlassian.app.opsgenie.com/settings/schedule/detail/b62291ff-4029-4f26-b7fc-d75d46d7aebc'
|
|
41
|
+
- name: ''
|
|
42
|
+
type: PROJECT
|
|
43
|
+
url: 'https://product-fabric.atlassian.net/jira/software/c/projects/MEX/boards/713'
|
|
44
|
+
relationships:
|
|
45
|
+
DEPENDS_ON:
|
|
46
|
+
- 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/652381b6-c323-4b50-bf31-c94941a0b6ef'
|
|
47
|
+
|
|
48
|
+
# Learn more about formatting compass.yml:
|
|
49
|
+
# https://go.atlassian.com/compass-yml-format
|
package/dist/cjs/card/card.js
CHANGED
|
@@ -49,7 +49,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
49
49
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
50
50
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
51
51
|
var packageName = "@atlaskit/media-card";
|
|
52
|
-
var packageVersion = "76.0.
|
|
52
|
+
var packageVersion = "76.0.6";
|
|
53
53
|
var CardBase = /*#__PURE__*/function (_Component) {
|
|
54
54
|
(0, _inherits2.default)(CardBase, _Component);
|
|
55
55
|
var _super = _createSuper(CardBase);
|
|
@@ -542,7 +542,8 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
542
542
|
titleBoxIcon = _this$props8.titleBoxIcon,
|
|
543
543
|
ssr = _this$props8.ssr,
|
|
544
544
|
useInlinePlayer = _this$props8.useInlinePlayer,
|
|
545
|
-
shouldOpenMediaViewer = _this$props8.shouldOpenMediaViewer
|
|
545
|
+
shouldOpenMediaViewer = _this$props8.shouldOpenMediaViewer,
|
|
546
|
+
shouldHideTooltip = _this$props8.shouldHideTooltip;
|
|
546
547
|
var mediaItemType = identifier.mediaItemType;
|
|
547
548
|
var _this$state2 = _this.state,
|
|
548
549
|
status = _this$state2.status,
|
|
@@ -593,7 +594,8 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
593
594
|
onImageLoad: withCallbacks ? _this.onImageLoad : undefined,
|
|
594
595
|
nativeLazyLoad: nativeLazyLoad,
|
|
595
596
|
forceSyncDisplay: forceSyncDisplay,
|
|
596
|
-
mediaCardCursor: mediaCardCursor
|
|
597
|
+
mediaCardCursor: mediaCardCursor,
|
|
598
|
+
shouldHideTooltip: shouldHideTooltip
|
|
597
599
|
});
|
|
598
600
|
return isLazyWithOverride ? /*#__PURE__*/_react.default.createElement(_viewportDetector.ViewportDetector, {
|
|
599
601
|
cardEl: cardRef,
|
|
@@ -403,14 +403,15 @@ var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
403
403
|
selectable = _this$props8.selectable,
|
|
404
404
|
disableOverlay = _this$props8.disableOverlay,
|
|
405
405
|
cardPreview = _this$props8.cardPreview,
|
|
406
|
-
mediaCardCursor = _this$props8.mediaCardCursor
|
|
406
|
+
mediaCardCursor = _this$props8.mediaCardCursor,
|
|
407
|
+
shouldHideTooltip = _this$props8.shouldHideTooltip;
|
|
407
408
|
var _ref8 = metadata || {},
|
|
408
409
|
name = _ref8.name;
|
|
409
410
|
var shouldDisplayBackground = !cardPreview || !disableOverlay || status === 'error' || status === 'failed-processing';
|
|
410
411
|
var isPlayButtonClickable = !!(this.shouldRenderPlayButton() && disableOverlay);
|
|
411
412
|
var isTickBoxSelectable = !disableOverlay && !!selectable && !selected;
|
|
412
413
|
// Disable tooltip for Media Single
|
|
413
|
-
var shouldDisplayTooltip = !disableOverlay;
|
|
414
|
+
var shouldDisplayTooltip = !disableOverlay && !shouldHideTooltip;
|
|
414
415
|
return (0, _react.jsx)(_wrapper.Wrapper, {
|
|
415
416
|
testId: testId || 'media-card-view',
|
|
416
417
|
dimensions: dimensions,
|
|
@@ -90,7 +90,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
90
90
|
}(_react.default.Component);
|
|
91
91
|
(0, _defineProperty2.default)(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
92
92
|
var packageName = "@atlaskit/media-card";
|
|
93
|
-
var packageVersion = "76.0.
|
|
93
|
+
var packageVersion = "76.0.6";
|
|
94
94
|
var MediaCardAnalyticsErrorBoundary = (0, _mediaCommon.withMediaAnalyticsContext)({
|
|
95
95
|
packageVersion: packageVersion,
|
|
96
96
|
packageName: packageName,
|
|
@@ -14,7 +14,7 @@ exports.actionsBarClassName = actionsBarClassName;
|
|
|
14
14
|
var fixedActionBarStyles = "opacity: 1;";
|
|
15
15
|
exports.fixedActionBarStyles = fixedActionBarStyles;
|
|
16
16
|
var wrapperStyles = function wrapperStyles(isFixed) {
|
|
17
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n position: absolute;\n top:
|
|
17
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n position: absolute;\n top: ", ";\n right: ", ";\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n"])), isFixed ? fixedActionBarStyles : 'opacity: 0;', (0, _styles.transition)(), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)");
|
|
18
18
|
};
|
|
19
19
|
exports.wrapperStyles = wrapperStyles;
|
|
20
20
|
wrapperStyles.displayName = 'ActionsBarWrapper';
|
|
@@ -17,6 +17,8 @@ exports.tickboxFixedStyles = tickboxFixedStyles;
|
|
|
17
17
|
var getSelectedStyles = function getSelectedStyles(selected) {
|
|
18
18
|
return selected ? "background-color: ".concat("var(--ds-icon-information, ".concat(_colors.B200, ")"), ";\n color: ", "var(--ds-icon-inverse, white)", ";") : "";
|
|
19
19
|
};
|
|
20
|
+
|
|
21
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
20
22
|
exports.getSelectedStyles = getSelectedStyles;
|
|
21
23
|
var wrapperStyles = function wrapperStyles(selected) {
|
|
22
24
|
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n font-size: 14px;\n width: 14px;\n height: 14px;\n position: absolute;\n top: 7px;\n left: 7px;\n border-radius: 20px;\n color: transparent;\n /* Enforce dimensions and position of \"tick\" icon */\n span {\n display: block;\n svg {\n height: 14px;\n }\n }\n ", "\n"])), (0, _styles.transition)(), getSelectedStyles(selected));
|
|
@@ -57,7 +57,7 @@ var titleBoxFooterStyles = function titleBoxFooterStyles(_ref3) {
|
|
|
57
57
|
};
|
|
58
58
|
exports.titleBoxFooterStyles = titleBoxFooterStyles;
|
|
59
59
|
titleBoxFooterStyles.displayName = 'TitleBoxFooter';
|
|
60
|
-
var titleBoxIconStyles = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n right:
|
|
60
|
+
var titleBoxIconStyles = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n right: ", ";\n bottom: 0px;\n"])), "var(--ds-space-050, 4px)");
|
|
61
61
|
exports.titleBoxIconStyles = titleBoxIconStyles;
|
|
62
|
-
var errorMessageWrapperStyles = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n span {\n vertical-align: middle;\n :nth-child(2) {\n margin-left:
|
|
62
|
+
var errorMessageWrapperStyles = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n span {\n vertical-align: middle;\n :nth-child(2) {\n margin-left: ", ";\n margin-right: ", ";\n }\n }\n"])), "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)");
|
|
63
63
|
exports.errorMessageWrapperStyles = errorMessageWrapperStyles;
|
|
@@ -119,7 +119,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
119
119
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
120
120
|
var analyticsContext = {
|
|
121
121
|
packageVersion: "@atlaskit/media-card",
|
|
122
|
-
packageName: "76.0.
|
|
122
|
+
packageName: "76.0.6",
|
|
123
123
|
componentName: 'mediaInlineCard',
|
|
124
124
|
component: 'mediaInlineCard'
|
|
125
125
|
};
|
|
@@ -14,7 +14,7 @@ var _mediaClient = require("@atlaskit/media-client");
|
|
|
14
14
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
15
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
16
|
var packageName = "@atlaskit/media-card";
|
|
17
|
-
var packageVersion = "76.0.
|
|
17
|
+
var packageVersion = "76.0.6";
|
|
18
18
|
var concurrentExperience;
|
|
19
19
|
var getExperience = function getExperience(id) {
|
|
20
20
|
if (!concurrentExperience) {
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/card/card.js
CHANGED
|
@@ -28,7 +28,7 @@ import { getMediaCardCursor } from '../utils/getMediaCardCursor';
|
|
|
28
28
|
import { completeUfoExperience, startUfoExperience } from '../utils/ufoExperiences';
|
|
29
29
|
import { generateUniqueId } from '../utils/generateUniqueId';
|
|
30
30
|
const packageName = "@atlaskit/media-card";
|
|
31
|
-
const packageVersion = "76.0.
|
|
31
|
+
const packageVersion = "76.0.6";
|
|
32
32
|
export class CardBase extends Component {
|
|
33
33
|
constructor(props) {
|
|
34
34
|
super(props);
|
|
@@ -497,7 +497,8 @@ export class CardBase extends Component {
|
|
|
497
497
|
titleBoxIcon,
|
|
498
498
|
ssr,
|
|
499
499
|
useInlinePlayer,
|
|
500
|
-
shouldOpenMediaViewer
|
|
500
|
+
shouldOpenMediaViewer,
|
|
501
|
+
shouldHideTooltip
|
|
501
502
|
} = this.props;
|
|
502
503
|
const {
|
|
503
504
|
mediaItemType
|
|
@@ -554,7 +555,8 @@ export class CardBase extends Component {
|
|
|
554
555
|
onImageLoad: withCallbacks ? this.onImageLoad : undefined,
|
|
555
556
|
nativeLazyLoad: nativeLazyLoad,
|
|
556
557
|
forceSyncDisplay: forceSyncDisplay,
|
|
557
|
-
mediaCardCursor: mediaCardCursor
|
|
558
|
+
mediaCardCursor: mediaCardCursor,
|
|
559
|
+
shouldHideTooltip: shouldHideTooltip
|
|
558
560
|
});
|
|
559
561
|
return isLazyWithOverride ? /*#__PURE__*/React.createElement(ViewportDetector, {
|
|
560
562
|
cardEl: cardRef,
|
|
@@ -387,7 +387,8 @@ export class CardViewBase extends React.Component {
|
|
|
387
387
|
selectable,
|
|
388
388
|
disableOverlay,
|
|
389
389
|
cardPreview,
|
|
390
|
-
mediaCardCursor
|
|
390
|
+
mediaCardCursor,
|
|
391
|
+
shouldHideTooltip
|
|
391
392
|
} = this.props;
|
|
392
393
|
const {
|
|
393
394
|
name
|
|
@@ -396,7 +397,7 @@ export class CardViewBase extends React.Component {
|
|
|
396
397
|
const isPlayButtonClickable = !!(this.shouldRenderPlayButton() && disableOverlay);
|
|
397
398
|
const isTickBoxSelectable = !disableOverlay && !!selectable && !selected;
|
|
398
399
|
// Disable tooltip for Media Single
|
|
399
|
-
const shouldDisplayTooltip = !disableOverlay;
|
|
400
|
+
const shouldDisplayTooltip = !disableOverlay && !shouldHideTooltip;
|
|
400
401
|
return jsx(Wrapper, {
|
|
401
402
|
testId: testId || 'media-card-view',
|
|
402
403
|
dimensions: dimensions,
|
|
@@ -66,7 +66,7 @@ class WrappedMediaCardAnalyticsErrorBoundary extends React.Component {
|
|
|
66
66
|
}
|
|
67
67
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
68
68
|
const packageName = "@atlaskit/media-card";
|
|
69
|
-
const packageVersion = "76.0.
|
|
69
|
+
const packageVersion = "76.0.6";
|
|
70
70
|
const MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
71
71
|
packageVersion,
|
|
72
72
|
packageName,
|
|
@@ -6,8 +6,8 @@ export const wrapperStyles = isFixed => css`
|
|
|
6
6
|
${isFixed ? fixedActionBarStyles : 'opacity: 0;'}
|
|
7
7
|
${transition()}
|
|
8
8
|
position: absolute;
|
|
9
|
-
top: 8px;
|
|
10
|
-
right: 8px;
|
|
9
|
+
top: ${"var(--ds-space-100, 8px)"};
|
|
10
|
+
right: ${"var(--ds-space-100, 8px)"};
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-flow: row nowrap;
|
|
13
13
|
align-items: center;
|
|
@@ -8,6 +8,8 @@ export const tickboxFixedStyles = `
|
|
|
8
8
|
`;
|
|
9
9
|
export const getSelectedStyles = selected => selected ? `background-color: ${`var(--ds-icon-information, ${B200})`};
|
|
10
10
|
color: ${"var(--ds-icon-inverse, white)"};` : ``;
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
11
13
|
export const wrapperStyles = selected => css`
|
|
12
14
|
${transition()}
|
|
13
15
|
font-size: 14px;
|
|
@@ -64,7 +64,7 @@ export const titleBoxFooterStyles = ({
|
|
|
64
64
|
titleBoxFooterStyles.displayName = 'TitleBoxFooter';
|
|
65
65
|
export const titleBoxIconStyles = css`
|
|
66
66
|
position: absolute;
|
|
67
|
-
right: 4px;
|
|
67
|
+
right: ${"var(--ds-space-050, 4px)"};
|
|
68
68
|
bottom: 0px;
|
|
69
69
|
`;
|
|
70
70
|
export const errorMessageWrapperStyles = css`
|
|
@@ -74,8 +74,8 @@ export const errorMessageWrapperStyles = css`
|
|
|
74
74
|
span {
|
|
75
75
|
vertical-align: middle;
|
|
76
76
|
:nth-child(2) {
|
|
77
|
-
margin-left: 4px;
|
|
78
|
-
margin-right: 4px;
|
|
77
|
+
margin-left: ${"var(--ds-space-050, 4px)"};
|
|
78
|
+
margin-right: ${"var(--ds-space-050, 4px)"};
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
`;
|
|
@@ -37,7 +37,7 @@ export default class MediaInlineCardLoader extends React.PureComponent {
|
|
|
37
37
|
} = this.state;
|
|
38
38
|
const analyticsContext = {
|
|
39
39
|
packageVersion: "@atlaskit/media-card",
|
|
40
|
-
packageName: "76.0.
|
|
40
|
+
packageName: "76.0.6",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -4,7 +4,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
4
4
|
import { MediaCardError } from '../errors';
|
|
5
5
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
6
6
|
const packageName = "@atlaskit/media-card";
|
|
7
|
-
const packageVersion = "76.0.
|
|
7
|
+
const packageVersion = "76.0.6";
|
|
8
8
|
let concurrentExperience;
|
|
9
9
|
const getExperience = id => {
|
|
10
10
|
if (!concurrentExperience) {
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/card/card.js
CHANGED
|
@@ -41,7 +41,7 @@ import { getMediaCardCursor } from '../utils/getMediaCardCursor';
|
|
|
41
41
|
import { completeUfoExperience, startUfoExperience } from '../utils/ufoExperiences';
|
|
42
42
|
import { generateUniqueId } from '../utils/generateUniqueId';
|
|
43
43
|
var packageName = "@atlaskit/media-card";
|
|
44
|
-
var packageVersion = "76.0.
|
|
44
|
+
var packageVersion = "76.0.6";
|
|
45
45
|
export var CardBase = /*#__PURE__*/function (_Component) {
|
|
46
46
|
_inherits(CardBase, _Component);
|
|
47
47
|
var _super = _createSuper(CardBase);
|
|
@@ -534,7 +534,8 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
534
534
|
titleBoxIcon = _this$props8.titleBoxIcon,
|
|
535
535
|
ssr = _this$props8.ssr,
|
|
536
536
|
useInlinePlayer = _this$props8.useInlinePlayer,
|
|
537
|
-
shouldOpenMediaViewer = _this$props8.shouldOpenMediaViewer
|
|
537
|
+
shouldOpenMediaViewer = _this$props8.shouldOpenMediaViewer,
|
|
538
|
+
shouldHideTooltip = _this$props8.shouldHideTooltip;
|
|
538
539
|
var mediaItemType = identifier.mediaItemType;
|
|
539
540
|
var _this$state2 = _this.state,
|
|
540
541
|
status = _this$state2.status,
|
|
@@ -585,7 +586,8 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
585
586
|
onImageLoad: withCallbacks ? _this.onImageLoad : undefined,
|
|
586
587
|
nativeLazyLoad: nativeLazyLoad,
|
|
587
588
|
forceSyncDisplay: forceSyncDisplay,
|
|
588
|
-
mediaCardCursor: mediaCardCursor
|
|
589
|
+
mediaCardCursor: mediaCardCursor,
|
|
590
|
+
shouldHideTooltip: shouldHideTooltip
|
|
589
591
|
});
|
|
590
592
|
return isLazyWithOverride ? /*#__PURE__*/React.createElement(ViewportDetector, {
|
|
591
593
|
cardEl: cardRef,
|
|
@@ -397,14 +397,15 @@ export var CardViewBase = /*#__PURE__*/function (_React$Component) {
|
|
|
397
397
|
selectable = _this$props8.selectable,
|
|
398
398
|
disableOverlay = _this$props8.disableOverlay,
|
|
399
399
|
cardPreview = _this$props8.cardPreview,
|
|
400
|
-
mediaCardCursor = _this$props8.mediaCardCursor
|
|
400
|
+
mediaCardCursor = _this$props8.mediaCardCursor,
|
|
401
|
+
shouldHideTooltip = _this$props8.shouldHideTooltip;
|
|
401
402
|
var _ref8 = metadata || {},
|
|
402
403
|
name = _ref8.name;
|
|
403
404
|
var shouldDisplayBackground = !cardPreview || !disableOverlay || status === 'error' || status === 'failed-processing';
|
|
404
405
|
var isPlayButtonClickable = !!(this.shouldRenderPlayButton() && disableOverlay);
|
|
405
406
|
var isTickBoxSelectable = !disableOverlay && !!selectable && !selected;
|
|
406
407
|
// Disable tooltip for Media Single
|
|
407
|
-
var shouldDisplayTooltip = !disableOverlay;
|
|
408
|
+
var shouldDisplayTooltip = !disableOverlay && !shouldHideTooltip;
|
|
408
409
|
return jsx(Wrapper, {
|
|
409
410
|
testId: testId || 'media-card-view',
|
|
410
411
|
dimensions: dimensions,
|
|
@@ -83,7 +83,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
83
83
|
}(React.Component);
|
|
84
84
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
85
85
|
var packageName = "@atlaskit/media-card";
|
|
86
|
-
var packageVersion = "76.0.
|
|
86
|
+
var packageVersion = "76.0.6";
|
|
87
87
|
var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
88
88
|
packageVersion: packageVersion,
|
|
89
89
|
packageName: packageName,
|
|
@@ -5,6 +5,6 @@ import { transition } from '../styles';
|
|
|
5
5
|
export var actionsBarClassName = 'media-card-actions-bar';
|
|
6
6
|
export var fixedActionBarStyles = "opacity: 1;";
|
|
7
7
|
export var wrapperStyles = function wrapperStyles(isFixed) {
|
|
8
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n position: absolute;\n top:
|
|
8
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n position: absolute;\n top: ", ";\n right: ", ";\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n"])), isFixed ? fixedActionBarStyles : 'opacity: 0;', transition(), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)");
|
|
9
9
|
};
|
|
10
10
|
wrapperStyles.displayName = 'ActionsBarWrapper';
|
|
@@ -8,6 +8,8 @@ export var tickboxFixedStyles = "\n background-color: ".concat("var(--ds-backgr
|
|
|
8
8
|
export var getSelectedStyles = function getSelectedStyles(selected) {
|
|
9
9
|
return selected ? "background-color: ".concat("var(--ds-icon-information, ".concat(B200, ")"), ";\n color: ", "var(--ds-icon-inverse, white)", ";") : "";
|
|
10
10
|
};
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
11
13
|
export var wrapperStyles = function wrapperStyles(selected) {
|
|
12
14
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n font-size: 14px;\n width: 14px;\n height: 14px;\n position: absolute;\n top: 7px;\n left: 7px;\n border-radius: 20px;\n color: transparent;\n /* Enforce dimensions and position of \"tick\" icon */\n span {\n display: block;\n svg {\n height: 14px;\n }\n }\n ", "\n"])), transition(), getSelectedStyles(selected));
|
|
13
15
|
};
|
|
@@ -47,5 +47,5 @@ export var titleBoxFooterStyles = function titleBoxFooterStyles(_ref3) {
|
|
|
47
47
|
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n text-overflow: ellipsis;\n ", "\n ", "\n"])), infoStyles, hasIconOverlap && iconOverlapStyles);
|
|
48
48
|
};
|
|
49
49
|
titleBoxFooterStyles.displayName = 'TitleBoxFooter';
|
|
50
|
-
export var titleBoxIconStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n right:
|
|
51
|
-
export var errorMessageWrapperStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n span {\n vertical-align: middle;\n :nth-child(2) {\n margin-left:
|
|
50
|
+
export var titleBoxIconStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n right: ", ";\n bottom: 0px;\n"])), "var(--ds-space-050, 4px)");
|
|
51
|
+
export var errorMessageWrapperStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n span {\n vertical-align: middle;\n :nth-child(2) {\n margin-left: ", ";\n margin-right: ", ";\n }\n }\n"])), "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)");
|
|
@@ -103,7 +103,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
103
103
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
104
104
|
var analyticsContext = {
|
|
105
105
|
packageVersion: "@atlaskit/media-card",
|
|
106
|
-
packageName: "76.0.
|
|
106
|
+
packageName: "76.0.6",
|
|
107
107
|
componentName: 'mediaInlineCard',
|
|
108
108
|
component: 'mediaInlineCard'
|
|
109
109
|
};
|
|
@@ -7,7 +7,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
7
7
|
import { MediaCardError } from '../errors';
|
|
8
8
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
9
9
|
var packageName = "@atlaskit/media-card";
|
|
10
|
-
var packageVersion = "76.0.
|
|
10
|
+
var packageVersion = "76.0.6";
|
|
11
11
|
var concurrentExperience;
|
|
12
12
|
var getExperience = function getExperience(id) {
|
|
13
13
|
if (!concurrentExperience) {
|
package/dist/esm/version.json
CHANGED
|
@@ -25,6 +25,7 @@ export interface CardViewOwnProps extends SharedCardProps {
|
|
|
25
25
|
readonly nativeLazyLoad?: boolean;
|
|
26
26
|
readonly forceSyncDisplay?: boolean;
|
|
27
27
|
disableAnimation?: boolean;
|
|
28
|
+
shouldHideTooltip?: boolean;
|
|
28
29
|
}
|
|
29
30
|
export interface CardViewState {
|
|
30
31
|
elementWidth?: number;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -85,6 +85,7 @@ export interface CardProps extends SharedCardProps, CardEventProps {
|
|
|
85
85
|
readonly contextId?: string;
|
|
86
86
|
readonly shouldEnableDownloadButton?: boolean;
|
|
87
87
|
readonly ssr?: SSR;
|
|
88
|
+
readonly shouldHideTooltip?: boolean;
|
|
88
89
|
}
|
|
89
90
|
export interface CardState {
|
|
90
91
|
status: CardStatus;
|
|
@@ -25,6 +25,7 @@ export interface CardViewOwnProps extends SharedCardProps {
|
|
|
25
25
|
readonly nativeLazyLoad?: boolean;
|
|
26
26
|
readonly forceSyncDisplay?: boolean;
|
|
27
27
|
disableAnimation?: boolean;
|
|
28
|
+
shouldHideTooltip?: boolean;
|
|
28
29
|
}
|
|
29
30
|
export interface CardViewState {
|
|
30
31
|
elementWidth?: number;
|
|
@@ -85,6 +85,7 @@ export interface CardProps extends SharedCardProps, CardEventProps {
|
|
|
85
85
|
readonly contextId?: string;
|
|
86
86
|
readonly shouldEnableDownloadButton?: boolean;
|
|
87
87
|
readonly ssr?: SSR;
|
|
88
|
+
readonly shouldHideTooltip?: boolean;
|
|
88
89
|
}
|
|
89
90
|
export interface CardState {
|
|
90
91
|
status: CardStatus;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**@jsx jsx */
|
|
2
2
|
import { css, jsx } from '@emotion/react';
|
|
3
|
+
import { token } from '@atlaskit/tokens';
|
|
3
4
|
|
|
4
5
|
type CardViewWrapperProps = {
|
|
5
6
|
wrapperDimensions: { width: string; height: string };
|
|
@@ -14,12 +15,14 @@ const displayInlineStyles = (displayInline?: boolean) => {
|
|
|
14
15
|
const cardWrapperStyles = ({
|
|
15
16
|
wrapperDimensions,
|
|
16
17
|
displayInline,
|
|
17
|
-
}: CardViewWrapperProps) =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
}: CardViewWrapperProps) =>
|
|
19
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
20
|
+
css`
|
|
21
|
+
${displayInlineStyles(displayInline)}
|
|
22
|
+
width: ${wrapperDimensions.width};
|
|
23
|
+
height: ${wrapperDimensions.height};
|
|
24
|
+
margin: 15px ${token('space.250', '20px')};
|
|
25
|
+
`;
|
|
23
26
|
|
|
24
27
|
export const CardViewWrapper = (props: CardViewWrapperProps) => {
|
|
25
28
|
return <div css={cardWrapperStyles(props)}>{props.children}</div>;
|
|
@@ -2,11 +2,12 @@ import { token } from '@atlaskit/tokens';
|
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
|
|
4
4
|
export const editableCardOptionsStyles = css`
|
|
5
|
-
padding: 20px;
|
|
5
|
+
padding: ${token('space.250', '20px')};
|
|
6
6
|
border-bottom: 1px solid ${token('color.border', '#ccc')};
|
|
7
7
|
max-width: 700px;
|
|
8
8
|
`;
|
|
9
9
|
|
|
10
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
10
11
|
export const sliderWrapperStyles = css`
|
|
11
12
|
display: flex;
|
|
12
13
|
width: 50%;
|
|
@@ -17,9 +18,10 @@ export const sliderWrapperStyles = css`
|
|
|
17
18
|
}
|
|
18
19
|
`;
|
|
19
20
|
|
|
21
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
20
22
|
export const editableCardContentStyles = css`
|
|
21
23
|
/* Not making the wrapper fancier or center elements in order to have a more realistic scenario */
|
|
22
|
-
padding: 20px;
|
|
24
|
+
padding: ${token('space.250', '20px')};
|
|
23
25
|
border: 2px dashed;
|
|
24
26
|
margin: 0 10px 50px 10px;
|
|
25
27
|
overflow: hidden;
|
|
@@ -30,6 +32,7 @@ export const editableCardContentStyles = css`
|
|
|
30
32
|
box-sizing: border-box;
|
|
31
33
|
`;
|
|
32
34
|
|
|
35
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
33
36
|
export const optionsWrapperStyles = css`
|
|
34
37
|
display: flex;
|
|
35
38
|
|
|
@@ -39,8 +42,9 @@ export const optionsWrapperStyles = css`
|
|
|
39
42
|
}
|
|
40
43
|
`;
|
|
41
44
|
|
|
45
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
42
46
|
export const cardDimensionsWrapperStyles = css`
|
|
43
|
-
margin: 10px 10px 20px 10px;
|
|
47
|
+
margin: 10px 10px ${token('space.250', '20px')} 10px;
|
|
44
48
|
display: flex;
|
|
45
49
|
|
|
46
50
|
> div {
|
|
@@ -58,6 +62,7 @@ export const cardPreviewWrapperStyles = css`
|
|
|
58
62
|
flex: 1;
|
|
59
63
|
`;
|
|
60
64
|
|
|
65
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
61
66
|
export const cardWrapperStyles = css`
|
|
62
67
|
border: 1px solid ${token('color.border.bold', 'black')};
|
|
63
68
|
padding: 10px;
|
|
@@ -69,11 +74,13 @@ export const cardWrapperStyles = css`
|
|
|
69
74
|
display: inline-block;
|
|
70
75
|
`;
|
|
71
76
|
|
|
77
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
72
78
|
export const cardFlowHeaderStyles = css`
|
|
73
|
-
margin: 20px auto;
|
|
79
|
+
margin: ${token('space.250', '20px')} auto;
|
|
74
80
|
padding: 10px 0;
|
|
75
81
|
`;
|
|
76
82
|
|
|
83
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
77
84
|
export const externalIdentifierWrapperStyles = css`
|
|
78
85
|
display: flex;
|
|
79
86
|
justify-content: space-around;
|
|
@@ -85,18 +92,19 @@ export const externalIdentifierWrapperStyles = css`
|
|
|
85
92
|
`;
|
|
86
93
|
|
|
87
94
|
export const unhandledErrorCardWrapperStyles = css`
|
|
88
|
-
padding: 20px;
|
|
95
|
+
padding: ${token('space.250', '20px')};
|
|
89
96
|
|
|
90
97
|
> div:first-child {
|
|
91
98
|
display: flex;
|
|
92
|
-
margin-bottom: 20px;
|
|
99
|
+
margin-bottom: ${token('space.250', '20px')};
|
|
93
100
|
}
|
|
94
101
|
|
|
95
102
|
label {
|
|
96
|
-
margin-right: 20px;
|
|
103
|
+
margin-right: ${token('space.250', '20px')};
|
|
97
104
|
}
|
|
98
105
|
`;
|
|
99
106
|
|
|
107
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
100
108
|
export const inlineCardVideoWrapperItemStyles = css`
|
|
101
109
|
padding: 10px;
|
|
102
110
|
border: 1px solid ${token('color.border.bold', 'black')};
|
|
@@ -116,6 +124,7 @@ export const mediaViewerExampleWrapperStyles = css`
|
|
|
116
124
|
display: flex;
|
|
117
125
|
`;
|
|
118
126
|
|
|
127
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
119
128
|
export const mediaInlineWrapperStyles = css`
|
|
120
129
|
display: flex;
|
|
121
130
|
align-items: center;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "76.0.
|
|
3
|
+
"version": "76.0.6",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
40
|
-
"@atlaskit/dropdown-menu": "^11.
|
|
40
|
+
"@atlaskit/dropdown-menu": "^11.10.0",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^2.4.0",
|
|
42
42
|
"@atlaskit/icon": "^21.12.0",
|
|
43
|
-
"@atlaskit/media-client": "^23.
|
|
43
|
+
"@atlaskit/media-client": "^23.1.0",
|
|
44
44
|
"@atlaskit/media-common": "^7.0.0",
|
|
45
|
-
"@atlaskit/media-ui": "^23.
|
|
45
|
+
"@atlaskit/media-ui": "^23.1.0",
|
|
46
46
|
"@atlaskit/media-viewer": "^48.0.0",
|
|
47
47
|
"@atlaskit/spinner": "^15.5.0",
|
|
48
48
|
"@atlaskit/theme": "^12.5.0",
|
|
49
|
-
"@atlaskit/tokens": "^1.
|
|
49
|
+
"@atlaskit/tokens": "^1.9.0",
|
|
50
50
|
"@atlaskit/tooltip": "^17.8.0",
|
|
51
51
|
"@atlaskit/ufo": "^0.2.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
@@ -64,12 +64,12 @@
|
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@atlaskit/analytics-listeners": "^8.7.0",
|
|
66
66
|
"@atlaskit/analytics-namespaced-context": "^6.7.0",
|
|
67
|
-
"@atlaskit/button": "^16.
|
|
67
|
+
"@atlaskit/button": "^16.8.0",
|
|
68
68
|
"@atlaskit/checkbox": "^12.6.0",
|
|
69
69
|
"@atlaskit/docs": "*",
|
|
70
70
|
"@atlaskit/inline-message": "^11.5.0",
|
|
71
71
|
"@atlaskit/media-core": "^34.1.0",
|
|
72
|
-
"@atlaskit/media-picker": "^66.
|
|
72
|
+
"@atlaskit/media-picker": "^66.1.0",
|
|
73
73
|
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
74
74
|
"@atlaskit/radio": "^5.6.0",
|
|
75
75
|
"@atlaskit/range": "^7.1.0",
|
|
@@ -98,7 +98,8 @@
|
|
|
98
98
|
"techstack": {
|
|
99
99
|
"@repo/internal": {
|
|
100
100
|
"design-tokens": [
|
|
101
|
-
"color"
|
|
101
|
+
"color",
|
|
102
|
+
"spacing"
|
|
102
103
|
]
|
|
103
104
|
}
|
|
104
105
|
},
|
package/report.api.md
CHANGED
|
@@ -152,6 +152,8 @@ export interface CardProps extends SharedCardProps, CardEventProps {
|
|
|
152
152
|
// (undocumented)
|
|
153
153
|
readonly shouldEnableDownloadButton?: boolean;
|
|
154
154
|
// (undocumented)
|
|
155
|
+
readonly shouldHideTooltip?: boolean;
|
|
156
|
+
// (undocumented)
|
|
155
157
|
readonly shouldOpenMediaViewer?: boolean;
|
|
156
158
|
// (undocumented)
|
|
157
159
|
readonly ssr?: SSR;
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -129,6 +129,8 @@ export interface CardProps extends SharedCardProps, CardEventProps {
|
|
|
129
129
|
// (undocumented)
|
|
130
130
|
readonly shouldEnableDownloadButton?: boolean;
|
|
131
131
|
// (undocumented)
|
|
132
|
+
readonly shouldHideTooltip?: boolean;
|
|
133
|
+
// (undocumented)
|
|
132
134
|
readonly shouldOpenMediaViewer?: boolean;
|
|
133
135
|
// (undocumented)
|
|
134
136
|
readonly ssr?: SSR;
|