@autobest-ui/components 2.6.3-alpha.0 → 2.6.3-alpha.1
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/esm/index.d.ts +2 -0
- package/esm/index.js +2 -1
- package/esm/input/Input.d.ts +6 -6
- package/esm/input/TextArea.d.ts +3 -3
- package/esm/input-number/index.d.ts +1 -13
- package/lib/index.d.ts +2 -0
- package/lib/index.js +7 -0
- package/lib/input/Input.d.ts +6 -6
- package/lib/input/TextArea.d.ts +3 -3
- package/lib/input-number/index.d.ts +1 -13
- package/package.json +2 -2
package/esm/index.d.ts
CHANGED
|
@@ -56,3 +56,5 @@ export { default as LoadingContainer } from './loading-container';
|
|
|
56
56
|
export { default as LoadingBar } from './loading-bar';
|
|
57
57
|
export type { LoadingIconProps } from './loading-icon';
|
|
58
58
|
export { default as LoadingIcon } from './loading-icon';
|
|
59
|
+
export type { TriggerProps, TriggerType, TriggerPlacement, ArrowStyleProps } from './trigger';
|
|
60
|
+
export { default as Trigger } from './trigger';
|
package/esm/index.js
CHANGED
|
@@ -26,4 +26,5 @@ export { default as Tabs } from './tabs';
|
|
|
26
26
|
export { default as Loading } from './loading';
|
|
27
27
|
export { default as LoadingContainer } from './loading-container';
|
|
28
28
|
export { default as LoadingBar } from './loading-bar';
|
|
29
|
-
export { default as LoadingIcon } from './loading-icon';
|
|
29
|
+
export { default as LoadingIcon } from './loading-icon';
|
|
30
|
+
export { default as Trigger } from './trigger';
|
package/esm/input/Input.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AdornProps } from './Adorn';
|
|
3
3
|
export declare type InputValue = string | File | undefined;
|
|
4
|
-
export interface InputProps extends Omit<AdornProps, 'prefixCls' | 'children' | 'onBlur' | 'onFocus'>, Pick<React.InputHTMLAttributes<any>, 'placeholder' | 'style' | 'maxLength' | 'type' | 'accept'> {
|
|
4
|
+
export interface InputProps<T = InputValue> extends Omit<AdornProps, 'prefixCls' | 'children' | 'onBlur' | 'onFocus'>, Pick<React.InputHTMLAttributes<any>, 'placeholder' | 'style' | 'maxLength' | 'type' | 'accept'> {
|
|
5
5
|
/**
|
|
6
6
|
* 输入框默认值,用于非受控组件,配合ref使用
|
|
7
7
|
*/
|
|
@@ -21,15 +21,15 @@ export interface InputProps extends Omit<AdornProps, 'prefixCls' | 'children' |
|
|
|
21
21
|
/**
|
|
22
22
|
* 值修改后的回调函数,用于修改value属性
|
|
23
23
|
*/
|
|
24
|
-
onChange?: (value:
|
|
24
|
+
onChange?: (value: T, name?: string) => void;
|
|
25
25
|
/**
|
|
26
26
|
* 获得焦点的回调函数
|
|
27
27
|
*/
|
|
28
|
-
onFocus?: (value:
|
|
28
|
+
onFocus?: (value: T, name?: string) => void;
|
|
29
29
|
/**
|
|
30
30
|
* 失去焦点的回调函数
|
|
31
31
|
*/
|
|
32
|
-
onBlur?: (value:
|
|
32
|
+
onBlur?: (value: T, name?: string) => void;
|
|
33
33
|
/**
|
|
34
34
|
* 用户触发keydown时的回调,主要用于键盘监听
|
|
35
35
|
*/
|
|
@@ -38,7 +38,7 @@ export interface InputProps extends Omit<AdornProps, 'prefixCls' | 'children' |
|
|
|
38
38
|
interface InputStates {
|
|
39
39
|
value: string | undefined;
|
|
40
40
|
}
|
|
41
|
-
interface InputPropsWithRef extends InputProps {
|
|
41
|
+
interface InputPropsWithRef extends InputProps<any> {
|
|
42
42
|
/**
|
|
43
43
|
* 此属性可以忽略, storybook问题
|
|
44
44
|
*/
|
|
@@ -66,5 +66,5 @@ export declare class InputNotRef extends React.Component<InputPropsWithRef, Inpu
|
|
|
66
66
|
onKeyDown: (ev: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
67
67
|
render(): JSX.Element;
|
|
68
68
|
}
|
|
69
|
-
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
69
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps<any> & React.RefAttributes<HTMLInputElement>>;
|
|
70
70
|
export default Input;
|
package/esm/input/TextArea.d.ts
CHANGED
|
@@ -20,15 +20,15 @@ export interface TextAreaProps extends Omit<AdornProps, 'prefixCls' | 'children'
|
|
|
20
20
|
/**
|
|
21
21
|
* 值修改后的回调函数,用于修改value属性
|
|
22
22
|
*/
|
|
23
|
-
onChange?: (value: string
|
|
23
|
+
onChange?: (value: string, name?: string) => void;
|
|
24
24
|
/**
|
|
25
25
|
* 获得焦点的回调函数
|
|
26
26
|
*/
|
|
27
|
-
onFocus?: (value: string
|
|
27
|
+
onFocus?: (value: string, name?: string) => void;
|
|
28
28
|
/**
|
|
29
29
|
* 失去焦点的回调函数
|
|
30
30
|
*/
|
|
31
|
-
onBlur?: (value: string
|
|
31
|
+
onBlur?: (value: string, name?: string) => void;
|
|
32
32
|
/**
|
|
33
33
|
* 用户触发keydown时的回调,主要用于键盘监听
|
|
34
34
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AddListenerEventHandler } from '@autobest-ui/utils';
|
|
3
3
|
import { InputProps, InputValue } from '../input/Input';
|
|
4
|
-
export interface InputNumberProps extends Omit<InputProps
|
|
4
|
+
export interface InputNumberProps extends Omit<InputProps<number>, 'value' | 'defaultValue' | 'suffix' | 'onKeyDown'> {
|
|
5
5
|
/**
|
|
6
6
|
* 输入框默认值,用于非受控组件,配合ref使用
|
|
7
7
|
*/
|
|
@@ -38,23 +38,11 @@ export interface InputNumberProps extends Omit<InputProps, 'value' | 'defaultVal
|
|
|
38
38
|
* 是否启用键盘上下快捷行为
|
|
39
39
|
*/
|
|
40
40
|
keyboard?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* 值修改后的回调函数,用于修改value属性
|
|
43
|
-
*/
|
|
44
|
-
onChange?: (parserValue: number | undefined, name?: string) => void;
|
|
45
41
|
/**
|
|
46
42
|
* 值发生改变将会触发,onChange是不合法将不在触发,只在最后onBlur时再触发一次
|
|
47
43
|
* 该方法主要用在用户输入内容判断上,不要在此方法中执行修改value的操作
|
|
48
44
|
*/
|
|
49
45
|
onContinualChange?: (originalValue: string | number | undefined, parserValue: number | undefined, name?: string) => void;
|
|
50
|
-
/**
|
|
51
|
-
* 获得焦点的回调函数
|
|
52
|
-
*/
|
|
53
|
-
onFocus?: (parserValue: number | undefined, name?: string) => void;
|
|
54
|
-
/**
|
|
55
|
-
* 失去焦点的回调函数
|
|
56
|
-
*/
|
|
57
|
-
onBlur?: (parserValue: number | undefined, name?: string) => void;
|
|
58
46
|
/**
|
|
59
47
|
* 用户触发keydown时的回调,主要用于键盘监听
|
|
60
48
|
*/
|
package/lib/index.d.ts
CHANGED
|
@@ -56,3 +56,5 @@ export { default as LoadingContainer } from './loading-container';
|
|
|
56
56
|
export { default as LoadingBar } from './loading-bar';
|
|
57
57
|
export type { LoadingIconProps } from './loading-icon';
|
|
58
58
|
export { default as LoadingIcon } from './loading-icon';
|
|
59
|
+
export type { TriggerProps, TriggerType, TriggerPlacement, ArrowStyleProps } from './trigger';
|
|
60
|
+
export { default as Trigger } from './trigger';
|
package/lib/index.js
CHANGED
|
@@ -185,6 +185,12 @@ Object.defineProperty(exports, "Tooltip", {
|
|
|
185
185
|
return _tooltip.default;
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
|
+
Object.defineProperty(exports, "Trigger", {
|
|
189
|
+
enumerable: true,
|
|
190
|
+
get: function get() {
|
|
191
|
+
return _trigger.default;
|
|
192
|
+
}
|
|
193
|
+
});
|
|
188
194
|
Object.defineProperty(exports, "message", {
|
|
189
195
|
enumerable: true,
|
|
190
196
|
get: function get() {
|
|
@@ -220,5 +226,6 @@ var _loading = _interopRequireDefault(require("./loading"));
|
|
|
220
226
|
var _loadingContainer = _interopRequireDefault(require("./loading-container"));
|
|
221
227
|
var _loadingBar = _interopRequireDefault(require("./loading-bar"));
|
|
222
228
|
var _loadingIcon = _interopRequireDefault(require("./loading-icon"));
|
|
229
|
+
var _trigger = _interopRequireDefault(require("./trigger"));
|
|
223
230
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
224
231
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
package/lib/input/Input.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AdornProps } from './Adorn';
|
|
3
3
|
export declare type InputValue = string | File | undefined;
|
|
4
|
-
export interface InputProps extends Omit<AdornProps, 'prefixCls' | 'children' | 'onBlur' | 'onFocus'>, Pick<React.InputHTMLAttributes<any>, 'placeholder' | 'style' | 'maxLength' | 'type' | 'accept'> {
|
|
4
|
+
export interface InputProps<T = InputValue> extends Omit<AdornProps, 'prefixCls' | 'children' | 'onBlur' | 'onFocus'>, Pick<React.InputHTMLAttributes<any>, 'placeholder' | 'style' | 'maxLength' | 'type' | 'accept'> {
|
|
5
5
|
/**
|
|
6
6
|
* 输入框默认值,用于非受控组件,配合ref使用
|
|
7
7
|
*/
|
|
@@ -21,15 +21,15 @@ export interface InputProps extends Omit<AdornProps, 'prefixCls' | 'children' |
|
|
|
21
21
|
/**
|
|
22
22
|
* 值修改后的回调函数,用于修改value属性
|
|
23
23
|
*/
|
|
24
|
-
onChange?: (value:
|
|
24
|
+
onChange?: (value: T, name?: string) => void;
|
|
25
25
|
/**
|
|
26
26
|
* 获得焦点的回调函数
|
|
27
27
|
*/
|
|
28
|
-
onFocus?: (value:
|
|
28
|
+
onFocus?: (value: T, name?: string) => void;
|
|
29
29
|
/**
|
|
30
30
|
* 失去焦点的回调函数
|
|
31
31
|
*/
|
|
32
|
-
onBlur?: (value:
|
|
32
|
+
onBlur?: (value: T, name?: string) => void;
|
|
33
33
|
/**
|
|
34
34
|
* 用户触发keydown时的回调,主要用于键盘监听
|
|
35
35
|
*/
|
|
@@ -38,7 +38,7 @@ export interface InputProps extends Omit<AdornProps, 'prefixCls' | 'children' |
|
|
|
38
38
|
interface InputStates {
|
|
39
39
|
value: string | undefined;
|
|
40
40
|
}
|
|
41
|
-
interface InputPropsWithRef extends InputProps {
|
|
41
|
+
interface InputPropsWithRef extends InputProps<any> {
|
|
42
42
|
/**
|
|
43
43
|
* 此属性可以忽略, storybook问题
|
|
44
44
|
*/
|
|
@@ -66,5 +66,5 @@ export declare class InputNotRef extends React.Component<InputPropsWithRef, Inpu
|
|
|
66
66
|
onKeyDown: (ev: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
67
67
|
render(): JSX.Element;
|
|
68
68
|
}
|
|
69
|
-
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
69
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps<any> & React.RefAttributes<HTMLInputElement>>;
|
|
70
70
|
export default Input;
|
package/lib/input/TextArea.d.ts
CHANGED
|
@@ -20,15 +20,15 @@ export interface TextAreaProps extends Omit<AdornProps, 'prefixCls' | 'children'
|
|
|
20
20
|
/**
|
|
21
21
|
* 值修改后的回调函数,用于修改value属性
|
|
22
22
|
*/
|
|
23
|
-
onChange?: (value: string
|
|
23
|
+
onChange?: (value: string, name?: string) => void;
|
|
24
24
|
/**
|
|
25
25
|
* 获得焦点的回调函数
|
|
26
26
|
*/
|
|
27
|
-
onFocus?: (value: string
|
|
27
|
+
onFocus?: (value: string, name?: string) => void;
|
|
28
28
|
/**
|
|
29
29
|
* 失去焦点的回调函数
|
|
30
30
|
*/
|
|
31
|
-
onBlur?: (value: string
|
|
31
|
+
onBlur?: (value: string, name?: string) => void;
|
|
32
32
|
/**
|
|
33
33
|
* 用户触发keydown时的回调,主要用于键盘监听
|
|
34
34
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AddListenerEventHandler } from '@autobest-ui/utils';
|
|
3
3
|
import { InputProps, InputValue } from '../input/Input';
|
|
4
|
-
export interface InputNumberProps extends Omit<InputProps
|
|
4
|
+
export interface InputNumberProps extends Omit<InputProps<number>, 'value' | 'defaultValue' | 'suffix' | 'onKeyDown'> {
|
|
5
5
|
/**
|
|
6
6
|
* 输入框默认值,用于非受控组件,配合ref使用
|
|
7
7
|
*/
|
|
@@ -38,23 +38,11 @@ export interface InputNumberProps extends Omit<InputProps, 'value' | 'defaultVal
|
|
|
38
38
|
* 是否启用键盘上下快捷行为
|
|
39
39
|
*/
|
|
40
40
|
keyboard?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* 值修改后的回调函数,用于修改value属性
|
|
43
|
-
*/
|
|
44
|
-
onChange?: (parserValue: number | undefined, name?: string) => void;
|
|
45
41
|
/**
|
|
46
42
|
* 值发生改变将会触发,onChange是不合法将不在触发,只在最后onBlur时再触发一次
|
|
47
43
|
* 该方法主要用在用户输入内容判断上,不要在此方法中执行修改value的操作
|
|
48
44
|
*/
|
|
49
45
|
onContinualChange?: (originalValue: string | number | undefined, parserValue: number | undefined, name?: string) => void;
|
|
50
|
-
/**
|
|
51
|
-
* 获得焦点的回调函数
|
|
52
|
-
*/
|
|
53
|
-
onFocus?: (parserValue: number | undefined, name?: string) => void;
|
|
54
|
-
/**
|
|
55
|
-
* 失去焦点的回调函数
|
|
56
|
-
*/
|
|
57
|
-
onBlur?: (parserValue: number | undefined, name?: string) => void;
|
|
58
46
|
/**
|
|
59
47
|
* 用户触发keydown时的回调,主要用于键盘监听
|
|
60
48
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autobest-ui/components",
|
|
3
|
-
"version": "2.6.3-alpha.
|
|
3
|
+
"version": "2.6.3-alpha.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "components common ui for React",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@autobest-ui/utils": "^2.1.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "dd95141b71281f690784d4e990cb689fd970d88b"
|
|
56
56
|
}
|