@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';
|
|
@@ -24,9 +26,9 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
24
26
|
onClose = _useModal.onClose;
|
|
25
27
|
var downloadButton = useMemo(function () {
|
|
26
28
|
if (onDownloadButtonClick) {
|
|
27
|
-
return
|
|
28
|
-
content:
|
|
29
|
-
icon:
|
|
29
|
+
return jsx(LinkInfoButton, {
|
|
30
|
+
content: jsx(FormattedMessage, messages.download),
|
|
31
|
+
icon: jsx(DownloadIcon, {
|
|
30
32
|
label: messages.download.defaultMessage
|
|
31
33
|
}),
|
|
32
34
|
onClick: onDownloadButtonClick,
|
|
@@ -36,10 +38,10 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
36
38
|
}, [onDownloadButtonClick, testId]);
|
|
37
39
|
var urlButton = useMemo(function () {
|
|
38
40
|
if (onViewButtonClick) {
|
|
39
|
-
var content = providerName ?
|
|
40
|
-
return
|
|
41
|
+
var content = providerName ? jsx(React.Fragment, null, jsx(FormattedMessage, messages.viewIn), " ", providerName) : jsx(FormattedMessage, messages.viewOriginal);
|
|
42
|
+
return jsx(LinkInfoButton, {
|
|
41
43
|
content: content,
|
|
42
|
-
icon:
|
|
44
|
+
icon: jsx(ShortcutIcon, {
|
|
43
45
|
label: messages.viewOriginal.defaultMessage
|
|
44
46
|
}),
|
|
45
47
|
onClick: onViewButtonClick,
|
|
@@ -50,36 +52,36 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
50
52
|
var sizeButton = useMemo(function () {
|
|
51
53
|
var isFullScreen = size === MAX_MODAL_SIZE;
|
|
52
54
|
var message = isFullScreen ? messages.preview_min_size : messages.preview_max_size;
|
|
53
|
-
var icon = isFullScreen ?
|
|
55
|
+
var icon = isFullScreen ? jsx(VidFullScreenOffIcon, {
|
|
54
56
|
label: message.defaultMessage
|
|
55
|
-
}) :
|
|
57
|
+
}) : jsx(VidFullScreenOnIcon, {
|
|
56
58
|
label: message.defaultMessage
|
|
57
59
|
});
|
|
58
|
-
return
|
|
60
|
+
return jsx("span", {
|
|
59
61
|
className: "smart-link-resize-button"
|
|
60
|
-
},
|
|
61
|
-
content:
|
|
62
|
+
}, jsx(LinkInfoButton, {
|
|
63
|
+
content: jsx(FormattedMessage, message),
|
|
62
64
|
icon: icon,
|
|
63
65
|
onClick: onResizeButtonClick,
|
|
64
66
|
testId: "".concat(testId, "-resize")
|
|
65
67
|
}));
|
|
66
68
|
}, [onResizeButtonClick, size, testId]);
|
|
67
|
-
return
|
|
69
|
+
return jsx("div", {
|
|
68
70
|
css: containerStyles
|
|
69
|
-
}, icon &&
|
|
71
|
+
}, icon && jsx("div", {
|
|
70
72
|
css: iconCss,
|
|
71
73
|
"data-testid": "".concat(testId, "-icon")
|
|
72
|
-
},
|
|
74
|
+
}, jsx(Icon, icon)), jsx("div", {
|
|
73
75
|
css: titleCss
|
|
74
|
-
},
|
|
76
|
+
}, jsx("h3", {
|
|
75
77
|
"data-testid": "".concat(testId, "-title")
|
|
76
|
-
}, title),
|
|
78
|
+
}, title), jsx("span", {
|
|
77
79
|
tabIndex: 0
|
|
78
|
-
})),
|
|
80
|
+
})), jsx("div", {
|
|
79
81
|
css: actionCss
|
|
80
|
-
}, downloadButton, urlButton, sizeButton,
|
|
81
|
-
content:
|
|
82
|
-
icon:
|
|
82
|
+
}, downloadButton, urlButton, sizeButton, jsx(LinkInfoButton, {
|
|
83
|
+
content: jsx(FormattedMessage, messages.preview_close),
|
|
84
|
+
icon: jsx(CrossIcon, {
|
|
83
85
|
label: messages.preview_close.defaultMessage
|
|
84
86
|
}),
|
|
85
87
|
onClick: onClose,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React, { useCallback } from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
6
7
|
import { LoadingButton } from '@atlaskit/button';
|
|
7
8
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
@@ -39,14 +40,14 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
39
40
|
handler();
|
|
40
41
|
};
|
|
41
42
|
}, []);
|
|
42
|
-
return
|
|
43
|
+
return jsx("div", {
|
|
43
44
|
css: [getButtonStyle(size, iconOnly), overrideCss],
|
|
44
45
|
"data-testid": "".concat(testId, "-button-wrapper")
|
|
45
|
-
},
|
|
46
|
+
}, jsx(Tooltip, {
|
|
46
47
|
content: tooltipMessage,
|
|
47
48
|
hideTooltipOnClick: true,
|
|
48
49
|
testId: "".concat(testId, "-tooltip")
|
|
49
|
-
}, getBooleanFF('platform.linking-platform.smart-card.follow-button') ?
|
|
50
|
+
}, getBooleanFF('platform.linking-platform.smart-card.follow-button') ? jsx(LoadingButton, {
|
|
50
51
|
appearance: appearance,
|
|
51
52
|
iconAfter: iconAfter,
|
|
52
53
|
iconBefore: iconBefore,
|
|
@@ -55,7 +56,7 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
55
56
|
onClick: onButtonClick(onClick),
|
|
56
57
|
spacing: sizeToButtonSpacing[size],
|
|
57
58
|
testId: testId
|
|
58
|
-
}, content) :
|
|
59
|
+
}, content) : jsx(Button, {
|
|
59
60
|
appearance: appearance,
|
|
60
61
|
iconAfter: iconAfter,
|
|
61
62
|
iconBefore: iconBefore,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { SmartLinkSize } from '../../../../../../constants';
|
|
6
7
|
import { getIconSizeStyles } from '../../../utils';
|
|
7
8
|
var getIconWidth = function getIconWidth(size) {
|
|
@@ -23,7 +24,7 @@ var ActionIcon = function ActionIcon(_ref) {
|
|
|
23
24
|
testId = _ref.testId,
|
|
24
25
|
icon = _ref.icon,
|
|
25
26
|
isDisabled = _ref.isDisabled;
|
|
26
|
-
return
|
|
27
|
+
return jsx("span", {
|
|
27
28
|
css: getIconStyles(size, isDisabled),
|
|
28
29
|
"data-testid": "".concat(testId, "-icon")
|
|
29
30
|
}, 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';
|
|
@@ -33,7 +35,7 @@ var Action = function Action(_ref) {
|
|
|
33
35
|
if (!onClick) {
|
|
34
36
|
return null;
|
|
35
37
|
}
|
|
36
|
-
var actionIcon = icon &&
|
|
38
|
+
var actionIcon = icon && jsx(ActionIcon, {
|
|
37
39
|
isDisabled: isDisabled,
|
|
38
40
|
icon: icon,
|
|
39
41
|
size: size,
|
|
@@ -42,7 +44,7 @@ var Action = function Action(_ref) {
|
|
|
42
44
|
var iconBefore = icon && iconPosition === 'before' ? actionIcon : undefined;
|
|
43
45
|
var iconAfter = icon && iconPosition === 'after' ? actionIcon : undefined;
|
|
44
46
|
if (asDropDownItem) {
|
|
45
|
-
return
|
|
47
|
+
return jsx(ActionDropdownItem, {
|
|
46
48
|
content: content,
|
|
47
49
|
iconAfter: iconAfter,
|
|
48
50
|
iconBefore: iconBefore,
|
|
@@ -51,7 +53,7 @@ var Action = function Action(_ref) {
|
|
|
51
53
|
testId: testId
|
|
52
54
|
});
|
|
53
55
|
} else {
|
|
54
|
-
return
|
|
56
|
+
return jsx(ActionButton, {
|
|
55
57
|
appearance: appearance,
|
|
56
58
|
content: content,
|
|
57
59
|
iconAfter: iconAfter,
|
package/dist/esm/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js
CHANGED
|
@@ -4,6 +4,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
4
4
|
var _excluded = ["name", "hideContent", "hideIcon", "onClick", "isDisabled"];
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
+
/** @jsx jsx */
|
|
8
|
+
import { jsx } from '@emotion/react';
|
|
7
9
|
import React, { useCallback } from 'react';
|
|
8
10
|
import * as Actions from '../../../actions';
|
|
9
11
|
import { isJSXElementNull } from '../../utils';
|
|
@@ -38,7 +40,7 @@ var ActionGroupItem = function ActionGroupItem(_ref) {
|
|
|
38
40
|
if (hideIcon) {
|
|
39
41
|
actionProps.icon = undefined;
|
|
40
42
|
}
|
|
41
|
-
var action =
|
|
43
|
+
var action = jsx(Action, _extends({
|
|
42
44
|
url: "",
|
|
43
45
|
asDropDownItem: asDropDownItems,
|
|
44
46
|
size: size,
|
|
@@ -4,9 +4,10 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
4
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
5
5
|
var _excluded = ["triggerRef"];
|
|
6
6
|
var _templateObject;
|
|
7
|
+
/** @jsx jsx */
|
|
7
8
|
import { useCallback, useMemo, useState } from 'react';
|
|
8
9
|
import { FormattedMessage } from 'react-intl-next';
|
|
9
|
-
import { css } from '@emotion/react';
|
|
10
|
+
import { css, jsx } from '@emotion/react';
|
|
10
11
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
11
12
|
import Tooltip from '@atlaskit/tooltip';
|
|
12
13
|
import DropdownMenu from '@atlaskit/dropdown-menu';
|
|
@@ -26,7 +27,7 @@ var renderActionItems = function renderActionItems() {
|
|
|
26
27
|
var asDropDownItems = arguments.length > 3 ? arguments[3] : undefined;
|
|
27
28
|
var onActionItemClick = arguments.length > 4 ? arguments[4] : undefined;
|
|
28
29
|
return items.map(function (item, idx) {
|
|
29
|
-
return
|
|
30
|
+
return jsx(ActionGroupItem, {
|
|
30
31
|
item: item,
|
|
31
32
|
key: idx,
|
|
32
33
|
size: size,
|
|
@@ -84,22 +85,22 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
84
85
|
var actionItems = isMoreThenTwoItems ? renderableActionItems.slice(visibleButtonsNum - 1) : [];
|
|
85
86
|
if (actionItems.length > 0) {
|
|
86
87
|
var spacing = sizeToButtonSpacing[size];
|
|
87
|
-
var moreIcon =
|
|
88
|
+
var moreIcon = jsx(MoreIcon, {
|
|
88
89
|
label: "more"
|
|
89
90
|
});
|
|
90
|
-
var formatMessage =
|
|
91
|
-
return
|
|
91
|
+
var formatMessage = jsx(FormattedMessage, messages.more_actions);
|
|
92
|
+
return jsx(DropdownMenu, {
|
|
92
93
|
isOpen: isOpen,
|
|
93
94
|
onOpenChange: onOpenChange,
|
|
94
95
|
trigger: function trigger(_ref2) {
|
|
95
96
|
var triggerRef = _ref2.triggerRef,
|
|
96
97
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
97
|
-
return
|
|
98
|
+
return jsx(Tooltip, {
|
|
98
99
|
content: formatMessage,
|
|
99
100
|
hideTooltipOnClick: true,
|
|
100
101
|
testId: "action-group-more-button-tooltip",
|
|
101
102
|
tag: "span"
|
|
102
|
-
},
|
|
103
|
+
}, jsx(Button, _extends({}, props, {
|
|
103
104
|
spacing: spacing,
|
|
104
105
|
testId: "action-group-more-button",
|
|
105
106
|
iconBefore: moreIcon,
|
|
@@ -112,10 +113,10 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
112
113
|
}
|
|
113
114
|
return null;
|
|
114
115
|
}, [appearance, isMoreThenTwoItems, isOpen, onActionItemClick, onOpenChange, renderableActionItems, size, ui === null || ui === void 0 ? void 0 : ui.zIndex, visibleButtonsNum]);
|
|
115
|
-
return renderableActionItems.length > 0 ?
|
|
116
|
+
return renderableActionItems.length > 0 ? jsx("div", {
|
|
116
117
|
css: styles,
|
|
117
118
|
className: "actions-button-group",
|
|
118
119
|
"data-action-open": isOpen
|
|
119
|
-
},
|
|
120
|
+
}, jsx(ButtonGroup, null, actionButtons, moreActionDropdown)) : null;
|
|
120
121
|
};
|
|
121
122
|
export default ActionGroup;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React, { useEffect } from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { ElementName, SmartLinkDirection, SmartLinkSize } from '../../../../../constants';
|
|
6
7
|
import { getBaseStyles, getGapSize, highlightRemoveStyles, renderChildren } from '../utils';
|
|
7
8
|
var getBlockStyles = function getBlockStyles(direction, size) {
|
|
@@ -30,7 +31,7 @@ var Block = function Block(_ref) {
|
|
|
30
31
|
useEffect(function () {
|
|
31
32
|
onRender && onRender();
|
|
32
33
|
}, [onRender]);
|
|
33
|
-
return
|
|
34
|
+
return jsx("div", {
|
|
34
35
|
css: [getBlockStyles(direction, size), overrideCss],
|
|
35
36
|
"data-smart-block": true,
|
|
36
37
|
"data-testid": testId,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkPosition, SmartLinkSize, SmartLinkWidth } from '../../../../../constants';
|
|
6
7
|
import { getBaseStyles, getGapSize, renderChildren } from '../utils';
|
|
7
8
|
import { getMaxLineHeight, getTruncateStyles } from '../../utils';
|
|
@@ -51,7 +52,7 @@ var ElementGroup = function ElementGroup(_ref) {
|
|
|
51
52
|
width = _ref$width === void 0 ? SmartLinkWidth.FitToContent : _ref$width,
|
|
52
53
|
_ref$position = _ref.position,
|
|
53
54
|
position = _ref$position === void 0 ? SmartLinkPosition.Center : _ref$position;
|
|
54
|
-
return
|
|
55
|
+
return jsx("div", {
|
|
55
56
|
css: [getElementGroupStyles(direction, size, align, width, position), overrideCss],
|
|
56
57
|
"data-smart-element-group": true,
|
|
57
58
|
"data-testid": testId
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["status", "testId", "overrideUrl"];
|
|
4
|
+
/** @jsx jsx */
|
|
4
5
|
import React from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
5
7
|
import { SmartLinkStatus } from '../../../../../constants';
|
|
6
8
|
import PreviewBlockResolvedView from './resolved';
|
|
7
9
|
|
|
@@ -18,7 +20,7 @@ var PreviewBlock = function PreviewBlock(_ref) {
|
|
|
18
20
|
testId = _ref$testId === void 0 ? 'smart-block-preview' : _ref$testId,
|
|
19
21
|
overrideUrl = _ref.overrideUrl,
|
|
20
22
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
-
return
|
|
23
|
+
return jsx(PreviewBlockResolvedView, _extends({}, blockProps, {
|
|
22
24
|
testId: testId,
|
|
23
25
|
overrideUrl: overrideUrl
|
|
24
26
|
}));
|
|
@@ -4,8 +4,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
4
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
5
5
|
var _excluded = ["ignoreContainerPadding", "onError", "overrideCss", "placement", "testId", "overrideUrl"];
|
|
6
6
|
var _templateObject, _templateObject2, _templateObject3;
|
|
7
|
+
/** @jsx jsx */
|
|
7
8
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
8
|
-
import { css } from '@emotion/react';
|
|
9
|
+
import { css, jsx } from '@emotion/react';
|
|
9
10
|
import { MediaPlacement } from '../../../../../../constants';
|
|
10
11
|
import Block from '../../block';
|
|
11
12
|
import { Preview } from '../../../elements';
|
|
@@ -68,10 +69,10 @@ var PreviewBlockResolvedView = function PreviewBlockResolvedView(_ref) {
|
|
|
68
69
|
onError();
|
|
69
70
|
}
|
|
70
71
|
}, [onError]);
|
|
71
|
-
return
|
|
72
|
+
return jsx(Block, _extends({}, blockProps, {
|
|
72
73
|
overrideCss: styles,
|
|
73
74
|
testId: "".concat(testId, "-resolved-view")
|
|
74
|
-
}),
|
|
75
|
+
}), jsx(Preview, {
|
|
75
76
|
onError: handleOnError,
|
|
76
77
|
onLoad: handleOnLoad,
|
|
77
78
|
overrideUrl: overrideUrl
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.26.1 */
|
|
2
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
3
|
var _templateObject;
|
|
5
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
6
4
|
import React, { useCallback, useState } from 'react';
|
|
7
5
|
import { useIntl } from 'react-intl-next';
|
|
8
6
|
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';
|
|
@@ -3,9 +3,10 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
4
|
var _excluded = ["actionGroup", "retry", "position", "testId", "title", "hideIcon"];
|
|
5
5
|
var _templateObject, _templateObject2;
|
|
6
|
+
/** @jsx jsx */
|
|
6
7
|
import React from 'react';
|
|
7
8
|
import { FormattedMessage } from 'react-intl-next';
|
|
8
|
-
import { css } from '@emotion/react';
|
|
9
|
+
import { css, jsx } from '@emotion/react';
|
|
9
10
|
import { LinkIcon } from '../../../elements';
|
|
10
11
|
import Block from '../../block';
|
|
11
12
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize } from '../../../../../../constants';
|
|
@@ -40,20 +41,20 @@ var TitleBlockErroredView = function TitleBlockErroredView(_ref) {
|
|
|
40
41
|
var _blockProps$size = blockProps.size,
|
|
41
42
|
size = _blockProps$size === void 0 ? SmartLinkSize.Medium : _blockProps$size;
|
|
42
43
|
var hasAction = onClick !== undefined;
|
|
43
|
-
return
|
|
44
|
+
return jsx(Block, _extends({}, blockProps, {
|
|
44
45
|
testId: "".concat(testId, "-errored-view")
|
|
45
|
-
}), !hideIcon &&
|
|
46
|
+
}), !hideIcon && jsx(LinkIcon, {
|
|
46
47
|
position: position
|
|
47
|
-
}), title, descriptor &&
|
|
48
|
+
}), title, descriptor && jsx(ElementGroup, {
|
|
48
49
|
direction: SmartLinkDirection.Horizontal,
|
|
49
50
|
align: SmartLinkAlignment.Right
|
|
50
|
-
},
|
|
51
|
+
}, jsx("span", {
|
|
51
52
|
className: hasAction ? 'has-action' : '',
|
|
52
53
|
css: getMessageStyles(size, hasAction),
|
|
53
54
|
onClick: onClick,
|
|
54
55
|
"data-testid": "".concat(testId, "-errored-view-message"),
|
|
55
56
|
tabIndex: hasAction ? 0 : -1
|
|
56
|
-
},
|
|
57
|
+
}, jsx(FormattedMessage, _extends({}, descriptor, {
|
|
57
58
|
values: values
|
|
58
59
|
})))), actionGroup);
|
|
59
60
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["actionGroup", "testId", "title", "hideIcon"];
|
|
4
|
+
/** @jsx jsx */
|
|
4
5
|
import React from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
5
7
|
import Block from '../../block';
|
|
6
8
|
import { SmartLinkSize } from '../../../../../../constants';
|
|
7
9
|
import LoadingSkeleton from '../../../common/loading-skeleton';
|
|
@@ -23,12 +25,12 @@ var TitleBlockResolvingView = function TitleBlockResolvingView(_ref) {
|
|
|
23
25
|
size = _blockProps$size === void 0 ? SmartLinkSize.Medium : _blockProps$size;
|
|
24
26
|
var iconWidth = getIconWidth(size);
|
|
25
27
|
var iconStyles = getIconSizeStyles(iconWidth);
|
|
26
|
-
return
|
|
28
|
+
return jsx(Block, _extends({}, blockProps, {
|
|
27
29
|
testId: "".concat(testId, "-resolving-view")
|
|
28
|
-
}), !hideIcon &&
|
|
30
|
+
}), !hideIcon && jsx("span", {
|
|
29
31
|
css: iconStyles,
|
|
30
32
|
"data-testid": "".concat(testId, "-icon")
|
|
31
|
-
},
|
|
33
|
+
}, jsx(LoadingSkeleton, {
|
|
32
34
|
testId: "".concat(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
|
var ImageIcon = function ImageIcon(_ref) {
|
|
@@ -7,12 +9,12 @@ var ImageIcon = function ImageIcon(_ref) {
|
|
|
7
9
|
url = _ref.url,
|
|
8
10
|
onError = _ref.onError,
|
|
9
11
|
onLoad = _ref.onLoad;
|
|
10
|
-
return
|
|
12
|
+
return jsx(ImageLoader, {
|
|
11
13
|
src: url,
|
|
12
|
-
loading:
|
|
14
|
+
loading: jsx(LoadingSkeleton, {
|
|
13
15
|
testId: "".concat(testId, "-loading")
|
|
14
16
|
}),
|
|
15
|
-
loaded:
|
|
17
|
+
loaded: jsx("img", {
|
|
16
18
|
src: url,
|
|
17
19
|
"data-testid": "".concat(testId, "-image")
|
|
18
20
|
}),
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React from 'react';
|
|
4
|
-
import { css, keyframes } from '@emotion/react';
|
|
5
|
+
import { css, jsx, keyframes } from '@emotion/react';
|
|
5
6
|
var LoadingSkeleton = function LoadingSkeleton(_ref) {
|
|
6
7
|
var testId = _ref.testId,
|
|
7
8
|
width = _ref.width,
|
|
8
9
|
height = _ref.height;
|
|
9
10
|
var animationNameStyles = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% { background-position: 50% 0; }\n 100% { background-position: -50% 0; }\n "])));
|
|
10
11
|
var styles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: ", "rem;\n height: ", "rem;\n border-radius: 2px;\n user-select: none;\n background: ", ";\n background-image: linear-gradient(\n to right,\n transparent 0%,\n ", " 20%,\n transparent 40%,\n transparent 100%\n );\n background-repeat: no-repeat;\n background-size: 280% 100%;\n display: inline-block;\n\n animation-duration: 1s;\n animation-fill-mode: forwards;\n animation-iteration-count: infinite;\n animation-name: ", ";\n animation-timing-function: linear;\n "])), width, height, "var(--ds-skeleton-subtle, #f6f7f8)", "var(--ds-skeleton, #edeef1)", animationNameStyles);
|
|
11
|
-
return
|
|
12
|
+
return jsx("span", {
|
|
12
13
|
css: styles,
|
|
13
14
|
"data-testid": testId
|
|
14
15
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React, { useContext } from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { MediaPlacement, SmartLinkSize, SmartLinkTheme } from '../../../../constants';
|
|
6
7
|
import { isFlexibleUiBlock, isFlexibleUiPreviewBlock, isFlexibleUiTitleBlock } from '../../../../utils/flexible';
|
|
7
8
|
import { tokens } from '../../../../utils/token';
|
|
@@ -108,7 +109,7 @@ var getLayeredLink = function getLayeredLink(testId, context, children, onClick)
|
|
|
108
109
|
var _ref2 = getTitleBlockProps(children) || {},
|
|
109
110
|
target = _ref2.anchorTarget,
|
|
110
111
|
text = _ref2.text;
|
|
111
|
-
return
|
|
112
|
+
return jsx(LayeredLink, {
|
|
112
113
|
onClick: onClick,
|
|
113
114
|
target: target,
|
|
114
115
|
testId: testId,
|
|
@@ -158,13 +159,13 @@ var Container = function Container(_ref3) {
|
|
|
158
159
|
// `retry` object contains action that can be performed on
|
|
159
160
|
// unresolved link (unauthorized, forbidden, not found, etc.)
|
|
160
161
|
var canShowAuthTooltip = showAuthTooltip && status === 'unauthorized' && retry !== undefined;
|
|
161
|
-
var container =
|
|
162
|
+
var container = jsx("div", {
|
|
162
163
|
css: getContainerStyles(size, hideBackground, hideElevation, hidePadding, clickableContainer, childrenOptions),
|
|
163
164
|
"data-smart-link-container": true,
|
|
164
165
|
"data-testid": testId
|
|
165
166
|
}, clickableContainer ? getLayeredLink(testId, context, children, onClick) : null, renderChildren(children, size, theme, status, retry, onClick));
|
|
166
167
|
if (context !== null && context !== void 0 && context.url && (canShowHoverPreview || canShowAuthTooltip)) {
|
|
167
|
-
return
|
|
168
|
+
return jsx(HoverCardControl, {
|
|
168
169
|
hideHoverCardPreviewButton: hideHoverCardPreviewButton,
|
|
169
170
|
isHoverPreview: canShowHoverPreview,
|
|
170
171
|
isAuthTooltip: canShowAuthTooltip,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { jsx, css } from '@emotion/react';
|
|
5
6
|
import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
|
|
6
7
|
var styles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n // Stretch the invisible link over the whole of the post.\n // Hide the link\u2019s text.\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: hidden;\n text-indent: 100%;\n white-space: nowrap;\n\n // Needs a heightened specificity to trump other anchor.\n // Stack it under all other links in the post text.\n a&.layered-link {\n position: absolute;\n z-index: 0;\n }\n\n // When hovering over the layered link, any hidden action buttons inside\n // the Container should become visible.\n // As actions resides inside blocks and layered link is expected to be\n // on the same level of blocks. That makes the blocks, e.g. TitleBlock,\n // its sibling. Using general sibling combinator here to apply styling to\n // all the siblings of layered link.\n // The general sibling combinator (~) separates two selectors and matches all\n // iterations of the second element, that are following the first element\n // (though not necessarily immediately), and are children of the same parent\n // element.\n &:hover ~ * {\n .actions-button-group {\n opacity: 1;\n }\n }\n"])));
|
|
7
8
|
|
|
@@ -17,7 +18,7 @@ var LayeredLink = function LayeredLink(_ref) {
|
|
|
17
18
|
text = _ref.text,
|
|
18
19
|
url = _ref.url;
|
|
19
20
|
var onMouseDown = useMouseDownEvent();
|
|
20
|
-
return
|
|
21
|
+
return jsx("a", {
|
|
21
22
|
className: "layered-link",
|
|
22
23
|
css: styles,
|
|
23
24
|
"data-testid": "".concat(testId, "-layered-link"),
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React from 'react';
|
|
4
5
|
import AKBadge from '@atlaskit/badge';
|
|
5
|
-
import { css } from '@emotion/react';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
6
7
|
var badgeStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n display: inline-flex;\n"])));
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -20,12 +21,12 @@ var AtlaskitBadge = function AtlaskitBadge(_ref) {
|
|
|
20
21
|
if (!value) {
|
|
21
22
|
return null;
|
|
22
23
|
}
|
|
23
|
-
return
|
|
24
|
+
return jsx("span", {
|
|
24
25
|
css: [badgeStyles, overrideCss],
|
|
25
26
|
"data-fit-to-content": true,
|
|
26
27
|
"data-smart-element": name,
|
|
27
28
|
"data-smart-element-atlaskit-badge": true,
|
|
28
29
|
"data-testid": testId
|
|
29
|
-
},
|
|
30
|
+
}, jsx(AKBadge, null, value));
|
|
30
31
|
};
|
|
31
32
|
export default AtlaskitBadge;
|
|
@@ -3,8 +3,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject, _templateObject2;
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
/** @jsx jsx */
|
|
6
7
|
import React, { useMemo } from 'react';
|
|
7
|
-
import { css } from '@emotion/react';
|
|
8
|
+
import { css, jsx } from '@emotion/react';
|
|
8
9
|
import AtlaskitAvatarGroup from '@atlaskit/avatar-group';
|
|
9
10
|
import { SmartLinkSize } from '../../../../../constants';
|
|
10
11
|
import { messages } from '../../../../../messages';
|
|
@@ -86,13 +87,13 @@ var AvatarGroup = function AvatarGroup(_ref) {
|
|
|
86
87
|
if (!data.length) {
|
|
87
88
|
return null;
|
|
88
89
|
}
|
|
89
|
-
return
|
|
90
|
+
return jsx("span", {
|
|
90
91
|
css: [getStyles(size), overrideCss],
|
|
91
92
|
"data-fit-to-content": true,
|
|
92
93
|
"data-smart-element": name,
|
|
93
94
|
"data-smart-element-avatar-group": true,
|
|
94
95
|
"data-testid": testId
|
|
95
|
-
},
|
|
96
|
+
}, jsx(AtlaskitAvatarGroup, {
|
|
96
97
|
maxCount: maxCount,
|
|
97
98
|
appearance: "stack",
|
|
98
99
|
size: "small",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _messageMapper;
|
|
4
|
+
/** @jsx jsx */
|
|
4
5
|
import React from 'react';
|
|
5
|
-
import { css } from '@emotion/react';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
6
7
|
import { tokens } from '../../../../../utils/token';
|
|
7
8
|
import { getFormattedMessage, getIconSizeStyles } from '../../utils';
|
|
8
9
|
import { IconType } from '../../../../../constants';
|
|
@@ -25,7 +26,7 @@ var getFormattedMessageFromIcon = function getFormattedMessageFromIcon(icon) {
|
|
|
25
26
|
};
|
|
26
27
|
var renderAtlaskitIcon = function renderAtlaskitIcon(icon, testId) {
|
|
27
28
|
if (icon) {
|
|
28
|
-
return
|
|
29
|
+
return jsx(AtlaskitIcon, {
|
|
29
30
|
icon: icon,
|
|
30
31
|
label: icon,
|
|
31
32
|
testId: "".concat(testId, "-icon")
|
|
@@ -34,7 +35,7 @@ var renderAtlaskitIcon = function renderAtlaskitIcon(icon, testId) {
|
|
|
34
35
|
};
|
|
35
36
|
var renderImageIcon = function renderImageIcon(url, testId) {
|
|
36
37
|
if (url) {
|
|
37
|
-
return
|
|
38
|
+
return jsx(ImageIcon, {
|
|
38
39
|
testId: testId,
|
|
39
40
|
url: url
|
|
40
41
|
});
|
|
@@ -67,15 +68,15 @@ var Badge = function Badge(_ref) {
|
|
|
67
68
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
68
69
|
return null;
|
|
69
70
|
}
|
|
70
|
-
return
|
|
71
|
+
return jsx("span", {
|
|
71
72
|
css: [badgeStyles, overrideCss],
|
|
72
73
|
"data-fit-to-content": true,
|
|
73
74
|
"data-smart-element": name,
|
|
74
75
|
"data-smart-element-badge": true,
|
|
75
76
|
"data-testid": testId
|
|
76
|
-
},
|
|
77
|
+
}, jsx("span", {
|
|
77
78
|
css: iconStyles
|
|
78
|
-
}, badgeIcon),
|
|
79
|
+
}, badgeIcon), jsx("span", {
|
|
79
80
|
css: labelStyles,
|
|
80
81
|
"data-testid": "".concat(testId, "-label")
|
|
81
82
|
}, formattedMessageOrLabel));
|