premium-react-loaders 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/README.md +64 -30
  2. package/dist/components/overlay/LoaderOverlay.d.ts.map +1 -1
  3. package/dist/components/progress/ProgressBar.d.ts.map +1 -1
  4. package/dist/components/progress/ProgressCircle.d.ts.map +1 -1
  5. package/dist/components/progress/ProgressRing.d.ts.map +1 -1
  6. package/dist/components/progress/ProgressSteps.d.ts.map +1 -1
  7. package/dist/components/pulse/PulseBars.d.ts.map +1 -1
  8. package/dist/components/pulse/PulseDots.d.ts.map +1 -1
  9. package/dist/components/pulse/PulseWave.d.ts.map +1 -1
  10. package/dist/components/pulse/TypingIndicator.d.ts.map +1 -1
  11. package/dist/components/skeleton/Skeleton.d.ts.map +1 -1
  12. package/dist/components/skeleton/SkeletonAvatar.d.ts.map +1 -1
  13. package/dist/components/skeleton/SkeletonCard.d.ts.map +1 -1
  14. package/dist/components/skeleton/SkeletonForm.d.ts.map +1 -1
  15. package/dist/components/skeleton/SkeletonImage.d.ts.map +1 -1
  16. package/dist/components/skeleton/SkeletonList.d.ts.map +1 -1
  17. package/dist/components/skeleton/SkeletonPage.d.ts.map +1 -1
  18. package/dist/components/skeleton/SkeletonTable.d.ts.map +1 -1
  19. package/dist/components/skeleton/SkeletonText.d.ts.map +1 -1
  20. package/dist/components/spinner/SpinnerBars.d.ts.map +1 -1
  21. package/dist/components/spinner/SpinnerCircle.d.ts.map +1 -1
  22. package/dist/components/spinner/SpinnerDots.d.ts.map +1 -1
  23. package/dist/components/spinner/SpinnerGrid.d.ts.map +1 -1
  24. package/dist/components/spinner/SpinnerPulse.d.ts.map +1 -1
  25. package/dist/components/spinner/SpinnerRing.d.ts.map +1 -1
  26. package/dist/components/spinner/SpinnerWave.d.ts.map +1 -1
  27. package/dist/index.cjs +0 -1
  28. package/dist/index.js +0 -1
  29. package/dist/index10.cjs +14 -3
  30. package/dist/index10.js +14 -3
  31. package/dist/index11.cjs +16 -3
  32. package/dist/index11.js +16 -3
  33. package/dist/index12.cjs +16 -3
  34. package/dist/index12.js +16 -3
  35. package/dist/index13.cjs +12 -3
  36. package/dist/index13.js +12 -3
  37. package/dist/index14.cjs +16 -4
  38. package/dist/index14.js +16 -4
  39. package/dist/index15.cjs +16 -4
  40. package/dist/index15.js +16 -4
  41. package/dist/index16.cjs +16 -4
  42. package/dist/index16.js +16 -4
  43. package/dist/index17.cjs +14 -4
  44. package/dist/index17.js +14 -4
  45. package/dist/index18.cjs +18 -6
  46. package/dist/index18.js +18 -6
  47. package/dist/index19.cjs +16 -4
  48. package/dist/index19.js +16 -4
  49. package/dist/index20.cjs +16 -4
  50. package/dist/index20.js +16 -4
  51. package/dist/index21.cjs +15 -5
  52. package/dist/index21.js +15 -5
  53. package/dist/index22.cjs +14 -4
  54. package/dist/index22.js +14 -4
  55. package/dist/index23.cjs +15 -5
  56. package/dist/index23.js +15 -5
  57. package/dist/index24.cjs +16 -3
  58. package/dist/index24.js +16 -3
  59. package/dist/index25.cjs +14 -4
  60. package/dist/index25.js +14 -4
  61. package/dist/index26.cjs +16 -6
  62. package/dist/index26.js +16 -6
  63. package/dist/index27.cjs +16 -6
  64. package/dist/index27.js +16 -6
  65. package/dist/index28.cjs +14 -4
  66. package/dist/index28.js +14 -4
  67. package/dist/index29.cjs +14 -3
  68. package/dist/index29.js +14 -3
  69. package/dist/index3.cjs +11 -3
  70. package/dist/index3.js +11 -3
  71. package/dist/index30.cjs +122 -15
  72. package/dist/index30.js +121 -14
  73. package/dist/index4.cjs +0 -1
  74. package/dist/index4.js +0 -1
  75. package/dist/index5.cjs +14 -3
  76. package/dist/index5.js +14 -3
  77. package/dist/index6.cjs +14 -3
  78. package/dist/index6.js +14 -3
  79. package/dist/index7.cjs +16 -3
  80. package/dist/index7.js +16 -3
  81. package/dist/index8.cjs +14 -3
  82. package/dist/index8.js +14 -3
  83. package/dist/index9.cjs +16 -3
  84. package/dist/index9.js +16 -3
  85. package/dist/premium-react-loaders.css +217 -940
  86. package/dist/types/common.d.ts +6 -0
  87. package/dist/types/common.d.ts.map +1 -1
  88. package/dist/utils/classNames.d.ts +3 -2
  89. package/dist/utils/classNames.d.ts.map +1 -1
  90. package/dist/utils/hooks.d.ts +9 -0
  91. package/dist/utils/hooks.d.ts.map +1 -1
  92. package/package.json +5 -8
  93. package/dist/index.cjs.map +0 -1
  94. package/dist/index.js.map +0 -1
  95. package/dist/index10.cjs.map +0 -1
  96. package/dist/index10.js.map +0 -1
  97. package/dist/index11.cjs.map +0 -1
  98. package/dist/index11.js.map +0 -1
  99. package/dist/index12.cjs.map +0 -1
  100. package/dist/index12.js.map +0 -1
  101. package/dist/index13.cjs.map +0 -1
  102. package/dist/index13.js.map +0 -1
  103. package/dist/index14.cjs.map +0 -1
  104. package/dist/index14.js.map +0 -1
  105. package/dist/index15.cjs.map +0 -1
  106. package/dist/index15.js.map +0 -1
  107. package/dist/index16.cjs.map +0 -1
  108. package/dist/index16.js.map +0 -1
  109. package/dist/index17.cjs.map +0 -1
  110. package/dist/index17.js.map +0 -1
  111. package/dist/index18.cjs.map +0 -1
  112. package/dist/index18.js.map +0 -1
  113. package/dist/index19.cjs.map +0 -1
  114. package/dist/index19.js.map +0 -1
  115. package/dist/index20.cjs.map +0 -1
  116. package/dist/index20.js.map +0 -1
  117. package/dist/index21.cjs.map +0 -1
  118. package/dist/index21.js.map +0 -1
  119. package/dist/index22.cjs.map +0 -1
  120. package/dist/index22.js.map +0 -1
  121. package/dist/index23.cjs.map +0 -1
  122. package/dist/index23.js.map +0 -1
  123. package/dist/index24.cjs.map +0 -1
  124. package/dist/index24.js.map +0 -1
  125. package/dist/index25.cjs.map +0 -1
  126. package/dist/index25.js.map +0 -1
  127. package/dist/index26.cjs.map +0 -1
  128. package/dist/index26.js.map +0 -1
  129. package/dist/index27.cjs.map +0 -1
  130. package/dist/index27.js.map +0 -1
  131. package/dist/index28.cjs.map +0 -1
  132. package/dist/index28.js.map +0 -1
  133. package/dist/index29.cjs.map +0 -1
  134. package/dist/index29.js.map +0 -1
  135. package/dist/index3.cjs.map +0 -1
  136. package/dist/index3.js.map +0 -1
  137. package/dist/index30.cjs.map +0 -1
  138. package/dist/index30.js.map +0 -1
  139. package/dist/index31.cjs +0 -42
  140. package/dist/index31.cjs.map +0 -1
  141. package/dist/index31.js +0 -42
  142. package/dist/index31.js.map +0 -1
  143. package/dist/index4.cjs.map +0 -1
  144. package/dist/index4.js.map +0 -1
  145. package/dist/index5.cjs.map +0 -1
  146. package/dist/index5.js.map +0 -1
  147. package/dist/index6.cjs.map +0 -1
  148. package/dist/index6.js.map +0 -1
  149. package/dist/index7.cjs.map +0 -1
  150. package/dist/index7.js.map +0 -1
  151. package/dist/index8.cjs.map +0 -1
  152. package/dist/index8.js.map +0 -1
  153. package/dist/index9.cjs.map +0 -1
  154. package/dist/index9.js.map +0 -1
package/dist/index19.cjs CHANGED
@@ -2,7 +2,7 @@
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("./index31.cjs");
5
+ const hooks = require("./index30.cjs");
6
6
  const classNames = require("./index3.cjs");
7
7
  const colors = require("./index4.cjs");
8
8
  const SpinnerWave = react.forwardRef(
@@ -14,6 +14,9 @@ const SpinnerWave = react.forwardRef(
14
14
  speed = "normal",
15
15
  reverse = false,
16
16
  respectMotionPreference = true,
17
+ delay = 0,
18
+ minDuration = 0,
19
+ transition,
17
20
  className,
18
21
  style,
19
22
  testId = "spinner-wave",
@@ -21,9 +24,15 @@ const SpinnerWave = react.forwardRef(
21
24
  ariaLabel = "Loading...",
22
25
  ...rest
23
26
  }, ref) => {
24
- if (!visible) return null;
25
27
  const prefersReducedMotion = hooks.useReducedMotion();
26
28
  const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
29
+ const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(
30
+ visible,
31
+ delay,
32
+ minDuration,
33
+ transition
34
+ );
35
+ if (!shouldRender) return null;
27
36
  const sizeValue = colors.normalizeSize(size);
28
37
  return /* @__PURE__ */ jsxRuntime.jsx(
29
38
  "div",
@@ -31,7 +40,11 @@ const SpinnerWave = react.forwardRef(
31
40
  ref,
32
41
  "data-testid": testId,
33
42
  className: classNames.cn("inline-flex items-center justify-center", className),
34
- style,
43
+ style: {
44
+ ...style,
45
+ opacity,
46
+ transition: transitionStyle
47
+ },
35
48
  role: "status",
36
49
  "aria-label": ariaLabel,
37
50
  "aria-busy": "true",
@@ -67,4 +80,3 @@ const SpinnerWave = react.forwardRef(
67
80
  );
68
81
  SpinnerWave.displayName = "SpinnerWave";
69
82
  exports.SpinnerWave = SpinnerWave;
70
- //# sourceMappingURL=index19.cjs.map
package/dist/index19.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { useReducedMotion, getEffectiveDuration } from "./index31.js";
3
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index30.js";
4
4
  import { cn } from "./index3.js";
5
5
  import { normalizeSize } from "./index4.js";
6
6
  const SpinnerWave = forwardRef(
@@ -12,6 +12,9 @@ const SpinnerWave = forwardRef(
12
12
  speed = "normal",
13
13
  reverse = false,
14
14
  respectMotionPreference = true,
15
+ delay = 0,
16
+ minDuration = 0,
17
+ transition,
15
18
  className,
16
19
  style,
17
20
  testId = "spinner-wave",
@@ -19,9 +22,15 @@ const SpinnerWave = forwardRef(
19
22
  ariaLabel = "Loading...",
20
23
  ...rest
21
24
  }, ref) => {
22
- if (!visible) return null;
23
25
  const prefersReducedMotion = useReducedMotion();
24
26
  const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
27
+ const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(
28
+ visible,
29
+ delay,
30
+ minDuration,
31
+ transition
32
+ );
33
+ if (!shouldRender) return null;
25
34
  const sizeValue = normalizeSize(size);
26
35
  return /* @__PURE__ */ jsx(
27
36
  "div",
@@ -29,7 +38,11 @@ const SpinnerWave = forwardRef(
29
38
  ref,
30
39
  "data-testid": testId,
31
40
  className: cn("inline-flex items-center justify-center", className),
32
- style,
41
+ style: {
42
+ ...style,
43
+ opacity,
44
+ transition: transitionStyle
45
+ },
33
46
  role: "status",
34
47
  "aria-label": ariaLabel,
35
48
  "aria-busy": "true",
@@ -67,4 +80,3 @@ SpinnerWave.displayName = "SpinnerWave";
67
80
  export {
68
81
  SpinnerWave
69
82
  };
70
- //# sourceMappingURL=index19.js.map
package/dist/index20.cjs CHANGED
@@ -2,7 +2,7 @@
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("./index31.cjs");
5
+ const hooks = require("./index30.cjs");
6
6
  const classNames = require("./index3.cjs");
7
7
  const colors = require("./index4.cjs");
8
8
  const SpinnerPulse = react.forwardRef(
@@ -14,6 +14,9 @@ const SpinnerPulse = react.forwardRef(
14
14
  speed = "normal",
15
15
  reverse = false,
16
16
  respectMotionPreference = true,
17
+ delay = 0,
18
+ minDuration = 0,
19
+ transition,
17
20
  className,
18
21
  style,
19
22
  testId = "spinner-pulse",
@@ -21,9 +24,15 @@ const SpinnerPulse = react.forwardRef(
21
24
  ariaLabel = "Loading...",
22
25
  ...rest
23
26
  }, ref) => {
24
- if (!visible) return null;
25
27
  const prefersReducedMotion = hooks.useReducedMotion();
26
28
  const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
29
+ const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(
30
+ visible,
31
+ delay,
32
+ minDuration,
33
+ transition
34
+ );
35
+ if (!shouldRender) return null;
27
36
  const sizeValue = colors.normalizeSize(size);
28
37
  return /* @__PURE__ */ jsxRuntime.jsx(
29
38
  "div",
@@ -31,7 +40,11 @@ const SpinnerPulse = react.forwardRef(
31
40
  ref,
32
41
  "data-testid": testId,
33
42
  className: classNames.cn("inline-flex items-center justify-center", className),
34
- style,
43
+ style: {
44
+ ...style,
45
+ opacity,
46
+ transition: transitionStyle
47
+ },
35
48
  role: "status",
36
49
  "aria-label": ariaLabel,
37
50
  "aria-busy": "true",
@@ -82,4 +95,3 @@ const SpinnerPulse = react.forwardRef(
82
95
  );
83
96
  SpinnerPulse.displayName = "SpinnerPulse";
84
97
  exports.SpinnerPulse = SpinnerPulse;
85
- //# sourceMappingURL=index20.cjs.map
package/dist/index20.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { useReducedMotion, getEffectiveDuration } from "./index31.js";
3
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index30.js";
4
4
  import { cn } from "./index3.js";
5
5
  import { normalizeSize } from "./index4.js";
6
6
  const SpinnerPulse = forwardRef(
@@ -12,6 +12,9 @@ const SpinnerPulse = forwardRef(
12
12
  speed = "normal",
13
13
  reverse = false,
14
14
  respectMotionPreference = true,
15
+ delay = 0,
16
+ minDuration = 0,
17
+ transition,
15
18
  className,
16
19
  style,
17
20
  testId = "spinner-pulse",
@@ -19,9 +22,15 @@ const SpinnerPulse = forwardRef(
19
22
  ariaLabel = "Loading...",
20
23
  ...rest
21
24
  }, ref) => {
22
- if (!visible) return null;
23
25
  const prefersReducedMotion = useReducedMotion();
24
26
  const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
27
+ const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(
28
+ visible,
29
+ delay,
30
+ minDuration,
31
+ transition
32
+ );
33
+ if (!shouldRender) return null;
25
34
  const sizeValue = normalizeSize(size);
26
35
  return /* @__PURE__ */ jsx(
27
36
  "div",
@@ -29,7 +38,11 @@ const SpinnerPulse = forwardRef(
29
38
  ref,
30
39
  "data-testid": testId,
31
40
  className: cn("inline-flex items-center justify-center", className),
32
- style,
41
+ style: {
42
+ ...style,
43
+ opacity,
44
+ transition: transitionStyle
45
+ },
33
46
  role: "status",
34
47
  "aria-label": ariaLabel,
35
48
  "aria-busy": "true",
@@ -82,4 +95,3 @@ SpinnerPulse.displayName = "SpinnerPulse";
82
95
  export {
83
96
  SpinnerPulse
84
97
  };
85
- //# sourceMappingURL=index20.js.map
package/dist/index21.cjs CHANGED
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const react = require("react");
5
5
  const colors = require("./index4.cjs");
6
- const hooks = require("./index31.cjs");
6
+ const hooks = require("./index30.cjs");
7
7
  const classNames = require("./index3.cjs");
8
8
  const ProgressBar = react.forwardRef(
9
9
  ({
@@ -18,6 +18,9 @@ const ProgressBar = react.forwardRef(
18
18
  speed = "normal",
19
19
  reverse = false,
20
20
  respectMotionPreference = true,
21
+ delay = 0,
22
+ minDuration = 0,
23
+ transition,
21
24
  className,
22
25
  style,
23
26
  testId = "progress-bar",
@@ -25,13 +28,19 @@ const ProgressBar = react.forwardRef(
25
28
  ariaLabel,
26
29
  ...rest
27
30
  }, ref) => {
28
- if (!visible) return null;
29
31
  const prefersReducedMotion = hooks.useReducedMotion();
30
32
  const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
33
+ const gradientId = react.useMemo(() => `progress-bar-gradient-${Math.random().toString(36).substr(2, 9)}`, []);
34
+ const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(
35
+ visible,
36
+ delay,
37
+ minDuration,
38
+ transition
39
+ );
40
+ if (!shouldRender) return null;
31
41
  const clampedValue = Math.min(100, Math.max(0, value));
32
42
  const clampedBuffer = buffer !== void 0 ? Math.min(100, Math.max(0, buffer)) : void 0;
33
43
  const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
34
- const gradientId = react.useMemo(() => `progress-bar-gradient-${Math.random().toString(36).substr(2, 9)}`, []);
35
44
  return /* @__PURE__ */ jsxRuntime.jsxs(
36
45
  "div",
37
46
  {
@@ -41,7 +50,9 @@ const ProgressBar = react.forwardRef(
41
50
  style: {
42
51
  height: colors.normalizeSize(height),
43
52
  backgroundColor: secondaryColor,
44
- ...style
53
+ ...style,
54
+ opacity,
55
+ transition: transitionStyle
45
56
  },
46
57
  role: "progressbar",
47
58
  "aria-label": progressLabel,
@@ -105,4 +116,3 @@ const ProgressBar = react.forwardRef(
105
116
  );
106
117
  ProgressBar.displayName = "ProgressBar";
107
118
  exports.ProgressBar = ProgressBar;
108
- //# sourceMappingURL=index21.cjs.map
package/dist/index21.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { forwardRef, useMemo } from "react";
3
3
  import { normalizeSize, getContrastColor } from "./index4.js";
4
- import { useReducedMotion, getEffectiveDuration } from "./index31.js";
4
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index30.js";
5
5
  import { cn } from "./index3.js";
6
6
  const ProgressBar = forwardRef(
7
7
  ({
@@ -16,6 +16,9 @@ const ProgressBar = forwardRef(
16
16
  speed = "normal",
17
17
  reverse = false,
18
18
  respectMotionPreference = true,
19
+ delay = 0,
20
+ minDuration = 0,
21
+ transition,
19
22
  className,
20
23
  style,
21
24
  testId = "progress-bar",
@@ -23,13 +26,19 @@ const ProgressBar = forwardRef(
23
26
  ariaLabel,
24
27
  ...rest
25
28
  }, ref) => {
26
- if (!visible) return null;
27
29
  const prefersReducedMotion = useReducedMotion();
28
30
  const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
31
+ const gradientId = useMemo(() => `progress-bar-gradient-${Math.random().toString(36).substr(2, 9)}`, []);
32
+ const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(
33
+ visible,
34
+ delay,
35
+ minDuration,
36
+ transition
37
+ );
38
+ if (!shouldRender) return null;
29
39
  const clampedValue = Math.min(100, Math.max(0, value));
30
40
  const clampedBuffer = buffer !== void 0 ? Math.min(100, Math.max(0, buffer)) : void 0;
31
41
  const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
32
- const gradientId = useMemo(() => `progress-bar-gradient-${Math.random().toString(36).substr(2, 9)}`, []);
33
42
  return /* @__PURE__ */ jsxs(
34
43
  "div",
35
44
  {
@@ -39,7 +48,9 @@ const ProgressBar = forwardRef(
39
48
  style: {
40
49
  height: normalizeSize(height),
41
50
  backgroundColor: secondaryColor,
42
- ...style
51
+ ...style,
52
+ opacity,
53
+ transition: transitionStyle
43
54
  },
44
55
  role: "progressbar",
45
56
  "aria-label": progressLabel,
@@ -105,4 +116,3 @@ ProgressBar.displayName = "ProgressBar";
105
116
  export {
106
117
  ProgressBar
107
118
  };
108
- //# sourceMappingURL=index21.js.map
package/dist/index22.cjs CHANGED
@@ -2,7 +2,7 @@
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("./index31.cjs");
5
+ const hooks = require("./index30.cjs");
6
6
  const colors = require("./index4.cjs");
7
7
  const classNames = require("./index3.cjs");
8
8
  const ProgressCircle = react.forwardRef(
@@ -18,6 +18,9 @@ const ProgressCircle = react.forwardRef(
18
18
  speed = "normal",
19
19
  reverse = false,
20
20
  respectMotionPreference = true,
21
+ delay = 0,
22
+ minDuration = 0,
23
+ transition,
21
24
  className,
22
25
  style,
23
26
  testId = "progress-circle",
@@ -25,9 +28,15 @@ const ProgressCircle = react.forwardRef(
25
28
  ariaLabel,
26
29
  ...rest
27
30
  }, ref) => {
28
- if (!visible) return null;
29
31
  const prefersReducedMotion = hooks.useReducedMotion();
30
32
  const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
33
+ const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(
34
+ visible,
35
+ delay,
36
+ minDuration,
37
+ transition
38
+ );
39
+ if (!shouldRender) return null;
31
40
  const clampedValue = Math.min(100, Math.max(0, value));
32
41
  const clampedBuffer = buffer !== void 0 ? Math.min(100, Math.max(0, buffer)) : void 0;
33
42
  const sizeValue = colors.parseSizeToNumber(size, 56);
@@ -46,7 +55,9 @@ const ProgressCircle = react.forwardRef(
46
55
  style: {
47
56
  width: colors.normalizeSize(size),
48
57
  height: colors.normalizeSize(size),
49
- ...style
58
+ ...style,
59
+ opacity,
60
+ transition: transitionStyle
50
61
  },
51
62
  role: "progressbar",
52
63
  "aria-label": progressLabel,
@@ -133,4 +144,3 @@ const ProgressCircle = react.forwardRef(
133
144
  );
134
145
  ProgressCircle.displayName = "ProgressCircle";
135
146
  exports.ProgressCircle = ProgressCircle;
136
- //# sourceMappingURL=index22.cjs.map
package/dist/index22.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { useReducedMotion, getEffectiveDuration } from "./index31.js";
3
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index30.js";
4
4
  import { normalizeSize, parseSizeToNumber } from "./index4.js";
5
5
  import { cn } from "./index3.js";
6
6
  const ProgressCircle = forwardRef(
@@ -16,6 +16,9 @@ const ProgressCircle = forwardRef(
16
16
  speed = "normal",
17
17
  reverse = false,
18
18
  respectMotionPreference = true,
19
+ delay = 0,
20
+ minDuration = 0,
21
+ transition,
19
22
  className,
20
23
  style,
21
24
  testId = "progress-circle",
@@ -23,9 +26,15 @@ const ProgressCircle = forwardRef(
23
26
  ariaLabel,
24
27
  ...rest
25
28
  }, ref) => {
26
- if (!visible) return null;
27
29
  const prefersReducedMotion = useReducedMotion();
28
30
  const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
31
+ const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(
32
+ visible,
33
+ delay,
34
+ minDuration,
35
+ transition
36
+ );
37
+ if (!shouldRender) return null;
29
38
  const clampedValue = Math.min(100, Math.max(0, value));
30
39
  const clampedBuffer = buffer !== void 0 ? Math.min(100, Math.max(0, buffer)) : void 0;
31
40
  const sizeValue = parseSizeToNumber(size, 56);
@@ -44,7 +53,9 @@ const ProgressCircle = forwardRef(
44
53
  style: {
45
54
  width: normalizeSize(size),
46
55
  height: normalizeSize(size),
47
- ...style
56
+ ...style,
57
+ opacity,
58
+ transition: transitionStyle
48
59
  },
49
60
  role: "progressbar",
50
61
  "aria-label": progressLabel,
@@ -133,4 +144,3 @@ ProgressCircle.displayName = "ProgressCircle";
133
144
  export {
134
145
  ProgressCircle
135
146
  };
136
- //# sourceMappingURL=index22.js.map
package/dist/index23.cjs CHANGED
@@ -2,7 +2,7 @@
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("./index31.cjs");
5
+ const hooks = require("./index30.cjs");
6
6
  const colors = require("./index4.cjs");
7
7
  const classNames = require("./index3.cjs");
8
8
  const ProgressRing = react.forwardRef(
@@ -19,6 +19,9 @@ const ProgressRing = react.forwardRef(
19
19
  speed = "normal",
20
20
  reverse = false,
21
21
  respectMotionPreference = true,
22
+ delay = 0,
23
+ minDuration = 0,
24
+ transition,
22
25
  className,
23
26
  style,
24
27
  testId = "progress-ring",
@@ -26,9 +29,16 @@ const ProgressRing = react.forwardRef(
26
29
  ariaLabel,
27
30
  ...rest
28
31
  }, ref) => {
29
- if (!visible) return null;
30
32
  const prefersReducedMotion = hooks.useReducedMotion();
31
33
  const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
34
+ const gradientId = react.useMemo(() => `progress-gradient-${Math.random().toString(36).substr(2, 9)}`, []);
35
+ const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(
36
+ visible,
37
+ delay,
38
+ minDuration,
39
+ transition
40
+ );
41
+ if (!shouldRender) return null;
32
42
  const clampedValue = Math.min(100, Math.max(0, value));
33
43
  const clampedBuffer = buffer !== void 0 ? Math.min(100, Math.max(0, buffer)) : void 0;
34
44
  const sizeValue = colors.parseSizeToNumber(size, 56);
@@ -38,7 +48,6 @@ const ProgressRing = react.forwardRef(
38
48
  const strokeDashoffset = circumference - clampedValue / 100 * circumference;
39
49
  const bufferDashoffset = clampedBuffer !== void 0 ? circumference - clampedBuffer / 100 * circumference : void 0;
40
50
  const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
41
- const gradientId = react.useMemo(() => `progress-gradient-${Math.random().toString(36).substr(2, 9)}`, []);
42
51
  return /* @__PURE__ */ jsxRuntime.jsxs(
43
52
  "div",
44
53
  {
@@ -48,7 +57,9 @@ const ProgressRing = react.forwardRef(
48
57
  style: {
49
58
  width: colors.normalizeSize(size),
50
59
  height: colors.normalizeSize(size),
51
- ...style
60
+ ...style,
61
+ opacity,
62
+ transition: transitionStyle
52
63
  },
53
64
  role: "progressbar",
54
65
  "aria-label": progressLabel,
@@ -139,4 +150,3 @@ const ProgressRing = react.forwardRef(
139
150
  );
140
151
  ProgressRing.displayName = "ProgressRing";
141
152
  exports.ProgressRing = ProgressRing;
142
- //# sourceMappingURL=index23.cjs.map
package/dist/index23.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { forwardRef, useMemo } from "react";
3
- import { useReducedMotion, getEffectiveDuration } from "./index31.js";
3
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index30.js";
4
4
  import { normalizeSize, parseSizeToNumber } from "./index4.js";
5
5
  import { cn } from "./index3.js";
6
6
  const ProgressRing = forwardRef(
@@ -17,6 +17,9 @@ const ProgressRing = forwardRef(
17
17
  speed = "normal",
18
18
  reverse = false,
19
19
  respectMotionPreference = true,
20
+ delay = 0,
21
+ minDuration = 0,
22
+ transition,
20
23
  className,
21
24
  style,
22
25
  testId = "progress-ring",
@@ -24,9 +27,16 @@ const ProgressRing = forwardRef(
24
27
  ariaLabel,
25
28
  ...rest
26
29
  }, ref) => {
27
- if (!visible) return null;
28
30
  const prefersReducedMotion = useReducedMotion();
29
31
  const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
32
+ const gradientId = useMemo(() => `progress-gradient-${Math.random().toString(36).substr(2, 9)}`, []);
33
+ const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(
34
+ visible,
35
+ delay,
36
+ minDuration,
37
+ transition
38
+ );
39
+ if (!shouldRender) return null;
30
40
  const clampedValue = Math.min(100, Math.max(0, value));
31
41
  const clampedBuffer = buffer !== void 0 ? Math.min(100, Math.max(0, buffer)) : void 0;
32
42
  const sizeValue = parseSizeToNumber(size, 56);
@@ -36,7 +46,6 @@ const ProgressRing = forwardRef(
36
46
  const strokeDashoffset = circumference - clampedValue / 100 * circumference;
37
47
  const bufferDashoffset = clampedBuffer !== void 0 ? circumference - clampedBuffer / 100 * circumference : void 0;
38
48
  const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
39
- const gradientId = useMemo(() => `progress-gradient-${Math.random().toString(36).substr(2, 9)}`, []);
40
49
  return /* @__PURE__ */ jsxs(
41
50
  "div",
42
51
  {
@@ -46,7 +55,9 @@ const ProgressRing = forwardRef(
46
55
  style: {
47
56
  width: normalizeSize(size),
48
57
  height: normalizeSize(size),
49
- ...style
58
+ ...style,
59
+ opacity,
60
+ transition: transitionStyle
50
61
  },
51
62
  role: "progressbar",
52
63
  "aria-label": progressLabel,
@@ -139,4 +150,3 @@ ProgressRing.displayName = "ProgressRing";
139
150
  export {
140
151
  ProgressRing
141
152
  };
142
- //# sourceMappingURL=index23.js.map
package/dist/index24.cjs CHANGED
@@ -2,6 +2,7 @@
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
6
  const classNames = require("./index3.cjs");
6
7
  const ProgressSteps = react.forwardRef(
7
8
  ({
@@ -15,6 +16,9 @@ const ProgressSteps = react.forwardRef(
15
16
  completedColor,
16
17
  activeColor,
17
18
  inactiveColor = "#e0e0e0",
19
+ delay = 0,
20
+ minDuration = 0,
21
+ transition,
18
22
  className,
19
23
  style,
20
24
  testId = "progress-steps",
@@ -22,7 +26,13 @@ const ProgressSteps = react.forwardRef(
22
26
  ariaLabel = "Progress steps",
23
27
  ...rest
24
28
  }, ref) => {
25
- if (!visible) return null;
29
+ const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(
30
+ visible,
31
+ delay,
32
+ minDuration,
33
+ transition
34
+ );
35
+ if (!shouldRender) return null;
26
36
  const completed = completedColor || color;
27
37
  const active = activeColor || color;
28
38
  const getStepStatus = (index) => {
@@ -49,7 +59,11 @@ const ProgressSteps = react.forwardRef(
49
59
  isHorizontal ? "flex-row items-center w-full" : "flex-col items-start",
50
60
  className
51
61
  ),
52
- style,
62
+ style: {
63
+ ...style,
64
+ opacity,
65
+ transition: transitionStyle
66
+ },
53
67
  role: "progressbar",
54
68
  "aria-label": ariaLabel,
55
69
  "aria-valuenow": currentStep,
@@ -128,4 +142,3 @@ const ProgressSteps = react.forwardRef(
128
142
  );
129
143
  ProgressSteps.displayName = "ProgressSteps";
130
144
  exports.ProgressSteps = ProgressSteps;
131
- //# sourceMappingURL=index24.cjs.map
package/dist/index24.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef, Fragment } from "react";
3
+ import { useLoaderVisibility } from "./index30.js";
3
4
  import { cn } from "./index3.js";
4
5
  const ProgressSteps = forwardRef(
5
6
  ({
@@ -13,6 +14,9 @@ const ProgressSteps = forwardRef(
13
14
  completedColor,
14
15
  activeColor,
15
16
  inactiveColor = "#e0e0e0",
17
+ delay = 0,
18
+ minDuration = 0,
19
+ transition,
16
20
  className,
17
21
  style,
18
22
  testId = "progress-steps",
@@ -20,7 +24,13 @@ const ProgressSteps = forwardRef(
20
24
  ariaLabel = "Progress steps",
21
25
  ...rest
22
26
  }, ref) => {
23
- if (!visible) return null;
27
+ const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(
28
+ visible,
29
+ delay,
30
+ minDuration,
31
+ transition
32
+ );
33
+ if (!shouldRender) return null;
24
34
  const completed = completedColor || color;
25
35
  const active = activeColor || color;
26
36
  const getStepStatus = (index) => {
@@ -47,7 +57,11 @@ const ProgressSteps = forwardRef(
47
57
  isHorizontal ? "flex-row items-center w-full" : "flex-col items-start",
48
58
  className
49
59
  ),
50
- style,
60
+ style: {
61
+ ...style,
62
+ opacity,
63
+ transition: transitionStyle
64
+ },
51
65
  role: "progressbar",
52
66
  "aria-label": ariaLabel,
53
67
  "aria-valuenow": currentStep,
@@ -128,4 +142,3 @@ ProgressSteps.displayName = "ProgressSteps";
128
142
  export {
129
143
  ProgressSteps
130
144
  };
131
- //# sourceMappingURL=index24.js.map
package/dist/index25.cjs CHANGED
@@ -2,7 +2,7 @@
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("./index31.cjs");
5
+ const hooks = require("./index30.cjs");
6
6
  const colors = require("./index4.cjs");
7
7
  const classNames = require("./index3.cjs");
8
8
  const PulseDots = react.forwardRef(
@@ -14,6 +14,9 @@ const PulseDots = react.forwardRef(
14
14
  speed = "normal",
15
15
  reverse = false,
16
16
  respectMotionPreference = true,
17
+ delay = 0,
18
+ minDuration = 0,
19
+ transition,
17
20
  className,
18
21
  style,
19
22
  testId = "pulse-dots",
@@ -21,9 +24,15 @@ const PulseDots = react.forwardRef(
21
24
  ariaLabel = "Loading...",
22
25
  ...rest
23
26
  }, ref) => {
24
- if (!visible) return null;
25
27
  const prefersReducedMotion = hooks.useReducedMotion();
26
28
  const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
29
+ const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(
30
+ visible,
31
+ delay,
32
+ minDuration,
33
+ transition
34
+ );
35
+ if (!shouldRender) return null;
27
36
  return /* @__PURE__ */ jsxRuntime.jsx(
28
37
  "div",
29
38
  {
@@ -32,7 +41,9 @@ const PulseDots = react.forwardRef(
32
41
  className: classNames.cn("inline-flex items-center justify-center gap-2", className),
33
42
  style: {
34
43
  height: colors.normalizeSize(size),
35
- ...style
44
+ ...style,
45
+ opacity,
46
+ transition: transitionStyle
36
47
  },
37
48
  role: "status",
38
49
  "aria-label": ariaLabel,
@@ -58,4 +69,3 @@ const PulseDots = react.forwardRef(
58
69
  );
59
70
  PulseDots.displayName = "PulseDots";
60
71
  exports.PulseDots = PulseDots;
61
- //# sourceMappingURL=index25.cjs.map