@atlaskit/smart-card 23.1.2 → 23.1.3
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 +6 -0
- package/dist/cjs/extractors/common/actions/extractPreviewAction.js +0 -2
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +2 -12
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/BlockCard/actions/PreviewAction.js +1 -5
- package/dist/cjs/view/BlockCard/index.js +0 -10
- package/dist/cjs/view/EmbedModal/index.js +2 -4
- package/dist/es2019/extractors/common/actions/extractPreviewAction.js +0 -2
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +2 -11
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/BlockCard/actions/PreviewAction.js +0 -4
- package/dist/es2019/view/BlockCard/index.js +0 -9
- package/dist/es2019/view/EmbedModal/index.js +2 -3
- package/dist/esm/extractors/common/actions/extractPreviewAction.js +0 -2
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +2 -11
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/BlockCard/actions/PreviewAction.js +1 -5
- package/dist/esm/view/BlockCard/index.js +0 -9
- package/dist/esm/view/EmbedModal/index.js +2 -3
- package/dist/types/extractors/block/types.d.ts +0 -2
- package/dist/types/extractors/common/actions/extractPreviewAction.d.ts +1 -1
- package/dist/types/view/BlockCard/actions/PreviewAction.d.ts +0 -2
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/EmbedModal/index.d.ts +1 -3
- package/dist/types/view/EmbedModal/types.d.ts +1 -4
- package/dist/types-ts4.0/extractors/block/types.d.ts +0 -2
- package/dist/types-ts4.0/extractors/common/actions/extractPreviewAction.d.ts +1 -1
- package/dist/types-ts4.0/view/BlockCard/actions/PreviewAction.d.ts +0 -2
- package/dist/types-ts4.0/view/Card/index.d.ts +1 -1
- package/dist/types-ts4.0/view/EmbedModal/index.d.ts +1 -3
- package/dist/types-ts4.0/view/EmbedModal/types.d.ts +1 -4
- package/package.json +1 -1
- package/dist/cjs/view/EmbedModal/components/size-experiment/index.js +0 -36
- package/dist/cjs/view/EmbedModal/components/size-experiment/types.js +0 -5
- package/dist/cjs/view/common/Modal.js +0 -158
- package/dist/cjs/view/common/ModalHeader.js +0 -114
- package/dist/es2019/view/EmbedModal/components/size-experiment/index.js +0 -24
- package/dist/es2019/view/EmbedModal/components/size-experiment/types.js +0 -1
- package/dist/es2019/view/common/Modal.js +0 -115
- package/dist/es2019/view/common/ModalHeader.js +0 -88
- package/dist/esm/view/EmbedModal/components/size-experiment/index.js +0 -23
- package/dist/esm/view/EmbedModal/components/size-experiment/types.js +0 -1
- package/dist/esm/view/common/Modal.js +0 -148
- package/dist/esm/view/common/ModalHeader.js +0 -89
- package/dist/types/view/EmbedModal/components/size-experiment/index.d.ts +0 -7
- package/dist/types/view/EmbedModal/components/size-experiment/types.d.ts +0 -4
- package/dist/types/view/common/Modal.d.ts +0 -26
- package/dist/types/view/common/ModalHeader.d.ts +0 -19
- package/dist/types-ts4.0/view/EmbedModal/components/size-experiment/index.d.ts +0 -7
- package/dist/types-ts4.0/view/EmbedModal/components/size-experiment/types.d.ts +0 -4
- package/dist/types-ts4.0/view/common/Modal.d.ts +0 -26
- package/dist/types-ts4.0/view/common/ModalHeader.d.ts +0 -19
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
|
-
import { Fragment as F } from 'react';
|
|
4
|
-
import { useModal } from '@atlaskit/modal-dialog';
|
|
5
|
-
import EditorCloseIcon from '@atlaskit/icon/glyph/editor/close';
|
|
6
|
-
import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
|
|
7
|
-
import Button from '@atlaskit/button/custom-theme-button';
|
|
8
|
-
import { N100, N30A } from '@atlaskit/theme/colors';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
11
|
-
import { gs } from './utils';
|
|
12
|
-
import { Icon } from './Icon';
|
|
13
|
-
import { MetadataList } from './MetadataList';
|
|
14
|
-
import { Byline } from './Byline';
|
|
15
|
-
import { messages } from '../../messages';
|
|
16
|
-
export var Header = function Header(_ref) {
|
|
17
|
-
var title = _ref.title,
|
|
18
|
-
label = _ref.label,
|
|
19
|
-
_ref$metadata = _ref.metadata,
|
|
20
|
-
metadata = _ref$metadata === void 0 ? {
|
|
21
|
-
items: []
|
|
22
|
-
} : _ref$metadata,
|
|
23
|
-
icon = _ref.icon,
|
|
24
|
-
providerName = _ref.providerName,
|
|
25
|
-
url = _ref.url,
|
|
26
|
-
download = _ref.download,
|
|
27
|
-
byline = _ref.byline,
|
|
28
|
-
onViewActionClick = _ref.onViewActionClick,
|
|
29
|
-
onDownloadActionClick = _ref.onDownloadActionClick;
|
|
30
|
-
|
|
31
|
-
var _useModal = useModal(),
|
|
32
|
-
onClose = _useModal.onClose;
|
|
33
|
-
|
|
34
|
-
return jsx("div", {
|
|
35
|
-
style: {
|
|
36
|
-
paddingLeft: gs(3),
|
|
37
|
-
paddingRight: gs(3),
|
|
38
|
-
paddingBottom: gs(2),
|
|
39
|
-
paddingTop: gs(2)
|
|
40
|
-
}
|
|
41
|
-
}, jsx("div", {
|
|
42
|
-
style: {
|
|
43
|
-
display: 'flex',
|
|
44
|
-
justifyContent: 'space-between',
|
|
45
|
-
alignItems: 'baseline',
|
|
46
|
-
borderBottom: "1px solid ".concat(token('color.border', N30A))
|
|
47
|
-
}
|
|
48
|
-
}, jsx("div", {
|
|
49
|
-
css: {
|
|
50
|
-
flex: 1
|
|
51
|
-
}
|
|
52
|
-
}, jsx("div", {
|
|
53
|
-
css: {
|
|
54
|
-
display: 'flex'
|
|
55
|
-
}
|
|
56
|
-
}, icon && jsx(Icon, icon), jsx("div", {
|
|
57
|
-
css: {
|
|
58
|
-
paddingLeft: gs(2),
|
|
59
|
-
paddingBottom: gs(2)
|
|
60
|
-
}
|
|
61
|
-
}, jsx("h3", null, title), jsx("div", {
|
|
62
|
-
css: {
|
|
63
|
-
color: token('color.text.subtlest', N100)
|
|
64
|
-
}
|
|
65
|
-
}, metadata.items.length && jsx(MetadataList, {
|
|
66
|
-
items: metadata.items
|
|
67
|
-
}) || jsx(Byline, null, byline))))), jsx("div", null, download && jsx(Button, {
|
|
68
|
-
appearance: "primary",
|
|
69
|
-
href: download,
|
|
70
|
-
onClick: onDownloadActionClick
|
|
71
|
-
}, jsx(FormattedMessage, messages.download)), url && jsx(Button, {
|
|
72
|
-
href: url,
|
|
73
|
-
target: "_blank",
|
|
74
|
-
appearance: "link",
|
|
75
|
-
testId: "preview-view-action",
|
|
76
|
-
iconAfter: jsx(ShortcutIcon, {
|
|
77
|
-
size: "small",
|
|
78
|
-
label: ""
|
|
79
|
-
}),
|
|
80
|
-
onClick: onViewActionClick
|
|
81
|
-
}, providerName ? jsx(F, null, jsx(FormattedMessage, messages.viewIn), " ", providerName) : jsx(FormattedMessage, messages.viewOriginal)), jsx(Button, {
|
|
82
|
-
appearance: "subtle",
|
|
83
|
-
iconBefore: jsx(EditorCloseIcon, {
|
|
84
|
-
label: label
|
|
85
|
-
}),
|
|
86
|
-
onClick: onClose,
|
|
87
|
-
testId: "preview-close-button"
|
|
88
|
-
}))));
|
|
89
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Modal from '../../../common/Modal';
|
|
3
|
-
import { WithSizeExperimentProps } from './types';
|
|
4
|
-
declare const withSizeExperiment: <Props, Component>(Component: React.ComponentType<Props>) => React.FC<Props & import("../../types").EmbedModalProps & import("../analytics/types").WithAnalytics & {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
} & WithSizeExperimentProps>;
|
|
7
|
-
export default withSizeExperiment;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React, { ErrorInfo } from 'react';
|
|
2
|
-
import { IconProps } from './Icon';
|
|
3
|
-
import { MetadataListProps } from './MetadataList';
|
|
4
|
-
import { EmbedModalContext } from '../EmbedModal/types';
|
|
5
|
-
export interface ModalProps {
|
|
6
|
-
onClose: (context: EmbedModalContext) => void;
|
|
7
|
-
onOpen?: (context: EmbedModalContext) => void;
|
|
8
|
-
onOpenFailed?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
9
|
-
src?: string;
|
|
10
|
-
showModal?: boolean;
|
|
11
|
-
iframeName: string;
|
|
12
|
-
providerName?: string;
|
|
13
|
-
closeLabel?: string;
|
|
14
|
-
url?: string;
|
|
15
|
-
title?: string;
|
|
16
|
-
metadata?: MetadataListProps;
|
|
17
|
-
icon?: IconProps;
|
|
18
|
-
download?: string;
|
|
19
|
-
byline?: React.ReactNode;
|
|
20
|
-
isTrusted?: boolean;
|
|
21
|
-
onViewActionClick?: () => void;
|
|
22
|
-
onDownloadActionClick?: () => void;
|
|
23
|
-
testId?: string;
|
|
24
|
-
}
|
|
25
|
-
declare const _default: React.FC<import("../EmbedModal/types").EmbedModalProps & import("../EmbedModal/components/analytics/types").WithAnalytics>;
|
|
26
|
-
export default _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
|
-
import { ModalHeaderProps as HeaderComponentProps } from '@atlaskit/modal-dialog';
|
|
5
|
-
import { IconProps } from './Icon';
|
|
6
|
-
import { MetadataListProps } from './MetadataList';
|
|
7
|
-
export interface HeaderProps extends HeaderComponentProps {
|
|
8
|
-
title?: string;
|
|
9
|
-
label: string;
|
|
10
|
-
metadata?: MetadataListProps;
|
|
11
|
-
icon?: IconProps;
|
|
12
|
-
providerName?: string;
|
|
13
|
-
url?: string;
|
|
14
|
-
download?: string;
|
|
15
|
-
byline?: React.ReactNode;
|
|
16
|
-
onViewActionClick?: () => void;
|
|
17
|
-
onDownloadActionClick?: () => void;
|
|
18
|
-
}
|
|
19
|
-
export declare const Header: ({ title, label, metadata, icon, providerName, url, download, byline, onViewActionClick, onDownloadActionClick, }: HeaderProps) => jsx.JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Modal from '../../../common/Modal';
|
|
3
|
-
import { WithSizeExperimentProps } from './types';
|
|
4
|
-
declare const withSizeExperiment: <Props, Component>(Component: React.ComponentType<Props>) => React.FC<Props & import("../../types").EmbedModalProps & import("../analytics/types").WithAnalytics & {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
} & WithSizeExperimentProps>;
|
|
7
|
-
export default withSizeExperiment;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React, { ErrorInfo } from 'react';
|
|
2
|
-
import { IconProps } from './Icon';
|
|
3
|
-
import { MetadataListProps } from './MetadataList';
|
|
4
|
-
import { EmbedModalContext } from '../EmbedModal/types';
|
|
5
|
-
export interface ModalProps {
|
|
6
|
-
onClose: (context: EmbedModalContext) => void;
|
|
7
|
-
onOpen?: (context: EmbedModalContext) => void;
|
|
8
|
-
onOpenFailed?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
9
|
-
src?: string;
|
|
10
|
-
showModal?: boolean;
|
|
11
|
-
iframeName: string;
|
|
12
|
-
providerName?: string;
|
|
13
|
-
closeLabel?: string;
|
|
14
|
-
url?: string;
|
|
15
|
-
title?: string;
|
|
16
|
-
metadata?: MetadataListProps;
|
|
17
|
-
icon?: IconProps;
|
|
18
|
-
download?: string;
|
|
19
|
-
byline?: React.ReactNode;
|
|
20
|
-
isTrusted?: boolean;
|
|
21
|
-
onViewActionClick?: () => void;
|
|
22
|
-
onDownloadActionClick?: () => void;
|
|
23
|
-
testId?: string;
|
|
24
|
-
}
|
|
25
|
-
declare const _default: React.FC<import("../EmbedModal/types").EmbedModalProps & import("../EmbedModal/components/analytics/types").WithAnalytics>;
|
|
26
|
-
export default _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
|
-
import { ModalHeaderProps as HeaderComponentProps } from '@atlaskit/modal-dialog';
|
|
5
|
-
import { IconProps } from './Icon';
|
|
6
|
-
import { MetadataListProps } from './MetadataList';
|
|
7
|
-
export interface HeaderProps extends HeaderComponentProps {
|
|
8
|
-
title?: string;
|
|
9
|
-
label: string;
|
|
10
|
-
metadata?: MetadataListProps;
|
|
11
|
-
icon?: IconProps;
|
|
12
|
-
providerName?: string;
|
|
13
|
-
url?: string;
|
|
14
|
-
download?: string;
|
|
15
|
-
byline?: React.ReactNode;
|
|
16
|
-
onViewActionClick?: () => void;
|
|
17
|
-
onDownloadActionClick?: () => void;
|
|
18
|
-
}
|
|
19
|
-
export declare const Header: ({ title, label, metadata, icon, providerName, url, download, byline, onViewActionClick, onDownloadActionClick, }: HeaderProps) => jsx.JSX.Element;
|