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.
- package/README.md +64 -30
- package/dist/components/overlay/LoaderOverlay.d.ts.map +1 -1
- package/dist/components/progress/ProgressBar.d.ts.map +1 -1
- package/dist/components/progress/ProgressCircle.d.ts.map +1 -1
- package/dist/components/progress/ProgressRing.d.ts.map +1 -1
- package/dist/components/progress/ProgressSteps.d.ts.map +1 -1
- package/dist/components/pulse/PulseBars.d.ts.map +1 -1
- package/dist/components/pulse/PulseDots.d.ts.map +1 -1
- package/dist/components/pulse/PulseWave.d.ts.map +1 -1
- package/dist/components/pulse/TypingIndicator.d.ts.map +1 -1
- package/dist/components/skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/skeleton/SkeletonAvatar.d.ts.map +1 -1
- package/dist/components/skeleton/SkeletonCard.d.ts.map +1 -1
- package/dist/components/skeleton/SkeletonForm.d.ts.map +1 -1
- package/dist/components/skeleton/SkeletonImage.d.ts.map +1 -1
- package/dist/components/skeleton/SkeletonList.d.ts.map +1 -1
- package/dist/components/skeleton/SkeletonPage.d.ts.map +1 -1
- package/dist/components/skeleton/SkeletonTable.d.ts.map +1 -1
- package/dist/components/skeleton/SkeletonText.d.ts.map +1 -1
- package/dist/components/spinner/SpinnerBars.d.ts.map +1 -1
- package/dist/components/spinner/SpinnerCircle.d.ts.map +1 -1
- package/dist/components/spinner/SpinnerDots.d.ts.map +1 -1
- package/dist/components/spinner/SpinnerGrid.d.ts.map +1 -1
- package/dist/components/spinner/SpinnerPulse.d.ts.map +1 -1
- package/dist/components/spinner/SpinnerRing.d.ts.map +1 -1
- package/dist/components/spinner/SpinnerWave.d.ts.map +1 -1
- package/dist/index.cjs +0 -1
- package/dist/index.js +0 -1
- package/dist/index10.cjs +14 -3
- package/dist/index10.js +14 -3
- package/dist/index11.cjs +16 -3
- package/dist/index11.js +16 -3
- package/dist/index12.cjs +16 -3
- package/dist/index12.js +16 -3
- package/dist/index13.cjs +12 -3
- package/dist/index13.js +12 -3
- package/dist/index14.cjs +16 -4
- package/dist/index14.js +16 -4
- package/dist/index15.cjs +16 -4
- package/dist/index15.js +16 -4
- package/dist/index16.cjs +16 -4
- package/dist/index16.js +16 -4
- package/dist/index17.cjs +14 -4
- package/dist/index17.js +14 -4
- package/dist/index18.cjs +18 -6
- package/dist/index18.js +18 -6
- package/dist/index19.cjs +16 -4
- package/dist/index19.js +16 -4
- package/dist/index20.cjs +16 -4
- package/dist/index20.js +16 -4
- package/dist/index21.cjs +15 -5
- package/dist/index21.js +15 -5
- package/dist/index22.cjs +14 -4
- package/dist/index22.js +14 -4
- package/dist/index23.cjs +15 -5
- package/dist/index23.js +15 -5
- package/dist/index24.cjs +16 -3
- package/dist/index24.js +16 -3
- package/dist/index25.cjs +14 -4
- package/dist/index25.js +14 -4
- package/dist/index26.cjs +16 -6
- package/dist/index26.js +16 -6
- package/dist/index27.cjs +16 -6
- package/dist/index27.js +16 -6
- package/dist/index28.cjs +14 -4
- package/dist/index28.js +14 -4
- package/dist/index29.cjs +14 -3
- package/dist/index29.js +14 -3
- package/dist/index3.cjs +11 -3
- package/dist/index3.js +11 -3
- package/dist/index30.cjs +122 -15
- package/dist/index30.js +121 -14
- package/dist/index4.cjs +0 -1
- package/dist/index4.js +0 -1
- package/dist/index5.cjs +14 -3
- package/dist/index5.js +14 -3
- package/dist/index6.cjs +14 -3
- package/dist/index6.js +14 -3
- package/dist/index7.cjs +16 -3
- package/dist/index7.js +16 -3
- package/dist/index8.cjs +14 -3
- package/dist/index8.js +14 -3
- package/dist/index9.cjs +16 -3
- package/dist/index9.js +16 -3
- package/dist/premium-react-loaders.css +217 -940
- package/dist/types/common.d.ts +6 -0
- package/dist/types/common.d.ts.map +1 -1
- package/dist/utils/classNames.d.ts +3 -2
- package/dist/utils/classNames.d.ts.map +1 -1
- package/dist/utils/hooks.d.ts +9 -0
- package/dist/utils/hooks.d.ts.map +1 -1
- package/package.json +5 -8
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index10.cjs.map +0 -1
- package/dist/index10.js.map +0 -1
- package/dist/index11.cjs.map +0 -1
- package/dist/index11.js.map +0 -1
- package/dist/index12.cjs.map +0 -1
- package/dist/index12.js.map +0 -1
- package/dist/index13.cjs.map +0 -1
- package/dist/index13.js.map +0 -1
- package/dist/index14.cjs.map +0 -1
- package/dist/index14.js.map +0 -1
- package/dist/index15.cjs.map +0 -1
- package/dist/index15.js.map +0 -1
- package/dist/index16.cjs.map +0 -1
- package/dist/index16.js.map +0 -1
- package/dist/index17.cjs.map +0 -1
- package/dist/index17.js.map +0 -1
- package/dist/index18.cjs.map +0 -1
- package/dist/index18.js.map +0 -1
- package/dist/index19.cjs.map +0 -1
- package/dist/index19.js.map +0 -1
- package/dist/index20.cjs.map +0 -1
- package/dist/index20.js.map +0 -1
- package/dist/index21.cjs.map +0 -1
- package/dist/index21.js.map +0 -1
- package/dist/index22.cjs.map +0 -1
- package/dist/index22.js.map +0 -1
- package/dist/index23.cjs.map +0 -1
- package/dist/index23.js.map +0 -1
- package/dist/index24.cjs.map +0 -1
- package/dist/index24.js.map +0 -1
- package/dist/index25.cjs.map +0 -1
- package/dist/index25.js.map +0 -1
- package/dist/index26.cjs.map +0 -1
- package/dist/index26.js.map +0 -1
- package/dist/index27.cjs.map +0 -1
- package/dist/index27.js.map +0 -1
- package/dist/index28.cjs.map +0 -1
- package/dist/index28.js.map +0 -1
- package/dist/index29.cjs.map +0 -1
- package/dist/index29.js.map +0 -1
- package/dist/index3.cjs.map +0 -1
- package/dist/index3.js.map +0 -1
- package/dist/index30.cjs.map +0 -1
- package/dist/index30.js.map +0 -1
- package/dist/index31.cjs +0 -42
- package/dist/index31.cjs.map +0 -1
- package/dist/index31.js +0 -42
- package/dist/index31.js.map +0 -1
- package/dist/index4.cjs.map +0 -1
- package/dist/index4.js.map +0 -1
- package/dist/index5.cjs.map +0 -1
- package/dist/index5.js.map +0 -1
- package/dist/index6.cjs.map +0 -1
- package/dist/index6.js.map +0 -1
- package/dist/index7.cjs.map +0 -1
- package/dist/index7.js.map +0 -1
- package/dist/index8.cjs.map +0 -1
- package/dist/index8.js.map +0 -1
- package/dist/index9.cjs.map +0 -1
- 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
|
-
|
|
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
|
-
|
|
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
|