premium-react-loaders 3.1.1 → 4.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 (197) hide show
  1. package/README.md +30 -3
  2. package/dist/components/gradient/GradientBar.d.ts +13 -0
  3. package/dist/components/gradient/GradientBar.d.ts.map +1 -0
  4. package/dist/components/gradient/GradientRing.d.ts +12 -0
  5. package/dist/components/gradient/GradientRing.d.ts.map +1 -0
  6. package/dist/components/gradient/GradientSpinner.d.ts +12 -0
  7. package/dist/components/gradient/GradientSpinner.d.ts.map +1 -0
  8. package/dist/components/gradient/index.d.ts +4 -0
  9. package/dist/components/gradient/index.d.ts.map +1 -0
  10. package/dist/components/index.d.ts +4 -0
  11. package/dist/components/index.d.ts.map +1 -1
  12. package/dist/components/morph/LiquidFill.d.ts +13 -0
  13. package/dist/components/morph/LiquidFill.d.ts.map +1 -0
  14. package/dist/components/morph/MorphBlob.d.ts +12 -0
  15. package/dist/components/morph/MorphBlob.d.ts.map +1 -0
  16. package/dist/components/morph/WaveCircle.d.ts +12 -0
  17. package/dist/components/morph/WaveCircle.d.ts.map +1 -0
  18. package/dist/components/morph/index.d.ts +4 -0
  19. package/dist/components/morph/index.d.ts.map +1 -0
  20. package/dist/components/neon/NeonPulse.d.ts +12 -0
  21. package/dist/components/neon/NeonPulse.d.ts.map +1 -0
  22. package/dist/components/neon/NeonSpinner.d.ts +12 -0
  23. package/dist/components/neon/NeonSpinner.d.ts.map +1 -0
  24. package/dist/components/neon/NeonText.d.ts +12 -0
  25. package/dist/components/neon/NeonText.d.ts.map +1 -0
  26. package/dist/components/neon/index.d.ts +4 -0
  27. package/dist/components/neon/index.d.ts.map +1 -0
  28. package/dist/components/particle/ParticleBurst.d.ts +12 -0
  29. package/dist/components/particle/ParticleBurst.d.ts.map +1 -0
  30. package/dist/components/particle/ParticleField.d.ts +3 -0
  31. package/dist/components/particle/ParticleField.d.ts.map +1 -0
  32. package/dist/components/particle/ParticleOrbit.d.ts +12 -0
  33. package/dist/components/particle/ParticleOrbit.d.ts.map +1 -0
  34. package/dist/components/particle/ParticleTrail.d.ts +12 -0
  35. package/dist/components/particle/ParticleTrail.d.ts.map +1 -0
  36. package/dist/components/particle/index.d.ts +5 -0
  37. package/dist/components/particle/index.d.ts.map +1 -0
  38. package/dist/components/progress/ProgressBar.d.ts.map +1 -1
  39. package/dist/components/progress/ProgressCircle.d.ts.map +1 -1
  40. package/dist/components/progress/ProgressRing.d.ts.map +1 -1
  41. package/dist/components/status/InfoIndicator.d.ts +29 -0
  42. package/dist/components/status/InfoIndicator.d.ts.map +1 -0
  43. package/dist/components/status/WarningIndicator.d.ts +29 -0
  44. package/dist/components/status/WarningIndicator.d.ts.map +1 -0
  45. package/dist/components/status/index.d.ts +2 -0
  46. package/dist/components/status/index.d.ts.map +1 -1
  47. package/dist/index.cjs +50 -20
  48. package/dist/index.d.ts +1 -1
  49. package/dist/index.js +50 -20
  50. package/dist/index10.cjs +1 -1
  51. package/dist/index10.js +1 -1
  52. package/dist/index11.cjs +1 -1
  53. package/dist/index11.js +1 -1
  54. package/dist/index12.cjs +1 -1
  55. package/dist/index12.js +1 -1
  56. package/dist/index13.cjs +1 -1
  57. package/dist/index13.js +1 -1
  58. package/dist/index14.cjs +1 -1
  59. package/dist/index14.js +1 -1
  60. package/dist/index15.cjs +1 -1
  61. package/dist/index15.js +1 -1
  62. package/dist/index17.cjs +1 -1
  63. package/dist/index17.js +1 -1
  64. package/dist/index18.cjs +1 -1
  65. package/dist/index18.js +1 -1
  66. package/dist/index19.cjs +1 -1
  67. package/dist/index19.js +1 -1
  68. package/dist/index20.cjs +1 -1
  69. package/dist/index20.js +1 -1
  70. package/dist/index21.cjs +1 -1
  71. package/dist/index21.js +1 -1
  72. package/dist/index22.cjs +1 -1
  73. package/dist/index22.js +1 -1
  74. package/dist/index23.cjs +1 -1
  75. package/dist/index23.js +1 -1
  76. package/dist/index24.cjs +1 -1
  77. package/dist/index24.js +1 -1
  78. package/dist/index25.cjs +17 -2
  79. package/dist/index25.js +18 -3
  80. package/dist/index26.cjs +17 -2
  81. package/dist/index26.js +18 -3
  82. package/dist/index27.cjs +17 -2
  83. package/dist/index27.js +18 -3
  84. package/dist/index28.cjs +1 -1
  85. package/dist/index28.js +1 -1
  86. package/dist/index29.cjs +1 -1
  87. package/dist/index29.js +1 -1
  88. package/dist/index30.cjs +1 -1
  89. package/dist/index30.js +1 -1
  90. package/dist/index31.cjs +1 -1
  91. package/dist/index31.js +1 -1
  92. package/dist/index32.cjs +1 -1
  93. package/dist/index32.js +1 -1
  94. package/dist/index33.cjs +1 -1
  95. package/dist/index33.js +1 -1
  96. package/dist/index34.cjs +1 -1
  97. package/dist/index34.js +1 -1
  98. package/dist/index35.cjs +1 -1
  99. package/dist/index35.js +1 -1
  100. package/dist/index36.cjs +1 -1
  101. package/dist/index36.js +1 -1
  102. package/dist/index37.cjs +59 -145
  103. package/dist/index37.js +61 -147
  104. package/dist/index38.cjs +32 -53
  105. package/dist/index38.js +33 -54
  106. package/dist/index39.cjs +138 -84
  107. package/dist/index39.js +140 -86
  108. package/dist/index4.cjs +10 -0
  109. package/dist/index4.js +10 -0
  110. package/dist/index40.cjs +33 -106
  111. package/dist/index40.js +34 -107
  112. package/dist/index41.cjs +66 -50
  113. package/dist/index41.js +66 -50
  114. package/dist/index42.cjs +123 -44
  115. package/dist/index42.js +124 -45
  116. package/dist/index43.cjs +43 -85
  117. package/dist/index43.js +44 -86
  118. package/dist/index44.cjs +35 -27
  119. package/dist/index44.js +35 -27
  120. package/dist/index45.cjs +87 -58
  121. package/dist/index45.js +87 -58
  122. package/dist/index46.cjs +35 -88
  123. package/dist/index46.js +36 -89
  124. package/dist/index47.cjs +62 -58
  125. package/dist/index47.js +63 -59
  126. package/dist/index48.cjs +87 -110
  127. package/dist/index48.js +88 -111
  128. package/dist/index49.cjs +48 -109
  129. package/dist/index49.js +49 -110
  130. package/dist/index50.cjs +110 -62
  131. package/dist/index50.js +111 -63
  132. package/dist/index51.cjs +104 -49
  133. package/dist/index51.js +104 -49
  134. package/dist/index52.cjs +43 -77
  135. package/dist/index52.js +44 -78
  136. package/dist/index53.cjs +56 -56
  137. package/dist/index53.js +56 -56
  138. package/dist/index54.cjs +104 -149
  139. package/dist/index54.js +106 -151
  140. package/dist/index55.cjs +97 -38
  141. package/dist/index55.js +99 -40
  142. package/dist/index56.cjs +184 -120
  143. package/dist/index56.js +185 -121
  144. package/dist/index57.cjs +53 -0
  145. package/dist/index57.js +53 -0
  146. package/dist/index58.cjs +55 -0
  147. package/dist/index58.js +55 -0
  148. package/dist/index59.cjs +119 -0
  149. package/dist/index59.js +119 -0
  150. package/dist/index60.cjs +70 -0
  151. package/dist/index60.js +70 -0
  152. package/dist/index61.cjs +66 -0
  153. package/dist/index61.js +66 -0
  154. package/dist/index62.cjs +68 -0
  155. package/dist/index62.js +68 -0
  156. package/dist/index63.cjs +99 -0
  157. package/dist/index63.js +99 -0
  158. package/dist/index64.cjs +75 -0
  159. package/dist/index64.js +75 -0
  160. package/dist/index65.cjs +92 -0
  161. package/dist/index65.js +92 -0
  162. package/dist/index66.cjs +76 -0
  163. package/dist/index66.js +76 -0
  164. package/dist/index67.cjs +76 -0
  165. package/dist/index67.js +76 -0
  166. package/dist/index68.cjs +64 -0
  167. package/dist/index68.js +64 -0
  168. package/dist/index69.cjs +60 -0
  169. package/dist/index69.js +60 -0
  170. package/dist/index7.cjs +1 -1
  171. package/dist/index7.js +1 -1
  172. package/dist/index70.cjs +57 -0
  173. package/dist/index70.js +57 -0
  174. package/dist/index71.cjs +125 -0
  175. package/dist/index71.js +125 -0
  176. package/dist/index8.cjs +1 -1
  177. package/dist/index8.js +1 -1
  178. package/dist/index9.cjs +1 -1
  179. package/dist/index9.js +1 -1
  180. package/dist/premium-react-loaders.css +126 -0
  181. package/dist/types/gradient.d.ts +38 -0
  182. package/dist/types/gradient.d.ts.map +1 -0
  183. package/dist/types/index.d.ts +4 -0
  184. package/dist/types/index.d.ts.map +1 -1
  185. package/dist/types/morph.d.ts +28 -0
  186. package/dist/types/morph.d.ts.map +1 -0
  187. package/dist/types/neon.d.ts +26 -0
  188. package/dist/types/neon.d.ts.map +1 -0
  189. package/dist/types/particle.d.ts +40 -0
  190. package/dist/types/particle.d.ts.map +1 -0
  191. package/dist/types/progress.d.ts +6 -0
  192. package/dist/types/progress.d.ts.map +1 -1
  193. package/dist/types/status.d.ts +30 -0
  194. package/dist/types/status.d.ts.map +1 -1
  195. package/dist/utils/colors.d.ts +5 -0
  196. package/dist/utils/colors.d.ts.map +1 -1
  197. package/package.json +1 -1
@@ -0,0 +1,53 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef, useState, useRef, useEffect } from "react";
3
+ import { cn } from "./index3.js";
4
+ const LiveRegion = forwardRef(
5
+ ({
6
+ message,
7
+ politeness = "polite",
8
+ clearAfter,
9
+ atomic = true,
10
+ relevant = "additions",
11
+ className
12
+ }, ref) => {
13
+ const [displayMessage, setDisplayMessage] = useState(message);
14
+ const clearTimerRef = useRef(null);
15
+ useEffect(() => {
16
+ setDisplayMessage(message);
17
+ if (clearTimerRef.current) {
18
+ clearTimeout(clearTimerRef.current);
19
+ clearTimerRef.current = null;
20
+ }
21
+ if (clearAfter && message) {
22
+ clearTimerRef.current = setTimeout(() => {
23
+ setDisplayMessage("");
24
+ }, clearAfter);
25
+ }
26
+ return () => {
27
+ if (clearTimerRef.current) {
28
+ clearTimeout(clearTimerRef.current);
29
+ }
30
+ };
31
+ }, [message, clearAfter]);
32
+ return /* @__PURE__ */ jsx(
33
+ "div",
34
+ {
35
+ ref,
36
+ className: cn(
37
+ // Visually hidden but accessible to screen readers
38
+ "sr-only absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0",
39
+ className
40
+ ),
41
+ role: politeness === "assertive" ? "alert" : "status",
42
+ "aria-live": politeness,
43
+ "aria-atomic": atomic,
44
+ "aria-relevant": relevant,
45
+ children: displayMessage
46
+ }
47
+ );
48
+ }
49
+ );
50
+ LiveRegion.displayName = "LiveRegion";
51
+ export {
52
+ LiveRegion
53
+ };
@@ -0,0 +1,55 @@
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 hooks = require("./index71.cjs");
6
+ const classNames = require("./index3.cjs");
7
+ const MorphBlob = react.forwardRef(
8
+ ({
9
+ size = 80,
10
+ color = "#3b82f6",
11
+ speed = "normal",
12
+ respectMotionPreference = true,
13
+ delay = 0,
14
+ minDuration = 0,
15
+ transition,
16
+ className,
17
+ style,
18
+ testId = "morph-blob",
19
+ visible = true,
20
+ ariaLabel = "Loading...",
21
+ ...rest
22
+ }, ref) => {
23
+ const prefersReducedMotion = hooks.useReducedMotion();
24
+ const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
25
+ const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(visible, delay, minDuration, transition);
26
+ if (!shouldRender) return null;
27
+ return /* @__PURE__ */ jsxRuntime.jsx(
28
+ "div",
29
+ {
30
+ ref,
31
+ "data-testid": testId,
32
+ className: classNames.cn("inline-flex items-center justify-center", className),
33
+ style: { opacity, transition: transitionStyle, ...style },
34
+ role: "status",
35
+ "aria-label": ariaLabel,
36
+ "aria-busy": "true",
37
+ ...rest,
38
+ children: /* @__PURE__ */ jsxRuntime.jsx(
39
+ "div",
40
+ {
41
+ style: {
42
+ width: size,
43
+ height: size,
44
+ backgroundColor: color,
45
+ borderRadius: "60% 40% 30% 70% / 60% 30% 70% 40%",
46
+ animation: `morph-blob ${effectiveDuration} ease-in-out infinite`
47
+ }
48
+ }
49
+ )
50
+ }
51
+ );
52
+ }
53
+ );
54
+ MorphBlob.displayName = "MorphBlob";
55
+ exports.MorphBlob = MorphBlob;
@@ -0,0 +1,55 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index71.js";
4
+ import { cn } from "./index3.js";
5
+ const MorphBlob = forwardRef(
6
+ ({
7
+ size = 80,
8
+ color = "#3b82f6",
9
+ speed = "normal",
10
+ respectMotionPreference = true,
11
+ delay = 0,
12
+ minDuration = 0,
13
+ transition,
14
+ className,
15
+ style,
16
+ testId = "morph-blob",
17
+ visible = true,
18
+ ariaLabel = "Loading...",
19
+ ...rest
20
+ }, ref) => {
21
+ const prefersReducedMotion = useReducedMotion();
22
+ const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
23
+ const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(visible, delay, minDuration, transition);
24
+ if (!shouldRender) return null;
25
+ return /* @__PURE__ */ jsx(
26
+ "div",
27
+ {
28
+ ref,
29
+ "data-testid": testId,
30
+ className: cn("inline-flex items-center justify-center", className),
31
+ style: { opacity, transition: transitionStyle, ...style },
32
+ role: "status",
33
+ "aria-label": ariaLabel,
34
+ "aria-busy": "true",
35
+ ...rest,
36
+ children: /* @__PURE__ */ jsx(
37
+ "div",
38
+ {
39
+ style: {
40
+ width: size,
41
+ height: size,
42
+ backgroundColor: color,
43
+ borderRadius: "60% 40% 30% 70% / 60% 30% 70% 40%",
44
+ animation: `morph-blob ${effectiveDuration} ease-in-out infinite`
45
+ }
46
+ }
47
+ )
48
+ }
49
+ );
50
+ }
51
+ );
52
+ MorphBlob.displayName = "MorphBlob";
53
+ export {
54
+ MorphBlob
55
+ };
@@ -0,0 +1,119 @@
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 hooks = require("./index71.cjs");
6
+ const classNames = require("./index3.cjs");
7
+ const LiquidFill = react.forwardRef(
8
+ ({
9
+ value,
10
+ size = 80,
11
+ color = "#3b82f6",
12
+ waveAmplitude = 4,
13
+ onComplete,
14
+ speed = "normal",
15
+ respectMotionPreference = true,
16
+ delay = 0,
17
+ minDuration = 0,
18
+ transition,
19
+ className,
20
+ style,
21
+ testId = "liquid-fill",
22
+ visible = true,
23
+ ariaLabel,
24
+ ...rest
25
+ }, ref) => {
26
+ const prefersReducedMotion = hooks.useReducedMotion();
27
+ const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
28
+ const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(visible, delay, minDuration, transition);
29
+ const onCompleteRef = react.useRef(onComplete);
30
+ onCompleteRef.current = onComplete;
31
+ const isIndeterminate = value === void 0;
32
+ const clampedValue = isIndeterminate ? 50 : Math.min(100, Math.max(0, value));
33
+ react.useEffect(() => {
34
+ if (!isIndeterminate && clampedValue === 100 && onCompleteRef.current) {
35
+ onCompleteRef.current();
36
+ }
37
+ }, [clampedValue, isIndeterminate]);
38
+ if (!shouldRender) return null;
39
+ const progressLabel = ariaLabel || (isIndeterminate ? "Loading..." : `Loading ${clampedValue}%`);
40
+ const fillBottom = `${clampedValue}%`;
41
+ return /* @__PURE__ */ jsxRuntime.jsx(
42
+ "div",
43
+ {
44
+ ref,
45
+ "data-testid": testId,
46
+ className: classNames.cn("inline-flex items-center justify-center", className),
47
+ style: { opacity, transition: transitionStyle, ...style },
48
+ role: "status",
49
+ "aria-label": progressLabel,
50
+ "aria-busy": "true",
51
+ ...rest,
52
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
53
+ "div",
54
+ {
55
+ className: "relative overflow-hidden rounded-full",
56
+ style: { width: size, height: size },
57
+ children: [
58
+ /* @__PURE__ */ jsxRuntime.jsx(
59
+ "div",
60
+ {
61
+ className: "absolute inset-0 rounded-full",
62
+ style: { backgroundColor: `${color}20` }
63
+ }
64
+ ),
65
+ /* @__PURE__ */ jsxRuntime.jsxs(
66
+ "div",
67
+ {
68
+ className: "absolute left-0 right-0 bottom-0",
69
+ style: {
70
+ height: fillBottom,
71
+ transition: isIndeterminate ? void 0 : "height 0.4s ease-in-out",
72
+ overflow: "hidden"
73
+ },
74
+ children: [
75
+ /* @__PURE__ */ jsxRuntime.jsx(
76
+ "div",
77
+ {
78
+ style: {
79
+ position: "absolute",
80
+ top: -waveAmplitude * 2,
81
+ left: 0,
82
+ width: "200%",
83
+ height: waveAmplitude * 4,
84
+ backgroundColor: color,
85
+ borderRadius: "40%",
86
+ animation: `liquid-wave ${effectiveDuration} linear infinite`
87
+ }
88
+ }
89
+ ),
90
+ /* @__PURE__ */ jsxRuntime.jsx(
91
+ "div",
92
+ {
93
+ className: "absolute bottom-0 left-0 right-0",
94
+ style: { backgroundColor: color, top: waveAmplitude * 2 }
95
+ }
96
+ )
97
+ ]
98
+ }
99
+ ),
100
+ !isIndeterminate && /* @__PURE__ */ jsxRuntime.jsxs(
101
+ "span",
102
+ {
103
+ className: "absolute inset-0 flex items-center justify-center text-xs font-bold",
104
+ style: { color: clampedValue > 50 ? "#fff" : color },
105
+ children: [
106
+ clampedValue,
107
+ "%"
108
+ ]
109
+ }
110
+ )
111
+ ]
112
+ }
113
+ )
114
+ }
115
+ );
116
+ }
117
+ );
118
+ LiquidFill.displayName = "LiquidFill";
119
+ exports.LiquidFill = LiquidFill;
@@ -0,0 +1,119 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useRef, useEffect } from "react";
3
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index71.js";
4
+ import { cn } from "./index3.js";
5
+ const LiquidFill = forwardRef(
6
+ ({
7
+ value,
8
+ size = 80,
9
+ color = "#3b82f6",
10
+ waveAmplitude = 4,
11
+ onComplete,
12
+ speed = "normal",
13
+ respectMotionPreference = true,
14
+ delay = 0,
15
+ minDuration = 0,
16
+ transition,
17
+ className,
18
+ style,
19
+ testId = "liquid-fill",
20
+ visible = true,
21
+ ariaLabel,
22
+ ...rest
23
+ }, ref) => {
24
+ const prefersReducedMotion = useReducedMotion();
25
+ const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
26
+ const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(visible, delay, minDuration, transition);
27
+ const onCompleteRef = useRef(onComplete);
28
+ onCompleteRef.current = onComplete;
29
+ const isIndeterminate = value === void 0;
30
+ const clampedValue = isIndeterminate ? 50 : Math.min(100, Math.max(0, value));
31
+ useEffect(() => {
32
+ if (!isIndeterminate && clampedValue === 100 && onCompleteRef.current) {
33
+ onCompleteRef.current();
34
+ }
35
+ }, [clampedValue, isIndeterminate]);
36
+ if (!shouldRender) return null;
37
+ const progressLabel = ariaLabel || (isIndeterminate ? "Loading..." : `Loading ${clampedValue}%`);
38
+ const fillBottom = `${clampedValue}%`;
39
+ return /* @__PURE__ */ jsx(
40
+ "div",
41
+ {
42
+ ref,
43
+ "data-testid": testId,
44
+ className: cn("inline-flex items-center justify-center", className),
45
+ style: { opacity, transition: transitionStyle, ...style },
46
+ role: "status",
47
+ "aria-label": progressLabel,
48
+ "aria-busy": "true",
49
+ ...rest,
50
+ children: /* @__PURE__ */ jsxs(
51
+ "div",
52
+ {
53
+ className: "relative overflow-hidden rounded-full",
54
+ style: { width: size, height: size },
55
+ children: [
56
+ /* @__PURE__ */ jsx(
57
+ "div",
58
+ {
59
+ className: "absolute inset-0 rounded-full",
60
+ style: { backgroundColor: `${color}20` }
61
+ }
62
+ ),
63
+ /* @__PURE__ */ jsxs(
64
+ "div",
65
+ {
66
+ className: "absolute left-0 right-0 bottom-0",
67
+ style: {
68
+ height: fillBottom,
69
+ transition: isIndeterminate ? void 0 : "height 0.4s ease-in-out",
70
+ overflow: "hidden"
71
+ },
72
+ children: [
73
+ /* @__PURE__ */ jsx(
74
+ "div",
75
+ {
76
+ style: {
77
+ position: "absolute",
78
+ top: -waveAmplitude * 2,
79
+ left: 0,
80
+ width: "200%",
81
+ height: waveAmplitude * 4,
82
+ backgroundColor: color,
83
+ borderRadius: "40%",
84
+ animation: `liquid-wave ${effectiveDuration} linear infinite`
85
+ }
86
+ }
87
+ ),
88
+ /* @__PURE__ */ jsx(
89
+ "div",
90
+ {
91
+ className: "absolute bottom-0 left-0 right-0",
92
+ style: { backgroundColor: color, top: waveAmplitude * 2 }
93
+ }
94
+ )
95
+ ]
96
+ }
97
+ ),
98
+ !isIndeterminate && /* @__PURE__ */ jsxs(
99
+ "span",
100
+ {
101
+ className: "absolute inset-0 flex items-center justify-center text-xs font-bold",
102
+ style: { color: clampedValue > 50 ? "#fff" : color },
103
+ children: [
104
+ clampedValue,
105
+ "%"
106
+ ]
107
+ }
108
+ )
109
+ ]
110
+ }
111
+ )
112
+ }
113
+ );
114
+ }
115
+ );
116
+ LiquidFill.displayName = "LiquidFill";
117
+ export {
118
+ LiquidFill
119
+ };
@@ -0,0 +1,70 @@
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 hooks = require("./index71.cjs");
7
+ const classNames = require("./index3.cjs");
8
+ const WaveCircle = react.forwardRef(
9
+ ({
10
+ size = 80,
11
+ color = "#3b82f6",
12
+ ringCount = 3,
13
+ speed = "normal",
14
+ respectMotionPreference = true,
15
+ delay = 0,
16
+ minDuration = 0,
17
+ transition,
18
+ className,
19
+ style,
20
+ testId = "wave-circle",
21
+ visible = true,
22
+ ariaLabel = "Loading...",
23
+ ...rest
24
+ }, ref) => {
25
+ const prefersReducedMotion = hooks.useReducedMotion();
26
+ const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
27
+ const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(visible, delay, minDuration, transition);
28
+ if (!shouldRender) return null;
29
+ const clampedCount = Math.min(5, Math.max(2, ringCount));
30
+ const durationMs = colors.parseDurationMs(effectiveDuration);
31
+ return /* @__PURE__ */ jsxRuntime.jsxs(
32
+ "div",
33
+ {
34
+ ref,
35
+ "data-testid": testId,
36
+ className: classNames.cn("relative inline-flex items-center justify-center", className),
37
+ style: { width: size, height: size, opacity, transition: transitionStyle, ...style },
38
+ role: "status",
39
+ "aria-label": ariaLabel,
40
+ "aria-busy": "true",
41
+ ...rest,
42
+ children: [
43
+ /* @__PURE__ */ jsxRuntime.jsx(
44
+ "div",
45
+ {
46
+ className: "absolute rounded-full z-10",
47
+ style: { width: size * 0.15, height: size * 0.15, backgroundColor: color }
48
+ }
49
+ ),
50
+ Array.from({ length: clampedCount }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(
51
+ "div",
52
+ {
53
+ className: "absolute rounded-full border-2",
54
+ style: {
55
+ width: size,
56
+ height: size,
57
+ borderColor: color,
58
+ animation: `wave-circle-expand ${effectiveDuration} ease-out infinite`,
59
+ animationDelay: `${i / clampedCount * durationMs}ms`
60
+ }
61
+ },
62
+ i
63
+ ))
64
+ ]
65
+ }
66
+ );
67
+ }
68
+ );
69
+ WaveCircle.displayName = "WaveCircle";
70
+ exports.WaveCircle = WaveCircle;
@@ -0,0 +1,70 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { parseDurationMs } from "./index4.js";
4
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index71.js";
5
+ import { cn } from "./index3.js";
6
+ const WaveCircle = forwardRef(
7
+ ({
8
+ size = 80,
9
+ color = "#3b82f6",
10
+ ringCount = 3,
11
+ speed = "normal",
12
+ respectMotionPreference = true,
13
+ delay = 0,
14
+ minDuration = 0,
15
+ transition,
16
+ className,
17
+ style,
18
+ testId = "wave-circle",
19
+ visible = true,
20
+ ariaLabel = "Loading...",
21
+ ...rest
22
+ }, ref) => {
23
+ const prefersReducedMotion = useReducedMotion();
24
+ const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
25
+ const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(visible, delay, minDuration, transition);
26
+ if (!shouldRender) return null;
27
+ const clampedCount = Math.min(5, Math.max(2, ringCount));
28
+ const durationMs = parseDurationMs(effectiveDuration);
29
+ return /* @__PURE__ */ jsxs(
30
+ "div",
31
+ {
32
+ ref,
33
+ "data-testid": testId,
34
+ className: cn("relative inline-flex items-center justify-center", className),
35
+ style: { width: size, height: size, opacity, transition: transitionStyle, ...style },
36
+ role: "status",
37
+ "aria-label": ariaLabel,
38
+ "aria-busy": "true",
39
+ ...rest,
40
+ children: [
41
+ /* @__PURE__ */ jsx(
42
+ "div",
43
+ {
44
+ className: "absolute rounded-full z-10",
45
+ style: { width: size * 0.15, height: size * 0.15, backgroundColor: color }
46
+ }
47
+ ),
48
+ Array.from({ length: clampedCount }, (_, i) => /* @__PURE__ */ jsx(
49
+ "div",
50
+ {
51
+ className: "absolute rounded-full border-2",
52
+ style: {
53
+ width: size,
54
+ height: size,
55
+ borderColor: color,
56
+ animation: `wave-circle-expand ${effectiveDuration} ease-out infinite`,
57
+ animationDelay: `${i / clampedCount * durationMs}ms`
58
+ }
59
+ },
60
+ i
61
+ ))
62
+ ]
63
+ }
64
+ );
65
+ }
66
+ );
67
+ WaveCircle.displayName = "WaveCircle";
68
+ export {
69
+ WaveCircle
70
+ };
@@ -0,0 +1,66 @@
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 hooks = require("./index71.cjs");
6
+ const classNames = require("./index3.cjs");
7
+ const GradientSpinner = react.forwardRef(
8
+ ({
9
+ size = 48,
10
+ color = "#3b82f6",
11
+ secondaryColor = "#8b5cf6",
12
+ thickness = 4,
13
+ backgroundColor = "white",
14
+ speed = "normal",
15
+ respectMotionPreference = true,
16
+ delay = 0,
17
+ minDuration = 0,
18
+ transition,
19
+ className,
20
+ style,
21
+ testId = "gradient-spinner",
22
+ visible = true,
23
+ ariaLabel = "Loading...",
24
+ ...rest
25
+ }, ref) => {
26
+ const prefersReducedMotion = hooks.useReducedMotion();
27
+ const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
28
+ const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(visible, delay, minDuration, transition);
29
+ if (!shouldRender) return null;
30
+ const inner = size - thickness * 2;
31
+ return /* @__PURE__ */ jsxRuntime.jsxs(
32
+ "div",
33
+ {
34
+ ref,
35
+ "data-testid": testId,
36
+ className: classNames.cn("relative inline-flex items-center justify-center", className),
37
+ style: { width: size, height: size, opacity, transition: transitionStyle, ...style },
38
+ role: "status",
39
+ "aria-label": ariaLabel,
40
+ "aria-busy": "true",
41
+ ...rest,
42
+ children: [
43
+ /* @__PURE__ */ jsxRuntime.jsx(
44
+ "div",
45
+ {
46
+ className: "absolute inset-0 rounded-full",
47
+ style: {
48
+ background: `conic-gradient(from 0deg, ${color}, ${secondaryColor}, transparent)`,
49
+ animation: `gradient-spin ${effectiveDuration} linear infinite`
50
+ }
51
+ }
52
+ ),
53
+ /* @__PURE__ */ jsxRuntime.jsx(
54
+ "div",
55
+ {
56
+ className: "absolute rounded-full",
57
+ style: { width: inner, height: inner, backgroundColor }
58
+ }
59
+ )
60
+ ]
61
+ }
62
+ );
63
+ }
64
+ );
65
+ GradientSpinner.displayName = "GradientSpinner";
66
+ exports.GradientSpinner = GradientSpinner;
@@ -0,0 +1,66 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index71.js";
4
+ import { cn } from "./index3.js";
5
+ const GradientSpinner = forwardRef(
6
+ ({
7
+ size = 48,
8
+ color = "#3b82f6",
9
+ secondaryColor = "#8b5cf6",
10
+ thickness = 4,
11
+ backgroundColor = "white",
12
+ speed = "normal",
13
+ respectMotionPreference = true,
14
+ delay = 0,
15
+ minDuration = 0,
16
+ transition,
17
+ className,
18
+ style,
19
+ testId = "gradient-spinner",
20
+ visible = true,
21
+ ariaLabel = "Loading...",
22
+ ...rest
23
+ }, ref) => {
24
+ const prefersReducedMotion = useReducedMotion();
25
+ const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
26
+ const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(visible, delay, minDuration, transition);
27
+ if (!shouldRender) return null;
28
+ const inner = size - thickness * 2;
29
+ return /* @__PURE__ */ jsxs(
30
+ "div",
31
+ {
32
+ ref,
33
+ "data-testid": testId,
34
+ className: cn("relative inline-flex items-center justify-center", className),
35
+ style: { width: size, height: size, opacity, transition: transitionStyle, ...style },
36
+ role: "status",
37
+ "aria-label": ariaLabel,
38
+ "aria-busy": "true",
39
+ ...rest,
40
+ children: [
41
+ /* @__PURE__ */ jsx(
42
+ "div",
43
+ {
44
+ className: "absolute inset-0 rounded-full",
45
+ style: {
46
+ background: `conic-gradient(from 0deg, ${color}, ${secondaryColor}, transparent)`,
47
+ animation: `gradient-spin ${effectiveDuration} linear infinite`
48
+ }
49
+ }
50
+ ),
51
+ /* @__PURE__ */ jsx(
52
+ "div",
53
+ {
54
+ className: "absolute rounded-full",
55
+ style: { width: inner, height: inner, backgroundColor }
56
+ }
57
+ )
58
+ ]
59
+ }
60
+ );
61
+ }
62
+ );
63
+ GradientSpinner.displayName = "GradientSpinner";
64
+ export {
65
+ GradientSpinner
66
+ };