premium-react-loaders 1.0.0
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/LICENSE +21 -0
- package/README.md +375 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/progress/ProgressBar.d.ts +15 -0
- package/dist/components/progress/ProgressBar.d.ts.map +1 -0
- package/dist/components/progress/ProgressCircle.d.ts +15 -0
- package/dist/components/progress/ProgressCircle.d.ts.map +1 -0
- package/dist/components/progress/ProgressRing.d.ts +15 -0
- package/dist/components/progress/ProgressRing.d.ts.map +1 -0
- package/dist/components/progress/index.d.ts +4 -0
- package/dist/components/progress/index.d.ts.map +1 -0
- package/dist/components/pulse/PulseBars.d.ts +14 -0
- package/dist/components/pulse/PulseBars.d.ts.map +1 -0
- package/dist/components/pulse/PulseDots.d.ts +14 -0
- package/dist/components/pulse/PulseDots.d.ts.map +1 -0
- package/dist/components/pulse/PulseWave.d.ts +14 -0
- package/dist/components/pulse/PulseWave.d.ts.map +1 -0
- package/dist/components/pulse/index.d.ts +4 -0
- package/dist/components/pulse/index.d.ts.map +1 -0
- package/dist/components/skeleton/Skeleton.d.ts +15 -0
- package/dist/components/skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/skeleton/SkeletonAvatar.d.ts +14 -0
- package/dist/components/skeleton/SkeletonAvatar.d.ts.map +1 -0
- package/dist/components/skeleton/SkeletonCard.d.ts +15 -0
- package/dist/components/skeleton/SkeletonCard.d.ts.map +1 -0
- package/dist/components/skeleton/SkeletonImage.d.ts +14 -0
- package/dist/components/skeleton/SkeletonImage.d.ts.map +1 -0
- package/dist/components/skeleton/SkeletonList.d.ts +14 -0
- package/dist/components/skeleton/SkeletonList.d.ts.map +1 -0
- package/dist/components/skeleton/SkeletonTable.d.ts +14 -0
- package/dist/components/skeleton/SkeletonTable.d.ts.map +1 -0
- package/dist/components/skeleton/SkeletonText.d.ts +14 -0
- package/dist/components/skeleton/SkeletonText.d.ts.map +1 -0
- package/dist/components/skeleton/index.d.ts +8 -0
- package/dist/components/skeleton/index.d.ts.map +1 -0
- package/dist/components/spinner/SpinnerBars.d.ts +14 -0
- package/dist/components/spinner/SpinnerBars.d.ts.map +1 -0
- package/dist/components/spinner/SpinnerCircle.d.ts +14 -0
- package/dist/components/spinner/SpinnerCircle.d.ts.map +1 -0
- package/dist/components/spinner/SpinnerDots.d.ts +14 -0
- package/dist/components/spinner/SpinnerDots.d.ts.map +1 -0
- package/dist/components/spinner/SpinnerGrid.d.ts +14 -0
- package/dist/components/spinner/SpinnerGrid.d.ts.map +1 -0
- package/dist/components/spinner/SpinnerRing.d.ts +14 -0
- package/dist/components/spinner/SpinnerRing.d.ts.map +1 -0
- package/dist/components/spinner/index.d.ts +6 -0
- package/dist/components/spinner/index.d.ts.map +1 -0
- package/dist/index.cjs +47 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/dist/index10.cjs +58 -0
- package/dist/index10.cjs.map +1 -0
- package/dist/index10.js +58 -0
- package/dist/index10.js.map +1 -0
- package/dist/index11.cjs +55 -0
- package/dist/index11.cjs.map +1 -0
- package/dist/index11.js +55 -0
- package/dist/index11.js.map +1 -0
- package/dist/index12.cjs +63 -0
- package/dist/index12.cjs.map +1 -0
- package/dist/index12.js +63 -0
- package/dist/index12.js.map +1 -0
- package/dist/index13.cjs +51 -0
- package/dist/index13.cjs.map +1 -0
- package/dist/index13.js +51 -0
- package/dist/index13.js.map +1 -0
- package/dist/index14.cjs +74 -0
- package/dist/index14.cjs.map +1 -0
- package/dist/index14.js +74 -0
- package/dist/index14.js.map +1 -0
- package/dist/index15.cjs +58 -0
- package/dist/index15.cjs.map +1 -0
- package/dist/index15.js +58 -0
- package/dist/index15.js.map +1 -0
- package/dist/index16.cjs +71 -0
- package/dist/index16.cjs.map +1 -0
- package/dist/index16.js +71 -0
- package/dist/index16.js.map +1 -0
- package/dist/index17.cjs +81 -0
- package/dist/index17.cjs.map +1 -0
- package/dist/index17.js +81 -0
- package/dist/index17.js.map +1 -0
- package/dist/index18.cjs +107 -0
- package/dist/index18.cjs.map +1 -0
- package/dist/index18.js +107 -0
- package/dist/index18.js.map +1 -0
- package/dist/index19.cjs +113 -0
- package/dist/index19.cjs.map +1 -0
- package/dist/index19.js +113 -0
- package/dist/index19.js.map +1 -0
- package/dist/index20.cjs +57 -0
- package/dist/index20.cjs.map +1 -0
- package/dist/index20.js +57 -0
- package/dist/index20.js.map +1 -0
- package/dist/index21.cjs +62 -0
- package/dist/index21.cjs.map +1 -0
- package/dist/index21.js +62 -0
- package/dist/index21.js.map +1 -0
- package/dist/index22.cjs +64 -0
- package/dist/index22.cjs.map +1 -0
- package/dist/index22.js +64 -0
- package/dist/index22.js.map +1 -0
- package/dist/index23.cjs +18 -0
- package/dist/index23.cjs.map +1 -0
- package/dist/index23.js +18 -0
- package/dist/index23.js.map +1 -0
- package/dist/index3.cjs +8 -0
- package/dist/index3.cjs.map +1 -0
- package/dist/index3.js +8 -0
- package/dist/index3.js.map +1 -0
- package/dist/index4.cjs +22 -0
- package/dist/index4.cjs.map +1 -0
- package/dist/index4.js +22 -0
- package/dist/index4.js.map +1 -0
- package/dist/index5.cjs +65 -0
- package/dist/index5.cjs.map +1 -0
- package/dist/index5.js +65 -0
- package/dist/index5.js.map +1 -0
- package/dist/index6.cjs +59 -0
- package/dist/index6.cjs.map +1 -0
- package/dist/index6.js +59 -0
- package/dist/index6.js.map +1 -0
- package/dist/index7.cjs +43 -0
- package/dist/index7.cjs.map +1 -0
- package/dist/index7.js +43 -0
- package/dist/index7.js.map +1 -0
- package/dist/index8.cjs +47 -0
- package/dist/index8.cjs.map +1 -0
- package/dist/index8.js +47 -0
- package/dist/index8.js.map +1 -0
- package/dist/index9.cjs +77 -0
- package/dist/index9.cjs.map +1 -0
- package/dist/index9.js +77 -0
- package/dist/index9.js.map +1 -0
- package/dist/premium-react-loaders.css +701 -0
- package/dist/types/common.d.ts +65 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/progress.d.ts +25 -0
- package/dist/types/progress.d.ts.map +1 -0
- package/dist/types/pulse.d.ts +25 -0
- package/dist/types/pulse.d.ts.map +1 -0
- package/dist/types/skeleton.d.ts +71 -0
- package/dist/types/skeleton.d.ts.map +1 -0
- package/dist/types/spinner.d.ts +39 -0
- package/dist/types/spinner.d.ts.map +1 -0
- package/dist/utils/classNames.d.ts +14 -0
- package/dist/utils/classNames.d.ts.map +1 -0
- package/dist/utils/colors.d.ts +25 -0
- package/dist/utils/colors.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +89 -0
package/dist/index17.cjs
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const react = require("react");
|
|
5
|
+
const colors = require("./index4.cjs");
|
|
6
|
+
const classNames = require("./index3.cjs");
|
|
7
|
+
const ProgressBar = react.forwardRef(
|
|
8
|
+
({
|
|
9
|
+
value = 0,
|
|
10
|
+
indeterminate = false,
|
|
11
|
+
showValue = false,
|
|
12
|
+
height = "0.5rem",
|
|
13
|
+
color = "#3b82f6",
|
|
14
|
+
secondaryColor = "#e0e0e0",
|
|
15
|
+
className,
|
|
16
|
+
style,
|
|
17
|
+
testId = "progress-bar",
|
|
18
|
+
visible = true,
|
|
19
|
+
ariaLabel,
|
|
20
|
+
...rest
|
|
21
|
+
}, ref) => {
|
|
22
|
+
if (!visible) return null;
|
|
23
|
+
const clampedValue = Math.min(100, Math.max(0, value));
|
|
24
|
+
const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
|
|
25
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
ref,
|
|
29
|
+
"data-testid": testId,
|
|
30
|
+
className: classNames.cn("relative w-full overflow-hidden rounded-full", className),
|
|
31
|
+
style: {
|
|
32
|
+
height: colors.normalizeSize(height),
|
|
33
|
+
backgroundColor: secondaryColor,
|
|
34
|
+
...style
|
|
35
|
+
},
|
|
36
|
+
role: "progressbar",
|
|
37
|
+
"aria-label": progressLabel,
|
|
38
|
+
"aria-valuenow": indeterminate ? void 0 : clampedValue,
|
|
39
|
+
"aria-valuemin": 0,
|
|
40
|
+
"aria-valuemax": 100,
|
|
41
|
+
...rest,
|
|
42
|
+
children: [
|
|
43
|
+
indeterminate ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
className: "absolute h-full rounded-full",
|
|
47
|
+
style: {
|
|
48
|
+
backgroundColor: color,
|
|
49
|
+
animation: "progress-indeterminate 1.5s ease-in-out infinite",
|
|
50
|
+
width: "40%"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
className: "h-full rounded-full transition-all duration-300 ease-in-out",
|
|
57
|
+
style: {
|
|
58
|
+
width: `${clampedValue}%`,
|
|
59
|
+
backgroundColor: color
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
showValue && !indeterminate && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
64
|
+
"span",
|
|
65
|
+
{
|
|
66
|
+
className: "absolute inset-0 flex items-center justify-center text-xs font-medium",
|
|
67
|
+
style: { color: clampedValue > 50 ? "white" : color },
|
|
68
|
+
children: [
|
|
69
|
+
clampedValue,
|
|
70
|
+
"%"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
ProgressBar.displayName = "ProgressBar";
|
|
80
|
+
exports.ProgressBar = ProgressBar;
|
|
81
|
+
//# sourceMappingURL=index17.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index17.cjs","sources":["../src/components/progress/ProgressBar.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { ProgressBarProps } from '../../types';\nimport { cn, normalizeSize } from '../../utils';\n\n/**\n * ProgressBar - Linear progress bar\n *\n * A horizontal progress bar that can be determinate (showing specific progress) or indeterminate (loading animation).\n *\n * @example\n * ```tsx\n * <ProgressBar value={75} showValue />\n * <ProgressBar indeterminate />\n * <ProgressBar value={50} height={8} color=\"#8b5cf6\" />\n * ```\n */\nexport const ProgressBar = forwardRef<HTMLDivElement, ProgressBarProps>(\n (\n {\n value = 0,\n indeterminate = false,\n showValue = false,\n height = '0.5rem',\n color = '#3b82f6',\n secondaryColor = '#e0e0e0',\n className,\n style,\n testId = 'progress-bar',\n visible = true,\n ariaLabel,\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const clampedValue = Math.min(100, Math.max(0, value));\n const progressLabel = ariaLabel || `Loading ${clampedValue}%`;\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('relative w-full overflow-hidden rounded-full', className)}\n style={{\n height: normalizeSize(height),\n backgroundColor: secondaryColor,\n ...style,\n }}\n role=\"progressbar\"\n aria-label={progressLabel}\n aria-valuenow={indeterminate ? undefined : clampedValue}\n aria-valuemin={0}\n aria-valuemax={100}\n {...rest}\n >\n {indeterminate ? (\n <div\n className=\"absolute h-full rounded-full\"\n style={{\n backgroundColor: color,\n animation: 'progress-indeterminate 1.5s ease-in-out infinite',\n width: '40%',\n }}\n />\n ) : (\n <div\n className=\"h-full rounded-full transition-all duration-300 ease-in-out\"\n style={{\n width: `${clampedValue}%`,\n backgroundColor: color,\n }}\n />\n )}\n {showValue && !indeterminate && (\n <span\n className=\"absolute inset-0 flex items-center justify-center text-xs font-medium\"\n style={{ color: clampedValue > 50 ? 'white' : color }}\n >\n {clampedValue}%\n </span>\n )}\n </div>\n );\n }\n);\n\nProgressBar.displayName = 'ProgressBar';\n"],"names":["forwardRef","jsxs","cn","normalizeSize","jsx"],"mappings":";;;;;;AAgBO,MAAM,cAAcA,MAAAA;AAAAA,EACzB,CACE;AAAA,IACE,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,iBAAiB;AAAA,IACjB;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,QAAI,CAAC,QAAS,QAAO;AAErB,UAAM,eAAe,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC;AACrD,UAAM,gBAAgB,aAAa,WAAW,YAAY;AAE1D,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAWC,WAAAA,GAAG,gDAAgD,SAAS;AAAA,QACvE,OAAO;AAAA,UACL,QAAQC,OAAAA,cAAc,MAAM;AAAA,UAC5B,iBAAiB;AAAA,UACjB,GAAG;AAAA,QAAA;AAAA,QAEL,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,iBAAe,gBAAgB,SAAY;AAAA,QAC3C,iBAAe;AAAA,QACf,iBAAe;AAAA,QACd,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,gBACCC,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO;AAAA,gBACL,iBAAiB;AAAA,gBACjB,WAAW;AAAA,gBACX,OAAO;AAAA,cAAA;AAAA,YACT;AAAA,UAAA,IAGFA,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO;AAAA,gBACL,OAAO,GAAG,YAAY;AAAA,gBACtB,iBAAiB;AAAA,cAAA;AAAA,YACnB;AAAA,UAAA;AAAA,UAGH,aAAa,CAAC,iBACbH,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO,EAAE,OAAO,eAAe,KAAK,UAAU,MAAA;AAAA,cAE7C,UAAA;AAAA,gBAAA;AAAA,gBAAa;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAChB;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,YAAY,cAAc;;"}
|
package/dist/index17.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { normalizeSize } from "./index4.js";
|
|
4
|
+
import { cn } from "./index3.js";
|
|
5
|
+
const ProgressBar = forwardRef(
|
|
6
|
+
({
|
|
7
|
+
value = 0,
|
|
8
|
+
indeterminate = false,
|
|
9
|
+
showValue = false,
|
|
10
|
+
height = "0.5rem",
|
|
11
|
+
color = "#3b82f6",
|
|
12
|
+
secondaryColor = "#e0e0e0",
|
|
13
|
+
className,
|
|
14
|
+
style,
|
|
15
|
+
testId = "progress-bar",
|
|
16
|
+
visible = true,
|
|
17
|
+
ariaLabel,
|
|
18
|
+
...rest
|
|
19
|
+
}, ref) => {
|
|
20
|
+
if (!visible) return null;
|
|
21
|
+
const clampedValue = Math.min(100, Math.max(0, value));
|
|
22
|
+
const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
|
|
23
|
+
return /* @__PURE__ */ jsxs(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
ref,
|
|
27
|
+
"data-testid": testId,
|
|
28
|
+
className: cn("relative w-full overflow-hidden rounded-full", className),
|
|
29
|
+
style: {
|
|
30
|
+
height: normalizeSize(height),
|
|
31
|
+
backgroundColor: secondaryColor,
|
|
32
|
+
...style
|
|
33
|
+
},
|
|
34
|
+
role: "progressbar",
|
|
35
|
+
"aria-label": progressLabel,
|
|
36
|
+
"aria-valuenow": indeterminate ? void 0 : clampedValue,
|
|
37
|
+
"aria-valuemin": 0,
|
|
38
|
+
"aria-valuemax": 100,
|
|
39
|
+
...rest,
|
|
40
|
+
children: [
|
|
41
|
+
indeterminate ? /* @__PURE__ */ jsx(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
className: "absolute h-full rounded-full",
|
|
45
|
+
style: {
|
|
46
|
+
backgroundColor: color,
|
|
47
|
+
animation: "progress-indeterminate 1.5s ease-in-out infinite",
|
|
48
|
+
width: "40%"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
) : /* @__PURE__ */ jsx(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
className: "h-full rounded-full transition-all duration-300 ease-in-out",
|
|
55
|
+
style: {
|
|
56
|
+
width: `${clampedValue}%`,
|
|
57
|
+
backgroundColor: color
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
showValue && !indeterminate && /* @__PURE__ */ jsxs(
|
|
62
|
+
"span",
|
|
63
|
+
{
|
|
64
|
+
className: "absolute inset-0 flex items-center justify-center text-xs font-medium",
|
|
65
|
+
style: { color: clampedValue > 50 ? "white" : color },
|
|
66
|
+
children: [
|
|
67
|
+
clampedValue,
|
|
68
|
+
"%"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
ProgressBar.displayName = "ProgressBar";
|
|
78
|
+
export {
|
|
79
|
+
ProgressBar
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=index17.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index17.js","sources":["../src/components/progress/ProgressBar.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { ProgressBarProps } from '../../types';\nimport { cn, normalizeSize } from '../../utils';\n\n/**\n * ProgressBar - Linear progress bar\n *\n * A horizontal progress bar that can be determinate (showing specific progress) or indeterminate (loading animation).\n *\n * @example\n * ```tsx\n * <ProgressBar value={75} showValue />\n * <ProgressBar indeterminate />\n * <ProgressBar value={50} height={8} color=\"#8b5cf6\" />\n * ```\n */\nexport const ProgressBar = forwardRef<HTMLDivElement, ProgressBarProps>(\n (\n {\n value = 0,\n indeterminate = false,\n showValue = false,\n height = '0.5rem',\n color = '#3b82f6',\n secondaryColor = '#e0e0e0',\n className,\n style,\n testId = 'progress-bar',\n visible = true,\n ariaLabel,\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const clampedValue = Math.min(100, Math.max(0, value));\n const progressLabel = ariaLabel || `Loading ${clampedValue}%`;\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('relative w-full overflow-hidden rounded-full', className)}\n style={{\n height: normalizeSize(height),\n backgroundColor: secondaryColor,\n ...style,\n }}\n role=\"progressbar\"\n aria-label={progressLabel}\n aria-valuenow={indeterminate ? undefined : clampedValue}\n aria-valuemin={0}\n aria-valuemax={100}\n {...rest}\n >\n {indeterminate ? (\n <div\n className=\"absolute h-full rounded-full\"\n style={{\n backgroundColor: color,\n animation: 'progress-indeterminate 1.5s ease-in-out infinite',\n width: '40%',\n }}\n />\n ) : (\n <div\n className=\"h-full rounded-full transition-all duration-300 ease-in-out\"\n style={{\n width: `${clampedValue}%`,\n backgroundColor: color,\n }}\n />\n )}\n {showValue && !indeterminate && (\n <span\n className=\"absolute inset-0 flex items-center justify-center text-xs font-medium\"\n style={{ color: clampedValue > 50 ? 'white' : color }}\n >\n {clampedValue}%\n </span>\n )}\n </div>\n );\n }\n);\n\nProgressBar.displayName = 'ProgressBar';\n"],"names":[],"mappings":";;;;AAgBO,MAAM,cAAc;AAAA,EACzB,CACE;AAAA,IACE,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,SAAS;AAAA,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ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const react = require("react");
|
|
5
|
+
const colors = require("./index4.cjs");
|
|
6
|
+
const classNames = require("./index3.cjs");
|
|
7
|
+
const ProgressCircle = react.forwardRef(
|
|
8
|
+
({
|
|
9
|
+
value = 0,
|
|
10
|
+
indeterminate = false,
|
|
11
|
+
showValue = false,
|
|
12
|
+
size = 60,
|
|
13
|
+
thickness = 4,
|
|
14
|
+
color = "#3b82f6",
|
|
15
|
+
secondaryColor = "#e0e0e0",
|
|
16
|
+
className,
|
|
17
|
+
style,
|
|
18
|
+
testId = "progress-circle",
|
|
19
|
+
visible = true,
|
|
20
|
+
ariaLabel,
|
|
21
|
+
...rest
|
|
22
|
+
}, ref) => {
|
|
23
|
+
if (!visible) return null;
|
|
24
|
+
const clampedValue = Math.min(100, Math.max(0, value));
|
|
25
|
+
const sizeValue = typeof size === "number" ? size : parseInt(String(size), 10);
|
|
26
|
+
const thicknessValue = typeof thickness === "number" ? thickness : parseInt(String(thickness), 10);
|
|
27
|
+
const radius = (sizeValue - thicknessValue * 2) / 2;
|
|
28
|
+
const circumference = 2 * Math.PI * radius;
|
|
29
|
+
const strokeDashoffset = circumference - clampedValue / 100 * circumference;
|
|
30
|
+
const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
|
|
31
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
ref,
|
|
35
|
+
"data-testid": testId,
|
|
36
|
+
className: classNames.cn("inline-flex items-center justify-center relative", className),
|
|
37
|
+
style: {
|
|
38
|
+
width: colors.normalizeSize(size),
|
|
39
|
+
height: colors.normalizeSize(size),
|
|
40
|
+
...style
|
|
41
|
+
},
|
|
42
|
+
role: "progressbar",
|
|
43
|
+
"aria-label": progressLabel,
|
|
44
|
+
"aria-valuenow": indeterminate ? void 0 : clampedValue,
|
|
45
|
+
"aria-valuemin": 0,
|
|
46
|
+
"aria-valuemax": 100,
|
|
47
|
+
...rest,
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
50
|
+
"svg",
|
|
51
|
+
{
|
|
52
|
+
className: classNames.cn(indeterminate && "animate-spinner-rotate"),
|
|
53
|
+
width: sizeValue,
|
|
54
|
+
height: sizeValue,
|
|
55
|
+
viewBox: `0 0 ${sizeValue} ${sizeValue}`,
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
58
|
+
"circle",
|
|
59
|
+
{
|
|
60
|
+
cx: sizeValue / 2,
|
|
61
|
+
cy: sizeValue / 2,
|
|
62
|
+
r: radius,
|
|
63
|
+
fill: "none",
|
|
64
|
+
stroke: secondaryColor,
|
|
65
|
+
strokeWidth: thicknessValue
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
69
|
+
"circle",
|
|
70
|
+
{
|
|
71
|
+
cx: sizeValue / 2,
|
|
72
|
+
cy: sizeValue / 2,
|
|
73
|
+
r: radius,
|
|
74
|
+
fill: "none",
|
|
75
|
+
stroke: color,
|
|
76
|
+
strokeWidth: thicknessValue,
|
|
77
|
+
strokeLinecap: "round",
|
|
78
|
+
strokeDasharray: circumference,
|
|
79
|
+
strokeDashoffset: indeterminate ? circumference * 0.75 : strokeDashoffset,
|
|
80
|
+
transform: `rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`,
|
|
81
|
+
style: {
|
|
82
|
+
transition: indeterminate ? "none" : "stroke-dashoffset 0.3s ease-in-out"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
showValue && !indeterminate && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
90
|
+
"span",
|
|
91
|
+
{
|
|
92
|
+
className: "absolute text-sm font-medium",
|
|
93
|
+
style: { color },
|
|
94
|
+
children: [
|
|
95
|
+
clampedValue,
|
|
96
|
+
"%"
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
ProgressCircle.displayName = "ProgressCircle";
|
|
106
|
+
exports.ProgressCircle = ProgressCircle;
|
|
107
|
+
//# sourceMappingURL=index18.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index18.cjs","sources":["../src/components/progress/ProgressCircle.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { ProgressCircleProps } from '../../types';\nimport { cn, normalizeSize } from '../../utils';\n\n/**\n * ProgressCircle - SVG-based circular progress indicator\n *\n * A circular progress indicator that shows progress as a partial circle.\n *\n * @example\n * ```tsx\n * <ProgressCircle value={75} showValue />\n * <ProgressCircle value={50} size={80} thickness={6} />\n * <ProgressCircle indeterminate />\n * ```\n */\nexport const ProgressCircle = forwardRef<HTMLDivElement, ProgressCircleProps>(\n (\n {\n value = 0,\n indeterminate = false,\n showValue = false,\n size = 60,\n thickness = 4,\n color = '#3b82f6',\n secondaryColor = '#e0e0e0',\n className,\n style,\n testId = 'progress-circle',\n visible = true,\n ariaLabel,\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const clampedValue = Math.min(100, Math.max(0, value));\n const sizeValue = typeof size === 'number' ? size : parseInt(String(size), 10);\n const thicknessValue = typeof thickness === 'number' ? thickness : parseInt(String(thickness), 10);\n const radius = (sizeValue - thicknessValue * 2) / 2;\n const circumference = 2 * Math.PI * radius;\n const strokeDashoffset = circumference - (clampedValue / 100) * circumference;\n const progressLabel = ariaLabel || `Loading ${clampedValue}%`;\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('inline-flex items-center justify-center relative', className)}\n style={{\n width: normalizeSize(size),\n height: normalizeSize(size),\n ...style,\n }}\n role=\"progressbar\"\n aria-label={progressLabel}\n aria-valuenow={indeterminate ? undefined : clampedValue}\n aria-valuemin={0}\n aria-valuemax={100}\n {...rest}\n >\n <svg\n className={cn(indeterminate && 'animate-spinner-rotate')}\n width={sizeValue}\n height={sizeValue}\n viewBox={`0 0 ${sizeValue} ${sizeValue}`}\n >\n {/* Background circle */}\n <circle\n cx={sizeValue / 2}\n cy={sizeValue / 2}\n r={radius}\n fill=\"none\"\n stroke={secondaryColor}\n strokeWidth={thicknessValue}\n />\n {/* Progress circle */}\n <circle\n cx={sizeValue / 2}\n cy={sizeValue / 2}\n r={radius}\n fill=\"none\"\n stroke={color}\n strokeWidth={thicknessValue}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={indeterminate ? circumference * 0.75 : strokeDashoffset}\n transform={`rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`}\n style={{\n transition: indeterminate ? 'none' : 'stroke-dashoffset 0.3s ease-in-out',\n }}\n />\n </svg>\n {showValue && !indeterminate && (\n <span\n className=\"absolute text-sm font-medium\"\n style={{ color }}\n >\n {clampedValue}%\n </span>\n )}\n </div>\n );\n }\n);\n\nProgressCircle.displayName = 'ProgressCircle';\n"],"names":["forwardRef","jsxs","cn","normalizeSize","jsx"],"mappings":";;;;;;AAgBO,MAAM,iBAAiBA,MAAAA;AAAAA,EAC5B,CACE;AAAA,IACE,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,iBAAiB;AAAA,IACjB;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,QAAI,CAAC,QAAS,QAAO;AAErB,UAAM,eAAe,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC;AACrD,UAAM,YA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A,oBACR,aAAa;AAAA,oBACb,eAAc;AAAA,oBACd,iBAAiB;AAAA,oBACjB,kBAAkB,gBAAgB,gBAAgB,OAAO;AAAA,oBACzD,WAAW,cAAc,YAAY,CAAC,IAAI,YAAY,CAAC;AAAA,oBACvD,OAAO;AAAA,sBACL,YAAY,gBAAgB,SAAS;AAAA,oBAAA;AAAA,kBACvC;AAAA,gBAAA;AAAA,cACF;AAAA,YAAA;AAAA,UAAA;AAAA,UAED,aAAa,CAAC,iBACbH,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO,EAAE,MAAA;AAAA,cAER,UAAA;AAAA,gBAAA;AAAA,gBAAa;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAChB;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,eAAe,cAAc;;"}
|
package/dist/index18.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { normalizeSize } from "./index4.js";
|
|
4
|
+
import { cn } from "./index3.js";
|
|
5
|
+
const ProgressCircle = forwardRef(
|
|
6
|
+
({
|
|
7
|
+
value = 0,
|
|
8
|
+
indeterminate = false,
|
|
9
|
+
showValue = false,
|
|
10
|
+
size = 60,
|
|
11
|
+
thickness = 4,
|
|
12
|
+
color = "#3b82f6",
|
|
13
|
+
secondaryColor = "#e0e0e0",
|
|
14
|
+
className,
|
|
15
|
+
style,
|
|
16
|
+
testId = "progress-circle",
|
|
17
|
+
visible = true,
|
|
18
|
+
ariaLabel,
|
|
19
|
+
...rest
|
|
20
|
+
}, ref) => {
|
|
21
|
+
if (!visible) return null;
|
|
22
|
+
const clampedValue = Math.min(100, Math.max(0, value));
|
|
23
|
+
const sizeValue = typeof size === "number" ? size : parseInt(String(size), 10);
|
|
24
|
+
const thicknessValue = typeof thickness === "number" ? thickness : parseInt(String(thickness), 10);
|
|
25
|
+
const radius = (sizeValue - thicknessValue * 2) / 2;
|
|
26
|
+
const circumference = 2 * Math.PI * radius;
|
|
27
|
+
const strokeDashoffset = circumference - clampedValue / 100 * circumference;
|
|
28
|
+
const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
|
|
29
|
+
return /* @__PURE__ */ jsxs(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
ref,
|
|
33
|
+
"data-testid": testId,
|
|
34
|
+
className: cn("inline-flex items-center justify-center relative", className),
|
|
35
|
+
style: {
|
|
36
|
+
width: normalizeSize(size),
|
|
37
|
+
height: normalizeSize(size),
|
|
38
|
+
...style
|
|
39
|
+
},
|
|
40
|
+
role: "progressbar",
|
|
41
|
+
"aria-label": progressLabel,
|
|
42
|
+
"aria-valuenow": indeterminate ? void 0 : clampedValue,
|
|
43
|
+
"aria-valuemin": 0,
|
|
44
|
+
"aria-valuemax": 100,
|
|
45
|
+
...rest,
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ jsxs(
|
|
48
|
+
"svg",
|
|
49
|
+
{
|
|
50
|
+
className: cn(indeterminate && "animate-spinner-rotate"),
|
|
51
|
+
width: sizeValue,
|
|
52
|
+
height: sizeValue,
|
|
53
|
+
viewBox: `0 0 ${sizeValue} ${sizeValue}`,
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ jsx(
|
|
56
|
+
"circle",
|
|
57
|
+
{
|
|
58
|
+
cx: sizeValue / 2,
|
|
59
|
+
cy: sizeValue / 2,
|
|
60
|
+
r: radius,
|
|
61
|
+
fill: "none",
|
|
62
|
+
stroke: secondaryColor,
|
|
63
|
+
strokeWidth: thicknessValue
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ jsx(
|
|
67
|
+
"circle",
|
|
68
|
+
{
|
|
69
|
+
cx: sizeValue / 2,
|
|
70
|
+
cy: sizeValue / 2,
|
|
71
|
+
r: radius,
|
|
72
|
+
fill: "none",
|
|
73
|
+
stroke: color,
|
|
74
|
+
strokeWidth: thicknessValue,
|
|
75
|
+
strokeLinecap: "round",
|
|
76
|
+
strokeDasharray: circumference,
|
|
77
|
+
strokeDashoffset: indeterminate ? circumference * 0.75 : strokeDashoffset,
|
|
78
|
+
transform: `rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`,
|
|
79
|
+
style: {
|
|
80
|
+
transition: indeterminate ? "none" : "stroke-dashoffset 0.3s ease-in-out"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
showValue && !indeterminate && /* @__PURE__ */ jsxs(
|
|
88
|
+
"span",
|
|
89
|
+
{
|
|
90
|
+
className: "absolute text-sm font-medium",
|
|
91
|
+
style: { color },
|
|
92
|
+
children: [
|
|
93
|
+
clampedValue,
|
|
94
|
+
"%"
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
ProgressCircle.displayName = "ProgressCircle";
|
|
104
|
+
export {
|
|
105
|
+
ProgressCircle
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=index18.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index18.js","sources":["../src/components/progress/ProgressCircle.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { ProgressCircleProps } from '../../types';\nimport { cn, normalizeSize } from '../../utils';\n\n/**\n * ProgressCircle - SVG-based circular progress indicator\n *\n * A circular progress indicator that shows progress as a partial circle.\n *\n * @example\n * ```tsx\n * <ProgressCircle value={75} showValue />\n * <ProgressCircle value={50} size={80} thickness={6} />\n * <ProgressCircle indeterminate />\n * ```\n */\nexport const ProgressCircle = forwardRef<HTMLDivElement, ProgressCircleProps>(\n (\n {\n value = 0,\n indeterminate = false,\n showValue = false,\n size = 60,\n thickness = 4,\n color = '#3b82f6',\n secondaryColor = '#e0e0e0',\n className,\n style,\n testId = 'progress-circle',\n visible = true,\n ariaLabel,\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const clampedValue = Math.min(100, Math.max(0, value));\n const sizeValue = typeof size === 'number' ? size : parseInt(String(size), 10);\n const thicknessValue = typeof thickness === 'number' ? thickness : parseInt(String(thickness), 10);\n const radius = (sizeValue - thicknessValue * 2) / 2;\n const circumference = 2 * Math.PI * radius;\n const strokeDashoffset = circumference - (clampedValue / 100) * circumference;\n const progressLabel = ariaLabel || `Loading ${clampedValue}%`;\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('inline-flex items-center justify-center relative', className)}\n style={{\n width: normalizeSize(size),\n height: normalizeSize(size),\n ...style,\n }}\n role=\"progressbar\"\n aria-label={progressLabel}\n aria-valuenow={indeterminate ? undefined : clampedValue}\n aria-valuemin={0}\n aria-valuemax={100}\n {...rest}\n >\n <svg\n className={cn(indeterminate && 'animate-spinner-rotate')}\n width={sizeValue}\n height={sizeValue}\n viewBox={`0 0 ${sizeValue} ${sizeValue}`}\n >\n {/* Background circle */}\n <circle\n cx={sizeValue / 2}\n cy={sizeValue / 2}\n r={radius}\n fill=\"none\"\n stroke={secondaryColor}\n strokeWidth={thicknessValue}\n />\n {/* Progress circle */}\n <circle\n cx={sizeValue / 2}\n cy={sizeValue / 2}\n r={radius}\n fill=\"none\"\n stroke={color}\n strokeWidth={thicknessValue}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={indeterminate ? circumference * 0.75 : strokeDashoffset}\n transform={`rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`}\n style={{\n transition: indeterminate ? 'none' : 'stroke-dashoffset 0.3s ease-in-out',\n }}\n />\n </svg>\n {showValue && !indeterminate && (\n <span\n className=\"absolute text-sm font-medium\"\n style={{ color }}\n >\n {clampedValue}%\n </span>\n )}\n </div>\n );\n }\n);\n\nProgressCircle.displayName = 'ProgressCircle';\n"],"names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AA,kBAAC;AAAA,kBAAA;AAAA,oBACC,IAAI,YAAY;AAAA,oBAChB,IAAI,YAAY;AAAA,oBAChB,GAAG;AAAA,oBACH,MAAK;AAAA,oBACL,QAAQ;AAAA,oBACR,aAAa;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAGf;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,IAAI,YAAY;AAAA,oBAChB,IAAI,YAAY;AAAA,oBAChB,GAAG;AAAA,oBACH,MAAK;AAAA,oBACL,QAAQ;AAAA,oBACR,aAAa;AAAA,oBACb,eAAc;AAAA,oBACd,iBAAiB;AAAA,oBACjB,kBAAkB,gBAAgB,gBAAgB,OAAO;AAAA,oBACzD,WAAW,cAAc,YAAY,CAAC,IAAI,YAAY,CAAC;AAAA,oBACvD,OAAO;AAAA,sBACL,YAAY,gBAAgB,SAAS;AAAA,oBAAA;AAAA,kBACvC;AAAA,gBAAA;AAAA,cACF;AAAA,YAAA;AAAA,UAAA;AAAA,UAED,aAAa,CAAC,iBACb;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO,EAAE,MAAA;AAAA,cAER,UAAA;AAAA,gBAAA;AAAA,gBAAa;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAChB;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,eAAe,cAAc;"}
|
package/dist/index19.cjs
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const react = require("react");
|
|
5
|
+
const colors = require("./index4.cjs");
|
|
6
|
+
const classNames = require("./index3.cjs");
|
|
7
|
+
const ProgressRing = react.forwardRef(
|
|
8
|
+
({
|
|
9
|
+
value = 0,
|
|
10
|
+
indeterminate = false,
|
|
11
|
+
showValue = false,
|
|
12
|
+
size = 60,
|
|
13
|
+
thickness = 6,
|
|
14
|
+
color = "#3b82f6",
|
|
15
|
+
secondaryColor = "#e0e0e0",
|
|
16
|
+
gradient = false,
|
|
17
|
+
className,
|
|
18
|
+
style,
|
|
19
|
+
testId = "progress-ring",
|
|
20
|
+
visible = true,
|
|
21
|
+
ariaLabel,
|
|
22
|
+
...rest
|
|
23
|
+
}, ref) => {
|
|
24
|
+
if (!visible) return null;
|
|
25
|
+
const clampedValue = Math.min(100, Math.max(0, value));
|
|
26
|
+
const sizeValue = typeof size === "number" ? size : parseInt(String(size), 10);
|
|
27
|
+
const thicknessValue = typeof thickness === "number" ? thickness : parseInt(String(thickness), 10);
|
|
28
|
+
const radius = (sizeValue - thicknessValue * 2) / 2;
|
|
29
|
+
const circumference = 2 * Math.PI * radius;
|
|
30
|
+
const strokeDashoffset = circumference - clampedValue / 100 * circumference;
|
|
31
|
+
const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
|
|
32
|
+
const gradientId = `progress-gradient-${Math.random().toString(36).substr(2, 9)}`;
|
|
33
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
ref,
|
|
37
|
+
"data-testid": testId,
|
|
38
|
+
className: classNames.cn("inline-flex items-center justify-center relative", className),
|
|
39
|
+
style: {
|
|
40
|
+
width: colors.normalizeSize(size),
|
|
41
|
+
height: colors.normalizeSize(size),
|
|
42
|
+
...style
|
|
43
|
+
},
|
|
44
|
+
role: "progressbar",
|
|
45
|
+
"aria-label": progressLabel,
|
|
46
|
+
"aria-valuenow": indeterminate ? void 0 : clampedValue,
|
|
47
|
+
"aria-valuemin": 0,
|
|
48
|
+
"aria-valuemax": 100,
|
|
49
|
+
...rest,
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
52
|
+
"svg",
|
|
53
|
+
{
|
|
54
|
+
className: classNames.cn(indeterminate && "animate-spinner-rotate"),
|
|
55
|
+
width: sizeValue,
|
|
56
|
+
height: sizeValue,
|
|
57
|
+
viewBox: `0 0 ${sizeValue} ${sizeValue}`,
|
|
58
|
+
children: [
|
|
59
|
+
gradient && /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
|
|
60
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: color }),
|
|
61
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: secondaryColor === "#e0e0e0" ? "#8b5cf6" : secondaryColor })
|
|
62
|
+
] }) }),
|
|
63
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
64
|
+
"circle",
|
|
65
|
+
{
|
|
66
|
+
cx: sizeValue / 2,
|
|
67
|
+
cy: sizeValue / 2,
|
|
68
|
+
r: radius,
|
|
69
|
+
fill: "none",
|
|
70
|
+
stroke: gradient ? "#e0e0e0" : secondaryColor,
|
|
71
|
+
strokeWidth: thicknessValue
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
75
|
+
"circle",
|
|
76
|
+
{
|
|
77
|
+
cx: sizeValue / 2,
|
|
78
|
+
cy: sizeValue / 2,
|
|
79
|
+
r: radius,
|
|
80
|
+
fill: "none",
|
|
81
|
+
stroke: gradient ? `url(#${gradientId})` : color,
|
|
82
|
+
strokeWidth: thicknessValue,
|
|
83
|
+
strokeLinecap: "round",
|
|
84
|
+
strokeDasharray: circumference,
|
|
85
|
+
strokeDashoffset: indeterminate ? circumference * 0.75 : strokeDashoffset,
|
|
86
|
+
transform: `rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`,
|
|
87
|
+
style: {
|
|
88
|
+
transition: indeterminate ? "none" : "stroke-dashoffset 0.3s ease-in-out"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
showValue && !indeterminate && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
96
|
+
"span",
|
|
97
|
+
{
|
|
98
|
+
className: "absolute text-sm font-semibold",
|
|
99
|
+
style: { color },
|
|
100
|
+
children: [
|
|
101
|
+
clampedValue,
|
|
102
|
+
"%"
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
ProgressRing.displayName = "ProgressRing";
|
|
112
|
+
exports.ProgressRing = ProgressRing;
|
|
113
|
+
//# sourceMappingURL=index19.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index19.cjs","sources":["../src/components/progress/ProgressRing.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { ProgressRingProps } from '../../types';\nimport { cn, normalizeSize } from '../../utils';\n\n/**\n * ProgressRing - Ring-style progress with gradient option\n *\n * A circular progress ring with optional gradient colors.\n *\n * @example\n * ```tsx\n * <ProgressRing value={75} showValue />\n * <ProgressRing value={60} gradient secondaryColor=\"#8b5cf6\" />\n * <ProgressRing indeterminate />\n * ```\n */\nexport const ProgressRing = forwardRef<HTMLDivElement, ProgressRingProps>(\n (\n {\n value = 0,\n indeterminate = false,\n showValue = false,\n size = 60,\n thickness = 6,\n color = '#3b82f6',\n secondaryColor = '#e0e0e0',\n gradient = false,\n className,\n style,\n testId = 'progress-ring',\n visible = true,\n ariaLabel,\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const clampedValue = Math.min(100, Math.max(0, value));\n const sizeValue = typeof size === 'number' ? size : parseInt(String(size), 10);\n const thicknessValue = typeof thickness === 'number' ? thickness : parseInt(String(thickness), 10);\n const radius = (sizeValue - thicknessValue * 2) / 2;\n const circumference = 2 * Math.PI * radius;\n const strokeDashoffset = circumference - (clampedValue / 100) * circumference;\n const progressLabel = ariaLabel || `Loading ${clampedValue}%`;\n const gradientId = `progress-gradient-${Math.random().toString(36).substr(2, 9)}`;\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('inline-flex items-center justify-center relative', className)}\n style={{\n width: normalizeSize(size),\n height: normalizeSize(size),\n ...style,\n }}\n role=\"progressbar\"\n aria-label={progressLabel}\n aria-valuenow={indeterminate ? undefined : clampedValue}\n aria-valuemin={0}\n aria-valuemax={100}\n {...rest}\n >\n <svg\n className={cn(indeterminate && 'animate-spinner-rotate')}\n width={sizeValue}\n height={sizeValue}\n viewBox={`0 0 ${sizeValue} ${sizeValue}`}\n >\n {gradient && (\n <defs>\n <linearGradient id={gradientId} x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" stopColor={color} />\n <stop offset=\"100%\" stopColor={secondaryColor === '#e0e0e0' ? '#8b5cf6' : secondaryColor} />\n </linearGradient>\n </defs>\n )}\n {/* Background circle */}\n <circle\n cx={sizeValue / 2}\n cy={sizeValue / 2}\n r={radius}\n fill=\"none\"\n stroke={gradient ? '#e0e0e0' : secondaryColor}\n strokeWidth={thicknessValue}\n />\n {/* Progress circle */}\n <circle\n cx={sizeValue / 2}\n cy={sizeValue / 2}\n r={radius}\n fill=\"none\"\n stroke={gradient ? `url(#${gradientId})` : color}\n strokeWidth={thicknessValue}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={indeterminate ? circumference * 0.75 : strokeDashoffset}\n transform={`rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`}\n style={{\n transition: indeterminate ? 'none' : 'stroke-dashoffset 0.3s ease-in-out',\n }}\n />\n </svg>\n {showValue && !indeterminate && (\n <span\n className=\"absolute text-sm font-semibold\"\n style={{ color }}\n >\n {clampedValue}%\n </span>\n )}\n </div>\n );\n }\n);\n\nProgressRing.displayName = 'ProgressRing';\n"],"names":["forwardRef","jsxs","cn","normalizeSize","jsx"],"mappings":";;;;;;AAgBO,MAAM,eAAeA,MAAAA;AAAAA,EA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,gBAAA;AAAA,gBAAa;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAChB;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,aAAa,cAAc;;"}
|
package/dist/index19.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { normalizeSize } from "./index4.js";
|
|
4
|
+
import { cn } from "./index3.js";
|
|
5
|
+
const ProgressRing = forwardRef(
|
|
6
|
+
({
|
|
7
|
+
value = 0,
|
|
8
|
+
indeterminate = false,
|
|
9
|
+
showValue = false,
|
|
10
|
+
size = 60,
|
|
11
|
+
thickness = 6,
|
|
12
|
+
color = "#3b82f6",
|
|
13
|
+
secondaryColor = "#e0e0e0",
|
|
14
|
+
gradient = false,
|
|
15
|
+
className,
|
|
16
|
+
style,
|
|
17
|
+
testId = "progress-ring",
|
|
18
|
+
visible = true,
|
|
19
|
+
ariaLabel,
|
|
20
|
+
...rest
|
|
21
|
+
}, ref) => {
|
|
22
|
+
if (!visible) return null;
|
|
23
|
+
const clampedValue = Math.min(100, Math.max(0, value));
|
|
24
|
+
const sizeValue = typeof size === "number" ? size : parseInt(String(size), 10);
|
|
25
|
+
const thicknessValue = typeof thickness === "number" ? thickness : parseInt(String(thickness), 10);
|
|
26
|
+
const radius = (sizeValue - thicknessValue * 2) / 2;
|
|
27
|
+
const circumference = 2 * Math.PI * radius;
|
|
28
|
+
const strokeDashoffset = circumference - clampedValue / 100 * circumference;
|
|
29
|
+
const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
|
|
30
|
+
const gradientId = `progress-gradient-${Math.random().toString(36).substr(2, 9)}`;
|
|
31
|
+
return /* @__PURE__ */ jsxs(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
ref,
|
|
35
|
+
"data-testid": testId,
|
|
36
|
+
className: cn("inline-flex items-center justify-center relative", className),
|
|
37
|
+
style: {
|
|
38
|
+
width: normalizeSize(size),
|
|
39
|
+
height: normalizeSize(size),
|
|
40
|
+
...style
|
|
41
|
+
},
|
|
42
|
+
role: "progressbar",
|
|
43
|
+
"aria-label": progressLabel,
|
|
44
|
+
"aria-valuenow": indeterminate ? void 0 : clampedValue,
|
|
45
|
+
"aria-valuemin": 0,
|
|
46
|
+
"aria-valuemax": 100,
|
|
47
|
+
...rest,
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsxs(
|
|
50
|
+
"svg",
|
|
51
|
+
{
|
|
52
|
+
className: cn(indeterminate && "animate-spinner-rotate"),
|
|
53
|
+
width: sizeValue,
|
|
54
|
+
height: sizeValue,
|
|
55
|
+
viewBox: `0 0 ${sizeValue} ${sizeValue}`,
|
|
56
|
+
children: [
|
|
57
|
+
gradient && /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
|
|
58
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: color }),
|
|
59
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: secondaryColor === "#e0e0e0" ? "#8b5cf6" : secondaryColor })
|
|
60
|
+
] }) }),
|
|
61
|
+
/* @__PURE__ */ jsx(
|
|
62
|
+
"circle",
|
|
63
|
+
{
|
|
64
|
+
cx: sizeValue / 2,
|
|
65
|
+
cy: sizeValue / 2,
|
|
66
|
+
r: radius,
|
|
67
|
+
fill: "none",
|
|
68
|
+
stroke: gradient ? "#e0e0e0" : secondaryColor,
|
|
69
|
+
strokeWidth: thicknessValue
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ jsx(
|
|
73
|
+
"circle",
|
|
74
|
+
{
|
|
75
|
+
cx: sizeValue / 2,
|
|
76
|
+
cy: sizeValue / 2,
|
|
77
|
+
r: radius,
|
|
78
|
+
fill: "none",
|
|
79
|
+
stroke: gradient ? `url(#${gradientId})` : color,
|
|
80
|
+
strokeWidth: thicknessValue,
|
|
81
|
+
strokeLinecap: "round",
|
|
82
|
+
strokeDasharray: circumference,
|
|
83
|
+
strokeDashoffset: indeterminate ? circumference * 0.75 : strokeDashoffset,
|
|
84
|
+
transform: `rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`,
|
|
85
|
+
style: {
|
|
86
|
+
transition: indeterminate ? "none" : "stroke-dashoffset 0.3s ease-in-out"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
showValue && !indeterminate && /* @__PURE__ */ jsxs(
|
|
94
|
+
"span",
|
|
95
|
+
{
|
|
96
|
+
className: "absolute text-sm font-semibold",
|
|
97
|
+
style: { color },
|
|
98
|
+
children: [
|
|
99
|
+
clampedValue,
|
|
100
|
+
"%"
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
ProgressRing.displayName = "ProgressRing";
|
|
110
|
+
export {
|
|
111
|
+
ProgressRing
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=index19.js.map
|