@rabex-kit/rabex-ui 0.1.7 → 0.1.9

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.
@@ -472,6 +472,17 @@ var _isDecimalValid = function isDecimalValid(val, dec) {
472
472
  var stringVal = val.toString();
473
473
  return stringVal.indexOf('.') >= 0 ? !(stringVal.split('.')[1].length > dec) : true;
474
474
  };
475
+ /**
476
+ * Prevent Scientific Notation
477
+ */
478
+ var _preventScientific = function preventScientific(num, digits, separator) {
479
+ var numString = typeof num === 'number' ? num.toString() : num;
480
+ // Check for scientific notation
481
+ if (numString.toLowerCase().includes('e')) {
482
+ return bigDecimal.getPrettyValue(numString, digits, separator);
483
+ }
484
+ return numString;
485
+ };
475
486
  var numberUtils = {
476
487
  delimiter: function delimiter(num, separator, separateBy) {
477
488
  return _delimiter(num, separator, separateBy);
@@ -491,6 +502,9 @@ var numberUtils = {
491
502
  toEn: function toEn(val) {
492
503
  return _toEn(val);
493
504
  },
505
+ preventScientific: function preventScientific(num) {
506
+ return _preventScientific(num);
507
+ },
494
508
  suffix: suffix,
495
509
  bigDecimal: bigDecimal,
496
510
  modulus: bigDecimal.modulus,
@@ -2477,7 +2491,7 @@ var components = {
2477
2491
  ownerState = _ref2.ownerState;
2478
2492
  var color = (ownerState === null || ownerState === void 0 ? void 0 : ownerState.color) || 'primary';
2479
2493
  var primaryColor = palette.primary[500] || palette[color].A100;
2480
- var textColor = palette.text[50] || palette[color].A0;
2494
+ var textColor = palette.textColor[50] || palette[color].A0;
2481
2495
  var disableBackgroundColor = palette.primary[400] || palette[color].A60;
2482
2496
  return {
2483
2497
  // backgroundColor: palette[color].A100,