@atlaskit/media-card 74.2.0 → 74.3.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.
- package/CHANGELOG.md +20 -0
- package/dist/cjs/card/card.js +4 -4
- package/dist/cjs/card/cardImageView/cardOverlay/index.js +3 -1
- package/dist/cjs/card/cardImageView/cardOverlay/styles.js +8 -6
- package/dist/cjs/card/cardImageView/fileCardImageView.js +3 -1
- package/dist/cjs/card/cardImageView/styles.js +11 -7
- package/dist/cjs/card/getCardPreview/helpers.js +2 -2
- package/dist/cjs/card/getCardPreview/index.js +5 -5
- package/dist/cjs/card/styles/index.js +3 -1
- package/dist/cjs/card/ui/blanket/styles.js +3 -1
- package/dist/cjs/card/ui/iconMessage/styles.js +3 -1
- package/dist/cjs/card/ui/loadingRateLimited/styles.js +3 -1
- package/dist/cjs/card/ui/newFileExperience/styles.js +3 -1
- package/dist/cjs/card/ui/playButton/styles.js +4 -2
- package/dist/cjs/card/ui/progressBar/styles.js +5 -1
- package/dist/cjs/card/ui/styles.js +3 -1
- package/dist/cjs/card/ui/tickBox/styles.js +4 -2
- package/dist/cjs/card/ui/titleBox/failedTitleBox.js +3 -1
- package/dist/cjs/card/ui/titleBox/styles.js +3 -1
- package/dist/cjs/utils/cardActions/styles.js +6 -2
- package/dist/cjs/utils/errorIcon/styles.js +3 -1
- package/dist/cjs/utils/fileIcon/index.js +1 -1
- package/dist/cjs/utils/lightCards/styles.js +6 -4
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/card/card.js +4 -4
- package/dist/es2019/card/cardImageView/cardOverlay/index.js +2 -1
- package/dist/es2019/card/cardImageView/cardOverlay/styles.js +24 -55
- package/dist/es2019/card/cardImageView/fileCardImageView.js +3 -3
- package/dist/es2019/card/cardImageView/styles.js +10 -7
- package/dist/es2019/card/getCardPreview/helpers.js +2 -2
- package/dist/es2019/card/getCardPreview/index.js +4 -4
- package/dist/es2019/card/styles/index.js +2 -1
- package/dist/es2019/card/ui/blanket/styles.js +2 -1
- package/dist/es2019/card/ui/iconMessage/styles.js +2 -1
- package/dist/es2019/card/ui/loadingRateLimited/styles.js +2 -1
- package/dist/es2019/card/ui/newFileExperience/styles.js +9 -8
- package/dist/es2019/card/ui/playButton/styles.js +3 -2
- package/dist/es2019/card/ui/progressBar/styles.js +5 -2
- package/dist/es2019/card/ui/styles.js +2 -1
- package/dist/es2019/card/ui/tickBox/styles.js +5 -4
- package/dist/es2019/card/ui/titleBox/failedTitleBox.js +2 -1
- package/dist/es2019/card/ui/titleBox/styles.js +2 -1
- package/dist/es2019/utils/cardActions/styles.js +6 -5
- package/dist/es2019/utils/errorIcon/styles.js +2 -1
- package/dist/es2019/utils/fileIcon/index.js +1 -1
- package/dist/es2019/utils/lightCards/styles.js +6 -6
- package/dist/es2019/utils/progressBar/styles.js +1 -0
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/card/card.js +4 -4
- package/dist/esm/card/cardImageView/cardOverlay/index.js +2 -1
- package/dist/esm/card/cardImageView/cardOverlay/styles.js +8 -7
- package/dist/esm/card/cardImageView/fileCardImageView.js +3 -3
- package/dist/esm/card/cardImageView/styles.js +10 -7
- package/dist/esm/card/getCardPreview/helpers.js +2 -2
- package/dist/esm/card/getCardPreview/index.js +5 -5
- package/dist/esm/card/styles/index.js +2 -1
- package/dist/esm/card/ui/blanket/styles.js +2 -1
- package/dist/esm/card/ui/iconMessage/styles.js +2 -1
- package/dist/esm/card/ui/loadingRateLimited/styles.js +2 -1
- package/dist/esm/card/ui/newFileExperience/styles.js +2 -1
- package/dist/esm/card/ui/playButton/styles.js +3 -2
- package/dist/esm/card/ui/progressBar/styles.js +5 -2
- package/dist/esm/card/ui/styles.js +2 -1
- package/dist/esm/card/ui/tickBox/styles.js +3 -2
- package/dist/esm/card/ui/titleBox/failedTitleBox.js +2 -1
- package/dist/esm/card/ui/titleBox/styles.js +2 -1
- package/dist/esm/utils/cardActions/styles.js +4 -2
- package/dist/esm/utils/errorIcon/styles.js +2 -1
- package/dist/esm/utils/fileIcon/index.js +1 -1
- package/dist/esm/utils/lightCards/styles.js +6 -6
- package/dist/esm/utils/progressBar/styles.js +1 -0
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/card/getCardPreview/helpers.d.ts +2 -1
- package/dist/types/card/getCardPreview/index.d.ts +4 -4
- package/dist/types/card/styles/index.d.ts +1 -1
- package/example-helpers/styles.ts +10 -6
- package/package.json +13 -15
- package/report.api.md +44 -39
- package/dist/cjs/utils/mediaTypeIcon/iconWrapper.js +0 -20
- package/dist/cjs/utils/mediaTypeIcon/index.js +0 -81
- package/dist/cjs/utils/mediaTypeIcon/styles.js +0 -37
- package/dist/cjs/utils/mediaTypeIcon/types.js +0 -5
- package/dist/es2019/utils/mediaTypeIcon/iconWrapper.js +0 -9
- package/dist/es2019/utils/mediaTypeIcon/index.js +0 -35
- package/dist/es2019/utils/mediaTypeIcon/styles.js +0 -22
- package/dist/es2019/utils/mediaTypeIcon/types.js +0 -1
- package/dist/esm/utils/mediaTypeIcon/iconWrapper.js +0 -9
- package/dist/esm/utils/mediaTypeIcon/index.js +0 -59
- package/dist/esm/utils/mediaTypeIcon/styles.js +0 -24
- package/dist/esm/utils/mediaTypeIcon/types.js +0 -1
- package/dist/types/utils/mediaTypeIcon/iconWrapper.d.ts +0 -4
- package/dist/types/utils/mediaTypeIcon/index.d.ts +0 -10
- package/dist/types/utils/mediaTypeIcon/styles.d.ts +0 -2
- package/dist/types/utils/mediaTypeIcon/types.d.ts +0 -6
- package/dist/types-ts4.0/card/actions.d.ts +0 -9
- package/dist/types-ts4.0/card/card.d.ts +0 -60
- package/dist/types-ts4.0/card/cardAnalytics.d.ts +0 -9
- package/dist/types-ts4.0/card/cardConstants.d.ts +0 -1
- package/dist/types-ts4.0/card/cardImageView/cardImageViewWrapper.d.ts +0 -6
- package/dist/types-ts4.0/card/cardImageView/cardOverlay/cardOverlayComponents.d.ts +0 -8
- package/dist/types-ts4.0/card/cardImageView/cardOverlay/index.d.ts +0 -39
- package/dist/types-ts4.0/card/cardImageView/cardOverlay/styles.d.ts +0 -26
- package/dist/types-ts4.0/card/cardImageView/cardViewWrapper.d.ts +0 -4
- package/dist/types-ts4.0/card/cardImageView/classnames.d.ts +0 -2
- package/dist/types-ts4.0/card/cardImageView/fileCardImageView.d.ts +0 -49
- package/dist/types-ts4.0/card/cardImageView/index.d.ts +0 -2
- package/dist/types-ts4.0/card/cardImageView/styles.d.ts +0 -24
- package/dist/types-ts4.0/card/cardLoader.d.ts +0 -6
- package/dist/types-ts4.0/card/cardState.d.ts +0 -5
- package/dist/types-ts4.0/card/cardView.d.ts +0 -80
- package/dist/types-ts4.0/card/getCardPreview/cache.d.ts +0 -19
- package/dist/types-ts4.0/card/getCardPreview/filePreviewStatus.d.ts +0 -5
- package/dist/types-ts4.0/card/getCardPreview/helpers.d.ts +0 -9
- package/dist/types-ts4.0/card/getCardPreview/imageRefetchingAnalytics.d.ts +0 -10
- package/dist/types-ts4.0/card/getCardPreview/index.d.ts +0 -58
- package/dist/types-ts4.0/card/getCardStatus.d.ts +0 -4
- package/dist/types-ts4.0/card/index.d.ts +0 -1
- package/dist/types-ts4.0/card/inlinePlayer.d.ts +0 -52
- package/dist/types-ts4.0/card/inlinePlayerLazy.d.ts +0 -2
- package/dist/types-ts4.0/card/inlinePlayerWrapper.d.ts +0 -4
- package/dist/types-ts4.0/card/styles/animations.d.ts +0 -1
- package/dist/types-ts4.0/card/styles/config.d.ts +0 -1
- package/dist/types-ts4.0/card/styles/easing.d.ts +0 -2
- package/dist/types-ts4.0/card/styles/getSelectedBorderStyle.d.ts +0 -3
- package/dist/types-ts4.0/card/styles/index.d.ts +0 -9
- package/dist/types-ts4.0/card/styles/mixins.d.ts +0 -21
- package/dist/types-ts4.0/card/styles/styles.d.ts +0 -10
- package/dist/types-ts4.0/card/types.d.ts +0 -24
- package/dist/types-ts4.0/card/ui/actionsBar/actionsBar.d.ts +0 -5
- package/dist/types-ts4.0/card/ui/actionsBar/actionsBarWrapper.d.ts +0 -4
- package/dist/types-ts4.0/card/ui/actionsBar/styles.d.ts +0 -6
- package/dist/types-ts4.0/card/ui/actionsBar/types.d.ts +0 -10
- package/dist/types-ts4.0/card/ui/blanket/blanket.d.ts +0 -6
- package/dist/types-ts4.0/card/ui/blanket/styles.d.ts +0 -6
- package/dist/types-ts4.0/card/ui/common.d.ts +0 -23
- package/dist/types-ts4.0/card/ui/iconMessage/iconMessageWrapper.d.ts +0 -4
- package/dist/types-ts4.0/card/ui/iconMessage/index.d.ts +0 -8
- package/dist/types-ts4.0/card/ui/iconMessage/styles.d.ts +0 -5
- package/dist/types-ts4.0/card/ui/iconMessage/types.d.ts +0 -19
- package/dist/types-ts4.0/card/ui/iconWrapper/iconWrapper.d.ts +0 -4
- package/dist/types-ts4.0/card/ui/iconWrapper/styles.d.ts +0 -7
- package/dist/types-ts4.0/card/ui/iconWrapper/types.d.ts +0 -6
- package/dist/types-ts4.0/card/ui/imageRenderer/imageRenderer.d.ts +0 -15
- package/dist/types-ts4.0/card/ui/loadingRateLimited/styles.d.ts +0 -13
- package/dist/types-ts4.0/card/ui/newFileExperience/newFileExperienceWrapper.d.ts +0 -4
- package/dist/types-ts4.0/card/ui/newFileExperience/styles.d.ts +0 -5
- package/dist/types-ts4.0/card/ui/newFileExperience/types.d.ts +0 -23
- package/dist/types-ts4.0/card/ui/playButton/playButton.d.ts +0 -2
- package/dist/types-ts4.0/card/ui/playButton/playButtonBackground.d.ts +0 -3
- package/dist/types-ts4.0/card/ui/playButton/playButtonWrapper.d.ts +0 -3
- package/dist/types-ts4.0/card/ui/playButton/styles.d.ts +0 -5
- package/dist/types-ts4.0/card/ui/progressBar/progressBar.d.ts +0 -10
- package/dist/types-ts4.0/card/ui/progressBar/styledBar.d.ts +0 -4
- package/dist/types-ts4.0/card/ui/progressBar/styles.d.ts +0 -7
- package/dist/types-ts4.0/card/ui/progressBar/types.d.ts +0 -7
- package/dist/types-ts4.0/card/ui/styles.d.ts +0 -11
- package/dist/types-ts4.0/card/ui/tickBox/styles.d.ts +0 -7
- package/dist/types-ts4.0/card/ui/tickBox/tickBox.d.ts +0 -3
- package/dist/types-ts4.0/card/ui/tickBox/tickBoxWrapper.d.ts +0 -4
- package/dist/types-ts4.0/card/ui/tickBox/types.d.ts +0 -4
- package/dist/types-ts4.0/card/ui/titleBox/failedTitleBox.d.ts +0 -3
- package/dist/types-ts4.0/card/ui/titleBox/styles.d.ts +0 -15
- package/dist/types-ts4.0/card/ui/titleBox/titleBox.d.ts +0 -4
- package/dist/types-ts4.0/card/ui/titleBox/titleBoxComponents.d.ts +0 -8
- package/dist/types-ts4.0/card/ui/titleBox/types.d.ts +0 -32
- package/dist/types-ts4.0/classnames.d.ts +0 -5
- package/dist/types-ts4.0/errors.d.ts +0 -41
- package/dist/types-ts4.0/index.d.ts +0 -15
- package/dist/types-ts4.0/inline/index.d.ts +0 -1
- package/dist/types-ts4.0/inline/loader.d.ts +0 -25
- package/dist/types-ts4.0/inline/mediaInlineCard.d.ts +0 -14
- package/dist/types-ts4.0/types.d.ts +0 -96
- package/dist/types-ts4.0/utils/analytics.d.ts +0 -77
- package/dist/types-ts4.0/utils/breakpoint.d.ts +0 -11
- package/dist/types-ts4.0/utils/cardActions/cardActionButton.d.ts +0 -3
- package/dist/types-ts4.0/utils/cardActions/cardActionIconButton.d.ts +0 -12
- package/dist/types-ts4.0/utils/cardActions/cardActionsDropdownMenu.d.ts +0 -14
- package/dist/types-ts4.0/utils/cardActions/cardActionsView.d.ts +0 -16
- package/dist/types-ts4.0/utils/cardActions/index.d.ts +0 -7
- package/dist/types-ts4.0/utils/cardActions/styles.d.ts +0 -18
- package/dist/types-ts4.0/utils/cardDimensions.d.ts +0 -49
- package/dist/types-ts4.0/utils/containsPixelUnit.d.ts +0 -1
- package/dist/types-ts4.0/utils/dimensionComparer.d.ts +0 -3
- package/dist/types-ts4.0/utils/document.d.ts +0 -2
- package/dist/types-ts4.0/utils/errorIcon/index.d.ts +0 -12
- package/dist/types-ts4.0/utils/errorIcon/styles.d.ts +0 -1
- package/dist/types-ts4.0/utils/fileIcon/index.d.ts +0 -12
- package/dist/types-ts4.0/utils/fileIcon/styles.d.ts +0 -1
- package/dist/types-ts4.0/utils/generateUniqueId.d.ts +0 -1
- package/dist/types-ts4.0/utils/getCSSUnitValue.d.ts +0 -1
- package/dist/types-ts4.0/utils/getDataURIDimension.d.ts +0 -9
- package/dist/types-ts4.0/utils/getElementDimension.d.ts +0 -2
- package/dist/types-ts4.0/utils/getErrorMessage.d.ts +0 -2
- package/dist/types-ts4.0/utils/getMediaCardCursor.d.ts +0 -6
- package/dist/types-ts4.0/utils/globalScope/getSSRData.d.ts +0 -3
- package/dist/types-ts4.0/utils/globalScope/globalScope.d.ts +0 -21
- package/dist/types-ts4.0/utils/globalScope/index.d.ts +0 -4
- package/dist/types-ts4.0/utils/globalScope/types.d.ts +0 -8
- package/dist/types-ts4.0/utils/index.d.ts +0 -14
- package/dist/types-ts4.0/utils/isRetina.d.ts +0 -1
- package/dist/types-ts4.0/utils/isValidPercentageUnit.d.ts +0 -1
- package/dist/types-ts4.0/utils/lightCards/cardError.d.ts +0 -12
- package/dist/types-ts4.0/utils/lightCards/cardLoading.d.ts +0 -5
- package/dist/types-ts4.0/utils/lightCards/getDimensionsWithDefault.d.ts +0 -2
- package/dist/types-ts4.0/utils/lightCards/lightCardWrappers.d.ts +0 -5
- package/dist/types-ts4.0/utils/lightCards/styles.d.ts +0 -4
- package/dist/types-ts4.0/utils/lightCards/types.d.ts +0 -15
- package/dist/types-ts4.0/utils/media-card-analytics-error-boundary.d.ts +0 -10
- package/dist/types-ts4.0/utils/mediaTypeIcon/iconWrapper.d.ts +0 -4
- package/dist/types-ts4.0/utils/mediaTypeIcon/index.d.ts +0 -10
- package/dist/types-ts4.0/utils/mediaTypeIcon/styles.d.ts +0 -2
- package/dist/types-ts4.0/utils/mediaTypeIcon/types.d.ts +0 -6
- package/dist/types-ts4.0/utils/metadata.d.ts +0 -2
- package/dist/types-ts4.0/utils/objectURLCache.d.ts +0 -11
- package/dist/types-ts4.0/utils/preventClickThrough.d.ts +0 -8
- package/dist/types-ts4.0/utils/printScript.d.ts +0 -2
- package/dist/types-ts4.0/utils/progressBar/index.d.ts +0 -9
- package/dist/types-ts4.0/utils/progressBar/styles.d.ts +0 -1
- package/dist/types-ts4.0/utils/resizeModeToMediaImageProps.d.ts +0 -5
- package/dist/types-ts4.0/utils/shouldDisplayImageThumbnail.d.ts +0 -3
- package/dist/types-ts4.0/utils/ufoExperiences.d.ts +0 -7
- package/dist/types-ts4.0/utils/videoSnapshot.d.ts +0 -1
- package/dist/types-ts4.0/utils/viewportDetector.d.ts +0 -6
package/dist/es2019/card/card.js
CHANGED
|
@@ -26,7 +26,7 @@ import { getMediaCardCursor } from '../utils/getMediaCardCursor';
|
|
|
26
26
|
import { completeUfoExperience, startUfoExperience } from '../utils/ufoExperiences';
|
|
27
27
|
import { generateUniqueId } from '../utils/generateUniqueId';
|
|
28
28
|
const packageName = "@atlaskit/media-card";
|
|
29
|
-
const packageVersion = "74.
|
|
29
|
+
const packageVersion = "74.3.1";
|
|
30
30
|
export class CardBase extends Component {
|
|
31
31
|
// An internalOccurrenceKey is a randomly generated value to differentiate various instances
|
|
32
32
|
// of Cards regardless of whether it shares the same file (either internal or external)
|
|
@@ -96,7 +96,7 @@ export class CardBase extends Component {
|
|
|
96
96
|
} : undefined;
|
|
97
97
|
});
|
|
98
98
|
|
|
99
|
-
_defineProperty(this, "getCardPreviewParams", (identifier, fileState
|
|
99
|
+
_defineProperty(this, "getCardPreviewParams", (identifier, fileState) => {
|
|
100
100
|
const {
|
|
101
101
|
isBannedLocalPreview
|
|
102
102
|
} = this.state;
|
|
@@ -119,7 +119,7 @@ export class CardBase extends Component {
|
|
|
119
119
|
mediaBlobUrlAttrs: this.getMediaBlobUrlAttrs(identifier, fileState),
|
|
120
120
|
createAnalyticsEvent,
|
|
121
121
|
featureFlags: this.props.featureFlags,
|
|
122
|
-
|
|
122
|
+
traceContext: this.traceContext
|
|
123
123
|
};
|
|
124
124
|
});
|
|
125
125
|
|
|
@@ -153,7 +153,7 @@ export class CardBase extends Component {
|
|
|
153
153
|
|
|
154
154
|
_defineProperty(this, "resolvePreview", async (identifier, fileState) => {
|
|
155
155
|
try {
|
|
156
|
-
const params = this.getCardPreviewParams(identifier, fileState
|
|
156
|
+
const params = this.getCardPreviewParams(identifier, fileState);
|
|
157
157
|
const cardPreview = await getCardPreview(params);
|
|
158
158
|
this.safeSetState({
|
|
159
159
|
cardPreview
|
|
@@ -5,6 +5,7 @@ import { jsx } from '@emotion/react';
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { Component } from 'react';
|
|
7
7
|
import cx from 'classnames';
|
|
8
|
+
import { token } from '@atlaskit/tokens';
|
|
8
9
|
import TickIcon from '@atlaskit/icon/glyph/check';
|
|
9
10
|
import { Ellipsify } from '@atlaskit/media-ui'; // We dont require things directly from "utils" to avoid circular dependencies
|
|
10
11
|
|
|
@@ -75,7 +76,7 @@ export class CardOverlay extends Component {
|
|
|
75
76
|
actions
|
|
76
77
|
} = this.props;
|
|
77
78
|
const titleText = resolveTitleText(cardStatus, mediaName, error, selected);
|
|
78
|
-
const menuTriggerColor = !persistent ? 'white' : undefined;
|
|
79
|
+
const menuTriggerColor = !persistent ? token('color.icon.inverse', 'white') : undefined;
|
|
79
80
|
return jsx(Overlay, {
|
|
80
81
|
hasError: !!error,
|
|
81
82
|
noHover: noHover,
|
|
@@ -8,23 +8,24 @@ import { css } from '@emotion/react';
|
|
|
8
8
|
import { borderRadius, size, ellipsis, absolute } from '@atlaskit/media-ui';
|
|
9
9
|
import { themed } from '@atlaskit/theme/components';
|
|
10
10
|
import * as colors from '@atlaskit/theme/colors';
|
|
11
|
-
import {
|
|
11
|
+
import { token } from '@atlaskit/tokens';
|
|
12
|
+
import { rgba, easeOutCubic, transition, antialiased } from '../../styles';
|
|
12
13
|
export const tickBoxStyles = css`
|
|
13
14
|
${size(14)}
|
|
14
15
|
${transition()}
|
|
15
|
-
background-color: ${rgba('#ffffff', 0.5)};
|
|
16
|
+
background-color: ${token('elevation.surface.overlay', rgba('#ffffff', 0.5))};
|
|
16
17
|
position: absolute;
|
|
17
18
|
top: 8px;
|
|
18
19
|
right: 8px;
|
|
19
20
|
border-radius: 20px;
|
|
20
|
-
color: #798599; /* TODO FIL-3884: Align color with new design */
|
|
21
|
+
color: ${token('color.icon.subtle', '#798599')}; /* CLEANUP - TODO FIL-3884: Align color with new design */
|
|
21
22
|
display: flex;
|
|
22
23
|
opacity: 0;
|
|
23
24
|
|
|
24
25
|
&.selected {
|
|
25
26
|
opacity: 1;
|
|
26
|
-
color: white;
|
|
27
|
-
background-color: #0052cc; /* TODO FIL-3884: Align with tickbox icons */
|
|
27
|
+
color: ${token('color.icon.inverse', 'white')};
|
|
28
|
+
background-color: ${token('color.icon.selected', '#0052cc')}; /* CLEANUP - TODO FIL-3884: Align with tickbox icons */
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
/* Enforce dimensions of "tick" icon */
|
|
@@ -63,13 +64,7 @@ export const overlayStyles = props => css`
|
|
|
63
64
|
&:not(.persistent):hover, &.active {
|
|
64
65
|
.top-row {
|
|
65
66
|
.title {
|
|
66
|
-
color: ${colors.B400};
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.bottom-row {
|
|
71
|
-
.delete-btn {
|
|
72
|
-
display: flex;
|
|
67
|
+
color: ${token('color.text.information', colors.B400)};
|
|
73
68
|
}
|
|
74
69
|
}
|
|
75
70
|
}
|
|
@@ -77,7 +72,7 @@ export const overlayStyles = props => css`
|
|
|
77
72
|
&.noHover:hover {
|
|
78
73
|
.top-row {
|
|
79
74
|
.title {
|
|
80
|
-
color: ${colors.N800};
|
|
75
|
+
color: ${token('color.text', colors.N800)};
|
|
81
76
|
}
|
|
82
77
|
}
|
|
83
78
|
}
|
|
@@ -88,22 +83,22 @@ export const overlayStyles = props => css`
|
|
|
88
83
|
|
|
89
84
|
&:not(.persistent) {
|
|
90
85
|
&:not(.error, .noHover):hover {
|
|
91
|
-
background-color: ${rgba(colors.N900, 0.06)};
|
|
86
|
+
background-color: ${token('color.background.neutral.hovered', rgba(colors.N900, 0.06))};
|
|
92
87
|
}
|
|
93
88
|
|
|
94
89
|
&.selectable {
|
|
95
90
|
&.selected {
|
|
96
|
-
background-color: ${colors.B200};
|
|
91
|
+
background-color: ${token('color.background.selected', colors.B200)};
|
|
97
92
|
|
|
98
93
|
&:hover {
|
|
99
|
-
/* TODO FIL-3884 add new overlay with rgba(colors.N900, 0.16) */
|
|
94
|
+
/* CLEANUP - TODO FIL-3884 add new overlay with rgba(colors.N900, 0.16) */
|
|
95
|
+
background-color: ${token('color.background.selected.hovered', rgba(colors.N900, 0.16))};
|
|
100
96
|
}
|
|
101
97
|
|
|
102
98
|
.title,
|
|
103
99
|
.bottom-row,
|
|
104
|
-
.file-size
|
|
105
|
-
|
|
106
|
-
color: ${colors.N0};
|
|
100
|
+
.file-size {
|
|
101
|
+
color: ${token('color.text', colors.N900)};
|
|
107
102
|
}
|
|
108
103
|
}
|
|
109
104
|
}
|
|
@@ -118,7 +113,7 @@ export const overlayStyles = props => css`
|
|
|
118
113
|
.title {
|
|
119
114
|
transition: opacity 0.3s;
|
|
120
115
|
opacity: 0;
|
|
121
|
-
color: white;
|
|
116
|
+
color: ${token('color.text', 'white')};
|
|
122
117
|
visibility: hidden;
|
|
123
118
|
}
|
|
124
119
|
}
|
|
@@ -134,31 +129,14 @@ export const overlayStyles = props => css`
|
|
|
134
129
|
}
|
|
135
130
|
|
|
136
131
|
.file-size {
|
|
137
|
-
color: white;
|
|
138
|
-
display: none;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.more-btn {
|
|
142
|
-
color: ${colors.N0};
|
|
143
|
-
display: none;
|
|
144
|
-
|
|
145
|
-
&:hover {
|
|
146
|
-
background-color: rgba(9, 30, 66, 0.2);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.delete-btn {
|
|
132
|
+
color: ${token('color.text', 'white')};
|
|
151
133
|
display: none;
|
|
152
|
-
|
|
153
|
-
&:hover {
|
|
154
|
-
background-color: rgba(9, 30, 66, 0.2);
|
|
155
|
-
}
|
|
156
134
|
}
|
|
157
135
|
}
|
|
158
136
|
|
|
159
137
|
&:hover,
|
|
160
138
|
&.active {
|
|
161
|
-
background-color: ${rgba(colors.N900, 0.5)};
|
|
139
|
+
background-color: ${token('color.interaction.hovered', rgba(colors.N900, 0.5))};
|
|
162
140
|
|
|
163
141
|
.title {
|
|
164
142
|
opacity: 1;
|
|
@@ -170,14 +148,6 @@ export const overlayStyles = props => css`
|
|
|
170
148
|
display: block;
|
|
171
149
|
}
|
|
172
150
|
|
|
173
|
-
.more-btn {
|
|
174
|
-
${centerX} color: ${colors.N0};
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.delete-btn {
|
|
178
|
-
display: flex;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
151
|
.bottom-row {
|
|
182
152
|
opacity: 1;
|
|
183
153
|
transform: translateY(0);
|
|
@@ -194,9 +164,8 @@ export const overlayStyles = props => css`
|
|
|
194
164
|
|
|
195
165
|
&.selected {
|
|
196
166
|
.tickbox {
|
|
197
|
-
background-color: ${colors.B200} !important;
|
|
198
|
-
|
|
199
|
-
color: white;
|
|
167
|
+
background-color: ${token('color.background.selected.bold', colors.B200)} !important;
|
|
168
|
+
color: ${token('color.icon.inverse', 'white')};
|
|
200
169
|
}
|
|
201
170
|
}
|
|
202
171
|
}
|
|
@@ -210,7 +179,7 @@ export const overlayStyles = props => css`
|
|
|
210
179
|
&.active {
|
|
211
180
|
.top-row {
|
|
212
181
|
.title {
|
|
213
|
-
color: ${colors.N800};
|
|
182
|
+
color: ${token('color.text', colors.N800)};
|
|
214
183
|
}
|
|
215
184
|
}
|
|
216
185
|
}
|
|
@@ -238,7 +207,7 @@ export const errorMessageStyles = css`
|
|
|
238
207
|
${antialiased} display: inline-block;
|
|
239
208
|
vertical-align: middle;
|
|
240
209
|
font-weight: bold;
|
|
241
|
-
color: ${colors.N70};
|
|
210
|
+
color: ${token('color.text.subtlest', colors.N70)};
|
|
242
211
|
font-size: 12px;
|
|
243
212
|
line-height: 15px;
|
|
244
213
|
overflow: hidden;
|
|
@@ -255,8 +224,8 @@ export const titleWrapperStyles = theme => css`
|
|
|
255
224
|
box-sizing: border-box;
|
|
256
225
|
word-wrap: break-word;
|
|
257
226
|
color: ${themed({
|
|
258
|
-
light: colors.N800,
|
|
259
|
-
dark: colors.DN900
|
|
227
|
+
light: token('color.text', colors.N800),
|
|
228
|
+
dark: token('color.text', colors.DN900)
|
|
260
229
|
})({
|
|
261
230
|
theme
|
|
262
231
|
})};
|
|
@@ -265,7 +234,7 @@ export const titleWrapperStyles = theme => css`
|
|
|
265
234
|
`;
|
|
266
235
|
export const subtitleStyles = css`
|
|
267
236
|
${ellipsis('100px')} font-size: 12px;
|
|
268
|
-
color: #5e6c84;
|
|
237
|
+
color: ${token('color.text.subtlest', '#5e6c84')};
|
|
269
238
|
`;
|
|
270
239
|
export const metadataStyles = css`
|
|
271
240
|
display: flex;
|
|
@@ -2,8 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
|
|
3
3
|
/**@jsx jsx */
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import {
|
|
5
|
+
import React, { Component } from 'react';
|
|
6
|
+
import { token } from '@atlaskit/tokens';
|
|
7
7
|
import { Ellipsify, MediaImage } from '@atlaskit/media-ui';
|
|
8
8
|
import VidPlayIcon from '@atlaskit/icon/glyph/vid-play';
|
|
9
9
|
import { CardOverlay } from './cardOverlay';
|
|
@@ -220,7 +220,7 @@ export class FileCardImageView extends Component {
|
|
|
220
220
|
css: cardActionsWrapperStyles
|
|
221
221
|
}, actions ? jsx(CardActions, {
|
|
222
222
|
actions: actions,
|
|
223
|
-
triggerColor:
|
|
223
|
+
triggerColor: token('color.icon.inverse', 'white')
|
|
224
224
|
}) : null))));
|
|
225
225
|
});
|
|
226
226
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
+
import { token } from '@atlaskit/tokens';
|
|
2
3
|
import { absolute, borderRadius, size } from '@atlaskit/media-ui';
|
|
3
4
|
import { themed } from '@atlaskit/theme/components';
|
|
4
5
|
import { N20, DN50, N0 } from '@atlaskit/theme/colors';
|
|
@@ -17,8 +18,8 @@ const getBackgroundColor = props => {
|
|
|
17
18
|
mediaType
|
|
18
19
|
} = props;
|
|
19
20
|
return `background: ${mediaType === 'image' ? 'transparent' : themed({
|
|
20
|
-
light: N20,
|
|
21
|
-
dark: DN50
|
|
21
|
+
light: token('color.background.neutral', N20),
|
|
22
|
+
dark: token('color.background.neutral', DN50)
|
|
22
23
|
})(props)};`;
|
|
23
24
|
};
|
|
24
25
|
|
|
@@ -58,7 +59,7 @@ export const playIconWrapperStyles = css`
|
|
|
58
59
|
display: flex;
|
|
59
60
|
align-items: center;
|
|
60
61
|
justify-content: center;
|
|
61
|
-
color: white;
|
|
62
|
+
color: ${token('color.icon.inverse', 'white')};
|
|
62
63
|
|
|
63
64
|
/* we want to override default icon size and hover state */
|
|
64
65
|
&:hover > * {
|
|
@@ -67,7 +68,7 @@ export const playIconWrapperStyles = css`
|
|
|
67
68
|
}
|
|
68
69
|
`;
|
|
69
70
|
export const playIconBackgroundStyles = css`
|
|
70
|
-
background: rgba(23, 43, 77, 0.7);
|
|
71
|
+
background: ${token('color.background.neutral.bold', 'rgba(23, 43, 77, 0.7)')};
|
|
71
72
|
border-radius: 100%;
|
|
72
73
|
padding: 10px;
|
|
73
74
|
display: flex;
|
|
@@ -88,12 +89,12 @@ export const overlayStyles = css`
|
|
|
88
89
|
${absolute()}
|
|
89
90
|
${size()}
|
|
90
91
|
border-radius: inherit;
|
|
91
|
-
background-color: rgba(9, 30, 66, 0.5);
|
|
92
|
+
background-color: ${token('color.blanket', 'rgba(9, 30, 66, 0.5)')};
|
|
92
93
|
`;
|
|
93
94
|
export const titleStyles = css`
|
|
94
95
|
${absolute()} width: 100%;
|
|
95
96
|
padding: 8px;
|
|
96
|
-
color: ${N0};
|
|
97
|
+
color: ${token('color.text.inverse', N0)};
|
|
97
98
|
font-size: 12px;
|
|
98
99
|
line-height: 18px;
|
|
99
100
|
word-wrap: break-word;
|
|
@@ -104,8 +105,10 @@ export const bodyStyles = css`
|
|
|
104
105
|
bottom: 0;
|
|
105
106
|
width: 100%;
|
|
106
107
|
padding: 8px;
|
|
107
|
-
color: ${N0};
|
|
108
|
+
color: ${token('color.text.inverse', N0)};
|
|
108
109
|
`;
|
|
110
|
+
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
111
|
+
|
|
109
112
|
export const progressWrapperStyles = css`
|
|
110
113
|
flex-grow: 1;
|
|
111
114
|
|
|
@@ -69,9 +69,9 @@ export const getCardPreviewFromFilePreview = async filePreview => {
|
|
|
69
69
|
|
|
70
70
|
throw new LocalPreviewError('local-preview-unsupported');
|
|
71
71
|
};
|
|
72
|
-
export const getCardPreviewFromBackend = async (mediaClient, id, params,
|
|
72
|
+
export const getCardPreviewFromBackend = async (mediaClient, id, params, traceContext) => {
|
|
73
73
|
try {
|
|
74
|
-
const blob = await mediaClient.getImage(id, params, undefined, undefined,
|
|
74
|
+
const blob = await mediaClient.getImage(id, params, undefined, undefined, traceContext);
|
|
75
75
|
return {
|
|
76
76
|
dataURI: URL.createObjectURL(blob),
|
|
77
77
|
orientation: 1,
|
|
@@ -76,7 +76,7 @@ export const getCardPreview = async ({
|
|
|
76
76
|
mediaBlobUrlAttrs,
|
|
77
77
|
createAnalyticsEvent,
|
|
78
78
|
featureFlags,
|
|
79
|
-
|
|
79
|
+
traceContext
|
|
80
80
|
}) => {
|
|
81
81
|
const mode = imageUrlParams.mode;
|
|
82
82
|
const cachedPreview = cardPreviewCache.get(id, mode);
|
|
@@ -137,7 +137,7 @@ export const getCardPreview = async ({
|
|
|
137
137
|
throw new MediaCardError('remote-preview-not-ready');
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
const remotePreview = await fetchAndCacheRemotePreview(mediaClient, id, dimensions, imageUrlParams, mediaBlobUrlAttrs,
|
|
140
|
+
const remotePreview = await fetchAndCacheRemotePreview(mediaClient, id, dimensions, imageUrlParams, mediaBlobUrlAttrs, traceContext);
|
|
141
141
|
|
|
142
142
|
if (getMediaFeatureFlag('memoryCacheLogging', featureFlags)) {
|
|
143
143
|
createAnalyticsEvent && fireImageFetchingOperationalEvent(createAnalyticsEvent, 'remote-success', {
|
|
@@ -198,8 +198,8 @@ export const isSSRClientPreview = preview => {
|
|
|
198
198
|
return ssrClientSources.includes(preview.source);
|
|
199
199
|
};
|
|
200
200
|
export const isSSRDataPreview = preview => preview.source === 'ssr-data';
|
|
201
|
-
export const fetchAndCacheRemotePreview = async (mediaClient, id, dimensions, params, mediaBlobUrlAttrs,
|
|
202
|
-
const remotePreview = await getCardPreviewFromBackend(mediaClient, id, params,
|
|
201
|
+
export const fetchAndCacheRemotePreview = async (mediaClient, id, dimensions, params, mediaBlobUrlAttrs, traceContext) => {
|
|
202
|
+
const remotePreview = await getCardPreviewFromBackend(mediaClient, id, params, traceContext);
|
|
203
203
|
return extendAndCachePreview(id, params.mode, { ...remotePreview,
|
|
204
204
|
dimensions
|
|
205
205
|
}, mediaBlobUrlAttrs);
|
|
@@ -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
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
|
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
|
|
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:
|
|
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;
|
|
@@ -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
|
-
|
|
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,7 +1,7 @@
|
|
|
1
1
|
/**@jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { Component } from 'react';
|
|
4
|
-
import { MediaTypeIcon } from '
|
|
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 {
|