@atlaskit/smart-card 26.42.11 → 26.43.0
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 +12 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/components/Action.js +8 -5
- package/dist/cjs/view/BlockCard/components/ActionList.js +11 -9
- package/dist/cjs/view/BlockCard/components/CollaboratorList.js +5 -2
- package/dist/cjs/view/BlockCard/components/Content.js +4 -1
- package/dist/cjs/view/BlockCard/components/ContentFooter.js +4 -1
- package/dist/cjs/view/BlockCard/components/ContentHeader.js +4 -1
- package/dist/cjs/view/BlockCard/components/Emoji.js +5 -2
- package/dist/cjs/view/BlockCard/components/Frame.js +6 -5
- package/dist/cjs/view/BlockCard/components/Link.js +4 -1
- package/dist/cjs/view/BlockCard/components/Name.js +4 -1
- package/dist/cjs/view/BlockCard/components/Provider.js +6 -3
- package/dist/cjs/view/BlockCard/components/Thumbnail.js +6 -5
- package/dist/cjs/view/BlockCard/components/UnresolvedText.js +4 -1
- package/dist/cjs/view/BlockCard/index.js +19 -16
- package/dist/cjs/view/BlockCard/views/ErroredView.js +12 -11
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +12 -9
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +11 -10
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +16 -13
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +7 -4
- package/dist/cjs/view/BlockCard/views/UnauthorizedView.js +10 -9
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +5 -4
- package/dist/cjs/view/BlockCard/views/flexible/utils/withFlexibleUIBlockCardStyle.js +5 -2
- package/dist/cjs/view/CardWithUrl/component.js +2 -0
- package/dist/cjs/view/CardWithUrl/loader.js +2 -0
- package/dist/cjs/view/EmbedCard/components/Frame.js +15 -12
- package/dist/cjs/view/EmbedCard/components/IframeDwellTracker.js +2 -0
- package/dist/cjs/view/EmbedCard/views/ErroredView.js +8 -5
- package/dist/cjs/view/EmbedCard/views/ResolvedView.js +12 -9
- package/dist/cjs/view/EmbedCard/views/UnresolvedView.js +10 -8
- package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +14 -11
- package/dist/cjs/view/EmbedModal/components/embed-content/index.js +2 -1
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +27 -24
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +5 -4
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +6 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +5 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +9 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +0 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +0 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +6 -5
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +5 -3
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +6 -3
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/container/index.js +4 -3
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/elements/atlaskit-badge/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +6 -5
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +5 -4
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +4 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +4 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/feature-discovery/index.js +10 -7
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +19 -16
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +14 -13
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +6 -4
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +12 -10
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/elements/preview/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/elements/snippet-element/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +2 -1
- package/dist/cjs/view/HoverCard/components/CustomPopupContainer.js +3 -1
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +29 -26
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +19 -16
- package/dist/cjs/view/HoverCard/components/views/resolving/index.js +15 -12
- package/dist/cjs/view/HoverCard/index.js +9 -6
- package/dist/cjs/view/InlineCard/Frame/index.js +4 -2
- package/dist/cjs/view/InlineCard/Frame/styled.js +13 -4
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +2 -0
- package/dist/cjs/view/InlineCard/index.js +2 -0
- package/dist/cjs/view/LinkUrl/LinkWarningModal/index.js +12 -9
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/Byline.js +4 -1
- package/dist/cjs/view/common/Icon.js +5 -4
- package/dist/cjs/view/common/Metadata.js +7 -4
- package/dist/cjs/view/common/MetadataList.js +5 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/components/Action.js +5 -3
- package/dist/es2019/view/BlockCard/components/ActionList.js +10 -8
- package/dist/es2019/view/BlockCard/components/CollaboratorList.js +4 -2
- package/dist/es2019/view/BlockCard/components/Content.js +3 -1
- package/dist/es2019/view/BlockCard/components/ContentFooter.js +3 -1
- package/dist/es2019/view/BlockCard/components/ContentHeader.js +3 -1
- package/dist/es2019/view/BlockCard/components/Emoji.js +3 -1
- package/dist/es2019/view/BlockCard/components/Frame.js +5 -3
- package/dist/es2019/view/BlockCard/components/Link.js +3 -1
- package/dist/es2019/view/BlockCard/components/Name.js +3 -1
- package/dist/es2019/view/BlockCard/components/Provider.js +5 -3
- package/dist/es2019/view/BlockCard/components/Thumbnail.js +6 -4
- package/dist/es2019/view/BlockCard/components/UnresolvedText.js +3 -1
- package/dist/es2019/view/BlockCard/index.js +19 -16
- package/dist/es2019/view/BlockCard/views/ErroredView.js +10 -8
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +11 -9
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +10 -8
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +15 -13
- package/dist/es2019/view/BlockCard/views/ResolvingView.js +6 -4
- package/dist/es2019/view/BlockCard/views/UnauthorizedView.js +10 -8
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +6 -5
- package/dist/es2019/view/BlockCard/views/flexible/utils/withFlexibleUIBlockCardStyle.js +4 -2
- package/dist/es2019/view/CardWithUrl/component.js +2 -0
- package/dist/es2019/view/CardWithUrl/loader.js +2 -0
- package/dist/es2019/view/EmbedCard/components/Frame.js +4 -2
- package/dist/es2019/view/EmbedCard/components/IframeDwellTracker.js +1 -0
- package/dist/es2019/view/EmbedCard/views/ErroredView.js +7 -5
- package/dist/es2019/view/EmbedCard/views/ResolvedView.js +6 -4
- package/dist/es2019/view/EmbedCard/views/UnresolvedView.js +10 -9
- package/dist/es2019/view/EmbedCard/views/unresolved-view/index.js +10 -8
- package/dist/es2019/view/EmbedModal/components/embed-content/index.js +4 -2
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +22 -20
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +6 -5
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +5 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +10 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +7 -6
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +5 -3
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +5 -3
- package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/container/index.js +5 -4
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/elements/atlaskit-badge/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +7 -6
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +6 -5
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +5 -4
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +5 -4
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/feature-discovery/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +6 -4
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -8
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +7 -5
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/elements/preview/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/elements/snippet-element/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +3 -2
- package/dist/es2019/view/HoverCard/components/CustomPopupContainer.js +3 -1
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +7 -5
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +9 -7
- package/dist/es2019/view/HoverCard/components/views/resolving/index.js +13 -11
- package/dist/es2019/view/HoverCard/index.js +6 -4
- package/dist/es2019/view/InlineCard/Frame/index.js +4 -2
- package/dist/es2019/view/InlineCard/Frame/styled.js +17 -5
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +2 -0
- package/dist/es2019/view/InlineCard/index.js +2 -0
- package/dist/es2019/view/LinkUrl/LinkWarningModal/index.js +11 -9
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/Byline.js +3 -1
- package/dist/es2019/view/common/Icon.js +6 -5
- package/dist/es2019/view/common/Metadata.js +6 -4
- package/dist/es2019/view/common/MetadataList.js +4 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/components/Action.js +5 -3
- package/dist/esm/view/BlockCard/components/ActionList.js +11 -9
- package/dist/esm/view/BlockCard/components/CollaboratorList.js +4 -2
- package/dist/esm/view/BlockCard/components/Content.js +3 -1
- package/dist/esm/view/BlockCard/components/ContentFooter.js +3 -1
- package/dist/esm/view/BlockCard/components/ContentHeader.js +3 -1
- package/dist/esm/view/BlockCard/components/Emoji.js +3 -1
- package/dist/esm/view/BlockCard/components/Frame.js +5 -3
- package/dist/esm/view/BlockCard/components/Link.js +3 -1
- package/dist/esm/view/BlockCard/components/Name.js +3 -1
- package/dist/esm/view/BlockCard/components/Provider.js +5 -3
- package/dist/esm/view/BlockCard/components/Thumbnail.js +6 -4
- package/dist/esm/view/BlockCard/components/UnresolvedText.js +3 -1
- package/dist/esm/view/BlockCard/index.js +19 -16
- package/dist/esm/view/BlockCard/views/ErroredView.js +10 -8
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +11 -9
- package/dist/esm/view/BlockCard/views/NotFoundView.js +10 -8
- package/dist/esm/view/BlockCard/views/ResolvedView.js +15 -13
- package/dist/esm/view/BlockCard/views/ResolvingView.js +6 -4
- package/dist/esm/view/BlockCard/views/UnauthorizedView.js +10 -8
- package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +6 -5
- package/dist/esm/view/BlockCard/views/flexible/utils/withFlexibleUIBlockCardStyle.js +4 -2
- package/dist/esm/view/CardWithUrl/component.js +2 -0
- package/dist/esm/view/CardWithUrl/loader.js +2 -0
- package/dist/esm/view/EmbedCard/components/Frame.js +4 -2
- package/dist/esm/view/EmbedCard/components/IframeDwellTracker.js +1 -0
- package/dist/esm/view/EmbedCard/views/ErroredView.js +7 -5
- package/dist/esm/view/EmbedCard/views/ResolvedView.js +6 -4
- package/dist/esm/view/EmbedCard/views/UnresolvedView.js +10 -9
- package/dist/esm/view/EmbedCard/views/unresolved-view/index.js +10 -8
- package/dist/esm/view/EmbedModal/components/embed-content/index.js +4 -2
- package/dist/esm/view/EmbedModal/components/link-info/index.js +22 -20
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +6 -5
- package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +5 -3
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +10 -9
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +0 -2
- package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +0 -2
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +7 -6
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +5 -3
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +5 -3
- package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/container/index.js +5 -4
- package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/elements/atlaskit-badge/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +7 -6
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +6 -5
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +5 -4
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +5 -4
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/feature-discovery/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +6 -4
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -8
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +5 -4
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +7 -5
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/elements/preview/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/elements/snippet-element/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +3 -2
- package/dist/esm/view/HoverCard/components/CustomPopupContainer.js +3 -1
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +7 -5
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +9 -7
- package/dist/esm/view/HoverCard/components/views/resolving/index.js +13 -11
- package/dist/esm/view/HoverCard/index.js +6 -4
- package/dist/esm/view/InlineCard/Frame/index.js +4 -2
- package/dist/esm/view/InlineCard/Frame/styled.js +13 -4
- package/dist/esm/view/InlineCard/ResolvedView/index.js +2 -0
- package/dist/esm/view/InlineCard/index.js +2 -0
- package/dist/esm/view/LinkUrl/LinkWarningModal/index.js +11 -9
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/Byline.js +3 -1
- package/dist/esm/view/common/Icon.js +6 -5
- package/dist/esm/view/common/Metadata.js +6 -4
- package/dist/esm/view/common/MetadataList.js +4 -2
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +2 -0
- package/dist/types/view/CardWithUrl/types.d.ts +1 -0
- package/dist/types/view/InlineCard/Frame/index.d.ts +2 -0
- package/dist/types/view/InlineCard/Frame/styled.d.ts +1 -0
- package/dist/types/view/InlineCard/ResolvedView/index.d.ts +2 -0
- package/dist/types/view/InlineCard/types.d.ts +1 -0
- package/dist/types-ts4.5/view/Card/index.d.ts +1 -1
- package/dist/types-ts4.5/view/Card/types.d.ts +2 -0
- package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +1 -0
- package/dist/types-ts4.5/view/InlineCard/Frame/index.d.ts +2 -0
- package/dist/types-ts4.5/view/InlineCard/Frame/styled.d.ts +1 -0
- package/dist/types-ts4.5/view/InlineCard/ResolvedView/index.d.ts +2 -0
- package/dist/types-ts4.5/view/InlineCard/types.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import React, { useMemo } from 'react';
|
|
2
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
3
5
|
import { useModal } from '@atlaskit/modal-dialog';
|
|
@@ -26,9 +28,9 @@ const LinkInfo = ({
|
|
|
26
28
|
} = useModal();
|
|
27
29
|
const downloadButton = useMemo(() => {
|
|
28
30
|
if (onDownloadButtonClick) {
|
|
29
|
-
return
|
|
30
|
-
content:
|
|
31
|
-
icon:
|
|
31
|
+
return jsx(LinkInfoButton, {
|
|
32
|
+
content: jsx(FormattedMessage, messages.download),
|
|
33
|
+
icon: jsx(DownloadIcon, {
|
|
32
34
|
label: messages.download.defaultMessage
|
|
33
35
|
}),
|
|
34
36
|
onClick: onDownloadButtonClick,
|
|
@@ -38,10 +40,10 @@ const LinkInfo = ({
|
|
|
38
40
|
}, [onDownloadButtonClick, testId]);
|
|
39
41
|
const urlButton = useMemo(() => {
|
|
40
42
|
if (onViewButtonClick) {
|
|
41
|
-
const content = providerName ?
|
|
42
|
-
return
|
|
43
|
+
const content = providerName ? jsx(React.Fragment, null, jsx(FormattedMessage, messages.viewIn), " ", providerName) : jsx(FormattedMessage, messages.viewOriginal);
|
|
44
|
+
return jsx(LinkInfoButton, {
|
|
43
45
|
content: content,
|
|
44
|
-
icon:
|
|
46
|
+
icon: jsx(ShortcutIcon, {
|
|
45
47
|
label: messages.viewOriginal.defaultMessage
|
|
46
48
|
}),
|
|
47
49
|
onClick: onViewButtonClick,
|
|
@@ -52,36 +54,36 @@ const LinkInfo = ({
|
|
|
52
54
|
const sizeButton = useMemo(() => {
|
|
53
55
|
const isFullScreen = size === MAX_MODAL_SIZE;
|
|
54
56
|
const message = isFullScreen ? messages.preview_min_size : messages.preview_max_size;
|
|
55
|
-
const icon = isFullScreen ?
|
|
57
|
+
const icon = isFullScreen ? jsx(VidFullScreenOffIcon, {
|
|
56
58
|
label: message.defaultMessage
|
|
57
|
-
}) :
|
|
59
|
+
}) : jsx(VidFullScreenOnIcon, {
|
|
58
60
|
label: message.defaultMessage
|
|
59
61
|
});
|
|
60
|
-
return
|
|
62
|
+
return jsx("span", {
|
|
61
63
|
className: "smart-link-resize-button"
|
|
62
|
-
},
|
|
63
|
-
content:
|
|
64
|
+
}, jsx(LinkInfoButton, {
|
|
65
|
+
content: jsx(FormattedMessage, message),
|
|
64
66
|
icon: icon,
|
|
65
67
|
onClick: onResizeButtonClick,
|
|
66
68
|
testId: `${testId}-resize`
|
|
67
69
|
}));
|
|
68
70
|
}, [onResizeButtonClick, size, testId]);
|
|
69
|
-
return
|
|
71
|
+
return jsx("div", {
|
|
70
72
|
css: containerStyles
|
|
71
|
-
}, icon &&
|
|
73
|
+
}, icon && jsx("div", {
|
|
72
74
|
css: iconCss,
|
|
73
75
|
"data-testid": `${testId}-icon`
|
|
74
|
-
},
|
|
76
|
+
}, jsx(Icon, icon)), jsx("div", {
|
|
75
77
|
css: titleCss
|
|
76
|
-
},
|
|
78
|
+
}, jsx("h3", {
|
|
77
79
|
"data-testid": `${testId}-title`
|
|
78
|
-
}, title),
|
|
80
|
+
}, title), jsx("span", {
|
|
79
81
|
tabIndex: 0
|
|
80
|
-
})),
|
|
82
|
+
})), jsx("div", {
|
|
81
83
|
css: actionCss
|
|
82
|
-
}, downloadButton, urlButton, sizeButton,
|
|
83
|
-
content:
|
|
84
|
-
icon:
|
|
84
|
+
}, downloadButton, urlButton, sizeButton, jsx(LinkInfoButton, {
|
|
85
|
+
content: jsx(FormattedMessage, messages.preview_close),
|
|
86
|
+
icon: jsx(CrossIcon, {
|
|
85
87
|
label: messages.preview_close.defaultMessage
|
|
86
88
|
}),
|
|
87
89
|
onClick: onClose,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React, { useCallback } from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
4
5
|
import { LoadingButton } from '@atlaskit/button';
|
|
5
6
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
@@ -62,14 +63,14 @@ const ActionButton = ({
|
|
|
62
63
|
e.preventDefault();
|
|
63
64
|
handler();
|
|
64
65
|
}, []);
|
|
65
|
-
return
|
|
66
|
+
return jsx("div", {
|
|
66
67
|
css: [getButtonStyle(size, iconOnly), overrideCss],
|
|
67
68
|
"data-testid": `${testId}-button-wrapper`
|
|
68
|
-
},
|
|
69
|
+
}, jsx(Tooltip, {
|
|
69
70
|
content: tooltipMessage,
|
|
70
71
|
hideTooltipOnClick: true,
|
|
71
72
|
testId: `${testId}-tooltip`
|
|
72
|
-
}, getBooleanFF('platform.linking-platform.smart-card.follow-button') ?
|
|
73
|
+
}, getBooleanFF('platform.linking-platform.smart-card.follow-button') ? jsx(LoadingButton, {
|
|
73
74
|
appearance: appearance,
|
|
74
75
|
iconAfter: iconAfter,
|
|
75
76
|
iconBefore: iconBefore,
|
|
@@ -78,7 +79,7 @@ const ActionButton = ({
|
|
|
78
79
|
onClick: onButtonClick(onClick),
|
|
79
80
|
spacing: sizeToButtonSpacing[size],
|
|
80
81
|
testId: testId
|
|
81
|
-
}, content) :
|
|
82
|
+
}, content) : jsx(Button, {
|
|
82
83
|
appearance: appearance,
|
|
83
84
|
iconAfter: iconAfter,
|
|
84
85
|
iconBefore: iconBefore,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { SmartLinkSize } from '../../../../../../constants';
|
|
4
5
|
import { getIconSizeStyles } from '../../../utils';
|
|
5
6
|
const getIconWidth = size => {
|
|
@@ -22,7 +23,7 @@ const ActionIcon = ({
|
|
|
22
23
|
testId,
|
|
23
24
|
icon,
|
|
24
25
|
isDisabled
|
|
25
|
-
}) =>
|
|
26
|
+
}) => jsx("span", {
|
|
26
27
|
css: getIconStyles(size, isDisabled),
|
|
27
28
|
"data-testid": `${testId}-icon`
|
|
28
29
|
}, icon);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import { SmartLinkSize } from '../../../../../constants';
|
|
3
5
|
import ActionButton from './action-button';
|
|
4
6
|
import ActionDropdownItem from './action-dropdown-item';
|
|
@@ -29,7 +31,7 @@ const Action = ({
|
|
|
29
31
|
if (!onClick) {
|
|
30
32
|
return null;
|
|
31
33
|
}
|
|
32
|
-
const actionIcon = icon &&
|
|
34
|
+
const actionIcon = icon && jsx(ActionIcon, {
|
|
33
35
|
isDisabled: isDisabled,
|
|
34
36
|
icon: icon,
|
|
35
37
|
size: size,
|
|
@@ -38,7 +40,7 @@ const Action = ({
|
|
|
38
40
|
const iconBefore = icon && iconPosition === 'before' ? actionIcon : undefined;
|
|
39
41
|
const iconAfter = icon && iconPosition === 'after' ? actionIcon : undefined;
|
|
40
42
|
if (asDropDownItem) {
|
|
41
|
-
return
|
|
43
|
+
return jsx(ActionDropdownItem, {
|
|
42
44
|
content: content,
|
|
43
45
|
iconAfter: iconAfter,
|
|
44
46
|
iconBefore: iconBefore,
|
|
@@ -47,7 +49,7 @@ const Action = ({
|
|
|
47
49
|
testId: testId
|
|
48
50
|
});
|
|
49
51
|
} else {
|
|
50
|
-
return
|
|
52
|
+
return jsx(ActionButton, {
|
|
51
53
|
appearance: appearance,
|
|
52
54
|
content: content,
|
|
53
55
|
iconAfter: iconAfter,
|
package/dist/es2019/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import React, { useCallback } from 'react';
|
|
3
5
|
import * as Actions from '../../../actions';
|
|
4
6
|
import { isJSXElementNull } from '../../utils';
|
|
@@ -38,7 +40,7 @@ const ActionGroupItem = ({
|
|
|
38
40
|
if (hideIcon) {
|
|
39
41
|
actionProps.icon = undefined;
|
|
40
42
|
}
|
|
41
|
-
const action =
|
|
43
|
+
const action = jsx(Action, _extends({
|
|
42
44
|
url: "",
|
|
43
45
|
asDropDownItem: asDropDownItems,
|
|
44
46
|
size: size,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import { useCallback, useMemo, useState } from 'react';
|
|
3
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
6
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
8
|
import DropdownMenu from '@atlaskit/dropdown-menu';
|
|
@@ -29,7 +30,7 @@ const styles = css`
|
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
`;
|
|
32
|
-
const renderActionItems = (items = [], size = SmartLinkSize.Medium, appearance, asDropDownItems, onActionItemClick) => items.map((item, idx) =>
|
|
33
|
+
const renderActionItems = (items = [], size = SmartLinkSize.Medium, appearance, asDropDownItems, onActionItemClick) => items.map((item, idx) => jsx(ActionGroupItem, {
|
|
33
34
|
item: item,
|
|
34
35
|
key: idx,
|
|
35
36
|
size: size,
|
|
@@ -78,22 +79,22 @@ const ActionGroup = ({
|
|
|
78
79
|
const actionItems = isMoreThenTwoItems ? renderableActionItems.slice(visibleButtonsNum - 1) : [];
|
|
79
80
|
if (actionItems.length > 0) {
|
|
80
81
|
const spacing = sizeToButtonSpacing[size];
|
|
81
|
-
const moreIcon =
|
|
82
|
+
const moreIcon = jsx(MoreIcon, {
|
|
82
83
|
label: "more"
|
|
83
84
|
});
|
|
84
|
-
const formatMessage =
|
|
85
|
-
return
|
|
85
|
+
const formatMessage = jsx(FormattedMessage, messages.more_actions);
|
|
86
|
+
return jsx(DropdownMenu, {
|
|
86
87
|
isOpen: isOpen,
|
|
87
88
|
onOpenChange: onOpenChange,
|
|
88
89
|
trigger: ({
|
|
89
90
|
triggerRef,
|
|
90
91
|
...props
|
|
91
|
-
}) =>
|
|
92
|
+
}) => jsx(Tooltip, {
|
|
92
93
|
content: formatMessage,
|
|
93
94
|
hideTooltipOnClick: true,
|
|
94
95
|
testId: "action-group-more-button-tooltip",
|
|
95
96
|
tag: "span"
|
|
96
|
-
},
|
|
97
|
+
}, jsx(Button, _extends({}, props, {
|
|
97
98
|
spacing: spacing,
|
|
98
99
|
testId: "action-group-more-button",
|
|
99
100
|
iconBefore: moreIcon,
|
|
@@ -105,10 +106,10 @@ const ActionGroup = ({
|
|
|
105
106
|
}
|
|
106
107
|
return null;
|
|
107
108
|
}, [appearance, isMoreThenTwoItems, isOpen, onActionItemClick, onOpenChange, renderableActionItems, size, ui === null || ui === void 0 ? void 0 : ui.zIndex, visibleButtonsNum]);
|
|
108
|
-
return renderableActionItems.length > 0 ?
|
|
109
|
+
return renderableActionItems.length > 0 ? jsx("div", {
|
|
109
110
|
css: styles,
|
|
110
111
|
className: "actions-button-group",
|
|
111
112
|
"data-action-open": isOpen
|
|
112
|
-
},
|
|
113
|
+
}, jsx(ButtonGroup, null, actionButtons, moreActionDropdown)) : null;
|
|
113
114
|
};
|
|
114
115
|
export default ActionGroup;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React, { useEffect } from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { ElementName, SmartLinkDirection, SmartLinkSize } from '../../../../../constants';
|
|
4
5
|
import { getBaseStyles, getGapSize, highlightRemoveStyles, renderChildren } from '../utils';
|
|
5
6
|
const getBlockStyles = (direction, size) => css`
|
|
@@ -42,7 +43,7 @@ const Block = ({
|
|
|
42
43
|
useEffect(() => {
|
|
43
44
|
onRender && onRender();
|
|
44
45
|
}, [onRender]);
|
|
45
|
-
return
|
|
46
|
+
return jsx("div", {
|
|
46
47
|
css: [getBlockStyles(direction, size), overrideCss],
|
|
47
48
|
"data-smart-block": true,
|
|
48
49
|
"data-testid": testId,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkPosition, SmartLinkSize, SmartLinkWidth } from '../../../../../constants';
|
|
4
5
|
import { getBaseStyles, getGapSize, renderChildren } from '../utils';
|
|
5
6
|
import { getMaxLineHeight, getTruncateStyles } from '../../utils';
|
|
@@ -89,7 +90,7 @@ const ElementGroup = ({
|
|
|
89
90
|
testId = 'smart-element-group',
|
|
90
91
|
width = SmartLinkWidth.FitToContent,
|
|
91
92
|
position = SmartLinkPosition.Center
|
|
92
|
-
}) =>
|
|
93
|
+
}) => jsx("div", {
|
|
93
94
|
css: [getElementGroupStyles(direction, size, align, width, position), overrideCss],
|
|
94
95
|
"data-smart-element-group": true,
|
|
95
96
|
"data-testid": testId
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
3
5
|
import { SmartLinkStatus } from '../../../../../constants';
|
|
4
6
|
import PreviewBlockResolvedView from './resolved';
|
|
5
7
|
|
|
@@ -15,7 +17,7 @@ const PreviewBlock = ({
|
|
|
15
17
|
overrideUrl,
|
|
16
18
|
...blockProps
|
|
17
19
|
}) => {
|
|
18
|
-
return
|
|
20
|
+
return jsx(PreviewBlockResolvedView, _extends({}, blockProps, {
|
|
19
21
|
testId: testId,
|
|
20
22
|
overrideUrl: overrideUrl
|
|
21
23
|
}));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import { MediaPlacement } from '../../../../../../constants';
|
|
5
6
|
import Block from '../../block';
|
|
6
7
|
import { Preview } from '../../../elements';
|
|
@@ -88,10 +89,10 @@ const PreviewBlockResolvedView = ({
|
|
|
88
89
|
onError();
|
|
89
90
|
}
|
|
90
91
|
}, [onError]);
|
|
91
|
-
return
|
|
92
|
+
return jsx(Block, _extends({}, blockProps, {
|
|
92
93
|
overrideCss: styles,
|
|
93
94
|
testId: `${testId}-resolved-view`
|
|
94
|
-
}),
|
|
95
|
+
}), jsx(Preview, {
|
|
95
96
|
onError: handleOnError,
|
|
96
97
|
onLoad: handleOnLoad,
|
|
97
98
|
overrideUrl: overrideUrl
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.26.1 */
|
|
2
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
3
1
|
import React, { useCallback, useState } from 'react';
|
|
4
2
|
import { useIntl } from 'react-intl-next';
|
|
5
3
|
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.26.1 */
|
|
2
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
3
1
|
import React, { useEffect } from 'react';
|
|
4
2
|
import { Stack, xcss } from '@atlaskit/primitives';
|
|
5
3
|
import { AnalyticsContext, useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { LinkIcon } from '../../../elements';
|
|
6
7
|
import Block from '../../block';
|
|
7
8
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize } from '../../../../../../constants';
|
|
@@ -55,20 +56,20 @@ const TitleBlockErroredView = ({
|
|
|
55
56
|
size = SmartLinkSize.Medium
|
|
56
57
|
} = blockProps;
|
|
57
58
|
const hasAction = onClick !== undefined;
|
|
58
|
-
return
|
|
59
|
+
return jsx(Block, _extends({}, blockProps, {
|
|
59
60
|
testId: `${testId}-errored-view`
|
|
60
|
-
}), !hideIcon &&
|
|
61
|
+
}), !hideIcon && jsx(LinkIcon, {
|
|
61
62
|
position: position
|
|
62
|
-
}), title, descriptor &&
|
|
63
|
+
}), title, descriptor && jsx(ElementGroup, {
|
|
63
64
|
direction: SmartLinkDirection.Horizontal,
|
|
64
65
|
align: SmartLinkAlignment.Right
|
|
65
|
-
},
|
|
66
|
+
}, jsx("span", {
|
|
66
67
|
className: hasAction ? 'has-action' : '',
|
|
67
68
|
css: getMessageStyles(size, hasAction),
|
|
68
69
|
onClick: onClick,
|
|
69
70
|
"data-testid": `${testId}-errored-view-message`,
|
|
70
71
|
tabIndex: hasAction ? 0 : -1
|
|
71
|
-
},
|
|
72
|
+
}, jsx(FormattedMessage, _extends({}, descriptor, {
|
|
72
73
|
values: values
|
|
73
74
|
})))), actionGroup);
|
|
74
75
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
3
5
|
import Block from '../../block';
|
|
4
6
|
import { SmartLinkSize } from '../../../../../../constants';
|
|
5
7
|
import LoadingSkeleton from '../../../common/loading-skeleton';
|
|
@@ -23,12 +25,12 @@ const TitleBlockResolvingView = ({
|
|
|
23
25
|
} = blockProps;
|
|
24
26
|
const iconWidth = getIconWidth(size);
|
|
25
27
|
const iconStyles = getIconSizeStyles(iconWidth);
|
|
26
|
-
return
|
|
28
|
+
return jsx(Block, _extends({}, blockProps, {
|
|
27
29
|
testId: `${testId}-resolving-view`
|
|
28
|
-
}), !hideIcon &&
|
|
30
|
+
}), !hideIcon && jsx("span", {
|
|
29
31
|
css: iconStyles,
|
|
30
32
|
"data-testid": `${testId}-icon`
|
|
31
|
-
},
|
|
33
|
+
}, jsx(LoadingSkeleton, {
|
|
32
34
|
testId: `${testId}-icon-loading`
|
|
33
35
|
})), title, actionGroup);
|
|
34
36
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import ImageLoader from 'react-render-image';
|
|
3
5
|
import LoadingSkeleton from '../loading-skeleton';
|
|
4
6
|
const ImageIcon = ({
|
|
@@ -7,12 +9,12 @@ const ImageIcon = ({
|
|
|
7
9
|
url,
|
|
8
10
|
onError,
|
|
9
11
|
onLoad
|
|
10
|
-
}) =>
|
|
12
|
+
}) => jsx(ImageLoader, {
|
|
11
13
|
src: url,
|
|
12
|
-
loading:
|
|
14
|
+
loading: jsx(LoadingSkeleton, {
|
|
13
15
|
testId: `${testId}-loading`
|
|
14
16
|
}),
|
|
15
|
-
loaded:
|
|
17
|
+
loaded: jsx("img", {
|
|
16
18
|
src: url,
|
|
17
19
|
"data-testid": `${testId}-image`
|
|
18
20
|
}),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import { css, keyframes } from '@emotion/react';
|
|
3
|
+
import { css, jsx, keyframes } from '@emotion/react';
|
|
3
4
|
const LoadingSkeleton = ({
|
|
4
5
|
testId,
|
|
5
6
|
width,
|
|
@@ -32,7 +33,7 @@ const LoadingSkeleton = ({
|
|
|
32
33
|
animation-name: ${animationNameStyles};
|
|
33
34
|
animation-timing-function: linear;
|
|
34
35
|
`;
|
|
35
|
-
return
|
|
36
|
+
return jsx("span", {
|
|
36
37
|
css: styles,
|
|
37
38
|
"data-testid": testId
|
|
38
39
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React, { useContext } from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { MediaPlacement, SmartLinkSize, SmartLinkTheme } from '../../../../constants';
|
|
4
5
|
import { isFlexibleUiBlock, isFlexibleUiPreviewBlock, isFlexibleUiTitleBlock } from '../../../../utils/flexible';
|
|
5
6
|
import { tokens } from '../../../../utils/token';
|
|
@@ -149,7 +150,7 @@ const getLayeredLink = (testId, context, children, onClick) => {
|
|
|
149
150
|
anchorTarget: target,
|
|
150
151
|
text
|
|
151
152
|
} = getTitleBlockProps(children) || {};
|
|
152
|
-
return
|
|
153
|
+
return jsx(LayeredLink, {
|
|
153
154
|
onClick: onClick,
|
|
154
155
|
target: target,
|
|
155
156
|
testId: testId,
|
|
@@ -189,13 +190,13 @@ const Container = ({
|
|
|
189
190
|
// `retry` object contains action that can be performed on
|
|
190
191
|
// unresolved link (unauthorized, forbidden, not found, etc.)
|
|
191
192
|
const canShowAuthTooltip = showAuthTooltip && status === 'unauthorized' && retry !== undefined;
|
|
192
|
-
const container =
|
|
193
|
+
const container = jsx("div", {
|
|
193
194
|
css: getContainerStyles(size, hideBackground, hideElevation, hidePadding, clickableContainer, childrenOptions),
|
|
194
195
|
"data-smart-link-container": true,
|
|
195
196
|
"data-testid": testId
|
|
196
197
|
}, clickableContainer ? getLayeredLink(testId, context, children, onClick) : null, renderChildren(children, size, theme, status, retry, onClick));
|
|
197
198
|
if (context !== null && context !== void 0 && context.url && (canShowHoverPreview || canShowAuthTooltip)) {
|
|
198
|
-
return
|
|
199
|
+
return jsx(HoverCardControl, {
|
|
199
200
|
hideHoverCardPreviewButton: hideHoverCardPreviewButton,
|
|
200
201
|
isHoverPreview: canShowHoverPreview,
|
|
201
202
|
isAuthTooltip: canShowAuthTooltip,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { jsx, css } from '@emotion/react';
|
|
3
4
|
import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
|
|
4
5
|
const styles = css`
|
|
5
6
|
// Stretch the invisible link over the whole of the post.
|
|
@@ -49,7 +50,7 @@ const LayeredLink = ({
|
|
|
49
50
|
url
|
|
50
51
|
}) => {
|
|
51
52
|
const onMouseDown = useMouseDownEvent();
|
|
52
|
-
return
|
|
53
|
+
return jsx("a", {
|
|
53
54
|
className: "layered-link",
|
|
54
55
|
css: styles,
|
|
55
56
|
"data-testid": `${testId}-layered-link`,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import AKBadge from '@atlaskit/badge';
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
const badgeStyles = css`
|
|
5
6
|
align-items: center;
|
|
6
7
|
display: inline-flex;
|
|
@@ -21,12 +22,12 @@ const AtlaskitBadge = ({
|
|
|
21
22
|
if (!value) {
|
|
22
23
|
return null;
|
|
23
24
|
}
|
|
24
|
-
return
|
|
25
|
+
return jsx("span", {
|
|
25
26
|
css: [badgeStyles, overrideCss],
|
|
26
27
|
"data-fit-to-content": true,
|
|
27
28
|
"data-smart-element": name,
|
|
28
29
|
"data-smart-element-atlaskit-badge": true,
|
|
29
30
|
"data-testid": testId
|
|
30
|
-
},
|
|
31
|
+
}, jsx(AKBadge, null, value));
|
|
31
32
|
};
|
|
32
33
|
export default AtlaskitBadge;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React, { useMemo } from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import AtlaskitAvatarGroup from '@atlaskit/avatar-group';
|
|
4
5
|
import { SmartLinkSize } from '../../../../../constants';
|
|
5
6
|
import { messages } from '../../../../../messages';
|
|
@@ -93,13 +94,13 @@ const AvatarGroup = ({
|
|
|
93
94
|
if (!data.length) {
|
|
94
95
|
return null;
|
|
95
96
|
}
|
|
96
|
-
return
|
|
97
|
+
return jsx("span", {
|
|
97
98
|
css: [getStyles(size), overrideCss],
|
|
98
99
|
"data-fit-to-content": true,
|
|
99
100
|
"data-smart-element": name,
|
|
100
101
|
"data-smart-element-avatar-group": true,
|
|
101
102
|
"data-testid": testId
|
|
102
|
-
},
|
|
103
|
+
}, jsx(AtlaskitAvatarGroup, {
|
|
103
104
|
maxCount: maxCount,
|
|
104
105
|
appearance: "stack",
|
|
105
106
|
size: "small",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { tokens } from '../../../../../utils/token';
|
|
4
5
|
import { getFormattedMessage, getIconSizeStyles } from '../../utils';
|
|
5
6
|
import { IconType } from '../../../../../constants';
|
|
@@ -55,7 +56,7 @@ const getFormattedMessageFromIcon = icon => {
|
|
|
55
56
|
};
|
|
56
57
|
const renderAtlaskitIcon = (icon, testId) => {
|
|
57
58
|
if (icon) {
|
|
58
|
-
return
|
|
59
|
+
return jsx(AtlaskitIcon, {
|
|
59
60
|
icon: icon,
|
|
60
61
|
label: icon,
|
|
61
62
|
testId: `${testId}-icon`
|
|
@@ -64,7 +65,7 @@ const renderAtlaskitIcon = (icon, testId) => {
|
|
|
64
65
|
};
|
|
65
66
|
const renderImageIcon = (url, testId) => {
|
|
66
67
|
if (url) {
|
|
67
|
-
return
|
|
68
|
+
return jsx(ImageIcon, {
|
|
68
69
|
testId: testId,
|
|
69
70
|
url: url
|
|
70
71
|
});
|
|
@@ -97,15 +98,15 @@ const Badge = ({
|
|
|
97
98
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
98
99
|
return null;
|
|
99
100
|
}
|
|
100
|
-
return
|
|
101
|
+
return jsx("span", {
|
|
101
102
|
css: [badgeStyles, overrideCss],
|
|
102
103
|
"data-fit-to-content": true,
|
|
103
104
|
"data-smart-element": name,
|
|
104
105
|
"data-smart-element-badge": true,
|
|
105
106
|
"data-testid": testId
|
|
106
|
-
},
|
|
107
|
+
}, jsx("span", {
|
|
107
108
|
css: iconStyles
|
|
108
|
-
}, badgeIcon),
|
|
109
|
+
}, badgeIcon), jsx("span", {
|
|
109
110
|
css: labelStyles,
|
|
110
111
|
"data-testid": `${testId}-label`
|
|
111
112
|
}, formattedMessageOrLabel));
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { useIntl, FormattedMessage } from 'react-intl-next';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { getTruncateStyles } from '../../utils';
|
|
6
7
|
import { tokens } from '../../../../../utils/token';
|
|
7
8
|
import { selectUnit } from '@formatjs/intl-utils';
|
|
@@ -70,13 +71,13 @@ const DateTime = ({
|
|
|
70
71
|
numeric: 'auto'
|
|
71
72
|
});
|
|
72
73
|
}
|
|
73
|
-
return
|
|
74
|
+
return jsx("span", {
|
|
74
75
|
css: [styles, overrideCss],
|
|
75
76
|
"data-separator": true,
|
|
76
77
|
"data-smart-element": name,
|
|
77
78
|
"data-smart-element-date-time": true,
|
|
78
79
|
"data-testid": testId
|
|
79
|
-
}, text ? `${text} ${context}` :
|
|
80
|
+
}, text ? `${text} ${context}` : jsx(FormattedMessage, _extends({}, typeToDescriptorMap[type][typeVariant], {
|
|
80
81
|
values: {
|
|
81
82
|
context
|
|
82
83
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React, { useMemo } from 'react';
|
|
2
3
|
import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import { SmartLinkPosition, SmartLinkSize } from '../../../../../constants';
|
|
5
6
|
import AtlaskitIcon from '../../common/atlaskit-icon';
|
|
6
7
|
import ImageIcon from '../../common/image-icon';
|
|
@@ -38,20 +39,20 @@ const getCustomRenderStyles = value => css`
|
|
|
38
39
|
`;
|
|
39
40
|
const renderAtlaskitIcon = (icon, label, testId) => {
|
|
40
41
|
if (icon) {
|
|
41
|
-
return
|
|
42
|
+
return jsx(AtlaskitIcon, {
|
|
42
43
|
icon: icon,
|
|
43
44
|
label: label,
|
|
44
45
|
testId: `${testId}-icon`
|
|
45
46
|
});
|
|
46
47
|
}
|
|
47
48
|
};
|
|
48
|
-
const renderDefaultIcon = (label, testId) =>
|
|
49
|
+
const renderDefaultIcon = (label, testId) => jsx(LinkIcon, {
|
|
49
50
|
label: label,
|
|
50
51
|
testId: `${testId}-default`
|
|
51
52
|
});
|
|
52
53
|
const renderImageIcon = (defaultIcon, url, testId) => {
|
|
53
54
|
if (url) {
|
|
54
|
-
return
|
|
55
|
+
return jsx(ImageIcon, {
|
|
55
56
|
defaultIcon: defaultIcon,
|
|
56
57
|
testId: testId,
|
|
57
58
|
url: url
|
|
@@ -83,7 +84,7 @@ const Icon = ({
|
|
|
83
84
|
const width = getIconWidth(size);
|
|
84
85
|
const styles = getIconStyles(position, width);
|
|
85
86
|
const renderStyles = render ? getCustomRenderStyles(width) : undefined;
|
|
86
|
-
return
|
|
87
|
+
return jsx("div", {
|
|
87
88
|
css: [styles, renderStyles, overrideCss],
|
|
88
89
|
"data-fit-to-content": true,
|
|
89
90
|
"data-smart-element": name,
|