premium-react-loaders 2.0.0 → 2.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 (72) hide show
  1. package/README.md +203 -3
  2. package/dist/components/pulse/TypingIndicator.d.ts.map +1 -1
  3. package/dist/context/ThemeContext.d.ts +84 -0
  4. package/dist/context/ThemeContext.d.ts.map +1 -0
  5. package/dist/context/index.d.ts +3 -0
  6. package/dist/context/index.d.ts.map +1 -0
  7. package/dist/hooks/index.d.ts +3 -0
  8. package/dist/hooks/index.d.ts.map +1 -0
  9. package/dist/hooks/useLoader.d.ts +56 -0
  10. package/dist/hooks/useLoader.d.ts.map +1 -0
  11. package/dist/index.cjs +31 -26
  12. package/dist/index.d.ts +5 -1
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +31 -26
  15. package/dist/index10.cjs +20 -31
  16. package/dist/index10.js +20 -31
  17. package/dist/index11.cjs +47 -25
  18. package/dist/index11.js +47 -25
  19. package/dist/index12.cjs +30 -126
  20. package/dist/index12.js +31 -127
  21. package/dist/index13.cjs +30 -53
  22. package/dist/index13.js +30 -53
  23. package/dist/index14.cjs +127 -43
  24. package/dist/index14.js +128 -44
  25. package/dist/index15.cjs +58 -37
  26. package/dist/index15.js +59 -38
  27. package/dist/index16.cjs +24 -36
  28. package/dist/index16.js +24 -36
  29. package/dist/index17.cjs +19 -21
  30. package/dist/index17.js +19 -21
  31. package/dist/index18.cjs +25 -20
  32. package/dist/index18.js +25 -20
  33. package/dist/index19.cjs +22 -32
  34. package/dist/index19.js +22 -32
  35. package/dist/index20.cjs +26 -35
  36. package/dist/index20.js +28 -37
  37. package/dist/index21.cjs +40 -76
  38. package/dist/index21.js +42 -78
  39. package/dist/index22.cjs +53 -102
  40. package/dist/index22.js +54 -103
  41. package/dist/index23.cjs +46 -80
  42. package/dist/index23.js +47 -81
  43. package/dist/index24.cjs +105 -103
  44. package/dist/index24.js +107 -105
  45. package/dist/index25.cjs +108 -27
  46. package/dist/index25.js +111 -30
  47. package/dist/index26.cjs +104 -36
  48. package/dist/index26.js +106 -38
  49. package/dist/index27.cjs +22 -30
  50. package/dist/index27.js +23 -31
  51. package/dist/index28.cjs +30 -29
  52. package/dist/index28.js +31 -30
  53. package/dist/index29.cjs +49 -52
  54. package/dist/index29.js +50 -53
  55. package/dist/index30.cjs +74 -121
  56. package/dist/index30.js +75 -122
  57. package/dist/index31.cjs +82 -0
  58. package/dist/index31.js +82 -0
  59. package/dist/index32.cjs +125 -0
  60. package/dist/index32.js +125 -0
  61. package/dist/index5.cjs +11 -72
  62. package/dist/index5.js +12 -73
  63. package/dist/index6.cjs +86 -65
  64. package/dist/index6.js +87 -66
  65. package/dist/index7.cjs +40 -20
  66. package/dist/index7.js +40 -20
  67. package/dist/index8.cjs +34 -21
  68. package/dist/index8.js +34 -21
  69. package/dist/index9.cjs +21 -55
  70. package/dist/index9.js +22 -56
  71. package/dist/premium-react-loaders.css +38 -6
  72. package/package.json +1 -1
package/dist/index26.js CHANGED
@@ -1,28 +1,29 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
- import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index30.js";
4
- import { normalizeSize, parseSizeToNumber } from "./index4.js";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, Fragment } from "react";
3
+ import { useLoaderVisibility } from "./index32.js";
5
4
  import { cn } from "./index3.js";
6
- const PulseWave = forwardRef(
5
+ const ProgressSteps = forwardRef(
7
6
  ({
8
- size = "md",
7
+ steps,
8
+ currentStep,
9
+ labels,
10
+ showNumbers = true,
11
+ orientation = "horizontal",
12
+ connector = "line",
9
13
  color = "#3b82f6",
10
- barCount = 5,
11
- speed = "normal",
12
- reverse = false,
13
- respectMotionPreference = true,
14
+ completedColor,
15
+ activeColor,
16
+ inactiveColor = "#e0e0e0",
14
17
  delay = 0,
15
18
  minDuration = 0,
16
19
  transition,
17
20
  className,
18
21
  style,
19
- testId = "pulse-wave",
22
+ testId = "progress-steps",
20
23
  visible = true,
21
- ariaLabel = "Loading...",
24
+ ariaLabel = "Progress steps",
22
25
  ...rest
23
26
  }, ref) => {
24
- const prefersReducedMotion = useReducedMotion();
25
- const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
26
27
  const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(
27
28
  visible,
28
29
  delay,
@@ -30,47 +31,114 @@ const PulseWave = forwardRef(
30
31
  transition
31
32
  );
32
33
  if (!shouldRender) return null;
33
- const sizeValue = parseSizeToNumber(size, 40);
34
- const barWidth = Math.floor(sizeValue / (barCount * 2.5));
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";
35
50
  return /* @__PURE__ */ jsx(
36
51
  "div",
37
52
  {
38
53
  ref,
39
54
  "data-testid": testId,
40
- className: cn("inline-flex items-end justify-center gap-1", className),
55
+ className: cn(
56
+ "flex",
57
+ isHorizontal ? "flex-row items-center w-full" : "flex-col items-start",
58
+ className
59
+ ),
41
60
  style: {
42
- height: normalizeSize(size),
43
61
  ...style,
44
62
  opacity,
45
63
  transition: transitionStyle
46
64
  },
47
- role: "status",
65
+ role: "progressbar",
48
66
  "aria-label": ariaLabel,
49
- "aria-busy": "true",
67
+ "aria-valuenow": currentStep,
68
+ "aria-valuemin": 0,
69
+ "aria-valuemax": steps - 1,
50
70
  ...rest,
51
- children: Array.from({ length: barCount }).map((_, index) => {
52
- const delay2 = reverse ? (barCount - index - 1) / barCount * 0.5 : index / barCount * 0.5;
53
- return /* @__PURE__ */ jsx(
54
- "div",
55
- {
56
- className: "rounded-sm",
57
- style: {
58
- width: `${barWidth}px`,
59
- height: "100%",
60
- backgroundColor: color,
61
- animation: `pulse-wave ${effectiveDuration} ease-in-out infinite`,
62
- animationDelay: `${delay2}s`,
63
- transformOrigin: "bottom"
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"
82
+ ),
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]
109
+ }
110
+ )
111
+ ]
64
112
  }
65
- },
66
- index
67
- );
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
+ }
132
+ }
133
+ }
134
+ )
135
+ ] }, index);
68
136
  })
69
137
  }
70
138
  );
71
139
  }
72
140
  );
73
- PulseWave.displayName = "PulseWave";
141
+ ProgressSteps.displayName = "ProgressSteps";
74
142
  export {
75
- PulseWave
143
+ ProgressSteps
76
144
  };
package/dist/index27.cjs CHANGED
@@ -2,14 +2,15 @@
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("./index30.cjs");
5
+ const hooks = require("./index32.cjs");
6
6
  const colors = require("./index4.cjs");
7
7
  const classNames = require("./index3.cjs");
8
- const PulseBars = react.forwardRef(
8
+ const PulseDots = react.forwardRef(
9
9
  ({
10
10
  size = "md",
11
11
  color = "#3b82f6",
12
- barCount = 4,
12
+ dotCount = 3,
13
+ dotSize = 10,
13
14
  speed = "normal",
14
15
  reverse = false,
15
16
  respectMotionPreference = true,
@@ -18,7 +19,7 @@ const PulseBars = react.forwardRef(
18
19
  transition,
19
20
  className,
20
21
  style,
21
- testId = "pulse-bars",
22
+ testId = "pulse-dots",
22
23
  visible = true,
23
24
  ariaLabel = "Loading...",
24
25
  ...rest
@@ -32,14 +33,12 @@ const PulseBars = react.forwardRef(
32
33
  transition
33
34
  );
34
35
  if (!shouldRender) return null;
35
- const sizeValue = colors.parseSizeToNumber(size, 40);
36
- const barWidth = Math.floor(sizeValue / (barCount * 2));
37
36
  return /* @__PURE__ */ jsxRuntime.jsx(
38
37
  "div",
39
38
  {
40
39
  ref,
41
40
  "data-testid": testId,
42
- className: classNames.cn("inline-flex items-center justify-center gap-1", className),
41
+ className: classNames.cn("inline-flex items-center justify-center gap-2", className),
43
42
  style: {
44
43
  height: colors.normalizeSize(size),
45
44
  ...style,
@@ -50,30 +49,23 @@ const PulseBars = react.forwardRef(
50
49
  "aria-label": ariaLabel,
51
50
  "aria-busy": "true",
52
51
  ...rest,
53
- children: Array.from({ length: barCount }).map((_, index) => {
54
- const delays = [0, 0.2, 0.4, 0.1, 0.3, 0.5];
55
- const reversedDelays = [...delays].reverse();
56
- const delay2 = reverse ? reversedDelays[index % reversedDelays.length] : delays[index % delays.length];
57
- return /* @__PURE__ */ jsxRuntime.jsx(
58
- "div",
59
- {
60
- className: "rounded-sm",
61
- style: {
62
- width: `${barWidth}px`,
63
- minHeight: "30%",
64
- height: "100%",
65
- backgroundColor: color,
66
- animation: `pulse-wave ${effectiveDuration} ease-in-out infinite`,
67
- animationDelay: `${delay2}s`,
68
- transformOrigin: "center"
69
- }
70
- },
71
- index
72
- );
73
- })
52
+ children: Array.from({ length: dotCount }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
53
+ "div",
54
+ {
55
+ className: "rounded-full",
56
+ style: {
57
+ width: colors.normalizeSize(dotSize),
58
+ height: colors.normalizeSize(dotSize),
59
+ backgroundColor: color,
60
+ animation: `pulse-bounce ${effectiveDuration} ease-in-out infinite`,
61
+ animationDelay: reverse ? `${(dotCount - index - 1) * 0.15}s` : `${index * 0.15}s`
62
+ }
63
+ },
64
+ index
65
+ ))
74
66
  }
75
67
  );
76
68
  }
77
69
  );
78
- PulseBars.displayName = "PulseBars";
79
- exports.PulseBars = PulseBars;
70
+ PulseDots.displayName = "PulseDots";
71
+ exports.PulseDots = PulseDots;
package/dist/index27.js CHANGED
@@ -1,13 +1,14 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index30.js";
4
- import { normalizeSize, parseSizeToNumber } from "./index4.js";
3
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index32.js";
4
+ import { normalizeSize } from "./index4.js";
5
5
  import { cn } from "./index3.js";
6
- const PulseBars = forwardRef(
6
+ const PulseDots = forwardRef(
7
7
  ({
8
8
  size = "md",
9
9
  color = "#3b82f6",
10
- barCount = 4,
10
+ dotCount = 3,
11
+ dotSize = 10,
11
12
  speed = "normal",
12
13
  reverse = false,
13
14
  respectMotionPreference = true,
@@ -16,7 +17,7 @@ const PulseBars = forwardRef(
16
17
  transition,
17
18
  className,
18
19
  style,
19
- testId = "pulse-bars",
20
+ testId = "pulse-dots",
20
21
  visible = true,
21
22
  ariaLabel = "Loading...",
22
23
  ...rest
@@ -30,14 +31,12 @@ const PulseBars = forwardRef(
30
31
  transition
31
32
  );
32
33
  if (!shouldRender) return null;
33
- const sizeValue = parseSizeToNumber(size, 40);
34
- const barWidth = Math.floor(sizeValue / (barCount * 2));
35
34
  return /* @__PURE__ */ jsx(
36
35
  "div",
37
36
  {
38
37
  ref,
39
38
  "data-testid": testId,
40
- className: cn("inline-flex items-center justify-center gap-1", className),
39
+ className: cn("inline-flex items-center justify-center gap-2", className),
41
40
  style: {
42
41
  height: normalizeSize(size),
43
42
  ...style,
@@ -48,32 +47,25 @@ const PulseBars = forwardRef(
48
47
  "aria-label": ariaLabel,
49
48
  "aria-busy": "true",
50
49
  ...rest,
51
- children: Array.from({ length: barCount }).map((_, index) => {
52
- const delays = [0, 0.2, 0.4, 0.1, 0.3, 0.5];
53
- const reversedDelays = [...delays].reverse();
54
- const delay2 = reverse ? reversedDelays[index % reversedDelays.length] : delays[index % delays.length];
55
- return /* @__PURE__ */ jsx(
56
- "div",
57
- {
58
- className: "rounded-sm",
59
- style: {
60
- width: `${barWidth}px`,
61
- minHeight: "30%",
62
- height: "100%",
63
- backgroundColor: color,
64
- animation: `pulse-wave ${effectiveDuration} ease-in-out infinite`,
65
- animationDelay: `${delay2}s`,
66
- transformOrigin: "center"
67
- }
68
- },
69
- index
70
- );
71
- })
50
+ children: Array.from({ length: dotCount }).map((_, index) => /* @__PURE__ */ jsx(
51
+ "div",
52
+ {
53
+ className: "rounded-full",
54
+ style: {
55
+ width: normalizeSize(dotSize),
56
+ height: normalizeSize(dotSize),
57
+ backgroundColor: color,
58
+ animation: `pulse-bounce ${effectiveDuration} ease-in-out infinite`,
59
+ animationDelay: reverse ? `${(dotCount - index - 1) * 0.15}s` : `${index * 0.15}s`
60
+ }
61
+ },
62
+ index
63
+ ))
72
64
  }
73
65
  );
74
66
  }
75
67
  );
76
- PulseBars.displayName = "PulseBars";
68
+ PulseDots.displayName = "PulseDots";
77
69
  export {
78
- PulseBars
70
+ PulseDots
79
71
  };
package/dist/index28.cjs CHANGED
@@ -2,17 +2,14 @@
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("./index30.cjs");
5
+ const hooks = require("./index32.cjs");
6
6
  const colors = require("./index4.cjs");
7
7
  const classNames = require("./index3.cjs");
8
- const TypingIndicator = react.forwardRef(
8
+ const PulseWave = react.forwardRef(
9
9
  ({
10
- size,
10
+ size = "md",
11
11
  color = "#3b82f6",
12
- dotCount = 3,
13
- dotSize = 8,
14
- gap = 4,
15
- variant = "bounce",
12
+ barCount = 5,
16
13
  speed = "normal",
17
14
  reverse = false,
18
15
  respectMotionPreference = true,
@@ -21,9 +18,9 @@ const TypingIndicator = react.forwardRef(
21
18
  transition,
22
19
  className,
23
20
  style,
24
- testId = "typing-indicator",
21
+ testId = "pulse-wave",
25
22
  visible = true,
26
- ariaLabel = "Typing...",
23
+ ariaLabel = "Loading...",
27
24
  ...rest
28
25
  }, ref) => {
29
26
  const prefersReducedMotion = hooks.useReducedMotion();
@@ -35,16 +32,16 @@ const TypingIndicator = react.forwardRef(
35
32
  transition
36
33
  );
37
34
  if (!shouldRender) return null;
38
- const gapValue = colors.normalizeSize(gap);
35
+ const sizeValue = colors.parseSizeToNumber(size, 40);
36
+ const barWidth = Math.floor(sizeValue / (barCount * 2.5));
39
37
  return /* @__PURE__ */ jsxRuntime.jsx(
40
38
  "div",
41
39
  {
42
40
  ref,
43
41
  "data-testid": testId,
44
- className: classNames.cn("inline-flex items-center", className),
42
+ className: classNames.cn("inline-flex items-end justify-center gap-1", className),
45
43
  style: {
46
- gap: gapValue,
47
- height: size ? colors.normalizeSize(size) : "auto",
44
+ height: colors.normalizeSize(size),
48
45
  ...style,
49
46
  opacity,
50
47
  transition: transitionStyle
@@ -53,23 +50,27 @@ const TypingIndicator = react.forwardRef(
53
50
  "aria-label": ariaLabel,
54
51
  "aria-busy": "true",
55
52
  ...rest,
56
- children: Array.from({ length: dotCount }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
57
- "div",
58
- {
59
- className: "rounded-full",
60
- style: {
61
- width: colors.normalizeSize(dotSize),
62
- height: colors.normalizeSize(dotSize),
63
- backgroundColor: color,
64
- animation: `typing-${variant} ${effectiveDuration} ease-in-out infinite`,
65
- animationDelay: reverse ? `${(dotCount - index - 1) * 0.2}s` : `${index * 0.2}s`
66
- }
67
- },
68
- index
69
- ))
53
+ children: Array.from({ length: barCount }).map((_, index) => {
54
+ const delay2 = reverse ? (barCount - index - 1) / barCount * 0.5 : index / barCount * 0.5;
55
+ return /* @__PURE__ */ jsxRuntime.jsx(
56
+ "div",
57
+ {
58
+ className: "rounded-sm",
59
+ style: {
60
+ width: `${barWidth}px`,
61
+ height: "100%",
62
+ backgroundColor: color,
63
+ animation: `pulse-wave ${effectiveDuration} ease-in-out infinite`,
64
+ animationDelay: `${delay2}s`,
65
+ transformOrigin: "bottom"
66
+ }
67
+ },
68
+ index
69
+ );
70
+ })
70
71
  }
71
72
  );
72
73
  }
73
74
  );
74
- TypingIndicator.displayName = "TypingIndicator";
75
- exports.TypingIndicator = TypingIndicator;
75
+ PulseWave.displayName = "PulseWave";
76
+ exports.PulseWave = PulseWave;
package/dist/index28.js CHANGED
@@ -1,16 +1,13 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index30.js";
4
- import { normalizeSize } from "./index4.js";
3
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index32.js";
4
+ import { normalizeSize, parseSizeToNumber } from "./index4.js";
5
5
  import { cn } from "./index3.js";
6
- const TypingIndicator = forwardRef(
6
+ const PulseWave = forwardRef(
7
7
  ({
8
- size,
8
+ size = "md",
9
9
  color = "#3b82f6",
10
- dotCount = 3,
11
- dotSize = 8,
12
- gap = 4,
13
- variant = "bounce",
10
+ barCount = 5,
14
11
  speed = "normal",
15
12
  reverse = false,
16
13
  respectMotionPreference = true,
@@ -19,9 +16,9 @@ const TypingIndicator = forwardRef(
19
16
  transition,
20
17
  className,
21
18
  style,
22
- testId = "typing-indicator",
19
+ testId = "pulse-wave",
23
20
  visible = true,
24
- ariaLabel = "Typing...",
21
+ ariaLabel = "Loading...",
25
22
  ...rest
26
23
  }, ref) => {
27
24
  const prefersReducedMotion = useReducedMotion();
@@ -33,16 +30,16 @@ const TypingIndicator = forwardRef(
33
30
  transition
34
31
  );
35
32
  if (!shouldRender) return null;
36
- const gapValue = normalizeSize(gap);
33
+ const sizeValue = parseSizeToNumber(size, 40);
34
+ const barWidth = Math.floor(sizeValue / (barCount * 2.5));
37
35
  return /* @__PURE__ */ jsx(
38
36
  "div",
39
37
  {
40
38
  ref,
41
39
  "data-testid": testId,
42
- className: cn("inline-flex items-center", className),
40
+ className: cn("inline-flex items-end justify-center gap-1", className),
43
41
  style: {
44
- gap: gapValue,
45
- height: size ? normalizeSize(size) : "auto",
42
+ height: normalizeSize(size),
46
43
  ...style,
47
44
  opacity,
48
45
  transition: transitionStyle
@@ -51,25 +48,29 @@ const TypingIndicator = forwardRef(
51
48
  "aria-label": ariaLabel,
52
49
  "aria-busy": "true",
53
50
  ...rest,
54
- children: Array.from({ length: dotCount }).map((_, index) => /* @__PURE__ */ jsx(
55
- "div",
56
- {
57
- className: "rounded-full",
58
- style: {
59
- width: normalizeSize(dotSize),
60
- height: normalizeSize(dotSize),
61
- backgroundColor: color,
62
- animation: `typing-${variant} ${effectiveDuration} ease-in-out infinite`,
63
- animationDelay: reverse ? `${(dotCount - index - 1) * 0.2}s` : `${index * 0.2}s`
64
- }
65
- },
66
- index
67
- ))
51
+ children: Array.from({ length: barCount }).map((_, index) => {
52
+ const delay2 = reverse ? (barCount - index - 1) / barCount * 0.5 : index / barCount * 0.5;
53
+ return /* @__PURE__ */ jsx(
54
+ "div",
55
+ {
56
+ className: "rounded-sm",
57
+ style: {
58
+ width: `${barWidth}px`,
59
+ height: "100%",
60
+ backgroundColor: color,
61
+ animation: `pulse-wave ${effectiveDuration} ease-in-out infinite`,
62
+ animationDelay: `${delay2}s`,
63
+ transformOrigin: "bottom"
64
+ }
65
+ },
66
+ index
67
+ );
68
+ })
68
69
  }
69
70
  );
70
71
  }
71
72
  );
72
- TypingIndicator.displayName = "TypingIndicator";
73
+ PulseWave.displayName = "PulseWave";
73
74
  export {
74
- TypingIndicator
75
+ PulseWave
75
76
  };