myshell-react-lib 0.2.35 → 0.2.37
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/index.cjs +10 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -22
- package/dist/index.d.ts +2 -22
- package/dist/index.js +10 -16
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.cjs
CHANGED
|
@@ -9706,9 +9706,6 @@ function getPercent(value1, total) {
|
|
|
9706
9706
|
if (total === 0) return 0;
|
|
9707
9707
|
return value1 / total * 100;
|
|
9708
9708
|
}
|
|
9709
|
-
function clamp2(value1, min3, max2) {
|
|
9710
|
-
return Math.min(Math.max(value1, min3), max2);
|
|
9711
|
-
}
|
|
9712
9709
|
function isClient() {
|
|
9713
9710
|
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
9714
9711
|
}
|
|
@@ -13859,26 +13856,23 @@ var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
|
13859
13856
|
var ProgressRoot = ProgressPrimitive.Root;
|
|
13860
13857
|
var ProgressIndicator = ProgressPrimitive.Indicator;
|
|
13861
13858
|
var Progress = function(param) {
|
|
13862
|
-
var value1 = param.value, max2 = param.max, className = param.className, indicatorClassName = param.indicatorClassName,
|
|
13863
|
-
var
|
|
13859
|
+
var value1 = param.value, max2 = param.max, className = param.className, indicatorClassName = param.indicatorClassName, children = param.children;
|
|
13860
|
+
var maxValue = Math.max(value1, max2);
|
|
13861
|
+
var percentage = Math.min(value1 / maxValue * 100, 100);
|
|
13864
13862
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(ProgressPrimitive.Root, {
|
|
13865
13863
|
value: value1,
|
|
13866
|
-
max:
|
|
13867
|
-
className: cn("relative overflow-hidden", className),
|
|
13868
|
-
style: {
|
|
13869
|
-
height: "".concat(height, "px"),
|
|
13870
|
-
width: widthValue
|
|
13871
|
-
},
|
|
13864
|
+
max: maxValue,
|
|
13865
|
+
className: cn("relative overflow-hidden w-auto", className),
|
|
13872
13866
|
children: [
|
|
13873
13867
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ProgressPrimitive.Indicator, {
|
|
13874
|
-
className: cn("h-full transition-all", indicatorClassName),
|
|
13868
|
+
className: cn("h-full transition-all absolute inset-0", indicatorClassName),
|
|
13875
13869
|
style: {
|
|
13876
|
-
width: "".concat(
|
|
13870
|
+
width: "".concat(percentage, "%")
|
|
13877
13871
|
}
|
|
13878
13872
|
}),
|
|
13879
|
-
|
|
13880
|
-
className:
|
|
13881
|
-
children:
|
|
13873
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", {
|
|
13874
|
+
className: "z-10 h-full w-full",
|
|
13875
|
+
children: children
|
|
13882
13876
|
})
|
|
13883
13877
|
]
|
|
13884
13878
|
});
|