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/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Premium React Loaders
|
|
2
2
|
|
|
3
|
-
A comprehensive collection of **25 premium, production-ready loading components** for React applications. Built with TypeScript and
|
|
3
|
+
A comprehensive collection of **25 premium, production-ready loading components** for React applications. Built with TypeScript and custom CSS for maximum flexibility and zero configuration.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/premium-react-loaders)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
@@ -16,16 +16,17 @@ See all 25 components in action with interactive examples and customization opti
|
|
|
16
16
|
## Features
|
|
17
17
|
|
|
18
18
|
- **25 Premium Components** across 5 categories (Skeleton, Spinner, Progress, Pulse, Overlay)
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
21
|
-
- **
|
|
19
|
+
- **Zero Configuration** - No Tailwind or build setup required ✨ *New in v2.0.0*
|
|
20
|
+
- **Tiny Bundle Size** - 70% smaller CSS (6.27 KB → 1.64 KB gzipped) ✨ *New in v2.0.0*
|
|
21
|
+
- **Zero Runtime Dependencies** - No external dependencies needed ✨ *New in v2.0.0*
|
|
22
|
+
- **Size Presets** - Easy sizing with `xs`, `sm`, `md`, `lg`, `xl` presets
|
|
23
|
+
- **Reduced Motion Support** - Respects `prefers-reduced-motion` for accessibility
|
|
24
|
+
- **Animation Direction Control** - Reverse animations with `reverse` prop
|
|
22
25
|
- **Full TypeScript Support** with exported type definitions
|
|
23
|
-
- **Tailwind CSS Integration** for easy customization
|
|
24
26
|
- **Tree-shakeable** - only bundle what you use
|
|
25
27
|
- **Accessible** - built with ARIA labels and best practices
|
|
26
28
|
- **Performant** - hardware-accelerated CSS animations (60fps)
|
|
27
29
|
- **Customizable** - multiple ways to style components
|
|
28
|
-
- **Zero Dependencies** (except peer dependencies)
|
|
29
30
|
|
|
30
31
|
## Installation
|
|
31
32
|
|
|
@@ -35,15 +36,15 @@ npm install premium-react-loaders
|
|
|
35
36
|
|
|
36
37
|
### Peer Dependencies
|
|
37
38
|
|
|
38
|
-
This library requires React
|
|
39
|
+
This library only requires React:
|
|
39
40
|
|
|
40
41
|
```bash
|
|
41
|
-
npm install react react-dom
|
|
42
|
+
npm install react react-dom
|
|
42
43
|
```
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
> **Note:** v2.0.0+ no longer requires Tailwind CSS! See [Migration Guide](#migrating-from-v1x-to-v20) below.
|
|
45
46
|
|
|
46
|
-
|
|
47
|
+
## Setup
|
|
47
48
|
|
|
48
49
|
Import the styles in your main entry file (e.g., `main.tsx` or `App.tsx`):
|
|
49
50
|
|
|
@@ -51,19 +52,7 @@ Import the styles in your main entry file (e.g., `main.tsx` or `App.tsx`):
|
|
|
51
52
|
import 'premium-react-loaders/styles';
|
|
52
53
|
```
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
Add the library to your `tailwind.config.js` content array:
|
|
57
|
-
|
|
58
|
-
```javascript
|
|
59
|
-
module.exports = {
|
|
60
|
-
content: [
|
|
61
|
-
'./src/**/*.{js,ts,jsx,tsx}',
|
|
62
|
-
'./node_modules/premium-react-loaders/dist/**/*.{js,ts,jsx,tsx}',
|
|
63
|
-
],
|
|
64
|
-
// ... rest of your config
|
|
65
|
-
};
|
|
66
|
-
```
|
|
55
|
+
That's it! No Tailwind configuration or additional setup needed.
|
|
67
56
|
|
|
68
57
|
## Quick Start
|
|
69
58
|
|
|
@@ -100,7 +89,7 @@ function App() {
|
|
|
100
89
|
|
|
101
90
|
## Component Categories
|
|
102
91
|
|
|
103
|
-
### Skeleton Loaders (
|
|
92
|
+
### Skeleton Loaders (9 components)
|
|
104
93
|
|
|
105
94
|
Placeholder components that mimic content layout while loading:
|
|
106
95
|
|
|
@@ -109,11 +98,12 @@ Placeholder components that mimic content layout while loading:
|
|
|
109
98
|
- **SkeletonAvatar** - Avatar placeholder (circle/square)
|
|
110
99
|
- **SkeletonImage** - Image placeholder with aspect ratio
|
|
111
100
|
- **SkeletonCard** - Card layout with avatar + text
|
|
101
|
+
- **SkeletonForm** - Form skeleton with inputs and labels
|
|
112
102
|
- **SkeletonList** - List of skeleton items
|
|
113
103
|
- **SkeletonTable** - Table skeleton with rows/columns
|
|
114
104
|
- **SkeletonPage** - Pre-built full page layouts (default, dashboard, article, profile)
|
|
115
105
|
|
|
116
|
-
### Spinner Loaders (
|
|
106
|
+
### Spinner Loaders (7 components)
|
|
117
107
|
|
|
118
108
|
Rotating and animated spinners:
|
|
119
109
|
|
|
@@ -122,22 +112,26 @@ Rotating and animated spinners:
|
|
|
122
112
|
- **SpinnerDots** - Multiple dots rotating around center
|
|
123
113
|
- **SpinnerBars** - Vertical bars with wave animation
|
|
124
114
|
- **SpinnerGrid** - Grid of fading squares
|
|
115
|
+
- **SpinnerPulse** - Pulsing circle spinner
|
|
116
|
+
- **SpinnerWave** - Wave pattern spinner
|
|
125
117
|
|
|
126
|
-
### Progress Loaders (
|
|
118
|
+
### Progress Loaders (4 components)
|
|
127
119
|
|
|
128
120
|
Progress indicators (determinate/indeterminate):
|
|
129
121
|
|
|
130
122
|
- **ProgressBar** - Linear horizontal progress bar
|
|
131
123
|
- **ProgressCircle** - Circular progress indicator
|
|
132
124
|
- **ProgressRing** - Ring progress with gradient option
|
|
125
|
+
- **ProgressSteps** - Multi-step progress indicator
|
|
133
126
|
|
|
134
|
-
### Pulse Loaders (
|
|
127
|
+
### Pulse Loaders (4 components)
|
|
135
128
|
|
|
136
129
|
Bouncing, pulsing, wave animations:
|
|
137
130
|
|
|
138
131
|
- **PulseDots** - Bouncing dots in sequence
|
|
139
132
|
- **PulseWave** - Wave pattern bars
|
|
140
133
|
- **PulseBars** - Equalizer-style pulsing bars
|
|
134
|
+
- **TypingIndicator** - Typing animation indicator
|
|
141
135
|
|
|
142
136
|
### Overlay Components (1 component)
|
|
143
137
|
|
|
@@ -323,10 +317,10 @@ All components support multiple customization methods:
|
|
|
323
317
|
|
|
324
318
|
### 1. className Prop
|
|
325
319
|
|
|
326
|
-
Pass
|
|
320
|
+
Pass custom CSS classes:
|
|
327
321
|
|
|
328
322
|
```tsx
|
|
329
|
-
<SpinnerCircle size={40} className="my-
|
|
323
|
+
<SpinnerCircle size={40} className="my-spinner" />
|
|
330
324
|
```
|
|
331
325
|
|
|
332
326
|
### 2. style Prop
|
|
@@ -456,12 +450,52 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
456
450
|
|
|
457
451
|
MIT © Ishan Karunaratne
|
|
458
452
|
|
|
453
|
+
## Migrating from v1.x to v2.0
|
|
454
|
+
|
|
455
|
+
v2.0.0 removes the Tailwind CSS dependency for a simpler, lighter library. Here's what changed:
|
|
456
|
+
|
|
457
|
+
### Breaking Changes
|
|
458
|
+
|
|
459
|
+
1. **No Tailwind Required** - The library now uses custom CSS instead of Tailwind
|
|
460
|
+
2. **No Tailwind Configuration Needed** - Remove the library path from your `tailwind.config.js`
|
|
461
|
+
3. **Slightly Different Styling** - Components use the same class names but with custom CSS utilities
|
|
462
|
+
|
|
463
|
+
### Migration Steps
|
|
464
|
+
|
|
465
|
+
1. **Update the package:**
|
|
466
|
+
```bash
|
|
467
|
+
npm install premium-react-loaders@latest
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
2. **Remove Tailwind configuration** (if you're not using Tailwind for other parts of your app):
|
|
471
|
+
```javascript
|
|
472
|
+
// Remove this from tailwind.config.js
|
|
473
|
+
'./node_modules/premium-react-loaders/dist/**/*.{js,ts,jsx,tsx}'
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
3. **That's it!** Your components will continue to work with the same API. The styling is now self-contained.
|
|
477
|
+
|
|
478
|
+
### What Stayed the Same
|
|
479
|
+
|
|
480
|
+
- ✅ All component APIs are identical
|
|
481
|
+
- ✅ All props work exactly the same
|
|
482
|
+
- ✅ TypeScript types unchanged
|
|
483
|
+
- ✅ Same import paths
|
|
484
|
+
- ✅ Same customization options (className, style, color props)
|
|
485
|
+
|
|
486
|
+
### Benefits of v2.0
|
|
487
|
+
|
|
488
|
+
- 🎉 **70% smaller CSS bundle** (21KB → 6.27KB, 1.64KB gzipped)
|
|
489
|
+
- 🎉 **36% smaller total package** (1.0MB → 640KB)
|
|
490
|
+
- 🎉 **Zero configuration** - no Tailwind setup required
|
|
491
|
+
- 🎉 **Works in any React project** - not just Tailwind projects
|
|
492
|
+
- 🎉 **Faster installation** - fewer dependencies to download
|
|
493
|
+
|
|
459
494
|
## Acknowledgments
|
|
460
495
|
|
|
461
496
|
Built with:
|
|
462
497
|
- [React](https://react.dev/)
|
|
463
498
|
- [TypeScript](https://www.typescriptlang.org/)
|
|
464
|
-
- [Tailwind CSS](https://tailwindcss.com/)
|
|
465
499
|
- [Vite](https://vite.dev/)
|
|
466
500
|
- [Storybook](https://storybook.js.org/)
|
|
467
501
|
|
|
@@ -1 +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,+
|
|
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,+GA2EzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../src/components/progress/ProgressBar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../src/components/progress/ProgressBar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,WAAW,6GAwHvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressCircle.d.ts","sourceRoot":"","sources":["../../../src/components/progress/ProgressCircle.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGlD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"ProgressCircle.d.ts","sourceRoot":"","sources":["../../../src/components/progress/ProgressCircle.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGlD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,gHAiI1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressRing.d.ts","sourceRoot":"","sources":["../../../src/components/progress/ProgressRing.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"ProgressRing.d.ts","sourceRoot":"","sources":["../../../src/components/progress/ProgressRing.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,8GA8IxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressSteps.d.ts","sourceRoot":"","sources":["../../../src/components/progress/ProgressSteps.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa,+
|
|
1
|
+
{"version":3,"file":"ProgressSteps.d.ts","sourceRoot":"","sources":["../../../src/components/progress/ProgressSteps.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa,+GAqJzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PulseBars.d.ts","sourceRoot":"","sources":["../../../src/components/pulse/PulseBars.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"PulseBars.d.ts","sourceRoot":"","sources":["../../../src/components/pulse/PulseBars.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,2GA4ErB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PulseDots.d.ts","sourceRoot":"","sources":["../../../src/components/pulse/PulseDots.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"PulseDots.d.ts","sourceRoot":"","sources":["../../../src/components/pulse/PulseDots.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,2GAiErB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PulseWave.d.ts","sourceRoot":"","sources":["../../../src/components/pulse/PulseWave.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"PulseWave.d.ts","sourceRoot":"","sources":["../../../src/components/pulse/PulseWave.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,2GAwErB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypingIndicator.d.ts","sourceRoot":"","sources":["../../../src/components/pulse/TypingIndicator.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGnD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"TypingIndicator.d.ts","sourceRoot":"","sources":["../../../src/components/pulse/TypingIndicator.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGnD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,iHAqE3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,sFAwEpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/SkeletonAvatar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIlD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"SkeletonAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/SkeletonAvatar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIlD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,gHAmD1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonCard.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/SkeletonCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAKhD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"SkeletonCard.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/SkeletonCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAKhD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,8GA+ExB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonForm.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/SkeletonForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIhD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"SkeletonForm.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/SkeletonForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIhD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,8GA6FxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonImage.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/SkeletonImage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"SkeletonImage.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/SkeletonImage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAIjD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,+GAqDzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonList.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/SkeletonList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIhD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"SkeletonList.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/SkeletonList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIhD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,8GA8DxB,CAAC"}
|
|
@@ -1 +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,
|
|
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,8GA6MxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonTable.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/SkeletonTable.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAIjD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,+
|
|
1
|
+
{"version":3,"file":"SkeletonTable.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/SkeletonTable.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAIjD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,+GA8EzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonText.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/SkeletonText.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIhD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"SkeletonText.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/SkeletonText.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIhD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,8GAkExB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpinnerBars.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/SpinnerBars.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"SpinnerBars.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/SpinnerBars.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAU/C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,6GAmEvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpinnerCircle.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/SpinnerCircle.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"SpinnerCircle.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/SpinnerCircle.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AASjD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,+GAuEzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpinnerDots.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/SpinnerDots.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"SpinnerDots.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/SpinnerDots.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAU/C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,6GAsFvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpinnerGrid.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/SpinnerGrid.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"SpinnerGrid.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/SpinnerGrid.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,6GAkFvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpinnerPulse.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/SpinnerPulse.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"SpinnerPulse.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/SpinnerPulse.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,8GAuFxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpinnerRing.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/SpinnerRing.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"SpinnerRing.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/SpinnerRing.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAS/C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,6GA8DvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpinnerWave.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/SpinnerWave.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"SpinnerWave.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/SpinnerWave.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,6GA2EvB,CAAC"}
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
package/dist/index10.cjs
CHANGED
|
@@ -3,6 +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 Skeleton = require("./index5.cjs");
|
|
6
|
+
const hooks = require("./index30.cjs");
|
|
6
7
|
const colors = require("./index4.cjs");
|
|
7
8
|
const classNames = require("./index3.cjs");
|
|
8
9
|
const SkeletonList = react.forwardRef(
|
|
@@ -15,13 +16,22 @@ const SkeletonList = react.forwardRef(
|
|
|
15
16
|
baseColor,
|
|
16
17
|
highlightColor,
|
|
17
18
|
borderRadius = "0.5rem",
|
|
19
|
+
delay = 0,
|
|
20
|
+
minDuration = 0,
|
|
21
|
+
transition,
|
|
18
22
|
className,
|
|
19
23
|
style,
|
|
20
24
|
testId = "skeleton-list",
|
|
21
25
|
visible = true,
|
|
22
26
|
...rest
|
|
23
27
|
}, ref) => {
|
|
24
|
-
|
|
28
|
+
const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(
|
|
29
|
+
visible,
|
|
30
|
+
delay,
|
|
31
|
+
minDuration,
|
|
32
|
+
transition
|
|
33
|
+
);
|
|
34
|
+
if (!shouldRender) return null;
|
|
25
35
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
26
36
|
"div",
|
|
27
37
|
{
|
|
@@ -30,7 +40,9 @@ const SkeletonList = react.forwardRef(
|
|
|
30
40
|
className: classNames.cn("flex flex-col", className),
|
|
31
41
|
style: {
|
|
32
42
|
gap: colors.normalizeSize(gap),
|
|
33
|
-
...style
|
|
43
|
+
...style,
|
|
44
|
+
opacity,
|
|
45
|
+
transition: transitionStyle
|
|
34
46
|
},
|
|
35
47
|
role: "status",
|
|
36
48
|
"aria-label": "Loading list...",
|
|
@@ -55,4 +67,3 @@ const SkeletonList = react.forwardRef(
|
|
|
55
67
|
);
|
|
56
68
|
SkeletonList.displayName = "SkeletonList";
|
|
57
69
|
exports.SkeletonList = SkeletonList;
|
|
58
|
-
//# sourceMappingURL=index10.cjs.map
|
package/dist/index10.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { Skeleton } from "./index5.js";
|
|
4
|
+
import { useLoaderVisibility } from "./index30.js";
|
|
4
5
|
import { normalizeSize } from "./index4.js";
|
|
5
6
|
import { cn } from "./index3.js";
|
|
6
7
|
const SkeletonList = forwardRef(
|
|
@@ -13,13 +14,22 @@ const SkeletonList = forwardRef(
|
|
|
13
14
|
baseColor,
|
|
14
15
|
highlightColor,
|
|
15
16
|
borderRadius = "0.5rem",
|
|
17
|
+
delay = 0,
|
|
18
|
+
minDuration = 0,
|
|
19
|
+
transition,
|
|
16
20
|
className,
|
|
17
21
|
style,
|
|
18
22
|
testId = "skeleton-list",
|
|
19
23
|
visible = true,
|
|
20
24
|
...rest
|
|
21
25
|
}, ref) => {
|
|
22
|
-
|
|
26
|
+
const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(
|
|
27
|
+
visible,
|
|
28
|
+
delay,
|
|
29
|
+
minDuration,
|
|
30
|
+
transition
|
|
31
|
+
);
|
|
32
|
+
if (!shouldRender) return null;
|
|
23
33
|
return /* @__PURE__ */ jsx(
|
|
24
34
|
"div",
|
|
25
35
|
{
|
|
@@ -28,7 +38,9 @@ const SkeletonList = forwardRef(
|
|
|
28
38
|
className: cn("flex flex-col", className),
|
|
29
39
|
style: {
|
|
30
40
|
gap: normalizeSize(gap),
|
|
31
|
-
...style
|
|
41
|
+
...style,
|
|
42
|
+
opacity,
|
|
43
|
+
transition: transitionStyle
|
|
32
44
|
},
|
|
33
45
|
role: "status",
|
|
34
46
|
"aria-label": "Loading list...",
|
|
@@ -55,4 +67,3 @@ SkeletonList.displayName = "SkeletonList";
|
|
|
55
67
|
export {
|
|
56
68
|
SkeletonList
|
|
57
69
|
};
|
|
58
|
-
//# sourceMappingURL=index10.js.map
|
package/dist/index11.cjs
CHANGED
|
@@ -3,6 +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 Skeleton = require("./index5.cjs");
|
|
6
|
+
const hooks = require("./index30.cjs");
|
|
6
7
|
const classNames = require("./index3.cjs");
|
|
7
8
|
const SkeletonTable = react.forwardRef(
|
|
8
9
|
({
|
|
@@ -12,13 +13,22 @@ const SkeletonTable = react.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-table",
|
|
18
22
|
visible = true,
|
|
19
23
|
...rest
|
|
20
24
|
}, ref) => {
|
|
21
|
-
|
|
25
|
+
const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(
|
|
26
|
+
visible,
|
|
27
|
+
delay,
|
|
28
|
+
minDuration,
|
|
29
|
+
transition
|
|
30
|
+
);
|
|
31
|
+
if (!shouldRender) return null;
|
|
22
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(
|
|
23
33
|
Skeleton.Skeleton,
|
|
24
34
|
{
|
|
@@ -37,7 +47,11 @@ const SkeletonTable = react.forwardRef(
|
|
|
37
47
|
ref,
|
|
38
48
|
"data-testid": testId,
|
|
39
49
|
className: classNames.cn("flex flex-col gap-3", className),
|
|
40
|
-
style
|
|
50
|
+
style: {
|
|
51
|
+
...style,
|
|
52
|
+
opacity,
|
|
53
|
+
transition: transitionStyle
|
|
54
|
+
},
|
|
41
55
|
role: "status",
|
|
42
56
|
"aria-label": "Loading table...",
|
|
43
57
|
"aria-busy": "true",
|
|
@@ -52,4 +66,3 @@ const SkeletonTable = react.forwardRef(
|
|
|
52
66
|
);
|
|
53
67
|
SkeletonTable.displayName = "SkeletonTable";
|
|
54
68
|
exports.SkeletonTable = SkeletonTable;
|
|
55
|
-
//# sourceMappingURL=index11.cjs.map
|
package/dist/index11.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { Skeleton } from "./index5.js";
|
|
4
|
+
import { useLoaderVisibility } from "./index30.js";
|
|
4
5
|
import { cn } from "./index3.js";
|
|
5
6
|
const SkeletonTable = forwardRef(
|
|
6
7
|
({
|
|
@@ -10,13 +11,22 @@ const SkeletonTable = forwardRef(
|
|
|
10
11
|
animate = true,
|
|
11
12
|
baseColor,
|
|
12
13
|
highlightColor,
|
|
14
|
+
delay = 0,
|
|
15
|
+
minDuration = 0,
|
|
16
|
+
transition,
|
|
13
17
|
className,
|
|
14
18
|
style,
|
|
15
19
|
testId = "skeleton-table",
|
|
16
20
|
visible = true,
|
|
17
21
|
...rest
|
|
18
22
|
}, ref) => {
|
|
19
|
-
|
|
23
|
+
const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(
|
|
24
|
+
visible,
|
|
25
|
+
delay,
|
|
26
|
+
minDuration,
|
|
27
|
+
transition
|
|
28
|
+
);
|
|
29
|
+
if (!shouldRender) return null;
|
|
20
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(
|
|
21
31
|
Skeleton,
|
|
22
32
|
{
|
|
@@ -35,7 +45,11 @@ const SkeletonTable = forwardRef(
|
|
|
35
45
|
ref,
|
|
36
46
|
"data-testid": testId,
|
|
37
47
|
className: cn("flex flex-col gap-3", className),
|
|
38
|
-
style
|
|
48
|
+
style: {
|
|
49
|
+
...style,
|
|
50
|
+
opacity,
|
|
51
|
+
transition: transitionStyle
|
|
52
|
+
},
|
|
39
53
|
role: "status",
|
|
40
54
|
"aria-label": "Loading table...",
|
|
41
55
|
"aria-busy": "true",
|
|
@@ -52,4 +66,3 @@ SkeletonTable.displayName = "SkeletonTable";
|
|
|
52
66
|
export {
|
|
53
67
|
SkeletonTable
|
|
54
68
|
};
|
|
55
|
-
//# sourceMappingURL=index11.js.map
|
package/dist/index12.cjs
CHANGED
|
@@ -5,6 +5,7 @@ const react = require("react");
|
|
|
5
5
|
const Skeleton = require("./index5.cjs");
|
|
6
6
|
const SkeletonText = require("./index6.cjs");
|
|
7
7
|
const SkeletonAvatar = require("./index7.cjs");
|
|
8
|
+
const hooks = require("./index30.cjs");
|
|
8
9
|
const classNames = require("./index3.cjs");
|
|
9
10
|
const SkeletonPage = react.forwardRef(
|
|
10
11
|
({
|
|
@@ -12,13 +13,22 @@ const SkeletonPage = react.forwardRef(
|
|
|
12
13
|
animate = true,
|
|
13
14
|
baseColor = "#e0e0e0",
|
|
14
15
|
highlightColor = "#f5f5f5",
|
|
16
|
+
delay = 0,
|
|
17
|
+
minDuration = 0,
|
|
18
|
+
transition,
|
|
15
19
|
className,
|
|
16
20
|
style,
|
|
17
21
|
testId = "skeleton-page",
|
|
18
22
|
visible = true,
|
|
19
23
|
...rest
|
|
20
24
|
}, ref) => {
|
|
21
|
-
|
|
25
|
+
const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(
|
|
26
|
+
visible,
|
|
27
|
+
delay,
|
|
28
|
+
minDuration,
|
|
29
|
+
transition
|
|
30
|
+
);
|
|
31
|
+
if (!shouldRender) return null;
|
|
22
32
|
const commonProps = {
|
|
23
33
|
animate,
|
|
24
34
|
baseColor,
|
|
@@ -137,7 +147,11 @@ const SkeletonPage = react.forwardRef(
|
|
|
137
147
|
ref,
|
|
138
148
|
"data-testid": testId,
|
|
139
149
|
className: classNames.cn("w-full p-6", className),
|
|
140
|
-
style
|
|
150
|
+
style: {
|
|
151
|
+
...style,
|
|
152
|
+
opacity,
|
|
153
|
+
transition: transitionStyle
|
|
154
|
+
},
|
|
141
155
|
role: "status",
|
|
142
156
|
"aria-label": "Loading page...",
|
|
143
157
|
"aria-busy": "true",
|
|
@@ -149,4 +163,3 @@ const SkeletonPage = react.forwardRef(
|
|
|
149
163
|
);
|
|
150
164
|
SkeletonPage.displayName = "SkeletonPage";
|
|
151
165
|
exports.SkeletonPage = SkeletonPage;
|
|
152
|
-
//# sourceMappingURL=index12.cjs.map
|
package/dist/index12.js
CHANGED
|
@@ -3,6 +3,7 @@ import { forwardRef } from "react";
|
|
|
3
3
|
import { Skeleton } from "./index5.js";
|
|
4
4
|
import { SkeletonText } from "./index6.js";
|
|
5
5
|
import { SkeletonAvatar } from "./index7.js";
|
|
6
|
+
import { useLoaderVisibility } from "./index30.js";
|
|
6
7
|
import { cn } from "./index3.js";
|
|
7
8
|
const SkeletonPage = forwardRef(
|
|
8
9
|
({
|
|
@@ -10,13 +11,22 @@ const SkeletonPage = forwardRef(
|
|
|
10
11
|
animate = true,
|
|
11
12
|
baseColor = "#e0e0e0",
|
|
12
13
|
highlightColor = "#f5f5f5",
|
|
14
|
+
delay = 0,
|
|
15
|
+
minDuration = 0,
|
|
16
|
+
transition,
|
|
13
17
|
className,
|
|
14
18
|
style,
|
|
15
19
|
testId = "skeleton-page",
|
|
16
20
|
visible = true,
|
|
17
21
|
...rest
|
|
18
22
|
}, ref) => {
|
|
19
|
-
|
|
23
|
+
const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(
|
|
24
|
+
visible,
|
|
25
|
+
delay,
|
|
26
|
+
minDuration,
|
|
27
|
+
transition
|
|
28
|
+
);
|
|
29
|
+
if (!shouldRender) return null;
|
|
20
30
|
const commonProps = {
|
|
21
31
|
animate,
|
|
22
32
|
baseColor,
|
|
@@ -135,7 +145,11 @@ const SkeletonPage = forwardRef(
|
|
|
135
145
|
ref,
|
|
136
146
|
"data-testid": testId,
|
|
137
147
|
className: cn("w-full p-6", className),
|
|
138
|
-
style
|
|
148
|
+
style: {
|
|
149
|
+
...style,
|
|
150
|
+
opacity,
|
|
151
|
+
transition: transitionStyle
|
|
152
|
+
},
|
|
139
153
|
role: "status",
|
|
140
154
|
"aria-label": "Loading page...",
|
|
141
155
|
"aria-busy": "true",
|
|
@@ -149,4 +163,3 @@ SkeletonPage.displayName = "SkeletonPage";
|
|
|
149
163
|
export {
|
|
150
164
|
SkeletonPage
|
|
151
165
|
};
|
|
152
|
-
//# sourceMappingURL=index12.js.map
|