@atlaskit/media-card 74.4.0 → 74.4.1

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 (82) hide show
  1. package/CHANGELOG.md +7 -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/media-card-analytics-error-boundary.js +1 -1
  8. package/dist/cjs/card/styles/index.js +1 -3
  9. package/dist/cjs/card/ui/blanket/styles.js +1 -3
  10. package/dist/cjs/card/ui/iconMessage/styles.js +1 -3
  11. package/dist/cjs/card/ui/loadingRateLimited/styles.js +1 -3
  12. package/dist/cjs/card/ui/newFileExperience/newFileExperienceWrapper.js +5 -1
  13. package/dist/cjs/card/ui/newFileExperience/styles.js +12 -4
  14. package/dist/cjs/card/ui/playButton/styles.js +2 -4
  15. package/dist/cjs/card/ui/styles.js +1 -3
  16. package/dist/cjs/card/ui/tickBox/styles.js +2 -4
  17. package/dist/cjs/card/ui/titleBox/failedTitleBox.js +1 -3
  18. package/dist/cjs/card/ui/titleBox/styles.js +19 -5
  19. package/dist/cjs/card/ui/titleBox/titleBoxComponents.js +5 -1
  20. package/dist/cjs/card/ui/unhandledErrorCard/index.js +2 -4
  21. package/dist/cjs/inline/mediaInlineAnalyticsErrorBoundary.js +1 -1
  22. package/dist/cjs/utils/cardActions/styles.js +2 -4
  23. package/dist/cjs/utils/errorIcon/styles.js +1 -3
  24. package/dist/cjs/utils/lightCards/styles.js +4 -6
  25. package/dist/cjs/utils/ufoExperiences.js +1 -1
  26. package/dist/cjs/version.json +1 -1
  27. package/dist/es2019/card/card.js +1 -1
  28. package/dist/es2019/card/cardImageView/cardOverlay/index.js +1 -2
  29. package/dist/es2019/card/cardImageView/cardOverlay/styles.js +20 -21
  30. package/dist/es2019/card/cardImageView/fileCardImageView.js +1 -2
  31. package/dist/es2019/card/cardImageView/styles.js +7 -8
  32. package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
  33. package/dist/es2019/card/styles/index.js +1 -2
  34. package/dist/es2019/card/ui/blanket/styles.js +1 -2
  35. package/dist/es2019/card/ui/iconMessage/styles.js +1 -2
  36. package/dist/es2019/card/ui/loadingRateLimited/styles.js +1 -2
  37. package/dist/es2019/card/ui/newFileExperience/newFileExperienceWrapper.js +4 -1
  38. package/dist/es2019/card/ui/newFileExperience/styles.js +10 -3
  39. package/dist/es2019/card/ui/playButton/styles.js +2 -3
  40. package/dist/es2019/card/ui/styles.js +1 -2
  41. package/dist/es2019/card/ui/tickBox/styles.js +4 -5
  42. package/dist/es2019/card/ui/titleBox/failedTitleBox.js +1 -2
  43. package/dist/es2019/card/ui/titleBox/styles.js +20 -7
  44. package/dist/es2019/card/ui/titleBox/titleBoxComponents.js +4 -1
  45. package/dist/es2019/card/ui/unhandledErrorCard/index.js +3 -4
  46. package/dist/es2019/inline/mediaInlineAnalyticsErrorBoundary.js +1 -1
  47. package/dist/es2019/utils/cardActions/styles.js +4 -5
  48. package/dist/es2019/utils/errorIcon/styles.js +1 -2
  49. package/dist/es2019/utils/lightCards/styles.js +4 -5
  50. package/dist/es2019/utils/ufoExperiences.js +1 -1
  51. package/dist/es2019/version.json +1 -1
  52. package/dist/esm/card/card.js +1 -1
  53. package/dist/esm/card/cardImageView/cardOverlay/index.js +1 -2
  54. package/dist/esm/card/cardImageView/cardOverlay/styles.js +6 -7
  55. package/dist/esm/card/cardImageView/fileCardImageView.js +1 -2
  56. package/dist/esm/card/cardImageView/styles.js +7 -8
  57. package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
  58. package/dist/esm/card/styles/index.js +1 -2
  59. package/dist/esm/card/ui/blanket/styles.js +1 -2
  60. package/dist/esm/card/ui/iconMessage/styles.js +1 -2
  61. package/dist/esm/card/ui/loadingRateLimited/styles.js +1 -2
  62. package/dist/esm/card/ui/newFileExperience/newFileExperienceWrapper.js +4 -1
  63. package/dist/esm/card/ui/newFileExperience/styles.js +10 -3
  64. package/dist/esm/card/ui/playButton/styles.js +2 -3
  65. package/dist/esm/card/ui/styles.js +1 -2
  66. package/dist/esm/card/ui/tickBox/styles.js +2 -3
  67. package/dist/esm/card/ui/titleBox/failedTitleBox.js +1 -2
  68. package/dist/esm/card/ui/titleBox/styles.js +19 -5
  69. package/dist/esm/card/ui/titleBox/titleBoxComponents.js +4 -1
  70. package/dist/esm/card/ui/unhandledErrorCard/index.js +2 -3
  71. package/dist/esm/inline/mediaInlineAnalyticsErrorBoundary.js +1 -1
  72. package/dist/esm/utils/cardActions/styles.js +2 -3
  73. package/dist/esm/utils/errorIcon/styles.js +1 -2
  74. package/dist/esm/utils/lightCards/styles.js +4 -5
  75. package/dist/esm/utils/ufoExperiences.js +1 -1
  76. package/dist/esm/version.json +1 -1
  77. package/dist/types/card/ui/newFileExperience/styles.d.ts +1 -1
  78. package/dist/types/card/ui/newFileExperience/types.d.ts +2 -0
  79. package/dist/types/card/ui/titleBox/styles.d.ts +1 -1
  80. package/dist/types/card/ui/titleBox/types.d.ts +2 -0
  81. package/package.json +2 -2
  82. package/report.api.md +16 -0
@@ -1,5 +1,4 @@
1
1
  import { css, keyframes } from '@emotion/react';
2
- import { token } from '@atlaskit/tokens';
3
2
  import { center, borderRadius } from '@atlaskit/media-ui';
4
3
  import { themed } from '@atlaskit/theme/components';
5
4
  import { N20, DN50, N50, DN100 } from '@atlaskit/theme/colors';
@@ -22,14 +21,14 @@ export const wrapperStyles = ({
22
21
  }) => css`
23
22
  ${center}
24
23
  background: ${themed({
25
- light: token('color.background.neutral', N20),
26
- dark: token('color.background.neutral', DN50)
24
+ light: `var(--ds-background-neutral, ${N20})`,
25
+ dark: `var(--ds-background-neutral, ${DN50})`
27
26
  })({
28
27
  theme
29
28
  })};
30
29
  color: ${themed({
31
- light: token('color.icon', N50),
32
- dark: token('color.icon', DN100)
30
+ light: `var(--ds-icon, ${N50})`,
31
+ dark: `var(--ds-icon, ${DN100})`
33
32
  })({
34
33
  theme
35
34
  })};
@@ -3,7 +3,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata, LOGGED_FEATURE_FLAG_KE
3
3
  import { MediaCardError } from '../errors';
4
4
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
5
5
  const packageName = "@atlaskit/media-card";
6
- const packageVersion = "74.4.0";
6
+ const packageVersion = "74.4.1";
7
7
  let concurrentExperience;
8
8
 
9
9
  const getExperience = id => {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "74.4.0",
3
+ "version": "74.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -44,7 +44,7 @@ import { getMediaCardCursor } from '../utils/getMediaCardCursor';
44
44
  import { completeUfoExperience, startUfoExperience } from '../utils/ufoExperiences';
45
45
  import { generateUniqueId } from '../utils/generateUniqueId';
46
46
  var packageName = "@atlaskit/media-card";
47
- var packageVersion = "74.4.0";
47
+ var packageVersion = "74.4.1";
48
48
  export var CardBase = /*#__PURE__*/function (_Component) {
49
49
  _inherits(CardBase, _Component);
50
50
 
@@ -15,7 +15,6 @@ import { jsx } from '@emotion/react';
15
15
  import React from 'react';
16
16
  import { Component } from 'react';
17
17
  import cx from 'classnames';
18
- import { token } from '@atlaskit/tokens';
19
18
  import TickIcon from '@atlaskit/icon/glyph/check';
20
19
  import { Ellipsify } from '@atlaskit/media-ui'; // We dont require things directly from "utils" to avoid circular dependencies
21
20
 
@@ -94,7 +93,7 @@ export var CardOverlay = /*#__PURE__*/function (_Component) {
94
93
  selected = _this$props2.selected,
95
94
  actions = _this$props2.actions;
96
95
  var titleText = resolveTitleText(cardStatus, mediaName, error, selected);
97
- var menuTriggerColor = !persistent ? token('color.icon.inverse', 'white') : undefined;
96
+ var menuTriggerColor = !persistent ? "var(--ds-icon-inverse, white)" : undefined;
98
97
  return jsx(Overlay, {
99
98
  hasError: !!error,
100
99
  noHover: noHover,
@@ -12,9 +12,8 @@ import { css } from '@emotion/react';
12
12
  import { borderRadius, size, ellipsis, absolute } from '@atlaskit/media-ui';
13
13
  import { themed } from '@atlaskit/theme/components';
14
14
  import * as colors from '@atlaskit/theme/colors';
15
- import { token } from '@atlaskit/tokens';
16
15
  import { rgba, easeOutCubic, transition, antialiased } from '../../styles';
17
- export var tickBoxStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n background-color: ", ";\n position: absolute;\n top: 8px;\n right: 8px;\n border-radius: 20px;\n color: ", "; /* CLEANUP - TODO FIL-3884: Align color with new design */\n display: flex;\n opacity: 0;\n\n &.selected {\n opacity: 1;\n color: ", ";\n background-color: ", "; /* CLEANUP - TODO FIL-3884: Align with tickbox icons */\n }\n\n /* Enforce dimensions of \"tick\" icon */\n svg {\n position: absolute;\n width: 14px;\n }\n"])), size(14), transition(), token('elevation.surface.overlay', rgba('#ffffff', 0.5)), token('color.icon.subtle', '#798599'), token('color.icon.inverse', 'white'), token('color.icon.selected', '#0052cc'));
16
+ export var tickBoxStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n background-color: ", ";\n position: absolute;\n top: 8px;\n right: 8px;\n border-radius: 20px;\n color: ", "; /* CLEANUP - TODO FIL-3884: Align color with new design */\n display: flex;\n opacity: 0;\n\n &.selected {\n opacity: 1;\n color: ", ";\n background-color: ", "; /* CLEANUP - TODO FIL-3884: Align with tickbox icons */\n }\n\n /* Enforce dimensions of \"tick\" icon */\n svg {\n position: absolute;\n width: 14px;\n }\n"])), size(14), transition(), "var(--ds-surface-overlay, ".concat(rgba('#ffffff', 0.5), ")"), "var(--ds-icon-subtle, #798599)", "var(--ds-icon-inverse, white)", "var(--ds-icon-selected, #0052cc)");
18
17
 
19
18
  var getOverlayStyles = function getOverlayStyles(_ref) {
20
19
  var hasError = _ref.hasError,
@@ -26,22 +25,22 @@ var getOverlayStyles = function getOverlayStyles(_ref) {
26
25
  };
27
26
 
28
27
  export var overlayStyles = function overlayStyles(props) {
29
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", " display: flex;\n justify-content: space-between;\n flex-direction: column;\n background: transparent;\n transition: 0.3s background ", ", 0.3s border-color;\n padding: 16px;\n\n ", "\n &:not(.persistent):hover, &.active {\n .top-row {\n .title {\n color: ", ";\n }\n }\n }\n\n &.noHover:hover {\n .top-row {\n .title {\n color: ", ";\n }\n }\n }\n\n .file-type-icon {\n display: block;\n }\n\n &:not(.persistent) {\n &:not(.error, .noHover):hover {\n background-color: ", ";\n }\n\n &.selectable {\n &.selected {\n background-color: ", ";\n\n &:hover {\n /* CLEANUP - TODO FIL-3884 add new overlay with rgba(colors.N900, 0.16) */\n background-color: ", ";\n }\n\n .title,\n .bottom-row,\n .file-size {\n color: ", ";\n }\n }\n }\n }\n\n &.persistent {\n &:not(.active) {\n overflow: hidden;\n }\n\n .top-row {\n .title {\n transition: opacity 0.3s;\n opacity: 0;\n color: ", ";\n visibility: hidden;\n }\n }\n\n .bottom-row {\n opacity: 0;\n transition: transform 0.2s, opacity 0.5s;\n /* This is the height of the overlay footer, needs to be present now since the parent uses flex and 100% doesn't look right anymore */\n transform: translateY(35px);\n\n .file-type-icon {\n display: none;\n }\n\n .file-size {\n color: ", ";\n display: none;\n }\n }\n\n &:hover,\n &.active {\n background-color: ", ";\n\n .title {\n opacity: 1;\n visibility: visible;\n }\n\n .file-type-icon,\n .file-size {\n display: block;\n }\n\n .bottom-row {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n /* Selectable */\n &.selectable {\n &:hover {\n .tickbox {\n opacity: 1;\n }\n }\n\n &.selected {\n .tickbox {\n background-color: ", " !important;\n color: ", ";\n }\n }\n }\n }\n\n &.error {\n .top-row {\n overflow: visible;\n }\n &:hover,\n &.active {\n .top-row {\n .title {\n color: ", ";\n }\n }\n }\n }\n"])), size(), absolute(), borderRadius, easeOutCubic, getOverlayStyles(props), token('color.text.information', colors.B400), token('color.text', colors.N800), token('color.background.neutral.hovered', rgba(colors.N900, 0.06)), token('color.background.selected', colors.B200), token('color.background.selected.hovered', rgba(colors.N900, 0.16)), token('color.text', colors.N900), token('color.text', 'white'), token('color.text', 'white'), token('color.interaction.hovered', rgba(colors.N900, 0.5)), token('color.background.selected.bold', colors.B200), token('color.icon.inverse', 'white'), token('color.text', colors.N800));
28
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", " display: flex;\n justify-content: space-between;\n flex-direction: column;\n background: transparent;\n transition: 0.3s background ", ", 0.3s border-color;\n padding: 16px;\n\n ", "\n &:not(.persistent):hover, &.active {\n .top-row {\n .title {\n color: ", ";\n }\n }\n }\n\n &.noHover:hover {\n .top-row {\n .title {\n color: ", ";\n }\n }\n }\n\n .file-type-icon {\n display: block;\n }\n\n &:not(.persistent) {\n &:not(.error, .noHover):hover {\n background-color: ", ";\n }\n\n &.selectable {\n &.selected {\n background-color: ", ";\n\n &:hover {\n /* CLEANUP - TODO FIL-3884 add new overlay with rgba(colors.N900, 0.16) */\n background-color: ", ";\n }\n\n .title,\n .bottom-row,\n .file-size {\n color: ", ";\n }\n }\n }\n }\n\n &.persistent {\n &:not(.active) {\n overflow: hidden;\n }\n\n .top-row {\n .title {\n transition: opacity 0.3s;\n opacity: 0;\n color: ", ";\n visibility: hidden;\n }\n }\n\n .bottom-row {\n opacity: 0;\n transition: transform 0.2s, opacity 0.5s;\n /* This is the height of the overlay footer, needs to be present now since the parent uses flex and 100% doesn't look right anymore */\n transform: translateY(35px);\n\n .file-type-icon {\n display: none;\n }\n\n .file-size {\n color: ", ";\n display: none;\n }\n }\n\n &:hover,\n &.active {\n background-color: ", ";\n\n .title {\n opacity: 1;\n visibility: visible;\n }\n\n .file-type-icon,\n .file-size {\n display: block;\n }\n\n .bottom-row {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n /* Selectable */\n &.selectable {\n &:hover {\n .tickbox {\n opacity: 1;\n }\n }\n\n &.selected {\n .tickbox {\n background-color: ", " !important;\n color: ", ";\n }\n }\n }\n }\n\n &.error {\n .top-row {\n overflow: visible;\n }\n &:hover,\n &.active {\n .top-row {\n .title {\n color: ", ";\n }\n }\n }\n }\n"])), size(), absolute(), borderRadius, easeOutCubic, getOverlayStyles(props), "var(--ds-text-information, ".concat(colors.B400, ")"), "var(--ds-text, ".concat(colors.N800, ")"), "var(--ds-background-neutral-hovered, ".concat(rgba(colors.N900, 0.06), ")"), "var(--ds-background-selected, ".concat(colors.B200, ")"), "var(--ds-background-selected-hovered, ".concat(rgba(colors.N900, 0.16), ")"), "var(--ds-text, ".concat(colors.N900, ")"), "var(--ds-text, white)", "var(--ds-text, white)", "var(--ds-interaction-hovered, ".concat(rgba(colors.N900, 0.5), ")"), "var(--ds-background-selected-bold, ".concat(colors.B200, ")"), "var(--ds-icon-inverse, white)", "var(--ds-text, ".concat(colors.N800, ")"));
30
29
  };
31
30
  export var errorLineStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 24px;\n display: flex;\n align-items: center;\n"])));
32
31
  export var leftColumnStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n position: relative;\n box-sizing: border-box;\n vertical-align: middle;\n"])));
33
32
  export var topRowStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral([""])));
34
33
  export var bottomRowStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n height: 16px;\n"])));
35
34
  export var rightColumnStyles = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral([""])));
36
- export var errorMessageStyles = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n ", " display: inline-block;\n vertical-align: middle;\n font-weight: bold;\n color: ", ";\n font-size: 12px;\n line-height: 15px;\n overflow: hidden;\n max-width: 'calc(100% - 24px)';\n text-overflow: ellipsis;\n white-space: nowrap;\n margin: auto 3px;\n"])), antialiased, token('color.text.subtlest', colors.N70));
35
+ export var errorMessageStyles = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n ", " display: inline-block;\n vertical-align: middle;\n font-weight: bold;\n color: ", ";\n font-size: 12px;\n line-height: 15px;\n overflow: hidden;\n max-width: 'calc(100% - 24px)';\n text-overflow: ellipsis;\n white-space: nowrap;\n margin: auto 3px;\n"])), antialiased, "var(--ds-text-subtlest, ".concat(colors.N70, ")"));
37
36
  export var altWrapperStyles = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ", "\n font-weight: normal;\n"])), errorMessageStyles);
38
37
  export var titleWrapperStyles = function titleWrapperStyles(theme) {
39
38
  return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n word-wrap: break-word;\n color: ", ";\n font-size: 12px;\n line-height: 18px;\n"])), themed({
40
- light: token('color.text', colors.N800),
41
- dark: token('color.text', colors.DN900)
39
+ light: "var(--ds-text, ".concat(colors.N800, ")"),
40
+ dark: "var(--ds-text, ".concat(colors.DN900, ")")
42
41
  })({
43
42
  theme: theme
44
43
  }));
45
44
  };
46
- export var subtitleStyles = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", " font-size: 12px;\n color: ", ";\n"])), ellipsis('100px'), token('color.text.subtlest', '#5e6c84'));
45
+ export var subtitleStyles = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", " font-size: 12px;\n color: ", ";\n"])), ellipsis('100px'), "var(--ds-text-subtlest, #5e6c84)");
47
46
  export var metadataStyles = css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
@@ -13,7 +13,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
13
13
  /**@jsx jsx */
14
14
  import { jsx } from '@emotion/react';
15
15
  import React, { Component } from 'react';
16
- import { token } from '@atlaskit/tokens';
17
16
  import { Ellipsify, MediaImage } from '@atlaskit/media-ui';
18
17
  import VidPlayIcon from '@atlaskit/icon/glyph/vid-play';
19
18
  import { CardOverlay } from './cardOverlay';
@@ -233,7 +232,7 @@ export var FileCardImageView = /*#__PURE__*/function (_Component) {
233
232
  css: cardActionsWrapperStyles
234
233
  }, actions ? jsx(CardActions, {
235
234
  actions: actions,
236
- triggerColor: token('color.icon.inverse', 'white')
235
+ triggerColor: "var(--ds-icon-inverse, white)"
237
236
  }) : null))));
238
237
  });
239
238
 
@@ -3,7 +3,6 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
3
3
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
4
4
 
5
5
  import { css } from '@emotion/react';
6
- import { token } from '@atlaskit/tokens';
7
6
  import { absolute, borderRadius, size } from '@atlaskit/media-ui';
8
7
  import { themed } from '@atlaskit/theme/components';
9
8
  import { N20, DN50, N0 } from '@atlaskit/theme/colors';
@@ -18,21 +17,21 @@ var getShadowAttribute = function getShadowAttribute(props) {
18
17
  var getBackgroundColor = function getBackgroundColor(props) {
19
18
  var mediaType = props.mediaType;
20
19
  return "background: ".concat(mediaType === 'image' ? 'transparent' : themed({
21
- light: token('color.background.neutral', N20),
22
- dark: token('color.background.neutral', DN50)
20
+ light: "var(--ds-background-neutral, ".concat(N20, ")"),
21
+ dark: "var(--ds-background-neutral, ".concat(DN50, ")")
23
22
  })(props), ";");
24
23
  };
25
24
 
26
25
  export var wrapperStyles = function wrapperStyles(props) {
27
26
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n ", "\n\n line-height: normal;\n position: relative;\n\n ", "\n\n ", " .wrapper {\n ", ";\n display: block;\n height: inherit;\n position: relative;\n\n .img-wrapper {\n position: relative;\n width: inherit;\n height: inherit;\n overflow: hidden;\n display: block;\n ", "\n }\n }\n"])), rootStyles(), getShadowAttribute(props), borderRadius, getBackgroundColor(props), getSelectedBorderStyle(props), size(), borderRadius, borderRadius);
28
27
  };
29
- export var playIconWrapperStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ", ";\n\n /* we want to override default icon size and hover state */\n &:hover > * {\n width: 64px;\n height: 64px;\n }\n"])), token('color.icon.inverse', 'white'));
30
- export var playIconBackgroundStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: 100%;\n padding: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition-property: width, height;\n transition-duration: 0.1s;\n width: 56px;\n height: 56px;\n"])), token('color.background.neutral.bold', 'rgba(23, 43, 77, 0.7)'));
28
+ export var playIconWrapperStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ", ";\n\n /* we want to override default icon size and hover state */\n &:hover > * {\n width: 64px;\n height: 64px;\n }\n"])), "var(--ds-icon-inverse, white)");
29
+ export var playIconBackgroundStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: 100%;\n padding: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition-property: width, height;\n transition-duration: 0.1s;\n width: 56px;\n height: 56px;\n"])), "var(--ds-background-neutral-bold, rgba(23, 43, 77, 0.7))");
31
30
  var bodyHeight = 26;
32
31
  export var progressBarWrapperStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n height: 100%;\n width: 100%;\n"])));
33
- export var overlayStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", "\n ", "\n border-radius: inherit;\n background-color: ", ";\n"])), absolute(), size(), token('color.blanket', 'rgba(9, 30, 66, 0.5)'));
34
- export var titleStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", " width: 100%;\n padding: 8px;\n color: ", ";\n font-size: 12px;\n line-height: 18px;\n word-wrap: break-word;\n"])), absolute(), token('color.text.inverse', N0));
35
- export var bodyStyles = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n position: absolute;\n bottom: 0;\n width: 100%;\n padding: 8px;\n color: ", ";\n"])), token('color.text.inverse', N0));
32
+ export var overlayStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", "\n ", "\n border-radius: inherit;\n background-color: ", ";\n"])), absolute(), size(), "var(--ds-blanket, rgba(9, 30, 66, 0.5))");
33
+ export var titleStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", " width: 100%;\n padding: 8px;\n color: ", ";\n font-size: 12px;\n line-height: 18px;\n word-wrap: break-word;\n"])), absolute(), "var(--ds-text-inverse, ".concat(N0, ")"));
34
+ export var bodyStyles = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n position: absolute;\n bottom: 0;\n width: 100%;\n padding: 8px;\n color: ", ";\n"])), "var(--ds-text-inverse, ".concat(N0, ")"));
36
35
  /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
37
36
 
38
37
  export var progressWrapperStyles = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n flex-grow: 1;\n\n /*\n force the height to always be 20px (the height of the cancel icon),\n so that the height of the progress bar doesn't jump when cards with\n and without a cancel icon are rendered side-by-side.\n */\n height: ", "px;\n\n /*\n vertically center the progress bar within the 20px, keeping the progress bar full width\n */\n display: flex;\n flex-direction: column;\n justify-content: center;\n"])), bodyHeight);
@@ -105,7 +105,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
105
105
  _defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
106
106
 
107
107
  var packageName = "@atlaskit/media-card";
108
- var packageVersion = "74.4.0";
108
+ var packageVersion = "74.4.1";
109
109
  var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
110
110
  packageVersion: packageVersion,
111
111
  packageName: packageName,
@@ -5,7 +5,6 @@ var _templateObject, _templateObject2;
5
5
  import { css } from '@emotion/react';
6
6
  import { fontFamily } from '@atlaskit/theme/constants';
7
7
  import { fadeIn } from '@atlaskit/media-ui';
8
- import { token } from '@atlaskit/tokens';
9
8
  export { defaultTransitionDuration } from './config';
10
9
  export { antialiased, borderRadiusLeft, capitalize, centerSelf, centerSelfX, centerSelfY, centerX, hexToRgb, rgba, spaceAround, transition, withAppearance } from './mixins';
11
10
  export { easeOutCubic, easeOutExpo } from './easing';
@@ -13,7 +12,7 @@ export { spin } from './animations';
13
12
  export var rootStyles = function rootStyles() {
14
13
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-sizing: border-box;\n font-family: ", ";\n\n * {\n box-sizing: border-box;\n }\n"])), fontFamily());
15
14
  };
16
- export var cardShadow = "\n box-shadow: ".concat(token('elevation.shadow.raised', '0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24)'), ";\n");
15
+ export var cardShadow = "\n box-shadow: ".concat("var(--ds-shadow-raised, 0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24))", ";\n");
17
16
  export var fadeinImageStyles = function fadeinImageStyles() {
18
17
  return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n"])), fadeIn);
19
18
  };
@@ -2,12 +2,11 @@ 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
6
  import { transition } from '../../styles';
8
7
  import { N90A } from '@atlaskit/theme/colors';
9
8
  export var blanketClassName = 'media-card-blanket';
10
- export var fixedBlanketStyles = "background-color: ".concat(token('color.blanket', N90A), ";");
9
+ export var fixedBlanketStyles = "background-color: ".concat("var(--ds-blanket, ".concat(N90A, ")"), ";");
11
10
  export var blanketStyles = function blanketStyles(isFixed) {
12
11
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n position: absolute;\n width: 100%;\n height: 100%;\n max-height: 100%;\n max-width: 100%;\n left: 0;\n top: 0;\n ", "\n"])), transition(), isFixed ? fixedBlanketStyles : '');
13
12
  };
@@ -2,7 +2,6 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
4
4
 
5
- import { token } from '@atlaskit/tokens';
6
5
  import { css, keyframes } from '@emotion/react';
7
6
  import { N300 } from '@atlaskit/theme/colors';
8
7
  var breatheAnimation = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% { opacity: 1}\n 50% { opacity: 0.3 }\n 100% { opacity: 1; }"])));
@@ -11,7 +10,7 @@ var animatedStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplate
11
10
  var getStylesBasedOnProps = function getStylesBasedOnProps(_ref) {
12
11
  var animated = _ref.animated,
13
12
  reducedFont = _ref.reducedFont;
14
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n overflow: hidden;\n opacity: 1;\n font-weight: 450;\n ", "\n color: ", ";\n text-align: center;\n ", "\n margin-bottom: -1em;\n padding: 3px 10px;\n"])), reducedFont ? 'font-size: 0.7em;' : '', token('color.text.subtlest', N300), animated ? animatedStyles : '');
13
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n overflow: hidden;\n opacity: 1;\n font-weight: 450;\n ", "\n color: ", ";\n text-align: center;\n ", "\n margin-bottom: -1em;\n padding: 3px 10px;\n"])), reducedFont ? 'font-size: 0.7em;' : '', "var(--ds-text-subtlest, ".concat(N300, ")"), animated ? animatedStyles : '');
15
14
  };
16
15
 
17
16
  export var iconMessageWrapperStyles = function iconMessageWrapperStyles(props) {
@@ -2,7 +2,6 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
4
4
 
5
- import { token } from '@atlaskit/tokens';
6
5
  import { css } from '@emotion/react';
7
6
  import { generateResponsiveStyles } from '../progressBar/styles';
8
7
  import { N300 } from '@atlaskit/theme/colors';
@@ -11,7 +10,7 @@ export var warningIconWrapperStyles = css(_templateObject2 || (_templateObject2
11
10
  export var loadingRateLimitedTextWrapperStyles = function loadingRateLimitedTextWrapperStyles(_ref) {
12
11
  var breakpoint = _ref.breakpoint,
13
12
  positionBottom = _ref.positionBottom;
14
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-top: 10px;\n overflow: hidden;\n color: ", ";\n display: block;\n width: 100%;\n text-align: center;\n ", "\n"])), token('color.text.subtlest', N300), generateResponsiveStyles(breakpoint, positionBottom, false, 1));
13
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-top: 10px;\n overflow: hidden;\n color: ", ";\n display: block;\n width: 100%;\n text-align: center;\n ", "\n"])), "var(--ds-text-subtlest, ".concat(N300, ")"), generateResponsiveStyles(breakpoint, positionBottom, false, 1));
15
14
  };
16
15
  loadingRateLimitedTextWrapperStyles.displayName = 'LoadingRateLimitedTextWrapper';
17
16
  export var couldntLoadWrapperStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-weight: 550;\n"])));
@@ -2,6 +2,7 @@
2
2
  import { jsx } from '@emotion/react';
3
3
  import { newFileExperienceClassName } from '../../cardConstants';
4
4
  import { newFileExperienceWrapperStyles } from './styles';
5
+ import { useGlobalTheme } from '@atlaskit/theme/components';
5
6
  export var NewFileExperienceWrapper = function NewFileExperienceWrapper(props) {
6
7
  var testId = props.testId,
7
8
  dimensions = props.dimensions,
@@ -17,6 +18,7 @@ export var NewFileExperienceWrapper = function NewFileExperienceWrapper(props) {
17
18
  isPlayButtonClickable = props.isPlayButtonClickable,
18
19
  isTickBoxSelectable = props.isTickBoxSelectable,
19
20
  shouldDisplayTooltip = props.shouldDisplayTooltip;
21
+ var theme = useGlobalTheme();
20
22
  return jsx("div", {
21
23
  id: "newFileExperienceWrapper",
22
24
  className: newFileExperienceClassName,
@@ -31,7 +33,8 @@ export var NewFileExperienceWrapper = function NewFileExperienceWrapper(props) {
31
33
  isPlayButtonClickable: isPlayButtonClickable,
32
34
  isTickBoxSelectable: isTickBoxSelectable,
33
35
  shouldDisplayTooltip: shouldDisplayTooltip,
34
- mediaCardCursor: mediaCardCursor
36
+ mediaCardCursor: mediaCardCursor,
37
+ theme: theme
35
38
  }),
36
39
  ref: innerRef,
37
40
  onClick: onClick,
@@ -6,12 +6,13 @@ import { css } from '@emotion/react';
6
6
  import { fontFamily } from '@atlaskit/theme/constants';
7
7
  import { borderRadius } from '@atlaskit/media-ui';
8
8
  import { N20 } from '@atlaskit/theme/colors';
9
- import { token } from '@atlaskit/tokens';
10
9
  import { hideNativeBrowserTextSelectionStyles } from '@atlaskit/editor-shared-styles/selection';
10
+ import { themed } from '@atlaskit/theme/components';
11
11
  import { transition } from '../../styles';
12
12
  import { fixedBlanketStyles, blanketClassName } from '../blanket/styles';
13
13
  import { fixedActionBarStyles, actionsBarClassName } from '../actionsBar/styles';
14
14
  import { generateResponsiveStyles, getClickablePlayButtonStyles, getCursorStyle, getSelectableTickBoxStyles, getWrapperDimensions, getWrapperShadow } from '../styles';
15
+ var BACKGROUND_COLOR_DARK = '#22272C';
15
16
  export var newFileExperienceWrapperStyles = function newFileExperienceWrapperStyles(_ref) {
16
17
  var breakpoint = _ref.breakpoint,
17
18
  dimensions = _ref.dimensions,
@@ -22,7 +23,13 @@ export var newFileExperienceWrapperStyles = function newFileExperienceWrapperSty
22
23
  isPlayButtonClickable = _ref.isPlayButtonClickable,
23
24
  isTickBoxSelectable = _ref.isTickBoxSelectable,
24
25
  shouldDisplayTooltip = _ref.shouldDisplayTooltip,
25
- mediaCardCursor = _ref.mediaCardCursor;
26
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n box-sizing: border-box;\n * {\n box-sizing: border-box;\n }\n position: relative;\n font-family: ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n\n /* We use classnames from here exceptionally to be able to handle styles when the Card is on hover */\n ", "\n ", "\n &:hover .", " {\n ", "\n }\n &:hover .", " {\n ", "\n }\n\n /* Tooltip does not support percentage dimensions. We enforce them here */\n ", "\n"])), transition(), fontFamily(), getWrapperDimensions(dimensions, appearance), displayBackground && "background-color: ".concat(token('color.background.neutral', N20), ";"), borderRadius, getCursorStyle(mediaCardCursor), getWrapperShadow(disableOverlay, selected), generateResponsiveStyles(breakpoint), hideNativeBrowserTextSelectionStyles, getClickablePlayButtonStyles(isPlayButtonClickable), getSelectableTickBoxStyles(isTickBoxSelectable), blanketClassName, fixedBlanketStyles, actionsBarClassName, fixedActionBarStyles, shouldDisplayTooltip && "> div { width: 100%; height: 100%; }");
26
+ mediaCardCursor = _ref.mediaCardCursor,
27
+ theme = _ref.theme;
28
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n box-sizing: border-box;\n * {\n box-sizing: border-box;\n }\n position: relative;\n font-family: ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n\n /* We use classnames from here exceptionally to be able to handle styles when the Card is on hover */\n ", "\n ", "\n &:hover .", " {\n ", "\n }\n &:hover .", " {\n ", "\n }\n\n /* Tooltip does not support percentage dimensions. We enforce them here */\n ", "\n"])), transition(), fontFamily(), getWrapperDimensions(dimensions, appearance), displayBackground && "background: ".concat(themed({
29
+ light: "var(--ds-background-neutral, ".concat(N20, ")"),
30
+ dark: "var(--ds-background-neutral, ".concat(BACKGROUND_COLOR_DARK, ")")
31
+ })({
32
+ theme: theme
33
+ }), ";"), borderRadius, getCursorStyle(mediaCardCursor), getWrapperShadow(disableOverlay, selected), generateResponsiveStyles(breakpoint), hideNativeBrowserTextSelectionStyles, getClickablePlayButtonStyles(isPlayButtonClickable), getSelectableTickBoxStyles(isTickBoxSelectable), blanketClassName, fixedBlanketStyles, actionsBarClassName, fixedActionBarStyles, shouldDisplayTooltip && "> div { width: 100%; height: 100%; }");
27
34
  };
28
35
  newFileExperienceWrapperStyles.displayName = 'NewFileExperienceWrapper';
@@ -4,11 +4,10 @@ var _templateObject, _templateObject2;
4
4
 
5
5
  import { css } from '@emotion/react';
6
6
  import { N0, N90A } from '@atlaskit/theme/colors';
7
- import { token } from '@atlaskit/tokens';
8
7
  export var playButtonClassName = 'media-card-play-button';
9
8
  export var bkgClassName = 'play-icon-background';
10
9
  var discSize = 48;
11
10
  var discSizeHover = 56;
12
11
  export var fixedPlayButtonStyles = "\n .".concat(bkgClassName, " {\n width: ").concat(discSizeHover, "px;\n height: ").concat(discSizeHover, "px;\n }\n");
13
- export var playButtonWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ", ";\n span {\n position: absolute;\n }\n"])), token('color.icon.inverse', N0));
14
- export var backgroundStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n transition-property: width, height;\n transition-duration: 0.1s;\n position: absolute;\n width: ", "px;\n height: ", "px;\n background: ", ";\n border-radius: 100%;\n"])), discSize, discSize, token('color.background.neutral.bold', N90A));
12
+ export var playButtonWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ", ";\n span {\n position: absolute;\n }\n"])), "var(--ds-icon-inverse, ".concat(N0, ")"));
13
+ export var backgroundStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n transition-property: width, height;\n transition-duration: 0.1s;\n position: absolute;\n width: ", "px;\n height: ", "px;\n background: ", ";\n border-radius: 100%;\n"])), discSize, discSize, "var(--ds-background-neutral-bold, ".concat(N90A, ")"));
@@ -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.4.1";
93
93
  var MediaInlineAnalyticsErrorBoundary = withMediaAnalyticsContext({
94
94
  packageVersion: packageVersion,
95
95
  packageName: packageName,
@@ -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.4.1";
13
13
  var concurrentExperience;
14
14
 
15
15
  var getExperience = function getExperience(id) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "74.4.0",
3
+ "version": "74.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -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
  };