@atlaskit/media-card 77.12.1 → 77.12.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 +18 -0
- package/compass.yml +6 -3
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/cardView.js +1 -1
- package/dist/cjs/card/inlinePlayerWrapper.js +4 -1
- package/dist/cjs/card/inlinePlayerWrapperStyles.js +1 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/ui/actionsBar/actionsBarWrapper.js +4 -1
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionButton.js +5 -1
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionsView.js +1 -1
- package/dist/cjs/card/ui/actionsBar/cardActions/styles.js +14 -2
- package/dist/cjs/card/ui/actionsBar/styles.js +13 -8
- package/dist/cjs/card/ui/blanket/blanket.js +2 -0
- package/dist/cjs/card/ui/blanket/styles.js +8 -2
- package/dist/cjs/card/ui/iconMessage/iconMessageWrapper.js +3 -0
- package/dist/cjs/card/ui/iconWrapper/iconWrapper.js +4 -1
- package/dist/cjs/card/ui/iconWrapper/styles.js +3 -0
- package/dist/cjs/card/ui/openMediaViewerButton/openMediaViewerButton.js +9 -20
- package/dist/cjs/card/ui/playButton/playButtonBackground.js +2 -1
- package/dist/cjs/card/ui/playButton/playButtonWrapper.js +2 -1
- package/dist/cjs/card/ui/playButton/styles.js +7 -0
- package/dist/cjs/card/ui/progressBar/styledBar.js +4 -1
- package/dist/cjs/card/ui/progressBar/styles.js +3 -0
- package/dist/cjs/card/ui/tickBox/tickBoxWrapper.js +14 -3
- package/dist/cjs/card/ui/titleBox/styles.js +24 -4
- package/dist/cjs/card/ui/titleBox/titleBoxComponents.js +30 -17
- package/dist/cjs/card/ui/unhandledErrorCard/index.js +22 -11
- package/dist/cjs/card/ui/wrapper/imageContainer.js +1 -0
- package/dist/cjs/card/ui/wrapper/styles.js +1 -1
- package/dist/cjs/card/ui/wrapper/wrapper.js +4 -1
- package/dist/cjs/card/v2/cardV2.js +1 -1
- package/dist/cjs/card/v2/cardViewV2.js +1 -1
- package/dist/cjs/card/v2/cardviews/cardViewWrapper.js +1 -0
- package/dist/cjs/card/v2/cardviews/errorCardView.js +1 -0
- package/dist/cjs/card/v2/cardviews/iconCardView.js +1 -0
- package/dist/cjs/card/v2/cardviews/imageCardView.js +1 -0
- package/dist/cjs/card/v2/cardviews/index.js +1 -0
- package/dist/cjs/card/v2/cardviews/loadingCardView.js +1 -0
- package/dist/cjs/card/v2/cardviews/processingCardView.js +1 -0
- package/dist/cjs/card/v2/cardviews/videoCardView.js +1 -0
- package/dist/cjs/card/v2/fileCard.js +18 -4
- package/dist/cjs/card/v2/svgView/errors.js +16 -0
- package/dist/cjs/card/v2/svgView/svgView.js +12 -1
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/analytics/analytics.js +3 -0
- package/dist/cjs/utils/lightCards/errorIcon/index.js +10 -7
- package/dist/cjs/utils/lightCards/errorIcon/styles.js +3 -0
- package/dist/cjs/utils/lightCards/lightCardWrappers.js +9 -5
- package/dist/cjs/utils/lightCards/styles.js +10 -2
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/cardView.js +1 -0
- package/dist/es2019/card/inlinePlayerWrapper.js +4 -1
- package/dist/es2019/card/inlinePlayerWrapperStyles.js +1 -0
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/ui/actionsBar/actionsBarWrapper.js +4 -1
- package/dist/es2019/card/ui/actionsBar/cardActions/cardActionButton.js +4 -1
- package/dist/es2019/card/ui/actionsBar/cardActions/cardActionsView.js +1 -0
- package/dist/es2019/card/ui/actionsBar/cardActions/styles.js +14 -2
- package/dist/es2019/card/ui/actionsBar/styles.js +4 -1
- package/dist/es2019/card/ui/blanket/blanket.js +2 -0
- package/dist/es2019/card/ui/blanket/styles.js +7 -2
- package/dist/es2019/card/ui/iconMessage/iconMessageWrapper.js +2 -0
- package/dist/es2019/card/ui/iconWrapper/iconWrapper.js +4 -1
- package/dist/es2019/card/ui/iconWrapper/styles.js +2 -0
- package/dist/es2019/card/ui/openMediaViewerButton/openMediaViewerButton.js +7 -18
- package/dist/es2019/card/ui/playButton/playButtonBackground.js +2 -1
- package/dist/es2019/card/ui/playButton/playButtonWrapper.js +2 -1
- package/dist/es2019/card/ui/playButton/styles.js +6 -0
- package/dist/es2019/card/ui/progressBar/styledBar.js +4 -1
- package/dist/es2019/card/ui/progressBar/styles.js +2 -0
- package/dist/es2019/card/ui/tickBox/tickBoxWrapper.js +13 -3
- package/dist/es2019/card/ui/titleBox/styles.js +23 -4
- package/dist/es2019/card/ui/titleBox/titleBoxComponents.js +30 -17
- package/dist/es2019/card/ui/unhandledErrorCard/index.js +22 -10
- package/dist/es2019/card/ui/wrapper/imageContainer.js +1 -0
- package/dist/es2019/card/ui/wrapper/styles.js +1 -0
- package/dist/es2019/card/ui/wrapper/wrapper.js +4 -1
- package/dist/es2019/card/v2/cardV2.js +1 -1
- package/dist/es2019/card/v2/cardViewV2.js +1 -0
- package/dist/es2019/card/v2/cardviews/cardViewWrapper.js +1 -0
- package/dist/es2019/card/v2/cardviews/errorCardView.js +1 -0
- package/dist/es2019/card/v2/cardviews/iconCardView.js +1 -0
- package/dist/es2019/card/v2/cardviews/imageCardView.js +1 -0
- package/dist/es2019/card/v2/cardviews/index.js +1 -0
- package/dist/es2019/card/v2/cardviews/loadingCardView.js +1 -0
- package/dist/es2019/card/v2/cardviews/processingCardView.js +1 -0
- package/dist/es2019/card/v2/cardviews/videoCardView.js +1 -0
- package/dist/es2019/card/v2/fileCard.js +18 -4
- package/dist/es2019/card/v2/svgView/errors.js +10 -0
- package/dist/es2019/card/v2/svgView/svgView.js +12 -1
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +3 -0
- package/dist/es2019/utils/lightCards/errorIcon/index.js +10 -6
- package/dist/es2019/utils/lightCards/errorIcon/styles.js +3 -0
- package/dist/es2019/utils/lightCards/lightCardWrappers.js +9 -5
- package/dist/es2019/utils/lightCards/styles.js +9 -2
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/cardView.js +1 -0
- package/dist/esm/card/inlinePlayerWrapper.js +4 -1
- package/dist/esm/card/inlinePlayerWrapperStyles.js +1 -0
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/ui/actionsBar/actionsBarWrapper.js +4 -1
- package/dist/esm/card/ui/actionsBar/cardActions/cardActionButton.js +4 -1
- package/dist/esm/card/ui/actionsBar/cardActions/cardActionsView.js +1 -0
- package/dist/esm/card/ui/actionsBar/cardActions/styles.js +14 -2
- package/dist/esm/card/ui/actionsBar/styles.js +12 -8
- package/dist/esm/card/ui/blanket/blanket.js +2 -0
- package/dist/esm/card/ui/blanket/styles.js +7 -2
- package/dist/esm/card/ui/iconMessage/iconMessageWrapper.js +2 -0
- package/dist/esm/card/ui/iconWrapper/iconWrapper.js +4 -1
- package/dist/esm/card/ui/iconWrapper/styles.js +2 -0
- package/dist/esm/card/ui/openMediaViewerButton/openMediaViewerButton.js +7 -18
- package/dist/esm/card/ui/playButton/playButtonBackground.js +2 -1
- package/dist/esm/card/ui/playButton/playButtonWrapper.js +2 -1
- package/dist/esm/card/ui/playButton/styles.js +6 -0
- package/dist/esm/card/ui/progressBar/styledBar.js +4 -1
- package/dist/esm/card/ui/progressBar/styles.js +2 -0
- package/dist/esm/card/ui/tickBox/tickBoxWrapper.js +13 -3
- package/dist/esm/card/ui/titleBox/styles.js +23 -4
- package/dist/esm/card/ui/titleBox/titleBoxComponents.js +30 -17
- package/dist/esm/card/ui/unhandledErrorCard/index.js +22 -10
- package/dist/esm/card/ui/wrapper/imageContainer.js +1 -0
- package/dist/esm/card/ui/wrapper/styles.js +1 -0
- package/dist/esm/card/ui/wrapper/wrapper.js +4 -1
- package/dist/esm/card/v2/cardV2.js +1 -1
- package/dist/esm/card/v2/cardViewV2.js +1 -0
- package/dist/esm/card/v2/cardviews/cardViewWrapper.js +1 -0
- package/dist/esm/card/v2/cardviews/errorCardView.js +1 -0
- package/dist/esm/card/v2/cardviews/iconCardView.js +1 -0
- package/dist/esm/card/v2/cardviews/imageCardView.js +1 -0
- package/dist/esm/card/v2/cardviews/index.js +1 -0
- package/dist/esm/card/v2/cardviews/loadingCardView.js +1 -0
- package/dist/esm/card/v2/cardviews/processingCardView.js +1 -0
- package/dist/esm/card/v2/cardviews/videoCardView.js +1 -0
- package/dist/esm/card/v2/fileCard.js +18 -4
- package/dist/esm/card/v2/svgView/errors.js +10 -0
- package/dist/esm/card/v2/svgView/svgView.js +12 -1
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +3 -0
- package/dist/esm/utils/lightCards/errorIcon/index.js +10 -6
- package/dist/esm/utils/lightCards/errorIcon/styles.js +3 -0
- package/dist/esm/utils/lightCards/lightCardWrappers.js +9 -5
- package/dist/esm/utils/lightCards/styles.js +9 -2
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/card/ui/openMediaViewerButton/openMediaViewerButton.d.ts +0 -1
- package/dist/types/card/v2/svgView/errors.d.ts +3 -0
- package/dist/types/card/v2/svgView/svgView.d.ts +4 -3
- package/dist/types/errors.d.ts +2 -1
- package/dist/types/utils/analytics/analytics.d.ts +2 -1
- package/dist/types-ts4.5/card/ui/openMediaViewerButton/openMediaViewerButton.d.ts +0 -1
- package/dist/types-ts4.5/card/v2/svgView/errors.d.ts +3 -0
- package/dist/types-ts4.5/card/v2/svgView/svgView.d.ts +4 -3
- package/dist/types-ts4.5/errors.d.ts +2 -1
- package/dist/types-ts4.5/utils/analytics/analytics.d.ts +2 -1
- package/example-helpers/cardViewWrapper.tsx +2 -0
- package/example-helpers/styles.ts +24 -0
- package/example-helpers/svg-helpers/cardContainer.tsx +7 -0
- package/example-helpers/svg-helpers/index.ts +1 -1
- package/example-helpers/svg-helpers/mediaApiTweaks.ts +64 -0
- package/example-helpers/svg-helpers/svgContainer.tsx +1 -0
- package/package.json +122 -120
- package/example-helpers/svg-helpers/delayApiResponses.ts +0 -31
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**@jsx jsx */
|
|
2
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
3
|
import { jsx } from '@emotion/react';
|
|
3
4
|
import { tickBoxClassName } from './styles';
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
6
|
import { css } from '@emotion/react';
|
|
5
7
|
import { transition } from '../styles';
|
|
6
8
|
import { B200 } from '@atlaskit/theme/colors';
|
|
@@ -8,7 +10,9 @@ var getSelectedStyles = function getSelectedStyles(selected) {
|
|
|
8
10
|
return selected ? "background-color: ".concat("var(--ds-icon-information, ".concat(B200, ")"), ";\n color: ", "var(--ds-icon-inverse, white)", ";") : "";
|
|
9
11
|
};
|
|
10
12
|
var wrapperStyles = function wrapperStyles(selected) {
|
|
11
|
-
return css(
|
|
13
|
+
return css(
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
15
|
+
transition && transition(), {
|
|
12
16
|
fontSize: '14px',
|
|
13
17
|
width: '14px',
|
|
14
18
|
height: '14px',
|
|
@@ -17,18 +21,24 @@ var wrapperStyles = function wrapperStyles(selected) {
|
|
|
17
21
|
left: "var(--ds-space-075, 7px)",
|
|
18
22
|
borderRadius: '20px',
|
|
19
23
|
color: 'transparent',
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
20
25
|
span: {
|
|
21
26
|
display: 'block',
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
22
28
|
svg: {
|
|
23
29
|
height: '14px'
|
|
24
30
|
}
|
|
25
31
|
}
|
|
26
|
-
},
|
|
32
|
+
},
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
34
|
+
getSelectedStyles(selected));
|
|
27
35
|
};
|
|
28
36
|
wrapperStyles.displayName = 'TickBoxWrapper';
|
|
29
37
|
export var TickBoxWrapper = function TickBoxWrapper(props) {
|
|
30
38
|
return jsx("div", {
|
|
31
|
-
id: "tickBoxWrapper"
|
|
39
|
+
id: "tickBoxWrapper"
|
|
40
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
41
|
+
,
|
|
32
42
|
css: wrapperStyles(props.selected)
|
|
33
43
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
34
44
|
,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css } from '@emotion/react';
|
|
2
3
|
import { responsiveSettings, getTitleBoxHeight, Breakpoint } from '../common';
|
|
3
4
|
import { N0, N800 } from '@atlaskit/theme/colors';
|
|
@@ -18,14 +19,18 @@ export var titleBoxWrapperStyles = function titleBoxWrapperStyles(_ref) {
|
|
|
18
19
|
position: 'absolute',
|
|
19
20
|
bottom: 0,
|
|
20
21
|
width: '100%',
|
|
21
|
-
backgroundColor: "var(--ds-surface, ".concat(
|
|
22
|
+
backgroundColor: "var(--ds-surface, ".concat(
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
24
|
+
rgba(titleBoxBgColor && HEX_REGEX.test(titleBoxBgColor) ? titleBoxBgColor : N0, 1), ")"),
|
|
22
25
|
color: "var(--ds-text, ".concat(N800, ")"),
|
|
23
26
|
cursor: 'inherit',
|
|
24
27
|
pointerEvents: 'none',
|
|
25
28
|
display: 'flex',
|
|
26
29
|
flexDirection: 'column',
|
|
27
30
|
justifyContent: 'center'
|
|
28
|
-
},
|
|
31
|
+
},
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
33
|
+
generateResponsiveStyles(breakpoint));
|
|
29
34
|
};
|
|
30
35
|
titleBoxWrapperStyles.displayName = 'TitleBoxWrapper';
|
|
31
36
|
var infoStyles = "white-space: nowrap;overflow: hidden;";
|
|
@@ -34,27 +39,41 @@ export var titleBoxHeaderStyles = function titleBoxHeaderStyles(_ref2) {
|
|
|
34
39
|
var hasIconOverlap = _ref2.hasIconOverlap;
|
|
35
40
|
return css({
|
|
36
41
|
fontWeight: 600
|
|
37
|
-
},
|
|
42
|
+
},
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
44
|
+
infoStyles,
|
|
45
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
46
|
+
hasIconOverlap && iconOverlapStyles);
|
|
38
47
|
};
|
|
39
48
|
titleBoxHeaderStyles.displayName = 'FailedTitleBoxHeader';
|
|
40
49
|
export var titleBoxFooterStyles = function titleBoxFooterStyles(_ref3) {
|
|
41
50
|
var hasIconOverlap = _ref3.hasIconOverlap;
|
|
42
51
|
return css({
|
|
43
52
|
textOverflow: 'ellipsis'
|
|
44
|
-
},
|
|
53
|
+
},
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
55
|
+
infoStyles,
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
57
|
+
hasIconOverlap && iconOverlapStyles);
|
|
45
58
|
};
|
|
46
59
|
titleBoxFooterStyles.displayName = 'TitleBoxFooter';
|
|
60
|
+
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
47
62
|
export var titleBoxIconStyles = css({
|
|
48
63
|
position: 'absolute',
|
|
49
64
|
right: "var(--ds-space-050, 4px)",
|
|
50
65
|
bottom: '0px'
|
|
51
66
|
});
|
|
67
|
+
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
52
69
|
export var errorMessageWrapperStyles = css({
|
|
53
70
|
display: 'flex',
|
|
54
71
|
alignItems: 'center',
|
|
55
72
|
justifyContent: 'flex-start',
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
56
74
|
span: {
|
|
57
75
|
verticalAlign: 'middle',
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
58
77
|
':nth-child(2)': {
|
|
59
78
|
marginLeft: "var(--ds-space-050, 4px)",
|
|
60
79
|
marginRight: "var(--ds-space-050, 4px)"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
3
|
import { jsx } from '@emotion/react';
|
|
3
4
|
import { errorMessageWrapperStyles, titleBoxFooterStyles, titleBoxHeaderStyles, titleBoxIconStyles, titleBoxWrapperStyles } from './styles';
|
|
4
5
|
export var TitleBoxWrapper = function TitleBoxWrapper(props) {
|
|
@@ -6,7 +7,9 @@ export var TitleBoxWrapper = function TitleBoxWrapper(props) {
|
|
|
6
7
|
titleBoxBgColor = props.titleBoxBgColor;
|
|
7
8
|
return jsx("div", {
|
|
8
9
|
id: "titleBoxWrapper",
|
|
9
|
-
"data-testid": "media-title-box"
|
|
10
|
+
"data-testid": "media-title-box"
|
|
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
|
+
,
|
|
10
13
|
css: titleBoxWrapperStyles({
|
|
11
14
|
breakpoint: breakpoint,
|
|
12
15
|
titleBoxBgColor: titleBoxBgColor
|
|
@@ -15,29 +18,39 @@ export var TitleBoxWrapper = function TitleBoxWrapper(props) {
|
|
|
15
18
|
};
|
|
16
19
|
export var TitleBoxHeader = function TitleBoxHeader(props) {
|
|
17
20
|
var hasIconOverlap = props.hasIconOverlap;
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
return (
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
23
|
+
jsx("div", {
|
|
24
|
+
id: "titleBoxHeader",
|
|
25
|
+
css: titleBoxHeaderStyles({
|
|
26
|
+
hasIconOverlap: hasIconOverlap
|
|
27
|
+
})
|
|
28
|
+
}, props.children)
|
|
29
|
+
);
|
|
24
30
|
};
|
|
25
31
|
export var TitleBoxFooter = function TitleBoxFooter(props) {
|
|
26
32
|
var hasIconOverlap = props.hasIconOverlap;
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
return (
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
35
|
+
jsx("div", {
|
|
36
|
+
id: "titleBoxFooter",
|
|
37
|
+
css: titleBoxFooterStyles({
|
|
38
|
+
hasIconOverlap: hasIconOverlap
|
|
39
|
+
})
|
|
40
|
+
}, props.children)
|
|
41
|
+
);
|
|
33
42
|
};
|
|
34
43
|
export var TitleBoxIcon = function TitleBoxIcon(props) {
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
return (
|
|
45
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
46
|
+
jsx("div", {
|
|
47
|
+
id: "titleBoxIcon",
|
|
48
|
+
css: titleBoxIconStyles
|
|
49
|
+
}, props.children)
|
|
50
|
+
);
|
|
39
51
|
};
|
|
40
52
|
export var ErrorMessageWrapper = function ErrorMessageWrapper(props) {
|
|
53
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
41
54
|
return jsx("div", {
|
|
42
55
|
css: errorMessageWrapperStyles
|
|
43
56
|
}, props.children);
|
|
@@ -7,6 +7,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
/** @jsx jsx */
|
|
9
9
|
import { Component } from 'react';
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
11
|
import { css, jsx } from '@emotion/react';
|
|
11
12
|
import WarningIcon from '@atlaskit/icon/glyph/editor/warning';
|
|
12
13
|
import { N20, N800, Y500 } from '@atlaskit/theme/colors';
|
|
@@ -41,17 +42,25 @@ var getConvertedDimension = function getConvertedDimension(dimensions) {
|
|
|
41
42
|
var wrapperStyles = function wrapperStyles() {
|
|
42
43
|
var dimensions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultImageCardDimensions;
|
|
43
44
|
try {
|
|
44
|
-
return css(
|
|
45
|
+
return css(
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
47
|
+
center,
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
49
|
+
borderRadius, {
|
|
45
50
|
background: "var(--ds-background-neutral, ".concat(N20, ")"),
|
|
46
51
|
color: "var(--ds-text-subtle, ".concat(N800, ")"),
|
|
47
52
|
maxHeight: '100%',
|
|
48
53
|
maxWidth: '100%'
|
|
49
|
-
},
|
|
54
|
+
},
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
56
|
+
getConvertedDimension(dimensions), {
|
|
50
57
|
display: 'flex',
|
|
51
58
|
flexDirection: 'column',
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
52
60
|
p: {
|
|
53
61
|
fontSize: "".concat(fontSize(), "px"),
|
|
54
62
|
textAlign: 'center',
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
55
64
|
display: shouldShowText(getConvertedDimension(dimensions)) ? 'block' : 'none'
|
|
56
65
|
}
|
|
57
66
|
});
|
|
@@ -72,14 +81,17 @@ export var UnhandledErrorCard = /*#__PURE__*/function (_Component) {
|
|
|
72
81
|
var _this$props = this.props,
|
|
73
82
|
dimensions = _this$props.dimensions,
|
|
74
83
|
onClick = _this$props.onClick;
|
|
75
|
-
return
|
|
76
|
-
css
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
return (
|
|
85
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
86
|
+
jsx("div", {
|
|
87
|
+
css: wrapperStyles(dimensions),
|
|
88
|
+
onClick: onClick
|
|
89
|
+
}, jsx(WarningIcon, {
|
|
90
|
+
label: "Error",
|
|
91
|
+
primaryColor: "var(--ds-icon-warning, ".concat(Y500, ")"),
|
|
92
|
+
size: "medium"
|
|
93
|
+
}), jsx("p", null, "We couldn't load this content"))
|
|
94
|
+
);
|
|
83
95
|
}
|
|
84
96
|
}]);
|
|
85
97
|
return UnhandledErrorCard;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { css } from '@emotion/react';
|
|
4
5
|
import { fontFamily } from '@atlaskit/theme/constants';
|
|
5
6
|
import { borderRadius } from '@atlaskit/media-ui';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**@jsx jsx */
|
|
2
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
3
|
import { jsx } from '@emotion/react';
|
|
3
4
|
import { newFileExperienceClassName } from '../../cardConstants';
|
|
4
5
|
import { wrapperStyles } from './styles';
|
|
@@ -22,7 +23,9 @@ export var Wrapper = function Wrapper(props) {
|
|
|
22
23
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
23
24
|
,
|
|
24
25
|
className: newFileExperienceClassName,
|
|
25
|
-
"data-testid": testId
|
|
26
|
+
"data-testid": testId
|
|
27
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
28
|
+
,
|
|
26
29
|
css: wrapperStyles({
|
|
27
30
|
breakpoint: breakpoint,
|
|
28
31
|
dimensions: dimensions,
|
|
@@ -9,7 +9,7 @@ import { IntlProvider, injectIntl } from 'react-intl-next';
|
|
|
9
9
|
import { ExternalImageCard } from './externalImageCard';
|
|
10
10
|
import { FileCard } from './fileCard';
|
|
11
11
|
var packageName = "@atlaskit/media-card";
|
|
12
|
-
var packageVersion = "77.12.
|
|
12
|
+
var packageVersion = "77.12.3";
|
|
13
13
|
export var CardV2Base = function CardV2Base(_ref) {
|
|
14
14
|
var identifier = _ref.identifier,
|
|
15
15
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -3,6 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
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
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
5
|
/** @jsx jsx */
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
7
|
import { jsx } from '@emotion/react';
|
|
7
8
|
import React, { useEffect, useState, useRef } from 'react';
|
|
8
9
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["cardPreview", "testId", "dimensions", "appearance", "metadata", "selected", "selectable", "actions", "breakpoint", "disableOverlay", "titleBoxBgColor", "titleBoxIcon", "shouldHideTooltip", "children", "onClick", "onMouseEnter", "mediaCardCursor", "customBlanket", "customTitleBox", "progressBar", "shouldOpenMediaViewer", "openMediaViewerButtonRef", "overriddenCreationDate"];
|
|
4
4
|
/** @jsx jsx */
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
6
|
import { jsx } from '@emotion/react';
|
|
6
7
|
import React from 'react';
|
|
7
8
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { jsx } from '@emotion/react';
|
|
4
5
|
import { useRef } from 'react';
|
|
5
6
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { jsx } from '@emotion/react';
|
|
4
5
|
import { useEffect, useRef } from 'react';
|
|
5
6
|
import { MimeTypeIcon } from '@atlaskit/media-ui/mime-type-icon';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { jsx } from '@emotion/react';
|
|
4
5
|
import { useEffect, useRef } from 'react';
|
|
5
6
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
5
|
import { jsx } from '@emotion/react';
|
|
5
6
|
import React, { useEffect, useState, useRef } from 'react';
|
|
6
7
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { jsx } from '@emotion/react';
|
|
4
5
|
import { useEffect, useRef } from 'react';
|
|
5
6
|
import SpinnerIcon from '@atlaskit/spinner';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { jsx } from '@emotion/react';
|
|
4
5
|
import { useEffect, useRef } from 'react';
|
|
5
6
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { jsx } from '@emotion/react';
|
|
4
5
|
import { useEffect, useRef } from 'react';
|
|
5
6
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -312,10 +312,24 @@ export var FileCard = function FileCard(_ref) {
|
|
|
312
312
|
//---------------------- Callbacks & Handlers -------------------//
|
|
313
313
|
//----------------------------------------------------------------//
|
|
314
314
|
|
|
315
|
+
var onSvgError = function onSvgError(error) {
|
|
316
|
+
setError(error);
|
|
317
|
+
setStatus('error');
|
|
318
|
+
setShouldRenderSVG(false);
|
|
319
|
+
};
|
|
315
320
|
var onImageError = function onImageError(newCardPreview) {
|
|
321
|
+
if (getBooleanFF('platform.media-card-svg-rendering_6tdbv') && metadata.mimeType === 'image/svg+xml') {
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
316
324
|
onImageErrorBase(newCardPreview);
|
|
317
325
|
};
|
|
326
|
+
var onSvgLoad = function onSvgLoad() {
|
|
327
|
+
setPreviewDidRender(true);
|
|
328
|
+
};
|
|
318
329
|
var onImageLoad = function onImageLoad(newCardPreview) {
|
|
330
|
+
if (getBooleanFF('platform.media-card-svg-rendering_6tdbv') && metadata.mimeType === 'image/svg+xml') {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
319
333
|
onImageLoadBase(newCardPreview);
|
|
320
334
|
setPreviewDidRender(true);
|
|
321
335
|
};
|
|
@@ -440,7 +454,7 @@ export var FileCard = function FileCard(_ref) {
|
|
|
440
454
|
//----------------------------------------------------------------//
|
|
441
455
|
|
|
442
456
|
useEffect(function () {
|
|
443
|
-
if (getBooleanFF('platform.media-card-svg-rendering_6tdbv') &&
|
|
457
|
+
if (getBooleanFF('platform.media-card-svg-rendering_6tdbv') && finalStatus !== 'error' &&
|
|
444
458
|
/**
|
|
445
459
|
* We need to check that the card is visible before switching to SVG
|
|
446
460
|
* in order to avoid race conditions of the ViewportDector being unmounted before
|
|
@@ -450,7 +464,7 @@ export var FileCard = function FileCard(_ref) {
|
|
|
450
464
|
) {
|
|
451
465
|
setShouldRenderSVG(true);
|
|
452
466
|
}
|
|
453
|
-
}, [isCardVisible, disableOverlay, metadata]);
|
|
467
|
+
}, [isCardVisible, disableOverlay, metadata.mimeType, finalStatus]);
|
|
454
468
|
|
|
455
469
|
//----------------------------------------------------------------//
|
|
456
470
|
//----------------- fireScreenEvent ------------------------------//
|
|
@@ -635,8 +649,8 @@ export var FileCard = function FileCard(_ref) {
|
|
|
635
649
|
onClick: onCardViewClick,
|
|
636
650
|
onMouseEnter: onImageMouseEnter,
|
|
637
651
|
progress: uploadProgressRef.current,
|
|
638
|
-
|
|
639
|
-
|
|
652
|
+
onError: onSvgError,
|
|
653
|
+
onLoad: onSvgLoad,
|
|
640
654
|
mediaCardCursor: mediaCardCursor,
|
|
641
655
|
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
642
656
|
openMediaViewerButtonRef: mediaViewerButtonRef
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { jsx } from '@emotion/react';
|
|
4
5
|
import React, { useState, useRef } from 'react';
|
|
5
6
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -13,6 +14,8 @@ import { useBreakpoint } from '../../useBreakpoint';
|
|
|
13
14
|
import MediaSvg from '@atlaskit/media-svg';
|
|
14
15
|
import { calculateSvgDimensions } from './helpers';
|
|
15
16
|
import OpenMediaViewerButton from '../../ui/openMediaViewerButton/openMediaViewerButton';
|
|
17
|
+
import { MediaCardError } from '../../../errors';
|
|
18
|
+
import { getErrorReason } from './errors';
|
|
16
19
|
export var convertResizeMode = function convertResizeMode(resizeMode) {
|
|
17
20
|
switch (resizeMode) {
|
|
18
21
|
case 'crop':
|
|
@@ -42,7 +45,9 @@ export var SvgViewBase = function SvgViewBase(_ref) {
|
|
|
42
45
|
resizeMode = _ref.resizeMode,
|
|
43
46
|
shouldOpenMediaViewer = _ref.shouldOpenMediaViewer,
|
|
44
47
|
_ref$openMediaViewerB = _ref.openMediaViewerButtonRef,
|
|
45
|
-
openMediaViewerButtonRef = _ref$openMediaViewerB === void 0 ? null : _ref$openMediaViewerB
|
|
48
|
+
openMediaViewerButtonRef = _ref$openMediaViewerB === void 0 ? null : _ref$openMediaViewerB,
|
|
49
|
+
onLoad = _ref.onLoad,
|
|
50
|
+
onError = _ref.onError;
|
|
46
51
|
var _useState = useState(false),
|
|
47
52
|
_useState2 = _slicedToArray(_useState, 2),
|
|
48
53
|
didSvgRender = _useState2[0],
|
|
@@ -60,6 +65,11 @@ export var SvgViewBase = function SvgViewBase(_ref) {
|
|
|
60
65
|
var onSvgLoad = function onSvgLoad(evt) {
|
|
61
66
|
setSvgDimensions(calculateSvgDimensions(evt.currentTarget, resizeMode));
|
|
62
67
|
setDidSvgRender(true);
|
|
68
|
+
onLoad();
|
|
69
|
+
};
|
|
70
|
+
var onSvgError = function onSvgError(err) {
|
|
71
|
+
var error = new MediaCardError(getErrorReason(err.primaryReason), err.secondaryError);
|
|
72
|
+
onError(error);
|
|
63
73
|
};
|
|
64
74
|
var onPreviewLoad = function onPreviewLoad() {
|
|
65
75
|
setDidPreviewRender(true);
|
|
@@ -95,6 +105,7 @@ export var SvgViewBase = function SvgViewBase(_ref) {
|
|
|
95
105
|
identifier: identifier,
|
|
96
106
|
dimensions: svgDimensions,
|
|
97
107
|
onLoad: onSvgLoad,
|
|
108
|
+
onError: onSvgError,
|
|
98
109
|
style: {
|
|
99
110
|
visibility: didSvgRender ? 'visible' : 'hidden',
|
|
100
111
|
objectFit: convertResizeMode(resizeMode)
|
|
@@ -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: "77.12.
|
|
106
|
+
packageName: "77.12.3",
|
|
107
107
|
componentName: 'mediaInlineCard',
|
|
108
108
|
component: 'mediaInlineCard'
|
|
109
109
|
};
|
|
@@ -46,6 +46,7 @@ export var getRenderSucceededEventPayload = function getRenderSucceededEventPayl
|
|
|
46
46
|
action: 'succeeded',
|
|
47
47
|
actionSubject: 'mediaCardRender',
|
|
48
48
|
attributes: {
|
|
49
|
+
fileMimetype: fileAttributes.fileMimetype,
|
|
49
50
|
fileAttributes: fileAttributes,
|
|
50
51
|
performanceAttributes: performanceAttributes,
|
|
51
52
|
status: 'success',
|
|
@@ -146,6 +147,7 @@ export var getRenderErrorEventPayload = function getRenderErrorEventPayload(file
|
|
|
146
147
|
action: 'failed',
|
|
147
148
|
actionSubject: 'mediaCardRender',
|
|
148
149
|
attributes: _objectSpread(_objectSpread({
|
|
150
|
+
fileMimetype: fileAttributes.fileMimetype,
|
|
149
151
|
fileAttributes: fileAttributes,
|
|
150
152
|
performanceAttributes: performanceAttributes,
|
|
151
153
|
status: 'fail'
|
|
@@ -178,6 +180,7 @@ export var getRenderFailedFileStatusPayload = function getRenderFailedFileStatus
|
|
|
178
180
|
action: 'failed',
|
|
179
181
|
actionSubject: 'mediaCardRender',
|
|
180
182
|
attributes: {
|
|
183
|
+
fileMimetype: fileAttributes.fileMimetype,
|
|
181
184
|
fileAttributes: fileAttributes,
|
|
182
185
|
performanceAttributes: performanceAttributes,
|
|
183
186
|
status: 'fail',
|
|
@@ -7,6 +7,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
7
7
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
/**@jsx jsx */
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
11
|
import { jsx } from '@emotion/react';
|
|
11
12
|
import { Component } from 'react';
|
|
12
13
|
import WarningIcon from '@atlaskit/icon/glyph/editor/warning';
|
|
@@ -22,12 +23,15 @@ export var ErrorIcon = /*#__PURE__*/function (_Component) {
|
|
|
22
23
|
key: "render",
|
|
23
24
|
value: function render() {
|
|
24
25
|
var size = this.props.size;
|
|
25
|
-
return
|
|
26
|
-
css
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
return (
|
|
27
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
28
|
+
jsx("div", {
|
|
29
|
+
css: errorIconWrapperStyles
|
|
30
|
+
}, jsx(WarningIcon, {
|
|
31
|
+
label: "Error",
|
|
32
|
+
size: size
|
|
33
|
+
}))
|
|
34
|
+
);
|
|
31
35
|
}
|
|
32
36
|
}]);
|
|
33
37
|
return ErrorIcon;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css } from '@emotion/react';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
2
5
|
export var errorIconWrapperStyles = css({
|
|
3
6
|
display: 'flex',
|
|
4
7
|
color: "var(--ds-icon-warning, #ff991f)"
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/**@jsx jsx */
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { jsx } from '@emotion/react';
|
|
4
5
|
import { wrapperStyles } from './styles';
|
|
5
6
|
export var Wrapper = function Wrapper(props) {
|
|
6
|
-
return
|
|
7
|
-
css
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
return (
|
|
8
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
9
|
+
jsx("div", _extends({
|
|
10
|
+
css: wrapperStyles({
|
|
11
|
+
dimensions: props.dimensions
|
|
12
|
+
})
|
|
13
|
+
}, props), props.children)
|
|
14
|
+
);
|
|
11
15
|
};
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css } from '@emotion/react';
|
|
2
3
|
import { center, borderRadius } from '@atlaskit/media-ui';
|
|
3
4
|
import { N20, N50 } from '@atlaskit/theme/colors';
|
|
4
5
|
export var wrapperStyles = function wrapperStyles(_ref) {
|
|
5
6
|
var dimensions = _ref.dimensions;
|
|
6
|
-
return css(
|
|
7
|
+
return css(
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
9
|
+
center, {
|
|
7
10
|
background: "var(--ds-background-neutral, ".concat(N20, ")"),
|
|
8
11
|
color: "var(--ds-icon, ".concat(N50, ")")
|
|
9
|
-
},
|
|
12
|
+
},
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
14
|
+
borderRadius, {
|
|
10
15
|
maxHeight: '100%',
|
|
11
16
|
maxWidth: '100%',
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
12
18
|
width: dimensions.width,
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
13
20
|
height: dimensions.height
|
|
14
21
|
});
|
|
15
22
|
};
|
|
@@ -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 = "77.12.
|
|
10
|
+
var packageVersion = "77.12.3";
|
|
11
11
|
var concurrentExperience;
|
|
12
12
|
var getExperience = function getExperience(id) {
|
|
13
13
|
if (!concurrentExperience) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type WrappedComponentProps } from 'react-intl-next';
|
|
3
|
-
export declare const visuallyHiddenStyles: import("@emotion/react").SerializedStyles;
|
|
4
3
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
5
4
|
fileName: string;
|
|
6
5
|
innerRef: React.Ref<HTMLButtonElement>;
|