@arco-design/mobile-react 2.25.0 → 2.25.2
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 +2 -2
- package/README.md +2 -2
- package/cjs/checkbox/index.d.ts +4 -2
- package/cjs/checkbox/index.js +1 -1
- package/cjs/date-picker/index.d.ts +3 -1
- package/cjs/form/form-item.js +5 -4
- package/cjs/form/type.d.ts +5 -0
- package/cjs/image-picker/index.d.ts +3 -1
- package/cjs/input/index.d.ts +3 -1
- package/cjs/picker/index.d.ts +3 -1
- package/cjs/picker-view/index.d.ts +3 -1
- package/cjs/radio/index.d.ts +4 -2
- package/cjs/rate/index.d.ts +3 -1
- package/cjs/slider/index.d.ts +3 -1
- package/cjs/stepper/index.d.ts +3 -1
- package/cjs/switch/index.d.ts +3 -1
- package/cjs/textarea/index.d.ts +3 -1
- package/cjs/textarea/index.js +1 -1
- package/dist/index.js +2 -2
- package/dist/index.min.js +1 -1
- package/esm/checkbox/index.d.ts +4 -2
- package/esm/checkbox/index.js +1 -1
- package/esm/date-picker/index.d.ts +3 -1
- package/esm/form/form-item.js +5 -4
- package/esm/form/type.d.ts +5 -0
- package/esm/image-picker/index.d.ts +3 -1
- package/esm/input/index.d.ts +3 -1
- package/esm/picker/index.d.ts +3 -1
- package/esm/picker-view/index.d.ts +3 -1
- package/esm/radio/index.d.ts +4 -2
- package/esm/rate/index.d.ts +3 -1
- package/esm/slider/index.d.ts +3 -1
- package/esm/stepper/index.d.ts +3 -1
- package/esm/switch/index.d.ts +3 -1
- package/esm/textarea/index.d.ts +3 -1
- package/esm/textarea/index.js +1 -1
- package/package.json +3 -3
- package/umd/checkbox/index.d.ts +4 -2
- package/umd/checkbox/index.js +1 -1
- package/umd/date-picker/index.d.ts +3 -1
- package/umd/form/form-item.js +5 -4
- package/umd/form/type.d.ts +5 -0
- package/umd/image-picker/index.d.ts +3 -1
- package/umd/input/index.d.ts +3 -1
- package/umd/picker/index.d.ts +3 -1
- package/umd/picker-view/index.d.ts +3 -1
- package/umd/radio/index.d.ts +4 -2
- package/umd/rate/index.d.ts +3 -1
- package/umd/slider/index.d.ts +3 -1
- package/umd/stepper/index.d.ts +3 -1
- package/umd/switch/index.d.ts +3 -1
- package/umd/textarea/index.d.ts +3 -1
- package/umd/textarea/index.js +1 -1
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,28 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [2.25.2](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.25.1...@arco-design/mobile-react@2.25.2) (2023-02-08)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* wrap style division in parentheses ([ebe7a8f](https://github.com/arco-design/arco-design-mobile/commit/ebe7a8f8ba6f51ac75b45488b672e48ca9c2e0bb))
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
## [2.25.1](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.25.0...@arco-design/mobile-react@2.25.1) (2023-02-01)
|
18
|
+
|
19
|
+
|
20
|
+
### Bug Fixes
|
21
|
+
|
22
|
+
* checkbox & radio exported type ([901681c](https://github.com/arco-design/arco-design-mobile/commit/901681ccfd4788b3e50954dbde6e4475ac1dbdc4))
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
|
6
28
|
# [2.25.0](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.24.2...@arco-design/mobile-react@2.25.0) (2023-02-01)
|
7
29
|
|
8
30
|
|
package/README.en-US.md
CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="_b
|
|
59
59
|
React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">Click here</a>**
|
60
60
|
|
61
61
|
```
|
62
|
-
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.
|
63
|
-
<script src="https://unpkg.com/@arco-design/mobile-react@2.
|
62
|
+
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.25.1/dist/style.min.css">
|
63
|
+
<script src="https://unpkg.com/@arco-design/mobile-react@2.25.1/dist/index.min.js"></script>
|
64
64
|
```
|
65
65
|
|
66
66
|
## Full import
|
package/README.md
CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="
|
|
59
59
|
React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">戳这里获取</a>**
|
60
60
|
|
61
61
|
```
|
62
|
-
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.
|
63
|
-
<script src="https://unpkg.com/@arco-design/mobile-react@2.
|
62
|
+
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.25.1/dist/style.min.css">
|
63
|
+
<script src="https://unpkg.com/@arco-design/mobile-react@2.25.1/dist/index.min.js"></script>
|
64
64
|
```
|
65
65
|
|
66
66
|
## 引入全部
|
package/cjs/checkbox/index.d.ts
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
export * from './type';
|
3
3
|
declare const _default: import("react").ForwardRefExoticComponent<import("./type").CheckboxProps<string | number> & import("react").RefAttributes<import("./type").CheckboxRef>> & {
|
4
|
-
Group: import("react").ForwardRefExoticComponent<import("./type").CheckboxGroupProps<string | number, import("./type").CheckboxProps<string | number> & import("react").RefAttributes<import("./type").CheckboxRef>> & import("react").RefAttributes<import("./type").CheckboxGroupRef>> &
|
4
|
+
Group: import("react").ForwardRefExoticComponent<import("./type").CheckboxGroupProps<string | number, import("./type").CheckboxProps<string | number> & import("react").RefAttributes<import("./type").CheckboxRef>> & import("react").RefAttributes<import("./type").CheckboxGroupRef>> & {
|
5
|
+
displayName?: string | undefined;
|
6
|
+
};
|
5
7
|
} & {
|
6
|
-
displayName
|
8
|
+
displayName?: string | undefined;
|
7
9
|
};
|
8
10
|
/**
|
9
11
|
* 复选框,可用状态下点击切换选择,支持禁用,支持复选项组。
|
package/cjs/checkbox/index.js
CHANGED
@@ -9,7 +9,9 @@ export interface DatePickerRef {
|
|
9
9
|
*/
|
10
10
|
dom: HTMLDivElement | null;
|
11
11
|
}
|
12
|
-
declare const _default: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<DatePickerRef>> &
|
12
|
+
declare const _default: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<DatePickerRef>> & {
|
13
|
+
displayName?: string | undefined;
|
14
|
+
};
|
13
15
|
/**
|
14
16
|
* 日期时间选择器,基于`Picker`组件扩展,支持指定范围,单位可精确到秒。
|
15
17
|
* @en Date picker, based on the `Picker` component, supports the specified range, the unit can be accurate to seconds.
|
package/cjs/form/form-item.js
CHANGED
@@ -17,9 +17,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
17
17
|
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; }
|
18
18
|
var FormItemInner = /*#__PURE__*/function (_PureComponent) {
|
19
19
|
(0, _inheritsLoose2.default)(FormItemInner, _PureComponent);
|
20
|
+
// eslint-disable-next-line react/static-property-placement
|
21
|
+
|
20
22
|
function FormItemInner(props, context) {
|
21
23
|
var _this;
|
22
24
|
_this = _PureComponent.call(this, props) || this;
|
25
|
+
_this.context = void 0;
|
23
26
|
_this.destroyField = void 0;
|
24
27
|
_this._errors = [];
|
25
28
|
_this._touched = false;
|
@@ -133,8 +136,7 @@ var FormItemInner = /*#__PURE__*/function (_PureComponent) {
|
|
133
136
|
};
|
134
137
|
_proto.setFieldData = function setFieldData(value) {
|
135
138
|
var field = this.props.field;
|
136
|
-
var
|
137
|
-
setFieldValue = _ref.setFieldValue;
|
139
|
+
var setFieldValue = this.context.form.setFieldValue;
|
138
140
|
setFieldValue(field, value);
|
139
141
|
this.validateField();
|
140
142
|
};
|
@@ -162,8 +164,7 @@ var FormItemInner = /*#__PURE__*/function (_PureComponent) {
|
|
162
164
|
_this$props4$triggerP = _this$props4.triggerPropsField,
|
163
165
|
triggerPropsField = _this$props4$triggerP === void 0 ? 'value' : _this$props4$triggerP,
|
164
166
|
displayType = _this$props4.displayType;
|
165
|
-
var
|
166
|
-
getFieldValue = _ref2.getFieldValue;
|
167
|
+
var getFieldValue = this.context.form.getFieldValue;
|
167
168
|
var props = (_props = {}, _props[triggerPropsField] = getFieldValue(field), _props.disabled = this.props.disabled, _props);
|
168
169
|
var childrenType = displayType || ((_children$type = children.type) == null ? void 0 : _children$type.displayName);
|
169
170
|
switch (childrenType) {
|
package/cjs/form/type.d.ts
CHANGED
@@ -155,6 +155,11 @@ export interface IFormInstance {
|
|
155
155
|
* @en Reset fields
|
156
156
|
*/
|
157
157
|
resetFields: () => void;
|
158
|
+
/**
|
159
|
+
* 设置单个表单项值
|
160
|
+
* @en Set field value
|
161
|
+
*/
|
162
|
+
setFieldValue: (name: string, value: FieldValue) => boolean;
|
158
163
|
/**
|
159
164
|
* 设置多个表单项值
|
160
165
|
* @en Set multiple field value
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ImagePickerProps, ImagePickerRef } from './type';
|
3
3
|
export * from './type';
|
4
|
-
declare const _default: React.ForwardRefExoticComponent<ImagePickerProps & React.RefAttributes<ImagePickerRef>> &
|
4
|
+
declare const _default: React.ForwardRefExoticComponent<ImagePickerProps & React.RefAttributes<ImagePickerRef>> & {
|
5
|
+
displayName?: string | undefined;
|
6
|
+
};
|
5
7
|
/**
|
6
8
|
* 图片选择器组件
|
7
9
|
* @en ImagePicker Component
|
package/cjs/input/index.d.ts
CHANGED
@@ -45,7 +45,9 @@ export interface InputRef {
|
|
45
45
|
*/
|
46
46
|
input: HTMLInputElement | null;
|
47
47
|
}
|
48
|
-
declare const _default: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>> &
|
48
|
+
declare const _default: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>> & {
|
49
|
+
displayName?: string | undefined;
|
50
|
+
};
|
49
51
|
/**
|
50
52
|
* 输入框组件,支持添加前后缀。
|
51
53
|
* @en The input box, supports adding prefixes and suffixes.
|
package/cjs/picker/index.d.ts
CHANGED
@@ -35,7 +35,9 @@ export interface PickerRef {
|
|
35
35
|
*/
|
36
36
|
scrollToCurrentIndex: () => void;
|
37
37
|
}
|
38
|
-
declare const _default: React.ForwardRefExoticComponent<PickerProps & React.RefAttributes<PickerRef>> &
|
38
|
+
declare const _default: React.ForwardRefExoticComponent<PickerProps & React.RefAttributes<PickerRef>> & {
|
39
|
+
displayName?: string | undefined;
|
40
|
+
};
|
39
41
|
/**
|
40
42
|
* 选择器组件,形式是弹起的浮层。
|
41
43
|
* @en The selector component, in the form of a popup layer.
|
@@ -42,7 +42,9 @@ export interface PickerViewRef {
|
|
42
42
|
*/
|
43
43
|
scrollToCurrentIndex: () => void;
|
44
44
|
}
|
45
|
-
declare const _default: React.ForwardRefExoticComponent<PickerViewProps & React.RefAttributes<PickerViewRef>> &
|
45
|
+
declare const _default: React.ForwardRefExoticComponent<PickerViewProps & React.RefAttributes<PickerViewRef>> & {
|
46
|
+
displayName?: string | undefined;
|
47
|
+
};
|
46
48
|
/**
|
47
49
|
* 选择器视图组件,不含弹窗,方便使用方灵活定制选择器。
|
48
50
|
* @en The picker view component, not has contain popup, which is convenient for the user to flexibly customize the picker.
|
package/cjs/radio/index.d.ts
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
export * from './type';
|
3
3
|
declare const _default: import("react").ForwardRefExoticComponent<import("./type").RadioProps<string | number> & import("react").RefAttributes<import("./type").RadioRef>> & {
|
4
|
-
Group: import("react").ForwardRefExoticComponent<import("./type").RadioGroupProps<string | number, import("./type").RadioProps<string | number> & import("react").RefAttributes<import("./type").RadioRef>> & import("react").RefAttributes<import("./type").RadioGroupRef>> &
|
4
|
+
Group: import("react").ForwardRefExoticComponent<import("./type").RadioGroupProps<string | number, import("./type").RadioProps<string | number> & import("react").RefAttributes<import("./type").RadioRef>> & import("react").RefAttributes<import("./type").RadioGroupRef>> & {
|
5
|
+
displayName?: string | undefined;
|
6
|
+
};
|
5
7
|
} & {
|
6
|
-
displayName
|
8
|
+
displayName?: string | undefined;
|
7
9
|
};
|
8
10
|
/**
|
9
11
|
* 单选框,可用状态下点击切换选择,支持禁用,支持单选项组。
|
package/cjs/rate/index.d.ts
CHANGED
@@ -94,7 +94,9 @@ export interface RateRef {
|
|
94
94
|
*/
|
95
95
|
dom: HTMLDivElement | null;
|
96
96
|
}
|
97
|
-
declare const _default: React.ForwardRefExoticComponent<RateProps & React.RefAttributes<RateRef>> &
|
97
|
+
declare const _default: React.ForwardRefExoticComponent<RateProps & React.RefAttributes<RateRef>> & {
|
98
|
+
displayName?: string | undefined;
|
99
|
+
};
|
98
100
|
/**
|
99
101
|
* 评分组件,支持受控模式
|
100
102
|
* @en Rate component, supports controlled mode
|
package/cjs/slider/index.d.ts
CHANGED
@@ -138,7 +138,9 @@ export interface SliderRef {
|
|
138
138
|
*/
|
139
139
|
dom: HTMLDivElement | null;
|
140
140
|
}
|
141
|
-
declare const _default: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<SliderRef>> &
|
141
|
+
declare const _default: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<SliderRef>> & {
|
142
|
+
displayName?: string | undefined;
|
143
|
+
};
|
142
144
|
/**
|
143
145
|
* 滑动型输入器,展示当前值和可选范围。
|
144
146
|
* @en Slide input component, displays the current value and optional range.
|
package/cjs/stepper/index.d.ts
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { StepperProps, StepperRef } from './type';
|
3
3
|
export * from './type';
|
4
|
-
declare const _default: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<StepperRef>> &
|
4
|
+
declare const _default: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<StepperRef>> & {
|
5
|
+
displayName?: string | undefined;
|
6
|
+
};
|
5
7
|
/**
|
6
8
|
* 步进器组件,支持受控模式
|
7
9
|
* @en Stepper component, provide controlled mode
|
package/cjs/switch/index.d.ts
CHANGED
@@ -90,7 +90,9 @@ export interface SwitchRef {
|
|
90
90
|
*/
|
91
91
|
dom: HTMLDivElement | null;
|
92
92
|
}
|
93
|
-
declare const _default: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<SwitchRef>> &
|
93
|
+
declare const _default: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<SwitchRef>> & {
|
94
|
+
displayName?: string | undefined;
|
95
|
+
};
|
94
96
|
/**
|
95
97
|
* 开关组件,支持点击和滑动触发开关动作。
|
96
98
|
* @en A switch component that supports click and slide trigger switch actions.
|
package/cjs/textarea/index.d.ts
CHANGED
@@ -81,7 +81,9 @@ export interface TextareaRef {
|
|
81
81
|
*/
|
82
82
|
resize: () => void;
|
83
83
|
}
|
84
|
-
declare const _default: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<TextareaRef>> &
|
84
|
+
declare const _default: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<TextareaRef>> & {
|
85
|
+
displayName?: string | undefined;
|
86
|
+
};
|
85
87
|
/**
|
86
88
|
* 多行文本输入框组件,支持自适应内容高度。
|
87
89
|
* @en A multi-line textarea, supports adaptive content height.
|
package/cjs/textarea/index.js
CHANGED
@@ -52,7 +52,7 @@ var Textarea = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
52
52
|
}
|
53
53
|
// 默认为过滤换行后的字符长度
|
54
54
|
// @en The default is the character length after filtering newlines
|
55
|
-
var validValue = inputValue.replace(/\n/g, '');
|
55
|
+
var validValue = (inputValue || '').replace(/\n/g, '');
|
56
56
|
return validValue ? String(validValue).length : 0;
|
57
57
|
}, [inputValue, statisticsLengthCaculator]);
|
58
58
|
var exceed = maxValueLength ? currentValueLength > maxValueLength : false;
|
package/dist/index.js
CHANGED
@@ -7374,7 +7374,7 @@
|
|
7374
7374
|
* 复选项组
|
7375
7375
|
* @en Checkbox group
|
7376
7376
|
* @displayName CheckboxGroup
|
7377
|
-
|
7377
|
+
*/
|
7378
7378
|
var Group$2 = componentWrapper(componentGenerator$8(Checkbox$1), 'CheckboxGroup');
|
7379
7379
|
/**
|
7380
7380
|
* 复选框,可用状态下点击切换选择,支持禁用,支持复选项组。
|
@@ -14214,7 +14214,7 @@
|
|
14214
14214
|
}
|
14215
14215
|
// 默认为过滤换行后的字符长度
|
14216
14216
|
// @en The default is the character length after filtering newlines
|
14217
|
-
var validValue = inputValue.replace(/\n/g, '');
|
14217
|
+
var validValue = (inputValue || '').replace(/\n/g, '');
|
14218
14218
|
return validValue ? String(validValue).length : 0;
|
14219
14219
|
}, [inputValue, statisticsLengthCaculator]);
|
14220
14220
|
var exceed = maxValueLength ? currentValueLength > maxValueLength : false;
|