@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.
- package/dist/rabex-ui.cjs.development.js +15 -1
- package/dist/rabex-ui.cjs.development.js.map +1 -1
- package/dist/rabex-ui.cjs.production.min.js +1 -1
- package/dist/rabex-ui.cjs.production.min.js.map +1 -1
- package/dist/rabex-ui.esm.js +15 -1
- package/dist/rabex-ui.esm.js.map +1 -1
- package/dist/utils/numberUtils.d.ts +1 -0
- package/package.json +1 -1
@@ -477,6 +477,17 @@ var _isDecimalValid = function isDecimalValid(val, dec) {
|
|
477
477
|
var stringVal = val.toString();
|
478
478
|
return stringVal.indexOf('.') >= 0 ? !(stringVal.split('.')[1].length > dec) : true;
|
479
479
|
};
|
480
|
+
/**
|
481
|
+
* Prevent Scientific Notation
|
482
|
+
*/
|
483
|
+
var _preventScientific = function preventScientific(num, digits, separator) {
|
484
|
+
var numString = typeof num === 'number' ? num.toString() : num;
|
485
|
+
// Check for scientific notation
|
486
|
+
if (numString.toLowerCase().includes('e')) {
|
487
|
+
return bigDecimal.getPrettyValue(numString, digits, separator);
|
488
|
+
}
|
489
|
+
return numString;
|
490
|
+
};
|
480
491
|
var numberUtils = {
|
481
492
|
delimiter: function delimiter(num, separator, separateBy) {
|
482
493
|
return _delimiter(num, separator, separateBy);
|
@@ -496,6 +507,9 @@ var numberUtils = {
|
|
496
507
|
toEn: function toEn(val) {
|
497
508
|
return _toEn(val);
|
498
509
|
},
|
510
|
+
preventScientific: function preventScientific(num) {
|
511
|
+
return _preventScientific(num);
|
512
|
+
},
|
499
513
|
suffix: suffix,
|
500
514
|
bigDecimal: bigDecimal,
|
501
515
|
modulus: bigDecimal.modulus,
|
@@ -2482,7 +2496,7 @@ var components = {
|
|
2482
2496
|
ownerState = _ref2.ownerState;
|
2483
2497
|
var color = (ownerState === null || ownerState === void 0 ? void 0 : ownerState.color) || 'primary';
|
2484
2498
|
var primaryColor = palette.primary[500] || palette[color].A100;
|
2485
|
-
var textColor = palette.
|
2499
|
+
var textColor = palette.textColor[50] || palette[color].A0;
|
2486
2500
|
var disableBackgroundColor = palette.primary[400] || palette[color].A60;
|
2487
2501
|
return {
|
2488
2502
|
// backgroundColor: palette[color].A100,
|