@atlaskit/empty-state 7.4.6 → 7.4.7
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/empty-state.js +16 -23
- package/dist/cjs/index.js +0 -2
- package/dist/cjs/styled/actions-container.js +4 -8
- package/dist/cjs/styled/container.js +5 -8
- package/dist/cjs/styled/description.js +4 -9
- package/dist/cjs/styled/header.js +2 -6
- package/dist/cjs/styled/image.js +8 -14
- package/dist/cjs/styled/index.js +0 -7
- package/dist/cjs/styled/spinner-container.js +4 -7
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/empty-state.js +0 -2
- package/dist/es2019/styled/actions-container.js +4 -6
- package/dist/es2019/styled/container.js +3 -3
- package/dist/es2019/styled/description.js +4 -6
- package/dist/es2019/styled/header.js +4 -3
- package/dist/es2019/styled/image.js +2 -2
- package/dist/es2019/styled/spinner-container.js +4 -5
- package/dist/es2019/version.json +1 -1
- package/dist/esm/empty-state.js +16 -18
- package/dist/esm/styled/actions-container.js +4 -6
- package/dist/esm/styled/container.js +5 -5
- package/dist/esm/styled/description.js +4 -6
- package/dist/esm/styled/header.js +4 -3
- package/dist/esm/styled/image.js +8 -10
- package/dist/esm/styled/spinner-container.js +4 -5
- package/dist/esm/version.json +1 -1
- package/package.json +1 -1
- package/report.api.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/empty-state
|
|
2
2
|
|
|
3
|
+
## 7.4.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`18aeca8c199`](https://bitbucket.org/atlassian/atlassian-frontend/commits/18aeca8c199) - Internal change to update token references. There is no expected behaviour or visual change.
|
|
8
|
+
|
|
3
9
|
## 7.4.6
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/empty-state.js
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
var _buttonGroup = _interopRequireDefault(require("@atlaskit/button/button-group"));
|
|
13
|
-
|
|
14
10
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
15
|
-
|
|
16
11
|
var _styled = require("./styled");
|
|
17
|
-
|
|
18
12
|
/**
|
|
19
13
|
* __Empty state__
|
|
20
14
|
*
|
|
@@ -39,22 +33,22 @@ var _styled = require("./styled");
|
|
|
39
33
|
*/
|
|
40
34
|
var EmptyState = function EmptyState(_ref) {
|
|
41
35
|
var description = _ref.description,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
36
|
+
header = _ref.header,
|
|
37
|
+
imageHeight = _ref.imageHeight,
|
|
38
|
+
imageUrl = _ref.imageUrl,
|
|
39
|
+
imageWidth = _ref.imageWidth,
|
|
40
|
+
isLoading = _ref.isLoading,
|
|
41
|
+
_ref$maxImageHeight = _ref.maxImageHeight,
|
|
42
|
+
maxImageHeight = _ref$maxImageHeight === void 0 ? 160 : _ref$maxImageHeight,
|
|
43
|
+
_ref$maxImageWidth = _ref.maxImageWidth,
|
|
44
|
+
maxImageWidth = _ref$maxImageWidth === void 0 ? 160 : _ref$maxImageWidth,
|
|
45
|
+
primaryAction = _ref.primaryAction,
|
|
46
|
+
renderImage = _ref.renderImage,
|
|
47
|
+
secondaryAction = _ref.secondaryAction,
|
|
48
|
+
width = _ref.width,
|
|
49
|
+
size = _ref.size,
|
|
50
|
+
tertiaryAction = _ref.tertiaryAction,
|
|
51
|
+
testId = _ref.testId;
|
|
58
52
|
var actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/_react.default.createElement(_styled.ActionsContainer, null, /*#__PURE__*/_react.default.createElement(_buttonGroup.default, null, secondaryAction, primaryAction), /*#__PURE__*/_react.default.createElement(_styled.SpinnerContainer, null, isLoading && /*#__PURE__*/_react.default.createElement(_spinner.default, null))) : null;
|
|
59
53
|
return /*#__PURE__*/_react.default.createElement(_styled.Container, {
|
|
60
54
|
testId: testId,
|
|
@@ -72,6 +66,5 @@ var EmptyState = function EmptyState(_ref) {
|
|
|
72
66
|
imageHeight: imageHeight
|
|
73
67
|
}), /*#__PURE__*/_react.default.createElement(_styled.Header, null, header), description && /*#__PURE__*/_react.default.createElement(_styled.Description, null, description), actionsContainer, tertiaryAction);
|
|
74
68
|
};
|
|
75
|
-
|
|
76
69
|
var _default = EmptyState;
|
|
77
70
|
exports.default = _default;
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -11,5 +10,4 @@ Object.defineProperty(exports, "default", {
|
|
|
11
10
|
return _emptyState.default;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
|
-
|
|
15
13
|
var _emptyState = _interopRequireDefault(require("./empty-state"));
|
|
@@ -4,19 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("@emotion/react");
|
|
9
|
-
|
|
10
8
|
/** @jsx jsx */
|
|
9
|
+
|
|
11
10
|
var actionsStyles = (0, _react.css)({
|
|
12
11
|
display: 'flex',
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// TODO Delete this comment after verifying spacing token -> previous value ``${5 * gridSize}px``
|
|
16
|
-
paddingLeft: "var(--ds-scale-500, 40px)",
|
|
12
|
+
marginBottom: "var(--ds-space-100, 8px)",
|
|
13
|
+
paddingLeft: "var(--ds-space-500, 40px)",
|
|
17
14
|
alignItems: 'center',
|
|
18
15
|
justifyContent: 'center'
|
|
19
16
|
});
|
|
17
|
+
|
|
20
18
|
/**
|
|
21
19
|
* __Actions container__
|
|
22
20
|
*
|
|
@@ -24,13 +22,11 @@ var actionsStyles = (0, _react.css)({
|
|
|
24
22
|
*
|
|
25
23
|
* @internal
|
|
26
24
|
*/
|
|
27
|
-
|
|
28
25
|
var ActionsContainer = function ActionsContainer(_ref) {
|
|
29
26
|
var children = _ref.children;
|
|
30
27
|
return (0, _react.jsx)("div", {
|
|
31
28
|
css: actionsStyles
|
|
32
29
|
}, children);
|
|
33
30
|
};
|
|
34
|
-
|
|
35
31
|
var _default = ActionsContainer;
|
|
36
32
|
exports.default = _default;
|
|
@@ -4,12 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("@emotion/react");
|
|
9
|
-
|
|
10
8
|
var _constants = require("@atlaskit/theme/constants");
|
|
11
|
-
|
|
12
9
|
/** @jsx jsx */
|
|
10
|
+
|
|
13
11
|
var gridSize = (0, _constants.gridSize)();
|
|
14
12
|
var verticalMarginSize = gridSize * 6;
|
|
15
13
|
var columnWidth = gridSize * 8;
|
|
@@ -18,14 +16,15 @@ var containerStyles = (0, _react.css)({
|
|
|
18
16
|
margin: "".concat(verticalMarginSize, "px auto"),
|
|
19
17
|
textAlign: 'center'
|
|
20
18
|
});
|
|
21
|
-
/* Use max-width so the component can shrink on smaller viewports. */
|
|
22
19
|
|
|
20
|
+
/* Use max-width so the component can shrink on smaller viewports. */
|
|
23
21
|
var wideContainerStyles = (0, _react.css)({
|
|
24
22
|
maxWidth: "".concat(columnWidth * 6 + gutter * 5, "px")
|
|
25
23
|
});
|
|
26
24
|
var narrowContainerStyles = (0, _react.css)({
|
|
27
25
|
maxWidth: "".concat(columnWidth * 4 + gutter * 3, "px")
|
|
28
26
|
});
|
|
27
|
+
|
|
29
28
|
/**
|
|
30
29
|
* __Container__
|
|
31
30
|
*
|
|
@@ -33,16 +32,14 @@ var narrowContainerStyles = (0, _react.css)({
|
|
|
33
32
|
*
|
|
34
33
|
* @internal
|
|
35
34
|
*/
|
|
36
|
-
|
|
37
35
|
var Container = function Container(_ref) {
|
|
38
36
|
var children = _ref.children,
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
width = _ref.width,
|
|
38
|
+
testId = _ref.testId;
|
|
41
39
|
return (0, _react.jsx)("div", {
|
|
42
40
|
"data-testid": testId,
|
|
43
41
|
css: [containerStyles, width === 'narrow' ? narrowContainerStyles : wideContainerStyles]
|
|
44
42
|
}, children);
|
|
45
43
|
};
|
|
46
|
-
|
|
47
44
|
var _default = Container;
|
|
48
45
|
exports.default = _default;
|
|
@@ -4,19 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("@emotion/react");
|
|
9
|
-
|
|
10
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
|
-
|
|
12
9
|
/** @jsx jsx */
|
|
10
|
+
|
|
13
11
|
var descriptionStyles = (0, _react.css)({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// TODO Delete this comment after verifying spacing token -> previous value ``${getGridSize() * 3}px``
|
|
17
|
-
marginBottom: "var(--ds-scale-300, 24px)",
|
|
12
|
+
marginTop: "var(--ds-space-0, 0px)",
|
|
13
|
+
marginBottom: "var(--ds-space-300, 24px)",
|
|
18
14
|
color: "var(--ds-text, ".concat(_colors.N800, ")")
|
|
19
15
|
});
|
|
16
|
+
|
|
20
17
|
/**
|
|
21
18
|
* __Description__
|
|
22
19
|
*
|
|
@@ -24,13 +21,11 @@ var descriptionStyles = (0, _react.css)({
|
|
|
24
21
|
*
|
|
25
22
|
* @internal
|
|
26
23
|
*/
|
|
27
|
-
|
|
28
24
|
var Description = function Description(_ref) {
|
|
29
25
|
var children = _ref.children;
|
|
30
26
|
return (0, _react.jsx)("p", {
|
|
31
27
|
css: descriptionStyles
|
|
32
28
|
}, children);
|
|
33
29
|
};
|
|
34
|
-
|
|
35
30
|
var _default = Description;
|
|
36
31
|
exports.default = _default;
|
|
@@ -4,19 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("@emotion/react");
|
|
9
|
-
|
|
10
8
|
var _constants = require("@atlaskit/theme/constants");
|
|
11
|
-
|
|
12
9
|
var _typography = require("@atlaskit/theme/typography");
|
|
13
|
-
|
|
14
10
|
/** @jsx jsx */
|
|
11
|
+
|
|
15
12
|
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
16
13
|
var headerStyles = (0, _react.css)([(0, _typography.h600)(), {
|
|
17
14
|
marginTop: 0,
|
|
18
15
|
marginBottom: "".concat((0, _constants.gridSize)() * 2, "px")
|
|
19
16
|
}]);
|
|
17
|
+
|
|
20
18
|
/**
|
|
21
19
|
* __Header__
|
|
22
20
|
*
|
|
@@ -24,13 +22,11 @@ var headerStyles = (0, _react.css)([(0, _typography.h600)(), {
|
|
|
24
22
|
*
|
|
25
23
|
* @internal
|
|
26
24
|
*/
|
|
27
|
-
|
|
28
25
|
var EmptyStateHeader = function EmptyStateHeader(_ref) {
|
|
29
26
|
var children = _ref.children;
|
|
30
27
|
return (0, _react.jsx)("h4", {
|
|
31
28
|
css: headerStyles
|
|
32
29
|
}, children);
|
|
33
30
|
};
|
|
34
|
-
|
|
35
31
|
var _default = EmptyStateHeader;
|
|
36
32
|
exports.default = _default;
|
package/dist/cjs/styled/image.js
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
9
|
var _react = require("@emotion/react");
|
|
13
|
-
|
|
14
10
|
var _constants = require("@atlaskit/theme/constants");
|
|
15
|
-
|
|
16
11
|
/** @jsx jsx */
|
|
12
|
+
|
|
17
13
|
var CSS_VAR_MAX_WIDTH = '--max-width';
|
|
18
14
|
var CSS_VAR_MAX_HEIGHT = '--max-height';
|
|
19
15
|
var imageStyles = (0, _react.css)({
|
|
@@ -22,6 +18,7 @@ var imageStyles = (0, _react.css)({
|
|
|
22
18
|
maxHeight: "var(".concat(CSS_VAR_MAX_HEIGHT, ")"),
|
|
23
19
|
margin: "0 auto ".concat((0, _constants.gridSize)() * 3, "px")
|
|
24
20
|
});
|
|
21
|
+
|
|
25
22
|
/**
|
|
26
23
|
* __Image__
|
|
27
24
|
*
|
|
@@ -29,17 +26,15 @@ var imageStyles = (0, _react.css)({
|
|
|
29
26
|
*
|
|
30
27
|
* @internal
|
|
31
28
|
*/
|
|
32
|
-
|
|
33
29
|
var Image = function Image(_ref) {
|
|
34
30
|
var _ref2;
|
|
35
|
-
|
|
36
31
|
var maxHeight = _ref.maxHeight,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
32
|
+
maxWidth = _ref.maxWidth,
|
|
33
|
+
_ref$height = _ref.height,
|
|
34
|
+
height = _ref$height === void 0 ? 'auto' : _ref$height,
|
|
35
|
+
_ref$width = _ref.width,
|
|
36
|
+
width = _ref$width === void 0 ? 'auto' : _ref$width,
|
|
37
|
+
src = _ref.src;
|
|
43
38
|
return (0, _react.jsx)("img", {
|
|
44
39
|
style: (_ref2 = {}, (0, _defineProperty2.default)(_ref2, CSS_VAR_MAX_WIDTH, "".concat(maxWidth, "px")), (0, _defineProperty2.default)(_ref2, CSS_VAR_MAX_HEIGHT, "".concat(maxHeight, "px")), _ref2),
|
|
45
40
|
width: width,
|
|
@@ -50,6 +45,5 @@ var Image = function Image(_ref) {
|
|
|
50
45
|
src: src
|
|
51
46
|
});
|
|
52
47
|
};
|
|
53
|
-
|
|
54
48
|
var _default = Image;
|
|
55
49
|
exports.default = _default;
|
package/dist/cjs/styled/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -41,15 +40,9 @@ Object.defineProperty(exports, "SpinnerContainer", {
|
|
|
41
40
|
return _spinnerContainer.default;
|
|
42
41
|
}
|
|
43
42
|
});
|
|
44
|
-
|
|
45
43
|
var _actionsContainer = _interopRequireDefault(require("./actions-container"));
|
|
46
|
-
|
|
47
44
|
var _container = _interopRequireDefault(require("./container"));
|
|
48
|
-
|
|
49
45
|
var _description = _interopRequireDefault(require("./description"));
|
|
50
|
-
|
|
51
46
|
var _header = _interopRequireDefault(require("./header"));
|
|
52
|
-
|
|
53
47
|
var _image = _interopRequireDefault(require("./image"));
|
|
54
|
-
|
|
55
48
|
var _spinnerContainer = _interopRequireDefault(require("./spinner-container"));
|
|
@@ -4,15 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("@emotion/react");
|
|
9
|
-
|
|
10
8
|
/** @jsx jsx */
|
|
9
|
+
|
|
11
10
|
var spinnerContainerStyles = (0, _react.css)({
|
|
12
|
-
width: "var(--ds-
|
|
13
|
-
|
|
14
|
-
marginLeft: "var(--ds-scale-200, 16px)"
|
|
11
|
+
width: "var(--ds-space-300, 24px)",
|
|
12
|
+
marginLeft: "var(--ds-space-200, 16px)"
|
|
15
13
|
});
|
|
14
|
+
|
|
16
15
|
/**
|
|
17
16
|
* __Spinner container__
|
|
18
17
|
*
|
|
@@ -20,13 +19,11 @@ var spinnerContainerStyles = (0, _react.css)({
|
|
|
20
19
|
*
|
|
21
20
|
* @internal
|
|
22
21
|
*/
|
|
23
|
-
|
|
24
22
|
var SpinnerContainer = function SpinnerContainer(_ref) {
|
|
25
23
|
var children = _ref.children;
|
|
26
24
|
return (0, _react.jsx)("div", {
|
|
27
25
|
css: spinnerContainerStyles
|
|
28
26
|
}, children);
|
|
29
27
|
};
|
|
30
|
-
|
|
31
28
|
var _default = SpinnerContainer;
|
|
32
29
|
exports.default = _default;
|
package/dist/cjs/version.json
CHANGED
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
3
3
|
import Spinner from '@atlaskit/spinner';
|
|
4
4
|
import { ActionsContainer, Container, Description, Header, Image, SpinnerContainer } from './styled';
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* __Empty state__
|
|
8
7
|
*
|
|
@@ -59,5 +58,4 @@ const EmptyState = ({
|
|
|
59
58
|
imageHeight
|
|
60
59
|
}), /*#__PURE__*/React.createElement(Header, null, header), description && /*#__PURE__*/React.createElement(Description, null, description), actionsContainer, tertiaryAction);
|
|
61
60
|
};
|
|
62
|
-
|
|
63
61
|
export default EmptyState;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
|
|
2
3
|
import { css, jsx } from '@emotion/react';
|
|
3
4
|
const actionsStyles = css({
|
|
4
5
|
display: 'flex',
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// TODO Delete this comment after verifying spacing token -> previous value ``${5 * gridSize}px``
|
|
8
|
-
paddingLeft: "var(--ds-scale-500, 40px)",
|
|
6
|
+
marginBottom: "var(--ds-space-100, 8px)",
|
|
7
|
+
paddingLeft: "var(--ds-space-500, 40px)",
|
|
9
8
|
alignItems: 'center',
|
|
10
9
|
justifyContent: 'center'
|
|
11
10
|
});
|
|
11
|
+
|
|
12
12
|
/**
|
|
13
13
|
* __Actions container__
|
|
14
14
|
*
|
|
@@ -16,11 +16,9 @@ const actionsStyles = css({
|
|
|
16
16
|
*
|
|
17
17
|
* @internal
|
|
18
18
|
*/
|
|
19
|
-
|
|
20
19
|
const ActionsContainer = ({
|
|
21
20
|
children
|
|
22
21
|
}) => jsx("div", {
|
|
23
22
|
css: actionsStyles
|
|
24
23
|
}, children);
|
|
25
|
-
|
|
26
24
|
export default ActionsContainer;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
|
|
2
3
|
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
4
5
|
const gridSize = getGridSize();
|
|
@@ -9,14 +10,15 @@ const containerStyles = css({
|
|
|
9
10
|
margin: `${verticalMarginSize}px auto`,
|
|
10
11
|
textAlign: 'center'
|
|
11
12
|
});
|
|
12
|
-
/* Use max-width so the component can shrink on smaller viewports. */
|
|
13
13
|
|
|
14
|
+
/* Use max-width so the component can shrink on smaller viewports. */
|
|
14
15
|
const wideContainerStyles = css({
|
|
15
16
|
maxWidth: `${columnWidth * 6 + gutter * 5}px`
|
|
16
17
|
});
|
|
17
18
|
const narrowContainerStyles = css({
|
|
18
19
|
maxWidth: `${columnWidth * 4 + gutter * 3}px`
|
|
19
20
|
});
|
|
21
|
+
|
|
20
22
|
/**
|
|
21
23
|
* __Container__
|
|
22
24
|
*
|
|
@@ -24,7 +26,6 @@ const narrowContainerStyles = css({
|
|
|
24
26
|
*
|
|
25
27
|
* @internal
|
|
26
28
|
*/
|
|
27
|
-
|
|
28
29
|
const Container = ({
|
|
29
30
|
children,
|
|
30
31
|
width,
|
|
@@ -33,5 +34,4 @@ const Container = ({
|
|
|
33
34
|
"data-testid": testId,
|
|
34
35
|
css: [containerStyles, width === 'narrow' ? narrowContainerStyles : wideContainerStyles]
|
|
35
36
|
}, children);
|
|
36
|
-
|
|
37
37
|
export default Container;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
|
|
2
3
|
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { N800 } from '@atlaskit/theme/colors';
|
|
4
5
|
const descriptionStyles = css({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// TODO Delete this comment after verifying spacing token -> previous value ``${getGridSize() * 3}px``
|
|
8
|
-
marginBottom: "var(--ds-scale-300, 24px)",
|
|
6
|
+
marginTop: "var(--ds-space-0, 0px)",
|
|
7
|
+
marginBottom: "var(--ds-space-300, 24px)",
|
|
9
8
|
color: `var(--ds-text, ${N800})`
|
|
10
9
|
});
|
|
10
|
+
|
|
11
11
|
/**
|
|
12
12
|
* __Description__
|
|
13
13
|
*
|
|
@@ -15,11 +15,9 @@ const descriptionStyles = css({
|
|
|
15
15
|
*
|
|
16
16
|
* @internal
|
|
17
17
|
*/
|
|
18
|
-
|
|
19
18
|
const Description = ({
|
|
20
19
|
children
|
|
21
20
|
}) => jsx("p", {
|
|
22
21
|
css: descriptionStyles
|
|
23
22
|
}, children);
|
|
24
|
-
|
|
25
23
|
export default Description;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
|
|
2
3
|
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
4
|
-
import { h600 } from '@atlaskit/theme/typography';
|
|
5
|
+
import { h600 } from '@atlaskit/theme/typography';
|
|
5
6
|
|
|
7
|
+
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
6
8
|
const headerStyles = css([h600(), {
|
|
7
9
|
marginTop: 0,
|
|
8
10
|
marginBottom: `${getGridSize() * 2}px`
|
|
9
11
|
}]);
|
|
12
|
+
|
|
10
13
|
/**
|
|
11
14
|
* __Header__
|
|
12
15
|
*
|
|
@@ -14,11 +17,9 @@ const headerStyles = css([h600(), {
|
|
|
14
17
|
*
|
|
15
18
|
* @internal
|
|
16
19
|
*/
|
|
17
|
-
|
|
18
20
|
const EmptyStateHeader = ({
|
|
19
21
|
children
|
|
20
22
|
}) => jsx("h4", {
|
|
21
23
|
css: headerStyles
|
|
22
24
|
}, children);
|
|
23
|
-
|
|
24
25
|
export default EmptyStateHeader;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
|
|
2
3
|
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
4
5
|
const CSS_VAR_MAX_WIDTH = '--max-width';
|
|
@@ -9,6 +10,7 @@ const imageStyles = css({
|
|
|
9
10
|
maxHeight: `var(${CSS_VAR_MAX_HEIGHT})`,
|
|
10
11
|
margin: `0 auto ${getGridSize() * 3}px`
|
|
11
12
|
});
|
|
13
|
+
|
|
12
14
|
/**
|
|
13
15
|
* __Image__
|
|
14
16
|
*
|
|
@@ -16,7 +18,6 @@ const imageStyles = css({
|
|
|
16
18
|
*
|
|
17
19
|
* @internal
|
|
18
20
|
*/
|
|
19
|
-
|
|
20
21
|
const Image = ({
|
|
21
22
|
maxHeight,
|
|
22
23
|
maxWidth,
|
|
@@ -35,5 +36,4 @@ const Image = ({
|
|
|
35
36
|
css: imageStyles,
|
|
36
37
|
src: src
|
|
37
38
|
});
|
|
38
|
-
|
|
39
39
|
export default Image;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
|
|
2
3
|
import { css, jsx } from '@emotion/react';
|
|
3
4
|
const spinnerContainerStyles = css({
|
|
4
|
-
width: "var(--ds-
|
|
5
|
-
|
|
6
|
-
marginLeft: "var(--ds-scale-200, 16px)"
|
|
5
|
+
width: "var(--ds-space-300, 24px)",
|
|
6
|
+
marginLeft: "var(--ds-space-200, 16px)"
|
|
7
7
|
});
|
|
8
|
+
|
|
8
9
|
/**
|
|
9
10
|
* __Spinner container__
|
|
10
11
|
*
|
|
@@ -12,11 +13,9 @@ const spinnerContainerStyles = css({
|
|
|
12
13
|
*
|
|
13
14
|
* @internal
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
16
|
const SpinnerContainer = ({
|
|
17
17
|
children
|
|
18
18
|
}) => jsx("div", {
|
|
19
19
|
css: spinnerContainerStyles
|
|
20
20
|
}, children);
|
|
21
|
-
|
|
22
21
|
export default SpinnerContainer;
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/empty-state.js
CHANGED
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
3
3
|
import Spinner from '@atlaskit/spinner';
|
|
4
4
|
import { ActionsContainer, Container, Description, Header, Image, SpinnerContainer } from './styled';
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* __Empty state__
|
|
8
7
|
*
|
|
@@ -27,22 +26,22 @@ import { ActionsContainer, Container, Description, Header, Image, SpinnerContain
|
|
|
27
26
|
*/
|
|
28
27
|
var EmptyState = function EmptyState(_ref) {
|
|
29
28
|
var description = _ref.description,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
29
|
+
header = _ref.header,
|
|
30
|
+
imageHeight = _ref.imageHeight,
|
|
31
|
+
imageUrl = _ref.imageUrl,
|
|
32
|
+
imageWidth = _ref.imageWidth,
|
|
33
|
+
isLoading = _ref.isLoading,
|
|
34
|
+
_ref$maxImageHeight = _ref.maxImageHeight,
|
|
35
|
+
maxImageHeight = _ref$maxImageHeight === void 0 ? 160 : _ref$maxImageHeight,
|
|
36
|
+
_ref$maxImageWidth = _ref.maxImageWidth,
|
|
37
|
+
maxImageWidth = _ref$maxImageWidth === void 0 ? 160 : _ref$maxImageWidth,
|
|
38
|
+
primaryAction = _ref.primaryAction,
|
|
39
|
+
renderImage = _ref.renderImage,
|
|
40
|
+
secondaryAction = _ref.secondaryAction,
|
|
41
|
+
width = _ref.width,
|
|
42
|
+
size = _ref.size,
|
|
43
|
+
tertiaryAction = _ref.tertiaryAction,
|
|
44
|
+
testId = _ref.testId;
|
|
46
45
|
var actionsContainer = primaryAction || secondaryAction || isLoading ? /*#__PURE__*/React.createElement(ActionsContainer, null, /*#__PURE__*/React.createElement(ButtonGroup, null, secondaryAction, primaryAction), /*#__PURE__*/React.createElement(SpinnerContainer, null, isLoading && /*#__PURE__*/React.createElement(Spinner, null))) : null;
|
|
47
46
|
return /*#__PURE__*/React.createElement(Container, {
|
|
48
47
|
testId: testId,
|
|
@@ -60,5 +59,4 @@ var EmptyState = function EmptyState(_ref) {
|
|
|
60
59
|
imageHeight: imageHeight
|
|
61
60
|
}), /*#__PURE__*/React.createElement(Header, null, header), description && /*#__PURE__*/React.createElement(Description, null, description), actionsContainer, tertiaryAction);
|
|
62
61
|
};
|
|
63
|
-
|
|
64
62
|
export default EmptyState;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
|
|
2
3
|
import { css, jsx } from '@emotion/react';
|
|
3
4
|
var actionsStyles = css({
|
|
4
5
|
display: 'flex',
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// TODO Delete this comment after verifying spacing token -> previous value ``${5 * gridSize}px``
|
|
8
|
-
paddingLeft: "var(--ds-scale-500, 40px)",
|
|
6
|
+
marginBottom: "var(--ds-space-100, 8px)",
|
|
7
|
+
paddingLeft: "var(--ds-space-500, 40px)",
|
|
9
8
|
alignItems: 'center',
|
|
10
9
|
justifyContent: 'center'
|
|
11
10
|
});
|
|
11
|
+
|
|
12
12
|
/**
|
|
13
13
|
* __Actions container__
|
|
14
14
|
*
|
|
@@ -16,12 +16,10 @@ var actionsStyles = css({
|
|
|
16
16
|
*
|
|
17
17
|
* @internal
|
|
18
18
|
*/
|
|
19
|
-
|
|
20
19
|
var ActionsContainer = function ActionsContainer(_ref) {
|
|
21
20
|
var children = _ref.children;
|
|
22
21
|
return jsx("div", {
|
|
23
22
|
css: actionsStyles
|
|
24
23
|
}, children);
|
|
25
24
|
};
|
|
26
|
-
|
|
27
25
|
export default ActionsContainer;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
|
|
2
3
|
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
4
5
|
var gridSize = getGridSize();
|
|
@@ -9,14 +10,15 @@ var containerStyles = css({
|
|
|
9
10
|
margin: "".concat(verticalMarginSize, "px auto"),
|
|
10
11
|
textAlign: 'center'
|
|
11
12
|
});
|
|
12
|
-
/* Use max-width so the component can shrink on smaller viewports. */
|
|
13
13
|
|
|
14
|
+
/* Use max-width so the component can shrink on smaller viewports. */
|
|
14
15
|
var wideContainerStyles = css({
|
|
15
16
|
maxWidth: "".concat(columnWidth * 6 + gutter * 5, "px")
|
|
16
17
|
});
|
|
17
18
|
var narrowContainerStyles = css({
|
|
18
19
|
maxWidth: "".concat(columnWidth * 4 + gutter * 3, "px")
|
|
19
20
|
});
|
|
21
|
+
|
|
20
22
|
/**
|
|
21
23
|
* __Container__
|
|
22
24
|
*
|
|
@@ -24,15 +26,13 @@ var narrowContainerStyles = css({
|
|
|
24
26
|
*
|
|
25
27
|
* @internal
|
|
26
28
|
*/
|
|
27
|
-
|
|
28
29
|
var Container = function Container(_ref) {
|
|
29
30
|
var children = _ref.children,
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
width = _ref.width,
|
|
32
|
+
testId = _ref.testId;
|
|
32
33
|
return jsx("div", {
|
|
33
34
|
"data-testid": testId,
|
|
34
35
|
css: [containerStyles, width === 'narrow' ? narrowContainerStyles : wideContainerStyles]
|
|
35
36
|
}, children);
|
|
36
37
|
};
|
|
37
|
-
|
|
38
38
|
export default Container;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
|
|
2
3
|
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { N800 } from '@atlaskit/theme/colors';
|
|
4
5
|
var descriptionStyles = css({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// TODO Delete this comment after verifying spacing token -> previous value ``${getGridSize() * 3}px``
|
|
8
|
-
marginBottom: "var(--ds-scale-300, 24px)",
|
|
6
|
+
marginTop: "var(--ds-space-0, 0px)",
|
|
7
|
+
marginBottom: "var(--ds-space-300, 24px)",
|
|
9
8
|
color: "var(--ds-text, ".concat(N800, ")")
|
|
10
9
|
});
|
|
10
|
+
|
|
11
11
|
/**
|
|
12
12
|
* __Description__
|
|
13
13
|
*
|
|
@@ -15,12 +15,10 @@ var descriptionStyles = css({
|
|
|
15
15
|
*
|
|
16
16
|
* @internal
|
|
17
17
|
*/
|
|
18
|
-
|
|
19
18
|
var Description = function Description(_ref) {
|
|
20
19
|
var children = _ref.children;
|
|
21
20
|
return jsx("p", {
|
|
22
21
|
css: descriptionStyles
|
|
23
22
|
}, children);
|
|
24
23
|
};
|
|
25
|
-
|
|
26
24
|
export default Description;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
|
|
2
3
|
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
4
|
-
import { h600 } from '@atlaskit/theme/typography';
|
|
5
|
+
import { h600 } from '@atlaskit/theme/typography';
|
|
5
6
|
|
|
7
|
+
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
6
8
|
var headerStyles = css([h600(), {
|
|
7
9
|
marginTop: 0,
|
|
8
10
|
marginBottom: "".concat(getGridSize() * 2, "px")
|
|
9
11
|
}]);
|
|
12
|
+
|
|
10
13
|
/**
|
|
11
14
|
* __Header__
|
|
12
15
|
*
|
|
@@ -14,12 +17,10 @@ var headerStyles = css([h600(), {
|
|
|
14
17
|
*
|
|
15
18
|
* @internal
|
|
16
19
|
*/
|
|
17
|
-
|
|
18
20
|
var EmptyStateHeader = function EmptyStateHeader(_ref) {
|
|
19
21
|
var children = _ref.children;
|
|
20
22
|
return jsx("h4", {
|
|
21
23
|
css: headerStyles
|
|
22
24
|
}, children);
|
|
23
25
|
};
|
|
24
|
-
|
|
25
26
|
export default EmptyStateHeader;
|
package/dist/esm/styled/image.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
3
|
+
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import { gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
6
6
|
var CSS_VAR_MAX_WIDTH = '--max-width';
|
|
@@ -11,6 +11,7 @@ var imageStyles = css({
|
|
|
11
11
|
maxHeight: "var(".concat(CSS_VAR_MAX_HEIGHT, ")"),
|
|
12
12
|
margin: "0 auto ".concat(getGridSize() * 3, "px")
|
|
13
13
|
});
|
|
14
|
+
|
|
14
15
|
/**
|
|
15
16
|
* __Image__
|
|
16
17
|
*
|
|
@@ -18,17 +19,15 @@ var imageStyles = css({
|
|
|
18
19
|
*
|
|
19
20
|
* @internal
|
|
20
21
|
*/
|
|
21
|
-
|
|
22
22
|
var Image = function Image(_ref) {
|
|
23
23
|
var _ref2;
|
|
24
|
-
|
|
25
24
|
var maxHeight = _ref.maxHeight,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
maxWidth = _ref.maxWidth,
|
|
26
|
+
_ref$height = _ref.height,
|
|
27
|
+
height = _ref$height === void 0 ? 'auto' : _ref$height,
|
|
28
|
+
_ref$width = _ref.width,
|
|
29
|
+
width = _ref$width === void 0 ? 'auto' : _ref$width,
|
|
30
|
+
src = _ref.src;
|
|
32
31
|
return jsx("img", {
|
|
33
32
|
style: (_ref2 = {}, _defineProperty(_ref2, CSS_VAR_MAX_WIDTH, "".concat(maxWidth, "px")), _defineProperty(_ref2, CSS_VAR_MAX_HEIGHT, "".concat(maxHeight, "px")), _ref2),
|
|
34
33
|
width: width,
|
|
@@ -39,5 +38,4 @@ var Image = function Image(_ref) {
|
|
|
39
38
|
src: src
|
|
40
39
|
});
|
|
41
40
|
};
|
|
42
|
-
|
|
43
41
|
export default Image;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
|
|
2
3
|
import { css, jsx } from '@emotion/react';
|
|
3
4
|
var spinnerContainerStyles = css({
|
|
4
|
-
width: "var(--ds-
|
|
5
|
-
|
|
6
|
-
marginLeft: "var(--ds-scale-200, 16px)"
|
|
5
|
+
width: "var(--ds-space-300, 24px)",
|
|
6
|
+
marginLeft: "var(--ds-space-200, 16px)"
|
|
7
7
|
});
|
|
8
|
+
|
|
8
9
|
/**
|
|
9
10
|
* __Spinner container__
|
|
10
11
|
*
|
|
@@ -12,12 +13,10 @@ var spinnerContainerStyles = css({
|
|
|
12
13
|
*
|
|
13
14
|
* @internal
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
16
|
var SpinnerContainer = function SpinnerContainer(_ref) {
|
|
17
17
|
var children = _ref.children;
|
|
18
18
|
return jsx("div", {
|
|
19
19
|
css: spinnerContainerStyles
|
|
20
20
|
}, children);
|
|
21
21
|
};
|
|
22
|
-
|
|
23
22
|
export default SpinnerContainer;
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
package/report.api.md
CHANGED