@sikka/hawa 0.1.6-next → 0.1.7-beta
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/dist/index.css +208 -25
- package/dist/index.d.mts +33 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +202 -16
- package/dist/index.mjs +137 -22
- package/package.json +4 -2
package/dist/index.css
CHANGED
|
@@ -437,28 +437,6 @@ video {
|
|
|
437
437
|
--input: 240 3.7% 15.9%;
|
|
438
438
|
--ring: 240 4.9% 83.9%;
|
|
439
439
|
}
|
|
440
|
-
.link::after {
|
|
441
|
-
content: url("data:image/svg+xml,%3Csvg stroke='%234c37eb' fill='none' stroke-width='2' viewBox='0 0 24 24' aria-hidden='true' height='1em' width='1em' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14'%3E%3C/path%3E%3C/svg%3E");
|
|
442
|
-
display: inline-block;
|
|
443
|
-
margin-left: 0.25em;
|
|
444
|
-
margin-right: 0.25em;
|
|
445
|
-
width: 0.75em;
|
|
446
|
-
vertical-align: middle;
|
|
447
|
-
color: hsl(var(--primary));
|
|
448
|
-
}
|
|
449
|
-
.link {
|
|
450
|
-
color: hsl(var(--primary));
|
|
451
|
-
}
|
|
452
|
-
.link:hover {
|
|
453
|
-
text-decoration: underline;
|
|
454
|
-
color: var(--button-primary-700);
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
input[type="number"]::-webkit-inner-spin-button,
|
|
458
|
-
input[type="number"]::-webkit-outer-spin-button {
|
|
459
|
-
-webkit-appearance: none;
|
|
460
|
-
margin: 0;
|
|
461
|
-
}
|
|
462
440
|
* {
|
|
463
441
|
border-color: hsl(var(--border));
|
|
464
442
|
}
|
|
@@ -567,9 +545,37 @@ video {
|
|
|
567
545
|
--tw-backdrop-saturate: ;
|
|
568
546
|
--tw-backdrop-sepia: ;
|
|
569
547
|
}
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
548
|
+
.link::after {
|
|
549
|
+
content: url("data:image/svg+xml,%3Csvg stroke='%234c37eb' fill='none' stroke-width='2' viewBox='0 0 24 24' aria-hidden='true' height='1em' width='1em' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14'%3E%3C/path%3E%3C/svg%3E");
|
|
550
|
+
display: inline-block;
|
|
551
|
+
margin-left: 0.25em;
|
|
552
|
+
margin-right: 0.25em;
|
|
553
|
+
width: 0.75em;
|
|
554
|
+
vertical-align: middle;
|
|
555
|
+
color: hsl(var(--primary));
|
|
556
|
+
}
|
|
557
|
+
.link {
|
|
558
|
+
color: hsl(var(--primary));
|
|
559
|
+
}
|
|
560
|
+
.link:hover {
|
|
561
|
+
text-decoration: underline;
|
|
562
|
+
color: var(--button-primary-700);
|
|
563
|
+
}
|
|
564
|
+
.inline-code {
|
|
565
|
+
font-size: 0.75rem;
|
|
566
|
+
width: -moz-fit-content;
|
|
567
|
+
width: fit-content;
|
|
568
|
+
border-radius: var(--radius);
|
|
569
|
+
padding: 0.25rem 0.375rem;
|
|
570
|
+
border: #d1d5db 1px solid;
|
|
571
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
572
|
+
Liberation Mono, Courier New, monospace;
|
|
573
|
+
}
|
|
574
|
+
input[type="number"]::-webkit-inner-spin-button,
|
|
575
|
+
input[type="number"]::-webkit-outer-spin-button {
|
|
576
|
+
-webkit-appearance: none;
|
|
577
|
+
margin: 0;
|
|
578
|
+
}
|
|
573
579
|
.clickable-link {
|
|
574
580
|
cursor: pointer;
|
|
575
581
|
color: hsl(var(--primary) / 0.8);
|
|
@@ -596,12 +602,30 @@ video {
|
|
|
596
602
|
white-space: nowrap;
|
|
597
603
|
border-width: 0;
|
|
598
604
|
}
|
|
605
|
+
.hawa-absolute {
|
|
606
|
+
position: absolute;
|
|
607
|
+
}
|
|
599
608
|
.hawa-relative {
|
|
600
609
|
position: relative;
|
|
601
610
|
}
|
|
611
|
+
.hawa-inset-0 {
|
|
612
|
+
inset: 0px;
|
|
613
|
+
}
|
|
614
|
+
.hawa-bottom-2 {
|
|
615
|
+
bottom: 0.5rem;
|
|
616
|
+
}
|
|
617
|
+
.hawa-right-2 {
|
|
618
|
+
right: 0.5rem;
|
|
619
|
+
}
|
|
620
|
+
.hawa-z-10 {
|
|
621
|
+
z-index: 10;
|
|
622
|
+
}
|
|
602
623
|
.hawa-m-0 {
|
|
603
624
|
margin: 0px;
|
|
604
625
|
}
|
|
626
|
+
.hawa-mb-4 {
|
|
627
|
+
margin-bottom: 1rem;
|
|
628
|
+
}
|
|
605
629
|
.hawa-ml-2 {
|
|
606
630
|
margin-left: 0.5rem;
|
|
607
631
|
}
|
|
@@ -614,6 +638,9 @@ video {
|
|
|
614
638
|
.hawa-inline-flex {
|
|
615
639
|
display: inline-flex;
|
|
616
640
|
}
|
|
641
|
+
.hawa-h-1 {
|
|
642
|
+
height: 0.25rem;
|
|
643
|
+
}
|
|
617
644
|
.hawa-h-10 {
|
|
618
645
|
height: 2.5rem;
|
|
619
646
|
}
|
|
@@ -623,12 +650,27 @@ video {
|
|
|
623
650
|
.hawa-h-14 {
|
|
624
651
|
height: 3.5rem;
|
|
625
652
|
}
|
|
653
|
+
.hawa-h-2 {
|
|
654
|
+
height: 0.5rem;
|
|
655
|
+
}
|
|
656
|
+
.hawa-h-24 {
|
|
657
|
+
height: 6rem;
|
|
658
|
+
}
|
|
626
659
|
.hawa-h-4 {
|
|
627
660
|
height: 1rem;
|
|
628
661
|
}
|
|
662
|
+
.hawa-h-6 {
|
|
663
|
+
height: 1.5rem;
|
|
664
|
+
}
|
|
665
|
+
.hawa-h-64 {
|
|
666
|
+
height: 16rem;
|
|
667
|
+
}
|
|
629
668
|
.hawa-h-7 {
|
|
630
669
|
height: 1.75rem;
|
|
631
670
|
}
|
|
671
|
+
.hawa-h-8 {
|
|
672
|
+
height: 2rem;
|
|
673
|
+
}
|
|
632
674
|
.hawa-h-9 {
|
|
633
675
|
height: 2.25rem;
|
|
634
676
|
}
|
|
@@ -636,18 +678,33 @@ video {
|
|
|
636
678
|
height: -moz-fit-content;
|
|
637
679
|
height: fit-content;
|
|
638
680
|
}
|
|
681
|
+
.hawa-h-full {
|
|
682
|
+
height: 100%;
|
|
683
|
+
}
|
|
639
684
|
.hawa-min-h-screen {
|
|
640
685
|
min-height: 100vh;
|
|
641
686
|
}
|
|
687
|
+
.hawa-w-1 {
|
|
688
|
+
width: 0.25rem;
|
|
689
|
+
}
|
|
642
690
|
.hawa-w-10 {
|
|
643
691
|
width: 2.5rem;
|
|
644
692
|
}
|
|
693
|
+
.hawa-w-14 {
|
|
694
|
+
width: 3.5rem;
|
|
695
|
+
}
|
|
696
|
+
.hawa-w-2 {
|
|
697
|
+
width: 0.5rem;
|
|
698
|
+
}
|
|
645
699
|
.hawa-w-24 {
|
|
646
700
|
width: 6rem;
|
|
647
701
|
}
|
|
648
702
|
.hawa-w-4 {
|
|
649
703
|
width: 1rem;
|
|
650
704
|
}
|
|
705
|
+
.hawa-w-6 {
|
|
706
|
+
width: 1.5rem;
|
|
707
|
+
}
|
|
651
708
|
.hawa-w-7 {
|
|
652
709
|
width: 1.75rem;
|
|
653
710
|
}
|
|
@@ -673,6 +730,30 @@ video {
|
|
|
673
730
|
.hawa-flex-1 {
|
|
674
731
|
flex: 1 1 0%;
|
|
675
732
|
}
|
|
733
|
+
@keyframes hawa-bounce {
|
|
734
|
+
|
|
735
|
+
0%, 100% {
|
|
736
|
+
transform: translateY(-25%);
|
|
737
|
+
animation-timing-function: cubic-bezier(0.8,0,1,1);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
50% {
|
|
741
|
+
transform: none;
|
|
742
|
+
animation-timing-function: cubic-bezier(0,0,0.2,1);
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
.hawa-animate-bounce {
|
|
746
|
+
animation: hawa-bounce 1s infinite;
|
|
747
|
+
}
|
|
748
|
+
@keyframes hawa-spin {
|
|
749
|
+
|
|
750
|
+
to {
|
|
751
|
+
transform: rotate(360deg);
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
.hawa-animate-spin {
|
|
755
|
+
animation: hawa-spin 1s linear infinite;
|
|
756
|
+
}
|
|
676
757
|
.hawa-cursor-pointer {
|
|
677
758
|
cursor: pointer;
|
|
678
759
|
}
|
|
@@ -699,15 +780,33 @@ video {
|
|
|
699
780
|
.hawa-justify-between {
|
|
700
781
|
justify-content: space-between;
|
|
701
782
|
}
|
|
783
|
+
.hawa-gap-1 {
|
|
784
|
+
gap: 0.25rem;
|
|
785
|
+
}
|
|
702
786
|
.hawa-gap-2 {
|
|
703
787
|
gap: 0.5rem;
|
|
704
788
|
}
|
|
705
789
|
.hawa-gap-4 {
|
|
706
790
|
gap: 1rem;
|
|
707
791
|
}
|
|
792
|
+
.hawa-gap-6 {
|
|
793
|
+
gap: 1.5rem;
|
|
794
|
+
}
|
|
795
|
+
.hawa-gap-x-3 {
|
|
796
|
+
-moz-column-gap: 0.75rem;
|
|
797
|
+
column-gap: 0.75rem;
|
|
798
|
+
}
|
|
799
|
+
.hawa-divide-y-2 > :not([hidden]) ~ :not([hidden]) {
|
|
800
|
+
--tw-divide-y-reverse: 0;
|
|
801
|
+
border-top-width: calc(2px * calc(1 - var(--tw-divide-y-reverse)));
|
|
802
|
+
border-bottom-width: calc(2px * var(--tw-divide-y-reverse));
|
|
803
|
+
}
|
|
708
804
|
.hawa-rounded {
|
|
709
805
|
border-radius: var(--radius);
|
|
710
806
|
}
|
|
807
|
+
.hawa-rounded-full {
|
|
808
|
+
border-radius: 9999px;
|
|
809
|
+
}
|
|
711
810
|
.hawa-rounded-md {
|
|
712
811
|
border-radius: calc(var(--radius) - 2px);
|
|
713
812
|
}
|
|
@@ -732,6 +831,10 @@ video {
|
|
|
732
831
|
.hawa-bg-background {
|
|
733
832
|
background-color: hsl(var(--background));
|
|
734
833
|
}
|
|
834
|
+
.hawa-bg-black {
|
|
835
|
+
--tw-bg-opacity: 1;
|
|
836
|
+
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
|
|
837
|
+
}
|
|
735
838
|
.hawa-bg-destructive {
|
|
736
839
|
--tw-bg-opacity: 1;
|
|
737
840
|
background-color: hsl(var(--destructive) / var(--tw-bg-opacity));
|
|
@@ -748,6 +851,18 @@ video {
|
|
|
748
851
|
.hawa-bg-secondary {
|
|
749
852
|
background-color: hsl(var(--secondary));
|
|
750
853
|
}
|
|
854
|
+
.hawa-bg-cover {
|
|
855
|
+
background-size: cover;
|
|
856
|
+
}
|
|
857
|
+
.hawa-bg-center {
|
|
858
|
+
background-position: center;
|
|
859
|
+
}
|
|
860
|
+
.hawa-fill-primary {
|
|
861
|
+
fill: hsl(var(--primary));
|
|
862
|
+
}
|
|
863
|
+
.hawa-fill-primary\/20 {
|
|
864
|
+
fill: hsl(var(--primary) / 0.2);
|
|
865
|
+
}
|
|
751
866
|
.hawa-p-0 {
|
|
752
867
|
padding: 0px;
|
|
753
868
|
}
|
|
@@ -831,9 +946,19 @@ video {
|
|
|
831
946
|
.hawa-text-secondary-foreground {
|
|
832
947
|
color: hsl(var(--secondary-foreground));
|
|
833
948
|
}
|
|
949
|
+
.hawa-text-white {
|
|
950
|
+
--tw-text-opacity: 1;
|
|
951
|
+
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
952
|
+
}
|
|
834
953
|
.hawa-underline-offset-4 {
|
|
835
954
|
text-underline-offset: 4px;
|
|
836
955
|
}
|
|
956
|
+
.hawa-opacity-0 {
|
|
957
|
+
opacity: 0;
|
|
958
|
+
}
|
|
959
|
+
.hawa-opacity-100 {
|
|
960
|
+
opacity: 1;
|
|
961
|
+
}
|
|
837
962
|
.hawa-opacity-50 {
|
|
838
963
|
opacity: 0.5;
|
|
839
964
|
}
|
|
@@ -850,6 +975,24 @@ video {
|
|
|
850
975
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
851
976
|
transition-duration: 150ms;
|
|
852
977
|
}
|
|
978
|
+
.hawa-delay-100 {
|
|
979
|
+
transition-delay: 100ms;
|
|
980
|
+
}
|
|
981
|
+
.hawa-delay-200 {
|
|
982
|
+
transition-delay: 200ms;
|
|
983
|
+
}
|
|
984
|
+
.hawa-delay-300 {
|
|
985
|
+
transition-delay: 300ms;
|
|
986
|
+
}
|
|
987
|
+
.hawa-duration-1000 {
|
|
988
|
+
transition-duration: 1000ms;
|
|
989
|
+
}
|
|
990
|
+
.hawa-duration-200 {
|
|
991
|
+
transition-duration: 200ms;
|
|
992
|
+
}
|
|
993
|
+
.hawa-duration-500 {
|
|
994
|
+
transition-duration: 500ms;
|
|
995
|
+
}
|
|
853
996
|
@keyframes enter {
|
|
854
997
|
|
|
855
998
|
from {
|
|
@@ -864,6 +1007,39 @@ video {
|
|
|
864
1007
|
transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));
|
|
865
1008
|
}
|
|
866
1009
|
}
|
|
1010
|
+
.hawa-animate-in {
|
|
1011
|
+
animation-name: enter;
|
|
1012
|
+
animation-duration: 150ms;
|
|
1013
|
+
--tw-enter-opacity: initial;
|
|
1014
|
+
--tw-enter-scale: initial;
|
|
1015
|
+
--tw-enter-rotate: initial;
|
|
1016
|
+
--tw-enter-translate-x: initial;
|
|
1017
|
+
--tw-enter-translate-y: initial;
|
|
1018
|
+
}
|
|
1019
|
+
.hawa-fade-in {
|
|
1020
|
+
--tw-enter-opacity: 0;
|
|
1021
|
+
}
|
|
1022
|
+
.hawa-duration-1000 {
|
|
1023
|
+
animation-duration: 1000ms;
|
|
1024
|
+
}
|
|
1025
|
+
.hawa-duration-200 {
|
|
1026
|
+
animation-duration: 200ms;
|
|
1027
|
+
}
|
|
1028
|
+
.hawa-duration-500 {
|
|
1029
|
+
animation-duration: 500ms;
|
|
1030
|
+
}
|
|
1031
|
+
.hawa-delay-100 {
|
|
1032
|
+
animation-delay: 100ms;
|
|
1033
|
+
}
|
|
1034
|
+
.hawa-delay-200 {
|
|
1035
|
+
animation-delay: 200ms;
|
|
1036
|
+
}
|
|
1037
|
+
.hawa-delay-300 {
|
|
1038
|
+
animation-delay: 300ms;
|
|
1039
|
+
}
|
|
1040
|
+
.hawa-repeat-infinite {
|
|
1041
|
+
animation-iteration-count: infinite;
|
|
1042
|
+
}
|
|
867
1043
|
body {
|
|
868
1044
|
font-family: "IBM Plex Sans Arabic", sans-serif;
|
|
869
1045
|
}
|
|
@@ -888,6 +1064,10 @@ body {
|
|
|
888
1064
|
.hover\:hawa-underline:hover {
|
|
889
1065
|
text-decoration-line: underline;
|
|
890
1066
|
}
|
|
1067
|
+
.hover\:hawa-drop-shadow-2xl:hover {
|
|
1068
|
+
--tw-drop-shadow: drop-shadow(0 25px 25px rgb(0 0 0 / 0.15));
|
|
1069
|
+
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);
|
|
1070
|
+
}
|
|
891
1071
|
.focus-visible\:hawa-outline-none:focus-visible {
|
|
892
1072
|
outline: 2px solid transparent;
|
|
893
1073
|
outline-offset: 2px;
|
|
@@ -925,6 +1105,9 @@ body {
|
|
|
925
1105
|
.disabled\:hawa-opacity-50:disabled {
|
|
926
1106
|
opacity: 0.5;
|
|
927
1107
|
}
|
|
1108
|
+
.hawa-group:hover .group-hover\:hawa-opacity-100 {
|
|
1109
|
+
opacity: 1;
|
|
1110
|
+
}
|
|
928
1111
|
:is(.hawa-dark .dark\:hawa-bg-black) {
|
|
929
1112
|
--tw-bg-opacity: 1;
|
|
930
1113
|
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import { FC } from 'react';
|
|
3
4
|
import { VariantProps } from 'class-variance-authority';
|
|
4
5
|
|
|
5
6
|
declare const buttonVariants: (props?: ({
|
|
@@ -12,4 +13,35 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Var
|
|
|
12
13
|
}
|
|
13
14
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
17
|
+
clickable?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
22
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
23
|
+
declare const CardContent: React.ForwardRefExoticComponent<{
|
|
24
|
+
headless?: boolean | undefined;
|
|
25
|
+
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
|
|
28
|
+
type ImageCardTypes = {
|
|
29
|
+
children: any;
|
|
30
|
+
align?: any;
|
|
31
|
+
bottomElement?: any;
|
|
32
|
+
inCardActions?: any;
|
|
33
|
+
cardImage?: string;
|
|
34
|
+
title?: string;
|
|
35
|
+
subtitle?: string;
|
|
36
|
+
blank?: boolean;
|
|
37
|
+
};
|
|
38
|
+
declare const ActionCard: FC<ImageCardTypes>;
|
|
39
|
+
|
|
40
|
+
type LoadingTypes = {
|
|
41
|
+
size?: "button" | "xs" | "sm" | "normal" | "lg" | "xl";
|
|
42
|
+
design?: "spinner" | "dots-bounce" | "dots-pulse" | "pulse" | "spinner-dots";
|
|
43
|
+
color?: any;
|
|
44
|
+
};
|
|
45
|
+
declare const Loading: FC<LoadingTypes>;
|
|
46
|
+
|
|
47
|
+
export { ActionCard, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Loading, buttonVariants };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import { FC } from 'react';
|
|
3
4
|
import { VariantProps } from 'class-variance-authority';
|
|
4
5
|
|
|
5
6
|
declare const buttonVariants: (props?: ({
|
|
@@ -12,4 +13,35 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Var
|
|
|
12
13
|
}
|
|
13
14
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
17
|
+
clickable?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
22
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
23
|
+
declare const CardContent: React.ForwardRefExoticComponent<{
|
|
24
|
+
headless?: boolean | undefined;
|
|
25
|
+
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
|
|
28
|
+
type ImageCardTypes = {
|
|
29
|
+
children: any;
|
|
30
|
+
align?: any;
|
|
31
|
+
bottomElement?: any;
|
|
32
|
+
inCardActions?: any;
|
|
33
|
+
cardImage?: string;
|
|
34
|
+
title?: string;
|
|
35
|
+
subtitle?: string;
|
|
36
|
+
blank?: boolean;
|
|
37
|
+
};
|
|
38
|
+
declare const ActionCard: FC<ImageCardTypes>;
|
|
39
|
+
|
|
40
|
+
type LoadingTypes = {
|
|
41
|
+
size?: "button" | "xs" | "sm" | "normal" | "lg" | "xl";
|
|
42
|
+
design?: "spinner" | "dots-bounce" | "dots-pulse" | "pulse" | "spinner-dots";
|
|
43
|
+
color?: any;
|
|
44
|
+
};
|
|
45
|
+
declare const Loading: FC<LoadingTypes>;
|
|
46
|
+
|
|
47
|
+
export { ActionCard, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Loading, buttonVariants };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
function _array_like_to_array(arr, len) {
|
|
3
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
4
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5
|
+
return arr2;
|
|
6
|
+
}
|
|
7
|
+
function _array_with_holes(arr) {
|
|
8
|
+
if (Array.isArray(arr)) return arr;
|
|
9
|
+
}
|
|
2
10
|
function _define_property(obj, key, value) {
|
|
3
11
|
if (key in obj) {
|
|
4
12
|
Object.defineProperty(obj, key, {
|
|
@@ -12,6 +20,33 @@ function _define_property(obj, key, value) {
|
|
|
12
20
|
}
|
|
13
21
|
return obj;
|
|
14
22
|
}
|
|
23
|
+
function _iterable_to_array_limit(arr, i) {
|
|
24
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
25
|
+
if (_i == null) return;
|
|
26
|
+
var _arr = [];
|
|
27
|
+
var _n = true;
|
|
28
|
+
var _d = false;
|
|
29
|
+
var _s, _e;
|
|
30
|
+
try {
|
|
31
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
32
|
+
_arr.push(_s.value);
|
|
33
|
+
if (i && _arr.length === i) break;
|
|
34
|
+
}
|
|
35
|
+
} catch (err) {
|
|
36
|
+
_d = true;
|
|
37
|
+
_e = err;
|
|
38
|
+
} finally{
|
|
39
|
+
try {
|
|
40
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
41
|
+
} finally{
|
|
42
|
+
if (_d) throw _e;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return _arr;
|
|
46
|
+
}
|
|
47
|
+
function _non_iterable_rest() {
|
|
48
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
49
|
+
}
|
|
15
50
|
function _object_spread(target) {
|
|
16
51
|
for(var i = 1; i < arguments.length; i++){
|
|
17
52
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -54,6 +89,17 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
54
89
|
}
|
|
55
90
|
return target;
|
|
56
91
|
}
|
|
92
|
+
function _sliced_to_array(arr, i) {
|
|
93
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
94
|
+
}
|
|
95
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
96
|
+
if (!o) return;
|
|
97
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
98
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
99
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
100
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
101
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
102
|
+
}
|
|
57
103
|
var __create = Object.create;
|
|
58
104
|
var __defProp = Object.defineProperty;
|
|
59
105
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -115,9 +161,33 @@ var __toCommonJS = function(mod) {
|
|
|
115
161
|
// components/index.tsx
|
|
116
162
|
var components_exports = {};
|
|
117
163
|
__export(components_exports, {
|
|
164
|
+
ActionCard: function() {
|
|
165
|
+
return ActionCard;
|
|
166
|
+
},
|
|
118
167
|
Button: function() {
|
|
119
168
|
return Button;
|
|
120
169
|
},
|
|
170
|
+
Card: function() {
|
|
171
|
+
return Card;
|
|
172
|
+
},
|
|
173
|
+
CardContent: function() {
|
|
174
|
+
return CardContent;
|
|
175
|
+
},
|
|
176
|
+
CardDescription: function() {
|
|
177
|
+
return CardDescription;
|
|
178
|
+
},
|
|
179
|
+
CardFooter: function() {
|
|
180
|
+
return CardFooter;
|
|
181
|
+
},
|
|
182
|
+
CardHeader: function() {
|
|
183
|
+
return CardHeader;
|
|
184
|
+
},
|
|
185
|
+
CardTitle: function() {
|
|
186
|
+
return CardTitle;
|
|
187
|
+
},
|
|
188
|
+
Loading: function() {
|
|
189
|
+
return Loading;
|
|
190
|
+
},
|
|
121
191
|
buttonVariants: function() {
|
|
122
192
|
return buttonVariants;
|
|
123
193
|
}
|
|
@@ -145,42 +215,42 @@ var Loading = function(_param) {
|
|
|
145
215
|
"color"
|
|
146
216
|
]);
|
|
147
217
|
var sizeStyles = {
|
|
148
|
-
button: "h-4 w-4",
|
|
149
|
-
xs: "h-1 w-1",
|
|
150
|
-
sm: "h-6 w-6",
|
|
151
|
-
normal: "h-8 w-8",
|
|
152
|
-
lg: "h-14 w-14",
|
|
153
|
-
xl: "h-24 w-24"
|
|
218
|
+
button: "hawa-h-4 hawa-w-4",
|
|
219
|
+
xs: "hawa-h-1 hawa-w-1",
|
|
220
|
+
sm: "hawa-h-6 hawa-w-6",
|
|
221
|
+
normal: "hawa-h-8 hawa-w-8",
|
|
222
|
+
lg: "hawa-h-14 hawa-w-14",
|
|
223
|
+
xl: "hawa-h-24 hawa-w-24"
|
|
154
224
|
};
|
|
155
225
|
var animationStyles = {
|
|
156
|
-
pulse: "animate-in fade-in duration-1000",
|
|
157
|
-
bounce: "animate-bounce"
|
|
226
|
+
pulse: "hawa-animate-in hawa-fade-in hawa-duration-1000",
|
|
227
|
+
bounce: "hawa-animate-bounce"
|
|
158
228
|
};
|
|
159
229
|
switch(design.split("-")[0]){
|
|
160
230
|
case "dots":
|
|
161
231
|
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
162
|
-
className: "flex flex-row gap-2"
|
|
232
|
+
className: "hawa-flex hawa-flex-row hawa-gap-2"
|
|
163
233
|
}, /* @__PURE__ */ import_react.default.createElement("div", {
|
|
164
|
-
className: (0, import_clsx2.default)("animate-bounce rounded-full delay-100 repeat-infinite", size === "button" ? "h-2 w-2" : sizeStyles[size], animationStyles[design.split("-")[1]], color ? color : "bg-primary")
|
|
234
|
+
className: (0, import_clsx2.default)("hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite", size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size], animationStyles[design.split("-")[1]], color ? color : "hawa-bg-primary")
|
|
165
235
|
}), /* @__PURE__ */ import_react.default.createElement("div", {
|
|
166
|
-
className: (0, import_clsx2.default)("animate-bounce rounded-full delay-200 repeat-infinite", size === "button" ? "h-2 w-2" : sizeStyles[size], animationStyles[design.split("-")[1]], color ? color : "bg-primary")
|
|
236
|
+
className: (0, import_clsx2.default)("hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite", size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size], animationStyles[design.split("-")[1]], color ? color : "hawa-bg-primary")
|
|
167
237
|
}), /* @__PURE__ */ import_react.default.createElement("div", {
|
|
168
|
-
className: (0, import_clsx2.default)("animate-bounce rounded-full delay-300 repeat-infinite", size === "button" ? "h-2 w-2" : sizeStyles[size], animationStyles[design.split("-")[1]], color ? color : "bg-primary")
|
|
238
|
+
className: (0, import_clsx2.default)("hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite", size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size], animationStyles[design.split("-")[1]], color ? color : "hawa-bg-primary")
|
|
169
239
|
}));
|
|
170
240
|
default:
|
|
171
241
|
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
172
|
-
className: "flex flex-row gap-x-3"
|
|
242
|
+
className: "hawa-flex hawa-flex-row hawa-gap-x-3"
|
|
173
243
|
}, /* @__PURE__ */ import_react.default.createElement("div", {
|
|
174
244
|
"aria-label": "Loading...",
|
|
175
245
|
role: "status"
|
|
176
246
|
}, /* @__PURE__ */ import_react.default.createElement("svg", {
|
|
177
|
-
className: (0, import_clsx2.default)(sizeStyles[size], "animate-spin"),
|
|
247
|
+
className: (0, import_clsx2.default)(sizeStyles[size], "hawa-animate-spin"),
|
|
178
248
|
viewBox: "3 3 18 18"
|
|
179
249
|
}, /* @__PURE__ */ import_react.default.createElement("path", {
|
|
180
|
-
className: "fill-primary/20",
|
|
250
|
+
className: "hawa-fill-primary/20",
|
|
181
251
|
d: "M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z"
|
|
182
252
|
}), /* @__PURE__ */ import_react.default.createElement("path", {
|
|
183
|
-
className: color ? color : "fill-primary",
|
|
253
|
+
className: color ? color : "hawa-fill-primary",
|
|
184
254
|
d: "M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z"
|
|
185
255
|
}))));
|
|
186
256
|
}
|
|
@@ -239,8 +309,124 @@ var Button = React2.forwardRef(function(_param, ref) {
|
|
|
239
309
|
}) : children);
|
|
240
310
|
});
|
|
241
311
|
Button.displayName = "Button";
|
|
312
|
+
// components/elements/Card.tsx
|
|
313
|
+
var React3 = __toESM(require("react"));
|
|
314
|
+
var Card = React3.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
315
|
+
var className = _param.className, _param_clickable = _param.clickable, clickable = _param_clickable === void 0 ? false : _param_clickable, props = _object_without_properties(_param, [
|
|
316
|
+
"className",
|
|
317
|
+
"clickable"
|
|
318
|
+
]);
|
|
319
|
+
return React3.createElement("div", _object_spread({
|
|
320
|
+
ref: ref,
|
|
321
|
+
className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", clickable && "cursor-pointer transition-all hover:drop-shadow-md dark:hover:shadow-dark", className)
|
|
322
|
+
}, props));
|
|
323
|
+
});
|
|
324
|
+
Card.displayName = "Card";
|
|
325
|
+
var CardHeader = React3.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
326
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
327
|
+
"className"
|
|
328
|
+
]);
|
|
329
|
+
return React3.createElement("div", _object_spread({
|
|
330
|
+
ref: ref,
|
|
331
|
+
className: cn("flex flex-col space-y-1.5 p-6", className)
|
|
332
|
+
}, props));
|
|
333
|
+
});
|
|
334
|
+
CardHeader.displayName = "CardHeader";
|
|
335
|
+
var CardTitle = React3.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
336
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
337
|
+
"className"
|
|
338
|
+
]);
|
|
339
|
+
return React3.createElement("h3", _object_spread({
|
|
340
|
+
ref: ref,
|
|
341
|
+
className: cn("text-2xl font-semibold leading-none tracking-tight", className)
|
|
342
|
+
}, props));
|
|
343
|
+
});
|
|
344
|
+
CardTitle.displayName = "CardTitle";
|
|
345
|
+
var CardDescription = React3.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
346
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
347
|
+
"className"
|
|
348
|
+
]);
|
|
349
|
+
return React3.createElement("p", _object_spread({
|
|
350
|
+
ref: ref,
|
|
351
|
+
className: cn("text-sm text-muted-foreground", className)
|
|
352
|
+
}, props));
|
|
353
|
+
});
|
|
354
|
+
CardDescription.displayName = "CardDescription";
|
|
355
|
+
var CardContent = React3.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
356
|
+
var headless = _param.headless, className = _param.className, props = _object_without_properties(_param, [
|
|
357
|
+
"headless",
|
|
358
|
+
"className"
|
|
359
|
+
]);
|
|
360
|
+
return React3.createElement("div", _object_spread({
|
|
361
|
+
ref: ref,
|
|
362
|
+
className: cn("p-6", headless ? "pt-6" : "pt-0", className)
|
|
363
|
+
}, props));
|
|
364
|
+
});
|
|
365
|
+
CardContent.displayName = "CardContent";
|
|
366
|
+
var CardFooter = React3.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
367
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
368
|
+
"className"
|
|
369
|
+
]);
|
|
370
|
+
return React3.createElement("div", _object_spread({
|
|
371
|
+
ref: ref,
|
|
372
|
+
className: cn("flex items-center p-6 pt-0", className)
|
|
373
|
+
}, props));
|
|
374
|
+
});
|
|
375
|
+
CardFooter.displayName = "CardFooter";
|
|
376
|
+
// components/elements/ActionCard.tsx
|
|
377
|
+
var import_react2 = __toESM(require("react"));
|
|
378
|
+
var ActionCard = function(props) {
|
|
379
|
+
var _ref = _sliced_to_array((0, import_react2.useState)(false), 2), hovered = _ref[0], setHovered = _ref[1];
|
|
380
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
381
|
+
className: "hawa-flex hawa-h-full hawa-w-full hawa-flex-col hawa-gap-1"
|
|
382
|
+
}, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
383
|
+
className: "hawa-group hawa-relative hawa-h-full hawa-w-full hawa-rounded hawa-border hawa-bg-background hawa-bg-cover hawa-bg-center hawa-transition-all hawa-duration-500 hover:hawa-drop-shadow-2xl",
|
|
384
|
+
style: {
|
|
385
|
+
backgroundImage: "url(".concat(props.blank ? "" : props.cardImage, ")")
|
|
386
|
+
},
|
|
387
|
+
onMouseEnter: function() {
|
|
388
|
+
return setHovered(true);
|
|
389
|
+
},
|
|
390
|
+
onMouseLeave: function() {
|
|
391
|
+
return setHovered(false);
|
|
392
|
+
}
|
|
393
|
+
}, props.blank ? /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
394
|
+
className: "hawa-flex hawa-h-full hawa-flex-col hawa-items-center hawa-justify-center "
|
|
395
|
+
}, /* @__PURE__ */ import_react2.default.createElement("svg", {
|
|
396
|
+
className: "hawa-h-10 hawa-w-10 hawa-text-foreground",
|
|
397
|
+
stroke: "currentColor",
|
|
398
|
+
fill: "currentColor",
|
|
399
|
+
"stroke-width": "0",
|
|
400
|
+
viewBox: "0 0 24 24",
|
|
401
|
+
height: "1em",
|
|
402
|
+
width: "1em",
|
|
403
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
404
|
+
}, /* @__PURE__ */ import_react2.default.createElement("path", {
|
|
405
|
+
d: "M19 11h-6V5h-2v6H5v2h6v6h2v-6h6z"
|
|
406
|
+
}))) : /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
407
|
+
className: "hawa-absolute hawa-inset-0 hawa-rounded hawa-bg-black hawa-opacity-50"
|
|
408
|
+
}), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
409
|
+
className: "hawa-absolute hawa-bottom-2 hawa-right-2 hawa-z-10 hawa-opacity-0 hawa-transition-all hawa-duration-200 group-hover:hawa-opacity-100"
|
|
410
|
+
}, props.inCardActions), !props.blank && /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
411
|
+
className: "hawa-relative hawa-p-4"
|
|
412
|
+
}, /* @__PURE__ */ import_react2.default.createElement("h1", {
|
|
413
|
+
className: "hawa-text-white"
|
|
414
|
+
}, props.title), /* @__PURE__ */ import_react2.default.createElement("p", {
|
|
415
|
+
className: "hawa-text-white"
|
|
416
|
+
}, props.subtitle))), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
417
|
+
className: "hawa-flex hawa-flex-row hawa-justify-between hawa-text-sm hawa-transition-all hawa-duration-200 ".concat(hovered ? "hawa-opacity-100" : "hawa-opacity-0")
|
|
418
|
+
}, props.bottomElement));
|
|
419
|
+
};
|
|
242
420
|
// Annotate the CommonJS export names for ESM import in node:
|
|
243
421
|
0 && (module.exports = {
|
|
422
|
+
ActionCard: ActionCard,
|
|
244
423
|
Button: Button,
|
|
424
|
+
Card: Card,
|
|
425
|
+
CardContent: CardContent,
|
|
426
|
+
CardDescription: CardDescription,
|
|
427
|
+
CardFooter: CardFooter,
|
|
428
|
+
CardHeader: CardHeader,
|
|
429
|
+
CardTitle: CardTitle,
|
|
430
|
+
Loading: Loading,
|
|
245
431
|
buttonVariants: buttonVariants
|
|
246
432
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -19,68 +19,68 @@ var Loading = ({
|
|
|
19
19
|
...props
|
|
20
20
|
}) => {
|
|
21
21
|
let sizeStyles = {
|
|
22
|
-
button: "h-4 w-4",
|
|
23
|
-
xs: "h-1 w-1",
|
|
24
|
-
sm: "h-6 w-6",
|
|
25
|
-
normal: "h-8 w-8",
|
|
26
|
-
lg: "h-14 w-14",
|
|
27
|
-
xl: "h-24 w-24"
|
|
22
|
+
button: "hawa-h-4 hawa-w-4",
|
|
23
|
+
xs: "hawa-h-1 hawa-w-1",
|
|
24
|
+
sm: "hawa-h-6 hawa-w-6",
|
|
25
|
+
normal: "hawa-h-8 hawa-w-8",
|
|
26
|
+
lg: "hawa-h-14 hawa-w-14",
|
|
27
|
+
xl: "hawa-h-24 hawa-w-24"
|
|
28
28
|
};
|
|
29
29
|
let animationStyles = {
|
|
30
|
-
pulse: "animate-in fade-in duration-1000",
|
|
31
|
-
bounce: "animate-bounce"
|
|
30
|
+
pulse: "hawa-animate-in hawa-fade-in hawa-duration-1000",
|
|
31
|
+
bounce: "hawa-animate-bounce"
|
|
32
32
|
};
|
|
33
33
|
switch (design.split("-")[0]) {
|
|
34
34
|
case "dots":
|
|
35
|
-
return /* @__PURE__ */ React.createElement("div", { className: "flex flex-row gap-2" }, /* @__PURE__ */ React.createElement(
|
|
35
|
+
return /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-2" }, /* @__PURE__ */ React.createElement(
|
|
36
36
|
"div",
|
|
37
37
|
{
|
|
38
38
|
className: clsx2(
|
|
39
|
-
"animate-bounce rounded-full delay-100 repeat-infinite",
|
|
40
|
-
size === "button" ? "h-2 w-2" : sizeStyles[size],
|
|
39
|
+
"hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite",
|
|
40
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
|
41
41
|
animationStyles[design.split("-")[1]],
|
|
42
|
-
color ? color : "bg-primary"
|
|
42
|
+
color ? color : "hawa-bg-primary"
|
|
43
43
|
)
|
|
44
44
|
}
|
|
45
45
|
), /* @__PURE__ */ React.createElement(
|
|
46
46
|
"div",
|
|
47
47
|
{
|
|
48
48
|
className: clsx2(
|
|
49
|
-
"animate-bounce rounded-full delay-200 repeat-infinite",
|
|
50
|
-
size === "button" ? "h-2 w-2" : sizeStyles[size],
|
|
49
|
+
"hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite",
|
|
50
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
|
51
51
|
animationStyles[design.split("-")[1]],
|
|
52
|
-
color ? color : "bg-primary"
|
|
52
|
+
color ? color : "hawa-bg-primary"
|
|
53
53
|
)
|
|
54
54
|
}
|
|
55
55
|
), /* @__PURE__ */ React.createElement(
|
|
56
56
|
"div",
|
|
57
57
|
{
|
|
58
58
|
className: clsx2(
|
|
59
|
-
"animate-bounce rounded-full delay-300 repeat-infinite",
|
|
60
|
-
size === "button" ? "h-2 w-2" : sizeStyles[size],
|
|
59
|
+
"hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite",
|
|
60
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
|
61
61
|
animationStyles[design.split("-")[1]],
|
|
62
|
-
color ? color : "bg-primary"
|
|
62
|
+
color ? color : "hawa-bg-primary"
|
|
63
63
|
)
|
|
64
64
|
}
|
|
65
65
|
));
|
|
66
66
|
default:
|
|
67
|
-
return /* @__PURE__ */ React.createElement("div", { className: "flex flex-row gap-x-3" }, /* @__PURE__ */ React.createElement("div", { "aria-label": "Loading...", role: "status" }, /* @__PURE__ */ React.createElement(
|
|
67
|
+
return /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-x-3" }, /* @__PURE__ */ React.createElement("div", { "aria-label": "Loading...", role: "status" }, /* @__PURE__ */ React.createElement(
|
|
68
68
|
"svg",
|
|
69
69
|
{
|
|
70
|
-
className: clsx2(sizeStyles[size], "animate-spin"),
|
|
70
|
+
className: clsx2(sizeStyles[size], "hawa-animate-spin"),
|
|
71
71
|
viewBox: "3 3 18 18"
|
|
72
72
|
},
|
|
73
73
|
/* @__PURE__ */ React.createElement(
|
|
74
74
|
"path",
|
|
75
75
|
{
|
|
76
|
-
className: "fill-primary/20",
|
|
76
|
+
className: "hawa-fill-primary/20",
|
|
77
77
|
d: "M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z"
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
80
|
/* @__PURE__ */ React.createElement(
|
|
81
81
|
"path",
|
|
82
82
|
{
|
|
83
|
-
className: color ? color : "fill-primary",
|
|
83
|
+
className: color ? color : "hawa-fill-primary",
|
|
84
84
|
d: "M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z"
|
|
85
85
|
}
|
|
86
86
|
)
|
|
@@ -151,7 +151,122 @@ var Button = React2.forwardRef(
|
|
|
151
151
|
}
|
|
152
152
|
);
|
|
153
153
|
Button.displayName = "Button";
|
|
154
|
+
|
|
155
|
+
// components/elements/Card.tsx
|
|
156
|
+
import * as React3 from "react";
|
|
157
|
+
var Card = React3.forwardRef(
|
|
158
|
+
({ className, clickable = false, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
159
|
+
"div",
|
|
160
|
+
{
|
|
161
|
+
ref,
|
|
162
|
+
className: cn(
|
|
163
|
+
"rounded-lg border bg-card text-card-foreground shadow-sm",
|
|
164
|
+
clickable && "cursor-pointer transition-all hover:drop-shadow-md dark:hover:shadow-dark",
|
|
165
|
+
className
|
|
166
|
+
),
|
|
167
|
+
...props
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
);
|
|
171
|
+
Card.displayName = "Card";
|
|
172
|
+
var CardHeader = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
173
|
+
"div",
|
|
174
|
+
{
|
|
175
|
+
ref,
|
|
176
|
+
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
177
|
+
...props
|
|
178
|
+
}
|
|
179
|
+
));
|
|
180
|
+
CardHeader.displayName = "CardHeader";
|
|
181
|
+
var CardTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
182
|
+
"h3",
|
|
183
|
+
{
|
|
184
|
+
ref,
|
|
185
|
+
className: cn(
|
|
186
|
+
"text-2xl font-semibold leading-none tracking-tight",
|
|
187
|
+
className
|
|
188
|
+
),
|
|
189
|
+
...props
|
|
190
|
+
}
|
|
191
|
+
));
|
|
192
|
+
CardTitle.displayName = "CardTitle";
|
|
193
|
+
var CardDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
194
|
+
"p",
|
|
195
|
+
{
|
|
196
|
+
ref,
|
|
197
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
198
|
+
...props
|
|
199
|
+
}
|
|
200
|
+
));
|
|
201
|
+
CardDescription.displayName = "CardDescription";
|
|
202
|
+
var CardContent = React3.forwardRef(
|
|
203
|
+
({ headless, className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
204
|
+
"div",
|
|
205
|
+
{
|
|
206
|
+
ref,
|
|
207
|
+
className: cn("p-6", headless ? "pt-6" : "pt-0", className),
|
|
208
|
+
...props
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
);
|
|
212
|
+
CardContent.displayName = "CardContent";
|
|
213
|
+
var CardFooter = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
214
|
+
"div",
|
|
215
|
+
{
|
|
216
|
+
ref,
|
|
217
|
+
className: cn("flex items-center p-6 pt-0", className),
|
|
218
|
+
...props
|
|
219
|
+
}
|
|
220
|
+
));
|
|
221
|
+
CardFooter.displayName = "CardFooter";
|
|
222
|
+
|
|
223
|
+
// components/elements/ActionCard.tsx
|
|
224
|
+
import React4, { useState } from "react";
|
|
225
|
+
var ActionCard = (props) => {
|
|
226
|
+
const [hovered, setHovered] = useState(false);
|
|
227
|
+
return /* @__PURE__ */ React4.createElement("div", { className: "hawa-flex hawa-h-full hawa-w-full hawa-flex-col hawa-gap-1" }, /* @__PURE__ */ React4.createElement(
|
|
228
|
+
"div",
|
|
229
|
+
{
|
|
230
|
+
className: "hawa-group hawa-relative hawa-h-full hawa-w-full hawa-rounded hawa-border hawa-bg-background hawa-bg-cover hawa-bg-center hawa-transition-all hawa-duration-500 hover:hawa-drop-shadow-2xl",
|
|
231
|
+
style: {
|
|
232
|
+
backgroundImage: `url(${props.blank ? "" : props.cardImage})`
|
|
233
|
+
},
|
|
234
|
+
onMouseEnter: () => setHovered(true),
|
|
235
|
+
onMouseLeave: () => setHovered(false)
|
|
236
|
+
},
|
|
237
|
+
props.blank ? /* @__PURE__ */ React4.createElement("div", { className: "hawa-flex hawa-h-full hawa-flex-col hawa-items-center hawa-justify-center " }, /* @__PURE__ */ React4.createElement(
|
|
238
|
+
"svg",
|
|
239
|
+
{
|
|
240
|
+
className: "hawa-h-10 hawa-w-10 hawa-text-foreground",
|
|
241
|
+
stroke: "currentColor",
|
|
242
|
+
fill: "currentColor",
|
|
243
|
+
"stroke-width": "0",
|
|
244
|
+
viewBox: "0 0 24 24",
|
|
245
|
+
height: "1em",
|
|
246
|
+
width: "1em",
|
|
247
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
248
|
+
},
|
|
249
|
+
/* @__PURE__ */ React4.createElement("path", { d: "M19 11h-6V5h-2v6H5v2h6v6h2v-6h6z" })
|
|
250
|
+
)) : /* @__PURE__ */ React4.createElement("div", { className: "hawa-absolute hawa-inset-0 hawa-rounded hawa-bg-black hawa-opacity-50" }),
|
|
251
|
+
/* @__PURE__ */ React4.createElement("div", { className: "hawa-absolute hawa-bottom-2 hawa-right-2 hawa-z-10 hawa-opacity-0 hawa-transition-all hawa-duration-200 group-hover:hawa-opacity-100" }, props.inCardActions),
|
|
252
|
+
!props.blank && /* @__PURE__ */ React4.createElement("div", { className: "hawa-relative hawa-p-4" }, /* @__PURE__ */ React4.createElement("h1", { className: "hawa-text-white" }, props.title), /* @__PURE__ */ React4.createElement("p", { className: "hawa-text-white" }, props.subtitle))
|
|
253
|
+
), /* @__PURE__ */ React4.createElement(
|
|
254
|
+
"div",
|
|
255
|
+
{
|
|
256
|
+
className: `hawa-flex hawa-flex-row hawa-justify-between hawa-text-sm hawa-transition-all hawa-duration-200 ${hovered ? "hawa-opacity-100" : "hawa-opacity-0"}`
|
|
257
|
+
},
|
|
258
|
+
props.bottomElement
|
|
259
|
+
));
|
|
260
|
+
};
|
|
154
261
|
export {
|
|
262
|
+
ActionCard,
|
|
155
263
|
Button,
|
|
264
|
+
Card,
|
|
265
|
+
CardContent,
|
|
266
|
+
CardDescription,
|
|
267
|
+
CardFooter,
|
|
268
|
+
CardHeader,
|
|
269
|
+
CardTitle,
|
|
270
|
+
Loading,
|
|
156
271
|
buttonVariants
|
|
157
272
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sikka/hawa",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7-beta",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"eslint": "8.50.0",
|
|
34
34
|
"eslint-config-next": "13.5.3",
|
|
35
35
|
"next": "13.5.3",
|
|
36
|
+
"next-themes": "^0.2.1",
|
|
36
37
|
"react": "18.2.0",
|
|
37
38
|
"react-dom": "18.2.0",
|
|
38
39
|
"tailwind-merge": "^1.14.0",
|
|
@@ -53,8 +54,9 @@
|
|
|
53
54
|
"postcss-cli": "^10.1.0",
|
|
54
55
|
"postcss-import": "^15.1.0",
|
|
55
56
|
"storybook": "^7.4.5",
|
|
57
|
+
"storybook-dark-mode": "^3.0.1",
|
|
56
58
|
"tailwindcss": "^3.3.3",
|
|
57
59
|
"tailwindcss-animate": "^1.0.7",
|
|
58
60
|
"tsup": "^7.2.0"
|
|
59
61
|
}
|
|
60
|
-
}
|
|
62
|
+
}
|