premium-react-loaders 1.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/LICENSE +21 -0
- package/README.md +375 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/progress/ProgressBar.d.ts +15 -0
- package/dist/components/progress/ProgressBar.d.ts.map +1 -0
- package/dist/components/progress/ProgressCircle.d.ts +15 -0
- package/dist/components/progress/ProgressCircle.d.ts.map +1 -0
- package/dist/components/progress/ProgressRing.d.ts +15 -0
- package/dist/components/progress/ProgressRing.d.ts.map +1 -0
- package/dist/components/progress/index.d.ts +4 -0
- package/dist/components/progress/index.d.ts.map +1 -0
- package/dist/components/pulse/PulseBars.d.ts +14 -0
- package/dist/components/pulse/PulseBars.d.ts.map +1 -0
- package/dist/components/pulse/PulseDots.d.ts +14 -0
- package/dist/components/pulse/PulseDots.d.ts.map +1 -0
- package/dist/components/pulse/PulseWave.d.ts +14 -0
- package/dist/components/pulse/PulseWave.d.ts.map +1 -0
- package/dist/components/pulse/index.d.ts +4 -0
- package/dist/components/pulse/index.d.ts.map +1 -0
- package/dist/components/skeleton/Skeleton.d.ts +15 -0
- package/dist/components/skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/skeleton/SkeletonAvatar.d.ts +14 -0
- package/dist/components/skeleton/SkeletonAvatar.d.ts.map +1 -0
- package/dist/components/skeleton/SkeletonCard.d.ts +15 -0
- package/dist/components/skeleton/SkeletonCard.d.ts.map +1 -0
- package/dist/components/skeleton/SkeletonImage.d.ts +14 -0
- package/dist/components/skeleton/SkeletonImage.d.ts.map +1 -0
- package/dist/components/skeleton/SkeletonList.d.ts +14 -0
- package/dist/components/skeleton/SkeletonList.d.ts.map +1 -0
- package/dist/components/skeleton/SkeletonTable.d.ts +14 -0
- package/dist/components/skeleton/SkeletonTable.d.ts.map +1 -0
- package/dist/components/skeleton/SkeletonText.d.ts +14 -0
- package/dist/components/skeleton/SkeletonText.d.ts.map +1 -0
- package/dist/components/skeleton/index.d.ts +8 -0
- package/dist/components/skeleton/index.d.ts.map +1 -0
- package/dist/components/spinner/SpinnerBars.d.ts +14 -0
- package/dist/components/spinner/SpinnerBars.d.ts.map +1 -0
- package/dist/components/spinner/SpinnerCircle.d.ts +14 -0
- package/dist/components/spinner/SpinnerCircle.d.ts.map +1 -0
- package/dist/components/spinner/SpinnerDots.d.ts +14 -0
- package/dist/components/spinner/SpinnerDots.d.ts.map +1 -0
- package/dist/components/spinner/SpinnerGrid.d.ts +14 -0
- package/dist/components/spinner/SpinnerGrid.d.ts.map +1 -0
- package/dist/components/spinner/SpinnerRing.d.ts +14 -0
- package/dist/components/spinner/SpinnerRing.d.ts.map +1 -0
- package/dist/components/spinner/index.d.ts +6 -0
- package/dist/components/spinner/index.d.ts.map +1 -0
- package/dist/index.cjs +47 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/dist/index10.cjs +58 -0
- package/dist/index10.cjs.map +1 -0
- package/dist/index10.js +58 -0
- package/dist/index10.js.map +1 -0
- package/dist/index11.cjs +55 -0
- package/dist/index11.cjs.map +1 -0
- package/dist/index11.js +55 -0
- package/dist/index11.js.map +1 -0
- package/dist/index12.cjs +63 -0
- package/dist/index12.cjs.map +1 -0
- package/dist/index12.js +63 -0
- package/dist/index12.js.map +1 -0
- package/dist/index13.cjs +51 -0
- package/dist/index13.cjs.map +1 -0
- package/dist/index13.js +51 -0
- package/dist/index13.js.map +1 -0
- package/dist/index14.cjs +74 -0
- package/dist/index14.cjs.map +1 -0
- package/dist/index14.js +74 -0
- package/dist/index14.js.map +1 -0
- package/dist/index15.cjs +58 -0
- package/dist/index15.cjs.map +1 -0
- package/dist/index15.js +58 -0
- package/dist/index15.js.map +1 -0
- package/dist/index16.cjs +71 -0
- package/dist/index16.cjs.map +1 -0
- package/dist/index16.js +71 -0
- package/dist/index16.js.map +1 -0
- package/dist/index17.cjs +81 -0
- package/dist/index17.cjs.map +1 -0
- package/dist/index17.js +81 -0
- package/dist/index17.js.map +1 -0
- package/dist/index18.cjs +107 -0
- package/dist/index18.cjs.map +1 -0
- package/dist/index18.js +107 -0
- package/dist/index18.js.map +1 -0
- package/dist/index19.cjs +113 -0
- package/dist/index19.cjs.map +1 -0
- package/dist/index19.js +113 -0
- package/dist/index19.js.map +1 -0
- package/dist/index20.cjs +57 -0
- package/dist/index20.cjs.map +1 -0
- package/dist/index20.js +57 -0
- package/dist/index20.js.map +1 -0
- package/dist/index21.cjs +62 -0
- package/dist/index21.cjs.map +1 -0
- package/dist/index21.js +62 -0
- package/dist/index21.js.map +1 -0
- package/dist/index22.cjs +64 -0
- package/dist/index22.cjs.map +1 -0
- package/dist/index22.js +64 -0
- package/dist/index22.js.map +1 -0
- package/dist/index23.cjs +18 -0
- package/dist/index23.cjs.map +1 -0
- package/dist/index23.js +18 -0
- package/dist/index23.js.map +1 -0
- package/dist/index3.cjs +8 -0
- package/dist/index3.cjs.map +1 -0
- package/dist/index3.js +8 -0
- package/dist/index3.js.map +1 -0
- package/dist/index4.cjs +22 -0
- package/dist/index4.cjs.map +1 -0
- package/dist/index4.js +22 -0
- package/dist/index4.js.map +1 -0
- package/dist/index5.cjs +65 -0
- package/dist/index5.cjs.map +1 -0
- package/dist/index5.js +65 -0
- package/dist/index5.js.map +1 -0
- package/dist/index6.cjs +59 -0
- package/dist/index6.cjs.map +1 -0
- package/dist/index6.js +59 -0
- package/dist/index6.js.map +1 -0
- package/dist/index7.cjs +43 -0
- package/dist/index7.cjs.map +1 -0
- package/dist/index7.js +43 -0
- package/dist/index7.js.map +1 -0
- package/dist/index8.cjs +47 -0
- package/dist/index8.cjs.map +1 -0
- package/dist/index8.js +47 -0
- package/dist/index8.js.map +1 -0
- package/dist/index9.cjs +77 -0
- package/dist/index9.cjs.map +1 -0
- package/dist/index9.js +77 -0
- package/dist/index9.js.map +1 -0
- package/dist/premium-react-loaders.css +701 -0
- package/dist/types/common.d.ts +65 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/progress.d.ts +25 -0
- package/dist/types/progress.d.ts.map +1 -0
- package/dist/types/pulse.d.ts +25 -0
- package/dist/types/pulse.d.ts.map +1 -0
- package/dist/types/skeleton.d.ts +71 -0
- package/dist/types/skeleton.d.ts.map +1 -0
- package/dist/types/spinner.d.ts +39 -0
- package/dist/types/spinner.d.ts.map +1 -0
- package/dist/utils/classNames.d.ts +14 -0
- package/dist/utils/classNames.d.ts.map +1 -0
- package/dist/utils/colors.d.ts +25 -0
- package/dist/utils/colors.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +89 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SkeletonTextProps } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* SkeletonText - Multi-line text skeleton loader
|
|
4
|
+
*
|
|
5
|
+
* Renders multiple skeleton lines to mimic text content while loading.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <SkeletonText lines={3} />
|
|
10
|
+
* <SkeletonText lines={5} gap={8} />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare const SkeletonText: import('react').ForwardRefExoticComponent<SkeletonTextProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
//# sourceMappingURL=SkeletonText.d.ts.map
|
|
@@ -0,0 +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,8GAqDxB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Skeleton } from './Skeleton';
|
|
2
|
+
export { SkeletonText } from './SkeletonText';
|
|
3
|
+
export { SkeletonAvatar } from './SkeletonAvatar';
|
|
4
|
+
export { SkeletonImage } from './SkeletonImage';
|
|
5
|
+
export { SkeletonCard } from './SkeletonCard';
|
|
6
|
+
export { SkeletonList } from './SkeletonList';
|
|
7
|
+
export { SkeletonTable } from './SkeletonTable';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SpinnerBarsProps } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* SpinnerBars - Vertical bars with wave animation
|
|
4
|
+
*
|
|
5
|
+
* A spinner with vertical bars that animate in a wave pattern.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <SpinnerBars size={40} color="#3b82f6" />
|
|
10
|
+
* <SpinnerBars size={32} barCount={5} speed="fast" />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare const SpinnerBars: import('react').ForwardRefExoticComponent<SpinnerBarsProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
//# sourceMappingURL=SpinnerBars.d.ts.map
|
|
@@ -0,0 +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;AAG/C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,6GAoDvB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SpinnerCircleProps } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* SpinnerCircle - Basic rotating circle spinner
|
|
4
|
+
*
|
|
5
|
+
* A simple, elegant circular spinner with a partial arc that rotates continuously.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <SpinnerCircle size={40} color="#3b82f6" />
|
|
10
|
+
* <SpinnerCircle size={24} thickness={3} speed="fast" />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare const SpinnerCircle: import('react').ForwardRefExoticComponent<SpinnerCircleProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
//# sourceMappingURL=SpinnerCircle.d.ts.map
|
|
@@ -0,0 +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;AAGjD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,+GAoDzB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SpinnerDotsProps } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* SpinnerDots - Multiple dots rotating around center
|
|
4
|
+
*
|
|
5
|
+
* A spinner with multiple dots arranged in a circle that rotates continuously.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <SpinnerDots size={40} color="#3b82f6" />
|
|
10
|
+
* <SpinnerDots size={48} dotCount={8} dotSize={6} />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare const SpinnerDots: import('react').ForwardRefExoticComponent<SpinnerDotsProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
//# sourceMappingURL=SpinnerDots.d.ts.map
|
|
@@ -0,0 +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;AAG/C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,6GAkEvB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SpinnerGridProps } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* SpinnerGrid - Grid of fading squares
|
|
4
|
+
*
|
|
5
|
+
* A spinner with a grid of squares that fade in and out in a pattern.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <SpinnerGrid size={40} color="#3b82f6" />
|
|
10
|
+
* <SpinnerGrid size={48} gridSize={4} />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare const SpinnerGrid: import('react').ForwardRefExoticComponent<SpinnerGridProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
//# sourceMappingURL=SpinnerGrid.d.ts.map
|
|
@@ -0,0 +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,6GAgEvB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SpinnerRingProps } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* SpinnerRing - Border-only rotating spinner
|
|
4
|
+
*
|
|
5
|
+
* A ring-style spinner with a transparent center and colored border.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <SpinnerRing size={40} color="#8b5cf6" />
|
|
10
|
+
* <SpinnerRing size={32} thickness={3} speed="slow" />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare const SpinnerRing: import('react').ForwardRefExoticComponent<SpinnerRingProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
//# sourceMappingURL=SpinnerRing.d.ts.map
|
|
@@ -0,0 +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;AAG/C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,6GA0CvB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { SpinnerCircle } from './SpinnerCircle';
|
|
2
|
+
export { SpinnerRing } from './SpinnerRing';
|
|
3
|
+
export { SpinnerDots } from './SpinnerDots';
|
|
4
|
+
export { SpinnerBars } from './SpinnerBars';
|
|
5
|
+
export { SpinnerGrid } from './SpinnerGrid';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
;/* empty css */
|
|
4
|
+
const classNames = require("./index3.cjs");
|
|
5
|
+
const colors = require("./index4.cjs");
|
|
6
|
+
const Skeleton = require("./index5.cjs");
|
|
7
|
+
const SkeletonText = require("./index6.cjs");
|
|
8
|
+
const SkeletonAvatar = require("./index7.cjs");
|
|
9
|
+
const SkeletonImage = require("./index8.cjs");
|
|
10
|
+
const SkeletonCard = require("./index9.cjs");
|
|
11
|
+
const SkeletonList = require("./index10.cjs");
|
|
12
|
+
const SkeletonTable = require("./index11.cjs");
|
|
13
|
+
const SpinnerCircle = require("./index12.cjs");
|
|
14
|
+
const SpinnerRing = require("./index13.cjs");
|
|
15
|
+
const SpinnerDots = require("./index14.cjs");
|
|
16
|
+
const SpinnerBars = require("./index15.cjs");
|
|
17
|
+
const SpinnerGrid = require("./index16.cjs");
|
|
18
|
+
const ProgressBar = require("./index17.cjs");
|
|
19
|
+
const ProgressCircle = require("./index18.cjs");
|
|
20
|
+
const ProgressRing = require("./index19.cjs");
|
|
21
|
+
const PulseDots = require("./index20.cjs");
|
|
22
|
+
const PulseWave = require("./index21.cjs");
|
|
23
|
+
const PulseBars = require("./index22.cjs");
|
|
24
|
+
const version = "1.0.0";
|
|
25
|
+
exports.cn = classNames.cn;
|
|
26
|
+
exports.getAnimationDuration = colors.getAnimationDuration;
|
|
27
|
+
exports.normalizeSize = colors.normalizeSize;
|
|
28
|
+
exports.Skeleton = Skeleton.Skeleton;
|
|
29
|
+
exports.SkeletonText = SkeletonText.SkeletonText;
|
|
30
|
+
exports.SkeletonAvatar = SkeletonAvatar.SkeletonAvatar;
|
|
31
|
+
exports.SkeletonImage = SkeletonImage.SkeletonImage;
|
|
32
|
+
exports.SkeletonCard = SkeletonCard.SkeletonCard;
|
|
33
|
+
exports.SkeletonList = SkeletonList.SkeletonList;
|
|
34
|
+
exports.SkeletonTable = SkeletonTable.SkeletonTable;
|
|
35
|
+
exports.SpinnerCircle = SpinnerCircle.SpinnerCircle;
|
|
36
|
+
exports.SpinnerRing = SpinnerRing.SpinnerRing;
|
|
37
|
+
exports.SpinnerDots = SpinnerDots.SpinnerDots;
|
|
38
|
+
exports.SpinnerBars = SpinnerBars.SpinnerBars;
|
|
39
|
+
exports.SpinnerGrid = SpinnerGrid.SpinnerGrid;
|
|
40
|
+
exports.ProgressBar = ProgressBar.ProgressBar;
|
|
41
|
+
exports.ProgressCircle = ProgressCircle.ProgressCircle;
|
|
42
|
+
exports.ProgressRing = ProgressRing.ProgressRing;
|
|
43
|
+
exports.PulseDots = PulseDots.PulseDots;
|
|
44
|
+
exports.PulseWave = PulseWave.PulseWave;
|
|
45
|
+
exports.PulseBars = PulseBars.PulseBars;
|
|
46
|
+
exports.version = version;
|
|
47
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +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":";;;;;;;;;;;;;;;;;;;;;;;AAcO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,CAAC;AAG5B,cAAc,cAAc,CAAC;AAG7B,mBAAmB,SAAS,CAAC;AAG7B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGrE,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { cn } from "./index3.js";
|
|
3
|
+
import { getAnimationDuration, normalizeSize } from "./index4.js";
|
|
4
|
+
import { Skeleton } from "./index5.js";
|
|
5
|
+
import { SkeletonText } from "./index6.js";
|
|
6
|
+
import { SkeletonAvatar } from "./index7.js";
|
|
7
|
+
import { SkeletonImage } from "./index8.js";
|
|
8
|
+
import { SkeletonCard } from "./index9.js";
|
|
9
|
+
import { SkeletonList } from "./index10.js";
|
|
10
|
+
import { SkeletonTable } from "./index11.js";
|
|
11
|
+
import { SpinnerCircle } from "./index12.js";
|
|
12
|
+
import { SpinnerRing } from "./index13.js";
|
|
13
|
+
import { SpinnerDots } from "./index14.js";
|
|
14
|
+
import { SpinnerBars } from "./index15.js";
|
|
15
|
+
import { SpinnerGrid } from "./index16.js";
|
|
16
|
+
import { ProgressBar } from "./index17.js";
|
|
17
|
+
import { ProgressCircle } from "./index18.js";
|
|
18
|
+
import { ProgressRing } from "./index19.js";
|
|
19
|
+
import { PulseDots } from "./index20.js";
|
|
20
|
+
import { PulseWave } from "./index21.js";
|
|
21
|
+
import { PulseBars } from "./index22.js";
|
|
22
|
+
const version = "1.0.0";
|
|
23
|
+
export {
|
|
24
|
+
ProgressBar,
|
|
25
|
+
ProgressCircle,
|
|
26
|
+
ProgressRing,
|
|
27
|
+
PulseBars,
|
|
28
|
+
PulseDots,
|
|
29
|
+
PulseWave,
|
|
30
|
+
Skeleton,
|
|
31
|
+
SkeletonAvatar,
|
|
32
|
+
SkeletonCard,
|
|
33
|
+
SkeletonImage,
|
|
34
|
+
SkeletonList,
|
|
35
|
+
SkeletonTable,
|
|
36
|
+
SkeletonText,
|
|
37
|
+
SpinnerBars,
|
|
38
|
+
SpinnerCircle,
|
|
39
|
+
SpinnerDots,
|
|
40
|
+
SpinnerGrid,
|
|
41
|
+
SpinnerRing,
|
|
42
|
+
cn,
|
|
43
|
+
getAnimationDuration,
|
|
44
|
+
normalizeSize,
|
|
45
|
+
version
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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":";;;;;;;;;;;;;;;;;;;;;AAcO,MAAM,UAAU;"}
|
package/dist/index10.cjs
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const react = require("react");
|
|
5
|
+
const Skeleton = require("./index5.cjs");
|
|
6
|
+
const colors = require("./index4.cjs");
|
|
7
|
+
const classNames = require("./index3.cjs");
|
|
8
|
+
const SkeletonList = react.forwardRef(
|
|
9
|
+
({
|
|
10
|
+
items = 3,
|
|
11
|
+
itemHeight = "3rem",
|
|
12
|
+
gap = "0.75rem",
|
|
13
|
+
width = "100%",
|
|
14
|
+
animate = true,
|
|
15
|
+
baseColor,
|
|
16
|
+
highlightColor,
|
|
17
|
+
borderRadius = "0.5rem",
|
|
18
|
+
className,
|
|
19
|
+
style,
|
|
20
|
+
testId = "skeleton-list",
|
|
21
|
+
visible = true,
|
|
22
|
+
...rest
|
|
23
|
+
}, ref) => {
|
|
24
|
+
if (!visible) return null;
|
|
25
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
ref,
|
|
29
|
+
"data-testid": testId,
|
|
30
|
+
className: classNames.cn("flex flex-col", className),
|
|
31
|
+
style: {
|
|
32
|
+
gap: colors.normalizeSize(gap),
|
|
33
|
+
...style
|
|
34
|
+
},
|
|
35
|
+
role: "status",
|
|
36
|
+
"aria-label": "Loading list...",
|
|
37
|
+
"aria-busy": "true",
|
|
38
|
+
...rest,
|
|
39
|
+
children: Array.from({ length: items }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
40
|
+
Skeleton.Skeleton,
|
|
41
|
+
{
|
|
42
|
+
width,
|
|
43
|
+
height: itemHeight,
|
|
44
|
+
variant: "rounded",
|
|
45
|
+
borderRadius,
|
|
46
|
+
animate,
|
|
47
|
+
baseColor,
|
|
48
|
+
highlightColor
|
|
49
|
+
},
|
|
50
|
+
index
|
|
51
|
+
))
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
SkeletonList.displayName = "SkeletonList";
|
|
57
|
+
exports.SkeletonList = SkeletonList;
|
|
58
|
+
//# sourceMappingURL=index10.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index10.cjs","sources":["../src/components/skeleton/SkeletonList.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { SkeletonListProps } from '../../types';\nimport { cn, normalizeSize } from '../../utils';\nimport { Skeleton } from './Skeleton';\n\n/**\n * SkeletonList - List skeleton loader\n *\n * A skeleton loader for list items with customizable count, item height, and spacing.\n *\n * @example\n * ```tsx\n * <SkeletonList items={5} />\n * <SkeletonList items={3} itemHeight={60} gap={12} />\n * ```\n */\nexport const SkeletonList = forwardRef<HTMLDivElement, SkeletonListProps>(\n (\n {\n items = 3,\n itemHeight = '3rem',\n gap = '0.75rem',\n width = '100%',\n animate = true,\n baseColor,\n highlightColor,\n borderRadius = '0.5rem',\n className,\n style,\n testId = 'skeleton-list',\n visible = true,\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('flex flex-col', className)}\n style={{\n gap: normalizeSize(gap),\n ...style,\n }}\n role=\"status\"\n aria-label=\"Loading list...\"\n aria-busy=\"true\"\n {...rest}\n >\n {Array.from({ length: items }).map((_, index) => (\n <Skeleton\n key={index}\n width={width}\n height={itemHeight}\n variant=\"rounded\"\n borderRadius={borderRadius}\n animate={animate}\n baseColor={baseColor}\n highlightColor={highlightColor}\n />\n ))}\n </div>\n );\n }\n);\n\nSkeletonList.displayName = 'SkeletonList';\n"],"names":["forwardRef","jsx","cn","normalizeSize","Skeleton"],"mappings":";;;;;;;AAgBO,MAAM,eAAeA,MAAAA;AAAAA,EAC1B,CACE;AAAA,IACE,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV,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,iBAAiB,SAAS;AAAA,QACxC,OAAO;AAAA,UACL,KAAKC,OAAAA,cAAc,GAAG;AAAA,UACtB,GAAG;AAAA,QAAA;AAAA,QAEL,MAAK;AAAA,QACL,cAAW;AAAA,QACX,aAAU;AAAA,QACT,GAAG;AAAA,QAEH,UAAA,MAAM,KAAK,EAAE,QAAQ,OAAO,EAAE,IAAI,CAAC,GAAG,UACrCF,2BAAAA;AAAAA,UAACG,SAAAA;AAAAA,UAAA;AAAA,YAEC;AAAA,YACA,QAAQ;AAAA,YACR,SAAQ;AAAA,YACR;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UAAA;AAAA,UAPK;AAAA,QAAA,CASR;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,aAAa,cAAc;;"}
|
package/dist/index10.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Skeleton } from "./index5.js";
|
|
4
|
+
import { normalizeSize } from "./index4.js";
|
|
5
|
+
import { cn } from "./index3.js";
|
|
6
|
+
const SkeletonList = forwardRef(
|
|
7
|
+
({
|
|
8
|
+
items = 3,
|
|
9
|
+
itemHeight = "3rem",
|
|
10
|
+
gap = "0.75rem",
|
|
11
|
+
width = "100%",
|
|
12
|
+
animate = true,
|
|
13
|
+
baseColor,
|
|
14
|
+
highlightColor,
|
|
15
|
+
borderRadius = "0.5rem",
|
|
16
|
+
className,
|
|
17
|
+
style,
|
|
18
|
+
testId = "skeleton-list",
|
|
19
|
+
visible = true,
|
|
20
|
+
...rest
|
|
21
|
+
}, ref) => {
|
|
22
|
+
if (!visible) return null;
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
ref,
|
|
27
|
+
"data-testid": testId,
|
|
28
|
+
className: cn("flex flex-col", className),
|
|
29
|
+
style: {
|
|
30
|
+
gap: normalizeSize(gap),
|
|
31
|
+
...style
|
|
32
|
+
},
|
|
33
|
+
role: "status",
|
|
34
|
+
"aria-label": "Loading list...",
|
|
35
|
+
"aria-busy": "true",
|
|
36
|
+
...rest,
|
|
37
|
+
children: Array.from({ length: items }).map((_, index) => /* @__PURE__ */ jsx(
|
|
38
|
+
Skeleton,
|
|
39
|
+
{
|
|
40
|
+
width,
|
|
41
|
+
height: itemHeight,
|
|
42
|
+
variant: "rounded",
|
|
43
|
+
borderRadius,
|
|
44
|
+
animate,
|
|
45
|
+
baseColor,
|
|
46
|
+
highlightColor
|
|
47
|
+
},
|
|
48
|
+
index
|
|
49
|
+
))
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
SkeletonList.displayName = "SkeletonList";
|
|
55
|
+
export {
|
|
56
|
+
SkeletonList
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=index10.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index10.js","sources":["../src/components/skeleton/SkeletonList.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { SkeletonListProps } from '../../types';\nimport { cn, normalizeSize } from '../../utils';\nimport { Skeleton } from './Skeleton';\n\n/**\n * SkeletonList - List skeleton loader\n *\n * A skeleton loader for list items with customizable count, item height, and spacing.\n *\n * @example\n * ```tsx\n * <SkeletonList items={5} />\n * <SkeletonList items={3} itemHeight={60} gap={12} />\n * ```\n */\nexport const SkeletonList = forwardRef<HTMLDivElement, SkeletonListProps>(\n (\n {\n items = 3,\n itemHeight = '3rem',\n gap = '0.75rem',\n width = '100%',\n animate = true,\n baseColor,\n highlightColor,\n borderRadius = '0.5rem',\n className,\n style,\n testId = 'skeleton-list',\n visible = true,\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('flex flex-col', className)}\n style={{\n gap: normalizeSize(gap),\n ...style,\n }}\n role=\"status\"\n aria-label=\"Loading list...\"\n aria-busy=\"true\"\n {...rest}\n >\n {Array.from({ length: items }).map((_, index) => (\n <Skeleton\n key={index}\n width={width}\n height={itemHeight}\n variant=\"rounded\"\n borderRadius={borderRadius}\n animate={animate}\n baseColor={baseColor}\n highlightColor={highlightColor}\n />\n ))}\n </div>\n );\n }\n);\n\nSkeletonList.displayName = 'SkeletonList';\n"],"names":[],"mappings":";;;;;AAgBO,MAAM,eAAe;AAAA,EAC1B,CACE;AAAA,IACE,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV,GAAG;AAAA,EAAA,GAEL,QACG;AACH,QAAI,CAAC,QAAS,QAAO;AAErB,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAW,GAAG,iBAAiB,SAAS;AAAA,QACxC,OAAO;AAAA,UACL,KAAK,cAAc,GAAG;AAAA,UACtB,GAAG;AAAA,QAAA;AAAA,QAEL,MAAK;AAAA,QACL,cAAW;AAAA,QACX,aAAU;AAAA,QACT,GAAG;AAAA,QAEH,UAAA,MAAM,KAAK,EAAE,QAAQ,OAAO,EAAE,IAAI,CAAC,GAAG,UACrC;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC;AAAA,YACA,QAAQ;AAAA,YACR,SAAQ;AAAA,YACR;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UAAA;AAAA,UAPK;AAAA,QAAA,CASR;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,aAAa,cAAc;"}
|
package/dist/index11.cjs
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const react = require("react");
|
|
5
|
+
const Skeleton = require("./index5.cjs");
|
|
6
|
+
const classNames = require("./index3.cjs");
|
|
7
|
+
const SkeletonTable = react.forwardRef(
|
|
8
|
+
({
|
|
9
|
+
rows = 5,
|
|
10
|
+
columns = 3,
|
|
11
|
+
showHeader = true,
|
|
12
|
+
animate = true,
|
|
13
|
+
baseColor,
|
|
14
|
+
highlightColor,
|
|
15
|
+
className,
|
|
16
|
+
style,
|
|
17
|
+
testId = "skeleton-table",
|
|
18
|
+
visible = true,
|
|
19
|
+
...rest
|
|
20
|
+
}, ref) => {
|
|
21
|
+
if (!visible) return null;
|
|
22
|
+
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
|
+
Skeleton.Skeleton,
|
|
24
|
+
{
|
|
25
|
+
width: "100%",
|
|
26
|
+
height: isHeader ? "1.5rem" : "1.25rem",
|
|
27
|
+
variant: "text",
|
|
28
|
+
animate,
|
|
29
|
+
baseColor,
|
|
30
|
+
highlightColor
|
|
31
|
+
},
|
|
32
|
+
colIndex
|
|
33
|
+
)) });
|
|
34
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
ref,
|
|
38
|
+
"data-testid": testId,
|
|
39
|
+
className: classNames.cn("flex flex-col gap-3", className),
|
|
40
|
+
style,
|
|
41
|
+
role: "status",
|
|
42
|
+
"aria-label": "Loading table...",
|
|
43
|
+
"aria-busy": "true",
|
|
44
|
+
...rest,
|
|
45
|
+
children: [
|
|
46
|
+
showHeader && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-gray-200 pb-2", children: renderRow(true) }),
|
|
47
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: Array.from({ length: rows }).map((_, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: renderRow(false) }, rowIndex)) })
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
SkeletonTable.displayName = "SkeletonTable";
|
|
54
|
+
exports.SkeletonTable = SkeletonTable;
|
|
55
|
+
//# sourceMappingURL=index11.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index11.cjs","sources":["../src/components/skeleton/SkeletonTable.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { SkeletonTableProps } from '../../types';\nimport { cn } from '../../utils';\nimport { Skeleton } from './Skeleton';\n\n/**\n * SkeletonTable - Table skeleton loader\n *\n * A skeleton loader for table layouts with rows and columns.\n *\n * @example\n * ```tsx\n * <SkeletonTable rows={5} columns={4} />\n * <SkeletonTable rows={3} columns={3} showHeader={true} />\n * ```\n */\nexport const SkeletonTable = forwardRef<HTMLDivElement, SkeletonTableProps>(\n (\n {\n rows = 5,\n columns = 3,\n showHeader = true,\n animate = true,\n baseColor,\n highlightColor,\n className,\n style,\n testId = 'skeleton-table',\n visible = true,\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const renderRow = (isHeader: boolean = false) => (\n <div className=\"grid gap-4\" style={{ gridTemplateColumns: `repeat(${columns}, 1fr)` }}>\n {Array.from({ length: columns }).map((_, colIndex) => (\n <Skeleton\n key={colIndex}\n width=\"100%\"\n height={isHeader ? '1.5rem' : '1.25rem'}\n variant=\"text\"\n animate={animate}\n baseColor={baseColor}\n highlightColor={highlightColor}\n />\n ))}\n </div>\n );\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('flex flex-col gap-3', className)}\n style={style}\n role=\"status\"\n aria-label=\"Loading table...\"\n aria-busy=\"true\"\n {...rest}\n >\n {/* Header */}\n {showHeader && (\n <div className=\"border-b border-gray-200 pb-2\">\n {renderRow(true)}\n </div>\n )}\n\n {/* Rows */}\n <div className=\"space-y-3\">\n {Array.from({ length: rows }).map((_, rowIndex) => (\n <div key={rowIndex}>\n {renderRow(false)}\n </div>\n ))}\n </div>\n </div>\n );\n }\n);\n\nSkeletonTable.displayName = 'SkeletonTable';\n"],"names":["forwardRef","jsx","Skeleton","jsxs","cn"],"mappings":";;;;;;AAgBO,MAAM,gBAAgBA,MAAAA;AAAAA,EAC3B,CACE;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,IACV,aAAa;AAAA,IACb,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV,GAAG;AAAA,EAAA,GAEL,QACG;AACH,QAAI,CAAC,QAAS,QAAO;AAErB,UAAM,YAAY,CAAC,WAAoB,UACrCC,2BAAAA,IAAC,SAAI,WAAU,cAAa,OAAO,EAAE,qBAAqB,UAAU,OAAO,SAAA,GACxE,UAAA,MAAM,KAAK,EAAE,QAAQ,QAAA,CAAS,EAAE,IAAI,CAAC,GAAG,aACvCA,2BAAAA;AAAAA,MAACC,SAAAA;AAAAA,MAAA;AAAA,QAEC,OAAM;AAAA,QACN,QAAQ,WAAW,WAAW;AAAA,QAC9B,SAAQ;AAAA,QACR;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MANK;AAAA,IAAA,CAQR,GACH;AAGF,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAWC,WAAAA,GAAG,uBAAuB,SAAS;AAAA,QAC9C;AAAA,QACA,MAAK;AAAA,QACL,cAAW;AAAA,QACX,aAAU;AAAA,QACT,GAAG;AAAA,QAGH,UAAA;AAAA,UAAA,6CACE,OAAA,EAAI,WAAU,iCACZ,UAAA,UAAU,IAAI,GACjB;AAAA,UAIFH,2BAAAA,IAAC,SAAI,WAAU,aACZ,gBAAM,KAAK,EAAE,QAAQ,MAAM,EAAE,IAAI,CAAC,GAAG,aACpCA,2BAAAA,IAAC,OAAA,EACE,oBAAU,KAAK,KADR,QAEV,CACD,EAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,cAAc,cAAc;;"}
|
package/dist/index11.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Skeleton } from "./index5.js";
|
|
4
|
+
import { cn } from "./index3.js";
|
|
5
|
+
const SkeletonTable = forwardRef(
|
|
6
|
+
({
|
|
7
|
+
rows = 5,
|
|
8
|
+
columns = 3,
|
|
9
|
+
showHeader = true,
|
|
10
|
+
animate = true,
|
|
11
|
+
baseColor,
|
|
12
|
+
highlightColor,
|
|
13
|
+
className,
|
|
14
|
+
style,
|
|
15
|
+
testId = "skeleton-table",
|
|
16
|
+
visible = true,
|
|
17
|
+
...rest
|
|
18
|
+
}, ref) => {
|
|
19
|
+
if (!visible) return null;
|
|
20
|
+
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
|
+
Skeleton,
|
|
22
|
+
{
|
|
23
|
+
width: "100%",
|
|
24
|
+
height: isHeader ? "1.5rem" : "1.25rem",
|
|
25
|
+
variant: "text",
|
|
26
|
+
animate,
|
|
27
|
+
baseColor,
|
|
28
|
+
highlightColor
|
|
29
|
+
},
|
|
30
|
+
colIndex
|
|
31
|
+
)) });
|
|
32
|
+
return /* @__PURE__ */ jsxs(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
ref,
|
|
36
|
+
"data-testid": testId,
|
|
37
|
+
className: cn("flex flex-col gap-3", className),
|
|
38
|
+
style,
|
|
39
|
+
role: "status",
|
|
40
|
+
"aria-label": "Loading table...",
|
|
41
|
+
"aria-busy": "true",
|
|
42
|
+
...rest,
|
|
43
|
+
children: [
|
|
44
|
+
showHeader && /* @__PURE__ */ jsx("div", { className: "border-b border-gray-200 pb-2", children: renderRow(true) }),
|
|
45
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-3", children: Array.from({ length: rows }).map((_, rowIndex) => /* @__PURE__ */ jsx("div", { children: renderRow(false) }, rowIndex)) })
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
SkeletonTable.displayName = "SkeletonTable";
|
|
52
|
+
export {
|
|
53
|
+
SkeletonTable
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=index11.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index11.js","sources":["../src/components/skeleton/SkeletonTable.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { SkeletonTableProps } from '../../types';\nimport { cn } from '../../utils';\nimport { Skeleton } from './Skeleton';\n\n/**\n * SkeletonTable - Table skeleton loader\n *\n * A skeleton loader for table layouts with rows and columns.\n *\n * @example\n * ```tsx\n * <SkeletonTable rows={5} columns={4} />\n * <SkeletonTable rows={3} columns={3} showHeader={true} />\n * ```\n */\nexport const SkeletonTable = forwardRef<HTMLDivElement, SkeletonTableProps>(\n (\n {\n rows = 5,\n columns = 3,\n showHeader = true,\n animate = true,\n baseColor,\n highlightColor,\n className,\n style,\n testId = 'skeleton-table',\n visible = true,\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const renderRow = (isHeader: boolean = false) => (\n <div className=\"grid gap-4\" style={{ gridTemplateColumns: `repeat(${columns}, 1fr)` }}>\n {Array.from({ length: columns }).map((_, colIndex) => (\n <Skeleton\n key={colIndex}\n width=\"100%\"\n height={isHeader ? '1.5rem' : '1.25rem'}\n variant=\"text\"\n animate={animate}\n baseColor={baseColor}\n highlightColor={highlightColor}\n />\n ))}\n </div>\n );\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('flex flex-col gap-3', className)}\n style={style}\n role=\"status\"\n aria-label=\"Loading table...\"\n aria-busy=\"true\"\n {...rest}\n >\n {/* Header */}\n {showHeader && (\n <div className=\"border-b border-gray-200 pb-2\">\n {renderRow(true)}\n </div>\n )}\n\n {/* Rows */}\n <div className=\"space-y-3\">\n {Array.from({ length: rows }).map((_, rowIndex) => (\n <div key={rowIndex}>\n {renderRow(false)}\n </div>\n ))}\n </div>\n </div>\n );\n }\n);\n\nSkeletonTable.displayName = 'SkeletonTable';\n"],"names":[],"mappings":";;;;AAgBO,MAAM,gBAAgB;AAAA,EAC3B,CACE;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,IACV,aAAa;AAAA,IACb,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV,GAAG;AAAA,EAAA,GAEL,QACG;AACH,QAAI,CAAC,QAAS,QAAO;AAErB,UAAM,YAAY,CAAC,WAAoB,UACrC,oBAAC,SAAI,WAAU,cAAa,OAAO,EAAE,qBAAqB,UAAU,OAAO,SAAA,GACxE,UAAA,MAAM,KAAK,EAAE,QAAQ,QAAA,CAAS,EAAE,IAAI,CAAC,GAAG,aACvC;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,OAAM;AAAA,QACN,QAAQ,WAAW,WAAW;AAAA,QAC9B,SAAQ;AAAA,QACR;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MANK;AAAA,IAAA,CAQR,GACH;AAGF,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAW,GAAG,uBAAuB,SAAS;AAAA,QAC9C;AAAA,QACA,MAAK;AAAA,QACL,cAAW;AAAA,QACX,aAAU;AAAA,QACT,GAAG;AAAA,QAGH,UAAA;AAAA,UAAA,kCACE,OAAA,EAAI,WAAU,iCACZ,UAAA,UAAU,IAAI,GACjB;AAAA,UAIF,oBAAC,SAAI,WAAU,aACZ,gBAAM,KAAK,EAAE,QAAQ,MAAM,EAAE,IAAI,CAAC,GAAG,aACpC,oBAAC,OAAA,EACE,oBAAU,KAAK,KADR,QAEV,CACD,EAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,cAAc,cAAc;"}
|
package/dist/index12.cjs
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const react = require("react");
|
|
5
|
+
const colors = require("./index4.cjs");
|
|
6
|
+
const classNames = require("./index3.cjs");
|
|
7
|
+
const SpinnerCircle = react.forwardRef(
|
|
8
|
+
({
|
|
9
|
+
size = 40,
|
|
10
|
+
color = "#3b82f6",
|
|
11
|
+
thickness = 4,
|
|
12
|
+
speed = "normal",
|
|
13
|
+
className,
|
|
14
|
+
style,
|
|
15
|
+
testId = "spinner-circle",
|
|
16
|
+
visible = true,
|
|
17
|
+
ariaLabel = "Loading...",
|
|
18
|
+
...rest
|
|
19
|
+
}, ref) => {
|
|
20
|
+
if (!visible) return null;
|
|
21
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
ref,
|
|
25
|
+
"data-testid": testId,
|
|
26
|
+
className: classNames.cn("inline-flex items-center justify-center", className),
|
|
27
|
+
style,
|
|
28
|
+
role: "status",
|
|
29
|
+
"aria-label": ariaLabel,
|
|
30
|
+
"aria-busy": "true",
|
|
31
|
+
...rest,
|
|
32
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
+
)
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
SpinnerCircle.displayName = "SpinnerCircle";
|
|
62
|
+
exports.SpinnerCircle = SpinnerCircle;
|
|
63
|
+
//# sourceMappingURL=index12.cjs.map
|
|
@@ -0,0 +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;;"}
|