premium-react-loaders 1.0.0 → 1.0.1
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 +49 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/overlay/LoaderOverlay.d.ts +28 -0
- package/dist/components/overlay/LoaderOverlay.d.ts.map +1 -0
- package/dist/components/overlay/index.d.ts +2 -0
- package/dist/components/overlay/index.d.ts.map +1 -0
- package/dist/components/skeleton/SkeletonPage.d.ts +16 -0
- package/dist/components/skeleton/SkeletonPage.d.ts.map +1 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton/index.d.ts.map +1 -1
- package/dist/index.cjs +15 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -11
- package/dist/index.js.map +1 -1
- package/dist/index12.cjs +126 -37
- package/dist/index12.cjs.map +1 -1
- package/dist/index12.js +127 -38
- package/dist/index12.js.map +1 -1
- package/dist/index13.cjs +23 -11
- package/dist/index13.cjs.map +1 -1
- package/dist/index13.js +23 -11
- package/dist/index13.js.map +1 -1
- package/dist/index14.cjs +9 -32
- package/dist/index14.cjs.map +1 -1
- package/dist/index14.js +9 -32
- package/dist/index14.js.map +1 -1
- package/dist/index15.cjs +40 -24
- package/dist/index15.cjs.map +1 -1
- package/dist/index15.js +40 -24
- package/dist/index15.js.map +1 -1
- package/dist/index16.cjs +23 -36
- package/dist/index16.cjs.map +1 -1
- package/dist/index16.js +23 -36
- package/dist/index16.js.map +1 -1
- package/dist/index17.cjs +48 -58
- package/dist/index17.cjs.map +1 -1
- package/dist/index17.js +49 -59
- package/dist/index17.js.map +1 -1
- package/dist/index18.cjs +27 -53
- package/dist/index18.cjs.map +1 -1
- package/dist/index18.js +27 -53
- package/dist/index18.js.map +1 -1
- package/dist/index19.cjs +8 -14
- package/dist/index19.cjs.map +1 -1
- package/dist/index19.js +8 -14
- package/dist/index19.js.map +1 -1
- package/dist/index20.cjs +84 -28
- package/dist/index20.cjs.map +1 -1
- package/dist/index20.js +86 -30
- package/dist/index20.js.map +1 -1
- package/dist/index21.cjs +21 -26
- package/dist/index21.cjs.map +1 -1
- package/dist/index21.js +21 -26
- package/dist/index21.js.map +1 -1
- package/dist/index22.cjs +9 -11
- package/dist/index22.cjs.map +1 -1
- package/dist/index22.js +9 -11
- package/dist/index22.js.map +1 -1
- package/dist/index23.cjs +62 -16
- package/dist/index23.cjs.map +1 -1
- package/dist/index23.js +61 -15
- package/dist/index23.js.map +1 -1
- package/dist/index24.cjs +71 -0
- package/dist/index24.cjs.map +1 -0
- package/dist/index24.js +71 -0
- package/dist/index24.js.map +1 -0
- package/dist/index25.cjs +18 -0
- package/dist/index25.cjs.map +1 -0
- package/dist/index25.js +18 -0
- package/dist/index25.js.map +1 -0
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +1 -1
- package/dist/premium-react-loaders.css +98 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/overlay.d.ts +24 -0
- package/dist/types/overlay.d.ts.map +1 -0
- package/dist/types/skeleton.d.ts +7 -0
- package/dist/types/skeleton.d.ts.map +1 -1
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
# Premium React Loaders
|
|
2
2
|
|
|
3
|
-
A comprehensive collection of **
|
|
3
|
+
A comprehensive collection of **20 premium, production-ready loading components** for React applications. Built with TypeScript and Tailwind CSS for maximum flexibility and customization.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/premium-react-loaders)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
+
## Demo
|
|
9
|
+
|
|
10
|
+
🚀 **[Interactive Demo](https://premium-react-loaders.ishansasika.dev/)** - Playground with live controls and component customization
|
|
11
|
+
|
|
12
|
+
📚 **[Storybook Documentation](https://docs.premium-react-loaders.ishansasika.dev/)** - Detailed component documentation and examples
|
|
13
|
+
|
|
14
|
+
See all 20 components in action with interactive examples and customization options.
|
|
15
|
+
|
|
8
16
|
## Features
|
|
9
17
|
|
|
10
|
-
- **
|
|
18
|
+
- **20 Premium Components** across 5 categories (Skeleton, Spinner, Progress, Pulse, Overlay)
|
|
11
19
|
- **Full TypeScript Support** with exported type definitions
|
|
12
20
|
- **Tailwind CSS Integration** for easy customization
|
|
13
21
|
- **Tree-shakeable** - only bundle what you use
|
|
@@ -87,7 +95,7 @@ function App() {
|
|
|
87
95
|
|
|
88
96
|
## Component Categories
|
|
89
97
|
|
|
90
|
-
### Skeleton Loaders (
|
|
98
|
+
### Skeleton Loaders (8 components)
|
|
91
99
|
|
|
92
100
|
Placeholder components that mimic content layout while loading:
|
|
93
101
|
|
|
@@ -98,6 +106,7 @@ Placeholder components that mimic content layout while loading:
|
|
|
98
106
|
- **SkeletonCard** - Card layout with avatar + text
|
|
99
107
|
- **SkeletonList** - List of skeleton items
|
|
100
108
|
- **SkeletonTable** - Table skeleton with rows/columns
|
|
109
|
+
- **SkeletonPage** - Pre-built full page layouts (default, dashboard, article, profile)
|
|
101
110
|
|
|
102
111
|
### Spinner Loaders (5 components)
|
|
103
112
|
|
|
@@ -125,6 +134,12 @@ Bouncing, pulsing, wave animations:
|
|
|
125
134
|
- **PulseWave** - Wave pattern bars
|
|
126
135
|
- **PulseBars** - Equalizer-style pulsing bars
|
|
127
136
|
|
|
137
|
+
### Overlay Components (1 component)
|
|
138
|
+
|
|
139
|
+
Wrapper component for displaying loaders over content:
|
|
140
|
+
|
|
141
|
+
- **LoaderOverlay** - Displays any loader over content with backdrop (full-screen or container-relative)
|
|
142
|
+
|
|
128
143
|
## Usage Examples
|
|
129
144
|
|
|
130
145
|
### Skeleton Components
|
|
@@ -222,6 +237,37 @@ import { PulseDots, PulseWave, PulseBars } from 'premium-react-loaders';
|
|
|
222
237
|
<PulseBars barCount={4} speed="fast" />
|
|
223
238
|
```
|
|
224
239
|
|
|
240
|
+
### New in v1.0.1
|
|
241
|
+
|
|
242
|
+
```tsx
|
|
243
|
+
import { LoaderOverlay, SkeletonPage, SpinnerCircle } from 'premium-react-loaders';
|
|
244
|
+
|
|
245
|
+
// Page skeleton for full page loading
|
|
246
|
+
<SkeletonPage variant="dashboard" />
|
|
247
|
+
<SkeletonPage variant="article" />
|
|
248
|
+
<SkeletonPage variant="profile" />
|
|
249
|
+
|
|
250
|
+
// Loader overlay over content
|
|
251
|
+
<LoaderOverlay
|
|
252
|
+
loading={isLoading}
|
|
253
|
+
loader={<SpinnerCircle size={50} />}
|
|
254
|
+
blur
|
|
255
|
+
>
|
|
256
|
+
<YourContent />
|
|
257
|
+
</LoaderOverlay>
|
|
258
|
+
|
|
259
|
+
// Full-screen overlay with custom backdrop
|
|
260
|
+
<LoaderOverlay
|
|
261
|
+
loading={isLoading}
|
|
262
|
+
loader={<SpinnerCircle />}
|
|
263
|
+
position="fixed"
|
|
264
|
+
backdropOpacity={0.8}
|
|
265
|
+
backdropColor="#000000"
|
|
266
|
+
>
|
|
267
|
+
<YourApp />
|
|
268
|
+
</LoaderOverlay>
|
|
269
|
+
```
|
|
270
|
+
|
|
225
271
|
## Customization
|
|
226
272
|
|
|
227
273
|
All components support multiple customization methods:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAC;AAG3B,cAAc,WAAW,CAAC;AAG1B,cAAc,YAAY,CAAC;AAG3B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAC;AAG3B,cAAc,WAAW,CAAC;AAG1B,cAAc,YAAY,CAAC;AAG3B,cAAc,SAAS,CAAC;AAGxB,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LoaderOverlayProps } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* LoaderOverlay - Overlay wrapper for displaying loaders over content
|
|
4
|
+
*
|
|
5
|
+
* A flexible overlay component that displays a loader over content during loading states.
|
|
6
|
+
* Supports both full-screen and container-relative positioning.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* // Full screen overlay
|
|
11
|
+
* <LoaderOverlay loading={isLoading} loader={<SpinnerCircle />}>
|
|
12
|
+
* <YourContent />
|
|
13
|
+
* </LoaderOverlay>
|
|
14
|
+
*
|
|
15
|
+
* // Container overlay with custom backdrop
|
|
16
|
+
* <LoaderOverlay
|
|
17
|
+
* loading={isLoading}
|
|
18
|
+
* loader={<SpinnerRing />}
|
|
19
|
+
* position="absolute"
|
|
20
|
+
* backdropOpacity={0.7}
|
|
21
|
+
* blur
|
|
22
|
+
* >
|
|
23
|
+
* <YourContent />
|
|
24
|
+
* </LoaderOverlay>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare const LoaderOverlay: import('react').ForwardRefExoticComponent<LoaderOverlayProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
28
|
+
//# sourceMappingURL=LoaderOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoaderOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/overlay/LoaderOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,aAAa,+GA+DzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/overlay/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SkeletonPageProps } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* SkeletonPage - Pre-built page loading skeleton
|
|
4
|
+
*
|
|
5
|
+
* A ready-to-use skeleton layout for full page loading states.
|
|
6
|
+
* Displays a common page structure with header, navigation, and content sections.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <SkeletonPage />
|
|
11
|
+
* <SkeletonPage variant="dashboard" />
|
|
12
|
+
* <SkeletonPage variant="article" animate={false} />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare const SkeletonPage: import('react').ForwardRefExoticComponent<SkeletonPageProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
16
|
+
//# sourceMappingURL=SkeletonPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkeletonPage.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/SkeletonPage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAMhD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,8GA+LxB,CAAC"}
|
|
@@ -5,4 +5,5 @@ export { SkeletonImage } from './SkeletonImage';
|
|
|
5
5
|
export { SkeletonCard } from './SkeletonCard';
|
|
6
6
|
export { SkeletonList } from './SkeletonList';
|
|
7
7
|
export { SkeletonTable } from './SkeletonTable';
|
|
8
|
+
export { SkeletonPage } from './SkeletonPage';
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -10,17 +10,19 @@ const SkeletonImage = require("./index8.cjs");
|
|
|
10
10
|
const SkeletonCard = require("./index9.cjs");
|
|
11
11
|
const SkeletonList = require("./index10.cjs");
|
|
12
12
|
const SkeletonTable = require("./index11.cjs");
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
13
|
+
const SkeletonPage = require("./index12.cjs");
|
|
14
|
+
const SpinnerCircle = require("./index13.cjs");
|
|
15
|
+
const SpinnerRing = require("./index14.cjs");
|
|
16
|
+
const SpinnerDots = require("./index15.cjs");
|
|
17
|
+
const SpinnerBars = require("./index16.cjs");
|
|
18
|
+
const SpinnerGrid = require("./index17.cjs");
|
|
19
|
+
const ProgressBar = require("./index18.cjs");
|
|
20
|
+
const ProgressCircle = require("./index19.cjs");
|
|
21
|
+
const ProgressRing = require("./index20.cjs");
|
|
22
|
+
const PulseDots = require("./index21.cjs");
|
|
23
|
+
const PulseWave = require("./index22.cjs");
|
|
24
|
+
const PulseBars = require("./index23.cjs");
|
|
25
|
+
const LoaderOverlay = require("./index24.cjs");
|
|
24
26
|
const version = "1.0.0";
|
|
25
27
|
exports.cn = classNames.cn;
|
|
26
28
|
exports.getAnimationDuration = colors.getAnimationDuration;
|
|
@@ -32,6 +34,7 @@ exports.SkeletonImage = SkeletonImage.SkeletonImage;
|
|
|
32
34
|
exports.SkeletonCard = SkeletonCard.SkeletonCard;
|
|
33
35
|
exports.SkeletonList = SkeletonList.SkeletonList;
|
|
34
36
|
exports.SkeletonTable = SkeletonTable.SkeletonTable;
|
|
37
|
+
exports.SkeletonPage = SkeletonPage.SkeletonPage;
|
|
35
38
|
exports.SpinnerCircle = SpinnerCircle.SpinnerCircle;
|
|
36
39
|
exports.SpinnerRing = SpinnerRing.SpinnerRing;
|
|
37
40
|
exports.SpinnerDots = SpinnerDots.SpinnerDots;
|
|
@@ -43,5 +46,6 @@ exports.ProgressRing = ProgressRing.ProgressRing;
|
|
|
43
46
|
exports.PulseDots = PulseDots.PulseDots;
|
|
44
47
|
exports.PulseWave = PulseWave.PulseWave;
|
|
45
48
|
exports.PulseBars = PulseBars.PulseBars;
|
|
49
|
+
exports.LoaderOverlay = LoaderOverlay.LoaderOverlay;
|
|
46
50
|
exports.version = version;
|
|
47
51
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["// Import styles\nimport './styles/index.css';\n\n// Component exports\nexport * from './components';\n\n// Type exports\nexport type * from './types';\n\n// Utility exports\nexport { cn } from './utils/classNames';\nexport { getAnimationDuration, normalizeSize } from './utils/colors';\n\n// Version\nexport const version = '1.0.0';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["// Import styles\nimport './styles/index.css';\n\n// Component exports\nexport * from './components';\n\n// Type exports\nexport type * from './types';\n\n// Utility exports\nexport { cn } from './utils/classNames';\nexport { getAnimationDuration, normalizeSize } from './utils/colors';\n\n// Version\nexport const version = '1.0.0';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAcO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -8,19 +8,22 @@ import { SkeletonImage } from "./index8.js";
|
|
|
8
8
|
import { SkeletonCard } from "./index9.js";
|
|
9
9
|
import { SkeletonList } from "./index10.js";
|
|
10
10
|
import { SkeletonTable } from "./index11.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
11
|
+
import { SkeletonPage } from "./index12.js";
|
|
12
|
+
import { SpinnerCircle } from "./index13.js";
|
|
13
|
+
import { SpinnerRing } from "./index14.js";
|
|
14
|
+
import { SpinnerDots } from "./index15.js";
|
|
15
|
+
import { SpinnerBars } from "./index16.js";
|
|
16
|
+
import { SpinnerGrid } from "./index17.js";
|
|
17
|
+
import { ProgressBar } from "./index18.js";
|
|
18
|
+
import { ProgressCircle } from "./index19.js";
|
|
19
|
+
import { ProgressRing } from "./index20.js";
|
|
20
|
+
import { PulseDots } from "./index21.js";
|
|
21
|
+
import { PulseWave } from "./index22.js";
|
|
22
|
+
import { PulseBars } from "./index23.js";
|
|
23
|
+
import { LoaderOverlay } from "./index24.js";
|
|
22
24
|
const version = "1.0.0";
|
|
23
25
|
export {
|
|
26
|
+
LoaderOverlay,
|
|
24
27
|
ProgressBar,
|
|
25
28
|
ProgressCircle,
|
|
26
29
|
ProgressRing,
|
|
@@ -32,6 +35,7 @@ export {
|
|
|
32
35
|
SkeletonCard,
|
|
33
36
|
SkeletonImage,
|
|
34
37
|
SkeletonList,
|
|
38
|
+
SkeletonPage,
|
|
35
39
|
SkeletonTable,
|
|
36
40
|
SkeletonText,
|
|
37
41
|
SpinnerBars,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["// Import styles\nimport './styles/index.css';\n\n// Component exports\nexport * from './components';\n\n// Type exports\nexport type * from './types';\n\n// Utility exports\nexport { cn } from './utils/classNames';\nexport { getAnimationDuration, normalizeSize } from './utils/colors';\n\n// Version\nexport const version = '1.0.0';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["// Import styles\nimport './styles/index.css';\n\n// Component exports\nexport * from './components';\n\n// Type exports\nexport type * from './types';\n\n// Utility exports\nexport { cn } from './utils/classNames';\nexport { getAnimationDuration, normalizeSize } from './utils/colors';\n\n// Version\nexport const version = '1.0.0';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAcO,MAAM,UAAU;"}
|
package/dist/index12.cjs
CHANGED
|
@@ -2,62 +2,151 @@
|
|
|
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
|
|
5
|
+
const Skeleton = require("./index5.cjs");
|
|
6
|
+
const SkeletonText = require("./index6.cjs");
|
|
7
|
+
const SkeletonAvatar = require("./index7.cjs");
|
|
6
8
|
const classNames = require("./index3.cjs");
|
|
7
|
-
const
|
|
9
|
+
const SkeletonPage = react.forwardRef(
|
|
8
10
|
({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
variant = "default",
|
|
12
|
+
animate = true,
|
|
13
|
+
baseColor = "#e0e0e0",
|
|
14
|
+
highlightColor = "#f5f5f5",
|
|
13
15
|
className,
|
|
14
16
|
style,
|
|
15
|
-
testId = "
|
|
17
|
+
testId = "skeleton-page",
|
|
16
18
|
visible = true,
|
|
17
|
-
ariaLabel = "Loading...",
|
|
18
19
|
...rest
|
|
19
20
|
}, ref) => {
|
|
20
21
|
if (!visible) return null;
|
|
22
|
+
const commonProps = {
|
|
23
|
+
animate,
|
|
24
|
+
baseColor,
|
|
25
|
+
highlightColor
|
|
26
|
+
};
|
|
27
|
+
const renderDefault = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
28
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between border-b pb-4", children: [
|
|
29
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 200, height: 32, ...commonProps }),
|
|
30
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
|
|
31
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 100, height: 36, borderRadius: 6, ...commonProps }),
|
|
32
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonAvatar.SkeletonAvatar, { size: 40, ...commonProps })
|
|
33
|
+
] })
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonText.SkeletonText, { lines: 3, ...commonProps }),
|
|
37
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-4", children: [
|
|
38
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 120, borderRadius: 8, ...commonProps }),
|
|
39
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 120, borderRadius: 8, ...commonProps }),
|
|
40
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 120, borderRadius: 8, ...commonProps })
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonText.SkeletonText, { lines: 5, ...commonProps })
|
|
43
|
+
] })
|
|
44
|
+
] });
|
|
45
|
+
const renderDashboard = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
46
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
47
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
48
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 180, height: 28, ...commonProps }),
|
|
49
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 120, height: 36, borderRadius: 6, ...commonProps })
|
|
50
|
+
] }),
|
|
51
|
+
/* @__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: [
|
|
52
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 100, height: 16, ...commonProps }),
|
|
53
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 80, height: 32, ...commonProps }),
|
|
54
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 60, height: 12, ...commonProps })
|
|
55
|
+
] }, i)) })
|
|
56
|
+
] }),
|
|
57
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 300, borderRadius: 8, ...commonProps }),
|
|
58
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
59
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4", children: [
|
|
60
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 150, height: 20, ...commonProps }),
|
|
61
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 150, height: 20, ...commonProps }),
|
|
62
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 150, height: 20, ...commonProps })
|
|
63
|
+
] }),
|
|
64
|
+
[...Array(5)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4", children: [
|
|
65
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 150, height: 16, ...commonProps }),
|
|
66
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 150, height: 16, ...commonProps }),
|
|
67
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 150, height: 16, ...commonProps })
|
|
68
|
+
] }, i))
|
|
69
|
+
] })
|
|
70
|
+
] });
|
|
71
|
+
const renderArticle = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-3xl mx-auto space-y-6", children: [
|
|
72
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
73
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: "80%", height: 40, ...commonProps }),
|
|
74
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
75
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonAvatar.SkeletonAvatar, { size: 48, ...commonProps }),
|
|
76
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 flex-1", children: [
|
|
77
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 120, height: 16, ...commonProps }),
|
|
78
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 180, height: 14, ...commonProps })
|
|
79
|
+
] })
|
|
80
|
+
] })
|
|
81
|
+
] }),
|
|
82
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 400, borderRadius: 8, ...commonProps }),
|
|
83
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
84
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonText.SkeletonText, { lines: 4, ...commonProps }),
|
|
85
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 200, borderRadius: 8, ...commonProps }),
|
|
86
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonText.SkeletonText, { lines: 6, ...commonProps }),
|
|
87
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 250, borderRadius: 8, ...commonProps }),
|
|
88
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonText.SkeletonText, { lines: 4, ...commonProps })
|
|
89
|
+
] })
|
|
90
|
+
] });
|
|
91
|
+
const renderProfile = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
92
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-6 border-b pb-6", children: [
|
|
93
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonAvatar.SkeletonAvatar, { size: 120, ...commonProps }),
|
|
94
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-3", children: [
|
|
95
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 200, height: 32, ...commonProps }),
|
|
96
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 150, height: 20, ...commonProps }),
|
|
97
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonText.SkeletonText, { lines: 2, ...commonProps }),
|
|
98
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3", children: [
|
|
99
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 100, height: 36, borderRadius: 6, ...commonProps }),
|
|
100
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 100, height: 36, borderRadius: 6, ...commonProps })
|
|
101
|
+
] })
|
|
102
|
+
] })
|
|
103
|
+
] }),
|
|
104
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-6", children: [
|
|
105
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
106
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 100, height: 20, ...commonProps }),
|
|
107
|
+
[...Array(4)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 16, ...commonProps }, i))
|
|
108
|
+
] }) }),
|
|
109
|
+
/* @__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: [
|
|
110
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
111
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonAvatar.SkeletonAvatar, { size: 40, ...commonProps }),
|
|
112
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-2", children: [
|
|
113
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 150, height: 16, ...commonProps }),
|
|
114
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { width: 100, height: 12, ...commonProps })
|
|
115
|
+
] })
|
|
116
|
+
] }),
|
|
117
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonText.SkeletonText, { lines: 2, ...commonProps }),
|
|
118
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton.Skeleton, { height: 200, borderRadius: 6, ...commonProps })
|
|
119
|
+
] }, i)) })
|
|
120
|
+
] })
|
|
121
|
+
] });
|
|
122
|
+
const renderContent = () => {
|
|
123
|
+
switch (variant) {
|
|
124
|
+
case "dashboard":
|
|
125
|
+
return renderDashboard();
|
|
126
|
+
case "article":
|
|
127
|
+
return renderArticle();
|
|
128
|
+
case "profile":
|
|
129
|
+
return renderProfile();
|
|
130
|
+
default:
|
|
131
|
+
return renderDefault();
|
|
132
|
+
}
|
|
133
|
+
};
|
|
21
134
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22
135
|
"div",
|
|
23
136
|
{
|
|
24
137
|
ref,
|
|
25
138
|
"data-testid": testId,
|
|
26
|
-
className: classNames.cn("
|
|
139
|
+
className: classNames.cn("w-full p-6", className),
|
|
27
140
|
style,
|
|
28
141
|
role: "status",
|
|
29
|
-
"aria-label":
|
|
142
|
+
"aria-label": "Loading page...",
|
|
30
143
|
"aria-busy": "true",
|
|
31
144
|
...rest,
|
|
32
|
-
children:
|
|
33
|
-
"svg",
|
|
34
|
-
{
|
|
35
|
-
className: "animate-spinner-rotate",
|
|
36
|
-
style: {
|
|
37
|
-
width: colors.normalizeSize(size),
|
|
38
|
-
height: colors.normalizeSize(size),
|
|
39
|
-
animationDuration: colors.getAnimationDuration(speed)
|
|
40
|
-
},
|
|
41
|
-
viewBox: "0 0 50 50",
|
|
42
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
43
|
-
"circle",
|
|
44
|
-
{
|
|
45
|
-
cx: "25",
|
|
46
|
-
cy: "25",
|
|
47
|
-
r: 25 - thickness * 2,
|
|
48
|
-
fill: "none",
|
|
49
|
-
stroke: color,
|
|
50
|
-
strokeWidth: thickness,
|
|
51
|
-
strokeDasharray: "80, 200",
|
|
52
|
-
strokeLinecap: "round"
|
|
53
|
-
}
|
|
54
|
-
)
|
|
55
|
-
}
|
|
56
|
-
)
|
|
145
|
+
children: renderContent()
|
|
57
146
|
}
|
|
58
147
|
);
|
|
59
148
|
}
|
|
60
149
|
);
|
|
61
|
-
|
|
62
|
-
exports.
|
|
150
|
+
SkeletonPage.displayName = "SkeletonPage";
|
|
151
|
+
exports.SkeletonPage = SkeletonPage;
|
|
63
152
|
//# sourceMappingURL=index12.cjs.map
|
package/dist/index12.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index12.cjs","sources":["../src/components/spinner/SpinnerCircle.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { SpinnerCircleProps } from '../../types';\nimport { cn, normalizeSize, getAnimationDuration } from '../../utils';\n\n/**\n * SpinnerCircle - Basic rotating circle spinner\n *\n * A simple, elegant circular spinner with a partial arc that rotates continuously.\n *\n * @example\n * ```tsx\n * <SpinnerCircle size={40} color=\"#3b82f6\" />\n * <SpinnerCircle size={24} thickness={3} speed=\"fast\" />\n * ```\n */\nexport const SpinnerCircle = forwardRef<HTMLDivElement, SpinnerCircleProps>(\n (\n {\n size = 40,\n color = '#3b82f6',\n thickness = 4,\n speed = 'normal',\n className,\n style,\n testId = 'spinner-circle',\n visible = true,\n ariaLabel = 'Loading...',\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('inline-flex items-center justify-center', className)}\n style={style}\n role=\"status\"\n aria-label={ariaLabel}\n aria-busy=\"true\"\n {...rest}\n >\n <svg\n className=\"animate-spinner-rotate\"\n style={{\n width: normalizeSize(size),\n height: normalizeSize(size),\n animationDuration: getAnimationDuration(speed),\n }}\n viewBox=\"0 0 50 50\"\n >\n <circle\n cx=\"25\"\n cy=\"25\"\n r={25 - thickness * 2}\n fill=\"none\"\n stroke={color}\n strokeWidth={thickness}\n strokeDasharray=\"80, 200\"\n strokeLinecap=\"round\"\n />\n </svg>\n </div>\n );\n }\n);\n\nSpinnerCircle.displayName = 'SpinnerCircle';\n"],"names":["forwardRef","jsx","cn","normalizeSize","getAnimationDuration"],"mappings":";;;;;;AAeO,MAAM,gBAAgBA,MAAAA;AAAAA,EAC3B,CACE;AAAA,IACE,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,GAAG;AAAA,EAAA,GAEL,QACG;AACH,QAAI,CAAC,QAAS,QAAO;AAErB,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAWC,WAAAA,GAAG,2CAA2C,SAAS;AAAA,QAClE;AAAA,QACA,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,aAAU;AAAA,QACT,GAAG;AAAA,QAEJ,UAAAD,2BAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,OAAO;AAAA,cACL,OAAOE,OAAAA,cAAc,IAAI;AAAA,cACzB,QAAQA,OAAAA,cAAc,IAAI;AAAA,cAC1B,mBAAmBC,OAAAA,qBAAqB,KAAK;AAAA,YAAA;AAAA,YAE/C,SAAQ;AAAA,YAER,UAAAH,2BAAAA;AAAAA,cAAC;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,IAAG;AAAA,gBACH,GAAG,KAAK,YAAY;AAAA,gBACpB,MAAK;AAAA,gBACL,QAAQ;AAAA,gBACR,aAAa;AAAA,gBACb,iBAAgB;AAAA,gBAChB,eAAc;AAAA,cAAA;AAAA,YAAA;AAAA,UAChB;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,cAAc,cAAc;;"}
|
|
1
|
+
{"version":3,"file":"index12.cjs","sources":["../src/components/skeleton/SkeletonPage.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { SkeletonPageProps } from '../../types';\nimport { cn } from '../../utils';\nimport { Skeleton } from './Skeleton';\nimport { SkeletonText } from './SkeletonText';\nimport { SkeletonAvatar } from './SkeletonAvatar';\n\n/**\n * SkeletonPage - Pre-built page loading skeleton\n *\n * A ready-to-use skeleton layout for full page loading states.\n * Displays a common page structure with header, navigation, and content sections.\n *\n * @example\n * ```tsx\n * <SkeletonPage />\n * <SkeletonPage variant=\"dashboard\" />\n * <SkeletonPage variant=\"article\" animate={false} />\n * ```\n */\nexport const SkeletonPage = forwardRef<HTMLDivElement, SkeletonPageProps>(\n (\n {\n variant = 'default',\n animate = true,\n baseColor = '#e0e0e0',\n highlightColor = '#f5f5f5',\n className,\n style,\n testId = 'skeleton-page',\n visible = true,\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const commonProps = {\n animate,\n baseColor,\n highlightColor,\n };\n\n const renderDefault = () => (\n <div className=\"space-y-6\">\n {/* Header */}\n <div className=\"flex items-center justify-between border-b pb-4\">\n <Skeleton width={200} height={32} {...commonProps} />\n <div className=\"flex items-center gap-4\">\n <Skeleton width={100} height={36} borderRadius={6} {...commonProps} />\n <SkeletonAvatar size={40} {...commonProps} />\n </div>\n </div>\n\n {/* Content */}\n <div className=\"space-y-4\">\n <SkeletonText lines={3} {...commonProps} />\n <div className=\"grid grid-cols-3 gap-4\">\n <Skeleton height={120} borderRadius={8} {...commonProps} />\n <Skeleton height={120} borderRadius={8} {...commonProps} />\n <Skeleton height={120} borderRadius={8} {...commonProps} />\n </div>\n <SkeletonText lines={5} {...commonProps} />\n </div>\n </div>\n );\n\n const renderDashboard = () => (\n <div className=\"space-y-6\">\n {/* Header with stats */}\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <Skeleton width={180} height={28} {...commonProps} />\n <Skeleton width={120} height={36} borderRadius={6} {...commonProps} />\n </div>\n <div className=\"grid grid-cols-4 gap-4\">\n {[...Array(4)].map((_, i) => (\n <div key={i} className=\"p-4 border rounded-lg space-y-2\">\n <Skeleton width={100} height={16} {...commonProps} />\n <Skeleton width={80} height={32} {...commonProps} />\n <Skeleton width={60} height={12} {...commonProps} />\n </div>\n ))}\n </div>\n </div>\n\n {/* Chart area */}\n <Skeleton height={300} borderRadius={8} {...commonProps} />\n\n {/* Table */}\n <div className=\"space-y-3\">\n <div className=\"flex gap-4\">\n <Skeleton width={150} height={20} {...commonProps} />\n <Skeleton width={150} height={20} {...commonProps} />\n <Skeleton width={150} height={20} {...commonProps} />\n </div>\n {[...Array(5)].map((_, i) => (\n <div key={i} className=\"flex gap-4\">\n <Skeleton width={150} height={16} {...commonProps} />\n <Skeleton width={150} height={16} {...commonProps} />\n <Skeleton width={150} height={16} {...commonProps} />\n </div>\n ))}\n </div>\n </div>\n );\n\n const renderArticle = () => (\n <div className=\"max-w-3xl mx-auto space-y-6\">\n {/* Article header */}\n <div className=\"space-y-4\">\n <Skeleton width=\"80%\" height={40} {...commonProps} />\n <div className=\"flex items-center gap-3\">\n <SkeletonAvatar size={48} {...commonProps} />\n <div className=\"space-y-2 flex-1\">\n <Skeleton width={120} height={16} {...commonProps} />\n <Skeleton width={180} height={14} {...commonProps} />\n </div>\n </div>\n </div>\n\n {/* Featured image */}\n <Skeleton height={400} borderRadius={8} {...commonProps} />\n\n {/* Article content */}\n <div className=\"space-y-4\">\n <SkeletonText lines={4} {...commonProps} />\n <Skeleton height={200} borderRadius={8} {...commonProps} />\n <SkeletonText lines={6} {...commonProps} />\n <Skeleton height={250} borderRadius={8} {...commonProps} />\n <SkeletonText lines={4} {...commonProps} />\n </div>\n </div>\n );\n\n const renderProfile = () => (\n <div className=\"space-y-6\">\n {/* Profile header */}\n <div className=\"flex items-start gap-6 border-b pb-6\">\n <SkeletonAvatar size={120} {...commonProps} />\n <div className=\"flex-1 space-y-3\">\n <Skeleton width={200} height={32} {...commonProps} />\n <Skeleton width={150} height={20} {...commonProps} />\n <SkeletonText lines={2} {...commonProps} />\n <div className=\"flex gap-3\">\n <Skeleton width={100} height={36} borderRadius={6} {...commonProps} />\n <Skeleton width={100} height={36} borderRadius={6} {...commonProps} />\n </div>\n </div>\n </div>\n\n {/* Profile content grid */}\n <div className=\"grid grid-cols-3 gap-6\">\n {/* Left sidebar */}\n <div className=\"space-y-4\">\n <div className=\"space-y-2\">\n <Skeleton width={100} height={20} {...commonProps} />\n {[...Array(4)].map((_, i) => (\n <Skeleton key={i} height={16} {...commonProps} />\n ))}\n </div>\n </div>\n\n {/* Main content */}\n <div className=\"col-span-2 space-y-4\">\n {[...Array(3)].map((_, i) => (\n <div key={i} className=\"p-4 border rounded-lg space-y-3\">\n <div className=\"flex items-center gap-3\">\n <SkeletonAvatar size={40} {...commonProps} />\n <div className=\"flex-1 space-y-2\">\n <Skeleton width={150} height={16} {...commonProps} />\n <Skeleton width={100} height={12} {...commonProps} />\n </div>\n </div>\n <SkeletonText lines={2} {...commonProps} />\n <Skeleton height={200} borderRadius={6} {...commonProps} />\n </div>\n ))}\n </div>\n </div>\n </div>\n );\n\n const renderContent = () => {\n switch (variant) {\n case 'dashboard':\n return renderDashboard();\n case 'article':\n return renderArticle();\n case 'profile':\n return renderProfile();\n default:\n return renderDefault();\n }\n };\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('w-full p-6', className)}\n style={style}\n role=\"status\"\n aria-label=\"Loading page...\"\n aria-busy=\"true\"\n {...rest}\n >\n {renderContent()}\n </div>\n );\n }\n);\n\nSkeletonPage.displayName = 'SkeletonPage';\n"],"names":["forwardRef","jsxs","jsx","Skeleton","SkeletonAvatar","SkeletonText","cn"],"mappings":";;;;;;;;AAoBO,MAAM,eAAeA,MAAAA;AAAAA,EAC1B,CACE;AAAA,IACE,UAAU;AAAA,IACV,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,iBAAiB;AAAA,IACjB;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV,GAAG;AAAA,EAAA,GAEL,QACG;AACH,QAAI,CAAC,QAAS,QAAO;AAErB,UAAM,cAAc;AAAA,MAClB;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAGF,UAAM,gBAAgB,MACpBC,gCAAC,OAAA,EAAI,WAAU,aAEb,UAAA;AAAA,MAAAA,2BAAAA,KAAC,OAAA,EAAI,WAAU,mDACb,UAAA;AAAA,QAAAC,+BAACC,SAAAA,YAAS,O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