@atlaskit/media-card 74.4.0 → 74.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/cardImageView/cardOverlay/index.js +1 -3
- package/dist/cjs/card/cardImageView/cardOverlay/styles.js +6 -8
- package/dist/cjs/card/cardImageView/fileCardImageView.js +1 -3
- package/dist/cjs/card/cardImageView/styles.js +7 -9
- package/dist/cjs/card/cardState.js +1 -1
- package/dist/cjs/card/getCardStatus.js +34 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/styles/index.js +1 -3
- package/dist/cjs/card/ui/blanket/styles.js +1 -3
- package/dist/cjs/card/ui/iconMessage/styles.js +1 -3
- package/dist/cjs/card/ui/loadingRateLimited/styles.js +1 -3
- package/dist/cjs/card/ui/newFileExperience/newFileExperienceWrapper.js +5 -1
- package/dist/cjs/card/ui/newFileExperience/styles.js +12 -4
- package/dist/cjs/card/ui/playButton/styles.js +2 -4
- package/dist/cjs/card/ui/styles.js +1 -3
- package/dist/cjs/card/ui/tickBox/styles.js +2 -4
- package/dist/cjs/card/ui/titleBox/failedTitleBox.js +1 -3
- package/dist/cjs/card/ui/titleBox/styles.js +19 -5
- package/dist/cjs/card/ui/titleBox/titleBoxComponents.js +5 -1
- package/dist/cjs/card/ui/unhandledErrorCard/index.js +2 -4
- package/dist/cjs/inline/mediaInlineAnalyticsErrorBoundary.js +1 -1
- package/dist/cjs/utils/analytics.js +2 -1
- package/dist/cjs/utils/cardActions/styles.js +2 -4
- package/dist/cjs/utils/errorIcon/styles.js +1 -3
- package/dist/cjs/utils/lightCards/styles.js +4 -6
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/cjs/utils/viewportDetector.js +4 -12
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/cardImageView/cardOverlay/index.js +1 -2
- package/dist/es2019/card/cardImageView/cardOverlay/styles.js +20 -21
- package/dist/es2019/card/cardImageView/fileCardImageView.js +1 -2
- package/dist/es2019/card/cardImageView/styles.js +7 -8
- package/dist/es2019/card/cardState.js +1 -1
- package/dist/es2019/card/getCardStatus.js +34 -1
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/styles/index.js +1 -2
- package/dist/es2019/card/ui/blanket/styles.js +1 -2
- package/dist/es2019/card/ui/iconMessage/styles.js +1 -2
- package/dist/es2019/card/ui/loadingRateLimited/styles.js +1 -2
- package/dist/es2019/card/ui/newFileExperience/newFileExperienceWrapper.js +4 -1
- package/dist/es2019/card/ui/newFileExperience/styles.js +10 -3
- package/dist/es2019/card/ui/playButton/styles.js +2 -3
- package/dist/es2019/card/ui/styles.js +1 -2
- package/dist/es2019/card/ui/tickBox/styles.js +4 -5
- package/dist/es2019/card/ui/titleBox/failedTitleBox.js +1 -2
- package/dist/es2019/card/ui/titleBox/styles.js +20 -7
- package/dist/es2019/card/ui/titleBox/titleBoxComponents.js +4 -1
- package/dist/es2019/card/ui/unhandledErrorCard/index.js +3 -4
- package/dist/es2019/inline/mediaInlineAnalyticsErrorBoundary.js +1 -1
- package/dist/es2019/utils/analytics.js +2 -1
- package/dist/es2019/utils/cardActions/styles.js +4 -5
- package/dist/es2019/utils/errorIcon/styles.js +1 -2
- package/dist/es2019/utils/lightCards/styles.js +4 -5
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/es2019/utils/viewportDetector.js +4 -12
- package/dist/es2019/version.json +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/cardImageView/cardOverlay/index.js +1 -2
- package/dist/esm/card/cardImageView/cardOverlay/styles.js +6 -7
- package/dist/esm/card/cardImageView/fileCardImageView.js +1 -2
- package/dist/esm/card/cardImageView/styles.js +7 -8
- package/dist/esm/card/cardState.js +1 -1
- package/dist/esm/card/getCardStatus.js +34 -1
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/styles/index.js +1 -2
- package/dist/esm/card/ui/blanket/styles.js +1 -2
- package/dist/esm/card/ui/iconMessage/styles.js +1 -2
- package/dist/esm/card/ui/loadingRateLimited/styles.js +1 -2
- package/dist/esm/card/ui/newFileExperience/newFileExperienceWrapper.js +4 -1
- package/dist/esm/card/ui/newFileExperience/styles.js +10 -3
- package/dist/esm/card/ui/playButton/styles.js +2 -3
- package/dist/esm/card/ui/styles.js +1 -2
- package/dist/esm/card/ui/tickBox/styles.js +2 -3
- package/dist/esm/card/ui/titleBox/failedTitleBox.js +1 -2
- package/dist/esm/card/ui/titleBox/styles.js +19 -5
- package/dist/esm/card/ui/titleBox/titleBoxComponents.js +4 -1
- package/dist/esm/card/ui/unhandledErrorCard/index.js +2 -3
- package/dist/esm/inline/mediaInlineAnalyticsErrorBoundary.js +1 -1
- package/dist/esm/utils/analytics.js +2 -1
- package/dist/esm/utils/cardActions/styles.js +2 -3
- package/dist/esm/utils/errorIcon/styles.js +1 -2
- package/dist/esm/utils/lightCards/styles.js +4 -5
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/esm/utils/viewportDetector.js +4 -12
- package/dist/esm/version.json +1 -1
- package/dist/types/card/getCardStatus.d.ts +2 -1
- package/dist/types/card/ui/newFileExperience/styles.d.ts +1 -1
- package/dist/types/card/ui/newFileExperience/types.d.ts +2 -0
- package/dist/types/card/ui/titleBox/styles.d.ts +1 -1
- package/dist/types/card/ui/titleBox/types.d.ts +2 -0
- package/package.json +8 -8
- package/report.api.md +16 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import { token } from '@atlaskit/tokens';
|
|
3
2
|
import { responsiveSettings, getTitleBoxHeight, Breakpoint } from '../common';
|
|
4
|
-
import { N0 } from '@atlaskit/theme/colors';
|
|
3
|
+
import { N0, N800 } from '@atlaskit/theme/colors';
|
|
5
4
|
import { rgba } from '../../styles/mixins';
|
|
5
|
+
import { themed } from '@atlaskit/theme/components';
|
|
6
6
|
|
|
7
7
|
const generateResponsiveStyles = (breakpoint = Breakpoint.SMALL) => {
|
|
8
8
|
const setting = responsiveSettings[breakpoint];
|
|
@@ -14,15 +14,29 @@ const generateResponsiveStyles = (breakpoint = Breakpoint.SMALL) => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
const HEX_REGEX = /^#[0-9A-F]{6}$/i;
|
|
17
|
+
const BACKGROUND_COLOR_DARK = '#161a1d';
|
|
18
|
+
const TEXT_COLOR_DARK = '#C7D1DB';
|
|
17
19
|
export const titleBoxWrapperStyles = ({
|
|
18
20
|
breakpoint,
|
|
19
|
-
titleBoxBgColor
|
|
21
|
+
titleBoxBgColor,
|
|
22
|
+
theme
|
|
20
23
|
}) => css`
|
|
21
24
|
position: absolute;
|
|
22
25
|
bottom: 0;
|
|
23
26
|
width: 100%;
|
|
24
|
-
background-color: ${
|
|
25
|
-
|
|
27
|
+
background-color: ${themed({
|
|
28
|
+
light: `var(--ds-surface, ${rgba(titleBoxBgColor && HEX_REGEX.test(titleBoxBgColor) ? titleBoxBgColor : N0, 1)})`,
|
|
29
|
+
dark: `var(--ds-surface, ${rgba( // theme does not contain this color, use constant instead
|
|
30
|
+
titleBoxBgColor && HEX_REGEX.test(titleBoxBgColor) ? titleBoxBgColor : BACKGROUND_COLOR_DARK, 1)})`
|
|
31
|
+
})({
|
|
32
|
+
theme
|
|
33
|
+
})};
|
|
34
|
+
color: ${themed({
|
|
35
|
+
light: `var(--ds-text, ${N800})`,
|
|
36
|
+
dark: `var(--ds-text, ${TEXT_COLOR_DARK})`
|
|
37
|
+
})({
|
|
38
|
+
theme
|
|
39
|
+
})};
|
|
26
40
|
cursor: inherit;
|
|
27
41
|
pointer-events: none;
|
|
28
42
|
display: flex;
|
|
@@ -31,8 +45,7 @@ export const titleBoxWrapperStyles = ({
|
|
|
31
45
|
${generateResponsiveStyles(breakpoint)}
|
|
32
46
|
`;
|
|
33
47
|
titleBoxWrapperStyles.displayName = 'TitleBoxWrapper';
|
|
34
|
-
const infoStyles = `white-space: nowrap;
|
|
35
|
-
overflow: hidden;`;
|
|
48
|
+
const infoStyles = `white-space: nowrap;overflow: hidden;`;
|
|
36
49
|
const iconOverlapStyles = `padding-right: 10px;`;
|
|
37
50
|
export const titleBoxHeaderStyles = ({
|
|
38
51
|
hasIconOverlap
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { errorMessageWrapperStyles, titleBoxFooterStyles, titleBoxHeaderStyles, titleBoxIconStyles, titleBoxWrapperStyles } from './styles';
|
|
4
|
+
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
4
5
|
export const TitleBoxWrapper = props => {
|
|
5
6
|
const {
|
|
6
7
|
breakpoint,
|
|
7
8
|
titleBoxBgColor
|
|
8
9
|
} = props;
|
|
10
|
+
const theme = useGlobalTheme();
|
|
9
11
|
return jsx("div", {
|
|
10
12
|
id: "titleBoxWrapper",
|
|
11
13
|
css: titleBoxWrapperStyles({
|
|
12
14
|
breakpoint: breakpoint,
|
|
13
|
-
titleBoxBgColor: titleBoxBgColor
|
|
15
|
+
titleBoxBgColor: titleBoxBgColor,
|
|
16
|
+
theme
|
|
14
17
|
})
|
|
15
18
|
}, props.children);
|
|
16
19
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
|
-
import { token } from '@atlaskit/tokens';
|
|
5
4
|
import WarningIcon from '@atlaskit/icon/glyph/editor/warning';
|
|
6
5
|
import { N20, N800, Y500 } from '@atlaskit/theme/colors';
|
|
7
6
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
@@ -42,8 +41,8 @@ const wrapperStyles = (dimensions = defaultImageCardDimensions) => {
|
|
|
42
41
|
return css`
|
|
43
42
|
${center};
|
|
44
43
|
${borderRadius};
|
|
45
|
-
background: ${
|
|
46
|
-
color: ${
|
|
44
|
+
background: ${`var(--ds-background-neutral, ${N20})`};
|
|
45
|
+
color: ${`var(--ds-text-subtle, ${N800})`};
|
|
47
46
|
max-height: 100%;
|
|
48
47
|
max-width: 100%;
|
|
49
48
|
${getConvertedDimension(dimensions)};
|
|
@@ -72,7 +71,7 @@ export class UnhandledErrorCard extends Component {
|
|
|
72
71
|
onClick: onClick
|
|
73
72
|
}, jsx(WarningIcon, {
|
|
74
73
|
label: "Error",
|
|
75
|
-
primaryColor:
|
|
74
|
+
primaryColor: `var(--ds-icon-warning, ${Y500})`,
|
|
76
75
|
size: "medium"
|
|
77
76
|
}), jsx("p", null, "We couldn't load this content"));
|
|
78
77
|
}
|
|
@@ -65,7 +65,7 @@ class WrappedMediaInlineAnalyticsErrorBoundary extends React.Component {
|
|
|
65
65
|
_defineProperty(WrappedMediaInlineAnalyticsErrorBoundary, "displayName", 'MediaInlineAnalyticsErrorBoundary');
|
|
66
66
|
|
|
67
67
|
const packageName = "@atlaskit/media-card";
|
|
68
|
-
const packageVersion = "74.
|
|
68
|
+
const packageVersion = "74.5.0";
|
|
69
69
|
const MediaInlineAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
70
70
|
packageVersion,
|
|
71
71
|
packageName,
|
|
@@ -9,7 +9,8 @@ const relevantFlags = {
|
|
|
9
9
|
observedWidth: true,
|
|
10
10
|
mediaInline: false,
|
|
11
11
|
folderUploads: false,
|
|
12
|
-
memoryCacheLogging: true
|
|
12
|
+
memoryCacheLogging: true,
|
|
13
|
+
fetchFileStateAfterUpload: true
|
|
13
14
|
};
|
|
14
15
|
export const LOGGED_FEATURE_FLAGS = filterFeatureFlagNames(relevantFlags);
|
|
15
16
|
export const LOGGED_FEATURE_FLAG_KEYS = filterFeatureFlagKeysAllProducts(relevantFlags);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { N500, N0 } from '@atlaskit/theme/colors';
|
|
3
|
-
import { token } from '@atlaskit/tokens';
|
|
4
3
|
import { borderRadius, size, center } from '@atlaskit/media-ui';
|
|
5
4
|
import { rootStyles } from '../../card/styles';
|
|
6
5
|
import { rgba } from '../../card/styles/mixins';
|
|
@@ -19,7 +18,7 @@ export let CardActionIconButtonVariant;
|
|
|
19
18
|
|
|
20
19
|
const getVariantStyles = variant => {
|
|
21
20
|
return variant === 'filled' ? `
|
|
22
|
-
background-color: ${
|
|
21
|
+
background-color: ${`var(--ds-surface-overlay, ${rgba(N0, 0.8)})`};
|
|
23
22
|
margin-right: 8px;
|
|
24
23
|
|
|
25
24
|
&:last-child {
|
|
@@ -27,11 +26,11 @@ const getVariantStyles = variant => {
|
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
&:hover {
|
|
30
|
-
background-color: ${
|
|
29
|
+
background-color: ${`var(--ds-surface-overlay-hovered, ${rgba(N0, 0.6)})`}
|
|
31
30
|
}
|
|
32
31
|
` : `
|
|
33
32
|
&:hover {
|
|
34
|
-
background-color: ${
|
|
33
|
+
background-color: ${"var(--ds-background-neutral-subtle-hovered, rgba(9, 30, 66, 0.06))"};
|
|
35
34
|
}
|
|
36
35
|
`;
|
|
37
36
|
};
|
|
@@ -42,7 +41,7 @@ export const cardActionButtonStyles = ({
|
|
|
42
41
|
${center}
|
|
43
42
|
${borderRadius}
|
|
44
43
|
${size(26)}
|
|
45
|
-
color: ${
|
|
44
|
+
color: ${`var(--ds-icon, ${N500})`};
|
|
46
45
|
|
|
47
46
|
&:hover {
|
|
48
47
|
cursor: pointer;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { css, keyframes } from '@emotion/react';
|
|
2
|
-
import { token } from '@atlaskit/tokens';
|
|
3
2
|
import { center, borderRadius } from '@atlaskit/media-ui';
|
|
4
3
|
import { themed } from '@atlaskit/theme/components';
|
|
5
4
|
import { N20, DN50, N50, DN100 } from '@atlaskit/theme/colors';
|
|
@@ -22,14 +21,14 @@ export const wrapperStyles = ({
|
|
|
22
21
|
}) => css`
|
|
23
22
|
${center}
|
|
24
23
|
background: ${themed({
|
|
25
|
-
light:
|
|
26
|
-
dark:
|
|
24
|
+
light: `var(--ds-background-neutral, ${N20})`,
|
|
25
|
+
dark: `var(--ds-background-neutral, ${DN50})`
|
|
27
26
|
})({
|
|
28
27
|
theme
|
|
29
28
|
})};
|
|
30
29
|
color: ${themed({
|
|
31
|
-
light:
|
|
32
|
-
dark:
|
|
30
|
+
light: `var(--ds-icon, ${N50})`,
|
|
31
|
+
dark: `var(--ds-icon, ${DN100})`
|
|
33
32
|
})({
|
|
34
33
|
theme
|
|
35
34
|
})};
|
|
@@ -3,7 +3,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata, LOGGED_FEATURE_FLAG_KE
|
|
|
3
3
|
import { MediaCardError } from '../errors';
|
|
4
4
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
5
5
|
const packageName = "@atlaskit/media-card";
|
|
6
|
-
const packageVersion = "74.
|
|
6
|
+
const packageVersion = "74.5.0";
|
|
7
7
|
let concurrentExperience;
|
|
8
8
|
|
|
9
9
|
const getExperience = id => {
|
|
@@ -26,18 +26,10 @@ const ViewportObserver = ({
|
|
|
26
26
|
rootMargin: `${ABS_VIEWPORT_ANCHOR_OFFSET_TOP}px`
|
|
27
27
|
});
|
|
28
28
|
} catch (error) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if ((_error$message = error.message) !== null && _error$message !== void 0 && _error$message.includes(errorMessage)) {
|
|
34
|
-
intersectionObserver = new IntersectionObserver(createIntersectionObserverCallback(onVisible), {
|
|
35
|
-
root: null,
|
|
36
|
-
rootMargin: `${ABS_VIEWPORT_ANCHOR_OFFSET_TOP}px`
|
|
37
|
-
});
|
|
38
|
-
} else {
|
|
39
|
-
throw error;
|
|
40
|
-
}
|
|
29
|
+
intersectionObserver = new IntersectionObserver(createIntersectionObserverCallback(onVisible), {
|
|
30
|
+
root: null,
|
|
31
|
+
rootMargin: `${ABS_VIEWPORT_ANCHOR_OFFSET_TOP}px`
|
|
32
|
+
});
|
|
41
33
|
}
|
|
42
34
|
|
|
43
35
|
cardEl && intersectionObserver.observe(cardEl);
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/card/card.js
CHANGED
|
@@ -44,7 +44,7 @@ import { getMediaCardCursor } from '../utils/getMediaCardCursor';
|
|
|
44
44
|
import { completeUfoExperience, startUfoExperience } from '../utils/ufoExperiences';
|
|
45
45
|
import { generateUniqueId } from '../utils/generateUniqueId';
|
|
46
46
|
var packageName = "@atlaskit/media-card";
|
|
47
|
-
var packageVersion = "74.
|
|
47
|
+
var packageVersion = "74.5.0";
|
|
48
48
|
export var CardBase = /*#__PURE__*/function (_Component) {
|
|
49
49
|
_inherits(CardBase, _Component);
|
|
50
50
|
|
|
@@ -15,7 +15,6 @@ import { jsx } from '@emotion/react';
|
|
|
15
15
|
import React from 'react';
|
|
16
16
|
import { Component } from 'react';
|
|
17
17
|
import cx from 'classnames';
|
|
18
|
-
import { token } from '@atlaskit/tokens';
|
|
19
18
|
import TickIcon from '@atlaskit/icon/glyph/check';
|
|
20
19
|
import { Ellipsify } from '@atlaskit/media-ui'; // We dont require things directly from "utils" to avoid circular dependencies
|
|
21
20
|
|
|
@@ -94,7 +93,7 @@ export var CardOverlay = /*#__PURE__*/function (_Component) {
|
|
|
94
93
|
selected = _this$props2.selected,
|
|
95
94
|
actions = _this$props2.actions;
|
|
96
95
|
var titleText = resolveTitleText(cardStatus, mediaName, error, selected);
|
|
97
|
-
var menuTriggerColor = !persistent ?
|
|
96
|
+
var menuTriggerColor = !persistent ? "var(--ds-icon-inverse, white)" : undefined;
|
|
98
97
|
return jsx(Overlay, {
|
|
99
98
|
hasError: !!error,
|
|
100
99
|
noHover: noHover,
|
|
@@ -12,9 +12,8 @@ import { css } from '@emotion/react';
|
|
|
12
12
|
import { borderRadius, size, ellipsis, absolute } from '@atlaskit/media-ui';
|
|
13
13
|
import { themed } from '@atlaskit/theme/components';
|
|
14
14
|
import * as colors from '@atlaskit/theme/colors';
|
|
15
|
-
import { token } from '@atlaskit/tokens';
|
|
16
15
|
import { rgba, easeOutCubic, transition, antialiased } from '../../styles';
|
|
17
|
-
export var tickBoxStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n background-color: ", ";\n position: absolute;\n top: 8px;\n right: 8px;\n border-radius: 20px;\n color: ", "; /* CLEANUP - TODO FIL-3884: Align color with new design */\n display: flex;\n opacity: 0;\n\n &.selected {\n opacity: 1;\n color: ", ";\n background-color: ", "; /* CLEANUP - TODO FIL-3884: Align with tickbox icons */\n }\n\n /* Enforce dimensions of \"tick\" icon */\n svg {\n position: absolute;\n width: 14px;\n }\n"])), size(14), transition(),
|
|
16
|
+
export var tickBoxStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n background-color: ", ";\n position: absolute;\n top: 8px;\n right: 8px;\n border-radius: 20px;\n color: ", "; /* CLEANUP - TODO FIL-3884: Align color with new design */\n display: flex;\n opacity: 0;\n\n &.selected {\n opacity: 1;\n color: ", ";\n background-color: ", "; /* CLEANUP - TODO FIL-3884: Align with tickbox icons */\n }\n\n /* Enforce dimensions of \"tick\" icon */\n svg {\n position: absolute;\n width: 14px;\n }\n"])), size(14), transition(), "var(--ds-surface-overlay, ".concat(rgba('#ffffff', 0.5), ")"), "var(--ds-icon-subtle, #798599)", "var(--ds-icon-inverse, white)", "var(--ds-icon-selected, #0052cc)");
|
|
18
17
|
|
|
19
18
|
var getOverlayStyles = function getOverlayStyles(_ref) {
|
|
20
19
|
var hasError = _ref.hasError,
|
|
@@ -26,22 +25,22 @@ var getOverlayStyles = function getOverlayStyles(_ref) {
|
|
|
26
25
|
};
|
|
27
26
|
|
|
28
27
|
export var overlayStyles = function overlayStyles(props) {
|
|
29
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", " display: flex;\n justify-content: space-between;\n flex-direction: column;\n background: transparent;\n transition: 0.3s background ", ", 0.3s border-color;\n padding: 16px;\n\n ", "\n &:not(.persistent):hover, &.active {\n .top-row {\n .title {\n color: ", ";\n }\n }\n }\n\n &.noHover:hover {\n .top-row {\n .title {\n color: ", ";\n }\n }\n }\n\n .file-type-icon {\n display: block;\n }\n\n &:not(.persistent) {\n &:not(.error, .noHover):hover {\n background-color: ", ";\n }\n\n &.selectable {\n &.selected {\n background-color: ", ";\n\n &:hover {\n /* CLEANUP - TODO FIL-3884 add new overlay with rgba(colors.N900, 0.16) */\n background-color: ", ";\n }\n\n .title,\n .bottom-row,\n .file-size {\n color: ", ";\n }\n }\n }\n }\n\n &.persistent {\n &:not(.active) {\n overflow: hidden;\n }\n\n .top-row {\n .title {\n transition: opacity 0.3s;\n opacity: 0;\n color: ", ";\n visibility: hidden;\n }\n }\n\n .bottom-row {\n opacity: 0;\n transition: transform 0.2s, opacity 0.5s;\n /* This is the height of the overlay footer, needs to be present now since the parent uses flex and 100% doesn't look right anymore */\n transform: translateY(35px);\n\n .file-type-icon {\n display: none;\n }\n\n .file-size {\n color: ", ";\n display: none;\n }\n }\n\n &:hover,\n &.active {\n background-color: ", ";\n\n .title {\n opacity: 1;\n visibility: visible;\n }\n\n .file-type-icon,\n .file-size {\n display: block;\n }\n\n .bottom-row {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n /* Selectable */\n &.selectable {\n &:hover {\n .tickbox {\n opacity: 1;\n }\n }\n\n &.selected {\n .tickbox {\n background-color: ", " !important;\n color: ", ";\n }\n }\n }\n }\n\n &.error {\n .top-row {\n overflow: visible;\n }\n &:hover,\n &.active {\n .top-row {\n .title {\n color: ", ";\n }\n }\n }\n }\n"])), size(), absolute(), borderRadius, easeOutCubic, getOverlayStyles(props),
|
|
28
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", " display: flex;\n justify-content: space-between;\n flex-direction: column;\n background: transparent;\n transition: 0.3s background ", ", 0.3s border-color;\n padding: 16px;\n\n ", "\n &:not(.persistent):hover, &.active {\n .top-row {\n .title {\n color: ", ";\n }\n }\n }\n\n &.noHover:hover {\n .top-row {\n .title {\n color: ", ";\n }\n }\n }\n\n .file-type-icon {\n display: block;\n }\n\n &:not(.persistent) {\n &:not(.error, .noHover):hover {\n background-color: ", ";\n }\n\n &.selectable {\n &.selected {\n background-color: ", ";\n\n &:hover {\n /* CLEANUP - TODO FIL-3884 add new overlay with rgba(colors.N900, 0.16) */\n background-color: ", ";\n }\n\n .title,\n .bottom-row,\n .file-size {\n color: ", ";\n }\n }\n }\n }\n\n &.persistent {\n &:not(.active) {\n overflow: hidden;\n }\n\n .top-row {\n .title {\n transition: opacity 0.3s;\n opacity: 0;\n color: ", ";\n visibility: hidden;\n }\n }\n\n .bottom-row {\n opacity: 0;\n transition: transform 0.2s, opacity 0.5s;\n /* This is the height of the overlay footer, needs to be present now since the parent uses flex and 100% doesn't look right anymore */\n transform: translateY(35px);\n\n .file-type-icon {\n display: none;\n }\n\n .file-size {\n color: ", ";\n display: none;\n }\n }\n\n &:hover,\n &.active {\n background-color: ", ";\n\n .title {\n opacity: 1;\n visibility: visible;\n }\n\n .file-type-icon,\n .file-size {\n display: block;\n }\n\n .bottom-row {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n /* Selectable */\n &.selectable {\n &:hover {\n .tickbox {\n opacity: 1;\n }\n }\n\n &.selected {\n .tickbox {\n background-color: ", " !important;\n color: ", ";\n }\n }\n }\n }\n\n &.error {\n .top-row {\n overflow: visible;\n }\n &:hover,\n &.active {\n .top-row {\n .title {\n color: ", ";\n }\n }\n }\n }\n"])), size(), absolute(), borderRadius, easeOutCubic, getOverlayStyles(props), "var(--ds-text-information, ".concat(colors.B400, ")"), "var(--ds-text, ".concat(colors.N800, ")"), "var(--ds-background-neutral-hovered, ".concat(rgba(colors.N900, 0.06), ")"), "var(--ds-background-selected, ".concat(colors.B200, ")"), "var(--ds-background-selected-hovered, ".concat(rgba(colors.N900, 0.16), ")"), "var(--ds-text, ".concat(colors.N900, ")"), "var(--ds-text, white)", "var(--ds-text, white)", "var(--ds-interaction-hovered, ".concat(rgba(colors.N900, 0.5), ")"), "var(--ds-background-selected-bold, ".concat(colors.B200, ")"), "var(--ds-icon-inverse, white)", "var(--ds-text, ".concat(colors.N800, ")"));
|
|
30
29
|
};
|
|
31
30
|
export var errorLineStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 24px;\n display: flex;\n align-items: center;\n"])));
|
|
32
31
|
export var leftColumnStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n position: relative;\n box-sizing: border-box;\n vertical-align: middle;\n"])));
|
|
33
32
|
export var topRowStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral([""])));
|
|
34
33
|
export var bottomRowStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n height: 16px;\n"])));
|
|
35
34
|
export var rightColumnStyles = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral([""])));
|
|
36
|
-
export var errorMessageStyles = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n ", " display: inline-block;\n vertical-align: middle;\n font-weight: bold;\n color: ", ";\n font-size: 12px;\n line-height: 15px;\n overflow: hidden;\n max-width: 'calc(100% - 24px)';\n text-overflow: ellipsis;\n white-space: nowrap;\n margin: auto 3px;\n"])), antialiased,
|
|
35
|
+
export var errorMessageStyles = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n ", " display: inline-block;\n vertical-align: middle;\n font-weight: bold;\n color: ", ";\n font-size: 12px;\n line-height: 15px;\n overflow: hidden;\n max-width: 'calc(100% - 24px)';\n text-overflow: ellipsis;\n white-space: nowrap;\n margin: auto 3px;\n"])), antialiased, "var(--ds-text-subtlest, ".concat(colors.N70, ")"));
|
|
37
36
|
export var altWrapperStyles = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ", "\n font-weight: normal;\n"])), errorMessageStyles);
|
|
38
37
|
export var titleWrapperStyles = function titleWrapperStyles(theme) {
|
|
39
38
|
return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n word-wrap: break-word;\n color: ", ";\n font-size: 12px;\n line-height: 18px;\n"])), themed({
|
|
40
|
-
light:
|
|
41
|
-
dark:
|
|
39
|
+
light: "var(--ds-text, ".concat(colors.N800, ")"),
|
|
40
|
+
dark: "var(--ds-text, ".concat(colors.DN900, ")")
|
|
42
41
|
})({
|
|
43
42
|
theme: theme
|
|
44
43
|
}));
|
|
45
44
|
};
|
|
46
|
-
export var subtitleStyles = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", " font-size: 12px;\n color: ", ";\n"])), ellipsis('100px'),
|
|
45
|
+
export var subtitleStyles = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", " font-size: 12px;\n color: ", ";\n"])), ellipsis('100px'), "var(--ds-text-subtlest, #5e6c84)");
|
|
47
46
|
export var metadataStyles = css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
|
|
@@ -13,7 +13,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
13
13
|
/**@jsx jsx */
|
|
14
14
|
import { jsx } from '@emotion/react';
|
|
15
15
|
import React, { Component } from 'react';
|
|
16
|
-
import { token } from '@atlaskit/tokens';
|
|
17
16
|
import { Ellipsify, MediaImage } from '@atlaskit/media-ui';
|
|
18
17
|
import VidPlayIcon from '@atlaskit/icon/glyph/vid-play';
|
|
19
18
|
import { CardOverlay } from './cardOverlay';
|
|
@@ -233,7 +232,7 @@ export var FileCardImageView = /*#__PURE__*/function (_Component) {
|
|
|
233
232
|
css: cardActionsWrapperStyles
|
|
234
233
|
}, actions ? jsx(CardActions, {
|
|
235
234
|
actions: actions,
|
|
236
|
-
triggerColor:
|
|
235
|
+
triggerColor: "var(--ds-icon-inverse, white)"
|
|
237
236
|
}) : null))));
|
|
238
237
|
});
|
|
239
238
|
|
|
@@ -3,7 +3,6 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
|
-
import { token } from '@atlaskit/tokens';
|
|
7
6
|
import { absolute, borderRadius, size } from '@atlaskit/media-ui';
|
|
8
7
|
import { themed } from '@atlaskit/theme/components';
|
|
9
8
|
import { N20, DN50, N0 } from '@atlaskit/theme/colors';
|
|
@@ -18,21 +17,21 @@ var getShadowAttribute = function getShadowAttribute(props) {
|
|
|
18
17
|
var getBackgroundColor = function getBackgroundColor(props) {
|
|
19
18
|
var mediaType = props.mediaType;
|
|
20
19
|
return "background: ".concat(mediaType === 'image' ? 'transparent' : themed({
|
|
21
|
-
light:
|
|
22
|
-
dark:
|
|
20
|
+
light: "var(--ds-background-neutral, ".concat(N20, ")"),
|
|
21
|
+
dark: "var(--ds-background-neutral, ".concat(DN50, ")")
|
|
23
22
|
})(props), ";");
|
|
24
23
|
};
|
|
25
24
|
|
|
26
25
|
export var wrapperStyles = function wrapperStyles(props) {
|
|
27
26
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n ", "\n\n line-height: normal;\n position: relative;\n\n ", "\n\n ", " .wrapper {\n ", ";\n display: block;\n height: inherit;\n position: relative;\n\n .img-wrapper {\n position: relative;\n width: inherit;\n height: inherit;\n overflow: hidden;\n display: block;\n ", "\n }\n }\n"])), rootStyles(), getShadowAttribute(props), borderRadius, getBackgroundColor(props), getSelectedBorderStyle(props), size(), borderRadius, borderRadius);
|
|
28
27
|
};
|
|
29
|
-
export var playIconWrapperStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ", ";\n\n /* we want to override default icon size and hover state */\n &:hover > * {\n width: 64px;\n height: 64px;\n }\n"])),
|
|
30
|
-
export var playIconBackgroundStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: 100%;\n padding: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition-property: width, height;\n transition-duration: 0.1s;\n width: 56px;\n height: 56px;\n"])),
|
|
28
|
+
export var playIconWrapperStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ", ";\n\n /* we want to override default icon size and hover state */\n &:hover > * {\n width: 64px;\n height: 64px;\n }\n"])), "var(--ds-icon-inverse, white)");
|
|
29
|
+
export var playIconBackgroundStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: 100%;\n padding: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition-property: width, height;\n transition-duration: 0.1s;\n width: 56px;\n height: 56px;\n"])), "var(--ds-background-neutral-bold, rgba(23, 43, 77, 0.7))");
|
|
31
30
|
var bodyHeight = 26;
|
|
32
31
|
export var progressBarWrapperStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n height: 100%;\n width: 100%;\n"])));
|
|
33
|
-
export var overlayStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", "\n ", "\n border-radius: inherit;\n background-color: ", ";\n"])), absolute(), size(),
|
|
34
|
-
export var titleStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", " width: 100%;\n padding: 8px;\n color: ", ";\n font-size: 12px;\n line-height: 18px;\n word-wrap: break-word;\n"])), absolute(),
|
|
35
|
-
export var bodyStyles = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n position: absolute;\n bottom: 0;\n width: 100%;\n padding: 8px;\n color: ", ";\n"])),
|
|
32
|
+
export var overlayStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", "\n ", "\n border-radius: inherit;\n background-color: ", ";\n"])), absolute(), size(), "var(--ds-blanket, rgba(9, 30, 66, 0.5))");
|
|
33
|
+
export var titleStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", " width: 100%;\n padding: 8px;\n color: ", ";\n font-size: 12px;\n line-height: 18px;\n word-wrap: break-word;\n"])), absolute(), "var(--ds-text-inverse, ".concat(N0, ")"));
|
|
34
|
+
export var bodyStyles = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n position: absolute;\n bottom: 0;\n width: 100%;\n padding: 8px;\n color: ", ";\n"])), "var(--ds-text-inverse, ".concat(N0, ")"));
|
|
36
35
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
37
36
|
|
|
38
37
|
export var progressWrapperStyles = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n flex-grow: 1;\n\n /*\n force the height to always be 20px (the height of the cancel icon),\n so that the height of the progress bar doesn't jump when cards with\n and without a cancel icon are rendered side-by-side.\n */\n height: ", "px;\n\n /*\n vertically center the progress bar within the 20px, keeping the progress bar full width\n */\n display: flex;\n flex-direction: column;\n justify-content: center;\n"])), bodyHeight);
|
|
@@ -21,7 +21,7 @@ export var createStateUpdater = function createStateUpdater(newState, fireErrorE
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export var getCardStateFromFileState = function getCardStateFromFileState(fileState, isBannedLocalPreview, featureFlags) {
|
|
24
|
-
var status = getCardStatus(fileState.status, extractFilePreviewStatus(fileState, isBannedLocalPreview, featureFlags));
|
|
24
|
+
var status = getCardStatus(fileState.status, extractFilePreviewStatus(fileState, isBannedLocalPreview, featureFlags), featureFlags);
|
|
25
25
|
var error = status === 'error' && isErrorFileState(fileState) ? new MediaCardError('error-file-state', new Error(fileState.message)) : undefined;
|
|
26
26
|
var progress = status === 'uploading' && fileState.status === 'uploading' ? fileState.progress : 1;
|
|
27
27
|
return {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
1
2
|
export var isFinalCardStatus = function isFinalCardStatus(status) {
|
|
2
3
|
return ['complete', 'error', 'failed-processing'].includes(status);
|
|
3
4
|
};
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
var getCardStatusBuggy = function getCardStatusBuggy(fileStatus, _ref) {
|
|
5
7
|
var hasFilesize = _ref.hasFilesize,
|
|
6
8
|
isPreviewable = _ref.isPreviewable,
|
|
7
9
|
hasPreview = _ref.hasPreview;
|
|
@@ -39,4 +41,35 @@ export var getCardStatus = function getCardStatus(fileStatus, _ref) {
|
|
|
39
41
|
default:
|
|
40
42
|
return 'loading';
|
|
41
43
|
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var getCardStatusFixed = function getCardStatusFixed(fileStatus, _ref2) {
|
|
47
|
+
var isPreviewable = _ref2.isPreviewable,
|
|
48
|
+
hasPreview = _ref2.hasPreview;
|
|
49
|
+
|
|
50
|
+
switch (fileStatus) {
|
|
51
|
+
case 'uploading':
|
|
52
|
+
case 'failed-processing':
|
|
53
|
+
case 'error':
|
|
54
|
+
case 'processing':
|
|
55
|
+
return fileStatus;
|
|
56
|
+
|
|
57
|
+
case 'processed':
|
|
58
|
+
if (!isPreviewable || !hasPreview) {
|
|
59
|
+
return 'complete';
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return 'loading-preview';
|
|
63
|
+
|
|
64
|
+
default:
|
|
65
|
+
return 'loading';
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export var getCardStatus = function getCardStatus(fileStatus, filePreviewStatus, featureFlags) {
|
|
70
|
+
if (getMediaFeatureFlag('fetchFileStateAfterUpload', featureFlags)) {
|
|
71
|
+
return getCardStatusFixed(fileStatus, filePreviewStatus);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return getCardStatusBuggy(fileStatus, filePreviewStatus);
|
|
42
75
|
};
|
|
@@ -105,7 +105,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
105
105
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
106
106
|
|
|
107
107
|
var packageName = "@atlaskit/media-card";
|
|
108
|
-
var packageVersion = "74.
|
|
108
|
+
var packageVersion = "74.5.0";
|
|
109
109
|
var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
110
110
|
packageVersion: packageVersion,
|
|
111
111
|
packageName: packageName,
|
|
@@ -5,7 +5,6 @@ var _templateObject, _templateObject2;
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { fontFamily } from '@atlaskit/theme/constants';
|
|
7
7
|
import { fadeIn } from '@atlaskit/media-ui';
|
|
8
|
-
import { token } from '@atlaskit/tokens';
|
|
9
8
|
export { defaultTransitionDuration } from './config';
|
|
10
9
|
export { antialiased, borderRadiusLeft, capitalize, centerSelf, centerSelfX, centerSelfY, centerX, hexToRgb, rgba, spaceAround, transition, withAppearance } from './mixins';
|
|
11
10
|
export { easeOutCubic, easeOutExpo } from './easing';
|
|
@@ -13,7 +12,7 @@ export { spin } from './animations';
|
|
|
13
12
|
export var rootStyles = function rootStyles() {
|
|
14
13
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-sizing: border-box;\n font-family: ", ";\n\n * {\n box-sizing: border-box;\n }\n"])), fontFamily());
|
|
15
14
|
};
|
|
16
|
-
export var cardShadow = "\n box-shadow: ".concat(
|
|
15
|
+
export var cardShadow = "\n box-shadow: ".concat("var(--ds-shadow-raised, 0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24))", ";\n");
|
|
17
16
|
export var fadeinImageStyles = function fadeinImageStyles() {
|
|
18
17
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n"])), fadeIn);
|
|
19
18
|
};
|
|
@@ -2,12 +2,11 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
import { css } from '@emotion/react';
|
|
7
6
|
import { transition } from '../../styles';
|
|
8
7
|
import { N90A } from '@atlaskit/theme/colors';
|
|
9
8
|
export var blanketClassName = 'media-card-blanket';
|
|
10
|
-
export var fixedBlanketStyles = "background-color: ".concat(
|
|
9
|
+
export var fixedBlanketStyles = "background-color: ".concat("var(--ds-blanket, ".concat(N90A, ")"), ";");
|
|
11
10
|
export var blanketStyles = function blanketStyles(isFixed) {
|
|
12
11
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n position: absolute;\n width: 100%;\n height: 100%;\n max-height: 100%;\n max-width: 100%;\n left: 0;\n top: 0;\n ", "\n"])), transition(), isFixed ? fixedBlanketStyles : '');
|
|
13
12
|
};
|
|
@@ -2,7 +2,6 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
4
4
|
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
import { css, keyframes } from '@emotion/react';
|
|
7
6
|
import { N300 } from '@atlaskit/theme/colors';
|
|
8
7
|
var breatheAnimation = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% { opacity: 1}\n 50% { opacity: 0.3 }\n 100% { opacity: 1; }"])));
|
|
@@ -11,7 +10,7 @@ var animatedStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplate
|
|
|
11
10
|
var getStylesBasedOnProps = function getStylesBasedOnProps(_ref) {
|
|
12
11
|
var animated = _ref.animated,
|
|
13
12
|
reducedFont = _ref.reducedFont;
|
|
14
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n overflow: hidden;\n opacity: 1;\n font-weight: 450;\n ", "\n color: ", ";\n text-align: center;\n ", "\n margin-bottom: -1em;\n padding: 3px 10px;\n"])), reducedFont ? 'font-size: 0.7em;' : '',
|
|
13
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n overflow: hidden;\n opacity: 1;\n font-weight: 450;\n ", "\n color: ", ";\n text-align: center;\n ", "\n margin-bottom: -1em;\n padding: 3px 10px;\n"])), reducedFont ? 'font-size: 0.7em;' : '', "var(--ds-text-subtlest, ".concat(N300, ")"), animated ? animatedStyles : '');
|
|
15
14
|
};
|
|
16
15
|
|
|
17
16
|
export var iconMessageWrapperStyles = function iconMessageWrapperStyles(props) {
|
|
@@ -2,7 +2,6 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
4
4
|
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
import { css } from '@emotion/react';
|
|
7
6
|
import { generateResponsiveStyles } from '../progressBar/styles';
|
|
8
7
|
import { N300 } from '@atlaskit/theme/colors';
|
|
@@ -11,7 +10,7 @@ export var warningIconWrapperStyles = css(_templateObject2 || (_templateObject2
|
|
|
11
10
|
export var loadingRateLimitedTextWrapperStyles = function loadingRateLimitedTextWrapperStyles(_ref) {
|
|
12
11
|
var breakpoint = _ref.breakpoint,
|
|
13
12
|
positionBottom = _ref.positionBottom;
|
|
14
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-top: 10px;\n overflow: hidden;\n color: ", ";\n display: block;\n width: 100%;\n text-align: center;\n ", "\n"])),
|
|
13
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-top: 10px;\n overflow: hidden;\n color: ", ";\n display: block;\n width: 100%;\n text-align: center;\n ", "\n"])), "var(--ds-text-subtlest, ".concat(N300, ")"), generateResponsiveStyles(breakpoint, positionBottom, false, 1));
|
|
15
14
|
};
|
|
16
15
|
loadingRateLimitedTextWrapperStyles.displayName = 'LoadingRateLimitedTextWrapper';
|
|
17
16
|
export var couldntLoadWrapperStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-weight: 550;\n"])));
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { newFileExperienceClassName } from '../../cardConstants';
|
|
4
4
|
import { newFileExperienceWrapperStyles } from './styles';
|
|
5
|
+
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
5
6
|
export var NewFileExperienceWrapper = function NewFileExperienceWrapper(props) {
|
|
6
7
|
var testId = props.testId,
|
|
7
8
|
dimensions = props.dimensions,
|
|
@@ -17,6 +18,7 @@ export var NewFileExperienceWrapper = function NewFileExperienceWrapper(props) {
|
|
|
17
18
|
isPlayButtonClickable = props.isPlayButtonClickable,
|
|
18
19
|
isTickBoxSelectable = props.isTickBoxSelectable,
|
|
19
20
|
shouldDisplayTooltip = props.shouldDisplayTooltip;
|
|
21
|
+
var theme = useGlobalTheme();
|
|
20
22
|
return jsx("div", {
|
|
21
23
|
id: "newFileExperienceWrapper",
|
|
22
24
|
className: newFileExperienceClassName,
|
|
@@ -31,7 +33,8 @@ export var NewFileExperienceWrapper = function NewFileExperienceWrapper(props) {
|
|
|
31
33
|
isPlayButtonClickable: isPlayButtonClickable,
|
|
32
34
|
isTickBoxSelectable: isTickBoxSelectable,
|
|
33
35
|
shouldDisplayTooltip: shouldDisplayTooltip,
|
|
34
|
-
mediaCardCursor: mediaCardCursor
|
|
36
|
+
mediaCardCursor: mediaCardCursor,
|
|
37
|
+
theme: theme
|
|
35
38
|
}),
|
|
36
39
|
ref: innerRef,
|
|
37
40
|
onClick: onClick,
|
|
@@ -6,12 +6,13 @@ import { css } from '@emotion/react';
|
|
|
6
6
|
import { fontFamily } from '@atlaskit/theme/constants';
|
|
7
7
|
import { borderRadius } from '@atlaskit/media-ui';
|
|
8
8
|
import { N20 } from '@atlaskit/theme/colors';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
9
|
import { hideNativeBrowserTextSelectionStyles } from '@atlaskit/editor-shared-styles/selection';
|
|
10
|
+
import { themed } from '@atlaskit/theme/components';
|
|
11
11
|
import { transition } from '../../styles';
|
|
12
12
|
import { fixedBlanketStyles, blanketClassName } from '../blanket/styles';
|
|
13
13
|
import { fixedActionBarStyles, actionsBarClassName } from '../actionsBar/styles';
|
|
14
14
|
import { generateResponsiveStyles, getClickablePlayButtonStyles, getCursorStyle, getSelectableTickBoxStyles, getWrapperDimensions, getWrapperShadow } from '../styles';
|
|
15
|
+
var BACKGROUND_COLOR_DARK = '#22272C';
|
|
15
16
|
export var newFileExperienceWrapperStyles = function newFileExperienceWrapperStyles(_ref) {
|
|
16
17
|
var breakpoint = _ref.breakpoint,
|
|
17
18
|
dimensions = _ref.dimensions,
|
|
@@ -22,7 +23,13 @@ export var newFileExperienceWrapperStyles = function newFileExperienceWrapperSty
|
|
|
22
23
|
isPlayButtonClickable = _ref.isPlayButtonClickable,
|
|
23
24
|
isTickBoxSelectable = _ref.isTickBoxSelectable,
|
|
24
25
|
shouldDisplayTooltip = _ref.shouldDisplayTooltip,
|
|
25
|
-
mediaCardCursor = _ref.mediaCardCursor
|
|
26
|
-
|
|
26
|
+
mediaCardCursor = _ref.mediaCardCursor,
|
|
27
|
+
theme = _ref.theme;
|
|
28
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n box-sizing: border-box;\n * {\n box-sizing: border-box;\n }\n position: relative;\n font-family: ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n\n /* We use classnames from here exceptionally to be able to handle styles when the Card is on hover */\n ", "\n ", "\n &:hover .", " {\n ", "\n }\n &:hover .", " {\n ", "\n }\n\n /* Tooltip does not support percentage dimensions. We enforce them here */\n ", "\n"])), transition(), fontFamily(), getWrapperDimensions(dimensions, appearance), displayBackground && "background: ".concat(themed({
|
|
29
|
+
light: "var(--ds-background-neutral, ".concat(N20, ")"),
|
|
30
|
+
dark: "var(--ds-background-neutral, ".concat(BACKGROUND_COLOR_DARK, ")")
|
|
31
|
+
})({
|
|
32
|
+
theme: theme
|
|
33
|
+
}), ";"), borderRadius, getCursorStyle(mediaCardCursor), getWrapperShadow(disableOverlay, selected), generateResponsiveStyles(breakpoint), hideNativeBrowserTextSelectionStyles, getClickablePlayButtonStyles(isPlayButtonClickable), getSelectableTickBoxStyles(isTickBoxSelectable), blanketClassName, fixedBlanketStyles, actionsBarClassName, fixedActionBarStyles, shouldDisplayTooltip && "> div { width: 100%; height: 100%; }");
|
|
27
34
|
};
|
|
28
35
|
newFileExperienceWrapperStyles.displayName = 'NewFileExperienceWrapper';
|
|
@@ -4,11 +4,10 @@ var _templateObject, _templateObject2;
|
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { N0, N90A } from '@atlaskit/theme/colors';
|
|
7
|
-
import { token } from '@atlaskit/tokens';
|
|
8
7
|
export var playButtonClassName = 'media-card-play-button';
|
|
9
8
|
export var bkgClassName = 'play-icon-background';
|
|
10
9
|
var discSize = 48;
|
|
11
10
|
var discSizeHover = 56;
|
|
12
11
|
export var fixedPlayButtonStyles = "\n .".concat(bkgClassName, " {\n width: ").concat(discSizeHover, "px;\n height: ").concat(discSizeHover, "px;\n }\n");
|
|
13
|
-
export var playButtonWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ", ";\n span {\n position: absolute;\n }\n"])),
|
|
14
|
-
export var backgroundStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n transition-property: width, height;\n transition-duration: 0.1s;\n position: absolute;\n width: ", "px;\n height: ", "px;\n background: ", ";\n border-radius: 100%;\n"])), discSize, discSize,
|
|
12
|
+
export var playButtonWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ", ";\n span {\n position: absolute;\n }\n"])), "var(--ds-icon-inverse, ".concat(N0, ")"));
|
|
13
|
+
export var backgroundStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n transition-property: width, height;\n transition-duration: 0.1s;\n position: absolute;\n width: ", "px;\n height: ", "px;\n background: ", ";\n border-radius: 100%;\n"])), discSize, discSize, "var(--ds-background-neutral-bold, ".concat(N90A, ")"));
|