@atlaskit/smart-card 18.0.13 → 18.0.16
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 +28 -0
- package/dist/cjs/extractors/common/context/extractProvider.js +14 -4
- package/dist/cjs/extractors/common/detail/extractCommentCount.js +3 -1
- package/dist/cjs/extractors/common/detail/extractProgrammingLanguage.js +3 -1
- package/dist/cjs/extractors/common/detail/extractSubscriberCount.js +3 -1
- package/dist/cjs/extractors/common/primitives/extractTitleTextColor.js +3 -1
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +9 -0
- package/dist/cjs/state/flexible-ui-context/index.js +4 -0
- package/dist/cjs/utils/analytics/analytics.js +52 -2
- package/dist/cjs/utils/analytics/index.js +18 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/BlockCard/components/Frame.js +10 -7
- package/dist/cjs/view/BlockCard/components/Link.js +3 -1
- package/dist/cjs/view/BlockCard/components/Provider.js +3 -1
- package/dist/cjs/view/BlockCard/views/ErroredView.js +3 -1
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +3 -1
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +3 -1
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +4 -2
- package/dist/cjs/view/CardWithUrl/component.js +4 -2
- package/dist/cjs/view/CardWithUrl/loader.js +4 -2
- package/dist/cjs/view/EmbedCard/components/styled.js +15 -13
- package/dist/cjs/view/EmbedCard/views/ErroredView.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +26 -4
- package/dist/cjs/view/FlexibleCard/components/actions/index.js +18 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +6 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +6 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +39 -19
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +92 -17
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +45 -9
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -12
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +8 -2
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/container/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +12 -1
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +18 -3
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +9 -1
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +9 -1
- package/dist/cjs/view/FlexibleCard/components/elements/index.js +96 -0
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +10 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +11 -3
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +12 -6
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +7 -3
- package/dist/cjs/view/FlexibleCard/index.js +6 -0
- package/dist/cjs/view/HoverCard/index.js +48 -10
- package/dist/cjs/view/HoverCard/styled.js +3 -1
- package/dist/cjs/view/InlineCard/ErroredView/index.js +3 -1
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +4 -2
- package/dist/cjs/view/InlineCard/Frame/styled.js +16 -13
- package/dist/cjs/view/InlineCard/Icon.js +3 -1
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +4 -2
- package/dist/cjs/view/InlineCard/styled.js +6 -4
- package/dist/cjs/view/common/Byline.js +3 -1
- package/dist/cjs/view/common/Metadata.js +3 -1
- package/dist/cjs/view/common/ModalHeader.js +4 -2
- package/dist/es2019/extractors/common/context/extractProvider.js +13 -4
- package/dist/es2019/extractors/common/detail/extractCommentCount.js +2 -1
- package/dist/es2019/extractors/common/detail/extractProgrammingLanguage.js +2 -1
- package/dist/es2019/extractors/common/detail/extractSubscriberCount.js +2 -1
- package/dist/es2019/extractors/common/primitives/extractTitleTextColor.js +2 -1
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +7 -2
- package/dist/es2019/state/flexible-ui-context/index.js +5 -0
- package/dist/es2019/utils/analytics/analytics.js +35 -0
- package/dist/es2019/utils/analytics/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/BlockCard/components/Frame.js +9 -7
- package/dist/es2019/view/BlockCard/components/Link.js +2 -1
- package/dist/es2019/view/BlockCard/components/Provider.js +2 -1
- package/dist/es2019/view/BlockCard/views/ErroredView.js +2 -1
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +2 -1
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +2 -1
- package/dist/es2019/view/BlockCard/views/ResolvingView.js +3 -2
- package/dist/es2019/view/CardWithUrl/component.js +4 -2
- package/dist/es2019/view/CardWithUrl/loader.js +4 -2
- package/dist/es2019/view/EmbedCard/components/styled.js +15 -15
- package/dist/es2019/view/EmbedCard/views/ErroredView.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +37 -4
- package/dist/es2019/view/FlexibleCard/components/actions/index.js +18 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +6 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +9 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +8 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +6 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +31 -15
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +77 -15
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +35 -8
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +20 -11
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +8 -3
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +7 -6
- package/dist/es2019/view/FlexibleCard/components/container/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +12 -1
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +18 -3
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +9 -1
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +9 -1
- package/dist/es2019/view/FlexibleCard/components/elements/index.js +96 -0
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +10 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +11 -3
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +8 -1
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +11 -4
- package/dist/es2019/view/FlexibleCard/components/elements/utils.js +5 -2
- package/dist/es2019/view/FlexibleCard/index.js +6 -0
- package/dist/es2019/view/HoverCard/index.js +40 -10
- package/dist/es2019/view/HoverCard/styled.js +6 -1
- package/dist/es2019/view/InlineCard/ErroredView/index.js +2 -1
- package/dist/es2019/view/InlineCard/ForbiddenView/index.js +3 -2
- package/dist/es2019/view/InlineCard/Frame/styled.js +15 -12
- package/dist/es2019/view/InlineCard/Icon.js +7 -6
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +3 -2
- package/dist/es2019/view/InlineCard/styled.js +5 -4
- package/dist/es2019/view/common/Byline.js +2 -1
- package/dist/es2019/view/common/Metadata.js +2 -1
- package/dist/es2019/view/common/ModalHeader.js +3 -2
- package/dist/esm/extractors/common/context/extractProvider.js +13 -4
- package/dist/esm/extractors/common/detail/extractCommentCount.js +2 -1
- package/dist/esm/extractors/common/detail/extractProgrammingLanguage.js +2 -1
- package/dist/esm/extractors/common/detail/extractSubscriberCount.js +2 -1
- package/dist/esm/extractors/common/primitives/extractTitleTextColor.js +2 -1
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +10 -1
- package/dist/esm/state/flexible-ui-context/index.js +5 -0
- package/dist/esm/utils/analytics/analytics.js +41 -0
- package/dist/esm/utils/analytics/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/BlockCard/components/Frame.js +9 -7
- package/dist/esm/view/BlockCard/components/Link.js +2 -1
- package/dist/esm/view/BlockCard/components/Provider.js +2 -1
- package/dist/esm/view/BlockCard/views/ErroredView.js +2 -1
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +2 -1
- package/dist/esm/view/BlockCard/views/NotFoundView.js +2 -1
- package/dist/esm/view/BlockCard/views/ResolvingView.js +3 -2
- package/dist/esm/view/CardWithUrl/component.js +4 -2
- package/dist/esm/view/CardWithUrl/loader.js +4 -2
- package/dist/esm/view/EmbedCard/components/styled.js +14 -13
- package/dist/esm/view/EmbedCard/views/ErroredView.js +2 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +25 -4
- package/dist/esm/view/FlexibleCard/components/actions/index.js +18 -2
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +6 -0
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +9 -2
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +8 -2
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +6 -0
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -2
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +33 -16
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +79 -17
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +39 -8
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +22 -11
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +8 -3
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/container/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +12 -1
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +18 -3
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +9 -1
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +9 -1
- package/dist/esm/view/FlexibleCard/components/elements/index.js +96 -0
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +10 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +11 -3
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +9 -2
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +12 -6
- package/dist/esm/view/FlexibleCard/components/elements/utils.js +5 -3
- package/dist/esm/view/FlexibleCard/index.js +6 -0
- package/dist/esm/view/HoverCard/index.js +42 -10
- package/dist/esm/view/HoverCard/styled.js +2 -1
- package/dist/esm/view/InlineCard/ErroredView/index.js +2 -1
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +3 -2
- package/dist/esm/view/InlineCard/Frame/styled.js +16 -13
- package/dist/esm/view/InlineCard/Icon.js +2 -1
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +3 -2
- package/dist/esm/view/InlineCard/styled.js +5 -4
- package/dist/esm/view/common/Byline.js +2 -1
- package/dist/esm/view/common/Metadata.js +2 -1
- package/dist/esm/view/common/ModalHeader.js +3 -2
- package/dist/types/client/errors.d.ts +3 -2
- package/dist/types/extractors/block/index.d.ts +2 -2
- package/dist/types/extractors/common/__mocks__/jsonld.d.ts +46 -66
- package/dist/types/extractors/common/actions/extractPreviewAction.d.ts +1 -1
- package/dist/types/extractors/common/title-prefix/extractTitlePrefix.d.ts +2 -1
- package/dist/types/extractors/embed/index.d.ts +1 -1
- package/dist/types/extractors/flexible/icon/extract-url-icon.d.ts +1 -1
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +4 -0
- package/dist/types/state/flexible-ui-context/index.d.ts +4 -0
- package/dist/types/state/flexible-ui-context/types.d.ts +102 -0
- package/dist/types/state/hooks/useSmartLink.d.ts +3 -0
- package/dist/types/utils/analytics/analytics.d.ts +5 -1
- package/dist/types/utils/analytics/index.d.ts +1 -1
- package/dist/types/utils/types.d.ts +2 -2
- package/dist/types/view/BlockCard/utils/handlers.d.ts +1 -1
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +1 -0
- package/dist/types/view/CardWithUrl/component.d.ts +1 -1
- package/dist/types/view/CardWithUrl/types.d.ts +1 -0
- package/dist/types/view/EmbedCard/components/styled.d.ts +9 -9
- package/dist/types/view/FlexibleCard/components/actions/action/index.d.ts +8 -0
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +4 -2
- package/dist/types/view/FlexibleCard/components/actions/index.d.ts +15 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-group/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-group/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/block/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/element-group/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/element-group/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/footer-block/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/metadata-block/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +9 -2
- package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +11 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +7 -3
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolving/index.d.ts +8 -2
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +10 -1
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +7 -5
- package/dist/types/view/FlexibleCard/components/blocks/utils.d.ts +2 -1
- package/dist/types/view/FlexibleCard/components/container/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/container/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/avatar-group/index.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/elements/badge/index.d.ts +13 -0
- package/dist/types/view/FlexibleCard/components/elements/date-time/index.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/elements/icon/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/icon/types.d.ts +5 -1
- package/dist/types/view/FlexibleCard/components/elements/index.d.ts +77 -0
- package/dist/types/view/FlexibleCard/components/elements/link/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/lozenge/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/media/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/text/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/text/types.d.ts +1 -2
- package/dist/types/view/FlexibleCard/components/elements/types.d.ts +2 -0
- package/dist/types/view/FlexibleCard/index.d.ts +6 -0
- package/dist/types/view/HoverCard/index.d.ts +3 -2
- package/dist/types/view/HoverCard/types.d.ts +5 -2
- package/dist/types/view/InlineCard/Icon.d.ts +3 -3
- package/dist/types/view/InlineCard/IconAndTitleLayout/styled.d.ts +9 -9
- package/dist/types/view/InlineCard/ResolvingView/styled.d.ts +3 -3
- package/dist/types/view/InlineCard/styled.d.ts +4 -4
- package/package.json +9 -4
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/utils.js +0 -105
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/utils.js +0 -71
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/utils.js +0 -76
- package/dist/types/view/FlexibleCard/components/blocks/title-block/utils.d.ts +0 -11
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
-
import { B100, B400, B50, N20 } from '@atlaskit/theme/colors';
|
|
2
|
+
import { B100, B400, B50, DN40A, DN50A, N20, N40A, N50A } from '@atlaskit/theme/colors';
|
|
3
3
|
import { borderRadius as akBorderRadius } from '@atlaskit/theme/constants';
|
|
4
|
-
import { e100 } from '@atlaskit/theme/elevation';
|
|
5
4
|
import { themed } from '@atlaskit/theme/components';
|
|
5
|
+
import { token } from '@atlaskit/tokens';
|
|
6
6
|
import { TitleWrapperClassName } from '../IconAndTitleLayout/styled';
|
|
7
7
|
const BACKGROUND_COLOR_DARK = '#262B31';
|
|
8
8
|
const selected = `
|
|
9
9
|
cursor: pointer;
|
|
10
|
-
box-shadow: 0 0 0 2px ${B100};
|
|
10
|
+
box-shadow: 0 0 0 2px ${token('color.border.selected', B100)};
|
|
11
11
|
outline: none;
|
|
12
12
|
user-select: none;
|
|
13
13
|
&, :hover, :focus, :active {
|
|
@@ -23,15 +23,15 @@ const isInteractive = ({
|
|
|
23
23
|
cursor: pointer;
|
|
24
24
|
:hover {
|
|
25
25
|
background-color: ${themed({
|
|
26
|
-
light: N20,
|
|
27
|
-
dark: BACKGROUND_COLOR_DARK
|
|
26
|
+
light: token('color.background.neutral.subtle.hovered', N20),
|
|
27
|
+
dark: token('color.background.neutral.subtle.hovered', BACKGROUND_COLOR_DARK)
|
|
28
28
|
})};
|
|
29
29
|
text-decoration: none;
|
|
30
30
|
}
|
|
31
31
|
:active {
|
|
32
32
|
background-color: ${themed({
|
|
33
|
-
light: B50,
|
|
34
|
-
dark: BACKGROUND_COLOR_DARK
|
|
33
|
+
light: token('color.background.selected', B50),
|
|
34
|
+
dark: token('color.background.selected', BACKGROUND_COLOR_DARK)
|
|
35
35
|
})};
|
|
36
36
|
text-decoration: none;
|
|
37
37
|
}
|
|
@@ -86,14 +86,17 @@ export const Wrapper = styled.a`
|
|
|
86
86
|
box-decoration-break: clone;
|
|
87
87
|
border-radius: ${akBorderRadius()}px;
|
|
88
88
|
color: ${themed({
|
|
89
|
-
light: B400,
|
|
90
|
-
dark: '#4794FF'
|
|
89
|
+
light: token('color.link', B400),
|
|
90
|
+
dark: token('color.link', '#4794FF')
|
|
91
91
|
})};
|
|
92
92
|
background-color: ${props => props.withoutBackground ? '' : themed({
|
|
93
|
-
light: 'white',
|
|
94
|
-
dark: BACKGROUND_COLOR_DARK
|
|
93
|
+
light: token('elevation.surface.raised', 'white'),
|
|
94
|
+
dark: token('elevation.surface.raised', 'BACKGROUND_COLOR_DARK')
|
|
95
95
|
})};
|
|
96
|
-
${props => props.withoutBackground ? '' :
|
|
96
|
+
${props => props.withoutBackground ? '' : themed({
|
|
97
|
+
light: `box-shadow: ${token('elevation.shadow.raised', `0 1px 1px ${N50A}, 0 0 1px 1px ${N40A}`)};`,
|
|
98
|
+
dark: `box-shadow: ${token('elevation.shadow.raised', `0 1px 1px ${DN50A}, 0 0 1px 1px ${DN40A}`)};`
|
|
99
|
+
})}
|
|
97
100
|
${props => isInteractive(props)}
|
|
98
101
|
${props => isSelected(props)};
|
|
99
102
|
${props => withoutHover(props)}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
import { keyframes } from '@emotion/core';
|
|
3
|
+
import { token } from '@atlaskit/tokens';
|
|
3
4
|
const placeholderShimmer = keyframes`
|
|
4
5
|
0% {
|
|
5
6
|
background-position: -20px 0;
|
|
@@ -41,14 +42,14 @@ export const Shimmer = styled.span`
|
|
|
41
42
|
top: 50%;
|
|
42
43
|
left: 50%;
|
|
43
44
|
transform: translate(-50%, -50%);
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
background: ${token('color.skeleton.subtle', '#f6f7f8')};
|
|
46
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4236
|
|
46
47
|
background-image: linear-gradient(
|
|
47
48
|
to right,
|
|
48
|
-
#f6f7f8 0%,
|
|
49
|
-
#edeef1 20%,
|
|
50
|
-
#f6f7f8 40%,
|
|
51
|
-
#f6f7f8
|
|
49
|
+
${token('color.skeleton.subtle', '#f6f7f8')} 0%,
|
|
50
|
+
${token('color.skeleton', '#edeef1')} 20%,
|
|
51
|
+
${token('color.skeleton.subtle', '#f6f7f8')} 40%,
|
|
52
|
+
${token('color.skeleton.subtle', '#f6f7f8')}100%
|
|
52
53
|
);
|
|
53
54
|
background-repeat: no-repeat;
|
|
54
55
|
background-size: 40px 14px;
|
|
@@ -2,6 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
3
3
|
import LockIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
4
4
|
import { N500, R400 } from '@atlaskit/theme/colors';
|
|
5
|
+
import { token } from '@atlaskit/tokens';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
7
8
|
import { messages } from '@atlaskit/media-ui/messages';
|
|
@@ -12,7 +13,7 @@ import { IconStyledButton, LinkAppearance } from '../styled';
|
|
|
12
13
|
const FallbackUnauthorizedIcon = /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
|
|
13
14
|
label: "error",
|
|
14
15
|
size: "small",
|
|
15
|
-
primaryColor: R400
|
|
16
|
+
primaryColor: token('color.icon.danger', R400)
|
|
16
17
|
}));
|
|
17
18
|
export class InlineCardUnauthorizedView extends React.Component {
|
|
18
19
|
constructor(...args) {
|
|
@@ -59,7 +60,7 @@ export class InlineCardUnauthorizedView extends React.Component {
|
|
|
59
60
|
}, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
|
|
60
61
|
icon: icon ? icon : FallbackUnauthorizedIcon,
|
|
61
62
|
title: this.renderMessage(),
|
|
62
|
-
titleColor: N500
|
|
63
|
+
titleColor: token('color.text.subtle', N500)
|
|
63
64
|
}));
|
|
64
65
|
}
|
|
65
66
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
import { B400, N200 } from '@atlaskit/theme/colors';
|
|
3
3
|
import { themed } from '@atlaskit/theme/components';
|
|
4
|
+
import { token } from '@atlaskit/tokens';
|
|
4
5
|
const LINK_COLOR_DARK = '#4794FF'; // By default buttons will hide overflow and ellipsis content instead of wrapping.
|
|
5
6
|
// This basically turns the button back into inline content
|
|
6
7
|
|
|
@@ -24,8 +25,8 @@ export const IconStyledButton = styled.span`
|
|
|
24
25
|
`;
|
|
25
26
|
export const NoLinkAppearance = styled.span`
|
|
26
27
|
color: ${themed({
|
|
27
|
-
light: N200,
|
|
28
|
-
dark: LINK_COLOR_DARK
|
|
28
|
+
light: token('color.text.subtlest', N200),
|
|
29
|
+
dark: token('color.text.subtlest', LINK_COLOR_DARK)
|
|
29
30
|
})};
|
|
30
31
|
`;
|
|
31
32
|
export const LowercaseAppearance = styled.span`
|
|
@@ -33,7 +34,7 @@ export const LowercaseAppearance = styled.span`
|
|
|
33
34
|
`;
|
|
34
35
|
export const LinkAppearance = styled.span`
|
|
35
36
|
color: ${themed({
|
|
36
|
-
light: B400,
|
|
37
|
-
dark: LINK_COLOR_DARK
|
|
37
|
+
light: token('color.link', B400),
|
|
38
|
+
dark: token('color.link', LINK_COLOR_DARK)
|
|
38
39
|
})};
|
|
39
40
|
`;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/core';
|
|
3
3
|
import { N300 } from '@atlaskit/theme/colors';
|
|
4
|
+
import { token } from '@atlaskit/tokens';
|
|
4
5
|
import { gs, mq } from './utils';
|
|
5
6
|
export const Byline = ({
|
|
6
7
|
text,
|
|
@@ -11,7 +12,7 @@ export const Byline = ({
|
|
|
11
12
|
css: mq({
|
|
12
13
|
fontSize: gs(1.5),
|
|
13
14
|
lineHeight: gs(2.5),
|
|
14
|
-
color: `${N300}`,
|
|
15
|
+
color: `${token('color.text.subtlest', N300)}`,
|
|
15
16
|
fontWeight: 'normal',
|
|
16
17
|
marginTop: gs(0.5),
|
|
17
18
|
// Spec: only allow two lines MAX to be shown.
|
|
@@ -3,6 +3,7 @@ import { jsx } from '@emotion/core';
|
|
|
3
3
|
import Tooltip from '@atlaskit/tooltip';
|
|
4
4
|
import { gs } from './utils';
|
|
5
5
|
import { N300 } from '@atlaskit/theme/colors';
|
|
6
|
+
import { token } from '@atlaskit/tokens';
|
|
6
7
|
export const Metadata = ({
|
|
7
8
|
text,
|
|
8
9
|
icon,
|
|
@@ -30,7 +31,7 @@ export const Metadata = ({
|
|
|
30
31
|
}, metadataIcon, jsx("span", {
|
|
31
32
|
css: {
|
|
32
33
|
fontSize: gs(1.5),
|
|
33
|
-
color: `${N300}`,
|
|
34
|
+
color: `${token('color.text.subtlest', N300)}`,
|
|
34
35
|
marginRight: gs(0.5),
|
|
35
36
|
marginLeft: '2px'
|
|
36
37
|
}
|
|
@@ -6,6 +6,7 @@ import EditorCloseIcon from '@atlaskit/icon/glyph/editor/close';
|
|
|
6
6
|
import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
|
|
7
7
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
8
8
|
import { N100, N30A } from '@atlaskit/theme/colors';
|
|
9
|
+
import { token } from '@atlaskit/tokens';
|
|
9
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
10
11
|
import { gs } from './utils';
|
|
11
12
|
import { Icon } from './Icon';
|
|
@@ -41,7 +42,7 @@ export const Header = ({
|
|
|
41
42
|
display: 'flex',
|
|
42
43
|
justifyContent: 'space-between',
|
|
43
44
|
alignItems: 'baseline',
|
|
44
|
-
borderBottom: `1px solid ${N30A}`
|
|
45
|
+
borderBottom: `1px solid ${token('color.border', N30A)}`
|
|
45
46
|
}
|
|
46
47
|
}, jsx("div", {
|
|
47
48
|
css: {
|
|
@@ -58,7 +59,7 @@ export const Header = ({
|
|
|
58
59
|
}
|
|
59
60
|
}, jsx("h3", null, title), jsx("div", {
|
|
60
61
|
css: {
|
|
61
|
-
color: N100
|
|
62
|
+
color: token('color.text.subtlest', N100)
|
|
62
63
|
}
|
|
63
64
|
}, metadata.items.length && jsx(MetadataList, {
|
|
64
65
|
items: metadata.items
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { N700, B200, B400 } from '@atlaskit/theme/colors';
|
|
3
|
+
import { token } from '@atlaskit/tokens';
|
|
3
4
|
import { ConfluenceIcon } from '@atlaskit/logo/confluence-icon';
|
|
4
5
|
import { JiraIcon } from '@atlaskit/logo/jira-icon';
|
|
5
6
|
import { extractUrlFromIconJsonLd } from '../utils';
|
|
@@ -33,18 +34,26 @@ var extractProviderIcon = function extractProviderIcon(icon, id) {
|
|
|
33
34
|
if (id) {
|
|
34
35
|
if (id === CONFLUENCE_GENERATOR_ID) {
|
|
35
36
|
return /*#__PURE__*/React.createElement(ConfluenceIcon, {
|
|
36
|
-
textColor: N700
|
|
37
|
+
textColor: token('color.text.subtle', N700)
|
|
38
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
39
|
+
,
|
|
37
40
|
iconColor: B200,
|
|
38
41
|
iconGradientStart: B400,
|
|
39
|
-
iconGradientStop: B200
|
|
42
|
+
iconGradientStop: B200
|
|
43
|
+
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
44
|
+
,
|
|
40
45
|
size: "xsmall"
|
|
41
46
|
});
|
|
42
47
|
} else if (id === JIRA_GENERATOR_ID) {
|
|
43
48
|
return /*#__PURE__*/React.createElement(JiraIcon, {
|
|
44
|
-
textColor: N700
|
|
49
|
+
textColor: token('color.text.subtle', N700)
|
|
50
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
51
|
+
,
|
|
45
52
|
iconColor: B200,
|
|
46
53
|
iconGradientStart: B400,
|
|
47
|
-
iconGradientStop: B200
|
|
54
|
+
iconGradientStop: B200
|
|
55
|
+
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
56
|
+
,
|
|
48
57
|
size: "xsmall"
|
|
49
58
|
});
|
|
50
59
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { N600 } from '@atlaskit/theme/colors';
|
|
3
|
+
import { token } from '@atlaskit/tokens';
|
|
3
4
|
import ChatIcon from '@atlaskit/icon/glyph/comment';
|
|
4
5
|
export var extractCommentCount = function extractCommentCount(jsonLd) {
|
|
5
6
|
var commentCount = jsonLd['schema:commentCount'];
|
|
@@ -11,7 +12,7 @@ export var extractCommentCount = function extractCommentCount(jsonLd) {
|
|
|
11
12
|
label: "comment-count",
|
|
12
13
|
key: "comments-count-icon",
|
|
13
14
|
size: "small",
|
|
14
|
-
primaryColor: N600
|
|
15
|
+
primaryColor: token('color.icon.subtle', N600)
|
|
15
16
|
})
|
|
16
17
|
};
|
|
17
18
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { N600 } from '@atlaskit/theme/colors';
|
|
3
3
|
import CodeIcon from '@atlaskit/icon/glyph/code';
|
|
4
|
+
import { token } from '@atlaskit/tokens';
|
|
4
5
|
export var extractProgrammingLanguage = function extractProgrammingLanguage(jsonLd) {
|
|
5
6
|
var programmingLanguage = jsonLd['schema:programmingLanguage'];
|
|
6
7
|
|
|
@@ -10,7 +11,7 @@ export var extractProgrammingLanguage = function extractProgrammingLanguage(json
|
|
|
10
11
|
icon: /*#__PURE__*/React.createElement(CodeIcon, {
|
|
11
12
|
size: "small",
|
|
12
13
|
label: "code",
|
|
13
|
-
primaryColor: N600
|
|
14
|
+
primaryColor: token('color.icon.subtle', N600)
|
|
14
15
|
})
|
|
15
16
|
};
|
|
16
17
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { N600 } from '@atlaskit/theme/colors';
|
|
3
3
|
import PeopleIcon from '@atlaskit/icon/glyph/people';
|
|
4
|
+
import { token } from '@atlaskit/tokens';
|
|
4
5
|
export var extractSubscriberCount = function extractSubscriberCount(jsonLd) {
|
|
5
6
|
var subscriberCount = jsonLd['atlassian:subscriberCount'];
|
|
6
7
|
|
|
@@ -10,7 +11,7 @@ export var extractSubscriberCount = function extractSubscriberCount(jsonLd) {
|
|
|
10
11
|
icon: /*#__PURE__*/React.createElement(PeopleIcon, {
|
|
11
12
|
size: "small",
|
|
12
13
|
label: "subscribers",
|
|
13
|
-
primaryColor: N600
|
|
14
|
+
primaryColor: token('color.icon.subtle', N600)
|
|
14
15
|
})
|
|
15
16
|
};
|
|
16
17
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { extractorPriorityMap } from '../icon/priority';
|
|
2
2
|
import { R500 } from '@atlaskit/theme/colors';
|
|
3
|
+
import { token } from '@atlaskit/tokens';
|
|
3
4
|
export var extractTitleTextColor = function extractTitleTextColor(jsonLd) {
|
|
4
5
|
var type = jsonLd['@type'];
|
|
5
6
|
|
|
@@ -10,7 +11,7 @@ export var extractTitleTextColor = function extractTitleTextColor(jsonLd) {
|
|
|
10
11
|
|
|
11
12
|
switch (highestPriorityType) {
|
|
12
13
|
case 'atlassian:UndefinedLink':
|
|
13
|
-
return R500;
|
|
14
|
+
return token('color.text.danger', R500);
|
|
14
15
|
|
|
15
16
|
default:
|
|
16
17
|
return undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, uiRenderSuccessEvent, resolvedEvent as _resolvedEvent, unresolvedEvent as _unresolvedEvent, invokeSucceededEvent as _invokeSucceededEvent, invokeFailedEvent as _invokeFailedEvent, connectSucceededEvent as _connectSucceededEvent, connectFailedEvent as _connectFailedEvent, trackAppAccountConnected, screenAuthPopupEvent, instrumentEvent } from '../../utils/analytics';
|
|
1
|
+
import { uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, uiRenderSuccessEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, resolvedEvent as _resolvedEvent, unresolvedEvent as _unresolvedEvent, invokeSucceededEvent as _invokeSucceededEvent, invokeFailedEvent as _invokeFailedEvent, connectSucceededEvent as _connectSucceededEvent, connectFailedEvent as _connectFailedEvent, trackAppAccountConnected, screenAuthPopupEvent, instrumentEvent } from '../../utils/analytics';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { failUfoExperience, startUfoExperience, succeedUfoExperience } from './ufoExperiences';
|
|
4
4
|
export var useSmartLinkAnalytics = function useSmartLinkAnalytics(dispatchAnalytics) {
|
|
@@ -22,6 +22,9 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(dispatchAnalyt
|
|
|
22
22
|
});
|
|
23
23
|
dispatchAnalytics(uiActionClickedEvent(extensionKey, actionType, display));
|
|
24
24
|
},
|
|
25
|
+
hoverCardOpenLinkClickedEvent: function hoverCardOpenLinkClickedEvent(previewDisplay, definitionId, extensionKey, previewInvokeMethod) {
|
|
26
|
+
dispatchAnalytics(uiHoverCardOpenLinkClickedEvent(previewDisplay, definitionId, extensionKey, previewInvokeMethod));
|
|
27
|
+
},
|
|
25
28
|
closedAuthEvent: function closedAuthEvent(display, definitionId, extensionKey) {
|
|
26
29
|
return dispatchAnalytics(uiClosedAuthEvent(display, definitionId, extensionKey));
|
|
27
30
|
},
|
|
@@ -35,6 +38,12 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(dispatchAnalyt
|
|
|
35
38
|
display: display
|
|
36
39
|
});
|
|
37
40
|
dispatchAnalytics(uiRenderSuccessEvent(display, definitionId, extensionKey));
|
|
41
|
+
},
|
|
42
|
+
hoverCardViewedEvent: function hoverCardViewedEvent(hoverDisplay, definitionId, extensionKey, previewInvokeMethod) {
|
|
43
|
+
return dispatchAnalytics(uiHoverCardViewedEvent(hoverDisplay, definitionId, extensionKey, previewInvokeMethod));
|
|
44
|
+
},
|
|
45
|
+
hoverCardDismissedEvent: function hoverCardDismissedEvent(hoverDisplay, hoverTime, definitionId, extensionKey, previewInvokeMethod) {
|
|
46
|
+
return dispatchAnalytics(uiHoverCardDismissedEvent(hoverDisplay, hoverTime, definitionId, extensionKey, previewInvokeMethod));
|
|
38
47
|
}
|
|
39
48
|
};
|
|
40
49
|
}, [dispatchAnalytics]);
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { useContext, createContext } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
5
|
+
* underlying elements.
|
|
6
|
+
*/
|
|
2
7
|
export var FlexibleUiContext = /*#__PURE__*/createContext(undefined);
|
|
3
8
|
export var useFlexibleUiContext = function useFlexibleUiContext() {
|
|
4
9
|
return useContext(FlexibleUiContext);
|
|
@@ -252,4 +252,45 @@ export var uiRenderFailedEvent = function uiRenderFailedEvent(display, error, er
|
|
|
252
252
|
display: display
|
|
253
253
|
}
|
|
254
254
|
};
|
|
255
|
+
};
|
|
256
|
+
export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(hoverDisplay, definitionId, extensionKey, previewInvokeMethod) {
|
|
257
|
+
return {
|
|
258
|
+
action: 'viewed',
|
|
259
|
+
actionSubject: 'hoverCard',
|
|
260
|
+
eventType: 'ui',
|
|
261
|
+
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
262
|
+
definitionId: definitionId || '',
|
|
263
|
+
extensionKey: extensionKey || '',
|
|
264
|
+
hoverDisplay: hoverDisplay,
|
|
265
|
+
previewInvokeMethod: previewInvokeMethod
|
|
266
|
+
})
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(hoverDisplay, hoverTime, definitionId, extensionKey, previewInvokeMethod) {
|
|
270
|
+
return {
|
|
271
|
+
action: 'dismissed',
|
|
272
|
+
actionSubject: 'hoverCard',
|
|
273
|
+
eventType: 'ui',
|
|
274
|
+
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
275
|
+
definitionId: definitionId || '',
|
|
276
|
+
extensionKey: extensionKey || '',
|
|
277
|
+
hoverTime: hoverTime,
|
|
278
|
+
hoverDisplay: hoverDisplay,
|
|
279
|
+
previewInvokeMethod: previewInvokeMethod
|
|
280
|
+
})
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
export var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(previewDisplay, definitionId, extensionKey, previewInvokeMethod) {
|
|
284
|
+
return {
|
|
285
|
+
action: 'clicked',
|
|
286
|
+
actionSubject: 'button',
|
|
287
|
+
actionSubjectId: 'shortcutGoToLink',
|
|
288
|
+
eventType: 'ui',
|
|
289
|
+
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
290
|
+
definitionId: definitionId || '',
|
|
291
|
+
extensionKey: extensionKey || '',
|
|
292
|
+
previewDisplay: previewDisplay,
|
|
293
|
+
previewInvokeMethod: previewInvokeMethod
|
|
294
|
+
})
|
|
295
|
+
};
|
|
255
296
|
};
|
|
@@ -6,7 +6,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
6
6
|
|
|
7
7
|
import { resolvedEvent, unresolvedEvent } from './analytics';
|
|
8
8
|
import { getMeasure } from '../performance';
|
|
9
|
-
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountConnected, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent } from './analytics';
|
|
9
|
+
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountConnected, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent } from './analytics';
|
|
10
10
|
export var instrumentEvent = function instrumentEvent(id, status, definitionId, extensionKey, resourceType, error) {
|
|
11
11
|
var measure = getMeasure(id, status) || {
|
|
12
12
|
duration: undefined
|
package/dist/esm/version.json
CHANGED
|
@@ -8,6 +8,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
8
8
|
import { jsx } from '@emotion/core';
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { N20A, N30A, B200, N40A, N50A } from '@atlaskit/theme/colors';
|
|
11
|
+
import { token } from '@atlaskit/tokens';
|
|
11
12
|
import { gs, br, mq } from '../../common/utils';
|
|
12
13
|
export var Frame = function Frame() {
|
|
13
14
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
@@ -21,7 +22,7 @@ var sharedFrameStyles = {
|
|
|
21
22
|
maxWidth: gs(95),
|
|
22
23
|
width: '100%',
|
|
23
24
|
display: 'flex',
|
|
24
|
-
backgroundColor: 'white'
|
|
25
|
+
backgroundColor: token('elevation.surface', 'white')
|
|
25
26
|
};
|
|
26
27
|
export var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
27
28
|
var children = _ref.children,
|
|
@@ -33,15 +34,16 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
33
34
|
return jsx("div", {
|
|
34
35
|
css: mq(_objectSpread(_objectSpread({}, sharedFrameStyles), {}, {
|
|
35
36
|
'&:hover': isHoverable ? {
|
|
36
|
-
|
|
37
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4064
|
|
38
|
+
backgroundColor: token('color.background.neutral.subtle.hovered', N20A),
|
|
37
39
|
cursor: 'pointer'
|
|
38
40
|
} : undefined,
|
|
39
41
|
minHeight: isFluidHeight ? 0 : [gs(21), gs(15)],
|
|
40
42
|
borderRadius: isSelected ? br() : br(0.5),
|
|
41
|
-
border: "2px solid ".concat(isSelected ? B200 : 'transparent'),
|
|
43
|
+
border: "2px solid ".concat(isSelected ? token('color.border.selected', B200) : 'transparent'),
|
|
42
44
|
justifyContent: 'space-between',
|
|
43
45
|
overflow: 'hidden',
|
|
44
|
-
boxShadow: "0 1px 1px ".concat(N50A, ", 0 0 1px 1px ").concat(N40A
|
|
46
|
+
boxShadow: token('elevation.shadow.raised', "0 1px 1px ".concat(N50A, ", 0 0 1px 1px ").concat(N40A))
|
|
45
47
|
})),
|
|
46
48
|
"data-testid": testId,
|
|
47
49
|
className: className,
|
|
@@ -58,14 +60,14 @@ export var CompactFrame = function CompactFrame(_ref2) {
|
|
|
58
60
|
return jsx("div", {
|
|
59
61
|
css: mq(_objectSpread(_objectSpread({}, sharedFrameStyles), {}, {
|
|
60
62
|
'&:hover': isHoverable ? {
|
|
61
|
-
backgroundColor: N30A
|
|
63
|
+
backgroundColor: token('color.background.neutral.hovered', N30A)
|
|
62
64
|
} : undefined,
|
|
63
65
|
borderRadius: isSelected ? br() : br(0.5),
|
|
64
|
-
border: isSelected ? "2px solid ".concat(B200) : '',
|
|
66
|
+
border: isSelected ? "2px solid ".concat(token('color.border.selected', B200)) : '',
|
|
65
67
|
justifyContent: 'center',
|
|
66
68
|
alignItems: 'center',
|
|
67
69
|
height: inheritDimensions ? '100%' : gs(5),
|
|
68
|
-
backgroundColor: N20A,
|
|
70
|
+
backgroundColor: token('color.background.neutral', N20A),
|
|
69
71
|
width: ['calc(100% - 16px)', '100%'],
|
|
70
72
|
padding: ["0px ".concat(gs(1)), '0']
|
|
71
73
|
})),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/core';
|
|
3
3
|
import { B400 } from '@atlaskit/theme/colors';
|
|
4
|
+
import { token } from '@atlaskit/tokens';
|
|
4
5
|
export var Link = function Link(_ref) {
|
|
5
6
|
var url = _ref.url,
|
|
6
7
|
_ref$testId = _ref.testId,
|
|
@@ -10,7 +11,7 @@ export var Link = function Link(_ref) {
|
|
|
10
11
|
"data-testid": "".concat(testId, "-link"),
|
|
11
12
|
className: className,
|
|
12
13
|
css: {
|
|
13
|
-
color: B400,
|
|
14
|
+
color: token('color.link', B400),
|
|
14
15
|
wordBreak: 'break-all'
|
|
15
16
|
}
|
|
16
17
|
}, url);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx } from '@emotion/core';
|
|
3
3
|
import { N300 } from '@atlaskit/theme/colors';
|
|
4
4
|
import { gs } from '../../common/utils';
|
|
5
|
+
import { token } from '@atlaskit/tokens';
|
|
5
6
|
export var Provider = function Provider(_ref) {
|
|
6
7
|
var name = _ref.name,
|
|
7
8
|
icon = _ref.icon;
|
|
@@ -26,7 +27,7 @@ export var Provider = function Provider(_ref) {
|
|
|
26
27
|
}, iconToRender, jsx("span", {
|
|
27
28
|
css: {
|
|
28
29
|
fontSize: gs(1.5),
|
|
29
|
-
color: N300,
|
|
30
|
+
color: token('color.text.subtlest', N300),
|
|
30
31
|
margin: 0,
|
|
31
32
|
marginLeft: gs(0.5),
|
|
32
33
|
// EDM-713: fixes copy-paste from renderer to editor for Firefox
|
|
@@ -21,6 +21,7 @@ import { handleClickCommon } from '../utils/handlers';
|
|
|
21
21
|
import { Link } from '../components/Link';
|
|
22
22
|
import { UnresolvedText } from '../components/UnresolvedText';
|
|
23
23
|
import { RetryAction } from '../actions/RetryAction';
|
|
24
|
+
import { token } from '@atlaskit/tokens';
|
|
24
25
|
|
|
25
26
|
var textDescriptionProps = _objectSpread({}, messages.could_not_load_link);
|
|
26
27
|
|
|
@@ -63,7 +64,7 @@ export var ErroredView = function ErroredView(_ref) {
|
|
|
63
64
|
icon: jsx(WarningIcon, {
|
|
64
65
|
label: "errored-warning-icon",
|
|
65
66
|
size: "small",
|
|
66
|
-
primaryColor: R300,
|
|
67
|
+
primaryColor: token('color.icon.warning', R300),
|
|
67
68
|
testId: "".concat(testId, "-warning-icon")
|
|
68
69
|
}),
|
|
69
70
|
text: jsx(FormattedMessage, textDescriptionProps)
|
|
@@ -5,6 +5,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
5
5
|
import { jsx } from '@emotion/core';
|
|
6
6
|
import { FormattedMessage } from 'react-intl-next';
|
|
7
7
|
import { R300 } from '@atlaskit/theme/colors';
|
|
8
|
+
import { token } from '@atlaskit/tokens';
|
|
8
9
|
import LockIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
9
10
|
import { Frame } from '../components/Frame';
|
|
10
11
|
import { Provider } from '../components/Provider';
|
|
@@ -65,7 +66,7 @@ export var ForbiddenView = function ForbiddenView(_ref) {
|
|
|
65
66
|
icon: jsx(LockIcon, {
|
|
66
67
|
label: "forbidden-lock-icon",
|
|
67
68
|
size: "small",
|
|
68
|
-
primaryColor: R300,
|
|
69
|
+
primaryColor: token('color.icon.danger', R300),
|
|
69
70
|
testId: "".concat(testId, "-lock-icon")
|
|
70
71
|
}),
|
|
71
72
|
text: jsx(FormattedMessage, _extends({}, messages[descriptiveMessageKey], {
|
|
@@ -20,6 +20,7 @@ import { ContentHeader } from '../components/ContentHeader';
|
|
|
20
20
|
import { Link } from '../components/Link';
|
|
21
21
|
import { UnresolvedText } from '../components/UnresolvedText';
|
|
22
22
|
import { handleClickCommon } from '../utils/handlers';
|
|
23
|
+
import { token } from '@atlaskit/tokens';
|
|
23
24
|
|
|
24
25
|
var textDescriptionProps = _objectSpread({}, messages.not_found_description);
|
|
25
26
|
|
|
@@ -59,7 +60,7 @@ export var NotFoundView = function NotFoundView(_ref) {
|
|
|
59
60
|
icon: jsx(WarningIcon, {
|
|
60
61
|
label: "not-found-warning-icon",
|
|
61
62
|
size: "small",
|
|
62
|
-
primaryColor: R300,
|
|
63
|
+
primaryColor: token('color.icon.warning', R300),
|
|
63
64
|
testId: "".concat(testId, "-warning-icon")
|
|
64
65
|
}),
|
|
65
66
|
text: jsx(FormattedMessage, textDescriptionProps)
|
|
@@ -3,6 +3,7 @@ import { jsx } from '@emotion/core';
|
|
|
3
3
|
import DocumentFilledIcon from '@atlaskit/icon/glyph/document-filled';
|
|
4
4
|
import { N50, N90 } from '@atlaskit/theme/colors';
|
|
5
5
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
6
|
+
import { token } from '@atlaskit/tokens';
|
|
6
7
|
import { Frame } from '../components/Frame';
|
|
7
8
|
import { gs } from '../../common/utils';
|
|
8
9
|
import { FormattedMessage } from 'react-intl-next';
|
|
@@ -22,12 +23,12 @@ export var ResolvingView = function ResolvingView(_ref) {
|
|
|
22
23
|
className: blockCardResolvingViewClassName
|
|
23
24
|
}, jsx(DocumentFilledIcon, {
|
|
24
25
|
size: "small",
|
|
25
|
-
primaryColor: N50,
|
|
26
|
+
primaryColor: token('color.icon.subtle', N50),
|
|
26
27
|
label: "document-icon"
|
|
27
28
|
}), jsx("span", {
|
|
28
29
|
css: {
|
|
29
30
|
fontSize: "".concat(fontSize(), "px"),
|
|
30
|
-
color: N90,
|
|
31
|
+
color: token('color.text.subtlest', N90),
|
|
31
32
|
marginLeft: gs(0.5)
|
|
32
33
|
}
|
|
33
34
|
}, jsx(FormattedMessage, messages.loading)));
|
|
@@ -25,7 +25,8 @@ export function CardWithUrlContent(_ref) {
|
|
|
25
25
|
embedIframeRef = _ref.embedIframeRef,
|
|
26
26
|
inlinePreloaderStyle = _ref.inlinePreloaderStyle,
|
|
27
27
|
ui = _ref.ui,
|
|
28
|
-
children = _ref.children
|
|
28
|
+
children = _ref.children,
|
|
29
|
+
showHoverPreview = _ref.showHoverPreview;
|
|
29
30
|
|
|
30
31
|
// Get state, actions for this card.
|
|
31
32
|
var _useSmartLink = useSmartLink(id, url, dispatchAnalytics),
|
|
@@ -129,7 +130,8 @@ export function CardWithUrlContent(_ref) {
|
|
|
129
130
|
isSelected: isSelected,
|
|
130
131
|
onResolve: onResolve,
|
|
131
132
|
testId: testId,
|
|
132
|
-
inlinePreloaderStyle: inlinePreloaderStyle
|
|
133
|
+
inlinePreloaderStyle: inlinePreloaderStyle,
|
|
134
|
+
showHoverPreview: showHoverPreview
|
|
133
135
|
});
|
|
134
136
|
|
|
135
137
|
case 'block':
|
|
@@ -45,7 +45,8 @@ export function CardWithURLRenderer(props) {
|
|
|
45
45
|
inlinePreloaderStyle = props.inlinePreloaderStyle,
|
|
46
46
|
createAnalyticsEvent = props.createAnalyticsEvent,
|
|
47
47
|
children = props.children,
|
|
48
|
-
ui = props.ui
|
|
48
|
+
ui = props.ui,
|
|
49
|
+
showHoverPreview = props.showHoverPreview; // Wrapper around analytics.
|
|
49
50
|
|
|
50
51
|
var dispatchAnalytics = useCallback(function (analyticsPayload) {
|
|
51
52
|
if (analyticsPayload && analyticsPayload.attributes) {
|
|
@@ -98,7 +99,8 @@ export function CardWithURLRenderer(props) {
|
|
|
98
99
|
platform: platform,
|
|
99
100
|
embedIframeRef: embedIframeRef,
|
|
100
101
|
inlinePreloaderStyle: inlinePreloaderStyle,
|
|
101
|
-
ui: ui
|
|
102
|
+
ui: ui,
|
|
103
|
+
showHoverPreview: showHoverPreview
|
|
102
104
|
};
|
|
103
105
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
104
106
|
FallbackComponent: ErrorFallback,
|