@qn-pandora/pandora-component 4.4.2 → 4.4.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/CHANGELOG.json +17 -0
- package/CHANGELOG.md +8 -1
- package/es/components/InputNumberWithUnit/index.d.ts +2 -0
- package/es/components/InputNumberWithUnit/index.js +2 -2
- package/es/index.css +5917 -5917
- package/es/index.less +12 -12
- package/lib/components/InputNumberWithUnit/index.d.ts +2 -0
- package/lib/components/InputNumberWithUnit/index.js +2 -2
- package/lib/index.css +4218 -4218
- package/lib/index.less +15 -15
- package/package.json +2 -2
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qn-pandora/pandora-component",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "4.4.3",
|
|
6
|
+
"tag": "@qn-pandora/pandora-component_v4.4.3",
|
|
7
|
+
"date": "Fri, 23 Feb 2024 06:02:50 GMT",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "2024-02-23发包"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"dependency": [
|
|
15
|
+
{
|
|
16
|
+
"comment": "Updating dependency \"@qn-pandora/app-sdk\" from `^3.4.2` to `^3.4.3`"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
4
21
|
{
|
|
5
22
|
"version": "4.4.2",
|
|
6
23
|
"tag": "@qn-pandora/pandora-component_v4.4.2",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# Change Log - @qn-pandora/pandora-component
|
|
2
2
|
|
|
3
|
-
This log was last generated on Fri,
|
|
3
|
+
This log was last generated on Fri, 23 Feb 2024 06:02:50 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 4.4.3
|
|
6
|
+
Fri, 23 Feb 2024 06:02:50 GMT
|
|
7
|
+
|
|
8
|
+
### Patches
|
|
9
|
+
|
|
10
|
+
- 2024-02-23发包
|
|
4
11
|
|
|
5
12
|
## 4.4.2
|
|
6
13
|
Fri, 19 Jan 2024 03:09:26 GMT
|
|
@@ -14,6 +14,8 @@ interface IInputNumberWithUnitProps {
|
|
|
14
14
|
[value: string]: string;
|
|
15
15
|
};
|
|
16
16
|
unitWidth?: number;
|
|
17
|
+
min?: number;
|
|
18
|
+
max?: number;
|
|
17
19
|
}
|
|
18
20
|
declare function InputNumberWithUnit(props: IInputNumberWithUnitProps): JSX.Element;
|
|
19
21
|
export default InputNumberWithUnit;
|
|
@@ -26,7 +26,7 @@ var getUnit = function (value) {
|
|
|
26
26
|
return (value === null || value === void 0 ? void 0 : value.replace(/\d+/, '')) || '';
|
|
27
27
|
};
|
|
28
28
|
function InputNumberWithUnit(props) {
|
|
29
|
-
var value = props.value, onChange = props.onChange, onNumberChange = props.onNumberChange, onUnitChange = props.onUnitChange, className = props.className, unitClassName = props.unitClassName, placeholder = props.placeholder, unitOptions = props.unitOptions, _a = props.unitWidth, unitWidth = _a === void 0 ? 86 : _a;
|
|
29
|
+
var value = props.value, onChange = props.onChange, onNumberChange = props.onNumberChange, onUnitChange = props.onUnitChange, className = props.className, unitClassName = props.unitClassName, placeholder = props.placeholder, unitOptions = props.unitOptions, _a = props.unitWidth, unitWidth = _a === void 0 ? 86 : _a, min = props.min, max = props.max;
|
|
30
30
|
var _b = __read(useState(), 2), num = _b[0], setNum = _b[1];
|
|
31
31
|
var _c = __read(useState(), 2), unit = _c[0], setUnit = _c[1];
|
|
32
32
|
var controlled = Object.hasOwnProperty.call(props, 'value');
|
|
@@ -51,6 +51,6 @@ function InputNumberWithUnit(props) {
|
|
|
51
51
|
onUnitChange === null || onUnitChange === void 0 ? void 0 : onUnitChange(unit);
|
|
52
52
|
}, [num, onChange, onUnitChange, controlled, value]);
|
|
53
53
|
var addonAfterNode = (React.createElement(Selector, { options: unitOptions, className: unitClassName, value: controlled ? getUnit(value) : unit, style: { width: unitWidth }, onChange: onSelectorChange }));
|
|
54
|
-
return (React.createElement(InputNumber, { className: SDK_PREFIX + "-input-number-unit " + className, value: controlled ? getNum(value) : num, onChange: onInputChange, placeholder: placeholder, addonAfter: addonAfterNode }));
|
|
54
|
+
return (React.createElement(InputNumber, { className: SDK_PREFIX + "-input-number-unit " + className, value: controlled ? getNum(value) : num, onChange: onInputChange, placeholder: placeholder, addonAfter: addonAfterNode, min: min, max: max }));
|
|
55
55
|
}
|
|
56
56
|
export default InputNumberWithUnit;
|