pixel-priya 1.1.44 → 1.1.46
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/components/ProgressBar/ProgressBar.js +26 -30
- package/lib/components/ProgressBar/ProgressBar.js.map +1 -1
- package/lib/index.cjs +26 -30
- 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/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/options.js +1 -1
- package/package.json +1 -1
package/lib/_virtual/index10.js
CHANGED
package/lib/_virtual/index11.js
CHANGED
|
@@ -22,62 +22,58 @@ 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
|
-
|
|
31
|
-
return value;
|
|
25
|
+
if (unit === 'gb') {
|
|
26
|
+
return value * 1024;
|
|
27
|
+
} else if (unit === 'kb') {
|
|
28
|
+
return value / 1024;
|
|
29
|
+
} else {
|
|
30
|
+
return value;
|
|
32
31
|
}
|
|
33
32
|
};
|
|
34
33
|
let computedProgress = 0;
|
|
35
|
-
let computedLabel = label
|
|
36
|
-
if (totalMemory && usedMemory) {
|
|
34
|
+
let computedLabel = label;
|
|
35
|
+
if (totalMemory !== undefined && usedMemory !== undefined) {
|
|
37
36
|
const usedMB = convertMemoryToMB(usedMemory);
|
|
38
37
|
const totalMB = convertMemoryToMB(totalMemory);
|
|
39
38
|
if (totalMB > 0) {
|
|
40
39
|
computedProgress = usedMB / totalMB * 100;
|
|
40
|
+
computedLabel = label || usedMemory;
|
|
41
41
|
} else {
|
|
42
42
|
computedProgress = 0;
|
|
43
|
+
computedLabel = '0MB';
|
|
43
44
|
}
|
|
44
|
-
} else
|
|
45
|
-
computedProgress = progressPercentage;
|
|
45
|
+
} else {
|
|
46
|
+
computedProgress = progressPercentage || 0;
|
|
46
47
|
}
|
|
48
|
+
// Ensure progress is between 0 and 100
|
|
47
49
|
const validProgress = Math.max(0, Math.min(computedProgress, 100));
|
|
50
|
+
// Bar style for the filled part
|
|
48
51
|
const barStyle = {
|
|
49
52
|
width: `${validProgress}%`,
|
|
50
53
|
backgroundColor: color,
|
|
51
54
|
height: `${height}px`
|
|
52
55
|
};
|
|
56
|
+
// Track style for the empty part of the progress bar
|
|
53
57
|
const trackStyle = {
|
|
54
58
|
backgroundColor: trackColor,
|
|
55
59
|
height: `${height}px`
|
|
56
60
|
};
|
|
57
61
|
return jsxs("div", {
|
|
58
|
-
className: `ff-progress-bar-container ${
|
|
59
|
-
children: [
|
|
60
|
-
className: "ff-progress-bar-label",
|
|
61
|
-
children: jsx(Typography, {
|
|
62
|
-
fontSize: labelFontSize,
|
|
63
|
-
color: labelTextColor,
|
|
64
|
-
children: computedLabel
|
|
65
|
-
})
|
|
66
|
-
}), jsxs("div", {
|
|
62
|
+
className: `ff-progress-bar-container ${computedLabel ? 'ff-has-label' : ''}`,
|
|
63
|
+
children: [jsx("div", {
|
|
67
64
|
className: "ff-progress-bar-track",
|
|
68
65
|
style: trackStyle,
|
|
69
|
-
children:
|
|
66
|
+
children: jsx("div", {
|
|
70
67
|
className: "ff-progress-bar",
|
|
71
|
-
style: barStyle
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
style: {
|
|
68
|
+
style: barStyle,
|
|
69
|
+
children: showPercentage && jsx(Typography, {
|
|
70
|
+
className: "ff-progress-bar-percentage",
|
|
75
71
|
fontSize: percentageFontSize,
|
|
76
|
-
color: percentageTextColor
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
})
|
|
80
|
-
}), jsx(Typography, {
|
|
72
|
+
color: percentageTextColor,
|
|
73
|
+
children: `${Math.round(validProgress)}%`
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
}), computedLabel && jsx(Typography, {
|
|
81
77
|
as: "div",
|
|
82
78
|
className: "ff-progress-bar-label",
|
|
83
79
|
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","undefined","usedMB","totalMB","validProgress","Math","max","min","barStyle","width","backgroundColor","trackStyle","_jsxs","className","children","_jsx","style","Typography","fontSize","round","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,GAAG,EAAE;AAClBC,EAAAA,cAAc,GAAG,kCAAkC;AACnDC,EAAAA,cAAc,GAAG,KAAK;AACtBC,EAAAA,kBAAkB,GAAG,EAAE;AACvBC,EAAAA,mBAAmB,GAAG;AACvB,CAAA,KAAI;EAEH,MAAMC,iBA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}
|
package/lib/index.cjs
CHANGED
|
@@ -43629,62 +43629,58 @@ 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
|
-
|
|
43638
|
-
return value;
|
|
43632
|
+
if (unit === 'gb') {
|
|
43633
|
+
return value * 1024;
|
|
43634
|
+
} else if (unit === 'kb') {
|
|
43635
|
+
return value / 1024;
|
|
43636
|
+
} else {
|
|
43637
|
+
return value;
|
|
43639
43638
|
}
|
|
43640
43639
|
};
|
|
43641
43640
|
let computedProgress = 0;
|
|
43642
|
-
let computedLabel = label
|
|
43643
|
-
if (totalMemory && usedMemory) {
|
|
43641
|
+
let computedLabel = label;
|
|
43642
|
+
if (totalMemory !== undefined && usedMemory !== undefined) {
|
|
43644
43643
|
const usedMB = convertMemoryToMB(usedMemory);
|
|
43645
43644
|
const totalMB = convertMemoryToMB(totalMemory);
|
|
43646
43645
|
if (totalMB > 0) {
|
|
43647
43646
|
computedProgress = usedMB / totalMB * 100;
|
|
43647
|
+
computedLabel = label || usedMemory;
|
|
43648
43648
|
} else {
|
|
43649
43649
|
computedProgress = 0;
|
|
43650
|
+
computedLabel = '0MB';
|
|
43650
43651
|
}
|
|
43651
|
-
} else
|
|
43652
|
-
computedProgress = progressPercentage;
|
|
43652
|
+
} else {
|
|
43653
|
+
computedProgress = progressPercentage || 0;
|
|
43653
43654
|
}
|
|
43655
|
+
// Ensure progress is between 0 and 100
|
|
43654
43656
|
const validProgress = Math.max(0, Math.min(computedProgress, 100));
|
|
43657
|
+
// Bar style for the filled part
|
|
43655
43658
|
const barStyle = {
|
|
43656
43659
|
width: `${validProgress}%`,
|
|
43657
43660
|
backgroundColor: color,
|
|
43658
43661
|
height: `${height}px`
|
|
43659
43662
|
};
|
|
43663
|
+
// Track style for the empty part of the progress bar
|
|
43660
43664
|
const trackStyle = {
|
|
43661
43665
|
backgroundColor: trackColor,
|
|
43662
43666
|
height: `${height}px`
|
|
43663
43667
|
};
|
|
43664
43668
|
return jsxRuntime.jsxs("div", {
|
|
43665
|
-
className: `ff-progress-bar-container ${
|
|
43666
|
-
children: [
|
|
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", {
|
|
43669
|
+
className: `ff-progress-bar-container ${computedLabel ? 'ff-has-label' : ''}`,
|
|
43670
|
+
children: [jsxRuntime.jsx("div", {
|
|
43674
43671
|
className: "ff-progress-bar-track",
|
|
43675
43672
|
style: trackStyle,
|
|
43676
|
-
children:
|
|
43673
|
+
children: jsxRuntime.jsx("div", {
|
|
43677
43674
|
className: "ff-progress-bar",
|
|
43678
|
-
style: barStyle
|
|
43679
|
-
|
|
43680
|
-
|
|
43681
|
-
style: {
|
|
43675
|
+
style: barStyle,
|
|
43676
|
+
children: showPercentage && jsxRuntime.jsx(Typography, {
|
|
43677
|
+
className: "ff-progress-bar-percentage",
|
|
43682
43678
|
fontSize: percentageFontSize,
|
|
43683
|
-
color: percentageTextColor
|
|
43684
|
-
|
|
43685
|
-
|
|
43686
|
-
})
|
|
43687
|
-
}), jsxRuntime.jsx(Typography, {
|
|
43679
|
+
color: percentageTextColor,
|
|
43680
|
+
children: `${Math.round(validProgress)}%`
|
|
43681
|
+
})
|
|
43682
|
+
})
|
|
43683
|
+
}), computedLabel && jsxRuntime.jsx(Typography, {
|
|
43688
43684
|
as: "div",
|
|
43689
43685
|
className: "ff-progress-bar-label",
|
|
43690
43686
|
fontSize: labelFontSize,
|