@atlaskit/media-card 77.12.0 → 77.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/card/card.js +5 -5
- package/dist/cjs/card/inlinePlayerWrapperStyles.js +1 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/ui/wrapper/styles.js +1 -1
- package/dist/cjs/card/v2/cardV2.js +1 -1
- package/dist/cjs/card/v2/fileCard.js +1 -1
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/inline/mediaInlineAnalyticsErrorBoundary.js +11 -11
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +5 -5
- package/dist/es2019/card/inlinePlayerWrapperStyles.js +12 -12
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/ui/wrapper/styles.js +21 -21
- package/dist/es2019/card/v2/cardV2.js +1 -1
- package/dist/es2019/card/v2/fileCard.js +1 -1
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/inline/mediaInlineAnalyticsErrorBoundary.js +11 -11
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +5 -5
- package/dist/esm/card/inlinePlayerWrapperStyles.js +1 -1
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/ui/wrapper/styles.js +1 -1
- package/dist/esm/card/v2/cardV2.js +1 -1
- package/dist/esm/card/v2/fileCard.js +1 -1
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/inline/mediaInlineAnalyticsErrorBoundary.js +11 -11
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/card/ui/iconWrapper/styles.d.ts +1 -1
- package/dist/types/card/ui/titleBox/styles.d.ts +1 -1
- package/dist/types/utils/preventClickThrough.d.ts +1 -1
- package/dist/types/utils/viewportDetector.d.ts +1 -1
- package/dist/types-ts4.5/card/ui/iconWrapper/styles.d.ts +1 -1
- package/dist/types-ts4.5/card/ui/titleBox/styles.d.ts +1 -1
- package/dist/types-ts4.5/utils/preventClickThrough.d.ts +1 -1
- package/dist/types-ts4.5/utils/viewportDetector.d.ts +1 -1
- package/example-helpers/DelayedRender.tsx +19 -19
- package/example-helpers/cardViewWrapper.tsx +18 -22
- package/example-helpers/cards.tsx +268 -331
- package/example-helpers/developmentUseMessage.tsx +8 -9
- package/example-helpers/index.tsx +100 -124
- package/example-helpers/selectableCard.tsx +32 -35
- package/example-helpers/ssrHelpers.tsx +19 -29
- package/example-helpers/styles.ts +73 -73
- package/example-helpers/svg-helpers/cardContainer.tsx +15 -21
- package/example-helpers/svg-helpers/controls.tsx +11 -11
- package/example-helpers/svg-helpers/dimensionPicker.tsx +85 -93
- package/example-helpers/svg-helpers/svgContainer.tsx +18 -18
- package/example-helpers/svg-helpers/toggle.tsx +28 -29
- package/example-helpers/svg-helpers/uploader.ts +33 -33
- package/package.json +5 -5
- package/report.api.md +227 -232
|
@@ -3,42 +3,38 @@ import { jsx } from '@emotion/react';
|
|
|
3
3
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
4
4
|
|
|
5
5
|
type CardViewWrapperProps = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
small?: boolean;
|
|
7
|
+
displayInline?: boolean;
|
|
8
|
+
children?: JSX.Element;
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
const displayInlineStyles = (displayInline?: boolean) => {
|
|
12
|
-
|
|
12
|
+
return displayInline ? 'inline-block;' : '';
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
// Minimum supported dimensions
|
|
16
16
|
const smallStyles = xcss({
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
width: '156px',
|
|
18
|
+
height: '108px',
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
// Maximum supported dimensions
|
|
22
22
|
const largeStyles = xcss({
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
width: '600px',
|
|
24
|
+
height: '450px',
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
const cardWrapperStyles = ({ small, displayInline }: CardViewWrapperProps) =>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
xcss({
|
|
29
|
+
display: displayInlineStyles(displayInline),
|
|
30
|
+
marginBlock: 'space.200',
|
|
31
|
+
marginInline: 'space.250',
|
|
32
|
+
});
|
|
33
33
|
|
|
34
34
|
export const CardViewWrapper = (props: CardViewWrapperProps) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<Box xcss={[cardWrapperStyles(props), largeStyles]}>{props.children}</Box>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
35
|
+
if (props.small) {
|
|
36
|
+
return <Box xcss={[cardWrapperStyles(props), smallStyles]}>{props.children}</Box>;
|
|
37
|
+
} else {
|
|
38
|
+
return <Box xcss={[cardWrapperStyles(props), largeStyles]}>{props.children}</Box>;
|
|
39
|
+
}
|
|
44
40
|
};
|