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/index10.js CHANGED
@@ -1,15 +1,12 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { Skeleton } from "./index5.js";
4
- import { useLoaderVisibility } from "./index30.js";
5
- import { normalizeSize } from "./index4.js";
6
- import { cn } from "./index3.js";
7
- const SkeletonList = forwardRef(
3
+ import { Skeleton } from "./index7.js";
4
+ import { useLoaderVisibility } from "./index32.js";
5
+ const SkeletonImage = forwardRef(
8
6
  ({
9
- items = 3,
10
- itemHeight = "3rem",
11
- gap = "0.75rem",
12
7
  width = "100%",
8
+ height = "200px",
9
+ aspectRatio,
13
10
  animate = true,
14
11
  baseColor,
15
12
  highlightColor,
@@ -19,7 +16,7 @@ const SkeletonList = forwardRef(
19
16
  transition,
20
17
  className,
21
18
  style,
22
- testId = "skeleton-list",
19
+ testId = "skeleton-image",
23
20
  visible = true,
24
21
  ...rest
25
22
  }, ref) => {
@@ -31,39 +28,31 @@ const SkeletonList = forwardRef(
31
28
  );
32
29
  if (!shouldRender) return null;
33
30
  return /* @__PURE__ */ jsx(
34
- "div",
31
+ Skeleton,
35
32
  {
36
33
  ref,
37
34
  "data-testid": testId,
38
- className: cn("flex flex-col", className),
35
+ width,
36
+ height: aspectRatio ? "auto" : height,
37
+ variant: "rounded",
38
+ borderRadius,
39
+ animate,
40
+ baseColor,
41
+ highlightColor,
42
+ className,
39
43
  style: {
40
- gap: normalizeSize(gap),
44
+ aspectRatio: aspectRatio || void 0,
41
45
  ...style,
42
46
  opacity,
43
47
  transition: transitionStyle
44
48
  },
45
- role: "status",
46
- "aria-label": "Loading list...",
47
- "aria-busy": "true",
48
- ...rest,
49
- children: Array.from({ length: items }).map((_, index) => /* @__PURE__ */ jsx(
50
- Skeleton,
51
- {
52
- width,
53
- height: itemHeight,
54
- variant: "rounded",
55
- borderRadius,
56
- animate,
57
- baseColor,
58
- highlightColor
59
- },
60
- index
61
- ))
49
+ "aria-label": "Loading image...",
50
+ ...rest
62
51
  }
63
52
  );
64
53
  }
65
54
  );
66
- SkeletonList.displayName = "SkeletonList";
55
+ SkeletonImage.displayName = "SkeletonImage";
67
56
  export {
68
- SkeletonList
57
+ SkeletonImage
69
58
  };
package/dist/index11.cjs CHANGED
@@ -2,14 +2,16 @@
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 Skeleton = require("./index5.cjs");
6
- const hooks = require("./index30.cjs");
5
+ const Skeleton = require("./index7.cjs");
6
+ const SkeletonAvatar = require("./index9.cjs");
7
+ const hooks = require("./index32.cjs");
7
8
  const classNames = require("./index3.cjs");
8
- const SkeletonTable = react.forwardRef(
9
+ const SkeletonCard = react.forwardRef(
9
10
  ({
10
- rows = 5,
11
- columns = 3,
12
- showHeader = true,
11
+ hasAvatar = true,
12
+ titleWidth = "60%",
13
+ lines = 2,
14
+ avatarSize = 40,
13
15
  animate = true,
14
16
  baseColor,
15
17
  highlightColor,
@@ -18,7 +20,7 @@ const SkeletonTable = react.forwardRef(
18
20
  transition,
19
21
  className,
20
22
  style,
21
- testId = "skeleton-table",
23
+ testId = "skeleton-card",
22
24
  visible = true,
23
25
  ...rest
24
26
  }, ref) => {
@@ -29,40 +31,60 @@ const SkeletonTable = react.forwardRef(
29
31
  transition
30
32
  );
31
33
  if (!shouldRender) return null;
32
- const renderRow = (isHeader = false) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-4", style: { gridTemplateColumns: `repeat(${columns}, 1fr)` }, children: Array.from({ length: columns }).map((_, colIndex) => /* @__PURE__ */ jsxRuntime.jsx(
33
- Skeleton.Skeleton,
34
- {
35
- width: "100%",
36
- height: isHeader ? "1.5rem" : "1.25rem",
37
- variant: "text",
38
- animate,
39
- baseColor,
40
- highlightColor
41
- },
42
- colIndex
43
- )) });
44
34
  return /* @__PURE__ */ jsxRuntime.jsxs(
45
35
  "div",
46
36
  {
47
37
  ref,
48
38
  "data-testid": testId,
49
- className: classNames.cn("flex flex-col gap-3", className),
39
+ className: classNames.cn("flex gap-3", className),
50
40
  style: {
51
41
  ...style,
52
42
  opacity,
53
43
  transition: transitionStyle
54
44
  },
55
45
  role: "status",
56
- "aria-label": "Loading table...",
46
+ "aria-label": "Loading card...",
57
47
  "aria-busy": "true",
58
48
  ...rest,
59
49
  children: [
60
- showHeader && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-gray-200 pb-2", children: renderRow(true) }),
61
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: Array.from({ length: rows }).map((_, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: renderRow(false) }, rowIndex)) })
50
+ hasAvatar && /* @__PURE__ */ jsxRuntime.jsx(
51
+ SkeletonAvatar.SkeletonAvatar,
52
+ {
53
+ size: avatarSize,
54
+ animate,
55
+ baseColor,
56
+ highlightColor
57
+ }
58
+ ),
59
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-2", children: [
60
+ /* @__PURE__ */ jsxRuntime.jsx(
61
+ Skeleton.Skeleton,
62
+ {
63
+ width: titleWidth,
64
+ height: "1.25rem",
65
+ variant: "text",
66
+ animate,
67
+ baseColor,
68
+ highlightColor
69
+ }
70
+ ),
71
+ Array.from({ length: lines }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
72
+ Skeleton.Skeleton,
73
+ {
74
+ width: index === lines - 1 ? "70%" : "100%",
75
+ height: "1rem",
76
+ variant: "text",
77
+ animate,
78
+ baseColor,
79
+ highlightColor
80
+ },
81
+ index
82
+ ))
83
+ ] })
62
84
  ]
63
85
  }
64
86
  );
65
87
  }
66
88
  );
67
- SkeletonTable.displayName = "SkeletonTable";
68
- exports.SkeletonTable = SkeletonTable;
89
+ SkeletonCard.displayName = "SkeletonCard";
90
+ exports.SkeletonCard = SkeletonCard;
package/dist/index11.js CHANGED
@@ -1,13 +1,15 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { Skeleton } from "./index5.js";
4
- import { useLoaderVisibility } from "./index30.js";
3
+ import { Skeleton } from "./index7.js";
4
+ import { SkeletonAvatar } from "./index9.js";
5
+ import { useLoaderVisibility } from "./index32.js";
5
6
  import { cn } from "./index3.js";
6
- const SkeletonTable = forwardRef(
7
+ const SkeletonCard = forwardRef(
7
8
  ({
8
- rows = 5,
9
- columns = 3,
10
- showHeader = true,
9
+ hasAvatar = true,
10
+ titleWidth = "60%",
11
+ lines = 2,
12
+ avatarSize = 40,
11
13
  animate = true,
12
14
  baseColor,
13
15
  highlightColor,
@@ -16,7 +18,7 @@ const SkeletonTable = forwardRef(
16
18
  transition,
17
19
  className,
18
20
  style,
19
- testId = "skeleton-table",
21
+ testId = "skeleton-card",
20
22
  visible = true,
21
23
  ...rest
22
24
  }, ref) => {
@@ -27,42 +29,62 @@ const SkeletonTable = forwardRef(
27
29
  transition
28
30
  );
29
31
  if (!shouldRender) return null;
30
- const renderRow = (isHeader = false) => /* @__PURE__ */ jsx("div", { className: "grid gap-4", style: { gridTemplateColumns: `repeat(${columns}, 1fr)` }, children: Array.from({ length: columns }).map((_, colIndex) => /* @__PURE__ */ jsx(
31
- Skeleton,
32
- {
33
- width: "100%",
34
- height: isHeader ? "1.5rem" : "1.25rem",
35
- variant: "text",
36
- animate,
37
- baseColor,
38
- highlightColor
39
- },
40
- colIndex
41
- )) });
42
32
  return /* @__PURE__ */ jsxs(
43
33
  "div",
44
34
  {
45
35
  ref,
46
36
  "data-testid": testId,
47
- className: cn("flex flex-col gap-3", className),
37
+ className: cn("flex gap-3", className),
48
38
  style: {
49
39
  ...style,
50
40
  opacity,
51
41
  transition: transitionStyle
52
42
  },
53
43
  role: "status",
54
- "aria-label": "Loading table...",
44
+ "aria-label": "Loading card...",
55
45
  "aria-busy": "true",
56
46
  ...rest,
57
47
  children: [
58
- showHeader && /* @__PURE__ */ jsx("div", { className: "border-b border-gray-200 pb-2", children: renderRow(true) }),
59
- /* @__PURE__ */ jsx("div", { className: "space-y-3", children: Array.from({ length: rows }).map((_, rowIndex) => /* @__PURE__ */ jsx("div", { children: renderRow(false) }, rowIndex)) })
48
+ hasAvatar && /* @__PURE__ */ jsx(
49
+ SkeletonAvatar,
50
+ {
51
+ size: avatarSize,
52
+ animate,
53
+ baseColor,
54
+ highlightColor
55
+ }
56
+ ),
57
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-2", children: [
58
+ /* @__PURE__ */ jsx(
59
+ Skeleton,
60
+ {
61
+ width: titleWidth,
62
+ height: "1.25rem",
63
+ variant: "text",
64
+ animate,
65
+ baseColor,
66
+ highlightColor
67
+ }
68
+ ),
69
+ Array.from({ length: lines }).map((_, index) => /* @__PURE__ */ jsx(
70
+ Skeleton,
71
+ {
72
+ width: index === lines - 1 ? "70%" : "100%",
73
+ height: "1rem",
74
+ variant: "text",
75
+ animate,
76
+ baseColor,
77
+ highlightColor
78
+ },
79
+ index
80
+ ))
81
+ ] })
60
82
  ]
61
83
  }
62
84
  );
63
85
  }
64
86
  );
65
- SkeletonTable.displayName = "SkeletonTable";
87
+ SkeletonCard.displayName = "SkeletonCard";
66
88
  export {
67
- SkeletonTable
89
+ SkeletonCard
68
90
  };
package/dist/index12.cjs CHANGED
@@ -2,23 +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 Skeleton = require("./index5.cjs");
6
- const SkeletonText = require("./index6.cjs");
7
- const SkeletonAvatar = require("./index7.cjs");
8
- const hooks = require("./index30.cjs");
5
+ const Skeleton = require("./index7.cjs");
6
+ const hooks = require("./index32.cjs");
7
+ const colors = require("./index4.cjs");
9
8
  const classNames = require("./index3.cjs");
10
- const SkeletonPage = react.forwardRef(
9
+ const SkeletonList = react.forwardRef(
11
10
  ({
12
- variant = "default",
11
+ items = 3,
12
+ itemHeight = "3rem",
13
+ gap = "0.75rem",
14
+ width = "100%",
13
15
  animate = true,
14
- baseColor = "#e0e0e0",
15
- highlightColor = "#f5f5f5",
16
+ baseColor,
17
+ highlightColor,
18
+ borderRadius = "0.5rem",
16
19
  delay = 0,
17
20
  minDuration = 0,
18
21
  transition,
19
22
  className,
20
23
  style,
21
- testId = "skeleton-page",
24
+ testId = "skeleton-list",
22
25
  visible = true,
23
26
  ...rest
24
27
  }, ref) => {
@@ -29,137 +32,38 @@ const SkeletonPage = react.forwardRef(
29
32
  transition
30
33
  );
31
34
  if (!shouldRender) return null;
32
- const commonProps = {
33
- animate,
34
- baseColor,
35
- highlightColor
36
- };
37
- const renderDefault = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
38
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between border-b pb-4", children: [
39
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 200, height: 32, ...commonProps }),
40
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
41
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 100, height: 36, borderRadius: 6, ...commonProps }),
42
- /* @__PURE__ */ jsxRuntime.jsx(SkeletonAvatar.SkeletonAvatar, { size: 40, ...commonProps })
43
- ] })
44
- ] }),
45
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
46
- /* @__PURE__ */ jsxRuntime.jsx(SkeletonText.SkeletonText, { lines: 3, ...commonProps }),
47
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-4", children: [
48
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 120, borderRadius: 8, ...commonProps }),
49
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 120, borderRadius: 8, ...commonProps }),
50
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 120, borderRadius: 8, ...commonProps })
51
- ] }),
52
- /* @__PURE__ */ jsxRuntime.jsx(SkeletonText.SkeletonText, { lines: 5, ...commonProps })
53
- ] })
54
- ] });
55
- const renderDashboard = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
56
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
57
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
58
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 180, height: 28, ...commonProps }),
59
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 120, height: 36, borderRadius: 6, ...commonProps })
60
- ] }),
61
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-4", children: [...Array(4)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 border rounded-lg space-y-2", children: [
62
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 100, height: 16, ...commonProps }),
63
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 80, height: 32, ...commonProps }),
64
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 60, height: 12, ...commonProps })
65
- ] }, i)) })
66
- ] }),
67
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 300, borderRadius: 8, ...commonProps }),
68
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
69
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4", children: [
70
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 150, height: 20, ...commonProps }),
71
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 150, height: 20, ...commonProps }),
72
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 150, height: 20, ...commonProps })
73
- ] }),
74
- [...Array(5)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4", children: [
75
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 150, height: 16, ...commonProps }),
76
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 150, height: 16, ...commonProps }),
77
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 150, height: 16, ...commonProps })
78
- ] }, i))
79
- ] })
80
- ] });
81
- const renderArticle = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-3xl mx-auto space-y-6", children: [
82
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
83
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: "80%", height: 40, ...commonProps }),
84
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
85
- /* @__PURE__ */ jsxRuntime.jsx(SkeletonAvatar.SkeletonAvatar, { size: 48, ...commonProps }),
86
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 flex-1", children: [
87
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 120, height: 16, ...commonProps }),
88
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 180, height: 14, ...commonProps })
89
- ] })
90
- ] })
91
- ] }),
92
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 400, borderRadius: 8, ...commonProps }),
93
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
94
- /* @__PURE__ */ jsxRuntime.jsx(SkeletonText.SkeletonText, { lines: 4, ...commonProps }),
95
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 200, borderRadius: 8, ...commonProps }),
96
- /* @__PURE__ */ jsxRuntime.jsx(SkeletonText.SkeletonText, { lines: 6, ...commonProps }),
97
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 250, borderRadius: 8, ...commonProps }),
98
- /* @__PURE__ */ jsxRuntime.jsx(SkeletonText.SkeletonText, { lines: 4, ...commonProps })
99
- ] })
100
- ] });
101
- const renderProfile = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
102
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-6 border-b pb-6", children: [
103
- /* @__PURE__ */ jsxRuntime.jsx(SkeletonAvatar.SkeletonAvatar, { size: 120, ...commonProps }),
104
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-3", children: [
105
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 200, height: 32, ...commonProps }),
106
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 150, height: 20, ...commonProps }),
107
- /* @__PURE__ */ jsxRuntime.jsx(SkeletonText.SkeletonText, { lines: 2, ...commonProps }),
108
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3", children: [
109
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 100, height: 36, borderRadius: 6, ...commonProps }),
110
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 100, height: 36, borderRadius: 6, ...commonProps })
111
- ] })
112
- ] })
113
- ] }),
114
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-6", children: [
115
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
116
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 100, height: 20, ...commonProps }),
117
- [...Array(4)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 16, ...commonProps }, i))
118
- ] }) }),
119
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2 space-y-4", children: [...Array(3)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 border rounded-lg space-y-3", children: [
120
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
121
- /* @__PURE__ */ jsxRuntime.jsx(SkeletonAvatar.SkeletonAvatar, { size: 40, ...commonProps }),
122
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-2", children: [
123
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 150, height: 16, ...commonProps }),
124
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 100, height: 12, ...commonProps })
125
- ] })
126
- ] }),
127
- /* @__PURE__ */ jsxRuntime.jsx(SkeletonText.SkeletonText, { lines: 2, ...commonProps }),
128
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 200, borderRadius: 6, ...commonProps })
129
- ] }, i)) })
130
- ] })
131
- ] });
132
- const renderContent = () => {
133
- switch (variant) {
134
- case "dashboard":
135
- return renderDashboard();
136
- case "article":
137
- return renderArticle();
138
- case "profile":
139
- return renderProfile();
140
- default:
141
- return renderDefault();
142
- }
143
- };
144
35
  return /* @__PURE__ */ jsxRuntime.jsx(
145
36
  "div",
146
37
  {
147
38
  ref,
148
39
  "data-testid": testId,
149
- className: classNames.cn("w-full p-6", className),
40
+ className: classNames.cn("flex flex-col", className),
150
41
  style: {
42
+ gap: colors.normalizeSize(gap),
151
43
  ...style,
152
44
  opacity,
153
45
  transition: transitionStyle
154
46
  },
155
47
  role: "status",
156
- "aria-label": "Loading page...",
48
+ "aria-label": "Loading list...",
157
49
  "aria-busy": "true",
158
50
  ...rest,
159
- children: renderContent()
51
+ children: Array.from({ length: items }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
52
+ Skeleton.Skeleton,
53
+ {
54
+ width,
55
+ height: itemHeight,
56
+ variant: "rounded",
57
+ borderRadius,
58
+ animate,
59
+ baseColor,
60
+ highlightColor
61
+ },
62
+ index
63
+ ))
160
64
  }
161
65
  );
162
66
  }
163
67
  );
164
- SkeletonPage.displayName = "SkeletonPage";
165
- exports.SkeletonPage = SkeletonPage;
68
+ SkeletonList.displayName = "SkeletonList";
69
+ exports.SkeletonList = SkeletonList;