antd-mobile 5.7.0 → 5.7.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/2x/cjs/components/collapse/collapse.js +7 -0
- package/2x/cjs/components/result/result.d.ts +2 -2
- package/2x/cjs/components/virtual-input/virtual-input.js +25 -14
- package/2x/es/components/collapse/collapse.js +7 -0
- package/2x/es/components/result/result.d.ts +2 -2
- package/2x/es/components/virtual-input/virtual-input.js +23 -14
- package/2x/package.json +1 -1
- package/cjs/components/collapse/collapse.js +7 -0
- package/cjs/components/result/result.d.ts +2 -2
- package/cjs/components/virtual-input/virtual-input.js +25 -14
- package/es/components/collapse/collapse.js +7 -0
- package/es/components/result/result.d.ts +2 -2
- package/es/components/virtual-input/virtual-input.js +23 -14
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
|
@@ -50,6 +50,13 @@ const CollapsePanelContent = props => {
|
|
|
50
50
|
}, api] = (0, _web.useSpring)(() => ({
|
|
51
51
|
from: {
|
|
52
52
|
height: 0
|
|
53
|
+
},
|
|
54
|
+
config: {
|
|
55
|
+
precision: 0.01,
|
|
56
|
+
mass: 1,
|
|
57
|
+
tension: 200,
|
|
58
|
+
friction: 25,
|
|
59
|
+
clamp: true
|
|
53
60
|
}
|
|
54
61
|
}));
|
|
55
62
|
(0, _ahooks.useMount)(() => {
|
|
@@ -2,8 +2,8 @@ import { FC, ReactNode } from 'react';
|
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
export declare type ResultProps = {
|
|
4
4
|
status: 'success' | 'error' | 'info' | 'waiting' | 'warning';
|
|
5
|
-
title:
|
|
6
|
-
description?:
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
description?: ReactNode;
|
|
7
7
|
icon?: ReactNode;
|
|
8
8
|
} & NativeProps;
|
|
9
9
|
export declare const Result: FC<ResultProps>;
|
|
@@ -84,6 +84,30 @@ const VirtualInput = (0, _react.forwardRef)((p, ref) => {
|
|
|
84
84
|
(_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
const keyboard = props.keyboard;
|
|
88
|
+
|
|
89
|
+
const keyboardElement = keyboard && _react.default.cloneElement(keyboard, {
|
|
90
|
+
onInput: v => {
|
|
91
|
+
var _a, _b;
|
|
92
|
+
|
|
93
|
+
setValue(value + v);
|
|
94
|
+
(_b = (_a = keyboard.props).onInput) === null || _b === void 0 ? void 0 : _b.call(_a, v);
|
|
95
|
+
},
|
|
96
|
+
onDelete: () => {
|
|
97
|
+
var _a, _b;
|
|
98
|
+
|
|
99
|
+
setValue(value.slice(0, -1));
|
|
100
|
+
(_b = (_a = keyboard.props).onDelete) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
101
|
+
},
|
|
102
|
+
visible: hasFocus,
|
|
103
|
+
onClose: () => {
|
|
104
|
+
var _a, _b, _c;
|
|
105
|
+
|
|
106
|
+
(_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
107
|
+
(_c = (_b = keyboard.props).onClose) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
|
|
87
111
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
88
112
|
ref: rootRef,
|
|
89
113
|
className: (0, _classnames.default)(classPrefix, {
|
|
@@ -111,19 +135,6 @@ const VirtualInput = (0, _react.forwardRef)((p, ref) => {
|
|
|
111
135
|
}
|
|
112
136
|
}, _react.default.createElement(_antdMobileIcons.CloseCircleFill, null)), !value && _react.default.createElement("div", {
|
|
113
137
|
className: `${classPrefix}-placeholder`
|
|
114
|
-
}, props.placeholder),
|
|
115
|
-
onInput: v => {
|
|
116
|
-
setValue(value + v);
|
|
117
|
-
},
|
|
118
|
-
onDelete: () => {
|
|
119
|
-
setValue(value.slice(0, -1));
|
|
120
|
-
},
|
|
121
|
-
visible: hasFocus,
|
|
122
|
-
onClose: () => {
|
|
123
|
-
var _a;
|
|
124
|
-
|
|
125
|
-
(_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
126
|
-
}
|
|
127
|
-
})));
|
|
138
|
+
}, props.placeholder), keyboardElement));
|
|
128
139
|
});
|
|
129
140
|
exports.VirtualInput = VirtualInput;
|
|
@@ -2,8 +2,8 @@ import { FC, ReactNode } from 'react';
|
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
export declare type ResultProps = {
|
|
4
4
|
status: 'success' | 'error' | 'info' | 'waiting' | 'warning';
|
|
5
|
-
title:
|
|
6
|
-
description?:
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
description?: ReactNode;
|
|
7
7
|
icon?: ReactNode;
|
|
8
8
|
} & NativeProps;
|
|
9
9
|
export declare const Result: FC<ResultProps>;
|
|
@@ -64,6 +64,28 @@ export const VirtualInput = forwardRef((p, ref) => {
|
|
|
64
64
|
(_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
const keyboard = props.keyboard;
|
|
68
|
+
const keyboardElement = keyboard && React.cloneElement(keyboard, {
|
|
69
|
+
onInput: v => {
|
|
70
|
+
var _a, _b;
|
|
71
|
+
|
|
72
|
+
setValue(value + v);
|
|
73
|
+
(_b = (_a = keyboard.props).onInput) === null || _b === void 0 ? void 0 : _b.call(_a, v);
|
|
74
|
+
},
|
|
75
|
+
onDelete: () => {
|
|
76
|
+
var _a, _b;
|
|
77
|
+
|
|
78
|
+
setValue(value.slice(0, -1));
|
|
79
|
+
(_b = (_a = keyboard.props).onDelete) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
80
|
+
},
|
|
81
|
+
visible: hasFocus,
|
|
82
|
+
onClose: () => {
|
|
83
|
+
var _a, _b, _c;
|
|
84
|
+
|
|
85
|
+
(_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
86
|
+
(_c = (_b = keyboard.props).onClose) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
67
89
|
return withNativeProps(props, React.createElement("div", {
|
|
68
90
|
ref: rootRef,
|
|
69
91
|
className: classNames(classPrefix, {
|
|
@@ -91,18 +113,5 @@ export const VirtualInput = forwardRef((p, ref) => {
|
|
|
91
113
|
}
|
|
92
114
|
}, React.createElement(CloseCircleFill, null)), !value && React.createElement("div", {
|
|
93
115
|
className: `${classPrefix}-placeholder`
|
|
94
|
-
}, props.placeholder),
|
|
95
|
-
onInput: v => {
|
|
96
|
-
setValue(value + v);
|
|
97
|
-
},
|
|
98
|
-
onDelete: () => {
|
|
99
|
-
setValue(value.slice(0, -1));
|
|
100
|
-
},
|
|
101
|
-
visible: hasFocus,
|
|
102
|
-
onClose: () => {
|
|
103
|
-
var _a;
|
|
104
|
-
|
|
105
|
-
(_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
106
|
-
}
|
|
107
|
-
})));
|
|
116
|
+
}, props.placeholder), keyboardElement));
|
|
108
117
|
});
|
package/2x/package.json
CHANGED
|
@@ -50,6 +50,13 @@ const CollapsePanelContent = props => {
|
|
|
50
50
|
}, api] = (0, _web.useSpring)(() => ({
|
|
51
51
|
from: {
|
|
52
52
|
height: 0
|
|
53
|
+
},
|
|
54
|
+
config: {
|
|
55
|
+
precision: 0.01,
|
|
56
|
+
mass: 1,
|
|
57
|
+
tension: 200,
|
|
58
|
+
friction: 25,
|
|
59
|
+
clamp: true
|
|
53
60
|
}
|
|
54
61
|
}));
|
|
55
62
|
(0, _ahooks.useMount)(() => {
|
|
@@ -2,8 +2,8 @@ import { FC, ReactNode } from 'react';
|
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
export declare type ResultProps = {
|
|
4
4
|
status: 'success' | 'error' | 'info' | 'waiting' | 'warning';
|
|
5
|
-
title:
|
|
6
|
-
description?:
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
description?: ReactNode;
|
|
7
7
|
icon?: ReactNode;
|
|
8
8
|
} & NativeProps;
|
|
9
9
|
export declare const Result: FC<ResultProps>;
|
|
@@ -84,6 +84,30 @@ const VirtualInput = (0, _react.forwardRef)((p, ref) => {
|
|
|
84
84
|
(_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
const keyboard = props.keyboard;
|
|
88
|
+
|
|
89
|
+
const keyboardElement = keyboard && _react.default.cloneElement(keyboard, {
|
|
90
|
+
onInput: v => {
|
|
91
|
+
var _a, _b;
|
|
92
|
+
|
|
93
|
+
setValue(value + v);
|
|
94
|
+
(_b = (_a = keyboard.props).onInput) === null || _b === void 0 ? void 0 : _b.call(_a, v);
|
|
95
|
+
},
|
|
96
|
+
onDelete: () => {
|
|
97
|
+
var _a, _b;
|
|
98
|
+
|
|
99
|
+
setValue(value.slice(0, -1));
|
|
100
|
+
(_b = (_a = keyboard.props).onDelete) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
101
|
+
},
|
|
102
|
+
visible: hasFocus,
|
|
103
|
+
onClose: () => {
|
|
104
|
+
var _a, _b, _c;
|
|
105
|
+
|
|
106
|
+
(_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
107
|
+
(_c = (_b = keyboard.props).onClose) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
|
|
87
111
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
88
112
|
ref: rootRef,
|
|
89
113
|
className: (0, _classnames.default)(classPrefix, {
|
|
@@ -111,19 +135,6 @@ const VirtualInput = (0, _react.forwardRef)((p, ref) => {
|
|
|
111
135
|
}
|
|
112
136
|
}, _react.default.createElement(_antdMobileIcons.CloseCircleFill, null)), !value && _react.default.createElement("div", {
|
|
113
137
|
className: `${classPrefix}-placeholder`
|
|
114
|
-
}, props.placeholder),
|
|
115
|
-
onInput: v => {
|
|
116
|
-
setValue(value + v);
|
|
117
|
-
},
|
|
118
|
-
onDelete: () => {
|
|
119
|
-
setValue(value.slice(0, -1));
|
|
120
|
-
},
|
|
121
|
-
visible: hasFocus,
|
|
122
|
-
onClose: () => {
|
|
123
|
-
var _a;
|
|
124
|
-
|
|
125
|
-
(_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
126
|
-
}
|
|
127
|
-
})));
|
|
138
|
+
}, props.placeholder), keyboardElement));
|
|
128
139
|
});
|
|
129
140
|
exports.VirtualInput = VirtualInput;
|
|
@@ -2,8 +2,8 @@ import { FC, ReactNode } from 'react';
|
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
export declare type ResultProps = {
|
|
4
4
|
status: 'success' | 'error' | 'info' | 'waiting' | 'warning';
|
|
5
|
-
title:
|
|
6
|
-
description?:
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
description?: ReactNode;
|
|
7
7
|
icon?: ReactNode;
|
|
8
8
|
} & NativeProps;
|
|
9
9
|
export declare const Result: FC<ResultProps>;
|
|
@@ -64,6 +64,28 @@ export const VirtualInput = forwardRef((p, ref) => {
|
|
|
64
64
|
(_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
const keyboard = props.keyboard;
|
|
68
|
+
const keyboardElement = keyboard && React.cloneElement(keyboard, {
|
|
69
|
+
onInput: v => {
|
|
70
|
+
var _a, _b;
|
|
71
|
+
|
|
72
|
+
setValue(value + v);
|
|
73
|
+
(_b = (_a = keyboard.props).onInput) === null || _b === void 0 ? void 0 : _b.call(_a, v);
|
|
74
|
+
},
|
|
75
|
+
onDelete: () => {
|
|
76
|
+
var _a, _b;
|
|
77
|
+
|
|
78
|
+
setValue(value.slice(0, -1));
|
|
79
|
+
(_b = (_a = keyboard.props).onDelete) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
80
|
+
},
|
|
81
|
+
visible: hasFocus,
|
|
82
|
+
onClose: () => {
|
|
83
|
+
var _a, _b, _c;
|
|
84
|
+
|
|
85
|
+
(_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
86
|
+
(_c = (_b = keyboard.props).onClose) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
67
89
|
return withNativeProps(props, React.createElement("div", {
|
|
68
90
|
ref: rootRef,
|
|
69
91
|
className: classNames(classPrefix, {
|
|
@@ -91,18 +113,5 @@ export const VirtualInput = forwardRef((p, ref) => {
|
|
|
91
113
|
}
|
|
92
114
|
}, React.createElement(CloseCircleFill, null)), !value && React.createElement("div", {
|
|
93
115
|
className: `${classPrefix}-placeholder`
|
|
94
|
-
}, props.placeholder),
|
|
95
|
-
onInput: v => {
|
|
96
|
-
setValue(value + v);
|
|
97
|
-
},
|
|
98
|
-
onDelete: () => {
|
|
99
|
-
setValue(value.slice(0, -1));
|
|
100
|
-
},
|
|
101
|
-
visible: hasFocus,
|
|
102
|
-
onClose: () => {
|
|
103
|
-
var _a;
|
|
104
|
-
|
|
105
|
-
(_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
106
|
-
}
|
|
107
|
-
})));
|
|
116
|
+
}, props.placeholder), keyboardElement));
|
|
108
117
|
});
|