@atlaskit/empty-state 7.3.11 → 7.3.12
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/es2019/version.json +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +6 -4
- package/report.api.md +131 -0
package/CHANGELOG.md
CHANGED
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/empty-state",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.12",
|
|
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/"
|
|
7
7
|
},
|
|
8
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
9
|
"homepage": "https://atlassian.design/components/empty-state/",
|
|
10
10
|
"author": "Atlassian Pty Ltd",
|
|
11
11
|
"license": "Apache-2.0",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"team": "Design System Team",
|
|
20
20
|
"releaseModel": "scheduled",
|
|
21
21
|
"website": {
|
|
22
|
-
"name": "Empty state"
|
|
22
|
+
"name": "Empty state",
|
|
23
|
+
"category": "Components"
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
"@testing-library/react": "^8.0.1",
|
|
42
43
|
"enzyme": "^3.10.0",
|
|
43
44
|
"react-dom": "^16.8.0",
|
|
44
|
-
"typescript": "4.
|
|
45
|
+
"typescript": "4.3.5",
|
|
45
46
|
"wait-for-expect": "^1.2.0"
|
|
46
47
|
},
|
|
47
48
|
"techstack": {
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
"import-structure": "atlassian-conventions"
|
|
50
51
|
},
|
|
51
52
|
"@repo/internal": {
|
|
53
|
+
"dom-events": "use-bind-event-listener",
|
|
52
54
|
"analytics": "analytics-next",
|
|
53
55
|
"theming": "tokens",
|
|
54
56
|
"styling": [
|
package/report.api.md
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
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
|
+
/// <reference types="react" />
|
|
7
|
+
|
|
8
|
+
import type { ReactNode } from 'react';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* __Empty state__
|
|
12
|
+
*
|
|
13
|
+
* A component used for presenting various empty states.
|
|
14
|
+
* e.g. (no items, empty search, broken link, welcome screen etc.)
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* import EmptyState from '@atlaskit/empty-state';
|
|
19
|
+
*
|
|
20
|
+
* // An example of a 404 state
|
|
21
|
+
* export default () => {
|
|
22
|
+
* <EmptyState
|
|
23
|
+
* header="Page not found"
|
|
24
|
+
* imageUrl="https://cdn.io/images/404"
|
|
25
|
+
* description="Looks like you've stumbled off track. Sorry about that! This page either doesn't exist or has been removed."
|
|
26
|
+
* primaryAction={<Button appearance="primary">Home Page</Button>}
|
|
27
|
+
* secondaryAction={<Button>Report a problem</Button>}
|
|
28
|
+
* />;
|
|
29
|
+
* };
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
declare const EmptyState: ({
|
|
33
|
+
description,
|
|
34
|
+
header,
|
|
35
|
+
imageHeight,
|
|
36
|
+
imageUrl,
|
|
37
|
+
imageWidth,
|
|
38
|
+
isLoading,
|
|
39
|
+
maxImageHeight,
|
|
40
|
+
maxImageWidth,
|
|
41
|
+
primaryAction,
|
|
42
|
+
renderImage,
|
|
43
|
+
secondaryAction,
|
|
44
|
+
width,
|
|
45
|
+
size,
|
|
46
|
+
tertiaryAction,
|
|
47
|
+
testId,
|
|
48
|
+
}: EmptyStateProps) => JSX.Element;
|
|
49
|
+
export default EmptyState;
|
|
50
|
+
|
|
51
|
+
export declare interface EmptyStateProps {
|
|
52
|
+
/**
|
|
53
|
+
* Title that briefly describes the page to the user.
|
|
54
|
+
*/
|
|
55
|
+
header: string;
|
|
56
|
+
/**
|
|
57
|
+
* The main block of text that holds additional supporting information.
|
|
58
|
+
*/
|
|
59
|
+
description?: ReactNode;
|
|
60
|
+
/**
|
|
61
|
+
* Controls how much horizontal space the component fills. Defaults to "wide".
|
|
62
|
+
*/
|
|
63
|
+
width?: Width;
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated
|
|
66
|
+
* Duplicates the `width` prop. Use `width instead`.
|
|
67
|
+
*/
|
|
68
|
+
size?: Width;
|
|
69
|
+
/**
|
|
70
|
+
* The url of image that will be shown above the title, fed directly into the `src` prop of an <img> element.
|
|
71
|
+
* Note, this image will be constrained by the `maxWidth` and `maxHeight` props.
|
|
72
|
+
*/
|
|
73
|
+
imageUrl?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Maximum width (in pixels) of the image, default value is 160.
|
|
76
|
+
*/
|
|
77
|
+
maxImageWidth?: number;
|
|
78
|
+
/**
|
|
79
|
+
* Maximum height (in pixels) of the image, default value is 160.
|
|
80
|
+
*/
|
|
81
|
+
maxImageHeight?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Primary action button for the page, usually it will be something like "Create" (or "Retry" for error pages).
|
|
84
|
+
*/
|
|
85
|
+
primaryAction?: ReactNode;
|
|
86
|
+
/**
|
|
87
|
+
* An alternative API to supply an image using a render prop. Only rendered if no `imageUrl` is supplied.
|
|
88
|
+
*/
|
|
89
|
+
renderImage?: (props: RenderImageProps) => React.ReactNode;
|
|
90
|
+
/**
|
|
91
|
+
* Secondary action button for the page.
|
|
92
|
+
*/
|
|
93
|
+
secondaryAction?: ReactNode;
|
|
94
|
+
/**
|
|
95
|
+
* Button with link to some external resource like documentation or tutorial, it will be opened in a new tab.
|
|
96
|
+
*/
|
|
97
|
+
tertiaryAction?: ReactNode;
|
|
98
|
+
/**
|
|
99
|
+
* A hook for automated testing
|
|
100
|
+
*/
|
|
101
|
+
testId?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Used to indicate a loading state. Will show a spinner next to the action buttons when true.
|
|
104
|
+
*/
|
|
105
|
+
isLoading?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Width of the image that is rendered in EmptyState component.
|
|
108
|
+
* Useful when you want image to be of exact width to stop it bouncing around when loading in.
|
|
109
|
+
*/
|
|
110
|
+
imageWidth?: number;
|
|
111
|
+
/**
|
|
112
|
+
* Height of the image that is rendered in EmptyState component.
|
|
113
|
+
* Useful when you want image to be of exact height to stop it bouncing around when loading in.
|
|
114
|
+
* Only set `height` if you want the image to resize down on smaller devices.
|
|
115
|
+
*/
|
|
116
|
+
imageHeight?: number;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export declare interface RenderImageProps {
|
|
120
|
+
maxImageWidth?: number;
|
|
121
|
+
maxImageHeight?: number;
|
|
122
|
+
imageWidth?: number;
|
|
123
|
+
imageHeight?: number;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export declare type Sizes = 'narrow' | 'wide';
|
|
127
|
+
|
|
128
|
+
export declare type Width = Sizes;
|
|
129
|
+
|
|
130
|
+
export {};
|
|
131
|
+
````
|