@dhis2-ui/loader 8.16.0 → 9.0.0-alpha.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/package.json +7 -4
- package/types/index.d.ts +35 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/loader",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0-alpha.2",
|
|
4
4
|
"description": "UI Loaders",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"main": "./build/cjs/index.js",
|
|
14
14
|
"module": "./build/es/index.js",
|
|
15
15
|
"exports": {
|
|
16
|
+
"types": "./types/index.d.ts",
|
|
16
17
|
"import": "./build/es/index.js",
|
|
17
18
|
"require": "./build/cjs/index.js"
|
|
18
19
|
},
|
|
@@ -32,16 +33,18 @@
|
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
35
|
"@dhis2/prop-types": "^3.1.2",
|
|
35
|
-
"@dhis2/ui-constants": "
|
|
36
|
+
"@dhis2/ui-constants": "9.0.0-alpha.2",
|
|
36
37
|
"classnames": "^2.3.1",
|
|
37
38
|
"prop-types": "^15.7.2"
|
|
38
39
|
},
|
|
39
40
|
"files": [
|
|
40
|
-
"build"
|
|
41
|
+
"build",
|
|
42
|
+
"types"
|
|
41
43
|
],
|
|
42
44
|
"devDependencies": {
|
|
43
45
|
"react": "16.13",
|
|
44
46
|
"react-dom": "16.13",
|
|
45
47
|
"styled-jsx": "^4.0.1"
|
|
46
|
-
}
|
|
48
|
+
},
|
|
49
|
+
"types": "types"
|
|
47
50
|
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
|
|
3
|
+
export interface CircularLoaderProps {
|
|
4
|
+
className?: string
|
|
5
|
+
dataTest?: string
|
|
6
|
+
extrasmall?: boolean
|
|
7
|
+
invert?: boolean
|
|
8
|
+
large?: boolean
|
|
9
|
+
small?: boolean
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const CircularLoader: React.FC<CircularLoaderProps>
|
|
13
|
+
|
|
14
|
+
export interface LinearLoaderProps {
|
|
15
|
+
/**
|
|
16
|
+
* The progression in percent without the '%' sign
|
|
17
|
+
*/
|
|
18
|
+
amount: number
|
|
19
|
+
className?: string
|
|
20
|
+
dataTest?: string
|
|
21
|
+
/**
|
|
22
|
+
* Use inverted color scheme
|
|
23
|
+
*/
|
|
24
|
+
invert?: boolean
|
|
25
|
+
/**
|
|
26
|
+
* The margin around the loader, can be a full shorthand
|
|
27
|
+
*/
|
|
28
|
+
margin?: string
|
|
29
|
+
/**
|
|
30
|
+
* The width of the entire indicator
|
|
31
|
+
*/
|
|
32
|
+
width?: string
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const LinearLoader: React.FC<LinearLoaderProps>
|