@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.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/common/ui/icons/angle-brackets-icon.js +2 -11
- package/dist/cjs/common/ui/icons/audio-icon.js +2 -11
- package/dist/cjs/common/ui/icons/blog-icon.js +13 -0
- package/dist/cjs/common/ui/icons/chart-bar-icon.js +2 -11
- package/dist/cjs/common/ui/icons/file-icon.js +2 -11
- package/dist/cjs/common/ui/icons/folder-icon.js +2 -11
- package/dist/cjs/common/ui/icons/image-icon.js +2 -11
- package/dist/cjs/common/ui/icons/list-bullet-icon.js +2 -11
- package/dist/cjs/common/ui/icons/page-icon.js +2 -12
- package/dist/cjs/common/ui/icons/types.js +5 -0
- package/dist/cjs/common/ui/icons/utils.js +47 -0
- package/dist/cjs/common/ui/icons/video-icon.js +2 -11
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/index.js +395 -180
- package/dist/cjs/view/BlockCard/views/ErroredView.js +12 -2
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +12 -1
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +12 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.compiled.css +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +16 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +2 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +38 -20
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +2 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -2
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +43 -17
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +28 -8
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.compiled.css +0 -2
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +13 -12
- package/dist/cjs/view/FlexibleCard/components/container/index.compiled.css +5 -2
- package/dist/cjs/view/FlexibleCard/components/container/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +35 -8
- package/dist/cjs/view/FlexibleCard/components/utils.js +23 -2
- package/dist/cjs/view/HoverCard/components/views/resolving/index.js +29 -14
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/common/ui/icons/angle-brackets-icon.js +2 -11
- package/dist/es2019/common/ui/icons/audio-icon.js +2 -11
- package/dist/es2019/common/ui/icons/blog-icon.js +6 -0
- package/dist/es2019/common/ui/icons/chart-bar-icon.js +2 -11
- package/dist/es2019/common/ui/icons/file-icon.js +2 -11
- package/dist/es2019/common/ui/icons/folder-icon.js +2 -11
- package/dist/es2019/common/ui/icons/image-icon.js +2 -11
- package/dist/es2019/common/ui/icons/list-bullet-icon.js +2 -11
- package/dist/es2019/common/ui/icons/page-icon.js +2 -12
- package/dist/es2019/common/ui/icons/types.js +1 -0
- package/dist/es2019/common/ui/icons/utils.js +39 -0
- package/dist/es2019/common/ui/icons/video-icon.js +2 -11
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/index.js +166 -53
- package/dist/es2019/view/BlockCard/views/ErroredView.js +12 -2
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +13 -2
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +13 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.compiled.css +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +8 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +2 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +24 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +2 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -2
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +46 -21
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +28 -8
- package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.compiled.css +0 -2
- package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +14 -12
- package/dist/es2019/view/FlexibleCard/components/container/index.compiled.css +5 -2
- package/dist/es2019/view/FlexibleCard/components/container/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +35 -10
- package/dist/es2019/view/FlexibleCard/components/utils.js +22 -1
- package/dist/es2019/view/HoverCard/components/views/resolving/index.js +21 -6
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/common/ui/icons/angle-brackets-icon.js +2 -11
- package/dist/esm/common/ui/icons/audio-icon.js +2 -11
- package/dist/esm/common/ui/icons/blog-icon.js +6 -0
- package/dist/esm/common/ui/icons/chart-bar-icon.js +2 -11
- package/dist/esm/common/ui/icons/file-icon.js +2 -11
- package/dist/esm/common/ui/icons/folder-icon.js +2 -11
- package/dist/esm/common/ui/icons/image-icon.js +2 -11
- package/dist/esm/common/ui/icons/list-bullet-icon.js +2 -11
- package/dist/esm/common/ui/icons/page-icon.js +2 -12
- package/dist/esm/common/ui/icons/types.js +1 -0
- package/dist/esm/common/ui/icons/utils.js +40 -0
- package/dist/esm/common/ui/icons/video-icon.js +2 -11
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/index.js +261 -96
- package/dist/esm/view/BlockCard/views/ErroredView.js +12 -2
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +13 -2
- package/dist/esm/view/BlockCard/views/NotFoundView.js +13 -2
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.compiled.css +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +8 -3
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +2 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +37 -19
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +2 -2
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +2 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -2
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +47 -21
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +28 -8
- package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.compiled.css +0 -2
- package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +13 -11
- package/dist/esm/view/FlexibleCard/components/container/index.compiled.css +5 -2
- package/dist/esm/view/FlexibleCard/components/container/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +35 -8
- package/dist/esm/view/FlexibleCard/components/utils.js +22 -1
- package/dist/esm/view/HoverCard/components/views/resolving/index.js +21 -6
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/common/ui/icons/angle-brackets-icon.d.ts +2 -6
- package/dist/types/common/ui/icons/audio-icon.d.ts +2 -6
- package/dist/types/common/ui/icons/blog-icon.d.ts +8 -0
- package/dist/types/common/ui/icons/chart-bar-icon.d.ts +2 -6
- package/dist/types/common/ui/icons/file-icon.d.ts +2 -6
- package/dist/types/common/ui/icons/folder-icon.d.ts +2 -6
- package/dist/types/common/ui/icons/image-icon.d.ts +2 -6
- package/dist/types/common/ui/icons/list-bullet-icon.d.ts +2 -6
- package/dist/types/common/ui/icons/page-icon.d.ts +2 -6
- package/dist/types/common/ui/icons/types.d.ts +6 -0
- package/dist/types/common/ui/icons/utils.d.ts +15 -0
- package/dist/types/common/ui/icons/video-icon.d.ts +2 -6
- package/dist/types/utils/index.d.ts +6 -2
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +3 -1
- package/dist/types/view/FlexibleCard/components/common/atlaskit-icon/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/common/atlaskit-icon/types.d.ts +2 -1
- package/dist/types/view/FlexibleCard/components/common/image-icon/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/common/image-icon/types.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/common/loading-skeleton/LoadingSkeletonOld.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/common/loading-skeleton/index.d.ts +4 -3
- package/dist/types/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +17 -1
- package/dist/types/view/FlexibleCard/components/utils.d.ts +2 -0
- package/dist/types/view/HoverCard/components/views/resolving/index.d.ts +0 -4
- package/dist/types-ts4.5/common/ui/icons/angle-brackets-icon.d.ts +2 -6
- package/dist/types-ts4.5/common/ui/icons/audio-icon.d.ts +2 -6
- package/dist/types-ts4.5/common/ui/icons/blog-icon.d.ts +8 -0
- package/dist/types-ts4.5/common/ui/icons/chart-bar-icon.d.ts +2 -6
- package/dist/types-ts4.5/common/ui/icons/file-icon.d.ts +2 -6
- package/dist/types-ts4.5/common/ui/icons/folder-icon.d.ts +2 -6
- package/dist/types-ts4.5/common/ui/icons/image-icon.d.ts +2 -6
- package/dist/types-ts4.5/common/ui/icons/list-bullet-icon.d.ts +2 -6
- package/dist/types-ts4.5/common/ui/icons/page-icon.d.ts +2 -6
- package/dist/types-ts4.5/common/ui/icons/types.d.ts +6 -0
- package/dist/types-ts4.5/common/ui/icons/utils.d.ts +15 -0
- package/dist/types-ts4.5/common/ui/icons/video-icon.d.ts +2 -6
- package/dist/types-ts4.5/utils/index.d.ts +6 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +3 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/common/atlaskit-icon/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/common/atlaskit-icon/types.d.ts +2 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/common/image-icon/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/common/image-icon/types.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/common/loading-skeleton/LoadingSkeletonOld.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/common/loading-skeleton/index.d.ts +4 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +17 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +2 -0
- package/dist/types-ts4.5/view/HoverCard/components/views/resolving/index.d.ts +0 -4
- 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
|
-
|
|
2
|
-
|
|
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,
|
|
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
|
-
|
|
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,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;
|
package/dist/types/view/FlexibleCard/components/common/loading-skeleton/LoadingSkeletonOld.d.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
|
-
import { type
|
|
7
|
-
declare const LoadingSkeletonOld: ({ testId, width, height }:
|
|
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 {
|
|
3
|
-
declare const
|
|
4
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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,
|
|
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;
|
package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts
CHANGED
|
@@ -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,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,6 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
|
-
import { type
|
|
7
|
-
declare const LoadingSkeletonOld: ({ testId, width, height }:
|
|
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 {
|
|
3
|
-
declare const
|
|
4
|
-
|
|
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
|
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "34.5.
|
|
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.
|
|
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
|
}
|