@atlaskit/media-card 79.6.1 → 79.6.3
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 +14 -0
- package/dist/cjs/card/actions.js +1 -1
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/inlinePlayerWrapper-compiled.compiled.css +1 -1
- package/dist/cjs/card/inlinePlayerWrapper-compiled.js +4 -4
- package/dist/cjs/card/inlinePlayerWrapper.js +1 -3
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/svgView/svgView.js +1 -2
- package/dist/cjs/card/ui/actionsBar/actionsBarWrapper.js +1 -3
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionButton.js +1 -4
- package/dist/cjs/card/ui/blanket/blanket.js +1 -3
- package/dist/cjs/card/ui/iconMessage/iconMessageWrapper-compiled.js +1 -0
- package/dist/cjs/card/ui/iconMessage/iconMessageWrapper.js +1 -3
- package/dist/cjs/card/ui/iconWrapper/iconWrapper.js +1 -3
- package/dist/cjs/card/ui/playButton/playButtonWrapper.js +1 -3
- package/dist/cjs/card/ui/progressBar/styledBar.js +1 -3
- package/dist/cjs/card/ui/tickBox/tickBoxWrapper.js +1 -3
- package/dist/cjs/card/ui/titleBox/failedTitleBox.compiled.css +3 -0
- package/dist/cjs/card/ui/titleBox/failedTitleBox.js +7 -1
- package/dist/cjs/card/ui/titleBox/titleBoxComponents-compiled.compiled.css +1 -4
- package/dist/cjs/card/ui/titleBox/titleBoxComponents-compiled.js +1 -1
- package/dist/cjs/card/ui/titleBox/titleBoxComponents.js +5 -7
- package/dist/cjs/card/ui/unhandledErrorCard/index.js +1 -3
- package/dist/cjs/card/ui/unhandledErrorCard/unhandledErrorCard-compiled.js +1 -0
- package/dist/cjs/card/ui/wrapper/imageContainer.js +1 -2
- package/dist/cjs/card/ui/wrapper/wrapper-compiled.compiled.css +2 -2
- package/dist/cjs/card/ui/wrapper/wrapper-compiled.js +5 -5
- package/dist/cjs/card/ui/wrapper/wrapper.js +1 -3
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/actions.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/inlinePlayerWrapper-compiled.compiled.css +1 -1
- package/dist/es2019/card/inlinePlayerWrapper-compiled.js +3 -3
- package/dist/es2019/card/inlinePlayerWrapper.js +1 -5
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/svgView/svgView.js +1 -2
- package/dist/es2019/card/ui/actionsBar/actionsBarWrapper.js +1 -3
- package/dist/es2019/card/ui/actionsBar/cardActions/cardActionButton.js +1 -5
- package/dist/es2019/card/ui/blanket/blanket.js +1 -3
- package/dist/es2019/card/ui/iconMessage/iconMessageWrapper-compiled.js +1 -0
- package/dist/es2019/card/ui/iconMessage/iconMessageWrapper.js +1 -3
- package/dist/es2019/card/ui/iconWrapper/iconWrapper.js +1 -3
- package/dist/es2019/card/ui/playButton/playButtonWrapper.js +1 -3
- package/dist/es2019/card/ui/progressBar/styledBar.js +1 -3
- package/dist/es2019/card/ui/tickBox/tickBoxWrapper.js +1 -3
- package/dist/es2019/card/ui/titleBox/failedTitleBox.compiled.css +3 -0
- package/dist/es2019/card/ui/titleBox/failedTitleBox.js +7 -1
- package/dist/es2019/card/ui/titleBox/titleBoxComponents-compiled.compiled.css +1 -4
- package/dist/es2019/card/ui/titleBox/titleBoxComponents-compiled.js +1 -1
- package/dist/es2019/card/ui/titleBox/titleBoxComponents.js +5 -7
- package/dist/es2019/card/ui/unhandledErrorCard/index.js +1 -3
- package/dist/es2019/card/ui/unhandledErrorCard/unhandledErrorCard-compiled.js +2 -0
- package/dist/es2019/card/ui/wrapper/imageContainer.js +1 -3
- package/dist/es2019/card/ui/wrapper/wrapper-compiled.compiled.css +2 -2
- package/dist/es2019/card/ui/wrapper/wrapper-compiled.js +4 -4
- package/dist/es2019/card/ui/wrapper/wrapper.js +1 -3
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/actions.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/inlinePlayerWrapper-compiled.compiled.css +1 -1
- package/dist/esm/card/inlinePlayerWrapper-compiled.js +3 -3
- package/dist/esm/card/inlinePlayerWrapper.js +1 -3
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/svgView/svgView.js +1 -2
- package/dist/esm/card/ui/actionsBar/actionsBarWrapper.js +1 -3
- package/dist/esm/card/ui/actionsBar/cardActions/cardActionButton.js +1 -5
- package/dist/esm/card/ui/blanket/blanket.js +1 -3
- package/dist/esm/card/ui/iconMessage/iconMessageWrapper-compiled.js +1 -0
- package/dist/esm/card/ui/iconMessage/iconMessageWrapper.js +1 -3
- package/dist/esm/card/ui/iconWrapper/iconWrapper.js +1 -3
- package/dist/esm/card/ui/playButton/playButtonWrapper.js +1 -3
- package/dist/esm/card/ui/progressBar/styledBar.js +1 -3
- package/dist/esm/card/ui/tickBox/tickBoxWrapper.js +1 -3
- package/dist/esm/card/ui/titleBox/failedTitleBox.compiled.css +3 -0
- package/dist/esm/card/ui/titleBox/failedTitleBox.js +7 -1
- package/dist/esm/card/ui/titleBox/titleBoxComponents-compiled.compiled.css +1 -4
- package/dist/esm/card/ui/titleBox/titleBoxComponents-compiled.js +1 -1
- package/dist/esm/card/ui/titleBox/titleBoxComponents.js +5 -7
- package/dist/esm/card/ui/unhandledErrorCard/index.js +1 -3
- package/dist/esm/card/ui/unhandledErrorCard/unhandledErrorCard-compiled.js +1 -0
- package/dist/esm/card/ui/wrapper/imageContainer.js +1 -3
- package/dist/esm/card/ui/wrapper/wrapper-compiled.compiled.css +2 -2
- package/dist/esm/card/ui/wrapper/wrapper-compiled.js +4 -4
- package/dist/esm/card/ui/wrapper/wrapper.js +1 -3
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/card/inlinePlayerWrapper-compiled.d.ts +2 -0
- package/dist/types/card/ui/wrapper/wrapper-compiled.d.ts +2 -0
- package/dist/types-ts4.5/card/inlinePlayerWrapper-compiled.d.ts +2 -0
- package/dist/types-ts4.5/card/ui/wrapper/wrapper-compiled.d.ts +2 -0
- package/package.json +4 -7
- package/dist/cjs/card/inlinePlayerWrapper-emotion.js +0 -47
- package/dist/cjs/card/svgView/svgImage-emotion.js +0 -101
- package/dist/cjs/card/ui/actionsBar/actionsBarWrapper-emotion.js +0 -33
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionButton-emotion.js +0 -35
- package/dist/cjs/card/ui/blanket/blanket-emotion.js +0 -25
- package/dist/cjs/card/ui/iconMessage/iconMessageWrapper-emotion.js +0 -51
- package/dist/cjs/card/ui/iconWrapper/iconWrapper-emotion.js +0 -27
- package/dist/cjs/card/ui/playButton/playButtonBackground-emotion.js +0 -21
- package/dist/cjs/card/ui/playButton/playButtonWrapper-emotion.js +0 -23
- package/dist/cjs/card/ui/progressBar/styledBar-emotion.js +0 -35
- package/dist/cjs/card/ui/tickBox/tickBoxWrapper-emotion.js +0 -67
- package/dist/cjs/card/ui/titleBox/titleBoxComponents-emotion.js +0 -72
- package/dist/cjs/card/ui/unhandledErrorCard/unhandledErrorCard-emotion.js +0 -106
- package/dist/cjs/card/ui/wrapper/imageContainer-emotion.js +0 -55
- package/dist/cjs/card/ui/wrapper/wrapper-emotion.js +0 -68
- package/dist/es2019/card/inlinePlayerWrapper-emotion.js +0 -41
- package/dist/es2019/card/svgView/svgImage-emotion.js +0 -90
- package/dist/es2019/card/ui/actionsBar/actionsBarWrapper-emotion.js +0 -26
- package/dist/es2019/card/ui/actionsBar/cardActions/cardActionButton-emotion.js +0 -28
- package/dist/es2019/card/ui/blanket/blanket-emotion.js +0 -20
- package/dist/es2019/card/ui/iconMessage/iconMessageWrapper-emotion.js +0 -46
- package/dist/es2019/card/ui/iconWrapper/iconWrapper-emotion.js +0 -22
- package/dist/es2019/card/ui/playButton/playButtonBackground-emotion.js +0 -14
- package/dist/es2019/card/ui/playButton/playButtonWrapper-emotion.js +0 -16
- package/dist/es2019/card/ui/progressBar/styledBar-emotion.js +0 -30
- package/dist/es2019/card/ui/tickBox/tickBoxWrapper-emotion.js +0 -57
- package/dist/es2019/card/ui/titleBox/titleBoxComponents-emotion.js +0 -71
- package/dist/es2019/card/ui/unhandledErrorCard/unhandledErrorCard-emotion.js +0 -85
- package/dist/es2019/card/ui/wrapper/imageContainer-emotion.js +0 -47
- package/dist/es2019/card/ui/wrapper/wrapper-emotion.js +0 -62
- package/dist/esm/card/inlinePlayerWrapper-emotion.js +0 -39
- package/dist/esm/card/svgView/svgImage-emotion.js +0 -94
- package/dist/esm/card/ui/actionsBar/actionsBarWrapper-emotion.js +0 -26
- package/dist/esm/card/ui/actionsBar/cardActions/cardActionButton-emotion.js +0 -30
- package/dist/esm/card/ui/blanket/blanket-emotion.js +0 -18
- package/dist/esm/card/ui/iconMessage/iconMessageWrapper-emotion.js +0 -44
- package/dist/esm/card/ui/iconWrapper/iconWrapper-emotion.js +0 -20
- package/dist/esm/card/ui/playButton/playButtonBackground-emotion.js +0 -14
- package/dist/esm/card/ui/playButton/playButtonWrapper-emotion.js +0 -16
- package/dist/esm/card/ui/progressBar/styledBar-emotion.js +0 -28
- package/dist/esm/card/ui/tickBox/tickBoxWrapper-emotion.js +0 -60
- package/dist/esm/card/ui/titleBox/titleBoxComponents-emotion.js +0 -65
- package/dist/esm/card/ui/unhandledErrorCard/unhandledErrorCard-emotion.js +0 -101
- package/dist/esm/card/ui/wrapper/imageContainer-emotion.js +0 -48
- package/dist/esm/card/ui/wrapper/wrapper-emotion.js +0 -60
- package/dist/types/card/inlinePlayerWrapper-emotion.d.ts +0 -7
- package/dist/types/card/svgView/svgImage-emotion.d.ts +0 -7
- package/dist/types/card/ui/actionsBar/actionsBarWrapper-emotion.d.ts +0 -7
- package/dist/types/card/ui/actionsBar/cardActions/cardActionButton-emotion.d.ts +0 -2
- package/dist/types/card/ui/blanket/blanket-emotion.d.ts +0 -9
- package/dist/types/card/ui/iconMessage/iconMessageWrapper-emotion.d.ts +0 -7
- package/dist/types/card/ui/iconWrapper/iconWrapper-emotion.d.ts +0 -7
- package/dist/types/card/ui/playButton/playButtonBackground-emotion.d.ts +0 -6
- package/dist/types/card/ui/playButton/playButtonWrapper-emotion.d.ts +0 -6
- package/dist/types/card/ui/progressBar/styledBar-emotion.d.ts +0 -7
- package/dist/types/card/ui/tickBox/tickBoxWrapper-emotion.d.ts +0 -7
- package/dist/types/card/ui/titleBox/titleBoxComponents-emotion.d.ts +0 -11
- package/dist/types/card/ui/unhandledErrorCard/unhandledErrorCard-emotion.d.ts +0 -10
- package/dist/types/card/ui/wrapper/imageContainer-emotion.d.ts +0 -17
- package/dist/types/card/ui/wrapper/wrapper-emotion.d.ts +0 -7
- package/dist/types-ts4.5/card/inlinePlayerWrapper-emotion.d.ts +0 -7
- package/dist/types-ts4.5/card/svgView/svgImage-emotion.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/actionsBar/actionsBarWrapper-emotion.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/actionsBar/cardActions/cardActionButton-emotion.d.ts +0 -2
- package/dist/types-ts4.5/card/ui/blanket/blanket-emotion.d.ts +0 -9
- package/dist/types-ts4.5/card/ui/iconMessage/iconMessageWrapper-emotion.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/iconWrapper/iconWrapper-emotion.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/playButton/playButtonBackground-emotion.d.ts +0 -6
- package/dist/types-ts4.5/card/ui/playButton/playButtonWrapper-emotion.d.ts +0 -6
- package/dist/types-ts4.5/card/ui/progressBar/styledBar-emotion.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/tickBox/tickBoxWrapper-emotion.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/titleBox/titleBoxComponents-emotion.d.ts +0 -11
- package/dist/types-ts4.5/card/ui/unhandledErrorCard/unhandledErrorCard-emotion.d.ts +0 -10
- package/dist/types-ts4.5/card/ui/wrapper/imageContainer-emotion.d.ts +0 -17
- package/dist/types-ts4.5/card/ui/wrapper/wrapper-emotion.d.ts +0 -7
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import { errorMessageWrapperStyles, newTitleBoxIconStyles, titleBoxFooterStyles, titleBoxHeaderStyles, titleBoxIconStyles, titleBoxWrapperStyles } from './styles';
|
|
9
|
-
export const TitleBoxWrapper = props => {
|
|
10
|
-
const {
|
|
11
|
-
breakpoint,
|
|
12
|
-
titleBoxBgColor,
|
|
13
|
-
hidden
|
|
14
|
-
} = props;
|
|
15
|
-
return jsx("div", {
|
|
16
|
-
id: "titleBoxWrapper",
|
|
17
|
-
"data-testid": "media-title-box"
|
|
18
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
19
|
-
,
|
|
20
|
-
css: titleBoxWrapperStyles({
|
|
21
|
-
breakpoint: breakpoint,
|
|
22
|
-
display: hidden ? 'none' : 'flex',
|
|
23
|
-
titleBoxBgColor: titleBoxBgColor
|
|
24
|
-
})
|
|
25
|
-
}, props.children);
|
|
26
|
-
};
|
|
27
|
-
export const TitleBoxHeader = props => {
|
|
28
|
-
const {
|
|
29
|
-
hasIconOverlap
|
|
30
|
-
} = props;
|
|
31
|
-
return jsx("div", {
|
|
32
|
-
id: "titleBoxHeader",
|
|
33
|
-
"data-testid": "title-box-header"
|
|
34
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
35
|
-
,
|
|
36
|
-
css: titleBoxHeaderStyles({
|
|
37
|
-
hasIconOverlap
|
|
38
|
-
})
|
|
39
|
-
}, props.children);
|
|
40
|
-
};
|
|
41
|
-
export const TitleBoxFooter = props => {
|
|
42
|
-
const {
|
|
43
|
-
hasIconOverlap
|
|
44
|
-
} = props;
|
|
45
|
-
return jsx("div", {
|
|
46
|
-
id: "titleBoxFooter",
|
|
47
|
-
"data-testid": "title-box-footer"
|
|
48
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
49
|
-
,
|
|
50
|
-
css: titleBoxFooterStyles({
|
|
51
|
-
hasIconOverlap
|
|
52
|
-
})
|
|
53
|
-
}, props.children);
|
|
54
|
-
};
|
|
55
|
-
export const TitleBoxIcon = props => {
|
|
56
|
-
return jsx("div", {
|
|
57
|
-
id: "titleBoxIcon",
|
|
58
|
-
"data-testid": "title-box-icon",
|
|
59
|
-
css: fg('platform-visual-refresh-icons') ?
|
|
60
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
61
|
-
newTitleBoxIconStyles :
|
|
62
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
63
|
-
titleBoxIconStyles
|
|
64
|
-
}, props.children);
|
|
65
|
-
};
|
|
66
|
-
export const ErrorMessageWrapper = props => {
|
|
67
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
68
|
-
return jsx("div", {
|
|
69
|
-
css: errorMessageWrapperStyles
|
|
70
|
-
}, props.children);
|
|
71
|
-
};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { Component } from 'react';
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import { css, jsx } from '@emotion/react';
|
|
8
|
-
import WarningIcon from '@atlaskit/icon/core/migration/status-warning--editor-warning';
|
|
9
|
-
import { N20, N800, Y500 } from '@atlaskit/theme/colors';
|
|
10
|
-
import { center, borderRadius } from '@atlaskit/media-ui';
|
|
11
|
-
import { defaultImageCardDimensions } from '../../../utils';
|
|
12
|
-
import { ContentLoadingErrorMessage } from './contentLoadingErrorMessage';
|
|
13
|
-
const isPercentage = value => /^\d+(\.\d+)?%$/.test(value);
|
|
14
|
-
const shouldShowText = ({
|
|
15
|
-
width,
|
|
16
|
-
height
|
|
17
|
-
}) => {
|
|
18
|
-
if (isPercentage(width) || isPercentage(height)) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
return parseInt(width, 10) >= 240 && parseInt(height, 10) >= 90;
|
|
22
|
-
};
|
|
23
|
-
const normalizeDimension = (value, defaultValue) => {
|
|
24
|
-
const sValue = value.toString();
|
|
25
|
-
return isPercentage(sValue) ? sValue : isNaN(parseInt(sValue, 10)) ? defaultValue + 'px' : parseInt(sValue, 10) + 'px';
|
|
26
|
-
};
|
|
27
|
-
const getConvertedDimension = dimensions => {
|
|
28
|
-
const {
|
|
29
|
-
width = defaultImageCardDimensions.width,
|
|
30
|
-
height = defaultImageCardDimensions.height
|
|
31
|
-
} = dimensions;
|
|
32
|
-
return {
|
|
33
|
-
width: normalizeDimension(width, defaultImageCardDimensions.width),
|
|
34
|
-
height: normalizeDimension(height, defaultImageCardDimensions.height)
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
const wrapperStyles = (dimensions = defaultImageCardDimensions) => {
|
|
38
|
-
try {
|
|
39
|
-
return css(
|
|
40
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
41
|
-
center,
|
|
42
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
43
|
-
borderRadius, {
|
|
44
|
-
background: `var(--ds-background-neutral, ${N20})`,
|
|
45
|
-
color: `var(--ds-text-subtle, ${N800})`,
|
|
46
|
-
maxHeight: '100%',
|
|
47
|
-
maxWidth: '100%'
|
|
48
|
-
},
|
|
49
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
50
|
-
getConvertedDimension(dimensions), {
|
|
51
|
-
display: 'flex',
|
|
52
|
-
flexDirection: 'column',
|
|
53
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
54
|
-
p: {
|
|
55
|
-
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
56
|
-
textAlign: 'center'
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
} catch (e) {
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
export class UnhandledErrorCard extends Component {
|
|
64
|
-
render() {
|
|
65
|
-
const {
|
|
66
|
-
dimensions,
|
|
67
|
-
onClick
|
|
68
|
-
} = this.props;
|
|
69
|
-
const isErrorHidden = !shouldShowText(getConvertedDimension(dimensions !== null && dimensions !== void 0 ? dimensions : defaultImageCardDimensions));
|
|
70
|
-
return (
|
|
71
|
-
// eslint-disable-next-line @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlaskit/design-system/consistent-css-prop-usage, @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/no-static-element-interactions -- Ignored via go/DSP-18766
|
|
72
|
-
jsx("div", {
|
|
73
|
-
css: wrapperStyles(dimensions),
|
|
74
|
-
onClick: onClick
|
|
75
|
-
}, jsx(WarningIcon, {
|
|
76
|
-
label: "Error",
|
|
77
|
-
color: `var(--ds-icon-warning, ${Y500})`,
|
|
78
|
-
LEGACY_size: "medium",
|
|
79
|
-
spacing: "spacious"
|
|
80
|
-
}), jsx(ContentLoadingErrorMessage, {
|
|
81
|
-
isHidden: isErrorHidden
|
|
82
|
-
}))
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx, css } from '@emotion/react';
|
|
7
|
-
import { fileCardImageViewSelector } from '../../classnames';
|
|
8
|
-
const imageContainerStyles = css({
|
|
9
|
-
display: 'flex',
|
|
10
|
-
position: 'relative',
|
|
11
|
-
maxWidth: '100%',
|
|
12
|
-
width: '100%',
|
|
13
|
-
height: '100%',
|
|
14
|
-
maxHeight: '100%',
|
|
15
|
-
overflow: 'hidden',
|
|
16
|
-
borderRadius: "var(--ds-radius-small, 3px)"
|
|
17
|
-
});
|
|
18
|
-
const imageContainerCenterStyles = css({
|
|
19
|
-
flexDirection: 'column',
|
|
20
|
-
justifyContent: 'center',
|
|
21
|
-
alignItems: 'center'
|
|
22
|
-
});
|
|
23
|
-
export const ImageContainer = ({
|
|
24
|
-
children,
|
|
25
|
-
mediaName,
|
|
26
|
-
status,
|
|
27
|
-
progress,
|
|
28
|
-
selected,
|
|
29
|
-
source,
|
|
30
|
-
centerElements
|
|
31
|
-
}) => jsx("div", {
|
|
32
|
-
css: [imageContainerStyles, centerElements && imageContainerCenterStyles],
|
|
33
|
-
"data-testid": fileCardImageViewSelector
|
|
34
|
-
/**
|
|
35
|
-
* This wrapper MUST add the classname in order to allow the editor to prevent bubbling up the click event.
|
|
36
|
-
* See the method isInteractiveElement in source platform/packages/editor/renderer/src/ui/Renderer/click-to-edit.ts
|
|
37
|
-
* Also, many other consumer tests rely on this selector.
|
|
38
|
-
*/
|
|
39
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
40
|
-
,
|
|
41
|
-
className: fileCardImageViewSelector,
|
|
42
|
-
"data-test-media-name": mediaName,
|
|
43
|
-
"data-test-status": status,
|
|
44
|
-
"data-test-progress": progress,
|
|
45
|
-
"data-test-selected": selected,
|
|
46
|
-
"data-test-source": source
|
|
47
|
-
}, children);
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import { jsx } from '@emotion/react';
|
|
8
|
-
import { newFileExperienceClassName } from '../../cardConstants';
|
|
9
|
-
import { wrapperStyles } from './styles';
|
|
10
|
-
import { VcMediaWrapperProps } from '@atlaskit/react-ufo/vc-media';
|
|
11
|
-
import UFOCustomData from '@atlaskit/react-ufo/custom-data';
|
|
12
|
-
export const Wrapper = props => {
|
|
13
|
-
const {
|
|
14
|
-
testId,
|
|
15
|
-
dimensions,
|
|
16
|
-
appearance,
|
|
17
|
-
onClick,
|
|
18
|
-
onMouseEnter,
|
|
19
|
-
innerRef,
|
|
20
|
-
breakpoint,
|
|
21
|
-
mediaCardCursor,
|
|
22
|
-
disableOverlay,
|
|
23
|
-
selected,
|
|
24
|
-
displayBackground,
|
|
25
|
-
isPlayButtonClickable,
|
|
26
|
-
isTickBoxSelectable,
|
|
27
|
-
shouldDisplayTooltip
|
|
28
|
-
} = props;
|
|
29
|
-
return (
|
|
30
|
-
// eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
|
|
31
|
-
jsx("div", _extends({
|
|
32
|
-
id: "newFileExperienceWrapper"
|
|
33
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
34
|
-
,
|
|
35
|
-
className: newFileExperienceClassName,
|
|
36
|
-
"data-testid": testId
|
|
37
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
38
|
-
,
|
|
39
|
-
css: wrapperStyles({
|
|
40
|
-
breakpoint,
|
|
41
|
-
dimensions,
|
|
42
|
-
appearance,
|
|
43
|
-
disableOverlay,
|
|
44
|
-
displayBackground,
|
|
45
|
-
selected,
|
|
46
|
-
isPlayButtonClickable,
|
|
47
|
-
isTickBoxSelectable,
|
|
48
|
-
shouldDisplayTooltip,
|
|
49
|
-
mediaCardCursor
|
|
50
|
-
}),
|
|
51
|
-
ref: innerRef,
|
|
52
|
-
onClick: onClick
|
|
53
|
-
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
54
|
-
,
|
|
55
|
-
onMouseEnter: onMouseEnter
|
|
56
|
-
}, VcMediaWrapperProps), jsx(UFOCustomData, {
|
|
57
|
-
data: {
|
|
58
|
-
hasMediaComponent: true
|
|
59
|
-
}
|
|
60
|
-
}), props.children)
|
|
61
|
-
);
|
|
62
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import { jsx } from '@emotion/react';
|
|
8
|
-
import { inlinePlayerWrapperStyles, inlinePlayerClassName } from './inlinePlayerWrapperStyles';
|
|
9
|
-
import { VcMediaWrapperProps } from '@atlaskit/react-ufo/vc-media';
|
|
10
|
-
import UFOCustomData from '@atlaskit/react-ufo/custom-data';
|
|
11
|
-
export var InlinePlayerWrapper = function InlinePlayerWrapper(props) {
|
|
12
|
-
var testId = props.testId,
|
|
13
|
-
selected = props.selected,
|
|
14
|
-
dimensions = props.dimensions,
|
|
15
|
-
onClick = props.onClick,
|
|
16
|
-
innerRef = props.innerRef;
|
|
17
|
-
return (
|
|
18
|
-
// eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
|
|
19
|
-
jsx("div", _extends({
|
|
20
|
-
id: "inlinePlayerWrapper",
|
|
21
|
-
"data-testid": testId
|
|
22
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
23
|
-
,
|
|
24
|
-
className: inlinePlayerClassName
|
|
25
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
26
|
-
,
|
|
27
|
-
css: inlinePlayerWrapperStyles({
|
|
28
|
-
selected: selected,
|
|
29
|
-
dimensions: dimensions
|
|
30
|
-
}),
|
|
31
|
-
onClick: onClick,
|
|
32
|
-
ref: innerRef
|
|
33
|
-
}, VcMediaWrapperProps), jsx(UFOCustomData, {
|
|
34
|
-
data: {
|
|
35
|
-
hasMediaComponent: true
|
|
36
|
-
}
|
|
37
|
-
}), props.children)
|
|
38
|
-
);
|
|
39
|
-
};
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
/**
|
|
6
|
-
* @jsxRuntime classic
|
|
7
|
-
* @jsx jsx
|
|
8
|
-
*/
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
-
import { jsx, css } from '@emotion/react';
|
|
11
|
-
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
12
|
-
import { MediaCardError } from '../../errors';
|
|
13
|
-
import { calculateSvgDimensions } from './helpers';
|
|
14
|
-
import { useResolveSvg, MediaSVGError } from '@atlaskit/media-svg';
|
|
15
|
-
var getErrorReason = function getErrorReason(svgReason) {
|
|
16
|
-
switch (svgReason) {
|
|
17
|
-
case 'img-error':
|
|
18
|
-
return 'svg-img-error';
|
|
19
|
-
case 'binary-fetch':
|
|
20
|
-
return 'svg-binary-fetch';
|
|
21
|
-
case 'blob-to-datauri':
|
|
22
|
-
return 'svg-blob-to-datauri';
|
|
23
|
-
default:
|
|
24
|
-
return 'svg-unknown-error';
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
var svgRendererStyles = css({
|
|
28
|
-
objectFit: 'contain',
|
|
29
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
30
|
-
backgroundColor: 'white' // This background color is for transparency
|
|
31
|
-
});
|
|
32
|
-
var svgRendererMaxDimensionStyles = css({
|
|
33
|
-
maxWidth: '100%',
|
|
34
|
-
maxHeight: '100%'
|
|
35
|
-
});
|
|
36
|
-
export var SvgView = function SvgView(_ref) {
|
|
37
|
-
var identifier = _ref.identifier,
|
|
38
|
-
resizeMode = _ref.resizeMode,
|
|
39
|
-
onLoad = _ref.onLoad,
|
|
40
|
-
onError = _ref.onError,
|
|
41
|
-
wrapperRef = _ref.wrapperRef,
|
|
42
|
-
alt = _ref.alt;
|
|
43
|
-
var _useState = useState(false),
|
|
44
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
45
|
-
didSvgRender = _useState2[0],
|
|
46
|
-
setDidSvgRender = _useState2[1];
|
|
47
|
-
var _useState3 = useState({}),
|
|
48
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
49
|
-
svgDimensions = _useState4[0],
|
|
50
|
-
setSvgDimensions = _useState4[1];
|
|
51
|
-
var imgRef = useRef(null);
|
|
52
|
-
var calculateDimensions = useCallback(function (targetImgElem) {
|
|
53
|
-
if (!wrapperRef.current || !targetImgElem) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
setSvgDimensions(calculateSvgDimensions(targetImgElem, wrapperRef.current, resizeMode));
|
|
57
|
-
}, [resizeMode, wrapperRef]);
|
|
58
|
-
var onSvgLoad = function onSvgLoad(evt) {
|
|
59
|
-
calculateDimensions(evt.currentTarget);
|
|
60
|
-
setDidSvgRender(true);
|
|
61
|
-
onLoad === null || onLoad === void 0 || onLoad();
|
|
62
|
-
};
|
|
63
|
-
var onSvgError = function onSvgError(err) {
|
|
64
|
-
var error = new MediaCardError(getErrorReason(err.primaryReason), err.secondaryError);
|
|
65
|
-
onError === null || onError === void 0 || onError(error);
|
|
66
|
-
};
|
|
67
|
-
useEffect(function () {
|
|
68
|
-
if (imgRef.current) {
|
|
69
|
-
calculateDimensions(imgRef.current);
|
|
70
|
-
}
|
|
71
|
-
}, [imgRef, calculateDimensions]);
|
|
72
|
-
var _useResolveSvg = useResolveSvg(identifier, onSvgError),
|
|
73
|
-
svgUrl = _useResolveSvg.svgUrl,
|
|
74
|
-
source = _useResolveSvg.source;
|
|
75
|
-
var width = svgDimensions.width,
|
|
76
|
-
height = svgDimensions.height;
|
|
77
|
-
return svgUrl && source ? jsx("img", {
|
|
78
|
-
"data-testid": 'media-card-svg',
|
|
79
|
-
"data-fileid": identifier.id,
|
|
80
|
-
"data-filecollection": identifier.collectionName,
|
|
81
|
-
"data-source": source,
|
|
82
|
-
src: svgUrl,
|
|
83
|
-
alt: alt,
|
|
84
|
-
css: [svgRendererStyles, !width && !height && svgRendererMaxDimensionStyles],
|
|
85
|
-
style: _objectSpread({
|
|
86
|
-
visibility: didSvgRender ? 'visible' : 'hidden'
|
|
87
|
-
}, svgDimensions),
|
|
88
|
-
onLoad: onSvgLoad,
|
|
89
|
-
onError: function onError() {
|
|
90
|
-
onSvgError(new MediaSVGError('img-error'));
|
|
91
|
-
},
|
|
92
|
-
ref: imgRef
|
|
93
|
-
}) : null;
|
|
94
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { wrapperStyles, actionsBarClassName } from './styles';
|
|
8
|
-
export var ActionsBarWrapper = function ActionsBarWrapper(props) {
|
|
9
|
-
return (
|
|
10
|
-
// eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
|
|
11
|
-
jsx("div", {
|
|
12
|
-
id: "actionsBarWrapper",
|
|
13
|
-
"data-testId": "actionsBarWrapper"
|
|
14
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
15
|
-
,
|
|
16
|
-
css: wrapperStyles(props.isFixed)
|
|
17
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
18
|
-
,
|
|
19
|
-
className: actionsBarClassName,
|
|
20
|
-
onClick: function onClick(event) {
|
|
21
|
-
event.stopPropagation();
|
|
22
|
-
event.preventDefault();
|
|
23
|
-
}
|
|
24
|
-
}, props.children)
|
|
25
|
-
);
|
|
26
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
/**
|
|
6
|
-
* @jsxRuntime classic
|
|
7
|
-
* @jsx jsx
|
|
8
|
-
*/
|
|
9
|
-
import { forwardRef } from 'react';
|
|
10
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
|
-
import { jsx } from '@emotion/react';
|
|
12
|
-
import { cardActionButtonStyles } from './styles';
|
|
13
|
-
export var CardActionButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
14
|
-
return jsx("button", _extends({}, props, {
|
|
15
|
-
id: "cardActionButton",
|
|
16
|
-
"data-testid": "media-card-primary-action",
|
|
17
|
-
"aria-label": props.label
|
|
18
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
19
|
-
,
|
|
20
|
-
css: cardActionButtonStyles(props)
|
|
21
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
22
|
-
,
|
|
23
|
-
style: _objectSpread(_objectSpread({}, props.style), {}, {
|
|
24
|
-
cursor: props.disabled ? 'not-allowed' : 'default'
|
|
25
|
-
}),
|
|
26
|
-
onClick: props.onClick,
|
|
27
|
-
onMouseDown: props.onMouseDown,
|
|
28
|
-
ref: ref
|
|
29
|
-
}), props.children);
|
|
30
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { blanketStyles, blanketClassName } from './styles';
|
|
8
|
-
export var Blanket = function Blanket(props) {
|
|
9
|
-
var isFixed = props.isFixed;
|
|
10
|
-
return jsx("div", {
|
|
11
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
12
|
-
css: blanketStyles(isFixed)
|
|
13
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
14
|
-
,
|
|
15
|
-
className: blanketClassName,
|
|
16
|
-
"data-testid": "media-card-blanket"
|
|
17
|
-
});
|
|
18
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { css, jsx } from '@emotion/react';
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { keyframes } from '@emotion/react';
|
|
9
|
-
var breatheAnimation = keyframes({
|
|
10
|
-
'0%': {
|
|
11
|
-
opacity: 1
|
|
12
|
-
},
|
|
13
|
-
'50%': {
|
|
14
|
-
opacity: 0.3
|
|
15
|
-
},
|
|
16
|
-
'100%': {
|
|
17
|
-
opacity: 1
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
var animatedStyles = css({
|
|
21
|
-
animationName: breatheAnimation,
|
|
22
|
-
animationDuration: '3.5s',
|
|
23
|
-
animationTimingFunction: 'ease-in-out',
|
|
24
|
-
animationIterationCount: 'infinite'
|
|
25
|
-
});
|
|
26
|
-
var baseStyles = css({
|
|
27
|
-
overflow: 'hidden',
|
|
28
|
-
opacity: 1,
|
|
29
|
-
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
30
|
-
color: "var(--ds-text-subtlest, #7A869A)",
|
|
31
|
-
textAlign: 'center',
|
|
32
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
33
|
-
marginBottom: '-1em',
|
|
34
|
-
// Needs pixel precision to align the icon at the center of the box
|
|
35
|
-
paddingBlock: "var(--ds-space-050, 4px)",
|
|
36
|
-
paddingInline: "var(--ds-space-100, 8px)"
|
|
37
|
-
});
|
|
38
|
-
export var IconMessageWrapper = function IconMessageWrapper(props) {
|
|
39
|
-
var animated = props.animated;
|
|
40
|
-
return jsx("div", {
|
|
41
|
-
id: "iconMessageWrapper",
|
|
42
|
-
css: [baseStyles, animated && animatedStyles]
|
|
43
|
-
}, props.children);
|
|
44
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { iconWrapperStyles } from './styles';
|
|
8
|
-
export var IconWrapper = function IconWrapper(props) {
|
|
9
|
-
var breakpoint = props.breakpoint,
|
|
10
|
-
hasTitleBox = props.hasTitleBox;
|
|
11
|
-
return jsx("div", {
|
|
12
|
-
id: "iconWrapper"
|
|
13
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
14
|
-
,
|
|
15
|
-
css: iconWrapperStyles({
|
|
16
|
-
breakpoint: breakpoint,
|
|
17
|
-
hasTitleBox: hasTitleBox
|
|
18
|
-
})
|
|
19
|
-
}, props.children);
|
|
20
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { backgroundStyles, bkgClassName } from './styles';
|
|
8
|
-
export var PlayButtonBackground = function PlayButtonBackground() {
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
10
|
-
return jsx("div", {
|
|
11
|
-
css: backgroundStyles,
|
|
12
|
-
className: bkgClassName
|
|
13
|
-
});
|
|
14
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { playButtonClassName, playButtonWrapperStyles } from './styles';
|
|
8
|
-
export var PlayButtonWrapper = function PlayButtonWrapper(props) {
|
|
9
|
-
return (
|
|
10
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
11
|
-
jsx("div", {
|
|
12
|
-
css: playButtonWrapperStyles,
|
|
13
|
-
className: playButtonClassName
|
|
14
|
-
}, props.children)
|
|
15
|
-
);
|
|
16
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { styledBarStyles } from './styles';
|
|
8
|
-
export var StyledBar = function StyledBar(props) {
|
|
9
|
-
var progress = props.progress,
|
|
10
|
-
breakpoint = props.breakpoint,
|
|
11
|
-
positionBottom = props.positionBottom,
|
|
12
|
-
showOnTop = props.showOnTop,
|
|
13
|
-
ariaLabel = props.ariaLabel;
|
|
14
|
-
return jsx("div", {
|
|
15
|
-
id: "styledBar",
|
|
16
|
-
role: "progressbar",
|
|
17
|
-
"aria-valuenow": progress,
|
|
18
|
-
"aria-label": ariaLabel
|
|
19
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
20
|
-
,
|
|
21
|
-
css: styledBarStyles({
|
|
22
|
-
progress: progress,
|
|
23
|
-
breakpoint: breakpoint,
|
|
24
|
-
positionBottom: positionBottom,
|
|
25
|
-
showOnTop: showOnTop
|
|
26
|
-
})
|
|
27
|
-
});
|
|
28
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import { tickBoxClassName } from './styles';
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
-
import { css } from '@emotion/react';
|
|
11
|
-
import { transition } from '../styles';
|
|
12
|
-
import { B200 } from '@atlaskit/theme/colors';
|
|
13
|
-
var getSelectedStyles = function getSelectedStyles(selected) {
|
|
14
|
-
return selected ? "background-color: ".concat("var(--ds-icon-information, ".concat(B200, ")"), ";\n color: ", "var(--ds-icon-inverse, white)", ";") : "";
|
|
15
|
-
};
|
|
16
|
-
var oldWrapperStyes = css({
|
|
17
|
-
width: '14px',
|
|
18
|
-
height: '14px',
|
|
19
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
20
|
-
span: {
|
|
21
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
22
|
-
svg: {
|
|
23
|
-
height: '14px'
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
var wrapperStyles = function wrapperStyles(selected) {
|
|
28
|
-
return css(
|
|
29
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
30
|
-
transition && transition(), {
|
|
31
|
-
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
32
|
-
width: "var(--ds-space-200, 16px)",
|
|
33
|
-
height: "var(--ds-space-200, 16px)",
|
|
34
|
-
position: 'absolute',
|
|
35
|
-
top: "var(--ds-space-075, 7px)",
|
|
36
|
-
left: "var(--ds-space-075, 7px)",
|
|
37
|
-
borderRadius: "var(--ds-space-250, 20px)",
|
|
38
|
-
color: 'transparent',
|
|
39
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
40
|
-
span: {
|
|
41
|
-
display: 'block'
|
|
42
|
-
},
|
|
43
|
-
display: 'grid',
|
|
44
|
-
placeItems: 'center'
|
|
45
|
-
},
|
|
46
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
47
|
-
getSelectedStyles(selected));
|
|
48
|
-
};
|
|
49
|
-
wrapperStyles.displayName = 'TickBoxWrapper';
|
|
50
|
-
export var TickBoxWrapper = function TickBoxWrapper(props) {
|
|
51
|
-
return jsx("div", {
|
|
52
|
-
id: "tickBoxWrapper",
|
|
53
|
-
css: [
|
|
54
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
55
|
-
wrapperStyles(props.selected), !fg('platform-visual-refresh-icons') && oldWrapperStyes]
|
|
56
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
57
|
-
,
|
|
58
|
-
className: tickBoxClassName
|
|
59
|
-
}, props.children);
|
|
60
|
-
};
|