@atlaskit/media-card 77.11.0 → 77.11.2
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 +2841 -1930
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/ui/actionsBar/cardActions/styles.js +19 -8
- package/dist/cjs/card/ui/actionsBar/styles.js +8 -4
- package/dist/cjs/card/ui/blanket/styles.js +9 -4
- package/dist/cjs/card/ui/iconMessage/iconMessageWrapper.js +9 -10
- package/dist/cjs/card/ui/iconWrapper/styles.js +9 -4
- package/dist/cjs/card/ui/playButton/styles.js +23 -5
- package/dist/cjs/card/ui/progressBar/styles.js +1 -4
- package/dist/cjs/card/ui/styles.js +9 -3
- package/dist/cjs/card/ui/titleBox/styles.js +35 -8
- package/dist/cjs/card/ui/unhandledErrorCard/index.js +15 -5
- package/dist/cjs/card/v2/cardV2.js +1 -1
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/lightCards/errorIcon/styles.js +4 -4
- package/dist/cjs/utils/lightCards/styles.js +9 -4
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/ui/actionsBar/cardActions/styles.js +18 -27
- package/dist/es2019/card/ui/actionsBar/styles.js +8 -10
- package/dist/es2019/card/ui/blanket/styles.js +9 -11
- package/dist/es2019/card/ui/iconMessage/iconMessageWrapper.js +10 -11
- package/dist/es2019/card/ui/iconWrapper/styles.js +9 -9
- package/dist/es2019/card/ui/playButton/styles.js +22 -22
- package/dist/es2019/card/ui/progressBar/styles.js +1 -3
- package/dist/es2019/card/ui/styles.js +9 -10
- package/dist/es2019/card/ui/titleBox/styles.js +33 -38
- package/dist/es2019/card/ui/unhandledErrorCard/index.js +13 -16
- package/dist/es2019/card/v2/cardV2.js +1 -1
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/lightCards/errorIcon/styles.js +4 -4
- package/dist/es2019/utils/lightCards/styles.js +9 -10
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/ui/actionsBar/cardActions/styles.js +19 -7
- package/dist/esm/card/ui/actionsBar/styles.js +8 -3
- package/dist/esm/card/ui/blanket/styles.js +9 -3
- package/dist/esm/card/ui/iconMessage/iconMessageWrapper.js +10 -11
- package/dist/esm/card/ui/iconWrapper/styles.js +9 -3
- package/dist/esm/card/ui/playButton/styles.js +23 -4
- package/dist/esm/card/ui/progressBar/styles.js +1 -3
- package/dist/esm/card/ui/styles.js +9 -3
- package/dist/esm/card/ui/titleBox/styles.js +35 -7
- package/dist/esm/card/ui/unhandledErrorCard/index.js +14 -3
- package/dist/esm/card/v2/cardV2.js +1 -1
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/lightCards/errorIcon/styles.js +4 -3
- package/dist/esm/utils/lightCards/styles.js +9 -3
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/card/ui/actionsBar/cardActions/styles.d.ts +1 -1
- package/dist/types/card/ui/titleBox/styles.d.ts +2 -2
- package/dist/types/card/v2/cardViewV2.d.ts +1 -1
- package/dist/types/card/v2/cardviews/errorCardView.d.ts +5 -1
- package/dist/types/card/v2/cardviews/iconCardView.d.ts +6 -1
- package/dist/types/card/v2/cardviews/imageCardView.d.ts +14 -1
- package/dist/types/card/v2/cardviews/index.d.ts +1 -1
- package/dist/types/card/v2/cardviews/loadingCardView.d.ts +5 -1
- package/dist/types/card/v2/cardviews/processingCardView.d.ts +4 -1
- package/dist/types/card/v2/cardviews/videoCardView.d.ts +14 -1
- package/dist/types-ts4.5/card/ui/actionsBar/cardActions/styles.d.ts +1 -1
- package/dist/types-ts4.5/card/ui/titleBox/styles.d.ts +2 -2
- package/dist/types-ts4.5/card/v2/cardViewV2.d.ts +1 -1
- package/dist/types-ts4.5/card/v2/cardviews/errorCardView.d.ts +5 -1
- package/dist/types-ts4.5/card/v2/cardviews/iconCardView.d.ts +6 -1
- package/dist/types-ts4.5/card/v2/cardviews/imageCardView.d.ts +14 -1
- package/dist/types-ts4.5/card/v2/cardviews/index.d.ts +1 -1
- package/dist/types-ts4.5/card/v2/cardviews/loadingCardView.d.ts +5 -1
- package/dist/types-ts4.5/card/v2/cardviews/processingCardView.d.ts +4 -1
- package/dist/types-ts4.5/card/v2/cardviews/videoCardView.d.ts +14 -1
- package/package.json +14 -18
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**@jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import { keyframes } from '@emotion/react';
|
|
4
|
-
import { Box, xcss } from '@atlaskit/primitives';
|
|
5
4
|
const breatheAnimation = keyframes({
|
|
6
5
|
'0%': {
|
|
7
6
|
opacity: 1
|
|
@@ -13,34 +12,34 @@ const breatheAnimation = keyframes({
|
|
|
13
12
|
opacity: 1
|
|
14
13
|
}
|
|
15
14
|
});
|
|
16
|
-
const animatedStyles =
|
|
15
|
+
const animatedStyles = css({
|
|
17
16
|
animationName: breatheAnimation,
|
|
18
17
|
animationDuration: '3.5s',
|
|
19
18
|
animationTimingFunction: 'ease-in-out',
|
|
20
19
|
animationIterationCount: 'infinite'
|
|
21
20
|
});
|
|
22
|
-
const reducedFontStyle =
|
|
21
|
+
const reducedFontStyle = css({
|
|
23
22
|
fontSize: '0.7em'
|
|
24
23
|
});
|
|
25
|
-
const baseStyles =
|
|
24
|
+
const baseStyles = css({
|
|
26
25
|
overflow: 'hidden',
|
|
27
26
|
opacity: 1,
|
|
28
27
|
fontWeight: 450,
|
|
29
|
-
color:
|
|
28
|
+
color: "var(--ds-text-subtlest, #7A869A)",
|
|
30
29
|
textAlign: 'center',
|
|
31
|
-
// eslint-disable-next-line @atlaskit/design-system/
|
|
30
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
32
31
|
marginBottom: '-1em',
|
|
33
32
|
// Needs pixel precision to align the icon at the center of the box
|
|
34
|
-
paddingBlock:
|
|
35
|
-
paddingInline:
|
|
33
|
+
paddingBlock: "var(--ds-space-050, 4px)",
|
|
34
|
+
paddingInline: "var(--ds-space-100, 8px)"
|
|
36
35
|
});
|
|
37
36
|
export const IconMessageWrapper = props => {
|
|
38
37
|
const {
|
|
39
38
|
animated,
|
|
40
39
|
reducedFont
|
|
41
40
|
} = props;
|
|
42
|
-
return jsx(
|
|
41
|
+
return jsx("div", {
|
|
43
42
|
id: "iconMessageWrapper",
|
|
44
|
-
|
|
43
|
+
css: [baseStyles, reducedFont && reducedFontStyle, animated && animatedStyles]
|
|
45
44
|
}, props.children);
|
|
46
45
|
};
|
|
@@ -13,13 +13,13 @@ export function titleBoxHeight(hasTitleBox, breakpoint) {
|
|
|
13
13
|
export const iconWrapperStyles = ({
|
|
14
14
|
hasTitleBox,
|
|
15
15
|
breakpoint
|
|
16
|
-
}) => css
|
|
17
|
-
position: absolute
|
|
18
|
-
width: 100
|
|
19
|
-
height: calc(100% - ${titleBoxHeight(hasTitleBox, breakpoint)})
|
|
20
|
-
display: flex
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
}) => css({
|
|
17
|
+
position: 'absolute',
|
|
18
|
+
width: '100%',
|
|
19
|
+
height: `calc(100% - ${titleBoxHeight(hasTitleBox, breakpoint)})`,
|
|
20
|
+
display: 'flex',
|
|
21
|
+
flexDirection: 'column',
|
|
22
|
+
justifyContent: 'center',
|
|
23
|
+
alignItems: 'center'
|
|
24
|
+
});
|
|
25
25
|
iconWrapperStyles.displayName = 'MediaIconWrapper';
|
|
@@ -10,26 +10,26 @@ export const fixedPlayButtonStyles = `
|
|
|
10
10
|
height: ${discSizeHover}px;
|
|
11
11
|
}
|
|
12
12
|
`;
|
|
13
|
-
export const playButtonWrapperStyles = css
|
|
14
|
-
position: absolute
|
|
15
|
-
top: 0
|
|
16
|
-
left: 0
|
|
17
|
-
width: 100
|
|
18
|
-
height: 100
|
|
19
|
-
display: flex
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
color:
|
|
23
|
-
span {
|
|
24
|
-
position: absolute
|
|
13
|
+
export const playButtonWrapperStyles = css({
|
|
14
|
+
position: 'absolute',
|
|
15
|
+
top: 0,
|
|
16
|
+
left: 0,
|
|
17
|
+
width: '100%',
|
|
18
|
+
height: '100%',
|
|
19
|
+
display: 'flex',
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
color: `var(--ds-icon-inverse, ${N0})`,
|
|
23
|
+
span: {
|
|
24
|
+
position: 'absolute'
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
export const backgroundStyles = css
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
position: absolute
|
|
31
|
-
width:
|
|
32
|
-
height:
|
|
33
|
-
background:
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
});
|
|
27
|
+
export const backgroundStyles = css({
|
|
28
|
+
transitionProperty: 'width, height',
|
|
29
|
+
transitionDuration: '0.1s',
|
|
30
|
+
position: 'absolute',
|
|
31
|
+
width: `${discSize}px`,
|
|
32
|
+
height: `${discSize}px`,
|
|
33
|
+
background: `var(--ds-background-neutral-bold, ${N90A})`,
|
|
34
|
+
borderRadius: '100%'
|
|
35
|
+
});
|
|
@@ -53,8 +53,6 @@ ${generateResponsiveStyles(breakpoint, positionBottom, showOnTop)}
|
|
|
53
53
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
54
54
|
|
|
55
55
|
export const styledBarStyles = props => {
|
|
56
|
-
return css
|
|
57
|
-
${getStyledBarStylesBasedOnProps(props)}
|
|
58
|
-
`;
|
|
56
|
+
return css(getStyledBarStylesBasedOnProps(props));
|
|
59
57
|
};
|
|
60
58
|
styledBarStyles.displayName = 'StyledProgressBar';
|
|
@@ -65,16 +65,15 @@ export const getSelectableTickBoxStyles = isTickBoxSelectable => {
|
|
|
65
65
|
}
|
|
66
66
|
`;
|
|
67
67
|
};
|
|
68
|
-
export const cardImageContainerStyles = css
|
|
69
|
-
display: flex
|
|
70
|
-
position: relative
|
|
71
|
-
|
|
72
|
-
width: 100
|
|
73
|
-
height: 100
|
|
74
|
-
|
|
75
|
-
overflow: hidden
|
|
76
|
-
|
|
77
|
-
`;
|
|
68
|
+
export const cardImageContainerStyles = css({
|
|
69
|
+
display: 'flex',
|
|
70
|
+
position: 'relative',
|
|
71
|
+
maxWidth: '100%',
|
|
72
|
+
width: '100%',
|
|
73
|
+
height: '100%',
|
|
74
|
+
maxHeight: '100%',
|
|
75
|
+
overflow: 'hidden'
|
|
76
|
+
}, borderRadius);
|
|
78
77
|
const defaultTransitionDuration = '.3s';
|
|
79
78
|
export const transition = (propertyName = 'all') => `
|
|
80
79
|
transition: ${propertyName} ${defaultTransitionDuration};
|
|
@@ -14,52 +14,47 @@ const HEX_REGEX = /^#[0-9A-F]{6}$/i;
|
|
|
14
14
|
export const titleBoxWrapperStyles = ({
|
|
15
15
|
breakpoint,
|
|
16
16
|
titleBoxBgColor
|
|
17
|
-
}) => css
|
|
18
|
-
position: absolute
|
|
19
|
-
bottom: 0
|
|
20
|
-
width: 100
|
|
21
|
-
|
|
22
|
-
color:
|
|
23
|
-
cursor: inherit
|
|
24
|
-
|
|
25
|
-
display: flex
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
`;
|
|
17
|
+
}) => css({
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
bottom: 0,
|
|
20
|
+
width: '100%',
|
|
21
|
+
backgroundColor: `var(--ds-surface, ${rgba(titleBoxBgColor && HEX_REGEX.test(titleBoxBgColor) ? titleBoxBgColor : N0, 1)})`,
|
|
22
|
+
color: `var(--ds-text, ${N800})`,
|
|
23
|
+
cursor: 'inherit',
|
|
24
|
+
pointerEvents: 'none',
|
|
25
|
+
display: 'flex',
|
|
26
|
+
flexDirection: 'column',
|
|
27
|
+
justifyContent: 'center'
|
|
28
|
+
}, generateResponsiveStyles(breakpoint));
|
|
30
29
|
titleBoxWrapperStyles.displayName = 'TitleBoxWrapper';
|
|
31
30
|
const infoStyles = `white-space: nowrap;overflow: hidden;`;
|
|
32
31
|
const iconOverlapStyles = `padding-right: 10px;`;
|
|
33
32
|
export const titleBoxHeaderStyles = ({
|
|
34
33
|
hasIconOverlap
|
|
35
|
-
}) => css
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
${hasIconOverlap && iconOverlapStyles}
|
|
39
|
-
`;
|
|
34
|
+
}) => css({
|
|
35
|
+
fontWeight: 600
|
|
36
|
+
}, infoStyles, hasIconOverlap && iconOverlapStyles);
|
|
40
37
|
titleBoxHeaderStyles.displayName = 'FailedTitleBoxHeader';
|
|
41
38
|
export const titleBoxFooterStyles = ({
|
|
42
39
|
hasIconOverlap
|
|
43
|
-
}) => css
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
${hasIconOverlap && iconOverlapStyles}
|
|
47
|
-
`;
|
|
40
|
+
}) => css({
|
|
41
|
+
textOverflow: 'ellipsis'
|
|
42
|
+
}, infoStyles, hasIconOverlap && iconOverlapStyles);
|
|
48
43
|
titleBoxFooterStyles.displayName = 'TitleBoxFooter';
|
|
49
|
-
export const titleBoxIconStyles = css
|
|
50
|
-
position: absolute
|
|
51
|
-
right:
|
|
52
|
-
bottom: 0px
|
|
53
|
-
|
|
54
|
-
export const errorMessageWrapperStyles = css
|
|
55
|
-
display: flex
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
span {
|
|
59
|
-
|
|
60
|
-
:nth-child(2) {
|
|
61
|
-
|
|
62
|
-
|
|
44
|
+
export const titleBoxIconStyles = css({
|
|
45
|
+
position: 'absolute',
|
|
46
|
+
right: "var(--ds-space-050, 4px)",
|
|
47
|
+
bottom: '0px'
|
|
48
|
+
});
|
|
49
|
+
export const errorMessageWrapperStyles = css({
|
|
50
|
+
display: 'flex',
|
|
51
|
+
alignItems: 'center',
|
|
52
|
+
justifyContent: 'flex-start',
|
|
53
|
+
span: {
|
|
54
|
+
verticalAlign: 'middle',
|
|
55
|
+
':nth-child(2)': {
|
|
56
|
+
marginLeft: "var(--ds-space-050, 4px)",
|
|
57
|
+
marginRight: "var(--ds-space-050, 4px)"
|
|
63
58
|
}
|
|
64
59
|
}
|
|
65
|
-
|
|
60
|
+
});
|
|
@@ -32,23 +32,20 @@ const getConvertedDimension = dimensions => {
|
|
|
32
32
|
};
|
|
33
33
|
const wrapperStyles = (dimensions = defaultImageCardDimensions) => {
|
|
34
34
|
try {
|
|
35
|
-
return css
|
|
36
|
-
${
|
|
37
|
-
${
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
font-size: ${fontSize()}px;
|
|
48
|
-
text-align: center;
|
|
49
|
-
display: ${shouldShowText(getConvertedDimension(dimensions)) ? 'block' : 'none'};
|
|
35
|
+
return css(center, borderRadius, {
|
|
36
|
+
background: `var(--ds-background-neutral, ${N20})`,
|
|
37
|
+
color: `var(--ds-text-subtle, ${N800})`,
|
|
38
|
+
maxHeight: '100%',
|
|
39
|
+
maxWidth: '100%'
|
|
40
|
+
}, getConvertedDimension(dimensions), {
|
|
41
|
+
display: 'flex',
|
|
42
|
+
flexDirection: 'column',
|
|
43
|
+
p: {
|
|
44
|
+
fontSize: `${fontSize()}px`,
|
|
45
|
+
textAlign: 'center',
|
|
46
|
+
display: shouldShowText(getConvertedDimension(dimensions)) ? 'block' : 'none'
|
|
50
47
|
}
|
|
51
|
-
|
|
48
|
+
});
|
|
52
49
|
} catch (e) {
|
|
53
50
|
return null;
|
|
54
51
|
}
|
|
@@ -7,7 +7,7 @@ import { IntlProvider, injectIntl } from 'react-intl-next';
|
|
|
7
7
|
import { ExternalImageCard } from './externalImageCard';
|
|
8
8
|
import { FileCard } from './fileCard';
|
|
9
9
|
const packageName = "@atlaskit/media-card";
|
|
10
|
-
const packageVersion = "77.11.
|
|
10
|
+
const packageVersion = "77.11.2";
|
|
11
11
|
export const CardV2Base = ({
|
|
12
12
|
identifier,
|
|
13
13
|
...otherProps
|
|
@@ -37,7 +37,7 @@ export default class MediaInlineCardLoader extends React.PureComponent {
|
|
|
37
37
|
} = this.state;
|
|
38
38
|
const analyticsContext = {
|
|
39
39
|
packageVersion: "@atlaskit/media-card",
|
|
40
|
-
packageName: "77.11.
|
|
40
|
+
packageName: "77.11.2",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
export const errorIconWrapperStyles = css
|
|
3
|
-
display: flex
|
|
4
|
-
color:
|
|
5
|
-
|
|
2
|
+
export const errorIconWrapperStyles = css({
|
|
3
|
+
display: 'flex',
|
|
4
|
+
color: "var(--ds-icon-warning, #ff991f)"
|
|
5
|
+
});
|
|
@@ -3,13 +3,12 @@ import { center, borderRadius } from '@atlaskit/media-ui';
|
|
|
3
3
|
import { N20, N50 } from '@atlaskit/theme/colors';
|
|
4
4
|
export const wrapperStyles = ({
|
|
5
5
|
dimensions
|
|
6
|
-
}) => css
|
|
7
|
-
${
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`;
|
|
6
|
+
}) => css(center, {
|
|
7
|
+
background: `var(--ds-background-neutral, ${N20})`,
|
|
8
|
+
color: `var(--ds-icon, ${N50})`
|
|
9
|
+
}, borderRadius, {
|
|
10
|
+
maxHeight: '100%',
|
|
11
|
+
maxWidth: '100%',
|
|
12
|
+
width: dimensions.width,
|
|
13
|
+
height: dimensions.height
|
|
14
|
+
});
|
|
@@ -4,7 +4,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
4
4
|
import { MediaCardError } from '../errors';
|
|
5
5
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
6
6
|
const packageName = "@atlaskit/media-card";
|
|
7
|
-
const packageVersion = "77.11.
|
|
7
|
+
const packageVersion = "77.11.2";
|
|
8
8
|
let concurrentExperience;
|
|
9
9
|
const getExperience = id => {
|
|
10
10
|
if (!concurrentExperience) {
|
package/dist/esm/card/card.js
CHANGED
|
@@ -41,7 +41,7 @@ import { completeUfoExperience, startUfoExperience, abortUfoExperience } from '.
|
|
|
41
41
|
import { generateUniqueId } from '../utils/generateUniqueId';
|
|
42
42
|
import { DateOverrideContext } from '../dateOverrideContext';
|
|
43
43
|
var packageName = "@atlaskit/media-card";
|
|
44
|
-
var packageVersion = "77.11.
|
|
44
|
+
var packageVersion = "77.11.2";
|
|
45
45
|
export var CardBase = /*#__PURE__*/function (_Component) {
|
|
46
46
|
_inherits(CardBase, _Component);
|
|
47
47
|
var _super = _createSuper(CardBase);
|
|
@@ -83,7 +83,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
83
83
|
}(React.Component);
|
|
84
84
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
85
85
|
var packageName = "@atlaskit/media-card";
|
|
86
|
-
var packageVersion = "77.11.
|
|
86
|
+
var packageVersion = "77.11.2";
|
|
87
87
|
var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
88
88
|
packageVersion: packageVersion,
|
|
89
89
|
packageName: packageName,
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
3
1
|
import { css } from '@emotion/react';
|
|
4
2
|
import { N500, N0 } from '@atlaskit/theme/colors';
|
|
5
3
|
import { borderRadius, size, center } from '@atlaskit/media-ui';
|
|
6
4
|
import { rgba } from '../../styles';
|
|
7
5
|
import { fontFamily } from '@atlaskit/theme/constants';
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
export var wrapperStyles = css({
|
|
7
|
+
boxSizing: 'border-box',
|
|
8
|
+
fontFamily: fontFamily(),
|
|
9
|
+
'*': {
|
|
10
|
+
boxSizing: 'border-box'
|
|
11
|
+
},
|
|
12
|
+
display: 'flex',
|
|
13
|
+
position: 'relative',
|
|
14
|
+
lineHeight: 0
|
|
15
|
+
});
|
|
12
16
|
export var CardActionIconButtonVariant = /*#__PURE__*/function (CardActionIconButtonVariant) {
|
|
13
17
|
CardActionIconButtonVariant["default"] = "default";
|
|
14
18
|
CardActionIconButtonVariant["filled"] = "filled";
|
|
@@ -19,5 +23,13 @@ var getVariantStyles = function getVariantStyles(variant) {
|
|
|
19
23
|
};
|
|
20
24
|
export var cardActionButtonStyles = function cardActionButtonStyles(_ref) {
|
|
21
25
|
var variant = _ref.variant;
|
|
22
|
-
return css(
|
|
26
|
+
return css({
|
|
27
|
+
appearance: 'none',
|
|
28
|
+
border: 'none'
|
|
29
|
+
}, center, borderRadius, size(26), {
|
|
30
|
+
color: "var(--ds-icon, ".concat(N500, ")"),
|
|
31
|
+
'&:hover': {
|
|
32
|
+
cursor: 'pointer'
|
|
33
|
+
}
|
|
34
|
+
}, getVariantStyles(variant));
|
|
23
35
|
};
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
import { css } from '@emotion/react';
|
|
4
2
|
import { transition } from '../styles';
|
|
5
3
|
export var actionsBarClassName = 'media-card-actions-bar';
|
|
6
4
|
export var fixedActionBarStyles = "opacity: 1;";
|
|
7
5
|
export var wrapperStyles = function wrapperStyles(isFixed) {
|
|
8
|
-
return css(
|
|
6
|
+
return css(isFixed ? fixedActionBarStyles : 'opacity: 0;', transition(), {
|
|
7
|
+
position: 'absolute',
|
|
8
|
+
top: "var(--ds-space-100, 8px)",
|
|
9
|
+
right: "var(--ds-space-100, 8px)",
|
|
10
|
+
display: 'flex',
|
|
11
|
+
flexFlow: 'row nowrap',
|
|
12
|
+
alignItems: 'center'
|
|
13
|
+
});
|
|
9
14
|
};
|
|
10
15
|
wrapperStyles.displayName = 'ActionsBarWrapper';
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
import { css } from '@emotion/react';
|
|
4
2
|
import { transition } from '../styles';
|
|
5
3
|
import { N90A } from '@atlaskit/theme/colors';
|
|
6
4
|
export var blanketClassName = 'media-card-blanket';
|
|
7
5
|
export var fixedBlanketStyles = "background-color: ".concat("var(--ds-blanket, ".concat(N90A, ")"), ";");
|
|
8
6
|
export var blanketStyles = function blanketStyles(isFixed) {
|
|
9
|
-
return css(
|
|
7
|
+
return css(transition(), {
|
|
8
|
+
position: 'absolute',
|
|
9
|
+
width: '100%',
|
|
10
|
+
height: '100%',
|
|
11
|
+
maxHeight: '100%',
|
|
12
|
+
maxWidth: '100%',
|
|
13
|
+
left: 0,
|
|
14
|
+
top: 0
|
|
15
|
+
}, isFixed ? fixedBlanketStyles : '');
|
|
10
16
|
};
|
|
11
17
|
blanketStyles.displayName = 'Blanket';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**@jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import { keyframes } from '@emotion/react';
|
|
4
|
-
import { Box, xcss } from '@atlaskit/primitives';
|
|
5
4
|
var breatheAnimation = keyframes({
|
|
6
5
|
'0%': {
|
|
7
6
|
opacity: 1
|
|
@@ -13,32 +12,32 @@ var breatheAnimation = keyframes({
|
|
|
13
12
|
opacity: 1
|
|
14
13
|
}
|
|
15
14
|
});
|
|
16
|
-
var animatedStyles =
|
|
15
|
+
var animatedStyles = css({
|
|
17
16
|
animationName: breatheAnimation,
|
|
18
17
|
animationDuration: '3.5s',
|
|
19
18
|
animationTimingFunction: 'ease-in-out',
|
|
20
19
|
animationIterationCount: 'infinite'
|
|
21
20
|
});
|
|
22
|
-
var reducedFontStyle =
|
|
21
|
+
var reducedFontStyle = css({
|
|
23
22
|
fontSize: '0.7em'
|
|
24
23
|
});
|
|
25
|
-
var baseStyles =
|
|
24
|
+
var baseStyles = css({
|
|
26
25
|
overflow: 'hidden',
|
|
27
26
|
opacity: 1,
|
|
28
27
|
fontWeight: 450,
|
|
29
|
-
color:
|
|
28
|
+
color: "var(--ds-text-subtlest, #7A869A)",
|
|
30
29
|
textAlign: 'center',
|
|
31
|
-
// eslint-disable-next-line @atlaskit/design-system/
|
|
30
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
32
31
|
marginBottom: '-1em',
|
|
33
32
|
// Needs pixel precision to align the icon at the center of the box
|
|
34
|
-
paddingBlock:
|
|
35
|
-
paddingInline:
|
|
33
|
+
paddingBlock: "var(--ds-space-050, 4px)",
|
|
34
|
+
paddingInline: "var(--ds-space-100, 8px)"
|
|
36
35
|
});
|
|
37
36
|
export var IconMessageWrapper = function IconMessageWrapper(props) {
|
|
38
37
|
var animated = props.animated,
|
|
39
38
|
reducedFont = props.reducedFont;
|
|
40
|
-
return jsx(
|
|
39
|
+
return jsx("div", {
|
|
41
40
|
id: "iconMessageWrapper",
|
|
42
|
-
|
|
41
|
+
css: [baseStyles, reducedFont && reducedFontStyle, animated && animatedStyles]
|
|
43
42
|
}, props.children);
|
|
44
43
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
import { css } from '@emotion/react';
|
|
4
2
|
import { getTitleBoxHeight } from '../common';
|
|
5
3
|
export function titleBoxHeight(hasTitleBox, breakpoint) {
|
|
@@ -15,6 +13,14 @@ export function titleBoxHeight(hasTitleBox, breakpoint) {
|
|
|
15
13
|
export var iconWrapperStyles = function iconWrapperStyles(_ref) {
|
|
16
14
|
var hasTitleBox = _ref.hasTitleBox,
|
|
17
15
|
breakpoint = _ref.breakpoint;
|
|
18
|
-
return css(
|
|
16
|
+
return css({
|
|
17
|
+
position: 'absolute',
|
|
18
|
+
width: '100%',
|
|
19
|
+
height: "calc(100% - ".concat(titleBoxHeight(hasTitleBox, breakpoint), ")"),
|
|
20
|
+
display: 'flex',
|
|
21
|
+
flexDirection: 'column',
|
|
22
|
+
justifyContent: 'center',
|
|
23
|
+
alignItems: 'center'
|
|
24
|
+
});
|
|
19
25
|
};
|
|
20
26
|
iconWrapperStyles.displayName = 'MediaIconWrapper';
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2;
|
|
3
1
|
import { css } from '@emotion/react';
|
|
4
2
|
import { N0, N90A } from '@atlaskit/theme/colors';
|
|
5
3
|
export var playButtonClassName = 'media-card-play-button';
|
|
@@ -7,5 +5,26 @@ export var bkgClassName = 'play-icon-background';
|
|
|
7
5
|
var discSize = 48;
|
|
8
6
|
var discSizeHover = 56;
|
|
9
7
|
export var fixedPlayButtonStyles = "\n .".concat(bkgClassName, " {\n width: ").concat(discSizeHover, "px;\n height: ").concat(discSizeHover, "px;\n }\n");
|
|
10
|
-
export var playButtonWrapperStyles = css(
|
|
11
|
-
|
|
8
|
+
export var playButtonWrapperStyles = css({
|
|
9
|
+
position: 'absolute',
|
|
10
|
+
top: 0,
|
|
11
|
+
left: 0,
|
|
12
|
+
width: '100%',
|
|
13
|
+
height: '100%',
|
|
14
|
+
display: 'flex',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
justifyContent: 'center',
|
|
17
|
+
color: "var(--ds-icon-inverse, ".concat(N0, ")"),
|
|
18
|
+
span: {
|
|
19
|
+
position: 'absolute'
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
export var backgroundStyles = css({
|
|
23
|
+
transitionProperty: 'width, height',
|
|
24
|
+
transitionDuration: '0.1s',
|
|
25
|
+
position: 'absolute',
|
|
26
|
+
width: "".concat(discSize, "px"),
|
|
27
|
+
height: "".concat(discSize, "px"),
|
|
28
|
+
background: "var(--ds-background-neutral-bold, ".concat(N90A, ")"),
|
|
29
|
+
borderRadius: '100%'
|
|
30
|
+
});
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
import { css } from '@emotion/react';
|
|
4
2
|
import { borderRadius } from '@atlaskit/media-ui';
|
|
5
3
|
import { rgba } from '../styles';
|
|
@@ -35,6 +33,6 @@ var getStyledBarStylesBasedOnProps = function getStyledBarStylesBasedOnProps(_re
|
|
|
35
33
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
36
34
|
|
|
37
35
|
export var styledBarStyles = function styledBarStyles(props) {
|
|
38
|
-
return css(
|
|
36
|
+
return css(getStyledBarStylesBasedOnProps(props));
|
|
39
37
|
};
|
|
40
38
|
styledBarStyles.displayName = 'StyledProgressBar';
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
var _templateObject;
|
|
4
2
|
import { css } from '@emotion/react';
|
|
5
3
|
import { borderRadius } from '@atlaskit/media-ui';
|
|
6
4
|
import { N60A } from '@atlaskit/theme/colors';
|
|
@@ -61,7 +59,15 @@ export var getSelectableTickBoxStyles = function getSelectableTickBoxStyles(isTi
|
|
|
61
59
|
}
|
|
62
60
|
return "\n &:hover .".concat(tickBoxClassName, " {\n ").concat(tickboxFixedStyles, "\n }\n ");
|
|
63
61
|
};
|
|
64
|
-
export var cardImageContainerStyles = css(
|
|
62
|
+
export var cardImageContainerStyles = css({
|
|
63
|
+
display: 'flex',
|
|
64
|
+
position: 'relative',
|
|
65
|
+
maxWidth: '100%',
|
|
66
|
+
width: '100%',
|
|
67
|
+
height: '100%',
|
|
68
|
+
maxHeight: '100%',
|
|
69
|
+
overflow: 'hidden'
|
|
70
|
+
}, borderRadius);
|
|
65
71
|
var defaultTransitionDuration = '.3s';
|
|
66
72
|
export var transition = function transition() {
|
|
67
73
|
var propertyName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all';
|