pixel-priya 1.1.43 → 1.1.45
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/lib/_virtual/index10.js +2 -2
- package/lib/_virtual/index11.js +2 -2
- package/lib/_virtual/index9.js +2 -2
- package/lib/components/ProgressBar/ProgressBar.js +28 -24
- package/lib/components/ProgressBar/ProgressBar.js.map +1 -1
- package/lib/index.cjs +28 -24
- package/lib/index.cjs.map +1 -1
- package/lib/node_modules/js-beautify/js/src/css/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/css/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/css/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/tokenizer.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/tokenizer.js +1 -1
- package/package.json +1 -1
package/lib/_virtual/index10.js
CHANGED
package/lib/_virtual/index11.js
CHANGED
package/lib/_virtual/index9.js
CHANGED
|
@@ -22,58 +22,62 @@ const ProgressBar = ({
|
|
|
22
22
|
if (!match || !match[1]) return 0;
|
|
23
23
|
const value = parseFloat(match[1]);
|
|
24
24
|
const unit = match[2];
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
switch (unit) {
|
|
26
|
+
case 'gb':
|
|
27
|
+
return value * 1024;
|
|
28
|
+
case 'kb':
|
|
29
|
+
return value / 1024;
|
|
30
|
+
default:
|
|
31
|
+
return value;
|
|
31
32
|
}
|
|
32
33
|
};
|
|
33
34
|
let computedProgress = 0;
|
|
34
|
-
let computedLabel = label;
|
|
35
|
-
if (totalMemory
|
|
35
|
+
let computedLabel = label || usedMemory || '0MB';
|
|
36
|
+
if (totalMemory && usedMemory) {
|
|
36
37
|
const usedMB = convertMemoryToMB(usedMemory);
|
|
37
38
|
const totalMB = convertMemoryToMB(totalMemory);
|
|
38
39
|
if (totalMB > 0) {
|
|
39
40
|
computedProgress = usedMB / totalMB * 100;
|
|
40
|
-
computedLabel = label || usedMemory;
|
|
41
41
|
} else {
|
|
42
42
|
computedProgress = 0;
|
|
43
|
-
computedLabel = '0MB';
|
|
44
43
|
}
|
|
45
|
-
} else {
|
|
46
|
-
computedProgress = progressPercentage
|
|
44
|
+
} else if (progressPercentage !== undefined) {
|
|
45
|
+
computedProgress = progressPercentage;
|
|
47
46
|
}
|
|
48
|
-
// Ensure progress is between 0 and 100
|
|
49
47
|
const validProgress = Math.max(0, Math.min(computedProgress, 100));
|
|
50
|
-
// Bar style for the filled part
|
|
51
48
|
const barStyle = {
|
|
52
49
|
width: `${validProgress}%`,
|
|
53
50
|
backgroundColor: color,
|
|
54
51
|
height: `${height}px`
|
|
55
52
|
};
|
|
56
|
-
// Track style for the empty part of the progress bar
|
|
57
53
|
const trackStyle = {
|
|
58
54
|
backgroundColor: trackColor,
|
|
59
55
|
height: `${height}px`
|
|
60
56
|
};
|
|
61
|
-
console.log('kjdiwjdjhw');
|
|
62
57
|
return jsxs("div", {
|
|
63
|
-
className: `ff-progress-bar-container ${
|
|
64
|
-
children: [
|
|
58
|
+
className: `ff-progress-bar-container ${label ? 'ff-has-label' : ''}`,
|
|
59
|
+
children: [label && jsx("div", {
|
|
60
|
+
className: "ff-progress-bar-label",
|
|
61
|
+
children: jsx(Typography, {
|
|
62
|
+
fontSize: labelFontSize,
|
|
63
|
+
color: labelTextColor,
|
|
64
|
+
children: computedLabel
|
|
65
|
+
})
|
|
66
|
+
}), jsxs("div", {
|
|
65
67
|
className: "ff-progress-bar-track",
|
|
66
68
|
style: trackStyle,
|
|
67
69
|
children: [jsx("div", {
|
|
68
70
|
className: "ff-progress-bar",
|
|
69
71
|
style: barStyle
|
|
70
|
-
}), showPercentage &&
|
|
72
|
+
}), showPercentage && jsxs("div", {
|
|
71
73
|
className: "ff-progress-bar-percentage",
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
style: {
|
|
75
|
+
fontSize: percentageFontSize,
|
|
76
|
+
color: percentageTextColor
|
|
77
|
+
},
|
|
78
|
+
children: [validProgress.toFixed(0), "%"]
|
|
79
|
+
})]
|
|
80
|
+
}), jsx(Typography, {
|
|
77
81
|
as: "div",
|
|
78
82
|
className: "ff-progress-bar-label",
|
|
79
83
|
fontSize: labelFontSize,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","sources":["../../../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":[null],"names":["ProgressBar","progressPercentage","totalMemory","usedMemory","color","trackColor","height","label","labelFontSize","labelTextColor","showPercentage","percentageFontSize","percentageTextColor","convertMemoryToMB","memory","trimmed","trim","toLowerCase","match","value","parseFloat","unit","computedProgress","computedLabel","
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sources":["../../../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":[null],"names":["ProgressBar","progressPercentage","totalMemory","usedMemory","color","trackColor","height","label","labelFontSize","labelTextColor","showPercentage","percentageFontSize","percentageTextColor","convertMemoryToMB","memory","trimmed","trim","toLowerCase","match","value","parseFloat","unit","computedProgress","computedLabel","usedMB","totalMB","undefined","validProgress","Math","max","min","barStyle","width","backgroundColor","trackStyle","_jsxs","className","children","_jsx","Typography","fontSize","style","toFixed","as"],"mappings":";;;AAKMA,MAAAA,WAAW,GAA+BA,CAAC;EAC/CC,kBAAkB;EAClBC,WAAW;EACXC,UAAU;AACVC,EAAAA,KAAK,GAAG,oBAAoB;AAC5BC,EAAAA,UAAU,GAAG,SAAS;AACtBC,EAAAA,MAAM,GAAG,EAAE;EACXC,KAAK;AACLC,EAAAA,aAAa,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CK,QAAAA,KAAK,EAAE;AAAED,UAAAA,QAAQ,EAAE7B,kBAAkB;AAAEP,UAAAA,KAAK,EAAEQ;SAAqB;QAElEyB,QAAA,EAAA,CAAAV,aAAa,CAACe,OAAO,CAAC,CAAC,CAAC,EAAA,GAAA;AAAA,OAAA,CAE5B;AAAA,KAAA,CACG,EAEJJ,GAAA,CAACC,UAAU,EAAA;AACTI,MAAAA,EAAE,EAAC,KAAK;AACRP,MAAAA,SAAS,EAAC,uBAAuB;AACjCI,MAAAA,QAAQ,EAAEhC,aAAa;AACvBJ,MAAAA,KAAK,EAAEK,cAAc;AAEpB4B,MAAAA,QAAA,EAAAd;AACU,KAAA,CACd;AACG,GAAA,CAAA;AAEV;;;;"}
|
package/lib/index.cjs
CHANGED
|
@@ -43629,58 +43629,62 @@ const ProgressBar = ({
|
|
|
43629
43629
|
if (!match || !match[1]) return 0;
|
|
43630
43630
|
const value = parseFloat(match[1]);
|
|
43631
43631
|
const unit = match[2];
|
|
43632
|
-
|
|
43633
|
-
|
|
43634
|
-
|
|
43635
|
-
|
|
43636
|
-
|
|
43637
|
-
|
|
43632
|
+
switch (unit) {
|
|
43633
|
+
case 'gb':
|
|
43634
|
+
return value * 1024;
|
|
43635
|
+
case 'kb':
|
|
43636
|
+
return value / 1024;
|
|
43637
|
+
default:
|
|
43638
|
+
return value;
|
|
43638
43639
|
}
|
|
43639
43640
|
};
|
|
43640
43641
|
let computedProgress = 0;
|
|
43641
|
-
let computedLabel = label;
|
|
43642
|
-
if (totalMemory
|
|
43642
|
+
let computedLabel = label || usedMemory || '0MB';
|
|
43643
|
+
if (totalMemory && usedMemory) {
|
|
43643
43644
|
const usedMB = convertMemoryToMB(usedMemory);
|
|
43644
43645
|
const totalMB = convertMemoryToMB(totalMemory);
|
|
43645
43646
|
if (totalMB > 0) {
|
|
43646
43647
|
computedProgress = usedMB / totalMB * 100;
|
|
43647
|
-
computedLabel = label || usedMemory;
|
|
43648
43648
|
} else {
|
|
43649
43649
|
computedProgress = 0;
|
|
43650
|
-
computedLabel = '0MB';
|
|
43651
43650
|
}
|
|
43652
|
-
} else {
|
|
43653
|
-
computedProgress = progressPercentage
|
|
43651
|
+
} else if (progressPercentage !== undefined) {
|
|
43652
|
+
computedProgress = progressPercentage;
|
|
43654
43653
|
}
|
|
43655
|
-
// Ensure progress is between 0 and 100
|
|
43656
43654
|
const validProgress = Math.max(0, Math.min(computedProgress, 100));
|
|
43657
|
-
// Bar style for the filled part
|
|
43658
43655
|
const barStyle = {
|
|
43659
43656
|
width: `${validProgress}%`,
|
|
43660
43657
|
backgroundColor: color,
|
|
43661
43658
|
height: `${height}px`
|
|
43662
43659
|
};
|
|
43663
|
-
// Track style for the empty part of the progress bar
|
|
43664
43660
|
const trackStyle = {
|
|
43665
43661
|
backgroundColor: trackColor,
|
|
43666
43662
|
height: `${height}px`
|
|
43667
43663
|
};
|
|
43668
|
-
console.log('kjdiwjdjhw');
|
|
43669
43664
|
return jsxRuntime.jsxs("div", {
|
|
43670
|
-
className: `ff-progress-bar-container ${
|
|
43671
|
-
children: [jsxRuntime.
|
|
43665
|
+
className: `ff-progress-bar-container ${label ? 'ff-has-label' : ''}`,
|
|
43666
|
+
children: [label && jsxRuntime.jsx("div", {
|
|
43667
|
+
className: "ff-progress-bar-label",
|
|
43668
|
+
children: jsxRuntime.jsx(Typography, {
|
|
43669
|
+
fontSize: labelFontSize,
|
|
43670
|
+
color: labelTextColor,
|
|
43671
|
+
children: computedLabel
|
|
43672
|
+
})
|
|
43673
|
+
}), jsxRuntime.jsxs("div", {
|
|
43672
43674
|
className: "ff-progress-bar-track",
|
|
43673
43675
|
style: trackStyle,
|
|
43674
43676
|
children: [jsxRuntime.jsx("div", {
|
|
43675
43677
|
className: "ff-progress-bar",
|
|
43676
43678
|
style: barStyle
|
|
43677
|
-
}), showPercentage && jsxRuntime.
|
|
43679
|
+
}), showPercentage && jsxRuntime.jsxs("div", {
|
|
43678
43680
|
className: "ff-progress-bar-percentage",
|
|
43679
|
-
|
|
43680
|
-
|
|
43681
|
-
|
|
43682
|
-
|
|
43683
|
-
|
|
43681
|
+
style: {
|
|
43682
|
+
fontSize: percentageFontSize,
|
|
43683
|
+
color: percentageTextColor
|
|
43684
|
+
},
|
|
43685
|
+
children: [validProgress.toFixed(0), "%"]
|
|
43686
|
+
})]
|
|
43687
|
+
}), jsxRuntime.jsx(Typography, {
|
|
43684
43688
|
as: "div",
|
|
43685
43689
|
className: "ff-progress-bar-label",
|
|
43686
43690
|
fontSize: labelFontSize,
|