@arco-design/mobile-react 2.31.2 → 2.31.4
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/CHANGELOG.md +22 -0
- package/README.en-US.md +3 -3
- package/README.md +3 -3
- package/cjs/action-sheet/style/css/index.css +2 -2
- package/cjs/avatar/style/css/index.css +2 -2
- package/cjs/badge/style/css/index.css +2 -2
- package/cjs/button/style/css/index.css +2 -2
- package/cjs/carousel/style/css/index.css +2 -2
- package/cjs/cell/style/css/index.css +2 -2
- package/cjs/checkbox/style/css/index.css +2 -2
- package/cjs/circle-progress/style/css/index.css +2 -2
- package/cjs/collapse/style/css/index.css +2 -2
- package/cjs/count-down/style/css/index.css +2 -2
- package/cjs/date-picker/index.js +7 -7
- package/cjs/date-picker/style/css/index.css +2 -2
- package/cjs/date-picker/type.d.ts +7 -1
- package/cjs/dialog/style/css/index.css +2 -2
- package/cjs/divider/style/css/index.css +2 -2
- package/cjs/dropdown/style/css/index.css +2 -2
- package/cjs/dropdown-menu/style/css/index.css +2 -2
- package/cjs/ellipsis/style/css/index.css +2 -2
- package/cjs/form/form-item.d.ts +0 -3
- package/cjs/form/form-item.js +19 -30
- package/cjs/form/index.js +6 -2
- package/cjs/form/linked-container.d.ts +8 -0
- package/cjs/form/linked-container.js +72 -0
- package/cjs/form/style/css/index.css +2 -2
- package/cjs/form/style/index.less +3 -3
- package/cjs/form/type.d.ts +7 -11
- package/cjs/form/useForm.js +36 -48
- package/cjs/grid/style/css/index.css +2 -2
- package/cjs/image/style/css/index.css +2 -2
- package/cjs/image-picker/style/css/index.css +2 -2
- package/cjs/image-preview/style/css/index.css +2 -2
- package/cjs/index-bar/style/css/index.css +2 -2
- package/cjs/input/style/css/index.css +2 -2
- package/cjs/keyboard/style/css/index.css +2 -2
- package/cjs/load-more/style/css/index.css +2 -2
- package/cjs/loading/style/css/index.css +2 -2
- package/cjs/masking/style/css/index.css +2 -2
- package/cjs/nav-bar/style/css/index.css +2 -2
- package/cjs/notice-bar/style/css/index.css +2 -2
- package/cjs/notify/style/css/index.css +2 -2
- package/cjs/pagination/style/css/index.css +2 -2
- package/cjs/picker/index.js +1 -1
- package/cjs/picker/style/css/index.css +2 -2
- package/cjs/picker-view/style/css/index.css +2 -2
- package/cjs/popover/style/css/index.css +2 -2
- package/cjs/popover/style/css/menu.css +2 -2
- package/cjs/popup/style/css/index.css +2 -2
- package/cjs/popup-swiper/style/css/index.css +2 -2
- package/cjs/progress/style/css/index.css +2 -2
- package/cjs/pull-refresh/style/css/index.css +2 -2
- package/cjs/radio/style/css/index.css +2 -2
- package/cjs/rate/style/css/index.css +2 -2
- package/cjs/search-bar/style/css/index.css +2 -2
- package/cjs/skeleton/style/css/index.css +2 -2
- package/cjs/slider/style/css/index.css +2 -2
- package/cjs/stepper/hooks/useInputEvent.d.ts +1 -0
- package/cjs/stepper/hooks/useInputEvent.js +3 -2
- package/cjs/stepper/hooks/useValue.d.ts +1 -0
- package/cjs/stepper/hooks/useValue.js +2 -1
- package/cjs/stepper/index.js +3 -1
- package/cjs/stepper/style/css/index.css +2 -2
- package/cjs/steps/style/css/index.css +2 -2
- package/cjs/sticky/style/css/index.css +2 -2
- package/cjs/swipe-action/style/css/index.css +2 -2
- package/cjs/swipe-load/style/css/index.css +2 -2
- package/cjs/switch/style/css/index.css +2 -2
- package/cjs/tab-bar/style/css/index.css +2 -2
- package/cjs/tabs/style/css/index.css +2 -2
- package/cjs/tag/style/css/index.css +2 -2
- package/cjs/textarea/style/css/index.css +2 -2
- package/cjs/toast/style/css/index.css +2 -2
- package/cjs/transition/style/css/index.css +2 -2
- package/cjs/uploader/style/css/index.css +2 -2
- package/dist/index.js +1832 -1831
- package/dist/index.min.js +4 -4
- package/dist/style.css +114 -114
- package/esm/action-sheet/style/css/index.css +2 -2
- package/esm/avatar/style/css/index.css +2 -2
- package/esm/badge/style/css/index.css +2 -2
- package/esm/button/style/css/index.css +2 -2
- package/esm/carousel/style/css/index.css +2 -2
- package/esm/cell/style/css/index.css +2 -2
- package/esm/checkbox/style/css/index.css +2 -2
- package/esm/circle-progress/style/css/index.css +2 -2
- package/esm/collapse/style/css/index.css +2 -2
- package/esm/count-down/style/css/index.css +2 -2
- package/esm/date-picker/index.js +8 -8
- package/esm/date-picker/style/css/index.css +2 -2
- package/esm/date-picker/type.d.ts +7 -1
- package/esm/dialog/style/css/index.css +2 -2
- package/esm/divider/style/css/index.css +2 -2
- package/esm/dropdown/style/css/index.css +2 -2
- package/esm/dropdown-menu/style/css/index.css +2 -2
- package/esm/ellipsis/style/css/index.css +2 -2
- package/esm/form/form-item.d.ts +0 -3
- package/esm/form/form-item.js +14 -25
- package/esm/form/index.js +7 -3
- package/esm/form/linked-container.d.ts +8 -0
- package/esm/form/linked-container.js +54 -0
- package/esm/form/style/css/index.css +2 -2
- package/esm/form/style/index.less +3 -3
- package/esm/form/type.d.ts +7 -11
- package/esm/form/useForm.js +31 -42
- package/esm/grid/style/css/index.css +2 -2
- package/esm/image/style/css/index.css +2 -2
- package/esm/image-picker/style/css/index.css +2 -2
- package/esm/image-preview/style/css/index.css +2 -2
- package/esm/index-bar/style/css/index.css +2 -2
- package/esm/input/style/css/index.css +2 -2
- package/esm/keyboard/style/css/index.css +2 -2
- package/esm/load-more/style/css/index.css +2 -2
- package/esm/loading/style/css/index.css +2 -2
- package/esm/masking/style/css/index.css +2 -2
- package/esm/nav-bar/style/css/index.css +2 -2
- package/esm/notice-bar/style/css/index.css +2 -2
- package/esm/notify/style/css/index.css +2 -2
- package/esm/pagination/style/css/index.css +2 -2
- package/esm/picker/index.js +1 -1
- package/esm/picker/style/css/index.css +2 -2
- package/esm/picker-view/style/css/index.css +2 -2
- package/esm/popover/style/css/index.css +2 -2
- package/esm/popover/style/css/menu.css +2 -2
- package/esm/popup/style/css/index.css +2 -2
- package/esm/popup-swiper/style/css/index.css +2 -2
- package/esm/progress/style/css/index.css +2 -2
- package/esm/pull-refresh/style/css/index.css +2 -2
- package/esm/radio/style/css/index.css +2 -2
- package/esm/rate/style/css/index.css +2 -2
- package/esm/search-bar/style/css/index.css +2 -2
- package/esm/skeleton/style/css/index.css +2 -2
- package/esm/slider/style/css/index.css +2 -2
- package/esm/stepper/hooks/useInputEvent.d.ts +1 -0
- package/esm/stepper/hooks/useInputEvent.js +3 -2
- package/esm/stepper/hooks/useValue.d.ts +1 -0
- package/esm/stepper/hooks/useValue.js +2 -1
- package/esm/stepper/index.js +3 -1
- package/esm/stepper/style/css/index.css +2 -2
- package/esm/steps/style/css/index.css +2 -2
- package/esm/sticky/style/css/index.css +2 -2
- package/esm/swipe-action/style/css/index.css +2 -2
- package/esm/swipe-load/style/css/index.css +2 -2
- package/esm/switch/style/css/index.css +2 -2
- package/esm/tab-bar/style/css/index.css +2 -2
- package/esm/tabs/style/css/index.css +2 -2
- package/esm/tag/style/css/index.css +2 -2
- package/esm/textarea/style/css/index.css +2 -2
- package/esm/toast/style/css/index.css +2 -2
- package/esm/transition/style/css/index.css +2 -2
- package/esm/uploader/style/css/index.css +2 -2
- package/package.json +3 -3
- package/style/css/public.css +2 -2
- package/tokens/mixin/index.less +2 -2
- package/umd/action-sheet/style/css/index.css +2 -2
- package/umd/avatar/style/css/index.css +2 -2
- package/umd/badge/style/css/index.css +2 -2
- package/umd/button/style/css/index.css +2 -2
- package/umd/carousel/style/css/index.css +2 -2
- package/umd/cell/style/css/index.css +2 -2
- package/umd/checkbox/style/css/index.css +2 -2
- package/umd/circle-progress/style/css/index.css +2 -2
- package/umd/collapse/style/css/index.css +2 -2
- package/umd/count-down/style/css/index.css +2 -2
- package/umd/date-picker/index.js +7 -7
- package/umd/date-picker/style/css/index.css +2 -2
- package/umd/date-picker/type.d.ts +7 -1
- package/umd/dialog/style/css/index.css +2 -2
- package/umd/divider/style/css/index.css +2 -2
- package/umd/dropdown/style/css/index.css +2 -2
- package/umd/dropdown-menu/style/css/index.css +2 -2
- package/umd/ellipsis/style/css/index.css +2 -2
- package/umd/form/form-item.d.ts +0 -3
- package/umd/form/form-item.js +19 -34
- package/umd/form/index.js +6 -2
- package/umd/form/linked-container.d.ts +8 -0
- package/umd/form/linked-container.js +78 -0
- package/umd/form/style/css/index.css +2 -2
- package/umd/form/style/index.less +3 -3
- package/umd/form/type.d.ts +7 -11
- package/umd/form/useForm.js +38 -50
- package/umd/grid/style/css/index.css +2 -2
- package/umd/image/style/css/index.css +2 -2
- package/umd/image-picker/style/css/index.css +2 -2
- package/umd/image-preview/style/css/index.css +2 -2
- package/umd/index-bar/style/css/index.css +2 -2
- package/umd/input/style/css/index.css +2 -2
- package/umd/keyboard/style/css/index.css +2 -2
- package/umd/load-more/style/css/index.css +2 -2
- package/umd/loading/style/css/index.css +2 -2
- package/umd/masking/style/css/index.css +2 -2
- package/umd/nav-bar/style/css/index.css +2 -2
- package/umd/notice-bar/style/css/index.css +2 -2
- package/umd/notify/style/css/index.css +2 -2
- package/umd/pagination/style/css/index.css +2 -2
- package/umd/picker/index.js +1 -1
- package/umd/picker/style/css/index.css +2 -2
- package/umd/picker-view/style/css/index.css +2 -2
- package/umd/popover/style/css/index.css +2 -2
- package/umd/popover/style/css/menu.css +2 -2
- package/umd/popup/style/css/index.css +2 -2
- package/umd/popup-swiper/style/css/index.css +2 -2
- package/umd/progress/style/css/index.css +2 -2
- package/umd/pull-refresh/style/css/index.css +2 -2
- package/umd/radio/style/css/index.css +2 -2
- package/umd/rate/style/css/index.css +2 -2
- package/umd/search-bar/style/css/index.css +2 -2
- package/umd/skeleton/style/css/index.css +2 -2
- package/umd/slider/style/css/index.css +2 -2
- package/umd/stepper/hooks/useInputEvent.d.ts +1 -0
- package/umd/stepper/hooks/useInputEvent.js +3 -2
- package/umd/stepper/hooks/useValue.d.ts +1 -0
- package/umd/stepper/hooks/useValue.js +2 -1
- package/umd/stepper/index.js +3 -1
- package/umd/stepper/style/css/index.css +2 -2
- package/umd/steps/style/css/index.css +2 -2
- package/umd/sticky/style/css/index.css +2 -2
- package/umd/swipe-action/style/css/index.css +2 -2
- package/umd/swipe-load/style/css/index.css +2 -2
- package/umd/switch/style/css/index.css +2 -2
- package/umd/tab-bar/style/css/index.css +2 -2
- package/umd/tabs/style/css/index.css +2 -2
- package/umd/tag/style/css/index.css +2 -2
- package/umd/textarea/style/css/index.css +2 -2
- package/umd/toast/style/css/index.css +2 -2
- package/umd/transition/style/css/index.css +2 -2
- package/umd/uploader/style/css/index.css +2 -2
package/esm/form/useForm.js
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
3
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
4
2
|
|
5
3
|
/* eslint-disable no-console */
|
6
4
|
import { useRef } from 'react';
|
5
|
+
import { Promise } from 'es6-promise';
|
7
6
|
|
8
7
|
var defaultFunc = function defaultFunc() {};
|
9
8
|
|
@@ -47,40 +46,41 @@ var FormData = function FormData() {
|
|
47
46
|
this._callbacks = {};
|
48
47
|
|
49
48
|
this.setFieldsValue = function (values) {
|
50
|
-
|
49
|
+
var oldValues = Object.keys(values).reduce(function (acc, key) {
|
50
|
+
var _extends2;
|
51
51
|
|
52
|
-
|
52
|
+
return _extends({}, acc, (_extends2 = {}, _extends2[key] = _this.getFieldValue(key), _extends2));
|
53
|
+
}, {});
|
54
|
+
_this._formData = _extends({}, _this._formData, values);
|
55
|
+
var onValuesChange = _this._callbacks.onValuesChange;
|
56
|
+
onValuesChange && onValuesChange(values, _this._formData);
|
53
57
|
|
54
|
-
|
55
|
-
if (key in _this._fieldsList) {
|
56
|
-
var _this$_fieldsList$key;
|
58
|
+
_this.notifyField(values, oldValues);
|
57
59
|
|
58
|
-
(_this$_fieldsList$key = _this._fieldsList[key]) == null ? void 0 : _this$_fieldsList$key.onValueChange();
|
59
|
-
}
|
60
|
-
});
|
61
60
|
return true;
|
62
61
|
};
|
63
62
|
|
64
63
|
this.setFieldValue = function (name, value) {
|
65
|
-
var
|
64
|
+
var _oldValues, _extends3, _onValuesChange, _this$notifyField;
|
66
65
|
|
67
|
-
|
66
|
+
var oldValues = (_oldValues = {}, _oldValues[name] = _this.getFieldValue(name), _oldValues);
|
67
|
+
_this._formData = _extends({}, _this._formData, (_extends3 = {}, _extends3[name] = value, _extends3));
|
68
68
|
var onValuesChange = _this._callbacks.onValuesChange;
|
69
69
|
onValuesChange && onValuesChange((_onValuesChange = {}, _onValuesChange[name] = value, _onValuesChange), _this._formData);
|
70
70
|
|
71
|
-
_this.notifyField((_this$notifyField = {}, _this$notifyField[name] = value, _this$notifyField));
|
71
|
+
_this.notifyField((_this$notifyField = {}, _this$notifyField[name] = value, _this$notifyField), oldValues);
|
72
72
|
|
73
73
|
return true;
|
74
74
|
};
|
75
75
|
|
76
|
-
this.notifyField = function (values) {
|
76
|
+
this.notifyField = function (values, oldValues) {
|
77
77
|
Object.keys(values).map(function (fieldName) {
|
78
78
|
var _this$_fieldsList;
|
79
79
|
|
80
80
|
var fieldObj = ((_this$_fieldsList = _this._fieldsList) == null ? void 0 : _this$_fieldsList[fieldName]) || null;
|
81
81
|
|
82
82
|
if (fieldObj) {
|
83
|
-
fieldObj.onValueChange(values[fieldName]);
|
83
|
+
fieldObj.onValueChange(values[fieldName], oldValues[fieldName]);
|
84
84
|
}
|
85
85
|
});
|
86
86
|
};
|
@@ -145,11 +145,11 @@ var FormData = function FormData() {
|
|
145
145
|
var initialValue = self.props.initialValue;
|
146
146
|
|
147
147
|
if (initialValue !== undefined && name) {
|
148
|
-
var
|
148
|
+
var _extends4, _extends5;
|
149
149
|
|
150
|
-
_this._initialValues = _extends({}, _this._initialValues, (
|
150
|
+
_this._initialValues = _extends({}, _this._initialValues, (_extends4 = {}, _extends4[name] = initialValue, _extends4));
|
151
151
|
|
152
|
-
_this.setFieldsValue(_extends({}, _this._formData, (
|
152
|
+
_this.setFieldsValue(_extends({}, _this._formData, (_extends5 = {}, _extends5[name] = initialValue, _extends5)));
|
153
153
|
}
|
154
154
|
|
155
155
|
return function () {
|
@@ -196,31 +196,20 @@ var FormData = function FormData() {
|
|
196
196
|
return summaryPromise;
|
197
197
|
};
|
198
198
|
|
199
|
-
this.submit =
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
var onSubmitFailed = _this._callbacks.onSubmitFailed;
|
209
|
-
|
210
|
-
if (!onSubmitFailed) {
|
211
|
-
return;
|
212
|
-
}
|
213
|
-
|
214
|
-
onSubmitFailed(_this._formData, e);
|
215
|
-
});
|
216
|
-
|
217
|
-
case 1:
|
218
|
-
case "end":
|
219
|
-
return _context.stop();
|
220
|
-
}
|
199
|
+
this.submit = function () {
|
200
|
+
_this.validateFields().then(function (result) {
|
201
|
+
var onSubmit = _this._callbacks.onSubmit;
|
202
|
+
onSubmit == null ? void 0 : onSubmit(_this._formData, result);
|
203
|
+
}).catch(function (e) {
|
204
|
+
var onSubmitFailed = _this._callbacks.onSubmitFailed;
|
205
|
+
|
206
|
+
if (!onSubmitFailed) {
|
207
|
+
return;
|
221
208
|
}
|
222
|
-
|
223
|
-
|
209
|
+
|
210
|
+
onSubmitFailed(_this._formData, e);
|
211
|
+
});
|
212
|
+
};
|
224
213
|
|
225
214
|
this.setCallbacks = function (callbacks) {
|
226
215
|
_this._callbacks = callbacks;
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
package/esm/picker/index.js
CHANGED
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -106,7 +106,7 @@
|
|
106
106
|
* @param @rules {en} customized rewrite rules, default to initial
|
107
107
|
* @example
|
108
108
|
* ```
|
109
|
-
* @import '@arco-design/mobile-
|
109
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
110
110
|
*
|
111
111
|
* .demo {
|
112
112
|
* .set-prop-with-rtl(right, auto);
|
@@ -122,7 +122,7 @@
|
|
122
122
|
* @param @value {en} css property value
|
123
123
|
* @example
|
124
124
|
* ```
|
125
|
-
* @import '@arco-design/mobile-
|
125
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
126
126
|
*
|
127
127
|
* .demo {
|
128
128
|
* .set-value-with-rtl(text-align, left);
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
2
2
|
import { StepperProps } from '../type';
|
3
3
|
export default function useInputEvent(params: Required<Pick<StepperProps, 'defaultValue' | 'min' | 'max' | 'digits' | 'allowEmpty'>> & Pick<StepperProps, 'onBlur' | 'onChange' | 'onInput'> & {
|
4
4
|
actualInputValue: number;
|
5
|
+
innerValue: number;
|
5
6
|
updateValue: (updater: number | ((oldValue: number) => number)) => void;
|
6
7
|
}): {
|
7
8
|
handleInput: (e: React.FocusEvent<HTMLInputElement>) => void;
|