@atlaskit/smart-card 24.0.2 → 24.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +2 -0
- package/dist/cjs/view/CardWithUrl/loader.js +2 -0
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +13 -11
- package/dist/cjs/view/EmbedCard/components/styled.js +17 -15
- package/dist/cjs/view/EmbedCard/index.js +4 -1
- package/dist/cjs/view/EmbedCard/views/ForbiddenView.js +1 -1
- package/dist/cjs/view/EmbedCard/views/NotFoundView.js +1 -1
- package/dist/cjs/view/EmbedCard/views/ResolvedView.js +2 -0
- package/dist/cjs/view/EmbedCard/views/UnauthorisedView.js +1 -1
- package/dist/cjs/view/HoverCard/styled.js +1 -0
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +2 -0
- package/dist/es2019/view/CardWithUrl/loader.js +2 -0
- package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +8 -11
- package/dist/es2019/view/EmbedCard/components/styled.js +27 -20
- package/dist/es2019/view/EmbedCard/index.js +4 -1
- package/dist/es2019/view/EmbedCard/views/ForbiddenView.js +1 -1
- package/dist/es2019/view/EmbedCard/views/NotFoundView.js +1 -1
- package/dist/es2019/view/EmbedCard/views/ResolvedView.js +2 -0
- package/dist/es2019/view/EmbedCard/views/UnauthorisedView.js +1 -1
- package/dist/es2019/view/HoverCard/styled.js +1 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/CardWithUrl/component.js +2 -0
- package/dist/esm/view/CardWithUrl/loader.js +2 -0
- package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +10 -11
- package/dist/esm/view/EmbedCard/components/styled.js +17 -15
- package/dist/esm/view/EmbedCard/index.js +4 -1
- package/dist/esm/view/EmbedCard/views/ForbiddenView.js +1 -1
- package/dist/esm/view/EmbedCard/views/NotFoundView.js +1 -1
- package/dist/esm/view/EmbedCard/views/ResolvedView.js +2 -0
- package/dist/esm/view/EmbedCard/views/UnauthorisedView.js +1 -1
- package/dist/esm/view/HoverCard/styled.js +1 -0
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +7 -0
- package/dist/types/view/CardWithUrl/component.d.ts +1 -1
- package/dist/types/view/CardWithUrl/types.d.ts +2 -0
- package/dist/types/view/EmbedCard/components/ExpandedFrame.d.ts +4 -3
- package/dist/types/view/EmbedCard/components/styled.d.ts +3 -2
- package/dist/types/view/EmbedCard/types.d.ts +2 -0
- package/dist/types/view/EmbedCard/views/ResolvedView.d.ts +3 -1
- package/package.json +2 -2
- package/report.api.md +6 -1
- package/tmp/api-report-tmp.d.ts +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 24.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`2d2bfdfb0eb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2d2bfdfb0eb) - [ux] A support for borderless embed was added. A new prop 'frameStyle' was added which allows user to choose one of three styles: 'show', 'hide', 'showOnHover'. The prop isFrameVisible was made deprecated and replaced by the new prop.
|
|
8
|
+
|
|
9
|
+
## 24.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`9e7d94da3cd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9e7d94da3cd) - [ux] Fix hover preview background colour in dark mode
|
|
14
|
+
|
|
3
15
|
## 24.0.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/version.json
CHANGED
|
@@ -28,6 +28,7 @@ function CardWithUrlContent(_ref) {
|
|
|
28
28
|
url = _ref.url,
|
|
29
29
|
isSelected = _ref.isSelected,
|
|
30
30
|
isFrameVisible = _ref.isFrameVisible,
|
|
31
|
+
frameStyle = _ref.frameStyle,
|
|
31
32
|
platform = _ref.platform,
|
|
32
33
|
onClick = _ref.onClick,
|
|
33
34
|
appearance = _ref.appearance,
|
|
@@ -247,6 +248,7 @@ function CardWithUrlContent(_ref) {
|
|
|
247
248
|
analytics: analytics,
|
|
248
249
|
isSelected: isSelected,
|
|
249
250
|
isFrameVisible: isFrameVisible,
|
|
251
|
+
frameStyle: frameStyle,
|
|
250
252
|
platform: platform,
|
|
251
253
|
onResolve: onResolve,
|
|
252
254
|
onError: onError,
|
|
@@ -41,6 +41,7 @@ function CardWithURLRenderer(props) {
|
|
|
41
41
|
appearance = props.appearance,
|
|
42
42
|
isSelected = props.isSelected,
|
|
43
43
|
isFrameVisible = props.isFrameVisible,
|
|
44
|
+
frameStyle = props.frameStyle,
|
|
44
45
|
onClick = props.onClick,
|
|
45
46
|
container = props.container,
|
|
46
47
|
onResolve = props.onResolve,
|
|
@@ -110,6 +111,7 @@ function CardWithURLRenderer(props) {
|
|
|
110
111
|
onClick: onClick,
|
|
111
112
|
isSelected: isSelected,
|
|
112
113
|
isFrameVisible: isFrameVisible,
|
|
114
|
+
frameStyle: frameStyle,
|
|
113
115
|
dispatchAnalytics: dispatchAnalytics,
|
|
114
116
|
container: container,
|
|
115
117
|
onResolve: onResolve,
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.ExpandedFrame = void 0;
|
|
8
|
-
var _react =
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
10
|
var _styled = require("./styled");
|
|
10
11
|
var _handlers = require("../../BlockCard/utils/handlers");
|
|
11
12
|
var _useMouseDownEvent = _interopRequireDefault(require("../../../state/analytics/useMouseDownEvent"));
|
|
13
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
15
|
var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
13
16
|
var _ref$isPlaceholder = _ref.isPlaceholder,
|
|
14
17
|
isPlaceholder = _ref$isPlaceholder === void 0 ? false : _ref$isPlaceholder,
|
|
@@ -18,7 +21,7 @@ var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
18
21
|
text = _ref.text,
|
|
19
22
|
isSelected = _ref.isSelected,
|
|
20
23
|
isFrameVisible = _ref.isFrameVisible,
|
|
21
|
-
|
|
24
|
+
frameStyle = _ref.frameStyle,
|
|
22
25
|
href = _ref.href,
|
|
23
26
|
minWidth = _ref.minWidth,
|
|
24
27
|
maxWidth = _ref.maxWidth,
|
|
@@ -34,6 +37,9 @@ var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
34
37
|
return (0, _handlers.handleClickCommon)(event, onClick);
|
|
35
38
|
};
|
|
36
39
|
var handleMouseDown = (0, _useMouseDownEvent.default)();
|
|
40
|
+
var calculatedFrameStyle = (0, _react.useMemo)(function () {
|
|
41
|
+
return frameStyle !== undefined ? frameStyle : isFrameVisible ? 'show' : 'showOnHover';
|
|
42
|
+
}, [frameStyle, isFrameVisible]);
|
|
37
43
|
var renderHeader = function renderHeader() {
|
|
38
44
|
return /*#__PURE__*/_react.default.createElement(_styled.Header, {
|
|
39
45
|
className: "embed-header"
|
|
@@ -51,7 +57,8 @@ var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
51
57
|
return /*#__PURE__*/_react.default.createElement(_styled.Content, {
|
|
52
58
|
"data-testid": "embed-content-wrapper",
|
|
53
59
|
allowScrollBar: allowScrollBar,
|
|
54
|
-
isInteractive: isInteractive()
|
|
60
|
+
isInteractive: isInteractive(),
|
|
61
|
+
frameStyle: frameStyle
|
|
55
62
|
}, children);
|
|
56
63
|
};
|
|
57
64
|
if (!isPlaceholder && href) {
|
|
@@ -59,18 +66,14 @@ var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
59
66
|
className: _styled.className,
|
|
60
67
|
isInteractive: isInteractive(),
|
|
61
68
|
isSelected: isSelected,
|
|
62
|
-
|
|
69
|
+
frameStyle: calculatedFrameStyle,
|
|
63
70
|
minWidth: minWidth,
|
|
64
71
|
maxWidth: maxWidth,
|
|
65
|
-
isVisible: isVisible,
|
|
66
72
|
"data-testid": testId,
|
|
67
73
|
"data-trello-do-not-use-override": testId
|
|
68
74
|
// Due to limitations of testing library, we can't assert ::after
|
|
69
75
|
,
|
|
70
|
-
"data-is-selected": isSelected
|
|
71
|
-
// Due to limitation of testing library, we can't match background colors #ebecf0 and rgb(235, 236, 240)
|
|
72
|
-
,
|
|
73
|
-
"data-is-frame-visible": isFrameVisible,
|
|
76
|
+
"data-is-selected": isSelected,
|
|
74
77
|
inheritDimensions: inheritDimensions
|
|
75
78
|
}, renderHeader(), renderContent());
|
|
76
79
|
} else {
|
|
@@ -79,12 +82,11 @@ var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
79
82
|
isInteractive: isInteractive(),
|
|
80
83
|
isSelected: isSelected,
|
|
81
84
|
minWidth: minWidth,
|
|
85
|
+
frameStyle: calculatedFrameStyle,
|
|
82
86
|
maxWidth: maxWidth,
|
|
83
|
-
isVisible: isVisible,
|
|
84
87
|
"data-testid": testId,
|
|
85
88
|
"data-trello-do-not-use-override": testId,
|
|
86
89
|
"data-is-selected": isSelected,
|
|
87
|
-
"data-is-visible": isVisible,
|
|
88
90
|
"data-wrapper-type": "default",
|
|
89
91
|
"data-is-interactive": isInteractive()
|
|
90
92
|
}, renderHeader(), renderContent());
|
|
@@ -48,28 +48,27 @@ function maxWidth(_ref2) {
|
|
|
48
48
|
return 'margin: 0 auto;';
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function getInteractiveStyles(_ref3) {
|
|
52
52
|
var isInteractive = _ref3.isInteractive,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var interactiveFrameStyles = isInteractive ? "\n &:hover {\n ".concat(visibleStyles, "\n }\n &:active {\n background-color: ", "var(--ds-background-selected, ".concat(colors.B50, ")"), ";\n }\n") : '';
|
|
56
|
-
return "".concat(visibleFrameStyles).concat(interactiveFrameStyles);
|
|
53
|
+
frameStyle = _ref3.frameStyle;
|
|
54
|
+
return isInteractive ? "\n &:hover {\n ".concat(frameStyle !== 'hide' && visibleStyles, "\n }\n &:active {\n background-color: ", "var(--ds-background-selected, ".concat(colors.B50, ")"), ";\n }\n ") : '';
|
|
57
55
|
}
|
|
58
56
|
function selected(_ref4) {
|
|
59
|
-
var isSelected = _ref4.isSelected
|
|
60
|
-
|
|
57
|
+
var isSelected = _ref4.isSelected,
|
|
58
|
+
frameStyle = _ref4.frameStyle;
|
|
59
|
+
return isSelected && frameStyle !== 'hide' ? "\n ".concat(visibleStyles, "\n &::after {\n cursor: pointer;\n box-shadow: 0 0 0 3px ", "var(--ds-border-selected, ".concat(colors.B100, ")"), ";\n content: '';\n outline: none;\n position: absolute;\n height: 100%;\n width: 100%;\n left: 0;\n ").concat(borderRadius, "\n }\n ") : isSelected && frameStyle === 'hide' ? "\n box-shadow: 0 0 0 3px ".concat("var(--ds-border-selected, ".concat(colors.B100, ")"), ";\n ", borderRadius, "\n ") : '';
|
|
61
60
|
}
|
|
62
61
|
var height = function height(_ref5) {
|
|
63
62
|
var inheritDimensions = _ref5.inheritDimensions;
|
|
64
63
|
return inheritDimensions ? 'height: 100%;' : "height: ".concat((0, _utils.gs)(54));
|
|
65
64
|
};
|
|
66
65
|
var wrapperStyles = function wrapperStyles(props) {
|
|
67
|
-
return "\n ".concat(borderRadius, "\n ").concat(minWidth(props), "\n ").concat(maxWidth(props), "\n ").concat(
|
|
66
|
+
return "\n ".concat(borderRadius, "\n ").concat(minWidth(props), "\n ").concat(maxWidth(props), "\n ").concat(getInteractiveStyles(props), "\n ").concat(visible(props), "\n display: inline-flex;\n flex-direction: column;\n box-sizing: border-box;\n font-family: ").concat((0, _constants.fontFamily)(), ";\n width: 100%;\n user-select: none;\n line-height: initial;\n transition: background 0.3s;\n position: relative;\n ").concat(height(props), ";\n ").concat(selected(props), "\n\n &:after {\n content: '';\n background: transparent;\n transition: background 0.3s, box-shadow 0.3s;\n position: absolute;\n width: calc(100% + ").concat((0, _utils.gs)(2), ");\n height: calc(100% + ").concat((0, _utils.gs)(1), ");\n left: -").concat((0, _utils.gs)(1), ";\n ").concat(borderRadius, "\n }\n");
|
|
68
67
|
};
|
|
69
68
|
var visibleStyles = "\n background-color: ".concat("var(--ds-background-neutral-subtle, ".concat(colors.N30, ")"), ";\n\n &:after {\n background: ", "var(--ds-background-neutral, ".concat(colors.N30, ")"), " !important;\n }\n .embed-header {\n opacity: 1;\n }");
|
|
70
69
|
function visible(_ref6) {
|
|
71
|
-
var
|
|
72
|
-
return
|
|
70
|
+
var frameStyle = _ref6.frameStyle;
|
|
71
|
+
return frameStyle === 'show' ? visibleStyles : '';
|
|
73
72
|
}
|
|
74
73
|
var LinkWrapper = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", " &:hover {\n text-decoration: none;\n }\n"])), function (props) {
|
|
75
74
|
return wrapperStyles(props);
|
|
@@ -104,7 +103,7 @@ exports.TextWrapper = TextWrapper;
|
|
|
104
103
|
// NB: `overflow` is kept as `hidden` since
|
|
105
104
|
// the internal contents of the `iframe` should
|
|
106
105
|
// manage scrolling behaviour.
|
|
107
|
-
var Content = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n background-color: ", ";\n position: absolute;\n z-index: 1;\n width: 100%;\n
|
|
106
|
+
var Content = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n background-color: ", ";\n position: absolute;\n z-index: 1;\n width: 100%;\n transition: box-shadow 0.3s;\n\n > .calc-height > div > div {\n left: unset !important;\n width: unset !important;\n height: unset !important;\n position: initial !important;\n padding-bottom: unset !important;\n }\n > .embed-preview > div {\n margin: 0 auto;\n }\n\n ", ";\n\n ", "\n\n ", "\n"])), borderRadius, cardShadow, "var(--ds-surface-raised, white)", function (_ref9) {
|
|
108
107
|
var isInteractive = _ref9.isInteractive;
|
|
109
108
|
if (isInteractive) {
|
|
110
109
|
return "\n .".concat(className, ":hover & {\n box-shadow: ", "var(--ds-shadow-overlay, 0 4px 8px -2px rgba(23, 43, 77, 0.32), 0 0 1px rgba(23, 43, 77, 0.25))", ";\n }\n ");
|
|
@@ -114,10 +113,13 @@ var Content = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _t
|
|
|
114
113
|
}, function (_ref10) {
|
|
115
114
|
var allowScrollBar = _ref10.allowScrollBar;
|
|
116
115
|
return allowScrollBar ? 'overflow: auto;' : 'overflow: hidden;';
|
|
116
|
+
}, function (_ref11) {
|
|
117
|
+
var frameStyle = _ref11.frameStyle;
|
|
118
|
+
return frameStyle === 'hide' ? 'height: 100%;' : "\n height: calc(100% - ".concat((0, _utils.gs)(4), ");\n top: ").concat((0, _utils.gs)(4), ";\n ");
|
|
117
119
|
});
|
|
118
120
|
exports.Content = Content;
|
|
119
|
-
var Image = _styled.default.img(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n\n /* hide the alt text when the image cannot be found */\n overflow: hidden;\n"])), function (
|
|
120
|
-
var size =
|
|
121
|
+
var Image = _styled.default.img(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n\n /* hide the alt text when the image cannot be found */\n overflow: hidden;\n"])), function (_ref12) {
|
|
122
|
+
var size = _ref12.size;
|
|
121
123
|
return csssize(size);
|
|
122
124
|
}, borderRadius);
|
|
123
125
|
exports.Image = Image;
|
|
@@ -133,8 +135,8 @@ var Description = _styled.default.div(_templateObject11 || (_templateObject11 =
|
|
|
133
135
|
exports.Description = Description;
|
|
134
136
|
var ResolvedViewIconWrapper = _styled.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 4px;\n"])));
|
|
135
137
|
exports.ResolvedViewIconWrapper = ResolvedViewIconWrapper;
|
|
136
|
-
var Thumbnail = _styled.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n float: right;\n margin: 4px 0 12px 12px;\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), "var(--ds-skeleton, ".concat(colors.N30, ")"), function (
|
|
137
|
-
var src =
|
|
138
|
+
var Thumbnail = _styled.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n float: right;\n margin: 4px 0 12px 12px;\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), "var(--ds-skeleton, ".concat(colors.N30, ")"), function (_ref13) {
|
|
139
|
+
var src = _ref13.src;
|
|
138
140
|
return src;
|
|
139
141
|
});
|
|
140
142
|
exports.Thumbnail = Thumbnail;
|
|
@@ -34,6 +34,7 @@ var EmbedCard = /*#__PURE__*/_react.default.forwardRef(function (_ref, iframeRef
|
|
|
34
34
|
showActions = _ref.showActions,
|
|
35
35
|
isSelected = _ref.isSelected,
|
|
36
36
|
isFrameVisible = _ref.isFrameVisible,
|
|
37
|
+
frameStyle = _ref.frameStyle,
|
|
37
38
|
platform = _ref.platform,
|
|
38
39
|
onResolve = _ref.onResolve,
|
|
39
40
|
onError = _ref.onError,
|
|
@@ -66,11 +67,13 @@ var EmbedCard = /*#__PURE__*/_react.default.forwardRef(function (_ref, iframeRef
|
|
|
66
67
|
return /*#__PURE__*/_react.default.createElement(_ResolvedView2.EmbedCardResolvedView, (0, _extends2.default)({}, resolvedViewProps, {
|
|
67
68
|
isSelected: isSelected,
|
|
68
69
|
isFrameVisible: isFrameVisible,
|
|
70
|
+
frameStyle: frameStyle,
|
|
69
71
|
inheritDimensions: inheritDimensions,
|
|
70
72
|
onClick: handleFrameClick,
|
|
71
73
|
ref: iframeRef,
|
|
72
74
|
onIframeDwell: onIframeDwell,
|
|
73
|
-
onIframeFocus: onIframeFocus
|
|
75
|
+
onIframeFocus: onIframeFocus,
|
|
76
|
+
testId: testId
|
|
74
77
|
}));
|
|
75
78
|
} else {
|
|
76
79
|
if (platform === 'mobile') {
|
|
@@ -52,7 +52,7 @@ var EmbedCardForbiddenView = function EmbedCardForbiddenView(_ref) {
|
|
|
52
52
|
href: link,
|
|
53
53
|
icon: icon,
|
|
54
54
|
text: context && context.text,
|
|
55
|
-
|
|
55
|
+
frameStyle: "show",
|
|
56
56
|
isSelected: isSelected,
|
|
57
57
|
inheritDimensions: inheritDimensions,
|
|
58
58
|
onClick: onClick,
|
|
@@ -25,7 +25,7 @@ var EmbedCardNotFoundView = function EmbedCardNotFoundView(_ref) {
|
|
|
25
25
|
href: link,
|
|
26
26
|
icon: icon,
|
|
27
27
|
text: context && context.text,
|
|
28
|
-
|
|
28
|
+
frameStyle: "show",
|
|
29
29
|
isSelected: isSelected,
|
|
30
30
|
inheritDimensions: inheritDimensions,
|
|
31
31
|
onClick: onClick,
|
|
@@ -19,6 +19,7 @@ var EmbedCardResolvedView = /*#__PURE__*/_react2.default.forwardRef(function (_r
|
|
|
19
19
|
onClick = _ref.onClick,
|
|
20
20
|
isSelected = _ref.isSelected,
|
|
21
21
|
isFrameVisible = _ref.isFrameVisible,
|
|
22
|
+
frameStyle = _ref.frameStyle,
|
|
22
23
|
preview = _ref.preview,
|
|
23
24
|
title = _ref.title,
|
|
24
25
|
isTrusted = _ref.isTrusted,
|
|
@@ -49,6 +50,7 @@ var EmbedCardResolvedView = /*#__PURE__*/_react2.default.forwardRef(function (_r
|
|
|
49
50
|
return (0, _react.jsx)(_ExpandedFrame.ExpandedFrame, {
|
|
50
51
|
isSelected: isSelected,
|
|
51
52
|
isFrameVisible: isFrameVisible,
|
|
53
|
+
frameStyle: frameStyle,
|
|
52
54
|
href: link,
|
|
53
55
|
testId: testId,
|
|
54
56
|
icon: icon,
|
|
@@ -41,7 +41,7 @@ var EmbedCardUnauthorisedView = function EmbedCardUnauthorisedView(_ref) {
|
|
|
41
41
|
href: link,
|
|
42
42
|
icon: icon,
|
|
43
43
|
text: context && context.text,
|
|
44
|
-
|
|
44
|
+
frameStyle: "show",
|
|
45
45
|
isSelected: isSelected,
|
|
46
46
|
inheritDimensions: inheritDimensions,
|
|
47
47
|
onClick: onClick,
|
|
@@ -11,6 +11,7 @@ var _index = require("../../index");
|
|
|
11
11
|
var _constants = require("../../constants");
|
|
12
12
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
13
13
|
var flexibleUiOptions = {
|
|
14
|
+
hideBackground: true,
|
|
14
15
|
hideElevation: true,
|
|
15
16
|
size: _constants.SmartLinkSize.Medium,
|
|
16
17
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
package/dist/es2019/version.json
CHANGED
|
@@ -18,6 +18,7 @@ export function CardWithUrlContent({
|
|
|
18
18
|
url,
|
|
19
19
|
isSelected,
|
|
20
20
|
isFrameVisible,
|
|
21
|
+
frameStyle,
|
|
21
22
|
platform,
|
|
22
23
|
onClick,
|
|
23
24
|
appearance,
|
|
@@ -234,6 +235,7 @@ export function CardWithUrlContent({
|
|
|
234
235
|
analytics: analytics,
|
|
235
236
|
isSelected: isSelected,
|
|
236
237
|
isFrameVisible: isFrameVisible,
|
|
238
|
+
frameStyle: frameStyle,
|
|
237
239
|
platform: platform,
|
|
238
240
|
onResolve: onResolve,
|
|
239
241
|
onError: onError,
|
|
@@ -21,6 +21,7 @@ export function CardWithURLRenderer(props) {
|
|
|
21
21
|
appearance,
|
|
22
22
|
isSelected,
|
|
23
23
|
isFrameVisible,
|
|
24
|
+
frameStyle,
|
|
24
25
|
onClick,
|
|
25
26
|
container,
|
|
26
27
|
onResolve,
|
|
@@ -93,6 +94,7 @@ export function CardWithURLRenderer(props) {
|
|
|
93
94
|
onClick,
|
|
94
95
|
isSelected,
|
|
95
96
|
isFrameVisible,
|
|
97
|
+
frameStyle,
|
|
96
98
|
dispatchAnalytics,
|
|
97
99
|
container,
|
|
98
100
|
onResolve,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import { className, LinkWrapper, Wrapper, Header, IconWrapper, TextWrapper, Content } from './styled';
|
|
3
3
|
import { handleClickCommon } from '../../BlockCard/utils/handlers';
|
|
4
4
|
import useMouseDownEvent from '../../../state/analytics/useMouseDownEvent';
|
|
@@ -10,7 +10,7 @@ export const ExpandedFrame = ({
|
|
|
10
10
|
text,
|
|
11
11
|
isSelected,
|
|
12
12
|
isFrameVisible,
|
|
13
|
-
|
|
13
|
+
frameStyle,
|
|
14
14
|
href,
|
|
15
15
|
minWidth,
|
|
16
16
|
maxWidth,
|
|
@@ -21,6 +21,7 @@ export const ExpandedFrame = ({
|
|
|
21
21
|
const isInteractive = () => !isPlaceholder && (Boolean(href) || Boolean(onClick));
|
|
22
22
|
const handleClick = event => handleClickCommon(event, onClick);
|
|
23
23
|
const handleMouseDown = useMouseDownEvent();
|
|
24
|
+
const calculatedFrameStyle = useMemo(() => frameStyle !== undefined ? frameStyle : isFrameVisible ? 'show' : 'showOnHover', [frameStyle, isFrameVisible]);
|
|
24
25
|
const renderHeader = () => /*#__PURE__*/React.createElement(Header, {
|
|
25
26
|
className: "embed-header"
|
|
26
27
|
}, /*#__PURE__*/React.createElement(IconWrapper, {
|
|
@@ -35,25 +36,22 @@ export const ExpandedFrame = ({
|
|
|
35
36
|
const renderContent = () => /*#__PURE__*/React.createElement(Content, {
|
|
36
37
|
"data-testid": "embed-content-wrapper",
|
|
37
38
|
allowScrollBar: allowScrollBar,
|
|
38
|
-
isInteractive: isInteractive()
|
|
39
|
+
isInteractive: isInteractive(),
|
|
40
|
+
frameStyle: frameStyle
|
|
39
41
|
}, children);
|
|
40
42
|
if (!isPlaceholder && href) {
|
|
41
43
|
return /*#__PURE__*/React.createElement(LinkWrapper, {
|
|
42
44
|
className: className,
|
|
43
45
|
isInteractive: isInteractive(),
|
|
44
46
|
isSelected: isSelected,
|
|
45
|
-
|
|
47
|
+
frameStyle: calculatedFrameStyle,
|
|
46
48
|
minWidth: minWidth,
|
|
47
49
|
maxWidth: maxWidth,
|
|
48
|
-
isVisible: isVisible,
|
|
49
50
|
"data-testid": testId,
|
|
50
51
|
"data-trello-do-not-use-override": testId
|
|
51
52
|
// Due to limitations of testing library, we can't assert ::after
|
|
52
53
|
,
|
|
53
|
-
"data-is-selected": isSelected
|
|
54
|
-
// Due to limitation of testing library, we can't match background colors #ebecf0 and rgb(235, 236, 240)
|
|
55
|
-
,
|
|
56
|
-
"data-is-frame-visible": isFrameVisible,
|
|
54
|
+
"data-is-selected": isSelected,
|
|
57
55
|
inheritDimensions: inheritDimensions
|
|
58
56
|
}, renderHeader(), renderContent());
|
|
59
57
|
} else {
|
|
@@ -62,12 +60,11 @@ export const ExpandedFrame = ({
|
|
|
62
60
|
isInteractive: isInteractive(),
|
|
63
61
|
isSelected: isSelected,
|
|
64
62
|
minWidth: minWidth,
|
|
63
|
+
frameStyle: calculatedFrameStyle,
|
|
65
64
|
maxWidth: maxWidth,
|
|
66
|
-
isVisible: isVisible,
|
|
67
65
|
"data-testid": testId,
|
|
68
66
|
"data-trello-do-not-use-override": testId,
|
|
69
67
|
"data-is-selected": isSelected,
|
|
70
|
-
"data-is-visible": isVisible,
|
|
71
68
|
"data-wrapper-type": "default",
|
|
72
69
|
"data-is-interactive": isInteractive()
|
|
73
70
|
}, renderHeader(), renderContent());
|
|
@@ -41,25 +41,24 @@ function maxWidth({
|
|
|
41
41
|
return 'margin: 0 auto;';
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function getInteractiveStyles({
|
|
45
45
|
isInteractive,
|
|
46
|
-
|
|
46
|
+
frameStyle
|
|
47
47
|
}) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
` : '';
|
|
57
|
-
return `${visibleFrameStyles}${interactiveFrameStyles}`;
|
|
48
|
+
return isInteractive ? `
|
|
49
|
+
&:hover {
|
|
50
|
+
${frameStyle !== 'hide' && visibleStyles}
|
|
51
|
+
}
|
|
52
|
+
&:active {
|
|
53
|
+
background-color: ${`var(--ds-background-selected, ${colors.B50})`};
|
|
54
|
+
}
|
|
55
|
+
` : '';
|
|
58
56
|
}
|
|
59
57
|
function selected({
|
|
60
|
-
isSelected
|
|
58
|
+
isSelected,
|
|
59
|
+
frameStyle
|
|
61
60
|
}) {
|
|
62
|
-
return isSelected ? `
|
|
61
|
+
return isSelected && frameStyle !== 'hide' ? `
|
|
63
62
|
${visibleStyles}
|
|
64
63
|
&::after {
|
|
65
64
|
cursor: pointer;
|
|
@@ -72,7 +71,10 @@ function selected({
|
|
|
72
71
|
left: 0;
|
|
73
72
|
${borderRadius}
|
|
74
73
|
}
|
|
75
|
-
` : ''
|
|
74
|
+
` : isSelected && frameStyle === 'hide' ? `
|
|
75
|
+
box-shadow: 0 0 0 3px ${`var(--ds-border-selected, ${colors.B100})`};
|
|
76
|
+
${borderRadius}
|
|
77
|
+
` : '';
|
|
76
78
|
}
|
|
77
79
|
const height = ({
|
|
78
80
|
inheritDimensions
|
|
@@ -81,7 +83,7 @@ const wrapperStyles = props => `
|
|
|
81
83
|
${borderRadius}
|
|
82
84
|
${minWidth(props)}
|
|
83
85
|
${maxWidth(props)}
|
|
84
|
-
${
|
|
86
|
+
${getInteractiveStyles(props)}
|
|
85
87
|
${visible(props)}
|
|
86
88
|
display: inline-flex;
|
|
87
89
|
flex-direction: column;
|
|
@@ -116,9 +118,9 @@ const visibleStyles = `
|
|
|
116
118
|
opacity: 1;
|
|
117
119
|
}`;
|
|
118
120
|
function visible({
|
|
119
|
-
|
|
121
|
+
frameStyle
|
|
120
122
|
}) {
|
|
121
|
-
return
|
|
123
|
+
return frameStyle === 'show' ? visibleStyles : '';
|
|
122
124
|
}
|
|
123
125
|
export const LinkWrapper = styled.div`
|
|
124
126
|
${props => wrapperStyles(props)} &:hover {
|
|
@@ -185,8 +187,6 @@ export const Content = styled.div`
|
|
|
185
187
|
position: absolute;
|
|
186
188
|
z-index: 1;
|
|
187
189
|
width: 100%;
|
|
188
|
-
top: ${gridSize(4)};
|
|
189
|
-
height: calc(100% - ${gridSize(4)});
|
|
190
190
|
transition: box-shadow 0.3s;
|
|
191
191
|
|
|
192
192
|
> .calc-height > div > div {
|
|
@@ -217,6 +217,13 @@ export const Content = styled.div`
|
|
|
217
217
|
${({
|
|
218
218
|
allowScrollBar
|
|
219
219
|
}) => allowScrollBar ? 'overflow: auto;' : 'overflow: hidden;'}
|
|
220
|
+
|
|
221
|
+
${({
|
|
222
|
+
frameStyle
|
|
223
|
+
}) => frameStyle === 'hide' ? 'height: 100%;' : `
|
|
224
|
+
height: calc(100% - ${gridSize(4)});
|
|
225
|
+
top: ${gridSize(4)};
|
|
226
|
+
`}
|
|
220
227
|
`;
|
|
221
228
|
export const Image = styled.img`
|
|
222
229
|
${({
|
|
@@ -27,6 +27,7 @@ export const EmbedCard = /*#__PURE__*/React.forwardRef(({
|
|
|
27
27
|
showActions,
|
|
28
28
|
isSelected,
|
|
29
29
|
isFrameVisible,
|
|
30
|
+
frameStyle,
|
|
30
31
|
platform,
|
|
31
32
|
onResolve,
|
|
32
33
|
onError,
|
|
@@ -61,11 +62,13 @@ export const EmbedCard = /*#__PURE__*/React.forwardRef(({
|
|
|
61
62
|
return /*#__PURE__*/React.createElement(EmbedCardResolvedView, _extends({}, resolvedViewProps, {
|
|
62
63
|
isSelected: isSelected,
|
|
63
64
|
isFrameVisible: isFrameVisible,
|
|
65
|
+
frameStyle: frameStyle,
|
|
64
66
|
inheritDimensions: inheritDimensions,
|
|
65
67
|
onClick: handleFrameClick,
|
|
66
68
|
ref: iframeRef,
|
|
67
69
|
onIframeDwell: onIframeDwell,
|
|
68
|
-
onIframeFocus: onIframeFocus
|
|
70
|
+
onIframeFocus: onIframeFocus,
|
|
71
|
+
testId: testId
|
|
69
72
|
}));
|
|
70
73
|
} else {
|
|
71
74
|
if (platform === 'mobile') {
|
|
@@ -11,6 +11,7 @@ export const EmbedCardResolvedView = /*#__PURE__*/React.forwardRef(({
|
|
|
11
11
|
onClick,
|
|
12
12
|
isSelected,
|
|
13
13
|
isFrameVisible,
|
|
14
|
+
frameStyle,
|
|
14
15
|
preview,
|
|
15
16
|
title,
|
|
16
17
|
isTrusted,
|
|
@@ -39,6 +40,7 @@ export const EmbedCardResolvedView = /*#__PURE__*/React.forwardRef(({
|
|
|
39
40
|
return jsx(ExpandedFrame, {
|
|
40
41
|
isSelected: isSelected,
|
|
41
42
|
isFrameVisible: isFrameVisible,
|
|
43
|
+
frameStyle: frameStyle,
|
|
42
44
|
href: link,
|
|
43
45
|
testId: testId,
|
|
44
46
|
icon: icon,
|
|
@@ -2,6 +2,7 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
import { loadingPlaceholderClassName } from '../../index';
|
|
3
3
|
import { SmartLinkSize, SmartLinkTheme } from '../../constants';
|
|
4
4
|
export const flexibleUiOptions = {
|
|
5
|
+
hideBackground: true,
|
|
5
6
|
hideElevation: true,
|
|
6
7
|
size: SmartLinkSize.Medium,
|
|
7
8
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
package/dist/esm/version.json
CHANGED
|
@@ -18,6 +18,7 @@ export function CardWithUrlContent(_ref) {
|
|
|
18
18
|
url = _ref.url,
|
|
19
19
|
isSelected = _ref.isSelected,
|
|
20
20
|
isFrameVisible = _ref.isFrameVisible,
|
|
21
|
+
frameStyle = _ref.frameStyle,
|
|
21
22
|
platform = _ref.platform,
|
|
22
23
|
onClick = _ref.onClick,
|
|
23
24
|
appearance = _ref.appearance,
|
|
@@ -237,6 +238,7 @@ export function CardWithUrlContent(_ref) {
|
|
|
237
238
|
analytics: analytics,
|
|
238
239
|
isSelected: isSelected,
|
|
239
240
|
isFrameVisible: isFrameVisible,
|
|
241
|
+
frameStyle: frameStyle,
|
|
240
242
|
platform: platform,
|
|
241
243
|
onResolve: onResolve,
|
|
242
244
|
onError: onError,
|
|
@@ -29,6 +29,7 @@ export function CardWithURLRenderer(props) {
|
|
|
29
29
|
appearance = props.appearance,
|
|
30
30
|
isSelected = props.isSelected,
|
|
31
31
|
isFrameVisible = props.isFrameVisible,
|
|
32
|
+
frameStyle = props.frameStyle,
|
|
32
33
|
onClick = props.onClick,
|
|
33
34
|
container = props.container,
|
|
34
35
|
onResolve = props.onResolve,
|
|
@@ -98,6 +99,7 @@ export function CardWithURLRenderer(props) {
|
|
|
98
99
|
onClick: onClick,
|
|
99
100
|
isSelected: isSelected,
|
|
100
101
|
isFrameVisible: isFrameVisible,
|
|
102
|
+
frameStyle: frameStyle,
|
|
101
103
|
dispatchAnalytics: dispatchAnalytics,
|
|
102
104
|
container: container,
|
|
103
105
|
onResolve: onResolve,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import { className, LinkWrapper, Wrapper, Header, IconWrapper, TextWrapper, Content } from './styled';
|
|
3
3
|
import { handleClickCommon } from '../../BlockCard/utils/handlers';
|
|
4
4
|
import useMouseDownEvent from '../../../state/analytics/useMouseDownEvent';
|
|
@@ -11,7 +11,7 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
11
11
|
text = _ref.text,
|
|
12
12
|
isSelected = _ref.isSelected,
|
|
13
13
|
isFrameVisible = _ref.isFrameVisible,
|
|
14
|
-
|
|
14
|
+
frameStyle = _ref.frameStyle,
|
|
15
15
|
href = _ref.href,
|
|
16
16
|
minWidth = _ref.minWidth,
|
|
17
17
|
maxWidth = _ref.maxWidth,
|
|
@@ -27,6 +27,9 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
27
27
|
return handleClickCommon(event, onClick);
|
|
28
28
|
};
|
|
29
29
|
var handleMouseDown = useMouseDownEvent();
|
|
30
|
+
var calculatedFrameStyle = useMemo(function () {
|
|
31
|
+
return frameStyle !== undefined ? frameStyle : isFrameVisible ? 'show' : 'showOnHover';
|
|
32
|
+
}, [frameStyle, isFrameVisible]);
|
|
30
33
|
var renderHeader = function renderHeader() {
|
|
31
34
|
return /*#__PURE__*/React.createElement(Header, {
|
|
32
35
|
className: "embed-header"
|
|
@@ -44,7 +47,8 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
44
47
|
return /*#__PURE__*/React.createElement(Content, {
|
|
45
48
|
"data-testid": "embed-content-wrapper",
|
|
46
49
|
allowScrollBar: allowScrollBar,
|
|
47
|
-
isInteractive: isInteractive()
|
|
50
|
+
isInteractive: isInteractive(),
|
|
51
|
+
frameStyle: frameStyle
|
|
48
52
|
}, children);
|
|
49
53
|
};
|
|
50
54
|
if (!isPlaceholder && href) {
|
|
@@ -52,18 +56,14 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
52
56
|
className: className,
|
|
53
57
|
isInteractive: isInteractive(),
|
|
54
58
|
isSelected: isSelected,
|
|
55
|
-
|
|
59
|
+
frameStyle: calculatedFrameStyle,
|
|
56
60
|
minWidth: minWidth,
|
|
57
61
|
maxWidth: maxWidth,
|
|
58
|
-
isVisible: isVisible,
|
|
59
62
|
"data-testid": testId,
|
|
60
63
|
"data-trello-do-not-use-override": testId
|
|
61
64
|
// Due to limitations of testing library, we can't assert ::after
|
|
62
65
|
,
|
|
63
|
-
"data-is-selected": isSelected
|
|
64
|
-
// Due to limitation of testing library, we can't match background colors #ebecf0 and rgb(235, 236, 240)
|
|
65
|
-
,
|
|
66
|
-
"data-is-frame-visible": isFrameVisible,
|
|
66
|
+
"data-is-selected": isSelected,
|
|
67
67
|
inheritDimensions: inheritDimensions
|
|
68
68
|
}, renderHeader(), renderContent());
|
|
69
69
|
} else {
|
|
@@ -72,12 +72,11 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
72
72
|
isInteractive: isInteractive(),
|
|
73
73
|
isSelected: isSelected,
|
|
74
74
|
minWidth: minWidth,
|
|
75
|
+
frameStyle: calculatedFrameStyle,
|
|
75
76
|
maxWidth: maxWidth,
|
|
76
|
-
isVisible: isVisible,
|
|
77
77
|
"data-testid": testId,
|
|
78
78
|
"data-trello-do-not-use-override": testId,
|
|
79
79
|
"data-is-selected": isSelected,
|
|
80
|
-
"data-is-visible": isVisible,
|
|
81
80
|
"data-wrapper-type": "default",
|
|
82
81
|
"data-is-interactive": isInteractive()
|
|
83
82
|
}, renderHeader(), renderContent());
|
|
@@ -33,28 +33,27 @@ function maxWidth(_ref2) {
|
|
|
33
33
|
return 'margin: 0 auto;';
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function getInteractiveStyles(_ref3) {
|
|
37
37
|
var isInteractive = _ref3.isInteractive,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
var interactiveFrameStyles = isInteractive ? "\n &:hover {\n ".concat(visibleStyles, "\n }\n &:active {\n background-color: ", "var(--ds-background-selected, ".concat(colors.B50, ")"), ";\n }\n") : '';
|
|
41
|
-
return "".concat(visibleFrameStyles).concat(interactiveFrameStyles);
|
|
38
|
+
frameStyle = _ref3.frameStyle;
|
|
39
|
+
return isInteractive ? "\n &:hover {\n ".concat(frameStyle !== 'hide' && visibleStyles, "\n }\n &:active {\n background-color: ", "var(--ds-background-selected, ".concat(colors.B50, ")"), ";\n }\n ") : '';
|
|
42
40
|
}
|
|
43
41
|
function selected(_ref4) {
|
|
44
|
-
var isSelected = _ref4.isSelected
|
|
45
|
-
|
|
42
|
+
var isSelected = _ref4.isSelected,
|
|
43
|
+
frameStyle = _ref4.frameStyle;
|
|
44
|
+
return isSelected && frameStyle !== 'hide' ? "\n ".concat(visibleStyles, "\n &::after {\n cursor: pointer;\n box-shadow: 0 0 0 3px ", "var(--ds-border-selected, ".concat(colors.B100, ")"), ";\n content: '';\n outline: none;\n position: absolute;\n height: 100%;\n width: 100%;\n left: 0;\n ").concat(borderRadius, "\n }\n ") : isSelected && frameStyle === 'hide' ? "\n box-shadow: 0 0 0 3px ".concat("var(--ds-border-selected, ".concat(colors.B100, ")"), ";\n ", borderRadius, "\n ") : '';
|
|
46
45
|
}
|
|
47
46
|
var height = function height(_ref5) {
|
|
48
47
|
var inheritDimensions = _ref5.inheritDimensions;
|
|
49
48
|
return inheritDimensions ? 'height: 100%;' : "height: ".concat(gridSize(54));
|
|
50
49
|
};
|
|
51
50
|
var wrapperStyles = function wrapperStyles(props) {
|
|
52
|
-
return "\n ".concat(borderRadius, "\n ").concat(minWidth(props), "\n ").concat(maxWidth(props), "\n ").concat(
|
|
51
|
+
return "\n ".concat(borderRadius, "\n ").concat(minWidth(props), "\n ").concat(maxWidth(props), "\n ").concat(getInteractiveStyles(props), "\n ").concat(visible(props), "\n display: inline-flex;\n flex-direction: column;\n box-sizing: border-box;\n font-family: ").concat(fontFamily(), ";\n width: 100%;\n user-select: none;\n line-height: initial;\n transition: background 0.3s;\n position: relative;\n ").concat(height(props), ";\n ").concat(selected(props), "\n\n &:after {\n content: '';\n background: transparent;\n transition: background 0.3s, box-shadow 0.3s;\n position: absolute;\n width: calc(100% + ").concat(gridSize(2), ");\n height: calc(100% + ").concat(gridSize(1), ");\n left: -").concat(gridSize(1), ";\n ").concat(borderRadius, "\n }\n");
|
|
53
52
|
};
|
|
54
53
|
var visibleStyles = "\n background-color: ".concat("var(--ds-background-neutral-subtle, ".concat(colors.N30, ")"), ";\n\n &:after {\n background: ", "var(--ds-background-neutral, ".concat(colors.N30, ")"), " !important;\n }\n .embed-header {\n opacity: 1;\n }");
|
|
55
54
|
function visible(_ref6) {
|
|
56
|
-
var
|
|
57
|
-
return
|
|
55
|
+
var frameStyle = _ref6.frameStyle;
|
|
56
|
+
return frameStyle === 'show' ? visibleStyles : '';
|
|
58
57
|
}
|
|
59
58
|
export var LinkWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", " &:hover {\n text-decoration: none;\n }\n"])), function (props) {
|
|
60
59
|
return wrapperStyles(props);
|
|
@@ -83,7 +82,7 @@ export var TextWrapper = styled.div(_templateObject5 || (_templateObject5 = _tag
|
|
|
83
82
|
// NB: `overflow` is kept as `hidden` since
|
|
84
83
|
// the internal contents of the `iframe` should
|
|
85
84
|
// manage scrolling behaviour.
|
|
86
|
-
export var Content = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n ", "\n background-color: ", ";\n position: absolute;\n z-index: 1;\n width: 100%;\n
|
|
85
|
+
export var Content = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n ", "\n background-color: ", ";\n position: absolute;\n z-index: 1;\n width: 100%;\n transition: box-shadow 0.3s;\n\n > .calc-height > div > div {\n left: unset !important;\n width: unset !important;\n height: unset !important;\n position: initial !important;\n padding-bottom: unset !important;\n }\n > .embed-preview > div {\n margin: 0 auto;\n }\n\n ", ";\n\n ", "\n\n ", "\n"])), borderRadius, cardShadow, "var(--ds-surface-raised, white)", function (_ref9) {
|
|
87
86
|
var isInteractive = _ref9.isInteractive;
|
|
88
87
|
if (isInteractive) {
|
|
89
88
|
return "\n .".concat(className, ":hover & {\n box-shadow: ", "var(--ds-shadow-overlay, 0 4px 8px -2px rgba(23, 43, 77, 0.32), 0 0 1px rgba(23, 43, 77, 0.25))", ";\n }\n ");
|
|
@@ -93,9 +92,12 @@ export var Content = styled.div(_templateObject6 || (_templateObject6 = _taggedT
|
|
|
93
92
|
}, function (_ref10) {
|
|
94
93
|
var allowScrollBar = _ref10.allowScrollBar;
|
|
95
94
|
return allowScrollBar ? 'overflow: auto;' : 'overflow: hidden;';
|
|
95
|
+
}, function (_ref11) {
|
|
96
|
+
var frameStyle = _ref11.frameStyle;
|
|
97
|
+
return frameStyle === 'hide' ? 'height: 100%;' : "\n height: calc(100% - ".concat(gridSize(4), ");\n top: ").concat(gridSize(4), ";\n ");
|
|
96
98
|
});
|
|
97
|
-
export var Image = styled.img(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", "\n ", "\n\n /* hide the alt text when the image cannot be found */\n overflow: hidden;\n"])), function (
|
|
98
|
-
var size =
|
|
99
|
+
export var Image = styled.img(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", "\n ", "\n\n /* hide the alt text when the image cannot be found */\n overflow: hidden;\n"])), function (_ref12) {
|
|
100
|
+
var size = _ref12.size;
|
|
99
101
|
return csssize(size);
|
|
100
102
|
}, borderRadius);
|
|
101
103
|
export var maxAvatarCount = 6;
|
|
@@ -104,8 +106,8 @@ export var Title = styled.div(_templateObject9 || (_templateObject9 = _taggedTem
|
|
|
104
106
|
export var Byline = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin-top: 4px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n ", ";\n"])), "var(--ds-text-subtlest, ".concat(colors.N300, ")"), 16 / 12, ellipsis('100%'));
|
|
105
107
|
export var Description = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-top: 7px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), "var(--ds-text, ".concat(colors.N800, ")"), 18 / 12, 18 * 3);
|
|
106
108
|
export var ResolvedViewIconWrapper = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-top: 4px;\n"])));
|
|
107
|
-
export var Thumbnail = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n ", "\n ", "\n float: right;\n margin: 4px 0 12px 12px;\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), "var(--ds-skeleton, ".concat(colors.N30, ")"), function (
|
|
108
|
-
var src =
|
|
109
|
+
export var Thumbnail = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n ", "\n ", "\n float: right;\n margin: 4px 0 12px 12px;\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), "var(--ds-skeleton, ".concat(colors.N30, ")"), function (_ref13) {
|
|
110
|
+
var src = _ref13.src;
|
|
109
111
|
return src;
|
|
110
112
|
});
|
|
111
113
|
export var UsersWrapper = styled.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin-top: 8px;\n"])));
|
|
@@ -27,6 +27,7 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef)
|
|
|
27
27
|
showActions = _ref.showActions,
|
|
28
28
|
isSelected = _ref.isSelected,
|
|
29
29
|
isFrameVisible = _ref.isFrameVisible,
|
|
30
|
+
frameStyle = _ref.frameStyle,
|
|
30
31
|
platform = _ref.platform,
|
|
31
32
|
onResolve = _ref.onResolve,
|
|
32
33
|
onError = _ref.onError,
|
|
@@ -59,11 +60,13 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef)
|
|
|
59
60
|
return /*#__PURE__*/React.createElement(EmbedCardResolvedView, _extends({}, resolvedViewProps, {
|
|
60
61
|
isSelected: isSelected,
|
|
61
62
|
isFrameVisible: isFrameVisible,
|
|
63
|
+
frameStyle: frameStyle,
|
|
62
64
|
inheritDimensions: inheritDimensions,
|
|
63
65
|
onClick: handleFrameClick,
|
|
64
66
|
ref: iframeRef,
|
|
65
67
|
onIframeDwell: onIframeDwell,
|
|
66
|
-
onIframeFocus: onIframeFocus
|
|
68
|
+
onIframeFocus: onIframeFocus,
|
|
69
|
+
testId: testId
|
|
67
70
|
}));
|
|
68
71
|
} else {
|
|
69
72
|
if (platform === 'mobile') {
|
|
@@ -45,7 +45,7 @@ export var EmbedCardForbiddenView = function EmbedCardForbiddenView(_ref) {
|
|
|
45
45
|
href: link,
|
|
46
46
|
icon: icon,
|
|
47
47
|
text: context && context.text,
|
|
48
|
-
|
|
48
|
+
frameStyle: "show",
|
|
49
49
|
isSelected: isSelected,
|
|
50
50
|
inheritDimensions: inheritDimensions,
|
|
51
51
|
onClick: onClick,
|
|
@@ -18,7 +18,7 @@ export var EmbedCardNotFoundView = function EmbedCardNotFoundView(_ref) {
|
|
|
18
18
|
href: link,
|
|
19
19
|
icon: icon,
|
|
20
20
|
text: context && context.text,
|
|
21
|
-
|
|
21
|
+
frameStyle: "show",
|
|
22
22
|
isSelected: isSelected,
|
|
23
23
|
inheritDimensions: inheritDimensions,
|
|
24
24
|
onClick: onClick,
|
|
@@ -11,6 +11,7 @@ export var EmbedCardResolvedView = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
|
11
11
|
onClick = _ref.onClick,
|
|
12
12
|
isSelected = _ref.isSelected,
|
|
13
13
|
isFrameVisible = _ref.isFrameVisible,
|
|
14
|
+
frameStyle = _ref.frameStyle,
|
|
14
15
|
preview = _ref.preview,
|
|
15
16
|
title = _ref.title,
|
|
16
17
|
isTrusted = _ref.isTrusted,
|
|
@@ -41,6 +42,7 @@ export var EmbedCardResolvedView = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
|
41
42
|
return jsx(ExpandedFrame, {
|
|
42
43
|
isSelected: isSelected,
|
|
43
44
|
isFrameVisible: isFrameVisible,
|
|
45
|
+
frameStyle: frameStyle,
|
|
44
46
|
href: link,
|
|
45
47
|
testId: testId,
|
|
46
48
|
icon: icon,
|
|
@@ -31,7 +31,7 @@ export var EmbedCardUnauthorisedView = function EmbedCardUnauthorisedView(_ref)
|
|
|
31
31
|
href: link,
|
|
32
32
|
icon: icon,
|
|
33
33
|
text: context && context.text,
|
|
34
|
-
|
|
34
|
+
frameStyle: "show",
|
|
35
35
|
isSelected: isSelected,
|
|
36
36
|
inheritDimensions: inheritDimensions,
|
|
37
37
|
onClick: onClick,
|
|
@@ -4,6 +4,7 @@ import { css } from '@emotion/react';
|
|
|
4
4
|
import { loadingPlaceholderClassName } from '../../index';
|
|
5
5
|
import { SmartLinkSize, SmartLinkTheme } from '../../constants';
|
|
6
6
|
export var flexibleUiOptions = {
|
|
7
|
+
hideBackground: true,
|
|
7
8
|
hideElevation: true,
|
|
8
9
|
size: SmartLinkSize.Medium,
|
|
9
10
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CardAppearance, CardPlatform, CardProps } from './types';
|
|
3
3
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "appearance" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "ui" | "showActions" | "showHoverPreview" | "onResolve" | "platform" | "showAuthTooltip" | "
|
|
4
|
+
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "appearance" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "ui" | "showActions" | "showHoverPreview" | "onResolve" | "platform" | "showAuthTooltip" | "frameStyle" | "embedIframeRef" | "inlinePreloaderStyle" | "isFrameVisible" | "importer" | "container" | "analyticsEvents" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
5
5
|
export type { CardAppearance, CardProps, CardPlatform };
|
|
@@ -4,6 +4,7 @@ import { CardAppearance, CardPlatform } from '@atlaskit/linking-common';
|
|
|
4
4
|
import { AnalyticsFacade } from '../../state/analytics';
|
|
5
5
|
import { FlexibleUiOptions } from '../FlexibleCard/types';
|
|
6
6
|
import { InlinePreloaderStyle, OnErrorCallback } from '../types';
|
|
7
|
+
import { FrameStyle } from '../EmbedCard/types';
|
|
7
8
|
export type { CardAppearance, CardPlatform };
|
|
8
9
|
export declare type CardInnerAppearance = CardAppearance | 'embedPreview' | 'flexible' | 'hoverCardPreview';
|
|
9
10
|
export declare type OnResolveCallback = (data: {
|
|
@@ -16,7 +17,13 @@ export interface CardProps extends WithAnalyticsEventsProps {
|
|
|
16
17
|
id?: string;
|
|
17
18
|
platform?: CardPlatform;
|
|
18
19
|
isSelected?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated please use 'frameStyle' prop instead. Current usages will be converted in the following manner:
|
|
22
|
+
* isFrameVisible: true => frameStyle: 'show', isFrameVisible: false => frameStyle: 'showOnHover'
|
|
23
|
+
*/
|
|
19
24
|
isFrameVisible?: boolean;
|
|
25
|
+
/** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
|
|
26
|
+
frameStyle?: FrameStyle;
|
|
20
27
|
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
21
28
|
importer?: (target: any) => void;
|
|
22
29
|
container?: HTMLElement;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CardWithUrlContentProps } from './types';
|
|
3
|
-
export declare function CardWithUrlContent({ id, url, isSelected, isFrameVisible, platform, onClick, appearance, dispatchAnalytics, onResolve, onError, testId, showActions, inheritDimensions, embedIframeRef, inlinePreloaderStyle, ui, children, showHoverPreview, showAuthTooltip: showAuthTooltipProp, analyticsEvents, }: CardWithUrlContentProps): JSX.Element;
|
|
3
|
+
export declare function CardWithUrlContent({ id, url, isSelected, isFrameVisible, frameStyle, platform, onClick, appearance, dispatchAnalytics, onResolve, onError, testId, showActions, inheritDimensions, embedIframeRef, inlinePreloaderStyle, ui, children, showHoverPreview, showAuthTooltip: showAuthTooltipProp, analyticsEvents, }: CardWithUrlContentProps): JSX.Element;
|
|
@@ -4,6 +4,7 @@ import { AnalyticsHandler } from '../../utils/types';
|
|
|
4
4
|
import { FlexibleUiOptions } from '../FlexibleCard/types';
|
|
5
5
|
import { InlinePreloaderStyle, OnErrorCallback } from '../types';
|
|
6
6
|
import { AnalyticsFacade } from '../../state/analytics';
|
|
7
|
+
import { FrameStyle } from '../EmbedCard/types';
|
|
7
8
|
export declare type CardWithUrlContentProps = {
|
|
8
9
|
id: string;
|
|
9
10
|
url: string;
|
|
@@ -12,6 +13,7 @@ export declare type CardWithUrlContentProps = {
|
|
|
12
13
|
onClick?: EventHandler<MouseEvent | KeyboardEvent>;
|
|
13
14
|
isSelected?: boolean;
|
|
14
15
|
isFrameVisible?: boolean;
|
|
16
|
+
frameStyle?: FrameStyle;
|
|
15
17
|
container?: HTMLElement;
|
|
16
18
|
dispatchAnalytics: AnalyticsHandler;
|
|
17
19
|
testId?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
+
import { FrameStyle } from '../types';
|
|
2
3
|
export interface ExpandedFrameProps {
|
|
3
4
|
isPlaceholder?: boolean;
|
|
4
5
|
href?: string;
|
|
@@ -9,10 +10,10 @@ export interface ExpandedFrameProps {
|
|
|
9
10
|
children?: React.ReactNode;
|
|
10
11
|
/** A flag that determines whether the card is selected in edit mode. */
|
|
11
12
|
isSelected?: boolean;
|
|
12
|
-
/**
|
|
13
|
+
/** @deprecated use frameStyle prop */
|
|
13
14
|
isFrameVisible?: boolean;
|
|
14
|
-
/** A
|
|
15
|
-
|
|
15
|
+
/** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
|
|
16
|
+
frameStyle?: FrameStyle;
|
|
16
17
|
/** The optional click handler */
|
|
17
18
|
onClick?: (evt: React.MouseEvent) => void;
|
|
18
19
|
/** For testing purposes only */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { FrameStyle } from '../types';
|
|
2
3
|
export declare const className = "media-card-frame";
|
|
3
4
|
export declare const cardShadow = "";
|
|
4
5
|
export interface WrapperProps {
|
|
@@ -6,8 +7,7 @@ export interface WrapperProps {
|
|
|
6
7
|
maxWidth?: number;
|
|
7
8
|
isInteractive?: boolean;
|
|
8
9
|
isSelected?: boolean;
|
|
9
|
-
|
|
10
|
-
isVisible?: boolean;
|
|
10
|
+
frameStyle?: FrameStyle;
|
|
11
11
|
inheritDimensions?: boolean;
|
|
12
12
|
}
|
|
13
13
|
export declare const borderRadius: string;
|
|
@@ -40,6 +40,7 @@ export declare const TextWrapper: import("@emotion/styled").StyledComponent<{
|
|
|
40
40
|
export interface ContentProps {
|
|
41
41
|
isInteractive: boolean;
|
|
42
42
|
allowScrollBar: boolean;
|
|
43
|
+
frameStyle?: FrameStyle;
|
|
43
44
|
}
|
|
44
45
|
export declare const Content: import("@emotion/styled").StyledComponent<{
|
|
45
46
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -17,6 +17,7 @@ export declare type EmbedCardProps = {
|
|
|
17
17
|
id?: string;
|
|
18
18
|
isSelected?: boolean;
|
|
19
19
|
isFrameVisible?: boolean;
|
|
20
|
+
frameStyle?: FrameStyle;
|
|
20
21
|
platform?: CardPlatform;
|
|
21
22
|
onResolve?: OnResolveCallback;
|
|
22
23
|
onError?: OnErrorCallback;
|
|
@@ -47,3 +48,4 @@ export interface RequestAccessContextProps extends AccessContext {
|
|
|
47
48
|
descriptiveMessageKey?: RequestAccessMessageKey;
|
|
48
49
|
}
|
|
49
50
|
export declare type InlinePreloaderStyle = 'on-left-with-skeleton' | 'on-right-without-skeleton';
|
|
51
|
+
export declare type FrameStyle = 'show' | 'hide' | 'showOnHover';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ContextViewModel } from '../types';
|
|
2
|
+
import { ContextViewModel, FrameStyle } from '../types';
|
|
3
3
|
export interface EmbedCardResolvedViewProps {
|
|
4
4
|
/** The title of the link */
|
|
5
5
|
title?: string;
|
|
@@ -11,6 +11,8 @@ export interface EmbedCardResolvedViewProps {
|
|
|
11
11
|
isSelected?: boolean;
|
|
12
12
|
/** will show the frame regardless of user interaction */
|
|
13
13
|
isFrameVisible?: boolean;
|
|
14
|
+
/** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
|
|
15
|
+
frameStyle?: FrameStyle;
|
|
14
16
|
/** The src to be used for the `iframe` */
|
|
15
17
|
preview?: {
|
|
16
18
|
src: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "24.0
|
|
3
|
+
"version": "24.1.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@atlaskit/popup": "^1.5.0",
|
|
43
43
|
"@atlaskit/spinner": "^15.3.0",
|
|
44
44
|
"@atlaskit/theme": "^12.2.0",
|
|
45
|
-
"@atlaskit/tokens": "^1.
|
|
45
|
+
"@atlaskit/tokens": "^1.1.0",
|
|
46
46
|
"@atlaskit/tooltip": "^17.6.0",
|
|
47
47
|
"@atlaskit/ufo": "^0.1.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
package/report.api.md
CHANGED
|
@@ -241,6 +241,7 @@ export const Card: React_2.ForwardRefExoticComponent<
|
|
|
241
241
|
| 'data'
|
|
242
242
|
| 'embedIframeRef'
|
|
243
243
|
| 'forwardedRef'
|
|
244
|
+
| 'frameStyle'
|
|
244
245
|
| 'id'
|
|
245
246
|
| 'importer'
|
|
246
247
|
| 'inheritDimensions'
|
|
@@ -292,6 +293,7 @@ export interface CardProps extends WithAnalyticsEventsProps {
|
|
|
292
293
|
data?: any;
|
|
293
294
|
// (undocumented)
|
|
294
295
|
embedIframeRef?: React.Ref<HTMLIFrameElement>;
|
|
296
|
+
frameStyle?: FrameStyle;
|
|
295
297
|
// (undocumented)
|
|
296
298
|
id?: string;
|
|
297
299
|
// (undocumented)
|
|
@@ -300,7 +302,7 @@ export interface CardProps extends WithAnalyticsEventsProps {
|
|
|
300
302
|
inheritDimensions?: boolean;
|
|
301
303
|
// (undocumented)
|
|
302
304
|
inlinePreloaderStyle?: InlinePreloaderStyle;
|
|
303
|
-
// (undocumented)
|
|
305
|
+
// @deprecated (undocumented)
|
|
304
306
|
isFrameVisible?: boolean;
|
|
305
307
|
// (undocumented)
|
|
306
308
|
isSelected?: boolean;
|
|
@@ -550,6 +552,9 @@ type FooterBlockProps = {
|
|
|
550
552
|
onActionMenuOpenChange?: (options: OnActionMenuOpenChangeOptions) => void;
|
|
551
553
|
} & BlockProps;
|
|
552
554
|
|
|
555
|
+
// @public (undocumented)
|
|
556
|
+
type FrameStyle = 'hide' | 'show' | 'showOnHover';
|
|
557
|
+
|
|
553
558
|
export { InlineCardAdf };
|
|
554
559
|
|
|
555
560
|
// @public (undocumented)
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -178,7 +178,7 @@ type BlockProps = {
|
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
// @public (undocumented)
|
|
181
|
-
export const Card: React_2.ForwardRefExoticComponent<Pick<Omit<React_2.PropsWithChildren<WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof WithAnalyticsEventsProps> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "analyticsEvents" | "appearance" | "children" | "container" | "data" | "embedIframeRef" | "forwardedRef" | "id" | "importer" | "inheritDimensions" | "inlinePreloaderStyle" | "isFrameVisible" | "isSelected" | "key" | "onClick" | "onError" | "onResolve" | "placeholder" | "platform" | "showActions" | "showAuthTooltip" | "showHoverPreview" | "testId" | "ui" | "url"> & React_2.RefAttributes<any>>;
|
|
181
|
+
export const Card: React_2.ForwardRefExoticComponent<Pick<Omit<React_2.PropsWithChildren<WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof WithAnalyticsEventsProps> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "analyticsEvents" | "appearance" | "children" | "container" | "data" | "embedIframeRef" | "forwardedRef" | "frameStyle" | "id" | "importer" | "inheritDimensions" | "inlinePreloaderStyle" | "isFrameVisible" | "isSelected" | "key" | "onClick" | "onError" | "onResolve" | "placeholder" | "platform" | "showActions" | "showAuthTooltip" | "showHoverPreview" | "testId" | "ui" | "url"> & React_2.RefAttributes<any>>;
|
|
182
182
|
|
|
183
183
|
export { CardAdf }
|
|
184
184
|
|
|
@@ -205,6 +205,7 @@ export interface CardProps extends WithAnalyticsEventsProps {
|
|
|
205
205
|
data?: any;
|
|
206
206
|
// (undocumented)
|
|
207
207
|
embedIframeRef?: React.Ref<HTMLIFrameElement>;
|
|
208
|
+
frameStyle?: FrameStyle;
|
|
208
209
|
// (undocumented)
|
|
209
210
|
id?: string;
|
|
210
211
|
// (undocumented)
|
|
@@ -213,7 +214,7 @@ export interface CardProps extends WithAnalyticsEventsProps {
|
|
|
213
214
|
inheritDimensions?: boolean;
|
|
214
215
|
// (undocumented)
|
|
215
216
|
inlinePreloaderStyle?: InlinePreloaderStyle;
|
|
216
|
-
// (undocumented)
|
|
217
|
+
// @deprecated (undocumented)
|
|
217
218
|
isFrameVisible?: boolean;
|
|
218
219
|
// (undocumented)
|
|
219
220
|
isSelected?: boolean;
|
|
@@ -424,6 +425,9 @@ type FooterBlockProps = {
|
|
|
424
425
|
onActionMenuOpenChange?: (options: OnActionMenuOpenChangeOptions) => void;
|
|
425
426
|
} & BlockProps;
|
|
426
427
|
|
|
428
|
+
// @public (undocumented)
|
|
429
|
+
type FrameStyle = 'hide' | 'show' | 'showOnHover';
|
|
430
|
+
|
|
427
431
|
export { InlineCardAdf }
|
|
428
432
|
|
|
429
433
|
// @public (undocumented)
|