assui 3.1.23 → 3.1.25
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/es/step-number-input/index.d.ts +1 -0
- package/es/step-number-input/index.js +10 -8
- package/es/step-number-input/style/index.css +2 -0
- package/es/step-number-input/style/index.less +2 -0
- package/lib/step-number-input/index.d.ts +1 -0
- package/lib/step-number-input/index.js +10 -8
- package/lib/step-number-input/style/index.css +2 -0
- package/lib/step-number-input/style/index.less +2 -0
- package/package.json +3 -3
|
@@ -65,7 +65,8 @@ var StepNumberInput = function StepNumberInput(props) {
|
|
|
65
65
|
step = props.step,
|
|
66
66
|
max = props.max,
|
|
67
67
|
min = props.min,
|
|
68
|
-
|
|
68
|
+
disabled = props.disabled,
|
|
69
|
+
restProps = __rest(props, ["onChange", "onBlur", "numberType", "precision", "step", "max", "min", "disabled"]);
|
|
69
70
|
var isEmpty = isUndefined(value) || value === '';
|
|
70
71
|
var plusNumber = new BigNumber(value).plus(step).toString();
|
|
71
72
|
var minusNumber = new BigNumber(value).minus(step).toString();
|
|
@@ -106,26 +107,27 @@ var StepNumberInput = function StepNumberInput(props) {
|
|
|
106
107
|
className: "number-range-input"
|
|
107
108
|
}, /*#__PURE__*/React.createElement(NumberInput, __assign({
|
|
108
109
|
addonBefore: /*#__PURE__*/React.createElement("span", {
|
|
109
|
-
onClick: function
|
|
110
|
-
onClickCount(MINUS);
|
|
110
|
+
onClick: disabled ? undefined : function () {
|
|
111
|
+
return onClickCount(MINUS);
|
|
111
112
|
},
|
|
112
113
|
className: classNames('count-minus-btn', {
|
|
113
|
-
'disabled-btn': isEmpty || minCondition
|
|
114
|
+
'disabled-btn': isEmpty || minCondition || disabled
|
|
114
115
|
})
|
|
115
116
|
}, "-"),
|
|
116
117
|
addonAfter: /*#__PURE__*/React.createElement("span", {
|
|
117
|
-
onClick: function
|
|
118
|
-
onClickCount(PLUS);
|
|
118
|
+
onClick: disabled ? undefined : function () {
|
|
119
|
+
return onClickCount(PLUS);
|
|
119
120
|
},
|
|
120
121
|
className: classNames('count-add-btn', {
|
|
121
|
-
'disabled-btn': isEmpty || maxCondition
|
|
122
|
+
'disabled-btn': isEmpty || maxCondition || disabled
|
|
122
123
|
})
|
|
123
124
|
}, "+"),
|
|
124
125
|
value: "".concat(value),
|
|
125
126
|
onChange: onNumberChange,
|
|
126
127
|
onBlur: onNumberBlur,
|
|
127
128
|
numberType: numberType,
|
|
128
|
-
precision: precision
|
|
129
|
+
precision: precision,
|
|
130
|
+
disabled: disabled
|
|
129
131
|
}, restProps)));
|
|
130
132
|
};
|
|
131
133
|
StepNumberInput.defaultProps = {
|
|
@@ -108,7 +108,8 @@ var StepNumberInput = function StepNumberInput(props) {
|
|
|
108
108
|
step = props.step,
|
|
109
109
|
max = props.max,
|
|
110
110
|
min = props.min,
|
|
111
|
-
|
|
111
|
+
disabled = props.disabled,
|
|
112
|
+
restProps = __rest(props, ["onChange", "onBlur", "numberType", "precision", "step", "max", "min", "disabled"]);
|
|
112
113
|
var isEmpty = (0, isUndefined_1["default"])(value) || value === '';
|
|
113
114
|
var plusNumber = new bignumber_js_1["default"](value).plus(step).toString();
|
|
114
115
|
var minusNumber = new bignumber_js_1["default"](value).minus(step).toString();
|
|
@@ -149,26 +150,27 @@ var StepNumberInput = function StepNumberInput(props) {
|
|
|
149
150
|
className: "number-range-input"
|
|
150
151
|
}, React.createElement(number_input_1["default"], __assign({
|
|
151
152
|
addonBefore: React.createElement("span", {
|
|
152
|
-
onClick: function
|
|
153
|
-
onClickCount(countType_1.MINUS);
|
|
153
|
+
onClick: disabled ? undefined : function () {
|
|
154
|
+
return onClickCount(countType_1.MINUS);
|
|
154
155
|
},
|
|
155
156
|
className: (0, classnames_1["default"])('count-minus-btn', {
|
|
156
|
-
'disabled-btn': isEmpty || minCondition
|
|
157
|
+
'disabled-btn': isEmpty || minCondition || disabled
|
|
157
158
|
})
|
|
158
159
|
}, "-"),
|
|
159
160
|
addonAfter: React.createElement("span", {
|
|
160
|
-
onClick: function
|
|
161
|
-
onClickCount(countType_1.PLUS);
|
|
161
|
+
onClick: disabled ? undefined : function () {
|
|
162
|
+
return onClickCount(countType_1.PLUS);
|
|
162
163
|
},
|
|
163
164
|
className: (0, classnames_1["default"])('count-add-btn', {
|
|
164
|
-
'disabled-btn': isEmpty || maxCondition
|
|
165
|
+
'disabled-btn': isEmpty || maxCondition || disabled
|
|
165
166
|
})
|
|
166
167
|
}, "+"),
|
|
167
168
|
value: "".concat(value),
|
|
168
169
|
onChange: onNumberChange,
|
|
169
170
|
onBlur: onNumberBlur,
|
|
170
171
|
numberType: numberType,
|
|
171
|
-
precision: precision
|
|
172
|
+
precision: precision,
|
|
173
|
+
disabled: disabled
|
|
172
174
|
}, restProps)));
|
|
173
175
|
};
|
|
174
176
|
StepNumberInput.defaultProps = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assui",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.25",
|
|
4
4
|
"description": "react ui library",
|
|
5
5
|
"author": "jason <usochen@gmail.com>",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@types/react-beautiful-dnd": "^13.1.2",
|
|
36
36
|
"@types/react-color": "^3.0.6",
|
|
37
37
|
"@types/react-resizable": "^3.0.0",
|
|
38
|
-
"a-icons": "^1.1.
|
|
38
|
+
"a-icons": "^1.1.52",
|
|
39
39
|
"aa-utils": "^2.1.18",
|
|
40
40
|
"ahooks": "^3.0.8",
|
|
41
41
|
"bignumber.js": "^9.0.1",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"node": ">=10.0.0"
|
|
81
81
|
},
|
|
82
82
|
"license": "MIT",
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "06ab81778621575a1d0a2dd7e041932108a8fc8b"
|
|
84
84
|
}
|