@akinon/ui-spin 0.4.0 → 0.5.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/dist/cjs/types.d.ts +53 -0
- package/dist/esm/types.d.ts +53 -0
- package/package.json +4 -4
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export type SpinProps = Omit<AntSpinProps, 'prefixCls' | 'style' | 'styles'>;
|
|
2
|
+
|
|
3
|
+
declare const SpinSizes: readonly ['small', 'default', 'large'];
|
|
4
|
+
|
|
5
|
+
export type SpinSize = (typeof SpinSizes)[number];
|
|
6
|
+
|
|
7
|
+
export type SpinIndicator = React.ReactElement<HTMLElement>;
|
|
8
|
+
|
|
9
|
+
export interface AntSpinProps {
|
|
10
|
+
prefixCls?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The additional css class
|
|
13
|
+
*/
|
|
14
|
+
className?: string;
|
|
15
|
+
/**
|
|
16
|
+
* ClassName on the root element
|
|
17
|
+
*/
|
|
18
|
+
rootClassName?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Whether Spin is visible
|
|
21
|
+
*/
|
|
22
|
+
spinning?: boolean;
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
/**
|
|
25
|
+
* The size of Spin
|
|
26
|
+
*/
|
|
27
|
+
size?: SpinSize;
|
|
28
|
+
/**
|
|
29
|
+
* Customize description content when Spin has children
|
|
30
|
+
*/
|
|
31
|
+
tip?: React.ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Specifies a delay in milliseconds for loading state (prevent flush)
|
|
34
|
+
*/
|
|
35
|
+
delay?: number;
|
|
36
|
+
/**
|
|
37
|
+
* The className of wrapper when Spin has children
|
|
38
|
+
*/
|
|
39
|
+
wrapperClassName?: string;
|
|
40
|
+
/**
|
|
41
|
+
* React node of the spinning indicator
|
|
42
|
+
*/
|
|
43
|
+
indicator?: SpinIndicator;
|
|
44
|
+
children?: React.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Display a backdrop with the Spin component
|
|
47
|
+
*/
|
|
48
|
+
fullscreen?: boolean;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type SpinType = React.FC<SpinProps> & {
|
|
52
|
+
setDefaultIndicator: (indicator: React.ReactNode) => void;
|
|
53
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export type SpinProps = Omit<AntSpinProps, 'prefixCls' | 'style' | 'styles'>;
|
|
2
|
+
|
|
3
|
+
declare const SpinSizes: readonly ['small', 'default', 'large'];
|
|
4
|
+
|
|
5
|
+
export type SpinSize = (typeof SpinSizes)[number];
|
|
6
|
+
|
|
7
|
+
export type SpinIndicator = React.ReactElement<HTMLElement>;
|
|
8
|
+
|
|
9
|
+
export interface AntSpinProps {
|
|
10
|
+
prefixCls?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The additional css class
|
|
13
|
+
*/
|
|
14
|
+
className?: string;
|
|
15
|
+
/**
|
|
16
|
+
* ClassName on the root element
|
|
17
|
+
*/
|
|
18
|
+
rootClassName?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Whether Spin is visible
|
|
21
|
+
*/
|
|
22
|
+
spinning?: boolean;
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
/**
|
|
25
|
+
* The size of Spin
|
|
26
|
+
*/
|
|
27
|
+
size?: SpinSize;
|
|
28
|
+
/**
|
|
29
|
+
* Customize description content when Spin has children
|
|
30
|
+
*/
|
|
31
|
+
tip?: React.ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Specifies a delay in milliseconds for loading state (prevent flush)
|
|
34
|
+
*/
|
|
35
|
+
delay?: number;
|
|
36
|
+
/**
|
|
37
|
+
* The className of wrapper when Spin has children
|
|
38
|
+
*/
|
|
39
|
+
wrapperClassName?: string;
|
|
40
|
+
/**
|
|
41
|
+
* React node of the spinning indicator
|
|
42
|
+
*/
|
|
43
|
+
indicator?: SpinIndicator;
|
|
44
|
+
children?: React.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Display a backdrop with the Spin component
|
|
47
|
+
*/
|
|
48
|
+
fullscreen?: boolean;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type SpinType = React.FC<SpinProps> & {
|
|
52
|
+
setDefaultIndicator: (indicator: React.ReactNode) => void;
|
|
53
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/ui-spin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"antd": "5.17.0",
|
|
13
|
-
"@akinon/ui-theme": "0.
|
|
13
|
+
"@akinon/ui-theme": "0.7.0"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"clean-package": "2.2.0",
|
|
17
17
|
"copyfiles": "^2.4.1",
|
|
18
18
|
"rimraf": "^5.0.5",
|
|
19
19
|
"typescript": "^5.2.2",
|
|
20
|
-
"@akinon/typescript-config": "0.
|
|
20
|
+
"@akinon/typescript-config": "0.4.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": ">=18",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"build": "pnpm run build:esm && pnpm run build:commonjs && pnpm run copy:files",
|
|
38
38
|
"build:esm": "tsc --outDir dist/esm",
|
|
39
39
|
"build:commonjs": "tsc --module commonjs --outDir dist/cjs",
|
|
40
|
-
"copy:files": "copyfiles -u 1 src
|
|
40
|
+
"copy:files": "copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/esm && copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/cjs",
|
|
41
41
|
"clean": "rimraf dist/",
|
|
42
42
|
"typecheck": "tsc --noEmit"
|
|
43
43
|
}
|