assui 3.1.92 → 3.1.94
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.js +11 -7
- package/es/step-number-input/style/index.css +9 -19
- package/es/step-number-input/style/index.less +5 -7
- package/es/style/variables.less +0 -1
- package/lib/step-number-input/index.js +11 -7
- package/lib/step-number-input/style/index.css +9 -19
- package/lib/step-number-input/style/index.less +5 -7
- package/lib/style/variables.less +0 -1
- package/package.json +2 -2
|
@@ -75,6 +75,8 @@ var StepNumberInput = function StepNumberInput(props) {
|
|
|
75
75
|
// ===================== Disabled =====================
|
|
76
76
|
var disabled = React.useContext(DisabledContext);
|
|
77
77
|
var mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
|
|
78
|
+
var minusDisabled = isEmpty || minCondition || mergedDisabled;
|
|
79
|
+
var addDisabled = isEmpty || maxCondition || mergedDisabled;
|
|
78
80
|
var onNumberChange = function onNumberChange(lastValue) {
|
|
79
81
|
if (value !== lastValue) {
|
|
80
82
|
setValue(lastValue);
|
|
@@ -107,21 +109,23 @@ var StepNumberInput = function StepNumberInput(props) {
|
|
|
107
109
|
onBlur === null || onBlur === void 0 ? void 0 : onBlur(resultValue);
|
|
108
110
|
};
|
|
109
111
|
return /*#__PURE__*/React.createElement("div", {
|
|
110
|
-
className:
|
|
111
|
-
'number-range-input-disabled': isEmpty || minCondition || mergedDisabled
|
|
112
|
-
})
|
|
112
|
+
className: "number-range-input"
|
|
113
113
|
}, /*#__PURE__*/React.createElement(NumberInput, __assign({
|
|
114
114
|
addonBefore: /*#__PURE__*/React.createElement("span", {
|
|
115
|
-
onClick:
|
|
115
|
+
onClick: minusDisabled ? undefined : function () {
|
|
116
116
|
return onClickCount(MINUS);
|
|
117
117
|
},
|
|
118
|
-
className:
|
|
118
|
+
className: classNames('count-minus-btn', {
|
|
119
|
+
'disabled-btn': minusDisabled
|
|
120
|
+
})
|
|
119
121
|
}, "-"),
|
|
120
122
|
addonAfter: /*#__PURE__*/React.createElement("span", {
|
|
121
|
-
onClick:
|
|
123
|
+
onClick: addDisabled ? undefined : function () {
|
|
122
124
|
return onClickCount(PLUS);
|
|
123
125
|
},
|
|
124
|
-
className:
|
|
126
|
+
className: classNames('count-add-btn', {
|
|
127
|
+
'disabled-btn': addDisabled
|
|
128
|
+
})
|
|
125
129
|
}, "+"),
|
|
126
130
|
value: "".concat(value),
|
|
127
131
|
onChange: onNumberChange,
|
|
@@ -1252,7 +1252,7 @@ html {
|
|
|
1252
1252
|
.count-minus-btn:active,
|
|
1253
1253
|
.count-minus-btn:focus-within {
|
|
1254
1254
|
color: #fff;
|
|
1255
|
-
background-color: #
|
|
1255
|
+
background-color: #40a9ff;
|
|
1256
1256
|
cursor: pointer;
|
|
1257
1257
|
}
|
|
1258
1258
|
.count-add-btn {
|
|
@@ -1265,25 +1265,15 @@ html {
|
|
|
1265
1265
|
.count-add-btn:active,
|
|
1266
1266
|
.count-add-btn:focus-within {
|
|
1267
1267
|
color: #fff;
|
|
1268
|
-
background-color: #
|
|
1268
|
+
background-color: #40a9ff;
|
|
1269
1269
|
cursor: pointer;
|
|
1270
1270
|
}
|
|
1271
|
-
.
|
|
1272
|
-
.
|
|
1273
|
-
.
|
|
1274
|
-
.
|
|
1275
|
-
.
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
.number-range-input-disabled .ant-input-group-addon > .count-minus-btn:focus,
|
|
1279
|
-
.number-range-input-disabled .ant-input-group-addon > .count-add-btn:focus,
|
|
1280
|
-
.number-range-input-disabled .ant-input-group-addon:active,
|
|
1281
|
-
.number-range-input-disabled .ant-input-group-addon > .count-minus-btn:active,
|
|
1282
|
-
.number-range-input-disabled .ant-input-group-addon > .count-add-btn:active,
|
|
1283
|
-
.number-range-input-disabled .ant-input-group-addon:focus-within,
|
|
1284
|
-
.number-range-input-disabled .ant-input-group-addon > .count-minus-btn:focus-within,
|
|
1285
|
-
.number-range-input-disabled .ant-input-group-addon > .count-add-btn:focus-within {
|
|
1286
|
-
color: rgba(0, 0, 0, 0.25) !important;
|
|
1287
|
-
background-color: #f5f5f5 !important;
|
|
1271
|
+
.disabled-btn,
|
|
1272
|
+
.disabled-btn:hover,
|
|
1273
|
+
.disabled-btn:focus,
|
|
1274
|
+
.disabled-btn:active,
|
|
1275
|
+
.disabled-btn:focus-within {
|
|
1276
|
+
color: rgba(0, 0, 0, 0.25);
|
|
1277
|
+
background-color: #f5f5f5;
|
|
1288
1278
|
cursor: not-allowed;
|
|
1289
1279
|
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
&:active,
|
|
24
24
|
&:focus-within {
|
|
25
25
|
color: @white;
|
|
26
|
-
background-color: @
|
|
26
|
+
background-color: @primary-color-hover;
|
|
27
27
|
cursor: pointer;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -38,21 +38,19 @@
|
|
|
38
38
|
&:active,
|
|
39
39
|
&:focus-within {
|
|
40
40
|
color: @white;
|
|
41
|
-
background-color: @
|
|
41
|
+
background-color: @primary-color-hover;
|
|
42
42
|
cursor: pointer;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.
|
|
47
|
-
.number-range-input-disabled .@{ant-prefix}-input-group-addon > .count-minus-btn,
|
|
48
|
-
.number-range-input-disabled .@{ant-prefix}-input-group-addon > .count-add-btn {
|
|
46
|
+
.disabled-btn {
|
|
49
47
|
&,
|
|
50
48
|
&:hover,
|
|
51
49
|
&:focus,
|
|
52
50
|
&:active,
|
|
53
51
|
&:focus-within {
|
|
54
|
-
color:
|
|
55
|
-
background-color: @
|
|
52
|
+
color: @disabled-color;
|
|
53
|
+
background-color: @disabled-bg;
|
|
56
54
|
cursor: not-allowed;
|
|
57
55
|
}
|
|
58
56
|
}
|
package/es/style/variables.less
CHANGED
|
@@ -116,6 +116,8 @@ var StepNumberInput = function StepNumberInput(props) {
|
|
|
116
116
|
// ===================== Disabled =====================
|
|
117
117
|
var disabled = React.useContext(DisabledContext_1["default"]);
|
|
118
118
|
var mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
|
|
119
|
+
var minusDisabled = isEmpty || minCondition || mergedDisabled;
|
|
120
|
+
var addDisabled = isEmpty || maxCondition || mergedDisabled;
|
|
119
121
|
var onNumberChange = function onNumberChange(lastValue) {
|
|
120
122
|
if (value !== lastValue) {
|
|
121
123
|
setValue(lastValue);
|
|
@@ -148,21 +150,23 @@ var StepNumberInput = function StepNumberInput(props) {
|
|
|
148
150
|
onBlur === null || onBlur === void 0 ? void 0 : onBlur(resultValue);
|
|
149
151
|
};
|
|
150
152
|
return React.createElement("div", {
|
|
151
|
-
className:
|
|
152
|
-
'number-range-input-disabled': isEmpty || minCondition || mergedDisabled
|
|
153
|
-
})
|
|
153
|
+
className: "number-range-input"
|
|
154
154
|
}, React.createElement(number_input_1["default"], __assign({
|
|
155
155
|
addonBefore: React.createElement("span", {
|
|
156
|
-
onClick:
|
|
156
|
+
onClick: minusDisabled ? undefined : function () {
|
|
157
157
|
return onClickCount(countType_1.MINUS);
|
|
158
158
|
},
|
|
159
|
-
className: "count-minus-btn
|
|
159
|
+
className: (0, classnames_1["default"])('count-minus-btn', {
|
|
160
|
+
'disabled-btn': minusDisabled
|
|
161
|
+
})
|
|
160
162
|
}, "-"),
|
|
161
163
|
addonAfter: React.createElement("span", {
|
|
162
|
-
onClick:
|
|
164
|
+
onClick: addDisabled ? undefined : function () {
|
|
163
165
|
return onClickCount(countType_1.PLUS);
|
|
164
166
|
},
|
|
165
|
-
className: "count-add-btn
|
|
167
|
+
className: (0, classnames_1["default"])('count-add-btn', {
|
|
168
|
+
'disabled-btn': addDisabled
|
|
169
|
+
})
|
|
166
170
|
}, "+"),
|
|
167
171
|
value: "".concat(value),
|
|
168
172
|
onChange: onNumberChange,
|
|
@@ -1252,7 +1252,7 @@ html {
|
|
|
1252
1252
|
.count-minus-btn:active,
|
|
1253
1253
|
.count-minus-btn:focus-within {
|
|
1254
1254
|
color: #fff;
|
|
1255
|
-
background-color: #
|
|
1255
|
+
background-color: #40a9ff;
|
|
1256
1256
|
cursor: pointer;
|
|
1257
1257
|
}
|
|
1258
1258
|
.count-add-btn {
|
|
@@ -1265,25 +1265,15 @@ html {
|
|
|
1265
1265
|
.count-add-btn:active,
|
|
1266
1266
|
.count-add-btn:focus-within {
|
|
1267
1267
|
color: #fff;
|
|
1268
|
-
background-color: #
|
|
1268
|
+
background-color: #40a9ff;
|
|
1269
1269
|
cursor: pointer;
|
|
1270
1270
|
}
|
|
1271
|
-
.
|
|
1272
|
-
.
|
|
1273
|
-
.
|
|
1274
|
-
.
|
|
1275
|
-
.
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
.number-range-input-disabled .ant-input-group-addon > .count-minus-btn:focus,
|
|
1279
|
-
.number-range-input-disabled .ant-input-group-addon > .count-add-btn:focus,
|
|
1280
|
-
.number-range-input-disabled .ant-input-group-addon:active,
|
|
1281
|
-
.number-range-input-disabled .ant-input-group-addon > .count-minus-btn:active,
|
|
1282
|
-
.number-range-input-disabled .ant-input-group-addon > .count-add-btn:active,
|
|
1283
|
-
.number-range-input-disabled .ant-input-group-addon:focus-within,
|
|
1284
|
-
.number-range-input-disabled .ant-input-group-addon > .count-minus-btn:focus-within,
|
|
1285
|
-
.number-range-input-disabled .ant-input-group-addon > .count-add-btn:focus-within {
|
|
1286
|
-
color: rgba(0, 0, 0, 0.25) !important;
|
|
1287
|
-
background-color: #f5f5f5 !important;
|
|
1271
|
+
.disabled-btn,
|
|
1272
|
+
.disabled-btn:hover,
|
|
1273
|
+
.disabled-btn:focus,
|
|
1274
|
+
.disabled-btn:active,
|
|
1275
|
+
.disabled-btn:focus-within {
|
|
1276
|
+
color: rgba(0, 0, 0, 0.25);
|
|
1277
|
+
background-color: #f5f5f5;
|
|
1288
1278
|
cursor: not-allowed;
|
|
1289
1279
|
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
&:active,
|
|
24
24
|
&:focus-within {
|
|
25
25
|
color: @white;
|
|
26
|
-
background-color: @
|
|
26
|
+
background-color: @primary-color-hover;
|
|
27
27
|
cursor: pointer;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -38,21 +38,19 @@
|
|
|
38
38
|
&:active,
|
|
39
39
|
&:focus-within {
|
|
40
40
|
color: @white;
|
|
41
|
-
background-color: @
|
|
41
|
+
background-color: @primary-color-hover;
|
|
42
42
|
cursor: pointer;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.
|
|
47
|
-
.number-range-input-disabled .@{ant-prefix}-input-group-addon > .count-minus-btn,
|
|
48
|
-
.number-range-input-disabled .@{ant-prefix}-input-group-addon > .count-add-btn {
|
|
46
|
+
.disabled-btn {
|
|
49
47
|
&,
|
|
50
48
|
&:hover,
|
|
51
49
|
&:focus,
|
|
52
50
|
&:active,
|
|
53
51
|
&:focus-within {
|
|
54
|
-
color:
|
|
55
|
-
background-color: @
|
|
52
|
+
color: @disabled-color;
|
|
53
|
+
background-color: @disabled-bg;
|
|
56
54
|
cursor: not-allowed;
|
|
57
55
|
}
|
|
58
56
|
}
|
package/lib/style/variables.less
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assui",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.94",
|
|
4
4
|
"description": "react ui library",
|
|
5
5
|
"author": "jason <usochen@gmail.com>",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"node": ">=10.0.0"
|
|
83
83
|
},
|
|
84
84
|
"license": "MIT",
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "d198d60c48d733f0ac6894c202a6f67981ae533d"
|
|
86
86
|
}
|