@akinon/ui-spin 0.5.0 → 1.0.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/index.d.ts +10 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +10 -0
- package/dist/cjs/types.d.ts +20 -0
- package/dist/esm/index.d.ts +10 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +10 -0
- package/dist/esm/types.d.ts +20 -0
- package/package.json +5 -5
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { SpinProps } from './types';
|
|
3
3
|
export type { SpinProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Spin component is used to indicate loading states in the application. It can be used with or without wrapping content.
|
|
6
|
+
*
|
|
7
|
+
* - The `spinning` property controls the visibility of the spin animation.
|
|
8
|
+
* - The `size` property allows customization of the spinner size (`small`, `default`, or `large`).
|
|
9
|
+
* - A custom loading indicator can be provided using the `indicator` property.
|
|
10
|
+
* - When used with children, the `tip` property can display descriptive content to provide additional context about the loading state.
|
|
11
|
+
* - The `fullscreen` property enables a backdrop behind the spinner, making it suitable for blocking the entire screen during loading.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
4
14
|
export declare const Spin: (props: SpinProps) => React.JSX.Element;
|
|
5
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,IAAI,UAAW,SAAS,sBA4BpC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;;;;;GASG;AAEH,eAAO,MAAM,IAAI,UAAW,SAAS,sBA4BpC,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -5,6 +5,16 @@ const ui_theme_1 = require("@akinon/ui-theme");
|
|
|
5
5
|
const cssinjs_1 = require("@ant-design/cssinjs");
|
|
6
6
|
const antd_1 = require("antd");
|
|
7
7
|
const React = require("react");
|
|
8
|
+
/**
|
|
9
|
+
* Spin component is used to indicate loading states in the application. It can be used with or without wrapping content.
|
|
10
|
+
*
|
|
11
|
+
* - The `spinning` property controls the visibility of the spin animation.
|
|
12
|
+
* - The `size` property allows customization of the spinner size (`small`, `default`, or `large`).
|
|
13
|
+
* - A custom loading indicator can be provided using the `indicator` property.
|
|
14
|
+
* - When used with children, the `tip` property can display descriptive content to provide additional context about the loading state.
|
|
15
|
+
* - The `fullscreen` property enables a backdrop behind the spinner, making it suitable for blocking the entire screen during loading.
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
8
18
|
const Spin = (props) => {
|
|
9
19
|
const { getPrefixCls, theme } = React.useContext(antd_1.ConfigProvider.ConfigContext);
|
|
10
20
|
const { token, hashId } = (0, ui_theme_1.useToken)();
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -7,41 +7,61 @@ export type SpinSize = (typeof SpinSizes)[number];
|
|
|
7
7
|
export type SpinIndicator = React.ReactElement<HTMLElement>;
|
|
8
8
|
|
|
9
9
|
export interface AntSpinProps {
|
|
10
|
+
/**
|
|
11
|
+
* The prefixCls of the component
|
|
12
|
+
*/
|
|
10
13
|
prefixCls?: string;
|
|
14
|
+
|
|
11
15
|
/**
|
|
12
16
|
* The additional css class
|
|
13
17
|
*/
|
|
14
18
|
className?: string;
|
|
19
|
+
|
|
15
20
|
/**
|
|
16
21
|
* ClassName on the root element
|
|
17
22
|
*/
|
|
18
23
|
rootClassName?: string;
|
|
24
|
+
|
|
19
25
|
/**
|
|
20
26
|
* Whether Spin is visible
|
|
21
27
|
*/
|
|
22
28
|
spinning?: boolean;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Inline styles for the spin component.
|
|
32
|
+
*/
|
|
23
33
|
style?: React.CSSProperties;
|
|
34
|
+
|
|
24
35
|
/**
|
|
25
36
|
* The size of Spin
|
|
26
37
|
*/
|
|
27
38
|
size?: SpinSize;
|
|
39
|
+
|
|
28
40
|
/**
|
|
29
41
|
* Customize description content when Spin has children
|
|
30
42
|
*/
|
|
31
43
|
tip?: React.ReactNode;
|
|
44
|
+
|
|
32
45
|
/**
|
|
33
46
|
* Specifies a delay in milliseconds for loading state (prevent flush)
|
|
34
47
|
*/
|
|
35
48
|
delay?: number;
|
|
49
|
+
|
|
36
50
|
/**
|
|
37
51
|
* The className of wrapper when Spin has children
|
|
38
52
|
*/
|
|
39
53
|
wrapperClassName?: string;
|
|
54
|
+
|
|
40
55
|
/**
|
|
41
56
|
* React node of the spinning indicator
|
|
42
57
|
*/
|
|
43
58
|
indicator?: SpinIndicator;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The children of the spin.
|
|
62
|
+
*/
|
|
44
63
|
children?: React.ReactNode;
|
|
64
|
+
|
|
45
65
|
/**
|
|
46
66
|
* Display a backdrop with the Spin component
|
|
47
67
|
*/
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { SpinProps } from './types';
|
|
3
3
|
export type { SpinProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Spin component is used to indicate loading states in the application. It can be used with or without wrapping content.
|
|
6
|
+
*
|
|
7
|
+
* - The `spinning` property controls the visibility of the spin animation.
|
|
8
|
+
* - The `size` property allows customization of the spinner size (`small`, `default`, or `large`).
|
|
9
|
+
* - A custom loading indicator can be provided using the `indicator` property.
|
|
10
|
+
* - When used with children, the `tip` property can display descriptive content to provide additional context about the loading state.
|
|
11
|
+
* - The `fullscreen` property enables a backdrop behind the spinner, making it suitable for blocking the entire screen during loading.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
4
14
|
export declare const Spin: (props: SpinProps) => React.JSX.Element;
|
|
5
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,IAAI,UAAW,SAAS,sBA4BpC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;;;;;GASG;AAEH,eAAO,MAAM,IAAI,UAAW,SAAS,sBA4BpC,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -2,6 +2,16 @@ import { useToken } from '@akinon/ui-theme';
|
|
|
2
2
|
import { useStyleRegister } from '@ant-design/cssinjs';
|
|
3
3
|
import { ConfigProvider, Spin as AntSpin } from 'antd';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
/**
|
|
6
|
+
* Spin component is used to indicate loading states in the application. It can be used with or without wrapping content.
|
|
7
|
+
*
|
|
8
|
+
* - The `spinning` property controls the visibility of the spin animation.
|
|
9
|
+
* - The `size` property allows customization of the spinner size (`small`, `default`, or `large`).
|
|
10
|
+
* - A custom loading indicator can be provided using the `indicator` property.
|
|
11
|
+
* - When used with children, the `tip` property can display descriptive content to provide additional context about the loading state.
|
|
12
|
+
* - The `fullscreen` property enables a backdrop behind the spinner, making it suitable for blocking the entire screen during loading.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
5
15
|
export const Spin = (props) => {
|
|
6
16
|
const { getPrefixCls, theme } = React.useContext(ConfigProvider.ConfigContext);
|
|
7
17
|
const { token, hashId } = useToken();
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -7,41 +7,61 @@ export type SpinSize = (typeof SpinSizes)[number];
|
|
|
7
7
|
export type SpinIndicator = React.ReactElement<HTMLElement>;
|
|
8
8
|
|
|
9
9
|
export interface AntSpinProps {
|
|
10
|
+
/**
|
|
11
|
+
* The prefixCls of the component
|
|
12
|
+
*/
|
|
10
13
|
prefixCls?: string;
|
|
14
|
+
|
|
11
15
|
/**
|
|
12
16
|
* The additional css class
|
|
13
17
|
*/
|
|
14
18
|
className?: string;
|
|
19
|
+
|
|
15
20
|
/**
|
|
16
21
|
* ClassName on the root element
|
|
17
22
|
*/
|
|
18
23
|
rootClassName?: string;
|
|
24
|
+
|
|
19
25
|
/**
|
|
20
26
|
* Whether Spin is visible
|
|
21
27
|
*/
|
|
22
28
|
spinning?: boolean;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Inline styles for the spin component.
|
|
32
|
+
*/
|
|
23
33
|
style?: React.CSSProperties;
|
|
34
|
+
|
|
24
35
|
/**
|
|
25
36
|
* The size of Spin
|
|
26
37
|
*/
|
|
27
38
|
size?: SpinSize;
|
|
39
|
+
|
|
28
40
|
/**
|
|
29
41
|
* Customize description content when Spin has children
|
|
30
42
|
*/
|
|
31
43
|
tip?: React.ReactNode;
|
|
44
|
+
|
|
32
45
|
/**
|
|
33
46
|
* Specifies a delay in milliseconds for loading state (prevent flush)
|
|
34
47
|
*/
|
|
35
48
|
delay?: number;
|
|
49
|
+
|
|
36
50
|
/**
|
|
37
51
|
* The className of wrapper when Spin has children
|
|
38
52
|
*/
|
|
39
53
|
wrapperClassName?: string;
|
|
54
|
+
|
|
40
55
|
/**
|
|
41
56
|
* React node of the spinning indicator
|
|
42
57
|
*/
|
|
43
58
|
indicator?: SpinIndicator;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The children of the spin.
|
|
62
|
+
*/
|
|
44
63
|
children?: React.ReactNode;
|
|
64
|
+
|
|
45
65
|
/**
|
|
46
66
|
* Display a backdrop with the Spin component
|
|
47
67
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/ui-spin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"antd": "5.
|
|
13
|
-
"@akinon/ui-theme": "0.
|
|
12
|
+
"antd": "5.22.6",
|
|
13
|
+
"@akinon/ui-theme": "1.0.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
|
-
"typescript": "
|
|
20
|
-
"@akinon/typescript-config": "0.
|
|
19
|
+
"typescript": "*",
|
|
20
|
+
"@akinon/typescript-config": "1.0.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": ">=18",
|