@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.
Files changed (52) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/card/card.js +5 -5
  3. package/dist/cjs/card/inlinePlayerWrapperStyles.js +1 -1
  4. package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
  5. package/dist/cjs/card/ui/wrapper/styles.js +1 -1
  6. package/dist/cjs/card/v2/cardV2.js +1 -1
  7. package/dist/cjs/card/v2/fileCard.js +1 -1
  8. package/dist/cjs/inline/loader.js +1 -1
  9. package/dist/cjs/inline/mediaInlineAnalyticsErrorBoundary.js +11 -11
  10. package/dist/cjs/utils/ufoExperiences.js +1 -1
  11. package/dist/es2019/card/card.js +5 -5
  12. package/dist/es2019/card/inlinePlayerWrapperStyles.js +12 -12
  13. package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
  14. package/dist/es2019/card/ui/wrapper/styles.js +21 -21
  15. package/dist/es2019/card/v2/cardV2.js +1 -1
  16. package/dist/es2019/card/v2/fileCard.js +1 -1
  17. package/dist/es2019/inline/loader.js +1 -1
  18. package/dist/es2019/inline/mediaInlineAnalyticsErrorBoundary.js +11 -11
  19. package/dist/es2019/utils/ufoExperiences.js +1 -1
  20. package/dist/esm/card/card.js +5 -5
  21. package/dist/esm/card/inlinePlayerWrapperStyles.js +1 -1
  22. package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
  23. package/dist/esm/card/ui/wrapper/styles.js +1 -1
  24. package/dist/esm/card/v2/cardV2.js +1 -1
  25. package/dist/esm/card/v2/fileCard.js +1 -1
  26. package/dist/esm/inline/loader.js +1 -1
  27. package/dist/esm/inline/mediaInlineAnalyticsErrorBoundary.js +11 -11
  28. package/dist/esm/utils/ufoExperiences.js +1 -1
  29. package/dist/types/card/ui/iconWrapper/styles.d.ts +1 -1
  30. package/dist/types/card/ui/titleBox/styles.d.ts +1 -1
  31. package/dist/types/utils/preventClickThrough.d.ts +1 -1
  32. package/dist/types/utils/viewportDetector.d.ts +1 -1
  33. package/dist/types-ts4.5/card/ui/iconWrapper/styles.d.ts +1 -1
  34. package/dist/types-ts4.5/card/ui/titleBox/styles.d.ts +1 -1
  35. package/dist/types-ts4.5/utils/preventClickThrough.d.ts +1 -1
  36. package/dist/types-ts4.5/utils/viewportDetector.d.ts +1 -1
  37. package/example-helpers/DelayedRender.tsx +19 -19
  38. package/example-helpers/cardViewWrapper.tsx +18 -22
  39. package/example-helpers/cards.tsx +268 -331
  40. package/example-helpers/developmentUseMessage.tsx +8 -9
  41. package/example-helpers/index.tsx +100 -124
  42. package/example-helpers/selectableCard.tsx +32 -35
  43. package/example-helpers/ssrHelpers.tsx +19 -29
  44. package/example-helpers/styles.ts +73 -73
  45. package/example-helpers/svg-helpers/cardContainer.tsx +15 -21
  46. package/example-helpers/svg-helpers/controls.tsx +11 -11
  47. package/example-helpers/svg-helpers/dimensionPicker.tsx +85 -93
  48. package/example-helpers/svg-helpers/svgContainer.tsx +18 -18
  49. package/example-helpers/svg-helpers/toggle.tsx +28 -29
  50. package/example-helpers/svg-helpers/uploader.ts +33 -33
  51. package/package.json +5 -5
  52. 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
- small?: boolean;
7
- displayInline?: boolean;
8
- children?: JSX.Element;
6
+ small?: boolean;
7
+ displayInline?: boolean;
8
+ children?: JSX.Element;
9
9
  };
10
10
 
11
11
  const displayInlineStyles = (displayInline?: boolean) => {
12
- return displayInline ? 'inline-block;' : '';
12
+ return displayInline ? 'inline-block;' : '';
13
13
  };
14
14
 
15
15
  // Minimum supported dimensions
16
16
  const smallStyles = xcss({
17
- width: '156px',
18
- height: '108px',
17
+ width: '156px',
18
+ height: '108px',
19
19
  });
20
20
 
21
21
  // Maximum supported dimensions
22
22
  const largeStyles = xcss({
23
- width: '600px',
24
- height: '450px',
23
+ width: '600px',
24
+ height: '450px',
25
25
  });
26
26
 
27
27
  const cardWrapperStyles = ({ small, displayInline }: CardViewWrapperProps) =>
28
- xcss({
29
- display: displayInlineStyles(displayInline),
30
- marginBlock: 'space.200',
31
- marginInline: 'space.250',
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
- if (props.small) {
36
- return (
37
- <Box xcss={[cardWrapperStyles(props), smallStyles]}>{props.children}</Box>
38
- );
39
- } else {
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
  };