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,65 @@
|
|
|
1
|
+
import { CSSProperties, HTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Base props for all loader components
|
|
4
|
+
*/
|
|
5
|
+
export interface BaseLoaderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
6
|
+
/** Size of the loader (numeric for px, or CSS string like '2rem') */
|
|
7
|
+
size?: number | string;
|
|
8
|
+
/** Primary color of the loader */
|
|
9
|
+
color?: string;
|
|
10
|
+
/** Secondary color (for multi-color loaders) */
|
|
11
|
+
secondaryColor?: string;
|
|
12
|
+
/** Custom CSS class name */
|
|
13
|
+
className?: string;
|
|
14
|
+
/** Inline styles */
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
/** Accessibility label */
|
|
17
|
+
ariaLabel?: string;
|
|
18
|
+
/** Whether the loader is visible */
|
|
19
|
+
visible?: boolean;
|
|
20
|
+
/** Animation speed: 'slow' | 'normal' | 'fast' or milliseconds */
|
|
21
|
+
speed?: 'slow' | 'normal' | 'fast' | number;
|
|
22
|
+
/** Test ID for testing */
|
|
23
|
+
testId?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Base props for skeleton loader components
|
|
27
|
+
*/
|
|
28
|
+
export interface SkeletonBaseProps extends BaseLoaderProps {
|
|
29
|
+
/** Width of skeleton */
|
|
30
|
+
width?: number | string;
|
|
31
|
+
/** Height of skeleton */
|
|
32
|
+
height?: number | string;
|
|
33
|
+
/** Border radius */
|
|
34
|
+
borderRadius?: number | string;
|
|
35
|
+
/** Enable animation */
|
|
36
|
+
animate?: boolean;
|
|
37
|
+
/** Number of skeleton lines/items */
|
|
38
|
+
count?: number;
|
|
39
|
+
/** Base color (background) */
|
|
40
|
+
baseColor?: string;
|
|
41
|
+
/** Highlight color (shimmer) */
|
|
42
|
+
highlightColor?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Base props for progress loader components
|
|
46
|
+
*/
|
|
47
|
+
export interface ProgressLoaderProps extends BaseLoaderProps {
|
|
48
|
+
/** Progress value (0-100) */
|
|
49
|
+
value?: number;
|
|
50
|
+
/** Whether progress is indeterminate */
|
|
51
|
+
indeterminate?: boolean;
|
|
52
|
+
/** Show percentage text */
|
|
53
|
+
showValue?: boolean;
|
|
54
|
+
/** Thickness of progress indicator */
|
|
55
|
+
thickness?: number | string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Animation speed type
|
|
59
|
+
*/
|
|
60
|
+
export type AnimationSpeed = 'slow' | 'normal' | 'fast';
|
|
61
|
+
/**
|
|
62
|
+
* Speed to duration mapping (in milliseconds)
|
|
63
|
+
*/
|
|
64
|
+
export declare const SPEED_MAP: Record<AnimationSpeed, number>;
|
|
65
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,eAAgB,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CAAC;IAEpB,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAIpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AAGzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ProgressLoaderProps } from './common';
|
|
2
|
+
/**
|
|
3
|
+
* ProgressBar component props
|
|
4
|
+
*/
|
|
5
|
+
export interface ProgressBarProps extends ProgressLoaderProps {
|
|
6
|
+
/** Height of the progress bar */
|
|
7
|
+
height?: number | string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* ProgressCircle component props
|
|
11
|
+
*/
|
|
12
|
+
export interface ProgressCircleProps extends ProgressLoaderProps {
|
|
13
|
+
/** Size of the circle */
|
|
14
|
+
size?: number | string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* ProgressRing component props
|
|
18
|
+
*/
|
|
19
|
+
export interface ProgressRingProps extends ProgressLoaderProps {
|
|
20
|
+
/** Size of the ring */
|
|
21
|
+
size?: number | string;
|
|
22
|
+
/** Enable gradient */
|
|
23
|
+
gradient?: boolean;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/types/progress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,mBAAmB;IAC5D,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseLoaderProps } from './common';
|
|
2
|
+
/**
|
|
3
|
+
* PulseDots component props
|
|
4
|
+
*/
|
|
5
|
+
export interface PulseDotsProps extends BaseLoaderProps {
|
|
6
|
+
/** Number of dots */
|
|
7
|
+
dotCount?: number;
|
|
8
|
+
/** Size of each dot */
|
|
9
|
+
dotSize?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* PulseWave component props
|
|
13
|
+
*/
|
|
14
|
+
export interface PulseWaveProps extends BaseLoaderProps {
|
|
15
|
+
/** Number of bars in wave */
|
|
16
|
+
barCount?: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* PulseBars component props
|
|
20
|
+
*/
|
|
21
|
+
export interface PulseBarsProps extends BaseLoaderProps {
|
|
22
|
+
/** Number of bars */
|
|
23
|
+
barCount?: number;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=pulse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pulse.d.ts","sourceRoot":"","sources":["../../src/types/pulse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,qBAAqB;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,qBAAqB;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { SkeletonBaseProps } from './common';
|
|
2
|
+
/**
|
|
3
|
+
* Skeleton variant types
|
|
4
|
+
*/
|
|
5
|
+
export type SkeletonVariant = 'text' | 'circular' | 'rectangular' | 'rounded';
|
|
6
|
+
/**
|
|
7
|
+
* Skeleton component props
|
|
8
|
+
*/
|
|
9
|
+
export interface SkeletonProps extends SkeletonBaseProps {
|
|
10
|
+
/** Shape variant */
|
|
11
|
+
variant?: SkeletonVariant;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* SkeletonText component props
|
|
15
|
+
*/
|
|
16
|
+
export interface SkeletonTextProps extends SkeletonBaseProps {
|
|
17
|
+
/** Number of text lines */
|
|
18
|
+
lines?: number;
|
|
19
|
+
/** Gap between lines */
|
|
20
|
+
gap?: number | string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* SkeletonAvatar component props
|
|
24
|
+
*/
|
|
25
|
+
export interface SkeletonAvatarProps extends SkeletonBaseProps {
|
|
26
|
+
/** Avatar shape */
|
|
27
|
+
shape?: 'circle' | 'square';
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* SkeletonImage component props
|
|
31
|
+
*/
|
|
32
|
+
export interface SkeletonImageProps extends SkeletonBaseProps {
|
|
33
|
+
/** Aspect ratio (e.g., '16/9', '4/3', '1/1') */
|
|
34
|
+
aspectRatio?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* SkeletonCard component props
|
|
38
|
+
*/
|
|
39
|
+
export interface SkeletonCardProps extends SkeletonBaseProps {
|
|
40
|
+
/** Show avatar */
|
|
41
|
+
hasAvatar?: boolean;
|
|
42
|
+
/** Title width */
|
|
43
|
+
titleWidth?: number | string;
|
|
44
|
+
/** Number of description lines */
|
|
45
|
+
lines?: number;
|
|
46
|
+
/** Avatar size */
|
|
47
|
+
avatarSize?: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* SkeletonList component props
|
|
51
|
+
*/
|
|
52
|
+
export interface SkeletonListProps extends SkeletonBaseProps {
|
|
53
|
+
/** Number of list items */
|
|
54
|
+
items?: number;
|
|
55
|
+
/** Item height */
|
|
56
|
+
itemHeight?: number | string;
|
|
57
|
+
/** Gap between items */
|
|
58
|
+
gap?: number | string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* SkeletonTable component props
|
|
62
|
+
*/
|
|
63
|
+
export interface SkeletonTableProps extends SkeletonBaseProps {
|
|
64
|
+
/** Number of rows */
|
|
65
|
+
rows?: number;
|
|
66
|
+
/** Number of columns */
|
|
67
|
+
columns?: number;
|
|
68
|
+
/** Show table header */
|
|
69
|
+
showHeader?: boolean;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../src/types/skeleton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,UAAU,GAAG,aAAa,GAAG,SAAS,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,oBAAoB;IACpB,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM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|
5
|
+
export interface SpinnerCircleProps extends BaseLoaderProps {
|
|
6
|
+
/** Thickness of the spinner */
|
|
7
|
+
thickness?: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* SpinnerRing component props
|
|
11
|
+
*/
|
|
12
|
+
export interface SpinnerRingProps extends BaseLoaderProps {
|
|
13
|
+
/** Thickness of the ring */
|
|
14
|
+
thickness?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* SpinnerDots component props
|
|
18
|
+
*/
|
|
19
|
+
export interface SpinnerDotsProps extends BaseLoaderProps {
|
|
20
|
+
/** Number of dots */
|
|
21
|
+
dotCount?: number;
|
|
22
|
+
/** Size of each dot */
|
|
23
|
+
dotSize?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* SpinnerBars component props
|
|
27
|
+
*/
|
|
28
|
+
export interface SpinnerBarsProps extends BaseLoaderProps {
|
|
29
|
+
/** Number of bars */
|
|
30
|
+
barCount?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* SpinnerGrid component props
|
|
34
|
+
*/
|
|
35
|
+
export interface SpinnerGridProps extends BaseLoaderProps {
|
|
36
|
+
/** Grid size (e.g., 3 for 3x3) */
|
|
37
|
+
gridSize?: number;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../src/types/spinner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,qBAAqB;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,qBAAqB;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
/**
|
|
3
|
+
* Utility function to merge class names
|
|
4
|
+
* Combines clsx for conditional classes
|
|
5
|
+
*
|
|
6
|
+
* @param inputs - Class names to merge
|
|
7
|
+
* @returns Merged class name string
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* cn('base-class', condition && 'conditional-class', 'another-class')
|
|
11
|
+
* // => 'base-class conditional-class another-class' (if condition is true)
|
|
12
|
+
*/
|
|
13
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
14
|
+
//# sourceMappingURL=classNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classNames.d.ts","sourceRoot":"","sources":["../../src/utils/classNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAE7C;;;;;;;;;;GAUG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if a color is a valid hex color
|
|
3
|
+
*/
|
|
4
|
+
export declare function isHexColor(color: string): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Check if a color is a valid RGB/RGBA color
|
|
7
|
+
*/
|
|
8
|
+
export declare function isRgbColor(color: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Convert hex color to RGB
|
|
11
|
+
*/
|
|
12
|
+
export declare function hexToRgb(hex: string): {
|
|
13
|
+
r: number;
|
|
14
|
+
g: number;
|
|
15
|
+
b: number;
|
|
16
|
+
} | null;
|
|
17
|
+
/**
|
|
18
|
+
* Get animation duration in CSS format
|
|
19
|
+
*/
|
|
20
|
+
export declare function getAnimationDuration(speed: 'slow' | 'normal' | 'fast' | number): string;
|
|
21
|
+
/**
|
|
22
|
+
* Normalize size value to CSS string
|
|
23
|
+
*/
|
|
24
|
+
export declare function normalizeSize(size?: number | string): string;
|
|
25
|
+
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/utils/colors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAShF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAYvF;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAK5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "premium-react-loaders",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Premium, production-ready loading components for React with TypeScript and Tailwind CSS",
|
|
5
|
+
"author": "Ishan Karunaratne",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/ishansasika/premium-react-loaders"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"react",
|
|
13
|
+
"loader",
|
|
14
|
+
"spinner",
|
|
15
|
+
"skeleton",
|
|
16
|
+
"loading",
|
|
17
|
+
"progress",
|
|
18
|
+
"tailwind",
|
|
19
|
+
"typescript",
|
|
20
|
+
"components",
|
|
21
|
+
"ui"
|
|
22
|
+
],
|
|
23
|
+
"type": "module",
|
|
24
|
+
"main": "./dist/index.cjs",
|
|
25
|
+
"module": "./dist/index.js",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"import": {
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"default": "./dist/index.js"
|
|
32
|
+
},
|
|
33
|
+
"require": {
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"default": "./dist/index.cjs"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"./styles": {
|
|
39
|
+
"import": "./dist/styles/index.css",
|
|
40
|
+
"require": "./dist/styles/index.css"
|
|
41
|
+
},
|
|
42
|
+
"./package.json": "./package.json"
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist",
|
|
46
|
+
"README.md",
|
|
47
|
+
"LICENSE"
|
|
48
|
+
],
|
|
49
|
+
"sideEffects": [
|
|
50
|
+
"**/*.css"
|
|
51
|
+
],
|
|
52
|
+
"scripts": {
|
|
53
|
+
"dev": "vite",
|
|
54
|
+
"build": "tsc --noEmit && vite build",
|
|
55
|
+
"build:watch": "vite build --watch",
|
|
56
|
+
"type-check": "tsc --noEmit",
|
|
57
|
+
"storybook": "storybook dev -p 6006",
|
|
58
|
+
"build-storybook": "storybook build",
|
|
59
|
+
"preview-storybook": "serve storybook-static",
|
|
60
|
+
"deploy:storybook": "npm run build-storybook && firebase deploy",
|
|
61
|
+
"prepublishOnly": "npm run build"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
65
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
66
|
+
"tailwindcss": "^3.4.0"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@storybook/addon-essentials": "^8.4.7",
|
|
70
|
+
"@storybook/addon-interactions": "^8.4.7",
|
|
71
|
+
"@storybook/addon-links": "^8.4.7",
|
|
72
|
+
"@storybook/blocks": "^8.4.7",
|
|
73
|
+
"@storybook/react": "^8.4.7",
|
|
74
|
+
"@storybook/react-vite": "^8.4.7",
|
|
75
|
+
"@types/react": "^19.0.2",
|
|
76
|
+
"@types/react-dom": "^19.0.2",
|
|
77
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
78
|
+
"autoprefixer": "^10.4.20",
|
|
79
|
+
"clsx": "^2.1.1",
|
|
80
|
+
"postcss": "^8.4.49",
|
|
81
|
+
"react": "^19.0.0",
|
|
82
|
+
"react-dom": "^19.0.0",
|
|
83
|
+
"storybook": "^8.4.7",
|
|
84
|
+
"tailwindcss": "^3.4.17",
|
|
85
|
+
"typescript": "^5.7.2",
|
|
86
|
+
"vite": "^6.0.5",
|
|
87
|
+
"vite-plugin-dts": "^4.3.0"
|
|
88
|
+
}
|
|
89
|
+
}
|