taro-ui 3.1.0-beta.0 → 3.1.0-beta.3
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/dist/index.esm.js +8 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/style/components/avatar.rn.scss +4 -3
- package/dist/style/components/avatar.scss +4 -3
- package/dist/style/components/badge.rn.scss +2 -1
- package/dist/style/components/button.rn.scss +3 -2
- package/dist/style/components/button.scss +2 -2
- package/dist/style/components/checkbox.rn.scss +3 -2
- package/dist/style/components/curtain.rn.scss +5 -4
- package/dist/style/components/curtain.scss +3 -3
- package/dist/style/components/fab.rn.scss +2 -1
- package/dist/style/components/flex.rn.scss +2 -1
- package/dist/style/components/flex.scss +2 -1
- package/dist/style/components/input.rn.scss +2 -4
- package/dist/style/components/progress.rn.scss +3 -2
- package/dist/style/components/progress.scss +3 -3
- package/dist/style/components/range.rn.scss +4 -3
- package/dist/style/components/range.scss +2 -2
- package/dist/style/components/search-bar.rn.scss +2 -1
- package/dist/style/components/search-bar.scss +2 -1
- package/dist/style/components/steps.rn.scss +2 -1
- package/dist/style/components/tag.rn.scss +3 -2
- package/dist/style/components/tag.scss +4 -3
- package/dist/style/components/timeline.rn.scss +14 -6
- package/dist/style/components/timeline.scss +4 -3
- package/dist/style/components/toast.scss +2 -1
- package/lib/components/input/index.js +6 -4
- package/lib/components/input/index.js.map +1 -1
- package/lib/components/search-bar/index.js +1 -1
- package/lib/components/textarea/index.js +1 -1
- package/package.json +7 -6
- package/rn/components/button/index.tsx +11 -10
- package/rn/components/checkbox/index.tsx +8 -8
- package/rn/components/input/index.tsx +19 -17
- package/rn/components/noticebar/index.tsx +10 -9
- package/rn/components/range/index.tsx +17 -16
- package/rn/components/search-bar/index.tsx +10 -10
- package/rn/components/tab-bar/index.tsx +17 -14
- package/rn/components/textarea/index.tsx +6 -6
- package/rn/components/timeline/index.tsx +5 -5
- package/rn/style/components/avatar.scss +4 -3
- package/rn/style/components/badge.scss +2 -1
- package/rn/style/components/button.scss +3 -2
- package/rn/style/components/checkbox.scss +3 -2
- package/rn/style/components/curtain.scss +5 -4
- package/rn/style/components/fab.scss +2 -1
- package/rn/style/components/flex.scss +2 -1
- package/rn/style/components/input.scss +2 -4
- package/rn/style/components/progress.scss +3 -2
- package/rn/style/components/range.scss +4 -3
- package/rn/style/components/search-bar.scss +2 -1
- package/rn/style/components/steps.scss +2 -1
- package/rn/style/components/tag.scss +3 -2
- package/rn/style/components/timeline.scss +14 -6
- package/types/input.d.ts +6 -0
- package/types/modal.d.ts +5 -5
- package/types/textarea.d.ts +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3069,14 +3069,14 @@ AtIcon.propTypes = {
|
|
|
3069
3069
|
function getInputProps(props) {
|
|
3070
3070
|
var actualProps = {
|
|
3071
3071
|
type: props.type,
|
|
3072
|
-
|
|
3072
|
+
maxLength: props.maxLength || props.maxlength,
|
|
3073
3073
|
disabled: props.disabled,
|
|
3074
3074
|
password: false
|
|
3075
3075
|
};
|
|
3076
3076
|
switch (actualProps.type) {
|
|
3077
3077
|
case 'phone':
|
|
3078
3078
|
actualProps.type = 'number';
|
|
3079
|
-
actualProps.
|
|
3079
|
+
actualProps.maxLength = 11;
|
|
3080
3080
|
break;
|
|
3081
3081
|
case 'password':
|
|
3082
3082
|
actualProps.type = 'text';
|
|
@@ -3141,7 +3141,7 @@ var AtInput = /** @class */ (function (_super) {
|
|
|
3141
3141
|
}
|
|
3142
3142
|
AtInput.prototype.render = function () {
|
|
3143
3143
|
var _a = this.props, className = _a.className, customStyle = _a.customStyle, name = _a.name, cursorSpacing = _a.cursorSpacing, confirmType = _a.confirmType, cursor = _a.cursor, selectionStart = _a.selectionStart, selectionEnd = _a.selectionEnd, adjustPosition = _a.adjustPosition, border = _a.border, title = _a.title, error = _a.error, clear = _a.clear, placeholder = _a.placeholder, placeholderStyle = _a.placeholderStyle, placeholderClass = _a.placeholderClass, autoFocus = _a.autoFocus, focus = _a.focus, value = _a.value, required = _a.required;
|
|
3144
|
-
var _b = getInputProps(this.props), type = _b.type,
|
|
3144
|
+
var _b = getInputProps(this.props), type = _b.type, maxLength = _b.maxLength, disabled = _b.disabled, password = _b.password;
|
|
3145
3145
|
var rootCls = classnames('at-input', {
|
|
3146
3146
|
'at-input--without-border': !border
|
|
3147
3147
|
}, className);
|
|
@@ -3158,7 +3158,7 @@ var AtInput = /** @class */ (function (_super) {
|
|
|
3158
3158
|
React.createElement(View, { className: containerCls },
|
|
3159
3159
|
React.createElement(View, { className: overlayCls, onClick: this.handleClick }),
|
|
3160
3160
|
title && (React.createElement(Label, { className: "at-input__title " + (required && 'at-input__title--required'), for: name }, title)),
|
|
3161
|
-
React.createElement(Input, __assign({ className: 'at-input__input' }, id, { name: name, type: type, password: password, placeholderStyle: placeholderStyle, placeholderClass: placeholderCls, placeholder: placeholder, cursorSpacing: cursorSpacing, maxlength:
|
|
3161
|
+
React.createElement(Input, __assign({ className: 'at-input__input' }, id, { name: name, type: type, disabled: disabled, password: password, placeholderStyle: placeholderStyle, placeholderClass: placeholderCls, placeholder: placeholder, cursorSpacing: cursorSpacing, maxlength: maxLength, autoFocus: autoFocus, focus: focus, value: value, confirmType: confirmType, cursor: cursor, selectionStart: selectionStart, selectionEnd: selectionEnd, adjustPosition: adjustPosition, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, onConfirm: this.handleConfirm,
|
|
3162
3162
|
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
3163
3163
|
// @ts-ignore
|
|
3164
3164
|
onKeyboardHeightChange: this.handleKeyboardHeightChange })),
|
|
@@ -3186,6 +3186,7 @@ AtInput.defaultProps = {
|
|
|
3186
3186
|
selectionEnd: -1,
|
|
3187
3187
|
adjustPosition: true,
|
|
3188
3188
|
maxlength: 140,
|
|
3189
|
+
maxLength: 140,
|
|
3189
3190
|
type: 'text',
|
|
3190
3191
|
disabled: false,
|
|
3191
3192
|
border: true,
|
|
@@ -3214,6 +3215,7 @@ AtInput.propTypes = {
|
|
|
3214
3215
|
adjustPosition: propTypes.bool,
|
|
3215
3216
|
cursorSpacing: propTypes.oneOfType([propTypes.string, propTypes.number]),
|
|
3216
3217
|
maxlength: propTypes.oneOfType([propTypes.string, propTypes.number]),
|
|
3218
|
+
maxLength: propTypes.oneOfType([propTypes.string, propTypes.number]),
|
|
3217
3219
|
type: propTypes.string,
|
|
3218
3220
|
disabled: propTypes.bool,
|
|
3219
3221
|
border: propTypes.bool,
|
|
@@ -4673,7 +4675,7 @@ var AtTextarea = /** @class */ (function (_super) {
|
|
|
4673
4675
|
function AtTextarea() {
|
|
4674
4676
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
4675
4677
|
_this.handleInput = function (event) {
|
|
4676
|
-
_this.props.onChange(event.
|
|
4678
|
+
_this.props.onChange(event.detail.value, event);
|
|
4677
4679
|
};
|
|
4678
4680
|
_this.handleFocus = function (event) {
|
|
4679
4681
|
_this.props.onFocus && _this.props.onFocus(event);
|
|
@@ -5307,7 +5309,7 @@ var AtSearchBar = /** @class */ (function (_super) {
|
|
|
5307
5309
|
_this.props.onBlur && _this.props.onBlur(event);
|
|
5308
5310
|
};
|
|
5309
5311
|
_this.handleChange = function (e) {
|
|
5310
|
-
_this.props.onChange(e.
|
|
5312
|
+
_this.props.onChange(e.detail.value, e);
|
|
5311
5313
|
};
|
|
5312
5314
|
_this.handleClear = function (event) {
|
|
5313
5315
|
if (_this.props.onClear) {
|