@atlaskit/smart-card 21.1.2 → 21.1.3
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 +10 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/EmbedModal/components/embed-content/index.js +1 -1
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +4 -2
- package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/index.js +1 -0
- package/dist/cjs/view/EmbedModal/components/link-info/styled.js +7 -14
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/EmbedModal/components/embed-content/index.js +1 -1
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +4 -2
- package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/index.js +1 -0
- package/dist/es2019/view/EmbedModal/components/link-info/styled.js +24 -19
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/EmbedModal/components/embed-content/index.js +1 -1
- package/dist/esm/view/EmbedModal/components/link-info/index.js +4 -2
- package/dist/esm/view/EmbedModal/components/link-info/link-info-button/index.js +1 -0
- package/dist/esm/view/EmbedModal/components/link-info/styled.js +6 -9
- package/dist/types/view/EmbedModal/components/link-info/styled.d.ts +0 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 21.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d0b3a262e03`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d0b3a262e03) - [ux] Embed Preview: Update the new embed preview modal UX
|
|
8
|
+
|
|
9
|
+
- Make title smaller
|
|
10
|
+
- Reduce gap between element
|
|
11
|
+
- Hide resize button on smaller screen
|
|
12
|
+
|
|
3
13
|
## 21.1.2
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/cjs/version.json
CHANGED
|
@@ -17,7 +17,7 @@ var _utils = require("../../../../utils");
|
|
|
17
17
|
|
|
18
18
|
var _templateObject;
|
|
19
19
|
|
|
20
|
-
var iframeCss = (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: calc(100vh -
|
|
20
|
+
var iframeCss = (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: calc(100vh - 208px);\n"])));
|
|
21
21
|
|
|
22
22
|
var EmbedContent = function EmbedContent(_ref) {
|
|
23
23
|
var isTrusted = _ref.isTrusted,
|
|
@@ -93,12 +93,14 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
93
93
|
}) : (0, _core.jsx)(_vidFullScreenOn.default, {
|
|
94
94
|
label: message.defaultMessage
|
|
95
95
|
});
|
|
96
|
-
return (0, _core.jsx)(
|
|
96
|
+
return (0, _core.jsx)("span", {
|
|
97
|
+
className: "smart-link-resize-button"
|
|
98
|
+
}, (0, _core.jsx)(_linkInfoButton.default, {
|
|
97
99
|
content: (0, _core.jsx)(_reactIntlNext.FormattedMessage, message),
|
|
98
100
|
icon: icon,
|
|
99
101
|
onClick: onResizeButtonClick,
|
|
100
102
|
testId: "".concat(testId, "-resize")
|
|
101
|
-
});
|
|
103
|
+
}));
|
|
102
104
|
}, [onResizeButtonClick, size, testId]);
|
|
103
105
|
return (0, _core.jsx)("div", {
|
|
104
106
|
css: _styled.containerStyles
|
|
@@ -5,28 +5,21 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.titleCss = exports.
|
|
8
|
+
exports.titleCss = exports.iconCss = exports.containerStyles = exports.actionCss = void 0;
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
12
|
var _core = require("@emotion/core");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
15
15
|
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
19
|
-
|
|
20
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
21
|
-
|
|
22
|
-
var containerStyles = (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n gap: ", ";\n justify-content: space-between;\n padding: ", " ", ";\n"])), (0, _utils.gs)(2), (0, _utils.gs)(2), (0, _utils.gs)(3));
|
|
16
|
+
var containerStyles = (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n gap: 8px;\n justify-content: space-between;\n // AK ModalBody has 2px padding top and bottom.\n // Using 14px here to create 16px gap between\n // link info and iframe\n padding: 24px 24px 14px 24px;\n"])));
|
|
23
17
|
exports.containerStyles = containerStyles;
|
|
24
|
-
var iconSize = '
|
|
18
|
+
var iconSize = '24px';
|
|
25
19
|
var iconCss = (0, _core.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n img,\n span,\n svg {\n height: ", ";\n min-height: ", ";\n max-height: ", ";\n width: ", ";\n min-width: ", ";\n max-width: ", ";\n }\n"])), iconSize, iconSize, iconSize, iconSize, iconSize, iconSize);
|
|
26
20
|
exports.iconCss = iconCss;
|
|
27
|
-
var
|
|
21
|
+
var height = '20px';
|
|
22
|
+
var titleCss = (0, _core.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n flex: 1 1 auto;\n\n h3 {\n flex: 1 1 auto;\n font-size: 16px;\n font-weight: 400;\n line-height: ", ";\n\n display: -webkit-box;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: break-word;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n // Fallback options\n @supports not (-webkit-line-clamp: 1) {\n max-height: ", ";\n }\n }\n"])), height, height);
|
|
28
23
|
exports.titleCss = titleCss;
|
|
29
|
-
var
|
|
30
|
-
exports.subtitleCss = subtitleCss;
|
|
31
|
-
var actionCss = (0, _core.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n flex: 0 0 auto;\n"])));
|
|
24
|
+
var actionCss = (0, _core.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex: 0 0 auto;\n gap: 4px;\n line-height: ", ";\n span {\n line-height: ", ";\n }\n\n @media only screen and (max-width: 980px) {\n // Hide resize button if the screen is smaller than the min width\n // or too small to have enough impact to matter.\n .smart-link-resize-button {\n display: none;\n }\n }\n"])), height, height);
|
|
32
25
|
exports.actionCss = actionCss;
|
package/dist/es2019/version.json
CHANGED
|
@@ -65,12 +65,14 @@ const LinkInfo = ({
|
|
|
65
65
|
}) : jsx(VidFullScreenOnIcon, {
|
|
66
66
|
label: message.defaultMessage
|
|
67
67
|
});
|
|
68
|
-
return jsx(
|
|
68
|
+
return jsx("span", {
|
|
69
|
+
className: "smart-link-resize-button"
|
|
70
|
+
}, jsx(LinkInfoButton, {
|
|
69
71
|
content: jsx(FormattedMessage, message),
|
|
70
72
|
icon: icon,
|
|
71
73
|
onClick: onResizeButtonClick,
|
|
72
74
|
testId: `${testId}-resize`
|
|
73
|
-
});
|
|
75
|
+
}));
|
|
74
76
|
}, [onResizeButtonClick, size, testId]);
|
|
75
77
|
return jsx("div", {
|
|
76
78
|
css: containerStyles
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { css } from '@emotion/core';
|
|
2
|
-
import { gs } from '../../../common/utils';
|
|
3
|
-
import { token } from '@atlaskit/tokens';
|
|
4
|
-
import { N100 } from '@atlaskit/theme/colors';
|
|
5
2
|
export const containerStyles = css`
|
|
6
3
|
align-items: center;
|
|
7
4
|
display: flex;
|
|
8
|
-
gap:
|
|
5
|
+
gap: 8px;
|
|
9
6
|
justify-content: space-between;
|
|
10
|
-
padding
|
|
7
|
+
// AK ModalBody has 2px padding top and bottom.
|
|
8
|
+
// Using 14px here to create 16px gap between
|
|
9
|
+
// link info and iframe
|
|
10
|
+
padding: 24px 24px 14px 24px;
|
|
11
11
|
`;
|
|
12
|
-
const iconSize = '
|
|
12
|
+
const iconSize = '24px';
|
|
13
13
|
export const iconCss = css`
|
|
14
14
|
img,
|
|
15
15
|
span,
|
|
@@ -22,16 +22,15 @@ export const iconCss = css`
|
|
|
22
22
|
max-width: ${iconSize};
|
|
23
23
|
}
|
|
24
24
|
`;
|
|
25
|
+
const height = '20px';
|
|
25
26
|
export const titleCss = css`
|
|
26
27
|
flex: 1 1 auto;
|
|
27
28
|
|
|
28
29
|
h3 {
|
|
29
30
|
flex: 1 1 auto;
|
|
30
|
-
|
|
31
|
-
// EDM-42336: UX is not finalised yet.
|
|
32
|
-
font-size: 20px;
|
|
31
|
+
font-size: 16px;
|
|
33
32
|
font-weight: 400;
|
|
34
|
-
line-height:
|
|
33
|
+
line-height: ${height};
|
|
35
34
|
|
|
36
35
|
display: -webkit-box;
|
|
37
36
|
overflow: hidden;
|
|
@@ -41,18 +40,24 @@ export const titleCss = css`
|
|
|
41
40
|
-webkit-box-orient: vertical;
|
|
42
41
|
// Fallback options
|
|
43
42
|
@supports not (-webkit-line-clamp: 1) {
|
|
44
|
-
max-height:
|
|
43
|
+
max-height: ${height};
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
`;
|
|
48
|
-
export const subtitleCss = css`
|
|
49
|
-
color: ${token('color.text.subtlest', N100)};
|
|
50
|
-
|
|
51
|
-
// EDM-42336: UX is not finalised yet.
|
|
52
|
-
font-size: 12px;
|
|
53
|
-
font-weight: 400;
|
|
54
|
-
line-height: 16px;
|
|
55
|
-
`;
|
|
56
47
|
export const actionCss = css`
|
|
48
|
+
display: flex;
|
|
57
49
|
flex: 0 0 auto;
|
|
50
|
+
gap: 4px;
|
|
51
|
+
line-height: ${height};
|
|
52
|
+
span {
|
|
53
|
+
line-height: ${height};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@media only screen and (max-width: 980px) {
|
|
57
|
+
// Hide resize button if the screen is smaller than the min width
|
|
58
|
+
// or too small to have enough impact to matter.
|
|
59
|
+
.smart-link-resize-button {
|
|
60
|
+
display: none;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
58
63
|
`;
|
package/dist/esm/version.json
CHANGED
|
@@ -6,7 +6,7 @@ var _templateObject;
|
|
|
6
6
|
/** @jsx jsx */
|
|
7
7
|
import { css, jsx } from '@emotion/core';
|
|
8
8
|
import { getIframeSandboxAttribute } from '../../../../utils';
|
|
9
|
-
var iframeCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: calc(100vh -
|
|
9
|
+
var iframeCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: calc(100vh - 208px);\n"])));
|
|
10
10
|
|
|
11
11
|
var EmbedContent = function EmbedContent(_ref) {
|
|
12
12
|
var isTrusted = _ref.isTrusted,
|
|
@@ -65,12 +65,14 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
65
65
|
}) : jsx(VidFullScreenOnIcon, {
|
|
66
66
|
label: message.defaultMessage
|
|
67
67
|
});
|
|
68
|
-
return jsx(
|
|
68
|
+
return jsx("span", {
|
|
69
|
+
className: "smart-link-resize-button"
|
|
70
|
+
}, jsx(LinkInfoButton, {
|
|
69
71
|
content: jsx(FormattedMessage, message),
|
|
70
72
|
icon: icon,
|
|
71
73
|
onClick: onResizeButtonClick,
|
|
72
74
|
testId: "".concat(testId, "-resize")
|
|
73
|
-
});
|
|
75
|
+
}));
|
|
74
76
|
}, [onResizeButtonClick, size, testId]);
|
|
75
77
|
return jsx("div", {
|
|
76
78
|
css: containerStyles
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
|
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4
|
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/core';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { N100 } from '@atlaskit/theme/colors';
|
|
9
|
-
export var containerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n gap: ", ";\n justify-content: space-between;\n padding: ", " ", ";\n"])), gs(2), gs(2), gs(3));
|
|
10
|
-
var iconSize = '32px';
|
|
6
|
+
export var containerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n gap: 8px;\n justify-content: space-between;\n // AK ModalBody has 2px padding top and bottom.\n // Using 14px here to create 16px gap between\n // link info and iframe\n padding: 24px 24px 14px 24px;\n"])));
|
|
7
|
+
var iconSize = '24px';
|
|
11
8
|
export var iconCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n img,\n span,\n svg {\n height: ", ";\n min-height: ", ";\n max-height: ", ";\n width: ", ";\n min-width: ", ";\n max-width: ", ";\n }\n"])), iconSize, iconSize, iconSize, iconSize, iconSize, iconSize);
|
|
12
|
-
|
|
13
|
-
export var
|
|
14
|
-
export var actionCss = css(
|
|
9
|
+
var height = '20px';
|
|
10
|
+
export var titleCss = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex: 1 1 auto;\n\n h3 {\n flex: 1 1 auto;\n font-size: 16px;\n font-weight: 400;\n line-height: ", ";\n\n display: -webkit-box;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: break-word;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n // Fallback options\n @supports not (-webkit-line-clamp: 1) {\n max-height: ", ";\n }\n }\n"])), height, height);
|
|
11
|
+
export var actionCss = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex: 0 0 auto;\n gap: 4px;\n line-height: ", ";\n span {\n line-height: ", ";\n }\n\n @media only screen and (max-width: 980px) {\n // Hide resize button if the screen is smaller than the min width\n // or too small to have enough impact to matter.\n .smart-link-resize-button {\n display: none;\n }\n }\n"])), height, height);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare const containerStyles: import("@emotion/utils").SerializedStyles;
|
|
2
2
|
export declare const iconCss: import("@emotion/utils").SerializedStyles;
|
|
3
3
|
export declare const titleCss: import("@emotion/utils").SerializedStyles;
|
|
4
|
-
export declare const subtitleCss: import("@emotion/utils").SerializedStyles;
|
|
5
4
|
export declare const actionCss: import("@emotion/utils").SerializedStyles;
|