premium-react-loaders 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/overlay/LoaderOverlay.d.ts +28 -0
- package/dist/components/overlay/LoaderOverlay.d.ts.map +1 -0
- package/dist/components/overlay/index.d.ts +2 -0
- package/dist/components/overlay/index.d.ts.map +1 -0
- package/dist/components/progress/ProgressBar.d.ts +2 -0
- package/dist/components/progress/ProgressBar.d.ts.map +1 -1
- package/dist/components/progress/ProgressCircle.d.ts +2 -1
- package/dist/components/progress/ProgressCircle.d.ts.map +1 -1
- package/dist/components/progress/ProgressRing.d.ts +2 -1
- package/dist/components/progress/ProgressRing.d.ts.map +1 -1
- package/dist/components/skeleton/SkeletonPage.d.ts +16 -0
- package/dist/components/skeleton/SkeletonPage.d.ts.map +1 -0
- package/dist/components/skeleton/SkeletonText.d.ts +1 -1
- package/dist/components/skeleton/SkeletonText.d.ts.map +1 -1
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton/index.d.ts.map +1 -1
- package/dist/components/spinner/SpinnerDots.d.ts.map +1 -1
- package/dist/components/spinner/SpinnerRing.d.ts +1 -0
- package/dist/components/spinner/SpinnerRing.d.ts.map +1 -1
- package/dist/index.cjs +16 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +16 -12
- package/dist/index.js.map +1 -1
- package/dist/index12.cjs +126 -37
- package/dist/index12.cjs.map +1 -1
- package/dist/index12.js +127 -38
- package/dist/index12.js.map +1 -1
- package/dist/index13.cjs +23 -11
- package/dist/index13.cjs.map +1 -1
- package/dist/index13.js +23 -11
- package/dist/index13.js.map +1 -1
- package/dist/index14.cjs +10 -32
- package/dist/index14.cjs.map +1 -1
- package/dist/index14.js +10 -32
- package/dist/index14.js.map +1 -1
- package/dist/index15.cjs +41 -24
- package/dist/index15.cjs.map +1 -1
- package/dist/index15.js +42 -25
- package/dist/index15.js.map +1 -1
- package/dist/index16.cjs +24 -37
- package/dist/index16.cjs.map +1 -1
- package/dist/index16.js +24 -37
- package/dist/index16.js.map +1 -1
- package/dist/index17.cjs +48 -58
- package/dist/index17.cjs.map +1 -1
- package/dist/index17.js +49 -59
- package/dist/index17.js.map +1 -1
- package/dist/index18.cjs +49 -53
- package/dist/index18.cjs.map +1 -1
- package/dist/index18.js +51 -55
- package/dist/index18.js.map +1 -1
- package/dist/index19.cjs +32 -16
- package/dist/index19.cjs.map +1 -1
- package/dist/index19.js +33 -17
- package/dist/index19.js.map +1 -1
- package/dist/index20.cjs +104 -26
- package/dist/index20.cjs.map +1 -1
- package/dist/index20.js +107 -29
- package/dist/index20.js.map +1 -1
- package/dist/index21.cjs +21 -26
- package/dist/index21.cjs.map +1 -1
- package/dist/index21.js +21 -26
- package/dist/index21.js.map +1 -1
- package/dist/index22.cjs +10 -12
- package/dist/index22.cjs.map +1 -1
- package/dist/index22.js +11 -13
- package/dist/index22.js.map +1 -1
- package/dist/index23.cjs +62 -16
- package/dist/index23.cjs.map +1 -1
- package/dist/index23.js +61 -15
- package/dist/index23.js.map +1 -1
- package/dist/index24.cjs +71 -0
- package/dist/index24.cjs.map +1 -0
- package/dist/index24.js +71 -0
- package/dist/index24.js.map +1 -0
- package/dist/index25.cjs +18 -0
- package/dist/index25.cjs.map +1 -0
- package/dist/index25.js +18 -0
- package/dist/index25.js.map +1 -0
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +1 -1
- package/dist/index4.cjs +63 -3
- package/dist/index4.cjs.map +1 -1
- package/dist/index4.js +64 -4
- package/dist/index4.js.map +1 -1
- package/dist/index6.cjs +2 -1
- package/dist/index6.cjs.map +1 -1
- package/dist/index6.js +2 -1
- package/dist/index6.js.map +1 -1
- package/dist/premium-react-loaders.css +101 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/overlay.d.ts +24 -0
- package/dist/types/overlay.d.ts.map +1 -0
- package/dist/types/progress.d.ts +8 -0
- package/dist/types/progress.d.ts.map +1 -1
- package/dist/types/skeleton.d.ts +9 -0
- package/dist/types/skeleton.d.ts.map +1 -1
- package/dist/utils/colors.d.ts +14 -1
- package/dist/utils/colors.d.ts.map +1 -1
- package/package.json +7 -1
package/dist/index6.cjs
CHANGED
|
@@ -11,6 +11,7 @@ const SkeletonText = react.forwardRef(
|
|
|
11
11
|
width = "100%",
|
|
12
12
|
height = "1rem",
|
|
13
13
|
gap = "0.5rem",
|
|
14
|
+
lastLineWidth = "80%",
|
|
14
15
|
animate = true,
|
|
15
16
|
baseColor,
|
|
16
17
|
highlightColor,
|
|
@@ -36,7 +37,7 @@ const SkeletonText = react.forwardRef(
|
|
|
36
37
|
"aria-busy": "true",
|
|
37
38
|
...rest,
|
|
38
39
|
children: Array.from({ length: lines }).map((_, index) => {
|
|
39
|
-
const lineWidth = index === lines - 1 ?
|
|
40
|
+
const lineWidth = index === lines - 1 ? lastLineWidth : width;
|
|
40
41
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
41
42
|
Skeleton.Skeleton,
|
|
42
43
|
{
|
package/dist/index6.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index6.cjs","sources":["../src/components/skeleton/SkeletonText.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { SkeletonTextProps } from '../../types';\nimport { cn, normalizeSize } from '../../utils';\nimport { Skeleton } from './Skeleton';\n\n/**\n * SkeletonText - Multi-line text skeleton loader\n *\n * Renders multiple skeleton lines to mimic text content while loading.\n *\n * @example\n * ```tsx\n * <SkeletonText lines={3} />\n * <SkeletonText lines={5} gap={8} />\n * ```\n */\nexport const SkeletonText = forwardRef<HTMLDivElement, SkeletonTextProps>(\n (\n {\n lines = 3,\n width = '100%',\n height = '1rem',\n gap = '0.5rem',\n animate = true,\n baseColor,\n highlightColor,\n className,\n style,\n testId = 'skeleton-text',\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 text...\"\n aria-busy=\"true\"\n {...rest}\n >\n {Array.from({ length: lines }).map((_, index) => {\n // Last line
|
|
1
|
+
{"version":3,"file":"index6.cjs","sources":["../src/components/skeleton/SkeletonText.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { SkeletonTextProps } from '../../types';\nimport { cn, normalizeSize } from '../../utils';\nimport { Skeleton } from './Skeleton';\n\n/**\n * SkeletonText - Multi-line text skeleton loader\n *\n * Renders multiple skeleton lines to mimic text content while loading.\n *\n * @example\n * ```tsx\n * <SkeletonText lines={3} />\n * <SkeletonText lines={5} gap={8} lastLineWidth=\"60%\" />\n * ```\n */\nexport const SkeletonText = forwardRef<HTMLDivElement, SkeletonTextProps>(\n (\n {\n lines = 3,\n width = '100%',\n height = '1rem',\n gap = '0.5rem',\n lastLineWidth = '80%',\n animate = true,\n baseColor,\n highlightColor,\n className,\n style,\n testId = 'skeleton-text',\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 text...\"\n aria-busy=\"true\"\n {...rest}\n >\n {Array.from({ length: lines }).map((_, index) => {\n // Last line uses custom width or default (80%)\n const lineWidth = index === lines - 1 ? lastLineWidth : width;\n\n return (\n <Skeleton\n key={index}\n width={lineWidth}\n height={height}\n animate={animate}\n baseColor={baseColor}\n highlightColor={highlightColor}\n variant=\"text\"\n />\n );\n })}\n </div>\n );\n }\n);\n\nSkeletonText.displayName = 'SkeletonText';\n"],"names":["forwardRef","jsx","cn","normalizeSize","Skeleton"],"mappings":";;;;;;;AAgBO,MAAM,eAAeA,MAAAA;AAAAA,EAC1B,CACE;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,MAAM;AAAA,IACN,gBAAgB;AAAA,IAChB,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,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,MAAA,CAAO,EAAE,IAAI,CAAC,GAAG,UAAU;AAE/C,gBAAM,YAAY,UAAU,QAAQ,IAAI,gBAAgB;AAExD,iBACEF,2BAAAA;AAAAA,YAACG,SAAAA;AAAAA,YAAA;AAAA,cAEC,OAAO;AAAA,cACP;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA,SAAQ;AAAA,YAAA;AAAA,YANH;AAAA,UAAA;AAAA,QASX,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,aAAa,cAAc;;"}
|
package/dist/index6.js
CHANGED
|
@@ -9,6 +9,7 @@ const SkeletonText = forwardRef(
|
|
|
9
9
|
width = "100%",
|
|
10
10
|
height = "1rem",
|
|
11
11
|
gap = "0.5rem",
|
|
12
|
+
lastLineWidth = "80%",
|
|
12
13
|
animate = true,
|
|
13
14
|
baseColor,
|
|
14
15
|
highlightColor,
|
|
@@ -34,7 +35,7 @@ const SkeletonText = forwardRef(
|
|
|
34
35
|
"aria-busy": "true",
|
|
35
36
|
...rest,
|
|
36
37
|
children: Array.from({ length: lines }).map((_, index) => {
|
|
37
|
-
const lineWidth = index === lines - 1 ?
|
|
38
|
+
const lineWidth = index === lines - 1 ? lastLineWidth : width;
|
|
38
39
|
return /* @__PURE__ */ jsx(
|
|
39
40
|
Skeleton,
|
|
40
41
|
{
|
package/dist/index6.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index6.js","sources":["../src/components/skeleton/SkeletonText.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { SkeletonTextProps } from '../../types';\nimport { cn, normalizeSize } from '../../utils';\nimport { Skeleton } from './Skeleton';\n\n/**\n * SkeletonText - Multi-line text skeleton loader\n *\n * Renders multiple skeleton lines to mimic text content while loading.\n *\n * @example\n * ```tsx\n * <SkeletonText lines={3} />\n * <SkeletonText lines={5} gap={8} />\n * ```\n */\nexport const SkeletonText = forwardRef<HTMLDivElement, SkeletonTextProps>(\n (\n {\n lines = 3,\n width = '100%',\n height = '1rem',\n gap = '0.5rem',\n animate = true,\n baseColor,\n highlightColor,\n className,\n style,\n testId = 'skeleton-text',\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 text...\"\n aria-busy=\"true\"\n {...rest}\n >\n {Array.from({ length: lines }).map((_, index) => {\n // Last line
|
|
1
|
+
{"version":3,"file":"index6.js","sources":["../src/components/skeleton/SkeletonText.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { SkeletonTextProps } from '../../types';\nimport { cn, normalizeSize } from '../../utils';\nimport { Skeleton } from './Skeleton';\n\n/**\n * SkeletonText - Multi-line text skeleton loader\n *\n * Renders multiple skeleton lines to mimic text content while loading.\n *\n * @example\n * ```tsx\n * <SkeletonText lines={3} />\n * <SkeletonText lines={5} gap={8} lastLineWidth=\"60%\" />\n * ```\n */\nexport const SkeletonText = forwardRef<HTMLDivElement, SkeletonTextProps>(\n (\n {\n lines = 3,\n width = '100%',\n height = '1rem',\n gap = '0.5rem',\n lastLineWidth = '80%',\n animate = true,\n baseColor,\n highlightColor,\n className,\n style,\n testId = 'skeleton-text',\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 text...\"\n aria-busy=\"true\"\n {...rest}\n >\n {Array.from({ length: lines }).map((_, index) => {\n // Last line uses custom width or default (80%)\n const lineWidth = index === lines - 1 ? lastLineWidth : width;\n\n return (\n <Skeleton\n key={index}\n width={lineWidth}\n height={height}\n animate={animate}\n baseColor={baseColor}\n highlightColor={highlightColor}\n variant=\"text\"\n />\n );\n })}\n </div>\n );\n }\n);\n\nSkeletonText.displayName = 'SkeletonText';\n"],"names":[],"mappings":";;;;;AAgBO,MAAM,eAAe;AAAA,EAC1B,CACE;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,MAAM;AAAA,IACN,gBAAgB;AAAA,IAChB,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,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,MAAA,CAAO,EAAE,IAAI,CAAC,GAAG,UAAU;AAE/C,gBAAM,YAAY,UAAU,QAAQ,IAAI,gBAAgB;AAExD,iBACE;AAAA,YAAC;AAAA,YAAA;AAAA,cAEC,OAAO;AAAA,cACP;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA,SAAQ;AAAA,YAAA;AAAA,YANH;AAAA,UAAA;AAAA,QASX,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,aAAa,cAAc;"}
|
|
@@ -535,6 +535,9 @@ video {
|
|
|
535
535
|
.visible {
|
|
536
536
|
visibility: visible;
|
|
537
537
|
}
|
|
538
|
+
.fixed {
|
|
539
|
+
position: fixed;
|
|
540
|
+
}
|
|
538
541
|
.absolute {
|
|
539
542
|
position: absolute;
|
|
540
543
|
}
|
|
@@ -544,6 +547,19 @@ video {
|
|
|
544
547
|
.inset-0 {
|
|
545
548
|
inset: 0px;
|
|
546
549
|
}
|
|
550
|
+
.z-10 {
|
|
551
|
+
z-index: 10;
|
|
552
|
+
}
|
|
553
|
+
.col-span-2 {
|
|
554
|
+
grid-column: span 2 / span 2;
|
|
555
|
+
}
|
|
556
|
+
.mx-auto {
|
|
557
|
+
margin-left: auto;
|
|
558
|
+
margin-right: auto;
|
|
559
|
+
}
|
|
560
|
+
.mb-4 {
|
|
561
|
+
margin-bottom: 1rem;
|
|
562
|
+
}
|
|
547
563
|
.block {
|
|
548
564
|
display: block;
|
|
549
565
|
}
|
|
@@ -559,15 +575,30 @@ video {
|
|
|
559
575
|
.grid {
|
|
560
576
|
display: grid;
|
|
561
577
|
}
|
|
578
|
+
.h-4 {
|
|
579
|
+
height: 1rem;
|
|
580
|
+
}
|
|
581
|
+
.h-96 {
|
|
582
|
+
height: 24rem;
|
|
583
|
+
}
|
|
562
584
|
.h-full {
|
|
563
585
|
height: 100%;
|
|
564
586
|
}
|
|
587
|
+
.w-1\/2 {
|
|
588
|
+
width: 50%;
|
|
589
|
+
}
|
|
590
|
+
.w-3\/4 {
|
|
591
|
+
width: 75%;
|
|
592
|
+
}
|
|
565
593
|
.w-96 {
|
|
566
594
|
width: 24rem;
|
|
567
595
|
}
|
|
568
596
|
.w-full {
|
|
569
597
|
width: 100%;
|
|
570
598
|
}
|
|
599
|
+
.max-w-3xl {
|
|
600
|
+
max-width: 48rem;
|
|
601
|
+
}
|
|
571
602
|
.flex-1 {
|
|
572
603
|
flex: 1 1 0%;
|
|
573
604
|
}
|
|
@@ -583,9 +614,18 @@ video {
|
|
|
583
614
|
.animate-spinner-rotate {
|
|
584
615
|
animation: spinner-rotate 1s linear infinite;
|
|
585
616
|
}
|
|
617
|
+
.grid-cols-3 {
|
|
618
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
619
|
+
}
|
|
620
|
+
.grid-cols-4 {
|
|
621
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
622
|
+
}
|
|
586
623
|
.flex-col {
|
|
587
624
|
flex-direction: column;
|
|
588
625
|
}
|
|
626
|
+
.items-start {
|
|
627
|
+
align-items: flex-start;
|
|
628
|
+
}
|
|
589
629
|
.items-end {
|
|
590
630
|
align-items: flex-end;
|
|
591
631
|
}
|
|
@@ -595,6 +635,9 @@ video {
|
|
|
595
635
|
.justify-center {
|
|
596
636
|
justify-content: center;
|
|
597
637
|
}
|
|
638
|
+
.justify-between {
|
|
639
|
+
justify-content: space-between;
|
|
640
|
+
}
|
|
598
641
|
.gap-0\.5 {
|
|
599
642
|
gap: 0.125rem;
|
|
600
643
|
}
|
|
@@ -628,6 +671,11 @@ video {
|
|
|
628
671
|
margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
|
|
629
672
|
margin-bottom: calc(1rem * var(--tw-space-y-reverse));
|
|
630
673
|
}
|
|
674
|
+
.space-y-6 > :not([hidden]) ~ :not([hidden]) {
|
|
675
|
+
--tw-space-y-reverse: 0;
|
|
676
|
+
margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
|
|
677
|
+
margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
|
|
678
|
+
}
|
|
631
679
|
.overflow-hidden {
|
|
632
680
|
overflow: hidden;
|
|
633
681
|
}
|
|
@@ -637,6 +685,9 @@ video {
|
|
|
637
685
|
.rounded-full {
|
|
638
686
|
border-radius: 9999px;
|
|
639
687
|
}
|
|
688
|
+
.rounded-lg {
|
|
689
|
+
border-radius: 0.5rem;
|
|
690
|
+
}
|
|
640
691
|
.rounded-sm {
|
|
641
692
|
border-radius: 0.125rem;
|
|
642
693
|
}
|
|
@@ -650,9 +701,40 @@ video {
|
|
|
650
701
|
--tw-border-opacity: 1;
|
|
651
702
|
border-color: rgb(229 231 235 / var(--tw-border-opacity, 1));
|
|
652
703
|
}
|
|
704
|
+
.bg-gray-100 {
|
|
705
|
+
--tw-bg-opacity: 1;
|
|
706
|
+
background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
|
|
707
|
+
}
|
|
708
|
+
.bg-gray-200 {
|
|
709
|
+
--tw-bg-opacity: 1;
|
|
710
|
+
background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));
|
|
711
|
+
}
|
|
712
|
+
.bg-white {
|
|
713
|
+
--tw-bg-opacity: 1;
|
|
714
|
+
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
|
715
|
+
}
|
|
716
|
+
.p-4 {
|
|
717
|
+
padding: 1rem;
|
|
718
|
+
}
|
|
719
|
+
.p-6 {
|
|
720
|
+
padding: 1.5rem;
|
|
721
|
+
}
|
|
722
|
+
.p-8 {
|
|
723
|
+
padding: 2rem;
|
|
724
|
+
}
|
|
653
725
|
.pb-2 {
|
|
654
726
|
padding-bottom: 0.5rem;
|
|
655
727
|
}
|
|
728
|
+
.pb-4 {
|
|
729
|
+
padding-bottom: 1rem;
|
|
730
|
+
}
|
|
731
|
+
.pb-6 {
|
|
732
|
+
padding-bottom: 1.5rem;
|
|
733
|
+
}
|
|
734
|
+
.text-2xl {
|
|
735
|
+
font-size: 1.5rem;
|
|
736
|
+
line-height: 2rem;
|
|
737
|
+
}
|
|
656
738
|
.text-sm {
|
|
657
739
|
font-size: 0.875rem;
|
|
658
740
|
line-height: 1.25rem;
|
|
@@ -661,17 +743,36 @@ video {
|
|
|
661
743
|
font-size: 0.75rem;
|
|
662
744
|
line-height: 1rem;
|
|
663
745
|
}
|
|
746
|
+
.font-bold {
|
|
747
|
+
font-weight: 700;
|
|
748
|
+
}
|
|
664
749
|
.font-medium {
|
|
665
750
|
font-weight: 500;
|
|
666
751
|
}
|
|
667
752
|
.font-semibold {
|
|
668
753
|
font-weight: 600;
|
|
669
754
|
}
|
|
755
|
+
.text-gray-600 {
|
|
756
|
+
--tw-text-opacity: 1;
|
|
757
|
+
color: rgb(75 85 99 / var(--tw-text-opacity, 1));
|
|
758
|
+
}
|
|
759
|
+
.opacity-30 {
|
|
760
|
+
opacity: 0.3;
|
|
761
|
+
}
|
|
762
|
+
.shadow-lg {
|
|
763
|
+
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
764
|
+
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
|
765
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
766
|
+
}
|
|
670
767
|
.ring {
|
|
671
768
|
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
672
769
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
673
770
|
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
674
771
|
}
|
|
772
|
+
.blur {
|
|
773
|
+
--tw-blur: blur(8px);
|
|
774
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
775
|
+
}
|
|
675
776
|
.transition {
|
|
676
777
|
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
|
|
677
778
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +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"}
|
|
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;AACxB,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BaseLoaderProps } from './common';
|
|
3
|
+
/**
|
|
4
|
+
* Props for LoaderOverlay component
|
|
5
|
+
*/
|
|
6
|
+
export interface LoaderOverlayProps extends Omit<BaseLoaderProps, 'size' | 'color' | 'speed'> {
|
|
7
|
+
/** Whether the overlay is active/loading */
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
/** The loader component to display */
|
|
10
|
+
loader: ReactNode;
|
|
11
|
+
/** Content to display behind the overlay */
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
/** Position style of the overlay */
|
|
14
|
+
position?: 'fixed' | 'absolute';
|
|
15
|
+
/** Backdrop opacity (0-1) */
|
|
16
|
+
backdropOpacity?: number;
|
|
17
|
+
/** Backdrop color */
|
|
18
|
+
backdropColor?: string;
|
|
19
|
+
/** Apply blur effect to backdrop */
|
|
20
|
+
blur?: boolean;
|
|
21
|
+
/** Z-index of the overlay */
|
|
22
|
+
zIndex?: number;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=overlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../src/types/overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;IAC3F,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,sCAAsC;IACtC,MAAM,EAAE,SAAS,CAAC;IAElB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAEhC,6BAA6B;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,qBAAqB;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,oCAAoC;IACpC,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
package/dist/types/progress.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ import { ProgressLoaderProps } from './common';
|
|
|
5
5
|
export interface ProgressBarProps extends ProgressLoaderProps {
|
|
6
6
|
/** Height of the progress bar */
|
|
7
7
|
height?: number | string;
|
|
8
|
+
/** Enable gradient */
|
|
9
|
+
gradient?: boolean;
|
|
10
|
+
/** Buffer value (0-100) for showing partial loading */
|
|
11
|
+
buffer?: number;
|
|
8
12
|
}
|
|
9
13
|
/**
|
|
10
14
|
* ProgressCircle component props
|
|
@@ -12,6 +16,8 @@ export interface ProgressBarProps extends ProgressLoaderProps {
|
|
|
12
16
|
export interface ProgressCircleProps extends ProgressLoaderProps {
|
|
13
17
|
/** Size of the circle */
|
|
14
18
|
size?: number | string;
|
|
19
|
+
/** Buffer value (0-100) for showing partial loading */
|
|
20
|
+
buffer?: number;
|
|
15
21
|
}
|
|
16
22
|
/**
|
|
17
23
|
* ProgressRing component props
|
|
@@ -21,5 +27,7 @@ export interface ProgressRingProps extends ProgressLoaderProps {
|
|
|
21
27
|
size?: number | string;
|
|
22
28
|
/** Enable gradient */
|
|
23
29
|
gradient?: boolean;
|
|
30
|
+
/** Buffer value (0-100) for showing partial loading */
|
|
31
|
+
buffer?: number;
|
|
24
32
|
}
|
|
25
33
|
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -1 +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;
|
|
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;IACzB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;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;IACnB,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
package/dist/types/skeleton.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export interface SkeletonTextProps extends SkeletonBaseProps {
|
|
|
18
18
|
lines?: number;
|
|
19
19
|
/** Gap between lines */
|
|
20
20
|
gap?: number | string;
|
|
21
|
+
/** Width of the last line (defaults to '80%') */
|
|
22
|
+
lastLineWidth?: number | string;
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* SkeletonAvatar component props
|
|
@@ -68,4 +70,11 @@ export interface SkeletonTableProps extends SkeletonBaseProps {
|
|
|
68
70
|
/** Show table header */
|
|
69
71
|
showHeader?: boolean;
|
|
70
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* SkeletonPage component props
|
|
75
|
+
*/
|
|
76
|
+
export interface SkeletonPageProps extends SkeletonBaseProps {
|
|
77
|
+
/** Page layout variant */
|
|
78
|
+
variant?: 'default' | 'dashboard' | 'article' | 'profile';
|
|
79
|
+
}
|
|
71
80
|
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -1 +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,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;
|
|
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,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,iDAAiD;IACjD,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,mBAAmB;IACnB,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,kBAAkB;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,wBAAwB;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,qBAAqB;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wBAAwB;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,0BAA0B;IAC1B,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;CAC3D"}
|
package/dist/utils/colors.d.ts
CHANGED
|
@@ -17,9 +17,22 @@ export declare function hexToRgb(hex: string): {
|
|
|
17
17
|
/**
|
|
18
18
|
* Get animation duration in CSS format
|
|
19
19
|
*/
|
|
20
|
-
export declare function getAnimationDuration(speed
|
|
20
|
+
export declare function getAnimationDuration(speed?: 'slow' | 'normal' | 'fast' | number): string;
|
|
21
21
|
/**
|
|
22
22
|
* Normalize size value to CSS string
|
|
23
23
|
*/
|
|
24
24
|
export declare function normalizeSize(size?: number | string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Safely parse size to number with fallback
|
|
27
|
+
*/
|
|
28
|
+
export declare function parseSizeToNumber(size: number | string | undefined, fallback: number): number;
|
|
29
|
+
/**
|
|
30
|
+
* Calculate relative luminance of a color (0-1 scale)
|
|
31
|
+
* Used for determining if text should be light or dark for contrast
|
|
32
|
+
*/
|
|
33
|
+
export declare function getColorLuminance(color: string): number;
|
|
34
|
+
/**
|
|
35
|
+
* Get contrast color (black or white) based on background luminance
|
|
36
|
+
*/
|
|
37
|
+
export declare function getContrastColor(backgroundColor: string): string;
|
|
25
38
|
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -1 +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,
|
|
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,GAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAiB,GAAG,MAAM,CAclG;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAK5D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAW7F;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA8BvD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAIhE"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "premium-react-loaders",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Premium, production-ready loading components for React with TypeScript and Tailwind CSS",
|
|
5
5
|
"author": "Ishan Karunaratne",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"homepage": "https://premium-react-loaders.ishansasika.dev",
|
|
7
8
|
"repository": {
|
|
8
9
|
"type": "git",
|
|
9
10
|
"url": "https://github.com/ishansasika/premium-react-loaders"
|
|
@@ -58,6 +59,11 @@
|
|
|
58
59
|
"build-storybook": "storybook build",
|
|
59
60
|
"preview-storybook": "serve storybook-static",
|
|
60
61
|
"deploy:storybook": "npm run build-storybook && firebase deploy",
|
|
62
|
+
"demo": "cd demo && npm run dev",
|
|
63
|
+
"demo:build": "cd demo && npm run build",
|
|
64
|
+
"demo:preview": "cd demo && npm run preview",
|
|
65
|
+
"demo:deploy": "cd demo && npm run deploy",
|
|
66
|
+
"deploy:all": "npm run build-storybook && cd demo && npm run build && cd .. && firebase deploy",
|
|
61
67
|
"prepublishOnly": "npm run build"
|
|
62
68
|
},
|
|
63
69
|
"peerDependencies": {
|