@atlaskit/media-card 74.4.0 → 74.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/card/card.js +1 -1
  3. package/dist/cjs/card/cardImageView/cardOverlay/index.js +1 -3
  4. package/dist/cjs/card/cardImageView/cardOverlay/styles.js +6 -8
  5. package/dist/cjs/card/cardImageView/fileCardImageView.js +1 -3
  6. package/dist/cjs/card/cardImageView/styles.js +7 -9
  7. package/dist/cjs/card/cardState.js +1 -1
  8. package/dist/cjs/card/getCardStatus.js +34 -1
  9. package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
  10. package/dist/cjs/card/styles/index.js +1 -3
  11. package/dist/cjs/card/ui/blanket/styles.js +1 -3
  12. package/dist/cjs/card/ui/iconMessage/styles.js +1 -3
  13. package/dist/cjs/card/ui/loadingRateLimited/styles.js +1 -3
  14. package/dist/cjs/card/ui/newFileExperience/newFileExperienceWrapper.js +5 -1
  15. package/dist/cjs/card/ui/newFileExperience/styles.js +12 -4
  16. package/dist/cjs/card/ui/playButton/styles.js +2 -4
  17. package/dist/cjs/card/ui/styles.js +1 -3
  18. package/dist/cjs/card/ui/tickBox/styles.js +2 -4
  19. package/dist/cjs/card/ui/titleBox/failedTitleBox.js +1 -3
  20. package/dist/cjs/card/ui/titleBox/styles.js +19 -5
  21. package/dist/cjs/card/ui/titleBox/titleBoxComponents.js +5 -1
  22. package/dist/cjs/card/ui/unhandledErrorCard/index.js +2 -4
  23. package/dist/cjs/inline/mediaInlineAnalyticsErrorBoundary.js +1 -1
  24. package/dist/cjs/utils/analytics.js +2 -1
  25. package/dist/cjs/utils/cardActions/styles.js +2 -4
  26. package/dist/cjs/utils/errorIcon/styles.js +1 -3
  27. package/dist/cjs/utils/lightCards/styles.js +4 -6
  28. package/dist/cjs/utils/ufoExperiences.js +1 -1
  29. package/dist/cjs/utils/viewportDetector.js +4 -12
  30. package/dist/cjs/version.json +1 -1
  31. package/dist/es2019/card/card.js +1 -1
  32. package/dist/es2019/card/cardImageView/cardOverlay/index.js +1 -2
  33. package/dist/es2019/card/cardImageView/cardOverlay/styles.js +20 -21
  34. package/dist/es2019/card/cardImageView/fileCardImageView.js +1 -2
  35. package/dist/es2019/card/cardImageView/styles.js +7 -8
  36. package/dist/es2019/card/cardState.js +1 -1
  37. package/dist/es2019/card/getCardStatus.js +34 -1
  38. package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
  39. package/dist/es2019/card/styles/index.js +1 -2
  40. package/dist/es2019/card/ui/blanket/styles.js +1 -2
  41. package/dist/es2019/card/ui/iconMessage/styles.js +1 -2
  42. package/dist/es2019/card/ui/loadingRateLimited/styles.js +1 -2
  43. package/dist/es2019/card/ui/newFileExperience/newFileExperienceWrapper.js +4 -1
  44. package/dist/es2019/card/ui/newFileExperience/styles.js +10 -3
  45. package/dist/es2019/card/ui/playButton/styles.js +2 -3
  46. package/dist/es2019/card/ui/styles.js +1 -2
  47. package/dist/es2019/card/ui/tickBox/styles.js +4 -5
  48. package/dist/es2019/card/ui/titleBox/failedTitleBox.js +1 -2
  49. package/dist/es2019/card/ui/titleBox/styles.js +20 -7
  50. package/dist/es2019/card/ui/titleBox/titleBoxComponents.js +4 -1
  51. package/dist/es2019/card/ui/unhandledErrorCard/index.js +3 -4
  52. package/dist/es2019/inline/mediaInlineAnalyticsErrorBoundary.js +1 -1
  53. package/dist/es2019/utils/analytics.js +2 -1
  54. package/dist/es2019/utils/cardActions/styles.js +4 -5
  55. package/dist/es2019/utils/errorIcon/styles.js +1 -2
  56. package/dist/es2019/utils/lightCards/styles.js +4 -5
  57. package/dist/es2019/utils/ufoExperiences.js +1 -1
  58. package/dist/es2019/utils/viewportDetector.js +4 -12
  59. package/dist/es2019/version.json +1 -1
  60. package/dist/esm/card/card.js +1 -1
  61. package/dist/esm/card/cardImageView/cardOverlay/index.js +1 -2
  62. package/dist/esm/card/cardImageView/cardOverlay/styles.js +6 -7
  63. package/dist/esm/card/cardImageView/fileCardImageView.js +1 -2
  64. package/dist/esm/card/cardImageView/styles.js +7 -8
  65. package/dist/esm/card/cardState.js +1 -1
  66. package/dist/esm/card/getCardStatus.js +34 -1
  67. package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
  68. package/dist/esm/card/styles/index.js +1 -2
  69. package/dist/esm/card/ui/blanket/styles.js +1 -2
  70. package/dist/esm/card/ui/iconMessage/styles.js +1 -2
  71. package/dist/esm/card/ui/loadingRateLimited/styles.js +1 -2
  72. package/dist/esm/card/ui/newFileExperience/newFileExperienceWrapper.js +4 -1
  73. package/dist/esm/card/ui/newFileExperience/styles.js +10 -3
  74. package/dist/esm/card/ui/playButton/styles.js +2 -3
  75. package/dist/esm/card/ui/styles.js +1 -2
  76. package/dist/esm/card/ui/tickBox/styles.js +2 -3
  77. package/dist/esm/card/ui/titleBox/failedTitleBox.js +1 -2
  78. package/dist/esm/card/ui/titleBox/styles.js +19 -5
  79. package/dist/esm/card/ui/titleBox/titleBoxComponents.js +4 -1
  80. package/dist/esm/card/ui/unhandledErrorCard/index.js +2 -3
  81. package/dist/esm/inline/mediaInlineAnalyticsErrorBoundary.js +1 -1
  82. package/dist/esm/utils/analytics.js +2 -1
  83. package/dist/esm/utils/cardActions/styles.js +2 -3
  84. package/dist/esm/utils/errorIcon/styles.js +1 -2
  85. package/dist/esm/utils/lightCards/styles.js +4 -5
  86. package/dist/esm/utils/ufoExperiences.js +1 -1
  87. package/dist/esm/utils/viewportDetector.js +4 -12
  88. package/dist/esm/version.json +1 -1
  89. package/dist/types/card/getCardStatus.d.ts +2 -1
  90. package/dist/types/card/ui/newFileExperience/styles.d.ts +1 -1
  91. package/dist/types/card/ui/newFileExperience/types.d.ts +2 -0
  92. package/dist/types/card/ui/titleBox/styles.d.ts +1 -1
  93. package/dist/types/card/ui/titleBox/types.d.ts +2 -0
  94. package/package.json +8 -8
  95. package/report.api.md +16 -0
@@ -6,7 +6,6 @@ var _templateObject;
6
6
  import { css } from '@emotion/react';
7
7
  import { borderRadius } from '@atlaskit/media-ui';
8
8
  import { N60A } from '@atlaskit/theme/colors';
9
- import { token } from '@atlaskit/tokens';
10
9
  import { akEditorSelectedBoxShadow } from '@atlaskit/editor-shared-styles/consts';
11
10
  import { getCSSUnitValue } from '../../utils/getCSSUnitValue';
12
11
  import { getDefaultCardDimensions } from '../../utils/cardDimensions';
@@ -48,7 +47,7 @@ export var getWrapperDimensions = function getWrapperDimensions(dimensions, appe
48
47
  // CSS outline has no 'radius', therefore we can't achieve the same effect with it
49
48
 
50
49
  export var getWrapperShadow = function getWrapperShadow(disableOverlay, selected) {
51
- var withOverlayShadow = !disableOverlay ? "".concat(token('elevation.shadow.raised', "0 1px 1px ".concat(N60A, ", 0 0 1px 0 ").concat(N60A))) : '';
50
+ var withOverlayShadow = !disableOverlay ? "".concat("var(--ds-shadow-raised, ".concat("0 1px 1px ".concat(N60A, ", 0 0 1px 0 ").concat(N60A), ")")) : '';
52
51
  var selectedShadow = selected ? akEditorSelectedBoxShadow : '';
53
52
  var shadow = [selectedShadow, withOverlayShadow].filter(Boolean).join(', ');
54
53
  return shadow ? "box-shadow: ".concat(shadow, ";") : '';
@@ -5,11 +5,10 @@ var _templateObject;
5
5
  import { css } from '@emotion/react';
6
6
  import { transition } from '../../styles';
7
7
  import { B200, N0, N100 } from '@atlaskit/theme/colors';
8
- import { token } from '@atlaskit/tokens';
9
8
  export var tickBoxClassName = 'media-card-tickbox';
10
- export var tickboxFixedStyles = "\n background-color: ".concat(token('color.background.input', N0), ";\n color: ").concat(token('color.icon.subtle', N100), ";\n");
9
+ export var tickboxFixedStyles = "\n background-color: ".concat("var(--ds-background-input, ".concat(N0, ")"), ";\n color: ", "var(--ds-icon-subtle, ".concat(N100, ")"), ";\n");
11
10
  export var getSelectedStyles = function getSelectedStyles(selected) {
12
- return selected ? "background-color: ".concat(token('color.icon.information', B200), ";\n color: ").concat(token('color.icon.inverse', 'white'), ";") : "";
11
+ return selected ? "background-color: ".concat("var(--ds-icon-information, ".concat(B200, ")"), ";\n color: ", "var(--ds-icon-inverse, white)", ";") : "";
13
12
  };
14
13
  export var wrapperStyles = function wrapperStyles(selected) {
15
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));
@@ -3,7 +3,6 @@ import { FormattedMessage } from 'react-intl-next';
3
3
  import EditorWarningIcon from '@atlaskit/icon/glyph/editor/warning';
4
4
  import { messages } from '@atlaskit/media-ui';
5
5
  import { R300 } from '@atlaskit/theme/colors';
6
- import { token } from '@atlaskit/tokens';
7
6
  import { ErrorMessageWrapper, TitleBoxWrapper } from './titleBoxComponents';
8
7
  export var FailedTitleBox = function FailedTitleBox(_ref) {
9
8
  var breakpoint = _ref.breakpoint,
@@ -14,6 +13,6 @@ export var FailedTitleBox = function FailedTitleBox(_ref) {
14
13
  }, /*#__PURE__*/React.createElement(ErrorMessageWrapper, null, /*#__PURE__*/React.createElement(EditorWarningIcon, {
15
14
  label: 'Warning',
16
15
  size: 'small',
17
- primaryColor: token('color.text.danger', R300)
16
+ primaryColor: "var(--ds-text-danger, ".concat(R300, ")")
18
17
  }), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, customMessage))));
19
18
  };
@@ -3,10 +3,10 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
3
3
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
4
4
 
5
5
  import { css } from '@emotion/react';
6
- import { token } from '@atlaskit/tokens';
7
6
  import { responsiveSettings, getTitleBoxHeight, Breakpoint } from '../common';
8
- import { N0 } from '@atlaskit/theme/colors';
7
+ import { N0, N800 } from '@atlaskit/theme/colors';
9
8
  import { rgba } from '../../styles/mixins';
9
+ import { themed } from '@atlaskit/theme/components';
10
10
 
11
11
  var generateResponsiveStyles = function generateResponsiveStyles() {
12
12
  var breakpoint = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Breakpoint.SMALL;
@@ -18,13 +18,27 @@ var generateResponsiveStyles = function generateResponsiveStyles() {
18
18
  };
19
19
 
20
20
  var HEX_REGEX = /^#[0-9A-F]{6}$/i;
21
+ var BACKGROUND_COLOR_DARK = '#161a1d';
22
+ var TEXT_COLOR_DARK = '#C7D1DB';
21
23
  export var titleBoxWrapperStyles = function titleBoxWrapperStyles(_ref) {
22
24
  var breakpoint = _ref.breakpoint,
23
- titleBoxBgColor = _ref.titleBoxBgColor;
24
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n bottom: 0;\n width: 100%;\n background-color: ", ";\n color: inherit;\n cursor: inherit;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n justify-content: center;\n ", "\n"])), token('elevation.surface', rgba(titleBoxBgColor && HEX_REGEX.test(titleBoxBgColor) ? titleBoxBgColor : N0, 0.8)), generateResponsiveStyles(breakpoint));
25
+ titleBoxBgColor = _ref.titleBoxBgColor,
26
+ theme = _ref.theme;
27
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n bottom: 0;\n width: 100%;\n background-color: ", ";\n color: ", ";\n cursor: inherit;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n justify-content: center;\n ", "\n"])), themed({
28
+ light: "var(--ds-surface, ".concat(rgba(titleBoxBgColor && HEX_REGEX.test(titleBoxBgColor) ? titleBoxBgColor : N0, 1), ")"),
29
+ dark: "var(--ds-surface, ".concat(rgba( // theme does not contain this color, use constant instead
30
+ titleBoxBgColor && HEX_REGEX.test(titleBoxBgColor) ? titleBoxBgColor : BACKGROUND_COLOR_DARK, 1), ")")
31
+ })({
32
+ theme: theme
33
+ }), themed({
34
+ light: "var(--ds-text, ".concat(N800, ")"),
35
+ dark: "var(--ds-text, ".concat(TEXT_COLOR_DARK, ")")
36
+ })({
37
+ theme: theme
38
+ }), generateResponsiveStyles(breakpoint));
25
39
  };
26
40
  titleBoxWrapperStyles.displayName = 'TitleBoxWrapper';
27
- var infoStyles = "white-space: nowrap;\n overflow: hidden;";
41
+ var infoStyles = "white-space: nowrap;overflow: hidden;";
28
42
  var iconOverlapStyles = "padding-right: 10px;";
29
43
  export var titleBoxHeaderStyles = function titleBoxHeaderStyles(_ref2) {
30
44
  var hasIconOverlap = _ref2.hasIconOverlap;
@@ -1,14 +1,17 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
3
  import { errorMessageWrapperStyles, titleBoxFooterStyles, titleBoxHeaderStyles, titleBoxIconStyles, titleBoxWrapperStyles } from './styles';
4
+ import { useGlobalTheme } from '@atlaskit/theme/components';
4
5
  export var TitleBoxWrapper = function TitleBoxWrapper(props) {
5
6
  var breakpoint = props.breakpoint,
6
7
  titleBoxBgColor = props.titleBoxBgColor;
8
+ var theme = useGlobalTheme();
7
9
  return jsx("div", {
8
10
  id: "titleBoxWrapper",
9
11
  css: titleBoxWrapperStyles({
10
12
  breakpoint: breakpoint,
11
- titleBoxBgColor: titleBoxBgColor
13
+ titleBoxBgColor: titleBoxBgColor,
14
+ theme: theme
12
15
  })
13
16
  }, props.children);
14
17
  };
@@ -14,7 +14,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
14
14
  /** @jsx jsx */
15
15
  import { Component } from 'react';
16
16
  import { css, jsx } from '@emotion/react';
17
- import { token } from '@atlaskit/tokens';
18
17
  import WarningIcon from '@atlaskit/icon/glyph/editor/warning';
19
18
  import { N20, N800, Y500 } from '@atlaskit/theme/colors';
20
19
  import { fontSize } from '@atlaskit/theme/constants';
@@ -56,7 +55,7 @@ var wrapperStyles = function wrapperStyles() {
56
55
  var dimensions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultImageCardDimensions;
57
56
 
58
57
  try {
59
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", ";\n ", ";\n background: ", ";\n color: ", ";\n max-height: 100%;\n max-width: 100%;\n ", ";\n display: flex;\n flex-direction: column;\n\n p {\n font-size: ", "px;\n text-align: center;\n display: ", ";\n }\n "])), center, borderRadius, token('color.background.neutral', N20), token('color.text.subtle', N800), getConvertedDimension(dimensions), fontSize(), shouldShowText(getConvertedDimension(dimensions)) ? 'block' : 'none');
58
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", ";\n ", ";\n background: ", ";\n color: ", ";\n max-height: 100%;\n max-width: 100%;\n ", ";\n display: flex;\n flex-direction: column;\n\n p {\n font-size: ", "px;\n text-align: center;\n display: ", ";\n }\n "])), center, borderRadius, "var(--ds-background-neutral, ".concat(N20, ")"), "var(--ds-text-subtle, ".concat(N800, ")"), getConvertedDimension(dimensions), fontSize(), shouldShowText(getConvertedDimension(dimensions)) ? 'block' : 'none');
60
59
  } catch (e) {
61
60
  return null;
62
61
  }
@@ -84,7 +83,7 @@ export var UnhandledErrorCard = /*#__PURE__*/function (_Component) {
84
83
  onClick: onClick
85
84
  }, jsx(WarningIcon, {
86
85
  label: "Error",
87
- primaryColor: token('color.icon.warning', Y500),
86
+ primaryColor: "var(--ds-icon-warning, ".concat(Y500, ")"),
88
87
  size: "medium"
89
88
  }), jsx("p", null, "We couldn't load this content"));
90
89
  }
@@ -89,7 +89,7 @@ var WrappedMediaInlineAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Com
89
89
  _defineProperty(WrappedMediaInlineAnalyticsErrorBoundary, "displayName", 'MediaInlineAnalyticsErrorBoundary');
90
90
 
91
91
  var packageName = "@atlaskit/media-card";
92
- var packageVersion = "74.4.0";
92
+ var packageVersion = "74.5.0";
93
93
  var MediaInlineAnalyticsErrorBoundary = withMediaAnalyticsContext({
94
94
  packageVersion: packageVersion,
95
95
  packageName: packageName,
@@ -15,7 +15,8 @@ var relevantFlags = {
15
15
  observedWidth: true,
16
16
  mediaInline: false,
17
17
  folderUploads: false,
18
- memoryCacheLogging: true
18
+ memoryCacheLogging: true,
19
+ fetchFileStateAfterUpload: true
19
20
  };
20
21
  export var LOGGED_FEATURE_FLAGS = filterFeatureFlagNames(relevantFlags);
21
22
  export var LOGGED_FEATURE_FLAG_KEYS = filterFeatureFlagKeysAllProducts(relevantFlags);
@@ -4,7 +4,6 @@ var _templateObject, _templateObject2;
4
4
 
5
5
  import { css } from '@emotion/react';
6
6
  import { N500, N0 } from '@atlaskit/theme/colors';
7
- import { token } from '@atlaskit/tokens';
8
7
  import { borderRadius, size, center } from '@atlaskit/media-ui';
9
8
  import { rootStyles } from '../../card/styles';
10
9
  import { rgba } from '../../card/styles/mixins';
@@ -17,10 +16,10 @@ export var CardActionIconButtonVariant;
17
16
  })(CardActionIconButtonVariant || (CardActionIconButtonVariant = {}));
18
17
 
19
18
  var getVariantStyles = function getVariantStyles(variant) {
20
- return variant === 'filled' ? "\n background-color: ".concat(token('elevation.surface.overlay', rgba(N0, 0.8)), ";\n margin-right: 8px;\n\n &:last-child {\n margin-right: 0;\n }\n\n &:hover {\n background-color: ").concat(token('elevation.surface.overlay.hovered', rgba(N0, 0.6)), "\n }\n ") : "\n &:hover {\n background-color: ".concat(token('color.background.neutral.subtle.hovered', 'rgba(9, 30, 66, 0.06)'), ";\n }\n ");
19
+ return variant === 'filled' ? "\n background-color: ".concat("var(--ds-surface-overlay, ".concat(rgba(N0, 0.8), ")"), ";\n margin-right: 8px;\n\n &:last-child {\n margin-right: 0;\n }\n\n &:hover {\n background-color: ", "var(--ds-surface-overlay-hovered, ".concat(rgba(N0, 0.6), ")"), "\n }\n ") : "\n &:hover {\n background-color: ".concat("var(--ds-background-neutral-subtle-hovered, rgba(9, 30, 66, 0.06))", ";\n }\n ");
21
20
  };
22
21
 
23
22
  export var cardActionButtonStyles = function cardActionButtonStyles(_ref) {
24
23
  var variant = _ref.variant;
25
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n color: ", ";\n\n &:hover {\n cursor: pointer;\n }\n\n ", "\n"])), center, borderRadius, size(26), token('color.icon', N500), getVariantStyles(variant));
24
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n color: ", ";\n\n &:hover {\n cursor: pointer;\n }\n\n ", "\n"])), center, borderRadius, size(26), "var(--ds-icon, ".concat(N500, ")"), getVariantStyles(variant));
26
25
  };
@@ -2,6 +2,5 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject;
4
4
 
5
- import { token } from '@atlaskit/tokens';
6
5
  import { css } from '@emotion/react';
7
- export var errorIconWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n color: ", ";\n"])), token('color.icon.warning', '#ff991f'));
6
+ export var errorIconWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n color: ", ";\n"])), "var(--ds-icon-warning, #ff991f)");
@@ -3,7 +3,6 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
3
3
  var _templateObject, _templateObject2, _templateObject3;
4
4
 
5
5
  import { css, keyframes } from '@emotion/react';
6
- import { token } from '@atlaskit/tokens';
7
6
  import { center, borderRadius } from '@atlaskit/media-ui';
8
7
  import { themed } from '@atlaskit/theme/components';
9
8
  import { N20, DN50, N50, DN100 } from '@atlaskit/theme/colors';
@@ -12,13 +11,13 @@ export var wrapperStyles = function wrapperStyles(_ref) {
12
11
  var dimensions = _ref.dimensions,
13
12
  theme = _ref.theme;
14
13
  return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n background: ", ";\n color: ", ";\n ", "\n max-height: 100%;\n max-width: 100%;\n width: ", ";\n height: ", ";\n"])), center, themed({
15
- light: token('color.background.neutral', N20),
16
- dark: token('color.background.neutral', DN50)
14
+ light: "var(--ds-background-neutral, ".concat(N20, ")"),
15
+ dark: "var(--ds-background-neutral, ".concat(DN50, ")")
17
16
  })({
18
17
  theme: theme
19
18
  }), themed({
20
- light: token('color.icon', N50),
21
- dark: token('color.icon', DN100)
19
+ light: "var(--ds-icon, ".concat(N50, ")"),
20
+ dark: "var(--ds-icon, ".concat(DN100, ")")
22
21
  })({
23
22
  theme: theme
24
23
  }), borderRadius, dimensions.width, dimensions.height);
@@ -9,7 +9,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata, LOGGED_FEATURE_FLAG_KE
9
9
  import { MediaCardError } from '../errors';
10
10
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
11
11
  var packageName = "@atlaskit/media-card";
12
- var packageVersion = "74.4.0";
12
+ var packageVersion = "74.5.0";
13
13
  var concurrentExperience;
14
14
 
15
15
  var getExperience = function getExperience(id) {
@@ -44,18 +44,10 @@ var ViewportObserver = function ViewportObserver(_ref) {
44
44
  rootMargin: "".concat(ABS_VIEWPORT_ANCHOR_OFFSET_TOP, "px")
45
45
  });
46
46
  } catch (error) {
47
- var _error$message;
48
-
49
- var errorMessage = "Failed to construct 'IntersectionObserver': member root is not of type Element";
50
-
51
- if ((_error$message = error.message) !== null && _error$message !== void 0 && _error$message.includes(errorMessage)) {
52
- intersectionObserver = new IntersectionObserver(createIntersectionObserverCallback(onVisible), {
53
- root: null,
54
- rootMargin: "".concat(ABS_VIEWPORT_ANCHOR_OFFSET_TOP, "px")
55
- });
56
- } else {
57
- throw error;
58
- }
47
+ intersectionObserver = new IntersectionObserver(createIntersectionObserverCallback(onVisible), {
48
+ root: null,
49
+ rootMargin: "".concat(ABS_VIEWPORT_ANCHOR_OFFSET_TOP, "px")
50
+ });
59
51
  }
60
52
 
61
53
  cardEl && intersectionObserver.observe(cardEl);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "74.4.0",
3
+ "version": "74.5.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,4 +1,5 @@
1
1
  import { FileStatus } from '@atlaskit/media-client';
2
+ import { MediaFeatureFlags } from '@atlaskit/media-common';
2
3
  import { CardStatus, FilePreviewStatus } from '../types';
3
4
  export declare const isFinalCardStatus: (status: CardStatus) => boolean;
4
- export declare const getCardStatus: (fileStatus: FileStatus, { hasFilesize, isPreviewable, hasPreview }: FilePreviewStatus) => CardStatus;
5
+ export declare const getCardStatus: (fileStatus: FileStatus, filePreviewStatus: FilePreviewStatus, featureFlags?: MediaFeatureFlags | undefined) => CardStatus;
@@ -1,5 +1,5 @@
1
1
  import { NewFileExperienceWrapperProps } from './types';
2
2
  export declare const newFileExperienceWrapperStyles: {
3
- ({ breakpoint, dimensions, appearance, disableOverlay, displayBackground, selected, isPlayButtonClickable, isTickBoxSelectable, shouldDisplayTooltip, mediaCardCursor, }: NewFileExperienceWrapperProps): import("@emotion/react").SerializedStyles;
3
+ ({ breakpoint, dimensions, appearance, disableOverlay, displayBackground, selected, isPlayButtonClickable, isTickBoxSelectable, shouldDisplayTooltip, mediaCardCursor, theme, }: NewFileExperienceWrapperProps): import("@emotion/react").SerializedStyles;
4
4
  displayName: string;
5
5
  };
@@ -3,6 +3,7 @@ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
3
  import { CardDimensions, CardAppearance } from '../../../types';
4
4
  import { Breakpoint } from '../common';
5
5
  import { MediaCardCursor } from '../../../types';
6
+ import { GlobalThemeTokens } from '@atlaskit/theme/components';
6
7
  export interface NewFileExperienceWrapperProps {
7
8
  testId?: string;
8
9
  breakpoint: Breakpoint;
@@ -20,4 +21,5 @@ export interface NewFileExperienceWrapperProps {
20
21
  shouldDisplayTooltip: boolean;
21
22
  innerRef?: RefObject<HTMLDivElement>;
22
23
  children?: JSX.Element;
24
+ theme?: GlobalThemeTokens;
23
25
  }
@@ -1,6 +1,6 @@
1
1
  import { TitleBoxFooterProps, TitleBoxHeaderProps, TitleBoxWrapperProps } from './types';
2
2
  export declare const titleBoxWrapperStyles: {
3
- ({ breakpoint, titleBoxBgColor, }: TitleBoxWrapperProps): import("@emotion/react").SerializedStyles;
3
+ ({ breakpoint, titleBoxBgColor, theme, }: TitleBoxWrapperProps): import("@emotion/react").SerializedStyles;
4
4
  displayName: string;
5
5
  };
6
6
  export declare const titleBoxHeaderStyles: {
@@ -2,6 +2,7 @@
2
2
  import { MessageDescriptor } from 'react-intl-next';
3
3
  import { Breakpoint } from '../common';
4
4
  import { TitleBoxIcon as TitleBoxIconType } from '../../../types';
5
+ import { GlobalThemeTokens } from '@atlaskit/theme/components';
5
6
  export declare type TitleBoxProps = {
6
7
  name: string;
7
8
  breakpoint: Breakpoint;
@@ -16,6 +17,7 @@ export declare type TitleBoxWrapperProps = {
16
17
  breakpoint: Breakpoint;
17
18
  titleBoxBgColor?: string;
18
19
  children?: JSX.Element | JSX.Element[] | any;
20
+ theme?: GlobalThemeTokens;
19
21
  };
20
22
  export declare type TitleBoxFooterProps = {
21
23
  hasIconOverlap: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "74.4.0",
3
+ "version": "74.5.0",
4
4
  "description": "Includes all media card related components, CardView, CardViewSmall, Card...",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -32,10 +32,10 @@
32
32
  "@atlaskit/dropdown-menu": "^11.5.0",
33
33
  "@atlaskit/editor-shared-styles": "^2.3.0",
34
34
  "@atlaskit/icon": "^21.11.0",
35
- "@atlaskit/media-client": "^19.1.0",
36
- "@atlaskit/media-common": "^2.18.0",
37
- "@atlaskit/media-ui": "^22.2.0",
38
- "@atlaskit/media-viewer": "^47.3.0",
35
+ "@atlaskit/media-client": "^20.0.0",
36
+ "@atlaskit/media-common": "^2.19.0",
37
+ "@atlaskit/media-ui": "^22.3.0",
38
+ "@atlaskit/media-viewer": "^47.4.0",
39
39
  "@atlaskit/spinner": "^15.3.0",
40
40
  "@atlaskit/theme": "^12.2.0",
41
41
  "@atlaskit/tokens": "^0.13.0",
@@ -54,14 +54,14 @@
54
54
  "react-intl-next": "npm:react-intl@^5.18.1"
55
55
  },
56
56
  "devDependencies": {
57
- "@atlaskit/analytics-listeners": "^8.3.0",
58
- "@atlaskit/analytics-namespaced-context": "^6.5.0",
57
+ "@atlaskit/analytics-listeners": "^8.5.0",
58
+ "@atlaskit/analytics-namespaced-context": "^6.6.0",
59
59
  "@atlaskit/button": "^16.5.0",
60
60
  "@atlaskit/checkbox": "^12.4.0",
61
61
  "@atlaskit/docs": "*",
62
62
  "@atlaskit/inline-message": "^11.4.0",
63
63
  "@atlaskit/media-core": "^34.0.0",
64
- "@atlaskit/media-picker": "^64.1.0",
64
+ "@atlaskit/media-picker": "^64.2.0",
65
65
  "@atlaskit/media-test-helpers": "^30.1.0",
66
66
  "@atlaskit/radio": "^5.4.0",
67
67
  "@atlaskit/range": "^7.0.0",
package/report.api.md CHANGED
@@ -8,6 +8,7 @@
8
8
  ### Table of contents
9
9
 
10
10
  - [Main Entry Types](#main-entry-types)
11
+ - [Peer Dependencies](#peer-dependencies)
11
12
 
12
13
  ### Main Entry Types
13
14
 
@@ -389,3 +390,18 @@ export type TitleBoxIcon = 'LockFilledIcon';
389
390
  ```
390
391
 
391
392
  <!--SECTION END: Main Entry Types-->
393
+
394
+ ### Peer Dependencies
395
+
396
+ <!--SECTION START: Peer Dependencies-->
397
+
398
+ ```json
399
+ {
400
+ "@emotion/react": "^11.7.1",
401
+ "react": "^16.8.0",
402
+ "react-dom": "^16.8.0",
403
+ "react-intl-next": "npm:react-intl@^5.18.1"
404
+ }
405
+ ```
406
+
407
+ <!--SECTION END: Peer Dependencies-->