@atlaskit/smart-card 17.7.1 → 17.7.2
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 +6 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +7 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +7 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +7 -3
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +6 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +6 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +6 -2
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +7 -3
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +7 -3
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +7 -3
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/cjs/version.json
CHANGED
|
@@ -31,7 +31,7 @@ var _elementGroup = _interopRequireDefault(require("../../element-group"));
|
|
|
31
31
|
|
|
32
32
|
var _token = require("../../../../../../utils/token");
|
|
33
33
|
|
|
34
|
-
var _excluded = ["maxLines", "retry", "position", "testId", "theme"];
|
|
34
|
+
var _excluded = ["maxLines", "retry", "position", "testId", "theme", "text"];
|
|
35
35
|
|
|
36
36
|
var _templateObject, _templateObject2;
|
|
37
37
|
|
|
@@ -48,6 +48,7 @@ var TitleBlockErroredView = function TitleBlockErroredView(_ref) {
|
|
|
48
48
|
position = _ref.position,
|
|
49
49
|
testId = _ref.testId,
|
|
50
50
|
theme = _ref.theme,
|
|
51
|
+
text = _ref.text,
|
|
51
52
|
blockProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
52
53
|
|
|
53
54
|
var _ref2 = retry || {},
|
|
@@ -58,14 +59,17 @@ var TitleBlockErroredView = function TitleBlockErroredView(_ref) {
|
|
|
58
59
|
var _blockProps$size = blockProps.size,
|
|
59
60
|
size = _blockProps$size === void 0 ? _constants.SmartLinkSize.Medium : _blockProps$size;
|
|
60
61
|
var hasAction = onClick !== undefined;
|
|
62
|
+
var overrideText = !!text ? {
|
|
63
|
+
text: text
|
|
64
|
+
} : {};
|
|
61
65
|
return (0, _core.jsx)(_block.default, (0, _extends2.default)({}, blockProps, {
|
|
62
66
|
testId: "".concat(testId, "-errored-view")
|
|
63
67
|
}), (0, _core.jsx)(_elements.LinkIcon, {
|
|
64
68
|
position: position
|
|
65
|
-
}), (0, _core.jsx)(_elements.Title, {
|
|
69
|
+
}), (0, _core.jsx)(_elements.Title, (0, _extends2.default)({}, overrideText, {
|
|
66
70
|
maxLines: maxLines,
|
|
67
71
|
theme: theme
|
|
68
|
-
}), descriptor && (0, _core.jsx)(_elementGroup.default, {
|
|
72
|
+
})), descriptor && (0, _core.jsx)(_elementGroup.default, {
|
|
69
73
|
direction: _constants.SmartLinkDirection.Horizontal,
|
|
70
74
|
align: _constants.SmartLinkAlignment.Right
|
|
71
75
|
}, (0, _core.jsx)("span", {
|
|
@@ -25,7 +25,7 @@ var _utils = require("../../utils");
|
|
|
25
25
|
|
|
26
26
|
var _actionGroup = _interopRequireDefault(require("../../action-group"));
|
|
27
27
|
|
|
28
|
-
var _excluded = ["maxLines", "metadata", "position", "subtitle", "actions", "testId", "theme"];
|
|
28
|
+
var _excluded = ["maxLines", "metadata", "position", "subtitle", "actions", "testId", "theme", "text"];
|
|
29
29
|
|
|
30
30
|
var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
31
31
|
var maxLines = _ref.maxLines,
|
|
@@ -38,9 +38,13 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
38
38
|
actions = _ref$actions === void 0 ? [] : _ref$actions,
|
|
39
39
|
testId = _ref.testId,
|
|
40
40
|
theme = _ref.theme,
|
|
41
|
+
text = _ref.text,
|
|
41
42
|
blockProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
42
43
|
var metadataElements = (0, _utils.renderElementItems)(metadata);
|
|
43
44
|
var subtitleElements = (0, _utils.renderElementItems)(subtitle);
|
|
45
|
+
var overrideText = !!text ? {
|
|
46
|
+
text: text
|
|
47
|
+
} : {};
|
|
44
48
|
return /*#__PURE__*/_react.default.createElement(_block.default, (0, _extends2.default)({}, blockProps, {
|
|
45
49
|
testId: "".concat(testId, "-resolved-view")
|
|
46
50
|
}), /*#__PURE__*/_react.default.createElement(_elements.LinkIcon, {
|
|
@@ -48,10 +52,10 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
48
52
|
}), /*#__PURE__*/_react.default.createElement(_elementGroup.default, {
|
|
49
53
|
direction: _constants.SmartLinkDirection.Vertical,
|
|
50
54
|
width: _constants.SmartLinkWidth.Flexible
|
|
51
|
-
}, /*#__PURE__*/_react.default.createElement(_elements.Title, {
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement(_elements.Title, (0, _extends2.default)({
|
|
52
56
|
maxLines: maxLines,
|
|
53
57
|
theme: theme
|
|
54
|
-
}), subtitleElements && /*#__PURE__*/_react.default.createElement(_elementGroup.default, {
|
|
58
|
+
}, overrideText)), subtitleElements && /*#__PURE__*/_react.default.createElement(_elementGroup.default, {
|
|
55
59
|
direction: _constants.SmartLinkDirection.Horizontal
|
|
56
60
|
}, subtitleElements)), metadataElements && /*#__PURE__*/_react.default.createElement(_elementGroup.default, {
|
|
57
61
|
direction: _constants.SmartLinkDirection.Horizontal,
|
|
@@ -23,7 +23,7 @@ var _block = _interopRequireDefault(require("../../block"));
|
|
|
23
23
|
|
|
24
24
|
var _constants = require("../../../../../../constants");
|
|
25
25
|
|
|
26
|
-
var _excluded = ["maxLines", "retry", "position", "testId", "theme"];
|
|
26
|
+
var _excluded = ["maxLines", "retry", "position", "testId", "theme", "text"];
|
|
27
27
|
|
|
28
28
|
var getSpinnerSize = function getSpinnerSize(size) {
|
|
29
29
|
// Spinner sizes should be equivalent or smaller than Icon size
|
|
@@ -50,18 +50,22 @@ var TitleBlockResolvingView = function TitleBlockResolvingView(_ref) {
|
|
|
50
50
|
position = _ref.position,
|
|
51
51
|
testId = _ref.testId,
|
|
52
52
|
theme = _ref.theme,
|
|
53
|
+
text = _ref.text,
|
|
53
54
|
blockProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
54
55
|
var _blockProps$size = blockProps.size,
|
|
55
56
|
size = _blockProps$size === void 0 ? _constants.SmartLinkSize.Medium : _blockProps$size;
|
|
57
|
+
var overrideText = !!text ? {
|
|
58
|
+
text: text
|
|
59
|
+
} : {};
|
|
56
60
|
return (0, _core.jsx)(_block.default, (0, _extends2.default)({}, blockProps, {
|
|
57
61
|
testId: "".concat(testId, "-resolving-view")
|
|
58
62
|
}), (0, _core.jsx)(_spinner.default, {
|
|
59
63
|
size: getSpinnerSize(size),
|
|
60
64
|
testId: "".concat(testId, "-resolving-spinner")
|
|
61
|
-
}), (0, _core.jsx)(_elements.Title, {
|
|
65
|
+
}), (0, _core.jsx)(_elements.Title, (0, _extends2.default)({}, overrideText, {
|
|
62
66
|
maxLines: maxLines,
|
|
63
67
|
theme: theme
|
|
64
|
-
}));
|
|
68
|
+
})));
|
|
65
69
|
};
|
|
66
70
|
|
|
67
71
|
var _default = TitleBlockResolvingView;
|
package/dist/es2019/version.json
CHANGED
|
@@ -36,6 +36,7 @@ const TitleBlockErroredView = ({
|
|
|
36
36
|
position,
|
|
37
37
|
testId,
|
|
38
38
|
theme,
|
|
39
|
+
text,
|
|
39
40
|
...blockProps
|
|
40
41
|
}) => {
|
|
41
42
|
const {
|
|
@@ -47,14 +48,17 @@ const TitleBlockErroredView = ({
|
|
|
47
48
|
size = SmartLinkSize.Medium
|
|
48
49
|
} = blockProps;
|
|
49
50
|
const hasAction = onClick !== undefined;
|
|
51
|
+
const overrideText = !!text ? {
|
|
52
|
+
text
|
|
53
|
+
} : {};
|
|
50
54
|
return jsx(Block, _extends({}, blockProps, {
|
|
51
55
|
testId: `${testId}-errored-view`
|
|
52
56
|
}), jsx(LinkIcon, {
|
|
53
57
|
position: position
|
|
54
|
-
}), jsx(Title, {
|
|
58
|
+
}), jsx(Title, _extends({}, overrideText, {
|
|
55
59
|
maxLines: maxLines,
|
|
56
60
|
theme: theme
|
|
57
|
-
}), descriptor && jsx(ElementGroup, {
|
|
61
|
+
})), descriptor && jsx(ElementGroup, {
|
|
58
62
|
direction: SmartLinkDirection.Horizontal,
|
|
59
63
|
align: SmartLinkAlignment.Right
|
|
60
64
|
}, jsx("span", {
|
|
@@ -15,10 +15,14 @@ const TitleBlockResolvedView = ({
|
|
|
15
15
|
actions = [],
|
|
16
16
|
testId,
|
|
17
17
|
theme,
|
|
18
|
+
text,
|
|
18
19
|
...blockProps
|
|
19
20
|
}) => {
|
|
20
21
|
const metadataElements = renderElementItems(metadata);
|
|
21
22
|
const subtitleElements = renderElementItems(subtitle);
|
|
23
|
+
const overrideText = !!text ? {
|
|
24
|
+
text
|
|
25
|
+
} : {};
|
|
22
26
|
return /*#__PURE__*/React.createElement(Block, _extends({}, blockProps, {
|
|
23
27
|
testId: `${testId}-resolved-view`
|
|
24
28
|
}), /*#__PURE__*/React.createElement(LinkIcon, {
|
|
@@ -26,10 +30,10 @@ const TitleBlockResolvedView = ({
|
|
|
26
30
|
}), /*#__PURE__*/React.createElement(ElementGroup, {
|
|
27
31
|
direction: SmartLinkDirection.Vertical,
|
|
28
32
|
width: SmartLinkWidth.Flexible
|
|
29
|
-
}, /*#__PURE__*/React.createElement(Title, {
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Title, _extends({
|
|
30
34
|
maxLines: maxLines,
|
|
31
35
|
theme: theme
|
|
32
|
-
}), subtitleElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
36
|
+
}, overrideText)), subtitleElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
33
37
|
direction: SmartLinkDirection.Horizontal
|
|
34
38
|
}, subtitleElements)), metadataElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
35
39
|
direction: SmartLinkDirection.Horizontal,
|
|
@@ -33,20 +33,24 @@ const TitleBlockResolvingView = ({
|
|
|
33
33
|
position,
|
|
34
34
|
testId,
|
|
35
35
|
theme,
|
|
36
|
+
text,
|
|
36
37
|
...blockProps
|
|
37
38
|
}) => {
|
|
38
39
|
const {
|
|
39
40
|
size = SmartLinkSize.Medium
|
|
40
41
|
} = blockProps;
|
|
42
|
+
const overrideText = !!text ? {
|
|
43
|
+
text
|
|
44
|
+
} : {};
|
|
41
45
|
return jsx(Block, _extends({}, blockProps, {
|
|
42
46
|
testId: `${testId}-resolving-view`
|
|
43
47
|
}), jsx(Spinner, {
|
|
44
48
|
size: getSpinnerSize(size),
|
|
45
49
|
testId: `${testId}-resolving-spinner`
|
|
46
|
-
}), jsx(Title, {
|
|
50
|
+
}), jsx(Title, _extends({}, overrideText, {
|
|
47
51
|
maxLines: maxLines,
|
|
48
52
|
theme: theme
|
|
49
|
-
}));
|
|
53
|
+
})));
|
|
50
54
|
};
|
|
51
55
|
|
|
52
56
|
export default TitleBlockResolvingView;
|
package/dist/esm/version.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
|
-
var _excluded = ["maxLines", "retry", "position", "testId", "theme"];
|
|
4
|
+
var _excluded = ["maxLines", "retry", "position", "testId", "theme", "text"];
|
|
5
5
|
|
|
6
6
|
var _templateObject, _templateObject2;
|
|
7
7
|
|
|
@@ -28,6 +28,7 @@ var TitleBlockErroredView = function TitleBlockErroredView(_ref) {
|
|
|
28
28
|
position = _ref.position,
|
|
29
29
|
testId = _ref.testId,
|
|
30
30
|
theme = _ref.theme,
|
|
31
|
+
text = _ref.text,
|
|
31
32
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
32
33
|
|
|
33
34
|
var _ref2 = retry || {},
|
|
@@ -38,14 +39,17 @@ var TitleBlockErroredView = function TitleBlockErroredView(_ref) {
|
|
|
38
39
|
var _blockProps$size = blockProps.size,
|
|
39
40
|
size = _blockProps$size === void 0 ? SmartLinkSize.Medium : _blockProps$size;
|
|
40
41
|
var hasAction = onClick !== undefined;
|
|
42
|
+
var overrideText = !!text ? {
|
|
43
|
+
text: text
|
|
44
|
+
} : {};
|
|
41
45
|
return jsx(Block, _extends({}, blockProps, {
|
|
42
46
|
testId: "".concat(testId, "-errored-view")
|
|
43
47
|
}), jsx(LinkIcon, {
|
|
44
48
|
position: position
|
|
45
|
-
}), jsx(Title, {
|
|
49
|
+
}), jsx(Title, _extends({}, overrideText, {
|
|
46
50
|
maxLines: maxLines,
|
|
47
51
|
theme: theme
|
|
48
|
-
}), descriptor && jsx(ElementGroup, {
|
|
52
|
+
})), descriptor && jsx(ElementGroup, {
|
|
49
53
|
direction: SmartLinkDirection.Horizontal,
|
|
50
54
|
align: SmartLinkAlignment.Right
|
|
51
55
|
}, jsx("span", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["maxLines", "metadata", "position", "subtitle", "actions", "testId", "theme"];
|
|
3
|
+
var _excluded = ["maxLines", "metadata", "position", "subtitle", "actions", "testId", "theme", "text"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { LinkIcon, Title } from '../../../elements';
|
|
6
6
|
import Block from '../../block';
|
|
@@ -20,10 +20,14 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
20
20
|
actions = _ref$actions === void 0 ? [] : _ref$actions,
|
|
21
21
|
testId = _ref.testId,
|
|
22
22
|
theme = _ref.theme,
|
|
23
|
+
text = _ref.text,
|
|
23
24
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
24
25
|
|
|
25
26
|
var metadataElements = renderElementItems(metadata);
|
|
26
27
|
var subtitleElements = renderElementItems(subtitle);
|
|
28
|
+
var overrideText = !!text ? {
|
|
29
|
+
text: text
|
|
30
|
+
} : {};
|
|
27
31
|
return /*#__PURE__*/React.createElement(Block, _extends({}, blockProps, {
|
|
28
32
|
testId: "".concat(testId, "-resolved-view")
|
|
29
33
|
}), /*#__PURE__*/React.createElement(LinkIcon, {
|
|
@@ -31,10 +35,10 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
31
35
|
}), /*#__PURE__*/React.createElement(ElementGroup, {
|
|
32
36
|
direction: SmartLinkDirection.Vertical,
|
|
33
37
|
width: SmartLinkWidth.Flexible
|
|
34
|
-
}, /*#__PURE__*/React.createElement(Title, {
|
|
38
|
+
}, /*#__PURE__*/React.createElement(Title, _extends({
|
|
35
39
|
maxLines: maxLines,
|
|
36
40
|
theme: theme
|
|
37
|
-
}), subtitleElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
41
|
+
}, overrideText)), subtitleElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
38
42
|
direction: SmartLinkDirection.Horizontal
|
|
39
43
|
}, subtitleElements)), metadataElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
40
44
|
direction: SmartLinkDirection.Horizontal,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["maxLines", "retry", "position", "testId", "theme"];
|
|
3
|
+
var _excluded = ["maxLines", "retry", "position", "testId", "theme", "text"];
|
|
4
4
|
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import React from 'react';
|
|
@@ -35,19 +35,23 @@ var TitleBlockResolvingView = function TitleBlockResolvingView(_ref) {
|
|
|
35
35
|
position = _ref.position,
|
|
36
36
|
testId = _ref.testId,
|
|
37
37
|
theme = _ref.theme,
|
|
38
|
+
text = _ref.text,
|
|
38
39
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
39
40
|
|
|
40
41
|
var _blockProps$size = blockProps.size,
|
|
41
42
|
size = _blockProps$size === void 0 ? SmartLinkSize.Medium : _blockProps$size;
|
|
43
|
+
var overrideText = !!text ? {
|
|
44
|
+
text: text
|
|
45
|
+
} : {};
|
|
42
46
|
return jsx(Block, _extends({}, blockProps, {
|
|
43
47
|
testId: "".concat(testId, "-resolving-view")
|
|
44
48
|
}), jsx(Spinner, {
|
|
45
49
|
size: getSpinnerSize(size),
|
|
46
50
|
testId: "".concat(testId, "-resolving-spinner")
|
|
47
|
-
}), jsx(Title, {
|
|
51
|
+
}), jsx(Title, _extends({}, overrideText, {
|
|
48
52
|
maxLines: maxLines,
|
|
49
53
|
theme: theme
|
|
50
|
-
}));
|
|
54
|
+
})));
|
|
51
55
|
};
|
|
52
56
|
|
|
53
57
|
export default TitleBlockResolvingView;
|