mytek-components 2.1.9 → 2.1.11
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/main.es.js +14 -2
- package/dist/main.es.js.map +1 -1
- package/dist/main.umd.js +14 -2
- package/dist/main.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/main.es.js
CHANGED
|
@@ -14261,6 +14261,16 @@ const CustomInput = ({
|
|
|
14261
14261
|
validate(formatted);
|
|
14262
14262
|
setAmountInWords(numberToWords(rawValue, format));
|
|
14263
14263
|
break;
|
|
14264
|
+
case "number":
|
|
14265
|
+
val = val.replace(/\D/g, "");
|
|
14266
|
+
if (maxLength) {
|
|
14267
|
+
val = val.slice(0, maxLength);
|
|
14268
|
+
}
|
|
14269
|
+
onChange(name, val);
|
|
14270
|
+
if (minLength && val.length < minLength) {
|
|
14271
|
+
validate(val);
|
|
14272
|
+
}
|
|
14273
|
+
break;
|
|
14264
14274
|
case "number1":
|
|
14265
14275
|
val = val.replace(/\D/g, "").slice(4, 8);
|
|
14266
14276
|
onChange(name, val);
|
|
@@ -14478,7 +14488,9 @@ const CustomInput = ({
|
|
|
14478
14488
|
},
|
|
14479
14489
|
min: minValue,
|
|
14480
14490
|
max: maxValue,
|
|
14481
|
-
step: stepValue
|
|
14491
|
+
step: stepValue,
|
|
14492
|
+
maxLength,
|
|
14493
|
+
minLength
|
|
14482
14494
|
}
|
|
14483
14495
|
),
|
|
14484
14496
|
suffix && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "px-2 bg-white text-gray-700 border-l border-[#3B5AA1]", children: suffix }),
|
|
@@ -15824,7 +15836,7 @@ function DynamicTabs({
|
|
|
15824
15836
|
}) {
|
|
15825
15837
|
const [value, setValue] = useState(tabIndex || defaultValue);
|
|
15826
15838
|
useEffect(() => {
|
|
15827
|
-
const setUpVal = tabs.length - 1 >= tabIndex ? tabIndex : tabs.length - 1;
|
|
15839
|
+
const setUpVal = tabs.length === 0 ? 0 : tabs.length - 1 >= tabIndex ? tabIndex : tabs.length - 1;
|
|
15828
15840
|
setValue(setUpVal);
|
|
15829
15841
|
}, [tabIndex]);
|
|
15830
15842
|
const handleChange = (event, newValue) => {
|