@atlaskit/empty-state 7.5.2 → 7.6.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 +6 -0
- package/dist/cjs/empty-state.js +5 -1
- package/dist/cjs/styled/header.js +6 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/empty-state.js +4 -1
- package/dist/es2019/styled/header.js +9 -5
- package/dist/es2019/version.json +1 -1
- package/dist/esm/empty-state.js +5 -1
- package/dist/esm/styled/header.js +6 -3
- package/dist/esm/version.json +1 -1
- package/dist/types/empty-state.d.ts +1 -1
- package/dist/types/styled/header.d.ts +5 -3
- package/dist/types/types.d.ts +5 -0
- package/dist/types-ts4.5/empty-state.d.ts +1 -1
- package/dist/types-ts4.5/styled/header.d.ts +5 -3
- package/dist/types-ts4.5/types.d.ts +5 -0
- package/package.json +5 -4
- package/report.api.md +15 -0
- package/tmp/api-report-tmp.d.ts +56 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/empty-state
|
|
2
2
|
|
|
3
|
+
## 7.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`56d11ec914b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56d11ec914b) - Add a new prop `headingLevel` to set the heading level in the header element.
|
|
8
|
+
|
|
3
9
|
## 7.5.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/empty-state.js
CHANGED
|
@@ -34,6 +34,8 @@ var _styled = require("./styled");
|
|
|
34
34
|
var EmptyState = function EmptyState(_ref) {
|
|
35
35
|
var description = _ref.description,
|
|
36
36
|
header = _ref.header,
|
|
37
|
+
_ref$headingLevel = _ref.headingLevel,
|
|
38
|
+
headingLevel = _ref$headingLevel === void 0 ? 4 : _ref$headingLevel,
|
|
37
39
|
imageHeight = _ref.imageHeight,
|
|
38
40
|
imageUrl = _ref.imageUrl,
|
|
39
41
|
imageWidth = _ref.imageWidth,
|
|
@@ -66,7 +68,9 @@ var EmptyState = function EmptyState(_ref) {
|
|
|
66
68
|
maxImageHeight: maxImageHeight,
|
|
67
69
|
imageWidth: imageWidth,
|
|
68
70
|
imageHeight: imageHeight
|
|
69
|
-
}), /*#__PURE__*/_react.default.createElement(_styled.Header,
|
|
71
|
+
}), /*#__PURE__*/_react.default.createElement(_styled.Header, {
|
|
72
|
+
level: headingLevel
|
|
73
|
+
}, header), description && /*#__PURE__*/_react.default.createElement(_styled.Description, null, description), actionsContainer, tertiaryAction);
|
|
70
74
|
};
|
|
71
75
|
var _default = EmptyState;
|
|
72
76
|
exports.default = _default;
|
|
@@ -8,7 +8,7 @@ var _react = require("@emotion/react");
|
|
|
8
8
|
var _typography = require("@atlaskit/theme/typography");
|
|
9
9
|
/** @jsx jsx */
|
|
10
10
|
|
|
11
|
-
// eslint-disable-next-line @
|
|
11
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
12
12
|
var headerStyles = (0, _react.css)([(0, _typography.h600)(), {
|
|
13
13
|
marginTop: "var(--ds-space-0, 0px)",
|
|
14
14
|
marginBottom: "var(--ds-space-200, 16px)"
|
|
@@ -22,8 +22,11 @@ var headerStyles = (0, _react.css)([(0, _typography.h600)(), {
|
|
|
22
22
|
* @internal
|
|
23
23
|
*/
|
|
24
24
|
var EmptyStateHeader = function EmptyStateHeader(_ref) {
|
|
25
|
-
var children = _ref.children
|
|
26
|
-
|
|
25
|
+
var children = _ref.children,
|
|
26
|
+
_ref$level = _ref.level,
|
|
27
|
+
level = _ref$level === void 0 ? 4 : _ref$level;
|
|
28
|
+
var Tag = "h".concat(level > 0 && level < 7 ? level : level > 6 ? 6 : 4);
|
|
29
|
+
return (0, _react.jsx)(Tag, {
|
|
27
30
|
css: headerStyles
|
|
28
31
|
}, children);
|
|
29
32
|
};
|
package/dist/cjs/version.json
CHANGED
|
@@ -27,6 +27,7 @@ import { ActionsContainer, Container, Description, Header, Image, SpinnerContain
|
|
|
27
27
|
const EmptyState = ({
|
|
28
28
|
description,
|
|
29
29
|
header,
|
|
30
|
+
headingLevel = 4,
|
|
30
31
|
imageHeight,
|
|
31
32
|
imageUrl,
|
|
32
33
|
imageWidth,
|
|
@@ -58,6 +59,8 @@ const EmptyState = ({
|
|
|
58
59
|
maxImageHeight,
|
|
59
60
|
imageWidth,
|
|
60
61
|
imageHeight
|
|
61
|
-
}), /*#__PURE__*/React.createElement(Header,
|
|
62
|
+
}), /*#__PURE__*/React.createElement(Header, {
|
|
63
|
+
level: headingLevel
|
|
64
|
+
}, header), description && /*#__PURE__*/React.createElement(Description, null, description), actionsContainer, tertiaryAction);
|
|
62
65
|
};
|
|
63
66
|
export default EmptyState;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { h600 } from '@atlaskit/theme/typography';
|
|
5
|
-
// eslint-disable-next-line @
|
|
5
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
6
6
|
const headerStyles = css([h600(), {
|
|
7
7
|
marginTop: "var(--ds-space-0, 0px)",
|
|
8
8
|
marginBottom: "var(--ds-space-200, 16px)"
|
|
@@ -16,8 +16,12 @@ const headerStyles = css([h600(), {
|
|
|
16
16
|
* @internal
|
|
17
17
|
*/
|
|
18
18
|
const EmptyStateHeader = ({
|
|
19
|
-
children
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
19
|
+
children,
|
|
20
|
+
level = 4
|
|
21
|
+
}) => {
|
|
22
|
+
const Tag = `h${level > 0 && level < 7 ? level : level > 6 ? 6 : 4}`;
|
|
23
|
+
return jsx(Tag, {
|
|
24
|
+
css: headerStyles
|
|
25
|
+
}, children);
|
|
26
|
+
};
|
|
23
27
|
export default EmptyStateHeader;
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/empty-state.js
CHANGED
|
@@ -27,6 +27,8 @@ import { ActionsContainer, Container, Description, Header, Image, SpinnerContain
|
|
|
27
27
|
var EmptyState = function EmptyState(_ref) {
|
|
28
28
|
var description = _ref.description,
|
|
29
29
|
header = _ref.header,
|
|
30
|
+
_ref$headingLevel = _ref.headingLevel,
|
|
31
|
+
headingLevel = _ref$headingLevel === void 0 ? 4 : _ref$headingLevel,
|
|
30
32
|
imageHeight = _ref.imageHeight,
|
|
31
33
|
imageUrl = _ref.imageUrl,
|
|
32
34
|
imageWidth = _ref.imageWidth,
|
|
@@ -59,6 +61,8 @@ var EmptyState = function EmptyState(_ref) {
|
|
|
59
61
|
maxImageHeight: maxImageHeight,
|
|
60
62
|
imageWidth: imageWidth,
|
|
61
63
|
imageHeight: imageHeight
|
|
62
|
-
}), /*#__PURE__*/React.createElement(Header,
|
|
64
|
+
}), /*#__PURE__*/React.createElement(Header, {
|
|
65
|
+
level: headingLevel
|
|
66
|
+
}, header), description && /*#__PURE__*/React.createElement(Description, null, description), actionsContainer, tertiaryAction);
|
|
63
67
|
};
|
|
64
68
|
export default EmptyState;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { h600 } from '@atlaskit/theme/typography';
|
|
5
|
-
// eslint-disable-next-line @
|
|
5
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
6
6
|
var headerStyles = css([h600(), {
|
|
7
7
|
marginTop: "var(--ds-space-0, 0px)",
|
|
8
8
|
marginBottom: "var(--ds-space-200, 16px)"
|
|
@@ -16,8 +16,11 @@ var headerStyles = css([h600(), {
|
|
|
16
16
|
* @internal
|
|
17
17
|
*/
|
|
18
18
|
var EmptyStateHeader = function EmptyStateHeader(_ref) {
|
|
19
|
-
var children = _ref.children
|
|
20
|
-
|
|
19
|
+
var children = _ref.children,
|
|
20
|
+
_ref$level = _ref.level,
|
|
21
|
+
level = _ref$level === void 0 ? 4 : _ref$level;
|
|
22
|
+
var Tag = "h".concat(level > 0 && level < 7 ? level : level > 6 ? 6 : 4);
|
|
23
|
+
return jsx(Tag, {
|
|
21
24
|
css: headerStyles
|
|
22
25
|
}, children);
|
|
23
26
|
};
|
package/dist/esm/version.json
CHANGED
|
@@ -22,5 +22,5 @@ import type { EmptyStateProps } from './types';
|
|
|
22
22
|
* };
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
|
-
declare const EmptyState: ({ description, header, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element;
|
|
25
|
+
declare const EmptyState: ({ description, header, headingLevel, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element;
|
|
26
26
|
export default EmptyState;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
+
type HeaderProps = {
|
|
4
|
+
children: string;
|
|
5
|
+
level?: number;
|
|
6
|
+
};
|
|
3
7
|
/**
|
|
4
8
|
* __Header__
|
|
5
9
|
*
|
|
@@ -7,7 +11,5 @@ import { FC } from 'react';
|
|
|
7
11
|
*
|
|
8
12
|
* @internal
|
|
9
13
|
*/
|
|
10
|
-
declare const EmptyStateHeader: FC<
|
|
11
|
-
children: string;
|
|
12
|
-
}>;
|
|
14
|
+
declare const EmptyStateHeader: FC<HeaderProps>;
|
|
13
15
|
export default EmptyStateHeader;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -12,6 +12,11 @@ export interface EmptyStateProps {
|
|
|
12
12
|
* Title that briefly describes the page to the user.
|
|
13
13
|
*/
|
|
14
14
|
header: string;
|
|
15
|
+
/**
|
|
16
|
+
* The value used to set the heading level of the header element.
|
|
17
|
+
* Must be in the range of 1 to 6. Defaults to 4.
|
|
18
|
+
*/
|
|
19
|
+
headingLevel?: number;
|
|
15
20
|
/**
|
|
16
21
|
* The main block of text that holds additional supporting information.
|
|
17
22
|
*/
|
|
@@ -22,5 +22,5 @@ import type { EmptyStateProps } from './types';
|
|
|
22
22
|
* };
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
|
-
declare const EmptyState: ({ description, header, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element;
|
|
25
|
+
declare const EmptyState: ({ description, header, headingLevel, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element;
|
|
26
26
|
export default EmptyState;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
+
type HeaderProps = {
|
|
4
|
+
children: string;
|
|
5
|
+
level?: number;
|
|
6
|
+
};
|
|
3
7
|
/**
|
|
4
8
|
* __Header__
|
|
5
9
|
*
|
|
@@ -7,7 +11,5 @@ import { FC } from 'react';
|
|
|
7
11
|
*
|
|
8
12
|
* @internal
|
|
9
13
|
*/
|
|
10
|
-
declare const EmptyStateHeader: FC<
|
|
11
|
-
children: string;
|
|
12
|
-
}>;
|
|
14
|
+
declare const EmptyStateHeader: FC<HeaderProps>;
|
|
13
15
|
export default EmptyStateHeader;
|
|
@@ -12,6 +12,11 @@ export interface EmptyStateProps {
|
|
|
12
12
|
* Title that briefly describes the page to the user.
|
|
13
13
|
*/
|
|
14
14
|
header: string;
|
|
15
|
+
/**
|
|
16
|
+
* The value used to set the heading level of the header element.
|
|
17
|
+
* Must be in the range of 1 to 6. Defaults to 4.
|
|
18
|
+
*/
|
|
19
|
+
headingLevel?: number;
|
|
15
20
|
/**
|
|
16
21
|
* The main block of text that holds additional supporting information.
|
|
17
22
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/empty-state",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.6.0",
|
|
4
4
|
"description": "An empty state appears when there is no data to display and describes what the user can do next.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"atlaskit:src": "src/index.tsx",
|
|
26
26
|
"atlassian": {
|
|
27
27
|
"team": "Design System Team",
|
|
28
|
-
"releaseModel": "
|
|
28
|
+
"releaseModel": "continuous",
|
|
29
29
|
"website": {
|
|
30
30
|
"name": "Empty state",
|
|
31
31
|
"category": "Components"
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atlaskit/button": "^16.
|
|
35
|
+
"@atlaskit/button": "^16.8.0",
|
|
36
36
|
"@atlaskit/spinner": "^15.5.0",
|
|
37
37
|
"@atlaskit/theme": "^12.5.0",
|
|
38
|
-
"@atlaskit/tokens": "^1.
|
|
38
|
+
"@atlaskit/tokens": "^1.9.0",
|
|
39
39
|
"@babel/runtime": "^7.0.0",
|
|
40
40
|
"@emotion/react": "^11.7.1"
|
|
41
41
|
},
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"@atlaskit/visual-regression": "*",
|
|
50
50
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
51
51
|
"@testing-library/react": "^12.1.5",
|
|
52
|
+
"jest-axe": "^4.0.0",
|
|
52
53
|
"react-dom": "^16.8.0",
|
|
53
54
|
"typescript": "~4.9.5",
|
|
54
55
|
"wait-for-expect": "^1.2.0"
|
package/report.api.md
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
### Table of contents
|
|
9
9
|
|
|
10
10
|
- [Main Entry Types](#main-entry-types)
|
|
11
|
+
- [Peer Dependencies](#peer-dependencies)
|
|
11
12
|
|
|
12
13
|
### Main Entry Types
|
|
13
14
|
|
|
@@ -22,6 +23,7 @@ import type { ReactNode } from 'react';
|
|
|
22
23
|
const EmptyState: ({
|
|
23
24
|
description,
|
|
24
25
|
header,
|
|
26
|
+
headingLevel,
|
|
25
27
|
imageHeight,
|
|
26
28
|
imageUrl,
|
|
27
29
|
imageWidth,
|
|
@@ -42,6 +44,7 @@ export default EmptyState;
|
|
|
42
44
|
export interface EmptyStateProps {
|
|
43
45
|
description?: ReactNode;
|
|
44
46
|
header: string;
|
|
47
|
+
headingLevel?: number;
|
|
45
48
|
imageHeight?: number;
|
|
46
49
|
imageUrl?: string;
|
|
47
50
|
imageWidth?: number;
|
|
@@ -80,3 +83,15 @@ export type Width = Sizes;
|
|
|
80
83
|
```
|
|
81
84
|
|
|
82
85
|
<!--SECTION END: Main Entry Types-->
|
|
86
|
+
|
|
87
|
+
### Peer Dependencies
|
|
88
|
+
|
|
89
|
+
<!--SECTION START: Peer Dependencies-->
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"react": "^16.8.0"
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
<!--SECTION END: Peer Dependencies-->
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/empty-state"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
|
|
9
|
+
import type { ReactNode } from 'react';
|
|
10
|
+
|
|
11
|
+
// @public
|
|
12
|
+
const EmptyState: ({ description, header, headingLevel, imageHeight, imageUrl, imageWidth, isLoading, maxImageHeight, maxImageWidth, primaryAction, renderImage, secondaryAction, width, size, tertiaryAction, testId, }: EmptyStateProps) => JSX.Element;
|
|
13
|
+
export default EmptyState;
|
|
14
|
+
|
|
15
|
+
// @public (undocumented)
|
|
16
|
+
export interface EmptyStateProps {
|
|
17
|
+
description?: ReactNode;
|
|
18
|
+
header: string;
|
|
19
|
+
headingLevel?: number;
|
|
20
|
+
imageHeight?: number;
|
|
21
|
+
imageUrl?: string;
|
|
22
|
+
imageWidth?: number;
|
|
23
|
+
isLoading?: boolean;
|
|
24
|
+
maxImageHeight?: number;
|
|
25
|
+
maxImageWidth?: number;
|
|
26
|
+
primaryAction?: ReactNode;
|
|
27
|
+
renderImage?: (props: RenderImageProps) => React.ReactNode;
|
|
28
|
+
secondaryAction?: ReactNode;
|
|
29
|
+
// @deprecated (undocumented)
|
|
30
|
+
size?: Width;
|
|
31
|
+
tertiaryAction?: ReactNode;
|
|
32
|
+
testId?: string;
|
|
33
|
+
width?: Width;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// @public (undocumented)
|
|
37
|
+
export interface RenderImageProps {
|
|
38
|
+
// (undocumented)
|
|
39
|
+
imageHeight?: number;
|
|
40
|
+
// (undocumented)
|
|
41
|
+
imageWidth?: number;
|
|
42
|
+
// (undocumented)
|
|
43
|
+
maxImageHeight?: number;
|
|
44
|
+
// (undocumented)
|
|
45
|
+
maxImageWidth?: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// @public (undocumented)
|
|
49
|
+
export type Sizes = 'narrow' | 'wide';
|
|
50
|
+
|
|
51
|
+
// @public (undocumented)
|
|
52
|
+
export type Width = Sizes;
|
|
53
|
+
|
|
54
|
+
// (No @packageDocumentation comment for this package)
|
|
55
|
+
|
|
56
|
+
```
|