@atlaskit/media-card 74.1.9 → 74.3.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 (238) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/cjs/card/card.js +9 -4
  3. package/dist/cjs/card/cardAnalytics.js +6 -5
  4. package/dist/cjs/card/cardImageView/cardOverlay/index.js +3 -1
  5. package/dist/cjs/card/cardImageView/cardOverlay/styles.js +8 -6
  6. package/dist/cjs/card/cardImageView/fileCardImageView.js +3 -1
  7. package/dist/cjs/card/cardImageView/styles.js +11 -7
  8. package/dist/cjs/card/getCardPreview/helpers.js +3 -3
  9. package/dist/cjs/card/getCardPreview/index.js +6 -6
  10. package/dist/cjs/card/styles/index.js +3 -1
  11. package/dist/cjs/card/ui/blanket/styles.js +3 -1
  12. package/dist/cjs/card/ui/iconMessage/styles.js +3 -1
  13. package/dist/cjs/card/ui/loadingRateLimited/styles.js +3 -1
  14. package/dist/cjs/card/ui/newFileExperience/styles.js +3 -1
  15. package/dist/cjs/card/ui/playButton/styles.js +4 -2
  16. package/dist/cjs/card/ui/progressBar/styles.js +5 -1
  17. package/dist/cjs/card/ui/styles.js +3 -1
  18. package/dist/cjs/card/ui/tickBox/styles.js +4 -2
  19. package/dist/cjs/card/ui/titleBox/failedTitleBox.js +3 -1
  20. package/dist/cjs/card/ui/titleBox/styles.js +3 -1
  21. package/dist/cjs/utils/analytics.js +14 -8
  22. package/dist/cjs/utils/cardActions/styles.js +6 -2
  23. package/dist/cjs/utils/errorIcon/styles.js +3 -1
  24. package/dist/cjs/utils/fileIcon/index.js +1 -1
  25. package/dist/cjs/utils/lightCards/styles.js +6 -4
  26. package/dist/cjs/utils/ufoExperiences.js +1 -1
  27. package/dist/cjs/utils/videoSnapshot.js +36 -11
  28. package/dist/cjs/version.json +1 -1
  29. package/dist/es2019/card/card.js +11 -4
  30. package/dist/es2019/card/cardAnalytics.js +6 -6
  31. package/dist/es2019/card/cardImageView/cardOverlay/index.js +2 -1
  32. package/dist/es2019/card/cardImageView/cardOverlay/styles.js +24 -55
  33. package/dist/es2019/card/cardImageView/fileCardImageView.js +3 -3
  34. package/dist/es2019/card/cardImageView/styles.js +10 -7
  35. package/dist/es2019/card/getCardPreview/helpers.js +2 -2
  36. package/dist/es2019/card/getCardPreview/index.js +5 -4
  37. package/dist/es2019/card/styles/index.js +2 -1
  38. package/dist/es2019/card/ui/blanket/styles.js +2 -1
  39. package/dist/es2019/card/ui/iconMessage/styles.js +2 -1
  40. package/dist/es2019/card/ui/loadingRateLimited/styles.js +2 -1
  41. package/dist/es2019/card/ui/newFileExperience/styles.js +9 -8
  42. package/dist/es2019/card/ui/playButton/styles.js +3 -2
  43. package/dist/es2019/card/ui/progressBar/styles.js +5 -2
  44. package/dist/es2019/card/ui/styles.js +2 -1
  45. package/dist/es2019/card/ui/tickBox/styles.js +5 -4
  46. package/dist/es2019/card/ui/titleBox/failedTitleBox.js +2 -1
  47. package/dist/es2019/card/ui/titleBox/styles.js +2 -1
  48. package/dist/es2019/utils/analytics.js +14 -8
  49. package/dist/es2019/utils/cardActions/styles.js +6 -5
  50. package/dist/es2019/utils/errorIcon/styles.js +2 -1
  51. package/dist/es2019/utils/fileIcon/index.js +1 -1
  52. package/dist/es2019/utils/lightCards/styles.js +6 -6
  53. package/dist/es2019/utils/progressBar/styles.js +1 -0
  54. package/dist/es2019/utils/ufoExperiences.js +1 -1
  55. package/dist/es2019/utils/videoSnapshot.js +36 -5
  56. package/dist/es2019/version.json +1 -1
  57. package/dist/esm/card/card.js +11 -4
  58. package/dist/esm/card/cardAnalytics.js +6 -5
  59. package/dist/esm/card/cardImageView/cardOverlay/index.js +2 -1
  60. package/dist/esm/card/cardImageView/cardOverlay/styles.js +8 -7
  61. package/dist/esm/card/cardImageView/fileCardImageView.js +3 -3
  62. package/dist/esm/card/cardImageView/styles.js +10 -7
  63. package/dist/esm/card/getCardPreview/helpers.js +3 -3
  64. package/dist/esm/card/getCardPreview/index.js +6 -6
  65. package/dist/esm/card/styles/index.js +2 -1
  66. package/dist/esm/card/ui/blanket/styles.js +2 -1
  67. package/dist/esm/card/ui/iconMessage/styles.js +2 -1
  68. package/dist/esm/card/ui/loadingRateLimited/styles.js +2 -1
  69. package/dist/esm/card/ui/newFileExperience/styles.js +2 -1
  70. package/dist/esm/card/ui/playButton/styles.js +3 -2
  71. package/dist/esm/card/ui/progressBar/styles.js +5 -2
  72. package/dist/esm/card/ui/styles.js +2 -1
  73. package/dist/esm/card/ui/tickBox/styles.js +3 -2
  74. package/dist/esm/card/ui/titleBox/failedTitleBox.js +2 -1
  75. package/dist/esm/card/ui/titleBox/styles.js +2 -1
  76. package/dist/esm/utils/analytics.js +14 -8
  77. package/dist/esm/utils/cardActions/styles.js +4 -2
  78. package/dist/esm/utils/errorIcon/styles.js +2 -1
  79. package/dist/esm/utils/fileIcon/index.js +1 -1
  80. package/dist/esm/utils/lightCards/styles.js +6 -6
  81. package/dist/esm/utils/progressBar/styles.js +1 -0
  82. package/dist/esm/utils/ufoExperiences.js +1 -1
  83. package/dist/esm/utils/videoSnapshot.js +36 -10
  84. package/dist/esm/version.json +1 -1
  85. package/dist/types/card/card.d.ts +1 -0
  86. package/dist/types/card/cardAnalytics.d.ts +3 -3
  87. package/dist/types/card/getCardPreview/helpers.d.ts +2 -1
  88. package/dist/types/card/getCardPreview/index.d.ts +4 -3
  89. package/dist/types/card/styles/index.d.ts +1 -1
  90. package/dist/types/utils/analytics.d.ts +8 -8
  91. package/example-helpers/styles.ts +10 -6
  92. package/package.json +16 -19
  93. package/report.api.md +228 -116
  94. package/dist/cjs/utils/mediaTypeIcon/iconWrapper.js +0 -20
  95. package/dist/cjs/utils/mediaTypeIcon/index.js +0 -81
  96. package/dist/cjs/utils/mediaTypeIcon/styles.js +0 -37
  97. package/dist/cjs/utils/mediaTypeIcon/types.js +0 -5
  98. package/dist/es2019/utils/mediaTypeIcon/iconWrapper.js +0 -9
  99. package/dist/es2019/utils/mediaTypeIcon/index.js +0 -35
  100. package/dist/es2019/utils/mediaTypeIcon/styles.js +0 -22
  101. package/dist/es2019/utils/mediaTypeIcon/types.js +0 -1
  102. package/dist/esm/utils/mediaTypeIcon/iconWrapper.js +0 -9
  103. package/dist/esm/utils/mediaTypeIcon/index.js +0 -59
  104. package/dist/esm/utils/mediaTypeIcon/styles.js +0 -24
  105. package/dist/esm/utils/mediaTypeIcon/types.js +0 -1
  106. package/dist/types/utils/mediaTypeIcon/iconWrapper.d.ts +0 -4
  107. package/dist/types/utils/mediaTypeIcon/index.d.ts +0 -10
  108. package/dist/types/utils/mediaTypeIcon/styles.d.ts +0 -2
  109. package/dist/types/utils/mediaTypeIcon/types.d.ts +0 -6
  110. package/dist/types-ts4.0/card/actions.d.ts +0 -9
  111. package/dist/types-ts4.0/card/card.d.ts +0 -59
  112. package/dist/types-ts4.0/card/cardAnalytics.d.ts +0 -9
  113. package/dist/types-ts4.0/card/cardConstants.d.ts +0 -1
  114. package/dist/types-ts4.0/card/cardImageView/cardImageViewWrapper.d.ts +0 -6
  115. package/dist/types-ts4.0/card/cardImageView/cardOverlay/cardOverlayComponents.d.ts +0 -8
  116. package/dist/types-ts4.0/card/cardImageView/cardOverlay/index.d.ts +0 -39
  117. package/dist/types-ts4.0/card/cardImageView/cardOverlay/styles.d.ts +0 -26
  118. package/dist/types-ts4.0/card/cardImageView/cardViewWrapper.d.ts +0 -4
  119. package/dist/types-ts4.0/card/cardImageView/classnames.d.ts +0 -2
  120. package/dist/types-ts4.0/card/cardImageView/fileCardImageView.d.ts +0 -49
  121. package/dist/types-ts4.0/card/cardImageView/index.d.ts +0 -2
  122. package/dist/types-ts4.0/card/cardImageView/styles.d.ts +0 -24
  123. package/dist/types-ts4.0/card/cardLoader.d.ts +0 -6
  124. package/dist/types-ts4.0/card/cardState.d.ts +0 -5
  125. package/dist/types-ts4.0/card/cardView.d.ts +0 -80
  126. package/dist/types-ts4.0/card/getCardPreview/cache.d.ts +0 -19
  127. package/dist/types-ts4.0/card/getCardPreview/filePreviewStatus.d.ts +0 -5
  128. package/dist/types-ts4.0/card/getCardPreview/helpers.d.ts +0 -9
  129. package/dist/types-ts4.0/card/getCardPreview/imageRefetchingAnalytics.d.ts +0 -10
  130. package/dist/types-ts4.0/card/getCardPreview/index.d.ts +0 -57
  131. package/dist/types-ts4.0/card/getCardStatus.d.ts +0 -4
  132. package/dist/types-ts4.0/card/index.d.ts +0 -1
  133. package/dist/types-ts4.0/card/inlinePlayer.d.ts +0 -52
  134. package/dist/types-ts4.0/card/inlinePlayerLazy.d.ts +0 -2
  135. package/dist/types-ts4.0/card/inlinePlayerWrapper.d.ts +0 -4
  136. package/dist/types-ts4.0/card/styles/animations.d.ts +0 -1
  137. package/dist/types-ts4.0/card/styles/config.d.ts +0 -1
  138. package/dist/types-ts4.0/card/styles/easing.d.ts +0 -2
  139. package/dist/types-ts4.0/card/styles/getSelectedBorderStyle.d.ts +0 -3
  140. package/dist/types-ts4.0/card/styles/index.d.ts +0 -9
  141. package/dist/types-ts4.0/card/styles/mixins.d.ts +0 -21
  142. package/dist/types-ts4.0/card/styles/styles.d.ts +0 -10
  143. package/dist/types-ts4.0/card/types.d.ts +0 -24
  144. package/dist/types-ts4.0/card/ui/actionsBar/actionsBar.d.ts +0 -5
  145. package/dist/types-ts4.0/card/ui/actionsBar/actionsBarWrapper.d.ts +0 -4
  146. package/dist/types-ts4.0/card/ui/actionsBar/styles.d.ts +0 -6
  147. package/dist/types-ts4.0/card/ui/actionsBar/types.d.ts +0 -10
  148. package/dist/types-ts4.0/card/ui/blanket/blanket.d.ts +0 -6
  149. package/dist/types-ts4.0/card/ui/blanket/styles.d.ts +0 -6
  150. package/dist/types-ts4.0/card/ui/common.d.ts +0 -23
  151. package/dist/types-ts4.0/card/ui/iconMessage/iconMessageWrapper.d.ts +0 -4
  152. package/dist/types-ts4.0/card/ui/iconMessage/index.d.ts +0 -8
  153. package/dist/types-ts4.0/card/ui/iconMessage/styles.d.ts +0 -5
  154. package/dist/types-ts4.0/card/ui/iconMessage/types.d.ts +0 -19
  155. package/dist/types-ts4.0/card/ui/iconWrapper/iconWrapper.d.ts +0 -4
  156. package/dist/types-ts4.0/card/ui/iconWrapper/styles.d.ts +0 -7
  157. package/dist/types-ts4.0/card/ui/iconWrapper/types.d.ts +0 -6
  158. package/dist/types-ts4.0/card/ui/imageRenderer/imageRenderer.d.ts +0 -15
  159. package/dist/types-ts4.0/card/ui/loadingRateLimited/styles.d.ts +0 -13
  160. package/dist/types-ts4.0/card/ui/newFileExperience/newFileExperienceWrapper.d.ts +0 -4
  161. package/dist/types-ts4.0/card/ui/newFileExperience/styles.d.ts +0 -5
  162. package/dist/types-ts4.0/card/ui/newFileExperience/types.d.ts +0 -23
  163. package/dist/types-ts4.0/card/ui/playButton/playButton.d.ts +0 -2
  164. package/dist/types-ts4.0/card/ui/playButton/playButtonBackground.d.ts +0 -3
  165. package/dist/types-ts4.0/card/ui/playButton/playButtonWrapper.d.ts +0 -3
  166. package/dist/types-ts4.0/card/ui/playButton/styles.d.ts +0 -5
  167. package/dist/types-ts4.0/card/ui/progressBar/progressBar.d.ts +0 -10
  168. package/dist/types-ts4.0/card/ui/progressBar/styledBar.d.ts +0 -4
  169. package/dist/types-ts4.0/card/ui/progressBar/styles.d.ts +0 -7
  170. package/dist/types-ts4.0/card/ui/progressBar/types.d.ts +0 -7
  171. package/dist/types-ts4.0/card/ui/styles.d.ts +0 -11
  172. package/dist/types-ts4.0/card/ui/tickBox/styles.d.ts +0 -7
  173. package/dist/types-ts4.0/card/ui/tickBox/tickBox.d.ts +0 -3
  174. package/dist/types-ts4.0/card/ui/tickBox/tickBoxWrapper.d.ts +0 -4
  175. package/dist/types-ts4.0/card/ui/tickBox/types.d.ts +0 -4
  176. package/dist/types-ts4.0/card/ui/titleBox/failedTitleBox.d.ts +0 -3
  177. package/dist/types-ts4.0/card/ui/titleBox/styles.d.ts +0 -15
  178. package/dist/types-ts4.0/card/ui/titleBox/titleBox.d.ts +0 -4
  179. package/dist/types-ts4.0/card/ui/titleBox/titleBoxComponents.d.ts +0 -8
  180. package/dist/types-ts4.0/card/ui/titleBox/types.d.ts +0 -32
  181. package/dist/types-ts4.0/classnames.d.ts +0 -5
  182. package/dist/types-ts4.0/errors.d.ts +0 -41
  183. package/dist/types-ts4.0/index.d.ts +0 -15
  184. package/dist/types-ts4.0/inline/index.d.ts +0 -1
  185. package/dist/types-ts4.0/inline/loader.d.ts +0 -25
  186. package/dist/types-ts4.0/inline/mediaInlineCard.d.ts +0 -14
  187. package/dist/types-ts4.0/types.d.ts +0 -96
  188. package/dist/types-ts4.0/utils/analytics.d.ts +0 -77
  189. package/dist/types-ts4.0/utils/breakpoint.d.ts +0 -11
  190. package/dist/types-ts4.0/utils/cardActions/cardActionButton.d.ts +0 -3
  191. package/dist/types-ts4.0/utils/cardActions/cardActionIconButton.d.ts +0 -12
  192. package/dist/types-ts4.0/utils/cardActions/cardActionsDropdownMenu.d.ts +0 -14
  193. package/dist/types-ts4.0/utils/cardActions/cardActionsView.d.ts +0 -16
  194. package/dist/types-ts4.0/utils/cardActions/index.d.ts +0 -7
  195. package/dist/types-ts4.0/utils/cardActions/styles.d.ts +0 -18
  196. package/dist/types-ts4.0/utils/cardDimensions.d.ts +0 -49
  197. package/dist/types-ts4.0/utils/containsPixelUnit.d.ts +0 -1
  198. package/dist/types-ts4.0/utils/dimensionComparer.d.ts +0 -3
  199. package/dist/types-ts4.0/utils/document.d.ts +0 -2
  200. package/dist/types-ts4.0/utils/errorIcon/index.d.ts +0 -12
  201. package/dist/types-ts4.0/utils/errorIcon/styles.d.ts +0 -1
  202. package/dist/types-ts4.0/utils/fileIcon/index.d.ts +0 -12
  203. package/dist/types-ts4.0/utils/fileIcon/styles.d.ts +0 -1
  204. package/dist/types-ts4.0/utils/generateUniqueId.d.ts +0 -1
  205. package/dist/types-ts4.0/utils/getCSSUnitValue.d.ts +0 -1
  206. package/dist/types-ts4.0/utils/getDataURIDimension.d.ts +0 -9
  207. package/dist/types-ts4.0/utils/getElementDimension.d.ts +0 -2
  208. package/dist/types-ts4.0/utils/getErrorMessage.d.ts +0 -2
  209. package/dist/types-ts4.0/utils/getMediaCardCursor.d.ts +0 -6
  210. package/dist/types-ts4.0/utils/globalScope/getSSRData.d.ts +0 -3
  211. package/dist/types-ts4.0/utils/globalScope/globalScope.d.ts +0 -21
  212. package/dist/types-ts4.0/utils/globalScope/index.d.ts +0 -4
  213. package/dist/types-ts4.0/utils/globalScope/types.d.ts +0 -8
  214. package/dist/types-ts4.0/utils/index.d.ts +0 -14
  215. package/dist/types-ts4.0/utils/isRetina.d.ts +0 -1
  216. package/dist/types-ts4.0/utils/isValidPercentageUnit.d.ts +0 -1
  217. package/dist/types-ts4.0/utils/lightCards/cardError.d.ts +0 -12
  218. package/dist/types-ts4.0/utils/lightCards/cardLoading.d.ts +0 -5
  219. package/dist/types-ts4.0/utils/lightCards/getDimensionsWithDefault.d.ts +0 -2
  220. package/dist/types-ts4.0/utils/lightCards/lightCardWrappers.d.ts +0 -5
  221. package/dist/types-ts4.0/utils/lightCards/styles.d.ts +0 -4
  222. package/dist/types-ts4.0/utils/lightCards/types.d.ts +0 -15
  223. package/dist/types-ts4.0/utils/media-card-analytics-error-boundary.d.ts +0 -10
  224. package/dist/types-ts4.0/utils/mediaTypeIcon/iconWrapper.d.ts +0 -4
  225. package/dist/types-ts4.0/utils/mediaTypeIcon/index.d.ts +0 -10
  226. package/dist/types-ts4.0/utils/mediaTypeIcon/styles.d.ts +0 -2
  227. package/dist/types-ts4.0/utils/mediaTypeIcon/types.d.ts +0 -6
  228. package/dist/types-ts4.0/utils/metadata.d.ts +0 -2
  229. package/dist/types-ts4.0/utils/objectURLCache.d.ts +0 -11
  230. package/dist/types-ts4.0/utils/preventClickThrough.d.ts +0 -8
  231. package/dist/types-ts4.0/utils/printScript.d.ts +0 -2
  232. package/dist/types-ts4.0/utils/progressBar/index.d.ts +0 -9
  233. package/dist/types-ts4.0/utils/progressBar/styles.d.ts +0 -1
  234. package/dist/types-ts4.0/utils/resizeModeToMediaImageProps.d.ts +0 -5
  235. package/dist/types-ts4.0/utils/shouldDisplayImageThumbnail.d.ts +0 -3
  236. package/dist/types-ts4.0/utils/ufoExperiences.d.ts +0 -7
  237. package/dist/types-ts4.0/utils/videoSnapshot.d.ts +0 -1
  238. package/dist/types-ts4.0/utils/viewportDetector.d.ts +0 -6
@@ -1,6 +1,7 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { fontFamily } from '@atlaskit/theme/constants';
3
3
  import { fadeIn } from '@atlaskit/media-ui';
4
+ import { token } from '@atlaskit/tokens';
4
5
  export { defaultTransitionDuration } from './config';
5
6
  export { antialiased, borderRadiusLeft, capitalize, centerSelf, centerSelfX, centerSelfY, centerX, hexToRgb, rgba, spaceAround, transition, withAppearance } from './mixins';
6
7
  export { easeOutCubic, easeOutExpo } from './easing';
@@ -14,7 +15,7 @@ export const rootStyles = () => css`
14
15
  }
15
16
  `;
16
17
  export const cardShadow = `
17
- box-shadow: 0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24);
18
+ box-shadow: ${token('elevation.shadow.raised', '0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24)')};
18
19
  `;
19
20
  export const fadeinImageStyles = () => css`
20
21
  ${fadeIn};
@@ -1,8 +1,9 @@
1
+ import { token } from '@atlaskit/tokens';
1
2
  import { css } from '@emotion/react';
2
3
  import { transition } from '../../styles';
3
4
  import { N90A } from '@atlaskit/theme/colors';
4
5
  export const blanketClassName = 'media-card-blanket';
5
- export const fixedBlanketStyles = `background-color: ${N90A};`;
6
+ export const fixedBlanketStyles = `background-color: ${token('color.blanket', N90A)};`;
6
7
  export const blanketStyles = isFixed => css`
7
8
  ${transition()}
8
9
  position: absolute;
@@ -1,3 +1,4 @@
1
+ import { token } from '@atlaskit/tokens';
1
2
  import { css, keyframes } from '@emotion/react';
2
3
  import { N300 } from '@atlaskit/theme/colors';
3
4
  const breatheAnimation = keyframes`
@@ -19,7 +20,7 @@ const getStylesBasedOnProps = ({
19
20
  opacity: 1;
20
21
  font-weight: 450;
21
22
  ${reducedFont ? 'font-size: 0.7em;' : ''}
22
- color: ${N300};
23
+ color: ${token('color.text.subtlest', N300)};
23
24
  text-align: center;
24
25
  ${animated ? animatedStyles : ''}
25
26
  margin-bottom: -1em;
@@ -1,3 +1,4 @@
1
+ import { token } from '@atlaskit/tokens';
1
2
  import { css } from '@emotion/react';
2
3
  import { generateResponsiveStyles } from '../progressBar/styles';
3
4
  import { N300 } from '@atlaskit/theme/colors';
@@ -26,7 +27,7 @@ export const loadingRateLimitedTextWrapperStyles = ({
26
27
  }) => css`
27
28
  margin-top: 10px;
28
29
  overflow: hidden;
29
- color: ${N300};
30
+ color: ${token('color.text.subtlest', N300)};
30
31
  display: block;
31
32
  width: 100%;
32
33
  text-align: center;
@@ -2,6 +2,7 @@ import { css } from '@emotion/react';
2
2
  import { fontFamily } from '@atlaskit/theme/constants';
3
3
  import { borderRadius } from '@atlaskit/media-ui';
4
4
  import { N20 } from '@atlaskit/theme/colors';
5
+ import { token } from '@atlaskit/tokens';
5
6
  import { hideNativeBrowserTextSelectionStyles } from '@atlaskit/editor-shared-styles/selection';
6
7
  import { transition } from '../../styles';
7
8
  import { fixedBlanketStyles, blanketClassName } from '../blanket/styles';
@@ -27,17 +28,17 @@ export const newFileExperienceWrapperStyles = ({
27
28
  position: relative;
28
29
  font-family: ${fontFamily()};
29
30
  ${getWrapperDimensions(dimensions, appearance)}
30
- ${displayBackground ? `background-color: ${N20};` : ''}
31
- ${borderRadius}
32
- ${getCursorStyle(mediaCardCursor)}
33
- ${getWrapperShadow(disableOverlay, selected)}
31
+ ${displayBackground && `background-color: ${token('color.background.neutral', N20)};`}
32
+ ${borderRadius}
33
+ ${getCursorStyle(mediaCardCursor)}
34
+ ${getWrapperShadow(disableOverlay, selected)}
34
35
  ${generateResponsiveStyles(breakpoint)};
35
36
  ${hideNativeBrowserTextSelectionStyles}
36
37
 
37
38
  /* We use classnames from here exceptionally to be able to handle styles when the Card is on hover */
38
- ${getClickablePlayButtonStyles(isPlayButtonClickable)}
39
- ${getSelectableTickBoxStyles(isTickBoxSelectable)}
40
- &:hover .${blanketClassName} {
39
+ ${getClickablePlayButtonStyles(isPlayButtonClickable)}
40
+ ${getSelectableTickBoxStyles(isTickBoxSelectable)}
41
+ &:hover .${blanketClassName} {
41
42
  ${fixedBlanketStyles}
42
43
  }
43
44
  &:hover .${actionsBarClassName} {
@@ -45,6 +46,6 @@ export const newFileExperienceWrapperStyles = ({
45
46
  }
46
47
 
47
48
  /* Tooltip does not support percentage dimensions. We enforce them here */
48
- ${shouldDisplayTooltip ? `> div { width: 100%; height: 100% }` : ''}
49
+ ${shouldDisplayTooltip && `> div { width: 100%; height: 100%; }`}
49
50
  `;
50
51
  newFileExperienceWrapperStyles.displayName = 'NewFileExperienceWrapper';
@@ -1,5 +1,6 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { N0, N90A } from '@atlaskit/theme/colors';
3
+ import { token } from '@atlaskit/tokens';
3
4
  export const playButtonClassName = 'media-card-play-button';
4
5
  export const bkgClassName = 'play-icon-background';
5
6
  const discSize = 48;
@@ -19,7 +20,7 @@ export const playButtonWrapperStyles = css`
19
20
  display: flex;
20
21
  align-items: center;
21
22
  justify-content: center;
22
- color: ${N0};
23
+ color: ${token('color.icon.inverse', N0)};
23
24
  span {
24
25
  position: absolute;
25
26
  }
@@ -30,6 +31,6 @@ export const backgroundStyles = css`
30
31
  position: absolute;
31
32
  width: ${discSize}px;
32
33
  height: ${discSize}px;
33
- background: ${N90A};
34
+ background: ${token('color.background.neutral.bold', N90A)};
34
35
  border-radius: 100%;
35
36
  `;
@@ -1,7 +1,7 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { borderRadius } from '@atlaskit/media-ui';
3
3
  import { rgba } from '../../styles/mixins';
4
- import { N0, N400 } from '@atlaskit/theme/colors';
4
+ import { N0 } from '@atlaskit/theme/colors';
5
5
  import { Breakpoint, getTitleBoxHeight, responsiveSettings } from '../common';
6
6
  const height = 3;
7
7
  const padding = 1;
@@ -23,6 +23,7 @@ export function generateResponsiveStyles(breakpoint, positionBottom, showOnTop,
23
23
  ${showOnTop ? 'top' : 'bottom'}: ${marginBottom}px
24
24
  `;
25
25
  }
26
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
26
27
 
27
28
  const getStyledBarStylesBasedOnProps = ({
28
29
  progress,
@@ -44,12 +45,14 @@ box-sizing: border-box;
44
45
  content: '';
45
46
  width: ${progress}%;
46
47
  height: 100%;
47
- background-color: ${N400};
48
+ background-color: #44546F;
48
49
  ${borderRadius}
49
50
  display: block;
50
51
  }
51
52
  ${generateResponsiveStyles(breakpoint, positionBottom, showOnTop)}
52
53
  `;
54
+ /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
55
+
53
56
 
54
57
  export const styledBarStyles = props => {
55
58
  return css`
@@ -1,6 +1,7 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { borderRadius } from '@atlaskit/media-ui';
3
3
  import { N60A } from '@atlaskit/theme/colors';
4
+ import { token } from '@atlaskit/tokens';
4
5
  import { akEditorSelectedBoxShadow } from '@atlaskit/editor-shared-styles/consts';
5
6
  import { getCSSUnitValue } from '../../utils/getCSSUnitValue';
6
7
  import { getDefaultCardDimensions } from '../../utils/cardDimensions';
@@ -38,7 +39,7 @@ export const getWrapperDimensions = (dimensions, appearance) => {
38
39
  // CSS outline has no 'radius', therefore we can't achieve the same effect with it
39
40
 
40
41
  export const getWrapperShadow = (disableOverlay, selected) => {
41
- const withOverlayShadow = !disableOverlay ? `0 1px 1px ${N60A}, 0 0 1px 0 ${N60A}` : '';
42
+ const withOverlayShadow = !disableOverlay ? `${token('elevation.shadow.raised', `0 1px 1px ${N60A}, 0 0 1px 0 ${N60A}`)}` : '';
42
43
  const selectedShadow = selected ? akEditorSelectedBoxShadow : '';
43
44
  const shadow = [selectedShadow, withOverlayShadow].filter(Boolean).join(', ');
44
45
  return shadow ? `box-shadow: ${shadow};` : '';
@@ -1,13 +1,14 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { transition } from '../../styles';
3
3
  import { B200, N0, N100 } from '@atlaskit/theme/colors';
4
+ import { token } from '@atlaskit/tokens';
4
5
  export const tickBoxClassName = 'media-card-tickbox';
5
6
  export const tickboxFixedStyles = `
6
- background-color: ${N0};
7
- color: ${N100};
7
+ background-color: ${token('color.background.input', N0)};
8
+ color: ${token('color.icon.subtle', N100)};
8
9
  `;
9
- export const getSelectedStyles = selected => selected ? `background-color: ${B200};
10
- color: white;` : ``;
10
+ export const getSelectedStyles = selected => selected ? `background-color: ${token('color.icon.information', B200)};
11
+ color: ${token('color.icon.inverse', 'white')};` : ``;
11
12
  export const wrapperStyles = selected => css`
12
13
  ${transition()}
13
14
  font-size: 14px;
@@ -3,6 +3,7 @@ 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';
6
7
  import { ErrorMessageWrapper, TitleBoxWrapper } from './titleBoxComponents';
7
8
  export const FailedTitleBox = ({
8
9
  breakpoint,
@@ -13,6 +14,6 @@ export const FailedTitleBox = ({
13
14
  }, /*#__PURE__*/React.createElement(ErrorMessageWrapper, null, /*#__PURE__*/React.createElement(EditorWarningIcon, {
14
15
  label: 'Warning',
15
16
  size: 'small',
16
- primaryColor: R300
17
+ primaryColor: token('color.text.danger', R300)
17
18
  }), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, customMessage))));
18
19
  };
@@ -1,4 +1,5 @@
1
1
  import { css } from '@emotion/react';
2
+ import { token } from '@atlaskit/tokens';
2
3
  import { responsiveSettings, getTitleBoxHeight, Breakpoint } from '../common';
3
4
  import { N0 } from '@atlaskit/theme/colors';
4
5
  import { rgba } from '../../styles/mixins';
@@ -20,7 +21,7 @@ export const titleBoxWrapperStyles = ({
20
21
  position: absolute;
21
22
  bottom: 0;
22
23
  width: 100%;
23
- background-color: ${rgba(titleBoxBgColor && HEX_REGEX.test(titleBoxBgColor) ? titleBoxBgColor : N0, 0.8)};
24
+ background-color: ${token('elevation.surface', rgba(titleBoxBgColor && HEX_REGEX.test(titleBoxBgColor) ? titleBoxBgColor : N0, 0.8))};
24
25
  color: inherit;
25
26
  cursor: inherit;
26
27
  pointer-events: none;
@@ -31,18 +31,21 @@ export const getRenderPreviewableCardPayload = fileAttributes => ({
31
31
  fileAttributes
32
32
  }
33
33
  });
34
- export const getRenderCommencedEventPayload = (fileAttributes, performanceAttributes) => {
34
+ export const getRenderCommencedEventPayload = (fileAttributes, performanceAttributes, traceContext) => {
35
35
  return {
36
36
  eventType: 'operational',
37
37
  action: 'commenced',
38
38
  actionSubject: 'mediaCardRender',
39
39
  attributes: {
40
40
  fileAttributes,
41
- performanceAttributes
41
+ performanceAttributes,
42
+ traceContext: {
43
+ traceId: traceContext.traceId
44
+ }
42
45
  }
43
46
  };
44
47
  };
45
- export const getRenderSucceededEventPayload = (fileAttributes, performanceAttributes, ssrReliability) => ({
48
+ export const getRenderSucceededEventPayload = (fileAttributes, performanceAttributes, ssrReliability, traceContext) => ({
46
49
  eventType: 'operational',
47
50
  action: 'succeeded',
48
51
  actionSubject: 'mediaCardRender',
@@ -50,7 +53,8 @@ export const getRenderSucceededEventPayload = (fileAttributes, performanceAttrib
50
53
  fileAttributes,
51
54
  performanceAttributes,
52
55
  status: 'success',
53
- ssrReliability
56
+ ssrReliability,
57
+ traceContext
54
58
  }
55
59
  });
56
60
  export const getCacheHitEventPayload = cardPreviewAttributes => ({
@@ -117,7 +121,7 @@ export const extractErrorInfo = error => {
117
121
  errorDetail: getRenderErrorErrorDetail(error)
118
122
  };
119
123
  };
120
- export const getRenderErrorEventPayload = (fileAttributes, performanceAttributes, error, ssrReliability) => ({
124
+ export const getRenderErrorEventPayload = (fileAttributes, performanceAttributes, error, ssrReliability, traceContext) => ({
121
125
  eventType: 'operational',
122
126
  action: 'failed',
123
127
  actionSubject: 'mediaCardRender',
@@ -127,10 +131,11 @@ export const getRenderErrorEventPayload = (fileAttributes, performanceAttributes
127
131
  status: 'fail',
128
132
  ...extractErrorInfo(error),
129
133
  request: getRenderErrorRequestMetadata(error),
130
- ssrReliability
134
+ ssrReliability,
135
+ traceContext
131
136
  }
132
137
  });
133
- export const getRenderFailedFileStatusPayload = (fileAttributes, performanceAttributes, ssrReliability) => ({
138
+ export const getRenderFailedFileStatusPayload = (fileAttributes, performanceAttributes, ssrReliability, traceContext) => ({
134
139
  eventType: 'operational',
135
140
  action: 'failed',
136
141
  actionSubject: 'mediaCardRender',
@@ -139,7 +144,8 @@ export const getRenderFailedFileStatusPayload = (fileAttributes, performanceAttr
139
144
  performanceAttributes,
140
145
  status: 'fail',
141
146
  failReason: 'failed-processing',
142
- ssrReliability
147
+ ssrReliability,
148
+ traceContext
143
149
  }
144
150
  });
145
151
  export const getCopiedFilePayload = fileId => ({
@@ -1,7 +1,9 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { N500, N0 } from '@atlaskit/theme/colors';
3
+ import { token } from '@atlaskit/tokens';
3
4
  import { borderRadius, size, center } from '@atlaskit/media-ui';
4
5
  import { rootStyles } from '../../card/styles';
6
+ import { rgba } from '../../card/styles/mixins';
5
7
  export const wrapperStyles = css`
6
8
  ${rootStyles()}
7
9
  display: flex;
@@ -17,20 +19,19 @@ export let CardActionIconButtonVariant;
17
19
 
18
20
  const getVariantStyles = variant => {
19
21
  return variant === 'filled' ? `
20
- background: ${N0};
22
+ background-color: ${token('elevation.surface.overlay', rgba(N0, 0.8))};
21
23
  margin-right: 8px;
22
- opacity: 0.8;
23
24
 
24
25
  &:last-child {
25
26
  margin-right: 0;
26
27
  }
27
28
 
28
29
  &:hover {
29
- opacity: 0.6;
30
+ background-color: ${token('elevation.surface.overlay.hovered', rgba(N0, 0.6))}
30
31
  }
31
32
  ` : `
32
33
  &:hover {
33
- background-color: rgba(9, 30, 66, 0.06);
34
+ background-color: ${token('color.background.neutral.subtle.hovered', 'rgba(9, 30, 66, 0.06)')};
34
35
  }
35
36
  `;
36
37
  };
@@ -41,7 +42,7 @@ export const cardActionButtonStyles = ({
41
42
  ${center}
42
43
  ${borderRadius}
43
44
  ${size(26)}
44
- color: ${N500};
45
+ color: ${token('color.icon', N500)};
45
46
 
46
47
  &:hover {
47
48
  cursor: pointer;
@@ -1,5 +1,6 @@
1
+ import { token } from '@atlaskit/tokens';
1
2
  import { css } from '@emotion/react';
2
3
  export const errorIconWrapperStyles = css`
3
4
  display: flex;
4
- color: #ff991f;
5
+ color: ${token('color.icon.warning', '#ff991f')};
5
6
  `;
@@ -1,7 +1,7 @@
1
1
  /**@jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
3
  import { Component } from 'react';
4
- import { MediaTypeIcon } from '../mediaTypeIcon';
4
+ import { MediaTypeIcon } from '@atlaskit/media-ui/media-type-icon';
5
5
  import { fileTypeIconStyles } from './styles';
6
6
  const fileTypeIconClass = 'file-type-icon';
7
7
  export class FileIcon extends Component {
@@ -1,5 +1,5 @@
1
- import { css } from '@emotion/react';
2
- import { keyframes } from '@emotion/react';
1
+ import { css, keyframes } from '@emotion/react';
2
+ import { token } from '@atlaskit/tokens';
3
3
  import { center, borderRadius } from '@atlaskit/media-ui';
4
4
  import { themed } from '@atlaskit/theme/components';
5
5
  import { N20, DN50, N50, DN100 } from '@atlaskit/theme/colors';
@@ -22,14 +22,14 @@ export const wrapperStyles = ({
22
22
  }) => css`
23
23
  ${center}
24
24
  background: ${themed({
25
- light: N20,
26
- dark: DN50
25
+ light: token('color.background.neutral', N20),
26
+ dark: token('color.background.neutral', DN50)
27
27
  })({
28
28
  theme
29
29
  })};
30
30
  color: ${themed({
31
- light: N50,
32
- dark: DN100
31
+ light: token('color.icon', N50),
32
+ dark: token('color.icon', DN100)
33
33
  })({
34
34
  theme
35
35
  })};
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
1
2
  import { css } from '@emotion/react';
2
3
  import { borderRadius } from '@atlaskit/media-ui';
3
4
  export const progressWrapperStyles = css`
@@ -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.1.9";
6
+ const packageVersion = "74.3.0";
7
7
  let concurrentExperience;
8
8
 
9
9
  const getExperience = id => {
@@ -1,7 +1,38 @@
1
- import VideoSnapshot from 'video-snapshot';
2
1
  export const takeSnapshot = async blob => {
3
- const snapshooter = new VideoSnapshot(blob);
4
- const dataUri = await snapshooter.takeSnapshot();
5
- snapshooter.end();
6
- return dataUri;
2
+ return new Promise((resolve, reject) => {
3
+ const url = URL.createObjectURL(blob);
4
+ const video = document.createElement('video');
5
+ video.preload = 'metadata';
6
+ video.src = url;
7
+ video.muted = true;
8
+ video.play().catch(() => {
9
+ return reject(new Error('failed to play video'));
10
+ });
11
+ video.addEventListener('timeupdate', function timeUpdateHandler() {
12
+ video.removeEventListener('timeupdate', timeUpdateHandler);
13
+ video.pause();
14
+ URL.revokeObjectURL(url); //create canvas to draw our first frame on.
15
+
16
+ if (!video.videoWidth && !video.videoHeight) {
17
+ return reject(new Error('error retrieving video dimensions'));
18
+ }
19
+
20
+ const canvas = document.createElement('canvas');
21
+ canvas.width = video.videoWidth;
22
+ canvas.height = video.videoHeight;
23
+ const context = canvas.getContext('2d');
24
+
25
+ if (!context) {
26
+ return reject(new Error('error creating canvas context'));
27
+ }
28
+
29
+ context.drawImage(video, 0, 0, canvas.width, canvas.height);
30
+ const dataURL = canvas.toDataURL('image/jpeg', 0.85);
31
+ resolve(dataURL);
32
+ });
33
+ video.addEventListener('error', () => {
34
+ reject(new Error('failed to load video'));
35
+ URL.revokeObjectURL(url);
36
+ });
37
+ });
7
38
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "74.1.9",
3
+ "version": "74.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -22,6 +22,7 @@ import ReactDOM from 'react-dom';
22
22
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
23
23
  import { withMediaAnalyticsContext } from '@atlaskit/media-common';
24
24
  import DownloadIcon from '@atlaskit/icon/glyph/download';
25
+ import { getRandomHex } from '@atlaskit/media-common';
25
26
  import { globalMediaEventEmitter, isDifferentIdentifier, isFileIdentifier, RECENTS_COLLECTION, isImageRepresentationReady, isExternalImageIdentifier, isProcessedFileState, imageResizeModeToFileImageMode } from '@atlaskit/media-client';
26
27
  import { MediaViewer } from '@atlaskit/media-viewer';
27
28
  import { injectIntl, IntlProvider } from 'react-intl-next';
@@ -43,7 +44,7 @@ import { getMediaCardCursor } from '../utils/getMediaCardCursor';
43
44
  import { completeUfoExperience, startUfoExperience } from '../utils/ufoExperiences';
44
45
  import { generateUniqueId } from '../utils/generateUniqueId';
45
46
  var packageName = "@atlaskit/media-card";
46
- var packageVersion = "74.1.9";
47
+ var packageVersion = "74.3.0";
47
48
  export var CardBase = /*#__PURE__*/function (_Component) {
48
49
  _inherits(CardBase, _Component);
49
50
 
@@ -53,6 +54,7 @@ export var CardBase = /*#__PURE__*/function (_Component) {
53
54
  // of Cards regardless of whether it shares the same file (either internal or external)
54
55
  // We initialise timeElapsedTillCommenced
55
56
  // to avoid extra branching on a possibly undefined value.
57
+ // Generate unique traceId for file
56
58
  function CardBase(props) {
57
59
  var _this;
58
60
 
@@ -80,6 +82,10 @@ export var CardBase = /*#__PURE__*/function (_Component) {
80
82
 
81
83
  _defineProperty(_assertThisInitialized(_this), "timeElapsedTillCommenced", performance.now());
82
84
 
85
+ _defineProperty(_assertThisInitialized(_this), "traceContext", {
86
+ traceId: getRandomHex(16)
87
+ });
88
+
83
89
  _defineProperty(_assertThisInitialized(_this), "getImageURLParams", function (_ref) {
84
90
  var collection = _ref.collectionName;
85
91
  return _objectSpread(_objectSpread({
@@ -133,7 +139,8 @@ export var CardBase = /*#__PURE__*/function (_Component) {
133
139
  imageUrlParams: _this.getImageURLParams(identifier),
134
140
  mediaBlobUrlAttrs: _this.getMediaBlobUrlAttrs(identifier, fileState),
135
141
  createAnalyticsEvent: createAnalyticsEvent,
136
- featureFlags: _this.props.featureFlags
142
+ featureFlags: _this.props.featureFlags,
143
+ traceContext: _this.traceContext
137
144
  };
138
145
  });
139
146
 
@@ -973,7 +980,7 @@ export var CardBase = /*#__PURE__*/function (_Component) {
973
980
  status = _this$state7.status,
974
981
  error = _this$state7.error;
975
982
  var createAnalyticsEvent = this.props.createAnalyticsEvent;
976
- createAnalyticsEvent && _fireOperationalEvent(createAnalyticsEvent, status, this.fileAttributes, this.getPerformanceAttributes(), this.ssrReliability, error);
983
+ createAnalyticsEvent && _fireOperationalEvent(createAnalyticsEvent, status, this.fileAttributes, this.getPerformanceAttributes(), this.ssrReliability, error, this.traceContext);
977
984
  completeUfoExperience(this.internalOccurrenceKey, status, this.fileAttributes, this.fileStateFlags, this.ssrReliability, error);
978
985
  }
979
986
  }, {
@@ -985,7 +992,7 @@ export var CardBase = /*#__PURE__*/function (_Component) {
985
992
  overall: {
986
993
  durationSincePageStart: this.timeElapsedTillCommenced
987
994
  }
988
- });
995
+ }, this.traceContext);
989
996
  startUfoExperience(this.internalOccurrenceKey);
990
997
  }
991
998
  }, {
@@ -2,6 +2,7 @@ import { fireMediaCardEvent, getRenderSucceededEventPayload, getRenderErrorEvent
2
2
  import { MediaCardError } from '../errors';
3
3
  export var fireOperationalEvent = function fireOperationalEvent(createAnalyticsEvent, status, fileAttributes, performanceAttributes, ssrReliability) {
4
4
  var error = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : new MediaCardError('missing-error-data');
5
+ var traceContext = arguments.length > 6 ? arguments[6] : undefined;
5
6
 
6
7
  var fireEvent = function fireEvent(payload) {
7
8
  return fireMediaCardEvent(payload, createAnalyticsEvent);
@@ -9,20 +10,20 @@ export var fireOperationalEvent = function fireOperationalEvent(createAnalyticsE
9
10
 
10
11
  switch (status) {
11
12
  case 'complete':
12
- fireEvent(getRenderSucceededEventPayload(fileAttributes, performanceAttributes, ssrReliability));
13
+ fireEvent(getRenderSucceededEventPayload(fileAttributes, performanceAttributes, ssrReliability, traceContext));
13
14
  break;
14
15
 
15
16
  case 'failed-processing':
16
- fireEvent(getRenderFailedFileStatusPayload(fileAttributes, performanceAttributes, ssrReliability));
17
+ fireEvent(getRenderFailedFileStatusPayload(fileAttributes, performanceAttributes, ssrReliability, traceContext));
17
18
  break;
18
19
 
19
20
  case 'error':
20
- fireEvent(getRenderErrorEventPayload(fileAttributes, performanceAttributes, error, ssrReliability));
21
+ fireEvent(getRenderErrorEventPayload(fileAttributes, performanceAttributes, error, ssrReliability, traceContext));
21
22
  break;
22
23
  }
23
24
  };
24
- export var fireCommencedEvent = function fireCommencedEvent(createAnalyticsEvent, fileAttributes, performanceAttributes) {
25
- fireMediaCardEvent(getRenderCommencedEventPayload(fileAttributes, performanceAttributes), createAnalyticsEvent);
25
+ export var fireCommencedEvent = function fireCommencedEvent(createAnalyticsEvent, fileAttributes, performanceAttributes, traceContext) {
26
+ fireMediaCardEvent(getRenderCommencedEventPayload(fileAttributes, performanceAttributes, traceContext), createAnalyticsEvent);
26
27
  };
27
28
  export var fireCopiedEvent = function fireCopiedEvent(createAnalyticsEvent, fileId, cardRef) {
28
29
  if (typeof window.getSelection === 'function') {
@@ -15,6 +15,7 @@ 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';
18
19
  import TickIcon from '@atlaskit/icon/glyph/check';
19
20
  import { Ellipsify } from '@atlaskit/media-ui'; // We dont require things directly from "utils" to avoid circular dependencies
20
21
 
@@ -93,7 +94,7 @@ export var CardOverlay = /*#__PURE__*/function (_Component) {
93
94
  selected = _this$props2.selected,
94
95
  actions = _this$props2.actions;
95
96
  var titleText = resolveTitleText(cardStatus, mediaName, error, selected);
96
- var menuTriggerColor = !persistent ? 'white' : undefined;
97
+ var menuTriggerColor = !persistent ? token('color.icon.inverse', 'white') : undefined;
97
98
  return jsx(Overlay, {
98
99
  hasError: !!error,
99
100
  noHover: noHover,
@@ -12,8 +12,9 @@ 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 { rgba, centerX, easeOutCubic, transition, antialiased } from '../../styles';
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: #798599; /* TODO FIL-3884: Align color with new design */\n display: flex;\n opacity: 0;\n\n &.selected {\n opacity: 1;\n color: white;\n background-color: #0052cc; /* 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(), rgba('#ffffff', 0.5));
15
+ import { token } from '@atlaskit/tokens';
16
+ 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'));
17
18
 
18
19
  var getOverlayStyles = function getOverlayStyles(_ref) {
19
20
  var hasError = _ref.hasError,
@@ -25,22 +26,22 @@ var getOverlayStyles = function getOverlayStyles(_ref) {
25
26
  };
26
27
 
27
28
  export var overlayStyles = function overlayStyles(props) {
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 .bottom-row {\n .delete-btn {\n display: flex;\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 /* TODO FIL-3884 add new overlay with rgba(colors.N900, 0.16) */\n }\n\n .title,\n .bottom-row,\n .file-size,\n .more-btn {\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: white;\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: white;\n display: none;\n }\n\n .more-btn {\n color: ", ";\n display: none;\n\n &:hover {\n background-color: rgba(9, 30, 66, 0.2);\n }\n }\n\n .delete-btn {\n display: none;\n\n &:hover {\n background-color: rgba(9, 30, 66, 0.2);\n }\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 .more-btn {\n ", " color: ", ";\n }\n\n .delete-btn {\n display: flex;\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 border-color: ", " !important;\n color: white;\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), colors.B400, colors.N800, rgba(colors.N900, 0.06), colors.B200, colors.N0, colors.N0, rgba(colors.N900, 0.5), centerX, colors.N0, colors.B200, colors.B200, colors.N800);
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));
29
30
  };
30
31
  export var errorLineStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 24px;\n display: flex;\n align-items: center;\n"])));
31
32
  export var leftColumnStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n position: relative;\n box-sizing: border-box;\n vertical-align: middle;\n"])));
32
33
  export var topRowStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral([""])));
33
34
  export var bottomRowStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n height: 16px;\n"])));
34
35
  export var rightColumnStyles = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral([""])));
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, colors.N70);
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));
36
37
  export var altWrapperStyles = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ", "\n font-weight: normal;\n"])), errorMessageStyles);
37
38
  export var titleWrapperStyles = function titleWrapperStyles(theme) {
38
39
  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({
39
- light: colors.N800,
40
- dark: colors.DN900
40
+ light: token('color.text', colors.N800),
41
+ dark: token('color.text', colors.DN900)
41
42
  })({
42
43
  theme: theme
43
44
  }));
44
45
  };
45
- export var subtitleStyles = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", " font-size: 12px;\n color: #5e6c84;\n"])), ellipsis('100px'));
46
+ export var subtitleStyles = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", " font-size: 12px;\n color: ", ";\n"])), ellipsis('100px'), token('color.text.subtlest', '#5e6c84'));
46
47
  export var metadataStyles = css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));