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/index9.cjs CHANGED
@@ -4,6 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const react = require("react");
5
5
  const Skeleton = require("./index5.cjs");
6
6
  const SkeletonAvatar = require("./index7.cjs");
7
+ const hooks = require("./index30.cjs");
7
8
  const classNames = require("./index3.cjs");
8
9
  const SkeletonCard = react.forwardRef(
9
10
  ({
@@ -14,20 +15,33 @@ const SkeletonCard = react.forwardRef(
14
15
  animate = true,
15
16
  baseColor,
16
17
  highlightColor,
18
+ delay = 0,
19
+ minDuration = 0,
20
+ transition,
17
21
  className,
18
22
  style,
19
23
  testId = "skeleton-card",
20
24
  visible = true,
21
25
  ...rest
22
26
  }, ref) => {
23
- if (!visible) return null;
27
+ const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(
28
+ visible,
29
+ delay,
30
+ minDuration,
31
+ transition
32
+ );
33
+ if (!shouldRender) return null;
24
34
  return /* @__PURE__ */ jsxRuntime.jsxs(
25
35
  "div",
26
36
  {
27
37
  ref,
28
38
  "data-testid": testId,
29
39
  className: classNames.cn("flex gap-3", className),
30
- style,
40
+ style: {
41
+ ...style,
42
+ opacity,
43
+ transition: transitionStyle
44
+ },
31
45
  role: "status",
32
46
  "aria-label": "Loading card...",
33
47
  "aria-busy": "true",
@@ -74,4 +88,3 @@ const SkeletonCard = react.forwardRef(
74
88
  );
75
89
  SkeletonCard.displayName = "SkeletonCard";
76
90
  exports.SkeletonCard = SkeletonCard;
77
- //# sourceMappingURL=index9.cjs.map
package/dist/index9.js CHANGED
@@ -2,6 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { Skeleton } from "./index5.js";
4
4
  import { SkeletonAvatar } from "./index7.js";
5
+ import { useLoaderVisibility } from "./index30.js";
5
6
  import { cn } from "./index3.js";
6
7
  const SkeletonCard = forwardRef(
7
8
  ({
@@ -12,20 +13,33 @@ const SkeletonCard = forwardRef(
12
13
  animate = true,
13
14
  baseColor,
14
15
  highlightColor,
16
+ delay = 0,
17
+ minDuration = 0,
18
+ transition,
15
19
  className,
16
20
  style,
17
21
  testId = "skeleton-card",
18
22
  visible = true,
19
23
  ...rest
20
24
  }, ref) => {
21
- if (!visible) return null;
25
+ const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(
26
+ visible,
27
+ delay,
28
+ minDuration,
29
+ transition
30
+ );
31
+ if (!shouldRender) return null;
22
32
  return /* @__PURE__ */ jsxs(
23
33
  "div",
24
34
  {
25
35
  ref,
26
36
  "data-testid": testId,
27
37
  className: cn("flex gap-3", className),
28
- style,
38
+ style: {
39
+ ...style,
40
+ opacity,
41
+ transition: transitionStyle
42
+ },
29
43
  role: "status",
30
44
  "aria-label": "Loading card...",
31
45
  "aria-busy": "true",
@@ -74,4 +88,3 @@ SkeletonCard.displayName = "SkeletonCard";
74
88
  export {
75
89
  SkeletonCard
76
90
  };
77
- //# sourceMappingURL=index9.js.map