premium-react-loaders 4.0.0 → 4.1.1

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 (163) hide show
  1. package/README.md +21 -6
  2. package/dist/components/index.d.ts +1 -0
  3. package/dist/components/index.d.ts.map +1 -1
  4. package/dist/components/neon/NeonPulse.d.ts +12 -0
  5. package/dist/components/neon/NeonPulse.d.ts.map +1 -0
  6. package/dist/components/neon/NeonSpinner.d.ts +12 -0
  7. package/dist/components/neon/NeonSpinner.d.ts.map +1 -0
  8. package/dist/components/neon/NeonText.d.ts +12 -0
  9. package/dist/components/neon/NeonText.d.ts.map +1 -0
  10. package/dist/components/neon/index.d.ts +4 -0
  11. package/dist/components/neon/index.d.ts.map +1 -0
  12. package/dist/components/particle/ParticleField.d.ts +3 -0
  13. package/dist/components/particle/ParticleField.d.ts.map +1 -0
  14. package/dist/components/particle/ParticleTrail.d.ts +12 -0
  15. package/dist/components/particle/ParticleTrail.d.ts.map +1 -0
  16. package/dist/components/particle/index.d.ts +2 -0
  17. package/dist/components/particle/index.d.ts.map +1 -1
  18. package/dist/components/status/InfoIndicator.d.ts +29 -0
  19. package/dist/components/status/InfoIndicator.d.ts.map +1 -0
  20. package/dist/components/status/WarningIndicator.d.ts +29 -0
  21. package/dist/components/status/WarningIndicator.d.ts.map +1 -0
  22. package/dist/components/status/index.d.ts +2 -0
  23. package/dist/components/status/index.d.ts.map +1 -1
  24. package/dist/index.cjs +41 -27
  25. package/dist/index.js +41 -27
  26. package/dist/index10.cjs +1 -1
  27. package/dist/index10.js +1 -1
  28. package/dist/index11.cjs +1 -1
  29. package/dist/index11.js +1 -1
  30. package/dist/index12.cjs +1 -1
  31. package/dist/index12.js +1 -1
  32. package/dist/index13.cjs +1 -1
  33. package/dist/index13.js +1 -1
  34. package/dist/index14.cjs +1 -1
  35. package/dist/index14.js +1 -1
  36. package/dist/index15.cjs +1 -1
  37. package/dist/index15.js +1 -1
  38. package/dist/index17.cjs +1 -1
  39. package/dist/index17.js +1 -1
  40. package/dist/index18.cjs +1 -1
  41. package/dist/index18.js +1 -1
  42. package/dist/index19.cjs +1 -1
  43. package/dist/index19.js +1 -1
  44. package/dist/index20.cjs +1 -1
  45. package/dist/index20.js +1 -1
  46. package/dist/index21.cjs +1 -1
  47. package/dist/index21.js +1 -1
  48. package/dist/index22.cjs +1 -1
  49. package/dist/index22.js +1 -1
  50. package/dist/index23.cjs +1 -1
  51. package/dist/index23.js +1 -1
  52. package/dist/index24.cjs +1 -1
  53. package/dist/index24.js +1 -1
  54. package/dist/index25.cjs +1 -1
  55. package/dist/index25.js +1 -1
  56. package/dist/index26.cjs +1 -1
  57. package/dist/index26.js +1 -1
  58. package/dist/index27.cjs +1 -1
  59. package/dist/index27.js +1 -1
  60. package/dist/index28.cjs +1 -1
  61. package/dist/index28.js +1 -1
  62. package/dist/index29.cjs +1 -1
  63. package/dist/index29.js +1 -1
  64. package/dist/index30.cjs +1 -1
  65. package/dist/index30.js +1 -1
  66. package/dist/index31.cjs +1 -1
  67. package/dist/index31.js +1 -1
  68. package/dist/index32.cjs +1 -1
  69. package/dist/index32.js +1 -1
  70. package/dist/index33.cjs +1 -1
  71. package/dist/index33.js +1 -1
  72. package/dist/index34.cjs +1 -1
  73. package/dist/index34.js +1 -1
  74. package/dist/index35.cjs +1 -1
  75. package/dist/index35.js +1 -1
  76. package/dist/index36.cjs +1 -1
  77. package/dist/index36.js +1 -1
  78. package/dist/index37.cjs +59 -145
  79. package/dist/index37.js +61 -147
  80. package/dist/index38.cjs +32 -53
  81. package/dist/index38.js +33 -54
  82. package/dist/index39.cjs +138 -84
  83. package/dist/index39.js +140 -86
  84. package/dist/index40.cjs +33 -106
  85. package/dist/index40.js +34 -107
  86. package/dist/index41.cjs +66 -50
  87. package/dist/index41.js +66 -50
  88. package/dist/index42.cjs +123 -44
  89. package/dist/index42.js +124 -45
  90. package/dist/index43.cjs +43 -85
  91. package/dist/index43.js +44 -86
  92. package/dist/index44.cjs +35 -27
  93. package/dist/index44.js +35 -27
  94. package/dist/index45.cjs +87 -58
  95. package/dist/index45.js +87 -58
  96. package/dist/index46.cjs +35 -88
  97. package/dist/index46.js +36 -89
  98. package/dist/index47.cjs +62 -58
  99. package/dist/index47.js +63 -59
  100. package/dist/index48.cjs +87 -110
  101. package/dist/index48.js +88 -111
  102. package/dist/index49.cjs +48 -109
  103. package/dist/index49.js +49 -110
  104. package/dist/index50.cjs +110 -62
  105. package/dist/index50.js +111 -63
  106. package/dist/index51.cjs +104 -49
  107. package/dist/index51.js +104 -49
  108. package/dist/index52.cjs +43 -77
  109. package/dist/index52.js +44 -78
  110. package/dist/index53.cjs +56 -56
  111. package/dist/index53.js +56 -56
  112. package/dist/index54.cjs +104 -149
  113. package/dist/index54.js +106 -151
  114. package/dist/index55.cjs +97 -38
  115. package/dist/index55.js +99 -40
  116. package/dist/index56.cjs +161 -27
  117. package/dist/index56.js +162 -28
  118. package/dist/index57.cjs +36 -102
  119. package/dist/index57.js +38 -104
  120. package/dist/index58.cjs +19 -34
  121. package/dist/index58.js +20 -35
  122. package/dist/index59.cjs +87 -34
  123. package/dist/index59.js +89 -36
  124. package/dist/index60.cjs +25 -23
  125. package/dist/index60.js +25 -23
  126. package/dist/index61.cjs +32 -65
  127. package/dist/index61.js +34 -67
  128. package/dist/index62.cjs +29 -36
  129. package/dist/index62.js +30 -37
  130. package/dist/index63.cjs +66 -59
  131. package/dist/index63.js +69 -62
  132. package/dist/index64.cjs +71 -121
  133. package/dist/index64.js +72 -122
  134. package/dist/index65.cjs +92 -0
  135. package/dist/index65.js +92 -0
  136. package/dist/index66.cjs +76 -0
  137. package/dist/index66.js +76 -0
  138. package/dist/index67.cjs +76 -0
  139. package/dist/index67.js +76 -0
  140. package/dist/index68.cjs +64 -0
  141. package/dist/index68.js +64 -0
  142. package/dist/index69.cjs +60 -0
  143. package/dist/index69.js +60 -0
  144. package/dist/index7.cjs +1 -1
  145. package/dist/index7.js +1 -1
  146. package/dist/index70.cjs +57 -0
  147. package/dist/index70.js +57 -0
  148. package/dist/index71.cjs +125 -0
  149. package/dist/index71.js +125 -0
  150. package/dist/index8.cjs +1 -1
  151. package/dist/index8.js +1 -1
  152. package/dist/index9.cjs +1 -1
  153. package/dist/index9.js +1 -1
  154. package/dist/premium-react-loaders.css +85 -0
  155. package/dist/types/index.d.ts +1 -0
  156. package/dist/types/index.d.ts.map +1 -1
  157. package/dist/types/neon.d.ts +26 -0
  158. package/dist/types/neon.d.ts.map +1 -0
  159. package/dist/types/particle.d.ts +18 -0
  160. package/dist/types/particle.d.ts.map +1 -1
  161. package/dist/types/status.d.ts +30 -0
  162. package/dist/types/status.d.ts.map +1 -1
  163. package/package.json +1 -1
package/dist/index45.cjs CHANGED
@@ -2,27 +2,28 @@
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("./index64.cjs");
5
+ const hooks = require("./index71.cjs");
6
+ const colors = require("./index4.cjs");
6
7
  const classNames = require("./index3.cjs");
7
- const BouncingBalls = react.forwardRef(
8
+ const AtomLoader = react.forwardRef(
8
9
  ({
9
10
  size = "md",
10
11
  color = "#3b82f6",
11
12
  secondaryColor,
12
- ballCount = 3,
13
- ballSize = 14,
14
- gap = 10,
15
- bounceHeight = 1.5,
16
- shadow = true,
17
- squash = true,
13
+ orbits = 3,
14
+ nucleusSize = 8,
15
+ electronSize = 5,
16
+ showNucleus = true,
17
+ thickness = 1,
18
18
  speed = "normal",
19
+ reverse = false,
19
20
  respectMotionPreference = true,
20
21
  delay = 0,
21
22
  minDuration = 0,
22
23
  transition,
23
24
  className,
24
25
  style,
25
- testId = "bouncing-balls",
26
+ testId = "atom-loader",
26
27
  visible = true,
27
28
  ariaLabel = "Loading...",
28
29
  ...rest
@@ -36,19 +37,18 @@ const BouncingBalls = react.forwardRef(
36
37
  transition
37
38
  );
38
39
  if (!shouldRender) return null;
39
- const totalWidth = ballCount * ballSize + (ballCount - 1) * gap;
40
- const bounceDistance = ballSize * bounceHeight;
41
- const shadowSize = ballSize * 0.8;
42
- const staggerDelay = 200;
40
+ const normalizedSize = colors.normalizeSize(size);
41
+ const durationNum = parseInt(effectiveDuration, 10);
42
+ const orbitAngles = Array.from({ length: orbits }, (_, i) => 180 / orbits * i);
43
43
  return /* @__PURE__ */ jsxRuntime.jsx(
44
44
  "div",
45
45
  {
46
46
  ref,
47
47
  "data-testid": testId,
48
- className: classNames.cn("inline-flex items-end justify-center", className),
48
+ className: classNames.cn("inline-flex items-center justify-center", className),
49
49
  style: {
50
- width: totalWidth,
51
- height: ballSize + bounceDistance + (shadow ? 8 : 0),
50
+ width: normalizedSize,
51
+ height: normalizedSize,
52
52
  opacity,
53
53
  transition: transitionStyle,
54
54
  ...style
@@ -57,54 +57,83 @@ const BouncingBalls = react.forwardRef(
57
57
  "aria-label": ariaLabel,
58
58
  "aria-busy": "true",
59
59
  ...rest,
60
- children: Array.from({ length: ballCount }, (_, index) => {
61
- const ballColor = secondaryColor && index % 2 === 1 ? secondaryColor : color;
62
- const animationDelay = `${index * staggerDelay}ms`;
63
- return /* @__PURE__ */ jsxRuntime.jsxs(
60
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative w-full h-full", children: [
61
+ showNucleus && /* @__PURE__ */ jsxRuntime.jsx(
64
62
  "div",
65
63
  {
66
- className: "relative flex flex-col items-center",
64
+ className: "absolute rounded-full",
67
65
  style: {
68
- marginRight: index < ballCount - 1 ? gap : 0
69
- },
70
- children: [
71
- /* @__PURE__ */ jsxRuntime.jsx(
72
- "div",
73
- {
74
- className: "rounded-full",
75
- style: {
76
- width: ballSize,
77
- height: ballSize,
78
- backgroundColor: ballColor,
79
- animation: squash ? `bounce-ball-squash ${effectiveDuration} ease-in-out infinite` : `bounce-ball ${effectiveDuration} ease-in-out infinite`,
80
- animationDelay,
81
- ["--bounce-height"]: `${bounceDistance}px`,
82
- transformOrigin: "center bottom"
66
+ width: nucleusSize,
67
+ height: nucleusSize,
68
+ backgroundColor: secondaryColor || color,
69
+ left: "50%",
70
+ top: "50%",
71
+ transform: "translate(-50%, -50%)"
72
+ }
73
+ }
74
+ ),
75
+ orbitAngles.map((angle, index) => {
76
+ const orbitDuration = durationNum + index * 150;
77
+ const shouldReverse = index % 2 === 1 ? !reverse : reverse;
78
+ const electronColor = secondaryColor && index % 2 === 1 ? secondaryColor : color;
79
+ return /* @__PURE__ */ jsxRuntime.jsxs(
80
+ "div",
81
+ {
82
+ className: "absolute inset-0",
83
+ style: {
84
+ transform: `rotate(${angle}deg)`
85
+ },
86
+ children: [
87
+ /* @__PURE__ */ jsxRuntime.jsx(
88
+ "div",
89
+ {
90
+ className: "absolute rounded-full",
91
+ style: {
92
+ width: "100%",
93
+ height: "60%",
94
+ left: "0",
95
+ top: "20%",
96
+ border: `${thickness}px solid ${color}20`
97
+ }
83
98
  }
84
- }
85
- ),
86
- shadow && /* @__PURE__ */ jsxRuntime.jsx(
87
- "div",
88
- {
89
- className: "absolute bottom-0 rounded-full",
90
- style: {
91
- width: shadowSize,
92
- height: shadowSize * 0.3,
93
- backgroundColor: "rgba(0, 0, 0, 0.2)",
94
- animation: `bounce-shadow ${effectiveDuration} ease-in-out infinite`,
95
- animationDelay,
96
- filter: "blur(2px)"
99
+ ),
100
+ /* @__PURE__ */ jsxRuntime.jsx(
101
+ "div",
102
+ {
103
+ className: "absolute",
104
+ style: {
105
+ width: "100%",
106
+ height: "60%",
107
+ left: "0",
108
+ top: "20%",
109
+ animation: `atom-orbit ${orbitDuration}ms linear infinite`,
110
+ animationDirection: shouldReverse ? "reverse" : "normal"
111
+ },
112
+ children: /* @__PURE__ */ jsxRuntime.jsx(
113
+ "div",
114
+ {
115
+ className: "absolute rounded-full",
116
+ style: {
117
+ width: electronSize,
118
+ height: electronSize,
119
+ backgroundColor: electronColor,
120
+ left: "50%",
121
+ top: 0,
122
+ transform: "translate(-50%, -50%)"
123
+ }
124
+ }
125
+ )
97
126
  }
98
- }
99
- )
100
- ]
101
- },
102
- index
103
- );
104
- })
127
+ )
128
+ ]
129
+ },
130
+ index
131
+ );
132
+ })
133
+ ] })
105
134
  }
106
135
  );
107
136
  }
108
137
  );
109
- BouncingBalls.displayName = "BouncingBalls";
110
- exports.BouncingBalls = BouncingBalls;
138
+ AtomLoader.displayName = "AtomLoader";
139
+ exports.AtomLoader = AtomLoader;
package/dist/index45.js CHANGED
@@ -1,26 +1,27 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index64.js";
3
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index71.js";
4
+ import { normalizeSize } from "./index4.js";
4
5
  import { cn } from "./index3.js";
5
- const BouncingBalls = forwardRef(
6
+ const AtomLoader = forwardRef(
6
7
  ({
7
8
  size = "md",
8
9
  color = "#3b82f6",
9
10
  secondaryColor,
10
- ballCount = 3,
11
- ballSize = 14,
12
- gap = 10,
13
- bounceHeight = 1.5,
14
- shadow = true,
15
- squash = true,
11
+ orbits = 3,
12
+ nucleusSize = 8,
13
+ electronSize = 5,
14
+ showNucleus = true,
15
+ thickness = 1,
16
16
  speed = "normal",
17
+ reverse = false,
17
18
  respectMotionPreference = true,
18
19
  delay = 0,
19
20
  minDuration = 0,
20
21
  transition,
21
22
  className,
22
23
  style,
23
- testId = "bouncing-balls",
24
+ testId = "atom-loader",
24
25
  visible = true,
25
26
  ariaLabel = "Loading...",
26
27
  ...rest
@@ -34,19 +35,18 @@ const BouncingBalls = forwardRef(
34
35
  transition
35
36
  );
36
37
  if (!shouldRender) return null;
37
- const totalWidth = ballCount * ballSize + (ballCount - 1) * gap;
38
- const bounceDistance = ballSize * bounceHeight;
39
- const shadowSize = ballSize * 0.8;
40
- const staggerDelay = 200;
38
+ const normalizedSize = normalizeSize(size);
39
+ const durationNum = parseInt(effectiveDuration, 10);
40
+ const orbitAngles = Array.from({ length: orbits }, (_, i) => 180 / orbits * i);
41
41
  return /* @__PURE__ */ jsx(
42
42
  "div",
43
43
  {
44
44
  ref,
45
45
  "data-testid": testId,
46
- className: cn("inline-flex items-end justify-center", className),
46
+ className: cn("inline-flex items-center justify-center", className),
47
47
  style: {
48
- width: totalWidth,
49
- height: ballSize + bounceDistance + (shadow ? 8 : 0),
48
+ width: normalizedSize,
49
+ height: normalizedSize,
50
50
  opacity,
51
51
  transition: transitionStyle,
52
52
  ...style
@@ -55,56 +55,85 @@ const BouncingBalls = forwardRef(
55
55
  "aria-label": ariaLabel,
56
56
  "aria-busy": "true",
57
57
  ...rest,
58
- children: Array.from({ length: ballCount }, (_, index) => {
59
- const ballColor = secondaryColor && index % 2 === 1 ? secondaryColor : color;
60
- const animationDelay = `${index * staggerDelay}ms`;
61
- return /* @__PURE__ */ jsxs(
58
+ children: /* @__PURE__ */ jsxs("div", { className: "relative w-full h-full", children: [
59
+ showNucleus && /* @__PURE__ */ jsx(
62
60
  "div",
63
61
  {
64
- className: "relative flex flex-col items-center",
62
+ className: "absolute rounded-full",
65
63
  style: {
66
- marginRight: index < ballCount - 1 ? gap : 0
67
- },
68
- children: [
69
- /* @__PURE__ */ jsx(
70
- "div",
71
- {
72
- className: "rounded-full",
73
- style: {
74
- width: ballSize,
75
- height: ballSize,
76
- backgroundColor: ballColor,
77
- animation: squash ? `bounce-ball-squash ${effectiveDuration} ease-in-out infinite` : `bounce-ball ${effectiveDuration} ease-in-out infinite`,
78
- animationDelay,
79
- ["--bounce-height"]: `${bounceDistance}px`,
80
- transformOrigin: "center bottom"
64
+ width: nucleusSize,
65
+ height: nucleusSize,
66
+ backgroundColor: secondaryColor || color,
67
+ left: "50%",
68
+ top: "50%",
69
+ transform: "translate(-50%, -50%)"
70
+ }
71
+ }
72
+ ),
73
+ orbitAngles.map((angle, index) => {
74
+ const orbitDuration = durationNum + index * 150;
75
+ const shouldReverse = index % 2 === 1 ? !reverse : reverse;
76
+ const electronColor = secondaryColor && index % 2 === 1 ? secondaryColor : color;
77
+ return /* @__PURE__ */ jsxs(
78
+ "div",
79
+ {
80
+ className: "absolute inset-0",
81
+ style: {
82
+ transform: `rotate(${angle}deg)`
83
+ },
84
+ children: [
85
+ /* @__PURE__ */ jsx(
86
+ "div",
87
+ {
88
+ className: "absolute rounded-full",
89
+ style: {
90
+ width: "100%",
91
+ height: "60%",
92
+ left: "0",
93
+ top: "20%",
94
+ border: `${thickness}px solid ${color}20`
95
+ }
81
96
  }
82
- }
83
- ),
84
- shadow && /* @__PURE__ */ jsx(
85
- "div",
86
- {
87
- className: "absolute bottom-0 rounded-full",
88
- style: {
89
- width: shadowSize,
90
- height: shadowSize * 0.3,
91
- backgroundColor: "rgba(0, 0, 0, 0.2)",
92
- animation: `bounce-shadow ${effectiveDuration} ease-in-out infinite`,
93
- animationDelay,
94
- filter: "blur(2px)"
97
+ ),
98
+ /* @__PURE__ */ jsx(
99
+ "div",
100
+ {
101
+ className: "absolute",
102
+ style: {
103
+ width: "100%",
104
+ height: "60%",
105
+ left: "0",
106
+ top: "20%",
107
+ animation: `atom-orbit ${orbitDuration}ms linear infinite`,
108
+ animationDirection: shouldReverse ? "reverse" : "normal"
109
+ },
110
+ children: /* @__PURE__ */ jsx(
111
+ "div",
112
+ {
113
+ className: "absolute rounded-full",
114
+ style: {
115
+ width: electronSize,
116
+ height: electronSize,
117
+ backgroundColor: electronColor,
118
+ left: "50%",
119
+ top: 0,
120
+ transform: "translate(-50%, -50%)"
121
+ }
122
+ }
123
+ )
95
124
  }
96
- }
97
- )
98
- ]
99
- },
100
- index
101
- );
102
- })
125
+ )
126
+ ]
127
+ },
128
+ index
129
+ );
130
+ })
131
+ ] })
103
132
  }
104
133
  );
105
134
  }
106
135
  );
107
- BouncingBalls.displayName = "BouncingBalls";
136
+ AtomLoader.displayName = "AtomLoader";
108
137
  export {
109
- BouncingBalls
138
+ AtomLoader
110
139
  };
package/dist/index46.cjs CHANGED
@@ -2,27 +2,26 @@
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("./index64.cjs");
5
+ const hooks = require("./index71.cjs");
6
6
  const classNames = require("./index3.cjs");
7
- const colors = require("./index4.cjs");
8
- const InfinityLoader = react.forwardRef(
7
+ const BouncingDots = react.forwardRef(
9
8
  ({
10
9
  size = "md",
11
10
  color = "#3b82f6",
12
11
  secondaryColor,
13
- thickness = 3,
14
- gradient = false,
15
- showDot = false,
16
- dotSize = 6,
12
+ dotCount = 3,
13
+ dotSize = 10,
14
+ gap = 8,
15
+ bounceHeight = 1,
16
+ staggerDelay = 150,
17
17
  speed = "normal",
18
- reverse = false,
19
18
  respectMotionPreference = true,
20
19
  delay = 0,
21
20
  minDuration = 0,
22
21
  transition,
23
22
  className,
24
23
  style,
25
- testId = "infinity-loader",
24
+ testId = "bouncing-dots",
26
25
  visible = true,
27
26
  ariaLabel = "Loading...",
28
27
  ...rest
@@ -36,26 +35,17 @@ const InfinityLoader = react.forwardRef(
36
35
  transition
37
36
  );
38
37
  if (!shouldRender) return null;
39
- const normalizedSize = colors.normalizeSize(size);
40
- const sizeNum = parseInt(normalizedSize, 10);
41
- const width = sizeNum;
42
- const height = sizeNum * 0.5;
43
- const infinityPath = `M ${width * 0.15} ${height * 0.5}
44
- C ${width * 0.15} ${height * 0.1}, ${width * 0.4} ${height * 0.1}, ${width * 0.5} ${height * 0.5}
45
- C ${width * 0.6} ${height * 0.9}, ${width * 0.85} ${height * 0.9}, ${width * 0.85} ${height * 0.5}
46
- C ${width * 0.85} ${height * 0.1}, ${width * 0.6} ${height * 0.1}, ${width * 0.5} ${height * 0.5}
47
- C ${width * 0.4} ${height * 0.9}, ${width * 0.15} ${height * 0.9}, ${width * 0.15} ${height * 0.5}`;
48
- const gradientId = `infinity-gradient-${testId}`;
49
- const pathId = `infinity-path-${testId}`;
38
+ const totalWidth = dotCount * dotSize + (dotCount - 1) * gap;
39
+ const bounceDistance = dotSize * bounceHeight;
50
40
  return /* @__PURE__ */ jsxRuntime.jsx(
51
41
  "div",
52
42
  {
53
43
  ref,
54
44
  "data-testid": testId,
55
- className: classNames.cn("inline-flex items-center justify-center", className),
45
+ className: classNames.cn("inline-flex items-end justify-center", className),
56
46
  style: {
57
- width,
58
- height,
47
+ width: totalWidth,
48
+ height: dotSize + bounceDistance,
59
49
  opacity,
60
50
  transition: transitionStyle,
61
51
  ...style
@@ -64,72 +54,29 @@ const InfinityLoader = react.forwardRef(
64
54
  "aria-label": ariaLabel,
65
55
  "aria-busy": "true",
66
56
  ...rest,
67
- children: /* @__PURE__ */ jsxRuntime.jsxs(
68
- "svg",
69
- {
70
- width,
71
- height,
72
- viewBox: `0 0 ${width} ${height}`,
73
- fill: "none",
74
- children: [
75
- gradient && secondaryColor && /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
76
- /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: color }),
77
- /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: secondaryColor })
78
- ] }) }),
79
- /* @__PURE__ */ jsxRuntime.jsx(
80
- "path",
81
- {
82
- d: infinityPath,
83
- stroke: gradient && secondaryColor ? `url(#${gradientId})` : color,
84
- strokeWidth: thickness,
85
- strokeLinecap: "round",
86
- fill: "none",
87
- opacity: 0.2
88
- }
89
- ),
90
- /* @__PURE__ */ jsxRuntime.jsx(
91
- "path",
92
- {
93
- id: pathId,
94
- d: infinityPath,
95
- stroke: gradient && secondaryColor ? `url(#${gradientId})` : color,
96
- strokeWidth: thickness,
97
- strokeLinecap: "round",
98
- fill: "none",
99
- style: {
100
- strokeDasharray: "50 200",
101
- animation: `infinity-dash ${effectiveDuration} linear infinite`,
102
- animationDirection: reverse ? "reverse" : "normal"
103
- }
104
- }
105
- ),
106
- showDot && /* @__PURE__ */ jsxRuntime.jsx(
107
- "circle",
108
- {
109
- r: dotSize / 2,
110
- fill: secondaryColor || color,
111
- style: {
112
- animation: `infinity-dot ${effectiveDuration} linear infinite`,
113
- animationDirection: reverse ? "reverse" : "normal"
114
- },
115
- children: /* @__PURE__ */ jsxRuntime.jsx(
116
- "animateMotion",
117
- {
118
- dur: effectiveDuration,
119
- repeatCount: "indefinite",
120
- path: infinityPath,
121
- keyPoints: reverse ? "1;0" : "0;1",
122
- keyTimes: "0;1"
123
- }
124
- )
125
- }
126
- )
127
- ]
128
- }
129
- )
57
+ children: Array.from({ length: dotCount }, (_, index) => {
58
+ const dotColor = secondaryColor && index % 2 === 1 ? secondaryColor : color;
59
+ const animationDelay = `${index * staggerDelay}ms`;
60
+ return /* @__PURE__ */ jsxRuntime.jsx(
61
+ "div",
62
+ {
63
+ className: "rounded-full",
64
+ style: {
65
+ width: dotSize,
66
+ height: dotSize,
67
+ backgroundColor: dotColor,
68
+ marginRight: index < dotCount - 1 ? gap : 0,
69
+ animation: `bounce-dot ${effectiveDuration} ease-in-out infinite`,
70
+ animationDelay,
71
+ ["--bounce-height"]: `${bounceDistance}px`
72
+ }
73
+ },
74
+ index
75
+ );
76
+ })
130
77
  }
131
78
  );
132
79
  }
133
80
  );
134
- InfinityLoader.displayName = "InfinityLoader";
135
- exports.InfinityLoader = InfinityLoader;
81
+ BouncingDots.displayName = "BouncingDots";
82
+ exports.BouncingDots = BouncingDots;