intelicoreact 2.0.6 → 2.0.7

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/index.cjs CHANGED
@@ -3265,6 +3265,7 @@ function useInputValueProcessing({
3265
3265
  const { trimStart, trimEnd, characters } = blurTrim || {};
3266
3266
  const isUseBitDepthPoints = Boolean(onlyNumbers) && isPriceInput;
3267
3267
  const isPseudoPasswordMode = type === "pseudoPassword";
3268
+ const bitDepthSettings = typeof onlyNumbers === "object" && onlyNumbers !== null ? onlyNumbers : void 0;
3268
3269
  const correctMinMax = (value2, correctionType) => {
3269
3270
  if (!onlyNumbers) return value2;
3270
3271
  const { min, max, isOnlyPositive, isNoEmptyValues } = getIsOnlyAnObject2(
@@ -3276,14 +3277,14 @@ function useInputValueProcessing({
3276
3277
  let inputValue = getSafelyValue(value2);
3277
3278
  const checkMin = () => {
3278
3279
  if (!inputValue && isNoEmptyValues) {
3279
- inputValue = minimum !== void 0 ? minimum : "0";
3280
- } else if (inputValue && !Number.isNaN(Number(minimum)) && Number(minimum) > Number((minusSymbol ?? "") + inputValue)) {
3281
- inputValue = minimum;
3280
+ inputValue = minimum !== void 0 ? String(minimum) : "0";
3281
+ } else if (inputValue && minimum !== void 0 && !Number.isNaN(Number(minimum)) && Number(minimum) > Number((minusSymbol ?? "") + inputValue)) {
3282
+ inputValue = String(minimum);
3282
3283
  }
3283
3284
  };
3284
3285
  const checkMax = () => {
3285
- if (!Number.isNaN(Number(maximum)) && Number(maximum) < Number((minusSymbol ?? "") + inputValue)) {
3286
- inputValue = maximum;
3286
+ if (maximum !== void 0 && !Number.isNaN(Number(maximum)) && Number(maximum) < Number((minusSymbol ?? "") + inputValue)) {
3287
+ inputValue = String(maximum);
3287
3288
  minusSymbol = null;
3288
3289
  }
3289
3290
  };
@@ -3292,7 +3293,7 @@ function useInputValueProcessing({
3292
3293
  minusSymbol = "-";
3293
3294
  inputValue = inputValue.slice(1);
3294
3295
  }
3295
- inputValue = filterNumeric(inputValue, onlyNumbers);
3296
+ inputValue = filterNumeric(inputValue, bitDepthSettings);
3296
3297
  switch (correctionType) {
3297
3298
  case "min":
3298
3299
  checkMin();
@@ -3390,7 +3391,7 @@ function useInputValueProcessing({
3390
3391
  if (typeof onlyNumbers === "object" && onlyNumbers?.isNoEmptyValues)
3391
3392
  safelyValue = correctMinMax(safelyValue, "min");
3392
3393
  if (isUseBitDepthPoints)
3393
- safelyValue = formatToAddBitDepthPoints(safelyValue, onlyNumbers);
3394
+ safelyValue = formatToAddBitDepthPoints(safelyValue, bitDepthSettings);
3394
3395
  return safelyValue;
3395
3396
  })();
3396
3397
  return {