myshell-react-lib 0.2.35 → 0.2.36
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.d.cts
CHANGED
|
@@ -922,32 +922,12 @@ type ProgressProps = {
|
|
|
922
922
|
* 进度条指示器的自定义类名
|
|
923
923
|
*/
|
|
924
924
|
indicatorClassName?: string;
|
|
925
|
-
/**
|
|
926
|
-
* 进度条的标签内容
|
|
927
|
-
*/
|
|
928
|
-
label?: React.ReactNode;
|
|
929
|
-
/**
|
|
930
|
-
* 进度条的高度
|
|
931
|
-
*/
|
|
932
|
-
height?: number;
|
|
933
|
-
/**
|
|
934
|
-
* 进度条的宽度
|
|
935
|
-
*/
|
|
936
|
-
width?: number;
|
|
937
|
-
/**
|
|
938
|
-
* 进度条最小宽度
|
|
939
|
-
*/
|
|
940
|
-
minWidth?: number;
|
|
941
|
-
/**
|
|
942
|
-
* 进度条最大宽度
|
|
943
|
-
*/
|
|
944
|
-
maxWidth?: number;
|
|
945
925
|
/**
|
|
946
926
|
* 进度条标签的自定义类名
|
|
947
927
|
*/
|
|
948
|
-
|
|
928
|
+
children?: React.ReactNode;
|
|
949
929
|
};
|
|
950
|
-
declare const Progress: ({ value, max, className, indicatorClassName,
|
|
930
|
+
declare const Progress: ({ value, max, className, indicatorClassName, children, }: ProgressProps) => react_jsx_runtime.JSX.Element;
|
|
951
931
|
|
|
952
932
|
declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
953
933
|
declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
package/dist/index.d.ts
CHANGED
|
@@ -922,32 +922,12 @@ type ProgressProps = {
|
|
|
922
922
|
* 进度条指示器的自定义类名
|
|
923
923
|
*/
|
|
924
924
|
indicatorClassName?: string;
|
|
925
|
-
/**
|
|
926
|
-
* 进度条的标签内容
|
|
927
|
-
*/
|
|
928
|
-
label?: React.ReactNode;
|
|
929
|
-
/**
|
|
930
|
-
* 进度条的高度
|
|
931
|
-
*/
|
|
932
|
-
height?: number;
|
|
933
|
-
/**
|
|
934
|
-
* 进度条的宽度
|
|
935
|
-
*/
|
|
936
|
-
width?: number;
|
|
937
|
-
/**
|
|
938
|
-
* 进度条最小宽度
|
|
939
|
-
*/
|
|
940
|
-
minWidth?: number;
|
|
941
|
-
/**
|
|
942
|
-
* 进度条最大宽度
|
|
943
|
-
*/
|
|
944
|
-
maxWidth?: number;
|
|
945
925
|
/**
|
|
946
926
|
* 进度条标签的自定义类名
|
|
947
927
|
*/
|
|
948
|
-
|
|
928
|
+
children?: React.ReactNode;
|
|
949
929
|
};
|
|
950
|
-
declare const Progress: ({ value, max, className, indicatorClassName,
|
|
930
|
+
declare const Progress: ({ value, max, className, indicatorClassName, children, }: ProgressProps) => react_jsx_runtime.JSX.Element;
|
|
951
931
|
|
|
952
932
|
declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
953
933
|
declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
package/dist/index.js
CHANGED
|
@@ -8914,9 +8914,6 @@ function getPercent(value1, total) {
|
|
|
8914
8914
|
if (total === 0) return 0;
|
|
8915
8915
|
return value1 / total * 100;
|
|
8916
8916
|
}
|
|
8917
|
-
function clamp2(value1, min3, max2) {
|
|
8918
|
-
return Math.min(Math.max(value1, min3), max2);
|
|
8919
|
-
}
|
|
8920
8917
|
function isClient() {
|
|
8921
8918
|
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
8922
8919
|
}
|
|
@@ -13067,26 +13064,23 @@ import { jsx as jsx46, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
|
13067
13064
|
var ProgressRoot = ProgressPrimitive.Root;
|
|
13068
13065
|
var ProgressIndicator = ProgressPrimitive.Indicator;
|
|
13069
13066
|
var Progress = function(param) {
|
|
13070
|
-
var value1 = param.value, max2 = param.max, className = param.className, indicatorClassName = param.indicatorClassName,
|
|
13071
|
-
var
|
|
13067
|
+
var value1 = param.value, max2 = param.max, className = param.className, indicatorClassName = param.indicatorClassName, children = param.children;
|
|
13068
|
+
var maxValue = Math.max(value1, max2);
|
|
13069
|
+
var percentage = Math.min(value1 / maxValue * 100, 100);
|
|
13072
13070
|
return /* @__PURE__ */ jsxs29(ProgressPrimitive.Root, {
|
|
13073
13071
|
value: value1,
|
|
13074
|
-
max:
|
|
13075
|
-
className: cn("relative overflow-hidden", className),
|
|
13076
|
-
style: {
|
|
13077
|
-
height: "".concat(height, "px"),
|
|
13078
|
-
width: widthValue
|
|
13079
|
-
},
|
|
13072
|
+
max: maxValue,
|
|
13073
|
+
className: cn("relative overflow-hidden w-auto", className),
|
|
13080
13074
|
children: [
|
|
13081
13075
|
/* @__PURE__ */ jsx46(ProgressPrimitive.Indicator, {
|
|
13082
|
-
className: cn("h-full transition-all", indicatorClassName),
|
|
13076
|
+
className: cn("h-full transition-all absolute inset-0", indicatorClassName),
|
|
13083
13077
|
style: {
|
|
13084
|
-
width: "".concat(
|
|
13078
|
+
width: "".concat(percentage, "%")
|
|
13085
13079
|
}
|
|
13086
13080
|
}),
|
|
13087
|
-
|
|
13088
|
-
className:
|
|
13089
|
-
children:
|
|
13081
|
+
/* @__PURE__ */ jsx46("div", {
|
|
13082
|
+
className: "z-10 h-full w-full",
|
|
13083
|
+
children: children
|
|
13090
13084
|
})
|
|
13091
13085
|
]
|
|
13092
13086
|
});
|