premium-react-loaders 3.0.0 → 3.1.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.
Files changed (153) hide show
  1. package/README.md +45 -3
  2. package/dist/components/3d/CubeSpinner.d.ts +21 -0
  3. package/dist/components/3d/CubeSpinner.d.ts.map +1 -0
  4. package/dist/components/3d/FlipCard.d.ts +21 -0
  5. package/dist/components/3d/FlipCard.d.ts.map +1 -0
  6. package/dist/components/3d/Helix.d.ts +23 -0
  7. package/dist/components/3d/Helix.d.ts.map +1 -0
  8. package/dist/components/3d/PerspectiveRing.d.ts +21 -0
  9. package/dist/components/3d/PerspectiveRing.d.ts.map +1 -0
  10. package/dist/components/3d/PlaneRotate.d.ts +21 -0
  11. package/dist/components/3d/PlaneRotate.d.ts.map +1 -0
  12. package/dist/components/3d/index.d.ts +6 -0
  13. package/dist/components/3d/index.d.ts.map +1 -0
  14. package/dist/components/accessibility/LiveRegion.d.ts +34 -0
  15. package/dist/components/accessibility/LiveRegion.d.ts.map +1 -0
  16. package/dist/components/accessibility/index.d.ts +2 -0
  17. package/dist/components/accessibility/index.d.ts.map +1 -0
  18. package/dist/components/index.d.ts +3 -0
  19. package/dist/components/index.d.ts.map +1 -1
  20. package/dist/components/skeleton/DataTableSkeleton.d.ts +25 -0
  21. package/dist/components/skeleton/DataTableSkeleton.d.ts.map +1 -0
  22. package/dist/components/skeleton/SmartSkeleton.d.ts +23 -0
  23. package/dist/components/skeleton/SmartSkeleton.d.ts.map +1 -0
  24. package/dist/components/skeleton/index.d.ts +2 -0
  25. package/dist/components/skeleton/index.d.ts.map +1 -1
  26. package/dist/components/smart/FormFieldLoader.d.ts +22 -0
  27. package/dist/components/smart/FormFieldLoader.d.ts.map +1 -0
  28. package/dist/components/smart/index.d.ts +2 -0
  29. package/dist/components/smart/index.d.ts.map +1 -0
  30. package/dist/hooks/index.d.ts +6 -0
  31. package/dist/hooks/index.d.ts.map +1 -1
  32. package/dist/hooks/useLoadingAnalytics.d.ts +101 -0
  33. package/dist/hooks/useLoadingAnalytics.d.ts.map +1 -0
  34. package/dist/hooks/useLoadingOrchestrator.d.ts +104 -0
  35. package/dist/hooks/useLoadingOrchestrator.d.ts.map +1 -0
  36. package/dist/hooks/useSmartLoader.d.ts +98 -0
  37. package/dist/hooks/useSmartLoader.d.ts.map +1 -0
  38. package/dist/index.cjs +49 -31
  39. package/dist/index.js +49 -31
  40. package/dist/index10.cjs +1 -1
  41. package/dist/index10.js +1 -1
  42. package/dist/index11.cjs +1 -1
  43. package/dist/index11.js +1 -1
  44. package/dist/index12.cjs +1 -1
  45. package/dist/index12.js +1 -1
  46. package/dist/index13.cjs +1 -1
  47. package/dist/index13.js +1 -1
  48. package/dist/index14.cjs +1 -1
  49. package/dist/index14.js +1 -1
  50. package/dist/index15.cjs +1 -1
  51. package/dist/index15.js +1 -1
  52. package/dist/index16.cjs +131 -66
  53. package/dist/index16.js +132 -67
  54. package/dist/index17.cjs +245 -30
  55. package/dist/index17.js +246 -31
  56. package/dist/index18.cjs +24 -36
  57. package/dist/index18.js +24 -36
  58. package/dist/index19.cjs +19 -21
  59. package/dist/index19.js +19 -21
  60. package/dist/index20.cjs +25 -20
  61. package/dist/index20.js +25 -20
  62. package/dist/index21.cjs +22 -32
  63. package/dist/index21.js +22 -32
  64. package/dist/index22.cjs +26 -35
  65. package/dist/index22.js +28 -37
  66. package/dist/index23.cjs +40 -76
  67. package/dist/index23.js +42 -78
  68. package/dist/index24.cjs +53 -102
  69. package/dist/index24.js +54 -103
  70. package/dist/index25.cjs +46 -80
  71. package/dist/index25.js +47 -81
  72. package/dist/index26.cjs +105 -103
  73. package/dist/index26.js +107 -105
  74. package/dist/index27.cjs +108 -27
  75. package/dist/index27.js +111 -30
  76. package/dist/index28.cjs +104 -36
  77. package/dist/index28.js +106 -38
  78. package/dist/index29.cjs +22 -30
  79. package/dist/index29.js +23 -31
  80. package/dist/index30.cjs +30 -32
  81. package/dist/index30.js +31 -33
  82. package/dist/index31.cjs +49 -52
  83. package/dist/index31.js +50 -53
  84. package/dist/index32.cjs +37 -108
  85. package/dist/index32.js +38 -109
  86. package/dist/index33.cjs +54 -72
  87. package/dist/index33.js +55 -73
  88. package/dist/index34.cjs +112 -80
  89. package/dist/index34.js +112 -80
  90. package/dist/index35.cjs +78 -145
  91. package/dist/index35.js +80 -147
  92. package/dist/index36.cjs +78 -57
  93. package/dist/index36.js +79 -58
  94. package/dist/index37.cjs +138 -84
  95. package/dist/index37.js +140 -86
  96. package/dist/index38.cjs +33 -106
  97. package/dist/index38.js +34 -107
  98. package/dist/index39.cjs +66 -50
  99. package/dist/index39.js +66 -50
  100. package/dist/index40.cjs +123 -44
  101. package/dist/index40.js +124 -45
  102. package/dist/index41.cjs +43 -85
  103. package/dist/index41.js +44 -86
  104. package/dist/index42.cjs +35 -27
  105. package/dist/index42.js +35 -27
  106. package/dist/index43.cjs +87 -58
  107. package/dist/index43.js +87 -58
  108. package/dist/index44.cjs +35 -88
  109. package/dist/index44.js +36 -89
  110. package/dist/index45.cjs +62 -58
  111. package/dist/index45.js +63 -59
  112. package/dist/index46.cjs +87 -110
  113. package/dist/index46.js +88 -111
  114. package/dist/index47.cjs +101 -120
  115. package/dist/index47.js +102 -121
  116. package/dist/index48.cjs +158 -0
  117. package/dist/index48.js +158 -0
  118. package/dist/index49.cjs +167 -0
  119. package/dist/index49.js +167 -0
  120. package/dist/index50.cjs +110 -0
  121. package/dist/index50.js +110 -0
  122. package/dist/index51.cjs +112 -0
  123. package/dist/index51.js +112 -0
  124. package/dist/index52.cjs +144 -0
  125. package/dist/index52.js +144 -0
  126. package/dist/index53.cjs +112 -0
  127. package/dist/index53.js +112 -0
  128. package/dist/index54.cjs +189 -0
  129. package/dist/index54.js +189 -0
  130. package/dist/index55.cjs +53 -0
  131. package/dist/index55.js +53 -0
  132. package/dist/index56.cjs +125 -0
  133. package/dist/index56.js +125 -0
  134. package/dist/index7.cjs +1 -1
  135. package/dist/index7.js +1 -1
  136. package/dist/index8.cjs +1 -1
  137. package/dist/index8.js +1 -1
  138. package/dist/index9.cjs +1 -1
  139. package/dist/index9.js +1 -1
  140. package/dist/premium-react-loaders.css +140 -0
  141. package/dist/types/3d.d.ts +85 -0
  142. package/dist/types/3d.d.ts.map +1 -0
  143. package/dist/types/accessibility.d.ts +35 -0
  144. package/dist/types/accessibility.d.ts.map +1 -0
  145. package/dist/types/index.d.ts +3 -0
  146. package/dist/types/index.d.ts.map +1 -1
  147. package/dist/types/smart.d.ts +63 -0
  148. package/dist/types/smart.d.ts.map +1 -0
  149. package/dist/utils/accessibility.d.ts +67 -0
  150. package/dist/utils/accessibility.d.ts.map +1 -0
  151. package/dist/utils/index.d.ts +1 -0
  152. package/dist/utils/index.d.ts.map +1 -1
  153. package/package.json +1 -1
package/dist/index26.cjs CHANGED
@@ -2,30 +2,34 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const react = require("react");
5
- const hooks = require("./index47.cjs");
5
+ const hooks = require("./index56.cjs");
6
+ const colors = require("./index4.cjs");
6
7
  const classNames = require("./index3.cjs");
7
- const ProgressSteps = react.forwardRef(
8
+ const ProgressCircle = react.forwardRef(
8
9
  ({
9
- steps,
10
- currentStep,
11
- labels,
12
- showNumbers = true,
13
- orientation = "horizontal",
14
- connector = "line",
10
+ value = 0,
11
+ indeterminate = false,
12
+ showValue = false,
13
+ size = "lg",
14
+ thickness = 4,
15
15
  color = "#3b82f6",
16
- completedColor,
17
- activeColor,
18
- inactiveColor = "#e0e0e0",
16
+ secondaryColor = "#e0e0e0",
17
+ buffer,
18
+ speed = "normal",
19
+ reverse = false,
20
+ respectMotionPreference = true,
19
21
  delay = 0,
20
22
  minDuration = 0,
21
23
  transition,
22
24
  className,
23
25
  style,
24
- testId = "progress-steps",
26
+ testId = "progress-circle",
25
27
  visible = true,
26
- ariaLabel = "Progress steps",
28
+ ariaLabel,
27
29
  ...rest
28
30
  }, ref) => {
31
+ const prefersReducedMotion = hooks.useReducedMotion();
32
+ const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
29
33
  const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(
30
34
  visible,
31
35
  delay,
@@ -33,112 +37,110 @@ const ProgressSteps = react.forwardRef(
33
37
  transition
34
38
  );
35
39
  if (!shouldRender) return null;
36
- const completed = completedColor || color;
37
- const active = activeColor || color;
38
- const getStepStatus = (index) => {
39
- if (index < currentStep) return "completed";
40
- if (index === currentStep) return "active";
41
- return "inactive";
42
- };
43
- const getStepColor = (status) => {
44
- if (status === "completed") return completed;
45
- if (status === "active") return active;
46
- return inactiveColor;
47
- };
48
- const getConnectorColor = (index) => {
49
- return index < currentStep ? completed : inactiveColor;
50
- };
51
- const isHorizontal = orientation === "horizontal";
52
- return /* @__PURE__ */ jsxRuntime.jsx(
40
+ const clampedValue = Math.min(100, Math.max(0, value));
41
+ const clampedBuffer = buffer !== void 0 ? Math.min(100, Math.max(0, buffer)) : void 0;
42
+ const sizeValue = colors.parseSizeToNumber(size, 56);
43
+ const thicknessValue = colors.parseSizeToNumber(thickness, 4);
44
+ const radius = (sizeValue - thicknessValue * 2) / 2;
45
+ const circumference = 2 * Math.PI * radius;
46
+ const strokeDashoffset = circumference - clampedValue / 100 * circumference;
47
+ const bufferDashoffset = clampedBuffer !== void 0 ? circumference - clampedBuffer / 100 * circumference : void 0;
48
+ const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
49
+ return /* @__PURE__ */ jsxRuntime.jsxs(
53
50
  "div",
54
51
  {
55
52
  ref,
56
53
  "data-testid": testId,
57
- className: classNames.cn(
58
- "flex",
59
- isHorizontal ? "flex-row items-center w-full" : "flex-col items-start",
60
- className
61
- ),
54
+ className: classNames.cn("inline-flex items-center justify-center relative", className),
62
55
  style: {
56
+ width: colors.normalizeSize(size),
57
+ height: colors.normalizeSize(size),
63
58
  ...style,
64
59
  opacity,
65
60
  transition: transitionStyle
66
61
  },
67
62
  role: "progressbar",
68
- "aria-label": ariaLabel,
69
- "aria-valuenow": currentStep,
63
+ "aria-label": progressLabel,
64
+ "aria-valuenow": indeterminate ? void 0 : clampedValue,
70
65
  "aria-valuemin": 0,
71
- "aria-valuemax": steps - 1,
66
+ "aria-valuemax": 100,
72
67
  ...rest,
73
- children: Array.from({ length: steps }).map((_, index) => {
74
- const status = getStepStatus(index);
75
- const stepColor = getStepColor(status);
76
- const showConnector = index < steps - 1 && connector === "line";
77
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
78
- /* @__PURE__ */ jsxRuntime.jsxs(
79
- "div",
80
- {
81
- className: classNames.cn(
82
- "flex items-center",
83
- isHorizontal ? "flex-col" : "flex-row gap-3"
68
+ children: [
69
+ /* @__PURE__ */ jsxRuntime.jsxs(
70
+ "svg",
71
+ {
72
+ className: classNames.cn(indeterminate && "animate-spinner-rotate"),
73
+ width: sizeValue,
74
+ height: sizeValue,
75
+ viewBox: `0 0 ${sizeValue} ${sizeValue}`,
76
+ style: indeterminate ? {
77
+ animation: `spinner-rotate ${effectiveDuration} linear infinite`,
78
+ animationDirection: reverse ? "reverse" : "normal"
79
+ } : void 0,
80
+ children: [
81
+ /* @__PURE__ */ jsxRuntime.jsx(
82
+ "circle",
83
+ {
84
+ cx: sizeValue / 2,
85
+ cy: sizeValue / 2,
86
+ r: radius,
87
+ fill: "none",
88
+ stroke: secondaryColor,
89
+ strokeWidth: thicknessValue
90
+ }
84
91
  ),
85
- children: [
86
- /* @__PURE__ */ jsxRuntime.jsx(
87
- "div",
88
- {
89
- className: "rounded-full flex items-center justify-center font-medium text-sm transition-colors",
90
- style: {
91
- width: "2rem",
92
- height: "2rem",
93
- backgroundColor: stepColor,
94
- color: "#ffffff"
95
- },
96
- children: showNumbers && /* @__PURE__ */ jsxRuntime.jsx("span", { children: index + 1 })
97
- }
98
- ),
99
- (labels == null ? void 0 : labels[index]) && /* @__PURE__ */ jsxRuntime.jsx(
100
- "span",
101
- {
102
- className: classNames.cn(
103
- "text-xs mt-1 transition-colors",
104
- isHorizontal ? "text-center" : "text-left"
105
- ),
106
- style: {
107
- color: status === "inactive" ? "#9ca3af" : "#374151",
108
- maxWidth: isHorizontal ? "80px" : "none"
109
- },
110
- children: labels[index]
92
+ bufferDashoffset !== void 0 && !indeterminate && /* @__PURE__ */ jsxRuntime.jsx(
93
+ "circle",
94
+ {
95
+ cx: sizeValue / 2,
96
+ cy: sizeValue / 2,
97
+ r: radius,
98
+ fill: "none",
99
+ stroke: color,
100
+ strokeWidth: thicknessValue,
101
+ strokeLinecap: "round",
102
+ strokeDasharray: circumference,
103
+ strokeDashoffset: bufferDashoffset,
104
+ transform: `rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`,
105
+ opacity: 0.3
106
+ }
107
+ ),
108
+ /* @__PURE__ */ jsxRuntime.jsx(
109
+ "circle",
110
+ {
111
+ cx: sizeValue / 2,
112
+ cy: sizeValue / 2,
113
+ r: radius,
114
+ fill: "none",
115
+ stroke: color,
116
+ strokeWidth: thicknessValue,
117
+ strokeLinecap: "round",
118
+ strokeDasharray: circumference,
119
+ strokeDashoffset: indeterminate ? circumference * 0.75 : strokeDashoffset,
120
+ transform: `rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`,
121
+ style: {
122
+ transition: indeterminate ? "none" : "stroke-dashoffset 0.3s ease-in-out"
111
123
  }
112
- )
113
- ]
114
- }
115
- ),
116
- showConnector && /* @__PURE__ */ jsxRuntime.jsx(
117
- "div",
118
- {
119
- className: "transition-colors",
120
- style: {
121
- backgroundColor: getConnectorColor(index),
122
- ...isHorizontal ? {
123
- height: "2px",
124
- flex: 1,
125
- marginLeft: "4px",
126
- marginRight: "4px"
127
- } : {
128
- width: "2px",
129
- height: "32px",
130
- marginLeft: "15px",
131
- marginTop: (labels == null ? void 0 : labels[index]) ? "4px" : "0",
132
- marginBottom: "4px"
133
124
  }
134
- }
135
- }
136
- )
137
- ] }, index);
138
- })
125
+ )
126
+ ]
127
+ }
128
+ ),
129
+ showValue && !indeterminate && /* @__PURE__ */ jsxRuntime.jsxs(
130
+ "span",
131
+ {
132
+ className: "absolute text-sm font-medium",
133
+ style: { color },
134
+ children: [
135
+ clampedValue,
136
+ "%"
137
+ ]
138
+ }
139
+ )
140
+ ]
139
141
  }
140
142
  );
141
143
  }
142
144
  );
143
- ProgressSteps.displayName = "ProgressSteps";
144
- exports.ProgressSteps = ProgressSteps;
145
+ ProgressCircle.displayName = "ProgressCircle";
146
+ exports.ProgressCircle = ProgressCircle;
package/dist/index26.js CHANGED
@@ -1,29 +1,33 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { forwardRef, Fragment } from "react";
3
- import { useLoaderVisibility } from "./index47.js";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index56.js";
4
+ import { normalizeSize, parseSizeToNumber } from "./index4.js";
4
5
  import { cn } from "./index3.js";
5
- const ProgressSteps = forwardRef(
6
+ const ProgressCircle = forwardRef(
6
7
  ({
7
- steps,
8
- currentStep,
9
- labels,
10
- showNumbers = true,
11
- orientation = "horizontal",
12
- connector = "line",
8
+ value = 0,
9
+ indeterminate = false,
10
+ showValue = false,
11
+ size = "lg",
12
+ thickness = 4,
13
13
  color = "#3b82f6",
14
- completedColor,
15
- activeColor,
16
- inactiveColor = "#e0e0e0",
14
+ secondaryColor = "#e0e0e0",
15
+ buffer,
16
+ speed = "normal",
17
+ reverse = false,
18
+ respectMotionPreference = true,
17
19
  delay = 0,
18
20
  minDuration = 0,
19
21
  transition,
20
22
  className,
21
23
  style,
22
- testId = "progress-steps",
24
+ testId = "progress-circle",
23
25
  visible = true,
24
- ariaLabel = "Progress steps",
26
+ ariaLabel,
25
27
  ...rest
26
28
  }, ref) => {
29
+ const prefersReducedMotion = useReducedMotion();
30
+ const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
27
31
  const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(
28
32
  visible,
29
33
  delay,
@@ -31,114 +35,112 @@ const ProgressSteps = forwardRef(
31
35
  transition
32
36
  );
33
37
  if (!shouldRender) return null;
34
- const completed = completedColor || color;
35
- const active = activeColor || color;
36
- const getStepStatus = (index) => {
37
- if (index < currentStep) return "completed";
38
- if (index === currentStep) return "active";
39
- return "inactive";
40
- };
41
- const getStepColor = (status) => {
42
- if (status === "completed") return completed;
43
- if (status === "active") return active;
44
- return inactiveColor;
45
- };
46
- const getConnectorColor = (index) => {
47
- return index < currentStep ? completed : inactiveColor;
48
- };
49
- const isHorizontal = orientation === "horizontal";
50
- return /* @__PURE__ */ jsx(
38
+ const clampedValue = Math.min(100, Math.max(0, value));
39
+ const clampedBuffer = buffer !== void 0 ? Math.min(100, Math.max(0, buffer)) : void 0;
40
+ const sizeValue = parseSizeToNumber(size, 56);
41
+ const thicknessValue = parseSizeToNumber(thickness, 4);
42
+ const radius = (sizeValue - thicknessValue * 2) / 2;
43
+ const circumference = 2 * Math.PI * radius;
44
+ const strokeDashoffset = circumference - clampedValue / 100 * circumference;
45
+ const bufferDashoffset = clampedBuffer !== void 0 ? circumference - clampedBuffer / 100 * circumference : void 0;
46
+ const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
47
+ return /* @__PURE__ */ jsxs(
51
48
  "div",
52
49
  {
53
50
  ref,
54
51
  "data-testid": testId,
55
- className: cn(
56
- "flex",
57
- isHorizontal ? "flex-row items-center w-full" : "flex-col items-start",
58
- className
59
- ),
52
+ className: cn("inline-flex items-center justify-center relative", className),
60
53
  style: {
54
+ width: normalizeSize(size),
55
+ height: normalizeSize(size),
61
56
  ...style,
62
57
  opacity,
63
58
  transition: transitionStyle
64
59
  },
65
60
  role: "progressbar",
66
- "aria-label": ariaLabel,
67
- "aria-valuenow": currentStep,
61
+ "aria-label": progressLabel,
62
+ "aria-valuenow": indeterminate ? void 0 : clampedValue,
68
63
  "aria-valuemin": 0,
69
- "aria-valuemax": steps - 1,
64
+ "aria-valuemax": 100,
70
65
  ...rest,
71
- children: Array.from({ length: steps }).map((_, index) => {
72
- const status = getStepStatus(index);
73
- const stepColor = getStepColor(status);
74
- const showConnector = index < steps - 1 && connector === "line";
75
- return /* @__PURE__ */ jsxs(Fragment, { children: [
76
- /* @__PURE__ */ jsxs(
77
- "div",
78
- {
79
- className: cn(
80
- "flex items-center",
81
- isHorizontal ? "flex-col" : "flex-row gap-3"
66
+ children: [
67
+ /* @__PURE__ */ jsxs(
68
+ "svg",
69
+ {
70
+ className: cn(indeterminate && "animate-spinner-rotate"),
71
+ width: sizeValue,
72
+ height: sizeValue,
73
+ viewBox: `0 0 ${sizeValue} ${sizeValue}`,
74
+ style: indeterminate ? {
75
+ animation: `spinner-rotate ${effectiveDuration} linear infinite`,
76
+ animationDirection: reverse ? "reverse" : "normal"
77
+ } : void 0,
78
+ children: [
79
+ /* @__PURE__ */ jsx(
80
+ "circle",
81
+ {
82
+ cx: sizeValue / 2,
83
+ cy: sizeValue / 2,
84
+ r: radius,
85
+ fill: "none",
86
+ stroke: secondaryColor,
87
+ strokeWidth: thicknessValue
88
+ }
82
89
  ),
83
- children: [
84
- /* @__PURE__ */ jsx(
85
- "div",
86
- {
87
- className: "rounded-full flex items-center justify-center font-medium text-sm transition-colors",
88
- style: {
89
- width: "2rem",
90
- height: "2rem",
91
- backgroundColor: stepColor,
92
- color: "#ffffff"
93
- },
94
- children: showNumbers && /* @__PURE__ */ jsx("span", { children: index + 1 })
95
- }
96
- ),
97
- (labels == null ? void 0 : labels[index]) && /* @__PURE__ */ jsx(
98
- "span",
99
- {
100
- className: cn(
101
- "text-xs mt-1 transition-colors",
102
- isHorizontal ? "text-center" : "text-left"
103
- ),
104
- style: {
105
- color: status === "inactive" ? "#9ca3af" : "#374151",
106
- maxWidth: isHorizontal ? "80px" : "none"
107
- },
108
- children: labels[index]
90
+ bufferDashoffset !== void 0 && !indeterminate && /* @__PURE__ */ jsx(
91
+ "circle",
92
+ {
93
+ cx: sizeValue / 2,
94
+ cy: sizeValue / 2,
95
+ r: radius,
96
+ fill: "none",
97
+ stroke: color,
98
+ strokeWidth: thicknessValue,
99
+ strokeLinecap: "round",
100
+ strokeDasharray: circumference,
101
+ strokeDashoffset: bufferDashoffset,
102
+ transform: `rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`,
103
+ opacity: 0.3
104
+ }
105
+ ),
106
+ /* @__PURE__ */ jsx(
107
+ "circle",
108
+ {
109
+ cx: sizeValue / 2,
110
+ cy: sizeValue / 2,
111
+ r: radius,
112
+ fill: "none",
113
+ stroke: color,
114
+ strokeWidth: thicknessValue,
115
+ strokeLinecap: "round",
116
+ strokeDasharray: circumference,
117
+ strokeDashoffset: indeterminate ? circumference * 0.75 : strokeDashoffset,
118
+ transform: `rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`,
119
+ style: {
120
+ transition: indeterminate ? "none" : "stroke-dashoffset 0.3s ease-in-out"
109
121
  }
110
- )
111
- ]
112
- }
113
- ),
114
- showConnector && /* @__PURE__ */ jsx(
115
- "div",
116
- {
117
- className: "transition-colors",
118
- style: {
119
- backgroundColor: getConnectorColor(index),
120
- ...isHorizontal ? {
121
- height: "2px",
122
- flex: 1,
123
- marginLeft: "4px",
124
- marginRight: "4px"
125
- } : {
126
- width: "2px",
127
- height: "32px",
128
- marginLeft: "15px",
129
- marginTop: (labels == null ? void 0 : labels[index]) ? "4px" : "0",
130
- marginBottom: "4px"
131
122
  }
132
- }
133
- }
134
- )
135
- ] }, index);
136
- })
123
+ )
124
+ ]
125
+ }
126
+ ),
127
+ showValue && !indeterminate && /* @__PURE__ */ jsxs(
128
+ "span",
129
+ {
130
+ className: "absolute text-sm font-medium",
131
+ style: { color },
132
+ children: [
133
+ clampedValue,
134
+ "%"
135
+ ]
136
+ }
137
+ )
138
+ ]
137
139
  }
138
140
  );
139
141
  }
140
142
  );
141
- ProgressSteps.displayName = "ProgressSteps";
143
+ ProgressCircle.displayName = "ProgressCircle";
142
144
  export {
143
- ProgressSteps
145
+ ProgressCircle
144
146
  };