@sinco/react 1.1.2-rc.61 → 1.1.2-rc.62
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/index.esm.js
CHANGED
@@ -14458,21 +14458,12 @@ const useProgress = (initialProgress, timeProgress, shouldDecrease, lote) => {
|
|
14458
14458
|
useEffect(() => {
|
14459
14459
|
const interval = setInterval(() => {
|
14460
14460
|
setProgress(prev => {
|
14461
|
-
if (shouldDecrease) {
|
14462
|
-
|
14463
|
-
|
14464
|
-
return prev;
|
14465
|
-
}
|
14466
|
-
const nextProgress = lote ? prev - lote : prev - 1;
|
14467
|
-
return nextProgress < 0 ? 0 : nextProgress;
|
14468
|
-
} else {
|
14469
|
-
if (prev >= 100) {
|
14470
|
-
clearInterval(interval);
|
14471
|
-
return prev;
|
14472
|
-
}
|
14473
|
-
const nextProgress = lote ? prev + lote : prev + 1;
|
14474
|
-
return nextProgress > 100 ? 100 : nextProgress;
|
14461
|
+
if (shouldDecrease && prev <= 0 || !shouldDecrease && prev >= 100) {
|
14462
|
+
clearInterval(interval);
|
14463
|
+
return prev;
|
14475
14464
|
}
|
14465
|
+
const nextProgress = shouldDecrease ? lote ? prev - lote : prev - 1 : lote ? prev + lote : prev + 1;
|
14466
|
+
return shouldDecrease ? Math.max(nextProgress, 0) : Math.min(nextProgress, 100);
|
14476
14467
|
});
|
14477
14468
|
}, timeProgress * 10);
|
14478
14469
|
return () => {
|
@@ -14662,9 +14653,6 @@ const PageHeader = ({
|
|
14662
14653
|
|
14663
14654
|
var spinnerSinco = "6b9c10915ea2b5ed.gif";
|
14664
14655
|
|
14665
|
-
const progressGif = {
|
14666
|
-
gif: spinnerSinco
|
14667
|
-
};
|
14668
14656
|
const ProgressSinco = ({
|
14669
14657
|
time,
|
14670
14658
|
variant: _variant = 'indeterminate',
|
@@ -14702,8 +14690,8 @@ const ProgressSinco = ({
|
|
14702
14690
|
height: 60,
|
14703
14691
|
justifyContent: 'center'
|
14704
14692
|
}, /*#__PURE__*/React__default.createElement("img", {
|
14705
|
-
src:
|
14706
|
-
alt:
|
14693
|
+
src: spinnerSinco,
|
14694
|
+
alt: spinnerSinco
|
14707
14695
|
}))), _text && ( /*#__PURE__*/React__default.createElement(Typography$1, {
|
14708
14696
|
variant: "body2",
|
14709
14697
|
color: 'text.secondary'
|
package/package.json
CHANGED
File without changes
|