@sheinx/hooks 3.0.0-alpha.7 → 3.0.0-alpha.9
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/cjs/common/use-fork-ref/setRef.d.ts +0 -1
- package/cjs/common/use-fork-ref/setRef.d.ts.map +1 -1
- package/cjs/common/use-fork-ref/setRef.js +0 -1
- package/cjs/components/use-button/use-button.type.d.ts +55 -0
- package/cjs/components/use-button/use-button.type.d.ts.map +1 -1
- package/cjs/components/use-cascader/use-cascader.d.ts +1 -1
- package/cjs/components/use-check/use-check.type.d.ts +25 -0
- package/cjs/components/use-check/use-check.type.d.ts.map +1 -1
- package/cjs/components/use-collapse/use-collapse-item.type.d.ts +17 -0
- package/cjs/components/use-collapse/use-collapse-item.type.d.ts.map +1 -1
- package/cjs/components/use-collapse/use-collapse.type.d.ts +13 -0
- package/cjs/components/use-collapse/use-collapse.type.d.ts.map +1 -1
- package/cjs/components/use-datepicker/use-time.js +1 -1
- package/cjs/components/use-descriptions/use-descriptions.type.d.ts +41 -0
- package/cjs/components/use-descriptions/use-descriptions.type.d.ts.map +1 -1
- package/cjs/components/use-image/use-image.type.d.ts +76 -0
- package/cjs/components/use-image/use-image.type.d.ts.map +1 -1
- package/cjs/components/use-input/use-input-format.type.d.ts +25 -5
- package/cjs/components/use-input/use-input-format.type.d.ts.map +1 -1
- package/cjs/components/use-input/use-input-number.type.d.ts +17 -0
- package/cjs/components/use-input/use-input-number.type.d.ts.map +1 -1
- package/cjs/components/use-input/use-input-password.type.d.ts +21 -0
- package/cjs/components/use-input/use-input-password.type.d.ts.map +1 -1
- package/cjs/components/use-input/use-input.js +1 -1
- package/cjs/components/use-input/use-input.type.d.ts +43 -0
- package/cjs/components/use-input/use-input.type.d.ts.map +1 -1
- package/cjs/components/use-select/use-select.type.d.ts +36 -0
- package/cjs/components/use-select/use-select.type.d.ts.map +1 -1
- package/cjs/components/use-table/use-table-virtual.d.ts.map +1 -1
- package/cjs/components/use-table/use-table-virtual.js +3 -2
- package/cjs/components/use-tabs/context.type.d.ts +25 -0
- package/cjs/components/use-tabs/context.type.d.ts.map +1 -1
- package/cjs/components/use-tabs/use-tabs.type.d.ts +8 -0
- package/cjs/components/use-tabs/use-tabs.type.d.ts.map +1 -1
- package/cjs/components/use-textarea/use-textarea.type.d.ts +29 -0
- package/cjs/components/use-textarea/use-textarea.type.d.ts.map +1 -1
- package/cjs/components/use-transfer/use-transfer.type.d.ts +53 -0
- package/cjs/components/use-transfer/use-transfer.type.d.ts.map +1 -1
- package/cjs/components/use-tree/index.d.ts +0 -1
- package/cjs/components/use-tree/index.d.ts.map +1 -1
- package/cjs/components/use-tree/index.js +1 -8
- package/cjs/components/use-tree/use-tree.d.ts +13 -13
- package/cjs/components/use-tree/use-tree.d.ts.map +1 -1
- package/cjs/components/use-tree/use-tree.type.d.ts +74 -13
- package/cjs/components/use-tree/use-tree.type.d.ts.map +1 -1
- package/cjs/components/use-treeselect/use-treeselect.d.ts +1 -1
- package/cjs/components/use-treeselect/use-treeselect.d.ts.map +1 -1
- package/cjs/components/use-treeselect/use-treeselect.type.d.ts +1 -1
- package/cjs/components/use-treeselect/use-treeselect.type.d.ts.map +1 -1
- package/esm/common/use-fork-ref/setRef.d.ts +0 -1
- package/esm/common/use-fork-ref/setRef.d.ts.map +1 -1
- package/esm/common/use-fork-ref/setRef.js +0 -1
- package/esm/components/use-button/use-button.type.d.ts +55 -0
- package/esm/components/use-button/use-button.type.d.ts.map +1 -1
- package/esm/components/use-cascader/use-cascader.d.ts +1 -1
- package/esm/components/use-check/use-check.type.d.ts +25 -0
- package/esm/components/use-check/use-check.type.d.ts.map +1 -1
- package/esm/components/use-collapse/use-collapse-item.type.d.ts +17 -0
- package/esm/components/use-collapse/use-collapse-item.type.d.ts.map +1 -1
- package/esm/components/use-collapse/use-collapse.type.d.ts +13 -0
- package/esm/components/use-collapse/use-collapse.type.d.ts.map +1 -1
- package/esm/components/use-datepicker/use-time.js +1 -1
- package/esm/components/use-descriptions/use-descriptions.type.d.ts +41 -0
- package/esm/components/use-descriptions/use-descriptions.type.d.ts.map +1 -1
- package/esm/components/use-image/use-image.type.d.ts +76 -0
- package/esm/components/use-image/use-image.type.d.ts.map +1 -1
- package/esm/components/use-input/use-input-format.type.d.ts +25 -5
- package/esm/components/use-input/use-input-format.type.d.ts.map +1 -1
- package/esm/components/use-input/use-input-number.type.d.ts +17 -0
- package/esm/components/use-input/use-input-number.type.d.ts.map +1 -1
- package/esm/components/use-input/use-input-password.type.d.ts +21 -0
- package/esm/components/use-input/use-input-password.type.d.ts.map +1 -1
- package/esm/components/use-input/use-input.js +1 -1
- package/esm/components/use-input/use-input.type.d.ts +43 -0
- package/esm/components/use-input/use-input.type.d.ts.map +1 -1
- package/esm/components/use-select/use-select.type.d.ts +36 -0
- package/esm/components/use-select/use-select.type.d.ts.map +1 -1
- package/esm/components/use-table/use-table-virtual.d.ts.map +1 -1
- package/esm/components/use-table/use-table-virtual.js +3 -2
- package/esm/components/use-tabs/context.type.d.ts +25 -0
- package/esm/components/use-tabs/context.type.d.ts.map +1 -1
- package/esm/components/use-tabs/use-tabs.type.d.ts +8 -0
- package/esm/components/use-tabs/use-tabs.type.d.ts.map +1 -1
- package/esm/components/use-textarea/use-textarea.type.d.ts +29 -0
- package/esm/components/use-textarea/use-textarea.type.d.ts.map +1 -1
- package/esm/components/use-transfer/use-transfer.type.d.ts +53 -0
- package/esm/components/use-transfer/use-transfer.type.d.ts.map +1 -1
- package/esm/components/use-tree/index.d.ts +0 -1
- package/esm/components/use-tree/index.d.ts.map +1 -1
- package/esm/components/use-tree/index.js +1 -8
- package/esm/components/use-tree/use-tree.d.ts +13 -13
- package/esm/components/use-tree/use-tree.d.ts.map +1 -1
- package/esm/components/use-tree/use-tree.type.d.ts +74 -13
- package/esm/components/use-tree/use-tree.type.d.ts.map +1 -1
- package/esm/components/use-treeselect/use-treeselect.d.ts +1 -1
- package/esm/components/use-treeselect/use-treeselect.d.ts.map +1 -1
- package/esm/components/use-treeselect/use-treeselect.type.d.ts +1 -1
- package/esm/components/use-treeselect/use-treeselect.type.d.ts.map +1 -1
- package/package.json +1 -1
- package/cjs/components/use-tree/use-placement.d.ts +0 -6
- package/cjs/components/use-tree/use-placement.d.ts.map +0 -1
- package/cjs/components/use-tree/use-placement.js +0 -25
- package/cjs/components/use-tree/use-placement.type.d.ts +0 -4
- package/cjs/components/use-tree/use-placement.type.d.ts.map +0 -1
- package/cjs/components/use-tree/use-placement.type.js +0 -5
- package/esm/components/use-tree/use-placement.d.ts +0 -6
- package/esm/components/use-tree/use-placement.d.ts.map +0 -1
- package/esm/components/use-tree/use-placement.js +0 -25
- package/esm/components/use-tree/use-placement.type.d.ts +0 -4
- package/esm/components/use-tree/use-placement.type.d.ts.map +0 -1
- package/esm/components/use-tree/use-placement.type.js +0 -5
@@ -3,7 +3,17 @@ export declare type ButtonShape = 'circle' | 'round' | 'square';
|
|
3
3
|
export declare type ButtonMode = 'text' | 'outline' | 'dashed';
|
4
4
|
export declare type ButtonType = 'default' | 'primary' | 'secondary' | 'danger' | 'warning' | 'success' | 'link';
|
5
5
|
export interface BaseButtonProps {
|
6
|
+
/**
|
7
|
+
* @en Specifies the button should be disabled
|
8
|
+
* @cn 禁用
|
9
|
+
* @default false
|
10
|
+
*/
|
6
11
|
disabled?: boolean;
|
12
|
+
/**
|
13
|
+
* @en Loading
|
14
|
+
* @cn loading 状态
|
15
|
+
* @default false
|
16
|
+
*/
|
7
17
|
loading?: boolean;
|
8
18
|
/**
|
9
19
|
* 按钮风格模式
|
@@ -12,6 +22,10 @@ export interface BaseButtonProps {
|
|
12
22
|
* - dash 虚框按钮
|
13
23
|
* - outline 线框按钮
|
14
24
|
*/
|
25
|
+
/**
|
26
|
+
* @en The mode of the button
|
27
|
+
* @cn 按钮风格
|
28
|
+
*/
|
15
29
|
mode?: ButtonMode;
|
16
30
|
/**
|
17
31
|
* @deprecated 文本按钮,即将废弃,请使用 mode="text"
|
@@ -21,15 +35,56 @@ export interface BaseButtonProps {
|
|
21
35
|
* @deprecated 线框按钮,即将废弃,请使用 mode="outline"
|
22
36
|
*/
|
23
37
|
outline?: boolean;
|
38
|
+
/**
|
39
|
+
* @en The type of the button
|
40
|
+
* @cn 按钮类型
|
41
|
+
* @default 'default'
|
42
|
+
*/
|
24
43
|
type?: ButtonType;
|
44
|
+
/**
|
45
|
+
* @en The size of the button
|
46
|
+
* @cn 按钮尺寸
|
47
|
+
* @default 'default'
|
48
|
+
*/
|
25
49
|
size?: 'small' | 'large' | 'default';
|
50
|
+
/**
|
51
|
+
* @en For Button with only 2 Chinese characters, whether to insert a space between the two Chinese characters
|
52
|
+
* @cn 仅有2个汉字的按钮,是否在2个汉字中间插入空格
|
53
|
+
* @default false
|
54
|
+
*/
|
26
55
|
space?: boolean;
|
56
|
+
/**
|
57
|
+
* @en If the href attribute is set, <a> will be used instead of <button>
|
58
|
+
* @cn 如果设置了 href 属性,将会用 <a> 代替 <button>
|
59
|
+
*/
|
27
60
|
href?: string;
|
61
|
+
/**
|
62
|
+
* @cn 当设置了 href 属性时,target 会被设置到 <a> 元素上
|
63
|
+
* @en If present, target will be set onto <a> element.(Effective only when href is been set)
|
64
|
+
*/
|
28
65
|
target?: string;
|
66
|
+
/**
|
67
|
+
* @en Can be set button shape
|
68
|
+
* @cn 设置按钮形状
|
69
|
+
* @default 'default'
|
70
|
+
*/
|
29
71
|
shape?: ButtonShape;
|
72
|
+
/**
|
73
|
+
* @en Type of button original
|
74
|
+
* @cn 按钮原生type属性
|
75
|
+
* @default 'button'
|
76
|
+
*/
|
30
77
|
htmlType?: 'button' | 'submit' | 'reset';
|
31
78
|
buttonRef?: React.Ref<HTMLButtonElement>;
|
79
|
+
/**
|
80
|
+
* @en Button click callback
|
81
|
+
* @cn 按钮点击回调
|
82
|
+
*/
|
32
83
|
onClick?: React.MouseEventHandler;
|
84
|
+
/**
|
85
|
+
* @en Get button dom
|
86
|
+
* @cn 获取按钮节点
|
87
|
+
*/
|
33
88
|
onRef?: React.Ref<HTMLButtonElement | HTMLAnchorElement>;
|
34
89
|
}
|
35
90
|
//# sourceMappingURL=use-button.type.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-button.type.d.ts","sourceRoot":"","sources":["use-button.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,oBAAY,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AACxD,oBAAY,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AACvD,oBAAY,UAAU,GAClB,SAAS,GACT,SAAS,GACT,WAAW,GACX,QAAQ,GACR,SAAS,GACT,SAAS,GACT,MAAM,CAAC;AAEX,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"use-button.type.d.ts","sourceRoot":"","sources":["use-button.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,oBAAY,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AACxD,oBAAY,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AACvD,oBAAY,UAAU,GAClB,SAAS,GACT,SAAS,GACT,WAAW,GACX,QAAQ,GACR,SAAS,GACT,SAAS,GACT,MAAM,CAAC;AAEX,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;OAMG;IACH;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IACrC;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACzC,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACzC;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;CAC1D"}
|
@@ -6,7 +6,7 @@ declare const useCascader: <DataItem, Value extends KeygenResult[]>(props: BaseC
|
|
6
6
|
set: (id: KeygenResult, checked: import("../use-tree/use-tree.type").CheckedStatusType, direction?: "desc" | "asc" | undefined) => import("../use-tree/use-tree.type").CheckedStatusType | null;
|
7
7
|
childrenKey: keyof DataItem & string;
|
8
8
|
data: DataItem[];
|
9
|
-
getPath: (id: KeygenResult) => import("../use-tree").TreePathType
|
9
|
+
getPath: (id: KeygenResult) => import("../use-tree").TreePathType | undefined;
|
10
10
|
getValue: () => KeygenResult[];
|
11
11
|
getChecked: (id: KeygenResult) => boolean | "indeterminate";
|
12
12
|
getKey: (item: DataItem, id?: KeygenResult, index?: number | undefined) => KeygenResult;
|
@@ -1,10 +1,35 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
export interface BaseCheckProps {
|
3
|
+
/**
|
4
|
+
* @en Checked status,will in control when pass
|
5
|
+
* @cn 当前选中状态,checked 传入时为受控组件
|
6
|
+
*/
|
3
7
|
checked?: boolean;
|
8
|
+
/**
|
9
|
+
* @en Default checked status
|
10
|
+
* @cn 默认选中状态
|
11
|
+
*/
|
4
12
|
defaultChecked?: boolean;
|
13
|
+
/**
|
14
|
+
* @en Change callback, Checked means selected status
|
15
|
+
* @cn 改变回调,Checked 表示选中状态
|
16
|
+
*/
|
5
17
|
onChange?: (checked: boolean, event: React.ChangeEvent) => void;
|
18
|
+
/**
|
19
|
+
* @en Click callback
|
20
|
+
* @cn 勾选框点击回调
|
21
|
+
*/
|
6
22
|
onClick?: (e: React.MouseEvent<HTMLInputElement>) => void;
|
23
|
+
/**
|
24
|
+
* @en Disable checkbox
|
25
|
+
* @cn 是否禁用
|
26
|
+
* @default false
|
27
|
+
*/
|
7
28
|
disabled?: boolean;
|
29
|
+
/**
|
30
|
+
* @en Get input dom
|
31
|
+
* @cn 获取input dom
|
32
|
+
*/
|
8
33
|
inputRef?: React.Ref<HTMLInputElement>;
|
9
34
|
}
|
10
35
|
//# sourceMappingURL=use-check.type.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-check.type.d.ts","sourceRoot":"","sources":["use-check.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,WAAW,KAAK,IAAI,CAAC;IAChE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACxC"}
|
1
|
+
{"version":3,"file":"use-check.type.d.ts","sourceRoot":"","sources":["use-check.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,WAAW,KAAK,IAAI,CAAC;IAChE;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC1D;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACxC"}
|
@@ -1,11 +1,28 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
export interface BaseCollapseItemContext {
|
3
|
+
/**
|
4
|
+
* @en The currently expanded panel, controlled
|
5
|
+
* @cn 当前展开的面板,受控
|
6
|
+
*/
|
3
7
|
active: string | string[];
|
8
|
+
/**
|
9
|
+
* @en The region that triggers the collapse
|
10
|
+
* @cn 触发展开折叠的区域
|
11
|
+
*/
|
4
12
|
triggerRegion?: 'icon' | 'header' | 'disabled';
|
5
13
|
onChange: (newActive: string, event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
6
14
|
}
|
7
15
|
export interface BaseCollapseItemProps {
|
16
|
+
/**
|
17
|
+
* @en The key of the panel
|
18
|
+
* @cn 面板的key,唯一标识
|
19
|
+
*/
|
8
20
|
keygen: string;
|
21
|
+
/**
|
22
|
+
* @en Whether to disable
|
23
|
+
* @cn 是否禁用
|
24
|
+
* @default false
|
25
|
+
*/
|
9
26
|
disabled?: boolean;
|
10
27
|
}
|
11
28
|
export declare type BaseCollapseType = BaseCollapseItemContext & BaseCollapseItemProps;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-collapse-item.type.d.ts","sourceRoot":"","sources":["use-collapse-item.type.ts"],"names":[],"mappings":";AAAA,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC/C,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CAC5F;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,oBAAY,gBAAgB,GAAG,uBAAuB,GAAG,qBAAqB,CAAC"}
|
1
|
+
{"version":3,"file":"use-collapse-item.type.d.ts","sourceRoot":"","sources":["use-collapse-item.type.ts"],"names":[],"mappings":";AAAA,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC/C,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CAC5F;AAED,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,oBAAY,gBAAgB,GAAG,uBAAuB,GAAG,qBAAqB,CAAC"}
|
@@ -1,8 +1,21 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import type { BaseCollapseItemContext } from './use-collapse-item.type';
|
3
3
|
export interface BaseCollapseProps extends Partial<Pick<BaseCollapseItemContext, 'active'>> {
|
4
|
+
/**
|
5
|
+
* @en The default expanded panel
|
6
|
+
* @cn 默认展开的面板
|
7
|
+
*/
|
4
8
|
defaultActive?: string | string[];
|
9
|
+
/**
|
10
|
+
* @en Whether to enable accordion mode
|
11
|
+
* @cn 是否开启手风琴模式
|
12
|
+
* @default false
|
13
|
+
*/
|
5
14
|
accordion?: boolean;
|
15
|
+
/**
|
16
|
+
* @en Callback triggered when the expanded panel changes
|
17
|
+
* @cn 展开面板改变时触发回调
|
18
|
+
*/
|
6
19
|
onChange?: (active: string, actives: string[], e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
7
20
|
}
|
8
21
|
//# sourceMappingURL=use-collapse.type.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-collapse.type.d.ts","sourceRoot":"","sources":["use-collapse.type.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxE,MAAM,WAAW,iBAAkB,SAAQ,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,QAAQ,CAAC,CAAC;IACzF,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,CACT,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EAAE,EACjB,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,KAC5C,IAAI,CAAC;CACX"}
|
1
|
+
{"version":3,"file":"use-collapse.type.d.ts","sourceRoot":"","sources":["use-collapse.type.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxE,MAAM,WAAW,iBAAkB,SAAQ,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,QAAQ,CAAC,CAAC;IACzF;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAClC;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CACT,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EAAE,EACjB,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,KAC5C,IAAI,CAAC;CACX"}
|
@@ -106,7 +106,7 @@ var useTime = function useTime(props) {
|
|
106
106
|
var date = getTargetDate(mode, index);
|
107
107
|
var str = index < 10 ? "0".concat(index) : "".concat(index);
|
108
108
|
if (mode === 'h' && str === '00') str = '12';
|
109
|
-
if (mode === 'ampm') str = index === 0 ? '
|
109
|
+
if (mode === 'ampm') str = index === 0 ? 'AM' : 'PM';
|
110
110
|
return {
|
111
111
|
str: str,
|
112
112
|
date: date,
|
@@ -1,16 +1,57 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
export interface DescriptionsItemProps {
|
3
|
+
/**
|
4
|
+
* @private 内部属性
|
5
|
+
*/
|
3
6
|
key?: React.Key;
|
7
|
+
/**
|
8
|
+
* @en Data label
|
9
|
+
* @cn 数据标签
|
10
|
+
*/
|
4
11
|
label?: React.ReactNode;
|
12
|
+
/**
|
13
|
+
* @en Data value
|
14
|
+
* @cn 数据值
|
15
|
+
*/
|
5
16
|
value?: React.ReactNode;
|
17
|
+
/**
|
18
|
+
* @en The number of columns occupied
|
19
|
+
* @cn 占据的列数
|
20
|
+
*/
|
6
21
|
span?: number;
|
22
|
+
/**
|
23
|
+
* @en The style of the current data label
|
24
|
+
* @cn 当前数据标签样式
|
25
|
+
*/
|
7
26
|
itemLabelStyle?: React.CSSProperties;
|
27
|
+
/**
|
28
|
+
* @en The style of the current data value
|
29
|
+
* @cn 当前数据值样式
|
30
|
+
*/
|
8
31
|
itemValueStyle?: React.CSSProperties;
|
9
32
|
}
|
10
33
|
export interface BaseDescriptionsProps {
|
34
|
+
/**
|
35
|
+
* @en Descriptions array
|
36
|
+
* @cn 描述项数组,描述项对象结构见下
|
37
|
+
* @override ItemType[]
|
38
|
+
*/
|
11
39
|
items?: DescriptionsItemProps[];
|
40
|
+
/**
|
41
|
+
* @en Label style
|
42
|
+
* @cn 标签样式
|
43
|
+
*/
|
12
44
|
labelStyle?: React.CSSProperties;
|
45
|
+
/**
|
46
|
+
* @en Value style
|
47
|
+
* @cn 值样式
|
48
|
+
*/
|
13
49
|
valueStyle?: React.CSSProperties;
|
50
|
+
/**
|
51
|
+
* @en The number of columns placed in each row, one data is one column, it can be configured as a number or an object, when configured as an object format, responsive arrangement is supported
|
52
|
+
* @cn 每行放置的列的数量,一个数据为一列,可配置为数字或对象,当配置为对象格式时,支持响应式排列
|
53
|
+
* @default 3
|
54
|
+
*/
|
14
55
|
column?: number | {
|
15
56
|
xs?: number;
|
16
57
|
sm?: number;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-descriptions.type.d.ts","sourceRoot":"","sources":["use-descriptions.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACrC,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CACtC;AACD,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAChC,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CA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E,CAAC,EAAE,MAAM,CAAC;QACZ,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACP"}
|
@@ -18,27 +18,58 @@ export interface BaseImageProps {
|
|
18
18
|
* @default -
|
19
19
|
*
|
20
20
|
*/
|
21
|
+
/**
|
22
|
+
* @en Image fill type
|
23
|
+
* @cn 图片填充方式
|
24
|
+
*/
|
21
25
|
fit?: ImageFitType;
|
22
26
|
/**
|
23
27
|
* @title 懒加载容器
|
24
28
|
* @description 指定懒加载的容器,如: #id
|
25
29
|
* @default -
|
26
30
|
*/
|
31
|
+
/**
|
32
|
+
* @en Lazy load container
|
33
|
+
* @cn 懒加载容器
|
34
|
+
*/
|
27
35
|
container?: string | HTMLElement;
|
28
36
|
/**
|
29
37
|
* @title 自定义错误内容
|
30
38
|
* @description 当图片加载失败时,允许自定义渲染对应的的内容。
|
31
39
|
* @default -
|
32
40
|
*/
|
41
|
+
/**
|
42
|
+
* @en Custom error content
|
43
|
+
* @cn 自定义错误内容
|
44
|
+
*/
|
33
45
|
error?: React.ReactNode;
|
46
|
+
/**
|
47
|
+
* @en Original picture address
|
48
|
+
* @cn 原始图片地址
|
49
|
+
*/
|
34
50
|
href?: string;
|
51
|
+
/**
|
52
|
+
* @en Whether to delay loading, number to set lazy offset
|
53
|
+
* @cn 是否延迟加载,如果为数字则表示懒加载偏移量
|
54
|
+
* @default false
|
55
|
+
*/
|
35
56
|
lazy?: boolean | number;
|
57
|
+
/**
|
58
|
+
* @en The original property of html
|
59
|
+
* @cn 是否禁止 img 元素原生 draggable 属性
|
60
|
+
* @default false
|
61
|
+
*/
|
36
62
|
noImgDrag?: boolean;
|
37
63
|
/**
|
38
64
|
* @title 图加载时的占位内容
|
39
65
|
* @description 图片加载过程中,允许自定义渲染加载时的的内容。
|
40
66
|
* @default 'loading'
|
41
67
|
*/
|
68
|
+
/**
|
69
|
+
* @en Loading image placeholder content
|
70
|
+
* @cn 图加载时的占位内容
|
71
|
+
* @default 'loading
|
72
|
+
*/
|
42
73
|
placeholder?: React.ReactNode;
|
43
74
|
/**
|
44
75
|
* @title 图片形状
|
@@ -48,16 +79,61 @@ export interface BaseImageProps {
|
|
48
79
|
* - thumbnail: 缩略图
|
49
80
|
* @default 'rounded'
|
50
81
|
*/
|
82
|
+
/**
|
83
|
+
* @en Image shape
|
84
|
+
* @cn 图片形状
|
85
|
+
* @default 'rounded'
|
86
|
+
*/
|
51
87
|
shape?: ImageShapeType;
|
88
|
+
/**
|
89
|
+
* @en Target of image
|
90
|
+
* @cn 图片打开方式
|
91
|
+
* @default '_modal'
|
92
|
+
*/
|
52
93
|
target?: ImageTargetType;
|
94
|
+
/**
|
95
|
+
* @en The width of the image
|
96
|
+
* @cn 图片宽度
|
97
|
+
* @default '100%'
|
98
|
+
*/
|
53
99
|
width?: number | string;
|
100
|
+
/**
|
101
|
+
* @en The height of the image
|
102
|
+
* @cn 图片高度
|
103
|
+
* @default '100%'
|
104
|
+
*/
|
54
105
|
height?: number | string;
|
106
|
+
/**
|
107
|
+
* @en The picture address
|
108
|
+
* @cn 图片地址
|
109
|
+
*/
|
55
110
|
src?: string;
|
111
|
+
/**
|
112
|
+
* @en The original property of html
|
113
|
+
* @cn 原生 title 属性
|
114
|
+
*/
|
56
115
|
title?: string;
|
57
116
|
imageRef?: React.RefObject<HTMLImageElement>;
|
117
|
+
/**
|
118
|
+
* @en The callback of click
|
119
|
+
* @cn 点击图片的回调
|
120
|
+
*/
|
58
121
|
onClick?: React.MouseEventHandler;
|
122
|
+
/**
|
123
|
+
* @en Alternate address, applied when src is invalid
|
124
|
+
* @cn 备用地址,src无效时会应用
|
125
|
+
*/
|
59
126
|
alt?: string;
|
127
|
+
/**
|
128
|
+
* @en Auto transform protocol
|
129
|
+
* @cn 是否根据页面自动转换协议
|
130
|
+
* @default false
|
131
|
+
*/
|
60
132
|
autoSSL?: boolean;
|
133
|
+
/**
|
134
|
+
* @en Callback of image src or alt request fail
|
135
|
+
* @cn src或alt 地址请求出错回调
|
136
|
+
*/
|
61
137
|
onError?: (e: Event, type: number) => void;
|
62
138
|
}
|
63
139
|
//# sourceMappingURL=use-image.type.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-image.type.d.ts","sourceRoot":"","sources":["use-image.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,oBAAY,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAC;AAChE,oBAAY,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AACjE,oBAAY,eAAe,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE1E,oBAAY,MAAM,GAAG;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B;;;;;;;;;OASG;IACH,GAAG,CAAC,EAAE,YAAY,CAAC;IAEnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAEjC;;;;OAIG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;
|
1
|
+
{"version":3,"file":"use-image.type.d.ts","sourceRoot":"","sources":["use-image.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,oBAAY,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAC;AAChE,oBAAY,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AACjE,oBAAY,eAAe,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE1E,oBAAY,MAAM,GAAG;IACnB,GAA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,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C"}
|
@@ -4,28 +4,48 @@ export interface InputFormatProps {
|
|
4
4
|
value: InputValue;
|
5
5
|
onChange: (value: InputValue) => void;
|
6
6
|
/**
|
7
|
-
*
|
7
|
+
* @en Whether to remove leading and trailing spaces
|
8
|
+
* @cn 是否去除前后空格
|
8
9
|
*/
|
9
10
|
trim?: boolean;
|
11
|
+
/**
|
12
|
+
* @en Same as the type of the native input tag
|
13
|
+
* @cn 同原生 input 标签的 type
|
14
|
+
* @override string
|
15
|
+
* @default 'text'
|
16
|
+
*/
|
10
17
|
type?: React.InputHTMLAttributes<HTMLInputElement>['type'];
|
18
|
+
/**
|
19
|
+
* @en Number type supports "positive" and "non-negative", only works when type = number
|
20
|
+
* @cn 设置数字类型 支持 "positive" 和 "non-negative", 仅在 type = number 下生效
|
21
|
+
*/
|
11
22
|
numType?: 'non-negative' | 'positive';
|
23
|
+
/**
|
24
|
+
* @en Show as thousands separator, valid only when type is "number"
|
25
|
+
* @cn 以千位分隔符展示,仅当 type 为 number 时有效
|
26
|
+
* @default false
|
27
|
+
*/
|
12
28
|
coin?: boolean;
|
13
29
|
/**
|
14
|
-
*
|
30
|
+
* @en Integer limit, only works when type = number
|
31
|
+
* @cn 整数位数限制, 仅在 type = number 下生效
|
15
32
|
*/
|
16
33
|
integerLimit?: number;
|
17
34
|
/**
|
18
|
-
*
|
35
|
+
* @en Decimal limit, only works when type = number
|
36
|
+
* @cn 小数位数限制, 仅在 type = number 下生效
|
19
37
|
*/
|
20
38
|
digits?: number;
|
21
39
|
/**
|
22
|
-
*
|
40
|
+
* @en Whether to automatically complete the number of decimal places, only works when type = number
|
41
|
+
* @cn 是否自动补全小数位数, 仅在 type = number 下生效
|
23
42
|
*/
|
24
43
|
autoFix?: boolean;
|
25
44
|
onBlur?: React.FocusEventHandler;
|
26
45
|
onFocus?: React.FocusEventHandler;
|
27
46
|
/**
|
28
|
-
*
|
47
|
+
* @en Cancel blur trigger onChange, used for multi-layer nesting of formatting, only trigger onChange once at the outermost layer
|
48
|
+
* @cn 取消 blur 触发 onChange,用于多层嵌套的格式化,只在最外层触发一次onChange
|
29
49
|
*/
|
30
50
|
cancelBlurChange?: boolean;
|
31
51
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-input-format.type.d.ts","sourceRoot":"","sources":["use-input-format.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,oBAAY,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;AAC5C,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,UAAU,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC
|
1
|
+
{"version":3,"file":"use-input-format.type.d.ts","sourceRoot":"","sources":["use-input-format.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,oBAAY,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;AAC5C,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,UAAU,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;OAKG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;IAC3D;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC;IACtC;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACjC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B"}
|
@@ -3,9 +3,26 @@ export declare type NumberValue = string | number | undefined | null;
|
|
3
3
|
export interface InputNumberProps extends Omit<InputFormatProps, 'value' | 'onChange' | 'autoFix' | 'trim' | 'coin' | 'type'> {
|
4
4
|
value: NumberValue;
|
5
5
|
onChange: (value: NumberValue) => void | undefined;
|
6
|
+
/**
|
7
|
+
* @en Minimum value
|
8
|
+
* @cn 最小值
|
9
|
+
*/
|
6
10
|
min?: number;
|
11
|
+
/**
|
12
|
+
* @en Maximum value
|
13
|
+
* @cn 最大值
|
14
|
+
*/
|
7
15
|
max?: number;
|
16
|
+
/**
|
17
|
+
* @en Allow value is null
|
18
|
+
* @cn 清空后值为 null
|
19
|
+
*/
|
8
20
|
allowNull?: boolean;
|
21
|
+
/**
|
22
|
+
* @en Change the digital span. It can be decimal
|
23
|
+
* @cn 改变数字跨度,可为小数
|
24
|
+
* @default 1
|
25
|
+
*/
|
9
26
|
step?: number;
|
10
27
|
disabled?: boolean;
|
11
28
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-input-number.type.d.ts","sourceRoot":"","sources":["use-input-number.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,oBAAY,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;AAC7D,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC3F,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GAAG,SAAS,CAAC;IACnD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
1
|
+
{"version":3,"file":"use-input-number.type.d.ts","sourceRoot":"","sources":["use-input-number.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,oBAAY,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;AAC7D,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC3F,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GAAG,SAAS,CAAC;IACnD;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
@@ -2,10 +2,31 @@ export declare type PasswordValue = string | undefined;
|
|
2
2
|
export interface InputPasswordProps {
|
3
3
|
value: PasswordValue;
|
4
4
|
onChange: (value: PasswordValue) => void;
|
5
|
+
/**
|
6
|
+
* @cn 密码符号
|
7
|
+
* @en Password symbol
|
8
|
+
* @default '•'
|
9
|
+
*/
|
5
10
|
point?: string;
|
11
|
+
/**
|
12
|
+
* @cn 是否显示切换密码可见状态的按钮
|
13
|
+
* @en Whether to display the button to toggle the visibility of the password
|
14
|
+
*/
|
6
15
|
visibilityToggle?: boolean;
|
16
|
+
/**
|
17
|
+
* @cn 是否显示密码
|
18
|
+
* @en Whether to display the password
|
19
|
+
*/
|
7
20
|
visibility?: boolean;
|
21
|
+
/**
|
22
|
+
* @cn 初始状态是否显示密码
|
23
|
+
* @en Whether to display the password initially
|
24
|
+
*/
|
8
25
|
defaultVisibility?: boolean;
|
26
|
+
/**
|
27
|
+
* @cn 切换密码可见状态的按钮的图标
|
28
|
+
* @en The icon of the button to toggle the visibility of the password
|
29
|
+
*/
|
9
30
|
onVisibilityChange?: (visibility: boolean) => void;
|
10
31
|
}
|
11
32
|
//# sourceMappingURL=use-input-password.type.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-input-password.type.d.ts","sourceRoot":"","sources":["use-input-password.type.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa,GAAG,MAAM,GAAG,SAAS,CAAC;AAC/C,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"use-input-password.type.d.ts","sourceRoot":"","sources":["use-input-password.type.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa,GAAG,MAAM,GAAG,SAAS,CAAC;AAC/C,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACzC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CACpD"}
|
@@ -147,7 +147,7 @@ var useInput = function useInput(params) {
|
|
147
147
|
return {
|
148
148
|
focused: focused,
|
149
149
|
disabled: disabled,
|
150
|
-
showClear: showClearValue,
|
150
|
+
showClear: !disabled && showClearValue,
|
151
151
|
getRootProps: getRootProps,
|
152
152
|
getInputProps: getInputProps,
|
153
153
|
getClearProps: getClearProps
|
@@ -3,20 +3,63 @@ import { AddNoProps } from '../../common/type';
|
|
3
3
|
export interface InputPropsOwn {
|
4
4
|
/**
|
5
5
|
* The default value. Use when the component is not controlled.
|
6
|
+
* @en Value
|
7
|
+
* @cn 输入值
|
6
8
|
*/
|
7
9
|
value?: string;
|
10
|
+
/**
|
11
|
+
* @en Value change callback
|
12
|
+
* @cn 值改变回调
|
13
|
+
*/
|
8
14
|
onChange?: (value: string) => void;
|
15
|
+
/**
|
16
|
+
* @en The callback of blur
|
17
|
+
* @cn 失去焦点后的回调
|
18
|
+
*/
|
9
19
|
onBlur?: React.FocusEventHandler;
|
20
|
+
/**
|
21
|
+
* @en The callback when Textarea focus
|
22
|
+
* @cn 聚焦后的回调
|
23
|
+
*/
|
10
24
|
onFocus?: React.FocusEventHandler;
|
25
|
+
/**
|
26
|
+
* @en Click callback
|
27
|
+
* @cn 点击回调
|
28
|
+
*/
|
11
29
|
onClick?: React.MouseEventHandler;
|
30
|
+
/**
|
31
|
+
* @en Disable component
|
32
|
+
* @cn 禁用组件
|
33
|
+
* @default false
|
34
|
+
*/
|
12
35
|
disabled?: boolean;
|
36
|
+
/**
|
37
|
+
* @en Can click the clear icon to delete the content of the input box
|
38
|
+
* @cn 可点击清空图标删除输入框内容
|
39
|
+
* @default false
|
40
|
+
*/
|
13
41
|
clearable?: boolean;
|
14
42
|
/**
|
15
43
|
* focus后自动全选数据
|
44
|
+
* @en Automatically select all data after mouse click
|
45
|
+
* @cn 是否自动获得焦点
|
46
|
+
* @default false
|
16
47
|
*/
|
17
48
|
autoSelect?: boolean;
|
49
|
+
/**
|
50
|
+
* @en Get input dom
|
51
|
+
* @cn 获取input dom
|
52
|
+
*/
|
18
53
|
inputRef?: React.Ref<HTMLInputElement>;
|
54
|
+
/**
|
55
|
+
* @en Get root node dom
|
56
|
+
* @cn 获取root节点 dom
|
57
|
+
*/
|
19
58
|
rootRef?: React.Ref<HTMLElement>;
|
59
|
+
/**
|
60
|
+
* @en Click to clear callback
|
61
|
+
* @cn 点击清空回调
|
62
|
+
*/
|
20
63
|
onClear?: () => void;
|
21
64
|
showClear?: boolean;
|
22
65
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-input.type.d.ts","sourceRoot":"","sources":["use-input.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,WAAW,aAAa;IAC5B
|
1
|
+
{"version":3,"file":"use-input.type.d.ts","sourceRoot":"","sources":["use-input.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACjC;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;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