@atlaskit/media-card 79.6.2 → 79.6.3
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 +8 -0
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/inlinePlayerWrapper-compiled.js +3 -3
- package/dist/cjs/card/inlinePlayerWrapper.js +1 -3
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/svgView/svgView.js +1 -2
- package/dist/cjs/card/ui/actionsBar/actionsBarWrapper.js +1 -3
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionButton.js +1 -4
- package/dist/cjs/card/ui/blanket/blanket.js +1 -3
- package/dist/cjs/card/ui/iconMessage/iconMessageWrapper-compiled.js +1 -0
- package/dist/cjs/card/ui/iconMessage/iconMessageWrapper.js +1 -3
- package/dist/cjs/card/ui/iconWrapper/iconWrapper.js +1 -3
- package/dist/cjs/card/ui/playButton/playButtonWrapper.js +1 -3
- package/dist/cjs/card/ui/progressBar/styledBar.js +1 -3
- package/dist/cjs/card/ui/tickBox/tickBoxWrapper.js +1 -3
- package/dist/cjs/card/ui/titleBox/failedTitleBox.compiled.css +3 -0
- package/dist/cjs/card/ui/titleBox/failedTitleBox.js +7 -1
- package/dist/cjs/card/ui/titleBox/titleBoxComponents-compiled.compiled.css +1 -4
- package/dist/cjs/card/ui/titleBox/titleBoxComponents-compiled.js +1 -1
- package/dist/cjs/card/ui/titleBox/titleBoxComponents.js +5 -7
- package/dist/cjs/card/ui/unhandledErrorCard/index.js +1 -3
- package/dist/cjs/card/ui/unhandledErrorCard/unhandledErrorCard-compiled.js +1 -0
- package/dist/cjs/card/ui/wrapper/imageContainer.js +1 -2
- package/dist/cjs/card/ui/wrapper/wrapper-compiled.js +3 -3
- package/dist/cjs/card/ui/wrapper/wrapper.js +1 -3
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/inlinePlayerWrapper-compiled.js +2 -2
- package/dist/es2019/card/inlinePlayerWrapper.js +1 -5
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/svgView/svgView.js +1 -2
- package/dist/es2019/card/ui/actionsBar/actionsBarWrapper.js +1 -3
- package/dist/es2019/card/ui/actionsBar/cardActions/cardActionButton.js +1 -5
- package/dist/es2019/card/ui/blanket/blanket.js +1 -3
- package/dist/es2019/card/ui/iconMessage/iconMessageWrapper-compiled.js +1 -0
- package/dist/es2019/card/ui/iconMessage/iconMessageWrapper.js +1 -3
- package/dist/es2019/card/ui/iconWrapper/iconWrapper.js +1 -3
- package/dist/es2019/card/ui/playButton/playButtonWrapper.js +1 -3
- package/dist/es2019/card/ui/progressBar/styledBar.js +1 -3
- package/dist/es2019/card/ui/tickBox/tickBoxWrapper.js +1 -3
- package/dist/es2019/card/ui/titleBox/failedTitleBox.compiled.css +3 -0
- package/dist/es2019/card/ui/titleBox/failedTitleBox.js +7 -1
- package/dist/es2019/card/ui/titleBox/titleBoxComponents-compiled.compiled.css +1 -4
- package/dist/es2019/card/ui/titleBox/titleBoxComponents-compiled.js +1 -1
- package/dist/es2019/card/ui/titleBox/titleBoxComponents.js +5 -7
- package/dist/es2019/card/ui/unhandledErrorCard/index.js +1 -3
- package/dist/es2019/card/ui/unhandledErrorCard/unhandledErrorCard-compiled.js +2 -0
- package/dist/es2019/card/ui/wrapper/imageContainer.js +1 -3
- package/dist/es2019/card/ui/wrapper/wrapper-compiled.js +2 -2
- package/dist/es2019/card/ui/wrapper/wrapper.js +1 -3
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/inlinePlayerWrapper-compiled.js +2 -2
- package/dist/esm/card/inlinePlayerWrapper.js +1 -3
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/svgView/svgView.js +1 -2
- package/dist/esm/card/ui/actionsBar/actionsBarWrapper.js +1 -3
- package/dist/esm/card/ui/actionsBar/cardActions/cardActionButton.js +1 -5
- package/dist/esm/card/ui/blanket/blanket.js +1 -3
- package/dist/esm/card/ui/iconMessage/iconMessageWrapper-compiled.js +1 -0
- package/dist/esm/card/ui/iconMessage/iconMessageWrapper.js +1 -3
- package/dist/esm/card/ui/iconWrapper/iconWrapper.js +1 -3
- package/dist/esm/card/ui/playButton/playButtonWrapper.js +1 -3
- package/dist/esm/card/ui/progressBar/styledBar.js +1 -3
- package/dist/esm/card/ui/tickBox/tickBoxWrapper.js +1 -3
- package/dist/esm/card/ui/titleBox/failedTitleBox.compiled.css +3 -0
- package/dist/esm/card/ui/titleBox/failedTitleBox.js +7 -1
- package/dist/esm/card/ui/titleBox/titleBoxComponents-compiled.compiled.css +1 -4
- package/dist/esm/card/ui/titleBox/titleBoxComponents-compiled.js +1 -1
- package/dist/esm/card/ui/titleBox/titleBoxComponents.js +5 -7
- package/dist/esm/card/ui/unhandledErrorCard/index.js +1 -3
- package/dist/esm/card/ui/unhandledErrorCard/unhandledErrorCard-compiled.js +1 -0
- package/dist/esm/card/ui/wrapper/imageContainer.js +1 -3
- package/dist/esm/card/ui/wrapper/wrapper-compiled.js +2 -2
- package/dist/esm/card/ui/wrapper/wrapper.js +1 -3
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/card/inlinePlayerWrapper-compiled.d.ts +2 -0
- package/dist/types/card/ui/wrapper/wrapper-compiled.d.ts +2 -0
- package/dist/types-ts4.5/card/inlinePlayerWrapper-compiled.d.ts +2 -0
- package/dist/types-ts4.5/card/ui/wrapper/wrapper-compiled.d.ts +2 -0
- package/package.json +1 -4
- package/dist/cjs/card/inlinePlayerWrapper-emotion.js +0 -47
- package/dist/cjs/card/svgView/svgImage-emotion.js +0 -101
- package/dist/cjs/card/ui/actionsBar/actionsBarWrapper-emotion.js +0 -33
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionButton-emotion.js +0 -35
- package/dist/cjs/card/ui/blanket/blanket-emotion.js +0 -25
- package/dist/cjs/card/ui/iconMessage/iconMessageWrapper-emotion.js +0 -51
- package/dist/cjs/card/ui/iconWrapper/iconWrapper-emotion.js +0 -27
- package/dist/cjs/card/ui/playButton/playButtonBackground-emotion.js +0 -21
- package/dist/cjs/card/ui/playButton/playButtonWrapper-emotion.js +0 -23
- package/dist/cjs/card/ui/progressBar/styledBar-emotion.js +0 -35
- package/dist/cjs/card/ui/tickBox/tickBoxWrapper-emotion.js +0 -67
- package/dist/cjs/card/ui/titleBox/titleBoxComponents-emotion.js +0 -72
- package/dist/cjs/card/ui/unhandledErrorCard/unhandledErrorCard-emotion.js +0 -106
- package/dist/cjs/card/ui/wrapper/imageContainer-emotion.js +0 -55
- package/dist/cjs/card/ui/wrapper/wrapper-emotion.js +0 -68
- package/dist/es2019/card/inlinePlayerWrapper-emotion.js +0 -41
- package/dist/es2019/card/svgView/svgImage-emotion.js +0 -90
- package/dist/es2019/card/ui/actionsBar/actionsBarWrapper-emotion.js +0 -26
- package/dist/es2019/card/ui/actionsBar/cardActions/cardActionButton-emotion.js +0 -28
- package/dist/es2019/card/ui/blanket/blanket-emotion.js +0 -20
- package/dist/es2019/card/ui/iconMessage/iconMessageWrapper-emotion.js +0 -46
- package/dist/es2019/card/ui/iconWrapper/iconWrapper-emotion.js +0 -22
- package/dist/es2019/card/ui/playButton/playButtonBackground-emotion.js +0 -14
- package/dist/es2019/card/ui/playButton/playButtonWrapper-emotion.js +0 -16
- package/dist/es2019/card/ui/progressBar/styledBar-emotion.js +0 -30
- package/dist/es2019/card/ui/tickBox/tickBoxWrapper-emotion.js +0 -57
- package/dist/es2019/card/ui/titleBox/titleBoxComponents-emotion.js +0 -71
- package/dist/es2019/card/ui/unhandledErrorCard/unhandledErrorCard-emotion.js +0 -85
- package/dist/es2019/card/ui/wrapper/imageContainer-emotion.js +0 -47
- package/dist/es2019/card/ui/wrapper/wrapper-emotion.js +0 -62
- package/dist/esm/card/inlinePlayerWrapper-emotion.js +0 -39
- package/dist/esm/card/svgView/svgImage-emotion.js +0 -94
- package/dist/esm/card/ui/actionsBar/actionsBarWrapper-emotion.js +0 -26
- package/dist/esm/card/ui/actionsBar/cardActions/cardActionButton-emotion.js +0 -30
- package/dist/esm/card/ui/blanket/blanket-emotion.js +0 -18
- package/dist/esm/card/ui/iconMessage/iconMessageWrapper-emotion.js +0 -44
- package/dist/esm/card/ui/iconWrapper/iconWrapper-emotion.js +0 -20
- package/dist/esm/card/ui/playButton/playButtonBackground-emotion.js +0 -14
- package/dist/esm/card/ui/playButton/playButtonWrapper-emotion.js +0 -16
- package/dist/esm/card/ui/progressBar/styledBar-emotion.js +0 -28
- package/dist/esm/card/ui/tickBox/tickBoxWrapper-emotion.js +0 -60
- package/dist/esm/card/ui/titleBox/titleBoxComponents-emotion.js +0 -65
- package/dist/esm/card/ui/unhandledErrorCard/unhandledErrorCard-emotion.js +0 -101
- package/dist/esm/card/ui/wrapper/imageContainer-emotion.js +0 -48
- package/dist/esm/card/ui/wrapper/wrapper-emotion.js +0 -60
- package/dist/types/card/inlinePlayerWrapper-emotion.d.ts +0 -7
- package/dist/types/card/svgView/svgImage-emotion.d.ts +0 -7
- package/dist/types/card/ui/actionsBar/actionsBarWrapper-emotion.d.ts +0 -7
- package/dist/types/card/ui/actionsBar/cardActions/cardActionButton-emotion.d.ts +0 -2
- package/dist/types/card/ui/blanket/blanket-emotion.d.ts +0 -9
- package/dist/types/card/ui/iconMessage/iconMessageWrapper-emotion.d.ts +0 -7
- package/dist/types/card/ui/iconWrapper/iconWrapper-emotion.d.ts +0 -7
- package/dist/types/card/ui/playButton/playButtonBackground-emotion.d.ts +0 -6
- package/dist/types/card/ui/playButton/playButtonWrapper-emotion.d.ts +0 -6
- package/dist/types/card/ui/progressBar/styledBar-emotion.d.ts +0 -7
- package/dist/types/card/ui/tickBox/tickBoxWrapper-emotion.d.ts +0 -7
- package/dist/types/card/ui/titleBox/titleBoxComponents-emotion.d.ts +0 -11
- package/dist/types/card/ui/unhandledErrorCard/unhandledErrorCard-emotion.d.ts +0 -10
- package/dist/types/card/ui/wrapper/imageContainer-emotion.d.ts +0 -17
- package/dist/types/card/ui/wrapper/wrapper-emotion.d.ts +0 -7
- package/dist/types-ts4.5/card/inlinePlayerWrapper-emotion.d.ts +0 -7
- package/dist/types-ts4.5/card/svgView/svgImage-emotion.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/actionsBar/actionsBarWrapper-emotion.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/actionsBar/cardActions/cardActionButton-emotion.d.ts +0 -2
- package/dist/types-ts4.5/card/ui/blanket/blanket-emotion.d.ts +0 -9
- package/dist/types-ts4.5/card/ui/iconMessage/iconMessageWrapper-emotion.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/iconWrapper/iconWrapper-emotion.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/playButton/playButtonBackground-emotion.d.ts +0 -6
- package/dist/types-ts4.5/card/ui/playButton/playButtonWrapper-emotion.d.ts +0 -6
- package/dist/types-ts4.5/card/ui/progressBar/styledBar-emotion.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/tickBox/tickBoxWrapper-emotion.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/titleBox/titleBoxComponents-emotion.d.ts +0 -11
- package/dist/types-ts4.5/card/ui/unhandledErrorCard/unhandledErrorCard-emotion.d.ts +0 -10
- package/dist/types-ts4.5/card/ui/wrapper/imageContainer-emotion.d.ts +0 -17
- package/dist/types-ts4.5/card/ui/wrapper/wrapper-emotion.d.ts +0 -7
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
/**
|
|
6
|
-
* @jsxRuntime classic
|
|
7
|
-
* @jsx jsx
|
|
8
|
-
*/
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
-
import { jsx, css } from '@emotion/react';
|
|
11
|
-
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
12
|
-
import { MediaCardError } from '../../errors';
|
|
13
|
-
import { calculateSvgDimensions } from './helpers';
|
|
14
|
-
import { useResolveSvg, MediaSVGError } from '@atlaskit/media-svg';
|
|
15
|
-
var getErrorReason = function getErrorReason(svgReason) {
|
|
16
|
-
switch (svgReason) {
|
|
17
|
-
case 'img-error':
|
|
18
|
-
return 'svg-img-error';
|
|
19
|
-
case 'binary-fetch':
|
|
20
|
-
return 'svg-binary-fetch';
|
|
21
|
-
case 'blob-to-datauri':
|
|
22
|
-
return 'svg-blob-to-datauri';
|
|
23
|
-
default:
|
|
24
|
-
return 'svg-unknown-error';
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
var svgRendererStyles = css({
|
|
28
|
-
objectFit: 'contain',
|
|
29
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
30
|
-
backgroundColor: 'white' // This background color is for transparency
|
|
31
|
-
});
|
|
32
|
-
var svgRendererMaxDimensionStyles = css({
|
|
33
|
-
maxWidth: '100%',
|
|
34
|
-
maxHeight: '100%'
|
|
35
|
-
});
|
|
36
|
-
export var SvgView = function SvgView(_ref) {
|
|
37
|
-
var identifier = _ref.identifier,
|
|
38
|
-
resizeMode = _ref.resizeMode,
|
|
39
|
-
onLoad = _ref.onLoad,
|
|
40
|
-
onError = _ref.onError,
|
|
41
|
-
wrapperRef = _ref.wrapperRef,
|
|
42
|
-
alt = _ref.alt;
|
|
43
|
-
var _useState = useState(false),
|
|
44
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
45
|
-
didSvgRender = _useState2[0],
|
|
46
|
-
setDidSvgRender = _useState2[1];
|
|
47
|
-
var _useState3 = useState({}),
|
|
48
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
49
|
-
svgDimensions = _useState4[0],
|
|
50
|
-
setSvgDimensions = _useState4[1];
|
|
51
|
-
var imgRef = useRef(null);
|
|
52
|
-
var calculateDimensions = useCallback(function (targetImgElem) {
|
|
53
|
-
if (!wrapperRef.current || !targetImgElem) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
setSvgDimensions(calculateSvgDimensions(targetImgElem, wrapperRef.current, resizeMode));
|
|
57
|
-
}, [resizeMode, wrapperRef]);
|
|
58
|
-
var onSvgLoad = function onSvgLoad(evt) {
|
|
59
|
-
calculateDimensions(evt.currentTarget);
|
|
60
|
-
setDidSvgRender(true);
|
|
61
|
-
onLoad === null || onLoad === void 0 || onLoad();
|
|
62
|
-
};
|
|
63
|
-
var onSvgError = function onSvgError(err) {
|
|
64
|
-
var error = new MediaCardError(getErrorReason(err.primaryReason), err.secondaryError);
|
|
65
|
-
onError === null || onError === void 0 || onError(error);
|
|
66
|
-
};
|
|
67
|
-
useEffect(function () {
|
|
68
|
-
if (imgRef.current) {
|
|
69
|
-
calculateDimensions(imgRef.current);
|
|
70
|
-
}
|
|
71
|
-
}, [imgRef, calculateDimensions]);
|
|
72
|
-
var _useResolveSvg = useResolveSvg(identifier, onSvgError),
|
|
73
|
-
svgUrl = _useResolveSvg.svgUrl,
|
|
74
|
-
source = _useResolveSvg.source;
|
|
75
|
-
var width = svgDimensions.width,
|
|
76
|
-
height = svgDimensions.height;
|
|
77
|
-
return svgUrl && source ? jsx("img", {
|
|
78
|
-
"data-testid": 'media-card-svg',
|
|
79
|
-
"data-fileid": identifier.id,
|
|
80
|
-
"data-filecollection": identifier.collectionName,
|
|
81
|
-
"data-source": source,
|
|
82
|
-
src: svgUrl,
|
|
83
|
-
alt: alt,
|
|
84
|
-
css: [svgRendererStyles, !width && !height && svgRendererMaxDimensionStyles],
|
|
85
|
-
style: _objectSpread({
|
|
86
|
-
visibility: didSvgRender ? 'visible' : 'hidden'
|
|
87
|
-
}, svgDimensions),
|
|
88
|
-
onLoad: onSvgLoad,
|
|
89
|
-
onError: function onError() {
|
|
90
|
-
onSvgError(new MediaSVGError('img-error'));
|
|
91
|
-
},
|
|
92
|
-
ref: imgRef
|
|
93
|
-
}) : null;
|
|
94
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { wrapperStyles, actionsBarClassName } from './styles';
|
|
8
|
-
export var ActionsBarWrapper = function ActionsBarWrapper(props) {
|
|
9
|
-
return (
|
|
10
|
-
// eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
|
|
11
|
-
jsx("div", {
|
|
12
|
-
id: "actionsBarWrapper",
|
|
13
|
-
"data-testId": "actionsBarWrapper"
|
|
14
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
15
|
-
,
|
|
16
|
-
css: wrapperStyles(props.isFixed)
|
|
17
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
18
|
-
,
|
|
19
|
-
className: actionsBarClassName,
|
|
20
|
-
onClick: function onClick(event) {
|
|
21
|
-
event.stopPropagation();
|
|
22
|
-
event.preventDefault();
|
|
23
|
-
}
|
|
24
|
-
}, props.children)
|
|
25
|
-
);
|
|
26
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
/**
|
|
6
|
-
* @jsxRuntime classic
|
|
7
|
-
* @jsx jsx
|
|
8
|
-
*/
|
|
9
|
-
import { forwardRef } from 'react';
|
|
10
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
|
-
import { jsx } from '@emotion/react';
|
|
12
|
-
import { cardActionButtonStyles } from './styles';
|
|
13
|
-
export var CardActionButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
14
|
-
return jsx("button", _extends({}, props, {
|
|
15
|
-
id: "cardActionButton",
|
|
16
|
-
"data-testid": "media-card-primary-action",
|
|
17
|
-
"aria-label": props.label
|
|
18
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
19
|
-
,
|
|
20
|
-
css: cardActionButtonStyles(props)
|
|
21
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
22
|
-
,
|
|
23
|
-
style: _objectSpread(_objectSpread({}, props.style), {}, {
|
|
24
|
-
cursor: props.disabled ? 'not-allowed' : 'default'
|
|
25
|
-
}),
|
|
26
|
-
onClick: props.onClick,
|
|
27
|
-
onMouseDown: props.onMouseDown,
|
|
28
|
-
ref: ref
|
|
29
|
-
}), props.children);
|
|
30
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { blanketStyles, blanketClassName } from './styles';
|
|
8
|
-
export var Blanket = function Blanket(props) {
|
|
9
|
-
var isFixed = props.isFixed;
|
|
10
|
-
return jsx("div", {
|
|
11
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
12
|
-
css: blanketStyles(isFixed)
|
|
13
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
14
|
-
,
|
|
15
|
-
className: blanketClassName,
|
|
16
|
-
"data-testid": "media-card-blanket"
|
|
17
|
-
});
|
|
18
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { css, jsx } from '@emotion/react';
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { keyframes } from '@emotion/react';
|
|
9
|
-
var breatheAnimation = keyframes({
|
|
10
|
-
'0%': {
|
|
11
|
-
opacity: 1
|
|
12
|
-
},
|
|
13
|
-
'50%': {
|
|
14
|
-
opacity: 0.3
|
|
15
|
-
},
|
|
16
|
-
'100%': {
|
|
17
|
-
opacity: 1
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
var animatedStyles = css({
|
|
21
|
-
animationName: breatheAnimation,
|
|
22
|
-
animationDuration: '3.5s',
|
|
23
|
-
animationTimingFunction: 'ease-in-out',
|
|
24
|
-
animationIterationCount: 'infinite'
|
|
25
|
-
});
|
|
26
|
-
var baseStyles = css({
|
|
27
|
-
overflow: 'hidden',
|
|
28
|
-
opacity: 1,
|
|
29
|
-
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
30
|
-
color: "var(--ds-text-subtlest, #7A869A)",
|
|
31
|
-
textAlign: 'center',
|
|
32
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
33
|
-
marginBottom: '-1em',
|
|
34
|
-
// Needs pixel precision to align the icon at the center of the box
|
|
35
|
-
paddingBlock: "var(--ds-space-050, 4px)",
|
|
36
|
-
paddingInline: "var(--ds-space-100, 8px)"
|
|
37
|
-
});
|
|
38
|
-
export var IconMessageWrapper = function IconMessageWrapper(props) {
|
|
39
|
-
var animated = props.animated;
|
|
40
|
-
return jsx("div", {
|
|
41
|
-
id: "iconMessageWrapper",
|
|
42
|
-
css: [baseStyles, animated && animatedStyles]
|
|
43
|
-
}, props.children);
|
|
44
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { iconWrapperStyles } from './styles';
|
|
8
|
-
export var IconWrapper = function IconWrapper(props) {
|
|
9
|
-
var breakpoint = props.breakpoint,
|
|
10
|
-
hasTitleBox = props.hasTitleBox;
|
|
11
|
-
return jsx("div", {
|
|
12
|
-
id: "iconWrapper"
|
|
13
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
14
|
-
,
|
|
15
|
-
css: iconWrapperStyles({
|
|
16
|
-
breakpoint: breakpoint,
|
|
17
|
-
hasTitleBox: hasTitleBox
|
|
18
|
-
})
|
|
19
|
-
}, props.children);
|
|
20
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { backgroundStyles, bkgClassName } from './styles';
|
|
8
|
-
export var PlayButtonBackground = function PlayButtonBackground() {
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
10
|
-
return jsx("div", {
|
|
11
|
-
css: backgroundStyles,
|
|
12
|
-
className: bkgClassName
|
|
13
|
-
});
|
|
14
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { playButtonClassName, playButtonWrapperStyles } from './styles';
|
|
8
|
-
export var PlayButtonWrapper = function PlayButtonWrapper(props) {
|
|
9
|
-
return (
|
|
10
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
11
|
-
jsx("div", {
|
|
12
|
-
css: playButtonWrapperStyles,
|
|
13
|
-
className: playButtonClassName
|
|
14
|
-
}, props.children)
|
|
15
|
-
);
|
|
16
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { styledBarStyles } from './styles';
|
|
8
|
-
export var StyledBar = function StyledBar(props) {
|
|
9
|
-
var progress = props.progress,
|
|
10
|
-
breakpoint = props.breakpoint,
|
|
11
|
-
positionBottom = props.positionBottom,
|
|
12
|
-
showOnTop = props.showOnTop,
|
|
13
|
-
ariaLabel = props.ariaLabel;
|
|
14
|
-
return jsx("div", {
|
|
15
|
-
id: "styledBar",
|
|
16
|
-
role: "progressbar",
|
|
17
|
-
"aria-valuenow": progress,
|
|
18
|
-
"aria-label": ariaLabel
|
|
19
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
20
|
-
,
|
|
21
|
-
css: styledBarStyles({
|
|
22
|
-
progress: progress,
|
|
23
|
-
breakpoint: breakpoint,
|
|
24
|
-
positionBottom: positionBottom,
|
|
25
|
-
showOnTop: showOnTop
|
|
26
|
-
})
|
|
27
|
-
});
|
|
28
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import { tickBoxClassName } from './styles';
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
-
import { css } from '@emotion/react';
|
|
11
|
-
import { transition } from '../styles';
|
|
12
|
-
import { B200 } from '@atlaskit/theme/colors';
|
|
13
|
-
var getSelectedStyles = function getSelectedStyles(selected) {
|
|
14
|
-
return selected ? "background-color: ".concat("var(--ds-icon-information, ".concat(B200, ")"), ";\n color: ", "var(--ds-icon-inverse, white)", ";") : "";
|
|
15
|
-
};
|
|
16
|
-
var oldWrapperStyes = css({
|
|
17
|
-
width: '14px',
|
|
18
|
-
height: '14px',
|
|
19
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
20
|
-
span: {
|
|
21
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
22
|
-
svg: {
|
|
23
|
-
height: '14px'
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
var wrapperStyles = function wrapperStyles(selected) {
|
|
28
|
-
return css(
|
|
29
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
30
|
-
transition && transition(), {
|
|
31
|
-
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
32
|
-
width: "var(--ds-space-200, 16px)",
|
|
33
|
-
height: "var(--ds-space-200, 16px)",
|
|
34
|
-
position: 'absolute',
|
|
35
|
-
top: "var(--ds-space-075, 7px)",
|
|
36
|
-
left: "var(--ds-space-075, 7px)",
|
|
37
|
-
borderRadius: "var(--ds-space-250, 20px)",
|
|
38
|
-
color: 'transparent',
|
|
39
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
40
|
-
span: {
|
|
41
|
-
display: 'block'
|
|
42
|
-
},
|
|
43
|
-
display: 'grid',
|
|
44
|
-
placeItems: 'center'
|
|
45
|
-
},
|
|
46
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
47
|
-
getSelectedStyles(selected));
|
|
48
|
-
};
|
|
49
|
-
wrapperStyles.displayName = 'TickBoxWrapper';
|
|
50
|
-
export var TickBoxWrapper = function TickBoxWrapper(props) {
|
|
51
|
-
return jsx("div", {
|
|
52
|
-
id: "tickBoxWrapper",
|
|
53
|
-
css: [
|
|
54
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
55
|
-
wrapperStyles(props.selected), !fg('platform-visual-refresh-icons') && oldWrapperStyes]
|
|
56
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
57
|
-
,
|
|
58
|
-
className: tickBoxClassName
|
|
59
|
-
}, props.children);
|
|
60
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import { errorMessageWrapperStyles, newTitleBoxIconStyles, titleBoxFooterStyles, titleBoxHeaderStyles, titleBoxIconStyles, titleBoxWrapperStyles } from './styles';
|
|
9
|
-
export var TitleBoxWrapper = function TitleBoxWrapper(props) {
|
|
10
|
-
var breakpoint = props.breakpoint,
|
|
11
|
-
titleBoxBgColor = props.titleBoxBgColor,
|
|
12
|
-
hidden = props.hidden;
|
|
13
|
-
return jsx("div", {
|
|
14
|
-
id: "titleBoxWrapper",
|
|
15
|
-
"data-testid": "media-title-box"
|
|
16
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
17
|
-
,
|
|
18
|
-
css: titleBoxWrapperStyles({
|
|
19
|
-
breakpoint: breakpoint,
|
|
20
|
-
display: hidden ? 'none' : 'flex',
|
|
21
|
-
titleBoxBgColor: titleBoxBgColor
|
|
22
|
-
})
|
|
23
|
-
}, props.children);
|
|
24
|
-
};
|
|
25
|
-
export var TitleBoxHeader = function TitleBoxHeader(props) {
|
|
26
|
-
var hasIconOverlap = props.hasIconOverlap;
|
|
27
|
-
return jsx("div", {
|
|
28
|
-
id: "titleBoxHeader",
|
|
29
|
-
"data-testid": "title-box-header"
|
|
30
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
31
|
-
,
|
|
32
|
-
css: titleBoxHeaderStyles({
|
|
33
|
-
hasIconOverlap: hasIconOverlap
|
|
34
|
-
})
|
|
35
|
-
}, props.children);
|
|
36
|
-
};
|
|
37
|
-
export var TitleBoxFooter = function TitleBoxFooter(props) {
|
|
38
|
-
var hasIconOverlap = props.hasIconOverlap;
|
|
39
|
-
return jsx("div", {
|
|
40
|
-
id: "titleBoxFooter",
|
|
41
|
-
"data-testid": "title-box-footer"
|
|
42
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
43
|
-
,
|
|
44
|
-
css: titleBoxFooterStyles({
|
|
45
|
-
hasIconOverlap: hasIconOverlap
|
|
46
|
-
})
|
|
47
|
-
}, props.children);
|
|
48
|
-
};
|
|
49
|
-
export var TitleBoxIcon = function TitleBoxIcon(props) {
|
|
50
|
-
return jsx("div", {
|
|
51
|
-
id: "titleBoxIcon",
|
|
52
|
-
"data-testid": "title-box-icon",
|
|
53
|
-
css: fg('platform-visual-refresh-icons') ?
|
|
54
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
55
|
-
newTitleBoxIconStyles :
|
|
56
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
57
|
-
titleBoxIconStyles
|
|
58
|
-
}, props.children);
|
|
59
|
-
};
|
|
60
|
-
export var ErrorMessageWrapper = function ErrorMessageWrapper(props) {
|
|
61
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
62
|
-
return jsx("div", {
|
|
63
|
-
css: errorMessageWrapperStyles
|
|
64
|
-
}, props.children);
|
|
65
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
|
-
/**
|
|
9
|
-
* @jsxRuntime classic
|
|
10
|
-
* @jsx jsx
|
|
11
|
-
*/
|
|
12
|
-
import { Component } from 'react';
|
|
13
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
|
-
import { css, jsx } from '@emotion/react';
|
|
15
|
-
import WarningIcon from '@atlaskit/icon/core/migration/status-warning--editor-warning';
|
|
16
|
-
import { N20, N800, Y500 } from '@atlaskit/theme/colors';
|
|
17
|
-
import { center, borderRadius } from '@atlaskit/media-ui';
|
|
18
|
-
import { defaultImageCardDimensions } from '../../../utils';
|
|
19
|
-
import { ContentLoadingErrorMessage } from './contentLoadingErrorMessage';
|
|
20
|
-
var isPercentage = function isPercentage(value) {
|
|
21
|
-
return /^\d+(\.\d+)?%$/.test(value);
|
|
22
|
-
};
|
|
23
|
-
var shouldShowText = function shouldShowText(_ref) {
|
|
24
|
-
var width = _ref.width,
|
|
25
|
-
height = _ref.height;
|
|
26
|
-
if (isPercentage(width) || isPercentage(height)) {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
return parseInt(width, 10) >= 240 && parseInt(height, 10) >= 90;
|
|
30
|
-
};
|
|
31
|
-
var normalizeDimension = function normalizeDimension(value, defaultValue) {
|
|
32
|
-
var sValue = value.toString();
|
|
33
|
-
return isPercentage(sValue) ? sValue : isNaN(parseInt(sValue, 10)) ? defaultValue + 'px' : parseInt(sValue, 10) + 'px';
|
|
34
|
-
};
|
|
35
|
-
var getConvertedDimension = function getConvertedDimension(dimensions) {
|
|
36
|
-
var _dimensions$width = dimensions.width,
|
|
37
|
-
width = _dimensions$width === void 0 ? defaultImageCardDimensions.width : _dimensions$width,
|
|
38
|
-
_dimensions$height = dimensions.height,
|
|
39
|
-
height = _dimensions$height === void 0 ? defaultImageCardDimensions.height : _dimensions$height;
|
|
40
|
-
return {
|
|
41
|
-
width: normalizeDimension(width, defaultImageCardDimensions.width),
|
|
42
|
-
height: normalizeDimension(height, defaultImageCardDimensions.height)
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
var wrapperStyles = function wrapperStyles() {
|
|
46
|
-
var dimensions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultImageCardDimensions;
|
|
47
|
-
try {
|
|
48
|
-
return css(
|
|
49
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
50
|
-
center,
|
|
51
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
52
|
-
borderRadius, {
|
|
53
|
-
background: "var(--ds-background-neutral, ".concat(N20, ")"),
|
|
54
|
-
color: "var(--ds-text-subtle, ".concat(N800, ")"),
|
|
55
|
-
maxHeight: '100%',
|
|
56
|
-
maxWidth: '100%'
|
|
57
|
-
},
|
|
58
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
59
|
-
getConvertedDimension(dimensions), {
|
|
60
|
-
display: 'flex',
|
|
61
|
-
flexDirection: 'column',
|
|
62
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
63
|
-
p: {
|
|
64
|
-
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
65
|
-
textAlign: 'center'
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
} catch (e) {
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
export var UnhandledErrorCard = /*#__PURE__*/function (_Component) {
|
|
73
|
-
function UnhandledErrorCard() {
|
|
74
|
-
_classCallCheck(this, UnhandledErrorCard);
|
|
75
|
-
return _callSuper(this, UnhandledErrorCard, arguments);
|
|
76
|
-
}
|
|
77
|
-
_inherits(UnhandledErrorCard, _Component);
|
|
78
|
-
return _createClass(UnhandledErrorCard, [{
|
|
79
|
-
key: "render",
|
|
80
|
-
value: function render() {
|
|
81
|
-
var _this$props = this.props,
|
|
82
|
-
dimensions = _this$props.dimensions,
|
|
83
|
-
onClick = _this$props.onClick;
|
|
84
|
-
var isErrorHidden = !shouldShowText(getConvertedDimension(dimensions !== null && dimensions !== void 0 ? dimensions : defaultImageCardDimensions));
|
|
85
|
-
return (
|
|
86
|
-
// eslint-disable-next-line @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlaskit/design-system/consistent-css-prop-usage, @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/no-static-element-interactions -- Ignored via go/DSP-18766
|
|
87
|
-
jsx("div", {
|
|
88
|
-
css: wrapperStyles(dimensions),
|
|
89
|
-
onClick: onClick
|
|
90
|
-
}, jsx(WarningIcon, {
|
|
91
|
-
label: "Error",
|
|
92
|
-
color: "var(--ds-icon-warning, ".concat(Y500, ")"),
|
|
93
|
-
LEGACY_size: "medium",
|
|
94
|
-
spacing: "spacious"
|
|
95
|
-
}), jsx(ContentLoadingErrorMessage, {
|
|
96
|
-
isHidden: isErrorHidden
|
|
97
|
-
}))
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
}]);
|
|
101
|
-
}(Component);
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx, css } from '@emotion/react';
|
|
7
|
-
import { fileCardImageViewSelector } from '../../classnames';
|
|
8
|
-
var imageContainerStyles = css({
|
|
9
|
-
display: 'flex',
|
|
10
|
-
position: 'relative',
|
|
11
|
-
maxWidth: '100%',
|
|
12
|
-
width: '100%',
|
|
13
|
-
height: '100%',
|
|
14
|
-
maxHeight: '100%',
|
|
15
|
-
overflow: 'hidden',
|
|
16
|
-
borderRadius: "var(--ds-radius-small, 3px)"
|
|
17
|
-
});
|
|
18
|
-
var imageContainerCenterStyles = css({
|
|
19
|
-
flexDirection: 'column',
|
|
20
|
-
justifyContent: 'center',
|
|
21
|
-
alignItems: 'center'
|
|
22
|
-
});
|
|
23
|
-
export var ImageContainer = function ImageContainer(_ref) {
|
|
24
|
-
var children = _ref.children,
|
|
25
|
-
mediaName = _ref.mediaName,
|
|
26
|
-
status = _ref.status,
|
|
27
|
-
progress = _ref.progress,
|
|
28
|
-
selected = _ref.selected,
|
|
29
|
-
source = _ref.source,
|
|
30
|
-
centerElements = _ref.centerElements;
|
|
31
|
-
return jsx("div", {
|
|
32
|
-
css: [imageContainerStyles, centerElements && imageContainerCenterStyles],
|
|
33
|
-
"data-testid": fileCardImageViewSelector
|
|
34
|
-
/**
|
|
35
|
-
* This wrapper MUST add the classname in order to allow the editor to prevent bubbling up the click event.
|
|
36
|
-
* See the method isInteractiveElement in source platform/packages/editor/renderer/src/ui/Renderer/click-to-edit.ts
|
|
37
|
-
* Also, many other consumer tests rely on this selector.
|
|
38
|
-
*/
|
|
39
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
40
|
-
,
|
|
41
|
-
className: fileCardImageViewSelector,
|
|
42
|
-
"data-test-media-name": mediaName,
|
|
43
|
-
"data-test-status": status,
|
|
44
|
-
"data-test-progress": progress,
|
|
45
|
-
"data-test-selected": selected,
|
|
46
|
-
"data-test-source": source
|
|
47
|
-
}, children);
|
|
48
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import { jsx } from '@emotion/react';
|
|
8
|
-
import { newFileExperienceClassName } from '../../cardConstants';
|
|
9
|
-
import { wrapperStyles } from './styles';
|
|
10
|
-
import { VcMediaWrapperProps } from '@atlaskit/react-ufo/vc-media';
|
|
11
|
-
import UFOCustomData from '@atlaskit/react-ufo/custom-data';
|
|
12
|
-
export var Wrapper = function Wrapper(props) {
|
|
13
|
-
var testId = props.testId,
|
|
14
|
-
dimensions = props.dimensions,
|
|
15
|
-
appearance = props.appearance,
|
|
16
|
-
onClick = props.onClick,
|
|
17
|
-
onMouseEnter = props.onMouseEnter,
|
|
18
|
-
innerRef = props.innerRef,
|
|
19
|
-
breakpoint = props.breakpoint,
|
|
20
|
-
mediaCardCursor = props.mediaCardCursor,
|
|
21
|
-
disableOverlay = props.disableOverlay,
|
|
22
|
-
selected = props.selected,
|
|
23
|
-
displayBackground = props.displayBackground,
|
|
24
|
-
isPlayButtonClickable = props.isPlayButtonClickable,
|
|
25
|
-
isTickBoxSelectable = props.isTickBoxSelectable,
|
|
26
|
-
shouldDisplayTooltip = props.shouldDisplayTooltip;
|
|
27
|
-
return (
|
|
28
|
-
// eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
|
|
29
|
-
jsx("div", _extends({
|
|
30
|
-
id: "newFileExperienceWrapper"
|
|
31
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
32
|
-
,
|
|
33
|
-
className: newFileExperienceClassName,
|
|
34
|
-
"data-testid": testId
|
|
35
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
36
|
-
,
|
|
37
|
-
css: wrapperStyles({
|
|
38
|
-
breakpoint: breakpoint,
|
|
39
|
-
dimensions: dimensions,
|
|
40
|
-
appearance: appearance,
|
|
41
|
-
disableOverlay: disableOverlay,
|
|
42
|
-
displayBackground: displayBackground,
|
|
43
|
-
selected: selected,
|
|
44
|
-
isPlayButtonClickable: isPlayButtonClickable,
|
|
45
|
-
isTickBoxSelectable: isTickBoxSelectable,
|
|
46
|
-
shouldDisplayTooltip: shouldDisplayTooltip,
|
|
47
|
-
mediaCardCursor: mediaCardCursor
|
|
48
|
-
}),
|
|
49
|
-
ref: innerRef,
|
|
50
|
-
onClick: onClick
|
|
51
|
-
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
52
|
-
,
|
|
53
|
-
onMouseEnter: onMouseEnter
|
|
54
|
-
}, VcMediaWrapperProps), jsx(UFOCustomData, {
|
|
55
|
-
data: {
|
|
56
|
-
hasMediaComponent: true
|
|
57
|
-
}
|
|
58
|
-
}), props.children)
|
|
59
|
-
);
|
|
60
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
|
-
import type { SvgViewProps } from './types';
|
|
7
|
-
export declare const SvgView: ({ identifier, resizeMode, onLoad, onError, wrapperRef, alt, }: SvgViewProps) => jsx.JSX.Element | null;
|