@atlaskit/smart-card 34.5.0 → 34.5.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.
Files changed (150) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/common/ui/icons/angle-brackets-icon.js +2 -11
  3. package/dist/cjs/common/ui/icons/audio-icon.js +2 -11
  4. package/dist/cjs/common/ui/icons/blog-icon.js +13 -0
  5. package/dist/cjs/common/ui/icons/chart-bar-icon.js +2 -11
  6. package/dist/cjs/common/ui/icons/file-icon.js +2 -11
  7. package/dist/cjs/common/ui/icons/folder-icon.js +2 -11
  8. package/dist/cjs/common/ui/icons/image-icon.js +2 -11
  9. package/dist/cjs/common/ui/icons/list-bullet-icon.js +2 -11
  10. package/dist/cjs/common/ui/icons/page-icon.js +2 -12
  11. package/dist/cjs/common/ui/icons/types.js +5 -0
  12. package/dist/cjs/common/ui/icons/utils.js +47 -0
  13. package/dist/cjs/common/ui/icons/video-icon.js +2 -11
  14. package/dist/cjs/utils/analytics/analytics.js +1 -1
  15. package/dist/cjs/utils/index.js +395 -180
  16. package/dist/cjs/view/BlockCard/views/ErroredView.js +12 -2
  17. package/dist/cjs/view/BlockCard/views/ForbiddenView.js +12 -1
  18. package/dist/cjs/view/BlockCard/views/NotFoundView.js +12 -1
  19. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.compiled.css +1 -0
  20. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +16 -8
  21. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +2 -1
  22. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +38 -20
  23. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +2 -2
  24. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +2 -1
  25. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -2
  26. package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +43 -17
  27. package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +28 -8
  28. package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.compiled.css +0 -2
  29. package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +13 -12
  30. package/dist/cjs/view/FlexibleCard/components/container/index.compiled.css +5 -2
  31. package/dist/cjs/view/FlexibleCard/components/container/index.js +1 -1
  32. package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +35 -8
  33. package/dist/cjs/view/FlexibleCard/components/utils.js +23 -2
  34. package/dist/cjs/view/HoverCard/components/views/resolving/index.js +29 -14
  35. package/dist/cjs/view/LinkUrl/index.js +1 -1
  36. package/dist/es2019/common/ui/icons/angle-brackets-icon.js +2 -11
  37. package/dist/es2019/common/ui/icons/audio-icon.js +2 -11
  38. package/dist/es2019/common/ui/icons/blog-icon.js +6 -0
  39. package/dist/es2019/common/ui/icons/chart-bar-icon.js +2 -11
  40. package/dist/es2019/common/ui/icons/file-icon.js +2 -11
  41. package/dist/es2019/common/ui/icons/folder-icon.js +2 -11
  42. package/dist/es2019/common/ui/icons/image-icon.js +2 -11
  43. package/dist/es2019/common/ui/icons/list-bullet-icon.js +2 -11
  44. package/dist/es2019/common/ui/icons/page-icon.js +2 -12
  45. package/dist/es2019/common/ui/icons/types.js +1 -0
  46. package/dist/es2019/common/ui/icons/utils.js +39 -0
  47. package/dist/es2019/common/ui/icons/video-icon.js +2 -11
  48. package/dist/es2019/utils/analytics/analytics.js +1 -1
  49. package/dist/es2019/utils/index.js +166 -53
  50. package/dist/es2019/view/BlockCard/views/ErroredView.js +12 -2
  51. package/dist/es2019/view/BlockCard/views/ForbiddenView.js +13 -2
  52. package/dist/es2019/view/BlockCard/views/NotFoundView.js +13 -2
  53. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.compiled.css +1 -0
  54. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +8 -3
  55. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +2 -1
  56. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +24 -4
  57. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +2 -2
  58. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +2 -1
  59. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -2
  60. package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +46 -21
  61. package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +28 -8
  62. package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.compiled.css +0 -2
  63. package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +14 -12
  64. package/dist/es2019/view/FlexibleCard/components/container/index.compiled.css +5 -2
  65. package/dist/es2019/view/FlexibleCard/components/container/index.js +1 -1
  66. package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +35 -10
  67. package/dist/es2019/view/FlexibleCard/components/utils.js +22 -1
  68. package/dist/es2019/view/HoverCard/components/views/resolving/index.js +21 -6
  69. package/dist/es2019/view/LinkUrl/index.js +1 -1
  70. package/dist/esm/common/ui/icons/angle-brackets-icon.js +2 -11
  71. package/dist/esm/common/ui/icons/audio-icon.js +2 -11
  72. package/dist/esm/common/ui/icons/blog-icon.js +6 -0
  73. package/dist/esm/common/ui/icons/chart-bar-icon.js +2 -11
  74. package/dist/esm/common/ui/icons/file-icon.js +2 -11
  75. package/dist/esm/common/ui/icons/folder-icon.js +2 -11
  76. package/dist/esm/common/ui/icons/image-icon.js +2 -11
  77. package/dist/esm/common/ui/icons/list-bullet-icon.js +2 -11
  78. package/dist/esm/common/ui/icons/page-icon.js +2 -12
  79. package/dist/esm/common/ui/icons/types.js +1 -0
  80. package/dist/esm/common/ui/icons/utils.js +40 -0
  81. package/dist/esm/common/ui/icons/video-icon.js +2 -11
  82. package/dist/esm/utils/analytics/analytics.js +1 -1
  83. package/dist/esm/utils/index.js +261 -96
  84. package/dist/esm/view/BlockCard/views/ErroredView.js +12 -2
  85. package/dist/esm/view/BlockCard/views/ForbiddenView.js +13 -2
  86. package/dist/esm/view/BlockCard/views/NotFoundView.js +13 -2
  87. package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.compiled.css +1 -0
  88. package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +8 -3
  89. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +2 -1
  90. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +37 -19
  91. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +2 -2
  92. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +2 -1
  93. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -2
  94. package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +47 -21
  95. package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +28 -8
  96. package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.compiled.css +0 -2
  97. package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +13 -11
  98. package/dist/esm/view/FlexibleCard/components/container/index.compiled.css +5 -2
  99. package/dist/esm/view/FlexibleCard/components/container/index.js +1 -1
  100. package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +35 -8
  101. package/dist/esm/view/FlexibleCard/components/utils.js +22 -1
  102. package/dist/esm/view/HoverCard/components/views/resolving/index.js +21 -6
  103. package/dist/esm/view/LinkUrl/index.js +1 -1
  104. package/dist/types/common/ui/icons/angle-brackets-icon.d.ts +2 -6
  105. package/dist/types/common/ui/icons/audio-icon.d.ts +2 -6
  106. package/dist/types/common/ui/icons/blog-icon.d.ts +8 -0
  107. package/dist/types/common/ui/icons/chart-bar-icon.d.ts +2 -6
  108. package/dist/types/common/ui/icons/file-icon.d.ts +2 -6
  109. package/dist/types/common/ui/icons/folder-icon.d.ts +2 -6
  110. package/dist/types/common/ui/icons/image-icon.d.ts +2 -6
  111. package/dist/types/common/ui/icons/list-bullet-icon.d.ts +2 -6
  112. package/dist/types/common/ui/icons/page-icon.d.ts +2 -6
  113. package/dist/types/common/ui/icons/types.d.ts +6 -0
  114. package/dist/types/common/ui/icons/utils.d.ts +15 -0
  115. package/dist/types/common/ui/icons/video-icon.d.ts +2 -6
  116. package/dist/types/utils/index.d.ts +6 -2
  117. package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +3 -1
  118. package/dist/types/view/FlexibleCard/components/common/atlaskit-icon/index.d.ts +1 -1
  119. package/dist/types/view/FlexibleCard/components/common/atlaskit-icon/types.d.ts +2 -1
  120. package/dist/types/view/FlexibleCard/components/common/image-icon/index.d.ts +1 -1
  121. package/dist/types/view/FlexibleCard/components/common/image-icon/types.d.ts +2 -0
  122. package/dist/types/view/FlexibleCard/components/common/loading-skeleton/LoadingSkeletonOld.d.ts +2 -2
  123. package/dist/types/view/FlexibleCard/components/common/loading-skeleton/index.d.ts +4 -3
  124. package/dist/types/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +17 -1
  125. package/dist/types/view/FlexibleCard/components/utils.d.ts +2 -0
  126. package/dist/types/view/HoverCard/components/views/resolving/index.d.ts +0 -4
  127. package/dist/types-ts4.5/common/ui/icons/angle-brackets-icon.d.ts +2 -6
  128. package/dist/types-ts4.5/common/ui/icons/audio-icon.d.ts +2 -6
  129. package/dist/types-ts4.5/common/ui/icons/blog-icon.d.ts +8 -0
  130. package/dist/types-ts4.5/common/ui/icons/chart-bar-icon.d.ts +2 -6
  131. package/dist/types-ts4.5/common/ui/icons/file-icon.d.ts +2 -6
  132. package/dist/types-ts4.5/common/ui/icons/folder-icon.d.ts +2 -6
  133. package/dist/types-ts4.5/common/ui/icons/image-icon.d.ts +2 -6
  134. package/dist/types-ts4.5/common/ui/icons/list-bullet-icon.d.ts +2 -6
  135. package/dist/types-ts4.5/common/ui/icons/page-icon.d.ts +2 -6
  136. package/dist/types-ts4.5/common/ui/icons/types.d.ts +6 -0
  137. package/dist/types-ts4.5/common/ui/icons/utils.d.ts +15 -0
  138. package/dist/types-ts4.5/common/ui/icons/video-icon.d.ts +2 -6
  139. package/dist/types-ts4.5/utils/index.d.ts +6 -2
  140. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +3 -1
  141. package/dist/types-ts4.5/view/FlexibleCard/components/common/atlaskit-icon/index.d.ts +1 -1
  142. package/dist/types-ts4.5/view/FlexibleCard/components/common/atlaskit-icon/types.d.ts +2 -1
  143. package/dist/types-ts4.5/view/FlexibleCard/components/common/image-icon/index.d.ts +1 -1
  144. package/dist/types-ts4.5/view/FlexibleCard/components/common/image-icon/types.d.ts +2 -0
  145. package/dist/types-ts4.5/view/FlexibleCard/components/common/loading-skeleton/LoadingSkeletonOld.d.ts +2 -2
  146. package/dist/types-ts4.5/view/FlexibleCard/components/common/loading-skeleton/index.d.ts +4 -3
  147. package/dist/types-ts4.5/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +17 -1
  148. package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +2 -0
  149. package/dist/types-ts4.5/view/HoverCard/components/views/resolving/index.d.ts +0 -4
  150. package/package.json +14 -2
@@ -0,0 +1,6 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ import { IconTile } from '@atlaskit/icon';
3
+ import { SmartLinkSize } from '../../../constants';
4
+ export type AtlaskitIconTileProps = Omit<ComponentPropsWithoutRef<typeof IconTile>, 'appearance' | 'icon' | 'size'> & {
5
+ size?: SmartLinkSize;
6
+ };
@@ -0,0 +1,15 @@
1
+ import React, { type ComponentPropsWithoutRef, type ComponentType } from 'react';
2
+ import { IconTile } from '@atlaskit/icon';
3
+ import { SmartLinkSize } from '../../../constants';
4
+ import type { AtlaskitIconTileProps } from './types';
5
+ export declare const transformSmartLinkSizeToIconTileSize: (size?: SmartLinkSize) => "24" | "16";
6
+ type IconProps = {
7
+ label: string;
8
+ testId?: string;
9
+ };
10
+ export declare const renderIconPerSize: (IconSmall: ComponentType<IconProps>, IconLarge: ComponentType<IconProps>) => React.FC<IconProps & {
11
+ size?: SmartLinkSize;
12
+ }>;
13
+ type IconTileProps = ComponentPropsWithoutRef<typeof IconTile>;
14
+ export declare const renderIconTile: (Icon: IconTileProps['icon'], appearance: IconTileProps['appearance'], LegacyIcon: ComponentType<Omit<AtlaskitIconTileProps, 'size'>>) => React.FC<AtlaskitIconTileProps>;
15
+ export {};
@@ -1,7 +1,3 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- import VideoIcon from '@atlaskit/icon/core/video';
3
- declare const VideoIconWithColor: {
4
- (props: ComponentPropsWithoutRef<typeof VideoIcon>): JSX.Element;
5
- displayName: string;
6
- };
1
+ /// <reference types="react" />
2
+ declare const VideoIconWithColor: import("react").FC<import("./types").AtlaskitIconTileProps>;
7
3
  export default VideoIconWithColor;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type ActiveThemeState } from '@atlaskit/tokens';
3
- import { IconType } from '../constants';
3
+ import { IconType, SmartLinkSize } from '../constants';
4
4
  export declare const isSpecialEvent: (evt: React.MouseEvent | React.KeyboardEvent) => boolean;
5
5
  export declare const isIframe: () => boolean;
6
6
  /**
@@ -18,7 +18,10 @@ export declare const isSpecialKey: (event: React.MouseEvent | React.KeyboardEven
18
18
  export declare const isSpecialClick: (event: React.MouseEvent) => boolean;
19
19
  export declare const getIconForFileType: (fileMimeType: string) => React.ReactNode | undefined;
20
20
  export declare const getLabelForFileType: (fileMimeType: string) => React.ReactNode | undefined;
21
- export declare const getLazyIcons: () => Partial<Record<IconType, () => Promise<unknown>>>;
21
+ export declare const getLazyIcons: () => Partial<Record<IconType, {
22
+ default: () => Promise<unknown>;
23
+ large?: () => Promise<unknown>;
24
+ }>>;
22
25
  export declare const getIframeSandboxAttribute: (isTrusted: boolean) => "allow-downloads allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts" | undefined;
23
26
  export declare const handleOnClick: (handler: Function) => (e: React.BaseSyntheticEvent) => void;
24
27
  export declare const isIntersectionObserverSupported: () => boolean;
@@ -32,3 +35,4 @@ export declare const openUrl: (url?: string) => Promise<void>;
32
35
  * @param themeState
33
36
  */
34
37
  export declare const getPreviewUrlWithTheme: (previewUrl: string, themeState: Partial<ActiveThemeState>) => string;
38
+ export declare const isIconSizeLarge: (size?: SmartLinkSize) => boolean | undefined;
@@ -2,9 +2,11 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- /// <reference types="react" />
5
+ import type { ComponentPropsWithoutRef } from 'react';
6
+ import Block from '../../block';
6
7
  import { type TitleBlockViewProps } from '../types';
7
8
  import TitleBlockResolvedViewOld from './TitleBlockResolvedViewOld';
9
+ export declare const BlockFeatureGated: ({ className, ...props }: ComponentPropsWithoutRef<typeof Block>) => JSX.Element;
8
10
  /**
9
11
  * This renders a fully resolved TitleBlock.
10
12
  * This should render when a Smart Link returns a valid response.
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { type AtlaskitIconProps } from './types';
3
- declare const AtlaskitIcon: ({ icon, label, testId }: AtlaskitIconProps) => JSX.Element | null;
3
+ declare const AtlaskitIcon: ({ icon, label, testId, size }: AtlaskitIconProps) => JSX.Element | null;
4
4
  export default AtlaskitIcon;
@@ -1,6 +1,7 @@
1
- import { type IconType } from '../../../../../constants';
1
+ import { type IconType, SmartLinkSize } from '../../../../../constants';
2
2
  export type AtlaskitIconProps = {
3
3
  icon: IconType;
4
4
  label?: string;
5
5
  testId?: string;
6
+ size?: SmartLinkSize;
6
7
  };
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { type ImageIconProps } from './types';
3
- declare const ImageIcon: ({ defaultIcon, testId, url, onError, onLoad }: ImageIconProps) => JSX.Element;
3
+ declare const ImageIcon: ({ defaultIcon, testId, url, width, height, onError, onLoad, }: ImageIconProps) => JSX.Element;
4
4
  export default ImageIcon;
@@ -3,6 +3,8 @@ export type ImageIconProps = {
3
3
  defaultIcon?: React.ReactNode;
4
4
  testId?: string;
5
5
  url: string;
6
+ width?: string;
7
+ height?: string;
6
8
  onError?: () => void;
7
9
  onLoad?: () => void;
8
10
  };
@@ -3,6 +3,6 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { jsx } from '@emotion/react';
6
- import { type LoadingSkeletonProps } from './types';
7
- declare const LoadingSkeletonOld: ({ testId, width, height }: LoadingSkeletonProps) => jsx.JSX.Element;
6
+ import { type LoadingSkeletonPropsOld } from './types';
7
+ declare const LoadingSkeletonOld: ({ testId, width, height }: LoadingSkeletonPropsOld) => jsx.JSX.Element;
8
8
  export default LoadingSkeletonOld;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { type LoadingSkeletonProps } from './types';
3
- declare const LoadingSkeleton: (props: LoadingSkeletonProps) => JSX.Element;
4
- export default LoadingSkeleton;
2
+ import type { LoadingSkeletonPropsNew, LoadingSkeletonPropsOld } from './types';
3
+ declare const LoadingSkeletonNew: ({ testId, width, height }: LoadingSkeletonPropsNew) => JSX.Element;
4
+ declare const LoadingSkeletonOld: (props: LoadingSkeletonPropsOld) => JSX.Element;
5
+ export { LoadingSkeletonOld, LoadingSkeletonNew };
@@ -1,4 +1,4 @@
1
- export type LoadingSkeletonProps = {
1
+ export type LoadingSkeletonPropsOld = {
2
2
  /**
3
3
  * A `testId` prop is provided for specified elements, which is a unique
4
4
  * string that appears as a data attribute `data-testid` in the rendered
@@ -14,3 +14,19 @@ export type LoadingSkeletonProps = {
14
14
  */
15
15
  height?: number;
16
16
  };
17
+ export type LoadingSkeletonPropsNew = {
18
+ /**
19
+ * A `testId` prop is provided for specified elements, which is a unique
20
+ * string that appears as a data attribute `data-testid` in the rendered
21
+ * code, serving as a hook for automated tests
22
+ */
23
+ testId?: string;
24
+ /**
25
+ * Width of the loading skeleton, defaults to width of the parent element
26
+ */
27
+ width?: string;
28
+ /**
29
+ * Height of loading skeleton, defaults to height of the parent element
30
+ */
31
+ height?: string;
32
+ };
@@ -12,6 +12,8 @@ export declare const getFormattedMessageAsString: (intl: IntlShape, message: Mes
12
12
  * @deprecated remove on FF bandicoots-compiled-migration-smartcard clean up
13
13
  */
14
14
  export declare const getIconSizeStyles: (width: string) => SerializedStyles;
15
+ export declare const getIconWidthOld: (size?: SmartLinkSize) => string;
16
+ export declare const getIconWidthNew: (size?: SmartLinkSize) => string;
15
17
  export declare const getIconWidth: (size?: SmartLinkSize) => string;
16
18
  export declare const importIcon: (importFn: () => Promise<any>) => any;
17
19
  export declare const getLinkLineHeight: (size: SmartLinkSize) => string;
@@ -1,7 +1,3 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
1
  import { jsx } from '@emotion/react';
6
2
  import { type HoverCardLoadingViewProps } from './types';
7
3
  declare const HoverCardLoadingView: ({ titleBlockProps }: HoverCardLoadingViewProps) => jsx.JSX.Element;
@@ -1,7 +1,3 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- import AngleBracketsIcon from '@atlaskit/icon/core/angle-brackets';
3
- declare const AngleBracketsIconWithColor: {
4
- (props: ComponentPropsWithoutRef<typeof AngleBracketsIcon>): JSX.Element;
5
- displayName: string;
6
- };
1
+ /// <reference types="react" />
2
+ declare const AngleBracketsIconWithColor: import("react").FC<import("./types").AtlaskitIconTileProps>;
7
3
  export default AngleBracketsIconWithColor;
@@ -1,7 +1,3 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- import AudioIcon from '@atlaskit/icon/core/audio';
3
- declare const AudioIconWithColor: {
4
- (props: ComponentPropsWithoutRef<typeof AudioIcon>): JSX.Element;
5
- displayName: string;
6
- };
1
+ /// <reference types="react" />
2
+ declare const AudioIconWithColor: import("react").FC<import("./types").AtlaskitIconTileProps>;
7
3
  export default AudioIconWithColor;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare const BlogIconWithColor: import("react").FC<{
3
+ label: string;
4
+ testId?: string | undefined;
5
+ } & {
6
+ size?: import("../../..").SmartLinkSize | undefined;
7
+ }>;
8
+ export default BlogIconWithColor;
@@ -1,7 +1,3 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- import ChartBarIcon from '@atlaskit/icon/core/chart-bar';
3
- declare const ChartBarIconWithColor: {
4
- (props: ComponentPropsWithoutRef<typeof ChartBarIcon>): JSX.Element;
5
- displayName: string;
6
- };
1
+ /// <reference types="react" />
2
+ declare const ChartBarIconWithColor: import("react").FC<import("./types").AtlaskitIconTileProps>;
7
3
  export default ChartBarIconWithColor;
@@ -1,7 +1,3 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- import FileIcon from '@atlaskit/icon/core/file';
3
- declare const FileIconWithColor: {
4
- (props: ComponentPropsWithoutRef<typeof FileIcon>): JSX.Element;
5
- displayName: string;
6
- };
1
+ /// <reference types="react" />
2
+ declare const FileIconWithColor: import("react").FC<import("./types").AtlaskitIconTileProps>;
7
3
  export default FileIconWithColor;
@@ -1,7 +1,3 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- import FolderClosedIcon from '@atlaskit/icon/core/folder-closed';
3
- declare const FolderClosedIconWithColor: {
4
- (props: ComponentPropsWithoutRef<typeof FolderClosedIcon>): JSX.Element;
5
- displayName: string;
6
- };
1
+ /// <reference types="react" />
2
+ declare const FolderClosedIconWithColor: import("react").FC<import("./types").AtlaskitIconTileProps>;
7
3
  export default FolderClosedIconWithColor;
@@ -1,7 +1,3 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- import ImageIcon from '@atlaskit/icon/core/image';
3
- declare const ImageIconWithColor: {
4
- (props: ComponentPropsWithoutRef<typeof ImageIcon>): JSX.Element;
5
- displayName: string;
6
- };
1
+ /// <reference types="react" />
2
+ declare const ImageIconWithColor: import("react").FC<import("./types").AtlaskitIconTileProps>;
7
3
  export default ImageIconWithColor;
@@ -1,7 +1,3 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- import ListBulletedIcon from '@atlaskit/icon/core/list-bulleted';
3
- declare const ListBulletedIconWithColor: {
4
- (props: ComponentPropsWithoutRef<typeof ListBulletedIcon>): JSX.Element;
5
- displayName: string;
6
- };
1
+ /// <reference types="react" />
2
+ declare const ListBulletedIconWithColor: import("react").FC<import("./types").AtlaskitIconTileProps>;
7
3
  export default ListBulletedIconWithColor;
@@ -1,7 +1,3 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- import PageIcon from '@atlaskit/icon/core/page';
3
- declare const PageIconWithColor: {
4
- (props: ComponentPropsWithoutRef<typeof PageIcon>): JSX.Element;
5
- displayName: string;
6
- };
1
+ /// <reference types="react" />
2
+ declare const PageIconWithColor: import("react").FC<import("./types").AtlaskitIconTileProps>;
7
3
  export default PageIconWithColor;
@@ -0,0 +1,6 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ import { IconTile } from '@atlaskit/icon';
3
+ import { SmartLinkSize } from '../../../constants';
4
+ export type AtlaskitIconTileProps = Omit<ComponentPropsWithoutRef<typeof IconTile>, 'appearance' | 'icon' | 'size'> & {
5
+ size?: SmartLinkSize;
6
+ };
@@ -0,0 +1,15 @@
1
+ import React, { type ComponentPropsWithoutRef, type ComponentType } from 'react';
2
+ import { IconTile } from '@atlaskit/icon';
3
+ import { SmartLinkSize } from '../../../constants';
4
+ import type { AtlaskitIconTileProps } from './types';
5
+ export declare const transformSmartLinkSizeToIconTileSize: (size?: SmartLinkSize) => "24" | "16";
6
+ type IconProps = {
7
+ label: string;
8
+ testId?: string;
9
+ };
10
+ export declare const renderIconPerSize: (IconSmall: ComponentType<IconProps>, IconLarge: ComponentType<IconProps>) => React.FC<IconProps & {
11
+ size?: SmartLinkSize;
12
+ }>;
13
+ type IconTileProps = ComponentPropsWithoutRef<typeof IconTile>;
14
+ export declare const renderIconTile: (Icon: IconTileProps['icon'], appearance: IconTileProps['appearance'], LegacyIcon: ComponentType<Omit<AtlaskitIconTileProps, 'size'>>) => React.FC<AtlaskitIconTileProps>;
15
+ export {};
@@ -1,7 +1,3 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- import VideoIcon from '@atlaskit/icon/core/video';
3
- declare const VideoIconWithColor: {
4
- (props: ComponentPropsWithoutRef<typeof VideoIcon>): JSX.Element;
5
- displayName: string;
6
- };
1
+ /// <reference types="react" />
2
+ declare const VideoIconWithColor: import("react").FC<import("./types").AtlaskitIconTileProps>;
7
3
  export default VideoIconWithColor;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type ActiveThemeState } from '@atlaskit/tokens';
3
- import { IconType } from '../constants';
3
+ import { IconType, SmartLinkSize } from '../constants';
4
4
  export declare const isSpecialEvent: (evt: React.MouseEvent | React.KeyboardEvent) => boolean;
5
5
  export declare const isIframe: () => boolean;
6
6
  /**
@@ -18,7 +18,10 @@ export declare const isSpecialKey: (event: React.MouseEvent | React.KeyboardEven
18
18
  export declare const isSpecialClick: (event: React.MouseEvent) => boolean;
19
19
  export declare const getIconForFileType: (fileMimeType: string) => React.ReactNode | undefined;
20
20
  export declare const getLabelForFileType: (fileMimeType: string) => React.ReactNode | undefined;
21
- export declare const getLazyIcons: () => Partial<Record<IconType, () => Promise<unknown>>>;
21
+ export declare const getLazyIcons: () => Partial<Record<IconType, {
22
+ default: () => Promise<unknown>;
23
+ large?: () => Promise<unknown>;
24
+ }>>;
22
25
  export declare const getIframeSandboxAttribute: (isTrusted: boolean) => "allow-downloads allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts" | undefined;
23
26
  export declare const handleOnClick: (handler: Function) => (e: React.BaseSyntheticEvent) => void;
24
27
  export declare const isIntersectionObserverSupported: () => boolean;
@@ -32,3 +35,4 @@ export declare const openUrl: (url?: string) => Promise<void>;
32
35
  * @param themeState
33
36
  */
34
37
  export declare const getPreviewUrlWithTheme: (previewUrl: string, themeState: Partial<ActiveThemeState>) => string;
38
+ export declare const isIconSizeLarge: (size?: SmartLinkSize) => boolean | undefined;
@@ -1,10 +1,12 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @jsxRuntime classic
4
3
  * @jsx jsx
5
4
  */
5
+ import type { ComponentPropsWithoutRef } from 'react';
6
+ import Block from '../../block';
6
7
  import { type TitleBlockViewProps } from '../types';
7
8
  import TitleBlockResolvedViewOld from './TitleBlockResolvedViewOld';
9
+ export declare const BlockFeatureGated: ({ className, ...props }: ComponentPropsWithoutRef<typeof Block>) => JSX.Element;
8
10
  /**
9
11
  * This renders a fully resolved TitleBlock.
10
12
  * This should render when a Smart Link returns a valid response.
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { type AtlaskitIconProps } from './types';
3
- declare const AtlaskitIcon: ({ icon, label, testId }: AtlaskitIconProps) => JSX.Element | null;
3
+ declare const AtlaskitIcon: ({ icon, label, testId, size }: AtlaskitIconProps) => JSX.Element | null;
4
4
  export default AtlaskitIcon;
@@ -1,6 +1,7 @@
1
- import { type IconType } from '../../../../../constants';
1
+ import { type IconType, SmartLinkSize } from '../../../../../constants';
2
2
  export type AtlaskitIconProps = {
3
3
  icon: IconType;
4
4
  label?: string;
5
5
  testId?: string;
6
+ size?: SmartLinkSize;
6
7
  };
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { type ImageIconProps } from './types';
3
- declare const ImageIcon: ({ defaultIcon, testId, url, onError, onLoad }: ImageIconProps) => JSX.Element;
3
+ declare const ImageIcon: ({ defaultIcon, testId, url, width, height, onError, onLoad, }: ImageIconProps) => JSX.Element;
4
4
  export default ImageIcon;
@@ -3,6 +3,8 @@ export type ImageIconProps = {
3
3
  defaultIcon?: React.ReactNode;
4
4
  testId?: string;
5
5
  url: string;
6
+ width?: string;
7
+ height?: string;
6
8
  onError?: () => void;
7
9
  onLoad?: () => void;
8
10
  };
@@ -3,6 +3,6 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { jsx } from '@emotion/react';
6
- import { type LoadingSkeletonProps } from './types';
7
- declare const LoadingSkeletonOld: ({ testId, width, height }: LoadingSkeletonProps) => jsx.JSX.Element;
6
+ import { type LoadingSkeletonPropsOld } from './types';
7
+ declare const LoadingSkeletonOld: ({ testId, width, height }: LoadingSkeletonPropsOld) => jsx.JSX.Element;
8
8
  export default LoadingSkeletonOld;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { type LoadingSkeletonProps } from './types';
3
- declare const LoadingSkeleton: (props: LoadingSkeletonProps) => JSX.Element;
4
- export default LoadingSkeleton;
2
+ import type { LoadingSkeletonPropsNew, LoadingSkeletonPropsOld } from './types';
3
+ declare const LoadingSkeletonNew: ({ testId, width, height }: LoadingSkeletonPropsNew) => JSX.Element;
4
+ declare const LoadingSkeletonOld: (props: LoadingSkeletonPropsOld) => JSX.Element;
5
+ export { LoadingSkeletonOld, LoadingSkeletonNew };
@@ -1,4 +1,4 @@
1
- export type LoadingSkeletonProps = {
1
+ export type LoadingSkeletonPropsOld = {
2
2
  /**
3
3
  * A `testId` prop is provided for specified elements, which is a unique
4
4
  * string that appears as a data attribute `data-testid` in the rendered
@@ -14,3 +14,19 @@ export type LoadingSkeletonProps = {
14
14
  */
15
15
  height?: number;
16
16
  };
17
+ export type LoadingSkeletonPropsNew = {
18
+ /**
19
+ * A `testId` prop is provided for specified elements, which is a unique
20
+ * string that appears as a data attribute `data-testid` in the rendered
21
+ * code, serving as a hook for automated tests
22
+ */
23
+ testId?: string;
24
+ /**
25
+ * Width of the loading skeleton, defaults to width of the parent element
26
+ */
27
+ width?: string;
28
+ /**
29
+ * Height of loading skeleton, defaults to height of the parent element
30
+ */
31
+ height?: string;
32
+ };
@@ -12,6 +12,8 @@ export declare const getFormattedMessageAsString: (intl: IntlShape, message: Mes
12
12
  * @deprecated remove on FF bandicoots-compiled-migration-smartcard clean up
13
13
  */
14
14
  export declare const getIconSizeStyles: (width: string) => SerializedStyles;
15
+ export declare const getIconWidthOld: (size?: SmartLinkSize) => string;
16
+ export declare const getIconWidthNew: (size?: SmartLinkSize) => string;
15
17
  export declare const getIconWidth: (size?: SmartLinkSize) => string;
16
18
  export declare const importIcon: (importFn: () => Promise<any>) => any;
17
19
  export declare const getLinkLineHeight: (size: SmartLinkSize) => string;
@@ -1,7 +1,3 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
1
  import { jsx } from '@emotion/react';
6
2
  import { type HoverCardLoadingViewProps } from './types';
7
3
  declare const HoverCardLoadingView: ({ titleBlockProps }: HoverCardLoadingViewProps) => jsx.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "34.5.0",
3
+ "version": "34.5.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -102,7 +102,7 @@
102
102
  "@atlaskit/visual-regression": "*",
103
103
  "@atlassian/analytics-tooling": "*",
104
104
  "@atlassian/feature-flags-test-utils": "^0.2.0",
105
- "@atlassian/gemini": "1.15.2",
105
+ "@atlassian/gemini": "1.15.3",
106
106
  "@testing-library/dom": "^10.1.0",
107
107
  "@testing-library/jest-dom": "^6.4.5",
108
108
  "@testing-library/react": "^12.1.5",
@@ -174,6 +174,14 @@
174
174
  "platform-visual-refresh-icons": {
175
175
  "type": "boolean"
176
176
  },
177
+ "platform-visual-refresh-icons-legacy-facade": {
178
+ "type": "boolean",
179
+ "showOnWebsiteForTransitiveDependencies": true
180
+ },
181
+ "platform-component-visual-refresh": {
182
+ "type": "boolean",
183
+ "showOnWebsiteForTransitiveDependencies": true
184
+ },
177
185
  "linking_platform_show_lozenge_atlassian_state": {
178
186
  "type": "boolean"
179
187
  },
@@ -194,6 +202,10 @@
194
202
  },
195
203
  "platform-smart-card-icon-migration": {
196
204
  "type": "boolean"
205
+ },
206
+ "icon-object-migration": {
207
+ "type": "boolean",
208
+ "showOnWebsiteForTransitiveDependencies": true
197
209
  }
198
210
  }
199
211
  }