@atlaskit/smart-card 18.0.12 → 18.0.15
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 +25 -0
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +9 -0
- package/dist/cjs/state/flexible-ui-context/index.js +4 -0
- package/dist/cjs/utils/analytics/analytics.js +52 -2
- package/dist/cjs/utils/analytics/index.js +18 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +4 -2
- package/dist/cjs/view/CardWithUrl/loader.js +4 -2
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +26 -4
- package/dist/cjs/view/FlexibleCard/components/actions/index.js +18 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +6 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +6 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +39 -19
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +92 -17
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +45 -9
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -12
- package/dist/cjs/view/FlexibleCard/components/container/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +12 -1
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +18 -3
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +9 -1
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +9 -1
- package/dist/cjs/view/FlexibleCard/components/elements/index.js +96 -0
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +9 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +11 -3
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +12 -6
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +7 -3
- package/dist/cjs/view/FlexibleCard/index.js +6 -0
- package/dist/cjs/view/HoverCard/index.js +48 -10
- package/dist/cjs/view/HoverCard/styled.js +3 -1
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +7 -2
- package/dist/es2019/state/flexible-ui-context/index.js +5 -0
- package/dist/es2019/utils/analytics/analytics.js +35 -0
- package/dist/es2019/utils/analytics/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +4 -2
- package/dist/es2019/view/CardWithUrl/loader.js +4 -2
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +37 -4
- package/dist/es2019/view/FlexibleCard/components/actions/index.js +18 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +6 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +9 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +8 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +6 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +31 -15
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +77 -15
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +35 -8
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +20 -11
- package/dist/es2019/view/FlexibleCard/components/container/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +12 -1
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +18 -3
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +9 -1
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +9 -1
- package/dist/es2019/view/FlexibleCard/components/elements/index.js +96 -0
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +9 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +11 -3
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +8 -1
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +11 -4
- package/dist/es2019/view/FlexibleCard/components/elements/utils.js +5 -2
- package/dist/es2019/view/FlexibleCard/index.js +6 -0
- package/dist/es2019/view/HoverCard/index.js +40 -10
- package/dist/es2019/view/HoverCard/styled.js +6 -1
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +10 -1
- package/dist/esm/state/flexible-ui-context/index.js +5 -0
- package/dist/esm/utils/analytics/analytics.js +41 -0
- package/dist/esm/utils/analytics/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/CardWithUrl/component.js +4 -2
- package/dist/esm/view/CardWithUrl/loader.js +4 -2
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +25 -4
- package/dist/esm/view/FlexibleCard/components/actions/index.js +18 -2
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +6 -0
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +9 -2
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +8 -2
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +6 -0
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -2
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +33 -16
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +79 -17
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +39 -8
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +22 -11
- package/dist/esm/view/FlexibleCard/components/container/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +12 -1
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +18 -3
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +9 -1
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +9 -1
- package/dist/esm/view/FlexibleCard/components/elements/index.js +96 -0
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +9 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +11 -3
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +9 -2
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +12 -6
- package/dist/esm/view/FlexibleCard/components/elements/utils.js +5 -3
- package/dist/esm/view/FlexibleCard/index.js +6 -0
- package/dist/esm/view/HoverCard/index.js +42 -10
- package/dist/esm/view/HoverCard/styled.js +2 -1
- package/dist/types/client/errors.d.ts +3 -2
- package/dist/types/extractors/block/index.d.ts +2 -2
- package/dist/types/extractors/common/__mocks__/jsonld.d.ts +46 -66
- package/dist/types/extractors/common/actions/extractPreviewAction.d.ts +1 -1
- package/dist/types/extractors/common/title-prefix/extractTitlePrefix.d.ts +2 -1
- package/dist/types/extractors/embed/index.d.ts +1 -1
- package/dist/types/extractors/flexible/icon/extract-url-icon.d.ts +1 -1
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +4 -0
- package/dist/types/state/flexible-ui-context/index.d.ts +4 -0
- package/dist/types/state/flexible-ui-context/types.d.ts +102 -0
- package/dist/types/state/hooks/useSmartLink.d.ts +3 -0
- package/dist/types/utils/analytics/analytics.d.ts +5 -1
- package/dist/types/utils/analytics/index.d.ts +1 -1
- package/dist/types/utils/types.d.ts +2 -2
- package/dist/types/view/BlockCard/utils/handlers.d.ts +1 -1
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +1 -0
- package/dist/types/view/CardWithUrl/component.d.ts +1 -1
- package/dist/types/view/CardWithUrl/types.d.ts +1 -0
- package/dist/types/view/EmbedCard/components/styled.d.ts +9 -9
- package/dist/types/view/FlexibleCard/components/actions/action/index.d.ts +8 -0
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +4 -2
- package/dist/types/view/FlexibleCard/components/actions/index.d.ts +15 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-group/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-group/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/block/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/element-group/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/element-group/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/footer-block/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/metadata-block/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +9 -2
- package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +11 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +7 -3
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolving/index.d.ts +8 -2
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +10 -1
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +7 -5
- package/dist/types/view/FlexibleCard/components/blocks/utils.d.ts +2 -1
- package/dist/types/view/FlexibleCard/components/container/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/container/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/avatar-group/index.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/elements/badge/index.d.ts +13 -0
- package/dist/types/view/FlexibleCard/components/elements/date-time/index.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/elements/icon/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/icon/types.d.ts +5 -1
- package/dist/types/view/FlexibleCard/components/elements/index.d.ts +77 -0
- package/dist/types/view/FlexibleCard/components/elements/link/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/lozenge/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/media/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/text/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/text/types.d.ts +1 -2
- package/dist/types/view/FlexibleCard/components/elements/types.d.ts +2 -0
- package/dist/types/view/FlexibleCard/index.d.ts +6 -0
- package/dist/types/view/HoverCard/index.d.ts +3 -2
- package/dist/types/view/HoverCard/types.d.ts +5 -2
- package/dist/types/view/InlineCard/Icon.d.ts +3 -3
- package/dist/types/view/InlineCard/IconAndTitleLayout/styled.d.ts +9 -9
- package/dist/types/view/InlineCard/ResolvingView/styled.d.ts +3 -3
- package/dist/types/view/InlineCard/styled.d.ts +4 -4
- package/package.json +8 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/utils.js +0 -105
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/utils.js +0 -71
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/utils.js +0 -76
- package/dist/types/view/FlexibleCard/components/blocks/title-block/utils.d.ts +0 -11
|
@@ -13,7 +13,7 @@ export interface WrapperProps {
|
|
|
13
13
|
export declare const LinkWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, WrapperProps, any>;
|
|
14
14
|
export declare const Wrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, WrapperProps, any>;
|
|
15
15
|
export declare const embedHeaderHeight = 32;
|
|
16
|
-
export declare const Header: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
16
|
+
export declare const Header: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("@emotion/styled-base/types/helper").Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").ClassAttributes<any>>, any>;
|
|
17
17
|
export interface PlaceholderProps {
|
|
18
18
|
isPlaceholder: boolean;
|
|
19
19
|
}
|
|
@@ -28,15 +28,15 @@ export interface ImageProps {
|
|
|
28
28
|
}
|
|
29
29
|
export declare const Image: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, ImageProps, any>;
|
|
30
30
|
export declare const maxAvatarCount = 6;
|
|
31
|
-
export declare const ContentWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
32
|
-
export declare const Title: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
33
|
-
export declare const Byline: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
34
|
-
export declare const Description: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
35
|
-
export declare const ResolvedViewIconWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
31
|
+
export declare const ContentWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("@emotion/styled-base/types/helper").Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").ClassAttributes<any>>, any>;
|
|
32
|
+
export declare const Title: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("@emotion/styled-base/types/helper").Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").ClassAttributes<any>>, any>;
|
|
33
|
+
export declare const Byline: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("@emotion/styled-base/types/helper").Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").ClassAttributes<any>>, any>;
|
|
34
|
+
export declare const Description: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("@emotion/styled-base/types/helper").Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").ClassAttributes<any>>, any>;
|
|
35
|
+
export declare const ResolvedViewIconWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("@emotion/styled-base/types/helper").Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").ClassAttributes<any>>, any>;
|
|
36
36
|
export interface ThumbnailProps {
|
|
37
37
|
src: string;
|
|
38
38
|
}
|
|
39
39
|
export declare const Thumbnail: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ThumbnailProps, any>;
|
|
40
|
-
export declare const UsersWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
41
|
-
export declare const ActionsWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
42
|
-
export declare const AlertWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
40
|
+
export declare const UsersWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("@emotion/styled-base/types/helper").Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").ClassAttributes<any>>, any>;
|
|
41
|
+
export declare const ActionsWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("@emotion/styled-base/types/helper").Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").ClassAttributes<any>>, any>;
|
|
42
|
+
export declare const AlertWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("@emotion/styled-base/types/helper").Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").ClassAttributes<any>>, any>;
|
|
@@ -4,5 +4,13 @@ import { Spacing } from '@atlaskit/button';
|
|
|
4
4
|
import { SmartLinkSize } from '../../../../../constants';
|
|
5
5
|
import { ActionProps } from './types';
|
|
6
6
|
export declare const sizeToSpacing: Record<SmartLinkSize, Spacing>;
|
|
7
|
+
/**
|
|
8
|
+
* An action that can be triggered with an on click.
|
|
9
|
+
* @public
|
|
10
|
+
* @param {ActionProps} ActionProps - The props necessary for the Action.
|
|
11
|
+
* @see DeleteAction
|
|
12
|
+
* @see EditAction
|
|
13
|
+
* @see CustomAction
|
|
14
|
+
*/
|
|
7
15
|
declare const Action: React.FC<ActionProps>;
|
|
8
16
|
export default Action;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { SerializedStyles } from '@emotion/core';
|
|
1
2
|
import { SmartLinkSize } from '../../../../../constants';
|
|
2
3
|
import { Appearance } from '@atlaskit/button/types';
|
|
3
4
|
import { ReactChild } from 'react';
|
|
4
5
|
export declare type ActionProps = {
|
|
5
6
|
size?: SmartLinkSize;
|
|
6
|
-
testId?: string;
|
|
7
7
|
content?: React.ReactNode;
|
|
8
8
|
appearance?: Appearance;
|
|
9
9
|
onClick: () => any;
|
|
@@ -11,9 +11,11 @@ export declare type ActionProps = {
|
|
|
11
11
|
iconPosition?: 'before' | 'after';
|
|
12
12
|
tooltipMessage?: React.ReactNode;
|
|
13
13
|
asDropDownItem?: boolean;
|
|
14
|
+
overrideCss?: SerializedStyles;
|
|
15
|
+
testId?: string;
|
|
14
16
|
};
|
|
15
17
|
export declare type ActionIconProps = {
|
|
16
18
|
size?: SmartLinkSize;
|
|
17
|
-
testId?: string;
|
|
18
19
|
icon?: ReactChild;
|
|
20
|
+
testId?: string;
|
|
19
21
|
};
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ActionProps } from './action/types';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a DeleteAction component. Accepts default ActionProps, but defaults
|
|
5
|
+
* the icon to a cross icon.
|
|
6
|
+
* @see Action
|
|
7
|
+
*/
|
|
3
8
|
export declare const DeleteAction: import("react").FC<ActionProps>;
|
|
9
|
+
/**
|
|
10
|
+
* Creates a EditAction component. Accepts default ActionProps, but defaults
|
|
11
|
+
* the icon to an edit (pencil) icon.
|
|
12
|
+
* @see Action
|
|
13
|
+
*/
|
|
4
14
|
export declare const EditAction: import("react").FC<ActionProps>;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a CustomAction component. Accepts default ActionProps. Required to provide
|
|
17
|
+
* your own icon or text.
|
|
18
|
+
* @see Action
|
|
19
|
+
*/
|
|
5
20
|
export declare const CustomAction: import("react").FC<ActionProps>;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ActionGroupProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a group of Action components. Accepts an array of Actions, in addition to some styling
|
|
5
|
+
* preferences.
|
|
6
|
+
* @param {ActionGroupProps} ActionGroupProps
|
|
7
|
+
* @see Action
|
|
8
|
+
*/
|
|
3
9
|
declare const ActionGroup: React.FC<ActionGroupProps>;
|
|
4
10
|
export default ActionGroup;
|
|
@@ -5,8 +5,8 @@ export declare type ActionGroupProps = {
|
|
|
5
5
|
items: ActionItem[];
|
|
6
6
|
size?: SmartLinkSize;
|
|
7
7
|
direction?: SmartLinkDirection;
|
|
8
|
-
testId?: string;
|
|
9
8
|
appearance?: Appearance;
|
|
10
9
|
visibleButtonsNum?: number;
|
|
11
10
|
onDropdownOpenChange?: (isOpen: boolean) => void;
|
|
11
|
+
testId?: string;
|
|
12
12
|
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { BlockProps } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* A block represents a collection of elements and actions that are arranged in a row.
|
|
6
|
+
* All elements and actions should be contained within a Block.
|
|
7
|
+
* @param {ActionGroupProps} ActionGroupProps
|
|
8
|
+
* @see Action
|
|
9
|
+
*/
|
|
4
10
|
declare const Block: React.FC<BlockProps>;
|
|
5
11
|
export default Block;
|
|
@@ -4,5 +4,11 @@ import { SerializedStyles } from '@emotion/core';
|
|
|
4
4
|
import { ElementGroupProps } from './types';
|
|
5
5
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkWidth } from '../../../../../constants';
|
|
6
6
|
export declare const getElementGroupStyles: (direction: SmartLinkDirection, size: SmartLinkSize, align: SmartLinkAlignment, width: SmartLinkWidth) => SerializedStyles;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a group of Action components. Accepts an array of Actions, in addition to some styling
|
|
9
|
+
* preferences.
|
|
10
|
+
* @param {ActionGroupProps} ActionGroupProps
|
|
11
|
+
* @see Action
|
|
12
|
+
*/
|
|
7
13
|
declare const ElementGroup: React.FC<ElementGroupProps>;
|
|
8
14
|
export default ElementGroup;
|
|
@@ -2,9 +2,9 @@ import { Interpolation } from '@emotion/core';
|
|
|
2
2
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkWidth } from '../../../../../constants';
|
|
3
3
|
export declare type ElementGroupProps = {
|
|
4
4
|
align?: SmartLinkAlignment;
|
|
5
|
-
css?: Interpolation;
|
|
6
5
|
direction?: SmartLinkDirection;
|
|
6
|
+
overrideCss?: Interpolation;
|
|
7
7
|
size?: SmartLinkSize;
|
|
8
|
-
testId?: string;
|
|
9
8
|
width?: SmartLinkWidth;
|
|
9
|
+
testId?: string;
|
|
10
10
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FooterBlockProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a FooterBlock, designed to contain elements and actions that should appear
|
|
5
|
+
* at the bottom of a link card.
|
|
6
|
+
* @param {FooterBlockProps} FooterBlockProps
|
|
7
|
+
* @see Block
|
|
8
|
+
*/
|
|
3
9
|
declare const FooterBlock: React.FC<FooterBlockProps>;
|
|
4
10
|
export default FooterBlock;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MetadataBlockProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a MetadataBlock, designed to contain groups of metadata in the form of elements.
|
|
5
|
+
* Accepts an array of elements to be shown either primary (left hand side) or secondary (right hand side).
|
|
6
|
+
* @param {MetadataBlockProps} MetadataBlockProps
|
|
7
|
+
* @see Block
|
|
8
|
+
*/
|
|
3
9
|
declare const MetadataBlock: React.FC<MetadataBlockProps>;
|
|
4
10
|
export default MetadataBlock;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PreviewBlockProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a PreviewBlock, which typically contains media or other large format content.
|
|
5
|
+
* @param {PreviewBlock} PreviewBlock
|
|
6
|
+
* @see Block
|
|
7
|
+
*/
|
|
3
8
|
declare const PreviewBlock: React.FC<PreviewBlockProps>;
|
|
4
9
|
export default PreviewBlock;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SnippetBlockProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a SnippetBlock, which is used to display longer form text content, like descriptions.
|
|
5
|
+
* @param {SnippetBlock} SnippetBlock
|
|
6
|
+
* @see Block
|
|
7
|
+
*/
|
|
3
8
|
declare const SnippetBlock: React.FC<SnippetBlockProps>;
|
|
4
9
|
export default SnippetBlock;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { TitleBlockViewProps } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Represents an Errored TitleBlock view.
|
|
6
|
+
* This will render when a Smart Link did not successfully resolve.
|
|
7
|
+
* This may be a result of a Smart Link not having the correct credentials,
|
|
8
|
+
* or the backend response was errored or malformed.
|
|
9
|
+
* @see TitleBlock
|
|
10
|
+
*/
|
|
11
|
+
declare const TitleBlockErroredView: React.FC<TitleBlockViewProps>;
|
|
5
12
|
export default TitleBlockErroredView;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TitleBlockProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a TitleBlock, which is the foundation of all Flexible Smart Links.
|
|
5
|
+
* This contains an icon, the link, and any associated metadata and actions in one block.
|
|
6
|
+
* The TitleBlock will also render differently given the state of the smart link.
|
|
7
|
+
* This can be found in the corresponding Resolving, Resolved and Errored views.
|
|
8
|
+
* @param {TitleBlockProps} TitleBlockProps
|
|
9
|
+
* @see Block
|
|
10
|
+
* @see TitleBlockResolvingView
|
|
11
|
+
* @see TitleBlockResolvedView
|
|
12
|
+
* @see TitleBlockErroredView
|
|
13
|
+
*/
|
|
3
14
|
declare const TitleBlock: React.FC<TitleBlockProps>;
|
|
4
15
|
export default TitleBlock;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { TitleBlockViewProps } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* This renders a fully resolved TitleBlock.
|
|
5
|
+
* This should render when a Smart Link returns a valid response.
|
|
6
|
+
* @see TitleBlock
|
|
7
|
+
*/
|
|
8
|
+
declare const TitleBlockResolvedView: React.FC<TitleBlockViewProps>;
|
|
5
9
|
export default TitleBlockResolvedView;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { TitleBlockViewProps } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* This represents a TitleBlock for a Smart Link that is currently waiting
|
|
6
|
+
* for a request to finish.
|
|
7
|
+
* This should render when a Smart Link has sent a request.
|
|
8
|
+
* @see TitleBlock
|
|
9
|
+
*/
|
|
10
|
+
declare const TitleBlockResolvingView: React.FC<TitleBlockViewProps>;
|
|
5
11
|
export default TitleBlockResolvingView;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { BlockProps, ElementItem, ActionItem } from '../types';
|
|
3
3
|
import { SmartLinkPosition, SmartLinkTheme } from '../../../../../constants';
|
|
4
4
|
import { RetryOptions } from '../../../types';
|
|
@@ -6,6 +6,11 @@ import { LinkProps } from '../../elements/link/types';
|
|
|
6
6
|
export declare type TitleBlockProps = BlockProps & {
|
|
7
7
|
maxLines?: number;
|
|
8
8
|
metadata?: ElementItem[];
|
|
9
|
+
/** Determines the position of the icon in the TitleBlock.
|
|
10
|
+
* Top: Icon will be rendered in the "top" left of the TitleBlock
|
|
11
|
+
* Center: Icon will be rendered "center" relative to the vertical height of the TitleBlock.
|
|
12
|
+
* If direction is Horizontal, icon will be rendered in the center relative to the horizontal width of the TitleBlock.
|
|
13
|
+
*/
|
|
9
14
|
position?: SmartLinkPosition;
|
|
10
15
|
retry?: RetryOptions;
|
|
11
16
|
subtitle?: ElementItem[];
|
|
@@ -16,3 +21,7 @@ export declare type TitleBlockProps = BlockProps & {
|
|
|
16
21
|
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
17
22
|
anchorTarget?: LinkProps['target'];
|
|
18
23
|
};
|
|
24
|
+
export declare type TitleBlockViewProps = TitleBlockProps & {
|
|
25
|
+
actionGroup?: React.ReactNode;
|
|
26
|
+
title: React.ReactNode;
|
|
27
|
+
};
|
|
@@ -3,10 +3,10 @@ import { SerializedStyles } from '@emotion/core';
|
|
|
3
3
|
import { ActionProps } from '../actions/action/types';
|
|
4
4
|
export declare type BlockProps = {
|
|
5
5
|
direction?: SmartLinkDirection;
|
|
6
|
+
overrideCss?: SerializedStyles;
|
|
6
7
|
size?: SmartLinkSize;
|
|
7
8
|
status?: SmartLinkStatus;
|
|
8
9
|
testId?: string;
|
|
9
|
-
extraCss?: SerializedStyles;
|
|
10
10
|
};
|
|
11
11
|
export declare type ElementItem = {
|
|
12
12
|
name: ElementName;
|
|
@@ -14,20 +14,22 @@ export declare type ElementItem = {
|
|
|
14
14
|
testId?: string;
|
|
15
15
|
};
|
|
16
16
|
export declare type BaseActionItem = {
|
|
17
|
-
testId?: string;
|
|
18
17
|
hideContent?: boolean;
|
|
19
18
|
hideIcon?: boolean;
|
|
20
19
|
onClick: () => any;
|
|
20
|
+
overrideCss?: SerializedStyles;
|
|
21
|
+
size?: SmartLinkSize;
|
|
22
|
+
testId?: string;
|
|
21
23
|
};
|
|
22
24
|
/**
|
|
23
|
-
*
|
|
25
|
+
* This represents an action where Icon and Content are provided implicitly.
|
|
26
|
+
* @example DeleteAction - by default will contain a cross icon with the 'delete' content if content and icon are not provided.
|
|
24
27
|
*/
|
|
25
28
|
export declare type NamedActionItem = BaseActionItem & {
|
|
26
29
|
name: Exclude<ActionName, ActionName.CustomAction>;
|
|
27
30
|
};
|
|
28
31
|
/**
|
|
29
|
-
*
|
|
30
|
-
* either `icon` and `iconPosition` OR `content` OR both BUT not neither of those things.
|
|
32
|
+
* This represents an action where either Icon or label must be provided.
|
|
31
33
|
*/
|
|
32
34
|
export declare type CustomActionItem = BaseActionItem & {
|
|
33
35
|
name: ActionName.CustomAction;
|
|
@@ -2,10 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import { SerializedStyles } from '@emotion/core';
|
|
3
3
|
import { ActionItem, ElementItem } from './types';
|
|
4
4
|
import { ElementName, SmartLinkDirection, SmartLinkSize } from '../../../../constants';
|
|
5
|
+
import { Appearance } from '@atlaskit/button';
|
|
5
6
|
export declare type ElementDisplaySchemaType = 'inline' | 'block';
|
|
6
7
|
export declare const ElementDisplaySchema: Record<ElementName, ElementDisplaySchemaType[]>;
|
|
7
8
|
export declare const getGapSize: (size: SmartLinkSize) => number;
|
|
8
9
|
export declare const getBaseStyles: (direction: SmartLinkDirection, size: SmartLinkSize) => SerializedStyles;
|
|
9
10
|
export declare const renderChildren: (children: React.ReactNode, size: SmartLinkSize) => React.ReactNode;
|
|
10
11
|
export declare const renderElementItems: (items?: ElementItem[], display?: ElementDisplaySchemaType) => React.ReactNode | undefined;
|
|
11
|
-
export declare const renderActionItems: (items?: ActionItem[], size?: SmartLinkSize, appearance?:
|
|
12
|
+
export declare const renderActionItems: (items?: ActionItem[], size?: SmartLinkSize, appearance?: Appearance | undefined, asDropDownItems?: boolean | undefined) => React.ReactNode | undefined;
|
|
@@ -4,5 +4,9 @@ import { SerializedStyles } from '@emotion/core';
|
|
|
4
4
|
import { SmartLinkSize } from '../../../../constants';
|
|
5
5
|
import { ContainerProps } from './types';
|
|
6
6
|
export declare const getContainerStyles: (size: SmartLinkSize, hideBackground: boolean, hideElevation: boolean, hidePadding: boolean) => SerializedStyles;
|
|
7
|
+
/**
|
|
8
|
+
* This represents the container in which all Flexible UI Smart Links are rendered.
|
|
9
|
+
* @see Block
|
|
10
|
+
*/
|
|
7
11
|
declare const Container: React.FC<ContainerProps>;
|
|
8
12
|
export default Container;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { SmartLinkSize, SmartLinkStatus, SmartLinkTheme } from '../../../../constants';
|
|
3
3
|
import { RetryOptions } from '../../types';
|
|
4
4
|
export declare type ContainerProps = {
|
|
5
|
-
hideBackground?: boolean;
|
|
6
5
|
hideElevation?: boolean;
|
|
7
6
|
hidePadding?: boolean;
|
|
7
|
+
hideBackground?: boolean;
|
|
8
8
|
retry?: RetryOptions;
|
|
9
9
|
size?: SmartLinkSize;
|
|
10
10
|
status?: SmartLinkStatus;
|
|
11
|
-
testId?: string;
|
|
12
11
|
theme?: SmartLinkTheme;
|
|
13
12
|
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
13
|
+
testId?: string;
|
|
14
14
|
};
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { AvatarGroupProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* An element that displays a group of avatars.
|
|
6
|
+
* @public
|
|
7
|
+
* @param {AvatarGroupProps} AvatarGroupProps - The props necessary for the AvatarGroup.
|
|
8
|
+
* @see AuthorGroup
|
|
9
|
+
* @see CollaboratorGroup
|
|
10
|
+
*/
|
|
4
11
|
declare const AvatarGroup: React.FC<AvatarGroupProps>;
|
|
5
12
|
export default AvatarGroup;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { BadgeProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* An element that displays some text with an associated icon.
|
|
6
|
+
* @public
|
|
7
|
+
* @param {BadgeProps} BadgeProps - The props necessary for the Badge.
|
|
8
|
+
* @see CommentCount
|
|
9
|
+
* @see ViewCount
|
|
10
|
+
* @see ReactCount
|
|
11
|
+
* @see VoteCount
|
|
12
|
+
* @see SubscriberCount
|
|
13
|
+
* @see Priority
|
|
14
|
+
* @see ProgrammingLanguage
|
|
15
|
+
* @see Provider
|
|
16
|
+
*/
|
|
4
17
|
declare const Badge: React.FC<BadgeProps>;
|
|
5
18
|
export default Badge;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { DateTimeProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* An element that displays an ISO Timestamp in text.
|
|
6
|
+
* @public
|
|
7
|
+
* @param {DateTimeProps} DateTimeProps - The props necessary for the DateTime element.
|
|
8
|
+
* @see CreatedOn
|
|
9
|
+
* @see ModifiedOn
|
|
10
|
+
*/
|
|
4
11
|
declare const DateTime: React.FC<DateTimeProps>;
|
|
5
12
|
export default DateTime;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { IconProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* An element that displays an Icon or favicon.
|
|
6
|
+
* @public
|
|
7
|
+
* @param {IconProps} IconProps - The props necessary for the Icon element.
|
|
8
|
+
* @see LinkIcon
|
|
9
|
+
*/
|
|
4
10
|
declare const Icon: React.FC<IconProps>;
|
|
5
11
|
export default Icon;
|
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
import { ElementProps } from '../types';
|
|
3
3
|
import { IconType, SmartLinkPosition } from '../../../../../constants';
|
|
4
4
|
export declare type IconProps = ElementProps & {
|
|
5
|
+
render?: () => React.ReactNode;
|
|
5
6
|
icon?: IconType;
|
|
6
7
|
label?: string;
|
|
8
|
+
/** Determines how the icon should be rendered.
|
|
9
|
+
* Top: Icon will be rendered at the "top" of the smart link.
|
|
10
|
+
* Center: Icon will be rendered at the "center" of the smart link relative to the vertical height.
|
|
11
|
+
*/
|
|
7
12
|
position?: SmartLinkPosition;
|
|
8
|
-
render?: () => React.ReactNode;
|
|
9
13
|
url?: string;
|
|
10
14
|
};
|