@nutui/nutui-react-taro 3.0.19-cpp.23 → 3.0.19-cpp.24
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/cjs/packages/checkbox/checkbox.js +15 -6
- package/dist/cjs/packages/input/input.js +4 -3
- package/dist/cjs/packages/input/style/input.scss +1 -1
- package/dist/cjs/packages/input/style/style.css +1 -1
- package/dist/cjs/packages/input/style/style.harmony.css +1 -1
- package/dist/cjs/packages/input/style-jmapp/input.scss +1 -1
- package/dist/cjs/packages/input/style-jmapp/style.css +1 -1
- package/dist/cjs/packages/input/style-jrkf/input.scss +1 -1
- package/dist/cjs/packages/input/style-jrkf/style.css +1 -1
- package/dist/cjs/packages/radio/radio.js +7 -3
- package/dist/cjs/packages/toast/toast.js +2 -1
- package/dist/cjs/types/spec/input/base.d.ts +2 -1
- package/dist/es/packages/checkbox/checkbox.js +19 -8
- package/dist/es/packages/input/input.js +4 -3
- package/dist/es/packages/input/style/input.scss +1 -1
- package/dist/es/packages/input/style/style.css +1 -1
- package/dist/es/packages/input/style/style.harmony.css +1 -1
- package/dist/es/packages/input/style-jmapp/input.scss +1 -1
- package/dist/es/packages/input/style-jmapp/style.css +1 -1
- package/dist/es/packages/input/style-jrkf/input.scss +1 -1
- package/dist/es/packages/input/style-jrkf/style.css +1 -1
- package/dist/es/packages/radio/radio.js +11 -5
- package/dist/es/packages/toast/toast.js +2 -1
- package/dist/es/types/spec/input/base.d.ts +5 -1
- package/dist/nutui.react.umd.js +44 -21
- package/dist/style-jmapp.css +1 -1
- package/dist/style-jmapp.scss +48 -48
- package/dist/style-jrkf.css +1 -1
- package/dist/style-jrkf.scss +35 -35
- package/dist/style.css +1 -1
- package/dist/style.scss +41 -41
- package/dist/styles/theme-daojia.scss +369 -0
- package/dist/styles/theme-dark-daojia.scss +365 -0
- package/dist/styles/themes/daojia.css +1 -0
- package/dist/styles/themes/dark-daojia.css +1 -0
- package/dist/styles/variables-daojia.scss +2583 -0
- package/dist/styles/variables.scss +1 -1
- package/package.json +1 -1
|
@@ -87,33 +87,42 @@ var Checkbox = function Checkbox(props) {
|
|
|
87
87
|
var renderIcon = function renderIcon() {
|
|
88
88
|
if (innerDisabled) {
|
|
89
89
|
if (innerIndeterminate) {
|
|
90
|
+
// @ts-ignore
|
|
90
91
|
return /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.CheckDisabled, {
|
|
91
|
-
className: color()
|
|
92
|
+
className: color(),
|
|
93
|
+
ariaHidden: true
|
|
92
94
|
});
|
|
93
95
|
}
|
|
94
96
|
if (innerChecked) {
|
|
97
|
+
// @ts-ignore
|
|
95
98
|
return /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Checked, {
|
|
96
|
-
className: color()
|
|
99
|
+
className: color(),
|
|
100
|
+
ariaHidden: true
|
|
97
101
|
});
|
|
98
102
|
}
|
|
103
|
+
// @ts-ignore
|
|
99
104
|
return /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.CheckDisabled, {
|
|
100
|
-
className: color()
|
|
105
|
+
className: color(),
|
|
106
|
+
ariaHidden: true
|
|
101
107
|
});
|
|
102
108
|
}
|
|
103
109
|
if (!innerChecked) {
|
|
104
110
|
return /*#__PURE__*/ _react.default.isValidElement(icon) ? icon : /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.CheckNormal, {
|
|
105
|
-
className: color()
|
|
111
|
+
className: color(),
|
|
112
|
+
ariaHidden: true
|
|
106
113
|
});
|
|
107
114
|
}
|
|
108
115
|
if (innerIndeterminate) {
|
|
109
116
|
return /*#__PURE__*/ _react.default.isValidElement(indeterminateIcon) ? indeterminateIcon : /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.CheckDisabled, {
|
|
110
|
-
className: color()
|
|
117
|
+
className: color(),
|
|
118
|
+
ariaHidden: true
|
|
111
119
|
});
|
|
112
120
|
}
|
|
113
121
|
return /*#__PURE__*/ _react.default.isValidElement(activeIcon) ? activeIcon : /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
114
122
|
className: "".concat(classPrefix, "-icon-wrap")
|
|
115
123
|
}, /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Checked, {
|
|
116
|
-
className: color()
|
|
124
|
+
className: color(),
|
|
125
|
+
ariaHidden: true
|
|
117
126
|
}));
|
|
118
127
|
};
|
|
119
128
|
var color = function color() {
|
|
@@ -53,7 +53,7 @@ var Input = /*#__PURE__*/ (0, _react.forwardRef)(function(props, ref) {
|
|
|
53
53
|
var classPrefix = 'nut-input';
|
|
54
54
|
var rtl = (0, _index.useRtl)();
|
|
55
55
|
var locale = (0, _index.useConfig)().locale;
|
|
56
|
-
var _ref = (0, _object_spread._)({}, defaultProps, props), focus = _ref.focus, type = _ref.type, name = _ref.name, placeholder = _ref.placeholder, align = _ref.align, disabled = _ref.disabled, readOnly = _ref.readOnly, maxLength = _ref.maxLength, clearable = _ref.clearable, clearIcon = _ref.clearIcon, formatTrigger = _ref.formatTrigger, autoFocus = _ref.autoFocus, style = _ref.style, className = _ref.className, plain = _ref.plain, onChange = _ref.onChange, onFocus = _ref.onFocus, onBlur = _ref.onBlur, onClear = _ref.onClear, formatter = _ref.formatter, onClick = _ref.onClick, confirmType = _ref.confirmType, defaultValue = _ref.defaultValue, _value = _ref.value, rest = (0, _object_without_properties._)(_ref, [
|
|
56
|
+
var _ref = (0, _object_spread._)({}, defaultProps, props), focus = _ref.focus, type = _ref.type, name = _ref.name, placeholder = _ref.placeholder, align = _ref.align, disabled = _ref.disabled, readOnly = _ref.readOnly, maxLength = _ref.maxLength, clearable = _ref.clearable, clearIcon = _ref.clearIcon, formatTrigger = _ref.formatTrigger, autoFocus = _ref.autoFocus, style = _ref.style, className = _ref.className, plain = _ref.plain, inputStyle = _ref.inputStyle, onChange = _ref.onChange, onFocus = _ref.onFocus, onBlur = _ref.onBlur, onClear = _ref.onClear, formatter = _ref.formatter, onClick = _ref.onClick, confirmType = _ref.confirmType, defaultValue = _ref.defaultValue, _value = _ref.value, rest = (0, _object_without_properties._)(_ref, [
|
|
57
57
|
"focus",
|
|
58
58
|
"type",
|
|
59
59
|
"name",
|
|
@@ -69,6 +69,7 @@ var Input = /*#__PURE__*/ (0, _react.forwardRef)(function(props, ref) {
|
|
|
69
69
|
"style",
|
|
70
70
|
"className",
|
|
71
71
|
"plain",
|
|
72
|
+
"inputStyle",
|
|
72
73
|
"onChange",
|
|
73
74
|
"onFocus",
|
|
74
75
|
"onBlur",
|
|
@@ -187,9 +188,9 @@ var Input = /*#__PURE__*/ (0, _react.forwardRef)(function(props, ref) {
|
|
|
187
188
|
name: name,
|
|
188
189
|
className: "nut-input-native",
|
|
189
190
|
ref: inputRef,
|
|
190
|
-
style: {
|
|
191
|
+
style: (0, _object_spread._)({}, {
|
|
191
192
|
textAlign: getTextAlign()
|
|
192
|
-
},
|
|
193
|
+
}, inputStyle),
|
|
193
194
|
type: inputType(type),
|
|
194
195
|
password: type === 'password',
|
|
195
196
|
maxlength: maxLength,
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
.nut-input-native {
|
|
34
34
|
flex: 1;
|
|
35
|
-
color: var(--nutui-color-title, #1a1a1a);
|
|
35
|
+
color: var(--nutui-input-color, var(--nutui-color-title, #1a1a1a));
|
|
36
36
|
font-size: var(--nutui-input-font-size, var(--nutui-font-size-base, 14px));
|
|
37
37
|
padding: 0;
|
|
38
38
|
border: 0;
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
.nut-input-native {
|
|
34
34
|
flex: 1;
|
|
35
|
-
color: var(--nutui-color-title, #1a1a1a);
|
|
35
|
+
color: var(--nutui-input-color, var(--nutui-color-title, #1a1a1a));
|
|
36
36
|
font-size: var(--nutui-input-font-size, var(--nutui-font-size-base, 14px));
|
|
37
37
|
padding: 0;
|
|
38
38
|
border: 0;
|
|
@@ -79,21 +79,25 @@ var Radio = function Radio(props) {
|
|
|
79
79
|
var renderIcon = function renderIcon() {
|
|
80
80
|
var icon = props.icon, activeIcon = props.activeIcon;
|
|
81
81
|
if (disabled && !checkedStatement) {
|
|
82
|
+
// @ts-ignore
|
|
82
83
|
return /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.CheckDisabled, {
|
|
83
|
-
className: (0, _classnames.default)(color())
|
|
84
|
+
className: (0, _classnames.default)(color()),
|
|
85
|
+
ariaHidden: true
|
|
84
86
|
});
|
|
85
87
|
}
|
|
86
88
|
if (checkedStatement) {
|
|
87
89
|
return /*#__PURE__*/ _react.default.isValidElement(activeIcon) ? /*#__PURE__*/ _react.default.cloneElement(activeIcon, (0, _object_spread_props._)((0, _object_spread._)({}, activeIcon.props), {
|
|
88
90
|
className: (0, _classnames.default)(activeIcon.props.className, color())
|
|
89
91
|
})) : /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.CheckChecked, {
|
|
90
|
-
className: (0, _classnames.default)(color())
|
|
92
|
+
className: (0, _classnames.default)(color()),
|
|
93
|
+
ariaHidden: true
|
|
91
94
|
});
|
|
92
95
|
}
|
|
93
96
|
return /*#__PURE__*/ _react.default.isValidElement(icon) ? /*#__PURE__*/ _react.default.cloneElement(icon, (0, _object_spread_props._)((0, _object_spread._)({}, icon.props), {
|
|
94
97
|
className: (0, _classnames.default)(icon.props.className, color())
|
|
95
98
|
})) : /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.CheckNormal, {
|
|
96
|
-
className: (0, _classnames.default)(color())
|
|
99
|
+
className: (0, _classnames.default)(color()),
|
|
100
|
+
ariaHidden: true
|
|
97
101
|
});
|
|
98
102
|
};
|
|
99
103
|
var renderLabel = function renderLabel() {
|
|
@@ -156,7 +156,8 @@ var Toast = function Toast(props) {
|
|
|
156
156
|
}, /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
157
157
|
className: (0, _classnames.default)("".concat(classPrefix, "-inner"), "".concat(classPrefix, "-").concat(position), contentClassName, "".concat(classPrefix, "-inner-").concat(size), "".concat(classPrefix, "-inner-").concat(wordBreak), (0, _define_property._)({}, "".concat(classPrefix, "-inner-descrption"), content)),
|
|
158
158
|
style: (0, _object_spread._)({}, styles, contentStyle),
|
|
159
|
-
ariaRole: "alert"
|
|
159
|
+
ariaRole: "alert",
|
|
160
|
+
ariaLabel: title + content
|
|
160
161
|
}, renderIcon(), title && /*#__PURE__*/ _react.default.createElement(_components.Text, {
|
|
161
162
|
className: "".concat(classPrefix, "-title")
|
|
162
163
|
}, title), content && ((0, _platform.td)() ? /*#__PURE__*/ _react.default.createElement(_components.Text, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { Align } from '../../base/atoms';
|
|
3
3
|
import { BaseProps } from '../../base/props';
|
|
4
4
|
export type InputFormatTrigger = 'onChange' | 'onBlur';
|
|
@@ -19,6 +19,7 @@ export interface BaseInput<INPUT_TYPE, CONFIRM_TYPE = InputConfirmType> extends
|
|
|
19
19
|
autoFocus: boolean;
|
|
20
20
|
confirmType: CONFIRM_TYPE;
|
|
21
21
|
plain: boolean;
|
|
22
|
+
inputStyle?: CSSProperties;
|
|
22
23
|
formatter?: (value: string) => string;
|
|
23
24
|
onChange?: (value: string) => void;
|
|
24
25
|
onBlur?: (value: string) => void;
|
|
@@ -75,33 +75,44 @@ export var Checkbox = function(props) {
|
|
|
75
75
|
var renderIcon = function() {
|
|
76
76
|
if (innerDisabled) {
|
|
77
77
|
if (innerIndeterminate) {
|
|
78
|
+
// @ts-ignore
|
|
78
79
|
return /*#__PURE__*/ React.createElement(CheckDisabled, {
|
|
79
|
-
className: color()
|
|
80
|
+
className: color(),
|
|
81
|
+
ariaHidden: true
|
|
80
82
|
});
|
|
81
83
|
}
|
|
82
84
|
if (innerChecked) {
|
|
85
|
+
// @ts-ignore
|
|
83
86
|
return /*#__PURE__*/ React.createElement(Checked, {
|
|
84
|
-
className: color()
|
|
87
|
+
className: color(),
|
|
88
|
+
ariaHidden: true
|
|
85
89
|
});
|
|
86
90
|
}
|
|
91
|
+
// @ts-ignore
|
|
87
92
|
return /*#__PURE__*/ React.createElement(CheckDisabled, {
|
|
88
|
-
className: color()
|
|
93
|
+
className: color(),
|
|
94
|
+
ariaHidden: true
|
|
89
95
|
});
|
|
90
96
|
}
|
|
91
97
|
if (!innerChecked) {
|
|
92
|
-
return /*#__PURE__*/ React.isValidElement(icon) ? icon :
|
|
93
|
-
|
|
98
|
+
return /*#__PURE__*/ React.isValidElement(icon) ? icon : // @ts-ignore
|
|
99
|
+
/*#__PURE__*/ React.createElement(CheckNormal, {
|
|
100
|
+
className: color(),
|
|
101
|
+
ariaHidden: true
|
|
94
102
|
});
|
|
95
103
|
}
|
|
96
104
|
if (innerIndeterminate) {
|
|
97
|
-
return /*#__PURE__*/ React.isValidElement(indeterminateIcon) ? indeterminateIcon :
|
|
98
|
-
|
|
105
|
+
return /*#__PURE__*/ React.isValidElement(indeterminateIcon) ? indeterminateIcon : // @ts-ignore
|
|
106
|
+
/*#__PURE__*/ React.createElement(CheckDisabled, {
|
|
107
|
+
className: color(),
|
|
108
|
+
ariaHidden: true
|
|
99
109
|
});
|
|
100
110
|
}
|
|
101
111
|
return /*#__PURE__*/ React.isValidElement(activeIcon) ? activeIcon : /*#__PURE__*/ React.createElement(View, {
|
|
102
112
|
className: "".concat(classPrefix, "-icon-wrap")
|
|
103
113
|
}, /*#__PURE__*/ React.createElement(Checked, {
|
|
104
|
-
className: color()
|
|
114
|
+
className: color(),
|
|
115
|
+
ariaHidden: true
|
|
105
116
|
}));
|
|
106
117
|
};
|
|
107
118
|
var color = function() {
|
|
@@ -42,7 +42,7 @@ export var Input = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
42
42
|
var classPrefix = 'nut-input';
|
|
43
43
|
var rtl = useRtl();
|
|
44
44
|
var locale = useConfig().locale;
|
|
45
|
-
var _ref = _object_spread({}, defaultProps, props), focus = _ref.focus, type = _ref.type, name = _ref.name, placeholder = _ref.placeholder, align = _ref.align, disabled = _ref.disabled, readOnly = _ref.readOnly, maxLength = _ref.maxLength, clearable = _ref.clearable, clearIcon = _ref.clearIcon, formatTrigger = _ref.formatTrigger, autoFocus = _ref.autoFocus, style = _ref.style, className = _ref.className, plain = _ref.plain, onChange = _ref.onChange, onFocus = _ref.onFocus, onBlur = _ref.onBlur, onClear = _ref.onClear, formatter = _ref.formatter, onClick = _ref.onClick, confirmType = _ref.confirmType, defaultValue = _ref.defaultValue, _value = _ref.value, rest = _object_without_properties(_ref, [
|
|
45
|
+
var _ref = _object_spread({}, defaultProps, props), focus = _ref.focus, type = _ref.type, name = _ref.name, placeholder = _ref.placeholder, align = _ref.align, disabled = _ref.disabled, readOnly = _ref.readOnly, maxLength = _ref.maxLength, clearable = _ref.clearable, clearIcon = _ref.clearIcon, formatTrigger = _ref.formatTrigger, autoFocus = _ref.autoFocus, style = _ref.style, className = _ref.className, plain = _ref.plain, inputStyle = _ref.inputStyle, onChange = _ref.onChange, onFocus = _ref.onFocus, onBlur = _ref.onBlur, onClear = _ref.onClear, formatter = _ref.formatter, onClick = _ref.onClick, confirmType = _ref.confirmType, defaultValue = _ref.defaultValue, _value = _ref.value, rest = _object_without_properties(_ref, [
|
|
46
46
|
"focus",
|
|
47
47
|
"type",
|
|
48
48
|
"name",
|
|
@@ -58,6 +58,7 @@ export var Input = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
58
58
|
"style",
|
|
59
59
|
"className",
|
|
60
60
|
"plain",
|
|
61
|
+
"inputStyle",
|
|
61
62
|
"onChange",
|
|
62
63
|
"onFocus",
|
|
63
64
|
"onBlur",
|
|
@@ -176,9 +177,9 @@ export var Input = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
176
177
|
name: name,
|
|
177
178
|
className: "nut-input-native",
|
|
178
179
|
ref: inputRef,
|
|
179
|
-
style: {
|
|
180
|
+
style: _object_spread({}, {
|
|
180
181
|
textAlign: getTextAlign()
|
|
181
|
-
},
|
|
182
|
+
}, inputStyle),
|
|
182
183
|
type: inputType(type),
|
|
183
184
|
password: type === 'password',
|
|
184
185
|
maxlength: maxLength,
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
.nut-input-native {
|
|
34
34
|
flex: 1;
|
|
35
|
-
color: var(--nutui-color-title, #1a1a1a);
|
|
35
|
+
color: var(--nutui-input-color, var(--nutui-color-title, #1a1a1a));
|
|
36
36
|
font-size: var(--nutui-input-font-size, var(--nutui-font-size-base, 14px));
|
|
37
37
|
padding: 0;
|
|
38
38
|
border: 0;
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
.nut-input-native {
|
|
34
34
|
flex: 1;
|
|
35
|
-
color: var(--nutui-color-title, #1a1a1a);
|
|
35
|
+
color: var(--nutui-input-color, var(--nutui-color-title, #1a1a1a));
|
|
36
36
|
font-size: var(--nutui-input-font-size, var(--nutui-font-size-base, 14px));
|
|
37
37
|
padding: 0;
|
|
38
38
|
border: 0;
|
|
@@ -67,21 +67,27 @@ export var Radio = function(props) {
|
|
|
67
67
|
var renderIcon = function() {
|
|
68
68
|
var icon = props.icon, activeIcon = props.activeIcon;
|
|
69
69
|
if (disabled && !checkedStatement) {
|
|
70
|
+
// @ts-ignore
|
|
70
71
|
return /*#__PURE__*/ React.createElement(CheckDisabled, {
|
|
71
|
-
className: classNames(color())
|
|
72
|
+
className: classNames(color()),
|
|
73
|
+
ariaHidden: true
|
|
72
74
|
});
|
|
73
75
|
}
|
|
74
76
|
if (checkedStatement) {
|
|
75
77
|
return /*#__PURE__*/ React.isValidElement(activeIcon) ? /*#__PURE__*/ React.cloneElement(activeIcon, _object_spread_props(_object_spread({}, activeIcon.props), {
|
|
76
78
|
className: classNames(activeIcon.props.className, color())
|
|
77
|
-
})) :
|
|
78
|
-
|
|
79
|
+
})) : // @ts-ignore
|
|
80
|
+
/*#__PURE__*/ React.createElement(CheckChecked, {
|
|
81
|
+
className: classNames(color()),
|
|
82
|
+
ariaHidden: true
|
|
79
83
|
});
|
|
80
84
|
}
|
|
81
85
|
return /*#__PURE__*/ React.isValidElement(icon) ? /*#__PURE__*/ React.cloneElement(icon, _object_spread_props(_object_spread({}, icon.props), {
|
|
82
86
|
className: classNames(icon.props.className, color())
|
|
83
|
-
})) :
|
|
84
|
-
|
|
87
|
+
})) : // @ts-ignore
|
|
88
|
+
/*#__PURE__*/ React.createElement(CheckNormal, {
|
|
89
|
+
className: classNames(color()),
|
|
90
|
+
ariaHidden: true
|
|
85
91
|
});
|
|
86
92
|
};
|
|
87
93
|
var renderLabel = function() {
|
|
@@ -133,7 +133,8 @@ export var Toast = function(props) {
|
|
|
133
133
|
}, /*#__PURE__*/ React.createElement(View, {
|
|
134
134
|
className: classNames("".concat(classPrefix, "-inner"), "".concat(classPrefix, "-").concat(position), contentClassName, "".concat(classPrefix, "-inner-").concat(size), "".concat(classPrefix, "-inner-").concat(wordBreak), _define_property({}, "".concat(classPrefix, "-inner-descrption"), content)),
|
|
135
135
|
style: _object_spread({}, styles, contentStyle),
|
|
136
|
-
ariaRole: "alert"
|
|
136
|
+
ariaRole: "alert",
|
|
137
|
+
ariaLabel: title + content
|
|
137
138
|
}, renderIcon(), title && /*#__PURE__*/ React.createElement(Text, {
|
|
138
139
|
className: "".concat(classPrefix, "-title")
|
|
139
140
|
}, title), content && (td() ? /*#__PURE__*/ React.createElement(Text, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { Align } from '../../base/atoms';
|
|
3
3
|
import { BaseProps } from '../../base/props';
|
|
4
4
|
export type InputFormatTrigger = 'onChange' | 'onBlur';
|
|
@@ -65,6 +65,10 @@ export interface BaseInput<INPUT_TYPE, CONFIRM_TYPE = InputConfirmType> extends
|
|
|
65
65
|
*/
|
|
66
66
|
plain: boolean
|
|
67
67
|
/**
|
|
68
|
+
* 输入框样式
|
|
69
|
+
*/
|
|
70
|
+
inputStyle?: CSSProperties
|
|
71
|
+
/**
|
|
68
72
|
* 输入内容格式化函数
|
|
69
73
|
*/
|
|
70
74
|
formatter?: (value: string) => string
|
package/dist/nutui.react.umd.js
CHANGED
|
@@ -6973,32 +6973,44 @@
|
|
|
6973
6973
|
if (innerDisabled) {
|
|
6974
6974
|
if (innerIndeterminate) {
|
|
6975
6975
|
return /* @__PURE__ */ React.createElement(IconSVG$t, {
|
|
6976
|
-
className: color()
|
|
6976
|
+
className: color(),
|
|
6977
|
+
ariaHidden: true
|
|
6977
6978
|
});
|
|
6978
6979
|
}
|
|
6979
6980
|
if (innerChecked) {
|
|
6980
6981
|
return /* @__PURE__ */ React.createElement(IconSVG$q, {
|
|
6981
|
-
className: color()
|
|
6982
|
+
className: color(),
|
|
6983
|
+
ariaHidden: true
|
|
6982
6984
|
});
|
|
6983
6985
|
}
|
|
6984
6986
|
return /* @__PURE__ */ React.createElement(IconSVG$t, {
|
|
6985
|
-
className: color()
|
|
6987
|
+
className: color(),
|
|
6988
|
+
ariaHidden: true
|
|
6986
6989
|
});
|
|
6987
6990
|
}
|
|
6988
6991
|
if (!innerChecked) {
|
|
6989
|
-
return /* @__PURE__ */ React.isValidElement(icon) ? icon :
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
+
return /* @__PURE__ */ React.isValidElement(icon) ? icon : (
|
|
6993
|
+
// @ts-ignore
|
|
6994
|
+
/* @__PURE__ */ React.createElement(IconSVG$s, {
|
|
6995
|
+
className: color(),
|
|
6996
|
+
ariaHidden: true
|
|
6997
|
+
})
|
|
6998
|
+
);
|
|
6992
6999
|
}
|
|
6993
7000
|
if (innerIndeterminate) {
|
|
6994
|
-
return /* @__PURE__ */ React.isValidElement(indeterminateIcon) ? indeterminateIcon :
|
|
6995
|
-
|
|
6996
|
-
|
|
7001
|
+
return /* @__PURE__ */ React.isValidElement(indeterminateIcon) ? indeterminateIcon : (
|
|
7002
|
+
// @ts-ignore
|
|
7003
|
+
/* @__PURE__ */ React.createElement(IconSVG$t, {
|
|
7004
|
+
className: color(),
|
|
7005
|
+
ariaHidden: true
|
|
7006
|
+
})
|
|
7007
|
+
);
|
|
6997
7008
|
}
|
|
6998
7009
|
return /* @__PURE__ */ React.isValidElement(activeIcon) ? activeIcon : /* @__PURE__ */ React.createElement(components.View, {
|
|
6999
7010
|
className: "".concat(classPrefix$j, "-icon-wrap")
|
|
7000
7011
|
}, /* @__PURE__ */ React.createElement(IconSVG$q, {
|
|
7001
|
-
className: color()
|
|
7012
|
+
className: color(),
|
|
7013
|
+
ariaHidden: true
|
|
7002
7014
|
}));
|
|
7003
7015
|
};
|
|
7004
7016
|
var color = function() {
|
|
@@ -9988,7 +10000,7 @@
|
|
|
9988
10000
|
var classPrefix2 = "nut-input";
|
|
9989
10001
|
var rtl = useRtl();
|
|
9990
10002
|
var locale = useConfig().locale;
|
|
9991
|
-
var _ref = _object_spread({}, defaultProps$Y, props), focus = _ref.focus, type2 = _ref.type, name2 = _ref.name, placeholder = _ref.placeholder, align = _ref.align, disabled = _ref.disabled, readOnly = _ref.readOnly, maxLength = _ref.maxLength, clearable = _ref.clearable, clearIcon = _ref.clearIcon, formatTrigger = _ref.formatTrigger, autoFocus = _ref.autoFocus, style = _ref.style, className = _ref.className, plain = _ref.plain, onChange = _ref.onChange, onFocus = _ref.onFocus;
|
|
10003
|
+
var _ref = _object_spread({}, defaultProps$Y, props), focus = _ref.focus, type2 = _ref.type, name2 = _ref.name, placeholder = _ref.placeholder, align = _ref.align, disabled = _ref.disabled, readOnly = _ref.readOnly, maxLength = _ref.maxLength, clearable = _ref.clearable, clearIcon = _ref.clearIcon, formatTrigger = _ref.formatTrigger, autoFocus = _ref.autoFocus, style = _ref.style, className = _ref.className, plain = _ref.plain, inputStyle = _ref.inputStyle, onChange = _ref.onChange, onFocus = _ref.onFocus;
|
|
9992
10004
|
_ref.onBlur;
|
|
9993
10005
|
var onClear = _ref.onClear, formatter = _ref.formatter, onClick = _ref.onClick, confirmType = _ref.confirmType, defaultValue = _ref.defaultValue, _value = _ref.value, rest = _object_without_properties(_ref, [
|
|
9994
10006
|
"focus",
|
|
@@ -10006,6 +10018,7 @@
|
|
|
10006
10018
|
"style",
|
|
10007
10019
|
"className",
|
|
10008
10020
|
"plain",
|
|
10021
|
+
"inputStyle",
|
|
10009
10022
|
"onChange",
|
|
10010
10023
|
"onFocus",
|
|
10011
10024
|
"onBlur",
|
|
@@ -10123,9 +10136,9 @@
|
|
|
10123
10136
|
name: name2,
|
|
10124
10137
|
className: "nut-input-native",
|
|
10125
10138
|
ref: inputRef,
|
|
10126
|
-
style: {
|
|
10139
|
+
style: _object_spread({}, {
|
|
10127
10140
|
textAlign: getTextAlign()
|
|
10128
|
-
},
|
|
10141
|
+
}, inputStyle),
|
|
10129
10142
|
type: inputType(type2),
|
|
10130
10143
|
password: type2 === "password",
|
|
10131
10144
|
maxlength: maxLength,
|
|
@@ -12696,21 +12709,30 @@
|
|
|
12696
12709
|
var icon = props.icon, activeIcon = props.activeIcon;
|
|
12697
12710
|
if (disabled && !checkedStatement) {
|
|
12698
12711
|
return /* @__PURE__ */ React.createElement(IconSVG$t, {
|
|
12699
|
-
className: classNames(color())
|
|
12712
|
+
className: classNames(color()),
|
|
12713
|
+
ariaHidden: true
|
|
12700
12714
|
});
|
|
12701
12715
|
}
|
|
12702
12716
|
if (checkedStatement) {
|
|
12703
12717
|
return /* @__PURE__ */ React.isValidElement(activeIcon) ? /* @__PURE__ */ React.cloneElement(activeIcon, _object_spread_props(_object_spread({}, activeIcon.props), {
|
|
12704
12718
|
className: classNames(activeIcon.props.className, color())
|
|
12705
|
-
})) :
|
|
12706
|
-
|
|
12707
|
-
|
|
12719
|
+
})) : (
|
|
12720
|
+
// @ts-ignore
|
|
12721
|
+
/* @__PURE__ */ React.createElement(IconSVG$u, {
|
|
12722
|
+
className: classNames(color()),
|
|
12723
|
+
ariaHidden: true
|
|
12724
|
+
})
|
|
12725
|
+
);
|
|
12708
12726
|
}
|
|
12709
12727
|
return /* @__PURE__ */ React.isValidElement(icon) ? /* @__PURE__ */ React.cloneElement(icon, _object_spread_props(_object_spread({}, icon.props), {
|
|
12710
12728
|
className: classNames(icon.props.className, color())
|
|
12711
|
-
})) :
|
|
12712
|
-
|
|
12713
|
-
|
|
12729
|
+
})) : (
|
|
12730
|
+
// @ts-ignore
|
|
12731
|
+
/* @__PURE__ */ React.createElement(IconSVG$s, {
|
|
12732
|
+
className: classNames(color()),
|
|
12733
|
+
ariaHidden: true
|
|
12734
|
+
})
|
|
12735
|
+
);
|
|
12714
12736
|
};
|
|
12715
12737
|
var renderLabel = function() {
|
|
12716
12738
|
var labelcls = classNames("".concat(classPrefix2, "-label"), _define_property({}, "".concat(classPrefix2, "-label-disabled"), disabled));
|
|
@@ -17436,7 +17458,8 @@
|
|
|
17436
17458
|
}, /* @__PURE__ */ React.createElement(components.View, {
|
|
17437
17459
|
className: classNames("".concat(classPrefix2, "-inner"), "".concat(classPrefix2, "-").concat(position2), contentClassName, "".concat(classPrefix2, "-inner-").concat(size), "".concat(classPrefix2, "-inner-").concat(wordBreak), _define_property({}, "".concat(classPrefix2, "-inner-descrption"), content2)),
|
|
17438
17460
|
style: _object_spread({}, styles, contentStyle),
|
|
17439
|
-
ariaRole: "alert"
|
|
17461
|
+
ariaRole: "alert",
|
|
17462
|
+
ariaLabel: title + content2
|
|
17440
17463
|
}, renderIcon(), title && /* @__PURE__ */ React.createElement(components.Text, {
|
|
17441
17464
|
className: "".concat(classPrefix2, "-title")
|
|
17442
17465
|
}, title), content2 && (td() ? /* @__PURE__ */ React.createElement(components.Text, {
|