fat-design 0.0.1-beta.20251010070112 → 0.0.1-beta.20251012082100
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/index.browser.js +24 -24
- package/index.js +3296 -3142
- package/index.umd.cjs +23 -23
- package/index.umd.js +23 -23
- package/package.json +2 -2
- package/types/0buildTypes/hooks/index.d.ts +9 -0
- package/types/0buildTypes/hooks/useComparedState.d.ts +2 -0
- package/types/0buildTypes/libs.d.ts +1 -1
- package/types/balloon-confirm/index.d.ts +53 -12
- package/types/box/index.d.ts +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fat-design",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.20251012082100",
|
|
4
4
|
"scripts": {},
|
|
5
5
|
"main": "index.umd.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"registry": "https://registry.npmjs.org"
|
|
18
18
|
},
|
|
19
|
-
"buildTime": "
|
|
19
|
+
"buildTime": "Sun, 12 Oct 2025 00:21:00 GMT"
|
|
20
20
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { useCreatePreciseStore, useGetPreciseStore, usePreciseValue, usePreciseTick, PreciseStore } from './usePreciseStore';
|
|
2
2
|
import { useCurrentState, useCurrentState2 } from './useCurrentState';
|
|
3
3
|
import { useOnKeyPressCtrl, useOnKeyPressSave } from "./useOnKeyPressSave";
|
|
4
|
+
import { usePersistFn } from "./usePersistFn";
|
|
5
|
+
import { useSize } from "./useSize";
|
|
6
|
+
import { useValueOnChange } from "./useValueOnChange";
|
|
7
|
+
import { useComparedState } from "./useComparedState";
|
|
4
8
|
declare const _default: {
|
|
5
9
|
PreciseStore: typeof PreciseStore;
|
|
6
10
|
useCreatePreciseStore: typeof useCreatePreciseStore;
|
|
@@ -12,5 +16,10 @@ declare const _default: {
|
|
|
12
16
|
useCurrentState2: typeof useCurrentState2;
|
|
13
17
|
useOnKeyPressCtrl: typeof useOnKeyPressCtrl;
|
|
14
18
|
useOnKeyPressSave: typeof useOnKeyPressSave;
|
|
19
|
+
usePersistFn: typeof usePersistFn;
|
|
20
|
+
useMemoizedFn: typeof usePersistFn;
|
|
21
|
+
useSize: typeof useSize;
|
|
22
|
+
useValueOnChange: typeof useValueOnChange;
|
|
23
|
+
useComparedState: typeof useComparedState;
|
|
15
24
|
};
|
|
16
25
|
export default _default;
|
|
@@ -4,6 +4,7 @@ export { default as Avatar } from './avatar';
|
|
|
4
4
|
export { default as Badge } from './badge';
|
|
5
5
|
export { default as Balloon } from './balloon';
|
|
6
6
|
export { default as BalloonConfirm } from './balloon-confirm';
|
|
7
|
+
export { PopConfirm } from './balloon-confirm';
|
|
7
8
|
export { default as BatchInput } from './batch-input';
|
|
8
9
|
export { default as Breadcrumb } from './breadcrumb';
|
|
9
10
|
export { default as Box } from './box';
|
|
@@ -39,7 +40,6 @@ export { default as NumberPicker } from './number-picker';
|
|
|
39
40
|
export { default as Overlay } from './overlay';
|
|
40
41
|
export { default as PageCard } from './pages/page-card';
|
|
41
42
|
export { default as Pagination } from './pagination';
|
|
42
|
-
export { PopConfirm } from './balloon-confirm';
|
|
43
43
|
export { default as Progress } from './progress';
|
|
44
44
|
export { default as QueryForm } from './query-form';
|
|
45
45
|
export { default as Radio } from './radio';
|
|
@@ -7,20 +7,54 @@ export interface BalloonConfirmProps extends BalloonProps {
|
|
|
7
7
|
prefix?: string;
|
|
8
8
|
locale?: any;
|
|
9
9
|
className?: string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 是否在 onOk 成功时自动显示成功消息
|
|
13
|
+
*/
|
|
10
14
|
autoOnOkMessage?: boolean;
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
|
|
13
16
|
messageProps?: any;
|
|
14
17
|
|
|
15
18
|
/**
|
|
16
|
-
*
|
|
19
|
+
* 底部内容,设置为 false 则不进行显示
|
|
20
|
+
* @default [<Button type="primary">确定</Button>, <Button>取消</Button>]
|
|
21
|
+
*/
|
|
22
|
+
footer?: React.ReactNode | boolean;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 底部按钮的对齐方式
|
|
26
|
+
*/
|
|
27
|
+
footerAlign?: 'left' | 'center' | 'right';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 指定确定按钮和取消按钮是否存在以及如何排列
|
|
31
|
+
* @example ['ok', 'cancel'] | ['cancel', 'ok'] | ['ok'] | ['cancel']
|
|
32
|
+
*/
|
|
33
|
+
footerActions?: Array<'ok' | 'cancel'>;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 确认按钮文案
|
|
37
|
+
*/
|
|
38
|
+
okText?: React.ReactNode;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 取消按钮文案
|
|
17
42
|
*/
|
|
18
|
-
|
|
43
|
+
cancelText?: React.ReactNode;
|
|
19
44
|
|
|
20
45
|
/**
|
|
21
|
-
*
|
|
46
|
+
* 在点击确定按钮时触发的回调函数,支持返回 Promise
|
|
47
|
+
* @param event 点击事件对象
|
|
48
|
+
* @returns 可以返回 void、Promise、false(阻止关闭)或其他值
|
|
22
49
|
*/
|
|
23
|
-
|
|
50
|
+
onOk?: (event: React.MouseEvent) => void | Promise<any> | boolean | any;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* 在点击取消按钮时触发的回调函数,支持返回 Promise
|
|
54
|
+
* @param event 点击事件对象
|
|
55
|
+
* @returns 可以返回 void、Promise、false(阻止关闭)或其他值
|
|
56
|
+
*/
|
|
57
|
+
onCancel?: (event: React.MouseEvent) => void | Promise<any> | boolean | any;
|
|
24
58
|
|
|
25
59
|
/**
|
|
26
60
|
* 应用于确定按钮的属性对象
|
|
@@ -44,18 +78,25 @@ declare namespace BalloonConfirm {
|
|
|
44
78
|
okProps: {};
|
|
45
79
|
cancelProps: {};
|
|
46
80
|
autoOnOkMessage: boolean;
|
|
47
|
-
footerAlign:
|
|
48
|
-
footerActions:
|
|
81
|
+
footerAlign: 'right';
|
|
82
|
+
footerActions: ['ok', 'cancel'];
|
|
49
83
|
onVisibleChange: () => void;
|
|
50
|
-
triggerType:
|
|
84
|
+
triggerType: 'click';
|
|
51
85
|
};
|
|
52
86
|
}
|
|
53
87
|
export default BalloonConfirm;
|
|
54
88
|
|
|
55
89
|
|
|
56
|
-
export interface PopConfirmProps extends BalloonConfirmProps {
|
|
57
|
-
|
|
58
|
-
|
|
90
|
+
export interface PopConfirmProps extends Omit<BalloonConfirmProps, 'content'> {
|
|
91
|
+
/**
|
|
92
|
+
* 确认框的标题
|
|
93
|
+
*/
|
|
94
|
+
title?: React.ReactNode;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* 确认框的内容
|
|
98
|
+
*/
|
|
99
|
+
content?: React.ReactNode;
|
|
59
100
|
}
|
|
60
101
|
|
|
61
102
|
declare function PopConfirm(props: PopConfirmProps): React.JSX.Element;
|
package/types/box/index.d.ts
CHANGED
|
@@ -13,6 +13,13 @@ export interface BoxProps extends HTMLAttributes<HTMLElement>, CommonProps {
|
|
|
13
13
|
padding?: number | Array<number>;
|
|
14
14
|
justify?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | string;
|
|
15
15
|
align?: 'flex-start' | 'center' | 'flex-end' | 'baseline' | 'stretch' | string;
|
|
16
|
+
component?: string;
|
|
17
|
+
/**
|
|
18
|
+
* 是否使用v2版本实现,v2版本使用纯CSS布局,不修改children属性
|
|
19
|
+
* v2版本解决了children外层有包装组件时spacing失效的问题
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
v2?: boolean;
|
|
16
23
|
}
|
|
17
24
|
|
|
18
25
|
export default class Box extends Component<BoxProps, any> {}
|