@atlaskit/smart-card 27.8.3 → 27.9.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 +16 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/flexible/styled.js +4 -4
- package/dist/cjs/view/CardWithUrl/component.js +3 -0
- package/dist/cjs/view/CardWithUrl/loader.js +2 -0
- package/dist/cjs/view/EmbedModal/components/link-info/styled.js +4 -4
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +16 -12
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-tooltip.js +7 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/container/hover-card-control/index.js +4 -2
- package/dist/cjs/view/FlexibleCard/components/container/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +3 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +3 -3
- package/dist/cjs/view/FlexibleCard/index.js +2 -0
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +6 -3
- package/dist/cjs/view/HoverCard/components/views/forbidden/styled.js +3 -3
- package/dist/cjs/view/HoverCard/components/views/resolved/styled.js +3 -3
- package/dist/cjs/view/HoverCard/components/views/resolving/styled.js +3 -3
- package/dist/cjs/view/HoverCard/components/views/unauthorised/styled.js +3 -3
- package/dist/cjs/view/HoverCard/styled.js +4 -4
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +3 -1
- package/dist/cjs/view/InlineCard/index.js +2 -0
- package/dist/cjs/view/LinkUrl/LinkWarningModal/styled.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/RelatedLinksModal/components/related-links-list/index.js +2 -2
- package/dist/cjs/view/common/ai-icon/index.js +24 -26
- package/dist/cjs/view/common/ai-prism/ai-glowing-border/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/flexible/styled.js +4 -4
- package/dist/es2019/view/CardWithUrl/component.js +3 -0
- package/dist/es2019/view/CardWithUrl/loader.js +2 -0
- package/dist/es2019/view/EmbedModal/components/link-info/styled.js +4 -4
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +16 -12
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-tooltip.js +4 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/container/hover-card-control/index.js +4 -2
- package/dist/es2019/view/FlexibleCard/components/container/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +3 -3
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +3 -3
- package/dist/es2019/view/FlexibleCard/index.js +2 -0
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +6 -3
- package/dist/es2019/view/HoverCard/components/views/forbidden/styled.js +3 -3
- package/dist/es2019/view/HoverCard/components/views/resolved/styled.js +3 -3
- package/dist/es2019/view/HoverCard/components/views/resolving/styled.js +3 -3
- package/dist/es2019/view/HoverCard/components/views/unauthorised/styled.js +3 -3
- package/dist/es2019/view/HoverCard/styled.js +4 -4
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +3 -1
- package/dist/es2019/view/InlineCard/index.js +2 -0
- package/dist/es2019/view/LinkUrl/LinkWarningModal/styled.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/RelatedLinksModal/components/related-links-list/index.js +2 -2
- package/dist/es2019/view/common/ai-icon/index.js +100 -104
- package/dist/es2019/view/common/ai-prism/ai-glowing-border/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/flexible/styled.js +4 -4
- package/dist/esm/view/CardWithUrl/component.js +3 -0
- package/dist/esm/view/CardWithUrl/loader.js +2 -0
- package/dist/esm/view/EmbedModal/components/link-info/styled.js +4 -4
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +16 -12
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-tooltip.js +7 -3
- package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/utils.js +1 -1
- package/dist/esm/view/FlexibleCard/components/container/hover-card-control/index.js +4 -2
- package/dist/esm/view/FlexibleCard/components/container/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +3 -3
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +3 -3
- package/dist/esm/view/FlexibleCard/index.js +2 -0
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +6 -3
- package/dist/esm/view/HoverCard/components/views/forbidden/styled.js +3 -3
- package/dist/esm/view/HoverCard/components/views/resolved/styled.js +3 -3
- package/dist/esm/view/HoverCard/components/views/resolving/styled.js +3 -3
- package/dist/esm/view/HoverCard/components/views/unauthorised/styled.js +3 -3
- package/dist/esm/view/HoverCard/styled.js +4 -4
- package/dist/esm/view/InlineCard/ResolvedView/index.js +3 -1
- package/dist/esm/view/InlineCard/index.js +2 -0
- package/dist/esm/view/LinkUrl/LinkWarningModal/styled.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/RelatedLinksModal/components/related-links-list/index.js +2 -2
- package/dist/esm/view/common/ai-icon/index.js +25 -27
- package/dist/esm/view/common/ai-prism/ai-glowing-border/index.js +1 -1
- 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 +2 -0
- package/dist/types/view/FlexibleCard/components/container/hover-card-control/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/container/hover-card-control/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/container/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/container/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/types.d.ts +5 -0
- package/dist/types/view/HoverCard/types.d.ts +7 -0
- package/dist/types/view/InlineCard/ResolvedView/index.d.ts +2 -0
- package/dist/types/view/InlineCard/types.d.ts +2 -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 +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/container/hover-card-control/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/container/hover-card-control/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/container/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/container/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +5 -0
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +7 -0
- package/dist/types-ts4.5/view/InlineCard/ResolvedView/index.d.ts +2 -0
- package/dist/types-ts4.5/view/InlineCard/types.d.ts +2 -0
- package/package.json +12 -11
|
@@ -3,7 +3,7 @@ import { css } from '@emotion/react';
|
|
|
3
3
|
import { N800 } from '@atlaskit/theme/colors';
|
|
4
4
|
import { getTruncateStyles } from '../../../../utils';
|
|
5
5
|
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
7
7
|
export var dropdownItemGroupStyles = css({
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
9
9
|
button: {
|
|
@@ -24,7 +24,7 @@ var sharedBlockStyles = css({
|
|
|
24
24
|
alignItems: 'center'
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
28
28
|
export var contentStyles = css(sharedBlockStyles, {
|
|
29
29
|
marginTop: "var(--ds-space-025, 2px)",
|
|
30
30
|
alignItems: 'flex-start',
|
|
@@ -36,7 +36,7 @@ export var contentStyles = css(sharedBlockStyles, {
|
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
40
40
|
export var linkStyles = css(sharedBlockStyles, {
|
|
41
41
|
cursor: 'pointer',
|
|
42
42
|
fontSize: '0.875rem',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
4
4
|
export var triggerButtonStyles = css({
|
|
5
5
|
all: 'unset',
|
|
6
6
|
backgroundColor: 'transparent',
|
|
@@ -24,7 +24,7 @@ export var triggerButtonStyles = css({
|
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-exported-styles
|
|
27
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
28
28
|
export var triggerLozengeStyles = css({
|
|
29
29
|
alignItems: 'center',
|
|
30
30
|
display: 'flex',
|
|
@@ -34,7 +34,7 @@ export var triggerLozengeStyles = css({
|
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
38
38
|
export var dropdownItemGroupStyles = css({
|
|
39
39
|
maxHeight: '300px',
|
|
40
40
|
overflowY: 'auto',
|
|
@@ -30,6 +30,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
30
30
|
renderers = _ref.renderers,
|
|
31
31
|
showAuthTooltip = _ref.showAuthTooltip,
|
|
32
32
|
showHoverPreview = _ref.showHoverPreview,
|
|
33
|
+
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
33
34
|
actionOptions = _ref.actionOptions,
|
|
34
35
|
testId = _ref.testId,
|
|
35
36
|
ui = _ref.ui,
|
|
@@ -95,6 +96,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
95
96
|
onClick: onClick,
|
|
96
97
|
retry: retry,
|
|
97
98
|
showHoverPreview: showHoverPreview,
|
|
99
|
+
hoverPreviewOptions: hoverPreviewOptions,
|
|
98
100
|
actionOptions: actionOptions,
|
|
99
101
|
showAuthTooltip: showAuthTooltip,
|
|
100
102
|
status: status
|
|
@@ -21,6 +21,7 @@ var FADE_IN_DELAY = 500;
|
|
|
21
21
|
var FADE_OUT_DELAY = 300;
|
|
22
22
|
var RESOLVE_DELAY = 100;
|
|
23
23
|
export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
24
|
+
var _hoverPreviewOptions$;
|
|
24
25
|
var children = _ref.children,
|
|
25
26
|
url = _ref.url,
|
|
26
27
|
_ref$id = _ref.id,
|
|
@@ -39,7 +40,9 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
39
40
|
_ref$zIndex = _ref.zIndex,
|
|
40
41
|
zIndex = _ref$zIndex === void 0 ? HOVER_CARD_Z_INDEX : _ref$zIndex,
|
|
41
42
|
_ref$noFadeDelay = _ref.noFadeDelay,
|
|
42
|
-
noFadeDelay = _ref$noFadeDelay === void 0 ? false : _ref$noFadeDelay
|
|
43
|
+
noFadeDelay = _ref$noFadeDelay === void 0 ? false : _ref$noFadeDelay,
|
|
44
|
+
hoverPreviewOptions = _ref.hoverPreviewOptions;
|
|
45
|
+
var fadeInDelay = (_hoverPreviewOptions$ = hoverPreviewOptions === null || hoverPreviewOptions === void 0 ? void 0 : hoverPreviewOptions.fadeInDelay) !== null && _hoverPreviewOptions$ !== void 0 ? _hoverPreviewOptions$ : FADE_IN_DELAY;
|
|
43
46
|
var _React$useState = React.useState(false),
|
|
44
47
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
45
48
|
isOpen = _React$useState2[0],
|
|
@@ -149,10 +152,10 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
149
152
|
} else {
|
|
150
153
|
fadeInTimeoutId.current = setTimeout(function () {
|
|
151
154
|
setIsOpen(true);
|
|
152
|
-
},
|
|
155
|
+
}, fadeInDelay);
|
|
153
156
|
}
|
|
154
157
|
}
|
|
155
|
-
}, [initResolve, isOpen, setMousePosition, noFadeDelay]);
|
|
158
|
+
}, [initResolve, isOpen, setMousePosition, noFadeDelay, fadeInDelay]);
|
|
156
159
|
var linkActions = useSmartLinkActions({
|
|
157
160
|
url: url,
|
|
158
161
|
appearance: CardDisplay.HoverCardPreview,
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
var titleFontWeight = '600';
|
|
4
4
|
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
6
6
|
export var titleBlockStyles = css({
|
|
7
7
|
justifyContent: 'center',
|
|
8
8
|
fontWeight: titleFontWeight,
|
|
9
9
|
marginTop: "var(--ds-space-100, 8px)"
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
13
13
|
export var mainTextStyles = css({
|
|
14
14
|
display: 'inline',
|
|
15
15
|
justifyContent: 'center',
|
|
@@ -18,7 +18,7 @@ export var mainTextStyles = css({
|
|
|
18
18
|
textAlign: 'center'
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
22
22
|
export var connectButtonStyles = css({
|
|
23
23
|
justifyContent: 'center',
|
|
24
24
|
marginTop: "var(--ds-space-100, 8px)"
|
|
@@ -5,15 +5,15 @@ import { css } from '@emotion/react';
|
|
|
5
5
|
import { separatorCss } from '../../../styled';
|
|
6
6
|
var elementGap = '0.5rem';
|
|
7
7
|
|
|
8
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles
|
|
8
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
9
9
|
export var metadataBlockCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tgap: 0px;\n\t/* primary element group */\n\t[data-smart-element-group]:nth-of-type(1) {\n\t\tflex-grow: 7;\n\n\t\t// a separator between text-based element\n\t\t", "\n\n\t\t/* horizontal spacing between elements in group */\n > span {\n\t\t\tmargin-right: ", ";\n\t\t}\n\t}\n\t/* secondary element group */\n\t[data-smart-element-group]:nth-of-type(2) {\n\t\tflex-grow: 3;\n\t\t/* horizontal spacing between elements in group */\n\t\t> span {\n\t\t\tmargin-left: ", ";\n\t\t}\n\t}\n\n\t[data-smart-element-group] {\n\t\tline-height: 1rem;\n\t}\n"])), separatorCss, elementGap, elementGap);
|
|
10
10
|
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
12
|
export var footerBlockCss = css({
|
|
13
13
|
height: '1.5rem'
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
17
17
|
export var hiddenSnippetStyles = css({
|
|
18
18
|
visibility: 'hidden',
|
|
19
19
|
position: 'absolute'
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
|
|
4
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
5
|
export var loadingViewContainer = css({
|
|
6
6
|
display: 'flex',
|
|
7
7
|
flexDirection: 'column',
|
|
8
8
|
padding: "var(--ds-space-200, 1rem)"
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
12
|
export var skeletonContainer = css({
|
|
13
13
|
display: 'flex',
|
|
14
14
|
flexDirection: 'column',
|
|
@@ -28,7 +28,7 @@ export var getTitleStyles = function getTitleStyles(height) {
|
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
32
32
|
export var titleBlockStyles = css({
|
|
33
33
|
width: '100%',
|
|
34
34
|
gap: "var(--ds-space-100, 0.5rem)"
|
|
@@ -4,13 +4,13 @@ var blockGap = '0.5rem';
|
|
|
4
4
|
var iconGap = '0.5rem';
|
|
5
5
|
var titleFontWeight = '500';
|
|
6
6
|
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
8
8
|
export var connectButtonStyles = css({
|
|
9
9
|
justifyContent: 'flex-end',
|
|
10
10
|
marginTop: blockGap
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
14
14
|
export var titleBlockStyles = css({
|
|
15
15
|
gap: "".concat(blockGap, " ").concat(iconGap),
|
|
16
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -19,7 +19,7 @@ export var titleBlockStyles = css({
|
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
23
23
|
export var mainTextStyles = css({
|
|
24
24
|
marginTop: blockGap,
|
|
25
25
|
fontSize: '0.75rem'
|
|
@@ -23,7 +23,7 @@ export var CARD_GAP_PX = 10;
|
|
|
23
23
|
var blockGap = '0.5rem';
|
|
24
24
|
var elementGap = '0.5rem';
|
|
25
25
|
|
|
26
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
27
27
|
export var separatorCss = css({
|
|
28
28
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
29
29
|
'[data-separator] + [data-separator]:before': {
|
|
@@ -31,10 +31,10 @@ export var separatorCss = css({
|
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
35
35
|
export var HoverCardContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tbackground: none;\n\tborder-width: 0;\n\tbox-sizing: border-box;\n\twidth: ", "rem;\n\n\t.", " {\n\t\tdisplay: none;\n\t}\n"])), getBooleanFF('platform.linking-platform.smart-card.hover-card-ai-summaries') ? NEW_CARD_WIDTH_REM : CARD_WIDTH_REM, loadingPlaceholderClassName);
|
|
36
36
|
|
|
37
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles
|
|
37
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
38
38
|
export var titleBlockCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\tgap: ", ";\n\n\t", "\n\n\t// title and subtitle element group\n [data-smart-element-group] {\n\t\t// gap between title and subtitle\n\t\tgap: 0.06rem;\n\t\tdisplay: flex;\n\t\t/* subtitle element group */\n\t\t> [data-smart-element-group] {\n\t\t\t> span {\n\t\t\t\tmargin-right: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t[data-smart-element='Title'] {\n\t\tfont-weight: 600;\n\t}\n"])), blockGap, separatorCss, elementGap);
|
|
39
39
|
export var getTransitionStyles = function getTransitionStyles(snippetHeight) {
|
|
40
40
|
return css({
|
|
@@ -44,7 +44,7 @@ export var getTransitionStyles = function getTransitionStyles(snippetHeight) {
|
|
|
44
44
|
});
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
48
48
|
export var popupContainerStyles = css({
|
|
49
49
|
borderRadius: "var(--ds-border-radius-200, 8px)",
|
|
50
50
|
backgroundColor: "var(--ds-surface-overlay, white)",
|
|
@@ -53,6 +53,7 @@ export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
|
|
|
53
53
|
titlePrefix = _this$props.titlePrefix,
|
|
54
54
|
_this$props$showHover = _this$props.showHoverPreview,
|
|
55
55
|
showHoverPreview = _this$props$showHover === void 0 ? false : _this$props$showHover,
|
|
56
|
+
hoverPreviewOptions = _this$props.hoverPreviewOptions,
|
|
56
57
|
actionOptions = _this$props.actionOptions;
|
|
57
58
|
var inlineCardResolvedView = /*#__PURE__*/React.createElement(Frame, {
|
|
58
59
|
testId: testId,
|
|
@@ -70,7 +71,8 @@ export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
|
|
|
70
71
|
return /*#__PURE__*/React.createElement(HoverCard, {
|
|
71
72
|
id: id,
|
|
72
73
|
url: link,
|
|
73
|
-
actionOptions: actionOptions
|
|
74
|
+
actionOptions: actionOptions,
|
|
75
|
+
hoverPreviewOptions: hoverPreviewOptions
|
|
74
76
|
}, inlineCardResolvedView);
|
|
75
77
|
}
|
|
76
78
|
return inlineCardResolvedView;
|
|
@@ -31,6 +31,7 @@ export var InlineCard = function InlineCard(_ref) {
|
|
|
31
31
|
testId = _ref.testId,
|
|
32
32
|
inlinePreloaderStyle = _ref.inlinePreloaderStyle,
|
|
33
33
|
showHoverPreview = _ref.showHoverPreview,
|
|
34
|
+
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
34
35
|
showAuthTooltip = _ref.showAuthTooltip,
|
|
35
36
|
actionOptions = _ref.actionOptions;
|
|
36
37
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
@@ -81,6 +82,7 @@ export var InlineCard = function InlineCard(_ref) {
|
|
|
81
82
|
return /*#__PURE__*/React.createElement(InlineCardResolvedView, _extends({}, resolvedProps, {
|
|
82
83
|
id: id,
|
|
83
84
|
showHoverPreview: showHoverPreview,
|
|
85
|
+
hoverPreviewOptions: hoverPreviewOptions,
|
|
84
86
|
actionOptions: actionOptions,
|
|
85
87
|
link: url,
|
|
86
88
|
isSelected: isSelected,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
|
|
4
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
5
|
export var breakWordsCss = css({
|
|
6
6
|
whiteSpace: 'pre-line',
|
|
7
7
|
wordBreak: 'break-all'
|
|
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
10
10
|
import LinkWarningModal from './LinkWarningModal';
|
|
11
11
|
var PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "27.
|
|
13
|
+
packageVersion: "27.9.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -14,7 +14,7 @@ var RelatedLinksList = function RelatedLinksList(_ref) {
|
|
|
14
14
|
testId: testId
|
|
15
15
|
}, jsx(Box, {
|
|
16
16
|
paddingBlockStart: "space.050"
|
|
17
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
18
18
|
,
|
|
19
19
|
xcss: xcss({
|
|
20
20
|
font: "var(--ds-font-heading-xxsmall, normal 600 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
@@ -28,7 +28,7 @@ var RelatedLinksList = function RelatedLinksList(_ref) {
|
|
|
28
28
|
testId: "".concat(testId, "-item-").concat(idx)
|
|
29
29
|
}));
|
|
30
30
|
})), urls.length === 0 &&
|
|
31
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
32
32
|
jsx(Box, {
|
|
33
33
|
paddingBlock: "space.100",
|
|
34
34
|
xcss: xcss({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import SVG from '@atlaskit/icon/svg';
|
|
3
|
-
import {
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
4
|
import { B200, B400 } from '@atlaskit/theme/colors';
|
|
5
5
|
/**
|
|
6
6
|
* The bulk of this file is originally from
|
|
@@ -8,8 +8,6 @@ import { B200, B400 } from '@atlaskit/theme/colors';
|
|
|
8
8
|
* with modifications
|
|
9
9
|
*/
|
|
10
10
|
var AiIcon = function AiIcon(props) {
|
|
11
|
-
var iconColor = getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') ? "var(--ds-icon, #44546F)" : "var(--ds-icon-accent-blue, ".concat(B200, ")");
|
|
12
|
-
var textColor = getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') ? "var(--ds-icon, #44546F)" : "var(--ds-text-accent-blue, ".concat(B400, ")");
|
|
13
11
|
return /*#__PURE__*/React.createElement(SVG, props, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
14
12
|
id: "ai_icon_lg0",
|
|
15
13
|
x1: "21",
|
|
@@ -19,12 +17,12 @@ var AiIcon = function AiIcon(props) {
|
|
|
19
17
|
gradientUnits: "userSpaceOnUse"
|
|
20
18
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
21
19
|
offset: "0.270833",
|
|
22
|
-
stopColor:
|
|
23
|
-
color:
|
|
20
|
+
stopColor: "var(--ds-icon-accent-blue, ".concat(B200, ")"),
|
|
21
|
+
color: "var(--ds-icon-accent-blue, ".concat(B200, ")")
|
|
24
22
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
25
23
|
offset: "1",
|
|
26
|
-
stopColor:
|
|
27
|
-
color:
|
|
24
|
+
stopColor: "var(--ds-text-accent-blue, ".concat(B400, ")"),
|
|
25
|
+
color: "var(--ds-text-accent-blue, ".concat(B400, ")")
|
|
28
26
|
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
29
27
|
id: "ai_icon_lg1",
|
|
30
28
|
x1: "12.5",
|
|
@@ -34,12 +32,12 @@ var AiIcon = function AiIcon(props) {
|
|
|
34
32
|
gradientUnits: "userSpaceOnUse"
|
|
35
33
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
36
34
|
offset: "0.1875",
|
|
37
|
-
stopColor:
|
|
38
|
-
color:
|
|
35
|
+
stopColor: "var(--ds-icon-accent-blue, ".concat(B200, ")"),
|
|
36
|
+
color: "var(--ds-icon-accent-blue, ".concat(B200, ")")
|
|
39
37
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
40
38
|
offset: "1",
|
|
41
|
-
stopColor:
|
|
42
|
-
color:
|
|
39
|
+
stopColor: "var(--ds-text-accent-blue, ".concat(B400, ")"),
|
|
40
|
+
color: "var(--ds-text-accent-blue, ".concat(B400, ")")
|
|
43
41
|
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
44
42
|
id: "ai_icon_lg2",
|
|
45
43
|
x1: "6.82996",
|
|
@@ -48,12 +46,12 @@ var AiIcon = function AiIcon(props) {
|
|
|
48
46
|
y2: "12",
|
|
49
47
|
gradientUnits: "userSpaceOnUse"
|
|
50
48
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
51
|
-
stopColor:
|
|
52
|
-
color:
|
|
49
|
+
stopColor: "var(--ds-text-accent-blue, ".concat(B400, ")"),
|
|
50
|
+
color: "var(--ds-text-accent-blue, ".concat(B400, ")")
|
|
53
51
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
54
52
|
offset: "0.791667",
|
|
55
|
-
stopColor:
|
|
56
|
-
color:
|
|
53
|
+
stopColor: "var(--ds-icon-accent-blue, ".concat(B200, ")"),
|
|
54
|
+
color: "var(--ds-icon-accent-blue, ".concat(B200, ")")
|
|
57
55
|
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
58
56
|
id: "ai_icon_lg3",
|
|
59
57
|
x1: "12.5",
|
|
@@ -62,52 +60,52 @@ var AiIcon = function AiIcon(props) {
|
|
|
62
60
|
y2: "21",
|
|
63
61
|
gradientUnits: "userSpaceOnUse"
|
|
64
62
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
65
|
-
stopColor:
|
|
66
|
-
color:
|
|
63
|
+
stopColor: "var(--ds-text-accent-blue, ".concat(B400, ")"),
|
|
64
|
+
color: "var(--ds-text-accent-blue, ".concat(B400, ")")
|
|
67
65
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
68
66
|
offset: "0.802083",
|
|
69
|
-
stopColor:
|
|
70
|
-
color:
|
|
67
|
+
stopColor: "var(--ds-icon-accent-blue, ".concat(B200, ")"),
|
|
68
|
+
color: "var(--ds-icon-accent-blue, ".concat(B200, ")")
|
|
71
69
|
}))), /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
72
70
|
fillRule: "evenodd",
|
|
73
71
|
clipRule: "evenodd",
|
|
74
72
|
d: "M17.17 12C17.17 11.4477 17.6177 11 18.17 11H20C20.5523 11 21 11.4477 21 12C21 12.5523 20.5523 13 20 13H18.17C17.6177 13 17.17 12.5523 17.17 12Z",
|
|
75
|
-
fill: "url(#ai_icon_lg0)
|
|
73
|
+
fill: fg('platform.linking-platform.smart-card.hover-card-action-redesign') ? "var(--ds-icon, #44546F)" : 'url(#ai_icon_lg0)'
|
|
76
74
|
}), /*#__PURE__*/React.createElement("path", {
|
|
77
75
|
fillRule: "evenodd",
|
|
78
76
|
clipRule: "evenodd",
|
|
79
77
|
d: "M12 3C12.5523 3 13 3.44772 13 4V5.83C13 6.38228 12.5523 6.83 12 6.83C11.4477 6.83 11 6.38228 11 5.83V4C11 3.44772 11.4477 3 12 3Z",
|
|
80
|
-
fill: "url(#ai_icon_lg1)
|
|
78
|
+
fill: fg('platform.linking-platform.smart-card.hover-card-action-redesign') ? "var(--ds-icon, #44546F)" : 'url(#ai_icon_lg1)'
|
|
81
79
|
}), /*#__PURE__*/React.createElement("path", {
|
|
82
80
|
fillRule: "evenodd",
|
|
83
81
|
clipRule: "evenodd",
|
|
84
82
|
d: "M3 12C3 11.4477 3.44772 11 4 11H5.83C6.38228 11 6.83 11.4477 6.83 12C6.83 12.5523 6.38228 13 5.83 13H4C3.44772 13 3 12.5523 3 12Z",
|
|
85
|
-
fill: "url(#ai_icon_lg2)
|
|
83
|
+
fill: fg('platform.linking-platform.smart-card.hover-card-action-redesign') ? "var(--ds-icon, #44546F)" : 'url(#ai_icon_lg2)'
|
|
86
84
|
}), /*#__PURE__*/React.createElement("path", {
|
|
87
85
|
fillRule: "evenodd",
|
|
88
86
|
clipRule: "evenodd",
|
|
89
87
|
d: "M12 17.17C12.5523 17.17 13 17.6177 13 18.17V20C13 20.5523 12.5523 21 12 21C11.4477 21 11 20.5523 11 20V18.17C11 17.6177 11.4477 17.17 12 17.17Z",
|
|
90
|
-
fill: "url(#ai_icon_lg3)
|
|
88
|
+
fill: fg('platform.linking-platform.smart-card.hover-card-action-redesign') ? "var(--ds-icon, #44546F)" : 'url(#ai_icon_lg3)'
|
|
91
89
|
}), /*#__PURE__*/React.createElement("path", {
|
|
92
90
|
fillRule: "evenodd",
|
|
93
91
|
clipRule: "evenodd",
|
|
94
92
|
d: "M14.2929 14.2929C14.6835 13.9024 15.3166 13.9024 15.7071 14.2929L19.7071 18.2929C20.0977 18.6834 20.0977 19.3166 19.7071 19.7071C19.3166 20.0976 18.6835 20.0976 18.2929 19.7071L14.2929 15.7071C13.9024 15.3166 13.9024 14.6834 14.2929 14.2929Z",
|
|
95
|
-
fill:
|
|
93
|
+
fill: fg('platform.linking-platform.smart-card.hover-card-action-redesign') ? "var(--ds-icon, #44546F)" : "var(--ds-icon-accent-blue, ".concat(B200, ")")
|
|
96
94
|
}), /*#__PURE__*/React.createElement("path", {
|
|
97
95
|
fillRule: "evenodd",
|
|
98
96
|
clipRule: "evenodd",
|
|
99
97
|
d: "M19.7071 4.29289C20.0977 4.68342 20.0977 5.31658 19.7071 5.70711L15.7071 9.70711C15.3166 10.0976 14.6835 10.0976 14.2929 9.70711C13.9024 9.31658 13.9024 8.68342 14.2929 8.29289L18.2929 4.29289C18.6835 3.90237 19.3166 3.90237 19.7071 4.29289Z",
|
|
100
|
-
fill:
|
|
98
|
+
fill: fg('platform.linking-platform.smart-card.hover-card-action-redesign') ? "var(--ds-icon, #44546F)" : "var(--ds-icon-accent-blue, ".concat(B200, ")")
|
|
101
99
|
}), /*#__PURE__*/React.createElement("path", {
|
|
102
100
|
fillRule: "evenodd",
|
|
103
101
|
clipRule: "evenodd",
|
|
104
102
|
d: "M4.29289 4.29289C4.68342 3.90237 5.31658 3.90237 5.70711 4.29289L9.70711 8.29289C10.0976 8.68342 10.0976 9.31658 9.70711 9.70711C9.31658 10.0976 8.68342 10.0976 8.29289 9.70711L4.29289 5.70711C3.90237 5.31658 3.90237 4.68342 4.29289 4.29289Z",
|
|
105
|
-
fill:
|
|
103
|
+
fill: fg('platform.linking-platform.smart-card.hover-card-action-redesign') ? "var(--ds-icon, #44546F)" : "var(--ds-icon-accent-blue, ".concat(B200, ")")
|
|
106
104
|
}), /*#__PURE__*/React.createElement("path", {
|
|
107
105
|
fillRule: "evenodd",
|
|
108
106
|
clipRule: "evenodd",
|
|
109
107
|
d: "M9.70711 14.2929C10.0976 14.6834 10.0976 15.3166 9.70711 15.7071L5.70711 19.7071C5.31658 20.0976 4.68342 20.0976 4.29289 19.7071C3.90237 19.3166 3.90237 18.6834 4.29289 18.2929L8.29289 14.2929C8.68342 13.9024 9.31658 13.9024 9.70711 14.2929Z",
|
|
110
|
-
fill:
|
|
108
|
+
fill: fg('platform.linking-platform.smart-card.hover-card-action-redesign') ? "var(--ds-icon, #44546F)" : "var(--ds-icon-accent-blue, ".concat(B200, ")")
|
|
111
109
|
})));
|
|
112
110
|
};
|
|
113
111
|
export default AiIcon;
|
|
@@ -11,7 +11,7 @@ var borderContainerStyles = css({
|
|
|
11
11
|
width: 'fit-content'
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
15
15
|
export var borderContentStyles = css({
|
|
16
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
17
17
|
borderRadius: INNER_BORDER_RADIUS,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type CardAppearance, type CardPlatform, type CardProps } from './types';
|
|
3
3
|
import { type WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "appearance" | "container" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "actionOptions" | "onResolve" | "ui" | "showHoverPreview" | "showAuthTooltip" | "platform" | "isHovered" | "isFrameVisible" | "frameStyle" | "importer" | "showActions" | "showServerActions" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "inlinePreloaderStyle" | "analyticsEvents" | "useLegacyBlockCard" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
4
|
+
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "appearance" | "container" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "actionOptions" | "onResolve" | "ui" | "showHoverPreview" | "hoverPreviewOptions" | "showAuthTooltip" | "platform" | "isHovered" | "isFrameVisible" | "frameStyle" | "importer" | "showActions" | "showServerActions" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "inlinePreloaderStyle" | "analyticsEvents" | "useLegacyBlockCard" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
5
5
|
export type { CardAppearance, CardProps, CardPlatform };
|
|
@@ -6,6 +6,7 @@ import { type AnalyticsFacade } from '../../state/analytics';
|
|
|
6
6
|
import { type FlexibleUiOptions } from '../FlexibleCard/types';
|
|
7
7
|
import { type InlinePreloaderStyle, type OnErrorCallback } from '../types';
|
|
8
8
|
import { type FrameStyle } from '../EmbedCard/types';
|
|
9
|
+
import { type HoverPreviewOptions } from '../HoverCard/types';
|
|
9
10
|
export type { CardAppearance, CardPlatform };
|
|
10
11
|
export type CardInnerAppearance = CardAppearance | 'embedPreview' | 'flexible' | 'hoverCardPreview';
|
|
11
12
|
export type EmbedIframeUrlType = 'href' | 'interactiveHref';
|
|
@@ -96,6 +97,7 @@ export interface CardProps extends WithAnalyticsEventsProps {
|
|
|
96
97
|
ui?: FlexibleUiOptions;
|
|
97
98
|
children?: React.ReactNode;
|
|
98
99
|
showHoverPreview?: boolean;
|
|
100
|
+
hoverPreviewOptions?: HoverPreviewOptions;
|
|
99
101
|
showAuthTooltip?: boolean;
|
|
100
102
|
/**
|
|
101
103
|
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-2681 Internal documentation for deprecation (no external access)}
|
|
@@ -5,6 +5,7 @@ import { type FlexibleUiOptions } from '../FlexibleCard/types';
|
|
|
5
5
|
import { type InlinePreloaderStyle, type OnErrorCallback } from '../types';
|
|
6
6
|
import { type AnalyticsFacade } from '../../state/analytics';
|
|
7
7
|
import { type FrameStyle } from '../EmbedCard/types';
|
|
8
|
+
import { type HoverPreviewOptions } from '../HoverCard/types';
|
|
8
9
|
export type CardWithUrlContentProps = {
|
|
9
10
|
id: string;
|
|
10
11
|
url: string;
|
|
@@ -44,6 +45,7 @@ export type CardWithUrlContentProps = {
|
|
|
44
45
|
ui?: FlexibleUiOptions;
|
|
45
46
|
children?: React.ReactNode;
|
|
46
47
|
showHoverPreview?: boolean;
|
|
48
|
+
hoverPreviewOptions?: HoverPreviewOptions;
|
|
47
49
|
showAuthTooltip?: boolean;
|
|
48
50
|
analyticsEvents?: AnalyticsFacade;
|
|
49
51
|
placeholder?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type HoverCardDelayProps } from './types';
|
|
3
|
-
declare const HoverCardControl: ({ children, hideHoverCardPreviewButton, isHoverPreview, isAuthTooltip, actionOptions, testId, url, delay, }: HoverCardDelayProps) => JSX.Element;
|
|
3
|
+
declare const HoverCardControl: ({ children, hideHoverCardPreviewButton, isHoverPreview, isAuthTooltip, actionOptions, testId, url, delay, hoverPreviewOptions, }: HoverCardDelayProps) => JSX.Element;
|
|
4
4
|
export default HoverCardControl;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type PropsWithChildren } from 'react';
|
|
2
2
|
import { type ContainerProps } from '../types';
|
|
3
|
-
export type HoverCardDelayProps = PropsWithChildren<Pick<ContainerProps, 'hideHoverCardPreviewButton' | 'actionOptions'> & {
|
|
3
|
+
export type HoverCardDelayProps = PropsWithChildren<Pick<ContainerProps, 'hideHoverCardPreviewButton' | 'actionOptions' | 'hoverPreviewOptions'> & {
|
|
4
4
|
isHoverPreview?: boolean;
|
|
5
5
|
isAuthTooltip?: boolean;
|
|
6
6
|
testId?: string;
|
|
@@ -10,5 +10,5 @@ export declare const getContainerStyles: (size: SmartLinkSize, hideBackground: b
|
|
|
10
10
|
* @internal
|
|
11
11
|
* @see Block
|
|
12
12
|
*/
|
|
13
|
-
declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hideHoverCardPreviewButton, hidePadding, onClick, retry, showAuthTooltip, showHoverPreview, actionOptions, size, status, testId, theme, }: ContainerProps) => jsx.JSX.Element;
|
|
13
|
+
declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hideHoverCardPreviewButton, hidePadding, onClick, retry, showAuthTooltip, showHoverPreview, hoverPreviewOptions, actionOptions, size, status, testId, theme, }: ContainerProps) => jsx.JSX.Element;
|
|
14
14
|
export default Container;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type PropsWithChildren } from 'react';
|
|
2
2
|
import { type SmartLinkStatus } from '../../../../constants';
|
|
3
3
|
import { type FlexibleCardProps, type FlexibleUiOptions, type RetryOptions } from '../../types';
|
|
4
|
-
export type ContainerProps = PropsWithChildren<Pick<FlexibleCardProps, 'onClick' | 'showHoverPreview' | 'actionOptions' | 'showAuthTooltip'> & FlexibleUiOptions & {
|
|
4
|
+
export type ContainerProps = PropsWithChildren<Pick<FlexibleCardProps, 'onClick' | 'showHoverPreview' | 'hoverPreviewOptions' | 'actionOptions' | 'showAuthTooltip'> & FlexibleUiOptions & {
|
|
5
5
|
/**
|
|
6
6
|
* The options that determine the retry behaviour when a Smart Link errors.
|
|
7
7
|
*/
|
|
@@ -8,6 +8,7 @@ import type { CardInnerAppearance, OnResolveCallback, CardActionOptions } from '
|
|
|
8
8
|
import { type OnErrorCallback } from '../types';
|
|
9
9
|
import { type AnalyticsFacade } from '../../state/analytics';
|
|
10
10
|
import { type AISummaryConfig } from '../../state/hooks/use-ai-summary-config/types';
|
|
11
|
+
import { type HoverPreviewOptions } from '../HoverCard/types';
|
|
11
12
|
export type FlexibleCardProps = {
|
|
12
13
|
/**
|
|
13
14
|
* @internal A unique ID for a Smart Link.
|
|
@@ -81,6 +82,10 @@ export type FlexibleCardProps = {
|
|
|
81
82
|
* over the smartlink. Default value is false.
|
|
82
83
|
*/
|
|
83
84
|
showHoverPreview?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Configuration options for hover preview
|
|
87
|
+
*/
|
|
88
|
+
hoverPreviewOptions?: HoverPreviewOptions;
|
|
84
89
|
/**
|
|
85
90
|
* Determines whether to show an unauthorised view of the hover card
|
|
86
91
|
* when a user hovers over a smartlink.
|
|
@@ -55,6 +55,7 @@ export interface HoverCardProps extends WithAnalyticsEventsProps {
|
|
|
55
55
|
* This is passed to the portal component.
|
|
56
56
|
*/
|
|
57
57
|
zIndex?: number;
|
|
58
|
+
hoverPreviewOptions?: HoverPreviewOptions;
|
|
58
59
|
}
|
|
59
60
|
/**
|
|
60
61
|
* An internal props that internal smart-card components can use to configure
|
|
@@ -103,3 +104,9 @@ export type ImagePreviewProps = {
|
|
|
103
104
|
data: JsonLd.Data.BaseData;
|
|
104
105
|
fallbackElementHeight: number;
|
|
105
106
|
};
|
|
107
|
+
export interface HoverPreviewOptions {
|
|
108
|
+
/**
|
|
109
|
+
* Delay (in milliseconds) between hovering over the trigger element and the hover card opening. Defaults to 500ms.
|
|
110
|
+
*/
|
|
111
|
+
fadeInDelay?: number;
|
|
112
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type LozengeProps } from '../../../types';
|
|
3
3
|
import type { CardActionOptions } from '../../Card/types';
|
|
4
|
+
import { type HoverPreviewOptions } from '../../HoverCard/types';
|
|
4
5
|
export interface InlineCardResolvedViewProps {
|
|
5
6
|
/** A unique ID for a Smart Link. */
|
|
6
7
|
id?: string;
|
|
@@ -26,6 +27,7 @@ export interface InlineCardResolvedViewProps {
|
|
|
26
27
|
titlePrefix?: React.ReactNode;
|
|
27
28
|
/** Enables showing a custom preview on hover of link */
|
|
28
29
|
showHoverPreview?: boolean;
|
|
30
|
+
hoverPreviewOptions?: HoverPreviewOptions;
|
|
29
31
|
/** Configure visibility of server and client actions */
|
|
30
32
|
actionOptions?: CardActionOptions;
|
|
31
33
|
}
|
|
@@ -4,6 +4,7 @@ import { type CardState } from '../../state/types';
|
|
|
4
4
|
import { type InlinePreloaderStyle, type OnErrorCallback } from '../types';
|
|
5
5
|
import { type AnalyticsFacade } from '../../state/analytics';
|
|
6
6
|
import type { CardActionOptions } from '../Card/types';
|
|
7
|
+
import { type HoverPreviewOptions } from '../HoverCard/types';
|
|
7
8
|
export type InlineCardProps = {
|
|
8
9
|
id: string;
|
|
9
10
|
url: string;
|
|
@@ -21,6 +22,7 @@ export type InlineCardProps = {
|
|
|
21
22
|
inlinePreloaderStyle?: InlinePreloaderStyle;
|
|
22
23
|
renderers?: CardProviderRenderers;
|
|
23
24
|
showHoverPreview?: boolean;
|
|
25
|
+
hoverPreviewOptions?: HoverPreviewOptions;
|
|
24
26
|
showAuthTooltip?: boolean;
|
|
25
27
|
actionOptions?: CardActionOptions;
|
|
26
28
|
analytics: AnalyticsFacade;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type CardAppearance, type CardPlatform, type CardProps } from './types';
|
|
3
3
|
import { type WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "appearance" | "container" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "actionOptions" | "onResolve" | "ui" | "showHoverPreview" | "showAuthTooltip" | "platform" | "isHovered" | "isFrameVisible" | "frameStyle" | "importer" | "showActions" | "showServerActions" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "inlinePreloaderStyle" | "analyticsEvents" | "useLegacyBlockCard" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
4
|
+
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "appearance" | "container" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "actionOptions" | "onResolve" | "ui" | "showHoverPreview" | "hoverPreviewOptions" | "showAuthTooltip" | "platform" | "isHovered" | "isFrameVisible" | "frameStyle" | "importer" | "showActions" | "showServerActions" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "inlinePreloaderStyle" | "analyticsEvents" | "useLegacyBlockCard" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
5
5
|
export type { CardAppearance, CardProps, CardPlatform };
|